Files
shlink-web-client/develop/assets/index-BwjyFpW2.js

619 lines
1.3 MiB
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function hB(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function aa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pb={exports:{}},Gd={};var LA;function mB(){if(LA)return Gd;LA=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return Gd.Fragment=t,Gd.jsx=n,Gd.jsxs=n,Gd}var NA;function pB(){return NA||(NA=1,pb.exports=mB()),pb.exports}var g=pB(),gb={exports:{}},Yd={},vb={exports:{}},yb={};var RA;function gB(){return RA||(RA=1,function(e){function t(Y,k){var z=Y.length;Y.push(k);e:for(;0<z;){var H=z-1>>>1,I=Y[H];if(0<i(I,k))Y[H]=k,Y[z]=I,z=H;else break e}}function n(Y){return Y.length===0?null:Y[0]}function r(Y){if(Y.length===0)return null;var k=Y[0],z=Y.pop();if(z!==k){Y[0]=z;e:for(var H=0,I=Y.length,j=I>>>1;H<j;){var q=2*(H+1)-1,ee=Y[q],le=q+1,pe=Y[le];if(0>i(ee,z))le<I&&0>i(pe,ee)?(Y[H]=pe,Y[le]=z,H=le):(Y[H]=ee,Y[q]=z,H=q);else if(le<I&&0>i(pe,z))Y[H]=pe,Y[le]=z,H=le;else break e}}return k}function i(Y,k){var z=Y.sortIndex-k.sortIndex;return z!==0?z:Y.id-k.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],h=[],m=1,y=null,x=3,b=!1,C=!1,w=!1,A=!1,O=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function F(Y){for(var k=n(h);k!==null;){if(k.callback===null)r(h);else if(k.startTime<=Y)r(h),k.sortIndex=k.expirationTime,t(f,k);else break;k=n(h)}}function U(Y){if(w=!1,F(Y),!C)if(n(f)!==null)C=!0,W||(W=!0,oe());else{var k=n(h);k!==null&&ue(U,k.startTime-Y)}}var W=!1,X=-1,ae=5,ce=-1;function re(){return A?!0:!(e.unstable_now()-ce<ae)}function J(){if(A=!1,W){var Y=e.unstable_now();ce=Y;var k=!0;try{e:{C=!1,w&&(w=!1,P(X),X=-1),b=!0;var z=x;try{t:{for(F(Y),y=n(f);y!==null&&!(y.expirationTime>Y&&re());){var H=y.callback;if(typeof H=="function"){y.callback=null,x=y.priorityLevel;var I=H(y.expirationTime<=Y);if(Y=e.unstable_now(),typeof I=="function"){y.callback=I,F(Y),k=!0;break t}y===n(f)&&r(f),F(Y)}else r(f);y=n(f)}if(y!==null)k=!0;else{var j=n(h);j!==null&&ue(U,j.startTime-Y),k=!1}}break e}finally{y=null,x=z,b=!1}k=void 0}}finally{k?oe():W=!1}}}var oe;if(typeof N=="function")oe=function(){N(J)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,se=_e.port2;_e.port1.onmessage=J,oe=function(){se.postMessage(null)}}else oe=function(){O(J,0)};function ue(Y,k){X=O(function(){Y(e.unstable_now())},k)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Y){Y.callback=null},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(Y){switch(x){case 1:case 2:case 3:var k=3;break;default:k=x}var z=x;x=k;try{return Y()}finally{x=z}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(Y,k){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var z=x;x=Y;try{return k()}finally{x=z}},e.unstable_scheduleCallback=function(Y,k,z){var H=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?H+z:H):z=H,Y){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=z+I,Y={id:m++,callback:k,priorityLevel:Y,startTime:z,expirationTime:I,sortIndex:-1},z>H?(Y.sortIndex=z,t(h,Y),n(f)===null&&Y===n(h)&&(w?(P(X),X=-1):w=!0,ue(U,z-H))):(Y.sortIndex=I,t(f,Y),C||b||(C=!0,W||(W=!0,oe()))),Y},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(Y){var k=x;return function(){var z=x;x=k;try{return Y.apply(this,arguments)}finally{x=z}}}}(yb)),yb}var DA;function vB(){return DA||(DA=1,vb.exports=gB()),vb.exports}var bb={exports:{}},ct={};var kA;function yB(){if(kA)return ct;kA=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function b(j){return j===null||typeof j!="object"?null:(j=x&&j[x]||j["@@iterator"],typeof j=="function"?j:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,A={};function O(j,q,ee){this.props=j,this.context=q,this.refs=A,this.updater=ee||C}O.prototype.isReactComponent={},O.prototype.setState=function(j,q){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,q,"setState")},O.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function P(){}P.prototype=O.prototype;function N(j,q,ee){this.props=j,this.context=q,this.refs=A,this.updater=ee||C}var F=N.prototype=new P;F.constructor=N,w(F,O.prototype),F.isPureReactComponent=!0;var U=Array.isArray;function W(){}var X={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function ce(j,q,ee){var le=ee.ref;return{$$typeof:e,type:j,key:q,ref:le!==void 0?le:null,props:ee}}function re(j,q){return ce(j.type,q,j.props)}function J(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function oe(j){var q={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ee){return q[ee]})}var _e=/\/+/g;function se(j,q){return typeof j=="object"&&j!==null&&j.key!=null?oe(""+j.key):q.toString(36)}function ue(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(W,W):(j.status="pending",j.then(function(q){j.status==="pending"&&(j.status="fulfilled",j.value=q)},function(q){j.status==="pending"&&(j.status="rejected",j.reason=q)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function Y(j,q,ee,le,pe){var he=typeof j;(he==="undefined"||he==="boolean")&&(j=null);var ve=!1;if(j===null)ve=!0;else switch(he){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(j.$$typeof){case e:case t:ve=!0;break;case m:return ve=j._init,Y(ve(j._payload),q,ee,le,pe)}}if(ve)return pe=pe(j),ve=le===""?"."+se(j,0):le,U(pe)?(ee="",ve!=null&&(ee=ve.replace(_e,"$&/")+"/"),Y(pe,q,ee,"",function(G){return G})):pe!=null&&(J(pe)&&(pe=re(pe,ee+(pe.key==null||j&&j.key===pe.key?"":(""+pe.key).replace(_e,"$&/")+"/")+ve)),q.push(pe)),1;ve=0;var D=le===""?".":le+":";if(U(j))for(var R=0;R<j.length;R++)le=j[R],he=D+se(le,R),ve+=Y(le,q,ee,he,pe);else if(R=b(j),typeof R=="function")for(j=R.call(j),R=0;!(le=j.next()).done;)le=le.value,he=D+se(le,R++),ve+=Y(le,q,ee,he,pe);else if(he==="object"){if(typeof j.then=="function")return Y(ue(j),q,ee,le,pe);throw q=String(j),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ve}function k(j,q,ee){if(j==null)return j;var le=[],pe=0;return Y(j,le,"","",function(he){return q.call(ee,he,pe++)}),le}function z(j){if(j._status===-1){var q=j._result;q=q(),q.then(function(ee){(j._status===0||j._status===-1)&&(j._status=1,j._result=ee)},function(ee){(j._status===0||j._status===-1)&&(j._status=2,j._result=ee)}),j._status===-1&&(j._status=0,j._result=q)}if(j._status===1)return j._result.default;throw j._result}var H=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},I={map:k,forEach:function(j,q,ee){k(j,function(){q.apply(this,arguments)},ee)},count:function(j){var q=0;return k(j,function(){q++}),q},toArray:function(j){return k(j,function(q){return q})||[]},only:function(j){if(!J(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return ct.Activity=y,ct.Children=I,ct.Component=O,ct.Fragment=n,ct.Profiler=i,ct.PureComponent=N,ct.StrictMode=r,ct.Suspense=f,ct.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,ct.__COMPILER_RUNTIME={__proto__:null,c:function(j){return X.H.useMemoCache(j)}},ct.cache=function(j){return function(){return j.apply(null,arguments)}},ct.cacheSignal=function(){return null},ct.cloneElement=function(j,q,ee){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var le=w({},j.props),pe=j.key;if(q!=null)for(he in q.key!==void 0&&(pe=""+q.key),q)!ae.call(q,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&q.ref===void 0||(le[he]=q[he]);var he=arguments.length-2;if(he===1)le.children=ee;else if(1<he){for(var ve=Array(he),D=0;D<he;D++)ve[D]=arguments[D+2];le.children=ve}return ce(j.type,pe,le)},ct.createContext=function(j){return j={$$typeof:l,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:o,_context:j},j},ct.createElement=function(j,q,ee){var le,pe={},he=null;if(q!=null)for(le in q.key!==void 0&&(he=""+q.key),q)ae.call(q,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(pe[le]=q[le]);var ve=arguments.length-2;if(ve===1)pe.children=ee;else if(1<ve){for(var D=Array(ve),R=0;R<ve;R++)D[R]=arguments[R+2];pe.children=D}if(j&&j.defaultProps)for(le in ve=j.defaultProps,ve)pe[le]===void 0&&(pe[le]=ve[le]);return ce(j,he,pe)},ct.createRef=function(){return{current:null}},ct.forwardRef=function(j){return{$$typeof:c,render:j}},ct.isValidElement=J,ct.lazy=function(j){return{$$typeof:m,_payload:{_status:-1,_result:j},_init:z}},ct.memo=function(j,q){return{$$typeof:h,type:j,compare:q===void 0?null:q}},ct.startTransition=function(j){var q=X.T,ee={};X.T=ee;try{var le=j(),pe=X.S;pe!==null&&pe(ee,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(W,H)}catch(he){H(he)}finally{q!==null&&ee.types!==null&&(q.types=ee.types),X.T=q}},ct.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},ct.use=function(j){return X.H.use(j)},ct.useActionState=function(j,q,ee){return X.H.useActionState(j,q,ee)},ct.useCallback=function(j,q){return X.H.useCallback(j,q)},ct.useContext=function(j){return X.H.useContext(j)},ct.useDebugValue=function(){},ct.useDeferredValue=function(j,q){return X.H.useDeferredValue(j,q)},ct.useEffect=function(j,q){return X.H.useEffect(j,q)},ct.useEffectEvent=function(j){return X.H.useEffectEvent(j)},ct.useId=function(){return X.H.useId()},ct.useImperativeHandle=function(j,q,ee){return X.H.useImperativeHandle(j,q,ee)},ct.useInsertionEffect=function(j,q){return X.H.useInsertionEffect(j,q)},ct.useLayoutEffect=function(j,q){return X.H.useLayoutEffect(j,q)},ct.useMemo=function(j,q){return X.H.useMemo(j,q)},ct.useOptimistic=function(j,q){return X.H.useOptimistic(j,q)},ct.useReducer=function(j,q,ee){return X.H.useReducer(j,q,ee)},ct.useRef=function(j){return X.H.useRef(j)},ct.useState=function(j){return X.H.useState(j)},ct.useSyncExternalStore=function(j,q,ee){return X.H.useSyncExternalStore(j,q,ee)},ct.useTransition=function(){return X.H.useTransition()},ct.version="19.2.0",ct}var IA;function _f(){return IA||(IA=1,bb.exports=yB()),bb.exports}var xb={exports:{}},Lr={};var zA;function bB(){if(zA)return Lr;zA=1;var e=_f();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(f,h,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:f,containerInfo:h,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Lr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Lr.createPortal=function(f,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(f,h,null,m)},Lr.flushSync=function(f){var h=l.T,m=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=h,r.p=m,r.d.f()}},Lr.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},Lr.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},Lr.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var m=h.as,y=c(m,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:b}):m==="script"&&r.d.X(f,{crossOrigin:y,integrity:x,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Lr.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=c(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},Lr.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,y=c(m,h.crossOrigin);r.d.L(f,m,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Lr.preloadModule=function(f,h){if(typeof f=="string")if(h){var m=c(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},Lr.requestFormReset=function(f){r.d.r(f)},Lr.unstable_batchedUpdates=function(f,h){return f(h)},Lr.useFormState=function(f,h,m){return l.H.useFormState(f,h,m)},Lr.useFormStatus=function(){return l.H.useHostTransitionStatus()},Lr.version="19.2.0",Lr}var UA;function zL(){if(UA)return xb.exports;UA=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),xb.exports=bB(),xb.exports}var BA;function xB(){if(BA)return Yd;BA=1;var e=vB(),t=_f(),n=zL();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)s+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var s=a,d=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(d=s.return),a=s.return;while(a)}return s.tag===3?d:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function f(a){if(o(a)!==a)throw Error(r(188))}function h(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(r(188));return s!==a?null:a}for(var d=a,v=s;;){var E=d.return;if(E===null)break;var T=E.alternate;if(T===null){if(v=E.return,v!==null){d=v;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===d)return f(E),a;if(T===v)return f(E),s;T=T.sibling}throw Error(r(188))}if(d.return!==v.return)d=E,v=T;else{for(var $=!1,Q=E.child;Q;){if(Q===d){$=!0,d=E,v=T;break}if(Q===v){$=!0,v=E,d=T;break}Q=Q.sibling}if(!$){for(Q=T.child;Q;){if(Q===d){$=!0,d=T,v=E;break}if(Q===v){$=!0,v=T,d=E;break}Q=Q.sibling}if(!$)throw Error(r(189))}}if(d.alternate!==v)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?a:s}function m(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=m(a),s!==null)return s;a=a.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),N=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function oe(a){return a===null||typeof a!="object"?null:(a=J&&a[J]||a["@@iterator"],typeof a=="function"?a:null)}var _e=Symbol.for("react.client.reference");function se(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===_e?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case O:return"Profiler";case A:return"StrictMode";case U:return"Suspense";case W:return"SuspenseList";case ce:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case C:return"Portal";case N:return a.displayName||"Context";case P:return(a._context.displayName||"Context")+".Consumer";case F:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case X:return s=a.displayName||null,s!==null?s:se(a.type)||"Memo";case ae:s=a._payload,a=a._init;try{return se(a(s))}catch{}}return null}var ue=Array.isArray,Y=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},H=[],I=-1;function j(a){return{current:a}}function q(a){0>I||(a.current=H[I],H[I]=null,I--)}function ee(a,s){I++,H[I]=a.current,a.current=s}var le=j(null),pe=j(null),he=j(null),ve=j(null);function D(a,s){switch(ee(he,s),ee(pe,a),ee(le,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?tA(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=tA(s),a=nA(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}q(le),ee(le,a)}function R(){q(le),q(pe),q(he)}function G(a){a.memoizedState!==null&&ee(ve,a);var s=le.current,d=nA(s,a.type);s!==d&&(ee(pe,a),ee(le,d))}function te(a){pe.current===a&&(q(le),q(pe)),ve.current===a&&(q(ve),$d._currentValue=z)}var V,Z;function ne(a){if(V===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);V=s&&s[1]||"",Z=-1<d.stack.indexOf(`
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
`+V+a+Z}var me=!1;function ie(a,s){if(!a||me)return"";me=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(s){var Re=function(){throw Error()};if(Object.defineProperty(Re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Re,[])}catch(je){var Te=je}Reflect.construct(a,[],Re)}else{try{Re.call()}catch(je){Te=je}a.call(Re.prototype)}}else{try{throw Error()}catch(je){Te=je}(Re=a())&&typeof Re.catch=="function"&&Re.catch(function(){})}}catch(je){if(je&&Te&&typeof je.stack=="string")return[je.stack,Te.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=v.DetermineComponentFrameRoot(),$=T[0],Q=T[1];if($&&Q){var de=$.split(`
`),Se=Q.split(`
`);for(E=v=0;v<de.length&&!de[v].includes("DetermineComponentFrameRoot");)v++;for(;E<Se.length&&!Se[E].includes("DetermineComponentFrameRoot");)E++;if(v===de.length||E===Se.length)for(v=de.length-1,E=Se.length-1;1<=v&&0<=E&&de[v]!==Se[E];)E--;for(;1<=v&&0<=E;v--,E--)if(de[v]!==Se[E]){if(v!==1||E!==1)do if(v--,E--,0>E||de[v]!==Se[E]){var Pe=`
`+de[v].replace(" at new "," at ");return a.displayName&&Pe.includes("<anonymous>")&&(Pe=Pe.replace("<anonymous>",a.displayName)),Pe}while(1<=v&&0<=E);break}}}finally{me=!1,Error.prepareStackTrace=d}return(d=a?a.displayName||a.name:"")?ne(d):""}function xe(a,s){switch(a.tag){case 26:case 27:case 5:return ne(a.type);case 16:return ne("Lazy");case 13:return a.child!==s&&s!==null?ne("Suspense Fallback"):ne("Suspense");case 19:return ne("SuspenseList");case 0:case 15:return ie(a.type,!1);case 11:return ie(a.type.render,!1);case 1:return ie(a.type,!0);case 31:return ne("Activity");default:return""}}function Ee(a){try{var s="",d=null;do s+=xe(a,d),d=a,a=a.return;while(a);return s}catch(v){return`
Error generating stack: `+v.message+`
`+v.stack}}var Me=Object.prototype.hasOwnProperty,Ue=e.unstable_scheduleCallback,ke=e.unstable_cancelCallback,Ve=e.unstable_shouldYield,ot=e.unstable_requestPaint,Ge=e.unstable_now,Qe=e.unstable_getCurrentPriorityLevel,We=e.unstable_ImmediatePriority,ze=e.unstable_UserBlockingPriority,nt=e.unstable_NormalPriority,Pt=e.unstable_LowPriority,at=e.unstable_IdlePriority,Lt=e.log,Ot=e.unstable_setDisableYieldValue,gt=null,$t=null;function On(a){if(typeof Lt=="function"&&Ot(a),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(gt,a)}catch{}}var vt=Math.clz32?Math.clz32:Rl,Ui=Math.log,Xn=Math.LN2;function Rl(a){return a>>>=0,a===0?32:31-(Ui(a)/Xn|0)|0}var Ur=256,fo=262144,ho=4194304;function Bi(a){var s=a&42;if(s!==0)return s;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Da(a,s,d){var v=a.pendingLanes;if(v===0)return 0;var E=0,T=a.suspendedLanes,$=a.pingedLanes;a=a.warmLanes;var Q=v&134217727;return Q!==0?(v=Q&~T,v!==0?E=Bi(v):($&=Q,$!==0?E=Bi($):d||(d=Q&~a,d!==0&&(E=Bi(d))))):(Q=v&~T,Q!==0?E=Bi(Q):$!==0?E=Bi($):d||(d=v&~a,d!==0&&(E=Bi(d)))),E===0?0:s!==0&&s!==E&&(s&T)===0&&(T=E&-E,d=s&-s,T>=d||T===32&&(d&4194048)!==0)?s:E}function hi(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function jn(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fn(){var a=ho;return ho<<=1,(ho&62914560)===0&&(ho=4194304),a}function Qn(a){for(var s=[],d=0;31>d;d++)s.push(a);return s}function xn(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Jn(a,s,d,v,E,T){var $=a.pendingLanes;a.pendingLanes=d,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=d,a.entangledLanes&=d,a.errorRecoveryDisabledLanes&=d,a.shellSuspendCounter=0;var Q=a.entanglements,de=a.expirationTimes,Se=a.hiddenUpdates;for(d=$&~d;0<d;){var Pe=31-vt(d),Re=1<<Pe;Q[Pe]=0,de[Pe]=-1;var Te=Se[Pe];if(Te!==null)for(Se[Pe]=null,Pe=0;Pe<Te.length;Pe++){var je=Te[Pe];je!==null&&(je.lane&=-536870913)}d&=~Re}v!==0&&Mn(a,v,0),T!==0&&E===0&&a.tag!==0&&(a.suspendedLanes|=T&~($&~s))}function Mn(a,s,d){a.pendingLanes|=s,a.suspendedLanes&=~s;var v=31-vt(s);a.entangledLanes|=s,a.entanglements[v]=a.entanglements[v]|1073741824|d&261930}function Zr(a,s){var d=a.entangledLanes|=s;for(a=a.entanglements;d;){var v=31-vt(d),E=1<<v;E&s|a[v]&s&&(a[v]|=s),d&=~E}}function Xr(a,s){var d=s&-s;return d=(d&42)!==0?1:Dn(d),(d&(a.suspendedLanes|s))!==0?0:d}function Dn(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function et(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function qf(){var a=k.p;return a!==0?a:(a=window.event,a===void 0?32:EA(a.type))}function Gf(a,s){var d=k.p;try{return k.p=a,s()}finally{k.p=d}}var sa=Math.random().toString(36).slice(2),$n="__reactFiber$"+sa,dr="__reactProps$"+sa,mo="__reactContainer$"+sa,ka="__reactEvents$"+sa,jm="__reactListeners$"+sa,C0="__reactHandles$"+sa,Mm="__reactResources$"+sa,Dl="__reactMarker$"+sa;function Yf(a){delete a[$n],delete a[dr],delete a[ka],delete a[jm],delete a[C0]}function po(a){var s=a[$n];if(s)return s;for(var d=a.parentNode;d;){if(s=d[mo]||d[$n]){if(d=s.alternate,s.child!==null||d!==null&&d.child!==null)for(a=uA(a);a!==null;){if(d=a[$n])return d;a=uA(a)}return s}a=d,d=a.parentNode}return null}function ps(a){if(a=a[$n]||a[mo]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function Ia(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function gs(a){var s=a[Mm];return s||(s=a[Mm]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Vn(a){a[Dl]=!0}var Pm=new Set,Lm={};function go(a,s){za(a,s),za(a+"Capture",s)}function za(a,s){for(Lm[a]=s,a=0;a<s.length;a++)Pm.add(s[a])}var kl=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Wf={},Kf={};function Il(a){return Me.call(Kf,a)?!0:Me.call(Wf,a)?!1:kl.test(a)?Kf[a]=!0:(Wf[a]=!0,!1)}function yt(a,s,d){if(Il(s))if(d===null)a.removeAttribute(s);else{switch(typeof d){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var v=s.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+d)}}function Gt(a,s,d){if(d===null)a.removeAttribute(s);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+d)}}function Qr(a,s,d,v){if(v===null)a.removeAttribute(d);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(d);return}a.setAttributeNS(s,d,""+v)}}function er(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function vo(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Zf(a,s,d){var v=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var E=v.get,T=v.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return E.call(this)},set:function($){d=""+$,T.call(this,$)}}),Object.defineProperty(a,s,{enumerable:v.enumerable}),{getValue:function(){return d},setValue:function($){d=""+$},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function ut(a){if(!a._valueTracker){var s=vo(a)?"checked":"value";a._valueTracker=Zf(a,s,""+a[s])}}function dn(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var d=s.getValue(),v="";return a&&(v=vo(a)?a.checked?"true":"false":a.value),a=v,a!==d?(s.setValue(a),!0):!1}function vs(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var tc=/[\n"\\]/g;function rn(a){return a.replace(tc,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Xf(a,s,d,v,E,T,$,Q){a.name="",$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?a.type=$:a.removeAttribute("type"),s!=null?$==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+er(s)):a.value!==""+er(s)&&(a.value=""+er(s)):$!=="submit"&&$!=="reset"||a.removeAttribute("value"),s!=null?la(a,$,er(s)):d!=null?la(a,$,er(d)):v!=null&&a.removeAttribute("value"),E==null&&T!=null&&(a.defaultChecked=!!T),E!=null&&(a.checked=E&&typeof E!="function"&&typeof E!="symbol"),Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"?a.name=""+er(Q):a.removeAttribute("name")}function zl(a,s,d,v,E,T,$,Q){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(a.type=T),s!=null||d!=null){if(!(T!=="submit"&&T!=="reset"||s!=null)){ut(a);return}d=d!=null?""+er(d):"",s=s!=null?""+er(s):d,Q||s===a.value||(a.value=s),a.defaultValue=s}v=v??E,v=typeof v!="function"&&typeof v!="symbol"&&!!v,a.checked=Q?a.checked:!!v,a.defaultChecked=!!v,$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"&&(a.name=$),ut(a)}function la(a,s,d){s==="number"&&vs(a.ownerDocument)===a||a.defaultValue===""+d||(a.defaultValue=""+d)}function Xt(a,s,d,v){if(a=a.options,s){s={};for(var E=0;E<d.length;E++)s["$"+d[E]]=!0;for(d=0;d<a.length;d++)E=s.hasOwnProperty("$"+a[d].value),a[d].selected!==E&&(a[d].selected=E),E&&v&&(a[d].defaultSelected=!0)}else{for(d=""+er(d),s=null,E=0;E<a.length;E++){if(a[E].value===d){a[E].selected=!0,v&&(a[E].defaultSelected=!0);return}s!==null||a[E].disabled||(s=a[E])}s!==null&&(s.selected=!0)}}function Ua(a,s,d){if(s!=null&&(s=""+er(s),s!==a.value&&(a.value=s),d==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=d!=null?""+er(d):""}function ys(a,s,d,v){if(s==null){if(v!=null){if(d!=null)throw Error(r(92));if(ue(v)){if(1<v.length)throw Error(r(93));v=v[0]}d=v}d==null&&(d=""),s=d}d=er(s),a.defaultValue=d,v=a.textContent,v===d&&v!==""&&v!==null&&(a.value=v),ut(a)}function Fi(a,s){if(s){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=s;return}}a.textContent=s}var Qf=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function bs(a,s,d){var v=s.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?v?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":v?a.setProperty(s,d):typeof d!="number"||d===0||Qf.has(s)?s==="float"?a.cssFloat=d:a[s]=(""+d).trim():a[s]=d+"px"}function nc(a,s,d){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,d!=null){for(var v in d)!d.hasOwnProperty(v)||s!=null&&s.hasOwnProperty(v)||(v.indexOf("--")===0?a.setProperty(v,""):v==="float"?a.cssFloat="":a[v]="");for(var E in s)v=s[E],s.hasOwnProperty(E)&&d[E]!==v&&bs(a,E,v)}else for(var T in s)s.hasOwnProperty(T)&&bs(a,T,s[T])}function Ul(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var rc=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Jf=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function xs(a){return Jf.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Jr(){}var ic=null;function Bl(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var _s=null,lt=null;function mi(a){var s=ps(a);if(s&&(a=s.stateNode)){var d=a[dr]||null;e:switch(a=s.stateNode,s.type){case"input":if(Xf(a,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),s=d.name,d.type==="radio"&&s!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+rn(""+s)+'"][type="radio"]'),s=0;s<d.length;s++){var v=d[s];if(v!==a&&v.form===a.form){var E=v[dr]||null;if(!E)throw Error(r(90));Xf(v,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(s=0;s<d.length;s++)v=d[s],v.form===a.form&&dn(v)}break e;case"textarea":Ua(a,d.value,d.defaultValue);break e;case"select":s=d.value,s!=null&&Xt(a,!!d.multiple,s,!1)}}}var Bt=!1;function ed(a,s,d){if(Bt)return a(s,d);Bt=!0;try{var v=a(s);return v}finally{if(Bt=!1,(_s!==null||lt!==null)&&(Op(),_s&&(s=_s,a=lt,lt=_s=null,mi(s),a)))for(s=0;s<a.length;s++)mi(a[s])}}function yo(a,s){var d=a.stateNode;if(d===null)return null;var v=d[dr]||null;if(v===null)return null;d=v[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(a=a.type,v=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!v;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(r(231,s,typeof d));return d}var pi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fl=!1;if(pi)try{var gi={};Object.defineProperty(gi,"passive",{get:function(){Fl=!0}}),window.addEventListener("test",gi,gi),window.removeEventListener("test",gi,gi)}catch{Fl=!1}var $i=null,bo=null,Pn=null;function Ba(){if(Pn)return Pn;var a,s=bo,d=s.length,v,E="value"in $i?$i.value:$i.textContent,T=E.length;for(a=0;a<d&&s[a]===E[a];a++);var $=d-a;for(v=1;v<=$&&s[d-v]===E[T-v];v++);return Pn=E.slice(a,1<v?1-v:void 0)}function $l(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function Vl(){return!0}function Nm(){return!1}function xr(a){function s(d,v,E,T,$){this._reactName=d,this._targetInst=E,this.type=v,this.nativeEvent=T,this.target=$,this.currentTarget=null;for(var Q in a)a.hasOwnProperty(Q)&&(d=a[Q],this[Q]=d?d(T):T[Q]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Vl:Nm,this.isPropagationStopped=Nm,this}return y(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Vl)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Vl)},persist:function(){},isPersistent:Vl}),s}var ua={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ac=xr(ua),ws=y({},ua,{view:0,detail:0}),Ct=xr(ws),td,Br,ca,Hl=y({},ws,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sd,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==ca&&(ca&&a.type==="mousemove"?(td=a.screenX-ca.screenX,Br=a.screenY-ca.screenY):Br=td=0,ca=a),td)},movementY:function(a){return"movementY"in a?a.movementY:Br}}),Rm=xr(Hl),nd=y({},Hl,{dataTransfer:0}),E0=xr(nd),Dm=y({},ws,{relatedTarget:0}),rd=xr(Dm),A0=y({},ua,{animationName:0,elapsedTime:0,pseudoElement:0}),id=xr(A0),T0=y({},ua,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Vi=xr(T0),O0=y({},ua,{data:0}),ad=xr(O0),Fa={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},km={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Im={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function od(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=Im[a])?!!s[a]:!1}function sd(){return od}var zm=y({},ws,{key:function(a){if(a.key){var s=Fa[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=$l(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?km[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sd,charCode:function(a){return a.type==="keypress"?$l(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?$l(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Um=xr(zm),j0=y({},Hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bm=xr(j0),ld=y({},ws,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sd}),M0=xr(ld),Fm=y({},ua,{propertyName:0,elapsedTime:0,pseudoElement:0}),$m=xr(Fm),oc=y({},Hl,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),xo=xr(oc),P0=y({},ua,{newState:0,oldState:0}),ql=xr(P0),ei=[9,13,27,32],sc=pi&&"CompositionEvent"in window,Ss=null;pi&&"documentMode"in document&&(Ss=document.documentMode);var L0=pi&&"TextEvent"in window&&!Ss,lc=pi&&(!sc||Ss&&8<Ss&&11>=Ss),uc=" ",Vm=!1;function Hm(a,s){switch(a){case"keyup":return ei.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ud(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Cs=!1;function vi(a,s){switch(a){case"compositionend":return ud(s);case"keypress":return s.which!==32?null:(Vm=!0,uc);case"textInput":return a=s.data,a===uc&&Vm?null:a;default:return null}}function Es(a,s){if(Cs)return a==="compositionend"||!sc&&Hm(a,s)?(a=Ba(),Pn=bo=$i=null,Cs=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return lc&&s.locale!=="ko"?null:s.data;default:return null}}var N0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hi(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!N0[a.type]:s==="textarea"}function qm(a,s,d,v){_s?lt?lt.push(v):lt=[v]:_s=v,s=Dp(s,"onChange"),0<s.length&&(d=new ac("onChange","change",null,d,v),a.push({event:d,listeners:s}))}var qi=null,Gl=null;function Yl(a){K4(a,0)}function Wl(a){var s=Ia(a);if(dn(s))return a}function Kl(a,s){if(a==="change")return s}var Gm=!1;if(pi){var Gi;if(pi){var As="oninput"in document;if(!As){var Ym=document.createElement("div");Ym.setAttribute("oninput","return;"),As=typeof Ym.oninput=="function"}Gi=As}else Gi=!1;Gm=Gi&&(!document.documentMode||9<document.documentMode)}function cc(){qi&&(qi.detachEvent("onpropertychange",Wm),Gl=qi=null)}function Wm(a){if(a.propertyName==="value"&&Wl(Gl)){var s=[];qm(s,Gl,a,Bl(a)),ed(Yl,s)}}function fa(a,s,d){a==="focusin"?(cc(),qi=s,Gl=d,qi.attachEvent("onpropertychange",Wm)):a==="focusout"&&cc()}function R0(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Wl(Gl)}function Ts(a,s){if(a==="click")return Wl(s)}function D0(a,s){if(a==="input"||a==="change")return Wl(s)}function da(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var hr=typeof Object.is=="function"?Object.is:da;function Os(a,s){if(hr(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var d=Object.keys(a),v=Object.keys(s);if(d.length!==v.length)return!1;for(v=0;v<d.length;v++){var E=d[v];if(!Me.call(s,E)||!hr(a[E],s[E]))return!1}return!0}function fc(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Zl(a,s){var d=fc(a);a=0;for(var v;d;){if(d.nodeType===3){if(v=a+d.textContent.length,a<=s&&v>=s)return{node:d,offset:s-a};a=v}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=fc(d)}}function dc(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?dc(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function Xl(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=vs(a.document);s instanceof a.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)a=s.contentWindow;else break;s=vs(a.document)}return s}function $a(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var hc=pi&&"documentMode"in document&&11>=document.documentMode,Va=null,mc=null,Ql=null,js=!1;function Km(a,s,d){var v=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;js||Va==null||Va!==vs(v)||(v=Va,"selectionStart"in v&&$a(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),Ql&&Os(Ql,v)||(Ql=v,v=Dp(mc,"onSelect"),0<v.length&&(s=new ac("onSelect","select",null,s,d),a.push({event:s,listeners:v}),s.target=Va)))}function Ha(a,s){var d={};return d[a.toLowerCase()]=s.toLowerCase(),d["Webkit"+a]="webkit"+s,d["Moz"+a]="moz"+s,d}var Ms={animationend:Ha("Animation","AnimationEnd"),animationiteration:Ha("Animation","AnimationIteration"),animationstart:Ha("Animation","AnimationStart"),transitionrun:Ha("Transition","TransitionRun"),transitionstart:Ha("Transition","TransitionStart"),transitioncancel:Ha("Transition","TransitionCancel"),transitionend:Ha("Transition","TransitionEnd")},pc={},Zm={};pi&&(Zm=document.createElement("div").style,"AnimationEvent"in window||(delete Ms.animationend.animation,delete Ms.animationiteration.animation,delete Ms.animationstart.animation),"TransitionEvent"in window||delete Ms.transitionend.transition);function mr(a){if(pc[a])return pc[a];if(!Ms[a])return a;var s=Ms[a],d;for(d in s)if(s.hasOwnProperty(d)&&d in Zm)return pc[a]=s[d];return a}var Jl=mr("animationend"),Xm=mr("animationiteration"),eu=mr("animationstart"),k0=mr("transitionrun"),Qm=mr("transitionstart"),I0=mr("transitioncancel"),Ps=mr("transitionend"),Jm=new Map,qa="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");qa.push("scrollEnd");function ti(a,s){Jm.set(a,s),go(s,[a])}var tu=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},ni=[],Mr=0,gc=0;function nu(){for(var a=Mr,s=gc=Mr=0;s<a;){var d=ni[s];ni[s++]=null;var v=ni[s];ni[s++]=null;var E=ni[s];ni[s++]=null;var T=ni[s];if(ni[s++]=null,v!==null&&E!==null){var $=v.pending;$===null?E.next=E:(E.next=$.next,$.next=E),v.pending=E}T!==0&&Ls(d,E,T)}}function Ga(a,s,d,v){ni[Mr++]=a,ni[Mr++]=s,ni[Mr++]=d,ni[Mr++]=v,gc|=v,a.lanes|=v,a=a.alternate,a!==null&&(a.lanes|=v)}function cd(a,s,d,v){return Ga(a,s,d,v),ru(a)}function Yi(a,s){return Ga(a,null,null,s),ru(a)}function Ls(a,s,d){a.lanes|=d;var v=a.alternate;v!==null&&(v.lanes|=d);for(var E=!1,T=a.return;T!==null;)T.childLanes|=d,v=T.alternate,v!==null&&(v.childLanes|=d),T.tag===22&&(a=T.stateNode,a===null||a._visibility&1||(E=!0)),a=T,T=T.return;return a.tag===3?(T=a.stateNode,E&&s!==null&&(E=31-vt(d),a=T.hiddenUpdates,v=a[E],v===null?a[E]=[s]:v.push(s),s.lane=d|536870912),T):null}function ru(a){if(50<Dd)throw Dd=0,U1=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var _o={};function z0(a,s,d,v){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pr(a,s,d,v){return new z0(a,s,d,v)}function vc(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Wi(a,s){var d=a.alternate;return d===null?(d=Pr(a.tag,s,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=s,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&65011712,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,s=a.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d.refCleanup=a.refCleanup,d}function fd(a,s){a.flags&=65011714;var d=a.alternate;return d===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=d.childLanes,a.lanes=d.lanes,a.child=d.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=d.memoizedProps,a.memoizedState=d.memoizedState,a.updateQueue=d.updateQueue,a.type=d.type,s=d.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function iu(a,s,d,v,E,T){var $=0;if(v=a,typeof a=="function")vc(a)&&($=1);else if(typeof a=="string")$=tB(a,d,le.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case ce:return a=Pr(31,d,s,E),a.elementType=ce,a.lanes=T,a;case w:return wo(d.children,E,T,s);case A:$=8,E|=24;break;case O:return a=Pr(12,d,s,E|2),a.elementType=O,a.lanes=T,a;case U:return a=Pr(13,d,s,E),a.elementType=U,a.lanes=T,a;case W:return a=Pr(19,d,s,E),a.elementType=W,a.lanes=T,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case N:$=10;break e;case P:$=9;break e;case F:$=11;break e;case X:$=14;break e;case ae:$=16,v=null;break e}$=29,d=Error(r(130,a===null?"null":typeof a,"")),v=null}return s=Pr($,d,s,E),s.elementType=a,s.type=v,s.lanes=T,s}function wo(a,s,d,v){return a=Pr(7,a,v,s),a.lanes=d,a}function yc(a,s,d){return a=Pr(6,a,null,s),a.lanes=d,a}function dd(a){var s=Pr(18,null,null,0);return s.stateNode=a,s}function hd(a,s,d){return s=Pr(4,a.children!==null?a.children:[],a.key,s),s.lanes=d,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var u=new WeakMap;function p(a,s){if(typeof a=="object"&&a!==null){var d=u.get(a);return d!==void 0?d:(s={value:a,source:s,stack:Ee(s)},u.set(a,s),s)}return{value:a,source:s,stack:Ee(s)}}var S=[],M=0,B=null,K=0,fe=[],be=0,Ae=null,Ne=1,He="";function tt(a,s){S[M++]=K,S[M++]=B,B=a,K=s}function ht(a,s,d){fe[be++]=Ne,fe[be++]=He,fe[be++]=Ae,Ae=a;var v=Ne;a=He;var E=32-vt(v)-1;v&=~(1<<E),d+=1;var T=32-vt(s)+E;if(30<T){var $=E-E%5;T=(v&(1<<$)-1).toString(32),v>>=$,E-=$,Ne=1<<32-vt(s)+E|d<<E|v,He=T+a}else Ne=1<<T|d<<E|v,He=a}function tr(a){a.return!==null&&(tt(a,1),ht(a,1,0))}function Ln(a){for(;a===B;)B=S[--M],S[M]=null,K=S[--M],S[M]=null;for(;a===Ae;)Ae=fe[--be],fe[be]=null,He=fe[--be],fe[be]=null,Ne=fe[--be],fe[be]=null}function Fr(a,s){fe[be++]=Ne,fe[be++]=He,fe[be++]=Ae,Ne=s.id,He=s.overflow,Ae=a}var Rt=null,Dt=null,bt=!1,Ya=null,ri=!1,bc=Error(r(519));function Wa(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw au(p(s,a)),bc}function md(a){var s=a.stateNode,d=a.type,v=a.memoizedProps;switch(s[$n]=a,s[dr]=v,d){case"dialog":_t("cancel",s),_t("close",s);break;case"iframe":case"object":case"embed":_t("load",s);break;case"video":case"audio":for(d=0;d<Id.length;d++)_t(Id[d],s);break;case"source":_t("error",s);break;case"img":case"image":case"link":_t("error",s),_t("load",s);break;case"details":_t("toggle",s);break;case"input":_t("invalid",s),zl(s,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":_t("invalid",s);break;case"textarea":_t("invalid",s),ys(s,v.value,v.defaultValue,v.children)}d=v.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||s.textContent===""+d||v.suppressHydrationWarning===!0||J4(s.textContent,d)?(v.popover!=null&&(_t("beforetoggle",s),_t("toggle",s)),v.onScroll!=null&&_t("scroll",s),v.onScrollEnd!=null&&_t("scrollend",s),v.onClick!=null&&(s.onclick=Jr),s=!0):s=!1,s||Wa(a,!0)}function _n(a){for(Rt=a.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:ri=!1;return;case 27:case 3:ri=!0;return;default:Rt=Rt.return}}function ha(a){if(a!==Rt)return!1;if(!bt)return _n(a),bt=!0,!1;var s=a.tag,d;if((d=s!==3&&s!==27)&&((d=s===5)&&(d=a.type,d=!(d!=="form"&&d!=="button")||eb(a.type,a.memoizedProps)),d=!d),d&&Dt&&Wa(a),_n(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));Dt=lA(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));Dt=lA(a)}else s===27?(s=Dt,Gs(a.type)?(a=ab,ab=null,Dt=a):Dt=s):Dt=Rt?Zi(a.stateNode.nextSibling):null;return!0}function So(){Dt=Rt=null,bt=!1}function pd(){var a=Ya;return a!==null&&(si===null?si=a:si.push.apply(si,a),Ya=null),a}function au(a){Ya===null?Ya=[a]:Ya.push(a)}var ou=j(null),Ka=null,ma=null;function Ns(a,s,d){ee(ou,s._currentValue),s._currentValue=d}function Co(a){a._currentValue=ou.current,q(ou)}function U0(a,s,d){for(;a!==null;){var v=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,v!==null&&(v.childLanes|=s)):v!==null&&(v.childLanes&s)!==s&&(v.childLanes|=s),a===d)break;a=a.return}}function B0(a,s,d,v){var E=a.child;for(E!==null&&(E.return=a);E!==null;){var T=E.dependencies;if(T!==null){var $=E.child;T=T.firstContext;e:for(;T!==null;){var Q=T;T=E;for(var de=0;de<s.length;de++)if(Q.context===s[de]){T.lanes|=d,Q=T.alternate,Q!==null&&(Q.lanes|=d),U0(T.return,d,a),v||($=null);break e}T=Q.next}}else if(E.tag===18){if($=E.return,$===null)throw Error(r(341));$.lanes|=d,T=$.alternate,T!==null&&(T.lanes|=d),U0($,d,a),$=null}else $=E.child;if($!==null)$.return=E;else for($=E;$!==null;){if($===a){$=null;break}if(E=$.sibling,E!==null){E.return=$.return,$=E;break}$=$.return}E=$}}function xc(a,s,d,v){a=null;for(var E=s,T=!1;E!==null;){if(!T){if((E.flags&524288)!==0)T=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var $=E.alternate;if($===null)throw Error(r(387));if($=$.memoizedProps,$!==null){var Q=E.type;hr(E.pendingProps.value,$.value)||(a!==null?a.push(Q):a=[Q])}}else if(E===ve.current){if($=E.alternate,$===null)throw Error(r(387));$.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(a!==null?a.push($d):a=[$d])}E=E.return}a!==null&&B0(s,a,d,v),s.flags|=262144}function ep(a){for(a=a.firstContext;a!==null;){if(!hr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function su(a){Ka=a,ma=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function _r(a){return z3(Ka,a)}function tp(a,s){return Ka===null&&su(a),z3(a,s)}function z3(a,s){var d=s._currentValue;if(s={context:s,memoizedValue:d,next:null},ma===null){if(a===null)throw Error(r(308));ma=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else ma=ma.next=s;return d}var Xz=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(d,v){a.push(v)}};this.abort=function(){s.aborted=!0,a.forEach(function(d){return d()})}},Qz=e.unstable_scheduleCallback,Jz=e.unstable_NormalPriority,Hn={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function F0(){return{controller:new Xz,data:new Map,refCount:0}}function gd(a){a.refCount--,a.refCount===0&&Qz(Jz,function(){a.controller.abort()})}var vd=null,$0=0,_c=0,wc=null;function eU(a,s){if(vd===null){var d=vd=[];$0=0,_c=q1(),wc={status:"pending",value:void 0,then:function(v){d.push(v)}}}return $0++,s.then(U3,U3),s}function U3(){if(--$0===0&&vd!==null){wc!==null&&(wc.status="fulfilled");var a=vd;vd=null,_c=0,wc=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function tU(a,s){var d=[],v={status:"pending",value:null,reason:null,then:function(E){d.push(E)}};return a.then(function(){v.status="fulfilled",v.value=s;for(var E=0;E<d.length;E++)(0,d[E])(s)},function(E){for(v.status="rejected",v.reason=E,E=0;E<d.length;E++)(0,d[E])(void 0)}),v}var B3=Y.S;Y.S=function(a,s){S4=Ge(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&eU(a,s),B3!==null&&B3(a,s)};var lu=j(null);function V0(){var a=lu.current;return a!==null?a:Qt.pooledCache}function np(a,s){s===null?ee(lu,lu.current):ee(lu,s.pool)}function F3(){var a=V0();return a===null?null:{parent:Hn._currentValue,pool:a}}var Sc=Error(r(460)),H0=Error(r(474)),rp=Error(r(542)),ip={then:function(){}};function $3(a){return a=a.status,a==="fulfilled"||a==="rejected"}function V3(a,s,d){switch(d=a[d],d===void 0?a.push(s):d!==s&&(s.then(Jr,Jr),s=d),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,q3(a),a;default:if(typeof s.status=="string")s.then(Jr,Jr);else{if(a=Qt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(v){if(s.status==="pending"){var E=s;E.status="fulfilled",E.value=v}},function(v){if(s.status==="pending"){var E=s;E.status="rejected",E.reason=v}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,q3(a),a}throw cu=s,Sc}}function uu(a){try{var s=a._init;return s(a._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(cu=d,Sc):d}}var cu=null;function H3(){if(cu===null)throw Error(r(459));var a=cu;return cu=null,a}function q3(a){if(a===Sc||a===rp)throw Error(r(483))}var Cc=null,yd=0;function ap(a){var s=yd;return yd+=1,Cc===null&&(Cc=[]),V3(Cc,a,s)}function bd(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function op(a,s){throw s.$$typeof===x?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function G3(a){function s(ye,ge){if(a){var we=ye.deletions;we===null?(ye.deletions=[ge],ye.flags|=16):we.push(ge)}}function d(ye,ge){if(!a)return null;for(;ge!==null;)s(ye,ge),ge=ge.sibling;return null}function v(ye){for(var ge=new Map;ye!==null;)ye.key!==null?ge.set(ye.key,ye):ge.set(ye.index,ye),ye=ye.sibling;return ge}function E(ye,ge){return ye=Wi(ye,ge),ye.index=0,ye.sibling=null,ye}function T(ye,ge,we){return ye.index=we,a?(we=ye.alternate,we!==null?(we=we.index,we<ge?(ye.flags|=67108866,ge):we):(ye.flags|=67108866,ge)):(ye.flags|=1048576,ge)}function $(ye){return a&&ye.alternate===null&&(ye.flags|=67108866),ye}function Q(ye,ge,we,Le){return ge===null||ge.tag!==6?(ge=yc(we,ye.mode,Le),ge.return=ye,ge):(ge=E(ge,we),ge.return=ye,ge)}function de(ye,ge,we,Le){var rt=we.type;return rt===w?Pe(ye,ge,we.props.children,Le,we.key):ge!==null&&(ge.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===ae&&uu(rt)===ge.type)?(ge=E(ge,we.props),bd(ge,we),ge.return=ye,ge):(ge=iu(we.type,we.key,we.props,null,ye.mode,Le),bd(ge,we),ge.return=ye,ge)}function Se(ye,ge,we,Le){return ge===null||ge.tag!==4||ge.stateNode.containerInfo!==we.containerInfo||ge.stateNode.implementation!==we.implementation?(ge=hd(we,ye.mode,Le),ge.return=ye,ge):(ge=E(ge,we.children||[]),ge.return=ye,ge)}function Pe(ye,ge,we,Le,rt){return ge===null||ge.tag!==7?(ge=wo(we,ye.mode,Le,rt),ge.return=ye,ge):(ge=E(ge,we),ge.return=ye,ge)}function Re(ye,ge,we){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return ge=yc(""+ge,ye.mode,we),ge.return=ye,ge;if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case b:return we=iu(ge.type,ge.key,ge.props,null,ye.mode,we),bd(we,ge),we.return=ye,we;case C:return ge=hd(ge,ye.mode,we),ge.return=ye,ge;case ae:return ge=uu(ge),Re(ye,ge,we)}if(ue(ge)||oe(ge))return ge=wo(ge,ye.mode,we,null),ge.return=ye,ge;if(typeof ge.then=="function")return Re(ye,ap(ge),we);if(ge.$$typeof===N)return Re(ye,tp(ye,ge),we);op(ye,ge)}return null}function Te(ye,ge,we,Le){var rt=ge!==null?ge.key:null;if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return rt!==null?null:Q(ye,ge,""+we,Le);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case b:return we.key===rt?de(ye,ge,we,Le):null;case C:return we.key===rt?Se(ye,ge,we,Le):null;case ae:return we=uu(we),Te(ye,ge,we,Le)}if(ue(we)||oe(we))return rt!==null?null:Pe(ye,ge,we,Le,null);if(typeof we.then=="function")return Te(ye,ge,ap(we),Le);if(we.$$typeof===N)return Te(ye,ge,tp(ye,we),Le);op(ye,we)}return null}function je(ye,ge,we,Le,rt){if(typeof Le=="string"&&Le!==""||typeof Le=="number"||typeof Le=="bigint")return ye=ye.get(we)||null,Q(ge,ye,""+Le,rt);if(typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case b:return ye=ye.get(Le.key===null?we:Le.key)||null,de(ge,ye,Le,rt);case C:return ye=ye.get(Le.key===null?we:Le.key)||null,Se(ge,ye,Le,rt);case ae:return Le=uu(Le),je(ye,ge,we,Le,rt)}if(ue(Le)||oe(Le))return ye=ye.get(we)||null,Pe(ge,ye,Le,rt,null);if(typeof Le.then=="function")return je(ye,ge,we,ap(Le),rt);if(Le.$$typeof===N)return je(ye,ge,we,tp(ge,Le),rt);op(ge,Le)}return null}function Ke(ye,ge,we,Le){for(var rt=null,kt=null,Je=ge,mt=ge=0,At=null;Je!==null&&mt<we.length;mt++){Je.index>mt?(At=Je,Je=null):At=Je.sibling;var It=Te(ye,Je,we[mt],Le);if(It===null){Je===null&&(Je=At);break}a&&Je&&It.alternate===null&&s(ye,Je),ge=T(It,ge,mt),kt===null?rt=It:kt.sibling=It,kt=It,Je=At}if(mt===we.length)return d(ye,Je),bt&&tt(ye,mt),rt;if(Je===null){for(;mt<we.length;mt++)Je=Re(ye,we[mt],Le),Je!==null&&(ge=T(Je,ge,mt),kt===null?rt=Je:kt.sibling=Je,kt=Je);return bt&&tt(ye,mt),rt}for(Je=v(Je);mt<we.length;mt++)At=je(Je,ye,mt,we[mt],Le),At!==null&&(a&&At.alternate!==null&&Je.delete(At.key===null?mt:At.key),ge=T(At,ge,mt),kt===null?rt=At:kt.sibling=At,kt=At);return a&&Je.forEach(function(Xs){return s(ye,Xs)}),bt&&tt(ye,mt),rt}function st(ye,ge,we,Le){if(we==null)throw Error(r(151));for(var rt=null,kt=null,Je=ge,mt=ge=0,At=null,It=we.next();Je!==null&&!It.done;mt++,It=we.next()){Je.index>mt?(At=Je,Je=null):At=Je.sibling;var Xs=Te(ye,Je,It.value,Le);if(Xs===null){Je===null&&(Je=At);break}a&&Je&&Xs.alternate===null&&s(ye,Je),ge=T(Xs,ge,mt),kt===null?rt=Xs:kt.sibling=Xs,kt=Xs,Je=At}if(It.done)return d(ye,Je),bt&&tt(ye,mt),rt;if(Je===null){for(;!It.done;mt++,It=we.next())It=Re(ye,It.value,Le),It!==null&&(ge=T(It,ge,mt),kt===null?rt=It:kt.sibling=It,kt=It);return bt&&tt(ye,mt),rt}for(Je=v(Je);!It.done;mt++,It=we.next())It=je(Je,ye,mt,It.value,Le),It!==null&&(a&&It.alternate!==null&&Je.delete(It.key===null?mt:It.key),ge=T(It,ge,mt),kt===null?rt=It:kt.sibling=It,kt=It);return a&&Je.forEach(function(dB){return s(ye,dB)}),bt&&tt(ye,mt),rt}function Kt(ye,ge,we,Le){if(typeof we=="object"&&we!==null&&we.type===w&&we.key===null&&(we=we.props.children),typeof we=="object"&&we!==null){switch(we.$$typeof){case b:e:{for(var rt=we.key;ge!==null;){if(ge.key===rt){if(rt=we.type,rt===w){if(ge.tag===7){d(ye,ge.sibling),Le=E(ge,we.props.children),Le.return=ye,ye=Le;break e}}else if(ge.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===ae&&uu(rt)===ge.type){d(ye,ge.sibling),Le=E(ge,we.props),bd(Le,we),Le.return=ye,ye=Le;break e}d(ye,ge);break}else s(ye,ge);ge=ge.sibling}we.type===w?(Le=wo(we.props.children,ye.mode,Le,we.key),Le.return=ye,ye=Le):(Le=iu(we.type,we.key,we.props,null,ye.mode,Le),bd(Le,we),Le.return=ye,ye=Le)}return $(ye);case C:e:{for(rt=we.key;ge!==null;){if(ge.key===rt)if(ge.tag===4&&ge.stateNode.containerInfo===we.containerInfo&&ge.stateNode.implementation===we.implementation){d(ye,ge.sibling),Le=E(ge,we.children||[]),Le.return=ye,ye=Le;break e}else{d(ye,ge);break}else s(ye,ge);ge=ge.sibling}Le=hd(we,ye.mode,Le),Le.return=ye,ye=Le}return $(ye);case ae:return we=uu(we),Kt(ye,ge,we,Le)}if(ue(we))return Ke(ye,ge,we,Le);if(oe(we)){if(rt=oe(we),typeof rt!="function")throw Error(r(150));return we=rt.call(we),st(ye,ge,we,Le)}if(typeof we.then=="function")return Kt(ye,ge,ap(we),Le);if(we.$$typeof===N)return Kt(ye,ge,tp(ye,we),Le);op(ye,we)}return typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint"?(we=""+we,ge!==null&&ge.tag===6?(d(ye,ge.sibling),Le=E(ge,we),Le.return=ye,ye=Le):(d(ye,ge),Le=yc(we,ye.mode,Le),Le.return=ye,ye=Le),$(ye)):d(ye,ge)}return function(ye,ge,we,Le){try{yd=0;var rt=Kt(ye,ge,we,Le);return Cc=null,rt}catch(Je){if(Je===Sc||Je===rp)throw Je;var kt=Pr(29,Je,null,ye.mode);return kt.lanes=Le,kt.return=ye,kt}finally{}}}var fu=G3(!0),Y3=G3(!1),Rs=!1;function q0(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function G0(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ds(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function ks(a,s,d){var v=a.updateQueue;if(v===null)return null;if(v=v.shared,(Ut&2)!==0){var E=v.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),v.pending=s,s=ru(a),Ls(a,null,d),s}return Ga(a,v,s,d),ru(a)}function xd(a,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194048)!==0)){var v=s.lanes;v&=a.pendingLanes,d|=v,s.lanes=d,Zr(a,d)}}function Y0(a,s){var d=a.updateQueue,v=a.alternate;if(v!==null&&(v=v.updateQueue,d===v)){var E=null,T=null;if(d=d.firstBaseUpdate,d!==null){do{var $={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};T===null?E=T=$:T=T.next=$,d=d.next}while(d!==null);T===null?E=T=s:T=T.next=s}else E=T=s;d={baseState:v.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:v.shared,callbacks:v.callbacks},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=s:a.next=s,d.lastBaseUpdate=s}var W0=!1;function _d(){if(W0){var a=wc;if(a!==null)throw a}}function wd(a,s,d,v){W0=!1;var E=a.updateQueue;Rs=!1;var T=E.firstBaseUpdate,$=E.lastBaseUpdate,Q=E.shared.pending;if(Q!==null){E.shared.pending=null;var de=Q,Se=de.next;de.next=null,$===null?T=Se:$.next=Se,$=de;var Pe=a.alternate;Pe!==null&&(Pe=Pe.updateQueue,Q=Pe.lastBaseUpdate,Q!==$&&(Q===null?Pe.firstBaseUpdate=Se:Q.next=Se,Pe.lastBaseUpdate=de))}if(T!==null){var Re=E.baseState;$=0,Pe=Se=de=null,Q=T;do{var Te=Q.lane&-536870913,je=Te!==Q.lane;if(je?(Et&Te)===Te:(v&Te)===Te){Te!==0&&Te===_c&&(W0=!0),Pe!==null&&(Pe=Pe.next={lane:0,tag:Q.tag,payload:Q.payload,callback:null,next:null});e:{var Ke=a,st=Q;Te=s;var Kt=d;switch(st.tag){case 1:if(Ke=st.payload,typeof Ke=="function"){Re=Ke.call(Kt,Re,Te);break e}Re=Ke;break e;case 3:Ke.flags=Ke.flags&-65537|128;case 0:if(Ke=st.payload,Te=typeof Ke=="function"?Ke.call(Kt,Re,Te):Ke,Te==null)break e;Re=y({},Re,Te);break e;case 2:Rs=!0}}Te=Q.callback,Te!==null&&(a.flags|=64,je&&(a.flags|=8192),je=E.callbacks,je===null?E.callbacks=[Te]:je.push(Te))}else je={lane:Te,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null},Pe===null?(Se=Pe=je,de=Re):Pe=Pe.next=je,$|=Te;if(Q=Q.next,Q===null){if(Q=E.shared.pending,Q===null)break;je=Q,Q=je.next,je.next=null,E.lastBaseUpdate=je,E.shared.pending=null}}while(!0);Pe===null&&(de=Re),E.baseState=de,E.firstBaseUpdate=Se,E.lastBaseUpdate=Pe,T===null&&(E.shared.lanes=0),Fs|=$,a.lanes=$,a.memoizedState=Re}}function W3(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function K3(a,s){var d=a.callbacks;if(d!==null)for(a.callbacks=null,a=0;a<d.length;a++)W3(d[a],s)}var Ec=j(null),sp=j(0);function Z3(a,s){a=No,ee(sp,a),ee(Ec,s),No=a|s.baseLanes}function K0(){ee(sp,No),ee(Ec,Ec.current)}function Z0(){No=sp.current,q(Ec),q(sp)}var yi=j(null),Ki=null;function Is(a){var s=a.alternate;ee(kn,kn.current&1),ee(yi,a),Ki===null&&(s===null||Ec.current!==null||s.memoizedState!==null)&&(Ki=a)}function X0(a){ee(kn,kn.current),ee(yi,a),Ki===null&&(Ki=a)}function X3(a){a.tag===22?(ee(kn,kn.current),ee(yi,a),Ki===null&&(Ki=a)):zs()}function zs(){ee(kn,kn.current),ee(yi,yi.current)}function bi(a){q(yi),Ki===a&&(Ki=null),q(kn)}var kn=j(0);function lp(a){for(var s=a;s!==null;){if(s.tag===13){var d=s.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||rb(d)||ib(d)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Eo=0,dt=null,Yt=null,qn=null,up=!1,Ac=!1,du=!1,cp=0,Sd=0,Tc=null,nU=0;function Nn(){throw Error(r(321))}function Q0(a,s){if(s===null)return!1;for(var d=0;d<s.length&&d<a.length;d++)if(!hr(a[d],s[d]))return!1;return!0}function J0(a,s,d,v,E,T){return Eo=T,dt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Y.H=a===null||a.memoizedState===null?RE:m1,du=!1,T=d(v,E),du=!1,Ac&&(T=J3(s,d,v,E)),Q3(a),T}function Q3(a){Y.H=Ad;var s=Yt!==null&&Yt.next!==null;if(Eo=0,qn=Yt=dt=null,up=!1,Sd=0,Tc=null,s)throw Error(r(300));a===null||Gn||(a=a.dependencies,a!==null&&ep(a)&&(Gn=!0))}function J3(a,s,d,v){dt=a;var E=0;do{if(Ac&&(Tc=null),Sd=0,Ac=!1,25<=E)throw Error(r(301));if(E+=1,qn=Yt=null,a.updateQueue!=null){var T=a.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Y.H=DE,T=s(d,v)}while(Ac);return T}function rU(){var a=Y.H,s=a.useState()[0];return s=typeof s.then=="function"?Cd(s):s,a=a.useState()[0],(Yt!==null?Yt.memoizedState:null)!==a&&(dt.flags|=1024),s}function e1(){var a=cp!==0;return cp=0,a}function t1(a,s,d){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~d}function n1(a){if(up){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}up=!1}Eo=0,qn=Yt=dt=null,Ac=!1,Sd=cp=0,Tc=null}function $r(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qn===null?dt.memoizedState=qn=a:qn=qn.next=a,qn}function In(){if(Yt===null){var a=dt.alternate;a=a!==null?a.memoizedState:null}else a=Yt.next;var s=qn===null?dt.memoizedState:qn.next;if(s!==null)qn=s,Yt=a;else{if(a===null)throw dt.alternate===null?Error(r(467)):Error(r(310));Yt=a,a={memoizedState:Yt.memoizedState,baseState:Yt.baseState,baseQueue:Yt.baseQueue,queue:Yt.queue,next:null},qn===null?dt.memoizedState=qn=a:qn=qn.next=a}return qn}function fp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Cd(a){var s=Sd;return Sd+=1,Tc===null&&(Tc=[]),a=V3(Tc,a,s),s=dt,(qn===null?s.memoizedState:qn.next)===null&&(s=s.alternate,Y.H=s===null||s.memoizedState===null?RE:m1),a}function dp(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Cd(a);if(a.$$typeof===N)return _r(a)}throw Error(r(438,String(a)))}function r1(a){var s=null,d=dt.updateQueue;if(d!==null&&(s=d.memoCache),s==null){var v=dt.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(s={data:v.data.map(function(E){return E.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),d===null&&(d=fp(),dt.updateQueue=d),d.memoCache=s,d=s.data[s.index],d===void 0)for(d=s.data[s.index]=Array(a),v=0;v<a;v++)d[v]=re;return s.index++,d}function Ao(a,s){return typeof s=="function"?s(a):s}function hp(a){var s=In();return i1(s,Yt,a)}function i1(a,s,d){var v=a.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=d;var E=a.baseQueue,T=v.pending;if(T!==null){if(E!==null){var $=E.next;E.next=T.next,T.next=$}s.baseQueue=E=T,v.pending=null}if(T=a.baseState,E===null)a.memoizedState=T;else{s=E.next;var Q=$=null,de=null,Se=s,Pe=!1;do{var Re=Se.lane&-536870913;if(Re!==Se.lane?(Et&Re)===Re:(Eo&Re)===Re){var Te=Se.revertLane;if(Te===0)de!==null&&(de=de.next={lane:0,revertLane:0,gesture:null,action:Se.action,hasEagerState:Se.hasEagerState,eagerState:Se.eagerState,next:null}),Re===_c&&(Pe=!0);else if((Eo&Te)===Te){Se=Se.next,Te===_c&&(Pe=!0);continue}else Re={lane:0,revertLane:Se.revertLane,gesture:null,action:Se.action,hasEagerState:Se.hasEagerState,eagerState:Se.eagerState,next:null},de===null?(Q=de=Re,$=T):de=de.next=Re,dt.lanes|=Te,Fs|=Te;Re=Se.action,du&&d(T,Re),T=Se.hasEagerState?Se.eagerState:d(T,Re)}else Te={lane:Re,revertLane:Se.revertLane,gesture:Se.gesture,action:Se.action,hasEagerState:Se.hasEagerState,eagerState:Se.eagerState,next:null},de===null?(Q=de=Te,$=T):de=de.next=Te,dt.lanes|=Re,Fs|=Re;Se=Se.next}while(Se!==null&&Se!==s);if(de===null?$=T:de.next=Q,!hr(T,a.memoizedState)&&(Gn=!0,Pe&&(d=wc,d!==null)))throw d;a.memoizedState=T,a.baseState=$,a.baseQueue=de,v.lastRenderedState=T}return E===null&&(v.lanes=0),[a.memoizedState,v.dispatch]}function a1(a){var s=In(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var v=d.dispatch,E=d.pending,T=s.memoizedState;if(E!==null){d.pending=null;var $=E=E.next;do T=a(T,$.action),$=$.next;while($!==E);hr(T,s.memoizedState)||(Gn=!0),s.memoizedState=T,s.baseQueue===null&&(s.baseState=T),d.lastRenderedState=T}return[T,v]}function eE(a,s,d){var v=dt,E=In(),T=bt;if(T){if(d===void 0)throw Error(r(407));d=d()}else d=s();var $=!hr((Yt||E).memoizedState,d);if($&&(E.memoizedState=d,Gn=!0),E=E.queue,l1(rE.bind(null,v,E,a),[a]),E.getSnapshot!==s||$||qn!==null&&qn.memoizedState.tag&1){if(v.flags|=2048,Oc(9,{destroy:void 0},nE.bind(null,v,E,d,s),null),Qt===null)throw Error(r(349));T||(Eo&127)!==0||tE(v,s,d)}return d}function tE(a,s,d){a.flags|=16384,a={getSnapshot:s,value:d},s=dt.updateQueue,s===null?(s=fp(),dt.updateQueue=s,s.stores=[a]):(d=s.stores,d===null?s.stores=[a]:d.push(a))}function nE(a,s,d,v){s.value=d,s.getSnapshot=v,iE(s)&&aE(a)}function rE(a,s,d){return d(function(){iE(s)&&aE(a)})}function iE(a){var s=a.getSnapshot;a=a.value;try{var d=s();return!hr(a,d)}catch{return!0}}function aE(a){var s=Yi(a,2);s!==null&&li(s,a,2)}function o1(a){var s=$r();if(typeof a=="function"){var d=a;if(a=d(),du){On(!0);try{d()}finally{On(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:a},s}function oE(a,s,d,v){return a.baseState=d,i1(a,Yt,typeof v=="function"?v:Ao)}function iU(a,s,d,v,E){if(gp(a))throw Error(r(485));if(a=s.action,a!==null){var T={payload:E,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function($){T.listeners.push($)}};Y.T!==null?d(!0):T.isTransition=!1,v(T),d=s.pending,d===null?(T.next=s.pending=T,sE(s,T)):(T.next=d.next,s.pending=d.next=T)}}function sE(a,s){var d=s.action,v=s.payload,E=a.state;if(s.isTransition){var T=Y.T,$={};Y.T=$;try{var Q=d(E,v),de=Y.S;de!==null&&de($,Q),lE(a,s,Q)}catch(Se){s1(a,s,Se)}finally{T!==null&&$.types!==null&&(T.types=$.types),Y.T=T}}else try{T=d(E,v),lE(a,s,T)}catch(Se){s1(a,s,Se)}}function lE(a,s,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(v){uE(a,s,v)},function(v){return s1(a,s,v)}):uE(a,s,d)}function uE(a,s,d){s.status="fulfilled",s.value=d,cE(s),a.state=d,s=a.pending,s!==null&&(d=s.next,d===s?a.pending=null:(d=d.next,s.next=d,sE(a,d)))}function s1(a,s,d){var v=a.pending;if(a.pending=null,v!==null){v=v.next;do s.status="rejected",s.reason=d,cE(s),s=s.next;while(s!==v)}a.action=null}function cE(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function fE(a,s){return s}function dE(a,s){if(bt){var d=Qt.formState;if(d!==null){e:{var v=dt;if(bt){if(Dt){t:{for(var E=Dt,T=ri;E.nodeType!==8;){if(!T){E=null;break t}if(E=Zi(E.nextSibling),E===null){E=null;break t}}T=E.data,E=T==="F!"||T==="F"?E:null}if(E){Dt=Zi(E.nextSibling),v=E.data==="F!";break e}}Wa(v)}v=!1}v&&(s=d[0])}}return d=$r(),d.memoizedState=d.baseState=s,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fE,lastRenderedState:s},d.queue=v,d=PE.bind(null,dt,v),v.dispatch=d,v=o1(!1),T=h1.bind(null,dt,!1,v.queue),v=$r(),E={state:s,dispatch:null,action:a,pending:null},v.queue=E,d=iU.bind(null,dt,E,T,d),E.dispatch=d,v.memoizedState=a,[s,d,!1]}function hE(a){var s=In();return mE(s,Yt,a)}function mE(a,s,d){if(s=i1(a,s,fE)[0],a=hp(Ao)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var v=Cd(s)}catch($){throw $===Sc?rp:$}else v=s;s=In();var E=s.queue,T=E.dispatch;return d!==s.memoizedState&&(dt.flags|=2048,Oc(9,{destroy:void 0},aU.bind(null,E,d),null)),[v,T,a]}function aU(a,s){a.action=s}function pE(a){var s=In(),d=Yt;if(d!==null)return mE(s,d,a);In(),s=s.memoizedState,d=In();var v=d.queue.dispatch;return d.memoizedState=a,[s,v,!1]}function Oc(a,s,d,v){return a={tag:a,create:d,deps:v,inst:s,next:null},s=dt.updateQueue,s===null&&(s=fp(),dt.updateQueue=s),d=s.lastEffect,d===null?s.lastEffect=a.next=a:(v=d.next,d.next=a,a.next=v,s.lastEffect=a),a}function gE(){return In().memoizedState}function mp(a,s,d,v){var E=$r();dt.flags|=a,E.memoizedState=Oc(1|s,{destroy:void 0},d,v===void 0?null:v)}function pp(a,s,d,v){var E=In();v=v===void 0?null:v;var T=E.memoizedState.inst;Yt!==null&&v!==null&&Q0(v,Yt.memoizedState.deps)?E.memoizedState=Oc(s,T,d,v):(dt.flags|=a,E.memoizedState=Oc(1|s,T,d,v))}function vE(a,s){mp(8390656,8,a,s)}function l1(a,s){pp(2048,8,a,s)}function oU(a){dt.flags|=4;var s=dt.updateQueue;if(s===null)s=fp(),dt.updateQueue=s,s.events=[a];else{var d=s.events;d===null?s.events=[a]:d.push(a)}}function yE(a){var s=In().memoizedState;return oU({ref:s,nextImpl:a}),function(){if((Ut&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function bE(a,s){return pp(4,2,a,s)}function xE(a,s){return pp(4,4,a,s)}function _E(a,s){if(typeof s=="function"){a=a();var d=s(a);return function(){typeof d=="function"?d():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function wE(a,s,d){d=d!=null?d.concat([a]):null,pp(4,4,_E.bind(null,s,a),d)}function u1(){}function SE(a,s){var d=In();s=s===void 0?null:s;var v=d.memoizedState;return s!==null&&Q0(s,v[1])?v[0]:(d.memoizedState=[a,s],a)}function CE(a,s){var d=In();s=s===void 0?null:s;var v=d.memoizedState;if(s!==null&&Q0(s,v[1]))return v[0];if(v=a(),du){On(!0);try{a()}finally{On(!1)}}return d.memoizedState=[v,s],v}function c1(a,s,d){return d===void 0||(Eo&1073741824)!==0&&(Et&261930)===0?a.memoizedState=s:(a.memoizedState=d,a=E4(),dt.lanes|=a,Fs|=a,d)}function EE(a,s,d,v){return hr(d,s)?d:Ec.current!==null?(a=c1(a,d,v),hr(a,s)||(Gn=!0),a):(Eo&42)===0||(Eo&1073741824)!==0&&(Et&261930)===0?(Gn=!0,a.memoizedState=d):(a=E4(),dt.lanes|=a,Fs|=a,s)}function AE(a,s,d,v,E){var T=k.p;k.p=T!==0&&8>T?T:8;var $=Y.T,Q={};Y.T=Q,h1(a,!1,s,d);try{var de=E(),Se=Y.S;if(Se!==null&&Se(Q,de),de!==null&&typeof de=="object"&&typeof de.then=="function"){var Pe=tU(de,v);Ed(a,s,Pe,wi(a))}else Ed(a,s,v,wi(a))}catch(Re){Ed(a,s,{then:function(){},status:"rejected",reason:Re},wi())}finally{k.p=T,$!==null&&Q.types!==null&&($.types=Q.types),Y.T=$}}function sU(){}function f1(a,s,d,v){if(a.tag!==5)throw Error(r(476));var E=TE(a).queue;AE(a,E,s,z,d===null?sU:function(){return OE(a),d(v)})}function TE(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:z},next:null};var d={};return s.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:d},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function OE(a){var s=TE(a);s.next===null&&(s=a.alternate.memoizedState),Ed(a,s.next.queue,{},wi())}function d1(){return _r($d)}function jE(){return In().memoizedState}function ME(){return In().memoizedState}function lU(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var d=wi();a=Ds(d);var v=ks(s,a,d);v!==null&&(li(v,s,d),xd(v,s,d)),s={cache:F0()},a.payload=s;return}s=s.return}}function uU(a,s,d){var v=wi();d={lane:v,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},gp(a)?LE(s,d):(d=cd(a,s,d,v),d!==null&&(li(d,a,v),NE(d,s,v)))}function PE(a,s,d){var v=wi();Ed(a,s,d,v)}function Ed(a,s,d,v){var E={lane:v,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(gp(a))LE(s,E);else{var T=a.alternate;if(a.lanes===0&&(T===null||T.lanes===0)&&(T=s.lastRenderedReducer,T!==null))try{var $=s.lastRenderedState,Q=T($,d);if(E.hasEagerState=!0,E.eagerState=Q,hr(Q,$))return Ga(a,s,E,0),Qt===null&&nu(),!1}catch{}finally{}if(d=cd(a,s,E,v),d!==null)return li(d,a,v),NE(d,s,v),!0}return!1}function h1(a,s,d,v){if(v={lane:2,revertLane:q1(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},gp(a)){if(s)throw Error(r(479))}else s=cd(a,d,v,2),s!==null&&li(s,a,2)}function gp(a){var s=a.alternate;return a===dt||s!==null&&s===dt}function LE(a,s){Ac=up=!0;var d=a.pending;d===null?s.next=s:(s.next=d.next,d.next=s),a.pending=s}function NE(a,s,d){if((d&4194048)!==0){var v=s.lanes;v&=a.pendingLanes,d|=v,s.lanes=d,Zr(a,d)}}var Ad={readContext:_r,use:dp,useCallback:Nn,useContext:Nn,useEffect:Nn,useImperativeHandle:Nn,useLayoutEffect:Nn,useInsertionEffect:Nn,useMemo:Nn,useReducer:Nn,useRef:Nn,useState:Nn,useDebugValue:Nn,useDeferredValue:Nn,useTransition:Nn,useSyncExternalStore:Nn,useId:Nn,useHostTransitionStatus:Nn,useFormState:Nn,useActionState:Nn,useOptimistic:Nn,useMemoCache:Nn,useCacheRefresh:Nn};Ad.useEffectEvent=Nn;var RE={readContext:_r,use:dp,useCallback:function(a,s){return $r().memoizedState=[a,s===void 0?null:s],a},useContext:_r,useEffect:vE,useImperativeHandle:function(a,s,d){d=d!=null?d.concat([a]):null,mp(4194308,4,_E.bind(null,s,a),d)},useLayoutEffect:function(a,s){return mp(4194308,4,a,s)},useInsertionEffect:function(a,s){mp(4,2,a,s)},useMemo:function(a,s){var d=$r();s=s===void 0?null:s;var v=a();if(du){On(!0);try{a()}finally{On(!1)}}return d.memoizedState=[v,s],v},useReducer:function(a,s,d){var v=$r();if(d!==void 0){var E=d(s);if(du){On(!0);try{d(s)}finally{On(!1)}}}else E=s;return v.memoizedState=v.baseState=E,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:E},v.queue=a,a=a.dispatch=uU.bind(null,dt,a),[v.memoizedState,a]},useRef:function(a){var s=$r();return a={current:a},s.memoizedState=a},useState:function(a){a=o1(a);var s=a.queue,d=PE.bind(null,dt,s);return s.dispatch=d,[a.memoizedState,d]},useDebugValue:u1,useDeferredValue:function(a,s){var d=$r();return c1(d,a,s)},useTransition:function(){var a=o1(!1);return a=AE.bind(null,dt,a.queue,!0,!1),$r().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,d){var v=dt,E=$r();if(bt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),Qt===null)throw Error(r(349));(Et&127)!==0||tE(v,s,d)}E.memoizedState=d;var T={value:d,getSnapshot:s};return E.queue=T,vE(rE.bind(null,v,T,a),[a]),v.flags|=2048,Oc(9,{destroy:void 0},nE.bind(null,v,T,d,s),null),d},useId:function(){var a=$r(),s=Qt.identifierPrefix;if(bt){var d=He,v=Ne;d=(v&~(1<<32-vt(v)-1)).toString(32)+d,s="_"+s+"R_"+d,d=cp++,0<d&&(s+="H"+d.toString(32)),s+="_"}else d=nU++,s="_"+s+"r_"+d.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:d1,useFormState:dE,useActionState:dE,useOptimistic:function(a){var s=$r();s.memoizedState=s.baseState=a;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=d,s=h1.bind(null,dt,!0,d),d.dispatch=s,[a,s]},useMemoCache:r1,useCacheRefresh:function(){return $r().memoizedState=lU.bind(null,dt)},useEffectEvent:function(a){var s=$r(),d={impl:a};return s.memoizedState=d,function(){if((Ut&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},m1={readContext:_r,use:dp,useCallback:SE,useContext:_r,useEffect:l1,useImperativeHandle:wE,useInsertionEffect:bE,useLayoutEffect:xE,useMemo:CE,useReducer:hp,useRef:gE,useState:function(){return hp(Ao)},useDebugValue:u1,useDeferredValue:function(a,s){var d=In();return EE(d,Yt.memoizedState,a,s)},useTransition:function(){var a=hp(Ao)[0],s=In().memoizedState;return[typeof a=="boolean"?a:Cd(a),s]},useSyncExternalStore:eE,useId:jE,useHostTransitionStatus:d1,useFormState:hE,useActionState:hE,useOptimistic:function(a,s){var d=In();return oE(d,Yt,a,s)},useMemoCache:r1,useCacheRefresh:ME};m1.useEffectEvent=yE;var DE={readContext:_r,use:dp,useCallback:SE,useContext:_r,useEffect:l1,useImperativeHandle:wE,useInsertionEffect:bE,useLayoutEffect:xE,useMemo:CE,useReducer:a1,useRef:gE,useState:function(){return a1(Ao)},useDebugValue:u1,useDeferredValue:function(a,s){var d=In();return Yt===null?c1(d,a,s):EE(d,Yt.memoizedState,a,s)},useTransition:function(){var a=a1(Ao)[0],s=In().memoizedState;return[typeof a=="boolean"?a:Cd(a),s]},useSyncExternalStore:eE,useId:jE,useHostTransitionStatus:d1,useFormState:pE,useActionState:pE,useOptimistic:function(a,s){var d=In();return Yt!==null?oE(d,Yt,a,s):(d.baseState=a,[a,d.queue.dispatch])},useMemoCache:r1,useCacheRefresh:ME};DE.useEffectEvent=yE;function p1(a,s,d,v){s=a.memoizedState,d=d(v,s),d=d==null?s:y({},s,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var g1={enqueueSetState:function(a,s,d){a=a._reactInternals;var v=wi(),E=Ds(v);E.payload=s,d!=null&&(E.callback=d),s=ks(a,E,v),s!==null&&(li(s,a,v),xd(s,a,v))},enqueueReplaceState:function(a,s,d){a=a._reactInternals;var v=wi(),E=Ds(v);E.tag=1,E.payload=s,d!=null&&(E.callback=d),s=ks(a,E,v),s!==null&&(li(s,a,v),xd(s,a,v))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var d=wi(),v=Ds(d);v.tag=2,s!=null&&(v.callback=s),s=ks(a,v,d),s!==null&&(li(s,a,d),xd(s,a,d))}};function kE(a,s,d,v,E,T,$){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(v,T,$):s.prototype&&s.prototype.isPureReactComponent?!Os(d,v)||!Os(E,T):!0}function IE(a,s,d,v){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(d,v),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(d,v),s.state!==a&&g1.enqueueReplaceState(s,s.state,null)}function hu(a,s){var d=s;if("ref"in s){d={};for(var v in s)v!=="ref"&&(d[v]=s[v])}if(a=a.defaultProps){d===s&&(d=y({},d));for(var E in a)d[E]===void 0&&(d[E]=a[E])}return d}function zE(a){tu(a)}function UE(a){console.error(a)}function BE(a){tu(a)}function vp(a,s){try{var d=a.onUncaughtError;d(s.value,{componentStack:s.stack})}catch(v){setTimeout(function(){throw v})}}function FE(a,s,d){try{var v=a.onCaughtError;v(d.value,{componentStack:d.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function v1(a,s,d){return d=Ds(d),d.tag=3,d.payload={element:null},d.callback=function(){vp(a,s)},d}function $E(a){return a=Ds(a),a.tag=3,a}function VE(a,s,d,v){var E=d.type.getDerivedStateFromError;if(typeof E=="function"){var T=v.value;a.payload=function(){return E(T)},a.callback=function(){FE(s,d,v)}}var $=d.stateNode;$!==null&&typeof $.componentDidCatch=="function"&&(a.callback=function(){FE(s,d,v),typeof E!="function"&&($s===null?$s=new Set([this]):$s.add(this));var Q=v.stack;this.componentDidCatch(v.value,{componentStack:Q!==null?Q:""})})}function cU(a,s,d,v,E){if(d.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(s=d.alternate,s!==null&&xc(s,d,E,!0),d=yi.current,d!==null){switch(d.tag){case 31:case 13:return Ki===null?jp():d.alternate===null&&Rn===0&&(Rn=3),d.flags&=-257,d.flags|=65536,d.lanes=E,v===ip?d.flags|=16384:(s=d.updateQueue,s===null?d.updateQueue=new Set([v]):s.add(v),$1(a,v,E)),!1;case 22:return d.flags|=65536,v===ip?d.flags|=16384:(s=d.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([v])},d.updateQueue=s):(d=s.retryQueue,d===null?s.retryQueue=new Set([v]):d.add(v)),$1(a,v,E)),!1}throw Error(r(435,d.tag))}return $1(a,v,E),jp(),!1}if(bt)return s=yi.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=E,v!==bc&&(a=Error(r(422),{cause:v}),au(p(a,d)))):(v!==bc&&(s=Error(r(423),{cause:v}),au(p(s,d))),a=a.current.alternate,a.flags|=65536,E&=-E,a.lanes|=E,v=p(v,d),E=v1(a.stateNode,v,E),Y0(a,E),Rn!==4&&(Rn=2)),!1;var T=Error(r(520),{cause:v});if(T=p(T,d),Rd===null?Rd=[T]:Rd.push(T),Rn!==4&&(Rn=2),s===null)return!0;v=p(v,d),d=s;do{switch(d.tag){case 3:return d.flags|=65536,a=E&-E,d.lanes|=a,a=v1(d.stateNode,v,a),Y0(d,a),!1;case 1:if(s=d.type,T=d.stateNode,(d.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&($s===null||!$s.has(T))))return d.flags|=65536,E&=-E,d.lanes|=E,E=$E(E),VE(E,a,d,v),Y0(d,E),!1}d=d.return}while(d!==null);return!1}var y1=Error(r(461)),Gn=!1;function wr(a,s,d,v){s.child=a===null?Y3(s,null,d,v):fu(s,a.child,d,v)}function HE(a,s,d,v,E){d=d.render;var T=s.ref;if("ref"in v){var $={};for(var Q in v)Q!=="ref"&&($[Q]=v[Q])}else $=v;return su(s),v=J0(a,s,d,$,T,E),Q=e1(),a!==null&&!Gn?(t1(a,s,E),To(a,s,E)):(bt&&Q&&tr(s),s.flags|=1,wr(a,s,v,E),s.child)}function qE(a,s,d,v,E){if(a===null){var T=d.type;return typeof T=="function"&&!vc(T)&&T.defaultProps===void 0&&d.compare===null?(s.tag=15,s.type=T,GE(a,s,T,v,E)):(a=iu(d.type,null,v,s,s.mode,E),a.ref=s.ref,a.return=s,s.child=a)}if(T=a.child,!A1(a,E)){var $=T.memoizedProps;if(d=d.compare,d=d!==null?d:Os,d($,v)&&a.ref===s.ref)return To(a,s,E)}return s.flags|=1,a=Wi(T,v),a.ref=s.ref,a.return=s,s.child=a}function GE(a,s,d,v,E){if(a!==null){var T=a.memoizedProps;if(Os(T,v)&&a.ref===s.ref)if(Gn=!1,s.pendingProps=v=T,A1(a,E))(a.flags&131072)!==0&&(Gn=!0);else return s.lanes=a.lanes,To(a,s,E)}return b1(a,s,d,v,E)}function YE(a,s,d,v){var E=v.children,T=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((s.flags&128)!==0){if(T=T!==null?T.baseLanes|d:d,a!==null){for(v=s.child=a.child,E=0;v!==null;)E=E|v.lanes|v.childLanes,v=v.sibling;v=E&~T}else v=0,s.child=null;return WE(a,s,T,d,v)}if((d&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&np(s,T!==null?T.cachePool:null),T!==null?Z3(s,T):K0(),X3(s);else return v=s.lanes=536870912,WE(a,s,T!==null?T.baseLanes|d:d,d,v)}else T!==null?(np(s,T.cachePool),Z3(s,T),zs(),s.memoizedState=null):(a!==null&&np(s,null),K0(),zs());return wr(a,s,E,d),s.child}function Td(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function WE(a,s,d,v,E){var T=V0();return T=T===null?null:{parent:Hn._currentValue,pool:T},s.memoizedState={baseLanes:d,cachePool:T},a!==null&&np(s,null),K0(),X3(s),a!==null&&xc(a,s,v,!0),s.childLanes=E,null}function yp(a,s){return s=xp({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function KE(a,s,d){return fu(s,a.child,null,d),a=yp(s,s.pendingProps),a.flags|=2,bi(s),s.memoizedState=null,a}function fU(a,s,d){var v=s.pendingProps,E=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(bt){if(v.mode==="hidden")return a=yp(s,v),s.lanes=536870912,Td(null,a);if(X0(s),(a=Dt)?(a=sA(a,ri),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Ae!==null?{id:Ne,overflow:He}:null,retryLane:536870912,hydrationErrors:null},d=dd(a),d.return=s,s.child=d,Rt=s,Dt=null)):a=null,a===null)throw Wa(s);return s.lanes=536870912,null}return yp(s,v)}var T=a.memoizedState;if(T!==null){var $=T.dehydrated;if(X0(s),E)if(s.flags&256)s.flags&=-257,s=KE(a,s,d);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(Gn||xc(a,s,d,!1),E=(d&a.childLanes)!==0,Gn||E){if(v=Qt,v!==null&&($=Xr(v,d),$!==0&&$!==T.retryLane))throw T.retryLane=$,Yi(a,$),li(v,a,$),y1;jp(),s=KE(a,s,d)}else a=T.treeContext,Dt=Zi($.nextSibling),Rt=s,bt=!0,Ya=null,ri=!1,a!==null&&Fr(s,a),s=yp(s,v),s.flags|=4096;return s}return a=Wi(a.child,{mode:v.mode,children:v.children}),a.ref=s.ref,s.child=a,a.return=s,a}function bp(a,s){var d=s.ref;if(d===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(a===null||a.ref!==d)&&(s.flags|=4194816)}}function b1(a,s,d,v,E){return su(s),d=J0(a,s,d,v,void 0,E),v=e1(),a!==null&&!Gn?(t1(a,s,E),To(a,s,E)):(bt&&v&&tr(s),s.flags|=1,wr(a,s,d,E),s.child)}function ZE(a,s,d,v,E,T){return su(s),s.updateQueue=null,d=J3(s,v,d,E),Q3(a),v=e1(),a!==null&&!Gn?(t1(a,s,T),To(a,s,T)):(bt&&v&&tr(s),s.flags|=1,wr(a,s,d,T),s.child)}function XE(a,s,d,v,E){if(su(s),s.stateNode===null){var T=_o,$=d.contextType;typeof $=="object"&&$!==null&&(T=_r($)),T=new d(v,T),s.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=g1,s.stateNode=T,T._reactInternals=s,T=s.stateNode,T.props=v,T.state=s.memoizedState,T.refs={},q0(s),$=d.contextType,T.context=typeof $=="object"&&$!==null?_r($):_o,T.state=s.memoizedState,$=d.getDerivedStateFromProps,typeof $=="function"&&(p1(s,d,$,v),T.state=s.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||($=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),$!==T.state&&g1.enqueueReplaceState(T,T.state,null),wd(s,v,T,E),_d(),T.state=s.memoizedState),typeof T.componentDidMount=="function"&&(s.flags|=4194308),v=!0}else if(a===null){T=s.stateNode;var Q=s.memoizedProps,de=hu(d,Q);T.props=de;var Se=T.context,Pe=d.contextType;$=_o,typeof Pe=="object"&&Pe!==null&&($=_r(Pe));var Re=d.getDerivedStateFromProps;Pe=typeof Re=="function"||typeof T.getSnapshotBeforeUpdate=="function",Q=s.pendingProps!==Q,Pe||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(Q||Se!==$)&&IE(s,T,v,$),Rs=!1;var Te=s.memoizedState;T.state=Te,wd(s,v,T,E),_d(),Se=s.memoizedState,Q||Te!==Se||Rs?(typeof Re=="function"&&(p1(s,d,Re,v),Se=s.memoizedState),(de=Rs||kE(s,d,de,v,Te,Se,$))?(Pe||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(s.flags|=4194308)):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=v,s.memoizedState=Se),T.props=v,T.state=Se,T.context=$,v=de):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),v=!1)}else{T=s.stateNode,G0(a,s),$=s.memoizedProps,Pe=hu(d,$),T.props=Pe,Re=s.pendingProps,Te=T.context,Se=d.contextType,de=_o,typeof Se=="object"&&Se!==null&&(de=_r(Se)),Q=d.getDerivedStateFromProps,(Se=typeof Q=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||($!==Re||Te!==de)&&IE(s,T,v,de),Rs=!1,Te=s.memoizedState,T.state=Te,wd(s,v,T,E),_d();var je=s.memoizedState;$!==Re||Te!==je||Rs||a!==null&&a.dependencies!==null&&ep(a.dependencies)?(typeof Q=="function"&&(p1(s,d,Q,v),je=s.memoizedState),(Pe=Rs||kE(s,d,Pe,v,Te,je,de)||a!==null&&a.dependencies!==null&&ep(a.dependencies))?(Se||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(v,je,de),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(v,je,de)),typeof T.componentDidUpdate=="function"&&(s.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof T.componentDidUpdate!="function"||$===a.memoizedProps&&Te===a.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||$===a.memoizedProps&&Te===a.memoizedState||(s.flags|=1024),s.memoizedProps=v,s.memoizedState=je),T.props=v,T.state=je,T.context=de,v=Pe):(typeof T.componentDidUpdate!="function"||$===a.memoizedProps&&Te===a.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||$===a.memoizedProps&&Te===a.memoizedState||(s.flags|=1024),v=!1)}return T=v,bp(a,s),v=(s.flags&128)!==0,T||v?(T=s.stateNode,d=v&&typeof d.getDerivedStateFromError!="function"?null:T.render(),s.flags|=1,a!==null&&v?(s.child=fu(s,a.child,null,E),s.child=fu(s,null,d,E)):wr(a,s,d,E),s.memoizedState=T.state,a=s.child):a=To(a,s,E),a}function QE(a,s,d,v){return So(),s.flags|=256,wr(a,s,d,v),s.child}var x1={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _1(a){return{baseLanes:a,cachePool:F3()}}function w1(a,s,d){return a=a!==null?a.childLanes&~d:0,s&&(a|=_i),a}function JE(a,s,d){var v=s.pendingProps,E=!1,T=(s.flags&128)!==0,$;if(($=T)||($=a!==null&&a.memoizedState===null?!1:(kn.current&2)!==0),$&&(E=!0,s.flags&=-129),$=(s.flags&32)!==0,s.flags&=-33,a===null){if(bt){if(E?Is(s):zs(),(a=Dt)?(a=sA(a,ri),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Ae!==null?{id:Ne,overflow:He}:null,retryLane:536870912,hydrationErrors:null},d=dd(a),d.return=s,s.child=d,Rt=s,Dt=null)):a=null,a===null)throw Wa(s);return ib(a)?s.lanes=32:s.lanes=536870912,null}var Q=v.children;return v=v.fallback,E?(zs(),E=s.mode,Q=xp({mode:"hidden",children:Q},E),v=wo(v,E,d,null),Q.return=s,v.return=s,Q.sibling=v,s.child=Q,v=s.child,v.memoizedState=_1(d),v.childLanes=w1(a,$,d),s.memoizedState=x1,Td(null,v)):(Is(s),S1(s,Q))}var de=a.memoizedState;if(de!==null&&(Q=de.dehydrated,Q!==null)){if(T)s.flags&256?(Is(s),s.flags&=-257,s=C1(a,s,d)):s.memoizedState!==null?(zs(),s.child=a.child,s.flags|=128,s=null):(zs(),Q=v.fallback,E=s.mode,v=xp({mode:"visible",children:v.children},E),Q=wo(Q,E,d,null),Q.flags|=2,v.return=s,Q.return=s,v.sibling=Q,s.child=v,fu(s,a.child,null,d),v=s.child,v.memoizedState=_1(d),v.childLanes=w1(a,$,d),s.memoizedState=x1,s=Td(null,v));else if(Is(s),ib(Q)){if($=Q.nextSibling&&Q.nextSibling.dataset,$)var Se=$.dgst;$=Se,v=Error(r(419)),v.stack="",v.digest=$,au({value:v,source:null,stack:null}),s=C1(a,s,d)}else if(Gn||xc(a,s,d,!1),$=(d&a.childLanes)!==0,Gn||$){if($=Qt,$!==null&&(v=Xr($,d),v!==0&&v!==de.retryLane))throw de.retryLane=v,Yi(a,v),li($,a,v),y1;rb(Q)||jp(),s=C1(a,s,d)}else rb(Q)?(s.flags|=192,s.child=a.child,s=null):(a=de.treeContext,Dt=Zi(Q.nextSibling),Rt=s,bt=!0,Ya=null,ri=!1,a!==null&&Fr(s,a),s=S1(s,v.children),s.flags|=4096);return s}return E?(zs(),Q=v.fallback,E=s.mode,de=a.child,Se=de.sibling,v=Wi(de,{mode:"hidden",children:v.children}),v.subtreeFlags=de.subtreeFlags&65011712,Se!==null?Q=Wi(Se,Q):(Q=wo(Q,E,d,null),Q.flags|=2),Q.return=s,v.return=s,v.sibling=Q,s.child=v,Td(null,v),v=s.child,Q=a.child.memoizedState,Q===null?Q=_1(d):(E=Q.cachePool,E!==null?(de=Hn._currentValue,E=E.parent!==de?{parent:de,pool:de}:E):E=F3(),Q={baseLanes:Q.baseLanes|d,cachePool:E}),v.memoizedState=Q,v.childLanes=w1(a,$,d),s.memoizedState=x1,Td(a.child,v)):(Is(s),d=a.child,a=d.sibling,d=Wi(d,{mode:"visible",children:v.children}),d.return=s,d.sibling=null,a!==null&&($=s.deletions,$===null?(s.deletions=[a],s.flags|=16):$.push(a)),s.child=d,s.memoizedState=null,d)}function S1(a,s){return s=xp({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function xp(a,s){return a=Pr(22,a,null,s),a.lanes=0,a}function C1(a,s,d){return fu(s,a.child,null,d),a=S1(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function e4(a,s,d){a.lanes|=s;var v=a.alternate;v!==null&&(v.lanes|=s),U0(a.return,s,d)}function E1(a,s,d,v,E,T){var $=a.memoizedState;$===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:v,tail:d,tailMode:E,treeForkCount:T}:($.isBackwards=s,$.rendering=null,$.renderingStartTime=0,$.last=v,$.tail=d,$.tailMode=E,$.treeForkCount=T)}function t4(a,s,d){var v=s.pendingProps,E=v.revealOrder,T=v.tail;v=v.children;var $=kn.current,Q=($&2)!==0;if(Q?($=$&1|2,s.flags|=128):$&=1,ee(kn,$),wr(a,s,v,d),v=bt?K:0,!Q&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&e4(a,d,s);else if(a.tag===19)e4(a,d,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(E){case"forwards":for(d=s.child,E=null;d!==null;)a=d.alternate,a!==null&&lp(a)===null&&(E=d),d=d.sibling;d=E,d===null?(E=s.child,s.child=null):(E=d.sibling,d.sibling=null),E1(s,!1,E,d,T,v);break;case"backwards":case"unstable_legacy-backwards":for(d=null,E=s.child,s.child=null;E!==null;){if(a=E.alternate,a!==null&&lp(a)===null){s.child=E;break}a=E.sibling,E.sibling=d,d=E,E=a}E1(s,!0,d,null,T,v);break;case"together":E1(s,!1,null,null,void 0,v);break;default:s.memoizedState=null}return s.child}function To(a,s,d){if(a!==null&&(s.dependencies=a.dependencies),Fs|=s.lanes,(d&s.childLanes)===0)if(a!==null){if(xc(a,s,d,!1),(d&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,d=Wi(a,a.pendingProps),s.child=d,d.return=s;a.sibling!==null;)a=a.sibling,d=d.sibling=Wi(a,a.pendingProps),d.return=s;d.sibling=null}return s.child}function A1(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&ep(a)))}function dU(a,s,d){switch(s.tag){case 3:D(s,s.stateNode.containerInfo),Ns(s,Hn,a.memoizedState.cache),So();break;case 27:case 5:G(s);break;case 4:D(s,s.stateNode.containerInfo);break;case 10:Ns(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,X0(s),null;break;case 13:var v=s.memoizedState;if(v!==null)return v.dehydrated!==null?(Is(s),s.flags|=128,null):(d&s.child.childLanes)!==0?JE(a,s,d):(Is(s),a=To(a,s,d),a!==null?a.sibling:null);Is(s);break;case 19:var E=(a.flags&128)!==0;if(v=(d&s.childLanes)!==0,v||(xc(a,s,d,!1),v=(d&s.childLanes)!==0),E){if(v)return t4(a,s,d);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ee(kn,kn.current),v)break;return null;case 22:return s.lanes=0,YE(a,s,d,s.pendingProps);case 24:Ns(s,Hn,a.memoizedState.cache)}return To(a,s,d)}function n4(a,s,d){if(a!==null)if(a.memoizedProps!==s.pendingProps)Gn=!0;else{if(!A1(a,d)&&(s.flags&128)===0)return Gn=!1,dU(a,s,d);Gn=(a.flags&131072)!==0}else Gn=!1,bt&&(s.flags&1048576)!==0&&ht(s,K,s.index);switch(s.lanes=0,s.tag){case 16:e:{var v=s.pendingProps;if(a=uu(s.elementType),s.type=a,typeof a=="function")vc(a)?(v=hu(a,v),s.tag=1,s=XE(null,s,a,v,d)):(s.tag=0,s=b1(null,s,a,v,d));else{if(a!=null){var E=a.$$typeof;if(E===F){s.tag=11,s=HE(null,s,a,v,d);break e}else if(E===X){s.tag=14,s=qE(null,s,a,v,d);break e}}throw s=se(a)||a,Error(r(306,s,""))}}return s;case 0:return b1(a,s,s.type,s.pendingProps,d);case 1:return v=s.type,E=hu(v,s.pendingProps),XE(a,s,v,E,d);case 3:e:{if(D(s,s.stateNode.containerInfo),a===null)throw Error(r(387));v=s.pendingProps;var T=s.memoizedState;E=T.element,G0(a,s),wd(s,v,null,d);var $=s.memoizedState;if(v=$.cache,Ns(s,Hn,v),v!==T.cache&&B0(s,[Hn],d,!0),_d(),v=$.element,T.isDehydrated)if(T={element:v,isDehydrated:!1,cache:$.cache},s.updateQueue.baseState=T,s.memoizedState=T,s.flags&256){s=QE(a,s,v,d);break e}else if(v!==E){E=p(Error(r(424)),s),au(E),s=QE(a,s,v,d);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(Dt=Zi(a.firstChild),Rt=s,bt=!0,Ya=null,ri=!0,d=Y3(s,null,v,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(So(),v===E){s=To(a,s,d);break e}wr(a,s,v,d)}s=s.child}return s;case 26:return bp(a,s),a===null?(d=hA(s.type,null,s.pendingProps,null))?s.memoizedState=d:bt||(d=s.type,a=s.pendingProps,v=kp(he.current).createElement(d),v[$n]=s,v[dr]=a,Sr(v,d,a),Vn(v),s.stateNode=v):s.memoizedState=hA(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return G(s),a===null&&bt&&(v=s.stateNode=cA(s.type,s.pendingProps,he.current),Rt=s,ri=!0,E=Dt,Gs(s.type)?(ab=E,Dt=Zi(v.firstChild)):Dt=E),wr(a,s,s.pendingProps.children,d),bp(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&bt&&((E=v=Dt)&&(v=$U(v,s.type,s.pendingProps,ri),v!==null?(s.stateNode=v,Rt=s,Dt=Zi(v.firstChild),ri=!1,E=!0):E=!1),E||Wa(s)),G(s),E=s.type,T=s.pendingProps,$=a!==null?a.memoizedProps:null,v=T.children,eb(E,T)?v=null:$!==null&&eb(E,$)&&(s.flags|=32),s.memoizedState!==null&&(E=J0(a,s,rU,null,null,d),$d._currentValue=E),bp(a,s),wr(a,s,v,d),s.child;case 6:return a===null&&bt&&((a=d=Dt)&&(d=VU(d,s.pendingProps,ri),d!==null?(s.stateNode=d,Rt=s,Dt=null,a=!0):a=!1),a||Wa(s)),null;case 13:return JE(a,s,d);case 4:return D(s,s.stateNode.containerInfo),v=s.pendingProps,a===null?s.child=fu(s,null,v,d):wr(a,s,v,d),s.child;case 11:return HE(a,s,s.type,s.pendingProps,d);case 7:return wr(a,s,s.pendingProps,d),s.child;case 8:return wr(a,s,s.pendingProps.children,d),s.child;case 12:return wr(a,s,s.pendingProps.children,d),s.child;case 10:return v=s.pendingProps,Ns(s,s.type,v.value),wr(a,s,v.children,d),s.child;case 9:return E=s.type._context,v=s.pendingProps.children,su(s),E=_r(E),v=v(E),s.flags|=1,wr(a,s,v,d),s.child;case 14:return qE(a,s,s.type,s.pendingProps,d);case 15:return GE(a,s,s.type,s.pendingProps,d);case 19:return t4(a,s,d);case 31:return fU(a,s,d);case 22:return YE(a,s,d,s.pendingProps);case 24:return su(s),v=_r(Hn),a===null?(E=V0(),E===null&&(E=Qt,T=F0(),E.pooledCache=T,T.refCount++,T!==null&&(E.pooledCacheLanes|=d),E=T),s.memoizedState={parent:v,cache:E},q0(s),Ns(s,Hn,E)):((a.lanes&d)!==0&&(G0(a,s),wd(s,null,null,d),_d()),E=a.memoizedState,T=s.memoizedState,E.parent!==v?(E={parent:v,cache:v},s.memoizedState=E,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=E),Ns(s,Hn,v)):(v=T.cache,Ns(s,Hn,v),v!==E.cache&&B0(s,[Hn],d,!0))),wr(a,s,s.pendingProps.children,d),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Oo(a){a.flags|=4}function T1(a,s,d,v,E){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(E&335544128)===E)if(a.stateNode.complete)a.flags|=8192;else if(j4())a.flags|=8192;else throw cu=ip,H0}else a.flags&=-16777217}function r4(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!yA(s))if(j4())a.flags|=8192;else throw cu=ip,H0}function _p(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?fn():536870912,a.lanes|=s,Lc|=s)}function Od(a,s){if(!bt)switch(a.tailMode){case"hidden":s=a.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var v=null;d!==null;)d.alternate!==null&&(v=d),d=d.sibling;v===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:v.sibling=null}}function an(a){var s=a.alternate!==null&&a.alternate.child===a.child,d=0,v=0;if(s)for(var E=a.child;E!==null;)d|=E.lanes|E.childLanes,v|=E.subtreeFlags&65011712,v|=E.flags&65011712,E.return=a,E=E.sibling;else for(E=a.child;E!==null;)d|=E.lanes|E.childLanes,v|=E.subtreeFlags,v|=E.flags,E.return=a,E=E.sibling;return a.subtreeFlags|=v,a.childLanes=d,s}function hU(a,s,d){var v=s.pendingProps;switch(Ln(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(s),null;case 1:return an(s),null;case 3:return d=s.stateNode,v=null,a!==null&&(v=a.memoizedState.cache),s.memoizedState.cache!==v&&(s.flags|=2048),Co(Hn),R(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(a===null||a.child===null)&&(ha(s)?Oo(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,pd())),an(s),null;case 26:var E=s.type,T=s.memoizedState;return a===null?(Oo(s),T!==null?(an(s),r4(s,T)):(an(s),T1(s,E,null,v,d))):T?T!==a.memoizedState?(Oo(s),an(s),r4(s,T)):(an(s),s.flags&=-16777217):(a=a.memoizedProps,a!==v&&Oo(s),an(s),T1(s,E,a,v,d)),null;case 27:if(te(s),d=he.current,E=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==v&&Oo(s);else{if(!v){if(s.stateNode===null)throw Error(r(166));return an(s),null}a=le.current,ha(s)?md(s):(a=cA(E,v,d),s.stateNode=a,Oo(s))}return an(s),null;case 5:if(te(s),E=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==v&&Oo(s);else{if(!v){if(s.stateNode===null)throw Error(r(166));return an(s),null}if(T=le.current,ha(s))md(s);else{var $=kp(he.current);switch(T){case 1:T=$.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:T=$.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case"svg":T=$.createElementNS("http://www.w3.org/2000/svg",E);break;case"math":T=$.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case"script":T=$.createElement("div"),T.innerHTML="<script><\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof v.is=="string"?$.createElement("select",{is:v.is}):$.createElement("select"),v.multiple?T.multiple=!0:v.size&&(T.size=v.size);break;default:T=typeof v.is=="string"?$.createElement(E,{is:v.is}):$.createElement(E)}}T[$n]=s,T[dr]=v;e:for($=s.child;$!==null;){if($.tag===5||$.tag===6)T.appendChild($.stateNode);else if($.tag!==4&&$.tag!==27&&$.child!==null){$.child.return=$,$=$.child;continue}if($===s)break e;for(;$.sibling===null;){if($.return===null||$.return===s)break e;$=$.return}$.sibling.return=$.return,$=$.sibling}s.stateNode=T;e:switch(Sr(T,E,v),E){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&Oo(s)}}return an(s),T1(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,d),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==v&&Oo(s);else{if(typeof v!="string"&&s.stateNode===null)throw Error(r(166));if(a=he.current,ha(s)){if(a=s.stateNode,d=s.memoizedProps,v=null,E=Rt,E!==null)switch(E.tag){case 27:case 5:v=E.memoizedProps}a[$n]=s,a=!!(a.nodeValue===d||v!==null&&v.suppressHydrationWarning===!0||J4(a.nodeValue,d)),a||Wa(s,!0)}else a=kp(a).createTextNode(v),a[$n]=s,s.stateNode=a}return an(s),null;case 31:if(d=s.memoizedState,a===null||a.memoizedState!==null){if(v=ha(s),d!==null){if(a===null){if(!v)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[$n]=s}else So(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;an(s),a=!1}else d=pd(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=d),a=!0;if(!a)return s.flags&256?(bi(s),s):(bi(s),null);if((s.flags&128)!==0)throw Error(r(558))}return an(s),null;case 13:if(v=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(E=ha(s),v!==null&&v.dehydrated!==null){if(a===null){if(!E)throw Error(r(318));if(E=s.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(r(317));E[$n]=s}else So(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;an(s),E=!1}else E=pd(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=E),E=!0;if(!E)return s.flags&256?(bi(s),s):(bi(s),null)}return bi(s),(s.flags&128)!==0?(s.lanes=d,s):(d=v!==null,a=a!==null&&a.memoizedState!==null,d&&(v=s.child,E=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(E=v.alternate.memoizedState.cachePool.pool),T=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(T=v.memoizedState.cachePool.pool),T!==E&&(v.flags|=2048)),d!==a&&d&&(s.child.flags|=8192),_p(s,s.updateQueue),an(s),null);case 4:return R(),a===null&&K1(s.stateNode.containerInfo),an(s),null;case 10:return Co(s.type),an(s),null;case 19:if(q(kn),v=s.memoizedState,v===null)return an(s),null;if(E=(s.flags&128)!==0,T=v.rendering,T===null)if(E)Od(v,!1);else{if(Rn!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(T=lp(a),T!==null){for(s.flags|=128,Od(v,!1),a=T.updateQueue,s.updateQueue=a,_p(s,a),s.subtreeFlags=0,a=d,d=s.child;d!==null;)fd(d,a),d=d.sibling;return ee(kn,kn.current&1|2),bt&&tt(s,v.treeForkCount),s.child}a=a.sibling}v.tail!==null&&Ge()>Ap&&(s.flags|=128,E=!0,Od(v,!1),s.lanes=4194304)}else{if(!E)if(a=lp(T),a!==null){if(s.flags|=128,E=!0,a=a.updateQueue,s.updateQueue=a,_p(s,a),Od(v,!0),v.tail===null&&v.tailMode==="hidden"&&!T.alternate&&!bt)return an(s),null}else 2*Ge()-v.renderingStartTime>Ap&&d!==536870912&&(s.flags|=128,E=!0,Od(v,!1),s.lanes=4194304);v.isBackwards?(T.sibling=s.child,s.child=T):(a=v.last,a!==null?a.sibling=T:s.child=T,v.last=T)}return v.tail!==null?(a=v.tail,v.rendering=a,v.tail=a.sibling,v.renderingStartTime=Ge(),a.sibling=null,d=kn.current,ee(kn,E?d&1|2:d&1),bt&&tt(s,v.treeForkCount),a):(an(s),null);case 22:case 23:return bi(s),Z0(),v=s.memoizedState!==null,a!==null?a.memoizedState!==null!==v&&(s.flags|=8192):v&&(s.flags|=8192),v?(d&536870912)!==0&&(s.flags&128)===0&&(an(s),s.subtreeFlags&6&&(s.flags|=8192)):an(s),d=s.updateQueue,d!==null&&_p(s,d.retryQueue),d=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),v=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(v=s.memoizedState.cachePool.pool),v!==d&&(s.flags|=2048),a!==null&&q(lu),null;case 24:return d=null,a!==null&&(d=a.memoizedState.cache),s.memoizedState.cache!==d&&(s.flags|=2048),Co(Hn),an(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function mU(a,s){switch(Ln(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Co(Hn),R(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return te(s),null;case 31:if(s.memoizedState!==null){if(bi(s),s.alternate===null)throw Error(r(340));So()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(bi(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));So()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return q(kn),null;case 4:return R(),null;case 10:return Co(s.type),null;case 22:case 23:return bi(s),Z0(),a!==null&&q(lu),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return Co(Hn),null;case 25:return null;default:return null}}function i4(a,s){switch(Ln(s),s.tag){case 3:Co(Hn),R();break;case 26:case 27:case 5:te(s);break;case 4:R();break;case 31:s.memoizedState!==null&&bi(s);break;case 13:bi(s);break;case 19:q(kn);break;case 10:Co(s.type);break;case 22:case 23:bi(s),Z0(),a!==null&&q(lu);break;case 24:Co(Hn)}}function jd(a,s){try{var d=s.updateQueue,v=d!==null?d.lastEffect:null;if(v!==null){var E=v.next;d=E;do{if((d.tag&a)===a){v=void 0;var T=d.create,$=d.inst;v=T(),$.destroy=v}d=d.next}while(d!==E)}}catch(Q){Ht(s,s.return,Q)}}function Us(a,s,d){try{var v=s.updateQueue,E=v!==null?v.lastEffect:null;if(E!==null){var T=E.next;v=T;do{if((v.tag&a)===a){var $=v.inst,Q=$.destroy;if(Q!==void 0){$.destroy=void 0,E=s;var de=d,Se=Q;try{Se()}catch(Pe){Ht(E,de,Pe)}}}v=v.next}while(v!==T)}}catch(Pe){Ht(s,s.return,Pe)}}function a4(a){var s=a.updateQueue;if(s!==null){var d=a.stateNode;try{K3(s,d)}catch(v){Ht(a,a.return,v)}}}function o4(a,s,d){d.props=hu(a.type,a.memoizedProps),d.state=a.memoizedState;try{d.componentWillUnmount()}catch(v){Ht(a,s,v)}}function Md(a,s){try{var d=a.ref;if(d!==null){switch(a.tag){case 26:case 27:case 5:var v=a.stateNode;break;case 30:v=a.stateNode;break;default:v=a.stateNode}typeof d=="function"?a.refCleanup=d(v):d.current=v}}catch(E){Ht(a,s,E)}}function Za(a,s){var d=a.ref,v=a.refCleanup;if(d!==null)if(typeof v=="function")try{v()}catch(E){Ht(a,s,E)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(E){Ht(a,s,E)}else d.current=null}function s4(a){var s=a.type,d=a.memoizedProps,v=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":d.autoFocus&&v.focus();break e;case"img":d.src?v.src=d.src:d.srcSet&&(v.srcset=d.srcSet)}}catch(E){Ht(a,a.return,E)}}function O1(a,s,d){try{var v=a.stateNode;kU(v,a.type,d,s),v[dr]=s}catch(E){Ht(a,a.return,E)}}function l4(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Gs(a.type)||a.tag===4}function j1(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||l4(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Gs(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function M1(a,s,d){var v=a.tag;if(v===5||v===6)a=a.stateNode,s?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(a,s):(s=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,s.appendChild(a),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=Jr));else if(v!==4&&(v===27&&Gs(a.type)&&(d=a.stateNode,s=null),a=a.child,a!==null))for(M1(a,s,d),a=a.sibling;a!==null;)M1(a,s,d),a=a.sibling}function wp(a,s,d){var v=a.tag;if(v===5||v===6)a=a.stateNode,s?d.insertBefore(a,s):d.appendChild(a);else if(v!==4&&(v===27&&Gs(a.type)&&(d=a.stateNode),a=a.child,a!==null))for(wp(a,s,d),a=a.sibling;a!==null;)wp(a,s,d),a=a.sibling}function u4(a){var s=a.stateNode,d=a.memoizedProps;try{for(var v=a.type,E=s.attributes;E.length;)s.removeAttributeNode(E[0]);Sr(s,v,d),s[$n]=a,s[dr]=d}catch(T){Ht(a,a.return,T)}}var jo=!1,Yn=!1,P1=!1,c4=typeof WeakSet=="function"?WeakSet:Set,pr=null;function pU(a,s){if(a=a.containerInfo,Q1=Vp,a=Xl(a),$a(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var v=d.getSelection&&d.getSelection();if(v&&v.rangeCount!==0){d=v.anchorNode;var E=v.anchorOffset,T=v.focusNode;v=v.focusOffset;try{d.nodeType,T.nodeType}catch{d=null;break e}var $=0,Q=-1,de=-1,Se=0,Pe=0,Re=a,Te=null;t:for(;;){for(var je;Re!==d||E!==0&&Re.nodeType!==3||(Q=$+E),Re!==T||v!==0&&Re.nodeType!==3||(de=$+v),Re.nodeType===3&&($+=Re.nodeValue.length),(je=Re.firstChild)!==null;)Te=Re,Re=je;for(;;){if(Re===a)break t;if(Te===d&&++Se===E&&(Q=$),Te===T&&++Pe===v&&(de=$),(je=Re.nextSibling)!==null)break;Re=Te,Te=Re.parentNode}Re=je}d=Q===-1||de===-1?null:{start:Q,end:de}}else d=null}d=d||{start:0,end:0}}else d=null;for(J1={focusedElem:a,selectionRange:d},Vp=!1,pr=s;pr!==null;)if(s=pr,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,pr=a;else for(;pr!==null;){switch(s=pr,T=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(d=0;d<a.length;d++)E=a[d],E.ref.impl=E.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&T!==null){a=void 0,d=s,E=T.memoizedProps,T=T.memoizedState,v=d.stateNode;try{var Ke=hu(d.type,E);a=v.getSnapshotBeforeUpdate(Ke,T),v.__reactInternalSnapshotBeforeUpdate=a}catch(st){Ht(d,d.return,st)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,d=a.nodeType,d===9)nb(a);else if(d===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":nb(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=s.sibling,a!==null){a.return=s.return,pr=a;break}pr=s.return}}function f4(a,s,d){var v=d.flags;switch(d.tag){case 0:case 11:case 15:Po(a,d),v&4&&jd(5,d);break;case 1:if(Po(a,d),v&4)if(a=d.stateNode,s===null)try{a.componentDidMount()}catch($){Ht(d,d.return,$)}else{var E=hu(d.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(E,s,a.__reactInternalSnapshotBeforeUpdate)}catch($){Ht(d,d.return,$)}}v&64&&a4(d),v&512&&Md(d,d.return);break;case 3:if(Po(a,d),v&64&&(a=d.updateQueue,a!==null)){if(s=null,d.child!==null)switch(d.child.tag){case 27:case 5:s=d.child.stateNode;break;case 1:s=d.child.stateNode}try{K3(a,s)}catch($){Ht(d,d.return,$)}}break;case 27:s===null&&v&4&&u4(d);case 26:case 5:Po(a,d),s===null&&v&4&&s4(d),v&512&&Md(d,d.return);break;case 12:Po(a,d);break;case 31:Po(a,d),v&4&&m4(a,d);break;case 13:Po(a,d),v&4&&p4(a,d),v&64&&(a=d.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(d=CU.bind(null,d),HU(a,d))));break;case 22:if(v=d.memoizedState!==null||jo,!v){s=s!==null&&s.memoizedState!==null||Yn,E=jo;var T=Yn;jo=v,(Yn=s)&&!T?Lo(a,d,(d.subtreeFlags&8772)!==0):Po(a,d),jo=E,Yn=T}break;case 30:break;default:Po(a,d)}}function d4(a){var s=a.alternate;s!==null&&(a.alternate=null,d4(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Yf(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var hn=null,ii=!1;function Mo(a,s,d){for(d=d.child;d!==null;)h4(a,s,d),d=d.sibling}function h4(a,s,d){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(gt,d)}catch{}switch(d.tag){case 26:Yn||Za(d,s),Mo(a,s,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Yn||Za(d,s);var v=hn,E=ii;Gs(d.type)&&(hn=d.stateNode,ii=!1),Mo(a,s,d),Ud(d.stateNode),hn=v,ii=E;break;case 5:Yn||Za(d,s);case 6:if(v=hn,E=ii,hn=null,Mo(a,s,d),hn=v,ii=E,hn!==null)if(ii)try{(hn.nodeType===9?hn.body:hn.nodeName==="HTML"?hn.ownerDocument.body:hn).removeChild(d.stateNode)}catch(T){Ht(d,s,T)}else try{hn.removeChild(d.stateNode)}catch(T){Ht(d,s,T)}break;case 18:hn!==null&&(ii?(a=hn,aA(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,d.stateNode),Bc(a)):aA(hn,d.stateNode));break;case 4:v=hn,E=ii,hn=d.stateNode.containerInfo,ii=!0,Mo(a,s,d),hn=v,ii=E;break;case 0:case 11:case 14:case 15:Us(2,d,s),Yn||Us(4,d,s),Mo(a,s,d);break;case 1:Yn||(Za(d,s),v=d.stateNode,typeof v.componentWillUnmount=="function"&&o4(d,s,v)),Mo(a,s,d);break;case 21:Mo(a,s,d);break;case 22:Yn=(v=Yn)||d.memoizedState!==null,Mo(a,s,d),Yn=v;break;default:Mo(a,s,d)}}function m4(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Bc(a)}catch(d){Ht(s,s.return,d)}}}function p4(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Bc(a)}catch(d){Ht(s,s.return,d)}}function gU(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new c4),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new c4),s;default:throw Error(r(435,a.tag))}}function Sp(a,s){var d=gU(a);s.forEach(function(v){if(!d.has(v)){d.add(v);var E=EU.bind(null,a,v);v.then(E,E)}})}function ai(a,s){var d=s.deletions;if(d!==null)for(var v=0;v<d.length;v++){var E=d[v],T=a,$=s,Q=$;e:for(;Q!==null;){switch(Q.tag){case 27:if(Gs(Q.type)){hn=Q.stateNode,ii=!1;break e}break;case 5:hn=Q.stateNode,ii=!1;break e;case 3:case 4:hn=Q.stateNode.containerInfo,ii=!0;break e}Q=Q.return}if(hn===null)throw Error(r(160));h4(T,$,E),hn=null,ii=!1,T=E.alternate,T!==null&&(T.return=null),E.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)g4(s,a),s=s.sibling}var pa=null;function g4(a,s){var d=a.alternate,v=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:ai(s,a),oi(a),v&4&&(Us(3,a,a.return),jd(3,a),Us(5,a,a.return));break;case 1:ai(s,a),oi(a),v&512&&(Yn||d===null||Za(d,d.return)),v&64&&jo&&(a=a.updateQueue,a!==null&&(v=a.callbacks,v!==null&&(d=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=d===null?v:d.concat(v))));break;case 26:var E=pa;if(ai(s,a),oi(a),v&512&&(Yn||d===null||Za(d,d.return)),v&4){var T=d!==null?d.memoizedState:null;if(v=a.memoizedState,d===null)if(v===null)if(a.stateNode===null){e:{v=a.type,d=a.memoizedProps,E=E.ownerDocument||E;t:switch(v){case"title":T=E.getElementsByTagName("title")[0],(!T||T[Dl]||T[$n]||T.namespaceURI==="http://www.w3.org/2000/svg"||T.hasAttribute("itemprop"))&&(T=E.createElement(v),E.head.insertBefore(T,E.querySelector("head > title"))),Sr(T,v,d),T[$n]=a,Vn(T),v=T;break e;case"link":var $=gA("link","href",E).get(v+(d.href||""));if($){for(var Q=0;Q<$.length;Q++)if(T=$[Q],T.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&T.getAttribute("rel")===(d.rel==null?null:d.rel)&&T.getAttribute("title")===(d.title==null?null:d.title)&&T.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){$.splice(Q,1);break t}}T=E.createElement(v),Sr(T,v,d),E.head.appendChild(T);break;case"meta":if($=gA("meta","content",E).get(v+(d.content||""))){for(Q=0;Q<$.length;Q++)if(T=$[Q],T.getAttribute("content")===(d.content==null?null:""+d.content)&&T.getAttribute("name")===(d.name==null?null:d.name)&&T.getAttribute("property")===(d.property==null?null:d.property)&&T.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&T.getAttribute("charset")===(d.charSet==null?null:d.charSet)){$.splice(Q,1);break t}}T=E.createElement(v),Sr(T,v,d),E.head.appendChild(T);break;default:throw Error(r(468,v))}T[$n]=a,Vn(T),v=T}a.stateNode=v}else vA(E,a.type,a.stateNode);else a.stateNode=pA(E,v,a.memoizedProps);else T!==v?(T===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):T.count--,v===null?vA(E,a.type,a.stateNode):pA(E,v,a.memoizedProps)):v===null&&a.stateNode!==null&&O1(a,a.memoizedProps,d.memoizedProps)}break;case 27:ai(s,a),oi(a),v&512&&(Yn||d===null||Za(d,d.return)),d!==null&&v&4&&O1(a,a.memoizedProps,d.memoizedProps);break;case 5:if(ai(s,a),oi(a),v&512&&(Yn||d===null||Za(d,d.return)),a.flags&32){E=a.stateNode;try{Fi(E,"")}catch(Ke){Ht(a,a.return,Ke)}}v&4&&a.stateNode!=null&&(E=a.memoizedProps,O1(a,E,d!==null?d.memoizedProps:E)),v&1024&&(P1=!0);break;case 6:if(ai(s,a),oi(a),v&4){if(a.stateNode===null)throw Error(r(162));v=a.memoizedProps,d=a.stateNode;try{d.nodeValue=v}catch(Ke){Ht(a,a.return,Ke)}}break;case 3:if(Up=null,E=pa,pa=Ip(s.containerInfo),ai(s,a),pa=E,oi(a),v&4&&d!==null&&d.memoizedState.isDehydrated)try{Bc(s.containerInfo)}catch(Ke){Ht(a,a.return,Ke)}P1&&(P1=!1,v4(a));break;case 4:v=pa,pa=Ip(a.stateNode.containerInfo),ai(s,a),oi(a),pa=v;break;case 12:ai(s,a),oi(a);break;case 31:ai(s,a),oi(a),v&4&&(v=a.updateQueue,v!==null&&(a.updateQueue=null,Sp(a,v)));break;case 13:ai(s,a),oi(a),a.child.flags&8192&&a.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Ep=Ge()),v&4&&(v=a.updateQueue,v!==null&&(a.updateQueue=null,Sp(a,v)));break;case 22:E=a.memoizedState!==null;var de=d!==null&&d.memoizedState!==null,Se=jo,Pe=Yn;if(jo=Se||E,Yn=Pe||de,ai(s,a),Yn=Pe,jo=Se,oi(a),v&8192)e:for(s=a.stateNode,s._visibility=E?s._visibility&-2:s._visibility|1,E&&(d===null||de||jo||Yn||mu(a)),d=null,s=a;;){if(s.tag===5||s.tag===26){if(d===null){de=d=s;try{if(T=de.stateNode,E)$=T.style,typeof $.setProperty=="function"?$.setProperty("display","none","important"):$.display="none";else{Q=de.stateNode;var Re=de.memoizedProps.style,Te=Re!=null&&Re.hasOwnProperty("display")?Re.display:null;Q.style.display=Te==null||typeof Te=="boolean"?"":(""+Te).trim()}}catch(Ke){Ht(de,de.return,Ke)}}}else if(s.tag===6){if(d===null){de=s;try{de.stateNode.nodeValue=E?"":de.memoizedProps}catch(Ke){Ht(de,de.return,Ke)}}}else if(s.tag===18){if(d===null){de=s;try{var je=de.stateNode;E?oA(je,!0):oA(de.stateNode,!1)}catch(Ke){Ht(de,de.return,Ke)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;d===s&&(d=null),s=s.return}d===s&&(d=null),s.sibling.return=s.return,s=s.sibling}v&4&&(v=a.updateQueue,v!==null&&(d=v.retryQueue,d!==null&&(v.retryQueue=null,Sp(a,d))));break;case 19:ai(s,a),oi(a),v&4&&(v=a.updateQueue,v!==null&&(a.updateQueue=null,Sp(a,v)));break;case 30:break;case 21:break;default:ai(s,a),oi(a)}}function oi(a){var s=a.flags;if(s&2){try{for(var d,v=a.return;v!==null;){if(l4(v)){d=v;break}v=v.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var E=d.stateNode,T=j1(a);wp(a,T,E);break;case 5:var $=d.stateNode;d.flags&32&&(Fi($,""),d.flags&=-33);var Q=j1(a);wp(a,Q,$);break;case 3:case 4:var de=d.stateNode.containerInfo,Se=j1(a);M1(a,Se,de);break;default:throw Error(r(161))}}catch(Pe){Ht(a,a.return,Pe)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function v4(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;v4(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function Po(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)f4(a,s.alternate,s),s=s.sibling}function mu(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:Us(4,s,s.return),mu(s);break;case 1:Za(s,s.return);var d=s.stateNode;typeof d.componentWillUnmount=="function"&&o4(s,s.return,d),mu(s);break;case 27:Ud(s.stateNode);case 26:case 5:Za(s,s.return),mu(s);break;case 22:s.memoizedState===null&&mu(s);break;case 30:mu(s);break;default:mu(s)}a=a.sibling}}function Lo(a,s,d){for(d=d&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var v=s.alternate,E=a,T=s,$=T.flags;switch(T.tag){case 0:case 11:case 15:Lo(E,T,d),jd(4,T);break;case 1:if(Lo(E,T,d),v=T,E=v.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(Se){Ht(v,v.return,Se)}if(v=T,E=v.updateQueue,E!==null){var Q=v.stateNode;try{var de=E.shared.hiddenCallbacks;if(de!==null)for(E.shared.hiddenCallbacks=null,E=0;E<de.length;E++)W3(de[E],Q)}catch(Se){Ht(v,v.return,Se)}}d&&$&64&&a4(T),Md(T,T.return);break;case 27:u4(T);case 26:case 5:Lo(E,T,d),d&&v===null&&$&4&&s4(T),Md(T,T.return);break;case 12:Lo(E,T,d);break;case 31:Lo(E,T,d),d&&$&4&&m4(E,T);break;case 13:Lo(E,T,d),d&&$&4&&p4(E,T);break;case 22:T.memoizedState===null&&Lo(E,T,d),Md(T,T.return);break;case 30:break;default:Lo(E,T,d)}s=s.sibling}}function L1(a,s){var d=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==d&&(a!=null&&a.refCount++,d!=null&&gd(d))}function N1(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&gd(a))}function ga(a,s,d,v){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)y4(a,s,d,v),s=s.sibling}function y4(a,s,d,v){var E=s.flags;switch(s.tag){case 0:case 11:case 15:ga(a,s,d,v),E&2048&&jd(9,s);break;case 1:ga(a,s,d,v);break;case 3:ga(a,s,d,v),E&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&gd(a)));break;case 12:if(E&2048){ga(a,s,d,v),a=s.stateNode;try{var T=s.memoizedProps,$=T.id,Q=T.onPostCommit;typeof Q=="function"&&Q($,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(de){Ht(s,s.return,de)}}else ga(a,s,d,v);break;case 31:ga(a,s,d,v);break;case 13:ga(a,s,d,v);break;case 23:break;case 22:T=s.stateNode,$=s.alternate,s.memoizedState!==null?T._visibility&2?ga(a,s,d,v):Pd(a,s):T._visibility&2?ga(a,s,d,v):(T._visibility|=2,jc(a,s,d,v,(s.subtreeFlags&10256)!==0||!1)),E&2048&&L1($,s);break;case 24:ga(a,s,d,v),E&2048&&N1(s.alternate,s);break;default:ga(a,s,d,v)}}function jc(a,s,d,v,E){for(E=E&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var T=a,$=s,Q=d,de=v,Se=$.flags;switch($.tag){case 0:case 11:case 15:jc(T,$,Q,de,E),jd(8,$);break;case 23:break;case 22:var Pe=$.stateNode;$.memoizedState!==null?Pe._visibility&2?jc(T,$,Q,de,E):Pd(T,$):(Pe._visibility|=2,jc(T,$,Q,de,E)),E&&Se&2048&&L1($.alternate,$);break;case 24:jc(T,$,Q,de,E),E&&Se&2048&&N1($.alternate,$);break;default:jc(T,$,Q,de,E)}s=s.sibling}}function Pd(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var d=a,v=s,E=v.flags;switch(v.tag){case 22:Pd(d,v),E&2048&&L1(v.alternate,v);break;case 24:Pd(d,v),E&2048&&N1(v.alternate,v);break;default:Pd(d,v)}s=s.sibling}}var Ld=8192;function Mc(a,s,d){if(a.subtreeFlags&Ld)for(a=a.child;a!==null;)b4(a,s,d),a=a.sibling}function b4(a,s,d){switch(a.tag){case 26:Mc(a,s,d),a.flags&Ld&&a.memoizedState!==null&&nB(d,pa,a.memoizedState,a.memoizedProps);break;case 5:Mc(a,s,d);break;case 3:case 4:var v=pa;pa=Ip(a.stateNode.containerInfo),Mc(a,s,d),pa=v;break;case 22:a.memoizedState===null&&(v=a.alternate,v!==null&&v.memoizedState!==null?(v=Ld,Ld=16777216,Mc(a,s,d),Ld=v):Mc(a,s,d));break;default:Mc(a,s,d)}}function x4(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function Nd(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var d=0;d<s.length;d++){var v=s[d];pr=v,w4(v,a)}x4(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)_4(a),a=a.sibling}function _4(a){switch(a.tag){case 0:case 11:case 15:Nd(a),a.flags&2048&&Us(9,a,a.return);break;case 3:Nd(a);break;case 12:Nd(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Cp(a)):Nd(a);break;default:Nd(a)}}function Cp(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var d=0;d<s.length;d++){var v=s[d];pr=v,w4(v,a)}x4(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:Us(8,s,s.return),Cp(s);break;case 22:d=s.stateNode,d._visibility&2&&(d._visibility&=-3,Cp(s));break;default:Cp(s)}a=a.sibling}}function w4(a,s){for(;pr!==null;){var d=pr;switch(d.tag){case 0:case 11:case 15:Us(8,d,s);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var v=d.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:gd(d.memoizedState.cache)}if(v=d.child,v!==null)v.return=d,pr=v;else e:for(d=a;pr!==null;){v=pr;var E=v.sibling,T=v.return;if(d4(v),v===d){pr=null;break e}if(E!==null){E.return=T,pr=E;break e}pr=T}}}var vU={getCacheForType:function(a){var s=_r(Hn),d=s.data.get(a);return d===void 0&&(d=a(),s.data.set(a,d)),d},cacheSignal:function(){return _r(Hn).controller.signal}},yU=typeof WeakMap=="function"?WeakMap:Map,Ut=0,Qt=null,xt=null,Et=0,Vt=0,xi=null,Bs=!1,Pc=!1,R1=!1,No=0,Rn=0,Fs=0,pu=0,D1=0,_i=0,Lc=0,Rd=null,si=null,k1=!1,Ep=0,S4=0,Ap=1/0,Tp=null,$s=null,nr=0,Vs=null,Nc=null,Ro=0,I1=0,z1=null,C4=null,Dd=0,U1=null;function wi(){return(Ut&2)!==0&&Et!==0?Et&-Et:Y.T!==null?q1():qf()}function E4(){if(_i===0)if((Et&536870912)===0||bt){var a=fo;fo<<=1,(fo&3932160)===0&&(fo=262144),_i=a}else _i=536870912;return a=yi.current,a!==null&&(a.flags|=32),_i}function li(a,s,d){(a===Qt&&(Vt===2||Vt===9)||a.cancelPendingCommit!==null)&&(Rc(a,0),Hs(a,Et,_i,!1)),xn(a,d),((Ut&2)===0||a!==Qt)&&(a===Qt&&((Ut&2)===0&&(pu|=d),Rn===4&&Hs(a,Et,_i,!1)),Xa(a))}function A4(a,s,d){if((Ut&6)!==0)throw Error(r(327));var v=!d&&(s&127)===0&&(s&a.expiredLanes)===0||hi(a,s),E=v?_U(a,s):F1(a,s,!0),T=v;do{if(E===0){Pc&&!v&&Hs(a,s,0,!1);break}else{if(d=a.current.alternate,T&&!bU(d)){E=F1(a,s,!1),T=!1;continue}if(E===2){if(T=s,a.errorRecoveryDisabledLanes&T)var $=0;else $=a.pendingLanes&-536870913,$=$!==0?$:$&536870912?536870912:0;if($!==0){s=$;e:{var Q=a;E=Rd;var de=Q.current.memoizedState.isDehydrated;if(de&&(Rc(Q,$).flags|=256),$=F1(Q,$,!1),$!==2){if(R1&&!de){Q.errorRecoveryDisabledLanes|=T,pu|=T,E=4;break e}T=si,si=E,T!==null&&(si===null?si=T:si.push.apply(si,T))}E=$}if(T=!1,E!==2)continue}}if(E===1){Rc(a,0),Hs(a,s,0,!0);break}e:{switch(v=a,T=E,T){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Hs(v,s,_i,!Bs);break e;case 2:si=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(E=Ep+300-Ge(),10<E)){if(Hs(v,s,_i,!Bs),Da(v,0,!0)!==0)break e;Ro=s,v.timeoutHandle=rA(T4.bind(null,v,d,si,Tp,k1,s,_i,pu,Lc,Bs,T,"Throttled",-0,0),E);break e}T4(v,d,si,Tp,k1,s,_i,pu,Lc,Bs,T,null,-0,0)}}break}while(!0);Xa(a)}function T4(a,s,d,v,E,T,$,Q,de,Se,Pe,Re,Te,je){if(a.timeoutHandle=-1,Re=s.subtreeFlags,Re&8192||(Re&16785408)===16785408){Re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jr},b4(s,T,Re);var Ke=(T&62914560)===T?Ep-Ge():(T&4194048)===T?S4-Ge():0;if(Ke=rB(Re,Ke),Ke!==null){Ro=T,a.cancelPendingCommit=Ke(D4.bind(null,a,s,T,d,v,E,$,Q,de,Pe,Re,null,Te,je)),Hs(a,T,$,!Se);return}}D4(a,s,T,d,v,E,$,Q,de)}function bU(a){for(var s=a;;){var d=s.tag;if((d===0||d===11||d===15)&&s.flags&16384&&(d=s.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var v=0;v<d.length;v++){var E=d[v],T=E.getSnapshot;E=E.value;try{if(!hr(T(),E))return!1}catch{return!1}}if(d=s.child,s.subtreeFlags&16384&&d!==null)d.return=s,s=d;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Hs(a,s,d,v){s&=~D1,s&=~pu,a.suspendedLanes|=s,a.pingedLanes&=~s,v&&(a.warmLanes|=s),v=a.expirationTimes;for(var E=s;0<E;){var T=31-vt(E),$=1<<T;v[T]=-1,E&=~$}d!==0&&Mn(a,d,s)}function Op(){return(Ut&6)===0?(kd(0),!1):!0}function B1(){if(xt!==null){if(Vt===0)var a=xt.return;else a=xt,ma=Ka=null,n1(a),Cc=null,yd=0,a=xt;for(;a!==null;)i4(a.alternate,a),a=a.return;xt=null}}function Rc(a,s){var d=a.timeoutHandle;d!==-1&&(a.timeoutHandle=-1,UU(d)),d=a.cancelPendingCommit,d!==null&&(a.cancelPendingCommit=null,d()),Ro=0,B1(),Qt=a,xt=d=Wi(a.current,null),Et=s,Vt=0,xi=null,Bs=!1,Pc=hi(a,s),R1=!1,Lc=_i=D1=pu=Fs=Rn=0,si=Rd=null,k1=!1,(s&8)!==0&&(s|=s&32);var v=a.entangledLanes;if(v!==0)for(a=a.entanglements,v&=s;0<v;){var E=31-vt(v),T=1<<E;s|=a[E],v&=~T}return No=s,nu(),d}function O4(a,s){dt=null,Y.H=Ad,s===Sc||s===rp?(s=H3(),Vt=3):s===H0?(s=H3(),Vt=4):Vt=s===y1?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,xi=s,xt===null&&(Rn=1,vp(a,p(s,a.current)))}function j4(){var a=yi.current;return a===null?!0:(Et&4194048)===Et?Ki===null:(Et&62914560)===Et||(Et&536870912)!==0?a===Ki:!1}function M4(){var a=Y.H;return Y.H=Ad,a===null?Ad:a}function P4(){var a=Y.A;return Y.A=vU,a}function jp(){Rn=4,Bs||(Et&4194048)!==Et&&yi.current!==null||(Pc=!0),(Fs&134217727)===0&&(pu&134217727)===0||Qt===null||Hs(Qt,Et,_i,!1)}function F1(a,s,d){var v=Ut;Ut|=2;var E=M4(),T=P4();(Qt!==a||Et!==s)&&(Tp=null,Rc(a,s)),s=!1;var $=Rn;e:do try{if(Vt!==0&&xt!==null){var Q=xt,de=xi;switch(Vt){case 8:B1(),$=6;break e;case 3:case 2:case 9:case 6:yi.current===null&&(s=!0);var Se=Vt;if(Vt=0,xi=null,Dc(a,Q,de,Se),d&&Pc){$=0;break e}break;default:Se=Vt,Vt=0,xi=null,Dc(a,Q,de,Se)}}xU(),$=Rn;break}catch(Pe){O4(a,Pe)}while(!0);return s&&a.shellSuspendCounter++,ma=Ka=null,Ut=v,Y.H=E,Y.A=T,xt===null&&(Qt=null,Et=0,nu()),$}function xU(){for(;xt!==null;)L4(xt)}function _U(a,s){var d=Ut;Ut|=2;var v=M4(),E=P4();Qt!==a||Et!==s?(Tp=null,Ap=Ge()+500,Rc(a,s)):Pc=hi(a,s);e:do try{if(Vt!==0&&xt!==null){s=xt;var T=xi;t:switch(Vt){case 1:Vt=0,xi=null,Dc(a,s,T,1);break;case 2:case 9:if($3(T)){Vt=0,xi=null,N4(s);break}s=function(){Vt!==2&&Vt!==9||Qt!==a||(Vt=7),Xa(a)},T.then(s,s);break e;case 3:Vt=7;break e;case 4:Vt=5;break e;case 7:$3(T)?(Vt=0,xi=null,N4(s)):(Vt=0,xi=null,Dc(a,s,T,7));break;case 5:var $=null;switch(xt.tag){case 26:$=xt.memoizedState;case 5:case 27:var Q=xt;if($?yA($):Q.stateNode.complete){Vt=0,xi=null;var de=Q.sibling;if(de!==null)xt=de;else{var Se=Q.return;Se!==null?(xt=Se,Mp(Se)):xt=null}break t}}Vt=0,xi=null,Dc(a,s,T,5);break;case 6:Vt=0,xi=null,Dc(a,s,T,6);break;case 8:B1(),Rn=6;break e;default:throw Error(r(462))}}wU();break}catch(Pe){O4(a,Pe)}while(!0);return ma=Ka=null,Y.H=v,Y.A=E,Ut=d,xt!==null?0:(Qt=null,Et=0,nu(),Rn)}function wU(){for(;xt!==null&&!Ve();)L4(xt)}function L4(a){var s=n4(a.alternate,a,No);a.memoizedProps=a.pendingProps,s===null?Mp(a):xt=s}function N4(a){var s=a,d=s.alternate;switch(s.tag){case 15:case 0:s=ZE(d,s,s.pendingProps,s.type,void 0,Et);break;case 11:s=ZE(d,s,s.pendingProps,s.type.render,s.ref,Et);break;case 5:n1(s);default:i4(d,s),s=xt=fd(s,No),s=n4(d,s,No)}a.memoizedProps=a.pendingProps,s===null?Mp(a):xt=s}function Dc(a,s,d,v){ma=Ka=null,n1(s),Cc=null,yd=0;var E=s.return;try{if(cU(a,E,s,d,Et)){Rn=1,vp(a,p(d,a.current)),xt=null;return}}catch(T){if(E!==null)throw xt=E,T;Rn=1,vp(a,p(d,a.current)),xt=null;return}s.flags&32768?(bt||v===1?a=!0:Pc||(Et&536870912)!==0?a=!1:(Bs=a=!0,(v===2||v===9||v===3||v===6)&&(v=yi.current,v!==null&&v.tag===13&&(v.flags|=16384))),R4(s,a)):Mp(s)}function Mp(a){var s=a;do{if((s.flags&32768)!==0){R4(s,Bs);return}a=s.return;var d=hU(s.alternate,s,No);if(d!==null){xt=d;return}if(s=s.sibling,s!==null){xt=s;return}xt=s=a}while(s!==null);Rn===0&&(Rn=5)}function R4(a,s){do{var d=mU(a.alternate,a);if(d!==null){d.flags&=32767,xt=d;return}if(d=a.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!s&&(a=a.sibling,a!==null)){xt=a;return}xt=a=d}while(a!==null);Rn=6,xt=null}function D4(a,s,d,v,E,T,$,Q,de){a.cancelPendingCommit=null;do Pp();while(nr!==0);if((Ut&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(T=s.lanes|s.childLanes,T|=gc,Jn(a,d,T,$,Q,de),a===Qt&&(xt=Qt=null,Et=0),Nc=s,Vs=a,Ro=d,I1=T,z1=E,C4=v,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,AU(nt,function(){return B4(),null})):(a.callbackNode=null,a.callbackPriority=0),v=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||v){v=Y.T,Y.T=null,E=k.p,k.p=2,$=Ut,Ut|=4;try{pU(a,s,d)}finally{Ut=$,k.p=E,Y.T=v}}nr=1,k4(),I4(),z4()}}function k4(){if(nr===1){nr=0;var a=Vs,s=Nc,d=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||d){d=Y.T,Y.T=null;var v=k.p;k.p=2;var E=Ut;Ut|=4;try{g4(s,a);var T=J1,$=Xl(a.containerInfo),Q=T.focusedElem,de=T.selectionRange;if($!==Q&&Q&&Q.ownerDocument&&dc(Q.ownerDocument.documentElement,Q)){if(de!==null&&$a(Q)){var Se=de.start,Pe=de.end;if(Pe===void 0&&(Pe=Se),"selectionStart"in Q)Q.selectionStart=Se,Q.selectionEnd=Math.min(Pe,Q.value.length);else{var Re=Q.ownerDocument||document,Te=Re&&Re.defaultView||window;if(Te.getSelection){var je=Te.getSelection(),Ke=Q.textContent.length,st=Math.min(de.start,Ke),Kt=de.end===void 0?st:Math.min(de.end,Ke);!je.extend&&st>Kt&&($=Kt,Kt=st,st=$);var ye=Zl(Q,st),ge=Zl(Q,Kt);if(ye&&ge&&(je.rangeCount!==1||je.anchorNode!==ye.node||je.anchorOffset!==ye.offset||je.focusNode!==ge.node||je.focusOffset!==ge.offset)){var we=Re.createRange();we.setStart(ye.node,ye.offset),je.removeAllRanges(),st>Kt?(je.addRange(we),je.extend(ge.node,ge.offset)):(we.setEnd(ge.node,ge.offset),je.addRange(we))}}}}for(Re=[],je=Q;je=je.parentNode;)je.nodeType===1&&Re.push({element:je,left:je.scrollLeft,top:je.scrollTop});for(typeof Q.focus=="function"&&Q.focus(),Q=0;Q<Re.length;Q++){var Le=Re[Q];Le.element.scrollLeft=Le.left,Le.element.scrollTop=Le.top}}Vp=!!Q1,J1=Q1=null}finally{Ut=E,k.p=v,Y.T=d}}a.current=s,nr=2}}function I4(){if(nr===2){nr=0;var a=Vs,s=Nc,d=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||d){d=Y.T,Y.T=null;var v=k.p;k.p=2;var E=Ut;Ut|=4;try{f4(a,s.alternate,s)}finally{Ut=E,k.p=v,Y.T=d}}nr=3}}function z4(){if(nr===4||nr===3){nr=0,ot();var a=Vs,s=Nc,d=Ro,v=C4;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?nr=5:(nr=0,Nc=Vs=null,U4(a,a.pendingLanes));var E=a.pendingLanes;if(E===0&&($s=null),et(d),s=s.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(gt,s,void 0,(s.current.flags&128)===128)}catch{}if(v!==null){s=Y.T,E=k.p,k.p=2,Y.T=null;try{for(var T=a.onRecoverableError,$=0;$<v.length;$++){var Q=v[$];T(Q.value,{componentStack:Q.stack})}}finally{Y.T=s,k.p=E}}(Ro&3)!==0&&Pp(),Xa(a),E=a.pendingLanes,(d&261930)!==0&&(E&42)!==0?a===U1?Dd++:(Dd=0,U1=a):Dd=0,kd(0)}}function U4(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,gd(s)))}function Pp(){return k4(),I4(),z4(),B4()}function B4(){if(nr!==5)return!1;var a=Vs,s=I1;I1=0;var d=et(Ro),v=Y.T,E=k.p;try{k.p=32>d?32:d,Y.T=null,d=z1,z1=null;var T=Vs,$=Ro;if(nr=0,Nc=Vs=null,Ro=0,(Ut&6)!==0)throw Error(r(331));var Q=Ut;if(Ut|=4,_4(T.current),y4(T,T.current,$,d),Ut=Q,kd(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(gt,T)}catch{}return!0}finally{k.p=E,Y.T=v,U4(a,s)}}function F4(a,s,d){s=p(d,s),s=v1(a.stateNode,s,2),a=ks(a,s,2),a!==null&&(xn(a,2),Xa(a))}function Ht(a,s,d){if(a.tag===3)F4(a,a,d);else for(;s!==null;){if(s.tag===3){F4(s,a,d);break}else if(s.tag===1){var v=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&($s===null||!$s.has(v))){a=p(d,a),d=$E(2),v=ks(s,d,2),v!==null&&(VE(d,v,s,a),xn(v,2),Xa(v));break}}s=s.return}}function $1(a,s,d){var v=a.pingCache;if(v===null){v=a.pingCache=new yU;var E=new Set;v.set(s,E)}else E=v.get(s),E===void 0&&(E=new Set,v.set(s,E));E.has(d)||(R1=!0,E.add(d),a=SU.bind(null,a,s,d),s.then(a,a))}function SU(a,s,d){var v=a.pingCache;v!==null&&v.delete(s),a.pingedLanes|=a.suspendedLanes&d,a.warmLanes&=~d,Qt===a&&(Et&d)===d&&(Rn===4||Rn===3&&(Et&62914560)===Et&&300>Ge()-Ep?(Ut&2)===0&&Rc(a,0):D1|=d,Lc===Et&&(Lc=0)),Xa(a)}function $4(a,s){s===0&&(s=fn()),a=Yi(a,s),a!==null&&(xn(a,s),Xa(a))}function CU(a){var s=a.memoizedState,d=0;s!==null&&(d=s.retryLane),$4(a,d)}function EU(a,s){var d=0;switch(a.tag){case 31:case 13:var v=a.stateNode,E=a.memoizedState;E!==null&&(d=E.retryLane);break;case 19:v=a.stateNode;break;case 22:v=a.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(s),$4(a,d)}function AU(a,s){return Ue(a,s)}var Lp=null,kc=null,V1=!1,Np=!1,H1=!1,qs=0;function Xa(a){a!==kc&&a.next===null&&(kc===null?Lp=kc=a:kc=kc.next=a),Np=!0,V1||(V1=!0,OU())}function kd(a,s){if(!H1&&Np){H1=!0;do for(var d=!1,v=Lp;v!==null;){if(a!==0){var E=v.pendingLanes;if(E===0)var T=0;else{var $=v.suspendedLanes,Q=v.pingedLanes;T=(1<<31-vt(42|a)+1)-1,T&=E&~($&~Q),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(d=!0,G4(v,T))}else T=Et,T=Da(v,v===Qt?T:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(T&3)===0||hi(v,T)||(d=!0,G4(v,T));v=v.next}while(d);H1=!1}}function TU(){V4()}function V4(){Np=V1=!1;var a=0;qs!==0&&zU()&&(a=qs);for(var s=Ge(),d=null,v=Lp;v!==null;){var E=v.next,T=H4(v,s);T===0?(v.next=null,d===null?Lp=E:d.next=E,E===null&&(kc=d)):(d=v,(a!==0||(T&3)!==0)&&(Np=!0)),v=E}nr!==0&&nr!==5||kd(a),qs!==0&&(qs=0)}function H4(a,s){for(var d=a.suspendedLanes,v=a.pingedLanes,E=a.expirationTimes,T=a.pendingLanes&-62914561;0<T;){var $=31-vt(T),Q=1<<$,de=E[$];de===-1?((Q&d)===0||(Q&v)!==0)&&(E[$]=jn(Q,s)):de<=s&&(a.expiredLanes|=Q),T&=~Q}if(s=Qt,d=Et,d=Da(a,a===s?d:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),v=a.callbackNode,d===0||a===s&&(Vt===2||Vt===9)||a.cancelPendingCommit!==null)return v!==null&&v!==null&&ke(v),a.callbackNode=null,a.callbackPriority=0;if((d&3)===0||hi(a,d)){if(s=d&-d,s===a.callbackPriority)return s;switch(v!==null&&ke(v),et(d)){case 2:case 8:d=ze;break;case 32:d=nt;break;case 268435456:d=at;break;default:d=nt}return v=q4.bind(null,a),d=Ue(d,v),a.callbackPriority=s,a.callbackNode=d,s}return v!==null&&v!==null&&ke(v),a.callbackPriority=2,a.callbackNode=null,2}function q4(a,s){if(nr!==0&&nr!==5)return a.callbackNode=null,a.callbackPriority=0,null;var d=a.callbackNode;if(Pp()&&a.callbackNode!==d)return null;var v=Et;return v=Da(a,a===Qt?v:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),v===0?null:(A4(a,v,s),H4(a,Ge()),a.callbackNode!=null&&a.callbackNode===d?q4.bind(null,a):null)}function G4(a,s){if(Pp())return null;A4(a,s,!0)}function OU(){BU(function(){(Ut&6)!==0?Ue(We,TU):V4()})}function q1(){if(qs===0){var a=_c;a===0&&(a=Ur,Ur<<=1,(Ur&261888)===0&&(Ur=256)),qs=a}return qs}function Y4(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:xs(""+a)}function W4(a,s){var d=s.ownerDocument.createElement("input");return d.name=s.name,d.value=s.value,a.id&&d.setAttribute("form",a.id),s.parentNode.insertBefore(d,s),a=new FormData(a),d.parentNode.removeChild(d),a}function jU(a,s,d,v,E){if(s==="submit"&&d&&d.stateNode===E){var T=Y4((E[dr]||null).action),$=v.submitter;$&&(s=(s=$[dr]||null)?Y4(s.formAction):$.getAttribute("formAction"),s!==null&&(T=s,$=null));var Q=new ac("action","action",null,v,E);a.push({event:Q,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(qs!==0){var de=$?W4(E,$):new FormData(E);f1(d,{pending:!0,data:de,method:E.method,action:T},null,de)}}else typeof T=="function"&&(Q.preventDefault(),de=$?W4(E,$):new FormData(E),f1(d,{pending:!0,data:de,method:E.method,action:T},T,de))},currentTarget:E}]})}}for(var G1=0;G1<qa.length;G1++){var Y1=qa[G1],MU=Y1.toLowerCase(),PU=Y1[0].toUpperCase()+Y1.slice(1);ti(MU,"on"+PU)}ti(Jl,"onAnimationEnd"),ti(Xm,"onAnimationIteration"),ti(eu,"onAnimationStart"),ti("dblclick","onDoubleClick"),ti("focusin","onFocus"),ti("focusout","onBlur"),ti(k0,"onTransitionRun"),ti(Qm,"onTransitionStart"),ti(I0,"onTransitionCancel"),ti(Ps,"onTransitionEnd"),za("onMouseEnter",["mouseout","mouseover"]),za("onMouseLeave",["mouseout","mouseover"]),za("onPointerEnter",["pointerout","pointerover"]),za("onPointerLeave",["pointerout","pointerover"]),go("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),go("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),go("onBeforeInput",["compositionend","keypress","textInput","paste"]),go("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),go("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),go("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Id="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),LU=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Id));function K4(a,s){s=(s&4)!==0;for(var d=0;d<a.length;d++){var v=a[d],E=v.event;v=v.listeners;e:{var T=void 0;if(s)for(var $=v.length-1;0<=$;$--){var Q=v[$],de=Q.instance,Se=Q.currentTarget;if(Q=Q.listener,de!==T&&E.isPropagationStopped())break e;T=Q,E.currentTarget=Se;try{T(E)}catch(Pe){tu(Pe)}E.currentTarget=null,T=de}else for($=0;$<v.length;$++){if(Q=v[$],de=Q.instance,Se=Q.currentTarget,Q=Q.listener,de!==T&&E.isPropagationStopped())break e;T=Q,E.currentTarget=Se;try{T(E)}catch(Pe){tu(Pe)}E.currentTarget=null,T=de}}}}function _t(a,s){var d=s[ka];d===void 0&&(d=s[ka]=new Set);var v=a+"__bubble";d.has(v)||(Z4(s,a,2,!1),d.add(v))}function W1(a,s,d){var v=0;s&&(v|=4),Z4(d,a,v,s)}var Rp="_reactListening"+Math.random().toString(36).slice(2);function K1(a){if(!a[Rp]){a[Rp]=!0,Pm.forEach(function(d){d!=="selectionchange"&&(LU.has(d)||W1(d,!1,a),W1(d,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[Rp]||(s[Rp]=!0,W1("selectionchange",!1,s))}}function Z4(a,s,d,v){switch(EA(s)){case 2:var E=oB;break;case 8:E=sB;break;default:E=cb}d=E.bind(null,s,d,a),E=void 0,!Fl||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),v?E!==void 0?a.addEventListener(s,d,{capture:!0,passive:E}):a.addEventListener(s,d,!0):E!==void 0?a.addEventListener(s,d,{passive:E}):a.addEventListener(s,d,!1)}function Z1(a,s,d,v,E){var T=v;if((s&1)===0&&(s&2)===0&&v!==null)e:for(;;){if(v===null)return;var $=v.tag;if($===3||$===4){var Q=v.stateNode.containerInfo;if(Q===E)break;if($===4)for($=v.return;$!==null;){var de=$.tag;if((de===3||de===4)&&$.stateNode.containerInfo===E)return;$=$.return}for(;Q!==null;){if($=po(Q),$===null)return;if(de=$.tag,de===5||de===6||de===26||de===27){v=T=$;continue e}Q=Q.parentNode}}v=v.return}ed(function(){var Se=T,Pe=Bl(d),Re=[];e:{var Te=Jm.get(a);if(Te!==void 0){var je=ac,Ke=a;switch(a){case"keypress":if($l(d)===0)break e;case"keydown":case"keyup":je=Um;break;case"focusin":Ke="focus",je=rd;break;case"focusout":Ke="blur",je=rd;break;case"beforeblur":case"afterblur":je=rd;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":je=Rm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":je=E0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":je=M0;break;case Jl:case Xm:case eu:je=id;break;case Ps:je=$m;break;case"scroll":case"scrollend":je=Ct;break;case"wheel":je=xo;break;case"copy":case"cut":case"paste":je=Vi;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":je=Bm;break;case"toggle":case"beforetoggle":je=ql}var st=(s&4)!==0,Kt=!st&&(a==="scroll"||a==="scrollend"),ye=st?Te!==null?Te+"Capture":null:Te;st=[];for(var ge=Se,we;ge!==null;){var Le=ge;if(we=Le.stateNode,Le=Le.tag,Le!==5&&Le!==26&&Le!==27||we===null||ye===null||(Le=yo(ge,ye),Le!=null&&st.push(zd(ge,Le,we))),Kt)break;ge=ge.return}0<st.length&&(Te=new je(Te,Ke,null,d,Pe),Re.push({event:Te,listeners:st}))}}if((s&7)===0){e:{if(Te=a==="mouseover"||a==="pointerover",je=a==="mouseout"||a==="pointerout",Te&&d!==ic&&(Ke=d.relatedTarget||d.fromElement)&&(po(Ke)||Ke[mo]))break e;if((je||Te)&&(Te=Pe.window===Pe?Pe:(Te=Pe.ownerDocument)?Te.defaultView||Te.parentWindow:window,je?(Ke=d.relatedTarget||d.toElement,je=Se,Ke=Ke?po(Ke):null,Ke!==null&&(Kt=o(Ke),st=Ke.tag,Ke!==Kt||st!==5&&st!==27&&st!==6)&&(Ke=null)):(je=null,Ke=Se),je!==Ke)){if(st=Rm,Le="onMouseLeave",ye="onMouseEnter",ge="mouse",(a==="pointerout"||a==="pointerover")&&(st=Bm,Le="onPointerLeave",ye="onPointerEnter",ge="pointer"),Kt=je==null?Te:Ia(je),we=Ke==null?Te:Ia(Ke),Te=new st(Le,ge+"leave",je,d,Pe),Te.target=Kt,Te.relatedTarget=we,Le=null,po(Pe)===Se&&(st=new st(ye,ge+"enter",Ke,d,Pe),st.target=we,st.relatedTarget=Kt,Le=st),Kt=Le,je&&Ke)t:{for(st=NU,ye=je,ge=Ke,we=0,Le=ye;Le;Le=st(Le))we++;Le=0;for(var rt=ge;rt;rt=st(rt))Le++;for(;0<we-Le;)ye=st(ye),we--;for(;0<Le-we;)ge=st(ge),Le--;for(;we--;){if(ye===ge||ge!==null&&ye===ge.alternate){st=ye;break t}ye=st(ye),ge=st(ge)}st=null}else st=null;je!==null&&X4(Re,Te,je,st,!1),Ke!==null&&Kt!==null&&X4(Re,Kt,Ke,st,!0)}}e:{if(Te=Se?Ia(Se):window,je=Te.nodeName&&Te.nodeName.toLowerCase(),je==="select"||je==="input"&&Te.type==="file")var kt=Kl;else if(Hi(Te))if(Gm)kt=D0;else{kt=R0;var Je=fa}else je=Te.nodeName,!je||je.toLowerCase()!=="input"||Te.type!=="checkbox"&&Te.type!=="radio"?Se&&Ul(Se.elementType)&&(kt=Kl):kt=Ts;if(kt&&(kt=kt(a,Se))){qm(Re,kt,d,Pe);break e}Je&&Je(a,Te,Se),a==="focusout"&&Se&&Te.type==="number"&&Se.memoizedProps.value!=null&&la(Te,"number",Te.value)}switch(Je=Se?Ia(Se):window,a){case"focusin":(Hi(Je)||Je.contentEditable==="true")&&(Va=Je,mc=Se,Ql=null);break;case"focusout":Ql=mc=Va=null;break;case"mousedown":js=!0;break;case"contextmenu":case"mouseup":case"dragend":js=!1,Km(Re,d,Pe);break;case"selectionchange":if(hc)break;case"keydown":case"keyup":Km(Re,d,Pe)}var mt;if(sc)e:{switch(a){case"compositionstart":var At="onCompositionStart";break e;case"compositionend":At="onCompositionEnd";break e;case"compositionupdate":At="onCompositionUpdate";break e}At=void 0}else Cs?Hm(a,d)&&(At="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(At="onCompositionStart");At&&(lc&&d.locale!=="ko"&&(Cs||At!=="onCompositionStart"?At==="onCompositionEnd"&&Cs&&(mt=Ba()):($i=Pe,bo="value"in $i?$i.value:$i.textContent,Cs=!0)),Je=Dp(Se,At),0<Je.length&&(At=new ad(At,a,null,d,Pe),Re.push({event:At,listeners:Je}),mt?At.data=mt:(mt=ud(d),mt!==null&&(At.data=mt)))),(mt=L0?vi(a,d):Es(a,d))&&(At=Dp(Se,"onBeforeInput"),0<At.length&&(Je=new ad("onBeforeInput","beforeinput",null,d,Pe),Re.push({event:Je,listeners:At}),Je.data=mt)),jU(Re,a,Se,d,Pe)}K4(Re,s)})}function zd(a,s,d){return{instance:a,listener:s,currentTarget:d}}function Dp(a,s){for(var d=s+"Capture",v=[];a!==null;){var E=a,T=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||T===null||(E=yo(a,d),E!=null&&v.unshift(zd(a,E,T)),E=yo(a,s),E!=null&&v.push(zd(a,E,T))),a.tag===3)return v;a=a.return}return[]}function NU(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function X4(a,s,d,v,E){for(var T=s._reactName,$=[];d!==null&&d!==v;){var Q=d,de=Q.alternate,Se=Q.stateNode;if(Q=Q.tag,de!==null&&de===v)break;Q!==5&&Q!==26&&Q!==27||Se===null||(de=Se,E?(Se=yo(d,T),Se!=null&&$.unshift(zd(d,Se,de))):E||(Se=yo(d,T),Se!=null&&$.push(zd(d,Se,de)))),d=d.return}$.length!==0&&a.push({event:s,listeners:$})}var RU=/\r\n?/g,DU=/\u0000|\uFFFD/g;function Q4(a){return(typeof a=="string"?a:""+a).replace(RU,`
`).replace(DU,"")}function J4(a,s){return s=Q4(s),Q4(a)===s}function Wt(a,s,d,v,E,T){switch(d){case"children":typeof v=="string"?s==="body"||s==="textarea"&&v===""||Fi(a,v):(typeof v=="number"||typeof v=="bigint")&&s!=="body"&&Fi(a,""+v);break;case"className":Gt(a,"class",v);break;case"tabIndex":Gt(a,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":Gt(a,d,v);break;case"style":nc(a,v,T);break;case"data":if(s!=="object"){Gt(a,"data",v);break}case"src":case"href":if(v===""&&(s!=="a"||d!=="href")){a.removeAttribute(d);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){a.removeAttribute(d);break}v=xs(""+v),a.setAttribute(d,v);break;case"action":case"formAction":if(typeof v=="function"){a.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof T=="function"&&(d==="formAction"?(s!=="input"&&Wt(a,s,"name",E.name,E,null),Wt(a,s,"formEncType",E.formEncType,E,null),Wt(a,s,"formMethod",E.formMethod,E,null),Wt(a,s,"formTarget",E.formTarget,E,null)):(Wt(a,s,"encType",E.encType,E,null),Wt(a,s,"method",E.method,E,null),Wt(a,s,"target",E.target,E,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){a.removeAttribute(d);break}v=xs(""+v),a.setAttribute(d,v);break;case"onClick":v!=null&&(a.onclick=Jr);break;case"onScroll":v!=null&&_t("scroll",a);break;case"onScrollEnd":v!=null&&_t("scrollend",a);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(d=v.__html,d!=null){if(E.children!=null)throw Error(r(60));a.innerHTML=d}}break;case"multiple":a.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":a.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){a.removeAttribute("xlink:href");break}d=xs(""+v),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?a.setAttribute(d,""+v):a.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":v&&typeof v!="function"&&typeof v!="symbol"?a.setAttribute(d,""):a.removeAttribute(d);break;case"capture":case"download":v===!0?a.setAttribute(d,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?a.setAttribute(d,v):a.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?a.setAttribute(d,v):a.removeAttribute(d);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?a.removeAttribute(d):a.setAttribute(d,v);break;case"popover":_t("beforetoggle",a),_t("toggle",a),yt(a,"popover",v);break;case"xlinkActuate":Qr(a,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":Qr(a,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":Qr(a,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":Qr(a,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":Qr(a,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":Qr(a,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":Qr(a,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":Qr(a,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":Qr(a,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":yt(a,"is",v);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=rc.get(d)||d,yt(a,d,v))}}function X1(a,s,d,v,E,T){switch(d){case"style":nc(a,v,T);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(d=v.__html,d!=null){if(E.children!=null)throw Error(r(60));a.innerHTML=d}}break;case"children":typeof v=="string"?Fi(a,v):(typeof v=="number"||typeof v=="bigint")&&Fi(a,""+v);break;case"onScroll":v!=null&&_t("scroll",a);break;case"onScrollEnd":v!=null&&_t("scrollend",a);break;case"onClick":v!=null&&(a.onclick=Jr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Lm.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(E=d.endsWith("Capture"),s=d.slice(2,E?d.length-7:void 0),T=a[dr]||null,T=T!=null?T[d]:null,typeof T=="function"&&a.removeEventListener(s,T,E),typeof v=="function")){typeof T!="function"&&T!==null&&(d in a?a[d]=null:a.hasAttribute(d)&&a.removeAttribute(d)),a.addEventListener(s,v,E);break e}d in a?a[d]=v:v===!0?a.setAttribute(d,""):yt(a,d,v)}}}function Sr(a,s,d){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_t("error",a),_t("load",a);var v=!1,E=!1,T;for(T in d)if(d.hasOwnProperty(T)){var $=d[T];if($!=null)switch(T){case"src":v=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Wt(a,s,T,$,d,null)}}E&&Wt(a,s,"srcSet",d.srcSet,d,null),v&&Wt(a,s,"src",d.src,d,null);return;case"input":_t("invalid",a);var Q=T=$=E=null,de=null,Se=null;for(v in d)if(d.hasOwnProperty(v)){var Pe=d[v];if(Pe!=null)switch(v){case"name":E=Pe;break;case"type":$=Pe;break;case"checked":de=Pe;break;case"defaultChecked":Se=Pe;break;case"value":T=Pe;break;case"defaultValue":Q=Pe;break;case"children":case"dangerouslySetInnerHTML":if(Pe!=null)throw Error(r(137,s));break;default:Wt(a,s,v,Pe,d,null)}}zl(a,T,Q,de,Se,$,E,!1);return;case"select":_t("invalid",a),v=$=T=null;for(E in d)if(d.hasOwnProperty(E)&&(Q=d[E],Q!=null))switch(E){case"value":T=Q;break;case"defaultValue":$=Q;break;case"multiple":v=Q;default:Wt(a,s,E,Q,d,null)}s=T,d=$,a.multiple=!!v,s!=null?Xt(a,!!v,s,!1):d!=null&&Xt(a,!!v,d,!0);return;case"textarea":_t("invalid",a),T=E=v=null;for($ in d)if(d.hasOwnProperty($)&&(Q=d[$],Q!=null))switch($){case"value":v=Q;break;case"defaultValue":E=Q;break;case"children":T=Q;break;case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(91));break;default:Wt(a,s,$,Q,d,null)}ys(a,v,E,T);return;case"option":for(de in d)if(d.hasOwnProperty(de)&&(v=d[de],v!=null))switch(de){case"selected":a.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:Wt(a,s,de,v,d,null)}return;case"dialog":_t("beforetoggle",a),_t("toggle",a),_t("cancel",a),_t("close",a);break;case"iframe":case"object":_t("load",a);break;case"video":case"audio":for(v=0;v<Id.length;v++)_t(Id[v],a);break;case"image":_t("error",a),_t("load",a);break;case"details":_t("toggle",a);break;case"embed":case"source":case"link":_t("error",a),_t("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Se in d)if(d.hasOwnProperty(Se)&&(v=d[Se],v!=null))switch(Se){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Wt(a,s,Se,v,d,null)}return;default:if(Ul(s)){for(Pe in d)d.hasOwnProperty(Pe)&&(v=d[Pe],v!==void 0&&X1(a,s,Pe,v,d,void 0));return}}for(Q in d)d.hasOwnProperty(Q)&&(v=d[Q],v!=null&&Wt(a,s,Q,v,d,null))}function kU(a,s,d,v){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,T=null,$=null,Q=null,de=null,Se=null,Pe=null;for(je in d){var Re=d[je];if(d.hasOwnProperty(je)&&Re!=null)switch(je){case"checked":break;case"value":break;case"defaultValue":de=Re;default:v.hasOwnProperty(je)||Wt(a,s,je,null,v,Re)}}for(var Te in v){var je=v[Te];if(Re=d[Te],v.hasOwnProperty(Te)&&(je!=null||Re!=null))switch(Te){case"type":T=je;break;case"name":E=je;break;case"checked":Se=je;break;case"defaultChecked":Pe=je;break;case"value":$=je;break;case"defaultValue":Q=je;break;case"children":case"dangerouslySetInnerHTML":if(je!=null)throw Error(r(137,s));break;default:je!==Re&&Wt(a,s,Te,je,v,Re)}}Xf(a,$,Q,de,Se,Pe,T,E);return;case"select":je=$=Q=Te=null;for(T in d)if(de=d[T],d.hasOwnProperty(T)&&de!=null)switch(T){case"value":break;case"multiple":je=de;default:v.hasOwnProperty(T)||Wt(a,s,T,null,v,de)}for(E in v)if(T=v[E],de=d[E],v.hasOwnProperty(E)&&(T!=null||de!=null))switch(E){case"value":Te=T;break;case"defaultValue":Q=T;break;case"multiple":$=T;default:T!==de&&Wt(a,s,E,T,v,de)}s=Q,d=$,v=je,Te!=null?Xt(a,!!d,Te,!1):!!v!=!!d&&(s!=null?Xt(a,!!d,s,!0):Xt(a,!!d,d?[]:"",!1));return;case"textarea":je=Te=null;for(Q in d)if(E=d[Q],d.hasOwnProperty(Q)&&E!=null&&!v.hasOwnProperty(Q))switch(Q){case"value":break;case"children":break;default:Wt(a,s,Q,null,v,E)}for($ in v)if(E=v[$],T=d[$],v.hasOwnProperty($)&&(E!=null||T!=null))switch($){case"value":Te=E;break;case"defaultValue":je=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:E!==T&&Wt(a,s,$,E,v,T)}Ua(a,Te,je);return;case"option":for(var Ke in d)if(Te=d[Ke],d.hasOwnProperty(Ke)&&Te!=null&&!v.hasOwnProperty(Ke))switch(Ke){case"selected":a.selected=!1;break;default:Wt(a,s,Ke,null,v,Te)}for(de in v)if(Te=v[de],je=d[de],v.hasOwnProperty(de)&&Te!==je&&(Te!=null||je!=null))switch(de){case"selected":a.selected=Te&&typeof Te!="function"&&typeof Te!="symbol";break;default:Wt(a,s,de,Te,v,je)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var st in d)Te=d[st],d.hasOwnProperty(st)&&Te!=null&&!v.hasOwnProperty(st)&&Wt(a,s,st,null,v,Te);for(Se in v)if(Te=v[Se],je=d[Se],v.hasOwnProperty(Se)&&Te!==je&&(Te!=null||je!=null))switch(Se){case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(r(137,s));break;default:Wt(a,s,Se,Te,v,je)}return;default:if(Ul(s)){for(var Kt in d)Te=d[Kt],d.hasOwnProperty(Kt)&&Te!==void 0&&!v.hasOwnProperty(Kt)&&X1(a,s,Kt,void 0,v,Te);for(Pe in v)Te=v[Pe],je=d[Pe],!v.hasOwnProperty(Pe)||Te===je||Te===void 0&&je===void 0||X1(a,s,Pe,Te,v,je);return}}for(var ye in d)Te=d[ye],d.hasOwnProperty(ye)&&Te!=null&&!v.hasOwnProperty(ye)&&Wt(a,s,ye,null,v,Te);for(Re in v)Te=v[Re],je=d[Re],!v.hasOwnProperty(Re)||Te===je||Te==null&&je==null||Wt(a,s,Re,Te,v,je)}function eA(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function IU(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,d=performance.getEntriesByType("resource"),v=0;v<d.length;v++){var E=d[v],T=E.transferSize,$=E.initiatorType,Q=E.duration;if(T&&Q&&eA($)){for($=0,Q=E.responseEnd,v+=1;v<d.length;v++){var de=d[v],Se=de.startTime;if(Se>Q)break;var Pe=de.transferSize,Re=de.initiatorType;Pe&&eA(Re)&&(de=de.responseEnd,$+=Pe*(de<Q?1:(Q-Se)/(de-Se)))}if(--v,s+=8*(T+$)/(E.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Q1=null,J1=null;function kp(a){return a.nodeType===9?a:a.ownerDocument}function tA(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function nA(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function eb(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var tb=null;function zU(){var a=window.event;return a&&a.type==="popstate"?a===tb?!1:(tb=a,!0):(tb=null,!1)}var rA=typeof setTimeout=="function"?setTimeout:void 0,UU=typeof clearTimeout=="function"?clearTimeout:void 0,iA=typeof Promise=="function"?Promise:void 0,BU=typeof queueMicrotask=="function"?queueMicrotask:typeof iA<"u"?function(a){return iA.resolve(null).then(a).catch(FU)}:rA;function FU(a){setTimeout(function(){throw a})}function Gs(a){return a==="head"}function aA(a,s){var d=s,v=0;do{var E=d.nextSibling;if(a.removeChild(d),E&&E.nodeType===8)if(d=E.data,d==="/$"||d==="/&"){if(v===0){a.removeChild(E),Bc(s);return}v--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")v++;else if(d==="html")Ud(a.ownerDocument.documentElement);else if(d==="head"){d=a.ownerDocument.head,Ud(d);for(var T=d.firstChild;T;){var $=T.nextSibling,Q=T.nodeName;T[Dl]||Q==="SCRIPT"||Q==="STYLE"||Q==="LINK"&&T.rel.toLowerCase()==="stylesheet"||d.removeChild(T),T=$}}else d==="body"&&Ud(a.ownerDocument.body);d=E}while(d);Bc(s)}function oA(a,s){var d=a;a=0;do{var v=d.nextSibling;if(d.nodeType===1?s?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(s?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),v&&v.nodeType===8)if(d=v.data,d==="/$"){if(a===0)break;a--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||a++;d=v}while(d)}function nb(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var d=s;switch(s=s.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":nb(d),Yf(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}a.removeChild(d)}}function $U(a,s,d,v){for(;a.nodeType===1;){var E=d;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!v&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(v){if(!a[Dl])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(T=a.getAttribute("rel"),T==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(T!==E.rel||a.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||a.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||a.getAttribute("title")!==(E.title==null?null:E.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(T=a.getAttribute("src"),(T!==(E.src==null?null:E.src)||a.getAttribute("type")!==(E.type==null?null:E.type)||a.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&T&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var T=E.name==null?null:""+E.name;if(E.type==="hidden"&&a.getAttribute("name")===T)return a}else return a;if(a=Zi(a.nextSibling),a===null)break}return null}function VU(a,s,d){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!d||(a=Zi(a.nextSibling),a===null))return null;return a}function sA(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=Zi(a.nextSibling),a===null))return null;return a}function rb(a){return a.data==="$?"||a.data==="$~"}function ib(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function HU(a,s){var d=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||d.readyState!=="loading")s();else{var v=function(){s(),d.removeEventListener("DOMContentLoaded",v)};d.addEventListener("DOMContentLoaded",v),a._reactRetry=v}}function Zi(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var ab=null;function lA(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"||d==="/&"){if(s===0)return Zi(a.nextSibling);s--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||s++}a=a.nextSibling}return null}function uA(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(s===0)return a;s--}else d!=="/$"&&d!=="/&"||s++}a=a.previousSibling}return null}function cA(a,s,d){switch(s=kp(d),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Ud(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Yf(a)}var Xi=new Map,fA=new Set;function Ip(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Do=k.d;k.d={f:qU,r:GU,D:YU,C:WU,L:KU,m:ZU,X:QU,S:XU,M:JU};function qU(){var a=Do.f(),s=Op();return a||s}function GU(a){var s=ps(a);s!==null&&s.tag===5&&s.type==="form"?OE(s):Do.r(a)}var Ic=typeof document>"u"?null:document;function dA(a,s,d){var v=Ic;if(v&&typeof s=="string"&&s){var E=rn(s);E='link[rel="'+a+'"][href="'+E+'"]',typeof d=="string"&&(E+='[crossorigin="'+d+'"]'),fA.has(E)||(fA.add(E),a={rel:a,crossOrigin:d,href:s},v.querySelector(E)===null&&(s=v.createElement("link"),Sr(s,"link",a),Vn(s),v.head.appendChild(s)))}}function YU(a){Do.D(a),dA("dns-prefetch",a,null)}function WU(a,s){Do.C(a,s),dA("preconnect",a,s)}function KU(a,s,d){Do.L(a,s,d);var v=Ic;if(v&&a&&s){var E='link[rel="preload"][as="'+rn(s)+'"]';s==="image"&&d&&d.imageSrcSet?(E+='[imagesrcset="'+rn(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(E+='[imagesizes="'+rn(d.imageSizes)+'"]')):E+='[href="'+rn(a)+'"]';var T=E;switch(s){case"style":T=zc(a);break;case"script":T=Uc(a)}Xi.has(T)||(a=y({rel:"preload",href:s==="image"&&d&&d.imageSrcSet?void 0:a,as:s},d),Xi.set(T,a),v.querySelector(E)!==null||s==="style"&&v.querySelector(Bd(T))||s==="script"&&v.querySelector(Fd(T))||(s=v.createElement("link"),Sr(s,"link",a),Vn(s),v.head.appendChild(s)))}}function ZU(a,s){Do.m(a,s);var d=Ic;if(d&&a){var v=s&&typeof s.as=="string"?s.as:"script",E='link[rel="modulepreload"][as="'+rn(v)+'"][href="'+rn(a)+'"]',T=E;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=Uc(a)}if(!Xi.has(T)&&(a=y({rel:"modulepreload",href:a},s),Xi.set(T,a),d.querySelector(E)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Fd(T)))return}v=d.createElement("link"),Sr(v,"link",a),Vn(v),d.head.appendChild(v)}}}function XU(a,s,d){Do.S(a,s,d);var v=Ic;if(v&&a){var E=gs(v).hoistableStyles,T=zc(a);s=s||"default";var $=E.get(T);if(!$){var Q={loading:0,preload:null};if($=v.querySelector(Bd(T)))Q.loading=5;else{a=y({rel:"stylesheet",href:a,"data-precedence":s},d),(d=Xi.get(T))&&ob(a,d);var de=$=v.createElement("link");Vn(de),Sr(de,"link",a),de._p=new Promise(function(Se,Pe){de.onload=Se,de.onerror=Pe}),de.addEventListener("load",function(){Q.loading|=1}),de.addEventListener("error",function(){Q.loading|=2}),Q.loading|=4,zp($,s,v)}$={type:"stylesheet",instance:$,count:1,state:Q},E.set(T,$)}}}function QU(a,s){Do.X(a,s);var d=Ic;if(d&&a){var v=gs(d).hoistableScripts,E=Uc(a),T=v.get(E);T||(T=d.querySelector(Fd(E)),T||(a=y({src:a,async:!0},s),(s=Xi.get(E))&&sb(a,s),T=d.createElement("script"),Vn(T),Sr(T,"link",a),d.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},v.set(E,T))}}function JU(a,s){Do.M(a,s);var d=Ic;if(d&&a){var v=gs(d).hoistableScripts,E=Uc(a),T=v.get(E);T||(T=d.querySelector(Fd(E)),T||(a=y({src:a,async:!0,type:"module"},s),(s=Xi.get(E))&&sb(a,s),T=d.createElement("script"),Vn(T),Sr(T,"link",a),d.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},v.set(E,T))}}function hA(a,s,d,v){var E=(E=he.current)?Ip(E):null;if(!E)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(s=zc(d.href),d=gs(E).hoistableStyles,v=d.get(s),v||(v={type:"style",instance:null,count:0,state:null},d.set(s,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){a=zc(d.href);var T=gs(E).hoistableStyles,$=T.get(a);if($||(E=E.ownerDocument||E,$={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(a,$),(T=E.querySelector(Bd(a)))&&!T._p&&($.instance=T,$.state.loading=5),Xi.has(a)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Xi.set(a,d),T||eB(E,a,d,$.state))),s&&v===null)throw Error(r(528,""));return $}if(s&&v!==null)throw Error(r(529,""));return null;case"script":return s=d.async,d=d.src,typeof d=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Uc(d),d=gs(E).hoistableScripts,v=d.get(s),v||(v={type:"script",instance:null,count:0,state:null},d.set(s,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function zc(a){return'href="'+rn(a)+'"'}function Bd(a){return'link[rel="stylesheet"]['+a+"]"}function mA(a){return y({},a,{"data-precedence":a.precedence,precedence:null})}function eB(a,s,d,v){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?v.loading=1:(s=a.createElement("link"),v.preload=s,s.addEventListener("load",function(){return v.loading|=1}),s.addEventListener("error",function(){return v.loading|=2}),Sr(s,"link",d),Vn(s),a.head.appendChild(s))}function Uc(a){return'[src="'+rn(a)+'"]'}function Fd(a){return"script[async]"+a}function pA(a,s,d){if(s.count++,s.instance===null)switch(s.type){case"style":var v=a.querySelector('style[data-href~="'+rn(d.href)+'"]');if(v)return s.instance=v,Vn(v),v;var E=y({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return v=(a.ownerDocument||a).createElement("style"),Vn(v),Sr(v,"style",E),zp(v,d.precedence,a),s.instance=v;case"stylesheet":E=zc(d.href);var T=a.querySelector(Bd(E));if(T)return s.state.loading|=4,s.instance=T,Vn(T),T;v=mA(d),(E=Xi.get(E))&&ob(v,E),T=(a.ownerDocument||a).createElement("link"),Vn(T);var $=T;return $._p=new Promise(function(Q,de){$.onload=Q,$.onerror=de}),Sr(T,"link",v),s.state.loading|=4,zp(T,d.precedence,a),s.instance=T;case"script":return T=Uc(d.src),(E=a.querySelector(Fd(T)))?(s.instance=E,Vn(E),E):(v=d,(E=Xi.get(T))&&(v=y({},d),sb(v,E)),a=a.ownerDocument||a,E=a.createElement("script"),Vn(E),Sr(E,"link",v),a.head.appendChild(E),s.instance=E);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(v=s.instance,s.state.loading|=4,zp(v,d.precedence,a));return s.instance}function zp(a,s,d){for(var v=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=v.length?v[v.length-1]:null,T=E,$=0;$<v.length;$++){var Q=v[$];if(Q.dataset.precedence===s)T=Q;else if(T!==E)break}T?T.parentNode.insertBefore(a,T.nextSibling):(s=d.nodeType===9?d.head:d,s.insertBefore(a,s.firstChild))}function ob(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function sb(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var Up=null;function gA(a,s,d){if(Up===null){var v=new Map,E=Up=new Map;E.set(d,v)}else E=Up,v=E.get(d),v||(v=new Map,E.set(d,v));if(v.has(a))return v;for(v.set(a,null),d=d.getElementsByTagName(a),E=0;E<d.length;E++){var T=d[E];if(!(T[Dl]||T[$n]||a==="link"&&T.getAttribute("rel")==="stylesheet")&&T.namespaceURI!=="http://www.w3.org/2000/svg"){var $=T.getAttribute(s)||"";$=a+$;var Q=v.get($);Q?Q.push(T):v.set($,[T])}}return v}function vA(a,s,d){a=a.ownerDocument||a,a.head.insertBefore(d,s==="title"?a.querySelector("head > title"):null)}function tB(a,s,d){if(d===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return a=s.disabled,typeof s.precedence=="string"&&a==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function yA(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function nB(a,s,d,v){if(d.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var E=zc(v.href),T=s.querySelector(Bd(E));if(T){s=T._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Bp.bind(a),s.then(a,a)),d.state.loading|=4,d.instance=T,Vn(T);return}T=s.ownerDocument||s,v=mA(v),(E=Xi.get(E))&&ob(v,E),T=T.createElement("link"),Vn(T);var $=T;$._p=new Promise(function(Q,de){$.onload=Q,$.onerror=de}),Sr(T,"link",v),d.instance=T}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(d,s),(s=d.state.preload)&&(d.state.loading&3)===0&&(a.count++,d=Bp.bind(a),s.addEventListener("load",d),s.addEventListener("error",d))}}var lb=0;function rB(a,s){return a.stylesheets&&a.count===0&&$p(a,a.stylesheets),0<a.count||0<a.imgCount?function(d){var v=setTimeout(function(){if(a.stylesheets&&$p(a,a.stylesheets),a.unsuspend){var T=a.unsuspend;a.unsuspend=null,T()}},6e4+s);0<a.imgBytes&&lb===0&&(lb=62500*IU());var E=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&$p(a,a.stylesheets),a.unsuspend)){var T=a.unsuspend;a.unsuspend=null,T()}},(a.imgBytes>lb?50:800)+s);return a.unsuspend=d,function(){a.unsuspend=null,clearTimeout(v),clearTimeout(E)}}:null}function Bp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$p(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Fp=null;function $p(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Fp=new Map,s.forEach(iB,a),Fp=null,Bp.call(a))}function iB(a,s){if(!(s.state.loading&4)){var d=Fp.get(a);if(d)var v=d.get(null);else{d=new Map,Fp.set(a,d);for(var E=a.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T<E.length;T++){var $=E[T];($.nodeName==="LINK"||$.getAttribute("media")!=="not all")&&(d.set($.dataset.precedence,$),v=$)}v&&d.set(null,v)}E=s.instance,$=E.getAttribute("data-precedence"),T=d.get($)||v,T===v&&d.set(null,E),d.set($,E),this.count++,v=Bp.bind(this),E.addEventListener("load",v),E.addEventListener("error",v),T?T.parentNode.insertBefore(E,T.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(E,a.firstChild)),s.state.loading|=4}}var $d={$$typeof:N,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function aB(a,s,d,v,E,T,$,Q,de){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Qn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qn(0),this.hiddenUpdates=Qn(null),this.identifierPrefix=v,this.onUncaughtError=E,this.onCaughtError=T,this.onRecoverableError=$,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=de,this.incompleteTransitions=new Map}function bA(a,s,d,v,E,T,$,Q,de,Se,Pe,Re){return a=new aB(a,s,d,$,de,Se,Pe,Re,Q),s=1,T===!0&&(s|=24),T=Pr(3,null,null,s),a.current=T,T.stateNode=a,s=F0(),s.refCount++,a.pooledCache=s,s.refCount++,T.memoizedState={element:v,isDehydrated:d,cache:s},q0(T),a}function xA(a){return a?(a=_o,a):_o}function _A(a,s,d,v,E,T){E=xA(E),v.context===null?v.context=E:v.pendingContext=E,v=Ds(s),v.payload={element:d},T=T===void 0?null:T,T!==null&&(v.callback=T),d=ks(a,v,s),d!==null&&(li(d,a,s),xd(d,a,s))}function wA(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<s?d:s}}function ub(a,s){wA(a,s),(a=a.alternate)&&wA(a,s)}function SA(a){if(a.tag===13||a.tag===31){var s=Yi(a,67108864);s!==null&&li(s,a,67108864),ub(a,67108864)}}function CA(a){if(a.tag===13||a.tag===31){var s=wi();s=Dn(s);var d=Yi(a,s);d!==null&&li(d,a,s),ub(a,s)}}var Vp=!0;function oB(a,s,d,v){var E=Y.T;Y.T=null;var T=k.p;try{k.p=2,cb(a,s,d,v)}finally{k.p=T,Y.T=E}}function sB(a,s,d,v){var E=Y.T;Y.T=null;var T=k.p;try{k.p=8,cb(a,s,d,v)}finally{k.p=T,Y.T=E}}function cb(a,s,d,v){if(Vp){var E=fb(v);if(E===null)Z1(a,s,v,Hp,d),AA(a,v);else if(uB(E,a,s,d,v))v.stopPropagation();else if(AA(a,v),s&4&&-1<lB.indexOf(a)){for(;E!==null;){var T=ps(E);if(T!==null)switch(T.tag){case 3:if(T=T.stateNode,T.current.memoizedState.isDehydrated){var $=Bi(T.pendingLanes);if($!==0){var Q=T;for(Q.pendingLanes|=2,Q.entangledLanes|=2;$;){var de=1<<31-vt($);Q.entanglements[1]|=de,$&=~de}Xa(T),(Ut&6)===0&&(Ap=Ge()+500,kd(0))}}break;case 31:case 13:Q=Yi(T,2),Q!==null&&li(Q,T,2),Op(),ub(T,2)}if(T=fb(v),T===null&&Z1(a,s,v,Hp,d),T===E)break;E=T}E!==null&&v.stopPropagation()}else Z1(a,s,v,null,d)}}function fb(a){return a=Bl(a),db(a)}var Hp=null;function db(a){if(Hp=null,a=po(a),a!==null){var s=o(a);if(s===null)a=null;else{var d=s.tag;if(d===13){if(a=l(s),a!==null)return a;a=null}else if(d===31){if(a=c(s),a!==null)return a;a=null}else if(d===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return Hp=a,null}function EA(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Qe()){case We:return 2;case ze:return 8;case nt:case Pt:return 32;case at:return 268435456;default:return 32}default:return 32}}var hb=!1,Ys=null,Ws=null,Ks=null,Vd=new Map,Hd=new Map,Zs=[],lB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function AA(a,s){switch(a){case"focusin":case"focusout":Ys=null;break;case"dragenter":case"dragleave":Ws=null;break;case"mouseover":case"mouseout":Ks=null;break;case"pointerover":case"pointerout":Vd.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hd.delete(s.pointerId)}}function qd(a,s,d,v,E,T){return a===null||a.nativeEvent!==T?(a={blockedOn:s,domEventName:d,eventSystemFlags:v,nativeEvent:T,targetContainers:[E]},s!==null&&(s=ps(s),s!==null&&SA(s)),a):(a.eventSystemFlags|=v,s=a.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),a)}function uB(a,s,d,v,E){switch(s){case"focusin":return Ys=qd(Ys,a,s,d,v,E),!0;case"dragenter":return Ws=qd(Ws,a,s,d,v,E),!0;case"mouseover":return Ks=qd(Ks,a,s,d,v,E),!0;case"pointerover":var T=E.pointerId;return Vd.set(T,qd(Vd.get(T)||null,a,s,d,v,E)),!0;case"gotpointercapture":return T=E.pointerId,Hd.set(T,qd(Hd.get(T)||null,a,s,d,v,E)),!0}return!1}function TA(a){var s=po(a.target);if(s!==null){var d=o(s);if(d!==null){if(s=d.tag,s===13){if(s=l(d),s!==null){a.blockedOn=s,Gf(a.priority,function(){CA(d)});return}}else if(s===31){if(s=c(d),s!==null){a.blockedOn=s,Gf(a.priority,function(){CA(d)});return}}else if(s===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function qp(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var d=fb(a.nativeEvent);if(d===null){d=a.nativeEvent;var v=new d.constructor(d.type,d);ic=v,d.target.dispatchEvent(v),ic=null}else return s=ps(d),s!==null&&SA(s),a.blockedOn=d,!1;s.shift()}return!0}function OA(a,s,d){qp(a)&&d.delete(s)}function cB(){hb=!1,Ys!==null&&qp(Ys)&&(Ys=null),Ws!==null&&qp(Ws)&&(Ws=null),Ks!==null&&qp(Ks)&&(Ks=null),Vd.forEach(OA),Hd.forEach(OA)}function Gp(a,s){a.blockedOn===s&&(a.blockedOn=null,hb||(hb=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,cB)))}var Yp=null;function jA(a){Yp!==a&&(Yp=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Yp===a&&(Yp=null);for(var s=0;s<a.length;s+=3){var d=a[s],v=a[s+1],E=a[s+2];if(typeof v!="function"){if(db(v||d)===null)continue;break}var T=ps(d);T!==null&&(a.splice(s,3),s-=3,f1(T,{pending:!0,data:E,method:d.method,action:v},v,E))}}))}function Bc(a){function s(de){return Gp(de,a)}Ys!==null&&Gp(Ys,a),Ws!==null&&Gp(Ws,a),Ks!==null&&Gp(Ks,a),Vd.forEach(s),Hd.forEach(s);for(var d=0;d<Zs.length;d++){var v=Zs[d];v.blockedOn===a&&(v.blockedOn=null)}for(;0<Zs.length&&(d=Zs[0],d.blockedOn===null);)TA(d),d.blockedOn===null&&Zs.shift();if(d=(a.ownerDocument||a).$$reactFormReplay,d!=null)for(v=0;v<d.length;v+=3){var E=d[v],T=d[v+1],$=E[dr]||null;if(typeof T=="function")$||jA(d);else if($){var Q=null;if(T&&T.hasAttribute("formAction")){if(E=T,$=T[dr]||null)Q=$.formAction;else if(db(E)!==null)continue}else Q=$.action;typeof Q=="function"?d[v+1]=Q:(d.splice(v,3),v-=3),jA(d)}}}function MA(){function a(T){T.canIntercept&&T.info==="react-transition"&&T.intercept({handler:function(){return new Promise(function($){return E=$})},focusReset:"manual",scroll:"manual"})}function s(){E!==null&&(E(),E=null),v||setTimeout(d,20)}function d(){if(!v&&!navigation.transition){var T=navigation.currentEntry;T&&T.url!=null&&navigation.navigate(T.url,{state:T.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,E=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(d,100),function(){v=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),E!==null&&(E(),E=null)}}}function mb(a){this._internalRoot=a}Wp.prototype.render=mb.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var d=s.current,v=wi();_A(d,v,a,s,null,null)},Wp.prototype.unmount=mb.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;_A(a.current,2,null,a,null,null),Op(),s[mo]=null}};function Wp(a){this._internalRoot=a}Wp.prototype.unstable_scheduleHydration=function(a){if(a){var s=qf();a={blockedOn:null,target:a,priority:s};for(var d=0;d<Zs.length&&s!==0&&s<Zs[d].priority;d++);Zs.splice(d,0,a),d===0&&TA(a)}};var PA=t.version;if(PA!=="19.2.0")throw Error(r(527,PA,"19.2.0"));k.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(s),a=a!==null?m(a):null,a=a===null?null:a.stateNode,a};var fB={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kp.isDisabled&&Kp.supportsFiber)try{gt=Kp.inject(fB),$t=Kp}catch{}}return Yd.createRoot=function(a,s){if(!i(a))throw Error(r(299));var d=!1,v="",E=zE,T=UE,$=BE;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(v=s.identifierPrefix),s.onUncaughtError!==void 0&&(E=s.onUncaughtError),s.onCaughtError!==void 0&&(T=s.onCaughtError),s.onRecoverableError!==void 0&&($=s.onRecoverableError)),s=bA(a,1,!1,null,null,d,v,null,E,T,$,MA),a[mo]=s.current,K1(a),new mb(s)},Yd.hydrateRoot=function(a,s,d){if(!i(a))throw Error(r(299));var v=!1,E="",T=zE,$=UE,Q=BE,de=null;return d!=null&&(d.unstable_strictMode===!0&&(v=!0),d.identifierPrefix!==void 0&&(E=d.identifierPrefix),d.onUncaughtError!==void 0&&(T=d.onUncaughtError),d.onCaughtError!==void 0&&($=d.onCaughtError),d.onRecoverableError!==void 0&&(Q=d.onRecoverableError),d.formState!==void 0&&(de=d.formState)),s=bA(a,1,!0,s,d??null,v,E,de,T,$,Q,MA),s.context=xA(null),d=s.current,v=wi(),v=Dn(v),E=Ds(v),E.callback=null,ks(d,E,v),d=v,s.current.lanes=d,xn(s,d),Xa(s),a[mo]=s.current,K1(a),new Wp(s)},Yd.version="19.2.0",Yd}var FA;function _B(){if(FA)return gb.exports;FA=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),gb.exports=xB(),gb.exports}var wB=_B(),_=_f();const lf=aa(_),lw=hB({__proto__:null,default:lf},[_]);var _b={exports:{}},wb={};var $A;function SB(){if($A)return wb;$A=1;var e=_f();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return wb.useSyncExternalStoreWithSelector=function(f,h,m,y,x){var b=i(null);if(b.current===null){var C={hasValue:!1,value:null};b.current=C}else C=b.current;b=l(function(){function A(U){if(!O){if(O=!0,P=U,U=y(U),x!==void 0&&C.hasValue){var W=C.value;if(x(W,U))return N=W}return N=U}if(W=N,n(P,U))return W;var X=y(U);return x!==void 0&&x(W,X)?(P=U,W):(P=U,N=X)}var O=!1,P,N,F=m===void 0?null:m;return[function(){return A(h())},F===null?void 0:function(){return A(F())}]},[h,m,y,x]);var w=r(f,b[0],b[1]);return o(function(){C.hasValue=!0,C.value=w},[w]),c(w),w},wb}var VA;function CB(){return VA||(VA=1,_b.exports=SB()),_b.exports}CB();var EB=_.version.startsWith("19"),AB=Symbol.for(EB?"react.transitional.element":"react.element"),TB=Symbol.for("react.portal"),OB=Symbol.for("react.fragment"),jB=Symbol.for("react.strict_mode"),MB=Symbol.for("react.profiler"),PB=Symbol.for("react.consumer"),LB=Symbol.for("react.context"),UL=Symbol.for("react.forward_ref"),NB=Symbol.for("react.suspense"),RB=Symbol.for("react.suspense_list"),uw=Symbol.for("react.memo"),DB=Symbol.for("react.lazy"),kB=UL,IB=uw;function zB(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case AB:switch(e=e.type,e){case OB:case MB:case jB:case NB:case RB:return e;default:switch(e=e&&e.$$typeof,e){case LB:case UL:case DB:case uw:return e;case PB:return e;default:return t}}case TB:return t}}}function UB(e){return zB(e)===uw}function BB(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:l}){let c=!1,f,h,m,y,x;function b(P,N){return f=P,h=N,m=e(f,h),y=t(r,h),x=n(m,y,h),c=!0,x}function C(){return m=e(f,h),t.dependsOnOwnProps&&(y=t(r,h)),x=n(m,y,h),x}function w(){return e.dependsOnOwnProps&&(m=e(f,h)),t.dependsOnOwnProps&&(y=t(r,h)),x=n(m,y,h),x}function A(){const P=e(f,h),N=!l(P,m);return m=P,N&&(x=n(m,y,h)),x}function O(P,N){const F=!o(N,h),U=!i(P,f,N,h);return f=P,h=N,F&&U?C():F?w():U?A():x}return function(N,F){return c?O(N,F):b(N,F)}}function FB(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...i}){const o=t(e,i),l=n(e,i),c=r(e,i);return BB(o,l,c,e,i)}function $B(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...o)=>t(i(...o)))}return n}function P2(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function HA(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function BL(e,t){return function(r,{displayName:i}){const o=function(c,f){return o.dependsOnOwnProps?o.mapToProps(c,f):o.mapToProps(c,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(c,f){o.mapToProps=e,o.dependsOnOwnProps=HA(e);let h=o(c,f);return typeof h=="function"&&(o.mapToProps=h,o.dependsOnOwnProps=HA(h),h=o(c,f)),h},o}}function cw(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function VB(e){return e&&typeof e=="object"?P2(t=>$B(e,t)):e?typeof e=="function"?BL(e):cw(e,"mapDispatchToProps"):P2(t=>({dispatch:t}))}function HB(e){return e?typeof e=="function"?BL(e):cw(e,"mapStateToProps"):P2(()=>({}))}function qB(e,t,n){return{...n,...e,...t}}function GB(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,l;return function(f,h,m){const y=e(f,h,m);return o?i(y,l)||(l=y):(o=!0,l=y),l}}}function YB(e){return e?typeof e=="function"?GB(e):cw(e,"mergeProps"):()=>qB}function WB(e){e()}function KB(){let e=null,t=null;return{clear(){e=null,t=null},notify(){WB(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var qA={notify(){},get:()=>[]};function FL(e,t){let n,r=qA,i=0,o=!1;function l(w){m();const A=r.subscribe(w);let O=!1;return()=>{O||(O=!0,A(),y())}}function c(){r.notify()}function f(){C.onStateChange&&C.onStateChange()}function h(){return o}function m(){i++,n||(n=t?t.addNestedSub(f):e.subscribe(f),r=KB())}function y(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=qA)}function x(){o||(o=!0,m())}function b(){o&&(o=!1,y())}const C={addNestedSub:l,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:x,tryUnsubscribe:b,getListeners:()=>r};return C}var ZB=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",XB=ZB(),QB=()=>typeof navigator<"u"&&navigator.product==="ReactNative",JB=QB(),eF=()=>XB||JB?_.useLayoutEffect:_.useEffect,$g=eF();function GA(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Sb(e,t){if(GA(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!GA(e[n[i]],t[n[i]]))return!1;return!0}var tF={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},nF={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},rF={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},$L={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},iF={[kB]:rF,[IB]:$L};function YA(e){return UB(e)?$L:iF[e.$$typeof]||tF}var aF=Object.defineProperty,oF=Object.getOwnPropertyNames,WA=Object.getOwnPropertySymbols,sF=Object.getOwnPropertyDescriptor,lF=Object.getPrototypeOf,KA=Object.prototype;function L2(e,t){if(typeof t!="string"){if(KA){const o=lF(t);o&&o!==KA&&L2(e,o)}let n=oF(t);WA&&(n=n.concat(WA(t)));const r=YA(e),i=YA(t);for(let o=0;o<n.length;++o){const l=n[o];if(!nF[l]&&!(i&&i[l])&&!(r&&r[l])){const c=sF(t,l);try{aF(e,l,c)}catch{}}}}return e}var uF=Symbol.for("react-redux-context"),cF=typeof globalThis<"u"?globalThis:{};function fF(){if(!_.createContext)return{};const e=cF[uF]??=new Map;let t=e.get(_.createContext);return t||(t=_.createContext(null),e.set(_.createContext,t)),t}var VL=fF(),dF=[null,null];function hF(e,t,n){$g(()=>e(...t),n)}function mF(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function pF(e,t,n,r,i,o,l,c,f,h,m){if(!e)return()=>{};let y=!1,x=null;const b=()=>{if(y||!c.current)return;const w=t.getState();let A,O;try{A=r(w,i.current)}catch(P){O=P,x=P}O||(x=null),A===o.current?l.current||h():(o.current=A,f.current=A,l.current=!0,m())};return n.onStateChange=b,n.trySubscribe(),b(),()=>{if(y=!0,n.tryUnsubscribe(),n.onStateChange=null,x)throw x}}function gF(e,t){return e===t}function vF(e,t,n,{pure:r,areStatesEqual:i=gF,areOwnPropsEqual:o=Sb,areStatePropsEqual:l=Sb,areMergedPropsEqual:c=Sb,forwardRef:f=!1,context:h=VL}={}){const m=h,y=HB(e),x=VB(t),b=YB(n),C=!!e;return A=>{const O=A.displayName||A.name||"Component",P=`Connect(${O})`,N={shouldHandleStateChanges:C,displayName:P,wrappedComponentName:O,WrappedComponent:A,initMapStateToProps:y,initMapDispatchToProps:x,initMergeProps:b,areStatesEqual:i,areStatePropsEqual:l,areOwnPropsEqual:o,areMergedPropsEqual:c};function F(X){const[ae,ce,re]=_.useMemo(()=>{const{reactReduxForwardedRef:V,...Z}=X;return[X.context,V,Z]},[X]),J=_.useMemo(()=>{let V=m;return ae?.Consumer,V},[ae,m]),oe=_.useContext(J),_e=!!X.store&&!!X.store.getState&&!!X.store.dispatch,se=!!oe&&!!oe.store,ue=_e?X.store:oe.store,Y=se?oe.getServerState:ue.getState,k=_.useMemo(()=>FB(ue.dispatch,N),[ue]),[z,H]=_.useMemo(()=>{if(!C)return dF;const V=FL(ue,_e?void 0:oe.subscription),Z=V.notifyNestedSubs.bind(V);return[V,Z]},[ue,_e,oe]),I=_.useMemo(()=>_e?oe:{...oe,subscription:z},[_e,oe,z]),j=_.useRef(void 0),q=_.useRef(re),ee=_.useRef(void 0),le=_.useRef(!1),pe=_.useRef(!1),he=_.useRef(void 0);$g(()=>(pe.current=!0,()=>{pe.current=!1}),[]);const ve=_.useMemo(()=>()=>ee.current&&re===q.current?ee.current:k(ue.getState(),re),[ue,re]),D=_.useMemo(()=>Z=>z?pF(C,ue,z,k,q,j,le,pe,ee,H,Z):()=>{},[z]);hF(mF,[q,j,le,re,ee,H]);let R;try{R=_.useSyncExternalStore(D,ve,Y?()=>k(Y(),re):ve)}catch(V){throw he.current&&(V.message+=`
The error may be correlated with this previous error:
${he.current.stack}
`),V}$g(()=>{he.current=void 0,ee.current=void 0,j.current=R});const G=_.useMemo(()=>_.createElement(A,{...R,ref:ce}),[ce,A,R]);return _.useMemo(()=>C?_.createElement(J.Provider,{value:I},G):G,[J,G,I])}const W=_.memo(F);if(W.WrappedComponent=A,W.displayName=F.displayName=P,f){const ae=_.forwardRef(function(re,J){return _.createElement(W,{...re,reactReduxForwardedRef:J})});return ae.displayName=P,ae.WrappedComponent=A,L2(ae,A)}return L2(W,A)}}var HL=vF;function yF(e){const{children:t,context:n,serverState:r,store:i}=e,o=_.useMemo(()=>{const f=FL(i);return{store:i,subscription:f,getServerState:r?()=>r:void 0}},[i,r]),l=_.useMemo(()=>i.getState(),[i]);$g(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),l!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,l]);const c=n||VL;return _.createElement(c.Provider,{value:o},t)}var fw=yF;var ZA="popstate";function bF(e={}){function t(r,i){let{pathname:o,search:l,hash:c}=r.location;return N2("",{pathname:o,search:l,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Ch(i)}return _F(t,n,null,e)}function vn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wa(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xF(){return Math.random().toString(36).substring(2,10)}function XA(e,t){return{usr:e.state,key:e.key,idx:t}}function N2(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?wf(t):t,state:n,key:t&&t.key||r||xF()}}function Ch({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function wf(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function _F(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,c="POP",f=null,h=m();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function m(){return(l.state||{idx:null}).idx}function y(){c="POP";let A=m(),O=A==null?null:A-h;h=A,f&&f({action:c,location:w.location,delta:O})}function x(A,O){c="PUSH";let P=N2(w.location,A,O);h=m()+1;let N=XA(P,h),F=w.createHref(P);try{l.pushState(N,"",F)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;i.location.assign(F)}o&&f&&f({action:c,location:w.location,delta:1})}function b(A,O){c="REPLACE";let P=N2(w.location,A,O);h=m();let N=XA(P,h),F=w.createHref(P);l.replaceState(N,"",F),o&&f&&f({action:c,location:w.location,delta:0})}function C(A){return wF(A)}let w={get action(){return c},get location(){return e(i,l)},listen(A){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(ZA,y),f=A,()=>{i.removeEventListener(ZA,y),f=null}},createHref(A){return t(i,A)},createURL:C,encodeLocation(A){let O=C(A);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:x,replace:b,go(A){return l.go(A)}};return w}function wF(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),vn(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Ch(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function qL(e,t,n="/"){return SF(e,t,n,!1)}function SF(e,t,n,r){let i=typeof t=="string"?wf(t):t,o=qo(i.pathname||"/",n);if(o==null)return null;let l=GL(e);CF(l);let c=null;for(let f=0;c==null&&f<l.length;++f){let h=DF(o);c=NF(l[f],h,r)}return c}function GL(e,t=[],n=[],r="",i=!1){let o=(l,c,f=i,h)=>{let m={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&f)return;vn(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let y=$o([r,m.relativePath]),x=n.concat(m);l.children&&l.children.length>0&&(vn(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),GL(l.children,t,x,y,f)),!(l.path==null&&!l.index)&&t.push({path:y,score:PF(y,l.index),routesMeta:x})};return e.forEach((l,c)=>{if(l.path===""||!l.path?.includes("?"))o(l,c);else for(let f of YL(l.path))o(l,c,!0,f)}),t}function YL(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 l=YL(r.join("/")),c=[];return c.push(...l.map(f=>f===""?o:[o,f].join("/"))),i&&c.push(...l),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function CF(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:LF(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var EF=/^:[\w-]+$/,AF=3,TF=2,OF=1,jF=10,MF=-2,QA=e=>e==="*";function PF(e,t){let n=e.split("/"),r=n.length;return n.some(QA)&&(r+=MF),t&&(r+=TF),n.filter(i=>!QA(i)).reduce((i,o)=>i+(EF.test(o)?AF:o===""?OF:jF),r)}function LF(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 NF(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",l=[];for(let c=0;c<r.length;++c){let f=r[c],h=c===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",y=Vg({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},m),x=f.route;if(!y&&h&&n&&!r[r.length-1].route.index&&(y=Vg({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!y)return null;Object.assign(i,y.params),l.push({params:i,pathname:$o([o,y.pathname]),pathnameBase:UF($o([o,y.pathnameBase])),route:x}),y.pathnameBase!=="/"&&(o=$o([o,y.pathnameBase]))}return l}function Vg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=RF(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],l=o.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:r.reduce((h,{paramName:m,isOptional:y},x)=>{if(m==="*"){let C=c[x]||"";l=o.slice(0,o.length-C.length).replace(/(.)\/+$/,"$1")}const b=c[x];return y&&!b?h[m]=void 0:h[m]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:l,pattern:e}}function RF(e,t=!1,n=!0){wa(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,(l,c,f)=>(r.push({paramName:c,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function DF(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wa(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function qo(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 kF(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?wf(e):e;return{pathname:n?n.startsWith("/")?n:IF(n,t):t,search:BF(r),hash:FF(i)}}function IF(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 Cb(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 <Link to="..."> and the router will parse it for you.`}function zF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function dw(e){let t=zF(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function hw(e,t,n,r=!1){let i;typeof e=="string"?i=wf(e):(i={...e},vn(!i.pathname||!i.pathname.includes("?"),Cb("?","pathname","search",i)),vn(!i.pathname||!i.pathname.includes("#"),Cb("#","pathname","hash",i)),vn(!i.search||!i.search.includes("#"),Cb("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,c;if(l==null)c=n;else{let y=t.length-1;if(!r&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),y-=1;i.pathname=x.join("/")}c=y>=0?t[y]:"/"}let f=kF(i,c),h=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||m)&&(f.pathname+="/"),f}var $o=e=>e.join("/").replace(/\/\/+/g,"/"),UF=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),BF=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,FF=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $F(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var WL=["POST","PUT","PATCH","DELETE"];new Set(WL);var VF=["GET",...WL];new Set(VF);var Sf=_.createContext(null);Sf.displayName="DataRouter";var ay=_.createContext(null);ay.displayName="DataRouterState";_.createContext(!1);var KL=_.createContext({isTransitioning:!1});KL.displayName="ViewTransition";var HF=_.createContext(new Map);HF.displayName="Fetchers";var qF=_.createContext(null);qF.displayName="Await";var Ta=_.createContext(null);Ta.displayName="Navigation";var Gh=_.createContext(null);Gh.displayName="Location";var Oa=_.createContext({outlet:null,matches:[],isDataRoute:!1});Oa.displayName="Route";var mw=_.createContext(null);mw.displayName="RouteError";function GF(e,{relative:t}={}){vn(Wu(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=_.useContext(Ta),{hash:i,pathname:o,search:l}=Yh(e,{relative:t}),c=o;return n!=="/"&&(c=o==="/"?n:$o([n,o])),r.createHref({pathname:c,search:l,hash:i})}function Wu(){return _.useContext(Gh)!=null}function Or(){return vn(Wu(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(Gh).location}var ZL="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function XL(e){_.useContext(Ta).static||_.useLayoutEffect(e)}function uo(){let{isDataRoute:e}=_.useContext(Oa);return e?a$():YF()}function YF(){vn(Wu(),"useNavigate() may be used only in the context of a <Router> component.");let e=_.useContext(Sf),{basename:t,navigator:n}=_.useContext(Ta),{matches:r}=_.useContext(Oa),{pathname:i}=Or(),o=JSON.stringify(dw(r)),l=_.useRef(!1);return XL(()=>{l.current=!0}),_.useCallback((f,h={})=>{if(wa(l.current,ZL),!l.current)return;if(typeof f=="number"){n.go(f);return}let m=hw(f,JSON.parse(o),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:$o([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,o,i,e])}_.createContext(null);function Cf(){let{matches:e}=_.useContext(Oa),t=e[e.length-1];return t?t.params:{}}function Yh(e,{relative:t}={}){let{matches:n}=_.useContext(Oa),{pathname:r}=Or(),i=JSON.stringify(dw(n));return _.useMemo(()=>hw(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function WF(e,t){return QL(e,t)}function QL(e,t,n,r,i){vn(Wu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=_.useContext(Ta),{matches:l}=_.useContext(Oa),c=l[l.length-1],f=c?c.params:{},h=c?c.pathname:"/",m=c?c.pathnameBase:"/",y=c&&c.route;{let P=y&&y.path||"";JL(h,!y||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${P}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let x=Or(),b;if(t){let P=typeof t=="string"?wf(t):t;vn(m==="/"||P.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${P.pathname}" was given in the \`location\` prop.`),b=P}else b=x;let C=b.pathname||"/",w=C;if(m!=="/"){let P=m.replace(/^\//,"").split("/");w="/"+C.replace(/^\//,"").split("/").slice(P.length).join("/")}let A=qL(e,{pathname:w});wa(y||A!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),wa(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let O=JF(A&&A.map(P=>Object.assign({},P,{params:Object.assign({},f,P.params),pathname:$o([m,o.encodeLocation?o.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?m:$o([m,o.encodeLocation?o.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),l,n,r,i);return t&&O?_.createElement(Gh.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},O):O}function KF(){let e=i$(),t=$F(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:o},"ErrorBoundary")," or"," ",_.createElement("code",{style:o},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:i},n):null,l)}var ZF=_.createElement(KF,null),XF=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?_.createElement(Oa.Provider,{value:this.props.routeContext},_.createElement(mw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function QF({routeContext:e,match:t,children:n}){let r=_.useContext(Sf);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(Oa.Provider,{value:e},n)}function JF(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=n?.errors;if(l!=null){let h=o.findIndex(m=>m.route.id&&l?.[m.route.id]!==void 0);vn(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,h+1))}let c=!1,f=-1;if(n)for(let h=0;h<o.length;h++){let m=o[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=h),m.route.id){let{loaderData:y,errors:x}=n,b=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!x||x[m.route.id]===void 0);if(m.route.lazy||b){c=!0,f>=0?o=o.slice(0,f+1):o=[o[0]];break}}}return o.reduceRight((h,m,y)=>{let x,b=!1,C=null,w=null;n&&(x=l&&m.route.id?l[m.route.id]:void 0,C=m.route.errorElement||ZF,c&&(f<0&&y===0?(JL("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,w=null):f===y&&(b=!0,w=m.route.hydrateFallbackElement||null)));let A=t.concat(o.slice(0,y+1)),O=()=>{let P;return x?P=C:b?P=w:m.route.Component?P=_.createElement(m.route.Component,null):m.route.element?P=m.route.element:P=h,_.createElement(QF,{match:m,routeContext:{outlet:h,matches:A,isDataRoute:n!=null},children:P})};return n&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?_.createElement(XF,{location:n.location,revalidation:n.revalidation,component:C,error:x,children:O(),routeContext:{outlet:null,matches:A,isDataRoute:!0},unstable_onError:r}):O()},null)}function pw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function e$(e){let t=_.useContext(Sf);return vn(t,pw(e)),t}function t$(e){let t=_.useContext(ay);return vn(t,pw(e)),t}function n$(e){let t=_.useContext(Oa);return vn(t,pw(e)),t}function gw(e){let t=n$(e),n=t.matches[t.matches.length-1];return vn(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function r$(){return gw("useRouteId")}function i$(){let e=_.useContext(mw),t=t$("useRouteError"),n=gw("useRouteError");return e!==void 0?e:t.errors?.[n]}function a$(){let{router:e}=e$("useNavigate"),t=gw("useNavigate"),n=_.useRef(!1);return XL(()=>{n.current=!0}),_.useCallback(async(i,o={})=>{wa(n.current,ZL),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var JA={};function JL(e,t,n){!t&&!JA[e]&&(JA[e]=!0,wa(!1,n))}_.memo(o$);function o$({routes:e,future:t,state:n,unstable_onError:r}){return QL(e,void 0,n,r,t)}function vw({to:e,replace:t,state:n,relative:r}){vn(Wu(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=_.useContext(Ta);wa(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=_.useContext(Oa),{pathname:l}=Or(),c=uo(),f=hw(e,dw(o),l,r==="path"),h=JSON.stringify(f);return _.useEffect(()=>{c(JSON.parse(h),{replace:t,state:n,relative:r})},[c,h,r,t,n]),null}function ft(e){vn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function s$({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1}){vn(!Wu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=_.useMemo(()=>({basename:l,navigator:i,static:o,future:{}}),[l,i,o]);typeof n=="string"&&(n=wf(n));let{pathname:f="/",search:h="",hash:m="",state:y=null,key:x="default"}=n,b=_.useMemo(()=>{let C=qo(f,l);return C==null?null:{location:{pathname:C,search:h,hash:m,state:y,key:x},navigationType:r}},[l,f,h,m,y,x,r]);return wa(b!=null,`<Router basename="${l}"> is not able to match the URL "${f}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:_.createElement(Ta.Provider,{value:c},_.createElement(Gh.Provider,{children:t,value:b}))}function oy({children:e,location:t}){return WF(R2(e),t)}function R2(e,t=[]){let n=[];return _.Children.forEach(e,(r,i)=>{if(!_.isValidElement(r))return;let o=[...t,i];if(r.type===_.Fragment){n.push.apply(n,R2(r.props.children,o));return}vn(r.type===ft,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),vn(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={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,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=R2(r.props.children,o)),n.push(l)}),n}var Og="get",jg="application/x-www-form-urlencoded";function sy(e){return e!=null&&typeof e.tagName=="string"}function l$(e){return sy(e)&&e.tagName.toLowerCase()==="button"}function u$(e){return sy(e)&&e.tagName.toLowerCase()==="form"}function c$(e){return sy(e)&&e.tagName.toLowerCase()==="input"}function f$(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function d$(e,t){return e.button===0&&(!t||t==="_self")&&!f$(e)}var Zp=null;function h$(){if(Zp===null)try{new FormData(document.createElement("form"),0),Zp=!1}catch{Zp=!0}return Zp}var m$=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Eb(e){return e!=null&&!m$.has(e)?(wa(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${jg}"`),null):e}function p$(e,t){let n,r,i,o,l;if(u$(e)){let c=e.getAttribute("action");r=c?qo(c,t):null,n=e.getAttribute("method")||Og,i=Eb(e.getAttribute("enctype"))||jg,o=new FormData(e)}else if(l$(e)||c$(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(r=f?qo(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Og,i=Eb(e.getAttribute("formenctype"))||Eb(c.getAttribute("enctype"))||jg,o=new FormData(c,e),!h$()){let{name:h,type:m,value:y}=e;if(m==="image"){let x=h?`${h}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else h&&o.append(h,y)}}else{if(sy(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Og,r=null,i=jg,l=e}return o&&i==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function yw(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function g$(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&qo(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function v$(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function y$(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function b$(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let l=await v$(o,n);return l.links?l.links():[]}return[]}));return S$(r.flat(1).filter(y$).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function eT(e,t,n,r,i,o){let l=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,c=(f,h)=>n[h].pathname!==f.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==f.params["*"];return o==="assets"?t.filter((f,h)=>l(f,h)||c(f,h)):o==="data"?t.filter((f,h)=>{let m=r.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(l(f,h)||c(f,h))return!0;if(f.route.shouldRevalidate){let y=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function x$(e,t,{includeHydrateFallback:n}={}){return _$(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function _$(e){return[...new Set(e)]}function w$(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function S$(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(w$(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function eN(){let e=_.useContext(Sf);return yw(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function C$(){let e=_.useContext(ay);return yw(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var bw=_.createContext(void 0);bw.displayName="FrameworkContext";function tN(){let e=_.useContext(bw);return yw(e,"You must render this element inside a <HydratedRouter> element"),e}function E$(e,t){let n=_.useContext(bw),[r,i]=_.useState(!1),[o,l]=_.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:h,onMouseLeave:m,onTouchStart:y}=t,x=_.useRef(null);_.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let w=O=>{O.forEach(P=>{l(P.isIntersecting)})},A=new IntersectionObserver(w,{threshold:.5});return x.current&&A.observe(x.current),()=>{A.disconnect()}}},[e]),_.useEffect(()=>{if(r){let w=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(w)}}},[r]);let b=()=>{i(!0)},C=()=>{i(!1),l(!1)};return n?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Wd(c,b),onBlur:Wd(f,C),onMouseEnter:Wd(h,b),onMouseLeave:Wd(m,C),onTouchStart:Wd(y,b)}]:[!1,x,{}]}function Wd(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function A$({page:e,...t}){let{router:n}=eN(),r=_.useMemo(()=>qL(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?_.createElement(O$,{page:e,matches:r,...t}):null}function T$(e){let{manifest:t,routeModules:n}=tN(),[r,i]=_.useState([]);return _.useEffect(()=>{let o=!1;return b$(e,t,n).then(l=>{o||i(l)}),()=>{o=!0}},[e,t,n]),r}function O$({page:e,matches:t,...n}){let r=Or(),{manifest:i,routeModules:o}=tN(),{basename:l}=eN(),{loaderData:c,matches:f}=C$(),h=_.useMemo(()=>eT(e,t,f,i,r,"data"),[e,t,f,i,r]),m=_.useMemo(()=>eT(e,t,f,i,r,"assets"),[e,t,f,i,r]),y=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let C=new Set,w=!1;if(t.forEach(O=>{let P=i.routes[O.route.id];!P||!P.hasLoader||(!h.some(N=>N.route.id===O.route.id)&&O.route.id in c&&o[O.route.id]?.shouldRevalidate||P.hasClientLoader?w=!0:C.add(O.route.id))}),C.size===0)return[];let A=g$(e,l,"data");return w&&C.size>0&&A.searchParams.set("_routes",t.filter(O=>C.has(O.route.id)).map(O=>O.route.id).join(",")),[A.pathname+A.search]},[l,c,r,i,h,t,e,o]),x=_.useMemo(()=>x$(m,i),[m,i]),b=T$(m);return _.createElement(_.Fragment,null,y.map(C=>_.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...n})),x.map(C=>_.createElement("link",{key:C,rel:"modulepreload",href:C,...n})),b.map(({key:C,link:w})=>_.createElement("link",{key:C,nonce:n.nonce,...w})))}function j$(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var nN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{nN&&(window.__reactRouterVersion="7.9.5")}catch{}function rN({basename:e,children:t,window:n}){let r=_.useRef();r.current==null&&(r.current=bF({window:n,v5Compat:!0}));let i=r.current,[o,l]=_.useState({action:i.action,location:i.location}),c=_.useCallback(f=>{_.startTransition(()=>l(f))},[l]);return _.useLayoutEffect(()=>i.listen(c),[i,c]),_.createElement(s$,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var iN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ir=_.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:l,state:c,target:f,to:h,preventScrollReset:m,viewTransition:y,...x},b){let{basename:C}=_.useContext(Ta),w=typeof h=="string"&&iN.test(h),A,O=!1;if(typeof h=="string"&&w&&(A=h,nN))try{let ce=new URL(window.location.href),re=h.startsWith("//")?new URL(ce.protocol+h):new URL(h),J=qo(re.pathname,C);re.origin===ce.origin&&J!=null?h=J+re.search+re.hash:O=!0}catch{wa(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let P=GF(h,{relative:i}),[N,F,U]=E$(r,x),W=L$(h,{replace:l,state:c,target:f,preventScrollReset:m,relative:i,viewTransition:y});function X(ce){t&&t(ce),ce.defaultPrevented||W(ce)}let ae=_.createElement("a",{...x,...U,href:A||P,onClick:O||o?t:X,ref:j$(b,F),target:f,"data-discover":!w&&n==="render"?"true":void 0});return N&&!w?_.createElement(_.Fragment,null,ae,_.createElement(A$,{page:P})):ae});Ir.displayName="Link";var xw=_.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:l,viewTransition:c,children:f,...h},m){let y=Yh(l,{relative:h.relative}),x=Or(),b=_.useContext(ay),{navigator:C,basename:w}=_.useContext(Ta),A=b!=null&&I$(y)&&c===!0,O=C.encodeLocation?C.encodeLocation(y).pathname:y.pathname,P=x.pathname,N=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(P=P.toLowerCase(),N=N?N.toLowerCase():null,O=O.toLowerCase()),N&&w&&(N=qo(N,w)||N);const F=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let U=P===O||!i&&P.startsWith(O)&&P.charAt(F)==="/",W=N!=null&&(N===O||!i&&N.startsWith(O)&&N.charAt(O.length)==="/"),X={isActive:U,isPending:W,isTransitioning:A},ae=U?t:void 0,ce;typeof r=="function"?ce=r(X):ce=[r,U?"active":null,W?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let re=typeof o=="function"?o(X):o;return _.createElement(Ir,{...h,"aria-current":ae,className:ce,ref:m,style:re,to:l,viewTransition:c},typeof f=="function"?f(X):f)});xw.displayName="NavLink";var M$=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:l=Og,action:c,onSubmit:f,relative:h,preventScrollReset:m,viewTransition:y,...x},b)=>{let C=D$(),w=k$(c,{relative:h}),A=l.toLowerCase()==="get"?"get":"post",O=typeof c=="string"&&iN.test(c),P=N=>{if(f&&f(N),N.defaultPrevented)return;N.preventDefault();let F=N.nativeEvent.submitter,U=F?.getAttribute("formmethod")||l;C(F||N.currentTarget,{fetcherKey:t,method:U,navigate:n,replace:i,state:o,relative:h,preventScrollReset:m,viewTransition:y})};return _.createElement("form",{ref:b,method:A,action:w,onSubmit:r?f:P,...x,"data-discover":!O&&e==="render"?"true":void 0})});M$.displayName="Form";function P$(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function aN(e){let t=_.useContext(Sf);return vn(t,P$(e)),t}function L$(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:l}={}){let c=uo(),f=Or(),h=Yh(e,{relative:o});return _.useCallback(m=>{if(d$(m,t)){m.preventDefault();let y=n!==void 0?n:Ch(f)===Ch(h);c(e,{replace:y,state:r,preventScrollReset:i,relative:o,viewTransition:l})}},[f,c,h,n,r,t,e,i,o,l])}var N$=0,R$=()=>`__${String(++N$)}__`;function D$(){let{router:e}=aN("useSubmit"),{basename:t}=_.useContext(Ta),n=r$();return _.useCallback(async(r,i={})=>{let{action:o,method:l,encType:c,formData:f,body:h}=p$(r,t);if(i.navigate===!1){let m=i.fetcherKey||R$();await e.fetch(m,n,i.action||o,{preventScrollReset:i.preventScrollReset,formData:f,body:h,formMethod:i.method||l,formEncType:i.encType||c,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:f,body:h,formMethod:i.method||l,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function k$(e,{relative:t}={}){let{basename:n}=_.useContext(Ta),r=_.useContext(Oa);vn(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...Yh(e||".",{relative:t})},l=Or();if(e==null){o.search=l.search;let c=new URLSearchParams(o.search),f=c.getAll("index");if(f.some(m=>m==="")){c.delete("index"),f.filter(y=>y).forEach(y=>c.append("index",y));let m=c.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:$o([n,o.pathname])),Ch(o)}function I$(e,{relative:t}={}){let n=_.useContext(KL);vn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=aN("useViewTransitionState"),i=Yh(e,{relative:t});if(!n.isTransitioning)return!1;let o=qo(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=qo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Vg(i.pathname,l)!=null||Vg(i.pathname,o)!=null}const z$="/shlink-web-client/develop",Hg={homepage:z$};var Sa,io=".",oN="function",sN="string",lN="__global__",_w="Provider",U$=0,ww=Array.prototype.slice,B$=function(t,n){var r=t[n];if(r===void 0&&Sa.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},ly=function(t){var n;return this.nested[t]||(n=Sa.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},uN=function(t){return t.split(io).reduce(B$,this)},F$=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var c=0,f=function(m){if(m)throw m;t[c]&&t[c++](r,f)};return f(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},$$=function(t,n){var r,i;return typeof t===oN&&(n=t,t=lN),r=t.split(io),i=r.shift(),r.length?ly.call(this,i).middleware(r.join(io),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},V$=function(t,n){return n(t)},tT=function(t,n){return(t[n]||[]).concat(t.__global__||[])},H$=function(t,n){var r,i,o,l,c;return this.id,o=this.container,l=this.decorators,c=this.middlewares,r=t+_w,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var h=new n;return delete o[r],o[r]=h,h}},i[t]={configurable:!0,enumerable:!0,get:function(){var h=o[r],m;return h&&(m=tT(l,t).reduce(V$,h.$get(o)),delete o[r],delete o[t]),m===void 0?m:F$(tT(c,t),t,m,o)}},Object.defineProperties(o,i),this},cN=function(t,n){var r,i;return r=t.split(io),this.providerMap[t]&&r.length===1&&!this.container[t+_w]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(ly.call(this,i).provider(r.join(io),n),this):H$.call(this,i,n))},Sw=function(t,n){return cN.call(this,t,function(){this.$get=n})},fN=function(t,n,r){var i=arguments.length>3?ww.call(arguments,3):[],o=this;return Sw.call(this,t,function(){var c=n,f=i.map(uN,o.container);return r?new(n.bind.apply(n,[null].concat(f))):c.apply(null,f)})},q$=function(t,n){return fN.apply(this,[t,n,!0].concat(ww.call(arguments,2)))},G$=function(t,n){return fN.apply(this,[t,n,!1].concat(ww.call(arguments,2)))},dN=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},hN=function(t,n){var r=t[n];return r||(r={},dN.call(t,n,r)),r},Y$=function(t,n){var r;return r=t.split(io),t=r.pop(),dN.call(r.reduce(hN,this.container),t,n),this},W$=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},K$=function(t,n){var r=t.split(io);return t=r.pop(),W$.call(r.reduce(hN,this.container),t,n),this},mN=function(t,n){var r,i;return typeof t===oN&&(n=t,t=lN),r=t.split(io),i=r.shift(),r.length?ly.call(this,i).decorator(r.join(io),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},Z$=function(t){return this.deferred.push(t),this},X$=function(t){return(t||[]).map(uN,this.container)},Q$=function(t,n){return Sw.call(this,t,function(i){return{instance:n.bind(n,i)}})},J$=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},Cw=function(t){return Object.keys(t||this.container||{}).filter(J$)},qg={},eV=function(t){var n;return typeof t===sN?(n=qg[t],n||(qg[t]=n=new Sa,n.constant("BOTTLE_NAME",t)),n):new Sa},tV=function(t){typeof t===sN?delete qg[t]:qg={}},pN=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},nT=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+_w]},nV=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var l=o.split(io);l.length>1&&l.forEach(nT,ly.call(this,l[0])),nT.call(this,o),this.provider(o,n[o])}},this)},rV=function(t){return this.deferred.forEach(function(r){r(t)}),this};Sa=function e(t){if(!(this instanceof e))return e.pop(t);this.id=U$++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:mN.bind(this),$register:pN.bind(this),$list:Cw.bind(this)}};Sa.prototype={constant:K$,decorator:mN,defer:Z$,digest:X$,factory:Sw,instanceFactory:Q$,list:Cw,middleware:$$,provider:cN,resetProviders:nV,register:pN,resolve:rV,service:q$,serviceFactory:G$,value:Y$};Sa.pop=eV;Sa.clear=tV;Sa.list=Cw;Sa.config={strict:!1};const gN=Sa,iV=(e,t)=>`${e}/rest/v${t}`,aV=e=>e.dir?`${e.field}-${e.dir}`:void 0,oV=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:aV(e)}),sV=(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}`},lV=(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 uV=class{#t;#r;#n;#o;constructor(t,n,r={}){this.#r=t,this.#n=n,this.#o=r,this.#t=3}async listShortUrls({signal:t,...n}={}){return this.#e({url:"/short-urls",query:oV(n),signal:t}).then(({shortUrls:r})=>r)}async createShortUrl({signal:t,...n}){const r=Object.entries(n).reduce((i,[o,l])=>(l&&(i[o]=l),i),{});return this.#e({url:"/short-urls",method:"POST",body:r,signal:t})}async getShortUrl({shortCode:t,domain:n},{signal:r}={}){return this.#e({url:`/short-urls/${t}`,query:{domain:n},signal:r})}async deleteShortUrl({shortCode:t,domain:n},{signal:r}={}){return this.#a({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n},signal:r})}async updateShortUrl({shortCode:t,domain:n},{signal:r,...i}){return this.#e({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:i,signal:r})}async getShortUrlRedirectRules({shortCode:t,domain:n},{signal:r}={}){return this.#e({url:`/short-urls/${t}/redirect-rules`,method:"GET",query:{domain:n},signal:r})}async setShortUrlRedirectRules({shortCode:t,domain:n},{signal:r,...i}){return this.#e({url:`/short-urls/${t}/redirect-rules`,method:"POST",query:{domain:n},body:i,signal:r})}async getVisitsOverview({signal:t}={}){return this.#e({url:"/visits",signal:t}).then(({visits:n})=>n)}async getShortUrlVisits({shortCode:t,domain:n},{signal:r,...i}={}){return this.#i({url:`/short-urls/${t}/visits`,query:{...i,domain:n},signal:r})}async getTagVisits(t,{signal:n,...r}={}){return this.#i({url:`/tags/${t}/visits`,query:r,signal:n})}async getDomainVisits(t,{signal:n,...r}={}){return this.#i({url:`/domains/${t}/visits`,query:r,signal:n})}async getOrphanVisits({signal:t,...n}={}){return this.#i({url:"/visits/orphan",query:n,signal:t})}async getNonOrphanVisits({signal:t,...n}={}){return this.#i({url:"/visits/non-orphan",query:n,signal:t})}async#i(t){return this.#e(t).then(({visits:n})=>n)}async deleteShortUrlVisits({shortCode:t,domain:n},{signal:r}={}){const i=n?{domain:n}:void 0;return this.#e({method:"DELETE",url:`/short-urls/${t}/visits`,query:i,signal:r})}async deleteOrphanVisits({signal:t}={}){return this.#e({method:"DELETE",url:"/visits/orphan",signal:t})}async listTags({signal:t}={}){return this.#e({url:"/tags",signal:t}).then(({tags:n})=>n)}async tagsStats({signal:t}={}){return this.#e({url:"/tags/stats",signal:t}).then(({tags:n})=>n)}async deleteTags(t,{signal:n}={}){return this.#a({url:"/tags",method:"DELETE",query:{tags:t},signal:n}).then(()=>({tags:t}))}async editTag({oldName:t,newName:n},{signal:r}={}){return this.#a({url:"/tags",method:"PUT",body:{oldName:t,newName:n},signal:r}).then(()=>({oldName:t,newName:n}))}async listDomains({signal:t}={}){return this.#e({url:"/domains",signal:t}).then(({domains:n})=>n)}async editDomainRedirects(t,{signal:n}={}){return this.#e({url:"/domains/redirects",method:"PATCH",body:t,signal:n})}async health({domain:t,signal:n}={}){return this.#e({url:"/health",domain:t,signal:n})}async mercureInfo({signal:t}={}){return this.#e({url:"/mercure-info",signal:t})}async#e(t){return this.#r.jsonRequest(...this.#s(t))}async#a(t){return this.#r.emptyRequest(...this.#s(t))}#s({url:t,method:n="GET",query:r,body:i,domain:o,signal:l}){const c=lV(r??{}),f=c?`?${c}`:"",h=o?sV(this.#n.baseUrl,o):this.#n.baseUrl;return[`${iV(h,this.#t)}${t}${f}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.#n.apiKey},credentials:this.#o.requestCredentials,signal:l}]}};const vN=e=>!!e?.url&&!!e?.apiKey,gh=e=>!!e?.id,Ew=e=>!!e?.version,cV=e=>!!e?.serverNotFound,fV=e=>gh(e)?e.id:"",dV=({name:e,url:t,apiKey:n,forwardCredentials:r})=>({name:e,url:t,apiKey:n,forwardCredentials:r?"true":"false"}),hV=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",mV=e=>{const{forwardCredentials:t,...n}=e;if(!hV(n))throw new Error('Server is missing required "url", "apiKey" and/or "name" properties');return{...n,forwardCredentials:t==="true"}},rT=new Map,pV=e=>typeof e=="function",gV=e=>{const{selectedServer:t}=e();if(!vN(t))throw new Error("There's no selected server or it is not found");return t},vV=e=>t=>{const{url:n,apiKey:r,forwardCredentials:i}=pV(t)?gV(t):t,o=`${r}_${n}_${i?"forward":"no-forward"}`,l=rT.get(o);if(l)return l;const c=new uV(e,{apiKey:r,baseUrl:n},{requestCredentials:i?"include":void 0});return rT.set(o,c),c},yV=e=>{e.serviceFactory("buildShlinkApiClient",vV,"HttpClient")};function yN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=yN(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Oe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=yN(e))&&(r&&(r+=" "),r+=t);return r}var bV={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M480.1 192l7.9 0c13.3 0 24-10.7 24-24l0-144c0-9.7-5.8-18.5-14.8-22.2S477.9 .2 471 7L419.3 58.8C375 22.1 318 0 256 0 127 0 20.3 95.4 2.6 219.5 .1 237 12.2 253.2 29.7 255.7s33.7-9.7 36.2-27.1C79.2 135.5 159.3 64 256 64 300.4 64 341.2 79 373.7 104.3L327 151c-6.9 6.9-8.9 17.2-5.2 26.2S334.3 192 344 192l136.1 0zm29.4 100.5c2.5-17.5-9.7-33.7-27.1-36.2s-33.7 9.7-36.2 27.1c-13.3 93-93.4 164.5-190.1 164.5-44.4 0-85.2-15-117.7-40.3L185 361c6.9-6.9 8.9-17.2 5.2-26.2S177.7 320 168 320L24 320c-13.3 0-24 10.7-24 24L0 488c0 9.7 5.8 18.5 14.8 22.2S34.1 511.8 41 505l51.8-51.8C137 489.9 194 512 256 512 385 512 491.7 416.6 509.4 292.5z"]},xV=bV,bN={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M415.9 210.5c12.2-3.3 25 2.5 30.5 13.8L465 261.9c10.3 1.4 20.4 4.2 29.9 8.1l35-23.3c10.5-7 24.4-5.6 33.3 3.3l19.2 19.2c8.9 8.9 10.3 22.9 3.3 33.3l-23.3 34.9c1.9 4.7 3.6 9.6 5 14.7 1.4 5.1 2.3 10.1 3 15.2l37.7 18.6c11.3 5.6 17.1 18.4 13.8 30.5l-7 26.2c-3.3 12.1-14.6 20.3-27.2 19.5l-42-2.7c-6.3 8.1-13.6 15.6-21.9 22l2.7 41.9c.8 12.6-7.4 24-19.5 27.2l-26.2 7c-12.2 3.3-24.9-2.5-30.5-13.8l-18.6-37.6c-10.3-1.4-20.4-4.2-29.9-8.1l-35 23.3c-10.5 7-24.4 5.6-33.3-3.3l-19.2-19.2c-8.9-8.9-10.3-22.8-3.3-33.3l23.3-35c-1.9-4.7-3.6-9.6-5-14.7s-2.3-10.2-3-15.2l-37.7-18.6c-11.3-5.6-17-18.4-13.8-30.5l7-26.2c3.3-12.1 14.6-20.3 27.2-19.5l41.9 2.7c6.3-8.1 13.6-15.6 21.9-22l-2.7-41.8c-.8-12.6 7.4-24 19.5-27.2l26.2-7zM448.4 340a44 44 0 1 0 .1 88 44 44 0 1 0 -.1-88zM224.9-45.5l26.2 7c12.1 3.3 20.3 14.7 19.5 27.2l-2.7 41.8c8.3 6.4 15.6 13.8 21.9 22l42-2.7c12.5-.8 23.9 7.4 27.2 19.5l7 26.2c3.2 12.1-2.5 24.9-13.8 30.5l-37.7 18.6c-.7 5.1-1.7 10.2-3 15.2s-3.1 10-5 14.7l23.3 35c7 10.5 5.6 24.4-3.3 33.3L307.3 262c-8.9 8.9-22.8 10.3-33.3 3.3L239 242c-9.5 3.9-19.6 6.7-29.9 8.1l-18.6 37.6c-5.6 11.3-18.4 17-30.5 13.8l-26.2-7c-12.2-3.3-20.3-14.7-19.5-27.2l2.7-41.9c-8.3-6.4-15.6-13.8-21.9-22l-42 2.7c-12.5 .8-23.9-7.4-27.2-19.5l-7-26.2c-3.2-12.1 2.5-24.9 13.8-30.5l37.7-18.6c.7-5.1 1.7-10.1 3-15.2 1.4-5.1 3-10 5-14.7L55.1 46.5c-7-10.5-5.6-24.4 3.3-33.3L77.6-6c8.9-8.9 22.8-10.3 33.3-3.3l35 23.3c9.5-3.9 19.6-6.7 29.9-8.1l18.6-37.6c5.6-11.3 18.3-17 30.5-13.8zM192.4 84a44 44 0 1 0 0 88 44 44 0 1 0 0-88z"]},_V=bN,wV={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M0 64C0 28.7 28.7 0 64 0L213.5 0c17 0 33.3 6.7 45.3 18.7L365.3 125.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm208-5.5l0 93.5c0 13.3 10.7 24 24 24L325.5 176 208 58.5zM175 441c9.4 9.4 24.6 9.4 33.9 0l64-64c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-23 23 0-86.1c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 86.1-23-23c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64z"]},xN=wV,SV={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM64 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},CV=SV,EV={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M290.4 19.8C295.4 7.8 307.1 0 320 0L480 0c17.7 0 32 14.3 32 32l0 160c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9L400 157.3 246.6 310.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L354.7 112 297.4 54.6c-9.2-9.2-11.9-22.9-6.9-34.9zM0 176c0-44.2 35.8-80 80-80l80 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-80 0c-8.8 0-16 7.2-16 16l0 256c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-80c0-17.7 14.3-32 32-32s32 14.3 32 32l0 80c0 44.2-35.8 80-80 80L80 512c-44.2 0-80-35.8-80-80L0 176z"]},AV=EV,TV={prefix:"fas",iconName:"map-location-dot",icon:[640,512,["map-marked-alt"],"f5a0","M576 48c0-11.1-5.7-21.4-15.2-27.2s-21.2-6.4-31.1-1.4L413.5 77.5 234.1 17.6c-8.1-2.7-16.8-2.1-24.4 1.7l-128 64C70.8 88.8 64 99.9 64 112l0 352c0 11.1 5.7 21.4 15.2 27.2s21.2 6.4 31.1 1.4l116.1-58.1 173.3 57.8c-4.3-6.4-8.5-13.1-12.6-19.9-11-18.3-21.9-39.3-30-61.8l-101.2-33.7 0-284.5 128 42.7 0 99.3c31-35.8 77-58.4 128-58.4 22.6 0 44.2 4.4 64 12.5L576 48zM512 224c-66.3 0-120 52.8-120 117.9 0 68.9 64.1 150.4 98.6 189.3 11.6 13 31.3 13 42.9 0 34.5-38.9 98.6-120.4 98.6-189.3 0-65.1-53.7-117.9-120-117.9zM472 344a40 40 0 1 1 80 0 40 40 0 1 1 -80 0z"]},D2=TV,OV={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 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},jV=OV,MV={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8c-22.4 31.4-35.5 69.8-35.5 111.2 0 106 86 192 192 192 41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3c22.4-31.4 35.5-69.8 35.5-111.2 0-106-86-192-192-192-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"]},PV={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48 0 3.4 .4 6.7 1 9.9 2.1 10.2 6.5 20 10.8 29.9 6.1 13.8 12.1 27.5 12.1 42 0 31.8-21.6 60.7-53.4 62-3.5 .1-7 .2-10.6 .2-141.4 0-256-114.6-256-256S114.6 0 256 0 512 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"]},LV={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6-46.8 43.5-78.1 95.4-93 131.1-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47.1 43.7 111.8 80.6 192.6 80.6s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1-47.1-43.7-111.8-80.6-192.6-80.6zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64-11.5 0-22.3-3-31.7-8.4-1 10.9-.1 22.1 2.9 33.2 13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-12.2-45.7-55.5-74.8-101.1-70.8 5.3 9.3 8.4 20.1 8.4 31.7z"]},NV={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M136.7 5.9L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-8.7-26.1C306.9-7.2 294.7-16 280.9-16L167.1-16c-13.8 0-26 8.8-30.4 21.9zM416 144L32 144 53.1 467.1C54.7 492.4 75.7 512 101 512L347 512c25.3 0 46.3-19.6 47.9-44.9L416 144z"]},RV={prefix:"fas",iconName:"chevron-up",icon:[448,512,[],"f077","M201.4 105.4c12.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 0L224 173.3 54.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},Aw={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8-79.3 23.6-137.1 97.1-137.1 184.1 0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256 512 397.4 397.4 512 256 512S0 397.4 0 256c0-116 77.1-213.9 182.9-245.4 16.9-5 34.8 4.6 39.8 21.5z"]},DV={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z"]},kV=DV,IV={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M0 64C0 28.7 28.7 0 64 0L213.5 0c17 0 33.3 6.7 45.3 18.7L365.3 125.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm208-5.5l0 93.5c0 13.3 10.7 24 24 24L325.5 176 208 58.5zM209 263c-9.4-9.4-24.6-9.4-33.9 0l-64 64c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l23-23 0 86.1c0 13.3 10.7 24 24 24s24-10.7 24-24l0-86.1 23 23c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-64-64z"]},zV=IV,UV={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 0L368 46.1 465.9 144 490.3 119.6c21.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.5L432 177.9 334.1 80 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"]},Tw=UV,Gg={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 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.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},_N={prefix:"fas",iconName:"arrows-split-up-and-left",icon:[512,512,[],"e4bc","M342.6-22.6c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l41.4-41.4 0 195.9c-18.8-10.9-40.7-17.1-64-17.1l-114.7 0 41.4-41.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 320 224 320c35.3 0 64 28.7 64 64 0 70.7 57.3 128 128 128l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-35.3 0-64-28.7-64-64l0-306.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96z"]},BV={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M150.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L96 141.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96zM320 480l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},FV=BV,$V={prefix:"fas",iconName:"sun",icon:[576,512,[9728],"f185","M178.2-10.1c7.4-3.1 15.8-2.2 22.5 2.2l87.8 58.2 87.8-58.2c6.7-4.4 15.1-5.2 22.5-2.2S411.4-.5 413 7.3l20.9 103.2 103.2 20.9c7.8 1.6 14.4 7 17.4 14.3s2.2 15.8-2.2 22.5l-58.2 87.8 58.2 87.8c4.4 6.7 5.2 15.1 2.2 22.5s-9.6 12.8-17.4 14.3L433.8 401.4 413 504.7c-1.6 7.8-7 14.4-14.3 17.4s-15.8 2.2-22.5-2.2l-87.8-58.2-87.8 58.2c-6.7 4.4-15.1 5.2-22.5 2.2s-12.8-9.6-14.3-17.4L143 401.4 39.7 380.5c-7.8-1.6-14.4-7-17.4-14.3s-2.2-15.8 2.2-22.5L82.7 256 24.5 168.2c-4.4-6.7-5.2-15.1-2.2-22.5s9.6-12.8 17.4-14.3L143 110.6 163.9 7.3c1.6-7.8 7-14.4 14.3-17.4zM207.6 256a80.4 80.4 0 1 1 160.8 0 80.4 80.4 0 1 1 -160.8 0zm208.8 0a128.4 128.4 0 1 0 -256.8 0 128.4 128.4 0 1 0 256.8 0z"]},VV={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M36.4 353.2c4.1-14.6 11.8-27.9 22.6-38.7l181.2-181.2 33.9-33.9c16.6 16.6 51.3 51.3 104 104l33.9 33.9-33.9 33.9-181.2 181.2c-10.7 10.7-24.1 18.5-38.7 22.6L30.4 510.6c-8.3 2.3-17.3 0-23.4-6.2S-1.4 489.3 .9 481L36.4 353.2zm55.6-3.7c-4.4 4.7-7.6 10.4-9.3 16.6l-24.1 86.9 86.9-24.1c6.4-1.8 12.2-5.1 17-9.7L91.9 349.5zm354-146.1c-16.6-16.6-51.3-51.3-104-104L308 65.5C334.5 39 349.4 24.1 352.9 20.6 366.4 7 384.8-.6 404-.6S441.6 7 455.1 20.6l35.7 35.7C504.4 69.9 512 88.3 512 107.4s-7.6 37.6-21.2 51.1c-3.5 3.5-18.4 18.4-44.9 44.9z"]},wN=VV,HV={prefix:"fas",iconName:"link",icon:[576,512,[128279,"chain"],"f0c1","M419.5 96c-16.6 0-32.7 4.5-46.8 12.7-15.8-16-34.2-29.4-54.5-39.5 28.2-24 64.1-37.2 101.3-37.2 86.4 0 156.5 70 156.5 156.5 0 41.5-16.5 81.3-45.8 110.6l-71.1 71.1c-29.3 29.3-69.1 45.8-110.6 45.8-86.4 0-156.5-70-156.5-156.5 0-1.5 0-3 .1-4.5 .5-17.7 15.2-31.6 32.9-31.1s31.6 15.2 31.1 32.9c0 .9 0 1.8 0 2.6 0 51.1 41.4 92.5 92.5 92.5 24.5 0 48-9.7 65.4-27.1l71.1-71.1c17.3-17.3 27.1-40.9 27.1-65.4 0-51.1-41.4-92.5-92.5-92.5zM275.2 173.3c-1.9-.8-3.8-1.9-5.5-3.1-12.6-6.5-27-10.2-42.1-10.2-24.5 0-48 9.7-65.4 27.1L91.1 258.2c-17.3 17.3-27.1 40.9-27.1 65.4 0 51.1 41.4 92.5 92.5 92.5 16.5 0 32.6-4.4 46.7-12.6 15.8 16 34.2 29.4 54.6 39.5-28.2 23.9-64 37.2-101.3 37.2-86.4 0-156.5-70-156.5-156.5 0-41.5 16.5-81.3 45.8-110.6l71.1-71.1c29.3-29.3 69.1-45.8 110.6-45.8 86.6 0 156.5 70.6 156.5 156.9 0 1.3 0 2.6 0 3.9-.4 17.7-15.1 31.6-32.8 31.2s-31.6-15.1-31.2-32.8c0-.8 0-1.5 0-2.3 0-33.7-18-63.3-44.8-79.6z"]},uy={prefix:"fas",iconName:"chart-line",icon:[512,512,["line-chart"],"f201","M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7 262.6 153.4c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l73.4-73.4 57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z"]},qV={prefix:"fas",iconName:"up-right-and-down-left-from-center",icon:[512,512,["expand-alt"],"f424","M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2S34.1 320.2 41 327l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S177.7 512 168 512z"]},GV={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 17.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 117.3 160 488c0 17.7 14.3 32 32 32s32-14.3 32-32l0-370.7 105.4 105.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},YV={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M136.7 5.9C141.1-7.2 153.3-16 167.1-16l113.9 0c13.8 0 26 8.8 30.4 21.9L320 32 416 32c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 8.7-26.1zM32 144l384 0 0 304c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-304zm88 64c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24z"]},Nu={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},WV={prefix:"fas",iconName:"house",icon:[512,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M277.8 8.6c-12.3-11.4-31.3-11.4-43.5 0l-224 208c-9.6 9-12.8 22.9-8 35.1S18.8 272 32 272l16 0 0 176c0 35.3 28.7 64 64 64l288 0c35.3 0 64-28.7 64-64l0-176 16 0c13.2 0 25-8.1 29.8-20.3s1.6-26.2-8-35.1l-224-208zM240 320l32 0c26.5 0 48 21.5 48 48l0 96-128 0 0-96c0-26.5 21.5-48 48-48z"]},KV=WV,iT={prefix:"fas",iconName:"server",icon:[448,512,[],"f233","M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm216 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 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm216 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"]},aT={prefix:"fas",iconName:"calendar-xmark",icon:[448,512,["calendar-times"],"f273","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM291.9 220.1c-9.4-9.4-24.6-9.4-33.9 0l-33.9 33.9-33.9-33.9c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l33.9 33.9-33.9 33.9c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l33.9-33.9 33.9 33.9c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-33.9-33.9 33.9-33.9c9.4-9.4 9.4-24.6 0-33.9z"]},cy={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},fy=cy,ZV=cy,SN={prefix:"fas",iconName:"tags",icon:[576,512,[],"f02c","M401.2 39.1L549.4 189.4c27.7 28.1 27.7 73.1 0 101.2L393 448.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L515.3 256.8c9.2-9.3 9.2-24.4 0-33.7L367 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM32.1 229.5L32.1 96c0-35.3 28.7-64 64-64l133.5 0c17 0 33.3 6.7 45.3 18.7l144 144c25 25 25 65.5 0 90.5L285.4 418.7c-25 25-65.5 25-90.5 0l-144-144c-12-12-18.7-28.3-18.7-45.3zm144-85.5a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},XV={prefix:"fas",iconName:"moon",icon:[512,512,[127769,9214],"f186","M256 0C114.6 0 0 114.6 0 256S114.6 512 256 512c68.8 0 131.3-27.2 177.3-71.4 7.3-7 9.4-17.9 5.3-27.1s-13.7-14.9-23.8-14.1c-4.9 .4-9.8 .6-14.8 .6-101.6 0-184-82.4-184-184 0-72.1 41.5-134.6 102.1-164.8 9.1-4.5 14.3-14.3 13.1-24.4S322.6 8.5 312.7 6.3C294.4 2.2 275.4 0 256 0z"]},Ow={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24L40 48zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM16 232l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0z"]},QV={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.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 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},JV={prefix:"fas",iconName:"plug",icon:[448,512,[128268],"f1e6","M128-32c17.7 0 32 14.3 32 32l0 96 128 0 0-96c0-17.7 14.3-32 32-32s32 14.3 32 32l0 96 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 64c0 95.1-69.2 174.1-160 189.3l0 66.7c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-66.7C101.2 398.1 32 319.1 32 224l0-64c-17.7 0-32-14.3-32-32S14.3 96 32 96l64 0 0-96c0-17.7 14.3-32 32-32z"]},jw={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M512.4 240l-176 0c-17.7 0-32-14.3-32-32l0-176c0-17.7 14.4-32.2 31.9-29.9 107 14.2 191.8 99 206 206 2.3 17.5-12.2 31.9-29.9 31.9zM222.6 37.2c18.1-3.8 33.8 11 33.8 29.5l0 197.3c0 5.6 2 11 5.5 15.3L394 438.7c11.7 14.1 9.2 35.4-6.9 44.1-34.1 18.6-73.2 29.2-114.7 29.2-132.5 0-240-107.5-240-240 0-115.5 81.5-211.9 190.2-234.8zM477.8 288l64 0c18.5 0 33.3 15.7 29.5 33.8-10.2 48.4-35 91.4-69.6 124.2-12.3 11.7-31.6 9.2-42.4-3.9L374.9 340.4c-17.3-20.9-2.4-52.4 24.6-52.4l78.2 0z"]},eH={prefix:"fas",iconName:"file-csv",icon:[576,512,[],"f6dd","M96 0C60.7 0 32 28.7 32 64l0 384c0 35.3 28.7 64 64 64l80 0 0-112c0-35.3 28.7-64 64-64l176 0 0-165.5c0-17-6.7-33.3-18.7-45.3L290.7 18.7C278.7 6.7 262.5 0 245.5 0L96 0zM357.5 176L264 176c-13.3 0-24-10.7-24-24L240 58.5 357.5 176zM264 380c-24.3 0-44 19.7-44 44l0 80c0 24.3 19.7 44 44 44l16 0c24.3 0 44-19.7 44-44l0-8c0-11-9-20-20-20s-20 9-20 20l0 8c0 2.2-1.8 4-4 4l-16 0c-2.2 0-4-1.8-4-4l0-80c0-2.2 1.8-4 4-4l16 0c2.2 0 4 1.8 4 4l0 8c0 11 9 20 20 20s20-9 20-20l0-8c0-24.3-19.7-44-44-44l-16 0zm136 0c-28.7 0-52 23.3-52 52s23.3 52 52 52c6.6 0 12 5.4 12 12s-5.4 12-12 12l-32 0c-11 0-20 9-20 20s9 20 20 20l32 0c28.7 0 52-23.3 52-52s-23.3-52-52-52c-6.6 0-12-5.4-12-12s5.4-12 12-12l24 0c11 0 20-9 20-20s-9-20-20-20l-24 0zm96 0c-11 0-20 9-20 20l0 31.6c0 35.5 10.5 70.3 30.2 99.8l5.1 7.7c3.7 5.6 10 8.9 16.6 8.9s12.9-3.3 16.6-8.9l5.1-7.7c19.7-29.6 30.2-64.3 30.2-99.8l0-31.6c0-11-9-20-20-20s-20 9-20 20l0 31.6c0 19.6-4.1 38.9-12 56.7-7.9-17.8-12-37.1-12-56.7l0-31.6c0-11-9-20-20-20z"]},oT={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},tH={prefix:"fas",iconName:"grip-vertical",icon:[320,512,["grid-vertical"],"f58e","M128 40c0-22.1-17.9-40-40-40L40 0C17.9 0 0 17.9 0 40L0 88c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zm0 192c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zM0 424l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM320 40c0-22.1-17.9-40-40-40L232 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zM192 232l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM320 424c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48z"]},nH={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 0c14.7 0 28.2 8.1 35.2 21l216 400c6.7 12.4 6.4 27.4-.8 39.5S486.1 480 472 480L40 480c-14.1 0-27.2-7.4-34.4-19.5s-7.5-27.1-.8-39.5l216-400c7-12.9 20.5-21 35.2-21zm0 352a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.5 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},rH=nH,iH={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M140.3 135.2c12.6-10.3 31.1-9.5 42.8 2.2l128 128c9.2 9.2 11.9 22.9 6.9 34.9S301.4 320 288.5 320l-256 0c-12.9 0-24.6-7.8-29.6-19.8S.7 274.5 9.9 265.4l128-128 2.4-2.2z"]},aH={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M351.9 280l-190.9 0c2.9 64.5 17.2 123.9 37.5 167.4 11.4 24.5 23.7 41.8 35.1 52.4 11.2 10.5 18.9 12.2 22.9 12.2s11.7-1.7 22.9-12.2c11.4-10.6 23.7-28 35.1-52.4 20.3-43.5 34.6-102.9 37.5-167.4zM160.9 232l190.9 0C349 167.5 334.7 108.1 314.4 64.6 303 40.2 290.7 22.8 279.3 12.2 268.1 1.7 260.4 0 256.4 0s-11.7 1.7-22.9 12.2c-11.4 10.6-23.7 28-35.1 52.4-20.3 43.5-34.6 102.9-37.5 167.4zm-48 0C116.4 146.4 138.5 66.9 170.8 14.7 78.7 47.3 10.9 131.2 1.5 232l111.4 0zM1.5 280c9.4 100.8 77.2 184.7 169.3 217.3-32.3-52.2-54.4-131.7-57.9-217.3L1.5 280zm398.4 0c-3.5 85.6-25.6 165.1-57.9 217.3 92.1-32.7 159.9-116.5 169.3-217.3l-111.4 0zm111.4-48C501.9 131.2 434.1 47.3 342 14.7 374.3 66.9 396.4 146.4 399.9 232l111.4 0z"]},oH={prefix:"fas",iconName:"arrow-left",icon:[512,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.3 288 480 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-370.7 0 105.4-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},sH={prefix:"fas",iconName:"down-left-and-up-right-to-center",icon:[512,512,["compress-alt"],"f422","M439.5 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S450.2 240 440.5 240l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87zM72.5 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S62.8 272 72.5 272z"]},CN={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M352 0c0-17.7-14.3-32-32-32S288-17.7 288 0l0 64-96 0c-53 0-96 43-96 96l0 224c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-224c0-53-43-96-96-96l-96 0 0-64zM160 368c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24zm120 0c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24zm120 0c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24zM224 176a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm144 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM64 224c0-17.7-14.3-32-32-32S0 206.3 0 224l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96zm544-32c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32z"]},Wh={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 160-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0 0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0 0-160z"]},lH={prefix:"fas",iconName:"link-slash",icon:[576,512,["chain-broken","chain-slash","unlink"],"f127","M41-24.9c-9.4-9.4-24.6-9.4-33.9 0S-2.3-.3 7 9.1l528 528c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-122-122c4.2-3.4 8.3-7.1 12.1-10.9l71.1-71.1c29.3-29.3 45.8-69.1 45.8-110.6 0-86.4-70-156.5-156.5-156.5-37.3 0-73.1 13.3-101.3 37.2 20.3 10.1 38.7 23.5 54.5 39.5 14.1-8.3 30.2-12.7 46.8-12.7 51.1 0 92.5 41.4 92.5 92.5 0 24.5-9.7 48-27.1 65.4l-71.1 71.1c-3.9 3.9-8.1 7.4-12.6 10.5l-47.5-47.5c16.5-.9 29.7-14.4 30.2-31.1 0-1.3 0-2.6 0-3.9 0-86.3-69.9-156.9-156.5-156.9-19.2 0-37.9 3.5-55.5 10.2L41-24.9zM225.9 160c.6 0 1.1 0 1.7 0 15.1 0 29.5 3.7 42.1 10.2 1.8 1.2 3.6 2.3 5.5 3.1 26.8 16.3 44.8 45.9 44.8 79.6 0 .4 0 .8 0 1.2L225.9 160zM346.2 416L192 261.8c1.2 84.6 69.6 152.9 154.1 154.1zM139.7 209.5l-45.3-45.3-48.6 48.6c-29.3 29.3-45.8 69.1-45.8 110.6 0 86.4 70 156.5 156.5 156.5 37.2 0 73.1-13.3 101.3-37.2-20.3-10.1-38.8-23.5-54.6-39.5-14 8.2-30.1 12.6-46.7 12.6-51.1 0-92.5-41.4-92.5-92.5 0-24.5 9.7-48 27.1-65.4l48.6-48.6z"]},uH={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M246.6 374.6l-96 96c-12.5 12.5-32.8 12.5-45.3 0l-96-96c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L96 370.7 96 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 306.7 41.4-41.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L320 96z"]},cH=uH,EN={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M140.3 376.8c12.6 10.2 31.1 9.5 42.8-2.2l128-128c9.2-9.2 11.9-22.9 6.9-34.9S301.4 192 288.5 192l-256 0c-12.9 0-24.6 7.8-29.6 19.8S.7 237.5 9.9 246.6l128 128 2.4 2.2z"]},fH={prefix:"fas",iconName:"eye-slash",icon:[576,512,[],"f070","M41-24.9c-9.4-9.4-24.6-9.4-33.9 0S-2.3-.3 7 9.1l528 528c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-96.4-96.4c2.7-2.4 5.4-4.8 8-7.2 46.8-43.5 78.1-95.4 93-131.1 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1-47.1-43.7-111.8-80.6-192.6-80.6-56.8 0-105.6 18.2-146 44.2L41-24.9zM204.5 138.7c23.5-16.8 52.4-26.7 83.5-26.7 79.5 0 144 64.5 144 144 0 31.1-9.9 59.9-26.7 83.5l-34.7-34.7c12.7-21.4 17-47.7 10.1-73.7-13.7-51.2-66.4-81.6-117.6-67.9-8.6 2.3-16.7 5.7-24 10l-34.7-34.7zM325.3 395.1c-11.9 3.2-24.4 4.9-37.3 4.9-79.5 0-144-64.5-144-144 0-12.9 1.7-25.4 4.9-37.3L69.4 139.2c-32.6 36.8-55 75.8-66.9 104.5-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47.1 43.7 111.8 80.6 192.6 80.6 37.3 0 71.2-7.9 101.5-20.6l-64.2-64.2z"]},dH={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M256 64c-56.8 0-107.9 24.7-143.1 64l47.1 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 192c-17.7 0-32-14.3-32-32L0 32C0 14.3 14.3 0 32 0S64 14.3 64 32l0 54.7C110.9 33.6 179.5 0 256 0 397.4 0 512 114.6 512 256S397.4 512 256 512c-87 0-163.9-43.4-210.1-109.7-10.1-14.5-6.6-34.4 7.9-44.6s34.4-6.6 44.6 7.9c34.8 49.8 92.4 82.3 157.6 82.3 106 0 192-86 192-192S362 64 256 64z"]},hH=dH,mH={prefix:"fas",iconName:"tag",icon:[512,512,[127991],"f02b","M32.5 96l0 149.5c0 17 6.7 33.3 18.7 45.3l192 192c25 25 65.5 25 90.5 0L483.2 333.3c25-25 25-65.5 0-90.5l-192-192C279.2 38.7 263 32 246 32L96.5 32c-35.3 0-64 28.7-64 64zm112 16a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},pH={prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 502.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 402.7 224 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 370.7-105.4-105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},gH={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},vH={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},yH=vH,bH={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M64 160l64 0 0-64-64 0 0 64zM0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 416l64 0 0-64-64 0 0 64zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zM320 96l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zM288 352a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm96 32c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm32-96a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm-32 32a32 32 0 1 1 -64 0 32 32 0 1 1 64 0z"]},xH={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM168 232l176 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-176 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},AN=xH,_H={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},dy=_H;function k2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wH(e){if(Array.isArray(e))return e}function SH(e){if(Array.isArray(e))return k2(e)}function CH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TN(r.key),r)}}function AH(e,t,n){return t&&EH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mg(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Mw(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(f){throw f},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,l=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var f=n.next();return l=f.done,f},e:function(f){c=!0,o=f},f:function(){try{l||n.return==null||n.return()}finally{if(c)throw o}}}}function pt(e,t,n){return(t=TN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return c}}function jH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MH(){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 sT(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 Fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sT(Object(n),!0).forEach(function(r){pt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hy(e,t){return wH(e)||OH(e,t)||Mw(e,t)||jH()}function Ca(e){return SH(e)||TH(e)||Mw(e)||MH()}function PH(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function TN(e){var t=PH(e,"string");return typeof t=="symbol"?t:t+""}function Yg(e){"@babel/helpers - typeof";return Yg=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},Yg(e)}function Mw(e,t){if(e){if(typeof e=="string")return k2(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k2(e,t):void 0}}var lT=function(){},Pw={},ON={},jN=null,MN={mark:lT,measure:lT};try{typeof window<"u"&&(Pw=window),typeof document<"u"&&(ON=document),typeof MutationObserver<"u"&&(jN=MutationObserver),typeof performance<"u"&&(MN=performance)}catch{}var LH=Pw.navigator||{},uT=LH.userAgent,cT=uT===void 0?"":uT,dl=Pw,sn=ON,fT=jN,Xp=MN;dl.document;var rs=!!sn.documentElement&&!!sn.head&&typeof sn.addEventListener=="function"&&typeof sn.createElement=="function",PN=~cT.indexOf("MSIE")||~cT.indexOf("Trident/"),Ab,NH=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,RH=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i,LN={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},DH={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},NN=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],Ar="classic",Kh="duotone",RN="sharp",DN="sharp-duotone",kN="chisel",IN="etch",zN="jelly",UN="jelly-duo",BN="jelly-fill",FN="notdog",$N="notdog-duo",VN="slab",HN="slab-press",qN="thumbprint",GN="utility",YN="utility-duo",WN="utility-fill",KN="whiteboard",kH="Classic",IH="Duotone",zH="Sharp",UH="Sharp Duotone",BH="Chisel",FH="Etch",$H="Jelly",VH="Jelly Duo",HH="Jelly Fill",qH="Notdog",GH="Notdog Duo",YH="Slab",WH="Slab Press",KH="Thumbprint",ZH="Utility",XH="Utility Duo",QH="Utility Fill",JH="Whiteboard",ZN=[Ar,Kh,RN,DN,kN,IN,zN,UN,BN,FN,$N,VN,HN,qN,GN,YN,WN,KN];Ab={},pt(pt(pt(pt(pt(pt(pt(pt(pt(pt(Ab,Ar,kH),Kh,IH),RN,zH),DN,UH),kN,BH),IN,FH),zN,$H),UN,VH),BN,HH),FN,qH),pt(pt(pt(pt(pt(pt(pt(pt(Ab,$N,GH),VN,YH),HN,WH),qN,KH),GN,ZH),YN,XH),WN,QH),KN,JH);var eq={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}},tq={"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}},nq=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),rq={chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}},XN=["fak","fa-kit","fakd","fa-kit-duotone"],dT={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},iq=["kit"],aq="kit",oq="kit-duotone",sq="Kit",lq="Kit Duotone";pt(pt({},aq,sq),oq,lq);var uq={kit:{"fa-kit":"fak"}},cq={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},fq={kit:{fak:"fa-kit"}},hT={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},Tb,Qp={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},dq=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],hq="classic",mq="duotone",pq="sharp",gq="sharp-duotone",vq="chisel",yq="etch",bq="jelly",xq="jelly-duo",_q="jelly-fill",wq="notdog",Sq="notdog-duo",Cq="slab",Eq="slab-press",Aq="thumbprint",Tq="utility",Oq="utility-duo",jq="utility-fill",Mq="whiteboard",Pq="Classic",Lq="Duotone",Nq="Sharp",Rq="Sharp Duotone",Dq="Chisel",kq="Etch",Iq="Jelly",zq="Jelly Duo",Uq="Jelly Fill",Bq="Notdog",Fq="Notdog Duo",$q="Slab",Vq="Slab Press",Hq="Thumbprint",qq="Utility",Gq="Utility Duo",Yq="Utility Fill",Wq="Whiteboard";Tb={},pt(pt(pt(pt(pt(pt(pt(pt(pt(pt(Tb,hq,Pq),mq,Lq),pq,Nq),gq,Rq),vq,Dq),yq,kq),bq,Iq),xq,zq),_q,Uq),wq,Bq),pt(pt(pt(pt(pt(pt(pt(pt(Tb,Sq,Fq),Cq,$q),Eq,Vq),Aq,Hq),Tq,qq),Oq,Gq),jq,Yq),Mq,Wq);var Kq="kit",Zq="kit-duotone",Xq="Kit",Qq="Kit Duotone";pt(pt({},Kq,Xq),Zq,Qq);var Jq={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}},eG={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]},I2={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},tG=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"],QN=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fajr","fajfr","fajdr","facr","fausb","faudsb","faufsb"].concat(dq,tG),nG=["solid","regular","light","thin","duotone","brands","semibold"],JN=[1,2,3,4,5,6,7,8,9,10],rG=JN.concat([11,12,13,14,15,16,17,18,19,20]),iG=["aw","fw","pull-left","pull-right"],aG=[].concat(Ca(Object.keys(eG)),nG,iG,["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",Qp.GROUP,Qp.SWAP_OPACITY,Qp.PRIMARY,Qp.SECONDARY]).concat(JN.map(function(e){return"".concat(e,"x")})).concat(rG.map(function(e){return"w-".concat(e)})),oG={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},Go="___FONT_AWESOME___",z2=16,eR="fa",tR="svg-inline--fa",Ru="data-fa-i2svg",U2="data-fa-pseudo-element",sG="data-fa-pseudo-element-pending",Lw="data-prefix",Nw="data-icon",mT="fontawesome-i2svg",lG="async",uG=["HTML","HEAD","STYLE","SCRIPT"],nR=["::before","::after",":before",":after"],rR=function(){try{return!0}catch{return!1}}();function Zh(e){return new Proxy(e,{get:function(n,r){return r in n?n[r]:n[Ar]}})}var iR=Fe({},LN);iR[Ar]=Fe(Fe(Fe(Fe({},{"fa-duotone":"duotone"}),LN[Ar]),dT.kit),dT["kit-duotone"]);var cG=Zh(iR),B2=Fe({},rq);B2[Ar]=Fe(Fe(Fe(Fe({},{duotone:"fad"}),B2[Ar]),hT.kit),hT["kit-duotone"]);var pT=Zh(B2),F2=Fe({},I2);F2[Ar]=Fe(Fe({},F2[Ar]),fq.kit);var Rw=Zh(F2),$2=Fe({},Jq);$2[Ar]=Fe(Fe({},$2[Ar]),uq.kit);Zh($2);var fG=NH,aR="fa-layers-text",dG=RH,hG=Fe({},eq);Zh(hG);var mG=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Ob=DH,pG=[].concat(Ca(iq),Ca(aG)),vh=dl.FontAwesomeConfig||{};function gG(e){var t=sn.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function vG(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(sn&&typeof sn.querySelector=="function"){var yG=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];yG.forEach(function(e){var t=hy(e,2),n=t[0],r=t[1],i=vG(gG(n));i!=null&&(vh[r]=i)})}var oR={styleDefault:"solid",familyDefault:Ar,cssPrefix:eR,replacementClass:tR,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};vh.familyPrefix&&(vh.cssPrefix=vh.familyPrefix);var uf=Fe(Fe({},oR),vh);uf.autoReplaceSvg||(uf.observeMutations=!1);var it={};Object.keys(oR).forEach(function(e){Object.defineProperty(it,e,{enumerable:!0,set:function(n){uf[e]=n,yh.forEach(function(r){return r(it)})},get:function(){return uf[e]}})});Object.defineProperty(it,"familyPrefix",{enumerable:!0,set:function(t){uf.cssPrefix=t,yh.forEach(function(n){return n(it)})},get:function(){return uf.cssPrefix}});dl.FontAwesomeConfig=it;var yh=[];function bG(e){return yh.push(e),function(){yh.splice(yh.indexOf(e),1)}}var Fc=z2,Ja={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function xG(e){if(!(!e||!rs)){var t=sn.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=sn.head.childNodes,r=null,i=n.length-1;i>-1;i--){var o=n[i],l=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(l)>-1&&(r=o)}return sn.head.insertBefore(t,r),e}}var _G="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function gT(){for(var e=12,t="";e-- >0;)t+=_G[Math.random()*62|0];return t}function Ef(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function Dw(e){return e.classList?Ef(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function sR(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function wG(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(sR(e[n]),'" ')},"").trim()}function my(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function kw(e){return e.size!==Ja.size||e.x!==Ja.x||e.y!==Ja.y||e.rotate!==Ja.rotate||e.flipX||e.flipY}function SG(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,") "),l="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),c="rotate(".concat(t.rotate," 0 0)"),f={transform:"".concat(o," ").concat(l," ").concat(c)},h={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:f,path:h}}function CG(e){var t=e.transform,n=e.width,r=n===void 0?z2:n,i=e.height,o=i===void 0?z2:i,l="";return PN?l+="translate(".concat(t.x/Fc-r/2,"em, ").concat(t.y/Fc-o/2,"em) "):l+="translate(calc(-50% + ".concat(t.x/Fc,"em), calc(-50% + ").concat(t.y/Fc,"em)) "),l+="scale(".concat(t.size/Fc*(t.flipX?-1:1),", ").concat(t.size/Fc*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var EG=`:root, :host {
--fa-font-solid: normal 900 1em/1 "Font Awesome 7 Free";
--fa-font-regular: normal 400 1em/1 "Font Awesome 7 Free";
--fa-font-light: normal 300 1em/1 "Font Awesome 7 Pro";
--fa-font-thin: normal 100 1em/1 "Font Awesome 7 Pro";
--fa-font-duotone: normal 900 1em/1 "Font Awesome 7 Duotone";
--fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 7 Duotone";
--fa-font-duotone-light: normal 300 1em/1 "Font Awesome 7 Duotone";
--fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 7 Duotone";
--fa-font-brands: normal 400 1em/1 "Font Awesome 7 Brands";
--fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 7 Sharp";
--fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 7 Sharp";
--fa-font-sharp-light: normal 300 1em/1 "Font Awesome 7 Sharp";
--fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 7 Sharp";
--fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 7 Sharp Duotone";
--fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 7 Sharp Duotone";
--fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 7 Sharp Duotone";
--fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 7 Sharp Duotone";
--fa-font-slab-regular: normal 400 1em/1 "Font Awesome 7 Slab";
--fa-font-slab-press-regular: normal 400 1em/1 "Font Awesome 7 Slab Press";
--fa-font-whiteboard-semibold: normal 600 1em/1 "Font Awesome 7 Whiteboard";
--fa-font-thumbprint-light: normal 300 1em/1 "Font Awesome 7 Thumbprint";
--fa-font-notdog-solid: normal 900 1em/1 "Font Awesome 7 Notdog";
--fa-font-notdog-duo-solid: normal 900 1em/1 "Font Awesome 7 Notdog Duo";
--fa-font-etch-solid: normal 900 1em/1 "Font Awesome 7 Etch";
--fa-font-jelly-regular: normal 400 1em/1 "Font Awesome 7 Jelly";
--fa-font-jelly-fill-regular: normal 400 1em/1 "Font Awesome 7 Jelly Fill";
--fa-font-jelly-duo-regular: normal 400 1em/1 "Font Awesome 7 Jelly Duo";
--fa-font-chisel-regular: normal 400 1em/1 "Font Awesome 7 Chisel";
--fa-font-utility-semibold: normal 600 1em/1 "Font Awesome 7 Utility";
--fa-font-utility-duo-semibold: normal 600 1em/1 "Font Awesome 7 Utility Duo";
--fa-font-utility-fill-semibold: normal 600 1em/1 "Font Awesome 7 Utility Fill";
}
.svg-inline--fa {
box-sizing: content-box;
display: var(--fa-display, inline-block);
height: 1em;
overflow: visible;
vertical-align: -0.125em;
width: var(--fa-width, 1.25em);
}
.svg-inline--fa.fa-2xs {
vertical-align: 0.1em;
}
.svg-inline--fa.fa-xs {
vertical-align: 0em;
}
.svg-inline--fa.fa-sm {
vertical-align: -0.0714285714em;
}
.svg-inline--fa.fa-lg {
vertical-align: -0.2em;
}
.svg-inline--fa.fa-xl {
vertical-align: -0.25em;
}
.svg-inline--fa.fa-2xl {
vertical-align: -0.3125em;
}
.svg-inline--fa.fa-pull-left,
.svg-inline--fa .fa-pull-start {
float: inline-start;
margin-inline-end: var(--fa-pull-margin, 0.3em);
}
.svg-inline--fa.fa-pull-right,
.svg-inline--fa .fa-pull-end {
float: inline-end;
margin-inline-start: var(--fa-pull-margin, 0.3em);
}
.svg-inline--fa.fa-li {
width: var(--fa-li-width, 2em);
inset-inline-start: calc(-1 * var(--fa-li-width, 2em));
inset-block-start: 0.25em; /* syncing vertical alignment with Web Font rendering */
}
.fa-layers-counter, .fa-layers-text {
display: inline-block;
position: absolute;
text-align: center;
}
.fa-layers {
display: inline-block;
height: 1em;
position: relative;
text-align: center;
vertical-align: -0.125em;
width: var(--fa-width, 1.25em);
}
.fa-layers .svg-inline--fa {
inset: 0;
margin: auto;
position: absolute;
transform-origin: center center;
}
.fa-layers-text {
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
transform-origin: center center;
}
.fa-layers-counter {
background-color: var(--fa-counter-background-color, #ff253a);
border-radius: var(--fa-counter-border-radius, 1em);
box-sizing: border-box;
color: var(--fa-inverse, #fff);
line-height: var(--fa-counter-line-height, 1);
max-width: var(--fa-counter-max-width, 5em);
min-width: var(--fa-counter-min-width, 1.5em);
overflow: hidden;
padding: var(--fa-counter-padding, 0.25em 0.5em);
right: var(--fa-right, 0);
text-overflow: ellipsis;
top: var(--fa-top, 0);
transform: scale(var(--fa-counter-scale, 0.25));
transform-origin: top right;
}
.fa-layers-bottom-right {
bottom: var(--fa-bottom, 0);
right: var(--fa-right, 0);
top: auto;
transform: scale(var(--fa-layers-scale, 0.25));
transform-origin: bottom right;
}
.fa-layers-bottom-left {
bottom: var(--fa-bottom, 0);
left: var(--fa-left, 0);
right: auto;
top: auto;
transform: scale(var(--fa-layers-scale, 0.25));
transform-origin: bottom left;
}
.fa-layers-top-right {
top: var(--fa-top, 0);
right: var(--fa-right, 0);
transform: scale(var(--fa-layers-scale, 0.25));
transform-origin: top right;
}
.fa-layers-top-left {
left: var(--fa-left, 0);
right: auto;
top: var(--fa-top, 0);
transform: scale(var(--fa-layers-scale, 0.25));
transform-origin: top left;
}
.fa-1x {
font-size: 1em;
}
.fa-2x {
font-size: 2em;
}
.fa-3x {
font-size: 3em;
}
.fa-4x {
font-size: 4em;
}
.fa-5x {
font-size: 5em;
}
.fa-6x {
font-size: 6em;
}
.fa-7x {
font-size: 7em;
}
.fa-8x {
font-size: 8em;
}
.fa-9x {
font-size: 9em;
}
.fa-10x {
font-size: 10em;
}
.fa-2xs {
font-size: calc(10 / 16 * 1em); /* converts a 10px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 10 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 10 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-xs {
font-size: calc(12 / 16 * 1em); /* converts a 12px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 12 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 12 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-sm {
font-size: calc(14 / 16 * 1em); /* converts a 14px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 14 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 14 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-lg {
font-size: calc(20 / 16 * 1em); /* converts a 20px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 20 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 20 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-xl {
font-size: calc(24 / 16 * 1em); /* converts a 24px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 24 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 24 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-2xl {
font-size: calc(32 / 16 * 1em); /* converts a 32px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 32 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 32 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-width-auto {
--fa-width: auto;
}
.fa-fw,
.fa-width-fixed {
--fa-width: 1.25em;
}
.fa-ul {
list-style-type: none;
margin-inline-start: var(--fa-li-margin, 2.5em);
padding-inline-start: 0;
}
.fa-ul > li {
position: relative;
}
.fa-li {
inset-inline-start: calc(-1 * var(--fa-li-width, 2em));
position: absolute;
text-align: center;
width: var(--fa-li-width, 2em);
line-height: inherit;
}
/* Heads Up: Bordered Icons will not be supported in the future!
- This feature will be deprecated in the next major release of Font Awesome (v8)!
- You may continue to use it in this version *v7), but it will not be supported in Font Awesome v8.
*/
/* Notes:
* --@{v.$css-prefix}-border-width = 1/16 by default (to render as ~1px based on a 16px default font-size)
* --@{v.$css-prefix}-border-padding =
** 3/16 for vertical padding (to give ~2px of vertical whitespace around an icon considering it's vertical alignment)
** 4/16 for horizontal padding (to give ~4px of horizontal whitespace around an icon)
*/
.fa-border {
border-color: var(--fa-border-color, #eee);
border-radius: var(--fa-border-radius, 0.1em);
border-style: var(--fa-border-style, solid);
border-width: var(--fa-border-width, 0.0625em);
box-sizing: var(--fa-border-box-sizing, content-box);
padding: var(--fa-border-padding, 0.1875em 0.25em);
}
.fa-pull-left,
.fa-pull-start {
float: inline-start;
margin-inline-end: var(--fa-pull-margin, 0.3em);
}
.fa-pull-right,
.fa-pull-end {
float: inline-end;
margin-inline-start: var(--fa-pull-margin, 0.3em);
}
.fa-beat {
animation-name: fa-beat;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, ease-in-out);
}
.fa-bounce {
animation-name: fa-bounce;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
}
.fa-fade {
animation-name: fa-fade;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}
.fa-beat-fade {
animation-name: fa-beat-fade;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}
.fa-flip {
animation-name: fa-flip;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, ease-in-out);
}
.fa-shake {
animation-name: fa-shake;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, linear);
}
.fa-spin {
animation-name: fa-spin;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 2s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, linear);
}
.fa-spin-reverse {
--fa-animation-direction: reverse;
}
.fa-pulse,
.fa-spin-pulse {
animation-name: fa-spin;
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, steps(8));
}
@media (prefers-reduced-motion: reduce) {
.fa-beat,
.fa-bounce,
.fa-fade,
.fa-beat-fade,
.fa-flip,
.fa-pulse,
.fa-shake,
.fa-spin,
.fa-spin-pulse {
animation: none !important;
transition: none !important;
}
}
@keyframes fa-beat {
0%, 90% {
transform: scale(1);
}
45% {
transform: scale(var(--fa-beat-scale, 1.25));
}
}
@keyframes fa-bounce {
0% {
transform: scale(1, 1) translateY(0);
}
10% {
transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
}
30% {
transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
}
50% {
transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
}
57% {
transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
}
64% {
transform: scale(1, 1) translateY(0);
}
100% {
transform: scale(1, 1) translateY(0);
}
}
@keyframes fa-fade {
50% {
opacity: var(--fa-fade-opacity, 0.4);
}
}
@keyframes fa-beat-fade {
0%, 100% {
opacity: var(--fa-beat-fade-opacity, 0.4);
transform: scale(1);
}
50% {
opacity: 1;
transform: scale(var(--fa-beat-fade-scale, 1.125));
}
}
@keyframes fa-flip {
50% {
transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
}
}
@keyframes fa-shake {
0% {
transform: rotate(-15deg);
}
4% {
transform: rotate(15deg);
}
8%, 24% {
transform: rotate(-18deg);
}
12%, 28% {
transform: rotate(18deg);
}
16% {
transform: rotate(-22deg);
}
20% {
transform: rotate(22deg);
}
32% {
transform: rotate(-12deg);
}
36% {
transform: rotate(12deg);
}
40%, 100% {
transform: rotate(0deg);
}
}
@keyframes fa-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.fa-rotate-90 {
transform: rotate(90deg);
}
.fa-rotate-180 {
transform: rotate(180deg);
}
.fa-rotate-270 {
transform: rotate(270deg);
}
.fa-flip-horizontal {
transform: scale(-1, 1);
}
.fa-flip-vertical {
transform: scale(1, -1);
}
.fa-flip-both,
.fa-flip-horizontal.fa-flip-vertical {
transform: scale(-1, -1);
}
.fa-rotate-by {
transform: rotate(var(--fa-rotate-angle, 0));
}
.svg-inline--fa .fa-primary {
fill: var(--fa-primary-color, currentColor);
opacity: var(--fa-primary-opacity, 1);
}
.svg-inline--fa .fa-secondary {
fill: var(--fa-secondary-color, currentColor);
opacity: var(--fa-secondary-opacity, 0.4);
}
.svg-inline--fa.fa-swap-opacity .fa-primary {
opacity: var(--fa-secondary-opacity, 0.4);
}
.svg-inline--fa.fa-swap-opacity .fa-secondary {
opacity: var(--fa-primary-opacity, 1);
}
.svg-inline--fa mask .fa-primary,
.svg-inline--fa mask .fa-secondary {
fill: black;
}
.svg-inline--fa.fa-inverse {
fill: var(--fa-inverse, #fff);
}
.fa-stack {
display: inline-block;
height: 2em;
line-height: 2em;
position: relative;
vertical-align: middle;
width: 2.5em;
}
.fa-inverse {
color: var(--fa-inverse, #fff);
}
.svg-inline--fa.fa-stack-1x {
--fa-width: 1.25em;
height: 1em;
width: var(--fa-width);
}
.svg-inline--fa.fa-stack-2x {
--fa-width: 2.5em;
height: 2em;
width: var(--fa-width);
}
.fa-stack-1x,
.fa-stack-2x {
inset: 0;
margin: auto;
position: absolute;
z-index: var(--fa-stack-z-index, auto);
}`;function lR(){var e=eR,t=tR,n=it.cssPrefix,r=it.replacementClass,i=EG;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),l=new RegExp("\\--".concat(e,"\\-"),"g"),c=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(l,"--".concat(n,"-")).replace(c,".".concat(r))}return i}var vT=!1;function jb(){it.autoAddCss&&!vT&&(xG(lR()),vT=!0)}var AG={mixout:function(){return{dom:{css:lR,insertCss:jb}}},hooks:function(){return{beforeDOMElementCreation:function(){jb()},beforeI2svg:function(){jb()}}}},Yo=dl||{};Yo[Go]||(Yo[Go]={});Yo[Go].styles||(Yo[Go].styles={});Yo[Go].hooks||(Yo[Go].hooks={});Yo[Go].shims||(Yo[Go].shims=[]);var _a=Yo[Go],uR=[],cR=function(){sn.removeEventListener("DOMContentLoaded",cR),Wg=1,uR.map(function(t){return t()})},Wg=!1;rs&&(Wg=(sn.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(sn.readyState),Wg||sn.addEventListener("DOMContentLoaded",cR));function TG(e){rs&&(Wg?setTimeout(e,0):uR.push(e))}function Xh(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"?sR(e):"<".concat(t," ").concat(wG(r),">").concat(o.map(Xh).join(""),"</").concat(t,">")}function yT(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var Mb=function(t,n,r,i){var o=Object.keys(t),l=o.length,c=n,f,h,m;for(r===void 0?(f=1,m=t[o[0]]):(f=0,m=r);f<l;f++)h=o[f],m=c(m,t[h],h,t);return m};function fR(e){return Ca(e).length!==1?null:e.codePointAt(0).toString(16)}function bT(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 V2(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=bT(t);typeof _a.hooks.addPack=="function"&&!i?_a.hooks.addPack(e,bT(t)):_a.styles[e]=Fe(Fe({},_a.styles[e]||{}),o),e==="fas"&&V2("fa",t)}var Eh=_a.styles,OG=_a.shims,dR=Object.keys(Rw),jG=dR.reduce(function(e,t){return e[t]=Object.keys(Rw[t]),e},{}),Iw=null,hR={},mR={},pR={},gR={},vR={};function MG(e){return~pG.indexOf(e)}function PG(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!MG(i)?i:null}var yR=function(){var t=function(o){return Mb(Eh,function(l,c,f){return l[f]=Mb(c,o,{}),l},{})};hR=t(function(i,o,l){if(o[3]&&(i[o[3]]=l),o[2]){var c=o[2].filter(function(f){return typeof f=="number"});c.forEach(function(f){i[f.toString(16)]=l})}return i}),mR=t(function(i,o,l){if(i[l]=l,o[2]){var c=o[2].filter(function(f){return typeof f=="string"});c.forEach(function(f){i[f]=l})}return i}),vR=t(function(i,o,l){var c=o[2];return i[l]=l,c.forEach(function(f){i[f]=l}),i});var n="far"in Eh||it.autoFetchSvg,r=Mb(OG,function(i,o){var l=o[0],c=o[1],f=o[2];return c==="far"&&!n&&(c="fas"),typeof l=="string"&&(i.names[l]={prefix:c,iconName:f}),typeof l=="number"&&(i.unicodes[l.toString(16)]={prefix:c,iconName:f}),i},{names:{},unicodes:{}});pR=r.names,gR=r.unicodes,Iw=py(it.styleDefault,{family:it.familyDefault})};bG(function(e){Iw=py(e.styleDefault,{family:it.familyDefault})});yR();function zw(e,t){return(hR[e]||{})[t]}function LG(e,t){return(mR[e]||{})[t]}function Su(e,t){return(vR[e]||{})[t]}function bR(e){return pR[e]||{prefix:null,iconName:null}}function NG(e){var t=gR[e],n=zw("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function hl(){return Iw}var xR=function(){return{prefix:null,iconName:null,rest:[]}};function RG(e){var t=Ar,n=dR.reduce(function(r,i){return r[i]="".concat(it.cssPrefix,"-").concat(i),r},{});return ZN.forEach(function(r){(e.includes(n[r])||e.some(function(i){return jG[r].includes(i)}))&&(t=r)}),t}function py(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Ar:n,i=cG[r][e];if(r===Kh&&!e)return"fad";var o=pT[r][e]||pT[r][i],l=e in _a.styles?e:null,c=o||l||null;return c}function DG(e){var t=[],n=null;return e.forEach(function(r){var i=PG(it.cssPrefix,r);i?n=i:r&&t.push(r)}),{iconName:n,rest:t}}function xT(e){return e.sort().filter(function(t,n,r){return r.indexOf(t)===n})}var _T=QN.concat(XN);function gy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.skipLookups,r=n===void 0?!1:n,i=null,o=xT(e.filter(function(b){return _T.includes(b)})),l=xT(e.filter(function(b){return!_T.includes(b)})),c=o.filter(function(b){return i=b,!NN.includes(b)}),f=hy(c,1),h=f[0],m=h===void 0?null:h,y=RG(o),x=Fe(Fe({},DG(l)),{},{prefix:py(m,{family:y})});return Fe(Fe(Fe({},x),UG({values:e,family:y,styles:Eh,config:it,canonical:x,givenPrefix:i})),kG(r,i,x))}function kG(e,t,n){var r=n.prefix,i=n.iconName;if(e||!r||!i)return{prefix:r,iconName:i};var o=t==="fa"?bR(i):{},l=Su(r,i);return i=o.iconName||l||i,r=o.prefix||r,r==="far"&&!Eh.far&&Eh.fas&&!it.autoFetchSvg&&(r="fas"),{prefix:r,iconName:i}}var IG=ZN.filter(function(e){return e!==Ar||e!==Kh}),zG=Object.keys(I2).filter(function(e){return e!==Ar}).map(function(e){return Object.keys(I2[e])}).flat();function UG(e){var t=e.values,n=e.family,r=e.canonical,i=e.givenPrefix,o=i===void 0?"":i,l=e.styles,c=l===void 0?{}:l,f=e.config,h=f===void 0?{}:f,m=n===Kh,y=t.includes("fa-duotone")||t.includes("fad"),x=h.familyDefault==="duotone",b=r.prefix==="fad"||r.prefix==="fa-duotone";if(!m&&(y||x||b)&&(r.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab"),!r.prefix&&IG.includes(n)){var C=Object.keys(c).find(function(A){return zG.includes(A)});if(C||h.autoFetchSvg){var w=nq.get(n).defaultShortPrefixId;r.prefix=w,r.iconName=Su(r.prefix,r.iconName)||r.iconName}}return(r.prefix==="fa"||o==="fa")&&(r.prefix=hl()||"fas"),r}var BG=function(){function e(){CH(this,e),this.definitions={}}return AH(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=i.reduce(this._pullDefinitions,{});Object.keys(l).forEach(function(c){n.definitions[c]=Fe(Fe({},n.definitions[c]||{}),l[c]),V2(c,l[c]);var f=Rw[Ar][c];f&&V2(f,l[c]),yR()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(n,r){var i=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(i).map(function(o){var l=i[o],c=l.prefix,f=l.iconName,h=l.icon,m=h[2];n[c]||(n[c]={}),m.length>0&&m.forEach(function(y){typeof y=="string"&&(n[c][y]=h)}),n[c][f]=h}),n}}])}(),wT=[],Zc={},ef={},FG=Object.keys(ef);function $G(e,t){var n=t.mixoutsTo;return wT=e,Zc={},Object.keys(ef).forEach(function(r){FG.indexOf(r)===-1&&delete ef[r]}),wT.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(l){typeof i[l]=="function"&&(n[l]=i[l]),Yg(i[l])==="object"&&Object.keys(i[l]).forEach(function(c){n[l]||(n[l]={}),n[l][c]=i[l][c]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(l){Zc[l]||(Zc[l]=[]),Zc[l].push(o[l])})}r.provides&&r.provides(ef)}),n}function H2(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=Zc[e]||[];return o.forEach(function(l){t=l.apply(null,[t].concat(r))}),t}function Du(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=Zc[e]||[];i.forEach(function(o){o.apply(null,n)})}function ml(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return ef[e]?ef[e].apply(null,t):void 0}function q2(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,n=e.prefix||hl();if(t)return t=Su(n,t)||t,yT(_R.definitions,n,t)||yT(_a.styles,n,t)}var _R=new BG,VG=function(){it.autoReplaceSvg=!1,it.observeMutations=!1,Du("noAuto")},HG={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return rs?(Du("beforeI2svg",t),ml("pseudoElements2svg",t),ml("i2svg",t)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;it.autoReplaceSvg===!1&&(it.autoReplaceSvg=!0),it.observeMutations=!0,TG(function(){GG({autoReplaceSvgRoot:n}),Du("watch",t)})}},qG={icon:function(t){if(t===null)return null;if(Yg(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Su(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=py(t[0]);return{prefix:r,iconName:Su(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(it.cssPrefix,"-"))>-1||t.match(fG))){var i=gy(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||hl(),iconName:Su(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=hl();return{prefix:o,iconName:Su(o,t)||t}}}},Ii={noAuto:VG,config:it,dom:HG,parse:qG,library:_R,findIconDefinition:q2,toHtml:Xh},GG=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?sn:n;(Object.keys(_a.styles).length>0||it.autoFetchSvg)&&rs&&it.autoReplaceSvg&&Ii.dom.i2svg({node:r})};function vy(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Xh(r)})}}),Object.defineProperty(e,"node",{get:function(){if(rs){var r=sn.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function YG(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,l=e.transform;if(kw(l)&&n.found&&!r.found){var c=n.width,f=n.height,h={x:c/f/2,y:.5};i.style=my(Fe(Fe({},o),{},{"transform-origin":"".concat(h.x+l.x/16,"em ").concat(h.y+l.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function WG(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,l=o===!0?"".concat(t,"-").concat(it.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Fe(Fe({},i),{},{id:l}),children:r}]}]}function KG(e){var t=["aria-label","aria-labelledby","title","role"];return t.some(function(n){return n in e})}function Uw(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,l=e.transform,c=e.symbol,f=e.maskId,h=e.extra,m=e.watchable,y=m===void 0?!1:m,x=r.found?r:n,b=x.width,C=x.height,w=[it.replacementClass,o?"".concat(it.cssPrefix,"-").concat(o):""].filter(function(U){return h.classes.indexOf(U)===-1}).filter(function(U){return U!==""||!!U}).concat(h.classes).join(" "),A={children:[],attributes:Fe(Fe({},h.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:h.attributes.role||"img",viewBox:"0 0 ".concat(b," ").concat(C)})};!KG(h.attributes)&&!h.attributes["aria-hidden"]&&(A.attributes["aria-hidden"]="true"),y&&(A.attributes[Ru]="");var O=Fe(Fe({},A),{},{prefix:i,iconName:o,main:n,mask:r,maskId:f,transform:l,symbol:c,styles:Fe({},h.styles)}),P=r.found&&n.found?ml("generateAbstractMask",O)||{children:[],attributes:{}}:ml("generateAbstractIcon",O)||{children:[],attributes:{}},N=P.children,F=P.attributes;return O.children=N,O.attributes=F,c?WG(O):YG(O)}function ST(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.extra,l=e.watchable,c=l===void 0?!1:l,f=Fe(Fe({},o.attributes),{},{class:o.classes.join(" ")});c&&(f[Ru]="");var h=Fe({},o.styles);kw(i)&&(h.transform=CG({transform:i,width:n,height:r}),h["-webkit-transform"]=h.transform);var m=my(h);m.length>0&&(f.style=m);var y=[];return y.push({tag:"span",attributes:f,children:[t]}),y}function ZG(e){var t=e.content,n=e.extra,r=Fe(Fe({},n.attributes),{},{class:n.classes.join(" ")}),i=my(n.styles);i.length>0&&(r.style=i);var o=[];return o.push({tag:"span",attributes:r,children:[t]}),o}var Pb=_a.styles;function G2(e){var t=e[0],n=e[1],r=e.slice(4),i=hy(r,1),o=i[0],l=null;return Array.isArray(o)?l={tag:"g",attributes:{class:"".concat(it.cssPrefix,"-").concat(Ob.GROUP)},children:[{tag:"path",attributes:{class:"".concat(it.cssPrefix,"-").concat(Ob.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(it.cssPrefix,"-").concat(Ob.PRIMARY),fill:"currentColor",d:o[1]}}]}:l={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:l}}var XG={found:!1,width:512,height:512};function QG(e,t){!rR&&!it.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Y2(e,t){var n=t;return t==="fa"&&it.styleDefault!==null&&(t=hl()),new Promise(function(r,i){if(n==="fa"){var o=bR(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&Pb[t]&&Pb[t][e]){var l=Pb[t][e];return r(G2(l))}QG(e,t),r(Fe(Fe({},XG),{},{icon:it.showMissingIcons&&e?ml("missingIconAbstract")||{}:{}}))})}var CT=function(){},W2=it.measurePerformance&&Xp&&Xp.mark&&Xp.measure?Xp:{mark:CT,measure:CT},lh='FA "7.1.0"',JG=function(t){return W2.mark("".concat(lh," ").concat(t," begins")),function(){return wR(t)}},wR=function(t){W2.mark("".concat(lh," ").concat(t," ends")),W2.measure("".concat(lh," ").concat(t),"".concat(lh," ").concat(t," begins"),"".concat(lh," ").concat(t," ends"))},Bw={begin:JG,end:wR},Pg=function(){};function ET(e){var t=e.getAttribute?e.getAttribute(Ru):null;return typeof t=="string"}function eY(e){var t=e.getAttribute?e.getAttribute(Lw):null,n=e.getAttribute?e.getAttribute(Nw):null;return t&&n}function tY(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(it.replacementClass)}function nY(){if(it.autoReplaceSvg===!0)return Lg.replace;var e=Lg[it.autoReplaceSvg];return e||Lg.replace}function rY(e){return sn.createElementNS("http://www.w3.org/2000/svg",e)}function iY(e){return sn.createElement(e)}function SR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?rY:iY:n;if(typeof e=="string")return sn.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(l){i.setAttribute(l,e.attributes[l])});var o=e.children||[];return o.forEach(function(l){i.appendChild(SR(l,{ceFn:r}))}),i}function aY(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var Lg={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(SR(i),n)}),n.getAttribute(Ru)===null&&it.keepOriginalSource){var r=sn.createComment(aY(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~Dw(n).indexOf(it.replacementClass))return Lg.replace(t);var i=new RegExp("".concat(it.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(c,f){return f===it.replacementClass||f.match(i)?c.toSvg.push(f):c.toNode.push(f),c},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var l=r.map(function(c){return Xh(c)}).join(`
`);n.setAttribute(Ru,""),n.innerHTML=l}};function AT(e){e()}function CR(e,t){var n=typeof t=="function"?t:Pg;if(e.length===0)n();else{var r=AT;it.mutateApproach===lG&&(r=dl.requestAnimationFrame||AT),r(function(){var i=nY(),o=Bw.begin("mutate");e.map(i),o(),n()})}}var Fw=!1;function ER(){Fw=!0}function K2(){Fw=!1}var Kg=null;function TT(e){if(fT&&it.observeMutations){var t=e.treeCallback,n=t===void 0?Pg:t,r=e.nodeCallback,i=r===void 0?Pg:r,o=e.pseudoElementsCallback,l=o===void 0?Pg:o,c=e.observeMutationsRoot,f=c===void 0?sn:c;Kg=new fT(function(h){if(!Fw){var m=hl();Ef(h).forEach(function(y){if(y.type==="childList"&&y.addedNodes.length>0&&!ET(y.addedNodes[0])&&(it.searchPseudoElements&&l(y.target),n(y.target)),y.type==="attributes"&&y.target.parentNode&&it.searchPseudoElements&&l([y.target],!0),y.type==="attributes"&&ET(y.target)&&~mG.indexOf(y.attributeName))if(y.attributeName==="class"&&eY(y.target)){var x=gy(Dw(y.target)),b=x.prefix,C=x.iconName;y.target.setAttribute(Lw,b||m),C&&y.target.setAttribute(Nw,C)}else tY(y.target)&&i(y.target)})}}),rs&&Kg.observe(f,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function oY(){Kg&&Kg.disconnect()}function sY(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),l=o[0],c=o.slice(1);return l&&c.length>0&&(r[l]=c.join(":").trim()),r},{})),n}function lY(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=gy(Dw(e));return i.prefix||(i.prefix=hl()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=LG(i.prefix,e.innerText)||zw(i.prefix,fR(e.innerText))),!i.iconName&&it.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function uY(e){var t=Ef(e.attributes).reduce(function(n,r){return n.name!=="class"&&n.name!=="style"&&(n[r.name]=r.value),n},{});return t}function cY(){return{iconName:null,prefix:null,transform:Ja,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function OT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=lY(e),r=n.iconName,i=n.prefix,o=n.rest,l=uY(e),c=H2("parseNodeAttributes",{},e),f=t.styleParser?sY(e):[];return Fe({iconName:r,prefix:i,transform:Ja,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:f,attributes:l}},c)}var fY=_a.styles;function AR(e){var t=it.autoReplaceSvg==="nest"?OT(e,{styleParser:!1}):OT(e);return~t.extra.classes.indexOf(aR)?ml("generateLayersText",e,t):ml("generateSvgReplacementMutation",e,t)}function dY(){return[].concat(Ca(XN),Ca(QN))}function jT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!rs)return Promise.resolve();var n=sn.documentElement.classList,r=function(y){return n.add("".concat(mT,"-").concat(y))},i=function(y){return n.remove("".concat(mT,"-").concat(y))},o=it.autoFetchSvg?dY():NN.concat(Object.keys(fY));o.includes("fa")||o.push("fa");var l=[".".concat(aR,":not([").concat(Ru,"])")].concat(o.map(function(m){return".".concat(m,":not([").concat(Ru,"])")})).join(", ");if(l.length===0)return Promise.resolve();var c=[];try{c=Ef(e.querySelectorAll(l))}catch{}if(c.length>0)r("pending"),i("complete");else return Promise.resolve();var f=Bw.begin("onTree"),h=c.reduce(function(m,y){try{var x=AR(y);x&&m.push(x)}catch(b){rR||b.name==="MissingIcon"&&console.error(b)}return m},[]);return new Promise(function(m,y){Promise.all(h).then(function(x){CR(x,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),f(),m()})}).catch(function(x){f(),y(x)})})}function hY(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;AR(e).then(function(n){n&&CR([n],t)})}function mY(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:q2(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:q2(i||{})),e(r,Fe(Fe({},n),{},{mask:i}))}}var pY=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Ja:r,o=n.symbol,l=o===void 0?!1:o,c=n.mask,f=c===void 0?null:c,h=n.maskId,m=h===void 0?null:h,y=n.classes,x=y===void 0?[]:y,b=n.attributes,C=b===void 0?{}:b,w=n.styles,A=w===void 0?{}:w;if(t){var O=t.prefix,P=t.iconName,N=t.icon;return vy(Fe({type:"icon"},t),function(){return Du("beforeDOMElementCreation",{iconDefinition:t,params:n}),Uw({icons:{main:G2(N),mask:f?G2(f.icon):{found:!1,width:null,height:null,icon:{}}},prefix:O,iconName:P,transform:Fe(Fe({},Ja),i),symbol:l,maskId:m,extra:{attributes:C,styles:A,classes:x}})})}},gY={mixout:function(){return{icon:mY(pY)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=jT,n.nodeCallback=hY,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?sn:r,o=n.callback,l=o===void 0?function(){}:o;return jT(i,l)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.prefix,l=r.transform,c=r.symbol,f=r.mask,h=r.maskId,m=r.extra;return new Promise(function(y,x){Promise.all([Y2(i,o),f.iconName?Y2(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(b){var C=hy(b,2),w=C[0],A=C[1];y([n,Uw({icons:{main:w,mask:A},prefix:o,iconName:i,transform:l,symbol:c,maskId:h,extra:m,watchable:!0})])}).catch(x)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,l=n.transform,c=n.styles,f=my(c);f.length>0&&(i.style=f);var h;return kw(l)&&(h=ml("generateAbstractTransformGrouping",{main:o,transform:l,containerWidth:o.width,iconWidth:o.width})),r.push(h||o.icon),{children:r,attributes:i}}}},vY={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 vy({type:"layer"},function(){Du("beforeDOMElementCreation",{assembler:n,params:r});var l=[];return n(function(c){Array.isArray(c)?c.map(function(f){l=l.concat(f.abstract)}):l=l.concat(c.abstract)}),[{tag:"span",attributes:{class:["".concat(it.cssPrefix,"-layers")].concat(Ca(o)).join(" ")},children:l}]})}}}},yY={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r.title;var i=r.classes,o=i===void 0?[]:i,l=r.attributes,c=l===void 0?{}:l,f=r.styles,h=f===void 0?{}:f;return vy({type:"counter",content:n},function(){return Du("beforeDOMElementCreation",{content:n,params:r}),ZG({content:n.toString(),extra:{attributes:c,styles:h,classes:["".concat(it.cssPrefix,"-layers-counter")].concat(Ca(o))}})})}}}},bY={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?Ja:i,l=r.classes,c=l===void 0?[]:l,f=r.attributes,h=f===void 0?{}:f,m=r.styles,y=m===void 0?{}:m;return vy({type:"text",content:n},function(){return Du("beforeDOMElementCreation",{content:n,params:r}),ST({content:n,transform:Fe(Fe({},Ja),o),extra:{attributes:h,styles:y,classes:["".concat(it.cssPrefix,"-layers-text")].concat(Ca(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.transform,o=r.extra,l=null,c=null;if(PN){var f=parseInt(getComputedStyle(n).fontSize,10),h=n.getBoundingClientRect();l=h.width/f,c=h.height/f}return Promise.resolve([n,ST({content:n.innerHTML,width:l,height:c,transform:i,extra:o,watchable:!0})])}}},TR=new RegExp('"',"ug"),MT=[1105920,1112319],PT=Fe(Fe(Fe(Fe({},{FontAwesome:{normal:"fas",400:"fas"}}),tq),oG),cq),Z2=Object.keys(PT).reduce(function(e,t){return e[t.toLowerCase()]=PT[t],e},{}),xY=Object.keys(Z2).reduce(function(e,t){var n=Z2[t];return e[t]=n[900]||Ca(Object.entries(n))[0][1],e},{});function _Y(e){var t=e.replace(TR,"");return fR(Ca(t)[0]||"")}function wY(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),n=e.getPropertyValue("content"),r=n.replace(TR,""),i=r.codePointAt(0),o=i>=MT[0]&&i<=MT[1],l=r.length===2?r[0]===r[1]:!1;return o||l||t}function SY(e,t){var n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),i=isNaN(r)?"normal":r;return(Z2[n]||{})[i]||xY[n]}function LT(e,t){var n="".concat(sG).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=Ef(e.children),l=o.filter(function(W){return W.getAttribute(U2)===t})[0],c=dl.getComputedStyle(e,t),f=c.getPropertyValue("font-family"),h=f.match(dG),m=c.getPropertyValue("font-weight"),y=c.getPropertyValue("content");if(l&&!h)return e.removeChild(l),r();if(h&&y!=="none"&&y!==""){var x=c.getPropertyValue("content"),b=SY(f,m),C=_Y(x),w=h[0].startsWith("FontAwesome"),A=wY(c),O=zw(b,C),P=O;if(w){var N=NG(C);N.iconName&&N.prefix&&(O=N.iconName,b=N.prefix)}if(O&&!A&&(!l||l.getAttribute(Lw)!==b||l.getAttribute(Nw)!==P)){e.setAttribute(n,P),l&&e.removeChild(l);var F=cY(),U=F.extra;U.attributes[U2]=t,Y2(O,b).then(function(W){var X=Uw(Fe(Fe({},F),{},{icons:{main:W,mask:xR()},prefix:b,iconName:P,extra:U,watchable:!0})),ae=sn.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(ae,e.firstChild):e.appendChild(ae),ae.outerHTML=X.map(function(ce){return Xh(ce)}).join(`
`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function CY(e){return Promise.all([LT(e,"::before"),LT(e,"::after")])}function EY(e){return e.parentNode!==document.head&&!~uG.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(U2)&&(!e.parentNode||e.parentNode.tagName!=="svg")}var AY=function(t){return!!t&&nR.some(function(n){return t.includes(n)})},TY=function(t){if(!t)return[];var n=new Set,r=t.split(/,(?![^()]*\))/).map(function(f){return f.trim()});r=r.flatMap(function(f){return f.includes("(")?f:f.split(",").map(function(h){return h.trim()})});var i=Mg(r),o;try{for(i.s();!(o=i.n()).done;){var l=o.value;if(AY(l)){var c=nR.reduce(function(f,h){return f.replace(h,"")},l);c!==""&&c!=="*"&&n.add(c)}}}catch(f){i.e(f)}finally{i.f()}return n};function NT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(rs){var n;if(t)n=e;else if(it.searchPseudoElementsFullScan)n=e.querySelectorAll("*");else{var r=new Set,i=Mg(document.styleSheets),o;try{for(i.s();!(o=i.n()).done;){var l=o.value;try{var c=Mg(l.cssRules),f;try{for(c.s();!(f=c.n()).done;){var h=f.value,m=TY(h.selectorText),y=Mg(m),x;try{for(y.s();!(x=y.n()).done;){var b=x.value;r.add(b)}}catch(w){y.e(w)}finally{y.f()}}}catch(w){c.e(w)}finally{c.f()}}catch(w){it.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(l.href," (").concat(w.message,`)
If it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.`))}}}catch(w){i.e(w)}finally{i.f()}if(!r.size)return;var C=Array.from(r).join(", ");try{n=e.querySelectorAll(C)}catch{}}return new Promise(function(w,A){var O=Ef(n).filter(EY).map(CY),P=Bw.begin("searchPseudoElements");ER(),Promise.all(O).then(function(){P(),K2(),w()}).catch(function(){P(),K2(),A()})})}}var OY={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=NT,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?sn:r;it.searchPseudoElements&&NT(i)}}},RT=!1,jY={mixout:function(){return{dom:{unwatch:function(){ER(),RT=!0}}}},hooks:function(){return{bootstrap:function(){TT(H2("mutationObserverCallbacks",{}))},noAuto:function(){oY()},watch:function(n){var r=n.observeMutationsRoot;RT?K2():TT(H2("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},DT=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("-"),l=o[0],c=o.slice(1).join("-");if(l&&c==="h")return r.flipX=!0,r;if(l&&c==="v")return r.flipY=!0,r;if(c=parseFloat(c),isNaN(c))return r;switch(l){case"grow":r.size=r.size+c;break;case"shrink":r.size=r.size-c;break;case"left":r.x=r.x-c;break;case"right":r.x=r.x+c;break;case"up":r.y=r.y-c;break;case"down":r.y=r.y+c;break;case"rotate":r.rotate=r.rotate+c;break}return r},n)},MY={mixout:function(){return{parse:{transform:function(n){return DT(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=DT(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,l=n.iconWidth,c={transform:"translate(".concat(o/2," 256)")},f="translate(".concat(i.x*32,", ").concat(i.y*32,") "),h="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),m="rotate(".concat(i.rotate," 0 0)"),y={transform:"".concat(f," ").concat(h," ").concat(m)},x={transform:"translate(".concat(l/2*-1," -256)")},b={outer:c,inner:y,path:x};return{tag:"g",attributes:Fe({},b.outer),children:[{tag:"g",attributes:Fe({},b.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Fe(Fe({},r.icon.attributes),b.path)}]}]}}}},Lb={x:0,y:0,width:"100%",height:"100%"};function kT(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 PY(e){return e.tag==="g"?e.children:[e]}var LY={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?gy(i.split(" ").map(function(l){return l.trim()})):xR();return o.prefix||(o.prefix=hl()),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,l=n.mask,c=n.maskId,f=n.transform,h=o.width,m=o.icon,y=l.width,x=l.icon,b=SG({transform:f,containerWidth:y,iconWidth:h}),C={tag:"rect",attributes:Fe(Fe({},Lb),{},{fill:"white"})},w=m.children?{children:m.children.map(kT)}:{},A={tag:"g",attributes:Fe({},b.inner),children:[kT(Fe({tag:m.tag,attributes:Fe(Fe({},m.attributes),b.path)},w))]},O={tag:"g",attributes:Fe({},b.outer),children:[A]},P="mask-".concat(c||gT()),N="clip-".concat(c||gT()),F={tag:"mask",attributes:Fe(Fe({},Lb),{},{id:P,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[C,O]},U={tag:"defs",children:[{tag:"clipPath",attributes:{id:N},children:PY(x)},F]};return r.push(U,{tag:"rect",attributes:Fe({fill:"currentColor","clip-path":"url(#".concat(N,")"),mask:"url(#".concat(P,")")},Lb)}),{children:r,attributes:i}}}},NY={provides:function(t){var n=!1;dl.matchMedia&&(n=dl.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:Fe(Fe({},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 l=Fe(Fe({},o),{},{attributeName:"opacity"}),c={tag:"circle",attributes:Fe(Fe({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||c.children.push({tag:"animate",attributes:Fe(Fe({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Fe(Fe({},l),{},{values:"1;0;1;1;0;1;"})}),r.push(c),r.push({tag:"path",attributes:Fe(Fe({},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:Fe(Fe({},l),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Fe(Fe({},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:Fe(Fe({},l),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},RY={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}}}},DY=[AG,gY,vY,yY,bY,OY,jY,MY,LY,NY,RY];$G(DY,{mixoutsTo:Ii});Ii.noAuto;var Ah=Ii.config;Ii.library;Ii.dom;var OR=Ii.parse;Ii.findIconDefinition;Ii.toHtml;var kY=Ii.icon;Ii.layer;Ii.text;Ii.counter;function IY(e){return e=e-0,e===e}function jR(e){return IY(e)?e:(e=e.replace(/[_-]+(.)?/g,(t,n)=>n?n.toUpperCase():""),e.charAt(0).toLowerCase()+e.slice(1))}function zY(e){return e.charAt(0).toUpperCase()+e.slice(1)}var $c=new Map,UY=1e3;function BY(e){if($c.has(e))return $c.get(e);const t={};let n=0;const r=e.length;for(;n<r;){const i=e.indexOf(";",n),o=i===-1?r:i,l=e.slice(n,o).trim();if(l){const c=l.indexOf(":");if(c>0){const f=l.slice(0,c).trim(),h=l.slice(c+1).trim();if(f&&h){const m=jR(f);t[m.startsWith("webkit")?zY(m):m]=h}}}n=o+1}if($c.size===UY){const i=$c.keys().next().value;i&&$c.delete(i)}return $c.set(e,t),t}function MR(e,t,n={}){if(typeof t=="string")return t;const r=(t.children||[]).map(h=>MR(e,h)),i=t.attributes||{},o={};for(const[h,m]of Object.entries(i))switch(!0){case h==="class":{o.className=m;break}case h==="style":{o.style=BY(String(m));break}case h.startsWith("aria-"):case h.startsWith("data-"):{o[h.toLowerCase()]=m;break}default:o[jR(h)]=m}const{style:l,"aria-label":c,...f}=n;return l&&(o.style=o.style?{...o.style,...l}:l),c&&(o["aria-label"]=c,o["aria-hidden"]="false"),e(t.tag,{...f,...o},...r)}var FY=MR.bind(null,lf.createElement),IT=(e,t)=>{const n=_.useId();return e||(t?n:void 0)},$Y=class{constructor(e="react-fontawesome"){this.enabled=!1;let t=!1;try{t=typeof process<"u"&&!1}catch{}this.scope=e,this.enabled=t}log(...e){this.enabled&&console.log(`[${this.scope}]`,...e)}warn(...e){this.enabled&&console.warn(`[${this.scope}]`,...e)}error(...e){this.enabled&&console.error(`[${this.scope}]`,...e)}},VY="searchPseudoElementsFullScan"in Ah?"7.0.0":"6.0.0",HY=Number.parseInt(VY)>=7,bh="fa",ko={beat:"fa-beat",fade:"fa-fade",beatFade:"fa-beat-fade",bounce:"fa-bounce",shake:"fa-shake",spin:"fa-spin",spinPulse:"fa-spin-pulse",spinReverse:"fa-spin-reverse",pulse:"fa-pulse"},qY={left:"fa-pull-left",right:"fa-pull-right"},GY={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},YY={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},Io={border:"fa-border",fixedWidth:"fa-fw",flip:"fa-flip",flipHorizontal:"fa-flip-horizontal",flipVertical:"fa-flip-vertical",inverse:"fa-inverse",rotateBy:"fa-rotate-by",swapOpacity:"fa-swap-opacity",widthAuto:"fa-width-auto"};function WY(e){const t=Ah.cssPrefix||Ah.familyPrefix||bh;return t===bh?e:e.replace(new RegExp(`(?<=^|\\s)${bh}-`,"g"),`${t}-`)}function KY(e){const{beat:t,fade:n,beatFade:r,bounce:i,shake:o,spin:l,spinPulse:c,spinReverse:f,pulse:h,fixedWidth:m,inverse:y,border:x,flip:b,size:C,rotation:w,pull:A,swapOpacity:O,rotateBy:P,widthAuto:N,className:F}=e,U=[];return F&&U.push(...F.split(" ")),t&&U.push(ko.beat),n&&U.push(ko.fade),r&&U.push(ko.beatFade),i&&U.push(ko.bounce),o&&U.push(ko.shake),l&&U.push(ko.spin),f&&U.push(ko.spinReverse),c&&U.push(ko.spinPulse),h&&U.push(ko.pulse),m&&U.push(Io.fixedWidth),y&&U.push(Io.inverse),x&&U.push(Io.border),b===!0&&U.push(Io.flip),(b==="horizontal"||b==="both")&&U.push(Io.flipHorizontal),(b==="vertical"||b==="both")&&U.push(Io.flipVertical),C!=null&&U.push(YY[C]),w!=null&&w!==0&&U.push(GY[w]),A!=null&&U.push(qY[A]),O&&U.push(Io.swapOpacity),HY?(P&&U.push(Io.rotateBy),N&&U.push(Io.widthAuto),(Ah.cssPrefix||Ah.familyPrefix||bh)===bh?U:U.map(WY)):U}var ZY=e=>typeof e=="object"&&"icon"in e&&!!e.icon;function zT(e){if(e)return ZY(e)?e:OR.icon(e)}function XY(e){return Object.keys(e)}var UT=new $Y("FontAwesomeIcon"),PR={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},QY=new Set(Object.keys(PR)),Be=lf.forwardRef((e,t)=>{const n={...PR,...e},{icon:r,mask:i,symbol:o,title:l,titleId:c,maskId:f,transform:h}=n,m=IT(f,!!i),y=IT(c,!!l),x=zT(r);if(!x)return UT.error("Icon lookup is undefined",r),null;const b=KY(n),C=typeof h=="string"?OR.transform(h):h,w=zT(i),A=kY(x,{...b.length>0&&{classes:b},...C&&{transform:C},...w&&{mask:w},symbol:o,title:l,titleId:y,maskId:m});if(!A)return UT.error("Could not find icon",x),null;const{abstract:O}=A,P={ref:t};for(const N of XY(n))QY.has(N)||(P[N]=n[N]);return FY(O[0],P)});Be.displayName="FontAwesomeIcon";function yy(){return typeof window<"u"}function Af(e){return LR(e)?(e.nodeName||"").toLowerCase():"#document"}function Mi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function is(e){var t;return(t=(LR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function LR(e){return yy()?e instanceof Node||e instanceof Mi(e).Node:!1}function Er(e){return yy()?e instanceof Element||e instanceof Mi(e).Element:!1}function Ni(e){return yy()?e instanceof HTMLElement||e instanceof Mi(e).HTMLElement:!1}function X2(e){return!yy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mi(e).ShadowRoot}const JY=new Set(["inline","contents"]);function Qh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ea(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!JY.has(i)}const eW=new Set(["table","td","th"]);function tW(e){return eW.has(Af(e))}const nW=[":popover-open",":modal"];function by(e){return nW.some(t=>{try{return e.matches(t)}catch{return!1}})}const rW=["transform","translate","scale","rotate","perspective"],iW=["transform","translate","scale","rotate","perspective","filter"],aW=["paint","layout","strict","content"];function $w(e){const t=Vw(),n=Er(e)?Ea(e):e;return rW.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||iW.some(r=>(n.willChange||"").includes(r))||aW.some(r=>(n.contain||"").includes(r))}function oW(e){let t=pl(e);for(;Ni(t)&&!cf(t);){if($w(t))return t;if(by(t))return null;t=pl(t)}return null}function Vw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sW=new Set(["html","body","#document"]);function cf(e){return sW.has(Af(e))}function Ea(e){return Mi(e).getComputedStyle(e)}function xy(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pl(e){if(Af(e)==="html")return e;const t=e.assignedSlot||e.parentNode||X2(e)&&e.host||is(e);return X2(t)?t.host:t}function NR(e){const t=pl(e);return cf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ni(t)&&Qh(t)?t:NR(t)}function RR(e,t,n){var r;t===void 0&&(t=[]);const i=NR(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Mi(i);return o?(Q2(l),t.concat(l,l.visualViewport||[],Qh(i)?i:[],[])):t.concat(i,RR(i,[]))}function Q2(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const lW=["top","right","bottom","left"],BT=["start","end"],FT=lW.reduce((e,t)=>e.concat(t,t+"-"+BT[0],t+"-"+BT[1]),[]),Th=Math.min,tf=Math.max,Zg=Math.round,to=e=>({x:e,y:e}),uW={left:"right",right:"left",bottom:"top",top:"bottom"},cW={start:"end",end:"start"};function fW(e,t,n){return tf(e,Th(t,n))}function Jh(e,t){return typeof e=="function"?e(t):e}function gl(e){return e.split("-")[0]}function no(e){return e.split("-")[1]}function dW(e){return e==="x"?"y":"x"}function Hw(e){return e==="y"?"height":"width"}const hW=new Set(["top","bottom"]);function Cu(e){return hW.has(gl(e))?"y":"x"}function qw(e){return dW(Cu(e))}function DR(e,t,n){n===void 0&&(n=!1);const r=no(e),i=qw(e),o=Hw(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Qg(l)),[l,Qg(l)]}function mW(e){const t=Qg(e);return[Xg(e),t,Xg(t)]}function Xg(e){return e.replace(/start|end/g,t=>cW[t])}const $T=["left","right"],VT=["right","left"],pW=["top","bottom"],gW=["bottom","top"];function vW(e,t,n){switch(e){case"top":case"bottom":return n?t?VT:$T:t?$T:VT;case"left":case"right":return t?pW:gW;default:return[]}}function yW(e,t,n,r){const i=no(e);let o=vW(gl(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Xg)))),o}function Qg(e){return e.replace(/left|right|bottom|top/g,t=>uW[t])}function bW(e){return{top:0,right:0,bottom:0,left:0,...e}}function kR(e){return typeof e!="number"?bW(e):{top:e,right:e,bottom:e,left:e}}function Jg(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const xW="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function _W(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&X2(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Jp(e){return e?.ownerDocument||document}function wW(e){return Ni(e)&&e.matches(xW)}function Oh(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var SW=typeof document<"u",CW=function(){},vl=SW?_.useLayoutEffect:CW;const EW={...lw};function al(e){const t=_.useRef(e);return vl(()=>{t.current=e}),t}const AW=EW.useInsertionEffect,TW=AW||(e=>e());function uh(e){const t=_.useRef(()=>{});return TW(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}var Tf=zL();function HT(e,t,n){let{reference:r,floating:i}=e;const o=Cu(t),l=qw(t),c=Hw(l),f=gl(t),h=o==="y",m=r.x+r.width/2-i.width/2,y=r.y+r.height/2-i.height/2,x=r[c]/2-i[c]/2;let b;switch(f){case"top":b={x:m,y:r.y-i.height};break;case"bottom":b={x:m,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y};break;case"left":b={x:r.x-i.width,y};break;default:b={x:r.x,y:r.y}}switch(no(t)){case"start":b[l]-=x*(n&&h?-1:1);break;case"end":b[l]+=x*(n&&h?-1:1);break}return b}const OW=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,c=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y}=HT(h,r,f),x=r,b={},C=0;for(let w=0;w<c.length;w++){const{name:A,fn:O}=c[w],{x:P,y:N,data:F,reset:U}=await O({x:m,y,initialPlacement:r,placement:x,strategy:i,middlewareData:b,rects:h,platform:l,elements:{reference:e,floating:t}});m=P??m,y=N??y,b={...b,[A]:{...b[A],...F}},U&&C<=50&&(C++,typeof U=="object"&&(U.placement&&(x=U.placement),U.rects&&(h=U.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):U.rects),{x:m,y}=HT(h,x,f)),w=-1)}return{x:m,y,placement:x,strategy:i,middlewareData:b}};async function IR(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:c,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:x=!1,padding:b=0}=Jh(t,e),C=kR(b),A=c[x?y==="floating"?"reference":"floating":y],O=Jg(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(A)))==null||n?A:A.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:f})),P=y==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,N=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),F=await(o.isElement==null?void 0:o.isElement(N))?await(o.getScale==null?void 0:o.getScale(N))||{x:1,y:1}:{x:1,y:1},U=Jg(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:P,offsetParent:N,strategy:f}):P);return{top:(O.top-U.top+C.top)/F.y,bottom:(U.bottom-O.bottom+C.bottom)/F.y,left:(O.left-U.left+C.left)/F.x,right:(U.right-O.right+C.right)/F.x}}const jW=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:h,padding:m=0}=Jh(e,t)||{};if(h==null)return{};const y=kR(m),x={x:n,y:r},b=qw(i),C=Hw(b),w=await l.getDimensions(h),A=b==="y",O=A?"top":"left",P=A?"bottom":"right",N=A?"clientHeight":"clientWidth",F=o.reference[C]+o.reference[b]-x[b]-o.floating[C],U=x[b]-o.reference[b],W=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let X=W?W[N]:0;(!X||!await(l.isElement==null?void 0:l.isElement(W)))&&(X=c.floating[N]||o.floating[C]);const ae=F/2-U/2,ce=X/2-w[C]/2-1,re=Th(y[O],ce),J=Th(y[P],ce),oe=re,_e=X-w[C]-J,se=X/2-w[C]/2+ae,ue=fW(oe,se,_e),Y=!f.arrow&&no(i)!=null&&se!==ue&&o.reference[C]/2-(se<oe?re:J)-w[C]/2<0,k=Y?se<oe?se-oe:se-_e:0;return{[b]:x[b]+k,data:{[b]:ue,centerOffset:se-ue-k,...Y&&{alignmentOffset:k}},reset:Y}}});function MW(e,t,n){return(e?[...n.filter(i=>no(i)===e),...n.filter(i=>no(i)!==e)]:n.filter(i=>gl(i)===i)).filter(i=>e?no(i)===e||(t?Xg(i)!==i:!1):!0)}const PW=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:o,middlewareData:l,placement:c,platform:f,elements:h}=t,{crossAxis:m=!1,alignment:y,allowedPlacements:x=FT,autoAlignment:b=!0,...C}=Jh(e,t),w=y!==void 0||x===FT?MW(y||null,b,x):x,A=await IR(t,C),O=((n=l.autoPlacement)==null?void 0:n.index)||0,P=w[O];if(P==null)return{};const N=DR(P,o,await(f.isRTL==null?void 0:f.isRTL(h.floating)));if(c!==P)return{reset:{placement:w[0]}};const F=[A[gl(P)],A[N[0]],A[N[1]]],U=[...((r=l.autoPlacement)==null?void 0:r.overflows)||[],{placement:P,overflows:F}],W=w[O+1];if(W)return{data:{index:O+1,overflows:U},reset:{placement:W}};const X=U.map(re=>{const J=no(re.placement);return[re.placement,J&&m?re.overflows.slice(0,2).reduce((oe,_e)=>oe+_e,0):re.overflows[0],re.overflows]}).sort((re,J)=>re[1]-J[1]),ce=((i=X.filter(re=>re[2].slice(0,no(re[0])?2:3).every(J=>J<=0))[0])==null?void 0:i[0])||X[0][0];return ce!==c?{data:{index:O+1,overflows:U},reset:{placement:ce}}:{}}}},LW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:h}=t,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:w=!0,...A}=Jh(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const O=gl(i),P=Cu(c),N=gl(c)===c,F=await(f.isRTL==null?void 0:f.isRTL(h.floating)),U=x||(N||!w?[Qg(c)]:mW(c)),W=C!=="none";!x&&W&&U.push(...yW(c,w,C,F));const X=[c,...U],ae=await IR(t,A),ce=[];let re=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&ce.push(ae[O]),y){const se=DR(i,l,F);ce.push(ae[se[0]],ae[se[1]])}if(re=[...re,{placement:i,overflows:ce}],!ce.every(se=>se<=0)){var J,oe;const se=(((J=o.flip)==null?void 0:J.index)||0)+1,ue=X[se];if(ue&&(!(y==="alignment"?P!==Cu(ue):!1)||re.every(z=>Cu(z.placement)===P?z.overflows[0]>0:!0)))return{data:{index:se,overflows:re},reset:{placement:ue}};let Y=(oe=re.filter(k=>k.overflows[0]<=0).sort((k,z)=>k.overflows[1]-z.overflows[1])[0])==null?void 0:oe.placement;if(!Y)switch(b){case"bestFit":{var _e;const k=(_e=re.filter(z=>{if(W){const H=Cu(z.placement);return H===P||H==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(H=>H>0).reduce((H,I)=>H+I,0)]).sort((z,H)=>z[1]-H[1])[0])==null?void 0:_e[0];k&&(Y=k);break}case"initialPlacement":Y=c;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}},NW=new Set(["left","top"]);async function RW(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=gl(n),c=no(n),f=Cu(n)==="y",h=NW.has(l)?-1:1,m=o&&f?-1:1,y=Jh(t,e);let{mainAxis:x,crossAxis:b,alignmentAxis:C}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return c&&typeof C=="number"&&(b=c==="end"?C*-1:C),f?{x:b*m,y:x*h}:{x:x*h,y:b*m}}const DW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:c}=t,f=await RW(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:l}}}}};function zR(e){const t=Ea(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ni(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=Zg(n)!==o||Zg(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function UR(e){return Er(e)?e:e.contextElement}function nf(e){const t=UR(e);if(!Ni(t))return to(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=zR(t);let l=(o?Zg(n.width):n.width)/r,c=(o?Zg(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const kW=to(0);function BR(e){const t=Mi(e);return!Vw()||!t.visualViewport?kW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mi(e)?!1:t}function jh(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=UR(e);let l=to(1);t&&(r?Er(r)&&(l=nf(r)):l=nf(e));const c=IW(o,n,r)?BR(o):to(0);let f=(i.left+c.x)/l.x,h=(i.top+c.y)/l.y,m=i.width/l.x,y=i.height/l.y;if(o){const x=Mi(o),b=r&&Er(r)?Mi(r):r;let C=x,w=Q2(C);for(;w&&r&&b!==C;){const A=nf(w),O=w.getBoundingClientRect(),P=Ea(w),N=O.left+(w.clientLeft+parseFloat(P.paddingLeft))*A.x,F=O.top+(w.clientTop+parseFloat(P.paddingTop))*A.y;f*=A.x,h*=A.y,m*=A.x,y*=A.y,f+=N,h+=F,C=Mi(w),w=Q2(C)}}return Jg({width:m,height:y,x:f,y:h})}function _y(e,t){const n=xy(e).scrollLeft;return t?t.left+n:jh(is(e)).left+n}function FR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-_y(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function zW(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=is(r),c=t?by(t.floating):!1;if(r===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},h=to(1);const m=to(0),y=Ni(r);if((y||!y&&!o)&&((Af(r)!=="body"||Qh(l))&&(f=xy(r)),Ni(r))){const b=jh(r);h=nf(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const x=l&&!y&&!o?FR(l,f):to(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+x.x,y:n.y*h.y-f.scrollTop*h.y+m.y+x.y}}function UW(e){return Array.from(e.getClientRects())}function BW(e){const t=is(e),n=xy(e),r=e.ownerDocument.body,i=tf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=tf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+_y(e);const c=-n.scrollTop;return Ea(r).direction==="rtl"&&(l+=tf(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:c}}const qT=25;function FW(e,t){const n=Mi(e),r=is(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,f=0;if(i){o=i.width,l=i.height;const m=Vw();(!m||m&&t==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const h=_y(r);if(h<=0){const m=r.ownerDocument,y=m.body,x=getComputedStyle(y),b=m.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,C=Math.abs(r.clientWidth-y.clientWidth-b);C<=qT&&(o-=C)}else h<=qT&&(o+=h);return{width:o,height:l,x:c,y:f}}const $W=new Set(["absolute","fixed"]);function VW(e,t){const n=jh(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ni(e)?nf(e):to(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=i*o.x,h=r*o.y;return{width:l,height:c,x:f,y:h}}function GT(e,t,n){let r;if(t==="viewport")r=FW(e,n);else if(t==="document")r=BW(is(e));else if(Er(t))r=VW(t,n);else{const i=BR(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Jg(r)}function $R(e,t){const n=pl(e);return n===t||!Er(n)||cf(n)?!1:Ea(n).position==="fixed"||$R(n,t)}function HW(e,t){const n=t.get(e);if(n)return n;let r=RR(e,[]).filter(c=>Er(c)&&Af(c)!=="body"),i=null;const o=Ea(e).position==="fixed";let l=o?pl(e):e;for(;Er(l)&&!cf(l);){const c=Ea(l),f=$w(l);!f&&c.position==="fixed"&&(i=null),(o?!f&&!i:!f&&c.position==="static"&&!!i&&$W.has(i.position)||Qh(l)&&!f&&$R(e,l))?r=r.filter(m=>m!==l):i=c,l=pl(l)}return t.set(e,r),r}function qW(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?by(t)?[]:HW(t,this._c):[].concat(n),r],c=l[0],f=l.reduce((h,m)=>{const y=GT(t,m,i);return h.top=tf(y.top,h.top),h.right=Th(y.right,h.right),h.bottom=Th(y.bottom,h.bottom),h.left=tf(y.left,h.left),h},GT(t,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function GW(e){const{width:t,height:n}=zR(e);return{width:t,height:n}}function YW(e,t,n){const r=Ni(t),i=is(t),o=n==="fixed",l=jh(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=to(0);function h(){f.x=_y(i)}if(r||!r&&!o)if((Af(t)!=="body"||Qh(i))&&(c=xy(t)),r){const b=jh(t,!0,o,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}else i&&h();o&&!r&&i&&h();const m=i&&!r&&!o?FR(i,c):to(0),y=l.left+c.scrollLeft-f.x-m.x,x=l.top+c.scrollTop-f.y-m.y;return{x:y,y:x,width:l.width,height:l.height}}function Nb(e){return Ea(e).position==="static"}function YT(e,t){if(!Ni(e)||Ea(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return is(e)===n&&(n=n.ownerDocument.body),n}function VR(e,t){const n=Mi(e);if(by(e))return n;if(!Ni(e)){let i=pl(e);for(;i&&!cf(i);){if(Er(i)&&!Nb(i))return i;i=pl(i)}return n}let r=YT(e,t);for(;r&&tW(r)&&Nb(r);)r=YT(r,t);return r&&cf(r)&&Nb(r)&&!$w(r)?n:r||oW(e)||n}const WW=async function(e){const t=this.getOffsetParent||VR,n=this.getDimensions,r=await n(e.floating);return{reference:YW(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function KW(e){return Ea(e).direction==="rtl"}const ZW={convertOffsetParentRelativeRectToViewportRelativeRect:zW,getDocumentElement:is,getClippingRect:qW,getOffsetParent:VR,getElementRects:WW,getClientRects:UW,getDimensions:GW,getScale:nf,isElement:Er,isRTL:KW},XW=DW,QW=PW,JW=LW,WT=jW,eK=(e,t,n)=>{const r=new Map,i={platform:ZW,...n},o={...i.platform,_c:r};return OW(e,t,{...i,platform:o})};var tK=typeof document<"u",nK=function(){},Ng=tK?_.useLayoutEffect:nK;function ev(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ev(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ev(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function HR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function KT(e,t){const n=HR(e);return Math.round(t*n)/n}function Rb(e){const t=_.useRef(e);return Ng(()=>{t.current=e}),t}function rK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:h}=e,[m,y]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,b]=_.useState(r);ev(x,r)||b(r);const[C,w]=_.useState(null),[A,O]=_.useState(null),P=_.useCallback(z=>{z!==W.current&&(W.current=z,w(z))},[]),N=_.useCallback(z=>{z!==X.current&&(X.current=z,O(z))},[]),F=o||C,U=l||A,W=_.useRef(null),X=_.useRef(null),ae=_.useRef(m),ce=f!=null,re=Rb(f),J=Rb(i),oe=Rb(h),_e=_.useCallback(()=>{if(!W.current||!X.current)return;const z={placement:t,strategy:n,middleware:x};J.current&&(z.platform=J.current),eK(W.current,X.current,z).then(H=>{const I={...H,isPositioned:oe.current!==!1};se.current&&!ev(ae.current,I)&&(ae.current=I,Tf.flushSync(()=>{y(I)}))})},[x,t,n,J,oe]);Ng(()=>{h===!1&&ae.current.isPositioned&&(ae.current.isPositioned=!1,y(z=>({...z,isPositioned:!1})))},[h]);const se=_.useRef(!1);Ng(()=>(se.current=!0,()=>{se.current=!1}),[]),Ng(()=>{if(F&&(W.current=F),U&&(X.current=U),F&&U){if(re.current)return re.current(F,U,_e);_e()}},[F,U,_e,re,ce]);const ue=_.useMemo(()=>({reference:W,floating:X,setReference:P,setFloating:N}),[P,N]),Y=_.useMemo(()=>({reference:F,floating:U}),[F,U]),k=_.useMemo(()=>{const z={position:n,left:0,top:0};if(!Y.floating)return z;const H=KT(Y.floating,m.x),I=KT(Y.floating,m.y);return c?{...z,transform:"translate("+H+"px, "+I+"px)",...HR(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:I}},[n,c,Y.floating,m.x,m.y]);return _.useMemo(()=>({...m,update:_e,refs:ue,elements:Y,floatingStyles:k}),[m,_e,ue,Y,k])}const iK=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?WT({element:r.current,padding:i}).fn(n):{}:r?WT({element:r,padding:i}).fn(n):{}}}},aK=(e,t)=>({...XW(e),options:[e,t]}),oK=(e,t)=>({...JW(e),options:[e,t]}),sK=(e,t)=>({...QW(e),options:[e,t]}),lK=(e,t)=>({...iK(e),options:[e,t]}),uK="data-floating-ui-focusable",ZT="active",XT="selected",cK={...lw};let QT=!1,fK=0;const JT=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+fK++;function dK(){const[e,t]=_.useState(()=>QT?JT():void 0);return vl(()=>{e==null&&t(JT())},[]),_.useEffect(()=>{QT=!0},[]),e}const hK=cK.useId,mK=hK||dK;function pK(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const gK=_.createContext(null),vK=_.createContext(null),qR=()=>{var e;return((e=_.useContext(gK))==null?void 0:e.id)||null},GR=()=>_.useContext(vK);function yK(e){return"data-floating-ui-"+e}function va(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const eO=yK("safe-polygon");function Db(e,t,n){if(n&&!Oh(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function kb(e){return typeof e=="function"?e():e}function bK(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,elements:l}=e,{enabled:c=!0,delay:f=0,handleClose:h=null,mouseOnly:m=!1,restMs:y=0,move:x=!0}=t,b=GR(),C=qR(),w=al(h),A=al(f),O=al(n),P=al(y),N=_.useRef(),F=_.useRef(-1),U=_.useRef(),W=_.useRef(-1),X=_.useRef(!0),ae=_.useRef(!1),ce=_.useRef(()=>{}),re=_.useRef(!1),J=uh(()=>{var k;const z=(k=i.current.openEvent)==null?void 0:k.type;return z?.includes("mouse")&&z!=="mousedown"});_.useEffect(()=>{if(!c)return;function k(z){let{open:H}=z;H||(va(F),va(W),X.current=!0,re.current=!1)}return o.on("openchange",k),()=>{o.off("openchange",k)}},[c,o]),_.useEffect(()=>{if(!c||!w.current||!n)return;function k(H){J()&&r(!1,H,"hover")}const z=Jp(l.floating).documentElement;return z.addEventListener("mouseleave",k),()=>{z.removeEventListener("mouseleave",k)}},[l.floating,n,r,c,w,J]);const oe=_.useCallback(function(k,z,H){z===void 0&&(z=!0),H===void 0&&(H="hover");const I=Db(A.current,"close",N.current);I&&!U.current?(va(F),F.current=window.setTimeout(()=>r(!1,k,H),I)):z&&(va(F),r(!1,k,H))},[A,r]),_e=uh(()=>{ce.current(),U.current=void 0}),se=uh(()=>{if(ae.current){const k=Jp(l.floating).body;k.style.pointerEvents="",k.removeAttribute(eO),ae.current=!1}}),ue=uh(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);_.useEffect(()=>{if(!c)return;function k(q){if(va(F),X.current=!1,m&&!Oh(N.current)||kb(P.current)>0&&!Db(A.current,"open"))return;const ee=Db(A.current,"open",N.current);ee?F.current=window.setTimeout(()=>{O.current||r(!0,q,"hover")},ee):n||r(!0,q,"hover")}function z(q){if(ue()){se();return}ce.current();const ee=Jp(l.floating);if(va(W),re.current=!1,w.current&&i.current.floatingContext){n||va(F),U.current=w.current({...i.current.floatingContext,tree:b,x:q.clientX,y:q.clientY,onClose(){se(),_e(),ue()||oe(q,!0,"safe-polygon")}});const pe=U.current;ee.addEventListener("mousemove",pe),ce.current=()=>{ee.removeEventListener("mousemove",pe)};return}(N.current==="touch"?!_W(l.floating,q.relatedTarget):!0)&&oe(q)}function H(q){ue()||i.current.floatingContext&&(w.current==null||w.current({...i.current.floatingContext,tree:b,x:q.clientX,y:q.clientY,onClose(){se(),_e(),ue()||oe(q)}})(q))}function I(){va(F)}function j(q){ue()||oe(q,!1)}if(Er(l.domReference)){const q=l.domReference,ee=l.floating;return n&&q.addEventListener("mouseleave",H),x&&q.addEventListener("mousemove",k,{once:!0}),q.addEventListener("mouseenter",k),q.addEventListener("mouseleave",z),ee&&(ee.addEventListener("mouseleave",H),ee.addEventListener("mouseenter",I),ee.addEventListener("mouseleave",j)),()=>{n&&q.removeEventListener("mouseleave",H),x&&q.removeEventListener("mousemove",k),q.removeEventListener("mouseenter",k),q.removeEventListener("mouseleave",z),ee&&(ee.removeEventListener("mouseleave",H),ee.removeEventListener("mouseenter",I),ee.removeEventListener("mouseleave",j))}}},[l,c,e,m,x,oe,_e,se,r,n,O,b,A,w,i,ue,P]),vl(()=>{var k;if(c&&n&&(k=w.current)!=null&&(k=k.__options)!=null&&k.blockPointerEvents&&J()){ae.current=!0;const H=l.floating;if(Er(l.domReference)&&H){var z;const I=Jp(l.floating).body;I.setAttribute(eO,"");const j=l.domReference,q=b==null||(z=b.nodesRef.current.find(ee=>ee.id===C))==null||(z=z.context)==null?void 0:z.elements.floating;return q&&(q.style.pointerEvents=""),I.style.pointerEvents="none",j.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{I.style.pointerEvents="",j.style.pointerEvents="",H.style.pointerEvents=""}}}},[c,n,C,l,b,w,J]),vl(()=>{n||(N.current=void 0,re.current=!1,_e(),se())},[n,_e,se]),_.useEffect(()=>()=>{_e(),va(F),va(W),se()},[c,l.domReference,_e,se]);const Y=_.useMemo(()=>{function k(z){N.current=z.pointerType}return{onPointerDown:k,onPointerEnter:k,onMouseMove(z){const{nativeEvent:H}=z;function I(){!X.current&&!O.current&&r(!0,H,"hover")}m&&!Oh(N.current)||n||kb(P.current)===0||re.current&&z.movementX**2+z.movementY**2<2||(va(W),N.current==="touch"?I():(re.current=!0,W.current=window.setTimeout(I,kb(P.current))))}}},[m,r,n,O,P]);return _.useMemo(()=>c?{reference:Y}:{},[c,Y])}function tO(e){return Ni(e.target)&&e.target.tagName==="BUTTON"}function xK(e){return Ni(e.target)&&e.target.tagName==="A"}function nO(e){return wW(e)}function _K(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:l=!0,event:c="click",toggle:f=!0,ignoreMouse:h=!1,keyboardHandlers:m=!0,stickIfOpen:y=!0}=t,x=_.useRef(),b=_.useRef(!1),C=_.useMemo(()=>({onPointerDown(w){x.current=w.pointerType},onMouseDown(w){const A=x.current;w.button===0&&c!=="click"&&(Oh(A,!0)&&h||(n&&f&&(!(i.current.openEvent&&y)||i.current.openEvent.type==="mousedown")?r(!1,w.nativeEvent,"click"):(w.preventDefault(),r(!0,w.nativeEvent,"click"))))},onClick(w){const A=x.current;if(c==="mousedown"&&x.current){x.current=void 0;return}Oh(A,!0)&&h||(n&&f&&(!(i.current.openEvent&&y)||i.current.openEvent.type==="click")?r(!1,w.nativeEvent,"click"):r(!0,w.nativeEvent,"click"))},onKeyDown(w){x.current=void 0,!(w.defaultPrevented||!m||tO(w))&&(w.key===" "&&!nO(o)&&(w.preventDefault(),b.current=!0),!xK(w)&&w.key==="Enter"&&r(!(n&&f),w.nativeEvent,"click"))},onKeyUp(w){w.defaultPrevented||!m||tO(w)||nO(o)||w.key===" "&&b.current&&(b.current=!1,r(!(n&&f),w.nativeEvent,"click"))}}),[i,o,c,h,m,r,n,y,f]);return _.useMemo(()=>l?{reference:C}:{},[l,C])}function wK(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=mK(),o=_.useRef({}),[l]=_.useState(()=>pK()),c=qR()!=null,[f,h]=_.useState(r.reference),m=uh((b,C,w)=>{o.current.openEvent=b?C:void 0,l.emit("openchange",{open:b,event:C,reason:w,nested:c}),n?.(b,C,w)}),y=_.useMemo(()=>({setPositionReference:h}),[]),x=_.useMemo(()=>({reference:f||r.reference||null,floating:r.floating||null,domReference:r.reference}),[f,r.reference,r.floating]);return _.useMemo(()=>({dataRef:o,open:t,onOpenChange:m,elements:x,events:l,floatingId:i,refs:y}),[t,m,x,l,i,y])}function YR(e){e===void 0&&(e={});const{nodeId:t}=e,n=wK({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,l]=_.useState(null),[c,f]=_.useState(null),m=i?.domReference||o,y=_.useRef(null),x=GR();vl(()=>{m&&(y.current=m)},[m]);const b=rK({...e,elements:{...i,...c&&{reference:c}}}),C=_.useCallback(N=>{const F=Er(N)?{getBoundingClientRect:()=>N.getBoundingClientRect(),getClientRects:()=>N.getClientRects(),contextElement:N}:N;f(F),b.refs.setReference(F)},[b.refs]),w=_.useCallback(N=>{(Er(N)||N===null)&&(y.current=N,l(N)),(Er(b.refs.reference.current)||b.refs.reference.current===null||N!==null&&!Er(N))&&b.refs.setReference(N)},[b.refs]),A=_.useMemo(()=>({...b.refs,setReference:w,setPositionReference:C,domReference:y}),[b.refs,w,C]),O=_.useMemo(()=>({...b.elements,domReference:m}),[b.elements,m]),P=_.useMemo(()=>({...b,...r,refs:A,elements:O,nodeId:t}),[b,A,O,t,r]);return vl(()=>{r.dataRef.current.floatingContext=P;const N=x?.nodesRef.current.find(F=>F.id===t);N&&(N.context=P)}),_.useMemo(()=>({...b,context:P,refs:A,elements:O}),[b,A,O,P])}function Ib(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[ZT]:l,[XT]:c,...f}=e;o=f}return{...n==="floating"&&{tabIndex:-1,[uK]:""},...o,...t.map(l=>{const c=l?l[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(f=>{let[h,m]=f;if(!(i&&[ZT,XT].includes(h)))if(h.indexOf("on")===0){if(r.has(h)||r.set(h,[]),typeof m=="function"){var y;(y=r.get(h))==null||y.push(m),l[h]=function(){for(var x,b=arguments.length,C=new Array(b),w=0;w<b;w++)C[w]=arguments[w];return(x=r.get(h))==null?void 0:x.map(A=>A(...C)).find(A=>A!==void 0)}}}else l[h]=m}),l),{})}}function WR(e){e===void 0&&(e=[]);const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),i=_.useCallback(c=>Ib(c,e,"reference"),t),o=_.useCallback(c=>Ib(c,e,"floating"),n),l=_.useCallback(c=>Ib(c,e,"item"),r);return _.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:l}),[i,o,l])}const rO=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Vc(e,t){return typeof e=="function"?e(t):e}function SK(e,t){const[n,r]=_.useState(e);return e&&!n&&r(!0),_.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function CK(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,l=(typeof i=="number"?i:i.close)||0,[c,f]=_.useState("unmounted"),h=SK(n,l);return!h&&c==="close"&&f("unmounted"),vl(()=>{if(r){if(n){f("initial");const m=requestAnimationFrame(()=>{Tf.flushSync(()=>{f("open")})});return()=>{cancelAnimationFrame(m)}}f("close")}},[n,r]),{isMounted:h,status:c}}function EK(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:o,duration:l=250}=t,c=e.placement,f=c.split("-")[0],h=_.useMemo(()=>({side:f,placement:c}),[f,c]),m=typeof l=="number",y=(m?l:l.open)||0,x=(m?l:l.close)||0,[b,C]=_.useState(()=>({...Vc(o,h),...Vc(n,h)})),{isMounted:w,status:A}=CK(e,{duration:l}),O=al(n),P=al(r),N=al(i),F=al(o);return vl(()=>{const U=Vc(O.current,h),W=Vc(N.current,h),X=Vc(F.current,h),ae=Vc(P.current,h)||Object.keys(U).reduce((ce,re)=>(ce[re]="",ce),{});if(A==="initial"&&C(ce=>({transitionProperty:ce.transitionProperty,...X,...U})),A==="open"&&C({transitionProperty:Object.keys(ae).map(rO).join(","),transitionDuration:y+"ms",...X,...ae}),A==="close"){const ce=W||U;C({transitionProperty:Object.keys(ce).map(rO).join(","),transitionDuration:x+"ms",...X,...ce})}},[x,N,O,P,F,y,A,h]),{isMounted:w,styles:b}}var KR={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M288 464L64 464c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16l48 0 0-48-48 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-48-48 0 0 48c0 8.8-7.2 16-16 16zM224 304c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16l224 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-224 0zm-64-16c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L224 0c-35.3 0-64 28.7-64 64l0 224z"]},AK={prefix:"far",iconName:"image",icon:[448,512,[],"f03e","M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm128 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm136 72c8.5 0 16.4 4.5 20.7 11.8l80 136c4.4 7.4 4.4 16.6 .1 24.1S352.6 384 344 384l-240 0c-8.9 0-17.2-5-21.3-12.9s-3.5-17.5 1.6-24.8l56-80c4.5-6.4 11.8-10.2 19.7-10.2s15.2 3.8 19.7 10.2l17.2 24.6 46.5-79c4.3-7.3 12.2-11.8 20.7-11.8z"]},TK={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 -416 0 208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"]},OK={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zm387.3 11.3c6.2-6.2 6.2-16.4 0-22.6l-104-104c-4.6-4.6-11.5-5.9-17.4-3.5S256 145.5 256 152l0 72-104 0c-13.3 0-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24l104 0 0 72c0 6.5 3.9 12.3 9.9 14.8s12.9 1.1 17.4-3.5l104-104z"]},jK=OK;const MK=({children:e,summary:t,summaryClasses:n,...r})=>{const i=_.useRef(null),[o,l]=_.useState(!1);return _.useEffect(()=>{const c=i.current,f=()=>l(!!c?.open);return c?.addEventListener("toggle",f),()=>c?.removeEventListener("toggle",f)},[]),g.jsxs("details",{ref:i,...r,children:[g.jsx("summary",{className:Oe("focus-ring px-1 -mx-1 rounded-sm",n),children:t}),o&&g.jsx("div",{className:"mt-3 flex flex-col gap-y-3",children:e})]})},PK=_.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:Oe("px-4 py-3 rounded-t-md","bg-lm-primary dark:bg-dm-primary border-b border-lm-border dark:border-dm-border",e),...t,ref:n})),LK=_.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:Oe("p-4 bg-lm-primary dark:bg-dm-primary first:rounded-t-md","first:rounded-t-md last:rounded-b-md",e),...t,ref:n})),NK=_.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:Oe("px-4 py-3 rounded-b-md","bg-lm-primary dark:bg-dm-primary border-t border-lm-border dark:border-dm-border",e),...t,ref:n})),RK=_.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:Oe("group/card rounded-md shadow-md","border border-lm-border dark:border-dm-border bg-lm-primary dark:bg-dm-primary",e),...t,ref:n})),ln=Object.assign(RK,{Body:LK,Header:PK,Footer:NK}),Nt=_.forwardRef(({bodyClassName:e,children:t,...n},r)=>{const{title:i,titleSize:o="md",...l}="title"in n?n:{...n,title:void 0,titleSize:void 0};return g.jsxs(ln,{...l,ref:r,children:[i&&g.jsxs(ln.Header,{children:[o==="lg"&&g.jsx("h4",{children:i}),o==="md"&&g.jsx("h5",{children:i}),o==="sm"&&g.jsx("h6",{children:i})]}),g.jsx(ln.Body,{className:e,children:t})]})});function DK({id:e,items:t,onSelectItem:n,onActiveItemChange:r,renderItem:i,className:o,noItemsMessage:l="No items",anchor:c,"aria-label":f="Items",...h}){const[m,y]=_.useState(0),x=_.useCallback(b=>{if(y(b),r){const[C,w]=[...t.entries()][b];r(C,w)}},[t,r]);return _.useEffect(()=>{const b=c?.current;if(!b)return;const C=w=>{["Enter","ArrowUp","ArrowDown"].includes(w.key)&&w.preventDefault(),w.key==="ArrowDown"?x(Math.min(m+1,t.size-1)):w.key==="ArrowUp"?x(Math.max(m-1,0)):w.key==="Enter"&&n([...t.values()][m])};return b.addEventListener("keydown",C),()=>b.removeEventListener("keydown",C)},[m,c,x,t,n]),g.jsxs(ln,{id:e,className:Oe("py-1 flex flex-col",o),role:"listbox","aria-orientation":"vertical","aria-label":f,...h,children:[t.size===0&&g.jsx("i",{role:"option","aria-disabled":!0,"aria-selected":!1,"data-testid":"no-items",className:"px-2 py-1",children:l}),[...t.entries()].map(([b,C],w)=>g.jsx("button",{id:`${e}_${b}`,type:"button",role:"option","aria-selected":w===m,className:Oe("px-2 py-1 text-left truncate",{"bg-lm-secondary dark:bg-dm-secondary":w===m}),tabIndex:-1,onClick:()=>n(C),onMouseOver:()=>x(w),children:i(C)},b))]})}const em=_.createContext(void 0),Of=_.createContext({responsive:!0,size:"md"}),kK=({children:e,className:t})=>{const{responsive:n}=_.useContext(Of);return g.jsx(em.Provider,{value:{section:"head"},children:g.jsx("thead",{className:Oe({"hidden lg:table-header-group":n},t),children:e})})},IK=({children:e,className:t})=>{const{responsive:n}=_.useContext(Of);return g.jsx(em.Provider,{value:{section:"body"},children:g.jsx("tbody",{className:Oe({"lg:table-row-group flex flex-col gap-y-3":n},t),children:e})})},zK=({children:e,className:t})=>{const{responsive:n}=_.useContext(Of);return g.jsx(em.Provider,{value:{section:"footer"},children:g.jsx("tfoot",{className:Oe({"lg:table-row-group flex flex-col gap-y-3 mt-4":n},t),children:e})})},UK=({children:e,className:t,...n})=>{const r=_.useContext(em)?.section==="body",{responsive:i}=_.useContext(Of);return g.jsx("tr",{className:Oe("group",{"lg:table-row flex flex-col":i,"lg:border-0 border-y-2 border-lm-border dark:border-dm-border":i,"hover:bg-lm-primary dark:hover:bg-dm-primary":r,"group-[&]/card:hover:bg-lm-secondary dark:group-[&]/card:hover:bg-dm-secondary":r},t),...n,children:e})},BK=({children:e,className:t,columnName:n,type:r,...i})=>{const o=_.useContext(em),l=r??(o?.section!=="body"?"th":"td"),{responsive:c,size:f}=_.useContext(Of);return g.jsx(l,{"data-column":c?n:void 0,className:Oe("border-lm-border dark:border-dm-border",{"p-1":f==="sm","p-2":f==="md","p-3":f==="lg","border-b-1":!c,"block lg:table-cell not-last:border-b-1 lg:border-b-1":c,"text-left":l==="th","before:lg:hidden before:content-[attr(data-column)] before:font-bold before:mr-1":c&&l==="td"},t),...i,children:e})},FK=({header:e,footer:t,children:n,responsive:r=!0,size:i="md",...o})=>g.jsx(Of.Provider,{value:{responsive:r,size:i},children:g.jsxs("table",{className:"w-full",...o,children:[g.jsx(kK,{children:e}),g.jsx(IK,{children:n}),t&&g.jsx(zK,{children:t})]})}),$e=Object.assign(FK,{Row:UK,Cell:BK}),Tt=_.forwardRef(({className:e,disabled:t,variant:n="primary",size:r="md",inline:i=!1,solid:o=!1,type:l="button",...c},f)=>{const h="to"in c&&typeof c.to=="string",m=h?Ir:"button",y=h?void 0:l;return g.jsx(m,{ref:f,className:Oe({"inline-flex":i,flex:!i},"gap-2 items-center justify-center","border rounded-md no-underline","transition-colors",{"focus-ring":n==="primary","focus-ring-secondary":n==="secondary","focus-ring-danger":n==="danger"},{"px-1.5 py-1 text-sm":r==="sm","px-3 py-1.5":r==="md","px-4 py-2 text-lg":r==="lg"},{"border-lm-brand dark:border-dm-brand":n==="primary","text-lm-brand dark:text-dm-brand":n==="primary"&&!o,"border-zinc-500":n==="secondary","text-zinc-500":n==="secondary"&&!o,"border-danger":n==="danger","text-danger":n==="danger"&&!o},o&&{"text-white":!0,"bg-lm-brand dark:bg-dm-brand":n==="primary","highlight:bg-lm-brand-dark dark:highlight:bg-dm-brand-dark":n==="primary","highlight:border-lm-brand-dark dark:highlight:border-dm-brand-dark":n==="primary","bg-zinc-500":n==="secondary","highlight:bg-zinc-600 highlight:border-zinc-600":n==="secondary","bg-danger":n==="danger","highlight:bg-danger-dark highlight:border-danger-dark":n==="danger"},!t&&{"highlight:text-white":!o,"highlight:bg-lm-brand dark:highlight:bg-dm-brand":n==="primary","highlight:bg-zinc-500":n==="secondary","highlight:bg-danger":n==="danger"},{"cursor-pointer":!t,"pointer-events-none opacity-65":t},e),disabled:h?void 0:t,"aria-disabled":h?t:void 0,type:y,...c})}),ZR=_.forwardRef(({className:e,onChange:t,...n},r)=>{const i=_.useCallback(o=>t?.(o.target.checked,o),[t]);return g.jsx("input",{ref:r,type:"checkbox",className:Oe("appearance-none focus-ring cursor-[inherit]","border-1 border-lm-input-border dark:border-dm-input-border","bg-lm-primary dark:bg-dm-primary checked:bg-lm-brand dark:checked:bg-dm-brand bg-no-repeat","group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input",e),onChange:i,...n})}),Gw=_.forwardRef(({className:e,...t},n)=>g.jsx(ZR,{ref:n,className:Oe("rounded-sm w-4 h-4 checked:bg-(image:--tick) bg-center",e),...t})),ku=_.forwardRef(({onClick:e,className:t,label:n="Close",size:r="lg",solid:i},o)=>g.jsx("button",{ref:o,type:"button",onClick:e,className:Oe("rounded-md focus-ring cursor-pointer",{"opacity-50 highlight:opacity-80 transition-opacity":!i},t),"aria-label":n,children:g.jsx(Be,{icon:fy,size:r==="lg"?"xl":r==="md"?"lg":void 0})})),Ti=_.forwardRef(({borderless:e=!1,size:t="md",feedback:n,variant:r="default",className:i,disabled:o,...l},c)=>g.jsx("input",{ref:c,className:Oe("outline-none",r==="default"&&["w-full",{"focus-ring":!n,"focus-ring-danger":n==="error","px-2 py-1 text-sm":t==="sm","px-3 py-1.5":t==="md","px-4 py-2 text-xl":t==="lg","rounded-md border":!e,"border-lm-input-border dark:border-dm-input-border":!e&&!n,"border-danger":!e&&n==="error","bg-lm-disabled-input dark:bg-dm-disabled-input":o,"bg-lm-primary dark:bg-dm-primary":!o,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!o}],i),disabled:o,...l})),ja=({required:e,children:t,className:n,...r})=>g.jsxs("label",{className:Oe("cursor-pointer",n),...r,children:[t,e&&g.jsx("span",{className:"text-danger ml-1","data-testid":"required-indicator",children:"*"})]}),Yw=({children:e,helpText:t,error:n,"data-testid":r})=>g.jsxs("div",{className:"flex flex-col gap-1","data-testid":r,children:[e,t&&g.jsx("small",{"data-testid":r?`${r}-help-text`:"help-text",className:"text-gray-500 dark:text-gray-400",children:t}),n&&g.jsx("span",{"data-testid":r?`${r}-error`:"error",className:"text-danger",children:n})]}),di=_.forwardRef(({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:o,"data-testid":l,...c},f)=>{const h=_.useId();return g.jsxs(Yw,{error:i,helpText:o,"data-testid":l,children:[g.jsx(ja,{htmlFor:h,required:n,children:e}),g.jsx(Ti,{ref:f,id:h,className:t,required:n||r,feedback:i?"error":void 0,...c})]})}),$K=_.forwardRef(({containerClassName:e,className:t,size:n,...r},i)=>{const{flag:o,toggle:l,setToFalse:c}=Cn(),f=_.useRef(null),h=_.useCallback(({relatedTarget:m})=>{f.current?.contains(m)||c()},[f,c]);return g.jsxs("div",{className:Oe("group relative",e),ref:f,onBlurCapture:h,children:[g.jsx(Ti,{ref:i,type:o?"text":"password",className:Oe({"pr-10":n!=="sm","pr-8":n==="sm"},t),size:n,"data-testid":"input",...r}),g.jsx("button",{type:"button",onClick:l,title:o?"Hide password":"Show password","aria-label":o?"Hide password":"Show password",className:Oe("absolute top-[50%] translate-y-[-50%] px-1 cursor-pointer","text-placeholder hover:text-lm-text hover:dark:text-dm-text transition-colors",{"right-1.5":n!=="sm","scale-85 right-1":n==="sm"}),tabIndex:-1,children:g.jsx(Be,{icon:o?fH:LV})})]})}),VK=_.forwardRef(({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:o,"data-testid":l,...c},f)=>{const h=_.useId();return g.jsxs(Yw,{error:i,helpText:o,"data-testid":l,children:[g.jsx(ja,{htmlFor:h,required:n,children:e}),g.jsx($K,{ref:f,id:h,className:t,required:n||r,feedback:i?"error":void 0,...c})]})}),HK=_.forwardRef(({className:e,size:t="md",feedback:n,disabled:r,...i},o)=>g.jsx("select",{ref:o,className:Oe("w-full rounded-md border appearance-none pr-9","bg-(image:--chevron-down) bg-no-repeat bg-position-[right_0.75rem_center] bg-size-[16px_12px]",{"focus-ring":!n,"focus-ring-danger":n==="error","border-lm-input-border dark:border-dm-input-border":!n,"border-danger":n==="error","pl-2 py-1 text-sm":t==="sm","pl-3 py-1.5":t==="md","pl-4 py-2 text-xl":t==="lg","bg-lm-disabled-input dark:bg-dm-disabled-input":r,"bg-lm-primary dark:bg-dm-primary group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!r},e),disabled:r,...i})),Ww=_.forwardRef(({selectClassName:e,label:t,error:n,helpText:r,required:i,hiddenRequired:o,"data-testid":l,...c},f)=>{const h=_.useId();return g.jsxs(Yw,{error:n,helpText:r,"data-testid":l,children:[g.jsx(ja,{htmlFor:h,required:i,children:t}),g.jsx(HK,{ref:f,id:h,className:e,required:i||o,feedback:n?"error":void 0,...c})]})}),jf=_.forwardRef(({onChange:e,containerClassName:t,inputClassName:n,size:r="lg",loading:i=!1,variant:o="default",immediate:l=!1,...c},f)=>{const{setTimeout:h,clearCurrentTimeout:m}=t6(500),y=_.useCallback(x=>{!x||l?(m(),e(x)):h(()=>e(x))},[m,l,e,h]);return g.jsxs("div",{className:Oe("group relative focus-within:z-10",t),children:[o==="default"&&g.jsx(Be,{icon:i?Aw:jV,spin:i,className:Oe("absolute top-[50%] translate-y-[-50%] transition-colors","text-placeholder group-focus-within:text-lm-text dark:group-focus-within:text-dm-text",{"left-3":r!=="sm","scale-85 left-2":r==="sm"})}),g.jsx(Ti,{ref:f,variant:o,type:"search",className:Oe(o==="default"&&{"pl-9":r!=="sm","pl-7":r==="sm"},n),placeholder:"Search...",onChange:x=>y(x.target.value),size:r,...c})]})});function qK({searchResults:e,onSearch:t,onSelectSearchResult:n,renderSearchResult:r,size:i="md",listboxSpan:o="full",onFocus:l,containerClassName:c,listboxClassName:f,...h},m){const y=_.useId(),[x,b]=_.useState(),C=_.useRef(null);_.useImperativeHandle(m,()=>C.current);const w=_.useMemo(()=>e?x??[...e.keys()][0]:void 0,[x,e]),A=_.useCallback(O=>{n(O),t(""),C.current.value=""},[t,n,C]);return g.jsxs("div",{className:Oe("relative",c),onBlur:O=>{O.currentTarget.contains(O.relatedTarget)||t("")},children:[g.jsx(jf,{onChange:t,size:i,ref:C,role:"combobox","aria-autocomplete":"list","aria-expanded":!!e,"aria-controls":y,"aria-activedescendant":w?`${y}_${w}`:void 0,autoComplete:"off",autoCorrect:"off",onFocus:O=>{l?.(O),t(O.target.value)},...h}),e&&g.jsx(DK,{id:y,items:e,anchor:C,onSelectItem:A,onActiveItemChange:b,renderItem:r,className:Oe("absolute top-full mt-1 z-10",{"min-w-60":o==="auto","w-full":o==="full"},f),"aria-label":"Matching items",noItemsMessage:"No results found matching search"})]})}const XR=_.forwardRef(qK),GK=({name:e,color:t})=>g.jsxs("div",{className:"inline-flex items-center gap-2",children:[g.jsx("div",{"aria-hidden":!0,className:"w-4 h-4 rounded-full",style:{backgroundColor:t}}),e]}),YK=({tag:e,color:t,size:n,onRemove:r})=>g.jsxs("li",{className:Oe("inline-flex items-center gap-1 font-bold [&]:rounded-md",{"px-1 text-sm":n==="sm","py-0.25 px-1.5":n==="md","py-0.5 px-1.5":n==="lg"}),style:{backgroundColor:t,color:Kw(t)?"#000":"#fff"},onClick:i=>i.stopPropagation(),children:[e,g.jsx(ku,{label:`Remove ${e}`,solid:!0,size:"sm",onClick:()=>r(e)})]}),iO="#99a1af",WK=({tags:e,selectedTags:t=[],onTagsChange:n,getColorForTag:r,searchMode:i="startsWith",immutable:o=!1,size:l="md",disabled:c,containerClassName:f,...h})=>{const{searchResults:m,onSearch:y}=e6({tags:e,selectedTags:t,searchMode:i,allowAdding:!o}),x=_.useCallback(w=>{const A=(w.match(/Add\s+"([^"]+)"\s+tag/)?.[1]??w).split(",").map(Xw);n?.([...new Set([...t,...A])])},[n,t]),b=_.useCallback(w=>n?.(t.filter(A=>A!==w)),[n,t]),C=_.useRef(null);return g.jsxs("div",{className:Oe("rounded-md flex flex-wrap gap-1","border border-lm-input-border dark:border-dm-input-border","cursor-text focus-within:focus-within-ring",{"p-0.5":l==="sm","p-1.25":l==="md","p-2":l==="lg","bg-lm-disabled-input dark:bg-dm-disabled-input":c,"bg-lm-primary dark:bg-dm-primary":!c,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!c},f),onClick:w=>{w.target!==C.current&&C.current?.focus()},children:[g.jsx("ul",{className:"m-0 p-0 flex flex-wrap gap-1",children:t.map((w,A)=>{const O=r?.(w)??iO;return g.jsx(YK,{tag:w,color:O,onRemove:b,size:l},`${w}${A}`)})}),g.jsx(XR,{variant:"unstyled",listboxSpan:"auto",containerClassName:"flex items-center",listboxClassName:"whitespace-nowrap",inputClassName:Oe("no-clear-button",{"px-1 text-sm":l==="sm","px-2 h-[26px]":l==="md","px-3 text-xl":l==="lg"}),searchResults:m,onSearch:y,onSelectSearchResult:x,renderSearchResult:w=>w.match(/Add\s+"([^"]+)"\s+tag/)?w:g.jsx(GK,{name:w,color:r?.(w)??iO}),onKeyDown:w=>{w.key==="Backspace"&&!m&&b(t[t.length-1])},size:l,disabled:c,ref:C,immediate:!0,...h})]})},KK=_.forwardRef(({className:e,...t},n)=>g.jsx(ZR,{ref:n,className:Oe("rounded-full w-8 h-4","bg-(image:--circle-grey-dark) dark:bg-(image:--circle-grey-light) checked:bg-(image:--circle-white)","focus-visible:not-checked:bg-(image:--circle-blue-light)","checked:bg-right transition-[background-position]",e),...t}));function ZK(e,{elementsSelector:t,focusFirstItem:n=!1,vertical:r=!0,horizontal:i=!0}){const o=_.useMemo(()=>{const f=[];return r&&f.push("ArrowDown"),i&&f.push("ArrowRight"),f},[i,r]),l=_.useMemo(()=>{const f=[];return r&&f.push("ArrowUp"),i&&f.push("ArrowLeft"),f},[i,r]),c=_.useMemo(()=>[...o,...l],[o,l]);_.useEffect(()=>{const f=e.current;if(!f)return()=>{};const h=new AbortController,m=()=>[...f.querySelectorAll(t)],y=m(),x=Math.max(y.findIndex(b=>b.dataset.selected==="true"),0);return y.forEach((b,C)=>{b.tabIndex=C===x?0:-1,n&&C===x&&b.focus()}),f.addEventListener("keydown",b=>{if(!c.includes(b.key))return;b.preventDefault();const C=m(),w=C.findIndex(O=>O.tabIndex===0),A=o.includes(b.key)?C[w+1]??C[0]:C[w-1]??C[C.length-1];C.forEach(O=>{O.tabIndex=-1}),A.tabIndex=0,A.focus()},{signal:h.signal}),()=>h.abort()},[c,e,t,n,o])}const XK=()=>{const e=uo();return _.useCallback(()=>e(-1),[e])},QK=128;function Kw(e){const[t,n,r]=(e.match(/../g)??[]).map(i=>parseInt(i,16)||0);return Math.round(Math.sqrt(.299*t**2+.587*n**2+.114*r**2))>=QK}const QR=({text:e,className:t,size:n="lg",initialCopied:r=!1,navigator_:i=globalThis.navigator,...o})=>{const[l,c]=wy({initialValue:r}),f=_.useCallback(()=>i.clipboard.writeText(e).then(c),[i.clipboard,e,c]);return g.jsx("button",{type:"button",className:Oe("focus-ring rounded-sm cursor-pointer",{"text-md":n==="sm","text-lg":n==="md","text-xl":n==="lg"},t),"aria-label":`Copy ${e} to clipboard`,title:"Copy to clipboard",onClick:f,...o,children:g.jsx(Be,{icon:l?Nu:KR})})},JR=e=>{const t=new URLSearchParams(e),n={};return t.forEach((r,i)=>{if(i.endsWith("[]")){const o=i.slice(0,-2);n[o]??=[],n[o].push(r)}else n[i]=r}),n},Zw=e=>{const t=new URLSearchParams;for(const[n,r]of Object.entries(e))r!==void 0&&(Array.isArray(r)?r.forEach(i=>t.append(`${n}[]`,`${i}`)):t.append(n,`${r}`));return t.toString()},Ku=()=>{const{search:e}=Or();return _.useMemo(()=>JR(e),[e])},JK=/\s+/g,Xw=e=>e.trim().toLowerCase().replace(JK,"-"),eZ=new Intl.NumberFormat("en-US"),Sn=e=>eZ.format(Number(e)),aO=10,tZ=e=>Math.ceil(e/aO)*aO,Hc=2,tv="...",nZ=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),rZ=(e,t)=>{const n=nZ(Math.max(Hc,e-Hc),Math.min(t-1,e+Hc)+1);return e-Hc>Hc&&n.unshift(tv),e+Hc<t-1&&n.push(tv),n.unshift(1),n.push(t),n},xh=e=>e===tv,iZ=e=>xh(e)?e:Sn(e),aZ=(e,t)=>xh(e)?`${e}_${t}`:`${e}`;function e6({tags:e,selectedTags:t,searchMode:n,searchLimit:r=5,allowAdding:i=!1}){const[o,l]=_.useState(),c=_.useCallback(f=>{const h=f.toLowerCase().trim();if(!h){l(void 0);return}const m=e.filter(y=>t.includes(y)?!1:y.toLowerCase()[n](h)).slice(0,r);i&&m.push(`Add "${h.split(",").map(Xw).join(",")}" tag`),l(new Map(m.map(y=>[y,y])))},[i,r,n,t,e]);return{searchResults:o,onSearch:c}}function t6(e,t=globalThis.setTimeout,n=globalThis.clearTimeout){const r=_.useRef(null),i=_.useCallback(()=>{r.current&&n(r.current)},[n]),o=_.useCallback((l,c)=>{i(),r.current=t(()=>{l(),r.current=null},c??e)},[i,e,t]);return _.useEffect(()=>i,[i]),_.useMemo(()=>({setTimeout:o,clearCurrentTimeout:i}),[i,o])}const oZ=2e3,wy=({initialValue:e=!1,delay:t=oZ}={},n=globalThis.setTimeout,r=globalThis.clearTimeout)=>{const{setTimeout:i}=t6(t,n,r),[o,l]=_.useState(e),c=_.useRef(e),f=_.useCallback(()=>{l(!c.current),i(()=>l(c.current))},[i]);return[o,f]};function Cn(e=!1){const[t,n]=_.useState(e),r=_.useCallback(()=>n(l=>!l),[]),i=_.useCallback(()=>n(!0),[]),o=_.useCallback(()=>n(!1),[]);return{flag:t,toggle:r,setToTrue:i,setToFalse:o}}const n6=_.createContext({}),sZ=({className:e,selected:t,disabled:n,onClick:r,...i})=>{const o="to"in i&&typeof i.to=="string",l=o?Ir:"button",{onItemClick:c}=_.useContext(n6);return g.jsx(l,{role:"menuitem","data-selected":t,className:Oe("flex items-center gap-2","w-full px-3 py-1.5 focus-ring","no-underline text-inherit",{"cursor-pointer":!n,"pointer-events-none opacity-50":n,"bg-lm-secondary dark:bg-dm-secondary":t&&!n,"highlight:bg-lm-secondary dark:highlight:bg-dm-secondary highlight:z-1 relative":!t&&!n},e),tabIndex:-1,disabled:o?void 0:n,"aria-disabled":o?n:void 0,type:o?void 0:"button",onClick:f=>{r?.(f),c?.()},...i})},lZ=()=>g.jsx("div",{role:"separator","aria-hidden":!0,className:"border-b border-lm-border dark:border-dm-border my-2"}),uZ=({children:e})=>g.jsx("div",{role:"heading","aria-level":6,"aria-hidden":!0,className:Oe("flex items-center w-full px-3 py-1.5","text-gray-500 text-sm font-semibold"),onClick:t=>t.stopPropagation(),children:e}),cZ=({className:e,...t})=>g.jsx("div",{className:Oe("px-3 py-1.5",e),...t}),fZ=({children:e,className:t,focusableElementsSelector:n='[role="menuitem"]:not([disabled]):not([aria-disabled])',focusFirstItem:r=!1,onItemClick:i,...o})=>{const l=_.useRef(null);return ZK(l,{elementsSelector:n,focusFirstItem:r}),g.jsx(ln,{ref:l,role:"menu",className:Oe("py-2 whitespace-nowrap",t),...o,children:g.jsx(n6.Provider,{value:{onItemClick:i},children:e})})},ch=Object.assign(fZ,{Item:sZ,Separator:lZ,Title:uZ,Misc:cZ}),dZ=({children:e,menuAlignment:t="left",buttonVariant:n="button",buttonContent:r,buttonClassName:i,buttonSize:o="md",buttonDisabled:l=!1,containerClassName:c,menuClassName:f,caretless:h,buttonLabel:m,menuOffset:y=3})=>{const[x,b]=_.useState(!1),C=_.useCallback(()=>b(!1),[]),w=_.useRef(null),{refs:A,floatingStyles:O,context:P}=YR({open:x,onOpenChange:b,placement:t==="right"?"bottom-end":"bottom-start",middleware:[oK(),aK(y)],elements:{reference:w.current}}),N=_K(P),{getReferenceProps:F,getFloatingProps:U}=WR([N]),W=_.useId(),X=_.useRef(null);return _.useEffect(()=>{const ae=X.current;if(!ae||!x)return()=>{};const ce=new AbortController;return document.body.addEventListener("click",re=>{re.composedPath().includes(ae)||C()},{signal:ce.signal}),()=>ce.abort()},[C,x]),g.jsxs("div",{ref:X,className:Oe("relative inline-block",c),onKeyDown:ae=>{ae.key==="Escape"&&C()},onBlur:ae=>{ae.relatedTarget&&!X.current.contains(ae.relatedTarget)&&C()},children:[g.jsxs("button",{ref:w,...F(),type:"button","aria-haspopup":!0,"aria-expanded":x,"aria-controls":W,"aria-label":m,disabled:l,className:Oe("flex items-center rounded-md focus-ring",{"justify-between":!h,"cursor-pointer":!l,"pointer-events-none opacity-50":l,"border border-lm-border dark:border-dm-border":n==="button","bg-lm-primary dark:bg-dm-primary":n==="button","group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":n==="button","text-lm-brand dark:text-dm-brand":n==="link","highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline":n==="link","px-1.5 py-1 text-sm":n!=="text"&&o==="sm","px-3 py-1.5":n!=="text"&&o==="md","px-4 py-2 text-lg":n!=="text"&&o==="lg","gap-x-1.5":o==="sm","gap-x-2":o!=="sm"},i),onKeyDown:ae=>{ae.key==="ArrowDown"&&(ae.preventDefault(),b(!0))},children:[r,!h&&g.jsx(Be,{icon:EN,size:"xs",widthAuto:!0})]}),x&&g.jsx("div",{ref:A.setFloating,style:O,className:"min-w-full z-500",...U(),children:g.jsx(ch,{className:f,id:W,focusableElementsSelector:'[role="menuitem"]:not([disabled]):not([aria-disabled]),input:not([disabled]),select:not([disabled])',focusFirstItem:!0,onItemClick:C,children:e})})]})},qe=Object.assign(dZ,{Item:ch.Item,Separator:ch.Separator,Title:ch.Title,Misc:ch.Misc}),Sy=_.forwardRef(({className:e,disabled:t,size:n="md",type:r="button",...i},o)=>g.jsx("button",{className:Oe("inline-flex rounded-md focus-ring","text-lm-brand dark:text-dm-brand","highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline",{"px-1.5 py-1 text-sm":n==="sm","px-3 py-1.5":n==="md","px-4 py-2 text-lg":n==="lg","cursor-pointer":!t,"pointer-events-none opacity-65":t},e),disabled:t,type:r,...i,ref:o})),hZ=({className:e,active:t,...n})=>g.jsx("li",{role:"menuitem",className:"w-full flex","data-active":t,children:g.jsx(Ir,{className:Oe("px-2 py-3","max-md:w-full max-md:px-3 max-md:py-2","text-white no-underline highlight:opacity-100 transition-opacity",{"opacity-60":!t,"opacity-100":t},e),...n})}),mZ=({containerClassName:e,buttonClassName:t,menuClassName:n,active:r,...i})=>g.jsx("li",{role:"menuitem","aria-haspopup":!0,className:"w-full flex","data-active":r,children:g.jsx(qe,{containerClassName:Oe("max-md:w-full",e),buttonVariant:"text",buttonClassName:Oe("px-2 py-3","max-md:w-full max-md:px-3 max-md:py-2","text-white highlight:opacity-100 transition-opacity",{"opacity-60":!r,"opacity-100":r},t),menuAlignment:"right",menuOffset:-3,menuClassName:Oe("mx-2",n),...i})}),pZ=({className:e,brand:t,children:n})=>{const{flag:r,toggle:i,setToFalse:o}=Cn(),l=_.useId(),c=_.useId(),{pathname:f}=Or();return _.useEffect(()=>o(),[f,o]),g.jsxs("nav",{className:Oe("w-full relative","bg-lm-main dark:bg-dm-main","flex max-md:flex-col items-center justify-between",e),children:[g.jsxs("div",{className:"w-full relative",children:[g.jsx("h4",{className:Oe("text-white px-4 py-3","max-md:w-full max-md:flex max-md:flex-col items-center"),children:t}),g.jsx(Tt,{id:c,variant:"secondary",className:Oe("absolute right-0 top-[50%] translate-y-[-50%]","md:hidden mx-2 [&]:px-2","opacity-60 highlight:opacity-100 transition-opacity","[&]:text-white [&]:border-white [&]:highlight:bg-transparent"),onClick:i,"aria-label":`${r?"Hide":"Show"} menu`,"aria-controls":l,children:g.jsx(Be,{icon:r?RV:QV})})]}),g.jsx("ul",{id:l,"aria-labelledby":c,role:"menu",className:Oe("m-0 p-0","max-md:w-full md:mr-2 max-md:absolute max-md:top-full z-2000","flex max-md:flex-col items-center","bg-lm-main dark:bg-dm-main",{"max-md:hidden":!r}),children:n})]})},J2=Object.assign(pZ,{MenuItem:hZ,Dropdown:mZ}),r6=_.createContext(null),gZ=({className:e,to:t,...n})=>{const r=_.useContext(r6);return g.jsx(xw,{role:"menuitem",to:t,className:({isActive:i})=>Oe("px-4 pt-2 pb-[calc(0.5rem-3px)] border-b-3","highlight:text-lm-brand dark:highlight:text-dm-brand","font-bold text-center no-underline transition-colors","rounded-none outline-none focus-visible:inset-ring-2","focus-visible:inset-ring-lm-brand/50 dark:focus-visible:inset-ring-dm-brand/50",{"text-lm-brand dark:text-dm-brand":i,"border-b-lm-brand dark:border-b-dm-brand active":i,"border-b-transparent text-gray-500":!i,"flex-grow":r?.fill},e),...n})},vZ=({children:e,className:t,fill:n})=>g.jsx(r6.Provider,{value:{fill:n},children:g.jsx(ln,{role:"menubar",className:Oe("flex overflow-hidden",t),children:e})}),tl=Object.assign(vZ,{Pill:gZ}),i6=["border border-r-0 last:border-r border-lm-border dark:border-dm-border","rounded-none first:rounded-l last:rounded-r"],a6=(e=!1)=>Oe(i6,"px-3 py-2 cursor-pointer no-underline","focus-ring focus-visible:z-1",!e&&["text-lm-brand dark:text-dm-brand","bg-lm-primary dark:bg-dm-primary","highlight:bg-lm-secondary dark:highlight:bg-dm-secondary"],e&&"bg-lm-main dark:bg-dm-main text-white"),e_=({children:e})=>g.jsx("span",{"aria-hidden":!0,className:Oe(i6,"px-3 py-2 text-gray-400"),children:e}),o6=()=>g.jsx(e_,{children:tv});function yZ({children:e,active:t,isEllipsis:n,href:r,...i}){const o=_.useMemo(()=>a6(t),[t]);return n?g.jsx(o6,{}):g.jsx(Ir,{className:o,to:r,...i,"data-active":t,children:e})}function bZ({children:e,active:t,isEllipsis:n,...r}){const i=_.useMemo(()=>a6(t),[t]);return n?g.jsx(o6,{}):g.jsx("button",{type:"button",className:i,...r,"data-active":t,children:e})}const Cy=({currentPage:e,pagesCount:t,...n})=>{const r="urlForPage"in n,i=r?yZ:bZ,o=_.useCallback(l=>r?{href:xh(l)?void 0:n.urlForPage(l)}:{onClick:()=>!xh(l)&&n.onPageChange(l)},[r,n]);return t<2?null:g.jsxs("div",{className:"select-none flex","data-testid":"paginator",children:[e===1?g.jsx(e_,{children:g.jsx(Be,{size:"xs",icon:oT})}):g.jsx(i,{...o(Math.max(1,e-1)),"aria-label":"Previous",children:g.jsx(Be,{size:"xs",icon:oT})}),rZ(e,t).map((l,c)=>g.jsx(i,{active:l===e,isEllipsis:xh(l),...o(l),children:iZ(l)},aZ(l,c))),e===t?g.jsx(e_,{children:g.jsx(Be,{size:"xs",icon:Gg})}):g.jsx(i,{...o(Math.min(t,e+1)),"aria-label":"Next",children:g.jsx(Be,{size:"xs",icon:Gg})})]})},xZ=({buttonLabel:e="Options",buttonSize:t="md",...n})=>g.jsx(qe,{buttonContent:g.jsx(Be,{icon:kV,widthAuto:!0,className:Oe({"px-1":t==="sm"})}),caretless:!0,buttonLabel:e,buttonSize:t,...n}),tn=Object.assign(xZ,{Item:qe.Item,Separator:qe.Separator,Title:qe.Title,Misc:qe.Misc}),_Z=({open:e,children:t,className:n,onClose:r,...i})=>{const o=_.useRef(null);return _.useEffect(()=>{const l=document.body,c=l.style.overflow,f=l.style.paddingRight;if(e){const h=window.outerWidth-l.clientWidth,m=l.scrollHeight>l.clientHeight;l.style.overflow="hidden",m&&(l.style.paddingRight=`${h}px`),o.current?.showModal()}else o.current?.close();return()=>{l.style.overflow=c,l.style.paddingRight=f}},[e]),Tf.createPortal(g.jsx("dialog",{ref:o,className:Oe("bg-transparent backdrop:bg-black/50",n),onCancel:l=>{l.preventDefault(),r()},...i,children:e&&t}),document.body)},co=({open:e,onClose:t,variant:n="default",title:r,children:i,className:o,...l})=>{const{size:c="md",confirmText:f="Confirm",cancelText:h="Cancel",confirmDisabled:m,onConfirm:y,onClosed:x,...b}="onConfirm"in l?l:{...l},[C,w]=_.useState(e),A=_.useRef(null),O=_.useRef("cancel"),P=_.useCallback(N=>{N.preventDefault(),N.stopPropagation(),O.current="confirm",y?.()},[y]);return _.useEffect(()=>{if(e){O.current="cancel",w(!0);return}const N=A.current;if(N){delete A.current.dataset.open;let F=!1;const U=W=>{F||W.target!==N||(F=!0,w(!1),x?.(O.current))};return N.addEventListener("transitionend",U),()=>{N.removeEventListener("transitionend",U)}}},[x,e]),_.useEffect(()=>{const N=A.current;C&&N&&(N.dataset.open="")},[C]),g.jsx(_Z,{open:C,onClose:t,className:Oe({"flex w-screen h-screen max-w-screen max-h-screen":C,"overflow-hidden":n==="cover"},o),...b,children:g.jsx("form",{"data-testid":"transition-container",ref:A,className:Oe("w-full m-auto p-4 sm:p-6","-translate-y-4 data-open:translate-y-0 opacity-0 data-open:opacity-100","transition-[opacity_,_translate] duration-300",n!=="cover"&&{"sm:w-sm":c==="sm","md:w-lg":c==="md","md:w-4xl":c==="lg","md:w-6xl":c==="xl"},{"h-full":n==="cover"}),onSubmit:P,children:g.jsx(ln,{className:Oe("w-full",{"h-full relative overflow-auto":n==="cover"}),children:n==="cover"?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:Oe("px-4 py-3 absolute top-0 left-0 right-0 z-3000","flex items-center justify-between","text-white bg-linear-to-b from-black/70 to-black/10","[text-shadow:_0_2px_4px_rgb(0_0_0/_0.8)]"),children:[g.jsx("h5",{children:r}),g.jsx(ku,{onClick:t,label:"Close dialog"})]}),i]}):g.jsxs(g.Fragment,{children:[g.jsxs(ln.Header,{className:Oe("sticky top-0","flex items-center justify-between gap-x-2"),children:[g.jsx("h5",{className:Oe({"text-danger":n==="danger"}),children:r}),g.jsx(ku,{onClick:t,label:"Close dialog"})]}),g.jsx(ln.Body,{children:i}),y&&g.jsxs(ln.Footer,{"data-testid":"footer",className:Oe("flex justify-end items-center gap-x-2","[&]:px-3 sticky bottom-0"),children:[g.jsx(Sy,{onClick:t,children:h}),g.jsx(Tt,{solid:!0,variant:n==="danger"?"danger":"primary",disabled:m,type:"submit",children:f})]})]})})})})},Wo=({className:e,children:t,loading:n=!1,variant:r="default"})=>g.jsx(Nt,{className:Oe({"[&]:border-danger":r==="error"},e),children:g.jsxs("h3",{className:Oe("text-center",{"text-gray-500 dark:text-gray-400":r==="default","text-danger":r==="error"}),children:[n&&g.jsxs(g.Fragment,{children:[g.jsx(Be,{icon:Aw,spin:!0}),g.jsx("span",{className:"ml-2",children:t??"Loading..."})]}),!n&&t]})}),Gr=({variant:e,className:t,size:n="md",children:r})=>g.jsx("div",{className:Oe("rounded-md text-center",{"p-2":n==="sm","p-4":n==="md","p-6":n==="lg","[&]:text-white":e!=="warning","bg-lm-brand dark:bg-dm-brand":e==="success","bg-danger":e==="error","bg-warning text-black":e==="warning"},t),children:r}),as=({placement:e="auto"}={})=>{const t=_.useRef(null),n=(()=>{const w=[];return e==="auto"&&w.push(sK()),w.push(lK({element:t})),w})(),[r,i]=_.useState(!1),{refs:o,floatingStyles:l,context:c,middlewareData:f}=YR({placement:e==="auto"?void 0:e,open:r,onOpenChange:i,middleware:n}),h=bK(c,{delay:{open:300},move:!0}),{getFloatingProps:m,getReferenceProps:y}=WR([h]),{isMounted:x,styles:b}=EK(c,{duration:200}),C=_.useMemo(()=>{const w=c.placement.split("-")[0];return{top:"bottom",right:"left",bottom:"top",left:"right"}[w]??""},[c.placement]);return{anchor:{...y(),ref:o.setReference},tooltip:{...m(),refSetter:o.setFloating,isMounted:x,styles:{...l,...b},arrowPos:f.arrow,arrowRef:t,arrowSide:C}}},os=({children:e,isMounted:t,styles:n,refSetter:r,arrowRef:i,arrowPos:o,arrowSide:l,...c})=>t&&g.jsx("div",{role:"tooltip","aria-live":"polite",className:Oe("z-500 max-w-64",{"pt-2.5":l==="top","pb-2.5":l==="bottom","pr-2.5":l==="right","pl-2.5":l==="left"}),ref:r,style:n,...c,children:g.jsxs("div",{className:"relative px-1.5 py-1 rounded bg-black/90 text-white text-center",children:[g.jsx("span",{className:"sr-only",children:"Tooltip: "}),e,g.jsx("div",{ref:i,className:Oe("absolute","border-l-6 border-r-6 border-b-6 border-l-transparent border-r-transparent border-b-black/90",{"rotate-180":l==="bottom","rotate-90 mr-[-3px]":l==="right","rotate-270 ml-[-3px]":l==="left"}),style:{left:o?.x,top:o?.y,[l]:`${-(i.current?.offsetWidth??0)/2}px`},"data-testid":"arrow"})]})});function s6(e){if(e.currentField!==e.newField)return"ASC";const t={ASC:"DESC",DESC:void 0};return e.currentOrderDir?t[e.currentOrderDir]:"ASC"}function Qw(e){const t=s6(e);return{field:t?e.newField:void 0,dir:t}}const l6=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,l=n==="ASC"?-1:1;return r[t]>i[t]?o:l}),wZ=e=>e.dir?`${e.field}-${e.dir}`:void 0,SZ=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function tm({items:e,order:t,onChange:n,prefixed:r=!0,buttonVariant:i="button",...o}){const l=_.useCallback(f=>{const h=Qw({currentOrderDir:t.dir,currentField:t.field,newField:f});n(h)},[n,t.dir,t.field]),c=i==="button";return g.jsxs(qe,{buttonContent:g.jsxs(g.Fragment,{children:[!c&&"Order by",c&&!t.field&&g.jsx("i",{children:"Order by..."}),c&&t.field&&g.jsxs(g.Fragment,{children:[r&&"Order by: ",e[t.field]," - ",t.dir??"DESC"]})]}),buttonVariant:i,...o,children:[Object.entries(e).map(([f,h])=>g.jsxs(qe.Item,{selected:t.field===f,onClick:()=>l(f),className:"flex items-center justify-between gap-2",children:[h,t.field===f&&g.jsx(Be,{icon:t.dir==="ASC"?FV:cH})]},f)),g.jsx(qe.Separator,{}),g.jsx(qe.Item,{disabled:!t.field,onClick:()=>n({}),children:g.jsx("i",{children:"Clear selection"})})]})}const CZ="#4696e5",EZ="rgba(70, 150, 229, 0.4)",AZ="#2078CF",TZ="rgba(32, 120, 207, 0.4)",Mh=()=>ss()?CZ:AZ,OZ=()=>ss()?EZ:TZ,t_="#f77f28",jZ="rgba(247, 127, 40, 0.4)",MZ="white",PZ="#161b22",LZ=e=>document.querySelector("html")?.setAttribute("data-theme",e),ss=()=>document.querySelector("html")?.getAttribute("data-theme")==="dark",Jw=(e=window.matchMedia.bind(window))=>e("(prefers-color-scheme: dark)").matches?"dark":"light",NZ=({isOpen:e,onClose:t,forceUpdate:n})=>{const{flag:r,setToTrue:i}=Cn(),o=_.useCallback(()=>{i(),n()},[n,i]);return e?g.jsxs(ln,{role:"alert",className:Oe("w-[700px] max-w-[calc(100%-30px)]","fixed top-[35px] left-[50%] translate-x-[-50%] z-[1040]"),children:[g.jsxs(ln.Header,{className:"flex items-center justify-between",children:[g.jsx("h5",{children:"This app has just been updated!"}),g.jsx(ku,{onClick:t})]}),g.jsxs(ln.Body,{className:"flex gap-4 items-center justify-between max-md:flex-col",children:["Restart it to enjoy the new features.",g.jsxs(Tt,{disabled:r,variant:"secondary",solid:!0,onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(Be,{icon:xV})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]}):null},u6=({children:e,title:t})=>g.jsx("div",{className:"pt-4",children:g.jsxs(Nt,{className:"p-4 w-full lg:w-[65%] m-auto",children:[g.jsx("h2",{children:t}),e]})}),c6=({to:e="/",children:t="Home"})=>g.jsxs(u6,{title:"Oops! We could not find requested route.",children:[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(Tt,{inline:!0,to:e,size:"lg",children:t})]});function Ma(e){return _.useMemo(()=>e,[e])}function Pa(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}const RZ=async()=>{(await navigator.serviceWorker?.getRegistrations()??[]).forEach(({waiting:t})=>{t?.addEventListener("statechange",n=>{n.target?.state==="activated"&&window.location.reload()}),t?.postMessage({type:"SKIP_WAITING"})})},f6=({fetchServers:e,servers:t,settings:n,appUpdated:r,resetAppUpdate:i})=>{const{MainHeader:o,Home:l,ShlinkWebComponentContainer:c,CreateServer:f,EditServer:h,Settings:m,ManageServers:y,ShlinkVersionsContainer:x}=Ma(f6),b=Or(),C=_.useRef(t),w=b.pathname==="/";return _.useEffect(()=>{Object.keys(C.current).length===0&&e()},[e]),_.useEffect(()=>{LZ(n.ui?.theme??Jw())},[n.ui?.theme]),g.jsxs("div",{className:"h-full",children:[g.jsxs(g.Fragment,{children:[g.jsx(o,{}),g.jsxs("div",{className:"h-full pt-(--header-height)",children:[g.jsx("div",{"data-testid":"shlink-wrapper",className:Oe("min-h-full pb-[calc(var(--footer-height)+var(--footer-margin))] -mb-[calc(var(--footer-height)+var(--footer-margin))]",{"flex items-center pt-4":w}),children:g.jsxs(oy,{children:[g.jsx(ft,{index:!0,element:g.jsx(l,{})}),g.jsx(ft,{path:"/settings",children:["","*"].map(A=>g.jsx(ft,{path:A,element:g.jsx(m,{})},A))}),g.jsx(ft,{path:"/manage-servers",element:g.jsx(y,{})}),g.jsx(ft,{path:"/server/create",element:g.jsx(f,{})}),g.jsx(ft,{path:"/server/:serverId/edit",element:g.jsx(h,{})}),g.jsx(ft,{path:"/server/:serverId",children:["","*"].map(A=>g.jsx(ft,{path:A,element:g.jsx(c,{})},A))}),g.jsx(ft,{path:"*",element:g.jsx(c6,{})})]})}),g.jsx("div",{className:"h-(--footer-height) mt-(--footer-margin) md:px-4",children:g.jsx(x,{})})]})]}),g.jsx(NZ,{isOpen:r,onClose:i,forceUpdate:RZ})]})},DZ=Pa(f6,["MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"]);function Cr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var kZ=typeof Symbol=="function"&&Symbol.observable||"@@observable",oO=kZ,zb=()=>Math.random().toString(36).substring(7).split("").join("."),IZ={INIT:`@@redux/INIT${zb()}`,REPLACE:`@@redux/REPLACE${zb()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zb()}`},nv=IZ;function eS(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function d6(e,t,n){if(typeof e!="function")throw new Error(Cr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Cr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Cr(1));return n(d6)(e,t)}let r=e,i=t,o=new Map,l=o,c=0,f=!1;function h(){l===o&&(l=new Map,o.forEach((A,O)=>{l.set(O,A)}))}function m(){if(f)throw new Error(Cr(3));return i}function y(A){if(typeof A!="function")throw new Error(Cr(4));if(f)throw new Error(Cr(5));let O=!0;h();const P=c++;return l.set(P,A),function(){if(O){if(f)throw new Error(Cr(6));O=!1,h(),l.delete(P),o=null}}}function x(A){if(!eS(A))throw new Error(Cr(7));if(typeof A.type>"u")throw new Error(Cr(8));if(typeof A.type!="string")throw new Error(Cr(17));if(f)throw new Error(Cr(9));try{f=!0,i=r(i,A)}finally{f=!1}return(o=l).forEach(P=>{P()}),A}function b(A){if(typeof A!="function")throw new Error(Cr(10));r=A,x({type:nv.REPLACE})}function C(){const A=y;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(Cr(11));function P(){const F=O;F.next&&F.next(m())}return P(),{unsubscribe:A(P)}},[oO](){return this}}}return x({type:nv.INIT}),{dispatch:x,subscribe:y,getState:m,replaceReducer:b,[oO]:C}}function zZ(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:nv.INIT})>"u")throw new Error(Cr(12));if(typeof n(void 0,{type:nv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Cr(13))})}function Ey(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const l=t[o];typeof e[l]=="function"&&(n[l]=e[l])}const r=Object.keys(n);let i;try{zZ(n)}catch(o){i=o}return function(l={},c){if(i)throw i;let f=!1;const h={};for(let m=0;m<r.length;m++){const y=r[m],x=n[y],b=l[y],C=x(b,c);if(typeof C>"u")throw c&&c.type,new Error(Cr(14));h[y]=C,f=f||C!==b}return f=f||r.length!==Object.keys(l).length,f?h:l}}function rv(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function UZ(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(Cr(15))};const l={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},c=e.map(f=>f(l));return o=rv(...c)(i.dispatch),{...i,dispatch:o}}}function h6(e){return eS(e)&&"type"in e&&typeof e.type=="string"}var m6=Symbol.for("immer-nothing"),sO=Symbol.for("immer-draftable"),Ri=Symbol.for("immer-state");function ba(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ph=Object.getPrototypeOf;function Iu(e){return!!e&&!!e[Ri]}function Ko(e){return e?p6(e)||Array.isArray(e)||!!e[sO]||!!e.constructor?.[sO]||nm(e)||Ty(e):!1}var BZ=Object.prototype.constructor.toString(),lO=new WeakMap;function p6(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=lO.get(n);return r===void 0&&(r=Function.toString.call(n),lO.set(n,r)),r===BZ}function iv(e,t,n=!0){Ay(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Ay(e){const t=e[Ri];return t?t.type_:Array.isArray(e)?1:nm(e)?2:Ty(e)?3:0}function n_(e,t){return Ay(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function g6(e,t,n){const r=Ay(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function FZ(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nm(e){return e instanceof Map}function Ty(e){return e instanceof Set}function yu(e){return e.copy_||e.base_}function r_(e,t){if(nm(e))return new Map(e);if(Ty(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=p6(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ri];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const l=i[o],c=r[l];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[l]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[l]})}return Object.create(Ph(e),r)}else{const r=Ph(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function tS(e,t=!1){return Oy(e)||Iu(e)||!Ko(e)||(Ay(e)>1&&Object.defineProperties(e,{set:eg,add:eg,clear:eg,delete:eg}),Object.freeze(e),t&&Object.values(e).forEach(n=>tS(n,!0))),e}function $Z(){ba(2)}var eg={value:$Z};function Oy(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var VZ={};function zu(e){const t=VZ[e];return t||ba(0,e),t}var Lh;function v6(){return Lh}function HZ(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function uO(e,t){t&&(zu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function i_(e){a_(e),e.drafts_.forEach(qZ),e.drafts_=null}function a_(e){e===Lh&&(Lh=e.parent_)}function cO(e){return Lh=HZ(Lh,e)}function qZ(e){const t=e[Ri];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fO(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ri].modified_&&(i_(t),ba(4)),Ko(e)&&(e=av(t,e),t.parent_||ov(t,e)),t.patches_&&zu("Patches").generateReplacementPatches_(n[Ri].base_,e,t.patches_,t.inversePatches_)):e=av(t,n,[]),i_(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==m6?e:void 0}function av(e,t,n){if(Oy(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[Ri];if(!i)return iv(t,(o,l)=>dO(e,i,t,o,l,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return ov(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let l=o,c=!1;i.type_===3&&(l=new Set(o),o.clear(),c=!0),iv(l,(f,h)=>dO(e,i,o,f,h,n,c),r),ov(e,o,!1),n&&e.patches_&&zu("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function dO(e,t,n,r,i,o,l){if(i==null||typeof i!="object"&&!l)return;const c=Oy(i);if(!(c&&!l)){if(Iu(i)){const f=o&&t&&t.type_!==3&&!n_(t.assigned_,r)?o.concat(r):void 0,h=av(e,i,f);if(g6(n,r,h),Iu(h))e.canAutoFreeze_=!1;else return}else l&&n.add(i);if(Ko(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&c)return;av(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(nm(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&ov(e,i)}}}function ov(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&tS(t,n)}function GZ(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:v6(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=nS;n&&(i=[r],o=Nh);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return r.draft_=c,r.revoke_=l,c}var nS={get(e,t){if(t===Ri)return e;const n=yu(e);if(!n_(n,t))return YZ(e,n,t);const r=n[t];return e.finalized_||!Ko(r)?r:r===Ub(e.base_,t)?(Bb(e),e.copy_[t]=s_(r,e)):r},has(e,t){return t in yu(e)},ownKeys(e){return Reflect.ownKeys(yu(e))},set(e,t,n){const r=y6(yu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Ub(yu(e),t),o=i?.[Ri];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(FZ(n,i)&&(n!==void 0||n_(e.base_,t)))return!0;Bb(e),o_(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Ub(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Bb(e),o_(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=yu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ba(11)},getPrototypeOf(e){return Ph(e.base_)},setPrototypeOf(){ba(12)}},Nh={};iv(nS,(e,t)=>{Nh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Nh.deleteProperty=function(e,t){return Nh.set.call(this,e,t,void 0)};Nh.set=function(e,t,n){return nS.set.call(this,e[0],t,n,e[0])};function Ub(e,t){const n=e[Ri];return(n?yu(n):e)[t]}function YZ(e,t,n){const r=y6(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function y6(e,t){if(!(t in e))return;let n=Ph(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ph(n)}}function o_(e){e.modified_||(e.modified_=!0,e.parent_&&o_(e.parent_))}function Bb(e){e.copy_||(e.copy_=r_(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var WZ=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const l=this;return function(f=o,...h){return l.produce(f,m=>n.call(this,m,...h))}}typeof n!="function"&&ba(6),r!==void 0&&typeof r!="function"&&ba(7);let i;if(Ko(t)){const o=cO(this),l=s_(t,void 0);let c=!0;try{i=n(l),c=!1}finally{c?i_(o):a_(o)}return uO(o,r),fO(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===m6&&(i=void 0),this.autoFreeze_&&tS(i,!0),r){const o=[],l=[];zu("Patches").generateReplacementPatches_(t,i,o,l),r(o,l)}return i}else ba(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(l,...c)=>this.produceWithPatches(l,f=>t(f,...c));let r,i;return[this.produce(t,n,(l,c)=>{r=l,i=c}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ko(e)||ba(8),Iu(e)&&(e=Vo(e));const t=cO(this),n=s_(e,void 0);return n[Ri].isManual_=!0,a_(t),n}finishDraft(e,t){const n=e&&e[Ri];(!n||!n.isManual_)&&ba(9);const{scope_:r}=n;return uO(r,t),fO(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=zu("Patches").applyPatches_;return Iu(e)?r(e,t):this.produce(e,i=>r(i,t))}};function s_(e,t){const n=nm(e)?zu("MapSet").proxyMap_(e,t):Ty(e)?zu("MapSet").proxySet_(e,t):GZ(e,t);return(t?t.scope_:v6()).drafts_.push(n),n}function Vo(e){return Iu(e)||ba(10,e),b6(e)}function b6(e){if(!Ko(e)||Oy(e))return e;const t=e[Ri];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=r_(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=r_(e,!0);return iv(n,(i,o)=>{g6(n,i,b6(o))},r),t&&(t.finalized_=!1),n}var l_=new WZ,x6=l_.produce,KZ=l_.setUseStrictIteration.bind(l_);function ZZ(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function XZ(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function QZ(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var hO=e=>Array.isArray(e)?e:[e];function JZ(e){const t=Array.isArray(e[0])?e[0]:e;return QZ(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function eX(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var tX=class{constructor(e){this.value=e}deref(){return this.value}},nX=typeof WeakRef<"u"?WeakRef:tX,rX=0,mO=1;function tg(){return{s:rX,v:void 0,o:null,p:null}}function _6(e,t={}){let n=tg();const{resultEqualityCheck:r}=t;let i,o=0;function l(){let c=n;const{length:f}=arguments;for(let y=0,x=f;y<x;y++){const b=arguments[y];if(typeof b=="function"||typeof b=="object"&&b!==null){let C=c.o;C===null&&(c.o=C=new WeakMap);const w=C.get(b);w===void 0?(c=tg(),C.set(b,c)):c=w}else{let C=c.p;C===null&&(c.p=C=new Map);const w=C.get(b);w===void 0?(c=tg(),C.set(b,c)):c=w}}const h=c;let m;if(c.s===mO)m=c.v;else if(m=e.apply(null,arguments),o++,r){const y=i?.deref?.()??i;y!=null&&r(y,m)&&(m=y,o!==0&&o--),i=typeof m=="object"&&m!==null||typeof m=="function"?new nX(m):m}return h.s=mO,h.v=m,m}return l.clearCache=()=>{n=tg(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function iX(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,l=0,c,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),ZZ(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...n,...f},{memoize:y,memoizeOptions:x=[],argsMemoize:b=_6,argsMemoizeOptions:C=[]}=m,w=hO(x),A=hO(C),O=JZ(i),P=y(function(){return o++,h.apply(null,arguments)},...w),N=b(function(){l++;const U=eX(O,arguments);return c=P.apply(null,U),c},...A);return Object.assign(N,{resultFunc:h,memoizedResultFunc:P,dependencies:O,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:y,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var Ce=iX(_6),aX=Object.assign((e,t=Ce)=>{XZ(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((l,c,f)=>(l[n[f]]=c,l),{}))},{withTypes:()=>aX});function w6(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var oX=w6(),sX=w6,lX=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rv:rv.apply(null,arguments)},uX=e=>e&&typeof e.match=="function";function un(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Pi(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>h6(r)&&r.type===e,n}var S6=class fh extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,fh.prototype)}static get[Symbol.species](){return fh}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new fh(...t[0].concat(this)):new fh(...t.concat(this))}};function pO(e){return Ko(e)?x6(e,()=>{}):e}function ng(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function cX(e){return typeof e=="boolean"}var fX=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new S6;return n&&(cX(n)?l.push(oX):l.push(sX(n.extraArgument))),l},C6="RTK_autoBatch",ir=()=>e=>({payload:e,meta:{[C6]:!0}}),gO=e=>t=>{setTimeout(t,e)},E6=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,l=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:gO(10):e.type==="callback"?e.queueNotification:gO(e.timeout),h=()=>{l=!1,o&&(o=!1,c.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const y=()=>i&&m(),x=r.subscribe(y);return c.add(m),()=>{x(),c.delete(m)}},dispatch(m){try{return i=!m?.meta?.[C6],o=!i,o&&(l||(l=!0,f(h))),r.dispatch(m)}finally{i=!0}}})},dX=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new S6(e);return r&&i.push(E6(typeof r=="object"?r:void 0)),i};function rS(e){const t=fX(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:l=void 0,enhancers:c=void 0}=e||{};let f;if(typeof n=="function")f=n;else if(eS(n))f=Ey(n);else throw new Error(Pi(1));let h;typeof r=="function"?h=r(t):h=t();let m=rv;i&&(m=lX({trace:!1,...typeof i=="object"&&i}));const y=UZ(...h),x=dX(y);let b=typeof c=="function"?c(x):x();const C=m(...b);return d6(f,l,C)}function A6(e){const t={},n=[];let r;const i={addCase(o,l){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(Pi(28));if(c in t)throw new Error(Pi(29));return t[c]=l,i},addAsyncThunk(o,l){return l.pending&&(t[o.pending.type]=l.pending),l.rejected&&(t[o.rejected.type]=l.rejected),l.fulfilled&&(t[o.fulfilled.type]=l.fulfilled),l.settled&&n.push({matcher:o.settled,reducer:l.settled}),i},addMatcher(o,l){return n.push({matcher:o,reducer:l}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}KZ(!1);function hX(e){return typeof e=="function"}function mX(e,t){let[n,r,i]=A6(t),o;if(hX(e))o=()=>pO(e());else{const c=pO(e);o=()=>c}function l(c=o(),f){let h=[n[f.type],...r.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[i]),h.reduce((m,y)=>{if(y)if(Iu(m)){const b=y(m,f);return b===void 0?m:b}else{if(Ko(m))return x6(m,x=>y(x,f));{const x=y(m,f);if(x===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return m},c)}return l.getInitialState=o,l}var pX=(e,t)=>uX(e)?e.match(t):e(t);function gX(...e){return t=>e.some(n=>pX(n,t))}var vX="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",T6=(e=21)=>{let t="",n=e;for(;n--;)t+=vX[Math.random()*64|0];return t},yX=["name","message","stack","code"],Fb=class{constructor(e,t){this.payload=e,this.meta=t}_type},vO=class{constructor(e,t){this.payload=e,this.meta=t}_type},bX=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of yX)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},yO="External signal was aborted",O6=(()=>{function e(t,n,r){const i=un(t+"/fulfilled",(f,h,m,y)=>({payload:f,meta:{...y||{},arg:m,requestId:h,requestStatus:"fulfilled"}})),o=un(t+"/pending",(f,h,m)=>({payload:void 0,meta:{...m||{},arg:h,requestId:f,requestStatus:"pending"}})),l=un(t+"/rejected",(f,h,m,y,x)=>({payload:y,error:(r&&r.serializeError||bX)(f||"Rejected"),meta:{...x||{},arg:m,requestId:h,rejectedWithValue:!!y,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function c(f,{signal:h}={}){return(m,y,x)=>{const b=r?.idGenerator?r.idGenerator(f):T6(),C=new AbortController;let w,A;function O(N){A=N,C.abort()}h&&(h.aborted?O(yO):h.addEventListener("abort",()=>O(yO),{once:!0}));const P=async function(){let N;try{let U=r?.condition?.(f,{getState:y,extra:x});if(_X(U)&&(U=await U),U===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const W=new Promise((X,ae)=>{w=()=>{ae({name:"AbortError",message:A||"Aborted"})},C.signal.addEventListener("abort",w)});m(o(b,f,r?.getPendingMeta?.({requestId:b,arg:f},{getState:y,extra:x}))),N=await Promise.race([W,Promise.resolve(n(f,{dispatch:m,getState:y,extra:x,requestId:b,signal:C.signal,abort:O,rejectWithValue:(X,ae)=>new Fb(X,ae),fulfillWithValue:(X,ae)=>new vO(X,ae)})).then(X=>{if(X instanceof Fb)throw X;return X instanceof vO?i(X.payload,b,f,X.meta):i(X,b,f)})])}catch(U){N=U instanceof Fb?l(null,b,f,U.payload,U.meta):l(U,b,f)}finally{w&&C.signal.removeEventListener("abort",w)}return r&&!r.dispatchConditionRejection&&l.match(N)&&N.meta.condition||m(N),N}();return Object.assign(P,{abort:O,requestId:b,arg:f,unwrap(){return P.then(xX)}})}}return Object.assign(c,{pending:o,rejected:l,fulfilled:i,settled:gX(l,i),typePrefix:t})}return e.withTypes=()=>e,e})();function xX(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function _X(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var wX=Symbol.for("rtk-slice-createasyncthunk");function SX(e,t){return`${e}/${t}`}function CX({creators:e}={}){const t=e?.asyncThunk?.[wX];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(Pi(11));const l=(typeof r.reducers=="function"?r.reducers(AX()):r.reducers)||{},c=Object.keys(l),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(N,F){const U=typeof N=="string"?N:N.type;if(!U)throw new Error(Pi(12));if(U in f.sliceCaseReducersByType)throw new Error(Pi(13));return f.sliceCaseReducersByType[U]=F,h},addMatcher(N,F){return f.sliceMatchers.push({matcher:N,reducer:F}),h},exposeAction(N,F){return f.actionCreators[N]=F,h},exposeCaseReducer(N,F){return f.sliceCaseReducersByName[N]=F,h}};c.forEach(N=>{const F=l[N],U={reducerName:N,type:SX(i,N),createNotation:typeof r.reducers=="function"};OX(F)?MX(U,F,h,t):TX(U,F,h)});function m(){const[N={},F=[],U=void 0]=typeof r.extraReducers=="function"?A6(r.extraReducers):[r.extraReducers],W={...N,...f.sliceCaseReducersByType};return mX(r.initialState,X=>{for(let ae in W)X.addCase(ae,W[ae]);for(let ae of f.sliceMatchers)X.addMatcher(ae.matcher,ae.reducer);for(let ae of F)X.addMatcher(ae.matcher,ae.reducer);U&&X.addDefaultCase(U)})}const y=N=>N,x=new Map,b=new WeakMap;let C;function w(N,F){return C||(C=m()),C(N,F)}function A(){return C||(C=m()),C.getInitialState()}function O(N,F=!1){function U(X){let ae=X[N];return typeof ae>"u"&&F&&(ae=ng(b,U,A)),ae}function W(X=y){const ae=ng(x,F,()=>new WeakMap);return ng(ae,X,()=>{const ce={};for(const[re,J]of Object.entries(r.selectors??{}))ce[re]=EX(J,X,()=>ng(b,X,A),F);return ce})}return{reducerPath:N,getSelectors:W,get selectors(){return W(U)},selectSlice:U}}const P={name:i,reducer:w,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:A,...O(o),injectInto(N,{reducerPath:F,...U}={}){const W=F??o;return N.inject({reducerPath:W,reducer:w},U),{...P,...O(W,!0)}}};return P}}function EX(e,t,n,r){function i(o,...l){let c=t(o);return typeof c>"u"&&r&&(c=n()),e(c,...l)}return i.unwrapped=e,i}var jt=CX();function AX(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function TX({type:e,reducerName:t,createNotation:n},r,i){let o,l;if("reducer"in r){if(n&&!jX(r))throw new Error(Pi(17));o=r.reducer,l=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,l?un(e,l):un(e))}function OX(e){return e._reducerDefinitionType==="asyncThunk"}function jX(e){return e._reducerDefinitionType==="reducerWithPrepare"}function MX({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Pi(18));const{payloadCreator:o,fulfilled:l,pending:c,rejected:f,settled:h,options:m}=n,y=i(e,o,m);r.exposeAction(t,y),l&&r.addCase(y.fulfilled,l),c&&r.addCase(y.pending,c),f&&r.addCase(y.rejected,f),h&&r.addMatcher(y.settled,h),r.exposeCaseReducer(t,{fulfilled:l||rg,pending:c||rg,rejected:f||rg,settled:h||rg})}function rg(){}var PX="task",j6="listener",M6="completed",iS="cancelled",LX=`task-${iS}`,NX=`task-${M6}`,u_=`${j6}-${iS}`,RX=`${j6}-${M6}`,jy=class{constructor(e){this.code=e,this.message=`${PX} ${iS} (reason: ${e})`}name="TaskAbortError";message},aS=(e,t)=>{if(typeof e!="function")throw new TypeError(Pi(32))},sv=()=>{},P6=(e,t=sv)=>(e.catch(t),e),L6=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ou=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},ju=e=>{if(e.aborted){const{reason:t}=e;throw new jy(t)}};function N6(e,t){let n=sv;return new Promise((r,i)=>{const o=()=>i(new jy(e.reason));if(e.aborted){o();return}n=L6(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=sv})}var DX=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof jy?"cancelled":"rejected",error:n}}finally{t?.()}},lv=e=>t=>P6(N6(e,t).then(n=>(ju(e),n))),R6=e=>{const t=lv(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:rf}=Object,bO={},My="listenerMiddleware",kX=(e,t)=>{const n=r=>L6(e,()=>Ou(r,e.reason));return(r,i)=>{aS(r);const o=new AbortController;n(o);const l=DX(async()=>{ju(e),ju(o.signal);const c=await r({pause:lv(o.signal),delay:R6(o.signal),signal:o.signal});return ju(o.signal),c},()=>Ou(o,NX));return i?.autoJoin&&t.push(l.catch(sv)),{result:lv(e)(l),cancel(){Ou(o,LX)}}}},IX=(e,t)=>{const n=async(r,i)=>{ju(t);let o=()=>{};const c=[new Promise((f,h)=>{let m=e({predicate:r,effect:(y,x)=>{x.unsubscribe(),f([y,x.getState(),x.getOriginalState()])}});o=()=>{m(),h()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await N6(t,Promise.race(c));return ju(t),f}finally{o()}};return(r,i)=>P6(n(r,i))},D6=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=un(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Pi(21));return aS(o),{predicate:i,type:t,effect:o}},k6=rf(e=>{const{type:t,predicate:n,effect:r}=D6(e);return{id:T6(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Pi(22))}}},{withTypes:()=>k6}),xO=(e,t)=>{const{type:n,effect:r,predicate:i}=D6(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},c_=e=>{e.pending.forEach(t=>{Ou(t,u_)})},zX=(e,t)=>()=>{for(const n of t.keys())c_(n);e.clear()},_O=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},I6=rf(un(`${My}/add`),{withTypes:()=>I6}),UX=un(`${My}/removeAll`),z6=rf(un(`${My}/remove`),{withTypes:()=>z6}),BX=(...e)=>{console.error(`${My}/error`,...e)},rm=(e={})=>{const t=new Map,n=new Map,r=b=>{const C=n.get(b)??0;n.set(b,C+1)},i=b=>{const C=n.get(b)??1;C===1?n.delete(b):n.set(b,C-1)},{extra:o,onError:l=BX}=e;aS(l);const c=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),C=>{b.unsubscribe(),C?.cancelActive&&c_(b)}),f=b=>{const C=xO(t,b)??k6(b);return c(C)};rf(f,{withTypes:()=>f});const h=b=>{const C=xO(t,b);return C&&(C.unsubscribe(),b.cancelActive&&c_(C)),!!C};rf(h,{withTypes:()=>h});const m=async(b,C,w,A)=>{const O=new AbortController,P=IX(f,O.signal),N=[];try{b.pending.add(O),r(b),await Promise.resolve(b.effect(C,rf({},w,{getOriginalState:A,condition:(F,U)=>P(F,U).then(Boolean),take:P,delay:R6(O.signal),pause:lv(O.signal),extra:o,signal:O.signal,fork:kX(O.signal,N),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((F,U,W)=>{F!==O&&(Ou(F,u_),W.delete(F))})},cancel:()=>{Ou(O,u_),b.pending.delete(O)},throwIfCancelled:()=>{ju(O.signal)}})))}catch(F){F instanceof jy||_O(l,F,{raisedBy:"effect"})}finally{await Promise.all(N),Ou(O,RX),i(b),b.pending.delete(O)}},y=zX(t,n);return{middleware:b=>C=>w=>{if(!h6(w))return C(w);if(I6.match(w))return f(w.payload);if(UX.match(w)){y();return}if(z6.match(w))return h(w.payload);let A=b.getState();const O=()=>{if(A===bO)throw new Error(Pi(23));return A};let P;try{if(P=C(w),t.size>0){const N=b.getState(),F=Array.from(t.values());for(const U of F){let W=!1;try{W=U.predicate(w,N,A)}catch(X){W=!1,_O(l,X,{raisedBy:"predicate"})}W&&m(U,w,b,O)}}}finally{A=bO}return P},startListening:f,stopListening:h,clearListeners:y}};function Pi(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const{actions:FX,reducer:$X}=jt({name:"shlink/appUpdates",initialState:!1,reducers:{appUpdateAvailable:()=>!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:VX,resetAppUpdate:HX}=FX,qX=$X,GX=(e,t)=>{e.factory("App",DZ),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>VX),e.serviceFactory("resetAppUpdate",()=>HX)},wO={"Content-Type":"application/json"},SO=e=>e?.body?e?{...e,headers:{...e.headers??{},...wO}}:{headers:wO}:e;let YX=class{#t;constructor(t=globalThis.fetch.bind(globalThis)){this.#t=t}async jsonRequest(t,n){const r=await this.#t(t,SO(n)),i=await r.json();if(!r.ok)throw i;return i}async emptyRequest(t,n){const r=await this.#t(t,SO(n));if(!r.ok)throw await r.json()}};function uv(e){return t=>{const{resetSelectedServer:n}=t;return _.useEffect(()=>{n()},[n]),g.jsx(e,{...t})}}let WX=class extends _.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.jsxs(u6,{title:"Oops! This is awkward :S",children:[g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(Tt,{size:"lg",onClick:()=>n.reload(),children:"Take me back"})]});const{children:r}=this.props;return r}};const Li=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),KX=({id:e,name:t})=>g.jsxs(Ir,{to:`/server/${e}`,className:Oe("servers-list__server-item","flex items-center justify-between gap-x-2 px-4 py-3","rounded-none hover:bg-lm-secondary hover:dark:bg-dm-secondary","border-b last:border-0 border-lm-border dark:border-dm-border"),children:[g.jsx("span",{className:"truncate",children:t}),g.jsx(Be,{icon:Gg})]}),U6=({servers:e,borderless:t})=>g.jsx(g.Fragment,{children:e.length>0&&g.jsx("div",{"data-testid":"list",className:Oe("w-full border-lm-border dark:border-dm-border","md:max-h-56 md:overflow-y-auto -mb-1 scroll-thin",{"border-y":!t}),children:e.map(({id:n,name:r})=>g.jsx(KX,{id:n,name:r},n))})}),B6=({color:e=Mh(),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"})]})}),ZX=({servers:e})=>{const t=uo(),n=Object.values(e),r=n.length>0;return _.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[n,t]),g.jsx("div",{className:"px-3 w-full",children:g.jsx(ln,{className:"mx-auto max-w-[720px] overflow-hidden",children:g.jsxs("div",{className:"flex flex-col md:flex-row",children:[g.jsx("div",{className:"p-6 hidden md:flex items-center w-[40%]",children:g.jsx("div",{className:"w-full",children:g.jsx(B6,{})})}),g.jsxs("div",{className:"md:border-l border-lm-border dark:border-dm-border flex-grow",children:[g.jsx("h1",{className:Oe("p-4 text-center border-lm-border dark:border-dm-border",{"border-b":!r}),children:"Welcome!"}),r?g.jsx(U6,{servers:n}):g.jsxs("div",{className:"p-6 text-center flex flex-col gap-12 text-xl",children:[g.jsx("p",{children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(Tt,{to:"/server/create",size:"lg",inline:!0,children:[g.jsx(Be,{icon:Wh,widthAuto:!0})," Add a server"]})}),g.jsx("p",{children:g.jsx(Li,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"mr-2",children:"Learn more about Shlink"}),g.jsx(Be,{icon:AV})]})})})]})]})]})})})},F6=()=>{const{ServersDropdown:e}=Ma(F6),{pathname:t}=Or(),n="/settings";return g.jsxs(J2,{className:"[&]:fixed top-0 z-900",brand:g.jsxs(Ir,{to:"/",className:"[&]:text-white no-underline flex items-center gap-2",children:[g.jsx(B6,{className:"w-7",color:"white"})," ",g.jsx("small",{className:"font-normal",children:"Shlink"})]}),children:[g.jsxs(J2.MenuItem,{to:n,active:t.startsWith(n),className:"flex items-center gap-1.5",children:[g.jsx(Be,{icon:_V})," Settings"]}),g.jsx(e,{})]})},XX=Pa(F6,["ServersDropdown"]),QX=({children:e})=>{const t=Or();return _.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},$6=(e,t)=>e.reduce((n,r)=>{const i=t(r);return n[i]=(n[i]||0)+1,n},{}),V6=(e,t)=>e.reduce((n,r)=>{const i=t(r);return(n[i]=n[i]||[]).push(r),n},{}),$b=e=>Object.prototype.toString.call(e)==="[object Object]",H6=(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}},Mf=(e,t)=>{const n={...e};return!$b(e)||!$b(t)||Object.keys(t).forEach(r=>{$b(t[r])?n[r]=r in e&&e[r]!==void 0?Mf(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},q6=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),JX=(e,t)=>[...e].sort((n,r)=>{const i=t(n),o=t(r);return i===o?0:i<o?-1:1}),af=(e,t)=>{const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n},CO=(e,t)=>Object.fromEntries(e.map((n,r)=>[n,t[r]])),eQ=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,EO=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(eQ);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},AO=e=>e==="*"||e==="x"||e==="X",TO=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},tQ=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],nQ=(e,t)=>{if(AO(e)||AO(t))return 0;const[n,r]=tQ(TO(e),TO(t));return n>r?1:n<r?-1:0},OO=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=nQ(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0},rQ=(e,t)=>{const n=EO(e),r=EO(t),i=n.pop(),o=r.pop(),l=OO(n,r);return l!==0?l:i&&o?OO(i.split("."),o.split(".")):i||o?i?-1:1:0},f_=(e,t,n)=>{iQ(n);const r=rQ(e,t);return G6[n].includes(r)},G6={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},jO=Object.keys(G6),iQ=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(jO.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${jO.join("|")}`)},Y6=H6(e=>e,e=>{try{return f_(e,e,"=")}catch{return!1}}),W6=e=>Y6(e)?`v${e}`:e,K6=(e,t="latest")=>Y6(e)?e:t,aQ="%_VERSION_%",oQ=e=>W6(K6(e)),MO=({project:e,version:t})=>g.jsx(Li,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-gray-500",children:g.jsx("b",{children:t})}),sQ=({selectedServer:e,clientVersion:t=aQ})=>{const n=oQ(t);return g.jsxs("small",{className:"text-gray-500",children:[Ew(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(MO,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(MO,{project:"shlink-web-client",version:n})]})},lQ=({selectedServer:e})=>g.jsx("div",{className:Oe("text-center",{"md:ml-(--aside-menu-width)":Ew(e)}),children:g.jsx(sQ,{selectedServer:e})}),oS={INVALID_ARGUMENT:"https://shlink.io/api/error/invalid-data",INVALID_SHORT_URL_DELETION:"https://shlink.io/api/error/invalid-short-url-deletion",DOMAIN_NOT_FOUND:"https://shlink.io/api/error/domain-not-found",FORBIDDEN_OPERATION:"https://shlink.io/api/error/forbidden-tag-operation",INVALID_SLUG:"https://shlink.io/api/error/non-unique-slug",INVALID_SHORTCODE:"https://shlink.io/api/error/short-url-not-found",TAG_CONFLICT:"https://shlink.io/api/error/tag-conflict",TAG_NOT_FOUND:"https://shlink.io/api/error/tag-not-found",MERCURE_NOT_CONFIGURED:"https://shlink.io/api/error/mercure-not-configured",INVALID_AUTHORIZATION:"https://shlink.io/api/error/missing-authentication",INVALID_API_KEY:"https://shlink.io/api/error/invalid-api-key",NOT_FOUND:"https://shlink.io/api/error/not-found",INVALID_URL:"https://shlink.io/api/error/invalid-url"};Object.freeze(oS);const sS=(e,t,n=1)=>q6(n,e+1).map(t),uQ=e=>Array.isArray(e)&&e.length===0||typeof e=="string"&&e===""||typeof e=="object"&&Object.keys(e).length===0,wu=e=>e!=null&&!uQ(e),Vb=e=>e||null,d_=e=>e?"true":"false",Hb=e=>e===void 0?void 0:d_(e),cQ=e=>{if(e.length<2)return e[0]??"";const[t,...n]=e.reverse();return`${n.reverse().join(", ")} and ${t}`},PO="[&]:p-0 [&]:md:w-1/4 [&]:rounded-none",fQ=({onChange:e,className:t})=>{const n=Fn("qrCodes",Pf),{color:r,bgColor:i}=n;return g.jsxs(Nt,{title:"Colors",className:t,bodyClassName:"flex flex-col gap-4",children:[g.jsx(di,{label:"Default color:",helpText:g.jsxs(g.Fragment,{children:["QR codes will initially use ",g.jsx("b",{"data-testid":"color",children:r})," color."]}),type:"color",value:r,onChange:o=>e({...n,color:o.target.value}),inputClassName:PO}),g.jsx(di,{label:"Default background color:",helpText:g.jsxs(g.Fragment,{children:["QR codes will initially use ",g.jsx("b",{"data-testid":"bg-color",children:i})," background color."]}),type:"color",value:i,onChange:o=>e({...n,bgColor:o.target.value}),inputClassName:PO})]})},Z6=({errorCorrection:e,onChange:t})=>g.jsxs(qe,{buttonContent:e?`Error correction (${e})`:g.jsx("i",{children:"Default error correction"}),buttonClassName:"w-full",children:[g.jsxs(qe.Item,{selected:e==="L",onClick:()=>t("L"),children:[g.jsx("b",{children:"L"}),"ow"]}),g.jsxs(qe.Item,{selected:e==="M",onClick:()=>t("M"),children:[g.jsx("b",{children:"M"}),"edium"]}),g.jsxs(qe.Item,{selected:e==="Q",onClick:()=>t("Q"),children:[g.jsx("b",{children:"Q"}),"uartile"]}),g.jsxs(qe.Item,{selected:e==="H",onClick:()=>t("H"),children:[g.jsx("b",{children:"H"}),"igh"]})]}),dQ=["png","svg","webp","jpeg"],X6=({format:e,onChange:t})=>g.jsx(qe,{buttonContent:`Format (${e})`,buttonClassName:"w-full",children:dQ.map(n=>g.jsx(qe.Item,{selected:e===n,onClick:()=>t(n),children:n},n))}),Zo=({className:e,size:t,...n})=>g.jsx("span",{className:Oe("text-gray-500 dark:text-gray-400",{"text-sm":t==="sm","text-lg":t==="lg"},e),...n}),hQ=({onChange:e})=>{const t=Fn("qrCodes",Pf),{format:n,errorCorrection:r}=t;return g.jsxs(Nt,{title:"Format",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx(X6,{format:n,onChange:i=>e({...t,format:i})}),g.jsxs(Zo,{size:"sm",children:["When downloading a QR code, it will use ",g.jsx("b",{"data-testid":"format",children:n})," format by default."]})]}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx(Z6,{errorCorrection:r,onChange:i=>e({...t,errorCorrection:i})}),g.jsxs(Zo,{size:"sm",children:["QR codes will initially have a ",g.jsx("b",{"data-testid":"error-correction",children:r})," error correction."]})]})]})},mQ=({onChange:e,className:t})=>{const n=Fn("qrCodes",Pf),{size:r,margin:i}=n;return g.jsxs(Nt,{title:"Size",className:t,bodyClassName:"flex flex-col gap-4",children:[g.jsx(di,{label:"Default dimensions:",helpText:g.jsxs(g.Fragment,{children:["QR codes will be initially generated with ",g.jsxs("b",{"data-testid":"size",children:[r,"x",r,"px"]}),"."]}),type:"range",value:r,step:10,min:50,max:1e3,onChange:o=>e({...n,size:Number(o.target.value)}),inputClassName:"[&]:p-0"}),g.jsx(di,{label:"Default margin:",helpText:g.jsxs(g.Fragment,{children:["QR codes will be initially generated with a ",g.jsxs("b",{"data-testid":"margin",children:[i,"px"]})," margin."]}),type:"range",value:i,step:1,min:0,max:100,onChange:o=>e({...n,margin:Number(o.target.value)}),inputClassName:"[&]:p-0"})]})},yl=({children:e,helpText:t,"data-testid":n,...r})=>g.jsxs("div",{"data-testid":n,children:[g.jsxs(ja,{className:"flex items-center gap-x-2",children:[g.jsx(KK,{...r}),e]}),t&&g.jsx(Zo,{size:"sm","data-testid":n?`${n}-help-text`:"help-text",className:"pl-10",children:t})]}),pQ=({toggleRealTimeUpdates:e,onIntervalChange:t})=>{const{enabled:n,interval:r}=Fn("realTimeUpdates",{enabled:!0});return g.jsxs(Nt,{title:"Real-time updates",className:"h-full",bodyClassName:"flex flex-col gap-y-4",children:[g.jsx(yl,{checked:n,onChange:e,helpText:g.jsxs(g.Fragment,{children:["Real-time updates are currently being ",g.jsx("b",{children:n?"processed":"ignored"}),"."]}),children:"Enable or disable real-time updates."}),g.jsxs("div",{children:[g.jsx(di,{label:g.jsx("span",{className:Oe({"dark:text-gray-400":!n}),children:"Real-time updates frequency (in minutes):"}),type:"number",min:0,placeholder:"Immediate",disabled:!n,value:`${r??""}`,onChange:({target:i})=>t(Number(i.value))}),n&&g.jsx(Zo,{size:"sm",children:r?g.jsxs("span",{children:["Updates will be reflected in the UI every ",g.jsx("b",{children:r})," minute",r>1&&"s","."]}):"Updates will be reflected in the UI as soon as they happen."})]})]})},qb=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",gQ=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."]}),vQ=({onChange:e})=>{const t=Fn("shortUrlCreation"),n=r=>()=>e({...t,tagFilteringMode:r});return g.jsxs(Nt,{title:"Short URLs form",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsx(yl,{"data-testid":"forward-query",checked:t?.forwardQuery??!0,onChange:r=>e({...t,forwardQuery:r}),helpText:g.jsxs(g.Fragment,{children:["The initial state of the ",g.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",g.jsx("b",{children:t?.forwardQuery??!0?"checked":"unchecked"}),"."]}),children:"Make all new short URLs forward their query params to the long URL."}),g.jsxs("div",{className:"flex flex-col",children:[g.jsx(ja,{className:"mb-1.5",children:"Tag suggestions search mode:"}),g.jsxs(qe,{buttonContent:qb(t?.tagFilteringMode),buttonClassName:"w-full",children:[g.jsx(qe.Item,{selected:!t?.tagFilteringMode||t.tagFilteringMode==="startsWith",onClick:n("startsWith"),children:qb("startsWith")}),g.jsx(qe.Item,{selected:t?.tagFilteringMode==="includes",onClick:n("includes"),children:qb("includes")})]}),g.jsx(Zo,{size:"sm",className:"mt-0.5",children:gQ(t?.tagFilteringMode)})]})]})},yQ={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},bQ=({onChange:e,defaultOrdering:t})=>{const n=Fn("shortUrlsList"),r=n?.confirmDeletions??!0;return g.jsxs(Nt,{title:"Short URLs list",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsx(yl,{checked:r,onChange:i=>e({...n,confirmDeletions:i}),helpText:g.jsxs(g.Fragment,{children:["When deleting a short URL, confirmation ",g.jsx("b",{children:r?"will":"won't"})," be required."]}),children:"Request confirmation before deleting a short URL."}),g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsx(ja,{children:"Default ordering for short URLs list:"}),g.jsx(tm,{buttonClassName:"w-full",items:yQ,order:n?.defaultOrdering??t,onChange:i=>e({defaultOrdering:!i.dir&&!i.field?void 0:i})})]})]})},xQ={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},_Q=({onChange:e})=>{const t=Fn("tags",{});return g.jsx(Nt,{title:"Tags",className:"card",children:g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsx(ja,{children:"Default ordering for tags list:"}),g.jsx(tm,{buttonClassName:"w-full",items:xQ,order:t.defaultOrdering??{},onChange:n=>e({...t,defaultOrdering:!n.field&&!n.dir?void 0:n})})]})})},wQ=({onChange:e,_matchMedia:t})=>{const n=Fn("ui"),r=_.useMemo(()=>n?.theme??Jw(t),[n?.theme,t]);return g.jsxs(Nt,{title:"User interface",bodyClassName:"flex justify-between items-center",children:[g.jsx(yl,{checked:r==="dark",onChange:i=>e({...n,theme:i?"dark":"light"}),children:"Use dark theme."}),g.jsx(Be,{icon:r==="dark"?XV:$V})]})},LO={potentialBot:"Potential bot",date:"Date",country:"Country",region:"Region",city:"City",browser:"Browser",os:"OS",userAgent:"User agent",referer:"Referrer",visitedUrl:"Visited URL"},Rg={browser:["userAgent"],os:["userAgent"],userAgent:["browser","os"]};Object.freeze(Rg);const SQ=({onChange:e})=>{const t=Fn("visitsList"),n=_.useMemo(()=>Mf(Py,t?.columns??{}),[t?.columns]),r=_.useCallback((i,o)=>{const l={...n,[i]:o};o&&Rg[i]?.forEach(c=>{l[c]=!1}),e({columns:l})},[n,e]);return g.jsxs(Nt,{title:"Visits list",children:[g.jsx("p",{className:"mb-2",children:"Columns to show in visits table:"}),g.jsx("ul",{className:"flex flex-col gap-y-1",children:Object.entries(LO).map(([i,o])=>g.jsx("li",{children:g.jsx(yl,{checked:n[i],onChange:l=>r(i,l),children:g.jsxs("span",{className:"inline-flex gap-2",children:[o,Rg[i]&&g.jsxs(Zo,{children:["(excludes ",cQ(Rg[i].map(l=>LO[l])),")"]})]})})},i))})]})},Q6={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},CQ=(e,t)=>!e||e==="all"?t:Q6[e],EQ=({onChange:e,active:t,allText:n})=>g.jsxs(qe,{buttonContent:CQ(t,n),buttonClassName:"w-full",children:[g.jsx(qe.Item,{selected:t==="all",onClick:()=>e("all"),children:n}),g.jsx(qe.Separator,{}),Object.entries(Q6).map(([r,i])=>g.jsx(qe.Item,{selected:t===r,onClick:()=>e(r),children:i},r))]}),NO=e=>e?.defaultInterval??"last30Days",AQ=({onChange:e})=>{const t=Fn("visits"),n=_.useCallback(({defaultInterval:r,...i})=>e({defaultInterval:r??NO(t),...i}),[e,t]);return g.jsxs(Nt,{title:"Visits",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsx(yl,{"data-testid":"exclude-bots",checked:!!t?.excludeBots,onChange:r=>n({excludeBots:r}),helpText:g.jsxs(g.Fragment,{children:["The visits coming from potential bots will be ",g.jsx("b",{children:t?.excludeBots?"excluded":"included"}),"."]}),children:"Exclude bots wherever possible (this options effect might depend on Shlink servers version)."}),g.jsx(yl,{"data-testid":"compare-visits",checked:!!t?.loadPrevInterval,onChange:r=>n({loadPrevInterval:r}),helpText:g.jsxs(g.Fragment,{children:["When loading visits, previous period ",g.jsx("b",{children:t?.loadPrevInterval?"will":"won't"})," be loaded by default."]}),children:"Compare visits with previous period."}),g.jsxs("div",{className:"flex flex-col",children:[g.jsx(ja,{className:"mb-1.5",children:"Default interval to load on visits sections:"}),g.jsx(EQ,{allText:"All visits",active:NO(t),onChange:r=>n({defaultInterval:r})})]})]})},Kd=({children:e,className:t})=>g.jsx("div",{className:Oe("flex flex-col gap-4",t),children:e}),TQ=({settings:e,onUpdateSettings:t,defaultShortUrlsListOrdering:n})=>{const r=_.useCallback(f=>t?.(Mf(e,f)),[e,t]),i=_.useCallback(f=>r({realTimeUpdates:{enabled:f}}),[r]),o=_.useCallback(f=>r({realTimeUpdates:{interval:f}}),[r]),l=_.useCallback((f,h)=>r({[f]:h}),[r]),c=_.useCallback(f=>l("qrCodes",f),[l]);return g.jsxs(tD,{value:e,children:[g.jsxs(tl,{className:"mb-4 sticky top-(--header-height) z-2",children:[g.jsx(tl.Pill,{to:"../general",children:"General"}),g.jsx(tl.Pill,{to:"../short-urls",children:"Short URLs"}),g.jsx(tl.Pill,{to:"../visits",children:"Visits"}),g.jsx(tl.Pill,{to:"../tags",children:"Tags"}),g.jsx(tl.Pill,{to:"../qr-codes",children:"QR codes"})]}),g.jsxs(oy,{children:[g.jsx(ft,{path:"general",element:g.jsxs(Kd,{children:[g.jsx(wQ,{onChange:f=>l("ui",f)}),g.jsx(pQ,{toggleRealTimeUpdates:i,onIntervalChange:o})]})}),g.jsx(ft,{path:"short-urls",element:g.jsxs(Kd,{children:[g.jsx(vQ,{onChange:f=>l("shortUrlCreation",f)}),g.jsx(bQ,{defaultOrdering:n,onChange:f=>l("shortUrlsList",f)})]})}),g.jsx(ft,{path:"visits",element:g.jsxs(Kd,{children:[g.jsx(AQ,{onChange:f=>l("visits",f)}),g.jsx(SQ,{onChange:f=>l("visitsList",f)})]})}),g.jsx(ft,{path:"tags",element:g.jsx(Kd,{children:g.jsx(_Q,{onChange:f=>l("tags",f)})})}),g.jsx(ft,{path:"qr-codes",element:g.jsxs(Kd,{children:[g.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[g.jsx(mQ,{onChange:c,className:"w-full"}),g.jsx(fQ,{onChange:c,className:"w-full"})]}),g.jsx(hQ,{onChange:c})]})}),g.jsx(ft,{path:"*",element:g.jsx(vw,{replace:!0,to:"../general"})})]})]})},Pf={size:300,margin:0,color:"#000000",bgColor:"#ffffff",errorCorrection:"L",format:"png"};Object.freeze(Pf);const Py={potentialBot:!0,date:!0,country:!0,region:!1,city:!0,browser:!0,os:!0,userAgent:!1,referer:!0,visitedUrl:!0};Object.freeze(Py);const J6={realTimeUpdates:{enabled:!0},shortUrlCreation:{},visits:{defaultInterval:"last30Days"},visitsList:{columns:Py},shortUrlsList:{defaultOrdering:{field:"dateCreated",dir:"DESC"}},qrCodes:Pf},eD=_.createContext(J6),{Provider:tD}=eD,lS=()=>_.useContext(eD)??J6;function Fn(e,t){return lS()[e]??t}var dh={exports:{}};var OQ=dh.exports,RO;function jQ(){return RO||(RO=1,function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,l=n.XDomainRequest,c=n.ActiveXObject,f=n.EventSource,h=n.document,m=n.Promise,y=n.fetch,x=n.Response,b=n.TextDecoder,C=n.TextEncoder,w=n.AbortController;if(typeof window<"u"&&typeof h<"u"&&!("readyState"in h)&&h.body==null&&(h.readyState="loading",window.addEventListener("load",function(ie){h.readyState="complete"},!1)),o==null&&c!=null&&(o=function(){return new c("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(ie){function xe(){}return xe.prototype=ie,new xe}),Date.now||(Date.now=function(){return new Date().getTime()}),w==null){var A=y;y=function(ie,xe){var Ee=xe.signal;return A(ie,{headers:xe.headers,credentials:xe.credentials,cache:xe.cache}).then(function(Me){var Ue=Me.body.getReader();return Ee._reader=Ue,Ee._aborted&&Ee._reader.cancel(),{status:Me.status,statusText:Me.statusText,headers:Me.headers,body:{getReader:function(){return Ue}}}})},w=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function O(){this.bitsNeeded=0,this.codePoint=0}O.prototype.decode=function(ie){function xe(Qe,We,ze){if(ze===1)return Qe>=128>>We&&Qe<<We<=2047;if(ze===2)return Qe>=2048>>We&&Qe<<We<=55295||Qe>=57344>>We&&Qe<<We<=65535;if(ze===3)return Qe>=65536>>We&&Qe<<We<=1114111;throw new Error}function Ee(Qe,We){if(Qe===6*1)return We>>6>15?3:We>31?2:1;if(Qe===6*2)return We>15?3:2;if(Qe===6*3)return 3;throw new Error}for(var Me=65533,Ue="",ke=this.bitsNeeded,Ve=this.codePoint,ot=0;ot<ie.length;ot+=1){var Ge=ie[ot];ke!==0&&(Ge<128||Ge>191||!xe(Ve<<6|Ge&63,ke-6,Ee(ke,Ve)))&&(ke=0,Ve=Me,Ue+=String.fromCharCode(Ve)),ke===0?(Ge>=0&&Ge<=127?(ke=0,Ve=Ge):Ge>=192&&Ge<=223?(ke=6*1,Ve=Ge&31):Ge>=224&&Ge<=239?(ke=6*2,Ve=Ge&15):Ge>=240&&Ge<=247?(ke=6*3,Ve=Ge&7):(ke=0,Ve=Me),ke!==0&&!xe(Ve,ke,Ee(ke,Ve))&&(ke=0,Ve=Me)):(ke-=6,Ve=Ve<<6|Ge&63),ke===0&&(Ve<=65535?Ue+=String.fromCharCode(Ve):(Ue+=String.fromCharCode(55296+(Ve-65535-1>>10)),Ue+=String.fromCharCode(56320+(Ve-65535-1&1023))))}return this.bitsNeeded=ke,this.codePoint=Ve,Ue};var P=function(){try{return new b().decode(new C().encode("test"),{stream:!0})==="test"}catch(ie){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+ie)}return!1};(b==null||C==null||!P())&&(b=O);var N=function(){};function F(ie){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=N,this.onload=N,this.onerror=N,this.onreadystatechange=N,this._contentType="",this._xhr=ie,this._sendTimeout=0,this._abort=N}F.prototype.open=function(ie,xe){this._abort(!0);var Ee=this,Me=this._xhr,Ue=1,ke=0;this._abort=function(ze){Ee._sendTimeout!==0&&(i(Ee._sendTimeout),Ee._sendTimeout=0),(Ue===1||Ue===2||Ue===3)&&(Ue=4,Me.onload=N,Me.onerror=N,Me.onabort=N,Me.onprogress=N,Me.onreadystatechange=N,Me.abort(),ke!==0&&(i(ke),ke=0),ze||(Ee.readyState=4,Ee.onabort(null),Ee.onreadystatechange())),Ue=0};var Ve=function(){if(Ue===1){var ze=0,nt="",Pt=void 0;if("contentType"in Me)ze=200,nt="OK",Pt=Me.contentType;else try{ze=Me.status,nt=Me.statusText,Pt=Me.getResponseHeader("Content-Type")}catch{ze=0,nt="",Pt=void 0}ze!==0&&(Ue=2,Ee.readyState=2,Ee.status=ze,Ee.statusText=nt,Ee._contentType=Pt,Ee.onreadystatechange())}},ot=function(){if(Ve(),Ue===2||Ue===3){Ue=3;var ze="";try{ze=Me.responseText}catch{}Ee.readyState=3,Ee.responseText=ze,Ee.onprogress()}},Ge=function(ze,nt){if((nt==null||nt.preventDefault==null)&&(nt={preventDefault:N}),ot(),Ue===1||Ue===2||Ue===3){if(Ue=4,ke!==0&&(i(ke),ke=0),Ee.readyState=4,ze==="load")Ee.onload(nt);else if(ze==="error")Ee.onerror(nt);else if(ze==="abort")Ee.onabort(nt);else throw new TypeError;Ee.onreadystatechange()}},Qe=function(ze){Me!=null&&(Me.readyState===4?(!("onload"in Me)||!("onerror"in Me)||!("onabort"in Me))&&Ge(Me.responseText===""?"error":"load",ze):Me.readyState===3?"onprogress"in Me||ot():Me.readyState===2&&Ve())},We=function(){ke=r(function(){We()},500),Me.readyState===3&&ot()};"onload"in Me&&(Me.onload=function(ze){Ge("load",ze)}),"onerror"in Me&&(Me.onerror=function(ze){Ge("error",ze)}),"onabort"in Me&&(Me.onabort=function(ze){Ge("abort",ze)}),"onprogress"in Me&&(Me.onprogress=ot),"onreadystatechange"in Me&&(Me.onreadystatechange=function(ze){Qe(ze)}),("contentType"in Me||!("ontimeout"in o.prototype))&&(xe+=(xe.indexOf("?")===-1?"?":"&")+"padding=true"),Me.open(ie,xe,!0),"readyState"in Me&&(ke=r(function(){We()},0))},F.prototype.abort=function(){this._abort(!1)},F.prototype.getResponseHeader=function(ie){return this._contentType},F.prototype.setRequestHeader=function(ie,xe){var Ee=this._xhr;"setRequestHeader"in Ee&&Ee.setRequestHeader(ie,xe)},F.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},F.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&h!=null&&h.readyState!=null&&h.readyState!=="complete"){var ie=this;ie._sendTimeout=r(function(){ie._sendTimeout=0,ie.send()},4);return}var xe=this._xhr;"withCredentials"in xe&&(xe.withCredentials=this.withCredentials);try{xe.send(void 0)}catch(Ee){throw Ee}};function U(ie){return ie.replace(/[A-Z]/g,function(xe){return String.fromCharCode(xe.charCodeAt(0)+32)})}function W(ie){for(var xe=Object.create(null),Ee=ie.split(`\r
`),Me=0;Me<Ee.length;Me+=1){var Ue=Ee[Me],ke=Ue.split(": "),Ve=ke.shift(),ot=ke.join(": ");xe[U(Ve)]=ot}this._map=xe}W.prototype.get=function(ie){return this._map[U(ie)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function X(){}X.prototype.open=function(ie,xe,Ee,Me,Ue,ke,Ve){ie.open("GET",Ue);var ot=0;ie.onprogress=function(){var Qe=ie.responseText,We=Qe.slice(ot);ot+=We.length,Ee(We)},ie.onerror=function(Qe){Qe.preventDefault(),Me(new Error("NetworkError"))},ie.onload=function(){Me(null)},ie.onabort=function(){Me(null)},ie.onreadystatechange=function(){if(ie.readyState===o.HEADERS_RECEIVED){var Qe=ie.status,We=ie.statusText,ze=ie.getResponseHeader("Content-Type"),nt=ie.getAllResponseHeaders();xe(Qe,We,ze,new W(nt))}},ie.withCredentials=ke;for(var Ge in Ve)Object.prototype.hasOwnProperty.call(Ve,Ge)&&ie.setRequestHeader(Ge,Ve[Ge]);return ie.send(),ie};function ae(ie){this._headers=ie}ae.prototype.get=function(ie){return this._headers.get(ie)};function ce(){}ce.prototype.open=function(ie,xe,Ee,Me,Ue,ke,Ve){var ot=null,Ge=new w,Qe=Ge.signal,We=new b;return y(Ue,{headers:Ve,credentials:ke?"include":"same-origin",signal:Qe,cache:"no-store"}).then(function(ze){return ot=ze.body.getReader(),xe(ze.status,ze.statusText,ze.headers.get("Content-Type"),new ae(ze.headers)),new m(function(nt,Pt){var at=function(){ot.read().then(function(Lt){if(Lt.done)nt(void 0);else{var Ot=We.decode(Lt.value,{stream:!0});Ee(Ot),at()}}).catch(function(Lt){Pt(Lt)})};at()})}).catch(function(ze){if(ze.name!=="AbortError")return ze}).then(function(ze){Me(ze)}),{abort:function(){ot?.cancel(),Ge.abort()}}};function re(){this._listeners=Object.create(null)}function J(ie){r(function(){throw ie},0)}re.prototype.dispatchEvent=function(ie){ie.target=this;var xe=this._listeners[ie.type];if(xe!=null)for(var Ee=xe.length,Me=0;Me<Ee;Me+=1){var Ue=xe[Me];try{typeof Ue.handleEvent=="function"?Ue.handleEvent(ie):Ue.call(this,ie)}catch(ke){J(ke)}}},re.prototype.addEventListener=function(ie,xe){ie=String(ie);var Ee=this._listeners,Me=Ee[ie];Me==null&&(Me=[],Ee[ie]=Me);for(var Ue=!1,ke=0;ke<Me.length;ke+=1)Me[ke]===xe&&(Ue=!0);Ue||Me.push(xe)},re.prototype.removeEventListener=function(ie,xe){ie=String(ie);var Ee=this._listeners,Me=Ee[ie];if(Me!=null){for(var Ue=[],ke=0;ke<Me.length;ke+=1)Me[ke]!==xe&&Ue.push(Me[ke]);Ue.length===0?delete Ee[ie]:Ee[ie]=Ue}};function oe(ie){this.type=ie,this.target=void 0}function _e(ie,xe){oe.call(this,ie),this.data=xe.data,this.lastEventId=xe.lastEventId}_e.prototype=Object.create(oe.prototype);function se(ie,xe){oe.call(this,ie),this.status=xe.status,this.statusText=xe.statusText,this.headers=xe.headers}se.prototype=Object.create(oe.prototype);function ue(ie,xe){oe.call(this,ie),this.error=xe.error}ue.prototype=Object.create(oe.prototype);var Y=-1,k=0,z=1,H=2,I=-1,j=0,q=1,ee=2,le=3,pe=/^text\/event\-stream(;.*)?$/i,he=1e3,ve=18e6,D=function(ie,xe){var Ee=ie==null?xe:parseInt(ie,10);return Ee!==Ee&&(Ee=xe),R(Ee)},R=function(ie){return Math.min(Math.max(ie,he),ve)},G=function(ie,xe,Ee){try{typeof xe=="function"&&xe.call(ie,Ee)}catch(Me){J(Me)}};function te(ie,xe){re.call(this),xe=xe||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ne(this,ie,xe)}function V(){return o!=null&&"withCredentials"in o.prototype||l==null?new o:new l}var Z=y!=null&&x!=null&&"body"in x.prototype;function ne(ie,xe,Ee){xe=String(xe);var Me=!!Ee.withCredentials,Ue=Ee.lastEventIdQueryParameterName||"lastEventId",ke=R(1e3),Ve=D(Ee.heartbeatTimeout,45e3),ot="",Ge=ke,Qe=!1,We=0,ze=Ee.headers||{},nt=Ee.Transport,Pt=Z&&nt==null?void 0:new F(nt!=null?new nt:V()),at=nt!=null&&typeof nt!="string"?new nt:Pt==null?new ce:new X,Lt=void 0,Ot=0,gt=Y,$t="",On="",vt="",Ui="",Xn=j,Rl=0,Ur=0,fo=function(jn,fn,Qn,xn){if(gt===k)if(jn===200&&Qn!=null&&pe.test(Qn)){gt=z,Qe=Date.now(),Ge=ke,ie.readyState=z;var Jn=new se("open",{status:jn,statusText:fn,headers:xn});ie.dispatchEvent(Jn),G(ie,ie.onopen,Jn)}else{var Mn="";jn!==200?(fn&&(fn=fn.replace(/\s+/g," ")),Mn="EventSource's response has a status "+jn+" "+fn+" that is not 200. Aborting the connection."):Mn="EventSource's response has a Content-Type specifying an unsupported type: "+(Qn==null?"-":Qn.replace(/\s+/g," "))+". Aborting the connection.",Da();var Jn=new se("error",{status:jn,statusText:fn,headers:xn});ie.dispatchEvent(Jn),G(ie,ie.onerror,Jn),console.error(Mn)}},ho=function(jn){if(gt===z){for(var fn=-1,Qn=0;Qn<jn.length;Qn+=1){var xn=jn.charCodeAt(Qn);(xn===10||xn===13)&&(fn=Qn)}var Jn=(fn!==-1?Ui:"")+jn.slice(0,fn+1);Ui=(fn===-1?Ui:"")+jn.slice(fn+1),jn!==""&&(Qe=Date.now(),We+=jn.length);for(var Mn=0;Mn<Jn.length;Mn+=1){var xn=Jn.charCodeAt(Mn);if(Xn===I&&xn===10)Xn=j;else if(Xn===I&&(Xn=j),xn===13||xn===10){if(Xn!==j){Xn===q&&(Ur=Mn+1);var Zr=Jn.slice(Rl,Ur-1),Xr=Jn.slice(Ur+(Ur<Mn&&Jn.charCodeAt(Ur)===32?1:0),Mn);Zr==="data"?($t+=`
`,$t+=Xr):Zr==="id"?On=Xr:Zr==="event"?vt=Xr:Zr==="retry"?(ke=D(Xr,ke),Ge=ke):Zr==="heartbeatTimeout"&&(Ve=D(Xr,Ve),Ot!==0&&(i(Ot),Ot=r(function(){hi()},Ve)))}if(Xn===j){if($t!==""){ot=On,vt===""&&(vt="message");var Dn=new _e(vt,{data:$t.slice(1),lastEventId:On});if(ie.dispatchEvent(Dn),vt==="open"?G(ie,ie.onopen,Dn):vt==="message"?G(ie,ie.onmessage,Dn):vt==="error"&&G(ie,ie.onerror,Dn),gt===H)return}$t="",vt=""}Xn=xn===13?I:j}else Xn===j&&(Rl=Mn,Xn=q),Xn===q?xn===58&&(Ur=Mn+1,Xn=ee):Xn===ee&&(Xn=le)}}},Bi=function(jn){if(gt===z||gt===k){gt=Y,Ot!==0&&(i(Ot),Ot=0),Ot=r(function(){hi()},Ge),Ge=R(Math.min(ke*16,Ge*2)),ie.readyState=k;var fn=new ue("error",{error:jn});ie.dispatchEvent(fn),G(ie,ie.onerror,fn),jn!=null&&console.error(jn)}},Da=function(){gt=H,Lt!=null&&(Lt.abort(),Lt=void 0),Ot!==0&&(i(Ot),Ot=0),ie.readyState=H},hi=function(){if(Ot=0,gt!==Y){if(!Qe&&Lt!=null)Bi(new Error("No activity within "+Ve+" milliseconds. "+(gt===k?"No response received.":We+" chars received.")+" Reconnecting.")),Lt!=null&&(Lt.abort(),Lt=void 0);else{var jn=Math.max((Qe||Date.now())+Ve-Date.now(),1);Qe=!1,Ot=r(function(){hi()},jn)}return}Qe=!1,We=0,Ot=r(function(){hi()},Ve),gt=k,$t="",vt="",On=ot,Ui="",Rl=0,Ur=0,Xn=j;var fn=xe;if(xe.slice(0,5)!=="data:"&&xe.slice(0,5)!=="blob:"&&ot!==""){var Qn=xe.indexOf("?");fn=Qn===-1?xe:xe.slice(0,Qn+1)+xe.slice(Qn+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Xr,Dn){return Dn===Ue?"":Xr}),fn+=(xe.indexOf("?")===-1?"?":"&")+Ue+"="+encodeURIComponent(ot)}var xn=ie.withCredentials,Jn={};Jn.Accept="text/event-stream";var Mn=ie.headers;if(Mn!=null)for(var Zr in Mn)Object.prototype.hasOwnProperty.call(Mn,Zr)&&(Jn[Zr]=Mn[Zr]);try{Lt=at.open(Pt,fo,ho,Bi,fn,xn,Jn)}catch(Xr){throw Da(),Xr}};ie.url=xe,ie.readyState=k,ie.withCredentials=Me,ie.headers=ze,ie._close=Da,hi()}te.prototype=Object.create(re.prototype),te.prototype.CONNECTING=k,te.prototype.OPEN=z,te.prototype.CLOSED=H,te.prototype.close=function(){this._close()},te.CONNECTING=k,te.OPEN=z,te.CLOSED=H,te.prototype.withCredentials=void 0;var me=f;o!=null&&(f==null||!("withCredentials"in f.prototype))&&(me=te),function(ie){{var xe=ie(t);xe!==void 0&&(e.exports=xe)}}(function(ie){ie.EventSourcePolyfill=te,ie.NativeEventSource=f,ie.EventSource=me})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:OQ:globalThis)}(dh,dh.exports)),dh.exports}var MQ=jQ();const uS=6048e5,PQ=864e5,nD=6e4,cS=36e5,ig=43200,DO=1440,kO=Symbol.for("constructDateFrom");function Tr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&kO in e?e[kO](t):e instanceof Date?new e.constructor(t):new Date(t)}function St(e,t){return Tr(t||e,e)}function fS(e,t,n){const r=St(e,n?.in);return isNaN(t)?Tr(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function LQ(e,t,n){const r=St(e,n?.in);if(isNaN(t))return Tr(e,NaN);if(!t)return r;const i=r.getDate(),o=Tr(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const l=o.getDate();return i>=l?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function NQ(e,t,n){const{years:r=0,months:i=0,weeks:o=0,days:l=0,hours:c=0,minutes:f=0,seconds:h=0}=t,m=St(e,n?.in),y=i||r?LQ(m,i+r*12):m,x=l||o?fS(y,l+o*7):y,b=f+c*60,w=(h+b*60)*1e3;return Tr(e,+x+w)}let RQ={};function im(){return RQ}function Uu(e,t){const n=im(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=St(e,t?.in),o=i.getDay(),l=(o<r?7:0)+o-r;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function Rh(e,t){return Uu(e,{...t,weekStartsOn:1})}function rD(e,t){const n=St(e,t?.in),r=n.getFullYear(),i=Tr(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=Rh(i),l=Tr(n,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const c=Rh(l);return n.getTime()>=o.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function ff(e){const t=St(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Zu(e,...t){const n=Tr.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function Bu(e,t){const n=St(e,t?.in);return n.setHours(0,0,0,0),n}function Ly(e,t,n){const[r,i]=Zu(n?.in,e,t),o=Bu(r),l=Bu(i),c=+o-ff(o),f=+l-ff(l);return Math.round((c-f)/PQ)}function DQ(e,t){const n=rD(e,t),r=Tr(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Rh(r)}function iD(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Tr.bind(null,i));const o=St(i,r);(!n||n<o||isNaN(+o))&&(n=o)}),Tr(r,n||NaN)}function kQ(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Tr.bind(null,i));const o=St(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),Tr(r,n||NaN)}function Dg(e,t){const n=+St(e)-+St(t);return n<0?-1:n>0?1:n}function IQ(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function zQ(e){return!(!IQ(e)&&typeof e!="number"||isNaN(+St(e)))}function cv(e,t,n){const[r,i]=Zu(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),l=r.getMonth()-i.getMonth();return o*12+l}function UQ(e,t,n){const[r,i]=Zu(n?.in,e,t),o=Uu(r,n),l=Uu(i,n),c=+o-ff(o),f=+l-ff(l);return Math.round((c-f)/uS)}function aD(e,t,n){const[r,i]=Zu(n?.in,e,t),o=IO(r,i),l=Math.abs(Ly(r,i));r.setDate(r.getDate()-o*l);const c=+(IO(r,i)===-o),f=o*(l-c);return f===0?0:f}function IO(e,t){const 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 oD(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function BQ(e,t,n){const[r,i]=Zu(n?.in,e,t),o=(+r-+i)/cS;return oD(n?.roundingMethod)(o)}function FQ(e,t){return+St(e)-+St(t)}function df(e,t){const n=St(e,t?.in);return n.setHours(23,59,59,999),n}function $Q(e,t){const n=St(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function VQ(e,t){const n=St(e,t?.in);return+df(n,t)==+$Q(n,t)}function HQ(e,t,n){const[r,i,o]=Zu(n?.in,e,e,t),l=Dg(i,o),c=Math.abs(cv(i,o));if(c<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-l*c);let f=Dg(i,o)===-l;VQ(r)&&c===1&&Dg(r,o)===1&&(f=!1);const h=l*(c-+f);return h===0?0:h}function qQ(e,t,n){const r=FQ(e,t)/1e3;return oD(n?.roundingMethod)(r)}function GQ(e,t){const n=St(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function YQ(e,t){const n=t?.weekStartsOn,r=St(e,t?.in),i=r.getDay(),o=(i<n?-7:0)+6-(i-n);return r.setDate(r.getDate()+o),r.setHours(23,59,59,999),r}function WQ(e,t){return YQ(e,{...t,weekStartsOn:1})}const KQ={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"}},ZQ=(e,t,n)=>{let r;const i=KQ[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Gb(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const XQ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},QQ={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},JQ={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},eJ={date:Gb({formats:XQ,defaultWidth:"full"}),time:Gb({formats:QQ,defaultWidth:"full"}),dateTime:Gb({formats:JQ,defaultWidth:"full"})},tJ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nJ=(e,t,n,r)=>tJ[e];function Zd(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):l;i=e.formattingValues[c]||e.formattingValues[l]}else{const l=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;i=e.values[c]||e.values[l]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const rJ={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},iJ={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},aJ={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"]},oJ={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"]},sJ={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"}},lJ={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"}},uJ=(e,t)=>{const 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"},cJ={ordinalNumber:uJ,era:Zd({values:rJ,defaultWidth:"wide"}),quarter:Zd({values:iJ,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Zd({values:aJ,defaultWidth:"wide"}),day:Zd({values:oJ,defaultWidth:"wide"}),dayPeriod:Zd({values:sJ,defaultWidth:"wide",formattingValues:lJ,defaultFormattingWidth:"wide"})};function Xd(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const l=o[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(c)?dJ(c,y=>y.test(l)):fJ(c,y=>y.test(l));let h;h=e.valueCallback?e.valueCallback(f):f,h=n.valueCallback?n.valueCallback(h):h;const m=t.slice(l.length);return{value:h,rest:m}}}function fJ(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function dJ(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function hJ(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(i.length);return{value:l,rest:c}}}const mJ=/^(\d+)(th|st|nd|rd)?/i,pJ=/\d+/i,gJ={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},vJ={any:[/^b/i,/^(a|c)/i]},yJ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bJ={any:[/1/i,/2/i,/3/i,/4/i]},xJ={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},_J={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]},wJ={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},SJ={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]},CJ={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},EJ={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}},AJ={ordinalNumber:hJ({matchPattern:mJ,parsePattern:pJ,valueCallback:e=>parseInt(e,10)}),era:Xd({matchPatterns:gJ,defaultMatchWidth:"wide",parsePatterns:vJ,defaultParseWidth:"any"}),quarter:Xd({matchPatterns:yJ,defaultMatchWidth:"wide",parsePatterns:bJ,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Xd({matchPatterns:xJ,defaultMatchWidth:"wide",parsePatterns:_J,defaultParseWidth:"any"}),day:Xd({matchPatterns:wJ,defaultMatchWidth:"wide",parsePatterns:SJ,defaultParseWidth:"any"}),dayPeriod:Xd({matchPatterns:CJ,defaultMatchWidth:"any",parsePatterns:EJ,defaultParseWidth:"any"})},sD={code:"en-US",formatDistance:ZQ,formatLong:eJ,formatRelative:nJ,localize:cJ,match:AJ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function TJ(e,t){const n=St(e,t?.in);return Ly(n,GQ(n))+1}function OJ(e,t){const n=St(e,t?.in),r=+Rh(n)-+DQ(n);return Math.round(r/uS)+1}function lD(e,t){const n=St(e,t?.in),r=n.getFullYear(),i=im(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=Tr(t?.in||e,0);l.setFullYear(r+1,0,o),l.setHours(0,0,0,0);const c=Uu(l,t),f=Tr(t?.in||e,0);f.setFullYear(r,0,o),f.setHours(0,0,0,0);const h=Uu(f,t);return+n>=+c?r+1:+n>=+h?r:r-1}function jJ(e,t){const n=im(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=lD(e,t),o=Tr(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Uu(o,t)}function MJ(e,t){const n=St(e,t?.in),r=+Uu(n,t)-+jJ(n,t);return Math.round(r/uS)+1}function wt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Qs={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return wt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):wt(n+1,2)},d(e,t){return wt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/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(e,t){return wt(e.getHours()%12||12,t.length)},H(e,t){return wt(e.getHours(),t.length)},m(e,t){return wt(e.getMinutes(),t.length)},s(e,t){return wt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return wt(i,t.length)}},qc={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zO={G:function(e,t,n){const r=e.getFullYear()>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"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Qs.y(e,t)},Y:function(e,t,n,r){const i=lD(e,r),o=i>0?i:1-i;if(t==="YY"){const l=o%100;return wt(l,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):wt(o,t.length)},R:function(e,t){const n=rD(e);return wt(n,t.length)},u:function(e,t){const n=e.getFullYear();return wt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return wt(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){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return wt(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){const r=e.getMonth();switch(t){case"M":case"MM":return Qs.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){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return wt(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){const i=MJ(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):wt(i,t.length)},I:function(e,t,n){const r=OJ(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):wt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Qs.d(e,t)},D:function(e,t,n){const r=TJ(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):wt(r,t.length)},E:function(e,t,n){const r=e.getDay();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){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return wt(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){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return wt(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){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return wt(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){const i=e.getHours()/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){const r=e.getHours();let i;switch(r===12?i=qc.noon:r===0?i=qc.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){const r=e.getHours();let i;switch(r>=17?i=qc.evening:r>=12?i=qc.afternoon:r>=4?i=qc.morning:i=qc.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"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Qs.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Qs.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):wt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):wt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Qs.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Qs.s(e,t)},S:function(e,t){return Qs.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return BO(r);case"XXXX":case"XX":return bu(r);case"XXXXX":case"XXX":default:return bu(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return BO(r);case"xxxx":case"xx":return bu(r);case"xxxxx":case"xxx":default:return bu(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+UO(r,":");case"OOOO":default:return"GMT"+bu(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+UO(r,":");case"zzzz":default:return"GMT"+bu(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return wt(r,t.length)},T:function(e,t,n){return wt(+e,t.length)}};function UO(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+wt(o,2)}function BO(e,t){return e%60===0?(e>0?"-":"+")+wt(Math.abs(e)/60,2):bu(e,t)}function bu(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=wt(Math.trunc(r/60),2),o=wt(r%60,2);return n+i+t+o}const FO=(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"})}},uD=(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"})}},PJ=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return FO(e,t);let 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}}",FO(r,t)).replace("{{time}}",uD(i,t))},LJ={p:uD,P:PJ},NJ=/^D+$/,RJ=/^Y+$/,DJ=["D","DD","YY","YYYY"];function kJ(e){return NJ.test(e)}function IJ(e){return RJ.test(e)}function zJ(e,t,n){const r=UJ(e,t,n);if(console.warn(r),DJ.includes(e))throw new RangeError(r)}function UJ(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const BJ=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,FJ=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$J=/^'([^]*?)'?$/,VJ=/''/g,HJ=/[a-zA-Z]/;function fv(e,t,n){const r=im(),i=r.locale??sD,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,l=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,c=St(e,n?.in);if(!zQ(c))throw new RangeError("Invalid time value");let f=t.match(FJ).map(m=>{const y=m[0];if(y==="p"||y==="P"){const x=LJ[y];return x(m,i.formatLong)}return m}).join("").match(BJ).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const y=m[0];if(y==="'")return{isToken:!1,value:qJ(m)};if(zO[y])return{isToken:!0,value:m};if(y.match(HJ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:m}});i.localize.preprocessor&&(f=i.localize.preprocessor(c,f));const h={firstWeekContainsDate:o,weekStartsOn:l,locale:i};return f.map(m=>{if(!m.isToken)return m.value;const y=m.value;(IJ(y)||kJ(y))&&zJ(y,t,String(e));const x=zO[y[0]];return x(c,y,i.localize,h)}).join("")}function qJ(e){const t=e.match($J);return t?t[1].replace(VJ,"'"):e}function GJ(e,t,n){const r=im(),i=n?.locale??r.locale??sD,o=2520,l=Dg(e,t);if(isNaN(l))throw new RangeError("Invalid time value");const c=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:l}),[f,h]=Zu(n?.in,...l>0?[t,e]:[e,t]),m=qQ(h,f),y=(ff(h)-ff(f))/1e3,x=Math.round((m-y)/60);let b;if(x<2)return x===0?i.formatDistance("lessThanXMinutes",1,c):i.formatDistance("xMinutes",x,c);if(x<45)return i.formatDistance("xMinutes",x,c);if(x<90)return i.formatDistance("aboutXHours",1,c);if(x<DO){const C=Math.round(x/60);return i.formatDistance("aboutXHours",C,c)}else{if(x<o)return i.formatDistance("xDays",1,c);if(x<ig){const C=Math.round(x/DO);return i.formatDistance("xDays",C,c)}else if(x<ig*2)return b=Math.round(x/ig),i.formatDistance("aboutXMonths",b,c)}if(b=HQ(h,f),b<12){const C=Math.round(x/ig);return i.formatDistance("xMonths",C,c)}else{const C=b%12,w=Math.trunc(b/12);return C<3?i.formatDistance("aboutXYears",w,c):C<9?i.formatDistance("overXYears",w,c):i.formatDistance("almostXYears",w+1,c)}}function YJ(e,t){const n=St(e,t?.in);if(isNaN(+n))throw new RangeError("Invalid time value");let r="",i="";const o="-",l=":";{const c=wt(n.getDate(),2),f=wt(n.getMonth()+1,2);r=`${wt(n.getFullYear(),4)}${o}${f}${o}${c}`}{const c=n.getTimezoneOffset();if(c!==0){const b=Math.abs(c),C=wt(Math.trunc(b/60),2),w=wt(b%60,2);i=`${c<0?"+":"-"}${C}:${w}`}else i="Z";const f=wt(n.getHours(),2),h=wt(n.getMinutes(),2),m=wt(n.getSeconds(),2),y=r===""?"":"T",x=[f,h,m].join(l);r=`${r}${y}${x}${i}`}return r}function WJ(e){return Math.trunc(+St(e)/1e3)}function KJ(e,t){return+St(e)>+St(t)}function dv(e,t){return+St(e)<+St(t)}function h_(e,t){return+St(e)==+St(t)}function ZJ(e,t,n){const r=+St(e,n?.in),[i,o]=[+St(t.start,n?.in),+St(t.end,n?.in)].sort((l,c)=>l-c);return r>=i&&r<=o}function hv(e,t,n){return fS(e,-t,n)}function bl(e,t){const n=()=>Tr(t?.in,NaN),i=eee(e);let o;if(i.date){const h=tee(i.date,2);o=nee(h.restDateString,h.year)}if(!o||isNaN(+o))return n();const l=+o;let c=0,f;if(i.time&&(c=ree(i.time),isNaN(c)))return n();if(i.timezone){if(f=iee(i.timezone),isNaN(f))return n()}else{const h=new Date(l+c),m=St(0,t?.in);return m.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),m.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),m}return St(l+c+f,t?.in)}const ag={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},XJ=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,QJ=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,JJ=/^([+-])(\d{2})(?::?(\d{2}))?$/;function eee(e){const t={},n=e.split(ag.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],ag.timeZoneDelimiter.test(t.date)&&(t.date=e.split(ag.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=ag.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function tee(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const 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 nee(e,t){if(t===null)return new Date(NaN);const n=e.match(XJ);if(!n)return new Date(NaN);const r=!!n[4],i=Qd(n[1]),o=Qd(n[2])-1,l=Qd(n[3]),c=Qd(n[4]),f=Qd(n[5])-1;if(r)return uee(t,c,f)?aee(t,c,f):new Date(NaN);{const h=new Date(0);return!see(t,o,l)||!lee(t,i)?new Date(NaN):(h.setUTCFullYear(t,o,Math.max(i,l)),h)}}function Qd(e){return e?parseInt(e):1}function ree(e){const t=e.match(QJ);if(!t)return NaN;const n=Yb(t[1]),r=Yb(t[2]),i=Yb(t[3]);return cee(n,r,i)?n*cS+r*nD+i*1e3:NaN}function Yb(e){return e&&parseFloat(e.replace(",","."))||0}function iee(e){if(e==="Z")return 0;const t=e.match(JJ);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return fee(r,i)?n*(r*cS+i*nD):NaN}function aee(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}const oee=[31,null,31,30,31,30,31,31,30,31,30,31];function cD(e){return e%400===0||e%4===0&&e%100!==0}function see(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(oee[t]||(cD(e)?29:28))}function lee(e,t){return t>=1&&t<=(cD(e)?366:365)}function uee(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function cee(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function fee(e,t){return t>=0&&t<=59}var kg={exports:{}},dee=kg.exports,$O;function hee(){return $O||($O=1,function(e,t){(function(n,r){e.exports=r()})(dee,()=>(()=>{var n={873:(l,c)=>{var f,h,m=function(){var y=function(se,ue){var Y=se,k=O[ue],z=null,H=0,I=null,j=[],q={},ee=function(V,Z){z=function(ne){for(var me=new Array(ne),ie=0;ie<ne;ie+=1){me[ie]=new Array(ne);for(var xe=0;xe<ne;xe+=1)me[ie][xe]=null}return me}(H=4*Y+17),le(0,0),le(H-7,0),le(0,H-7),he(),pe(),D(V,Z),Y>=7&&ve(V),I==null&&(I=G(Y,k,j)),R(I,Z)},le=function(V,Z){for(var ne=-1;ne<=7;ne+=1)if(!(V+ne<=-1||H<=V+ne))for(var me=-1;me<=7;me+=1)Z+me<=-1||H<=Z+me||(z[V+ne][Z+me]=0<=ne&&ne<=6&&(me==0||me==6)||0<=me&&me<=6&&(ne==0||ne==6)||2<=ne&&ne<=4&&2<=me&&me<=4)},pe=function(){for(var V=8;V<H-8;V+=1)z[V][6]==null&&(z[V][6]=V%2==0);for(var Z=8;Z<H-8;Z+=1)z[6][Z]==null&&(z[6][Z]=Z%2==0)},he=function(){for(var V=P.getPatternPosition(Y),Z=0;Z<V.length;Z+=1)for(var ne=0;ne<V.length;ne+=1){var me=V[Z],ie=V[ne];if(z[me][ie]==null)for(var xe=-2;xe<=2;xe+=1)for(var Ee=-2;Ee<=2;Ee+=1)z[me+xe][ie+Ee]=xe==-2||xe==2||Ee==-2||Ee==2||xe==0&&Ee==0}},ve=function(V){for(var Z=P.getBCHTypeNumber(Y),ne=0;ne<18;ne+=1){var me=!V&&(Z>>ne&1)==1;z[Math.floor(ne/3)][ne%3+H-8-3]=me}for(ne=0;ne<18;ne+=1)me=!V&&(Z>>ne&1)==1,z[ne%3+H-8-3][Math.floor(ne/3)]=me},D=function(V,Z){for(var ne=k<<3|Z,me=P.getBCHTypeInfo(ne),ie=0;ie<15;ie+=1){var xe=!V&&(me>>ie&1)==1;ie<6?z[ie][8]=xe:ie<8?z[ie+1][8]=xe:z[H-15+ie][8]=xe}for(ie=0;ie<15;ie+=1)xe=!V&&(me>>ie&1)==1,ie<8?z[8][H-ie-1]=xe:ie<9?z[8][15-ie-1+1]=xe:z[8][15-ie-1]=xe;z[H-8][8]=!V},R=function(V,Z){for(var ne=-1,me=H-1,ie=7,xe=0,Ee=P.getMaskFunction(Z),Me=H-1;Me>0;Me-=2)for(Me==6&&(Me-=1);;){for(var Ue=0;Ue<2;Ue+=1)if(z[me][Me-Ue]==null){var ke=!1;xe<V.length&&(ke=(V[xe]>>>ie&1)==1),Ee(me,Me-Ue)&&(ke=!ke),z[me][Me-Ue]=ke,(ie-=1)==-1&&(xe+=1,ie=7)}if((me+=ne)<0||H<=me){me-=ne,ne=-ne;break}}},G=function(V,Z,ne){for(var me=U.getRSBlocks(V,Z),ie=W(),xe=0;xe<ne.length;xe+=1){var Ee=ne[xe];ie.put(Ee.getMode(),4),ie.put(Ee.getLength(),P.getLengthInBits(Ee.getMode(),V)),Ee.write(ie)}var Me=0;for(xe=0;xe<me.length;xe+=1)Me+=me[xe].dataCount;if(ie.getLengthInBits()>8*Me)throw"code length overflow. ("+ie.getLengthInBits()+">"+8*Me+")";for(ie.getLengthInBits()+4<=8*Me&&ie.put(0,4);ie.getLengthInBits()%8!=0;)ie.putBit(!1);for(;!(ie.getLengthInBits()>=8*Me||(ie.put(236,8),ie.getLengthInBits()>=8*Me));)ie.put(17,8);return function(Ue,ke){for(var Ve=0,ot=0,Ge=0,Qe=new Array(ke.length),We=new Array(ke.length),ze=0;ze<ke.length;ze+=1){var nt=ke[ze].dataCount,Pt=ke[ze].totalCount-nt;ot=Math.max(ot,nt),Ge=Math.max(Ge,Pt),Qe[ze]=new Array(nt);for(var at=0;at<Qe[ze].length;at+=1)Qe[ze][at]=255&Ue.getBuffer()[at+Ve];Ve+=nt;var Lt=P.getErrorCorrectPolynomial(Pt),Ot=F(Qe[ze],Lt.getLength()-1).mod(Lt);for(We[ze]=new Array(Lt.getLength()-1),at=0;at<We[ze].length;at+=1){var gt=at+Ot.getLength()-We[ze].length;We[ze][at]=gt>=0?Ot.getAt(gt):0}}var $t=0;for(at=0;at<ke.length;at+=1)$t+=ke[at].totalCount;var On=new Array($t),vt=0;for(at=0;at<ot;at+=1)for(ze=0;ze<ke.length;ze+=1)at<Qe[ze].length&&(On[vt]=Qe[ze][at],vt+=1);for(at=0;at<Ge;at+=1)for(ze=0;ze<ke.length;ze+=1)at<We[ze].length&&(On[vt]=We[ze][at],vt+=1);return On}(ie,me)};q.addData=function(V,Z){var ne=null;switch(Z=Z||"Byte"){case"Numeric":ne=X(V);break;case"Alphanumeric":ne=ae(V);break;case"Byte":ne=ce(V);break;case"Kanji":ne=re(V);break;default:throw"mode:"+Z}j.push(ne),I=null},q.isDark=function(V,Z){if(V<0||H<=V||Z<0||H<=Z)throw V+","+Z;return z[V][Z]},q.getModuleCount=function(){return H},q.make=function(){if(Y<1){for(var V=1;V<40;V++){for(var Z=U.getRSBlocks(V,k),ne=W(),me=0;me<j.length;me++){var ie=j[me];ne.put(ie.getMode(),4),ne.put(ie.getLength(),P.getLengthInBits(ie.getMode(),V)),ie.write(ne)}var xe=0;for(me=0;me<Z.length;me++)xe+=Z[me].dataCount;if(ne.getLengthInBits()<=8*xe)break}Y=V}ee(!1,function(){for(var Ee=0,Me=0,Ue=0;Ue<8;Ue+=1){ee(!0,Ue);var ke=P.getLostPoint(q);(Ue==0||Ee>ke)&&(Ee=ke,Me=Ue)}return Me}())},q.createTableTag=function(V,Z){V=V||2;var ne="";ne+='<table style="',ne+=" border-width: 0px; border-style: none;",ne+=" border-collapse: collapse;",ne+=" padding: 0px; margin: "+(Z=Z===void 0?4*V:Z)+"px;",ne+='">',ne+="<tbody>";for(var me=0;me<q.getModuleCount();me+=1){ne+="<tr>";for(var ie=0;ie<q.getModuleCount();ie+=1)ne+='<td style="',ne+=" border-width: 0px; border-style: none;",ne+=" border-collapse: collapse;",ne+=" padding: 0px; margin: 0px;",ne+=" width: "+V+"px;",ne+=" height: "+V+"px;",ne+=" background-color: ",ne+=q.isDark(me,ie)?"#000000":"#ffffff",ne+=";",ne+='"/>';ne+="</tr>"}return(ne+="</tbody>")+"</table>"},q.createSvgTag=function(V,Z,ne,me){var ie={};typeof arguments[0]=="object"&&(V=(ie=arguments[0]).cellSize,Z=ie.margin,ne=ie.alt,me=ie.title),V=V||2,Z=Z===void 0?4*V:Z,(ne=typeof ne=="string"?{text:ne}:ne||{}).text=ne.text||null,ne.id=ne.text?ne.id||"qrcode-description":null,(me=typeof me=="string"?{text:me}:me||{}).text=me.text||null,me.id=me.text?me.id||"qrcode-title":null;var xe,Ee,Me,Ue,ke=q.getModuleCount()*V+2*Z,Ve="";for(Ue="l"+V+",0 0,"+V+" -"+V+",0 0,-"+V+"z ",Ve+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',Ve+=ie.scalable?"":' width="'+ke+'px" height="'+ke+'px"',Ve+=' viewBox="0 0 '+ke+" "+ke+'" ',Ve+=' preserveAspectRatio="xMinYMin meet"',Ve+=me.text||ne.text?' role="img" aria-labelledby="'+te([me.id,ne.id].join(" ").trim())+'"':"",Ve+=">",Ve+=me.text?'<title id="'+te(me.id)+'">'+te(me.text)+"</title>":"",Ve+=ne.text?'<description id="'+te(ne.id)+'">'+te(ne.text)+"</description>":"",Ve+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',Ve+='<path d="',Ee=0;Ee<q.getModuleCount();Ee+=1)for(Me=Ee*V+Z,xe=0;xe<q.getModuleCount();xe+=1)q.isDark(Ee,xe)&&(Ve+="M"+(xe*V+Z)+","+Me+Ue);return(Ve+='" stroke="transparent" fill="black"/>')+"</svg>"},q.createDataURL=function(V,Z){V=V||2,Z=Z===void 0?4*V:Z;var ne=q.getModuleCount()*V+2*Z,me=Z,ie=ne-Z;return _e(ne,ne,function(xe,Ee){if(me<=xe&&xe<ie&&me<=Ee&&Ee<ie){var Me=Math.floor((xe-me)/V),Ue=Math.floor((Ee-me)/V);return q.isDark(Ue,Me)?0:1}return 1})},q.createImgTag=function(V,Z,ne){V=V||2,Z=Z===void 0?4*V:Z;var me=q.getModuleCount()*V+2*Z,ie="";return ie+="<img",ie+=' src="',ie+=q.createDataURL(V,Z),ie+='"',ie+=' width="',ie+=me,ie+='"',ie+=' height="',ie+=me,ie+='"',ne&&(ie+=' alt="',ie+=te(ne),ie+='"'),ie+"/>"};var te=function(V){for(var Z="",ne=0;ne<V.length;ne+=1){var me=V.charAt(ne);switch(me){case"<":Z+="&lt;";break;case">":Z+="&gt;";break;case"&":Z+="&amp;";break;case'"':Z+="&quot;";break;default:Z+=me}}return Z};return q.createASCII=function(V,Z){if((V=V||1)<2)return function(Qe){Qe=Qe===void 0?2:Qe;var We,ze,nt,Pt,at,Lt=1*q.getModuleCount()+2*Qe,Ot=Qe,gt=Lt-Qe,$t={"██":"█","█ ":"▀"," █":"▄"," ":" "},On={"██":"▀","█ ":"▀"," █":" "," ":" "},vt="";for(We=0;We<Lt;We+=2){for(nt=Math.floor((We-Ot)/1),Pt=Math.floor((We+1-Ot)/1),ze=0;ze<Lt;ze+=1)at="█",Ot<=ze&&ze<gt&&Ot<=We&&We<gt&&q.isDark(nt,Math.floor((ze-Ot)/1))&&(at=" "),Ot<=ze&&ze<gt&&Ot<=We+1&&We+1<gt&&q.isDark(Pt,Math.floor((ze-Ot)/1))?at+=" ":at+="█",vt+=Qe<1&&We+1>=gt?On[at]:$t[at];vt+=`
`}return Lt%2&&Qe>0?vt.substring(0,vt.length-Lt-1)+Array(Lt+1).join("▀"):vt.substring(0,vt.length-1)}(Z);V-=1,Z=Z===void 0?2*V:Z;var ne,me,ie,xe,Ee=q.getModuleCount()*V+2*Z,Me=Z,Ue=Ee-Z,ke=Array(V+1).join("██"),Ve=Array(V+1).join(" "),ot="",Ge="";for(ne=0;ne<Ee;ne+=1){for(ie=Math.floor((ne-Me)/V),Ge="",me=0;me<Ee;me+=1)xe=1,Me<=me&&me<Ue&&Me<=ne&&ne<Ue&&q.isDark(ie,Math.floor((me-Me)/V))&&(xe=0),Ge+=xe?ke:Ve;for(ie=0;ie<V;ie+=1)ot+=Ge+`
`}return ot.substring(0,ot.length-1)},q.renderTo2dContext=function(V,Z){Z=Z||2;for(var ne=q.getModuleCount(),me=0;me<ne;me++)for(var ie=0;ie<ne;ie++)V.fillStyle=q.isDark(me,ie)?"black":"white",V.fillRect(me*Z,ie*Z,Z,Z)},q};y.stringToBytes=(y.stringToBytesFuncs={default:function(se){for(var ue=[],Y=0;Y<se.length;Y+=1){var k=se.charCodeAt(Y);ue.push(255&k)}return ue}}).default,y.createStringToBytes=function(se,ue){var Y=function(){for(var z=oe(se),H=function(){var pe=z.read();if(pe==-1)throw"eof";return pe},I=0,j={};;){var q=z.read();if(q==-1)break;var ee=H(),le=H()<<8|H();j[String.fromCharCode(q<<8|ee)]=le,I+=1}if(I!=ue)throw I+" != "+ue;return j}(),k=63;return function(z){for(var H=[],I=0;I<z.length;I+=1){var j=z.charCodeAt(I);if(j<128)H.push(j);else{var q=Y[z.charAt(I)];typeof q=="number"?(255&q)==q?H.push(q):(H.push(q>>>8),H.push(255&q)):H.push(k)}}return H}};var x,b,C,w,A,O={L:1,M:0,Q:3,H:2},P=(x=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],b=1335,C=7973,A=function(se){for(var ue=0;se!=0;)ue+=1,se>>>=1;return ue},(w={}).getBCHTypeInfo=function(se){for(var ue=se<<10;A(ue)-A(b)>=0;)ue^=b<<A(ue)-A(b);return 21522^(se<<10|ue)},w.getBCHTypeNumber=function(se){for(var ue=se<<12;A(ue)-A(C)>=0;)ue^=C<<A(ue)-A(C);return se<<12|ue},w.getPatternPosition=function(se){return x[se-1]},w.getMaskFunction=function(se){switch(se){case 0:return function(ue,Y){return(ue+Y)%2==0};case 1:return function(ue,Y){return ue%2==0};case 2:return function(ue,Y){return Y%3==0};case 3:return function(ue,Y){return(ue+Y)%3==0};case 4:return function(ue,Y){return(Math.floor(ue/2)+Math.floor(Y/3))%2==0};case 5:return function(ue,Y){return ue*Y%2+ue*Y%3==0};case 6:return function(ue,Y){return(ue*Y%2+ue*Y%3)%2==0};case 7:return function(ue,Y){return(ue*Y%3+(ue+Y)%2)%2==0};default:throw"bad maskPattern:"+se}},w.getErrorCorrectPolynomial=function(se){for(var ue=F([1],0),Y=0;Y<se;Y+=1)ue=ue.multiply(F([1,N.gexp(Y)],0));return ue},w.getLengthInBits=function(se,ue){if(1<=ue&&ue<10)switch(se){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+se}else if(ue<27)switch(se){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+se}else{if(!(ue<41))throw"type:"+ue;switch(se){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+se}}},w.getLostPoint=function(se){for(var ue=se.getModuleCount(),Y=0,k=0;k<ue;k+=1)for(var z=0;z<ue;z+=1){for(var H=0,I=se.isDark(k,z),j=-1;j<=1;j+=1)if(!(k+j<0||ue<=k+j))for(var q=-1;q<=1;q+=1)z+q<0||ue<=z+q||j==0&&q==0||I==se.isDark(k+j,z+q)&&(H+=1);H>5&&(Y+=3+H-5)}for(k=0;k<ue-1;k+=1)for(z=0;z<ue-1;z+=1){var ee=0;se.isDark(k,z)&&(ee+=1),se.isDark(k+1,z)&&(ee+=1),se.isDark(k,z+1)&&(ee+=1),se.isDark(k+1,z+1)&&(ee+=1),ee!=0&&ee!=4||(Y+=3)}for(k=0;k<ue;k+=1)for(z=0;z<ue-6;z+=1)se.isDark(k,z)&&!se.isDark(k,z+1)&&se.isDark(k,z+2)&&se.isDark(k,z+3)&&se.isDark(k,z+4)&&!se.isDark(k,z+5)&&se.isDark(k,z+6)&&(Y+=40);for(z=0;z<ue;z+=1)for(k=0;k<ue-6;k+=1)se.isDark(k,z)&&!se.isDark(k+1,z)&&se.isDark(k+2,z)&&se.isDark(k+3,z)&&se.isDark(k+4,z)&&!se.isDark(k+5,z)&&se.isDark(k+6,z)&&(Y+=40);var le=0;for(z=0;z<ue;z+=1)for(k=0;k<ue;k+=1)se.isDark(k,z)&&(le+=1);return Y+Math.abs(100*le/ue/ue-50)/5*10},w),N=function(){for(var se=new Array(256),ue=new Array(256),Y=0;Y<8;Y+=1)se[Y]=1<<Y;for(Y=8;Y<256;Y+=1)se[Y]=se[Y-4]^se[Y-5]^se[Y-6]^se[Y-8];for(Y=0;Y<255;Y+=1)ue[se[Y]]=Y;return{glog:function(k){if(k<1)throw"glog("+k+")";return ue[k]},gexp:function(k){for(;k<0;)k+=255;for(;k>=256;)k-=255;return se[k]}}}();function F(se,ue){if(se.length===void 0)throw se.length+"/"+ue;var Y=function(){for(var z=0;z<se.length&&se[z]==0;)z+=1;for(var H=new Array(se.length-z+ue),I=0;I<se.length-z;I+=1)H[I]=se[I+z];return H}(),k={getAt:function(z){return Y[z]},getLength:function(){return Y.length},multiply:function(z){for(var H=new Array(k.getLength()+z.getLength()-1),I=0;I<k.getLength();I+=1)for(var j=0;j<z.getLength();j+=1)H[I+j]^=N.gexp(N.glog(k.getAt(I))+N.glog(z.getAt(j)));return F(H,0)},mod:function(z){if(k.getLength()-z.getLength()<0)return k;for(var H=N.glog(k.getAt(0))-N.glog(z.getAt(0)),I=new Array(k.getLength()),j=0;j<k.getLength();j+=1)I[j]=k.getAt(j);for(j=0;j<z.getLength();j+=1)I[j]^=N.gexp(N.glog(z.getAt(j))+H);return F(I,0).mod(z)}};return k}var U=function(){var se=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],ue=function(k,z){var H={};return H.totalCount=k,H.dataCount=z,H},Y={getRSBlocks:function(k,z){var H=function(ve,D){switch(D){case O.L:return se[4*(ve-1)+0];case O.M:return se[4*(ve-1)+1];case O.Q:return se[4*(ve-1)+2];case O.H:return se[4*(ve-1)+3];default:return}}(k,z);if(H===void 0)throw"bad rs block @ typeNumber:"+k+"/errorCorrectionLevel:"+z;for(var I=H.length/3,j=[],q=0;q<I;q+=1)for(var ee=H[3*q+0],le=H[3*q+1],pe=H[3*q+2],he=0;he<ee;he+=1)j.push(ue(le,pe));return j}};return Y}(),W=function(){var se=[],ue=0,Y={getBuffer:function(){return se},getAt:function(k){var z=Math.floor(k/8);return(se[z]>>>7-k%8&1)==1},put:function(k,z){for(var H=0;H<z;H+=1)Y.putBit((k>>>z-H-1&1)==1)},getLengthInBits:function(){return ue},putBit:function(k){var z=Math.floor(ue/8);se.length<=z&&se.push(0),k&&(se[z]|=128>>>ue%8),ue+=1}};return Y},X=function(se){var ue=se,Y={getMode:function(){return 1},getLength:function(H){return ue.length},write:function(H){for(var I=ue,j=0;j+2<I.length;)H.put(k(I.substring(j,j+3)),10),j+=3;j<I.length&&(I.length-j==1?H.put(k(I.substring(j,j+1)),4):I.length-j==2&&H.put(k(I.substring(j,j+2)),7))}},k=function(H){for(var I=0,j=0;j<H.length;j+=1)I=10*I+z(H.charAt(j));return I},z=function(H){if("0"<=H&&H<="9")return H.charCodeAt(0)-48;throw"illegal char :"+H};return Y},ae=function(se){var ue=se,Y={getMode:function(){return 2},getLength:function(z){return ue.length},write:function(z){for(var H=ue,I=0;I+1<H.length;)z.put(45*k(H.charAt(I))+k(H.charAt(I+1)),11),I+=2;I<H.length&&z.put(k(H.charAt(I)),6)}},k=function(z){if("0"<=z&&z<="9")return z.charCodeAt(0)-48;if("A"<=z&&z<="Z")return z.charCodeAt(0)-65+10;switch(z){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+z}};return Y},ce=function(se){var ue=y.stringToBytes(se);return{getMode:function(){return 4},getLength:function(Y){return ue.length},write:function(Y){for(var k=0;k<ue.length;k+=1)Y.put(ue[k],8)}}},re=function(se){var ue=y.stringToBytesFuncs.SJIS;if(!ue)throw"sjis not supported.";(function(){var z=ue("友");if(z.length!=2||(z[0]<<8|z[1])!=38726)throw"sjis not supported."})();var Y=ue(se),k={getMode:function(){return 8},getLength:function(z){return~~(Y.length/2)},write:function(z){for(var H=Y,I=0;I+1<H.length;){var j=(255&H[I])<<8|255&H[I+1];if(33088<=j&&j<=40956)j-=33088;else{if(!(57408<=j&&j<=60351))throw"illegal char at "+(I+1)+"/"+j;j-=49472}j=192*(j>>>8&255)+(255&j),z.put(j,13),I+=2}if(I<H.length)throw"illegal char at "+(I+1)}};return k},J=function(){var se=[],ue={writeByte:function(Y){se.push(255&Y)},writeShort:function(Y){ue.writeByte(Y),ue.writeByte(Y>>>8)},writeBytes:function(Y,k,z){k=k||0,z=z||Y.length;for(var H=0;H<z;H+=1)ue.writeByte(Y[H+k])},writeString:function(Y){for(var k=0;k<Y.length;k+=1)ue.writeByte(Y.charCodeAt(k))},toByteArray:function(){return se},toString:function(){var Y="";Y+="[";for(var k=0;k<se.length;k+=1)k>0&&(Y+=","),Y+=se[k];return Y+"]"}};return ue},oe=function(se){var ue=se,Y=0,k=0,z=0,H={read:function(){for(;z<8;){if(Y>=ue.length){if(z==0)return-1;throw"unexpected end of file./"+z}var j=ue.charAt(Y);if(Y+=1,j=="=")return z=0,-1;j.match(/^\s$/)||(k=k<<6|I(j.charCodeAt(0)),z+=6)}var q=k>>>z-8&255;return z-=8,q}},I=function(j){if(65<=j&&j<=90)return j-65;if(97<=j&&j<=122)return j-97+26;if(48<=j&&j<=57)return j-48+52;if(j==43)return 62;if(j==47)return 63;throw"c:"+j};return H},_e=function(se,ue,Y){for(var k=function(le,pe){var he=le,ve=pe,D=new Array(le*pe),R={setPixel:function(V,Z,ne){D[Z*he+V]=ne},write:function(V){V.writeString("GIF87a"),V.writeShort(he),V.writeShort(ve),V.writeByte(128),V.writeByte(0),V.writeByte(0),V.writeByte(0),V.writeByte(0),V.writeByte(0),V.writeByte(255),V.writeByte(255),V.writeByte(255),V.writeString(","),V.writeShort(0),V.writeShort(0),V.writeShort(he),V.writeShort(ve),V.writeByte(0);var Z=G(2);V.writeByte(2);for(var ne=0;Z.length-ne>255;)V.writeByte(255),V.writeBytes(Z,ne,255),ne+=255;V.writeByte(Z.length-ne),V.writeBytes(Z,ne,Z.length-ne),V.writeByte(0),V.writeString(";")}},G=function(V){for(var Z=1<<V,ne=1+(1<<V),me=V+1,ie=te(),xe=0;xe<Z;xe+=1)ie.add(String.fromCharCode(xe));ie.add(String.fromCharCode(Z)),ie.add(String.fromCharCode(ne));var Ee,Me,Ue,ke=J(),Ve=(Ee=ke,Me=0,Ue=0,{write:function(We,ze){if(We>>>ze)throw"length over";for(;Me+ze>=8;)Ee.writeByte(255&(We<<Me|Ue)),ze-=8-Me,We>>>=8-Me,Ue=0,Me=0;Ue|=We<<Me,Me+=ze},flush:function(){Me>0&&Ee.writeByte(Ue)}});Ve.write(Z,me);var ot=0,Ge=String.fromCharCode(D[ot]);for(ot+=1;ot<D.length;){var Qe=String.fromCharCode(D[ot]);ot+=1,ie.contains(Ge+Qe)?Ge+=Qe:(Ve.write(ie.indexOf(Ge),me),ie.size()<4095&&(ie.size()==1<<me&&(me+=1),ie.add(Ge+Qe)),Ge=Qe)}return Ve.write(ie.indexOf(Ge),me),Ve.write(ne,me),Ve.flush(),ke.toByteArray()},te=function(){var V={},Z=0,ne={add:function(me){if(ne.contains(me))throw"dup key:"+me;V[me]=Z,Z+=1},size:function(){return Z},indexOf:function(me){return V[me]},contains:function(me){return V[me]!==void 0}};return ne};return R}(se,ue),z=0;z<ue;z+=1)for(var H=0;H<se;H+=1)k.setPixel(H,z,Y(H,z));var I=J();k.write(I);for(var j=function(){var le=0,pe=0,he=0,ve="",D={},R=function(te){ve+=String.fromCharCode(G(63&te))},G=function(te){if(!(te<0)){if(te<26)return 65+te;if(te<52)return te-26+97;if(te<62)return te-52+48;if(te==62)return 43;if(te==63)return 47}throw"n:"+te};return D.writeByte=function(te){for(le=le<<8|255&te,pe+=8,he+=1;pe>=6;)R(le>>>pe-6),pe-=6},D.flush=function(){if(pe>0&&(R(le<<6-pe),le=0,pe=0),he%3!=0)for(var te=3-he%3,V=0;V<te;V+=1)ve+="="},D.toString=function(){return ve},D}(),q=I.toByteArray(),ee=0;ee<q.length;ee+=1)j.writeByte(q[ee]);return j.flush(),"data:image/gif;base64,"+j};return y}();m.stringToBytesFuncs["UTF-8"]=function(y){return function(x){for(var b=[],C=0;C<x.length;C++){var w=x.charCodeAt(C);w<128?b.push(w):w<2048?b.push(192|w>>6,128|63&w):w<55296||w>=57344?b.push(224|w>>12,128|w>>6&63,128|63&w):(C++,w=65536+((1023&w)<<10|1023&x.charCodeAt(C)),b.push(240|w>>18,128|w>>12&63,128|w>>6&63,128|63&w))}return b}(y)},(h=typeof(f=function(){return m})=="function"?f.apply(c,[]):f)===void 0||(l.exports=h)}},r={};function i(l){var c=r[l];if(c!==void 0)return c.exports;var f=r[l]={exports:{}};return n[l](f,f.exports,i),f.exports}i.n=l=>{var c=l&&l.__esModule?()=>l.default:()=>l;return i.d(c,{a:c}),c},i.d=(l,c)=>{for(var f in c)i.o(c,f)&&!i.o(l,f)&&Object.defineProperty(l,f,{enumerable:!0,get:c[f]})},i.o=(l,c)=>Object.prototype.hasOwnProperty.call(l,c);var o={};return(()=>{i.d(o,{default:()=>ue});const l=Y=>!!Y&&typeof Y=="object"&&!Array.isArray(Y);function c(Y,...k){if(!k.length)return Y;const z=k.shift();return z!==void 0&&l(Y)&&l(z)?(Y=Object.assign({},Y),Object.keys(z).forEach(H=>{const I=Y[H],j=z[H];Array.isArray(I)&&Array.isArray(j)?Y[H]=j:l(I)&&l(j)?Y[H]=c(Object.assign({},I),j):Y[H]=j}),c(Y,...k)):Y}function f(Y,k){const z=document.createElement("a");z.download=k,z.href=Y,document.body.appendChild(z),z.click(),document.body.removeChild(z)}const h={L:.07,M:.15,Q:.25,H:.3};class m{constructor({svg:k,type:z,window:H}){this._svg=k,this._type=z,this._window=H}draw(k,z,H,I){let j;switch(this._type){case"dots":j=this._drawDot;break;case"classy":j=this._drawClassy;break;case"classy-rounded":j=this._drawClassyRounded;break;case"rounded":j=this._drawRounded;break;case"extra-rounded":j=this._drawExtraRounded;break;default:j=this._drawSquare}j.call(this,{x:k,y:z,size:H,getNeighbor:I})}_rotateFigure({x:k,y:z,size:H,rotation:I=0,draw:j}){var q;const ee=k+H/2,le=z+H/2;j(),(q=this._element)===null||q===void 0||q.setAttribute("transform",`rotate(${180*I/Math.PI},${ee},${le})`)}_basicDot(k){const{size:z,x:H,y:I}=k;this._rotateFigure(Object.assign(Object.assign({},k),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(H+z/2)),this._element.setAttribute("cy",String(I+z/2)),this._element.setAttribute("r",String(z/2))}}))}_basicSquare(k){const{size:z,x:H,y:I}=k;this._rotateFigure(Object.assign(Object.assign({},k),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(H)),this._element.setAttribute("y",String(I)),this._element.setAttribute("width",String(z)),this._element.setAttribute("height",String(z))}}))}_basicSideRounded(k){const{size:z,x:H,y:I}=k;this._rotateFigure(Object.assign(Object.assign({},k),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${H} ${I}v ${z}h `+z/2+`a ${z/2} ${z/2}, 0, 0, 0, 0 ${-z}`)}}))}_basicCornerRounded(k){const{size:z,x:H,y:I}=k;this._rotateFigure(Object.assign(Object.assign({},k),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${H} ${I}v ${z}h ${z}v `+-z/2+`a ${z/2} ${z/2}, 0, 0, 0, ${-z/2} ${-z/2}`)}}))}_basicCornerExtraRounded(k){const{size:z,x:H,y:I}=k;this._rotateFigure(Object.assign(Object.assign({},k),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${H} ${I}v ${z}h ${z}a ${z} ${z}, 0, 0, 0, ${-z} ${-z}`)}}))}_basicCornersRounded(k){const{size:z,x:H,y:I}=k;this._rotateFigure(Object.assign(Object.assign({},k),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${H} ${I}v `+z/2+`a ${z/2} ${z/2}, 0, 0, 0, ${z/2} ${z/2}h `+z/2+"v "+-z/2+`a ${z/2} ${z/2}, 0, 0, 0, ${-z/2} ${-z/2}`)}}))}_drawDot({x:k,y:z,size:H}){this._basicDot({x:k,y:z,size:H,rotation:0})}_drawSquare({x:k,y:z,size:H}){this._basicSquare({x:k,y:z,size:H,rotation:0})}_drawRounded({x:k,y:z,size:H,getNeighbor:I}){const j=I?+I(-1,0):0,q=I?+I(1,0):0,ee=I?+I(0,-1):0,le=I?+I(0,1):0,pe=j+q+ee+le;if(pe!==0)if(pe>2||j&&q||ee&&le)this._basicSquare({x:k,y:z,size:H,rotation:0});else{if(pe===2){let he=0;return j&&ee?he=Math.PI/2:ee&&q?he=Math.PI:q&&le&&(he=-Math.PI/2),void this._basicCornerRounded({x:k,y:z,size:H,rotation:he})}if(pe===1){let he=0;return ee?he=Math.PI/2:q?he=Math.PI:le&&(he=-Math.PI/2),void this._basicSideRounded({x:k,y:z,size:H,rotation:he})}}else this._basicDot({x:k,y:z,size:H,rotation:0})}_drawExtraRounded({x:k,y:z,size:H,getNeighbor:I}){const j=I?+I(-1,0):0,q=I?+I(1,0):0,ee=I?+I(0,-1):0,le=I?+I(0,1):0,pe=j+q+ee+le;if(pe!==0)if(pe>2||j&&q||ee&&le)this._basicSquare({x:k,y:z,size:H,rotation:0});else{if(pe===2){let he=0;return j&&ee?he=Math.PI/2:ee&&q?he=Math.PI:q&&le&&(he=-Math.PI/2),void this._basicCornerExtraRounded({x:k,y:z,size:H,rotation:he})}if(pe===1){let he=0;return ee?he=Math.PI/2:q?he=Math.PI:le&&(he=-Math.PI/2),void this._basicSideRounded({x:k,y:z,size:H,rotation:he})}}else this._basicDot({x:k,y:z,size:H,rotation:0})}_drawClassy({x:k,y:z,size:H,getNeighbor:I}){const j=I?+I(-1,0):0,q=I?+I(1,0):0,ee=I?+I(0,-1):0,le=I?+I(0,1):0;j+q+ee+le!==0?j||ee?q||le?this._basicSquare({x:k,y:z,size:H,rotation:0}):this._basicCornerRounded({x:k,y:z,size:H,rotation:Math.PI/2}):this._basicCornerRounded({x:k,y:z,size:H,rotation:-Math.PI/2}):this._basicCornersRounded({x:k,y:z,size:H,rotation:Math.PI/2})}_drawClassyRounded({x:k,y:z,size:H,getNeighbor:I}){const j=I?+I(-1,0):0,q=I?+I(1,0):0,ee=I?+I(0,-1):0,le=I?+I(0,1):0;j+q+ee+le!==0?j||ee?q||le?this._basicSquare({x:k,y:z,size:H,rotation:0}):this._basicCornerExtraRounded({x:k,y:z,size:H,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:k,y:z,size:H,rotation:-Math.PI/2}):this._basicCornersRounded({x:k,y:z,size:H,rotation:Math.PI/2})}}const y={dot:"dot",square:"square",extraRounded:"extra-rounded"},x=Object.values(y);class b{constructor({svg:k,type:z,window:H}){this._svg=k,this._type=z,this._window=H}draw(k,z,H,I){let j;switch(this._type){case y.square:j=this._drawSquare;break;case y.extraRounded:j=this._drawExtraRounded;break;default:j=this._drawDot}j.call(this,{x:k,y:z,size:H,rotation:I})}_rotateFigure({x:k,y:z,size:H,rotation:I=0,draw:j}){var q;const ee=k+H/2,le=z+H/2;j(),(q=this._element)===null||q===void 0||q.setAttribute("transform",`rotate(${180*I/Math.PI},${ee},${le})`)}_basicDot(k){const{size:z,x:H,y:I}=k,j=z/7;this._rotateFigure(Object.assign(Object.assign({},k),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${H+z/2} ${I}a ${z/2} ${z/2} 0 1 0 0.1 0zm 0 ${j}a ${z/2-j} ${z/2-j} 0 1 1 -0.1 0Z`)}}))}_basicSquare(k){const{size:z,x:H,y:I}=k,j=z/7;this._rotateFigure(Object.assign(Object.assign({},k),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${H} ${I}v ${z}h ${z}v `+-z+`zM ${H+j} ${I+j}h `+(z-2*j)+"v "+(z-2*j)+"h "+(2*j-z)+"z")}}))}_basicExtraRounded(k){const{size:z,x:H,y:I}=k,j=z/7;this._rotateFigure(Object.assign(Object.assign({},k),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${H} ${I+2.5*j}v `+2*j+`a ${2.5*j} ${2.5*j}, 0, 0, 0, ${2.5*j} ${2.5*j}h `+2*j+`a ${2.5*j} ${2.5*j}, 0, 0, 0, ${2.5*j} ${2.5*-j}v `+-2*j+`a ${2.5*j} ${2.5*j}, 0, 0, 0, ${2.5*-j} ${2.5*-j}h `+-2*j+`a ${2.5*j} ${2.5*j}, 0, 0, 0, ${2.5*-j} ${2.5*j}M ${H+2.5*j} ${I+j}h `+2*j+`a ${1.5*j} ${1.5*j}, 0, 0, 1, ${1.5*j} ${1.5*j}v `+2*j+`a ${1.5*j} ${1.5*j}, 0, 0, 1, ${1.5*-j} ${1.5*j}h `+-2*j+`a ${1.5*j} ${1.5*j}, 0, 0, 1, ${1.5*-j} ${1.5*-j}v `+-2*j+`a ${1.5*j} ${1.5*j}, 0, 0, 1, ${1.5*j} ${1.5*-j}`)}}))}_drawDot({x:k,y:z,size:H,rotation:I}){this._basicDot({x:k,y:z,size:H,rotation:I})}_drawSquare({x:k,y:z,size:H,rotation:I}){this._basicSquare({x:k,y:z,size:H,rotation:I})}_drawExtraRounded({x:k,y:z,size:H,rotation:I}){this._basicExtraRounded({x:k,y:z,size:H,rotation:I})}}const C={dot:"dot",square:"square"},w=Object.values(C);class A{constructor({svg:k,type:z,window:H}){this._svg=k,this._type=z,this._window=H}draw(k,z,H,I){let j;j=this._type===C.square?this._drawSquare:this._drawDot,j.call(this,{x:k,y:z,size:H,rotation:I})}_rotateFigure({x:k,y:z,size:H,rotation:I=0,draw:j}){var q;const ee=k+H/2,le=z+H/2;j(),(q=this._element)===null||q===void 0||q.setAttribute("transform",`rotate(${180*I/Math.PI},${ee},${le})`)}_basicDot(k){const{size:z,x:H,y:I}=k;this._rotateFigure(Object.assign(Object.assign({},k),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(H+z/2)),this._element.setAttribute("cy",String(I+z/2)),this._element.setAttribute("r",String(z/2))}}))}_basicSquare(k){const{size:z,x:H,y:I}=k;this._rotateFigure(Object.assign(Object.assign({},k),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(H)),this._element.setAttribute("y",String(I)),this._element.setAttribute("width",String(z)),this._element.setAttribute("height",String(z))}}))}_drawDot({x:k,y:z,size:H,rotation:I}){this._basicDot({x:k,y:z,size:H,rotation:I})}_drawSquare({x:k,y:z,size:H,rotation:I}){this._basicSquare({x:k,y:z,size:H,rotation:I})}}const O="circle",P=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],N=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class F{constructor(k,z){this._roundSize=H=>this._options.dotsOptions.roundSize?Math.floor(H):H,this._window=z,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(k.width)),this._element.setAttribute("height",String(k.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),k.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${k.width} ${k.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=k.image,this._instanceId=F.instanceCount++,this._options=k}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(k){const z=k.getModuleCount(),H=Math.min(this._options.width,this._options.height)-2*this._options.margin,I=this._options.shape===O?H/Math.sqrt(2):H,j=this._roundSize(I/z);let q={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=k,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:ee,qrOptions:le}=this._options,pe=ee.imageSize*h[le.errorCorrectionLevel],he=Math.floor(pe*z*z);q=function({originalHeight:ve,originalWidth:D,maxHiddenDots:R,maxHiddenAxisDots:G,dotSize:te}){const V={x:0,y:0},Z={x:0,y:0};if(ve<=0||D<=0||R<=0||te<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const ne=ve/D;return V.x=Math.floor(Math.sqrt(R/ne)),V.x<=0&&(V.x=1),G&&G<V.x&&(V.x=G),V.x%2==0&&V.x--,Z.x=V.x*te,V.y=1+2*Math.ceil((V.x*ne-1)/2),Z.y=Math.round(Z.x*ne),(V.y*V.x>R||G&&G<V.y)&&(G&&G<V.y?(V.y=G,V.y%2==0&&V.x--):V.y-=2,Z.y=V.y*te,V.x=1+2*Math.ceil((V.y/ne-1)/2),Z.x=Math.round(Z.y/ne)),{height:Z.y,width:Z.x,hideYDots:V.y,hideXDots:V.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:he,maxHiddenAxisDots:z-14,dotSize:j})}this.drawBackground(),this.drawDots((ee,le)=>{var pe,he,ve,D,R,G;return!(this._options.imageOptions.hideBackgroundDots&&ee>=(z-q.hideYDots)/2&&ee<(z+q.hideYDots)/2&&le>=(z-q.hideXDots)/2&&le<(z+q.hideXDots)/2||!((pe=P[ee])===null||pe===void 0)&&pe[le]||!((he=P[ee-z+7])===null||he===void 0)&&he[le]||!((ve=P[ee])===null||ve===void 0)&&ve[le-z+7]||!((D=N[ee])===null||D===void 0)&&D[le]||!((R=N[ee-z+7])===null||R===void 0)&&R[le]||!((G=N[ee])===null||G===void 0)&&G[le-z+7])}),this.drawCorners(),this._options.image&&await this.drawImage({width:q.width,height:q.height,count:z,dotSize:j})}drawBackground(){var k,z,H;const I=this._element,j=this._options;if(I){const q=(k=j.backgroundOptions)===null||k===void 0?void 0:k.gradient,ee=(z=j.backgroundOptions)===null||z===void 0?void 0:z.color;let le=j.height,pe=j.width;if(q||ee){const he=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),!((H=j.backgroundOptions)===null||H===void 0)&&H.round&&(le=pe=Math.min(j.width,j.height),he.setAttribute("rx",String(le/2*j.backgroundOptions.round))),he.setAttribute("x",String(this._roundSize((j.width-pe)/2))),he.setAttribute("y",String(this._roundSize((j.height-le)/2))),he.setAttribute("width",String(pe)),he.setAttribute("height",String(le)),this._backgroundClipPath.appendChild(he),this._createColor({options:q,color:ee,additionalRotation:0,x:0,y:0,height:j.height,width:j.width,name:`background-color-${this._instanceId}`})}}}drawDots(k){var z,H;if(!this._qr)throw"QR code is not defined";const I=this._options,j=this._qr.getModuleCount();if(j>I.width||j>I.height)throw"The canvas is too small.";const q=Math.min(I.width,I.height)-2*I.margin,ee=I.shape===O?q/Math.sqrt(2):q,le=this._roundSize(ee/j),pe=this._roundSize((I.width-j*le)/2),he=this._roundSize((I.height-j*le)/2),ve=new m({svg:this._element,type:I.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(z=I.dotsOptions)===null||z===void 0?void 0:z.gradient,color:I.dotsOptions.color,additionalRotation:0,x:0,y:0,height:I.height,width:I.width,name:`dot-color-${this._instanceId}`});for(let D=0;D<j;D++)for(let R=0;R<j;R++)k&&!k(D,R)||!((H=this._qr)===null||H===void 0)&&H.isDark(D,R)&&(ve.draw(pe+R*le,he+D*le,le,(G,te)=>!(R+G<0||D+te<0||R+G>=j||D+te>=j)&&!(k&&!k(D+te,R+G))&&!!this._qr&&this._qr.isDark(D+te,R+G)),ve._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(ve._element));if(I.shape===O){const D=this._roundSize((q/le-j)/2),R=j+2*D,G=pe-D*le,te=he-D*le,V=[],Z=this._roundSize(R/2);for(let ne=0;ne<R;ne++){V[ne]=[];for(let me=0;me<R;me++)ne>=D-1&&ne<=R-D&&me>=D-1&&me<=R-D||Math.sqrt((ne-Z)*(ne-Z)+(me-Z)*(me-Z))>Z?V[ne][me]=0:V[ne][me]=this._qr.isDark(me-2*D<0?me:me>=j?me-2*D:me-D,ne-2*D<0?ne:ne>=j?ne-2*D:ne-D)?1:0}for(let ne=0;ne<R;ne++)for(let me=0;me<R;me++)V[ne][me]&&(ve.draw(G+me*le,te+ne*le,le,(ie,xe)=>{var Ee;return!!(!((Ee=V[ne+xe])===null||Ee===void 0)&&Ee[me+ie])}),ve._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(ve._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const k=this._element,z=this._options;if(!k)throw"Element code is not defined";const H=this._qr.getModuleCount(),I=Math.min(z.width,z.height)-2*z.margin,j=z.shape===O?I/Math.sqrt(2):I,q=this._roundSize(j/H),ee=7*q,le=3*q,pe=this._roundSize((z.width-H*q)/2),he=this._roundSize((z.height-H*q)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(([ve,D,R])=>{var G,te,V,Z,ne,me,ie,xe,Ee,Me,Ue,ke,Ve,ot;const Ge=pe+ve*q*(H-7),Qe=he+D*q*(H-7);let We=this._dotsClipPath,ze=this._dotsClipPath;if((!((G=z.cornersSquareOptions)===null||G===void 0)&&G.gradient||!((te=z.cornersSquareOptions)===null||te===void 0)&&te.color)&&(We=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),We.setAttribute("id",`clip-path-corners-square-color-${ve}-${D}-${this._instanceId}`),this._defs.appendChild(We),this._cornersSquareClipPath=this._cornersDotClipPath=ze=We,this._createColor({options:(V=z.cornersSquareOptions)===null||V===void 0?void 0:V.gradient,color:(Z=z.cornersSquareOptions)===null||Z===void 0?void 0:Z.color,additionalRotation:R,x:Ge,y:Qe,height:ee,width:ee,name:`corners-square-color-${ve}-${D}-${this._instanceId}`})),((ne=z.cornersSquareOptions)===null||ne===void 0?void 0:ne.type)&&x.includes(z.cornersSquareOptions.type)){const nt=new b({svg:this._element,type:z.cornersSquareOptions.type,window:this._window});nt.draw(Ge,Qe,ee,R),nt._element&&We&&We.appendChild(nt._element)}else{const nt=new m({svg:this._element,type:((me=z.cornersSquareOptions)===null||me===void 0?void 0:me.type)||z.dotsOptions.type,window:this._window});for(let Pt=0;Pt<P.length;Pt++)for(let at=0;at<P[Pt].length;at++)!((ie=P[Pt])===null||ie===void 0)&&ie[at]&&(nt.draw(Ge+at*q,Qe+Pt*q,q,(Lt,Ot)=>{var gt;return!!(!((gt=P[Pt+Ot])===null||gt===void 0)&&gt[at+Lt])}),nt._element&&We&&We.appendChild(nt._element))}if((!((xe=z.cornersDotOptions)===null||xe===void 0)&&xe.gradient||!((Ee=z.cornersDotOptions)===null||Ee===void 0)&&Ee.color)&&(ze=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),ze.setAttribute("id",`clip-path-corners-dot-color-${ve}-${D}-${this._instanceId}`),this._defs.appendChild(ze),this._cornersDotClipPath=ze,this._createColor({options:(Me=z.cornersDotOptions)===null||Me===void 0?void 0:Me.gradient,color:(Ue=z.cornersDotOptions)===null||Ue===void 0?void 0:Ue.color,additionalRotation:R,x:Ge+2*q,y:Qe+2*q,height:le,width:le,name:`corners-dot-color-${ve}-${D}-${this._instanceId}`})),((ke=z.cornersDotOptions)===null||ke===void 0?void 0:ke.type)&&w.includes(z.cornersDotOptions.type)){const nt=new A({svg:this._element,type:z.cornersDotOptions.type,window:this._window});nt.draw(Ge+2*q,Qe+2*q,le,R),nt._element&&ze&&ze.appendChild(nt._element)}else{const nt=new m({svg:this._element,type:((Ve=z.cornersDotOptions)===null||Ve===void 0?void 0:Ve.type)||z.dotsOptions.type,window:this._window});for(let Pt=0;Pt<N.length;Pt++)for(let at=0;at<N[Pt].length;at++)!((ot=N[Pt])===null||ot===void 0)&&ot[at]&&(nt.draw(Ge+at*q,Qe+Pt*q,q,(Lt,Ot)=>{var gt;return!!(!((gt=N[Pt+Ot])===null||gt===void 0)&&gt[at+Lt])}),nt._element&&ze&&ze.appendChild(nt._element))}})}loadImage(){return new Promise((k,z)=>{var H;const I=this._options;if(!I.image)return z("Image is not defined");if(!((H=I.nodeCanvas)===null||H===void 0)&&H.loadImage)I.nodeCanvas.loadImage(I.image).then(j=>{var q,ee;if(this._image=j,this._options.imageOptions.saveAsBlob){const le=(q=I.nodeCanvas)===null||q===void 0?void 0:q.createCanvas(this._image.width,this._image.height);(ee=le?.getContext("2d"))===null||ee===void 0||ee.drawImage(j,0,0),this._imageUri=le?.toDataURL()}k()}).catch(z);else{const j=new this._window.Image;typeof I.imageOptions.crossOrigin=="string"&&(j.crossOrigin=I.imageOptions.crossOrigin),this._image=j,j.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await async function(q,ee){return new Promise(le=>{const pe=new ee.XMLHttpRequest;pe.onload=function(){const he=new ee.FileReader;he.onloadend=function(){le(he.result)},he.readAsDataURL(pe.response)},pe.open("GET",q),pe.responseType="blob",pe.send()})}(I.image||"",this._window)),k()},j.src=I.image}})}async drawImage({width:k,height:z,count:H,dotSize:I}){const j=this._options,q=this._roundSize((j.width-H*I)/2),ee=this._roundSize((j.height-H*I)/2),le=q+this._roundSize(j.imageOptions.margin+(H*I-k)/2),pe=ee+this._roundSize(j.imageOptions.margin+(H*I-z)/2),he=k-2*j.imageOptions.margin,ve=z-2*j.imageOptions.margin,D=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");D.setAttribute("href",this._imageUri||""),D.setAttribute("xlink:href",this._imageUri||""),D.setAttribute("x",String(le)),D.setAttribute("y",String(pe)),D.setAttribute("width",`${he}px`),D.setAttribute("height",`${ve}px`),this._element.appendChild(D)}_createColor({options:k,color:z,additionalRotation:H,x:I,y:j,height:q,width:ee,name:le}){const pe=ee>q?ee:q,he=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(he.setAttribute("x",String(I)),he.setAttribute("y",String(j)),he.setAttribute("height",String(q)),he.setAttribute("width",String(ee)),he.setAttribute("clip-path",`url('#clip-path-${le}')`),k){let ve;if(k.type==="radial")ve=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),ve.setAttribute("id",le),ve.setAttribute("gradientUnits","userSpaceOnUse"),ve.setAttribute("fx",String(I+ee/2)),ve.setAttribute("fy",String(j+q/2)),ve.setAttribute("cx",String(I+ee/2)),ve.setAttribute("cy",String(j+q/2)),ve.setAttribute("r",String(pe/2));else{const D=((k.rotation||0)+H)%(2*Math.PI),R=(D+2*Math.PI)%(2*Math.PI);let G=I+ee/2,te=j+q/2,V=I+ee/2,Z=j+q/2;R>=0&&R<=.25*Math.PI||R>1.75*Math.PI&&R<=2*Math.PI?(G-=ee/2,te-=q/2*Math.tan(D),V+=ee/2,Z+=q/2*Math.tan(D)):R>.25*Math.PI&&R<=.75*Math.PI?(te-=q/2,G-=ee/2/Math.tan(D),Z+=q/2,V+=ee/2/Math.tan(D)):R>.75*Math.PI&&R<=1.25*Math.PI?(G+=ee/2,te+=q/2*Math.tan(D),V-=ee/2,Z-=q/2*Math.tan(D)):R>1.25*Math.PI&&R<=1.75*Math.PI&&(te+=q/2,G+=ee/2/Math.tan(D),Z-=q/2,V-=ee/2/Math.tan(D)),ve=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),ve.setAttribute("id",le),ve.setAttribute("gradientUnits","userSpaceOnUse"),ve.setAttribute("x1",String(Math.round(G))),ve.setAttribute("y1",String(Math.round(te))),ve.setAttribute("x2",String(Math.round(V))),ve.setAttribute("y2",String(Math.round(Z)))}k.colorStops.forEach(({offset:D,color:R})=>{const G=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");G.setAttribute("offset",100*D+"%"),G.setAttribute("stop-color",R),ve.appendChild(G)}),he.setAttribute("fill",`url('#${le}')`),this._defs.appendChild(ve)}else z&&he.setAttribute("fill",z);this._element.appendChild(he)}}F.instanceCount=0;const U=F,W="canvas",X={};for(let Y=0;Y<=40;Y++)X[Y]=Y;const ae={type:W,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:X[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function ce(Y){const k=Object.assign({},Y);if(!k.colorStops||!k.colorStops.length)throw"Field 'colorStops' is required in gradient";return k.rotation?k.rotation=Number(k.rotation):k.rotation=0,k.colorStops=k.colorStops.map(z=>Object.assign(Object.assign({},z),{offset:Number(z.offset)})),k}function re(Y){const k=Object.assign({},Y);return k.width=Number(k.width),k.height=Number(k.height),k.margin=Number(k.margin),k.imageOptions=Object.assign(Object.assign({},k.imageOptions),{hideBackgroundDots:!!k.imageOptions.hideBackgroundDots,imageSize:Number(k.imageOptions.imageSize),margin:Number(k.imageOptions.margin)}),k.margin>Math.min(k.width,k.height)&&(k.margin=Math.min(k.width,k.height)),k.dotsOptions=Object.assign({},k.dotsOptions),k.dotsOptions.gradient&&(k.dotsOptions.gradient=ce(k.dotsOptions.gradient)),k.cornersSquareOptions&&(k.cornersSquareOptions=Object.assign({},k.cornersSquareOptions),k.cornersSquareOptions.gradient&&(k.cornersSquareOptions.gradient=ce(k.cornersSquareOptions.gradient))),k.cornersDotOptions&&(k.cornersDotOptions=Object.assign({},k.cornersDotOptions),k.cornersDotOptions.gradient&&(k.cornersDotOptions.gradient=ce(k.cornersDotOptions.gradient))),k.backgroundOptions&&(k.backgroundOptions=Object.assign({},k.backgroundOptions),k.backgroundOptions.gradient&&(k.backgroundOptions.gradient=ce(k.backgroundOptions.gradient))),k}var J=i(873),oe=i.n(J);function _e(Y){if(!Y)throw new Error("Extension must be defined");Y[0]==="."&&(Y=Y.substring(1));const k={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[Y.toLowerCase()];if(!k)throw new Error(`Extension "${Y}" is not supported`);return k}class se{constructor(k){k?.jsdom?this._window=new k.jsdom("",{resources:"usable"}).window:this._window=window,this._options=k?re(c(ae,k)):ae,this.update()}static _clearContainer(k){k&&(k.innerHTML="")}_setupSvg(){if(!this._qr)return;const k=new U(this._options,this._window);this._svg=k.getElement(),this._svgDrawingPromise=k.drawQR(this._qr).then(()=>{var z;this._svg&&((z=this._extension)===null||z===void 0||z.call(this,k.getElement(),this._options))})}_setupCanvas(){var k,z;this._qr&&(!((k=this._options.nodeCanvas)===null||k===void 0)&&k.createCanvas?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=(z=this._svgDrawingPromise)===null||z===void 0?void 0:z.then(()=>{var H;if(!this._svg)return;const I=this._svg,j=new this._window.XMLSerializer().serializeToString(I),q=btoa(j),ee=`data:${_e("svg")};base64,${q}`;if(!((H=this._options.nodeCanvas)===null||H===void 0)&&H.loadImage)return this._options.nodeCanvas.loadImage(ee).then(le=>{var pe,he;le.width=this._options.width,le.height=this._options.height,(he=(pe=this._nodeCanvas)===null||pe===void 0?void 0:pe.getContext("2d"))===null||he===void 0||he.drawImage(le,0,0)});{const le=new this._window.Image;return new Promise(pe=>{le.onload=()=>{var he,ve;(ve=(he=this._domCanvas)===null||he===void 0?void 0:he.getContext("2d"))===null||ve===void 0||ve.drawImage(le,0,0),pe()},le.src=ee})}}))}async _getElement(k="png"){if(!this._qr)throw"QR code is empty";return k.toLowerCase()==="svg"?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(k){se._clearContainer(this._container),this._options=k?re(c(this._options,k)):this._options,this._options.data&&(this._qr=oe()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(z){switch(!0){case/^[0-9]*$/.test(z):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(z):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===W?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(k){if(k){if(typeof k.appendChild!="function")throw"Container should be a single DOM node";this._options.type===W?this._domCanvas&&k.appendChild(this._domCanvas):this._svg&&k.appendChild(this._svg),this._container=k}}applyExtension(k){if(!k)throw"Extension function should be defined.";this._extension=k,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(k="png"){if(!this._qr)throw"QR code is empty";const z=await this._getElement(k),H=_e(k);if(!z)return null;if(k.toLowerCase()==="svg"){const I=`<?xml version="1.0" standalone="no"?>\r
${new this._window.XMLSerializer().serializeToString(z)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(I):new Blob([I],{type:H})}return new Promise(I=>{const j=z;if("toBuffer"in j)if(H==="image/png")I(j.toBuffer(H));else if(H==="image/jpeg")I(j.toBuffer(H));else{if(H!=="application/pdf")throw Error("Unsupported extension");I(j.toBuffer(H))}else"toBlob"in j&&j.toBlob(I,H,1)})}async download(k){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let z="png",H="qr";typeof k=="string"?(z=k,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof k=="object"&&k!==null&&(k.name&&(H=k.name),k.extension&&(z=k.extension));const I=await this._getElement(z);if(I)if(z.toLowerCase()==="svg"){let j=new XMLSerializer().serializeToString(I);j=`<?xml version="1.0" standalone="no"?>\r
`+j,f(`data:${_e(z)};charset=utf-8,${encodeURIComponent(j)}`,`${H}.svg`)}else f(I.toDataURL(_e(z)),`${H}.${z}`)}}const ue=se})(),o.default})())}(kg)),kg.exports}var mee=hee();const pee=aa(mee),gee="Left",vee="Right",yee="Up",bee="Down",Xc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},m_={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},VO="mousemove",HO="mouseup",xee="touchend",_ee="touchmove",wee="touchstart";function See(e,t,n,r){return e>t?n>0?vee:gee:r>0?bee:yee}function qO(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 Cee(e,t){const n=m=>{const y="touches"in m;y&&m.touches.length>1||e((x,b)=>{b.trackMouse&&!y&&(document.addEventListener(VO,r),document.addEventListener(HO,l));const{clientX:C,clientY:w}=y?m.touches[0]:m,A=qO([C,w],b.rotationAngle);return b.onTouchStartOrOnMouseDown&&b.onTouchStartOrOnMouseDown({event:m}),Object.assign(Object.assign(Object.assign({},x),m_),{initial:A.slice(),xy:A,start:m.timeStamp||0})})},r=m=>{e((y,x)=>{const b="touches"in m;if(b&&m.touches.length>1)return y;if(m.timeStamp-y.start>x.swipeDuration)return y.swiping?Object.assign(Object.assign({},y),{swiping:!1}):y;const{clientX:C,clientY:w}=b?m.touches[0]:m,[A,O]=qO([C,w],x.rotationAngle),P=A-y.xy[0],N=O-y.xy[1],F=Math.abs(P),U=Math.abs(N),W=(m.timeStamp||0)-y.start,X=Math.sqrt(F*F+U*U)/(W||1),ae=[P/(W||1),N/(W||1)],ce=See(F,U,P,N),re=typeof x.delta=="number"?x.delta:x.delta[ce.toLowerCase()]||Xc.delta;if(F<re&&U<re&&!y.swiping)return y;const J={absX:F,absY:U,deltaX:P,deltaY:N,dir:ce,event:m,first:y.first,initial:y.initial,velocity:X,vxvy:ae};J.first&&x.onSwipeStart&&x.onSwipeStart(J),x.onSwiping&&x.onSwiping(J);let oe=!1;return(x.onSwiping||x.onSwiped||x[`onSwiped${ce}`])&&(oe=!0),oe&&x.preventScrollOnSwipe&&x.trackTouch&&m.cancelable&&m.preventDefault(),Object.assign(Object.assign({},y),{first:!1,eventData:J,swiping:!0})})},i=m=>{e((y,x)=>{let b;if(y.swiping&&y.eventData){if(m.timeStamp-y.start<x.swipeDuration){b=Object.assign(Object.assign({},y.eventData),{event:m}),x.onSwiped&&x.onSwiped(b);const C=x[`onSwiped${b.dir}`];C&&C(b)}}else x.onTap&&x.onTap({event:m});return x.onTouchEndOrOnMouseUp&&x.onTouchEndOrOnMouseUp({event:m}),Object.assign(Object.assign(Object.assign({},y),m_),{eventData:b})})},o=()=>{document.removeEventListener(VO,r),document.removeEventListener(HO,l)},l=m=>{o(),i(m)},c=(m,y)=>{let x=()=>{};if(m&&m.addEventListener){const b=Object.assign(Object.assign({},Xc.touchEventOptions),y.touchEventOptions),C=[[wee,n,b],[_ee,r,Object.assign(Object.assign({},b),y.preventScrollOnSwipe?{passive:!1}:{})],[xee,i,b]];C.forEach(([w,A,O])=>m.addEventListener(w,A,O)),x=()=>C.forEach(([w,A])=>m.removeEventListener(w,A))}return x},h={ref:m=>{m!==null&&e((y,x)=>{if(y.el===m)return y;const b={};return y.el&&y.el!==m&&y.cleanUpTouch&&(y.cleanUpTouch(),b.cleanUpTouch=void 0),x.trackTouch&&m&&(b.cleanUpTouch=c(m,x)),Object.assign(Object.assign(Object.assign({},y),{el:m}),b)})}};return t.trackMouse&&(h.onMouseDown=n),[h,c]}function Eee(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 Aee(e){const{trackMouse:t}=e,n=_.useRef(Object.assign({},m_)),r=_.useRef(Object.assign({},Xc)),i=_.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Xc),e);let o;for(o in Xc)r.current[o]===void 0&&(r.current[o]=Xc[o]);const[l,c]=_.useMemo(()=>Cee(f=>n.current=f(n.current,r.current),{trackMouse:t}),[t]);return n.current=Eee(n.current,r.current,i.current,c),l}function Wb(e){return e==null?"":`${e}`}function Tee(e={}){const{separator:t,decimals:n}=e;return t?n?r=>r.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function dS(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;if(!t||t===n)return i=>i;const r=new RegExp(t,"g");return i=>(i.includes(t)&&(i=i.replace(r,n)),`${t}${i}${t}`)}function Oee(e={stringFormatter:dS()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function jee(e={stringFormatter:dS()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}const Mee=RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,"g");function Pee(e){var t,n,r;const i=[];let o;for(;o=Mee.exec(e);)i.push((r=(t=o[3])!==null&&t!==void 0?t:(n=o[1])===null||n===void 0?void 0:n.trim())!==null&&r!==void 0?r:o[0]);return i}function GO(e,t,n){if(t in e){const o=e[t];return o===void 0?n:o}const r=Array.isArray(t)?t:Pee(t);let i=e;for(const o of r)if(i=i?.[o],i===void 0)return n;return i}function fD(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function p_(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var YO;(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"})(YO||(YO={}));class Lee{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||dS(),i=jee({stringFormatter:r}),o={header:r,undefined:Wb,boolean:Wb,number:Tee(),bigint:Wb,string:r,symbol:Oee({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:i=>GO(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:l=>GO(l,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",l={label:o,default:i},c=r.value;return{label:o,value(f){const h=c(f,l);return h===void 0?i:h}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return p_(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(fD,[]),[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 p_(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 dD extends Lee{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((l,c)=>(Object.keys(c).forEach(f=>{l.includes(f)||l.push(f)}),l),[]),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(fD,[])}processData(t){return p_(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var gr;(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"})(gr||(gr={}));gr.QUOTATION_MARK+"",gr.QUOTATION_MARK,gr.REVERSE_SOLIDUS+"",gr.REVERSE_SOLIDUS,gr.SOLIDUS+"",gr.SOLIDUS,gr.LATIN_SMALL_LETTER_B+"",gr.BACKSPACE,gr.LATIN_SMALL_LETTER_F+"",gr.FORM_FEED,gr.LATIN_SMALL_LETTER_N+"",gr.NEWLINE,gr.LATIN_SMALL_LETTER_R+"",gr.CARRIAGE_RETURN,gr.LATIN_SMALL_LETTER_T+"",gr.TAB;var WO;(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"})(WO||(WO={}));var KO;(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",e[e.BOM_OR_START=29]="BOM_OR_START",e[e.BOM=30]="BOM"})(KO||(KO={}));var ZO;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(ZO||(ZO={}));var XO;(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"})(XO||(XO={}));var Nee=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function hS(e){if(typeof e!="string")return!1;var t=Nee;return t.includes(e)}var Ree=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function hD(e){if(typeof e!="string")return!1;var t=Ree;return t.includes(e)}function mD(e){return typeof e=="string"&&e.startsWith("data-")}function Di(e){var t=Object.entries(e).filter(n=>{var[r]=n;return hD(r)||mD(r)});return Object.fromEntries(t)}function Fu(e){if(e==null)return null;if(_.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Di(t)}return typeof e=="object"&&!Array.isArray(e)?Di(e):null}function zr(e){var t=Object.entries(e).filter(n=>{var[r]=n;return hD(r)||mD(r)||hS(r)});return Object.fromEntries(t)}function Dee(e){return e==null?null:_.isValidElement(e)?zr(e.props):typeof e=="object"&&!Array.isArray(e)?zr(e):null}var kee=["children","width","height","viewBox","className","style","title","desc"];function g_(){return g_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g_.apply(null,arguments)}function Iee(e,t){if(e==null)return{};var n,r,i=zee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function zee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var pD=_.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:o,className:l,style:c,title:f,desc:h}=e,m=Iee(e,kee),y=o||{width:r,height:i,x:0,y:0},x=Oe("recharts-surface",l);return _.createElement("svg",g_({},zr(m),{className:x,width:r,height:i,style:c,viewBox:"".concat(y.x," ").concat(y.y," ").concat(y.width," ").concat(y.height),ref:t}),_.createElement("title",null,f),_.createElement("desc",null,h),n)}),Uee=["children","className"];function v_(){return v_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v_.apply(null,arguments)}function Bee(e,t){if(e==null)return{};var n,r,i=Fee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ar=_.forwardRef((e,t)=>{var{children:n,className:r}=e,i=Bee(e,Uee),o=Oe("recharts-layer",r);return _.createElement("g",v_({className:o},zr(i),{ref:t}),n)}),$ee=_.createContext(null);function en(e){return function(){return e}}const gD=Math.cos,mv=Math.sin,La=Math.sqrt,pv=Math.PI,Ny=2*pv,y_=Math.PI,b_=2*y_,xu=1e-6,Vee=b_-xu;function vD(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Hee(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return vD;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class qee{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?vD:Hee(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,l){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,c=this._y1,f=r-t,h=i-n,m=l-t,y=c-n,x=m*m+y*y;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(x>xu)if(!(Math.abs(y*f-h*m)>xu)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let b=r-l,C=i-c,w=f*f+h*h,A=b*b+C*C,O=Math.sqrt(w),P=Math.sqrt(x),N=o*Math.tan((y_-Math.acos((w+x-A)/(2*O*P)))/2),F=N/P,U=N/O;Math.abs(F-1)>xu&&this._append`L${t+F*m},${n+F*y}`,this._append`A${o},${o},0,0,${+(y*b>m*C)},${this._x1=t+U*f},${this._y1=n+U*h}`}}arc(t,n,r,i,o,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let c=r*Math.cos(i),f=r*Math.sin(i),h=t+c,m=n+f,y=1^l,x=l?i-o:o-i;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>xu||Math.abs(this._y1-m)>xu)&&this._append`L${h},${m}`,r&&(x<0&&(x=x%b_+b_),x>Vee?this._append`A${r},${r},0,1,${y},${t-c},${n-f}A${r},${r},0,1,${y},${this._x1=h},${this._y1=m}`:x>xu&&this._append`A${r},${r},0,${+(x>=y_)},${y},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function mS(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new qee(t)}function pS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function yD(e){this._context=e}yD.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ry(e){return new yD(e)}function bD(e){return e[0]}function xD(e){return e[1]}function _D(e,t){var n=en(!0),r=null,i=Ry,o=null,l=mS(c);e=typeof e=="function"?e:e===void 0?bD:en(e),t=typeof t=="function"?t:t===void 0?xD:en(t);function c(f){var h,m=(f=pS(f)).length,y,x=!1,b;for(r==null&&(o=i(b=l())),h=0;h<=m;++h)!(h<m&&n(y=f[h],h,f))===x&&((x=!x)?o.lineStart():o.lineEnd()),x&&o.point(+e(y,h,f),+t(y,h,f));if(b)return o=null,b+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:en(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:en(+f),c):t},c.defined=function(f){return arguments.length?(n=typeof f=="function"?f:en(!!f),c):n},c.curve=function(f){return arguments.length?(i=f,r!=null&&(o=i(r)),c):i},c.context=function(f){return arguments.length?(f==null?r=o=null:o=i(r=f),c):r},c}function og(e,t,n){var r=null,i=en(!0),o=null,l=Ry,c=null,f=mS(h);e=typeof e=="function"?e:e===void 0?bD:en(+e),t=typeof t=="function"?t:en(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?xD:en(+n);function h(y){var x,b,C,w=(y=pS(y)).length,A,O=!1,P,N=new Array(w),F=new Array(w);for(o==null&&(c=l(P=f())),x=0;x<=w;++x){if(!(x<w&&i(A=y[x],x,y))===O)if(O=!O)b=x,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),C=x-1;C>=b;--C)c.point(N[C],F[C]);c.lineEnd(),c.areaEnd()}O&&(N[x]=+e(A,x,y),F[x]=+t(A,x,y),c.point(r?+r(A,x,y):N[x],n?+n(A,x,y):F[x]))}if(P)return c=null,P+""||null}function m(){return _D().defined(i).curve(l).context(o)}return h.x=function(y){return arguments.length?(e=typeof y=="function"?y:en(+y),r=null,h):e},h.x0=function(y){return arguments.length?(e=typeof y=="function"?y:en(+y),h):e},h.x1=function(y){return arguments.length?(r=y==null?null:typeof y=="function"?y:en(+y),h):r},h.y=function(y){return arguments.length?(t=typeof y=="function"?y:en(+y),n=null,h):t},h.y0=function(y){return arguments.length?(t=typeof y=="function"?y:en(+y),h):t},h.y1=function(y){return arguments.length?(n=y==null?null:typeof y=="function"?y:en(+y),h):n},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(n)},h.lineX1=function(){return m().x(r).y(t)},h.defined=function(y){return arguments.length?(i=typeof y=="function"?y:en(!!y),h):i},h.curve=function(y){return arguments.length?(l=y,o!=null&&(c=l(o)),h):l},h.context=function(y){return arguments.length?(y==null?o=c=null:c=l(o=y),h):o},h}class wD{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Gee(e){return new wD(e,!0)}function Yee(e){return new wD(e,!1)}const gS={draw(e,t){const n=La(t/pv);e.moveTo(n,0),e.arc(0,0,n,0,Ny)}},Wee={draw(e,t){const n=La(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},SD=La(1/3),Kee=SD*2,Zee={draw(e,t){const n=La(t/Kee),r=n*SD;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Xee={draw(e,t){const n=La(t),r=-n/2;e.rect(r,r,n,n)}},Qee=.8908130915292852,CD=mv(pv/10)/mv(7*pv/10),Jee=mv(Ny/10)*CD,ete=-gD(Ny/10)*CD,tte={draw(e,t){const n=La(t*Qee),r=Jee*n,i=ete*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const l=Ny*o/5,c=gD(l),f=mv(l);e.lineTo(f*n,-c*n),e.lineTo(c*r-f*i,f*r+c*i)}e.closePath()}},Kb=La(3),nte={draw(e,t){const n=-La(t/(Kb*3));e.moveTo(0,n*2),e.lineTo(-Kb*n,-n),e.lineTo(Kb*n,-n),e.closePath()}},Qi=-.5,Ji=La(3)/2,x_=1/La(12),rte=(x_/2+1)*3,ite={draw(e,t){const n=La(t/rte),r=n/2,i=n*x_,o=r,l=n*x_+n,c=-o,f=l;e.moveTo(r,i),e.lineTo(o,l),e.lineTo(c,f),e.lineTo(Qi*r-Ji*i,Ji*r+Qi*i),e.lineTo(Qi*o-Ji*l,Ji*o+Qi*l),e.lineTo(Qi*c-Ji*f,Ji*c+Qi*f),e.lineTo(Qi*r+Ji*i,Qi*i-Ji*r),e.lineTo(Qi*o+Ji*l,Qi*l-Ji*o),e.lineTo(Qi*c+Ji*f,Qi*f-Ji*c),e.closePath()}};function ate(e,t){let n=null,r=mS(i);e=typeof e=="function"?e:en(e||gS),t=typeof t=="function"?t:en(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:en(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:en(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function gv(){}function vv(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ED(e){this._context=e}ED.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vv(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ote(e){return new ED(e)}function AD(e){this._context=e}AD.prototype={areaStart:gv,areaEnd:gv,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:vv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ste(e){return new AD(e)}function TD(e){this._context=e}TD.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:vv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lte(e){return new TD(e)}function OD(e){this._context=e}OD.prototype={areaStart:gv,areaEnd:gv,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ute(e){return new OD(e)}function QO(e){return e<0?-1:1}function JO(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),l=(n-e._y1)/(i||r<0&&-0),c=(o*i+l*r)/(r+i);return(QO(o)+QO(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function ej(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Zb(e,t,n){var r=e._x0,i=e._y0,o=e._x1,l=e._y1,c=(o-r)/3;e._context.bezierCurveTo(r+c,i+c*t,o-c,l-c*n,o,l)}function yv(e){this._context=e}yv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Zb(this,this._t0,ej(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Zb(this,ej(this,n=JO(this,e,t)),n);break;default:Zb(this,this._t0,n=JO(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function jD(e){this._context=new MD(e)}(jD.prototype=Object.create(yv.prototype)).point=function(e,t){yv.prototype.point.call(this,t,e)};function MD(e){this._context=e}MD.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function cte(e){return new yv(e)}function fte(e){return new jD(e)}function PD(e){this._context=e}PD.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=tj(e),i=tj(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[l],t[l]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function tj(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),l=new Array(n);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(i[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function dte(e){return new PD(e)}function Dy(e,t){this._context=e,this._t=t}Dy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function hte(e){return new Dy(e,.5)}function mte(e){return new Dy(e,0)}function pte(e){return new Dy(e,1)}function hf(e,t){if((l=e.length)>1)for(var n=1,r,i,o=e[t[0]],l,c=o.length;n<l;++n)for(i=o,o=e[t[n]],r=0;r<c;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function __(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function gte(e,t){return e[t]}function vte(e){const t=[];return t.key=e,t}function yte(){var e=en([]),t=__,n=hf,r=gte;function i(o){var l=Array.from(e.apply(this,arguments),vte),c,f=l.length,h=-1,m;for(const y of o)for(c=0,++h;c<f;++c)(l[c][h]=[0,+r(y,l[c].key,h,o)]).data=y;for(c=0,m=pS(t(l));c<f;++c)l[m[c]].index=c;return n(l,m),l}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:en(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:en(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?__:typeof o=="function"?o:en(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??hf,i):n},i}function bte(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,l;i<o;++i){for(l=n=0;n<r;++n)l+=e[n][i][1]||0;if(l)for(n=0;n<r;++n)e[n][i][1]/=l}hf(e,t)}}function xte(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var l=0,c=0;l<i;++l)c+=e[l][n][1]||0;r[n][1]+=r[n][0]=-c/2}hf(e,t)}}function _te(e,t){if(!(!((l=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,l;r<o;++r){for(var c=0,f=0,h=0;c<l;++c){for(var m=e[t[c]],y=m[r][1]||0,x=m[r-1][1]||0,b=(y-x)/2,C=0;C<c;++C){var w=e[t[C]],A=w[r][1]||0,O=w[r-1][1]||0;b+=A-O}f+=y,h+=b*y}i[r-1][1]+=i[r-1][0]=n,f&&(n-=h/f)}i[r-1][1]+=i[r-1][0]=n,hf(e,t)}}var Xb={},Qb={},nj;function wte(){return nj||(nj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t}(Qb)),Qb}var Jb={},rj;function LD(){return rj||(rj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t}(Jb)),Jb}var ex={},ij;function vS(){return ij||(ij=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t}(ex)),ex}var tx={},nx={},aj;function Ste(){return aj||(aj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t}(nx)),nx}var oj;function yS(){return oj||(oj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ste(),n=vS();function r(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const o=[],l=i.length;if(l===0)return o;let c=0,f="",h="",m=!1;for(i.charCodeAt(0)===46&&(o.push(""),c++);c<l;){const y=i[c];h?y==="\\"&&c+1<l?(c++,f+=i[c]):y===h?h="":f+=y:m?y==='"'||y==="'"?h=y:y==="]"?(m=!1,o.push(f),f=""):f+=y:y==="["?(m=!0,f&&(o.push(f),f="")):y==="."?f&&(o.push(f),f=""):f+=y,c++}return f&&o.push(f),o}e.toPath=r}(tx)),tx}var sj;function bS(){return sj||(sj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wte(),n=LD(),r=vS(),i=yS();function o(c,f,h){if(c==null)return h;switch(typeof f){case"string":{if(t.isUnsafeProperty(f))return h;const m=c[f];return m===void 0?n.isDeepKey(f)?o(c,i.toPath(f),h):h:m}case"number":case"symbol":{typeof f=="number"&&(f=r.toKey(f));const m=c[f];return m===void 0?h:m}default:{if(Array.isArray(f))return l(c,f,h);if(Object.is(f?.valueOf(),-0)?f="-0":f=String(f),t.isUnsafeProperty(f))return h;const m=c[f];return m===void 0?h:m}}}function l(c,f,h){if(f.length===0)return h;let m=c;for(let y=0;y<f.length;y++){if(m==null||t.isUnsafeProperty(f[y]))return h;m=m[f[y]]}return m===void 0?h:m}e.get=o}(Xb)),Xb}var rx,lj;function Cte(){return lj||(lj=1,rx=bS().get),rx}var Ete=Cte();const $u=aa(Ete);var yr=e=>e===0?0:e>0?1:-1,Aa=e=>typeof e=="number"&&e!=+e,Xo=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Xe=e=>(typeof e=="number"||e instanceof Number)&&!Aa(e),ci=e=>Xe(e)||typeof e=="string",Ate=0,Dh=e=>{var t=++Ate;return"".concat(e||"").concat(t)},kr=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Xe(t)&&typeof t!="string")return r;var o;if(Xo(t)){if(n==null)return r;var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return Aa(o)&&(o=r),i&&n!=null&&o>n&&(o=n),o},ND=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1};function mn(e,t,n){return Xe(e)&&Xe(t)?e+n*(t-e):t}function RD(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):$u(r,t))===n)}var yn=e=>e===null||typeof e>"u",am=e=>yn(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Tte(e){return e!=null}function Xu(){}var Ote=["type","size","sizeType"];function w_(){return w_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w_.apply(null,arguments)}function uj(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 cj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uj(Object(n),!0).forEach(function(r){jte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jte(e,t,n){return(t=Mte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mte(e){var t=Pte(e,"string");return typeof t=="symbol"?t:t+""}function Pte(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lte(e,t){if(e==null)return{};var n,r,i=Nte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Nte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var DD={symbolCircle:gS,symbolCross:Wee,symbolDiamond:Zee,symbolSquare:Xee,symbolStar:tte,symbolTriangle:nte,symbolWye:ite},Rte=Math.PI/180,Dte=e=>{var t="symbol".concat(am(e));return DD[t]||gS},kte=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*Rte;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Ite=(e,t)=>{DD["symbol".concat(am(e))]=t},kD=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=Lte(e,Ote),o=cj(cj({},i),{},{type:t,size:n,sizeType:r}),l="circle";typeof t=="string"&&(l=t);var c=()=>{var x=Dte(l),b=ate().type(x).size(kte(n,r,l)),C=b();if(C!==null)return C},{className:f,cx:h,cy:m}=o,y=zr(o);return Xe(h)&&Xe(m)&&Xe(n)?_.createElement("path",w_({},y,{className:Oe("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(m,")"),d:c()})):null};kD.registerSymbol=Ite;var ID=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,xS=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(_.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{hS(i)&&(r[i]=o=>n[i](n,o))}),r},zte=(e,t,n)=>r=>(e(t,n,r),null),ky=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];hS(i)&&typeof o=="function"&&(r||(r={}),r[i]=zte(o,t,n))}),r};function fj(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 Ute(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fj(Object(n),!0).forEach(function(r){Bte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bte(e,t,n){return(t=Fte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fte(e){var t=$te(e,"string");return typeof t=="symbol"?t:t+""}function $te(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sr(e,t){var n=Ute({},e),r=t,i=Object.keys(t),o=i.reduce((l,c)=>(l[c]===void 0&&r[c]!==void 0&&(l[c]=r[c]),l),n);return o}var ix={},ax={},dj;function Vte(){return dj||(dj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let o=0;o<n.length;o++){const l=n[o],c=r(l);i.has(c)||i.set(c,l)}return Array.from(i.values())}e.uniqBy=t}(ax)),ax}var ox={},hj;function zD(){return hj||(hj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t}(ox)),ox}var sx={},lx={},ux={},mj;function Hte(){return mj||(mj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t}(ux)),ux}var pj;function _S(){return pj||(pj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Hte();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n}(lx)),lx}var cx={},gj;function qte(){return gj||(gj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t}(cx)),cx}var vj;function Gte(){return vj||(vj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_S(),n=qte();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r}(sx)),sx}var fx={},dx={},yj;function Yte(){return yj||(yj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bS();function n(r){return function(i){return t.get(i,r)}}e.property=n}(dx)),dx}var hx={},mx={},px={},gx={},bj;function UD(){return bj||(bj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t}(gx)),gx}var vx={},xj;function BD(){return xj||(xj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t}(vx)),vx}var yx={},_j;function FD(){return _j||(_j=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.eq=t}(yx)),yx}var wj;function Wte(){return wj||(wj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=UD(),n=BD(),r=FD();function i(m,y,x){return typeof x!="function"?i(m,y,()=>{}):o(m,y,function b(C,w,A,O,P,N){const F=x(C,w,A,O,P,N);return F!==void 0?!!F:o(C,w,b,N)},new Map)}function o(m,y,x,b){if(y===m)return!0;switch(typeof y){case"object":return l(m,y,x,b);case"function":return Object.keys(y).length>0?o(m,{...y},x,b):r.eq(m,y);default:return t.isObject(m)?typeof y=="string"?y==="":!0:r.eq(m,y)}}function l(m,y,x,b){if(y==null)return!0;if(Array.isArray(y))return f(m,y,x,b);if(y instanceof Map)return c(m,y,x,b);if(y instanceof Set)return h(m,y,x,b);const C=Object.keys(y);if(m==null)return C.length===0;if(C.length===0)return!0;if(b?.has(y))return b.get(y)===m;b?.set(y,m);try{for(let w=0;w<C.length;w++){const A=C[w];if(!n.isPrimitive(m)&&!(A in m)||y[A]===void 0&&m[A]!==void 0||y[A]===null&&m[A]!==null||!x(m[A],y[A],A,m,y,b))return!1}return!0}finally{b?.delete(y)}}function c(m,y,x,b){if(y.size===0)return!0;if(!(m instanceof Map))return!1;for(const[C,w]of y.entries()){const A=m.get(C);if(x(A,w,C,m,y,b)===!1)return!1}return!0}function f(m,y,x,b){if(y.length===0)return!0;if(!Array.isArray(m))return!1;const C=new Set;for(let w=0;w<y.length;w++){const A=y[w];let O=!1;for(let P=0;P<m.length;P++){if(C.has(P))continue;const N=m[P];let F=!1;if(x(N,A,w,m,y,b)&&(F=!0),F){C.add(P),O=!0;break}}if(!O)return!1}return!0}function h(m,y,x,b){return y.size===0?!0:m instanceof Set?f([...m],[...y],x,b):!1}e.isMatchWith=i,e.isSetMatch=h}(px)),px}var Sj;function $D(){return Sj||(Sj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wte();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n}(mx)),mx}var bx={},xx={},_x={},Cj;function Kte(){return Cj||(Cj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t}(_x)),_x}var wx={},Ej;function VD(){return Ej||(Ej=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t}(wx)),wx}var Sx={},Aj;function HD(){return Aj||(Aj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",o="[object Arguments]",l="[object Symbol]",c="[object Date]",f="[object Map]",h="[object Set]",m="[object Array]",y="[object Function]",x="[object ArrayBuffer]",b="[object Object]",C="[object Error]",w="[object DataView]",A="[object Uint8Array]",O="[object Uint8ClampedArray]",P="[object Uint16Array]",N="[object Uint32Array]",F="[object BigUint64Array]",U="[object Int8Array]",W="[object Int16Array]",X="[object Int32Array]",ae="[object BigInt64Array]",ce="[object Float32Array]",re="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=x,e.arrayTag=m,e.bigInt64ArrayTag=ae,e.bigUint64ArrayTag=F,e.booleanTag=i,e.dataViewTag=w,e.dateTag=c,e.errorTag=C,e.float32ArrayTag=ce,e.float64ArrayTag=re,e.functionTag=y,e.int16ArrayTag=W,e.int32ArrayTag=X,e.int8ArrayTag=U,e.mapTag=f,e.numberTag=r,e.objectTag=b,e.regexpTag=t,e.setTag=h,e.stringTag=n,e.symbolTag=l,e.uint16ArrayTag=P,e.uint32ArrayTag=N,e.uint8ArrayTag=A,e.uint8ClampedArrayTag=O}(Sx)),Sx}var Cx={},Tj;function Zte(){return Tj||(Tj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t}(Cx)),Cx}var Oj;function qD(){return Oj||(Oj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Kte(),n=VD(),r=HD(),i=BD(),o=Zte();function l(m,y){return c(m,void 0,m,new Map,y)}function c(m,y,x,b=new Map,C=void 0){const w=C?.(m,y,x,b);if(w!==void 0)return w;if(i.isPrimitive(m))return m;if(b.has(m))return b.get(m);if(Array.isArray(m)){const A=new Array(m.length);b.set(m,A);for(let O=0;O<m.length;O++)A[O]=c(m[O],O,x,b,C);return Object.hasOwn(m,"index")&&(A.index=m.index),Object.hasOwn(m,"input")&&(A.input=m.input),A}if(m instanceof Date)return new Date(m.getTime());if(m instanceof RegExp){const A=new RegExp(m.source,m.flags);return A.lastIndex=m.lastIndex,A}if(m instanceof Map){const A=new Map;b.set(m,A);for(const[O,P]of m)A.set(O,c(P,O,x,b,C));return A}if(m instanceof Set){const A=new Set;b.set(m,A);for(const O of m)A.add(c(O,void 0,x,b,C));return A}if(typeof Buffer<"u"&&Buffer.isBuffer(m))return m.subarray();if(o.isTypedArray(m)){const A=new(Object.getPrototypeOf(m)).constructor(m.length);b.set(m,A);for(let O=0;O<m.length;O++)A[O]=c(m[O],O,x,b,C);return A}if(m instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&m instanceof SharedArrayBuffer)return m.slice(0);if(m instanceof DataView){const A=new DataView(m.buffer.slice(0),m.byteOffset,m.byteLength);return b.set(m,A),f(A,m,x,b,C),A}if(typeof File<"u"&&m instanceof File){const A=new File([m],m.name,{type:m.type});return b.set(m,A),f(A,m,x,b,C),A}if(typeof Blob<"u"&&m instanceof Blob){const A=new Blob([m],{type:m.type});return b.set(m,A),f(A,m,x,b,C),A}if(m instanceof Error){const A=new m.constructor;return b.set(m,A),A.message=m.message,A.name=m.name,A.stack=m.stack,A.cause=m.cause,f(A,m,x,b,C),A}if(m instanceof Boolean){const A=new Boolean(m.valueOf());return b.set(m,A),f(A,m,x,b,C),A}if(m instanceof Number){const A=new Number(m.valueOf());return b.set(m,A),f(A,m,x,b,C),A}if(m instanceof String){const A=new String(m.valueOf());return b.set(m,A),f(A,m,x,b,C),A}if(typeof m=="object"&&h(m)){const A=Object.create(Object.getPrototypeOf(m));return b.set(m,A),f(A,m,x,b,C),A}return m}function f(m,y,x=m,b,C){const w=[...Object.keys(y),...t.getSymbols(y)];for(let A=0;A<w.length;A++){const O=w[A],P=Object.getOwnPropertyDescriptor(m,O);(P==null||P.writable)&&(m[O]=c(y[O],O,x,b,C))}}function h(m){switch(n.getTag(m)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=l,e.cloneDeepWithImpl=c,e.copyProperties=f}(xx)),xx}var jj;function Xte(){return jj||(jj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qD();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n}(bx)),bx}var Mj;function Qte(){return Mj||(Mj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$D(),n=Xte();function r(i){return i=n.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=r}(hx)),hx}var Ex={},Ax={},Tx={},Pj;function Jte(){return Pj||(Pj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qD(),n=HD();function r(i,o){return t.cloneDeepWith(i,(l,c,f,h)=>{const m=o?.(l,c,f,h);if(m!==void 0)return m;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case n.numberTag:case n.stringTag:case n.booleanTag:{const y=new i.constructor(i?.valueOf());return t.copyProperties(y,i),y}case n.argumentsTag:{const y={};return t.copyProperties(y,i),y.length=i.length,y[Symbol.iterator]=i[Symbol.iterator],y}default:return}})}e.cloneDeepWith=r}(Tx)),Tx}var Lj;function ene(){return Lj||(Lj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Jte();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n}(Ax)),Ax}var Ox={},jx={},Nj;function GD(){return Nj||(Nj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n}(jx)),jx}var Mx={},Rj;function tne(){return Rj||(Rj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VD();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n}(Mx)),Mx}var Dj;function nne(){return Dj||(Dj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LD(),n=GD(),r=tne(),i=yS();function o(l,c){let f;if(Array.isArray(c)?f=c:typeof c=="string"&&t.isDeepKey(c)&&l?.[c]==null?f=i.toPath(c):f=[c],f.length===0)return!1;let h=l;for(let m=0;m<f.length;m++){const y=f[m];if((h==null||!Object.hasOwn(h,y))&&!((Array.isArray(h)||r.isArguments(h))&&n.isIndex(y)&&y<h.length))return!1;h=h[y]}return!0}e.has=o}(Ox)),Ox}var kj;function rne(){return kj||(kj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$D(),n=vS(),r=ene(),i=bS(),o=nne();function l(c,f){switch(typeof c){case"object":{Object.is(c?.valueOf(),-0)&&(c="-0");break}case"number":{c=n.toKey(c);break}}return f=r.cloneDeep(f),function(h){const m=i.get(h,c);return m===void 0?o.has(h,c):f===void 0?m===void 0:t.isMatch(m,f)}}e.matchesProperty=l}(Ex)),Ex}var Ij;function ine(){return Ij||(Ij=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zD(),n=Yte(),r=Qte(),i=rne();function o(l){if(l==null)return t.identity;switch(typeof l){case"function":return l;case"object":return Array.isArray(l)&&l.length===2?i.matchesProperty(l[0],l[1]):r.matches(l);case"string":case"symbol":case"number":return n.property(l)}}e.iteratee=o}(fx)),fx}var zj;function ane(){return zj||(zj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vte(),n=zD(),r=Gte(),i=ine();function o(l,c=n.identity){return r.isArrayLikeObject(l)?t.uniqBy(Array.from(l),i.iteratee(c)):[]}e.uniqBy=o}(ix)),ix}var Px,Uj;function one(){return Uj||(Uj=1,Px=ane().uniqBy),Px}var sne=one();const Bj=aa(sne);function lne(e,t,n){return t===!0?Bj(e,n):typeof t=="function"?Bj(e,t):e}var Lx={exports:{}},Nx={},Rx={exports:{}},Dx={};var Fj;function une(){if(Fj)return Dx;Fj=1;var e=_f();function t(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function c(y,x){var b=x(),C=r({inst:{value:b,getSnapshot:x}}),w=C[0].inst,A=C[1];return o(function(){w.value=b,w.getSnapshot=x,f(w)&&A({inst:w})},[y,b,x]),i(function(){return f(w)&&A({inst:w}),y(function(){f(w)&&A({inst:w})})},[y]),l(b),b}function f(y){var x=y.getSnapshot;y=y.value;try{var b=x();return!n(y,b)}catch{return!0}}function h(y,x){return x()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return Dx.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Dx}var $j;function cne(){return $j||($j=1,Rx.exports=une()),Rx.exports}var Vj;function fne(){if(Vj)return Nx;Vj=1;var e=_f(),t=cne();function n(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,c=e.useMemo,f=e.useDebugValue;return Nx.useSyncExternalStoreWithSelector=function(h,m,y,x,b){var C=o(null);if(C.current===null){var w={hasValue:!1,value:null};C.current=w}else w=C.current;C=c(function(){function O(W){if(!P){if(P=!0,N=W,W=x(W),b!==void 0&&w.hasValue){var X=w.value;if(b(X,W))return F=X}return F=W}if(X=F,r(N,W))return X;var ae=x(W);return b!==void 0&&b(X,ae)?(N=W,X):(N=W,F=ae)}var P=!1,N,F,U=y===void 0?null:y;return[function(){return O(m())},U===null?void 0:function(){return O(U())}]},[m,y,x,b]);var A=i(h,C[0],C[1]);return l(function(){w.hasValue=!0,w.value=A},[A]),f(A),A},Nx}var Hj;function dne(){return Hj||(Hj=1,Lx.exports=fne()),Lx.exports}var hne=dne(),wS=_.createContext(null),mne=e=>e,cn=()=>{var e=_.useContext(wS);return e?e.store.dispatch:mne},Ig=()=>{},pne=()=>Ig,gne=(e,t)=>e===t;function Ze(e){var t=_.useContext(wS);return hne.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:pne,t?t.store.getState:Ig,t?t.store.getState:Ig,t?e:Ig,gne)}var kx={},Ix={},zx={},qj;function vne(){return qj||(qj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,o)=>{if(r!==i){const l=t(r),c=t(i);if(l===c&&l===0){if(r<i)return o==="desc"?1:-1;if(r>i)return o==="desc"?-1:1}return o==="desc"?c-l:l-c}return 0};e.compareValues=n}(zx)),zx}var Ux={},Bx={},Gj;function YD(){return Gj||(Gj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t}(Bx)),Bx}var Yj;function yne(){return Yj||(Yj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YD(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,l){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||t.isSymbol(o)?!0:typeof o=="string"&&(r.test(o)||!n.test(o))||l!=null&&Object.hasOwn(l,o)}e.isKey=i}(Ux)),Ux}var Wj;function bne(){return Wj||(Wj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vne(),n=yne(),r=yS();function i(o,l,c,f){if(o==null)return[];c=f?void 0:c,Array.isArray(o)||(o=Object.values(o)),Array.isArray(l)||(l=l==null?[null]:[l]),l.length===0&&(l=[null]),Array.isArray(c)||(c=c==null?[]:[c]),c=c.map(b=>String(b));const h=(b,C)=>{let w=b;for(let A=0;A<C.length&&w!=null;++A)w=w[C[A]];return w},m=(b,C)=>C==null||b==null?C:typeof b=="object"&&"key"in b?Object.hasOwn(C,b.key)?C[b.key]:h(C,b.path):typeof b=="function"?b(C):Array.isArray(b)?h(C,b):typeof C=="object"?C[b]:C,y=l.map(b=>(Array.isArray(b)&&b.length===1&&(b=b[0]),b==null||typeof b=="function"||Array.isArray(b)||n.isKey(b)?b:{key:b,path:r.toPath(b)}));return o.map(b=>({original:b,criteria:y.map(C=>m(C,b))})).slice().sort((b,C)=>{for(let w=0;w<y.length;w++){const A=t.compareValues(b.criteria[w],C.criteria[w],c[w]);if(A!==0)return A}return 0}).map(b=>b.original)}e.orderBy=i}(Ix)),Ix}var Fx={},Kj;function xne(){return Kj||(Kj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],o=Math.floor(r),l=(c,f)=>{for(let h=0;h<c.length;h++){const m=c[h];Array.isArray(m)&&f<o?l(m,f+1):i.push(m)}};return l(n,0),i}e.flatten=t}(Fx)),Fx}var $x={},Zj;function WD(){return Zj||(Zj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=GD(),n=_S(),r=UD(),i=FD();function o(l,c,f){return r.isObject(f)&&(typeof c=="number"&&n.isArrayLike(f)&&t.isIndex(c)&&c<f.length||typeof c=="string"&&c in f)?i.eq(f[c],l):!1}e.isIterateeCall=o}($x)),$x}var Xj;function _ne(){return Xj||(Xj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bne(),n=xne(),r=WD();function i(o,...l){const c=l.length;return c>1&&r.isIterateeCall(o,l[0],l[1])?l=[]:c>2&&r.isIterateeCall(l[0],l[1],l[2])&&(l=[l[0]]),t.orderBy(o,n.flatten(l),["asc"])}e.sortBy=i}(kx)),kx}var Vx,Qj;function wne(){return Qj||(Qj=1,Vx=_ne().sortBy),Vx}var Sne=wne();const Iy=aa(Sne);var KD=e=>e.legend.settings,Cne=e=>e.legend.size,Ene=e=>e.legend.payload;Ce([Ene,KD],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Iy(r,n):r});var sg=1;function Ane(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=_.useState({height:0,left:0,top:0,width:0}),r=_.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),l={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(l.height-t.height)>sg||Math.abs(l.left-t.left)>sg||Math.abs(l.top-t.top)>sg||Math.abs(l.width-t.width)>sg)&&n({height:l.height,left:l.left,top:l.top,width:l.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}var Tne={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},ZD=jt({name:"chartLayout",initialState:Tne,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,o;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:One,setLayout:jne,setChartSize:Mne,setScale:Pne}=ZD.actions,Lne=ZD.reducer;function XD(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Jj(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 Qc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jj(Object(n),!0).forEach(function(r){Nne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nne(e,t,n){return(t=Rne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rne(e){var t=Dne(e,"string");return typeof t=="symbol"?t:t+""}function Dne(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nn(e,t,n){return yn(e)||yn(t)?n:ci(t)?$u(e,t,n):typeof t=="function"?t(e):n}var kne=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:o,verticalAlign:l,layout:c}=t;if((c==="vertical"||c==="horizontal"&&l==="middle")&&o!=="center"&&Xe(e[o]))return Qc(Qc({},e),{},{[o]:e[o]+(r||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&l!=="middle"&&Xe(e[l]))return Qc(Qc({},e),{},{[l]:e[l]+(i||0)})}return e},Ol=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",QD=(e,t,n,r)=>{if(r)return e.map(c=>c.coordinate);var i,o,l=e.map(c=>(c.coordinate===t&&(i=!0),c.coordinate===n&&(o=!0),c.coordinate));return i||l.push(t),o||l.push(n),l},JD=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:o,scale:l,realScaleType:c,isCategorical:f,categoricalDomain:h,tickCount:m,ticks:y,niceTicks:x,axisType:b}=e;if(!l)return null;var C=c==="scaleBand"&&l.bandwidth?l.bandwidth()/2:2,w=i==="category"&&l.bandwidth?l.bandwidth()/C:0;if(w=b==="angleAxis"&&o&&o.length>=2?yr(o[0]-o[1])*2*w:w,y||x){var A=(y||x||[]).map((O,P)=>{var N=r?r.indexOf(O):O;return{coordinate:l(N)+w,value:O,offset:w,index:P}});return A.filter(O=>!Aa(O.coordinate))}return f&&h?h.map((O,P)=>({coordinate:l(O)+w,value:O,index:P,offset:w})):l.ticks&&m!=null?l.ticks(m).map((O,P)=>({coordinate:l(O)+w,value:O,offset:w,index:P})):l.domain().map((O,P)=>({coordinate:l(O)+w,value:r?r[O]:O,index:P,offset:w}))},eM=1e-4,Ine=e=>{var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-eM,o=Math.max(r[0],r[1])+eM,l=e(t[0]),c=e(t[n-1]);(l<i||l>o||c<i||c>o)&&e.domain([t[0],t[n-1]])}},zne=(e,t)=>{if(!t||t.length!==2||!Xe(t[0])||!Xe(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Xe(e[0])||e[0]<n)&&(i[0]=n),(!Xe(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},Une=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0,l=0;l<t;++l){var c=Aa(e[l][n][1])?e[l][n][0]:e[l][n][1];c>=0?(e[l][n][0]=i,e[l][n][1]=i+c,i=e[l][n][1]):(e[l][n][0]=o,e[l][n][1]=o+c,o=e[l][n][1])}},Bne=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0;o<t;++o){var l=Aa(e[o][n][1])?e[o][n][0]:e[o][n][1];l>=0?(e[o][n][0]=i,e[o][n][1]=i+l,i=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}},Fne={sign:Une,expand:bte,none:hf,silhouette:xte,wiggle:_te,positive:Bne},$ne=(e,t,n)=>{var r=Fne[n],i=yte().keys(t).value((o,l)=>Number(nn(o,l,0))).order(__).offset(r);return i(e)};function Vne(e){return e==null?void 0:String(e)}function tM(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:o,dataKey:l}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!yn(i[t.dataKey])){var c=RD(n,"value",i[t.dataKey]);if(c)return c.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var f=nn(i,yn(l)?t.dataKey:l);return yn(f)?null:t.scale(f)}var nM=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:o,index:l}=e;if(t.type==="category")return n[l]?n[l].coordinate+r:null;var c=nn(o,t.dataKey,t.scale.domain()[l]);return yn(c)?null:t.scale(c)-i/2+r},Hne=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},qne=e=>{var t=e.flat(2).filter(Xe);return[Math.min(...t),Math.max(...t)]},Gne=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Yne=(e,t,n)=>{if(e!=null)return Gne(Object.keys(e).reduce((r,i)=>{var o=e[i],{stackedData:l}=o,c=l.reduce((f,h)=>{var m=XD(h,t,n),y=qne(m);return[Math.min(f[0],y[0]),Math.max(f[1],y[1])]},[1/0,-1/0]);return[Math.min(c[0],r[0]),Math.max(c[1],r[1])]},[1/0,-1/0]))},rM=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,iM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,mf=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=Iy(t,m=>m.coordinate),o=1/0,l=1,c=i.length;l<c;l++){var f=i[l],h=i[l-1];o=Math.min((f.coordinate||0)-(h.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0};function aM(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:o}=e;return Qc(Qc({},t),{},{dataKey:n,payload:r,value:i,name:o})}function Lf(e,t){if(e)return String(e);if(typeof t=="string")return t}var Wne=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},Kne=(e,t)=>t==="centric"?e.angle:e.radius,ls=e=>e.layout.width,us=e=>e.layout.height,Zne=e=>e.layout.scale,ek=e=>e.layout.margin,zy=Ce(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Uy=Ce(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),tk="data-recharts-item-index",nk="data-recharts-item-data-key",om=60;function oM(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 lg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oM(Object(n),!0).forEach(function(r){Xne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xne(e,t,n){return(t=Qne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qne(e){var t=Jne(e,"string");return typeof t=="symbol"?t:t+""}function Jne(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ere=e=>e.brush.height;function tre(e){var t=Uy(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:om;return n+i}return n},0)}function nre(e){var t=Uy(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:om;return n+i}return n},0)}function rre(e){var t=zy(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function ire(e){var t=zy(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var lr=Ce([ls,us,ek,ere,tre,nre,rre,ire,KD,Cne],(e,t,n,r,i,o,l,c,f,h)=>{var m={left:(n.left||0)+i,right:(n.right||0)+o},y={top:(n.top||0)+l,bottom:(n.bottom||0)+c},x=lg(lg({},y),m),b=x.bottom;x.bottom+=r,x=kne(x,f,h);var C=e-x.left-x.right,w=t-x.top-x.bottom;return lg(lg({brushBottom:b},x),{},{width:Math.max(C,0),height:Math.max(w,0)})}),are=Ce(lr,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),SS=Ce(ls,us,(e,t)=>({x:0,y:0,width:e,height:t})),ore=_.createContext(null),jr=()=>_.useContext(ore)!=null,By=e=>e.brush,Fy=Ce([By,lr,ek],(e,t,n)=>({height:e.height,x:Xe(e.x)?e.x:t.left,y:Xe(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:Xe(e.width)?e.width:t.width})),Hx={},qx={},Gx={},sM;function sre(){return sM||(sM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let l,c=null;const f=o!=null&&o.includes("leading"),h=o==null||o.includes("trailing"),m=()=>{c!==null&&(n.apply(l,c),l=void 0,c=null)},y=()=>{h&&m(),w()};let x=null;const b=()=>{x!=null&&clearTimeout(x),x=setTimeout(()=>{x=null,y()},r)},C=()=>{x!==null&&(clearTimeout(x),x=null)},w=()=>{C(),l=void 0,c=null},A=()=>{m()},O=function(...P){if(i?.aborted)return;l=this,c=P;const N=x==null;b(),f&&N&&m()};return O.schedule=b,O.cancel=w,O.flush=A,i?.addEventListener("abort",w,{once:!0}),O}e.debounce=t}(Gx)),Gx}var lM;function lre(){return lM||(lM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=sre();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:l=!1,trailing:c=!0,maxWait:f}=o,h=Array(2);l&&(h[0]="leading"),c&&(h[1]="trailing");let m,y=null;const x=t.debounce(function(...w){m=r.apply(this,w),y=null},i,{edges:h}),b=function(...w){return f!=null&&(y===null&&(y=Date.now()),Date.now()-y>=f)?(m=r.apply(this,w),y=Date.now(),x.cancel(),x.schedule(),m):(x.apply(this,w),m)},C=()=>(x.flush(),m);return b.cancel=x.cancel,b.flush=C,b}e.debounce=n}(qx)),qx}var uM;function ure(){return uM||(uM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lre();function n(r,i=0,o={}){const{leading:l=!0,trailing:c=!0}=o;return t.debounce(r,i,{leading:l,maxWait:i,trailing:c})}e.throttle=n}(Hx)),Hx}var Yx,cM;function cre(){return cM||(cM=1,Yx=ure().throttle),Yx}var fre=cre();const dre=aa(fre);var bv=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o]},rk=(e,t,n)=>{var{width:r="100%",height:i="100%",aspect:o,maxHeight:l}=n,c=Xo(r)?e:Number(r),f=Xo(i)?t:Number(i);return o&&o>0&&(c?f=c/o:f&&(c=f*o),l&&f!=null&&f>l&&(f=l)),{calculatedWidth:c,calculatedHeight:f}},hre={width:0,height:0,overflow:"visible"},mre={width:0,overflowX:"visible"},pre={height:0,overflowY:"visible"},gre={},vre=e=>{var{width:t,height:n}=e,r=Xo(t),i=Xo(n);return r&&i?hre:r?mre:i?pre:gre};function yre(e){var{width:t,height:n,aspect:r}=e,i=t,o=n;return i===void 0&&o===void 0?(i="100%",o="100%"):i===void 0?i=r&&r>0?void 0:"100%":o===void 0&&(o=r&&r>0?void 0:"100%"),{width:i,height:o}}function Bn(e){return Number.isFinite(e)}function ao(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function S_(){return S_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S_.apply(null,arguments)}function fM(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 dM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fM(Object(n),!0).forEach(function(r){bre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bre(e,t,n){return(t=xre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xre(e){var t=_re(e,"string");return typeof t=="symbol"?t:t+""}function _re(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ik=_.createContext({width:-1,height:-1});function wre(e){return ao(e.width)&&ao(e.height)}function ak(e){var{children:t,width:n,height:r}=e,i=_.useMemo(()=>({width:n,height:r}),[n,r]);return wre(i)?_.createElement(ik.Provider,{value:i},t):null}var CS=()=>_.useContext(ik),Sre=_.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i,height:o,minWidth:l=0,minHeight:c,maxHeight:f,children:h,debounce:m=0,id:y,className:x,onResize:b,style:C={}}=e,w=_.useRef(null),A=_.useRef();A.current=b,_.useImperativeHandle(t,()=>w.current);var[O,P]=_.useState({containerWidth:r.width,containerHeight:r.height}),N=_.useCallback((ae,ce)=>{P(re=>{var J=Math.round(ae),oe=Math.round(ce);return re.containerWidth===J&&re.containerHeight===oe?re:{containerWidth:J,containerHeight:oe}})},[]);_.useEffect(()=>{if(w.current==null||typeof ResizeObserver>"u")return Xu;var ae=oe=>{var _e,{width:se,height:ue}=oe[0].contentRect;N(se,ue),(_e=A.current)===null||_e===void 0||_e.call(A,se,ue)};m>0&&(ae=dre(ae,m,{trailing:!0,leading:!1}));var ce=new ResizeObserver(ae),{width:re,height:J}=w.current.getBoundingClientRect();return N(re,J),ce.observe(w.current),()=>{ce.disconnect()}},[N,m]);var{containerWidth:F,containerHeight:U}=O;bv(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:W,calculatedHeight:X}=rk(F,U,{width:i,height:o,aspect:n,maxHeight:f});return bv(W!=null&&W>0||X!=null&&X>0,`The width(%s) and height(%s) of chart should be greater than 0,
please check the style of container, or the props width(%s) and height(%s),
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
height and width.`,W,X,i,o,l,c,n),_.createElement("div",{id:y?"".concat(y):void 0,className:Oe("recharts-responsive-container",x),style:dM(dM({},C),{},{width:i,height:o,minWidth:l,minHeight:c,maxHeight:f}),ref:w},_.createElement("div",{style:vre({width:i,height:o})},_.createElement(ak,{width:W,height:X},h)))}),Cre=_.forwardRef((e,t)=>{var n=CS();if(ao(n.width)&&ao(n.height))return e.children;var{width:r,height:i}=yre({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:l}=rk(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Xe(o)&&Xe(l)?_.createElement(ak,{width:o,height:l},e.children):_.createElement(Sre,S_({},e,{width:r,height:i,ref:t}))});function ok(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var $y=()=>{var e,t=jr(),n=Ze(are),r=Ze(Fy),i=(e=Ze(By))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},Ere={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},sk=()=>{var e;return(e=Ze(lr))!==null&&e!==void 0?e:Ere},lk=()=>Ze(ls),uk=()=>Ze(us),Mt=e=>e.layout.layoutType,sm=()=>Ze(Mt),Are=()=>{var e=sm();return e!==void 0},Vy=e=>{var t=cn(),n=jr(),{width:r,height:i}=e,o=CS(),l=r,c=i;return o&&(l=o.width>0?o.width:r,c=o.height>0?o.height:i),_.useEffect(()=>{!n&&ao(l)&&ao(c)&&t(Mne({width:l,height:c}))},[t,n,l,c]),null},Tre={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},ck=jt({name:"legend",initialState:Tre,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:ir()},removeLegendPayload:{reducer(e,t){var n=Vo(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:ir()}}}),{setLegendSize:rwe,setLegendSettings:iwe,addLegendPayload:fk,removeLegendPayload:dk}=ck.actions,Ore=ck.reducer;function C_(){return C_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C_.apply(null,arguments)}function hM(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 Wx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hM(Object(n),!0).forEach(function(r){jre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jre(e,t,n){return(t=Mre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mre(e){var t=Pre(e,"string");return typeof t=="symbol"?t:t+""}function Pre(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lre(e){return Array.isArray(e)&&ci(e[0])&&ci(e[1])?e.join(" ~ "):e}var Nre=e=>{var{separator:t=" : ",contentStyle:n={},itemStyle:r={},labelStyle:i={},payload:o,formatter:l,itemSorter:c,wrapperClassName:f,labelClassName:h,label:m,labelFormatter:y,accessibilityLayer:x=!1}=e,b=()=>{if(o&&o.length){var U={padding:0,margin:0},W=(c?Iy(o,c):o).map((X,ae)=>{if(X.type==="none")return null;var ce=X.formatter||l||Lre,{value:re,name:J}=X,oe=re,_e=J;if(ce){var se=ce(re,J,X,ae,o);if(Array.isArray(se))[oe,_e]=se;else if(se!=null)oe=se;else return null}var ue=Wx({display:"block",paddingTop:4,paddingBottom:4,color:X.color||"#000"},r);return _.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(ae),style:ue},ci(_e)?_.createElement("span",{className:"recharts-tooltip-item-name"},_e):null,ci(_e)?_.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,_.createElement("span",{className:"recharts-tooltip-item-value"},oe),_.createElement("span",{className:"recharts-tooltip-item-unit"},X.unit||""))});return _.createElement("ul",{className:"recharts-tooltip-item-list",style:U},W)}return null},C=Wx({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),w=Wx({margin:0},i),A=!yn(m),O=A?m:"",P=Oe("recharts-default-tooltip",f),N=Oe("recharts-tooltip-label",h);A&&y&&o!==void 0&&o!==null&&(O=y(m,o));var F=x?{role:"status","aria-live":"assertive"}:{};return _.createElement("div",C_({className:P,style:C},F),_.createElement("p",{className:N,style:w},_.isValidElement(O)?O:"".concat(O)),b())},Jd="recharts-tooltip-wrapper",Rre={visibility:"hidden"};function Dre(e){var{coordinate:t,translateX:n,translateY:r}=e;return Oe(Jd,{["".concat(Jd,"-right")]:Xe(n)&&t&&Xe(t.x)&&n>=t.x,["".concat(Jd,"-left")]:Xe(n)&&t&&Xe(t.x)&&n<t.x,["".concat(Jd,"-bottom")]:Xe(r)&&t&&Xe(t.y)&&r>=t.y,["".concat(Jd,"-top")]:Xe(r)&&t&&Xe(t.y)&&r<t.y})}function mM(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offsetTopLeft:i,position:o,reverseDirection:l,tooltipDimension:c,viewBox:f,viewBoxDimension:h}=e;if(o&&Xe(o[r]))return o[r];var m=n[r]-c-(i>0?i:0),y=n[r]+i;if(t[r])return l[r]?m:y;var x=f[r];if(x==null)return 0;if(l[r]){var b=m,C=x;return b<C?Math.max(y,x):Math.max(m,x)}if(h==null)return 0;var w=y+c,A=x+h;return w>A?Math.max(m,x):Math.max(y,x)}function kre(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Ire(e){var{allowEscapeViewBox:t,coordinate:n,offsetTopLeft:r,position:i,reverseDirection:o,tooltipBox:l,useTranslate3d:c,viewBox:f}=e,h,m,y;return l.height>0&&l.width>0&&n?(m=mM({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),y=mM({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),h=kre({translateX:m,translateY:y,useTranslate3d:c})):h=Rre,{cssProperties:h,cssClasses:Dre({translateX:m,translateY:y,coordinate:n})}}function pM(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 ug(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pM(Object(n),!0).forEach(function(r){E_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function E_(e,t,n){return(t=zre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zre(e){var t=Ure(e,"string");return typeof t=="symbol"?t:t+""}function Ure(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Bre extends _.PureComponent{constructor(){super(...arguments),E_(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),E_(this,"handleKeyDown",t=>{if(t.key==="Escape"){var n,r,i,o;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(i=(o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,n;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:o,coordinate:l,hasPayload:c,isAnimationActive:f,offset:h,position:m,reverseDirection:y,useTranslate3d:x,viewBox:b,wrapperStyle:C,lastBoundingBox:w,innerRef:A,hasPortalFromProps:O}=this.props,{cssClasses:P,cssProperties:N}=Ire({allowEscapeViewBox:n,coordinate:l,offsetTopLeft:h,position:m,reverseDirection:y,tooltipBox:{height:w.height,width:w.width},useTranslate3d:x,viewBox:b}),F=O?{}:ug(ug({transition:f&&t?"transform ".concat(r,"ms ").concat(i):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&c?"visible":"hidden",position:"absolute",top:0,left:0}),U=ug(ug({},F),{},{visibility:!this.state.dismissed&&t&&c?"visible":"hidden"},C);return _.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:P,style:U,ref:A},o)}}var Fre=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),jl={devToolsEnabled:!1,isSsr:Fre()},hk=()=>{var e;return(e=Ze(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function A_(){return A_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A_.apply(null,arguments)}function gM(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 vM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gM(Object(n),!0).forEach(function(r){$re(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $re(e,t,n){return(t=Vre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vre(e){var t=Hre(e,"string");return typeof t=="symbol"?t:t+""}function Hre(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yM={curveBasisClosed:ste,curveBasisOpen:lte,curveBasis:ote,curveBumpX:Gee,curveBumpY:Yee,curveLinearClosed:ute,curveLinear:Ry,curveMonotoneX:cte,curveMonotoneY:fte,curveNatural:dte,curveStep:hte,curveStepAfter:pte,curveStepBefore:mte},xv=e=>Bn(e.x)&&Bn(e.y),bM=e=>e.base!=null&&xv(e.base)&&xv(e),eh=e=>e.x,th=e=>e.y,qre=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(am(e));return(n==="curveMonotone"||n==="curveBump")&&t?yM["".concat(n).concat(t==="vertical"?"Y":"X")]:yM[n]||Ry},Gre=e=>{var{type:t="linear",points:n=[],baseLine:r,layout:i,connectNulls:o=!1}=e,l=qre(t,i),c=o?n.filter(xv):n,f;if(Array.isArray(r)){var h=n.map((b,C)=>vM(vM({},b),{},{base:r[C]}));i==="vertical"?f=og().y(th).x1(eh).x0(b=>b.base.x):f=og().x(eh).y1(th).y0(b=>b.base.y);var m=f.defined(bM).curve(l),y=o?h.filter(bM):h;return m(y)}i==="vertical"&&Xe(r)?f=og().y(th).x1(eh).x0(r):Xe(r)?f=og().x(eh).y1(th).y0(r):f=_D().x(eh).y(th);var x=f.defined(xv).curve(l);return x(c)},ES=e=>{var{className:t,points:n,path:r,pathRef:i}=e;if((!n||!n.length)&&!r)return null;var o=n&&n.length?Gre(e):r;return _.createElement("path",A_({},Di(e),xS(e),{className:Oe("recharts-curve",t),d:o===null?void 0:o,ref:i}))},Yre=["x","y","top","left","width","height","className"];function T_(){return T_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T_.apply(null,arguments)}function xM(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 Wre(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xM(Object(n),!0).forEach(function(r){Kre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kre(e,t,n){return(t=Zre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zre(e){var t=Xre(e,"string");return typeof t=="symbol"?t:t+""}function Xre(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qre(e,t){if(e==null)return{};var n,r,i=Jre(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Jre(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var eie=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),tie=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:o=0,height:l=0,className:c}=e,f=Qre(e,Yre),h=Wre({x:t,y:n,top:r,left:i,width:o,height:l},f);return!Xe(t)||!Xe(n)||!Xe(o)||!Xe(l)||!Xe(r)||!Xe(i)?null:_.createElement("path",T_({},zr(h),{className:Oe("recharts-cross",c),d:eie(t,n,o,l,r,i)}))};function nie(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function _M(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 wM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_M(Object(n),!0).forEach(function(r){rie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_M(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rie(e,t,n){return(t=iie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iie(e){var t=aie(e,"string");return typeof t=="symbol"?t:t+""}function aie(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oie=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),mk=(e,t,n)=>e.map(r=>"".concat(oie(r)," ").concat(t,"ms ").concat(n)).join(","),sie=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),kh=(e,t)=>Object.keys(t).reduce((n,r)=>wM(wM({},n),{},{[r]:e(r,t[r])}),{});function SM(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 rr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SM(Object(n),!0).forEach(function(r){lie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lie(e,t,n){return(t=uie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uie(e){var t=cie(e,"string");return typeof t=="symbol"?t:t+""}function cie(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _v=(e,t,n)=>e+(t-e)*n,O_=e=>{var{from:t,to:n}=e;return t!==n},pk=(e,t,n)=>{var r=kh((i,o)=>{if(O_(o)){var[l,c]=e(o.from,o.to,o.velocity);return rr(rr({},o),{},{from:l,velocity:c})}return o},t);return n<1?kh((i,o)=>O_(o)?rr(rr({},o),{},{velocity:_v(o.velocity,r[i].velocity,n),from:_v(o.from,r[i].from,n)}):o,t):pk(e,r,n-1)};function fie(e,t,n,r,i,o){var l,c=r.reduce((x,b)=>rr(rr({},x),{},{[b]:{from:e[b],velocity:0,to:t[b]}}),{}),f=()=>kh((x,b)=>b.from,c),h=()=>!Object.values(c).filter(O_).length,m=null,y=x=>{l||(l=x);var b=x-l,C=b/n.dt;c=pk(n,c,C),i(rr(rr(rr({},e),t),f())),l=x,h()||(m=o.setTimeout(y))};return()=>(m=o.setTimeout(y),()=>{var x;(x=m)===null||x===void 0||x()})}function die(e,t,n,r,i,o,l){var c=null,f=i.reduce((y,x)=>rr(rr({},y),{},{[x]:[e[x],t[x]]}),{}),h,m=y=>{h||(h=y);var x=(y-h)/r,b=kh((w,A)=>_v(...A,n(x)),f);if(o(rr(rr(rr({},e),t),b)),x<1)c=l.setTimeout(m);else{var C=kh((w,A)=>_v(...A,n(1)),f);o(rr(rr(rr({},e),t),C))}};return()=>(c=l.setTimeout(m),()=>{var y;(y=c)===null||y===void 0||y()})}const hie=(e,t,n,r,i,o)=>{var l=sie(e,t);return n==null?()=>(i(rr(rr({},e),t)),()=>{}):n.isStepper===!0?fie(e,t,n,l,i,o):die(e,t,n,r,l,i,o)};var wv=1e-4,gk=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],vk=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),CM=(e,t)=>n=>{var r=gk(e,t);return vk(r,n)},mie=(e,t)=>n=>{var r=gk(e,t),i=[...r.map((o,l)=>o*l).slice(1),0];return vk(i,n)},pie=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i,o=n[0].split("(");if(o[0]==="cubic-bezier"&&((i=o[1])===null||i===void 0?void 0:i.split(")")[0].split(",").length)===4){var l=o[1].split(")")[0].split(",").map(c=>parseFloat(c));return[l[0],l[1],l[2],l[3]]}}}return n.length===4?n:[0,0,1,1]},gie=(e,t,n,r)=>{var i=CM(e,n),o=CM(t,r),l=mie(e,n),c=h=>h>1?1:h<0?0:h,f=h=>{for(var m=h>1?1:h,y=m,x=0;x<8;++x){var b=i(y)-m,C=l(y);if(Math.abs(b-m)<wv||C<wv)return o(y);y=c(y-b/C)}return o(y)};return f.isStepper=!1,f},EM=function(){return gie(...pie(...arguments))},vie=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,o=(l,c,f)=>{var h=-(l-c)*n,m=f*r,y=f+(h-m)*i/1e3,x=f*i/1e3+l;return Math.abs(x-c)<wv&&Math.abs(y)<wv?[c,0]:[x,y]};return o.isStepper=!0,o.dt=i,o},yie=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return EM(e);case"spring":return vie();default:if(e.split("(")[0]==="cubic-bezier")return EM(e)}return typeof e=="function"?e:null};function bie(e){var t,n=()=>null,r=!1,i=null,o=l=>{if(!r){if(Array.isArray(l)){if(!l.length)return;var c=l,[f,...h]=c;if(typeof f=="number"){i=e.setTimeout(o.bind(null,h),f);return}o(f),i=e.setTimeout(o.bind(null,h));return}typeof l=="string"&&(t=l,n(t)),typeof l=="object"&&(t=l,n(t)),typeof l=="function"&&l()}};return{stop:()=>{r=!0},start:l=>{r=!1,i&&(i(),i=null),o(l)},subscribe:l=>(n=l,()=>{n=()=>null}),getTimeoutController:()=>e}}class xie{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,o=l=>{l-r>=n?t(l):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function _ie(){return bie(new xie)}var wie=_.createContext(_ie);function Sie(e,t){var n=_.useContext(wie);return _.useMemo(()=>t??n(e),[e,t,n])}var Cie={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},AM={t:0},Kx={t:1};function lm(e){var t=sr(e,Cie),{isActive:n,canBegin:r,duration:i,easing:o,begin:l,onAnimationEnd:c,onAnimationStart:f,children:h}=t,m=Sie(t.animationId,t.animationManager),[y,x]=_.useState(n?AM:Kx),b=_.useRef(null);return _.useEffect(()=>{n||x(Kx)},[n]),_.useEffect(()=>{if(!n||!r)return Xu;var C=hie(AM,Kx,yie(o),i,x,m.getTimeoutController()),w=()=>{b.current=C()};return m.start([f,l,w,i,c]),()=>{m.stop(),b.current&&b.current(),c()}},[n,r,i,o,l,f,c,m]),h(y.t)}function um(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=_.useRef(Dh(t)),r=_.useRef(e);return r.current!==e&&(n.current=Dh(t),r.current=e),n.current}var Eie=["radius"],Aie=["radius"];function TM(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 OM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TM(Object(n),!0).forEach(function(r){Tie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tie(e,t,n){return(t=Oie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oie(e){var t=jie(e,"string");return typeof t=="symbol"?t:t+""}function jie(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sv(){return Sv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sv.apply(null,arguments)}function jM(e,t){if(e==null)return{};var n,r,i=Mie(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Mie(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var MM=(e,t,n,r,i)=>{var o=Math.min(Math.abs(n)/2,Math.abs(r)/2),l=r>=0?1:-1,c=n>=0?1:-1,f=r>=0&&n>=0||r<0&&n<0?1:0,h;if(o>0&&i instanceof Array){for(var m=[0,0,0,0],y=0,x=4;y<x;y++)m[y]=i[y]>o?o:i[y];h="M".concat(e,",").concat(t+l*m[0]),m[0]>0&&(h+="A ".concat(m[0],",").concat(m[0],",0,0,").concat(f,",").concat(e+c*m[0],",").concat(t)),h+="L ".concat(e+n-c*m[1],",").concat(t),m[1]>0&&(h+="A ".concat(m[1],",").concat(m[1],",0,0,").concat(f,`,
`).concat(e+n,",").concat(t+l*m[1])),h+="L ".concat(e+n,",").concat(t+r-l*m[2]),m[2]>0&&(h+="A ".concat(m[2],",").concat(m[2],",0,0,").concat(f,`,
`).concat(e+n-c*m[2],",").concat(t+r)),h+="L ".concat(e+c*m[3],",").concat(t+r),m[3]>0&&(h+="A ".concat(m[3],",").concat(m[3],",0,0,").concat(f,`,
`).concat(e,",").concat(t+r-l*m[3])),h+="Z"}else if(o>0&&i===+i&&i>0){var b=Math.min(o,i);h="M ".concat(e,",").concat(t+l*b,`
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e+c*b,",").concat(t,`
L `).concat(e+n-c*b,",").concat(t,`
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e+n,",").concat(t+l*b,`
L `).concat(e+n,",").concat(t+r-l*b,`
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e+n-c*b,",").concat(t+r,`
L `).concat(e+c*b,",").concat(t+r,`
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e,",").concat(t+r-l*b," Z")}else h="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return h},PM={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},AS=e=>{var t=sr(e,PM),n=_.useRef(null),[r,i]=_.useState(-1);_.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var k=n.current.getTotalLength();k&&i(k)}catch{}},[]);var{x:o,y:l,width:c,height:f,radius:h,className:m}=t,{animationEasing:y,animationDuration:x,animationBegin:b,isAnimationActive:C,isUpdateAnimationActive:w}=t,A=_.useRef(c),O=_.useRef(f),P=_.useRef(o),N=_.useRef(l),F=_.useMemo(()=>({x:o,y:l,width:c,height:f,radius:h}),[o,l,c,f,h]),U=um(F,"rectangle-");if(o!==+o||l!==+l||c!==+c||f!==+f||c===0||f===0)return null;var W=Oe("recharts-rectangle",m);if(!w){var X=zr(t),{radius:ae}=X,ce=jM(X,Eie);return _.createElement("path",Sv({},ce,{radius:typeof h=="number"?h:void 0,className:W,d:MM(o,l,c,f,h)}))}var re=A.current,J=O.current,oe=P.current,_e=N.current,se="0px ".concat(r===-1?1:r,"px"),ue="".concat(r,"px 0px"),Y=mk(["strokeDasharray"],x,typeof y=="string"?y:PM.animationEasing);return _.createElement(lm,{animationId:U,key:U,canBegin:r>0,duration:x,easing:y,isActive:w,begin:b},k=>{var z=mn(re,c,k),H=mn(J,f,k),I=mn(oe,o,k),j=mn(_e,l,k);n.current&&(A.current=z,O.current=H,P.current=I,N.current=j);var q;C?k>0?q={transition:Y,strokeDasharray:ue}:q={strokeDasharray:se}:q={strokeDasharray:ue};var ee=zr(t),{radius:le}=ee,pe=jM(ee,Aie);return _.createElement("path",Sv({},pe,{radius:typeof h=="number"?h:void 0,className:W,d:MM(I,j,z,H,h),ref:n,style:OM(OM({},q),t.style)}))})};function LM(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 NM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LM(Object(n),!0).forEach(function(r){Pie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pie(e,t,n){return(t=Lie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lie(e){var t=Nie(e,"string");return typeof t=="symbol"?t:t+""}function Nie(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cv=Math.PI/180,Rie=e=>e*180/Math.PI,Kn=(e,t,n,r)=>({x:e+Math.cos(-Cv*r)*n,y:t+Math.sin(-Cv*r)*n}),yk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},Die=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)},kie=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,l=Die({x:n,y:r},{x:i,y:o});if(l<=0)return{radius:l,angle:0};var c=(n-i)/l,f=Math.acos(c);return r>o&&(f=2*Math.PI-f),{radius:l,angle:Rie(f),angleInRadian:f}},Iie=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-o*360,endAngle:n-o*360}},zie=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(i,o);return e+l*360},Uie=(e,t)=>{var{chartX:n,chartY:r}=e,{radius:i,angle:o}=kie({x:n,y:r},t),{innerRadius:l,outerRadius:c}=t;if(i<l||i>c||i===0)return null;var{startAngle:f,endAngle:h}=Iie(t),m=o,y;if(f<=h){for(;m>h;)m-=360;for(;m<f;)m+=360;y=m>=f&&m<=h}else{for(;m>f;)m-=360;for(;m<h;)m+=360;y=m>=h&&m<=f}return y?NM(NM({},t),{},{radius:i,angle:zie(m,t)}):null};function bk(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:o}=e,l=Kn(t,n,r,i),c=Kn(t,n,r,o);return{points:[l,c],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function j_(){return j_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j_.apply(null,arguments)}var Bie=(e,t)=>{var n=yr(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},cg=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:o,isExternal:l,cornerRadius:c,cornerIsExternal:f}=e,h=c*(l?1:-1)+r,m=Math.asin(c/h)/Cv,y=f?i:i+o*m,x=Kn(t,n,h,y),b=Kn(t,n,r,y),C=f?i-o*m:i,w=Kn(t,n,h*Math.cos(m*Cv),C);return{center:x,circleTangency:b,lineTangency:w,theta:m}},xk=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:l}=e,c=Bie(o,l),f=o+c,h=Kn(t,n,i,o),m=Kn(t,n,i,f),y="M ".concat(h.x,",").concat(h.y,`
A `).concat(i,",").concat(i,`,0,
`).concat(+(Math.abs(c)>180),",").concat(+(o>f),`,
`).concat(m.x,",").concat(m.y,`
`);if(r>0){var x=Kn(t,n,r,o),b=Kn(t,n,r,f);y+="L ".concat(b.x,",").concat(b.y,`
A `).concat(r,",").concat(r,`,0,
`).concat(+(Math.abs(c)>180),",").concat(+(o<=f),`,
`).concat(x.x,",").concat(x.y," Z")}else y+="L ".concat(t,",").concat(n," Z");return y},Fie=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:f,endAngle:h}=e,m=yr(h-f),{circleTangency:y,lineTangency:x,theta:b}=cg({cx:t,cy:n,radius:i,angle:f,sign:m,cornerRadius:o,cornerIsExternal:c}),{circleTangency:C,lineTangency:w,theta:A}=cg({cx:t,cy:n,radius:i,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:c}),O=c?Math.abs(f-h):Math.abs(f-h)-b-A;if(O<0)return l?"M ".concat(x.x,",").concat(x.y,`
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
`):xk({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:f,endAngle:h});var P="M ".concat(x.x,",").concat(x.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(y.x,",").concat(y.y,`
A`).concat(i,",").concat(i,",0,").concat(+(O>180),",").concat(+(m<0),",").concat(C.x,",").concat(C.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(w.x,",").concat(w.y,`
`);if(r>0){var{circleTangency:N,lineTangency:F,theta:U}=cg({cx:t,cy:n,radius:r,angle:f,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),{circleTangency:W,lineTangency:X,theta:ae}=cg({cx:t,cy:n,radius:r,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),ce=c?Math.abs(f-h):Math.abs(f-h)-U-ae;if(ce<0&&o===0)return"".concat(P,"L").concat(t,",").concat(n,"Z");P+="L".concat(X.x,",").concat(X.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(W.x,",").concat(W.y,`
A`).concat(r,",").concat(r,",0,").concat(+(ce>180),",").concat(+(m>0),",").concat(N.x,",").concat(N.y,`
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(F.x,",").concat(F.y,"Z")}else P+="L".concat(t,",").concat(n,"Z");return P},$ie={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},_k=e=>{var t=sr(e,$ie),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:l,forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:m,className:y}=t;if(o<i||h===m)return null;var x=Oe("recharts-sector",y),b=o-i,C=kr(l,b,0,!0),w;return C>0&&Math.abs(h-m)<360?w=Fie({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(C,b/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:m}):w=xk({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:h,endAngle:m}),_.createElement("path",j_({},zr(t),{className:x,d:w}))};function Vie(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(ID(t)){if(e==="centric"){var{cx:r,cy:i,innerRadius:o,outerRadius:l,angle:c}=t,f=Kn(r,i,o,c),h=Kn(r,i,l,c);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return bk(t)}}var Zx={},Xx={},Qx={},RM;function Hie(){return RM||(RM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YD();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n}(Qx)),Qx}var DM;function qie(){return DM||(DM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Hie();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n}(Xx)),Xx}var kM;function Gie(){return kM||(kM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=WD(),n=qie();function r(i,o,l){l&&typeof l!="number"&&t.isIterateeCall(i,o,l)&&(o=l=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),l=l===void 0?i<o?1:-1:n.toFinite(l);const c=Math.max(Math.ceil((o-i)/(l||1)),0),f=new Array(c);for(let h=0;h<c;h++)f[h]=i,i+=l;return f}e.range=r}(Zx)),Zx}var Jx,IM;function Yie(){return IM||(IM=1,Jx=Gie().range),Jx}var Wie=Yie();const wk=aa(Wie);function sl(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Kie(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function TS(e){let t,n,r;e.length!==2?(t=sl,n=(c,f)=>sl(e(c),f),r=(c,f)=>e(c)-f):(t=e===sl||e===Kie?e:Zie,n=e,r=e);function i(c,f,h=0,m=c.length){if(h<m){if(t(f,f)!==0)return m;do{const y=h+m>>>1;n(c[y],f)<0?h=y+1:m=y}while(h<m)}return h}function o(c,f,h=0,m=c.length){if(h<m){if(t(f,f)!==0)return m;do{const y=h+m>>>1;n(c[y],f)<=0?h=y+1:m=y}while(h<m)}return h}function l(c,f,h=0,m=c.length){const y=i(c,f,h,m-1);return y>h&&r(c[y-1],f)>-r(c[y],f)?y-1:y}return{left:i,center:l,right:o}}function Zie(){return 0}function Sk(e){return e===null?NaN:+e}function*Xie(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Qie=TS(sl),cm=Qie.right;TS(Sk).center;class zM extends Map{constructor(t,n=tae){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(UM(this,t))}has(t){return super.has(UM(this,t))}set(t,n){return super.set(Jie(this,t),n)}delete(t){return super.delete(eae(this,t))}}function UM({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Jie({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function eae({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function tae(e){return e!==null&&typeof e=="object"?e.valueOf():e}function nae(e=sl){if(e===sl)return Ck;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Ck(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const rae=Math.sqrt(50),iae=Math.sqrt(10),aae=Math.sqrt(2);function Ev(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),l=o>=rae?10:o>=iae?5:o>=aae?2:1;let c,f,h;return i<0?(h=Math.pow(10,-i)/l,c=Math.round(e*h),f=Math.round(t*h),c/h<e&&++c,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*l,c=Math.round(e/h),f=Math.round(t/h),c*h<e&&++c,f*h>t&&--f),f<c&&.5<=n&&n<2?Ev(e,t,n*2):[c,f,h]}function M_(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,l]=r?Ev(t,e,n):Ev(e,t,n);if(!(o>=i))return[];const c=o-i+1,f=new Array(c);if(r)if(l<0)for(let h=0;h<c;++h)f[h]=(o-h)/-l;else for(let h=0;h<c;++h)f[h]=(o-h)*l;else if(l<0)for(let h=0;h<c;++h)f[h]=(i+h)/-l;else for(let h=0;h<c;++h)f[h]=(i+h)*l;return f}function P_(e,t,n){return t=+t,e=+e,n=+n,Ev(e,t,n)[2]}function L_(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?P_(t,e,n):P_(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function BM(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function FM(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Ek(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Ck:nae(i);r>n;){if(r-n>600){const f=r-n+1,h=t-n+1,m=Math.log(f),y=.5*Math.exp(2*m/3),x=.5*Math.sqrt(m*y*(f-y)/f)*(h-f/2<0?-1:1),b=Math.max(n,Math.floor(t-h*y/f+x)),C=Math.min(r,Math.floor(t+(f-h)*y/f+x));Ek(e,t,b,C,i)}const o=e[t];let l=n,c=r;for(nh(e,n,t),i(e[r],o)>0&&nh(e,n,r);l<c;){for(nh(e,l,c),++l,--c;i(e[l],o)<0;)++l;for(;i(e[c],o)>0;)--c}i(e[n],o)===0?nh(e,n,c):(++c,nh(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function nh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function oae(e,t,n){if(e=Float64Array.from(Xie(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return FM(e);if(t>=1)return BM(e);var r,i=(r-1)*t,o=Math.floor(i),l=BM(Ek(e,o).subarray(0,o+1)),c=FM(e.subarray(o+1));return l+(c-l)*(i-o)}}function sae(e,t,n=Sk){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),l=+n(e[o],o,e),c=+n(e[o+1],o+1,e);return l+(c-l)*(i-o)}}function lae(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function oa(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function cs(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const N_=Symbol("implicit");function OS(){var e=new zM,t=[],n=[],r=N_;function i(o){let l=e.get(o);if(l===void 0){if(r!==N_)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new zM;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return OS(t,n).unknown(r)},oa.apply(i,arguments),i}function jS(){var e=OS().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,l,c=!1,f=0,h=0,m=.5;delete e.unknown;function y(){var x=t().length,b=i<r,C=b?i:r,w=b?r:i;o=(w-C)/Math.max(1,x-f+h*2),c&&(o=Math.floor(o)),C+=(w-C-o*(x-f))*m,l=o*(1-f),c&&(C=Math.round(C),l=Math.round(l));var A=lae(x).map(function(O){return C+o*O});return n(b?A.reverse():A)}return e.domain=function(x){return arguments.length?(t(x),y()):t()},e.range=function(x){return arguments.length?([r,i]=x,r=+r,i=+i,y()):[r,i]},e.rangeRound=function(x){return[r,i]=x,r=+r,i=+i,c=!0,y()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(x){return arguments.length?(c=!!x,y()):c},e.padding=function(x){return arguments.length?(f=Math.min(1,h=+x),y()):f},e.paddingInner=function(x){return arguments.length?(f=Math.min(1,x),y()):f},e.paddingOuter=function(x){return arguments.length?(h=+x,y()):h},e.align=function(x){return arguments.length?(m=Math.max(0,Math.min(1,x)),y()):m},e.copy=function(){return jS(t(),[r,i]).round(c).paddingInner(f).paddingOuter(h).align(m)},oa.apply(y(),arguments)}function Ak(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ak(t())},e}function uae(){return Ak(jS.apply(null,arguments).paddingInner(1))}function MS(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Tk(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function fm(){}var Ih=.7,Av=1/Ih,of="\\s*([+-]?\\d+)\\s*",zh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ro="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cae=/^#([0-9a-f]{3,8})$/,fae=new RegExp(`^rgb\\(${of},${of},${of}\\)$`),dae=new RegExp(`^rgb\\(${ro},${ro},${ro}\\)$`),hae=new RegExp(`^rgba\\(${of},${of},${of},${zh}\\)$`),mae=new RegExp(`^rgba\\(${ro},${ro},${ro},${zh}\\)$`),pae=new RegExp(`^hsl\\(${zh},${ro},${ro}\\)$`),gae=new RegExp(`^hsla\\(${zh},${ro},${ro},${zh}\\)$`),$M={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};MS(fm,Uh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:VM,formatHex:VM,formatHex8:vae,formatHsl:yae,formatRgb:HM,toString:HM});function VM(){return this.rgb().formatHex()}function vae(){return this.rgb().formatHex8()}function yae(){return Ok(this).formatHsl()}function HM(){return this.rgb().formatRgb()}function Uh(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=cae.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?qM(t):n===3?new fi(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?fg(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?fg(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=fae.exec(e))?new fi(t[1],t[2],t[3],1):(t=dae.exec(e))?new fi(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=hae.exec(e))?fg(t[1],t[2],t[3],t[4]):(t=mae.exec(e))?fg(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=pae.exec(e))?WM(t[1],t[2]/100,t[3]/100,1):(t=gae.exec(e))?WM(t[1],t[2]/100,t[3]/100,t[4]):$M.hasOwnProperty(e)?qM($M[e]):e==="transparent"?new fi(NaN,NaN,NaN,0):null}function qM(e){return new fi(e>>16&255,e>>8&255,e&255,1)}function fg(e,t,n,r){return r<=0&&(e=t=n=NaN),new fi(e,t,n,r)}function bae(e){return e instanceof fm||(e=Uh(e)),e?(e=e.rgb(),new fi(e.r,e.g,e.b,e.opacity)):new fi}function R_(e,t,n,r){return arguments.length===1?bae(e):new fi(e,t,n,r??1)}function fi(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}MS(fi,R_,Tk(fm,{brighter(e){return e=e==null?Av:Math.pow(Av,e),new fi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ih:Math.pow(Ih,e),new fi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new fi(Mu(this.r),Mu(this.g),Mu(this.b),Tv(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:GM,formatHex:GM,formatHex8:xae,formatRgb:YM,toString:YM}));function GM(){return`#${Eu(this.r)}${Eu(this.g)}${Eu(this.b)}`}function xae(){return`#${Eu(this.r)}${Eu(this.g)}${Eu(this.b)}${Eu((isNaN(this.opacity)?1:this.opacity)*255)}`}function YM(){const e=Tv(this.opacity);return`${e===1?"rgb(":"rgba("}${Mu(this.r)}, ${Mu(this.g)}, ${Mu(this.b)}${e===1?")":`, ${e})`}`}function Tv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Mu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Eu(e){return e=Mu(e),(e<16?"0":"")+e.toString(16)}function WM(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new xa(e,t,n,r)}function Ok(e){if(e instanceof xa)return new xa(e.h,e.s,e.l,e.opacity);if(e instanceof fm||(e=Uh(e)),!e)return new xa;if(e instanceof xa)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,c=o-i,f=(o+i)/2;return c?(t===o?l=(n-r)/c+(n<r)*6:n===o?l=(r-t)/c+2:l=(t-n)/c+4,c/=f<.5?o+i:2-o-i,l*=60):c=f>0&&f<1?0:l,new xa(l,c,f,e.opacity)}function _ae(e,t,n,r){return arguments.length===1?Ok(e):new xa(e,t,n,r??1)}function xa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}MS(xa,_ae,Tk(fm,{brighter(e){return e=e==null?Av:Math.pow(Av,e),new xa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ih:Math.pow(Ih,e),new xa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new fi(e2(e>=240?e-240:e+120,i,r),e2(e,i,r),e2(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new xa(KM(this.h),dg(this.s),dg(this.l),Tv(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Tv(this.opacity);return`${e===1?"hsl(":"hsla("}${KM(this.h)}, ${dg(this.s)*100}%, ${dg(this.l)*100}%${e===1?")":`, ${e})`}`}}));function KM(e){return e=(e||0)%360,e<0?e+360:e}function dg(e){return Math.max(0,Math.min(1,e||0))}function e2(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const PS=e=>()=>e;function wae(e,t){return function(n){return e+n*t}}function Sae(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Cae(e){return(e=+e)==1?jk:function(t,n){return n-t?Sae(t,n,e):PS(isNaN(t)?n:t)}}function jk(e,t){var n=t-e;return n?wae(e,n):PS(isNaN(e)?t:e)}const ZM=function e(t){var n=Cae(t);function r(i,o){var l=n((i=R_(i)).r,(o=R_(o)).r),c=n(i.g,o.g),f=n(i.b,o.b),h=jk(i.opacity,o.opacity);return function(m){return i.r=l(m),i.g=c(m),i.b=f(m),i.opacity=h(m),i+""}}return r.gamma=e,r}(1);function Eae(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function Aae(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Tae(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)i[l]=Nf(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(c){for(l=0;l<r;++l)o[l]=i[l](c);return o}}function Oae(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ov(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function jae(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Nf(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var D_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,t2=new RegExp(D_.source,"g");function Mae(e){return function(){return e}}function Pae(e){return function(t){return e(t)+""}}function Lae(e,t){var n=D_.lastIndex=t2.lastIndex=0,r,i,o,l=-1,c=[],f=[];for(e=e+"",t=t+"";(r=D_.exec(e))&&(i=t2.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),c[l]?c[l]+=o:c[++l]=o),(r=r[0])===(i=i[0])?c[l]?c[l]+=i:c[++l]=i:(c[++l]=null,f.push({i:l,x:Ov(r,i)})),n=t2.lastIndex;return n<t.length&&(o=t.slice(n),c[l]?c[l]+=o:c[++l]=o),c.length<2?f[0]?Pae(f[0].x):Mae(t):(t=f.length,function(h){for(var m=0,y;m<t;++m)c[(y=f[m]).i]=y.x(h);return c.join("")})}function Nf(e,t){var n=typeof t,r;return t==null||n==="boolean"?PS(t):(n==="number"?Ov:n==="string"?(r=Uh(t))?(t=r,ZM):Lae:t instanceof Uh?ZM:t instanceof Date?Oae:Aae(t)?Eae:Array.isArray(t)?Tae:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?jae:Ov)(e,t)}function LS(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Nae(e,t){t===void 0&&(t=e,e=Nf);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(l){var c=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[c](l-c)}}function Rae(e){return function(){return e}}function jv(e){return+e}var XM=[0,1];function qr(e){return e}function k_(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Rae(isNaN(t)?NaN:.5)}function Dae(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function kae(e,t,n){var r=e[0],i=e[1],o=t[0],l=t[1];return i<r?(r=k_(i,r),o=n(l,o)):(r=k_(r,i),o=n(o,l)),function(c){return o(r(c))}}function Iae(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)i[l]=k_(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(c){var f=cm(e,c,1,r)-1;return o[f](i[f](c))}}function dm(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Hy(){var e=XM,t=XM,n=Nf,r,i,o,l=qr,c,f,h;function m(){var x=Math.min(e.length,t.length);return l!==qr&&(l=Dae(e[0],e[x-1])),c=x>2?Iae:kae,f=h=null,y}function y(x){return x==null||isNaN(x=+x)?o:(f||(f=c(e.map(r),t,n)))(r(l(x)))}return y.invert=function(x){return l(i((h||(h=c(t,e.map(r),Ov)))(x)))},y.domain=function(x){return arguments.length?(e=Array.from(x,jv),m()):e.slice()},y.range=function(x){return arguments.length?(t=Array.from(x),m()):t.slice()},y.rangeRound=function(x){return t=Array.from(x),n=LS,m()},y.clamp=function(x){return arguments.length?(l=x?!0:qr,m()):l!==qr},y.interpolate=function(x){return arguments.length?(n=x,m()):n},y.unknown=function(x){return arguments.length?(o=x,y):o},function(x,b){return r=x,i=b,m()}}function NS(){return Hy()(qr,qr)}function zae(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Mv(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function pf(e){return e=Mv(Math.abs(e)),e?e[1]:NaN}function Uae(e,t){return function(n,r){for(var i=n.length,o=[],l=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>r&&(c=Math.max(1,r-f)),o.push(n.substring(i-=c,i+c)),!((f+=c+1)>r));)c=e[l=(l+1)%e.length];return o.reverse().join(t)}}function Bae(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Fae=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bh(e){if(!(t=Fae.exec(e)))throw new Error("invalid format: "+e);var t;return new RS({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Bh.prototype=RS.prototype;function RS(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}RS.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $ae(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Mk;function Vae(e,t){var n=Mv(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Mk=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Mv(e,Math.max(0,t+o-1))[0]}function QM(e,t){var n=Mv(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const JM={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:zae,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>QM(e*100,t),r:QM,s:Vae,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function eP(e){return e}var tP=Array.prototype.map,nP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Hae(e){var t=e.grouping===void 0||e.thousands===void 0?eP:Uae(tP.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?eP:Bae(tP.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(y){y=Bh(y);var x=y.fill,b=y.align,C=y.sign,w=y.symbol,A=y.zero,O=y.width,P=y.comma,N=y.precision,F=y.trim,U=y.type;U==="n"?(P=!0,U="g"):JM[U]||(N===void 0&&(N=12),F=!0,U="g"),(A||x==="0"&&b==="=")&&(A=!0,x="0",b="=");var W=w==="$"?n:w==="#"&&/[boxX]/.test(U)?"0"+U.toLowerCase():"",X=w==="$"?r:/[%p]/.test(U)?l:"",ae=JM[U],ce=/[defgprs%]/.test(U);N=N===void 0?6:/[gprs]/.test(U)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function re(J){var oe=W,_e=X,se,ue,Y;if(U==="c")_e=ae(J)+_e,J="";else{J=+J;var k=J<0||1/J<0;if(J=isNaN(J)?f:ae(Math.abs(J),N),F&&(J=$ae(J)),k&&+J==0&&C!=="+"&&(k=!1),oe=(k?C==="("?C:c:C==="-"||C==="("?"":C)+oe,_e=(U==="s"?nP[8+Mk/3]:"")+_e+(k&&C==="("?")":""),ce){for(se=-1,ue=J.length;++se<ue;)if(Y=J.charCodeAt(se),48>Y||Y>57){_e=(Y===46?i+J.slice(se+1):J.slice(se))+_e,J=J.slice(0,se);break}}}P&&!A&&(J=t(J,1/0));var z=oe.length+J.length+_e.length,H=z<O?new Array(O-z+1).join(x):"";switch(P&&A&&(J=t(H+J,H.length?O-_e.length:1/0),H=""),b){case"<":J=oe+J+_e+H;break;case"=":J=oe+H+J+_e;break;case"^":J=H.slice(0,z=H.length>>1)+oe+J+_e+H.slice(z);break;default:J=H+oe+J+_e;break}return o(J)}return re.toString=function(){return y+""},re}function m(y,x){var b=h((y=Bh(y),y.type="f",y)),C=Math.max(-8,Math.min(8,Math.floor(pf(x)/3)))*3,w=Math.pow(10,-C),A=nP[8+C/3];return function(O){return b(w*O)+A}}return{format:h,formatPrefix:m}}var hg,DS,Pk;qae({thousands:",",grouping:[3],currency:["$",""]});function qae(e){return hg=Hae(e),DS=hg.format,Pk=hg.formatPrefix,hg}function Gae(e){return Math.max(0,-pf(Math.abs(e)))}function Yae(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pf(t)/3)))*3-pf(Math.abs(e)))}function Wae(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,pf(t)-pf(e))+1}function Lk(e,t,n,r){var i=L_(e,t,n),o;switch(r=Bh(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Yae(i,l))&&(r.precision=o),Pk(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Wae(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Gae(i))&&(r.precision=o-(r.type==="%")*2);break}}return DS(r)}function Ml(e){var t=e.domain;return e.ticks=function(n){var r=t();return M_(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Lk(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,l=r[i],c=r[o],f,h,m=10;for(c<l&&(h=l,l=c,c=h,h=i,i=o,o=h);m-- >0;){if(h=P_(l,c,n),h===f)return r[i]=l,r[o]=c,t(r);if(h>0)l=Math.floor(l/h)*h,c=Math.ceil(c/h)*h;else if(h<0)l=Math.ceil(l*h)/h,c=Math.floor(c*h)/h;else break;f=h}return e},e}function Nk(){var e=NS();return e.copy=function(){return dm(e,Nk())},oa.apply(e,arguments),Ml(e)}function Rk(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,jv),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Rk(e).unknown(t)},e=arguments.length?Array.from(e,jv):[0,1],Ml(n)}function Dk(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],l;return o<i&&(l=n,n=r,r=l,l=i,i=o,o=l),e[n]=t.floor(i),e[r]=t.ceil(o),e}function rP(e){return Math.log(e)}function iP(e){return Math.exp(e)}function Kae(e){return-Math.log(-e)}function Zae(e){return-Math.exp(-e)}function Xae(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Qae(e){return e===10?Xae:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Jae(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function aP(e){return(t,n)=>-e(-t,n)}function kS(e){const t=e(rP,iP),n=t.domain;let r=10,i,o;function l(){return i=Jae(r),o=Qae(r),n()[0]<0?(i=aP(i),o=aP(o),e(Kae,Zae)):e(rP,iP),t}return t.base=function(c){return arguments.length?(r=+c,l()):r},t.domain=function(c){return arguments.length?(n(c),l()):n()},t.ticks=c=>{const f=n();let h=f[0],m=f[f.length-1];const y=m<h;y&&([h,m]=[m,h]);let x=i(h),b=i(m),C,w;const A=c==null?10:+c;let O=[];if(!(r%1)&&b-x<A){if(x=Math.floor(x),b=Math.ceil(b),h>0){for(;x<=b;++x)for(C=1;C<r;++C)if(w=x<0?C/o(-x):C*o(x),!(w<h)){if(w>m)break;O.push(w)}}else for(;x<=b;++x)for(C=r-1;C>=1;--C)if(w=x>0?C/o(-x):C*o(x),!(w<h)){if(w>m)break;O.push(w)}O.length*2<A&&(O=M_(h,m,A))}else O=M_(x,b,Math.min(b-x,A)).map(o);return y?O.reverse():O},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=Bh(f)).precision==null&&(f.trim=!0),f=DS(f)),c===1/0)return f;const h=Math.max(1,r*c/t.ticks().length);return m=>{let y=m/o(Math.round(i(m)));return y*r<r-.5&&(y*=r),y<=h?f(m):""}},t.nice=()=>n(Dk(n(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),t}function kk(){const e=kS(Hy()).domain([1,10]);return e.copy=()=>dm(e,kk()).base(e.base()),oa.apply(e,arguments),e}function oP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function sP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function IS(e){var t=1,n=e(oP(t),sP(t));return n.constant=function(r){return arguments.length?e(oP(t=+r),sP(t)):t},Ml(n)}function Ik(){var e=IS(Hy());return e.copy=function(){return dm(e,Ik()).constant(e.constant())},oa.apply(e,arguments)}function lP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function eoe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function toe(e){return e<0?-e*e:e*e}function zS(e){var t=e(qr,qr),n=1;function r(){return n===1?e(qr,qr):n===.5?e(eoe,toe):e(lP(n),lP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ml(t)}function US(){var e=zS(Hy());return e.copy=function(){return dm(e,US()).exponent(e.exponent())},oa.apply(e,arguments),e}function noe(){return US.apply(null,arguments).exponent(.5)}function uP(e){return Math.sign(e)*e*e}function roe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function zk(){var e=NS(),t=[0,1],n=!1,r;function i(o){var l=roe(e(o));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(o){return e.invert(uP(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,jv)).map(uP)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return zk(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},oa.apply(i,arguments),Ml(i)}function Uk(){var e=[],t=[],n=[],r;function i(){var l=0,c=Math.max(1,t.length);for(n=new Array(c-1);++l<c;)n[l-1]=sae(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?r:t[cm(n,l)]}return o.invertExtent=function(l){var c=t.indexOf(l);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let c of l)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(sl),i()},o.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Uk().domain(e).range(t).unknown(r)},oa.apply(o,arguments)}function Bk(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function l(f){return f!=null&&f<=f?i[cm(r,f,0,n)]:o}function c(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},l.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,c()):i.slice()},l.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,r[0]]:h>=n?[r[n-1],t]:[r[h-1],r[h]]},l.unknown=function(f){return arguments.length&&(o=f),l},l.thresholds=function(){return r.slice()},l.copy=function(){return Bk().domain([e,t]).range(i).unknown(o)},oa.apply(Ml(l),arguments)}function Fk(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[cm(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Fk().domain(e).range(t).unknown(n)},oa.apply(i,arguments)}const n2=new Date,r2=new Date;function ur(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const l=i(o),c=i.ceil(o);return o-l<c-o?l:c},i.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),i.range=(o,l,c)=>{const f=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o<l)||!(c>0))return f;let h;do f.push(h=new Date(+o)),t(o,c),e(o);while(h<o&&o<l);return f},i.filter=o=>ur(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,c)=>{if(l>=l)if(c<0)for(;++c<=0;)for(;t(l,-1),!o(l););else for(;--c>=0;)for(;t(l,1),!o(l););}),n&&(i.count=(o,l)=>(n2.setTime(+o),r2.setTime(+l),e(n2),e(r2),Math.floor(n(n2,r2))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?l=>r(l)%o===0:l=>i.count(0,l)%o===0):i)),i}const Pv=ur(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Pv.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ur(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Pv);Pv.range;const Bo=1e3,na=Bo*60,Fo=na*60,Qo=Fo*24,BS=Qo*7,cP=Qo*30,i2=Qo*365,Au=ur(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Bo)},(e,t)=>(t-e)/Bo,e=>e.getUTCSeconds());Au.range;const FS=ur(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bo)},(e,t)=>{e.setTime(+e+t*na)},(e,t)=>(t-e)/na,e=>e.getMinutes());FS.range;const $S=ur(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*na)},(e,t)=>(t-e)/na,e=>e.getUTCMinutes());$S.range;const VS=ur(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bo-e.getMinutes()*na)},(e,t)=>{e.setTime(+e+t*Fo)},(e,t)=>(t-e)/Fo,e=>e.getHours());VS.range;const HS=ur(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Fo)},(e,t)=>(t-e)/Fo,e=>e.getUTCHours());HS.range;const hm=ur(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*na)/Qo,e=>e.getDate()-1);hm.range;const qy=ur(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qo,e=>e.getUTCDate()-1);qy.range;const $k=ur(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qo,e=>Math.floor(e/Qo));$k.range;function Qu(e){return ur(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*na)/BS)}const Gy=Qu(0),Lv=Qu(1),ioe=Qu(2),aoe=Qu(3),gf=Qu(4),ooe=Qu(5),soe=Qu(6);Gy.range;Lv.range;ioe.range;aoe.range;gf.range;ooe.range;soe.range;function Ju(e){return ur(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/BS)}const Yy=Ju(0),Nv=Ju(1),loe=Ju(2),uoe=Ju(3),vf=Ju(4),coe=Ju(5),foe=Ju(6);Yy.range;Nv.range;loe.range;uoe.range;vf.range;coe.range;foe.range;const qS=ur(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());qS.range;const GS=ur(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());GS.range;const Jo=ur(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Jo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ur(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Jo.range;const es=ur(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());es.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ur(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});es.range;function Vk(e,t,n,r,i,o){const l=[[Au,1,Bo],[Au,5,5*Bo],[Au,15,15*Bo],[Au,30,30*Bo],[o,1,na],[o,5,5*na],[o,15,15*na],[o,30,30*na],[i,1,Fo],[i,3,3*Fo],[i,6,6*Fo],[i,12,12*Fo],[r,1,Qo],[r,2,2*Qo],[n,1,BS],[t,1,cP],[t,3,3*cP],[e,1,i2]];function c(h,m,y){const x=m<h;x&&([h,m]=[m,h]);const b=y&&typeof y.range=="function"?y:f(h,m,y),C=b?b.range(h,+m+1):[];return x?C.reverse():C}function f(h,m,y){const x=Math.abs(m-h)/y,b=TS(([,,A])=>A).right(l,x);if(b===l.length)return e.every(L_(h/i2,m/i2,y));if(b===0)return Pv.every(Math.max(L_(h,m,y),1));const[C,w]=l[x/l[b-1][2]<l[b][2]/x?b-1:b];return C.every(w)}return[c,f]}const[doe,hoe]=Vk(es,GS,Yy,$k,HS,$S),[moe,poe]=Vk(Jo,qS,Gy,hm,VS,FS);function a2(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function o2(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function rh(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function goe(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,l=e.shortDays,c=e.months,f=e.shortMonths,h=ih(i),m=ah(i),y=ih(o),x=ah(o),b=ih(l),C=ah(l),w=ih(c),A=ah(c),O=ih(f),P=ah(f),N={a:k,A:z,b:H,B:I,c:null,d:gP,e:gP,f:Uoe,g:Koe,G:Xoe,H:koe,I:Ioe,j:zoe,L:Hk,m:Boe,M:Foe,p:j,q,Q:bP,s:xP,S:$oe,u:Voe,U:Hoe,V:qoe,w:Goe,W:Yoe,x:null,X:null,y:Woe,Y:Zoe,Z:Qoe,"%":yP},F={a:ee,A:le,b:pe,B:he,c:null,d:vP,e:vP,f:nse,g:dse,G:mse,H:Joe,I:ese,j:tse,L:Gk,m:rse,M:ise,p:ve,q:D,Q:bP,s:xP,S:ase,u:ose,U:sse,V:lse,w:use,W:cse,x:null,X:null,y:fse,Y:hse,Z:pse,"%":yP},U={a:re,A:J,b:oe,B:_e,c:se,d:mP,e:mP,f:Loe,g:hP,G:dP,H:pP,I:pP,j:Ooe,L:Poe,m:Toe,M:joe,p:ce,q:Aoe,Q:Roe,s:Doe,S:Moe,u:_oe,U:woe,V:Soe,w:xoe,W:Coe,x:ue,X:Y,y:hP,Y:dP,Z:Eoe,"%":Noe};N.x=W(n,N),N.X=W(r,N),N.c=W(t,N),F.x=W(n,F),F.X=W(r,F),F.c=W(t,F);function W(R,G){return function(te){var V=[],Z=-1,ne=0,me=R.length,ie,xe,Ee;for(te instanceof Date||(te=new Date(+te));++Z<me;)R.charCodeAt(Z)===37&&(V.push(R.slice(ne,Z)),(xe=fP[ie=R.charAt(++Z)])!=null?ie=R.charAt(++Z):xe=ie==="e"?" ":"0",(Ee=G[ie])&&(ie=Ee(te,xe)),V.push(ie),ne=Z+1);return V.push(R.slice(ne,Z)),V.join("")}}function X(R,G){return function(te){var V=rh(1900,void 0,1),Z=ae(V,R,te+="",0),ne,me;if(Z!=te.length)return null;if("Q"in V)return new Date(V.Q);if("s"in V)return new Date(V.s*1e3+("L"in V?V.L:0));if(G&&!("Z"in V)&&(V.Z=0),"p"in V&&(V.H=V.H%12+V.p*12),V.m===void 0&&(V.m="q"in V?V.q:0),"V"in V){if(V.V<1||V.V>53)return null;"w"in V||(V.w=1),"Z"in V?(ne=o2(rh(V.y,0,1)),me=ne.getUTCDay(),ne=me>4||me===0?Nv.ceil(ne):Nv(ne),ne=qy.offset(ne,(V.V-1)*7),V.y=ne.getUTCFullYear(),V.m=ne.getUTCMonth(),V.d=ne.getUTCDate()+(V.w+6)%7):(ne=a2(rh(V.y,0,1)),me=ne.getDay(),ne=me>4||me===0?Lv.ceil(ne):Lv(ne),ne=hm.offset(ne,(V.V-1)*7),V.y=ne.getFullYear(),V.m=ne.getMonth(),V.d=ne.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),me="Z"in V?o2(rh(V.y,0,1)).getUTCDay():a2(rh(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(me+5)%7:V.w+V.U*7-(me+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,o2(V)):a2(V)}}function ae(R,G,te,V){for(var Z=0,ne=G.length,me=te.length,ie,xe;Z<ne;){if(V>=me)return-1;if(ie=G.charCodeAt(Z++),ie===37){if(ie=G.charAt(Z++),xe=U[ie in fP?G.charAt(Z++):ie],!xe||(V=xe(R,te,V))<0)return-1}else if(ie!=te.charCodeAt(V++))return-1}return V}function ce(R,G,te){var V=h.exec(G.slice(te));return V?(R.p=m.get(V[0].toLowerCase()),te+V[0].length):-1}function re(R,G,te){var V=b.exec(G.slice(te));return V?(R.w=C.get(V[0].toLowerCase()),te+V[0].length):-1}function J(R,G,te){var V=y.exec(G.slice(te));return V?(R.w=x.get(V[0].toLowerCase()),te+V[0].length):-1}function oe(R,G,te){var V=O.exec(G.slice(te));return V?(R.m=P.get(V[0].toLowerCase()),te+V[0].length):-1}function _e(R,G,te){var V=w.exec(G.slice(te));return V?(R.m=A.get(V[0].toLowerCase()),te+V[0].length):-1}function se(R,G,te){return ae(R,t,G,te)}function ue(R,G,te){return ae(R,n,G,te)}function Y(R,G,te){return ae(R,r,G,te)}function k(R){return l[R.getDay()]}function z(R){return o[R.getDay()]}function H(R){return f[R.getMonth()]}function I(R){return c[R.getMonth()]}function j(R){return i[+(R.getHours()>=12)]}function q(R){return 1+~~(R.getMonth()/3)}function ee(R){return l[R.getUTCDay()]}function le(R){return o[R.getUTCDay()]}function pe(R){return f[R.getUTCMonth()]}function he(R){return c[R.getUTCMonth()]}function ve(R){return i[+(R.getUTCHours()>=12)]}function D(R){return 1+~~(R.getUTCMonth()/3)}return{format:function(R){var G=W(R+="",N);return G.toString=function(){return R},G},parse:function(R){var G=X(R+="",!1);return G.toString=function(){return R},G},utcFormat:function(R){var G=W(R+="",F);return G.toString=function(){return R},G},utcParse:function(R){var G=X(R+="",!0);return G.toString=function(){return R},G}}}var fP={"-":"",_:" ",0:"0"},br=/^\s*\d+/,voe=/^%/,yoe=/[\\^$*+?|[\]().{}]/g;function zt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function boe(e){return e.replace(yoe,"\\$&")}function ih(e){return new RegExp("^(?:"+e.map(boe).join("|")+")","i")}function ah(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function xoe(e,t,n){var r=br.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function _oe(e,t,n){var r=br.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function woe(e,t,n){var r=br.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Soe(e,t,n){var r=br.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Coe(e,t,n){var r=br.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function dP(e,t,n){var r=br.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function hP(e,t,n){var r=br.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Eoe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Aoe(e,t,n){var r=br.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Toe(e,t,n){var r=br.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function mP(e,t,n){var r=br.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ooe(e,t,n){var r=br.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function pP(e,t,n){var r=br.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function joe(e,t,n){var r=br.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Moe(e,t,n){var r=br.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Poe(e,t,n){var r=br.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Loe(e,t,n){var r=br.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Noe(e,t,n){var r=voe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Roe(e,t,n){var r=br.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Doe(e,t,n){var r=br.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function gP(e,t){return zt(e.getDate(),t,2)}function koe(e,t){return zt(e.getHours(),t,2)}function Ioe(e,t){return zt(e.getHours()%12||12,t,2)}function zoe(e,t){return zt(1+hm.count(Jo(e),e),t,3)}function Hk(e,t){return zt(e.getMilliseconds(),t,3)}function Uoe(e,t){return Hk(e,t)+"000"}function Boe(e,t){return zt(e.getMonth()+1,t,2)}function Foe(e,t){return zt(e.getMinutes(),t,2)}function $oe(e,t){return zt(e.getSeconds(),t,2)}function Voe(e){var t=e.getDay();return t===0?7:t}function Hoe(e,t){return zt(Gy.count(Jo(e)-1,e),t,2)}function qk(e){var t=e.getDay();return t>=4||t===0?gf(e):gf.ceil(e)}function qoe(e,t){return e=qk(e),zt(gf.count(Jo(e),e)+(Jo(e).getDay()===4),t,2)}function Goe(e){return e.getDay()}function Yoe(e,t){return zt(Lv.count(Jo(e)-1,e),t,2)}function Woe(e,t){return zt(e.getFullYear()%100,t,2)}function Koe(e,t){return e=qk(e),zt(e.getFullYear()%100,t,2)}function Zoe(e,t){return zt(e.getFullYear()%1e4,t,4)}function Xoe(e,t){var n=e.getDay();return e=n>=4||n===0?gf(e):gf.ceil(e),zt(e.getFullYear()%1e4,t,4)}function Qoe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+zt(t/60|0,"0",2)+zt(t%60,"0",2)}function vP(e,t){return zt(e.getUTCDate(),t,2)}function Joe(e,t){return zt(e.getUTCHours(),t,2)}function ese(e,t){return zt(e.getUTCHours()%12||12,t,2)}function tse(e,t){return zt(1+qy.count(es(e),e),t,3)}function Gk(e,t){return zt(e.getUTCMilliseconds(),t,3)}function nse(e,t){return Gk(e,t)+"000"}function rse(e,t){return zt(e.getUTCMonth()+1,t,2)}function ise(e,t){return zt(e.getUTCMinutes(),t,2)}function ase(e,t){return zt(e.getUTCSeconds(),t,2)}function ose(e){var t=e.getUTCDay();return t===0?7:t}function sse(e,t){return zt(Yy.count(es(e)-1,e),t,2)}function Yk(e){var t=e.getUTCDay();return t>=4||t===0?vf(e):vf.ceil(e)}function lse(e,t){return e=Yk(e),zt(vf.count(es(e),e)+(es(e).getUTCDay()===4),t,2)}function use(e){return e.getUTCDay()}function cse(e,t){return zt(Nv.count(es(e)-1,e),t,2)}function fse(e,t){return zt(e.getUTCFullYear()%100,t,2)}function dse(e,t){return e=Yk(e),zt(e.getUTCFullYear()%100,t,2)}function hse(e,t){return zt(e.getUTCFullYear()%1e4,t,4)}function mse(e,t){var n=e.getUTCDay();return e=n>=4||n===0?vf(e):vf.ceil(e),zt(e.getUTCFullYear()%1e4,t,4)}function pse(){return"+0000"}function yP(){return"%"}function bP(e){return+e}function xP(e){return Math.floor(+e/1e3)}var Gc,Wk,Kk;gse({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function gse(e){return Gc=goe(e),Wk=Gc.format,Gc.parse,Kk=Gc.utcFormat,Gc.utcParse,Gc}function vse(e){return new Date(e)}function yse(e){return e instanceof Date?+e:+new Date(+e)}function YS(e,t,n,r,i,o,l,c,f,h){var m=NS(),y=m.invert,x=m.domain,b=h(".%L"),C=h(":%S"),w=h("%I:%M"),A=h("%I %p"),O=h("%a %d"),P=h("%b %d"),N=h("%B"),F=h("%Y");function U(W){return(f(W)<W?b:c(W)<W?C:l(W)<W?w:o(W)<W?A:r(W)<W?i(W)<W?O:P:n(W)<W?N:F)(W)}return m.invert=function(W){return new Date(y(W))},m.domain=function(W){return arguments.length?x(Array.from(W,yse)):x().map(vse)},m.ticks=function(W){var X=x();return e(X[0],X[X.length-1],W??10)},m.tickFormat=function(W,X){return X==null?U:h(X)},m.nice=function(W){var X=x();return(!W||typeof W.range!="function")&&(W=t(X[0],X[X.length-1],W??10)),W?x(Dk(X,W)):m},m.copy=function(){return dm(m,YS(e,t,n,r,i,o,l,c,f,h))},m}function bse(){return oa.apply(YS(moe,poe,Jo,qS,Gy,hm,VS,FS,Au,Wk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function xse(){return oa.apply(YS(doe,hoe,es,GS,Yy,qy,HS,$S,Au,Kk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Wy(){var e=0,t=1,n,r,i,o,l=qr,c=!1,f;function h(y){return y==null||isNaN(y=+y)?f:l(i===0?.5:(y=(o(y)-n)*i,c?Math.max(0,Math.min(1,y)):y))}h.domain=function(y){return arguments.length?([e,t]=y,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),h):[e,t]},h.clamp=function(y){return arguments.length?(c=!!y,h):c},h.interpolator=function(y){return arguments.length?(l=y,h):l};function m(y){return function(x){var b,C;return arguments.length?([b,C]=x,l=y(b,C),h):[l(0),l(1)]}}return h.range=m(Nf),h.rangeRound=m(LS),h.unknown=function(y){return arguments.length?(f=y,h):f},function(y){return o=y,n=y(e),r=y(t),i=n===r?0:1/(r-n),h}}function Pl(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Zk(){var e=Ml(Wy()(qr));return e.copy=function(){return Pl(e,Zk())},cs.apply(e,arguments)}function Xk(){var e=kS(Wy()).domain([1,10]);return e.copy=function(){return Pl(e,Xk()).base(e.base())},cs.apply(e,arguments)}function Qk(){var e=IS(Wy());return e.copy=function(){return Pl(e,Qk()).constant(e.constant())},cs.apply(e,arguments)}function WS(){var e=zS(Wy());return e.copy=function(){return Pl(e,WS()).exponent(e.exponent())},cs.apply(e,arguments)}function _se(){return WS.apply(null,arguments).exponent(.5)}function Jk(){var e=[],t=qr;function n(r){if(r!=null&&!isNaN(r=+r))return t((cm(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(sl),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>oae(e,o/r))},n.copy=function(){return Jk(t).domain(e)},cs.apply(n,arguments)}function Ky(){var e=0,t=.5,n=1,r=1,i,o,l,c,f,h=qr,m,y=!1,x;function b(w){return isNaN(w=+w)?x:(w=.5+((w=+m(w))-o)*(r*w<r*o?c:f),h(y?Math.max(0,Math.min(1,w)):w))}b.domain=function(w){return arguments.length?([e,t,n]=w,i=m(e=+e),o=m(t=+t),l=m(n=+n),c=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),r=o<i?-1:1,b):[e,t,n]},b.clamp=function(w){return arguments.length?(y=!!w,b):y},b.interpolator=function(w){return arguments.length?(h=w,b):h};function C(w){return function(A){var O,P,N;return arguments.length?([O,P,N]=A,h=Nae(w,[O,P,N]),b):[h(0),h(.5),h(1)]}}return b.range=C(Nf),b.rangeRound=C(LS),b.unknown=function(w){return arguments.length?(x=w,b):x},function(w){return m=w,i=w(e),o=w(t),l=w(n),c=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),r=o<i?-1:1,b}}function e8(){var e=Ml(Ky()(qr));return e.copy=function(){return Pl(e,e8())},cs.apply(e,arguments)}function t8(){var e=kS(Ky()).domain([.1,1,10]);return e.copy=function(){return Pl(e,t8()).base(e.base())},cs.apply(e,arguments)}function n8(){var e=IS(Ky());return e.copy=function(){return Pl(e,n8()).constant(e.constant())},cs.apply(e,arguments)}function KS(){var e=zS(Ky());return e.copy=function(){return Pl(e,KS()).exponent(e.exponent())},cs.apply(e,arguments)}function wse(){return KS.apply(null,arguments).exponent(.5)}const hh=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:jS,scaleDiverging:e8,scaleDivergingLog:t8,scaleDivergingPow:KS,scaleDivergingSqrt:wse,scaleDivergingSymlog:n8,scaleIdentity:Rk,scaleImplicit:N_,scaleLinear:Nk,scaleLog:kk,scaleOrdinal:OS,scalePoint:uae,scalePow:US,scaleQuantile:Uk,scaleQuantize:Bk,scaleRadial:zk,scaleSequential:Zk,scaleSequentialLog:Xk,scaleSequentialPow:WS,scaleSequentialQuantile:Jk,scaleSequentialSqrt:_se,scaleSequentialSymlog:Qk,scaleSqrt:noe,scaleSymlog:Ik,scaleThreshold:Fk,scaleTime:bse,scaleUtc:xse,tickFormat:Lk},Symbol.toStringTag,{value:"Module"}));var Ll=e=>e.chartData,ZS=Ce([Ll],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Zy=(e,t,n,r)=>r?ZS(e):Ll(e);function Vu(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(Bn(t)&&Bn(n))return!0}return!1}function _P(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function r8(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(Bn(n))i=n;else if(typeof n=="function")return;if(Bn(r))o=r;else if(typeof r=="function")return;var l=[i,o];if(Vu(l))return l}}function Sse(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(Vu(r))return _P(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,l,c;if(i==="auto")t!=null&&(l=Math.min(...t));else if(Xe(i))l=i;else if(typeof i=="function")try{t!=null&&(l=i(t?.[0]))}catch{}else if(typeof i=="string"&&rM.test(i)){var f=rM.exec(i);if(f==null||t==null)l=void 0;else{var h=+f[1];l=t[0]-h}}else l=t?.[0];if(o==="auto")t!=null&&(c=Math.max(...t));else if(Xe(o))c=o;else if(typeof o=="function")try{t!=null&&(c=o(t?.[1]))}catch{}else if(typeof o=="string"&&iM.test(o)){var m=iM.exec(o);if(m==null||t==null)c=void 0;else{var y=+m[1];c=t[1]+y}}else c=t?.[1];var x=[l,c];if(Vu(x))return t==null?x:_P(x,t,n)}}}var Rf=1e9,Cse={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},QS,gn=!0,ra="[DecimalError] ",Pu=ra+"Invalid argument: ",XS=ra+"Exponent out of range: ",Df=Math.floor,_u=Math.pow,Ese=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Oi,vr=1e7,on=7,i8=9007199254740991,Rv=Df(i8/on),Ye={};Ye.absoluteValue=Ye.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ye.comparedTo=Ye.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};Ye.decimalPlaces=Ye.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*on;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Ye.dividedBy=Ye.div=function(e){return Ho(this,new this.constructor(e))};Ye.dividedToIntegerBy=Ye.idiv=function(e){var t=this,n=t.constructor;return Jt(Ho(t,new n(e),0,1),n.precision)};Ye.equals=Ye.eq=function(e){return!this.cmp(e)};Ye.exponent=function(){return Zn(this)};Ye.greaterThan=Ye.gt=function(e){return this.cmp(e)>0};Ye.greaterThanOrEqualTo=Ye.gte=function(e){return this.cmp(e)>=0};Ye.isInteger=Ye.isint=function(){return this.e>this.d.length-2};Ye.isNegative=Ye.isneg=function(){return this.s<0};Ye.isPositive=Ye.ispos=function(){return this.s>0};Ye.isZero=function(){return this.s===0};Ye.lessThan=Ye.lt=function(e){return this.cmp(e)<0};Ye.lessThanOrEqualTo=Ye.lte=function(e){return this.cmp(e)<1};Ye.logarithm=Ye.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Oi))throw Error(ra+"NaN");if(n.s<1)throw Error(ra+(n.s?"NaN":"-Infinity"));return n.eq(Oi)?new r(0):(gn=!1,t=Ho(Fh(n,o),Fh(e,o),o),gn=!0,Jt(t,i))};Ye.minus=Ye.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?s8(t,e):a8(t,(e.s=-e.s,e))};Ye.modulo=Ye.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ra+"NaN");return n.s?(gn=!1,t=Ho(n,e,0,1).times(e),gn=!0,n.minus(t)):Jt(new r(n),i)};Ye.naturalExponential=Ye.exp=function(){return o8(this)};Ye.naturalLogarithm=Ye.ln=function(){return Fh(this)};Ye.negated=Ye.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ye.plus=Ye.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?a8(t,e):s8(t,(e.s=-e.s,e))};Ye.precision=Ye.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Pu+e);if(t=Zn(i)+1,r=i.d.length-1,n=r*on+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Ye.squareRoot=Ye.sqrt=function(){var e,t,n,r,i,o,l,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(ra+"NaN")}for(e=Zn(c),gn=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=eo(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Df((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new f(t)):r=new f(i.toString()),n=f.precision,i=l=n+3;;)if(o=r,r=o.plus(Ho(c,o,l+2)).times(.5),eo(o.d).slice(0,l)===(t=eo(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(Jt(o,n+1,0),o.times(o).eq(c)){r=o;break}}else if(t!="9999")break;l+=4}return gn=!0,Jt(r,n)};Ye.times=Ye.mul=function(e){var t,n,r,i,o,l,c,f,h,m=this,y=m.constructor,x=m.d,b=(e=new y(e)).d;if(!m.s||!e.s)return new y(0);for(e.s*=m.s,n=m.e+e.e,f=x.length,h=b.length,f<h&&(o=x,x=b,b=o,l=f,f=h,h=l),o=[],l=f+h,r=l;r--;)o.push(0);for(r=h;--r>=0;){for(t=0,i=f+r;i>r;)c=o[i]+b[r]*x[i-r-1]+t,o[i--]=c%vr|0,t=c/vr|0;o[i]=(o[i]+t)%vr|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,gn?Jt(e,y.precision):e};Ye.toDecimalPlaces=Ye.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(oo(e,0,Rf),t===void 0?t=r.rounding:oo(t,0,8),Jt(n,e+Zn(n)+1,t))};Ye.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Hu(r,!0):(oo(e,0,Rf),t===void 0?t=i.rounding:oo(t,0,8),r=Jt(new i(r),e+1,t),n=Hu(r,!0,e+1)),n};Ye.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Hu(i):(oo(e,0,Rf),t===void 0?t=o.rounding:oo(t,0,8),r=Jt(new o(i),e+Zn(i)+1,t),n=Hu(r.abs(),!1,e+Zn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Ye.toInteger=Ye.toint=function(){var e=this,t=e.constructor;return Jt(new t(e),Zn(e)+1,t.rounding)};Ye.toNumber=function(){return+this};Ye.toPower=Ye.pow=function(e){var t,n,r,i,o,l,c=this,f=c.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f(Oi);if(c=new f(c),!c.s){if(e.s<1)throw Error(ra+"Infinity");return c}if(c.eq(Oi))return c;if(r=f.precision,e.eq(Oi))return Jt(c,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=c.s,l){if((n=m<0?-m:m)<=i8){for(i=new f(Oi),t=Math.ceil(r/on+4),gn=!1;n%2&&(i=i.times(c),SP(i.d,t)),n=Df(n/2),n!==0;)c=c.times(c),SP(c.d,t);return gn=!0,e.s<0?new f(Oi).div(i):Jt(i,r)}}else if(o<0)throw Error(ra+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,gn=!1,i=e.times(Fh(c,r+h)),gn=!0,i=o8(i),i.s=o,i};Ye.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Zn(i),r=Hu(i,n<=o.toExpNeg||n>=o.toExpPos)):(oo(e,1,Rf),t===void 0?t=o.rounding:oo(t,0,8),i=Jt(new o(i),e,t),n=Zn(i),r=Hu(i,e<=n||n<=o.toExpNeg,e)),r};Ye.toSignificantDigits=Ye.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(oo(e,1,Rf),t===void 0?t=r.rounding:oo(t,0,8)),Jt(new r(n),e,t)};Ye.toString=Ye.valueOf=Ye.val=Ye.toJSON=Ye[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Zn(e),n=e.constructor;return Hu(e,t<=n.toExpNeg||t>=n.toExpPos)};function a8(e,t){var n,r,i,o,l,c,f,h,m=e.constructor,y=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),gn?Jt(t,y):t;if(f=e.d,h=t.d,l=e.e,i=t.e,f=f.slice(),o=l-i,o){for(o<0?(r=f,o=-o,c=h.length):(r=h,i=l,c=f.length),l=Math.ceil(y/on),c=l>c?l+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=f.length,o=h.length,c-o<0&&(o=c,r=h,h=f,f=r),n=0;o;)n=(f[--o]=f[o]+h[o]+n)/vr|0,f[o]%=vr;for(n&&(f.unshift(n),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,gn?Jt(t,y):t}function oo(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Pu+e)}function eo(e){var t,n,r,i=e.length-1,o="",l=e[0];if(i>0){for(o+=l,t=1;t<i;t++)r=e[t]+"",n=on-r.length,n&&(o+=nl(n)),o+=r;l=e[t],r=l+"",n=on-r.length,n&&(o+=nl(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Ho=function(){function e(r,i){var o,l=0,c=r.length;for(r=r.slice();c--;)o=r[c]*i+l,r[c]=o%vr|0,l=o/vr|0;return l&&r.unshift(l),r}function t(r,i,o,l){var c,f;if(o!=l)f=o>l?1:-1;else for(c=f=0;c<o;c++)if(r[c]!=i[c]){f=r[c]>i[c]?1:-1;break}return f}function n(r,i,o){for(var l=0;o--;)r[o]-=l,l=r[o]<i[o]?1:0,r[o]=l*vr+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,l){var c,f,h,m,y,x,b,C,w,A,O,P,N,F,U,W,X,ae,ce=r.constructor,re=r.s==i.s?1:-1,J=r.d,oe=i.d;if(!r.s)return new ce(r);if(!i.s)throw Error(ra+"Division by zero");for(f=r.e-i.e,X=oe.length,U=J.length,b=new ce(re),C=b.d=[],h=0;oe[h]==(J[h]||0);)++h;if(oe[h]>(J[h]||0)&&--f,o==null?P=o=ce.precision:l?P=o+(Zn(r)-Zn(i))+1:P=o,P<0)return new ce(0);if(P=P/on+2|0,h=0,X==1)for(m=0,oe=oe[0],P++;(h<U||m)&&P--;h++)N=m*vr+(J[h]||0),C[h]=N/oe|0,m=N%oe|0;else{for(m=vr/(oe[0]+1)|0,m>1&&(oe=e(oe,m),J=e(J,m),X=oe.length,U=J.length),F=X,w=J.slice(0,X),A=w.length;A<X;)w[A++]=0;ae=oe.slice(),ae.unshift(0),W=oe[0],oe[1]>=vr/2&&++W;do m=0,c=t(oe,w,X,A),c<0?(O=w[0],X!=A&&(O=O*vr+(w[1]||0)),m=O/W|0,m>1?(m>=vr&&(m=vr-1),y=e(oe,m),x=y.length,A=w.length,c=t(y,w,x,A),c==1&&(m--,n(y,X<x?ae:oe,x))):(m==0&&(c=m=1),y=oe.slice()),x=y.length,x<A&&y.unshift(0),n(w,y,A),c==-1&&(A=w.length,c=t(oe,w,X,A),c<1&&(m++,n(w,X<A?ae:oe,A))),A=w.length):c===0&&(m++,w=[0]),C[h++]=m,c&&w[0]?w[A++]=J[F]||0:(w=[J[F]],A=1);while((F++<U||w[0]!==void 0)&&P--)}return C[0]||C.shift(),b.e=f,Jt(b,l?o+Zn(b)+1:o)}}();function o8(e,t){var n,r,i,o,l,c,f=0,h=0,m=e.constructor,y=m.precision;if(Zn(e)>16)throw Error(XS+Zn(e));if(!e.s)return new m(Oi);for(gn=!1,c=y,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),h+=5;for(r=Math.log(_u(2,h))/Math.LN10*2+5|0,c+=r,n=i=o=new m(Oi),m.precision=c;;){if(i=Jt(i.times(e),c),n=n.times(++f),l=o.plus(Ho(i,n,c)),eo(l.d).slice(0,c)===eo(o.d).slice(0,c)){for(;h--;)o=Jt(o.times(o),c);return m.precision=y,t==null?(gn=!0,Jt(o,y)):o}o=l}}function Zn(e){for(var t=e.e*on,n=e.d[0];n>=10;n/=10)t++;return t}function s2(e,t,n){if(t>e.LN10.sd())throw gn=!0,n&&(e.precision=n),Error(ra+"LN10 precision limit exceeded");return Jt(new e(e.LN10),t)}function nl(e){for(var t="";e--;)t+="0";return t}function Fh(e,t){var n,r,i,o,l,c,f,h,m,y=1,x=10,b=e,C=b.d,w=b.constructor,A=w.precision;if(b.s<1)throw Error(ra+(b.s?"NaN":"-Infinity"));if(b.eq(Oi))return new w(0);if(t==null?(gn=!1,h=A):h=t,b.eq(10))return t==null&&(gn=!0),s2(w,h);if(h+=x,w.precision=h,n=eo(C),r=n.charAt(0),o=Zn(b),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)b=b.times(e),n=eo(b.d),r=n.charAt(0),y++;o=Zn(b),r>1?(b=new w("0."+n),o++):b=new w(r+"."+n.slice(1))}else return f=s2(w,h+2,A).times(o+""),b=Fh(new w(r+"."+n.slice(1)),h-x).plus(f),w.precision=A,t==null?(gn=!0,Jt(b,A)):b;for(c=l=b=Ho(b.minus(Oi),b.plus(Oi),h),m=Jt(b.times(b),h),i=3;;){if(l=Jt(l.times(m),h),f=c.plus(Ho(l,new w(i),h)),eo(f.d).slice(0,h)===eo(c.d).slice(0,h))return c=c.times(2),o!==0&&(c=c.plus(s2(w,h+2,A).times(o+""))),c=Ho(c,new w(y),h),w.precision=A,t==null?(gn=!0,Jt(c,A)):c;c=f,i+=2}}function wP(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Df(n/on),e.d=[],r=(n+1)%on,n<0&&(r+=on),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=on;r<i;)e.d.push(+t.slice(r,r+=on));t=t.slice(r),r=on-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),gn&&(e.e>Rv||e.e<-Rv))throw Error(XS+n)}else e.s=0,e.e=0,e.d=[0];return e}function Jt(e,t,n){var r,i,o,l,c,f,h,m,y=e.d;for(l=1,o=y[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=on,i=t,h=y[m=0];else{if(m=Math.ceil((r+1)/on),o=y.length,m>=o)return e;for(h=o=y[m],l=1;o>=10;o/=10)l++;r%=on,i=r-on+l}if(n!==void 0&&(o=_u(10,l-i-1),c=h/o%10|0,f=t<0||y[m+1]!==void 0||h%o,f=n<4?(c||f)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||f||n==6&&(r>0?i>0?h/_u(10,l-i):0:y[m-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return f?(o=Zn(e),y.length=1,t=t-o-1,y[0]=_u(10,(on-t%on)%on),e.e=Df(-t/on)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(r==0?(y.length=m,o=1,m--):(y.length=m+1,o=_u(10,on-r),y[m]=i>0?(h/_u(10,l-i)%_u(10,i)|0)*o:0),f)for(;;)if(m==0){(y[0]+=o)==vr&&(y[0]=1,++e.e);break}else{if(y[m]+=o,y[m]!=vr)break;y[m--]=0,o=1}for(r=y.length;y[--r]===0;)y.pop();if(gn&&(e.e>Rv||e.e<-Rv))throw Error(XS+Zn(e));return e}function s8(e,t){var n,r,i,o,l,c,f,h,m,y,x=e.constructor,b=x.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new x(e),gn?Jt(t,b):t;if(f=e.d,y=t.d,r=t.e,h=e.e,f=f.slice(),l=h-r,l){for(m=l<0,m?(n=f,l=-l,c=y.length):(n=y,r=h,c=f.length),i=Math.max(Math.ceil(b/on),c)+2,l>i&&(l=i,n.length=1),n.reverse(),i=l;i--;)n.push(0);n.reverse()}else{for(i=f.length,c=y.length,m=i<c,m&&(c=i),i=0;i<c;i++)if(f[i]!=y[i]){m=f[i]<y[i];break}l=0}for(m&&(n=f,f=y,y=n,t.s=-t.s),c=f.length,i=y.length-c;i>0;--i)f[c++]=0;for(i=y.length;i>l;){if(f[--i]<y[i]){for(o=i;o&&f[--o]===0;)f[o]=vr-1;--f[o],f[i]+=vr}f[i]-=y[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,gn?Jt(t,b):t):new x(0)}function Hu(e,t,n){var r,i=Zn(e),o=eo(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+nl(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+nl(-i-1)+o,n&&(r=n-l)>0&&(o+=nl(r))):i>=l?(o+=nl(i+1-l),n&&(r=n-i-1)>0&&(o=o+"."+nl(r))):((r=i+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(i+1===l&&(o+="."),o+=nl(r))),e.s<0?"-"+o:o}function SP(e,t){if(e.length>t)return e.length=t,!0}function l8(e){var t,n,r;function i(o){var l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,o instanceof i){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Pu+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return wP(l,o.toString())}else if(typeof o!="string")throw Error(Pu+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,Ese.test(o))wP(l,o);else throw Error(Pu+o)}if(i.prototype=Ye,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=l8,i.config=i.set=Ase,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function Ase(e){if(!e||typeof e!="object")throw Error(ra+"Object expected");var t,n,r,i=["precision",1,Rf,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Df(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Pu+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Pu+n+": "+r);return this}var QS=l8(Cse);Oi=new QS(1);const qt=QS;var Tse=e=>e,u8={},c8=e=>e===u8,CP=e=>function t(){return arguments.length===0||arguments.length===1&&c8(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},f8=(e,t)=>e===1?t:CP(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(l=>l!==u8).length;return o>=e?t(...r):f8(e-o,CP(function(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var h=r.map(m=>c8(m)?c.shift():m);return t(...h,...c)}))}),Xy=e=>f8(e.length,e),I_=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},Ose=Xy((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),jse=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Tse;var i=n.reverse(),o=i[0],l=i.slice(1);return function(){return l.reduce((c,f)=>f(c),o(...arguments))}},z_=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),d8=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every((l,c)=>{var f;return l===((f=t)===null||f===void 0?void 0:f[c])})||(t=i,n=e(...i)),n}};function h8(e){var t;return e===0?t=1:t=Math.floor(new qt(e).abs().log(10).toNumber())+1,t}function m8(e,t,n){for(var r=new qt(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}Xy((e,t,n)=>{var r=+e,i=+t;return r+n*(i-r)});Xy((e,t,n)=>{var r=t-+e;return r=r||1/0,(n-e)/r});Xy((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var p8=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},g8=(e,t,n)=>{if(e.lte(0))return new qt(0);var r=h8(e.toNumber()),i=new qt(10).pow(r),o=e.div(i),l=r!==1?.05:.1,c=new qt(Math.ceil(o.div(l).toNumber())).add(n).mul(l),f=c.mul(i);return t?new qt(f.toNumber()):new qt(Math.ceil(f.toNumber()))},Mse=(e,t,n)=>{var r=new qt(1),i=new qt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new qt(10).pow(h8(e)-1),i=new qt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new qt(Math.floor(e)))}else e===0?i=new qt(Math.floor((t-1)/2)):n||(i=new qt(Math.floor(e)));var l=Math.floor((t-1)/2),c=jse(Ose(f=>i.add(new qt(f-l).mul(r)).toNumber()),I_);return c(0,t)},v8=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new qt(0),tickMin:new qt(0),tickMax:new qt(0)};var l=g8(new qt(n).sub(t).div(r-1),i,o),c;t<=0&&n>=0?c=new qt(0):(c=new qt(t).add(n).div(2),c=c.sub(new qt(c).mod(l)));var f=Math.ceil(c.sub(t).div(l).toNumber()),h=Math.ceil(new qt(n).sub(c).div(l).toNumber()),m=f+h+1;return m>r?v8(t,n,r,i,o+1):(m<r&&(h=n>0?h+(r-m):h,f=n>0?f:f+(r-m)),{step:l,tickMin:c.sub(new qt(f).mul(l)),tickMax:c.add(new qt(h).mul(l))})};function Pse(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),[l,c]=p8([t,n]);if(l===-1/0||c===1/0){var f=c===1/0?[l,...I_(0,r-1).map(()=>1/0)]:[...I_(0,r-1).map(()=>-1/0),c];return t>n?z_(f):f}if(l===c)return Mse(l,r,i);var{step:h,tickMin:m,tickMax:y}=v8(l,c,o,i,0),x=m8(m,y.add(new qt(.1).mul(h)),h);return t>n?z_(x):x}function Lse(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,l]=p8([n,r]);if(o===-1/0||l===1/0)return[n,r];if(o===l)return[o];var c=Math.max(t,2),f=g8(new qt(l).sub(o).div(c-1),i,0),h=[...m8(new qt(o),new qt(l),f),l];return i===!1&&(h=h.map(m=>Math.round(m))),n>r?z_(h):h}var Nse=d8(Pse),Rse=d8(Lse),y8=e=>e.rootProps.maxBarSize,Dse=e=>e.rootProps.barGap,b8=e=>e.rootProps.barCategoryGap,kse=e=>e.rootProps.barSize,mm=e=>e.rootProps.stackOffset,JS=e=>e.options.chartName,eC=e=>e.rootProps.syncId,x8=e=>e.rootProps.syncMethod,tC=e=>e.options.eventEmitter,Un={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},zo={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},Ai={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},Qy=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},Ise={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:zo.angleAxisId,includeHidden:!1,name:void 0,reversed:zo.reversed,scale:zo.scale,tick:zo.tick,tickCount:void 0,ticks:void 0,type:zo.type,unit:void 0},zse={allowDataOverflow:Ai.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Ai.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ai.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Ai.scale,tick:Ai.tick,tickCount:Ai.tickCount,ticks:void 0,type:Ai.type,unit:void 0},Use={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:zo.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:zo.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:zo.scale,tick:zo.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},Bse={allowDataOverflow:Ai.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Ai.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ai.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Ai.scale,tick:Ai.tick,tickCount:Ai.tickCount,ticks:void 0,type:"category",unit:void 0},nC=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?Use:Ise,rC=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?Bse:zse,Jy=e=>e.polarOptions,iC=Ce([ls,us,lr],yk),_8=Ce([Jy,iC],(e,t)=>{if(e!=null)return kr(e.innerRadius,t,0)}),w8=Ce([Jy,iC],(e,t)=>{if(e!=null)return kr(e.outerRadius,t,t*.8)}),Fse=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},S8=Ce([Jy],Fse);Ce([nC,S8],Qy);var C8=Ce([iC,_8,w8],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});Ce([rC,C8],Qy);var E8=Ce([Mt,Jy,_8,w8,ls,us],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:l,cy:c,startAngle:f,endAngle:h}=t;return{cx:kr(l,i,i/2),cy:kr(c,o,o/2),innerRadius:n,outerRadius:r,startAngle:f,endAngle:h,clockWise:!1}}}),bn=(e,t)=>t,pm=(e,t,n)=>n;function aC(e){return e?.id}function A8(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,l=new Map;return e.forEach(c=>{var f,h=(f=c.data)!==null&&f!==void 0?f:r;if(!(h==null||h.length===0)){var m=aC(c);h.forEach((y,x)=>{var b=o==null||i?x:String(nn(y,o,null)),C=nn(y,c.dataKey,0),w;l.has(b)?w=l.get(b):w={},Object.assign(w,{[m]:C}),l.set(b,w)})}}),Array.from(l.values())}function e0(e){return e.stackId!=null&&e.dataKey!=null}var t0=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function n0(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function $se(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var cr=e=>{var t=Mt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},kf=e=>e.tooltip.settings.axisId;function EP(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 Dv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EP(Object(n),!0).forEach(function(r){Vse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vse(e,t,n){return(t=Hse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hse(e){var t=qse(e,"string");return typeof t=="symbol"?t:t+""}function qse(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U_=[0,"auto"],Ci={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},T8=(e,t)=>e.cartesianAxis.xAxis[t],fs=(e,t)=>{var n=T8(e,t);return n??Ci},Ei={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:U_,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:om},O8=(e,t)=>e.cartesianAxis.yAxis[t],ds=(e,t)=>{var n=O8(e,t);return n??Ei},Gse={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},oC=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??Gse},En=(e,t,n)=>{switch(t){case"xAxis":return fs(e,n);case"yAxis":return ds(e,n);case"zAxis":return oC(e,n);case"angleAxis":return nC(e,n);case"radiusAxis":return rC(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Yse=(e,t,n)=>{switch(t){case"xAxis":return fs(e,n);case"yAxis":return ds(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},gm=(e,t,n)=>{switch(t){case"xAxis":return fs(e,n);case"yAxis":return ds(e,n);case"angleAxis":return nC(e,n);case"radiusAxis":return rC(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},j8=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function sC(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var r0=e=>e.graphicalItems.cartesianItems,Wse=Ce([bn,pm],sC),lC=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),vm=Ce([r0,En,Wse],lC,{memoizeOptions:{resultEqualityCheck:n0}}),M8=Ce([vm],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(e0)),P8=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),Kse=Ce([vm],P8),uC=e=>e.map(t=>t.data).filter(Boolean).flat(1),Zse=Ce([vm],uC,{memoizeOptions:{resultEqualityCheck:n0}}),cC=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},fC=Ce([Zse,Zy],cC),dC=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:nn(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:nn(i,r)}))):e.map(r=>({value:r})),i0=Ce([fC,En,vm],dC);function L8(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function zg(e){if(ci(e)||e instanceof Date){var t=Number(e);if(Bn(t))return t}}function AP(e){if(Array.isArray(e)){var t=[zg(e[0]),zg(e[1])];return Vu(t)?t:void 0}var n=zg(e);if(n!=null)return[n,n]}function ts(e){return e.map(zg).filter(Tte)}function Xse(e,t,n){return!n||typeof t!="number"||Aa(t)?[]:n.length?ts(n.flatMap(r=>{var i=nn(e,r.dataKey),o,l;if(Array.isArray(i)?[o,l]=i:o=l=i,!(!Bn(o)||!Bn(l)))return[t-o,t+l]})):[]}var fr=e=>{var t=cr(e),n=kf(e);return gm(e,t,n)},N8=Ce([fr],e=>e?.dataKey),Qse=Ce([M8,Zy,fr],A8),R8=(e,t,n)=>{var r={},i=t.reduce((o,l)=>(l.stackId==null||(o[l.stackId]==null&&(o[l.stackId]=[]),o[l.stackId].push(l)),o),r);return Object.fromEntries(Object.entries(i).map(o=>{var[l,c]=o,f=c.map(aC);return[l,{stackedData:$ne(e,f,n),graphicalItems:c}]}))},B_=Ce([Qse,M8,mm],R8),D8=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(r==null&&n!=="zAxis"){var l=Yne(e,i,o);if(!(l!=null&&l[0]===0&&l[1]===0))return l}},Jse=Ce([En],e=>e.allowDataOverflow),hC=e=>{var t;if(e==null||!("domain"in e))return U_;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=ts(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:U_},mC=Ce([En],hC),pC=Ce([mC,Jse],r8),ele=Ce([B_,Ll,bn,pC],D8,{memoizeOptions:{resultEqualityCheck:t0}}),a0=e=>e.errorBars,tle=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>L8(n,r)),kv=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),l=Math.min(...o),c=Math.max(...o);return[l,c]}},gC=(e,t,n,r,i)=>{var o,l;if(n.length>0&&e.forEach(c=>{n.forEach(f=>{var h,m,y=(h=r[f.id])===null||h===void 0?void 0:h.filter(O=>L8(i,O)),x=nn(c,(m=t.dataKey)!==null&&m!==void 0?m:f.dataKey),b=Xse(c,x,y);if(b.length>=2){var C=Math.min(...b),w=Math.max(...b);(o==null||C<o)&&(o=C),(l==null||w>l)&&(l=w)}var A=AP(x);A!=null&&(o=o==null?A[0]:Math.min(o,A[0]),l=l==null?A[1]:Math.max(l,A[1]))})}),t?.dataKey!=null&&e.forEach(c=>{var f=AP(nn(c,t.dataKey));f!=null&&(o=o==null?f[0]:Math.min(o,f[0]),l=l==null?f[1]:Math.max(l,f[1]))}),Bn(o)&&Bn(l))return[o,l]},nle=Ce([fC,En,Kse,a0,bn],gC,{memoizeOptions:{resultEqualityCheck:t0}});function rle(e){var{value:t}=e;if(ci(t)||t instanceof Date)return t}var ile=(e,t,n)=>{var r=e.map(rle).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&ND(r))?wk(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},k8=e=>e.referenceElements.dots,If=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),ale=Ce([k8,bn,pm],If),I8=e=>e.referenceElements.areas,ole=Ce([I8,bn,pm],If),z8=e=>e.referenceElements.lines,sle=Ce([z8,bn,pm],If),U8=(e,t)=>{var n=ts(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},lle=Ce(ale,bn,U8),B8=(e,t)=>{var n=ts(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},ule=Ce([ole,bn],B8);function cle(e){var t;if(e.x!=null)return ts([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:ts(n)}function fle(e){var t;if(e.y!=null)return ts([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:ts(n)}var F8=(e,t)=>{var n=e.flatMap(r=>t==="xAxis"?cle(r):fle(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},dle=Ce([sle,bn],F8),hle=Ce(lle,dle,ule,(e,t,n)=>kv(e,n,t)),vC=(e,t,n,r,i,o,l,c)=>{if(n!=null)return n;var f=l==="vertical"&&c==="xAxis"||l==="horizontal"&&c==="yAxis",h=f?kv(r,o,i):kv(o,i);return Sse(t,h,e.allowDataOverflow)},mle=Ce([En,mC,pC,ele,nle,hle,Mt,bn],vC,{memoizeOptions:{resultEqualityCheck:t0}}),ple=[0,1],yC=(e,t,n,r,i,o,l)=>{if(!((e==null||n==null||n.length===0)&&l===void 0)){var{dataKey:c,type:f}=e,h=Ol(t,o);if(h&&c==null){var m;return wk(0,(m=n?.length)!==null&&m!==void 0?m:0)}return f==="category"?ile(r,e,h):i==="expand"?ple:l}},bC=Ce([En,Mt,fC,i0,mm,bn,mle],yC),$8=(e,t,n,r,i)=>{if(e!=null){var{scale:o,type:l}=e;if(o==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":l==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":l==="category"?"band":"linear";if(typeof o=="string"){var c="scale".concat(am(o));return c in hh?c:"point"}}},zf=Ce([En,Mt,j8,JS,bn],$8);function gle(e){if(e!=null){if(e in hh)return hh[e]();var t="scale".concat(am(e));if(t in hh)return hh[t]()}}function xC(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=gle(t);if(i!=null){var o=i.domain(n).range(r);return Ine(o),o}}}var _C=(e,t,n)=>{var r=hC(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&Vu(e))return Nse(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Vu(e))return Rse(e,t.tickCount,t.allowDecimals)}},wC=Ce([bC,gm,zf],_C),SC=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&Vu(t)&&Array.isArray(n)&&n.length>0){var i=t[0],o=n[0],l=t[1],c=n[n.length-1];return[Math.min(i,o),Math.max(l,c)]}return t},vle=Ce([En,bC,wC,bn],SC),yle=Ce(i0,En,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(ts(e.map(c=>c.value))).sort((c,f)=>c-f);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var o=0;o<r.length-1;o++){var l=r[o+1]-r[o];n=Math.min(n,l)}return n/i}}),V8=Ce(yle,Mt,b8,lr,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!Bn(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var l=kr(n,e*o),c=e*o/2;return c-l-(c-l)/o*l}return 0}),ble=(e,t)=>{var n=fs(e,t);return n==null||typeof n.padding!="string"?0:V8(e,"xAxis",t,n.padding)},xle=(e,t)=>{var n=ds(e,t);return n==null||typeof n.padding!="string"?0:V8(e,"yAxis",t,n.padding)},_le=Ce(fs,ble,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),wle=Ce(ds,xle,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),Sle=Ce([lr,_le,Fy,By,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),Cle=Ce([lr,Mt,wle,Fy,By,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:l}=i;return o?[r.height-l.bottom,l.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),ym=(e,t,n,r)=>{var i;switch(t){case"xAxis":return Sle(e,n,r);case"yAxis":return Cle(e,n,r);case"zAxis":return(i=oC(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return S8(e);case"radiusAxis":return C8(e,n);default:return}},H8=Ce([En,ym],Qy),xl=Ce([En,zf,vle,H8],xC);Ce([vm,a0,bn],tle);function q8(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var o0=(e,t)=>t,s0=(e,t,n)=>n,Ele=Ce(zy,o0,s0,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(q8)),Ale=Ce(Uy,o0,s0,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(q8)),G8=(e,t)=>({width:e.width,height:t.height}),Tle=(e,t)=>{var n=typeof t.width=="number"?t.width:om;return{width:n,height:e.height}},Y8=Ce(lr,fs,G8),Ole=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},jle=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},Mle=Ce(us,lr,Ele,o0,s0,(e,t,n,r,i)=>{var o={},l;return n.forEach(c=>{var f=G8(t,c);l==null&&(l=Ole(t,r,e));var h=r==="top"&&!i||r==="bottom"&&i;o[c.id]=l-Number(h)*f.height,l+=(h?-1:1)*f.height}),o}),Ple=Ce(ls,lr,Ale,o0,s0,(e,t,n,r,i)=>{var o={},l;return n.forEach(c=>{var f=Tle(t,c);l==null&&(l=jle(t,r,e));var h=r==="left"&&!i||r==="right"&&i;o[c.id]=l-Number(h)*f.width,l+=(h?-1:1)*f.width}),o}),Lle=(e,t)=>{var n=fs(e,t);if(n!=null)return Mle(e,n.orientation,n.mirror)},Nle=Ce([lr,fs,Lle,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),Rle=(e,t)=>{var n=ds(e,t);if(n!=null)return Ple(e,n.orientation,n.mirror)},Dle=Ce([lr,ds,Rle,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),W8=Ce(lr,ds,(e,t)=>{var n=typeof t.width=="number"?t.width:om;return{width:n,height:e.height}}),TP=(e,t,n)=>{switch(t){case"xAxis":return Y8(e,n).width;case"yAxis":return W8(e,n).height;default:return}},K8=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:l}=n,c=Ol(e,r),f=t.map(h=>h.value);if(l&&c&&o==="category"&&i&&ND(f))return f}},CC=Ce([Mt,i0,En,bn],K8),Z8=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,l=Ol(e,r);if(l&&(i==="number"||o!=="auto"))return t.map(c=>c.value)}},EC=Ce([Mt,i0,gm,bn],Z8),OP=Ce([Mt,Yse,zf,xl,CC,EC,ym,wC,bn],(e,t,n,r,i,o,l,c,f)=>{if(t!=null){var h=Ol(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:o,duplicateDomain:i,isCategorical:h,niceTicks:c,range:l,realScaleType:n,scale:r}}}),kle=(e,t,n,r,i,o,l,c,f)=>{if(!(t==null||r==null)){var h=Ol(e,f),{type:m,ticks:y,tickCount:x}=t,b=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,C=m==="category"&&r.bandwidth?r.bandwidth()/b:0;C=f==="angleAxis"&&o!=null&&o.length>=2?yr(o[0]-o[1])*2*C:C;var w=y||i;if(w){var A=w.map((O,P)=>{var N=l?l.indexOf(O):O;return{index:P,coordinate:r(N)+C,value:O,offset:C}});return A.filter(O=>Bn(O.coordinate))}return h&&c?c.map((O,P)=>({coordinate:r(O)+C,value:O,index:P,offset:C})).filter(O=>Bn(O.coordinate)):r.ticks?r.ticks(x).map(O=>({coordinate:r(O)+C,value:O,offset:C})):r.domain().map((O,P)=>({coordinate:r(O)+C,value:l?l[O]:O,index:P,offset:C}))}},X8=Ce([Mt,gm,zf,xl,wC,ym,CC,EC,bn],kle),Ile=(e,t,n,r,i,o,l)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var c=Ol(e,l),{tickCount:f}=t,h=0;return h=l==="angleAxis"&&r?.length>=2?yr(r[0]-r[1])*2*h:h,c&&o?o.map((m,y)=>({coordinate:n(m)+h,value:m,index:y,offset:h})):n.ticks?n.ticks(f).map(m=>({coordinate:n(m)+h,value:m,offset:h})):n.domain().map((m,y)=>({coordinate:n(m)+h,value:i?i[m]:m,index:y,offset:h}))}},_l=Ce([Mt,gm,xl,ym,CC,EC,bn],Ile),wl=Ce(En,xl,(e,t)=>{if(!(e==null||t==null))return Dv(Dv({},e),{},{scale:t})}),zle=Ce([En,zf,bC,H8],xC);Ce((e,t,n)=>oC(e,n),zle,(e,t)=>{if(!(e==null||t==null))return Dv(Dv({},e),{},{scale:t})});var Ule=Ce([Mt,zy,Uy],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),Q8=e=>e.options.defaultTooltipEventType,J8=e=>e.options.validateTooltipEventTypes;function eI(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function AC(e,t){var n=Q8(e),r=J8(e);return eI(t,n,r)}function Ble(e){return Ze(t=>AC(t,e))}var tI=(e,t)=>{var n,r=Number(t);if(!(Aa(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},Fle=e=>e.tooltip.settings,il={active:!1,index:null,dataKey:void 0,coordinate:void 0},$le={itemInteraction:{click:il,hover:il},axisInteraction:{click:il,hover:il},keyboardInteraction:il,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},nI=jt({name:"tooltip",initialState:$le,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ir()},removeTooltipEntrySettings:{reducer(e,t){var n=Vo(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:ir()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:Vle,removeTooltipEntrySettings:Hle,setTooltipSettingsState:qle,setActiveMouseOverItemIndex:rI,mouseLeaveItem:Gle,mouseLeaveChart:iI,setActiveClickItemIndex:Yle,setMouseOverAxisIndex:aI,setMouseClickAxisIndex:Wle,setSyncInteraction:F_,setKeyboardInteraction:$_}=nI.actions,Kle=nI.reducer;function jP(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 mg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jP(Object(n),!0).forEach(function(r){Zle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zle(e,t,n){return(t=Xle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xle(e){var t=Qle(e,"string");return typeof t=="symbol"?t:t+""}function Qle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jle(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function eue(e){return e.index!=null}var oI=(e,t,n,r)=>{if(t==null)return il;var i=Jle(e,t,n);if(i==null)return il;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(eue(i)){if(o)return mg(mg({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return mg(mg({},il),{},{coordinate:i.coordinate})},TC=(e,t)=>{var n=e?.index;if(n==null)return null;var r=Number(n);if(!Bn(r))return n;var i=0,o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(i,Math.min(r,o)))},sI=(e,t,n,r,i,o,l,c)=>{if(!(o==null||c==null)){var f=l[0],h=f==null?void 0:c(f.positions,o);if(h!=null)return h;var m=i?.[Number(o)];if(m)switch(n){case"horizontal":return{x:m.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:m.coordinate}}}},lI=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return n==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var l;return((l=o.settings)===null||l===void 0?void 0:l.dataKey)===i})},bm=e=>e.options.tooltipPayloadSearcher,Uf=e=>e.tooltip;function MP(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 PP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MP(Object(n),!0).forEach(function(r){tue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tue(e,t,n){return(t=nue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nue(e){var t=rue(e,"string");return typeof t=="symbol"?t:t+""}function rue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iue(e,t){return e??t}var uI=(e,t,n,r,i,o,l)=>{if(!(t==null||o==null)){var{chartData:c,computedData:f,dataStartIndex:h,dataEndIndex:m}=n,y=[];return e.reduce((x,b)=>{var C,{dataDefinedOnItem:w,settings:A}=b,O=iue(w,c),P=Array.isArray(O)?XD(O,h,m):O,N=(C=A?.dataKey)!==null&&C!==void 0?C:r,F=A?.nameKey,U;if(r&&Array.isArray(P)&&!Array.isArray(P[0])&&l==="axis"?U=RD(P,r,i):U=o(P,t,f,F),Array.isArray(U))U.forEach(X=>{var ae=PP(PP({},A),{},{name:X.name,unit:X.unit,color:void 0,fill:void 0});x.push(aM({tooltipEntrySettings:ae,dataKey:X.dataKey,payload:X.payload,value:nn(X.payload,X.dataKey),name:X.name}))});else{var W;x.push(aM({tooltipEntrySettings:A,dataKey:N,payload:U,value:nn(U,N),name:(W=nn(U,F))!==null&&W!==void 0?W:A?.name}))}return x},y)}},OC=Ce([fr,Mt,j8,JS,cr],$8),aue=Ce([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),oue=Ce([cr,kf],sC),xm=Ce([aue,fr,oue],lC,{memoizeOptions:{resultEqualityCheck:n0}}),sue=Ce([xm],e=>e.filter(e0)),lue=Ce([xm],uC,{memoizeOptions:{resultEqualityCheck:n0}}),Bf=Ce([lue,Ll],cC),uue=Ce([sue,Ll,fr],A8),jC=Ce([Bf,fr,xm],dC),cI=Ce([fr],hC),cue=Ce([fr],e=>e.allowDataOverflow),fI=Ce([cI,cue],r8),fue=Ce([xm],e=>e.filter(e0)),due=Ce([uue,fue,mm],R8),hue=Ce([due,Ll,cr,fI],D8),mue=Ce([xm],P8),pue=Ce([Bf,fr,mue,a0,cr],gC,{memoizeOptions:{resultEqualityCheck:t0}}),gue=Ce([k8,cr,kf],If),vue=Ce([gue,cr],U8),yue=Ce([I8,cr,kf],If),bue=Ce([yue,cr],B8),xue=Ce([z8,cr,kf],If),_ue=Ce([xue,cr],F8),wue=Ce([vue,_ue,bue],kv),Sue=Ce([fr,cI,fI,hue,pue,wue,Mt,cr],vC),dI=Ce([fr,Mt,Bf,jC,mm,cr,Sue],yC),Cue=Ce([dI,fr,OC],_C),Eue=Ce([fr,dI,Cue,cr],SC),hI=e=>{var t=cr(e),n=kf(e),r=!1;return ym(e,t,n,r)},mI=Ce([fr,hI],Qy),pI=Ce([fr,OC,Eue,mI],xC),Aue=Ce([Mt,jC,fr,cr],K8),Tue=Ce([Mt,jC,fr,cr],Z8),Oue=(e,t,n,r,i,o,l,c)=>{if(t){var{type:f}=t,h=Ol(e,c);if(r){var m=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,y=f==="category"&&r.bandwidth?r.bandwidth()/m:0;return y=c==="angleAxis"&&i!=null&&i?.length>=2?yr(i[0]-i[1])*2*y:y,h&&l?l.map((x,b)=>({coordinate:r(x)+y,value:x,index:b,offset:y})):r.domain().map((x,b)=>({coordinate:r(x)+y,value:o?o[x]:x,index:b,offset:y}))}}},hs=Ce([Mt,fr,OC,pI,hI,Aue,Tue,cr],Oue),MC=Ce([Q8,J8,Fle],(e,t,n)=>eI(n.shared,e,t)),gI=e=>e.tooltip.settings.trigger,PC=e=>e.tooltip.settings.defaultIndex,l0=Ce([Uf,MC,gI,PC],oI),Sl=Ce([l0,Bf],TC),vI=Ce([hs,Sl],tI),yI=Ce([l0],e=>{if(e)return e.dataKey}),bI=Ce([Uf,MC,gI,PC],lI),jue=Ce([ls,us,Mt,lr,hs,PC,bI,bm],sI),Mue=Ce([l0,jue],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Pue=Ce([l0],e=>e.active),Lue=Ce([bI,Sl,Ll,N8,vI,bm,MC],uI),Nue=Ce([Lue],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function LP(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 NP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LP(Object(n),!0).forEach(function(r){Rue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rue(e,t,n){return(t=Due(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Due(e){var t=kue(e,"string");return typeof t=="symbol"?t:t+""}function kue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Iue=()=>Ze(fr),zue=()=>{var e=Iue(),t=Ze(hs),n=Ze(pI);return mf(!e||!n?void 0:NP(NP({},e),{},{scale:n}),t)};function RP(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 Yc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RP(Object(n),!0).forEach(function(r){Uue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uue(e,t,n){return(t=Bue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bue(e){var t=Fue(e,"string");return typeof t=="symbol"?t:t+""}function Fue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $ue=(e,t,n,r)=>{var i=t.find(o=>o&&o.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.chartY};if(e==="vertical")return{x:r.chartX,y:i.coordinate}}return{x:0,y:0}},Vue=(e,t,n,r)=>{var i=t.find(h=>h&&h.index===n);if(i){if(e==="centric"){var o=i.coordinate,{radius:l}=r;return Yc(Yc(Yc({},r),Kn(r.cx,r.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,{angle:f}=r;return Yc(Yc(Yc({},r),Kn(r.cx,r.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function Hue(e,t){var{chartX:n,chartY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var xI=(e,t,n,r,i)=>{var o,l=-1,c=(o=t?.length)!==null&&o!==void 0?o:0;if(c<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var f=0;f<c;f++){var h=f>0?n[f-1].coordinate:n[c-1].coordinate,m=n[f].coordinate,y=f>=c-1?n[0].coordinate:n[f+1].coordinate,x=void 0;if(yr(m-h)!==yr(y-m)){var b=[];if(yr(y-m)===yr(i[1]-i[0])){x=y;var C=m+i[1]-i[0];b[0]=Math.min(C,(C+h)/2),b[1]=Math.max(C,(C+h)/2)}else{x=h;var w=y+i[1]-i[0];b[0]=Math.min(m,(w+m)/2),b[1]=Math.max(m,(w+m)/2)}var A=[Math.min(m,(x+m)/2),Math.max(m,(x+m)/2)];if(e>A[0]&&e<=A[1]||e>=b[0]&&e<=b[1]){({index:l}=n[f]);break}}else{var O=Math.min(h,y),P=Math.max(h,y);if(e>(O+m)/2&&e<=(P+m)/2){({index:l}=n[f]);break}}}else if(t){for(var N=0;N<c;N++)if(N===0&&e<=(t[N].coordinate+t[N+1].coordinate)/2||N>0&&N<c-1&&e>(t[N].coordinate+t[N-1].coordinate)/2&&e<=(t[N].coordinate+t[N+1].coordinate)/2||N===c-1&&e>(t[N].coordinate+t[N-1].coordinate)/2){({index:l}=t[N]);break}}return l},que=()=>Ze(JS),LC=(e,t)=>t,_I=(e,t,n)=>n,NC=(e,t,n,r)=>r,Gue=Ce(hs,e=>Iy(e,t=>t.coordinate)),RC=Ce([Uf,LC,_I,NC],oI),wI=Ce([RC,Bf],TC),Yue=(e,t,n)=>{if(t!=null){var r=Uf(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},SI=Ce([Uf,LC,_I,NC],lI),Iv=Ce([ls,us,Mt,lr,hs,NC,SI,bm],sI),Wue=Ce([RC,Iv],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),CI=Ce([hs,wI],tI),Kue=Ce([SI,wI,Ll,N8,CI,bm,LC],uI),Zue=Ce([RC],e=>({isActive:e.active,activeIndex:e.index})),Xue=(e,t,n,r,i,o,l)=>{if(!(!e||!n||!r||!i)&&Hue(e,l)){var c=Wne(e,t),f=xI(c,o,i,n,r),h=$ue(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},Que=(e,t,n,r,i,o,l)=>{if(!(!e||!r||!i||!o||!n)){var c=Uie(e,n);if(c){var f=Kne(c,t),h=xI(f,l,o,r,i),m=Vue(t,o,h,c);return{activeIndex:String(h),activeCoordinate:m}}}},Jue=(e,t,n,r,i,o,l,c)=>{if(!(!e||!t||!r||!i||!o))return t==="horizontal"||t==="vertical"?Xue(e,t,r,i,o,l,c):Que(e,t,n,r,i,o,l)},ece=Ce(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElementId:r.elementId}}),tce=Ce(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(Un)),n=Array.from(new Set(t));return n.sort((r,i)=>r-i)},{memoizeOptions:{resultEqualityCheck:$se}});function DP(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 kP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DP(Object(n),!0).forEach(function(r){nce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nce(e,t,n){return(t=rce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rce(e){var t=ice(e,"string");return typeof t=="symbol"?t:t+""}function ice(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ace={},oce={zIndexMap:Object.values(Un).reduce((e,t)=>kP(kP({},e),{},{[t]:{elementId:void 0,panoramaElementId:void 0,consumers:0}}),ace)},sce=new Set(Object.values(Un));function lce(e){return sce.has(e)}var EI=jt({name:"zIndex",initialState:oce,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,elementId:void 0,panoramaElementId:void 0}},prepare:ir()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!lce(n)&&delete e.zIndexMap[n])},prepare:ir()},registerZIndexPortalId:{reducer:(e,t)=>{var{zIndex:n,elementId:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElementId=r:e.zIndexMap[n].elementId=r:e.zIndexMap[n]={consumers:0,elementId:i?void 0:r,panoramaElementId:i?r:void 0}},prepare:ir()},unregisterZIndexPortalId:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElementId=void 0:e.zIndexMap[n].elementId=void 0)},prepare:ir()}}}),{registerZIndexPortal:uce,unregisterZIndexPortal:cce,registerZIndexPortalId:fce,unregisterZIndexPortalId:dce}=EI.actions,hce=EI.reducer;function Kr(e){var{zIndex:t,children:n}=e,r=Are(),i=r&&t!==void 0&&t!==0,o=jr(),l=cn();_.useLayoutEffect(()=>i?(l(uce({zIndex:t})),()=>{l(cce({zIndex:t}))}):Xu,[l,t,i]);var c=Ze(h=>ece(h,t,o));if(!i)return n;if(!c)return null;var f=document.getElementById(c);return f?Tf.createPortal(n,f):null}function V_(){return V_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V_.apply(null,arguments)}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 pg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IP(Object(n),!0).forEach(function(r){mce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mce(e,t,n){return(t=pce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pce(e){var t=gce(e,"string");return typeof t=="symbol"?t:t+""}function gce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vce(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return _.isValidElement(t)?_.cloneElement(t,r):_.createElement(n,r)}function yce(e){var t,{coordinate:n,payload:r,index:i,offset:o,tooltipAxisBandSize:l,layout:c,cursor:f,tooltipEventType:h,chartName:m}=e,y=n,x=r,b=i;if(!f||!y||m!=="ScatterChart"&&h!=="axis")return null;var C,w,A;if(m==="ScatterChart")C=y,w=tie,A=Un.cursorLine;else if(m==="BarChart")C=nie(c,y,o,l),w=AS,A=Un.cursorRectangle;else if(c==="radial"&&ID(y)){var{cx:O,cy:P,radius:N,startAngle:F,endAngle:U}=bk(y);C={cx:O,cy:P,startAngle:F,endAngle:U,innerRadius:N,outerRadius:N},w=_k,A=Un.cursorLine}else C={points:Vie(c,y,o)},w=ES,A=Un.cursorLine;var W=typeof f=="object"&&"className"in f?f.className:void 0,X=pg(pg(pg(pg({stroke:"#ccc",pointerEvents:"none"},o),C),Fu(f)),{},{payload:x,payloadIndex:b,className:Oe("recharts-tooltip-cursor",W)});return _.createElement(Kr,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:A},_.createElement(vce,{cursor:f,cursorComp:w,cursorProps:X}))}function bce(e){var t=zue(),n=sk(),r=sm(),i=que();return t==null||n==null||r==null||i==null?null:_.createElement(yce,V_({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var AI=_.createContext(null),xce=()=>_.useContext(AI),l2={exports:{}},zP;function _ce(){return zP||(zP=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(f,h,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,y,x){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new i(m,y||f,x),C=n?n+h:h;return f._events[C]?f._events[C].fn?f._events[C]=[f._events[C],b]:f._events[C].push(b):(f._events[C]=b,f._eventsCount++),f}function l(f,h){--f._eventsCount===0?f._events=new r:delete f._events[h]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],m,y;if(this._eventsCount===0)return h;for(y in m=this._events)t.call(m,y)&&h.push(n?y.slice(1):y);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},c.prototype.listeners=function(h){var m=n?n+h:h,y=this._events[m];if(!y)return[];if(y.fn)return[y.fn];for(var x=0,b=y.length,C=new Array(b);x<b;x++)C[x]=y[x].fn;return C},c.prototype.listenerCount=function(h){var m=n?n+h:h,y=this._events[m];return y?y.fn?1:y.length:0},c.prototype.emit=function(h,m,y,x,b,C){var w=n?n+h:h;if(!this._events[w])return!1;var A=this._events[w],O=arguments.length,P,N;if(A.fn){switch(A.once&&this.removeListener(h,A.fn,void 0,!0),O){case 1:return A.fn.call(A.context),!0;case 2:return A.fn.call(A.context,m),!0;case 3:return A.fn.call(A.context,m,y),!0;case 4:return A.fn.call(A.context,m,y,x),!0;case 5:return A.fn.call(A.context,m,y,x,b),!0;case 6:return A.fn.call(A.context,m,y,x,b,C),!0}for(N=1,P=new Array(O-1);N<O;N++)P[N-1]=arguments[N];A.fn.apply(A.context,P)}else{var F=A.length,U;for(N=0;N<F;N++)switch(A[N].once&&this.removeListener(h,A[N].fn,void 0,!0),O){case 1:A[N].fn.call(A[N].context);break;case 2:A[N].fn.call(A[N].context,m);break;case 3:A[N].fn.call(A[N].context,m,y);break;case 4:A[N].fn.call(A[N].context,m,y,x);break;default:if(!P)for(U=1,P=new Array(O-1);U<O;U++)P[U-1]=arguments[U];A[N].fn.apply(A[N].context,P)}}return!0},c.prototype.on=function(h,m,y){return o(this,h,m,y,!1)},c.prototype.once=function(h,m,y){return o(this,h,m,y,!0)},c.prototype.removeListener=function(h,m,y,x){var b=n?n+h:h;if(!this._events[b])return this;if(!m)return l(this,b),this;var C=this._events[b];if(C.fn)C.fn===m&&(!x||C.once)&&(!y||C.context===y)&&l(this,b);else{for(var w=0,A=[],O=C.length;w<O;w++)(C[w].fn!==m||x&&!C[w].once||y&&C[w].context!==y)&&A.push(C[w]);A.length?this._events[b]=A.length===1?A[0]:A:l(this,b)}return this},c.prototype.removeAllListeners=function(h){var m;return h?(m=n?n+h:h,this._events[m]&&l(this,m)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c}(l2)),l2.exports}var wce=_ce();const Sce=aa(wce);var $h=new Sce,H_="recharts.syncEvent.tooltip",UP="recharts.syncEvent.brush";function DC(e,t){if(t){var n=Number.parseInt(t,10);if(!Aa(n))return e?.[n]}}var Cce={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},TI=jt({name:"options",initialState:Cce,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Ece=TI.reducer,{createEventEmitter:Ace}=TI.actions;function Tce(e){return e.tooltip.syncInteraction}var Oce={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},OI=jt({name:"chartData",initialState:Oce,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:BP,setDataStartEndIndexes:jce,setComputedData:awe}=OI.actions,Mce=OI.reducer,Pce=["x","y"];function FP(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 Wc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(n),!0).forEach(function(r){Lce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lce(e,t,n){return(t=Nce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nce(e){var t=Rce(e,"string");return typeof t=="symbol"?t:t+""}function Rce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dce(e,t){if(e==null)return{};var n,r,i=kce(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ice(){var e=Ze(eC),t=Ze(tC),n=cn(),r=Ze(x8),i=Ze(hs),o=sm(),l=$y(),c=Ze(f=>f.rootProps.className);_.useEffect(()=>{if(e==null)return Xu;var f=(h,m,y)=>{if(t!==y&&e===h){if(r==="index"){var x;if(l&&m!==null&&m!==void 0&&(x=m.payload)!==null&&x!==void 0&&x.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,{x:C,y:w}=b,A=Dce(b,Pce),{x:O,y:P,width:N,height:F}=m.payload.sourceViewBox,U=Wc(Wc({},A),{},{x:l.x+(N?(C-O)/N:0)*l.width,y:l.y+(F?(w-P)/F:0)*l.height});n(Wc(Wc({},m),{},{payload:Wc(Wc({},m.payload),{},{coordinate:U})}))}else n(m);return}if(i!=null){var W;if(typeof r=="function"){var X={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},ae=r(i,X);W=i[ae]}else r==="value"&&(W=i.find(Y=>String(Y.value)===m.payload.label));var{coordinate:ce}=m.payload;if(W==null||m.payload.active===!1||ce==null||l==null){n(F_({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0}));return}var{x:re,y:J}=ce,oe=Math.min(re,l.x+l.width),_e=Math.min(J,l.y+l.height),se={x:o==="horizontal"?W.coordinate:oe,y:o==="horizontal"?_e:W.coordinate},ue=F_({active:m.payload.active,coordinate:se,dataKey:m.payload.dataKey,index:String(W.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox});n(ue)}}};return $h.on(H_,f),()=>{$h.off(H_,f)}},[c,n,t,e,r,i,o,l])}function zce(){var e=Ze(eC),t=Ze(tC),n=cn();_.useEffect(()=>{if(e==null)return Xu;var r=(i,o,l)=>{t!==l&&e===i&&n(jce(o))};return $h.on(UP,r),()=>{$h.off(UP,r)}},[n,t,e])}function Uce(){var e=cn();_.useEffect(()=>{e(Ace())},[e]),Ice(),zce()}function Bce(e,t,n,r,i,o){var l=Ze(b=>Yue(b,e,t)),c=Ze(tC),f=Ze(eC),h=Ze(x8),m=Ze(Tce),y=m?.active,x=$y();_.useEffect(()=>{if(!y&&f!=null&&c!=null){var b=F_({active:o,coordinate:n,dataKey:l,index:i,label:typeof r=="number"?String(r):r,sourceViewBox:x});$h.emit(H_,f,b,c)}},[y,n,l,i,r,c,f,h,o,x])}function $P(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 VP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$P(Object(n),!0).forEach(function(r){Fce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$P(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fce(e,t,n){return(t=$ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ce(e){var t=Vce(e,"string");return typeof t=="symbol"?t:t+""}function Vce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hce(e){return e.dataKey}function qce(e,t){return _.isValidElement(e)?_.cloneElement(e,t):typeof e=="function"?_.createElement(e,t):_.createElement(Nre,t)}var HP=[],Gce={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!jl.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function kC(e){var t,n,r=sr(e,Gce),{active:i,allowEscapeViewBox:o,animationDuration:l,animationEasing:c,content:f,filterNull:h,isAnimationActive:m,offset:y,payloadUniqBy:x,position:b,reverseDirection:C,useTranslate3d:w,wrapperStyle:A,cursor:O,shared:P,trigger:N,defaultIndex:F,portal:U,axisId:W}=r,X=cn(),ae=typeof F=="number"?String(F):F;_.useEffect(()=>{X(qle({shared:P,trigger:N,axisId:W,active:i,defaultIndex:ae}))},[X,P,N,W,i,ae]);var ce=$y(),re=hk(),J=Ble(P),{activeIndex:oe,isActive:_e}=(t=Ze(ve=>Zue(ve,J,N,ae)))!==null&&t!==void 0?t:{},se=Ze(ve=>Kue(ve,J,N,ae)),ue=Ze(ve=>CI(ve,J,N,ae)),Y=Ze(ve=>Wue(ve,J,N,ae)),k=se,z=xce(),H=(n=i??_e)!==null&&n!==void 0?n:!1,[I,j]=Ane([k,H]),q=J==="axis"?ue:void 0;Bce(J,N,Y,q,oe,H);var ee=U??z;if(ee==null||ce==null||J==null)return null;var le=k??HP;H||(le=HP),h&&le.length&&(le=lne(le.filter(ve=>ve.value!=null&&(ve.hide!==!0||r.includeHidden)),x,Hce));var pe=le.length>0,he=_.createElement(Bre,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:m,active:H,coordinate:Y,hasPayload:pe,offset:y,position:b,reverseDirection:C,useTranslate3d:w,viewBox:ce,wrapperStyle:A,lastBoundingBox:I,innerRef:j,hasPortalFromProps:!!U},qce(f,VP(VP({},r),{},{payload:le,label:q,active:H,activeIndex:oe,coordinate:Y,accessibilityLayer:re})));return _.createElement(_.Fragment,null,Tf.createPortal(he,ee),H&&_.createElement(bce,{cursor:O,tooltipEventType:J,coordinate:Y,payload:le,index:oe}))}var ll=e=>null;ll.displayName="Cell";function Yce(e,t,n){return(t=Wce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wce(e){var t=Kce(e,"string");return typeof t=="symbol"?t:t+""}function Kce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Zce{constructor(t){Yce(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function qP(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 Xce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qP(Object(n),!0).forEach(function(r){Qce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qce(e,t,n){return(t=Jce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jce(e){var t=efe(e,"string");return typeof t=="symbol"?t:t+""}function efe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tfe={cacheSize:2e3,enableCache:!0},jI=Xce({},tfe),GP=new Zce(jI.cacheSize),nfe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},YP="recharts_measurement_span";function rfe(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",l=t.letterSpacing||"",c=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(l,"|").concat(c)}var WP=(e,t)=>{try{var n=document.getElementById(YP);n||(n=document.createElement("span"),n.setAttribute("id",YP),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,nfe,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},_h=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||jl.isSsr)return{width:0,height:0};if(!jI.enableCache)return WP(t,n);var r=rfe(t,n),i=GP.get(r);if(i)return i;var o=WP(t,n);return GP.set(r,o),o},KP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ZP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ife=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,afe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,MI={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ofe=Object.keys(MI),Jc="NaN";function sfe(e,t){return e*MI[t]}class ui{static parse(t){var n,[,r,i]=(n=afe.exec(t))!==null&&n!==void 0?n:[];return new ui(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Aa(t)&&(this.unit=""),n!==""&&!ife.test(n)&&(this.num=NaN,this.unit=""),ofe.includes(n)&&(this.num=sfe(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new ui(NaN,""):new ui(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new ui(NaN,""):new ui(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ui(NaN,""):new ui(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ui(NaN,""):new ui(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Aa(this.num)}}function PI(e){if(e.includes(Jc))return Jc;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=KP.exec(t))!==null&&n!==void 0?n:[],l=ui.parse(r??""),c=ui.parse(o??""),f=i==="*"?l.multiply(c):l.divide(c);if(f.isNaN())return Jc;t=t.replace(KP,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,[,m,y,x]=(h=ZP.exec(t))!==null&&h!==void 0?h:[],b=ui.parse(m??""),C=ui.parse(x??""),w=y==="+"?b.add(C):b.subtract(C);if(w.isNaN())return Jc;t=t.replace(ZP,w.toString())}return t}var XP=/\(([^()]*)\)/;function lfe(e){for(var t=e,n;(n=XP.exec(t))!=null;){var[,r]=n;t=t.replace(XP,PI(r))}return t}function ufe(e){var t=e.replace(/\s+/g,"");return t=lfe(t),t=PI(t),t}function cfe(e){try{return ufe(e)}catch{return Jc}}function u2(e){var t=cfe(e.slice(5,-1));return t===Jc?"":t}var ffe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],dfe=["dx","dy","angle","className","breakAll"];function q_(){return q_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q_.apply(null,arguments)}function QP(e,t){if(e==null)return{};var n,r,i=hfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hfe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var LI=/[ \f\n\r\t\v\u2028\u2029]+/,NI=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];yn(t)||(n?i=t.toString().split(""):i=t.toString().split(LI));var o=i.map(c=>({word:c,width:_h(c,r).width})),l=n?0:_h(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}};function mfe(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var RI=(e,t,n,r)=>e.reduce((i,o)=>{var{word:l,width:c}=o,f=i[i.length-1];if(f&&c!=null&&(t==null||r||f.width+c+n<Number(t)))f.words.push(l),f.width+=c+n;else{var h={words:[l],width:c};i.push(h)}return i},[]),DI=e=>e.reduce((t,n)=>t.width>n.width?t:n),pfe="…",JP=(e,t,n,r,i,o,l,c)=>{var f=e.slice(0,t),h=NI({breakAll:n,style:r,children:f+pfe});if(!h)return[!1,[]];var m=RI(h.wordsWithComputedWidth,o,l,c),y=m.length>i||DI(m).width>Number(o);return[y,m]},gfe=(e,t,n,r,i)=>{var{maxLines:o,children:l,style:c,breakAll:f}=e,h=Xe(o),m=String(l),y=RI(t,r,n,i);if(!h||i)return y;var x=y.length>o||DI(y).width>Number(r);if(!x)return y;for(var b=0,C=m.length-1,w=0,A;b<=C&&w<=m.length-1;){var O=Math.floor((b+C)/2),P=O-1,[N,F]=JP(m,P,f,c,o,r,n,i),[U]=JP(m,O,f,c,o,r,n,i);if(!N&&!U&&(b=O+1),N&&U&&(C=O-1),!N&&U){A=F;break}w++}return A||y},e5=e=>{var t=yn(e)?[]:e.toString().split(LI);return[{words:t,width:void 0}]},vfe=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:l}=e;if((t||n)&&!jl.isSsr){var c,f,h=NI({breakAll:o,children:r,style:i});if(h){var{wordsWithComputedWidth:m,spaceWidth:y}=h;c=m,f=y}else return e5(r);return gfe({breakAll:o,children:r,maxLines:l,style:i},c,f,t,!!n)}return e5(r)},kI="#808080",yfe={breakAll:!1,capHeight:"0.71em",fill:kI,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},u0=_.forwardRef((e,t)=>{var n=sr(e,yfe),{x:r,y:i,lineHeight:o,capHeight:l,fill:c,scaleToFit:f,textAnchor:h,verticalAnchor:m}=n,y=QP(n,ffe),x=_.useMemo(()=>vfe({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:f,style:y.style,width:y.width}),[y.breakAll,y.children,y.maxLines,f,y.style,y.width]),{dx:b,dy:C,angle:w,className:A,breakAll:O}=y,P=QP(y,dfe);if(!ci(r)||!ci(i)||x.length===0)return null;var N=Number(r)+(Xe(b)?b:0),F=Number(i)+(Xe(C)?C:0);if(!Bn(N)||!Bn(F))return null;var U;switch(m){case"start":U=u2("calc(".concat(l,")"));break;case"middle":U=u2("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(l," / 2))"));break;default:U=u2("calc(".concat(x.length-1," * -").concat(o,")"));break}var W=[];if(f){var X=x[0].width,{width:ae}=y;W.push("scale(".concat(Xe(ae)&&Xe(X)?ae/X:1,")"))}return w&&W.push("rotate(".concat(w,", ").concat(N,", ").concat(F,")")),W.length&&(P.transform=W.join(" ")),_.createElement("text",q_({},zr(P),{ref:t,x:N,y:F,className:Oe("recharts-text",A),textAnchor:h,fill:c.includes("url")?kI:c}),x.map((ce,re)=>{var J=ce.words.join(O?"":" ");return _.createElement("tspan",{x:N,dy:re===0?U:o,key:"".concat(J,"-").concat(re)},J)}))});u0.displayName="Text";var bfe=["labelRef"];function xfe(e,t){if(e==null)return{};var n,r,i=_fe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _fe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function t5(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 zn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t5(Object(n),!0).forEach(function(r){wfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wfe(e,t,n){return(t=Sfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sfe(e){var t=Cfe(e,"string");return typeof t=="symbol"?t:t+""}function Cfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uo.apply(null,arguments)}var II=_.createContext(null),zI=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:i,width:o,height:l,children:c}=e,f=_.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:o,height:l}),[t,n,r,i,o,l]);return _.createElement(II.Provider,{value:f},c)},UI=()=>{var e=_.useContext(II),t=$y();return e||ok(t)},Efe=_.createContext(null),Afe=()=>{var e=_.useContext(Efe),t=Ze(E8);return e||t},Tfe=e=>{var{value:t,formatter:n}=e,r=yn(e.children)?t:e.children;return typeof n=="function"?n(r):r},IC=e=>e!=null&&typeof e=="function",Ofe=(e,t)=>{var n=yr(t-e),r=Math.min(Math.abs(t-e),360);return n*r},jfe=(e,t,n,r,i)=>{var{offset:o,className:l}=e,{cx:c,cy:f,innerRadius:h,outerRadius:m,startAngle:y,endAngle:x,clockWise:b}=i,C=(h+m)/2,w=Ofe(y,x),A=w>=0?1:-1,O,P;switch(t){case"insideStart":O=y+A*o,P=b;break;case"insideEnd":O=x-A*o,P=!b;break;case"end":O=x+A*o,P=b;break;default:throw new Error("Unsupported position ".concat(t))}P=w<=0?P:!P;var N=Kn(c,f,C,O),F=Kn(c,f,C,O+(P?1:-1)*359),U="M".concat(N.x,",").concat(N.y,`
A`).concat(C,",").concat(C,",0,1,").concat(P?0:1,`,
`).concat(F.x,",").concat(F.y),W=yn(e.id)?Dh("recharts-radial-line-"):e.id;return _.createElement("text",Uo({},r,{dominantBaseline:"central",className:Oe("recharts-radial-bar-label",l)}),_.createElement("defs",null,_.createElement("path",{id:W,d:U})),_.createElement("textPath",{xlinkHref:"#".concat(W)},n))},Mfe=(e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:l,startAngle:c,endAngle:f}=e,h=(c+f)/2;if(n==="outside"){var{x:m,y}=Kn(r,i,l+t,h);return{x:m,y,textAnchor:m>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var x=(o+l)/2,{x:b,y:C}=Kn(r,i,x,h);return{x:b,y:C,textAnchor:"middle",verticalAnchor:"middle"}},G_=e=>"cx"in e&&Xe(e.cx),Pfe=(e,t)=>{var{parentViewBox:n,offset:r,position:i}=e,o;n!=null&&!G_(n)&&(o=n);var{x:l,y:c,upperWidth:f,lowerWidth:h,height:m}=t,y=l,x=l+(f-h)/2,b=(y+x)/2,C=(f+h)/2,w=y+f/2,A=m>=0?1:-1,O=A*r,P=A>0?"end":"start",N=A>0?"start":"end",F=f>=0?1:-1,U=F*r,W=F>0?"end":"start",X=F>0?"start":"end";if(i==="top"){var ae={x:y+f/2,y:c-O,textAnchor:"middle",verticalAnchor:P};return zn(zn({},ae),o?{height:Math.max(c-o.y,0),width:f}:{})}if(i==="bottom"){var ce={x:x+h/2,y:c+m+O,textAnchor:"middle",verticalAnchor:N};return zn(zn({},ce),o?{height:Math.max(o.y+o.height-(c+m),0),width:h}:{})}if(i==="left"){var re={x:b-U,y:c+m/2,textAnchor:W,verticalAnchor:"middle"};return zn(zn({},re),o?{width:Math.max(re.x-o.x,0),height:m}:{})}if(i==="right"){var J={x:b+C+U,y:c+m/2,textAnchor:X,verticalAnchor:"middle"};return zn(zn({},J),o?{width:Math.max(o.x+o.width-J.x,0),height:m}:{})}var oe=o?{width:C,height:m}:{};return i==="insideLeft"?zn({x:b+U,y:c+m/2,textAnchor:X,verticalAnchor:"middle"},oe):i==="insideRight"?zn({x:b+C-U,y:c+m/2,textAnchor:W,verticalAnchor:"middle"},oe):i==="insideTop"?zn({x:y+f/2,y:c+O,textAnchor:"middle",verticalAnchor:N},oe):i==="insideBottom"?zn({x:x+h/2,y:c+m-O,textAnchor:"middle",verticalAnchor:P},oe):i==="insideTopLeft"?zn({x:y+U,y:c+O,textAnchor:X,verticalAnchor:N},oe):i==="insideTopRight"?zn({x:y+f-U,y:c+O,textAnchor:W,verticalAnchor:N},oe):i==="insideBottomLeft"?zn({x:x+U,y:c+m-O,textAnchor:X,verticalAnchor:P},oe):i==="insideBottomRight"?zn({x:x+h-U,y:c+m-O,textAnchor:W,verticalAnchor:P},oe):i&&typeof i=="object"&&(Xe(i.x)||Xo(i.x))&&(Xe(i.y)||Xo(i.y))?zn({x:l+kr(i.x,C),y:c+kr(i.y,m),textAnchor:"end",verticalAnchor:"end"},oe):zn({x:w,y:c+m/2,textAnchor:"middle",verticalAnchor:"middle"},oe)},Lfe={offset:5,zIndex:Un.label};function rl(e){var t=sr(e,Lfe),{viewBox:n,position:r,value:i,children:o,content:l,className:c="",textBreakAll:f,labelRef:h}=t,m=Afe(),y=UI(),x=r==="center"?y:m??y,b,C,w;if(n==null?b=x:G_(n)?b=n:b=ok(n),!b||yn(i)&&yn(o)&&!_.isValidElement(l)&&typeof l!="function")return null;var A=zn(zn({},t),{},{viewBox:b});if(_.isValidElement(l)){var{labelRef:O}=A,P=xfe(A,bfe);return _.cloneElement(l,P)}if(typeof l=="function"){if(C=_.createElement(l,A),_.isValidElement(C))return C}else C=Tfe(t);var N=zr(t);if(G_(b)){if(r==="insideStart"||r==="insideEnd"||r==="end")return jfe(t,r,C,N,b);w=Mfe(b,t.offset,t.position)}else w=Pfe(t,b);return _.createElement(Kr,{zIndex:t.zIndex},_.createElement(u0,Uo({ref:h,className:Oe("recharts-label",c)},N,w,{textAnchor:mfe(N.textAnchor)?N.textAnchor:w.textAnchor,breakAll:f}),C))}rl.displayName="Label";var Nfe=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?_.createElement(rl,Uo({key:"label-implicit"},r)):ci(e)?_.createElement(rl,Uo({key:"label-implicit",value:e},r)):_.isValidElement(e)?e.type===rl?_.cloneElement(e,zn({key:"label-implicit"},r)):_.createElement(rl,Uo({key:"label-implicit",content:e},r)):IC(e)?_.createElement(rl,Uo({key:"label-implicit",content:e},r)):e&&typeof e=="object"?_.createElement(rl,Uo({},e,{key:"label-implicit"},r)):null};function BI(e){var{label:t,labelRef:n}=e,r=UI();return Nfe(t,r,n)||null}var c2={},f2={},n5;function Rfe(){return n5||(n5=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t}(f2)),f2}var d2={},r5;function Dfe(){return r5||(r5=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t}(d2)),d2}var i5;function kfe(){return i5||(i5=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Rfe(),n=Dfe(),r=_S();function i(o){if(r.isArrayLike(o))return t.last(n.toArray(o))}e.last=i}(c2)),c2}var h2,a5;function Ife(){return a5||(a5=1,h2=kfe().last),h2}var zfe=Ife();const Ufe=aa(zfe);var Bfe=["valueAccessor"],Ffe=["dataKey","clockWise","id","textBreakAll","zIndex"];function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zv.apply(null,arguments)}function o5(e,t){if(e==null)return{};var n,r,i=$fe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $fe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Vfe=e=>Array.isArray(e.value)?Ufe(e.value):e.value,FI=_.createContext(void 0),$I=FI.Provider,VI=_.createContext(void 0),Hfe=VI.Provider;function qfe(){return _.useContext(FI)}function Gfe(){return _.useContext(VI)}function Ug(e){var{valueAccessor:t=Vfe}=e,n=o5(e,Bfe),{dataKey:r,clockWise:i,id:o,textBreakAll:l,zIndex:c}=n,f=o5(n,Ffe),h=qfe(),m=Gfe(),y=h||m;return!y||!y.length?null:_.createElement(Kr,{zIndex:c??Un.label},_.createElement(ar,{className:"recharts-label-list"},y.map((x,b)=>{var C,w=yn(r)?t(x,b):nn(x&&x.payload,r),A=yn(o)?{}:{id:"".concat(o,"-").concat(b)};return _.createElement(rl,zv({key:"label-".concat(b)},zr(x),f,A,{fill:(C=n.fill)!==null&&C!==void 0?C:x.fill,parentViewBox:x.parentViewBox,value:w,textBreakAll:l,viewBox:x.viewBox,index:b,zIndex:0}))})))}Ug.displayName="LabelList";function zC(e){var{label:t}=e;return t?t===!0?_.createElement(Ug,{key:"labelList-implicit"}):_.isValidElement(t)||IC(t)?_.createElement(Ug,{key:"labelList-implicit",content:t}):typeof t=="object"?_.createElement(Ug,zv({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Y_(){return Y_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y_.apply(null,arguments)}var HI=e=>{var{cx:t,cy:n,r,className:i}=e,o=Oe("recharts-dot",i);return Xe(t)&&Xe(n)&&Xe(r)?_.createElement("circle",Y_({},Di(e),xS(e),{className:o,cx:t,cy:n,r})):null},qI=e=>e.graphicalItems.polarItems,Yfe=Ce([bn,pm],sC),c0=Ce([qI,En,Yfe],lC),Wfe=Ce([c0],uC),f0=Ce([Wfe,ZS],cC),Kfe=Ce([f0,En,c0],dC);Ce([f0,En,c0],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(i=>{var o,l=nn(r,(o=t.dataKey)!==null&&o!==void 0?o:i.dataKey);return{value:l,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(r=>({value:nn(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]})));var s5=()=>{},Zfe=Ce([f0,En,c0,a0,bn],gC),Xfe=Ce([En,mC,pC,s5,Zfe,s5,Mt,bn],vC),GI=Ce([En,Mt,f0,Kfe,mm,bn,Xfe],yC),Qfe=Ce([GI,En,zf],_C);Ce([En,GI,Qfe,bn],SC);var Jfe={radiusAxis:{},angleAxis:{}},YI=jt({name:"polarAxis",initialState:Jfe,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:owe,removeRadiusAxis:swe,addAngleAxis:lwe,removeAngleAxis:uwe}=YI.actions,ede=YI.reducer;function l5(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 u5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l5(Object(n),!0).forEach(function(r){tde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tde(e,t,n){return(t=nde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nde(e){var t=rde(e,"string");return typeof t=="symbol"?t:t+""}function rde(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ide=(e,t)=>t,UC=Ce([qI,ide],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),ade=[],BC=(e,t,n)=>n?.length===0?ade:n,WI=Ce([ZS,UC,BC],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(o=>u5(u5({},t.presentationProps),o.props))),i!=null)return i}}),ode=Ce([WI,UC,BC],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,i)=>{var o,l=nn(r,t.nameKey,t.name),c;return n!=null&&(o=n[i])!==null&&o!==void 0&&(o=o.props)!==null&&o!==void 0&&o.fill?c=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?c=r.fill:c=t.fill,{value:Lf(l,t.dataKey),color:c,payload:r,type:t.legendType}})}),sde=Ce([WI,UC,BC,lr],(e,t,n,r)=>{if(!(t==null||e==null))return ohe({offset:r,pieSettings:t,displayedData:e,cells:n})}),m2={exports:{}},Ft={};var c5;function lde(){if(c5)return Ft;c5=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,C=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function N(U){if(typeof U=="object"&&U!==null){var W=U.$$typeof;switch(W){case t:switch(U=U.type,U){case f:case h:case r:case o:case i:case y:return U;default:switch(U=U&&U.$$typeof,U){case c:case m:case C:case b:case l:return U;default:return W}}case n:return W}}}function F(U){return N(U)===h}return Ft.AsyncMode=f,Ft.ConcurrentMode=h,Ft.ContextConsumer=c,Ft.ContextProvider=l,Ft.Element=t,Ft.ForwardRef=m,Ft.Fragment=r,Ft.Lazy=C,Ft.Memo=b,Ft.Portal=n,Ft.Profiler=o,Ft.StrictMode=i,Ft.Suspense=y,Ft.isAsyncMode=function(U){return F(U)||N(U)===f},Ft.isConcurrentMode=F,Ft.isContextConsumer=function(U){return N(U)===c},Ft.isContextProvider=function(U){return N(U)===l},Ft.isElement=function(U){return typeof U=="object"&&U!==null&&U.$$typeof===t},Ft.isForwardRef=function(U){return N(U)===m},Ft.isFragment=function(U){return N(U)===r},Ft.isLazy=function(U){return N(U)===C},Ft.isMemo=function(U){return N(U)===b},Ft.isPortal=function(U){return N(U)===n},Ft.isProfiler=function(U){return N(U)===o},Ft.isStrictMode=function(U){return N(U)===i},Ft.isSuspense=function(U){return N(U)===y},Ft.isValidElementType=function(U){return typeof U=="string"||typeof U=="function"||U===r||U===h||U===o||U===i||U===y||U===x||typeof U=="object"&&U!==null&&(U.$$typeof===C||U.$$typeof===b||U.$$typeof===l||U.$$typeof===c||U.$$typeof===m||U.$$typeof===A||U.$$typeof===O||U.$$typeof===P||U.$$typeof===w)},Ft.typeOf=N,Ft}var f5;function ude(){return f5||(f5=1,m2.exports=lde()),m2.exports}var cde=ude(),d5=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",h5=null,p2=null,KI=e=>{if(e===h5&&Array.isArray(p2))return p2;var t=[];return _.Children.forEach(e,n=>{yn(n)||(cde.isFragment(n)?t=t.concat(KI(n.props.children)):t.push(n))}),p2=t,h5=e,t};function FC(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>d5(i)):r=[d5(t)],KI(e).forEach(i=>{var o=$u(i,"type.displayName")||$u(i,"type.name");o&&r.indexOf(o)!==-1&&n.push(i)}),n}var ZI=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,g2={},m5;function fde(){return m5||(m5=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t}(g2)),g2}var v2,p5;function dde(){return p5||(p5=1,v2=fde().isPlainObject),v2}var hde=dde();const mde=aa(hde);function g5(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 v5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g5(Object(n),!0).forEach(function(r){pde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pde(e,t,n){return(t=gde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gde(e){var t=vde(e,"string");return typeof t=="symbol"?t:t+""}function vde(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uv(){return Uv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uv.apply(null,arguments)}var y5=(e,t,n,r,i)=>{var o=n-r,l;return l="M ".concat(e,",").concat(t),l+="L ".concat(e+n,",").concat(t),l+="L ".concat(e+n-o/2,",").concat(t+i),l+="L ".concat(e+n-o/2-r,",").concat(t+i),l+="L ".concat(e,",").concat(t," Z"),l},yde={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},bde=e=>{var t=sr(e,yde),{x:n,y:r,upperWidth:i,lowerWidth:o,height:l,className:c}=t,{animationEasing:f,animationDuration:h,animationBegin:m,isUpdateAnimationActive:y}=t,x=_.useRef(null),[b,C]=_.useState(-1),w=_.useRef(i),A=_.useRef(o),O=_.useRef(l),P=_.useRef(n),N=_.useRef(r),F=um(e,"trapezoid-");if(_.useEffect(()=>{if(x.current&&x.current.getTotalLength)try{var se=x.current.getTotalLength();se&&C(se)}catch{}},[]),n!==+n||r!==+r||i!==+i||o!==+o||l!==+l||i===0&&o===0||l===0)return null;var U=Oe("recharts-trapezoid",c);if(!y)return _.createElement("g",null,_.createElement("path",Uv({},zr(t),{className:U,d:y5(n,r,i,o,l)})));var W=w.current,X=A.current,ae=O.current,ce=P.current,re=N.current,J="0px ".concat(b===-1?1:b,"px"),oe="".concat(b,"px 0px"),_e=mk(["strokeDasharray"],h,f);return _.createElement(lm,{animationId:F,key:F,canBegin:b>0,duration:h,easing:f,isActive:y,begin:m},se=>{var ue=mn(W,i,se),Y=mn(X,o,se),k=mn(ae,l,se),z=mn(ce,n,se),H=mn(re,r,se);x.current&&(w.current=ue,A.current=Y,O.current=k,P.current=z,N.current=H);var I=se>0?{transition:_e,strokeDasharray:oe}:{strokeDasharray:J};return _.createElement("path",Uv({},zr(t),{className:U,d:y5(z,H,ue,Y,k),ref:x,style:v5(v5({},I),t.style)}))})},xde=["option","shapeType","propTransformer","activeClassName","isActive"];function _de(e,t){if(e==null)return{};var n,r,i=wde(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wde(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function b5(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 Bv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b5(Object(n),!0).forEach(function(r){Sde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sde(e,t,n){return(t=Cde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cde(e){var t=Ede(e,"string");return typeof t=="symbol"?t:t+""}function Ede(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ade(e,t){return Bv(Bv({},t),e)}function Tde(e,t){return e==="symbols"}function x5(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return _.createElement(AS,n);case"trapezoid":return _.createElement(bde,n);case"sector":return _.createElement(_k,n);case"symbols":if(Tde(t))return _.createElement(kD,n);break;case"curve":return _.createElement(ES,n);default:return null}}function Ode(e){return _.isValidElement(e)?e.props:e}function $C(e){var{option:t,shapeType:n,propTransformer:r=Ade,activeClassName:i="recharts-active-shape",isActive:o}=e,l=_de(e,xde),c;if(_.isValidElement(t))c=_.cloneElement(t,Bv(Bv({},l),Ode(t)));else if(typeof t=="function")c=t(l);else if(mde(t)&&typeof t!="boolean"){var f=r(t,l);c=_.createElement(x5,{shapeType:n,elementProps:f})}else{var h=l;c=_.createElement(x5,{shapeType:n,elementProps:h})}return o?_.createElement(ar,{className:i},c):c}var VC=(e,t)=>{var n=cn();return(r,i)=>o=>{e?.(r,i,o),n(rI({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}},HC=e=>{var t=cn();return(n,r)=>i=>{e?.(n,r,i),t(Gle())}},qC=(e,t)=>{var n=cn();return(r,i)=>o=>{e?.(r,i,o),n(Yle({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}};function GC(e){var{fn:t,args:n}=e,r=cn(),i=jr();return _.useLayoutEffect(()=>{if(!i){var o=t(n);return r(Vle(o)),()=>{r(Hle(o))}}},[t,n,r,i]),null}function XI(e){var{legendPayload:t}=e,n=cn(),r=jr();return _.useLayoutEffect(()=>r?Xu:(n(fk(t)),()=>{n(dk(t))}),[n,r,t]),null}function jde(e){var{legendPayload:t}=e,n=cn(),r=Ze(Mt);return _.useLayoutEffect(()=>r!=="centric"&&r!=="radial"?Xu:(n(fk(t)),()=>{n(dk(t))}),[n,r,t]),null}var y2,Mde=()=>{var[e]=_.useState(()=>Dh("uid-"));return e},Pde=(y2=lw.useId)!==null&&y2!==void 0?y2:Mde;function QI(e,t){var n=Pde();return t||(e?"".concat(e,"-").concat(n):n)}var Lde=_.createContext(void 0),YC=e=>{var{id:t,type:n,children:r}=e,i=QI("recharts-".concat(n),t);return _.createElement(Lde.Provider,{value:i},r(i))},Nde={cartesianItems:[],polarItems:[]},JI=jt({name:"graphicalItems",initialState:Nde,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ir()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=Vo(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:ir()},removeCartesianGraphicalItem:{reducer(e,t){var n=Vo(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:ir()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ir()},removePolarGraphicalItem:{reducer(e,t){var n=Vo(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:ir()}}}),{addCartesianGraphicalItem:Rde,replaceCartesianGraphicalItem:Dde,removeCartesianGraphicalItem:kde,addPolarGraphicalItem:Ide,removePolarGraphicalItem:zde}=JI.actions,Ude=JI.reducer;function e7(e){var t=cn(),n=_.useRef(null);return _.useLayoutEffect(()=>{n.current===null?t(Rde(e)):n.current!==e&&t(Dde({prev:n.current,next:e})),n.current=e},[t,e]),_.useLayoutEffect(()=>()=>{n.current&&(t(kde(n.current)),n.current=null)},[t]),null}function Bde(e){var t=cn();return _.useLayoutEffect(()=>(t(Ide(e)),()=>{t(zde(e))}),[t,e]),null}var Fde=["onMouseEnter","onClick","onMouseLeave"],$de=["id"],Vde=["id"];function WC(e,t){if(e==null)return{};var n,r,i=Hde(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Hde(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _5(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 pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_5(Object(n),!0).forEach(function(r){qde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qde(e,t,n){return(t=Gde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gde(e){var t=Yde(e,"string");return typeof t=="symbol"?t:t+""}function Yde(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cl.apply(null,arguments)}function Wde(e){var t=_.useMemo(()=>FC(e.children,ll),[e.children]),n=Ze(r=>ode(r,e.id,t));return n==null?null:_.createElement(jde,{legendPayload:n})}function Kde(e){var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:o,fill:l,name:c,hide:f,tooltipType:h}=e;return{dataDefinedOnItem:r.map(m=>m.tooltipPayload),positions:r.map(m=>m.tooltipPosition),settings:{stroke:i,strokeWidth:o,fill:l,dataKey:t,nameKey:n,name:Lf(c,t),hide:f,type:h,color:l,unit:""}}}var Zde=(e,t)=>e>t?"start":e<t?"end":"middle",Xde=(e,t,n)=>kr(typeof t=="function"?t(e):t,n,n*.8),Qde=(e,t,n)=>{var{top:r,left:i,width:o,height:l}=t,c=yk(o,l),f=i+kr(e.cx,o,o/2),h=r+kr(e.cy,l,l/2),m=kr(e.innerRadius,c,0),y=Xde(n,e.outerRadius,c),x=e.maxRadius||Math.sqrt(o*o+l*l)/2;return{cx:f,cy:h,innerRadius:m,outerRadius:y,maxRadius:x}},Jde=(e,t)=>{var n=yr(t-e),r=Math.min(Math.abs(t-e),360);return n*r};function ehe(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var the=(e,t)=>{if(_.isValidElement(e))return _.cloneElement(e,t);if(typeof e=="function")return e(t);var n=Oe("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return _.createElement(ES,Cl({},t,{type:"linear",className:n}))},nhe=(e,t,n)=>{if(_.isValidElement(e))return _.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),_.isValidElement(r)))return r;var i=Oe("recharts-pie-label-text",ehe(e));return _.createElement(u0,Cl({},t,{alignmentBaseline:"middle",className:i}),r)};function rhe(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:o,dataKey:l}=n;if(!r||!i||!t)return null;var c=Di(n),f=Fu(i),h=Fu(o),m=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,y=t.map((x,b)=>{var C=(x.startAngle+x.endAngle)/2,w=Kn(x.cx,x.cy,x.outerRadius+m,C),A=pn(pn(pn(pn({},c),x),{},{stroke:"none"},f),{},{index:b,textAnchor:Zde(w.x,x.cx)},w),O=pn(pn(pn(pn({},c),x),{},{fill:"none",stroke:x.fill},h),{},{index:b,points:[Kn(x.cx,x.cy,x.outerRadius,C),w],key:"line"});return _.createElement(Kr,{zIndex:Un.label,key:"label-".concat(x.startAngle,"-").concat(x.endAngle,"-").concat(x.midAngle,"-").concat(b)},_.createElement(ar,null,o&&the(o,O),nhe(i,A,nn(x,l))))});return _.createElement(ar,{className:"recharts-pie-labels"},y)}function ihe(e){var{sectors:t,props:n,showLabels:r}=e,{label:i}=n;return typeof i=="object"&&i!=null&&"position"in i?_.createElement(zC,{label:i}):_.createElement(rhe,{sectors:t,props:n,showLabels:r})}function ahe(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i}=e,o=Ze(Sl),{onMouseEnter:l,onClick:c,onMouseLeave:f}=i,h=WC(i,Fde),m=VC(l,i.dataKey),y=HC(f),x=qC(c,i.dataKey);return t==null||t.length===0?null:_.createElement(_.Fragment,null,t.map((b,C)=>{if(b?.startAngle===0&&b?.endAngle===0&&t.length!==1)return null;var w=n&&String(C)===o,A=o?r:null,O=w?n:A,P=pn(pn({},b),{},{stroke:b.stroke,tabIndex:-1,[tk]:C,[nk]:i.dataKey});return _.createElement(ar,Cl({key:"sector-".concat(b?.startAngle,"-").concat(b?.endAngle,"-").concat(b.midAngle,"-").concat(C),tabIndex:-1,className:"recharts-pie-sector"},ky(h,b,C),{onMouseEnter:m(b,C),onMouseLeave:y(b,C),onClick:x(b,C)}),_.createElement($C,Cl({option:O,isActive:w,shapeType:"sector"},P)))}))}function ohe(e){var t,{pieSettings:n,displayedData:r,cells:i,offset:o}=e,{cornerRadius:l,startAngle:c,endAngle:f,dataKey:h,nameKey:m,tooltipType:y}=n,x=Math.abs(n.minAngle),b=Jde(c,f),C=Math.abs(b),w=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,A=r.filter(W=>nn(W,h,0)!==0).length,O=(C>=360?A:A-1)*w,P=C-A*x-O,N=r.reduce((W,X)=>{var ae=nn(X,h,0);return W+(Xe(ae)?ae:0)},0),F;if(N>0){var U;F=r.map((W,X)=>{var ae=nn(W,h,0),ce=nn(W,m,X),re=Qde(n,o,W),J=(Xe(ae)?ae:0)/N,oe,_e=pn(pn({},W),i&&i[X]&&i[X].props);X?oe=U.endAngle+yr(b)*w*(ae!==0?1:0):oe=c;var se=oe+yr(b)*((ae!==0?x:0)+J*P),ue=(oe+se)/2,Y=(re.innerRadius+re.outerRadius)/2,k=[{name:ce,value:ae,payload:_e,dataKey:h,type:y}],z=Kn(re.cx,re.cy,Y,ue);return U=pn(pn(pn(pn({},n.presentationProps),{},{percent:J,cornerRadius:typeof l=="string"?parseFloat(l):l,name:ce,tooltipPayload:k,midAngle:ue,middleRadius:Y,tooltipPosition:z},_e),re),{},{value:ae,startAngle:oe,endAngle:se,payload:_e,paddingAngle:yr(b)*w}),U})}return F}function she(e){var{showLabels:t,sectors:n,children:r}=e,i=_.useMemo(()=>!t||!n?[]:n.map(o=>({value:o.value,payload:o.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:o.cx,cy:o.cy,innerRadius:o.innerRadius,outerRadius:o.outerRadius,startAngle:o.startAngle,endAngle:o.endAngle,clockWise:!1},fill:o.fill})),[n,t]);return _.createElement(Hfe,{value:t?i:void 0},r)}function lhe(e){var{props:t,previousSectorsRef:n}=e,{sectors:r,isAnimationActive:i,animationBegin:o,animationDuration:l,animationEasing:c,activeShape:f,inactiveShape:h,onAnimationStart:m,onAnimationEnd:y}=t,x=um(t,"recharts-pie-"),b=n.current,[C,w]=_.useState(!1),A=_.useCallback(()=>{typeof y=="function"&&y(),w(!1)},[y]),O=_.useCallback(()=>{typeof m=="function"&&m(),w(!0)},[m]);return _.createElement(she,{showLabels:!C,sectors:r},_.createElement(lm,{animationId:x,begin:o,duration:l,isActive:i,easing:c,onAnimationStart:O,onAnimationEnd:A,key:x},P=>{var N=[],F=r&&r[0],U=F?.startAngle;return r?.forEach((W,X)=>{var ae=b&&b[X],ce=X>0?$u(W,"paddingAngle",0):0;if(ae){var re=mn(ae.endAngle-ae.startAngle,W.endAngle-W.startAngle,P),J=pn(pn({},W),{},{startAngle:U+ce,endAngle:U+re+ce});N.push(J),U=J.endAngle}else{var{endAngle:oe,startAngle:_e}=W,se=mn(0,oe-_e,P),ue=pn(pn({},W),{},{startAngle:U+ce,endAngle:U+se+ce});N.push(ue),U=ue.endAngle}}),n.current=N,_.createElement(ar,null,_.createElement(ahe,{sectors:N,activeShape:f,inactiveShape:h,allOtherPieProps:t}))}),_.createElement(ihe,{showLabels:!C,sectors:r,props:t}),t.children)}var uhe={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!jl.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:Un.area};function che(e){var{id:t}=e,n=WC(e,$de),{hide:r,className:i,rootTabIndex:o}=e,l=_.useMemo(()=>FC(e.children,ll),[e.children]),c=Ze(m=>sde(m,t,l)),f=_.useRef(null),h=Oe("recharts-pie",i);return r||c==null?(f.current=null,_.createElement(ar,{tabIndex:o,className:h})):_.createElement(Kr,{zIndex:e.zIndex},_.createElement(GC,{fn:Kde,args:pn(pn({},e),{},{sectors:c})}),_.createElement(ar,{tabIndex:o,className:h},_.createElement(lhe,{props:pn(pn({},n),{},{sectors:c}),previousSectorsRef:f})))}function W_(e){var t=sr(e,uhe),{id:n}=t,r=WC(t,Vde),i=Di(r);return _.createElement(YC,{id:n,type:"pie"},o=>_.createElement(_.Fragment,null,_.createElement(Bde,{type:"pie",id:o,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),_.createElement(Wde,Cl({},r,{id:o})),_.createElement(che,Cl({},r,{id:o}))))}W_.displayName="Pie";var fhe=["points"];function w5(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 b2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w5(Object(n),!0).forEach(function(r){dhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dhe(e,t,n){return(t=hhe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hhe(e){var t=mhe(e,"string");return typeof t=="symbol"?t:t+""}function mhe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fv.apply(null,arguments)}function phe(e,t){if(e==null)return{};var n,r,i=ghe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ghe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function vhe(e){var{option:t,dotProps:n,className:r}=e;if(_.isValidElement(t))return _.cloneElement(t,n);if(typeof t=="function")return t(n);var i=Oe(r,typeof t!="boolean"?t.className:""),o=n??{},{points:l}=o,c=phe(o,fhe);return _.createElement(HI,Fv({},c,{className:i}))}function yhe(e,t){return e==null?!1:t?!0:e.length===1}function bhe(e){var{points:t,dot:n,className:r,dotClassName:i,dataKey:o,baseProps:l,needClip:c,clipPathId:f,zIndex:h=Un.scatter}=e;if(!yhe(t,n))return null;var m=ZI(n),y=Dee(n),x=t.map((C,w)=>{var A,O,P=b2(b2(b2({r:3},l),y),{},{index:w,cx:(A=C.x)!==null&&A!==void 0?A:void 0,cy:(O=C.y)!==null&&O!==void 0?O:void 0,dataKey:o,value:C.value,payload:C.payload,points:t});return _.createElement(vhe,{key:"dot-".concat(w),option:n,dotProps:P,className:i})}),b={};return c&&f!=null&&(b.clipPath="url(#clipPath-".concat(m?"":"dots-").concat(f,")")),_.createElement(Kr,{zIndex:h},_.createElement(ar,Fv({className:r},b),x))}function S5(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 C5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S5(Object(n),!0).forEach(function(r){xhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xhe(e,t,n){return(t=_he(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _he(e){var t=whe(e,"string");return typeof t=="symbol"?t:t+""}function whe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var She={xAxis:{},yAxis:{},zAxis:{}},t7=jt({name:"cartesianAxis",initialState:She,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:ir()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:ir()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:ir()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:ir()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:ir()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:ir()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var o=i.widthHistory||[];if(o.length===3&&o[0]===o[2]&&r===o[1]&&r!==i.width&&Math.abs(r-o[0])<=1)return;var l=[...o,r].slice(-3);e.yAxis[n]=C5(C5({},e.yAxis[n]),{},{width:r,widthHistory:l})}}}}),{addXAxis:Che,removeXAxis:Ehe,addYAxis:Ahe,removeYAxis:The,addZAxis:cwe,removeZAxis:fwe,updateYAxisWidth:Ohe}=t7.actions,jhe=t7.reducer,Mhe=Ce([lr],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Phe=Ce([Mhe,ls,us],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),KC=()=>Ze(Phe),Lhe=()=>Ze(Nue);function E5(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 x2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E5(Object(n),!0).forEach(function(r){Nhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nhe(e,t,n){return(t=Rhe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rhe(e){var t=Dhe(e,"string");return typeof t=="symbol"?t:t+""}function Dhe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var khe=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:o}=e;if(i===!1||t.x==null||t.y==null)return null;var l={index:n,dataKey:o,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=x2(x2(x2({},l),Fu(i)),xS(i)),f;return _.isValidElement(i)?f=_.cloneElement(i,c):typeof i=="function"?f=i(c):f=_.createElement(HI,c),_.createElement(ar,{className:"recharts-active-dot"},f)};function Ihe(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i,zIndex:o=Un.activeDot}=e,l=Ze(Sl),c=Lhe();if(t==null||c==null)return null;var f=t.find(h=>c.includes(h.payload));return yn(f)?null:_.createElement(Kr,{zIndex:o},_.createElement(khe,{point:f,childIndex:Number(l),mainColor:n,dataKey:i,activeDot:r}))}var zhe="Invariant failed";function Uhe(e,t){throw new Error(zhe)}var Bhe=["x","y"];function K_(){return K_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K_.apply(null,arguments)}function A5(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 oh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A5(Object(n),!0).forEach(function(r){Fhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fhe(e,t,n){return(t=$he(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $he(e){var t=Vhe(e,"string");return typeof t=="symbol"?t:t+""}function Vhe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hhe(e,t){if(e==null)return{};var n,r,i=qhe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function qhe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ghe(e,t){var{x:n,y:r}=e,i=Hhe(e,Bhe),o="".concat(n),l=parseInt(o,10),c="".concat(r),f=parseInt(c,10),h="".concat(t.height||i.height),m=parseInt(h,10),y="".concat(t.width||i.width),x=parseInt(y,10);return oh(oh(oh(oh(oh({},t),i),l?{x:l}:{}),f?{y:f}:{}),{},{height:m,width:x,name:t.name,radius:t.radius})}function $v(e){return _.createElement($C,K_({shapeType:"rectangle",propTransformer:Ghe,activeClassName:"recharts-active-bar"},e))}var Yhe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(Xe(t))return t;var o=Xe(r)||yn(r);return o?t(r,i):(o||Uhe(),n)}},Whe={},n7=jt({name:"errorBars",initialState:Whe,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:dwe,replaceErrorBar:hwe,removeErrorBar:mwe}=n7.actions,Khe=n7.reducer,Zhe=["children"];function Xhe(e,t){if(e==null)return{};var n,r,i=Qhe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Qhe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Jhe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},eme=_.createContext(Jhe);function r7(e){var{children:t}=e,n=Xhe(e,Zhe);return _.createElement(eme.Provider,{value:n},t)}function ZC(e,t){var n,r,i=Ze(h=>fs(h,e)),o=Ze(h=>ds(h,t)),l=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:Ci.allowDataOverflow,c=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:Ei.allowDataOverflow,f=l||c;return{needClip:f,needClipX:l,needClipY:c}}function i7(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=KC(),{needClipX:o,needClipY:l,needClip:c}=ZC(t,n);if(!c||!i)return null;var{x:f,y:h,width:m,height:y}=i;return _.createElement("clipPath",{id:"clipPath-".concat(r)},_.createElement("rect",{x:o?f:f-m/2,y:l?h:h-y/2,width:o?m:m*2,height:l?y:y*2}))}function tme(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Bn(e.zIndex)?e.zIndex:t}var nme=["onMouseEnter","onMouseLeave","onClick"],rme=["value","background","tooltipPosition"],ime=["id"],ame=["onMouseEnter","onClick","onMouseLeave"];function ns(){return ns=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ns.apply(null,arguments)}function T5(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 Hr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T5(Object(n),!0).forEach(function(r){ome(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ome(e,t,n){return(t=sme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sme(e){var t=lme(e,"string");return typeof t=="symbol"?t:t+""}function lme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vv(e,t){if(e==null)return{};var n,r,i=ume(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ume(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var cme=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:Lf(n,t),payload:e}]};function fme(e){var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:o,hide:l,unit:c}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:Lf(o,t),hide:l,type:e.tooltipType,color:e.fill,unit:c}}}function dme(e){var t=Ze(Sl),{data:n,dataKey:r,background:i,allOtherBarProps:o}=e,{onMouseEnter:l,onMouseLeave:c,onClick:f}=o,h=Vv(o,nme),m=VC(l,r),y=HC(c),x=qC(f,r);if(!i||n==null)return null;var b=Fu(i);return _.createElement(Kr,{zIndex:tme(i,Un.barBackground)},n.map((C,w)=>{var{value:A,background:O,tooltipPosition:P}=C,N=Vv(C,rme);if(!O)return null;var F=m(C,w),U=y(C,w),W=x(C,w),X=Hr(Hr(Hr(Hr(Hr({option:i,isActive:String(w)===t},N),{},{fill:"#eee"},O),b),ky(h,C,w)),{},{onMouseEnter:F,onMouseLeave:U,onClick:W,dataKey:r,index:w,className:"recharts-bar-background-rectangle"});return _.createElement($v,ns({key:"background-bar-".concat(w)},X))}))}function hme(e){var{showLabels:t,children:n,rects:r}=e,i=r?.map(o=>{var l={x:o.x,y:o.y,width:o.width,lowerWidth:o.width,upperWidth:o.width,height:o.height};return Hr(Hr({},l),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:l,fill:o.fill})});return _.createElement($I,{value:t?i:void 0},n)}function mme(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:o,dataKey:l}=e,c=Ze(Sl),f=Ze(yI),h=n&&String(o)===c&&(f==null||l===f),m=h?n:t;return h?_.createElement(Kr,{zIndex:Un.activeBar},_.createElement($v,ns({},r,{name:String(r.name)},i,{isActive:h,option:m,index:o,dataKey:l}))):_.createElement($v,ns({},r,{name:String(r.name)},i,{isActive:h,option:m,index:o,dataKey:l}))}function pme(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:o}=e;return _.createElement($v,ns({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:i,dataKey:o}))}function gme(e){var t,{data:n,props:r}=e,i=(t=Di(r))!==null&&t!==void 0?t:{},{id:o}=i,l=Vv(i,ime),{shape:c,dataKey:f,activeBar:h}=r,{onMouseEnter:m,onClick:y,onMouseLeave:x}=r,b=Vv(r,ame),C=VC(m,f),w=HC(x),A=qC(y,f);return n?_.createElement(_.Fragment,null,n.map((O,P)=>_.createElement(ar,ns({key:"rectangle-".concat(O?.x,"-").concat(O?.y,"-").concat(O?.value,"-").concat(P),className:"recharts-bar-rectangle"},ky(b,O,P),{onMouseEnter:C(O,P),onMouseLeave:w(O,P),onClick:A(O,P)}),h?_.createElement(mme,{shape:c,activeBar:h,baseProps:l,entry:O,index:P,dataKey:f}):_.createElement(pme,{shape:c,baseProps:l,entry:O,index:P,dataKey:f})))):null}function vme(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:o,animationBegin:l,animationDuration:c,animationEasing:f,onAnimationEnd:h,onAnimationStart:m}=t,y=n.current,x=um(t,"recharts-bar-"),[b,C]=_.useState(!1),w=!b,A=_.useCallback(()=>{typeof h=="function"&&h(),C(!1)},[h]),O=_.useCallback(()=>{typeof m=="function"&&m(),C(!0)},[m]);return _.createElement(hme,{showLabels:w,rects:r},_.createElement(lm,{animationId:x,begin:l,duration:c,isActive:o,easing:f,onAnimationEnd:A,onAnimationStart:O,key:x},P=>{var N=P===1?r:r?.map((F,U)=>{var W=y&&y[U];if(W)return Hr(Hr({},F),{},{x:mn(W.x,F.x,P),y:mn(W.y,F.y,P),width:mn(W.width,F.width,P),height:mn(W.height,F.height,P)});if(i==="horizontal"){var X=mn(0,F.height,P),ae=mn(F.stackedBarStart,F.y,P);return Hr(Hr({},F),{},{y:ae,height:X})}var ce=mn(0,F.width,P),re=mn(F.stackedBarStart,F.x,P);return Hr(Hr({},F),{},{width:ce,x:re})});return P>0&&(n.current=N??null),N==null?null:_.createElement(ar,null,_.createElement(gme,{props:t,data:N}))}),_.createElement(zC,{label:t.label}),t.children)}function yme(e){var t=_.useRef(null);return _.createElement(vme,{previousRectanglesRef:t,props:e})}var a7=0,bme=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:nn(e,t)}};class xme extends _.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:l,needClip:c,background:f,id:h}=this.props;if(t||n==null)return null;var m=Oe("recharts-bar",i),y=h;return _.createElement(ar,{className:m,id:h},c&&_.createElement("defs",null,_.createElement(i7,{clipPathId:y,xAxisId:o,yAxisId:l})),_.createElement(ar,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(y,")"):void 0},_.createElement(dme,{data:n,dataKey:r,background:f,allOtherBarProps:this.props}),_.createElement(yme,this.props)))}}var _me={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!jl.isSsr,legendType:"rect",minPointSize:a7,xAxisId:0,yAxisId:0,zIndex:Un.bar};function wme(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:f,animationEasing:h,isAnimationActive:m}=e,{needClip:y}=ZC(t,n),x=sm(),b=jr(),C=FC(e.children,ll),w=Ze(P=>Zme(P,t,n,b,e.id,C));if(x!=="vertical"&&x!=="horizontal")return null;var A,O=w?.[0];return O==null||O.height==null||O.width==null?A=0:A=x==="vertical"?O.height/2:O.width/2,_.createElement(r7,{xAxisId:t,yAxisId:n,data:w,dataPointFormatter:bme,errorBarOffset:A},_.createElement(xme,ns({},e,{layout:x,needClip:y,data:w,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:f,animationEasing:h,isAnimationActive:m})))}function Sme(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:o,xAxis:l,yAxis:c,xAxisTicks:f,yAxisTicks:h,stackedData:m,displayedData:y,offset:x,cells:b,parentViewBox:C,dataStartIndex:w}=e,A=t==="horizontal"?c:l,O=m?A.scale.domain():null,P=Hne({numericAxis:A}),N=A.scale(P);return y.map((F,U)=>{var W,X,ae,ce,re,J;m?W=zne(m[U+w],O):(W=nn(F,n),Array.isArray(W)||(W=[P,W]));var oe=Yhe(r,a7)(W[1],U);if(t==="horizontal"){var _e,[se,ue]=[c.scale(W[0]),c.scale(W[1])];X=nM({axis:l,ticks:f,bandSize:o,offset:i.offset,entry:F,index:U}),ae=(_e=ue??se)!==null&&_e!==void 0?_e:void 0,ce=i.size;var Y=se-ue;if(re=Aa(Y)?0:Y,J={x:X,y:x.top,width:ce,height:x.height},Math.abs(oe)>0&&Math.abs(re)<Math.abs(oe)){var k=yr(re||oe)*(Math.abs(oe)-Math.abs(re));ae-=k,re+=k}}else{var[z,H]=[l.scale(W[0]),l.scale(W[1])];if(X=z,ae=nM({axis:c,ticks:h,bandSize:o,offset:i.offset,entry:F,index:U}),ce=H-z,re=i.size,J={x:x.left,y:ae,width:x.width,height:re},Math.abs(oe)>0&&Math.abs(ce)<Math.abs(oe)){var I=yr(ce||oe)*(Math.abs(oe)-Math.abs(ce));ce+=I}}if(X==null||ae==null||ce==null||re==null)return null;var j=Hr(Hr({},F),{},{stackedBarStart:N,x:X,y:ae,width:ce,height:re,value:m?W:W[1],payload:F,background:J,tooltipPosition:{x:X+ce/2,y:ae+re/2},parentViewBox:C},b&&b[U]&&b[U].props);return j}).filter(Boolean)}function Cme(e){var t=sr(e,_me),n=jr();return _.createElement(YC,{id:t.id,type:"bar"},r=>_.createElement(_.Fragment,null,_.createElement(XI,{legendPayload:cme(t)}),_.createElement(GC,{fn:fme,args:t}),_.createElement(e7,{type:"bar",id:r,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:Vne(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),_.createElement(Kr,{zIndex:t.zIndex},_.createElement(wme,ns({},t,{id:r})))))}var Bg=_.memo(Cme);Bg.displayName="Bar";function O5(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 gg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O5(Object(n),!0).forEach(function(r){Eme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eme(e,t,n){return(t=Ame(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ame(e){var t=Tme(e,"string");return typeof t=="symbol"?t:t+""}function Tme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ome=(e,t)=>t,jme=(e,t,n)=>n,Mme=(e,t,n,r)=>r,Pme=(e,t,n,r,i)=>i,_m=Ce([r0,Pme],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),Lme=Ce([_m],e=>e?.maxBarSize),Nme=(e,t,n,r,i,o)=>o,j5=(e,t,n)=>{var r=n??e;if(!yn(r))return kr(r,t,0)},Rme=Ce([Mt,r0,Ome,jme,Mme],(e,t,n,r,i)=>t.filter(o=>e==="horizontal"?o.xAxisId===n:o.yAxisId===r).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),Dme=(e,t,n,r)=>{var i=Mt(e);return i==="horizontal"?B_(e,"yAxis",n,r):B_(e,"xAxis",t,r)},kme=(e,t,n)=>{var r=Mt(e);return r==="horizontal"?TP(e,"xAxis",t):TP(e,"yAxis",n)},Ime=(e,t,n)=>{var r={},i=e.filter(e0),o=e.filter(h=>h.stackId==null),l=i.reduce((h,m)=>(h[m.stackId]||(h[m.stackId]=[]),h[m.stackId].push(m),h),r),c=Object.entries(l).map(h=>{var[m,y]=h,x=y.map(C=>C.dataKey),b=j5(t,n,y[0].barSize);return{stackId:m,dataKeys:x,barSize:b}}),f=o.map(h=>{var m=[h.dataKey].filter(x=>x!=null),y=j5(t,n,h.barSize);return{stackId:void 0,dataKeys:m,barSize:y}});return[...c,...f]},zme=Ce([Rme,kse,kme],Ime),Ume=(e,t,n,r,i)=>{var o,l,c=_m(e,t,n,r,i);if(c!=null){var f=Mt(e),h=y8(e),{maxBarSize:m}=c,y=yn(m)?h:m,x,b;return f==="horizontal"?(x=wl(e,"xAxis",t,r),b=_l(e,"xAxis",t,r)):(x=wl(e,"yAxis",n,r),b=_l(e,"yAxis",n,r)),(o=(l=mf(x,b,!0))!==null&&l!==void 0?l:y)!==null&&o!==void 0?o:0}},o7=(e,t,n,r)=>{var i=Mt(e),o,l;return i==="horizontal"?(o=wl(e,"xAxis",t,r),l=_l(e,"xAxis",t,r)):(o=wl(e,"yAxis",n,r),l=_l(e,"yAxis",n,r)),mf(o,l)};function Bme(e,t,n,r,i){var o=r.length;if(!(o<1)){var l=kr(e,n,0,!0),c,f=[];if(Bn(r[0].barSize)){var h=!1,m=n/o,y=r.reduce((O,P)=>O+(P.barSize||0),0);y+=(o-1)*l,y>=n&&(y-=(o-1)*l,l=0),y>=n&&m>0&&(h=!0,m*=.9,y=o*m);var x=(n-y)/2>>0,b={offset:x-l,size:0};c=r.reduce((O,P)=>{var N,F={stackId:P.stackId,dataKeys:P.dataKeys,position:{offset:b.offset+b.size+l,size:h?m:(N=P.barSize)!==null&&N!==void 0?N:0}},U=[...O,F];return b=U[U.length-1].position,U},f)}else{var C=kr(t,n,0,!0);n-2*C-(o-1)*l<=0&&(l=0);var w=(n-2*C-(o-1)*l)/o;w>1&&(w>>=0);var A=Bn(i)?Math.min(w,i):w;c=r.reduce((O,P,N)=>[...O,{stackId:P.stackId,dataKeys:P.dataKeys,position:{offset:C+(w+l)*N+(w-A)/2,size:A}}],f)}return c}}var Fme=(e,t,n,r,i,o,l)=>{var c=yn(l)?t:l,f=Bme(n,r,i!==o?i:o,e,c);return i!==o&&f!=null&&(f=f.map(h=>gg(gg({},h),{},{position:gg(gg({},h.position),{},{offset:h.position.offset-i/2})}))),f},$me=Ce([zme,y8,Dse,b8,Ume,o7,Lme],Fme),Vme=(e,t,n,r)=>wl(e,"xAxis",t,r),Hme=(e,t,n,r)=>wl(e,"yAxis",n,r),qme=(e,t,n,r)=>_l(e,"xAxis",t,r),Gme=(e,t,n,r)=>_l(e,"yAxis",n,r),Yme=Ce([$me,_m],(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}}),Wme=(e,t)=>{var n=aC(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:o}=i;if(o)return o.find(l=>l.key===n)}}}},Kme=Ce([Dme,_m],Wme),Zme=Ce([lr,SS,Vme,Hme,qme,Gme,Yme,Mt,Zy,o7,Kme,_m,Nme],(e,t,n,r,i,o,l,c,f,h,m,y,x)=>{var{chartData:b,dataStartIndex:C,dataEndIndex:w}=f;if(!(y==null||l==null||t==null||c!=="horizontal"&&c!=="vertical"||n==null||r==null||i==null||o==null||h==null)){var{data:A}=y,O;if(A!=null&&A.length>0?O=A:O=b?.slice(C,w+1),O!=null)return Sme({layout:c,barSettings:y,pos:l,parentViewBox:t,bandSize:h,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,stackedData:m,displayedData:O,offset:e,cells:x,dataStartIndex:C})}}),s7=e=>{var{chartData:t}=e,n=cn(),r=jr();return _.useEffect(()=>r?()=>{}:(n(BP(t)),()=>{n(BP(void 0))}),[t,n,r]),null},M5={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},l7=jt({name:"brush",initialState:M5,reducers:{setBrushSettings(e,t){return t.payload==null?M5:t.payload}}}),{setBrushSettings:pwe}=l7.actions,Xme=l7.reducer;function P5(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 vg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P5(Object(n),!0).forEach(function(r){u7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u7(e,t,n){return(t=Qme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qme(e){var t=Jme(e,"string");return typeof t=="symbol"?t:t+""}function Jme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var epe=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return{x:Math.min(n,i),y:Math.min(r,o),width:Math.abs(i-n),height:Math.abs(o-r)}};class d0{static create(t){return new d0(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(r)switch(r){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(t)+o}default:return this.scale(t)}if(n){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+l}return this.scale(t)}}isInRange(t){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?t>=r&&t<=i:t>=i&&t<=r}}u7(d0,"EPS",1e-4);var tpe=e=>{var t=Object.keys(e).reduce((n,r)=>vg(vg({},n),{},{[r]:d0.create(e[r])}),{});return vg(vg({},t),{},{apply(n){var{bandAware:r,position:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.fromEntries(Object.entries(n).map(o=>{var[l,c]=o;return[l,t[l].apply(c,{bandAware:r,position:i})]}))},isInRange(n){return Object.keys(n).every(r=>t[r].isInRange(n[r]))}})};function npe(e){return(e%180+180)%180}var rpe=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=npe(i),l=o*Math.PI/180,c=Math.atan(r/n),f=l>c&&l<Math.PI-c?r/Math.sin(l):n/Math.cos(l);return Math.abs(f)},ipe={dots:[],areas:[],lines:[]},c7=jt({name:"referenceElements",initialState:ipe,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Vo(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=Vo(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=Vo(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:gwe,removeDot:vwe,addArea:ape,removeArea:ope,addLine:ywe,removeLine:bwe}=c7.actions,spe=c7.reducer,f7=_.createContext(void 0),lpe=e=>{var{children:t}=e,[n]=_.useState("".concat(Dh("recharts"),"-clip")),r=KC();if(r==null)return null;var{x:i,y:o,width:l,height:c}=r;return _.createElement(f7.Provider,{value:n},_.createElement("defs",null,_.createElement("clipPath",{id:n},_.createElement("rect",{x:i,y:o,height:c,width:l}))),t)},upe=()=>_.useContext(f7);function L5(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 N5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L5(Object(n),!0).forEach(function(r){cpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cpe(e,t,n){return(t=fpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fpe(e){var t=dpe(e,"string");return typeof t=="symbol"?t:t+""}function dpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hv(){return Hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hv.apply(null,arguments)}var hpe=(e,t,n,r,i,o,l)=>{var{x1:c,x2:f,y1:h,y2:m}=l;if(i==null||o==null)return null;var y=tpe({x:i,y:o}),x={x:e?y.x.apply(c,{position:"start"}):y.x.rangeMin,y:n?y.y.apply(h,{position:"start"}):y.y.rangeMin},b={x:t?y.x.apply(f,{position:"end"}):y.x.rangeMax,y:r?y.y.apply(m,{position:"end"}):y.y.rangeMax};return l.ifOverflow==="discard"&&(!y.isInRange(x)||!y.isInRange(b))?null:epe(x,b)},mpe=(e,t)=>{var n;return _.isValidElement(e)?n=_.cloneElement(e,t):typeof e=="function"?n=e(t):n=_.createElement(AS,Hv({},t,{className:"recharts-reference-area-rect"})),n};function ppe(e){var t=cn();return _.useEffect(()=>(t(ape(e)),()=>{t(ope(e))})),null}function gpe(e){var{x1:t,x2:n,y1:r,y2:i,className:o,shape:l,xAxisId:c,yAxisId:f}=e,h=upe(),m=jr(),y=Ze(F=>xl(F,"xAxis",c,m)),x=Ze(F=>xl(F,"yAxis",f,m));if(y==null||!x==null)return null;var b=ci(t),C=ci(n),w=ci(r),A=ci(i);if(!b&&!C&&!w&&!A&&!l)return null;var O=hpe(b,C,w,A,y,x,e);if(!O&&!l)return null;var P=e.ifOverflow==="hidden",N=P?"url(#".concat(h,")"):void 0;return _.createElement(Kr,{zIndex:e.zIndex},_.createElement(ar,{className:Oe("recharts-reference-area",o)},mpe(l,N5(N5({clipPath:N},zr(e)),O)),O!=null&&_.createElement(zI,Hv({},O,{lowerWidth:O.width,upperWidth:O.width}),_.createElement(BI,{label:e.label}),e.children)))}var vpe={ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1,zIndex:Un.area};function d7(e){var t=sr(e,vpe);return _.createElement(_.Fragment,null,_.createElement(ppe,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2}),_.createElement(gpe,t))}d7.displayName="ReferenceArea";function yf(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function h7(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t)n.push(e[r]);return n}function ype(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return rpe(r,n)}function bpe(e,t,n){var r=n==="width",{x:i,y:o,width:l,height:c}=e;return t===1?{start:r?i:o,end:r?i+l:o+c}:{start:r?i+l:o+c,end:r?i:o}}function qv(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function xpe(e,t){return h7(e,t+1)}function _pe(e,t,n,r,i){for(var o=(r||[]).slice(),{start:l,end:c}=t,f=0,h=1,m=l,y=function(){var C=r?.[f];if(C===void 0)return{v:h7(r,h)};var w=f,A,O=()=>(A===void 0&&(A=n(C,w)),A),P=C.coordinate,N=f===0||qv(e,P,O,m,c);N||(f=0,m=l,h+=1),N&&(m=P+e*(O()/2+i),f+=h)},x;h<=o.length;)if(x=y(),x)return x.v;return[]}function R5(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 Nr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R5(Object(n),!0).forEach(function(r){wpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wpe(e,t,n){return(t=Spe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Spe(e){var t=Cpe(e,"string");return typeof t=="symbol"?t:t+""}function Cpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Epe(e,t,n,r,i){for(var o=(r||[]).slice(),l=o.length,{start:c}=t,{end:f}=t,h=function(x){var b=o[x],C,w=()=>(C===void 0&&(C=n(b,x)),C);if(x===l-1){var A=e*(b.coordinate+e*w()/2-f);o[x]=b=Nr(Nr({},b),{},{tickCoord:A>0?b.coordinate-A*e:b.coordinate})}else o[x]=b=Nr(Nr({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var O=qv(e,b.tickCoord,w,c,f);O&&(f=b.tickCoord-e*(w()/2+i),o[x]=Nr(Nr({},b),{},{isShow:!0}))}},m=l-1;m>=0;m--)h(m);return o}function Ape(e,t,n,r,i,o){var l=(r||[]).slice(),c=l.length,{start:f,end:h}=t;if(o){var m=r[c-1],y=n(m,c-1),x=e*(m.coordinate+e*y/2-h);if(l[c-1]=m=Nr(Nr({},m),{},{tickCoord:x>0?m.coordinate-x*e:m.coordinate}),m.tickCoord!=null){var b=qv(e,m.tickCoord,()=>y,f,h);b&&(h=m.tickCoord-e*(y/2+i),l[c-1]=Nr(Nr({},m),{},{isShow:!0}))}}for(var C=o?c-1:c,w=function(P){var N=l[P],F,U=()=>(F===void 0&&(F=n(N,P)),F);if(P===0){var W=e*(N.coordinate-e*U()/2-f);l[P]=N=Nr(Nr({},N),{},{tickCoord:W<0?N.coordinate-W*e:N.coordinate})}else l[P]=N=Nr(Nr({},N),{},{tickCoord:N.coordinate});if(N.tickCoord!=null){var X=qv(e,N.tickCoord,U,f,h);X&&(f=N.tickCoord+e*(U()/2+i),l[P]=Nr(Nr({},N),{},{isShow:!0}))}},A=0;A<C;A++)w(A);return l}function XC(e,t,n){var{tick:r,ticks:i,viewBox:o,minTickGap:l,orientation:c,interval:f,tickFormatter:h,unit:m,angle:y}=e;if(!i||!i.length||!r)return[];if(Xe(f)||jl.isSsr){var x;return(x=xpe(i,Xe(f)?f:0))!==null&&x!==void 0?x:[]}var b=[],C=c==="top"||c==="bottom"?"width":"height",w=m&&C==="width"?_h(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},A=(N,F)=>{var U=typeof h=="function"?h(N.value,F):N.value;return C==="width"?ype(_h(U,{fontSize:t,letterSpacing:n}),w,y):_h(U,{fontSize:t,letterSpacing:n})[C]},O=i.length>=2?yr(i[1].coordinate-i[0].coordinate):1,P=bpe(o,O,C);return f==="equidistantPreserveStart"?_pe(O,P,A,i,l):(f==="preserveStart"||f==="preserveStartEnd"?b=Ape(O,P,A,i,l,f==="preserveStartEnd"):b=Epe(O,P,A,i,l),b.filter(N=>N.isShow))}var Tpe=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,l=0;if(t){Array.from(t).forEach(m=>{if(m){var y=m.getBoundingClientRect();y.width>l&&(l=y.width)}});var c=n?n.getBoundingClientRect().width:0,f=i+o,h=l+f+c+(n?r:0);return Math.round(h)}return 0},Ope=["axisLine","width","height","className","hide","ticks","axisType"],jpe=["viewBox"],Mpe=["viewBox"];function Z_(e,t){if(e==null)return{};var n,r,i=Ppe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ppe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function qu(){return qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qu.apply(null,arguments)}function D5(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 Wn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D5(Object(n),!0).forEach(function(r){Lpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lpe(e,t,n){return(t=Npe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Npe(e){var t=Rpe(e,"string");return typeof t=="symbol"?t:t+""}function Rpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var QC={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Un.axis};function Dpe(e){var{x:t,y:n,width:r,height:i,orientation:o,mirror:l,axisLine:c,otherSvgProps:f}=e;if(!c)return null;var h=Wn(Wn(Wn({},f),Di(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var m=+(o==="top"&&!l||o==="bottom"&&l);h=Wn(Wn({},h),{},{x1:t,y1:n+m*i,x2:t+r,y2:n+m*i})}else{var y=+(o==="left"&&!l||o==="right"&&l);h=Wn(Wn({},h),{},{x1:t+y*r,y1:n,x2:t+y*r,y2:n+i})}return _.createElement("line",qu({},h,{className:Oe("recharts-cartesian-axis-line",$u(c,"className"))}))}function kpe(e,t,n,r,i,o,l,c,f){var h,m,y,x,b,C,w=c?-1:1,A=e.tickSize||l,O=Xe(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=m=e.coordinate,x=n+ +!c*i,y=x-w*A,C=y-w*f,b=O;break;case"left":y=x=e.coordinate,m=t+ +!c*r,h=m-w*A,b=h-w*f,C=O;break;case"right":y=x=e.coordinate,m=t+ +c*r,h=m+w*A,b=h+w*f,C=O;break;default:h=m=e.coordinate,x=n+ +c*i,y=x+w*A,C=y+w*f,b=O;break}return{line:{x1:h,y1:y,x2:m,y2:x},tick:{x:b,y:C}}}function Ipe(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function zpe(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function Upe(e){var{option:t,tickProps:n,value:r}=e,i,o=Oe(n.className,"recharts-cartesian-axis-tick-value");if(_.isValidElement(t))i=_.cloneElement(t,Wn(Wn({},n),{},{className:o}));else if(typeof t=="function")i=t(Wn(Wn({},n),{},{className:o}));else{var l="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(l=Oe(l,t?.className)),i=_.createElement(u0,qu({},n,{className:l}),r)}return i}var Bpe=_.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:i,stroke:o,tickFormatter:l,unit:c,padding:f,tickTextProps:h,orientation:m,mirror:y,x,y:b,width:C,height:w,tickSize:A,tickMargin:O,fontSize:P,letterSpacing:N,getTicksConfig:F,events:U,axisType:W}=e,X=XC(Wn(Wn({},F),{},{ticks:n}),P,N),ae=Ipe(m,y),ce=zpe(m,y),re=Di(F),J=Fu(r),oe={};typeof i=="object"&&(oe=i);var _e=Wn(Wn({},re),{},{fill:"none"},oe),se=X.map(k=>Wn({entry:k},kpe(k,x,b,C,w,m,A,y,O))),ue=se.map(k=>{var{entry:z,line:H}=k;return _.createElement(ar,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(z.value,"-").concat(z.coordinate,"-").concat(z.tickCoord)},i&&_.createElement("line",qu({},_e,H,{className:Oe("recharts-cartesian-axis-tick-line",$u(i,"className"))})))}),Y=se.map((k,z)=>{var{entry:H,tick:I}=k,j=Wn(Wn(Wn(Wn({textAnchor:ae,verticalAnchor:ce},re),{},{stroke:"none",fill:o},J),I),{},{index:z,payload:H,visibleTicksCount:X.length,tickFormatter:l,padding:f},h);return _.createElement(ar,qu({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(H.value,"-").concat(H.coordinate,"-").concat(H.tickCoord)},ky(U,H,z)),r&&_.createElement(Upe,{option:r,tickProps:j,value:"".concat(typeof l=="function"?l(H.value,z):H.value).concat(c||"")}))});return _.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(W,"-ticks")},Y.length>0&&_.createElement(Kr,{zIndex:Un.label},_.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(W,"-tick-labels"),ref:t},Y)),ue.length>0&&_.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(W,"-tick-lines")},ue))}),Fpe=_.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:l,ticks:c,axisType:f}=e,h=Z_(e,Ope),[m,y]=_.useState(""),[x,b]=_.useState(""),C=_.useRef(null);_.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var A;return Tpe({ticks:C.current,label:(A=e.labelRef)===null||A===void 0?void 0:A.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var w=_.useCallback(A=>{if(A){var O=A.getElementsByClassName("recharts-cartesian-axis-tick-value");C.current=O;var P=O[0];if(P){var N=window.getComputedStyle(P),F=N.fontSize,U=N.letterSpacing;(F!==m||U!==x)&&(y(F),b(U))}}},[m,x]);return l||r!=null&&r<=0||i!=null&&i<=0?null:_.createElement(Kr,{zIndex:e.zIndex},_.createElement(ar,{className:Oe("recharts-cartesian-axis",o)},_.createElement(Dpe,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Di(e)}),_.createElement(Bpe,{ref:w,axisType:f,events:h,fontSize:m,getTicksConfig:e,height:e.height,letterSpacing:x,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y}),_.createElement(zI,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},_.createElement(BI,{label:e.label,labelRef:e.labelRef}),e.children)))}),$pe=_.memo(Fpe,(e,t)=>{var{viewBox:n}=e,r=Z_(e,jpe),{viewBox:i}=t,o=Z_(t,Mpe);return yf(n,i)&&yf(r,o)}),JC=_.forwardRef((e,t)=>{var n=sr(e,QC);return _.createElement($pe,qu({},n,{ref:t}))});JC.displayName="CartesianAxis";var Vpe=["x1","y1","x2","y2","key"],Hpe=["offset"],qpe=["xAxisId","yAxisId"],Gpe=["xAxisId","yAxisId"];function k5(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 Rr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k5(Object(n),!0).forEach(function(r){Ype(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ype(e,t,n){return(t=Wpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wpe(e){var t=Kpe(e,"string");return typeof t=="symbol"?t:t+""}function Kpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tu(){return Tu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tu.apply(null,arguments)}function Gv(e,t){if(e==null)return{};var n,r,i=Zpe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Zpe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Xpe=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:o,height:l,ry:c}=e;return _.createElement("rect",{x:r,y:i,ry:c,width:o,height:l,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function m7(e){var{option:t,lineItemProps:n}=e,r;if(_.isValidElement(t))r=_.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var i,{x1:o,y1:l,x2:c,y2:f,key:h}=n,m=Gv(n,Vpe),y=(i=Di(m))!==null&&i!==void 0?i:{},{offset:x}=y,b=Gv(y,Hpe);r=_.createElement("line",Tu({},b,{x1:o,y1:l,x2:c,y2:f,fill:"none",key:h}))}return r}function Qpe(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:l}=e,c=Gv(e,qpe),f=i.map((h,m)=>{var y=Rr(Rr({},c),{},{x1:t,y1:h,x2:t+n,y2:h,key:"line-".concat(m),index:m});return _.createElement(m7,{key:"line-".concat(m),option:r,lineItemProps:y})});return _.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function Jpe(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:l}=e,c=Gv(e,Gpe),f=i.map((h,m)=>{var y=Rr(Rr({},c),{},{x1:h,y1:t,x2:h,y2:t+n,key:"line-".concat(m),index:m});return _.createElement(m7,{option:r,lineItemProps:y,key:"line-".concat(m)})});return _.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function ege(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:o,height:l,horizontalPoints:c,horizontal:f=!0}=e;if(!f||!t||!t.length||c==null)return null;var h=c.map(y=>Math.round(y+i-i)).sort((y,x)=>y-x);i!==h[0]&&h.unshift(0);var m=h.map((y,x)=>{var b=!h[x+1],C=b?i+l-y:h[x+1]-y;if(C<=0)return null;var w=x%t.length;return _.createElement("rect",{key:"react-".concat(x),y,x:r,height:C,width:o,stroke:"none",fill:t[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return _.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function tge(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:o,width:l,height:c,verticalPoints:f}=e;if(!t||!n||!n.length)return null;var h=f.map(y=>Math.round(y+i-i)).sort((y,x)=>y-x);i!==h[0]&&h.unshift(0);var m=h.map((y,x)=>{var b=!h[x+1],C=b?i+l-y:h[x+1]-y;if(C<=0)return null;var w=x%n.length;return _.createElement("rect",{key:"react-".concat(x),x:y,y:o,width:C,height:c,stroke:"none",fill:n[w],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return _.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var nge=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return QD(XC(Rr(Rr(Rr({},QC),n),{},{ticks:JD(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},rge=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return QD(XC(Rr(Rr(Rr({},QC),n),{},{ticks:JD(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},ige={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Un.grid};function e3(e){var t=lk(),n=uk(),r=sk(),i=Rr(Rr({},sr(e,ige)),{},{x:Xe(e.x)?e.x:r.left,y:Xe(e.y)?e.y:r.top,width:Xe(e.width)?e.width:r.width,height:Xe(e.height)?e.height:r.height}),{xAxisId:o,yAxisId:l,x:c,y:f,width:h,height:m,syncWithTicks:y,horizontalValues:x,verticalValues:b}=i,C=jr(),w=Ze(ce=>OP(ce,"xAxis",o,C)),A=Ze(ce=>OP(ce,"yAxis",l,C));if(!ao(h)||!ao(m)||!Xe(c)||!Xe(f))return null;var O=i.verticalCoordinatesGenerator||nge,P=i.horizontalCoordinatesGenerator||rge,{horizontalPoints:N,verticalPoints:F}=i;if((!N||!N.length)&&typeof P=="function"){var U=x&&x.length,W=P({yAxis:A?Rr(Rr({},A),{},{ticks:U?x:A.ticks}):void 0,width:t??h,height:n??m,offset:r},U?!0:y);bv(Array.isArray(W),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof W,"]")),Array.isArray(W)&&(N=W)}if((!F||!F.length)&&typeof O=="function"){var X=b&&b.length,ae=O({xAxis:w?Rr(Rr({},w),{},{ticks:X?b:w.ticks}):void 0,width:t??h,height:n??m,offset:r},X?!0:y);bv(Array.isArray(ae),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof ae,"]")),Array.isArray(ae)&&(F=ae)}return _.createElement(Kr,{zIndex:i.zIndex},_.createElement("g",{className:"recharts-cartesian-grid"},_.createElement(Xpe,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),_.createElement(ege,Tu({},i,{horizontalPoints:N})),_.createElement(tge,Tu({},i,{verticalPoints:F})),_.createElement(Qpe,Tu({},i,{offset:r,horizontalPoints:N,xAxis:w,yAxis:A})),_.createElement(Jpe,Tu({},i,{offset:r,verticalPoints:F,xAxis:w,yAxis:A}))))}e3.displayName="CartesianGrid";var p7=(e,t,n,r)=>wl(e,"xAxis",t,r),g7=(e,t,n,r)=>_l(e,"xAxis",t,r),v7=(e,t,n,r)=>wl(e,"yAxis",n,r),y7=(e,t,n,r)=>_l(e,"yAxis",n,r),age=Ce([Mt,p7,v7,g7,y7],(e,t,n,r,i)=>Ol(e,"xAxis")?mf(t,r,!1):mf(n,i,!1)),oge=(e,t,n,r,i)=>i;function sge(e){return e.type==="line"}var lge=Ce([r0,oge],(e,t)=>e.filter(sge).find(n=>n.id===t)),uge=Ce([Mt,p7,v7,g7,y7,lge,age,Zy],(e,t,n,r,i,o,l,c)=>{var{chartData:f,dataStartIndex:h,dataEndIndex:m}=c;if(!(o==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||l==null)){var{dataKey:y,data:x}=o,b;if(x!=null&&x.length>0?b=x:b=f?.slice(h,m+1),b!=null)return Mge({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:y,bandSize:l,displayedData:b})}});function cge(e){var t=Fu(e),n=3,r=2;if(t!=null){var{r:i,strokeWidth:o}=t,l=Number(i),c=Number(o);return(Number.isNaN(l)||l<0)&&(l=n),(Number.isNaN(c)||c<0)&&(c=r),{r:l,strokeWidth:c}}return{r:n,strokeWidth:r}}var fge=["id"],dge=["type","layout","connectNulls","needClip","shape"],hge=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Vh(){return Vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vh.apply(null,arguments)}function I5(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 Qa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I5(Object(n),!0).forEach(function(r){mge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mge(e,t,n){return(t=pge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pge(e){var t=gge(e,"string");return typeof t=="symbol"?t:t+""}function gge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function t3(e,t){if(e==null)return{};var n,r,i=vge(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function vge(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var yge=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:Lf(n,t),payload:e}]};function bge(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:l,hide:c,unit:f}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:Lf(l,t),hide:c,type:e.tooltipType,color:e.stroke,unit:f}}}var b7=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function xge(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r=[...r,...n];return r}var _ge=(e,t,n)=>{var r=n.reduce((y,x)=>y+x);if(!r)return b7(t,e);for(var i=Math.floor(e/r),o=e%r,l=t-e,c=[],f=0,h=0;f<n.length;h+=n[f],++f)if(h+n[f]>o){c=[...n.slice(0,f),o-h];break}var m=c.length%2===0?[0,l]:[l];return[...xge(n,i),...c,...m].map(y=>"".concat(y,"px")).join(", ")};function wge(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:o,needClip:l}=r,{id:c}=r,f=t3(r,fge),h=Di(f);return _.createElement(bhe,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:h,needClip:l,clipPathId:t})}function Sge(e){var{showLabels:t,children:n,points:r}=e,i=_.useMemo(()=>r?.map(o=>{var l,c,f={x:(l=o.x)!==null&&l!==void 0?l:0,y:(c=o.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Qa(Qa({},f),{},{value:o.value,payload:o.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[r]);return _.createElement($I,{value:t?i:void 0},n)}function z5(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:o}=e,{type:l,layout:c,connectNulls:f,needClip:h,shape:m}=o,y=t3(o,dge),x=Qa(Qa({},zr(y)),{},{fill:"none",className:"recharts-line-curve",clipPath:h?"url(#clipPath-".concat(t,")"):void 0,points:r,type:l,layout:c,connectNulls:f,strokeDasharray:i??o.strokeDasharray});return _.createElement(_.Fragment,null,r?.length>1&&_.createElement($C,Vh({shapeType:"curve",option:m},x,{pathRef:n})),_.createElement(wge,{points:r,clipPathId:t,props:o}))}function Cge(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Ege(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:l,strokeDasharray:c,isAnimationActive:f,animationBegin:h,animationDuration:m,animationEasing:y,animateNewValues:x,width:b,height:C,onAnimationEnd:w,onAnimationStart:A}=n,O=i.current,P=um(n,"recharts-line-"),[N,F]=_.useState(!1),U=!N,W=_.useCallback(()=>{typeof w=="function"&&w(),F(!1)},[w]),X=_.useCallback(()=>{typeof A=="function"&&A(),F(!0)},[A]),ae=Cge(r.current),ce=o.current;return _.createElement(Sge,{points:l,showLabels:U},n.children,_.createElement(lm,{animationId:P,begin:h,duration:m,isActive:f,easing:y,onAnimationEnd:W,onAnimationStart:X,key:P},re=>{var J=mn(ce,ae+ce,re),oe=Math.min(J,ae),_e;if(f)if(c){var se="".concat(c).split(/[,\s]+/gim).map(k=>parseFloat(k));_e=_ge(oe,ae,se)}else _e=b7(ae,oe);else _e=c==null?void 0:String(c);if(O){var ue=O.length/l.length,Y=re===1?l:l.map((k,z)=>{var H=Math.floor(z*ue);if(O[H]){var I=O[H];return Qa(Qa({},k),{},{x:mn(I.x,k.x,re),y:mn(I.y,k.y,re)})}return x?Qa(Qa({},k),{},{x:mn(b*2,k.x,re),y:mn(C/2,k.y,re)}):Qa(Qa({},k),{},{x:k.x,y:k.y})});return i.current=Y,_.createElement(z5,{props:n,points:Y,clipPathId:t,pathRef:r,strokeDasharray:_e})}return re>0&&ae>0&&(i.current=l,o.current=oe),_.createElement(z5,{props:n,points:l,clipPathId:t,pathRef:r,strokeDasharray:_e})}),_.createElement(zC,{label:n.label}))}function Age(e){var{clipPathId:t,props:n}=e,r=_.useRef(null),i=_.useRef(0),o=_.useRef(null);return _.createElement(Ege,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:o})}var Tge=(e,t)=>{var n,r;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(r=e.y)!==null&&r!==void 0?r:void 0,value:e.value,errorVal:nn(e.payload,t)}};class Oge extends _.Component{render(){var{hide:t,dot:n,points:r,className:i,xAxisId:o,yAxisId:l,top:c,left:f,width:h,height:m,id:y,needClip:x,zIndex:b}=this.props;if(t)return null;var C=Oe("recharts-line",i),w=y,{r:A,strokeWidth:O}=cge(n),P=ZI(n),N=A*2+O;return _.createElement(Kr,{zIndex:b},_.createElement(ar,{className:C},x&&_.createElement("defs",null,_.createElement(i7,{clipPathId:w,xAxisId:o,yAxisId:l}),!P&&_.createElement("clipPath",{id:"clipPath-dots-".concat(w)},_.createElement("rect",{x:f-N/2,y:c-N/2,width:h+N,height:m+N}))),_.createElement(r7,{xAxisId:o,yAxisId:l,data:r,dataPointFormatter:Tge,errorBarOffset:0},_.createElement(Age,{props:this.props,clipPathId:w}))),_.createElement(Ihe,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var x7={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!jl.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Un.line};function jge(e){var t=sr(e,x7),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:l,connectNulls:c,dot:f,hide:h,isAnimationActive:m,label:y,legendType:x,xAxisId:b,yAxisId:C,id:w}=t,A=t3(t,hge),{needClip:O}=ZC(b,C),P=KC(),N=sm(),F=jr(),U=Ze(re=>uge(re,b,C,F,w));if(N!=="horizontal"&&N!=="vertical"||U==null||P==null)return null;var{height:W,width:X,x:ae,y:ce}=P;return _.createElement(Oge,Vh({},A,{id:w,connectNulls:c,dot:f,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:l,isAnimationActive:m,hide:h,label:y,legendType:x,xAxisId:b,yAxisId:C,points:U,layout:N,height:W,width:X,left:ae,top:ce,needClip:O}))}function Mge(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:l,bandSize:c,displayedData:f}=e;return f.map((h,m)=>{var y=nn(h,l);if(t==="horizontal"){var x=tM({axis:n,ticks:i,bandSize:c,entry:h,index:m}),b=yn(y)?null:r.scale(y);return{x,y:b,value:y,payload:h}}var C=yn(y)?null:n.scale(y),w=tM({axis:r,ticks:o,bandSize:c,entry:h,index:m});return C==null||w==null?null:{x:C,y:w,value:y,payload:h}}).filter(Boolean)}function Pge(e){var t=sr(e,x7),n=jr();return _.createElement(YC,{id:t.id,type:"line"},r=>_.createElement(_.Fragment,null,_.createElement(XI,{legendPayload:yge(t)}),_.createElement(GC,{fn:bge,args:t}),_.createElement(e7,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),_.createElement(jge,Vh({},t,{id:r}))))}var _7=_.memo(Pge);_7.displayName="Line";var Lge=["dangerouslySetInnerHTML","ticks"],Nge=["id"],Rge=["domain"],Dge=["domain"];function X_(){return X_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X_.apply(null,arguments)}function Yv(e,t){if(e==null)return{};var n,r,i=kge(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kge(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ige(e){var t=cn();return _.useLayoutEffect(()=>(t(Che(e)),()=>{t(Ehe(e))}),[e,t]),null}var zge=e=>{var{xAxisId:t,className:n}=e,r=Ze(SS),i=jr(),o="xAxis",l=Ze(A=>xl(A,o,t,i)),c=Ze(A=>X8(A,o,t,i)),f=Ze(A=>Y8(A,t)),h=Ze(A=>Nle(A,t)),m=Ze(A=>T8(A,t));if(f==null||h==null||m==null)return null;var{dangerouslySetInnerHTML:y,ticks:x}=e,b=Yv(e,Lge),{id:C}=m,w=Yv(m,Nge);return _.createElement(JC,X_({},b,w,{scale:l,x:h.x,y:h.y,width:f.width,height:f.height,className:Oe("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:c,axisType:o}))},Uge={allowDataOverflow:Ci.allowDataOverflow,allowDecimals:Ci.allowDecimals,allowDuplicatedCategory:Ci.allowDuplicatedCategory,height:Ci.height,hide:!1,mirror:Ci.mirror,orientation:Ci.orientation,padding:Ci.padding,reversed:Ci.reversed,scale:Ci.scale,tickCount:Ci.tickCount,type:Ci.type,xAxisId:0},Bge=e=>{var t,n,r,i,o,l=sr(e,Uge);return _.createElement(_.Fragment,null,_.createElement(Ige,{interval:(t=l.interval)!==null&&t!==void 0?t:"preserveEnd",id:l.xAxisId,scale:l.scale,type:l.type,padding:l.padding,allowDataOverflow:l.allowDataOverflow,domain:l.domain,dataKey:l.dataKey,allowDuplicatedCategory:l.allowDuplicatedCategory,allowDecimals:l.allowDecimals,tickCount:l.tickCount,includeHidden:(n=l.includeHidden)!==null&&n!==void 0?n:!1,reversed:l.reversed,ticks:l.ticks,height:l.height,orientation:l.orientation,mirror:l.mirror,hide:l.hide,unit:l.unit,name:l.name,angle:(r=l.angle)!==null&&r!==void 0?r:0,minTickGap:(i=l.minTickGap)!==null&&i!==void 0?i:5,tick:(o=l.tick)!==null&&o!==void 0?o:!0,tickFormatter:l.tickFormatter}),_.createElement(zge,l))},Fge=(e,t)=>{var{domain:n}=e,r=Yv(e,Rge),{domain:i}=t,o=Yv(t,Dge);return yf(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:yf({domain:n},{domain:i}):!1},n3=_.memo(Bge,Fge);n3.displayName="XAxis";var $ge=["dangerouslySetInnerHTML","ticks"],Vge=["id"],Hge=["domain"],qge=["domain"];function Q_(){return Q_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q_.apply(null,arguments)}function Wv(e,t){if(e==null)return{};var n,r,i=Gge(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Gge(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yge(e){var t=cn();return _.useLayoutEffect(()=>(t(Ahe(e)),()=>{t(The(e))}),[e,t]),null}var Wge=e=>{var{yAxisId:t,className:n,width:r,label:i}=e,o=_.useRef(null),l=_.useRef(null),c=Ze(SS),f=jr(),h=cn(),m="yAxis",y=Ze(U=>xl(U,m,t,f)),x=Ze(U=>W8(U,t)),b=Ze(U=>Dle(U,t)),C=Ze(U=>X8(U,m,t,f)),w=Ze(U=>O8(U,t));if(_.useLayoutEffect(()=>{if(!(r!=="auto"||!x||IC(i)||_.isValidElement(i)||w==null)){var U=o.current;if(U){var W=U.getCalculatedWidth();Math.round(x.width)!==Math.round(W)&&h(Ohe({id:t,width:W}))}}},[C,x,h,i,t,r,w]),x==null||b==null||w==null)return null;var{dangerouslySetInnerHTML:A,ticks:O}=e,P=Wv(e,$ge),{id:N}=w,F=Wv(w,Vge);return _.createElement(JC,Q_({},P,F,{ref:o,labelRef:l,scale:y,x:b.x,y:b.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:x.width,height:x.height,className:Oe("recharts-".concat(m," ").concat(m),n),viewBox:c,ticks:C,axisType:m}))},Kge={allowDataOverflow:Ei.allowDataOverflow,allowDecimals:Ei.allowDecimals,allowDuplicatedCategory:Ei.allowDuplicatedCategory,hide:!1,mirror:Ei.mirror,orientation:Ei.orientation,padding:Ei.padding,reversed:Ei.reversed,scale:Ei.scale,tickCount:Ei.tickCount,type:Ei.type,width:Ei.width,yAxisId:0},Zge=e=>{var t,n,r,i,o,l=sr(e,Kge);return _.createElement(_.Fragment,null,_.createElement(Yge,{interval:(t=l.interval)!==null&&t!==void 0?t:"preserveEnd",id:l.yAxisId,scale:l.scale,type:l.type,domain:l.domain,allowDataOverflow:l.allowDataOverflow,dataKey:l.dataKey,allowDuplicatedCategory:l.allowDuplicatedCategory,allowDecimals:l.allowDecimals,tickCount:l.tickCount,padding:l.padding,includeHidden:(n=l.includeHidden)!==null&&n!==void 0?n:!1,reversed:l.reversed,ticks:l.ticks,width:l.width,orientation:l.orientation,mirror:l.mirror,hide:l.hide,unit:l.unit,name:l.name,angle:(r=l.angle)!==null&&r!==void 0?r:0,minTickGap:(i=l.minTickGap)!==null&&i!==void 0?i:5,tick:(o=l.tick)!==null&&o!==void 0?o:!0,tickFormatter:l.tickFormatter}),_.createElement(Wge,l))},Xge=(e,t)=>{var{domain:n}=e,r=Wv(e,Hge),{domain:i}=t,o=Wv(t,qge);return yf(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:yf({domain:n},{domain:i}):!1},r3=_.memo(Zge,Xge);r3.displayName="YAxis";var Qge=(e,t)=>t,i3=Ce([Qge,Mt,E8,cr,mI,hs,Gue,lr],Jue),a3=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},w7=un("mouseClick"),S7=rm();S7.startListening({actionCreator:w7,effect:(e,t)=>{var n=e.payload,r=i3(t.getState(),a3(n));r?.activeIndex!=null&&t.dispatch(Wle({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var J_=un("mouseMove"),C7=rm();C7.startListening({actionCreator:J_,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=AC(r,r.tooltip.settings.shared),o=i3(r,a3(n));i==="axis"&&(o?.activeIndex!=null?t.dispatch(aI({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(iI()))}});var U5={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0},E7=jt({name:"rootProps",initialState:U5,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:U5.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue}}}),Jge=E7.reducer,{updateOptions:eve}=E7.actions,A7=jt({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:tve}=A7.actions,nve=A7.reducer,T7=un("keyDown"),O7=un("focus"),o3=rm();o3.startListening({actionCreator:T7,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,o=e.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var l=Number(TC(i,Bf(n))),c=hs(n);if(o==="Enter"){var f=Iv(n,"axis","hover",String(i.index));t.dispatch($_({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:f}));return}var h=Ule(n),m=h==="left-to-right"?1:-1,y=o==="ArrowRight"?1:-1,x=l+y*m;if(!(c==null||x>=c.length||x<0)){var b=Iv(n,"axis","hover",String(x));t.dispatch($_({active:!0,activeIndex:x.toString(),activeDataKey:void 0,activeCoordinate:b}))}}}}});o3.startListening({actionCreator:O7,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",l=Iv(n,"axis","hover",String(o));t.dispatch($_({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:l}))}}}});var ea=un("externalEvent"),j7=rm();j7.startListening({actionCreator:ea,effect:(e,t)=>{if(e.payload.handler!=null){var n=t.getState(),r={activeCoordinate:Mue(n),activeDataKey:yI(n),activeIndex:Sl(n),activeLabel:vI(n),activeTooltipIndex:Sl(n),isTooltipActive:Pue(n)};e.payload.handler(r,e.payload.reactEvent)}}});var rve=Ce([Uf],e=>e.tooltipItemPayloads),ive=Ce([rve,bm,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var i=e.find(c=>c.settings.dataKey===r);if(i!=null){var{positions:o}=i;if(o!=null){var l=t(o,n);return l}}}),M7=un("touchMove"),P7=rm();P7.startListening({actionCreator:M7,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){var r=t.getState(),i=AC(r,r.tooltip.settings.shared);if(i==="axis"){var o=i3(r,a3({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));o?.activeIndex!=null&&t.dispatch(aI({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var l,c=n.touches[0];if(document.elementFromPoint==null)return;var f=document.elementFromPoint(c.clientX,c.clientY);if(!f||!f.getAttribute)return;var h=f.getAttribute(tk),m=(l=f.getAttribute(nk))!==null&&l!==void 0?l:void 0,y=ive(t.getState(),h,m);t.dispatch(rI({activeDataKey:m,activeIndex:h,activeCoordinate:y}))}}}});var ave=Ey({brush:Xme,cartesianAxis:jhe,chartData:Mce,errorBars:Khe,graphicalItems:Ude,layout:Lne,legend:Ore,options:Ece,polarAxis:ede,polarOptions:nve,referenceElements:spe,rootProps:Jge,tooltip:Kle,zIndex:hce}),ove=function(t){return rS({reducer:ave,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([S7.middleware,C7.middleware,o3.middleware,j7.middleware,P7.middleware]),enhancers:n=>{var r=n;return typeof n=="function"&&(r=n()),r.concat(E6({type:"raf"}))},devTools:jl.devToolsEnabled})};function L7(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=jr(),o=_.useRef(null);if(i)return n;o.current==null&&(o.current=ove(t));var l=wS;return _.createElement(fw,{context:l,store:o.current},n)}function N7(e){var{layout:t,margin:n}=e,r=cn(),i=jr();return _.useEffect(()=>{i||(r(jne(t)),r(One(n)))},[r,i,t,n]),null}function R7(e){var t=cn();return _.useEffect(()=>{t(eve(e))},[t,e]),null}function B5(e){var{zIndex:t,isPanorama:n}=e,r=n?"recharts-zindex-panorama-":"recharts-zindex-",i=QI("".concat(r).concat(t)),o=cn();return _.useLayoutEffect(()=>(o(fce({zIndex:t,elementId:i,isPanorama:n})),()=>{o(dce({zIndex:t,isPanorama:n}))}),[o,t,i,n]),_.createElement("g",{id:i})}function F5(e){var{children:t,isPanorama:n}=e,r=Ze(tce);if(!r||r.length===0)return t;var i=r.filter(l=>l<0),o=r.filter(l=>l>0);return _.createElement(_.Fragment,null,i.map(l=>_.createElement(B5,{key:l,zIndex:l,isPanorama:n})),t,o.map(l=>_.createElement(B5,{key:l,zIndex:l,isPanorama:n})))}var sve=["children"];function lve(e,t){if(e==null)return{};var n,r,i=uve(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uve(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Kv(){return Kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kv.apply(null,arguments)}var cve={width:"100%",height:"100%",display:"block"},fve=_.forwardRef((e,t)=>{var n=lk(),r=uk(),i=hk();if(!ao(n)||!ao(r))return null;var{children:o,otherAttributes:l,title:c,desc:f}=e,h,m;return l!=null&&(typeof l.tabIndex=="number"?h=l.tabIndex:h=i?0:void 0,typeof l.role=="string"?m=l.role:m=i?"application":void 0),_.createElement(pD,Kv({},l,{title:c,desc:f,role:m,tabIndex:h,width:n,height:r,style:cve,ref:t}),o)}),dve=e=>{var{children:t}=e,n=Ze(Fy);if(!n)return null;var{width:r,height:i,y:o,x:l}=n;return _.createElement(pD,{width:r,height:i,x:l,y:o},t)},$5=_.forwardRef((e,t)=>{var{children:n}=e,r=lve(e,sve),i=jr();return i?_.createElement(dve,null,_.createElement(F5,{isPanorama:!0},n)):_.createElement(fve,Kv({ref:t},r),_.createElement(F5,{isPanorama:!1},n))});function hve(){var e=cn(),[t,n]=_.useState(null),r=Ze(Zne);return _.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;Bn(o)&&o!==r&&e(Pne(o))}},[t,e,r]),n}function V5(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 mve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V5(Object(n),!0).forEach(function(r){pve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pve(e,t,n){return(t=gve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gve(e){var t=vve(e,"string");return typeof t=="symbol"?t:t+""}function vve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gu(){return Gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gu.apply(null,arguments)}var yve=()=>(Uce(),null);function Zv(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var bve=_.forwardRef((e,t)=>{var n,r,i=_.useRef(null),[o,l]=_.useState({containerWidth:Zv((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:Zv((r=e.style)===null||r===void 0?void 0:r.height)}),c=_.useCallback((h,m)=>{l(y=>{var x=Math.round(h),b=Math.round(m);return y.containerWidth===x&&y.containerHeight===b?y:{containerWidth:x,containerHeight:b}})},[]),f=_.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null&&typeof ResizeObserver<"u"){var{width:m,height:y}=h.getBoundingClientRect();c(m,y);var x=C=>{var{width:w,height:A}=C[0].contentRect;c(w,A)},b=new ResizeObserver(x);b.observe(h),i.current=b}},[t,c]);return _.useEffect(()=>()=>{var h=i.current;h?.disconnect()},[c]),_.createElement(_.Fragment,null,_.createElement(Vy,{width:o.containerWidth,height:o.containerHeight}),_.createElement("div",Gu({ref:f},e)))}),xve=_.forwardRef((e,t)=>{var{width:n,height:r}=e,[i,o]=_.useState({containerWidth:Zv(n),containerHeight:Zv(r)}),l=_.useCallback((f,h)=>{o(m=>{var y=Math.round(f),x=Math.round(h);return m.containerWidth===y&&m.containerHeight===x?m:{containerWidth:y,containerHeight:x}})},[]),c=_.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null){var{width:h,height:m}=f.getBoundingClientRect();l(h,m)}},[t,l]);return _.createElement(_.Fragment,null,_.createElement(Vy,{width:i.containerWidth,height:i.containerHeight}),_.createElement("div",Gu({ref:c},e)))}),_ve=_.forwardRef((e,t)=>{var{width:n,height:r}=e;return _.createElement(_.Fragment,null,_.createElement(Vy,{width:n,height:r}),_.createElement("div",Gu({ref:t},e)))}),wve=_.forwardRef((e,t)=>{var{width:n,height:r}=e;return Xo(n)||Xo(r)?_.createElement(xve,Gu({},e,{ref:t})):_.createElement(_ve,Gu({},e,{ref:t}))});function Sve(e){return e===!0?bve:wve}var Cve=_.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:l,onDoubleClick:c,onMouseDown:f,onMouseEnter:h,onMouseLeave:m,onMouseMove:y,onMouseUp:x,onTouchEnd:b,onTouchMove:C,onTouchStart:w,style:A,width:O,responsive:P,dispatchTouchEvents:N=!0}=e,F=_.useRef(null),U=cn(),[W,X]=_.useState(null),[ae,ce]=_.useState(null),re=hve(),J=CS(),oe=J?.width>0?J.width:O,_e=J?.height>0?J.height:i,se=_.useCallback(R=>{re(R),typeof t=="function"&&t(R),X(R),ce(R),R!=null&&(F.current=R)},[re,t,X,ce]),ue=_.useCallback(R=>{U(w7(R)),U(ea({handler:o,reactEvent:R}))},[U,o]),Y=_.useCallback(R=>{U(J_(R)),U(ea({handler:h,reactEvent:R}))},[U,h]),k=_.useCallback(R=>{U(iI()),U(ea({handler:m,reactEvent:R}))},[U,m]),z=_.useCallback(R=>{U(J_(R)),U(ea({handler:y,reactEvent:R}))},[U,y]),H=_.useCallback(()=>{U(O7())},[U]),I=_.useCallback(R=>{U(T7(R.key))},[U]),j=_.useCallback(R=>{U(ea({handler:l,reactEvent:R}))},[U,l]),q=_.useCallback(R=>{U(ea({handler:c,reactEvent:R}))},[U,c]),ee=_.useCallback(R=>{U(ea({handler:f,reactEvent:R}))},[U,f]),le=_.useCallback(R=>{U(ea({handler:x,reactEvent:R}))},[U,x]),pe=_.useCallback(R=>{U(ea({handler:w,reactEvent:R}))},[U,w]),he=_.useCallback(R=>{N&&U(M7(R)),U(ea({handler:C,reactEvent:R}))},[U,N,C]),ve=_.useCallback(R=>{U(ea({handler:b,reactEvent:R}))},[U,b]),D=Sve(P);return _.createElement(AI.Provider,{value:W},_.createElement($ee.Provider,{value:ae},_.createElement(D,{width:oe??A?.width,height:_e??A?.height,className:Oe("recharts-wrapper",r),style:mve({position:"relative",cursor:"default",width:oe,height:_e},A),onClick:ue,onContextMenu:j,onDoubleClick:q,onFocus:H,onKeyDown:I,onMouseDown:ee,onMouseEnter:Y,onMouseLeave:k,onMouseMove:z,onMouseUp:le,onTouchEnd:ve,onTouchMove:he,onTouchStart:pe,ref:se},_.createElement(yve,null),n)))}),Eve=["width","height","responsive","children","className","style","compact","title","desc"];function Ave(e,t){if(e==null)return{};var n,r,i=Tve(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Tve(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var D7=_.forwardRef((e,t)=>{var{width:n,height:r,responsive:i,children:o,className:l,style:c,compact:f,title:h,desc:m}=e,y=Ave(e,Eve),x=Di(y);return f?_.createElement(_.Fragment,null,_.createElement(Vy,{width:n,height:r}),_.createElement($5,{otherAttributes:x,title:h,desc:m},o)):_.createElement(Cve,{className:l,style:c,width:n,height:r,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},_.createElement($5,{otherAttributes:x,title:h,desc:m,ref:t},_.createElement(lpe,null,o)))});function ew(){return ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ew.apply(null,arguments)}var Ove={top:5,right:5,bottom:5,left:5},jve={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Ove,reverseStackOrder:!1,syncMethod:"index",responsive:!1},k7=_.forwardRef(function(t,n){var r,i=sr(t.categoricalChartProps,jve),{chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,categoricalChartProps:h}=t,m={chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return _.createElement(L7,{preloadedState:{options:m},reduxStoreName:(r=h.id)!==null&&r!==void 0?r:o},_.createElement(s7,{chartData:h.data}),_.createElement(N7,{layout:i.layout,margin:i.margin}),_.createElement(R7,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),_.createElement(D7,ew({},i,{ref:n})))}),Mve=["axis"],Pve=_.forwardRef((e,t)=>_.createElement(k7,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Mve,tooltipPayloadSearcher:DC,categoricalChartProps:e,ref:t}));function Lve(e){var t=cn();return _.useEffect(()=>{t(tve(e))},[t,e]),null}var Nve=["layout"];function tw(){return tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tw.apply(null,arguments)}function Rve(e,t){if(e==null)return{};var n,r,i=Dve(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dve(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var kve={top:5,right:5,bottom:5,left:5},Ive={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:kve,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1},zve=_.forwardRef(function(t,n){var r,i=sr(t.categoricalChartProps,Ive),{layout:o}=i,l=Rve(i,Nve),{chartName:c,defaultTooltipEventType:f,validateTooltipEventTypes:h,tooltipPayloadSearcher:m}=t,y={chartName:c,defaultTooltipEventType:f,validateTooltipEventTypes:h,tooltipPayloadSearcher:m,eventEmitter:void 0};return _.createElement(L7,{preloadedState:{options:y},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:c},_.createElement(s7,{chartData:i.data}),_.createElement(N7,{layout:o,margin:i.margin}),_.createElement(R7,{baseValue:void 0,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),_.createElement(Lve,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),_.createElement(D7,tw({},l,{ref:n})))}),Uve=["item"],Bve={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Fve=_.forwardRef((e,t)=>{var n=sr(e,Bve);return _.createElement(zve,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Uve,tooltipPayloadSearcher:DC,categoricalChartProps:n,ref:t})}),$ve=["axis"],Vve=_.forwardRef((e,t)=>_.createElement(k7,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:$ve,tooltipPayloadSearcher:DC,categoricalChartProps:e,ref:t}));function I7(e,t){const n=_.useRef(t);_.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 Hve=1;function qve(e){return Object.freeze({__version:Hve,map:e})}function Gve(e,t){return Object.freeze({...e,...t})}const s3=_.createContext(null);function z7(){const e=_.use(s3);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function Yve(e){function t(n,r){const{instance:i,context:o}=e(n).current;_.useImperativeHandle(r,()=>i);const{children:l}=n;return l==null?null:lf.createElement(s3,{value:o},l)}return _.forwardRef(t)}function Wve(e){function t(n,r){const[i,o]=_.useState(!1),{instance:l}=e(n,o).current;_.useImperativeHandle(r,()=>l),_.useEffect(function(){i&&l.update()},[l,i,n.children]);const c=l._contentNode;return c?Tf.createPortal(n.children,c):null}return _.forwardRef(t)}function Kve(e){function t(n,r){const{instance:i}=e(n).current;return _.useImperativeHandle(r,()=>i),null}return _.forwardRef(t)}function U7(e,t){const n=_.useRef(void 0);_.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 l3(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function Zve(e,t){return function(r,i){const o=z7(),l=e(l3(r,o),o);return I7(o.map,r.attribution),U7(l.current,r.eventHandlers),t(l.current,o,r,i),l}}var mh={exports:{}};var Xve=mh.exports,H5;function Qve(){return H5||(H5=1,function(e,t){(function(n,r){r(t)})(Xve,function(n){var r="1.9.4";function i(u){var p,S,M,B;for(S=1,M=arguments.length;S<M;S++){B=arguments[S];for(p in B)u[p]=B[p]}return u}var o=Object.create||function(){function u(){}return function(p){return u.prototype=p,new u}}();function l(u,p){var S=Array.prototype.slice;if(u.bind)return u.bind.apply(u,S.call(arguments,1));var M=S.call(arguments,2);return function(){return u.apply(p,M.length?M.concat(S.call(arguments)):arguments)}}var c=0;function f(u){return"_leaflet_id"in u||(u._leaflet_id=++c),u._leaflet_id}function h(u,p,S){var M,B,K,fe;return fe=function(){M=!1,B&&(K.apply(S,B),B=!1)},K=function(){M?B=arguments:(u.apply(S,arguments),setTimeout(fe,p),M=!0)},K}function m(u,p,S){var M=p[1],B=p[0],K=M-B;return u===M&&S?u:((u-B)%K+K)%K+B}function y(){return!1}function x(u,p){if(p===!1)return u;var S=Math.pow(10,p===void 0?6:p);return Math.round(u*S)/S}function b(u){return u.trim?u.trim():u.replace(/^\s+|\s+$/g,"")}function C(u){return b(u).split(/\s+/)}function w(u,p){Object.prototype.hasOwnProperty.call(u,"options")||(u.options=u.options?o(u.options):{});for(var S in p)u.options[S]=p[S];return u.options}function A(u,p,S){var M=[];for(var B in u)M.push(encodeURIComponent(S?B.toUpperCase():B)+"="+encodeURIComponent(u[B]));return(!p||p.indexOf("?")===-1?"?":"&")+M.join("&")}var O=/\{ *([\w_ -]+) *\}/g;function P(u,p){return u.replace(O,function(S,M){var B=p[M];if(B===void 0)throw new Error("No value provided for variable "+S);return typeof B=="function"&&(B=B(p)),B})}var N=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function F(u,p){for(var S=0;S<u.length;S++)if(u[S]===p)return S;return-1}var U="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function W(u){return window["webkit"+u]||window["moz"+u]||window["ms"+u]}var X=0;function ae(u){var p=+new Date,S=Math.max(0,16-(p-X));return X=p+S,window.setTimeout(u,S)}var ce=window.requestAnimationFrame||W("RequestAnimationFrame")||ae,re=window.cancelAnimationFrame||W("CancelAnimationFrame")||W("CancelRequestAnimationFrame")||function(u){window.clearTimeout(u)};function J(u,p,S){if(S&&ce===ae)u.call(p);else return ce.call(window,l(u,p))}function oe(u){u&&re.call(window,u)}var _e={__proto__:null,extend:i,create:o,bind:l,get lastId(){return c},stamp:f,throttle:h,wrapNum:m,falseFn:y,formatNum:x,trim:b,splitWords:C,setOptions:w,getParamString:A,template:P,isArray:N,indexOf:F,emptyImageUrl:U,requestFn:ce,cancelFn:re,requestAnimFrame:J,cancelAnimFrame:oe};function se(){}se.extend=function(u){var p=function(){w(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},S=p.__super__=this.prototype,M=o(S);M.constructor=p,p.prototype=M;for(var B in this)Object.prototype.hasOwnProperty.call(this,B)&&B!=="prototype"&&B!=="__super__"&&(p[B]=this[B]);return u.statics&&i(p,u.statics),u.includes&&(ue(u.includes),i.apply(null,[M].concat(u.includes))),i(M,u),delete M.statics,delete M.includes,M.options&&(M.options=S.options?o(S.options):{},i(M.options,u.options)),M._initHooks=[],M.callInitHooks=function(){if(!this._initHooksCalled){S.callInitHooks&&S.callInitHooks.call(this),this._initHooksCalled=!0;for(var K=0,fe=M._initHooks.length;K<fe;K++)M._initHooks[K].call(this)}},p},se.include=function(u){var p=this.prototype.options;return i(this.prototype,u),u.options&&(this.prototype.options=p,this.mergeOptions(u.options)),this},se.mergeOptions=function(u){return i(this.prototype.options,u),this},se.addInitHook=function(u){var p=Array.prototype.slice.call(arguments,1),S=typeof u=="function"?u:function(){this[u].apply(this,p)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(S),this};function ue(u){if(!(typeof L>"u"||!L||!L.Mixin)){u=N(u)?u:[u];for(var p=0;p<u.length;p++)u[p]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var Y={on:function(u,p,S){if(typeof u=="object")for(var M in u)this._on(M,u[M],p);else{u=C(u);for(var B=0,K=u.length;B<K;B++)this._on(u[B],p,S)}return this},off:function(u,p,S){if(!arguments.length)delete this._events;else if(typeof u=="object")for(var M in u)this._off(M,u[M],p);else{u=C(u);for(var B=arguments.length===1,K=0,fe=u.length;K<fe;K++)B?this._off(u[K]):this._off(u[K],p,S)}return this},_on:function(u,p,S,M){if(typeof p!="function"){console.warn("wrong listener type: "+typeof p);return}if(this._listens(u,p,S)===!1){S===this&&(S=void 0);var B={fn:p,ctx:S};M&&(B.once=!0),this._events=this._events||{},this._events[u]=this._events[u]||[],this._events[u].push(B)}},_off:function(u,p,S){var M,B,K;if(this._events&&(M=this._events[u],!!M)){if(arguments.length===1){if(this._firingCount)for(B=0,K=M.length;B<K;B++)M[B].fn=y;delete this._events[u];return}if(typeof p!="function"){console.warn("wrong listener type: "+typeof p);return}var fe=this._listens(u,p,S);if(fe!==!1){var be=M[fe];this._firingCount&&(be.fn=y,this._events[u]=M=M.slice()),M.splice(fe,1)}}},fire:function(u,p,S){if(!this.listens(u,S))return this;var M=i({},p,{type:u,target:this,sourceTarget:p&&p.sourceTarget||this});if(this._events){var B=this._events[u];if(B){this._firingCount=this._firingCount+1||1;for(var K=0,fe=B.length;K<fe;K++){var be=B[K],Ae=be.fn;be.once&&this.off(u,Ae,be.ctx),Ae.call(be.ctx||this,M)}this._firingCount--}}return S&&this._propagateEvent(M),this},listens:function(u,p,S,M){typeof u!="string"&&console.warn('"string" type argument expected');var B=p;typeof p!="function"&&(M=!!p,B=void 0,S=void 0);var K=this._events&&this._events[u];if(K&&K.length&&this._listens(u,B,S)!==!1)return!0;if(M){for(var fe in this._eventParents)if(this._eventParents[fe].listens(u,p,S,M))return!0}return!1},_listens:function(u,p,S){if(!this._events)return!1;var M=this._events[u]||[];if(!p)return!!M.length;S===this&&(S=void 0);for(var B=0,K=M.length;B<K;B++)if(M[B].fn===p&&M[B].ctx===S)return B;return!1},once:function(u,p,S){if(typeof u=="object")for(var M in u)this._on(M,u[M],p,!0);else{u=C(u);for(var B=0,K=u.length;B<K;B++)this._on(u[B],p,S,!0)}return this},addEventParent:function(u){return this._eventParents=this._eventParents||{},this._eventParents[f(u)]=u,this},removeEventParent:function(u){return this._eventParents&&delete this._eventParents[f(u)],this},_propagateEvent:function(u){for(var p in this._eventParents)this._eventParents[p].fire(u.type,i({layer:u.target,propagatedFrom:u.target},u),!0)}};Y.addEventListener=Y.on,Y.removeEventListener=Y.clearAllEventListeners=Y.off,Y.addOneTimeEventListener=Y.once,Y.fireEvent=Y.fire,Y.hasEventListeners=Y.listens;var k=se.extend(Y);function z(u,p,S){this.x=S?Math.round(u):u,this.y=S?Math.round(p):p}var H=Math.trunc||function(u){return u>0?Math.floor(u):Math.ceil(u)};z.prototype={clone:function(){return new z(this.x,this.y)},add:function(u){return this.clone()._add(I(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(I(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new z(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new z(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=H(this.x),this.y=H(this.y),this},distanceTo:function(u){u=I(u);var p=u.x-this.x,S=u.y-this.y;return Math.sqrt(p*p+S*S)},equals:function(u){return u=I(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=I(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+x(this.x)+", "+x(this.y)+")"}};function I(u,p,S){return u instanceof z?u:N(u)?new z(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new z(u.x,u.y):new z(u,p,S)}function j(u,p){if(u)for(var S=p?[u,p]:u,M=0,B=S.length;M<B;M++)this.extend(S[M])}j.prototype={extend:function(u){var p,S;if(!u)return this;if(u instanceof z||typeof u[0]=="number"||"x"in u)p=S=I(u);else if(u=q(u),p=u.min,S=u.max,!p||!S)return this;return!this.min&&!this.max?(this.min=p.clone(),this.max=S.clone()):(this.min.x=Math.min(p.x,this.min.x),this.max.x=Math.max(S.x,this.max.x),this.min.y=Math.min(p.y,this.min.y),this.max.y=Math.max(S.y,this.max.y)),this},getCenter:function(u){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,u)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(u){var p,S;return typeof u[0]=="number"||u instanceof z?u=I(u):u=q(u),u instanceof j?(p=u.min,S=u.max):p=S=u,p.x>=this.min.x&&S.x<=this.max.x&&p.y>=this.min.y&&S.y<=this.max.y},intersects:function(u){u=q(u);var p=this.min,S=this.max,M=u.min,B=u.max,K=B.x>=p.x&&M.x<=S.x,fe=B.y>=p.y&&M.y<=S.y;return K&&fe},overlaps:function(u){u=q(u);var p=this.min,S=this.max,M=u.min,B=u.max,K=B.x>p.x&&M.x<S.x,fe=B.y>p.y&&M.y<S.y;return K&&fe},isValid:function(){return!!(this.min&&this.max)},pad:function(u){var p=this.min,S=this.max,M=Math.abs(p.x-S.x)*u,B=Math.abs(p.y-S.y)*u;return q(I(p.x-M,p.y-B),I(S.x+M,S.y+B))},equals:function(u){return u?(u=q(u),this.min.equals(u.getTopLeft())&&this.max.equals(u.getBottomRight())):!1}};function q(u,p){return!u||u instanceof j?u:new j(u,p)}function ee(u,p){if(u)for(var S=p?[u,p]:u,M=0,B=S.length;M<B;M++)this.extend(S[M])}ee.prototype={extend:function(u){var p=this._southWest,S=this._northEast,M,B;if(u instanceof pe)M=u,B=u;else if(u instanceof ee){if(M=u._southWest,B=u._northEast,!M||!B)return this}else return u?this.extend(he(u)||le(u)):this;return!p&&!S?(this._southWest=new pe(M.lat,M.lng),this._northEast=new pe(B.lat,B.lng)):(p.lat=Math.min(M.lat,p.lat),p.lng=Math.min(M.lng,p.lng),S.lat=Math.max(B.lat,S.lat),S.lng=Math.max(B.lng,S.lng)),this},pad:function(u){var p=this._southWest,S=this._northEast,M=Math.abs(p.lat-S.lat)*u,B=Math.abs(p.lng-S.lng)*u;return new ee(new pe(p.lat-M,p.lng-B),new pe(S.lat+M,S.lng+B))},getCenter:function(){return new pe((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new pe(this.getNorth(),this.getWest())},getSouthEast:function(){return new pe(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(u){typeof u[0]=="number"||u instanceof pe||"lat"in u?u=he(u):u=le(u);var p=this._southWest,S=this._northEast,M,B;return u instanceof ee?(M=u.getSouthWest(),B=u.getNorthEast()):M=B=u,M.lat>=p.lat&&B.lat<=S.lat&&M.lng>=p.lng&&B.lng<=S.lng},intersects:function(u){u=le(u);var p=this._southWest,S=this._northEast,M=u.getSouthWest(),B=u.getNorthEast(),K=B.lat>=p.lat&&M.lat<=S.lat,fe=B.lng>=p.lng&&M.lng<=S.lng;return K&&fe},overlaps:function(u){u=le(u);var p=this._southWest,S=this._northEast,M=u.getSouthWest(),B=u.getNorthEast(),K=B.lat>p.lat&&M.lat<S.lat,fe=B.lng>p.lng&&M.lng<S.lng;return K&&fe},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(u,p){return u?(u=le(u),this._southWest.equals(u.getSouthWest(),p)&&this._northEast.equals(u.getNorthEast(),p)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function le(u,p){return u instanceof ee?u:new ee(u,p)}function pe(u,p,S){if(isNaN(u)||isNaN(p))throw new Error("Invalid LatLng object: ("+u+", "+p+")");this.lat=+u,this.lng=+p,S!==void 0&&(this.alt=+S)}pe.prototype={equals:function(u,p){if(!u)return!1;u=he(u);var S=Math.max(Math.abs(this.lat-u.lat),Math.abs(this.lng-u.lng));return S<=(p===void 0?1e-9:p)},toString:function(u){return"LatLng("+x(this.lat,u)+", "+x(this.lng,u)+")"},distanceTo:function(u){return D.distance(this,he(u))},wrap:function(){return D.wrapLatLng(this)},toBounds:function(u){var p=180*u/40075017,S=p/Math.cos(Math.PI/180*this.lat);return le([this.lat-p,this.lng-S],[this.lat+p,this.lng+S])},clone:function(){return new pe(this.lat,this.lng,this.alt)}};function he(u,p,S){return u instanceof pe?u:N(u)&&typeof u[0]!="object"?u.length===3?new pe(u[0],u[1],u[2]):u.length===2?new pe(u[0],u[1]):null:u==null?u:typeof u=="object"&&"lat"in u?new pe(u.lat,"lng"in u?u.lng:u.lon,u.alt):p===void 0?null:new pe(u,p,S)}var ve={latLngToPoint:function(u,p){var S=this.projection.project(u),M=this.scale(p);return this.transformation._transform(S,M)},pointToLatLng:function(u,p){var S=this.scale(p),M=this.transformation.untransform(u,S);return this.projection.unproject(M)},project:function(u){return this.projection.project(u)},unproject:function(u){return this.projection.unproject(u)},scale:function(u){return 256*Math.pow(2,u)},zoom:function(u){return Math.log(u/256)/Math.LN2},getProjectedBounds:function(u){if(this.infinite)return null;var p=this.projection.bounds,S=this.scale(u),M=this.transformation.transform(p.min,S),B=this.transformation.transform(p.max,S);return new j(M,B)},infinite:!1,wrapLatLng:function(u){var p=this.wrapLng?m(u.lng,this.wrapLng,!0):u.lng,S=this.wrapLat?m(u.lat,this.wrapLat,!0):u.lat,M=u.alt;return new pe(S,p,M)},wrapLatLngBounds:function(u){var p=u.getCenter(),S=this.wrapLatLng(p),M=p.lat-S.lat,B=p.lng-S.lng;if(M===0&&B===0)return u;var K=u.getSouthWest(),fe=u.getNorthEast(),be=new pe(K.lat-M,K.lng-B),Ae=new pe(fe.lat-M,fe.lng-B);return new ee(be,Ae)}},D=i({},ve,{wrapLng:[-180,180],R:6371e3,distance:function(u,p){var S=Math.PI/180,M=u.lat*S,B=p.lat*S,K=Math.sin((p.lat-u.lat)*S/2),fe=Math.sin((p.lng-u.lng)*S/2),be=K*K+Math.cos(M)*Math.cos(B)*fe*fe,Ae=2*Math.atan2(Math.sqrt(be),Math.sqrt(1-be));return this.R*Ae}}),R=6378137,G={R,MAX_LATITUDE:85.0511287798,project:function(u){var p=Math.PI/180,S=this.MAX_LATITUDE,M=Math.max(Math.min(S,u.lat),-S),B=Math.sin(M*p);return new z(this.R*u.lng*p,this.R*Math.log((1+B)/(1-B))/2)},unproject:function(u){var p=180/Math.PI;return new pe((2*Math.atan(Math.exp(u.y/this.R))-Math.PI/2)*p,u.x*p/this.R)},bounds:function(){var u=R*Math.PI;return new j([-u,-u],[u,u])}()};function te(u,p,S,M){if(N(u)){this._a=u[0],this._b=u[1],this._c=u[2],this._d=u[3];return}this._a=u,this._b=p,this._c=S,this._d=M}te.prototype={transform:function(u,p){return this._transform(u.clone(),p)},_transform:function(u,p){return p=p||1,u.x=p*(this._a*u.x+this._b),u.y=p*(this._c*u.y+this._d),u},untransform:function(u,p){return p=p||1,new z((u.x/p-this._b)/this._a,(u.y/p-this._d)/this._c)}};function V(u,p,S,M){return new te(u,p,S,M)}var Z=i({},D,{code:"EPSG:3857",projection:G,transformation:function(){var u=.5/(Math.PI*G.R);return V(u,.5,-u,.5)}()}),ne=i({},Z,{code:"EPSG:900913"});function me(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function ie(u,p){var S="",M,B,K,fe,be,Ae;for(M=0,K=u.length;M<K;M++){for(be=u[M],B=0,fe=be.length;B<fe;B++)Ae=be[B],S+=(B?"L":"M")+Ae.x+" "+Ae.y;S+=p?et.svg?"z":"x":""}return S||"M0 0"}var xe=document.documentElement.style,Ee="ActiveXObject"in window,Me=Ee&&!document.addEventListener,Ue="msLaunchUri"in navigator&&!("documentMode"in document),ke=Dn("webkit"),Ve=Dn("android"),ot=Dn("android 2")||Dn("android 3"),Ge=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Qe=Ve&&Dn("Google")&&Ge<537&&!("AudioNode"in window),We=!!window.opera,ze=!Ue&&Dn("chrome"),nt=Dn("gecko")&&!ke&&!We&&!Ee,Pt=!ze&&Dn("safari"),at=Dn("phantom"),Lt="OTransition"in xe,Ot=navigator.platform.indexOf("Win")===0,gt=Ee&&"transition"in xe,$t="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!ot,On="MozPerspective"in xe,vt=!window.L_DISABLE_3D&&(gt||$t||On)&&!Lt&&!at,Ui=typeof orientation<"u"||Dn("mobile"),Xn=Ui&&ke,Rl=Ui&&$t,Ur=!window.PointerEvent&&window.MSPointerEvent,fo=!!(window.PointerEvent||Ur),ho="ontouchstart"in window||!!window.TouchEvent,Bi=!window.L_NO_TOUCH&&(ho||fo),Da=Ui&&We,hi=Ui&&nt,jn=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,fn=function(){var u=!1;try{var p=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",y,p),window.removeEventListener("testPassiveEventSupport",y,p)}catch{}return u}(),Qn=function(){return!!document.createElement("canvas").getContext}(),xn=!!(document.createElementNS&&me("svg").createSVGRect),Jn=!!xn&&function(){var u=document.createElement("div");return u.innerHTML="<svg/>",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Mn=!xn&&function(){try{var u=document.createElement("div");u.innerHTML='<v:shape adj="1"/>';var p=u.firstChild;return p.style.behavior="url(#default#VML)",p&&typeof p.adj=="object"}catch{return!1}}(),Zr=navigator.platform.indexOf("Mac")===0,Xr=navigator.platform.indexOf("Linux")===0;function Dn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var et={ie:Ee,ielt9:Me,edge:Ue,webkit:ke,android:Ve,android23:ot,androidStock:Qe,opera:We,chrome:ze,gecko:nt,safari:Pt,phantom:at,opera12:Lt,win:Ot,ie3d:gt,webkit3d:$t,gecko3d:On,any3d:vt,mobile:Ui,mobileWebkit:Xn,mobileWebkit3d:Rl,msPointer:Ur,pointer:fo,touch:Bi,touchNative:ho,mobileOpera:Da,mobileGecko:hi,retina:jn,passiveEvents:fn,canvas:Qn,svg:xn,vml:Mn,inlineSvg:Jn,mac:Zr,linux:Xr},qf=et.msPointer?"MSPointerDown":"pointerdown",Gf=et.msPointer?"MSPointerMove":"pointermove",sa=et.msPointer?"MSPointerUp":"pointerup",$n=et.msPointer?"MSPointerCancel":"pointercancel",dr={touchstart:qf,touchmove:Gf,touchend:sa,touchcancel:$n},mo={touchstart:gs,touchmove:Ia,touchend:Ia,touchcancel:Ia},ka={},jm=!1;function C0(u,p,S){return p==="touchstart"&&ps(),mo[p]?(S=mo[p].bind(this,S),u.addEventListener(dr[p],S,!1),S):(console.warn("wrong event specified:",p),y)}function Mm(u,p,S){if(!dr[p]){console.warn("wrong event specified:",p);return}u.removeEventListener(dr[p],S,!1)}function Dl(u){ka[u.pointerId]=u}function Yf(u){ka[u.pointerId]&&(ka[u.pointerId]=u)}function po(u){delete ka[u.pointerId]}function ps(){jm||(document.addEventListener(qf,Dl,!0),document.addEventListener(Gf,Yf,!0),document.addEventListener(sa,po,!0),document.addEventListener($n,po,!0),jm=!0)}function Ia(u,p){if(p.pointerType!==(p.MSPOINTER_TYPE_MOUSE||"mouse")){p.touches=[];for(var S in ka)p.touches.push(ka[S]);p.changedTouches=[p],u(p)}}function gs(u,p){p.MSPOINTER_TYPE_TOUCH&&p.pointerType===p.MSPOINTER_TYPE_TOUCH&&Pn(p),Ia(u,p)}function Vn(u){var p={},S,M;for(M in u)S=u[M],p[M]=S&&S.bind?S.bind(u):S;return u=p,p.type="dblclick",p.detail=2,p.isTrusted=!1,p._simulated=!0,p}var Pm=200;function Lm(u,p){u.addEventListener("dblclick",p);var S=0,M;function B(K){if(K.detail!==1){M=K.detail;return}if(!(K.pointerType==="mouse"||K.sourceCapabilities&&!K.sourceCapabilities.firesTouchEvents)){var fe=$l(K);if(!(fe.some(function(Ae){return Ae instanceof HTMLLabelElement&&Ae.attributes.for})&&!fe.some(function(Ae){return Ae instanceof HTMLInputElement||Ae instanceof HTMLSelectElement}))){var be=Date.now();be-S<=Pm?(M++,M===2&&p(Vn(K))):M=1,S=be}}}return u.addEventListener("click",B),{dblclick:p,simDblclick:B}}function go(u,p){u.removeEventListener("dblclick",p.dblclick),u.removeEventListener("click",p.simDblclick)}var za=zl(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),kl=zl(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Wf=kl==="webkitTransition"||kl==="OTransition"?kl+"End":"transitionend";function Kf(u){return typeof u=="string"?document.getElementById(u):u}function Il(u,p){var S=u.style[p]||u.currentStyle&&u.currentStyle[p];if((!S||S==="auto")&&document.defaultView){var M=document.defaultView.getComputedStyle(u,null);S=M?M[p]:null}return S==="auto"?null:S}function yt(u,p,S){var M=document.createElement(u);return M.className=p||"",S&&S.appendChild(M),M}function Gt(u){var p=u.parentNode;p&&p.removeChild(u)}function Qr(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function er(u){var p=u.parentNode;p&&p.lastChild!==u&&p.appendChild(u)}function vo(u){var p=u.parentNode;p&&p.firstChild!==u&&p.insertBefore(u,p.firstChild)}function Zf(u,p){if(u.classList!==void 0)return u.classList.contains(p);var S=tc(u);return S.length>0&&new RegExp("(^|\\s)"+p+"(\\s|$)").test(S)}function ut(u,p){if(u.classList!==void 0)for(var S=C(p),M=0,B=S.length;M<B;M++)u.classList.add(S[M]);else if(!Zf(u,p)){var K=tc(u);vs(u,(K?K+" ":"")+p)}}function dn(u,p){u.classList!==void 0?u.classList.remove(p):vs(u,b((" "+tc(u)+" ").replace(" "+p+" "," ")))}function vs(u,p){u.className.baseVal===void 0?u.className=p:u.className.baseVal=p}function tc(u){return u.correspondingElement&&(u=u.correspondingElement),u.className.baseVal===void 0?u.className:u.className.baseVal}function rn(u,p){"opacity"in u.style?u.style.opacity=p:"filter"in u.style&&Xf(u,p)}function Xf(u,p){var S=!1,M="DXImageTransform.Microsoft.Alpha";try{S=u.filters.item(M)}catch{if(p===1)return}p=Math.round(p*100),S?(S.Enabled=p!==100,S.Opacity=p):u.style.filter+=" progid:"+M+"(opacity="+p+")"}function zl(u){for(var p=document.documentElement.style,S=0;S<u.length;S++)if(u[S]in p)return u[S];return!1}function la(u,p,S){var M=p||new z(0,0);u.style[za]=(et.ie3d?"translate("+M.x+"px,"+M.y+"px)":"translate3d("+M.x+"px,"+M.y+"px,0)")+(S?" scale("+S+")":"")}function Xt(u,p){u._leaflet_pos=p,et.any3d?la(u,p):(u.style.left=p.x+"px",u.style.top=p.y+"px")}function Ua(u){return u._leaflet_pos||new z(0,0)}var ys,Fi,Qf;if("onselectstart"in document)ys=function(){lt(window,"selectstart",Pn)},Fi=function(){Bt(window,"selectstart",Pn)};else{var bs=zl(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ys=function(){if(bs){var u=document.documentElement.style;Qf=u[bs],u[bs]="none"}},Fi=function(){bs&&(document.documentElement.style[bs]=Qf,Qf=void 0)}}function nc(){lt(window,"dragstart",Pn)}function Ul(){Bt(window,"dragstart",Pn)}var rc,Jf;function xs(u){for(;u.tabIndex===-1;)u=u.parentNode;u.style&&(Jr(),rc=u,Jf=u.style.outlineStyle,u.style.outlineStyle="none",lt(window,"keydown",Jr))}function Jr(){rc&&(rc.style.outlineStyle=Jf,rc=void 0,Jf=void 0,Bt(window,"keydown",Jr))}function ic(u){do u=u.parentNode;while((!u.offsetWidth||!u.offsetHeight)&&u!==document.body);return u}function Bl(u){var p=u.getBoundingClientRect();return{x:p.width/u.offsetWidth||1,y:p.height/u.offsetHeight||1,boundingClientRect:p}}var _s={__proto__:null,TRANSFORM:za,TRANSITION:kl,TRANSITION_END:Wf,get:Kf,getStyle:Il,create:yt,remove:Gt,empty:Qr,toFront:er,toBack:vo,hasClass:Zf,addClass:ut,removeClass:dn,setClass:vs,getClass:tc,setOpacity:rn,testProp:zl,setTransform:la,setPosition:Xt,getPosition:Ua,get disableTextSelection(){return ys},get enableTextSelection(){return Fi},disableImageDrag:nc,enableImageDrag:Ul,preventOutline:xs,restoreOutline:Jr,getSizedParentNode:ic,getScale:Bl};function lt(u,p,S,M){if(p&&typeof p=="object")for(var B in p)pi(u,B,p[B],S);else{p=C(p);for(var K=0,fe=p.length;K<fe;K++)pi(u,p[K],S,M)}return this}var mi="_leaflet_events";function Bt(u,p,S,M){if(arguments.length===1)ed(u),delete u[mi];else if(p&&typeof p=="object")for(var B in p)Fl(u,B,p[B],S);else if(p=C(p),arguments.length===2)ed(u,function(be){return F(p,be)!==-1});else for(var K=0,fe=p.length;K<fe;K++)Fl(u,p[K],S,M);return this}function ed(u,p){for(var S in u[mi]){var M=S.split(/\d/)[0];(!p||p(M))&&Fl(u,M,null,null,S)}}var yo={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function pi(u,p,S,M){var B=p+f(S)+(M?"_"+f(M):"");if(u[mi]&&u[mi][B])return this;var K=function(be){return S.call(M||u,be||window.event)},fe=K;!et.touchNative&&et.pointer&&p.indexOf("touch")===0?K=C0(u,p,K):et.touch&&p==="dblclick"?K=Lm(u,K):"addEventListener"in u?p==="touchstart"||p==="touchmove"||p==="wheel"||p==="mousewheel"?u.addEventListener(yo[p]||p,K,et.passiveEvents?{passive:!1}:!1):p==="mouseenter"||p==="mouseleave"?(K=function(be){be=be||window.event,ua(u,be)&&fe(be)},u.addEventListener(yo[p],K,!1)):u.addEventListener(p,fe,!1):u.attachEvent("on"+p,K),u[mi]=u[mi]||{},u[mi][B]=K}function Fl(u,p,S,M,B){B=B||p+f(S)+(M?"_"+f(M):"");var K=u[mi]&&u[mi][B];if(!K)return this;!et.touchNative&&et.pointer&&p.indexOf("touch")===0?Mm(u,p,K):et.touch&&p==="dblclick"?go(u,K):"removeEventListener"in u?u.removeEventListener(yo[p]||p,K,!1):u.detachEvent("on"+p,K),u[mi][B]=null}function gi(u){return u.stopPropagation?u.stopPropagation():u.originalEvent?u.originalEvent._stopped=!0:u.cancelBubble=!0,this}function $i(u){return pi(u,"wheel",gi),this}function bo(u){return lt(u,"mousedown touchstart dblclick contextmenu",gi),u._leaflet_disable_click=!0,this}function Pn(u){return u.preventDefault?u.preventDefault():u.returnValue=!1,this}function Ba(u){return Pn(u),gi(u),this}function $l(u){if(u.composedPath)return u.composedPath();for(var p=[],S=u.target;S;)p.push(S),S=S.parentNode;return p}function Vl(u,p){if(!p)return new z(u.clientX,u.clientY);var S=Bl(p),M=S.boundingClientRect;return new z((u.clientX-M.left)/S.x-p.clientLeft,(u.clientY-M.top)/S.y-p.clientTop)}var Nm=et.linux&&et.chrome?window.devicePixelRatio:et.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function xr(u){return et.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/Nm: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 ua(u,p){var S=p.relatedTarget;if(!S)return!0;try{for(;S&&S!==u;)S=S.parentNode}catch{return!1}return S!==u}var ac={__proto__:null,on:lt,off:Bt,stopPropagation:gi,disableScrollPropagation:$i,disableClickPropagation:bo,preventDefault:Pn,stop:Ba,getPropagationPath:$l,getMousePosition:Vl,getWheelDelta:xr,isExternalTarget:ua,addListener:lt,removeListener:Bt},ws=k.extend({run:function(u,p,S,M){this.stop(),this._el=u,this._inProgress=!0,this._duration=S||.25,this._easeOutPower=1/Math.max(M||.5,.2),this._startPos=Ua(u),this._offset=p.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=J(this._animate,this),this._step()},_step:function(u){var p=+new Date-this._startTime,S=this._duration*1e3;p<S?this._runFrame(this._easeOut(p/S),u):(this._runFrame(1),this._complete())},_runFrame:function(u,p){var S=this._startPos.add(this._offset.multiplyBy(u));p&&S._round(),Xt(this._el,S),this.fire("step")},_complete:function(){oe(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(u){return 1-Math.pow(1-u,this._easeOutPower)}}),Ct=k.extend({options:{crs:Z,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(u,p){p=w(this,p),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(u),this._initLayout(),this._onResize=l(this._onResize,this),this._initEvents(),p.maxBounds&&this.setMaxBounds(p.maxBounds),p.zoom!==void 0&&(this._zoom=this._limitZoom(p.zoom)),p.center&&p.zoom!==void 0&&this.setView(he(p.center),p.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=kl&&et.any3d&&!et.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),lt(this._proxy,Wf,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(u,p,S){if(p=p===void 0?this._zoom:this._limitZoom(p),u=this._limitCenter(he(u),p,this.options.maxBounds),S=S||{},this._stop(),this._loaded&&!S.reset&&S!==!0){S.animate!==void 0&&(S.zoom=i({animate:S.animate},S.zoom),S.pan=i({animate:S.animate,duration:S.duration},S.pan));var M=this._zoom!==p?this._tryAnimatedZoom&&this._tryAnimatedZoom(u,p,S.zoom):this._tryAnimatedPan(u,S.pan);if(M)return clearTimeout(this._sizeTimer),this}return this._resetView(u,p,S.pan&&S.pan.noMoveStart),this},setZoom:function(u,p){return this._loaded?this.setView(this.getCenter(),u,{zoom:p}):(this._zoom=u,this)},zoomIn:function(u,p){return u=u||(et.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+u,p)},zoomOut:function(u,p){return u=u||(et.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-u,p)},setZoomAround:function(u,p,S){var M=this.getZoomScale(p),B=this.getSize().divideBy(2),K=u instanceof z?u:this.latLngToContainerPoint(u),fe=K.subtract(B).multiplyBy(1-1/M),be=this.containerPointToLatLng(B.add(fe));return this.setView(be,p,{zoom:S})},_getBoundsCenterZoom:function(u,p){p=p||{},u=u.getBounds?u.getBounds():le(u);var S=I(p.paddingTopLeft||p.padding||[0,0]),M=I(p.paddingBottomRight||p.padding||[0,0]),B=this.getBoundsZoom(u,!1,S.add(M));if(B=typeof p.maxZoom=="number"?Math.min(p.maxZoom,B):B,B===1/0)return{center:u.getCenter(),zoom:B};var K=M.subtract(S).divideBy(2),fe=this.project(u.getSouthWest(),B),be=this.project(u.getNorthEast(),B),Ae=this.unproject(fe.add(be).divideBy(2).add(K),B);return{center:Ae,zoom:B}},fitBounds:function(u,p){if(u=le(u),!u.isValid())throw new Error("Bounds are not valid.");var S=this._getBoundsCenterZoom(u,p);return this.setView(S.center,S.zoom,p)},fitWorld:function(u){return this.fitBounds([[-90,-180],[90,180]],u)},panTo:function(u,p){return this.setView(u,this._zoom,{pan:p})},panBy:function(u,p){if(u=I(u).round(),p=p||{},!u.x&&!u.y)return this.fire("moveend");if(p.animate!==!0&&!this.getSize().contains(u))return this._resetView(this.unproject(this.project(this.getCenter()).add(u)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new ws,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),p.noMoveStart||this.fire("movestart"),p.animate!==!1){ut(this._mapPane,"leaflet-pan-anim");var S=this._getMapPanePos().subtract(u).round();this._panAnim.run(this._mapPane,S,p.duration||.25,p.easeLinearity)}else this._rawPanBy(u),this.fire("move").fire("moveend");return this},flyTo:function(u,p,S){if(S=S||{},S.animate===!1||!et.any3d)return this.setView(u,p,S);this._stop();var M=this.project(this.getCenter()),B=this.project(u),K=this.getSize(),fe=this._zoom;u=he(u),p=p===void 0?fe:p;var be=Math.max(K.x,K.y),Ae=be*this.getZoomScale(fe,p),Ne=B.distanceTo(M)||1,He=1.42,tt=He*He;function ht(_n){var ha=_n?-1:1,So=_n?Ae:be,pd=Ae*Ae-be*be+ha*tt*tt*Ne*Ne,au=2*So*tt*Ne,ou=pd/au,Ka=Math.sqrt(ou*ou+1)-ou,ma=Ka<1e-9?-18:Math.log(Ka);return ma}function tr(_n){return(Math.exp(_n)-Math.exp(-_n))/2}function Ln(_n){return(Math.exp(_n)+Math.exp(-_n))/2}function Fr(_n){return tr(_n)/Ln(_n)}var Rt=ht(0);function Dt(_n){return be*(Ln(Rt)/Ln(Rt+He*_n))}function bt(_n){return be*(Ln(Rt)*Fr(Rt+He*_n)-tr(Rt))/tt}function Ya(_n){return 1-Math.pow(1-_n,1.5)}var ri=Date.now(),bc=(ht(1)-Rt)/He,Wa=S.duration?1e3*S.duration:1e3*bc*.8;function md(){var _n=(Date.now()-ri)/Wa,ha=Ya(_n)*bc;_n<=1?(this._flyToFrame=J(md,this),this._move(this.unproject(M.add(B.subtract(M).multiplyBy(bt(ha)/Ne)),fe),this.getScaleZoom(be/Dt(ha),fe),{flyTo:!0})):this._move(u,p)._moveEnd(!0)}return this._moveStart(!0,S.noMoveStart),md.call(this),this},flyToBounds:function(u,p){var S=this._getBoundsCenterZoom(u,p);return this.flyTo(S.center,S.zoom,p)},setMaxBounds:function(u){return u=le(u),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),u.isValid()?(this.options.maxBounds=u,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(u){var p=this.options.minZoom;return this.options.minZoom=u,this._loaded&&p!==u&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(u):this},setMaxZoom:function(u){var p=this.options.maxZoom;return this.options.maxZoom=u,this._loaded&&p!==u&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,p){this._enforcingBounds=!0;var S=this.getCenter(),M=this._limitCenter(S,this._zoom,le(u));return S.equals(M)||this.panTo(M,p),this._enforcingBounds=!1,this},panInside:function(u,p){p=p||{};var S=I(p.paddingTopLeft||p.padding||[0,0]),M=I(p.paddingBottomRight||p.padding||[0,0]),B=this.project(this.getCenter()),K=this.project(u),fe=this.getPixelBounds(),be=q([fe.min.add(S),fe.max.subtract(M)]),Ae=be.getSize();if(!be.contains(K)){this._enforcingBounds=!0;var Ne=K.subtract(be.getCenter()),He=be.extend(K).getSize().subtract(Ae);B.x+=Ne.x<0?-He.x:He.x,B.y+=Ne.y<0?-He.y:He.y,this.panTo(this.unproject(B),p),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 p=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var S=this.getSize(),M=p.divideBy(2).round(),B=S.divideBy(2).round(),K=M.subtract(B);return!K.x&&!K.y?this:(u.animate&&u.pan?this.panBy(K):(u.pan&&this._rawPanBy(K),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:p,newSize:S}))},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 p=l(this._handleGeolocationResponse,this),S=l(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(p,S,u):navigator.geolocation.getCurrentPosition(p,S,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 p=u.code,S=u.message||(p===1?"permission denied":p===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:p,message:"Geolocation error: "+S+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var p=u.coords.latitude,S=u.coords.longitude,M=new pe(p,S),B=M.toBounds(u.coords.accuracy*2),K=this._locateOptions;if(K.setView){var fe=this.getBoundsZoom(B);this.setView(M,K.maxZoom?Math.min(fe,K.maxZoom):fe)}var be={latlng:M,bounds:B,timestamp:u.timestamp};for(var Ae in u.coords)typeof u.coords[Ae]=="number"&&(be[Ae]=u.coords[Ae]);this.fire("locationfound",be)}},addHandler:function(u,p){if(!p)return this;var S=this[u]=new p(this);return this._handlers.push(S),this.options[u]&&S.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(),Gt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(oe(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)Gt(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,p){var S="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),M=yt("div",S,p||this._mapPane);return u&&(this._panes[u]=M),M},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(),p=this.unproject(u.getBottomLeft()),S=this.unproject(u.getTopRight());return new ee(p,S)},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,p,S){u=le(u),S=I(S||[0,0]);var M=this.getZoom()||0,B=this.getMinZoom(),K=this.getMaxZoom(),fe=u.getNorthWest(),be=u.getSouthEast(),Ae=this.getSize().subtract(S),Ne=q(this.project(be,M),this.project(fe,M)).getSize(),He=et.any3d?this.options.zoomSnap:1,tt=Ae.x/Ne.x,ht=Ae.y/Ne.y,tr=p?Math.max(tt,ht):Math.min(tt,ht);return M=this.getScaleZoom(tr,M),He&&(M=Math.round(M/(He/100))*(He/100),M=p?Math.ceil(M/He)*He:Math.floor(M/He)*He),Math.max(B,Math.min(K,M))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,p){var S=this._getTopLeftPoint(u,p);return new j(S,S.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,p){var S=this.options.crs;return p=p===void 0?this._zoom:p,S.scale(u)/S.scale(p)},getScaleZoom:function(u,p){var S=this.options.crs;p=p===void 0?this._zoom:p;var M=S.zoom(u*S.scale(p));return isNaN(M)?1/0:M},project:function(u,p){return p=p===void 0?this._zoom:p,this.options.crs.latLngToPoint(he(u),p)},unproject:function(u,p){return p=p===void 0?this._zoom:p,this.options.crs.pointToLatLng(I(u),p)},layerPointToLatLng:function(u){var p=I(u).add(this.getPixelOrigin());return this.unproject(p)},latLngToLayerPoint:function(u){var p=this.project(he(u))._round();return p._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(he(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(le(u))},distance:function(u,p){return this.options.crs.distance(he(u),he(p))},containerPointToLayerPoint:function(u){return I(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return I(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var p=this.containerPointToLayerPoint(I(u));return this.layerPointToLatLng(p)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(he(u)))},mouseEventToContainerPoint:function(u){return Vl(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 p=this._container=Kf(u);if(p){if(p._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");lt(p,"scroll",this._onScroll,this),this._containerId=f(p)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&et.any3d,ut(u,"leaflet-container"+(et.touch?" leaflet-touch":"")+(et.retina?" leaflet-retina":"")+(et.ielt9?" leaflet-oldie":"")+(et.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var p=Il(u,"position");p!=="absolute"&&p!=="relative"&&p!=="fixed"&&p!=="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),Xt(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ut(u.markerPane,"leaflet-zoom-hide"),ut(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,p,S){Xt(this._mapPane,new z(0,0));var M=!this._loaded;this._loaded=!0,p=this._limitZoom(p),this.fire("viewprereset");var B=this._zoom!==p;this._moveStart(B,S)._move(u,p)._moveEnd(B),this.fire("viewreset"),M&&this.fire("load")},_moveStart:function(u,p){return u&&this.fire("zoomstart"),p||this.fire("movestart"),this},_move:function(u,p,S,M){p===void 0&&(p=this._zoom);var B=this._zoom!==p;return this._zoom=p,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),M?S&&S.pinch&&this.fire("zoom",S):((B||S&&S.pinch)&&this.fire("zoom",S),this.fire("move",S)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return oe(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){Xt(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[f(this._container)]=this;var p=u?Bt:lt;p(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&p(window,"resize",this._onResize,this),et.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){oe(this._resizeRequest),this._resizeRequest=J(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,p){for(var S=[],M,B=p==="mouseout"||p==="mouseover",K=u.target||u.srcElement,fe=!1;K;){if(M=this._targets[f(K)],M&&(p==="click"||p==="preclick")&&this._draggableMoved(M)){fe=!0;break}if(M&&M.listens(p,!0)&&(B&&!ua(K,u)||(S.push(M),B))||K===this._container)break;K=K.parentNode}return!S.length&&!fe&&!B&&this.listens(p,!0)&&(S=[this]),S},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var p=u.target||u.srcElement;if(!(!this._loaded||p._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(p))){var S=u.type;S==="mousedown"&&xs(p),this._fireDOMEvent(u,S)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,p,S){if(u.type==="click"){var M=i({},u);M.type="preclick",this._fireDOMEvent(M,M.type,S)}var B=this._findEventTargets(u,p);if(S){for(var K=[],fe=0;fe<S.length;fe++)S[fe].listens(p,!0)&&K.push(S[fe]);B=K.concat(B)}if(B.length){p==="contextmenu"&&Pn(u);var be=B[0],Ae={originalEvent:u};if(u.type!=="keypress"&&u.type!=="keydown"&&u.type!=="keyup"){var Ne=be.getLatLng&&(!be._radius||be._radius<=10);Ae.containerPoint=Ne?this.latLngToContainerPoint(be.getLatLng()):this.mouseEventToContainerPoint(u),Ae.layerPoint=this.containerPointToLayerPoint(Ae.containerPoint),Ae.latlng=Ne?be.getLatLng():this.layerPointToLatLng(Ae.layerPoint)}for(fe=0;fe<B.length;fe++)if(B[fe].fire(p,Ae,!0),Ae.originalEvent._stopped||B[fe].options.bubblingMouseEvents===!1&&F(this._mouseEvents,p)!==-1)return}},_draggableMoved:function(u){return u=u.dragging&&u.dragging.enabled()?u:this,u.dragging&&u.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var u=0,p=this._handlers.length;u<p;u++)this._handlers[u].disable()},whenReady:function(u,p){return this._loaded?u.call(p||this,{target:this}):this.on("load",u,p),this},_getMapPanePos:function(){return Ua(this._mapPane)||new z(0,0)},_moved:function(){var u=this._getMapPanePos();return u&&!u.equals([0,0])},_getTopLeftPoint:function(u,p){var S=u&&p!==void 0?this._getNewPixelOrigin(u,p):this.getPixelOrigin();return S.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(u,p){var S=this.getSize()._divideBy(2);return this.project(u,p)._subtract(S)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(u,p,S){var M=this._getNewPixelOrigin(S,p);return this.project(u,p)._subtract(M)},_latLngBoundsToNewLayerBounds:function(u,p,S){var M=this._getNewPixelOrigin(S,p);return q([this.project(u.getSouthWest(),p)._subtract(M),this.project(u.getNorthWest(),p)._subtract(M),this.project(u.getSouthEast(),p)._subtract(M),this.project(u.getNorthEast(),p)._subtract(M)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(u){return this.latLngToLayerPoint(u).subtract(this._getCenterLayerPoint())},_limitCenter:function(u,p,S){if(!S)return u;var M=this.project(u,p),B=this.getSize().divideBy(2),K=new j(M.subtract(B),M.add(B)),fe=this._getBoundsOffset(K,S,p);return Math.abs(fe.x)<=1&&Math.abs(fe.y)<=1?u:this.unproject(M.add(fe),p)},_limitOffset:function(u,p){if(!p)return u;var S=this.getPixelBounds(),M=new j(S.min.add(u),S.max.add(u));return u.add(this._getBoundsOffset(M,p))},_getBoundsOffset:function(u,p,S){var M=q(this.project(p.getNorthEast(),S),this.project(p.getSouthWest(),S)),B=M.min.subtract(u.min),K=M.max.subtract(u.max),fe=this._rebound(B.x,-K.x),be=this._rebound(B.y,-K.y);return new z(fe,be)},_rebound:function(u,p){return u+p>0?Math.round(u-p)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(p))},_limitZoom:function(u){var p=this.getMinZoom(),S=this.getMaxZoom(),M=et.any3d?this.options.zoomSnap:1;return M&&(u=Math.round(u/M)*M),Math.max(p,Math.min(S,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){dn(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,p){var S=this._getCenterOffset(u)._trunc();return(p&&p.animate)!==!0&&!this.getSize().contains(S)?!1:(this.panBy(S,p),!0)},_createAnimProxy:function(){var u=this._proxy=yt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(p){var S=za,M=this._proxy.style[S];la(this._proxy,this.project(p.center,p.zoom),this.getZoomScale(p.zoom,1)),M===this._proxy.style[S]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Gt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),p=this.getZoom();la(this._proxy,this.project(u,p),this.getZoomScale(p,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,p,S){if(this._animatingZoom)return!0;if(S=S||{},!this._zoomAnimated||S.animate===!1||this._nothingToAnimate()||Math.abs(p-this._zoom)>this.options.zoomAnimationThreshold)return!1;var M=this.getZoomScale(p),B=this._getCenterOffset(u)._divideBy(1-1/M);return S.animate!==!0&&!this.getSize().contains(B)?!1:(J(function(){this._moveStart(!0,S.noMoveStart||!1)._animateZoom(u,p,!0)},this),!0)},_animateZoom:function(u,p,S,M){this._mapPane&&(S&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=p,ut(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:p,noUpdate:M}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&dn(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 td(u,p){return new Ct(u,p)}var Br=se.extend({options:{position:"topright"},initialize:function(u){w(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var p=this._map;return p&&p.removeControl(this),this.options.position=u,p&&p.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var p=this._container=this.onAdd(u),S=this.getPosition(),M=u._controlCorners[S];return ut(p,"leaflet-control"),S.indexOf("bottom")!==-1?M.insertBefore(p,M.firstChild):M.appendChild(p),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Gt(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()}}),ca=function(u){return new Br(u)};Ct.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},p="leaflet-",S=this._controlContainer=yt("div",p+"control-container",this._container);function M(B,K){var fe=p+B+" "+p+K;u[B+K]=yt("div",fe,S)}M("top","left"),M("top","right"),M("bottom","left"),M("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Gt(this._controlCorners[u]);Gt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Hl=Br.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,p,S,M){return S<M?-1:M<S?1:0}},initialize:function(u,p,S){w(this,S),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var M in u)this._addLayer(u[M],M);for(M in p)this._addLayer(p[M],M,!0)},onAdd:function(u){this._initLayout(),this._update(),this._map=u,u.on("zoomend",this._checkDisabledLayers,this);for(var p=0;p<this._layers.length;p++)this._layers[p].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(u){return Br.prototype.addTo.call(this,u),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var u=0;u<this._layers.length;u++)this._layers[u].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(u,p){return this._addLayer(u,p),this._map?this._update():this},addOverlay:function(u,p){return this._addLayer(u,p,!0),this._map?this._update():this},removeLayer:function(u){u.off("add remove",this._onLayerChange,this);var p=this._getLayer(f(u));return p&&this._layers.splice(this._layers.indexOf(p),1),this._map?this._update():this},expand:function(){ut(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var u=this._map.getSize().y-(this._container.offsetTop+50);return u<this._section.clientHeight?(ut(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=u+"px"):dn(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return dn(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var u="leaflet-control-layers",p=this._container=yt("div",u),S=this.options.collapsed;p.setAttribute("aria-haspopup",!0),bo(p),$i(p);var M=this._section=yt("section",u+"-list");S&&(this._map.on("click",this.collapse,this),lt(p,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var B=this._layersLink=yt("a",u+"-toggle",p);B.href="#",B.title="Layers",B.setAttribute("role","button"),lt(B,{keydown:function(K){K.keyCode===13&&this._expandSafely()},click:function(K){Pn(K),this._expandSafely()}},this),S||this.expand(),this._baseLayersList=yt("div",u+"-base",M),this._separator=yt("div",u+"-separator",M),this._overlaysList=yt("div",u+"-overlays",M),p.appendChild(M)},_getLayer:function(u){for(var p=0;p<this._layers.length;p++)if(this._layers[p]&&f(this._layers[p].layer)===u)return this._layers[p]},_addLayer:function(u,p,S){this._map&&u.on("add remove",this._onLayerChange,this),this._layers.push({layer:u,name:p,overlay:S}),this.options.sortLayers&&this._layers.sort(l(function(M,B){return this.options.sortFunction(M.layer,B.layer,M.name,B.name)},this)),this.options.autoZIndex&&u.setZIndex&&(this._lastZIndex++,u.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Qr(this._baseLayersList),Qr(this._overlaysList),this._layerControlInputs=[];var u,p,S,M,B=0;for(S=0;S<this._layers.length;S++)M=this._layers[S],this._addItem(M),p=p||M.overlay,u=u||!M.overlay,B+=M.overlay?0:1;return this.options.hideSingleBase&&(u=u&&B>1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=p&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var p=this._getLayer(f(u.target)),S=p.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;S&&this._map.fire(S,p)},_createRadioElement:function(u,p){var S='<input type="radio" class="leaflet-control-layers-selector" name="'+u+'"'+(p?' checked="checked"':"")+"/>",M=document.createElement("div");return M.innerHTML=S,M.firstChild},_addItem:function(u){var p=document.createElement("label"),S=this._map.hasLayer(u.layer),M;u.overlay?(M=document.createElement("input"),M.type="checkbox",M.className="leaflet-control-layers-selector",M.defaultChecked=S):M=this._createRadioElement("leaflet-base-layers_"+f(this),S),this._layerControlInputs.push(M),M.layerId=f(u.layer),lt(M,"click",this._onInputClick,this);var B=document.createElement("span");B.innerHTML=" "+u.name;var K=document.createElement("span");p.appendChild(K),K.appendChild(M),K.appendChild(B);var fe=u.overlay?this._overlaysList:this._baseLayersList;return fe.appendChild(p),this._checkDisabledLayers(),p},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,p,S,M=[],B=[];this._handlingClick=!0;for(var K=u.length-1;K>=0;K--)p=u[K],S=this._getLayer(p.layerId).layer,p.checked?M.push(S):p.checked||B.push(S);for(K=0;K<B.length;K++)this._map.hasLayer(B[K])&&this._map.removeLayer(B[K]);for(K=0;K<M.length;K++)this._map.hasLayer(M[K])||this._map.addLayer(M[K]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var u=this._layerControlInputs,p,S,M=this._map.getZoom(),B=u.length-1;B>=0;B--)p=u[B],S=this._getLayer(p.layerId).layer,p.disabled=S.options.minZoom!==void 0&&M<S.options.minZoom||S.options.maxZoom!==void 0&&M>S.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,lt(u,"click",Pn),this.expand();var p=this;setTimeout(function(){Bt(u,"click",Pn),p._preventClick=!1})}}),Rm=function(u,p,S){return new Hl(u,p,S)},nd=Br.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(u){var p="leaflet-control-zoom",S=yt("div",p+" leaflet-bar"),M=this.options;return this._zoomInButton=this._createButton(M.zoomInText,M.zoomInTitle,p+"-in",S,this._zoomIn),this._zoomOutButton=this._createButton(M.zoomOutText,M.zoomOutTitle,p+"-out",S,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),S},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._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(u.shiftKey?3:1))},_zoomOut:function(u){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,p,S,M,B){var K=yt("a",S,M);return K.innerHTML=u,K.href="#",K.title=p,K.setAttribute("role","button"),K.setAttribute("aria-label",p),bo(K),lt(K,"click",Ba),lt(K,"click",B,this),lt(K,"click",this._refocusOnMap,this),K},_updateDisabled:function(){var u=this._map,p="leaflet-disabled";dn(this._zoomInButton,p),dn(this._zoomOutButton,p),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(ut(this._zoomOutButton,p),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(ut(this._zoomInButton,p),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ct.mergeOptions({zoomControl:!0}),Ct.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new nd,this.addControl(this.zoomControl))});var E0=function(u){return new nd(u)},Dm=Br.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var p="leaflet-control-scale",S=yt("div",p),M=this.options;return this._addScales(M,p+"-line",S),u.on(M.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),S},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,p,S){u.metric&&(this._mScale=yt("div",p,S)),u.imperial&&(this._iScale=yt("div",p,S))},_update:function(){var u=this._map,p=u.getSize().y/2,S=u.distance(u.containerPointToLatLng([0,p]),u.containerPointToLatLng([this.options.maxWidth,p]));this._updateScales(S)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var p=this._getRoundNum(u),S=p<1e3?p+" m":p/1e3+" km";this._updateScale(this._mScale,S,p/u)},_updateImperial:function(u){var p=u*3.2808399,S,M,B;p>5280?(S=p/5280,M=this._getRoundNum(S),this._updateScale(this._iScale,M+" mi",M/S)):(B=this._getRoundNum(p),this._updateScale(this._iScale,B+" ft",B/p))},_updateScale:function(u,p,S){u.style.width=Math.round(this.options.maxWidth*S)+"px",u.innerHTML=p},_getRoundNum:function(u){var p=Math.pow(10,(Math.floor(u)+"").length-1),S=u/p;return S=S>=10?10:S>=5?5:S>=3?3:S>=2?2:1,p*S}}),rd=function(u){return new Dm(u)},A0='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',id=Br.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(et.inlineSvg?A0+" ":"")+"Leaflet</a>"},initialize:function(u){w(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=yt("div","leaflet-control-attribution"),bo(this._container);for(var p in u._layers)u._layers[p].getAttribution&&this.addAttribution(u._layers[p].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 p in this._attributions)this._attributions[p]&&u.push(p);var S=[];this.options.prefix&&S.push(this.options.prefix),u.length&&S.push(u.join(", ")),this._container.innerHTML=S.join(' <span aria-hidden="true">|</span> ')}}});Ct.mergeOptions({attributionControl:!0}),Ct.addInitHook(function(){this.options.attributionControl&&new id().addTo(this)});var T0=function(u){return new id(u)};Br.Layers=Hl,Br.Zoom=nd,Br.Scale=Dm,Br.Attribution=id,ca.layers=Rm,ca.zoom=E0,ca.scale=rd,ca.attribution=T0;var Vi=se.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}});Vi.addTo=function(u,p){return u.addHandler(p,this),this};var O0={Events:Y},ad=et.touch?"touchstart mousedown":"mousedown",Fa=k.extend({options:{clickTolerance:3},initialize:function(u,p,S,M){w(this,M),this._element=u,this._dragStartTarget=p||u,this._preventOutline=S},enable:function(){this._enabled||(lt(this._dragStartTarget,ad,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Fa._dragging===this&&this.finishDrag(!0),Bt(this._dragStartTarget,ad,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!Zf(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){Fa._dragging===this&&this.finishDrag();return}if(!(Fa._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(Fa._dragging=this,this._preventOutline&&xs(this._element),nc(),ys(),!this._moving)){this.fire("down");var p=u.touches?u.touches[0]:u,S=ic(this._element);this._startPoint=new z(p.clientX,p.clientY),this._startPos=Ua(this._element),this._parentScale=Bl(S);var M=u.type==="mousedown";lt(document,M?"mousemove":"touchmove",this._onMove,this),lt(document,M?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var p=u.touches&&u.touches.length===1?u.touches[0]:u,S=new z(p.clientX,p.clientY)._subtract(this._startPoint);!S.x&&!S.y||Math.abs(S.x)+Math.abs(S.y)<this.options.clickTolerance||(S.x/=this._parentScale.x,S.y/=this._parentScale.y,Pn(u),this._moved||(this.fire("dragstart"),this._moved=!0,ut(document.body,"leaflet-dragging"),this._lastTarget=u.target||u.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ut(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(S),this._moving=!0,this._lastEvent=u,this._updatePosition())}},_updatePosition:function(){var u={originalEvent:this._lastEvent};this.fire("predrag",u),Xt(this._element,this._newPos),this.fire("drag",u)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(u){dn(document.body,"leaflet-dragging"),this._lastTarget&&(dn(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Bt(document,"mousemove touchmove",this._onMove,this),Bt(document,"mouseup touchend touchcancel",this._onUp,this),Ul(),Fi();var p=this._moved&&this._moving;this._moving=!1,Fa._dragging=!1,p&&this.fire("dragend",{noInertia:u,distance:this._newPos.distanceTo(this._startPos)})}});function km(u,p,S){var M,B=[1,4,2,8],K,fe,be,Ae,Ne,He,tt,ht;for(K=0,He=u.length;K<He;K++)u[K]._code=xo(u[K],p);for(be=0;be<4;be++){for(tt=B[be],M=[],K=0,He=u.length,fe=He-1;K<He;fe=K++)Ae=u[K],Ne=u[fe],Ae._code&tt?Ne._code&tt||(ht=oc(Ne,Ae,tt,p,S),ht._code=xo(ht,p),M.push(ht)):(Ne._code&tt&&(ht=oc(Ne,Ae,tt,p,S),ht._code=xo(ht,p),M.push(ht)),M.push(Ae));u=M}return u}function Im(u,p){var S,M,B,K,fe,be,Ae,Ne,He;if(!u||u.length===0)throw new Error("latlngs not passed");ei(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var tt=he([0,0]),ht=le(u),tr=ht.getNorthWest().distanceTo(ht.getSouthWest())*ht.getNorthEast().distanceTo(ht.getNorthWest());tr<1700&&(tt=od(u));var Ln=u.length,Fr=[];for(S=0;S<Ln;S++){var Rt=he(u[S]);Fr.push(p.project(he([Rt.lat-tt.lat,Rt.lng-tt.lng])))}for(be=Ae=Ne=0,S=0,M=Ln-1;S<Ln;M=S++)B=Fr[S],K=Fr[M],fe=B.y*K.x-K.y*B.x,Ae+=(B.x+K.x)*fe,Ne+=(B.y+K.y)*fe,be+=fe*3;be===0?He=Fr[0]:He=[Ae/be,Ne/be];var Dt=p.unproject(I(He));return he([Dt.lat+tt.lat,Dt.lng+tt.lng])}function od(u){for(var p=0,S=0,M=0,B=0;B<u.length;B++){var K=he(u[B]);p+=K.lat,S+=K.lng,M++}return he([p/M,S/M])}var sd={__proto__:null,clipPolygon:km,polygonCenter:Im,centroid:od};function zm(u,p){if(!p||!u.length)return u.slice();var S=p*p;return u=M0(u,S),u=Bm(u,S),u}function Um(u,p,S){return Math.sqrt(ql(u,p,S,!0))}function j0(u,p,S){return ql(u,p,S)}function Bm(u,p){var S=u.length,M=typeof Uint8Array<"u"?Uint8Array:Array,B=new M(S);B[0]=B[S-1]=1,ld(u,B,p,0,S-1);var K,fe=[];for(K=0;K<S;K++)B[K]&&fe.push(u[K]);return fe}function ld(u,p,S,M,B){var K=0,fe,be,Ae;for(be=M+1;be<=B-1;be++)Ae=ql(u[be],u[M],u[B],!0),Ae>K&&(fe=be,K=Ae);K>S&&(p[fe]=1,ld(u,p,S,M,fe),ld(u,p,S,fe,B))}function M0(u,p){for(var S=[u[0]],M=1,B=0,K=u.length;M<K;M++)P0(u[M],u[B])>p&&(S.push(u[M]),B=M);return B<K-1&&S.push(u[K-1]),S}var Fm;function $m(u,p,S,M,B){var K=M?Fm:xo(u,S),fe=xo(p,S),be,Ae,Ne;for(Fm=fe;;){if(!(K|fe))return[u,p];if(K&fe)return!1;be=K||fe,Ae=oc(u,p,be,S,B),Ne=xo(Ae,S),be===K?(u=Ae,K=Ne):(p=Ae,fe=Ne)}}function oc(u,p,S,M,B){var K=p.x-u.x,fe=p.y-u.y,be=M.min,Ae=M.max,Ne,He;return S&8?(Ne=u.x+K*(Ae.y-u.y)/fe,He=Ae.y):S&4?(Ne=u.x+K*(be.y-u.y)/fe,He=be.y):S&2?(Ne=Ae.x,He=u.y+fe*(Ae.x-u.x)/K):S&1&&(Ne=be.x,He=u.y+fe*(be.x-u.x)/K),new z(Ne,He,B)}function xo(u,p){var S=0;return u.x<p.min.x?S|=1:u.x>p.max.x&&(S|=2),u.y<p.min.y?S|=4:u.y>p.max.y&&(S|=8),S}function P0(u,p){var S=p.x-u.x,M=p.y-u.y;return S*S+M*M}function ql(u,p,S,M){var B=p.x,K=p.y,fe=S.x-B,be=S.y-K,Ae=fe*fe+be*be,Ne;return Ae>0&&(Ne=((u.x-B)*fe+(u.y-K)*be)/Ae,Ne>1?(B=S.x,K=S.y):Ne>0&&(B+=fe*Ne,K+=be*Ne)),fe=u.x-B,be=u.y-K,M?fe*fe+be*be:new z(B,K)}function ei(u){return!N(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function sc(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ei(u)}function Ss(u,p){var S,M,B,K,fe,be,Ae,Ne;if(!u||u.length===0)throw new Error("latlngs not passed");ei(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var He=he([0,0]),tt=le(u),ht=tt.getNorthWest().distanceTo(tt.getSouthWest())*tt.getNorthEast().distanceTo(tt.getNorthWest());ht<1700&&(He=od(u));var tr=u.length,Ln=[];for(S=0;S<tr;S++){var Fr=he(u[S]);Ln.push(p.project(he([Fr.lat-He.lat,Fr.lng-He.lng])))}for(S=0,M=0;S<tr-1;S++)M+=Ln[S].distanceTo(Ln[S+1])/2;if(M===0)Ne=Ln[0];else for(S=0,K=0;S<tr-1;S++)if(fe=Ln[S],be=Ln[S+1],B=fe.distanceTo(be),K+=B,K>M){Ae=(K-M)/B,Ne=[be.x-Ae*(be.x-fe.x),be.y-Ae*(be.y-fe.y)];break}var Rt=p.unproject(I(Ne));return he([Rt.lat+He.lat,Rt.lng+He.lng])}var L0={__proto__:null,simplify:zm,pointToSegmentDistance:Um,closestPointOnSegment:j0,clipSegment:$m,_getEdgeIntersection:oc,_getBitCode:xo,_sqClosestPointOnSegment:ql,isFlat:ei,_flat:sc,polylineCenter:Ss},lc={project:function(u){return new z(u.lng,u.lat)},unproject:function(u){return new pe(u.y,u.x)},bounds:new j([-180,-90],[180,90])},uc={R:6378137,R_MINOR:6356752314245179e-9,bounds:new j([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var p=Math.PI/180,S=this.R,M=u.lat*p,B=this.R_MINOR/S,K=Math.sqrt(1-B*B),fe=K*Math.sin(M),be=Math.tan(Math.PI/4-M/2)/Math.pow((1-fe)/(1+fe),K/2);return M=-S*Math.log(Math.max(be,1e-10)),new z(u.lng*p*S,M)},unproject:function(u){for(var p=180/Math.PI,S=this.R,M=this.R_MINOR/S,B=Math.sqrt(1-M*M),K=Math.exp(-u.y/S),fe=Math.PI/2-2*Math.atan(K),be=0,Ae=.1,Ne;be<15&&Math.abs(Ae)>1e-7;be++)Ne=B*Math.sin(fe),Ne=Math.pow((1-Ne)/(1+Ne),B/2),Ae=Math.PI/2-2*Math.atan(K*Ne)-fe,fe+=Ae;return new pe(fe*p,u.x*p/S)}},Vm={__proto__:null,LonLat:lc,Mercator:uc,SphericalMercator:G},Hm=i({},D,{code:"EPSG:3395",projection:uc,transformation:function(){var u=.5/(Math.PI*uc.R);return V(u,.5,-u,.5)}()}),ud=i({},D,{code:"EPSG:4326",projection:lc,transformation:V(1/180,1,-1/180,.5)}),Cs=i({},ve,{projection:lc,transformation:V(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,p){var S=p.lng-u.lng,M=p.lat-u.lat;return Math.sqrt(S*S+M*M)},infinite:!0});ve.Earth=D,ve.EPSG3395=Hm,ve.EPSG3857=Z,ve.EPSG900913=ne,ve.EPSG4326=ud,ve.Simple=Cs;var vi=k.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[f(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[f(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var p=u.target;if(p.hasLayer(this)){if(this._map=p,this._zoomAnimated=p._zoomAnimated,this.getEvents){var S=this.getEvents();p.on(S,this),this.once("remove",function(){p.off(S,this)},this)}this.onAdd(p),this.fire("add"),p.fire("layeradd",{layer:this})}}});Ct.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var p=f(u);return this._layers[p]?this:(this._layers[p]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var p=f(u);return this._layers[p]?(this._loaded&&u.onRemove(this),delete this._layers[p],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return f(u)in this._layers},eachLayer:function(u,p){for(var S in this._layers)u.call(p,this._layers[S]);return this},_addLayers:function(u){u=u?N(u)?u:[u]:[];for(var p=0,S=u.length;p<S;p++)this.addLayer(u[p])},_addZoomLimit:function(u){(!isNaN(u.options.maxZoom)||!isNaN(u.options.minZoom))&&(this._zoomBoundLayers[f(u)]=u,this._updateZoomLevels())},_removeZoomLimit:function(u){var p=f(u);this._zoomBoundLayers[p]&&(delete this._zoomBoundLayers[p],this._updateZoomLevels())},_updateZoomLevels:function(){var u=1/0,p=-1/0,S=this._getZoomSpan();for(var M in this._zoomBoundLayers){var B=this._zoomBoundLayers[M].options;u=B.minZoom===void 0?u:Math.min(u,B.minZoom),p=B.maxZoom===void 0?p:Math.max(p,B.maxZoom)}this._layersMaxZoom=p===-1/0?void 0:p,this._layersMinZoom=u===1/0?void 0:u,S!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Es=vi.extend({initialize:function(u,p){w(this,p),this._layers={};var S,M;if(u)for(S=0,M=u.length;S<M;S++)this.addLayer(u[S])},addLayer:function(u){var p=this.getLayerId(u);return this._layers[p]=u,this._map&&this._map.addLayer(u),this},removeLayer:function(u){var p=u in this._layers?u:this.getLayerId(u);return this._map&&this._layers[p]&&this._map.removeLayer(this._layers[p]),delete this._layers[p],this},hasLayer:function(u){var p=typeof u=="number"?u:this.getLayerId(u);return p in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(u){var p=Array.prototype.slice.call(arguments,1),S,M;for(S in this._layers)M=this._layers[S],M[u]&&M[u].apply(M,p);return this},onAdd:function(u){this.eachLayer(u.addLayer,u)},onRemove:function(u){this.eachLayer(u.removeLayer,u)},eachLayer:function(u,p){for(var S in this._layers)u.call(p,this._layers[S]);return this},getLayer:function(u){return this._layers[u]},getLayers:function(){var u=[];return this.eachLayer(u.push,u),u},setZIndex:function(u){return this.invoke("setZIndex",u)},getLayerId:function(u){return f(u)}}),N0=function(u,p){return new Es(u,p)},Hi=Es.extend({addLayer:function(u){return this.hasLayer(u)?this:(u.addEventParent(this),Es.prototype.addLayer.call(this,u),this.fire("layeradd",{layer:u}))},removeLayer:function(u){return this.hasLayer(u)?(u in this._layers&&(u=this._layers[u]),u.removeEventParent(this),Es.prototype.removeLayer.call(this,u),this.fire("layerremove",{layer:u})):this},setStyle:function(u){return this.invoke("setStyle",u)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var u=new ee;for(var p in this._layers){var S=this._layers[p];u.extend(S.getBounds?S.getBounds():S.getLatLng())}return u}}),qm=function(u,p){return new Hi(u,p)},qi=se.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(u){w(this,u)},createIcon:function(u){return this._createIcon("icon",u)},createShadow:function(u){return this._createIcon("shadow",u)},_createIcon:function(u,p){var S=this._getIconUrl(u);if(!S){if(u==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var M=this._createImg(S,p&&p.tagName==="IMG"?p:null);return this._setIconStyles(M,u),(this.options.crossOrigin||this.options.crossOrigin==="")&&(M.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),M},_setIconStyles:function(u,p){var S=this.options,M=S[p+"Size"];typeof M=="number"&&(M=[M,M]);var B=I(M),K=I(p==="shadow"&&S.shadowAnchor||S.iconAnchor||B&&B.divideBy(2,!0));u.className="leaflet-marker-"+p+" "+(S.className||""),K&&(u.style.marginLeft=-K.x+"px",u.style.marginTop=-K.y+"px"),B&&(u.style.width=B.x+"px",u.style.height=B.y+"px")},_createImg:function(u,p){return p=p||document.createElement("img"),p.src=u,p},_getIconUrl:function(u){return et.retina&&this.options[u+"RetinaUrl"]||this.options[u+"Url"]}});function Gl(u){return new qi(u)}var Yl=qi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(u){return typeof Yl.imagePath!="string"&&(Yl.imagePath=this._detectIconPath()),(this.options.imagePath||Yl.imagePath)+qi.prototype._getIconUrl.call(this,u)},_stripUrl:function(u){var p=function(S,M,B){var K=M.exec(S);return K&&K[B]};return u=p(u,/^url\((['"])?(.+)\1\)$/,2),u&&p(u,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var u=yt("div","leaflet-default-icon-path",document.body),p=Il(u,"background-image")||Il(u,"backgroundImage");if(document.body.removeChild(u),p=this._stripUrl(p),p)return p;var S=document.querySelector('link[href$="leaflet.css"]');return S?S.href.substring(0,S.href.length-11-1):""}}),Wl=Vi.extend({initialize:function(u){this._marker=u},addHooks:function(){var u=this._marker._icon;this._draggable||(this._draggable=new Fa(u,u,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ut(u,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&dn(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(u){var p=this._marker,S=p._map,M=this._marker.options.autoPanSpeed,B=this._marker.options.autoPanPadding,K=Ua(p._icon),fe=S.getPixelBounds(),be=S.getPixelOrigin(),Ae=q(fe.min._subtract(be).add(B),fe.max._subtract(be).subtract(B));if(!Ae.contains(K)){var Ne=I((Math.max(Ae.max.x,K.x)-Ae.max.x)/(fe.max.x-Ae.max.x)-(Math.min(Ae.min.x,K.x)-Ae.min.x)/(fe.min.x-Ae.min.x),(Math.max(Ae.max.y,K.y)-Ae.max.y)/(fe.max.y-Ae.max.y)-(Math.min(Ae.min.y,K.y)-Ae.min.y)/(fe.min.y-Ae.min.y)).multiplyBy(M);S.panBy(Ne,{animate:!1}),this._draggable._newPos._add(Ne),this._draggable._startPos._add(Ne),Xt(p._icon,this._draggable._newPos),this._onDrag(u),this._panRequest=J(this._adjustPan.bind(this,u))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(u){this._marker.options.autoPan&&(oe(this._panRequest),this._panRequest=J(this._adjustPan.bind(this,u)))},_onDrag:function(u){var p=this._marker,S=p._shadow,M=Ua(p._icon),B=p._map.layerPointToLatLng(M);S&&Xt(S,M),p._latlng=B,u.latlng=B,u.oldLatLng=this._oldLatLng,p.fire("move",u).fire("drag",u)},_onDragEnd:function(u){oe(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",u)}}),Kl=vi.extend({options:{icon:new Yl,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(u,p){w(this,p),this._latlng=he(u)},onAdd:function(u){this._zoomAnimated=this._zoomAnimated&&u.options.markerZoomAnimation,this._zoomAnimated&&u.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(u){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&u.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(u){var p=this._latlng;return this._latlng=he(u),this.update(),this.fire("move",{oldLatLng:p,latlng:this._latlng})},setZIndexOffset:function(u){return this.options.zIndexOffset=u,this.update()},getIcon:function(){return this.options.icon},setIcon:function(u){return this.options.icon=u,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var u=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(u)}return this},_initIcon:function(){var u=this.options,p="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),S=u.icon.createIcon(this._icon),M=!1;S!==this._icon&&(this._icon&&this._removeIcon(),M=!0,u.title&&(S.title=u.title),S.tagName==="IMG"&&(S.alt=u.alt||"")),ut(S,p),u.keyboard&&(S.tabIndex="0",S.setAttribute("role","button")),this._icon=S,u.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&lt(S,"focus",this._panOnFocus,this);var B=u.icon.createShadow(this._shadow),K=!1;B!==this._shadow&&(this._removeShadow(),K=!0),B&&(ut(B,p),B.alt=""),this._shadow=B,u.opacity<1&&this._updateOpacity(),M&&this.getPane().appendChild(this._icon),this._initInteraction(),B&&K&&this.getPane(u.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Bt(this._icon,"focus",this._panOnFocus,this),Gt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Gt(this._shadow),this._shadow=null},_setPos:function(u){this._icon&&Xt(this._icon,u),this._shadow&&Xt(this._shadow,u),this._zIndex=u.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(u){this._icon&&(this._icon.style.zIndex=this._zIndex+u)},_animateZoom:function(u){var p=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center).round();this._setPos(p)},_initInteraction:function(){if(this.options.interactive&&(ut(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Wl)){var u=this.options.draggable;this.dragging&&(u=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Wl(this),u&&this.dragging.enable()}},setOpacity:function(u){return this.options.opacity=u,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var u=this.options.opacity;this._icon&&rn(this._icon,u),this._shadow&&rn(this._shadow,u)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var u=this._map;if(u){var p=this.options.icon.options,S=p.iconSize?I(p.iconSize):I(0,0),M=p.iconAnchor?I(p.iconAnchor):I(0,0);u.panInside(this._latlng,{paddingTopLeft:M,paddingBottomRight:S.subtract(M)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Gm(u,p){return new Kl(u,p)}var Gi=vi.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(u){this._renderer=u.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(u){return w(this,u),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&u&&Object.prototype.hasOwnProperty.call(u,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),As=Gi.extend({options:{fill:!0,radius:10},initialize:function(u,p){w(this,p),this._latlng=he(u),this._radius=this.options.radius},setLatLng:function(u){var p=this._latlng;return this._latlng=he(u),this.redraw(),this.fire("move",{oldLatLng:p,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(u){return this.options.radius=this._radius=u,this.redraw()},getRadius:function(){return this._radius},setStyle:function(u){var p=u&&u.radius||this._radius;return Gi.prototype.setStyle.call(this,u),this.setRadius(p),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var u=this._radius,p=this._radiusY||u,S=this._clickTolerance(),M=[u+S,p+S];this._pxBounds=new j(this._point.subtract(M),this._point.add(M))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(u){return u.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function Ym(u,p){return new As(u,p)}var cc=As.extend({initialize:function(u,p,S){if(typeof p=="number"&&(p=i({},S,{radius:p})),w(this,p),this._latlng=he(u),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(u){return this._mRadius=u,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var u=[this._radius,this._radiusY||this._radius];return new ee(this._map.layerPointToLatLng(this._point.subtract(u)),this._map.layerPointToLatLng(this._point.add(u)))},setStyle:Gi.prototype.setStyle,_project:function(){var u=this._latlng.lng,p=this._latlng.lat,S=this._map,M=S.options.crs;if(M.distance===D.distance){var B=Math.PI/180,K=this._mRadius/D.R/B,fe=S.project([p+K,u]),be=S.project([p-K,u]),Ae=fe.add(be).divideBy(2),Ne=S.unproject(Ae).lat,He=Math.acos((Math.cos(K*B)-Math.sin(p*B)*Math.sin(Ne*B))/(Math.cos(p*B)*Math.cos(Ne*B)))/B;(isNaN(He)||He===0)&&(He=K/Math.cos(Math.PI/180*p)),this._point=Ae.subtract(S.getPixelOrigin()),this._radius=isNaN(He)?0:Ae.x-S.project([Ne,u-He]).x,this._radiusY=Ae.y-fe.y}else{var tt=M.unproject(M.project(this._latlng).subtract([this._mRadius,0]));this._point=S.latLngToLayerPoint(this._latlng),this._radius=this._point.x-S.latLngToLayerPoint(tt).x}this._updateBounds()}});function Wm(u,p,S){return new cc(u,p,S)}var fa=Gi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(u,p){w(this,p),this._setLatLngs(u)},getLatLngs:function(){return this._latlngs},setLatLngs:function(u){return this._setLatLngs(u),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(u){for(var p=1/0,S=null,M=ql,B,K,fe=0,be=this._parts.length;fe<be;fe++)for(var Ae=this._parts[fe],Ne=1,He=Ae.length;Ne<He;Ne++){B=Ae[Ne-1],K=Ae[Ne];var tt=M(u,B,K,!0);tt<p&&(p=tt,S=M(u,B,K))}return S&&(S.distance=Math.sqrt(p)),S},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Ss(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(u,p){return p=p||this._defaultShape(),u=he(u),p.push(u),this._bounds.extend(u),this.redraw()},_setLatLngs:function(u){this._bounds=new ee,this._latlngs=this._convertLatLngs(u)},_defaultShape:function(){return ei(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(u){for(var p=[],S=ei(u),M=0,B=u.length;M<B;M++)S?(p[M]=he(u[M]),this._bounds.extend(p[M])):p[M]=this._convertLatLngs(u[M]);return p},_project:function(){var u=new j;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,u),this._bounds.isValid()&&u.isValid()&&(this._rawPxBounds=u,this._updateBounds())},_updateBounds:function(){var u=this._clickTolerance(),p=new z(u,u);this._rawPxBounds&&(this._pxBounds=new j([this._rawPxBounds.min.subtract(p),this._rawPxBounds.max.add(p)]))},_projectLatlngs:function(u,p,S){var M=u[0]instanceof pe,B=u.length,K,fe;if(M){for(fe=[],K=0;K<B;K++)fe[K]=this._map.latLngToLayerPoint(u[K]),S.extend(fe[K]);p.push(fe)}else for(K=0;K<B;K++)this._projectLatlngs(u[K],p,S)},_clipPoints:function(){var u=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}var p=this._parts,S,M,B,K,fe,be,Ae;for(S=0,B=0,K=this._rings.length;S<K;S++)for(Ae=this._rings[S],M=0,fe=Ae.length;M<fe-1;M++)be=$m(Ae[M],Ae[M+1],u,M,!0),be&&(p[B]=p[B]||[],p[B].push(be[0]),(be[1]!==Ae[M+1]||M===fe-2)&&(p[B].push(be[1]),B++))}},_simplifyPoints:function(){for(var u=this._parts,p=this.options.smoothFactor,S=0,M=u.length;S<M;S++)u[S]=zm(u[S],p)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(u,p){var S,M,B,K,fe,be,Ae=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(u))return!1;for(S=0,K=this._parts.length;S<K;S++)for(be=this._parts[S],M=0,fe=be.length,B=fe-1;M<fe;B=M++)if(!(!p&&M===0)&&Um(u,be[B],be[M])<=Ae)return!0;return!1}});function R0(u,p){return new fa(u,p)}fa._flat=sc;var Ts=fa.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Im(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(u){var p=fa.prototype._convertLatLngs.call(this,u),S=p.length;return S>=2&&p[0]instanceof pe&&p[0].equals(p[S-1])&&p.pop(),p},_setLatLngs:function(u){fa.prototype._setLatLngs.call(this,u),ei(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ei(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,p=this.options.weight,S=new z(p,p);if(u=new j(u.min.subtract(S),u.max.add(S)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var M=0,B=this._rings.length,K;M<B;M++)K=km(this._rings[M],u,!0),K.length&&this._parts.push(K)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(u){var p=!1,S,M,B,K,fe,be,Ae,Ne;if(!this._pxBounds||!this._pxBounds.contains(u))return!1;for(K=0,Ae=this._parts.length;K<Ae;K++)for(S=this._parts[K],fe=0,Ne=S.length,be=Ne-1;fe<Ne;be=fe++)M=S[fe],B=S[be],M.y>u.y!=B.y>u.y&&u.x<(B.x-M.x)*(u.y-M.y)/(B.y-M.y)+M.x&&(p=!p);return p||fa.prototype._containsPoint.call(this,u,!0)}});function D0(u,p){return new Ts(u,p)}var da=Hi.extend({initialize:function(u,p){w(this,p),this._layers={},u&&this.addData(u)},addData:function(u){var p=N(u)?u:u.features,S,M,B;if(p){for(S=0,M=p.length;S<M;S++)B=p[S],(B.geometries||B.geometry||B.features||B.coordinates)&&this.addData(B);return this}var K=this.options;if(K.filter&&!K.filter(u))return this;var fe=hr(u,K);return fe?(fe.feature=hc(u),fe.defaultOptions=fe.options,this.resetStyle(fe),K.onEachFeature&&K.onEachFeature(u,fe),this.addLayer(fe)):this},resetStyle:function(u){return u===void 0?this.eachLayer(this.resetStyle,this):(u.options=i({},u.defaultOptions),this._setLayerStyle(u,this.options.style),this)},setStyle:function(u){return this.eachLayer(function(p){this._setLayerStyle(p,u)},this)},_setLayerStyle:function(u,p){u.setStyle&&(typeof p=="function"&&(p=p(u.feature)),u.setStyle(p))}});function hr(u,p){var S=u.type==="Feature"?u.geometry:u,M=S?S.coordinates:null,B=[],K=p&&p.pointToLayer,fe=p&&p.coordsToLatLng||fc,be,Ae,Ne,He;if(!M&&!S)return null;switch(S.type){case"Point":return be=fe(M),Os(K,u,be,p);case"MultiPoint":for(Ne=0,He=M.length;Ne<He;Ne++)be=fe(M[Ne]),B.push(Os(K,u,be,p));return new Hi(B);case"LineString":case"MultiLineString":return Ae=Zl(M,S.type==="LineString"?0:1,fe),new fa(Ae,p);case"Polygon":case"MultiPolygon":return Ae=Zl(M,S.type==="Polygon"?1:2,fe),new Ts(Ae,p);case"GeometryCollection":for(Ne=0,He=S.geometries.length;Ne<He;Ne++){var tt=hr({geometry:S.geometries[Ne],type:"Feature",properties:u.properties},p);tt&&B.push(tt)}return new Hi(B);case"FeatureCollection":for(Ne=0,He=S.features.length;Ne<He;Ne++){var ht=hr(S.features[Ne],p);ht&&B.push(ht)}return new Hi(B);default:throw new Error("Invalid GeoJSON object.")}}function Os(u,p,S,M){return u?u(p,S):new Kl(S,M&&M.markersInheritOptions&&M)}function fc(u){return new pe(u[1],u[0],u[2])}function Zl(u,p,S){for(var M=[],B=0,K=u.length,fe;B<K;B++)fe=p?Zl(u[B],p-1,S):(S||fc)(u[B]),M.push(fe);return M}function dc(u,p){return u=he(u),u.alt!==void 0?[x(u.lng,p),x(u.lat,p),x(u.alt,p)]:[x(u.lng,p),x(u.lat,p)]}function Xl(u,p,S,M){for(var B=[],K=0,fe=u.length;K<fe;K++)B.push(p?Xl(u[K],ei(u[K])?0:p-1,S,M):dc(u[K],M));return!p&&S&&B.length>0&&B.push(B[0].slice()),B}function $a(u,p){return u.feature?i({},u.feature,{geometry:p}):hc(p)}function hc(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var Va={toGeoJSON:function(u){return $a(this,{type:"Point",coordinates:dc(this.getLatLng(),u)})}};Kl.include(Va),cc.include(Va),As.include(Va),fa.include({toGeoJSON:function(u){var p=!ei(this._latlngs),S=Xl(this._latlngs,p?1:0,!1,u);return $a(this,{type:(p?"Multi":"")+"LineString",coordinates:S})}}),Ts.include({toGeoJSON:function(u){var p=!ei(this._latlngs),S=p&&!ei(this._latlngs[0]),M=Xl(this._latlngs,S?2:p?1:0,!0,u);return p||(M=[M]),$a(this,{type:(S?"Multi":"")+"Polygon",coordinates:M})}}),Es.include({toMultiPoint:function(u){var p=[];return this.eachLayer(function(S){p.push(S.toGeoJSON(u).geometry.coordinates)}),$a(this,{type:"MultiPoint",coordinates:p})},toGeoJSON:function(u){var p=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(p==="MultiPoint")return this.toMultiPoint(u);var S=p==="GeometryCollection",M=[];return this.eachLayer(function(B){if(B.toGeoJSON){var K=B.toGeoJSON(u);if(S)M.push(K.geometry);else{var fe=hc(K);fe.type==="FeatureCollection"?M.push.apply(M,fe.features):M.push(fe)}}}),S?$a(this,{geometries:M,type:"GeometryCollection"}):{type:"FeatureCollection",features:M}}});function mc(u,p){return new da(u,p)}var Ql=mc,js=vi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,p,S){this._url=u,this._bounds=le(p),w(this,S)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ut(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Gt(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&&er(this._image),this},bringToBack:function(){return this._map&&vo(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=le(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",p=this._image=u?this._url:yt("img");if(ut(p,"leaflet-image-layer"),this._zoomAnimated&&ut(p,"leaflet-zoom-animated"),this.options.className&&ut(p,this.options.className),p.onselectstart=y,p.onmousemove=y,p.onload=l(this.fire,this,"load"),p.onerror=l(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(p.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=p.src;return}p.src=this._url,p.alt=this.options.alt},_animateZoom:function(u){var p=this._map.getZoomScale(u.zoom),S=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;la(this._image,S,p)},_reset:function(){var u=this._image,p=new j(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),S=p.getSize();Xt(u,p.min),u.style.width=S.x+"px",u.style.height=S.y+"px"},_updateOpacity:function(){rn(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()}}),Km=function(u,p,S){return new js(u,p,S)},Ha=js.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",p=this._image=u?this._url:yt("video");if(ut(p,"leaflet-image-layer"),this._zoomAnimated&&ut(p,"leaflet-zoom-animated"),this.options.className&&ut(p,this.options.className),p.onselectstart=y,p.onmousemove=y,p.onloadeddata=l(this.fire,this,"load"),u){for(var S=p.getElementsByTagName("source"),M=[],B=0;B<S.length;B++)M.push(S[B].src);this._url=S.length>0?M:[p.src];return}N(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(p.style,"objectFit")&&(p.style.objectFit="fill"),p.autoplay=!!this.options.autoplay,p.loop=!!this.options.loop,p.muted=!!this.options.muted,p.playsInline=!!this.options.playsInline;for(var K=0;K<this._url.length;K++){var fe=yt("source");fe.src=this._url[K],p.appendChild(fe)}}});function Ms(u,p,S){return new Ha(u,p,S)}var pc=js.extend({_initImage:function(){var u=this._image=this._url;ut(u,"leaflet-image-layer"),this._zoomAnimated&&ut(u,"leaflet-zoom-animated"),this.options.className&&ut(u,this.options.className),u.onselectstart=y,u.onmousemove=y}});function Zm(u,p,S){return new pc(u,p,S)}var mr=vi.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(u,p){u&&(u instanceof pe||N(u))?(this._latlng=he(u),w(this,p)):(w(this,u),this._source=p),this.options.content&&(this._content=this.options.content)},openOn:function(u){return u=arguments.length?u:this._source._map,u.hasLayer(this)||u.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(u){return this._map?this.close():(arguments.length?this._source=u:u=this._source,this._prepareOpen(),this.openOn(u._map)),this},onAdd:function(u){this._zoomAnimated=u._zoomAnimated,this._container||this._initLayout(),u._fadeAnimated&&rn(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),u._fadeAnimated&&rn(this._container,1),this.bringToFront(),this.options.interactive&&(ut(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(u){u._fadeAnimated?(rn(this._container,0),this._removeTimeout=setTimeout(l(Gt,void 0,this._container),200)):Gt(this._container),this.options.interactive&&(dn(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(u){return this._latlng=he(u),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(u){return this._content=u,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var u={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&er(this._container),this},bringToBack:function(){return this._map&&vo(this._container),this},_prepareOpen:function(u){var p=this._source;if(!p._map)return!1;if(p instanceof Hi){p=null;var S=this._source._layers;for(var M in S)if(S[M]._map){p=S[M];break}if(!p)return!1;this._source=p}if(!u)if(p.getCenter)u=p.getCenter();else if(p.getLatLng)u=p.getLatLng();else if(p.getBounds)u=p.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(u),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var u=this._contentNode,p=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof p=="string")u.innerHTML=p;else{for(;u.hasChildNodes();)u.removeChild(u.firstChild);u.appendChild(p)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var u=this._map.latLngToLayerPoint(this._latlng),p=I(this.options.offset),S=this._getAnchor();this._zoomAnimated?Xt(this._container,u.add(S)):p=p.add(u).add(S);var M=this._containerBottom=-p.y,B=this._containerLeft=-Math.round(this._containerWidth/2)+p.x;this._container.style.bottom=M+"px",this._container.style.left=B+"px"}},_getAnchor:function(){return[0,0]}});Ct.include({_initOverlay:function(u,p,S,M){var B=p;return B instanceof u||(B=new u(M).setContent(p)),S&&B.setLatLng(S),B}}),vi.include({_initOverlay:function(u,p,S,M){var B=S;return B instanceof u?(w(B,M),B._source=this):(B=p&&!M?p:new u(M,this),B.setContent(S)),B}});var Jl=mr.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(u){return u=arguments.length?u:this._source._map,!u.hasLayer(this)&&u._popup&&u._popup.options.autoClose&&u.removeLayer(u._popup),u._popup=this,mr.prototype.openOn.call(this,u)},onAdd:function(u){mr.prototype.onAdd.call(this,u),u.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Gi||this._source.on("preclick",gi))},onRemove:function(u){mr.prototype.onRemove.call(this,u),u.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Gi||this._source.off("preclick",gi))},getEvents:function(){var u=mr.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(u.preclick=this.close),this.options.keepInView&&(u.moveend=this._adjustPan),u},_initLayout:function(){var u="leaflet-popup",p=this._container=yt("div",u+" "+(this.options.className||"")+" leaflet-zoom-animated"),S=this._wrapper=yt("div",u+"-content-wrapper",p);if(this._contentNode=yt("div",u+"-content",S),bo(p),$i(this._contentNode),lt(p,"contextmenu",gi),this._tipContainer=yt("div",u+"-tip-container",p),this._tip=yt("div",u+"-tip",this._tipContainer),this.options.closeButton){var M=this._closeButton=yt("a",u+"-close-button",p);M.setAttribute("role","button"),M.setAttribute("aria-label","Close popup"),M.href="#close",M.innerHTML='<span aria-hidden="true">&#215;</span>',lt(M,"click",function(B){Pn(B),this.close()},this)}},_updateLayout:function(){var u=this._contentNode,p=u.style;p.width="",p.whiteSpace="nowrap";var S=u.offsetWidth;S=Math.min(S,this.options.maxWidth),S=Math.max(S,this.options.minWidth),p.width=S+1+"px",p.whiteSpace="",p.height="";var M=u.offsetHeight,B=this.options.maxHeight,K="leaflet-popup-scrolled";B&&M>B?(p.height=B+"px",ut(u,K)):dn(u,K),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var p=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),S=this._getAnchor();Xt(this._container,p.add(S))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,p=parseInt(Il(this._container,"marginBottom"),10)||0,S=this._container.offsetHeight+p,M=this._containerWidth,B=new z(this._containerLeft,-S-this._containerBottom);B._add(Ua(this._container));var K=u.layerPointToContainerPoint(B),fe=I(this.options.autoPanPadding),be=I(this.options.autoPanPaddingTopLeft||fe),Ae=I(this.options.autoPanPaddingBottomRight||fe),Ne=u.getSize(),He=0,tt=0;K.x+M+Ae.x>Ne.x&&(He=K.x+M-Ne.x+Ae.x),K.x-He-be.x<0&&(He=K.x-be.x),K.y+S+Ae.y>Ne.y&&(tt=K.y+S-Ne.y+Ae.y),K.y-tt-be.y<0&&(tt=K.y-be.y),(He||tt)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([He,tt]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Xm=function(u,p){return new Jl(u,p)};Ct.mergeOptions({closePopupOnClick:!0}),Ct.include({openPopup:function(u,p,S){return this._initOverlay(Jl,u,p,S).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),vi.include({bindPopup:function(u,p){return this._popup=this._initOverlay(Jl,this._popup,u,p),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 Hi||(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)){Ba(u);var p=u.layer||u.target;if(this._popup._source===p&&!(p instanceof Gi)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=p,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var eu=mr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){mr.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){mr.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=mr.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",p=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=yt("div",p),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+f(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var p,S,M=this._map,B=this._container,K=M.latLngToContainerPoint(M.getCenter()),fe=M.layerPointToContainerPoint(u),be=this.options.direction,Ae=B.offsetWidth,Ne=B.offsetHeight,He=I(this.options.offset),tt=this._getAnchor();be==="top"?(p=Ae/2,S=Ne):be==="bottom"?(p=Ae/2,S=0):be==="center"?(p=Ae/2,S=Ne/2):be==="right"?(p=0,S=Ne/2):be==="left"?(p=Ae,S=Ne/2):fe.x<K.x?(be="right",p=0,S=Ne/2):(be="left",p=Ae+(He.x+tt.x)*2,S=Ne/2),u=u.subtract(I(p,S,!0)).add(He).add(tt),dn(B,"leaflet-tooltip-right"),dn(B,"leaflet-tooltip-left"),dn(B,"leaflet-tooltip-top"),dn(B,"leaflet-tooltip-bottom"),ut(B,"leaflet-tooltip-"+be),Xt(B,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&rn(this._container,u)},_animateZoom:function(u){var p=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(p)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),k0=function(u,p){return new eu(u,p)};Ct.include({openTooltip:function(u,p,S){return this._initOverlay(eu,u,p,S).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),vi.include({bindTooltip:function(u,p){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(eu,this._tooltip,u,p),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(u){if(!(!u&&this._tooltipHandlersAdded)){var p=u?"off":"on",S={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?S.add=this._openTooltip:(S.mouseover=this._openTooltip,S.mouseout=this.closeTooltip,S.click=this._openTooltip,this._map?this._addFocusListeners():S.add=this._addFocusListeners),this._tooltip.options.sticky&&(S.mousemove=this._moveTooltip),this[p](S),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof Hi||(this._tooltip._source=this),this._tooltip._prepareOpen(u)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(u){return this._tooltip&&this._tooltip.setContent(u),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(u){var p=typeof u.getElement=="function"&&u.getElement();p&&(lt(p,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),lt(p,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var p=typeof u.getElement=="function"&&u.getElement();p&&p.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(u){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var p=this;this._map.once("moveend",function(){p._openOnceFlag=!1,p._openTooltip(u)});return}this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0)}},_moveTooltip:function(u){var p=u.latlng,S,M;this._tooltip.options.sticky&&u.originalEvent&&(S=this._map.mouseEventToContainerPoint(u.originalEvent),M=this._map.containerPointToLayerPoint(S),p=this._map.layerPointToLatLng(M)),this._tooltip.setLatLng(p)}});var Qm=qi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var p=u&&u.tagName==="DIV"?u:document.createElement("div"),S=this.options;if(S.html instanceof Element?(Qr(p),p.appendChild(S.html)):p.innerHTML=S.html!==!1?S.html:"",S.bgPos){var M=I(S.bgPos);p.style.backgroundPosition=-M.x+"px "+-M.y+"px"}return this._setIconStyles(p,"icon"),p},createShadow:function(){return null}});function I0(u){return new Qm(u)}qi.Default=Yl;var Ps=vi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:et.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(u){w(this,u)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(u){u._addZoomLimit(this)},onRemove:function(u){this._removeAllTiles(),Gt(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(er(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(vo(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(u){return this.options.opacity=u,this._updateOpacity(),this},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var u=this._clampZoom(this._map.getZoom());u!==this._tileZoom&&(this._tileZoom=u,this._updateLevels()),this._update()}return this},getEvents:function(){var u={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=h(this._onMoveEnd,this.options.updateInterval,this)),u.move=this._onMove),this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},createTile:function(){return document.createElement("div")},getTileSize:function(){var u=this.options.tileSize;return u instanceof z?u:new z(u,u)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(u){for(var p=this.getPane().children,S=-u(-1/0,1/0),M=0,B=p.length,K;M<B;M++)K=p[M].style.zIndex,p[M]!==this._container&&K&&(S=u(S,+K));isFinite(S)&&(this.options.zIndex=S+u(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!et.ielt9){rn(this._container,this.options.opacity);var u=+new Date,p=!1,S=!1;for(var M in this._tiles){var B=this._tiles[M];if(!(!B.current||!B.loaded)){var K=Math.min(1,(u-B.loaded)/200);rn(B.el,K),K<1?p=!0:(B.active?S=!0:this._onOpaqueTile(B),B.active=!0)}}S&&!this._noPrune&&this._pruneTiles(),p&&(oe(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this))}},_onOpaqueTile:y,_initContainer:function(){this._container||(this._container=yt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var u=this._tileZoom,p=this.options.maxZoom;if(u!==void 0){for(var S in this._levels)S=Number(S),this._levels[S].el.children.length||S===u?(this._levels[S].el.style.zIndex=p-Math.abs(u-S),this._onUpdateLevel(S)):(Gt(this._levels[S].el),this._removeTilesAtZoom(S),this._onRemoveLevel(S),delete this._levels[S]);var M=this._levels[u],B=this._map;return M||(M=this._levels[u]={},M.el=yt("div","leaflet-tile-container leaflet-zoom-animated",this._container),M.el.style.zIndex=p,M.origin=B.project(B.unproject(B.getPixelOrigin()),u).round(),M.zoom=u,this._setZoomTransform(M,B.getCenter(),B.getZoom()),y(M.el.offsetWidth),this._onCreateLevel(M)),this._level=M,M}},_onUpdateLevel:y,_onRemoveLevel:y,_onCreateLevel:y,_pruneTiles:function(){if(this._map){var u,p,S=this._map.getZoom();if(S>this.options.maxZoom||S<this.options.minZoom){this._removeAllTiles();return}for(u in this._tiles)p=this._tiles[u],p.retain=p.current;for(u in this._tiles)if(p=this._tiles[u],p.current&&!p.active){var M=p.coords;this._retainParent(M.x,M.y,M.z,M.z-5)||this._retainChildren(M.x,M.y,M.z,M.z+2)}for(u in this._tiles)this._tiles[u].retain||this._removeTile(u)}},_removeTilesAtZoom:function(u){for(var p in this._tiles)this._tiles[p].coords.z===u&&this._removeTile(p)},_removeAllTiles:function(){for(var u in this._tiles)this._removeTile(u)},_invalidateAll:function(){for(var u in this._levels)Gt(this._levels[u].el),this._onRemoveLevel(Number(u)),delete this._levels[u];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(u,p,S,M){var B=Math.floor(u/2),K=Math.floor(p/2),fe=S-1,be=new z(+B,+K);be.z=+fe;var Ae=this._tileCoordsToKey(be),Ne=this._tiles[Ae];return Ne&&Ne.active?(Ne.retain=!0,!0):(Ne&&Ne.loaded&&(Ne.retain=!0),fe>M?this._retainParent(B,K,fe,M):!1)},_retainChildren:function(u,p,S,M){for(var B=2*u;B<2*u+2;B++)for(var K=2*p;K<2*p+2;K++){var fe=new z(B,K);fe.z=S+1;var be=this._tileCoordsToKey(fe),Ae=this._tiles[be];if(Ae&&Ae.active){Ae.retain=!0;continue}else Ae&&Ae.loaded&&(Ae.retain=!0);S+1<M&&this._retainChildren(B,K,S+1,M)}},_resetView:function(u){var p=u&&(u.pinch||u.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),p,p)},_animateZoom:function(u){this._setView(u.center,u.zoom,!0,u.noUpdate)},_clampZoom:function(u){var p=this.options;return p.minNativeZoom!==void 0&&u<p.minNativeZoom?p.minNativeZoom:p.maxNativeZoom!==void 0&&p.maxNativeZoom<u?p.maxNativeZoom:u},_setView:function(u,p,S,M){var B=Math.round(p);this.options.maxZoom!==void 0&&B>this.options.maxZoom||this.options.minZoom!==void 0&&B<this.options.minZoom?B=void 0:B=this._clampZoom(B);var K=this.options.updateWhenZooming&&B!==this._tileZoom;(!M||K)&&(this._tileZoom=B,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),B!==void 0&&this._update(u),S||this._pruneTiles(),this._noPrune=!!S),this._setZoomTransforms(u,p)},_setZoomTransforms:function(u,p){for(var S in this._levels)this._setZoomTransform(this._levels[S],u,p)},_setZoomTransform:function(u,p,S){var M=this._map.getZoomScale(S,u.zoom),B=u.origin.multiplyBy(M).subtract(this._map._getNewPixelOrigin(p,S)).round();et.any3d?la(u.el,B,M):Xt(u.el,B)},_resetGrid:function(){var u=this._map,p=u.options.crs,S=this._tileSize=this.getTileSize(),M=this._tileZoom,B=this._map.getPixelWorldBounds(this._tileZoom);B&&(this._globalTileRange=this._pxBoundsToTileRange(B)),this._wrapX=p.wrapLng&&!this.options.noWrap&&[Math.floor(u.project([0,p.wrapLng[0]],M).x/S.x),Math.ceil(u.project([0,p.wrapLng[1]],M).x/S.y)],this._wrapY=p.wrapLat&&!this.options.noWrap&&[Math.floor(u.project([p.wrapLat[0],0],M).y/S.x),Math.ceil(u.project([p.wrapLat[1],0],M).y/S.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(u){var p=this._map,S=p._animatingZoom?Math.max(p._animateToZoom,p.getZoom()):p.getZoom(),M=p.getZoomScale(S,this._tileZoom),B=p.project(u,this._tileZoom).floor(),K=p.getSize().divideBy(M*2);return new j(B.subtract(K),B.add(K))},_update:function(u){var p=this._map;if(p){var S=this._clampZoom(p.getZoom());if(u===void 0&&(u=p.getCenter()),this._tileZoom!==void 0){var M=this._getTiledPixelBounds(u),B=this._pxBoundsToTileRange(M),K=B.getCenter(),fe=[],be=this.options.keepBuffer,Ae=new j(B.getBottomLeft().subtract([be,-be]),B.getTopRight().add([be,-be]));if(!(isFinite(B.min.x)&&isFinite(B.min.y)&&isFinite(B.max.x)&&isFinite(B.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var Ne in this._tiles){var He=this._tiles[Ne].coords;(He.z!==this._tileZoom||!Ae.contains(new z(He.x,He.y)))&&(this._tiles[Ne].current=!1)}if(Math.abs(S-this._tileZoom)>1){this._setView(u,S);return}for(var tt=B.min.y;tt<=B.max.y;tt++)for(var ht=B.min.x;ht<=B.max.x;ht++){var tr=new z(ht,tt);if(tr.z=this._tileZoom,!!this._isValidTile(tr)){var Ln=this._tiles[this._tileCoordsToKey(tr)];Ln?Ln.current=!0:fe.push(tr)}}if(fe.sort(function(Rt,Dt){return Rt.distanceTo(K)-Dt.distanceTo(K)}),fe.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Fr=document.createDocumentFragment();for(ht=0;ht<fe.length;ht++)this._addTile(fe[ht],Fr);this._level.el.appendChild(Fr)}}}},_isValidTile:function(u){var p=this._map.options.crs;if(!p.infinite){var S=this._globalTileRange;if(!p.wrapLng&&(u.x<S.min.x||u.x>S.max.x)||!p.wrapLat&&(u.y<S.min.y||u.y>S.max.y))return!1}if(!this.options.bounds)return!0;var M=this._tileCoordsToBounds(u);return le(this.options.bounds).overlaps(M)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var p=this._map,S=this.getTileSize(),M=u.scaleBy(S),B=M.add(S),K=p.unproject(M,u.z),fe=p.unproject(B,u.z);return[K,fe]},_tileCoordsToBounds:function(u){var p=this._tileCoordsToNwSe(u),S=new ee(p[0],p[1]);return this.options.noWrap||(S=this._map.wrapLatLngBounds(S)),S},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var p=u.split(":"),S=new z(+p[0],+p[1]);return S.z=+p[2],S},_removeTile:function(u){var p=this._tiles[u];p&&(Gt(p.el),delete this._tiles[u],this.fire("tileunload",{tile:p.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){ut(u,"leaflet-tile");var p=this.getTileSize();u.style.width=p.x+"px",u.style.height=p.y+"px",u.onselectstart=y,u.onmousemove=y,et.ielt9&&this.options.opacity<1&&rn(u,this.options.opacity)},_addTile:function(u,p){var S=this._getTilePos(u),M=this._tileCoordsToKey(u),B=this.createTile(this._wrapCoords(u),l(this._tileReady,this,u));this._initTile(B),this.createTile.length<2&&J(l(this._tileReady,this,u,null,B)),Xt(B,S),this._tiles[M]={el:B,coords:u,current:!0},p.appendChild(B),this.fire("tileloadstart",{tile:B,coords:u})},_tileReady:function(u,p,S){p&&this.fire("tileerror",{error:p,tile:S,coords:u});var M=this._tileCoordsToKey(u);S=this._tiles[M],S&&(S.loaded=+new Date,this._map._fadeAnimated?(rn(S.el,0),oe(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this)):(S.active=!0,this._pruneTiles()),p||(ut(S.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:S.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et.ielt9||!this._map._fadeAnimated?J(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var p=new z(this._wrapX?m(u.x,this._wrapX):u.x,this._wrapY?m(u.y,this._wrapY):u.y);return p.z=u.z,p},_pxBoundsToTileRange:function(u){var p=this.getTileSize();return new j(u.min.unscaleBy(p).floor(),u.max.unscaleBy(p).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function Jm(u){return new Ps(u)}var qa=Ps.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,p){this._url=u,p=w(this,p),p.detectRetina&&et.retina&&p.maxZoom>0?(p.tileSize=Math.floor(p.tileSize/2),p.zoomReverse?(p.zoomOffset--,p.minZoom=Math.min(p.maxZoom,p.minZoom+1)):(p.zoomOffset++,p.maxZoom=Math.max(p.minZoom,p.maxZoom-1)),p.minZoom=Math.max(0,p.minZoom)):p.zoomReverse?p.minZoom=Math.min(p.maxZoom,p.minZoom):p.maxZoom=Math.max(p.minZoom,p.maxZoom),typeof p.subdomains=="string"&&(p.subdomains=p.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,p){return this._url===u&&p===void 0&&(p=!0),this._url=u,p||this.redraw(),this},createTile:function(u,p){var S=document.createElement("img");return lt(S,"load",l(this._tileOnLoad,this,p,S)),lt(S,"error",l(this._tileOnError,this,p,S)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(S.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(S.referrerPolicy=this.options.referrerPolicy),S.alt="",S.src=this.getTileUrl(u),S},getTileUrl:function(u){var p={r:et.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var S=this._globalTileRange.max.y-u.y;this.options.tms&&(p.y=S),p["-y"]=S}return P(this._url,i(p,this.options))},_tileOnLoad:function(u,p){et.ielt9?setTimeout(l(u,this,null,p),0):u(null,p)},_tileOnError:function(u,p,S){var M=this.options.errorTileUrl;M&&p.getAttribute("src")!==M&&(p.src=M),u(S,p)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,p=this.options.maxZoom,S=this.options.zoomReverse,M=this.options.zoomOffset;return S&&(u=p-u),u+M},_getSubdomain:function(u){var p=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[p]},_abortLoading:function(){var u,p;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(p=this._tiles[u].el,p.onload=y,p.onerror=y,!p.complete)){p.src=U;var S=this._tiles[u].coords;Gt(p),delete this._tiles[u],this.fire("tileabort",{tile:p,coords:S})}},_removeTile:function(u){var p=this._tiles[u];if(p)return p.el.setAttribute("src",U),Ps.prototype._removeTile.call(this,u)},_tileReady:function(u,p,S){if(!(!this._map||S&&S.getAttribute("src")===U))return Ps.prototype._tileReady.call(this,u,p,S)}});function ti(u,p){return new qa(u,p)}var tu=qa.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,p){this._url=u;var S=i({},this.defaultWmsParams);for(var M in p)M in this.options||(S[M]=p[M]);p=w(this,p);var B=p.detectRetina&&et.retina?2:1,K=this.getTileSize();S.width=K.x*B,S.height=K.y*B,this.wmsParams=S},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var p=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[p]=this._crs.code,qa.prototype.onAdd.call(this,u)},getTileUrl:function(u){var p=this._tileCoordsToNwSe(u),S=this._crs,M=q(S.project(p[0]),S.project(p[1])),B=M.min,K=M.max,fe=(this._wmsVersion>=1.3&&this._crs===ud?[B.y,B.x,K.y,K.x]:[B.x,B.y,K.x,K.y]).join(","),be=qa.prototype.getTileUrl.call(this,u);return be+A(this.wmsParams,be,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+fe},setParams:function(u,p){return i(this.wmsParams,u),p||this.redraw(),this}});function ni(u,p){return new tu(u,p)}qa.WMS=tu,ti.wms=ni;var Mr=vi.extend({options:{padding:.1},initialize:function(u){w(this,u),f(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ut(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,p){var S=this._map.getZoomScale(p,this._zoom),M=this._map.getSize().multiplyBy(.5+this.options.padding),B=this._map.project(this._center,p),K=M.multiplyBy(-S).add(B).subtract(this._map._getNewPixelOrigin(u,p));et.any3d?la(this._container,K,S):Xt(this._container,K)},_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,p=this._map.getSize(),S=this._map.containerPointToLayerPoint(p.multiplyBy(-u)).round();this._bounds=new j(S,S.add(p.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),gc=Mr.extend({options:{tolerance:0},getEvents:function(){var u=Mr.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Mr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");lt(u,"mousemove",this._onMouseMove,this),lt(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),lt(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){oe(this._redrawRequest),delete this._ctx,Gt(this._container),Bt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var p in this._layers)u=this._layers[p],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Mr.prototype._update.call(this);var u=this._bounds,p=this._container,S=u.getSize(),M=et.retina?2:1;Xt(p,u.min),p.width=M*S.x,p.height=M*S.y,p.style.width=S.x+"px",p.style.height=S.y+"px",et.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){Mr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[f(u)]=u;var p=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=p),this._drawLast=p,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var p=u._order,S=p.next,M=p.prev;S?S.prev=M:this._drawLast=M,M?M.next=S:this._drawFirst=S,delete u._order,delete this._layers[f(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 p=u.options.dashArray.split(/[, ]+/),S=[],M,B;for(B=0;B<p.length;B++){if(M=Number(p[B]),isNaN(M))return;S.push(M)}u.options._dashArray=S}else u.options._dashArray=u.options.dashArray},_requestRedraw:function(u){this._map&&(this._extendRedrawBounds(u),this._redrawRequest=this._redrawRequest||J(this._redraw,this))},_extendRedrawBounds:function(u){if(u._pxBounds){var p=(u.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new j,this._redrawBounds.extend(u._pxBounds.min.subtract([p,p])),this._redrawBounds.extend(u._pxBounds.max.add([p,p]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var u=this._redrawBounds;if(u){var p=u.getSize();this._ctx.clearRect(u.min.x,u.min.y,p.x,p.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var u,p=this._redrawBounds;if(this._ctx.save(),p){var S=p.getSize();this._ctx.beginPath(),this._ctx.rect(p.min.x,p.min.y,S.x,S.y),this._ctx.clip()}this._drawing=!0;for(var M=this._drawFirst;M;M=M.next)u=M.layer,(!p||u._pxBounds&&u._pxBounds.intersects(p))&&u._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(u,p){if(this._drawing){var S,M,B,K,fe=u._parts,be=fe.length,Ae=this._ctx;if(be){for(Ae.beginPath(),S=0;S<be;S++){for(M=0,B=fe[S].length;M<B;M++)K=fe[S][M],Ae[M?"lineTo":"moveTo"](K.x,K.y);p&&Ae.closePath()}this._fillStroke(Ae,u)}}},_updateCircle:function(u){if(!(!this._drawing||u._empty())){var p=u._point,S=this._ctx,M=Math.max(Math.round(u._radius),1),B=(Math.max(Math.round(u._radiusY),1)||M)/M;B!==1&&(S.save(),S.scale(1,B)),S.beginPath(),S.arc(p.x,p.y/B,M,0,Math.PI*2,!1),B!==1&&S.restore(),this._fillStroke(S,u)}},_fillStroke:function(u,p){var S=p.options;S.fill&&(u.globalAlpha=S.fillOpacity,u.fillStyle=S.fillColor||S.color,u.fill(S.fillRule||"evenodd")),S.stroke&&S.weight!==0&&(u.setLineDash&&u.setLineDash(p.options&&p.options._dashArray||[]),u.globalAlpha=S.opacity,u.lineWidth=S.weight,u.strokeStyle=S.color,u.lineCap=S.lineCap,u.lineJoin=S.lineJoin,u.stroke())},_onClick:function(u){for(var p=this._map.mouseEventToLayerPoint(u),S,M,B=this._drawFirst;B;B=B.next)S=B.layer,S.options.interactive&&S._containsPoint(p)&&(!(u.type==="click"||u.type==="preclick")||!this._map._draggableMoved(S))&&(M=S);this._fireEvent(M?[M]:!1,u)},_onMouseMove:function(u){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var p=this._map.mouseEventToLayerPoint(u);this._handleMouseHover(u,p)}},_handleMouseOut:function(u){var p=this._hoveredLayer;p&&(dn(this._container,"leaflet-interactive"),this._fireEvent([p],u,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(u,p){if(!this._mouseHoverThrottled){for(var S,M,B=this._drawFirst;B;B=B.next)S=B.layer,S.options.interactive&&S._containsPoint(p)&&(M=S);M!==this._hoveredLayer&&(this._handleMouseOut(u),M&&(ut(this._container,"leaflet-interactive"),this._fireEvent([M],u,"mouseover"),this._hoveredLayer=M)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,u),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(u,p,S){this._map._fireDOMEvent(p,S||p.type,u)},_bringToFront:function(u){var p=u._order;if(p){var S=p.next,M=p.prev;if(S)S.prev=M;else return;M?M.next=S:S&&(this._drawFirst=S),p.prev=this._drawLast,this._drawLast.next=p,p.next=null,this._drawLast=p,this._requestRedraw(u)}},_bringToBack:function(u){var p=u._order;if(p){var S=p.next,M=p.prev;if(M)M.next=S;else return;S?S.prev=M:M&&(this._drawLast=M),p.prev=null,p.next=this._drawFirst,this._drawFirst.prev=p,this._drawFirst=p,this._requestRedraw(u)}}});function nu(u){return et.canvas?new gc(u):null}var Ga=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(u){return document.createElement("<lvml:"+u+' class="lvml">')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),cd={_initContainer:function(){this._container=yt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Mr.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var p=u._container=Ga("shape");ut(p,"leaflet-vml-shape "+(this.options.className||"")),p.coordsize="1 1",u._path=Ga("path"),p.appendChild(u._path),this._updateStyle(u),this._layers[f(u)]=u},_addPath:function(u){var p=u._container;this._container.appendChild(p),u.options.interactive&&u.addInteractiveTarget(p)},_removePath:function(u){var p=u._container;Gt(p),u.removeInteractiveTarget(p),delete this._layers[f(u)]},_updateStyle:function(u){var p=u._stroke,S=u._fill,M=u.options,B=u._container;B.stroked=!!M.stroke,B.filled=!!M.fill,M.stroke?(p||(p=u._stroke=Ga("stroke")),B.appendChild(p),p.weight=M.weight+"px",p.color=M.color,p.opacity=M.opacity,M.dashArray?p.dashStyle=N(M.dashArray)?M.dashArray.join(" "):M.dashArray.replace(/( *, *)/g," "):p.dashStyle="",p.endcap=M.lineCap.replace("butt","flat"),p.joinstyle=M.lineJoin):p&&(B.removeChild(p),u._stroke=null),M.fill?(S||(S=u._fill=Ga("fill")),B.appendChild(S),S.color=M.fillColor||M.color,S.opacity=M.fillOpacity):S&&(B.removeChild(S),u._fill=null)},_updateCircle:function(u){var p=u._point.round(),S=Math.round(u._radius),M=Math.round(u._radiusY||S);this._setPath(u,u._empty()?"M0 0":"AL "+p.x+","+p.y+" "+S+","+M+" 0,"+65535*360)},_setPath:function(u,p){u._path.v=p},_bringToFront:function(u){er(u._container)},_bringToBack:function(u){vo(u._container)}},Yi=et.vml?Ga:me,Ls=Mr.extend({_initContainer:function(){this._container=Yi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Gt(this._container),Bt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Mr.prototype._update.call(this);var u=this._bounds,p=u.getSize(),S=this._container;(!this._svgSize||!this._svgSize.equals(p))&&(this._svgSize=p,S.setAttribute("width",p.x),S.setAttribute("height",p.y)),Xt(S,u.min),S.setAttribute("viewBox",[u.min.x,u.min.y,p.x,p.y].join(" ")),this.fire("update")}},_initPath:function(u){var p=u._path=Yi("path");u.options.className&&ut(p,u.options.className),u.options.interactive&&ut(p,"leaflet-interactive"),this._updateStyle(u),this._layers[f(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){Gt(u._path),u.removeInteractiveTarget(u._path),delete this._layers[f(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var p=u._path,S=u.options;p&&(S.stroke?(p.setAttribute("stroke",S.color),p.setAttribute("stroke-opacity",S.opacity),p.setAttribute("stroke-width",S.weight),p.setAttribute("stroke-linecap",S.lineCap),p.setAttribute("stroke-linejoin",S.lineJoin),S.dashArray?p.setAttribute("stroke-dasharray",S.dashArray):p.removeAttribute("stroke-dasharray"),S.dashOffset?p.setAttribute("stroke-dashoffset",S.dashOffset):p.removeAttribute("stroke-dashoffset")):p.setAttribute("stroke","none"),S.fill?(p.setAttribute("fill",S.fillColor||S.color),p.setAttribute("fill-opacity",S.fillOpacity),p.setAttribute("fill-rule",S.fillRule||"evenodd")):p.setAttribute("fill","none"))},_updatePoly:function(u,p){this._setPath(u,ie(u._parts,p))},_updateCircle:function(u){var p=u._point,S=Math.max(Math.round(u._radius),1),M=Math.max(Math.round(u._radiusY),1)||S,B="a"+S+","+M+" 0 1,0 ",K=u._empty()?"M0 0":"M"+(p.x-S)+","+p.y+B+S*2+",0 "+B+-S*2+",0 ";this._setPath(u,K)},_setPath:function(u,p){u._path.setAttribute("d",p)},_bringToFront:function(u){er(u._path)},_bringToBack:function(u){vo(u._path)}});et.vml&&Ls.include(cd);function ru(u){return et.svg||et.vml?new Ls(u):null}Ct.include({getRenderer:function(u){var p=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return p||(p=this._renderer=this._createRenderer()),this.hasLayer(p)||this.addLayer(p),p},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var p=this._paneRenderers[u];return p===void 0&&(p=this._createRenderer({pane:u}),this._paneRenderers[u]=p),p},_createRenderer:function(u){return this.options.preferCanvas&&nu(u)||ru(u)}});var _o=Ts.extend({initialize:function(u,p){Ts.prototype.initialize.call(this,this._boundsToLatLngs(u),p)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=le(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function z0(u,p){return new _o(u,p)}Ls.create=Yi,Ls.pointsToPath=ie,da.geometryToLayer=hr,da.coordsToLatLng=fc,da.coordsToLatLngs=Zl,da.latLngToCoords=dc,da.latLngsToCoords=Xl,da.getFeature=$a,da.asFeature=hc,Ct.mergeOptions({boxZoom:!0});var Pr=Vi.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(){lt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Bt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Gt(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(),ys(),nc(),this._startPoint=this._map.mouseEventToContainerPoint(u),lt(document,{contextmenu:Ba,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=yt("div","leaflet-zoom-box",this._container),ut(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var p=new j(this._point,this._startPoint),S=p.getSize();Xt(this._box,p.min),this._box.style.width=S.x+"px",this._box.style.height=S.y+"px"},_finish:function(){this._moved&&(Gt(this._box),dn(this._container,"leaflet-crosshair")),Fi(),Ul(),Bt(document,{contextmenu:Ba,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(l(this._resetState,this),0);var p=new ee(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(p).fire("boxzoomend",{boxZoomBounds:p})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ct.addInitHook("addHandler","boxZoom",Pr),Ct.mergeOptions({doubleClickZoom:!0});var vc=Vi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var p=this._map,S=p.getZoom(),M=p.options.zoomDelta,B=u.originalEvent.shiftKey?S-M:S+M;p.options.doubleClickZoom==="center"?p.setZoom(B):p.setZoomAround(u.containerPoint,B)}});Ct.addInitHook("addHandler","doubleClickZoom",vc),Ct.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Wi=Vi.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new Fa(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))}ut(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){dn(this._map._container,"leaflet-grab"),dn(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 p=le(this._map.options.maxBounds);this._offsetLimit=q(this._map.latLngToContainerPoint(p.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(p.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 p=this._lastTime=+new Date,S=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(S),this._times.push(p),this._prunePositions(p)}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),p=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=p.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,p){return u-(u-p)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),p=this._offsetLimit;u.x<p.min.x&&(u.x=this._viscousLimit(u.x,p.min.x)),u.y<p.min.y&&(u.y=this._viscousLimit(u.y,p.min.y)),u.x>p.max.x&&(u.x=this._viscousLimit(u.x,p.max.x)),u.y>p.max.y&&(u.y=this._viscousLimit(u.y,p.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,p=Math.round(u/2),S=this._initialWorldOffset,M=this._draggable._newPos.x,B=(M-p+S)%u+p-S,K=(M+p+S)%u-p-S,fe=Math.abs(B+S)<Math.abs(K+S)?B:K;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=fe},_onDragEnd:function(u){var p=this._map,S=p.options,M=!S.inertia||u.noInertia||this._times.length<2;if(p.fire("dragend",u),M)p.fire("moveend");else{this._prunePositions(+new Date);var B=this._lastPos.subtract(this._positions[0]),K=(this._lastTime-this._times[0])/1e3,fe=S.easeLinearity,be=B.multiplyBy(fe/K),Ae=be.distanceTo([0,0]),Ne=Math.min(S.inertiaMaxSpeed,Ae),He=be.multiplyBy(Ne/Ae),tt=Ne/(S.inertiaDeceleration*fe),ht=He.multiplyBy(-tt/2).round();!ht.x&&!ht.y?p.fire("moveend"):(ht=p._limitOffset(ht,p.options.maxBounds),J(function(){p.panBy(ht,{duration:tt,easeLinearity:fe,noMoveStart:!0,animate:!0})}))}}});Ct.addInitHook("addHandler","dragging",Wi),Ct.mergeOptions({keyboard:!0,keyboardPanDelta:80});var fd=Vi.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(u){this._map=u,this._setPanDelta(u.options.keyboardPanDelta),this._setZoomDelta(u.options.zoomDelta)},addHooks:function(){var u=this._map._container;u.tabIndex<=0&&(u.tabIndex="0"),lt(u,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Bt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var u=document.body,p=document.documentElement,S=u.scrollTop||p.scrollTop,M=u.scrollLeft||p.scrollLeft;this._map._container.focus(),window.scrollTo(M,S)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(u){var p=this._panKeys={},S=this.keyCodes,M,B;for(M=0,B=S.left.length;M<B;M++)p[S.left[M]]=[-1*u,0];for(M=0,B=S.right.length;M<B;M++)p[S.right[M]]=[u,0];for(M=0,B=S.down.length;M<B;M++)p[S.down[M]]=[0,u];for(M=0,B=S.up.length;M<B;M++)p[S.up[M]]=[0,-1*u]},_setZoomDelta:function(u){var p=this._zoomKeys={},S=this.keyCodes,M,B;for(M=0,B=S.zoomIn.length;M<B;M++)p[S.zoomIn[M]]=u;for(M=0,B=S.zoomOut.length;M<B;M++)p[S.zoomOut[M]]=-u},_addHooks:function(){lt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Bt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(u){if(!(u.altKey||u.ctrlKey||u.metaKey)){var p=u.keyCode,S=this._map,M;if(p in this._panKeys){if(!S._panAnim||!S._panAnim._inProgress)if(M=this._panKeys[p],u.shiftKey&&(M=I(M).multiplyBy(3)),S.options.maxBounds&&(M=S._limitOffset(I(M),S.options.maxBounds)),S.options.worldCopyJump){var B=S.wrapLatLng(S.unproject(S.project(S.getCenter()).add(M)));S.panTo(B)}else S.panBy(M)}else if(p in this._zoomKeys)S.setZoom(S.getZoom()+(u.shiftKey?3:1)*this._zoomKeys[p]);else if(p===27&&S._popup&&S._popup.options.closeOnEscapeKey)S.closePopup();else return;Ba(u)}}});Ct.addInitHook("addHandler","keyboard",fd),Ct.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var iu=Vi.extend({addHooks:function(){lt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Bt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(u){var p=xr(u),S=this._map.options.wheelDebounceTime;this._delta+=p,this._lastMousePos=this._map.mouseEventToContainerPoint(u),this._startTime||(this._startTime=+new Date);var M=Math.max(S-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),M),Ba(u)},_performZoom:function(){var u=this._map,p=u.getZoom(),S=this._map.options.zoomSnap||0;u._stop();var M=this._delta/(this._map.options.wheelPxPerZoomLevel*4),B=4*Math.log(2/(1+Math.exp(-Math.abs(M))))/Math.LN2,K=S?Math.ceil(B/S)*S:B,fe=u._limitZoom(p+(this._delta>0?K:-K))-p;this._delta=0,this._startTime=null,fe&&(u.options.scrollWheelZoom==="center"?u.setZoom(p+fe):u.setZoomAround(this._lastMousePos,p+fe))}});Ct.addInitHook("addHandler","scrollWheelZoom",iu);var wo=600;Ct.mergeOptions({tapHold:et.touchNative&&et.safari&&et.mobile,tapTolerance:15});var yc=Vi.extend({addHooks:function(){lt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Bt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var p=u.touches[0];this._startPos=this._newPos=new z(p.clientX,p.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(lt(document,"touchend",Pn),lt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",p))},this),wo),lt(document,"touchend touchcancel contextmenu",this._cancel,this),lt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){Bt(document,"touchend",Pn),Bt(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),Bt(document,"touchend touchcancel contextmenu",this._cancel,this),Bt(document,"touchmove",this._onMove,this)},_onMove:function(u){var p=u.touches[0];this._newPos=new z(p.clientX,p.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,p){var S=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:p.screenX,screenY:p.screenY,clientX:p.clientX,clientY:p.clientY});S._simulated=!0,p.target.dispatchEvent(S)}});Ct.addInitHook("addHandler","tapHold",yc),Ct.mergeOptions({touchZoom:et.touch,bounceAtZoomLimits:!0});var dd=Vi.extend({addHooks:function(){ut(this._map._container,"leaflet-touch-zoom"),lt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){dn(this._map._container,"leaflet-touch-zoom"),Bt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var p=this._map;if(!(!u.touches||u.touches.length!==2||p._animatingZoom||this._zooming)){var S=p.mouseEventToContainerPoint(u.touches[0]),M=p.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=p.getSize()._divideBy(2),this._startLatLng=p.containerPointToLatLng(this._centerPoint),p.options.touchZoom!=="center"&&(this._pinchStartLatLng=p.containerPointToLatLng(S.add(M)._divideBy(2))),this._startDist=S.distanceTo(M),this._startZoom=p.getZoom(),this._moved=!1,this._zooming=!0,p._stop(),lt(document,"touchmove",this._onTouchMove,this),lt(document,"touchend touchcancel",this._onTouchEnd,this),Pn(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var p=this._map,S=p.mouseEventToContainerPoint(u.touches[0]),M=p.mouseEventToContainerPoint(u.touches[1]),B=S.distanceTo(M)/this._startDist;if(this._zoom=p.getScaleZoom(B,this._startZoom),!p.options.bounceAtZoomLimits&&(this._zoom<p.getMinZoom()&&B<1||this._zoom>p.getMaxZoom()&&B>1)&&(this._zoom=p._limitZoom(this._zoom)),p.options.touchZoom==="center"){if(this._center=this._startLatLng,B===1)return}else{var K=S._add(M)._divideBy(2)._subtract(this._centerPoint);if(B===1&&K.x===0&&K.y===0)return;this._center=p.unproject(p.project(this._pinchStartLatLng,this._zoom).subtract(K),this._zoom)}this._moved||(p._moveStart(!0,!1),this._moved=!0),oe(this._animRequest);var fe=l(p._move,p,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=J(fe,this,!0),Pn(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,oe(this._animRequest),Bt(document,"touchmove",this._onTouchMove,this),Bt(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",dd),Ct.BoxZoom=Pr,Ct.DoubleClickZoom=vc,Ct.Drag=Wi,Ct.Keyboard=fd,Ct.ScrollWheelZoom=iu,Ct.TapHold=yc,Ct.TouchZoom=dd,n.Bounds=j,n.Browser=et,n.CRS=ve,n.Canvas=gc,n.Circle=cc,n.CircleMarker=As,n.Class=se,n.Control=Br,n.DivIcon=Qm,n.DivOverlay=mr,n.DomEvent=ac,n.DomUtil=_s,n.Draggable=Fa,n.Evented=k,n.FeatureGroup=Hi,n.GeoJSON=da,n.GridLayer=Ps,n.Handler=Vi,n.Icon=qi,n.ImageOverlay=js,n.LatLng=pe,n.LatLngBounds=ee,n.Layer=vi,n.LayerGroup=Es,n.LineUtil=L0,n.Map=Ct,n.Marker=Kl,n.Mixin=O0,n.Path=Gi,n.Point=z,n.PolyUtil=sd,n.Polygon=Ts,n.Polyline=fa,n.Popup=Jl,n.PosAnimation=ws,n.Projection=Vm,n.Rectangle=_o,n.Renderer=Mr,n.SVG=Ls,n.SVGOverlay=pc,n.TileLayer=qa,n.Tooltip=eu,n.Transformation=te,n.Util=_e,n.VideoOverlay=Ha,n.bind=l,n.bounds=q,n.canvas=nu,n.circle=Wm,n.circleMarker=Ym,n.control=ca,n.divIcon=I0,n.extend=i,n.featureGroup=qm,n.geoJSON=mc,n.geoJson=Ql,n.gridLayer=Jm,n.icon=Gl,n.imageOverlay=Km,n.latLng=he,n.latLngBounds=le,n.layerGroup=N0,n.map=td,n.marker=Gm,n.point=I,n.polygon=D0,n.polyline=R0,n.popup=Xm,n.rectangle=z0,n.setOptions=w,n.stamp=f,n.svg=ru,n.svgOverlay=Zm,n.tileLayer=ti,n.tooltip=k0,n.transformation=V,n.version=r,n.videoOverlay=Ms;var hd=window.L;n.noConflict=function(){return window.L=hd,this},window.L=n})}(mh,mh.exports)),mh.exports}var wm=Qve();const q5=aa(wm);function u3(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function c3(e,t){return t==null?function(r,i){const o=_.useRef(void 0);return o.current||(o.current=e(r,i)),o}:function(r,i){const o=_.useRef(void 0);o.current||(o.current=e(r,i));const l=_.useRef(r),{instance:c}=o.current;return _.useEffect(function(){l.current!==r&&(t(c,r,l.current),l.current=r)},[c,r,t]),o}}function Jve(e,t){_.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function B7(e){return function(n){const r=z7(),i=e(l3(n,r),r);return I7(r.map,n.attribution),U7(i.current,n.eventHandlers),Jve(i.current,r),i}}function eye(e,t){const n=c3(e,t),r=B7(n);return Yve(r)}function tye(e,t){const n=c3(e),r=Zve(n,t);return Wve(r)}function nye(e,t){const n=c3(e,t),r=B7(n);return Kve(r)}function rye(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 iye({bounds:e,boundsOptions:t,center:n,children:r,className:i,id:o,placeholder:l,style:c,whenReady:f,zoom:h,...m},y){const[x]=_.useState({className:i,id:o,style:c}),[b,C]=_.useState(null),w=_.useRef(void 0);_.useImperativeHandle(y,()=>b?.map??null,[b]);const A=_.useCallback(P=>{if(P!==null&&!w.current){const N=new wm.Map(P,m);w.current=N,n!=null&&h!=null?N.setView(n,h):e!=null&&N.fitBounds(e,t),f!=null&&N.whenReady(f),C(qve(N))}},[]);_.useEffect(()=>()=>{b?.map.remove()},[b]);const O=b?lf.createElement(s3,{value:b},r):l??null;return lf.createElement("div",{...x,ref:A},O)}const aye=_.forwardRef(iye),oye=eye(function({position:t,...n},r){const i=new wm.Marker(t,n);return u3(i,Gve(r,{overlayContainer:i}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),sye=tye(function(t,n){const r=new wm.Popup(t,n.overlayContainer);return u3(r,n)},function(t,n,{position:r},i){_.useEffect(function(){const{instance:l}=t;function c(h){h.popup===l&&(l.update(),i(!0))}function f(h){h.popup===l&&i(!1)}return n.map.on({popupopen:c,popupclose:f}),n.overlayContainer==null?(r!=null&&l.setLatLng(r),l.openOn(n.map)):n.overlayContainer.bindPopup(l),function(){n.map.off({popupopen:c,popupclose:f}),n.overlayContainer?.unbindPopup(),n.map.removeLayer(l)}},[t,n,i,r])}),lye=nye(function({url:t,...n},r){const i=new wm.TileLayer(t,l3(n,r));return u3(i,r)},function(t,n,r){rye(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)}),uye={"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","Pale Moon":"pale_moon",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"},F7={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",pale_moon:"Pale Moon",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"},wn={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},Vr={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"},Js={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class De{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=De.getVersionPrecision(t),o=De.getVersionPrecision(n);let l=Math.max(i,o),c=0;const f=De.map([t,n],h=>{const m=l-De.getVersionPrecision(h),y=h+new Array(m+1).join(".0");return De.map(y.split("."),x=>new Array(20-x.length).join("0")+x).reverse()});for(r&&(c=l-Math.min(i,o)),l-=1;l>=c;){if(f[0][l]>f[1][l])return 1;if(f[0][l]===f[1][l]){if(l===c)return 0;l-=1}else if(f[0][l]<f[1][l])return-1}}static map(t,n){const r=[];let i;if(Array.prototype.map)return Array.prototype.map.call(t,n);for(i=0;i<t.length;i+=1)r.push(n(t[i]));return r}static find(t,n){let r,i;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(r=0,i=t.length;r<i;r+=1){const o=t[r];if(n(o,r))return o}}static assign(t,...n){const r=t;let i,o;if(Object.assign)return Object.assign(t,...n);for(i=0,o=n.length;i<o;i+=1){const l=n[i];typeof l=="object"&&l!==null&&Object.keys(l).forEach(f=>{r[f]=l[f]})}return t}static getBrowserAlias(t){return uye[t]}static getBrowserTypeByAlias(t){return F7[t]||""}}const Zt=/version\/(\d+(\.?_?\d+)+)/i,cye=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=De.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=De.getFirstMatch(Zt,e)||De.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=De.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=De.getFirstMatch(Zt,e)||De.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=De.getFirstMatch(Zt,e)||De.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){const t={name:"Pale Moon"},n=De.getFirstMatch(Zt,e)||De.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=De.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=De.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=De.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=De.getFirstMatch(Zt,e)||De.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=De.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=De.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=De.getFirstMatch(Zt,e)||De.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=De.getFirstMatch(Zt,e)||De.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=De.getFirstMatch(Zt,e)||De.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=De.getFirstMatch(Zt,e)||De.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=De.getFirstMatch(Zt,e)||De.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=De.getFirstMatch(Zt,e)||De.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=De.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||De.getFirstMatch(Zt,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=De.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=De.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=De.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=De.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=De.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=De.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=De.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=De.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=De.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=De.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=De.getFirstMatch(Zt,e)||De.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=De.getFirstMatch(Zt,e)||De.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=De.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=De.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=De.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=De.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=De.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=De.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=De.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=De.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=De.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=De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=De.getFirstMatch(Zt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:De.getFirstMatch(i,e),version:De.getSecondMatch(i,e)}}}],fye=[{test:[/Roku\/DVP/],describe(e){const t=De.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Vr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=De.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Vr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=De.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=De.getWindowsVersionName(t);return{name:Vr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Vr.iOS},n=De.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=De.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=De.getMacOSVersionName(t),r={name:Vr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=De.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Vr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=De.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=De.getAndroidVersionName(t),r={name:Vr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=De.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Vr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=De.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||De.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||De.getFirstMatch(/\bbb(\d+)/i,e);return{name:Vr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=De.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Vr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=De.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Vr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Vr.Linux}}},{test:[/CrOS/],describe(){return{name:Vr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=De.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Vr.PlayStation4,version:t}}}],dye=[{test:[/googlebot/i],describe(){return{type:wn.bot,vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=De.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:wn.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:wn.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:wn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:wn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:wn.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:wn.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:wn.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=De.getFirstMatch(/(ipod|iphone)/i,e);return{type:wn.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:wn.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(e){const t=De.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:wn.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe(){return{type:wn.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:wn.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:wn.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:wn.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:wn.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:wn.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:wn.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:wn.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:wn.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:wn.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:wn.tv}}}],hye=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Js.Blink};const n=De.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Js.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Js.Trident},n=De.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Js.Presto},n=De.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:Js.Gecko},n=De.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Js.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Js.WebKit},n=De.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class G5{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=De.find(cye,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))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=De.find(fye,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))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=De.find(dye,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))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=De.find(hye,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))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 De.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(c=>{const f=t[c];typeof f=="string"?(i[c]=f,o+=1):typeof f=="object"&&(n[c]=f,r+=1)}),r>0){const c=Object.keys(n),f=De.find(c,m=>this.isOS(m));if(f){const m=this.satisfies(n[f]);if(m!==void 0)return m}const h=De.find(c,m=>this.isPlatform(m));if(h){const m=this.satisfies(n[h]);if(m!==void 0)return m}}if(o>0){const c=Object.keys(i),f=De.find(c,h=>this.isBrowser(h,!0));if(f!==void 0)return this.compareVersion(i[f])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=De.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(De.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))}}class mye{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new G5(t,n)}static parse(t){return new G5(t).getResult()}static get BROWSER_MAP(){return F7}static get ENGINE_MAP(){return Js}static get OS_MAP(){return Vr}static get PLATFORMS_MAP(){return wn}}const pye=e=>e?.type===oS.INVALID_ARGUMENT,gye=e=>e?.type===oS.INVALID_SHORT_URL_DELETION,vye=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),zi=e=>vye(e)?e:void 0,f3=e=>"error"in e,so=({errorData:e,fallbackMessage:t})=>g.jsxs(g.Fragment,{children:[e?.detail??t,pye(e)&&g.jsxs("p",{children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),$7=_.createContext(""),yye=$7.Provider,ms=()=>_.useContext($7),V7=_.createContext(void 0),{Provider:d3}=V7,h0=()=>_.useContext(V7),bye=5,h3=()=>{const[e,t]=_.useState([]),n=_.useMemo(()=>e.length>=bye,[e.length]),r=_.useCallback(c=>!n&&t(f=>[...f,c]),[n]),i=_.useCallback(c=>!n&&e.every(f=>f.name!==c),[e,n]),o=_.useCallback(c=>t(f=>f.filter(h=>h!==c)),[]),l=_.useCallback(()=>t([]),[]);return{itemsToCompare:e,addItemToCompare:r,removeItemToCompare:o,clearItemsToCompare:l,canAddItemWithName:i}},m3=({className:e,type:t})=>{const n=ms(),r=h0(),i=_.useMemo(()=>r?encodeURIComponent(r.itemsToCompare.map(f=>f.query).join(",")):"",[r]);if(!r||r.itemsToCompare.length===0)return null;const{itemsToCompare:o,clearItemsToCompare:l,removeItemToCompare:c}=r;return g.jsx("div",{className:Oe("sticky top-(--header-height) z-10",e),children:g.jsxs(Nt,{bodyClassName:"flex flex-col lg:flex-row gap-4 items-center",children:[g.jsx("ul",{className:"flex flex-wrap gap-1 grow items-center",children:o.map((f,h)=>g.jsxs("li",{className:Oe("flex items-center gap-1 text-sm font-bold text-white py-0.5 px-1.5 rounded",{"bg-gray-500":!f.style?.backgroundColor}),style:f.style,children:[f.name,g.jsx(ku,{label:`Remove ${f.name}`,className:"text-xs",onClick:()=>c(f)})]},`${f.name}_${h}`))}),g.jsxs("div",{className:"flex gap-2 max-lg:w-full",children:[g.jsxs(Tt,{className:"grow whitespace-nowrap",disabled:o.length<2,to:o.length>1?`${n}/${t}/compare-visits?${t}=${i}`:void 0,children:[g.jsx(Be,{icon:uy}),"Compare (",o.length,"/5)",g.jsx(Be,{icon:Gg})]}),g.jsx(Tt,{"aria-label":"Close compare",variant:"secondary",onClick:l,children:g.jsx(Be,{icon:fy})})]})]})})},xye=(e,{maxVersion:t,minVersion:n})=>{const r=!n||f_(e,n,">=");return(!t||f_(e,t,"<="))&&r},H7={ipRedirectCondition:{minVersion:"4.2.0"},geolocationRedirectCondition:{minVersion:"4.3.0"},filterShortUrlsByDomain:{minVersion:"4.3.0"},advancedQueryRedirectConditions:{minVersion:"4.5.0"},desktopDeviceTypes:{minVersion:"4.5.0"},filterShortUrlsByExcludedTags:{minVersion:"4.6.0"},filterVisitsByDomain:{minVersion:"4.6.0"}};Object.freeze(H7);const gu=(e,t)=>xye(t==="latest"?"999.99.99":t,H7[e]),q7=e=>({ipRedirectCondition:gu("ipRedirectCondition",e),geolocationRedirectCondition:gu("geolocationRedirectCondition",e),filterShortUrlsByDomain:gu("filterShortUrlsByDomain",e),advancedQueryRedirectConditions:gu("advancedQueryRedirectConditions",e),desktopDeviceTypes:gu("advancedQueryRedirectConditions",e),filterShortUrlsByExcludedTags:gu("filterShortUrlsByExcludedTags",e),filterVisitsByDomain:gu("filterVisitsByDomain",e)}),G7=_.createContext(q7("0.0.0")),_ye=G7.Provider,wye=e=>_.useMemo(()=>q7(e),[e]),ul=e=>_.useContext(G7)[e],cl="DEFAULT",_2=({children:e,onChange:t,infoTitle:n,...r})=>g.jsx(di,{...r,onChange:i=>t(i.target.value),label:g.jsxs(g.Fragment,{children:[g.jsx(Be,{className:"mr-1.5",icon:dy,title:n}),e]}),type:"url",placeholder:"No redirect"}),Sye=({isOpen:e,onClose:t,domain:n,editDomainRedirects:r})=>{const[i,o]=_.useState(n.redirects?.baseUrlRedirect??""),[l,c]=_.useState(n.redirects?.regular404Redirect??""),[f,h]=_.useState(n.redirects?.invalidShortUrlRedirect??""),[m,y]=_.useState(!1),x=_.useCallback(async()=>{y(!0);try{await r({domain:n.domain,redirects:{baseUrlRedirect:Vb(i),regular404Redirect:Vb(l),invalidShortUrlRedirect:Vb(f)}}),t()}finally{y(!1)}},[r,n.domain,i,l,f,t]);return g.jsx(co,{title:`Edit redirects for ${n.domain}`,open:e,onClose:t,onConfirm:x,confirmText:m?"Saving...":"Save",confirmDisabled:m,children:g.jsxs("div",{className:"flex flex-col gap-y-3",children:[g.jsx(_2,{value:i,onChange:o,infoTitle:`Visitors accessing the base url, as in https://${n.domain}/, will be redirected to this URL.`,children:"Base URL"}),g.jsx(_2,{value:l,onChange:c,infoTitle:`Visitors accessing a url not matching a short URL pattern, as in https://${n.domain}/???/[...], will be redirected to this URL.`,children:"Regular 404"}),g.jsx(_2,{value:f,onChange:h,infoTitle:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL.",children:"Invalid short URL"})]})})},Cye=({domain:e,editDomainRedirects:t})=>{const{flag:n,setToTrue:r,setToFalse:i}=Cn(),o=ms(),l=h0(),c=ul("filterShortUrlsByDomain");return g.jsxs(g.Fragment,{children:[g.jsxs(tn,{menuAlignment:"right",children:[g.jsxs(tn.Item,{className:"gap-1.5",to:`${o}/domain/${e.domain}${e.isDefault?`_${cl}`:""}/visits`,children:[g.jsx(Be,{icon:jw})," Visit stats"]}),g.jsxs(tn.Item,{className:"gap-1.5",disabled:!l||!l.canAddItemWithName(e.domain),onClick:()=>l?.addItemToCompare({name:e.domain,query:e.domain}),children:[g.jsx(Be,{icon:uy})," Compare visits"]}),c&&g.jsxs(tn.Item,{className:"gap-1.5",to:`${o}/list-short-urls/1?domain=${e.isDefault?cl:e.domain}`,children:[g.jsx(Be,{icon:Ow})," Short URLs"]}),g.jsx(tn.Separator,{}),g.jsxs(tn.Item,{onClick:r,className:"gap-1.5",children:[g.jsx(Be,{icon:Tw})," Edit redirects"]})]}),g.jsx(Sye,{domain:e,isOpen:n,onClose:i,editDomainRedirects:t})]})},Eye=({status:e})=>{const{anchor:t,tooltip:n}=as();return e==="validating"?g.jsx(Be,{icon:Aw,spin:!0}):g.jsxs("span",{...t,children:[g.jsx(Be,{icon:e==="valid"?Nu:ZV,className:Oe({"text-danger":e!=="valid"})}),g.jsx(os,{...n,children:e==="valid"?g.jsxs(g.Fragment,{children:["Congratulations!",g.jsx("br",{}),"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(Li,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},w2=({fallback:e})=>g.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[!e&&g.jsx("small",{children:"No redirect"}),e&&g.jsxs(g.Fragment,{children:[e," ",g.jsx("small",{children:"(as fallback)"})]})]}),Aye=()=>{const{anchor:e,tooltip:t}=as();return g.jsxs(g.Fragment,{children:[g.jsx(Be,{...e,icon:yH,className:"text-lm-brand dark:text-dm-brand","data-testid":"default-domain-icon"}),g.jsx(os,{...t,children:"Default domain foo"})]})},Tye=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:o,redirects:l,status:c}=e;return _.useEffect(()=>{n(e.domain)},[n,e.domain]),g.jsxs($e.Row,{className:"relative",children:[g.jsx($e.Cell,{columnName:"Is default domain:",children:o&&g.jsx(Aye,{})}),g.jsx($e.Cell,{columnName:"Domain:",children:g.jsx("b",{children:i})}),g.jsx($e.Cell,{columnName:"Base path redirect:",children:l?.baseUrlRedirect??g.jsx(w2,{fallback:r?.baseUrlRedirect})}),g.jsx($e.Cell,{columnName:"Regular 404 redirect:",children:l?.regular404Redirect??g.jsx(w2,{fallback:r?.regular404Redirect})}),g.jsx($e.Cell,{columnName:"Invalid short URL redirect:",children:l?.invalidShortUrlRedirect??g.jsx(w2,{fallback:r?.invalidShortUrlRedirect})}),g.jsx($e.Cell,{className:"lg:text-center max-lg:border-none",columnName:"Status:",children:g.jsx(Eye,{status:c})}),g.jsx($e.Cell,{className:"text-right max-lg:absolute max-lg:top-1 max-lg:right-1 max-lg:p-0",children:g.jsx(Cye,{domain:e,editDomainRedirects:t})})]})},Y5=[{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}],Oye=({domainsList:e,filterDomains:t,editDomainRedirects:n,checkDomainHealth:r})=>{const{filteredDomains:i,defaultRedirects:o,loading:l,error:c,errorData:f}=e,h=o??i.find(({isDefault:y})=>y)?.redirects,m=h3();return l?g.jsx(Wo,{loading:!0}):g.jsx(d3,{value:m,children:g.jsxs("div",{className:"flex flex-col gap-y-4",children:[g.jsx(jf,{onChange:t}),g.jsx(m3,{type:"domains"}),c&&g.jsx(Gr,{variant:"error",children:g.jsx(so,{errorData:f,fallbackMessage:"Error loading domains :("})}),!c&&g.jsx(Nt,{className:"card",children:g.jsxs($e,{header:g.jsx($e.Row,{children:Y5.map((y,x)=>g.jsx($e.Cell,{children:g.jsx("span",{className:y.isHidden?"sr-only":void 0,children:y.value})},x))}),children:[i.length<1&&g.jsx($e.Row,{children:g.jsx($e.Cell,{colSpan:Y5.length,className:"text-center",children:"No results found"})}),i.map(y=>g.jsx(Tye,{domain:y,editDomainRedirects:n,checkDomainHealth:r,defaultRedirects:h},y.domain))]})})]})})},or=(e,t)=>O6(e,t,{serializeError:n=>n}),jye="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",Mye=e=>or(jye,async({domain:t,redirects:n})=>{const r=await e().editDomainRedirects({domain:t,...n});return{domain:t,redirects:r}}),yg="shlink/domainsList",bg={domains:[],filteredDomains:[],loading:!1,error:!1},W5=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},K5=(e,t)=>n=>n.domain!==e?n:{...n,status:t},Pye=(e,t,n)=>{const r=or(`${yg}/listDomains`,async()=>{const{data:c,defaultRedirects:f}=await e().listDomains();return{domains:c.map(h=>({...h,status:"validating"})),defaultRedirects:f}}),i=or(`${yg}/checkDomainHealth`,async c=>{try{const{status:f}=await e().health({domain:c});return{domain:c,status:f==="pass"?"valid":"invalid"}}catch{return{domain:c,status:"invalid"}}}),o=un(`${yg}/filterDomains`),{reducer:l}=jt({name:yg,initialState:bg,reducers:{},extraReducers:c=>{c.addCase(r.pending,()=>({...bg,loading:!0})),c.addCase(r.rejected,(f,{error:h})=>({...bg,error:!0,errorData:zi(h)})),c.addCase(r.fulfilled,(f,{payload:h})=>({...bg,...h,filteredDomains:h.domains})),c.addCase(i.fulfilled,({domains:f,filteredDomains:h,...m},{payload:y})=>({...m,domains:f.map(K5(y.domain,y.status)),filteredDomains:h.map(K5(y.domain,y.status))})),c.addCase(o,(f,{payload:h})=>({...f,filteredDomains:f.domains.filter(({domain:m})=>m.toLowerCase().match(h.toLowerCase()))})),c.addCase(t.fulfilled,(f,{payload:h})=>({...f,domains:f.domains.map(W5(h)),filteredDomains:f.filteredDomains.map(W5(h))})),c.addCase(n.fulfilled,(f,{payload:h})=>{h.domain===null||f.domains.some(m=>m.domain===h.domain)||f.domains.push({domain:h.domain,status:"validating",isDefault:!1,redirects:{baseUrlRedirect:null,regular404Redirect:null,invalidShortUrlRedirect:null}})})}});return{reducer:l,listDomains:r,checkDomainHealth:i,filterDomains:o}},Lye=(e,t)=>{e.serviceFactory("ManageDomains",()=>Oye),e.decorator("ManageDomains",t(["domainsList"],["filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",Pye,"apiClientFactory","editDomainRedirects","createShortUrl"),e.serviceFactory("domainsListReducer",n=>n.reducer,"domainsListReducerCreator"),e.serviceFactory("listDomains",n=>n.listDomains,"domainsListReducerCreator"),e.serviceFactory("filterDomains",n=>n.filterDomains,"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",Mye,"apiClientFactory"),e.serviceFactory("checkDomainHealth",n=>n.checkDomainHealth,"domainsListReducerCreator")},Z5="shlink/mercure",Nye={loading:!0,error:!1},Rye=e=>{const t=or(`${Z5}/loadMercureInfo`,r=>{if(r&&r.realTimeUpdates&&!r.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:n}=jt({name:Z5,initialState:Nye,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}},Dye=e=>{e.serviceFactory("mercureInfoReducerCreator",Rye,"apiClientFactory"),e.serviceFactory("mercureInfoReducer",t=>t.reducer,"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",t=>t.loadMercureInfo,"mercureInfoReducerCreator")};function An(e){return _.useMemo(()=>e,[e])}function Tn(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}const kye=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:l,error:c}=e;if(l||c||!i)return;const f=({data:y})=>n(JSON.parse(y)),h=({status:y})=>y===401&&r(),m=t.map(y=>{const x=new URL(i);x.searchParams.append("topic",y);const b=new MQ.EventSourcePolyfill(x,{headers:{Authorization:`Bearer ${o}`}});return b.onmessage=f,b.onerror=h,b});return()=>m.forEach(y=>y.close())};function Na(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:l}=r,c=Cf();return _.useEffect(()=>{const{interval:f}=l,h=b=>f?n.add(b):i([b]),m=t(c),y=kye(l,m,h,o);if(!f)return y;const x=setInterval(()=>{i([...n]),n.clear()},f*1e3*60);return()=>{clearInterval(x),y?.()}},[i,o,l,c]),g.jsx(e,{...r})}}class ia{static visits="https://shlink.io/new-visit";static orphanVisits="https://shlink.io/new-orphan-visit";static shortUrlVisits=t=>`https://shlink.io/new-visit/${t}`}const Ff=un("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),wh=(e,t,n)=>n==null?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,Iye=(e,t)=>!e.domain&&t===cl?!0:e.domain===t,zye=e=>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}:{longUrl:""},Y7=e=>e.replaceAll("/","__"),p3=e=>e.replaceAll("__","/"),g3=({domain:e,shortCode:t})=>`${e??cl}__${Y7(t)}`,W7=e=>{const[t,n]=e.split(/__(.+)/);if(!n)throw new Error(`It was not possible to parse domain and short code from "${e}"`);return{domain:t===cl?null:t,shortCode:p3(n)}},v3="shlink/shortUrlDeletion",X5={shortCode:"",loading:!1,deleted:!1,error:!1},Uye=e=>or(`${v3}/deleteShortUrl`,async({shortCode:t,domain:n})=>(await e().deleteShortUrl({shortCode:t,domain:n}),{shortCode:t,domain:n})),K7=un(`${v3}/shortUrlDeleted`),Bye=e=>{const{actions:t,reducer:n}=jt({name:v3,initialState:X5,reducers:{resetDeleteShortUrl:()=>X5},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:l})=>({...o,errorData:zi(l),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:l})=>({...o,shortCode:l.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},Z7="shlink/shortUrlsList",X7=5,Fye={loading:!0,error:!1},$ye=e=>or(`${Z7}/listShortUrls`,t=>e().listShortUrls(t??{})),Vye=(e,t,n)=>jt({name:Z7,initialState:Fye,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,(i,{payload:o})=>{i.shortUrls&&(i.shortUrls.data=[o,...i.shortUrls.data.slice(0,X7-1)],i.shortUrls.pagination.totalItems+=1)}),r.addCase(t.fulfilled,(i,{payload:o})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.map(l=>{const{shortCode:c,domain:f}=o;return wh(l,c,f)?o:l}))}),r.addCase(K7,(i,{payload:o})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.filter(l=>!wh(l,o.shortCode,o.domain)),i.shortUrls.pagination.totalItems-=1)}),r.addCase(Ff,(i,{payload:o})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.map(l=>o.createdVisits.findLast(({shortUrl:c})=>c&&wh(l,c.shortCode,c.domain))?.shortUrl??l))})}}),nw=({children:e,title:t,link:n,tooltip:r})=>{const{anchor:i,tooltip:o}=as({placement:"bottom"});return g.jsxs(g.Fragment,{children:[g.jsx(Ir,{to:n,className:"no-underline text-inherit",...i,children:g.jsxs(Nt,{className:Oe("text-center border-t-3 border-t-lm-main dark:border-t-dm-main relative"),children:[g.jsx(Be,{icon:jK,size:"3x",className:"absolute right-[5px] bottom-[5px] opacity-10 -rotate-45"}),g.jsx("div",{role:"heading","aria-level":5,className:"text-xl uppercase text-placeholder font-bold mb-2",children:t}),g.jsx("div",{className:"text-4xl font-semibold",children:e})]})}),r&&g.jsx(os,{...o,children:r})]})},Q5=({loading:e,excludeBots:t,visitsSummary:n,...r})=>g.jsx(nw,{tooltip:n.bots!==void 0?g.jsxs(g.Fragment,{children:[t?"Plus":"Including"," ",g.jsx("b",{"data-testid":"tooltip-amount",children:Sn(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":Sn(t&&n.nonBots!==void 0?n.nonBots:n.total)}),J5=({children:e,titleLinkText:t,titleLink:n,title:r})=>g.jsxs(ln,{className:"card",children:[g.jsxs(ln.Header,{className:"flex justify-between items-center",children:[g.jsx("span",{className:"sm:hidden",children:r}),g.jsx("h5",{className:"hidden sm:inline",children:r}),g.jsxs(Ir,{to:n,children:[t," »"]})]}),g.jsx(ln.Body,{children:e})]}),Q7=Na(({shortUrlsList:e,listShortUrls:t,tagsList:n,loadVisitsOverview:r,visitsOverview:i})=>{const{ShortUrlsTable:o,CreateShortUrl:l}=An(Q7),{loading:c,shortUrls:f}=e,{loading:h}=n,{loading:m,nonOrphanVisits:y,orphanVisits:x}=i,b=ms(),C=uo(),w=Fn("visits");return _.useEffect(()=>{t({itemsPerPage:X7,orderBy:{field:"dateCreated",dir:"DESC"}}),r()},[t,r]),g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-4 gap-4",children:[g.jsx(Q5,{title:"Visits",link:`${b}/non-orphan-visits`,excludeBots:w?.excludeBots??!1,loading:m,visitsSummary:y}),g.jsx(Q5,{title:"Orphan visits",link:`${b}/orphan-visits`,excludeBots:w?.excludeBots??!1,loading:m,visitsSummary:x}),g.jsx(nw,{title:"Short URLs",link:`${b}/list-short-urls/1`,children:c?"Loading...":Sn(f?.pagination.totalItems??0)}),g.jsx(nw,{title:"Tags",link:`${b}/manage-tags`,children:h?"Loading...":Sn(n.tags.length)})]}),g.jsx(J5,{title:"Create a short URL",titleLinkText:"Advanced options",titleLink:`${b}/create-short-url`,children:g.jsx(l,{basicMode:!0})}),g.jsx(J5,{title:"Recently created URLs",titleLinkText:"See all",titleLink:`${b}/list-short-urls/1`,children:g.jsx(o,{shortUrlsList:e,onTagClick:A=>C(`${b}/list-short-urls/1?tags=${encodeURIComponent(A)}`)})})]})},()=>[ia.visits,ia.orphanVisits]),Hye=Tn(Q7,["ShortUrlsTable","CreateShortUrl"]);function qye(e,t){e.factory("Overview",Hye),e.decorator("Overview",t(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const J7="shlink/setShortUrlRedirectRules",eL={saving:!1,saved:!1,error:!1},Gye=e=>or(`${J7}/setShortUrlRedirectRules`,({shortUrl:t,data:n})=>{const{shortCode:r,domain:i}=t;return e().setShortUrlRedirectRules({shortCode:r,domain:i},n)}),Yye=e=>{const{reducer:t,actions:n}=jt({name:J7,initialState:eL,reducers:{resetSetRules:()=>eL},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:l})=>({saving:!1,saved:!1,error:!0,errorData:zi(l)})),i.addCase(e.fulfilled,()=>({saving:!1,error:!1,saved:!0}))}}),{resetSetRules:r}=n;return{reducer:t,resetSetRules:r}},e9="shlink/getShortUrlRedirectRules",Wye={loading:!0,error:!1},Kye=e=>or(`${e9}/getShortUrlRedirectRules`,({shortCode:t,domain:n})=>e().getShortUrlRedirectRules({shortCode:t,domain:n})),Zye=e=>jt({name:e9,initialState:Wye,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({loading:!0,error:!1})),t.addCase(e.rejected,()=>({loading:!1,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({loading:!1,error:!1,...r}))}});function Yr(e){e.preventDefault()}function Nl(e){e.stopPropagation()}function t9(){const e=new Map;return[function(t,n){e.get(t)&&e.get(t).forEach(r=>{r(n)})},function(t,n){const r=e.get(t)??[];r.push(n),e.set(t,r)}]}var[n9,r9]=t9();function Xye(e,t){return e.source===t.source&&e.flags.split("").sort().join("")===t.flags.split("").sort().join("")}function Hh(e,t,n=!0,r=["__key"]){if(e===t)return!0;if(typeof t=="object"&&typeof e=="object"&&e!==null&&t!==null){if(e instanceof Map||e instanceof Set)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return Xye(e,t);if(e===null||t===null)return!1;const i=e,o=t;if(Object.keys(i).length!==Object.keys(o).length)return!1;for(const l of r)if((l in i||l in o)&&i[l]!==o[l])return!1;for(const l in i)if(!(l in o)||i[l]!==o[l]&&!n||n&&!Hh(i[l],o[l],n,r))return!1;return!0}return!1}function i9(e){return e.split(" ").filter(t=>t)}function $f(e){return{x:e.clientX,y:e.clientY}}Array();var y3=typeof window<"u",Dr=new WeakMap,lo=new WeakMap;function a9(){if(!y3)return!1;if("userAgentData"in navigator)return navigator.userAgentData.mobile===!0;const e=navigator.userAgent,t=/android|iphone|ipod/i.test(e),n=/iPad/.test(e)||e.includes("Macintosh")&&navigator.maxTouchPoints>1;return t||n}var Qye={affectedNodes:[],coordinates:{x:0,y:0},currentTargetValue:void 0,on:r9,emit:n9,originalZIndex:void 0,pointerSelection:!1,preventEnter:!1,rootUserSelect:void 0,nodePointerdown:void 0,longPress:!1,scrolling:!1,longPressTimeout:void 0,remapJustFinished:!1,selectedNodes:[],selectedParent:void 0,preventSynthDrag:!1,pointerDown:void 0,lastScrollContainerX:null,lastScrollContainerY:null,rootScrollWidth:void 0,rootScrollHeight:void 0,dragItemRect:void 0,windowScrollX:void 0,windowScrollY:void 0,lastScrollDirectionX:void 0,lastScrollDirectionY:void 0,scrollDebounceTimeout:void 0,frameIdX:void 0,frameIdY:void 0},Ie=Qye,El=!1,tL,S2;function Jye(){Ie.scrollDebounceTimeout&&clearTimeout(Ie.scrollDebounceTimeout),Ie.longPressTimeout&&clearTimeout(Ie.longPressTimeout),Ie.frameIdX!==void 0&&cancelAnimationFrame(Ie.frameIdX),Ie.frameIdY!==void 0&&cancelAnimationFrame(Ie.frameIdY),Ie={affectedNodes:[],coordinates:{x:0,y:0},on:r9,emit:n9,currentTargetValue:void 0,originalZIndex:void 0,pointerId:void 0,preventEnter:!1,remapJustFinished:!1,selectedNodes:[],nodePointerdown:void 0,rootUserSelect:void 0,preventSynthDrag:!1,scrolling:!1,selectedParent:void 0,pointerSelection:!1,synthScrollDirection:void 0,draggedNodeDisplay:void 0,synthDragScrolling:!1,longPress:!1,pointerDown:void 0,longPressTimeout:void 0,lastScrollContainerX:null,lastScrollContainerY:null,rootScrollWidth:void 0,rootScrollHeight:void 0,dragItemRect:void 0,windowScrollX:void 0,windowScrollY:void 0,lastScrollDirectionX:void 0,lastScrollDirectionY:void 0,scrollDebounceTimeout:void 0,frameIdX:void 0,frameIdY:void 0}}function o9(e){return Object.assign(Ie,e),e.initialParent.data.emit("dragStarted",Ie),El=!1,Ie.emit("dragStarted",Ie),Ie}function e0e(){Ie.activeState&&Yu(Ie.activeState.parent,void 0,Ie),Ie.selectedState&&Lu(Ie.selectedState.nodes,Ie.selectedState.parent,Ie),Ie.selectedState=Ie.activeState=void 0}function t0e(){if(Ie.pointerDown&&(Ie.pointerDown.node.el.draggable=!0),Ie.pointerDown=void 0,!ki(Ie))return;const e=Ie.currentParent.data.config;ki(Ie)&&e.handleEnd(Ie)}function n0e(e){e.key==="Escape"&&(Ie.selectedState&&Lu(Ie.selectedState.nodes,Ie.selectedState.parent,Ie),Ie.activeState&&Yu(Ie.activeState.parent,void 0,Ie),Ie.selectedState=Ie.activeState=void 0)}function r0e(e){if(!Wr(Ie))return;El=!0;const t=Ie.initialParent.data.config.handleEnd;t(Ie)}function i0e(e){if(!Wr(Ie))return;Yr(e);const{x:t,y:n}=$f(e);Wr(Ie)&&g0({x:t,y:n},e,Ie)}function a0e(e){if(!Ie.pointerDown||!Ie.pointerDown.validated)return;const t=Ie.pointerDown.parent.data.config;if(!(e.pointerType==="mouse"&&!a9()))if(ki(Ie))ki(Ie)&&nL(e,Ie);else{if(Yr(e),t.longPress&&!Ie.longPress){clearTimeout(Ie.longPressTimeout),Ie.longPress=!1;return}const n=t.draggedNodes(Ie.pointerDown);t.dragstartClasses(Ie.pointerDown.node,n,t,!0);const r=Ie.pointerDown.node.el.getBoundingClientRect(),i=R0e(Ie.pointerDown.node,Ie.pointerDown.parent,e,Ie,n,r);nL(e,i,!0)}}function o0e({parent:e,getValues:t,setValues:n,config:r={}}){if(!y3)return;tL||(tL=Xv(document,{dragover:i0e,pointerdown:e0e,pointerup:t0e,keydown:n0e,drop:r0e,pointermove:a0e,pointercancel:Si(r.handlePointercancel),touchmove:c=>{Wr(Ie)&&c.cancelable&&Yr(c)},contextmenu:c=>{ki(Ie)&&Yr(c)}})),l9(e);const[i,o]=t9(),l={getValues:t,setValues:n,config:{dragDropEffect:r.dragDropEffect??"move",dragEffectAllowed:r.dragEffectAllowed??"move",draggedNodes:b0e,dragstartClasses:S0e,handleNodeKeydown:E0e,handleDragstart:_0e,handleNodeDragover:k0e,handleParentDragover:I0e,handleNodeDrop:T0e,handleNodeFocus:O0e,handleNodeBlur:j0e,handlePointercancel:P0e,handleEnd:L0e,handleDragend:M0e,handleParentFocus:l0e,handleNodePointerup:N0e,handleNodePointerover:A0e,handleParentPointerover:z0e,handleParentScroll:x0e,handleNodePointerdown:w0e,handleNodeDragenter:B0e,handleNodeDragleave:F0e,handleParentDrop:c0e,multiDrag:r.multiDrag??!1,nativeDrag:r.nativeDrag??!0,performSort:s0e,performTransfer:u0e,root:r.root??document,setupNode:d0e,setupNodeRemap:u9,reapplyDragClasses:h0e,tearDownNode:p0e,tearDownNodeRemap:m0e,remapFinished:v0e,threshold:{horizontal:0,vertical:0},...r},enabledNodes:[],abortControllers:{},privateClasses:[],on:o,emit:i};new MutationObserver(g0e).observe(e,{childList:!0}),Dr.set(e,l),r.plugins?.forEach(c=>{c(e)?.tearDown?.()}),r.plugins?.forEach(c=>{c(e)?.tearDown?.()}),r.plugins?.forEach(c=>{c(e)?.setup?.()}),f0e(e,l),m0(e,!0)}function s9(e,t,n,r,i,o){const{x:l,y:c}=$f(n),f=e.el.getBoundingClientRect();return{affectedNodes:[],ascendingDirection:!1,clonedDraggedEls:[],coordinates:{x:l,y:c},draggedNode:{el:e.el,data:e.data},draggedNodes:r,incomingDirection:void 0,initialIndex:e.data.index,initialParent:{el:t.el,data:t.data},currentParent:{el:t.el,data:t.data},longPress:t.data.config.longPress??!1,longPressTimeout:void 0,currentTargetValue:e.data.value,scrollEls:[],startLeft:i||l-(f?.left??0),startTop:o||c-(f?.top??0),targetIndex:e.data.index,transferred:!1}}function s0e({parent:e,draggedNodes:t,targetNodes:n}){m0(e.el);const r=t.map(f=>f.data.value),i=bf(e.el,e.data),o=t[0].data.index,l=[...e.data.enabledNodes],c=[...i.filter(f=>!r.some(h=>Hh(f,h)))];c.splice(n[0].data.index,0,...r),"draggedNode"in Ie&&(Ie.currentTargetValue=n[0].data.value),rw(e.el,e.data,[...c]),e.data.config.onSort&&e.data.config.onSort({parent:{el:e.el,data:e.data},previousValues:[...i],previousNodes:[...l],nodes:[...e.data.enabledNodes],values:[...c],draggedNodes:t,previousPosition:o,position:n[0].data.index,targetNodes:n,state:Ie})}function Yu(e,t,n){if(!t){n.activeState=void 0;return}n.activeState={node:t,parent:e}}function Lu(e,t,n){const r=t.data.config.selectedClass;if(!n.selectedState)return;const i=Array.from(e);fl(e.map(o=>o.el),r);for(const o of i){o.el.setAttribute("aria-selected","false");const l=n.selectedState.nodes.findIndex(c=>c.el===o.el);l!==-1&&n.selectedState.nodes.splice(l,1)}}function xg(e,t,n,r,i=!1){r.pointerSelection=i;for(const o of t)o.el.setAttribute("aria-selected","true"),sf([o.el],e.data.config.selectedClass,!0);r.selectedState={nodes:t,parent:e},Yu(e,n,r)}function l0e(e,t){const n=e.targetData.parent.data.enabledNodes[0];n&&(t.selectedState&&t.selectedState.parent.el!==e.targetData.parent.el?Yu(e.targetData.parent,n,t):t.selectedState||Yu(e.targetData.parent,n,t))}function u0e({currentParent:e,targetParent:t,initialParent:n,draggedNodes:r,initialIndex:i,targetNodes:o,state:l}){m0(n.el);const c=r.map(x=>x.data.value),f=[...bf(e.el,e.data).filter(x=>!c.some(b=>Hh(x,b)))],h=bf(t.el,t.data),m=n.el===t.el&&t.data.config.sortable===!1;let y;o.length?(m?y=i:t.data.config.sortable===!1?y=t.data.enabledNodes.length:y=o[0].data.index,h.splice(y,0,...c)):(y=m?i:t.data.enabledNodes.length,h.splice(y,0,...c)),rw(e.el,e.data,f),rw(t.el,t.data,h),t.data.config.onTransfer&&t.data.config.onTransfer({sourceParent:e,targetParent:t,initialParent:n,draggedNodes:r,targetIndex:y,state:l,targetNodes:o}),e.data.config.onTransfer&&e.data.config.onTransfer({sourceParent:e,targetParent:t,initialParent:n,draggedNodes:r,targetIndex:y,state:l,targetNodes:o||[]})}function bf(e,t){return[...t.getValues(e)]}function rw(e,t,n){t.setValues(n,e)}function c0e(e,t){Nl(e.e),El=!0;const n=t.initialParent.data.config.handleEnd;n(t)}function l9(e){const t=Dr.get(e);t&&t.abortControllers.mainParent&&t.abortControllers.mainParent.abort()}function Wr(e){return"draggedNode"in e&&!!e.draggedNode}function ki(e){return"synthDragging"in e&&!!e.synthDragging}function f0e(e,t){t.abortControllers.mainParent=Xv(e,{dragover:_g(t.config.handleParentDragover),handleParentPointerover:t.config.handleParentPointerover,scroll:_g(t.config.handleParentScroll),drop:_g(t.config.handleParentDrop),hasNestedParent:n=>{const r=Dr.get(n.target);r&&(r.nestedParent=n.detail.parent)},focus:_g(t.config.handleParentFocus)}),t.config.externalDragHandle&&t.config.externalDragHandle.el&&t.config.externalDragHandle.callback&&(t.abortControllers.externalDragHandle=Xv(t.config.externalDragHandle.el,{pointerdown:n=>{if(!t.config.externalDragHandle||!t.config.externalDragHandle.callback)return;const r=t.config.externalDragHandle.callback();if(!v0(r)){console.warn("No draggable item found from external drag handle callback");return}const i=lo.get(r);if(!i)return;const o=r.parentNode;if(!(o instanceof HTMLElement))return;const l=Dr.get(o);l&&(Ie.pointerDown={parent:{el:o,data:l},node:{el:r,data:i},validated:!0},r.draggable=!0)}}))}function d0e(e){const t=e.parent.data.config;e.node.data.abortControllers.mainNode=Xv(e.node.el,{keydown:Si(t.handleNodeKeydown),dragstart:Si(t.handleDragstart),dragover:Si(t.handleNodeDragover),dragenter:Si(t.handleNodeDragenter),dragleave:Si(t.handleNodeDragleave),dragend:Si(t.handleDragend),drop:Si(t.handleNodeDrop),focus:Si(t.handleNodeFocus),blur:Si(t.handleNodeBlur),pointerup:Si(t.handleNodePointerup),pointercancel:Si(t.handlePointercancel),pointerdown:Si(t.handleNodePointerdown),handleNodePointerover:t.handleNodePointerover,touchmove:n=>{Wr(Ie)&&n.cancelable&&Yr(n)},contextmenu:n=>{ki(Ie)&&Yr(n)}}),e.node.el.draggable=!0,t.reapplyDragClasses(e.node.el,e.parent.data),e.parent.data.config.plugins?.forEach(n=>{n(e.parent.el)?.setupNode?.(e)})}function u9(e){lo.set(e.node.el,e.node.data),e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.setupNodeRemap?.(e)})}function h0e(e,t){if(!Wr(Ie))return;const n=ki(Ie)?t.config.synthDropZoneClass:t.config.dropZoneClass;Ie.draggedNode.el===e&&sf([e],n,!0)}function m0e(e){e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.tearDownNodeRemap?.(e)})}function p0e(e){e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.tearDownNode?.(e)}),e.node.el.draggable=!1,e.node.data?.abortControllers?.mainNode&&e.node.data?.abortControllers?.mainNode.abort()}function g0e(e){if(e.length===1&&e[0].addedNodes.length===1&&!(e[0].addedNodes[0]instanceof HTMLElement))return;const t=e[0].target;!(t instanceof HTMLElement)||!Dr.get(t)||m0(t)}function m0(e,t){const n=Dr.get(e);if(!n)return;n.privateClasses=Array.from(e.classList);const r=[],i=n.config;for(let c=0;c<e.children.length;c++){const f=e.children[c];if(!v0(f)||f.id==="dnd-dragged-node-clone")continue;const h=lo.get(f);(t||!h)&&i.tearDownNode({parent:{el:e,data:n},node:{el:f,data:h}}),!i.disabled&&(!i.draggable||i.draggable&&i.draggable(f))&&r.push(f)}if(r.length!==n.getValues(e).length&&!i.disabled){console.warn("The number of draggable items defined in the parent element does not match the number of values. This may cause unexpected behavior.");return}const o=n.getValues(e),l=[];for(let c=0;c<r.length;c++){const f=r[c],h=lo.get(f);if(i.draggableValue&&!i.draggableValue(o[c]))continue;const m=Object.assign(h??{privateClasses:[],abortControllers:{}},{value:o[c],index:c});if(!Wr(Ie)&&Ie.activeState&&Hh(Ie.activeState.node.data.value,m.value)&&Yu({data:n,el:e},{el:f,data:m},Ie),Wr(Ie)&&Hh(Ie.draggedNode.data.value,m.value)){Ie.draggedNode.data=m,Ie.draggedNode.el=f;const y=Ie.draggedNodes.find(x=>x.data.value===m.value);y&&(y.el=f)}l.push({el:f,data:m}),(t||!h)&&i.setupNode({parent:{el:e,data:n},node:{el:f,data:m}}),u9({parent:{el:e,data:n},node:{el:f,data:m}})}Dr.set(e,{...n,enabledNodes:l}),i.remapFinished(n),n.config.plugins?.forEach(c=>{c(e)?.remapFinished?.()})}function v0e(){Ie.remapJustFinished=!0,"draggedNode"in Ie&&(Ie.affectedNodes=[])}function y0e(e){return!!e.targetData.parent.data.config.nativeDrag}function b0e(e){if(e.parent.data.config.multiDrag){if(Ie.selectedState)return[e.node,...Ie.selectedState?.nodes.filter(t=>t.el!==e.node.el)]}else return[e.node];return[]}function x0e(e){Wr(Ie)&&(Ie.emit("scrollStarted",Ie),!ki(Ie)&&(Ie.preventEnter=!0,S2&&clearTimeout(S2),S2=setTimeout(()=>{Ie.preventEnter=!1,Ie.emit("scrollEnded",Ie)},100)))}function _0e(e,t){const n=e.targetData.parent.data.config;if(!n.nativeDrag||!y0e(e)||!c9({x:e.e.clientX,y:e.e.clientY,node:e.targetData.node,config:n})){Yr(e.e);return}let r=n.draggedNodes({parent:e.targetData.parent,node:e.targetData.node});r.length===0&&(r=[e.targetData.node]),n.dragstartClasses(e.targetData.node,r,n);const i=C0e(e,r);if(n.onDragstart){const o={parent:e.targetData.parent,values:bf(e.targetData.parent.el,e.targetData.parent.data),draggedNode:i.draggedNode,draggedNodes:i.draggedNodes,position:i.initialIndex,state:i};n.onDragstart(o)}}function w0e(e,t){if(Nl(e.e),t.pointerDown={parent:e.targetData.parent,node:e.targetData.node,validated:!1},!c9({x:e.e.clientX,y:e.e.clientY,node:e.targetData.node,config:e.targetData.parent.data.config}))return;t.pointerDown.validated=!0,D0e(e,t,e.targetData.node);const n=e.targetData.parent.data;let r=[e.targetData.node];const i=e.e.ctrlKey||e.e.metaKey,o=e.e.shiftKey,l=e.targetData.node;if(i&&n.config.multiDrag){t.selectedState?t.selectedState.nodes.findIndex(c=>c.el===l.el)===-1?r=[...t.selectedState.nodes,l]:r=t.selectedState.nodes.filter(c=>c.el!==l.el):r=[l],xg(e.targetData.parent,r,e.targetData.node,t,!0);return}if(o&&n.config.multiDrag){const c=e.targetData.parent.data.enabledNodes;if(t.selectedState&&t.activeState)if(t.selectedState.parent.el!==e.targetData.parent.el){Lu(t.selectedState.nodes,t.selectedState.parent,t),t.selectedState=void 0;for(let f=0;f<=l.data.index;f++)r.push(c[f])}else{const[f,h]=t.activeState.node.data.index<e.targetData.node.data.index?[t.activeState.node.data.index,e.targetData.node.data.index]:[e.targetData.node.data.index,t.activeState.node.data.index];r=c.slice(f,h+1)}else for(let f=0;f<=l.data.index;f++)r.push(c[f]);xg(e.targetData.parent,r,e.targetData.node,t,!0);return}t.selectedState?.nodes?.length?t.selectedState.nodes.findIndex(c=>c.el===e.targetData.node.el)===-1&&(t.selectedState.parent.el!==e.targetData.parent.el?Lu(t.selectedState.nodes,e.targetData.parent,t):n.config.multiDrag&&a9()?r.push(...t.selectedState.nodes):Lu(t.selectedState.nodes,e.targetData.parent,t),xg(e.targetData.parent,r,e.targetData.node,t,!0)):xg(e.targetData.parent,[e.targetData.node],e.targetData.node,t,!0)}function S0e(e,t,n,r=!1){sf(t.map(i=>i.el),r?n.synthDraggingClass:n.draggingClass),setTimeout(()=>{fl(t.map(i=>i.el),r?n.synthDraggingClass:n.draggingClass),sf(t.map(i=>i.el),r?n.synthDragPlaceholderClass:n.dragPlaceholderClass),sf(t.map(i=>i.el),r?n.synthDropZoneClass:n.dropZoneClass),fl(t.map(i=>i.el),n.selectedClass)})}function C0e(e,t){Nl(e.e);const n=o9(s9(e.targetData.node,e.targetData.parent,e.e,t));if(e.e.dataTransfer){const r=e.targetData.parent.data.config;e.e.dataTransfer.dropEffect=r.dragDropEffect,e.e.dataTransfer.effectAllowed=r.dragEffectAllowed;let i;if(e.e.dataTransfer.setData("text/plain",""),r.dragImage)i=r.dragImage(e,t);else{if(!r.multiDrag||t.length===1)return e.targetData.node.el.style.zIndex="9999",e.targetData.node.el.style.boxSizing="border-box",e.e.dataTransfer.setDragImage(e.targetData.node.el,e.e.offsetX,e.e.offsetY),n.originalZIndex=e.targetData.node.el.style.zIndex,n;{const o=document.createElement("div");o.setAttribute("id","dnd-dragged-node-clone"),o.setAttribute("popover","manual");for(const c of t){const f=c.el.cloneNode(!0);f.id=c.el.id+"-clone",f.style.pointerEvents="none",o.appendChild(f)}const{width:l}=t[0].el.getBoundingClientRect();Object.assign(o.style,{display:"flex",flexDirection:"column",width:`${l}px`,position:"absolute",pointerEvents:"none",zIndex:"9999",left:"-9999px",boxSizing:"border-box",background:"transparent",overflow:"hidden"}),e.targetData.parent.el.appendChild(o),o.showPopover(),o.getBoundingClientRect(),i=o,e.e.dataTransfer.setDragImage(i,e.e.offsetX,e.e.offsetY)}}setTimeout(()=>{i?.remove()})}return n}function c9({x:e,y:t,node:n,config:r}){if(r.externalDragHandle)return!1;if(!r.dragHandle)return!0;const i=n.el.querySelectorAll(r.dragHandle);if(!i)return!1;const o=r.root.elementFromPoint(e,t);if(!o)return!1;for(const l of Array.from(i))if(o===l||l.contains(o))return!0;return!1}function E0e(e){}function A0e(e){e.detail.targetData.parent.el===e.detail.state.currentParent.el?d9(e.detail,e.detail.state):p0(e.detail,e.detail.state)}function T0e(e,t){const n=e.targetData.parent.data.config;n.nativeDrag&&(Nl(e.e),El=!0,n.handleEnd(t))}function O0e(e){e.e.target!==e.e.currentTarget&&Ie.pointerDown&&(Ie.pointerDown.node.el.draggable=!1)}function j0e(e){e.e.target!==e.e.currentTarget&&Ie.pointerDown&&(Ie.pointerDown.node.el.draggable=!0)}function M0e(e,t){const n=e.targetData.parent.data.config;if(n.nativeDrag){if(Yr(e.e),Nl(e.e),El){El=!1;return}n.handleEnd(t)}}function P0e(e,t){if(!ki(t))return;if(Yr(e.e),El){El=!1;return}const n=Dr.get(t.initialParent.el)?.config;n?.onDragend&&n.onDragend({parent:t.currentParent,values:bf(t.currentParent.el,t.currentParent.data),draggedNode:t.draggedNode,draggedNodes:t.draggedNodes,state:t}),n?.handleEnd(t)}function L0e(e){e.draggedNode&&(e.draggedNode.el.draggable=!0);const t=e.draggedNodes.map(m=>m.el),n=e.initialParent.data,r=ki(e),i=Dr.get(e.initialParent.el)?.config,o=r?i?.synthDropZoneClass:i?.dropZoneClass,l=n?.config?.longPressClass,c=r?n?.config?.synthDragPlaceholderClass:n?.config?.dragPlaceholderClass,f=e.originalZIndex;ki(e)&&(e.clonedDraggedNode&&e.clonedDraggedNode.remove(),e.longPressTimeout&&clearTimeout(e.longPressTimeout)),iw(e),e.lastScrollDirectionX=void 0,e.lastScrollDirectionY=void 0,e.preventEnter=!1,e.scrollDebounceTimeout&&(clearTimeout(e.scrollDebounceTimeout),e.scrollDebounceTimeout=void 0),f!==void 0&&e.draggedNode&&(e.draggedNode.el.style.zIndex=f),requestAnimationFrame(()=>{fl(t,o),fl(t,l),fl(t,c)}),Lu(e.draggedNodes,e.currentParent,e),Yu(e.currentParent,void 0,e);const h={...e};i?.onDragend?.({parent:h.currentParent,values:bf(h.currentParent.el,h.currentParent.data),draggedNode:h.draggedNode,draggedNodes:h.draggedNodes,state:h}),e.emit("dragEnded",h),Jye()}function N0e(e,t){Nl(e.e),!t.pointerSelection&&t.selectedState&&Lu(t.selectedState.nodes,e.targetData.parent,t);const n=e.targetData.parent.data.config;t.pointerSelection=!1,"longPressTimeout"in t&&t.longPressTimeout&&clearTimeout(t.longPressTimeout),t.longPress=!1,fl(e.targetData.parent.data.enabledNodes.map(r=>r.el),n.longPressClass),Wr(t)&&n.handleEnd(t)}function R0e(e,t,n,r,i,o){const l=t.data.config;let c,f;const h=["display","flexDirection","alignItems","justifyContent","padding","paddingTop","margin","marginTop","marginBottom","marginLeft","marginRight","paddingBottom","paddingLeft","paddingRight","border","borderRadius","background","backgroundColor","boxShadow","font","color","lineHeight","gap","width","height","boxSizing","overflow"],m=(b,C)=>{const w=window.getComputedStyle(b);h.forEach(A=>{C.style[A]=w[A]})},y=(b,C={})=>{Object.assign(b.style,{position:"absolute",zIndex:"9999",pointerEvents:"none",willChange:"transform",boxSizing:"border-box",opacity:"0",overflow:"hidden",width:`${o.width}px`,height:`${o.height}px`,...C})};if(l.synthDragImage)f=l.synthDragImage(e,t,n,i),c=f.dragImage,c.setAttribute("popover","manual"),y(c);else if(!l.multiDrag||i.length===1)c=e.el.cloneNode(!0),m(e.el,c),c.setAttribute("popover","manual"),y(c);else{const b=document.createElement("div");b.setAttribute("popover","manual"),i.forEach(C=>{const w=C.el.cloneNode(!0);m(C.el,w),w.style.pointerEvents="none",w.style.margin="0",b.append(w)}),b.style.display="flex",b.style.flexDirection="column",b.style.padding="0",b.style.margin="0",b.style.position="absolute",b.style.zIndex="9999",b.style.pointerEvents="none",c=b}c.id="dnd-dragged-node-clone",t.el.appendChild(c),c.showPopover();const x={clonedDraggedEls:[],clonedDraggedNode:c,synthDragScrolling:!1,synthDragging:!0,rootScrollWidth:document.scrollingElement?.scrollWidth,rootScrollHeight:document.scrollingElement?.scrollHeight};return o9({...s9(e,t,n,i,f?.offsetX,f?.offsetY),...x})}function D0e(e,t,n){const r=e.targetData.parent.data.config;t.longPressTimeout=setTimeout(()=>{t&&(t.longPress=!0,r.longPressClass&&e.e.cancelable&&sf([n.el],r.longPressClass),Yr(e.e))},r.longPressDuration||1e3)}function iw(e,t=!0,n=!0){t&&(e.frameIdX!==void 0&&(cancelAnimationFrame(e.frameIdX),e.frameIdX=void 0),e.lastScrollDirectionX=void 0),n&&(e.frameIdY!==void 0&&(cancelAnimationFrame(e.frameIdY),e.frameIdY=void 0),e.lastScrollDirectionY=void 0),!e.frameIdX&&!e.frameIdY&&(e.preventEnter=!1)}function f9(e,t=!1){const{x:n,y:r}=e.coordinates,i=e.startLeft??0,o=e.startTop??0,l=window.scrollX??0,c=window.scrollY??0,f=n-i+l,h=r-o+c;e.clonedDraggedNode.style.transform=`translate3d(${f}px, ${h}px, 0px)`,t&&(e.clonedDraggedNode.style.opacity="1",fl(e.draggedNodes.map(m=>m.el),e.initialParent.data.config?.longPressClass))}function nL(e,t,n=!1){const r=$f(e);t.coordinates.x=r.x,t.coordinates.y=r.y,f9(t,n),t.scrollDebounceTimeout&&(clearTimeout(t.scrollDebounceTimeout),t.scrollDebounceTimeout=void 0),t.scrollDebounceTimeout=setTimeout(()=>{ki(t)&&g0(t.coordinates,e,t)},16);const i=q0e(r);if(!i){document.dispatchEvent(new CustomEvent("handleRootPointerover",{detail:{e,state:t}}));return}const o={e,targetData:i,state:t};"node"in i?i.node.el.dispatchEvent(new CustomEvent("handleNodePointerover",{detail:o})):i.parent.el.dispatchEvent(new CustomEvent("handleParentPointerover",{detail:o}))}function k0e(e,t){if(!e.targetData.parent.data.config.nativeDrag)return;const{x:n,y:r}=$f(e.e);t.coordinates.y=r,t.coordinates.x=n,Yr(e.e),Nl(e.e),Wr(t)&&g0({x:n,y:r},e.e,t),e.targetData.parent.el===t.currentParent?.el?d9(e,t):p0(e,t)}function I0e(e,t){if(!e.targetData.parent.data.config.nativeDrag)return;Yr(e.e),Nl(e.e);const{x:n,y:r}=$f(e.e);Wr(t)&&g0({x:n,y:r},e.e,t),p0(e,t)}function z0e(e){e.detail.targetData.parent.el!==e.detail.state.currentParent.el&&p0(e.detail,e.detail.state)}function U0e({currentParent:e,targetParent:t,initialParent:n,draggedNodes:r,state:i}){if(t.el===e.el)return!1;const o=t.data.config;if(r[0].el.contains(t.el)||o.dropZone===!1)return!1;const l=n.data.config;return o.accepts?o.accepts(t,n,e,i):!(!o.group||o.group!==l.group)}function B0e(e,t){Yr(e.e)}function F0e(e,t){Yr(e.e)}function $0e(e,t,n,r){if(t.affectedNodes.map(m=>m.data.value).includes(e.targetData.node.data.value))return!1;if(t.remapJustFinished)return t.remapJustFinished=!1,(e.targetData.node.data.value===t.currentTargetValue||t.draggedNodes.map(m=>m.el).includes(e.targetData.node.el))&&(t.currentTargetValue=e.targetData.node.data.value),!1;if(t.preventEnter)return!1;if(t.draggedNodes.map(m=>m.el).includes(e.targetData.node.el))return t.currentTargetValue=void 0,!1;if(e.targetData.node.data.value===t.currentTargetValue||e.targetData.parent.el!==t.currentParent?.el||e.targetData.parent.data.config.sortable===!1||e.targetData.node.el.contains(t.draggedNodes[0].el))return!1;const i=e.targetData.node.el.getBoundingClientRect(),o=t.draggedNode.el.getBoundingClientRect(),l=i.y-o.y,c=i.x-o.x;let f;Math.abs(l)>Math.abs(c)?f=l>0?"above":"below":f=c>0?"left":"right";const h=t.currentParent.data.config.threshold;switch(f){case"left":if(n>i.x+i.width*h.horizontal)return t.incomingDirection="left",!0;break;case"right":if(n<i.x+i.width*(1-h.horizontal))return t.incomingDirection="right",!0;break;case"above":if(r>i.y+i.height*h.vertical)return t.incomingDirection="above",!0;break;case"below":if(r<i.y+i.height*(1-h.vertical))return t.incomingDirection="below",!0;break}return!1}function d9(e,t){const{x:n,y:r}=$f(e.e);if(!$0e(e,t,n,r))return;const i=t.draggedNode.data.index>e.targetData.node.data.index?[e.targetData.node.data.index,t.draggedNode.data.index]:[t.draggedNode.data.index,e.targetData.node.data.index];t.targetIndex=e.targetData.node.data.index,t.affectedNodes=e.targetData.parent.data.enabledNodes.filter(o=>i[0]<=o.data.index&&o.data.index<=i[1]&&o.el!==t.draggedNode.el),e.targetData.parent.data.config.performSort({parent:e.targetData.parent,draggedNodes:t.draggedNodes,targetNodes:[e.targetData.node]})}function Si(e){function t(n){const r=lo.get(n);if(!r)return;const i=Dr.get(n.parentNode);if(i)return{node:{el:n,data:r},parent:{el:n.parentNode,data:i}}}return n=>{const r=t(n.currentTarget);if(r)return e({e:n,targetData:r},Ie)}}function p0(e,t){Yr(e.e),U0e({currentParent:t.currentParent,targetParent:e.targetData.parent,initialParent:t.initialParent,draggedNodes:t.draggedNodes,state:t})&&(e.targetData.parent.data.config.performTransfer({currentParent:t.currentParent,targetParent:e.targetData.parent,initialParent:t.initialParent,draggedNodes:t.draggedNodes,initialIndex:t.initialIndex,state:t,targetNodes:"node"in e.targetData?[e.targetData.node]:[]}),t.currentParent=e.targetData.parent,t.transferred=!0)}function _g(e){function t(n){const r=Dr.get(n);if(r)return{parent:{el:n,data:r}}}return n=>{const r=t(n.currentTarget);if(r)return e({e:n,targetData:r},Ie)}}function sf(e,t,n=!1){function r(i,o){lo.set(i,o)}for(const i of e){const o=lo.get(i),l=V0e(i,t,o,n);l&&r(i,l)}}function V0e(e,t,n,r=!1){if(!t)return;const i=i9(t);if(!i.length)return;if(!n){e.classList.add(...i);return}const o=[];for(const l of i)e.classList.contains(l)?e.classList.contains(l)&&r===!1&&o.push(l):e.classList.add(l);return n.privateClasses=o,n}function fl(e,t){if(!t)return;const n=i9(t);if(n.length)for(const r of e){if(!v0(r)){r.classList.remove(...n);continue}const i=lo.get(r)||Dr.get(r);if(i)for(const o of n)i.privateClasses.includes(o)||r.classList.remove(o)}}function rL(e,t,n,r,i){const o=i.axis==="x",l=e===document.scrollingElement,c=o?"scrollLeft":"scrollTop",f=o?"clientWidth":"clientHeight",h=o?"offsetWidth":"offsetHeight",m=o?"scrollWidth":"scrollHeight",y=o?t.clientX:t.clientY,x=o?r.left:r.top,b=o?n.overflowX:n.overflowY;if(l){const C=e[c],w=e[f],A=C>0,O=C+w<(o?i.state.rootScrollWidth||0:e[m]);return o?{left:A&&y<w*.075,right:O&&y>w*(1-.075)}:{up:A&&y<w*.075,down:O&&y>w*(1-.075)}}if((b==="auto"||b==="scroll")&&e!==document.body&&e!==document.documentElement){const C=e[m],w=e[h],A=e[c],O=A>0,P=A<C-w;return o?{left:O&&y<x+w*.075,right:P&&y>x+w*(1-.075)}:{up:O&&y<x+w*.075,down:P&&y>x+w*(1-.075)}}return o?{left:!1,right:!1}:{up:!1,down:!1}}function H0e(e,t,n,r){if(!Wr(n)||!n.draggedNode)return;n.preventEnter=!0;const i=r.axis==="x",o=r.direction==="positive"?1:-1,l=20,c=i?"lastScrollDirectionX":"lastScrollDirectionY",f=i?"frameIdX":"frameIdY";n[f]!==void 0&&(cancelAnimationFrame(n[f]),n[f]=void 0),n[c]=r.direction;const h=()=>{if(!Wr(n)||!n.draggedNode){n[f]!==void 0&&(cancelAnimationFrame(n[f]),n[f]=void 0);return}const m=i?"scrollLeft":"scrollTop",y=i?"clientWidth":"clientHeight",x=i?"scrollWidth":"scrollHeight",b=e[m],C=e[y],w=e[x];if(!(o>0?b+C<w:b>0)){n[f]=void 0,n[c]=void 0;return}e[m]+=l*o,ki(n)&&f9(n),n[f]=requestAnimationFrame(h)};n[f]=requestAnimationFrame(h)}function iL(e,t,n){const r=e.getBoundingClientRect();return t>=r.left&&t<=r.right&&n>=r.top&&n<=r.bottom}function g0(e,t,n){if(!Wr(n)||!n.draggedNode)return;iw(n);const{x:r,y:i}=e;let o=!1;const l=(f,h,m)=>{H0e(m,t,n,{axis:f,direction:h}),o=!0},c=f=>{const h=window.getComputedStyle(f),m=f.getBoundingClientRect(),y=rL(f,t,h,m,{axis:"x",state:n}),x=rL(f,t,h,m,{axis:"y"});(y.left||y.right)&&(n.lastScrollContainerX=f,l("x",y.right?"positive":"negative",f)),(x.up||x.down)&&(n.lastScrollContainerY=f,l("y",x.down?"positive":"negative",f))};if(n.lastScrollContainerX&&iL(n.lastScrollContainerX,r,i)&&c(n.lastScrollContainerX),!o&&n.lastScrollContainerY&&iL(n.lastScrollContainerY,r,i)&&c(n.lastScrollContainerY),!o){let f=document.elementFromPoint(r,i);for(;f&&!(o&&n.lastScrollContainerX&&n.lastScrollContainerY);)f instanceof HTMLElement&&c(f),f=f.parentElement}if(!o){const f=document.scrollingElement;f instanceof HTMLElement&&c(f)}o||iw(n)}function q0e(e){let t=document.elementFromPoint(e.x,e.y);if(!v0(t))return;let n,r=!0;for(;t&&r;){if(lo.has(t)||Dr.has(t)){r=!1,n=Dr.has(t);break}t=t.parentNode}if(n){const i=Dr.get(t);return i?{parent:{el:t,data:i}}:void 0}else{const i=lo.get(t);if(!i)return;const o=Dr.get(t.parentNode);return o?{node:{el:t,data:i},parent:{el:t.parentNode,data:o}}:void 0}}function v0(e){return e instanceof HTMLElement&&e.parentNode instanceof HTMLElement}function Xv(e,t){const n=new AbortController;for(const r in t){const i=t[r];e.addEventListener(r,i,{signal:n.signal,passive:!1,capture:r==="focus"||r==="blur"})}return n}function G0e(e){if(e instanceof HTMLElement)return e;if("current"in e&&e.current instanceof HTMLElement)return e.current;console.warn("Invalid parent element",e)}function Y0e(e,t){const n=G0e(e);n&&t(n)}var Qv=new WeakMap;function W0e(e){const t=Qv.get(e);return t?t[0]:(console.warn("No values found for parent element"),[])}function K0e(e,t){const n=Qv.get(t);n&&n[1](e),Qv.set(t,[e,n[1]])}function Z0e(e,t){return n=>{Qv.set(n,t),o0e({parent:n,getValues:W0e,setValues:K0e,config:e})}}function aL(e){y3&&(Array.isArray(e)||(e=[e]),e.forEach(t=>{const{parent:n,state:r,...i}=t;Y0e(n,Z0e(i,r))}))}function X0e(e,t={}){const n=_.useRef(null),[r,i]=_.useState(e);function o(l={}){aL({parent:n,state:[r,i],...l})}return _.useEffect(()=>{aL({parent:n,state:[r,i],...t})},[r]),_.useEffect(()=>()=>{n.current&&l9(n.current)},[]),[n,r,i,o]}const y0=()=>{const e=uo(),t=ms(),n=Ku(),r=_.useMemo(()=>{const{orderBy:o,tags:l,excludeTags:c,excludeBots:f,excludeMaxVisitsReached:h,excludePastValidUntil:m,...y}=n,x=o?SZ(o):void 0,b=l?.split(",")??[];return{...y,orderBy:x,tags:b,excludeTags:c?.split(",")??[],excludeBots:f!==void 0?f==="true":void 0,excludeMaxVisitsReached:h!==void 0?h==="true":void 0,excludePastValidUntil:m!==void 0?m==="true":void 0}},[n]),i=_.useCallback(o=>{const l={...r,...o},{orderBy:c,tags:f,excludeTags:h,excludeBots:m,excludeMaxVisitsReached:y,excludePastValidUntil:x,...b}=l,C={...b,orderBy:c&&wZ(c),tags:f.length>0?f.join(","):void 0,excludeTags:h.length>0?h.join(","):void 0,excludeBots:Hb(m),excludeMaxVisitsReached:Hb(y),excludePastValidUntil:Hb(x)},w=Zw(C),A=w?`?${w}`:"";e(`${t}/list-short-urls/1${A}`)},[r,e,t]);return[r,i]},b3=()=>{const{domain:e}=Ku(),{shortCode:t=""}=Cf();return _.useMemo(()=>({shortCode:p3(t),domain:e}),[e,t])},b0=()=>{const e=XK();return g.jsx(Sy,{size:"lg",className:"[&]:p-1 mr-4",onClick:e,"aria-label":"Go back",children:g.jsx(Be,{icon:oH})})},Q0e={AF:"Afghanistan",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BA:"Bosnia and Herzegovina",BW:"Botswana",BR:"Brazil",IO:"British Indian Ocean Territory",VG:"British Virgin Islands",BN:"Brunei",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos Islands",CO:"Colombia",KM:"Comoros",CK:"Cook Islands",CR:"Costa Rica",HR:"Croatia",CU:"Cuba",CW:"Curacao",CY:"Cyprus",CZ:"Czech Republic",CD:"Democratic Republic of the Congo",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",TL:"East Timor",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",PF:"French Polynesia",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",CI:"Ivory Coast",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",XK:"Kosovo",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",AN:"Netherlands Antilles",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",KP:"North Korea",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",CG:"Republic of the Congo",RE:"Reunion",RO:"Romania",RU:"Russia",RW:"Rwanda",BL:"Saint Barthelemy",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",KR:"South Korea",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syria",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",VI:"U.S. Virgin Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican",VE:"Venezuela",VN:"Vietnam",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"},J0e=({deviceType:e,onDeviceTypeChange:t})=>{const n=ul("desktopDeviceTypes"),r=_.useMemo(()=>{const i={android:"Android",ios:"iOS"};return n&&(i.mobile="Any mobile device",i.windows="Windows",i.macos="MacOS",i.linux="Linux",i.chromeos="ChromeOS"),i.desktop="Any desktop device",i},[n]);return g.jsxs(Ww,{label:"Device type:",value:e??void 0,onChange:i=>t(i.target.value),hiddenRequired:!0,children:[!e&&g.jsx("option",{value:"",children:"- Select type -"}),Object.entries(r).map(([i,o])=>g.jsx("option",{value:i,children:o},i))]})},x3=({value:e,onValueChange:t,label:n,placeholder:r})=>g.jsx(di,{label:`${n}:`,value:e??"",onChange:i=>t(i.target.value),placeholder:r,hiddenRequired:!0}),e1e=({language:e,onLanguageChange:t})=>g.jsx(x3,{value:e,onValueChange:t,label:"Language",placeholder:"en-US / en"}),C2=({name:e,value:t,onNameChange:n,onValueChange:r})=>g.jsxs(g.Fragment,{children:[g.jsx(di,{label:"Param name:",value:e??"",onChange:i=>n(i.target.value),placeholder:"hello",hiddenRequired:!0}),typeof t=="string"&&g.jsx(di,{label:"Param value:",value:t,onChange:i=>r(i.target.value),placeholder:"world",hiddenRequired:!0})]}),t1e=({ipAddress:e,onIpAddressChange:t})=>g.jsx(x3,{value:e,onValueChange:t,label:"IP address",placeholder:"192.168.1.10"}),n1e=({countryCode:e,onCountryCodeChange:t})=>g.jsxs(Ww,{label:"Country:",value:e??void 0,onChange:n=>t(n.target.value),hiddenRequired:!0,children:[!e&&g.jsx("option",{value:"",children:"- Select country -"}),Object.entries(Q0e).map(([n,r])=>g.jsx("option",{value:n,children:r},n))]}),r1e=({cityName:e,onCityNameChange:t})=>g.jsx(x3,{value:e,onValueChange:t,label:"City name",placeholder:"New York"}),i1e=({condition:e,onConditionChange:t,onDelete:n})=>{const r=_.useCallback(m=>t({type:m,matchValue:null,matchKey:null}),[t]),i=_.useCallback(m=>t({...e,matchValue:m}),[e,t]),o=_.useCallback(m=>t({...e,matchKey:m}),[e,t]),l=ul("ipRedirectCondition"),c=ul("geolocationRedirectCondition"),f=ul("advancedQueryRedirectConditions"),h=_.useMemo(()=>{const m={device:"Device type",language:"Language","query-param":"Query param"};return f&&(m["any-value-query-param"]="Any value query param",m["valueless-query-param"]="Valueless query param"),l&&(m["ip-address"]="IP address"),c&&(m["geolocation-country-code"]="Country (geolocation)",m["geolocation-city-name"]="City name (geolocation)"),m},[f,c,l]);return g.jsxs("div",{className:Oe("flex flex-col gap-2","border border-lm-border dark:border-dm-border","rounded-md relative p-4 h-full"),children:[g.jsxs("div",{children:[g.jsx(Tt,{variant:"secondary","aria-label":"Remove condition",onClick:n,className:Oe("absolute -top-3.5 -right-3.5 [&]:px-2","[&]:rounded-full bg-lm-primary dark:bg-dm-primary"),children:g.jsx(Be,{icon:cy,widthAuto:!0})}),g.jsx(Ww,{label:"Type:",value:e.type,onChange:m=>r(m.target.value),hiddenRequired:!0,children:Object.entries(h).map(([m,y])=>g.jsx("option",{value:m,children:y},m))})]}),e.type==="device"&&g.jsx(J0e,{deviceType:e.matchValue,onDeviceTypeChange:i}),e.type==="language"&&g.jsx(e1e,{language:e.matchValue,onLanguageChange:i}),e.type==="query-param"&&g.jsx(C2,{name:e.matchKey,value:e.matchValue??"",onNameChange:o,onValueChange:i}),e.type==="any-value-query-param"&&g.jsx(C2,{name:e.matchKey,onNameChange:o,onValueChange:i}),e.type==="valueless-query-param"&&g.jsx(C2,{name:e.matchKey,onNameChange:o,onValueChange:i}),e.type==="ip-address"&&g.jsx(t1e,{ipAddress:e.matchValue,onIpAddressChange:i}),e.type==="geolocation-country-code"&&g.jsx(n1e,{countryCode:e.matchValue,onCountryCodeChange:i}),e.type==="geolocation-city-name"&&g.jsx(r1e,{cityName:e.matchValue,onCityNameChange:i})]})},h9=({isOpen:e,onClose:t,onSave:n,initialData:r})=>{const[i,o]=_.useState(r??{longUrl:"",conditions:[]}),l=_.useCallback(()=>{i&&n(i),t()},[n,i,t]),c=_.useCallback(()=>o(({longUrl:x,conditions:b})=>({longUrl:x,conditions:[...b,{type:"device",matchValue:null,matchKey:null}]})),[]),f=_.useCallback((x,b)=>o(({longUrl:C,conditions:w})=>{const A=[...w];return A[x]=b,{longUrl:C,conditions:A}}),[]),h=_.useCallback(x=>o(({longUrl:b,conditions:C})=>{const w=[...C];return w.splice(x,1),{longUrl:b,conditions:w}}),[]),m=_.useRef(null),y=_.useCallback(()=>o(r??{longUrl:"",conditions:[]}),[r]);return _.useEffect(()=>{const x=new MutationObserver(()=>{m.current&&e&&(m.current.focus(),x.disconnect())});return x.observe(document.body,{childList:!0,subtree:!0}),()=>x.disconnect()},[e]),g.jsxs(co,{size:"xl",title:"Redirect rule",open:e,onClose:t,onClosed:y,onConfirm:l,confirmDisabled:i.conditions.length===0,confirmText:"Confirm",children:[g.jsx(di,{label:"Long URL:",type:"url",placeholder:"https://www.example.com",value:i.longUrl,onChange:x=>o(b=>({...b,longUrl:x.target.value})),hiddenRequired:!0,ref:m}),g.jsx("hr",{}),g.jsxs("div",{className:"flex justify-between",children:[g.jsx("b",{children:"Conditions:"}),g.jsx(Tt,{className:"[&]:px-1.5",variant:"secondary","aria-label":"Add condition",onClick:c,children:g.jsx(Be,{icon:Wh})})]}),i.conditions.length===0&&g.jsx("div",{className:"text-center",children:g.jsx("i",{children:"Add conditions..."})}),i.conditions.length>0&&g.jsx("div",{className:"pr-3 mt-6 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:i.conditions.map((x,b)=>g.jsx(i1e,{condition:x,onConditionChange:C=>f(b,C),onDelete:()=>h(b)},`${b}_${x.type}`))})]})},a1e=({priority:e,isLast:t,redirectRule:n,onDelete:r,onMoveUp:i,onMoveDown:o,onUpdate:l})=>{const{flag:c,setToTrue:f,setToFalse:h}=Cn();return g.jsxs(Nt,{children:[g.jsxs("div",{className:"flex align-center gap-4",children:[g.jsx("div",{className:"flex flex-col my-auto hidden md:block cursor-grab drag-n-drop-handler",children:g.jsx(Be,{icon:tH})}),g.jsxs("div",{className:"flex flex-col my-auto",children:[g.jsx(Tt,{variant:"secondary","aria-label":`Move rule with priority ${e} up`,disabled:e===1,onClick:i,className:"[&]:px-2 rounded-b-none mb-[-1px]",children:g.jsx(Be,{icon:GV})}),g.jsx(Tt,{variant:"secondary","aria-label":`Move rule with priority ${e} down`,disabled:t,onClick:o,className:"[&]:px-2 rounded-t-none",children:g.jsx(Be,{icon:pH})})]}),g.jsxs("div",{className:"grow",children:[g.jsxs("div",{className:"mb-2",children:[g.jsx("b",{children:"Long URL:"})," ",g.jsx(Li,{href:n.longUrl,"data-testid":"rule-long-url"})]}),g.jsxs("div",{className:"flex flex-col lg:flex-row gap-2",children:[g.jsx("b",{children:"Conditions:"}),n.conditions.map((m,y)=>g.jsxs("div",{className:"rounded-sm bg-gray-600 px-1 text-white",children:[m.type==="device"&&g.jsxs(g.Fragment,{children:["Device is ",m.matchValue]}),m.type==="language"&&g.jsxs(g.Fragment,{children:[m.matchValue," language is accepted"]}),m.type==="query-param"&&g.jsxs(g.Fragment,{children:["Query string contains ",m.matchKey,"=",m.matchValue]}),m.type==="ip-address"&&g.jsxs(g.Fragment,{children:["IP address matches ",m.matchValue]}),m.type==="geolocation-country-code"&&g.jsxs(g.Fragment,{children:["Country code is ",m.matchValue]}),m.type==="geolocation-city-name"&&g.jsxs(g.Fragment,{children:["City name is ",m.matchValue]})]},`${m.type}_${y}`))]})]}),g.jsxs("div",{className:"flex flex-col sm:flex-row gap-1 my-auto",children:[g.jsx(Tt,{className:"[&]:px-1.5",variant:"secondary","aria-label":`Edit rule with priority ${e}`,onClick:f,children:g.jsx(Be,{icon:wN})}),g.jsx(Tt,{className:"[&]:px-2",variant:"danger","aria-label":`Delete rule with priority ${e}`,onClick:r,children:g.jsx(Be,{icon:YV})})]})]}),g.jsx(h9,{onSave:l,isOpen:c,onClose:h,initialData:n})]})},o1e=({shortUrlRedirectRules:e,getShortUrlRedirectRules:t,getShortUrlsDetails:n,shortUrlsDetails:r,setShortUrlRedirectRules:i,shortUrlRedirectRulesSaving:o,resetSetRules:l})=>{const c=b3(),{shortUrls:f}=r,h=c&&f?.get(c),[m,y,x]=X0e([],{dragHandle:".drag-n-drop-handler",dropZoneClass:"opacity-25"}),{saving:b,saved:C,errorData:w}=o,{flag:A,setToFalse:O,setToTrue:P}=Cn(),N=_.useCallback(re=>x((J=[])=>[...J,re]),[x]),F=_.useCallback(re=>x((J=[])=>{const oe=[...J];return oe.splice(re,1),oe}),[x]),U=_.useCallback((re,J)=>x((oe=[])=>{const _e=[...oe];return _e[re]=J,_e}),[x]),W=_.useCallback((re,J)=>x((oe=[])=>{if(!oe[J])return oe;const _e=[...oe],se=_e[J];return _e[J]=_e[re],_e[re]=se,_e}),[x]),X=_.useCallback(re=>W(re,re-1),[W]),ae=_.useCallback(re=>W(re,re+1),[W]),ce=_.useCallback(re=>{re.preventDefault(),y&&i({shortUrl:c,data:{redirectRules:y}})},[c,y,i]);return _.useEffect(()=>(t(c),n([c]),l),[t,n,c,l]),_.useEffect(()=>{e.redirectRules&&x(e.redirectRules)},[x,e.redirectRules]),g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("header",{children:g.jsxs(Nt,{children:[g.jsxs("h2",{className:"sm:flex justify-between items-center",children:[g.jsx(b0,{}),g.jsxs("div",{className:"text-center grow",children:[r.loading&&g.jsx(g.Fragment,{children:"Loading..."}),!r.loading&&g.jsxs("small",{children:["Redirect rules for ",g.jsx(Li,{href:h?.shortUrl??""})]})]})]}),g.jsx("hr",{}),g.jsxs("div",{children:[g.jsx("p",{children:"Configure dynamic conditions that will be checked at runtime."}),g.jsxs("p",{children:["If no conditions match, visitors will be redirected to: ",g.jsx(Li,{href:e.defaultLongUrl??""})]})]})]})}),g.jsx("div",{children:g.jsxs(Tt,{onClick:P,children:[g.jsx(Be,{icon:Wh})," Add rule"]})}),g.jsxs("form",{onSubmit:ce,children:[e.loading&&g.jsx(Wo,{loading:!0}),y.length===0&&!e.loading&&g.jsx(Nt,{className:"text-center",children:g.jsx("i",{children:"This short URL has no dynamic redirect rules"})}),g.jsx("div",{className:"flex flex-col gap-2",ref:m,children:y.map((re,J)=>g.jsx(a1e,{redirectRule:re,priority:J+1,isLast:J===y.length-1,onDelete:()=>F(J),onMoveUp:()=>X(J),onMoveDown:()=>ae(J),onUpdate:oe=>U(J,oe)},`${re.longUrl}_${J}`))}),g.jsx("div",{className:"text-center mt-4",children:g.jsx(Tt,{type:"submit",inline:!0,className:"max-md:w-full",disabled:b,"data-testid":"save-button",children:b?"Saving...":"Save rules"})})]}),w&&g.jsx(Gr,{variant:"error",children:g.jsx(so,{errorData:w,fallbackMessage:"An error occurred while saving short URL redirect rules :("})}),C&&g.jsx(Gr,{variant:"success",children:"Redirect rules properly saved."}),g.jsx(h9,{isOpen:A,onClose:O,onSave:N})]})},s1e=(e,t)=>{e.serviceFactory("ShortUrlRedirectRules",()=>o1e),e.decorator("ShortUrlRedirectRules",t(["shortUrlRedirectRules","shortUrlsDetails","shortUrlRedirectRulesSaving"],["getShortUrlRedirectRules","getShortUrlsDetails","setShortUrlRedirectRules","resetSetRules"])),e.serviceFactory("getShortUrlRedirectRules",Kye,"apiClientFactory"),e.serviceFactory("setShortUrlRedirectRules",Gye,"apiClientFactory"),e.serviceFactory("resetSetRules",n=>n.resetSetRules,"setShortUrlRedirectRulesReducerCreator"),e.serviceFactory("shortUrlRedirectRulesReducerCreator",Zye,"getShortUrlRedirectRules"),e.serviceFactory("shortUrlRedirectRulesReducer",n=>n.reducer,"shortUrlRedirectRulesReducerCreator"),e.serviceFactory("setShortUrlRedirectRulesReducerCreator",Yye,"setShortUrlRedirectRules"),e.serviceFactory("setShortUrlRedirectRulesReducer",n=>n.reducer,"setShortUrlRedirectRulesReducerCreator")},l1e=({creation:e,resetCreateShortUrl:t,canBeClosed:n=!1})=>{const{error:r,saved:i}=e;if(_.useEffect(()=>{t()},[t]),r)return g.jsxs(Gr,{variant:"error",className:"mt-4 relative",children:[n&&g.jsx("div",{className:"absolute right-1.5 top-1.5","data-testid":"error-close-button",children:g.jsx(ku,{onClick:t})}),g.jsx(so,{errorData:e.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!i)return null;const{shortUrl:o}=e.result;return g.jsxs(Gr,{variant:"success",className:"mt-4 relative",children:[n&&g.jsx("div",{className:"absolute right-1.5 top-1.5","data-testid":"success-close-button",children:g.jsx(ku,{onClick:t})}),g.jsxs("div",{className:"flex items-center justify-center gap-1",children:[g.jsxs("span",{children:[g.jsx("b",{children:"Great!"})," The short URL is ",g.jsx("b",{children:o})]}),g.jsx(QR,{text:o})]})]})},m9=({createShortUrl:e,shortUrlCreation:t,resetCreateShortUrl:n,basicMode:r=!1})=>{const{ShortUrlForm:i}=An(m9),o=Fn("shortUrlCreation"),{"long-url":l=""}=Ku(),c=_.useMemo(()=>({longUrl:l,tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,forwardQuery:o?.forwardQuery??!0}),[l,o?.forwardQuery]);return g.jsxs(g.Fragment,{children:[g.jsx(i,{initialState:c,saving:t.saving,basicMode:r,onSave:async f=>(n(),e(f))}),g.jsx(l1e,{creation:t,resetCreateShortUrl:n,canBeClosed:r})]})},u1e=Tn(m9,["ShortUrlForm"]),p9=({shortUrlsDetails:e,getShortUrlsDetails:t,shortUrlEdition:n,editShortUrl:r})=>{const{ShortUrlForm:i}=An(p9),o=b3(),{loading:l,error:c,errorData:f,shortUrls:h}=e,m=o&&h?.get(o),{saving:y,saved:x,error:b,errorData:C}=n,w=_.useMemo(()=>zye(m),[m]);return _.useEffect(()=>{o&&t([o])},[t,o]),l?g.jsx(Wo,{loading:!0}):c?g.jsx(Gr,{variant:"error",children:g.jsx(so,{errorData:f,fallbackMessage:"An error occurred while loading short URL detail :("})}):g.jsxs("div",{className:"flex flex-col gap-y-4",children:[g.jsx("header",{children:g.jsx(Nt,{children:g.jsxs("h2",{className:"sm:flex items-center",children:[g.jsx(b0,{}),g.jsx("div",{className:"text-center grow",children:g.jsxs("small",{children:["Edit ",g.jsx(Li,{href:m?.shortUrl??""})]})})]})})}),g.jsx(i,{initialState:w,saving:y,onSave:async A=>{m&&r({...m,data:A})}}),x&&b&&g.jsx(Gr,{variant:"error",children:g.jsx(so,{errorData:C,fallbackMessage:"An error occurred while updating short URL :("})}),x&&!b&&g.jsx(Gr,{variant:"success",children:"Short URL properly edited."})]})},c1e=Tn(p9,["ShortUrlForm"]),E2="delete",f1e=({shortUrl:e,onClose:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:l})=>{const[c,f]=_.useState("");_.useEffect(()=>i,[i]);const{loading:h,error:m,deleted:y,errorData:x}=r,b=_.useCallback(()=>{i(),t()},[i,t]),C=_.useCallback(()=>o(e).then(w=>!f3(w)&&t()),[o,e,t]);return g.jsx(co,{open:n,title:"Delete short URL",variant:"danger",confirmText:h?"Deleting...":"Delete",confirmDisabled:c!==E2||h,onConfirm:C,onClose:b,onClosed:()=>y&&l(e),children:g.jsxs("div",{className:"flex flex-col gap-y-2",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.jsx(di,{label:g.jsxs(g.Fragment,{children:["Type ",g.jsx("b",{children:E2})," to confirm deletion."]}),type:"text",placeholder:E2,value:c,onChange:w=>f(w.target.value),onKeyDown:w=>w.key==="Enter"&&C()}),m&&g.jsx(Gr,{variant:gye(x)?"warning":"error",size:"sm",className:"mt-2",children:g.jsx(so,{errorData:x,fallbackMessage:"Something went wrong while deleting the URL :("})})]})})},g9=({amount:e=0,loading:t=!1,...n})=>g.jsxs(Tt,{...n,disabled:t,solid:!ss(),children:[g.jsx(Be,{icon:eH})," ",t?"Exporting...":g.jsxs(g.Fragment,{children:["Export (",Sn(e),")"]})]}),oL=20,v9=({amount:e=0})=>{const{apiClientFactory:t,ReportExporter:n}=An(v9),[{tags:r,search:i,startDate:o,endDate:l,orderBy:c,tagsMode:f}]=y0(),{flag:h,setToTrue:m,setToFalse:y}=Cn(),x=_.useCallback(async()=>{const b=e/oL,C=async(A=1)=>{const{data:O}=await t().listShortUrls({page:`${A}`,tags:r,searchTerm:i,startDate:o,endDate:l,orderBy:c,tagsMode:f,itemsPerPage:oL});return A>=b?O:O.concat(await C(A+1))};m();const w=await C();n.exportShortUrls(w.map(A=>{const{hostname:O,pathname:P}=new URL(A.shortUrl),N=P.substring(1);return{createdAt:A.dateCreated,domain:O,shortCode:N,shortUrl:A.shortUrl,longUrl:A.longUrl,title:A.title??"",tags:A.tags.join("|"),visits:A.visitsSummary.total}})),y()},[e,t,l,c,n,i,o,m,y,r,f]);return g.jsx(g9,{loading:h,className:"max-xl:w-full",amount:e,onClick:x})},d1e=Tn(v9,["apiClientFactory","ReportExporter"]),h1e="yyyy-MM-dd",y9="yyyy-MM-dd HH:mm",Al=()=>new Date,_3=e=>typeof e!="string",w3=(e,t)=>!e||!_3(e)?e:t?fv(e,t):YJ(e),Tl=e=>w3(e,void 0),ol=e=>w3(e,h1e),qh=e=>w3(e,y9),ji=e=>_3(e)?e:bl(e),Sm=(e,t,n)=>{const r=ji(e),i=t&&ji(t),o=n&&ji(n);if(i&&o)try{return ZJ(r,{start:i,end:o})}catch{return!1}return i?h_(r,i)||KJ(r,i):o?h_(r,o)||dv(r,o):!0},vu=(e,t)=>h_(e,t)||dv(e,t),Jv=({date:e,format:t=y9,relative:n=!1})=>{const r=_3(e)?e:bl(e);return g.jsx("time",{dateTime:`${WJ(r)}000`,children:n?`${GJ(Al(),r)} ago`:fv(r,t)})},b9=(e,{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`${e}/short-code/${Y7(t)}/${r}${i}`},x9=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=ms();return!n||!e?g.jsx("span",{...i,children:r}):g.jsx(Ir,{to:b9(o,e,t),...i,children:r})},m1e=e=>{const{meta:t,visitsSummary:n}=e,{maxVisits:r,validSince:i,validUntil:o}=t,l=n.total;return r&&l>=r?{icon:lH,className:"text-danger",description:`This short URL cannot be currently visited because it has reached the maximum amount of ${r} visit${r>1?"s":""}`}:o&&dv(ji(o),Al())?{icon:aT,className:"text-danger",description:`This short URL cannot be visited since ${qh(ji(o))}`}:i&&dv(Al(),ji(i))?{icon:aT,className:"text-warning",description:`This short URL will start working on ${qh(ji(i))}`}:{icon:Nu,className:"text-lm-brand dark:text-dm-brand",description:"This short URL can be visited normally"}},p1e=({shortUrl:e})=>{const{icon:t,className:n,description:r}=_.useMemo(()=>m1e(e),[e]);return g.jsx("span",{className:"cursor-help",title:r,children:g.jsx(Be,{icon:t,className:n})})},_9=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const{anchor:i,tooltip:o}=as(),{maxVisits:l,validSince:c,validUntil:f}=t?.meta??{},h=!!l||!!c||!!f,m=g.jsx(x9,{shortUrl:t,suffix:"visits",asLink:r,children:g.jsx("strong",{className:Oe("inline-block transition-all duration-300",{"scale-150":n}),children:Sn(e)})});return h?g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"whitespace-nowrap",children:[m,g.jsxs("small",{className:"cursor-help",...i,children:[l&&g.jsxs(g.Fragment,{children:[" / ",Sn(l)]}),g.jsx("sup",{className:"ml-1",children:g.jsx(Be,{icon:dy})})]})]}),g.jsx(os,{...o,children:g.jsxs("ul",{className:"flex flex-col gap-y-2",children:[l&&g.jsxs("li",{children:["This short URL will not accept more than ",g.jsx("b",{children:Sn(l)})," visit",l===1?"":"s","."]}),c&&g.jsxs("li",{children:["This short URL will not accept visits before ",g.jsx("b",{className:"whitespace-nowrap",children:qh(ji(c))}),"."]}),f&&g.jsxs("li",{children:["This short URL will not accept visits after ",g.jsx("b",{className:"whitespace-nowrap",children:qh(ji(f))}),"."]})]})})]}):m},xf=({className:e,...t})=>g.jsx("button",{type:"button",className:Oe("rounded-sm focus-ring cursor-pointer",e),...t}),g1e=e=>!!e.onClose,v1e=e=>!!e.onClick,x0=e=>{const{text:t,children:n,className:r,colorGenerator:i}=e,o=v1e(e),l=g1e(e),c=o?xf:"span",f=_.useMemo(()=>i.stylesForKey(t),[t,i]);return g.jsxs(c,{className:Oe("inline-flex items-center gap-1","font-bold [&]:rounded-md",{"text-sm px-1.5 py-0.5":!l,"py-1 px-2":l,"cursor-pointer":o},r),style:f,onClick:o?e.onClick:void 0,"data-testid":"tag",children:[n??t,l&&g.jsx(xf,{"aria-label":`Remove ${t}`,className:"p-0 text-lg leading-5.5",onClick:e.onClose,children:g.jsx(Be,{icon:fy,size:"sm"})})]})},y1e=({tags:e,onTagClick:t,colorGenerator:n})=>e.length===0?g.jsx("i",{className:"whitespace-nowrap",children:g.jsx("small",{children:"No tags"})}):g.jsx("div",{className:"inline-flex flex-wrap gap-1 items-center",children:e.map(r=>g.jsx(x0,{text:r,colorGenerator:n,onClick:()=>t?.(r)},r))}),w9=({shortUrl:e,onTagClick:t})=>{const{ShortUrlsRowMenu:n,ColorGenerator:r,useTimeoutToggle:i}=An(w9),[o,l]=i({initialValue:!1,delay:500}),c=_.useRef(!0),[{excludeBots:f}]=y0(),h=Fn("visits"),m=f??h?.excludeBots;return _.useEffect(()=>{c.current||l(),c.current=!1},[e.visitsSummary.total,e.visitsSummary.nonBots,l]),g.jsxs($e.Row,{className:"relative",children:[g.jsx($e.Cell,{className:"whitespace-nowrap",columnName:"Created at:",children:g.jsx(Jv,{date:e.dateCreated})}),g.jsx($e.Cell,{columnName:"Short URL:",children:g.jsxs("span",{className:"lg:whitespace-nowrap inline-flex items-center gap-x-2",children:[g.jsx(Li,{href:e.shortUrl,className:"max-md:break-all lg:truncate max-w-72"}),g.jsx(QR,{text:e.shortUrl})]})}),g.jsx($e.Cell,{className:"break-all",columnName:`${e.title?"Title":"Long URL"}:`,children:g.jsx(Li,{href:e.longUrl,children:e.title??e.longUrl})}),e.title&&g.jsx($e.Cell,{className:"break-all [&]:lg:hidden",columnName:"Long URL:",children:g.jsx(Li,{href:e.longUrl})}),g.jsx($e.Cell,{columnName:"Tags:",children:g.jsx(y1e,{tags:e.tags,colorGenerator:r,onTagClick:t})}),g.jsx($e.Cell,{className:"lg:text-right",columnName:"Visits:",children:g.jsx(_9,{visitsCount:m?e.visitsSummary.nonBots:e.visitsSummary.total,shortUrl:e,active:o,asLink:!0})}),g.jsx($e.Cell,{columnName:"Status:",className:"max-lg:border-none",children:g.jsxs("div",{className:"inline-flex gap-2",children:[g.jsx(p1e,{shortUrl:e}),e.hasRedirectRules&&g.jsx(x9,{asLink:!0,shortUrl:e,suffix:"redirect-rules",title:"This short URL has dynamic redirect rules",children:g.jsx(Be,{icon:_N})})]})}),g.jsx($e.Cell,{className:"text-right max-lg:absolute max-lg:top-1 max-lg:right-1 max-lg:p-0",children:g.jsx(n,{shortUrl:e})})]})},b1e=Tn(w9,["ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"]),S9=_.forwardRef(({name:e,color:t,onChange:n,className:r},i)=>g.jsxs("div",{className:Oe("relative rounded w-12",r),style:{backgroundColor:t,borderColor:t},children:[g.jsx(Ti,{className:"w-full h-full cursor-pointer relative z-1 opacity-0",type:"color",value:t,onChange:o=>n(o.target.value),ref:i,name:e,"aria-label":e.replace("-"," ")}),g.jsx(Be,{icon:PV,className:"absolute top-1/2 left-1/2 -translate-1/2",style:{color:Kw(t.substring(1))?"#000":"#fff"}})]})),sL=({color:e,onChange:t,name:n})=>{const r=_.useRef(null);return g.jsxs("div",{className:"flex",children:[g.jsx(S9,{name:`${n}-picker`,color:e,onChange:t,className:"rounded-r-none",ref:r}),g.jsx(Ti,{readOnly:!0,value:e,onClick:()=>r.current?.click(),"aria-label":n,"data-testid":"text-input",className:"grow rounded-l-none"})]})};function x1e(e){switch(e){case"L":return 1;case"M":return .5;default:return .3}}const _1e=_.forwardRef(({data:e,color:t="#000000",bgColor:n="#ffffff",margin:r=0,errorCorrection:i="L",size:o=300,drawType:l="canvas",logo:c},f)=>{const h=_.useRef(null),m=_.useRef(new pee),y=_.useCallback((b,C)=>m.current.download({name:b,extension:C}),[]),x=_.useCallback(b=>new Promise((C,w)=>{const A=m.current.getRawData(b),O=new FileReader;O.onload=()=>{const{result:P}=O;P&&C(P.toString())},O.onerror=w,A.then(P=>{P instanceof Blob?O.readAsDataURL(P):w(new Error("QR code image blob not available"))})}),[]);return _.useImperativeHandle(f,()=>({download:y,getDataUri:x}),[y,x]),_.useEffect(()=>{const b=h.current;m.current.append(b)},[]),_.useEffect(()=>{m.current.update({type:l,data:e,width:o+r,height:o+r,margin:r,dotsOptions:{color:t},backgroundOptions:{color:n},qrOptions:{errorCorrectionLevel:i},imageOptions:{margin:5,imageSize:x1e(i)},image:c})},[n,t,e,l,i,c,r,o]),g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"#qr-code-canvas-container canvas { max-width: 100% }"}}),g.jsx("div",{ref:h,id:"qr-code-canvas-container"})]})}),w1e=async({text:e,onCopy:t},n=navigator)=>{const r=typeof e=="string"?e:await e;return n.clipboard?.writeText(r).then(()=>t?.({text:r,copied:!0})).catch(()=>t?.({text:r,copied:!1}))},lL=({name:e,value:t,step:n,min:r,max:i,onChange:o})=>{const l=_.useId();return g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("label",{htmlFor:l,className:"capitalize",children:[e,": ",t,"px"]}),g.jsx("input",{id:l,type:"range",value:t,step:n,min:r,max:i,onChange:c=>o(Number(c.target.value))})]})},S1e=({shortUrl:{shortUrl:e,shortCode:t},onClose:n,isOpen:r,qrDrawType:i})=>{const o=Fn("qrCodes",Pf),[{size:l,margin:c,color:f,bgColor:h,errorCorrection:m,format:y},x]=_.useState(o),b=_.useCallback(ae=>x(ce=>({...ce,...ae})),[]),C=_.useRef(null),[w,A]=_.useState(),O=_.useCallback(ae=>{const ce=ae.target.files?.[0];ce&&A({url:URL.createObjectURL(new Blob([ce],{type:ce.type})),name:ce.name})},[]),P=_.useRef(null),N=_.useCallback(()=>P.current?.download(`${t}-qr-code`,y),[y,t]),[F,U]=wy({}),W=_.useCallback(()=>{const ae=P.current?.getDataUri(y)??"";return w1e({text:ae,onCopy:U})},[y,U]),X=_.useCallback(()=>{x(o),A(void 0)},[o]);return g.jsx(co,{size:"lg",open:r,onClose:n,title:g.jsxs(g.Fragment,{children:["QR code for ",g.jsx(Li,{href:e})]}),onClosed:X,children:g.jsxs("div",{className:"flex flex-col-reverse lg:flex-row gap-4",children:[g.jsx("div",{className:"grow flex items-center justify-around",children:g.jsxs("div",{className:"flex flex-col gap-1 items-center","data-testid":"qr-code-container",children:[g.jsx(_1e,{ref:P,data:e,size:l,margin:c,errorCorrection:m,color:f,bgColor:h,logo:w?.url,drawType:i}),g.jsxs("div",{className:"italic",children:["Preview (",l+c,"x",l+c,")"]})]})}),g.jsxs("div",{className:"flex flex-col gap-2 lg:w-64",children:[g.jsx(lL,{name:"size",value:l,onChange:ae=>b({size:ae}),step:10,min:50,max:1e3}),g.jsx(lL,{name:"margin",value:c,onChange:ae=>b({margin:ae}),step:1,min:0,max:100}),g.jsx(Z6,{errorCorrection:m,onChange:ae=>b({errorCorrection:ae})}),g.jsx(sL,{name:"color",color:f,onChange:ae=>b({color:ae})}),g.jsx(sL,{name:"background",color:h,onChange:ae=>b({bgColor:ae})}),!w&&g.jsxs(g.Fragment,{children:[g.jsxs(Tt,{variant:"secondary",onClick:()=>C.current?.click(),children:[g.jsx(Be,{icon:AK}),"Select logo"]}),g.jsx("input",{ref:C,type:"file",accept:"image/*","aria-hidden":!0,tabIndex:-1,className:"hidden",onChange:O,"data-testid":"logo-input"})]}),w&&g.jsxs(Tt,{variant:"secondary",onClick:()=>A(void 0),children:[g.jsx(Be,{icon:cy}),g.jsxs("div",{className:"truncate",children:["Clear logo (",w.name,")"]})]}),g.jsx("div",{className:"my-auto",children:g.jsx("hr",{className:"my-2"})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx(X6,{format:y,onChange:ae=>b({format:ae})}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Tt,{onClick:W,"aria-label":"Copy data URI",title:"Copy data URI",className:"h-full",children:g.jsx(Be,{icon:F?Nu:KR})}),g.jsxs(Tt,{solid:!0,onClick:N,className:"grow",children:["Download ",g.jsx(Be,{icon:xN})]})]})]})]})]})})},C9=({shortUrl:e,deleteShortUrl:t,shortUrlDeleted:n})=>{const{DeleteShortUrlModal:r}=An(C9),{flag:i,setToTrue:o,setToFalse:l}=Cn(),{flag:c,setToTrue:f,setToFalse:h}=Cn(),m=h0(),{confirmDeletions:y=!0}=Fn("shortUrlsList",{}),x=_.useCallback(async()=>{const w=await t(e);f3(w)||n(e)},[t,e,n]),b=ms(),C=_.useCallback(w=>b9(b,e,w),[b,e]);return g.jsxs(g.Fragment,{children:[g.jsxs(tn,{menuAlignment:"right",children:[g.jsxs(tn.Item,{to:C("visits"),className:"gap-1.5",children:[g.jsx(Be,{icon:jw})," Visit stats"]}),m&&g.jsxs(g.Fragment,{children:[g.jsxs(tn.Item,{className:"gap-1.5",disabled:!m.canAddItemWithName(e.shortUrl),onClick:()=>m.addItemToCompare({name:e.shortUrl,query:g3(e)}),children:[g.jsx(Be,{icon:uy})," Compare visits"]}),g.jsx(tn.Separator,{})]}),g.jsxs(tn.Item,{to:C("edit"),className:"gap-1.5",children:[g.jsx(Be,{icon:Tw})," Edit short URL"]}),g.jsxs(tn.Item,{to:C("redirect-rules"),className:"gap-1.5",children:[g.jsx(Be,{icon:_N})," Manage redirect rules"]}),g.jsxs(tn.Item,{onClick:o,className:"gap-1.5",children:[g.jsx(Be,{icon:bH})," QR code"]}),g.jsx(tn.Separator,{}),g.jsxs(tn.Item,{className:"[&]:text-danger gap-1.5",onClick:y?f:x,children:[g.jsx(Be,{icon:AN})," Delete short URL"]})]}),g.jsx(S1e,{shortUrl:e,isOpen:i,onClose:l}),g.jsx(r,{shortUrl:e,deleteShortUrl:t,shortUrlDeleted:n,isOpen:c,onClose:h})]})},C1e=Tn(C9,["DeleteShortUrlModal"]),E9="shlink/shortUrlCreation",uL={saving:!1,saved:!1,error:!1},E1e=e=>or(`${E9}/createShortUrl`,t=>e().createShortUrl(t)),A1e=e=>{const{reducer:t,actions:n}=jt({name:E9,initialState:uL,reducers:{resetCreateShortUrl:()=>uL},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:l})=>({saving:!1,saved:!1,error:!0,errorData:zi(l)})),i.addCase(e.fulfilled,(o,{payload:l})=>({result:l,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},A9="shlink/shortUrlEdition",T1e={saving:!1,saved:!1,error:!1},O1e=e=>or(`${A9}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl({shortCode:t,domain:n},r)),j1e=e=>jt({name:A9,initialState:T1e,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:zi(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}}),cL="shlink/shortUrlsDetails",fL={loading:!1,error:!1},M1e=e=>{const t=or(`${cL}/getShortUrlsDetails`,async(r,{getState:i})=>{const{shortUrlsList:o}=i(),l=await Promise.all(r.map(async c=>{const{shortCode:f,domain:h}=c,m=o?.shortUrls?.data.find(y=>wh(y,f,h));return[c,m??await e().getShortUrl({shortCode:f,domain:h})]}));return new Map(l)}),{reducer:n}=jt({name:cL,initialState:fL,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:zi(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...fL,shortUrls:o}))}});return{reducer:n,getShortUrlsDetails:t}},P1e=({domains:e,value:t,onChange:n})=>{const{flag:r,setToTrue:i,setToFalse:o}=Cn(),l=!t,c=_.useCallback(()=>{n(""),o()},[n,o]),f=_.useCallback(()=>{n(""),i()},[n,i]);return r?g.jsxs("div",{className:"flex",children:[g.jsx(Ti,{value:t??"",placeholder:"Domain",onChange:h=>n(h.target.value),className:"flex-grow rounded-r-none [&]:border-r-0"}),g.jsx(Tt,{variant:"secondary",type:"button",className:"rounded-l-none","aria-label":"Back to domains list",title:"Existing domains",onClick:c,children:g.jsx(Be,{icon:hH})})]}):g.jsxs(qe,{buttonContent:l?"Domain":`Domain: ${t}`,buttonClassName:Oe("w-full",{"text-placeholder":l}),children:[e.map(({domain:h,isDefault:m})=>g.jsxs(qe.Item,{selected:(t===h||m)&&l,onClick:()=>n(h),className:"flex justify-between items-center",children:[h,m&&g.jsx(Zo,{children:"default"})]},h)),g.jsx(qe.Separator,{}),g.jsx(qe.Item,{onClick:f,children:g.jsx("i",{children:"New domain"})})]})},L1e=({minDate:e,maxDate:t,value:n,onChange:r,withTime:i=!1,...o})=>{const l=_.useCallback(({target:f})=>{if(!f.value){r?.(null);return}r?.(ji(f.value))},[r]),c=_.useMemo(()=>i?qh:ol,[i]);return g.jsx(Ti,{...o,type:i?"datetime-local":"date",value:c(n)??"",max:c(t)??void 0,min:c(e)??void 0,onChange:l})},ey=({label:e,id:t,...n})=>{const r=_.useId();return g.jsxs(g.Fragment,{children:[g.jsxs("label",{htmlFor:t??r,className:"mb-1",children:[e,":"]}),g.jsx(L1e,{id:t??r,...n})]})},N1e=({className:e,placement:t,children:n})=>{const{anchor:r,tooltip:i}=as({placement:t});return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:e,...r,"data-placement":t,"data-testid":"tooltip-anchor",children:g.jsx(Be,{icon:dy})}),g.jsx(os,{...i,children:n})]})},dL=({children:e,infoTooltip:t,checked:n,onChange:r})=>g.jsxs("div",{className:"flex items-center gap-x-2",children:[g.jsxs(ja,{className:"inline-flex items-center gap-x-1.5",children:[g.jsx(Gw,{checked:n,onChange:r}),e]}),g.jsx(N1e,{placement:"right",children:t})]}),R1e=e=>g.jsx(co,{...e,title:"Info",size:"lg",children:g.jsxs("div",{className:"flex flex-col gap-y-2",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",{className:"list-disc pl-5",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"})]})]})}),D1e=()=>{const{flag:e,setToFalse:t,setToTrue:n}=Cn();return g.jsxs(g.Fragment,{children:[g.jsx(xf,{title:"What does this mean?",onClick:n,children:g.jsx(Be,{icon:dy})}),g.jsx(R1e,{open:e,onClose:t})]})},wg=e=>typeof e=="string"?bl(e):e,k1e=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,T9=({basicMode:e=!1,saving:t,onSave:n,initialState:r,tagsList:i,domainsList:o})=>{const{TagsSelector:l}=An(T9),[c,f]=_.useState(r),h=k1e(c),m=_.useCallback(()=>f(r),[r]),y=_.useCallback((w,A)=>wu(w)?w:wu(A)?null:void 0,[]),x=_.useCallback(w=>f(A=>({...A,tags:w})),[]),b=_.useCallback(async w=>(w.preventDefault(),n(c).then(A=>h&&!f3(A)&&m()).catch(()=>{})),[h,n,m,c]),C=_.useMemo(()=>g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx(Ti,{size:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:c.longUrl,onChange:w=>f(A=>({...A,longUrl:w.target.value}))}),g.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[e&&h&&g.jsx("div",{className:"w-full lg:w-1/2",children:g.jsx(Ti,{size:"lg",placeholder:"Custom slug",value:c.customSlug??"",onChange:w=>f(A=>({...A,customSlug:w.target.value}))})}),g.jsx("div",{className:Oe("w-full",{"lg:w-1/2":e}),children:g.jsx(l,{tags:i.tags,selectedTags:c.tags??[],onChange:x,placeholder:"Add tags to the URL"})})]})]}),[l,e,x,h,c,i.tags]);return g.jsxs("form",{name:"shortUrlForm",onSubmit:b,className:"flex flex-col gap-4",children:[e&&C,!e&&g.jsxs(g.Fragment,{children:[g.jsx("div",{children:g.jsx("div",{className:"w-full",children:g.jsx(Nt,{title:"Main options",className:"card",children:C})})}),g.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[g.jsx("div",{className:"w-full sm:w-1/2",children:g.jsxs(Nt,{title:"Customize the short URL",bodyClassName:"flex flex-col gap-4",className:"card h-full",children:[g.jsx(Ti,{placeholder:"Title",value:c.title??"",onChange:({target:w})=>f(A=>({...A,title:y(w.value,r.title)}))}),h&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[g.jsx("div",{className:"lg:w-1/2",children:g.jsx(Ti,{placeholder:"Custom slug",value:c.customSlug??"",onChange:w=>f(A=>({...A,customSlug:w.target.value})),disabled:wu(c.shortCodeLength)})}),g.jsx("div",{className:"lg:w-1/2",children:g.jsx(Ti,{type:"number",placeholder:"Short code length",value:c.shortCodeLength??"",onChange:w=>f(A=>({...A,shortCodeLength:w.target.value})),min:4,disabled:wu(c.customSlug)})})]}),g.jsx(P1e,{value:c.domain,onChange:w=>f(A=>({...A,domain:w})),domains:o.domains})]})]})}),g.jsx("div",{className:"w-full sm:w-1/2",children:g.jsxs(Nt,{title:"Limit access to the short URL",className:"card h-full",bodyClassName:"flex flex-col gap-y-4",children:[g.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[g.jsx("div",{className:"lg:w-1/2",children:g.jsx(ey,{label:"Enabled since",withTime:!0,maxDate:c.validUntil?wg(c.validUntil):void 0,value:c.validSince?wg(c.validSince):null,onChange:w=>f(A=>({...A,validSince:Tl(w)}))})}),g.jsx("div",{className:"lg:w-1/2",children:g.jsx(ey,{label:"Enabled until",withTime:!0,minDate:c.validSince?wg(c.validSince):void 0,value:c.validUntil?wg(c.validUntil):null,onChange:w=>f(A=>({...A,validUntil:Tl(w)}))})})]}),g.jsx(di,{label:"Maximum visits allowed:",type:"number",min:1,placeholder:"25...",value:c.maxVisits??"",onChange:w=>f(A=>({...A,maxVisits:wu(w.target.value)?Number(w.target.value):null}))})]})})]}),g.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[h&&g.jsx("div",{className:"w-full sm:w-1/2",children:g.jsx(Nt,{title:"Extra checks",className:"h-full",children:g.jsxs("p",{className:"inline-flex items-center gap-x-2",children:[g.jsxs(ja,{className:"inline-flex items-center gap-x-1.5",children:[g.jsx(Gw,{checked:c.findIfExists,onChange:w=>f(A=>({...A,findIfExists:w}))}),"Use existing URL if found"]}),g.jsx(D1e,{})]})})}),g.jsx("div",{className:Oe("w-full",{"sm:w-1/2":h}),children:g.jsxs(Nt,{title:"Configure behavior",children:[g.jsx(dL,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:c.crawlable,onChange:w=>f(A=>({...A,crawlable:w})),children:"Make it crawlable"}),g.jsx(dL,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:c.forwardQuery,onChange:w=>f(A=>({...A,forwardQuery:w})),children:"Forward query params on redirect"})]})})]})]}),g.jsx("div",{className:"text-center",children:g.jsx(Tt,{type:"submit",inline:!0,solid:!0,disabled:t||!c.longUrl,className:"max-md:w-full",children:t?"Saving...":"Save"})})]})},I1e=Tn(T9,["TagsSelector"]),O9=({domains:e,value:t,onChange:n})=>{const r=!t,i=t===cl?e.find(({isDefault:l})=>l)?.domain:t,o=_.useCallback(l=>{l!==t&&n(l)},[n,t]);return g.jsxs(qe,{buttonContent:r?"All domains":g.jsxs("span",{children:["Domain: ",g.jsx("b",{children:i})]}),buttonClassName:"w-full",menuAlignment:"right",buttonDisabled:!e.length,children:[g.jsx(qe.Item,{onClick:()=>o(),selected:r,children:"All domains"}),g.jsx(qe.Separator,{}),e.map(({domain:l,isDefault:c})=>g.jsxs(qe.Item,{selected:c?t===cl:t===l,onClick:()=>o(c?cl:l),className:"flex justify-between items-center",children:[l,c&&g.jsx(Zo,{children:"default"})]},l))]})},z1e=({startDate:e,endDate:t,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-y-3 gap-x-4",children:[g.jsx("div",{className:"flex flex-col",children:g.jsx(ey,{label:"Since",value:e,maxDate:t??void 0,disabled:n,onChange:r})}),g.jsx("div",{className:"flex flex-col",children:g.jsx(ey,{label:"Until",value:t,minDate:e??void 0,disabled:n,onChange:o=>i(o&&df(o))})})]}),_0="all",j9={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[_0]:void 0},M9=Object.keys(j9),U1e=e=>!e||!e.startDate&&!e.endDate,ty=e=>typeof e=="string"&&M9.includes(e),B1e=M9.filter(e=>e!==_0),hL=e=>e?ji(e):null,P9=(e,t)=>({startDate:hL(e),endDate:hL(t)}),F1e=e=>{if(!(!e||U1e(e)))return e.startDate&&!e.endDate?`Since ${ol(e.startDate)}`:!e.startDate&&e.endDate?`Until ${ol(e.endDate)}`:`${ol(e.startDate)} - ${ol(e.endDate)}`},mL=e=>{if(!(!e||e===_0))return ty(e)?j9[e]:F1e(e)},ta=e=>Bu(hv(Al(),e)),Kc=e=>({startDate:e,endDate:df(Al())}),L9=e=>[[()=>e==="today",()=>Kc(Bu(Al()))],[()=>e==="yesterday",()=>({startDate:ta(1),endDate:df(hv(Al(),1))})],[()=>e==="last7Days",()=>Kc(ta(7))],[()=>e==="last30Days",()=>Kc(ta(30))],[()=>e==="last90Days",()=>Kc(ta(90))],[()=>e==="last180Days",()=>Kc(ta(180))],[()=>e==="last365Days",()=>Kc(ta(365))]].find(([t])=>t())?.[1]()??{},$1e=e=>{const t=ji(e);return[[()=>vu(Bu(Al()),t),"today"],[()=>vu(ta(1),t),"yesterday"],[()=>vu(ta(7),t),"last7Days"],[()=>vu(ta(30),t),"last30Days"],[()=>vu(ta(90),t),"last90Days"],[()=>vu(ta(180),t),"last180Days"],[()=>vu(ta(365),t),"last365Days"]].find(([n])=>n())?.[1]??_0},N9=e=>ty(e)?L9(e):e,R9=e=>!!(e&&e.startDate),V1e=({startDate:e,endDate:t})=>{const n=aD(df(t??new Date),Bu(e))+1,r=hv(Bu(e),n),i=hv(df(e),1);return{startDate:r,endDate:i}},H1e=e=>{if(R9(e))return aD(e.endDate??new Date,e.startDate)},S3=({onDatesChange:e,dateRangeOrInterval:t,defaultText:n,disabled:r})=>{const i=_.useMemo(()=>mL(t)??n,[t,n]),[o,l]=_.useMemo(()=>ty(t)?[void 0,t]:[t,void 0],[t]),c=_.useCallback(f=>{ty(f)?e(L9(f),f):e(f)},[e]);return g.jsxs(qe,{buttonDisabled:r,buttonContent:i,containerClassName:"[&]:block",buttonClassName:"w-full",menuClassName:"md:min-w-90!",children:[g.jsx(qe.Item,{selected:l==="all",onClick:()=>c("all"),children:n}),g.jsx(qe.Separator,{}),B1e.map(f=>g.jsx(qe.Item,{selected:l===f,onClick:()=>c(f),children:mL(f)},f)),g.jsx(qe.Separator,{}),g.jsx(qe.Misc,{children:g.jsx(z1e,{...o,onStartDateChange:f=>c({...o,startDate:f}),onEndDateChange:f=>c({...o,endDate:f})})})]})},q1e={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},G1e=({onChange:e,selected:t={}})=>{const{excludeBots:n=!1,excludeMaxVisitsReached:r=!1,excludePastValidUntil:i=!1}=t,o=Number(n)+Number(r)+Number(i),l=_.useCallback(f=>e({...t,...f}),[e,t]),c=_.useCallback(f=>l({[f]:!t?.[f]}),[l,t]);return g.jsxs(qe,{buttonContent:g.jsxs("span",{children:["More",o>0?g.jsxs("b",{children:[" (",o,")"]}):""]}),buttonClassName:"w-full",menuAlignment:"right",children:[g.jsx(qe.Title,{children:"Visits:"}),g.jsx(qe.Item,{selected:n,onClick:()=>c("excludeBots"),children:"Ignore visits from bots"}),g.jsx(qe.Separator,{}),g.jsx(qe.Title,{children:"Short URLs:"}),g.jsx(qe.Item,{selected:r,onClick:()=>c("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),g.jsx(qe.Item,{selected:i,onClick:()=>c("excludePastValidUntil"),children:"Exclude enabled in the past"}),g.jsx(qe.Separator,{}),g.jsx(qe.Item,{disabled:t.excludeBots===void 0&&t.excludeMaxVisitsReached===void 0&&t.excludePastValidUntil===void 0,onClick:()=>e({excludeBots:void 0,excludeMaxVisitsReached:void 0,excludePastValidUntil:void 0}),className:"italic",children:"Reset to defaults"})]})},D9=({className:e,shortUrlsAmount:t,order:n,handleOrderBy:r,tagsList:i,domainsList:o})=>{const{ExportShortUrlsBtn:l,TagsSearchDropdown:c}=An(D9),[{search:f,tags:h,tagsMode:m="any",excludeTags:y,excludeTagsMode:x="any",startDate:b,endDate:C,excludeBots:w,excludeMaxVisitsReached:A,excludePastValidUntil:O,domain:P},N]=y0(),F=Fn("visits"),U=ul("filterShortUrlsByDomain"),W=ul("filterShortUrlsByExcludedTags"),[X,ae]=_.useState(),ce=_.useCallback(({startDate:Y,endDate:k},z)=>{N({startDate:Tl(Y)??void 0,endDate:Tl(k)??void 0}),ae(z)},[N]),re=_.useCallback(Y=>N({search:Y||void 0}),[N]),J=_.useCallback(Y=>N({domain:Y}),[N]),oe=_.useCallback(Y=>N({tags:Y}),[N]),_e=_.useCallback(Y=>N({tagsMode:Y}),[N]),se=_.useCallback(Y=>N({excludeTags:Y}),[N]),ue=_.useCallback(Y=>N({excludeTagsMode:Y}),[N]);return g.jsxs("div",{className:Oe("flex flex-col gap-y-4",e),children:[g.jsx(jf,{defaultValue:f,onChange:re}),g.jsxs("div",{className:"flex flex-col xl:flex-row-reverse justify-between gap-y-4",children:[g.jsxs("div",{className:Oe("flex flex-col lg:flex-row gap-x-2 gap-y-4",{"min-w-3/4":W,"min-w-2/3":!W}),children:[g.jsxs("div",{className:"flex flex-col md:flex-row gap-x-2 gap-y-4 grow",children:[g.jsx("div",{className:"grow",children:g.jsx(S3,{defaultText:"All short URLs",dateRangeOrInterval:X??P9(b,C),onDatesChange:ce})}),g.jsxs("div",{className:Oe("grid lg:flex gap-x-2 gap-y-4",{"grid-cols-2":W}),children:[g.jsx(c,{title:"Filter by tag",prefix:"With",tags:i.tags,selectedTags:h,onTagsChange:oe,mode:m,onModeChange:_e,buttonClassName:"w-full"}),W&&g.jsx(c,{title:"Filter by excluded tag",prefix:"Without",tags:i.tags,selectedTags:y,onTagsChange:se,mode:x,onModeChange:ue,buttonClassName:"w-full"})]})]}),g.jsxs("div",{className:Oe("grid lg:flex gap-x-2 gap-y-4",{"grid-cols-2":U}),children:[U&&g.jsx(O9,{domains:o.domains,onChange:J,value:P}),g.jsx(G1e,{selected:{excludeBots:w??F?.excludeBots,excludeMaxVisitsReached:A,excludePastValidUntil:O},onChange:N})]})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"max-xl:w-1/2 xl:hidden",children:g.jsx(tm,{containerClassName:"[&]:block",buttonClassName:"w-full",prefixed:!1,items:q1e,order:n,onChange:({field:Y,dir:k})=>r(Y,k)})}),g.jsx("div",{className:"max-xl:w-1/2",children:g.jsx(l,{amount:t})})]})]})]})},Y1e=Tn(D9,["ExportShortUrlsBtn","TagsSearchDropdown"]);function Sh({currentOrder:e,field:t,className:n="ml-1"}){return!e.dir||e.field!==t?null:g.jsx(Be,{icon:e.dir==="ASC"?iH:EN,className:n})}const W1e=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=ms(),o=_.useCallback(l=>`${i}/list-short-urls/${l}${t}`,[t,i]);return r<=1?g.jsx("div",{"data-testid":"empty-gap",className:"pb-4"}):g.jsx("div",{"data-testid":"short-urls-paginator",className:Oe("sticky bottom-0 py-4 -mx-0.5","flex justify-around","bg-lm-primary dark:bg-dm-primary","border-t border-lm-border dark:border-dm-border"),children:g.jsx(Cy,{urlForPage:o,currentPage:n,pagesCount:r})})},K1e={field:"dateCreated",dir:"DESC"},k9=Na(({listShortUrls:e,shortUrlsList:t})=>{const{ShortUrlsTable:n,ShortUrlsFilteringBar:r}=An(k9),{page:i}=Cf(),o=Or(),[{tags:l,tagsMode:c,excludeTags:f,excludeTagsMode:h,search:m,startDate:y,endDate:x,orderBy:b,excludeBots:C,excludePastValidUntil:w,excludeMaxVisitsReached:A,domain:O},P]=y0(),N=lS(),[F,U]=_.useState(b??N.shortUrlsList?.defaultOrdering??K1e),{pagination:W}=t?.shortUrls??{},X=_.useMemo(()=>C??N.visits?.excludeBots,[C,N.visits?.excludeBots]),ae=_.useCallback((se,ue)=>{P({orderBy:{field:se,dir:ue}}),U({field:se,dir:ue})},[P]),ce=se=>()=>ae(se,s6({currentOrderDir:F.dir,currentField:F.field,newField:se})),re=se=>g.jsx(Sh,{currentOrder:F,field:se}),J=_.useCallback(se=>P({tags:[...new Set([...l,se])]}),[l,P]),oe=_.useCallback(({field:se,dir:ue})=>X&&se==="visits"?{field:"nonBotVisits",dir:ue}:{field:se,dir:ue},[X]),_e=h3();return _.useEffect(()=>{e({page:i,searchTerm:m,tags:l,tagsMode:c,excludeTags:f,excludeTagsMode:h,startDate:y,endDate:x,orderBy:oe(F),excludePastValidUntil:w,excludeMaxVisitsReached:A,domain:O})},[e,oe,i,m,l,y,x,F,c,w,A,O,f,h]),g.jsxs(d3,{value:_e,children:[g.jsx(r,{shortUrlsAmount:t.shortUrls?.pagination.totalItems,order:F,handleOrderBy:ae,className:"mb-4"}),g.jsx(m3,{type:"short-urls",className:"mb-4"}),g.jsxs(Nt,{bodyClassName:Oe({"pb-0":!t.loading}),children:[g.jsx(n,{shortUrlsList:t,orderByColumn:ce,renderOrderIcon:re,onTagClick:J}),!t.loading&&g.jsx(W1e,{paginator:W,currentQueryString:o.search})]})]})},()=>[ia.visits]),Z1e=Tn(k9,["ShortUrlsTable","ShortUrlsFilteringBar"]),A2=({children:e,danger:t})=>g.jsx($e.Row,{children:g.jsx($e.Cell,{colSpan:6,className:Oe("text-center",{"text-danger font-bold":t}),children:e})}),X1e=({shortUrlsList:e,onTagClick:t,ShortUrlsRow:n})=>{const{error:r,loading:i,shortUrls:o}=e;return r?g.jsx(A2,{danger:!0,children:"Something went wrong while loading short URLs :("}):i?g.jsx(A2,{children:"Loading..."}):!o||o.data.length===0?g.jsx(A2,{children:"No results found"}):o?.data.map(l=>g.jsx(n,{shortUrl:l,onTagClick:t},l.shortUrl))},I9=({orderByColumn:e,renderOrderIcon:t,shortUrlsList:n,onTagClick:r})=>{const{ShortUrlsRow:i}=An(I9),o=Oe({"cursor-pointer":!!e});return g.jsx($e,{className:"mb-[-1px] w-full",header:g.jsxs($e.Row,{children:[g.jsxs($e.Cell,{className:o,onClick:e?.("dateCreated"),children:["Created at ",t?.("dateCreated")]}),g.jsxs($e.Cell,{className:o,onClick:e?.("shortCode"),children:["Short URL ",t?.("shortCode")]}),g.jsxs($e.Cell,{children:[g.jsxs(xf,{className:Oe("p-0",o),onClick:e?.("title"),children:["Title ",t?.("title")]}),"  /  ",g.jsxs(xf,{className:Oe("p-0",o),onClick:e?.("longUrl"),children:[g.jsx("span",{className:"whitespace-nowrap",children:"Long URL"})," ",t?.("longUrl")]})]}),g.jsx($e.Cell,{children:"Tags"}),g.jsx($e.Cell,{className:o,onClick:e?.("visits"),children:g.jsxs("span",{className:"whitespace-nowrap",children:["Visits ",t?.("visits")]})}),g.jsx($e.Cell,{colSpan:2,"aria-hidden":!0})]}),children:g.jsx(X1e,{ShortUrlsRow:i,shortUrlsList:n,onTagClick:r})})},Q1e=Tn(I9,["ShortUrlsRow"]),J1e=(e,t)=>{e.factory("ShortUrlsList",Z1e),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.factory("ShortUrlsTable",Q1e),e.factory("ShortUrlsRow",b1e),e.factory("ShortUrlsRowMenu",C1e),e.decorator("ShortUrlsRowMenu",t(null,["shortUrlDeleted","deleteShortUrl"])),e.factory("ShortUrlForm",I1e),e.decorator("ShortUrlForm",t(["tagsList","domainsList"])),e.factory("CreateShortUrl",u1e),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.factory("EditShortUrl",c1e),e.decorator("EditShortUrl",t(["shortUrlsDetails","shortUrlEdition"],["getShortUrlsDetails","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>f1e),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["resetDeleteShortUrl"])),e.factory("ExportShortUrlsBtn",d1e),e.factory("ShortUrlsFilteringBar",Y1e),e.decorator("ShortUrlsFilteringBar",t(["tagsList","domainsList"])),e.serviceFactory("shortUrlsListReducerCreator",Vye,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",n=>n.reducer,"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",A1e,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",n=>n.reducer,"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",j1e,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",n=>n.reducer,"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",Bye,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",n=>n.reducer,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlsDetailsReducerCreator",M1e,"apiClientFactory"),e.serviceFactory("shortUrlsDetailsReducer",n=>n.reducer,"shortUrlsDetailsReducerCreator"),e.serviceFactory("listShortUrls",$ye,"apiClientFactory"),e.serviceFactory("createShortUrl",E1e,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",n=>n.resetCreateShortUrl,"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",Uye,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",n=>n.resetDeleteShortUrl,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>K7),e.serviceFactory("getShortUrlsDetails",n=>n.getShortUrlsDetails,"shortUrlsDetailsReducerCreator"),e.serviceFactory("editShortUrl",O1e,"apiClientFactory")},ebe=({tag:e,onClose:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:l,error:c,deleted:f,errorData:h}=i;return g.jsxs(co,{title:"Delete tag",variant:"danger",open:n,onClose:t,onClosed:()=>f&&o(e),onConfirm:async()=>{await r(e),t()},confirmText:l?"Deleting tag...":"Delete tag",confirmDisabled:l,children:["Are you sure you want to delete tag ",g.jsx("b",{children:e}),"?",c&&g.jsx(Gr,{variant:"error",size:"sm",className:"mt-2",children:g.jsx(so,{errorData:h,fallbackMessage:"Something went wrong while deleting the tag :("})})]})},z9=({tag:e,editTag:t,onClose:n,tagEdited:r,isOpen:i,tagEdit:o})=>{const{ColorGenerator:l}=An(z9),[c,f]=_.useState(e),[h,m]=_.useState(l.getColorForKey(e)),{editing:y,error:x,edited:b,errorData:C}=o,w=_.useCallback(async()=>{await t({oldName:e,newName:c,color:h}),n()},[h,t,c,n,e]),A=_.useCallback(()=>b&&r({oldName:e,newName:c,color:h}),[h,b,c,e,r]);return g.jsxs(co,{title:"Edit tag",open:i,onClose:n,onClosed:A,onConfirm:w,confirmText:y?"Saving...":"Save",confirmDisabled:y,children:[g.jsxs("div",{className:"flex",children:[g.jsx(S9,{color:h,onChange:m,className:"rounded-r-none",name:"tag-color"}),g.jsx(Ti,{className:"grow [&]:rounded-l-none",value:c,placeholder:"Tag",required:!0,onChange:({target:O})=>f(O.value)})]}),x&&g.jsx(Gr,{variant:"error",size:"sm",className:"mt-2",children:g.jsx(so,{errorData:C,fallbackMessage:"Something went wrong while editing the tag :("})})]})},tbe=Tn(z9,["ColorGenerator"]),w0=({color:e,testId:t})=>g.jsx("div",{"data-testid":t,style:{backgroundColor:e},className:Oe("inline-block w-[20px] h-[20px] rounded-full","align-[-4px] mr-1.5")}),U9=({tags:e,selectedTags:t,onTagsChange:n,mode:r="any",onModeChange:i,buttonClassName:o,title:l,prefix:c})=>{const{ColorGenerator:f}=An(U9),h=Fn("shortUrlCreation")?.tagFilteringMode??"startsWith",{searchResults:m,onSearch:y}=e6({tags:e,selectedTags:t,searchMode:h}),x=_.useCallback(w=>n?.([...new Set([...t,Xw(w)])]),[n,t]),b=_.useCallback(w=>n?.(t.filter(A=>A!==w)),[n,t]),C=_.useCallback(w=>{n?.([]),w.target.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0}))},[n]);return g.jsxs(qe,{buttonContent:t.length?g.jsxs("span",{children:[c," ",g.jsx("b",{children:Sn(t.length)})," tag",t.length>1&&"s"]}):g.jsxs(g.Fragment,{children:[c," tags..."]}),menuAlignment:"right",menuClassName:"min-w-72 w-full",buttonClassName:o,children:[g.jsxs(qe.Title,{children:[l,":"]}),g.jsxs(qe.Misc,{className:"flex flex-col gap-3",children:[g.jsx(XR,{size:"sm",searchResults:m,onSearch:y,onSelectSearchResult:x,renderSearchResult:w=>g.jsxs("div",{className:"flex items-center",children:[g.jsx(w0,{color:f.getColorForKey(w)}),w]}),onKeyDownCapture:w=>{w.key==="Escape"&&m&&w.stopPropagation()}}),t.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("ul",{className:"flex gap-1 flex-wrap",children:t.map((w,A)=>g.jsx("li",{children:g.jsx(x0,{text:w,colorGenerator:f,onClose:()=>b(w)})},`${w}${A}`))}),g.jsxs(Tt,{variant:"secondary",size:"sm",onClick:C,className:"gap-1!",children:[g.jsx(Be,{icon:fy})," Clear tags"]})]})]}),g.jsx(qe.Separator,{}),g.jsx(qe.Title,{children:"Mode:"}),g.jsxs(qe.Misc,{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"flex",children:[g.jsxs(Tt,{className:"w-1/2 rounded-r-none gap-1! border-r-0",size:"sm",solid:r==="any",onClick:()=>i?.("any"),children:[g.jsx(Be,{icon:mH})," Any"]}),g.jsxs(Tt,{className:"w-1/2 rounded-l-none gap-1!",size:"sm",solid:r==="all",onClick:()=>i?.("all"),children:[g.jsx(Be,{icon:SN})," All"]})]}),g.jsxs(Zo,{children:[c," ",g.jsx("b",{children:r})," of the tags"]})]})]})},nbe=Tn(U9,["ColorGenerator"]),B9=({onChange:e,...t})=>{const{ColorGenerator:n}=An(B9),r=Fn("shortUrlCreation")?.tagFilteringMode??"startsWith";return g.jsx(WK,{...t,onTagsChange:e,getColorForTag:i=>n.getColorForKey(i),size:"lg",searchMode:r})},rbe=Tn(B9,["ColorGenerator"]),aw="shlink/tagDelete",ibe={deleting:!1,deleted:!1,error:!1},F9=un(`${aw}/tagDeleted`),abe=e=>{const t=or(`${aw}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=jt({name:aw,initialState:ibe,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:zi(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},C3="shlink/tagEdit",obe={editing:!1,edited:!1,error:!1},$9=un(`${C3}/tagEdited`),sbe=(e,t)=>or(`${C3}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag({oldName:n,newName:r}),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),lbe=e=>jt({name:C3,initialState:obe,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:zi(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{oldName:i,newName:o}=r;return{oldName:i,newName:o,editing:!1,edited:!0,error:!1}})}}),E3="shlink/tagsList",T2={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},pL=(e,t)=>n=>n===e?t:n,gL=(e,t)=>e.filter(n=>n!==t),ube=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:l}=i,c=n[r];return{...n,[r]:{...c,visitsSummary:{total:c.visitsSummary.total+o+l,bots:c.visitsSummary.bots+o,nonBots:c.visitsSummary.nonBots+l}}}},{...t}),cbe=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n?.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),fbe=e=>or(`${E3}/listTags`,async()=>{const{data:t}=await e().tagsStats(),n=t.reduce((r,{tag:i,...o})=>(r[i]=o,r),{});return{tags:Object.keys(n),stats:n}}),V9=un(`${E3}/filterTags`),dbe=(e,t)=>jt({name:E3,initialState:T2,reducers:{},extraReducers:n=>{n.addCase(V9,(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})=>({...T2,error:!0,errorData:zi(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...T2,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(F9,({tags:r,filteredTags:i,...o},{payload:l})=>({...o,tags:gL(r,l),filteredTags:gL(i,l)})),n.addCase($9,({tags:r,filteredTags:i,stats:o,...l},{payload:c})=>({...l,stats:{...o,[c.newName]:o[c.oldName]},tags:r.map(pL(c.oldName,c.newName)).sort(),filteredTags:i.map(pL(c.oldName,c.newName)).sort()})),n.addCase(Ff,(r,{payload:i})=>({...r,stats:ube(cbe(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(l=>!r.includes(l)))}))}}),hbe={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},H9=Na(({filterTags:e,tagsList:t})=>{const{TagsTable:n}=An(H9),r=lS(),[i,o]=_.useState(r.tags?.defaultOrdering??{}),l=_.useMemo(()=>{const f=t.filteredTags.map(h=>{const m=t.stats[h],y=r.visits?.excludeBots?m.visitsSummary.nonBots:m.visitsSummary.total;return{tag:h,visits:y,shortUrls:m?.shortUrlsCount??0}});return l6(f,i)},[i,r.visits?.excludeBots,t.filteredTags,t.stats]),c=h3();return t.loading?g.jsx(Wo,{loading:!0}):t.error?g.jsx(Gr,{variant:"error",children:g.jsx(so,{errorData:t.errorData,fallbackMessage:"Error loading tags :("})}):g.jsx(d3,{value:c,children:g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx(jf,{onChange:e}),g.jsx("div",{className:"flex flex-col lg:flex-row lg:justify-end",children:g.jsx("div",{className:"lg:w-1/2",children:g.jsx(tm,{containerClassName:"[&]:block",buttonClassName:"w-full",items:hbe,order:i,onChange:o})})}),g.jsx(m3,{type:"tags"}),g.jsx(n,{sortedTags:l,currentOrder:i,orderByColumn:f=>()=>o(Qw({currentField:i.field,currentOrderDir:i.dir,newField:f}))})]})})},()=>[ia.visits]),mbe=Tn(H9,["TagsTable"]),pbe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:o})=>o?.contains("visits-table"))||document.querySelector(".modal")||r()};return Aee({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},gbe=(e,t)=>{const[n,r]=_.useState(t),i=_.useCallback(o=>{const{location:l,history:c}=window,f=JR(l.search);f[e]=o,c.pushState(null,"",`${l.pathname}?${Zw(f)}`),r(o)},[e]);return[n,i]},A3=e=>{const t=Ku();return _.useMemo(()=>t[e]?.split(",").filter(Boolean)??[],[e,t])},vbe=(e,t)=>{const n=_.useCallback(()=>t(`(max-width: ${e}px)`).matches,[t,e]),[r,i]=_.useState(n());return _.useEffect(()=>{const o=()=>i(n());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[n]),r},ybe=(e,t,n)=>{_.useEffect(()=>{if(!n)return()=>{};const r=new AbortController;return document.addEventListener("keydown",i=>i.key===e&&t(),{signal:r.signal}),()=>r.abort()},[n,t,e])},bbe=20,q9=({sortedTags:e,orderByColumn:t,currentOrder:n})=>{const{TagsTableRow:r}=An(q9),i=_.useRef(!0),{page:o=1}=Ku(),[l,c]=gbe("page",Number(o)),f=_.useCallback(b=>{c(b),scrollTo(0,0)},[c]),h=af(e,bbe),m=h.length>1,y=h[l-1]??[];_.useEffect(()=>{i.current||f(1),i.current=!1},[f,e]);const x="cursor-pointer top-(--header-height) sticky-cell";return g.jsxs(Nt,{bodyClassName:m?"pb-1":"",children:[g.jsxs($e,{header:g.jsxs($e.Row,{children:[g.jsxs($e.Cell,{onClick:t("tag"),className:x,children:["Tag ",g.jsx(Sh,{currentOrder:n,field:"tag"})]}),g.jsxs($e.Cell,{onClick:t("shortUrls"),className:`lg:text-right ${x}`,children:["Short URLs ",g.jsx(Sh,{currentOrder:n,field:"shortUrls"})]}),g.jsxs($e.Cell,{onClick:t("visits"),className:`lg:text-right ${x}`,children:["Visits ",g.jsx(Sh,{currentOrder:n,field:"visits"})]}),g.jsx($e.Cell,{className:x,children:g.jsx("span",{className:"sr-only",children:"Options"})})]}),children:[y.length===0&&g.jsx($e.Row,{children:g.jsx($e.Cell,{colSpan:4,className:"text-center",children:"No tags found"})}),y.map(b=>g.jsx(r,{tag:b},b.tag))]}),m&&g.jsx("div",{className:Oe("sticky bottom-0 py-4 -mx-0.5","flex justify-around","bg-lm-primary dark:bg-dm-primary","border-t border-lm-border dark:border-dm-border"),"data-testid":"tags-paginator",children:g.jsx(Cy,{pagesCount:h.length,currentPage:l,onPageChange:f})})]},l)},xbe=Tn(q9,["TagsTableRow"]),_be=({tag:e,colorGenerator:t})=>g.jsx(w0,{color:t.getColorForKey(e)}),G9=({tag:e})=>{const{DeleteTagConfirmModal:t,EditTagModal:n,ColorGenerator:r}=An(G9),{flag:i,setToFalse:o,setToTrue:l}=Cn(),{flag:c,setToFalse:f,setToTrue:h}=Cn(),m=ms(),y=h0();return g.jsxs($e.Row,{className:"max-lg:relative",children:[g.jsxs($e.Cell,{columnName:"Tag",children:[g.jsx(_be,{tag:e.tag,colorGenerator:r})," ",e.tag]}),g.jsx($e.Cell,{className:"lg:text-right",columnName:"Short URLs",children:g.jsx(Ir,{to:`${m}/list-short-urls/1?tags=${encodeURIComponent(e.tag)}`,children:Sn(e.shortUrls)})}),g.jsx($e.Cell,{className:"lg:text-right",columnName:"Visits",children:g.jsx(Ir,{to:`${m}/tag/${e.tag}/visits`,children:Sn(e.visits)})}),g.jsx($e.Cell,{className:"lg:text-right max-lg:absolute max-lg:top-1.25 max-lg:right-0 max-lg:p-0",children:g.jsxs(tn,{menuAlignment:"right",children:[g.jsxs(tn.Item,{onClick:h,className:"gap-1.5",children:[g.jsx(Be,{icon:wN})," Edit"]}),g.jsxs(tn.Item,{className:"gap-1.5",disabled:!y||!y.canAddItemWithName(e.tag),onClick:()=>y?.addItemToCompare({name:e.tag,query:e.tag,style:r.stylesForKey(e.tag)}),children:[g.jsx(Be,{icon:uy})," Compare visits"]}),g.jsx(tn.Separator,{}),g.jsxs(tn.Item,{className:"[&]:text-danger gap-1.5",onClick:l,children:[g.jsx(Be,{icon:NV})," Delete tag"]})]})}),g.jsx(n,{tag:e.tag,onClose:f,isOpen:c}),g.jsx(t,{tag:e.tag,onClose:o,isOpen:i})]})},wbe=Tn(G9,["DeleteTagConfirmModal","EditTagModal","ColorGenerator"]),Sbe=(e,t)=>{e.factory("TagsSelector",rbe),e.factory("TagsSearchDropdown",nbe),e.serviceFactory("DeleteTagConfirmModal",()=>ebe),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.factory("EditTagModal",tbe),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.factory("TagsTableRow",wbe),e.factory("TagsTable",xbe),e.factory("TagsList",mbe),e.decorator("TagsList",t(["tagsList","mercureInfo"],["filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",lbe,"editTag"),e.serviceFactory("tagEditReducer",n=>n.reducer,"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",abe,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",n=>n.reducer,"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",dbe,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",n=>n.reducer,"tagsListReducerCreator"),e.serviceFactory("listTags",fbe,"apiClientFactory"),e.serviceFactory("filterTags",()=>V9),e.serviceFactory("deleteTag",n=>n.deleteTag,"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>F9),e.serviceFactory("editTag",sbe,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>$9)},Cbe=new dD,Ebe=e=>Cbe.parse(e),Abe=6,vL="0123456789ABCDEF";function Tbe(){return`#${sS(Abe,()=>vL[Math.floor(Math.random()*vL.length)]).join("")}`}const yL=e=>e.toLowerCase().trim();class Obe{constructor(t){this.storage=t,this.colors=this.storage?.getTagColors()??{},this.lights={}}colors;lights;getColorForKey(t){const n=yL(t);return this.colors[n]||this.setColorForKey(n,Tbe())}setColorForKey(t,n){const r=yL(t);return this.colors[r]=n,this.storage?.storeTagColors(this.colors),n}stylesForKey(t){const n=this.getColorForKey(t);return{backgroundColor:n,color:this.isLightColor(n)?"#222":"#fff"}}isLightColor(t){const n=t.substring(1);return this.lights[n]===void 0&&(this.lights[n]=Kw(n)),this.lights[n]}}const Y9=({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)},jbe=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);Y9(e,i,n)};class Mbe{constructor(t,n){this.fetch=t,this.window=n}async saveImage(t,n){const r=await this.fetch(t).then(o=>o.blob()),i=URL.createObjectURL(r);Y9(this.window,i,n)}}class Pbe{constructor(t,n){this.window=t,this.jsonToCsv=n}exportVisits=(t,n)=>{n.length&&this.exportCsv(t,n)};exportShortUrls=t=>{t.length&&this.exportCsv("short_urls.csv",t)};exportCsv=(t,n)=>{const r=this.jsonToCsv(n);jbe(this.window,r,t)}}function Lbe(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",Mbe,"fetch","window"),e.service("ColorGenerator",Obe,"TagColorsStorage"),e.constant("jsonToCsv",Ebe),e.service("ReportExporter",Pbe,"window","jsonToCsv"),e.serviceFactory("useTimeoutToggle",()=>wy)}const Cm=({visits:e,shortUrl:t,children:n,title:r})=>g.jsx("header",{children:g.jsxs(Nt,{children:[g.jsxs("h2",{className:"flex justify-between items-center",children:[g.jsx(b0,{}),g.jsx("span",{className:"text-center hidden sm:block",children:g.jsx("small",{children:r})}),g.jsxs("span",{className:Oe("px-3 py-1.5 rounded-md ml-3","font-bold text-white text-2xl","bg-lm-main dark:bg-dm-main"),"data-testid":"badge",children:["Visits:"," ",g.jsx(_9,{visitsCount:e.length,shortUrl:t})]})]}),g.jsx("h3",{className:"text-center block sm:hidden mt-3",children:g.jsx("small",{children:r})}),n&&g.jsx("div",{className:"md:mt-3",children:n})]})}),T3=({children:e,className:t})=>g.jsx("div",{className:Oe("flex justify-between items-center",t),children:e}),W9=({title:e,footer:t,children:n})=>g.jsxs(ln,{role:"document",children:[g.jsx(ln.Header,{children:e}),g.jsx(ln.Body,{children:n}),t&&g.jsx(ln.Footer,{className:"sticky bottom-0",children:t})]}),K9=_.createContext(null),{Provider:xwe}=K9,O3=e=>{const t=_.useContext(K9)??void 0,n=_.useMemo(()=>t?{}:{width:"100%",height:e},[e,t]);return{ChartWrapper:t?_.Fragment:Cre,dimensions:t,wrapperDimensions:n}},Z9={color:"white",background:"rgb(0 0 0 / .9)",border:"none",borderRadius:"5px"},Nbe={marginBottom:"5px",fontWeight:"bold"},X9={contentStyle:Z9,labelStyle:Nbe,itemStyle:{padding:0}},bL=["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],Q9=e=>bL[e%bL.length],ny=()=>ss()?"#46e587":"#1DAA58",Rbe=()=>ss()?"rgba(70, 229, 135, 0.4)":"rgba(29, 170, 88, 0.4)",Dbe=({chartData:e,showNumbers:t})=>g.jsx("ul",{className:"space-y-1",children:e.map(({name:n,color:r,value:i},o)=>g.jsxs("li",{className:"flex items-center",children:[g.jsx(w0,{color:r,testId:`color-bullet-${o}`}),g.jsxs("small",{className:"truncate grow","data-testid":`name-${o}`,children:[n,t&&g.jsxs("b",{children:[" (",Sn(i),")"]})]})]},n))}),xL=e=>_.useMemo(()=>Object.entries(e).map(([t,n],r)=>({name:t,value:n,color:Q9(r)})),[e]),kbe=({stats:e,prevStats:t,showNumbersInLegend:n})=>{const r=xL(e),i=xL(t),o=i.length>0,l=ss()?PZ:MZ,{ChartWrapper:c,dimensions:f,wrapperDimensions:h}=O3(300);return g.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-y-4",children:[g.jsx("div",{className:"md:flex-7",children:g.jsx("div",{style:h,children:g.jsx(c,{children:g.jsxs(Fve,{...f,children:[g.jsx(kC,{formatter:Sn,contentStyle:Z9,itemStyle:{color:"white"}}),g.jsx(W_,{data:r,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"100%",innerRadius:o?"65%":"50%",animationBegin:0,children:r.map((m,y)=>g.jsx(ll,{fill:m.color,stroke:l},`${m.name}-${y}`))}),o&&g.jsx(W_,{data:i,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"55%",innerRadius:"20%",animationBegin:0,stroke:l,fill:ny()})]})})})}),g.jsx("div",{className:"md:flex-5",children:g.jsx(Dbe,{chartData:r,showNumbers:n})})]})},_L=({title:e,...t})=>{const{flag:n,toggle:r}=Cn();return g.jsx(W9,{title:g.jsxs(T3,{children:[e,g.jsx(yl,{checked:n,onChange:r,children:"Show numbers"})]}),children:g.jsx(kbe,{...t,showNumbersInLegend:n})})},Ibe=_.forwardRef(({visitsGroups:e},t)=>{const n=_.useMemo(()=>Object.entries(e),[e]);return n.length===0?null:g.jsx("ul",{className:"mt-2 flex flex-wrap justify-center gap-4",ref:t,children:n.map(([r,i],o)=>g.jsxs("li",{className:"inline",children:[g.jsx(w0,{color:J9(i)}),g.jsxs("strong",{children:[r," (",Sn(i.length),")"]})]},`${r}${o}`))})}),zbe={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},Ube={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},Bbe={hourly:BQ,daily:Ly,weekly:UQ,monthly:cv},j3={hourly:e=>fv(e,"yyyy-MM-dd HH:00"),daily:e=>ol(e),weekly(e){const t=ol(Rh(e)),n=ol(WQ(e));return`${t} - ${n}`},monthly:e=>fv(e,"yyyy-MM")},Fbe=e=>{const t=Object.values(e).filter(o=>o.length>0);if(t.length===0)return"monthly";const n=new Date,r=t.map(o=>bl(o[o.length-1].date)),i=iD(r);return[[()=>Ly(n,i)<=2,"hourly"],[()=>cv(n,i)<=1,"daily"],[()=>cv(n,i)<=6,"weekly"]].find(([o])=>o())?.[1]??"monthly"},$be=(e,t)=>Object.keys(t).reduce((n,r)=>(n[r]=$6(t[r],i=>j3[e](bl(i.date))),n),{}),Vbe=(e,t)=>t.reduce((n,r)=>{const i=j3[e](bl(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),Hbe=(e,t)=>{const n=Object.values(t).filter(m=>m.length>0).map(m=>[...m].reverse());if(n.length===0)return[];const r=Bbe[e],i=j3[e],o=Ube[e],l=n.flat(),c=bl(l[0].date),f=bl(l[l.length-1].date),h=r(f,c)||1;return[{formattedDate:i(c),date:c},...sS(h,m=>{const y=NQ(c,o(m));return{formattedDate:i(y),date:y}})]},J9=e=>{if(e.color)return e.color;const t={main:Mh(),highlighted:t_,previous:ny()};return e.type?t[e.type]:Mh()},wL=(e,t)=>_.useMemo(()=>Object.values(e).find(n=>n.type===t)??[],[e,t]),qbe=(e,t,n)=>{const r=wL(e,"main"),i=wL(e,"highlighted"),o=_.useMemo(()=>n?Vbe(t,r):{},[n,t,r]),l=_.useCallback((c,{payload:f})=>{const h=o[f.formattedDate]??[];n?.(h===i?[]:h)},[o,i,n]);return n&&{cursor:"pointer",onClick:l}},ez=({visitsGroups:e,setSelectedVisits:t,matchMedia:n,onDateRangeChange:r})=>{const[i,o]=_.useState(Fbe(e)),l=vbe(767,n??window.matchMedia),c=_.useMemo(()=>{const J=$be(i,e),oe=Object.keys(J);return Hbe(i,e).map(({formattedDate:_e,date:se})=>({date:se,formattedDate:_e,...oe.reduce((ue,Y)=>(ue[Y]=J[Y][_e]??0,ue),{})}))},[i,e]),f=qbe(e,i,t),{flag:h,toggle:m,setToFalse:y}=Cn(),x=_.useId(),b=_.useRef(null),[C,w]=_.useState(l?300:400);_.useLayoutEffect(()=>{if(!h)return w(l?300:400),()=>{};const J=new ResizeObserver(()=>{const oe=window.innerHeight,{height:_e}=b.current.getBoundingClientRect();w(oe-_e-98)});return J.observe(b.current),()=>J.disconnect()},[h,l,b]),ybe("Escape",y,h);const{ChartWrapper:A,dimensions:O,wrapperDimensions:P}=O3(C),[N,F]=_.useState(),[U,W]=_.useState(),X=_.useCallback(()=>{F(void 0),W(void 0)},[]),ae=_.useCallback((J,oe)=>{const _e=J.activeIndex&&c[J.activeIndex];oe.button===0&&_e&&F(_e)},[c]),ce=_.useCallback(J=>{const oe=J.activeIndex&&c[J.activeIndex];N&&oe&&W(oe)},[c,N]),re=_.useCallback(()=>{if(!N||!U){X();return}const J=[N.date,U.date],oe=kQ(J),_e=iD(J);X(),r({startDate:oe,endDate:_e})},[r,X,U,N]);return g.jsxs(ln,{className:Oe({"fixed top-0 bottom-0 left-0 right-0 z-1030":h}),"data-testid":"line-chart-card",children:[g.jsxs(ln.Header,{role:"heading","aria-level":4,className:"flex justify-between items-center",children:["Visits over time",g.jsxs("div",{className:"flex content-center gap-1",children:[g.jsx(Sy,{"aria-label":h?"Collapse":"Expand","aria-expanded":h,"aria-controls":x,size:"sm",onClick:m,children:g.jsx(Be,{icon:h?sH:qV})}),g.jsx(qe,{buttonContent:"Group by",buttonSize:"sm",buttonVariant:"link",buttonClassName:"[&]:p-0",menuAlignment:"right",menuClassName:"w-40",children:Object.entries(zbe).map(([J,oe])=>g.jsx(qe.Item,{selected:i===J,onClick:()=>o(J),children:oe},J))})]})]}),g.jsxs(ln.Body,{id:x,children:[g.jsx(A,{...P,children:g.jsxs(Pve,{className:"select-none",data:c,...O,onMouseDown:ae,onMouseMove:ce,onMouseUp:re,children:[g.jsx(n3,{dataKey:"formattedDate"}),g.jsx(r3,{tickFormatter:Sn,yAxisId:"1"}),g.jsx(kC,{formatter:Sn,...X9}),g.jsx(e3,{strokeOpacity:ss()?.1:.9}),Object.entries(e).map(([J,oe])=>oe.length>0&&g.jsx(_7,{yAxisId:"1",dataKey:J,type:"monotone",stroke:J9(oe),strokeWidth:2,activeDot:oe.type==="previous"?void 0:f,strokeDasharray:oe.type==="previous"?"8 3":void 0},J)),N&&U&&g.jsx(d7,{yAxisId:"1",x1:N.formattedDate,x2:U.formattedDate})]})}),g.jsx(Ibe,{visitsGroups:e,ref:b})]})]})},Gbe=({ranges:e,value:t,setValue:n})=>g.jsxs(qe,{buttonContent:"Paginate",buttonVariant:"link",buttonClassName:"[&]:p-0",buttonSize:"sm",menuAlignment:"right",children:[e.map(r=>g.jsxs(qe.Item,{selected:r===t,onClick:()=>n(r),children:[g.jsx("b",{children:r})," items per page"]},r)),g.jsx(qe.Separator,{}),g.jsx(qe.Item,{disabled:t===1/0,onClick:()=>n(1/0),children:g.jsx("i",{children:"Clear pagination"})})]}),SL=e=>typeof e!="string"||e.startsWith("hidden_"),Ybe=({stats:e,prevStats:t,highlightedStats:n,highlightedLabel:r,max:i,onClick:o})=>{const l=_.useMemo(()=>Object.entries(e).map(([y,x])=>{const b=n?.[y]??0,C=t?.[y]??0,w=SL(y);return{name:y,amount:Math.max(x,C),nonHighlightedAmount:w?null:x-b,highlightedAmount:w?null:b,prevAmount:w?null:C}}),[e,t,n]),c=_.useMemo(()=>{const y=l.reduce((x,{name:b})=>x>b.length?x:b.length,0);return Math.min(150,y*7)},[l]),{ChartWrapper:f,dimensions:h,wrapperDimensions:m}=O3(Math.max(300,l.length*(t?44:22)));return g.jsx(f,{...m,children:g.jsxs(Vve,{layout:"vertical",data:l,barCategoryGap:3,...h,children:[g.jsx(n3,{type:"number",dataKey:"amount",tickFormatter:Sn,domain:i?[0,i]:void 0}),g.jsx(r3,{type:"category",dataKey:"name",width:c,interval:0,style:{fontSize:".8rem"},tickFormatter:y=>SL(y)?"":y}),g.jsx(e3,{strokeOpacity:ss()?.05:.9}),g.jsx(kC,{filterNull:!0,...X9,formatter:(y,x)=>[Sn(y),x==="highlightedAmount"?r:x==="prevAmount"?"Previous period":n?"Non-selected":"Visits"]}),g.jsx(Bg,{dataKey:"nonHighlightedAmount",stackId:"main",cursor:"pointer",fill:Mh(),onClick:({name:y})=>y&&o?.(y),children:l.map(y=>g.jsx(ll,{fill:OZ(),stroke:Mh(),strokeWidth:2},y.name))}),n&&g.jsx(Bg,{dataKey:"highlightedAmount",stackId:"main",cursor:"pointer",fill:t_,onClick:({name:y})=>y&&o?.(y),children:l.map(y=>g.jsx(ll,{fill:jZ,stroke:t_,strokeWidth:2},y.name))}),t&&g.jsx(Bg,{dataKey:"prevAmount",fill:ny(),children:l.map(y=>g.jsx(ll,{fill:Rbe(),stroke:ny(),strokeWidth:2},y.name))})]})})},Wbe=e=>typeof e=="string"?e.toLowerCase():e,Kbe=([e])=>e,Zbe=([,e])=>e,Sg=({stats:e,prevStats:t,highlightedStats:n,title:r,sortingItems:i,extraHeaderContent:o,withPagination:l=!0,...c})=>{const[f,h]=_.useState({}),[m,y]=_.useState(1),[x,b]=_.useState(50),C=_.useCallback((ae,ce)=>{const re=Object.entries(ae),J=f.field?JX(re,([oe,_e])=>Wbe(f.field===Object.keys(ce)[0]?oe:_e)):re;return!f.dir||f.dir==="ASC"?J:[...J].reverse()},[f.dir,f.field]),w=_.useCallback(ae=>{const ce=ae[m-1];if(m<ae.length)return ce;const re=ae[0].length;return[...ce,...sS(re-ce.length,J=>[`hidden_${J}`,0])]},[m]),A=_.useCallback(ae=>g.jsx(Cy,{currentPage:m,pagesCount:ae,onPageChange:y}),[m]),O=_.useCallback((ae,ce,re,J)=>{const oe=C(ae,ce),_e=oe.map(Kbe),se=re&&Object.entries({...CO(_e,_e.map(()=>0)),...re}),ue=J&&Object.entries({...CO(_e,_e.map(()=>0)),...J});if(oe.length<=x)return{currentPageStats:Object.fromEntries(oe),currentPageHighlightedStats:se&&Object.fromEntries(se),currentPagePrevStats:ue&&Object.fromEntries(ue)};const Y=af(oe,x),k=se&&af(se,x),z=ue&&af(ue,x);return{currentPageStats:Object.fromEntries(w(Y)),currentPageHighlightedStats:k&&Object.fromEntries(w(k)),currentPagePrevStats:z&&Object.fromEntries(w(z)),pagination:A(Y.length),max:tZ(Math.max(...oe.map(Zbe)))}},[w,C,x,A]),{currentPageStats:P,currentPagePrevStats:N,currentPageHighlightedStats:F,pagination:U,max:W}=_.useMemo(()=>O(e,i,n&&Object.keys(n).length>0?n:void 0,t&&Object.keys(t).length>0?t:void 0),[O,n,t,i,e]),X=_.useMemo(()=>Object.keys(P),[P]);return g.jsx(W9,{title:g.jsxs(T3,{children:[r,g.jsxs("div",{className:"flex items-center gap-3",children:[o?.(U?X:void 0),l&&Object.keys(e).length>50&&g.jsx(Gbe,{ranges:[50,100,200,500],value:x,setValue:ae=>{b(ae),y(1)}}),g.jsx(tm,{buttonVariant:"link",menuAlignment:"right",buttonSize:"sm",buttonClassName:"[&]:p-0",items:i,order:f,onChange:ae=>{h(ae),y(1)}})]})]}),footer:U&&g.jsx("div",{className:"flex justify-around items-center","data-testid":"chart-paginator",children:U}),children:g.jsx(Ybe,{stats:P,prevStats:N,highlightedStats:F,max:W,...c})})},M3=e=>e.type!==void 0,Xbe=e=>e.type!==void 0,Qbe=e=>{const t=V6(e,n=>M3(n.visit)?"orphanVisits":"nonOrphanVisits");return{orphanVisits:[],nonOrphanVisits:[],...t}},tz=(e,{shortCode:t,domain:n},{endDate:r,startDate:i}={})=>e.filter(({shortUrl:o,visit:l})=>o&&wh(o,t,n)&&Sm(l.date,i,r)),nz=(e,t,{endDate:n,startDate:r}={})=>e.filter(({shortUrl:i,visit:o})=>i&&Iye(i,t)&&Sm(o.date,r,n)),rz=(e,t,{endDate:n,startDate:r}={})=>e.filter(({shortUrl:i,visit:o})=>i?.tags.includes(t)&&Sm(o.date,r,n)),Cg=(e,t)=>$6(e,n=>n[t]),Jbe=e=>{const t=(e?.startDate&&Tl(e?.startDate))??void 0,n=(e?.endDate&&Tl(e?.endDate))??void 0;return{startDate:t,endDate:n}},ow=({filter:e,dateRange:t})=>{const{startDate:n,endDate:r}=Jbe(t),i=e?.excludeBots||void 0;return{startDate:n,endDate:r,excludeBots:i}},exe=e=>R9(e.dateRange),txe=({dateRange:e,...t})=>({...t,dateRange:V1e(e)}),CL=(e,t)=>{if(!(!t||!(e in t)))return t[e]&&Tl(t[e])||""},iz=()=>{const e=uo(),t=Ku(),{startDate:n,endDate:r,orphanVisitsType:i,excludeBots:o,loadPrevInterval:l,domain:c,...f}=t,h=_.useMemo(()=>({dateRange:n!=null||r!=null?P9(n,r):void 0,visitsFilter:{orphanVisitsType:i,excludeBots:o!==void 0?o==="true":void 0},loadPrevInterval:l!==void 0?l==="true":void 0,domain:c}),[r,o,l,i,n,c]),m=_.useCallback(y=>{const{dateRange:x,visitsFilter:b={},loadPrevInterval:C,domain:w}=Mf(h,y),{excludeBots:A,orphanVisitsType:O}=b,P={...f,startDate:CL("startDate",x),endDate:CL("endDate",x),excludeBots:A===void 0?void 0:d_(A),orphanVisitsType:O,loadPrevInterval:C===void 0?void 0:d_(C),domain:w},N=Zw(P),F=N?`?${N}`:"";e(F,{replace:!0,relative:"route"})},[h,e,f]);return[h,m]},nxe=()=>g.jsx(lye,{attribution:'&copy <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),rxe=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(({latLong:n})=>n)};const[{latLong:t}]=e;return{zoom:10,center:t}},az=({toggle:e,isOpen:t,title:n,locations:r=[]})=>g.jsx(co,{open:t,onClose:e,title:n,variant:"cover",children:g.jsxs(aye,{...rxe(r),className:"h-full w-full",children:[g.jsx(nxe,{}),r.map(({cityName:i,latLong:o,count:l},c)=>g.jsx(oye,{position:o,children:g.jsxs(sye,{children:[g.jsx("b",{children:l})," visit",l>1?"s":""," from ",g.jsx("b",{children:i})]})},c))]})}),ixe=({modalTitle:e,activeCities:t,locations:n=[]})=>{const{flag:r,setToTrue:i,setToFalse:o}=Cn(),[l,c]=_.useState([]),f=_.useCallback(h=>{c(h?n.filter(h):n),i()},[n,i]);return g.jsxs(g.Fragment,{children:[!t&&g.jsx(Sy,{onClick:()=>f(),"aria-label":"Show in map",title:"Show in map",className:"[&]:p-0",children:g.jsx(Be,{icon:D2})}),t&&g.jsxs(qe,{buttonContent:g.jsx(Be,{icon:D2,title:"Show in map"}),buttonLabel:"Show in map",buttonVariant:"link",buttonClassName:"[&]:p-0",menuAlignment:"right",caretless:!0,children:[g.jsx(qe.Item,{onClick:()=>f(),children:"Show all locations"}),g.jsx(qe.Item,{onClick:()=>f(({cityName:h})=>t.includes(h)),children:"Show locations in current page"})]}),g.jsx(az,{toggle:o,isOpen:r,title:e,locations:l})]})},oz=({onChange:e,selected:t={},isOrphanVisits:n=!1,withPrevInterval:r=!1,disabled:i})=>{const{orphanVisitsType:o,excludeBots:l=!1,loadPrevInterval:c=!1}=t,f=y=>({selected:o===y,onClick:()=>e({...t,orphanVisitsType:y===o?void 0:y})}),h=_.useCallback(()=>e({...t,excludeBots:!l}),[l,e,t]),m=_.useCallback(()=>e({...t,loadPrevInterval:!c}),[c,e,t]);return g.jsxs(qe,{buttonDisabled:i,buttonContent:"More",buttonClassName:"w-full",menuAlignment:"right",children:[r&&g.jsxs(g.Fragment,{children:[g.jsx(qe.Item,{selected:c,onClick:m,children:"Compare with previous period"}),g.jsx(qe.Separator,{})]}),g.jsx(qe.Title,{children:"Bots:"}),g.jsx(qe.Item,{selected:l,onClick:h,children:"Exclude potential bots"}),n&&g.jsxs(g.Fragment,{children:[g.jsx(qe.Separator,{}),g.jsx(qe.Title,{children:"Orphan visits type:"}),g.jsx(qe.Item,{...f("base_url"),children:"Base URL"}),g.jsx(qe.Item,{...f("invalid_short_url"),children:"Invalid short URL"}),g.jsx(qe.Item,{...f("regular_404"),children:"Regular 404"})]}),g.jsx(qe.Separator,{}),g.jsx(qe.Item,{disabled:t.excludeBots===void 0&&t.loadPrevInterval===void 0&&t.orphanVisitsType===void 0,onClick:()=>e({excludeBots:void 0,loadPrevInterval:void 0,orphanVisitsType:void 0}),children:g.jsx("i",{children:"Reset to defaults"})})]})},axe=({className:e,value:t,...n})=>{const r=Math.min(100,Math.max(0,t));return g.jsx("div",{className:Oe("flex h-4 bg-gray-100 overflow-hidden rounded-md",e),...n,children:g.jsx("div",{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":r,className:"bg-lm-brand dark:bg-dm-brand transition-[width]",style:{width:`${r}%`}})})},sz=({info:e})=>{const{loading:t,errorData:n,progress:r}=e;return g.jsxs(g.Fragment,{children:[t&&r===null&&g.jsx(Wo,{loading:!0}),t&&r!==null&&g.jsxs(Wo,{loading:!0,children:["This is going to take a while... :S",g.jsx(axe,{value:r,className:"mt-4"})]}),n&&g.jsx(Gr,{variant:"error",children:g.jsx(so,{errorData:n,fallbackMessage:"An error occurred while loading visits :("})})]})},Fg=({children:e,showFallback:t})=>g.jsxs(g.Fragment,{children:[t&&g.jsx(Wo,{children:"There are no visits matching current filter"}),!t&&g.jsx(g.Fragment,{children:e})]}),oxe=({visitsDeletion:e,deleteVisits:t})=>{const{deleting:n}=e,{flag:r,setToTrue:i}=Cn();return g.jsx(Nt,{title:g.jsx("span",{className:"text-danger font-bold text-base",children:"Danger zone"}),children:g.jsxs(T3,{children:[g.jsxs("dl",{className:"m-0 mr-3",children:[g.jsx("dt",{children:"Delete visits."}),g.jsxs("dd",{className:"m-0",children:["This will delete ",g.jsx("b",{children:"all"})," visits, not only the ones matching current filter."]})]}),!r&&g.jsx(Tt,{variant:"danger",solid:!0,className:"whitespace-nowrap",onClick:i,children:"Delete visits"}),r&&g.jsxs(Tt,{solid:!0,variant:"danger",disabled:n,className:"whitespace-nowrap",onClick:t,autoFocus:!0,children:[!n&&g.jsx(g.Fragment,{children:"Click again to confirm"}),n&&g.jsx(g.Fragment,{children:"Deleting..."})]})]})})},Eg="Others",sxe=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],lxe=e=>{if(!wu(e))return{browser:Eg,os:Eg};const{browser:{name:t},os:{name:n}}=mye.parse(e);return{os:n??Eg,browser:t&&sxe.includes(t)?t:Eg}},uxe=e=>wu(e)?e.split("/")[e.includes("://")?2:0]?.split(":")[0]??"":"Direct",lz=(e,t)=>e[t]!==void 0,EL=e=>typeof e=="number"?e:e?parseFloat(e):0,cxe=(e,{os:t})=>{e[t]=(e[t]||0)+1},fxe=(e,{browser:t})=>{e[t]=(e[t]||0)+1},dxe=(e,{referer:t})=>{e[t]=(e[t]||0)+1},uz=e=>(t,n)=>{const r=lz(n,e)?n[e]:"Unknown";t[r]=(t[r]||0)+1},hxe=uz("country"),mxe=uz("city"),pxe=(e,t)=>{if(!lz(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[EL(r),EL(i)]};o.count+=1,e[n]=o},gxe=(e,t)=>{if(!Xbe(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},sw=e=>e.reduce((t,n)=>(cxe(t.os,n),fxe(t.browsers,n),dxe(t.referrers,n),hxe(t.countries,n),mxe(t.cities,n),pxe(t.citiesForMap,n),gxe(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),ry=e=>e.map(t=>{const{userAgent:n,date:r,referer:i,visitLocation:o,potentialBot:l}=t;return{date:r,potentialBot:l,userAgent:n,...lxe(n),referer:uxe(i),country:o?.countryName||"Unknown",region:o?.regionName||"Unknown",city:o?.cityName||"Unknown",latitude:o?.latitude,longitude:o?.longitude,visitedUrl:t.visitedUrl,type:M3(t)?t.type:void 0}}),vxe=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:ry,processStatsFromVisits:sw},Symbol.toStringTag,{value:"Module"})),ph=20,yxe=({browser:e,os:t,referer:n,country:r,city:i,userAgent:o,...l},c,f)=>{const h=f?o:`${r} ${i}`;return`${e} ${t} ${n} ${h} ${l.visitedUrl}`.toLowerCase().includes(c.toLowerCase())},bxe=(e,t,n)=>t.filter(r=>yxe(r,e,n)),xxe=(e,t)=>l6(t,e),_xe=({visits:e,searchTerm:t,order:n,searchInRawUserAgent:r})=>{const i=t?bxe(t,e,r):[...e],o=xxe(n,i),l=o.length;return{visitsGroups:af(o,ph),total:l}},ya="cursor-pointer md:sticky-cell-separated md:top-[calc(var(--header-height)+41px)]",wxe=()=>{const{anchor:e,tooltip:t}=as({placement:"right"});return g.jsxs(g.Fragment,{children:[g.jsx(Be,{icon:CN,...e}),g.jsx(os,{...t,children:"Potentially a visit from a bot or crawler"})]})},Sxe=({visits:e,selectedVisits:t=[],setSelectedVisits:n})=>{const[r,i]=_.useState(),o=_.useCallback(F=>{i(F),x(1),n([])},[n]),[l,c]=_.useState({}),f=Fn("visitsList"),h=_.useMemo(()=>Mf(Py,f?.columns??{}),[f?.columns]),m=_.useMemo(()=>_xe({visits:e,searchTerm:r,order:l,searchInRawUserAgent:h.userAgent}),[e,r,l,h.userAgent]),[y,x]=_.useState(1),b=y*ph,C=b-ph,w=_.useMemo(()=>h.visitedUrl?m.visitsGroups.length===0||!!m.visitsGroups[y-1]?.[0]?.visitedUrl:!1,[h.visitedUrl,y,m.visitsGroups]),A=6+Number(w)+(h.userAgent?1:2),O=m.total>0,P=F=>c(Qw({currentField:l.field,currentOrderDir:l.dir,newField:F})),N=F=>g.jsx(Sh,{currentOrder:l,field:F,className:"float-right mt-[5px] ml-[5px]"});return g.jsx(Nt,{bodyClassName:"[&]:p-0 [&]:pb-1",title:"Visits list",children:g.jsxs($e,{responsive:!1,size:"sm",className:"w-full relative overflow-y-hidden bg-lm-primary dark:bg-dm-primary",header:g.jsxs(g.Fragment,{children:[g.jsxs($e.Row,{children:[g.jsxs($e.Cell,{className:Oe(ya,"[&]:text-center"),onClick:()=>n(t.length<m.total?m.visitsGroups.flat():[]),children:[g.jsx("span",{className:"sr-only",children:"Is selected"}),g.jsx(Be,{icon:Nu,className:Oe({"text-lm-brand dark:text-dm-brand":t.length>0})})]}),h.potentialBot&&g.jsxs($e.Cell,{className:Oe(ya,"[&]:text-center"),onClick:()=>P("potentialBot"),children:[g.jsx("span",{className:"sr-only",children:"Is bot"}),g.jsx(Be,{icon:CN}),N("potentialBot")]}),h.date&&g.jsxs($e.Cell,{className:ya,onClick:()=>P("date"),children:["Date",N("date")]}),h.country&&g.jsxs($e.Cell,{className:ya,onClick:()=>P("country"),children:["Country",N("country")]}),h.region&&g.jsxs($e.Cell,{className:ya,onClick:()=>P("region"),children:["Region",N("region")]}),h.city&&g.jsxs($e.Cell,{className:ya,onClick:()=>P("city"),children:["City",N("city")]}),h.userAgent&&g.jsxs($e.Cell,{className:ya,onClick:()=>P("userAgent"),children:["User agent",N("userAgent")]}),h.browser&&g.jsxs($e.Cell,{className:ya,onClick:()=>P("browser"),children:["Browser",N("browser")]}),h.browser&&g.jsxs($e.Cell,{className:ya,onClick:()=>P("os"),children:["OS",N("os")]}),h.referer&&g.jsxs($e.Cell,{className:ya,onClick:()=>P("referer"),children:["Referrer",N("referer")]}),w&&g.jsxs($e.Cell,{className:ya,onClick:()=>P("visitedUrl"),children:["Visited URL",N("visitedUrl")]})]}),g.jsx($e.Row,{children:g.jsx($e.Cell,{colSpan:A,className:"[&]:p-0",children:g.jsx(jf,{size:"md",borderless:!0,onChange:o})})})]}),footer:m.total>ph?g.jsx($e.Row,{children:g.jsx($e.Cell,{type:"td",colSpan:A,className:"md:sticky-cell-separated bottom-0",children:g.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center gap-4 p-1",children:[g.jsx(Cy,{pagesCount:Math.ceil(m.total/ph),currentPage:y,onPageChange:x}),g.jsxs("div",{children:["Visits ",g.jsx("b",{children:Sn(C+1)})," to"," ",g.jsx("b",{children:Sn(Math.min(b,m.total))})," of"," ",g.jsx("b",{children:Sn(m.total)})]})]})})}):void 0,children:[!O&&g.jsx($e.Row,{children:g.jsx($e.Cell,{colSpan:A,className:"text-center",children:"There are no visits matching current filter"})}),m.visitsGroups[y-1]?.map((F,U)=>{const W=t.includes(F);return g.jsxs($e.Row,{className:Oe("cursor-pointer",W&&["bg-lm-table-highlight hover:[&]:bg-lm-table-highlight","dark:bg-dm-table-highlight dark:hover:[&]:bg-dm-table-highlight"]),onClick:()=>n(W?t.filter(X=>X!==F):[...t,F]),children:[g.jsx($e.Cell,{className:"text-center",children:W&&g.jsx(Be,{icon:Nu,className:"text-lm-brand dark:text-dm-brand"})}),h.potentialBot&&g.jsx($e.Cell,{className:"text-center",children:F.potentialBot&&g.jsx(wxe,{})}),h.date&&g.jsx($e.Cell,{children:g.jsx(Jv,{date:F.date})}),h.country&&g.jsx($e.Cell,{children:F.country}),h.region&&g.jsx($e.Cell,{children:F.region}),h.city&&g.jsx($e.Cell,{children:F.city}),h.userAgent&&g.jsx($e.Cell,{children:F.userAgent}),h.browser&&g.jsx($e.Cell,{children:F.browser}),h.os&&g.jsx($e.Cell,{children:F.os}),h.referer&&g.jsx($e.Cell,{children:F.referer}),w&&g.jsx($e.Cell,{children:F.visitedUrl??""})]},U)})]})})},el={byTime:{title:"By time",subPath:"by-time",icon:CV},byContext:{title:"By context",subPath:"by-context",icon:jw},byLocation:{title:"By location",subPath:"by-location",icon:D2},list:{title:"List",subPath:"list",icon:Ow},options:{title:"Options",subPath:"options",icon:bN,shouldRender:({deletion:e})=>!!e}};Object.freeze(el);const O2=({display:e})=>e&&g.jsx("div",{className:"mx-auto w-3/4",children:g.jsx(Nt,{children:g.jsxs("div",{className:"flex gap-2",children:[g.jsx(Be,{icon:rH,className:"mt-1"}),g.jsx("i",{children:"Could not calculate previous period because selected one does not have a strictly defined start date."})]})})}),Em=e=>{const{children:t,visitsInfo:n,getVisits:r,cancelGetVisits:i,deletion:o,exportCsv:l,isOrphanVisits:c=!1,domains:f}=e,{visits:h,prevVisits:m,loading:y,errorData:x,fallbackInterval:b}=n,[{dateRange:C,visitsFilter:w,loadPrevInterval:A,domain:O},P]=iz(),N=Fn("visits"),[F,U]=_.useState(),W=_.useCallback(({startDate:Z,endDate:ne},me)=>{P({dateRange:{startDate:Z??void 0,endDate:ne??void 0}}),U(me)},[P]),[X,ae]=_.useState(b??N?.defaultInterval??"last30Days"),[ce,re]=_.useState([]),[J,oe]=_.useState(),_e=_.useRef(!0),{search:se}=Or(),ue=_.useCallback(Z=>Z?`../${Z}${se}`:se,[se]),Y=_.useMemo(()=>ry(h),[h]),k=_.useMemo(()=>m&&ry(m),[m]),{os:z,browsers:H,referrers:I,countries:j,cities:q,citiesForMap:ee,visitedUrls:le}=_.useMemo(()=>sw(Y),[Y]),pe=_.useMemo(()=>sw(k??[]),[k]),he=_.useMemo(()=>Object.fromEntries([["Visits",Object.assign(Y,{type:"main"})],k&&["Previous period",Object.assign(k,{type:"previous"})],ce.length>0&&[J??"Selected",Object.assign(ce,{type:"highlighted"})]].filter(Boolean)),[J,ce,k,Y]),ve=_.useMemo(()=>({...w,excludeBots:w.excludeBots??N?.excludeBots,loadPrevInterval:A??N?.loadPrevInterval,domain:O}),[A,w,N?.excludeBots,N?.loadPrevInterval,O]),D=_.useMemo(()=>Object.values(ee),[ee]),R=_.useRef(void 0),G=_.useCallback(Z=>{R.current=void 0,re(Z)},[]),te=_.useCallback((Z,ne)=>{const me=`${Z}_${ne}`;R.current===me?(re([]),oe(void 0),R.current=void 0):(re(Y.filter(ie=>ie[Z]===ne)),oe(ne),R.current=me)},[Y]),V=ul("filterVisitsByDomain");return _.useEffect(()=>i,[i]),_.useEffect(()=>{const Z=C??N9(X),{loadPrevInterval:ne,...me}=ve,ie={doIntervalFallback:_e.current,loadPrevInterval:ne};r({dateRange:Z,filter:me},ie),G([]),_e.current=!1},[X,C,r,ve,G]),_.useEffect(()=>{b&&X===(N?.defaultInterval??"last30Days")&&ae(b)},[X,b,N?.defaultInterval]),g.jsxs("div",{className:"flex flex-col gap-y-4",children:[t,g.jsxs("section",{className:"flex flex-col lg:flex-row-reverse gap-4",children:[g.jsxs("div",{className:"lg:w-1/2 flex flex-col md:flex-row gap-x-2 gap-y-4",children:[g.jsx("div",{className:"grow",children:g.jsx(S3,{disabled:y,dateRangeOrInterval:F??C??X,defaultText:"All visits",onDatesChange:W})}),V&&f&&g.jsx(O9,{domains:y?[]:f,value:O,onChange:Z=>P({domain:Z})}),g.jsx(oz,{disabled:y,isOrphanVisits:c,withPrevInterval:!0,selected:ve,onChange:({loadPrevInterval:Z,...ne})=>P({visitsFilter:ne,loadPrevInterval:Z})})]}),g.jsx("div",{className:"lg:w-1/2 xl:flex-3 flex gap-2",children:h.length>0&&g.jsxs(g.Fragment,{children:[g.jsx(g9,{className:"max-lg:w-full",amount:Y.length,onClick:()=>l(Y)}),g.jsxs(Tt,{variant:"secondary",solid:ce.length>0&&!ss(),disabled:ce.length===0,className:"max-lg:w-full",onClick:()=>G([]),children:["Clear selection ",ce.length>0&&g.jsxs(g.Fragment,{children:["(",Sn(ce.length),")"]})]})]})})]}),g.jsxs("section",{className:"flex flex-col gap-4",children:[g.jsx(sz,{info:n}),!y&&!x&&g.jsxs(g.Fragment,{children:[g.jsx(tl,{fill:!0,className:"sticky top-(--header-height) z-2",children:Object.values(el).map(({title:Z,icon:ne,subPath:me,shouldRender:ie},xe)=>!ie||ie(e)?g.jsxs(tl.Pill,{to:ue(me),replace:!0,children:[g.jsx(Be,{icon:ne}),g.jsx("span",{className:"ml-2 max-lg:sr-only",children:Z})]},xe):void 0).filter(Boolean)}),g.jsxs(oy,{children:[g.jsx(ft,{path:el.byTime.subPath,element:g.jsxs(Fg,{showFallback:h.length===0,children:[g.jsx("div",{"data-testid":"line-chart-container",children:g.jsx(ez,{visitsGroups:he,setSelectedVisits:G,onDateRangeChange:W})}),g.jsx(O2,{display:!!ve.loadPrevInterval&&!m})]})}),g.jsx(ft,{path:el.byContext.subPath,element:g.jsxs(Fg,{showFallback:h.length===0,children:[g.jsxs("div",{className:Oe("grid grid-cols-1 gap-4",{"lg:grid-cols-2":c,"xl:grid-cols-3":!c}),children:[g.jsx(_L,{title:"Operating systems",stats:z,prevStats:pe.os}),g.jsx(_L,{title:"Browsers",stats:H,prevStats:pe.browsers}),g.jsx(Sg,{title:"Referrers",withPagination:!1,stats:I,prevStats:pe.referrers,highlightedStats:Cg(ce,"referer"),highlightedLabel:J,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:Z=>te("referer",Z)}),c&&g.jsx(Sg,{title:"Visited URLs",stats:le,prevStats:pe.visitedUrls,highlightedStats:Cg(ce,"visitedUrl"),highlightedLabel:J,sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:Z=>te("visitedUrl",Z)})]}),g.jsx(O2,{display:!!ve.loadPrevInterval&&!m})]})}),g.jsx(ft,{path:el.byLocation.subPath,element:g.jsxs(Fg,{showFallback:h.length===0,children:[g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[g.jsx(Sg,{title:"Countries",stats:j,prevStats:pe.countries,highlightedStats:Cg(ce,"country"),highlightedLabel:J,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:Z=>te("country",Z)}),g.jsx(Sg,{title:"Cities",stats:q,prevStats:pe.cities,highlightedStats:Cg(ce,"city"),highlightedLabel:J,extraHeaderContent:Z=>D.length>0&&g.jsx(ixe,{modalTitle:"Cities",locations:D,activeCities:Z}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:Z=>te("city",Z)})]}),g.jsx(O2,{display:!!ve.loadPrevInterval&&!m})]})}),g.jsx(ft,{path:el.list.subPath,element:g.jsx(Sxe,{visits:Y,selectedVisits:ce,setSelectedVisits:G})}),o&&g.jsx(ft,{path:el.options.subPath,element:g.jsx(oxe,{...o})}),g.jsx(ft,{path:"*",element:g.jsx(vw,{replace:!0,to:ue(el.byTime.subPath)})})]})]})]})]})},cz=Na(({getDomainVisits:e,domainVisits:t,cancelGetDomainVisits:n})=>{const{ReportExporter:r}=An(cz),{domain:i=""}=Cf(),[o,l=o]=i.split("_"),c=_.useCallback((h,m)=>e({domain:l,options:m,params:h}),[l,e]),f=_.useCallback(h=>r.exportVisits(`domain_${o}_visits.csv`,h),[o,r]);return g.jsx(Em,{getVisits:c,cancelGetVisits:n,visitsInfo:t,exportCsv:f,children:g.jsx(Cm,{visits:t.visits,title:`"${o}" visits`})})},()=>[ia.visits]),Cxe=Tn(cz,["ReportExporter"]),fz=Na(({getNonOrphanVisits:e,nonOrphanVisits:t,cancelGetNonOrphanVisits:n,domainsList:r})=>{const{ReportExporter:i}=An(fz),o=_.useCallback(c=>i.exportVisits("non_orphan_visits.csv",c),[i]),l=_.useCallback((c,f)=>e({options:f,params:c,domain:c.filter?.domain}),[e]);return g.jsx(Em,{getVisits:l,cancelGetVisits:n,visitsInfo:t,exportCsv:o,domains:r.domains,children:g.jsx(Cm,{title:"Non-orphan visits",visits:t.visits})})},()=>[ia.visits]),Exe=Tn(fz,["ReportExporter"]),dz=Na(({getOrphanVisits:e,orphanVisits:t,cancelGetOrphanVisits:n,deleteOrphanVisits:r,orphanVisitsDeletion:i,domainsList:o})=>{const{ReportExporter:l}=An(dz),c=_.useCallback(m=>l.exportVisits("orphan_visits.csv",m),[l]),f=_.useCallback((m,y)=>e({options:y,params:m,orphanVisitsType:m.filter?.orphanVisitsType,domain:m.filter?.domain}),[e]),h=_.useMemo(()=>({deleteVisits:r,visitsDeletion:i}),[r,i]);return g.jsx(Em,{getVisits:f,cancelGetVisits:n,visitsInfo:t,exportCsv:c,deletion:h,isOrphanVisits:!0,domains:o.domains,children:g.jsx(Cm,{title:"Orphan visits",visits:t.visits})})},()=>[ia.orphanVisits]),Axe=Tn(dz,["ReportExporter"]),AL=5e3,Txe=2,Oxe=4,jxe=({currentPage:e,pagesCount:t})=>e>=t,Mxe=(e,t)=>t*100/e,hz=({visitsLoader:e,shouldCancel:t,progressChanged:n,batchSize:r})=>{const i=async(l,c)=>Promise.all(c.map(async f=>e({...l,page:f,itemsPerPage:AL}).then(({data:h})=>h))).then(f=>f.flat()),o=async(l,c,f=0)=>{if(t())return[];const h=await i(l,c[f]);return n(Mxe(c.length,f+1)),f<c.length-1?h.concat(await o(l,c,f+1)):h};return async l=>{const{pagination:c,data:f}=await e({...l,page:1,itemsPerPage:AL});if(jxe(c))return f;const h=q6(Txe,c.pagesCount+1),m=af(h,r);return c.pagesCount-1>r&&n(0),f.concat(await o(l,m))}},Am=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),Tm=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=un(`${e}/progressChanged`),i=un(`${e}/fallbackToInterval`),o=or(e,async(l,{getState:c,dispatch:f})=>{const{params:h,options:m}=l,{visitsLoader:y,lastVisitLoader:x}=t(l),b=H1e(h.dateRange),C=ow(h),w=m.loadPrevInterval&&exe(h)?ow(txe(h)):void 0,A=Oxe/(w?2:1),O=w?{main:0,prev:0}:{main:0},P=(X,ae)=>{O[X]=ae;const ce=Object.values(O),re=ce.reduce((J,oe)=>J+oe,0);f(r(re/ce.length))},N=hz({visitsLoader:y,shouldCancel:()=>n(c),progressChanged:X=>P("main",X),batchSize:A}),[F,U,W]=await Promise.all([N(C),x(h.filter?.excludeBots),w?N(w).then(X=>X.map(ae=>{if(b===void 0)return ae;const{date:ce,...re}=ae,J=fS(ji(ce),b);return{...re,date:Tl(J)}})):Promise.resolve(void 0)]);return!F.length&&U&&f(i($1e(U.date))),{...l,visits:F,prevVisits:W}});return Object.assign(o,{progressChanged:r,fallbackToInterval:i})},Om=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r,extraReducers:i})=>{const{pending:o,rejected:l,fulfilled:c,progressChanged:f,fallbackToInterval:h}=t,{reducer:m,actions:y}=jt({name:e,initialState:n,reducers:{cancelGetVisits:b=>({...b,cancelLoad:!0})},extraReducers:b=>{b.addCase(o,()=>({...n,loading:!0})),b.addCase(l,(C,{error:w})=>({...n,errorData:zi(w)??null})),b.addCase(c,(C,{payload:w})=>({...C,...w,loading:!1,progress:null,errorData:null})),b.addCase(f,(C,{payload:w})=>({...C,progress:w})),b.addCase(h,(C,{payload:w})=>({...C,fallbackInterval:w})),b.addCase(Ff,(C,{payload:w})=>{const{visits:A}=C,O=r(C,w.createdVisits).map(({visit:P})=>P);return O.length?{...C,visits:[...O,...A]}:C}),i?.(b)}}),{cancelGetVisits:x}=y;return{reducer:m,cancelGetVisits:x}},mz="shlink/domainVisits",Pxe={visits:[],domain:"",loading:!1,cancelLoad:!1,errorData:null,progress:null},Lxe=e=>Tm({typePrefix:`${mz}/getDomainVisits`,createLoaders:({domain:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,o=c=>r.getDomainVisits(t,c),l=Am(i,c=>r.getDomainVisits(t,c));return{visitsLoader:o,lastVisitLoader:l}},shouldCancel:t=>t().domainVisits.cancelLoad}),Nxe=e=>Om({name:mz,initialState:Pxe,asyncThunkCreator:e,filterCreatedVisits:({domain:t,params:n},r)=>nz(r,t,n?.dateRange)}),pz="shlink/orphanVisits",Rxe={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},Dxe=e=>Tm({typePrefix:`${pz}/getNonOrphanVisits`,createLoaders:({options:t,domain:n})=>{const r=e(),{doIntervalFallback:i=!1}=t,o=async c=>r.getNonOrphanVisits({...c,domain:n}),l=Am(i,c=>r.getNonOrphanVisits(c));return{visitsLoader:o,lastVisitLoader:l}},shouldCancel:t=>t().orphanVisits.cancelLoad}),kxe=e=>Om({name:pz,initialState:Rxe,asyncThunkCreator:e,filterCreatedVisits:({params:t},n)=>{const{startDate:r,endDate:i}=t?.dateRange??{};return n.filter(({visit:o})=>Sm(o.date,r,i))}}),gz="shlink/orphanVisits",Ixe={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},zxe=(e,t)=>!t||t===e.type,Uxe=({data:e,...t},n)=>{const r=e.filter(i=>M3(i)&&zxe(i,n));return{...t,data:r}},Bxe=e=>Tm({typePrefix:`${gz}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,domain:n,options:r})=>{const i=e(),{doIntervalFallback:o=!1}=r,l=async f=>i.getOrphanVisits({...f,type:t,domain:n}).then(h=>Uxe(h,t)),c=Am(o,f=>i.getOrphanVisits(f));return{visitsLoader:l,lastVisitLoader:c}},shouldCancel:t=>t().orphanVisits.cancelLoad}),Fxe=(e,t)=>Om({name:gz,initialState:Ixe,asyncThunkCreator:e,extraReducers:n=>{n.addCase(t.fulfilled,r=>({...r,visits:[]}))},filterCreatedVisits:({params:n},r)=>{const{startDate:i,endDate:o}=n?.dateRange??{};return r.filter(({visit:l,shortUrl:c})=>!c&&Sm(l.date,i,o))}}),vz="shlink/orphanVisitsDeletion",TL={deletedVisits:0,deleting:!1,error:!1},$xe=e=>or(`${vz}/deleteOrphanVisits`,()=>e().deleteOrphanVisits()),Vxe=e=>jt({name:vz,initialState:TL,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,deleting:!0,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,deleting:!1,error:!0,errorData:zi(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{deletedVisits:i}=r;return{...TL,deletedVisits:i}})}}),yz="shlink/shortUrlVisits",Hxe={visits:[],shortCode:"",loading:!1,errorData:null,cancelLoad:!1,progress:null},qxe=e=>Tm({typePrefix:`${yz}/getShortUrlVisits`,createLoaders:({shortCode:t,domain:n,options:r})=>{const i=e(),{doIntervalFallback:o=!1}=r,l=f=>i.getShortUrlVisits({shortCode:t,domain:n},f),c=Am(o,f=>i.getShortUrlVisits({shortCode:t,domain:n},f));return{visitsLoader:l,lastVisitLoader:c}},shouldCancel:t=>t().shortUrlVisits.cancelLoad}),Gxe=(e,t)=>Om({name:yz,initialState:Hxe,asyncThunkCreator:e,extraReducers:n=>{n.addCase(t.fulfilled,(r,{payload:i})=>r.shortCode===i.shortCode&&r.domain===i.domain?{...r,visits:[]}:r)},filterCreatedVisits:({shortCode:n,domain:r,params:i},o)=>tz(o,{shortCode:n,domain:r},i?.dateRange)}),bz="shlink/shortUrlVisitsDeletion",OL={shortCode:"",deletedVisits:0,deleting:!1,error:!1},Yxe=e=>or(`${bz}/deleteShortUrlVisits`,async({shortCode:t,domain:n})=>({...await e().deleteShortUrlVisits({shortCode:t,domain:n}),shortCode:t,domain:n})),Wxe=e=>jt({name:bz,initialState:OL,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,deleting:!0,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,deleting:!1,error:!0,errorData:zi(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{shortCode:i,domain:o,deletedVisits:l}=r;return{...OL,shortCode:i,domain:o,deletedVisits:l}})}}),xz="shlink/tagVisits",Kxe={visits:[],tag:"",loading:!1,cancelLoad:!1,errorData:null,progress:null},Zxe=e=>Tm({typePrefix:`${xz}/getTagVisits`,createLoaders:({tag:t,options:n,domain:r})=>{const i=e(),{doIntervalFallback:o=!1}=n,l=f=>i.getTagVisits(t,{...f,domain:r}),c=Am(o,async f=>i.getTagVisits(t,f));return{visitsLoader:l,lastVisitLoader:c}},shouldCancel:t=>t().tagVisits.cancelLoad}),Xxe=e=>Om({name:xz,initialState:Kxe,asyncThunkCreator:e,filterCreatedVisits:({tag:t,params:n},r)=>rz(r,t,n?.dateRange)}),_z="shlink/visitsOverview",Ag={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},jL=e=>e.filter(({visit:t})=>t.potentialBot).length,Qxe=e=>or(`${_z}/loadVisitsOverview`,()=>e().getVisitsOverview()),Jxe=e=>jt({name:_z,initialState:Ag,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...Ag,loading:!0})),t.addCase(e.rejected,()=>({...Ag,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...Ag,...r})),t.addCase(Ff,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:l,orphanVisits:c}=Qbe(o.createdVisits),f=l.length,h=jL(l),m=f-h,y=c.length,x=jL(c),b=y-x;return{...i,nonOrphanVisits:{total:n.total+f,bots:n.bots&&n.bots+h,nonBots:n.nonBots&&n.nonBots+m},orphanVisits:{total:r.total+y,bots:r.bots&&r.bots+x,nonBots:r.nonBots&&r.nonBots+b}}})}}),e2e=({shortUrl:e})=>{const{anchor:t,tooltip:n}=as({placement:"bottom"});return e?g.jsxs("span",{children:[g.jsx("b",{className:"cursor-default",...t,children:g.jsx(Jv,{date:e.dateCreated,relative:!0})}),g.jsx(os,{...n,children:g.jsx(Jv,{date:e.dateCreated})})]}):g.jsx("small",{children:"Loading..."})},t2e=({shortUrl:e,loading:t,shortUrlVisits:n})=>{const{visits:r}=n,i=e?.shortUrl??"",o=e?.longUrl??"",l=e?.title;return g.jsxs(Cm,{title:g.jsxs(g.Fragment,{children:["Visits for ",g.jsx(Li,{href:i})]}),visits:r,shortUrl:e,children:[g.jsx("hr",{}),g.jsxs("div",{children:["Created: ",g.jsx(e2e,{shortUrl:e})]}),g.jsxs("div",{"data-testid":"long-url-container",children:[`${l?"Title":"Long URL"}: `,t&&g.jsx("small",{children:"Loading..."}),!t&&g.jsx(Li,{href:o,children:l??o})]})]})},wz=Na(({shortUrlVisits:e,shortUrlVisitsDeletion:t,shortUrlsDetails:n,getShortUrlVisits:r,getShortUrlsDetails:i,deleteShortUrlVisits:o,cancelGetShortUrlVisits:l})=>{const{ReportExporter:c}=An(wz),f=b3(),h=_.useMemo(()=>n.shortUrls?.get(f),[f,n.shortUrls]),m=_.useCallback((b,C)=>r({...f,options:C,params:b}),[r,f]),y=_.useCallback(b=>c.exportVisits(`short-url_${h?.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,b),[c,h?.shortUrl]),x=_.useMemo(()=>({deleteVisits:()=>o(f),visitsDeletion:t}),[o,f,t]);return _.useEffect(()=>{i([f])},[f,i]),g.jsx(Em,{getVisits:m,cancelGetVisits:l,visitsInfo:e,exportCsv:y,deletion:x,children:g.jsx(t2e,{shortUrl:h,loading:n.loading,shortUrlVisits:e})})},e=>e.shortCode?[ia.shortUrlVisits(p3(e.shortCode))]:[]),n2e=Tn(wz,["ReportExporter"]),r2e=({tagVisits:e,colorGenerator:t})=>{const{visits:n,tag:r}=e;return g.jsx(Cm,{title:g.jsxs("span",{className:"flex items-center justify-center",children:[g.jsx("span",{className:"mr-2",children:"Visits for"}),g.jsx(x0,{text:r,colorGenerator:t})]}),visits:n})},Sz=Na(({getTagVisits:e,tagVisits:t,cancelGetTagVisits:n,domainsList:r})=>{const{ColorGenerator:i,ReportExporter:o}=An(Sz),{tag:l=""}=Cf(),c=_.useCallback((h,m)=>e({tag:l,params:h,options:m,domain:h.filter?.domain}),[e,l]),f=_.useCallback(h=>o.exportVisits(`tag_${l}_visits.csv`,h),[o,l]);return g.jsx(Em,{getVisits:c,cancelGetVisits:n,visitsInfo:t,exportCsv:f,domains:r.domains,children:g.jsx(r2e,{tagVisits:t,colorGenerator:i})})},()=>[ia.visits]),i2e=Tn(Sz,["ColorGenerator","ReportExporter"]),P3=({title:e,colors:t,getVisitsForComparison:n,visitsComparisonInfo:r,cancelGetVisitsComparison:i})=>{const{loading:o,visitsGroups:l}=r,c=Fn("visits"),f=_.useMemo(()=>Object.keys(l).reduce((P,N,F)=>(P[N]=Object.assign(ry(l[N]),{color:t?.[N]??Q9(F)}),P),{}),[t,l]),h=_.useMemo(()=>Object.values(l).every(P=>P.length===0),[l]),[{dateRange:m,visitsFilter:y},x]=iz(),[b,C]=_.useState(),w=_.useCallback(({startDate:P,endDate:N},F)=>{x({dateRange:{startDate:P??void 0,endDate:N??void 0}}),C(F)},[x]),[A]=_.useState(()=>m??c?.defaultInterval??"last30Days"),O=_.useMemo(()=>({...y,excludeBots:y.excludeBots??c?.excludeBots}),[y,c?.excludeBots]);return _.useEffect(()=>{const P=m??N9(A);return n({params:{dateRange:P,filter:O}}),i},[i,m,n,A,O]),g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs(Nt,{bodyClassName:"flex items-center",children:[g.jsx(b0,{}),g.jsx("h3",{className:"grow text-center",children:e})]}),g.jsxs("div",{className:"flex flex-col lg:flex-row-reverse gap-4",children:[g.jsxs("div",{className:"lg:flex-3 flex flex-col md:flex-row gap-x-2 gap-y-4",children:[g.jsx("div",{className:"grow",children:g.jsx(S3,{disabled:o,defaultText:"All visits",dateRangeOrInterval:b??m??A,onDatesChange:w})}),g.jsx(oz,{disabled:o,selected:O,onChange:({orphanVisitsType:P,excludeBots:N})=>x({visitsFilter:{orphanVisitsType:P,excludeBots:N}})})]}),g.jsx("div",{className:"hidden lg:block lg:flex-2 xl:flex-3"})]}),g.jsx(sz,{info:r}),!o&&g.jsx(Fg,{showFallback:h,children:g.jsx(ez,{visitsGroups:f,onDateRangeChange:w})})]})},a2e=Na(({getDomainVisitsForComparison:e,domainVisitsComparison:t,cancelGetDomainVisitsComparison:n})=>{const r=A3("domains"),i=_.useCallback(o=>e({...o,domains:r}),[r,e]);return g.jsx(P3,{title:`Comparing "${r.join('", "')}"`,getVisitsForComparison:i,visitsComparisonInfo:t,cancelGetVisitsComparison:n})},()=>[ia.visits]),o2e=({visitsLoaders:e,shouldCancel:t,progressChanged:n})=>{const r=Object.keys(e),i=Math.max(1,Math.round(4/r.length)),o=Object.fromEntries(r.map(f=>[f,0])),l=(f,h)=>{o[f]=h;const m=Object.values(o),y=m.reduce((x,b)=>x+b,0);n(y/m.length)},c=Object.entries(e).map(([f,h])=>[f,hz({visitsLoader:h,batchSize:i,shouldCancel:t,progressChanged:m=>l(f,m)})]);return async f=>{const h=await Promise.all(c.map(async([m,y])=>{const x=await y(f);return[m,x]}));return Object.fromEntries(h)}},L3=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=un(`${e}/progressChanged`),i=or(e,async(o,{getState:l,dispatch:c})=>{const f=t(o),h=await o2e({visitsLoaders:f,shouldCancel:()=>n(l),progressChanged:m=>c(r(m))})(ow(o.params));return{...o,visitsGroups:h}});return Object.assign(i,{progressChanged:r})},N3=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisitsForGroup:r})=>{const{pending:i,rejected:o,fulfilled:l,progressChanged:c}=t,{reducer:f,actions:h}=jt({name:e,initialState:n,reducers:{cancelGetVisits:y=>({...y,cancelLoad:!0})},extraReducers:y=>{y.addCase(i,()=>({...n,loading:!0})),y.addCase(o,(x,{error:b})=>({...n,errorData:zi(b)??null})),y.addCase(l,(x,{payload:b})=>({...x,...b,loading:!1,progress:null,errorData:null})),y.addCase(c,(x,{payload:b})=>({...x,progress:b})),y.addCase(Ff,(x,{payload:b})=>{const{visitsGroups:C,...w}=x,A=Object.keys(C).map(P=>{const N=r({...w,groupKey:P},b.createdVisits).map(({visit:F})=>F);return[P,[...N,...C[P]]]}),O=Object.fromEntries(A);return{...w,visitsGroups:O}})}}),{cancelGetVisits:m}=h;return{reducer:f,cancelGetVisits:m}},Cz="shlink/domainVisitsComparison",s2e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},l2e=e=>L3({typePrefix:`${Cz}/getDomainVisitsForComparison`,createLoaders:({domains:t})=>{const n=e(),r=t.map(i=>[i,o=>n.getDomainVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:t=>t().domainVisitsComparison.cancelLoad}),u2e=e=>N3({name:Cz,initialState:s2e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>nz(r,t,n?.dateRange)}),Ez="shlink/shortUrlVisitsComparison",c2e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},f2e=e=>L3({typePrefix:`${Ez}/getShortUrlVisitsForComparison`,createLoaders:({shortUrls:t})=>{const n=e(),r=t.map(i=>[g3(i),o=>n.getShortUrlVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:t=>t().shortUrlVisitsComparison.cancelLoad}),d2e=e=>N3({name:Ez,initialState:c2e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>tz(r,W7(t),n?.dateRange)}),Az="shlink/tagVisitsComparison",h2e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},m2e=e=>L3({typePrefix:`${Az}/getTagVisitsForComparison`,createLoaders:({tags:t})=>{const n=e(),r=t.map(i=>[i,o=>n.getTagVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:t=>t().tagVisitsComparison.cancelLoad}),p2e=e=>N3({name:Az,initialState:h2e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>rz(r,t,n?.dateRange)}),g2e=Na(({getShortUrlVisitsForComparison:e,shortUrlVisitsComparison:t,cancelGetShortUrlVisitsComparison:n,shortUrlsDetails:r,getShortUrlsDetails:i})=>{const o=A3("short-urls"),l=_.useMemo(()=>o.map(W7),[o]),c=_.useCallback(m=>e({...m,shortUrls:l}),[e,l]),f=_.useMemo(()=>[...r.shortUrls?.values()??[]],[r.shortUrls]),h=_.useMemo(()=>{const{visitsGroups:m,loading:y,...x}=t,b=f.reduce((C,w)=>(C[w.shortUrl]=m[g3(w)]??[],C),{});return{...x,visitsGroups:b,loading:y||r.loading}},[t,r.loading,f]);return _.useEffect(()=>{l.length>0&&i(l)},[i,l]),g.jsx(P3,{title:g.jsx("span",{"data-testid":"title",children:r.loading?"Loading...":`Comparing ${f.length} short URLs`}),getVisitsForComparison:c,visitsComparisonInfo:h,cancelGetVisitsComparison:n})},()=>[ia.visits]),Tz=Na(({getTagVisitsForComparison:e,tagVisitsComparison:t,cancelGetTagVisitsComparison:n})=>{const{ColorGenerator:r}=An(Tz),i=A3("tags"),o=_.useCallback(f=>e({...f,tags:i}),[e,i]),{visitsGroups:l}=t,c=_.useMemo(()=>Object.keys(l).reduce((f,h)=>(f[h]=r.getColorForKey(h),f),{}),[r,l]);return g.jsx(P3,{title:g.jsxs(g.Fragment,{children:["Comparing ",i.map(f=>g.jsx(x0,{colorGenerator:r,text:f},f))]}),getVisitsForComparison:o,visitsComparisonInfo:t,cancelGetVisitsComparison:n,colors:c})},()=>[ia.visits]),v2e=Tn(Tz,["ColorGenerator"]),y2e=(e,t)=>{const n=(r,i)=>t([...r,"mercureInfo"],[...i,"createNewVisits","loadMercureInfo"]);e.serviceFactory("MapModal",()=>az),e.factory("ShortUrlVisits",n2e),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlVisitsDeletion","shortUrlsDetails","mercureInfo"],["getShortUrlVisits","deleteShortUrlVisits","getShortUrlsDetails","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.factory("TagVisits",i2e),e.decorator("TagVisits",n(["tagVisits","domainsList"],["getTagVisits","cancelGetTagVisits"])),e.factory("TagVisitsComparison",v2e),e.decorator("TagVisitsComparison",n(["tagVisitsComparison"],["getTagVisitsForComparison","cancelGetTagVisitsForComparison"])),e.serviceFactory("DomainVisitsComparison",()=>a2e),e.decorator("DomainVisitsComparison",n(["domainVisitsComparison"],["getDomainVisitsForComparison","cancelGetDomainVisitsForComparison"])),e.serviceFactory("ShortUrlVisitsComparison",()=>g2e),e.decorator("ShortUrlVisitsComparison",n(["shortUrlVisitsComparison","shortUrlsDetails"],["getShortUrlVisitsForComparison","cancelGetShortUrlVisitsForComparison","getShortUrlsDetails"])),e.factory("DomainVisits",Cxe),e.decorator("DomainVisits",n(["domainVisits"],["getDomainVisits","cancelGetDomainVisits"])),e.factory("OrphanVisits",Axe),e.decorator("OrphanVisits",n(["orphanVisits","orphanVisitsDeletion","domainsList"],["getOrphanVisits","cancelGetOrphanVisits","deleteOrphanVisits"])),e.factory("NonOrphanVisits",Exe),e.decorator("NonOrphanVisits",n(["nonOrphanVisits","domainsList"],["getNonOrphanVisits","cancelGetNonOrphanVisits"])),e.serviceFactory("VisitsParser",()=>vxe),e.serviceFactory("getShortUrlVisits",qxe,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",r=>r.cancelGetVisits,"shortUrlVisitsReducerCreator"),e.serviceFactory("getShortUrlVisitsForComparison",f2e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisitsForComparison",r=>r.cancelGetVisits,"shortUrlVisitsComparisonReducerCreator"),e.serviceFactory("deleteShortUrlVisits",Yxe,"apiClientFactory"),e.serviceFactory("getTagVisits",Zxe,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",r=>r.cancelGetVisits,"tagVisitsReducerCreator"),e.serviceFactory("getTagVisitsForComparison",m2e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisitsForComparison",r=>r.cancelGetVisits,"tagVisitsComparisonReducerCreator"),e.serviceFactory("getDomainVisits",Lxe,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",r=>r.cancelGetVisits,"domainVisitsReducerCreator"),e.serviceFactory("getDomainVisitsForComparison",l2e,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisitsForComparison",r=>r.cancelGetVisits,"domainVisitsComparisonReducerCreator"),e.serviceFactory("getOrphanVisits",Bxe,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",r=>r.cancelGetVisits,"orphanVisitsReducerCreator"),e.serviceFactory("deleteOrphanVisits",$xe,"apiClientFactory"),e.serviceFactory("getNonOrphanVisits",Dxe,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",r=>r.cancelGetVisits,"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>Ff),e.serviceFactory("loadVisitsOverview",Qxe,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",Jxe,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",r=>r.reducer,"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",Nxe,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",r=>r.reducer,"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",kxe,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",r=>r.reducer,"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",Fxe,"getOrphanVisits","deleteOrphanVisits"),e.serviceFactory("orphanVisitsReducer",r=>r.reducer,"orphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsDeletionReducerCreator",Vxe,"deleteOrphanVisits"),e.serviceFactory("orphanVisitsDeletionReducer",r=>r.reducer,"orphanVisitsDeletionReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",Gxe,"getShortUrlVisits","deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",r=>r.reducer,"shortUrlVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsDeletionReducerCreator",Wxe,"deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsDeletionReducer",r=>r.reducer,"shortUrlVisitsDeletionReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",Xxe,"getTagVisits"),e.serviceFactory("tagVisitsReducer",r=>r.reducer,"tagVisitsReducerCreator"),e.serviceFactory("tagVisitsComparisonReducerCreator",p2e,"getTagVisitsForComparison"),e.serviceFactory("tagVisitsComparisonReducer",r=>r.reducer,"tagVisitsComparisonReducerCreator"),e.serviceFactory("domainVisitsComparisonReducerCreator",u2e,"getDomainVisitsForComparison"),e.serviceFactory("domainVisitsComparisonReducer",r=>r.reducer,"domainVisitsComparisonReducerCreator"),e.serviceFactory("shortUrlVisitsComparisonReducerCreator",d2e,"getShortUrlVisitsForComparison"),e.serviceFactory("shortUrlVisitsComparisonReducer",r=>r.reducer,"shortUrlVisitsComparisonReducerCreator")},sh=({children:e,to:t,active:n,...r})=>g.jsx(xw,{...r,className:({isActive:i})=>Oe("flex items-center gap-2","no-underline rounded-none px-5 py-2.5",{"text-white bg-lm-main dark:bg-dm-main":i||n,"highlight:bg-lm-secondary highlight:dark:bg-dm-secondary":!i&&!n}),to:t,children:e}),b2e=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=Or(),r=i=>`${e}${i}`;return g.jsx("aside",{className:Oe("w-(--aside-menu-width) bg-lm-primary dark:bg-dm-primary","pt-[15px] md:pt-[30px] pb-[10px]","fixed! bottom-0 top-(--header-height) z-890 transition-[left] duration-300","shadow-aside-menu-mobile md:shadow-aside-menu",{"left-0":t,"max-md:left-[calc(-1*(var(--aside-menu-width)+35px))]":!t}),children:g.jsxs("nav",{className:"flex flex-col h-full",children:[g.jsxs(sh,{to:r("/overview"),children:[g.jsx(Be,{icon:KV}),"Overview"]}),g.jsxs(sh,{to:r("/list-short-urls/1"),active:n.match("/list-short-urls")!==null,children:[g.jsx(Be,{icon:Ow}),"List short URLs"]}),g.jsxs(sh,{to:r("/create-short-url"),children:[g.jsx(Be,{icon:HV,flip:"horizontal"}),"Create short URL"]}),g.jsxs(sh,{to:r("/manage-tags"),children:[g.jsx(Be,{icon:SN}),"Manage tags"]}),g.jsxs(sh,{to:r("/manage-domains"),children:[g.jsx(Be,{icon:aH}),"Manage domains"]})]})})},Oz=_.createContext(void 0),R3=()=>_.useContext(Oz),jz=({children:e})=>{const t=R3(),{flag:n,toggle:r,setToTrue:i,setToFalse:o}=Cn(),l=t??{sidebarVisible:n,toggleSidebar:r,showSidebar:i,hideSidebar:o};return g.jsx(Oz.Provider,{value:l,children:e})},Mz=({className:e,...t})=>{const n=R3();if(!n)throw new Error("ShlinkSidebarToggleButton has to be used inside a ShlinkSidebarVisibilityProvider");const{sidebarVisible:r,toggleSidebar:i}=n;return g.jsx(xf,{"aria-label":"Toggle sidebar",className:Oe("md:hidden transition-colors",{"text-white/50":!r,"text-white":r},e),onClick:i,...t,children:g.jsx(Be,{icon:gH,size:"xl"})})},Pz=({createNotFound:e,autoToggleButton:t})=>{const{TagsList:n,ShortUrlsList:r,CreateShortUrl:i,ShortUrlVisits:o,TagVisits:l,DomainVisits:c,OrphanVisits:f,NonOrphanVisits:h,Overview:m,EditShortUrl:y,ManageDomains:x,TagVisitsComparison:b,DomainVisitsComparison:C,ShortUrlVisitsComparison:w,ShortUrlRedirectRules:A}=An(Pz),O=Or(),P=ms(),{sidebarVisible:N,showSidebar:F,hideSidebar:U}=R3();_.useEffect(()=>U(),[O,U]);const W=pbe(F,U);return g.jsxs(g.Fragment,{children:[t&&g.jsx(Mz,{className:"fixed top-4 left-3 z-1035"}),g.jsx("div",{...W,className:"h-full",children:g.jsxs("div",{className:"h-full",children:[g.jsx(b2e,{routePrefix:P,showOnMobile:N}),g.jsx("div",{className:"min-h-full pt-[20px] md:pt-[30px] md:pl-(--aside-menu-width)",onPointerDown:U,children:g.jsx("div",{className:"container mx-auto px-3",children:g.jsxs(oy,{children:[g.jsx(ft,{index:!0,element:g.jsx(vw,{replace:!0,to:"overview"})}),g.jsx(ft,{path:"/overview",element:g.jsx(m,{})}),g.jsx(ft,{path:"/list-short-urls/:page",element:g.jsx(r,{})}),g.jsx(ft,{path:"/create-short-url",element:g.jsx(i,{})}),g.jsx(ft,{path:"/short-code/:shortCode/visits",children:["","*"].map(X=>g.jsx(ft,{path:X,element:g.jsx(o,{})},X))}),g.jsx(ft,{path:"/short-code/:shortCode/edit",element:g.jsx(y,{})}),g.jsx(ft,{path:"/short-code/:shortCode/redirect-rules",element:g.jsx(A,{})}),g.jsx(ft,{path:"/short-urls/compare-visits",element:g.jsx(w,{})}),g.jsx(ft,{path:"/tag/:tag/visits",children:["","*"].map(X=>g.jsx(ft,{path:X,element:g.jsx(l,{})},X))}),g.jsx(ft,{path:"/tags/compare-visits",element:g.jsx(b,{})}),g.jsx(ft,{path:"/domain/:domain/visits",children:["","*"].map(X=>g.jsx(ft,{path:X,element:g.jsx(c,{})},X))}),g.jsx(ft,{path:"/orphan-visits",children:["","*"].map(X=>g.jsx(ft,{path:X,element:g.jsx(f,{})},X))}),g.jsx(ft,{path:"/non-orphan-visits",children:["","*"].map(X=>g.jsx(ft,{path:X,element:g.jsx(h,{})},X))}),g.jsx(ft,{path:"/manage-tags",element:g.jsx(n,{})}),g.jsx(ft,{path:"/manage-domains",element:g.jsx(x,{})}),g.jsx(ft,{path:"/domains/compare-visits",element:g.jsx(C,{})}),e&&g.jsx(ft,{path:"*",element:e("/list-short-urls/1")})]})})})]})})]})},x2e=Tn(Pz,["TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains","TagVisitsComparison","DomainVisitsComparison","ShortUrlVisitsComparison","ShortUrlRedirectRules"]),_2e=e=>rS({devTools:!1,reducer:Ey({mercureInfo:e.mercureInfoReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlsDetails:e.shortUrlsDetailsReducer,shortUrlVisits:e.shortUrlVisitsReducer,shortUrlVisitsDeletion:e.shortUrlVisitsDeletionReducer,shortUrlVisitsComparison:e.shortUrlVisitsComparisonReducer,tagVisits:e.tagVisitsReducer,tagVisitsComparison:e.tagVisitsComparisonReducer,domainVisits:e.domainVisitsReducer,domainVisitsComparison:e.domainVisitsComparisonReducer,orphanVisits:e.orphanVisitsReducer,orphanVisitsDeletion:e.orphanVisitsDeletionReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer,shortUrlRedirectRules:e.shortUrlRedirectRulesReducer,shortUrlRedirectRulesSaving:e.setShortUrlRedirectRulesReducer}),middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),w2e=e=>{e.factory("Main",x2e),e.factory("store",_2e)},Ra=new gN,{container:S2e}=Ra,C2e=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),E2e=(e,t)=>(...n)=>e[t](...n),A2e=(e,t)=>({...e,[t]:E2e(S2e,t)}),Vf=(e,t=[])=>HL(e?C2e(e):null,t.reduce(A2e,{}));w2e(Ra);J1e(Ra,Vf);Sbe(Ra,Vf);y2e(Ra,Vf);Dye(Ra);Lye(Ra,Vf);qye(Ra,Vf);Lbe(Ra);s1e(Ra,Vf);let ML;const T2e=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:l,autoSidebarToggle:c=!0})=>{const f=wye(t),h=_.useRef(void 0),[m,y]=_.useState(),x=Wu(),b=_.useMemo(()=>x?_.Fragment:rN,[x]);return _.useEffect(()=>{ML=n,e.value("apiClientFactory",()=>ML),l&&e.value("TagColorsStorage",l);const{Main:C,store:w,loadMercureInfo:A,listTags:O,listDomains:P}=e.container;h.current=g.jsx(C,{createNotFound:o,autoToggleButton:c}),y(w),w.dispatch(A(r)),w.dispatch(O()),w.dispatch(P())},[n,c,o,r,l]),m?g.jsx(fw,{store:m,children:g.jsx(tD,{value:r??{},children:g.jsx(_ye,{value:f,children:g.jsx(jz,{children:g.jsx(yye,{value:i,children:g.jsx(b,{children:h.current})})})})})}):g.jsx(g.Fragment,{})},O2e="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=",j2e="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==",M2e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",P2e=()=>{delete q5.Icon.Default.prototype._getIconUrl,q5.Icon.Default.mergeOptions({iconRetinaUrl:j2e,iconUrl:O2e,shadowUrl:M2e})};P2e();const L2e=T2e(Ra),Hf=({children:e,className:t})=>g.jsx("div",{className:Oe("container mx-auto p-5 pt-8 max-md:p-3 max-md:py-4",t),children:e});function Lz(e){const t=n=>{const{ServerError:r}=Ma(t),i=Cf(),{selectServer:o,selectedServer:l}=n;return _.useEffect(()=>{i.serverId&&o(i.serverId)},[i.serverId,o]),l?cV(l)?g.jsx(r,{}):g.jsx(e,{...n}):g.jsx(Hf,{children:g.jsx(Wo,{loading:!0})})};return t}const Nz=Lz(_.memo(({selectedServer:e,settings:t})=>{const{buildShlinkApiClient:n,TagColorsStorage:r,ServerError:i}=Ma(Nz);if(!Ew(e))return g.jsx(i,{});const o=`/server/${e.id}`;return g.jsxs(jz,{children:[g.jsx(Mz,{className:"fixed top-3.5 left-3 z-901"}),g.jsx(L2e,{serverVersion:e.version,apiClient:n(e),settings:t,routesPrefix:o,tagColorsStorage:r,createNotFound:l=>g.jsx(c6,{to:`${o}${l}`,children:"List short URLs"}),autoSidebarToggle:!1})]})})),N2e=Pa(Nz,["buildShlinkApiClient","TagColorsStorage","ServerError"]),R2e=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",YX,"fetch"),e.serviceFactory("ScrollToTop",()=>QX),e.factory("MainHeader",XX),e.serviceFactory("Home",()=>ZX),e.decorator("Home",uv),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.factory("ShlinkWebComponentContainer",N2e),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>lQ),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",()=>WX)},Rz=()=>{const e=uo();return _.useCallback(()=>e(-1),[e])};function D2e(e){let t=e.url;try{const{host:n,pathname:r}=new URL(t);t=n;const i=r.substring(1);i.length>0&&(t=`${t} ${i}`)}catch{}return`${e.name} ${t}`.toLowerCase().replace(/[^a-zA-Z0-9-_.~]/g,"-")}function k2e(e){const t={};return e.forEach(n=>{t[n.id]=n}),t}const I2e=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n);function z2e(e,t){const n=Object.values(e),{duplicatedServers:r=[],newServers:i=[]}=V6(t,o=>I2e(n,o)?"duplicatedServers":"newServers");return{duplicatedServers:r,newServers:i}}function iy(e,t){const n=new Set(Object.keys(e)),r=[];return t.forEach(i=>{const o=D2e(i);let l=o,c=1;for(;n.has(l);)l=`${o}-${c}`,c++;r.push({...i,id:l}),n.add(l)}),r}const Dz=({open:e,duplicatedServers:t,onClose:n,onConfirm:r})=>{const i=t.length>1;return g.jsxs(co,{size:"lg",title:`Duplicated server${i?"s":""}`,open:e,onClose:n,onConfirm:r,confirmText:`Save duplicate${i?"s":""}`,cancelText:i?"Ignore duplicates":"Discard",children:[g.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),g.jsx("ul",{className:"list-disc mt-4",children:t.map(({url:o,apiKey:l},c)=>i?g.jsxs("li",{children:[g.jsx("b",{children:o})," - ",g.jsx("b",{children:l})]},c):g.jsxs(_.Fragment,{children:[g.jsxs("li",{children:["URL: ",g.jsx("b",{children:o})]}),g.jsxs("li",{children:["API key: ",g.jsx("b",{children:l})]})]},c))}),g.jsxs("span",{children:[i?"Do you want to save duplicated servers":"Do you want to save this server","?"]})]})},U2e=e=>_.useCallback(t=>{t.preventDefault(),e(t)},[e]),kz=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=_.useState(t?.name??""),[l,c]=_.useState(t?.url??""),[f,h]=_.useState(t?.apiKey??""),{flag:m,toggle:y}=Cn(t?.forwardCredentials??!1),x=U2e(()=>e({name:i,url:l,apiKey:f,forwardCredentials:m}));return g.jsxs("form",{name:"serverForm",onSubmit:x,children:[g.jsxs(Nt,{className:"mb-4",bodyClassName:"flex flex-col gap-y-3",title:r,children:[g.jsx(di,{label:"Name",value:i,onChange:b=>o(b.target.value),required:!0}),g.jsx(di,{label:"URL",type:"url",value:l,onChange:b=>c(b.target.value),required:!0}),g.jsx(VK,{label:"API key",value:f,onChange:b=>h(b.target.value),required:!0}),g.jsx(MK,{summary:"Advanced options",children:g.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.jsxs(ja,{className:"flex items-center gap-x-1.5 cursor-pointer",children:[g.jsx(Gw,{onChange:y,checked:m}),"Forward credentials to this server on every request."]}),g.jsxs("small",{className:"pl-5.5 text-gray-600 dark:text-gray-400 mt-0.5",children:['"',"Credentials",'"'," here means cookies, TLS client certificates, or authentication headers containing a username and password."]}),g.jsxs("small",{className:"pl-5.5 text-gray-600 dark:text-gray-400",children:[g.jsx("b",{children:"Important!"})," If you are not sure what this means, leave it unchecked. Enabling this option will make all requests fail for Shlink older than v4.5.0, as it requires the server to set a more strict value for ",g.jsx("code",{className:"whitespace-nowrap",children:"Access-Control-Allow-Origin"})," than ",g.jsx("code",{children:"*"}),"."]})]})})]}),g.jsx("div",{className:"flex items-center justify-end gap-x-2",children:n})]})},PL=4e3,LL=({variant:e})=>g.jsx("div",{className:"mt-4",children:g.jsxs(Gr,{variant: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."]})}),Iz=({servers:e,createServers:t})=>{const{ImportServersBtn:n,useTimeoutToggle:r}=Ma(Iz),i=uo(),o=Rz(),l=!!Object.keys(e).length,[c,f]=r({delay:PL}),[h,m]=r({delay:PL}),{flag:y,toggle:x}=Cn(),[b,C]=_.useState(),w=_.useCallback(O=>{const[P]=iy(e,[O]);t([P]),i(`/server/${P.id}`)},[t,i,e]),A=_.useCallback(O=>{C(O),Object.values(e).some(({url:N,apiKey:F})=>O.url===N&&O.apiKey===F)?x():w(O)},[w,e,x]);return g.jsxs(Hf,{children:[g.jsxs(kz,{title:"Add new server",onSubmit:A,children:[!l&&g.jsx(n,{tooltipPlacement:"top",onImport:f,onError:m}),l&&g.jsx(Tt,{variant:"secondary",onClick:o,children:"Cancel"}),g.jsx(Tt,{type:"submit",children:"Create server"})]}),c&&g.jsx(LL,{variant:"success"}),h&&g.jsx(LL,{variant:"error"}),g.jsx(Dz,{open:y,duplicatedServers:b?[b]:[],onClose:o,onConfirm:()=>b&&w(b)})]})},B2e=Pa(Iz,["ImportServersBtn","useTimeoutToggle"]),zz=({server:e,children:t})=>{const{DeleteServerModal:n}=Ma(zz),{flag:r,setToTrue:i,setToFalse:o}=Cn(),l=uo(),c=_.useCallback(f=>{o(),f&&l("/")},[o,l]);return g.jsxs(g.Fragment,{children:[g.jsx("button",{type:"button",className:"text-danger hover:underline",onClick:i,children:t}),g.jsx(n,{server:e,open:r,onClose:c})]})},F2e=Pa(zz,["DeleteServerModal"]),$2e=({server:e,onClose:t,open:n,deleteServer:r})=>{const i=_.useCallback(o=>{o==="confirm"&&r(e)},[r,e]);return g.jsx(co,{open:n,title:"Remove server",variant:"danger",onClose:()=>t(!1),onConfirm:()=>t(!0),onClosed:i,confirmText:"Delete",children:g.jsxs("div",{className:"flex flex-col gap-y-4",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."})})]})})},V2e=Lz(({editServer:e,selectedServer:t,selectServer:n})=>{const r=Rz(),{reconnect:i}=Ku();if(!gh(t))return null;const o=l=>{e(t.id,l),i==="true"&&n(t.id),r()};return g.jsx(Hf,{children:g.jsxs(kz,{title:g.jsxs(g.Fragment,{children:['Edit "',t.name,'"']}),initialValues:t,onSubmit:o,children:[g.jsx(Tt,{variant:"secondary",onClick:r,children:"Cancel"}),g.jsx(Tt,{type:"submit",children:"Save"})]})})}),H2e=Pa(V2e,["ServerError"]),Uz=({createServers:e,servers:t,children:n,onImport:r,onError:i=()=>{},tooltipPlacement:o="bottom",className:l=""})=>{const{ServersImporter:c}=Ma(Uz),f=_.useRef(null),{anchor:h,tooltip:m}=as({placement:o}),[y,x]=_.useState([]),{flag:b,setToTrue:C,setToFalse:w}=Cn(),A=_.useRef(!1),O=_.useCallback(async({target:F})=>c.importServersFromFile(F.files?.[0]).then(U=>{const{duplicatedServers:W,newServers:X}=z2e(t,U);A.current=X.length>0,e(iy(t,X)),W.length>0?(x(W),C()):r?.()}).then(()=>{F.value=null}).catch(i),[e,i,r,t,c,C]),P=_.useCallback(()=>{e(iy(t,y)),w(),r?.()},[e,y,w,r,t]),N=_.useCallback(()=>{w(),A.current&&r?.()},[w,r]);return g.jsxs(g.Fragment,{children:[g.jsxs(Tt,{variant:"secondary",className:l,onClick:()=>f.current?.click(),...h,children:[g.jsx(Be,{icon:zV,widthAuto:!0})," ",n??"Import from file"]}),g.jsxs(os,{...m,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:".csv",className:"hidden","aria-hidden":!0,tabIndex:-1,ref:f,onChange:O,"data-testid":"csv-file-input"}),g.jsx(Dz,{open:b,duplicatedServers:y,onClose:N,onConfirm:P})]})},q2e=Pa(Uz,["ServersImporter"]),Bz=({servers:e,selectedServer:t})=>{const{DeleteServerButton:n}=Ma(Bz);return g.jsx(Hf,{children:g.jsxs("div",{className:"flex flex-col items-center gap-y-4 md:gap-y-8",children:[g.jsxs(Wo,{className:"w-full lg:w-[80%]",variant:"error",children:[!gh(t)&&"Could not find this Shlink server.",gh(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.jsxs("p",{className:"text-xl",children:["These are the Shlink servers currently configured. Choose one of them or ",g.jsx(Ir,{to:"/server/create",children:"add a new one"}),"."]}),g.jsx(ln,{className:"w-full max-w-100 overflow-hidden",children:g.jsx(U6,{borderless:!0,servers:Object.values(e)})}),gh(t)&&g.jsxs("p",{className:"text-xl",children:["Alternatively, if you think you may have misconfigured this server, you can ",g.jsx(n,{server:t,children:"remove it"})," or ",g.jsx(Ir,{to:`/server/${t.id}/edit?reconnect=true`,children:"edit it"}),"."]})]})})},G2e=Pa(Bz,["DeleteServerButton"]),Y2e=4e3,Fz=({servers:e})=>{const{ServersExporter:t,ImportServersBtn:n,useTimeoutToggle:r,ManageServersRow:i}=Ma(Fz),[o,l]=_.useState(""),c=_.useMemo(()=>Object.values(e),[e]),f=_.useMemo(()=>c.filter(({name:x,url:b})=>`${x} ${b}`.toLowerCase().match(o.toLowerCase())),[c,o]),h=c.some(({autoConnect:x})=>!!x),[m,y]=r({delay:Y2e});return g.jsxs(Hf,{className:"flex flex-col gap-y-4",children:[g.jsx(jf,{onChange:l}),g.jsxs("div",{className:"flex flex-col md:flex-row gap-2",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx(n,{className:"flex-grow",onError:y,children:"Import servers"}),f.length>0&&g.jsxs(Tt,{variant:"secondary",className:"flex-grow",onClick:async()=>t.exportServers(),children:[g.jsx(Be,{icon:xN,widthAuto:!0})," Export servers"]})]}),g.jsxs(Tt,{className:"md:ml-auto",to:"/server/create",children:[g.jsx(Be,{icon:Wh,widthAuto:!0})," Add a server"]})]}),g.jsx(Nt,{className:"card",children:g.jsxs($e,{header:g.jsxs($e.Row,{children:[h&&g.jsx($e.Cell,{className:"w-[35px]",children:g.jsx("span",{className:"sr-only",children:"Auto-connect"})}),g.jsx($e.Cell,{children:"Name"}),g.jsx($e.Cell,{children:"Base URL"}),g.jsx($e.Cell,{children:g.jsx("span",{className:"sr-only",children:"Options"})})]}),children:[!f.length&&g.jsx($e.Row,{className:"text-center",children:g.jsx($e.Cell,{colSpan:4,children:"No servers found."})}),f.map(x=>g.jsx(i,{server:x,hasAutoConnect:h},x.id))]})}),m&&g.jsx("div",{children:g.jsx(Gr,{variant:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},W2e=Pa(Fz,["ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"]),$z=({server:e,hasAutoConnect:t})=>{const{ManageServersRowDropdown:n}=Ma($z),{anchor:r,tooltip:i}=as();return g.jsxs($e.Row,{className:"relative",children:[t&&g.jsx($e.Cell,{columnName:"Auto-connect",children:e.autoConnect&&g.jsxs(g.Fragment,{children:[g.jsx(Be,{icon:Nu,className:"text-lm-brand dark:text-dm-brand",...r}),g.jsx(os,{...i,children:"Auto-connect to this server"})]})}),g.jsx($e.Cell,{className:"font-bold",columnName:"Name",children:g.jsx(Ir,{to:`/server/${e.id}`,children:e.name})}),g.jsx($e.Cell,{columnName:"Base URL",className:"max-lg:border-b-0",children:e.url}),g.jsx($e.Cell,{className:"text-right max-lg:absolute right-0 -top-1 mx-lg:pt-0",children:g.jsx(n,{server:e})})]})},K2e=Pa($z,["ManageServersRowDropdown"]),Vz=({server:e,setAutoConnect:t})=>{const{DeleteServerModal:n}=Ma(Vz),{flag:r,setToTrue:i,setToFalse:o}=Cn(),l=`/server/${e.id}`,{autoConnect:c}=e,f=c?MV:TK;return g.jsxs(g.Fragment,{children:[g.jsxs(tn,{menuAlignment:"right",children:[g.jsxs(tn.Item,{to:l,className:"gap-1.5",children:[g.jsx(Be,{icon:JV})," Connect"]}),g.jsxs(tn.Item,{to:`${l}/edit`,className:"gap-1.5",children:[g.jsx(Be,{icon:Tw})," Edit server"]}),g.jsxs(tn.Item,{onClick:()=>t(e,!c),className:"gap-1.5",children:[g.jsx(Be,{icon:f})," ",c?"Do not a":"A","uto-connect"]}),g.jsx(tn.Separator,{}),g.jsxs(tn.Item,{className:"[&]:text-danger gap-1.5",onClick:i,children:[g.jsx(Be,{icon:AN})," Remove server"]})]}),g.jsx(n,{server:e,open:r,onClose:o})]})},Z2e=Pa(Vz,["DeleteServerModal"]),Hz=(e,t)=>O6(e,t,{serializeError:n=>n}),X2e={},{actions:Q2e,reducer:J2e}=jt({name:"shlink/servers",initialState:X2e,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})=>(delete e[t.id],e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?Object.fromEntries(Object.entries(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):{...e,[n]:{...e[n],autoConnect:r}}:e}},createServers:{prepare:e=>({payload:k2e(e)}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:e_e,deleteServer:t_e,setAutoConnect:n_e,createServers:qz}=Q2e,r_e=J2e,i_e=e=>iy({},Array.isArray(e)?e.filter(vN):[]),a_e=e=>Hz("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.jsonRequest(`${Hg.homepage}/servers.json`),i=i_e(r);n(qz(i))}),D3="shlink/selectedServer",o_e="1.0.0",s_e="999.999.999",l_e="latest",u_e=e=>K6(e===l_e?s_e:e,o_e),c_e=H6(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:u_e(n),printableVersion:W6(n)}))),NL=null,k3=un(`${D3}/resetSelectedServer`),f_e=e=>Hz(`${D3}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(k3());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const l=e(o),{version:c,printableVersion:f}=await c_e(o,()=>l.health());return{...o,version:c,printableVersion:f}}catch{return{...o,serverNotReachable:!0}}}),d_e=e=>jt({name:D3,initialState:NL,reducers:{},extraReducers:t=>{t.addCase(k3,()=>NL),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),h_e=({servers:e,selectedServer:t})=>{const n=Object.values(e);return g.jsx(J2.Dropdown,{buttonContent:g.jsxs("span",{className:"flex items-center gap-1.5",children:[g.jsx(Be,{icon:iT})," Servers"]}),children:n.length===0?g.jsxs(qe.Item,{to:"/server/create",children:[g.jsx(Be,{icon:Wh})," Add a server"]}):g.jsxs(g.Fragment,{children:[n.map(({name:r,id:i})=>g.jsx(qe.Item,{to:`/server/${i}`,selected:fV(t)===i,children:r},i)),g.jsx(qe.Separator,{}),g.jsxs(qe.Item,{to:"/manage-servers",children:[g.jsx(Be,{icon:iT})," Manage servers"]})]})})},m_e=({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)},p_e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);m_e(e,i,n)},g_e="shlink-servers.csv";class v_e{#t;#r;#n;constructor(t,n,r){this.#t=t,this.#r=n,this.#n=r}exportServers=async()=>{const t=Object.values(this.#t.get("servers")??{}).map(dV);try{const n=this.#n(t);p_e(this.#r,n,g_e)}catch(n){console.error(n)}}}const y_e=e=>{if(!Array.isArray(e))throw new Error("Provided file does not have the right format.");return e.map(mV)};class b_e{#t;constructor(t){this.#t=t}async importServersFromFile(t){if(!t)throw new Error("No file provided");const n=await t.text(),r=await this.#t(n);return y_e(r)}}const x_e=(e,t)=>{e.factory("ManageServers",W2e),e.decorator("ManageServers",uv),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.factory("ManageServersRow",K2e),e.factory("ManageServersRowDropdown",Z2e),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.factory("CreateServer",B2e),e.decorator("CreateServer",uv),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.factory("EditServer",H2e),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>h_e),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>$2e),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.factory("DeleteServerButton",F2e),e.factory("ImportServersBtn",q2e),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.factory("ServerError",G2e),e.decorator("ServerError",t(["servers","selectedServer"])),e.service("ServersImporter",b_e,"csvToJson"),e.service("ServersExporter",v_e,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",f_e,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>qz),e.serviceFactory("deleteServer",()=>t_e),e.serviceFactory("editServer",()=>e_e),e.serviceFactory("setAutoConnect",()=>n_e),e.serviceFactory("fetchServers",a_e,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>k3),e.serviceFactory("selectedServerReducerCreator",d_e,"selectServer"),e.serviceFactory("selectedServerReducer",n=>n.reducer,"selectedServerReducerCreator")},Gz={field:"dateCreated",dir:"DESC"},__e={realTimeUpdates:{enabled:!0},shortUrlCreation:{},ui:{theme:Jw()},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:Gz}},{reducer:w_e,actions:S_e}=jt({name:"shlink/settings",initialState:__e,reducers:{setSettings:(e,{payload:t})=>Mf(e,t)}}),{setSettings:C_e}=S_e,E_e=w_e,A_e=({settings:e,setSettings:t})=>g.jsx(Hf,{children:g.jsx(TQ,{settings:e,onUpdateSettings:t,defaultShortUrlsListOrdering:Gz})}),T_e=(e,t)=>{e.serviceFactory("Settings",()=>A_e),e.decorator("Settings",uv),e.decorator("Settings",t(["settings"],["setSettings","resetSelectedServer"])),e.serviceFactory("setSettings",()=>C_e)};var j2,RL;function O_e(){return RL||(RL=1,j2=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 l in r)n.d(o,l,(function(c){return r[c]}).bind(null,l));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=31)}([function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(C){var w=[];for(var A in C)w.push(A);return w};e.exports=y;var o=Object.create(n(4));o.inherits=n(2);var l=n(22),c=n(13);o.inherits(y,l);for(var f=i(c.prototype),h=0;h<f.length;h++){var m=f[h];y.prototype[m]||(y.prototype[m]=c.prototype[m])}function y(C){if(!(this instanceof y))return new y(C);l.call(this,C),c.call(this,C),C&&C.readable===!1&&(this.readable=!1),C&&C.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,C&&C.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",x)}function x(){this.allowHalfOpen||this._writableState.ended||r.nextTick(b,this)}function b(C){C.end()}Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(y.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(C){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=C,this._writableState.destroyed=C)}}),y.prototype._destroy=function(C,w){this.push(null),this.end(),r.nextTick(w,C)}},function(e,t){typeof Object.create=="function"?e.exports=function(n,r){r&&(n.super_=r,n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(n,r){if(r){n.super_=r;var i=function(){};i.prototype=r.prototype,n.prototype=new i,n.prototype.constructor=n}}},function(e,t,n){(function(r){var i=n(37),o=n(38),l=n(39);function c(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(D,R){if(c()<R)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(D=new Uint8Array(R)).__proto__=h.prototype:(D===null&&(D=new h(R)),D.length=R),D}function h(D,R,G){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(D,R,G);if(typeof D=="number"){if(typeof R=="string")throw new Error("If encoding is specified then the first argument must be a string");return x(this,D)}return m(this,D,R,G)}function m(D,R,G,te){if(typeof R=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&R instanceof ArrayBuffer?function(V,Z,ne,me){if(Z.byteLength,ne<0||Z.byteLength<ne)throw new RangeError("'offset' is out of bounds");if(Z.byteLength<ne+(me||0))throw new RangeError("'length' is out of bounds");return Z=ne===void 0&&me===void 0?new Uint8Array(Z):me===void 0?new Uint8Array(Z,ne):new Uint8Array(Z,ne,me),h.TYPED_ARRAY_SUPPORT?(V=Z).__proto__=h.prototype:V=b(V,Z),V}(D,R,G,te):typeof R=="string"?function(V,Z,ne){if(typeof ne=="string"&&ne!==""||(ne="utf8"),!h.isEncoding(ne))throw new TypeError('"encoding" must be a valid string encoding');var me=0|w(Z,ne),ie=(V=f(V,me)).write(Z,ne);return ie!==me&&(V=V.slice(0,ie)),V}(D,R,G):function(V,Z){if(h.isBuffer(Z)){var ne=0|C(Z.length);return(V=f(V,ne)).length===0||Z.copy(V,0,0,ne),V}if(Z){if(typeof ArrayBuffer<"u"&&Z.buffer instanceof ArrayBuffer||"length"in Z)return typeof Z.length!="number"||function(me){return me!=me}(Z.length)?f(V,0):b(V,Z);if(Z.type==="Buffer"&&l(Z.data))return b(V,Z.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(D,R)}function y(D){if(typeof D!="number")throw new TypeError('"size" argument must be a number');if(D<0)throw new RangeError('"size" argument must not be negative')}function x(D,R){if(y(R),D=f(D,R<0?0:0|C(R)),!h.TYPED_ARRAY_SUPPORT)for(var G=0;G<R;++G)D[G]=0;return D}function b(D,R){var G=R.length<0?0:0|C(R.length);D=f(D,G);for(var te=0;te<G;te+=1)D[te]=255&R[te];return D}function C(D){if(D>=c())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c().toString(16)+" bytes");return 0|D}function w(D,R){if(h.isBuffer(D))return D.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(D)||D instanceof ArrayBuffer))return D.byteLength;typeof D!="string"&&(D=""+D);var G=D.length;if(G===0)return 0;for(var te=!1;;)switch(R){case"ascii":case"latin1":case"binary":return G;case"utf8":case"utf-8":case void 0:return pe(D).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*G;case"hex":return G>>>1;case"base64":return he(D).length;default:if(te)return pe(D).length;R=(""+R).toLowerCase(),te=!0}}function A(D,R,G){var te=D[R];D[R]=D[G],D[G]=te}function O(D,R,G,te,V){if(D.length===0)return-1;if(typeof G=="string"?(te=G,G=0):G>2147483647?G=2147483647:G<-2147483648&&(G=-2147483648),G=+G,isNaN(G)&&(G=V?0:D.length-1),G<0&&(G=D.length+G),G>=D.length){if(V)return-1;G=D.length-1}else if(G<0){if(!V)return-1;G=0}if(typeof R=="string"&&(R=h.from(R,te)),h.isBuffer(R))return R.length===0?-1:P(D,R,G,te,V);if(typeof R=="number")return R&=255,h.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?V?Uint8Array.prototype.indexOf.call(D,R,G):Uint8Array.prototype.lastIndexOf.call(D,R,G):P(D,[R],G,te,V);throw new TypeError("val must be string, number or Buffer")}function P(D,R,G,te,V){var Z,ne=1,me=D.length,ie=R.length;if(te!==void 0&&((te=String(te).toLowerCase())==="ucs2"||te==="ucs-2"||te==="utf16le"||te==="utf-16le")){if(D.length<2||R.length<2)return-1;ne=2,me/=2,ie/=2,G/=2}function xe(ke,Ve){return ne===1?ke[Ve]:ke.readUInt16BE(Ve*ne)}if(V){var Ee=-1;for(Z=G;Z<me;Z++)if(xe(D,Z)===xe(R,Ee===-1?0:Z-Ee)){if(Ee===-1&&(Ee=Z),Z-Ee+1===ie)return Ee*ne}else Ee!==-1&&(Z-=Z-Ee),Ee=-1}else for(G+ie>me&&(G=me-ie),Z=G;Z>=0;Z--){for(var Me=!0,Ue=0;Ue<ie;Ue++)if(xe(D,Z+Ue)!==xe(R,Ue)){Me=!1;break}if(Me)return Z}return-1}function N(D,R,G,te){G=Number(G)||0;var V=D.length-G;te?(te=Number(te))>V&&(te=V):te=V;var Z=R.length;if(Z%2!=0)throw new TypeError("Invalid hex string");te>Z/2&&(te=Z/2);for(var ne=0;ne<te;++ne){var me=parseInt(R.substr(2*ne,2),16);if(isNaN(me))return ne;D[G+ne]=me}return ne}function F(D,R,G,te){return ve(pe(R,D.length-G),D,G,te)}function U(D,R,G,te){return ve(function(V){for(var Z=[],ne=0;ne<V.length;++ne)Z.push(255&V.charCodeAt(ne));return Z}(R),D,G,te)}function W(D,R,G,te){return U(D,R,G,te)}function X(D,R,G,te){return ve(he(R),D,G,te)}function ae(D,R,G,te){return ve(function(V,Z){for(var ne,me,ie,xe=[],Ee=0;Ee<V.length&&!((Z-=2)<0);++Ee)me=(ne=V.charCodeAt(Ee))>>8,ie=ne%256,xe.push(ie),xe.push(me);return xe}(R,D.length-G),D,G,te)}function ce(D,R,G){return R===0&&G===D.length?i.fromByteArray(D):i.fromByteArray(D.slice(R,G))}function re(D,R,G){G=Math.min(D.length,G);for(var te=[],V=R;V<G;){var Z,ne,me,ie,xe=D[V],Ee=null,Me=xe>239?4:xe>223?3:xe>191?2:1;if(V+Me<=G)switch(Me){case 1:xe<128&&(Ee=xe);break;case 2:(192&(Z=D[V+1]))==128&&(ie=(31&xe)<<6|63&Z)>127&&(Ee=ie);break;case 3:Z=D[V+1],ne=D[V+2],(192&Z)==128&&(192&ne)==128&&(ie=(15&xe)<<12|(63&Z)<<6|63&ne)>2047&&(ie<55296||ie>57343)&&(Ee=ie);break;case 4:Z=D[V+1],ne=D[V+2],me=D[V+3],(192&Z)==128&&(192&ne)==128&&(192&me)==128&&(ie=(15&xe)<<18|(63&Z)<<12|(63&ne)<<6|63&me)>65535&&ie<1114112&&(Ee=ie)}Ee===null?(Ee=65533,Me=1):Ee>65535&&(Ee-=65536,te.push(Ee>>>10&1023|55296),Ee=56320|1023&Ee),te.push(Ee),V+=Me}return function(Ue){var ke=Ue.length;if(ke<=J)return String.fromCharCode.apply(String,Ue);for(var Ve="",ot=0;ot<ke;)Ve+=String.fromCharCode.apply(String,Ue.slice(ot,ot+=J));return Ve}(te)}t.Buffer=h,t.SlowBuffer=function(D){return+D!=D&&(D=0),h.alloc(+D)},t.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=r.TYPED_ARRAY_SUPPORT!==void 0?r.TYPED_ARRAY_SUPPORT:function(){try{var D=new Uint8Array(1);return D.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},D.foo()===42&&typeof D.subarray=="function"&&D.subarray(1,1).byteLength===0}catch{return!1}}(),t.kMaxLength=c(),h.poolSize=8192,h._augment=function(D){return D.__proto__=h.prototype,D},h.from=function(D,R,G){return m(null,D,R,G)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(D,R,G){return function(te,V,Z,ne){return y(V),V<=0?f(te,V):Z!==void 0?typeof ne=="string"?f(te,V).fill(Z,ne):f(te,V).fill(Z):f(te,V)}(null,D,R,G)},h.allocUnsafe=function(D){return x(null,D)},h.allocUnsafeSlow=function(D){return x(null,D)},h.isBuffer=function(D){return!(D==null||!D._isBuffer)},h.compare=function(D,R){if(!h.isBuffer(D)||!h.isBuffer(R))throw new TypeError("Arguments must be Buffers");if(D===R)return 0;for(var G=D.length,te=R.length,V=0,Z=Math.min(G,te);V<Z;++V)if(D[V]!==R[V]){G=D[V],te=R[V];break}return G<te?-1:te<G?1:0},h.isEncoding=function(D){switch(String(D).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(D,R){if(!l(D))throw new TypeError('"list" argument must be an Array of Buffers');if(D.length===0)return h.alloc(0);var G;if(R===void 0)for(R=0,G=0;G<D.length;++G)R+=D[G].length;var te=h.allocUnsafe(R),V=0;for(G=0;G<D.length;++G){var Z=D[G];if(!h.isBuffer(Z))throw new TypeError('"list" argument must be an Array of Buffers');Z.copy(te,V),V+=Z.length}return te},h.byteLength=w,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var D=this.length;if(D%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var R=0;R<D;R+=2)A(this,R,R+1);return this},h.prototype.swap32=function(){var D=this.length;if(D%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var R=0;R<D;R+=4)A(this,R,R+3),A(this,R+1,R+2);return this},h.prototype.swap64=function(){var D=this.length;if(D%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var R=0;R<D;R+=8)A(this,R,R+7),A(this,R+1,R+6),A(this,R+2,R+5),A(this,R+3,R+4);return this},h.prototype.toString=function(){var D=0|this.length;return D===0?"":arguments.length===0?re(this,0,D):(function(R,G,te){var V=!1;if((G===void 0||G<0)&&(G=0),G>this.length||((te===void 0||te>this.length)&&(te=this.length),te<=0)||(te>>>=0)<=(G>>>=0))return"";for(R||(R="utf8");;)switch(R){case"hex":return se(this,G,te);case"utf8":case"utf-8":return re(this,G,te);case"ascii":return oe(this,G,te);case"latin1":case"binary":return _e(this,G,te);case"base64":return ce(this,G,te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,G,te);default:if(V)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),V=!0}}).apply(this,arguments)},h.prototype.equals=function(D){if(!h.isBuffer(D))throw new TypeError("Argument must be a Buffer");return this===D||h.compare(this,D)===0},h.prototype.inspect=function(){var D="",R=t.INSPECT_MAX_BYTES;return this.length>0&&(D=this.toString("hex",0,R).match(/.{2}/g).join(" "),this.length>R&&(D+=" ... ")),"<Buffer "+D+">"},h.prototype.compare=function(D,R,G,te,V){if(!h.isBuffer(D))throw new TypeError("Argument must be a Buffer");if(R===void 0&&(R=0),G===void 0&&(G=D?D.length:0),te===void 0&&(te=0),V===void 0&&(V=this.length),R<0||G>D.length||te<0||V>this.length)throw new RangeError("out of range index");if(te>=V&&R>=G)return 0;if(te>=V)return-1;if(R>=G)return 1;if(this===D)return 0;for(var Z=(V>>>=0)-(te>>>=0),ne=(G>>>=0)-(R>>>=0),me=Math.min(Z,ne),ie=this.slice(te,V),xe=D.slice(R,G),Ee=0;Ee<me;++Ee)if(ie[Ee]!==xe[Ee]){Z=ie[Ee],ne=xe[Ee];break}return Z<ne?-1:ne<Z?1:0},h.prototype.includes=function(D,R,G){return this.indexOf(D,R,G)!==-1},h.prototype.indexOf=function(D,R,G){return O(this,D,R,G,!0)},h.prototype.lastIndexOf=function(D,R,G){return O(this,D,R,G,!1)},h.prototype.write=function(D,R,G,te){if(R===void 0)te="utf8",G=this.length,R=0;else if(G===void 0&&typeof R=="string")te=R,G=this.length,R=0;else{if(!isFinite(R))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");R|=0,isFinite(G)?(G|=0,te===void 0&&(te="utf8")):(te=G,G=void 0)}var V=this.length-R;if((G===void 0||G>V)&&(G=V),D.length>0&&(G<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");for(var Z=!1;;)switch(te){case"hex":return N(this,D,R,G);case"utf8":case"utf-8":return F(this,D,R,G);case"ascii":return U(this,D,R,G);case"latin1":case"binary":return W(this,D,R,G);case"base64":return X(this,D,R,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,D,R,G);default:if(Z)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),Z=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;function oe(D,R,G){var te="";G=Math.min(D.length,G);for(var V=R;V<G;++V)te+=String.fromCharCode(127&D[V]);return te}function _e(D,R,G){var te="";G=Math.min(D.length,G);for(var V=R;V<G;++V)te+=String.fromCharCode(D[V]);return te}function se(D,R,G){var te=D.length;(!R||R<0)&&(R=0),(!G||G<0||G>te)&&(G=te);for(var V="",Z=R;Z<G;++Z)V+=le(D[Z]);return V}function ue(D,R,G){for(var te=D.slice(R,G),V="",Z=0;Z<te.length;Z+=2)V+=String.fromCharCode(te[Z]+256*te[Z+1]);return V}function Y(D,R,G){if(D%1!=0||D<0)throw new RangeError("offset is not uint");if(D+R>G)throw new RangeError("Trying to access beyond buffer length")}function k(D,R,G,te,V,Z){if(!h.isBuffer(D))throw new TypeError('"buffer" argument must be a Buffer instance');if(R>V||R<Z)throw new RangeError('"value" argument is out of bounds');if(G+te>D.length)throw new RangeError("Index out of range")}function z(D,R,G,te){R<0&&(R=65535+R+1);for(var V=0,Z=Math.min(D.length-G,2);V<Z;++V)D[G+V]=(R&255<<8*(te?V:1-V))>>>8*(te?V:1-V)}function H(D,R,G,te){R<0&&(R=4294967295+R+1);for(var V=0,Z=Math.min(D.length-G,4);V<Z;++V)D[G+V]=R>>>8*(te?V:3-V)&255}function I(D,R,G,te,V,Z){if(G+te>D.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("Index out of range")}function j(D,R,G,te,V){return V||I(D,0,G,4),o.write(D,R,G,te,23,4),G+4}function q(D,R,G,te,V){return V||I(D,0,G,8),o.write(D,R,G,te,52,8),G+8}h.prototype.slice=function(D,R){var G,te=this.length;if((D=~~D)<0?(D+=te)<0&&(D=0):D>te&&(D=te),(R=R===void 0?te:~~R)<0?(R+=te)<0&&(R=0):R>te&&(R=te),R<D&&(R=D),h.TYPED_ARRAY_SUPPORT)(G=this.subarray(D,R)).__proto__=h.prototype;else{var V=R-D;G=new h(V,void 0);for(var Z=0;Z<V;++Z)G[Z]=this[Z+D]}return G},h.prototype.readUIntLE=function(D,R,G){D|=0,R|=0,G||Y(D,R,this.length);for(var te=this[D],V=1,Z=0;++Z<R&&(V*=256);)te+=this[D+Z]*V;return te},h.prototype.readUIntBE=function(D,R,G){D|=0,R|=0,G||Y(D,R,this.length);for(var te=this[D+--R],V=1;R>0&&(V*=256);)te+=this[D+--R]*V;return te},h.prototype.readUInt8=function(D,R){return R||Y(D,1,this.length),this[D]},h.prototype.readUInt16LE=function(D,R){return R||Y(D,2,this.length),this[D]|this[D+1]<<8},h.prototype.readUInt16BE=function(D,R){return R||Y(D,2,this.length),this[D]<<8|this[D+1]},h.prototype.readUInt32LE=function(D,R){return R||Y(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+16777216*this[D+3]},h.prototype.readUInt32BE=function(D,R){return R||Y(D,4,this.length),16777216*this[D]+(this[D+1]<<16|this[D+2]<<8|this[D+3])},h.prototype.readIntLE=function(D,R,G){D|=0,R|=0,G||Y(D,R,this.length);for(var te=this[D],V=1,Z=0;++Z<R&&(V*=256);)te+=this[D+Z]*V;return te>=(V*=128)&&(te-=Math.pow(2,8*R)),te},h.prototype.readIntBE=function(D,R,G){D|=0,R|=0,G||Y(D,R,this.length);for(var te=R,V=1,Z=this[D+--te];te>0&&(V*=256);)Z+=this[D+--te]*V;return Z>=(V*=128)&&(Z-=Math.pow(2,8*R)),Z},h.prototype.readInt8=function(D,R){return R||Y(D,1,this.length),128&this[D]?-1*(255-this[D]+1):this[D]},h.prototype.readInt16LE=function(D,R){R||Y(D,2,this.length);var G=this[D]|this[D+1]<<8;return 32768&G?4294901760|G:G},h.prototype.readInt16BE=function(D,R){R||Y(D,2,this.length);var G=this[D+1]|this[D]<<8;return 32768&G?4294901760|G:G},h.prototype.readInt32LE=function(D,R){return R||Y(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},h.prototype.readInt32BE=function(D,R){return R||Y(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},h.prototype.readFloatLE=function(D,R){return R||Y(D,4,this.length),o.read(this,D,!0,23,4)},h.prototype.readFloatBE=function(D,R){return R||Y(D,4,this.length),o.read(this,D,!1,23,4)},h.prototype.readDoubleLE=function(D,R){return R||Y(D,8,this.length),o.read(this,D,!0,52,8)},h.prototype.readDoubleBE=function(D,R){return R||Y(D,8,this.length),o.read(this,D,!1,52,8)},h.prototype.writeUIntLE=function(D,R,G,te){D=+D,R|=0,G|=0,te||k(this,D,R,G,Math.pow(2,8*G)-1,0);var V=1,Z=0;for(this[R]=255&D;++Z<G&&(V*=256);)this[R+Z]=D/V&255;return R+G},h.prototype.writeUIntBE=function(D,R,G,te){D=+D,R|=0,G|=0,te||k(this,D,R,G,Math.pow(2,8*G)-1,0);var V=G-1,Z=1;for(this[R+V]=255&D;--V>=0&&(Z*=256);)this[R+V]=D/Z&255;return R+G},h.prototype.writeUInt8=function(D,R,G){return D=+D,R|=0,G||k(this,D,R,1,255,0),h.TYPED_ARRAY_SUPPORT||(D=Math.floor(D)),this[R]=255&D,R+1},h.prototype.writeUInt16LE=function(D,R,G){return D=+D,R|=0,G||k(this,D,R,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[R]=255&D,this[R+1]=D>>>8):z(this,D,R,!0),R+2},h.prototype.writeUInt16BE=function(D,R,G){return D=+D,R|=0,G||k(this,D,R,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[R]=D>>>8,this[R+1]=255&D):z(this,D,R,!1),R+2},h.prototype.writeUInt32LE=function(D,R,G){return D=+D,R|=0,G||k(this,D,R,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[R+3]=D>>>24,this[R+2]=D>>>16,this[R+1]=D>>>8,this[R]=255&D):H(this,D,R,!0),R+4},h.prototype.writeUInt32BE=function(D,R,G){return D=+D,R|=0,G||k(this,D,R,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[R]=D>>>24,this[R+1]=D>>>16,this[R+2]=D>>>8,this[R+3]=255&D):H(this,D,R,!1),R+4},h.prototype.writeIntLE=function(D,R,G,te){if(D=+D,R|=0,!te){var V=Math.pow(2,8*G-1);k(this,D,R,G,V-1,-V)}var Z=0,ne=1,me=0;for(this[R]=255&D;++Z<G&&(ne*=256);)D<0&&me===0&&this[R+Z-1]!==0&&(me=1),this[R+Z]=(D/ne>>0)-me&255;return R+G},h.prototype.writeIntBE=function(D,R,G,te){if(D=+D,R|=0,!te){var V=Math.pow(2,8*G-1);k(this,D,R,G,V-1,-V)}var Z=G-1,ne=1,me=0;for(this[R+Z]=255&D;--Z>=0&&(ne*=256);)D<0&&me===0&&this[R+Z+1]!==0&&(me=1),this[R+Z]=(D/ne>>0)-me&255;return R+G},h.prototype.writeInt8=function(D,R,G){return D=+D,R|=0,G||k(this,D,R,1,127,-128),h.TYPED_ARRAY_SUPPORT||(D=Math.floor(D)),D<0&&(D=255+D+1),this[R]=255&D,R+1},h.prototype.writeInt16LE=function(D,R,G){return D=+D,R|=0,G||k(this,D,R,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[R]=255&D,this[R+1]=D>>>8):z(this,D,R,!0),R+2},h.prototype.writeInt16BE=function(D,R,G){return D=+D,R|=0,G||k(this,D,R,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[R]=D>>>8,this[R+1]=255&D):z(this,D,R,!1),R+2},h.prototype.writeInt32LE=function(D,R,G){return D=+D,R|=0,G||k(this,D,R,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[R]=255&D,this[R+1]=D>>>8,this[R+2]=D>>>16,this[R+3]=D>>>24):H(this,D,R,!0),R+4},h.prototype.writeInt32BE=function(D,R,G){return D=+D,R|=0,G||k(this,D,R,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),h.TYPED_ARRAY_SUPPORT?(this[R]=D>>>24,this[R+1]=D>>>16,this[R+2]=D>>>8,this[R+3]=255&D):H(this,D,R,!1),R+4},h.prototype.writeFloatLE=function(D,R,G){return j(this,D,R,!0,G)},h.prototype.writeFloatBE=function(D,R,G){return j(this,D,R,!1,G)},h.prototype.writeDoubleLE=function(D,R,G){return q(this,D,R,!0,G)},h.prototype.writeDoubleBE=function(D,R,G){return q(this,D,R,!1,G)},h.prototype.copy=function(D,R,G,te){if(G||(G=0),te||te===0||(te=this.length),R>=D.length&&(R=D.length),R||(R=0),te>0&&te<G&&(te=G),te===G||D.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=this.length)throw new RangeError("sourceStart out of bounds");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),D.length-R<te-G&&(te=D.length-R+G);var V,Z=te-G;if(this===D&&G<R&&R<te)for(V=Z-1;V>=0;--V)D[V+R]=this[V+G];else if(Z<1e3||!h.TYPED_ARRAY_SUPPORT)for(V=0;V<Z;++V)D[V+R]=this[V+G];else Uint8Array.prototype.set.call(D,this.subarray(G,G+Z),R);return Z},h.prototype.fill=function(D,R,G,te){if(typeof D=="string"){if(typeof R=="string"?(te=R,R=0,G=this.length):typeof G=="string"&&(te=G,G=this.length),D.length===1){var V=D.charCodeAt(0);V<256&&(D=V)}if(te!==void 0&&typeof te!="string")throw new TypeError("encoding must be a string");if(typeof te=="string"&&!h.isEncoding(te))throw new TypeError("Unknown encoding: "+te)}else typeof D=="number"&&(D&=255);if(R<0||this.length<R||this.length<G)throw new RangeError("Out of range index");if(G<=R)return this;var Z;if(R>>>=0,G=G===void 0?this.length:G>>>0,D||(D=0),typeof D=="number")for(Z=R;Z<G;++Z)this[Z]=D;else{var ne=h.isBuffer(D)?D:pe(new h(D,te).toString()),me=ne.length;for(Z=0;Z<G-R;++Z)this[Z+R]=ne[Z%me]}return this};var ee=/[^+\/0-9A-Za-z-_]/g;function le(D){return D<16?"0"+D.toString(16):D.toString(16)}function pe(D,R){var G;R=R||1/0;for(var te=D.length,V=null,Z=[],ne=0;ne<te;++ne){if((G=D.charCodeAt(ne))>55295&&G<57344){if(!V){if(G>56319){(R-=3)>-1&&Z.push(239,191,189);continue}if(ne+1===te){(R-=3)>-1&&Z.push(239,191,189);continue}V=G;continue}if(G<56320){(R-=3)>-1&&Z.push(239,191,189),V=G;continue}G=65536+(V-55296<<10|G-56320)}else V&&(R-=3)>-1&&Z.push(239,191,189);if(V=null,G<128){if((R-=1)<0)break;Z.push(G)}else if(G<2048){if((R-=2)<0)break;Z.push(G>>6|192,63&G|128)}else if(G<65536){if((R-=3)<0)break;Z.push(G>>12|224,G>>6&63|128,63&G|128)}else{if(!(G<1114112))throw new Error("Invalid code point");if((R-=4)<0)break;Z.push(G>>18|240,G>>12&63|128,G>>6&63|128,63&G|128)}}return Z}function he(D){return i.toByteArray(function(R){if((R=function(G){return G.trim?G.trim():G.replace(/^\s+|\s+$/g,"")}(R).replace(ee,"")).length<2)return"";for(;R.length%4!=0;)R+="=";return R}(D))}function ve(D,R,G,te){for(var V=0;V<te&&!(V+G>=R.length||V>=D.length);++V)R[V+G]=D[V];return V}}).call(this,n(0))},function(e,t,n){function r(i){return Object.prototype.toString.call(i)}t.isArray=function(i){return Array.isArray?Array.isArray(i):r(i)==="[object Array]"},t.isBoolean=function(i){return typeof i=="boolean"},t.isNull=function(i){return i===null},t.isNullOrUndefined=function(i){return i==null},t.isNumber=function(i){return typeof i=="number"},t.isString=function(i){return typeof i=="string"},t.isSymbol=function(i){return typeof i=="symbol"},t.isUndefined=function(i){return i===void 0},t.isRegExp=function(i){return r(i)==="[object RegExp]"},t.isObject=function(i){return typeof i=="object"&&i!==null},t.isDate=function(i){return r(i)==="[object Date]"},t.isError=function(i){return r(i)==="[object Error]"||i instanceof Error},t.isFunction=function(i){return typeof i=="function"},t.isPrimitive=function(i){return i===null||typeof i=="boolean"||typeof i=="number"||typeof i=="string"||typeof i=="symbol"||i===void 0},t.isBuffer=n(3).Buffer.isBuffer},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function c(A){if(n===setTimeout)return setTimeout(A,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(A,0);try{return n(A,0)}catch{try{return n.call(null,A,0)}catch{return n.call(this,A,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch{n=o}try{r=typeof clearTimeout=="function"?clearTimeout:l}catch{r=l}})();var f,h=[],m=!1,y=-1;function x(){m&&f&&(m=!1,f.length?h=f.concat(h):y=-1,h.length&&b())}function b(){if(!m){var A=c(x);m=!0;for(var O=h.length;O;){for(f=h,h=[];++y<O;)f&&f[y].run();y=-1,O=h.length}f=null,m=!1,function(P){if(r===clearTimeout)return clearTimeout(P);if((r===l||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(P);try{r(P)}catch{try{return r.call(null,P)}catch{return r.call(this,P)}}}(A)}}function C(A,O){this.fun=A,this.array=O}function w(){}i.nextTick=function(A){var O=new Array(arguments.length-1);if(arguments.length>1)for(var P=1;P<arguments.length;P++)O[P-1]=arguments[P];h.push(new C(A,O)),h.length!==1||m||c(b)},C.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=w,i.addListener=w,i.once=w,i.off=w,i.removeListener=w,i.removeAllListeners=w,i.emit=w,i.prependListener=w,i.prependOnceListener=w,i.listeners=function(A){return[]},i.binding=function(A){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(A){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){(function(r){r===void 0||!r.version||r.version.indexOf("v0.")===0||r.version.indexOf("v1.")===0&&r.version.indexOf("v1.8.")!==0?e.exports={nextTick:function(i,o,l,c){if(typeof i!="function")throw new TypeError('"callback" argument must be a function');var f,h,m=arguments.length;switch(m){case 0:case 1:return r.nextTick(i);case 2:return r.nextTick(function(){i.call(null,o)});case 3:return r.nextTick(function(){i.call(null,o,l)});case 4:return r.nextTick(function(){i.call(null,o,l,c)});default:for(f=new Array(m-1),h=0;h<f.length;)f[h++]=arguments[h];return r.nextTick(function(){i.apply(null,f)})}}}:e.exports=r}).call(this,n(5))},function(e,t,n){var r=n(15)(Object,"create");e.exports=r},function(e,t,n){var r=n(30);e.exports=function(i,o){for(var l=i.length;l--;)if(r(i[l][0],o))return l;return-1}},function(e,t,n){var r=n(94);e.exports=function(i,o){var l=i.__data__;return r(o)?l[typeof o=="string"?"string":"hash"]:l.map}},function(e,t,n){var r,i=typeof Reflect=="object"?Reflect:null,o=i&&typeof i.apply=="function"?i.apply:function(O,P,N){return Function.prototype.apply.call(O,P,N)};r=i&&typeof i.ownKeys=="function"?i.ownKeys:Object.getOwnPropertySymbols?function(O){return Object.getOwnPropertyNames(O).concat(Object.getOwnPropertySymbols(O))}:function(O){return Object.getOwnPropertyNames(O)};var l=Number.isNaN||function(O){return O!=O};function c(){c.init.call(this)}e.exports=c,e.exports.once=function(O,P){return new Promise(function(N,F){function U(X){O.removeListener(P,W),F(X)}function W(){typeof O.removeListener=="function"&&O.removeListener("error",U),N([].slice.call(arguments))}A(O,P,W,{once:!0}),P!=="error"&&function(X,ae,ce){typeof X.on=="function"&&A(X,"error",ae,{once:!0})}(O,U)})},c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var f=10;function h(O){if(typeof O!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof O)}function m(O){return O._maxListeners===void 0?c.defaultMaxListeners:O._maxListeners}function y(O,P,N,F){var U,W,X;if(h(N),(W=O._events)===void 0?(W=O._events=Object.create(null),O._eventsCount=0):(W.newListener!==void 0&&(O.emit("newListener",P,N.listener?N.listener:N),W=O._events),X=W[P]),X===void 0)X=W[P]=N,++O._eventsCount;else if(typeof X=="function"?X=W[P]=F?[N,X]:[X,N]:F?X.unshift(N):X.push(N),(U=m(O))>0&&X.length>U&&!X.warned){X.warned=!0;var ae=new Error("Possible EventEmitter memory leak detected. "+X.length+" "+String(P)+" listeners added. Use emitter.setMaxListeners() to increase limit");ae.name="MaxListenersExceededWarning",ae.emitter=O,ae.type=P,ae.count=X.length,function(ce){console&&console.warn&&console.warn(ce)}(ae)}return O}function x(O,P,N){var F={fired:!1,wrapFn:void 0,target:O,type:P,listener:N},U=(function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}).bind(F);return U.listener=N,F.wrapFn=U,U}function b(O,P,N){var F=O._events;if(F===void 0)return[];var U=F[P];return U===void 0?[]:typeof U=="function"?N?[U.listener||U]:[U]:N?function(W){for(var X=new Array(W.length),ae=0;ae<X.length;++ae)X[ae]=W[ae].listener||W[ae];return X}(U):w(U,U.length)}function C(O){var P=this._events;if(P!==void 0){var N=P[O];if(typeof N=="function")return 1;if(N!==void 0)return N.length}return 0}function w(O,P){for(var N=new Array(P),F=0;F<P;++F)N[F]=O[F];return N}function A(O,P,N,F){if(typeof O.on=="function")F.once?O.once(P,N):O.on(P,N);else{if(typeof O.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof O);O.addEventListener(P,function U(W){F.once&&O.removeEventListener(P,U),N(W)})}}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(O){if(typeof O!="number"||O<0||l(O))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+O+".");f=O}}),c.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function(O){if(typeof O!="number"||O<0||l(O))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+O+".");return this._maxListeners=O,this},c.prototype.getMaxListeners=function(){return m(this)},c.prototype.emit=function(O){for(var P=[],N=1;N<arguments.length;N++)P.push(arguments[N]);var F=O==="error",U=this._events;if(U!==void 0)F=F&&U.error===void 0;else if(!F)return!1;if(F){var W;if(P.length>0&&(W=P[0]),W instanceof Error)throw W;var X=new Error("Unhandled error."+(W?" ("+W.message+")":""));throw X.context=W,X}var ae=U[O];if(ae===void 0)return!1;if(typeof ae=="function")o(ae,this,P);else{var ce=ae.length,re=w(ae,ce);for(N=0;N<ce;++N)o(re[N],this,P)}return!0},c.prototype.addListener=function(O,P){return y(this,O,P,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(O,P){return y(this,O,P,!0)},c.prototype.once=function(O,P){return h(P),this.on(O,x(this,O,P)),this},c.prototype.prependOnceListener=function(O,P){return h(P),this.prependListener(O,x(this,O,P)),this},c.prototype.removeListener=function(O,P){var N,F,U,W,X;if(h(P),(F=this._events)===void 0)return this;if((N=F[O])===void 0)return this;if(N===P||N.listener===P)--this._eventsCount==0?this._events=Object.create(null):(delete F[O],F.removeListener&&this.emit("removeListener",O,N.listener||P));else if(typeof N!="function"){for(U=-1,W=N.length-1;W>=0;W--)if(N[W]===P||N[W].listener===P){X=N[W].listener,U=W;break}if(U<0)return this;U===0?N.shift():function(ae,ce){for(;ce+1<ae.length;ce++)ae[ce]=ae[ce+1];ae.pop()}(N,U),N.length===1&&(F[O]=N[0]),F.removeListener!==void 0&&this.emit("removeListener",O,X||P)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(O){var P,N,F;if((N=this._events)===void 0)return this;if(N.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):N[O]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete N[O]),this;if(arguments.length===0){var U,W=Object.keys(N);for(F=0;F<W.length;++F)(U=W[F])!=="removeListener"&&this.removeAllListeners(U);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(P=N[O])=="function")this.removeListener(O,P);else if(P!==void 0)for(F=P.length-1;F>=0;F--)this.removeListener(O,P[F]);return this},c.prototype.listeners=function(O){return b(this,O,!0)},c.prototype.rawListeners=function(O){return b(this,O,!1)},c.listenerCount=function(O,P){return typeof O.listenerCount=="function"?O.listenerCount(P):C.call(O,P)},c.prototype.listenerCount=C,c.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){(t=e.exports=n(22)).Stream=t,t.Readable=t,t.Writable=n(13),t.Duplex=n(1),t.Transform=n(26),t.PassThrough=n(45)},function(e,t,n){var r=n(3),i=r.Buffer;function o(c,f){for(var h in c)f[h]=c[h]}function l(c,f,h){return i(c,f,h)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=l),o(i,l),l.from=function(c,f,h){if(typeof c=="number")throw new TypeError("Argument must not be a number");return i(c,f,h)},l.alloc=function(c,f,h){if(typeof c!="number")throw new TypeError("Argument must be a number");var m=i(c);return f!==void 0?typeof h=="string"?m.fill(f,h):m.fill(f):m.fill(0),m},l.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return i(c)},l.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(c)}},function(e,t,n){(function(r,i,o){var l=n(6);function c(re){var J=this;this.next=null,this.entry=null,this.finish=function(){(function(oe,_e,se){var ue=oe.entry;for(oe.entry=null;ue;){var Y=ue.callback;_e.pendingcb--,Y(void 0),ue=ue.next}_e.corkedRequestsFree.next=oe})(J,re)}}e.exports=N;var f,h=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:l.nextTick;N.WritableState=P;var m=Object.create(n(4));m.inherits=n(2);var y,x={deprecate:n(43)},b=n(23),C=n(12).Buffer,w=(o!==void 0?o:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},A=n(24);function O(){}function P(re,J){f=f||n(1),re=re||{};var oe=J instanceof f;this.objectMode=!!re.objectMode,oe&&(this.objectMode=this.objectMode||!!re.writableObjectMode);var _e=re.highWaterMark,se=re.writableHighWaterMark,ue=this.objectMode?16:16384;this.highWaterMark=_e||_e===0?_e:oe&&(se||se===0)?se:ue,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Y=re.decodeStrings===!1;this.decodeStrings=!Y,this.defaultEncoding=re.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(k){(function(z,H){var I=z._writableState,j=I.sync,q=I.writecb;if(function(le){le.writing=!1,le.writecb=null,le.length-=le.writelen,le.writelen=0}(I),H)(function(le,pe,he,ve,D){--pe.pendingcb,he?(l.nextTick(D,ve),l.nextTick(ce,le,pe),le._writableState.errorEmitted=!0,le.emit("error",ve)):(D(ve),le._writableState.errorEmitted=!0,le.emit("error",ve),ce(le,pe))})(z,I,j,H,q);else{var ee=X(I);ee||I.corked||I.bufferProcessing||!I.bufferedRequest||W(z,I),j?h(U,z,I,ee,q):U(z,I,ee,q)}})(J,k)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}function N(re){if(f=f||n(1),!(y.call(N,this)||this instanceof f))return new N(re);this._writableState=new P(re,this),this.writable=!0,re&&(typeof re.write=="function"&&(this._write=re.write),typeof re.writev=="function"&&(this._writev=re.writev),typeof re.destroy=="function"&&(this._destroy=re.destroy),typeof re.final=="function"&&(this._final=re.final)),b.call(this)}function F(re,J,oe,_e,se,ue,Y){J.writelen=_e,J.writecb=Y,J.writing=!0,J.sync=!0,oe?re._writev(se,J.onwrite):re._write(se,ue,J.onwrite),J.sync=!1}function U(re,J,oe,_e){oe||function(se,ue){ue.length===0&&ue.needDrain&&(ue.needDrain=!1,se.emit("drain"))}(re,J),J.pendingcb--,_e(),ce(re,J)}function W(re,J){J.bufferProcessing=!0;var oe=J.bufferedRequest;if(re._writev&&oe&&oe.next){var _e=J.bufferedRequestCount,se=new Array(_e),ue=J.corkedRequestsFree;ue.entry=oe;for(var Y=0,k=!0;oe;)se[Y]=oe,oe.isBuf||(k=!1),oe=oe.next,Y+=1;se.allBuffers=k,F(re,J,!0,J.length,se,"",ue.finish),J.pendingcb++,J.lastBufferedRequest=null,ue.next?(J.corkedRequestsFree=ue.next,ue.next=null):J.corkedRequestsFree=new c(J),J.bufferedRequestCount=0}else{for(;oe;){var z=oe.chunk,H=oe.encoding,I=oe.callback;if(F(re,J,!1,J.objectMode?1:z.length,z,H,I),oe=oe.next,J.bufferedRequestCount--,J.writing)break}oe===null&&(J.lastBufferedRequest=null)}J.bufferedRequest=oe,J.bufferProcessing=!1}function X(re){return re.ending&&re.length===0&&re.bufferedRequest===null&&!re.finished&&!re.writing}function ae(re,J){re._final(function(oe){J.pendingcb--,oe&&re.emit("error",oe),J.prefinished=!0,re.emit("prefinish"),ce(re,J)})}function ce(re,J){var oe=X(J);return oe&&(function(_e,se){se.prefinished||se.finalCalled||(typeof _e._final=="function"?(se.pendingcb++,se.finalCalled=!0,l.nextTick(ae,_e,se)):(se.prefinished=!0,_e.emit("prefinish")))}(re,J),J.pendingcb===0&&(J.finished=!0,re.emit("finish"))),oe}m.inherits(N,b),P.prototype.getBuffer=function(){for(var re=this.bufferedRequest,J=[];re;)J.push(re),re=re.next;return J},function(){try{Object.defineProperty(P.prototype,"buffer",{get:x.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(N,Symbol.hasInstance,{value:function(re){return!!y.call(this,re)||this===N&&re&&re._writableState instanceof P}})):y=function(re){return re instanceof this},N.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},N.prototype.write=function(re,J,oe){var _e=this._writableState,se=!1,ue=!_e.objectMode&&function(Y){return C.isBuffer(Y)||Y instanceof w}(re);return ue&&!C.isBuffer(re)&&(re=function(Y){return C.from(Y)}(re)),typeof J=="function"&&(oe=J,J=null),ue?J="buffer":J||(J=_e.defaultEncoding),typeof oe!="function"&&(oe=O),_e.ended?function(Y,k){var z=new Error("write after end");Y.emit("error",z),l.nextTick(k,z)}(this,oe):(ue||function(Y,k,z,H){var I=!0,j=!1;return z===null?j=new TypeError("May not write null values to stream"):typeof z=="string"||z===void 0||k.objectMode||(j=new TypeError("Invalid non-string/buffer chunk")),j&&(Y.emit("error",j),l.nextTick(H,j),I=!1),I}(this,_e,re,oe))&&(_e.pendingcb++,se=function(Y,k,z,H,I,j){if(!z){var q=function(he,ve,D){return he.objectMode||he.decodeStrings===!1||typeof ve!="string"||(ve=C.from(ve,D)),ve}(k,H,I);H!==q&&(z=!0,I="buffer",H=q)}var ee=k.objectMode?1:H.length;k.length+=ee;var le=k.length<k.highWaterMark;if(le||(k.needDrain=!0),k.writing||k.corked){var pe=k.lastBufferedRequest;k.lastBufferedRequest={chunk:H,encoding:I,isBuf:z,callback:j,next:null},pe?pe.next=k.lastBufferedRequest:k.bufferedRequest=k.lastBufferedRequest,k.bufferedRequestCount+=1}else F(Y,k,!1,ee,H,I,j);return le}(this,_e,ue,re,J,oe)),se},N.prototype.cork=function(){this._writableState.corked++},N.prototype.uncork=function(){var re=this._writableState;re.corked&&(re.corked--,re.writing||re.corked||re.bufferProcessing||!re.bufferedRequest||W(this,re))},N.prototype.setDefaultEncoding=function(re){if(typeof re=="string"&&(re=re.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((re+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+re);return this._writableState.defaultEncoding=re,this},Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),N.prototype._write=function(re,J,oe){oe(new Error("_write() is not implemented"))},N.prototype._writev=null,N.prototype.end=function(re,J,oe){var _e=this._writableState;typeof re=="function"?(oe=re,re=null,J=null):typeof J=="function"&&(oe=J,J=null),re!=null&&this.write(re,J),_e.corked&&(_e.corked=1,this.uncork()),_e.ending||function(se,ue,Y){ue.ending=!0,ce(se,ue),Y&&(ue.finished?l.nextTick(Y):se.once("finish",Y)),ue.ended=!0,se.writable=!1}(this,_e,oe)},Object.defineProperty(N.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(re){this._writableState&&(this._writableState.destroyed=re)}}),N.prototype.destroy=A.destroy,N.prototype._undestroy=A.undestroy,N.prototype._destroy=function(re,J){this.end(),J(re)}}).call(this,n(5),n(21).setImmediate,n(0))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r,i){if(!i.eol&&r){for(var o=0,l=r.length;o<l;o++)if(r[o]==="\r"){if(r[o+1]===`
`){i.eol=`\r
`;break}if(r[o+1]){i.eol="\r";break}}else if(r[o]===`
`){i.eol=`
`;break}}return i.eol||`
`}},function(e,t,n){var r=n(63),i=n(71);e.exports=function(o,l){var c=i(o,l);return r(c)?c:void 0}},function(e,t,n){var r=n(17).Symbol;e.exports=r},function(e,t,n){var r=n(65),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(29),i=n(74);e.exports=function(o){return typeof o=="symbol"||i(o)&&r(o)=="[object Symbol]"}},function(e,t,n){(function(r){var i=r!==void 0&&r||typeof self<"u"&&self||window,o=Function.prototype.apply;function l(c,f){this._id=c,this._clearFn=f}t.setTimeout=function(){return new l(o.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new l(o.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(c){c&&c.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(c,f){clearTimeout(c._idleTimeoutId),c._idleTimeout=f},t.unenroll=function(c){clearTimeout(c._idleTimeoutId),c._idleTimeout=-1},t._unrefActive=t.active=function(c){clearTimeout(c._idleTimeoutId);var f=c._idleTimeout;f>=0&&(c._idleTimeoutId=setTimeout(function(){c._onTimeout&&c._onTimeout()},f))},n(34),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t,n){(function(r,i){var o=n(6);e.exports=F;var l,c=n(36);F.ReadableState=N,n(10).EventEmitter;var f=function(I,j){return I.listeners(j).length},h=n(23),m=n(12).Buffer,y=(r!==void 0?r:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},x=Object.create(n(4));x.inherits=n(2);var b=n(40),C=void 0;C=b&&b.debuglog?b.debuglog("stream"):function(){};var w,A=n(41),O=n(24);x.inherits(F,h);var P=["error","close","destroy","pause","resume"];function N(I,j){I=I||{};var q=j instanceof(l=l||n(1));this.objectMode=!!I.objectMode,q&&(this.objectMode=this.objectMode||!!I.readableObjectMode);var ee=I.highWaterMark,le=I.readableHighWaterMark,pe=this.objectMode?16:16384;this.highWaterMark=ee||ee===0?ee:q&&(le||le===0)?le:pe,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new A,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=I.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,I.encoding&&(w||(w=n(25).StringDecoder),this.decoder=new w(I.encoding),this.encoding=I.encoding)}function F(I){if(l=l||n(1),!(this instanceof F))return new F(I);this._readableState=new N(I,this),this.readable=!0,I&&(typeof I.read=="function"&&(this._read=I.read),typeof I.destroy=="function"&&(this._destroy=I.destroy)),h.call(this)}function U(I,j,q,ee,le){var pe,he=I._readableState;return j===null?(he.reading=!1,function(ve,D){if(!D.ended){if(D.decoder){var R=D.decoder.end();R&&R.length&&(D.buffer.push(R),D.length+=D.objectMode?1:R.length)}D.ended=!0,ce(ve)}}(I,he)):(le||(pe=function(ve,D){var R;return function(G){return m.isBuffer(G)||G instanceof y}(D)||typeof D=="string"||D===void 0||ve.objectMode||(R=new TypeError("Invalid non-string/buffer chunk")),R}(he,j)),pe?I.emit("error",pe):he.objectMode||j&&j.length>0?(typeof j=="string"||he.objectMode||Object.getPrototypeOf(j)===m.prototype||(j=function(ve){return m.from(ve)}(j)),ee?he.endEmitted?I.emit("error",new Error("stream.unshift() after end event")):W(I,he,j,!0):he.ended?I.emit("error",new Error("stream.push() after EOF")):(he.reading=!1,he.decoder&&!q?(j=he.decoder.write(j),he.objectMode||j.length!==0?W(I,he,j,!1):J(I,he)):W(I,he,j,!1))):ee||(he.reading=!1)),function(ve){return!ve.ended&&(ve.needReadable||ve.length<ve.highWaterMark||ve.length===0)}(he)}function W(I,j,q,ee){j.flowing&&j.length===0&&!j.sync?(I.emit("data",q),I.read(0)):(j.length+=j.objectMode?1:q.length,ee?j.buffer.unshift(q):j.buffer.push(q),j.needReadable&&ce(I)),J(I,j)}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(I){this._readableState&&(this._readableState.destroyed=I)}}),F.prototype.destroy=O.destroy,F.prototype._undestroy=O.undestroy,F.prototype._destroy=function(I,j){this.push(null),j(I)},F.prototype.push=function(I,j){var q,ee=this._readableState;return ee.objectMode?q=!0:typeof I=="string"&&((j=j||ee.defaultEncoding)!==ee.encoding&&(I=m.from(I,j),j=""),q=!0),U(this,I,j,!1,q)},F.prototype.unshift=function(I){return U(this,I,null,!0,!1)},F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(I){return w||(w=n(25).StringDecoder),this._readableState.decoder=new w(I),this._readableState.encoding=I,this};var X=8388608;function ae(I,j){return I<=0||j.length===0&&j.ended?0:j.objectMode?1:I!=I?j.flowing&&j.length?j.buffer.head.data.length:j.length:(I>j.highWaterMark&&(j.highWaterMark=function(q){return q>=X?q=X:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}(I)),I<=j.length?I:j.ended?j.length:(j.needReadable=!0,0))}function ce(I){var j=I._readableState;j.needReadable=!1,j.emittedReadable||(C("emitReadable",j.flowing),j.emittedReadable=!0,j.sync?o.nextTick(re,I):re(I))}function re(I){C("emit readable"),I.emit("readable"),ue(I)}function J(I,j){j.readingMore||(j.readingMore=!0,o.nextTick(oe,I,j))}function oe(I,j){for(var q=j.length;!j.reading&&!j.flowing&&!j.ended&&j.length<j.highWaterMark&&(C("maybeReadMore read 0"),I.read(0),q!==j.length);)q=j.length;j.readingMore=!1}function _e(I){C("readable nexttick read 0"),I.read(0)}function se(I,j){j.reading||(C("resume read 0"),I.read(0)),j.resumeScheduled=!1,j.awaitDrain=0,I.emit("resume"),ue(I),j.flowing&&!j.reading&&I.read(0)}function ue(I){var j=I._readableState;for(C("flow",j.flowing);j.flowing&&I.read()!==null;);}function Y(I,j){return j.length===0?null:(j.objectMode?q=j.buffer.shift():!I||I>=j.length?(q=j.decoder?j.buffer.join(""):j.buffer.length===1?j.buffer.head.data:j.buffer.concat(j.length),j.buffer.clear()):q=function(ee,le,pe){var he;return ee<le.head.data.length?(he=le.head.data.slice(0,ee),le.head.data=le.head.data.slice(ee)):he=ee===le.head.data.length?le.shift():pe?function(ve,D){var R=D.head,G=1,te=R.data;for(ve-=te.length;R=R.next;){var V=R.data,Z=ve>V.length?V.length:ve;if(Z===V.length?te+=V:te+=V.slice(0,ve),(ve-=Z)==0){Z===V.length?(++G,R.next?D.head=R.next:D.head=D.tail=null):(D.head=R,R.data=V.slice(Z));break}++G}return D.length-=G,te}(ee,le):function(ve,D){var R=m.allocUnsafe(ve),G=D.head,te=1;for(G.data.copy(R),ve-=G.data.length;G=G.next;){var V=G.data,Z=ve>V.length?V.length:ve;if(V.copy(R,R.length-ve,0,Z),(ve-=Z)==0){Z===V.length?(++te,G.next?D.head=G.next:D.head=D.tail=null):(D.head=G,G.data=V.slice(Z));break}++te}return D.length-=te,R}(ee,le),he}(I,j.buffer,j.decoder),q);var q}function k(I){var j=I._readableState;if(j.length>0)throw new Error('"endReadable()" called on non-empty stream');j.endEmitted||(j.ended=!0,o.nextTick(z,j,I))}function z(I,j){I.endEmitted||I.length!==0||(I.endEmitted=!0,j.readable=!1,j.emit("end"))}function H(I,j){for(var q=0,ee=I.length;q<ee;q++)if(I[q]===j)return q;return-1}F.prototype.read=function(I){C("read",I),I=parseInt(I,10);var j=this._readableState,q=I;if(I!==0&&(j.emittedReadable=!1),I===0&&j.needReadable&&(j.length>=j.highWaterMark||j.ended))return C("read: emitReadable",j.length,j.ended),j.length===0&&j.ended?k(this):ce(this),null;if((I=ae(I,j))===0&&j.ended)return j.length===0&&k(this),null;var ee,le=j.needReadable;return C("need readable",le),(j.length===0||j.length-I<j.highWaterMark)&&C("length less than watermark",le=!0),j.ended||j.reading?C("reading or ended",le=!1):le&&(C("do read"),j.reading=!0,j.sync=!0,j.length===0&&(j.needReadable=!0),this._read(j.highWaterMark),j.sync=!1,j.reading||(I=ae(q,j))),(ee=I>0?Y(I,j):null)===null?(j.needReadable=!0,I=0):j.length-=I,j.length===0&&(j.ended||(j.needReadable=!0),q!==I&&j.ended&&k(this)),ee!==null&&this.emit("data",ee),ee},F.prototype._read=function(I){this.emit("error",new Error("_read() is not implemented"))},F.prototype.pipe=function(I,j){var q=this,ee=this._readableState;switch(ee.pipesCount){case 0:ee.pipes=I;break;case 1:ee.pipes=[ee.pipes,I];break;default:ee.pipes.push(I)}ee.pipesCount+=1,C("pipe count=%d opts=%j",ee.pipesCount,j);var le=j&&j.end===!1||I===i.stdout||I===i.stderr?Z:pe;function pe(){C("onend"),I.end()}ee.endEmitted?o.nextTick(le):q.once("end",le),I.on("unpipe",function ne(me,ie){C("onunpipe"),me===q&&ie&&ie.hasUnpiped===!1&&(ie.hasUnpiped=!0,C("cleanup"),I.removeListener("close",te),I.removeListener("finish",V),I.removeListener("drain",he),I.removeListener("error",G),I.removeListener("unpipe",ne),q.removeListener("end",pe),q.removeListener("end",Z),q.removeListener("data",R),ve=!0,!ee.awaitDrain||I._writableState&&!I._writableState.needDrain||he())});var he=function(ne){return function(){var me=ne._readableState;C("pipeOnDrain",me.awaitDrain),me.awaitDrain&&me.awaitDrain--,me.awaitDrain===0&&f(ne,"data")&&(me.flowing=!0,ue(ne))}}(q);I.on("drain",he);var ve=!1,D=!1;function R(ne){C("ondata"),D=!1,I.write(ne)!==!1||D||((ee.pipesCount===1&&ee.pipes===I||ee.pipesCount>1&&H(ee.pipes,I)!==-1)&&!ve&&(C("false write response, pause",ee.awaitDrain),ee.awaitDrain++,D=!0),q.pause())}function G(ne){C("onerror",ne),Z(),I.removeListener("error",G),f(I,"error")===0&&I.emit("error",ne)}function te(){I.removeListener("finish",V),Z()}function V(){C("onfinish"),I.removeListener("close",te),Z()}function Z(){C("unpipe"),q.unpipe(I)}return q.on("data",R),function(ne,me,ie){if(typeof ne.prependListener=="function")return ne.prependListener(me,ie);ne._events&&ne._events[me]?c(ne._events[me])?ne._events[me].unshift(ie):ne._events[me]=[ie,ne._events[me]]:ne.on(me,ie)}(I,"error",G),I.once("close",te),I.once("finish",V),I.emit("pipe",q),ee.flowing||(C("pipe resume"),q.resume()),I},F.prototype.unpipe=function(I){var j=this._readableState,q={hasUnpiped:!1};if(j.pipesCount===0)return this;if(j.pipesCount===1)return I&&I!==j.pipes||(I||(I=j.pipes),j.pipes=null,j.pipesCount=0,j.flowing=!1,I&&I.emit("unpipe",this,q)),this;if(!I){var ee=j.pipes,le=j.pipesCount;j.pipes=null,j.pipesCount=0,j.flowing=!1;for(var pe=0;pe<le;pe++)ee[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var he=H(j.pipes,I);return he===-1||(j.pipes.splice(he,1),j.pipesCount-=1,j.pipesCount===1&&(j.pipes=j.pipes[0]),I.emit("unpipe",this,q)),this},F.prototype.on=function(I,j){var q=h.prototype.on.call(this,I,j);if(I==="data")this._readableState.flowing!==!1&&this.resume();else if(I==="readable"){var ee=this._readableState;ee.endEmitted||ee.readableListening||(ee.readableListening=ee.needReadable=!0,ee.emittedReadable=!1,ee.reading?ee.length&&ce(this):o.nextTick(_e,this))}return q},F.prototype.addListener=F.prototype.on,F.prototype.resume=function(){var I=this._readableState;return I.flowing||(C("resume"),I.flowing=!0,function(j,q){q.resumeScheduled||(q.resumeScheduled=!0,o.nextTick(se,j,q))}(this,I)),this},F.prototype.pause=function(){return C("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(C("pause"),this._readableState.flowing=!1,this.emit("pause")),this},F.prototype.wrap=function(I){var j=this,q=this._readableState,ee=!1;for(var le in I.on("end",function(){if(C("wrapped end"),q.decoder&&!q.ended){var he=q.decoder.end();he&&he.length&&j.push(he)}j.push(null)}),I.on("data",function(he){C("wrapped data"),q.decoder&&(he=q.decoder.write(he)),q.objectMode&&he==null||(q.objectMode||he&&he.length)&&(j.push(he)||(ee=!0,I.pause()))}),I)this[le]===void 0&&typeof I[le]=="function"&&(this[le]=function(he){return function(){return I[he].apply(I,arguments)}}(le));for(var pe=0;pe<P.length;pe++)I.on(P[pe],this.emit.bind(this,P[pe]));return this._read=function(he){C("wrapped _read",he),ee&&(ee=!1,I.resume())},this},Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),F._fromList=Y}).call(this,n(0),n(5))},function(e,t,n){e.exports=n(10).EventEmitter},function(e,t,n){var r=n(6);function i(o,l){o.emit("error",l)}e.exports={destroy:function(o,l){var c=this,f=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return f||h?(l?l(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(i,this,o)):r.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(m){!l&&m?c._writableState?c._writableState.errorEmitted||(c._writableState.errorEmitted=!0,r.nextTick(i,c,m)):r.nextTick(i,c,m):l&&l(m)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){var r=n(44).Buffer,i=r.isEncoding||function(C){switch((C=""+C)&&C.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(C){var w;switch(this.encoding=function(A){var O=function(P){if(!P)return"utf8";for(var N;;)switch(P){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return P;default:if(N)return;P=(""+P).toLowerCase(),N=!0}}(A);if(typeof O!="string"&&(r.isEncoding===i||!i(A)))throw new Error("Unknown encoding: "+A);return O||A}(C),this.encoding){case"utf16le":this.text=f,this.end=h,w=4;break;case"utf8":this.fillLast=c,w=4;break;case"base64":this.text=m,this.end=y,w=3;break;default:return this.write=x,void(this.end=b)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(w)}function l(C){return C<=127?0:C>>5==6?2:C>>4==14?3:C>>3==30?4:C>>6==2?-1:-2}function c(C){var w=this.lastTotal-this.lastNeed,A=function(O,P,N){if((192&P[0])!=128)return O.lastNeed=0,"<22>";if(O.lastNeed>1&&P.length>1){if((192&P[1])!=128)return O.lastNeed=1,"<22>";if(O.lastNeed>2&&P.length>2&&(192&P[2])!=128)return O.lastNeed=2,"<22>"}}(this,C);return A!==void 0?A:this.lastNeed<=C.length?(C.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(C.copy(this.lastChar,w,0,C.length),void(this.lastNeed-=C.length))}function f(C,w){if((C.length-w)%2==0){var A=C.toString("utf16le",w);if(A){var O=A.charCodeAt(A.length-1);if(O>=55296&&O<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1],A.slice(0,-1)}return A}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=C[C.length-1],C.toString("utf16le",w,C.length-1)}function h(C){var w=C&&C.length?this.write(C):"";if(this.lastNeed){var A=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,A)}return w}function m(C,w){var A=(C.length-w)%3;return A===0?C.toString("base64",w):(this.lastNeed=3-A,this.lastTotal=3,A===1?this.lastChar[0]=C[C.length-1]:(this.lastChar[0]=C[C.length-2],this.lastChar[1]=C[C.length-1]),C.toString("base64",w,C.length-A))}function y(C){var w=C&&C.length?this.write(C):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function x(C){return C.toString(this.encoding)}function b(C){return C&&C.length?this.write(C):""}t.StringDecoder=o,o.prototype.write=function(C){if(C.length===0)return"";var w,A;if(this.lastNeed){if((w=this.fillLast(C))===void 0)return"";A=this.lastNeed,this.lastNeed=0}else A=0;return A<C.length?w?w+this.text(C,A):this.text(C,A):w||""},o.prototype.end=function(C){var w=C&&C.length?this.write(C):"";return this.lastNeed?w+"<22>":w},o.prototype.text=function(C,w){var A=function(P,N,F){var U=N.length-1;if(U<F)return 0;var W=l(N[U]);return W>=0?(W>0&&(P.lastNeed=W-1),W):--U<F||W===-2?0:(W=l(N[U]))>=0?(W>0&&(P.lastNeed=W-2),W):--U<F||W===-2?0:(W=l(N[U]))>=0?(W>0&&(W===2?W=0:P.lastNeed=W-3),W):0}(this,C,w);if(!this.lastNeed)return C.toString("utf8",w);this.lastTotal=A;var O=C.length-(A-this.lastNeed);return C.copy(this.lastChar,0,O),C.toString("utf8",w,O)},o.prototype.fillLast=function(C){if(this.lastNeed<=C.length)return C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);C.copy(this.lastChar,this.lastTotal-this.lastNeed,0,C.length),this.lastNeed-=C.length}},function(e,t,n){e.exports=o;var r=n(1),i=Object.create(n(4));function o(f){if(!(this instanceof o))return new o(f);r.call(this,f),this._transformState={afterTransform:(function(h,m){var y=this._transformState;y.transforming=!1;var x=y.writecb;if(!x)return this.emit("error",new Error("write callback called multiple times"));y.writechunk=null,y.writecb=null,m!=null&&this.push(m),x(h);var b=this._readableState;b.reading=!1,(b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}).bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",l)}function l(){var f=this;typeof this._flush=="function"?this._flush(function(h,m){c(f,h,m)}):c(this,null,null)}function c(f,h,m){if(h)return f.emit("error",h);if(m!=null&&f.push(m),f._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(f._transformState.transforming)throw new Error("Calling transform done when still transforming");return f.push(null)}i.inherits=n(2),i.inherits(o,r),o.prototype.push=function(f,h){return this._transformState.needTransform=!1,r.prototype.push.call(this,f,h)},o.prototype._transform=function(f,h,m){throw new Error("_transform() is not implemented")},o.prototype._write=function(f,h,m){var y=this._transformState;if(y.writecb=m,y.writechunk=f,y.writeencoding=h,!y.transforming){var x=this._readableState;(y.needTransform||x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}},o.prototype._read=function(f){var h=this._transformState;h.writechunk!==null&&h.writecb&&!h.transforming?(h.transforming=!0,this._transform(h.writechunk,h.writeencoding,h.afterTransform)):h.needTransform=!0},o.prototype._destroy=function(f,h){var m=this;r.prototype._destroy.call(this,f,function(y){h(y),m.emit("close")})}},function(e,t,n){(function(r){Object.defineProperty(t,"__esModule",{value:!0}),t.trimRight=t.trimLeft=void 0,t.bufFromString=function(i){var o=r.byteLength(i),l=r.allocUnsafe?r.allocUnsafe(o):new r(o);return l.write(i),l},t.emptyBuffer=function(){return r.allocUnsafe?r.allocUnsafe(0):new r(0)},t.filterArray=function(i,o){for(var l=[],c=0;c<i.length;c++)o.indexOf(c)>-1&&l.push(i[c]);return l},t.trimLeft=function(i){return i.trimStart()},t.trimRight=function(i){return i.trimEnd()}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__extends||function(){var o=function(l,c){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(f[m]=h[m])})(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function f(){this.constructor=l}o(l,c),l.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(o){function l(c,f,h){var m=o.call(this,"Error: "+c+". JSON Line number: "+f+(h?" near: "+h:""))||this;return m.err=c,m.line=f,m.extra=h,m.name="CSV Parse Error",m}return r(l,o),l.column_mismatched=function(c,f){return new l("column_mismatched",c,f)},l.unclosed_quote=function(c,f){return new l("unclosed_quote",c,f)},l.fromJSON=function(c){return new l(c.err,c.line,c.extra)},l.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},l}(Error);t.default=i},function(e,t,n){var r=n(16),i=n(66),o=n(67),l=r?r.toStringTag:void 0;e.exports=function(c){return c==null?c===void 0?"[object Undefined]":"[object Null]":l&&l in Object(c)?i(c):o(c)}},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){e.exports=n(32)},function(e,t,n){var r=n(33),i=function(o,l){return new r.Converter(o,l)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var y=function(x,b){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,w){C.__proto__=w}||function(C,w){for(var A in w)Object.prototype.hasOwnProperty.call(w,A)&&(C[A]=w[A])})(x,b)};return function(x,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function C(){this.constructor=x}y(x,b),x.prototype=b===null?Object.create(b):(C.prototype=b.prototype,new C)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;var o=n(35),l=n(50),c=n(51),f=n(52),h=n(103),m=function(y){function x(b,C){C===void 0&&(C={});var w=y.call(this,C)||this;return w.options=C,w.params=(0,l.mergeParams)(b),w.runtime=(0,c.initParseRuntime)(w),w.result=new h.Result(w),w.processor=new f.ProcessorLocal(w),w.once("error",function(A){r(function(){w.result.processError(A),w.emit("done",A)})}),w.once("done",function(){w.processor.destroy()}),w}return i(x,y),x.prototype.preRawData=function(b){return this.runtime.preRawDataHook=b,this},x.prototype.preFileLine=function(b){return this.runtime.preFileLineHook=b,this},x.prototype.subscribe=function(b,C,w){return this.parseRuntime.subscribe={onNext:b,onError:C,onCompleted:w},this},x.prototype.fromFile=function(b,C){var w=this,A=n(!function(){var O=new Error("Cannot find module 'fs'");throw O.code="MODULE_NOT_FOUND",O}());return A.exists(b,function(O){O?A.createReadStream(b,C).pipe(w):w.emit("error",new Error("File does not exist at ".concat(b,". Check to make sure the file path to your csv is correct.")))}),this},x.prototype.fromStream=function(b){return b.pipe(this),this},x.prototype.fromString=function(b){b.toString();var C=new o.Readable,w=0;return C._read=function(A){if(w>=b.length)this.push(null);else{var O=b.substring(w,w+A);this.push(O),w+=A}},this.fromStream(C)},x.prototype.then=function(b,C){var w=this;return new Promise(function(A,O){w.parseRuntime.then={onfulfilled:function(P){A(b?b(P):P)},onrejected:function(P){C?A(C(P)):O(P)}}})},Object.defineProperty(x.prototype,"parseParam",{get:function(){return this.params},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!1,configurable:!0}),x.prototype._transform=function(b,C,w){var A=this;this.processor.process(b).then(function(O){if(O.length>0)return A.runtime.started=!0,A.result.processResult(O)}).then(function(){A.emit("drained"),w()},function(O){A.runtime.hasError=!0,A.runtime.error=O,A.emit("error",O),w()})},x.prototype._flush=function(b){var C=this;this.processor.flush().then(function(w){if(w.length>0)return C.result.processResult(w)}).then(function(){C.processEnd(b)},function(w){C.emit("error",w),b()})},x.prototype.processEnd=function(b){this.result.endProcess(),this.emit("done"),b()},Object.defineProperty(x.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!1,configurable:!0}),x}(o.Transform);t.Converter=m}).call(this,n(21).setImmediate)},function(e,t,n){(function(r,i){(function(o,l){if(!o.setImmediate){var c,f=1,h={},m=!1,y=o.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(o);x=x&&x.setTimeout?x:o,{}.toString.call(o.process)==="[object process]"?c=function(w){i.nextTick(function(){C(w)})}:function(){if(o.postMessage&&!o.importScripts){var w=!0,A=o.onmessage;return o.onmessage=function(){w=!1},o.postMessage("","*"),o.onmessage=A,w}}()?function(){var w="setImmediate$"+Math.random()+"$",A=function(O){O.source===o&&typeof O.data=="string"&&O.data.indexOf(w)===0&&C(+O.data.slice(w.length))};o.addEventListener?o.addEventListener("message",A,!1):o.attachEvent("onmessage",A),c=function(O){o.postMessage(w+O,"*")}}():o.MessageChannel?function(){var w=new MessageChannel;w.port1.onmessage=function(A){C(A.data)},c=function(A){w.port2.postMessage(A)}}():y&&"onreadystatechange"in y.createElement("script")?function(){var w=y.documentElement;c=function(A){var O=y.createElement("script");O.onreadystatechange=function(){C(A),O.onreadystatechange=null,w.removeChild(O),O=null},w.appendChild(O)}}():c=function(w){setTimeout(C,0,w)},x.setImmediate=function(w){typeof w!="function"&&(w=new Function(""+w));for(var A=new Array(arguments.length-1),O=0;O<A.length;O++)A[O]=arguments[O+1];var P={callback:w,args:A};return h[f]=P,c(f),f++},x.clearImmediate=b}function b(w){delete h[w]}function C(w){if(m)setTimeout(C,0,w);else{var A=h[w];if(A){m=!0;try{(function(O){var P=O.callback,N=O.args;switch(N.length){case 0:P();break;case 1:P(N[0]);break;case 2:P(N[0],N[1]);break;case 3:P(N[0],N[1],N[2]);break;default:P.apply(void 0,N)}})(A)}finally{b(w),m=!1}}}}})(typeof self>"u"?r===void 0?this:r:self)}).call(this,n(0),n(5))},function(e,t,n){e.exports=i;var r=n(10).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(11),i.Writable=n(46),i.Duplex=n(47),i.Transform=n(48),i.PassThrough=n(49),i.Stream=i,i.prototype.pipe=function(o,l){var c=this;function f(w){o.writable&&o.write(w)===!1&&c.pause&&c.pause()}function h(){c.readable&&c.resume&&c.resume()}c.on("data",f),o.on("drain",h),o._isStdio||l&&l.end===!1||(c.on("end",y),c.on("close",x));var m=!1;function y(){m||(m=!0,o.end())}function x(){m||(m=!0,typeof o.destroy=="function"&&o.destroy())}function b(w){if(C(),r.listenerCount(this,"error")===0)throw w}function C(){c.removeListener("data",f),o.removeListener("drain",h),c.removeListener("end",y),c.removeListener("close",x),c.removeListener("error",b),o.removeListener("error",b),c.removeListener("end",C),c.removeListener("close",C),o.removeListener("close",C)}return c.on("error",b),o.on("error",b),c.on("end",C),c.on("close",C),o.on("close",C),o.emit("pipe",c),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(x){var b=h(x),C=b[0],w=b[1];return 3*(C+w)/4-w},t.toByteArray=function(x){var b,C,w=h(x),A=w[0],O=w[1],P=new o(function(U,W,X){return 3*(W+X)/4-X}(0,A,O)),N=0,F=O>0?A-4:A;for(C=0;C<F;C+=4)b=i[x.charCodeAt(C)]<<18|i[x.charCodeAt(C+1)]<<12|i[x.charCodeAt(C+2)]<<6|i[x.charCodeAt(C+3)],P[N++]=b>>16&255,P[N++]=b>>8&255,P[N++]=255&b;return O===2&&(b=i[x.charCodeAt(C)]<<2|i[x.charCodeAt(C+1)]>>4,P[N++]=255&b),O===1&&(b=i[x.charCodeAt(C)]<<10|i[x.charCodeAt(C+1)]<<4|i[x.charCodeAt(C+2)]>>2,P[N++]=b>>8&255,P[N++]=255&b),P},t.fromByteArray=function(x){for(var b,C=x.length,w=C%3,A=[],O=0,P=C-w;O<P;O+=16383)A.push(y(x,O,O+16383>P?P:O+16383));return w===1?(b=x[C-1],A.push(r[b>>2]+r[b<<4&63]+"==")):w===2&&(b=(x[C-2]<<8)+x[C-1],A.push(r[b>>10]+r[b>>4&63]+r[b<<2&63]+"=")),A.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,f=l.length;c<f;++c)r[c]=l[c],i[l.charCodeAt(c)]=c;function h(x){var b=x.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var C=x.indexOf("=");return C===-1&&(C=b),[C,C===b?0:4-C%4]}function m(x){return r[x>>18&63]+r[x>>12&63]+r[x>>6&63]+r[63&x]}function y(x,b,C){for(var w,A=[],O=b;O<C;O+=3)w=(x[O]<<16&16711680)+(x[O+1]<<8&65280)+(255&x[O+2]),A.push(m(w));return A.join("")}i[45]=62,i[95]=63},function(e,t){t.read=function(n,r,i,o,l){var c,f,h=8*l-o-1,m=(1<<h)-1,y=m>>1,x=-7,b=i?l-1:0,C=i?-1:1,w=n[r+b];for(b+=C,c=w&(1<<-x)-1,w>>=-x,x+=h;x>0;c=256*c+n[r+b],b+=C,x-=8);for(f=c&(1<<-x)-1,c>>=-x,x+=o;x>0;f=256*f+n[r+b],b+=C,x-=8);if(c===0)c=1-y;else{if(c===m)return f?NaN:1/0*(w?-1:1);f+=Math.pow(2,o),c-=y}return(w?-1:1)*f*Math.pow(2,c-o)},t.write=function(n,r,i,o,l,c){var f,h,m,y=8*c-l-1,x=(1<<y)-1,b=x>>1,C=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=o?0:c-1,A=o?1:-1,O=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(h=isNaN(r)?1:0,f=x):(f=Math.floor(Math.log(r)/Math.LN2),r*(m=Math.pow(2,-f))<1&&(f--,m*=2),(r+=f+b>=1?C/m:C*Math.pow(2,1-b))*m>=2&&(f++,m/=2),f+b>=x?(h=0,f=x):f+b>=1?(h=(r*m-1)*Math.pow(2,l),f+=b):(h=r*Math.pow(2,b-1)*Math.pow(2,l),f=0));l>=8;n[i+w]=255&h,w+=A,h/=256,l-=8);for(f=f<<l|h,y+=l;y>0;n[i+w]=255&f,w+=A,f/=256,y-=8);n[i+w-A]|=128*O}},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(12).Buffer,i=n(42);function o(l,c,f){l.copy(c,f)}e.exports=function(){function l(){(function(c,f){if(!(c instanceof f))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(c){var f={data:c,next:null};this.length>0?this.tail.next=f:this.head=f,this.tail=f,++this.length},l.prototype.unshift=function(c){var f={data:c,next:this.head};this.length===0&&(this.tail=f),this.head=f,++this.length},l.prototype.shift=function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(c){if(this.length===0)return"";for(var f=this.head,h=""+f.data;f=f.next;)h+=c+f.data;return h},l.prototype.concat=function(c){if(this.length===0)return r.alloc(0);for(var f=r.allocUnsafe(c>>>0),h=this.head,m=0;h;)o(h.data,f,m),m+=h.data.length,h=h.next;return f},l}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var l=i.inspect({length:this.length});return this.constructor.name+" "+l})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var l=r.localStorage[o];return l!=null&&String(l).toLowerCase()==="true"}e.exports=function(o,l){if(i("noDeprecation"))return o;var c=!1;return function(){if(!c){if(i("throwDeprecation"))throw new Error(l);i("traceDeprecation")?console.trace(l):console.warn(l),c=!0}return o.apply(this,arguments)}}}).call(this,n(0))},function(e,t,n){var r=n(3),i=r.Buffer;function o(c,f){for(var h in c)f[h]=c[h]}function l(c,f,h){return i(c,f,h)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=l),o(i,l),l.from=function(c,f,h){if(typeof c=="number")throw new TypeError("Argument must not be a number");return i(c,f,h)},l.alloc=function(c,f,h){if(typeof c!="number")throw new TypeError("Argument must be a number");var m=i(c);return f!==void 0?typeof h=="string"?m.fill(f,h):m.fill(f):m.fill(0),m},l.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return i(c)},l.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(c)}},function(e,t,n){e.exports=o;var r=n(26),i=Object.create(n(4));function o(l){if(!(this instanceof o))return new o(l);r.call(this,l)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(l,c,f){f(null,l)}},function(e,t,n){e.exports=n(13)},function(e,t,n){e.exports=n(1)},function(e,t,n){e.exports=n(11).Transform},function(e,t,n){e.exports=n(11).PassThrough},function(e,t,n){var r=this&&this.__spreadArray||function(i,o,l){if(l||arguments.length===2)for(var c,f=0,h=o.length;f<h;f++)!c&&f in o||(c||(c=Array.prototype.slice.call(o,0,f)),c[f]=o[f]);return i.concat(c||Array.prototype.slice.call(o))};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeParams=function(i){var o={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 l in i||(i={}),i)i.hasOwnProperty(l)&&(Array.isArray(i[l])?o[l]=r([],i[l],!0):o[l]=i[l]);return o}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initParseRuntime=function(r){var i=r.parseParam,o={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:r.parseParam.delimiter,eol:r.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return i.ignoreColumns&&(o.needProcessIgnoreColumn=!0),i.includeColumns&&(o.needProcessIncludeColumn=!0),o}},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var w=function(A,O){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,N){P.__proto__=N}||function(P,N){for(var F in N)Object.prototype.hasOwnProperty.call(N,F)&&(P[F]=N[F])})(A,O)};return function(A,O){if(typeof O!="function"&&O!==null)throw new TypeError("Class extends value "+String(O)+" is not a constructor or null");function P(){this.constructor=A}w(A,O),A.prototype=O===null?Object.create(O):(P.prototype=O.prototype,new P)}}(),o=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProcessorLocal=void 0;var l=n(53),c=n(54),f=o(n(14)),h=n(55),m=n(27),y=n(56),x=o(n(57)),b=o(n(28)),C=function(w){function A(){var O=w!==null&&w.apply(this,arguments)||this;return O.rowSplit=new y.RowSplit(O.converter),O.eolEmitted=!1,O._needEmitEol=void 0,O.headEmitted=!1,O._needEmitHead=void 0,O}return i(A,w),A.prototype.flush=function(){var O=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var P=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(P,!0).then(function(N){return O.runtime.csvLineBuffer&&O.runtime.csvLineBuffer.length>0?Promise.reject(b.default.unclosed_quote(O.runtime.parsedLineNumber,O.runtime.csvLineBuffer.toString())):Promise.resolve(N)})}return Promise.resolve([])},A.prototype.destroy=function(){return Promise.resolve()},Object.defineProperty(A.prototype,"needEmitEol",{get:function(){return this._needEmitEol===void 0&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!1,configurable:!0}),A.prototype.process=function(O,P){var N,F=this;return P===void 0&&(P=!1),N=P?O.toString():(0,c.prepareData)(O,this.converter.parseRuntime),Promise.resolve().then(function(){return F.runtime.preRawDataHook?F.runtime.preRawDataHook(N):N}).then(function(U){return U&&U.length>0?F.processCSV(U,P):Promise.resolve([])})},A.prototype.processCSV=function(O,P){var N=this,F=this.params,U=this.runtime;U.eol||(0,f.default)(O,U),this.needEmitEol&&!this.eolEmitted&&U.eol&&(this.converter.emit("eol",U.eol),this.eolEmitted=!0),F.ignoreEmpty&&!U.started&&(O=(0,m.trimLeft)(O));var W=(0,h.stringToLines)(O,U);return P?(W.lines.push(W.partial),W.partial=""):this.prependLeftBuf((0,m.bufFromString)(W.partial)),W.lines.length>0?(U.preFileLineHook?this.runPreLineHook(W.lines):Promise.resolve(W.lines)).then(function(X){return U.started||N.runtime.headers?N.processCSVBody(X):N.processDataWithHead(X)}):Promise.resolve([])},A.prototype.processDataWithHead=function(O){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var P="",N=[];O.length;){var F=P+O.shift(),U=this.rowSplit.parse(F);if(U.closed){N=U.cells,P="";break}P=F+(0,f.default)(F,this.runtime)}if(this.prependLeftBuf((0,m.bufFromString)(P)),N.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=N}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(O)},A.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var O=this.runtime.headers,P=0;P<O.length;P++)if(this.params.ignoreColumns)if(this.params.ignoreColumns.test(O[P])){if(!this.params.includeColumns||!this.params.includeColumns.test(O[P]))continue;this.runtime.selectedColumns.push(P)}else this.runtime.selectedColumns.push(P);else this.params.includeColumns?this.params.includeColumns.test(O[P])&&this.runtime.selectedColumns.push(P):this.runtime.selectedColumns.push(P);this.runtime.headers=(0,m.filterArray)(this.runtime.headers,this.runtime.selectedColumns)}},A.prototype.processCSVBody=function(O){if(this.params.output==="line")return O;var P=this.rowSplit.parseMultiLines(O);return this.prependLeftBuf((0,m.bufFromString)(P.partial)),this.params.output==="csv"?P.rowsCells:(0,x.default)(P.rowsCells,this.converter)},A.prototype.prependLeftBuf=function(O){O&&(this.runtime.csvLineBuffer?this.runtime.csvLineBuffer=r.concat([O,this.runtime.csvLineBuffer]):this.runtime.csvLineBuffer=O)},A.prototype.runPreLineHook=function(O){var P=this;return new Promise(function(N,F){(function U(W,X,ae,ce){if(ae>=W.length)ce();else if(X.preFileLineHook){var re=W[ae],J=X.preFileLineHook(re,X.parsedLineNumber+ae);if(ae++,J&&J.then)J.then(function(oe){W[ae-1]=oe,U(W,X,ae,ce)});else{for(W[ae-1]=J;ae<W.length;)W[ae]=X.preFileLineHook(W[ae],X.parsedLineNumber+ae),ae++;ce()}}else ce()})(O,P.runtime,0,function(U){U?F(U):N(O)})})},A}(l.Processor);t.ProcessorLocal=C}).call(this,n(3).Buffer)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Processor=void 0;var r=function(i){this.converter=i,this.params=i.parseParam,this.runtime=i.parseRuntime};t.Processor=r},function(e,t,n){(function(r){Object.defineProperty(t,"__esModule",{value:!0}),t.prepareData=function(i,o){var l=function(f,h){return h.csvLineBuffer&&h.csvLineBuffer.length>0?r.concat([h.csvLineBuffer,f]):f}(i,o);o.csvLineBuffer=void 0;var c=function(f,h){var m=f.length-1;if((128&f[m])!=0){for(;(192&f[m])==128;)m--;m--}return m!=f.length-1?(h.csvLineBuffer=f.slice(m+1),f.slice(0,m+1)):f}(l,o).toString("utf8");return o.started===!1?function(f){if(typeof f!="string")throw new TypeError("Expected a string, got ".concat(typeof f));return f.charCodeAt(0)===65279?f.slice(1):f}(c):c}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringToLines=function(o,l){var c=(0,i.default)(o,l),f=o.split(c),h=f.pop()||"";return{lines:f,partial:h}};var i=r(n(14))},function(e,t,n){var r=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowSplit=void 0;var i=r(n(14)),o=n(27),l=[",","|"," ",";",":"],c=function(){function f(h){this.conv=h,this.cachedRegExp={},this.delimiterEmitted=!1,this._needEmitDelimiter=void 0,this.quote=h.parseParam.quote,this.trim=h.parseParam.trim,this.escape=h.parseParam.escape}return Object.defineProperty(f.prototype,"needEmitDelimiter",{get:function(){return this._needEmitDelimiter===void 0&&(this._needEmitDelimiter=this.conv.listeners("delimiter").length>0),this._needEmitDelimiter},enumerable:!1,configurable:!0}),f.prototype.parse=function(h){if(h.length===0||this.conv.parseParam.ignoreEmpty&&h.trim().length===0)return{cells:[],closed:!0};var m=this.quote,y=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(h)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var x=this.conv.parseRuntime.delimiter,b=h.split(x);if(m==="off"){if(y)for(var C=0;C<b.length;C++)b[C]=b[C].trim();return{cells:b,closed:!0}}return this.toCSVRow(b,y,m,x)},f.prototype.toCSVRow=function(h,m,y,x){for(var b=[],C=!1,w="",A=0,O=h.length;A<O;A++){var P=h[A];!C&&m&&(P=(0,o.trimLeft)(P));var N=P.length;if(C)this.isQuoteClose(P)?(C=!1,w+=x+(P=P.substr(0,N-1)),w=this.escapeQuote(w),m&&(w=(0,o.trimRight)(w)),b.push(w),w=""):w+=x+P;else{if(N===2&&P===this.quote+this.quote){b.push("");continue}if(this.isQuoteOpen(P)){if(P=P.substr(1),this.isQuoteClose(P)){P=P.substr(0,P.lastIndexOf(y)),P=this.escapeQuote(P),b.push(P);continue}if(P.indexOf(y)!==-1){for(var F=0,U="",W=0,X=P;W<X.length;W++){var ae=X[W];ae===y&&U!==this.escape?(F++,U=""):U=ae}if(F%2==1){m&&(P=(0,o.trimRight)(P)),b.push(y+P);continue}C=!0,w+=P;continue}C=!0,w+=P;continue}m&&(P=(0,o.trimRight)(P)),b.push(P)}}return{cells:b,closed:!C}},f.prototype.getDelimiter=function(h){var m;if(this.conv.parseParam.delimiter==="auto")m=l;else{if(!(this.conv.parseParam.delimiter instanceof Array))return this.conv.parseParam.delimiter;m=this.conv.parseParam.delimiter}var y=0,x=",";return m.forEach(function(b){var C=h.split(b).length;C>y&&(x=b,y=C)}),x},f.prototype.isQuoteOpen=function(h){var m=this.quote,y=this.escape;return h[0]===m&&(h[1]!==m||h[1]===y&&(h[2]===m||h.length===2))},f.prototype.isQuoteClose=function(h){var m=this.quote,y=this.escape;this.conv.parseParam.trim&&(h=(0,o.trimRight)(h));for(var x=0,b=h.length-1;h[b]===m||h[b]===y;)b--,x++;return x%2!=0},f.prototype.escapeQuote=function(h){var m="es|"+this.quote+"|"+this.escape;this.cachedRegExp[m]===void 0&&(this.cachedRegExp[m]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var y=this.cachedRegExp[m];return h.replace(y,this.quote)},f.prototype.parseMultiLines=function(h){for(var m=[],y="";h.length;){var x=y+h.shift(),b=this.parse(x);b.cells.length===0&&this.conv.parseParam.ignoreEmpty||(b.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?m.push((0,o.filterArray)(b.cells,this.conv.parseRuntime.selectedColumns)):m.push(b.cells),y=""):y=x+((0,i.default)(x,this.conv.parseRuntime)||`
`))}return{rowsCells:m,partial:y}},f}();t.RowSplit=c},function(e,t,n){var r=this&&this.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(O,P){for(var N=[],F=0,U=O.length;F<U;F++){var W=c(O[F],P,F);W&&N.push(W)}return N};var i=r(n(28)),o=r(n(58)),l=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function c(O,P,N){if(P.parseParam.checkColumn&&P.parseRuntime.headers&&O.length!==P.parseRuntime.headers.length)throw i.default.column_mismatched(P.parseRuntime.parsedLineNumber+N);return function(F,U,W){for(var X=!1,ae={},ce=0,re=F.length;ce<re;ce++){var J=F[ce];if(!W.parseParam.ignoreEmpty||J!==""){X=!0;var oe=U[ce];oe&&oe!==""||(oe=U[ce]="field"+(ce+1));var _e=h(oe,ce,W);if(_e){var se=_e(J,oe,ae,F,ce);se!==void 0&&m(ae,oe,se,W,ce)}else W.parseParam.checkType&&(J=b(J,oe,ce,W)(J)),J!==void 0&&m(ae,oe,J,W,ce)}}return X?ae:null}(O,P.parseRuntime.headers||[],P)||null}var f={string:w,number:C,omit:function(){}};function h(O,P,N){if(N.parseRuntime.columnConv[P]!==void 0)return N.parseRuntime.columnConv[P];var F=N.parseParam.colParser[O];if(F===void 0)return N.parseRuntime.columnConv[P]=null;if(typeof F=="object"&&(F=F.cellParser||"string"),typeof F=="string"){F=F.trim().toLowerCase();var U=f[F];return N.parseRuntime.columnConv[P]=U||null}return N.parseRuntime.columnConv[P]=typeof F=="function"?F:null}function m(O,P,N,F,U){if(!F.parseRuntime.columnValueSetter[U])if(F.parseParam.flatKeys)F.parseRuntime.columnValueSetter[U]=y;else if(P.indexOf(".")>-1){for(var W=P.split("."),X=!0;W.length>0;)if(W.shift().length===0){X=!1;break}!X||F.parseParam.colParser[P]&&F.parseParam.colParser[P].flat?F.parseRuntime.columnValueSetter[U]=y:F.parseRuntime.columnValueSetter[U]=x}else F.parseRuntime.columnValueSetter[U]=y;F.parseParam.nullObject===!0&&N==="null"&&(N=null),F.parseRuntime.columnValueSetter[U](O,P,N)}function y(O,P,N){O[P]=N}function x(O,P,N){(0,o.default)(O,P,N)}function b(O,P,N,F){return F.parseRuntime.headerType[N]?F.parseRuntime.headerType[N]:P.indexOf("number#!")>-1?F.parseRuntime.headerType[N]=C:P.indexOf("string#!")>-1?F.parseRuntime.headerType[N]=w:F.parseParam.checkType?F.parseRuntime.headerType[N]=A:F.parseRuntime.headerType[N]=w}function C(O){var P=parseFloat(O);return isNaN(P)?O:P}function w(O){return O.toString()}function A(O){var P=O.trim();return P===""?w(O):l.test(P)?C(O):P.length===5&&P.toLowerCase()==="false"||P.length===4&&P.toLowerCase()==="true"?function(N){var F=N.trim();return!(F.length===5&&F.toLowerCase()==="false")}(O):P[0]==="{"&&P[P.length-1]==="}"||P[0]==="["&&P[P.length-1]==="]"?function(N){try{return JSON.parse(N)}catch{return N}}(O):w(O)}},function(e,t,n){var r=n(59);e.exports=function(i,o,l){return i==null?i:r(i,o,l)}},function(e,t,n){var r=n(60),i=n(72),o=n(101),l=n(18),c=n(102);e.exports=function(f,h,m,y){if(!l(f))return f;for(var x=-1,b=(h=i(h,f)).length,C=b-1,w=f;w!=null&&++x<b;){var A=c(h[x]),O=m;if(A==="__proto__"||A==="constructor"||A==="prototype")return f;if(x!=C){var P=w[A];(O=y?y(P,A,w):void 0)===void 0&&(O=l(P)?P:o(h[x+1])?[]:{})}r(w,A,O),w=w[A]}return f}},function(e,t,n){var r=n(61),i=n(30),o=Object.prototype.hasOwnProperty;e.exports=function(l,c,f){var h=l[c];o.call(l,c)&&i(h,f)&&(f!==void 0||c in l)||r(l,c,f)}},function(e,t,n){var r=n(62);e.exports=function(i,o,l){o=="__proto__"&&r?r(i,o,{configurable:!0,enumerable:!0,value:l,writable:!0}):i[o]=l}},function(e,t,n){var r=n(15),i=function(){try{var o=r(Object,"defineProperty");return o({},"",{}),o}catch{}}();e.exports=i},function(e,t,n){var r=n(64),i=n(68),o=n(18),l=n(70),c=/^\[object .+?Constructor\]$/,f=Function.prototype,h=Object.prototype,m=f.toString,y=h.hasOwnProperty,x=RegExp("^"+m.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(b){return!(!o(b)||i(b))&&(r(b)?x:c).test(l(b))}},function(e,t,n){var r=n(29),i=n(18);e.exports=function(o){if(!i(o))return!1;var l=r(o);return l=="[object Function]"||l=="[object GeneratorFunction]"||l=="[object AsyncFunction]"||l=="[object Proxy]"}},function(e,t,n){(function(r){var i=typeof r=="object"&&r&&r.Object===Object&&r;e.exports=i}).call(this,n(0))},function(e,t,n){var r=n(16),i=Object.prototype,o=i.hasOwnProperty,l=i.toString,c=r?r.toStringTag:void 0;e.exports=function(f){var h=o.call(f,c),m=f[c];try{f[c]=void 0;var y=!0}catch{}var x=l.call(f);return y&&(h?f[c]=m:delete f[c]),x}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r=n(69),i=function(){var o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();e.exports=function(o){return!!i&&i in o}},function(e,t,n){var r=n(17)["__core-js_shared__"];e.exports=r},function(e,t){var n=Function.prototype.toString;e.exports=function(r){if(r!=null){try{return n.call(r)}catch{}try{return r+""}catch{}}return""}},function(e,t){e.exports=function(n,r){return n?.[r]}},function(e,t,n){var r=n(19),i=n(73),o=n(75),l=n(98);e.exports=function(c,f){return r(c)?c:i(c,f)?[c]:o(l(c))}},function(e,t,n){var r=n(19),i=n(20),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=function(c,f){if(r(c))return!1;var h=typeof c;return!(h!="number"&&h!="symbol"&&h!="boolean"&&c!=null&&!i(c))||l.test(c)||!o.test(c)||f!=null&&c in Object(f)}},function(e,t){e.exports=function(n){return n!=null&&typeof n=="object"}},function(e,t,n){var r=n(76),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,l=r(function(c){var f=[];return c.charCodeAt(0)===46&&f.push(""),c.replace(i,function(h,m,y,x){f.push(y?x.replace(o,"$1"):m||h)}),f});e.exports=l},function(e,t,n){var r=n(77);e.exports=function(i){var o=r(i,function(c){return l.size===500&&l.clear(),c}),l=o.cache;return o}},function(e,t,n){var r=n(78);function i(o,l){if(typeof o!="function"||l!=null&&typeof l!="function")throw new TypeError("Expected a function");var c=function(){var f=arguments,h=l?l.apply(this,f):f[0],m=c.cache;if(m.has(h))return m.get(h);var y=o.apply(this,f);return c.cache=m.set(h,y)||m,y};return c.cache=new(i.Cache||r),c}i.Cache=r,e.exports=i},function(e,t,n){var r=n(79),i=n(93),o=n(95),l=n(96),c=n(97);function f(h){var m=-1,y=h==null?0:h.length;for(this.clear();++m<y;){var x=h[m];this.set(x[0],x[1])}}f.prototype.clear=r,f.prototype.delete=i,f.prototype.get=o,f.prototype.has=l,f.prototype.set=c,e.exports=f},function(e,t,n){var r=n(80),i=n(86),o=n(92);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(e,t,n){var r=n(81),i=n(82),o=n(83),l=n(84),c=n(85);function f(h){var m=-1,y=h==null?0:h.length;for(this.clear();++m<y;){var x=h[m];this.set(x[0],x[1])}}f.prototype.clear=r,f.prototype.delete=i,f.prototype.get=o,f.prototype.has=l,f.prototype.set=c,e.exports=f},function(e,t,n){var r=n(7);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(n){var r=this.has(n)&&delete this.__data__[n];return this.size-=r?1:0,r}},function(e,t,n){var r=n(7),i=Object.prototype.hasOwnProperty;e.exports=function(o){var l=this.__data__;if(r){var c=l[o];return c==="__lodash_hash_undefined__"?void 0:c}return i.call(l,o)?l[o]:void 0}},function(e,t,n){var r=n(7),i=Object.prototype.hasOwnProperty;e.exports=function(o){var l=this.__data__;return r?l[o]!==void 0:i.call(l,o)}},function(e,t,n){var r=n(7);e.exports=function(i,o){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=r&&o===void 0?"__lodash_hash_undefined__":o,this}},function(e,t,n){var r=n(87),i=n(88),o=n(89),l=n(90),c=n(91);function f(h){var m=-1,y=h==null?0:h.length;for(this.clear();++m<y;){var x=h[m];this.set(x[0],x[1])}}f.prototype.clear=r,f.prototype.delete=i,f.prototype.get=o,f.prototype.has=l,f.prototype.set=c,e.exports=f},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(8),i=Array.prototype.splice;e.exports=function(o){var l=this.__data__,c=r(l,o);return!(c<0||(c==l.length-1?l.pop():i.call(l,c,1),--this.size,0))}},function(e,t,n){var r=n(8);e.exports=function(i){var o=this.__data__,l=r(o,i);return l<0?void 0:o[l][1]}},function(e,t,n){var r=n(8);e.exports=function(i){return r(this.__data__,i)>-1}},function(e,t,n){var r=n(8);e.exports=function(i,o){var l=this.__data__,c=r(l,i);return c<0?(++this.size,l.push([i,o])):l[c][1]=o,this}},function(e,t,n){var r=n(15)(n(17),"Map");e.exports=r},function(e,t,n){var r=n(9);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(9);e.exports=function(i){return r(this,i).get(i)}},function(e,t,n){var r=n(9);e.exports=function(i){return r(this,i).has(i)}},function(e,t,n){var r=n(9);e.exports=function(i,o){var l=r(this,i),c=l.size;return l.set(i,o),this.size+=l.size==c?0:1,this}},function(e,t,n){var r=n(99);e.exports=function(i){return i==null?"":r(i)}},function(e,t,n){var r=n(16),i=n(100),o=n(19),l=n(20),c=r?r.prototype:void 0,f=c?c.toString:void 0;e.exports=function h(m){if(typeof m=="string")return m;if(o(m))return i(m,h)+"";if(l(m))return f?f.call(m):"";var y=m+"";return y=="0"&&1/m==-1/0?"-0":y}},function(e,t){e.exports=function(n,r){for(var i=-1,o=n==null?0:n.length,l=Array(o);++i<o;)l[i]=r(n[i],i,n);return l}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(r,i){var o=typeof r;return!!(i=i??9007199254740991)&&(o=="number"||o!="symbol"&&n.test(r))&&r>-1&&r%1==0&&r<i}},function(e,t,n){var r=n(20);e.exports=function(i){if(typeof i=="string"||r(i))return i;var o=i+"";return o=="0"&&1/i==-1/0?"-0":o}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Result=void 0;var r=n(104),i=function(){function l(c){this.converter=c,this.finalResult=[]}return Object.defineProperty(l.prototype,"needEmitLine",{get:function(){return!!this.converter.parseRuntime.subscribe&&!!this.converter.parseRuntime.subscribe.onNext||this.needPushDownstream},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"needPushDownstream",{get:function(){return this._needPushDownstream===void 0&&(this._needPushDownstream=this.converter.listeners("data").length>0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!1,configurable:!0}),l.prototype.processResult=function(c){var f=this,h=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&h===0&&o(this.converter,"["+r.EOL),new Promise(function(m,y){f.needEmitLine?function x(b,C,w,A,O){if(w>=b.length)O();else if(C.parseRuntime.subscribe&&C.parseRuntime.subscribe.onNext){var P=C.parseRuntime.subscribe.onNext,N=b[w],F=P(N,C.parseRuntime.parsedLineNumber+w);if(w++,F&&F.then)F.then(function(){(function(W,X,ae,ce,re,J,oe){re&&o(ae,oe),x(W,ae,ce,re,J)})(b,0,C,w,A,O,N)},O);else{for(A&&o(C,N);w<b.length;){var U=b[w];P(U,C.parseRuntime.parsedLineNumber+w),w++,A&&o(C,U)}O()}}else{if(A)for(;w<b.length;)U=b[w++],o(C,U);O()}}(c,f.converter,0,f.needPushDownstream,function(x){x?y(x):(f.appendFinalResult(c),m(void 0))}):(f.appendFinalResult(c),m(void 0))})},l.prototype.appendFinalResult=function(c){this.needEmitAll&&(this.finalResult=this.finalResult.concat(c)),this.converter.parseRuntime.parsedLineNumber+=c.length},l.prototype.processError=function(c){this.converter.parseRuntime.subscribe&&this.converter.parseRuntime.subscribe.onError&&this.converter.parseRuntime.subscribe.onError(c),this.converter.parseRuntime.then&&this.converter.parseRuntime.then.onrejected&&this.converter.parseRuntime.then.onrejected(c)},l.prototype.endProcess=function(){this.converter.parseRuntime.then&&this.converter.parseRuntime.then.onfulfilled&&(this.needEmitAll?this.converter.parseRuntime.then.onfulfilled(this.finalResult):this.converter.parseRuntime.then.onfulfilled([])),this.converter.parseRuntime.subscribe&&this.converter.parseRuntime.subscribe.onCompleted&&this.converter.parseRuntime.subscribe.onCompleted(),this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&o(this.converter,"]"+r.EOL)},l}();function o(l,c){if(typeof c!="object"||l.options.objectMode)l.push(c);else{var f=JSON.stringify(c);l.push(f+(l.parseParam.downstreamFormat==="array"?","+r.EOL:r.EOL),"utf8")}}t.Result=i},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return typeof location<"u"?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return typeof navigator<"u"?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL=`
`,t.homedir=function(){return"/"}}])),j2}var j_e=O_e();const M_e=aa(j_e),P_e=e=>new Promise(t=>{M_e().fromString(e).then(t)}),L_e=new dD,N_e=e=>L_e.parse(e),R_e="shlink",DL=e=>`${R_e}.${e}`;class D_e{constructor(t){this.localStorage=t}get=t=>{const n=this.localStorage.getItem(DL(t));return n?JSON.parse(n):void 0};set=(t,n)=>this.localStorage.setItem(DL(t),JSON.stringify(n))}class k_e{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const I_e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",D_e,"localStorage"),e.service("TagColorsStorage",k_e,"Storage"),e.constant("csvToJson",P_e),e.constant("jsonToCsv",N_e),e.serviceFactory("useTimeoutToggle",()=>wy)},ec=new gN,{container:I3}=ec,z_e=(e,t)=>(...n)=>e[t](...n),U_e=(e,t)=>({...e,[t]:z_e(I3,t)}),B_e=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),S0=(e,t=[])=>HL(e?B_e(e):null,t.reduce(U_e,{}));GX(ec,S0);R2e(ec,S0);yV(ec);x_e(ec,S0);I_e(ec);T_e(ec,S0);var M2={},Tg={exports:{}},kL;function F_e(){return kL||(kL=1,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 h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return r.apply(void 0,h)}t.main=n,n.clone=o,n.isPlainObject=l,n.recursive=i;function r(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return f(h[0]===!0,!1,h)}t.merge=r;function i(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return f(h[0]===!0,!0,h)}t.recursive=i;function o(h){if(Array.isArray(h)){for(var m=[],y=0;y<h.length;++y)m.push(o(h[y]));return m}else if(l(h)){var m={};for(var y in h)m[y]=o(h[y]);return m}else return h}t.clone=o;function l(h){return h&&typeof h=="object"&&!Array.isArray(h)}t.isPlainObject=l;function c(h,m){if(!l(h))return m;for(var y in m)y==="__proto__"||y==="constructor"||y==="prototype"||(h[y]=l(h[y])&&l(m[y])?c(h[y],m[y]):m[y]);return h}function f(h,m,y){var x;(h||!l(x=y.shift()))&&(x={});for(var b=0;b<y.length;++b){var C=y[b];if(l(C)){for(var w in C)if(!(w==="__proto__"||w==="constructor"||w==="prototype")){var A=h?o(C[w]):C[w];x[w]=m?c(x[w],A):A}}}return x}}(Tg,Tg.exports)),Tg.exports}var IL;function $_e(){return IL||(IL=1,function(e){var t=n(F_e());Object.defineProperty(e,"__esModule",{value:!0}),e.clear=_e,e.combineLoads=oe,e.load=J,e.save=re;function n(H){return H&&H.__esModule?H:{default:H}}function r(H,I){return f(H)||c(H,I)||o(H,I)||i()}function i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(H,I){if(H){if(typeof H=="string")return l(H,I);var j=Object.prototype.toString.call(H).slice(8,-1);return j==="Object"&&H.constructor&&(j=H.constructor.name),j==="Map"||j==="Set"?Array.from(H):j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j)?l(H,I):void 0}}function l(H,I){(I==null||I>H.length)&&(I=H.length);for(var j=0,q=Array(I);j<I;j++)q[j]=H[j];return q}function c(H,I){var j=H==null?null:typeof Symbol<"u"&&H[Symbol.iterator]||H["@@iterator"];if(j!=null){var q,ee,le=[],pe=!0,he=!1;try{for(j=j.call(H);!(pe=(q=j.next()).done)&&(le.push(q.value),!(I&&le.length===I));pe=!0);}catch(ve){he=!0,ee=ve}finally{try{pe||j.return==null||j.return()}finally{if(he)throw ee}}return le}}function f(H){if(Array.isArray(H))return H}function h(H){"@babel/helpers - typeof";return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},h(H)}function m(H,I,j){return I in H?Object.defineProperty(H,I,{value:j,enumerable:!0,configurable:!0,writable:!0}):H[I]=j,H}var y="[Redux-LocalStorage-Simple]",x="redux_localstorage_simple",b="_",C=[],w=[],A=0,O=!1,P=!1,N=new Map;function F(H){console.warn(y,H)}function U(){}var W=function(H){return H?U:F};function X(H,I){return I===void 0?null:H.length===1?I[H[0]]:X(H.slice(1),I[H[0]])}function ae(H){function I(q,ee){return q.length===0?ee:I(q.slice(1),m({},q[0],ee))}var j=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};return I(H.split(".").reverse(),j)}function ce(H){this.warnFn=H||F}Object.defineProperty(ce.prototype,"length",{get:function(){try{return localStorage.length}catch(H){this.warnFn(H)}return 0},configurable:!0,enumerable:!0}),ce.prototype.key=function(H){try{return localStorage.key(H)}catch(I){this.warnFn(I)}return null},ce.prototype.setItem=function(H,I){try{localStorage.setItem(H,JSON.stringify(I))}catch(j){this.warnFn(j)}},ce.prototype.getItem=function(H){try{return JSON.parse(localStorage.getItem(H))}catch(I){this.warnFn(I)}return null},ce.prototype.removeItem=function(H){try{localStorage.removeItem(H)}catch(I){this.warnFn(I)}};function re(){var H=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},I=H.states,j=I===void 0?C:I,q=H.ignoreStates,ee=q===void 0?w:q,le=H.namespace,pe=le===void 0?x:le,he=H.namespaceSeparator,ve=he===void 0?b:he,D=H.debounce,R=D===void 0?A:D,G=H.disableWarnings,te=G===void 0?P:G;return function(V){return function(Z){return function(ne){function me(ke,Ve){return 1<ke.split(".").length?X(ke.split("."),Ve):X([ke],Ve)}function ie(){j.length===0?Ue.setItem(pe,xe):j.forEach(function(ke){var Ve=pe+ve+ke,ot=me(ke,xe);ot?Ue.setItem(Ve,ot):Ue.removeItem(Ve)})}var xe,Ee=W(te),Me=Z(ne);se(j)||(console.error(y,"'states' parameter in 'save()' method was passed a non-array value. Setting default value instead. Check your 'save()' method."),j=C),se(ee)||(console.error(y,"'ignoreStates' parameter in 'save()' method was passed a non-array value. Setting default value instead. Check your 'save()' method."),ee=w),0<ee.length&&(ee=ee.filter(function(ke){return ue(ke)?ke:void console.error(y,"'ignoreStates' array contains a non-string value. Ignoring this value. Check your 'ignoreStates' array.")})),ue(pe)||(console.error(y,"'namespace' parameter in 'save()' method was passed a non-string value. Setting default value instead. Check your 'save()' method."),pe=x),ue(ve)||(console.error(y,"'namespaceSeparator' parameter in 'save()' method was passed a non-string value. Setting default value instead. Check your 'save()' method."),ve=b),Y(R)||(console.error(y,"'debounce' parameter in 'save()' method was passed a non-integer value. Setting default value instead. Check your 'save()' method."),R=A),xe=0<ee.length?z(ee,V.getState()):V.getState();var Ue=new ce(Ee);return R?(N.get(j+pe)&&clearTimeout(N.get(j+pe)),N.set(j+pe,setTimeout(function(){ie()},R))):ie(),Me}}}}function J(){var H=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},I=H.states,j=I===void 0?C:I,q=H.immutablejs,ee=q===void 0?O:q,le=H.namespace,pe=le===void 0?x:le,he=H.namespaceSeparator,ve=he===void 0?b:he,D=H.preloadedState,R=D===void 0?{}:D,G=H.disableWarnings,te=G===void 0?P:G,V=W(te);se(j)||(console.error(y,"'states' parameter in 'load()' method was passed a non-array value. Setting default value instead. Check your 'load()' method."),j=C),ue(pe)||(console.error(y,"'namespace' parameter in 'load()' method was passed a non-string value. Setting default value instead. Check your 'load()' method."),pe=x),ue(ve)||(console.error(y,"'namespaceSeparator' parameter in 'load()' method was passed a non-string value. Setting default value instead. Check your 'load()' method."),ve=b),ee===!0&&V("Support for Immutable.js data structures has been deprecated as of version 2.0.0. Please use version 1.4.0 if you require this functionality.");var Z=new ce(V),ne=R;if(j.length===0){var me=Z.getItem(pe);me&&(ne=me)}else j.forEach(function(ie){var xe=pe+ve+ie,Ee=Z.getItem(xe);Ee?ne=t.default.recursive(ne,ae(ie,Ee)):V("Invalid load '"+xe+"' provided. Check your 'states' in 'load()'. If this is your first time running this app you may see this message. To disable it in future use the 'disableWarnings' flag, see documentation.")});return ne}function oe(){for(var H={},I=arguments.length,j=Array(I),q=0;q<I;q++)j[q]=arguments[q];return j.forEach(function(ee){for(var le in k(ee)||(console.error(y,"One or more loads provided to 'combineLoads()' is not a valid object. Ignoring the invalid load/s. Check your 'combineLoads()' method."),ee={}),ee)H[le]=ee[le]}),H}function _e(){var H=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},I=H.namespace,j=I===void 0?x:I,q=H.disableWarnings,ee=q===void 0?P:q,le=W(ee);ue(j)||(console.error(y,"'namespace' parameter in 'clear()' method was passed a non-string value. Setting default value instead. Check your 'clear()' method."),j=x);for(var pe,he=new ce(le),ve=he.length,D=0;D<ve;D++)pe=he.key(D),pe&&pe.slice(0,j.length)===j&&he.removeItem(pe)}function se(H){return Object.prototype.toString.call(H)==="[object Array]"}function ue(H){return typeof H=="string"}function Y(H){return typeof H=="number"&&isFinite(H)&&Math.floor(H)===H}function k(H){return H!==null&&h(H)==="object"}function z(H,I){var j=Object.entries(I).reduce(function(q,ee){var le=r(ee,2),pe=le[0];return le[1],H.indexOf(pe)===-1&&(q[pe]=I[pe]),q},{});return j}}(M2)),M2}var Yz=$_e();const V_e=e=>Ey({appUpdated:qX,servers:r_e,selectedServer:e.selectedServerReducer,settings:E_e}),H_e=e=>(e.settings&&e.settings.visits&&e.settings.visits.defaultInterval==="last180days"&&(e.settings.visits.defaultInterval="last180Days"),e),Wz={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},q_e=H_e(Yz.load(Wz)),G_e=e=>rS({devTools:!1,reducer:V_e(e),preloadedState:q_e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(Yz.save(Wz))}),Y_e=!!(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 W_e(e){if("serviceWorker"in navigator){if(new URL(Hg.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Hg.homepage}/service-worker.js`;Y_e?(K_e(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")})):Kz(n,e)})}}function Kz(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 K_e(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()})}):Kz(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const Zz=G_e(I3),{App:Z_e,ScrollToTop:X_e,ErrorHandler:Q_e,appUpdateAvailable:J_e}=I3;wB.createRoot(document.getElementById("root")).render(g.jsx(fw,{store:Zz,children:g.jsx(rN,{basename:Hg.homepage,children:g.jsx(Q_e,{children:g.jsx(X_e,{children:g.jsx(Z_e,{})})})})}));W_e({onUpdate(){Zz.dispatch(J_e())}});