var ez=Object.defineProperty;var tz=(e,t,n)=>t in e?ez(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ul=(e,t,n)=>tz(e,typeof t!="symbol"?t+"":t,n);function nz(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var oc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function at(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var j4={exports:{}},Ty={},A4={exports:{}},rt={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var qh=Symbol.for("react.element"),rz=Symbol.for("react.portal"),iz=Symbol.for("react.fragment"),oz=Symbol.for("react.strict_mode"),az=Symbol.for("react.profiler"),sz=Symbol.for("react.provider"),lz=Symbol.for("react.context"),cz=Symbol.for("react.forward_ref"),uz=Symbol.for("react.suspense"),fz=Symbol.for("react.memo"),dz=Symbol.for("react.lazy"),xT=Symbol.iterator;function hz(e){return e===null||typeof e!="object"?null:(e=xT&&e[xT]||e["@@iterator"],typeof e=="function"?e:null)}var k4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N4=Object.assign,M4={};function Eu(e,t,n){this.props=e,this.context=t,this.refs=M4,this.updater=n||k4}Eu.prototype.isReactComponent={};Eu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Eu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function L4(){}L4.prototype=Eu.prototype;function HO(e,t,n){this.props=e,this.context=t,this.refs=M4,this.updater=n||k4}var GO=HO.prototype=new L4;GO.constructor=HO;N4(GO,Eu.prototype);GO.isPureReactComponent=!0;var wT=Array.isArray,R4=Object.prototype.hasOwnProperty,KO={current:null},$4={key:!0,ref:!0,__self:!0,__source:!0};function I4(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)R4.call(t,r)&&!$4.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,ee=Z[H];if(0>>1;Hi(ie,B))aei(fe,ie)?(Z[H]=fe,Z[ae]=B,H=ae):(Z[H]=ie,Z[te]=B,H=te);else if(aei(fe,B))Z[H]=fe,Z[ae]=B,H=ae;else break e}}return z}function i(Z,z){var B=Z.sortIndex-z.sortIndex;return B!==0?B:Z.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],f=1,d=null,p=3,v=!1,g=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(Z){for(var z=n(c);z!==null;){if(z.callback===null)r(c);else if(z.startTime<=Z)r(c),z.sortIndex=z.expirationTime,t(l,z);else break;z=n(c)}}function S(Z){if(y=!1,w(Z),!g)if(n(l)!==null)g=!0,Q(E);else{var z=n(c);z!==null&&ne(S,z.startTime-Z)}}function E(Z,z){g=!1,y&&(y=!1,_(A),A=-1),v=!0;var B=p;try{for(w(z),d=n(l);d!==null&&(!(d.expirationTime>z)||Z&&!I());){var H=d.callback;if(typeof H=="function"){d.callback=null,p=d.priorityLevel;var ee=H(d.expirationTime<=z);z=e.unstable_now(),typeof ee=="function"?d.callback=ee:d===n(l)&&r(l),w(z)}else r(l);d=n(l)}if(d!==null)var K=!0;else{var te=n(c);te!==null&&ne(S,te.startTime-z),K=!1}return K}finally{d=null,p=B,v=!1}}var C=!1,T=null,A=-1,D=5,N=-1;function I(){return!(e.unstable_now()-NZ||125H?(Z.sortIndex=B,t(c,Z),n(l)===null&&Z===n(c)&&(y?(_(A),A=-1):y=!0,ne(S,B-H))):(Z.sortIndex=ee,t(l,Z),g||v||(g=!0,Q(E))),Z},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(Z){var z=p;return function(){var B=p;p=z;try{return Z.apply(this,arguments)}finally{p=B}}}})(z4);U4.exports=z4;var Sz=U4.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ez=R,Lr=Sz;function Oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v_=Object.prototype.hasOwnProperty,Cz=/^[: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]*$/,ST={},ET={};function Pz(e){return v_.call(ET,e)?!0:v_.call(ST,e)?!1:Cz.test(e)?ET[e]=!0:(ST[e]=!0,!1)}function Tz(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jz(e,t,n,r){if(t===null||typeof t>"u"||Tz(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function rr(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ln={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ln[e]=new rr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ln[t]=new rr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ln[e]=new rr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ln[e]=new rr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ln[e]=new rr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ln[e]=new rr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ln[e]=new rr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ln[e]=new rr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ln[e]=new rr(e,5,!1,e.toLowerCase(),null,!1,!1)});var YO=/[\-:]([a-z])/g;function ZO(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(YO,ZO);Ln[t]=new rr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(YO,ZO);Ln[t]=new rr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(YO,ZO);Ln[t]=new rr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ln[e]=new rr(e,1,!1,e.toLowerCase(),null,!1,!1)});Ln.xlinkHref=new rr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ln[e]=new rr(e,1,!1,e.toLowerCase(),null,!0,!0)});function XO(e,t,n,r){var i=Ln.hasOwnProperty(t)?Ln[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` `+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Fb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ff(e):""}function Az(e){switch(e.tag){case 5:return Ff(e.type);case 16:return Ff("Lazy");case 13:return Ff("Suspense");case 19:return Ff("SuspenseList");case 0:case 2:case 15:return e=Bb(e.type,!1),e;case 11:return e=Bb(e.type.render,!1),e;case 1:return e=Bb(e.type,!0),e;default:return""}}function __(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sc:return"Fragment";case ac:return"Portal";case g_:return"Profiler";case QO:return"StrictMode";case y_:return"Suspense";case b_:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case H4:return(e.displayName||"Context")+".Consumer";case W4:return(e._context.displayName||"Context")+".Provider";case JO:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case eS:return t=e.displayName||null,t!==null?t:__(e.type)||"Memo";case ga:t=e._payload,e=e._init;try{return __(e(t))}catch{}}return null}function kz(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return __(t);case 8:return t===QO?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Wa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function K4(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Nz(e){var t=K4(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xp(e){e._valueTracker||(e._valueTracker=Nz(e))}function q4(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K4(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fv(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function x_(e,t){var n=t.checked;return Vt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function PT(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Wa(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Y4(e,t){t=t.checked,t!=null&&XO(e,"checked",t,!1)}function w_(e,t){Y4(e,t);var n=Wa(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?O_(e,t.type,n):t.hasOwnProperty("defaultValue")&&O_(e,t.type,Wa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function TT(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function O_(e,t,n){(t!=="number"||fv(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Bf=Array.isArray;function Cc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Qp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Td(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Mz=["Webkit","ms","Moz","O"];Object.keys(Jf).forEach(function(e){Mz.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jf[t]=Jf[e]})});function J4(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jf.hasOwnProperty(e)&&Jf[e]?(""+t).trim():t+"px"}function eR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=J4(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Lz=Vt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function C_(e,t){if(t){if(Lz[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function P_(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var T_=null;function tS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var j_=null,Pc=null,Tc=null;function kT(e){if(e=Xh(e)){if(typeof j_!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=My(t),j_(e.stateNode,e.type,t))}}function tR(e){Pc?Tc?Tc.push(e):Tc=[e]:Pc=e}function nR(){if(Pc){var e=Pc,t=Tc;if(Tc=Pc=null,kT(e),t)for(e=0;e>>=0,e===0?32:31-(Hz(e)/Gz|0)|0}var Jp=64,em=4194304;function Uf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function mv(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Uf(s):(o&=a,o!==0&&(r=Uf(o)))}else a=n&~i,a!==0?r=Uf(a):o!==0&&(r=Uf(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Yh(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ji(t),e[t]=n}function Zz(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=td),BT=" ",UT=!1;function wR(e,t){switch(e){case"keyup":return SV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function OR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lc=!1;function CV(e,t){switch(e){case"compositionend":return OR(t);case"keypress":return t.which!==32?null:(UT=!0,BT);case"textInput":return e=t.data,e===BT&&UT?null:e;default:return null}}function PV(e,t){if(lc)return e==="compositionend"||!cS&&wR(e,t)?(e=_R(),Wm=aS=Oa=null,lc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=HT(n)}}function PR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?PR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function TR(){for(var e=window,t=fv();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fv(e.document)}return t}function uS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $V(e){var t=TR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&PR(n.ownerDocument.documentElement,n)){if(r!==null&&uS(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=GT(n,o);var a=GT(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,cc=null,R_=null,rd=null,$_=!1;function KT(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$_||cc==null||cc!==fv(r)||(r=cc,"selectionStart"in r&&uS(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rd&&Ld(rd,r)||(rd=r,r=yv(R_,"onSelect"),0dc||(e.current=z_[dc],z_[dc]=null,dc--)}function wt(e,t){dc++,z_[dc]=e.current,e.current=t}var Ha={},Bn=ns(Ha),cr=ns(!1),il=Ha;function Dc(e,t){var n=e.type.contextTypes;if(!n)return Ha;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ur(e){return e=e.childContextTypes,e!=null}function _v(){jt(cr),jt(Bn)}function ej(e,t,n){if(Bn.current!==Ha)throw Error(Oe(168));wt(Bn,t),wt(cr,n)}function IR(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,kz(e)||"Unknown",i));return Vt({},n,r)}function xv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ha,il=Bn.current,wt(Bn,e),wt(cr,cr.current),!0}function tj(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=IR(e,t,il),r.__reactInternalMemoizedMergedChildContext=e,jt(cr),jt(Bn),wt(Bn,e)):jt(cr),wt(cr,n)}var To=null,Ly=!1,e1=!1;function DR(e){To===null?To=[e]:To.push(e)}function qV(e){Ly=!0,DR(e)}function rs(){if(!e1&&To!==null){e1=!0;var e=0,t=pt;try{var n=To;for(pt=1;e>=a,i-=a,jo=1<<32-ji(t)+i|n<A?(D=T,T=null):D=T.sibling;var N=p(_,T,w[A],S);if(N===null){T===null&&(T=D);break}e&&T&&N.alternate===null&&t(_,T),b=o(N,b,A),C===null?E=N:C.sibling=N,C=N,T=D}if(A===w.length)return n(_,T),Nt&&Cs(_,A),E;if(T===null){for(;AA?(D=T,T=null):D=T.sibling;var I=p(_,T,N.value,S);if(I===null){T===null&&(T=D);break}e&&T&&I.alternate===null&&t(_,T),b=o(I,b,A),C===null?E=I:C.sibling=I,C=I,T=D}if(N.done)return n(_,T),Nt&&Cs(_,A),E;if(T===null){for(;!N.done;A++,N=w.next())N=d(_,N.value,S),N!==null&&(b=o(N,b,A),C===null?E=N:C.sibling=N,C=N);return Nt&&Cs(_,A),E}for(T=r(_,T);!N.done;A++,N=w.next())N=v(T,_,A,N.value,S),N!==null&&(e&&N.alternate!==null&&T.delete(N.key===null?A:N.key),b=o(N,b,A),C===null?E=N:C.sibling=N,C=N);return e&&T.forEach(function(F){return t(_,F)}),Nt&&Cs(_,A),E}function x(_,b,w,S){if(typeof w=="object"&&w!==null&&w.type===sc&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Zp:e:{for(var E=w.key,C=b;C!==null;){if(C.key===E){if(E=w.type,E===sc){if(C.tag===7){n(_,C.sibling),b=i(C,w.props.children),b.return=_,_=b;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ga&&ij(E)===C.type){n(_,C.sibling),b=i(C,w.props),b.ref=_f(_,C,w),b.return=_,_=b;break e}n(_,C);break}else t(_,C);C=C.sibling}w.type===sc?(b=Ys(w.props.children,_.mode,S,w.key),b.return=_,_=b):(S=Qm(w.type,w.key,w.props,null,_.mode,S),S.ref=_f(_,b,w),S.return=_,_=S)}return a(_);case ac:e:{for(C=w.key;b!==null;){if(b.key===C)if(b.tag===4&&b.stateNode.containerInfo===w.containerInfo&&b.stateNode.implementation===w.implementation){n(_,b.sibling),b=i(b,w.children||[]),b.return=_,_=b;break e}else{n(_,b);break}else t(_,b);b=b.sibling}b=l1(w,_.mode,S),b.return=_,_=b}return a(_);case ga:return C=w._init,x(_,b,C(w._payload),S)}if(Bf(w))return g(_,b,w,S);if(mf(w))return y(_,b,w,S);sm(_,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,b!==null&&b.tag===6?(n(_,b.sibling),b=i(b,w),b.return=_,_=b):(n(_,b),b=s1(w,_.mode,S),b.return=_,_=b),a(_)):n(_,b)}return x}var Bc=zR(!0),VR=zR(!1),Sv=ns(null),Ev=null,mc=null,pS=null;function mS(){pS=mc=Ev=null}function vS(e){var t=Sv.current;jt(Sv),e._currentValue=t}function H_(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ac(e,t){Ev=e,pS=mc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ar=!0),e.firstContext=null)}function li(e){var t=e._currentValue;if(pS!==e)if(e={context:e,memoizedValue:t,next:null},mc===null){if(Ev===null)throw Error(Oe(308));mc=e,Ev.dependencies={lanes:0,firstContext:e}}else mc=mc.next=e;return t}var Bs=null;function gS(e){Bs===null?Bs=[e]:Bs.push(e)}function WR(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,gS(t)):(n.next=i.next,i.next=n),t.interleaved=n,Bo(e,r)}function Bo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ya=!1;function yS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function HR(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Lo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ra(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ct&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Bo(e,n)}return i=r.interleaved,i===null?(t.next=t,gS(r)):(t.next=i.next,i.next=t),r.interleaved=t,Bo(e,n)}function Gm(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rS(e,n)}}function oj(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Cv(e,t,n,r){var i=e.updateQueue;ya=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?o=c:a.next=c,a=l;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==a&&(s===null?f.firstBaseUpdate=c:s.next=c,f.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;a=0,f=c=l=null,s=o;do{var p=s.lane,v=s.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:v,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,y=s;switch(p=t,v=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){d=g.call(v,d,p);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,p=typeof g=="function"?g.call(v,d,p):g,p==null)break e;d=Vt({},d,p);break e;case 2:ya=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[s]:p.push(s))}else v={eventTime:v,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(c=f=v,l=d):f=f.next=v,a|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);sl|=a,e.lanes=a,e.memoizedState=d}}function aj(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=n1.transition;n1.transition={};try{e(!1),t()}finally{pt=n,n1.transition=r}}function l$(){return ci().memoizedState}function QV(e,t,n){var r=Ia(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},c$(e))u$(t,n);else if(n=WR(e,t,n,r),n!==null){var i=Xn();Ai(n,e,r,i),f$(n,t,r)}}function JV(e,t,n){var r=Ia(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(c$(e))u$(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Li(s,a)){var l=t.interleaved;l===null?(i.next=i,gS(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=WR(e,t,i,r),n!==null&&(i=Xn(),Ai(n,e,r,i),f$(n,t,r))}}function c$(e){var t=e.alternate;return e===Ut||t!==null&&t===Ut}function u$(e,t){id=Tv=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function f$(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rS(e,n)}}var jv={readContext:li,useCallback:Rn,useContext:Rn,useEffect:Rn,useImperativeHandle:Rn,useInsertionEffect:Rn,useLayoutEffect:Rn,useMemo:Rn,useReducer:Rn,useRef:Rn,useState:Rn,useDebugValue:Rn,useDeferredValue:Rn,useTransition:Rn,useMutableSource:Rn,useSyncExternalStore:Rn,useId:Rn,unstable_isNewReconciler:!1},eW={readContext:li,useCallback:function(e,t){return Zi().memoizedState=[e,t===void 0?null:t],e},useContext:li,useEffect:lj,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qm(4194308,4,r$.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qm(4194308,4,e,t)},useInsertionEffect:function(e,t){return qm(4,2,e,t)},useMemo:function(e,t){var n=Zi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Zi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=QV.bind(null,Ut,e),[r.memoizedState,e]},useRef:function(e){var t=Zi();return e={current:e},t.memoizedState=e},useState:sj,useDebugValue:CS,useDeferredValue:function(e){return Zi().memoizedState=e},useTransition:function(){var e=sj(!1),t=e[0];return e=XV.bind(null,e[1]),Zi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ut,i=Zi();if(Nt){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),bn===null)throw Error(Oe(349));al&30||YR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,lj(XR.bind(null,r,o,e),[e]),r.flags|=2048,zd(9,ZR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Zi(),t=bn.identifierPrefix;if(Nt){var n=Ao,r=jo;n=(r&~(1<<32-ji(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Bd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Qi]=t,e[Id]=r,x$(e,t,!1,!1),t.stateNode=e;e:{switch(a=P_(n,r),n){case"dialog":Et("cancel",e),Et("close",e),i=r;break;case"iframe":case"object":case"embed":Et("load",e),i=r;break;case"video":case"audio":for(i=0;iVc&&(t.flags|=128,r=!0,xf(o,!1),t.lanes=4194304)}else{if(!r)if(e=Pv(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),xf(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Nt)return $n(t),null}else 2*Xt()-o.renderingStartTime>Vc&&n!==1073741824&&(t.flags|=128,r=!0,xf(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Xt(),t.sibling=null,n=Ft.current,wt(Ft,r?n&1|2:n&1),t):($n(t),null);case 22:case 23:return NS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Er&1073741824&&($n(t),t.subtreeFlags&6&&(t.flags|=8192)):$n(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function lW(e,t){switch(dS(t),t.tag){case 1:return ur(t.type)&&_v(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Uc(),jt(cr),jt(Bn),xS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _S(t),null;case 13:if(jt(Ft),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));Fc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return jt(Ft),null;case 4:return Uc(),null;case 10:return vS(t.type._context),null;case 22:case 23:return NS(),null;case 24:return null;default:return null}}var cm=!1,Dn=!1,cW=typeof WeakSet=="function"?WeakSet:Set,Re=null;function vc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ht(e,t,r)}else n.current=null}function ex(e,t,n){try{n()}catch(r){Ht(e,t,r)}}var bj=!1;function uW(e,t){if(I_=vv,e=TR(),uS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var v;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(v=d.firstChild)!==null;)p=d,d=v;for(;;){if(d===e)break t;if(p===n&&++c===i&&(s=a),p===o&&++f===r&&(l=a),(v=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(D_={focusedElem:e,selectionRange:n},vv=!1,Re=t;Re!==null;)if(t=Re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Re=e;else for(;Re!==null;){t=Re;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,x=g.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?y:xi(t.type,y),x);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(S){Ht(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Re=e;break}Re=t.return}return g=bj,bj=!1,g}function od(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&ex(t,n,o)}i=i.next}while(i!==r)}}function Iy(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function tx(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function S$(e){var t=e.alternate;t!==null&&(e.alternate=null,S$(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Qi],delete t[Id],delete t[U_],delete t[GV],delete t[KV])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function E$(e){return e.tag===5||e.tag===3||e.tag===4}function _j(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||E$(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bv));else if(r!==4&&(e=e.child,e!==null))for(nx(e,t,n),e=e.sibling;e!==null;)nx(e,t,n),e=e.sibling}function rx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(rx(e,t,n),e=e.sibling;e!==null;)rx(e,t,n),e=e.sibling}var kn=null,wi=!1;function la(e,t,n){for(n=n.child;n!==null;)C$(e,t,n),n=n.sibling}function C$(e,t,n){if(io&&typeof io.onCommitFiberUnmount=="function")try{io.onCommitFiberUnmount(jy,n)}catch{}switch(n.tag){case 5:Dn||vc(n,t);case 6:var r=kn,i=wi;kn=null,la(e,t,n),kn=r,wi=i,kn!==null&&(wi?(e=kn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):kn.removeChild(n.stateNode));break;case 18:kn!==null&&(wi?(e=kn,n=n.stateNode,e.nodeType===8?Jb(e.parentNode,n):e.nodeType===1&&Jb(e,n),Nd(e)):Jb(kn,n.stateNode));break;case 4:r=kn,i=wi,kn=n.stateNode.containerInfo,wi=!0,la(e,t,n),kn=r,wi=i;break;case 0:case 11:case 14:case 15:if(!Dn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&ex(n,t,a),i=i.next}while(i!==r)}la(e,t,n);break;case 1:if(!Dn&&(vc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Ht(n,t,s)}la(e,t,n);break;case 21:la(e,t,n);break;case 22:n.mode&1?(Dn=(r=Dn)||n.memoizedState!==null,la(e,t,n),Dn=r):la(e,t,n);break;default:la(e,t,n)}}function xj(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cW),t.forEach(function(r){var i=bW.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bi(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Xt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dW(r/1960))-r,10e?16:e,Sa===null)var r=!1;else{if(e=Sa,Sa=null,Nv=0,ct&6)throw Error(Oe(331));var i=ct;for(ct|=4,Re=e.current;Re!==null;){var o=Re,a=o.child;if(Re.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lXt()-AS?qs(e,0):jS|=n),fr(e,t)}function L$(e,t){t===0&&(e.mode&1?(t=em,em<<=1,!(em&130023424)&&(em=4194304)):t=1);var n=Xn();e=Bo(e,t),e!==null&&(Yh(e,t,n),fr(e,n))}function yW(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),L$(e,n)}function bW(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),L$(e,n)}var R$;R$=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||cr.current)ar=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ar=!1,aW(e,t,n);ar=!!(e.flags&131072)}else ar=!1,Nt&&t.flags&1048576&&FR(t,Ov,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ym(e,t),e=t.pendingProps;var i=Dc(t,Bn.current);Ac(t,n),i=OS(null,t,r,e,i,n);var o=SS();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ur(r)?(o=!0,xv(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,yS(t),i.updater=$y,t.stateNode=i,i._reactInternals=t,K_(t,r,e,n),t=Z_(null,t,r,!0,o,n)):(t.tag=0,Nt&&o&&fS(t),Gn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ym(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=xW(r),e=xi(r,e),i){case 0:t=Y_(null,t,r,e,n);break e;case 1:t=vj(null,t,r,e,n);break e;case 11:t=pj(null,t,r,e,n);break e;case 14:t=mj(null,t,r,xi(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xi(r,i),Y_(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xi(r,i),vj(e,t,r,i,n);case 3:e:{if(y$(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,HR(e,t),Cv(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=zc(Error(Oe(423)),t),t=gj(e,t,r,n,i);break e}else if(r!==i){i=zc(Error(Oe(424)),t),t=gj(e,t,r,n,i);break e}else for(Tr=La(t.stateNode.containerInfo.firstChild),Ar=t,Nt=!0,Ei=null,n=VR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fc(),r===i){t=Uo(e,t,n);break e}Gn(e,t,r,n)}t=t.child}return t;case 5:return GR(t),e===null&&W_(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,F_(r,i)?a=null:o!==null&&F_(r,o)&&(t.flags|=32),g$(e,t),Gn(e,t,a,n),t.child;case 6:return e===null&&W_(t),null;case 13:return b$(e,t,n);case 4:return bS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bc(t,null,r,n):Gn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xi(r,i),pj(e,t,r,i,n);case 7:return Gn(e,t,t.pendingProps,n),t.child;case 8:return Gn(e,t,t.pendingProps.children,n),t.child;case 12:return Gn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,wt(Sv,r._currentValue),r._currentValue=a,o!==null)if(Li(o.value,a)){if(o.children===i.children&&!cr.current){t=Uo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Lo(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),H_(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),H_(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Gn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ac(t,n),i=li(i),r=r(i),t.flags|=1,Gn(e,t,r,n),t.child;case 14:return r=t.type,i=xi(r,t.pendingProps),i=xi(r.type,i),mj(e,t,r,i,n);case 15:return m$(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xi(r,i),Ym(e,t),t.tag=1,ur(r)?(e=!0,xv(t)):e=!1,Ac(t,n),d$(t,r,i),K_(t,r,i,n),Z_(null,t,r,!0,e,n);case 19:return _$(e,t,n);case 22:return v$(e,t,n)}throw Error(Oe(156,t.tag))};function $$(e,t){return cR(e,t)}function _W(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ri(e,t,n,r){return new _W(e,t,n,r)}function LS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xW(e){if(typeof e=="function")return LS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===JO)return 11;if(e===eS)return 14}return 2}function Da(e,t){var n=e.alternate;return n===null?(n=ri(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qm(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")LS(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case sc:return Ys(n.children,i,o,t);case QO:a=8,i|=8;break;case g_:return e=ri(12,n,t,i|2),e.elementType=g_,e.lanes=o,e;case y_:return e=ri(13,n,t,i),e.elementType=y_,e.lanes=o,e;case b_:return e=ri(19,n,t,i),e.elementType=b_,e.lanes=o,e;case G4:return Fy(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W4:a=10;break e;case H4:a=9;break e;case JO:a=11;break e;case eS:a=14;break e;case ga:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=ri(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ys(e,t,n,r){return e=ri(7,e,r,t),e.lanes=n,e}function Fy(e,t,n,r){return e=ri(22,e,r,t),e.elementType=G4,e.lanes=n,e.stateNode={isHidden:!1},e}function s1(e,t,n){return e=ri(6,e,null,t),e.lanes=n,e}function l1(e,t,n){return t=ri(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function wW(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zb(0),this.expirationTimes=zb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function RS(e,t,n,r,i,o,a,s,l){return e=new wW(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ri(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},yS(o),e}function OW(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(B$)}catch(e){console.error(e)}}B$(),B4.exports=Dr;var Wy=B4.exports;const zs=at(Wy);var U$,jj=Wy;U$=jj.createRoot,jj.hydrateRoot;var TW={};/** * @license React * use-sync-external-store-with-selector.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Jh=R;function jW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var AW=typeof Object.is=="function"?Object.is:jW,kW=Jh.useSyncExternalStore,NW=Jh.useRef,MW=Jh.useEffect,LW=Jh.useMemo,RW=Jh.useDebugValue;TW.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=NW(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=LW(function(){function l(v){if(!c){if(c=!0,f=v,v=r(v),i!==void 0&&a.hasValue){var g=a.value;if(i(g,v))return d=g}return d=v}if(g=d,AW(f,v))return g;var y=r(v);return i!==void 0&&i(g,y)?g:(f=v,d=y)}var c=!1,f,d,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var s=kW(e,o[0],o[1]);return MW(function(){a.hasValue=!0,a.value=s},[s]),RW(s),s};var dt="default"in m_?V:m_,Aj=Symbol.for("react-redux-context"),kj=typeof globalThis<"u"?globalThis:{};function $W(){if(!dt.createContext)return{};const e=kj[Aj]??(kj[Aj]=new Map);let t=e.get(dt.createContext);return t||(t=dt.createContext(null),e.set(dt.createContext,t)),t}var z$=$W(),IW=()=>{throw new Error("uSES not initialized!")},DW=Symbol.for("react.element"),FW=Symbol.for("react.portal"),BW=Symbol.for("react.fragment"),UW=Symbol.for("react.strict_mode"),zW=Symbol.for("react.profiler"),VW=Symbol.for("react.provider"),WW=Symbol.for("react.context"),HW=Symbol.for("react.server_context"),V$=Symbol.for("react.forward_ref"),GW=Symbol.for("react.suspense"),KW=Symbol.for("react.suspense_list"),FS=Symbol.for("react.memo"),qW=Symbol.for("react.lazy"),YW=V$,ZW=FS;function XW(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case DW:{const n=e.type;switch(n){case BW:case zW:case UW:case GW:case KW:return n;default:{const r=n&&n.$$typeof;switch(r){case HW:case WW:case V$:case qW:case FS:case VW:return r;default:return t}}}}case FW:return t}}}function QW(e){return XW(e)===FS}function JW(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:a}){let s=!1,l,c,f,d,p;function v(b,w){return l=b,c=w,f=e(l,c),d=t(r,c),p=n(f,d,c),s=!0,p}function g(){return f=e(l,c),t.dependsOnOwnProps&&(d=t(r,c)),p=n(f,d,c),p}function y(){return e.dependsOnOwnProps&&(f=e(l,c)),t.dependsOnOwnProps&&(d=t(r,c)),p=n(f,d,c),p}function x(){const b=e(l,c),w=!a(b,f);return f=b,w&&(p=n(f,d,c)),p}function _(b,w){const S=!o(w,c),E=!i(b,l,w,c);return l=b,c=w,S&&E?g():S?y():E?x():p}return function(w,S){return s?_(w,S):v(w,S)}}function eH(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...i}){const o=t(e,i),a=n(e,i),s=r(e,i);return JW(o,a,s,e,i)}function tH(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 lx(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function Nj(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function W$(e,t){return function(r,{displayName:i}){const o=function(s,l){return o.dependsOnOwnProps?o.mapToProps(s,l):o.mapToProps(s,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,l){o.mapToProps=e,o.dependsOnOwnProps=Nj(e);let c=o(s,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=Nj(c),c=o(s,l)),c},o}}function BS(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function nH(e){return e&&typeof e=="object"?lx(t=>tH(e,t)):e?typeof e=="function"?W$(e):BS(e,"mapDispatchToProps"):lx(t=>({dispatch:t}))}function rH(e){return e?typeof e=="function"?W$(e):BS(e,"mapStateToProps"):lx(()=>({}))}function iH(e,t,n){return{...n,...e,...t}}function oH(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,a;return function(l,c,f){const d=e(l,c,f);return o?i(d,a)||(a=d):(o=!0,a=d),a}}}function aH(e){return e?typeof e=="function"?oH(e):BS(e,"mergeProps"):()=>iH}function sH(e){e()}function lH(){let e=null,t=null;return{clear(){e=null,t=null},notify(){sH(()=>{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 Mj={notify(){},get:()=>[]};function H$(e,t){let n,r=Mj,i=0,o=!1;function a(y){f();const x=r.subscribe(y);let _=!1;return()=>{_||(_=!0,x(),d())}}function s(){r.notify()}function l(){g.onStateChange&&g.onStateChange()}function c(){return o}function f(){i++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=lH())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=Mj)}function p(){o||(o=!0,f())}function v(){o&&(o=!1,d())}const g={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:p,tryUnsubscribe:v,getListeners:()=>r};return g}var cH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",uH=typeof navigator<"u"&&navigator.product==="ReactNative",Rv=cH||uH?dt.useLayoutEffect:dt.useEffect;function Lj(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function c1(e,t){if(Lj(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{K$=e},_H=[null,null];function xH(e,t,n){Rv(()=>e(...t),n)}function wH(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function OH(e,t,n,r,i,o,a,s,l,c,f){if(!e)return()=>{};let d=!1,p=null;const v=()=>{if(d||!s.current)return;const y=t.getState();let x,_;try{x=r(y,i.current)}catch(b){_=b,p=b}_||(p=null),x===o.current?a.current||c():(o.current=x,l.current=x,a.current=!0,f())};return n.onStateChange=v,n.trySubscribe(),v(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function SH(e,t){return e===t}function EH(e,t,n,{pure:r,areStatesEqual:i=SH,areOwnPropsEqual:o=c1,areStatePropsEqual:a=c1,areMergedPropsEqual:s=c1,forwardRef:l=!1,context:c=z$}={}){const f=c,d=rH(e),p=nH(t),v=aH(n),g=!!e;return x=>{const _=x.displayName||x.name||"Component",b=`Connect(${_})`,w={shouldHandleStateChanges:g,displayName:b,wrappedComponentName:_,WrappedComponent:x,initMapStateToProps:d,initMapDispatchToProps:p,initMergeProps:v,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:o,areMergedPropsEqual:s};function S(T){const[A,D,N]=dt.useMemo(()=>{const{reactReduxForwardedRef:Y,...oe}=T;return[T.context,Y,oe]},[T]),I=dt.useMemo(()=>{let Y=f;return A!=null&&A.Consumer,Y},[A,f]),F=dt.useContext(I),q=!!T.store&&!!T.store.getState&&!!T.store.dispatch,W=!!F&&!!F.store,X=q?T.store:F.store,Q=W?F.getServerState:X.getState,ne=dt.useMemo(()=>eH(X.dispatch,w),[X]),[Z,z]=dt.useMemo(()=>{if(!g)return _H;const Y=H$(X,q?void 0:F.subscription),oe=Y.notifyNestedSubs.bind(Y);return[Y,oe]},[X,q,F]),B=dt.useMemo(()=>q?F:{...F,subscription:Z},[q,F,Z]),H=dt.useRef(void 0),ee=dt.useRef(N),K=dt.useRef(void 0),te=dt.useRef(!1),ie=dt.useRef(!1),ae=dt.useRef(void 0);Rv(()=>(ie.current=!0,()=>{ie.current=!1}),[]);const fe=dt.useMemo(()=>()=>K.current&&N===ee.current?K.current:ne(X.getState(),N),[X,N]),j=dt.useMemo(()=>oe=>Z?OH(g,X,Z,ne,ee,H,te,ie,K,z,oe):()=>{},[Z]);xH(wH,[ee,H,te,N,K,z]);let k;try{k=K$(j,fe,Q?()=>ne(Q(),N):fe)}catch(Y){throw ae.current&&(Y.message+=` The error may be correlated with this previous error: ${ae.current.stack} `),Y}Rv(()=>{ae.current=void 0,K.current=void 0,H.current=k});const U=dt.useMemo(()=>dt.createElement(x,{...k,ref:D}),[D,x,k]);return dt.useMemo(()=>g?dt.createElement(I.Provider,{value:B},U):U,[I,U,B])}const C=dt.memo(S);if(C.WrappedComponent=x,C.displayName=S.displayName=b,l){const A=dt.forwardRef(function(N,I){return dt.createElement(C,{...N,reactReduxForwardedRef:I})});return A.displayName=b,A.WrappedComponent=x,cx(A,x)}return cx(C,x)}}var q$=EH;function CH({store:e,context:t,children:n,serverState:r,stabilityCheck:i="once",identityFunctionCheck:o="once"}){const a=dt.useMemo(()=>{const c=H$(e);return{store:e,subscription:c,getServerState:r?()=>r:void 0,stabilityCheck:i,identityFunctionCheck:o}},[e,r,i,o]),s=dt.useMemo(()=>e.getState(),[e]);Rv(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==e.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,s]);const l=t||z$;return dt.createElement(l.Provider,{value:a},n)}var Y$=CH;bH(R.useSyncExternalStore);/** * @remix-run/router v1.19.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Wd(){return Wd=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Z$(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function TH(){return Math.random().toString(36).substr(2,8)}function Fj(e,t){return{usr:e.state,key:e.key,idx:t}}function ux(e,t,n,r){return n===void 0&&(n=null),Wd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Tu(t):t,{state:n,key:t&&t.key||r||TH()})}function $v(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Tu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function jH(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Ea.Pop,l=null,c=f();c==null&&(c=0,a.replaceState(Wd({},a.state,{idx:c}),""));function f(){return(a.state||{idx:null}).idx}function d(){s=Ea.Pop;let x=f(),_=x==null?null:x-c;c=x,l&&l({action:s,location:y.location,delta:_})}function p(x,_){s=Ea.Push;let b=ux(y.location,x,_);c=f()+1;let w=Fj(b,c),S=y.createHref(b);try{a.pushState(w,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(S)}o&&l&&l({action:s,location:y.location,delta:1})}function v(x,_){s=Ea.Replace;let b=ux(y.location,x,_);c=f();let w=Fj(b,c),S=y.createHref(b);a.replaceState(w,"",S),o&&l&&l({action:s,location:y.location,delta:0})}function g(x){let _=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof x=="string"?x:$v(x);return b=b.replace(/ $/,"%20"),zt(_,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,_)}let y={get action(){return s},get location(){return e(i,a)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Dj,d),l=x,()=>{i.removeEventListener(Dj,d),l=null}},createHref(x){return t(i,x)},createURL:g,encodeLocation(x){let _=g(x);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:p,replace:v,go(x){return a.go(x)}};return y}var Bj;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Bj||(Bj={}));function AH(e,t,n){return n===void 0&&(n="/"),kH(e,t,n,!1)}function kH(e,t,n,r){let i=typeof t=="string"?Tu(t):t,o=Wc(i.pathname||"/",n);if(o==null)return null;let a=X$(e);NH(a);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(zt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Fa([r,l.relativePath]),f=n.concat(l);o.children&&o.children.length>0&&(zt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),X$(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:FH(c,o.index),routesMeta:f})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of Q$(o.path))i(o,a,l)}),t}function Q$(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=Q$(r.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function NH(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:BH(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const MH=/^:[\w-]+$/,LH=3,RH=2,$H=1,IH=10,DH=-2,Uj=e=>e==="*";function FH(e,t){let n=e.split("/"),r=n.length;return n.some(Uj)&&(r+=DH),t&&(r+=RH),n.filter(i=>!Uj(i)).reduce((i,o)=>i+(MH.test(o)?LH:o===""?$H:IH),r)}function BH(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 UH(e,t,n){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s{let{paramName:p,isOptional:v}=f;if(p==="*"){let y=s[d]||"";a=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const g=s[d];return v&&!g?c[p]=void 0:c[p]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:a,pattern:e}}function zH(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Z$(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function VH(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Z$(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Wc(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 WH(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Tu(e):e;return{pathname:n?n.startsWith("/")?n:HH(n,t):t,search:qH(r),hash:YH(i)}}function HH(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 u1(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function GH(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function US(e,t){let n=GH(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function zS(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Tu(e):(i=Wd({},e),zt(!i.pathname||!i.pathname.includes("?"),u1("?","pathname","search",i)),zt(!i.pathname||!i.pathname.includes("#"),u1("#","pathname","hash",i)),zt(!i.search||!i.search.includes("#"),u1("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}s=d>=0?t[d]:"/"}let l=WH(i,s),c=a&&a!=="/"&&a.endsWith("/"),f=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Fa=e=>e.join("/").replace(/\/\/+/g,"/"),KH=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),qH=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,YH=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ZH(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const J$=["post","put","patch","delete"];new Set(J$);const XH=["get",...J$];new Set(XH);/** * React Router v6.26.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Hd(){return Hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),R.useCallback(function(c,f){if(f===void 0&&(f={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let d=zS(c,JSON.parse(a),o,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Fa([t,d.pathname])),(f.replace?r.replace:r.push)(d,f.state,f)},[t,r,a,o,e])}function ju(){let{matches:e}=R.useContext(Qo),t=e[e.length-1];return t?t.params:{}}function Ky(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=R.useContext(Xo),{matches:i}=R.useContext(Qo),{pathname:o}=vr(),a=JSON.stringify(US(i,r.v7_relativeSplatPath));return R.useMemo(()=>zS(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function eG(e,t){return tG(e,t)}function tG(e,t,n,r){El()||zt(!1);let{navigator:i}=R.useContext(Xo),{matches:o}=R.useContext(Qo),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=vr(),f;if(t){var d;let x=typeof t=="string"?Tu(t):t;l==="/"||(d=x.pathname)!=null&&d.startsWith(l)||zt(!1),f=x}else f=c;let p=f.pathname||"/",v=p;if(l!=="/"){let x=l.replace(/^\//,"").split("/");v="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let g=AH(e,{pathname:v}),y=aG(g&&g.map(x=>Object.assign({},x,{params:Object.assign({},s,x.params),pathname:Fa([l,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Fa([l,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,n,r);return t&&y?R.createElement(Gy.Provider,{value:{location:Hd({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Ea.Pop}},y):y}function nG(){let e=uG(),t=ZH(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),n?R.createElement("pre",{style:i},n):null,null)}const rG=R.createElement(nG,null);class iG extends R.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?R.createElement(Qo.Provider,{value:this.props.routeContext},R.createElement(t6.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function oG(e){let{routeContext:t,match:n,children:r}=e,i=R.useContext(Hy);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),R.createElement(Qo.Provider,{value:t},r)}function aG(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let f=a.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);f>=0||zt(!1),a=a.slice(0,Math.min(a.length,f+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((f,d,p)=>{let v,g=!1,y=null,x=null;n&&(v=s&&d.route.id?s[d.route.id]:void 0,y=d.route.errorElement||rG,l&&(c<0&&p===0?(g=!0,x=null):c===p&&(g=!0,x=d.route.hydrateFallbackElement||null)));let _=t.concat(a.slice(0,p+1)),b=()=>{let w;return v?w=y:g?w=x:d.route.Component?w=R.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=f,R.createElement(oG,{match:d,routeContext:{outlet:f,matches:_,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?R.createElement(iG,{location:n.location,revalidation:n.revalidation,component:y,error:v,children:b(),routeContext:{outlet:null,matches:_,isDataRoute:!0}}):b()},null)}var r6=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(r6||{}),Dv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Dv||{});function sG(e){let t=R.useContext(Hy);return t||zt(!1),t}function lG(e){let t=R.useContext(e6);return t||zt(!1),t}function cG(e){let t=R.useContext(Qo);return t||zt(!1),t}function i6(e){let t=cG(),n=t.matches[t.matches.length-1];return n.route.id||zt(!1),n.route.id}function uG(){var e;let t=R.useContext(t6),n=lG(Dv.UseRouteError),r=i6(Dv.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function fG(){let{router:e}=sG(r6.UseNavigateStable),t=i6(Dv.UseNavigateStable),n=R.useRef(!1);return n6(()=>{n.current=!0}),R.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Hd({fromRouteId:t},o)))},[e,t])}function VS(e){let{to:t,replace:n,state:r,relative:i}=e;El()||zt(!1);let{future:o,static:a}=R.useContext(Xo),{matches:s}=R.useContext(Qo),{pathname:l}=vr(),c=go(),f=zS(t,US(s,o.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(f);return R.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:i}),[c,d,i,n,r]),null}function ot(e){zt(!1)}function dG(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Ea.Pop,navigator:o,static:a=!1,future:s}=e;El()&&zt(!1);let l=t.replace(/^\/*/,"/"),c=R.useMemo(()=>({basename:l,navigator:o,static:a,future:Hd({v7_relativeSplatPath:!1},s)}),[l,s,o,a]);typeof r=="string"&&(r=Tu(r));let{pathname:f="/",search:d="",hash:p="",state:v=null,key:g="default"}=r,y=R.useMemo(()=>{let x=Wc(f,l);return x==null?null:{location:{pathname:x,search:d,hash:p,state:v,key:g},navigationType:i}},[l,f,d,p,v,g,i]);return y==null?null:R.createElement(Xo.Provider,{value:c},R.createElement(Gy.Provider,{children:n,value:y}))}function qy(e){let{children:t,location:n}=e;return eG(fx(t),n)}new Promise(()=>{});function fx(e,t){t===void 0&&(t=[]);let n=[];return R.Children.forEach(e,(r,i)=>{if(!R.isValidElement(r))return;let o=[...t,i];if(r.type===R.Fragment){n.push.apply(n,fx(r.props.children,o));return}r.type!==ot&&zt(!1),!r.props.index||!r.props.children||zt(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=fx(r.props.children,o)),n.push(a)}),n}/** * React Router DOM v6.26.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function hG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pG(e,t){return e.button===0&&(!t||t==="_self")&&!hG(e)}const mG=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],vG=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],gG="6";try{window.__reactRouterVersion=gG}catch{}const yG=R.createContext({isTransitioning:!1}),bG="startTransition",zj=m_[bG];function a6(e){let{basename:t,children:n,future:r,window:i}=e,o=R.useRef();o.current==null&&(o.current=PH({window:i,v5Compat:!0}));let a=o.current,[s,l]=R.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},f=R.useCallback(d=>{c&&zj?zj(()=>l(d)):l(d)},[l,c]);return R.useLayoutEffect(()=>a.listen(f),[a,f]),R.createElement(dG,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const _G=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,St=R.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:f,unstable_viewTransition:d}=t,p=o6(t,mG),{basename:v}=R.useContext(Xo),g,y=!1;if(typeof c=="string"&&xG.test(c)&&(g=c,_G))try{let w=new URL(window.location.href),S=c.startsWith("//")?new URL(w.protocol+c):new URL(c),E=Wc(S.pathname,v);S.origin===w.origin&&E!=null?c=E+S.search+S.hash:y=!0}catch{}let x=QH(c,{relative:i}),_=OG(c,{replace:a,state:s,target:l,preventScrollReset:f,relative:i,unstable_viewTransition:d});function b(w){r&&r(w),w.defaultPrevented||_(w)}return R.createElement("a",Fv({},p,{href:g||x,onClick:y||o?r:b,ref:n,target:l}))}),s6=R.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:a=!1,style:s,to:l,unstable_viewTransition:c,children:f}=t,d=o6(t,vG),p=Ky(l,{relative:d.relative}),v=vr(),g=R.useContext(e6),{navigator:y,basename:x}=R.useContext(Xo),_=g!=null&&SG(p)&&c===!0,b=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,w=v.pathname,S=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(w=w.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&x&&(S=Wc(S,x)||S);const E=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let C=w===b||!a&&w.startsWith(b)&&w.charAt(E)==="/",T=S!=null&&(S===b||!a&&S.startsWith(b)&&S.charAt(b.length)==="/"),A={isActive:C,isPending:T,isTransitioning:_},D=C?r:void 0,N;typeof o=="function"?N=o(A):N=[o,C?"active":null,T?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let I=typeof s=="function"?s(A):s;return R.createElement(St,Fv({},d,{"aria-current":D,className:N,ref:n,style:I,to:l,unstable_viewTransition:c}),typeof f=="function"?f(A):f)});var dx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(dx||(dx={}));var Vj;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Vj||(Vj={}));function wG(e){let t=R.useContext(Hy);return t||zt(!1),t}function OG(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s}=t===void 0?{}:t,l=go(),c=vr(),f=Ky(e,{relative:a});return R.useCallback(d=>{if(pG(d,n)){d.preventDefault();let p=r!==void 0?r:$v(c)===$v(f);l(e,{replace:p,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s})}},[c,l,f,r,i,n,e,o,a,s])}function SG(e,t){t===void 0&&(t={});let n=R.useContext(yG);n==null&&zt(!1);let{basename:r}=wG(dx.useViewTransitionState),i=Ky(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Wc(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Wc(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Iv(i.pathname,a)!=null||Iv(i.pathname,o)!=null}const EG="shlink-web-client",CG="A React-based progressive web application for shlink",PG="/shlink-web-client/dependabot/npm_and_yarn/reactstrap-9.2.3",TG="https://github.com/shlinkio/shlink-web-client",jG="MIT",AG="module",kG={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint src test config/test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"vitest run --run","test:watch":"vitest --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},NG={"@fortawesome/fontawesome-free":"^6.6.0","@fortawesome/fontawesome-svg-core":"^6.6.0","@fortawesome/free-brands-svg-icons":"^6.6.0","@fortawesome/free-regular-svg-icons":"^6.6.0","@fortawesome/free-solid-svg-icons":"^6.6.0","@fortawesome/react-fontawesome":"^0.2.2","@json2csv/plainjs":"^7.0.6","@reduxjs/toolkit":"^2.2.7","@shlinkio/data-manipulation":"^1.0.3","@shlinkio/shlink-frontend-kit":"^0.5.2","@shlinkio/shlink-js-sdk":"^1.2.0","@shlinkio/shlink-web-component":"^0.7.0",bootstrap:"5.2.3",bottlejs:"^2.0.1",clsx:"^2.1.1","compare-versions":"^6.1.1",csvtojson:"^2.0.10","date-fns":"^4.1.0",react:"^18.3.1","react-dom":"^18.3.1","react-external-link":"^2.3.1","react-redux":"^9.1.2","react-router-dom":"^6.26.2",reactstrap:"^9.2.3","redux-localstorage-simple":"^2.5.1",uuid:"^10.0.0","workbox-core":"^7.1.0","workbox-expiration":"^7.1.0","workbox-precaching":"^7.1.0","workbox-routing":"^7.1.0","workbox-strategies":"^7.1.0"},MG={"@shlinkio/eslint-config-js-coding-standard":"~3.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@stylistic/eslint-plugin":"^2.8.0","@testing-library/jest-dom":"^6.5.0","@testing-library/react":"^16.0.1","@testing-library/user-event":"^14.5.2","@total-typescript/shoehorn":"^0.1.2","@types/react":"^18.3.8","@types/react-dom":"^18.3.0","@types/uuid":"^10.0.0","@vitejs/plugin-react":"^4.3.1","@vitest/coverage-v8":"^2.1.1","adm-zip":"^0.5.16","axe-core":"^4.10.0",chalk:"^5.3.0",eslint:"^8.57.0","eslint-plugin-jsx-a11y":"^6.10.0","eslint-plugin-react":"^7.36.1","eslint-plugin-react-hooks":"^4.6.2","eslint-plugin-simple-import-sort":"^12.1.1",history:"^5.3.0",jsdom:"^25.0.0",sass:"^1.79.3",stylelint:"^15.11.0",typescript:"^5.6.2","typescript-eslint":"^8.6.0",vite:"^5.4.7","vite-plugin-pwa":"^0.20.5",vitest:"^2.0.2"},LG=[">0.2%","not dead","not ie <= 11","not op_mini all"],Bv={name:EG,description:CG,private:!1,homepage:PG,repository:TG,license:jG,type:AG,scripts:kG,dependencies:NG,devDependencies:MG,browserslist:LG};var Ri,uo=".",l6="function",c6="string",u6="__global__",WS="Provider",RG=0,HS=Array.prototype.slice,$G=function(t,n){var r=t[n];if(r===void 0&&Ri.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},Yy=function(t){var n;return this.nested[t]||(n=Ri.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},f6=function(t){return t.split(uo).reduce($G,this)},IG=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var s=0,l=function(f){if(f)throw f;t[s]&&t[s++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},DG=function(t,n){var r,i;return typeof t===l6&&(n=t,t=u6),r=t.split(uo),i=r.shift(),r.length?Yy.call(this,i).middleware(r.join(uo),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},FG=function(t,n){return n(t)},Wj=function(t,n){return(t[n]||[]).concat(t.__global__||[])},BG=function(t,n){var r,i,o,a,s;return this.id,o=this.container,a=this.decorators,s=this.middlewares,r=t+WS,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],f;return c&&(f=Wj(a,t).reduce(FG,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:IG(Wj(s,t),t,f,o)}},Object.defineProperties(o,i),this},d6=function(t,n){var r,i;return r=t.split(uo),this.providerMap[t]&&r.length===1&&!this.container[t+WS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(Yy.call(this,i).provider(r.join(uo),n),this):BG.call(this,i,n))},GS=function(t,n){return d6.call(this,t,function(){this.$get=n})},h6=function(t,n,r){var i=arguments.length>3?HS.call(arguments,3):[],o=this;return GS.call(this,t,function(){var s=n,l=i.map(f6,o.container);return r?new(n.bind.apply(n,[null].concat(l))):s.apply(null,l)})},UG=function(t,n){return h6.apply(this,[t,n,!0].concat(HS.call(arguments,2)))},zG=function(t,n){return h6.apply(this,[t,n,!1].concat(HS.call(arguments,2)))},p6=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},m6=function(t,n){var r=t[n];return r||(r={},p6.call(t,n,r)),r},VG=function(t,n){var r;return r=t.split(uo),t=r.pop(),p6.call(r.reduce(m6,this.container),t,n),this},WG=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},HG=function(t,n){var r=t.split(uo);return t=r.pop(),WG.call(r.reduce(m6,this.container),t,n),this},v6=function(t,n){var r,i;return typeof t===l6&&(n=t,t=u6),r=t.split(uo),i=r.shift(),r.length?Yy.call(this,i).decorator(r.join(uo),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},GG=function(t){return this.deferred.push(t),this},KG=function(t){return(t||[]).map(f6,this.container)},qG=function(t,n){return GS.call(this,t,function(i){return{instance:n.bind(n,i)}})},YG=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},KS=function(t){return Object.keys(t||this.container||{}).filter(YG)},Uv={},ZG=function(t){var n;return typeof t===c6?(n=Uv[t],n||(Uv[t]=n=new Ri,n.constant("BOTTLE_NAME",t)),n):new Ri},XG=function(t){typeof t===c6?delete Uv[t]:Uv={}},g6=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Hj=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+WS]},QG=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var a=o.split(uo);a.length>1&&a.forEach(Hj,Yy.call(this,a[0])),Hj.call(this,o),this.provider(o,n[o])}},this)},JG=function(t){return this.deferred.forEach(function(r){r(t)}),this};Ri=function e(t){if(!(this instanceof e))return e.pop(t);this.id=RG++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:v6.bind(this),$register:g6.bind(this),$list:KS.bind(this)}};Ri.prototype={constant:HG,decorator:v6,defer:GG,digest:KG,factory:GS,instanceFactory:qG,list:KS,middleware:DG,provider:d6,resetProviders:QG,register:g6,resolve:JG,service:UG,serviceFactory:zG,value:VG};Ri.pop=ZG;Ri.clear=XG;Ri.list=KS;Ri.config={strict:!1};const y6=Ri;var eK=Object.defineProperty,tK=(e,t,n)=>t in e?eK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nK=(e,t,n)=>tK(e,t+"",n);const rK=(e,t)=>`${e}/rest/v${t}`,iK=e=>e.dir?`${e.field}-${e.dir}`:void 0,oK=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:iK(e)}),aK=(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}`},sK=(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()};class lK{constructor(t,n){nK(this,"apiVersion"),this.httpClient=t,this.serverInfo=n,this.apiVersion=3}async listShortUrls(t={}){return this.performRequest({url:"/short-urls",query:oK(t)}).then(({shortUrls:n})=>n)}async createShortUrl(t){const n=Object.entries(t).reduce((r,[i,o])=>(o&&(r[i]=o),r),{});return this.performRequest({url:"/short-urls",method:"POST",body:n})}async getShortUrl(t,n){return this.performRequest({url:`/short-urls/${t}`,query:{domain:n}})}async deleteShortUrl(t,n){return this.performEmptyRequest({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n}})}async updateShortUrl(t,n,r){return this.performRequest({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:r})}async getShortUrlRedirectRules(t,n){return this.performRequest({url:`/short-urls/${t}/redirect-rules`,method:"GET",query:{domain:n}})}async setShortUrlRedirectRules(t,n,r){return this.performRequest({url:`/short-urls/${t}/redirect-rules`,method:"POST",query:{domain:n},body:r})}async getVisitsOverview(){return this.performRequest({url:"/visits"}).then(({visits:t})=>t)}async getShortUrlVisits(t,n){return this.performVisitsRequest({url:`/short-urls/${t}/visits`,query:n})}async getTagVisits(t,n){return this.performVisitsRequest({url:`/tags/${t}/visits`,query:n})}async getDomainVisits(t,n){return this.performVisitsRequest({url:`/domains/${t}/visits`,query:n})}async getOrphanVisits(t){return this.performVisitsRequest({url:"/visits/orphan",query:t})}async getNonOrphanVisits(t){return this.performVisitsRequest({url:"/visits/non-orphan",query:t})}async performVisitsRequest(t){return this.performRequest(t).then(({visits:n})=>n)}async deleteShortUrlVisits(t,n){const r=n?{domain:n}:void 0;return this.performRequest({method:"DELETE",url:`/short-urls/${t}/visits`,query:r})}async deleteOrphanVisits(){return this.performRequest({method:"DELETE",url:"/visits/orphan"})}async listTags(){return this.performRequest({url:"/tags",query:{withStats:"true"}}).then(({tags:t})=>t)}async tagsStats(){return this.performRequest({url:"/tags/stats"}).then(({tags:t})=>t)}async deleteTags(t){return this.performEmptyRequest({url:"/tags",method:"DELETE",query:{tags:t}}).then(()=>({tags:t}))}async editTag(t,n){return this.performEmptyRequest({url:"/tags",method:"PUT",body:{oldName:t,newName:n}}).then(()=>({oldName:t,newName:n}))}async listDomains(){return this.performRequest({url:"/domains"}).then(({domains:t})=>t)}async editDomainRedirects(t){return this.performRequest({url:"/domains/redirects",method:"PATCH",body:t})}async health(t){return this.performRequest({url:"/health",domain:t})}async mercureInfo(){return this.performRequest({url:"/mercure-info"})}async performRequest(t){return this.httpClient.jsonRequest(...this.toFetchParams(t))}async performEmptyRequest(t){return this.httpClient.emptyRequest(...this.toFetchParams(t))}toFetchParams({url:t,method:n="GET",query:r={},body:i,domain:o}){const a=sK(r),s=a?`?${a}`:"",l=o?aK(this.serverInfo.baseUrl,o):this.serverInfo.baseUrl;return[`${rK(l,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.serverInfo.apiKey}}]}}const b6=e=>!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),ld=e=>!!(e!=null&&e.id),qS=e=>!!(e!=null&&e.version),cK=e=>!!(e!=null&&e.serverNotFound),uK=e=>ld(e)?e.id:"",fK=({name:e,url:t,apiKey:n})=>({name:e,url:t,apiKey:n}),Gj={},dK=e=>typeof e=="function",hK=e=>{const{selectedServer:t}=e();if(!b6(t))throw new Error("There's no selected server or it is not found");return t},pK=e=>t=>{const{url:n,apiKey:r}=dK(t)?hK(t):t,i=`${r}_${n}`,o=Gj[i]??new lK(e,{apiKey:r,baseUrl:n});return Gj[i]=o,o},mK=e=>{e.serviceFactory("buildShlinkApiClient",pK,"HttpClient")},_6={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.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 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z"]},vK={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 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zm64 80l0 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 400l0 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"]},gK=vK,yK={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},YS=yK,bK={prefix:"fas",iconName:"file-csv",icon:[512,512,[],"f6dd","M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 144-208 0c-35.3 0-64 28.7-64 64l0 144-48 0c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM200 352l16 0c22.1 0 40 17.9 40 40l0 8c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-8c0-4.4-3.6-8-8-8l-16 0c-4.4 0-8 3.6-8 8l0 80c0 4.4 3.6 8 8 8l16 0c4.4 0 8-3.6 8-8l0-8c0-8.8 7.2-16 16-16s16 7.2 16 16l0 8c0 22.1-17.9 40-40 40l-16 0c-22.1 0-40-17.9-40-40l0-80c0-22.1 17.9-40 40-40zm133.1 0l34.9 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-34.9 0c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1L304 512c-8.8 0-16-7.2-16-16s7.2-16 16-16l42.9 0c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16l0 31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66l0-31.6c0-8.8 7.2-16 16-16s16 7.2 16 16l0 31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6l0-31.6c0-8.8 7.2-16 16-16z"]},_K={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1 0 32c0 8.8 7.2 16 16 16l32 0zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]},x6=_K,w6={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},xK={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"]},O6={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"]},wK={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},OK=wK,SK={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 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"]},ZS=SK,EK={prefix:"fas",iconName:"plug",icon:[384,512,[128268],"f1e6","M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2C297 398 352 333.4 352 256l0-32c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160z"]},CK={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64l-185.3 0c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64l185.3 0c2.2 20.4 3.3 41.8 3.3 64zm28.8-64l123.1 0c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64l-123.1 0c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32l-116.7 0c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0l-176.6 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0L18.6 160C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192l123.1 0c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64L8.1 320C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6l176.6 0c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352l116.7 0zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6l116.7 0z"]},PK={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},Kj={prefix:"fas",iconName:"server",icon:[512,512,[],"f233","M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm280 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"]},TK={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-102.1-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31L216 408z"]},jK=TK,AK={prefix:"fas",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0","M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152l0 270.8c0 9.8-6 18.6-15.1 22.3L416 503l0-302.6zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6l0 251.4L32.9 502.7C17.1 509 0 497.4 0 480.4L0 209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77l0 249.3L192 449.4 192 255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},hx=AK,kK={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},NK={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},MK={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7 96 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 301.7 32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-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"]},LK=MK,XS={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M304 240l0-223.4c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16L304 240zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4L256 288 412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288l238.4 0z"]},Zy={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.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z"]},S6={prefix:"fas",iconName:"tags",icon:[512,512,[],"f02c","M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5L0 80C0 53.5 21.5 32 48 32l149.5 0c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},qj={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 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zM305 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z"]},RK={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 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-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z"]},$K={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},IK={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-128c0-17.7-14.3-32-32-32L352 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"]},DK=IK,FK={prefix:"fas",iconName:"tag",icon:[448,512,[127991],"f02b","M0 80L0 229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7L48 32C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},BK={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 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-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},QS=BK,UK={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160l50.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L48 224c-17.7 0-32-14.3-32-32L16 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},zK=UK,VK={prefix:"fas",iconName:"grip-vertical",icon:[320,512,[],"f58e","M40 352l48 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-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 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-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-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 0zM232 192l48 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-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 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-40l0-48c0-22.1 17.9-40 40-40z"]},WK={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},HK={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},GK=HK,KK={prefix:"fas",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c0 2.7-.2 5.4-.5 8.1l0 16.2c0 22.1-17.9 40-40 40l-16 0c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1L416 512l-24 0c-22.1 0-40-17.9-40-40l0-24 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]},qK=KK,YK={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-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"]},ZK=YK,XK={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM216 232l0 102.1 31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31L168 232c0-13.3 10.7-24 24-24s24 10.7 24 24z"]},E6=XK,QK={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},JK={prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 470.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 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},eq={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},tq={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},nq=tq,rq={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},iq={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.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 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},ep={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},oq={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},px=oq,aq={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},sq={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c-17.5 17.5-30.1 38-37.8 59.8c-5.9 16.7-24.2 25.4-40.8 19.5s-25.4-24.2-19.5-40.8C55.6 150.7 73.2 122 97.6 97.6c87.2-87.2 228.3-87.5 315.8-1L455 55c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 128c0 13.3-10.7 24-24 24l-8.4 0c0 0 0 0 0 0L344 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l41.1-41.1c-62.6-61.5-163.1-61.2-225.3 1zM16 312c0-13.3 10.7-24 24-24l7.6 0 .7 0L168 288c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-41.1 41.1c62.6 61.5 163.1 61.2 225.3-1c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.2 87.2-228.3 87.5-315.8 1L57 457c-6.9 6.9-17.2 8.9-26.2 5.2S16 449.7 16 440l0-119.6 0-.7 0-7.6z"]},lq=sq,Yj={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M320 0c17.7 0 32 14.3 32 32l0 64 120 0c39.8 0 72 32.2 72 72l0 272c0 39.8-32.2 72-72 72l-304 0c-39.8 0-72-32.2-72-72l0-272c0-39.8 32.2-72 72-72l120 0 0-64c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224l16 0 0 192-16 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-16 0 0-192 16 0z"]},C6={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8l-.7 0c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},cq=C6,uq={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 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 96l0 64 64 0 0-64L64 96zM0 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-96zm64 16l0 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-48zm80 64l-64 0 0 64 64 0 0-64zM256 304c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16l0 96c0 8.8-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-160zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},fq={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},dq={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"]},hq={prefix:"fas",iconName:"desktop",icon:[576,512,[128421,61704,"desktop-alt"],"f390","M64 0C28.7 0 0 28.7 0 64L0 352c0 35.3 28.7 64 64 64l176 0-10.7 32L160 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-69.3 0L336 416l176 0c35.3 0 64-28.7 64-64l0-288c0-35.3-28.7-64-64-64L64 0zM512 64l0 224L64 288 64 64l448 0z"]},Gd={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},pq={prefix:"fas",iconName:"arrows-split-up-and-left",icon:[512,512,[],"e4bc","M246.6 150.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L352 109.3 352 384c0 35.3 28.7 64 64 64l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-70.7 0-128-57.3-128-128c0-35.3-28.7-64-64-64l-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 256 224 256c23.3 0 45.2 6.2 64 17.1l0-163.9-41.4 41.4z"]},mq={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},vq=mq,Zj=()=>{};let JS={},P6={},T6=null,j6={mark:Zj,measure:Zj};try{typeof window<"u"&&(JS=window),typeof document<"u"&&(P6=document),typeof MutationObserver<"u"&&(T6=MutationObserver),typeof performance<"u"&&(j6=performance)}catch{}const{userAgent:Xj=""}=JS.navigator||{},Ga=JS,At=P6,Qj=T6,dm=j6;Ga.document;const Jo=!!At.documentElement&&!!At.head&&typeof At.addEventListener=="function"&&typeof At.createElement=="function",A6=~Xj.indexOf("MSIE")||~Xj.indexOf("Trident/");var Lt="classic",k6="duotone",kr="sharp",Nr="sharp-duotone",gq=[Lt,k6,kr,Nr],yq={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}},Jj={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},bq=["kit"],_q=/fa(s|r|l|t|d|b|k|kd|ss|sr|sl|st|sds)?[\-\ ]/,xq=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,wq={"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"}},Oq={"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds"}},Sq={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}},Eq={classic:["fas","far","fal","fat"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds"]},Cq={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}},Pq={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}},N6={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},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"}},Tq=["solid","regular","light","thin","duotone","brands"],M6=[1,2,3,4,5,6,7,8,9,10],jq=M6.concat([11,12,13,14,15,16,17,18,19,20]),Vf={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},Aq=[...Object.keys(Eq),...Tq,"2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Vf.GROUP,Vf.SWAP_OPACITY,Vf.PRIMARY,Vf.SECONDARY].concat(M6.map(e=>"".concat(e,"x"))).concat(jq.map(e=>"w-".concat(e))),kq={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},Nq={kit:{"fa-kit":"fak"},"kit-duotone":{"fa-kit-duotone":"fakd"}},Mq={kit:{fak:"fa-kit"},"kit-duotone":{fakd:"fa-kit-duotone"}},eA={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}};const zo="___FONT_AWESOME___",mx=16,L6="fa",R6="svg-inline--fa",cl="data-fa-i2svg",vx="data-fa-pseudo-element",Lq="data-fa-pseudo-element-pending",eE="data-prefix",tE="data-icon",tA="fontawesome-i2svg",Rq="async",$q=["HTML","HEAD","STYLE","SCRIPT"],$6=(()=>{try{return!0}catch{return!1}})(),I6=[Lt,kr,Nr];function tp(e){return new Proxy(e,{get(t,n){return n in t?t[n]:t[Lt]}})}const D6={...N6};D6[Lt]={...N6[Lt],...Jj.kit,...Jj["kit-duotone"]};const Zs=tp(D6),gx={...Pq};gx[Lt]={...gx[Lt],...eA.kit,...eA["kit-duotone"]};const Kd=tp(gx),yx={...Cq};yx[Lt]={...yx[Lt],...Mq.kit};const Xs=tp(yx),bx={...Sq};bx[Lt]={...bx[Lt],...Nq.kit};const Iq=tp(bx),Dq=_q,F6="fa-layers-text",Fq=xq,Bq={...yq};tp(Bq);const Uq=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],f1=Vf,Hc=new Set;Object.keys(Kd[Lt]).map(Hc.add.bind(Hc));Object.keys(Kd[kr]).map(Hc.add.bind(Hc));Object.keys(Kd[Nr]).map(Hc.add.bind(Hc));const zq=[...bq,...Aq],cd=Ga.FontAwesomeConfig||{};function Vq(e){var t=At.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function Wq(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}At&&typeof At.querySelector=="function"&&[["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-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(t=>{let[n,r]=t;const i=Wq(Vq(n));i!=null&&(cd[r]=i)});const B6={styleDefault:"solid",familyDefault:"classic",cssPrefix:L6,replacementClass:R6,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};cd.familyPrefix&&(cd.cssPrefix=cd.familyPrefix);const Gc={...B6,...cd};Gc.autoReplaceSvg||(Gc.observeMutations=!1);const Ie={};Object.keys(B6).forEach(e=>{Object.defineProperty(Ie,e,{enumerable:!0,set:function(t){Gc[e]=t,ud.forEach(n=>n(Ie))},get:function(){return Gc[e]}})});Object.defineProperty(Ie,"familyPrefix",{enumerable:!0,set:function(e){Gc.cssPrefix=e,ud.forEach(t=>t(Ie))},get:function(){return Gc.cssPrefix}});Ga.FontAwesomeConfig=Ie;const ud=[];function Hq(e){return ud.push(e),()=>{ud.splice(ud.indexOf(e),1)}}const ca=mx,Ji={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Gq(e){if(!e||!Jo)return;const t=At.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;const n=At.head.childNodes;let r=null;for(let i=n.length-1;i>-1;i--){const o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}return At.head.insertBefore(t,r),e}const Kq="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function qd(){let e=12,t="";for(;e-- >0;)t+=Kq[Math.random()*62|0];return t}function Au(e){const t=[];for(let n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function nE(e){return e.classList?Au(e.classList):(e.getAttribute("class")||"").split(" ").filter(t=>t)}function U6(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function qq(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,'="').concat(U6(e[n]),'" '),"").trim()}function Xy(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,": ").concat(e[n].trim(),";"),"")}function rE(e){return e.size!==Ji.size||e.x!==Ji.x||e.y!==Ji.y||e.rotate!==Ji.rotate||e.flipX||e.flipY}function Yq(e){let{transform:t,containerWidth:n,iconWidth:r}=e;const i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(a," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function Zq(e){let{transform:t,width:n=mx,height:r=mx,startCentered:i=!1}=e,o="";return i&&A6?o+="translate(".concat(t.x/ca-n/2,"em, ").concat(t.y/ca-r/2,"em) "):i?o+="translate(calc(-50% + ".concat(t.x/ca,"em), calc(-50% + ").concat(t.y/ca,"em)) "):o+="translate(".concat(t.x/ca,"em, ").concat(t.y/ca,"em) "),o+="scale(".concat(t.size/ca*(t.flipX?-1:1),", ").concat(t.size/ca*(t.flipY?-1:1),") "),o+="rotate(".concat(t.rotate,"deg) "),o}var Xq=`:root, :host { --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free"; --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free"; --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro"; --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro"; --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone"; } svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { overflow: visible; box-sizing: content-box; } .svg-inline--fa { display: var(--fa-display, inline-block); height: 1em; overflow: visible; vertical-align: -0.125em; } .svg-inline--fa.fa-2xs { vertical-align: 0.1em; } .svg-inline--fa.fa-xs { vertical-align: 0em; } .svg-inline--fa.fa-sm { vertical-align: -0.0714285705em; } .svg-inline--fa.fa-lg { vertical-align: -0.2em; } .svg-inline--fa.fa-xl { vertical-align: -0.25em; } .svg-inline--fa.fa-2xl { vertical-align: -0.3125em; } .svg-inline--fa.fa-pull-left { margin-right: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-pull-right { margin-left: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-li { width: var(--fa-li-width, 2em); top: 0.25em; } .svg-inline--fa.fa-fw { width: var(--fa-fw-width, 1.25em); } .fa-layers svg.svg-inline--fa { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; } .fa-layers-counter, .fa-layers-text { display: inline-block; position: absolute; text-align: center; } .fa-layers { display: inline-block; height: 1em; position: relative; text-align: center; vertical-align: -0.125em; width: 1em; } .fa-layers svg.svg-inline--fa { 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: 0.625em; line-height: 0.1em; vertical-align: 0.225em; } .fa-xs { font-size: 0.75em; line-height: 0.0833333337em; vertical-align: 0.125em; } .fa-sm { font-size: 0.875em; line-height: 0.0714285718em; vertical-align: 0.0535714295em; } .fa-lg { font-size: 1.25em; line-height: 0.05em; vertical-align: -0.075em; } .fa-xl { font-size: 1.5em; line-height: 0.0416666682em; vertical-align: -0.125em; } .fa-2xl { font-size: 2em; line-height: 0.03125em; vertical-align: -0.1875em; } .fa-fw { text-align: center; width: 1.25em; } .fa-ul { list-style-type: none; margin-left: var(--fa-li-margin, 2.5em); padding-left: 0; } .fa-ul > li { position: relative; } .fa-li { left: calc(-1 * var(--fa-li-width, 2em)); position: absolute; text-align: center; width: var(--fa-li-width, 2em); line-height: inherit; } .fa-border { border-color: var(--fa-border-color, #eee); border-radius: var(--fa-border-radius, 0.1em); border-style: var(--fa-border-style, solid); border-width: var(--fa-border-width, 0.08em); padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); } .fa-pull-left { float: left; margin-right: var(--fa-pull-margin, 0.3em); } .fa-pull-right { float: right; margin-left: var(--fa-pull-margin, 0.3em); } .fa-beat { 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-delay: -1ms; animation-duration: 1ms; animation-iteration-count: 1; transition-delay: 0s; transition-duration: 0s; } } @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)); } .fa-stack { display: inline-block; vertical-align: middle; height: 2em; position: relative; width: 2.5em; } .fa-stack-1x, .fa-stack-2x { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; z-index: var(--fa-stack-z-index, auto); } .svg-inline--fa.fa-stack-1x { height: 1em; width: 1.25em; } .svg-inline--fa.fa-stack-2x { height: 2em; width: 2.5em; } .fa-inverse { color: var(--fa-inverse, #fff); } .sr-only, .fa-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .sr-only-focusable:not(:focus), .fa-sr-only-focusable:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .svg-inline--fa .fa-primary { fill: var(--fa-primary-color, currentColor); opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa .fa-secondary { fill: var(--fa-secondary-color, currentColor); opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-primary { opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-secondary { opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa mask .fa-primary, .svg-inline--fa mask .fa-secondary { fill: black; } .fad.fa-inverse, .fa-duotone.fa-inverse { color: var(--fa-inverse, #fff); }`;function z6(){const e=L6,t=R6,n=Ie.cssPrefix,r=Ie.replacementClass;let i=Xq;if(n!==e||r!==t){const o=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return i}let nA=!1;function d1(){Ie.autoAddCss&&!nA&&(Gq(z6()),nA=!0)}var Qq={mixout(){return{dom:{css:z6,insertCss:d1}}},hooks(){return{beforeDOMElementCreation(){d1()},beforeI2svg(){d1()}}}};const Vo=Ga||{};Vo[zo]||(Vo[zo]={});Vo[zo].styles||(Vo[zo].styles={});Vo[zo].hooks||(Vo[zo].hooks={});Vo[zo].shims||(Vo[zo].shims=[]);var eo=Vo[zo];const V6=[],W6=function(){At.removeEventListener("DOMContentLoaded",W6),zv=1,V6.map(e=>e())};let zv=!1;Jo&&(zv=(At.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(At.readyState),zv||At.addEventListener("DOMContentLoaded",W6));function Jq(e){Jo&&(zv?setTimeout(e,0):V6.push(e))}function np(e){const{tag:t,attributes:n={},children:r=[]}=e;return typeof e=="string"?U6(e):"<".concat(t," ").concat(qq(n),">").concat(r.map(np).join(""),"")}function rA(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var h1=function(t,n,r,i){var o=Object.keys(t),a=o.length,s=n,l,c,f;for(r===void 0?(l=1,f=t[o[0]]):(l=0,f=r);l=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function iA(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return!!r.icon?t[r.iconName]=r.icon:t[n]=r,t},{})}function xx(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{skipHooks:r=!1}=n,i=iA(t);typeof eo.hooks.addPack=="function"&&!r?eo.hooks.addPack(e,iA(t)):eo.styles[e]={...eo.styles[e]||{},...i},e==="fas"&&xx("fa",t)}const{styles:$s,shims:nY}=eo,rY={[Lt]:Object.values(Xs[Lt]),[kr]:Object.values(Xs[kr]),[Nr]:Object.values(Xs[Nr])};let iE=null,H6={},G6={},K6={},q6={},Y6={};const iY={[Lt]:Object.keys(Zs[Lt]),[kr]:Object.keys(Zs[kr]),[Nr]:Object.keys(Zs[Nr])};function oY(e){return~zq.indexOf(e)}function aY(e,t){const n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!oY(i)?i:null}const Z6=()=>{const e=r=>h1($s,(i,o,a)=>(i[a]=h1(o,r,{}),i),{});H6=e((r,i,o)=>(i[3]&&(r[i[3]]=o),i[2]&&i[2].filter(s=>typeof s=="number").forEach(s=>{r[s.toString(16)]=o}),r)),G6=e((r,i,o)=>(r[o]=o,i[2]&&i[2].filter(s=>typeof s=="string").forEach(s=>{r[s]=o}),r)),Y6=e((r,i,o)=>{const a=i[2];return r[o]=o,a.forEach(s=>{r[s]=o}),r});const t="far"in $s||Ie.autoFetchSvg,n=h1(nY,(r,i)=>{const o=i[0];let a=i[1];const s=i[2];return a==="far"&&!t&&(a="fas"),typeof o=="string"&&(r.names[o]={prefix:a,iconName:s}),typeof o=="number"&&(r.unicodes[o.toString(16)]={prefix:a,iconName:s}),r},{names:{},unicodes:{}});K6=n.names,q6=n.unicodes,iE=Qy(Ie.styleDefault,{family:Ie.familyDefault})};Hq(e=>{iE=Qy(e.styleDefault,{family:Ie.familyDefault})});Z6();function oE(e,t){return(H6[e]||{})[t]}function sY(e,t){return(G6[e]||{})[t]}function Ca(e,t){return(Y6[e]||{})[t]}function X6(e){return K6[e]||{prefix:null,iconName:null}}function lY(e){const t=q6[e],n=oE("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Ka(){return iE}const aE=()=>({prefix:null,iconName:null,rest:[]});function Qy(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{family:n=Lt}=t,r=Zs[n][e],i=Kd[n][e]||Kd[n][r],o=e in eo.styles?e:null;return i||o||null}const cY={[Lt]:Object.keys(Xs[Lt]),[kr]:Object.keys(Xs[kr]),[Nr]:Object.keys(Xs[Nr])};function Jy(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{skipLookups:n=!1}=t,r={[Lt]:"".concat(Ie.cssPrefix,"-").concat(Lt),[kr]:"".concat(Ie.cssPrefix,"-").concat(kr),[Nr]:"".concat(Ie.cssPrefix,"-").concat(Nr)};let i=null,o=Lt;const a=gq.filter(l=>l!==k6);a.forEach(l=>{(e.includes(r[l])||e.some(c=>cY[l].includes(c)))&&(o=l)});const s=e.reduce((l,c)=>{const f=aY(Ie.cssPrefix,c);if($s[c]?(c=rY[o].includes(c)?Iq[o][c]:c,i=c,l.prefix=c):iY[o].indexOf(c)>-1?(i=c,l.prefix=Qy(c,{family:o})):f?l.iconName=f:c!==Ie.replacementClass&&!a.some(d=>c===r[d])&&l.rest.push(c),!n&&l.prefix&&l.iconName){const d=i==="fa"?X6(l.iconName):{},p=Ca(l.prefix,l.iconName);d.prefix&&(i=null),l.iconName=d.iconName||p||l.iconName,l.prefix=d.prefix||l.prefix,l.prefix==="far"&&!$s.far&&$s.fas&&!Ie.autoFetchSvg&&(l.prefix="fas")}return l},aE());return(e.includes("fa-brands")||e.includes("fab"))&&(s.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(s.prefix="fad"),!s.prefix&&o===kr&&($s.fass||Ie.autoFetchSvg)&&(s.prefix="fass",s.iconName=Ca(s.prefix,s.iconName)||s.iconName),!s.prefix&&o===Nr&&($s.fasds||Ie.autoFetchSvg)&&(s.prefix="fasds",s.iconName=Ca(s.prefix,s.iconName)||s.iconName),(s.prefix==="fa"||i==="fa")&&(s.prefix=Ka()||"fas"),s}class uY{constructor(){this.definitions={}}add(){for(var t=arguments.length,n=new Array(t),r=0;r{this.definitions[o]={...this.definitions[o]||{},...i[o]},xx(o,i[o]);const a=Xs[Lt][o];a&&xx(a,i[o]),Z6()})}reset(){this.definitions={}}_pullDefinitions(t,n){const r=n.prefix&&n.iconName&&n.icon?{0:n}:n;return Object.keys(r).map(i=>{const{prefix:o,iconName:a,icon:s}=r[i],l=s[2];t[o]||(t[o]={}),l.length>0&&l.forEach(c=>{typeof c=="string"&&(t[o][c]=s)}),t[o][a]=s}),t}}let oA=[],yc={};const Nc={},fY=Object.keys(Nc);function dY(e,t){let{mixoutsTo:n}=t;return oA=e,yc={},Object.keys(Nc).forEach(r=>{fY.indexOf(r)===-1&&delete Nc[r]}),oA.forEach(r=>{const i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(o=>{typeof i[o]=="function"&&(n[o]=i[o]),typeof i[o]=="object"&&Object.keys(i[o]).forEach(a=>{n[o]||(n[o]={}),n[o][a]=i[o][a]})}),r.hooks){const o=r.hooks();Object.keys(o).forEach(a=>{yc[a]||(yc[a]=[]),yc[a].push(o[a])})}r.provides&&r.provides(Nc)}),n}function wx(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i{t=a.apply(null,[t,...r])}),t}function ul(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{o.apply(null,n)})}function qa(){const e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Nc[e]?Nc[e].apply(null,t):void 0}function Ox(e){e.prefix==="fa"&&(e.prefix="fas");let{iconName:t}=e;const n=e.prefix||Ka();if(t)return t=Ca(n,t)||t,rA(Q6.definitions,n,t)||rA(eo.styles,n,t)}const Q6=new uY,hY=()=>{Ie.autoReplaceSvg=!1,Ie.observeMutations=!1,ul("noAuto")},pY={i2svg:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Jo?(ul("beforeI2svg",e),qa("pseudoElements2svg",e),qa("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t}=e;Ie.autoReplaceSvg===!1&&(Ie.autoReplaceSvg=!0),Ie.observeMutations=!0,Jq(()=>{vY({autoReplaceSvgRoot:t}),ul("watch",e)})}},mY={icon:e=>{if(e===null)return null;if(typeof e=="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Ca(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){const t=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],n=Qy(e[0]);return{prefix:n,iconName:Ca(n,t)||t}}if(typeof e=="string"&&(e.indexOf("".concat(Ie.cssPrefix,"-"))>-1||e.match(Dq))){const t=Jy(e.split(" "),{skipLookups:!0});return{prefix:t.prefix||Ka(),iconName:Ca(t.prefix,t.iconName)||t.iconName}}if(typeof e=="string"){const t=Ka();return{prefix:t,iconName:Ca(t,e)||e}}}},Br={noAuto:hY,config:Ie,dom:pY,parse:mY,library:Q6,findIconDefinition:Ox,toHtml:np},vY=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t=At}=e;(Object.keys(eo.styles).length>0||Ie.autoFetchSvg)&&Jo&&Ie.autoReplaceSvg&&Br.dom.i2svg({node:t})};function e0(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(n=>np(n))}}),Object.defineProperty(e,"node",{get:function(){if(!Jo)return;const n=At.createElement("div");return n.innerHTML=e.html,n.children}}),e}function gY(e){let{children:t,main:n,mask:r,attributes:i,styles:o,transform:a}=e;if(rE(a)&&n.found&&!r.found){const{width:s,height:l}=n,c={x:s/l/2,y:.5};i.style=Xy({...o,"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")})}return[{tag:"svg",attributes:i,children:t}]}function yY(e){let{prefix:t,iconName:n,children:r,attributes:i,symbol:o}=e;const a=o===!0?"".concat(t,"-").concat(Ie.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:{...i,id:a},children:r}]}]}function sE(e){const{icons:{main:t,mask:n},prefix:r,iconName:i,transform:o,symbol:a,title:s,maskId:l,titleId:c,extra:f,watchable:d=!1}=e,{width:p,height:v}=n.found?n:t,g=r==="fak",y=[Ie.replacementClass,i?"".concat(Ie.cssPrefix,"-").concat(i):""].filter(E=>f.classes.indexOf(E)===-1).filter(E=>E!==""||!!E).concat(f.classes).join(" ");let x={children:[],attributes:{...f.attributes,"data-prefix":r,"data-icon":i,class:y,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(p," ").concat(v)}};const _=g&&!~f.classes.indexOf("fa-fw")?{width:"".concat(p/v*16*.0625,"em")}:{};d&&(x.attributes[cl]=""),s&&(x.children.push({tag:"title",attributes:{id:x.attributes["aria-labelledby"]||"title-".concat(c||qd())},children:[s]}),delete x.attributes.title);const b={...x,prefix:r,iconName:i,main:t,mask:n,maskId:l,transform:o,symbol:a,styles:{..._,...f.styles}},{children:w,attributes:S}=n.found&&t.found?qa("generateAbstractMask",b)||{children:[],attributes:{}}:qa("generateAbstractIcon",b)||{children:[],attributes:{}};return b.children=w,b.attributes=S,a?yY(b):gY(b)}function aA(e){const{content:t,width:n,height:r,transform:i,title:o,extra:a,watchable:s=!1}=e,l={...a.attributes,...o?{title:o}:{},class:a.classes.join(" ")};s&&(l[cl]="");const c={...a.styles};rE(i)&&(c.transform=Zq({transform:i,startCentered:!0,width:n,height:r}),c["-webkit-transform"]=c.transform);const f=Xy(c);f.length>0&&(l.style=f);const d=[];return d.push({tag:"span",attributes:l,children:[t]}),o&&d.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),d}function bY(e){const{content:t,title:n,extra:r}=e,i={...r.attributes,...n?{title:n}:{},class:r.classes.join(" ")},o=Xy(r.styles);o.length>0&&(i.style=o);const a=[];return a.push({tag:"span",attributes:i,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}const{styles:p1}=eo;function Sx(e){const t=e[0],n=e[1],[r]=e.slice(4);let i=null;return Array.isArray(r)?i={tag:"g",attributes:{class:"".concat(Ie.cssPrefix,"-").concat(f1.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Ie.cssPrefix,"-").concat(f1.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(Ie.cssPrefix,"-").concat(f1.PRIMARY),fill:"currentColor",d:r[1]}}]}:i={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:t,height:n,icon:i}}const _Y={found:!1,width:512,height:512};function xY(e,t){!$6&&!Ie.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Ex(e,t){let n=t;return t==="fa"&&Ie.styleDefault!==null&&(t=Ka()),new Promise((r,i)=>{if(n==="fa"){const o=X6(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&p1[t]&&p1[t][e]){const o=p1[t][e];return r(Sx(o))}xY(e,t),r({..._Y,icon:Ie.showMissingIcons&&e?qa("missingIconAbstract")||{}:{}})})}const sA=()=>{},Cx=Ie.measurePerformance&&dm&&dm.mark&&dm.measure?dm:{mark:sA,measure:sA},Wf='FA "6.6.0"',wY=e=>(Cx.mark("".concat(Wf," ").concat(e," begins")),()=>J6(e)),J6=e=>{Cx.mark("".concat(Wf," ").concat(e," ends")),Cx.measure("".concat(Wf," ").concat(e),"".concat(Wf," ").concat(e," begins"),"".concat(Wf," ").concat(e," ends"))};var lE={begin:wY,end:J6};const Jm=()=>{};function lA(e){return typeof(e.getAttribute?e.getAttribute(cl):null)=="string"}function OY(e){const t=e.getAttribute?e.getAttribute(eE):null,n=e.getAttribute?e.getAttribute(tE):null;return t&&n}function SY(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Ie.replacementClass)}function EY(){return Ie.autoReplaceSvg===!0?ev.replace:ev[Ie.autoReplaceSvg]||ev.replace}function CY(e){return At.createElementNS("http://www.w3.org/2000/svg",e)}function PY(e){return At.createElement(e)}function eI(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{ceFn:n=e.tag==="svg"?CY:PY}=t;if(typeof e=="string")return At.createTextNode(e);const r=n(e.tag);return Object.keys(e.attributes||[]).forEach(function(o){r.setAttribute(o,e.attributes[o])}),(e.children||[]).forEach(function(o){r.appendChild(eI(o,{ceFn:n}))}),r}function TY(e){let t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}const ev={replace:function(e){const t=e[0];if(t.parentNode)if(e[1].forEach(n=>{t.parentNode.insertBefore(eI(n),t)}),t.getAttribute(cl)===null&&Ie.keepOriginalSource){let n=At.createComment(TY(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){const t=e[0],n=e[1];if(~nE(t).indexOf(Ie.replacementClass))return ev.replace(e);const r=new RegExp("".concat(Ie.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){const o=n[0].attributes.class.split(" ").reduce((a,s)=>(s===Ie.replacementClass||s.match(r)?a.toSvg.push(s):a.toNode.push(s),a),{toNode:[],toSvg:[]});n[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?t.removeAttribute("class"):t.setAttribute("class",o.toNode.join(" "))}const i=n.map(o=>np(o)).join(` `);t.setAttribute(cl,""),t.innerHTML=i}};function cA(e){e()}function tI(e,t){const n=typeof t=="function"?t:Jm;if(e.length===0)n();else{let r=cA;Ie.mutateApproach===Rq&&(r=Ga.requestAnimationFrame||cA),r(()=>{const i=EY(),o=lE.begin("mutate");e.map(i),o(),n()})}}let cE=!1;function nI(){cE=!0}function Px(){cE=!1}let Vv=null;function uA(e){if(!Qj||!Ie.observeMutations)return;const{treeCallback:t=Jm,nodeCallback:n=Jm,pseudoElementsCallback:r=Jm,observeMutationsRoot:i=At}=e;Vv=new Qj(o=>{if(cE)return;const a=Ka();Au(o).forEach(s=>{if(s.type==="childList"&&s.addedNodes.length>0&&!lA(s.addedNodes[0])&&(Ie.searchPseudoElements&&r(s.target),t(s.target)),s.type==="attributes"&&s.target.parentNode&&Ie.searchPseudoElements&&r(s.target.parentNode),s.type==="attributes"&&lA(s.target)&&~Uq.indexOf(s.attributeName))if(s.attributeName==="class"&&OY(s.target)){const{prefix:l,iconName:c}=Jy(nE(s.target));s.target.setAttribute(eE,l||a),c&&s.target.setAttribute(tE,c)}else SY(s.target)&&n(s.target)})}),Jo&&Vv.observe(i,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function jY(){Vv&&Vv.disconnect()}function AY(e){const t=e.getAttribute("style");let n=[];return t&&(n=t.split(";").reduce((r,i)=>{const o=i.split(":"),a=o[0],s=o.slice(1);return a&&s.length>0&&(r[a]=s.join(":").trim()),r},{})),n}function kY(e){const t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"";let i=Jy(nE(e));return i.prefix||(i.prefix=Ka()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=sY(i.prefix,e.innerText)||oE(i.prefix,_x(e.innerText))),!i.iconName&&Ie.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function NY(e){const t=Au(e.attributes).reduce((i,o)=>(i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i),{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return Ie.autoA11y&&(n?t["aria-labelledby"]="".concat(Ie.replacementClass,"-title-").concat(r||qd()):(t["aria-hidden"]="true",t.focusable="false")),t}function MY(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Ji,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function fA(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0};const{iconName:n,prefix:r,rest:i}=kY(e),o=NY(e),a=wx("parseNodeAttributes",{},e);let s=t.styleParser?AY(e):[];return{iconName:n,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:r,transform:Ji,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:i,styles:s,attributes:o},...a}}const{styles:LY}=eo;function rI(e){const t=Ie.autoReplaceSvg==="nest"?fA(e,{styleParser:!1}):fA(e);return~t.extra.classes.indexOf(F6)?qa("generateLayersText",e,t):qa("generateSvgReplacementMutation",e,t)}let fo=new Set;I6.map(e=>{fo.add("fa-".concat(e))});Object.keys(Zs[Lt]).map(fo.add.bind(fo));Object.keys(Zs[kr]).map(fo.add.bind(fo));Object.keys(Zs[Nr]).map(fo.add.bind(fo));fo=[...fo];function dA(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Jo)return Promise.resolve();const n=At.documentElement.classList,r=f=>n.add("".concat(tA,"-").concat(f)),i=f=>n.remove("".concat(tA,"-").concat(f)),o=Ie.autoFetchSvg?fo:I6.map(f=>"fa-".concat(f)).concat(Object.keys(LY));o.includes("fa")||o.push("fa");const a=[".".concat(F6,":not([").concat(cl,"])")].concat(o.map(f=>".".concat(f,":not([").concat(cl,"])"))).join(", ");if(a.length===0)return Promise.resolve();let s=[];try{s=Au(e.querySelectorAll(a))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();const l=lE.begin("onTree"),c=s.reduce((f,d)=>{try{const p=rI(d);p&&f.push(p)}catch(p){$6||p.name==="MissingIcon"&&console.error(p)}return f},[]);return new Promise((f,d)=>{Promise.all(c).then(p=>{tI(p,()=>{r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),f()})}).catch(p=>{l(),d(p)})})}function RY(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;rI(e).then(n=>{n&&tI([n],t)})}function $Y(e){return function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=(t||{}).icon?t:Ox(t||{});let{mask:i}=n;return i&&(i=(i||{}).icon?i:Ox(i||{})),e(r,{...n,mask:i})}}const IY=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=Ji,symbol:r=!1,mask:i=null,maskId:o=null,title:a=null,titleId:s=null,classes:l=[],attributes:c={},styles:f={}}=t;if(!e)return;const{prefix:d,iconName:p,icon:v}=e;return e0({type:"icon",...e},()=>(ul("beforeDOMElementCreation",{iconDefinition:e,params:t}),Ie.autoA11y&&(a?c["aria-labelledby"]="".concat(Ie.replacementClass,"-title-").concat(s||qd()):(c["aria-hidden"]="true",c.focusable="false")),sE({icons:{main:Sx(v),mask:i?Sx(i.icon):{found:!1,width:null,height:null,icon:{}}},prefix:d,iconName:p,transform:{...Ji,...n},symbol:r,title:a,maskId:o,titleId:s,extra:{attributes:c,styles:f,classes:l}})))};var DY={mixout(){return{icon:$Y(IY)}},hooks(){return{mutationObserverCallbacks(e){return e.treeCallback=dA,e.nodeCallback=RY,e}}},provides(e){e.i2svg=function(t){const{node:n=At,callback:r=()=>{}}=t;return dA(n,r)},e.generateSvgReplacementMutation=function(t,n){const{iconName:r,title:i,titleId:o,prefix:a,transform:s,symbol:l,mask:c,maskId:f,extra:d}=n;return new Promise((p,v)=>{Promise.all([Ex(r,a),c.iconName?Ex(c.iconName,c.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(g=>{let[y,x]=g;p([t,sE({icons:{main:y,mask:x},prefix:a,iconName:r,transform:s,symbol:l,maskId:f,title:i,titleId:o,extra:d,watchable:!0})])}).catch(v)})},e.generateAbstractIcon=function(t){let{children:n,attributes:r,main:i,transform:o,styles:a}=t;const s=Xy(a);s.length>0&&(r.style=s);let l;return rE(o)&&(l=qa("generateAbstractTransformGrouping",{main:i,transform:o,containerWidth:i.width,iconWidth:i.width})),n.push(l||i.icon),{children:n,attributes:r}}}},FY={mixout(){return{layer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{classes:n=[]}=t;return e0({type:"layer"},()=>{ul("beforeDOMElementCreation",{assembler:e,params:t});let r=[];return e(i=>{Array.isArray(i)?i.map(o=>{r=r.concat(o.abstract)}):r=r.concat(i.abstract)}),[{tag:"span",attributes:{class:["".concat(Ie.cssPrefix,"-layers"),...n].join(" ")},children:r}]})}}}},BY={mixout(){return{counter(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{title:n=null,classes:r=[],attributes:i={},styles:o={}}=t;return e0({type:"counter",content:e},()=>(ul("beforeDOMElementCreation",{content:e,params:t}),bY({content:e.toString(),title:n,extra:{attributes:i,styles:o,classes:["".concat(Ie.cssPrefix,"-layers-counter"),...r]}})))}}}},UY={mixout(){return{text(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=Ji,title:r=null,classes:i=[],attributes:o={},styles:a={}}=t;return e0({type:"text",content:e},()=>(ul("beforeDOMElementCreation",{content:e,params:t}),aA({content:e,transform:{...Ji,...n},title:r,extra:{attributes:o,styles:a,classes:["".concat(Ie.cssPrefix,"-layers-text"),...i]}})))}}},provides(e){e.generateLayersText=function(t,n){const{title:r,transform:i,extra:o}=n;let a=null,s=null;if(A6){const l=parseInt(getComputedStyle(t).fontSize,10),c=t.getBoundingClientRect();a=c.width/l,s=c.height/l}return Ie.autoA11y&&!r&&(o.attributes["aria-hidden"]="true"),Promise.resolve([t,aA({content:t.innerHTML,width:a,height:s,transform:i,title:r,extra:o,watchable:!0})])}}};const zY=new RegExp('"',"ug"),hA=[1105920,1112319],pA={FontAwesome:{normal:"fas",400:"fas"},...Oq,...wq,...kq},Tx=Object.keys(pA).reduce((e,t)=>(e[t.toLowerCase()]=pA[t],e),{}),VY=Object.keys(Tx).reduce((e,t)=>{const n=Tx[t];return e[t]=n[900]||[...Object.entries(n)][0][1],e},{});function WY(e){const t=e.replace(zY,""),n=tY(t,0),r=n>=hA[0]&&n<=hA[1],i=t.length===2?t[0]===t[1]:!1;return{value:_x(i?t[0]:t),isSecondary:r||i}}function HY(e,t){const n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),i=isNaN(r)?"normal":r;return(Tx[n]||{})[i]||VY[n]}function mA(e,t){const n="".concat(Lq).concat(t.replace(":","-"));return new Promise((r,i)=>{if(e.getAttribute(n)!==null)return r();const a=Au(e.children).filter(p=>p.getAttribute(vx)===t)[0],s=Ga.getComputedStyle(e,t),l=s.getPropertyValue("font-family"),c=l.match(Fq),f=s.getPropertyValue("font-weight"),d=s.getPropertyValue("content");if(a&&!c)return e.removeChild(a),r();if(c&&d!=="none"&&d!==""){const p=s.getPropertyValue("content");let v=HY(l,f);const{value:g,isSecondary:y}=WY(p),x=c[0].startsWith("FontAwesome");let _=oE(v,g),b=_;if(x){const w=lY(g);w.iconName&&w.prefix&&(_=w.iconName,v=w.prefix)}if(_&&!y&&(!a||a.getAttribute(eE)!==v||a.getAttribute(tE)!==b)){e.setAttribute(n,b),a&&e.removeChild(a);const w=MY(),{extra:S}=w;S.attributes[vx]=t,Ex(_,v).then(E=>{const C=sE({...w,icons:{main:E,mask:aE()},prefix:v,iconName:b,extra:S,watchable:!0}),T=At.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(T,e.firstChild):e.appendChild(T),T.outerHTML=C.map(A=>np(A)).join(` `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function GY(e){return Promise.all([mA(e,"::before"),mA(e,"::after")])}function KY(e){return e.parentNode!==document.head&&!~$q.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(vx)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function vA(e){if(Jo)return new Promise((t,n)=>{const r=Au(e.querySelectorAll("*")).filter(KY).map(GY),i=lE.begin("searchPseudoElements");nI(),Promise.all(r).then(()=>{i(),Px(),t()}).catch(()=>{i(),Px(),n()})})}var qY={hooks(){return{mutationObserverCallbacks(e){return e.pseudoElementsCallback=vA,e}}},provides(e){e.pseudoElements2svg=function(t){const{node:n=At}=t;Ie.searchPseudoElements&&vA(n)}}};let gA=!1;var YY={mixout(){return{dom:{unwatch(){nI(),gA=!0}}}},hooks(){return{bootstrap(){uA(wx("mutationObserverCallbacks",{}))},noAuto(){jY()},watch(e){const{observeMutationsRoot:t}=e;gA?Px():uA(wx("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}};const yA=e=>{let t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce((n,r)=>{const i=r.toLowerCase().split("-"),o=i[0];let a=i.slice(1).join("-");if(o&&a==="h")return n.flipX=!0,n;if(o&&a==="v")return n.flipY=!0,n;if(a=parseFloat(a),isNaN(a))return n;switch(o){case"grow":n.size=n.size+a;break;case"shrink":n.size=n.size-a;break;case"left":n.x=n.x-a;break;case"right":n.x=n.x+a;break;case"up":n.y=n.y-a;break;case"down":n.y=n.y+a;break;case"rotate":n.rotate=n.rotate+a;break}return n},t)};var ZY={mixout(){return{parse:{transform:e=>yA(e)}}},hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-transform");return n&&(e.transform=yA(n)),e}}},provides(e){e.generateAbstractTransformGrouping=function(t){let{main:n,transform:r,containerWidth:i,iconWidth:o}=t;const a={transform:"translate(".concat(i/2," 256)")},s="translate(".concat(r.x*32,", ").concat(r.y*32,") "),l="scale(".concat(r.size/16*(r.flipX?-1:1),", ").concat(r.size/16*(r.flipY?-1:1),") "),c="rotate(".concat(r.rotate," 0 0)"),f={transform:"".concat(s," ").concat(l," ").concat(c)},d={transform:"translate(".concat(o/2*-1," -256)")},p={outer:a,inner:f,path:d};return{tag:"g",attributes:{...p.outer},children:[{tag:"g",attributes:{...p.inner},children:[{tag:n.icon.tag,children:n.icon.children,attributes:{...n.icon.attributes,...p.path}}]}]}}}};const m1={x:0,y:0,width:"100%",height:"100%"};function bA(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function XY(e){return e.tag==="g"?e.children:[e]}var QY={hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-mask"),r=n?Jy(n.split(" ").map(i=>i.trim())):aE();return r.prefix||(r.prefix=Ka()),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides(e){e.generateAbstractMask=function(t){let{children:n,attributes:r,main:i,mask:o,maskId:a,transform:s}=t;const{width:l,icon:c}=i,{width:f,icon:d}=o,p=Yq({transform:s,containerWidth:f,iconWidth:l}),v={tag:"rect",attributes:{...m1,fill:"white"}},g=c.children?{children:c.children.map(bA)}:{},y={tag:"g",attributes:{...p.inner},children:[bA({tag:c.tag,attributes:{...c.attributes,...p.path},...g})]},x={tag:"g",attributes:{...p.outer},children:[y]},_="mask-".concat(a||qd()),b="clip-".concat(a||qd()),w={tag:"mask",attributes:{...m1,id:_,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"},children:[v,x]},S={tag:"defs",children:[{tag:"clipPath",attributes:{id:b},children:XY(d)},w]};return n.push(S,{tag:"rect",attributes:{fill:"currentColor","clip-path":"url(#".concat(b,")"),mask:"url(#".concat(_,")"),...m1}}),{children:n,attributes:r}}}},JY={provides(e){let t=!1;Ga.matchMedia&&(t=Ga.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){const n=[],r={fill:"currentColor"},i={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};n.push({tag:"path",attributes:{...r,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"}});const o={...i,attributeName:"opacity"},a={tag:"circle",attributes:{...r,cx:"256",cy:"364",r:"28"},children:[]};return t||a.children.push({tag:"animate",attributes:{...i,attributeName:"r",values:"28;14;28;28;14;28;"}},{tag:"animate",attributes:{...o,values:"1;0;1;1;0;1;"}}),n.push(a),n.push({tag:"path",attributes:{...r,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:t?[]:[{tag:"animate",attributes:{...o,values:"1;0;0;0;0;1;"}}]}),t||n.push({tag:"path",attributes:{...r,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:{...o,values:"0;0;1;1;0;0;"}}]}),{tag:"g",attributes:{class:"missing"},children:n}}}},eZ={hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-symbol"),r=n===null?!1:n===""?!0:n;return e.symbol=r,e}}}},tZ=[Qq,DY,FY,BY,UY,qY,YY,ZY,QY,JY,eZ];dY(tZ,{mixoutsTo:Br});Br.noAuto;Br.config;Br.library;Br.dom;const jx=Br.parse;Br.findIconDefinition;Br.toHtml;const nZ=Br.icon;Br.layer;Br.text;Br.counter;var iI={exports:{}},rZ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",iZ=rZ,oZ=iZ;function oI(){}function aI(){}aI.resetWarningCache=oI;var aZ=function(){function e(r,i,o,a,s,l){if(l!==oZ){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:aI,resetWarningCache:oI};return n.PropTypes=n,n};iI.exports=aZ();var sZ=iI.exports;const $=at(sZ);function _A(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 Xi(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function cZ(e,t){if(e==null)return{};var n=lZ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ax(e){return uZ(e)||fZ(e)||dZ(e)||hZ()}function uZ(e){if(Array.isArray(e))return kx(e)}function fZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dZ(e,t){if(e){if(typeof e=="string")return kx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kx(e,t)}}function kx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return lI(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var f=t.attributes[c];switch(c){case"class":l.attrs.className=f,delete t.attributes.class;break;case"style":l.attrs.style=yZ(f);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=f:l.attrs[sI(c)]=f}return l},{attrs:{}}),o=n.style,a=o===void 0?{}:o,s=cZ(n,vZ);return i.attrs.style=Xi(Xi({},i.attrs.style),a),e.apply(void 0,[t.tag,Xi(Xi({},i.attrs),s)].concat(Ax(r)))}var cI=!1;try{cI=!0}catch{}function bZ(){if(!cI&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function xA(e){if(e&&Wv(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(jx.icon)return jx.icon(e);if(e===null)return null;if(e&&Wv(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function v1(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?bc({},e,t):{}}var wA={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1},je=V.forwardRef(function(e,t){var n=Xi(Xi({},wA),e),r=n.icon,i=n.mask,o=n.symbol,a=n.className,s=n.title,l=n.titleId,c=n.maskId,f=xA(r),d=v1("classes",[].concat(Ax(pZ(n)),Ax((a||"").split(" ")))),p=v1("transform",typeof n.transform=="string"?jx.transform(n.transform):n.transform),v=v1("mask",xA(i)),g=nZ(f,Xi(Xi(Xi(Xi({},d),p),v),{},{symbol:o,title:s,titleId:l,maskId:c}));if(!g)return bZ("Could not find icon",f),null;var y=g.abstract,x={ref:t};return Object.keys(n).forEach(function(_){wA.hasOwnProperty(_)||(x[_]=n[_])}),_Z(y[0],x)});je.displayName="FontAwesomeIcon";je.propTypes={beat:$.bool,border:$.bool,beatFade:$.bool,bounce:$.bool,className:$.string,fade:$.bool,flash:$.bool,mask:$.oneOfType([$.object,$.array,$.string]),maskId:$.string,fixedWidth:$.bool,inverse:$.bool,flip:$.oneOf([!0,!1,"horizontal","vertical","both"]),icon:$.oneOfType([$.object,$.array,$.string]),listItem:$.bool,pull:$.oneOf(["right","left"]),pulse:$.bool,rotation:$.oneOf([0,90,180,270]),shake:$.bool,size:$.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:$.bool,spinPulse:$.bool,spinReverse:$.bool,symbol:$.oneOfType([$.bool,$.string]),title:$.string,titleId:$.string,transform:$.oneOfType([$.string,$.object]),swapOpacity:$.bool};var _Z=lI.bind(null,V.createElement);function uI(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;t0?"".concat(e,"px"):null}function EZ(){return document.body.clientWidth0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:TZ;return t?e.split(" ").map(function(n){return t[n]||n}).join(" "):e}function is(e,t){var n={};return Object.keys(e).forEach(function(r){t.indexOf(r)===-1&&(n[r]=e[r])}),n}function hI(e,t){for(var n=Array.isArray(t)?t:[t],r=n.length,i,o={};r>0;)r-=1,i=n[r],o[i]=e[i];return o}var SA={};function Nx(e){SA[e]||(typeof console<"u"&&console.error(e),SA[e]=!0)}function pI(e,t){return function(r,i,o){r[i]!==null&&typeof r[i]<"u"&&Nx('"'.concat(i,'" property of "').concat(o,`" has been deprecated. `).concat(t));for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l"u"?"undefined":fl(window))==="object"&&window.Element||function(){};function uE(e,t,n){if(!(e[t]instanceof jZ))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var Kc=$.oneOfType([$.string,$.func,uE,$.shape({current:$.any})]),it=$.oneOfType([$.func,$.string,$.shape({$$typeof:$.symbol,render:$.func}),$.arrayOf($.oneOfType([$.func,$.string,$.shape({$$typeof:$.symbol,render:$.func})]))]),Hv={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},Gv=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],hm={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},ht={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},AZ=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],fE=!!(typeof window<"u"&&window.document&&window.document.createElement);function kZ(e){return e&&fl(e)==="object"?"current"in e:!1}function mI(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function Mx(e){var t=fl(e);return e!=null&&(t==="object"||t==="function")}function EA(e){var t=fl(e),n=NaN;if(t==="number")return e;if(t==="symbol"||t==="object"&&mI(e)==="[object Symbol]")return n;if(Mx(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=Mx(r)?"".concat(r):r}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");var i=/^0b[01]+$/i.test(e);return i||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),i?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function NZ(e){if(!Mx(e))return!1;var t=mI(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function MZ(e){if(kZ(e))return e.current;if(NZ(e))return e();if(typeof e=="string"&&fE){var t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll("#".concat(e))),!t.length)throw new Error("The target '".concat(e,"' could not be identified in the dom, tip: check spelling"));return t}return e}function CA(e){return e===null?!1:Array.isArray(e)||fE&&typeof e.length=="number"}function Yd(e,t){var n=MZ(e);return t?CA(n)?n:n===null?[]:[n]:CA(n)?n[0]:n}var LZ=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'];function dE(e,t){if(!e||!t)return t;var n=wZ({},t);return Object.keys(e).forEach(function(r){n[r]===void 0&&(n[r]=e[r]),Object.keys(e[r]||{}).length>0&&fl(e[r])==="object"&&dE(e[r],n)}),n}var RZ=["className","cssModule","noGutters","tag","widths"];function Lx(){return Lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IZ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var DZ=["xs","sm","md","lg","xl","xxl"],Vl=$.oneOfType([$.number,$.string]),FZ={tag:it,noGutters:pI($.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:$.string,cssModule:$.object,xs:Vl,sm:Vl,md:Vl,lg:Vl,xl:Vl,xxl:Vl,widths:$.array};function Kn(e){var t=e.className,n=e.cssModule,r=e.noGutters,i=e.tag,o=i===void 0?"div":i,a=e.widths,s=a===void 0?DZ:a,l=$Z(e,RZ),c=[];s.forEach(function(d,p){var v=e[d];if(delete l[d],!!v){var g=!p;c.push(g?"row-cols-".concat(v):"row-cols-".concat(d,"-").concat(v))}});var f=Be(He(t,r?"gx-0":null,"row",c),n);return V.createElement(o,Lx({},l,{className:f}))}Kn.propTypes=FZ;var BZ=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function Rx(){return Rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zZ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var VZ={children:$.node,className:$.string,color:$.string,container:$.oneOfType([$.bool,$.string]),cssModule:$.object,dark:$.bool,expand:$.oneOfType([$.bool,$.string]),fixed:$.string,light:$.bool,role:$.string,sticky:$.string,tag:it},WZ=function(t){return t===!1?!1:t===!0||t==="xs"?"navbar-expand":"navbar-expand-".concat(t)};function vI(e){var t,n=e.expand,r=n===void 0?!1:n,i=e.className,o=e.cssModule,a=e.light,s=e.dark,l=e.fixed,c=e.sticky,f=e.color,d=e.container,p=d===void 0?"fluid":d,v=e.tag,g=v===void 0?"nav":v,y=e.children,x=UZ(e,BZ),_=Be(He(i,"navbar",WZ(r),(t={"navbar-light":a,"navbar-dark":s},g1(t,"bg-".concat(f),f),g1(t,"fixed-".concat(l),l),g1(t,"sticky-".concat(c),c),t)),o),b=p&&p===!0?"container":"container-".concat(p);return V.createElement(g,Rx({},x,{className:_}),p?V.createElement("div",{className:b},y):y)}vI.propTypes=VZ;var HZ=["className","cssModule","tag"];function $x(){return $x=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KZ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var qZ={className:$.string,cssModule:$.object,tag:it};function gI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"a":r,o=GZ(e,HZ),a=Be(He(t,"navbar-brand"),n);return V.createElement(i,$x({},o,{className:a}))}gI.propTypes=qZ;var YZ=["className","cssModule","children","tag"];function Ix(){return Ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JZ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var eX={className:$.string,cssModule:$.object,tag:it,type:$.string,children:$.node};function yI(e){var t=e.className,n=e.cssModule,r=e.children,i=e.tag,o=i===void 0?"button":i,a=QZ(e,YZ),s=Be(He(t,"navbar-toggler"),n);return V.createElement(o,Ix({"aria-label":"Toggle navigation"},ZZ({type:"button"},a),{className:s}),r||V.createElement("span",{className:Be("navbar-toggler-icon",n)}))}yI.propTypes=eX;var tX=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var iX={card:$.bool,className:$.string,cssModule:$.object,fill:$.bool,horizontal:$.oneOf(["center","end"]),justified:$.bool,navbar:$.bool,pills:$.bool,tabs:$.bool,tag:it,vertical:$.oneOfType([$.bool,$.string])},oX=function(t){return t===!1?!1:t===!0||t==="xs"?"flex-column":"flex-".concat(t,"-column")};function hE(e){var t=e.className,n=e.cssModule,r=e.tabs,i=e.pills,o=e.vertical,a=o===void 0?!1:o,s=e.horizontal,l=e.justified,c=e.fill,f=e.navbar,d=e.card,p=e.tag,v=p===void 0?"ul":p,g=nX(e,tX),y=Be(He(t,f?"navbar-nav":"nav",s?"justify-content-".concat(s):!1,oX(a),{"nav-tabs":r,"card-header-tabs":d&&r,"nav-pills":i,"card-header-pills":d&&i,"nav-justified":l,"nav-fill":c}),n);return V.createElement(v,Dx({},g,{className:y}))}hE.propTypes=iX;var aX=["className","cssModule","active","tag"];function Fx(){return Fx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var cX={active:$.bool,className:$.string,cssModule:$.object,tag:it};function pE(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=i===void 0?"li":i,a=sX(e,aX),s=Be(He(t,"nav-item",r?"active":!1),n);return V.createElement(o,Fx({},a,{className:s}))}pE.propTypes=cX;function Bx(e){"@babel/helpers - typeof";return Bx=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},Bx(e)}var uX=["className","cssModule","active","tag","innerRef"];function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function hX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pX(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kv(e){return Kv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kv(e)}var _X={active:$.bool,className:$.string,cssModule:$.object,disabled:$.bool,href:$.any,innerRef:$.oneOfType([$.object,$.func,$.string]),onClick:$.func,tag:it},mE=function(e){vX(n,e);var t=gX(n);function n(r){var i;return hX(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(bI(i)),i}return mX(n,[{key:"onClick",value:function(i){if(this.props.disabled){i.preventDefault();return}this.props.href==="#"&&i.preventDefault(),this.props.onClick&&this.props.onClick(i)}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.active,l=i.tag,c=l===void 0?"a":l,f=i.innerRef,d=fX(i,uX),p=Be(He(o,"nav-link",{disabled:d.disabled,active:s}),a);return V.createElement(c,Ux({},d,{ref:f,onClick:this.onClick,className:p}))}}]),n}(V.Component);mE.propTypes=_X;var xX=["className","cssModule","variant","innerRef"];function Vx(){return Vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var CX={active:$.bool,"aria-label":$.string,onClick:$.func,variant:$.oneOf(["white"]),className:$.string,cssModule:$.object,innerRef:$.oneOfType([$.object,$.string,$.func])};function _I(e){var t=e.className;e.cssModule;var n=e.variant,r=e.innerRef,i=SX(e,xX),o=Be(He(t,"btn-close",n&&"btn-close-".concat(n)));return V.createElement("button",Vx({ref:r,type:"button",className:o},wX({"aria-label":"close"},i)))}_I.propTypes=CX;var PX=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function Wx(){return Wx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var AX={active:$.bool,"aria-label":$.string,block:$.bool,children:$.node,className:$.string,cssModule:$.object,close:$.bool,color:$.string,disabled:$.bool,innerRef:$.oneOfType([$.object,$.func,$.string]),onClick:$.func,outline:$.bool,size:$.string,tag:it};function qe(e){var t=R.useCallback(function(b){if(e.disabled){b.preventDefault();return}if(e.onClick)return e.onClick(b)},[e.onClick,e.disabled]),n=e.active,r=e["aria-label"],i=e.block,o=e.className,a=e.close,s=e.cssModule,l=e.color,c=l===void 0?"secondary":l,f=e.outline,d=e.size,p=e.tag,v=p===void 0?"button":p,g=e.innerRef,y=TX(e,PX);if(a)return V.createElement(_I,y);var x="btn".concat(f?"-outline":"","-").concat(c),_=Be(He(o,"btn",x,d?"btn-".concat(d):!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),s);return y.href&&v==="button"&&(v="a"),V.createElement(v,Wx({type:v==="button"&&y.onClick?"button":void 0},y,{className:_,ref:g,onClick:t,"aria-label":r}))}qe.propTypes=AX;var xI=R.createContext(),wI=R.createContext();function jA(e){var t=e.children,n=R.useState(null),r=n[0],i=n[1],o=R.useRef(!1);R.useEffect(function(){return function(){o.current=!0}},[]);var a=R.useCallback(function(s){o.current||i(s)},[]);return R.createElement(xI.Provider,{value:r},R.createElement(wI.Provider,{value:a},t))}var OI=function(t){return Array.isArray(t)?t[0]:t},SI=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u")return!1;var t=Rr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function VX(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ai(o)||!ho(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function WX(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!ai(i)||!ho(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const HX={name:"applyStyles",enabled:!0,phase:"write",fn:VX,effect:WX,requires:["computeStyles"]};function ao(e){return e.split("-")[0]}var Qs=Math.max,qv=Math.min,Yc=Math.round;function Gx(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function PI(){return!/^((?!chrome|android).)*safari/i.test(Gx())}function Zc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ai(e)&&(i=e.offsetWidth>0&&Yc(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Yc(r.height)/e.offsetHeight||1);var a=dl(e)?Rr(e):window,s=a.visualViewport,l=!PI()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,p=r.height/o;return{width:d,height:p,top:f,right:c+d,bottom:f+p,left:c,x:c,y:f}}function yE(e){var t=Zc(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function TI(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&gE(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Wo(e){return Rr(e).getComputedStyle(e)}function GX(e){return["table","td","th"].indexOf(ho(e))>=0}function os(e){return((dl(e)?e.ownerDocument:e.document)||window.document).documentElement}function t0(e){return ho(e)==="html"?e:e.assignedSlot||e.parentNode||(gE(e)?e.host:null)||os(e)}function MA(e){return!ai(e)||Wo(e).position==="fixed"?null:e.offsetParent}function KX(e){var t=/firefox/i.test(Gx()),n=/Trident/i.test(Gx());if(n&&ai(e)){var r=Wo(e);if(r.position==="fixed")return null}var i=t0(e);for(gE(i)&&(i=i.host);ai(i)&&["html","body"].indexOf(ho(i))<0;){var o=Wo(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function ip(e){for(var t=Rr(e),n=MA(e);n&&GX(n)&&Wo(n).position==="static";)n=MA(n);return n&&(ho(n)==="html"||ho(n)==="body"&&Wo(n).position==="static")?t:n||KX(e)||t}function bE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function fd(e,t,n){return Qs(e,qv(t,n))}function qX(e,t,n){var r=fd(e,t,n);return r>n?n:r}function jI(){return{top:0,right:0,bottom:0,left:0}}function AI(e){return Object.assign({},jI(),e)}function kI(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var YX=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,AI(typeof t!="number"?t:kI(t,rp))};function ZX(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=ao(n.placement),l=bE(s),c=[hr,fi].indexOf(s)>=0,f=c?"height":"width";if(!(!o||!a)){var d=YX(i.padding,n),p=yE(o),v=l==="y"?dr:hr,g=l==="y"?ui:fi,y=n.rects.reference[f]+n.rects.reference[l]-a[l]-n.rects.popper[f],x=a[l]-n.rects.reference[l],_=ip(o),b=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,w=y/2-x/2,S=d[v],E=b-p[f]-d[g],C=b/2-p[f]/2+w,T=fd(S,C,E),A=l;n.modifiersData[r]=(t={},t[A]=T,t.centerOffset=T-C,t)}}function XX(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||TI(t.elements.popper,i)&&(t.elements.arrow=i))}const QX={name:"arrow",enabled:!0,phase:"main",fn:ZX,effect:XX,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xc(e){return e.split("-")[1]}var JX={top:"auto",right:"auto",bottom:"auto",left:"auto"};function eQ(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Yc(n*i)/i||0,y:Yc(r*i)/i||0}}function LA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,d=e.isFixed,p=a.x,v=p===void 0?0:p,g=a.y,y=g===void 0?0:g,x=typeof f=="function"?f({x:v,y}):{x:v,y};v=x.x,y=x.y;var _=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),w=hr,S=dr,E=window;if(c){var C=ip(n),T="clientHeight",A="clientWidth";if(C===Rr(n)&&(C=os(n),Wo(C).position!=="static"&&s==="absolute"&&(T="scrollHeight",A="scrollWidth")),C=C,i===dr||(i===hr||i===fi)&&o===Zd){S=ui;var D=d&&C===E&&E.visualViewport?E.visualViewport.height:C[T];y-=D-r.height,y*=l?1:-1}if(i===hr||(i===dr||i===ui)&&o===Zd){w=fi;var N=d&&C===E&&E.visualViewport?E.visualViewport.width:C[A];v-=N-r.width,v*=l?1:-1}}var I=Object.assign({position:s},c&&JX),F=f===!0?eQ({x:v,y},Rr(n)):{x:v,y};if(v=F.x,y=F.y,l){var q;return Object.assign({},I,(q={},q[S]=b?"0":"",q[w]=_?"0":"",q.transform=(E.devicePixelRatio||1)<=1?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",q))}return Object.assign({},I,(t={},t[S]=b?y+"px":"",t[w]=_?v+"px":"",t.transform="",t))}function tQ(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:ao(t.placement),variation:Xc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LA(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LA(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const nQ={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:tQ,data:{}};var pm={passive:!0};function rQ(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Rr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",n.update,pm)}),s&&l.addEventListener("resize",n.update,pm),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",n.update,pm)}),s&&l.removeEventListener("resize",n.update,pm)}}const iQ={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:rQ,data:{}};var oQ={left:"right",right:"left",bottom:"top",top:"bottom"};function tv(e){return e.replace(/left|right|bottom|top/g,function(t){return oQ[t]})}var aQ={start:"end",end:"start"};function RA(e){return e.replace(/start|end/g,function(t){return aQ[t]})}function _E(e){var t=Rr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function xE(e){return Zc(os(e)).left+_E(e).scrollLeft}function sQ(e,t){var n=Rr(e),r=os(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=PI();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+xE(e),y:l}}function lQ(e){var t,n=os(e),r=_E(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Qs(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Qs(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+xE(e),l=-r.scrollTop;return Wo(i||n).direction==="rtl"&&(s+=Qs(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function wE(e){var t=Wo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function NI(e){return["html","body","#document"].indexOf(ho(e))>=0?e.ownerDocument.body:ai(e)&&wE(e)?e:NI(t0(e))}function dd(e,t){var n;t===void 0&&(t=[]);var r=NI(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Rr(r),a=i?[o].concat(o.visualViewport||[],wE(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(dd(t0(a)))}function Kx(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function cQ(e,t){var n=Zc(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function $A(e,t,n){return t===EI?Kx(sQ(e,n)):dl(t)?cQ(t,n):Kx(lQ(os(e)))}function uQ(e){var t=dd(t0(e)),n=["absolute","fixed"].indexOf(Wo(e).position)>=0,r=n&&ai(e)?ip(e):e;return dl(r)?t.filter(function(i){return dl(i)&&TI(i,r)&&ho(i)!=="body"}):[]}function fQ(e,t,n,r){var i=t==="clippingParents"?uQ(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var f=$A(e,c,r);return l.top=Qs(f.top,l.top),l.right=qv(f.right,l.right),l.bottom=qv(f.bottom,l.bottom),l.left=Qs(f.left,l.left),l},$A(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function MI(e){var t=e.reference,n=e.element,r=e.placement,i=r?ao(r):null,o=r?Xc(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case dr:l={x:a,y:t.y-n.height};break;case ui:l={x:a,y:t.y+t.height};break;case fi:l={x:t.x+t.width,y:s};break;case hr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?bE(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case qc:l[c]=l[c]-(t[f]/2-n[f]/2);break;case Zd:l[c]=l[c]+(t[f]/2-n[f]/2);break}}return l}function Xd(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?kX:s,c=n.rootBoundary,f=c===void 0?EI:c,d=n.elementContext,p=d===void 0?Of:d,v=n.altBoundary,g=v===void 0?!1:v,y=n.padding,x=y===void 0?0:y,_=AI(typeof x!="number"?x:kI(x,rp)),b=p===Of?NX:Of,w=e.rects.popper,S=e.elements[g?b:p],E=fQ(dl(S)?S:S.contextElement||os(e.elements.popper),l,f,a),C=Zc(e.elements.reference),T=MI({reference:C,element:w,strategy:"absolute",placement:i}),A=Kx(Object.assign({},w,T)),D=p===Of?A:C,N={top:E.top-D.top+_.top,bottom:D.bottom-E.bottom+_.bottom,left:E.left-D.left+_.left,right:D.right-E.right+_.right},I=e.modifiersData.offset;if(p===Of&&I){var F=I[i];Object.keys(N).forEach(function(q){var W=[fi,ui].indexOf(q)>=0?1:-1,X=[dr,ui].indexOf(q)>=0?"y":"x";N[q]+=F[X]*W})}return N}function dQ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?CI:l,f=Xc(r),d=f?s?NA:NA.filter(function(g){return Xc(g)===f}):rp,p=d.filter(function(g){return c.indexOf(g)>=0});p.length===0&&(p=d);var v=p.reduce(function(g,y){return g[y]=Xd(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[ao(y)],g},{});return Object.keys(v).sort(function(g,y){return v[g]-v[y]})}function hQ(e){if(ao(e)===vE)return[];var t=tv(e);return[RA(e),t,RA(t)]}function pQ(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,f=n.boundary,d=n.rootBoundary,p=n.altBoundary,v=n.flipVariations,g=v===void 0?!0:v,y=n.allowedAutoPlacements,x=t.options.placement,_=ao(x),b=_===x,w=l||(b||!g?[tv(x)]:hQ(x)),S=[x].concat(w).reduce(function(te,ie){return te.concat(ao(ie)===vE?dQ(t,{placement:ie,boundary:f,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:y}):ie)},[]),E=t.rects.reference,C=t.rects.popper,T=new Map,A=!0,D=S[0],N=0;N=0,X=W?"width":"height",Q=Xd(t,{placement:I,boundary:f,rootBoundary:d,altBoundary:p,padding:c}),ne=W?q?fi:hr:q?ui:dr;E[X]>C[X]&&(ne=tv(ne));var Z=tv(ne),z=[];if(o&&z.push(Q[F]<=0),s&&z.push(Q[ne]<=0,Q[Z]<=0),z.every(function(te){return te})){D=I,A=!1;break}T.set(I,z)}if(A)for(var B=g?3:1,H=function(ie){var ae=S.find(function(fe){var j=T.get(fe);if(j)return j.slice(0,ie).every(function(k){return k})});if(ae)return D=ae,"break"},ee=B;ee>0;ee--){var K=H(ee);if(K==="break")break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}}const mQ={name:"flip",enabled:!0,phase:"main",fn:pQ,requiresIfExists:["offset"],data:{_skip:!1}};function IA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function DA(e){return[dr,fi,ui,hr].some(function(t){return e[t]>=0})}function vQ(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Xd(t,{elementContext:"reference"}),s=Xd(t,{altBoundary:!0}),l=IA(a,r),c=IA(s,i,o),f=DA(l),d=DA(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const gQ={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:vQ};function yQ(e,t,n){var r=ao(e),i=[hr,dr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[hr,fi].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function bQ(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=CI.reduce(function(f,d){return f[d]=yQ(d,t.rects,o),f},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const _Q={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:bQ};function xQ(e){var t=e.state,n=e.name;t.modifiersData[n]=MI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const wQ={name:"popperOffsets",enabled:!0,phase:"read",fn:xQ,data:{}};function OQ(e){return e==="x"?"y":"x"}function SQ(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,d=n.padding,p=n.tether,v=p===void 0?!0:p,g=n.tetherOffset,y=g===void 0?0:g,x=Xd(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:f}),_=ao(t.placement),b=Xc(t.placement),w=!b,S=bE(_),E=OQ(S),C=t.modifiersData.popperOffsets,T=t.rects.reference,A=t.rects.popper,D=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,N=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(C){if(o){var q,W=S==="y"?dr:hr,X=S==="y"?ui:fi,Q=S==="y"?"height":"width",ne=C[S],Z=ne+x[W],z=ne-x[X],B=v?-A[Q]/2:0,H=b===qc?T[Q]:A[Q],ee=b===qc?-A[Q]:-T[Q],K=t.elements.arrow,te=v&&K?yE(K):{width:0,height:0},ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:jI(),ae=ie[W],fe=ie[X],j=fd(0,T[Q],te[Q]),k=w?T[Q]/2-B-j-ae-N.mainAxis:H-j-ae-N.mainAxis,U=w?-T[Q]/2+B+j+fe+N.mainAxis:ee+j+fe+N.mainAxis,J=t.elements.arrow&&ip(t.elements.arrow),Y=J?S==="y"?J.clientTop||0:J.clientLeft||0:0,oe=(q=I==null?void 0:I[S])!=null?q:0,he=ne+k-oe-Y,Se=ne+U-oe,se=fd(v?qv(Z,he):Z,ne,v?Qs(z,Se):z);C[S]=se,F[S]=se-ne}if(s){var pe,me=S==="x"?dr:hr,xe=S==="x"?ui:fi,Te=C[E],Pe=E==="y"?"height":"width",Ae=Te+x[me],le=Te-x[xe],ue=[dr,hr].indexOf(_)!==-1,ye=(pe=I==null?void 0:I[E])!=null?pe:0,ge=ue?Ae:Te-T[Pe]-A[Pe]-ye+N.altAxis,we=ue?Te+T[Pe]+A[Pe]-ye-N.altAxis:le,ke=v&&ue?qX(ge,Te,we):fd(v?ge:Ae,Te,v?we:le);C[E]=ke,F[E]=ke-Te}t.modifiersData[r]=F}}const EQ={name:"preventOverflow",enabled:!0,phase:"main",fn:SQ,requiresIfExists:["offset"]};function CQ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function PQ(e){return e===Rr(e)||!ai(e)?_E(e):CQ(e)}function TQ(e){var t=e.getBoundingClientRect(),n=Yc(t.width)/e.offsetWidth||1,r=Yc(t.height)/e.offsetHeight||1;return n!==1||r!==1}function jQ(e,t,n){n===void 0&&(n=!1);var r=ai(t),i=ai(t)&&TQ(t),o=os(t),a=Zc(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((ho(t)!=="body"||wE(o))&&(s=PQ(t)),ai(t)?(l=Zc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=xE(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function AQ(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function kQ(e){var t=AQ(e);return zX.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function NQ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function MQ(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var FA={placement:"bottom",modifiers:[],strategy:"absolute"};function BA(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function tJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nJ(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yv(e){return Yv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yv(e)}var lJ={a11y:$.bool,disabled:$.bool,direction:$.oneOf(["up","down","start","end","left","right"]),group:$.bool,isOpen:$.bool,nav:$.bool,active:$.bool,size:$.string,tag:it,toggle:$.func,children:$.node,className:$.string,cssModule:$.object,dropup:$.bool,inNavbar:$.bool,setActiveFromChild:$.bool,menuRole:$.oneOf(["listbox","menu"])},cJ={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},uJ=[ht.space,ht.enter,ht.up,ht.down,ht.end,ht.home],as=function(e){iJ(n,e);var t=oJ(n);function n(r){var i;return tJ(this,n),i=t.call(this,r),i.addEvents=i.addEvents.bind(da(i)),i.handleDocumentClick=i.handleDocumentClick.bind(da(i)),i.handleKeyDown=i.handleKeyDown.bind(da(i)),i.removeEvents=i.removeEvents.bind(da(i)),i.toggle=i.toggle.bind(da(i)),i.handleMenuRef=i.handleMenuRef.bind(da(i)),i.handleToggleRef=i.handleToggleRef.bind(da(i)),i.containerRef=V.createRef(),i.menuRef=V.createRef(),i.toggleRef=V.createRef(),i}return rJ(n,[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(i){this.props.isOpen!==i.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(i){this.menuRef.current=i}},{key:"handleToggleRef",value:function(i){this.toggleRef.current=i}},{key:"handleDocumentClick",value:function(i){if(!(i&&(i.which===3||i.type==="keyup"&&i.which!==ht.tab))){var o=this.getContainer(),a=this.getMenu(),s=this.getToggle();if(s){var l=s.contains(i.target),c=a&&a.contains(i.target)&&a!==i.target,f=!1;o&&(f=o.classList.contains("input-group")&&o.classList.contains("dropdown")&&i.target.tagName==="INPUT"),!((l&&!f||c)&&(i.type!=="keyup"||i.which===ht.tab))&&this.toggle(i)}}}},{key:"handleKeyDown",value:function(i){var o=this,a=i.target.getAttribute("role")==="menuitem"||i.target.getAttribute("role")==="option",s=this.getMenuCtrl()===i.target,l=ht.tab===i.which;if(!(/input|textarea/i.test(i.target.tagName)||l&&!this.props.a11y||l&&!(a||s))&&((uJ.indexOf(i.which)!==-1||i.which>=48&&i.which<=90)&&i.preventDefault(),!this.props.disabled)){if(s)if([ht.space,ht.enter,ht.up,ht.down].indexOf(i.which)>-1)this.props.isOpen||this.toggle(i),setTimeout(function(){var b;return(b=o.getMenuItems()[0])===null||b===void 0?void 0:b.focus()});else if(this.props.isOpen&&l){var c;i.preventDefault(),(c=this.getMenuItems()[0])===null||c===void 0||c.focus()}else this.props.isOpen&&i.which===ht.esc&&this.toggle(i);if(this.props.isOpen&&a){if([ht.tab,ht.esc].indexOf(i.which)>-1)this.toggle(i),this.getMenuCtrl().focus();else if([ht.space,ht.enter].indexOf(i.which)>-1)i.target.click(),this.getMenuCtrl().focus();else if([ht.down,ht.up].indexOf(i.which)>-1||[ht.n,ht.p].indexOf(i.which)>-1&&i.ctrlKey){var f=this.getMenuItems(),d=f.indexOf(i.target);ht.up===i.which||ht.p===i.which&&i.ctrlKey?d=d!==0?d-1:f.length-1:(ht.down===i.which||ht.n===i.which&&i.ctrlKey)&&(d=d===f.length-1?0:d+1),f[d].focus()}else if(ht.end===i.which){var p=this.getMenuItems();p[p.length-1].focus()}else if(ht.home===i.which){var v=this.getMenuItems();v[0].focus()}else if(i.which>=48&&i.which<=90)for(var g=this.getMenuItems(),y=String.fromCharCode(i.which).toLowerCase(),x=0;x=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function pJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mJ(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(e)}var xJ={children:$.node,active:$.bool,disabled:$.bool,divider:$.bool,tag:it,header:$.bool,onClick:$.func,className:$.string,cssModule:$.object,toggle:$.bool,text:$.bool},Ne=function(e){gJ(n,e);var t=yJ(n);function n(r){var i;return pJ(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(ew(i)),i.getTabIndex=i.getTabIndex.bind(ew(i)),i}return vJ(n,[{key:"onClick",value:function(i){var o,a=this.props,s=a.disabled,l=a.header,c=a.divider,f=a.text;if(s||l||c||f){i.preventDefault();return}this.props.onClick&&this.props.onClick(i),(!((o=this.props.toggle)!==null&&o!==void 0)||o)&&this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"option":"menuitem"}},{key:"getTabIndex",value:function(){var i=this.props,o=i.disabled,a=i.header,s=i.divider,l=i.text;return o||a||s||l?"-1":"0"}},{key:"render",value:function(){var i=this.getTabIndex(),o=i>-1?this.getRole():void 0,a=is(this.props,["toggle"]),s=a.className,l=a.cssModule,c=a.divider,f=a.tag,d=f===void 0?"button":f,p=a.header,v=a.active,g=a.text,y=dJ(a,fJ),x=Be(He(s,{disabled:y.disabled,"dropdown-item":!c&&!p&&!g,active:v,"dropdown-header":p,"dropdown-divider":c,"dropdown-item-text":g}),l);return d==="button"&&(p?d="h6":c?d="div":y.href?d="a":g&&(d="span")),V.createElement(d,Qx({type:d==="button"&&(y.onClick||this.props.toggle)?"button":void 0},y,{tabIndex:i,role:o,className:x,onClick:this.onClick}))}}]),n}(V.Component);Ne.propTypes=xJ;Ne.contextType=Qd;function tw(e){"@babel/helpers - typeof";return tw=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},tw(e)}var wJ=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"];function Xv(){return Xv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function kJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NJ(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qv(e){return Qv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qv(e)}var FJ={tag:it,children:$.node.isRequired,dark:$.bool,end:$.bool,flip:$.bool,modifiers:$.array,className:$.string,cssModule:$.object,style:$.object,persist:$.bool,strategy:$.string,container:Kc,updateOnSelect:$.bool,right:pI($.bool,'Please use "end" instead.')},BJ={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},ss=function(e){LJ(n,e);var t=RJ(n);function n(){return kJ(this,n),t.apply(this,arguments)}return MJ(n,[{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"listbox":"menu"}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.cssModule,l=o.dark,c=o.end,f=o.right,d=o.tag,p=d===void 0?"div":d,v=o.flip,g=v===void 0?!0:v,y=o.modifiers,x=y===void 0?[]:y,_=o.persist,b=o.strategy,w=o.container,S=o.updateOnSelect,E=jJ(o,wJ),C=Be(He(a,"dropdown-menu",{"dropdown-menu-dark":l,"dropdown-menu-end":c||f,show:this.context.isOpen}),s),T=p;if(_||this.context.isOpen&&!this.context.inNavbar){var A=BJ[this.context.direction]||"bottom",D=c||f?"end":"start",N="".concat(A,"-").concat(D),I=[].concat(SJ(x),[{name:"flip",enabled:!!g}]),F={};_&&(F.display="block",F.visibility=this.context.isOpen?"visible":"hidden");var q=V.createElement(LI,{placement:N,modifiers:I,strategy:b},function(X){var Q=X.ref,ne=X.style,Z=X.placement,z=X.update,B=y1(y1(y1({},i.props.style),F),ne),H=function(K){Q(K);var te=i.context.onMenuRef;te&&te(K)};return V.createElement(T,Xv({tabIndex:"-1",role:i.getRole(),ref:H},E,{style:B,"aria-hidden":!i.context.isOpen,className:C,"data-popper-placement":Z,onClick:function(){return S&&z()}}))});return w?zs.createPortal(q,Yd(w)):q}var W=this.context.onMenuRef;return V.createElement(T,Xv({tabIndex:"-1",role:this.getRole()},E,{ref:W,"aria-hidden":!this.context.isOpen,className:C,"data-popper-placement":E.placement,"data-bs-popper":"static"}))}}]),n}(V.Component);ss.propTypes=FJ;ss.contextType=Qd;function iw(e){"@babel/helpers - typeof";return iw=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},iw(e)}var UJ=["className","color","cssModule","caret","split","nav","tag","innerRef"];function ow(){return ow=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function HJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GJ(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jv(e){return Jv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jv(e)}var QJ={caret:$.bool,color:$.string,children:$.node,className:$.string,cssModule:$.object,disabled:$.bool,onClick:$.func,"aria-haspopup":$.bool,split:$.bool,tag:it,nav:$.bool,innerRef:$.oneOfType([$.object,$.string,$.func])},JJ={color:"secondary","aria-haspopup":!0},ea=function(e){qJ(n,e);var t=YJ(n);function n(r){var i;return HJ(this,n),i=t.call(this,r),i.onClick=i.onClick.bind($I(i)),i}return KJ(n,[{key:"onClick",value:function(i){if(this.props.disabled||this.context.disabled){i.preventDefault();return}this.props.nav&&!this.props.tag&&i.preventDefault(),this.props.onClick&&this.props.onClick(i),this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole||this.props["aria-haspopup"]}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.color,l=o.cssModule,c=o.caret,f=o.split,d=o.nav,p=o.tag,v=o.innerRef,g=VJ(o,UJ),y=g["aria-label"]||"Toggle Dropdown",x=Be(He(a,{"dropdown-toggle":c||f,"dropdown-toggle-split":f,"nav-link":d}),l),_=typeof g.children<"u"?g.children:V.createElement("span",{className:"visually-hidden"},y),b;d&&!p?(b="a",g.href="#"):p?b=p:(b=qe,g.color=s,g.cssModule=l);var w=function(E){var C=E.ref,T=function(D){C(D);var N=i.context.onToggleRef;N&&N(D)};return V.createElement(b,ow({},g,zJ({},typeof b=="string"?"ref":"innerRef",T),{className:x,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:_}))};return this.context.inNavbar?V.createElement(V.Fragment,null,w({ref:this.context.onToggleRef})):V.createElement(XQ,{innerRef:v},w)}}]),n}(V.Component);ea.propTypes=QJ;ea.defaultProps=JJ;ea.contextType=Qd;function eee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function sw(e,t){return sw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},sw(e,t)}function tee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,sw(e,t)}const zA={disabled:!1},II=V.createContext(null);var nee=function(t){return t.scrollTop},Hf="unmounted",Ts="exited",js="entering",tc="entered",lw="exiting",gr=function(e){tee(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Ts,o.appearStatus=js):l=tc:r.unmountOnExit||r.mountOnEnter?l=Hf:l=Ts,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Hf?{status:Ts}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==js&&a!==tc&&(o=js):(a===js||a===tc)&&(o=lw)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===js){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:zs.findDOMNode(this);a&&nee(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ts&&this.setState({status:Hf})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[zs.findDOMNode(this),s],c=l[0],f=l[1],d=this.getTimeouts(),p=s?d.appear:d.enter;if(!i&&!a||zA.disabled){this.safeSetState({status:tc},function(){o.props.onEntered(c)});return}this.props.onEnter(c,f),this.safeSetState({status:js},function(){o.props.onEntering(c,f),o.onTransitionEnd(p,function(){o.safeSetState({status:tc},function(){o.props.onEntered(c,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:zs.findDOMNode(this);if(!o||zA.disabled){this.safeSetState({status:Ts},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:lw},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Ts},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:zs.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],f=l[1];this.props.addEndListener(c,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Hf)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=eee(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return V.createElement(II.Provider,{value:null},typeof a=="function"?a(i,s):V.cloneElement(V.Children.only(a),s))},t}(V.Component);gr.contextType=II;gr.propTypes={};function Wl(){}gr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Wl,onEntering:Wl,onEntered:Wl,onExit:Wl,onExiting:Wl,onExited:Wl};gr.UNMOUNTED=Hf;gr.EXITED=Ts;gr.ENTERING=js;gr.ENTERED=tc;gr.EXITING=lw;var ree=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function eg(){return eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function VA(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 Jd(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function fee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dee(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ng(e){return ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ng(e)}function HA(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=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function See(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Eee={body:$.bool,className:$.string,color:$.string,cssModule:$.object,innerRef:$.oneOfType([$.object,$.string,$.func]),inverse:$.bool,outline:$.bool,tag:it};function mr(e){var t=e.className,n=e.cssModule,r=e.color,i=e.body,o=e.inverse,a=e.outline,s=e.tag,l=s===void 0?"div":s,c=e.innerRef,f=Oee(e,wee),d=Be(He(t,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(a?"border":"bg","-").concat(r):!1),n);return V.createElement(l,fw({},f,{className:d,ref:c}))}mr.propTypes=Eee;var Cee=["className","cssModule","innerRef","tag"];function dw(){return dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Tee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var jee={className:$.string,cssModule:$.object,innerRef:$.oneOfType([$.object,$.string,$.func]),tag:it};function Jc(e){var t=e.className,n=e.cssModule,r=e.innerRef,i=e.tag,o=i===void 0?"div":i,a=Pee(e,Cee),s=Be(He(t,"card-body"),n);return V.createElement(o,dw({},a,{className:s,ref:r}))}Jc.propTypes=jee;var Aee=["className","cssModule","tag"];function hw(){return hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Mee={className:$.string,cssModule:$.object,tag:it};function FI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=kee(e,Aee),a=Be(He(t,"card-footer"),n);return V.createElement(i,hw({},o,{className:a}))}FI.propTypes=Mee;var Lee=["className","cssModule","tag"];function pw(){return pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $ee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Iee={className:$.string,cssModule:$.object,tag:it};function eu(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=Ree(e,Lee),a=Be(He(t,"card-header"),n);return V.createElement(i,pw({},o,{className:a}))}eu.propTypes=Iee;var Dee=["className","cssModule","tag"];function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Uee={className:$.string,cssModule:$.object,tag:it};function BI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"p":r,o=Fee(e,Dee),a=Be(He(t,"card-text"),n);return V.createElement(i,mw({},o,{className:a}))}BI.propTypes=Uee;var zee=["className","cssModule","tag"];function vw(){return vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Hee={className:$.string,cssModule:$.object,tag:it};function UI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=Vee(e,zee),a=Be(He(t,"card-title"),n);return V.createElement(i,vw({},o,{className:a}))}UI.propTypes=Hee;function gw(e){"@babel/helpers - typeof";return gw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gw(e)}var Gee=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function yw(){return yw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Qee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Jee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KA(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rg(e){return rg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rg(e)}function qA(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 rv(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ig(e){return ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ig(e)}var EE={children:$.oneOfType([$.node,$.func]),placement:$.oneOf(AZ),target:Kc.isRequired,container:Kc,isOpen:$.bool,disabled:$.bool,hideArrow:$.bool,boundariesElement:$.oneOfType([$.string,uE]),className:$.string,innerClassName:$.string,arrowClassName:$.string,popperClassName:$.string,cssModule:$.object,toggle:$.func,autohide:$.bool,placementPrefix:$.string,delay:$.oneOfType([$.shape({show:$.number,hide:$.number}),$.number]),modifiers:$.array,strategy:$.string,offset:$.arrayOf($.number),innerRef:$.oneOfType([$.func,$.string,$.object]),trigger:$.string,fade:$.bool,flip:$.bool},zI={show:0,hide:50},mte={isOpen:!1,hideArrow:!1,autohide:!1,delay:zI,toggle:function(){},trigger:"click",fade:!0};function VI(e,t){return t&&(e===t||t.contains(e))}function ZA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.length&&t.filter(function(n){return VI(e,n)})[0]}var CE=function(e){fte(n,e);var t=dte(n);function n(r){var i;return cte(this,n),i=t.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind(wr(i)),i.handleDocumentClick=i.handleDocumentClick.bind(wr(i)),i.removeTargetEvents=i.removeTargetEvents.bind(wr(i)),i.toggle=i.toggle.bind(wr(i)),i.showWithDelay=i.showWithDelay.bind(wr(i)),i.hideWithDelay=i.hideWithDelay.bind(wr(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind(wr(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind(wr(i)),i.show=i.show.bind(wr(i)),i.hide=i.hide.bind(wr(i)),i.onEscKeyDown=i.onEscKeyDown.bind(wr(i)),i.getRef=i.getRef.bind(wr(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return ute(n,[{key:"componentDidMount",value:function(){this._isMounted=!0,this.updateTarget()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}},{key:"handleDocumentClick",value:function(i){var o=this.props.trigger.split(" ");o.indexOf("legacy")>-1&&(this.props.isOpen||ZA(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!VI(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&ZA(i.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(i):this.showWithDelay(i))}},{key:"onMouseOverTooltipContent",value:function(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}},{key:"onMouseLeaveTooltipContent",value:function(i){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),i.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide")))}},{key:"onEscKeyDown",value:function(i){i.key==="Escape"&&this.hide(i)}},{key:"getRef",value:function(i){var o=this.props.innerRef;o&&(typeof o=="function"?o(i):eh(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return eh(o)==="object"?isNaN(o[i])?zI[i]:o[i]:o}},{key:"getCurrentTarget",value:function(i){if(!i)return null;var o=this._targets.indexOf(i);return o>=0?this._targets[o]:this.getCurrentTarget(i.parentElement)}},{key:"show",value:function(i){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=i?i.currentTarget||this.getCurrentTarget(i.target):null,i&&i.composedPath&&typeof i.composedPath=="function"){var o=i.composedPath();this.currentTargetElement=o&&o[0]||this.currentTargetElement}this.toggle(i)}}},{key:"showWithDelay",value:function(i){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,i),this.getDelay("show"))}},{key:"hide",value:function(i){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(i))}},{key:"hideWithDelay",value:function(i){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide"))}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"addEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.addEventListener(i,o,a)})}},{key:"removeEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.removeEventListener(i,o,a)})}},{key:"addTargetEvents",value:function(){if(this.props.trigger){var i=this.props.trigger.split(" ");i.indexOf("manual")===-1&&((i.indexOf("click")>-1||i.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(i.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),i.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}},{key:"removeTargetEvents",value:function(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}},{key:"updateTarget",value:function(){var i=Yd(this.props.target,!0);i!==this._targets&&(this.removeTargetEvents(),this._targets=i?Array.from(i):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}},{key:"toggle",value:function(i){return this.props.disabled||!this._isMounted?i&&i.preventDefault():this.props.toggle(i)}},{key:"render",value:function(){var i=this;this.props.isOpen&&this.updateTarget();var o=this.currentTargetElement||this._targets[0];if(!o)return null;var a=this.props,s=a.className,l=a.cssModule,c=a.innerClassName,f=a.isOpen,d=a.hideArrow,p=a.boundariesElement,v=a.placement,g=a.placementPrefix,y=a.arrowClassName,x=a.popperClassName,_=a.container,b=a.modifiers,w=a.strategy,S=a.offset,E=a.fade,C=a.flip,T=a.children,A=is(this.props,Object.keys(EE)),D=Be(x,l),N=Be(c,l);return V.createElement(SE,{className:s,target:o,isOpen:f,hideArrow:d,boundariesElement:p,placement:v,placementPrefix:g,arrowClassName:y,popperClassName:D,container:_,modifiers:b,strategy:w,offset:S,cssModule:l,fade:E,flip:C},function(I){var F=I.update;return V.createElement("div",xw({},A,{ref:i.getRef,className:N,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof T=="function"?T({update:F}):T)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(V.Component);CE.propTypes=EE;CE.defaultProps=mte;var vte=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"];function og(){return og=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var _te={animated:$.bool,bar:$.bool,barAriaLabelledBy:$.string,barAriaValueText:$.string,barClassName:$.string,barStyle:$.object,children:$.node,className:$.string,cssModule:$.object,color:$.string,max:$.oneOfType([$.string,$.number]),min:$.oneOfType([$.string,$.number]),multi:$.bool,striped:$.bool,style:$.object,tag:it,value:$.oneOfType([$.string,$.number])};function WI(e){var t=e.children,n=e.className,r=e.barClassName,i=e.cssModule,o=e.value,a=o===void 0?0:o,s=e.min,l=s===void 0?0:s,c=e.max,f=c===void 0?100:c,d=e.animated,p=e.striped,v=e.color,g=e.bar,y=e.multi,x=e.tag,_=x===void 0?"div":x,b=e.style,w=b===void 0?{}:b,S=e.barStyle,E=S===void 0?{}:S,C=e.barAriaValueText,T=e.barAriaLabelledBy,A=yte(e,vte),D=EA(a)/EA(f)*100,N=Be(He(n,"progress"),i),I=Be(He("progress-bar",g&&n||r,d?"progress-bar-animated":null,v?"bg-".concat(v):null,p||d?"progress-bar-striped":null),i),F={className:I,style:b1(b1(b1({},g?w:{}),E),{},{width:"".concat(D,"%")}),role:"progressbar","aria-valuenow":a,"aria-valuemin":l,"aria-valuemax":f,"aria-valuetext":C,"aria-labelledby":T,children:t};return g?V.createElement(_,og({},A,F)):V.createElement(_,og({},A,{style:w,className:N}),y?t:V.createElement("div",F))}WI.propTypes=_te;function Ow(e){"@babel/helpers - typeof";return Ow=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ow(e)}function xte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wte(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ag(e){return ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ag(e)}var jte={children:$.node.isRequired,node:$.any},HI=function(e){Ste(n,e);var t=Ete(n);function n(){return xte(this,n),t.apply(this,arguments)}return Ote(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return fE?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),zs.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(V.Component);HI.propTypes=jte;function Ew(e){"@babel/helpers - typeof";return Ew=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},Ew(e)}function QA(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 Gl(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sg(e){return sg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sg(e)}function lg(){}var JA=$.shape(sr.propTypes),GI={autoFocus:$.bool,backdrop:$.oneOfType([$.bool,$.oneOf(["static"])]),backdropClassName:$.string,backdropTransition:JA,centered:$.bool,children:$.node,contentClassName:$.string,className:$.string,container:Kc,cssModule:$.object,external:$.node,fade:$.bool,fullscreen:$.oneOfType([$.bool,$.oneOf(["sm","md","lg","xl"])]),innerRef:$.oneOfType([$.object,$.string,$.func]),isOpen:$.bool,keyboard:$.bool,labelledBy:$.string,modalClassName:$.string,modalTransition:JA,onClosed:$.func,onEnter:$.func,onExit:$.func,onOpened:$.func,returnFocusAfterClose:$.bool,role:$.string,scrollable:$.bool,size:$.string,toggle:$.func,trapFocus:$.bool,unmountOnClose:$.bool,wrapClassName:$.string,zIndex:$.oneOfType([$.number,$.string])},Ite=Object.keys(GI),Dte={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:lg,onClosed:lg,modalTransition:{timeout:Hv.Modal},backdropTransition:{mountOnEnter:!0,timeout:Hv.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},yr=function(e){Mte(n,e);var t=Lte(n);function n(r){var i;return Ate(this,n),i=t.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(Yr(i)),i.handleBackdropClick=i.handleBackdropClick.bind(Yr(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(Yr(i)),i.handleEscape=i.handleEscape.bind(Yr(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(Yr(i)),i.handleTab=i.handleTab.bind(Yr(i)),i.onOpened=i.onOpened.bind(Yr(i)),i.onClosed=i.onClosed.bind(Yr(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(Yr(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(Yr(i)),i.trapFocus=i.trapFocus.bind(Yr(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return Nte(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,a=i.autoFocus,s=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),a&&this.setFocus()),s&&s(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(i,o){if(this.props.isOpen&&!i.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!o.isOpen&&this.setFocus(),this._element&&i.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}},{key:"handleBackdropClick",value:function(i){if(i.target===this._mouseDownElement){i.stopPropagation();var o=this._dialog?this._dialog.parentNode:null;if(o&&i.target===o&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;o&&i.target===o&&this.props.toggle&&this.props.toggle(i)}}},{key:"handleTab",value:function(i){if(i.which===9&&!(this.modalIndex0&&(i.preventDefault(),i.stopPropagation(),o[0].focus())}}},{key:"init",value:function(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Yd(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=CZ(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),PZ(),n.openCount===0&&(document.body.className=He(document.body.className,Be("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=n.openCount,n.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var i=this.props.returnFocusAfterClose;this._triggeringElement.focus&&i&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(n.openCount<=1){var i=Be("modal-open",this.props.cssModule),o=new RegExp("(^| )".concat(i,"( |$)"));document.body.className=document.body.className.replace(o," ").trim(),document.body.style.overflow=n.originalBodyOverflow}this.manageFocusAfterClose(),n.openCount=Math.max(0,n.openCount-1),dI(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,a=is(this.props,Ite),s="modal-dialog";return V.createElement("div",hd({},a,{className:Be(He(s,this.props.className,(i={},nc(i,"modal-".concat(this.props.size),this.props.size),nc(i,"".concat(s,"-centered"),this.props.centered),nc(i,"".concat(s,"-scrollable"),this.props.scrollable),nc(i,"modal-fullscreen",this.props.fullscreen===!0),nc(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(c){o._dialog=c}}),V.createElement("div",{className:Be(He("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var i=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!i)){var o=!!this._element&&!this.state.isOpen&&!i;this._element.style.display=o?"none":"block";var a=this.props,s=a.wrapClassName,l=a.modalClassName,c=a.backdropClassName,f=a.cssModule,d=a.isOpen,p=a.backdrop,v=a.role,g=a.labelledBy,y=a.external,x=a.innerRef,_={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":g,"aria-modal":!0,role:v,tabIndex:"-1"},b=this.props.fade,w=Gl(Gl(Gl({},sr.defaultProps),this.props.modalTransition),{},{baseClass:b?this.props.modalTransition.baseClass:"",timeout:b?this.props.modalTransition.timeout:0}),S=Gl(Gl(Gl({},sr.defaultProps),this.props.backdropTransition),{},{baseClass:b?this.props.backdropTransition.baseClass:"",timeout:b?this.props.backdropTransition.timeout:0}),E=p&&(b?V.createElement(sr,hd({},S,{in:d&&!!p,cssModule:f,className:Be(He("modal-backdrop",c),f)})):V.createElement("div",{className:Be(He("modal-backdrop","show",c),f)}));return V.createElement(HI,{node:this._element},V.createElement("div",{className:Be(s)},V.createElement(sr,hd({},_,w,{in:d,onEntered:this.onOpened,onExited:this.onClosed,cssModule:f,className:Be(He("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),f),innerRef:x}),y,this.renderModalDialog()),E))}return null}}]),n}(V.Component);yr.propTypes=GI;yr.defaultProps=Dte;yr.openCount=0;yr.originalBodyOverflow=null;var Fte=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function Pw(){return Pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ute(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var zte={children:$.node,className:$.string,close:$.object,closeAriaLabel:$.string,cssModule:$.object,tag:it,toggle:$.func,wrapTag:it};function yo(e){var t,n=e.className,r=e.cssModule,i=e.children,o=e.toggle,a=e.tag,s=a===void 0?"h5":a,l=e.wrapTag,c=l===void 0?"div":l,f=e.closeAriaLabel,d=f===void 0?"Close":f,p=e.close,v=Bte(e,Fte),g=Be(He(n,"modal-header"),r);return!p&&o&&(t=V.createElement("button",{type:"button",onClick:o,className:Be("btn-close",r),"aria-label":d})),V.createElement(c,Pw({},v,{className:g}),V.createElement(s,{className:Be("modal-title",r)},i),p||t)}yo.propTypes=zte;var Vte=["className","cssModule","tag"];function Tw(){return Tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Gte={className:$.string,cssModule:$.object,tag:it};function Ii(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=Wte(e,Vte),a=Be(He(t,"modal-body"),n);return V.createElement(i,Tw({},o,{className:a}))}Ii.propTypes=Gte;var Kte=["className","cssModule","tag"];function jw(){return jw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Zte={className:$.string,cssModule:$.object,tag:it};function ls(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=qte(e,Kte),a=Be(He(t,"modal-footer"),n);return V.createElement(i,jw({},o,{className:a}))}ls.propTypes=Zte;function Aw(){return Aw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ene(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var tne={className:$.string,cssModule:$.object,flush:$.bool,horizontal:$.oneOfType([$.bool,$.string]),numbered:$.bool,tag:it},nne=function(t){return t===!1?!1:t===!0||t==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(t)};function KI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"ul":r,o=e.flush,a=e.horizontal,s=a===void 0?!1:a,l=e.numbered,c=l===void 0?!1:l,f=Jte(e,Qte),d=Be(He(t,"list-group",o?"list-group-flush":nne(s),{"list-group-numbered":c}),n);return V.createElement(i,kw({},f,{className:d}))}KI.propTypes=tne;var rne=["className","cssModule","row","disabled","check","inline","floating","noMargin","tag","switch"];function Nw(){return Nw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function one(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ane={children:$.node,row:$.bool,check:$.bool,switch:$.bool,inline:$.bool,floating:$.bool,noMargin:$.bool,disabled:$.bool,tag:it,className:$.string,cssModule:$.object};function to(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,o=e.check,a=e.inline,s=e.floating,l=e.noMargin,c=e.tag,f=c===void 0?"div":c,d=e.switch,p=ine(e,rne),v=o||d,g=Be(He(t,r?"row":!1,v?"form-check":!1,d?"form-switch":!1,v||l?!1:"mb-3",v&&a?"form-check-inline":!1,v&&i?"disabled":!1,s&&"form-floating"),n);return f==="fieldset"&&(p.disabled=i),V.createElement(f,Nw({},p,{className:g}))}to.propTypes=ane;function Mw(e){"@babel/helpers - typeof";return Mw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mw(e)}var sne=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function Lw(){return Lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function une(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fne(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cg(e){return cg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cg(e)}var gne={children:$.node,type:$.string,size:$.oneOfType([$.number,$.string]),bsSize:$.string,valid:$.bool,invalid:$.bool,tag:it,innerRef:$.oneOfType([$.object,$.func,$.string]),plaintext:$.bool,addon:$.bool,className:$.string,cssModule:$.object},Nn=function(e){hne(n,e);var t=pne(n);function n(r){var i;return une(this,n),i=t.call(this,r),i.getRef=i.getRef.bind($w(i)),i.focus=i.focus.bind($w(i)),i}return dne(n,[{key:"getRef",value:function(i){this.props.innerRef&&this.props.innerRef(i),this.ref=i}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.type,l=s===void 0?"text":s,c=i.bsSize,f=i.valid,d=i.invalid,p=i.tag,v=i.addon,g=i.plaintext,y=i.innerRef,x=lne(i,sne),_=["switch","radio","checkbox"].indexOf(l)>-1,b=/\D/g,w=l==="textarea",S=l==="select",E=l==="range",C=p||(S||w?l:"input"),T="form-control";g?(T="".concat(T,"-plaintext"),C=p||"input"):E?T="form-range":S?T="form-select":_&&(v?T=null:T="form-check-input"),x.size&&b.test(x.size)&&(Nx(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),c=x.size,delete x.size);var A=Be(He(o,d&&"is-invalid",f&&"is-valid",c?S?"form-select-".concat(c):"form-control-".concat(c):!1,T),a);return(C==="input"||p&&typeof p=="function")&&(x.type=l==="switch"?"checkbox":l),x.children&&!(g||l==="select"||typeof C!="string"||C==="select")&&(Nx('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete x.children),V.createElement(C,Lw({},x,{ref:y,className:A,"aria-invalid":d}))}}]),n}(V.Component);Nn.propTypes=gne;var yne=["className","cssModule","tag","type","size"];function ug(){return ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _ne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var xne={className:$.string,cssModule:$.object,size:$.string,tag:it,type:$.string};function r0(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r;e.type;var o=e.size,a=bne(e,yne),s=Be(He(t,"input-group",o?"input-group-".concat(o):null),n);return e.type==="dropdown"?V.createElement(as,ug({},a,{className:s})):V.createElement(RI.Provider,{value:{insideInputGroup:!0}},V.createElement(i,ug({},a,{className:s})))}r0.propTypes=xne;var wne=["className","listClassName","cssModule","size","tag","listTag","aria-label"];function Iw(){return Iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ene(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Cne={children:$.node,className:$.string,listClassName:$.string,cssModule:$.object,size:$.string,tag:it,listTag:it,"aria-label":$.string};function PE(e){var t=e.className,n=e.listClassName,r=e.cssModule,i=e.size,o=e.tag,a=o===void 0?"nav":o,s=e.listTag,l=s===void 0?"ul":s,c=e["aria-label"],f=c===void 0?"pagination":c,d=Sne(e,wne),p=Be(He(t),r),v=Be(He(n,"pagination",One({},"pagination-".concat(i),!!i)),r);return V.createElement(a,{className:p,"aria-label":f},V.createElement(l,Iw({},d,{className:v})))}PE.propTypes=Cne;var Pne=["active","className","cssModule","disabled","tag"];function Dw(){return Dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Ane={active:$.bool,children:$.node,className:$.string,cssModule:$.object,disabled:$.bool,tag:it};function Js(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,a=o===void 0?"li":o,s=Tne(e,Pne),l=Be(He(n,"page-item",{active:t,disabled:i}),r);return V.createElement(a,Dw({},s,{className:l}))}Js.propTypes=Ane;var kne=["className","cssModule","next","previous","first","last","tag"];function Fw(){return Fw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Lne={"aria-label":$.string,children:$.node,className:$.string,cssModule:$.object,next:$.bool,previous:$.bool,first:$.bool,last:$.bool,tag:it};function el(e){var t=e.className,n=e.cssModule,r=e.next,i=e.previous,o=e.first,a=e.last,s=e.tag,l=s===void 0?"a":s,c=Nne(e,kne),f=Be(He(t,"page-link"),n),d;i?d="Previous":r?d="Next":o?d="First":a&&(d="Last");var p=e["aria-label"]||d,v;i?v="‹":r?v="›":o?v="«":a&&(v="»");var g=e.children;return g&&Array.isArray(g)&&g.length===0&&(g=null),!c.href&&l==="a"&&(l="button"),(i||r||o||a)&&(g=[V.createElement("span",{"aria-hidden":"true",key:"caret"},g||v),V.createElement("span",{className:"visually-hidden",key:"ariaLabel"},p)]),V.createElement(l,Fw({},c,{className:f,"aria-label":p}),g)}el.propTypes=Lne;var Rne=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function Bw(){return Bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Fne={children:$.node,className:$.string,closeClassName:$.string,closeAriaLabel:$.string,color:$.string,cssModule:$.object,fade:$.bool,innerRef:$.oneOfType([$.object,$.string,$.func]),isOpen:$.bool,tag:it,toggle:$.func,transition:$.shape(sr.propTypes)};function qI(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=r===void 0?"Close":r,o=e.cssModule,a=e.tag,s=a===void 0?"div":a,l=e.color,c=l===void 0?"success":l,f=e.isOpen,d=f===void 0?!0:f,p=e.toggle,v=e.children,g=e.transition,y=g===void 0?Sf(Sf({},sr.defaultProps),{},{unmountOnExit:!0}):g,x=e.fade,_=x===void 0?!0:x,b=e.innerRef,w=Ine(e,Rne),S=Be(He(t,"alert","alert-".concat(c),{"alert-dismissible":p}),o),E=Be(He("btn-close",n),o),C=Sf(Sf(Sf({},sr.defaultProps),y),{},{baseClass:_?y.baseClass:"",timeout:_?y.timeout:0});return V.createElement(sr,Bw({},w,C,{tag:s,className:S,in:d,role:"alert",innerRef:b}),p?V.createElement("button",{type:"button",className:E,"aria-label":i,onClick:p}):null,v)}qI.propTypes=Fne;var Bne=["className","cssModule","tag","active","disabled","action","color"];function Uw(){return Uw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Vne={action:$.bool,active:$.bool,className:$.string,cssModule:$.object,color:$.string,disabled:$.bool,tag:it},Wne=function(t){t.preventDefault()};function YI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"li":r,o=e.active,a=e.disabled,s=e.action,l=e.color,c=Une(e,Bne),f=Be(He(t,o?"active":!1,a?"disabled":!1,s?"list-group-item-action":!1,l?"list-group-item-".concat(l):!1,"list-group-item"),n);return a&&(c.onClick=Wne),V.createElement(i,Uw({},c,{className:f}))}YI.propTypes=Vne;function zw(e){"@babel/helpers - typeof";return zw=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},zw(e)}function t3(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 Hne(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fg(e){return fg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fg(e)}var ere=["defaultOpen"],op=function(e){Zne(n,e);var t=Xne(n);function n(r){var i;return Kne(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(ZI(i)),i}return Yne(n,[{key:"toggle",value:function(i){var o=this;this.setState(function(a){return{isOpen:!a.isOpen}},function(){o.props.onToggle&&o.props.onToggle(i,o.state.isOpen)})}},{key:"render",value:function(){return V.createElement(as,Vw({isOpen:this.state.isOpen,toggle:this.toggle},is(this.props,ere)))}}]),n}(R.Component);op.propTypes=Hne({defaultOpen:$.bool,onToggle:$.func},as.propTypes);function Hw(e){"@babel/helpers - typeof";return Hw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hw(e)}function n3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tre(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dg(e){return dg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dg(e)}var ure=["defaultOpen"],br=function(e){are(n,e);var t=sre(n);function n(r){var i;return rre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(XI(i)),i}return ore(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return V.createElement(n0,Gw({isOpen:this.state.isOpen,toggle:this.toggle},is(this.props,ure)))}}]),n}(R.Component);br.propTypes=tre({defaultOpen:$.bool},n0.propTypes);var Tn=[];for(var _1=0;_1<256;++_1)Tn.push((_1+256).toString(16).slice(1));function fre(e,t=0){return(Tn[e[t+0]]+Tn[e[t+1]]+Tn[e[t+2]]+Tn[e[t+3]]+"-"+Tn[e[t+4]]+Tn[e[t+5]]+"-"+Tn[e[t+6]]+Tn[e[t+7]]+"-"+Tn[e[t+8]]+Tn[e[t+9]]+"-"+Tn[e[t+10]]+Tn[e[t+11]]+Tn[e[t+12]]+Tn[e[t+13]]+Tn[e[t+14]]+Tn[e[t+15]]).toLowerCase()}var mm,dre=new Uint8Array(16);function hre(){if(!mm&&(mm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!mm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mm(dre)}var pre=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const r3={randomUUID:pre};function TE(e,t,n){if(r3.randomUUID&&!t&&!e)return r3.randomUUID();e=e||{};var r=e.random||(e.rng||hre)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,fre(r)}const mre=e=>({error:"border-danger",default:""})[e],vre=e=>({error:"text-danger",default:"text-muted"})[e],Ho=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=Ce({"col-md-12":i,"col-md-10 offset-md-1":!i});return m.jsx(Kn,{className:Ce("g-0",e),children:m.jsx("div",{className:o,children:m.jsx(mr,{className:mre(r),body:!0,children:m.jsxs("h3",{className:Ce("text-center mb-0",vre(r)),children:[n&&m.jsx(je,{icon:w6,spin:!0}),n&&m.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})},xt=({title:e,children:t,bodyClassName:n,...r})=>m.jsxs(mr,{...r,children:[e&&m.jsx(eu,{role:"heading","aria-level":4,children:e}),m.jsx(Jc,{className:n,children:t})]}),Qn=({children:e,type:t,className:n,small:r=!1})=>m.jsx(Kn,{className:n,children:m.jsx("div",{className:Ce({"col-md-10 offset-md-1":!r,"col-12":r}),children:m.jsx(xt,{role:"document",className:Ce("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:Ce({"p-2":r}),children:e})})}),QI=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]=[]),n[o].push(r)}else n[i]=r}),n},gre=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()},yre=QI,i0=gre,Kt=(e=!1)=>{const[t,n]=R.useState(e),r=R.useCallback(()=>n(a=>!a),[]),i=R.useCallback(()=>n(!0),[]),o=R.useCallback(()=>n(!1),[]);return[t,r,i,o]},JI=(e=!1,t=2e3,n=window.setTimeout,r=window.clearTimeout)=>{const[i,o]=R.useState(e),a=R.useRef(e),s=R.useRef(),l=R.useCallback(()=>{o(!a.current),s.current&&r(s.current),s.current=n(()=>o(a.current),t)},[r,t,n]);return[i,l]},jE=()=>{const{current:e}=R.useRef(`dom-${TE()}`);return e},ta=()=>R.useRef(null),ku=()=>{const{search:e}=vr();return R.useMemo(()=>QI(e),[e])},eD=({checked:e=!1,onChange:t,className:n,children:r,type:i,inline:o=!1})=>{const a=jE(),s=f=>t==null?void 0:t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return m.jsxs("span",{className:Ce("form-check",l,n),style:c,children:[m.jsx("input",{type:"checkbox",className:"form-check-input",id:a,checked:e,onChange:s}),m.jsx("label",{className:"form-check-label",htmlFor:a,children:r})]})},tD=e=>m.jsx(eD,{type:"checkbox",...e}),hl=e=>m.jsx(eD,{type:"switch",...e}),Nu=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>m.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[m.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),iv=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:a,labelClassName:s})=>{const l=jE();return m.jsx(Nu,{label:m.jsxs(m.Fragment,{children:[e,":"]}),className:a,labelClassName:s,id:l,children:m.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},bre=500;let ov;const i3=()=>{ov&&clearTimeout(ov),ov=null},ap=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i="",setTimeout_:o=setTimeout})=>{const[a,s]=R.useState(i),l=(c,f=bre)=>{s(c),i3(),ov=o(()=>{e(c),i3()},f)};return m.jsxs("div",{className:Ce("search-field",t),children:[m.jsx("input",{type:"text",className:Ce("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:a,onChange:c=>l(c.target.value)}),m.jsx(je,{icon:nq,className:"search-field__icon"}),m.jsx("button",{"aria-label":"Clear search",type:"button",className:"close search-field__close btn-close",hidden:a==="",id:"search-field__close",onClick:()=>l("",0)})]})},na=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:a=!1,minWidth:s,inline:l,size:c,...f})=>{const[d,p]=Kt(),v=Ce("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),g={minWidth:s&&`${s}px`};return m.jsxs(as,{isOpen:d,toggle:p,disabled:t,className:i,children:[m.jsx(ea,{size:c,caret:!o,className:v,color:"primary",...f,children:e}),m.jsx(ss,{className:"w-100",end:a,style:g,children:r})]})},o0=({children:e,minWidth:t,label:n="Options"})=>m.jsx(na,{text:m.jsx(je,{className:"px-1",icon:GK}),"aria-label":n,size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),pd=({children:e,...t})=>m.jsx(pE,{children:m.jsx(mE,{className:"nav-pills__nav-link",tag:s6,...t,children:e})}),nD=({children:e,fill:t=!1,className:n=""})=>m.jsx(mr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:m.jsx(hE,{pills:!0,fill:t,children:R.Children.map(e,r=>{if(!R.isValidElement(r)||r.type!==pd)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),a0=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",rD=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,a=n==="ASC"?-1:1;return r[t]>i[t]?o:a}),_re=e=>e.dir?`${e.field}-${e.dir}`:void 0,xre=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function sp({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const a=s=>()=>{const l=a0(s,t.field,t.dir);n(l?s:void 0,l)};return m.jsxs(op,{children:[m.jsxs(ea,{caret:!0,color:r?"primary":"link",className:Ce({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&m.jsx(m.Fragment,{children:"Order by"}),r&&!t.field&&m.jsx("i",{children:"Order by..."}),r&&t.field&&m.jsxs(m.Fragment,{children:[o&&"Order by: ",e[t.field]," - ",m.jsx("small",{children:t.dir??"DESC"})]})]}),m.jsxs(ss,{end:i,className:Ce("w-100",{"ordering-dropdown__menu--link":!r}),children:[Object.entries(e).map(([s,l])=>m.jsxs(Ne,{active:t.field===s,onClick:a(s),children:[l,t.field===s&&m.jsx(je,{icon:t.dir==="ASC"?ZK:LK,className:"ordering-dropdown__sort-icon"})]},s)),m.jsx(Ne,{divider:!0}),m.jsx(Ne,{disabled:!t.field,onClick:()=>n(),children:m.jsx("i",{children:"Clear selection"})})]})]})}const th="#4696e5",wre="rgba(70, 150, 229, 0.4)",qw="#f77f28",Ore="rgba(247, 127, 40, 0.4)",Sre="white",Ere="#161b22",Cre=e=>{var t;return(t=document.querySelector("html"))==null?void 0:t.setAttribute("data-theme",e)},AE=()=>{var e;return((e=document.querySelector("html"))==null?void 0:e.getAttribute("data-theme"))==="dark"},kE=(e=window.matchMedia.bind(window))=>e("(prefers-color-scheme: dark)").matches?"dark":"light",Pre=R.forwardRef(({isOpen:e,toggle:t,forceUpdate:n},r)=>{const[i,,o]=Kt(),a=R.useCallback(()=>{o(),n()},[n,o]);return m.jsxs(qI,{className:"app-update-banner",isOpen:e,toggle:t,tag:xt,color:"secondary",innerRef:r,children:[m.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),m.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",m.jsxs(qe,{role:"button",disabled:i,className:"ms-2",color:"secondary",size:"sm",onClick:a,children:[!i&&m.jsxs(m.Fragment,{children:["Restart now ",m.jsx(je,{icon:lq,className:"ms-1"})]}),i&&m.jsx(m.Fragment,{children:"Restarting..."})]})]})]})}),iD=({to:e="/",children:t="Home"})=>m.jsx("div",{className:"home",children:m.jsxs(xt,{className:"p-4",children:[m.jsx("h2",{children:"Oops! We could not find requested route."}),m.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),m.jsx("br",{}),m.jsx(St,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})});function Di(e){return R.useRef(e).current}function Fi(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}const Tre=async()=>{var t;(await((t=navigator.serviceWorker)==null?void 0:t.getRegistrations())??[]).forEach(({waiting:n})=>{n==null||n.addEventListener("statechange",r=>{var i;((i=r.target)==null?void 0:i.state)==="activated"&&window.location.reload()}),n==null||n.postMessage({type:"SKIP_WAITING"})})},oD=({fetchServers:e,servers:t,settings:n,appUpdated:r,resetAppUpdate:i})=>{var x;const{MainHeader:o,Home:a,ShlinkWebComponentContainer:s,CreateServer:l,EditServer:c,Settings:f,ManageServers:d,ShlinkVersionsContainer:p}=Di(oD),v=vr(),g=R.useRef(t),y=v.pathname==="/";return R.useEffect(()=>{Object.keys(g.current).length===0&&e()},[e]),R.useEffect(()=>{var _;Cre(((_=n.ui)==null?void 0:_.theme)??kE())},[(x=n.ui)==null?void 0:x.theme]),m.jsxs("div",{className:"container-fluid app-container",children:[m.jsx(o,{}),m.jsxs("div",{className:"app",children:[m.jsx("div",{className:Ce("shlink-wrapper",{"d-flex d-md-block align-items-center":y}),children:m.jsxs(qy,{children:[m.jsx(ot,{index:!0,element:m.jsx(a,{})}),m.jsx(ot,{path:"/settings/*",element:m.jsx(f,{})}),m.jsx(ot,{path:"/manage-servers",element:m.jsx(d,{})}),m.jsx(ot,{path:"/server/create",element:m.jsx(l,{})}),m.jsx(ot,{path:"/server/:serverId/edit",element:m.jsx(c,{})}),m.jsx(ot,{path:"/server/:serverId/*",element:m.jsx(s,{})}),m.jsx(ot,{path:"*",element:m.jsx(iD,{})})]})}),m.jsx("div",{className:"shlink-footer",children:m.jsx(p,{})})]}),m.jsx(Pre,{isOpen:r,toggle:i,forceUpdate:Tre})]})},jre=Fi(oD,["MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"]);function jn(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 Are=typeof Symbol=="function"&&Symbol.observable||"@@observable",o3=Are,x1=()=>Math.random().toString(36).substring(7).split("").join("."),kre={INIT:`@@redux/INIT${x1()}`,REPLACE:`@@redux/REPLACE${x1()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${x1()}`},hg=kre;function NE(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 aD(e,t,n){if(typeof e!="function")throw new Error(jn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(jn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(jn(1));return n(aD)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,l=!1;function c(){a===o&&(a=new Map,o.forEach((x,_)=>{a.set(_,x)}))}function f(){if(l)throw new Error(jn(3));return i}function d(x){if(typeof x!="function")throw new Error(jn(4));if(l)throw new Error(jn(5));let _=!0;c();const b=s++;return a.set(b,x),function(){if(_){if(l)throw new Error(jn(6));_=!1,c(),a.delete(b),o=null}}}function p(x){if(!NE(x))throw new Error(jn(7));if(typeof x.type>"u")throw new Error(jn(8));if(typeof x.type!="string")throw new Error(jn(17));if(l)throw new Error(jn(9));try{l=!0,i=r(i,x)}finally{l=!1}return(o=a).forEach(b=>{b()}),x}function v(x){if(typeof x!="function")throw new Error(jn(10));r=x,p({type:hg.REPLACE})}function g(){const x=d;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(jn(11));function b(){const S=_;S.next&&S.next(f())}return b(),{unsubscribe:x(b)}},[o3](){return this}}}return p({type:hg.INIT}),{dispatch:p,subscribe:d,getState:f,replaceReducer:v,[o3]:g}}function Nre(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:hg.INIT})>"u")throw new Error(jn(12));if(typeof n(void 0,{type:hg.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(jn(13))})}function ME(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw s&&s.type,new Error(jn(14));c[d]=g,l=l||g!==v}return l=l||r.length!==Object.keys(a).length,l?c:a}}function pg(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Mre(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(jn(15))};const a={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},s=e.map(l=>l(a));return o=pg(...s)(i.dispatch),{...i,dispatch:o}}}function Lre(e){return NE(e)&&"type"in e&&typeof e.type=="string"}var sD=Symbol.for("immer-nothing"),a3=Symbol.for("immer-draftable"),$r=Symbol.for("immer-state");function Ci(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var tu=Object.getPrototypeOf;function pl(e){return!!e&&!!e[$r]}function Go(e){var t;return e?lD(e)||Array.isArray(e)||!!e[a3]||!!((t=e.constructor)!=null&&t[a3])||l0(e)||c0(e):!1}var Rre=Object.prototype.constructor.toString();function lD(e){if(!e||typeof e!="object")return!1;const t=tu(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Rre}function nh(e,t){s0(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function s0(e){const t=e[$r];return t?t.type_:Array.isArray(e)?1:l0(e)?2:c0(e)?3:0}function Yw(e,t){return s0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function cD(e,t,n){const r=s0(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function $re(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function l0(e){return e instanceof Map}function c0(e){return e instanceof Set}function As(e){return e.copy_||e.base_}function Zw(e,t){if(l0(e))return new Map(e);if(c0(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&lD(e))return tu(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[$r];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=Ire),Object.freeze(e),t&&nh(e,(n,r)=>LE(r,!0))),e}function Ire(){Ci(2)}function u0(e){return Object.isFrozen(e)}var Dre={};function ml(e){const t=Dre[e];return t||Ci(0,e),t}var rh;function uD(){return rh}function Fre(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function s3(e,t){t&&(ml("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Xw(e){Qw(e),e.drafts_.forEach(Bre),e.drafts_=null}function Qw(e){e===rh&&(rh=e.parent_)}function l3(e){return rh=Fre(rh,e)}function Bre(e){const t=e[$r];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function c3(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[$r].modified_&&(Xw(t),Ci(4)),Go(e)&&(e=mg(t,e),t.parent_||vg(t,e)),t.patches_&&ml("Patches").generateReplacementPatches_(n[$r].base_,e,t.patches_,t.inversePatches_)):e=mg(t,n,[]),Xw(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sD?e:void 0}function mg(e,t,n){if(u0(t))return t;const r=t[$r];if(!r)return nh(t,(i,o)=>u3(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return vg(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),nh(o,(s,l)=>u3(e,r,i,s,l,n,a)),vg(e,i,!1),n&&e.patches_&&ml("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function u3(e,t,n,r,i,o,a){if(pl(i)){const s=o&&t&&t.type_!==3&&!Yw(t.assigned_,r)?o.concat(r):void 0,l=mg(e,i,s);if(cD(n,r,l),pl(l))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(Go(i)&&!u0(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;mg(e,i),(!t||!t.scope_.parent_)&&vg(e,i)}}function vg(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&LE(t,n)}function Ure(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:uD(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=RE;n&&(i=[r],o=ih);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var RE={get(e,t){if(t===$r)return e;const n=As(e);if(!Yw(n,t))return zre(e,n,t);const r=n[t];return e.finalized_||!Go(r)?r:r===w1(e.base_,t)?(O1(e),e.copy_[t]=e2(r,e)):r},has(e,t){return t in As(e)},ownKeys(e){return Reflect.ownKeys(As(e))},set(e,t,n){const r=fD(As(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=w1(As(e),t),o=i==null?void 0:i[$r];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if($re(n,i)&&(n!==void 0||Yw(e.base_,t)))return!0;O1(e),Jw(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 w1(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,O1(e),Jw(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=As(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Ci(11)},getPrototypeOf(e){return tu(e.base_)},setPrototypeOf(){Ci(12)}},ih={};nh(RE,(e,t)=>{ih[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ih.deleteProperty=function(e,t){return ih.set.call(this,e,t,void 0)};ih.set=function(e,t,n){return RE.set.call(this,e[0],t,n,e[0])};function w1(e,t){const n=e[$r];return(n?As(n):e)[t]}function zre(e,t,n){var i;const r=fD(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function fD(e,t){if(!(t in e))return;let n=tu(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=tu(n)}}function Jw(e){e.modified_||(e.modified_=!0,e.parent_&&Jw(e.parent_))}function O1(e){e.copy_||(e.copy_=Zw(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Vre=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(l=o,...c){return a.produce(l,f=>n.call(this,f,...c))}}typeof n!="function"&&Ci(6),r!==void 0&&typeof r!="function"&&Ci(7);let i;if(Go(t)){const o=l3(this),a=e2(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?Xw(o):Qw(o)}return s3(o,r),c3(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===sD&&(i=void 0),this.autoFreeze_&&LE(i,!0),r){const o=[],a=[];ml("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Ci(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,l=>t(l,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Go(e)||Ci(8),pl(e)&&(e=Wre(e));const t=l3(this),n=e2(e,void 0);return n[$r].isManual_=!0,Qw(t),n}finishDraft(e,t){const n=e&&e[$r];(!n||!n.isManual_)&&Ci(9);const{scope_:r}=n;return s3(r,t),c3(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}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=ml("Patches").applyPatches_;return pl(e)?r(e,t):this.produce(e,i=>r(i,t))}};function e2(e,t){const n=l0(e)?ml("MapSet").proxyMap_(e,t):c0(e)?ml("MapSet").proxySet_(e,t):Ure(e,t);return(t?t.scope_:uD()).drafts_.push(n),n}function Wre(e){return pl(e)||Ci(10,e),dD(e)}function dD(e){if(!Go(e)||u0(e))return e;const t=e[$r];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Zw(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Zw(e,!0);return nh(n,(r,i)=>{cD(n,r,dD(i))}),t&&(t.finalized_=!1),n}var Ir=new Vre,hD=Ir.produce;Ir.produceWithPatches.bind(Ir);Ir.setAutoFreeze.bind(Ir);Ir.setUseStrictShallowCopy.bind(Ir);Ir.applyPatches.bind(Ir);Ir.createDraft.bind(Ir);Ir.finishDraft.bind(Ir);function pD(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var Hre=pD(),Gre=pD,Kre=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?pg:pg.apply(null,arguments)},qre=e=>e&&typeof e.match=="function";function Jn(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(ki(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=>Lre(r)&&r.type===e,n}var mD=class Kf extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Kf.prototype)}static get[Symbol.species](){return Kf}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Kf(...t[0].concat(this)):new Kf(...t.concat(this))}};function f3(e){return Go(e)?hD(e,()=>{}):e}function d3(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error(ki(10));const r=n.insert(t,e);return e.set(t,r),r}function Yre(e){return typeof e=="boolean"}var Zre=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new mD;return n&&(Yre(n)?a.push(Hre):a.push(Gre(n.extraArgument))),a},Xre="RTK_autoBatch",vD=e=>t=>{setTimeout(t,e)},Qre=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:vD(10),Jre=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?Qre:e.type==="callback"?e.queueNotification:vD(e.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const d=()=>i&&f(),p=r.subscribe(d);return s.add(f),()=>{p(),s.delete(f)}},dispatch(f){var d;try{return i=!((d=f==null?void 0:f.meta)!=null&&d[Xre]),o=!i,o&&(a||(a=!0,l(c))),r.dispatch(f)}finally{i=!0}}})},eie=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new mD(e);return r&&i.push(Jre(typeof r=="object"?r:void 0)),i};function gD(e){const t=Zre(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{};let s;if(typeof n=="function")s=n;else if(NE(n))s=ME(n);else throw new Error(ki(1));let l;typeof r=="function"?l=r(t):l=t();let c=pg;i&&(c=Kre({trace:!1,...typeof i=="object"&&i}));const f=Mre(...l),d=eie(f);let p=typeof a=="function"?a(d):d();const v=c(...p);return aD(s,o,v)}function yD(e){const t={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(ki(28));if(s in t)throw new Error(ki(29));return t[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function tie(e){return typeof e=="function"}function nie(e,t){let[n,r,i]=yD(t),o;if(tie(e))o=()=>f3(e());else{const s=f3(e);o=()=>s}function a(s=o(),l){let c=[n[l.type],...r.filter(({matcher:f})=>f(l)).map(({reducer:f})=>f)];return c.filter(f=>!!f).length===0&&(c=[i]),c.reduce((f,d)=>{if(d)if(pl(f)){const v=d(f,l);return v===void 0?f:v}else{if(Go(f))return hD(f,p=>d(p,l));{const p=d(f,l);if(p===void 0){if(f===null)return f;throw new Error(ki(9))}return p}}return f},s)}return a.getInitialState=o,a}var rie=(e,t)=>qre(e)?e.match(t):e(t);function iie(...e){return t=>e.some(n=>rie(n,t))}var oie="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",aie=(e=21)=>{let t="",n=e;for(;n--;)t+=oie[Math.random()*64|0];return t},sie=["name","message","stack","code"],S1=class{constructor(e,t){Ul(this,"_type");this.payload=e,this.meta=t}},h3=class{constructor(e,t){Ul(this,"_type");this.payload=e,this.meta=t}},lie=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of sie)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},bD=(()=>{function e(t,n,r){const i=Jn(t+"/fulfilled",(l,c,f,d)=>({payload:l,meta:{...d||{},arg:f,requestId:c,requestStatus:"fulfilled"}})),o=Jn(t+"/pending",(l,c,f)=>({payload:void 0,meta:{...f||{},arg:c,requestId:l,requestStatus:"pending"}})),a=Jn(t+"/rejected",(l,c,f,d,p)=>({payload:d,error:(r&&r.serializeError||lie)(l||"Rejected"),meta:{...p||{},arg:f,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"}}));function s(l){return(c,f,d)=>{const p=r!=null&&r.idGenerator?r.idGenerator(l):aie(),v=new AbortController;let g,y;function x(b){y=b,v.abort()}const _=async function(){var S,E;let b;try{let C=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,l,{getState:f,extra:d});if(uie(C)&&(C=await C),C===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const T=new Promise((A,D)=>{g=()=>{D({name:"AbortError",message:y||"Aborted"})},v.signal.addEventListener("abort",g)});c(o(p,l,(E=r==null?void 0:r.getPendingMeta)==null?void 0:E.call(r,{requestId:p,arg:l},{getState:f,extra:d}))),b=await Promise.race([T,Promise.resolve(n(l,{dispatch:c,getState:f,extra:d,requestId:p,signal:v.signal,abort:x,rejectWithValue:(A,D)=>new S1(A,D),fulfillWithValue:(A,D)=>new h3(A,D)})).then(A=>{if(A instanceof S1)throw A;return A instanceof h3?i(A.payload,p,l,A.meta):i(A,p,l)})])}catch(C){b=C instanceof S1?a(null,p,l,C.payload,C.meta):a(C,p,l)}finally{g&&v.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&a.match(b)&&b.meta.condition||c(b),b}();return Object.assign(_,{abort:x,requestId:p,arg:l,unwrap(){return _.then(cie)}})}}return Object.assign(s,{pending:o,rejected:a,fulfilled:i,settled:iie(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function cie(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function uie(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var fie=Symbol.for("rtk-slice-createasyncthunk");function die(e,t){return`${e}/${t}`}function hie({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[fie];return function(i){const{name:o,reducerPath:a=o}=i;if(!o)throw new Error(ki(11));typeof process<"u";const s=(typeof i.reducers=="function"?i.reducers(mie()):i.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(w,S){const E=typeof w=="string"?w:w.type;if(!E)throw new Error(ki(12));if(E in c.sliceCaseReducersByType)throw new Error(ki(13));return c.sliceCaseReducersByType[E]=S,f},addMatcher(w,S){return c.sliceMatchers.push({matcher:w,reducer:S}),f},exposeAction(w,S){return c.actionCreators[w]=S,f},exposeCaseReducer(w,S){return c.sliceCaseReducersByName[w]=S,f}};l.forEach(w=>{const S=s[w],E={reducerName:w,type:die(o,w),createNotation:typeof i.reducers=="function"};gie(S)?bie(E,S,f,t):vie(E,S,f)});function d(){const[w={},S=[],E=void 0]=typeof i.extraReducers=="function"?yD(i.extraReducers):[i.extraReducers],C={...w,...c.sliceCaseReducersByType};return nie(i.initialState,T=>{for(let A in C)T.addCase(A,C[A]);for(let A of c.sliceMatchers)T.addMatcher(A.matcher,A.reducer);for(let A of S)T.addMatcher(A.matcher,A.reducer);E&&T.addDefaultCase(E)})}const p=w=>w,v=new Map;let g;function y(w,S){return g||(g=d()),g(w,S)}function x(){return g||(g=d()),g.getInitialState()}function _(w,S=!1){function E(T){let A=T[w];return typeof A>"u"&&S&&(A=x()),A}function C(T=p){const A=d3(v,S,{insert:()=>new WeakMap});return d3(A,T,{insert:()=>{const D={};for(const[N,I]of Object.entries(i.selectors??{}))D[N]=pie(I,T,x,S);return D}})}return{reducerPath:w,getSelectors:C,get selectors(){return C(E)},selectSlice:E}}const b={name:o,reducer:y,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x,..._(a),injectInto(w,{reducerPath:S,...E}={}){const C=S??a;return w.inject({reducerPath:C,reducer:y},E),{...b,..._(C,!0)}}};return b}}function pie(e,t,n,r){function i(o,...a){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...a)}return i.unwrapped=e,i}var Qt=hie();function mie(){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 vie({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!yie(r))throw new Error(ki(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?Jn(e,a):Jn(e))}function gie(e){return e._reducerDefinitionType==="asyncThunk"}function yie(e){return e._reducerDefinitionType==="reducerWithPrepare"}function bie({type:e,reducerName:t},n,r,i){if(!i)throw new Error(ki(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:c,options:f}=n,d=i(e,o,f);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:a||vm,pending:s||vm,rejected:l||vm,settled:c||vm})}function vm(){}function ki(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:_ie,reducer:xie}=Qt({name:"shlink/appUpdates",initialState:!1,reducers:{appUpdateAvailable:()=>!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:wie,resetAppUpdate:Oie}=_ie,Sie=xie,Eie=(e,t)=>{e.factory("App",jre),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>wie),e.serviceFactory("resetAppUpdate",()=>Oie)},p3={"Content-Type":"application/json"},m3=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...p3}}:{headers:p3}:e;let Cie=class{constructor(t=window.fetch.bind(window)){this.fetch=t}async jsonRequest(t,n){return this.fetch(t,m3(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i})}async emptyRequest(t,n){return this.fetch(t,m3(n)).then(async r=>{if(!r.ok)throw await r.json()})}};var $E=(e=>(e.INVALID_ARGUMENT="https://shlink.io/api/error/invalid-data",e.INVALID_SHORT_URL_DELETION="https://shlink.io/api/error/invalid-short-url-deletion",e.DOMAIN_NOT_FOUND="https://shlink.io/api/error/domain-not-found",e.FORBIDDEN_OPERATION="https://shlink.io/api/error/forbidden-tag-operation",e.INVALID_SLUG="https://shlink.io/api/error/non-unique-slug",e.INVALID_SHORTCODE="https://shlink.io/api/error/short-url-not-found",e.TAG_CONFLICT="https://shlink.io/api/error/tag-conflict",e.TAG_NOT_FOUND="https://shlink.io/api/error/tag-not-found",e.MERCURE_NOT_CONFIGURED="https://shlink.io/api/error/mercure-not-configured",e.INVALID_AUTHORIZATION="https://shlink.io/api/error/missing-authentication",e.INVALID_API_KEY="https://shlink.io/api/error/invalid-api-key",e.NOT_FOUND="https://shlink.io/api/error/not-found",e.INVALID_URL="https://shlink.io/api/error/invalid-url",e))($E||{});const _D=(e,t)=>e.reduce((n,r)=>{const i=t(r);return n[i]=(n[i]||0)+1,n},{}),Pie=(e,t)=>e.reduce((n,r)=>{const i=t(r);return(n[i]=n[i]||[]).push(r),n},{}),E1=e=>Object.prototype.toString.call(e)==="[object Object]",xD=(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}},f0=(e,t)=>{const n={...e};return!E1(e)||!E1(t)||Object.keys(t).forEach(r=>{E1(t[r])?n[r]=r in e&&e[r]!==void 0?f0(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},IE=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),Tie=(e,t)=>[...e].sort((n,r)=>{const i=t(n),o=t(r);return i===o?0:i{const n=[];for(let r=0;rObject.fromEntries(e.map((n,r)=>[n,t[r]]));function Ke(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function $i(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function DE(e,t){const n=Ke(e);return isNaN(t)?$i(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function jie(e,t){const n=Ke(e);if(isNaN(t))return $i(e,NaN);if(!t)return n;const r=n.getDate(),i=$i(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const o=i.getDate();return r>=o?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function Aie(e,t){const{years:n=0,months:r=0,weeks:i=0,days:o=0,hours:a=0,minutes:s=0,seconds:l=0}=t,c=Ke(e),f=r||n?jie(c,r+n*12):c,d=o||i?DE(f,o+i*7):f,p=s+a*60,g=(l+p*60)*1e3;return $i(e,d.getTime()+g)}const wD=6048e5,kie=864e5,OD=6e4,FE=36e5,gm=43200,g3=1440;let Nie={};function lp(){return Nie}function oh(e,t){var s,l,c,f;const n=lp(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,i=Ke(e),o=i.getDay(),a=(o=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function vl(e){const t=Ke(e);return t.setHours(0,0,0,0),t}function gg(e){const t=Ke(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 ED(e,t){const n=vl(e),r=vl(t),i=+n-gg(n),o=+r-gg(r);return Math.round((i-o)/kie)}function Mie(e){const t=SD(e),n=$i(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ah(n)}function CD(e){let t;return e.forEach(function(n){const r=Ke(n);(t===void 0||t{const r=Ke(n);(!t||t>r||isNaN(+r))&&(t=r)}),t||new Date(NaN)}function av(e,t){const n=Ke(e),r=Ke(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Rie(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function $ie(e){if(!Rie(e)&&typeof e!="number")return!1;const t=Ke(e);return!isNaN(Number(t))}function Iie(e,t){const n=Ke(e),r=Ke(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function cp(e,t){const n=Ke(e),r=Ke(t),i=y3(n,r),o=Math.abs(ED(n,r));n.setDate(n.getDate()-i*o);const a=+(y3(n,r)===-i),s=i*(o-a);return s===0?0:s}function y3(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 BE(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function PD(e,t){return+Ke(e)-+Ke(t)}function Die(e,t,n){const r=PD(e,t)/FE;return BE(n==null?void 0:n.roundingMethod)(r)}function nu(e){const t=Ke(e);return t.setHours(23,59,59,999),t}function Fie(e){const t=Ke(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Bie(e){const t=Ke(e);return+nu(t)==+Fie(t)}function yg(e,t){const n=Ke(e),r=Ke(t),i=av(n,r),o=Math.abs(Iie(n,r));let a;if(o<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);let s=av(n,r)===-i;Bie(Ke(e))&&o===1&&av(e,r)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function Uie(e,t,n){const r=PD(e,t)/1e3;return BE(n==null?void 0:n.roundingMethod)(r)}function zie(e,t,n){const r=cp(e,t)/7;return BE(n==null?void 0:n.roundingMethod)(r)}function Vie(e){const t=Ke(e),n=$i(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Wie(e,t){const n=t==null?void 0:t.weekStartsOn,r=Ke(e),i=r.getDay(),o=(i{let r;const i=Gie[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function C1(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const qie={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yie={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Zie={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Xie={date:C1({formats:qie,defaultWidth:"full"}),time:C1({formats:Yie,defaultWidth:"full"}),dateTime:C1({formats:Zie,defaultWidth:"full"})},Qie={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Jie=(e,t,n,r)=>Qie[e];function Ef(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const eoe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},toe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},noe={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"]},roe={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"]},ioe={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"}},ooe={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"}},aoe=(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"},soe={ordinalNumber:aoe,era:Ef({values:eoe,defaultWidth:"wide"}),quarter:Ef({values:toe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ef({values:noe,defaultWidth:"wide"}),day:Ef({values:roe,defaultWidth:"wide"}),dayPeriod:Ef({values:ioe,defaultWidth:"wide",formattingValues:ooe,defaultFormattingWidth:"wide"})};function Cf(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 a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?coe(s,d=>d.test(a)):loe(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const f=t.slice(a.length);return{value:c,rest:f}}}function loe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function coe(e,t){for(let n=0;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 a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const foe=/^(\d+)(th|st|nd|rd)?/i,doe=/\d+/i,hoe={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},poe={any:[/^b/i,/^(a|c)/i]},moe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},voe={any:[/1/i,/2/i,/3/i,/4/i]},goe={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},yoe={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]},boe={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},_oe={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]},xoe={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},woe={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}},Ooe={ordinalNumber:uoe({matchPattern:foe,parsePattern:doe,valueCallback:e=>parseInt(e,10)}),era:Cf({matchPatterns:hoe,defaultMatchWidth:"wide",parsePatterns:poe,defaultParseWidth:"any"}),quarter:Cf({matchPatterns:moe,defaultMatchWidth:"wide",parsePatterns:voe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cf({matchPatterns:goe,defaultMatchWidth:"wide",parsePatterns:yoe,defaultParseWidth:"any"}),day:Cf({matchPatterns:boe,defaultMatchWidth:"wide",parsePatterns:_oe,defaultParseWidth:"any"}),dayPeriod:Cf({matchPatterns:xoe,defaultMatchWidth:"any",parsePatterns:woe,defaultParseWidth:"any"})},TD={code:"en-US",formatDistance:Kie,formatLong:Xie,formatRelative:Jie,localize:soe,match:Ooe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Soe(e){const t=Ke(e);return ED(t,Vie(t))+1}function Eoe(e){const t=Ke(e),n=+ah(t)-+Mie(t);return Math.round(n/wD)+1}function jD(e,t){var f,d,p,v;const n=Ke(e),r=n.getFullYear(),i=lp(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((v=(p=i.locale)==null?void 0:p.options)==null?void 0:v.firstWeekContainsDate)??1,a=$i(e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=oh(a,t),l=$i(e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=oh(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Coe(e,t){var s,l,c,f;const n=lp(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,i=jD(e,t),o=$i(e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),oh(o,t)}function Poe(e,t){const n=Ke(e),r=+oh(n,t)-+Coe(n,t);return Math.round(r/wD)+1}function nt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const fa={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return nt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):nt(n+1,2)},d(e,t){return nt(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 nt(e.getHours()%12||12,t.length)},H(e,t){return nt(e.getHours(),t.length)},m(e,t){return nt(e.getMinutes(),t.length)},s(e,t){return nt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return nt(i,t.length)}},Kl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},b3={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 fa.y(e,t)},Y:function(e,t,n,r){const i=jD(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return nt(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):nt(o,t.length)},R:function(e,t){const n=SD(e);return nt(n,t.length)},u:function(e,t){const n=e.getFullYear();return nt(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 nt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return nt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return fa.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 nt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Poe(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):nt(i,t.length)},I:function(e,t,n){const r=Eoe(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):nt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):fa.d(e,t)},D:function(e,t,n){const r=Soe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):nt(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 nt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return nt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return nt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){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=Kl.noon:r===0?i=Kl.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=Kl.evening:r>=12?i=Kl.afternoon:r>=4?i=Kl.morning:i=Kl.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 fa.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):fa.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):nt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):nt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):fa.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):fa.s(e,t)},S:function(e,t){return fa.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return x3(r);case"XXXX":case"XX":return ks(r);case"XXXXX":case"XXX":default:return ks(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return x3(r);case"xxxx":case"xx":return ks(r);case"xxxxx":case"xxx":default:return ks(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_3(r,":");case"OOOO":default:return"GMT"+ks(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_3(r,":");case"zzzz":default:return"GMT"+ks(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return nt(r,t.length)},T:function(e,t,n){const r=e.getTime();return nt(r,t.length)}};function _3(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+nt(o,2)}function x3(e,t){return e%60===0?(e>0?"-":"+")+nt(Math.abs(e)/60,2):ks(e,t)}function ks(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=nt(Math.trunc(r/60),2),o=nt(r%60,2);return n+i+t+o}const w3=(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"})}},AD=(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"})}},Toe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return w3(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}}",w3(r,t)).replace("{{time}}",AD(i,t))},joe={p:AD,P:Toe},Aoe=/^D+$/,koe=/^Y+$/,Noe=["D","DD","YY","YYYY"];function Moe(e){return Aoe.test(e)}function Loe(e){return koe.test(e)}function Roe(e,t,n){const r=$oe(e,t,n);if(console.warn(r),Noe.includes(e))throw new RangeError(r)}function $oe(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 Ioe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Doe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Foe=/^'([^]*?)'?$/,Boe=/''/g,Uoe=/[a-zA-Z]/;function bg(e,t,n){var f,d,p,v;const r=lp(),i=r.locale??TD,o=r.firstWeekContainsDate??((d=(f=r.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,a=r.weekStartsOn??((v=(p=r.locale)==null?void 0:p.options)==null?void 0:v.weekStartsOn)??0,s=Ke(e);if(!$ie(s))throw new RangeError("Invalid time value");let l=t.match(Doe).map(g=>{const y=g[0];if(y==="p"||y==="P"){const x=joe[y];return x(g,i.formatLong)}return g}).join("").match(Ioe).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const y=g[0];if(y==="'")return{isToken:!1,value:zoe(g)};if(b3[y])return{isToken:!0,value:g};if(y.match(Uoe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:g}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(g=>{if(!g.isToken)return g.value;const y=g.value;(Loe(y)||Moe(y))&&Roe(y,t,String(e));const x=b3[y[0]];return x(s,y,i.localize,c)}).join("")}function zoe(e){const t=e.match(Foe);return t?t[1].replace(Boe,"'"):e}function Voe(e,t,n){const r=lp(),i=(n==null?void 0:n.locale)??r.locale??TD,o=2520,a=av(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const s=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:a});let l,c;a>0?(l=Ke(t),c=Ke(e)):(l=Ke(e),c=Ke(t));const f=Uie(c,l),d=(gg(c)-gg(l))/1e3,p=Math.round((f-d)/60);let v;if(p<2)return n!=null&&n.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,s):f<10?i.formatDistance("lessThanXSeconds",10,s):f<20?i.formatDistance("lessThanXSeconds",20,s):f<40?i.formatDistance("halfAMinute",0,s):f<60?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",1,s):p===0?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",p,s);if(p<45)return i.formatDistance("xMinutes",p,s);if(p<90)return i.formatDistance("aboutXHours",1,s);if(pr.getTime()}function _g(e,t){const n=Ke(e),r=Ke(t);return+n<+r}function t2(e,t){const n=Ke(e),r=Ke(t);return+n==+r}function Koe(e,t){const n=+Ke(e),[r,i]=[+Ke(t.start),+Ke(t.end)].sort((o,a)=>o-a);return n>=r&&n<=i}function xg(e,t){return DE(e,-t)}function Ya(e,t){const r=Xoe(e);let i;if(r.date){const l=Qoe(r.date,2);i=Joe(l.restDateString,l.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const o=i.getTime();let a=0,s;if(r.time&&(a=eae(r.time),isNaN(a)))return new Date(NaN);if(r.timezone){if(s=tae(r.timezone),isNaN(s))return new Date(NaN)}else{const l=new Date(o+a),c=new Date(0);return c.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),c.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),c}return new Date(o+a+s)}const ym={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},qoe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Yoe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Zoe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Xoe(e){const t={},n=e.split(ym.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],ym.timeZoneDelimiter.test(t.date)&&(t.date=e.split(ym.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=ym.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Qoe(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 Joe(e,t){if(t===null)return new Date(NaN);const n=e.match(qoe);if(!n)return new Date(NaN);const r=!!n[4],i=Pf(n[1]),o=Pf(n[2])-1,a=Pf(n[3]),s=Pf(n[4]),l=Pf(n[5])-1;if(r)return aae(t,s,l)?nae(t,s,l):new Date(NaN);{const c=new Date(0);return!iae(t,o,a)||!oae(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}}function Pf(e){return e?parseInt(e):1}function eae(e){const t=e.match(Yoe);if(!t)return NaN;const n=P1(t[1]),r=P1(t[2]),i=P1(t[3]);return sae(n,r,i)?n*FE+r*OD+i*1e3:NaN}function P1(e){return e&&parseFloat(e.replace(",","."))||0}function tae(e){if(e==="Z")return 0;const t=e.match(Zoe);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return lae(r,i)?n*(r*FE+i*OD):NaN}function nae(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 rae=[31,null,31,30,31,30,31,31,30,31,30,31];function kD(e){return e%400===0||e%4===0&&e%100!==0}function iae(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(rae[t]||(kD(e)?29:28))}function oae(e,t){return t>=1&&t<=(kD(e)?366:365)}function aae(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function sae(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function lae(e,t){return t>=0&&t<=59}const pr=({href:e,children:t,rel:n,...r})=>m.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),cae="Left",uae="Right",fae="Up",dae="Down",xc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},n2={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},O3="mousemove",S3="mouseup",hae="touchend",pae="touchmove",mae="touchstart";function vae(e,t,n,r){return e>t?n>0?uae:cae:r>0?dae:fae}function E3(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 gae(e,t){const n=f=>{const d="touches"in f;d&&f.touches.length>1||e((p,v)=>{v.trackMouse&&!d&&(document.addEventListener(O3,r),document.addEventListener(S3,a));const{clientX:g,clientY:y}=d?f.touches[0]:f,x=E3([g,y],v.rotationAngle);return v.onTouchStartOrOnMouseDown&&v.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),n2),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((d,p)=>{const v="touches"in f;if(v&&f.touches.length>1)return d;if(f.timeStamp-d.start>p.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:g,clientY:y}=v?f.touches[0]:f,[x,_]=E3([g,y],p.rotationAngle),b=x-d.xy[0],w=_-d.xy[1],S=Math.abs(b),E=Math.abs(w),C=(f.timeStamp||0)-d.start,T=Math.sqrt(S*S+E*E)/(C||1),A=[b/(C||1),w/(C||1)],D=vae(S,E,b,w),N=typeof p.delta=="number"?p.delta:p.delta[D.toLowerCase()]||xc.delta;if(S{e((d,p)=>{let v;if(d.swiping&&d.eventData){if(f.timeStamp-d.start{document.removeEventListener(O3,r),document.removeEventListener(S3,a)},a=f=>{o(),i(f)},s=(f,d)=>{let p=()=>{};if(f&&f.addEventListener){const v=Object.assign(Object.assign({},xc.touchEventOptions),d.touchEventOptions),g=[[mae,n,v],[pae,r,Object.assign(Object.assign({},v),d.preventScrollOnSwipe?{passive:!1}:{})],[hae,i,v]];g.forEach(([y,x,_])=>f.addEventListener(y,x,_)),p=()=>g.forEach(([y,x])=>f.removeEventListener(y,x))}return p},c={ref:f=>{f!==null&&e((d,p)=>{if(d.el===f)return d;const v={};return d.el&&d.el!==f&&d.cleanUpTouch&&(d.cleanUpTouch(),v.cleanUpTouch=void 0),p.trackTouch&&f&&(v.cleanUpTouch=s(f,p)),Object.assign(Object.assign(Object.assign({},d),{el:f}),v)})}};return t.trackMouse&&(c.onMouseDown=n),[c,s]}function yae(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 bae(e){const{trackMouse:t}=e,n=R.useRef(Object.assign({},n2)),r=R.useRef(Object.assign({},xc)),i=R.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[a,s]=R.useMemo(()=>gae(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=yae(n.current,r.current,i.current,s),a}var r2={exports:{}};/** @license * eventsource.js * Available under MIT License (MIT) * https://github.com/Yaffle/EventSource/ */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,a=n.XDomainRequest,s=n.ActiveXObject,l=n.EventSource,c=n.document,f=n.Promise,d=n.fetch,p=n.Response,v=n.TextDecoder,g=n.TextEncoder,y=n.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(se){c.readyState="complete"},!1)),o==null&&s!=null&&(o=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(se){function pe(){}return pe.prototype=se,new pe}),Date.now||(Date.now=function(){return new Date().getTime()}),y==null){var x=d;d=function(se,pe){var me=pe.signal;return x(se,{headers:pe.headers,credentials:pe.credentials,cache:pe.cache}).then(function(xe){var Te=xe.body.getReader();return me._reader=Te,me._aborted&&me._reader.cancel(),{status:xe.status,statusText:xe.statusText,headers:xe.headers,body:{getReader:function(){return Te}}}})},y=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function _(){this.bitsNeeded=0,this.codePoint=0}_.prototype.decode=function(se){function pe(ye,ge,we){if(we===1)return ye>=128>>ge&&ye<=2048>>ge&&ye<=57344>>ge&&ye<=65536>>ge&&ye<>6>15?3:ge>31?2:1;if(ye===6*2)return ge>15?3:2;if(ye===6*3)return 3;throw new Error}for(var xe=65533,Te="",Pe=this.bitsNeeded,Ae=this.codePoint,le=0;le191||!pe(Ae<<6|ue&63,Pe-6,me(Pe,Ae)))&&(Pe=0,Ae=xe,Te+=String.fromCharCode(Ae)),Pe===0?(ue>=0&&ue<=127?(Pe=0,Ae=ue):ue>=192&&ue<=223?(Pe=6*1,Ae=ue&31):ue>=224&&ue<=239?(Pe=6*2,Ae=ue&15):ue>=240&&ue<=247?(Pe=6*3,Ae=ue&7):(Pe=0,Ae=xe),Pe!==0&&!pe(Ae,Pe,me(Pe,Ae))&&(Pe=0,Ae=xe)):(Pe-=6,Ae=Ae<<6|ue&63),Pe===0&&(Ae<=65535?Te+=String.fromCharCode(Ae):(Te+=String.fromCharCode(55296+(Ae-65535-1>>10)),Te+=String.fromCharCode(56320+(Ae-65535-1&1023))))}return this.bitsNeeded=Pe,this.codePoint=Ae,Te};var b=function(){try{return new v().decode(new g().encode("test"),{stream:!0})==="test"}catch(se){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+se)}return!1};(v==null||g==null||!b())&&(v=_);var w=function(){};function S(se){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=se,this._sendTimeout=0,this._abort=w}S.prototype.open=function(se,pe){this._abort(!0);var me=this,xe=this._xhr,Te=1,Pe=0;this._abort=function(we){me._sendTimeout!==0&&(i(me._sendTimeout),me._sendTimeout=0),(Te===1||Te===2||Te===3)&&(Te=4,xe.onload=w,xe.onerror=w,xe.onabort=w,xe.onprogress=w,xe.onreadystatechange=w,xe.abort(),Pe!==0&&(i(Pe),Pe=0),we||(me.readyState=4,me.onabort(null),me.onreadystatechange())),Te=0};var Ae=function(){if(Te===1){var we=0,ke="",Me=void 0;if("contentType"in xe)we=200,ke="OK",Me=xe.contentType;else try{we=xe.status,ke=xe.statusText,Me=xe.getResponseHeader("Content-Type")}catch{we=0,ke="",Me=void 0}we!==0&&(Te=2,me.readyState=2,me.status=we,me.statusText=ke,me._contentType=Me,me.onreadystatechange())}},le=function(){if(Ae(),Te===2||Te===3){Te=3;var we="";try{we=xe.responseText}catch{}me.readyState=3,me.responseText=we,me.onprogress()}},ue=function(we,ke){if((ke==null||ke.preventDefault==null)&&(ke={preventDefault:w}),le(),Te===1||Te===2||Te===3){if(Te=4,Pe!==0&&(i(Pe),Pe=0),me.readyState=4,we==="load")me.onload(ke);else if(we==="error")me.onerror(ke);else if(we==="abort")me.onabort(ke);else throw new TypeError;me.onreadystatechange()}},ye=function(we){xe!=null&&(xe.readyState===4?(!("onload"in xe)||!("onerror"in xe)||!("onabort"in xe))&&ue(xe.responseText===""?"error":"load",we):xe.readyState===3?"onprogress"in xe||le():xe.readyState===2&&Ae())},ge=function(){Pe=r(function(){ge()},500),xe.readyState===3&&le()};"onload"in xe&&(xe.onload=function(we){ue("load",we)}),"onerror"in xe&&(xe.onerror=function(we){ue("error",we)}),"onabort"in xe&&(xe.onabort=function(we){ue("abort",we)}),"onprogress"in xe&&(xe.onprogress=le),"onreadystatechange"in xe&&(xe.onreadystatechange=function(we){ye(we)}),("contentType"in xe||!("ontimeout"in o.prototype))&&(pe+=(pe.indexOf("?")===-1?"?":"&")+"padding=true"),xe.open(se,pe,!0),"readyState"in xe&&(Pe=r(function(){ge()},0))},S.prototype.abort=function(){this._abort(!1)},S.prototype.getResponseHeader=function(se){return this._contentType},S.prototype.setRequestHeader=function(se,pe){var me=this._xhr;"setRequestHeader"in me&&me.setRequestHeader(se,pe)},S.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},S.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var se=this;se._sendTimeout=r(function(){se._sendTimeout=0,se.send()},4);return}var pe=this._xhr;"withCredentials"in pe&&(pe.withCredentials=this.withCredentials);try{pe.send(void 0)}catch(me){throw me}};function E(se){return se.replace(/[A-Z]/g,function(pe){return String.fromCharCode(pe.charCodeAt(0)+32)})}function C(se){for(var pe=Object.create(null),me=se.split(`\r `),xe=0;xe"u"?typeof window<"u"?window:typeof self<"u"?self:oc:globalThis)})(r2,r2.exports);var _ae=r2.exports;const tl=({children:e})=>m.jsx("small",{className:"form-text text-muted d-block",children:e}),xae=({toggleRealTimeUpdates:e,setRealTimeUpdatesInterval:t})=>{const{enabled:n,interval:r}=_r("realTimeUpdates",{enabled:!0}),i=R.useId();return m.jsxs(xt,{title:"Real-time updates",className:"h-100",children:[m.jsx(to,{children:m.jsxs(hl,{checked:n,onChange:e,children:["Enable or disable real-time updates.",m.jsxs(tl,{children:["Real-time updates are currently being ",m.jsx("b",{children:n?"processed":"ignored"}),"."]})]})}),m.jsxs(Nu,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:Ce("form-label",{"text-muted":!n}),id:i,children:[m.jsx(Nn,{type:"number",min:0,placeholder:"Immediate",disabled:!n,value:`${r??""}`,id:i,onChange:({target:o})=>t(Number(o.value))}),n&&m.jsx(tl,{children:r?m.jsxs("span",{children:["Updates will be reflected in the UI every ",m.jsx("b",{children:r})," minute",r>1&&"s","."]}):"Updates will be reflected in the UI as soon as they happen."})]})]})},T1=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",wae=e=>e==="includes"?m.jsxs(m.Fragment,{children:["The list of suggested tags will contain those ",m.jsx("b",{children:"including"})," provided input."]}):m.jsxs(m.Fragment,{children:["The list of suggested tags will contain those ",m.jsx("b",{children:"starting with"})," provided input."]}),Oae=({updateShortUrlCreationSettings:e})=>{const t=_r("shortUrlCreation",{validateUrls:!1}),n=r=>()=>e({...t??{validateUrls:!1},tagFilteringMode:r});return m.jsxs(xt,{title:"Short URLs form",className:"h-100",children:[m.jsx(to,{children:m.jsxs(hl,{checked:t.validateUrls??!1,onChange:r=>e({...t,validateUrls:r}),children:["Request validation on long URLs when creating new short URLs."," ",m.jsxs("b",{children:["This option is ignored by Shlink ",">=","4.0.0"]}),m.jsxs(tl,{children:["The initial state of the ",m.jsx("b",{children:"Validate URL"})," checkbox will be ",m.jsx("b",{children:t.validateUrls?"checked":"unchecked"}),"."]})]})}),m.jsx(to,{children:m.jsxs(hl,{checked:t.forwardQuery??!0,onChange:r=>e({...t,forwardQuery:r}),children:["Make all new short URLs forward their query params to the long URL.",m.jsxs(tl,{children:["The initial state of the ",m.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",m.jsx("b",{children:t.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),m.jsxs(Nu,{noMargin:!0,label:"Tag suggestions search mode:",children:[m.jsxs(na,{text:T1(t.tagFilteringMode),children:[m.jsx(Ne,{active:!t.tagFilteringMode||t.tagFilteringMode==="startsWith",onClick:n("startsWith"),children:T1("startsWith")}),m.jsx(Ne,{active:t.tagFilteringMode==="includes",onClick:n("includes"),children:T1("includes")})]}),m.jsx(tl,{children:wae(t.tagFilteringMode)})]})]})},Sae={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Eae=({updateShortUrlsListSettings:e,defaultOrdering:t})=>{const n=_r("shortUrlsList");return m.jsx(xt,{title:"Short URLs list",className:"h-100",children:m.jsx(Nu,{noMargin:!0,label:"Default ordering for short URLs list:",children:m.jsx(sp,{items:Sae,order:(n==null?void 0:n.defaultOrdering)??t,onChange:(r,i)=>e({defaultOrdering:{field:r,dir:i}})})})})},Cae={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},Pae=({updateTagsSettings:e})=>{const t=_r("tags",{});return m.jsx(xt,{title:"Tags",className:"h-100",children:m.jsx(Nu,{noMargin:!0,label:"Default ordering for tags list:",children:m.jsx(sp,{items:Cae,order:t.defaultOrdering??{},onChange:(n,r)=>e({...t,defaultOrdering:{field:n,dir:r}})})})})},Tae=({updateUiSettings:e,_matchMedia:t})=>{const n=_r("ui"),r=R.useMemo(()=>(n==null?void 0:n.theme)??kE(t),[n==null?void 0:n.theme,t]);return m.jsxs(xt,{title:"User interface",className:"h-100",children:[m.jsx(je,{icon:r==="dark"?fq:QK,className:"float-end mt-1"}),m.jsx(hl,{checked:r==="dark",onChange:i=>{e({...n,theme:i?"dark":"light"})},children:"Use dark theme."})]})},ND={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},jae=(e,t)=>!e||e==="all"?t:ND[e],Aae=({onChange:e,active:t,allText:n})=>m.jsxs(na,{text:jae(t,n),children:[m.jsx(Ne,{active:t==="all",onClick:()=>e("all"),children:n}),m.jsx(Ne,{divider:!0}),Object.entries(ND).map(([r,i])=>m.jsx(Ne,{active:t===r,onClick:()=>e(r),children:i},r))]}),C3=e=>(e==null?void 0:e.defaultInterval)??"last30Days",kae=({updateVisitsSettings:e})=>{const t=_r("visits"),n=R.useCallback(({defaultInterval:r,...i})=>e({defaultInterval:r??C3(t),...i}),[e,t]);return m.jsxs(xt,{title:"Visits",className:"h-100",children:[m.jsx(to,{children:m.jsxs(hl,{checked:!!(t!=null&&t.excludeBots),onChange:r=>n({excludeBots:r}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",m.jsxs(tl,{children:["The visits coming from potential bots will be ",m.jsx("b",{children:t!=null&&t.excludeBots?"excluded":"included"}),"."]})]})}),m.jsx(to,{children:m.jsxs(hl,{checked:!!(t!=null&&t.loadPrevInterval),onChange:r=>n({loadPrevInterval:r}),children:["Compare visits with previous period.",m.jsxs(tl,{children:["When loading visits, previous period ",m.jsx("b",{children:t!=null&&t.loadPrevInterval?"will":"won't"})," be loaded by default."]})]})}),m.jsx(Nu,{noMargin:!0,label:"Default interval to load on visits sections:",children:m.jsx(Aae,{allText:"All visits",active:C3(t),onChange:r=>n({defaultInterval:r})})})]})},j1=({items:e})=>m.jsx(m.Fragment,{children:e.map((t,n)=>m.jsx("div",{className:"mb-3",children:t},n))}),Nae=({settings:e,updateSettings:t,defaultShortUrlsListOrdering:n})=>{const r=R.useCallback(s=>t(f0(e,s)),[e,t]),i=R.useCallback(s=>r({realTimeUpdates:{enabled:s}}),[r]),o=R.useCallback(s=>r({realTimeUpdates:{interval:s}}),[r]),a=R.useCallback((s,l)=>r({[s]:l}),[r]);return m.jsxs(RD,{value:e,children:[m.jsxs(nD,{className:"mb-3",children:[m.jsx(pd,{to:"general",children:"General"}),m.jsx(pd,{to:"short-urls",children:"Short URLs"}),m.jsx(pd,{to:"other-items",children:"Other items"})]}),m.jsxs(qy,{children:[m.jsx(ot,{path:"general",element:m.jsx(j1,{items:[m.jsx(Tae,{updateUiSettings:s=>a("ui",s)}),m.jsx(xae,{toggleRealTimeUpdates:i,setRealTimeUpdatesInterval:o})]})}),m.jsx(ot,{path:"short-urls",element:m.jsx(j1,{items:[m.jsx(Oae,{updateShortUrlCreationSettings:s=>a("shortUrlCreation",s)}),m.jsx(Eae,{defaultOrdering:n,updateShortUrlsListSettings:s=>a("shortUrlsList",s)})]})}),m.jsx(ot,{path:"other-items",element:m.jsx(j1,{items:[m.jsx(Pae,{updateTagsSettings:s=>a("tags",s)}),m.jsx(kae,{updateVisitsSettings:s=>a("visits",s)})]})}),m.jsx(ot,{path:"*",element:m.jsx(VS,{replace:!0,to:"general"})})]})]})},MD={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:{field:"dateCreated",dir:"DESC"}}},LD=R.createContext(MD),{Provider:RD}=LD,UE=()=>R.useContext(LD)??MD;function _r(e,t){return UE()[e]??t}const Mae={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 151.2c-4.2-4.6-10.1-7.2-16.4-7.2C266 144 256 154 256 166.3l0 41.7-96 0c-17.7 0-32 14.3-32 32l0 32c0 17.7 14.3 32 32 32l96 0 0 41.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.4-7.2l84-91c3.5-3.8 5.4-8.7 5.4-13.9s-1.9-10.1-5.4-13.9l-84-91z"]},Lae=Mae,Rae={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},$D={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z"]},$ae=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,P3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match($ae);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},T3=e=>e==="*"||e==="x"||e==="X",j3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Iae=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Dae=(e,t)=>{if(T3(e)||T3(t))return 0;const[n,r]=Iae(j3(e),j3(t));return n>r?1:n{for(let n=0;n{const n=P3(e),r=P3(t),i=n.pop(),o=r.pop(),a=A3(n,r);return a!==0?a:i&&o?A3(i.split("."),o.split(".")):i||o?i?-1:1:0},i2=(e,t,n)=>{Bae(n);const r=Fae(e,t);return ID[n].includes(r)},ID={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},k3=Object.keys(ID),Bae=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(k3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${k3.join("|")}`)},Uae={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},zae={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55"]},Ns={Enter:"Enter",Escape:"Escape",Tab:"Tab",Backspace:"Backspace",UpArrow:"ArrowUp",UpArrowCompat:"Up",DownArrow:"ArrowDown",DownArrowCompat:"Down",PageDown:"PageDown",PageUp:"PageUp"},zE=Symbol("Create new tag"),DD=Symbol("No options"),rc=()=>{},_n=V.createContext(void 0);function N3(e,t){return e===t?[]:e.filter(n=>!t.includes(n))}function Vae(e){return e.selectionStart===0&&e.selectionEnd===0}function Wae(e){const t=e.value.length;return e.selectionStart===t&&e.selectionEnd===t}function d0(e){return`${e}-label`}function Hae(e){return`${e}-combobox`}function Gae(e){return`${e}-input`}function FD(e){return`${e}-listbox`}function BD(e,t){return`${e}-option-${Jae(t)}`}function Kae(e,t){if((e==null?void 0:e.value)===zE&&e.disabled===!1)return{value:t,label:t}}function qae(e){const t=Kae(e.activeOption,e.value)||e.activeOption||rse(e.value,e.options);return t&&!t.disabled?t:void 0}function Yae(e,t,n){const r=t-1;return e>r?n:en===e.value)}const ese=/[-\\^$*+?.()|[\]{}]/g;function UD(e){return e.replace(ese,"\\$&")}function zD(e){return new RegExp(UD(e),"i")}function tse(e){return new RegExp(`^${UD(e)}$`,"i")}function nse(e,t){if(e){const n=zD(e);return t.filter(r=>n.test(r.label))}else return[].concat(t)}function rse(e,t){const n=tse(e);return t.find(r=>n.test(r.label))||null}const ise={autoComplete:"off",autoCorrect:"off","data-form-type":"other",spellCheck:!1};function ose({allowBackspace:e,ariaDescribedBy:t,ariaErrorMessage:n,delimiterKeys:r}){const{id:i,comboBoxRef:o,inputRef:a,isDisabled:s,isInvalid:l,managerRef:c}=R.useContext(_n),f=R.useMemo(()=>{const g=N=>{const I=N.currentTarget.value;c.current.updateInputValue(I),document.activeElement===a.current&&c.current.listBoxExpand(I)},y=()=>{c.current.listBoxExpand()},x=N=>{var I;((I=o.current)==null?void 0:I.contains(N.relatedTarget))===!1&&c.current.listBoxCollapse()},_=()=>{c.current.listBoxExpand()},b=N=>{const{activeIndex:I,isExpanded:F}=c.current.state;F?(N.preventDefault(),c.current.updateActiveIndex(I+1)):(Wae(N.currentTarget)||N.altKey)&&(N.preventDefault(),c.current.listBoxExpand())},w=N=>{const{activeIndex:I,isExpanded:F}=c.current.state;F?(N.preventDefault(),c.current.updateActiveIndex(I-1)):Vae(N.currentTarget)&&(N.preventDefault(),c.current.listBoxExpand())},S=N=>{const{isExpanded:I,options:F}=c.current.state;I&&(N.preventDefault(),c.current.updateActiveIndex(F.length-1))},E=N=>{c.current.state.isExpanded&&(N.preventDefault(),c.current.updateActiveIndex(0))},C=()=>{c.current.state.isExpanded?c.current.listBoxCollapse():c.current.updateInputValue("")},T=()=>{if(e){const{value:N,selected:I}=c.current.state,F=I[I.length-1];N===""&&F&&c.current.selectTag(F)}},A=N=>{c.current.state.isExpanded&&(N.preventDefault(),c.current.selectTag())};return{onBlur:x,onChange:g,onClick:_,onFocus:y,onKeyDown:N=>{if(N.key===Ns.UpArrow)return w(N);if(N.key===Ns.DownArrow)return b(N);if(N.key===Ns.PageUp)return E(N);if(N.key===Ns.PageDown)return S(N);if(N.key===Ns.Escape)return C();if(N.key===Ns.Backspace)return T();if(r.includes(N.key))return A(N)}}},[e,o,r,a,c]),{activeOption:d,isExpanded:p,value:v}=c.current.state;return{...ise,"aria-autocomplete":"list","aria-activedescendant":d?BD(i,d):void 0,"aria-controls":FD(i),"aria-describedby":t||void 0,"aria-disabled":s,"aria-errormessage":l&&n||void 0,"aria-invalid":l,"aria-labelledby":d0(i),"aria-expanded":p,id:Gae(i),onBlur:s?rc:f.onBlur,onChange:s?rc:f.onChange,onClick:s?rc:f.onClick,onFocus:s?rc:f.onFocus,onKeyDown:s?rc:f.onKeyDown,ref:a,role:"combobox",type:"text",value:v}}const ase={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},sse=["font-family","font-size","font-style","font-weight","letter-spacing","text-transform"];function lse({allowResize:e=!0,text:t}){const n=R.useRef(null),{inputRef:r}=R.useContext(_n),[i,o]=R.useState(null);return R.useLayoutEffect(()=>{if(e&&r.current&&n.current&&window.getComputedStyle){const a=window.getComputedStyle(r.current);sse.forEach(s=>{const l=a.getPropertyValue(s);n.current.style.setProperty(s,l)})}},[e,r,n]),R.useLayoutEffect(()=>{var a;if(e){const s=Math.ceil(((a=n.current)==null?void 0:a.scrollWidth)??0)+2;i!==s&&o(s)}},[e,t,i]),{width:i,sizerProps:{ref:n,style:ase}}}function cse(){const{id:e,inputRef:t,listBoxRef:n,managerRef:r}=R.useContext(_n),i=r.current.state.activeIndex===-1,o=R.useCallback(a=>{var s;a.target!==t.current&&((s=t.current)==null||s.focus({preventScroll:!0}))},[t]);return R.useEffect(()=>{var a;i&&((a=n.current)==null||a.scrollTo({top:0}))},[n,i]),{"aria-labelledby":d0(e),id:FD(e),onFocus:o,ref:n,role:"listbox",tabIndex:-1}}function use({activateFirstOption:e,allowNew:t,collapseOnSelect:n,newOptionText:r,noOptionsText:i,onAdd:o,onDelete:a,onCollapse:s,onExpand:l,onInput:c,onShouldCollapse:f,onShouldExpand:d,onValidate:p,selected:v,suggestions:g,suggestionsTransform:y}){const x=R.useRef(),[_,b]=R.useState(null),[w,S]=R.useState(!1),[E,C]=R.useState(""),T=R.useMemo(()=>{const W=y(E,g);return E&&(t&&W.push({disabled:p?!p(E):!1,label:r,value:zE}),W.length===0&&W.push({disabled:!0,label:i,value:DD})),W},[t,r,i,p,g,y,E]),A=_?a2(_,T):-1,D=e?Math.max(A,0):A,N=T[D],I={activeIndex:D,activeOption:N,isExpanded:w,options:T,selected:v,value:E},F={tagsAdded:x.current?N3(v,x.current.state.selected):[],tagsDeleted:x.current?N3(x.current.state.selected,v):[]},q={listBoxCollapse(W){w&&(!f||f(W??I.value))&&(S(!1),b(null),s==null||s())},listBoxExpand(W){w||(!d||d(W??I.value))&&(S(!0),b(T[D]),l==null||l())},updateActiveIndex(W){const X=Yae(W,T.length,e?0:-1);b(T[X])},updateInputValue(W){E!==W&&(C(W),c==null||c(W))},selectTag(W){if(W??(W=qae(I)),W){const X=a2(W,I.selected);X>-1?a(X):o(W),n&&this.listBoxCollapse(),this.updateInputValue("")}}};return x.current={...q,flags:F,state:I},x}function fse(e){const{id:t,inputRef:n,listBoxRef:r,managerRef:i}=R.useContext(_n),o=R.useRef(null),a=i.current.state.options[e],s=e===i.current.state.activeIndex,l=a.disabled??!1,c=a2(a,i.current.state.selected)>-1,f=R.useCallback(()=>{var p;i.current.selectTag(),(p=n.current)==null||p.focus()},[n,i]),d=R.useCallback(()=>{e!==i.current.state.activeIndex&&i.current.updateActiveIndex(e)},[e,i]);return pse(o,r,s),{option:{...a,active:s,disabled:l,index:e,selected:c},optionProps:{"aria-disabled":l,"aria-posinset":e+1,"aria-selected":l?void 0:c,"aria-setsize":i.current.state.options.length,id:BD(t,a),onClick:f,onMouseDown:d,ref:o,role:"option",tabIndex:-1}}}function dse({inputRef:e,managerRef:t}){return R.useRef({input:{blur(){var r;(r=e.current)==null||r.blur()},focus(){var r;(r=e.current)==null||r.focus()},get value(){return t.current.state.value},set value(r){typeof r!="string"&&(r=String(r)),t.current.updateInputValue(r)}},listBox:{collapse(){t.current.listBoxCollapse()},expand(){t.current.listBoxExpand()},get activeOption(){return t.current.state.activeOption},get isExpanded(){return t.current.state.isExpanded}},select(r){t.current.selectTag(r)}}).current}function hse({onBlur:e,onFocus:t}){const[n,r]=R.useState(!1),{id:i,inputRef:o,rootRef:a}=R.useContext(_n),s=R.useMemo(()=>({"aria-describedby":d0(i),id:i,onFocus(){r(!0),t==null||t()},onBlur(){var l;(l=a.current)!=null&&l.contains(document.activeElement)||(r(!1),e==null||e())},onClick(){var l;document.activeElement===a.current&&((l=o.current)==null||l.focus())},ref:a,tabIndex:-1}),[o,i,e,t,a]);return{isActive:n,rootProps:s}}function pse(e,t,n){R.useEffect(()=>{var r,i,o,a;if(n){const s=(r=e.current)==null?void 0:r.offsetHeight,l=(i=e.current)==null?void 0:i.offsetTop,c=(o=t.current)==null?void 0:o.offsetHeight,f=(a=t.current)==null?void 0:a.scrollTop;lf+c&&t.current.scrollTo(0,l+s-c)}},[n,t,e])}function mse(e,t){const{isDisabled:n,managerRef:r}=R.useContext(_n),i=r.current.state.selected[e],o=R.useCallback(()=>r.current.selectTag(i),[r,i]);return{tag:i,tagProps:{"aria-disabled":n,title:wg(t,i.label),onClick:n?rc:o}}}function vse(){var e;const{rootRef:t,managerRef:n}=R.useContext(_n),r=R.useRef(),i=n.current.flags.tagsDeleted[0],o=(e=r.current)==null?void 0:e.contains(document.activeElement);return R.useLayoutEffect(()=>{var a,s;if(i){const l=(a=r.current)==null?void 0:a.contains(document.activeElement);o&&!l&&((s=t.current)==null||s.focus({preventScroll:!0}))}},[o,r,t,i]),{listRef:r}}const gse={position:"absolute",width:1,height:1,left:-9999,overflow:"hidden",clip:"rect(0 0 0 0)"};function yse({ariaAddedText:e,ariaDeletedText:t}){const{managerRef:n}=R.useContext(_n),r=R.useRef([]);return n.current.flags.tagsAdded.forEach(i=>{r.current.push(wg(e,i.label))}),n.current.flags.tagsDeleted.forEach(i=>{r.current.push(wg(t,i.label))}),V.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"status",style:gse},r.current.join(` `))}function bse({children:e}){const{classNames:t,comboBoxRef:n,id:r}=R.useContext(_n);return V.createElement("div",{className:t.comboBox,id:Hae(r),ref:n},e)}const _se=({classNames:e,text:t})=>V.createElement("mark",{className:e.highlight},t);function xse({option:e,query:t,render:n=_se}){const{classNames:r}=R.useContext(_n);if(e.value===zE||e.value===DD)return V.createElement(V.Fragment,null,wg(e.label,t));if(t){const i=Xae(e.label,t);if(i){const o=n({text:i[1],classNames:r});return V.createElement(V.Fragment,null,i[0],o,i[2])}}return V.createElement(V.Fragment,null,e.label)}const wse=V.memo(xse),Ose=({classNames:e,inputWidth:t,...n})=>V.createElement("input",{className:e.input,style:{width:t},...n});function Sse({allowBackspace:e=!0,allowResize:t=!0,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i,placeholderText:o,render:a=Ose}){const{classNames:s}=R.useContext(_n),{value:l,...c}=ose({allowBackspace:e,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i}),f=l.lengthV.createElement("div",{className:t.label,id:n},e);function Cse({children:e,render:t=Ese}){const{classNames:n,id:r}=R.useContext(_n);return t({children:e,classNames:n,id:d0(r)})}const Pse=({children:e,classNames:t,...n})=>V.createElement("div",{className:t.listBox,...n},e);function Tse({children:e,render:t=Pse}){const{classNames:n,managerRef:r}=R.useContext(_n),i=cse();return!r.current.state.isExpanded||V.Children.count(e)===0?null:t({children:e,classNames:n,...i})}const jse=({children:e,classNames:t,option:n,...r})=>{const i=[t.option];return n.active&&i.push(t.optionIsActive),V.createElement("div",{className:i.join(" "),...r},e)};function Ase({children:e,index:t,render:n=jse}){const{classNames:r}=R.useContext(_n),{option:i,optionProps:o}=fse(t);return n({classNames:r,children:e,option:i,...o})}const kse=({children:e,classNames:t,isActive:n,isDisabled:r,isInvalid:i,...o})=>{const a=[t.root];return n&&a.push(t.rootIsActive),r&&a.push(t.rootIsDisabled),i&&a.push(t.rootIsInvalid),V.createElement("div",{className:a.join(" "),...o},e)};function Nse({children:e,onBlur:t,onFocus:n,render:r=kse}){const{classNames:i,isDisabled:o,isInvalid:a}=R.useContext(_n),{isActive:s,rootProps:l}=hse({onBlur:t,onFocus:n});return r({children:e,classNames:i,isActive:s,isDisabled:o,isInvalid:a,...l})}const Mse=({classNames:e,tag:t,...n})=>V.createElement("button",{type:"button",className:e.tag,...n},V.createElement("span",{className:e.tagName},t.label));function Lse({render:e=Mse,index:t,title:n}){const{classNames:r}=R.useContext(_n),{tag:i,tagProps:o}=mse(t,n);return e({classNames:r,tag:i,...o})}function Rse({children:e,label:t}){const{classNames:n}=R.useContext(_n),{listRef:r}=vse();return V.createElement("ul",{className:n.tagList,"aria-label":t,ref:r,role:"list"},e.map(i=>V.createElement("li",{className:n.tagListItem,key:i.key,role:"listitem"},i)))}const $se={root:"react-tags",rootIsActive:"is-active",rootIsDisabled:"is-disabled",rootIsInvalid:"is-invalid",label:"react-tags__label",tagList:"react-tags__list",tagListItem:"react-tags__list-item",tag:"react-tags__tag",tagName:"react-tags__tag-name",comboBox:"react-tags__combobox",input:"react-tags__combobox-input",listBox:"react-tags__listbox",option:"react-tags__listbox-option",optionIsActive:"is-active",highlight:"react-tags__listbox-option-highlight"},Ise=[Ns.Enter];function Dse({activateFirstOption:e=!1,allowBackspace:t=!0,allowNew:n=!1,allowResize:r=!0,ariaAddedText:i="Added tag %value%",ariaDescribedBy:o,ariaErrorMessage:a,ariaDeletedText:s="Removed tag %value%",classNames:l=$se,collapseOnSelect:c=!1,deleteButtonText:f="Remove %value% from the list",delimiterKeys:d=Ise,id:p="react-tags",isDisabled:v=!1,isInvalid:g=!1,labelText:y="Select tags",newOptionText:x="Add %value%",noOptionsText:_="No options found for %value%",onAdd:b,onBlur:w,onCollapse:S,onDelete:E,onExpand:C,onFocus:T,onInput:A,onShouldCollapse:D,onShouldExpand:N,onValidate:I,placeholderText:F="Add a tag",renderHighlight:q,renderInput:W,renderLabel:X,renderListBox:Q,renderOption:ne,renderRoot:Z,renderTag:z,selected:B=[],suggestions:H=[],suggestionsTransform:ee=nse,tagListLabelText:K="Selected tags"},te){const ie=R.useRef(null),ae=R.useRef(null),fe=R.useRef(null),j=R.useRef(null),k=use({activateFirstOption:e,allowNew:n,collapseOnSelect:c,newOptionText:x,noOptionsText:_,onAdd:b,onDelete:E,onCollapse:S,onExpand:C,onInput:A,onShouldCollapse:D,onShouldExpand:N,onValidate:I,selected:B,suggestions:H,suggestionsTransform:ee}),U=dse({inputRef:ae,managerRef:k});return te&&(typeof te=="function"?te(U):te.current=U),V.createElement(_n.Provider,{value:{classNames:l,comboBoxRef:ie,id:p,inputRef:ae,isDisabled:v,isInvalid:g,listBoxRef:fe,managerRef:k,rootRef:j}},V.createElement(Nse,{onBlur:w,onFocus:T,render:Z},V.createElement(Cse,{render:X},y),V.createElement(Rse,{label:K},k.current.state.selected.map((J,Y)=>V.createElement(Lse,{key:o2(J),index:Y,render:z,title:f}))),V.createElement(bse,null,V.createElement(Sse,{allowBackspace:t,allowResize:r,ariaDescribedBy:o,ariaErrorMessage:a,delimiterKeys:d,placeholderText:F,render:W}),V.createElement(Tse,{render:Q},k.current.state.options.map((J,Y)=>V.createElement(Ase,{key:o2(J),index:Y,render:ne},V.createElement(wse,{option:J,query:k.current.state.value,render:q}))))),V.createElement(yse,{ariaAddedText:i,ariaDeletedText:s})))}const Fse=V.forwardRef(Dse);function A1(e){return e==null?"":`${e}`}function Bse(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 VE(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 Use(e={stringFormatter:VE()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function zse(e={stringFormatter:VE()}){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 Vse=RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,"g");function Wse(e){var t,n,r;const i=[];let o;for(;o=Vse.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 M3(e,t,n){if(t in e){const o=e[t];return o===void 0?n:o}const r=Array.isArray(t)?t:Wse(t);let i=e;for(const o of r)if(i=i==null?void 0:i[o],i===void 0)return n;return i}function VD(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function s2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var L3;(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"})(L3||(L3={}));class Hse{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||VE(),i=zse({stringFormatter:r}),o={header:r,undefined:A1,boolean:A1,number:Bse(),bigint:A1,string:r,symbol:Use({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=>M3(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:a=>M3(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const c=s(l,a);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return s2(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(VD,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return s2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class WD extends Hse{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,s)=>(Object.keys(s).forEach(l=>{a.includes(l)||a.push(l)}),a),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(VD,[])}processData(t){return s2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var pn;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(pn||(pn={}));pn.QUOTATION_MARK+"",pn.QUOTATION_MARK,pn.REVERSE_SOLIDUS+"",pn.REVERSE_SOLIDUS,pn.SOLIDUS+"",pn.SOLIDUS,pn.LATIN_SMALL_LETTER_B+"",pn.BACKSPACE,pn.LATIN_SMALL_LETTER_F+"",pn.FORM_FEED,pn.LATIN_SMALL_LETTER_N+"",pn.NEWLINE,pn.LATIN_SMALL_LETTER_R+"",pn.CARRIAGE_RETURN,pn.LATIN_SMALL_LETTER_T+"",pn.TAB;var R3;(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"})(R3||(R3={}));var $3;(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"})($3||($3={}));var I3;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(I3||(I3={}));var D3;(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"})(D3||(D3={}));var Gse=Array.isArray,xr=Gse,Kse=typeof oc=="object"&&oc&&oc.Object===Object&&oc,HD=Kse,qse=HD,Yse=typeof self=="object"&&self&&self.Object===Object&&self,Zse=qse||Yse||Function("return this")(),bo=Zse,Xse=bo,Qse=Xse.Symbol,up=Qse,F3=up,GD=Object.prototype,Jse=GD.hasOwnProperty,ele=GD.toString,Tf=F3?F3.toStringTag:void 0;function tle(e){var t=Jse.call(e,Tf),n=e[Tf];try{e[Tf]=void 0;var r=!0}catch{}var i=ele.call(e);return r&&(t?e[Tf]=n:delete e[Tf]),i}var nle=tle,rle=Object.prototype,ile=rle.toString;function ole(e){return ile.call(e)}var ale=ole,B3=up,sle=nle,lle=ale,cle="[object Null]",ule="[object Undefined]",U3=B3?B3.toStringTag:void 0;function fle(e){return e==null?e===void 0?ule:cle:U3&&U3 in Object(e)?sle(e):lle(e)}var ra=fle;function dle(e){return e!=null&&typeof e=="object"}var ia=dle,hle=ra,ple=ia,mle="[object Symbol]";function vle(e){return typeof e=="symbol"||ple(e)&&hle(e)==mle}var Mu=vle,gle=xr,yle=Mu,ble=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_le=/^\w*$/;function xle(e,t){if(gle(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||yle(e)?!0:_le.test(e)||!ble.test(e)||t!=null&&e in Object(t)}var WE=xle;function wle(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var cs=wle;const Lu=at(cs);var Ole=ra,Sle=cs,Ele="[object AsyncFunction]",Cle="[object Function]",Ple="[object GeneratorFunction]",Tle="[object Proxy]";function jle(e){if(!Sle(e))return!1;var t=Ole(e);return t==Cle||t==Ple||t==Ele||t==Tle}var HE=jle;const Ve=at(HE);var Ale=bo,kle=Ale["__core-js_shared__"],Nle=kle,k1=Nle,z3=function(){var e=/[^.]+$/.exec(k1&&k1.keys&&k1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Mle(e){return!!z3&&z3 in e}var Lle=Mle,Rle=Function.prototype,$le=Rle.toString;function Ile(e){if(e!=null){try{return $le.call(e)}catch{}try{return e+""}catch{}}return""}var KD=Ile,Dle=HE,Fle=Lle,Ble=cs,Ule=KD,zle=/[\\^$.*+?()[\]{}|]/g,Vle=/^\[object .+?Constructor\]$/,Wle=Function.prototype,Hle=Object.prototype,Gle=Wle.toString,Kle=Hle.hasOwnProperty,qle=RegExp("^"+Gle.call(Kle).replace(zle,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yle(e){if(!Ble(e)||Fle(e))return!1;var t=Dle(e)?qle:Vle;return t.test(Ule(e))}var Zle=Yle;function Xle(e,t){return e==null?void 0:e[t]}var Qle=Xle,Jle=Zle,ece=Qle;function tce(e,t){var n=ece(e,t);return Jle(n)?n:void 0}var Cl=tce,nce=Cl,rce=nce(Object,"create"),h0=rce,V3=h0;function ice(){this.__data__=V3?V3(null):{},this.size=0}var oce=ice;function ace(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var sce=ace,lce=h0,cce="__lodash_hash_undefined__",uce=Object.prototype,fce=uce.hasOwnProperty;function dce(e){var t=this.__data__;if(lce){var n=t[e];return n===cce?void 0:n}return fce.call(t,e)?t[e]:void 0}var hce=dce,pce=h0,mce=Object.prototype,vce=mce.hasOwnProperty;function gce(e){var t=this.__data__;return pce?t[e]!==void 0:vce.call(t,e)}var yce=gce,bce=h0,_ce="__lodash_hash_undefined__";function xce(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=bce&&t===void 0?_ce:t,this}var wce=xce,Oce=oce,Sce=sce,Ece=hce,Cce=yce,Pce=wce;function Ru(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var Wce=Vce,Hce=p0;function Gce(e,t){var n=this.__data__,r=Hce(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Kce=Gce,qce=Ace,Yce=Dce,Zce=Uce,Xce=Wce,Qce=Kce;function $u(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Vs=function(t){return fp(t)&&t.indexOf("%")===t.length-1},Ee=function(t){return wfe(t)&&!Du(t)},cn=function(t){return Ee(t)||fp(t)},Cfe=0,us=function(t){var n=++Cfe;return"".concat(t||"").concat(n)},Yn=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(!Ee(t)&&!fp(t))return r;var o;if(Vs(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Du(o)&&(o=r),i&&o>n&&(o=n),o},wa=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Pfe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lfe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function u2(e){"@babel/helpers - typeof";return u2=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},u2(e)}var Z3={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},Ro=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},X3=null,M1=null,nC=function e(t){if(t===X3&&Array.isArray(M1))return M1;var n=[];return R.Children.forEach(t,function(r){Ue(r)||(l2.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),M1=n,X3=t,n};function er(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Ro(i)}):r=[Ro(t)],nC(e).forEach(function(i){var o=Mr(i,"type.displayName")||Mr(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Cr(e,t){var n=er(e,t);return n&&n[0]}var Q3=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Ee(r)||r<=0||!Ee(i)||i<=0)},Rfe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],$fe=function(t){return t&&t.type&&fp(t.type)&&Rfe.indexOf(t.type)>=0},r5=function(t){return t&&u2(t)==="object"&&"cx"in t&&"cy"in t&&"r"in t},Ife=function(t,n,r,i){var o,a=(o=N1==null?void 0:N1[i])!==null&&o!==void 0?o:[];return!Ve(t)&&(i&&a.includes(n)||Afe.includes(n))||r&&tC.includes(n)},De=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(R.isValidElement(t)&&(i=t.props),!Lu(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;Ife((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},f2=function e(t,n){if(t===n)return!0;var r=R.Children.count(t);if(r!==R.Children.count(n))return!1;if(r===0)return!0;if(r===1)return J3(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zfe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function h2(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,l=e.desc,c=Ufe(e,Bfe),f=i||{width:n,height:r,x:0,y:0},d=Ce("recharts-surface",o);return V.createElement("svg",d2({},De(c,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),V.createElement("title",null,s),V.createElement("desc",null,l),t)}var Vfe=["children","className"];function p2(){return p2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hfe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Xe=V.forwardRef(function(e,t){var n=e.children,r=e.className,i=Wfe(e,Vfe),o=Ce("recharts-layer",r);return V.createElement("g",p2({className:o},De(i,!0),{ref:t}),n)}),Ni=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:qfe(e,t,n)}var Zfe=Yfe,Xfe="\\ud800-\\udfff",Qfe="\\u0300-\\u036f",Jfe="\\ufe20-\\ufe2f",ede="\\u20d0-\\u20ff",tde=Qfe+Jfe+ede,nde="\\ufe0e\\ufe0f",rde="\\u200d",ide=RegExp("["+rde+Xfe+tde+nde+"]");function ode(e){return ide.test(e)}var i5=ode;function ade(e){return e.split("")}var sde=ade,o5="\\ud800-\\udfff",lde="\\u0300-\\u036f",cde="\\ufe20-\\ufe2f",ude="\\u20d0-\\u20ff",fde=lde+cde+ude,dde="\\ufe0e\\ufe0f",hde="["+o5+"]",m2="["+fde+"]",v2="\\ud83c[\\udffb-\\udfff]",pde="(?:"+m2+"|"+v2+")",a5="[^"+o5+"]",s5="(?:\\ud83c[\\udde6-\\uddff]){2}",l5="[\\ud800-\\udbff][\\udc00-\\udfff]",mde="\\u200d",c5=pde+"?",u5="["+dde+"]?",vde="(?:"+mde+"(?:"+[a5,s5,l5].join("|")+")"+u5+c5+")*",gde=u5+c5+vde,yde="(?:"+[a5+m2+"?",m2,s5,l5,hde].join("|")+")",bde=RegExp(v2+"(?="+v2+")|"+yde+gde,"g");function _de(e){return e.match(bde)||[]}var xde=_de,wde=sde,Ode=i5,Sde=xde;function Ede(e){return Ode(e)?Sde(e):wde(e)}var Cde=Ede,Pde=Zfe,Tde=i5,jde=Cde,Ade=XD;function kde(e){return function(t){t=Ade(t);var n=Tde(t)?jde(t):void 0,r=n?n[0]:t.charAt(0),i=n?Pde(n,1).join(""):t.slice(1);return r[e]()+i}}var Nde=kde,Mde=Nde,Lde=Mde("toUpperCase"),Rde=Lde;const T0=at(Rde);function _t(e){return function(){return e}}const f5=Math.cos,Eg=Math.sin,Bi=Math.sqrt,Cg=Math.PI,j0=2*Cg,g2=Math.PI,y2=2*g2,Ms=1e-6,$de=y2-Ms;function d5(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return d5;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;iMs)if(!(Math.abs(d*l-c*f)>Ms)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-a,g=i-s,y=l*l+c*c,x=v*v+g*g,_=Math.sqrt(y),b=Math.sqrt(p),w=o*Math.tan((g2-Math.acos((y+p-x)/(2*_*b)))/2),S=w/b,E=w/_;Math.abs(S-1)>Ms&&this._append`L${t+S*f},${n+S*d}`,this._append`A${o},${o},0,0,${+(d*v>f*g)},${this._x1=t+E*l},${this._y1=n+E*c}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,f=n+l,d=1^a,p=a?i-o:o-i;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>Ms||Math.abs(this._y1-f)>Ms)&&this._append`L${c},${f}`,r&&(p<0&&(p=p%y2+y2),p>$de?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=f}`:p>Ms&&this._append`A${r},${r},0,${+(p>=g2)},${d},${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 rC(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 Dde(t)}function iC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function h5(e){this._context=e}h5.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 A0(e){return new h5(e)}function p5(e){return e[0]}function m5(e){return e[1]}function v5(e,t){var n=_t(!0),r=null,i=A0,o=null,a=rC(s);e=typeof e=="function"?e:e===void 0?p5:_t(e),t=typeof t=="function"?t:t===void 0?m5:_t(t);function s(l){var c,f=(l=iC(l)).length,d,p=!1,v;for(r==null&&(o=i(v=a())),c=0;c<=f;++c)!(c=v;--g)s.point(w[g],S[g]);s.lineEnd(),s.areaEnd()}_&&(w[p]=+e(x,p,d),S[p]=+t(x,p,d),s.point(r?+r(x,p,d):w[p],n?+n(x,p,d):S[p]))}if(b)return s=null,b+""||null}function f(){return v5().defined(i).curve(a).context(o)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:_t(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:_t(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:_t(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:_t(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:_t(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:_t(+d),c):n},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(n)},c.lineX1=function(){return f().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:_t(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),c):a},c.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),c):o},c}class g5{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 Fde(e){return new g5(e,!0)}function Bde(e){return new g5(e,!1)}const oC={draw(e,t){const n=Bi(t/Cg);e.moveTo(n,0),e.arc(0,0,n,0,j0)}},Ude={draw(e,t){const n=Bi(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()}},y5=Bi(1/3),zde=y5*2,Vde={draw(e,t){const n=Bi(t/zde),r=n*y5;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Wde={draw(e,t){const n=Bi(t),r=-n/2;e.rect(r,r,n,n)}},Hde=.8908130915292852,b5=Eg(Cg/10)/Eg(7*Cg/10),Gde=Eg(j0/10)*b5,Kde=-f5(j0/10)*b5,qde={draw(e,t){const n=Bi(t*Hde),r=Gde*n,i=Kde*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=j0*o/5,s=f5(a),l=Eg(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},L1=Bi(3),Yde={draw(e,t){const n=-Bi(t/(L1*3));e.moveTo(0,n*2),e.lineTo(-L1*n,-n),e.lineTo(L1*n,-n),e.closePath()}},Gr=-.5,Kr=Bi(3)/2,b2=1/Bi(12),Zde=(b2/2+1)*3,Xde={draw(e,t){const n=Bi(t/Zde),r=n/2,i=n*b2,o=r,a=n*b2+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Gr*r-Kr*i,Kr*r+Gr*i),e.lineTo(Gr*o-Kr*a,Kr*o+Gr*a),e.lineTo(Gr*s-Kr*l,Kr*s+Gr*l),e.lineTo(Gr*r+Kr*i,Gr*i-Kr*r),e.lineTo(Gr*o+Kr*a,Gr*a-Kr*o),e.lineTo(Gr*s+Kr*l,Gr*l-Kr*s),e.closePath()}};function Qde(e,t){let n=null,r=rC(i);e=typeof e=="function"?e:_t(e||oC),t=typeof t=="function"?t:_t(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:_t(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:_t(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Pg(){}function Tg(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 _5(e){this._context=e}_5.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:Tg(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:Tg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Jde(e){return new _5(e)}function x5(e){this._context=e}x5.prototype={areaStart:Pg,areaEnd:Pg,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:Tg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ehe(e){return new x5(e)}function w5(e){this._context=e}w5.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:Tg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function the(e){return new w5(e)}function O5(e){this._context=e}O5.prototype={areaStart:Pg,areaEnd:Pg,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 nhe(e){return new O5(e)}function tk(e){return e<0?-1:1}function nk(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(tk(o)+tk(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function rk(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function R1(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function jg(e){this._context=e}jg.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:R1(this,this._t0,rk(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,R1(this,rk(this,n=nk(this,e,t)),n);break;default:R1(this,this._t0,n=nk(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function S5(e){this._context=new E5(e)}(S5.prototype=Object.create(jg.prototype)).point=function(e,t){jg.prototype.point.call(this,t,e)};function E5(e){this._context=e}E5.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 rhe(e){return new jg(e)}function ihe(e){return new S5(e)}function C5(e){this._context=e}C5.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=ik(e),i=ik(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=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 ahe(e){return new k0(e,.5)}function she(e){return new k0(e,0)}function lhe(e){return new k0(e,1)}function ru(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function che(e,t){return e[t]}function uhe(e){const t=[];return t.key=e,t}function fhe(){var e=_t([]),t=_2,n=ru,r=che;function i(o){var a=Array.from(e.apply(this,arguments),uhe),s,l=a.length,c=-1,f;for(const d of o)for(s=0,++c;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _he(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var P5={symbolCircle:oC,symbolCross:Ude,symbolDiamond:Vde,symbolSquare:Wde,symbolStar:qde,symbolTriangle:Yde,symbolWye:Xde},xhe=Math.PI/180,whe=function(t){var n="symbol".concat(T0(t));return P5[n]||oC},Ohe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*xhe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},She=function(t,n){P5["symbol".concat(T0(t))]=n},N0=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,l=bhe(t,mhe),c=ak(ak({},l),{},{type:r,size:o,sizeType:s}),f=function(){var x=whe(r),_=Qde().type(x).size(Ohe(o,s,r));return _()},d=c.className,p=c.cx,v=c.cy,g=De(c,!0);return p===+p&&v===+v&&o===+o?V.createElement("path",x2({},g,{className:Ce("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:f()})):null};N0.registerSymbol=She;function iu(e){"@babel/helpers - typeof";return iu=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},iu(e)}function w2(){return w2=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=v.inactive?c:v.color;return V.createElement("li",w2({className:x,style:d,key:"legend-item-".concat(g)},Za(r.props,v,g)),V.createElement(h2,{width:a,height:a,viewBox:f,style:p},r.renderIcon(v)),V.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},y?y(_,v,g):_))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return V.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}]),t}(R.PureComponent);lh(aC,"displayName","Legend");lh(aC,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Lhe=m0;function Rhe(){this.__data__=new Lhe,this.size=0}var $he=Rhe;function Ihe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Dhe=Ihe;function Fhe(e){return this.__data__.get(e)}var Bhe=Fhe;function Uhe(e){return this.__data__.has(e)}var zhe=Uhe,Vhe=m0,Whe=KE,Hhe=qE,Ghe=200;function Khe(e,t){var n=this.__data__;if(n instanceof Vhe){var r=n.__data__;if(!Whe||r.lengths))return!1;var c=o.get(e),f=o.get(t);if(c&&f)return c==t&&f==e;var d=-1,p=!0,v=n&mpe?new fpe:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=bme}var uC=_me,xme=ra,wme=uC,Ome=ia,Sme="[object Arguments]",Eme="[object Array]",Cme="[object Boolean]",Pme="[object Date]",Tme="[object Error]",jme="[object Function]",Ame="[object Map]",kme="[object Number]",Nme="[object Object]",Mme="[object RegExp]",Lme="[object Set]",Rme="[object String]",$me="[object WeakMap]",Ime="[object ArrayBuffer]",Dme="[object DataView]",Fme="[object Float32Array]",Bme="[object Float64Array]",Ume="[object Int8Array]",zme="[object Int16Array]",Vme="[object Int32Array]",Wme="[object Uint8Array]",Hme="[object Uint8ClampedArray]",Gme="[object Uint16Array]",Kme="[object Uint32Array]",Ct={};Ct[Fme]=Ct[Bme]=Ct[Ume]=Ct[zme]=Ct[Vme]=Ct[Wme]=Ct[Hme]=Ct[Gme]=Ct[Kme]=!0;Ct[Sme]=Ct[Eme]=Ct[Ime]=Ct[Cme]=Ct[Dme]=Ct[Pme]=Ct[Tme]=Ct[jme]=Ct[Ame]=Ct[kme]=Ct[Nme]=Ct[Mme]=Ct[Lme]=Ct[Rme]=Ct[$me]=!1;function qme(e){return Ome(e)&&wme(e.length)&&!!Ct[xme(e)]}var Yme=qme;function Zme(e){return function(t){return e(t)}}var D5=Zme,Mg={exports:{}};Mg.exports;(function(e,t){var n=HD,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(Mg,Mg.exports);var Xme=Mg.exports,Qme=Yme,Jme=D5,hk=Xme,pk=hk&&hk.isTypedArray,eve=pk?Jme(pk):Qme,F5=eve,tve=ime,nve=lC,rve=xr,ive=I5,ove=cC,ave=F5,sve=Object.prototype,lve=sve.hasOwnProperty;function cve(e,t){var n=rve(e),r=!n&&nve(e),i=!n&&!r&&ive(e),o=!n&&!r&&!i&&ave(e),a=n||r||i||o,s=a?tve(e.length,String):[],l=s.length;for(var c in e)(t||lve.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ove(c,l)))&&s.push(c);return s}var uve=cve,fve=Object.prototype;function dve(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||fve;return e===n}var hve=dve;function pve(e,t){return function(n){return e(t(n))}}var B5=pve,mve=B5,vve=mve(Object.keys,Object),gve=vve,yve=hve,bve=gve,_ve=Object.prototype,xve=_ve.hasOwnProperty;function wve(e){if(!yve(e))return bve(e);var t=[];for(var n in Object(e))xve.call(e,n)&&n!="constructor"&&t.push(n);return t}var Ove=wve,Sve=HE,Eve=uC;function Cve(e){return e!=null&&Eve(e.length)&&!Sve(e)}var dp=Cve,Pve=uve,Tve=Ove,jve=dp;function Ave(e){return jve(e)?Pve(e):Tve(e)}var M0=Ave,kve=Gpe,Nve=nme,Mve=M0;function Lve(e){return kve(e,Mve,Nve)}var Rve=Lve,mk=Rve,$ve=1,Ive=Object.prototype,Dve=Ive.hasOwnProperty;function Fve(e,t,n,r,i,o){var a=n&$ve,s=mk(e),l=s.length,c=mk(t),f=c.length;if(l!=f&&!a)return!1;for(var d=l;d--;){var p=s[d];if(!(a?p in t:Dve.call(t,p)))return!1}var v=o.get(e),g=o.get(t);if(v&&g)return v==t&&g==e;var y=!0;o.set(e,t),o.set(t,e);for(var x=a;++d-1}var Iye=$ye;function Dye(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=Jye){var c=t?null:Xye(e);if(c)return Qye(c);a=!1,i=Zye,l=new Kye}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function p0e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function m0e(e){return e.value}function v0e(e,t){if(V.isValidElement(e))return V.cloneElement(e,t);if(typeof e=="function")return V.createElement(e,t);t.ref;var n=h0e(t,a0e);return V.createElement(aC,n)}var kk=1,ch=function(e){f0e(t,e);function t(){var n;s0e(this,t);for(var r=arguments.length,i=new Array(r),o=0;okk||Math.abs(i.height-this.lastBoundingBox.height)>kk)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?xs({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,l=i.margin,c=i.chartWidth,f=i.chartHeight,d,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var v=this.getBBoxSnapshot();d={left:((c||0)-v.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();p={top:((f||0)-g.height)/2}}else p=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return xs(xs({},d),p)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,f=i.payload,d=xs(xs({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return V.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){r.wrapperNode=v}},v0e(o,xs(xs({},this.props),{},{payload:K5(f,c,m0e)})))}}],[{key:"getWithHeight",value:function(r,i){var o=r.props.layout;return o==="vertical"&&Ee(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}]),t}(R.PureComponent);L0(ch,"displayName","Legend");L0(ch,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Nk=up,g0e=lC,y0e=xr,Mk=Nk?Nk.isConcatSpreadable:void 0;function b0e(e){return y0e(e)||g0e(e)||!!(Mk&&e&&e[Mk])}var _0e=b0e,x0e=R5,w0e=_0e;function X5(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=w0e),i||(i=[]);++o0&&n(s)?t>1?X5(s,t-1,n,r,i):x0e(i,s):r||(i[i.length]=s)}return i}var Q5=X5;function O0e(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(n(o[l],l,o)===!1)break}return t}}var S0e=O0e,E0e=S0e,C0e=E0e(),P0e=C0e,T0e=P0e,j0e=M0;function A0e(e,t){return e&&T0e(e,t,j0e)}var J5=A0e,k0e=dp;function N0e(e,t){return function(n,r){if(n==null)return n;if(!k0e(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var G0e=H0e,F1=ZE,K0e=XE,q0e=_o,Y0e=e8,Z0e=U0e,X0e=D5,Q0e=G0e,J0e=Uu,ebe=xr;function tbe(e,t,n){t.length?t=F1(t,function(o){return ebe(o)?function(a){return K0e(a,o.length===1?o[0]:o)}:o}):t=[J0e];var r=-1;t=F1(t,X0e(q0e));var i=Y0e(e,function(o,a,s){var l=F1(t,function(c){return c(o)});return{criteria:l,index:++r,value:o}});return Z0e(i,function(o,a){return Q0e(o,a,n)})}var nbe=tbe;function rbe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var ibe=rbe,obe=ibe,Rk=Math.max;function abe(e,t,n){return t=Rk(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Rk(r.length-t,0),a=Array(o);++i0){if(++t>=vbe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var _be=bbe,xbe=mbe,wbe=_be,Obe=wbe(xbe),Sbe=Obe,Ebe=Uu,Cbe=sbe,Pbe=Sbe;function Tbe(e,t){return Pbe(Cbe(e,t,Ebe),e+"")}var jbe=Tbe,Abe=GE,kbe=dp,Nbe=cC,Mbe=cs;function Lbe(e,t,n){if(!Mbe(n))return!1;var r=typeof t;return(r=="number"?kbe(n)&&Nbe(t,n.length):r=="string"&&t in n)?Abe(n[t],e):!1}var R0=Lbe,Rbe=Q5,$be=nbe,Ibe=jbe,Ik=R0,Dbe=Ibe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Ik(e,t[0],t[1])?t=[]:n>2&&Ik(t[0],t[1],t[2])&&(t=[t[0]]),$be(e,Rbe(t,1),[])}),Fbe=Dbe;const hC=at(Fbe);function uh(e){"@babel/helpers - typeof";return uh=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},uh(e)}function A2(){return A2=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(jf,"-left"),Ee(n)&&t&&Ee(t.x)&&n=t.y),"".concat(jf,"-top"),Ee(r)&&t&&Ee(t.y)&&ry?Math.max(f,l[r]):Math.max(d,l[r])}function e1e(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function t1e(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,f,d;return a.height>0&&a.width>0&&n?(f=Bk({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=Bk({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=e1e({translateX:f,translateY:d,useTranslate3d:s})):c=Qbe,{cssProperties:c,cssClasses:Jbe({translateX:f,translateY:d,coordinate:n})}}function au(e){"@babel/helpers - typeof";return au=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},au(e)}function Uk(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 zk(e){for(var t=1;tVk||Math.abs(r.height-this.state.lastBoundingBox.height)>Vk)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,c=i.children,f=i.coordinate,d=i.hasPayload,p=i.isAnimationActive,v=i.offset,g=i.position,y=i.reverseDirection,x=i.useTranslate3d,_=i.viewBox,b=i.wrapperStyle,w=t1e({allowEscapeViewBox:a,coordinate:f,offsetTopLeft:v,position:g,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:_}),S=w.cssClasses,E=w.cssProperties,C=zk(zk({transition:p&&o?"transform ".concat(s,"ms ").concat(l):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},b);return V.createElement("div",{tabIndex:-1,className:S,style:C,ref:function(A){r.wrapperNode=A}},c)}}]),t}(R.PureComponent),u1e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},si={isSsr:u1e(),get:function(t){return si[t]},set:function(t,n){if(typeof t=="string")si[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){si[i]=t[i]})}}};function su(e){"@babel/helpers - typeof";return su=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},su(e)}function Wk(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 Hk(e){for(var t=1;t0;return V.createElement(c1e,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:p,active:o,coordinate:f,hasPayload:C,offset:v,position:x,reverseDirection:_,useTranslate3d:b,viewBox:w,wrapperStyle:S},_1e(c,Hk(Hk({},this.props),{},{payload:E})))}}]),t}(R.PureComponent);pC(Xr,"displayName","Tooltip");pC(Xr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!si.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var x1e=bo,w1e=function(){return x1e.Date.now()},O1e=w1e,S1e=/\s/;function E1e(e){for(var t=e.length;t--&&S1e.test(e.charAt(t)););return t}var C1e=E1e,P1e=C1e,T1e=/^\s+/;function j1e(e){return e&&e.slice(0,P1e(e)+1).replace(T1e,"")}var A1e=j1e,k1e=A1e,Gk=cs,N1e=Mu,Kk=NaN,M1e=/^[-+]0x[0-9a-f]+$/i,L1e=/^0b[01]+$/i,R1e=/^0o[0-7]+$/i,$1e=parseInt;function I1e(e){if(typeof e=="number")return e;if(N1e(e))return Kk;if(Gk(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Gk(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=k1e(e);var n=L1e.test(e);return n||R1e.test(e)?$1e(e.slice(2),n?2:8):M1e.test(e)?Kk:+e}var a8=I1e,D1e=cs,U1=O1e,qk=a8,F1e="Expected a function",B1e=Math.max,U1e=Math.min;function z1e(e,t,n){var r,i,o,a,s,l,c=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(F1e);t=qk(t)||0,D1e(n)&&(f=!!n.leading,d="maxWait"in n,o=d?B1e(qk(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p);function v(C){var T=r,A=i;return r=i=void 0,c=C,a=e.apply(A,T),a}function g(C){return c=C,s=setTimeout(_,t),f?v(C):a}function y(C){var T=C-l,A=C-c,D=t-T;return d?U1e(D,o-A):D}function x(C){var T=C-l,A=C-c;return l===void 0||T>=t||T<0||d&&A>=o}function _(){var C=U1();if(x(C))return b(C);s=setTimeout(_,y(C))}function b(C){return s=void 0,p&&r?v(C):(r=i=void 0,a)}function w(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function S(){return s===void 0?a:b(U1())}function E(){var C=U1(),T=x(C);if(r=arguments,i=this,l=C,T){if(s===void 0)return g(l);if(d)return clearTimeout(s),s=setTimeout(_,t),v(l)}return s===void 0&&(s=setTimeout(_,t)),a}return E.cancel=w,E.flush=S,E}var V1e=z1e,W1e=V1e,H1e=cs,G1e="Expected a function";function K1e(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(G1e);return H1e(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),W1e(e,t,{leading:r,maxWait:t,trailing:i})}var q1e=K1e;const s8=at(q1e);function dh(e){"@babel/helpers - typeof";return dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(e)}function Yk(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;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(q=s8(q,y,{trailing:!0,leading:!1}));var W=new ResizeObserver(q),X=E.current.getBoundingClientRect(),Q=X.width,ne=X.height;return I(Q,ne),W.observe(E.current),function(){W.disconnect()}},[I,y]);var F=R.useMemo(function(){var q=D.containerWidth,W=D.containerHeight;if(q<0||W<0)return null;Ni(Vs(a)||Vs(l),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,a,l),Ni(!n||n>0,"The aspect(%s) must be greater than zero.",n);var X=Vs(a)?q:a,Q=Vs(l)?W:l;n&&n>0&&(X?Q=X/n:Q&&(X=Q*n),p&&Q>p&&(Q=p)),Ni(X>0||Q>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.`,X,Q,a,l,f,d,n);var ne=!Array.isArray(v)&&l2.isElement(v)&&Ro(v.type).endsWith("Chart");return V.Children.map(v,function(Z){return l2.isElement(Z)?R.cloneElement(Z,wm({width:X,height:Q},ne?{style:wm({height:"100%",width:"100%",maxHeight:Q,maxWidth:X},Z.props.style)}:{})):Z})},[n,v,l,p,d,f,D,a]);return V.createElement("div",{id:x?"".concat(x):void 0,className:Ce("recharts-responsive-container",_),style:wm(wm({},S),{},{width:a,height:l,minWidth:f,minHeight:d,maxHeight:p}),ref:E},F)}),Ba=function(t){return null};Ba.displayName="Cell";function hh(e){"@babel/helpers - typeof";return hh=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},hh(e)}function Xk(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 R2(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||si.isSsr)return{width:0,height:0};var r=l_e(n),i=JSON.stringify({text:t,copyStyle:r});if(ql.widthCache[i])return ql.widthCache[i];try{var o=document.getElementById(Qk);o||(o=document.createElement("span"),o.setAttribute("id",Qk),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=R2(R2({},s_e),r);Object.assign(o.style,a),o.textContent="".concat(t);var s=o.getBoundingClientRect(),l={width:s.width,height:s.height};return ql.widthCache[i]=l,++ql.cacheCount>a_e&&(ql.cacheCount=0,ql.widthCache={}),l}catch{return{width:0,height:0}}},c_e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ph(e){"@babel/helpers - typeof";return ph=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},ph(e)}function Ig(e,t){return h_e(e)||d_e(e,t)||f_e(e,t)||u_e()}function u_e(){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 f_e(e,t){if(e){if(typeof e=="string")return Jk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jk(e,t)}}function Jk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function P_e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function oN(e,t){return k_e(e)||A_e(e,t)||j_e(e,t)||T_e()}function T_e(){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 j_e(e,t){if(e){if(typeof e=="string")return aN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aN(e,t)}}function aN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return X.reduce(function(Q,ne){var Z=ne.word,z=ne.width,B=Q[Q.length-1];if(B&&(i==null||o||B.width+z+rne.width?Q:ne})};if(!f)return v;for(var y="…",x=function(X){var Q=d.slice(0,X),ne=f8({breakAll:c,style:l,children:Q+y}).wordsWithComputedWidth,Z=p(ne),z=Z.length>a||g(Z).width>Number(i);return[z,Z]},_=0,b=d.length-1,w=0,S;_<=b&&w<=d.length-1;){var E=Math.floor((_+b)/2),C=E-1,T=x(C),A=oN(T,2),D=A[0],N=A[1],I=x(E),F=oN(I,1),q=F[0];if(!D&&!q&&(_=E+1),D&&q&&(b=E-1),!D&&q){S=N;break}w++}return S||v},sN=function(t){var n=Ue(t)?[]:t.toString().split(u8);return[{words:n}]},M_e=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!si.isSsr){var l,c,f=f8({breakAll:a,children:i,style:o});if(f){var d=f.wordsWithComputedWidth,p=f.spaceWidth;l=d,c=p}else return sN(i);return N_e({breakAll:a,children:i,maxLines:s,style:o},l,c,n,r)}return sN(i)},lN="#808080",gl=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,c=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,p=t.textAnchor,v=p===void 0?"start":p,g=t.verticalAnchor,y=g===void 0?"end":g,x=t.fill,_=x===void 0?lN:x,b=iN(t,E_e),w=R.useMemo(function(){return M_e({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:d,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,d,b.style,b.width]),S=b.dx,E=b.dy,C=b.angle,T=b.className,A=b.breakAll,D=iN(b,C_e);if(!cn(r)||!cn(o))return null;var N=r+(Ee(S)?S:0),I=o+(Ee(E)?E:0),F;switch(y){case"start":F=z1("calc(".concat(c,")"));break;case"middle":F=z1("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:F=z1("calc(".concat(w.length-1," * -").concat(s,")"));break}var q=[];if(d){var W=w[0].width,X=b.width;q.push("scale(".concat((Ee(X)?X/W:1)/W,")"))}return C&&q.push("rotate(".concat(C,", ").concat(N,", ").concat(I,")")),q.length&&(D.transform=q.join(" ")),V.createElement("text",$2({},De(D,!0),{x:N,y:I,className:Ce("recharts-text",T),textAnchor:v,fill:_.includes("url")?lN:_}),w.map(function(Q,ne){var Z=Q.words.join(A?"":" ");return V.createElement("tspan",{x:N,dy:ne===0?F:s,key:Z},Z)}))};function Ua(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function L_e(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function vC(e){let t,n,r;e.length!==2?(t=Ua,n=(s,l)=>Ua(e(s),l),r=(s,l)=>e(s)-l):(t=e===Ua||e===L_e?e:R_e,n=e,r=e);function i(s,l,c=0,f=s.length){if(c>>1;n(s[d],l)<0?c=d+1:f=d}while(c>>1;n(s[d],l)<=0?c=d+1:f=d}while(cc&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function R_e(){return 0}function d8(e){return e===null?NaN:+e}function*$_e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const I_e=vC(Ua),hp=I_e.right;vC(d8).center;class cN extends Map{constructor(t,n=B_e){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(uN(this,t))}has(t){return super.has(uN(this,t))}set(t,n){return super.set(D_e(this,t),n)}delete(t){return super.delete(F_e(this,t))}}function uN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function D_e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function F_e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function B_e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function U_e(e=Ua){if(e===Ua)return h8;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 h8(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const z_e=Math.sqrt(50),V_e=Math.sqrt(10),W_e=Math.sqrt(2);function Dg(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=z_e?10:o>=V_e?5:o>=W_e?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/ct&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*ct&&--l),l0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let c=0;c=r)&&(n=r);return n}function dN(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function p8(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?h8:U_e(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(l-d)/l)*(c-l/2<0?-1:1),v=Math.max(n,Math.floor(t-c*d/l+p)),g=Math.min(r,Math.floor(t+(l-c)*d/l+p));p8(e,t,v,g,i)}const o=e[t];let a=n,s=r;for(Af(e,n,t),i(e[r],o)>0&&Af(e,n,r);a0;)--s}i(e[n],o)===0?Af(e,n,s):(++s,Af(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Af(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function H_e(e,t,n){if(e=Float64Array.from($_e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return dN(e);if(t>=1)return fN(e);var r,i=(r-1)*t,o=Math.floor(i),a=fN(p8(e,o).subarray(0,o+1)),s=dN(e.subarray(o+1));return a+(s-a)*(i-o)}}function G_e(e,t,n=d8){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),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function K_e(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>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Sm(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Sm(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=Y_e.exec(e))?new lr(t[1],t[2],t[3],1):(t=Z_e.exec(e))?new lr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=X_e.exec(e))?Sm(t[1],t[2],t[3],t[4]):(t=Q_e.exec(e))?Sm(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=J_e.exec(e))?bN(t[1],t[2]/100,t[3]/100,1):(t=exe.exec(e))?bN(t[1],t[2]/100,t[3]/100,t[4]):hN.hasOwnProperty(e)?vN(hN[e]):e==="transparent"?new lr(NaN,NaN,NaN,0):null}function vN(e){return new lr(e>>16&255,e>>8&255,e&255,1)}function Sm(e,t,n,r){return r<=0&&(e=t=n=NaN),new lr(e,t,n,r)}function rxe(e){return e instanceof pp||(e=yh(e)),e?(e=e.rgb(),new lr(e.r,e.g,e.b,e.opacity)):new lr}function U2(e,t,n,r){return arguments.length===1?rxe(e):new lr(e,t,n,r??1)}function lr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}yC(lr,U2,v8(pp,{brighter(e){return e=e==null?Fg:Math.pow(Fg,e),new lr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vh:Math.pow(vh,e),new lr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new lr(nl(this.r),nl(this.g),nl(this.b),Bg(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:gN,formatHex:gN,formatHex8:ixe,formatRgb:yN,toString:yN}));function gN(){return`#${Ws(this.r)}${Ws(this.g)}${Ws(this.b)}`}function ixe(){return`#${Ws(this.r)}${Ws(this.g)}${Ws(this.b)}${Ws((isNaN(this.opacity)?1:this.opacity)*255)}`}function yN(){const e=Bg(this.opacity);return`${e===1?"rgb(":"rgba("}${nl(this.r)}, ${nl(this.g)}, ${nl(this.b)}${e===1?")":`, ${e})`}`}function Bg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ws(e){return e=nl(e),(e<16?"0":"")+e.toString(16)}function bN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Pi(e,t,n,r)}function g8(e){if(e instanceof Pi)return new Pi(e.h,e.s,e.l,e.opacity);if(e instanceof pp||(e=yh(e)),!e)return new Pi;if(e instanceof Pi)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),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&l<1?0:a,new Pi(a,s,l,e.opacity)}function oxe(e,t,n,r){return arguments.length===1?g8(e):new Pi(e,t,n,r??1)}function Pi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}yC(Pi,oxe,v8(pp,{brighter(e){return e=e==null?Fg:Math.pow(Fg,e),new Pi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vh:Math.pow(vh,e),new Pi(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 lr(V1(e>=240?e-240:e+120,i,r),V1(e,i,r),V1(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Pi(_N(this.h),Em(this.s),Em(this.l),Bg(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=Bg(this.opacity);return`${e===1?"hsl(":"hsla("}${_N(this.h)}, ${Em(this.s)*100}%, ${Em(this.l)*100}%${e===1?")":`, ${e})`}`}}));function _N(e){return e=(e||0)%360,e<0?e+360:e}function Em(e){return Math.max(0,Math.min(1,e||0))}function V1(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 bC=e=>()=>e;function axe(e,t){return function(n){return e+n*t}}function sxe(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 lxe(e){return(e=+e)==1?y8:function(t,n){return n-t?sxe(t,n,e):bC(isNaN(t)?n:t)}}function y8(e,t){var n=t-e;return n?axe(e,n):bC(isNaN(e)?t:e)}const xN=function e(t){var n=lxe(t);function r(i,o){var a=n((i=U2(i)).r,(o=U2(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),c=y8(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=l(f),i.opacity=c(f),i+""}}return r.gamma=e,r}(1);function cxe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Ug(r,i)})),n=W1.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function _xe(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?xxe:_xe,l=c=null,d}function d(p){return p==null||isNaN(p=+p)?o:(l||(l=s(e.map(r),t,n)))(r(a(p)))}return d.invert=function(p){return a(i((c||(c=s(t,e.map(r),Ug)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,zg),f()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),n=_C,f()},d.clamp=function(p){return arguments.length?(a=p?!0:Zn,f()):a!==Zn},d.interpolate=function(p){return arguments.length?(n=p,f()):n},d.unknown=function(p){return arguments.length?(o=p,d):o},function(p,v){return r=p,i=v,f()}}function xC(){return $0()(Zn,Zn)}function wxe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Vg(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 lu(e){return e=Vg(Math.abs(e)),e?e[1]:NaN}function Oxe(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function Sxe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Exe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bh(e){if(!(t=Exe.exec(e)))throw new Error("invalid format: "+e);var t;return new wC({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=wC.prototype;function wC(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+""}wC.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 Cxe(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var b8;function Pxe(e,t){var n=Vg(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(b8=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Vg(e,Math.max(0,t+o-1))[0]}function ON(e,t){var n=Vg(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 SN={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:wxe,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)=>ON(e*100,t),r:ON,s:Pxe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function EN(e){return e}var CN=Array.prototype.map,PN=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Txe(e){var t=e.grouping===void 0||e.thousands===void 0?EN:Oxe(CN.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?EN:Sxe(CN.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=bh(d);var p=d.fill,v=d.align,g=d.sign,y=d.symbol,x=d.zero,_=d.width,b=d.comma,w=d.precision,S=d.trim,E=d.type;E==="n"?(b=!0,E="g"):SN[E]||(w===void 0&&(w=12),S=!0,E="g"),(x||p==="0"&&v==="=")&&(x=!0,p="0",v="=");var C=y==="$"?n:y==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",T=y==="$"?r:/[%p]/.test(E)?a:"",A=SN[E],D=/[defgprs%]/.test(E);w=w===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function N(I){var F=C,q=T,W,X,Q;if(E==="c")q=A(I)+q,I="";else{I=+I;var ne=I<0||1/I<0;if(I=isNaN(I)?l:A(Math.abs(I),w),S&&(I=Cxe(I)),ne&&+I==0&&g!=="+"&&(ne=!1),F=(ne?g==="("?g:s:g==="-"||g==="("?"":g)+F,q=(E==="s"?PN[8+b8/3]:"")+q+(ne&&g==="("?")":""),D){for(W=-1,X=I.length;++WQ||Q>57){q=(Q===46?i+I.slice(W+1):I.slice(W))+q,I=I.slice(0,W);break}}}b&&!x&&(I=t(I,1/0));var Z=F.length+I.length+q.length,z=Z<_?new Array(_-Z+1).join(p):"";switch(b&&x&&(I=t(z+I,z.length?_-q.length:1/0),z=""),v){case"<":I=F+I+q+z;break;case"=":I=F+z+I+q;break;case"^":I=z.slice(0,Z=z.length>>1)+F+I+q+z.slice(Z);break;default:I=z+F+I+q;break}return o(I)}return N.toString=function(){return d+""},N}function f(d,p){var v=c((d=bh(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(lu(p)/3)))*3,y=Math.pow(10,-g),x=PN[8+g/3];return function(_){return v(y*_)+x}}return{format:c,formatPrefix:f}}var Cm,OC,_8;jxe({thousands:",",grouping:[3],currency:["$",""]});function jxe(e){return Cm=Txe(e),OC=Cm.format,_8=Cm.formatPrefix,Cm}function Axe(e){return Math.max(0,-lu(Math.abs(e)))}function kxe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(lu(t)/3)))*3-lu(Math.abs(e)))}function Nxe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,lu(t)-lu(e))+1}function x8(e,t,n,r){var i=F2(e,t,n),o;switch(r=bh(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=kxe(i,a))&&(r.precision=o),_8(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Nxe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Axe(i))&&(r.precision=o-(r.type==="%")*2);break}}return OC(r)}function fs(e){var t=e.domain;return e.ticks=function(n){var r=t();return I2(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return x8(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,a=r[i],s=r[o],l,c,f=10;for(s0;){if(c=D2(a,s,n),c===l)return r[i]=a,r[o]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Wg(){var e=xC();return e.copy=function(){return mp(e,Wg())},pi.apply(e,arguments),fs(e)}function w8(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,zg),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return w8(e).unknown(t)},e=arguments.length?Array.from(e,zg):[0,1],fs(n)}function O8(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function Ixe(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 AN(e){return(t,n)=>-e(-t,n)}function SC(e){const t=e(TN,jN),n=t.domain;let r=10,i,o;function a(){return i=Ixe(r),o=$xe(r),n()[0]<0?(i=AN(i),o=AN(o),e(Mxe,Lxe)):e(TN,jN),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],f=l[l.length-1];const d=f0){for(;p<=v;++p)for(g=1;gf)break;_.push(y)}}else for(;p<=v;++p)for(g=r-1;g>=1;--g)if(y=p>0?g/o(-p):g*o(p),!(yf)break;_.push(y)}_.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=bh(l)).precision==null&&(l.trim=!0),l=OC(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/o(Math.round(i(f)));return d*rn(O8(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function S8(){const e=SC($0()).domain([1,10]);return e.copy=()=>mp(e,S8()).base(e.base()),pi.apply(e,arguments),e}function kN(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function NN(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function EC(e){var t=1,n=e(kN(t),NN(t));return n.constant=function(r){return arguments.length?e(kN(t=+r),NN(t)):t},fs(n)}function E8(){var e=EC($0());return e.copy=function(){return mp(e,E8()).constant(e.constant())},pi.apply(e,arguments)}function MN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Dxe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Fxe(e){return e<0?-e*e:e*e}function CC(e){var t=e(Zn,Zn),n=1;function r(){return n===1?e(Zn,Zn):n===.5?e(Dxe,Fxe):e(MN(n),MN(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},fs(t)}function PC(){var e=CC($0());return e.copy=function(){return mp(e,PC()).exponent(e.exponent())},pi.apply(e,arguments),e}function Bxe(){return PC.apply(null,arguments).exponent(.5)}function LN(e){return Math.sign(e)*e*e}function Uxe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function C8(){var e=xC(),t=[0,1],n=!1,r;function i(o){var a=Uxe(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(LN(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,zg)).map(LN)),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 C8(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},pi.apply(i,arguments),fs(i)}function P8(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return T8().domain([e,t]).range(i).unknown(o)},pi.apply(fs(a),arguments)}function j8(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[hp(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 a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return j8().domain(e).range(t).unknown(n)},pi.apply(i,arguments)}const H1=new Date,G1=new Date;function fn(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 a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return l;let c;do l.push(c=new Date(+o)),t(o,s),e(o);while(cfn(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(H1.setTime(+o),G1.setTime(+a),e(H1),e(G1),Math.floor(n(H1,G1))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Hg=fn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Hg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?fn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Hg);Hg.range;const ko=1e3,ii=ko*60,No=ii*60,Ko=No*24,TC=Ko*7,RN=Ko*30,K1=Ko*365,Hs=fn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ko)},(e,t)=>(t-e)/ko,e=>e.getUTCSeconds());Hs.range;const jC=fn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ko)},(e,t)=>{e.setTime(+e+t*ii)},(e,t)=>(t-e)/ii,e=>e.getMinutes());jC.range;const AC=fn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ii)},(e,t)=>(t-e)/ii,e=>e.getUTCMinutes());AC.range;const kC=fn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ko-e.getMinutes()*ii)},(e,t)=>{e.setTime(+e+t*No)},(e,t)=>(t-e)/No,e=>e.getHours());kC.range;const NC=fn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*No)},(e,t)=>(t-e)/No,e=>e.getUTCHours());NC.range;const vp=fn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ii)/Ko,e=>e.getDate()-1);vp.range;const I0=fn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ko,e=>e.getUTCDate()-1);I0.range;const A8=fn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ko,e=>Math.floor(e/Ko));A8.range;function Pl(e){return fn(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())*ii)/TC)}const D0=Pl(0),Gg=Pl(1),zxe=Pl(2),Vxe=Pl(3),cu=Pl(4),Wxe=Pl(5),Hxe=Pl(6);D0.range;Gg.range;zxe.range;Vxe.range;cu.range;Wxe.range;Hxe.range;function Tl(e){return fn(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)/TC)}const F0=Tl(0),Kg=Tl(1),Gxe=Tl(2),Kxe=Tl(3),uu=Tl(4),qxe=Tl(5),Yxe=Tl(6);F0.range;Kg.range;Gxe.range;Kxe.range;uu.range;qxe.range;Yxe.range;const MC=fn(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());MC.range;const LC=fn(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());LC.range;const qo=fn(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());qo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:fn(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)});qo.range;const Yo=fn(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());Yo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:fn(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)});Yo.range;function k8(e,t,n,r,i,o){const a=[[Hs,1,ko],[Hs,5,5*ko],[Hs,15,15*ko],[Hs,30,30*ko],[o,1,ii],[o,5,5*ii],[o,15,15*ii],[o,30,30*ii],[i,1,No],[i,3,3*No],[i,6,6*No],[i,12,12*No],[r,1,Ko],[r,2,2*Ko],[n,1,TC],[t,1,RN],[t,3,3*RN],[e,1,K1]];function s(c,f,d){const p=fx).right(a,p);if(v===a.length)return e.every(F2(c/K1,f/K1,d));if(v===0)return Hg.every(Math.max(F2(c,f,d),1));const[g,y]=a[p/a[v-1][2]53)return null;"w"in Y||(Y.w=1),"Z"in Y?(he=Y1(kf(Y.y,0,1)),Se=he.getUTCDay(),he=Se>4||Se===0?Kg.ceil(he):Kg(he),he=I0.offset(he,(Y.V-1)*7),Y.y=he.getUTCFullYear(),Y.m=he.getUTCMonth(),Y.d=he.getUTCDate()+(Y.w+6)%7):(he=q1(kf(Y.y,0,1)),Se=he.getDay(),he=Se>4||Se===0?Gg.ceil(he):Gg(he),he=vp.offset(he,(Y.V-1)*7),Y.y=he.getFullYear(),Y.m=he.getMonth(),Y.d=he.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),Se="Z"in Y?Y1(kf(Y.y,0,1)).getUTCDay():q1(kf(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(Se+5)%7:Y.w+Y.U*7-(Se+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,Y1(Y)):q1(Y)}}function A(k,U,J,Y){for(var oe=0,he=U.length,Se=J.length,se,pe;oe=Se)return-1;if(se=U.charCodeAt(oe++),se===37){if(se=U.charAt(oe++),pe=E[se in $N?U.charAt(oe++):se],!pe||(Y=pe(k,J,Y))<0)return-1}else if(se!=J.charCodeAt(Y++))return-1}return Y}function D(k,U,J){var Y=c.exec(U.slice(J));return Y?(k.p=f.get(Y[0].toLowerCase()),J+Y[0].length):-1}function N(k,U,J){var Y=v.exec(U.slice(J));return Y?(k.w=g.get(Y[0].toLowerCase()),J+Y[0].length):-1}function I(k,U,J){var Y=d.exec(U.slice(J));return Y?(k.w=p.get(Y[0].toLowerCase()),J+Y[0].length):-1}function F(k,U,J){var Y=_.exec(U.slice(J));return Y?(k.m=b.get(Y[0].toLowerCase()),J+Y[0].length):-1}function q(k,U,J){var Y=y.exec(U.slice(J));return Y?(k.m=x.get(Y[0].toLowerCase()),J+Y[0].length):-1}function W(k,U,J){return A(k,t,U,J)}function X(k,U,J){return A(k,n,U,J)}function Q(k,U,J){return A(k,r,U,J)}function ne(k){return a[k.getDay()]}function Z(k){return o[k.getDay()]}function z(k){return l[k.getMonth()]}function B(k){return s[k.getMonth()]}function H(k){return i[+(k.getHours()>=12)]}function ee(k){return 1+~~(k.getMonth()/3)}function K(k){return a[k.getUTCDay()]}function te(k){return o[k.getUTCDay()]}function ie(k){return l[k.getUTCMonth()]}function ae(k){return s[k.getUTCMonth()]}function fe(k){return i[+(k.getUTCHours()>=12)]}function j(k){return 1+~~(k.getUTCMonth()/3)}return{format:function(k){var U=C(k+="",w);return U.toString=function(){return k},U},parse:function(k){var U=T(k+="",!1);return U.toString=function(){return k},U},utcFormat:function(k){var U=C(k+="",S);return U.toString=function(){return k},U},utcParse:function(k){var U=T(k+="",!0);return U.toString=function(){return k},U}}}var $N={"-":"",_:" ",0:"0"},wn=/^\s*\d+/,twe=/^%/,nwe=/[\\^$*+?|[\]().{}]/g;function ft(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function iwe(e,t,n){var r=wn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function owe(e,t,n){var r=wn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function awe(e,t,n){var r=wn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function swe(e,t,n){var r=wn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function lwe(e,t,n){var r=wn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function IN(e,t,n){var r=wn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function DN(e,t,n){var r=wn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function cwe(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 uwe(e,t,n){var r=wn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function fwe(e,t,n){var r=wn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function FN(e,t,n){var r=wn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function dwe(e,t,n){var r=wn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function BN(e,t,n){var r=wn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function hwe(e,t,n){var r=wn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function pwe(e,t,n){var r=wn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function mwe(e,t,n){var r=wn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function vwe(e,t,n){var r=wn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function gwe(e,t,n){var r=twe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ywe(e,t,n){var r=wn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function bwe(e,t,n){var r=wn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function UN(e,t){return ft(e.getDate(),t,2)}function _we(e,t){return ft(e.getHours(),t,2)}function xwe(e,t){return ft(e.getHours()%12||12,t,2)}function wwe(e,t){return ft(1+vp.count(qo(e),e),t,3)}function N8(e,t){return ft(e.getMilliseconds(),t,3)}function Owe(e,t){return N8(e,t)+"000"}function Swe(e,t){return ft(e.getMonth()+1,t,2)}function Ewe(e,t){return ft(e.getMinutes(),t,2)}function Cwe(e,t){return ft(e.getSeconds(),t,2)}function Pwe(e){var t=e.getDay();return t===0?7:t}function Twe(e,t){return ft(D0.count(qo(e)-1,e),t,2)}function M8(e){var t=e.getDay();return t>=4||t===0?cu(e):cu.ceil(e)}function jwe(e,t){return e=M8(e),ft(cu.count(qo(e),e)+(qo(e).getDay()===4),t,2)}function Awe(e){return e.getDay()}function kwe(e,t){return ft(Gg.count(qo(e)-1,e),t,2)}function Nwe(e,t){return ft(e.getFullYear()%100,t,2)}function Mwe(e,t){return e=M8(e),ft(e.getFullYear()%100,t,2)}function Lwe(e,t){return ft(e.getFullYear()%1e4,t,4)}function Rwe(e,t){var n=e.getDay();return e=n>=4||n===0?cu(e):cu.ceil(e),ft(e.getFullYear()%1e4,t,4)}function $we(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ft(t/60|0,"0",2)+ft(t%60,"0",2)}function zN(e,t){return ft(e.getUTCDate(),t,2)}function Iwe(e,t){return ft(e.getUTCHours(),t,2)}function Dwe(e,t){return ft(e.getUTCHours()%12||12,t,2)}function Fwe(e,t){return ft(1+I0.count(Yo(e),e),t,3)}function L8(e,t){return ft(e.getUTCMilliseconds(),t,3)}function Bwe(e,t){return L8(e,t)+"000"}function Uwe(e,t){return ft(e.getUTCMonth()+1,t,2)}function zwe(e,t){return ft(e.getUTCMinutes(),t,2)}function Vwe(e,t){return ft(e.getUTCSeconds(),t,2)}function Wwe(e){var t=e.getUTCDay();return t===0?7:t}function Hwe(e,t){return ft(F0.count(Yo(e)-1,e),t,2)}function R8(e){var t=e.getUTCDay();return t>=4||t===0?uu(e):uu.ceil(e)}function Gwe(e,t){return e=R8(e),ft(uu.count(Yo(e),e)+(Yo(e).getUTCDay()===4),t,2)}function Kwe(e){return e.getUTCDay()}function qwe(e,t){return ft(Kg.count(Yo(e)-1,e),t,2)}function Ywe(e,t){return ft(e.getUTCFullYear()%100,t,2)}function Zwe(e,t){return e=R8(e),ft(e.getUTCFullYear()%100,t,2)}function Xwe(e,t){return ft(e.getUTCFullYear()%1e4,t,4)}function Qwe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?uu(e):uu.ceil(e),ft(e.getUTCFullYear()%1e4,t,4)}function Jwe(){return"+0000"}function VN(){return"%"}function WN(e){return+e}function HN(e){return Math.floor(+e/1e3)}var Yl,$8,I8;e2e({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 e2e(e){return Yl=ewe(e),$8=Yl.format,Yl.parse,I8=Yl.utcFormat,Yl.utcParse,Yl}function t2e(e){return new Date(e)}function n2e(e){return e instanceof Date?+e:+new Date(+e)}function RC(e,t,n,r,i,o,a,s,l,c){var f=xC(),d=f.invert,p=f.domain,v=c(".%L"),g=c(":%S"),y=c("%I:%M"),x=c("%I %p"),_=c("%a %d"),b=c("%b %d"),w=c("%B"),S=c("%Y");function E(C){return(l(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>H_e(e,o/r))},n.copy=function(){return U8(t).domain(e)},oa.apply(n,arguments)}function U0(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,c=Zn,f,d=!1,p;function v(y){return isNaN(y=+y)?p:(y=.5+((y=+f(y))-o)*(r*yt}var H8=c2e,u2e=z0,f2e=H8,d2e=Uu;function h2e(e){return e&&e.length?u2e(e,d2e,f2e):void 0}var p2e=h2e;const Pa=at(p2e);function m2e(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};$e.decimalPlaces=$e.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Pt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};$e.dividedBy=$e.div=function(e){return $o(this,new this.constructor(e))};$e.dividedToIntegerBy=$e.idiv=function(e){var t=this,n=t.constructor;return yt($o(t,new n(e),0,1),n.precision)};$e.equals=$e.eq=function(e){return!this.cmp(e)};$e.exponent=function(){return rn(this)};$e.greaterThan=$e.gt=function(e){return this.cmp(e)>0};$e.greaterThanOrEqualTo=$e.gte=function(e){return this.cmp(e)>=0};$e.isInteger=$e.isint=function(){return this.e>this.d.length-2};$e.isNegative=$e.isneg=function(){return this.s<0};$e.isPositive=$e.ispos=function(){return this.s>0};$e.isZero=function(){return this.s===0};$e.lessThan=$e.lt=function(e){return this.cmp(e)<0};$e.lessThanOrEqualTo=$e.lte=function(e){return this.cmp(e)<1};$e.logarithm=$e.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(Pr))throw Error(di+"NaN");if(n.s<1)throw Error(di+(n.s?"NaN":"-Infinity"));return n.eq(Pr)?new r(0):(Mt=!1,t=$o(_h(n,o),_h(e,o),o),Mt=!0,yt(t,i))};$e.minus=$e.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Z8(t,e):q8(t,(e.s=-e.s,e))};$e.modulo=$e.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(di+"NaN");return n.s?(Mt=!1,t=$o(n,e,0,1).times(e),Mt=!0,n.minus(t)):yt(new r(n),i)};$e.naturalExponential=$e.exp=function(){return Y8(this)};$e.naturalLogarithm=$e.ln=function(){return _h(this)};$e.negated=$e.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};$e.plus=$e.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?q8(t,e):Z8(t,(e.s=-e.s,e))};$e.precision=$e.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(rl+e);if(t=rn(i)+1,r=i.d.length-1,n=r*Pt+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};$e.squareRoot=$e.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(di+"NaN")}for(e=rn(s),Mt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=no(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Wu((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 l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus($o(s,o,a+2)).times(.5),no(o.d).slice(0,a)===(t=no(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(yt(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return Mt=!0,yt(r,n)};$e.times=$e.mul=function(e){var t,n,r,i,o,a,s,l,c,f=this,d=f.constructor,p=f.d,v=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=p.length,c=v.length,l=0;){for(t=0,i=l+r;i>r;)s=o[i]+v[r]*p[i-r-1]+t,o[i--]=s%vn|0,t=s/vn|0;o[i]=(o[i]+t)%vn|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Mt?yt(e,d.precision):e};$e.toDecimalPlaces=$e.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(po(e,0,Vu),t===void 0?t=r.rounding:po(t,0,8),yt(n,e+rn(n)+1,t))};$e.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=yl(r,!0):(po(e,0,Vu),t===void 0?t=i.rounding:po(t,0,8),r=yt(new i(r),e+1,t),n=yl(r,!0,e+1)),n};$e.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?yl(i):(po(e,0,Vu),t===void 0?t=o.rounding:po(t,0,8),r=yt(new o(i),e+rn(i)+1,t),n=yl(r.abs(),!1,e+rn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};$e.toInteger=$e.toint=function(){var e=this,t=e.constructor;return yt(new t(e),rn(e)+1,t.rounding)};$e.toNumber=function(){return+this};$e.toPower=$e.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=12,f=+(e=new l(e));if(!e.s)return new l(Pr);if(s=new l(s),!s.s){if(e.s<1)throw Error(di+"Infinity");return s}if(s.eq(Pr))return s;if(r=l.precision,e.eq(Pr))return yt(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=f<0?-f:f)<=K8){for(i=new l(Pr),t=Math.ceil(r/Pt+4),Mt=!1;n%2&&(i=i.times(s),qN(i.d,t)),n=Wu(n/2),n!==0;)s=s.times(s),qN(s.d,t);return Mt=!0,e.s<0?new l(Pr).div(i):yt(i,r)}}else if(o<0)throw Error(di+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Mt=!1,i=e.times(_h(s,r+c)),Mt=!0,i=Y8(i),i.s=o,i};$e.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=rn(i),r=yl(i,n<=o.toExpNeg||n>=o.toExpPos)):(po(e,1,Vu),t===void 0?t=o.rounding:po(t,0,8),i=yt(new o(i),e,t),n=rn(i),r=yl(i,e<=n||n<=o.toExpNeg,e)),r};$e.toSignificantDigits=$e.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(po(e,1,Vu),t===void 0?t=r.rounding:po(t,0,8)),yt(new r(n),e,t)};$e.toString=$e.valueOf=$e.val=$e.toJSON=$e[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=rn(e),n=e.constructor;return yl(e,t<=n.toExpNeg||t>=n.toExpPos)};function q8(e,t){var n,r,i,o,a,s,l,c,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Mt?yt(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=c.length):(r=c,i=a,s=l.length),a=Math.ceil(d/Pt),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/vn|0,l[o]%=vn;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Mt?yt(t,d):t}function po(e,t,n){if(e!==~~e||en)throw Error(rl+e)}function no(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var s,l,c,f,d,p,v,g,y,x,_,b,w,S,E,C,T,A,D=r.constructor,N=r.s==i.s?1:-1,I=r.d,F=i.d;if(!r.s)return new D(r);if(!i.s)throw Error(di+"Division by zero");for(l=r.e-i.e,T=F.length,E=I.length,v=new D(N),g=v.d=[],c=0;F[c]==(I[c]||0);)++c;if(F[c]>(I[c]||0)&&--l,o==null?b=o=D.precision:a?b=o+(rn(r)-rn(i))+1:b=o,b<0)return new D(0);if(b=b/Pt+2|0,c=0,T==1)for(f=0,F=F[0],b++;(c1&&(F=e(F,f),I=e(I,f),T=F.length,E=I.length),S=T,y=I.slice(0,T),x=y.length;x=vn/2&&++C;do f=0,s=t(F,y,T,x),s<0?(_=y[0],T!=x&&(_=_*vn+(y[1]||0)),f=_/C|0,f>1?(f>=vn&&(f=vn-1),d=e(F,f),p=d.length,x=y.length,s=t(d,y,p,x),s==1&&(f--,n(d,T16)throw Error(DC+rn(e));if(!e.s)return new f(Pr);for(t==null?(Mt=!1,s=d):s=t,a=new f(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Rs(2,c))/Math.LN10*2+5|0,s+=r,n=i=o=new f(Pr),f.precision=s;;){if(i=yt(i.times(e),s),n=n.times(++l),a=o.plus($o(i,n,s)),no(a.d).slice(0,s)===no(o.d).slice(0,s)){for(;c--;)o=yt(o.times(o),s);return f.precision=d,t==null?(Mt=!0,yt(o,d)):o}o=a}}function rn(e){for(var t=e.e*Pt,n=e.d[0];n>=10;n/=10)t++;return t}function Z1(e,t,n){if(t>e.LN10.sd())throw Mt=!0,n&&(e.precision=n),Error(di+"LN10 precision limit exceeded");return yt(new e(e.LN10),t)}function ba(e){for(var t="";e--;)t+="0";return t}function _h(e,t){var n,r,i,o,a,s,l,c,f,d=1,p=10,v=e,g=v.d,y=v.constructor,x=y.precision;if(v.s<1)throw Error(di+(v.s?"NaN":"-Infinity"));if(v.eq(Pr))return new y(0);if(t==null?(Mt=!1,c=x):c=t,v.eq(10))return t==null&&(Mt=!0),Z1(y,c);if(c+=p,y.precision=c,n=no(g),r=n.charAt(0),o=rn(v),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=no(v.d),r=n.charAt(0),d++;o=rn(v),r>1?(v=new y("0."+n),o++):v=new y(r+"."+n.slice(1))}else return l=Z1(y,c+2,x).times(o+""),v=_h(new y(r+"."+n.slice(1)),c-p).plus(l),y.precision=x,t==null?(Mt=!0,yt(v,x)):v;for(s=a=v=$o(v.minus(Pr),v.plus(Pr),c),f=yt(v.times(v),c),i=3;;){if(a=yt(a.times(f),c),l=s.plus($o(a,new y(i),c)),no(l.d).slice(0,c)===no(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(Z1(y,c+2,x).times(o+""))),s=$o(s,new y(d),c),y.precision=x,t==null?(Mt=!0,yt(s,x)):s;s=l,i+=2}}function KN(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=Wu(n/Pt),e.d=[],r=(n+1)%Pt,n<0&&(r+=Pt),rqg||e.e<-qg))throw Error(DC+n)}else e.s=0,e.e=0,e.d=[0];return e}function yt(e,t,n){var r,i,o,a,s,l,c,f,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=Pt,i=t,c=d[f=0];else{if(f=Math.ceil((r+1)/Pt),o=d.length,f>=o)return e;for(c=o=d[f],a=1;o>=10;o/=10)a++;r%=Pt,i=r-Pt+a}if(n!==void 0&&(o=Rs(10,a-i-1),s=c/o%10|0,l=t<0||d[f+1]!==void 0||c%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/Rs(10,a-i):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=rn(e),d.length=1,t=t-o-1,d[0]=Rs(10,(Pt-t%Pt)%Pt),e.e=Wu(-t/Pt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,o=1,f--):(d.length=f+1,o=Rs(10,Pt-r),d[f]=i>0?(c/Rs(10,a-i)%Rs(10,i)|0)*o:0),l)for(;;)if(f==0){(d[0]+=o)==vn&&(d[0]=1,++e.e);break}else{if(d[f]+=o,d[f]!=vn)break;d[f--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(Mt&&(e.e>qg||e.e<-qg))throw Error(DC+rn(e));return e}function Z8(e,t){var n,r,i,o,a,s,l,c,f,d,p=e.constructor,v=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Mt?yt(t,v):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(f=a<0,f?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),i=Math.max(Math.ceil(v/Pt),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,f=i0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]0?o=o.charAt(0)+"."+o.slice(1)+ba(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ba(-i-1)+o,n&&(r=n-a)>0&&(o+=ba(r))):i>=a?(o+=ba(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+ba(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=ba(r))),e.s<0?"-"+o:o}function qN(e,t){if(e.length>t)return e.length=t,!0}function X8(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(rl+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return KN(a,o.toString())}else if(typeof o!="string")throw Error(rl+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,$2e.test(o))KN(a,o);else throw Error(rl+o)}if(i.prototype=$e,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=X8,i.config=i.set=I2e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(rl+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(rl+n+": "+r);return this}var FC=X8(R2e);Pr=new FC(1);const vt=FC;function D2e(e){return z2e(e)||U2e(e)||B2e(e)||F2e()}function F2e(){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 B2e(e,t){if(e){if(typeof e=="string")return W2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W2(e,t)}}function U2e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function z2e(e){if(Array.isArray(e))return W2(e)}function W2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,YN(function(){for(var s=arguments.length,l=new Array(s),c=0;ce.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,o=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function rOe(e){if(Array.isArray(e))return e}function nF(e){var t=xh(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function rF(e,t,n){if(e.lte(0))return new vt(0);var r=H0.getDigitCount(e.toNumber()),i=new vt(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new vt(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?l:new vt(Math.ceil(l))}function iOe(e,t,n){var r=1,i=new vt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new vt(10).pow(H0.getDigitCount(e)-1),i=new vt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new vt(Math.floor(e)))}else e===0?i=new vt(Math.floor((t-1)/2)):n||(i=new vt(Math.floor(e)));var a=Math.floor((t-1)/2),s=G2e(H2e(function(l){return i.add(new vt(l-a).mul(r)).toNumber()}),H2);return s(0,t)}function iF(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new vt(0),tickMin:new vt(0),tickMax:new vt(0)};var o=rF(new vt(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new vt(0):(a=new vt(e).add(t).div(2),a=a.sub(new vt(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),l=Math.ceil(new vt(t).sub(a).div(o).toNumber()),c=s+l+1;return c>n?iF(e,t,n,r,i+1):(c0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:o,tickMin:a.sub(new vt(s).mul(o)),tickMax:a.add(new vt(l).mul(o))})}function oOe(e){var t=xh(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=nF([n,r]),l=xh(s,2),c=l[0],f=l[1];if(c===-1/0||f===1/0){var d=f===1/0?[c].concat(K2(H2(0,i-1).map(function(){return 1/0}))):[].concat(K2(H2(0,i-1).map(function(){return-1/0})),[f]);return n>r?G2(d):d}if(c===f)return iOe(c,i,o);var p=iF(c,f,a,o),v=p.step,g=p.tickMin,y=p.tickMax,x=H0.rangeStep(g,y.add(new vt(.1).mul(v)),v);return n>r?G2(x):x}function aOe(e,t){var n=xh(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=nF([r,i]),s=xh(a,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,i];if(l===c)return[l];var f=Math.max(t,2),d=rF(new vt(c).sub(l).div(f-1),o,0),p=[].concat(K2(H0.rangeStep(new vt(l),new vt(c).sub(new vt(.99).mul(d)),d)),[c]);return r>i?G2(p):p}var sOe=eF(oOe),lOe=eF(aOe),cOe="Invariant failed";function bl(e,t){throw new Error(cOe)}var uOe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Yg(){return Yg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gOe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Hu(e){var t=e.offset,n=e.layout,r=e.width,i=e.dataKey,o=e.data,a=e.dataPointFormatter,s=e.xAxis,l=e.yAxis,c=vOe(e,uOe),f=De(c,!1);e.direction==="x"&&s.type!=="number"&&bl();var d=o.map(function(p){var v=a(p,i),g=v.x,y=v.y,x=v.value,_=v.errorVal;if(!_)return null;var b=[],w,S;if(Array.isArray(_)){var E=fOe(_,2);w=E[0],S=E[1]}else w=S=_;if(n==="vertical"){var C=s.scale,T=y+t,A=T+r,D=T-r,N=C(x-w),I=C(x+S);b.push({x1:I,y1:A,x2:I,y2:D}),b.push({x1:N,y1:T,x2:I,y2:T}),b.push({x1:N,y1:A,x2:N,y2:D})}else if(n==="horizontal"){var F=l.scale,q=g+t,W=q-r,X=q+r,Q=F(x-w),ne=F(x+S);b.push({x1:W,y1:ne,x2:X,y2:ne}),b.push({x1:q,y1:Q,x2:q,y2:ne}),b.push({x1:W,y1:Q,x2:X,y2:Q})}return V.createElement(Xe,Yg({className:"recharts-errorBar",key:"bar-".concat(b.map(function(Z){return"".concat(Z.x1,"-").concat(Z.x2,"-").concat(Z.y1,"-").concat(Z.y2)}))},f),b.map(function(Z){return V.createElement("line",Yg({},Z,{key:"line-".concat(Z.x1,"-").concat(Z.x2,"-").concat(Z.y1,"-").concat(Z.y2)}))}))});return V.createElement(Xe,{className:"recharts-errorBars"},d)}Hu.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"};Hu.displayName="ErrorBar";function wh(e){"@babel/helpers - typeof";return wh=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},wh(e)}function XN(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 X1(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var l=o.range,c=0;c0?i[c-1].coordinate:i[s-1].coordinate,d=i[c].coordinate,p=c>=s-1?i[0].coordinate:i[c+1].coordinate,v=void 0;if(qn(d-f)!==qn(p-d)){var g=[];if(qn(p-d)===qn(l[1]-l[0])){v=p;var y=d+l[1]-l[0];g[0]=Math.min(y,(y+f)/2),g[1]=Math.max(y,(y+f)/2)}else{v=f;var x=p+l[1]-l[0];g[0]=Math.min(d,(x+d)/2),g[1]=Math.max(d,(x+d)/2)}var _=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(t>_[0]&&t<=_[1]||t>=g[0]&&t<=g[1]){a=i[c].index;break}}else{var b=Math.min(f,p),w=Math.max(f,p);if(t>(b+d)/2&&t<=(w+d)/2){a=i[c].index;break}}}else for(var S=0;S0&&S(r[S].coordinate+r[S-1].coordinate)/2&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S===s-1&&t>(r[S].coordinate+r[S-1].coordinate)/2){a=r[S].index;break}return a},BC=function(t){var n=t,r=n.type.displayName,i=t.props,o=i.stroke,a=i.fill,s;switch(r){case"Line":s=o;break;case"Area":case"Radar":s=o&&o!=="none"?o:a;break;default:s=a;break}return s},TOe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},s=Object.keys(o),l=0,c=s.length;l=0});if(_&&_.length){var b=_[0].props.barSize,w=_[0].props[x];a[w]||(a[w]=[]);var S=Ue(b)?n:b;a[w].push({item:_[0],stackList:_.slice(1),barSize:Ue(S)?void 0:Yn(S,r,0)})}}return a},jOe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,s=t.maxBarSize,l=a.length;if(l<1)return null;var c=Yn(n,i,0,!0),f,d=[];if(a[0].barSize===+a[0].barSize){var p=!1,v=i/l,g=a.reduce(function(S,E){return S+E.barSize||0},0);g+=(l-1)*c,g>=i&&(g-=(l-1)*c,c=0),g>=i&&v>0&&(p=!0,v*=.9,g=l*v);var y=(i-g)/2>>0,x={offset:y-c,size:0};f=a.reduce(function(S,E){var C={item:E.item,position:{offset:x.offset+x.size+c,size:p?v:E.barSize}},T=[].concat(JN(S),[C]);return x=T[T.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(A){T.push({item:A,position:x})}),T},d)}else{var _=Yn(r,i,0,!0);i-2*_-(l-1)*c<=0&&(c=0);var b=(i-2*_-(l-1)*c)/l;b>1&&(b>>=0);var w=s===+s?Math.min(b,s):b;f=a.reduce(function(S,E,C){var T=[].concat(JN(S),[{item:E.item,position:{offset:_+(b+c)*C+(b-w)/2,size:w}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(A){T.push({item:A,position:T[T.length-1].position})}),T},d)}return f},AOe=function(t,n,r,i){var o=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),c=oF({children:o,legendWidth:l});if(c){var f=i||{},d=f.width,p=f.height,v=c.align,g=c.verticalAlign,y=c.layout;if((y==="vertical"||y==="horizontal"&&g==="middle")&&v!=="center"&&Ee(t[v]))return ei(ei({},t),{},$c({},v,t[v]+(d||0)));if((y==="horizontal"||y==="vertical"&&v==="center")&&g!=="middle"&&Ee(t[g]))return ei(ei({},t),{},$c({},g,t[g]+(p||0)))}return t},kOe=function(t,n,r){return Ue(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},aF=function(t,n,r,i,o){var a=n.props.children,s=er(a,Hu).filter(function(c){return kOe(i,o,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,f){var d=Tt(f,r);if(Ue(d))return c;var p=Array.isArray(d)?[V0(d),Pa(d)]:[d,d],v=l.reduce(function(g,y){var x=Tt(f,y,0),_=p[0]-Math.abs(Array.isArray(x)?x[0]:x),b=p[1]+Math.abs(Array.isArray(x)?x[1]:x);return[Math.min(_,g[0]),Math.max(b,g[1])]},[1/0,-1/0]);return[Math.min(v[0],c[0]),Math.max(v[1],c[1])]},[1/0,-1/0])}return null},NOe=function(t,n,r,i,o){var a=n.map(function(s){return aF(t,s,r,o,i)}).filter(function(s){return!Ue(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},sF=function(t,n,r,i,o){var a=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&aF(t,l,c,i)||gd(t,c,r,o)});if(r==="number")return a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,c){for(var f=0,d=c.length;f=2?qn(s[0]-s[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var p=o?o.indexOf(d):d;return{coordinate:i(p)+c,value:d,offset:c}});return f.filter(function(d){return!Du(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,p){return{coordinate:i(d)+c,value:d,index:p,offset:c}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+c,value:d,offset:c}}):i.domain().map(function(d,p){return{coordinate:i(d)+c,value:o?o[d]:d,index:p,offset:c}})},Q1=new WeakMap,Pm=function(t,n){if(typeof n!="function")return t;Q1.has(t)||Q1.set(t,new WeakMap);var r=Q1.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},uF=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,s=t.axisType;if(i==="auto")return a==="radial"&&s==="radiusAxis"?{scale:mh(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:Wg(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:vd(),realScaleType:"point"}:o==="category"?{scale:mh(),realScaleType:"band"}:{scale:Wg(),realScaleType:"linear"};if(fp(i)){var l="scale".concat(T0(i));return{scale:(GN[l]||vd)(),realScaleType:GN[l]?l:"point"}}return Ve(i)?{scale:i}:{scale:vd(),realScaleType:"point"}},eM=1e-4,fF=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-eM,a=Math.max(i[0],i[1])+eM,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},MOe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[s][r][0]=o,t[s][r][1]=o+l,o=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},$Oe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+s,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},IOe={sign:ROe,expand:dhe,none:ru,silhouette:hhe,wiggle:phe,positive:$Oe},DOe=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),o=IOe[r],a=fhe().keys(i).value(function(s,l){return+Tt(s,l,0)}).order(_2).offset(o);return a(t)},FOe=function(t,n,r,i,o,a){if(!t)return null;var s=a?n.reverse():n,l={},c=s.reduce(function(d,p){var v=p.props,g=v.stackId,y=v.hide;if(y)return d;var x=p.props[r],_=d[x]||{hasStack:!1,stackGroups:{}};if(cn(g)){var b=_.stackGroups[g]||{numericAxisId:r,cateAxisId:i,items:[]};b.items.push(p),_.hasStack=!0,_.stackGroups[g]=b}else _.stackGroups[us("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return ei(ei({},d),{},$c({},x,_))},l),f={};return Object.keys(c).reduce(function(d,p){var v=c[p];if(v.hasStack){var g={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(y,x){var _=v.stackGroups[x];return ei(ei({},y),{},$c({},x,{numericAxisId:r,cateAxisId:i,items:_.items,stackedData:DOe(t,_.items,o)}))},g)}return ei(ei({},d),{},$c({},p,v))},f)},dF=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var c=t.domain();if(!c.length)return null;var f=sOe(c,o,s);return t.domain([V0(f),Pa(f)]),{niceTicks:f}}if(o&&i==="number"){var d=t.domain(),p=lOe(d,o,s);return{niceTicks:p}}return null};function fu(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ue(i[t.dataKey])){var s=Og(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=Tt(i,Ue(a)?t.dataKey:a);return Ue(l)?null:t.scale(l)}var tM=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var l=Tt(a,n.dataKey,n.domain[s]);return Ue(l)?null:n.scale(l)-o/2+i},BOe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},UOe=function(t,n){var r=t.props.stackId;if(cn(r)){var i=n[r];if(i){var o=i.items.indexOf(t);return o>=0?i.stackedData[o]:null}}return null},zOe=function(t){return t.reduce(function(n,r){return[V0(r.concat([n[0]]).filter(Ee)),Pa(r.concat([n[1]]).filter(Ee))]},[1/0,-1/0])},hF=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,l=s.reduce(function(c,f){var d=zOe(f.slice(n,r+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},nM=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,rM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Z2=function(t,n,r){if(Ve(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Ee(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(nM.test(t[0])){var o=+nM.exec(t[0])[1];i[0]=n[0]-o}else Ve(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Ee(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(rM.test(t[1])){var a=+rM.exec(t[1])[1];i[1]=n[1]+a}else Ve(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Zg=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=hC(n,function(d){return d.coordinate}),a=1/0,s=1,l=o.length;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&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},XOe=function(t,n,r,i,o){var a=t.width,s=t.height,l=t.startAngle,c=t.endAngle,f=Yn(t.cx,a,a/2),d=Yn(t.cy,s,s/2),p=vF(a,s,r),v=Yn(t.innerRadius,p,0),g=Yn(t.outerRadius,p,p*.8),y=Object.keys(n);return y.reduce(function(x,_){var b=n[_],w=b.domain,S=b.reversed,E;if(Ue(b.range))i==="angleAxis"?E=[l,c]:i==="radiusAxis"&&(E=[v,g]),S&&(E=[E[1],E[0]]);else{E=b.range;var C=E,T=HOe(C,2);l=T[0],c=T[1]}var A=uF(b,o),D=A.realScaleType,N=A.scale;N.domain(w).range(E),fF(N);var I=dF(N,Po(Po({},b),{},{realScaleType:D})),F=Po(Po(Po({},b),I),{},{range:E,radius:g,realScaleType:D,scale:N,cx:f,cy:d,innerRadius:v,outerRadius:g,startAngle:l,endAngle:c});return Po(Po({},x),{},mF({},_,F))},{})},QOe=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(i-a,2))},JOe=function(t,n){var r=t.x,i=t.y,o=n.cx,a=n.cy,s=QOe({x:r,y:i},{x:o,y:a});if(s<=0)return{radius:s};var l=(r-o)/s,c=Math.acos(l);return i>a&&(c=2*Math.PI-c),{radius:s,angle:ZOe(c),angleInRadian:c}},eSe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},tSe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),s=Math.min(o,a);return t+s*360},sM=function(t,n){var r=t.x,i=t.y,o=JOe({x:r,y:i},n),a=o.radius,s=o.angle,l=n.innerRadius,c=n.outerRadius;if(ac)return!1;if(a===0)return!0;var f=eSe(n),d=f.startAngle,p=f.endAngle,v=s,g;if(d<=p){for(;v>p;)v-=360;for(;v=d&&v<=p}else{for(;v>d;)v-=360;for(;v=p&&v<=d}return g?Po(Po({},n),{},{radius:a,angle:tSe(v,n)}):null},gF=function(t){return!R.isValidElement(t)&&!Ve(t)&&typeof t!="boolean"?t.className:""};function Eh(e){"@babel/helpers - typeof";return Eh=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},Eh(e)}var nSe=["offset"];function rSe(e){return sSe(e)||aSe(e)||oSe(e)||iSe()}function iSe(){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 oSe(e,t){if(e){if(typeof e=="string")return X2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X2(e,t)}}function aSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sSe(e){if(Array.isArray(e))return X2(e)}function X2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cSe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function 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 an(e){for(var t=1;t=0?1:-1,w,S;i==="insideStart"?(w=v+b*a,S=y):i==="insideEnd"?(w=g-b*a,S=!y):i==="end"&&(w=g+b*a,S=y),S=_<=0?S:!S;var E=Ot(c,f,x,w),C=Ot(c,f,x,w+(S?1:-1)*359),T="M".concat(E.x,",").concat(E.y,` A`).concat(x,",").concat(x,",0,1,").concat(S?0:1,`, `).concat(C.x,",").concat(C.y),A=Ue(t.id)?us("recharts-radial-line-"):t.id;return V.createElement("text",Ch({},r,{dominantBaseline:"central",className:Ce("recharts-radial-bar-label",s)}),V.createElement("defs",null,V.createElement("path",{id:A,d:T})),V.createElement("textPath",{xlinkHref:"#".concat(A)},n))},vSe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,s=o.cy,l=o.innerRadius,c=o.outerRadius,f=o.startAngle,d=o.endAngle,p=(f+d)/2;if(i==="outside"){var v=Ot(a,s,c+r,p),g=v.x,y=v.y;return{x:g,y,textAnchor:g>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var x=(l+c)/2,_=Ot(a,s,x,p),b=_.x,w=_.y;return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},gSe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,s=a.x,l=a.y,c=a.width,f=a.height,d=f>=0?1:-1,p=d*i,v=d>0?"end":"start",g=d>0?"start":"end",y=c>=0?1:-1,x=y*i,_=y>0?"end":"start",b=y>0?"start":"end";if(o==="top"){var w={x:s+c/2,y:l-d*i,textAnchor:"middle",verticalAnchor:v};return an(an({},w),r?{height:Math.max(l-r.y,0),width:c}:{})}if(o==="bottom"){var S={x:s+c/2,y:l+f+p,textAnchor:"middle",verticalAnchor:g};return an(an({},S),r?{height:Math.max(r.y+r.height-(l+f),0),width:c}:{})}if(o==="left"){var E={x:s-x,y:l+f/2,textAnchor:_,verticalAnchor:"middle"};return an(an({},E),r?{width:Math.max(E.x-r.x,0),height:f}:{})}if(o==="right"){var C={x:s+c+x,y:l+f/2,textAnchor:b,verticalAnchor:"middle"};return an(an({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:f}:{})}var T=r?{width:c,height:f}:{};return o==="insideLeft"?an({x:s+x,y:l+f/2,textAnchor:b,verticalAnchor:"middle"},T):o==="insideRight"?an({x:s+c-x,y:l+f/2,textAnchor:_,verticalAnchor:"middle"},T):o==="insideTop"?an({x:s+c/2,y:l+p,textAnchor:"middle",verticalAnchor:g},T):o==="insideBottom"?an({x:s+c/2,y:l+f-p,textAnchor:"middle",verticalAnchor:v},T):o==="insideTopLeft"?an({x:s+x,y:l+p,textAnchor:b,verticalAnchor:g},T):o==="insideTopRight"?an({x:s+c-x,y:l+p,textAnchor:_,verticalAnchor:g},T):o==="insideBottomLeft"?an({x:s+x,y:l+f-p,textAnchor:b,verticalAnchor:v},T):o==="insideBottomRight"?an({x:s+c-x,y:l+f-p,textAnchor:_,verticalAnchor:v},T):Lu(o)&&(Ee(o.x)||Vs(o.x))&&(Ee(o.y)||Vs(o.y))?an({x:s+Yn(o.x,c),y:l+Yn(o.y,f),textAnchor:"end",verticalAnchor:"end"},T):an({x:s+c/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},T)},ySe=function(t){return"cx"in t&&Ee(t.cx)};function yn(e){var t=e.offset,n=t===void 0?5:t,r=lSe(e,nSe),i=an({offset:n},r),o=i.viewBox,a=i.position,s=i.value,l=i.children,c=i.content,f=i.className,d=f===void 0?"":f,p=i.textBreakAll;if(!o||Ue(s)&&Ue(l)&&!R.isValidElement(c)&&!Ve(c))return null;if(R.isValidElement(c))return R.cloneElement(c,i);var v;if(Ve(c)){if(v=R.createElement(c,i),R.isValidElement(v))return v}else v=hSe(i);var g=ySe(o),y=De(i,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return mSe(i,v,y);var x=g?vSe(i):gSe(i);return V.createElement(gl,Ch({className:Ce("recharts-label",d)},y,x,{breakAll:p}),v)}yn.displayName="Label";var yF=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,f=t.outerRadius,d=t.x,p=t.y,v=t.top,g=t.left,y=t.width,x=t.height,_=t.clockWise,b=t.labelViewBox;if(b)return b;if(Ee(y)&&Ee(x)){if(Ee(d)&&Ee(p))return{x:d,y:p,width:y,height:x};if(Ee(v)&&Ee(g))return{x:v,y:g,width:y,height:x}}return Ee(d)&&Ee(p)?{x:d,y:p,width:0,height:0}:Ee(n)&&Ee(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:c||0,outerRadius:f||l||s||0,clockWise:_}:t.viewBox?t.viewBox:{}},bSe=function(t,n){return t?t===!0?V.createElement(yn,{key:"label-implicit",viewBox:n}):cn(t)?V.createElement(yn,{key:"label-implicit",viewBox:n,value:t}):R.isValidElement(t)?t.type===yn?R.cloneElement(t,{key:"label-implicit",viewBox:n}):V.createElement(yn,{key:"label-implicit",content:t,viewBox:n}):Ve(t)?V.createElement(yn,{key:"label-implicit",content:t,viewBox:n}):Lu(t)?V.createElement(yn,Ch({viewBox:n},t,{key:"label-implicit"})):null:null},_Se=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=yF(t),a=er(i,yn).map(function(l,c){return R.cloneElement(l,{viewBox:n||o,key:"label-".concat(c)})});if(!r)return a;var s=bSe(t.label,n||o);return[s].concat(rSe(a))};yn.parseViewBox=yF;yn.renderCallByParent=_Se;function xSe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var wSe=xSe;const OSe=at(wSe);function Ph(e){"@babel/helpers - typeof";return Ph=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},Ph(e)}var SSe=["valueAccessor"],ESe=["data","dataKey","clockWise","id","textBreakAll"];function CSe(e){return ASe(e)||jSe(e)||TSe(e)||PSe()}function PSe(){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 TSe(e,t){if(e){if(typeof e=="string")return Q2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q2(e,t)}}function jSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ASe(e){if(Array.isArray(e))return Q2(e)}function Q2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LSe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var RSe=function(t){return Array.isArray(t.value)?OSe(t.value):t.value};function Mi(e){var t=e.valueAccessor,n=t===void 0?RSe:t,r=fM(e,SSe),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=fM(r,ESe);return!i||!i.length?null:V.createElement(Xe,{className:"recharts-label-list"},i.map(function(f,d){var p=Ue(o)?n(f,d):Tt(f&&f.payload,o),v=Ue(s)?{}:{id:"".concat(s,"-").concat(d)};return V.createElement(yn,Qg({},De(f,!0),c,v,{parentViewBox:f.parentViewBox,value:p,textBreakAll:l,viewBox:yn.parseViewBox(Ue(a)?f:uM(uM({},f),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Mi.displayName="LabelList";function $Se(e,t){return e?e===!0?V.createElement(Mi,{key:"labelList-implicit",data:t}):V.isValidElement(e)||Ve(e)?V.createElement(Mi,{key:"labelList-implicit",data:t,content:e}):Lu(e)?V.createElement(Mi,Qg({data:t},e,{key:"labelList-implicit"})):null:null}function ISe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=er(r,Mi).map(function(a,s){return R.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=$Se(e.label,t);return[o].concat(CSe(i))}Mi.renderCallByParent=ISe;function Th(e){"@babel/helpers - typeof";return Th=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},Th(e)}function J2(){return J2=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>c),`, `).concat(d.x,",").concat(d.y,` `);if(i>0){var v=Ot(n,r,i,a),g=Ot(n,r,i,c);p+="L ".concat(g.x,",").concat(g.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(l)>180),",").concat(+(a<=c),`, `).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},zSe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,f=t.endAngle,d=qn(f-c),p=Tm({cx:n,cy:r,radius:o,angle:c,sign:d,cornerRadius:a,cornerIsExternal:l}),v=p.circleTangency,g=p.lineTangency,y=p.theta,x=Tm({cx:n,cy:r,radius:o,angle:f,sign:-d,cornerRadius:a,cornerIsExternal:l}),_=x.circleTangency,b=x.lineTangency,w=x.theta,S=l?Math.abs(c-f):Math.abs(c-f)-y-w;if(S<0)return s?"M ".concat(g.x,",").concat(g.y,` a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 `):bF({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:f});var E="M ".concat(g.x,",").concat(g.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` A`).concat(o,",").concat(o,",0,").concat(+(S>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(b.x,",").concat(b.y,` `);if(i>0){var C=Tm({cx:n,cy:r,radius:i,angle:c,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),T=C.circleTangency,A=C.lineTangency,D=C.theta,N=Tm({cx:n,cy:r,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),I=N.circleTangency,F=N.lineTangency,q=N.theta,W=l?Math.abs(c-f):Math.abs(c-f)-D-q;if(W<0&&a===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(F.x,",").concat(F.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(I.x,",").concat(I.y,` A`).concat(i,",").concat(i,",0,").concat(+(W>180),",").concat(+(d>0),",").concat(T.x,",").concat(T.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(A.x,",").concat(A.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},VSe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},_F=function(t){var n=hM(hM({},VSe),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,p=n.className;if(a0&&Math.abs(f-d)<360?x=zSe({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(y,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:f,endAngle:d}):x=bF({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:f,endAngle:d}),V.createElement("path",J2({},De(n,!0),{className:v,d:x,role:"img"}))};function jh(e){"@babel/helpers - typeof";return jh=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},jh(e)}function eO(){return eO=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function JSe(e,t){return Gu(e.getTime(),t.getTime())}function xM(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,s;(a=i.next())&&!a.done;){for(var l=t.entries(),c=!1,f=0;(s=l.next())&&!s.done;){var d=a.value,p=d[0],v=d[1],g=s.value,y=g[0],x=g[1];!c&&!r[f]&&(c=n.equals(p,y,o,f,e,t,n)&&n.equals(v,x,p,y,e,t,n))&&(r[f]=!0),f++}if(!c)return!1;o++}return!0}function eEe(e,t,n){var r=_M(e),i=r.length;if(_M(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===wF&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!xF(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function $f(e,t,n){var r=yM(e),i=r.length;if(yM(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=r[i],o===wF&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!xF(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=bM(e,o),s=bM(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function tEe(e,t){return Gu(e.valueOf(),t.valueOf())}function nEe(e,t){return e.source===t.source&&e.flags===t.flags}function wM(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var s=t.values(),l=!1,c=0;(a=s.next())&&!a.done;)!l&&!r[c]&&(l=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[c]=!0),c++;if(!l)return!1}return!0}function rEe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var iEe="[object Arguments]",oEe="[object Boolean]",aEe="[object Date]",sEe="[object Map]",lEe="[object Number]",cEe="[object Object]",uEe="[object RegExp]",fEe="[object Set]",dEe="[object String]",hEe=Array.isArray,OM=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,SM=Object.assign,pEe=Object.prototype.toString.call.bind(Object.prototype.toString);function mEe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(f,d,p){if(f===d)return!0;if(f==null||d==null||typeof f!="object"||typeof d!="object")return f!==f&&d!==d;var v=f.constructor;if(v!==d.constructor)return!1;if(v===Object)return i(f,d,p);if(hEe(f))return t(f,d,p);if(OM!=null&&OM(f))return l(f,d,p);if(v===Date)return n(f,d,p);if(v===RegExp)return a(f,d,p);if(v===Map)return r(f,d,p);if(v===Set)return s(f,d,p);var g=pEe(f);return g===aEe?n(f,d,p):g===uEe?a(f,d,p):g===sEe?r(f,d,p):g===fEe?s(f,d,p):g===cEe?typeof f.then!="function"&&typeof d.then!="function"&&i(f,d,p):g===iEe?i(f,d,p):g===oEe||g===lEe||g===dEe?o(f,d,p):!1}}function vEe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?$f:QSe,areDatesEqual:JSe,areMapsEqual:r?gM(xM,$f):xM,areObjectsEqual:r?$f:eEe,arePrimitiveWrappersEqual:tEe,areRegExpsEqual:nEe,areSetsEqual:r?gM(wM,$f):wM,areTypedArraysEqual:r?$f:rEe};if(n&&(i=SM({},i,n(i))),t){var o=Am(i.areArraysEqual),a=Am(i.areMapsEqual),s=Am(i.areObjectsEqual),l=Am(i.areSetsEqual);i=SM({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return i}function gEe(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function yEe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(l,c){var f=r(),d=f.cache,p=d===void 0?t?new WeakMap:void 0:d,v=f.meta;return n(l,c,{cache:p,equals:i,meta:v,strict:o})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(l,c){return n(l,c,a)}}var bEe=hs();hs({strict:!0});hs({circular:!0});hs({circular:!0,strict:!0});hs({createInternalComparator:function(){return Gu}});hs({strict:!0,createInternalComparator:function(){return Gu}});hs({circular:!0,createInternalComparator:function(){return Gu}});hs({circular:!0,createInternalComparator:function(){return Gu},strict:!0});function hs(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,s=vEe(e),l=mEe(s),c=r?r(l):gEe(l);return yEe({circular:n,comparator:l,createState:i,equals:c,strict:a})}function _Ee(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function EM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):_Ee(i)};requestAnimationFrame(r)}function tO(e){"@babel/helpers - typeof";return tO=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},tO(e)}function xEe(e){return EEe(e)||SEe(e)||OEe(e)||wEe()}function wEe(){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 OEe(e,t){if(e){if(typeof e=="string")return CM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CM(e,t)}}function CM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:_<0?0:_},y=function(_){for(var b=_>1?1:_,w=b,S=0;S<8;++S){var E=d(w)-b,C=v(w);if(Math.abs(E-b)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,s=a===void 0?17:a,l=function(f,d,p){var v=-(f-d)*r,g=p*o,y=p+(v-g)*s/1e3,x=p*s/1e3+f;return Math.abs(x-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nCe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function J1(e){return aCe(e)||oCe(e)||iCe(e)||rCe()}function rCe(){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 iCe(e,t){if(e){if(typeof e=="string")return aO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aO(e,t)}}function oCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aCe(e){if(Array.isArray(e))return aO(e)}function aO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ty(e){return ty=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ty(e)}var hi=function(e){fCe(n,e);var t=dCe(n);function n(r,i){var o;sCe(this,n),o=t.call(this,r,i);var a=o.props,s=a.isActive,l=a.attributeName,c=a.from,f=a.to,d=a.steps,p=a.children,v=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(cO(o)),o.changeStyle=o.changeStyle.bind(cO(o)),!s||v<=0)return o.state={style:{}},typeof p=="function"&&(o.state={style:f}),lO(o);if(d&&d.length)o.state={style:d[0].style};else if(c){if(typeof p=="function")return o.state={style:c},lO(o);o.state={style:l?qf({},l,c):c}}else o.state={style:{}};return o}return cCe(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,s=o.canBegin,l=o.attributeName,c=o.shouldReAnimate,f=o.to,d=o.from,p=this.state.style;if(s){if(!a){var v={style:l?qf({},l,f):f};this.state&&p&&(l&&p[l]!==f||!l&&p!==f)&&this.setState(v);return}if(!(bEe(i.to,f)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=g||c?d:i.to;if(this.state&&p){var x={style:l?qf({},l,y):y};(l&&p[l]!==y||!l&&p!==y)&&this.setState(x)}this.runAnimation(_i(_i({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,s=i.to,l=i.duration,c=i.easing,f=i.begin,d=i.onAnimationEnd,p=i.onAnimationStart,v=JEe(a,s,zEe(c),l,this.changeStyle),g=function(){o.stopJSAnimation=v()};this.manager.start([p,f,g,l,d])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,s=i.begin,l=i.onAnimationStart,c=a[0],f=c.style,d=c.duration,p=d===void 0?0:d,v=function(y,x,_){if(_===0)return y;var b=x.duration,w=x.easing,S=w===void 0?"ease":w,E=x.style,C=x.properties,T=x.onAnimationEnd,A=_>0?a[_-1]:x,D=C||Object.keys(E);if(typeof S=="function"||S==="spring")return[].concat(J1(y),[o.runJSAnimation.bind(o,{from:A.style,to:E,duration:b,easing:S}),b]);var N=jM(D,b,S),I=_i(_i(_i({},A.style),E),{},{transition:N});return[].concat(J1(y),[I,b,T]).filter(AEe)};return this.manager.start([l].concat(J1(a.reduce(v,[f,Math.max(p,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=CEe());var o=i.begin,a=i.duration,s=i.attributeName,l=i.to,c=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,p=i.steps,v=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof c=="function"||typeof v=="function"||c==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var y=s?qf({},s,l):l,x=jM(Object.keys(y),a,c);g.start([f,o,_i(_i({},y),{},{transition:x}),a,d])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=tCe(i,eCe),c=R.Children.count(o),f=this.state.style;if(typeof o=="function")return o(f);if(!s||c===0||a<=0)return o;var d=function(v){var g=v.props,y=g.style,x=y===void 0?{}:y,_=g.className,b=R.cloneElement(v,_i(_i({},l),{},{style:_i(_i({},x),f),className:_}));return b};return c===1?d(R.Children.only(o)):V.createElement("div",null,R.Children.map(o,function(p){return d(p)}))}}]),n}(R.PureComponent);hi.displayName="Animate";hi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};hi.propTypes={from:$.oneOfType([$.object,$.string]),to:$.oneOfType([$.object,$.string]),attributeName:$.string,duration:$.number,begin:$.number,easing:$.oneOfType([$.string,$.func]),steps:$.arrayOf($.shape({duration:$.number.isRequired,style:$.object.isRequired,easing:$.oneOfType([$.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),$.func]),properties:$.arrayOf("string"),onAnimationEnd:$.func})),children:$.oneOfType([$.node,$.func]),isActive:$.bool,canBegin:$.bool,onAnimationEnd:$.func,shouldReAnimate:$.bool,onAnimationStart:$.func,onAnimationReStart:$.func};$.object,$.object,$.object,$.element;$.object,$.object,$.object,$.oneOfType([$.array,$.element]),$.any;function Nh(e){"@babel/helpers - typeof";return Nh=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},Nh(e)}function ny(){return ny=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,c=i>=0&&r>=0||i<0&&r<0?1:0,f;if(a>0&&o instanceof Array){for(var d=[0,0,0,0],p=0,v=4;pa?a:o[p];f="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(t+l*d[0],",").concat(n)),f+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, `).concat(t+r,",").concat(n+s*d[1])),f+="L ".concat(t+r,",").concat(n+i-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, `).concat(t+r-l*d[2],",").concat(n+i)),f+="L ".concat(t+l*d[3],",").concat(n+i),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, `).concat(t,",").concat(n+i-s*d[3])),f+="Z"}else if(a>0&&o===+o&&o>0){var g=Math.min(a,o);f="M ".concat(t,",").concat(n+s*g,` A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+l*g,",").concat(n,` L `).concat(t+r-l*g,",").concat(n,` A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+r,",").concat(n+s*g,` L `).concat(t+r,",").concat(n+i-s*g,` A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+r-l*g,",").concat(n+i,` L `).concat(t+l*g,",").concat(n+i,` A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t,",").concat(n+i-s*g," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},wCe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(o,o+s),f=Math.max(o,o+s),d=Math.min(a,a+l),p=Math.max(a,a+l);return r>=c&&r<=f&&i>=d&&i<=p}return!1},OCe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},UC=function(t){var n=IM(IM({},OCe),t),r=R.useRef(),i=R.useState(-1),o=pCe(i,2),a=o[0],s=o[1];R.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var S=r.current.getTotalLength();S&&s(S)}catch{}},[]);var l=n.x,c=n.y,f=n.width,d=n.height,p=n.radius,v=n.className,g=n.animationEasing,y=n.animationDuration,x=n.animationBegin,_=n.isAnimationActive,b=n.isUpdateAnimationActive;if(l!==+l||c!==+c||f!==+f||d!==+d||f===0||d===0)return null;var w=Ce("recharts-rectangle",v);return b?V.createElement(hi,{canBegin:a>0,from:{width:f,height:d,x:l,y:c},to:{width:f,height:d,x:l,y:c},duration:y,animationEasing:g,isActive:b},function(S){var E=S.width,C=S.height,T=S.x,A=S.y;return V.createElement(hi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:y,isActive:_,easing:g},V.createElement("path",ny({},De(n,!0),{className:w,d:DM(T,A,E,C,p),ref:r})))}):V.createElement("path",ny({},De(n,!0),{className:w,d:DM(l,c,f,d,p)}))},SCe=["points","className","baseLinePoints","connectNulls"];function Oc(){return Oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CCe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function FM(e){return ACe(e)||jCe(e)||TCe(e)||PCe()}function PCe(){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 TCe(e,t){if(e){if(typeof e=="string")return uO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uO(e,t)}}function jCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ACe(e){if(Array.isArray(e))return uO(e)}function uO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){BM(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),BM(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},bd=function(t,n){var r=kCe(t);n&&(r=[r.reduce(function(o,a){return[].concat(FM(o),FM(a))},[])]);var i=r.map(function(o){return o.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},NCe=function(t,n,r){var i=bd(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(bd(n.reverse(),r).slice(1))},MCe=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,o=t.connectNulls,a=ECe(t,SCe);if(!n||!n.length)return null;var s=Ce("recharts-polygon",r);if(i&&i.length){var l=a.stroke&&a.stroke!=="none",c=NCe(n,i,o);return V.createElement("g",{className:s},V.createElement("path",Oc({},De(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?V.createElement("path",Oc({},De(a,!0),{fill:"none",d:bd(n,o)})):null,l?V.createElement("path",Oc({},De(a,!0),{fill:"none",d:bd(i,o)})):null)}var f=bd(n,o);return V.createElement("path",Oc({},De(a,!0),{fill:f.slice(-1)==="Z"?a.fill:"none",className:s,d:f}))};function fO(){return fO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function BCe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var UCe=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},zCe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,l=t.left,c=l===void 0?0:l,f=t.width,d=f===void 0?0:f,p=t.height,v=p===void 0?0:p,g=t.className,y=FCe(t,LCe),x=RCe({x:r,y:o,top:s,left:c,width:d,height:v},y);return!Ee(r)||!Ee(o)||!Ee(d)||!Ee(v)||!Ee(s)||!Ee(c)?null:V.createElement("path",dO({},De(x,!0),{className:Ce("recharts-cross",g),d:UCe(r,o,d,v,s,c)}))},VCe=z0,WCe=H8,HCe=_o;function GCe(e,t){return e&&e.length?VCe(e,HCe(t),WCe):void 0}var KCe=GCe;const qCe=at(KCe);var YCe=z0,ZCe=_o,XCe=G8;function QCe(e,t){return e&&e.length?YCe(e,ZCe(t),XCe):void 0}var JCe=QCe;const ePe=at(JCe);var tPe=["cx","cy","angle","ticks","axisLine"],nPe=["ticks","tick","angle","tickFormatter","stroke"];function hu(e){"@babel/helpers - typeof";return hu=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},hu(e)}function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function iPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WM(e,t){for(var n=0;nKM?a=i==="outer"?"start":"end":o<-KM?a=i==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,c=Os(Os({},De(this.props,!1)),{},{fill:"none"},De(s,!1));if(l==="circle")return V.createElement(gp,Is({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:o,r:a}));var f=this.props.ticks,d=f.map(function(p){return Ot(i,o,a,p.coordinate)});return V.createElement(MCe,Is({className:"recharts-polar-angle-axis-line"},c,{points:d}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,a=i.tick,s=i.tickLine,l=i.tickFormatter,c=i.stroke,f=De(this.props,!1),d=De(a,!1),p=Os(Os({},f),{},{fill:"none"},De(s,!1)),v=o.map(function(g,y){var x=r.getTickLineCoord(g),_=r.getTickTextAnchor(g),b=Os(Os(Os({textAnchor:_},f),{},{stroke:"none",fill:c},d),{},{index:y,payload:g,x:x.x2,y:x.y2});return V.createElement(Xe,Is({className:Ce("recharts-polar-angle-axis-tick",gF(a)),key:"tick-".concat(g.coordinate)},Za(r.props,g,y)),s&&V.createElement("line",Is({className:"recharts-polar-angle-axis-tick-line"},p,x)),a&&t.renderTickItem(a,b,l?l(g.value,y):g.value))});return V.createElement(Xe,{className:"recharts-polar-angle-axis-ticks"},v)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.radius,a=r.axisLine;return o<=0||!i||!i.length?null:V.createElement(Xe,{className:Ce("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,o){var a;return V.isValidElement(r)?a=V.cloneElement(r,i):Ve(r)?a=r(i):a=V.createElement(gl,Is({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),a}}]),t}(R.PureComponent);q0(Y0,"displayName","PolarAngleAxis");q0(Y0,"axisType","angleAxis");q0(Y0,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var bPe=B5,_Pe=bPe(Object.getPrototypeOf,Object),xPe=_Pe,wPe=ra,OPe=xPe,SPe=ia,EPe="[object Object]",CPe=Function.prototype,PPe=Object.prototype,MF=CPe.toString,TPe=PPe.hasOwnProperty,jPe=MF.call(Object);function APe(e){if(!SPe(e)||wPe(e)!=EPe)return!1;var t=OPe(e);if(t===null)return!0;var n=TPe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&MF.call(n)==jPe}var kPe=APe;const NPe=at(kPe);var MPe=ra,LPe=ia,RPe="[object Boolean]";function $Pe(e){return e===!0||e===!1||LPe(e)&&MPe(e)==RPe}var IPe=$Pe;const DPe=at(IPe);function Lh(e){"@babel/helpers - typeof";return Lh=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},Lh(e)}function oy(){return oy=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:p,x:l,y:c},to:{upperWidth:f,lowerWidth:d,height:p,x:l,y:c},duration:y,animationEasing:g,isActive:_},function(w){var S=w.upperWidth,E=w.lowerWidth,C=w.height,T=w.x,A=w.y;return V.createElement(hi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:y,easing:g},V.createElement("path",oy({},De(n,!0),{className:b,d:XM(T,A,S,E,C),ref:r})))}):V.createElement("g",null,V.createElement("path",oy({},De(n,!0),{className:b,d:XM(l,c,f,d,p)})))},YPe=["option","shapeType","propTransformer","activeClassName","isActive"];function Rh(e){"@babel/helpers - typeof";return Rh=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},Rh(e)}function ZPe(e,t){if(e==null)return{};var n=XPe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function QM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ay(e){for(var t=1;t0?Mr(w,"paddingAngle",0):0;if(E){var T=Bt(E.endAngle-E.startAngle,w.endAngle-w.startAngle),A=kt(kt({},w),{},{startAngle:b+C,endAngle:b+T(y)+C});x.push(A),b=A.endAngle}else{var D=w.endAngle,N=w.startAngle,I=Bt(0,D-N),F=I(y),q=kt(kt({},w),{},{startAngle:b+C,endAngle:b+F+C});x.push(q),b=q.endAngle}}),V.createElement(Xe,null,r.renderSectorsStatically(x))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var a=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[a].focus(),i.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,o=r.isAnimationActive,a=this.state.prevSectors;return o&&i&&i.length&&(!a||!Xa(a,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,o=i.hide,a=i.sectors,s=i.className,l=i.label,c=i.cx,f=i.cy,d=i.innerRadius,p=i.outerRadius,v=i.isAnimationActive,g=this.state.isAnimationFinished;if(o||!a||!a.length||!Ee(c)||!Ee(f)||!Ee(d)||!Ee(p))return null;var y=Ce("recharts-pie",s);return V.createElement(Xe,{tabIndex:this.props.rootTabIndex,className:y,ref:function(_){r.pieRef=_}},this.renderSectors(),l&&this.renderLabels(a),yn.renderCallByParent(this.props,null,!1),(!v||g)&&Mi.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r=360?b:b-1)*l,S=x-b*v-w,E=r.reduce(function(A,D){var N=Tt(D,_,0);return A+(Ee(N)?N:0)},0),C;if(E>0){var T;C=r.map(function(A,D){var N=Tt(A,_,0),I=Tt(A,f,D),F=(Ee(N)?N:0)/E,q;D?q=T.endAngle+qn(y)*l*(N!==0?1:0):q=a;var W=q+qn(y)*((N!==0?v:0)+F*S),X=(q+W)/2,Q=(g.innerRadius+g.outerRadius)/2,ne=[{name:I,value:N,payload:A,dataKey:_,type:p}],Z=Ot(g.cx,g.cy,Q,X);return T=kt(kt(kt({percent:F,cornerRadius:o,name:I,tooltipPayload:ne,midAngle:X,middleRadius:Q,tooltipPosition:Z},A),g),{},{value:Tt(A,_),startAngle:q,endAngle:W,payload:A,paddingAngle:qn(y)*l}),T})}return kt(kt({},g),{},{sectors:C,data:r})});var gTe=Math.ceil,yTe=Math.max;function bTe(e,t,n,r){for(var i=-1,o=yTe(gTe((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}var _Te=bTe,xTe=a8,nL=1/0,wTe=17976931348623157e292;function OTe(e){if(!e)return e===0?e:0;if(e=xTe(e),e===nL||e===-nL){var t=e<0?-1:1;return t*wTe}return e===e?e:0}var $F=OTe,STe=_Te,ETe=R0,e_=$F;function CTe(e){return function(t,n,r){return r&&typeof r!="number"&&ETe(t,n,r)&&(n=r=void 0),t=e_(t),n===void 0?(n=t,t=0):n=e_(n),r=r===void 0?t0&&r.handleDrag(i.changedTouches[0])}),Sr(Yi(r),"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a==null||a({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Sr(Yi(r),"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Sr(Yi(r),"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Sr(Yi(r),"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Sr(Yi(r),"handleSlideDragStart",function(i){var o=sL(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(Yi(r),"startX"),endX:r.handleTravellerDragStart.bind(Yi(r),"endX")},r.state={},r}return $Te(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,f=c.length-1,d=Math.min(i,o),p=Math.max(i,o),v=t.getIndexInRange(a,d),g=t.getIndexInRange(a,p);return{startIndex:v-v%l,endIndex:g===f?f:g-g%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,l=Tt(o[r],s,r);return Ve(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,s=i.endX,l=this.props,c=l.x,f=l.width,d=l.travellerWidth,p=l.startIndex,v=l.endIndex,g=l.onChange,y=r.pageX-o;y>0?y=Math.min(y,c+f-d-s,c+f-d-a):y<0&&(y=Math.max(y,c-a,c-s));var x=this.getIndex({startX:a+y,endX:s+y});(x.startIndex!==p||x.endIndex!==v)&&g&&g(x),this.setState({startX:a+y,endX:s+y,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=sL(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,l=i.startX,c=this.state[a],f=this.props,d=f.x,p=f.width,v=f.travellerWidth,g=f.onChange,y=f.gap,x=f.data,_={startX:this.state.startX,endX:this.state.endX},b=r.pageX-o;b>0?b=Math.min(b,d+p-v-c):b<0&&(b=Math.max(b,d-c)),_[a]=c+b;var w=this.getIndex(_),S=w.startIndex,E=w.endIndex,C=function(){var A=x.length-1;return a==="startX"&&(s>l?S%y===0:E%y===0)||sl?E%y===0:S%y===0)||s>l&&E===A};this.setState(Sr(Sr({},a,c+b),"brushMoveStartX",r.pageX),function(){g&&C()&&g(w)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,f=this.state[i],d=s.indexOf(f);if(d!==-1){var p=d+r;if(!(p===-1||p>=s.length)){var v=s[p];i==="startX"&&v>=c||i==="endX"&&v<=l||this.setState(Sr({},i,v),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.fill,c=r.stroke;return V.createElement("rect",{stroke:c,fill:l,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.data,c=r.children,f=r.padding,d=R.Children.only(c);return d?V.cloneElement(d,{x:i,y:o,width:a,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,l=this.props,c=l.y,f=l.travellerWidth,d=l.height,p=l.traveller,v=l.ariaLabel,g=l.data,y=l.startIndex,x=l.endIndex,_=Math.max(r,this.props.x),b=t_(t_({},De(this.props,!1)),{},{x:_,y:c,width:f,height:d}),w=v||"Min value: ".concat((o=g[y])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=g[x])===null||a===void 0?void 0:a.name);return V.createElement(Xe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),s.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,b))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,s=o.height,l=o.stroke,c=o.travellerWidth,f=Math.min(r,i)+c,d=Math.max(Math.abs(i-r)-c,0);return V.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,f=this.state,d=f.startX,p=f.endX,v=5,g={pointerEvents:"none",fill:c};return V.createElement(Xe,{className:"recharts-brush-texts"},V.createElement(gl,uy({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:a+s/2},g),this.getTextOfTick(i)),V.createElement(gl,uy({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+l+v,y:a+s/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,l=r.y,c=r.width,f=r.height,d=r.alwaysShowText,p=this.state,v=p.startX,g=p.endX,y=p.isTextActive,x=p.isSlideMoving,_=p.isTravellerMoving,b=p.isTravellerFocused;if(!i||!i.length||!Ee(s)||!Ee(l)||!Ee(c)||!Ee(f)||c<=0||f<=0)return null;var w=Ce("recharts-brush",o),S=V.Children.count(a)===1,E=LTe("userSelect","none");return V.createElement(Xe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(v,g),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(g,"endX"),(y||x||_||b||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,l=r.stroke,c=Math.floor(o+s/2)-1;return V.createElement(V.Fragment,null,V.createElement("rect",{x:i,y:o,width:a,height:s,fill:l,stroke:"none"}),V.createElement("line",{x1:i+1,y1:c,x2:i+a-1,y2:c,fill:"none",stroke:"#fff"}),V.createElement("line",{x1:i+1,y1:c+2,x2:i+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return V.isValidElement(r)?o=V.cloneElement(r,i):Ve(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,f=r.startIndex,d=r.endIndex;if(o!==i.prevData||c!==i.prevUpdateId)return t_({prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},o&&o.length?UTe({data:o,width:a,x:s,travellerWidth:l,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+a-l]);var p=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>i?s=l:a=l}return i>=r[s]?s:a}}]),t}(R.PureComponent);Sr(gu,"displayName","Brush");Sr(gu,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var zTe=dC;function VTe(e,t){var n;return zTe(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var WTe=VTe,HTe=N5,GTe=_o,KTe=WTe,qTe=xr,YTe=R0;function ZTe(e,t,n){var r=qTe(e)?HTe:KTe;return n&&YTe(e,t,n)&&(t=void 0),r(e,GTe(t))}var XTe=ZTe;const QTe=at(XTe);var lo=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},lL=t8;function JTe(e,t,n){t=="__proto__"&&lL?lL(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var eje=JTe,tje=eje,nje=J5,rje=_o;function ije(e,t){var n={};return t=rje(t),nje(e,function(r,i,o){tje(n,i,t(r,i,o))}),n}var oje=ije;const aje=at(oje);function sje(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Sje(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Eje(e,t){var n=e.x,r=e.y,i=Oje(e,bje),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),f=parseInt(c,10),d="".concat(t.width||i.width),p=parseInt(d,10);return If(If(If(If(If({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function uL(e){return V.createElement(sy,gO({shapeType:"rectangle",propTransformer:Eje,activeClassName:"recharts-active-bar"},e))}var Cje=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||bl(),n)}},Pje=["value","background"],UF;function yu(e){"@babel/helpers - typeof";return yu=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},yu(e)}function Tje(e,t){if(e==null)return{};var n=jje(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jje(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function dy(){return dy=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(W)0&&Math.abs(q)0&&(q=Math.min((te||0)-(W[ie-1]||0),q))}),Number.isFinite(q)){var X=q/F,Q=y.layout==="vertical"?r.height:r.width;if(y.padding==="gap"&&(T=X*Q/2),y.padding==="no-gap"){var ne=Yn(t.barCategoryGap,X*Q),Z=X*Q/2;T=Z-ne-(Z-ne)/Q*ne}}}i==="xAxis"?A=[r.left+(w.left||0)+(T||0),r.left+r.width-(w.right||0)-(T||0)]:i==="yAxis"?A=l==="horizontal"?[r.top+r.height-(w.bottom||0),r.top+(w.top||0)]:[r.top+(w.top||0)+(T||0),r.top+r.height-(w.bottom||0)-(T||0)]:A=y.range,E&&(A=[A[1],A[0]]);var z=uF(y,o,p),B=z.scale,H=z.realScaleType;B.domain(_).range(A),fF(B);var ee=dF(B,Oi(Oi({},y),{},{realScaleType:H}));i==="xAxis"?(I=x==="top"&&!S||x==="bottom"&&S,D=r.left,N=d[C]-I*y.height):i==="yAxis"&&(I=x==="left"&&!S||x==="right"&&S,D=d[C]-I*y.width,N=r.top);var K=Oi(Oi(Oi({},y),ee),{},{realScaleType:H,x:D,y:N,scale:B,width:i==="xAxis"?r.width:y.width,height:i==="yAxis"?r.height:y.height});return K.bandSize=Zg(K,ee),!y.hide&&i==="xAxis"?d[C]+=(I?-1:1)*K.height:y.hide||(d[C]+=(I?-1:1)*K.width),Oi(Oi({},v),{},Q0({},g,K))},{})},GF=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},Fje=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return GF({x:n,y:r},{x:i,y:o})},KF=function(){function e(t){$je(this,e),this.scale=t}return Ije(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}]),e}();Q0(KF,"EPS",1e-4);var zC=function(t){var n=Object.keys(t).reduce(function(r,i){return Oi(Oi({},r),{},Q0({},i,KF.create(t[i])))},{});return Oi(Oi({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return aje(i,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(i){return BF(i,function(o,a){return n[a].isInRange(o)})}})};function Bje(e){return(e%180+180)%180}var Uje=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Bje(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?i[o?t[a]:a]:void 0}}var Gje=Hje,Kje=$F;function qje(e){var t=Kje(e),n=t%1;return t===t?n?t-n:t:0}var Yje=qje,Zje=G5,Xje=_o,Qje=Yje,Jje=Math.max;function eAe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Qje(n);return i<0&&(i=Jje(r+i,0)),Zje(e,Xje(t),i)}var tAe=eAe,nAe=Gje,rAe=tAe,iAe=nAe(rAe),oAe=iAe;const aAe=at(oAe);var sAe=Tue(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),VC=R.createContext(void 0),WC=R.createContext(void 0),qF=R.createContext(void 0),YF=R.createContext({}),ZF=R.createContext(void 0),XF=R.createContext(0),QF=R.createContext(0),mL=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,f=sAe(o);return V.createElement(VC.Provider,{value:r},V.createElement(WC.Provider,{value:i},V.createElement(YF.Provider,{value:o},V.createElement(qF.Provider,{value:f},V.createElement(ZF.Provider,{value:a},V.createElement(XF.Provider,{value:c},V.createElement(QF.Provider,{value:l},s)))))))},lAe=function(){return R.useContext(ZF)},JF=function(t){var n=R.useContext(VC);n==null&&bl();var r=n[t];return r==null&&bl(),r},cAe=function(){var t=R.useContext(VC);return wa(t)},uAe=function(){var t=R.useContext(WC),n=aAe(t,function(r){return BF(r.domain,Number.isFinite)});return n||wa(t)},e7=function(t){var n=R.useContext(WC);n==null&&bl();var r=n[t];return r==null&&bl(),r},fAe=function(){var t=R.useContext(qF);return t},dAe=function(){return R.useContext(YF)},HC=function(){return R.useContext(QF)},GC=function(){return R.useContext(XF)};function Bh(e){"@babel/helpers - typeof";return Bh=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},Bh(e)}function vL(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 gL(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function MAe(e,t){return t7(e,t+1)}function LAe(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,f=a,d=function(){var g=r==null?void 0:r[l];if(g===void 0)return{v:t7(r,c)};var y=l,x,_=function(){return x===void 0&&(x=n(g,y)),x},b=g.coordinate,w=l===0||py(e,b,_,f,s);w||(l=0,f=a,c+=1),w&&(f=b+e*(_()/2+i),l+=c)},p;c<=o.length;)if(p=d(),p)return p.v;return[]}function Vh(e){"@babel/helpers - typeof";return Vh=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},Vh(e)}function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function In(e){for(var t=1;t0?v.coordinate-x*e:v.coordinate})}else o[p]=v=In(In({},v),{},{tickCoord:v.coordinate});var _=py(e,v.tickCoord,y,s,l);_&&(l=v.tickCoord-e*(y()/2+i),o[p]=In(In({},v),{},{isShow:!0}))},f=a-1;f>=0;f--)c(f);return o}function FAe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(o){var f=r[s-1],d=n(f,s-1),p=e*(f.coordinate+e*d/2-c);a[s-1]=f=In(In({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var v=py(e,f.tickCoord,function(){return d},l,c);v&&(c=f.tickCoord-e*(d/2+i),a[s-1]=In(In({},f),{},{isShow:!0}))}for(var g=o?s-1:s,y=function(b){var w=a[b],S,E=function(){return S===void 0&&(S=n(w,b)),S};if(b===0){var C=e*(w.coordinate-e*E()/2-l);a[b]=w=In(In({},w),{},{tickCoord:C<0?w.coordinate-C*e:w.coordinate})}else a[b]=w=In(In({},w),{},{tickCoord:w.coordinate});var T=py(e,w.tickCoord,E,l,c);T&&(l=w.tickCoord+e*(E()/2+i),a[b]=In(In({},w),{},{isShow:!0}))},x=0;x=2?qn(i[1].coordinate-i[0].coordinate):1,_=NAe(o,x,v);return l==="equidistantPreserveStart"?LAe(x,_,y,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=FAe(x,_,y,i,a,l==="preserveStartEnd"):p=DAe(x,_,y,i,a),p.filter(function(b){return b.isShow}))}var BAe=["viewBox"],UAe=["viewBox"],zAe=["ticks"];function bu(e){"@babel/helpers - typeof";return bu=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},bu(e)}function Ec(){return Ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VAe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function WAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EL(e,t){for(var n=0;n0?l(this.props):l(v)),a<=0||s<=0||!g||!g.length?null:V.createElement(Xe,{className:Ce("recharts-cartesian-axis",c),ref:function(x){r.layerReference=x}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),yn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return V.isValidElement(r)?a=V.cloneElement(r,i):Ve(r)?a=r(i):a=V.createElement(gl,Ec({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}]),t}(R.Component);YC(Ku,"displayName","CartesianAxis");YC(Ku,"defaultProps",{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"});var XAe=["x1","y1","x2","y2","key"],QAe=["offset"];function _l(e){"@babel/helpers - typeof";return _l=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},_l(e)}function CL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fn(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function n3e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var r3e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height;return V.createElement("rect",{x:i,y:o,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function i7(e,t){var n;if(V.isValidElement(e))n=V.cloneElement(e,t);else if(Ve(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,l=PL(t,XAe),c=De(l,!1);c.offset;var f=PL(c,QAe);n=V.createElement("line",Gs({},f,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function i3e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var c=Fn(Fn({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return i7(i,c)});return V.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function o3e(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var c=Fn(Fn({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return i7(i,c)});return V.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function a3e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var f=s.map(function(p){return Math.round(p+i-i)}).sort(function(p,v){return p-v});i!==f[0]&&f.unshift(0);var d=f.map(function(p,v){var g=!f[v+1],y=g?i+a-p:f[v+1]-p;if(y<=0)return null;var x=v%t.length;return V.createElement("rect",{key:"react-".concat(v),y:p,x:r,height:y,width:o,stroke:"none",fill:t[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function s3e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var f=c.map(function(p){return Math.round(p+o-o)}).sort(function(p,v){return p-v});o!==f[0]&&f.unshift(0);var d=f.map(function(p,v){var g=!f[v+1],y=g?o+s-p:f[v+1]-p;if(y<=0)return null;var x=v%r.length;return V.createElement("rect",{key:"react-".concat(v),x:p,y:a,width:y,height:l,stroke:"none",fill:r[x],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var l3e=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return cF(qC(Fn(Fn(Fn({},Ku.defaultProps),r),{},{ticks:Mo(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},c3e=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return cF(qC(Fn(Fn(Fn({},Ku.defaultProps),r),{},{ticks:Mo(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Zl={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function ZC(e){var t,n,r,i,o,a,s=HC(),l=GC(),c=dAe(),f=Fn(Fn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Zl.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Zl.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Zl.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Zl.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Zl.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Zl.verticalFill,x:Ee(e.x)?e.x:c.left,y:Ee(e.y)?e.y:c.top,width:Ee(e.width)?e.width:c.width,height:Ee(e.height)?e.height:c.height}),d=f.x,p=f.y,v=f.width,g=f.height,y=f.syncWithTicks,x=f.horizontalValues,_=f.verticalValues,b=cAe(),w=uAe();if(!Ee(v)||v<=0||!Ee(g)||g<=0||!Ee(d)||d!==+d||!Ee(p)||p!==+p)return null;var S=f.verticalCoordinatesGenerator||l3e,E=f.horizontalCoordinatesGenerator||c3e,C=f.horizontalPoints,T=f.verticalPoints;if((!C||!C.length)&&Ve(E)){var A=x&&x.length,D=E({yAxis:w?Fn(Fn({},w),{},{ticks:A?x:w.ticks}):void 0,width:s,height:l,offset:c},A?!0:y);Ni(Array.isArray(D),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(_l(D),"]")),Array.isArray(D)&&(C=D)}if((!T||!T.length)&&Ve(S)){var N=_&&_.length,I=S({xAxis:b?Fn(Fn({},b),{},{ticks:N?_:b.ticks}):void 0,width:s,height:l,offset:c},N?!0:y);Ni(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(_l(I),"]")),Array.isArray(I)&&(T=I)}return V.createElement("g",{className:"recharts-cartesian-grid"},V.createElement(r3e,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height}),V.createElement(i3e,Gs({},f,{offset:c,horizontalPoints:C,xAxis:b,yAxis:w})),V.createElement(o3e,Gs({},f,{offset:c,verticalPoints:T,xAxis:b,yAxis:w})),V.createElement(a3e,Gs({},f,{horizontalPoints:C})),V.createElement(s3e,Gs({},f,{verticalPoints:T})))}ZC.displayName="CartesianGrid";var u3e=["type","layout","connectNulls","ref"];function _u(e){"@babel/helpers - typeof";return _u=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},_u(e)}function f3e(e,t){if(e==null)return{};var n=d3e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function d3e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function xd(){return xd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){v=[].concat(Xl(l.slice(0,g)),[d-y]);break}var x=v.length%2===0?[0,p]:[p];return[].concat(Xl(t.repeat(l,f)),Xl(v),x).map(function(_){return"".concat(_,"px")}).join(", ")}),Si(ha(n),"id",us("recharts-line-")),Si(ha(n),"pathRef",function(a){n.mainCurve=a}),Si(ha(n),"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Si(ha(n),"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return y3e(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,s=o.xAxis,l=o.yAxis,c=o.layout,f=o.children,d=er(f,Hu);if(!d)return null;var p=function(y,x){return{x:y.x,y:y.y,value:y.value,errorVal:Tt(y.payload,x)}},v={clipPath:r?"url(#clipPath-".concat(i,")"):null};return V.createElement(Xe,v,d.map(function(g){return V.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:p})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,f=s.dataKey,d=De(this.props,!1),p=De(l,!0),v=c.map(function(y,x){var _=Or(Or(Or({key:"dot-".concat(x),r:3},d),p),{},{value:y.value,dataKey:f,cx:y.x,cy:y.y,index:x,payload:y.payload});return t.renderDotItem(l,_)}),g={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return V.createElement(Xe,xd({className:"recharts-line-dots",key:"dots"},g),v)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,l=s.type,c=s.layout,f=s.connectNulls;s.ref;var d=f3e(s,u3e),p=Or(Or(Or({},De(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:l,layout:c,connectNulls:f});return V.createElement(za,xd({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,f=a.animationBegin,d=a.animationDuration,p=a.animationEasing,v=a.animationId,g=a.animateNewValues,y=a.width,x=a.height,_=this.state,b=_.prevPoints,w=_.totalLength;return V.createElement(hi,{begin:f,duration:d,isActive:c,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var E=S.t;if(b){var C=b.length/s.length,T=s.map(function(F,q){var W=Math.floor(q*C);if(b[W]){var X=b[W],Q=Bt(X.x,F.x),ne=Bt(X.y,F.y);return Or(Or({},F),{},{x:Q(E),y:ne(E)})}if(g){var Z=Bt(y*2,F.x),z=Bt(x/2,F.y);return Or(Or({},F),{},{x:Z(E),y:z(E)})}return Or(Or({},F),{},{x:F.x,y:F.y})});return o.renderCurveStatically(T,r,i)}var A=Bt(0,w),D=A(E),N;if(l){var I="".concat(l).split(/[,\s]+/gim).map(function(F){return parseFloat(F)});N=o.getStrokeDasharray(D,w,I)}else N=o.generateSimpleStrokeDasharray(w,D);return o.renderCurveStatically(s,r,i,{strokeDasharray:N})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,s=o.isAnimationActive,l=this.state,c=l.prevPoints,f=l.totalLength;return s&&a&&a.length&&(!c&&f>0||!Xa(c,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,c=i.xAxis,f=i.yAxis,d=i.top,p=i.left,v=i.width,g=i.height,y=i.isAnimationActive,x=i.id;if(o||!s||!s.length)return null;var _=this.state.isAnimationFinished,b=s.length===1,w=Ce("recharts-line",l),S=c&&c.allowDataOverflow,E=f&&f.allowDataOverflow,C=S||E,T=Ue(x)?this.id:x,A=(r=De(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},D=A.r,N=D===void 0?3:D,I=A.strokeWidth,F=I===void 0?2:I,q=r5(a)?a:{},W=q.clipDot,X=W===void 0?!0:W,Q=N*2+F;return V.createElement(Xe,{className:w},S||E?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(T)},V.createElement("rect",{x:S?p:p-v/2,y:E?d:d-g/2,width:S?v:v*2,height:E?g:g*2})),!X&&V.createElement("clipPath",{id:"clipPath-dots-".concat(T)},V.createElement("rect",{x:p-Q/2,y:d-Q/2,width:v+Q,height:g+Q}))):null,!b&&this.renderCurve(C,T),this.renderErrorBar(C,T),(b||a)&&this.renderDots(C,X,T),(!y||_)&&Mi.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(Xl(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function E3e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Ks(){return Ks=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Xa(f,a)||!Xa(d,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,c=i.top,f=i.left,d=i.xAxis,p=i.yAxis,v=i.width,g=i.height,y=i.isAnimationActive,x=i.id;if(o||!s||!s.length)return null;var _=this.state.isAnimationFinished,b=s.length===1,w=Ce("recharts-area",l),S=d&&d.allowDataOverflow,E=p&&p.allowDataOverflow,C=S||E,T=Ue(x)?this.id:x,A=(r=De(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},D=A.r,N=D===void 0?3:D,I=A.strokeWidth,F=I===void 0?2:I,q=r5(a)?a:{},W=q.clipDot,X=W===void 0?!0:W,Q=N*2+F;return V.createElement(Xe,{className:w},S||E?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(T)},V.createElement("rect",{x:S?f:f-v/2,y:E?c:c-g/2,width:S?v:v*2,height:E?g:g*2})),!X&&V.createElement("clipPath",{id:"clipPath-dots-".concat(T)},V.createElement("rect",{x:f-Q/2,y:c-Q/2,width:v+Q,height:g+Q}))):null,b?null:this.renderArea(C,T),(a||b)&&this.renderDots(C,X,T),(!y||_)&&Mi.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}]),t}(R.PureComponent);s7=jl;ro(jl,"displayName","Area");ro(jl,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!si.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ro(jl,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(Ee(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var f=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});ro(jl,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,v=t.layout,g=c&&c.length,y=s7.getBaseValue(t,n,r,i),x=v==="horizontal",_=!1,b=d.map(function(S,E){var C;g?C=c[f+E]:(C=Tt(S,l),Array.isArray(C)?_=!0:C=[y,C]);var T=C[1]==null||g&&Tt(S,l)==null;return x?{x:fu({axis:r,ticks:o,bandSize:s,entry:S,index:E}),y:T?null:i.scale(C[1]),value:C,payload:S}:{x:T?null:r.scale(C[1]),y:fu({axis:i,ticks:a,bandSize:s,entry:S,index:E}),value:C,payload:S}}),w;return g||_?w=b.map(function(S){var E=Array.isArray(S.value)?S.value[0]:null;return x?{x:S.x,y:E!=null&&S.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:S.y}}):w=x?i.scale(y):r.scale(y),pa({points:b,baseLine:w,layout:v,isRange:_},p)});ro(jl,"renderDotItem",function(e,t){var n;if(V.isValidElement(e))n=V.cloneElement(e,t);else if(Ve(e))n=e(t);else{var r=Ce("recharts-area-dot",typeof e!="boolean"?e.className:"");n=V.createElement(gp,Ks({},t,{className:r}))}return n});var J0=function(){return null};J0.displayName="ZAxis";J0.defaultProps={zAxisId:0,range:[64,64],scale:"auto",type:"number"};var N3e=["option","isActive"];function wd(){return wd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function L3e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function R3e(e){var t=e.option,n=e.isActive,r=M3e(e,N3e);return typeof t=="string"?V.createElement(sy,wd({option:V.createElement(N0,wd({type:t},r)),isActive:n,shapeType:"symbols"},r)):V.createElement(sy,wd({option:t,isActive:n,shapeType:"symbols"},r))}function wu(e){"@babel/helpers - typeof";return wu=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},wu(e)}function Od(){return Od=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function dke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hke(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&Ee(i)&&Ee(o)?t.slice(i,o+1):[]};function b7(e){return e==="number"?[0,"auto"]:void 0}var MO=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=tb(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(l,c){var f,d=(f=c.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(a.dataKey&&!a.allowDuplicatedCategory){var v=d===void 0?s:d;p=Og(v,a.dataKey,i)}else p=d&&d[r]||s[r];return p?[].concat(Su(l),[pF(c,p)]):l},[])},FL=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=Ske(o,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,f=POe(a,s,c,l);if(f>=0&&c){var d=c[f]&&c[f].value,p=MO(t,n,f,d),v=Eke(r,s,f,o);return{activeTooltipIndex:f,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},Cke=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.layout,d=t.children,p=t.stackOffset,v=lF(f,o);return r.reduce(function(g,y){var x,_=y.props,b=_.type,w=_.dataKey,S=_.allowDataOverflow,E=_.allowDuplicatedCategory,C=_.scale,T=_.ticks,A=_.includeHidden,D=y.props[a];if(g[D])return g;var N=tb(t.data,{graphicalItems:i.filter(function(ee){return ee.props[a]===D}),dataStartIndex:l,dataEndIndex:c}),I=N.length,F,q,W;J3e(y.props.domain,S,b)&&(F=Z2(y.props.domain,null,S),v&&(b==="number"||C!=="auto")&&(W=gd(N,w,"category")));var X=b7(b);if(!F||F.length===0){var Q,ne=(Q=y.props.domain)!==null&&Q!==void 0?Q:X;if(w){if(F=gd(N,w,b),b==="category"&&v){var Z=Pfe(F);E&&Z?(q=F,F=cy(0,I)):E||(F=iM(ne,F,y).reduce(function(ee,K){return ee.indexOf(K)>=0?ee:[].concat(Su(ee),[K])},[]))}else if(b==="category")E?F=F.filter(function(ee){return ee!==""&&!Ue(ee)}):F=iM(ne,F,y).reduce(function(ee,K){return ee.indexOf(K)>=0||K===""||Ue(K)?ee:[].concat(Su(ee),[K])},[]);else if(b==="number"){var z=NOe(N,i.filter(function(ee){return ee.props[a]===D&&(A||!ee.props.hide)}),w,o,f);z&&(F=z)}v&&(b==="number"||C!=="auto")&&(W=gd(N,w,"category"))}else v?F=cy(0,I):s&&s[D]&&s[D].hasStack&&b==="number"?F=p==="expand"?[0,1]:hF(s[D].stackGroups,l,c):F=sF(N,i.filter(function(ee){return ee.props[a]===D&&(A||!ee.props.hide)}),b,f,!0);if(b==="number")F=AO(d,F,D,o,T),ne&&(F=Z2(ne,F,S));else if(b==="category"&&ne){var B=ne,H=F.every(function(ee){return B.indexOf(ee)>=0});H&&(F=B)}}return ve(ve({},g),{},We({},D,ve(ve({},y.props),{},{axisType:o,domain:F,categoricalDomain:W,duplicateDomain:q,originalDomain:(x=y.props.domain)!==null&&x!==void 0?x:X,isCategorical:v,layout:f})))},{})},Pke=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.layout,d=t.children,p=tb(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),v=p.length,g=lF(f,o),y=-1;return r.reduce(function(x,_){var b=_.props[a],w=b7("number");if(!x[b]){y++;var S;return g?S=cy(0,v):s&&s[b]&&s[b].hasStack?(S=hF(s[b].stackGroups,l,c),S=AO(d,S,b,o)):(S=Z2(w,sF(p,r.filter(function(E){return E.props[a]===b&&!E.props.hide}),"number",f),i.defaultProps.allowDataOverflow),S=AO(d,S,b,o)),ve(ve({},x),{},We({},b,ve(ve({axisType:o},i.defaultProps),{},{hide:!0,orientation:Mr(wke,"".concat(o,".").concat(y%2),null),domain:S,originalDomain:w,isCategorical:g,layout:f})))}return x},{})},Tke=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),p=er(f,o),v={};return p&&p.length?v=Cke(t,{axes:p,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(v=Pke(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),v},jke=function(t){var n=wa(t),r=Mo(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:hC(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Zg(n,r)}},BL=function(t){var n=t.children,r=t.defaultShowTooltip,i=Cr(n,gu),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},Ake=function(t){return!t||!t.length?!1:t.some(function(n){var r=Ro(n&&n.type);return r&&r.indexOf("Bar")>=0})},UL=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},kke=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,f=r.height,d=r.children,p=r.margin||{},v=Cr(d,gu),g=Cr(d,ch),y=Object.keys(l).reduce(function(E,C){var T=l[C],A=T.orientation;return!T.mirror&&!T.hide?ve(ve({},E),{},We({},A,E[A]+T.width)):E},{left:p.left||0,right:p.right||0}),x=Object.keys(a).reduce(function(E,C){var T=a[C],A=T.orientation;return!T.mirror&&!T.hide?ve(ve({},E),{},We({},A,Mr(E,"".concat(A))+T.height)):E},{top:p.top||0,bottom:p.bottom||0}),_=ve(ve({},x),y),b=_.bottom;v&&(_.bottom+=v.props.height||gu.defaultProps.height),g&&n&&(_=AOe(_,i,r,n));var w=c-_.left-_.right,S=f-_.top-_.bottom;return ve(ve({brushBottom:b},_),{},{width:Math.max(w,0),height:Math.max(S,0)})},Nke=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},XC=function(t){var n,r=t.chartName,i=t.GraphicalChild,o=t.defaultTooltipEventType,a=o===void 0?"axis":o,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,c=t.axisComponents,f=t.legendContent,d=t.formatAxisMap,p=t.defaultProps,v=function(x,_){var b=_.graphicalItems,w=_.stackGroups,S=_.offset,E=_.updateId,C=_.dataStartIndex,T=_.dataEndIndex,A=x.barSize,D=x.layout,N=x.barGap,I=x.barCategoryGap,F=x.maxBarSize,q=UL(D),W=q.numericAxisName,X=q.cateAxisName,Q=Ake(b),ne=[];return b.forEach(function(Z,z){var B=tb(x.data,{graphicalItems:[Z],dataStartIndex:C,dataEndIndex:T}),H=Z.props,ee=H.dataKey,K=H.maxBarSize,te=Z.props["".concat(W,"Id")],ie=Z.props["".concat(X,"Id")],ae={},fe=c.reduce(function(Te,Pe){var Ae=_["".concat(Pe.axisType,"Map")],le=Z.props["".concat(Pe.axisType,"Id")];Ae&&Ae[le]||Pe.axisType==="zAxis"||bl();var ue=Ae[le];return ve(ve({},Te),{},We(We({},Pe.axisType,ue),"".concat(Pe.axisType,"Ticks"),Mo(ue)))},ae),j=fe[X],k=fe["".concat(X,"Ticks")],U=w&&w[te]&&w[te].hasStack&&UOe(Z,w[te].stackGroups),J=Ro(Z.type).indexOf("Bar")>=0,Y=Zg(j,k),oe=[],he=Q&&TOe({barSize:A,stackGroups:w,totalSize:Nke(fe,X)});if(J){var Se,se,pe=Ue(K)?F:K,me=(Se=(se=Zg(j,k,!0))!==null&&se!==void 0?se:pe)!==null&&Se!==void 0?Se:0;oe=jOe({barGap:N,barCategoryGap:I,bandSize:me!==Y?me:Y,sizeList:he[ie],maxBarSize:pe}),me!==Y&&(oe=oe.map(function(Te){return ve(ve({},Te),{},{position:ve(ve({},Te.position),{},{offset:Te.position.offset-me/2})})}))}var xe=Z&&Z.type&&Z.type.getComposedData;xe&&ne.push({props:ve(ve({},xe(ve(ve({},fe),{},{displayedData:B,props:x,dataKey:ee,item:Z,bandSize:Y,barPosition:oe,offset:S,stackedData:U,layout:D,dataStartIndex:C,dataEndIndex:T}))),{},We(We(We({key:Z.key||"item-".concat(z)},W,fe[W]),X,fe[X]),"animationId",E)),childIndex:Ffe(Z,x.children),item:Z})}),ne},g=function(x,_){var b=x.props,w=x.dataStartIndex,S=x.dataEndIndex,E=x.updateId;if(!Q3({props:b}))return null;var C=b.children,T=b.layout,A=b.stackOffset,D=b.data,N=b.reverseStackOrder,I=UL(T),F=I.numericAxisName,q=I.cateAxisName,W=er(C,i),X=FOe(D,W,"".concat(F,"Id"),"".concat(q,"Id"),A,N),Q=c.reduce(function(H,ee){var K="".concat(ee.axisType,"Map");return ve(ve({},H),{},We({},K,Tke(b,ve(ve({},ee),{},{graphicalItems:W,stackGroups:ee.axisType===F&&X,dataStartIndex:w,dataEndIndex:S}))))},{}),ne=kke(ve(ve({},Q),{},{props:b,graphicalItems:W}),_==null?void 0:_.legendBBox);Object.keys(Q).forEach(function(H){Q[H]=d(b,Q[H],ne,H.replace("Map",""),r)});var Z=Q["".concat(q,"Map")],z=jke(Z),B=v(b,ve(ve({},Q),{},{dataStartIndex:w,dataEndIndex:S,updateId:E,graphicalItems:W,stackGroups:X,offset:ne}));return ve(ve({formattedGraphicalItems:B,graphicalItems:W,offset:ne,stackGroups:X},z),Q)};return n=function(y){gke(x,y);function x(_){var b,w,S;return dke(this,x),S=mke(this,x,[_]),We(lt(S),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),We(lt(S),"accessibilityManager",new Q3e),We(lt(S),"handleLegendBBoxUpdate",function(E){if(E){var C=S.state,T=C.dataStartIndex,A=C.dataEndIndex,D=C.updateId;S.setState(ve({legendBBox:E},g({props:S.props,dataStartIndex:T,dataEndIndex:A,updateId:D},ve(ve({},S.state),{},{legendBBox:E}))))}}),We(lt(S),"handleReceiveSyncEvent",function(E,C,T){if(S.props.syncId===E){if(T===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(C)}}),We(lt(S),"handleBrushChange",function(E){var C=E.startIndex,T=E.endIndex;if(C!==S.state.dataStartIndex||T!==S.state.dataEndIndex){var A=S.state.updateId;S.setState(function(){return ve({dataStartIndex:C,dataEndIndex:T},g({props:S.props,dataStartIndex:C,dataEndIndex:T,updateId:A},S.state))}),S.triggerSyncEvent({dataStartIndex:C,dataEndIndex:T})}}),We(lt(S),"handleMouseEnter",function(E){var C=S.getMouseInfo(E);if(C){var T=ve(ve({},C),{},{isTooltipActive:!0});S.setState(T),S.triggerSyncEvent(T);var A=S.props.onMouseEnter;Ve(A)&&A(T,E)}}),We(lt(S),"triggeredAfterMouseMove",function(E){var C=S.getMouseInfo(E),T=C?ve(ve({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(T),S.triggerSyncEvent(T);var A=S.props.onMouseMove;Ve(A)&&A(T,E)}),We(lt(S),"handleItemMouseEnter",function(E){S.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),We(lt(S),"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),We(lt(S),"handleMouseMove",function(E){E.persist(),S.throttleTriggeredAfterMouseMove(E)}),We(lt(S),"handleMouseLeave",function(E){S.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};S.setState(C),S.triggerSyncEvent(C);var T=S.props.onMouseLeave;Ve(T)&&T(C,E)}),We(lt(S),"handleOuterEvent",function(E){var C=Dfe(E),T=Mr(S.props,"".concat(C));if(C&&Ve(T)){var A,D;/.*touch.*/i.test(C)?D=S.getMouseInfo(E.changedTouches[0]):D=S.getMouseInfo(E),T((A=D)!==null&&A!==void 0?A:{},E)}}),We(lt(S),"handleClick",function(E){var C=S.getMouseInfo(E);if(C){var T=ve(ve({},C),{},{isTooltipActive:!0});S.setState(T),S.triggerSyncEvent(T);var A=S.props.onClick;Ve(A)&&A(T,E)}}),We(lt(S),"handleMouseDown",function(E){var C=S.props.onMouseDown;if(Ve(C)){var T=S.getMouseInfo(E);C(T,E)}}),We(lt(S),"handleMouseUp",function(E){var C=S.props.onMouseUp;if(Ve(C)){var T=S.getMouseInfo(E);C(T,E)}}),We(lt(S),"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),We(lt(S),"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.handleMouseDown(E.changedTouches[0])}),We(lt(S),"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.handleMouseUp(E.changedTouches[0])}),We(lt(S),"triggerSyncEvent",function(E){S.props.syncId!==void 0&&r_.emit(i_,S.props.syncId,E,S.eventEmitterSymbol)}),We(lt(S),"applySyncEvent",function(E){var C=S.props,T=C.layout,A=C.syncMethod,D=S.state.updateId,N=E.dataStartIndex,I=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)S.setState(ve({dataStartIndex:N,dataEndIndex:I},g({props:S.props,dataStartIndex:N,dataEndIndex:I,updateId:D},S.state)));else if(E.activeTooltipIndex!==void 0){var F=E.chartX,q=E.chartY,W=E.activeTooltipIndex,X=S.state,Q=X.offset,ne=X.tooltipTicks;if(!Q)return;if(typeof A=="function")W=A(ne,E);else if(A==="value"){W=-1;for(var Z=0;Z=0){var U,J;if(F.dataKey&&!F.allowDuplicatedCategory){var Y=typeof F.dataKey=="function"?k:"payload.".concat(F.dataKey.toString());U=Og(Z,Y,W),J=z&&B&&Og(B,Y,W)}else U=Z==null?void 0:Z[q],J=z&&B&&B[q];if(ie||te){var oe=E.props.activeIndex!==void 0?E.props.activeIndex:q;return[R.cloneElement(E,ve(ve(ve({},A.props),fe),{},{activeIndex:oe})),null,null]}if(!Ue(U))return[j].concat(Su(S.renderActivePoints({item:A,activePoint:U,basePoint:J,childIndex:q,isRange:z})))}else{var he,Se=(he=S.getItemByXY(S.state.activeCoordinate))!==null&&he!==void 0?he:{graphicalItem:j},se=Se.graphicalItem,pe=se.item,me=pe===void 0?E:pe,xe=se.childIndex,Te=ve(ve(ve({},A.props),fe),{},{activeIndex:xe});return[R.cloneElement(me,Te),null,null]}return z?[j,null,null]:[j,null]}),We(lt(S),"renderCustomized",function(E,C,T){return R.cloneElement(E,ve(ve({key:"recharts-customized-".concat(T)},S.props),S.state))}),We(lt(S),"renderMap",{CartesianGrid:{handler:Nm,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:Nm},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:Nm},YAxis:{handler:Nm},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((b=_.id)!==null&&b!==void 0?b:us("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=s8(S.triggeredAfterMouseMove,(w=_.throttleDelay)!==null&&w!==void 0?w:1e3/60),S.state={},S}return pke(x,[{key:"componentDidMount",value:function(){var b,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,w=b.children,S=b.data,E=b.height,C=b.layout,T=Cr(w,Xr);if(T){var A=T.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length)){var D=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,N=MO(this.state,S,A,D),I=this.state.tooltipTicks[A].coordinate,F=(this.state.offset.top+E)/2,q=C==="horizontal",W=q?{x:I,y:F}:{y:I,x:F},X=this.state.formattedGraphicalItems.find(function(ne){var Z=ne.item;return Z.type.name==="Scatter"});X&&(W=ve(ve({},W),X.props.points[A].tooltipPosition),N=X.props.points[A].tooltipPayload);var Q={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:D,activePayload:N,activeCoordinate:W};this.setState(Q),this.renderCursor(T),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var S,E;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(b){f2([Cr(b.children,Xr)],[Cr(this.props.children,Xr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Cr(this.props.children,Xr);if(b&&typeof b.props.shared=="boolean"){var w=b.props.shared?"axis":"item";return l.indexOf(w)>=0?w:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var w=this.container,S=w.getBoundingClientRect(),E=c_e(S),C={chartX:Math.round(b.pageX-E.left),chartY:Math.round(b.pageY-E.top)},T=S.width/w.offsetWidth||1,A=this.inRange(C.chartX,C.chartY,T);if(!A)return null;var D=this.state,N=D.xAxisMap,I=D.yAxisMap,F=this.getTooltipEventType();if(F!=="axis"&&N&&I){var q=wa(N).scale,W=wa(I).scale,X=q&&q.invert?q.invert(C.chartX):null,Q=W&&W.invert?W.invert(C.chartY):null;return ve(ve({},C),{},{xValue:X,yValue:Q})}var ne=FL(this.state,this.props.data,this.props.layout,A);return ne?ve(ve({},C),ne):null}},{key:"inRange",value:function(b,w){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,C=b/S,T=w/S;if(E==="horizontal"||E==="vertical"){var A=this.state.offset,D=C>=A.left&&C<=A.left+A.width&&T>=A.top&&T<=A.top+A.height;return D?{x:C,y:T}:null}var N=this.state,I=N.angleAxisMap,F=N.radiusAxisMap;if(I&&F){var q=wa(I);return sM({x:C,y:T},q)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,w=this.getTooltipEventType(),S=Cr(b,Xr),E={};S&&w==="axis"&&(S.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var C=Sg(this.props,this.handleOuterEvent);return ve(ve({},C),E)}},{key:"addListener",value:function(){r_.on(i_,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){r_.removeListener(i_,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,w,S){for(var E=this.state.formattedGraphicalItems,C=0,T=E.length;C");return e}function Fke(e){function t(n,r){const{instance:i,context:o}=e(n).current;return R.useImperativeHandle(r,()=>i),n.children==null?null:V.createElement(w7,{value:o},n.children)}return R.forwardRef(t)}function Bke(e){function t(n,r){const[i,o]=R.useState(!1),{instance:a}=e(n,o).current;R.useImperativeHandle(r,()=>a),R.useEffect(function(){i&&a.update()},[a,i,n.children]);const s=a._contentNode;return s?Wy.createPortal(n.children,s):null}return R.forwardRef(t)}function Uke(e){function t(n,r){const{instance:i}=e(n).current;return R.useImperativeHandle(r,()=>i),null}return R.forwardRef(t)}function S7(e,t){const n=R.useRef();R.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 QC(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function zke(e,t){return function(r,i){const o=O7(),a=e(QC(r,o),o);return _7(o.map,r.attribution),S7(a.current,r.eventHandlers),t(a.current,o,r,i),a}}var LO={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade */(function(e,t){(function(n,r){r(t)})(oc,function(n){var r="1.9.4";function i(u){var h,O,P,M;for(O=1,P=arguments.length;O"u"||!L||!L.Mixin)){u=w(u)?u:[u];for(var h=0;h0?Math.floor(u):Math.ceil(u)};Z.prototype={clone:function(){return new Z(this.x,this.y)},add:function(u){return this.clone()._add(B(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(B(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=z(this.x),this.y=z(this.y),this},distanceTo:function(u){u=B(u);var h=u.x-this.x,O=u.y-this.y;return Math.sqrt(h*h+O*O)},equals:function(u){return u=B(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=B(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function B(u,h,O){return u instanceof Z?u:w(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,h,O)}function H(u,h){if(u)for(var O=h?[u,h]:u,P=0,M=O.length;P=this.min.x&&O.x<=this.max.x&&h.y>=this.min.y&&O.y<=this.max.y},intersects:function(u){u=ee(u);var h=this.min,O=this.max,P=u.min,M=u.max,G=M.x>=h.x&&P.x<=O.x,re=M.y>=h.y&&P.y<=O.y;return G&&re},overlaps:function(u){u=ee(u);var h=this.min,O=this.max,P=u.min,M=u.max,G=M.x>h.x&&P.xh.y&&P.y=h.lat&&M.lat<=O.lat&&P.lng>=h.lng&&M.lng<=O.lng},intersects:function(u){u=te(u);var h=this._southWest,O=this._northEast,P=u.getSouthWest(),M=u.getNorthEast(),G=M.lat>=h.lat&&P.lat<=O.lat,re=M.lng>=h.lng&&P.lng<=O.lng;return G&&re},overlaps:function(u){u=te(u);var h=this._southWest,O=this._northEast,P=u.getSouthWest(),M=u.getNorthEast(),G=M.lat>h.lat&&P.lath.lng&&P.lng1,qt=function(){var u=!1;try{var h=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",d,h),window.removeEventListener("testPassiveEventSupport",d,h)}catch{}return u}(),zn=function(){return!!document.createElement("canvas").getContext}(),Sn=!!(document.createElementNS&&Se("svg").createSVGRect),En=!!Sn&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),on=!Sn&&function(){try{var u=document.createElement("div");u.innerHTML='';var h=u.firstChild;return h.style.behavior="url(#default#VML)",h&&typeof h.adj=="object"}catch{return!1}}(),mi=navigator.platform.indexOf("Mac")===0,vi=navigator.platform.indexOf("Linux")===0;function Cn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var Fe={ie:me,ielt9:xe,edge:Te,webkit:Pe,android:Ae,android23:le,androidStock:ye,opera:ge,chrome:we,gecko:ke,safari:Me,phantom:Je,opera12:tt,win:Ye,ie3d:Wt,webkit3d:It,gecko3d:dn,any3d:Un,mobile:Vi,mobileWebkit:On,mobileWebkit3d:ef,msPointer:Wi,pointer:Tp,touch:Ap,touchNative:jp,mobileOpera:tf,mobileGecko:ms,retina:Jt,passiveEvents:qt,canvas:zn,svg:Sn,vml:on,inlineSvg:En,mac:mi,linux:vi},CP=Fe.msPointer?"MSPointerDown":"pointerdown",PP=Fe.msPointer?"MSPointerMove":"pointermove",TP=Fe.msPointer?"MSPointerUp":"pointerup",jP=Fe.msPointer?"MSPointerCancel":"pointercancel",fb={touchstart:CP,touchmove:PP,touchend:TP,touchcancel:jP},AP={touchstart:e9,touchmove:kp,touchend:kp,touchcancel:kp},Nl={},kP=!1;function YU(u,h,O){return h==="touchstart"&&JU(),AP[h]?(O=AP[h].bind(this,O),u.addEventListener(fb[h],O,!1),O):(console.warn("wrong event specified:",h),d)}function ZU(u,h,O){if(!fb[h]){console.warn("wrong event specified:",h);return}u.removeEventListener(fb[h],O,!1)}function XU(u){Nl[u.pointerId]=u}function QU(u){Nl[u.pointerId]&&(Nl[u.pointerId]=u)}function NP(u){delete Nl[u.pointerId]}function JU(){kP||(document.addEventListener(CP,XU,!0),document.addEventListener(PP,QU,!0),document.addEventListener(TP,NP,!0),document.addEventListener(jP,NP,!0),kP=!0)}function kp(u,h){if(h.pointerType!==(h.MSPOINTER_TYPE_MOUSE||"mouse")){h.touches=[];for(var O in Nl)h.touches.push(Nl[O]);h.changedTouches=[h],u(h)}}function e9(u,h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&Pn(h),kp(u,h)}function t9(u){var h={},O,P;for(P in u)O=u[P],h[P]=O&&O.bind?O.bind(u):O;return u=h,h.type="dblclick",h.detail=2,h.isTrusted=!1,h._simulated=!0,h}var n9=200;function r9(u,h){u.addEventListener("dblclick",h);var O=0,P;function M(G){if(G.detail!==1){P=G.detail;return}if(!(G.pointerType==="mouse"||G.sourceCapabilities&&!G.sourceCapabilities.firesTouchEvents)){var re=IP(G);if(!(re.some(function(de){return de instanceof HTMLLabelElement&&de.attributes.for})&&!re.some(function(de){return de instanceof HTMLInputElement||de instanceof HTMLSelectElement}))){var ce=Date.now();ce-O<=n9?(P++,P===2&&h(t9(G))):P=1,O=ce}}}return u.addEventListener("click",M),{dblclick:h,simDblclick:M}}function i9(u,h){u.removeEventListener("dblclick",h.dblclick),u.removeEventListener("click",h.simDblclick)}var db=Lp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),nf=Lp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),MP=nf==="webkitTransition"||nf==="OTransition"?nf+"End":"transitionend";function LP(u){return typeof u=="string"?document.getElementById(u):u}function rf(u,h){var O=u.style[h]||u.currentStyle&&u.currentStyle[h];if((!O||O==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(u,null);O=P?P[h]:null}return O==="auto"?null:O}function ut(u,h,O){var P=document.createElement(u);return P.className=h||"",O&&O.appendChild(P),P}function Dt(u){var h=u.parentNode;h&&h.removeChild(u)}function Np(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function Ml(u){var h=u.parentNode;h&&h.lastChild!==u&&h.appendChild(u)}function Ll(u){var h=u.parentNode;h&&h.firstChild!==u&&h.insertBefore(u,h.firstChild)}function hb(u,h){if(u.classList!==void 0)return u.classList.contains(h);var O=Mp(u);return O.length>0&&new RegExp("(^|\\s)"+h+"(\\s|$)").test(O)}function Qe(u,h){if(u.classList!==void 0)for(var O=g(h),P=0,M=O.length;P0?2*window.devicePixelRatio:1;function FP(u){return Fe.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/s9: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 Eb(u,h){var O=h.relatedTarget;if(!O)return!0;try{for(;O&&O!==u;)O=O.parentNode}catch{return!1}return O!==u}var l9={__proto__:null,on:Ze,off:bt,stopPropagation:ys,disableScrollPropagation:Sb,disableClickPropagation:lf,preventDefault:Pn,stop:bs,getPropagationPath:IP,getMousePosition:DP,getWheelDelta:FP,isExternalTarget:Eb,addListener:Ze,removeListener:bt},BP=ne.extend({run:function(u,h,O,P){this.stop(),this._el=u,this._inProgress=!0,this._duration=O||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=gs(u),this._offset=h.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=I(this._animate,this),this._step()},_step:function(u){var h=+new Date-this._startTime,O=this._duration*1e3;hthis.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,h){this._enforcingBounds=!0;var O=this.getCenter(),P=this._limitCenter(O,this._zoom,te(u));return O.equals(P)||this.panTo(P,h),this._enforcingBounds=!1,this},panInside:function(u,h){h=h||{};var O=B(h.paddingTopLeft||h.padding||[0,0]),P=B(h.paddingBottomRight||h.padding||[0,0]),M=this.project(this.getCenter()),G=this.project(u),re=this.getPixelBounds(),ce=ee([re.min.add(O),re.max.subtract(P)]),de=ce.getSize();if(!ce.contains(G)){this._enforcingBounds=!0;var _e=G.subtract(ce.getCenter()),Le=ce.extend(G).getSize().subtract(de);M.x+=_e.x<0?-Le.x:Le.x,M.y+=_e.y<0?-Le.y:Le.y,this.panTo(this.unproject(M),h),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var h=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var O=this.getSize(),P=h.divideBy(2).round(),M=O.divideBy(2).round(),G=P.subtract(M);return!G.x&&!G.y?this:(u.animate&&u.pan?this.panBy(G):(u.pan&&this._rawPanBy(G),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:h,newSize:O}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var h=a(this._handleGeolocationResponse,this),O=a(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(h,O,u):navigator.geolocation.getCurrentPosition(h,O,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var h=u.code,O=u.message||(h===1?"permission denied":h===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:h,message:"Geolocation error: "+O+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var h=u.coords.latitude,O=u.coords.longitude,P=new ie(h,O),M=P.toBounds(u.coords.accuracy*2),G=this._locateOptions;if(G.setView){var re=this.getBoundsZoom(M);this.setView(P,G.maxZoom?Math.min(re,G.maxZoom):re)}var ce={latlng:P,bounds:M,timestamp:u.timestamp};for(var de in u.coords)typeof u.coords[de]=="number"&&(ce[de]=u.coords[de]);this.fire("locationfound",ce)}},addHandler:function(u,h){if(!h)return this;var O=this[u]=new h(this);return this._handlers.push(O),this.options[u]&&O.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(),Dt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(F(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)Dt(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,h){var O="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),P=ut("div",O,h||this._mapPane);return u&&(this._panes[u]=P),P},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),h=this.unproject(u.getBottomLeft()),O=this.unproject(u.getTopRight());return new K(h,O)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,h,O){u=te(u),O=B(O||[0,0]);var P=this.getZoom()||0,M=this.getMinZoom(),G=this.getMaxZoom(),re=u.getNorthWest(),ce=u.getSouthEast(),de=this.getSize().subtract(O),_e=ee(this.project(ce,P),this.project(re,P)).getSize(),Le=Fe.any3d?this.options.zoomSnap:1,ze=de.x/_e.x,et=de.y/_e.y,Vn=h?Math.max(ze,et):Math.min(ze,et);return P=this.getScaleZoom(Vn,P),Le&&(P=Math.round(P/(Le/100))*(Le/100),P=h?Math.ceil(P/Le)*Le:Math.floor(P/Le)*Le),Math.max(M,Math.min(G,P))},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,h){var O=this._getTopLeftPoint(u,h);return new H(O,O.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,h){var O=this.options.crs;return h=h===void 0?this._zoom:h,O.scale(u)/O.scale(h)},getScaleZoom:function(u,h){var O=this.options.crs;h=h===void 0?this._zoom:h;var P=O.zoom(u*O.scale(h));return isNaN(P)?1/0:P},project:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.latLngToPoint(ae(u),h)},unproject:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.pointToLatLng(B(u),h)},layerPointToLatLng:function(u){var h=B(u).add(this.getPixelOrigin());return this.unproject(h)},latLngToLayerPoint:function(u){var h=this.project(ae(u))._round();return h._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(ae(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(te(u))},distance:function(u,h){return this.options.crs.distance(ae(u),ae(h))},containerPointToLayerPoint:function(u){return B(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return B(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var h=this.containerPointToLayerPoint(B(u));return this.layerPointToLatLng(h)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ae(u)))},mouseEventToContainerPoint:function(u){return DP(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var h=this._container=LP(u);if(h){if(h._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ze(h,"scroll",this._onScroll,this),this._containerId=l(h)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&Fe.any3d,Qe(u,"leaflet-container"+(Fe.touch?" leaflet-touch":"")+(Fe.retina?" leaflet-retina":"")+(Fe.ielt9?" leaflet-oldie":"")+(Fe.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var h=rf(u,"position");h!=="absolute"&&h!=="relative"&&h!=="fixed"&&h!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),en(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||(Qe(u.markerPane,"leaflet-zoom-hide"),Qe(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,h,O){en(this._mapPane,new Z(0,0));var P=!this._loaded;this._loaded=!0,h=this._limitZoom(h),this.fire("viewprereset");var M=this._zoom!==h;this._moveStart(M,O)._move(u,h)._moveEnd(M),this.fire("viewreset"),P&&this.fire("load")},_moveStart:function(u,h){return u&&this.fire("zoomstart"),h||this.fire("movestart"),this},_move:function(u,h,O,P){h===void 0&&(h=this._zoom);var M=this._zoom!==h;return this._zoom=h,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),P?O&&O.pinch&&this.fire("zoom",O):((M||O&&O.pinch)&&this.fire("zoom",O),this.fire("move",O)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return F(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){en(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[l(this._container)]=this;var h=u?bt:Ze;h(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&h(window,"resize",this._onResize,this),Fe.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){F(this._resizeRequest),this._resizeRequest=I(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,h){for(var O=[],P,M=h==="mouseout"||h==="mouseover",G=u.target||u.srcElement,re=!1;G;){if(P=this._targets[l(G)],P&&(h==="click"||h==="preclick")&&this._draggableMoved(P)){re=!0;break}if(P&&P.listens(h,!0)&&(M&&!Eb(G,u)||(O.push(P),M))||G===this._container)break;G=G.parentNode}return!O.length&&!re&&!M&&this.listens(h,!0)&&(O=[this]),O},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var h=u.target||u.srcElement;if(!(!this._loaded||h._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(h))){var O=u.type;O==="mousedown"&&bb(h),this._fireDOMEvent(u,O)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,h,O){if(u.type==="click"){var P=i({},u);P.type="preclick",this._fireDOMEvent(P,P.type,O)}var M=this._findEventTargets(u,h);if(O){for(var G=[],re=0;re0?Math.round(u-h)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(h))},_limitZoom:function(u){var h=this.getMinZoom(),O=this.getMaxZoom(),P=Fe.any3d?this.options.zoomSnap:1;return P&&(u=Math.round(u/P)*P),Math.max(h,Math.min(O,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Yt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,h){var O=this._getCenterOffset(u)._trunc();return(h&&h.animate)!==!0&&!this.getSize().contains(O)?!1:(this.panBy(O,h),!0)},_createAnimProxy:function(){var u=this._proxy=ut("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(h){var O=db,P=this._proxy.style[O];vs(this._proxy,this.project(h.center,h.zoom),this.getZoomScale(h.zoom,1)),P===this._proxy.style[O]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Dt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),h=this.getZoom();vs(this._proxy,this.project(u,h),this.getZoomScale(h,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,h,O){if(this._animatingZoom)return!0;if(O=O||{},!this._zoomAnimated||O.animate===!1||this._nothingToAnimate()||Math.abs(h-this._zoom)>this.options.zoomAnimationThreshold)return!1;var P=this.getZoomScale(h),M=this._getCenterOffset(u)._divideBy(1-1/P);return O.animate!==!0&&!this.getSize().contains(M)?!1:(I(function(){this._moveStart(!0,O.noMoveStart||!1)._animateZoom(u,h,!0)},this),!0)},_animateZoom:function(u,h,O,P){this._mapPane&&(O&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=h,Qe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:h,noUpdate:P}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Yt(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 c9(u,h){return new st(u,h)}var gi=W.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var h=this._map;return h&&h.removeControl(this),this.options.position=u,h&&h.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var h=this._container=this.onAdd(u),O=this.getPosition(),P=u._controlCorners[O];return Qe(h,"leaflet-control"),O.indexOf("bottom")!==-1?P.insertBefore(h,P.firstChild):P.appendChild(h),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Dt(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()}}),cf=function(u){return new gi(u)};st.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},h="leaflet-",O=this._controlContainer=ut("div",h+"control-container",this._container);function P(M,G){var re=h+M+" "+h+G;u[M+G]=ut("div",re,O)}P("top","left"),P("top","right"),P("bottom","left"),P("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Dt(this._controlCorners[u]);Dt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var UP=gi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,h,O,P){return O1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=h&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var h=this._getLayer(l(u.target)),O=h.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;O&&this._map.fire(O,h)},_createRadioElement:function(u,h){var O='",P=document.createElement("div");return P.innerHTML=O,P.firstChild},_addItem:function(u){var h=document.createElement("label"),O=this._map.hasLayer(u.layer),P;u.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=O):P=this._createRadioElement("leaflet-base-layers_"+l(this),O),this._layerControlInputs.push(P),P.layerId=l(u.layer),Ze(P,"click",this._onInputClick,this);var M=document.createElement("span");M.innerHTML=" "+u.name;var G=document.createElement("span");h.appendChild(G),G.appendChild(P),G.appendChild(M);var re=u.overlay?this._overlaysList:this._baseLayersList;return re.appendChild(h),this._checkDisabledLayers(),h},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,h,O,P=[],M=[];this._handlingClick=!0;for(var G=u.length-1;G>=0;G--)h=u[G],O=this._getLayer(h.layerId).layer,h.checked?P.push(O):h.checked||M.push(O);for(G=0;G=0;M--)h=u[M],O=this._getLayer(h.layerId).layer,h.disabled=O.options.minZoom!==void 0&&PO.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,Ze(u,"click",Pn),this.expand();var h=this;setTimeout(function(){bt(u,"click",Pn),h._preventClick=!1})}}),u9=function(u,h,O){return new UP(u,h,O)},Cb=gi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var h="leaflet-control-zoom",O=ut("div",h+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,h+"-in",O,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,h+"-out",O,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),O},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,h,O,P,M){var G=ut("a",O,P);return G.innerHTML=u,G.href="#",G.title=h,G.setAttribute("role","button"),G.setAttribute("aria-label",h),lf(G),Ze(G,"click",bs),Ze(G,"click",M,this),Ze(G,"click",this._refocusOnMap,this),G},_updateDisabled:function(){var u=this._map,h="leaflet-disabled";Yt(this._zoomInButton,h),Yt(this._zoomOutButton,h),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Qe(this._zoomOutButton,h),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Qe(this._zoomInButton,h),this._zoomInButton.setAttribute("aria-disabled","true"))}});st.mergeOptions({zoomControl:!0}),st.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Cb,this.addControl(this.zoomControl))});var f9=function(u){return new Cb(u)},zP=gi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var h="leaflet-control-scale",O=ut("div",h),P=this.options;return this._addScales(P,h+"-line",O),u.on(P.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),O},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,h,O){u.metric&&(this._mScale=ut("div",h,O)),u.imperial&&(this._iScale=ut("div",h,O))},_update:function(){var u=this._map,h=u.getSize().y/2,O=u.distance(u.containerPointToLatLng([0,h]),u.containerPointToLatLng([this.options.maxWidth,h]));this._updateScales(O)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var h=this._getRoundNum(u),O=h<1e3?h+" m":h/1e3+" km";this._updateScale(this._mScale,O,h/u)},_updateImperial:function(u){var h=u*3.2808399,O,P,M;h>5280?(O=h/5280,P=this._getRoundNum(O),this._updateScale(this._iScale,P+" mi",P/O)):(M=this._getRoundNum(h),this._updateScale(this._iScale,M+" ft",M/h))},_updateScale:function(u,h,O){u.style.width=Math.round(this.options.maxWidth*O)+"px",u.innerHTML=h},_getRoundNum:function(u){var h=Math.pow(10,(Math.floor(u)+"").length-1),O=u/h;return O=O>=10?10:O>=5?5:O>=3?3:O>=2?2:1,h*O}}),d9=function(u){return new zP(u)},h9='',Pb=gi.extend({options:{position:"bottomright",prefix:''+(Fe.inlineSvg?h9+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=ut("div","leaflet-control-attribution"),lf(this._container);for(var h in u._layers)u._layers[h].getAttribution&&this.addAttribution(u._layers[h].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var h in this._attributions)this._attributions[h]&&u.push(h);var O=[];this.options.prefix&&O.push(this.options.prefix),u.length&&O.push(u.join(", ")),this._container.innerHTML=O.join(' ')}}});st.mergeOptions({attributionControl:!0}),st.addInitHook(function(){this.options.attributionControl&&new Pb().addTo(this)});var p9=function(u){return new Pb(u)};gi.Layers=UP,gi.Zoom=Cb,gi.Scale=zP,gi.Attribution=Pb,cf.layers=u9,cf.zoom=f9,cf.scale=d9,cf.attribution=p9;var Gi=W.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}});Gi.addTo=function(u,h){return u.addHandler(h,this),this};var m9={Events:Q},VP=Fe.touch?"touchstart mousedown":"mousedown",aa=ne.extend({options:{clickTolerance:3},initialize:function(u,h,O,P){y(this,P),this._element=u,this._dragStartTarget=h||u,this._preventOutline=O},enable:function(){this._enabled||(Ze(this._dragStartTarget,VP,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(aa._dragging===this&&this.finishDrag(!0),bt(this._dragStartTarget,VP,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!hb(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){aa._dragging===this&&this.finishDrag();return}if(!(aa._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(aa._dragging=this,this._preventOutline&&bb(this._element),vb(),of(),!this._moving)){this.fire("down");var h=u.touches?u.touches[0]:u,O=RP(this._element);this._startPoint=new Z(h.clientX,h.clientY),this._startPos=gs(this._element),this._parentScale=_b(O);var P=u.type==="mousedown";Ze(document,P?"mousemove":"touchmove",this._onMove,this),Ze(document,P?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var h=u.touches&&u.touches.length===1?u.touches[0]:u,O=new Z(h.clientX,h.clientY)._subtract(this._startPoint);!O.x&&!O.y||Math.abs(O.x)+Math.abs(O.y)G&&(re=ce,G=de);G>O&&(h[re]=1,jb(u,h,O,P,re),jb(u,h,O,re,M))}function b9(u,h){for(var O=[u[0]],P=1,M=0,G=u.length;Ph&&(O.push(u[P]),M=P);return Mh.max.x&&(O|=2),u.yh.max.y&&(O|=8),O}function _9(u,h){var O=h.x-u.x,P=h.y-u.y;return O*O+P*P}function uf(u,h,O,P){var M=h.x,G=h.y,re=O.x-M,ce=O.y-G,de=re*re+ce*ce,_e;return de>0&&(_e=((u.x-M)*re+(u.y-G)*ce)/de,_e>1?(M=O.x,G=O.y):_e>0&&(M+=re*_e,G+=ce*_e)),re=u.x-M,ce=u.y-G,P?re*re+ce*ce:new Z(M,G)}function Wr(u){return!w(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function ZP(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Wr(u)}function XP(u,h){var O,P,M,G,re,ce,de,_e;if(!u||u.length===0)throw new Error("latlngs not passed");Wr(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Le=ae([0,0]),ze=te(u),et=ze.getNorthWest().distanceTo(ze.getSouthWest())*ze.getNorthEast().distanceTo(ze.getNorthWest());et<1700&&(Le=Tb(u));var Vn=u.length,hn=[];for(O=0;OP){de=(G-P)/M,_e=[ce.x-de*(ce.x-re.x),ce.y-de*(ce.y-re.y)];break}var ir=h.unproject(B(_e));return ae([ir.lat+Le.lat,ir.lng+Le.lng])}var x9={__proto__:null,simplify:GP,pointToSegmentDistance:KP,closestPointOnSegment:g9,clipSegment:YP,_getEdgeIntersection:Ip,_getBitCode:_s,_sqClosestPointOnSegment:uf,isFlat:Wr,_flat:ZP,polylineCenter:XP},Ab={project:function(u){return new Z(u.lng,u.lat)},unproject:function(u){return new ie(u.y,u.x)},bounds:new H([-180,-90],[180,90])},kb={R:6378137,R_MINOR:6356752314245179e-9,bounds:new H([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var h=Math.PI/180,O=this.R,P=u.lat*h,M=this.R_MINOR/O,G=Math.sqrt(1-M*M),re=G*Math.sin(P),ce=Math.tan(Math.PI/4-P/2)/Math.pow((1-re)/(1+re),G/2);return P=-O*Math.log(Math.max(ce,1e-10)),new Z(u.lng*h*O,P)},unproject:function(u){for(var h=180/Math.PI,O=this.R,P=this.R_MINOR/O,M=Math.sqrt(1-P*P),G=Math.exp(-u.y/O),re=Math.PI/2-2*Math.atan(G),ce=0,de=.1,_e;ce<15&&Math.abs(de)>1e-7;ce++)_e=M*Math.sin(re),_e=Math.pow((1-_e)/(1+_e),M/2),de=Math.PI/2-2*Math.atan(G*_e)-re,re+=de;return new ie(re*h,u.x*h/O)}},w9={__proto__:null,LonLat:Ab,Mercator:kb,SphericalMercator:U},O9=i({},j,{code:"EPSG:3395",projection:kb,transformation:function(){var u=.5/(Math.PI*kb.R);return Y(u,.5,-u,.5)}()}),QP=i({},j,{code:"EPSG:4326",projection:Ab,transformation:Y(1/180,1,-1/180,.5)}),S9=i({},fe,{projection:Ab,transformation:Y(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,h){var O=h.lng-u.lng,P=h.lat-u.lat;return Math.sqrt(O*O+P*P)},infinite:!0});fe.Earth=j,fe.EPSG3395=O9,fe.EPSG3857=oe,fe.EPSG900913=he,fe.EPSG4326=QP,fe.Simple=S9;var yi=ne.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var h=u.target;if(h.hasLayer(this)){if(this._map=h,this._zoomAnimated=h._zoomAnimated,this.getEvents){var O=this.getEvents();h.on(O,this),this.once("remove",function(){h.off(O,this)},this)}this.onAdd(h),this.fire("add"),h.fire("layeradd",{layer:this})}}});st.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var h=l(u);return this._layers[h]?this:(this._layers[h]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var h=l(u);return this._layers[h]?(this._loaded&&u.onRemove(this),delete this._layers[h],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,h){for(var O in this._layers)u.call(h,this._layers[O]);return this},_addLayers:function(u){u=u?w(u)?u:[u]:[];for(var h=0,O=u.length;hthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&h[0]instanceof ie&&h[0].equals(h[O-1])&&h.pop(),h},_setLatLngs:function(u){wo.prototype._setLatLngs.call(this,u),Wr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Wr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,h=this.options.weight,O=new Z(h,h);if(u=new H(u.min.subtract(O),u.max.add(O)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var P=0,M=this._rings.length,G;Pu.y!=M.y>u.y&&u.x<(M.x-P.x)*(u.y-P.y)/(M.y-P.y)+P.x&&(h=!h);return h||wo.prototype._containsPoint.call(this,u,!0)}});function N9(u,h){return new Il(u,h)}var Oo=xo.extend({initialize:function(u,h){y(this,h),this._layers={},u&&this.addData(u)},addData:function(u){var h=w(u)?u:u.features,O,P,M;if(h){for(O=0,P=h.length;O0&&M.push(M[0].slice()),M}function Dl(u,h){return u.feature?i({},u.feature,{geometry:h}):Vp(h)}function Vp(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var Rb={toGeoJSON:function(u){return Dl(this,{type:"Point",coordinates:Lb(this.getLatLng(),u)})}};Dp.include(Rb),Nb.include(Rb),Fp.include(Rb),wo.include({toGeoJSON:function(u){var h=!Wr(this._latlngs),O=zp(this._latlngs,h?1:0,!1,u);return Dl(this,{type:(h?"Multi":"")+"LineString",coordinates:O})}}),Il.include({toGeoJSON:function(u){var h=!Wr(this._latlngs),O=h&&!Wr(this._latlngs[0]),P=zp(this._latlngs,O?2:h?1:0,!0,u);return h||(P=[P]),Dl(this,{type:(O?"Multi":"")+"Polygon",coordinates:P})}}),Rl.include({toMultiPoint:function(u){var h=[];return this.eachLayer(function(O){h.push(O.toGeoJSON(u).geometry.coordinates)}),Dl(this,{type:"MultiPoint",coordinates:h})},toGeoJSON:function(u){var h=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(h==="MultiPoint")return this.toMultiPoint(u);var O=h==="GeometryCollection",P=[];return this.eachLayer(function(M){if(M.toGeoJSON){var G=M.toGeoJSON(u);if(O)P.push(G.geometry);else{var re=Vp(G);re.type==="FeatureCollection"?P.push.apply(P,re.features):P.push(re)}}}),O?Dl(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function tT(u,h){return new Oo(u,h)}var M9=tT,Wp=yi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,h,O){this._url=u,this._bounds=te(h),y(this,O)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Qe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Dt(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&&Ml(this._image),this},bringToBack:function(){return this._map&&Ll(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=te(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",h=this._image=u?this._url:ut("img");if(Qe(h,"leaflet-image-layer"),this._zoomAnimated&&Qe(h,"leaflet-zoom-animated"),this.options.className&&Qe(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onload=a(this.fire,this,"load"),h.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(h.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=h.src;return}h.src=this._url,h.alt=this.options.alt},_animateZoom:function(u){var h=this._map.getZoomScale(u.zoom),O=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;vs(this._image,O,h)},_reset:function(){var u=this._image,h=new H(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),O=h.getSize();en(u,h.min),u.style.width=O.x+"px",u.style.height=O.y+"px"},_updateOpacity:function(){Vr(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()}}),L9=function(u,h,O){return new Wp(u,h,O)},nT=Wp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",h=this._image=u?this._url:ut("video");if(Qe(h,"leaflet-image-layer"),this._zoomAnimated&&Qe(h,"leaflet-zoom-animated"),this.options.className&&Qe(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onloadeddata=a(this.fire,this,"load"),u){for(var O=h.getElementsByTagName("source"),P=[],M=0;M0?P:[h.src];return}w(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(h.style,"objectFit")&&(h.style.objectFit="fill"),h.autoplay=!!this.options.autoplay,h.loop=!!this.options.loop,h.muted=!!this.options.muted,h.playsInline=!!this.options.playsInline;for(var G=0;GM?(h.height=M+"px",Qe(u,G)):Yt(u,G),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var h=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),O=this._getAnchor();en(this._container,h.add(O))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,h=parseInt(rf(this._container,"marginBottom"),10)||0,O=this._container.offsetHeight+h,P=this._containerWidth,M=new Z(this._containerLeft,-O-this._containerBottom);M._add(gs(this._container));var G=u.layerPointToContainerPoint(M),re=B(this.options.autoPanPadding),ce=B(this.options.autoPanPaddingTopLeft||re),de=B(this.options.autoPanPaddingBottomRight||re),_e=u.getSize(),Le=0,ze=0;G.x+P+de.x>_e.x&&(Le=G.x+P-_e.x+de.x),G.x-Le-ce.x<0&&(Le=G.x-ce.x),G.y+O+de.y>_e.y&&(ze=G.y+O-_e.y+de.y),G.y-ze-ce.y<0&&(ze=G.y-ce.y),(Le||ze)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Le,ze]))}},_getAnchor:function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),I9=function(u,h){return new Hp(u,h)};st.mergeOptions({closePopupOnClick:!0}),st.include({openPopup:function(u,h,O){return this._initOverlay(Hp,u,h,O).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),yi.include({bindPopup:function(u,h){return this._popup=this._initOverlay(Hp,this._popup,u,h),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof xo||(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)){bs(u);var h=u.layer||u.target;if(this._popup._source===h&&!(h instanceof sa)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=h,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Gp=Ki.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Ki.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){Ki.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=Ki.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",h=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ut("div",h),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var h,O,P=this._map,M=this._container,G=P.latLngToContainerPoint(P.getCenter()),re=P.layerPointToContainerPoint(u),ce=this.options.direction,de=M.offsetWidth,_e=M.offsetHeight,Le=B(this.options.offset),ze=this._getAnchor();ce==="top"?(h=de/2,O=_e):ce==="bottom"?(h=de/2,O=0):ce==="center"?(h=de/2,O=_e/2):ce==="right"?(h=0,O=_e/2):ce==="left"?(h=de,O=_e/2):re.xthis.options.maxZoom||OP?this._retainParent(M,G,re,P):!1)},_retainChildren:function(u,h,O,P){for(var M=2*u;M<2*u+2;M++)for(var G=2*h;G<2*h+2;G++){var re=new Z(M,G);re.z=O+1;var ce=this._tileCoordsToKey(re),de=this._tiles[ce];if(de&&de.active){de.retain=!0;continue}else de&&de.loaded&&(de.retain=!0);O+1this.options.maxZoom||this.options.minZoom!==void 0&&M1){this._setView(u,O);return}for(var ze=M.min.y;ze<=M.max.y;ze++)for(var et=M.min.x;et<=M.max.x;et++){var Vn=new Z(et,ze);if(Vn.z=this._tileZoom,!!this._isValidTile(Vn)){var hn=this._tiles[this._tileCoordsToKey(Vn)];hn?hn.current=!0:re.push(Vn)}}if(re.sort(function(ir,Bl){return ir.distanceTo(G)-Bl.distanceTo(G)}),re.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Hr=document.createDocumentFragment();for(et=0;etO.max.x)||!h.wrapLat&&(u.yO.max.y))return!1}if(!this.options.bounds)return!0;var P=this._tileCoordsToBounds(u);return te(this.options.bounds).overlaps(P)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var h=this._map,O=this.getTileSize(),P=u.scaleBy(O),M=P.add(O),G=h.unproject(P,u.z),re=h.unproject(M,u.z);return[G,re]},_tileCoordsToBounds:function(u){var h=this._tileCoordsToNwSe(u),O=new K(h[0],h[1]);return this.options.noWrap||(O=this._map.wrapLatLngBounds(O)),O},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var h=u.split(":"),O=new Z(+h[0],+h[1]);return O.z=+h[2],O},_removeTile:function(u){var h=this._tiles[u];h&&(Dt(h.el),delete this._tiles[u],this.fire("tileunload",{tile:h.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Qe(u,"leaflet-tile");var h=this.getTileSize();u.style.width=h.x+"px",u.style.height=h.y+"px",u.onselectstart=d,u.onmousemove=d,Fe.ielt9&&this.options.opacity<1&&Vr(u,this.options.opacity)},_addTile:function(u,h){var O=this._getTilePos(u),P=this._tileCoordsToKey(u),M=this.createTile(this._wrapCoords(u),a(this._tileReady,this,u));this._initTile(M),this.createTile.length<2&&I(a(this._tileReady,this,u,null,M)),en(M,O),this._tiles[P]={el:M,coords:u,current:!0},h.appendChild(M),this.fire("tileloadstart",{tile:M,coords:u})},_tileReady:function(u,h,O){h&&this.fire("tileerror",{error:h,tile:O,coords:u});var P=this._tileCoordsToKey(u);O=this._tiles[P],O&&(O.loaded=+new Date,this._map._fadeAnimated?(Vr(O.el,0),F(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(O.active=!0,this._pruneTiles()),h||(Qe(O.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:O.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Fe.ielt9||!this._map._fadeAnimated?I(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var h=new Z(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return h.z=u.z,h},_pxBoundsToTileRange:function(u){var h=this.getTileSize();return new H(u.min.unscaleBy(h).floor(),u.max.unscaleBy(h).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function B9(u){return new df(u)}var Fl=df.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,h){this._url=u,h=y(this,h),h.detectRetina&&Fe.retina&&h.maxZoom>0?(h.tileSize=Math.floor(h.tileSize/2),h.zoomReverse?(h.zoomOffset--,h.minZoom=Math.min(h.maxZoom,h.minZoom+1)):(h.zoomOffset++,h.maxZoom=Math.max(h.minZoom,h.maxZoom-1)),h.minZoom=Math.max(0,h.minZoom)):h.zoomReverse?h.minZoom=Math.min(h.maxZoom,h.minZoom):h.maxZoom=Math.max(h.minZoom,h.maxZoom),typeof h.subdomains=="string"&&(h.subdomains=h.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,h){return this._url===u&&h===void 0&&(h=!0),this._url=u,h||this.redraw(),this},createTile:function(u,h){var O=document.createElement("img");return Ze(O,"load",a(this._tileOnLoad,this,h,O)),Ze(O,"error",a(this._tileOnError,this,h,O)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(O.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(O.referrerPolicy=this.options.referrerPolicy),O.alt="",O.src=this.getTileUrl(u),O},getTileUrl:function(u){var h={r:Fe.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var O=this._globalTileRange.max.y-u.y;this.options.tms&&(h.y=O),h["-y"]=O}return b(this._url,i(h,this.options))},_tileOnLoad:function(u,h){Fe.ielt9?setTimeout(a(u,this,null,h),0):u(null,h)},_tileOnError:function(u,h,O){var P=this.options.errorTileUrl;P&&h.getAttribute("src")!==P&&(h.src=P),u(O,h)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,h=this.options.maxZoom,O=this.options.zoomReverse,P=this.options.zoomOffset;return O&&(u=h-u),u+P},_getSubdomain:function(u){var h=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[h]},_abortLoading:function(){var u,h;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(h=this._tiles[u].el,h.onload=d,h.onerror=d,!h.complete)){h.src=E;var O=this._tiles[u].coords;Dt(h),delete this._tiles[u],this.fire("tileabort",{tile:h,coords:O})}},_removeTile:function(u){var h=this._tiles[u];if(h)return h.el.setAttribute("src",E),df.prototype._removeTile.call(this,u)},_tileReady:function(u,h,O){if(!(!this._map||O&&O.getAttribute("src")===E))return df.prototype._tileReady.call(this,u,h,O)}});function oT(u,h){return new Fl(u,h)}var aT=Fl.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,h){this._url=u;var O=i({},this.defaultWmsParams);for(var P in h)P in this.options||(O[P]=h[P]);h=y(this,h);var M=h.detectRetina&&Fe.retina?2:1,G=this.getTileSize();O.width=G.x*M,O.height=G.y*M,this.wmsParams=O},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var h=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[h]=this._crs.code,Fl.prototype.onAdd.call(this,u)},getTileUrl:function(u){var h=this._tileCoordsToNwSe(u),O=this._crs,P=ee(O.project(h[0]),O.project(h[1])),M=P.min,G=P.max,re=(this._wmsVersion>=1.3&&this._crs===QP?[M.y,M.x,G.y,G.x]:[M.x,M.y,G.x,G.y]).join(","),ce=Fl.prototype.getTileUrl.call(this,u);return ce+x(this.wmsParams,ce,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+re},setParams:function(u,h){return i(this.wmsParams,u),h||this.redraw(),this}});function U9(u,h){return new aT(u,h)}Fl.WMS=aT,oT.wms=U9;var So=yi.extend({options:{padding:.1},initialize:function(u){y(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Qe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,h){var O=this._map.getZoomScale(h,this._zoom),P=this._map.getSize().multiplyBy(.5+this.options.padding),M=this._map.project(this._center,h),G=P.multiplyBy(-O).add(M).subtract(this._map._getNewPixelOrigin(u,h));Fe.any3d?vs(this._container,G,O):en(this._container,G)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,h=this._map.getSize(),O=this._map.containerPointToLayerPoint(h.multiplyBy(-u)).round();this._bounds=new H(O,O.add(h.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sT=So.extend({options:{tolerance:0},getEvents:function(){var u=So.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){So.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Ze(u,"mousemove",this._onMouseMove,this),Ze(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ze(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){F(this._redrawRequest),delete this._ctx,Dt(this._container),bt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var h in this._layers)u=this._layers[h],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){So.prototype._update.call(this);var u=this._bounds,h=this._container,O=u.getSize(),P=Fe.retina?2:1;en(h,u.min),h.width=P*O.x,h.height=P*O.y,h.style.width=O.x+"px",h.style.height=O.y+"px",Fe.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){So.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var h=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=h),this._drawLast=h,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var h=u._order,O=h.next,P=h.prev;O?O.prev=P:this._drawLast=P,P?P.next=O:this._drawFirst=O,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var h=u.options.dashArray.split(/[, ]+/),O=[],P,M;for(M=0;M')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),z9={_initContainer:function(){this._container=ut("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(So.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var h=u._container=hf("shape");Qe(h,"leaflet-vml-shape "+(this.options.className||"")),h.coordsize="1 1",u._path=hf("path"),h.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var h=u._container;this._container.appendChild(h),u.options.interactive&&u.addInteractiveTarget(h)},_removePath:function(u){var h=u._container;Dt(h),u.removeInteractiveTarget(h),delete this._layers[l(u)]},_updateStyle:function(u){var h=u._stroke,O=u._fill,P=u.options,M=u._container;M.stroked=!!P.stroke,M.filled=!!P.fill,P.stroke?(h||(h=u._stroke=hf("stroke")),M.appendChild(h),h.weight=P.weight+"px",h.color=P.color,h.opacity=P.opacity,P.dashArray?h.dashStyle=w(P.dashArray)?P.dashArray.join(" "):P.dashArray.replace(/( *, *)/g," "):h.dashStyle="",h.endcap=P.lineCap.replace("butt","flat"),h.joinstyle=P.lineJoin):h&&(M.removeChild(h),u._stroke=null),P.fill?(O||(O=u._fill=hf("fill")),M.appendChild(O),O.color=P.fillColor||P.color,O.opacity=P.fillOpacity):O&&(M.removeChild(O),u._fill=null)},_updateCircle:function(u){var h=u._point.round(),O=Math.round(u._radius),P=Math.round(u._radiusY||O);this._setPath(u,u._empty()?"M0 0":"AL "+h.x+","+h.y+" "+O+","+P+" 0,"+65535*360)},_setPath:function(u,h){u._path.v=h},_bringToFront:function(u){Ml(u._container)},_bringToBack:function(u){Ll(u._container)}},Kp=Fe.vml?hf:Se,pf=So.extend({_initContainer:function(){this._container=Kp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Kp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Dt(this._container),bt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){So.prototype._update.call(this);var u=this._bounds,h=u.getSize(),O=this._container;(!this._svgSize||!this._svgSize.equals(h))&&(this._svgSize=h,O.setAttribute("width",h.x),O.setAttribute("height",h.y)),en(O,u.min),O.setAttribute("viewBox",[u.min.x,u.min.y,h.x,h.y].join(" ")),this.fire("update")}},_initPath:function(u){var h=u._path=Kp("path");u.options.className&&Qe(h,u.options.className),u.options.interactive&&Qe(h,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){Dt(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var h=u._path,O=u.options;h&&(O.stroke?(h.setAttribute("stroke",O.color),h.setAttribute("stroke-opacity",O.opacity),h.setAttribute("stroke-width",O.weight),h.setAttribute("stroke-linecap",O.lineCap),h.setAttribute("stroke-linejoin",O.lineJoin),O.dashArray?h.setAttribute("stroke-dasharray",O.dashArray):h.removeAttribute("stroke-dasharray"),O.dashOffset?h.setAttribute("stroke-dashoffset",O.dashOffset):h.removeAttribute("stroke-dashoffset")):h.setAttribute("stroke","none"),O.fill?(h.setAttribute("fill",O.fillColor||O.color),h.setAttribute("fill-opacity",O.fillOpacity),h.setAttribute("fill-rule",O.fillRule||"evenodd")):h.setAttribute("fill","none"))},_updatePoly:function(u,h){this._setPath(u,se(u._parts,h))},_updateCircle:function(u){var h=u._point,O=Math.max(Math.round(u._radius),1),P=Math.max(Math.round(u._radiusY),1)||O,M="a"+O+","+P+" 0 1,0 ",G=u._empty()?"M0 0":"M"+(h.x-O)+","+h.y+M+O*2+",0 "+M+-O*2+",0 ";this._setPath(u,G)},_setPath:function(u,h){u._path.setAttribute("d",h)},_bringToFront:function(u){Ml(u._path)},_bringToBack:function(u){Ll(u._path)}});Fe.vml&&pf.include(z9);function cT(u){return Fe.svg||Fe.vml?new pf(u):null}st.include({getRenderer:function(u){var h=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return h||(h=this._renderer=this._createRenderer()),this.hasLayer(h)||this.addLayer(h),h},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var h=this._paneRenderers[u];return h===void 0&&(h=this._createRenderer({pane:u}),this._paneRenderers[u]=h),h},_createRenderer:function(u){return this.options.preferCanvas&&lT(u)||cT(u)}});var uT=Il.extend({initialize:function(u,h){Il.prototype.initialize.call(this,this._boundsToLatLngs(u),h)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=te(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function V9(u,h){return new uT(u,h)}pf.create=Kp,pf.pointsToPath=se,Oo.geometryToLayer=Bp,Oo.coordsToLatLng=Mb,Oo.coordsToLatLngs=Up,Oo.latLngToCoords=Lb,Oo.latLngsToCoords=zp,Oo.getFeature=Dl,Oo.asFeature=Vp,st.mergeOptions({boxZoom:!0});var fT=Gi.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){Ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){bt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Dt(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(),of(),vb(),this._startPoint=this._map.mouseEventToContainerPoint(u),Ze(document,{contextmenu:bs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=ut("div","leaflet-zoom-box",this._container),Qe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var h=new H(this._point,this._startPoint),O=h.getSize();en(this._box,h.min),this._box.style.width=O.x+"px",this._box.style.height=O.y+"px"},_finish:function(){this._moved&&(Dt(this._box),Yt(this._container,"leaflet-crosshair")),af(),gb(),bt(document,{contextmenu:bs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var h=new K(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(h).fire("boxzoomend",{boxZoomBounds:h})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});st.addInitHook("addHandler","boxZoom",fT),st.mergeOptions({doubleClickZoom:!0});var dT=Gi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var h=this._map,O=h.getZoom(),P=h.options.zoomDelta,M=u.originalEvent.shiftKey?O-P:O+P;h.options.doubleClickZoom==="center"?h.setZoom(M):h.setZoomAround(u.containerPoint,M)}});st.addInitHook("addHandler","doubleClickZoom",dT),st.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var hT=Gi.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new aa(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))}Qe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Yt(this._map._container,"leaflet-grab"),Yt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var h=te(this._map.options.maxBounds);this._offsetLimit=ee(this._map.latLngToContainerPoint(h.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(h.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var h=this._lastTime=+new Date,O=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(O),this._times.push(h),this._prunePositions(h)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),h=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=h.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,h){return u-(u-h)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),h=this._offsetLimit;u.xh.max.x&&(u.x=this._viscousLimit(u.x,h.max.x)),u.y>h.max.y&&(u.y=this._viscousLimit(u.y,h.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,h=Math.round(u/2),O=this._initialWorldOffset,P=this._draggable._newPos.x,M=(P-h+O)%u+h-O,G=(P+h+O)%u-h-O,re=Math.abs(M+O)0?G:-G))-h;this._delta=0,this._startTime=null,re&&(u.options.scrollWheelZoom==="center"?u.setZoom(h+re):u.setZoomAround(this._lastMousePos,h+re))}});st.addInitHook("addHandler","scrollWheelZoom",mT);var W9=600;st.mergeOptions({tapHold:Fe.touchNative&&Fe.safari&&Fe.mobile,tapTolerance:15});var vT=Gi.extend({addHooks:function(){Ze(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 h=u.touches[0];this._startPos=this._newPos=new Z(h.clientX,h.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Ze(document,"touchend",Pn),Ze(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",h))},this),W9),Ze(document,"touchend touchcancel contextmenu",this._cancel,this),Ze(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 h=u.touches[0];this._newPos=new Z(h.clientX,h.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,h){var O=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY});O._simulated=!0,h.target.dispatchEvent(O)}});st.addInitHook("addHandler","tapHold",vT),st.mergeOptions({touchZoom:Fe.touch,bounceAtZoomLimits:!0});var gT=Gi.extend({addHooks:function(){Qe(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Yt(this._map._container,"leaflet-touch-zoom"),bt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var h=this._map;if(!(!u.touches||u.touches.length!==2||h._animatingZoom||this._zooming)){var O=h.mouseEventToContainerPoint(u.touches[0]),P=h.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=h.getSize()._divideBy(2),this._startLatLng=h.containerPointToLatLng(this._centerPoint),h.options.touchZoom!=="center"&&(this._pinchStartLatLng=h.containerPointToLatLng(O.add(P)._divideBy(2))),this._startDist=O.distanceTo(P),this._startZoom=h.getZoom(),this._moved=!1,this._zooming=!0,h._stop(),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend touchcancel",this._onTouchEnd,this),Pn(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var h=this._map,O=h.mouseEventToContainerPoint(u.touches[0]),P=h.mouseEventToContainerPoint(u.touches[1]),M=O.distanceTo(P)/this._startDist;if(this._zoom=h.getScaleZoom(M,this._startZoom),!h.options.bounceAtZoomLimits&&(this._zoomh.getMaxZoom()&&M>1)&&(this._zoom=h._limitZoom(this._zoom)),h.options.touchZoom==="center"){if(this._center=this._startLatLng,M===1)return}else{var G=O._add(P)._divideBy(2)._subtract(this._centerPoint);if(M===1&&G.x===0&&G.y===0)return;this._center=h.unproject(h.project(this._pinchStartLatLng,this._zoom).subtract(G),this._zoom)}this._moved||(h._moveStart(!0,!1),this._moved=!0),F(this._animRequest);var re=a(h._move,h,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I(re,this,!0),Pn(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,F(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))}});st.addInitHook("addHandler","touchZoom",gT),st.BoxZoom=fT,st.DoubleClickZoom=dT,st.Drag=hT,st.Keyboard=pT,st.ScrollWheelZoom=mT,st.TapHold=vT,st.TouchZoom=gT,n.Bounds=H,n.Browser=Fe,n.CRS=fe,n.Canvas=sT,n.Circle=Nb,n.CircleMarker=Fp,n.Class=W,n.Control=gi,n.DivIcon=iT,n.DivOverlay=Ki,n.DomEvent=l9,n.DomUtil=a9,n.Draggable=aa,n.Evented=ne,n.FeatureGroup=xo,n.GeoJSON=Oo,n.GridLayer=df,n.Handler=Gi,n.Icon=$l,n.ImageOverlay=Wp,n.LatLng=ie,n.LatLngBounds=K,n.Layer=yi,n.LayerGroup=Rl,n.LineUtil=x9,n.Map=st,n.Marker=Dp,n.Mixin=m9,n.Path=sa,n.Point=Z,n.PolyUtil=v9,n.Polygon=Il,n.Polyline=wo,n.Popup=Hp,n.PosAnimation=BP,n.Projection=w9,n.Rectangle=uT,n.Renderer=So,n.SVG=pf,n.SVGOverlay=rT,n.TileLayer=Fl,n.Tooltip=Gp,n.Transformation=J,n.Util=q,n.VideoOverlay=nT,n.bind=a,n.bounds=ee,n.canvas=lT,n.circle=A9,n.circleMarker=j9,n.control=cf,n.divIcon=F9,n.extend=i,n.featureGroup=C9,n.geoJSON=tT,n.geoJson=M9,n.gridLayer=B9,n.icon=P9,n.imageOverlay=L9,n.latLng=ae,n.latLngBounds=te,n.layerGroup=E9,n.map=c9,n.marker=T9,n.point=B,n.polygon=N9,n.polyline=k9,n.popup=I9,n.rectangle=V9,n.setOptions=y,n.stamp=l,n.svg=cT,n.svgOverlay=$9,n.tileLayer=oT,n.tooltip=D9,n.transformation=Y,n.version=r,n.videoOverlay=R9;var H9=window.L;n.noConflict=function(){return window.L=H9,this},window.L=n})})(LO,LO.exports);var _p=LO.exports;const zL=at(_p);function JC(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function eP(e,t){return t==null?function(r,i){const o=R.useRef();return o.current||(o.current=e(r,i)),o}:function(r,i){const o=R.useRef();o.current||(o.current=e(r,i));const a=R.useRef(r),{instance:s}=o.current;return R.useEffect(function(){a.current!==r&&(t(s,r,a.current),a.current=r)},[s,r,i]),o}}function Vke(e,t){R.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var o;(o=t.layerContainer)==null||o.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function E7(e){return function(n){const r=O7(),i=e(QC(n,r),r);return _7(r.map,n.attribution),S7(i.current,n.eventHandlers),Vke(i.current,r),i}}function Wke(e,t){const n=eP(e,t),r=E7(n);return Fke(r)}function Hke(e,t){const n=eP(e),r=zke(n,t);return Bke(r)}function Gke(e,t){const n=eP(e,t),r=E7(n);return Uke(r)}function Kke(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 RO(){return RO=Object.assign||function(e){for(var t=1;t(v==null?void 0:v.map)??null,[v]);const y=R.useCallback(_=>{if(_!==null&&v===null){const b=new _p.Map(_,f);n!=null&&c!=null?b.setView(n,c):e!=null&&b.fitBounds(e,t),l!=null&&b.whenReady(l),g(Ike(b))}},[]);R.useEffect(()=>()=>{v==null||v.map.remove()},[v]);const x=v?V.createElement(w7,{value:v},r):a??null;return V.createElement("div",RO({},p,{ref:y}),x)}const Yke=R.forwardRef(qke),Zke=Wke(function({position:t,...n},r){const i=new _p.Marker(t,n);return JC(i,Dke(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())}),Xke=Hke(function(t,n){const r=new _p.Popup(t,n.overlayContainer);return JC(r,n)},function(t,n,{position:r},i){R.useEffect(function(){const{instance:a}=t;function s(c){c.popup===a&&(a.update(),i(!0))}function l(c){c.popup===a&&i(!1)}return n.map.on({popupopen:s,popupclose:l}),n.overlayContainer==null?(r!=null&&a.setLatLng(r),a.openOn(n.map)):n.overlayContainer.bindPopup(a),function(){var f;n.map.off({popupopen:s,popupclose:l}),(f=n.overlayContainer)==null||f.unbindPopup(),n.map.removeLayer(a)}},[t,n,i,r])}),Qke=Gke(function({url:t,...n},r){const i=new _p.TileLayer(t,QC(n,r));return JC(i,r)},function(t,n,r){Kke(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)}),Jke={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},C7={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Zt={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Hn={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"},ma={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class be{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=be.getVersionPrecision(t),o=be.getVersionPrecision(n);let a=Math.max(i,o),s=0;const l=be.map([t,n],c=>{const f=a-be.getVersionPrecision(c),d=c+new Array(f+1).join(".0");return be.map(d.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(l[0][a]>l[1][a])return 1;if(l[0][a]===l[1][a]){if(a===s)return 0;a-=1}else if(l[0][a]{r[l]=a[l]})}return t}static getBrowserAlias(t){return Jke[t]}static getBrowserTypeByAlias(t){return C7[t]||""}}const gt=/version\/(\d+(\.?_?\d+)+)/i,eNe=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=be.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=be.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=be.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=be.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=be.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=be.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=be.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=be.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=be.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=be.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=be.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=be.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=be.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=be.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=be.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=be.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=be.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=be.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=be.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=be.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=be.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=be.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=be.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=be.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=be.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=be.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:be.getFirstMatch(i,e),version:be.getSecondMatch(i,e)}}}],tNe=[{test:[/Roku\/DVP/],describe(e){const t=be.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Hn.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=be.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Hn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=be.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=be.getWindowsVersionName(t);return{name:Hn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Hn.iOS},n=be.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=be.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=be.getMacOSVersionName(t),r={name:Hn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=be.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Hn.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=be.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=be.getAndroidVersionName(t),r={name:Hn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=be.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Hn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=be.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||be.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||be.getFirstMatch(/\bbb(\d+)/i,e);return{name:Hn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=be.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Hn.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=be.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Hn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Hn.Linux}}},{test:[/CrOS/],describe(){return{name:Hn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=be.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Hn.PlayStation4,version:t}}}],nNe=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=be.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Zt.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Zt.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Zt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Zt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Zt.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Zt.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Zt.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=be.getFirstMatch(/(ipod|iphone)/i,e);return{type:Zt.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Zt.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Zt.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Zt.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Zt.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Zt.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Zt.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Zt.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Zt.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Zt.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Zt.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Zt.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Zt.tv}}}],rNe=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:ma.Blink};const n=be.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:ma.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:ma.Trident},n=be.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:ma.Presto},n=be.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:ma.Gecko},n=be.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:ma.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:ma.WebKit},n=be.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class VL{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=be.find(eNe,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=be.find(tNe,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=be.find(nNe,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=be.find(rNe,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return be.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(s=>{const l=t[s];typeof l=="string"?(i[s]=l,o+=1):typeof l=="object"&&(n[s]=l,r+=1)}),r>0){const s=Object.keys(n),l=be.find(s,f=>this.isOS(f));if(l){const f=this.satisfies(n[l]);if(f!==void 0)return f}const c=be.find(s,f=>this.isPlatform(f));if(c){const f=this.satisfies(n[c]);if(f!==void 0)return f}}if(o>0){const s=Object.keys(i),l=be.find(s,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=be.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(be.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 */class iNe{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new VL(t,n)}static parse(t){return new VL(t).getResult()}static get BROWSER_MAP(){return C7}static get ENGINE_MAP(){return ma}static get OS_MAP(){return Hn}static get PLATFORMS_MAP(){return Zt}}var oNe=Object.defineProperty,aNe=(e,t,n)=>t in e?oNe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Va=(e,t,n)=>(aNe(e,typeof t!="symbol"?t+"":t,n),n);const sNe=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,a]=Kt(),{domains:s}=n,l=!t,c=R.useCallback(()=>{r(""),a()},[r,a]),f=R.useCallback(()=>{r(""),o()},[r,o]);return R.useEffect(()=>{e()},[e]),i?m.jsxs(r0,{children:[m.jsx(Nn,{value:t??"",placeholder:"Domain",onChange:d=>r(d.target.value)}),m.jsx(qe,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:c,children:m.jsx(je,{icon:zK})}),m.jsx(br,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):m.jsxs(na,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[s.map(({domain:d,isDefault:p})=>m.jsxs(Ne,{active:(t===d||p)&&l,onClick:()=>r(d),children:[d,p&&m.jsx("span",{className:"float-end text-muted",children:"default"})]},d)),m.jsx(Ne,{divider:!0}),m.jsx(Ne,{onClick:f,children:m.jsx("i",{children:"New domain"})})]})},lNe=e=>(e==null?void 0:e.type)===$E.INVALID_ARGUMENT,cNe=e=>(e==null?void 0:e.type)===$E.INVALID_SHORT_URL_DELETION,uNe=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),zr=e=>uNe(e)?e:void 0,vo=({errorData:e,fallbackMessage:t})=>m.jsxs(m.Fragment,{children:[(e==null?void 0:e.detail)??t,lNe(e)&&m.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),xl=({style:e,className:t,...n})=>m.jsx("button",{type:"button",className:Ce("border-0",t),style:{backgroundColor:"inherit",fontWeight:"inherit",color:"inherit",...e},...n}),P7=R.createContext(""),fNe=P7.Provider,ps=()=>R.useContext(P7),T7=R.createContext(void 0),{Provider:tP}=T7,nb=()=>R.useContext(T7),dNe=5,nP=()=>{const[e,t]=R.useState([]),n=R.useMemo(()=>e.length>=dNe,[e.length]),r=R.useCallback(s=>!n&&t(l=>[...l,s]),[n]),i=R.useCallback(s=>!n&&e.every(l=>l.name!==s),[e,n]),o=R.useCallback(s=>t(l=>l.filter(c=>c!==s)),[]),a=R.useCallback(()=>t([]),[]);return{itemsToCompare:e,addItemToCompare:r,removeItemToCompare:o,clearItemsToCompare:a,canAddItemWithName:i}},rP=({className:e,type:t})=>{const n=ps(),r=nb(),i=R.useMemo(()=>r?encodeURIComponent(r.itemsToCompare.map(l=>l.query).join(",")):"",[r]);if(!r||r.itemsToCompare.length===0)return null;const{itemsToCompare:o,clearItemsToCompare:a,removeItemToCompare:s}=r;return m.jsx("div",{className:Ce("top-sticky",e),children:m.jsxs(xt,{bodyClassName:"d-md-flex gap-3 align-items-center",children:[m.jsx("ul",{className:"d-flex flex-wrap gap-1 flex-grow-1 p-0 m-0",children:o.map((l,c)=>{var f;return m.jsxs("li",{className:Ce("badge pe-1",{"bg-secondary":!((f=l.style)!=null&&f.backgroundColor)}),style:l.style,children:[l.name,m.jsx(xl,{"aria-label":`Remove ${l.name}`,className:"fw-bold fs-6",onClick:()=>s(l),children:"×"})]},`${l.name}_${c}`)})}),m.jsxs("div",{className:"d-flex mt-3 mt-md-0",children:[m.jsxs(qe,{outline:!0,color:"primary",className:"flex-grow-1 indivisible",disabled:o.length<2,tag:St,to:`${n}/${t}/compare-visits?${t}=${i}`,children:[m.jsx(je,{icon:Zy,fixedWidth:!0,className:"me-1"}),"Compare (",o.length,"/5) »"]}),m.jsx(qe,{"aria-label":"Close compare",outline:!0,color:"secondary",className:"ms-2 fw-bold",onClick:a,children:"×"})]})]})})},Ed=(e,t,n)=>n==null?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,hNe=(e,t)=>!e.domain&&t===ib?!0:e.domain===t,pNe=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls&&{android:e.deviceLongUrls.android??void 0,ios:e.deviceLongUrls.ios??void 0,desktop:e.deviceLongUrls.desktop??void 0},validateUrl:n}:{longUrl:"",validateUrl:n}},j7=e=>e.replaceAll("/","__"),iP=e=>e.replaceAll("__","/"),oP=({domain:e,shortCode:t})=>`${e??ib}__${j7(t)}`,A7=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===ib?null:t,shortCode:iP(n)}},mNe="yyyy-MM-dd",k7="yyyy-MM-dd HH:mm",Qa=()=>new Date,aP=e=>typeof e!="string",sP=(e,t)=>!e||!aP(e)?e:t?bg(e,t):Woe(e),Ja=e=>sP(e,void 0),Aa=e=>sP(e,mNe),Gh=e=>sP(e,k7),jr=e=>aP(e)?e:Ya(e),xp=(e,t,n)=>{const r=jr(e),i=t&&jr(t),o=n&&jr(n);if(i&&o)try{return Koe(r,{start:i,end:o})}catch{return!1}return i?t2(r,i)||Goe(r,i):o?t2(r,o)||_g(r,o):!0},Ss=(e,t)=>t2(e,t)||_g(e,t),rb="all",N7={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[rb]:void 0},M7=Object.keys(N7),vNe=e=>!e||!e.startDate&&!e.endDate,_y=e=>typeof e=="string"&&M7.includes(e),gNe=M7.filter(e=>e!==rb),WL=e=>e?jr(e):null,L7=(e,t)=>({startDate:WL(e),endDate:WL(t)}),yNe=e=>{if(!(!e||vNe(e)))return e.startDate&&!e.endDate?`Since ${Aa(e.startDate)}`:!e.startDate&&e.endDate?`Until ${Aa(e.endDate)}`:`${Aa(e.startDate)} - ${Aa(e.endDate)}`},R7=e=>{if(!(!e||e===rb))return _y(e)?N7[e]:yNe(e)},ti=e=>vl(xg(Qa(),e)),Ql=e=>({startDate:e,endDate:nu(Qa())}),$7=e=>{var t;return((t=[[()=>e==="today",()=>Ql(vl(Qa()))],[()=>e==="yesterday",()=>({startDate:ti(1),endDate:nu(xg(Qa(),1))})],[()=>e==="last7Days",()=>Ql(ti(7))],[()=>e==="last30Days",()=>Ql(ti(30))],[()=>e==="last90Days",()=>Ql(ti(90))],[()=>e==="last180Days",()=>Ql(ti(180))],[()=>e==="last365Days",()=>Ql(ti(365))]].find(([n])=>n()))==null?void 0:t[1]())??{}},bNe=e=>{var t;const n=jr(e);return((t=[[()=>Ss(vl(Qa()),n),"today"],[()=>Ss(ti(1),n),"yesterday"],[()=>Ss(ti(7),n),"last7Days"],[()=>Ss(ti(30),n),"last30Days"],[()=>Ss(ti(90),n),"last90Days"],[()=>Ss(ti(180),n),"last180Days"],[()=>Ss(ti(365),n),"last365Days"]].find(([r])=>r()))==null?void 0:t[1])??rb},I7=e=>_y(e)?$7(e):e,D7=e=>!!(e&&e.startDate),_Ne=({startDate:e,endDate:t})=>{const n=cp(nu(t??new Date),vl(e))+1,r=xg(vl(e),n),i=xg(nu(e),1);return{startDate:r,endDate:i}},xNe=e=>{if(D7(e))return cp(e.endDate??new Date,e.startDate)},lP=e=>e.type!==void 0,wNe=e=>e.type!==void 0,ONe=e=>{const t=Pie(e,n=>lP(n.visit)?"orphanVisits":"nonOrphanVisits");return{orphanVisits:[],nonOrphanVisits:[],...t}},F7=(e,{shortCode:t,domain:n},{endDate:r,startDate:i}={})=>e.filter(({shortUrl:o,visit:a})=>o&&Ed(o,t,n)&&xp(a.date,i,r)),B7=(e,t,{endDate:n,startDate:r}={})=>e.filter(({shortUrl:i,visit:o})=>i&&hNe(i,t)&&xp(o.date,r,n)),U7=(e,t,{endDate:n,startDate:r}={})=>e.filter(({shortUrl:i,visit:o})=>(i==null?void 0:i.tags.includes(t))&&xp(o.date,r,n)),Mm=(e,t)=>_D(e,n=>n[t]),SNe=e=>{const t=((e==null?void 0:e.startDate)&&Ja(e==null?void 0:e.startDate))??void 0,n=((e==null?void 0:e.endDate)&&Ja(e==null?void 0:e.endDate))??void 0;return{startDate:t,endDate:n}},$O=({filter:e,dateRange:t})=>{const{startDate:n,endDate:r}=SNe(t),i=(e==null?void 0:e.excludeBots)||void 0;return{startDate:n,endDate:r,excludeBots:i}},ENe=e=>D7(e.dateRange),CNe=({dateRange:e,...t})=>({...t,dateRange:_Ne(e)}),un=(e,t)=>bD(e,t,{serializeError:n=>n}),HL=5e3,PNe=2,TNe=4,jNe=({currentPage:e,pagesCount:t})=>e>=t,ANe=(e,t)=>t*100/e,z7=({visitsLoader:e,shouldCancel:t,progressChanged:n,batchSize:r})=>{const i=async(a,s)=>Promise.all(s.map(async l=>e({...a,page:l,itemsPerPage:HL}).then(({data:c})=>c))).then(l=>l.flat()),o=async(a,s,l=0)=>{if(t())return[];const c=await i(a,s[l]);return n(ANe(s.length,l+1)),l{const{pagination:s,data:l}=await e({...a,page:1,itemsPerPage:HL});if(jNe(s))return l;const c=IE(PNe,s.pagesCount+1),f=Mc(c,r);return s.pagesCount-1>r&&n(0),l.concat(await o(a,f))}},wp=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),Op=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=Jn(`${e}/progressChanged`),i=Jn(`${e}/fallbackToInterval`),o=un(e,async(a,{getState:s,dispatch:l})=>{var c;const{params:f,options:d}=a,{visitsLoader:p,lastVisitLoader:v}=t(a),g=xNe(f.dateRange),y=$O(f),x=d.loadPrevInterval&&ENe(f)?$O(CNe(f)):void 0,_=TNe/(x?2:1),b=x?{main:0,prev:0}:{main:0},w=(A,D)=>{b[A]=D;const N=Object.values(b),I=N.reduce((F,q)=>F+q,0);l(r(I/N.length))},S=z7({visitsLoader:p,shouldCancel:()=>n(s),progressChanged:A=>w("main",A),batchSize:_}),[E,C,T]=await Promise.all([S(y),v((c=f.filter)==null?void 0:c.excludeBots),x?S(x).then(A=>A.map(D=>{if(g===void 0)return D;const{date:N,...I}=D,F=DE(jr(N),g);return{...I,date:Ja(F)}})):Promise.resolve(void 0)]);return!E.length&&C&&l(i(bNe(C.date))),{...a,visits:E,prevVisits:T}});return Object.assign(o,{progressChanged:r,fallbackToInterval:i})},Xu=Jn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),Sp=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r,extraReducers:i})=>{const{pending:o,rejected:a,fulfilled:s,progressChanged:l,fallbackToInterval:c}=t,{reducer:f,actions:d}=Qt({name:e,initialState:n,reducers:{cancelGetVisits:v=>({...v,cancelLoad:!0})},extraReducers:v=>{v.addCase(o,()=>({...n,loading:!0})),v.addCase(a,(g,{error:y})=>({...n,errorData:zr(y)??null})),v.addCase(s,(g,{payload:y})=>({...g,...y,loading:!1,progress:null,errorData:null})),v.addCase(l,(g,{payload:y})=>({...g,progress:y})),v.addCase(c,(g,{payload:y})=>({...g,fallbackInterval:y})),v.addCase(Xu,(g,{payload:y})=>{const{visits:x}=g,_=r(g,y.createdVisits).map(({visit:b})=>b);return _.length?{...g,visits:[..._,...x]}:g}),i==null||i(v)}}),{cancelGetVisits:p}=d;return{reducer:f,cancelGetVisits:p}},V7="shlink/domainVisits",ib="DEFAULT",kNe={visits:[],domain:"",loading:!1,cancelLoad:!1,errorData:null,progress:null},NNe=e=>Op({typePrefix:`${V7}/getDomainVisits`,createLoaders:({domain:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,o=s=>r.getDomainVisits(t,s),a=wp(i,s=>r.getDomainVisits(t,s));return{visitsLoader:o,lastVisitLoader:a}},shouldCancel:t=>t().domainVisits.cancelLoad}),MNe=e=>Sp({name:V7,initialState:kNe,asyncThunkCreator:e,filterCreatedVisits:({domain:t,params:n},r)=>B7(r,t,n==null?void 0:n.dateRange)}),lv=({className:e="",placement:t,children:n})=>{const r=ta();return m.jsxs(m.Fragment,{children:[m.jsx("span",{className:e,ref:r,children:m.jsx(je,{icon:QS})}),m.jsx(br,{target:r,placement:t,children:n})]})},W7=e=>t=>{t.preventDefault(),e()},cP=(e,t,n=1)=>IE(n,e+1).map(t),LNe=e=>Array.isArray(e)&&e.length===0||typeof e=="string"&&e===""||typeof e=="object"&&Object.keys(e).length===0,Ds=e=>e!=null&&!LNe(e),a_=e=>e||null,IO=e=>e?"true":"false",s_=e=>e===void 0?void 0:IO(e),l_=({isLast:e,...t})=>m.jsx(iv,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),RNe=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var i,o,a;const[s,l]=R.useState(((i=n.redirects)==null?void 0:i.baseUrlRedirect)??""),[c,f]=R.useState(((o=n.redirects)==null?void 0:o.regular404Redirect)??""),[d,p]=R.useState(((a=n.redirects)==null?void 0:a.invalidShortUrlRedirect)??""),v=W7(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:a_(s),regular404Redirect:a_(c),invalidShortUrlRedirect:a_(d)}}).then(t));return m.jsx(yr,{isOpen:e,toggle:t,centered:!0,children:m.jsxs("form",{name:"domainRedirectsModal",onSubmit:v,children:[m.jsxs(yo,{toggle:t,children:["Edit redirects for ",m.jsx("b",{children:n.domain})]}),m.jsxs(Ii,{children:[m.jsxs(l_,{value:s,onChange:l,children:[m.jsxs(lv,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",m.jsxs("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),m.jsxs(l_,{value:c,onChange:f,children:[m.jsxs(lv,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",m.jsxs("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),m.jsxs(l_,{value:d,isLast:!0,onChange:p,children:[m.jsx(lv,{className:"me-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),m.jsxs(ls,{children:[m.jsx(qe,{color:"link",type:"button",onClick:t,children:"Cancel"}),m.jsx(qe,{color:"primary",children:"Save"})]})]})})},$Ne=({domain:e,editDomainRedirects:t})=>{const[n,r]=Kt(),i=ps(),o=nb();return m.jsxs(o0,{children:[m.jsxs(Ne,{tag:St,to:`${i}/domain/${e.domain}${e.isDefault?`_${ib}`:""}/visits`,children:[m.jsx(je,{icon:XS,fixedWidth:!0})," Visit stats"]}),m.jsxs(Ne,{disabled:!o||!o.canAddItemWithName(e.domain),onClick:()=>o==null?void 0:o.addItemToCompare({name:e.domain,query:e.domain}),children:[m.jsx(je,{icon:Zy,fixedWidth:!0})," Compare visits"]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{onClick:r,children:[m.jsx(je,{fixedWidth:!0,icon:ZS})," Edit redirects"]}),m.jsx(RNe,{domain:e,isOpen:n,toggle:r,editDomainRedirects:t})]})},INe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:o})=>o==null?void 0:o.contains("visits-table"))||document.querySelector(".modal")||r()};return bae({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},DNe=(e,t)=>{const[n,r]=R.useState(t),i=R.useCallback(o=>{const{location:a,history:s}=window,l=yre(a.search);l[e]=o,s.pushState(null,"",`${a.pathname}?${i0(l)}`),r(o)},[e]);return[n,i]},uP=e=>{const t=ku();return R.useMemo(()=>{var n;return((n=t[e])==null?void 0:n.split(",").filter(Boolean))??[]},[e,t])},FNe=()=>{const e=go();return R.useCallback(()=>e(-1),[e])},fP=(e,t)=>{const n=R.useCallback(()=>t(`(max-width: ${e}px)`).matches,[t,e]),[r,i]=R.useState(n());return R.useEffect(()=>{const o=()=>i(n());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[n]),r},BNe=({status:e,matchMedia:t=window.matchMedia})=>{const n=ta(),r=fP(991,t);return e==="validating"?m.jsx(je,{fixedWidth:!0,icon:w6,spin:!0}):m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:n,children:e==="valid"?m.jsx(je,{fixedWidth:!0,icon:Gd,className:"text-muted"}):m.jsx(je,{fixedWidth:!0,icon:px,className:"text-danger"})}),m.jsx(br,{target:n,placement:r?"right":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":m.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",m.jsx("br",{}),"Check the ",m.jsx(pr,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},c_=({fallback:e})=>m.jsxs("span",{className:"text-muted",children:[!e&&m.jsx("small",{children:"No redirect"}),e&&m.jsxs(m.Fragment,{children:[e," ",m.jsx("small",{children:"(as fallback)"})]})]}),UNe=()=>m.jsxs(m.Fragment,{children:[m.jsx(je,{fixedWidth:!0,icon:OK,className:"text-primary",id:"defaultDomainIcon"}),m.jsx(br,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),zNe=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:o,redirects:a,status:s}=e;return R.useEffect(()=>{n(e.domain)},[n,e.domain]),m.jsxs("tr",{className:"responsive-table__row",children:[m.jsx("td",{className:"responsive-table__cell","data-th":"Is default domain",children:o&&m.jsx(UNe,{})}),m.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:i}),m.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??m.jsx(c_,{fallback:r==null?void 0:r.baseUrlRedirect})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??m.jsx(c_,{fallback:r==null?void 0:r.regular404Redirect})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??m.jsx(c_,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),m.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:m.jsx(BNe,{status:s})}),m.jsx("td",{className:"responsive-table__cell text-end",children:m.jsx($Ne,{domain:e,editDomainRedirects:t})})]})},GL=[{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}],VNe=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i})=>{var o;const{filteredDomains:a,defaultRedirects:s,loading:l,error:c,errorData:f}=t,d=s??((o=a.find(({isDefault:v})=>v))==null?void 0:o.redirects),p=nP();return R.useEffect(()=>{e()},[e]),l?m.jsx(Ho,{loading:!0}):m.jsxs(tP,{value:p,children:[m.jsx(ap,{className:"mb-3",onChange:n}),m.jsx(rP,{type:"domains",className:"mb-3"}),c?m.jsx(Qn,{type:"error",children:m.jsx(vo,{errorData:f,fallbackMessage:"Error loading domains :("})}):m.jsx(xt,{children:m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsx("thead",{className:"responsive-table__header",children:m.jsx("tr",{children:GL.map((v,g)=>m.jsx("th",{children:m.jsx("span",{className:v.isHidden?"sr-only":void 0,children:v.value})},g))})}),m.jsxs("tbody",{children:[a.length<1&&m.jsx("tr",{children:m.jsx("td",{colSpan:GL.length,className:"text-center",children:"No results found"})}),a.map(v=>m.jsx(zNe,{domain:v,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:d},v.domain))]})]})})]})},WNe="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",HNe=e=>un(WNe,async({domain:t,redirects:n})=>{const r=await e().editDomainRedirects({domain:t,...n});return{domain:t,redirects:r}}),Lm="shlink/domainsList",Rm={domains:[],filteredDomains:[],loading:!1,error:!1},KL=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},qL=(e,t)=>n=>n.domain!==e?n:{...n,status:t},GNe=(e,t)=>{const n=un(`${Lm}/listDomains`,async()=>{const{data:a,defaultRedirects:s}=await e().listDomains();return{domains:a.map(l=>({...l,status:"validating"})),defaultRedirects:s}}),r=un(`${Lm}/checkDomainHealth`,async a=>{try{const{status:s}=await e().health(a);return{domain:a,status:s==="pass"?"valid":"invalid"}}catch{return{domain:a,status:"invalid"}}}),i=Jn(`${Lm}/filterDomains`),{reducer:o}=Qt({name:Lm,initialState:Rm,reducers:{},extraReducers:a=>{a.addCase(n.pending,()=>({...Rm,loading:!0})),a.addCase(n.rejected,(s,{error:l})=>({...Rm,error:!0,errorData:zr(l)})),a.addCase(n.fulfilled,(s,{payload:l})=>({...Rm,...l,filteredDomains:l.domains})),a.addCase(r.fulfilled,({domains:s,filteredDomains:l,...c},{payload:f})=>({...c,domains:s.map(qL(f.domain,f.status)),filteredDomains:l.map(qL(f.domain,f.status))})),a.addCase(i,(s,{payload:l})=>({...s,filteredDomains:s.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),a.addCase(t.fulfilled,(s,{payload:l})=>({...s,domains:s.domains.map(KL(l)),filteredDomains:s.filteredDomains.map(KL(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},KNe=(e,t)=>{e.serviceFactory("DomainSelector",()=>sNe),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>VNe),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",GNe,"apiClientFactory","editDomainRedirects"),e.serviceFactory("domainsListReducer",n=>n.reducer,"domainsListReducerCreator"),e.serviceFactory("listDomains",n=>n.listDomains,"domainsListReducerCreator"),e.serviceFactory("filterDomains",n=>n.filterDomains,"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",HNe,"apiClientFactory"),e.serviceFactory("checkDomainHealth",n=>n.checkDomainHealth,"domainsListReducerCreator")},YL="shlink/mercure",qNe={loading:!0,error:!1},YNe=e=>{const t=un(`${YL}/loadMercureInfo`,r=>{if(r&&r.realTimeUpdates&&!r.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:n}=Qt({name:YL,initialState:qNe,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}},ZNe=e=>{e.serviceFactory("mercureInfoReducerCreator",YNe,"apiClientFactory"),e.serviceFactory("mercureInfoReducer",t=>t.reducer,"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",t=>t.loadMercureInfo,"mercureInfoReducerCreator")};function Rt(e){return R.useRef(e).current}function $t(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}const XNe=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:a,error:s}=e;if(a||s||!i)return;const l=({data:d})=>n(JSON.parse(d)),c=({status:d})=>d===401&&r(),f=t.map(d=>{const p=new URL(i);p.searchParams.append("topic",d);const v=new _ae.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return v.onmessage=l,v.onerror=c,v});return()=>f.forEach(d=>d.close())};function Ui(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:a}=r,s=ju();return R.useEffect(()=>{const{interval:l}=a,c=v=>l?n.add(v):i([v]),f=t(s),d=XNe(a,f,c,o);if(!l)return d;const p=setInterval(()=>{i([...n]),n.clear()},l*1e3*60);return()=>{clearInterval(p),d==null||d()}},[i,o,a,s]),m.jsx(e,{...r})}}class tr{}Va(tr,"visits","https://shlink.io/new-visit"),Va(tr,"orphanVisits","https://shlink.io/new-orphan-visit"),Va(tr,"shortUrlVisits",e=>`https://shlink.io/new-visit/${e}`);const dP="shlink/shortUrlDeletion",ZL={shortCode:"",loading:!1,deleted:!1,error:!1},QNe=e=>un(`${dP}/deleteShortUrl`,async({shortCode:t,domain:n})=>(await e().deleteShortUrl(t,n),{shortCode:t,domain:n})),H7=Jn(`${dP}/shortUrlDeleted`),JNe=e=>{const{actions:t,reducer:n}=Qt({name:dP,initialState:ZL,reducers:{resetDeleteShortUrl:()=>ZL},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:a})=>({...o,errorData:zr(a),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:a})=>({...o,shortCode:a.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},G7="shlink/shortUrlsList",K7=5,eMe={loading:!0,error:!1},tMe=e=>un(`${G7}/listShortUrls`,t=>e().listShortUrls(t??{})),nMe=(e,t,n)=>Qt({name:G7,initialState:eMe,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,K7-1)],i.shortUrls.pagination.totalItems+=1)}),r.addCase(t.fulfilled,(i,{payload:o})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.map(a=>{const{shortCode:s,domain:l}=o;return Ed(a,s,l)?o:a}))}),r.addCase(H7,(i,{payload:o})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.filter(a=>!Ed(a,o.shortCode,o.domain)),i.shortUrls.pagination.totalItems-=1)}),r.addCase(Xu,(i,{payload:o})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.map(a=>{var s;return((s=o.createdVisits.findLast(({shortUrl:l})=>l&&Ed(a,l.shortCode,l.domain)))==null?void 0:s.shortUrl)??a}))})}}),XL=10,{ceil:rMe}=Math,iMe=new Intl.NumberFormat("en-US"),Gt=e=>iMe.format(Number(e)),oMe=e=>rMe(e/XL)*XL,DO=({children:e,title:t,link:n,tooltip:r})=>{const i=ta();return m.jsxs(m.Fragment,{children:[m.jsxs(mr,{innerRef:i,className:"highlight-card",body:!0,tag:St,to:n,children:[m.jsx(je,{size:"3x",className:"highlight-card__link-icon",icon:Lae}),m.jsx(UI,{className:"lh-sm fw-semibold text-uppercase fs-5 highlight-card__title",children:t}),m.jsx(BI,{className:"fs-2 fw-semibold lh-sm",children:e})]}),r&&m.jsx(br,{target:i,placement:"bottom",children:r})]})},QL=({loading:e,excludeBots:t,visitsSummary:n,...r})=>m.jsx(DO,{tooltip:n.bots!==void 0?m.jsxs(m.Fragment,{children:[t?"Plus":"Including"," ",m.jsx("strong",{children:Gt(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":Gt(t&&n.nonBots?n.nonBots:n.total)}),q7=Ui(({shortUrlsList:e,listShortUrls:t,tagsList:n,loadVisitsOverview:r,visitsOverview:i})=>{const{ShortUrlsTable:o,CreateShortUrl:a}=Rt(q7),{loading:s,shortUrls:l}=e,{loading:c}=n,{loading:f,nonOrphanVisits:d,orphanVisits:p}=i,v=ps(),g=go(),y=_r("visits");return R.useEffect(()=>{t({itemsPerPage:K7,orderBy:{field:"dateCreated",dir:"DESC"}}),r()},[t,r]),m.jsxs(m.Fragment,{children:[m.jsxs(Kn,{children:[m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(QL,{title:"Visits",link:`${v}/non-orphan-visits`,excludeBots:(y==null?void 0:y.excludeBots)??!1,loading:f,visitsSummary:d})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(QL,{title:"Orphan visits",link:`${v}/orphan-visits`,excludeBots:(y==null?void 0:y.excludeBots)??!1,loading:f,visitsSummary:p})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(DO,{title:"Short URLs",link:`${v}/list-short-urls/1`,children:s?"Loading...":Gt((l==null?void 0:l.pagination.totalItems)??0)})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(DO,{title:"Tags",link:`${v}/manage-tags`,children:c?"Loading...":Gt(n.tags.length)})})]}),m.jsxs(mr,{className:"mb-3",children:[m.jsxs(eu,{children:[m.jsx("span",{className:"d-sm-none",children:"Create a short URL"}),m.jsx("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),m.jsx(St,{className:"float-end",to:`${v}/create-short-url`,children:"Advanced options »"})]}),m.jsx(Jc,{children:m.jsx(a,{basicMode:!0})})]}),m.jsxs(mr,{children:[m.jsxs(eu,{children:[m.jsx("span",{className:"d-sm-none",children:"Recently created URLs"}),m.jsx("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),m.jsx(St,{className:"float-end",to:`${v}/list-short-urls/1`,children:"See all »"})]}),m.jsx(Jc,{children:m.jsx(o,{shortUrlsList:e,className:"mb-0",onTagClick:x=>g(`${v}/list-short-urls/1?tags=${encodeURIComponent(x)}`)})})]})]})},()=>[tr.visits,tr.orphanVisits]),aMe=$t(q7,["ShortUrlsTable","CreateShortUrl"]);function sMe(e,t){e.factory("Overview",aMe),e.decorator("Overview",t(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const Y7="shlink/setShortUrlRedirectRules",JL={saving:!1,saved:!1,error:!1},lMe=e=>un(`${Y7}/setShortUrlRedirectRules`,({shortUrl:t,data:n})=>{const{shortCode:r,domain:i}=t;return e().setShortUrlRedirectRules(r,i,n)}),cMe=e=>{const{reducer:t,actions:n}=Qt({name:Y7,initialState:JL,reducers:{resetSetRules:()=>JL},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:a})=>({saving:!1,saved:!1,error:!0,errorData:zr(a)})),i.addCase(e.fulfilled,()=>({saving:!1,error:!1,saved:!0}))}}),{resetSetRules:r}=n;return{reducer:t,resetSetRules:r}},Z7="shlink/getShortUrlRedirectRules",uMe={loading:!0,error:!1},fMe=e=>un(`${Z7}/getShortUrlRedirectRules`,({shortCode:t,domain:n})=>e().getShortUrlRedirectRules(t,n)),dMe=e=>Qt({name:Z7,initialState:uMe,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 hMe(e,t){var n=!1;return function(...r){n||(e.call(null,...r),n=!0,setTimeout(function(){n=!1},t))}}function X7(e){return e.split(" ").filter(t=>t)}var Q7=typeof window<"u";function wl(e,t,n=!1){if(!t)return;const r=X7(t);if(r.length&&!r.includes("longTouch"))for(const i of e){if(!Ep(i)||!co.has(i)){i.classList.add(...r);continue}const o=[],a=co.get(i);if(a){for(const s of r)i.classList.contains(s)?i.classList.contains(s)&&n===!1&&o.push(s):i.classList.add(s);a.privateClasses=o,co.set(i,a)}}}function xy(e,t){if(!t)return;const n=X7(t);if(n.length)for(const r of e){if(!Ep(r)){r.classList.remove(...n);continue}const i=co.get(r);if(i)for(const o of n)i.privateClasses.includes(o)||r.classList.remove(o)}}function J7(e){let t=e.parentNode;for(;t!==null&&t.nodeType===1&&t instanceof HTMLElement;){const n=window.getComputedStyle(t).getPropertyValue("overflow");if(n==="scroll"||n==="auto")return t;t=t.parentNode}return document.documentElement}function pMe(e){if(!(e.e instanceof TouchEvent))return;const t=e.e.touches[0].clientX,n=e.e.touches[0].clientY;let r=document.elementFromPoint(t,n);if(!Ep(r))return;let i,o=!0;for(;r&&o;){if(co.has(r)||Ti.has(r)){o=!1,i=Ti.has(r);break}r=r.parentNode}if(i){const a=Ti.get(r);return a?{parent:{el:r,data:a}}:void 0}else{const a=co.get(r);if(!a)return;const s=Ti.get(r.parentNode);return s?{node:{el:r,data:a},parent:{el:r.parentNode,data:s}}:void 0}}function Ep(e){return e instanceof HTMLElement&&e.parentNode instanceof HTMLElement}function eB(e,t){const n=new AbortController;for(const r in t){const i=t[r];e.addEventListener(r,i,{signal:n.signal,passive:!1})}return n}function tB(e,t,n=!1){const r=window.getComputedStyle(e),i=["position","z-index","top","left","x","pointer-events","y","transform-origin","filter","-webkit-text-fill-color"];for(const o of Array.from(r))n===!1&&o&&i.includes(o)||t.style.setProperty(o,r.getPropertyValue(o),r.getPropertyPriority(o));for(const o of Array.from(e.children)){if(!Ep(o))continue;const a=t.children[Array.from(e.children).indexOf(o)];tB(o,a,n)}}function Al(e){return e instanceof DragEvent?{x:e.clientX,y:e.clientY}:{x:e.touches[0].clientX,y:e.touches[0].clientY}}Array();var e4={up:[0,-1],down:[0,1],left:[-1,0],right:[1,0]},co=new WeakMap,Ti=new WeakMap,Ge=void 0;function mMe(){Ge=void 0}function nB(e){return Ge={ascendingDirection:!1,incomingDirection:void 0,enterCount:0,targetIndex:0,affectedNodes:[],lastValue:void 0,activeNode:void 0,lastTargetValue:void 0,remapJustFinished:!1,preventEnter:!1,clonedDraggedEls:[],swappedNodeValue:!1,originalZIndex:void 0,...e},Ge}function vMe(e,t){return Ge={...e,...t},Ge}function rB(e){const{x:t,y:n}=Al(e.e);return{coordinates:{x:t,y:n},draggedNode:{el:e.targetData.node.el,data:e.targetData.node.data},draggedNodes:[{el:e.targetData.node.el,data:e.targetData.node.data}],initialIndex:e.targetData.node.data.index,initialParent:{el:e.targetData.parent.el,data:e.targetData.parent.data},lastParent:{el:e.targetData.parent.el,data:e.targetData.parent.data},scrollParent:J7(e.targetData.node.el)}}function gMe(e,t){const n=iB(e),r=[...FO(t.targetData.parent.el,t.targetData.parent.data).filter(i=>!n.includes(i))];r.splice(t.targetData.node.data.index,0,...n),e.lastTargetValue=t.targetData.node.data.value,BO(t.targetData.parent.el,t.targetData.parent.data,[...r])}function FO(e,t){return[...t.getValues(e)]}function BO(e,t,n){t.setValues(n,e)}function iB(e){return[...e.draggedNodes.map(t=>t.data.value)]}function yMe({parent:e,getValues:t,setValues:n,config:r={}}){var i,o;if(!Q7)return;document.addEventListener("dragover",s=>{if(s.preventDefault(),Ge){Ge.remapJustFinished=!1,Ge.lastTargetValue=void 0;const{x:l,y:c}=Al(s);Ge.coordinates.y=c,Ge.coordinates.x=l,ob()}}),oB(e);const a={getValues:t,setValues:n,config:{handleDragstart:wMe,handleDragoverNode:qMe,handleDragoverParent:YMe,handleEnd:NMe,handleTouchstart:LMe,handleTouchmove:DMe,handleTouchOverNode:PMe,handleTouchOverParent:ZMe,performSort:gMe,performTransfer:eLe,root:document,setupNode:TMe,setupNodeRemap:lB,reapplyDragClasses:jMe,tearDownNode:kMe,tearDownNodeRemap:AMe,remapFinished:xMe,scrollBehavior:{x:.8,y:.8},threshold:{horizontal:0,vertical:0},...r},enabledNodes:[],abortControllers:{}};bMe(e,a),(i=r.plugins)==null||i.forEach(s=>{var l,c;(c=(l=s(e))==null?void 0:l.tearDown)==null||c.call(l)}),(o=r.plugins)==null||o.forEach(s=>{var l,c;(c=(l=s(e))==null?void 0:l.setup)==null||c.call(l)}),aB(e,!0)}function oB(e){const t=Ti.get(e);t&&t.abortControllers.mainParent&&t.abortControllers.mainParent.abort()}function bMe(e,t){new MutationObserver(_Me).observe(e,{childList:!0}),Ti.set(e,t),t.abortControllers.mainParent=eB(e,{dragover:tLe(hMe(t.config.handleDragoverParent,10)),touchOverParent:t.config.handleTouchOverParent})}function _Me(e){const t=e[0].target;t instanceof HTMLElement&&aB(t)}function aB(e,t){const n=Ti.get(e);if(!n)return;const r=[],i=n.config;for(let s=0;sp.data.value).includes(f.value)){const p=Ge.draggedNodes.find(v=>v.data.value===f.value);p&&(p.el=l)}a.push({el:l,data:f});const d={node:l,parent:e,parentData:n,nodeData:f};(t||!c)&&i.setupNode(d),lB(d)}Ti.set(e,{...n,enabledNodes:a}),i.remapFinished(n)}function xMe(){Ge&&(Ge.preventEnter=!1,Ge.swappedNodeValue=void 0,Ge.remapJustFinished=!0)}function wMe(e){e.e instanceof DragEvent&&CMe({e:e.e,targetData:e.targetData})}function OMe(e,t,n){wl([e],t),setTimeout(()=>{xy([e],t),wl([e],n)})}function SMe(e){const t=nB(rB(e));return e.e.stopPropagation(),e.e.dataTransfer&&(e.e.dataTransfer.dropEffect="move",e.e.dataTransfer.effectAllowed="move",e.e.dataTransfer.setDragImage(e.targetData.node.el,e.e.offsetX,e.e.offsetY)),t}function sB(e){if(!(e.e instanceof DragEvent)&&!(e.e instanceof TouchEvent))return!1;const t=e.targetData.parent.data.config;if(!t.dragHandle)return!0;const n=e.targetData.node.el.querySelectorAll(t.dragHandle);if(!n)return!1;const r=Al(e.e),i=t.root.elementFromPoint(r.x,r.y);if(!i)return!1;for(const o of Array.from(n))if(i===o||o.contains(i))return!0;return!1}function EMe(e){if(!sB(e))return;const t=RMe(e);$Me(e,t),IMe(e,t)}function CMe(e){if(!sB(e)){e.e.preventDefault();return}const t=e.targetData.parent.data.config,n=SMe(e),r=e.targetData.node.el.style.zIndex;n.originalZIndex=r,e.targetData.node.el.style.zIndex="9999",OMe(n.draggedNode.el,t.draggingClass,t.dropZoneClass)}function PMe(e){Ge&&(e.detail.targetData.parent.el===Ge.lastParent.el?fB(e.detail,Ge):ab(e.detail,Ge))}function TMe(e){var t;const n=e.parentData.config;e.node.draggable=!0,e.nodeData.abortControllers.mainNode=eB(e.node,{dragstart:Jl(n.handleDragstart),dragover:Jl(n.handleDragoverNode),dragend:Jl(n.handleEnd),touchstart:Jl(n.handleTouchstart),touchmove:Jl(n.handleTouchmove),touchend:Jl(n.handleEnd),touchOverNode:n.handleTouchOverNode}),n.reapplyDragClasses(e.node,e.parentData),(t=e.parentData.config.plugins)==null||t.forEach(r=>{var i,o;(o=(i=r(e.parent))==null?void 0:i.setupNode)==null||o.call(i,e)})}function lB(e){var t;co.set(e.node,e.nodeData),(t=e.parentData.config.plugins)==null||t.forEach(n=>{var r,i;(i=(r=n(e.parent))==null?void 0:r.setupNodeRemap)==null||i.call(r,e)})}function jMe(e,t){if(!Ge)return;const n="touchedNode"in Ge?t.config.touchDropZoneClass:t.config.dropZoneClass;Ge.draggedNode.el===e&&wl([e],n,!0)}function AMe(e){var t;(t=e.parentData.config.plugins)==null||t.forEach(n=>{var r,i;(i=(r=n(e.parent))==null?void 0:r.tearDownNodeRemap)==null||i.call(r,e)})}function kMe(e){var t,n,r,i,o;(t=e.parentData.config.plugins)==null||t.forEach(a=>{var s,l;(l=(s=a(e.parent))==null?void 0:s.tearDownNode)==null||l.call(s,e)}),e.node.draggable=!1,(r=(n=e.nodeData)==null?void 0:n.abortControllers)!=null&&r.mainNode&&((o=(i=e.nodeData)==null?void 0:i.abortControllers)==null||o.mainNode.abort())}function NMe(e){Ge&&(MMe(e,Ge),mMe())}function MMe(e,t){var n,r,i,o;document.removeEventListener("contextmenu",cB),"longTouchTimeout"in t&&t.longTouchTimeout&&clearTimeout(t.longTouchTimeout);const a=(n=Ti.get(t.initialParent.el))==null?void 0:n.config,s="touchedNode"in t?a==null?void 0:a.touchDropZoneClass:a==null?void 0:a.dropZoneClass;t.originalZIndex!==void 0&&(t.draggedNode.el.style.zIndex=t.originalZIndex),wl(t.draggedNodes.map(l=>l.el),s,!0),xy(t.draggedNodes.map(l=>l.el),s),a!=null&&a.longTouchClass&&xy(t.draggedNodes.map(l=>l.el),(i=(r=t.initialParent.data)==null?void 0:r.config)==null?void 0:i.longTouchClass),"touchedNode"in t&&((o=t.touchedNode)==null||o.remove())}function LMe(e){e.e instanceof TouchEvent&&EMe({e:e.e,targetData:e.targetData})}function RMe(e){e.e.stopPropagation();const t=e.targetData.node.el.cloneNode(!0),n=e.targetData.node.el.getBoundingClientRect();return vMe(nB(rB(e)),{coordinates:{x:e.e.touches[0].clientX,y:e.e.touches[0].clientY},scrollParent:J7(e.targetData.node.el),touchStartLeft:e.e.touches[0].clientX-n.left,touchStartTop:e.e.touches[0].clientY-n.top,touchedNode:t,touchMoving:!1})}function cB(e){e.preventDefault()}function $Me(e,t){t.touchedNodeDisplay=t.touchedNode.style.display;const n=e.targetData.node.el.getBoundingClientRect();t.touchedNode.style.cssText=` width: ${n.width}px; position: fixed; pointer-events: none; top: -9999px; z-index: 999999; display: none; `,document.body.append(t.touchedNode),tB(e.targetData.node.el,t.touchedNode),t.touchedNode.style.display="none",document.addEventListener("contextmenu",cB)}function IMe(e,t){const n=e.targetData.parent.data.config;n.longTouch&&(t.longTouchTimeout=setTimeout(()=>{t&&(t.longTouch=!0,n.longTouchClass&&e.e.cancelable&&wl(t.draggedNodes.map(r=>r.el),n.longTouchClass),e.e.preventDefault())},n.longTouchTimeout||200))}function DMe(e){!Ge||!("touchedNode"in Ge)||KMe(e,Ge)}function FMe(e,t){t.longTouchClass&&xy(e.draggedNodes.map(n=>n.el),t==null?void 0:t.longTouchClass),t.touchDraggingClass&&wl([e.touchedNode],t.touchDraggingClass),t.touchDropZoneClass&&wl(e.draggedNodes.map(n=>n.el),t.touchDropZoneClass)}function BMe(e){if(!e||!e.scrollParent)return;const{x:t,y:n,width:r,height:i}=e.scrollParent.getBoundingClientRect(),{x:o,y:a,scrollOutside:s}=e.lastParent.data.config.scrollBehavior;return{state:e,xThresh:o,yThresh:a,scrollOutside:s,scrollParent:e.scrollParent,x:t,y:n,width:r,height:i}}function UMe(e){const t=BMe(Ge);if(t)switch(e){case"down":return HMe(t.state,t);case"up":return WMe(t.state,t);case"right":return zMe(t.state,t);case"left":return VMe(t.state,t)}}function zMe(e,t){const n=t.scrollParent.clientWidth+t.x-e.coordinates.x;if(!(!t.scrollOutside&&n<0)&&n<(1-t.xThresh)*t.scrollParent.clientWidth&&!(t.scrollParent.scrollLeft+t.scrollParent.clientWidth>=t.scrollParent.scrollWidth))return e}function VMe(e,t){const n=t.scrollParent.clientWidth+t.x-e.coordinates.x;if(!(!t.scrollOutside&&n>t.scrollParent.clientWidth)&&n>t.xThresh*t.scrollParent.clientWidth&&t.scrollParent.scrollLeft!==0)return e}function WMe(e,t){const n=t.scrollParent.clientHeight+t.y-e.coordinates.y;if(!(!t.scrollOutside&&n>t.scrollParent.clientHeight)&&n>t.yThresh*t.scrollParent.clientHeight&&t.scrollParent.scrollTop!==0)return e}function HMe(e,t){const n=t.scrollParent.clientHeight+t.y-e.coordinates.y;if(!(!t.scrollOutside&&n<0)&&n<(1-t.yThresh)*t.scrollParent.clientHeight&&!(t.scrollParent.scrollTop+t.scrollParent.clientHeight>=t.scrollParent.scrollHeight))return e}function GMe(e,t){t.touchMoving=!0,t.touchedNode.style.display=t.touchedNodeDisplay||"";const{x:n,y:r}=Al(e.e);t.coordinates.y=r,t.coordinates.x=n;const i=t.touchStartLeft??0,o=t.touchStartTop??0;t.touchedNode.style.left=`${n-i}px`,t.touchedNode.style.top=`${r-o}px`,FMe(t,e.targetData.parent.data.config)}function KMe(e,t){if(e.targetData.parent.data.config.longTouch&&!t.longTouch){clearTimeout(t.longTouchTimeout);return}e.e.cancelable&&e.e.preventDefault(),GMe(e,t),ob();const n=pMe(e);if(!n)return;const r={e:e.e,targetData:n};"node"in n?n.node.el.dispatchEvent(new CustomEvent("touchOverNode",{detail:r})):n.parent.el.dispatchEvent(new CustomEvent("touchOverParent",{detail:r}))}function ob(){for(const e of Object.keys(e4)){const[t,n]=e4[e];uB(e,t,n)}}function uB(e,t,n){const r=UMe(e);r&&(r.scrollParent.scrollBy(t,n),setTimeout(()=>{uB(e,t,n)},"touchedNode"in r?10:100))}function qMe(e){if(!Ge)return;const{x:t,y:n}=Al(e.e);Ge.coordinates.y=n,Ge.coordinates.x=t,ob(),QMe(e,Ge)}function YMe(e){if(!Ge)return;const{x:t,y:n}=Al(e.e);Ge.coordinates.y=n,Ge.coordinates.x=t,ob(),ab(e,Ge)}function ZMe(e){Ge&&ab(e.detail,Ge)}function XMe(e,t){if(e.targetData.parent.el===t.lastParent.el)return!1;const n=e.targetData.parent.data.config;if(n.dropZone===!1)return!1;const r=t.initialParent.data.config;return n.accepts?n.accepts(e.targetData.parent,t.initialParent,t.lastParent,t):!(!n.group||n.group!==r.group)}function QMe(e,t){var n;e.e.preventDefault(),e.e.stopPropagation(),e.targetData.parent.el===((n=t.lastParent)==null?void 0:n.el)?fB(e,t):ab(e,t)}function JMe(e,t,n,r){var i;if(t.remapJustFinished)return t.remapJustFinished=!1,t.lastTargetValue=e.targetData.node.data.value,!1;if(t.lastTargetValue===e.targetData.node.data.value||t.draggedNodes.map(p=>p.el).includes(e.targetData.node.el)||t.preventEnter||t.swappedNodeValue===e.targetData.node.data.value||e.targetData.parent.el!==((i=t.lastParent)==null?void 0:i.el)||e.targetData.parent.data.config.sortable===!1)return!1;const o=e.targetData.node.el.getBoundingClientRect(),a=t.draggedNode.el.getBoundingClientRect(),s=o.y-a.y,l=o.x-a.x;let c;const f=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(p=>f[0]<=p.data.index&&p.data.index<=f[1]&&p.el!==t.draggedNode.el),Math.abs(s)>Math.abs(l)?c=s>0?"above":"below":c=l>0?"left":"right";const d=t.lastParent.data.config.threshold;switch(c){case"left":if(n>o.x+o.width*d.horizontal)return t.incomingDirection="left",!0;break;case"right":if(no.y+o.height*d.vertical)return t.incomingDirection="above",!0;break;case"below":if(r{const r=t(n.currentTarget);if(r)return e({e:n,targetData:r})}}function eLe(e,t){const n=iB(e),r=FO(e.lastParent.el,e.lastParent.data).filter(s=>!n.includes(s)),i=FO(t.targetData.parent.el,t.targetData.parent.data),o=e.initialParent.el===t.targetData.parent.el&&t.targetData.parent.data.config.sortable===!1;let a;"node"in t.targetData?(o?a=e.initialIndex:t.targetData.parent.data.config.sortable===!1?a=t.targetData.parent.data.enabledNodes.length:a=t.targetData.node.data.index,i.splice(a,0,...n)):(a=o?e.initialIndex:t.targetData.parent.data.enabledNodes.length,i.splice(a,0,...n)),BO(e.lastParent.el,e.lastParent.data,r),BO(t.targetData.parent.el,t.targetData.parent.data,i)}function ab(e,t){XMe(e,t)&&(e.targetData.parent.data.config.performTransfer(t,e),t.lastParent=e.targetData.parent)}function tLe(e){function t(n){const r=Ti.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})}}function nLe(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 rLe(e,t){const n=nLe(e);n&&t(n)}var wy=new WeakMap;function iLe(e){const t=wy.get(e);return t?t[0]:(console.warn("No values found for parent element"),[])}function oLe(e,t){const n=wy.get(t);n&&n[1](e),wy.set(t,[e,n[1]])}function aLe(e,t){return n=>{wy.set(n,t),yMe({parent:n,getValues:iLe,setValues:oLe,config:e})}}function t4(e){Q7&&(Array.isArray(e)||(e=[e]),e.forEach(t=>{const{parent:n,state:r,...i}=t;rLe(n,aLe(i,r))}))}function sLe(e,t={}){const n=R.useRef(null),[r,i]=R.useState(e);function o(a={}){t4({parent:n,state:[r,i],...a})}return R.useEffect(()=>{t4({parent:n,state:[r,i],...t})},[r]),R.useEffect(()=>()=>{n.current&&oB(n.current)},[]),[n,r,i,o]}const sb=()=>{const e=go(),t=ps(),n=ku(),r=R.useMemo(()=>{const{orderBy:o,tags:a,excludeBots:s,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f}=n,d=o?xre(o):void 0,p=(a==null?void 0:a.split(","))??[];return{...f,orderBy:d,tags:p,excludeBots:s!==void 0?s==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}},[n]),i=R.useCallback(o=>{const a={...r,...o},{orderBy:s,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:d,...p}=a,v={...p,orderBy:s&&_re(s),tags:l.length>0?l.join(","):void 0,excludeBots:s_(c),excludeMaxVisitsReached:s_(f),excludePastValidUntil:s_(d)},g=i0(v),y=g?`?${g}`:"";e(`${t}/list-short-urls/1${y}`)},[r,e,t]);return[r,i]},hP=()=>{const{domain:e}=ku(),{shortCode:t=""}=ju();return R.useMemo(()=>({shortCode:iP(t),domain:e}),[e,t])},lb=()=>{const e=FNe();return m.jsx(qe,{color:"link",size:"lg",className:"p-0 me-3",onClick:e,"aria-label":"Go back",children:m.jsx(je,{icon:$K})})},lLe={android:"Android",ios:"iOS",desktop:"Desktop"},cLe=({deviceType:e,onDeviceTypeChange:t})=>{const n=R.useId();return m.jsxs("div",{children:[m.jsx("label",{htmlFor:n,children:"Device type:"}),m.jsxs("select",{id:n,className:"form-select",value:e,onChange:r=>t(r.target.value),required:!0,children:[!e&&m.jsx("option",{value:"",children:"- Select type -"}),Object.entries(lLe).map(([r,i])=>m.jsx("option",{value:r,children:i},r))]})]})},uLe=({language:e,onLanguageChange:t})=>{const n=R.useId();return m.jsxs("div",{children:[m.jsx("label",{htmlFor:n,children:"Language:"}),m.jsx(Nn,{id:n,value:e??"",onChange:r=>t(r.target.value),placeholder:"en-US / en",required:!0})]})},fLe=({name:e,value:t,onNameChange:n,onValueChange:r})=>{const i=R.useId(),o=R.useId();return m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("label",{htmlFor:i,children:"Param name:"}),m.jsx(Nn,{id:i,value:e??"",onChange:a=>n(a.target.value),placeholder:"hello",required:!0})]}),m.jsxs("div",{children:[m.jsx("label",{htmlFor:o,children:"Param value:"}),m.jsx(Nn,{id:o,value:t??"",onChange:a=>r(a.target.value),placeholder:"world",required:!0})]})]})},dLe={device:"Device type",language:"Language","query-param":"Query param"},hLe=({condition:e,onConditionChange:t,onDelete:n})=>{const r=R.useId(),i=R.useCallback(s=>t({type:s,matchValue:"",matchKey:null}),[t]),o=R.useCallback(s=>t({...e,matchValue:s}),[e,t]),a=R.useCallback(s=>t({...e,matchKey:s}),[e,t]);return m.jsxs("div",{className:"redirect-rule-modal__condition rounded p-3 h-100 d-flex flex-column gap-2",children:[m.jsxs("div",{children:[m.jsx("label",{htmlFor:r,children:"Type:"}),m.jsxs("div",{className:"d-flex gap-2",children:[m.jsx("select",{id:r,className:"form-select flex-grow-1",value:e.type,onChange:s=>i(s.target.value),children:Object.entries(dLe).map(([s,l])=>m.jsx("option",{value:s,children:l},s))}),m.jsx(qe,{outline:!0,color:"danger",type:"button","aria-label":"Delete condition",onClick:n,children:m.jsx(je,{icon:_6})})]})]}),e.type==="device"&&m.jsx(cLe,{deviceType:e.matchValue,onDeviceTypeChange:o}),e.type==="language"&&m.jsx(uLe,{language:e.matchValue,onLanguageChange:o}),e.type==="query-param"&&m.jsx(fLe,{value:e.matchValue,name:e.matchKey??"",onNameChange:a,onValueChange:o})]})},dB=({isOpen:e,toggle:t,onSave:n,initialData:r})=>{const[i,o]=R.useState(r??{longUrl:"",conditions:[]}),a=R.useCallback(v=>{v.preventDefault(),v.stopPropagation(),i&&n(i),t()},[n,i,t]),s=R.useCallback(()=>o(({longUrl:v,conditions:g})=>({longUrl:v,conditions:[...g,{type:"device",matchValue:"",matchKey:null}]})),[]),l=R.useCallback((v,g)=>o(({longUrl:y,conditions:x})=>{const _=[...x];return _[v]=g,{longUrl:y,conditions:_}}),[]),c=R.useCallback(v=>o(({longUrl:g,conditions:y})=>{const x=[...y];return x.splice(v,1),{longUrl:g,conditions:x}}),[]),f=ta(),d=R.useCallback(()=>{var v;return(v=f==null?void 0:f.current)==null?void 0:v.focus()},[f]),p=R.useCallback(()=>o(r??{longUrl:"",conditions:[]}),[r]);return m.jsx(yr,{size:"xl",isOpen:e,toggle:t,centered:!0,onOpened:d,onClosed:p,children:m.jsxs("form",{onSubmit:a,children:[m.jsx(yo,{toggle:t,className:"sticky-top redirect-rule-modal__header",children:"Redirect rule"}),m.jsxs(Ii,{children:[m.jsx("label",{htmlFor:"longUrl",className:"fw-bold",children:"Long URL:"}),m.jsx(Nn,{id:"longUrl",type:"url",placeholder:"https://www.example.com",value:i.longUrl,onChange:v=>o(g=>({...g,longUrl:v.target.value})),required:!0,innerRef:f}),m.jsx("hr",{}),m.jsxs("div",{className:"d-flex justify-content-between",children:[m.jsx("b",{children:"Conditions:"}),m.jsx(qe,{outline:!0,size:"sm",type:"button","aria-label":"Add condition",onClick:s,children:m.jsx(je,{icon:ep})})]}),i.conditions.length===0&&m.jsx("div",{className:"text-center",children:m.jsx("i",{children:"Add conditions..."})}),i.conditions.length>0&&m.jsx(Kn,{children:i.conditions.map((v,g)=>m.jsx("div",{className:"col-lg-6 col-xl-4 mt-3",children:m.jsx(hLe,{condition:v,onConditionChange:y=>l(g,y),onDelete:()=>c(g)})},`${g}_${v.type}`))})]}),m.jsxs(ls,{className:"sticky-bottom redirect-rule-modal__footer",children:[m.jsx(qe,{type:"button",color:"link",onClick:t,children:"Cancel"}),m.jsx(qe,{color:"primary",disabled:i.conditions.length===0,children:"Confirm"})]})]})})},pLe=({priority:e,isLast:t,redirectRule:n,onDelete:r,onMoveUp:i,onMoveDown:o,onUpdate:a})=>{const[s,l]=Kt();return m.jsxs(xt,{children:[m.jsxs("div",{className:"d-flex align-content-center gap-3",children:[m.jsx("div",{className:"d-flex flex-column my-auto drag-n-drop-handler d-none d-md-block",style:{cursor:"grab"},children:m.jsx(je,{icon:VK})}),m.jsxs("div",{className:"d-flex flex-column my-auto",children:[m.jsx(qe,{outline:!0,color:"secondary",size:"sm","aria-label":`Move rule with priority ${e} up`,disabled:e===1,onClick:i,className:"rounded-0 rounded-top",style:{marginBottom:"-1px"},children:m.jsx(je,{icon:iq})}),m.jsx(qe,{outline:!0,color:"secondary",size:"sm","aria-label":`Move rule with priority ${e} down`,disabled:t,onClick:o,className:"rounded-0 rounded-bottom",children:m.jsx(je,{icon:JK})})]}),m.jsxs("div",{className:"flex-grow-1",children:[m.jsxs("div",{className:"mb-2",children:[m.jsx("b",{children:"Long URL:"})," ",m.jsx(pr,{href:n.longUrl,"data-testid":"rule-long-url"})]}),m.jsxs("div",{className:"d-flex flex-column flex-lg-row gap-2",children:[m.jsx("b",{children:"Conditions:"}),n.conditions.map((c,f)=>m.jsxs("div",{className:"badge bg-secondary",children:[c.type==="device"&&m.jsxs(m.Fragment,{children:["Device is ",c.matchValue]}),c.type==="language"&&m.jsxs(m.Fragment,{children:[c.matchValue," language is accepted"]}),c.type==="query-param"&&m.jsxs(m.Fragment,{children:["Query string contains ",c.matchKey,"=",c.matchValue]})]},`${c.type}_${f}`))]})]}),m.jsxs("div",{className:"d-flex flex-column flex-sm-row gap-1 my-auto",children:[m.jsx(qe,{outline:!0,color:"secondary",size:"sm","aria-label":`Edit rule with priority ${e}`,onClick:l,children:m.jsx(je,{icon:x6})}),m.jsx(qe,{outline:!0,color:"danger",size:"sm","aria-label":`Delete rule with priority ${e}`,onClick:r,children:m.jsx(je,{icon:_6})})]})]}),m.jsx(dB,{onSave:a,isOpen:s,toggle:l,initialData:n})]})},mLe=({shortUrlRedirectRules:e,getShortUrlRedirectRules:t,getShortUrlsDetails:n,shortUrlsDetails:r,setShortUrlRedirectRules:i,shortUrlRedirectRulesSaving:o,resetSetRules:a})=>{const s=hP(),{shortUrls:l}=r,c=s&&(l==null?void 0:l.get(s)),[f,d,p]=sLe([],{dragHandle:".drag-n-drop-handler",dropZoneClass:"opacity-25"}),{saving:v,saved:g,errorData:y}=o,[x,_]=Kt(),b=R.useCallback(D=>p((N=[])=>[...N,D]),[p]),w=R.useCallback(D=>p((N=[])=>{const I=[...N];return I.splice(D,1),I}),[p]),S=R.useCallback((D,N)=>p((I=[])=>{const F=[...I];return F[D]=N,F}),[p]),E=R.useCallback((D,N)=>p((I=[])=>{if(!I[N])return I;const F=[...I],q=F[N];return F[N]=F[D],F[D]=q,F}),[p]),C=R.useCallback(D=>E(D,D-1),[E]),T=R.useCallback(D=>E(D,D+1),[E]),A=R.useCallback(D=>{D.preventDefault(),d&&i({shortUrl:s,data:{redirectRules:d}})},[s,d,i]);return R.useEffect(()=>(t(s),n([s]),a),[t,n,s,a]),R.useEffect(()=>{e.redirectRules&&p(e.redirectRules)},[p,e.redirectRules]),m.jsxs("div",{className:"d-flex flex-column gap-3",children:[m.jsx("header",{children:m.jsxs(mr,{body:!0,children:[m.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[m.jsx(lb,{}),m.jsxs("div",{className:"text-center flex-grow-1",children:[r.loading&&m.jsx(m.Fragment,{children:"Loading..."}),!r.loading&&m.jsxs("small",{children:["Redirect rules for ",m.jsx(pr,{href:(c==null?void 0:c.shortUrl)??""})]})]})]}),m.jsx("hr",{}),m.jsxs("div",{children:[m.jsx("p",{className:"mb-2",children:"Configure dynamic conditions that will be checked at runtime."}),"If no conditions match, visitors will be redirected to: ",m.jsx(pr,{href:e.defaultLongUrl??""})]})]})}),m.jsx("div",{children:m.jsxs(qe,{outline:!0,color:"primary",onClick:_,children:[m.jsx(je,{icon:ep,className:"me-1"})," Add rule"]})}),m.jsxs("form",{onSubmit:A,children:[e.loading&&m.jsx(Ho,{loading:!0}),d.length===0&&!e.loading&&m.jsx(xt,{className:"text-center",children:m.jsx("i",{children:"This short URL has no dynamic redirect rules"})}),m.jsx("div",{className:"d-flex flex-column gap-2",ref:f,children:d.map((D,N)=>m.jsx(pLe,{redirectRule:D,priority:N+1,isLast:N===d.length-1,onDelete:()=>w(N),onMoveUp:()=>C(N),onMoveDown:()=>T(N),onUpdate:I=>S(N,I)},`${D.longUrl}_${N}`))}),m.jsx("div",{className:"text-center mt-3",children:m.jsx(qe,{outline:!0,color:"primary",className:"btn-sm-block",disabled:v,"data-testid":"save-button",children:v?"Saving...":"Save rules"})})]}),y&&m.jsx(Qn,{type:"error",children:m.jsx(vo,{errorData:y,fallbackMessage:"An error occurred while saving short URL redirect rules :("})}),g&&m.jsx(Qn,{type:"success",children:"Redirect rules properly saved."}),m.jsx(dB,{isOpen:x,toggle:_,onSave:b})]})},vLe=(e,t)=>{e.serviceFactory("ShortUrlRedirectRules",()=>mLe),e.decorator("ShortUrlRedirectRules",t(["shortUrlRedirectRules","shortUrlsDetails","shortUrlRedirectRulesSaving"],["getShortUrlRedirectRules","getShortUrlsDetails","setShortUrlRedirectRules","resetSetRules"])),e.serviceFactory("getShortUrlRedirectRules",fMe,"apiClientFactory"),e.serviceFactory("setShortUrlRedirectRules",lMe,"apiClientFactory"),e.serviceFactory("resetSetRules",n=>n.resetSetRules,"setShortUrlRedirectRulesReducerCreator"),e.serviceFactory("shortUrlRedirectRulesReducerCreator",dMe,"getShortUrlRedirectRules"),e.serviceFactory("shortUrlRedirectRulesReducer",n=>n.reducer,"shortUrlRedirectRulesReducerCreator"),e.serviceFactory("setShortUrlRedirectRulesReducerCreator",cMe,"setShortUrlRedirectRules"),e.serviceFactory("setShortUrlRedirectRulesReducer",n=>n.reducer,"setShortUrlRedirectRulesReducerCreator")},gLe=e=>({longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:(e==null?void 0:e.validateUrls)??!1,forwardQuery:(e==null?void 0:e.forwardQuery)??!0}),hB=({createShortUrl:e,shortUrlCreation:t,resetCreateShortUrl:n,basicMode:r=!1})=>{const{ShortUrlForm:i,CreateShortUrlResult:o}=Rt(hB),a=_r("shortUrlCreation"),s=R.useMemo(()=>gLe(a),[a]);return m.jsxs(m.Fragment,{children:[m.jsx(i,{initialState:s,saving:t.saving,basicMode:r,onSave:async l=>(n(),e(l))}),m.jsx(o,{creation:t,resetCreateShortUrl:n,canBeClosed:r})]})},yLe=$t(hB,["ShortUrlForm","CreateShortUrlResult"]),pB=({shortUrlsDetails:e,getShortUrlsDetails:t,shortUrlEdition:n,editShortUrl:r})=>{const{ShortUrlForm:i}=Rt(pB),o=hP(),{loading:a,error:s,errorData:l,shortUrls:c}=e,f=o&&(c==null?void 0:c.get(o)),{saving:d,saved:p,error:v,errorData:g}=n,y=_r("shortUrlCreation"),x=R.useMemo(()=>pNe(f,y),[f,y]);return R.useEffect(()=>{o&&t([o])},[t,o]),a?m.jsx(Ho,{loading:!0}):s?m.jsx(Qn,{type:"error",children:m.jsx(vo,{errorData:l,fallbackMessage:"An error occurred while loading short URL detail :("})}):m.jsxs(m.Fragment,{children:[m.jsx("header",{className:"mb-3",children:m.jsx(mr,{body:!0,children:m.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[m.jsx(lb,{}),m.jsx("div",{className:"text-center flex-grow-1",children:m.jsxs("small",{children:["Edit ",m.jsx(pr,{href:(f==null?void 0:f.shortUrl)??""})]})})]})})}),m.jsx(i,{initialState:x,saving:d,onSave:async _=>{f&&r({...f,data:_})}}),p&&v&&m.jsx(Qn,{type:"error",className:"mt-3",children:m.jsx(vo,{errorData:g,fallbackMessage:"An error occurred while updating short URL :("})}),p&&!v&&m.jsx(Qn,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})},bLe=$t(pB,["ShortUrlForm"]),mB=({text:e,onCopy:t},n=navigator)=>{var r;return(r=n.clipboard)==null?void 0:r.writeText(e).then(()=>t==null?void 0:t(e,!0)).catch(()=>t==null?void 0:t(e,!1))},vB=({creation:e,resetCreateShortUrl:t,canBeClosed:n=!1})=>{const{useTimeoutToggle:r}=Rt(vB),[i,o]=r(),{error:a,saved:s}=e;if(R.useEffect(()=>{t()},[t]),a)return m.jsxs(Qn,{type:"error",className:"mt-3",children:[n&&m.jsx(je,{"data-testid":"error-close-button",icon:px,className:"float-end pointer",onClick:t}),m.jsx(vo,{errorData:e.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!s)return null;const{shortUrl:l}=e.result;return m.jsxs(Qn,{type:"success",className:"mt-3",children:[n&&m.jsx(je,{"data-testid":"success-close-button",icon:px,className:"float-end pointer",onClick:t}),m.jsxs("span",{children:[m.jsx("b",{children:"Great!"})," The short URL is ",m.jsx("b",{children:l})]}),m.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",onClick:()=>mB({text:l,onCopy:o}),children:[m.jsx(je,{icon:$D})," Copy ",m.jsxs("span",{className:"sr-only",children:[l," to clipboard"]})]}),m.jsx(n0,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},_Le=$t(vB,["useTimeoutToggle"]),u_="delete",xLe=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:a})=>{const[s,l]=R.useState("");R.useEffect(()=>i,[i]);const{loading:c,error:f,deleted:d,errorData:p}=r,v=R.useCallback(()=>{i(),t()},[i,t]),g=R.useCallback(y=>(y.preventDefault(),o(e).then(t)),[o,e,t]);return m.jsx(yr,{isOpen:n,toggle:v,centered:!0,onClosed:()=>d&&a(e),children:m.jsxs("form",{onSubmit:g,children:[m.jsx(yo,{toggle:v,children:m.jsx("span",{className:"text-danger",children:"Delete short URL"})}),m.jsxs(Ii,{children:[m.jsxs("p",{children:[m.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),m.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),m.jsxs("p",{children:["Write ",m.jsx("b",{children:u_})," to confirm deletion."]}),m.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${u_}`,value:s,onChange:y=>l(y.target.value)}),f&&m.jsx(Qn,{type:cNe(p)?"warning":"error",small:!0,className:"mt-2",children:m.jsx(vo,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),m.jsxs(ls,{children:[m.jsx("button",{type:"button",className:"btn btn-link",onClick:v,children:"Cancel"}),m.jsx("button",{type:"submit",className:"btn btn-danger",disabled:s!==u_||c,children:c?"Deleting...":"Delete"})]})]})})},gB=({amount:e=0,loading:t=!1,...n})=>m.jsxs(qe,{...n,outline:!0,color:"primary",disabled:t,children:[m.jsx(je,{icon:bK})," ",t?"Exporting...":m.jsxs(m.Fragment,{children:["Export (",Gt(e),")"]})]}),n4=20,yB=({amount:e=0})=>{const{apiClientFactory:t,ReportExporter:n}=Rt(yB),[{tags:r,search:i,startDate:o,endDate:a,orderBy:s,tagsMode:l}]=sb(),[c,,f,d]=Kt(),p=R.useCallback(async()=>{const v=e/n4,g=async(x=1)=>{const{data:_}=await t().listShortUrls({page:`${x}`,tags:r,searchTerm:i,startDate:o,endDate:a,orderBy:s,tagsMode:l,itemsPerPage:n4});return x>=v?_:_.concat(await g(x+1))};f();const y=await g();n.exportShortUrls(y.map(x=>{var _;const{hostname:b,pathname:w}=new URL(x.shortUrl),S=w.substring(1);return{createdAt:x.dateCreated,domain:b,shortCode:S,shortUrl:x.shortUrl,longUrl:x.longUrl,title:x.title??"",tags:x.tags.join("|"),visits:((_=x==null?void 0:x.visitsSummary)==null?void 0:_.total)??x.visitsCount??0}})),d()},[e,t,a,s,n,i,o,f,d,r,l]);return m.jsx(gB,{loading:c,className:"btn-md-block",amount:e,onClick:p})},wLe=$t(yB,["apiClientFactory","ReportExporter"]),bB=({text:e,onCopy:t,copyToClipboard:n=mB})=>m.jsx(xl,{className:"ms-2 p-0","aria-label":`Copy ${e} to clipboard`,onClick:()=>n({text:e,onCopy:t}),children:m.jsx(je,{icon:$D,className:"fs-5"})}),OLe=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=i0({...n,margin:t>0?t:void 0});return`${r}${i?`?${i}`:""}`},SLe=({errorCorrection:e,setErrorCorrection:t})=>m.jsxs(na,{text:`Error correction (${e})`,children:[m.jsxs(Ne,{active:e==="L",onClick:()=>t("L"),children:[m.jsx("b",{children:"L"}),"ow"]}),m.jsxs(Ne,{active:e==="M",onClick:()=>t("M"),children:[m.jsx("b",{children:"M"}),"edium"]}),m.jsxs(Ne,{active:e==="Q",onClick:()=>t("Q"),children:[m.jsx("b",{children:"Q"}),"uartile"]}),m.jsxs(Ne,{active:e==="H",onClick:()=>t("H"),children:[m.jsx("b",{children:"H"}),"igh"]})]}),ELe=({format:e,setFormat:t})=>m.jsxs(na,{text:`Format (${e})`,children:[m.jsx(Ne,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),m.jsx(Ne,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]}),_B=({shortUrl:{shortUrl:e,shortCode:t},toggle:n,isOpen:r})=>{const{ImageDownloader:i}=Rt(_B),[o,a]=R.useState(300),[s,l]=R.useState(0),[c,f]=R.useState("png"),[d,p]=R.useState("L"),v=R.useMemo(()=>OLe(e,{size:o,format:c,margin:s,errorCorrection:d}),[e,o,c,s,d]),g=R.useMemo(()=>o+s,[o,s]),y=R.useMemo(()=>{if(!(g<500))return g<800?"lg":"xl"},[g]);return m.jsxs(yr,{isOpen:r,toggle:n,centered:!0,size:y,children:[m.jsxs(yo,{toggle:n,children:["QR code for ",m.jsx(pr,{href:e,children:e})]}),m.jsxs(Ii,{children:[m.jsxs(Kn,{children:[m.jsxs(to,{className:"d-grid col-md-6",children:[m.jsxs("label",{htmlFor:"sizeControl",children:["Size: ",o,"px"]}),m.jsx("input",{id:"sizeControl",type:"range",className:"form-control-range",value:o,step:10,min:50,max:1e3,onChange:x=>a(Number(x.target.value))})]}),m.jsxs(to,{className:"d-grid col-md-6",children:[m.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",s,"px"]}),m.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:s,step:1,min:0,max:100,onChange:x=>l(Number(x.target.value))})]}),m.jsx(to,{className:"d-grid col-md-6",children:m.jsx(ELe,{format:c,setFormat:f})}),m.jsx(to,{className:"col-md-6",children:m.jsx(SLe,{errorCorrection:d,setErrorCorrection:p})})]}),m.jsxs("div",{className:"text-center",children:[m.jsxs("div",{className:"mb-3",children:[m.jsx(pr,{href:v}),m.jsx(bB,{text:v})]}),m.jsx("img",{src:v,className:"qr-code-modal__img",alt:"QR code"}),m.jsx("div",{className:"mt-3",children:m.jsxs(qe,{block:!0,color:"primary",onClick:()=>{i.saveImage(v,`${t}-qr-code.${c}`).catch(()=>{})},children:["Download ",m.jsx(je,{icon:E6,className:"ms-1"})]})})]})]})]})},CLe=$t(_B,["ImageDownloader"]),Oy=({date:e,format:t=k7,relative:n=!1})=>{const r=aP(e)?e:Ya(e);return m.jsx("time",{dateTime:`${Hoe(r)}000`,children:n?`${Voe(Qa(),r)} ago`:bg(r,t)})},PLe=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:a}=t,s=(r==null?void 0:r.total)??n??0;return i&&s>=i?{icon:dq,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",m.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:a&&_g(jr(a),Qa())?{icon:qj,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be visited since ",m.jsx("b",{className:"indivisible",children:Gh(jr(a))}),"."]})}:o&&_g(Qa(),jr(o))?{icon:qj,className:"text-warning",description:m.jsxs(m.Fragment,{children:["This short URL will start working on ",m.jsx("b",{className:"indivisible",children:Gh(jr(o))}),"."]})}:{icon:Gd,className:"text-primary",description:"This short URL can be visited normally."}},TLe=({shortUrl:e})=>{const t=ta(),{icon:n,className:r,description:i}=PLe(e);return m.jsxs(m.Fragment,{children:[m.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:m.jsx(je,{icon:n,className:r})}),m.jsx(br,{target:t,placement:"bottom",children:i})]})},jLe=(e,{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`${e}/short-code/${j7(t)}/${r}${i}`},cv=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=ps();return!n||!e?m.jsx("span",{...i,children:r}):m.jsx(St,{to:jLe(o,e,t),...i,children:r})},xB=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const i=ta(),{maxVisits:o,validSince:a,validUntil:s}=(t==null?void 0:t.meta)??{},l=!!o||!!a||!!s,c=m.jsx(cv,{shortUrl:t,suffix:"visits",asLink:r,children:m.jsx("strong",{className:Ce("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:Gt(e)})});return l?m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"indivisible",children:[c,m.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:i,children:[o&&m.jsxs(m.Fragment,{children:[" / ",Gt(o)]}),m.jsx("sup",{className:"ms-1",children:m.jsx(je,{icon:QS})})]})]}),m.jsx(br,{target:i,placement:"bottom",children:m.jsxs("ul",{className:"list-unstyled mb-0",children:[o&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",m.jsx("b",{children:Gt(o)})," visit",o===1?"":"s","."]}),a&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",m.jsx("b",{className:"indivisible",children:Gh(jr(a))}),"."]}),s&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",m.jsx("b",{className:"indivisible",children:Gh(jr(s))}),"."]})]})})]}):c},ALe=e=>!!e.onClose,kLe=e=>!!e.onClick,cb=e=>{const{text:t,children:n,className:r,colorGenerator:i}=e,o=kLe(e),a=o?xl:"span",s=R.useMemo(()=>i.stylesForKey(t),[t,i]);return m.jsxs(a,{className:Ce("badge tag fw-bold",r,{pointer:o}),style:s,onClick:o?e.onClick:void 0,children:[n??t,ALe(e)&&m.jsx(xl,{"aria-label":`Remove ${t}`,className:"bg-transparent ms-1 opacity-100 p-0 fw-bold tag__close",onClick:e.onClose,children:"×"})]})},NLe=({tags:e,onTagClick:t,colorGenerator:n})=>e.length===0?m.jsx("i",{className:"indivisible",children:m.jsx("small",{children:"No tags"})}):m.jsx(m.Fragment,{children:e.map(r=>m.jsx(cb,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))}),wB=({shortUrl:e,onTagClick:t})=>{var n,r,i,o;const{ShortUrlsRowMenu:a,ColorGenerator:s,useTimeoutToggle:l}=Rt(wB),[c,f]=l(),[d,p]=l(!1,500),v=R.useRef(!0),[{excludeBots:g}]=sb(),y=_r("visits"),x=g??(y==null?void 0:y.excludeBots);return R.useEffect(()=>{!v.current&&p(),v.current=!1},[(n=e.visitsSummary)==null?void 0:n.total,(r=e.visitsSummary)==null?void 0:r.nonBots,e.visitsCount,p]),m.jsxs("tr",{className:"responsive-table__row",children:[m.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:m.jsx(Oy,{date:e.dateCreated})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:m.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[m.jsx("span",{className:"short-urls-row__short-url-wrapper",children:m.jsx(pr,{href:e.shortUrl})}),m.jsx(bB,{text:e.shortUrl,onCopy:f}),m.jsx("span",{role:"status",className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!c,children:"Copied short URL!"})]})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${e.title?"Title":"Long URL"}`,children:m.jsx(pr,{href:e.longUrl,children:e.title??e.longUrl})}),e.title&&m.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:m.jsx(pr,{href:e.longUrl})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:m.jsx(NLe,{tags:e.tags,colorGenerator:s,onTagClick:t})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:m.jsx(xB,{visitsCount:(x?(i=e.visitsSummary)==null?void 0:i.nonBots:(o=e.visitsSummary)==null?void 0:o.total)??e.visitsCount??0,shortUrl:e,active:d,asLink:!0})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:m.jsx(TLe,{shortUrl:e})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:m.jsx(a,{shortUrl:e})})]})},MLe=$t(wB,["ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"]),LLe=(e,{maxVersion:t,minVersion:n})=>{const r=!n||i2(e,n,">=");return(!t||i2(e,t,"<="))&&r},OB={excludeBotsOnShortUrls:{minVersion:"3.4.0"},filterDisabledUrls:{minVersion:"3.4.0"},deviceLongUrls:{minVersion:"3.5.0",maxVersion:"3.*.*"},shortUrlVisitsDeletion:{minVersion:"3.6.0"},orphanVisitsDeletion:{minVersion:"3.7.0"},shortUrlRedirectRules:{minVersion:"4.0.0"},urlValidation:{maxVersion:"3.*.*"}};Object.freeze(OB);const Es=(e,t)=>t==="latest"||LLe(t,OB[e]),SB=e=>({excludeBotsOnShortUrls:Es("excludeBotsOnShortUrls",e),filterDisabledUrls:Es("filterDisabledUrls",e),deviceLongUrls:Es("deviceLongUrls",e),shortUrlVisitsDeletion:Es("shortUrlVisitsDeletion",e),orphanVisitsDeletion:Es("orphanVisitsDeletion",e),shortUrlRedirectRules:Es("shortUrlRedirectRules",e),urlValidation:Es("urlValidation",e)}),EB=R.createContext(SB("0.0.0")),RLe=EB.Provider,$Le=e=>R.useMemo(()=>SB(e),[e]),es=e=>R.useContext(EB)[e],CB=({shortUrl:e})=>{const{DeleteShortUrlModal:t,QrCodeModal:n}=Rt(CB),[r,,i,o]=Kt(),[a,,s,l]=Kt(),c=nb(),f=es("shortUrlRedirectRules");return m.jsxs(o0,{minWidth:f?220:190,children:[m.jsxs(Ne,{tag:cv,shortUrl:e,suffix:"visits",asLink:!0,children:[m.jsx(je,{icon:XS,fixedWidth:!0})," Visit stats"]}),c&&m.jsxs(m.Fragment,{children:[m.jsxs(Ne,{disabled:!c.canAddItemWithName(e.shortUrl),onClick:()=>c.addItemToCompare({name:e.shortUrl,query:oP(e)}),children:[m.jsx(je,{icon:Zy,fixedWidth:!0})," Compare visits"]}),m.jsx(Ne,{divider:!0,tag:"hr"})]}),m.jsxs(Ne,{tag:cv,shortUrl:e,suffix:"edit",asLink:!0,children:[m.jsx(je,{icon:ZS,fixedWidth:!0})," Edit short URL"]}),f&&m.jsxs(Ne,{tag:cv,shortUrl:e,suffix:"redirect-rules",asLink:!0,children:[m.jsx(je,{icon:pq,fixedWidth:!0})," Manage redirect rules"]}),m.jsxs(Ne,{onClick:i,children:[m.jsx(je,{icon:uq,fixedWidth:!0})," QR code"]}),m.jsx(n,{shortUrl:e,isOpen:r,toggle:o}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{className:"dropdown-item--danger",onClick:s,children:[m.jsx(je,{icon:YS,fixedWidth:!0})," Delete short URL"]}),m.jsx(t,{shortUrl:e,isOpen:a,toggle:l})]})},ILe=$t(CB,["DeleteShortUrlModal","QrCodeModal"]),PB="shlink/shortUrlCreation",r4={saving:!1,saved:!1,error:!1},DLe=e=>un(`${PB}/createShortUrl`,t=>e().createShortUrl(t)),FLe=e=>{const{reducer:t,actions:n}=Qt({name:PB,initialState:r4,reducers:{resetCreateShortUrl:()=>r4},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:a})=>({saving:!1,saved:!1,error:!0,errorData:zr(a)})),i.addCase(e.fulfilled,(o,{payload:a})=>({result:a,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},TB="shlink/shortUrlEdition",BLe={saving:!1,saved:!1,error:!1},ULe=e=>un(`${TB}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl(t,n,r)),zLe=e=>Qt({name:TB,initialState:BLe,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:zr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}}),i4="shlink/shortUrlsDetails",o4={loading:!1,error:!1},VLe=e=>{const t=un(`${i4}/getShortUrlsDetails`,async(r,{getState:i})=>{const{shortUrlsList:o}=i(),a=await Promise.all(r.map(async s=>{var l;const{shortCode:c,domain:f}=s,d=(l=o==null?void 0:o.shortUrls)==null?void 0:l.data.find(p=>Ed(p,c,f));return[s,d??await e().getShortUrl(c,f)]}));return new Map(a)}),{reducer:n}=Qt({name:i4,initialState:o4,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:zr(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...o4,shortUrls:o}))}});return{reducer:n,getShortUrlsDetails:t}},f_=({icon:e,className:t,...n})=>{const r=ta();return m.jsxs("div",{className:"icon-input-container",children:[m.jsx(Nn,{className:Ce("icon-input-container__input",t),innerRef:r,...n}),m.jsx(je,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var i;return(i=r.current)==null?void 0:i.focus()}})]})},WLe=({minDate:e,maxDate:t,value:n,onChange:r,withTime:i=!1,...o})=>{const a=R.useCallback(({target:l})=>{if(!l.value){r==null||r(null);return}r==null||r(jr(l.value))},[r]),s=R.useMemo(()=>i?Gh:Aa,[i]);return m.jsx(Nn,{...o,type:i?"datetime-local":"date",value:s(n)??"",max:s(t)??void 0,min:s(e)??void 0,onChange:a})},Sy=({label:e,id:t,...n})=>{const r=R.useId();return m.jsxs(m.Fragment,{children:[m.jsxs("label",{htmlFor:t??r,className:"mb-1",children:[e,":"]}),m.jsx(WLe,{id:t??r,...n})]})},d_=({children:e,infoTooltip:t,checked:n,onChange:r})=>m.jsxs("p",{children:[m.jsx(tD,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&m.jsx(lv,{placement:"right",children:t})]}),HLe=({isOpen:e,toggle:t})=>m.jsxs(yr,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[m.jsx(yo,{toggle:t,children:"Info"}),m.jsxs(Ii,{children:[m.jsxs("p",{children:["When the ",m.jsx("b",{children:m.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),m.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),m.jsxs("ul",{children:[m.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."}),m.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.",m.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),m.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"})]})]})]}),GLe=()=>{const[e,t]=Kt();return m.jsxs(m.Fragment,{children:[m.jsx(xl,{className:"p-0",title:"What does this mean?",onClick:t,children:m.jsx(je,{icon:QS})}),m.jsx(HLe,{isOpen:e,toggle:t})]})},$m=e=>typeof e=="string"?Ya(e):e,KLe=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,qLe=e=>"error"in e,jB=({basicMode:e=!1,saving:t,onSave:n,initialState:r,tagsList:i})=>{var o,a,s;const{TagsSelector:l,DomainSelector:c}=Rt(jB),[f,d]=R.useState(r),p=KLe(f),v=es("deviceLongUrls"),g=es("urlValidation"),y=g||p,x=R.useCallback(()=>d(r),[r]),_=R.useCallback((C,T)=>Ds(C)?C:Ds(T)?null:void 0,[]),b=R.useCallback((C,T)=>d(({deviceLongUrls:A={},...D})=>{var N;return{...D,deviceLongUrls:{...A,[C]:_(T,(N=r.deviceLongUrls)==null?void 0:N[C])}}}),[r.deviceLongUrls,_]),w=R.useCallback(C=>d(T=>({...T,tags:C})),[]),S=R.useCallback(async C=>(C.preventDefault(),n(f).then(T=>p&&!qLe(T)&&x()).catch(()=>{})),[p,n,x,f]),E=R.useMemo(()=>m.jsxs("div",{className:"d-flex flex-column gap-3",children:[m.jsx(Nn,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:f.longUrl,onChange:C=>d(T=>({...T,longUrl:C.target.value}))}),m.jsxs("div",{className:Ce("d-flex flex-column flex-lg-row gap-3",{"mb-3":e}),children:[e&&p&&m.jsx("div",{className:"w-100 w-lg-50",children:m.jsx(Nn,{bsSize:"lg",placeholder:"Custom slug",value:f.customSlug??"",onChange:C=>d(T=>({...T,customSlug:C.target.value}))})}),m.jsx("div",{className:Ce("w-100",{"w-lg-50":e}),children:m.jsx(l,{tags:i.tags,selectedTags:f.tags??[],onChange:w})})]})]}),[l,e,w,p,f,i.tags]);return m.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:S,children:[e&&E,!e&&m.jsxs(m.Fragment,{children:[m.jsxs(Kn,{children:[m.jsx("div",{className:Ce("mb-3",{"col-sm-6":v,"col-12":!v}),children:m.jsx(xt,{title:"Main options",children:E})}),v&&m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Device-specific long URLs",bodyClassName:"d-flex flex-column gap-3",children:[m.jsx(f_,{type:"url",icon:zae,placeholder:"Android-specific redirection",value:((o=f.deviceLongUrls)==null?void 0:o.android)??"",onChange:({target:C})=>b("android",C.value)}),m.jsx(f_,{type:"url",icon:Uae,placeholder:"iOS-specific redirection",value:((a=f.deviceLongUrls)==null?void 0:a.ios)??"",onChange:({target:C})=>b("ios",C.value)}),m.jsx(f_,{type:"url",icon:hq,placeholder:"Desktop-specific redirection",value:((s=f.deviceLongUrls)==null?void 0:s.desktop)??"",onChange:({target:C})=>b("desktop",C.value)})]})})]}),m.jsxs(Kn,{children:[m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Customize the short URL",bodyClassName:"d-flex flex-column gap-3",children:[m.jsx(Nn,{placeholder:"Title",value:f.title??"",onChange:({target:C})=>d(T=>({...T,title:_(C.value,r.title)}))}),p&&m.jsxs(m.Fragment,{children:[m.jsxs(Kn,{children:[m.jsx("div",{className:"col-lg-6 mb-3 mb-lg-0",children:m.jsx(Nn,{placeholder:"Custom slug",value:f.customSlug??"",onChange:C=>d(T=>({...T,customSlug:C.target.value})),disabled:Ds(f.shortCodeLength)})}),m.jsx("div",{className:"col-lg-6",children:m.jsx(Nn,{type:"number",placeholder:"Short code length",value:f.shortCodeLength??"",onChange:C=>d(T=>({...T,shortCodeLength:C.target.value})),min:4,disabled:Ds(f.customSlug)})})]}),m.jsx(c,{value:f.domain,onChange:C=>d(T=>({...T,domain:C}))})]})]})}),m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Limit access to the short URL",children:[m.jsxs("div",{className:"row mb-3",children:[m.jsx("div",{className:"col-lg-6",children:m.jsx(Sy,{label:"Enabled since",withTime:!0,maxDate:f.validUntil?$m(f.validUntil):void 0,value:f.validSince?$m(f.validSince):null,onChange:C=>d(T=>({...T,validSince:Ja(C)}))})}),m.jsx("div",{className:"col-lg-6 mt-3 mt-lg-0",children:m.jsx(Sy,{label:"Enabled until",withTime:!0,minDate:f.validSince?$m(f.validSince):void 0,value:f.validUntil?$m(f.validUntil):null,onChange:C=>d(T=>({...T,validUntil:Ja(C)}))})})]}),m.jsxs("div",{children:[m.jsx("label",{htmlFor:"maxVisits",className:"mb-1",children:"Maximum visits allowed:"}),m.jsx(Nn,{id:"maxVisits",type:"number",min:1,placeholder:"25...",value:f.maxVisits??"",onChange:C=>d(T=>({...T,maxVisits:Ds(C.target.value)?Number(C.target.value):null}))})]})]})})]}),m.jsxs(Kn,{children:[y&&m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Extra checks",children:[g&&m.jsx(d_,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:f.validateUrl,onChange:C=>d(T=>({...T,validateUrl:C})),children:"Validate URL"}),p&&m.jsxs("p",{children:[m.jsx(tD,{inline:!0,className:"me-2",checked:f.findIfExists,onChange:C=>d(T=>({...T,findIfExists:C})),children:"Use existing URL if found"}),m.jsx(GLe,{})]})]})}),m.jsx("div",{className:Ce("mb-3",{"col-sm-6":y}),children:m.jsxs(xt,{title:"Configure behavior",children:[m.jsx(d_,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:f.crawlable,onChange:C=>d(T=>({...T,crawlable:C})),children:"Make it crawlable"}),m.jsx(d_,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:f.forwardQuery,onChange:C=>d(T=>({...T,forwardQuery:C})),children:"Forward query params on redirect"})]})})]})]}),m.jsx("div",{className:"text-center",children:m.jsx(qe,{outline:!0,color:"primary",disabled:t||!f.longUrl,className:"btn-xs-block",children:t?"Saving...":"Save"})})]})},YLe=$t(jB,["TagsSelector","DomainSelector"]),ZLe=({active:e,allText:t,onChange:n})=>m.jsxs(m.Fragment,{children:[m.jsx(Ne,{active:e==="all",onClick:()=>n("all"),children:t}),m.jsx(Ne,{divider:!0,tag:"hr"}),gNe.map(r=>m.jsx(Ne,{active:e===r,onClick:()=>n(r),children:R7(r)},r))]}),XLe=({startDate:e,endDate:t,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-md-6",children:m.jsx(Sy,{label:"Since",value:e,maxDate:t??void 0,disabled:n,onChange:r})}),m.jsx("div",{className:"col-md-6 mt-3 mt-md-0",children:m.jsx(Sy,{label:"Until",value:t,minDate:e??void 0,disabled:n,onChange:o=>i(o&&nu(o))})})]}),pP=({onDatesChange:e,dateRangeOrInterval:t,defaultText:n,disabled:r})=>{const i=R.useMemo(()=>R7(t)??n,[t,n]),[o,a]=R.useMemo(()=>_y(t)?[void 0,t]:[t,void 0],[t]),s=R.useCallback(l=>{_y(l)?e($7(l),l):e(l)},[e]);return m.jsxs(na,{disabled:r,text:i,children:[m.jsx(ZLe,{allText:n,active:a,onChange:s}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx("div",{className:"px-3 py-1",children:m.jsx(XLe,{...o,onStartDateChange:l=>s({...o,startDate:l}),onEndDateChange:l=>s({...o,endDate:l})})})]})},QLe={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},JLe=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:a=!1}=t,s=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return m.jsxs(na,{text:"Filters",dropdownClassName:n,end:!0,minWidth:250,children:[m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Visits:"}),m.jsx(Ne,{active:i,onClick:s("excludeBots"),children:"Ignore visits from bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Short URLs:"}),m.jsx(Ne,{active:o,onClick:s("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),m.jsx(Ne,{active:a,onClick:s("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{disabled:t.excludeBots===void 0&&t.excludeMaxVisitsReached===void 0&&t.excludePastValidUntil===void 0,onClick:()=>e({excludeBots:void 0,excludeMaxVisitsReached:void 0,excludePastValidUntil:void 0}),children:m.jsx("i",{children:"Reset to defaults"})})]})},AB=({className:e,shortUrlsAmount:t,order:n,handleOrderBy:r,tagsList:i})=>{const{ExportShortUrlsBtn:o,TagsSelector:a}=Rt(AB),[{search:s,tags:l,startDate:c,endDate:f,excludeBots:d,excludeMaxVisitsReached:p,excludePastValidUntil:v,tagsMode:g="any"},y]=sb(),x=es("filterDisabledUrls"),_=_r("visits"),[b,w]=R.useState(),S=R.useCallback(({startDate:A,endDate:D},N)=>{y({startDate:Ja(A)??void 0,endDate:Ja(D)??void 0}),w(N)},[y]),E=R.useCallback(A=>y({search:A||void 0}),[y]),C=R.useCallback(A=>y({tags:A}),[y]),T=R.useCallback(()=>y({tagsMode:g==="any"?"all":"any"}),[g,y]);return m.jsxs("div",{className:Ce("short-urls-filtering-bar-container",e),children:[m.jsx(ap,{initialValue:s,onChange:E}),m.jsxs(r0,{className:"mt-3",children:[m.jsx(a,{immutable:!0,placeholder:"With tags...",tags:i.tags,selectedTags:l,onChange:C}),l.length>1&&m.jsxs(m.Fragment,{children:[m.jsx(qe,{outline:!0,color:"secondary",onClick:T,id:"tagsModeBtn","aria-label":"Change tags mode",children:m.jsx(je,{className:"short-urls-filtering-bar__tags-icon",icon:g==="all"?S6:FK})}),m.jsx(br,{target:"tagsModeBtn",placement:"left",children:g==="all"?"With all the tags.":"With any of the tags."})]})]}),m.jsxs(Kn,{className:"flex-lg-row-reverse",children:[m.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(pP,{defaultText:"All short URLs",dateRangeOrInterval:b??L7(c,f),onDatesChange:S})}),m.jsx(JLe,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:d??(_==null?void 0:_.excludeBots),excludeMaxVisitsReached:p,excludePastValidUntil:v},onChange:y,supportsDisabledFiltering:x})]})}),m.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:m.jsx(o,{amount:t})}),m.jsx("div",{className:"col-6 d-lg-none mt-3",children:m.jsx(sp,{prefixed:!1,items:QLe,order:n,onChange:r})})]})]})},e4e=$t(AB,["ExportShortUrlsBtn","TagsSelector"]);function Cd({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:m.jsx(je,{icon:e.dir==="ASC"?kK:WK,className:n})}const ec=2,UO="...",kB=(e,t)=>{const n=IE(Math.max(ec,e-ec),Math.min(t-1,e+ec)+1);return e-ec>ec&&n.unshift(UO),e+ece===UO,NB=e=>Kh(e)?e:Gt(e),MB=(e,t)=>Kh(e)?`${e}_${t}`:`${e}`,t4e=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=ps(),o=s=>`${i}/list-short-urls/${s}${t}`;if(r<=1)return m.jsx("div",{className:"pb-3"});const a=()=>kB(n,r).map((s,l)=>m.jsx(Js,{disabled:Kh(s),active:n===s,children:m.jsx(el,{tag:St,to:o(s),children:NB(s)})},MB(s,l)));return m.jsxs(PE,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[m.jsx(Js,{disabled:n===1,children:m.jsx(el,{previous:!0,tag:St,to:o(n-1)})}),a(),m.jsx(Js,{disabled:n>=r,children:m.jsx(el,{next:!0,tag:St,to:o(n+1)})})]})},n4e={field:"dateCreated",dir:"DESC"},LB=Ui(({listShortUrls:e,shortUrlsList:t})=>{var n,r,i;const{ShortUrlsTable:o,ShortUrlsFilteringBar:a}=Rt(LB),{page:s}=ju(),l=vr(),[{tags:c,search:f,startDate:d,endDate:p,orderBy:v,tagsMode:g,excludeBots:y,excludePastValidUntil:x,excludeMaxVisitsReached:_},b]=sb(),w=UE(),[S,E]=R.useState(v??((n=w.shortUrlsList)==null?void 0:n.defaultOrdering)??n4e),{pagination:C}=(t==null?void 0:t.shortUrls)??{},T=R.useMemo(()=>{var X;return y??((X=w.visits)==null?void 0:X.excludeBots)},[y,(r=w.visits)==null?void 0:r.excludeBots]),A=es("excludeBotsOnShortUrls"),D=R.useCallback((X,Q)=>{b({orderBy:{field:X,dir:Q}}),E({field:X,dir:Q})},[b]),N=X=>()=>D(X,a0(X,S.field,S.dir)),I=X=>m.jsx(Cd,{currentOrder:S,field:X}),F=R.useCallback(X=>b({tags:[...new Set([...c,X])]}),[c,b]),q=R.useCallback(({field:X,dir:Q})=>A&&T&&X==="visits"?{field:"nonBotVisits",dir:Q}:{field:X,dir:Q},[T,A]),W=nP();return R.useEffect(()=>{e({page:s,searchTerm:f,tags:c,startDate:d,endDate:p,orderBy:q(S),tagsMode:g,excludePastValidUntil:x,excludeMaxVisitsReached:_})},[e,q,s,f,c,d,p,S,g,x,_]),m.jsxs(tP,{value:W,children:[m.jsx(a,{shortUrlsAmount:(i=t.shortUrls)==null?void 0:i.pagination.totalItems,order:S,handleOrderBy:D,className:"mb-3"}),m.jsx(rP,{type:"short-urls",className:"mb-3"}),m.jsxs(mr,{body:!0,className:Ce({"pb-0":!t.loading}),children:[m.jsx(o,{shortUrlsList:t,orderByColumn:N,renderOrderIcon:I,onTagClick:F}),!t.loading&&m.jsx(t4e,{paginator:C,currentQueryString:l.search})]})]})},()=>[tr.visits]),r4e=$t(LB,["ShortUrlsTable","ShortUrlsFilteringBar"]),RB=({orderByColumn:e,renderOrderIcon:t,shortUrlsList:n,onTagClick:r,className:i})=>{const{ShortUrlsRow:o}=Rt(RB),{error:a,loading:s,shortUrls:l}=n,c=Ce({"short-urls-table__header-cell--with-action":!!e}),f=Ce("short-urls-table__header-cell",c),d=Ce("table table-hover responsive-table short-urls-table",i),p=()=>a?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):s?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!s&&(!l||l.data.length===0)?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):l==null?void 0:l.data.map(v=>m.jsx(o,{shortUrl:v,onTagClick:r},v.shortUrl));return m.jsxs("table",{className:d,children:[m.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:m.jsxs("tr",{children:[m.jsxs("th",{className:f,onClick:e==null?void 0:e("dateCreated"),children:["Created at ",t==null?void 0:t("dateCreated")]}),m.jsxs("th",{className:f,onClick:e==null?void 0:e("shortCode"),children:["Short URL ",t==null?void 0:t("shortCode")]}),m.jsxs("th",{className:"short-urls-table__header-cell",children:[m.jsxs(xl,{className:Ce("p-0",c),onClick:e==null?void 0:e("title"),children:["Title ",t==null?void 0:t("title")]}),"  /  ",m.jsxs(xl,{className:Ce("p-0",c),onClick:e==null?void 0:e("longUrl"),children:[m.jsx("span",{className:"indivisible",children:"Long URL"})," ",t==null?void 0:t("longUrl")]})]}),m.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),m.jsx("th",{className:f,onClick:e==null?void 0:e("visits"),children:m.jsxs("span",{className:"indivisible",children:["Visits ",t==null?void 0:t("visits")]})}),m.jsx("th",{className:"short-urls-table__header-cell",colSpan:2,"aria-hidden":!0})]})}),m.jsx("tbody",{children:p()})]})},i4e=$t(RB,["ShortUrlsRow"]),o4e=(e,t)=>{e.factory("ShortUrlsList",r4e),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.factory("ShortUrlsTable",i4e),e.factory("ShortUrlsRow",MLe),e.factory("ShortUrlsRowMenu",ILe),e.factory("CreateShortUrlResult",_Le),e.factory("ShortUrlForm",YLe),e.decorator("ShortUrlForm",t(["tagsList"])),e.factory("CreateShortUrl",yLe),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.factory("EditShortUrl",bLe),e.decorator("EditShortUrl",t(["shortUrlsDetails","shortUrlEdition"],["getShortUrlsDetails","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>xLe),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.factory("QrCodeModal",CLe),e.factory("ExportShortUrlsBtn",wLe),e.factory("ShortUrlsFilteringBar",e4e),e.decorator("ShortUrlsFilteringBar",t(["tagsList"])),e.serviceFactory("shortUrlsListReducerCreator",nMe,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",n=>n.reducer,"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",FLe,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",n=>n.reducer,"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",zLe,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",n=>n.reducer,"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",JNe,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",n=>n.reducer,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlsDetailsReducerCreator",VLe,"apiClientFactory"),e.serviceFactory("shortUrlsDetailsReducer",n=>n.reducer,"shortUrlsDetailsReducerCreator"),e.serviceFactory("listShortUrls",tMe,"apiClientFactory"),e.serviceFactory("createShortUrl",DLe,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",n=>n.resetCreateShortUrl,"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",QNe,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",n=>n.resetDeleteShortUrl,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>H7),e.serviceFactory("getShortUrlsDetails",n=>n.getShortUrlsDetails,"shortUrlsDetailsReducerCreator"),e.serviceFactory("editShortUrl",ULe,"apiClientFactory")},a4e=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:a,error:s,deleted:l,errorData:c}=i;return m.jsxs(yr,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[m.jsx(yo,{toggle:t,className:"text-danger",children:"Delete tag"}),m.jsxs(Ii,{children:["Are you sure you want to delete tag ",m.jsx("b",{children:e}),"?",s&&m.jsx(Qn,{type:"error",small:!0,className:"mt-2",children:m.jsx(vo,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),m.jsxs(ls,{children:[m.jsx(qe,{color:"link",onClick:t,children:"Cancel"}),m.jsx(qe,{color:"danger",disabled:a,onClick:async()=>{await r(e),t()},children:a?"Deleting tag...":"Delete tag"})]})]})},$B=({tag:e,editTag:t,toggle:n,tagEdited:r,isOpen:i,tagEdit:o})=>{const{ColorGenerator:a}=Rt($B),[s,l]=R.useState(e),[c,f]=R.useState(a.getColorForKey(e)),{editing:d,error:p,edited:v,errorData:g}=o,y=W7(async()=>{await t({oldName:e,newName:s,color:c}),n()}),x=R.useCallback(()=>v&&r({oldName:e,newName:s,color:c}),[c,v,s,e,r]);return m.jsx(yr,{isOpen:i,toggle:n,centered:!0,onClosed:x,children:m.jsxs("form",{name:"editTag",onSubmit:y,children:[m.jsx(yo,{toggle:n,children:"Edit tag"}),m.jsxs(Ii,{children:[m.jsxs(r0,{children:[m.jsxs("div",{className:"input-group-text p-0 position-relative",style:{backgroundColor:c,borderColor:c},children:[m.jsx(je,{icon:NK,className:"position-absolute top-50 start-50 translate-middle text-white"}),m.jsx(Nn,{className:"form-control-color opacity-0",type:"color",value:c,onChange:_=>f(_.target.value)})]}),m.jsx(Nn,{value:s,placeholder:"Tag",required:!0,onChange:({target:_})=>l(_.value)})]}),p&&m.jsx(Qn,{type:"error",small:!0,className:"mt-2",children:m.jsx(vo,{errorData:g,fallbackMessage:"Something went wrong while editing the tag :("})})]}),m.jsxs(ls,{children:[m.jsx(qe,{type:"button",color:"link",onClick:n,children:"Cancel"}),m.jsx(qe,{color:"primary",disabled:d,children:d?"Saving...":"Save"})]})]})})},s4e=$t($B,["ColorGenerator"]),l4e=/\s+/g,IB=e=>e.trim().toLowerCase().replace(l4e,"-"),DB=({color:e})=>m.jsx("div",{style:{backgroundColor:e},className:"color-bullet"}),FB=({tag:e,colorGenerator:t})=>m.jsx(DB,{color:t.getColorForKey(e)});let a4=1;const BB="Tag not found",UB="Add tag",c4e=e=>e!==BB,u4e=e=>e===UB,s4=e=>(a4+=1,{label:e,value:`${e}${a4}`}),f4e=e=>({tag:t,onClick:n})=>m.jsx(cb,{colorGenerator:e,text:t.label,className:"react-tags__tag",onClose:n}),d4e=(e,t)=>({option:n,classNames:r,...i})=>{var o;const a=c4e(n.label),s=u4e(n.label);return m.jsx("div",{className:Ce(r.option,{[r.optionIsActive]:a&&n.active,"react-tags__listbox-option--not-selectable":!a}),...i,children:a?m.jsxs(m.Fragment,{children:[!s&&m.jsx(FB,{tag:`${n.label}`,colorGenerator:e}),s?m.jsxs("i",{children:['Add "',IB(((o=t.current)==null?void 0:o.input.value)??""),'"']}):n.label]}):m.jsx("i",{children:n.label})})},zB=({selectedTags:e,onChange:t,placeholder:n,tags:r,immutable:i=!1})=>{const{ColorGenerator:o}=Rt(zB),a=_r("shortUrlCreation"),s=(a==null?void 0:a.tagFilteringMode)??"startsWith",l=ta();return m.jsx(Fse,{ref:l,selected:e.map(s4),suggestions:r.filter(c=>!e.includes(c)).map(s4),renderTag:f4e(o),renderOption:d4e(o,l),activateFirstOption:!0,allowNew:!i,newOptionText:UB,noOptionsText:BB,placeholderText:n??"Add tags to the URL",delimiterKeys:["Enter",","],suggestionsTransform:(c,f)=>{const d=c.toLowerCase().trim();return d.length<1?[]:[...f.filter(({label:p})=>s==="includes"?p.includes(d):p.startsWith(d))].slice(0,5)},onDelete:c=>{const f=[...e];f.splice(c,1),t(f)},onAdd:({label:c})=>t([...new Set([...e,...c.split(",").map(IB)])])})},h4e=$t(zB,["ColorGenerator"]),zO="shlink/tagDelete",p4e={deleting:!1,deleted:!1,error:!1},VB=Jn(`${zO}/tagDeleted`),m4e=e=>{const t=un(`${zO}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=Qt({name:zO,initialState:p4e,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:zr(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},mP="shlink/tagEdit",v4e={editing:!1,edited:!1,error:!1},WB=Jn(`${mP}/tagEdited`),g4e=(e,t)=>un(`${mP}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),y4e=e=>Qt({name:mP,initialState:v4e,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:zr(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}})}}),vP="shlink/tagsList",h_={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},l4=(e,t)=>n=>n===e?t:n,c4=(e,t)=>e.filter(n=>n!==t),b4e=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:a}=i,s=n[r];return{...n,[r]:{...s,visitsSummary:s.visitsSummary&&{total:s.visitsSummary.total+o+a,bots:s.visitsSummary.bots+o,nonBots:s.visitsSummary.nonBots+a},visitsCount:(s.visitsCount??0)+o+a}}},{...t}),_4e=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),x4e=e=>un(`${vP}/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}}),HB=Jn(`${vP}/filterTags`),w4e=(e,t)=>Qt({name:vP,initialState:h_,reducers:{},extraReducers:n=>{n.addCase(HB,(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})=>({...h_,error:!0,errorData:zr(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...h_,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(VB,({tags:r,filteredTags:i,...o},{payload:a})=>({...o,tags:c4(r,a),filteredTags:c4(i,a)})),n.addCase(WB,({tags:r,filteredTags:i,stats:o,...a},{payload:s})=>({...a,stats:{...o,[s.newName]:o[s.oldName]},tags:r.map(l4(s.oldName,s.newName)).sort(),filteredTags:i.map(l4(s.oldName,s.newName)).sort()})),n.addCase(Xu,(r,{payload:i})=>({...r,stats:b4e(_4e(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(a=>!r.includes(a)))}))}}),O4e={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},GB=Ui(({filterTags:e,tagsList:t})=>{var n,r;const{TagsTable:i}=Rt(GB),o=UE(),[a,s]=R.useState(((n=o.tags)==null?void 0:n.defaultOrdering)??{}),l=R.useMemo(()=>{const f=t.filteredTags.map(d=>{var p,v,g;const y=t.stats[d],x=((p=o.visits)!=null&&p.excludeBots?(v=y==null?void 0:y.visitsSummary)==null?void 0:v.nonBots:(g=y==null?void 0:y.visitsSummary)==null?void 0:g.total)??(y==null?void 0:y.visitsCount)??0;return{tag:d,visits:x,shortUrls:(y==null?void 0:y.shortUrlsCount)??0}});return rD(f,a)},[a,(r=o.visits)==null?void 0:r.excludeBots,t.filteredTags,t.stats]),c=nP();return t.loading?m.jsx(Ho,{loading:!0}):t.error?m.jsx(Qn,{type:"error",children:m.jsx(vo,{errorData:t.errorData,fallbackMessage:"Error loading tags :("})}):m.jsxs(tP,{value:c,children:[m.jsx(ap,{className:"mb-3",onChange:e}),m.jsx(Kn,{className:"mb-3",children:m.jsx("div",{className:"col-lg-6 offset-lg-6",children:m.jsx(sp,{items:O4e,order:a,onChange:(f,d)=>s({field:f,dir:d})})})}),m.jsx(rP,{type:"tags",className:"mb-3"}),m.jsx(i,{sortedTags:l,currentOrder:a,orderByColumn:f=>()=>{const d=a0(f,a.field,a.dir);s({field:d?f:void 0,dir:d})}})]})},()=>[tr.visits]),S4e=$t(GB,["TagsTable"]),gP=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Kh(o)&&n(o);return m.jsxs(PE,{listClassName:Ce("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[m.jsx(Js,{disabled:t<=1,children:m.jsx(el,{previous:!0,tag:"span",onClick:i(t-1)})}),kB(t,e).map((o,a)=>m.jsx(Js,{disabled:Kh(o),active:t===o,children:m.jsx(el,{role:"link",tag:"span",onClick:i(o),children:NB(o)})},MB(o,a))),m.jsx(Js,{disabled:t>=e,children:m.jsx(el,{next:!0,tag:"span",onClick:i(t+1)})})]})},E4e=20,KB=({sortedTags:e,orderByColumn:t,currentOrder:n})=>{const{TagsTableRow:r}=Rt(KB),i=R.useRef(!0),{page:o=1}=ku(),[a,s]=DNe("page",Number(o)),l=Mc(e,E4e),c=l.length>1,f=l[a-1]??[];return R.useEffect(()=>{!i.current&&s(1),i.current=!1},[s,e]),R.useEffect(()=>{scrollTo(0,0)},[a]),m.jsxs(xt,{bodyClassName:c?"pb-1":"",children:[m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsxs("thead",{className:"responsive-table__header",children:[m.jsxs("tr",{children:[m.jsxs("th",{className:"tags-table__header-cell",onClick:t("tag"),children:["Tag ",m.jsx(Cd,{currentOrder:n,field:"tag"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("shortUrls"),children:["Short URLs ",m.jsx(Cd,{currentOrder:n,field:"shortUrls"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("visits"),children:["Visits ",m.jsx(Cd,{currentOrder:n,field:"visits"})]}),m.jsx("th",{className:"tags-table__header-cell",children:m.jsx("span",{className:"sr-only",children:"Options"})})]}),m.jsx("tr",{children:m.jsx("th",{"aria-hidden":!0,colSpan:4,className:"p-0 border-top-0"})})]}),m.jsxs("tbody",{children:[f.length===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:4,className:"text-center",children:"No tags found"})}),f.map(d=>m.jsx(r,{tag:d},d.tag))]})]}),c&&m.jsx("div",{className:"sticky-card-paginator",children:m.jsx(gP,{pagesCount:l.length,currentPage:a,setCurrentPage:s})})]},a)},C4e=$t(KB,["TagsTableRow"]),qB=({tag:e})=>{const{DeleteTagConfirmModal:t,EditTagModal:n,ColorGenerator:r}=Rt(qB),[i,o]=Kt(),[a,s]=Kt(),l=ps(),c=nb();return m.jsxs("tr",{className:"responsive-table__row",children:[m.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[m.jsx(FB,{tag:e.tag,colorGenerator:r})," ",e.tag]}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:m.jsx(St,{to:`${l}/list-short-urls/1?tags=${encodeURIComponent(e.tag)}`,children:Gt(e.shortUrls)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:m.jsx(St,{to:`${l}/tag/${e.tag}/visits`,children:Gt(e.visits)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end",children:m.jsxs(o0,{children:[m.jsxs(Ne,{onClick:s,children:[m.jsx(je,{icon:x6,fixedWidth:!0,className:"me-1"})," Edit"]}),m.jsxs(Ne,{disabled:!c||!c.canAddItemWithName(e.tag),onClick:()=>c==null?void 0:c.addItemToCompare({name:e.tag,query:e.tag,style:r.stylesForKey(e.tag)}),children:[m.jsx(je,{icon:Zy,fixedWidth:!0})," Compare visits"]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{className:"dropdown-item--danger",onClick:o,children:[m.jsx(je,{icon:RK,fixedWidth:!0,className:"me-1"})," Delete tag"]})]})}),m.jsx(n,{tag:e.tag,toggle:s,isOpen:a}),m.jsx(t,{tag:e.tag,toggle:o,isOpen:i})]})},P4e=$t(qB,["DeleteTagConfirmModal","EditTagModal","ColorGenerator"]),T4e=(e,t)=>{e.factory("TagsSelector",h4e),e.serviceFactory("DeleteTagConfirmModal",()=>a4e),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.factory("EditTagModal",s4e),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.factory("TagsTableRow",P4e),e.factory("TagsTable",C4e),e.factory("TagsList",S4e),e.decorator("TagsList",t(["tagsList","mercureInfo"],["filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",y4e,"editTag"),e.serviceFactory("tagEditReducer",n=>n.reducer,"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",m4e,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",n=>n.reducer,"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",w4e,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",n=>n.reducer,"tagsListReducerCreator"),e.serviceFactory("listTags",x4e,"apiClientFactory"),e.serviceFactory("filterTags",()=>HB),e.serviceFactory("deleteTag",n=>n.deleteTag,"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>VB),e.serviceFactory("editTag",g4e,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>WB)},j4e=new WD,A4e=e=>j4e.parse(e),k4e=6,u4="0123456789ABCDEF",N4e=128,{floor:M4e,random:L4e,sqrt:R4e,round:$4e}=Math,I4e=()=>`#${cP(k4e,()=>u4[M4e(L4e()*u4.length)]).join("")}`,f4=e=>e.toLowerCase().trim(),D4e=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),F4e=(e=0,t=0,n=0)=>$4e(R4e(.299*e**2+.587*t**2+.114*n**2));class B4e{constructor(t){Va(this,"colors"),Va(this,"lights");var n;this.storage=t,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}getColorForKey(t){const n=f4(t);return this.colors[n]||this.setColorForKey(n,I4e())}setColorForKey(t,n){var r;const i=f4(t);return this.colors[i]=n,(r=this.storage)==null||r.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);if(this.lights[n]===void 0){const r=D4e(n);this.lights[n]=F4e(...r)>=N4e}return this.lights[n]}}const YB=({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)},U4e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);YB(e,i,n)};class z4e{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);YB(this.window,i,n)}}class V4e{constructor(t,n){Va(this,"exportVisits",(r,i)=>{i.length&&this.exportCsv(r,i)}),Va(this,"exportShortUrls",r=>{r.length&&this.exportCsv("short_urls.csv",r)}),Va(this,"exportCsv",(r,i)=>{const o=this.jsonToCsv(i);U4e(this.window,o,r)}),this.window=t,this.jsonToCsv=n}}function W4e(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",z4e,"fetch","window"),e.service("ColorGenerator",B4e,"TagColorsStorage"),e.constant("jsonToCsv",A4e),e.service("ReportExporter",V4e,"window","jsonToCsv"),e.serviceFactory("useTimeoutToggle",()=>JI)}const Cp=({visits:e,shortUrl:t,children:n,title:r})=>m.jsx("header",{children:m.jsxs(mr,{body:!0,children:[m.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[m.jsx(lb,{}),m.jsx("span",{className:"text-center d-none d-sm-block",children:m.jsx("small",{children:r})}),m.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",m.jsx(xB,{visitsCount:e.length,shortUrl:t})]})]}),m.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:m.jsx("small",{children:r})}),n&&m.jsx("div",{className:"mt-md-2",children:n})]})}),ZB=({title:e,footer:t,children:n})=>m.jsxs(mr,{role:"document",children:[m.jsx(eu,{className:"chart-card__header",children:e}),m.jsx(Jc,{children:n}),t&&m.jsx(FI,{className:"chart-card__footer--sticky",children:t})]}),XB={color:"white",background:"rgb(0 0 0 / .9)",border:"none",borderRadius:"5px"},H4e={marginBottom:"5px",fontWeight:"bold"},QB={contentStyle:XB,labelStyle:H4e,itemStyle:{padding:0}},d4=["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],JB=e=>d4[e%d4.length],Ey="#46e587",G4e="rgba(70, 229, 135, 0.4)",K4e=({chartData:e,showNumbers:t})=>m.jsx("ul",{className:"doughnut-chart-legend",children:e.map(({name:n,color:r,value:i})=>m.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[m.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:r}}),m.jsxs("small",{className:"doughnut-chart-legend__item-text flex-fill",children:[n,t&&m.jsxs("b",{children:[" (",Gt(i),")"]})]})]},n))}),h4=e=>R.useMemo(()=>Object.entries(e).map(([t,n],r)=>({name:t,value:n,color:JB(r)})),[e]),q4e=({stats:e,prevStats:t,showNumbersInLegend:n,dimensions:r})=>{const i=h4(e),o=h4(t),a=o.length>0,s=AE()?Ere:Sre;return m.jsxs("div",{className:"row align-items-center",children:[m.jsx("div",{className:"col-sm-12 col-md-7",children:m.jsx("div",{style:r??{width:"100%",height:300},children:m.jsx(r?R.Fragment:mC,{children:m.jsxs(Lke,{...r,children:[m.jsx(Xr,{formatter:Gt,contentStyle:XB,itemStyle:{color:"white"}}),m.jsx(mo,{data:i,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"100%",innerRadius:a?"65%":"50%",animationBegin:0,children:i.map((l,c)=>m.jsx(Ba,{fill:l.color,stroke:s},`${l.name}-${c}`))}),a&&m.jsx(mo,{data:o,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"55%",innerRadius:"20%",animationBegin:0,stroke:s,fill:Ey})]})})})}),m.jsx("div",{className:"col-sm-12 col-md-5",children:m.jsx(K4e,{chartData:i,showNumbers:n})})]})},p4=({title:e,...t})=>{const[n,r]=Kt(!1);return m.jsx(ZB,{title:m.jsxs(m.Fragment,{children:[e,m.jsx("div",{className:"float-end",children:m.jsx(hl,{checked:n,onChange:r,children:"Show numbers"})})]}),children:m.jsx(q4e,{...t,showNumbersInLegend:n})})},Y4e=({visitsGroups:e})=>{const t=R.useMemo(()=>Object.entries(e),[e]);return t.length===0?null:m.jsx("ul",{className:"list-unstyled mb-0 mt-2 d-flex flex-wrap justify-content-center gap-3",children:t.map(([n,r],i)=>m.jsxs("li",{className:"d-inline",children:[m.jsx(DB,{color:eU(r)}),m.jsxs("strong",{children:[n," (",Gt(r.length),")"]})]},`${n}${i}`))})},Z4e={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},X4e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},Q4e={hourly:Die,daily:cp,weekly:zie,monthly:yg},yP={hourly:e=>bg(e,"yyyy-MM-dd HH:00"),daily:e=>Aa(e),weekly(e){const t=Aa(ah(e)),n=Aa(Hie(e));return`${t} - ${n}`},monthly:e=>bg(e,"yyyy-MM")},J4e=e=>{var t;const n=Object.values(e).filter(a=>a.length>0);if(n.length===0)return"monthly";const r=new Date,i=n.map(a=>Ya(a[a.length-1].date)),o=CD(i);return((t=[[()=>cp(r,o)<=2,"hourly"],[()=>yg(r,o)<=1,"daily"],[()=>yg(r,o)<=6,"weekly"]].find(([a])=>a()))==null?void 0:t[1])??"monthly"},eRe=(e,t)=>Object.keys(t).reduce((n,r)=>(n[r]=_D(t[r],i=>yP[e](Ya(i.date))),n),{}),tRe=(e,t)=>t.reduce((n,r)=>{const i=yP[e](Ya(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),nRe=(e,t)=>{const n=Object.values(t).filter(d=>d.length>0).map(d=>[...d].reverse());if(n.length===0)return[];const r=Q4e[e],i=yP[e],o=X4e[e],a=n.map(d=>Ya(d[0].date)),s=n.map(d=>Ya(d[d.length-1].date)),l=CD(s),c=Lie(a),f=r(l,c)+1;return[i(c),...cP(f,d=>i(Aie(c,o(d))))]},eU=e=>{if(e.color)return e.color;const t={main:th,highlighted:qw,previous:Ey};return e.type?t[e.type]:th},m4=(e,t)=>R.useMemo(()=>Object.values(e).find(n=>n.type===t)??[],[e,t]),rRe=(e,t,n)=>{const r=m4(e,"main"),i=m4(e,"highlighted"),o=R.useMemo(()=>n?tRe(t,r):{},[n,t,r]),a=R.useCallback((s,{payload:l})=>{const c=o[l.date]??[];n==null||n(c===i?[]:c)},[o,i,n]);return n&&{cursor:"pointer",onClick:a}},tU=({visitsGroups:e,setSelectedVisits:t,dimensions:n,matchMedia:r})=>{const[i,o]=R.useState(J4e(e)),a=fP(767,r??window.matchMedia),s=R.useMemo(()=>{const d=eRe(i,e),p=Object.keys(d);return nRe(i,e).map(v=>({date:v,...p.reduce((g,y)=>(g[y]=d[y][v]??0,g),{})}))},[i,e]),l=rRe(e,i,t),c=n?R.Fragment:mC,f=R.useMemo(()=>n?{}:{width:"100%",height:a?300:400},[n,a]);return m.jsxs(mr,{children:[m.jsxs(eu,{role:"heading","aria-level":4,children:["Visits over time",m.jsx("div",{className:"float-end",children:m.jsxs(op,{children:[m.jsx(ea,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),m.jsx(ss,{end:!0,children:Object.entries(Z4e).map(([d,p])=>m.jsx(Ne,{active:i===d,onClick:()=>o(d),children:p},d))})]})})]}),m.jsxs(Jc,{children:[m.jsx(c,{...f,children:m.jsxs(Mke,{data:s,...n,children:[m.jsx(Yu,{dataKey:"date"}),m.jsx(Zu,{tickFormatter:Gt}),m.jsx(Xr,{formatter:Gt,...QB}),m.jsx(ZC,{strokeOpacity:AE()?.1:.9}),Object.entries(e).map(([d,p])=>p.length>0&&m.jsx(qu,{dataKey:d,type:"monotone",stroke:eU(p),strokeWidth:2,activeDot:p.type==="previous"?void 0:l,strokeDasharray:p.type==="previous"?"8 3":void 0},d))]})}),m.jsx(Y4e,{visitsGroups:e})]})]})},iRe=({toggleClassName:e,ranges:t,value:n,setValue:r})=>m.jsxs(op,{children:[m.jsx(ea,{caret:!0,color:"link",className:e,children:"Paginate"}),m.jsxs(ss,{end:!0,children:[t.map(i=>m.jsxs(Ne,{active:i===n,onClick:()=>r(i),children:[m.jsx("b",{children:i})," items per page"]},i)),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{disabled:n===1/0,onClick:()=>r(1/0),children:m.jsx("i",{children:"Clear pagination"})})]})]}),v4=e=>e.startsWith("hidden_"),oRe=({stats:e,prevStats:t,highlightedStats:n,highlightedLabel:r,max:i,onClick:o,dimensions:a})=>{const s=R.useMemo(()=>Object.entries(e).map(([d,p])=>{const v=(n==null?void 0:n[d])??0,g=(t==null?void 0:t[d])??0,y=v4(d);return{name:d,amount:Math.max(p,g),nonHighlightedAmount:y?null:p-v,highlightedAmount:y?null:v,prevAmount:y?null:g}}),[e,t,n]),l=R.useMemo(()=>{const d=s.reduce((p,{name:v})=>p>v.length?p:v.length,0);return Math.min(150,d*7)},[s]),c=a?R.Fragment:mC,f=R.useMemo(()=>a?{}:{width:"100%",height:Math.max(300,s.length*(t?44:22))},[a,s.length,t]);return m.jsx(c,{...f,children:m.jsxs(Rke,{layout:"vertical",data:s,barCategoryGap:3,...a,children:[m.jsx(Yu,{type:"number",dataKey:"amount",tickFormatter:Gt,domain:i?[0,i]:void 0}),m.jsx(Zu,{type:"category",dataKey:"name",width:l,interval:0,style:{fontSize:".8rem"},tickFormatter:d=>v4(d)?"":d}),m.jsx(ZC,{strokeOpacity:AE()?.05:.9}),m.jsx(Xr,{filterNull:!0,...QB,formatter:(d,p)=>[Gt(d),p==="highlightedAmount"?r:p==="prevAmount"?"Previous period":n?"Non-selected":"Visits"]}),m.jsx(Io,{dataKey:"nonHighlightedAmount",stackId:"main",cursor:"pointer",fill:th,onClick:({name:d})=>o==null?void 0:o(d),children:s.map(d=>m.jsx(Ba,{fill:wre,stroke:th,strokeWidth:2},d.name))}),n&&m.jsx(Io,{dataKey:"highlightedAmount",stackId:"main",cursor:"pointer",fill:qw,onClick:({name:d})=>o==null?void 0:o(d),children:s.map(d=>m.jsx(Ba,{fill:Ore,stroke:qw,strokeWidth:2},d.name))}),t&&m.jsx(Io,{dataKey:"prevAmount",fill:Ey,children:s.map(d=>m.jsx(Ba,{fill:G4e,stroke:Ey,strokeWidth:2},d.name))})]})})},aRe=e=>typeof e=="string"?e.toLowerCase():e,sRe=([e])=>e,lRe=([,e])=>e,Im=({stats:e,prevStats:t,highlightedStats:n,title:r,sortingItems:i,extraHeaderContent:o,withPagination:a=!0,...s})=>{const[l,c]=R.useState({}),[f,d]=R.useState(1),[p,v]=R.useState(50),g=R.useCallback((A,D)=>{const N=Object.entries(A),I=l.field?Tie(N,([F,q])=>aRe(l.field===Object.keys(D)[0]?F:q)):N;return!l.dir||l.dir==="ASC"?I:[...I].reverse()},[l.dir,l.field]),y=R.useCallback(A=>{const D=A[f-1];if(f[`hidden_${I}`,0])]},[f]),x=R.useCallback(A=>m.jsx(gP,{currentPage:f,pagesCount:A,setCurrentPage:d}),[f]),_=R.useCallback((A,D,N,I)=>{const F=g(A,D),q=F.map(sRe),W=N&&Object.entries({...v3(q,q.map(()=>0)),...N}),X=I&&Object.entries({...v3(q,q.map(()=>0)),...I});if(F.length<=p)return{currentPageStats:Object.fromEntries(F),currentPageHighlightedStats:W&&Object.fromEntries(W),currentPagePrevStats:X&&Object.fromEntries(X)};const Q=Mc(F,p),ne=W&&Mc(W,p),Z=X&&Mc(X,p);return{currentPageStats:Object.fromEntries(y(Q)),currentPageHighlightedStats:ne&&Object.fromEntries(y(ne)),currentPagePrevStats:Z&&Object.fromEntries(y(Z)),pagination:x(Q.length),max:oMe(Math.max(...F.map(lRe)))}},[y,g,p,x]),{currentPageStats:b,currentPagePrevStats:w,currentPageHighlightedStats:S,pagination:E,max:C}=R.useMemo(()=>_(e,i,n&&Object.keys(n).length>0?n:void 0,t&&Object.keys(t).length>0?t:void 0),[_,n,t,i,e]),T=R.useMemo(()=>Object.keys(b),[b]);return m.jsx(ZB,{title:m.jsxs(m.Fragment,{children:[r,m.jsx("div",{className:"float-end",children:m.jsx(sp,{isButton:!1,right:!0,items:i,order:l,onChange:(A,D)=>{c({field:A,dir:D}),d(1)}})}),a&&Object.keys(e).length>50&&m.jsx("div",{className:"float-end",children:m.jsx(iRe,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:p,setValue:A=>{v(A),d(1)}})}),o&&m.jsx("div",{className:"float-end",children:o(E?T:void 0)})]}),footer:E,children:m.jsx(oRe,{stats:b,prevStats:w,highlightedStats:S,max:C,...s})})},g4=(e,t)=>{if(!(!t||!(e in t)))return t[e]&&Ja(t[e])||""},nU=()=>{const e=go(),t=ku(),{startDate:n,endDate:r,orphanVisitsType:i,excludeBots:o,loadPrevInterval:a,...s}=t,l=R.useMemo(()=>({dateRange:n!=null||r!=null?L7(n,r):void 0,visitsFilter:{orphanVisitsType:i,excludeBots:o!==void 0?o==="true":void 0},loadPrevInterval:a!==void 0?a==="true":void 0}),[r,o,a,i,n]),c=R.useCallback(f=>{const{dateRange:d,visitsFilter:p={},loadPrevInterval:v}=f0(l,f),{excludeBots:g,orphanVisitsType:y}=p,x={...s,startDate:g4("startDate",d),endDate:g4("endDate",d),excludeBots:g===void 0?void 0:IO(g),orphanVisitsType:y,loadPrevInterval:v===void 0?void 0:IO(v)},_=i0(x),b=_?`?${_}`:"";e(b,{replace:!0,relative:"route"})},[l,e,s]);return[l,c]},cRe=()=>m.jsx(Qke,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),uRe=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}},rU=({toggle:e,isOpen:t,title:n,locations:r=[]})=>m.jsx(yr,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:m.jsxs(Ii,{className:"map-modal__modal-body",children:[m.jsxs("h3",{className:"map-modal__modal-title",children:[n,m.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),m.jsxs(Yke,{...uRe(r),children:[m.jsx(cRe,{}),r.map(({cityName:i,latLong:o,count:a},s)=>m.jsx(Zke,{position:o,children:m.jsxs(Xke,{children:[m.jsx("b",{children:a})," visit",a>1?"s":""," from ",m.jsx("b",{children:i})]})},s))]})]})}),fRe=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=Kt(),[a,s]=Kt(),[l,c]=R.useState([]),f=jE(),d=R.useCallback(p=>{c(p?n.filter(p):n),i()},[n,i]);return m.jsxs(m.Fragment,{children:[!t&&m.jsx(qe,{color:"link",className:"open-map-modal-btn__btn",id:f,onClick:()=>d(),"aria-label":"Show in map",children:m.jsx(je,{icon:hx})}),t&&m.jsxs(as,{isOpen:a,toggle:s,children:[m.jsx(ea,{color:"link",className:"open-map-modal-btn__btn",id:f,children:m.jsx(je,{icon:hx})}),m.jsxs(ss,{end:!0,children:[m.jsx(Ne,{onClick:()=>d(),children:"Show all locations"}),m.jsx(Ne,{onClick:()=>d(({cityName:p})=>t.includes(p)),children:"Show locations in current page"})]})]}),m.jsx(br,{placement:"left",target:f,children:"Show in map"}),m.jsx(rU,{toggle:o,isOpen:r,title:e,locations:l})]})},iU=({onChange:e,selected:t={},className:n,isOrphanVisits:r=!1,withPrevInterval:i=!1,disabled:o})=>{const{orphanVisitsType:a,excludeBots:s=!1,loadPrevInterval:l=!1}=t,c=p=>({active:a===p,onClick:()=>e({...t,orphanVisitsType:p===a?void 0:p})}),f=R.useCallback(()=>e({...t,excludeBots:!s}),[s,e,t]),d=R.useCallback(()=>e({...t,loadPrevInterval:!l}),[l,e,t]);return m.jsxs(na,{disabled:o,text:"More",dropdownClassName:n,end:!0,minWidth:250,children:[i&&m.jsxs(m.Fragment,{children:[m.jsx(Ne,{active:l,onClick:d,children:"Compare with previous period"}),m.jsx(Ne,{divider:!0,tag:"hr"})]}),m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Bots:"}),m.jsx(Ne,{active:s,onClick:f,children:"Exclude potential bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Orphan visits type:"}),m.jsx(Ne,{...c("base_url"),children:"Base URL"}),m.jsx(Ne,{...c("invalid_short_url"),children:"Invalid short URL"}),m.jsx(Ne,{...c("regular_404"),children:"Regular 404"})]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{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:m.jsx("i",{children:"Reset to defaults"})})]})},oU=({info:e})=>{const{loading:t,errorData:n,progress:r}=e;return m.jsxs(m.Fragment,{children:[t&&r===null&&m.jsx(Ho,{loading:!0}),t&&r!==null&&m.jsxs(Ho,{loading:!0,children:["This is going to take a while... :S",m.jsx(WI,{value:r,striped:r>=100,className:"mt-3"})]}),n&&m.jsx(Qn,{type:"error",children:m.jsx(vo,{errorData:n,fallbackMessage:"An error occurred while loading visits :("})})]})},uv=({children:e,showFallback:t})=>m.jsxs(m.Fragment,{children:[t&&m.jsx(Ho,{className:"mt-3",children:"There are no visits matching current filter"}),!t&&m.jsx(m.Fragment,{children:e})]}),dRe=({visitsDeletion:e,deleteVisits:t})=>{const{deleting:n}=e,[r,,i]=Kt();return m.jsx(xt,{title:m.jsx("span",{className:"text-danger fw-bold",children:"Danger zone"}),children:m.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[m.jsxs("dl",{className:"m-0 me-3",children:[m.jsx("dt",{children:"Delete visits."}),m.jsxs("dd",{className:"m-0",children:["This will delete ",m.jsx("b",{children:"all"})," visits, not only the ones matching current filter."]})]}),!r&&m.jsx(qe,{color:"danger",className:"indivisible",onClick:i,children:"Delete visits"}),r&&m.jsxs(qe,{color:"danger",disabled:n,className:"indivisible",onClick:t,innerRef:o=>{o==null||o.focus()},children:[!n&&m.jsx(m.Fragment,{children:"Click again to confirm"}),n&&m.jsx(m.Fragment,{children:"Deleting..."})]})]})})},Dm="Others",hRe=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],pRe=e=>{if(!Ds(e))return{browser:Dm,os:Dm};const{browser:{name:t},os:{name:n}}=iNe.parse(e);return{os:n??Dm,browser:t&&hRe.includes(t)?t:Dm}},mRe=e=>{var t;return Ds(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},aU=(e,t)=>e[t]!==void 0,y4=e=>typeof e=="number"?e:e?parseFloat(e):0,vRe=(e,{os:t})=>{e[t]=(e[t]||0)+1},gRe=(e,{browser:t})=>{e[t]=(e[t]||0)+1},yRe=(e,{referer:t})=>{e[t]=(e[t]||0)+1},sU=e=>(t,n)=>{const r=aU(n,e)?n[e]:"Unknown";t[r]=(t[r]||0)+1},bRe=sU("country"),_Re=sU("city"),xRe=(e,t)=>{if(!aU(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[y4(r),y4(i)]};o.count+=1,e[n]=o},wRe=(e,t)=>{if(!wNe(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},VO=e=>e.reduce((t,n)=>(vRe(t.os,n),gRe(t.browsers,n),yRe(t.referrers,n),bRe(t.countries,n),_Re(t.cities,n),xRe(t.citiesForMap,n),wRe(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),Cy=e=>e.map(t=>{const{userAgent:n,date:r,referer:i,visitLocation:o,potentialBot:a}=t;return{date:r,potentialBot:a,...pRe(n),referer:mRe(i),country:(o==null?void 0:o.countryName)||"Unknown",city:(o==null?void 0:o.cityName)||"Unknown",latitude:o==null?void 0:o.latitude,longitude:o==null?void 0:o.longitude,visitedUrl:t.visitedUrl,type:lP(t)?t.type:void 0}}),ORe=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:Cy,processStatsFromVisits:VO},Symbol.toStringTag,{value:"Module"})),Qf=20,SRe=({browser:e,os:t,referer:n,country:r,city:i,...o},a)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(a.toLowerCase()),ERe=(e,t)=>t.filter(n=>SRe(n,e)),CRe=(e,t)=>rD(t,e),PRe=(e,t,n)=>{const r=t?ERe(t,e):[...e],i=CRe(n,r),o=i.length;return{visitsGroups:Mc(i,Qf),total:o}},Eo="visits-table__header-cell visits-table__sticky",TRe=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia})=>{var i;const o=fP(767,r),[a,s]=R.useState(void 0),l=R.useRef(a),[c,f]=R.useState({}),d=R.useMemo(()=>PRe(e,a,c),[e,a,c]),[p,v]=R.useState(1),g=p*Qf,y=g-Qf,x=R.useMemo(()=>{var S,E;return!!((E=(S=d.visitsGroups[p-1])==null?void 0:S[0])!=null&&E.visitedUrl)},[p,d.visitsGroups]),_=8+Number(x),b=S=>()=>f({field:S,dir:a0(S,c.field,c.dir)}),w=S=>m.jsx(Cd,{currentOrder:c,field:S,className:"visits-table__header-icon"});return R.useEffect(()=>{l.current!==a&&(v(1),n([])),l.current=a},[a,n]),m.jsx("div",{className:"table-responsive-md",children:m.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[m.jsxs("thead",{className:"visits-table__header",children:[m.jsxs("tr",{children:[m.jsxs("th",{className:`${Eo} text-center`,onClick:()=>n(t.length0})})]}),m.jsxs("th",{className:`${Eo} text-center`,onClick:b("potentialBot"),children:[m.jsx("span",{className:"sr-only",children:"Is bot"}),m.jsx(je,{icon:Yj}),w("potentialBot")]}),m.jsxs("th",{className:Eo,onClick:b("date"),children:["Date",w("date")]}),m.jsxs("th",{className:Eo,onClick:b("country"),children:["Country",w("country")]}),m.jsxs("th",{className:Eo,onClick:b("city"),children:["City",w("city")]}),m.jsxs("th",{className:Eo,onClick:b("browser"),children:["Browser",w("browser")]}),m.jsxs("th",{className:Eo,onClick:b("os"),children:["OS",w("os")]}),m.jsxs("th",{className:Eo,onClick:b("referer"),children:["Referrer",w("referer")]}),x&&m.jsxs("th",{className:Eo,onClick:b("visitedUrl"),children:["Visited URL",w("visitedUrl")]})]}),m.jsx("tr",{children:m.jsx("td",{colSpan:_,className:"p-0",children:m.jsx(ap,{noBorder:!0,large:!1,onChange:s})})})]}),m.jsxs("tbody",{children:[d.total===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:_,className:"text-center",children:"There are no visits matching current filter"})}),(i=d.visitsGroups[p-1])==null?void 0:i.map((S,E)=>{const C=t.includes(S);return m.jsxs("tr",{style:{cursor:"pointer"},className:Ce({"table-active":C}),onClick:()=>n(C?t.filter(T=>T!==S):[...t,S]),children:[m.jsx("td",{className:"text-center",children:C&&m.jsx(je,{icon:Gd,className:"text-primary"})}),m.jsx("td",{className:"text-center",children:S.potentialBot&&m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:Yj,id:`botIcon${E}`}),m.jsx(br,{placement:"right",target:`botIcon${E}`,children:"Potentially a visit from a bot or crawler"})]})}),m.jsx("td",{children:m.jsx(Oy,{date:S.date})}),m.jsx("td",{children:S.country}),m.jsx("td",{children:S.city}),m.jsx("td",{children:S.browser}),m.jsx("td",{children:S.os}),m.jsx("td",{children:S.referer}),S.visitedUrl&&m.jsx("td",{children:S.visitedUrl})]},E)})]}),d.total>Qf&&m.jsx("tfoot",{children:m.jsx("tr",{children:m.jsx("td",{colSpan:_,className:"visits-table__footer-cell visits-table__sticky",children:m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-md-6",children:m.jsx(gP,{pagesCount:Math.ceil(d.total/Qf),currentPage:p,setCurrentPage:v,centered:o})}),m.jsx("div",{className:Ce("col-md-6",{"d-flex align-items-center flex-row-reverse":!o,"text-center mt-3":o}),children:m.jsxs("div",{children:["Visits ",m.jsx("b",{children:Gt(y+1)})," to"," ",m.jsx("b",{children:Gt(Math.min(g,d.total))})," of"," ",m.jsx("b",{children:Gt(d.total)})]})})]})})})})]})})},va={byTime:{title:"By time",subPath:"by-time",icon:gK},byContext:{title:"By context",subPath:"by-context",icon:XS},byLocation:{title:"By location",subPath:"by-location",icon:hx},list:{title:"List",subPath:"list",icon:O6},options:{title:"Options",subPath:"options",icon:C6,shouldRender:({deletion:e})=>!!e}};Object.freeze(va);const p_=({display:e})=>e&&m.jsx("div",{className:"mt-3 mx-auto w-75",children:m.jsx(xt,{children:m.jsxs("div",{className:"d-flex gap-2",children:[m.jsx(je,{icon:vq,className:"mt-1"}),m.jsx("i",{children:"Could not calculate previous period because selected one does not have a strictly defined start date."})]})})});let Fm;const Pp=e=>{const{children:t,visitsInfo:n,getVisits:r,cancelGetVisits:i,deletion:o,exportCsv:a,isOrphanVisits:s=!1}=e,{visits:l,prevVisits:c,loading:f,errorData:d,fallbackInterval:p}=n,[{dateRange:v,visitsFilter:g,loadPrevInterval:y},x]=nU(),_=_r("visits"),[b,w]=R.useState(),S=R.useCallback(({startDate:j,endDate:k},U)=>{x({dateRange:{startDate:j??void 0,endDate:k??void 0}}),w(U)},[x]),E=R.useRef(v??p??(_==null?void 0:_.defaultInterval)??"last30Days"),[C,T]=R.useState([]),[A,D]=R.useState(),N=R.useRef(!0),{search:I}=vr(),F=R.useCallback(j=>j?`${j}${I}`:I,[I]),q=R.useMemo(()=>Cy(l),[l]),W=R.useMemo(()=>c&&Cy(c),[c]),{os:X,browsers:Q,referrers:ne,countries:Z,cities:z,citiesForMap:B,visitedUrls:H}=R.useMemo(()=>VO(q),[q]),ee=R.useMemo(()=>VO(W??[]),[W]),K=R.useMemo(()=>Object.fromEntries([["Visits",Object.assign(q,{type:"main"})],W&&["Previous period",Object.assign(W,{type:"previous"})],C.length>0&&[A??"Selected",Object.assign(C,{type:"highlighted"})]].filter(Boolean)),[A,C,W,q]),te=R.useMemo(()=>({...g,excludeBots:g.excludeBots??(_==null?void 0:_.excludeBots),loadPrevInterval:y??(_==null?void 0:_.loadPrevInterval)}),[y,g,_==null?void 0:_.excludeBots,_==null?void 0:_.loadPrevInterval]),ie=R.useMemo(()=>Object.values(B),[B]),ae=R.useCallback(j=>{Fm=void 0,T(j)},[]),fe=R.useCallback((j,k)=>{const U=`${j}_${k}`;Fm===U?(T([]),D(void 0),Fm=void 0):(T(q.filter(J=>J[j]===k)),D(k),Fm=U)},[q]);return R.useEffect(()=>i,[i]),R.useEffect(()=>{const j=v??I7(E.current),{loadPrevInterval:k,...U}=te,J={doIntervalFallback:N.current,loadPrevInterval:k};r({dateRange:j,filter:U},J),ae([]),N.current=!1},[v,g,r,te,ae]),R.useEffect(()=>{p&&E.current===((_==null?void 0:_.defaultInterval)??"last30Days")&&(E.current=p)},[p,_==null?void 0:_.defaultInterval]),m.jsxs(m.Fragment,{children:[t,m.jsx("section",{className:"mt-3",children:m.jsxs("div",{className:"row flex-md-row-reverse",children:[m.jsx("div",{className:"col-lg-7 col-xl-6",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(pP,{disabled:f,dateRangeOrInterval:b??v??E.current,defaultText:"All visits",onDatesChange:S})}),m.jsx(iU,{disabled:f,className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:s,withPrevInterval:!0,selected:te,onChange:({loadPrevInterval:j,...k})=>x({visitsFilter:k,loadPrevInterval:j})})]})}),l.length>0&&m.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:m.jsxs("div",{className:"d-flex",children:[m.jsx(gB,{className:"btn-md-block",amount:q.length,onClick:()=>a(q)}),m.jsxs(qe,{outline:!0,disabled:C.length===0,className:"btn-md-block ms-2",onClick:()=>ae([]),children:["Clear selection ",C.length>0&&m.jsxs(m.Fragment,{children:["(",Gt(C.length),")"]})]})]})})]})}),m.jsxs("section",{className:"mt-3",children:[m.jsx(oU,{info:n}),!f&&!d&&m.jsxs(m.Fragment,{children:[m.jsx(nD,{fill:!0,children:Object.values(va).map(({title:j,icon:k,subPath:U,shouldRender:J},Y)=>!J||J(e)?m.jsxs(pd,{to:F(U),replace:!0,children:[m.jsx(je,{icon:k}),m.jsx("span",{className:"ms-2 d-none d-lg-inline",children:j})]},Y):void 0).filter(Boolean)}),m.jsx(Kn,{children:m.jsxs(qy,{children:[m.jsx(ot,{path:va.byTime.subPath,element:m.jsxs(uv,{showFallback:l.length===0,children:[m.jsx("div",{className:"col-12 mt-3","data-testid":"line-chart-container",children:m.jsx(tU,{visitsGroups:K,setSelectedVisits:ae})}),m.jsx(p_,{display:!!te.loadPrevInterval&&!c})]})}),m.jsx(ot,{path:va.byContext.subPath,element:m.jsxs(uv,{showFallback:l.length===0,children:[m.jsx("div",{className:Ce("mt-3 col-lg-6",{"col-xl-4":!s}),children:m.jsx(p4,{title:"Operating systems",stats:X,prevStats:ee.os})}),m.jsx("div",{className:Ce("mt-3 col-lg-6",{"col-xl-4":!s}),children:m.jsx(p4,{title:"Browsers",stats:Q,prevStats:ee.browsers})}),m.jsx("div",{className:Ce("mt-3",{"col-xl-4":!s,"col-lg-6":s}),children:m.jsx(Im,{title:"Referrers",withPagination:!1,stats:ne,prevStats:ee.referrers,highlightedStats:Mm(C,"referer"),highlightedLabel:A,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:j=>fe("referer",j)})}),s&&m.jsx("div",{className:"mt-3 col-lg-6",children:m.jsx(Im,{title:"Visited URLs",stats:H,prevStats:ee.visitedUrls,highlightedStats:Mm(C,"visitedUrl"),highlightedLabel:A,sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:j=>fe("visitedUrl",j)})}),m.jsx("div",{className:"col-12",children:m.jsx(p_,{display:!!te.loadPrevInterval&&!c})})]})}),m.jsx(ot,{path:va.byLocation.subPath,element:m.jsxs(uv,{showFallback:l.length===0,children:[m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(Im,{title:"Countries",stats:Z,prevStats:ee.countries,highlightedStats:Mm(C,"country"),highlightedLabel:A,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:j=>fe("country",j)})}),m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(Im,{title:"Cities",stats:z,prevStats:ee.cities,highlightedStats:Mm(C,"city"),highlightedLabel:A,extraHeaderContent:j=>ie.length>0&&m.jsx(fRe,{modalTitle:"Cities",locations:ie,activeCities:j}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:j=>fe("city",j)})}),m.jsx("div",{className:"col-12",children:m.jsx(p_,{display:!!te.loadPrevInterval&&!c})})]})}),m.jsx(ot,{path:va.list.subPath,element:m.jsx("div",{className:"col-12",children:m.jsx(TRe,{visits:q,selectedVisits:C,setSelectedVisits:ae})})}),o&&m.jsx(ot,{path:va.options.subPath,element:m.jsx("div",{className:"col-12 mt-3",children:m.jsx(dRe,{...o})})}),m.jsx(ot,{path:"*",element:m.jsx(VS,{replace:!0,to:F(va.byTime.subPath)})})]})})]})]})]})},lU=Ui(({getDomainVisits:e,domainVisits:t,cancelGetDomainVisits:n})=>{const{ReportExporter:r}=Rt(lU),{domain:i=""}=ju(),[o,a=o]=i.split("_"),s=R.useCallback((c,f)=>e({domain:a,options:f,params:c}),[a,e]),l=R.useCallback(c=>r.exportVisits(`domain_${o}_visits.csv`,c),[o,r]);return m.jsx(Pp,{getVisits:s,cancelGetVisits:n,visitsInfo:t,exportCsv:l,children:m.jsx(Cp,{visits:t.visits,title:`"${o}" visits`})})},()=>[tr.visits]),jRe=$t(lU,["ReportExporter"]),cU=Ui(({getNonOrphanVisits:e,nonOrphanVisits:t,cancelGetNonOrphanVisits:n})=>{const{ReportExporter:r}=Rt(cU),i=R.useCallback(a=>r.exportVisits("non_orphan_visits.csv",a),[r]),o=R.useCallback((a,s)=>e({options:s,params:a}),[e]);return m.jsx(Pp,{getVisits:o,cancelGetVisits:n,visitsInfo:t,exportCsv:i,children:m.jsx(Cp,{title:"Non-orphan visits",visits:t.visits})})},()=>[tr.visits]),ARe=$t(cU,["ReportExporter"]),uU=Ui(({getOrphanVisits:e,orphanVisits:t,cancelGetOrphanVisits:n,deleteOrphanVisits:r,orphanVisitsDeletion:i})=>{const o=es("orphanVisitsDeletion"),{ReportExporter:a}=Rt(uU),s=R.useCallback(f=>a.exportVisits("orphan_visits.csv",f),[a]),l=R.useCallback((f,d)=>{var p;return e({options:d,params:f,orphanVisitsType:(p=f.filter)==null?void 0:p.orphanVisitsType})},[e]),c=R.useMemo(()=>o?{deleteVisits:r,visitsDeletion:i}:void 0,[r,i,o]);return m.jsx(Pp,{getVisits:l,cancelGetVisits:n,visitsInfo:t,exportCsv:s,deletion:c,isOrphanVisits:!0,children:m.jsx(Cp,{title:"Orphan visits",visits:t.visits})})},()=>[tr.orphanVisits]),kRe=$t(uU,["ReportExporter"]),fU="shlink/orphanVisits",NRe={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},MRe=e=>Op({typePrefix:`${fU}/getNonOrphanVisits`,createLoaders:({options:t})=>{const n=e(),{doIntervalFallback:r=!1}=t,i=async a=>n.getNonOrphanVisits(a),o=wp(r,a=>n.getNonOrphanVisits(a));return{visitsLoader:i,lastVisitLoader:o}},shouldCancel:t=>t().orphanVisits.cancelLoad}),LRe=e=>Sp({name:fU,initialState:NRe,asyncThunkCreator:e,filterCreatedVisits:({params:t},n)=>{const{startDate:r,endDate:i}=(t==null?void 0:t.dateRange)??{};return n.filter(({visit:o})=>xp(o.date,r,i))}}),dU="shlink/orphanVisits",RRe={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},$Re=(e,t)=>!t||t===e.type,IRe=({data:e,...t},n)=>{const r=e.filter(i=>lP(i)&&$Re(i,n));return{...t,data:r}},DRe=e=>Op({typePrefix:`${dU}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,o=async s=>r.getOrphanVisits({...s,type:t}).then(l=>IRe(l,t)),a=wp(i,s=>r.getOrphanVisits(s));return{visitsLoader:o,lastVisitLoader:a}},shouldCancel:t=>t().orphanVisits.cancelLoad}),FRe=(e,t)=>Sp({name:dU,initialState:RRe,asyncThunkCreator:e,extraReducers:n=>{n.addCase(t.fulfilled,r=>({...r,visits:[]}))},filterCreatedVisits:({params:n},r)=>{const{startDate:i,endDate:o}=(n==null?void 0:n.dateRange)??{};return r.filter(({visit:a,shortUrl:s})=>!s&&xp(a.date,i,o))}}),hU="shlink/orphanVisitsDeletion",b4={deletedVisits:0,deleting:!1,error:!1},BRe=e=>un(`${hU}/deleteOrphanVisits`,()=>e().deleteOrphanVisits()),URe=e=>Qt({name:hU,initialState:b4,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:zr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{deletedVisits:i}=r;return{...b4,deletedVisits:i}})}}),pU="shlink/shortUrlVisits",zRe={visits:[],shortCode:"",loading:!1,errorData:null,cancelLoad:!1,progress:null},VRe=e=>Op({typePrefix:`${pU}/getShortUrlVisits`,createLoaders:({shortCode:t,domain:n,options:r})=>{const i=e(),{doIntervalFallback:o=!1}=r,a=l=>i.getShortUrlVisits(t,{...l,domain:n}),s=wp(o,l=>i.getShortUrlVisits(t,{...l,domain:n}));return{visitsLoader:a,lastVisitLoader:s}},shouldCancel:t=>t().shortUrlVisits.cancelLoad}),WRe=(e,t)=>Sp({name:pU,initialState:zRe,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)=>F7(o,{shortCode:n,domain:r},i==null?void 0:i.dateRange)}),mU="shlink/shortUrlVisitsDeletion",_4={shortCode:"",deletedVisits:0,deleting:!1,error:!1},HRe=e=>un(`${mU}/deleteShortUrlVisits`,async({shortCode:t,domain:n})=>({...await e().deleteShortUrlVisits(t,n),shortCode:t,domain:n})),GRe=e=>Qt({name:mU,initialState:_4,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:zr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{shortCode:i,domain:o,deletedVisits:a}=r;return{..._4,shortCode:i,domain:o,deletedVisits:a}})}}),vU="shlink/tagVisits",KRe={visits:[],tag:"",loading:!1,cancelLoad:!1,errorData:null,progress:null},qRe=e=>Op({typePrefix:`${vU}/getTagVisits`,createLoaders:({tag:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,o=s=>r.getTagVisits(t,s),a=wp(i,async s=>r.getTagVisits(t,s));return{visitsLoader:o,lastVisitLoader:a}},shouldCancel:t=>t().tagVisits.cancelLoad}),YRe=e=>Sp({name:vU,initialState:KRe,asyncThunkCreator:e,filterCreatedVisits:({tag:t,params:n},r)=>U7(r,t,n==null?void 0:n.dateRange)}),gU="shlink/visitsOverview",Bm={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},x4=e=>e.filter(({visit:t})=>t.potentialBot).length,ZRe=e=>un(`${gU}/loadVisitsOverview`,()=>e().getVisitsOverview().then(({nonOrphanVisits:t,visitsCount:n=0,orphanVisits:r,orphanVisitsCount:i=0})=>({nonOrphanVisits:{total:(t==null?void 0:t.total)??n,nonBots:t==null?void 0:t.nonBots,bots:t==null?void 0:t.bots},orphanVisits:{total:(r==null?void 0:r.total)??i,nonBots:r==null?void 0:r.nonBots,bots:r==null?void 0:r.bots}}))),XRe=e=>Qt({name:gU,initialState:Bm,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...Bm,loading:!0})),t.addCase(e.rejected,()=>({...Bm,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...Bm,...r})),t.addCase(Xu,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:a,orphanVisits:s}=ONe(o.createdVisits),l=a.length,c=x4(a),f=l-c,d=s.length,p=x4(s),v=d-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+d,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+v}}})}}),QRe=({shortUrl:e,loading:t,shortUrlVisits:n})=>{const{visits:r}=n,i=(e==null?void 0:e.shortUrl)??"",o=(e==null?void 0:e.longUrl)??"",a=e==null?void 0:e.title;return m.jsxs(Cp,{title:m.jsxs(m.Fragment,{children:["Visits for ",m.jsx(pr,{href:i})]}),visits:r,shortUrl:e,children:[m.jsx("hr",{}),m.jsxs("div",{children:["Created: ",e?m.jsxs("span",{children:[m.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:m.jsx(Oy,{date:e.dateCreated,relative:!0})}),m.jsx(br,{placement:"bottom",target:"created",children:m.jsx(Oy,{date:e.dateCreated})})]}):m.jsx("small",{children:"Loading..."})]}),m.jsxs("div",{className:"long-url-container",children:[`${a?"Title":"Long URL"}: `,t&&m.jsx("small",{children:"Loading..."}),!t&&m.jsx(pr,{href:o,children:a??o})]})]})},yU=Ui(({shortUrlVisits:e,shortUrlVisitsDeletion:t,shortUrlsDetails:n,getShortUrlVisits:r,getShortUrlsDetails:i,deleteShortUrlVisits:o,cancelGetShortUrlVisits:a})=>{const s=es("shortUrlVisitsDeletion"),{ReportExporter:l}=Rt(yU),c=hP(),f=R.useMemo(()=>{var g;return(g=n.shortUrls)==null?void 0:g.get(c)},[c,n.shortUrls]),d=R.useCallback((g,y)=>r({...c,options:y,params:g}),[r,c]),p=R.useCallback(g=>l.exportVisits(`short-url_${f==null?void 0:f.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,g),[l,f==null?void 0:f.shortUrl]),v=R.useMemo(()=>s?{deleteVisits:()=>o(c),visitsDeletion:t}:void 0,[o,c,t,s]);return R.useEffect(()=>{i([c])},[c,i]),m.jsx(Pp,{getVisits:d,cancelGetVisits:a,visitsInfo:e,exportCsv:p,deletion:v,children:m.jsx(QRe,{shortUrl:f,loading:n.loading,shortUrlVisits:e})})},e=>e.shortCode?[tr.shortUrlVisits(iP(e.shortCode))]:[]),JRe=$t(yU,["ReportExporter"]),e$e=({tagVisits:e,colorGenerator:t})=>{const{visits:n,tag:r}=e;return m.jsx(Cp,{title:m.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[m.jsx("span",{className:"me-2",children:"Visits for"}),m.jsx(cb,{text:r,colorGenerator:t})]}),visits:n})},bU=Ui(({getTagVisits:e,tagVisits:t,cancelGetTagVisits:n})=>{const{ColorGenerator:r,ReportExporter:i}=Rt(bU),{tag:o=""}=ju(),a=R.useCallback((l,c)=>e({tag:o,params:l,options:c}),[e,o]),s=R.useCallback(l=>i.exportVisits(`tag_${o}_visits.csv`,l),[i,o]);return m.jsx(Pp,{getVisits:a,cancelGetVisits:n,visitsInfo:t,exportCsv:s,children:m.jsx(e$e,{tagVisits:t,colorGenerator:r})})},()=>[tr.visits]),t$e=$t(bU,["ColorGenerator","ReportExporter"]),bP=({title:e,colors:t,getVisitsForComparison:n,visitsComparisonInfo:r,cancelGetVisitsComparison:i})=>{const{loading:o,visitsGroups:a}=r,s=_r("visits"),l=R.useMemo(()=>Object.keys(a).reduce((b,w,S)=>(b[w]=Object.assign(Cy(a[w]),{color:(t==null?void 0:t[w])??JB(S)}),b),{}),[t,a]),c=R.useMemo(()=>Object.values(a).every(b=>b.length===0),[a]),[{dateRange:f,visitsFilter:d},p]=nU(),[v,g]=R.useState(),y=R.useCallback(({startDate:b,endDate:w},S)=>{p({dateRange:{startDate:b??void 0,endDate:w??void 0}}),g(S)},[p]),x=R.useRef(f??(s==null?void 0:s.defaultInterval)??"last30Days"),_=R.useMemo(()=>({...d,excludeBots:d.excludeBots??(s==null?void 0:s.excludeBots)}),[d,s==null?void 0:s.excludeBots]);return R.useEffect(()=>{const b=f??I7(x.current);return n({params:{dateRange:b,filter:_}}),i},[i,f,n,_]),m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"mb-3",children:m.jsxs(xt,{bodyClassName:"d-flex",children:[m.jsx(lb,{}),m.jsx("h3",{className:"mb-0 flex-grow-1 text-center",children:e})]})}),m.jsx("div",{className:"col-lg-7 col-xl-6 offset-lg-5 offset-xl-6 mb-3",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(pP,{disabled:o,defaultText:"All visits",dateRangeOrInterval:v??x.current,onDatesChange:y})}),m.jsx(iU,{disabled:o,className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:_,onChange:({orphanVisitsType:b,excludeBots:w})=>p({visitsFilter:{orphanVisitsType:b,excludeBots:w}})})]})}),m.jsx(oU,{info:r}),!o&&m.jsx(uv,{showFallback:c,children:m.jsx(tU,{visitsGroups:l})})]})},n$e=Ui(({getDomainVisitsForComparison:e,domainVisitsComparison:t,cancelGetDomainVisitsComparison:n})=>{const r=uP("domains"),i=R.useCallback(o=>e({...o,domains:r}),[r,e]);return m.jsx(bP,{title:`Comparing "${r.join('", "')}"`,getVisitsForComparison:i,visitsComparisonInfo:t,cancelGetVisitsComparison:n})},()=>[tr.visits]),r$e=({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(l=>[l,0])),a=(l,c)=>{o[l]=c;const f=Object.values(o),d=f.reduce((p,v)=>p+v,0);n(d/f.length)},s=Object.entries(e).map(([l,c])=>[l,z7({visitsLoader:c,batchSize:i,shouldCancel:t,progressChanged:f=>a(l,f)})]);return async l=>{const c=await Promise.all(s.map(async([f,d])=>{const p=await d(l);return[f,p]}));return Object.fromEntries(c)}},_P=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=Jn(`${e}/progressChanged`),i=un(e,async(o,{getState:a,dispatch:s})=>{const l=t(o),c=await r$e({visitsLoaders:l,shouldCancel:()=>n(a),progressChanged:f=>s(r(f))})($O(o.params));return{...o,visitsGroups:c}});return Object.assign(i,{progressChanged:r})},xP=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisitsForGroup:r})=>{const{pending:i,rejected:o,fulfilled:a,progressChanged:s}=t,{reducer:l,actions:c}=Qt({name:e,initialState:n,reducers:{cancelGetVisits:d=>({...d,cancelLoad:!0})},extraReducers:d=>{d.addCase(i,()=>({...n,loading:!0})),d.addCase(o,(p,{error:v})=>({...n,errorData:zr(v)??null})),d.addCase(a,(p,{payload:v})=>({...p,...v,loading:!1,progress:null,errorData:null})),d.addCase(s,(p,{payload:v})=>({...p,progress:v})),d.addCase(Xu,(p,{payload:v})=>{const{visitsGroups:g,...y}=p,x=Object.keys(g).map(b=>{const w=r({...y,groupKey:b},v.createdVisits).map(({visit:S})=>S);return[b,[...w,...g[b]]]}),_=Object.fromEntries(x);return{...y,visitsGroups:_}})}}),{cancelGetVisits:f}=c;return{reducer:l,cancelGetVisits:f}},_U="shlink/domainVisitsComparison",i$e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},o$e=e=>_P({typePrefix:`${_U}/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}),a$e=e=>xP({name:_U,initialState:i$e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>B7(r,t,n==null?void 0:n.dateRange)}),xU="shlink/shortUrlVisitsComparison",s$e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},l$e=e=>_P({typePrefix:`${xU}/getShortUrlVisitsForComparison`,createLoaders:({shortUrls:t})=>{const n=e(),r=t.map(i=>[oP(i),o=>n.getShortUrlVisits(i.shortCode,{...o,domain:i.domain})]);return Object.fromEntries(r)},shouldCancel:t=>t().shortUrlVisitsComparison.cancelLoad}),c$e=e=>xP({name:xU,initialState:s$e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>F7(r,A7(t),n==null?void 0:n.dateRange)}),wU="shlink/tagVisitsComparison",u$e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},f$e=e=>_P({typePrefix:`${wU}/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}),d$e=e=>xP({name:wU,initialState:u$e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>U7(r,t,n==null?void 0:n.dateRange)}),h$e=Ui(({getShortUrlVisitsForComparison:e,shortUrlVisitsComparison:t,cancelGetShortUrlVisitsComparison:n,shortUrlsDetails:r,getShortUrlsDetails:i})=>{const o=uP("short-urls"),a=R.useMemo(()=>o.map(A7),[o]),s=R.useCallback(f=>e({...f,shortUrls:a}),[e,a]),l=R.useMemo(()=>{var f;return[...((f=r.shortUrls)==null?void 0:f.values())??[]]},[r.shortUrls]),c=R.useMemo(()=>{const{visitsGroups:f,loading:d,...p}=t,v=l.reduce((g,y)=>(g[y.shortUrl]=f[oP(y)]??[],g),{});return{...p,visitsGroups:v,loading:d||r.loading}},[t,r.loading,l]);return R.useEffect(()=>{a.length>0&&i(a)},[i,a]),m.jsx(bP,{title:m.jsx("span",{"data-testid":"title",children:r.loading?"Loading...":`Comparing ${l.length} short URLs`}),getVisitsForComparison:s,visitsComparisonInfo:c,cancelGetVisitsComparison:n})},()=>[tr.visits]),OU=Ui(({getTagVisitsForComparison:e,tagVisitsComparison:t,cancelGetTagVisitsComparison:n})=>{const{ColorGenerator:r}=Rt(OU),i=uP("tags"),o=R.useCallback(l=>e({...l,tags:i}),[e,i]),{visitsGroups:a}=t,s=R.useMemo(()=>Object.keys(a).reduce((l,c)=>(l[c]=r.getColorForKey(c),l),{}),[r,a]);return m.jsx(bP,{title:m.jsxs(m.Fragment,{children:["Comparing ",i.map(l=>m.jsx(cb,{colorGenerator:r,text:l},l))]}),getVisitsForComparison:o,visitsComparisonInfo:t,cancelGetVisitsComparison:n,colors:s})},()=>[tr.visits]),p$e=$t(OU,["ColorGenerator"]),m$e=(e,t)=>{const n=(r,i)=>t([...r,"mercureInfo"],[...i,"createNewVisits","loadMercureInfo"]);e.serviceFactory("MapModal",()=>rU),e.factory("ShortUrlVisits",JRe),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlVisitsDeletion","shortUrlsDetails","mercureInfo"],["getShortUrlVisits","deleteShortUrlVisits","getShortUrlsDetails","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.factory("TagVisits",t$e),e.decorator("TagVisits",n(["tagVisits"],["getTagVisits","cancelGetTagVisits"])),e.factory("TagVisitsComparison",p$e),e.decorator("TagVisitsComparison",n(["tagVisitsComparison"],["getTagVisitsForComparison","cancelGetTagVisitsForComparison"])),e.serviceFactory("DomainVisitsComparison",()=>n$e),e.decorator("DomainVisitsComparison",n(["domainVisitsComparison"],["getDomainVisitsForComparison","cancelGetDomainVisitsForComparison"])),e.serviceFactory("ShortUrlVisitsComparison",()=>h$e),e.decorator("ShortUrlVisitsComparison",n(["shortUrlVisitsComparison","shortUrlsDetails"],["getShortUrlVisitsForComparison","cancelGetShortUrlVisitsForComparison","getShortUrlsDetails"])),e.factory("DomainVisits",jRe),e.decorator("DomainVisits",n(["domainVisits"],["getDomainVisits","cancelGetDomainVisits"])),e.factory("OrphanVisits",kRe),e.decorator("OrphanVisits",n(["orphanVisits","orphanVisitsDeletion"],["getOrphanVisits","cancelGetOrphanVisits","deleteOrphanVisits"])),e.factory("NonOrphanVisits",ARe),e.decorator("NonOrphanVisits",n(["nonOrphanVisits"],["getNonOrphanVisits","cancelGetNonOrphanVisits"])),e.serviceFactory("VisitsParser",()=>ORe),e.serviceFactory("getShortUrlVisits",VRe,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",r=>r.cancelGetVisits,"shortUrlVisitsReducerCreator"),e.serviceFactory("getShortUrlVisitsForComparison",l$e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisitsForComparison",r=>r.cancelGetVisits,"shortUrlVisitsComparisonReducerCreator"),e.serviceFactory("deleteShortUrlVisits",HRe,"apiClientFactory"),e.serviceFactory("getTagVisits",qRe,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",r=>r.cancelGetVisits,"tagVisitsReducerCreator"),e.serviceFactory("getTagVisitsForComparison",f$e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisitsForComparison",r=>r.cancelGetVisits,"tagVisitsComparisonReducerCreator"),e.serviceFactory("getDomainVisits",NNe,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",r=>r.cancelGetVisits,"domainVisitsReducerCreator"),e.serviceFactory("getDomainVisitsForComparison",o$e,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisitsForComparison",r=>r.cancelGetVisits,"domainVisitsComparisonReducerCreator"),e.serviceFactory("getOrphanVisits",DRe,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",r=>r.cancelGetVisits,"orphanVisitsReducerCreator"),e.serviceFactory("deleteOrphanVisits",BRe,"apiClientFactory"),e.serviceFactory("getNonOrphanVisits",MRe,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",r=>r.cancelGetVisits,"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>Xu),e.serviceFactory("loadVisitsOverview",ZRe,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",XRe,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",r=>r.reducer,"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",MNe,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",r=>r.reducer,"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",LRe,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",r=>r.reducer,"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",FRe,"getOrphanVisits","deleteOrphanVisits"),e.serviceFactory("orphanVisitsReducer",r=>r.reducer,"orphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsDeletionReducerCreator",URe,"deleteOrphanVisits"),e.serviceFactory("orphanVisitsDeletionReducer",r=>r.reducer,"orphanVisitsDeletionReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",WRe,"getShortUrlVisits","deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",r=>r.reducer,"shortUrlVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsDeletionReducerCreator",GRe,"deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsDeletionReducer",r=>r.reducer,"shortUrlVisitsDeletionReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",YRe,"getTagVisits"),e.serviceFactory("tagVisitsReducer",r=>r.reducer,"tagVisitsReducerCreator"),e.serviceFactory("tagVisitsComparisonReducerCreator",d$e,"getTagVisitsForComparison"),e.serviceFactory("tagVisitsComparisonReducer",r=>r.reducer,"tagVisitsComparisonReducerCreator"),e.serviceFactory("domainVisitsComparisonReducerCreator",a$e,"getDomainVisitsForComparison"),e.serviceFactory("domainVisitsComparisonReducer",r=>r.reducer,"domainVisitsComparisonReducerCreator"),e.serviceFactory("shortUrlVisitsComparisonReducerCreator",c$e,"getShortUrlVisitsForComparison"),e.serviceFactory("shortUrlVisitsComparisonReducer",r=>r.reducer,"shortUrlVisitsComparisonReducerCreator")},Df=({children:e,to:t,className:n,...r})=>m.jsx(s6,{className:({isActive:i})=>Ce("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),v$e=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=vr(),r=Ce("aside-menu",{"aside-menu--hidden":!t}),i=o=>`${e}${o}`;return m.jsx("aside",{className:r,children:m.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[m.jsxs(Df,{to:i("/overview"),children:[m.jsx(je,{fixedWidth:!0,icon:qK}),m.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),m.jsxs(Df,{to:i("/list-short-urls/1"),className:Ce({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[m.jsx(je,{fixedWidth:!0,icon:O6}),m.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),m.jsxs(Df,{to:i("/create-short-url"),children:[m.jsx(je,{fixedWidth:!0,icon:eq,flip:"horizontal"}),m.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),m.jsxs(Df,{to:i("/manage-tags"),children:[m.jsx(je,{fixedWidth:!0,icon:S6}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),m.jsxs(Df,{to:i("/manage-domains"),children:[m.jsx(je,{fixedWidth:!0,icon:CK}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})},SU=({createNotFound:e})=>{const{TagsList:t,ShortUrlsList:n,CreateShortUrl:r,ShortUrlVisits:i,TagVisits:o,DomainVisits:a,OrphanVisits:s,NonOrphanVisits:l,Overview:c,EditShortUrl:f,ManageDomains:d,TagVisitsComparison:p,DomainVisitsComparison:v,ShortUrlVisitsComparison:g,ShortUrlRedirectRules:y}=Rt(SU),x=vr(),_=ps(),[b,w,S,E]=Kt();R.useEffect(()=>E(),[x,E]);const C=Ce("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":b}),T=INe(S,E),A=es("shortUrlRedirectRules");return m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:xK,className:C,onClick:w}),m.jsx("div",{...T,className:"shlink-layout__swipeable",children:m.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[m.jsx(v$e,{routePrefix:_,showOnMobile:b}),m.jsx("div",{className:"shlink-layout__container",onPointerDown:()=>E(),children:m.jsx("div",{className:"container-xl",children:m.jsxs(qy,{children:[m.jsx(ot,{index:!0,element:m.jsx(VS,{replace:!0,to:"overview"})}),m.jsx(ot,{path:"/overview",element:m.jsx(c,{})}),m.jsx(ot,{path:"/list-short-urls/:page",element:m.jsx(n,{})}),m.jsx(ot,{path:"/create-short-url",element:m.jsx(r,{})}),m.jsx(ot,{path:"/short-code/:shortCode/visits/*",element:m.jsx(i,{})}),m.jsx(ot,{path:"/short-code/:shortCode/edit",element:m.jsx(f,{})}),A&&m.jsx(ot,{path:"/short-code/:shortCode/redirect-rules",element:m.jsx(y,{})}),m.jsx(ot,{path:"/short-urls/compare-visits",element:m.jsx(g,{})}),m.jsx(ot,{path:"/tag/:tag/visits/*",element:m.jsx(o,{})}),m.jsx(ot,{path:"/tags/compare-visits",element:m.jsx(p,{})}),m.jsx(ot,{path:"/domain/:domain/visits/*",element:m.jsx(a,{})}),m.jsx(ot,{path:"/orphan-visits/*",element:m.jsx(s,{})}),m.jsx(ot,{path:"/non-orphan-visits/*",element:m.jsx(l,{})}),m.jsx(ot,{path:"/manage-tags",element:m.jsx(t,{})}),m.jsx(ot,{path:"/manage-domains",element:m.jsx(d,{})}),m.jsx(ot,{path:"/domains/compare-visits",element:m.jsx(v,{})}),e&&m.jsx(ot,{path:"*",element:e("/list-short-urls/1")})]})})})]})})]})},g$e=$t(SU,["TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains","TagVisitsComparison","DomainVisitsComparison","ShortUrlVisitsComparison","ShortUrlRedirectRules"]),y$e=!0,b$e=e=>gD({devTools:!y$e,reducer:ME({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})}),_$e=e=>{e.factory("Main",g$e),e.factory("store",b$e)},zi=new y6,{container:x$e}=zi,w$e=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),O$e=(e,t)=>(...n)=>e[t](...n),S$e=(e,t)=>({...e,[t]:O$e(x$e,t)}),Qu=(e,t=[])=>q$(e?w$e(e):null,t.reduce(S$e,{}));_$e(zi);o4e(zi,Qu);T4e(zi,Qu);m$e(zi,Qu);ZNe(zi);KNe(zi,Qu);sMe(zi,Qu);W4e(zi);vLe(zi,Qu);let w4;const E$e=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:a})=>{const s=$Le(t),l=R.useRef(),[c,f]=R.useState(),d=El(),p=R.useMemo(()=>d?R.Fragment:a6,[d]);return R.useEffect(()=>{w4=n,e.value("apiClientFactory",()=>w4),a&&e.value("TagColorsStorage",a);const{container:v}=e,{Main:g,store:y,loadMercureInfo:x,listTags:_}=v;l.current=m.jsx(g,{createNotFound:o}),f(y),y.dispatch(x(r)),y.dispatch(_())},[n,o,r,a]),c?m.jsx(Y$,{store:c,children:m.jsx(RD,{value:r??{},children:m.jsx(RLe,{value:s,children:m.jsx(fNe,{value:i,children:m.jsx(p,{children:l.current})})})})}):m.jsx(m.Fragment,{})},C$e="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=",P$e="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==",T$e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",j$e=()=>{delete zL.Icon.Default.prototype._getIconUrl,zL.Icon.Default.mergeOptions({iconRetinaUrl:P$e,iconUrl:C$e,shadowUrl:T$e})};j$e();const A$e=E$e(zi);function Py(e){return t=>{const{resetSelectedServer:n}=t;return R.useEffect(()=>{n()},[n]),m.jsx(e,{...t})}}let k$e=class extends R.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 m.jsx("div",{className:"home",children:m.jsxs(xt,{className:"p-4",children:[m.jsx("h1",{children:"Oops! This is awkward :S"}),m.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),m.jsx("br",{}),m.jsx(qe,{outline:!0,color:"primary",onClick:()=>n.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}};const N$e=({id:e,name:t})=>m.jsxs(YI,{tag:St,to:`/server/${e}`,className:"servers-list__server-item",children:[t,m.jsx(je,{icon:aq,className:"servers-list__server-item-icon"})]}),EU=({servers:e,children:t,embedded:n=!1})=>m.jsxs(m.Fragment,{children:[t&&m.jsx("div",{"data-testid":"title",className:"mb-0 fs-5 fw-normal lh-sm",children:t}),e.length>0&&m.jsx(KI,{"data-testid":"list",tag:"div",className:Ce("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>m.jsx(N$e,{id:r,name:i},r))})]}),CU=({color:e=th,className:t})=>m.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:m.jsxs("g",{fill:e,children:[m.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"}),m.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"}),m.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"}),m.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"})]})}),M$e=({servers:e})=>{const t=go(),n=Object.values(e),r=n.length>0;return R.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[n,t]),m.jsx("div",{className:"home",children:m.jsx(mr,{className:"home__main-card",children:m.jsxs(Kn,{className:"g-0",children:[m.jsx("div",{className:"col-md-5 d-none d-md-block",children:m.jsx("div",{className:"home__logo-wrapper",children:m.jsx("div",{className:"home__logo",children:m.jsx(CU,{})})})}),m.jsxs("div",{className:"col-md-7 home__servers-container",children:[m.jsx("div",{className:"home__title-wrapper",children:m.jsx("h1",{className:"home__title",children:"Welcome!"})}),m.jsx(EU,{embedded:!0,servers:n,children:!r&&m.jsxs("div",{className:"p-4 text-center",children:[m.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),m.jsx("p",{children:m.jsxs(St,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[m.jsx(je,{icon:ep})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]})}),m.jsx("p",{className:"mb-0 mt-5",children:m.jsx(pr,{href:"https://shlink.io/documentation",children:m.jsxs("small",{children:[m.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",m.jsx(je,{icon:DK})]})})})]})})]})]})})})},PU=()=>{const{ServersDropdown:e}=Di(PU),[t,n,,r]=Kt(),i=vr(),{pathname:o}=i;R.useEffect(r,[i,r]);const a="/settings",s=Ce("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return m.jsxs(vI,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[m.jsxs(gI,{tag:St,to:"/",children:[m.jsx(CU,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),m.jsx(yI,{onClick:n,children:m.jsx(je,{icon:rq,className:s})}),m.jsx(OE,{navbar:!0,isOpen:t,children:m.jsxs(hE,{navbar:!0,className:"ms-auto",children:[m.jsx(pE,{children:m.jsxs(mE,{tag:St,to:a,active:o.startsWith(a),children:[m.jsx(je,{icon:cq}),"  Settings"]})}),m.jsx(e,{})]})})]})},L$e=Fi(PU,["ServersDropdown"]),R$e=({children:e})=>{const t=vr();return R.useEffect(()=>{scrollTo(0,0)},[t]),m.jsx(m.Fragment,{children:e})},TU=xD(e=>e,e=>{try{return i2(e,e,"=")}catch{return!1}}),jU=e=>TU(e)?`v${e}`:e,AU=(e,t="latest")=>TU(e)?e:t,$$e="%_VERSION_%",I$e=e=>jU(AU(e)),O4=({project:e,version:t})=>m.jsx(pr,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:m.jsx("b",{children:t})}),D$e=({selectedServer:e,clientVersion:t=$$e})=>{const n=I$e(t);return m.jsxs("small",{className:"text-muted",children:[qS(e)&&m.jsxs(m.Fragment,{children:["Server: ",m.jsx(O4,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",m.jsx(O4,{project:"shlink-web-client",version:n})]})},F$e=({selectedServer:e})=>m.jsx("div",{className:Ce("text-center",{"shlink-versions-container--with-sidebar":qS(e)}),children:m.jsx(D$e,{selectedServer:e})}),Ju=({children:e})=>m.jsx("div",{className:"no-menu-wrapper container-xl",children:e});function kU(e){const t=n=>{const{ServerError:r}=Di(t),i=ju(),{selectServer:o,selectedServer:a}=n;return R.useEffect(()=>{i.serverId&&o(i.serverId)},[i.serverId,o]),a?cK(a)?m.jsx(r,{}):m.jsx(e,{...n}):m.jsx(Ju,{children:m.jsx(Ho,{loading:!0})})};return t}const NU=kU(R.memo(({selectedServer:e,settings:t})=>{const{buildShlinkApiClient:n,TagColorsStorage:r,ShlinkWebComponent:i,ServerError:o}=Di(NU);if(!qS(e))return m.jsx(o,{});const a=`/server/${e.id}`;return m.jsx(i,{serverVersion:e.version,apiClient:n(e),settings:t,routesPrefix:a,tagColorsStorage:r,createNotFound:s=>m.jsx(iD,{to:`${a}${s}`,children:"List short URLs"})})})),B$e=Fi(NU,["buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"]),U$e=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",Cie,"fetch"),e.serviceFactory("ScrollToTop",()=>R$e),e.factory("MainHeader",L$e),e.serviceFactory("Home",()=>M$e),e.decorator("Home",Py),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("ShlinkWebComponent",()=>A$e),e.factory("ShlinkWebComponentContainer",B$e),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>F$e),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",()=>k$e)},MU=()=>{const e=go();return R.useCallback(()=>e(-1),[e])},LU=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return m.jsxs(yr,{centered:!0,isOpen:e,children:[m.jsxs(yo,{children:["Duplicated server",i&&"s"]}),m.jsxs(Ii,{children:[m.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),m.jsx("ul",{children:t.map(({url:o,apiKey:a},s)=>i?m.jsxs("li",{children:[m.jsx("b",{children:o})," - ",m.jsx("b",{children:a})]},s):m.jsxs(R.Fragment,{children:[m.jsxs("li",{children:["URL: ",m.jsx("b",{children:o})]}),m.jsxs("li",{children:["API key: ",m.jsx("b",{children:a})]})]},s))}),m.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),m.jsxs(ls,{children:[m.jsx(qe,{color:"link",onClick:n,children:i?"Ignore duplicates":"Discard"}),m.jsx(qe,{color:"primary",onClick:r,children:"Save anyway"})]})]})},z$e=e=>t=>{t.preventDefault(),e()},RU=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=R.useState(""),[a,s]=R.useState(""),[l,c]=R.useState(""),f=z$e(()=>e({name:i,url:a,apiKey:l}));return R.useEffect(()=>{t&&(o(t.name),s(t.url),c(t.apiKey))},[t]),m.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[m.jsxs(xt,{className:"mb-3",title:r,children:[m.jsx(iv,{value:i,onChange:o,children:"Name"}),m.jsx(iv,{type:"url",value:a,onChange:s,children:"URL"}),m.jsx(iv,{value:l,onChange:c,children:"API key"})]}),m.jsx("div",{className:"text-end",children:n})]})},S4=4e3,E4=({type:e})=>m.jsx("div",{className:"mt-3",children:m.jsxs(Qn,{type:e,children:[e==="success"&&"Servers properly imported. You can now select one from the list :)",e==="error"&&"The servers could not be imported. Make sure the format is correct."]})}),$U=({servers:e,createServers:t})=>{const{ImportServersBtn:n,useTimeoutToggle:r}=Di($U),i=go(),o=MU(),a=!!Object.keys(e).length,[s,l]=r(!1,S4),[c,f]=r(!1,S4),[d,p]=Kt(),[v,g]=R.useState(),y=R.useCallback(x=>{const _=TE();t([{...x,id:_}]),i(`/server/${_}`)},[t,i]);return R.useEffect(()=>{if(!v)return;Object.values(e).some(({url:_,apiKey:b})=>(v==null?void 0:v.url)===_&&(v==null?void 0:v.apiKey)===b)?p():y(v)},[y,v,e,p]),m.jsxs(Ju,{children:[m.jsxs(RU,{title:m.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:g,children:[!a&&m.jsx(n,{tooltipPlacement:"top",onImport:l,onImportError:f}),a&&m.jsx(qe,{outline:!0,onClick:o,children:"Cancel"}),m.jsx(qe,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),s&&m.jsx(E4,{type:"success"}),c&&m.jsx(E4,{type:"error"}),m.jsx(LU,{isOpen:d,duplicatedServers:v?[v]:[],onDiscard:o,onSave:()=>v&&y(v)})]})},V$e=Fi($U,["ImportServersBtn","useTimeoutToggle"]),IU=({server:e,className:t,children:n,textClassName:r})=>{const{DeleteServerModal:i}=Di(IU),[o,,a,s]=Kt();return m.jsxs(m.Fragment,{children:[m.jsxs("button",{type:"button",className:Ce(t,"p-0 bg-transparent border-0"),onClick:a,children:[!n&&m.jsx(je,{fixedWidth:!0,icon:YS}),m.jsx("span",{className:r,children:n??"Remove this server"})]}),m.jsx(i,{server:e,isOpen:o,toggle:s})]})},W$e=Fi(IU,["DeleteServerModal"]),H$e=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=go(),a=R.useRef(!1),s=()=>{a.current=!0,t()},l=()=>{a.current&&(r(e),i&&o("/"))};return m.jsxs(yr,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[m.jsx(yo,{toggle:t,className:"text-danger",children:"Remove server"}),m.jsxs(Ii,{children:[m.jsxs("p",{children:["Are you sure you want to remove ",m.jsx("b",{children:e?e.name:""}),"?"]}),m.jsx("p",{children:m.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."})})]}),m.jsxs(ls,{children:[m.jsx(qe,{color:"link",onClick:t,children:"Cancel"}),m.jsx(qe,{color:"danger",onClick:s,children:"Delete"})]})]})},G$e=kU(({editServer:e,selectedServer:t,selectServer:n})=>{const r=MU(),{reconnect:i}=ku();if(!ld(t))return null;const o=a=>{e(t.id,a),i==="true"&&n(t.id),r()};return m.jsx(Ju,{children:m.jsxs(RU,{title:m.jsxs("h5",{className:"mb-0",children:['Edit "',t.name,'"']}),initialValues:t,onSubmit:o,children:[m.jsx(qe,{outline:!0,className:"me-2",onClick:r,children:"Cancel"}),m.jsx(qe,{outline:!0,color:"primary",children:"Save"})]})})}),K$e=Fi(G$e,["ServerError"]),C4=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),DU=({createServers:e,servers:t,children:n,onImport:r=()=>{},onImportError:i=()=>{},tooltipPlacement:o="bottom",className:a=""})=>{const{ServersImporter:s}=Di(DU),l=ta(),[c,f]=R.useState([]),[d,,p,v]=Kt(),g=R.useRef([]),y=R.useCallback(w=>{e(w),r()},[e,r]),x=R.useCallback(async({target:w})=>{var S;return s.importServersFromFile((S=w.files)==null?void 0:S[0]).then(E=>{g.current=E;const C=Object.values(t),T=E.filter(D=>C4(C,D));!!T.length?(f(T),p()):y(E)}).then(()=>{w.value=null}).catch(i)},[y,i,t,s,p]),_=R.useCallback(()=>{y(g.current),v()},[y,v,g]),b=R.useCallback(()=>{y(g.current.filter(w=>!C4(c,w))),v()},[y,c,v]);return m.jsxs(m.Fragment,{children:[m.jsxs(qe,{outline:!0,id:"importBtn",className:a,onClick:()=>{var w;return(w=l.current)==null?void 0:w.click()},children:[m.jsx(je,{icon:jK,fixedWidth:!0})," ",n??"Import from file"]}),m.jsxs(br,{placement:o,target:"importBtn",children:["You can create servers by importing a CSV file with ",m.jsx("b",{children:"name"}),", ",m.jsx("b",{children:"apiKey"})," and ",m.jsx("b",{children:"url"})," columns."]}),m.jsx("input",{type:"file",accept:".csv",className:"d-none",ref:l,onChange:x,"aria-hidden":!0}),m.jsx(LU,{isOpen:d,duplicatedServers:c,onDiscard:b,onSave:_})]})},q$e=Fi(DU,["ServersImporter"]),FU=({servers:e,selectedServer:t})=>{const{DeleteServerButton:n}=Di(FU);return m.jsx(Ju,{children:m.jsxs("div",{className:"server-error__container flex-column",children:[m.jsxs(Ho,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!ld(t)&&"Could not find this Shlink server.",ld(t)&&m.jsxs(m.Fragment,{children:[m.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."]})]}),m.jsx(EU,{servers:Object.values(e),children:m.jsxs("p",{className:"mb-md-3",children:["These are the Shlink servers currently configured. Choose one of them or ",m.jsx(St,{to:"/server/create",children:"add a new one"}),"."]})}),ld(t)&&m.jsx("div",{className:"container mt-3 mt-md-5",children:m.jsxs("p",{className:"fs-5 fw-normal lh-sm",children:["Alternatively, if you think you may have miss-configured this server, you can ",m.jsx(n,{server:t,className:"server-error__delete-btn",children:"remove it"})," or ",m.jsx(St,{to:`/server/${t.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})})},Y$e=Fi(FU,["DeleteServerButton"]),Z$e=4e3,BU=({servers:e})=>{const{ServersExporter:t,ImportServersBtn:n,useTimeoutToggle:r,ManageServersRow:i}=Di(BU),o=Object.values(e),[a,s]=R.useState(o),l=p=>s(o.filter(({name:v,url:g})=>`${v} ${g}`.toLowerCase().match(p.toLowerCase()))),c=a.some(({autoConnect:p})=>!!p),[f,d]=r(!1,Z$e);return R.useEffect(()=>{s(Object.values(e))},[e]),m.jsxs(Ju,{children:[m.jsx(ap,{className:"mb-3",onChange:l}),m.jsxs(Kn,{className:"mb-3",children:[m.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[m.jsx(n,{className:"flex-fill",onImportError:d,children:"Import servers"}),o.length>0&&m.jsxs(qe,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>t.exportServers(),children:[m.jsx(je,{icon:E6,fixedWidth:!0})," Export servers"]})]}),m.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:m.jsxs(qe,{outline:!0,color:"primary",className:"flex-fill",tag:St,to:"/server/create",children:[m.jsx(je,{icon:ep,fixedWidth:!0})," Add a server"]})})]}),m.jsx(xt,{children:m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsx("thead",{className:"responsive-table__header",children:m.jsxs("tr",{children:[c&&m.jsx("th",{style:{width:"50px"},children:m.jsx("span",{className:"sr-only",children:"Auto-connect"})}),m.jsx("th",{children:"Name"}),m.jsx("th",{children:"Base URL"}),m.jsx("th",{children:m.jsx("span",{className:"sr-only",children:"Options"})})]})}),m.jsxs("tbody",{children:[!a.length&&m.jsx("tr",{className:"text-center",children:m.jsx("td",{colSpan:4,children:"No servers found."})}),a.map(p=>m.jsx(i,{server:p,hasAutoConnect:c},p.id))]})]})}),f&&m.jsx("div",{className:"mt-3",children:m.jsx(Qn,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},X$e=Fi(BU,["ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"]),UU=({server:e,hasAutoConnect:t})=>{const{ManageServersRowDropdown:n}=Di(UU);return m.jsxs("tr",{className:"responsive-table__row",children:[t&&m.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:e.autoConnect&&m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:Gd,className:"text-primary",id:"autoConnectIcon"}),m.jsx(br,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),m.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:m.jsx(St,{to:`/server/${e.id}`,children:e.name})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:e.url}),m.jsx("td",{className:"responsive-table__cell text-end",children:m.jsx(n,{server:e})})]})},Q$e=Fi(UU,["ManageServersRowDropdown"]),zU=({server:e,setAutoConnect:t})=>{const{DeleteServerModal:n}=Di(zU),[r,,i,o]=Kt(),a=`/server/${e.id}`,{autoConnect:s}=e,l=s?PK:Rae;return m.jsxs(o0,{minWidth:s?210:170,children:[m.jsxs(Ne,{tag:St,to:a,children:[m.jsx(je,{icon:EK,fixedWidth:!0})," Connect"]}),m.jsxs(Ne,{tag:St,to:`${a}/edit`,children:[m.jsx(je,{icon:ZS,fixedWidth:!0})," Edit server"]}),m.jsxs(Ne,{onClick:()=>t(e,!s),children:[m.jsx(je,{icon:l,fixedWidth:!0})," ",s?"Do not a":"A","uto-connect"]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{className:"dropdown-item--danger",onClick:i,children:[m.jsx(je,{icon:YS,fixedWidth:!0})," Remove server"]}),m.jsx(n,{redirectHome:!1,server:e,isOpen:r,toggle:o})]})},J$e=Fi(zU,["DeleteServerModal"]),VU=(e,t)=>bD(e,t,{serializeError:n=>n}),e6e={},t6e=e=>"id"in e?e:{...e,id:TE()},n6e=e=>e.reduce((t,n)=>({...t,[n.id]:n}),{}),{actions:r6e,reducer:i6e}=Qt({name:"shlink/servers",initialState:e6e,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:n6e(e.map(t6e))}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:o6e,deleteServer:a6e,setAutoConnect:s6e,createServers:WU}=r6e,l6e=i6e,c6e=e=>Array.isArray(e)?e.filter(b6):[],u6e=e=>VU("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.jsonRequest(`${Bv.homepage}/servers.json`),i=c6e(r);n(WU(i))}),wP="shlink/selectedServer",f6e="1.0.0",d6e="999.999.999",h6e="latest",p6e=e=>AU(e===h6e?d6e:e,f6e),m6e=xD(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:p6e(n),printableVersion:jU(n)}))),P4=null,OP=Jn(`${wP}/resetSelectedServer`),v6e=e=>VU(`${wP}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(OP());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const a=e(o),{version:s,printableVersion:l}=await m6e(o,()=>a.health());return{...o,version:s,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),g6e=e=>Qt({name:wP,initialState:P4,reducers:{},extraReducers:t=>{t.addCase(OP,()=>P4),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),y6e=({servers:e,selectedServer:t})=>{const n=Object.values(e),r=()=>n.length===0?m.jsxs(Ne,{tag:St,to:"/server/create",children:[m.jsx(je,{icon:ep})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]}):m.jsxs(m.Fragment,{children:[n.map(({name:i,id:o})=>m.jsx(Ne,{tag:St,to:`/server/${o}`,active:uK(t)===o,children:i},o)),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{tag:St,to:"/manage-servers",children:[m.jsx(je,{icon:Kj})," ",m.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return m.jsxs(op,{nav:!0,inNavbar:!0,children:[m.jsxs(ea,{nav:!0,caret:!0,children:[m.jsx(je,{icon:Kj})," ",m.jsx("span",{className:"ms-1",children:"Servers"})]}),m.jsx(ss,{end:!0,style:{right:0},children:r()})]})},b6e=({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)},_6e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);b6e(e,i,n)},x6e="shlink-servers.csv";class w6e{constructor(t,n,r){Ul(this,"exportServers",async()=>{const t=Object.values(this.storage.get("servers")??{}).map(fK);try{const n=this.jsonToCsv(t);_6e(this.window,n,x6e)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const O6e=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",S6e=e=>Array.isArray(e)&&e.every(O6e);class E6e{constructor(t){this.csvToJson=t}async importServersFromFile(t){if(!t)throw new Error("No file provided");const n=await t.text(),r=await this.csvToJson(n);if(!S6e(r))throw new Error("Provided file does not have the right format.");return r}}const C6e=(e,t)=>{e.factory("ManageServers",X$e),e.decorator("ManageServers",Py),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.factory("ManageServersRow",Q$e),e.factory("ManageServersRowDropdown",J$e),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.factory("CreateServer",V$e),e.decorator("CreateServer",Py),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.factory("EditServer",K$e),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>y6e),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>H$e),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.factory("DeleteServerButton",W$e),e.factory("ImportServersBtn",q$e),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.factory("ServerError",Y$e),e.decorator("ServerError",t(["servers","selectedServer"])),e.service("ServersImporter",E6e,"csvToJson"),e.service("ServersExporter",w6e,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",v6e,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>WU),e.serviceFactory("deleteServer",()=>a6e),e.serviceFactory("editServer",()=>o6e),e.serviceFactory("setAutoConnect",()=>s6e),e.serviceFactory("fetchServers",u6e,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>OP),e.serviceFactory("selectedServerReducerCreator",g6e,"selectServer"),e.serviceFactory("selectedServerReducer",n=>n.reducer,"selectedServerReducerCreator")},HU={field:"dateCreated",dir:"DESC"},P6e={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:kE()},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:HU}},{reducer:T6e,actions:j6e}=Qt({name:"shlink/settings",initialState:P6e,reducers:{setSettings:(e,{payload:t})=>f0(e,t)}}),{setSettings:A6e}=j6e,k6e=T6e,N6e=({settings:e,setSettings:t})=>m.jsx(Ju,{children:m.jsx(Nae,{settings:e,updateSettings:t,defaultShortUrlsListOrdering:HU})}),M6e=(e,t)=>{e.serviceFactory("Settings",()=>N6e),e.decorator("Settings",Py),e.decorator("Settings",t(["settings"],["setSettings","resetSelectedServer"])),e.serviceFactory("setSettings",()=>A6e)};var L6e=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)n.d(o,a,(function(s){return r[s]}).bind(null,a));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(g){var y=[];for(var x in g)y.push(x);return y};e.exports=d;var o=n(5);o.inherits=n(2);var a=n(23),s=n(14);o.inherits(d,a);for(var l=i(s.prototype),c=0;c * @license MIT */var i=n(38),o=n(39),a=n(40);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(j,k){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|j}function y(j,k){if(c.isBuffer(j))return j.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(j)||j instanceof ArrayBuffer))return j.byteLength;typeof j!="string"&&(j=""+j);var U=j.length;if(U===0)return 0;for(var J=!1;;)switch(k){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":case void 0:return ie(j).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*U;case"hex":return U>>>1;case"base64":return ae(j).length;default:if(J)return ie(j).length;k=(""+k).toLowerCase(),J=!0}}function x(j,k,U){var J=j[k];j[k]=j[U],j[U]=J}function _(j,k,U,J,Y){if(j.length===0)return-1;if(typeof U=="string"?(J=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),U=+U,isNaN(U)&&(U=Y?0:j.length-1),U<0&&(U=j.length+U),U>=j.length){if(Y)return-1;U=j.length-1}else if(U<0){if(!Y)return-1;U=0}if(typeof k=="string"&&(k=c.from(k,J)),c.isBuffer(k))return k.length===0?-1:b(j,k,U,J,Y);if(typeof k=="number")return k&=255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Y?Uint8Array.prototype.indexOf.call(j,k,U):Uint8Array.prototype.lastIndexOf.call(j,k,U):b(j,[k],U,J,Y);throw new TypeError("val must be string, number or Buffer")}function b(j,k,U,J,Y){var oe,he=1,Se=j.length,se=k.length;if(J!==void 0&&((J=String(J).toLowerCase())==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(j.length<2||k.length<2)return-1;he=2,Se/=2,se/=2,U/=2}function pe(Pe,Ae){return he===1?Pe[Ae]:Pe.readUInt16BE(Ae*he)}if(Y){var me=-1;for(oe=U;oeSe&&(U=Se-se),oe=U;oe>=0;oe--){for(var xe=!0,Te=0;TeY&&(J=Y):J=Y;var oe=k.length;if(oe%2!=0)throw new TypeError("Invalid hex string");J>oe/2&&(J=oe/2);for(var he=0;he>8,se=he%256,pe.push(se),pe.push(Se);return pe}(k,j.length-U),j,U,J)}function D(j,k,U){return k===0&&U===j.length?i.fromByteArray(j):i.fromByteArray(j.slice(k,U))}function N(j,k,U){U=Math.min(j.length,U);for(var J=[],Y=k;Y239?4:pe>223?3:pe>191?2:1;if(Y+xe<=U)switch(xe){case 1:pe<128&&(me=pe);break;case 2:(192&(oe=j[Y+1]))==128&&(se=(31&pe)<<6|63&oe)>127&&(me=se);break;case 3:oe=j[Y+1],he=j[Y+2],(192&oe)==128&&(192&he)==128&&(se=(15&pe)<<12|(63&oe)<<6|63&he)>2047&&(se<55296||se>57343)&&(me=se);break;case 4:oe=j[Y+1],he=j[Y+2],Se=j[Y+3],(192&oe)==128&&(192&he)==128&&(192&Se)==128&&(se=(15&pe)<<18|(63&oe)<<12|(63&he)<<6|63&Se)>65535&&se<1114112&&(me=se)}me===null?(me=65533,xe=1):me>65535&&(me-=65536,J.push(me>>>10&1023|55296),me=56320|1023&me),J.push(me),Y+=xe}return function(Te){var Pe=Te.length;if(Pe<=I)return String.fromCharCode.apply(String,Te);for(var Ae="",le=0;lethis.length||((J===void 0||J>this.length)&&(J=this.length),J<=0)||(J>>>=0)<=(U>>>=0))return"";for(k||(k="utf8");;)switch(k){case"hex":return W(this,U,J);case"utf8":case"utf-8":return N(this,U,J);case"ascii":return F(this,U,J);case"latin1":case"binary":return q(this,U,J);case"base64":return D(this,U,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,U,J);default:if(Y)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),Y=!0}}).apply(this,arguments)},c.prototype.equals=function(j){if(!c.isBuffer(j))throw new TypeError("Argument must be a Buffer");return this===j||c.compare(this,j)===0},c.prototype.inspect=function(){var j="",k=t.INSPECT_MAX_BYTES;return this.length>0&&(j=this.toString("hex",0,k).match(/.{2}/g).join(" "),this.length>k&&(j+=" ... ")),""},c.prototype.compare=function(j,k,U,J,Y){if(!c.isBuffer(j))throw new TypeError("Argument must be a Buffer");if(k===void 0&&(k=0),U===void 0&&(U=j?j.length:0),J===void 0&&(J=0),Y===void 0&&(Y=this.length),k<0||U>j.length||J<0||Y>this.length)throw new RangeError("out of range index");if(J>=Y&&k>=U)return 0;if(J>=Y)return-1;if(k>=U)return 1;if(k>>>=0,U>>>=0,J>>>=0,Y>>>=0,this===j)return 0;for(var oe=Y-J,he=U-k,Se=Math.min(oe,he),se=this.slice(J,Y),pe=j.slice(k,U),me=0;meY)&&(U=Y),j.length>0&&(U<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");for(var oe=!1;;)switch(J){case"hex":return w(this,j,k,U);case"utf8":case"utf-8":return S(this,j,k,U);case"ascii":return E(this,j,k,U);case"latin1":case"binary":return C(this,j,k,U);case"base64":return T(this,j,k,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,j,k,U);default:if(oe)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),oe=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function F(j,k,U){var J="";U=Math.min(j.length,U);for(var Y=k;YJ)&&(U=J);for(var Y="",oe=k;oeU)throw new RangeError("Trying to access beyond buffer length")}function ne(j,k,U,J,Y,oe){if(!c.isBuffer(j))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>Y||kj.length)throw new RangeError("Index out of range")}function Z(j,k,U,J){k<0&&(k=65535+k+1);for(var Y=0,oe=Math.min(j.length-U,2);Y>>8*(J?Y:1-Y)}function z(j,k,U,J){k<0&&(k=4294967295+k+1);for(var Y=0,oe=Math.min(j.length-U,4);Y>>8*(J?Y:3-Y)&255}function B(j,k,U,J,Y,oe){if(U+J>j.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function H(j,k,U,J,Y){return Y||B(j,0,U,4),o.write(j,k,U,J,23,4),U+4}function ee(j,k,U,J,Y){return Y||B(j,0,U,8),o.write(j,k,U,J,52,8),U+8}c.prototype.slice=function(j,k){var U,J=this.length;if(j=~~j,k=k===void 0?J:~~k,j<0?(j+=J)<0&&(j=0):j>J&&(j=J),k<0?(k+=J)<0&&(k=0):k>J&&(k=J),k0&&(Y*=256);)J+=this[j+--k]*Y;return J},c.prototype.readUInt8=function(j,k){return k||Q(j,1,this.length),this[j]},c.prototype.readUInt16LE=function(j,k){return k||Q(j,2,this.length),this[j]|this[j+1]<<8},c.prototype.readUInt16BE=function(j,k){return k||Q(j,2,this.length),this[j]<<8|this[j+1]},c.prototype.readUInt32LE=function(j,k){return k||Q(j,4,this.length),(this[j]|this[j+1]<<8|this[j+2]<<16)+16777216*this[j+3]},c.prototype.readUInt32BE=function(j,k){return k||Q(j,4,this.length),16777216*this[j]+(this[j+1]<<16|this[j+2]<<8|this[j+3])},c.prototype.readIntLE=function(j,k,U){j|=0,k|=0,U||Q(j,k,this.length);for(var J=this[j],Y=1,oe=0;++oe=(Y*=128)&&(J-=Math.pow(2,8*k)),J},c.prototype.readIntBE=function(j,k,U){j|=0,k|=0,U||Q(j,k,this.length);for(var J=k,Y=1,oe=this[j+--J];J>0&&(Y*=256);)oe+=this[j+--J]*Y;return oe>=(Y*=128)&&(oe-=Math.pow(2,8*k)),oe},c.prototype.readInt8=function(j,k){return k||Q(j,1,this.length),128&this[j]?-1*(255-this[j]+1):this[j]},c.prototype.readInt16LE=function(j,k){k||Q(j,2,this.length);var U=this[j]|this[j+1]<<8;return 32768&U?4294901760|U:U},c.prototype.readInt16BE=function(j,k){k||Q(j,2,this.length);var U=this[j+1]|this[j]<<8;return 32768&U?4294901760|U:U},c.prototype.readInt32LE=function(j,k){return k||Q(j,4,this.length),this[j]|this[j+1]<<8|this[j+2]<<16|this[j+3]<<24},c.prototype.readInt32BE=function(j,k){return k||Q(j,4,this.length),this[j]<<24|this[j+1]<<16|this[j+2]<<8|this[j+3]},c.prototype.readFloatLE=function(j,k){return k||Q(j,4,this.length),o.read(this,j,!0,23,4)},c.prototype.readFloatBE=function(j,k){return k||Q(j,4,this.length),o.read(this,j,!1,23,4)},c.prototype.readDoubleLE=function(j,k){return k||Q(j,8,this.length),o.read(this,j,!0,52,8)},c.prototype.readDoubleBE=function(j,k){return k||Q(j,8,this.length),o.read(this,j,!1,52,8)},c.prototype.writeUIntLE=function(j,k,U,J){j=+j,k|=0,U|=0,J||ne(this,j,k,U,Math.pow(2,8*U)-1,0);var Y=1,oe=0;for(this[k]=255&j;++oe=0&&(oe*=256);)this[k+Y]=j/oe&255;return k+U},c.prototype.writeUInt8=function(j,k,U){return j=+j,k|=0,U||ne(this,j,k,1,255,0),c.TYPED_ARRAY_SUPPORT||(j=Math.floor(j)),this[k]=255&j,k+1},c.prototype.writeUInt16LE=function(j,k,U){return j=+j,k|=0,U||ne(this,j,k,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[k]=255&j,this[k+1]=j>>>8):Z(this,j,k,!0),k+2},c.prototype.writeUInt16BE=function(j,k,U){return j=+j,k|=0,U||ne(this,j,k,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[k]=j>>>8,this[k+1]=255&j):Z(this,j,k,!1),k+2},c.prototype.writeUInt32LE=function(j,k,U){return j=+j,k|=0,U||ne(this,j,k,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[k+3]=j>>>24,this[k+2]=j>>>16,this[k+1]=j>>>8,this[k]=255&j):z(this,j,k,!0),k+4},c.prototype.writeUInt32BE=function(j,k,U){return j=+j,k|=0,U||ne(this,j,k,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[k]=j>>>24,this[k+1]=j>>>16,this[k+2]=j>>>8,this[k+3]=255&j):z(this,j,k,!1),k+4},c.prototype.writeIntLE=function(j,k,U,J){if(j=+j,k|=0,!J){var Y=Math.pow(2,8*U-1);ne(this,j,k,U,Y-1,-Y)}var oe=0,he=1,Se=0;for(this[k]=255&j;++oe>0)-Se&255;return k+U},c.prototype.writeIntBE=function(j,k,U,J){if(j=+j,k|=0,!J){var Y=Math.pow(2,8*U-1);ne(this,j,k,U,Y-1,-Y)}var oe=U-1,he=1,Se=0;for(this[k+oe]=255&j;--oe>=0&&(he*=256);)j<0&&Se===0&&this[k+oe+1]!==0&&(Se=1),this[k+oe]=(j/he>>0)-Se&255;return k+U},c.prototype.writeInt8=function(j,k,U){return j=+j,k|=0,U||ne(this,j,k,1,127,-128),c.TYPED_ARRAY_SUPPORT||(j=Math.floor(j)),j<0&&(j=255+j+1),this[k]=255&j,k+1},c.prototype.writeInt16LE=function(j,k,U){return j=+j,k|=0,U||ne(this,j,k,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[k]=255&j,this[k+1]=j>>>8):Z(this,j,k,!0),k+2},c.prototype.writeInt16BE=function(j,k,U){return j=+j,k|=0,U||ne(this,j,k,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[k]=j>>>8,this[k+1]=255&j):Z(this,j,k,!1),k+2},c.prototype.writeInt32LE=function(j,k,U){return j=+j,k|=0,U||ne(this,j,k,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[k]=255&j,this[k+1]=j>>>8,this[k+2]=j>>>16,this[k+3]=j>>>24):z(this,j,k,!0),k+4},c.prototype.writeInt32BE=function(j,k,U){return j=+j,k|=0,U||ne(this,j,k,4,2147483647,-2147483648),j<0&&(j=4294967295+j+1),c.TYPED_ARRAY_SUPPORT?(this[k]=j>>>24,this[k+1]=j>>>16,this[k+2]=j>>>8,this[k+3]=255&j):z(this,j,k,!1),k+4},c.prototype.writeFloatLE=function(j,k,U){return H(this,j,k,!0,U)},c.prototype.writeFloatBE=function(j,k,U){return H(this,j,k,!1,U)},c.prototype.writeDoubleLE=function(j,k,U){return ee(this,j,k,!0,U)},c.prototype.writeDoubleBE=function(j,k,U){return ee(this,j,k,!1,U)},c.prototype.copy=function(j,k,U,J){if(U||(U=0),J||J===0||(J=this.length),k>=j.length&&(k=j.length),k||(k=0),J>0&&J=this.length)throw new RangeError("sourceStart out of bounds");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),j.length-k=0;--Y)j[Y+k]=this[Y+U];else if(oe<1e3||!c.TYPED_ARRAY_SUPPORT)for(Y=0;Y>>=0,U=U===void 0?this.length:U>>>0,j||(j=0),typeof j=="number")for(oe=k;oe55295&&U<57344){if(!Y){if(U>56319){(k-=3)>-1&&oe.push(239,191,189);continue}if(he+1===J){(k-=3)>-1&&oe.push(239,191,189);continue}Y=U;continue}if(U<56320){(k-=3)>-1&&oe.push(239,191,189),Y=U;continue}U=65536+(Y-55296<<10|U-56320)}else Y&&(k-=3)>-1&&oe.push(239,191,189);if(Y=null,U<128){if((k-=1)<0)break;oe.push(U)}else if(U<2048){if((k-=2)<0)break;oe.push(U>>6|192,63&U|128)}else if(U<65536){if((k-=3)<0)break;oe.push(U>>12|224,U>>6&63|128,63&U|128)}else{if(!(U<1114112))throw new Error("Invalid code point");if((k-=4)<0)break;oe.push(U>>18|240,U>>12&63|128,U>>6&63|128,63&U|128)}}return oe}function ae(j){return i.toByteArray(function(k){if((k=function(U){return U.trim?U.trim():U.replace(/^\s+|\s+$/g,"")}(k).replace(K,"")).length<2)return"";for(;k.length%4!=0;)k+="=";return k}(j))}function fe(j,k,U,J){for(var Y=0;Y=k.length||Y>=j.length);++Y)k[Y+U]=j[Y];return Y}}).call(this,n(0))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(x){if(n===setTimeout)return setTimeout(x,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(x,0);try{return n(x,0)}catch{try{return n.call(null,x,0)}catch{return n.call(this,x,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch{n=o}try{r=typeof clearTimeout=="function"?clearTimeout:a}catch{r=a}})();var l,c=[],f=!1,d=-1;function p(){f&&l&&(f=!1,l.length?c=l.concat(c):d=-1,c.length&&v())}function v(){if(!f){var x=s(p);f=!0;for(var _=c.length;_;){for(l=c,c=[];++d<_;)l&&l[d].run();d=-1,_=c.length}l=null,f=!1,function(b){if(r===clearTimeout)return clearTimeout(b);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(b);try{r(b)}catch{try{return r.call(null,b)}catch{return r.call(this,b)}}}(x)}}function g(x,_){this.fun=x,this.array=_}function y(){}i.nextTick=function(x){var _=new Array(arguments.length-1);if(arguments.length>1)for(var b=1;b=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},l))},n(35),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(a){return typeof a=="function"}function i(a){return typeof a=="object"&&a!==null}function o(a){return a===void 0}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(a){if(!function(s){return typeof s=="number"}(a)||a<0||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},n.prototype.emit=function(a){var s,l,c,f,d,p;if(this._events||(this._events={}),a==="error"&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((s=arguments[1])instanceof Error)throw s;var v=new Error('Uncaught, unspecified "error" event. ('+s+")");throw v.context=s,v}if(o(l=this._events[a]))return!1;if(r(l))switch(arguments.length){case 1:l.call(this);break;case 2:l.call(this,arguments[1]);break;case 3:l.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),l.apply(this,f)}else if(i(l))for(f=Array.prototype.slice.call(arguments,1),c=(p=l.slice()).length,d=0;d0&&this._events[a].length>l&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),typeof console.trace=="function"&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(a,s){if(!r(s))throw TypeError("listener must be a function");var l=!1;function c(){this.removeListener(a,c),l||(l=!0,s.apply(this,arguments))}return c.listener=s,this.on(a,c),this},n.prototype.removeListener=function(a,s){var l,c,f,d;if(!r(s))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(f=(l=this._events[a]).length,c=-1,l===s||r(l.listener)&&l.listener===s)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,s);else if(i(l)){for(d=f;d-- >0;)if(l[d]===s||l[d].listener&&l[d].listener===s){c=d;break}if(c<0)return this;l.length===1?(l.length=0,delete this._events[a]):l.splice(c,1),this._events.removeListener&&this.emit("removeListener",a,s)}return this},n.prototype.removeAllListeners=function(a){var s,l;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[a]&&delete this._events[a],this;if(arguments.length===0){for(s in this._events)s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events={},this}if(r(l=this._events[a]))this.removeListener(a,l);else if(l)for(;l.length;)this.removeListener(a,l[l.length-1]);return delete this._events[a],this},n.prototype.listeners=function(a){return this._events&&this._events[a]?r(this._events[a])?[this._events[a]]:this._events[a].slice():[]},n.prototype.listenerCount=function(a){if(this._events){var s=this._events[a];if(r(s))return 1;if(s)return s.length}return 0},n.listenerCount=function(a,s){return a.listenerCount(s)}},function(e,t,n){(t=e.exports=n(23)).Stream=t,t.Readable=t,t.Writable=n(14),t.Duplex=n(1),t.Transform=n(27),t.PassThrough=n(45)},function(e,t,n){(function(r,i,o){var a=n(6);function s(N){var I=this;this.next=null,this.entry=null,this.finish=function(){(function(F,q,W){var X=F.entry;for(F.entry=null;X;){var Q=X.callback;q.pendingcb--,Q(void 0),X=X.next}q.corkedRequestsFree?q.corkedRequestsFree.next=F:q.corkedRequestsFree=F})(I,N)}}e.exports=w;var l,c=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:a.nextTick;w.WritableState=b;var f=n(5);f.inherits=n(2);var d,p={deprecate:n(44)},v=n(24),g=n(7).Buffer,y=o.Uint8Array||function(){},x=n(25);function _(){}function b(N,I){l=l||n(1),N=N||{};var F=I instanceof l;this.objectMode=!!N.objectMode,F&&(this.objectMode=this.objectMode||!!N.writableObjectMode);var q=N.highWaterMark,W=N.writableHighWaterMark,X=this.objectMode?16:16384;this.highWaterMark=q||q===0?q:F&&(W||W===0)?W:X,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 Q=N.decodeStrings===!1;this.decodeStrings=!Q,this.defaultEncoding=N.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){(function(Z,z){var B=Z._writableState,H=B.sync,ee=B.writecb;if(function(te){te.writing=!1,te.writecb=null,te.length-=te.writelen,te.writelen=0}(B),z)(function(te,ie,ae,fe,j){--ie.pendingcb,ae?(a.nextTick(j,fe),a.nextTick(D,te,ie),te._writableState.errorEmitted=!0,te.emit("error",fe)):(j(fe),te._writableState.errorEmitted=!0,te.emit("error",fe),D(te,ie))})(Z,B,H,z,ee);else{var K=T(B);K||B.corked||B.bufferProcessing||!B.bufferedRequest||C(Z,B),H?c(E,Z,B,K,ee):E(Z,B,K,ee)}})(I,ne)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function w(N){if(l=l||n(1),!(d.call(w,this)||this instanceof l))return new w(N);this._writableState=new b(N,this),this.writable=!0,N&&(typeof N.write=="function"&&(this._write=N.write),typeof N.writev=="function"&&(this._writev=N.writev),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.final=="function"&&(this._final=N.final)),v.call(this)}function S(N,I,F,q,W,X,Q){I.writelen=q,I.writecb=Q,I.writing=!0,I.sync=!0,F?N._writev(W,I.onwrite):N._write(W,X,I.onwrite),I.sync=!1}function E(N,I,F,q){F||function(W,X){X.length===0&&X.needDrain&&(X.needDrain=!1,W.emit("drain"))}(N,I),I.pendingcb--,q(),D(N,I)}function C(N,I){I.bufferProcessing=!0;var F=I.bufferedRequest;if(N._writev&&F&&F.next){var q=I.bufferedRequestCount,W=new Array(q),X=I.corkedRequestsFree;X.entry=F;for(var Q=0,ne=!0;F;)W[Q]=F,F.isBuf||(ne=!1),F=F.next,Q+=1;W.allBuffers=ne,S(N,I,!0,I.length,W,"",X.finish),I.pendingcb++,I.lastBufferedRequest=null,X.next?(I.corkedRequestsFree=X.next,X.next=null):I.corkedRequestsFree=new s(I),I.bufferedRequestCount=0}else{for(;F;){var Z=F.chunk,z=F.encoding,B=F.callback;if(S(N,I,!1,I.objectMode?1:Z.length,Z,z,B),F=F.next,I.bufferedRequestCount--,I.writing)break}F===null&&(I.lastBufferedRequest=null)}I.bufferedRequest=F,I.bufferProcessing=!1}function T(N){return N.ending&&N.length===0&&N.bufferedRequest===null&&!N.finished&&!N.writing}function A(N,I){N._final(function(F){I.pendingcb--,F&&N.emit("error",F),I.prefinished=!0,N.emit("prefinish"),D(N,I)})}function D(N,I){var F=T(I);return F&&(function(q,W){W.prefinished||W.finalCalled||(typeof q._final=="function"?(W.pendingcb++,W.finalCalled=!0,a.nextTick(A,q,W)):(W.prefinished=!0,q.emit("prefinish")))}(N,I),I.pendingcb===0&&(I.finished=!0,N.emit("finish"))),F}f.inherits(w,v),b.prototype.getBuffer=function(){for(var N=this.bufferedRequest,I=[];N;)I.push(N),N=N.next;return I},function(){try{Object.defineProperty(b.prototype,"buffer",{get:p.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(N){return!!d.call(this,N)||this===w&&N&&N._writableState instanceof b}})):d=function(N){return N instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(N,I,F){var q=this._writableState,W=!1,X=!q.objectMode&&function(Q){return g.isBuffer(Q)||Q instanceof y}(N);return X&&!g.isBuffer(N)&&(N=function(Q){return g.from(Q)}(N)),typeof I=="function"&&(F=I,I=null),X?I="buffer":I||(I=q.defaultEncoding),typeof F!="function"&&(F=_),q.ended?function(Q,ne){var Z=new Error("write after end");Q.emit("error",Z),a.nextTick(ne,Z)}(this,F):(X||function(Q,ne,Z,z){var B=!0,H=!1;return Z===null?H=new TypeError("May not write null values to stream"):typeof Z=="string"||Z===void 0||ne.objectMode||(H=new TypeError("Invalid non-string/buffer chunk")),H&&(Q.emit("error",H),a.nextTick(z,H),B=!1),B}(this,q,N,F))&&(q.pendingcb++,W=function(Q,ne,Z,z,B,H){if(!Z){var ee=function(ae,fe,j){return ae.objectMode||ae.decodeStrings===!1||typeof fe!="string"||(fe=g.from(fe,j)),fe}(ne,z,B);z!==ee&&(Z=!0,B="buffer",z=ee)}var K=ne.objectMode?1:z.length;ne.length+=K;var te=ne.length-1))throw new TypeError("Unknown encoding: "+N);return this._writableState.defaultEncoding=N,this},Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(N,I,F){F(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(N,I,F){var q=this._writableState;typeof N=="function"?(F=N,N=null,I=null):typeof I=="function"&&(F=I,I=null),N!=null&&this.write(N,I),q.corked&&(q.corked=1,this.uncork()),q.ending||q.finished||function(W,X,Q){X.ending=!0,D(W,X),Q&&(X.finished?a.nextTick(Q):W.once("finish",Q)),X.ended=!0,W.writable=!1}(this,q,F)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(N){this._writableState&&(this._writableState.destroyed=N)}}),w.prototype.destroy=x.destroy,w.prototype._undestroy=x.undestroy,w.prototype._destroy=function(N,I){this.end(),I(N)}}).call(this,n(4),n(11).setImmediate,n(0))},function(e,t,n){(function(r,i,o){e.exports=function a(s,l,c){function f(v,g){if(!l[v]){if(!s[v]){var y=typeof _dereq_=="function"&&_dereq_;if(!g&&y)return y(v,!0);if(d)return d(v,!0);var x=new Error("Cannot find module '"+v+"'");throw x.code="MODULE_NOT_FOUND",x}var _=l[v]={exports:{}};s[v][0].call(_.exports,function(b){return f(s[v][1][b]||b)},_,_.exports,a,s,l,c)}return l[v].exports}for(var d=typeof _dereq_=="function"&&_dereq_,p=0;p0;){var b=_.shift();if(typeof b=="function"){var w=_.shift(),S=_.shift();b.call(w,S)}else b._settlePromises()}},v.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},v.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},v.prototype._reset=function(){this._isTickUsed=!1},s.exports=v,s.exports.firstLineError=c},{"./queue":26,"./schedule":29,"./util":36}],3:[function(a,s,l){s.exports=function(c,f,d,p){var v=!1,g=function(b,w){this._reject(w)},y=function(b,w){w.promiseRejectionQueued=!0,w.bindingPromise._then(g,g,null,this,b)},x=function(b,w){!(50397184&this._bitField)&&this._resolveCallback(w.target)},_=function(b,w){w.promiseRejectionQueued||this._reject(b)};c.prototype.bind=function(b){v||(v=!0,c.prototype._propagateFrom=p.propagateFromFunction(),c.prototype._boundValue=p.boundValueFunction());var w=d(b),S=new c(f);S._propagateFrom(this,1);var E=this._target();if(S._setBoundTo(w),w instanceof c){var C={promiseRejectionQueued:!1,promise:S,target:E,bindingPromise:w};E._then(f,y,void 0,S,C),w._then(x,_,void 0,S,C),S._setOnCancel(w)}else S._resolveCallback(E);return S},c.prototype._setBoundTo=function(b){b!==void 0?(this._bitField=2097152|this._bitField,this._boundTo=b):this._bitField=-2097153&this._bitField},c.prototype._isBound=function(){return(2097152&this._bitField)==2097152},c.bind=function(b,w){return c.resolve(w).bind(b)}}},{}],4:[function(a,s,l){var c;typeof Promise<"u"&&(c=Promise);var f=a("./promise")();f.noConflict=function(){try{Promise===f&&(Promise=c)}catch{}return f},s.exports=f},{"./promise":22}],5:[function(a,s,l){var c=Object.create;if(c){var f=c(null),d=c(null);f[" size"]=d[" size"]=0}s.exports=function(p){var v=a("./util"),g=v.canEvaluate;function y(b){return function(w,S){var E;if(w!=null&&(E=w[S]),typeof E!="function"){var C="Object "+v.classString(w)+" has no method '"+v.toString(S)+"'";throw new p.TypeError(C)}return E}(b,this.pop()).apply(b,this)}function x(b){return b[this]}function _(b){var w=+this;return w<0&&(w=Math.max(0,w+b.length)),b[w]}v.isIdentifier,p.prototype.call=function(b){var w=[].slice.call(arguments,1);return w.push(b),this._then(y,void 0,void 0,w,void 0)},p.prototype.get=function(b){var w;if(typeof b=="number")w=_;else if(g){var S=(void 0)(b);w=S!==null?S:x}else w=x;return this._then(w,void 0,void 0,b,void 0)}}},{"./util":36}],6:[function(a,s,l){s.exports=function(c,f,d,p){var v=a("./util"),g=v.tryCatch,y=v.errorObj,x=c._async;c.prototype.break=c.prototype.cancel=function(){if(!p.cancellation())return this._warn("cancellation is disabled");for(var _=this,b=_;_._isCancellable();){if(!_._cancelBy(b)){b._isFollowing()?b._followee().cancel():b._cancelBranched();break}var w=_._cancellationParent;if(w==null||!w._isCancellable()){_._isFollowing()?_._followee().cancel():_._cancelBranched();break}_._isFollowing()&&_._followee().cancel(),_._setWillBeCancelled(),b=_,_=w}},c.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},c.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},c.prototype._cancelBy=function(_){return _===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},c.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},c.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),x.invoke(this._cancelPromises,this,void 0))},c.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},c.prototype._unsetOnCancel=function(){this._onCancelField=void 0},c.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},c.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},c.prototype._doInvokeOnCancel=function(_,b){if(v.isArray(_))for(var w=0;w<_.length;++w)this._doInvokeOnCancel(_[w],b);else if(_!==void 0)if(typeof _=="function"){if(!b){var S=g(_).call(this._boundValue());S===y&&(this._attachExtraTrace(S.e),x.throwLater(S.e))}}else _._resultCancelled(this)},c.prototype._invokeOnCancel=function(){var _=this._onCancel();this._unsetOnCancel(),x.invoke(this._doInvokeOnCancel,this,_)},c.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},c.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(a,s,l){s.exports=function(c){var f=a("./util"),d=a("./es5").keys,p=f.tryCatch,v=f.errorObj;return function(g,y,x){return function(_){var b=x._boundValue();e:for(var w=0;w=0)return d[g]}return c.prototype._promiseCreated=function(){},c.prototype._pushContext=function(){},c.prototype._popContext=function(){return null},c._peekContext=c.prototype._peekContext=function(){},p.prototype._pushContext=function(){this._trace!==void 0&&(this._trace._promiseCreated=null,d.push(this._trace))},p.prototype._popContext=function(){if(this._trace!==void 0){var g=d.pop(),y=g._promiseCreated;return g._promiseCreated=null,y}return null},p.CapturedTrace=null,p.create=function(){if(f)return new p},p.deactivateLongStackTraces=function(){},p.activateLongStackTraces=function(){var g=c.prototype._pushContext,y=c.prototype._popContext,x=c._peekContext,_=c.prototype._peekContext,b=c.prototype._promiseCreated;p.deactivateLongStackTraces=function(){c.prototype._pushContext=g,c.prototype._popContext=y,c._peekContext=x,c.prototype._peekContext=_,c.prototype._promiseCreated=b,f=!1},f=!0,c.prototype._pushContext=p.prototype._pushContext,c.prototype._popContext=p.prototype._popContext,c._peekContext=c.prototype._peekContext=v,c.prototype._promiseCreated=function(){var w=this._peekContext();w&&w._promiseCreated==null&&(w._promiseCreated=this)}},p}},{}],9:[function(a,s,l){s.exports=function(c,f){var d,p,v,g=c._getDomain,y=c._async,x=a("./errors").Warning,_=a("./util"),b=_.canAttachTrace,w=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,S=/\((?:timers\.js):\d+:\d+\)/,E=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,C=null,T=null,A=!1,D=_.env("BLUEBIRD_DEBUG")!=0,N=!(_.env("BLUEBIRD_WARNINGS")==0||!D&&!_.env("BLUEBIRD_WARNINGS")),I=!(_.env("BLUEBIRD_LONG_STACK_TRACES")==0||!D&&!_.env("BLUEBIRD_LONG_STACK_TRACES")),F=_.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(N||!!_.env("BLUEBIRD_W_FORGOTTEN_RETURN"));c.prototype.suppressUnhandledRejections=function(){var le=this._target();le._bitField=-1048577&le._bitField|524288},c.prototype._ensurePossibleRejectionHandled=function(){if(!(524288&this._bitField)){this._setRejectionIsUnhandled();var le=this;setTimeout(function(){le._notifyUnhandledRejection()},1)}},c.prototype._notifyUnhandledRejectionIsHandled=function(){he("rejectionHandled",d,void 0,this)},c.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},c.prototype._returnedNonUndefined=function(){return(268435456&this._bitField)!=0},c.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var le=this._settledValue();this._setUnhandledRejectionIsNotified(),he("unhandledRejection",p,le,this)}},c.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},c.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},c.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},c.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},c.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},c.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},c.prototype._warn=function(le,ue,ye){return U(le,ue,ye||this)},c.onPossiblyUnhandledRejection=function(le){var ue=g();p=typeof le=="function"?ue===null?le:_.domainBind(ue,le):void 0},c.onUnhandledRejectionHandled=function(le){var ue=g();d=typeof le=="function"?ue===null?le:_.domainBind(ue,le):void 0};var q=function(){};c.longStackTraces=function(){if(y.haveItemsQueued()&&!Ae.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);if(!Ae.longStackTraces&&se()){var le=c.prototype._captureStackTrace,ue=c.prototype._attachExtraTrace;Ae.longStackTraces=!0,q=function(){if(y.haveItemsQueued()&&!Ae.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);c.prototype._captureStackTrace=le,c.prototype._attachExtraTrace=ue,f.deactivateLongStackTraces(),y.enableTrampoline(),Ae.longStackTraces=!1},c.prototype._captureStackTrace=j,c.prototype._attachExtraTrace=k,f.activateLongStackTraces(),y.disableTrampolineIfNecessary()}},c.hasLongStackTraces=function(){return Ae.longStackTraces&&se()};var W=function(){try{if(typeof CustomEvent=="function"){var le=new CustomEvent("CustomEvent");return _.global.dispatchEvent(le),function(ue,ye){var ge=new CustomEvent(ue.toLowerCase(),{detail:ye,cancelable:!0});return!_.global.dispatchEvent(ge)}}return typeof Event=="function"?(le=new Event("CustomEvent"),_.global.dispatchEvent(le),function(ue,ye){var ge=new Event(ue.toLowerCase(),{cancelable:!0});return ge.detail=ye,!_.global.dispatchEvent(ge)}):((le=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),_.global.dispatchEvent(le),function(ue,ye){var ge=document.createEvent("CustomEvent");return ge.initCustomEvent(ue.toLowerCase(),!1,!0,ye),!_.global.dispatchEvent(ge)})}catch{}return function(){return!1}}(),X=_.isNode?function(){return r.emit.apply(r,arguments)}:_.global?function(le){var ue="on"+le.toLowerCase(),ye=_.global[ue];return!!ye&&(ye.apply(_.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function Q(le,ue){return{promise:ue}}var ne={promiseCreated:Q,promiseFulfilled:Q,promiseRejected:Q,promiseResolved:Q,promiseCancelled:Q,promiseChained:function(le,ue,ye){return{promise:ue,child:ye}},warning:function(le,ue){return{warning:ue}},unhandledRejection:function(le,ue,ye){return{reason:ue,promise:ye}},rejectionHandled:Q},Z=function(le){var ue=!1;try{ue=X.apply(null,arguments)}catch(ge){y.throwLater(ge),ue=!0}var ye=!1;try{ye=W(le,ne[le].apply(null,arguments))}catch(ge){y.throwLater(ge),ye=!0}return ye||ue};function z(){return!1}function B(le,ue,ye){var ge=this;try{le(ue,ye,function(we){if(typeof we!="function")throw new TypeError("onCancel must be a function, got: "+_.toString(we));ge._attachCancellationCallback(we)})}catch(we){return we}}function H(le){if(!this._isCancellable())return this;var ue=this._onCancel();ue!==void 0?_.isArray(ue)?ue.push(le):this._setOnCancel([ue,le]):this._setOnCancel(le)}function ee(){return this._onCancelField}function K(le){this._onCancelField=le}function te(){this._cancellationParent=void 0,this._onCancelField=void 0}function ie(le,ue){if(1&ue){this._cancellationParent=le;var ye=le._branchesRemainingToCancel;ye===void 0&&(ye=0),le._branchesRemainingToCancel=ye+1}2&ue&&le._isBound()&&this._setBoundTo(le._boundTo)}c.config=function(le){if("longStackTraces"in(le=Object(le))&&(le.longStackTraces?c.longStackTraces():!le.longStackTraces&&c.hasLongStackTraces()&&q()),"warnings"in le){var ue=le.warnings;Ae.warnings=!!ue,F=Ae.warnings,_.isObject(ue)&&"wForgottenReturn"in ue&&(F=!!ue.wForgottenReturn)}if("cancellation"in le&&le.cancellation&&!Ae.cancellation){if(y.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");c.prototype._clearCancellationData=te,c.prototype._propagateFrom=ie,c.prototype._onCancel=ee,c.prototype._setOnCancel=K,c.prototype._attachCancellationCallback=H,c.prototype._execute=B,ae=ie,Ae.cancellation=!0}return"monitoring"in le&&(le.monitoring&&!Ae.monitoring?(Ae.monitoring=!0,c.prototype._fireEvent=Z):!le.monitoring&&Ae.monitoring&&(Ae.monitoring=!1,c.prototype._fireEvent=z)),c},c.prototype._fireEvent=z,c.prototype._execute=function(le,ue,ye){try{le(ue,ye)}catch(ge){return ge}},c.prototype._onCancel=function(){},c.prototype._setOnCancel=function(le){},c.prototype._attachCancellationCallback=function(le){},c.prototype._captureStackTrace=function(){},c.prototype._attachExtraTrace=function(){},c.prototype._clearCancellationData=function(){},c.prototype._propagateFrom=function(le,ue){};var ae=function(le,ue){2&ue&&le._isBound()&&this._setBoundTo(le._boundTo)};function fe(){var le=this._boundTo;return le!==void 0&&le instanceof c?le.isFulfilled()?le.value():void 0:le}function j(){this._trace=new Te(this._peekContext())}function k(le,ue){if(b(le)){var ye=this._trace;if(ye!==void 0&&ue&&(ye=ye._parent),ye!==void 0)ye.attachExtraTrace(le);else if(!le.__stackCleaned__){var ge=Y(le);_.notEnumerableProp(le,"stack",ge.message+` `+ge.stack.join(` `)),_.notEnumerableProp(le,"__stackCleaned__",!0)}}}function U(le,ue,ye){if(Ae.warnings){var ge,we=new x(le);if(ue)ye._attachExtraTrace(we);else if(Ae.longStackTraces&&(ge=c._peekContext()))ge.attachExtraTrace(we);else{var ke=Y(we);we.stack=ke.message+` `+ke.stack.join(` `)}Z("warning",we)||oe(we,"",!0)}}function J(le){for(var ue=[],ye=0;ye0?function(ge){for(var we=ge.stack.replace(/\s+$/g,"").split(` `),ke=0;ke0&&ge.name!="SyntaxError"&&(we=we.slice(ke)),we}(le):[" (No stack trace)"],{message:ye,stack:le.name=="SyntaxError"?ue:J(ue)}}function oe(le,ue,ye){if(typeof console<"u"){var ge;if(_.isObject(le)){var we=le.stack;ge=ue+T(we,le)}else ge=ue+String(le);typeof v=="function"?v(ge,ye):typeof console.log!="function"&&typeof console.log!="object"||console.log(ge)}}function he(le,ue,ye,ge){var we=!1;try{typeof ue=="function"&&(we=!0,le==="rejectionHandled"?ue(ge):ue(ye,ge))}catch(ke){y.throwLater(ke)}le==="unhandledRejection"?Z(le,ye,ge)||we||oe(ye,"Unhandled rejection "):Z(le,ge)}function Se(le){var ue;if(typeof le=="function")ue="[function "+(le.name||"anonymous")+"]";else{if(ue=le&&typeof le.toString=="function"?le.toString():_.toString(le),/\[object [a-zA-Z0-9$_]+\]/.test(ue))try{ue=JSON.stringify(le)}catch{}ue.length===0&&(ue="(empty array)")}return"(<"+function(ye){return ye.length<41?ye:ye.substr(0,38)+"..."}(ue)+">, no stack trace)"}function se(){return typeof Pe=="function"}var pe=function(){return!1},me=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function xe(le){var ue=le.match(me);if(ue)return{fileName:ue[1],line:parseInt(ue[2],10)}}function Te(le){this._parent=le,this._promisesCreated=0;var ue=this._length=1+(le===void 0?0:le._length);Pe(this,Te),ue>32&&this.uncycle()}_.inherits(Te,Error),f.CapturedTrace=Te,Te.prototype.uncycle=function(){var le=this._length;if(!(le<2)){for(var ue=[],ye={},ge=0,we=this;we!==void 0;++ge)ue.push(we),we=we._parent;for(ge=(le=this._length=ge)-1;ge>=0;--ge){var ke=ue[ge].stack;ye[ke]===void 0&&(ye[ke]=ge)}for(ge=0;ge0&&(ue[Me-1]._parent=void 0,ue[Me-1]._length=1),ue[ge]._parent=void 0,ue[ge]._length=1;var Je=ge>0?ue[ge-1]:this;Me=0;--Ye)ue[Ye]._length=tt,tt++;return}}}},Te.prototype.attachExtraTrace=function(le){if(!le.__stackCleaned__){this.uncycle();for(var ue=Y(le),ye=ue.message,ge=[ue.stack],we=this;we!==void 0;)ge.push(J(we.stack.split(` `))),we=we._parent;(function(ke){for(var Me=ke[0],Je=1;Je=0;--dn)if(tt[dn]===Wt){It=dn;break}for(dn=It;dn>=0;--dn){var Un=tt[dn];if(Me[Ye]!==Un)break;Me.pop(),Ye--}Me=tt}})(ge),function(ke){for(var Me=0;Me=0)return C=/@/,T=ue,A=!0,function(ke){ke.stack=new Error().stack};try{throw new Error}catch(ke){ge="stack"in ke}return"stack"in we||!ge||typeof Error.stackTraceLimit!="number"?(T=function(ke,Me){return typeof ke=="string"?ke:typeof Me!="object"&&typeof Me!="function"||Me.name===void 0||Me.message===void 0?Se(Me):Me.toString()},null):(C=le,T=ue,function(ke){Error.stackTraceLimit+=6;try{throw new Error}catch(Me){ke.stack=Me.stack}Error.stackTraceLimit-=6})}();typeof console<"u"&&console.warn!==void 0&&(v=function(le){console.warn(le)},_.isNode&&r.stderr.isTTY?v=function(le,ue){var ye=ue?"\x1B[33m":"\x1B[31m";console.warn(ye+le+`\x1B[0m `)}:_.isNode||typeof new Error().stack!="string"||(v=function(le,ue){console.warn("%c"+le,ue?"color: darkorange":"color: red")}));var Ae={warnings:N,longStackTraces:!1,cancellation:!1,monitoring:!1};return I&&c.longStackTraces(),{longStackTraces:function(){return Ae.longStackTraces},warnings:function(){return Ae.warnings},cancellation:function(){return Ae.cancellation},monitoring:function(){return Ae.monitoring},propagateFromFunction:function(){return ae},boundValueFunction:function(){return fe},checkForgottenReturns:function(le,ue,ye,ge,we){if(le===void 0&&ue!==null&&F){if(we!==void 0&&we._returnedNonUndefined()||!(65535&ge._bitField))return;ye&&(ye+=" ");var ke="",Me="";if(ue._trace){for(var Je=ue._trace.stack.split(` `),tt=J(Je),Ye=tt.length-1;Ye>=0;--Ye){var Wt=tt[Ye];if(!S.test(Wt)){var It=Wt.match(E);It&&(ke="at "+It[1]+":"+It[2]+":"+It[3]+" ");break}}if(tt.length>0){var dn=tt[0];for(Ye=0;Ye0&&(Me=` `+Je[Ye-1]);break}}}var Un="a promise was created in a "+ye+"handler "+ke+"but was not returned from it, see http://goo.gl/rRqMUw"+Me;ge._warn(Un,!0,ue)}},setBounds:function(le,ue){if(se()){for(var ye,ge,we=le.stack.split(` `),ke=ue.stack.split(` `),Me=-1,Je=-1,tt=0;tt=Je||(pe=function(Wt){if(w.test(Wt))return!0;var It=xe(Wt);return!!(It&&It.fileName===ye&&Me<=It.line&&It.line<=Je)})}},warn:U,deprecated:function(le,ue){var ye=le+" is deprecated and will be removed in a future version.";return ue&&(ye+=" Use "+ue+" instead."),U(ye)},CapturedTrace:Te,fireDomEvent:W,fireGlobalEvent:X}}},{"./errors":12,"./util":36}],10:[function(a,s,l){s.exports=function(c){function f(){return this.value}function d(){throw this.reason}c.prototype.return=c.prototype.thenReturn=function(p){return p instanceof c&&p.suppressUnhandledRejections(),this._then(f,void 0,void 0,{value:p},void 0)},c.prototype.throw=c.prototype.thenThrow=function(p){return this._then(d,void 0,void 0,{reason:p},void 0)},c.prototype.catchThrow=function(p){if(arguments.length<=1)return this._then(void 0,d,void 0,{reason:p},void 0);var v=arguments[1];return this.caught(p,function(){throw v})},c.prototype.catchReturn=function(p){if(arguments.length<=1)return p instanceof c&&p.suppressUnhandledRejections(),this._then(void 0,f,void 0,{value:p},void 0);var v=arguments[1];return v instanceof c&&v.suppressUnhandledRejections(),this.caught(p,function(){return v})}}},{}],11:[function(a,s,l){s.exports=function(c,f){var d=c.reduce,p=c.all;function v(){return p(this)}c.prototype.each=function(g){return d(this,g,f,0)._then(v,void 0,void 0,this,void 0)},c.prototype.mapSeries=function(g){return d(this,g,f,f)},c.each=function(g,y){return d(g,y,f,0)._then(v,void 0,void 0,g,void 0)},c.mapSeries=function(g,y){return d(g,y,f,f)}}},{}],12:[function(a,s,l){var c,f,d=a("./es5"),p=d.freeze,v=a("./util"),g=v.inherits,y=v.notEnumerableProp;function x(N,I){function F(q){if(!(this instanceof F))return new F(q);y(this,"message",typeof q=="string"?q:I),y(this,"name",N),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return g(F,Error),F}var _=x("Warning","warning"),b=x("CancellationError","cancellation error"),w=x("TimeoutError","timeout error"),S=x("AggregateError","aggregate error");try{c=TypeError,f=RangeError}catch{c=x("TypeError","type error"),f=x("RangeError","range error")}for(var E="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),C=0;C1?C.cancelPromise._reject(T):C.cancelPromise._cancel(),C.cancelPromise=null,!0)}function w(){return E.call(this,this.promise._target()._settledValue())}function S(C){if(!b(this,C))return g.e=C,g}function E(C){var T=this.promise,A=this.handler;if(!this.called){this.called=!0;var D=this.isFinallyHandler()?A.call(T._boundValue()):A.call(T._boundValue(),C);if(D===d)return D;if(D!==void 0){T._setReturnedNonUndefined();var N=f(D,T);if(N instanceof c){if(this.cancelPromise!=null){if(N._isCancelled()){var I=new v("late cancellation observer");return T._attachExtraTrace(I),g.e=I,g}N.isPending()&&N._attachCancellationCallback(new _(this))}return N._then(w,S,void 0,this,void 0)}}}return T.isRejected()?(b(this),g.e=C,g):(b(this),C)}return x.prototype.isFinallyHandler=function(){return this.type===0},_.prototype._resultCancelled=function(){b(this.finallyHandler)},c.prototype._passThrough=function(C,T,A,D){return typeof C!="function"?this.then():this._then(A,D,void 0,new x(this,T,C),void 0)},c.prototype.lastly=c.prototype.finally=function(C){return this._passThrough(C,0,E,E)},c.prototype.tap=function(C){return this._passThrough(C,1,E)},c.prototype.tapCatch=function(C){var T=arguments.length;if(T===1)return this._passThrough(C,1,void 0,E);var A,D=new Array(T-1),N=0;for(A=0;A0&&typeof arguments[_]=="function"&&(x=arguments[_]);var b=[].slice.call(arguments);x&&b.pop();var w=new f(b).promise();return x!==void 0?w.spread(x):w}}},{"./util":36}],18:[function(a,s,l){s.exports=function(c,f,d,p,v,g){var y=c._getDomain,x=a("./util"),_=x.tryCatch,b=x.errorObj,w=c._async;function S(C,T,A,D){this.constructor$(C),this._promise._captureStackTrace();var N=y();this._callback=N===null?T:x.domainBind(N,T),this._preservedValues=D===v?new Array(this.length()):null,this._limit=A,this._inFlight=0,this._queue=[],w.invoke(this._asyncInit,this,void 0)}function E(C,T,A,D){if(typeof T!="function")return d("expecting a function but got "+x.classString(T));var N=0;if(A!==void 0){if(typeof A!="object"||A===null)return c.reject(new TypeError("options argument must be an object but it is "+x.classString(A)));if(typeof A.concurrency!="number")return c.reject(new TypeError("'concurrency' must be a number but it is "+x.classString(A.concurrency)));N=A.concurrency}return new S(C,T,N=typeof N=="number"&&isFinite(N)&&N>=1?N:0,D).promise()}x.inherits(S,f),S.prototype._asyncInit=function(){this._init$(void 0,-2)},S.prototype._init=function(){},S.prototype._promiseFulfilled=function(C,T){var A=this._values,D=this.length(),N=this._preservedValues,I=this._limit;if(T<0){if(A[T=-1*T-1]=C,I>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(I>=1&&this._inFlight>=I)return A[T]=C,this._queue.push(T),!1;N!==null&&(N[T]=C);var F=this._promise,q=this._callback,W=F._boundValue();F._pushContext();var X=_(q).call(W,C,T,D),Q=F._popContext();if(g.checkForgottenReturns(X,Q,N!==null?"Promise.filter":"Promise.map",F),X===b)return this._reject(X.e),!0;var ne=p(X,this._promise);if(ne instanceof c){var Z=(ne=ne._target())._bitField;if(!(50397184&Z))return I>=1&&this._inFlight++,A[T]=ne,ne._proxy(this,-1*(T+1)),!1;if(!(33554432&Z))return 16777216&Z?(this._reject(ne._reason()),!0):(this._cancel(),!0);X=ne._value()}A[T]=X}return++this._totalResolved>=D&&(N!==null?this._filter(A,N):this._resolve(A),!0)},S.prototype._drainQueue=function(){for(var C=this._queue,T=this._limit,A=this._values;C.length>0&&this._inFlight1){v.deprecated("calling Promise.try with more than 1 argument");var w=arguments[1],S=arguments[2];_=g.isArray(w)?y(x).apply(S,w):y(x).call(S,w)}else _=y(x)();var E=b._popContext();return v.checkForgottenReturns(_,E,"Promise.try",b),b._resolveFromSyncValue(_),b},c.prototype._resolveFromSyncValue=function(x){x===g.errorObj?this._rejectCallback(x.e,!1):this._resolveCallback(x,!0)}}},{"./util":36}],20:[function(a,s,l){var c=a("./util"),f=c.maybeWrapAsError,d=a("./errors").OperationalError,p=a("./es5"),v=/^(?:name|message|stack|cause)$/;function g(y){var x;if(function(S){return S instanceof Error&&p.getPrototypeOf(S)===Error.prototype}(y)){(x=new d(y)).name=y.name,x.message=y.message,x.stack=y.stack;for(var _=p.keys(y),b=0;b<_.length;++b){var w=_[b];v.test(w)||(x[w]=y[w])}return x}return c.markAsOriginatingFromRejection(y),y}s.exports=function(y,x){return function(_,b){if(y!==null){if(_){var w=g(f(_));y._attachExtraTrace(w),y._reject(w)}else if(x){var S=[].slice.call(arguments,1);y._fulfill(S)}else y._fulfill(b);y=null}}}},{"./errors":12,"./es5":13,"./util":36}],21:[function(a,s,l){s.exports=function(c){var f=a("./util"),d=c._async,p=f.tryCatch,v=f.errorObj;function g(_,b){if(!f.isArray(_))return y.call(this,_,b);var w=p(b).apply(this._boundValue(),[null].concat(_));w===v&&d.throwLater(w.e)}function y(_,b){var w=this._boundValue(),S=_===void 0?p(b).call(w,null):p(b).call(w,null,_);S===v&&d.throwLater(S.e)}function x(_,b){if(!_){var w=new Error(_+"");w.cause=_,_=w}var S=p(b).call(this._boundValue(),_);S===v&&d.throwLater(S.e)}c.prototype.asCallback=c.prototype.nodeify=function(_,b){if(typeof _=="function"){var w=y;b!==void 0&&Object(b).spread&&(w=g),this._then(w,x,void 0,this,_)}return this}}},{"./util":36}],22:[function(a,s,l){s.exports=function(){var c=function(){return new S(`circular promise resolution chain See http://goo.gl/MqrFmX `)},f=function(){return new z.PromiseInspection(this._target())},d=function(K){return z.reject(new S(K))};function p(){}var v,g={},y=a("./util");v=y.isNode?function(){var K=r.domain;return K===void 0&&(K=null),K}:function(){return null},y.notEnumerableProp(z,"_getDomain",v);var x=a("./es5"),_=a("./async"),b=new _;x.defineProperty(z,"_async",{value:b});var w=a("./errors"),S=z.TypeError=w.TypeError;z.RangeError=w.RangeError;var E=z.CancellationError=w.CancellationError;z.TimeoutError=w.TimeoutError,z.OperationalError=w.OperationalError,z.RejectionError=w.OperationalError,z.AggregateError=w.AggregateError;var C=function(){},T={},A={},D=a("./thenables")(z,C),N=a("./promise_array")(z,C,D,d,p),I=a("./context")(z),F=I.create,q=a("./debuggability")(z,I),W=(q.CapturedTrace,a("./finally")(z,D,A)),X=a("./catch_filter")(A),Q=a("./nodeback"),ne=y.errorObj,Z=y.tryCatch;function z(K){K!==C&&function(te,ie){if(te==null||te.constructor!==z)throw new S(`the promise constructor cannot be invoked directly See http://goo.gl/MqrFmX `);if(typeof ie!="function")throw new S("expecting a function but got "+y.classString(ie))}(this,K),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(K),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function B(K){this.promise._resolveCallback(K)}function H(K){this.promise._rejectCallback(K,!1)}function ee(K){var te=new z(C);te._fulfillmentHandler0=K,te._rejectionHandler0=K,te._promise0=K,te._receiver0=K}return z.prototype.toString=function(){return"[object Promise]"},z.prototype.caught=z.prototype.catch=function(K){var te=arguments.length;if(te>1){var ie,ae=new Array(te-1),fe=0;for(ie=0;ie0&&typeof K!="function"&&typeof te!="function"){var ie=".then() only accepts functions but was passed: "+y.classString(K);arguments.length>1&&(ie+=", "+y.classString(te)),this._warn(ie)}return this._then(K,te,void 0,void 0,void 0)},z.prototype.done=function(K,te){this._then(K,te,void 0,void 0,void 0)._setIsFinal()},z.prototype.spread=function(K){return typeof K!="function"?d("expecting a function but got "+y.classString(K)):this.all()._then(K,void 0,void 0,T,void 0)},z.prototype.toJSON=function(){var K={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(K.fulfillmentValue=this.value(),K.isFulfilled=!0):this.isRejected()&&(K.rejectionReason=this.reason(),K.isRejected=!0),K},z.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new N(this).promise()},z.prototype.error=function(K){return this.caught(y.originatesFromRejection,K)},z.getNewLibraryCopy=s.exports,z.is=function(K){return K instanceof z},z.fromNode=z.fromCallback=function(K){var te=new z(C);te._captureStackTrace();var ie=arguments.length>1&&!!Object(arguments[1]).multiArgs,ae=Z(K)(Q(te,ie));return ae===ne&&te._rejectCallback(ae.e,!0),te._isFateSealed()||te._setAsyncGuaranteed(),te},z.all=function(K){return new N(K).promise()},z.cast=function(K){var te=D(K);return te instanceof z||((te=new z(C))._captureStackTrace(),te._setFulfilled(),te._rejectionHandler0=K),te},z.resolve=z.fulfilled=z.cast,z.reject=z.rejected=function(K){var te=new z(C);return te._captureStackTrace(),te._rejectCallback(K,!0),te},z.setScheduler=function(K){if(typeof K!="function")throw new S("expecting a function but got "+y.classString(K));return b.setScheduler(K)},z.prototype._then=function(K,te,ie,ae,fe){var j=fe!==void 0,k=j?fe:new z(C),U=this._target(),J=U._bitField;j||(k._propagateFrom(this,3),k._captureStackTrace(),ae===void 0&&2097152&this._bitField&&(ae=50397184&J?this._boundValue():U===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,k));var Y=v();if(50397184&J){var oe,he,Se=U._settlePromiseCtx;33554432&J?(he=U._rejectionHandler0,oe=K):16777216&J?(he=U._fulfillmentHandler0,oe=te,U._unsetRejectionIsUnhandled()):(Se=U._settlePromiseLateCancellationObserver,he=new E("late cancellation observer"),U._attachExtraTrace(he),oe=te),b.invoke(Se,U,{handler:Y===null?oe:typeof oe=="function"&&y.domainBind(Y,oe),promise:k,receiver:ae,value:he})}else U._addCallbacks(K,te,k,ae,Y);return k},z.prototype._length=function(){return 65535&this._bitField},z.prototype._isFateSealed=function(){return(117506048&this._bitField)!=0},z.prototype._isFollowing=function(){return(67108864&this._bitField)==67108864},z.prototype._setLength=function(K){this._bitField=-65536&this._bitField|65535&K},z.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},z.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},z.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},z.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},z.prototype._isFinal=function(){return(4194304&this._bitField)>0},z.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},z.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},z.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},z.prototype._setAsyncGuaranteed=function(){b.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},z.prototype._receiverAt=function(K){var te=K===0?this._receiver0:this[4*K-4+3];if(te!==g)return te===void 0&&this._isBound()?this._boundValue():te},z.prototype._promiseAt=function(K){return this[4*K-4+2]},z.prototype._fulfillmentHandlerAt=function(K){return this[4*K-4+0]},z.prototype._rejectionHandlerAt=function(K){return this[4*K-4+1]},z.prototype._boundValue=function(){},z.prototype._migrateCallback0=function(K){K._bitField;var te=K._fulfillmentHandler0,ie=K._rejectionHandler0,ae=K._promise0,fe=K._receiverAt(0);fe===void 0&&(fe=g),this._addCallbacks(te,ie,ae,fe,null)},z.prototype._migrateCallbackAt=function(K,te){var ie=K._fulfillmentHandlerAt(te),ae=K._rejectionHandlerAt(te),fe=K._promiseAt(te),j=K._receiverAt(te);j===void 0&&(j=g),this._addCallbacks(ie,ae,fe,j,null)},z.prototype._addCallbacks=function(K,te,ie,ae,fe){var j=this._length();if(j>=65531&&(j=0,this._setLength(0)),j===0)this._promise0=ie,this._receiver0=ae,typeof K=="function"&&(this._fulfillmentHandler0=fe===null?K:y.domainBind(fe,K)),typeof te=="function"&&(this._rejectionHandler0=fe===null?te:y.domainBind(fe,te));else{var k=4*j-4;this[k+2]=ie,this[k+3]=ae,typeof K=="function"&&(this[k+0]=fe===null?K:y.domainBind(fe,K)),typeof te=="function"&&(this[k+1]=fe===null?te:y.domainBind(fe,te))}return this._setLength(j+1),j},z.prototype._proxy=function(K,te){this._addCallbacks(void 0,void 0,te,K,null)},z.prototype._resolveCallback=function(K,te){if(!(117506048&this._bitField)){if(K===this)return this._rejectCallback(c(),!1);var ie=D(K,this);if(!(ie instanceof z))return this._fulfill(K);te&&this._propagateFrom(ie,2);var ae=ie._target();if(ae!==this){var fe=ae._bitField;if(50397184&fe)if(33554432&fe)this._fulfill(ae._value());else if(16777216&fe)this._reject(ae._reason());else{var U=new E("late cancellation observer");ae._attachExtraTrace(U),this._reject(U)}else{var j=this._length();j>0&&ae._migrateCallback0(this);for(var k=1;k>>16)){if(K===this){var ie=c();return this._attachExtraTrace(ie),this._reject(ie)}this._setFulfilled(),this._rejectionHandler0=K,(65535&te)>0&&(134217728&te?this._settlePromises():b.settlePromises(this))}},z.prototype._reject=function(K){var te=this._bitField;if(!((117506048&te)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=K,this._isFinal())return b.fatalError(K,y.isNode);(65535&te)>0?b.settlePromises(this):this._ensurePossibleRejectionHandled()}},z.prototype._fulfillPromises=function(K,te){for(var ie=1;ie0){if(16842752&K){var ie=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,ie,K),this._rejectPromises(te,ie)}else{var ae=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,ae,K),this._fulfillPromises(te,ae)}this._setLength(0)}this._clearCancellationData()},z.prototype._settledValue=function(){var K=this._bitField;return 33554432&K?this._rejectionHandler0:16777216&K?this._fulfillmentHandler0:void 0},z.defer=z.pending=function(){return q.deprecated("Promise.defer","new Promise"),{promise:new z(C),resolve:B,reject:H}},y.notEnumerableProp(z,"_makeSelfResolutionError",c),a("./method")(z,C,D,d,q),a("./bind")(z,C,D,q),a("./cancel")(z,N,d,q),a("./direct_resolve")(z),a("./synchronous_inspection")(z),a("./join")(z,N,D,C,b,v),z.Promise=z,z.version="3.5.1",a("./map.js")(z,N,d,D,C,q),a("./call_get.js")(z),a("./using.js")(z,d,D,F,C,q),a("./timers.js")(z,C,q),a("./generators.js")(z,d,C,D,p,q),a("./nodeify.js")(z),a("./promisify.js")(z,C),a("./props.js")(z,N,D,d),a("./race.js")(z,C,D,d),a("./reduce.js")(z,N,d,D,C,q),a("./settle.js")(z,N,q),a("./some.js")(z,N,d),a("./filter.js")(z,C),a("./each.js")(z,C),a("./any.js")(z),y.toFastProperties(z),y.toFastProperties(z.prototype),ee({a:1}),ee({b:2}),ee({c:3}),ee(1),ee(function(){}),ee(void 0),ee(!1),ee(new z(C)),q.setBounds(_.firstLineError,y.lastLineError),z}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(a,s,l){s.exports=function(c,f,d,p,v){var g=a("./util");function y(x){var _=this._promise=new c(f);x instanceof c&&_._propagateFrom(x,3),_._setOnCancel(this),this._values=x,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return g.isArray,g.inherits(y,v),y.prototype.length=function(){return this._length},y.prototype.promise=function(){return this._promise},y.prototype._init=function x(_,b){var w=d(this._values,this._promise);if(w instanceof c){var S=(w=w._target())._bitField;if(this._values=w,(50397184&S)==0)return this._promise._setAsyncGuaranteed(),w._then(x,this._reject,void 0,this,b);if(!(33554432&S))return 16777216&S?this._reject(w._reason()):this._cancel();w=w._value()}if((w=g.asArray(w))!==null)w.length!==0?this._iterate(w):b===-5?this._resolveEmptyArray():this._resolve(function(C){switch(b){case-2:return[];case-3:return{};case-6:return new Map}}());else{var E=p("expecting an array or an iterable object but got "+g.classString(w)).reason();this._promise._rejectCallback(E,!1)}},y.prototype._iterate=function(x){var _=this.getActualLength(x.length);this._length=_,this._values=this.shouldCopyValues()?new Array(_):this._values;for(var b=this._promise,w=!1,S=null,E=0;E<_;++E){var C=d(x[E],b);S=C instanceof c?(C=C._target())._bitField:null,w?S!==null&&C.suppressUnhandledRejections():S!==null?50397184&S?w=33554432&S?this._promiseFulfilled(C._value(),E):16777216&S?this._promiseRejected(C._reason(),E):this._promiseCancelled(E):(C._proxy(this,E),this._values[E]=C):w=this._promiseFulfilled(C,E)}w||b._setAsyncGuaranteed()},y.prototype._isResolved=function(){return this._values===null},y.prototype._resolve=function(x){this._values=null,this._promise._fulfill(x)},y.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},y.prototype._reject=function(x){this._values=null,this._promise._rejectCallback(x,!1)},y.prototype._promiseFulfilled=function(x,_){return this._values[_]=x,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},y.prototype._promiseCancelled=function(){return this._cancel(),!0},y.prototype._promiseRejected=function(x){return this._totalResolved++,this._reject(x),!0},y.prototype._resultCancelled=function(){if(!this._isResolved()){var x=this._values;if(this._cancel(),x instanceof c)x.cancel();else for(var _=0;_=this._length){var C;if(this._isMap)C=function(N){for(var I=new v,F=N.length/2|0,q=0;q>1},c.prototype.props=function(){return w(this)},c.props=function(S){return w(S)}}},{"./es5":13,"./util":36}],26:[function(a,s,l){function c(f){this._capacity=f,this._length=0,this._front=0}c.prototype._willBeOverCapacity=function(f){return this._capacity"u"){var p=i.setImmediate,v=r.nextTick;c=f.isRecentNode?function(y){p.call(i,y)}:function(y){v.call(r,y)}}else if(typeof d=="function"&&typeof d.resolve=="function"){var g=d.resolve();c=function(y){g.then(y)}}else c=typeof MutationObserver>"u"||typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)?o!==void 0?function(y){o(y)}:typeof setTimeout<"u"?function(y){setTimeout(y,0)}:function(){throw new Error(`No async scheduler available See http://goo.gl/MqrFmX `)}:function(){var y=document.createElement("div"),x={attributes:!0},_=!1,b=document.createElement("div");return new MutationObserver(function(){y.classList.toggle("foo"),_=!1}).observe(b,x),function(w){var S=new MutationObserver(function(){S.disconnect(),w()});S.observe(y,x),_||(_=!0,b.classList.toggle("foo"))}}();s.exports=c},{"./util":36}],30:[function(a,s,l){s.exports=function(c,f,d){var p=c.PromiseInspection;function v(g){this.constructor$(g)}a("./util").inherits(v,f),v.prototype._promiseResolved=function(g,y){return this._values[g]=y,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},v.prototype._promiseFulfilled=function(g,y){var x=new p;return x._bitField=33554432,x._settledValueField=g,this._promiseResolved(y,x)},v.prototype._promiseRejected=function(g,y){var x=new p;return x._bitField=16777216,x._settledValueField=g,this._promiseResolved(y,x)},c.settle=function(g){return d.deprecated(".settle()",".reflect()"),new v(g).promise()},c.prototype.settle=function(){return c.settle(this)}}},{"./util":36}],31:[function(a,s,l){s.exports=function(c,f,d){var p=a("./util"),v=a("./errors").RangeError,g=a("./errors").AggregateError,y=p.isArray,x={};function _(w){this.constructor$(w),this._howMany=0,this._unwrap=!1,this._initialized=!1}function b(w,S){if((0|S)!==S||S<0)return d(`expecting a positive integer See http://goo.gl/MqrFmX `);var E=new _(w),C=E.promise();return E.setHowMany(S),E.init(),C}p.inherits(_,f),_.prototype._init=function(){if(this._initialized)if(this._howMany!==0){this._init$(void 0,-5);var w=y(this._values);!this._isResolved()&&w&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},_.prototype.init=function(){this._initialized=!0,this._init()},_.prototype.setUnwrap=function(){this._unwrap=!0},_.prototype.howMany=function(){return this._howMany},_.prototype.setHowMany=function(w){this._howMany=w},_.prototype._promiseFulfilled=function(w){return this._addFulfilled(w),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},_.prototype._promiseRejected=function(w){return this._addRejected(w),this._checkOutcome()},_.prototype._promiseCancelled=function(){return this._values instanceof c||this._values==null?this._cancel():(this._addRejected(x),this._checkOutcome())},_.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var w=new g,S=this.length();S0?this._reject(w):this._cancel(),!0}return!1},_.prototype._fulfilled=function(){return this._totalResolved},_.prototype._rejected=function(){return this._values.length-this.length()},_.prototype._addRejected=function(w){this._values.push(w)},_.prototype._addFulfilled=function(w){this._values[this._totalResolved++]=w},_.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},_.prototype._getRangeError=function(w){var S="Input array must contain at least "+this._howMany+" items but contains only "+w+" items";return new v(S)},_.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},c.some=function(w,S){return b(w,S)},c.prototype.some=function(w){return b(this,w)},c._SomePromiseArray=_}},{"./errors":12,"./util":36}],32:[function(a,s,l){s.exports=function(c){function f(_){_!==void 0?(_=_._target(),this._bitField=_._bitField,this._settledValueField=_._isFateSealed()?_._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}f.prototype._settledValue=function(){return this._settledValueField};var d=f.prototype.value=function(){if(!this.isFulfilled())throw new TypeError(`cannot get fulfillment value of a non-fulfilled promise See http://goo.gl/MqrFmX `);return this._settledValue()},p=f.prototype.error=f.prototype.reason=function(){if(!this.isRejected())throw new TypeError(`cannot get rejection reason of a non-rejected promise See http://goo.gl/MqrFmX `);return this._settledValue()},v=f.prototype.isFulfilled=function(){return(33554432&this._bitField)!=0},g=f.prototype.isRejected=function(){return(16777216&this._bitField)!=0},y=f.prototype.isPending=function(){return(50397184&this._bitField)==0},x=f.prototype.isResolved=function(){return(50331648&this._bitField)!=0};f.prototype.isCancelled=function(){return(8454144&this._bitField)!=0},c.prototype.__isCancelled=function(){return(65536&this._bitField)==65536},c.prototype._isCancelled=function(){return this._target().__isCancelled()},c.prototype.isCancelled=function(){return(8454144&this._target()._bitField)!=0},c.prototype.isPending=function(){return y.call(this._target())},c.prototype.isRejected=function(){return g.call(this._target())},c.prototype.isFulfilled=function(){return v.call(this._target())},c.prototype.isResolved=function(){return x.call(this._target())},c.prototype.value=function(){return d.call(this._target())},c.prototype.reason=function(){var _=this._target();return _._unsetRejectionIsUnhandled(),p.call(_)},c.prototype._value=function(){return this._settledValue()},c.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},c.PromiseInspection=f}},{}],33:[function(a,s,l){s.exports=function(c,f){var d=a("./util"),p=d.errorObj,v=d.isObject,g={}.hasOwnProperty;return function(y,x){if(v(y)){if(y instanceof c)return y;var _=function(w){try{return function(S){return S.then}(w)}catch(S){return p.e=S,p}}(y);if(_===p){x&&x._pushContext();var b=c.reject(_.e);return x&&x._popContext(),b}if(typeof _=="function")return function(w){try{return g.call(w,"_promise0")}catch{return!1}}(y)?(b=new c(f),y._then(b._fulfill,b._reject,void 0,b,null),b):function(w,S,E){var C=new c(f),T=C;E&&E._pushContext(),C._captureStackTrace(),E&&E._popContext();var A=!0,D=d.tryCatch(S).call(w,function(N){C&&(C._resolveCallback(N),C=null)},function(N){C&&(C._rejectCallback(N,A,!0),C=null)});return A=!1,C&&D===p&&(C._rejectCallback(D.e,!0,!0),C=null),T}(y,_,x)}return y}}},{"./util":36}],34:[function(a,s,l){s.exports=function(c,f,d){var p=a("./util"),v=c.TimeoutError;function g(w){this.handle=w}g.prototype._resultCancelled=function(){clearTimeout(this.handle)};var y=function(w){return x(+this).thenReturn(w)},x=c.delay=function(w,S){var E,C;return S!==void 0?(E=c.resolve(S)._then(y,null,null,w,void 0),d.cancellation()&&S instanceof c&&E._setOnCancel(S)):(E=new c(f),C=setTimeout(function(){E._fulfill()},+w),d.cancellation()&&E._setOnCancel(new g(C)),E._captureStackTrace()),E._setAsyncGuaranteed(),E};function _(w){return clearTimeout(this.handle),w}function b(w){throw clearTimeout(this.handle),w}c.prototype.delay=function(w){return x(w,this)},c.prototype.timeout=function(w,S){var E,C;w=+w;var T=new g(setTimeout(function(){E.isPending()&&function(A,D,N){var I;I=typeof D!="string"?D instanceof Error?D:new v("operation timed out"):new v(D),p.markAsOriginatingFromRejection(I),A._attachExtraTrace(I),A._reject(I),N!=null&&N.cancel()}(E,S,C)},w));return d.cancellation()?(C=this.then(),(E=C._then(_,b,void 0,T,void 0))._setOnCancel(T)):E=this._then(_,b,void 0,T,void 0),E}}},{"./util":36}],35:[function(a,s,l){s.exports=function(c,f,d,p,v,g){var y=a("./util"),x=a("./errors").TypeError,_=a("./util").inherits,b=y.errorObj,w=y.tryCatch,S={};function E(I){setTimeout(function(){throw I},0)}function C(I,F){var q=0,W=I.length,X=new c(v);return function Q(){if(q>=W)return X._fulfill();var ne=function(Z){var z=d(Z);return z!==Z&&typeof Z._isDisposable=="function"&&typeof Z._getDisposer=="function"&&Z._isDisposable()&&z._setDisposable(Z._getDisposer()),z}(I[q++]);if(ne instanceof c&&ne._isDisposable()){try{ne=d(ne._getDisposer().tryDispose(F),I.promise)}catch(Z){return E(Z)}if(ne instanceof c)return ne._then(Q,E,null,null,null)}Q()}(),X}function T(I,F,q){this._data=I,this._promise=F,this._context=q}function A(I,F,q){this.constructor$(I,F,q)}function D(I){return T.isDisposer(I)?(this.resources[this.index]._setDisposable(I),I.promise()):I}function N(I){this.length=I,this.promise=null,this[I-1]=null}T.prototype.data=function(){return this._data},T.prototype.promise=function(){return this._promise},T.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():S},T.prototype.tryDispose=function(I){var F=this.resource(),q=this._context;q!==void 0&&q._pushContext();var W=F!==S?this.doDispose(F,I):null;return q!==void 0&&q._popContext(),this._promise._unsetDisposable(),this._data=null,W},T.isDisposer=function(I){return I!=null&&typeof I.resource=="function"&&typeof I.tryDispose=="function"},_(A,T),A.prototype.doDispose=function(I,F){return this.data().call(I,I,F)},N.prototype._resultCancelled=function(){for(var I=this.length,F=0;F0},c.prototype._getDisposer=function(){return this._disposer},c.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},c.prototype.disposer=function(I){if(typeof I=="function")return new A(I,this,p());throw new x}}},{"./errors":12,"./util":36}],36:[function(a,s,l){var c,f=a("./es5"),d=typeof navigator>"u",p={e:{}},v=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:this!==void 0?this:null;function g(){try{var W=c;return c=null,W.apply(this,arguments)}catch(X){return p.e=X,p}}function y(W){return W==null||W===!0||W===!1||typeof W=="string"||typeof W=="number"}function x(W,X,Q){if(y(W))return W;var ne={value:Q,configurable:!0,enumerable:!1,writable:!0};return f.defineProperty(W,X,ne),W}var _=function(){var W=[Array.prototype,Object.prototype,Function.prototype],X=function(Z){for(var z=0;z1,ne=X.length>0&&!(X.length===1&&X[0]==="constructor"),Z=b.test(W+"")&&f.names(W).length>0;if(Q||ne||Z)return!0}return!1}catch{return!1}},isIdentifier:function(W){return w.test(W)},inheritedDataKeys:_,getDataPropertyOrDefault:function(W,X,Q){if(!f.isES5)return{}.hasOwnProperty.call(W,X)?W[X]:void 0;var ne=Object.getOwnPropertyDescriptor(W,X);return ne!=null?ne.get==null&&ne.set==null?ne.value:Q:void 0},thrower:function(W){throw W},isArray:f.isArray,asArray:D,notEnumerableProp:x,isPrimitive:y,isObject:function(W){return typeof W=="function"||typeof W=="object"&&W!==null},isError:E,canEvaluate:d,errorObj:p,tryCatch:function(W){return c=W,g},inherits:function(W,X){var Q={}.hasOwnProperty;function ne(){for(var Z in this.constructor=W,this.constructor$=X,X.prototype)Q.call(X.prototype,Z)&&Z.charAt(Z.length-1)!=="$"&&(this[Z+"$"]=X.prototype[Z])}return ne.prototype=X.prototype,W.prototype=new ne,W.prototype},withAppended:function(W,X){var Q,ne=W.length,Z=new Array(ne+1);for(Q=0;Q10||W[0]>0}(),q.isNode&&q.toFastProperties(r);try{throw new Error}catch(W){q.lastLineError=W}s.exports=q},{"./es5":13}]},{},[4])(4),typeof window<"u"&&window!==null?window.P=window.Promise:typeof self<"u"&&self!==null&&(self.P=self.Promise)}).call(this,n(4),n(0),n(11).setImmediate)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r,i){if(!i.eol&&r){for(var o=0,a=r.length;o0?(typeof H=="string"||ae.objectMode||Object.getPrototypeOf(H)===f.prototype||(H=function(fe){return f.from(fe)}(H)),K?ae.endEmitted?B.emit("error",new Error("stream.unshift() after end event")):C(B,ae,H,!0):ae.ended?B.emit("error",new Error("stream.push() after EOF")):(ae.reading=!1,ae.decoder&&!ee?(H=ae.decoder.write(H),ae.objectMode||H.length!==0?C(B,ae,H,!1):I(B,ae)):C(B,ae,H,!1))):K||(ae.reading=!1)),function(fe){return!fe.ended&&(fe.needReadable||fe.lengthH.highWaterMark&&(H.highWaterMark=function(ee){return ee>=T?ee=T:(ee--,ee|=ee>>>1,ee|=ee>>>2,ee|=ee>>>4,ee|=ee>>>8,ee|=ee>>>16,ee++),ee}(B)),B<=H.length?B:H.ended?H.length:(H.needReadable=!0,0))}function D(B){var H=B._readableState;H.needReadable=!1,H.emittedReadable||(g("emitReadable",H.flowing),H.emittedReadable=!0,H.sync?o.nextTick(N,B):N(B))}function N(B){g("emit readable"),B.emit("readable"),X(B)}function I(B,H){H.readingMore||(H.readingMore=!0,o.nextTick(F,B,H))}function F(B,H){for(var ee=H.length;!H.reading&&!H.flowing&&!H.ended&&H.length=H.length?(ee=H.decoder?H.buffer.join(""):H.buffer.length===1?H.buffer.head.data:H.buffer.concat(H.length),H.buffer.clear()):ee=function(K,te,ie){var ae;return KY.length?Y.length:fe;if(oe===Y.length?J+=Y:J+=Y.slice(0,fe),(fe-=oe)==0){oe===Y.length?(++U,k.next?j.head=k.next:j.head=j.tail=null):(j.head=k,k.data=Y.slice(oe));break}++U}return j.length-=U,J}(K,te):function(fe,j){var k=f.allocUnsafe(fe),U=j.head,J=1;for(U.data.copy(k),fe-=U.data.length;U=U.next;){var Y=U.data,oe=fe>Y.length?Y.length:fe;if(Y.copy(k,k.length-fe,0,oe),(fe-=oe)==0){oe===Y.length?(++J,U.next?j.head=U.next:j.head=j.tail=null):(j.head=U,U.data=Y.slice(oe));break}++J}return j.length-=J,k}(K,te),ae}(B,H.buffer,H.decoder),ee);var ee}function ne(B){var H=B._readableState;if(H.length>0)throw new Error('"endReadable()" called on non-empty stream');H.endEmitted||(H.ended=!0,o.nextTick(Z,H,B))}function Z(B,H){B.endEmitted||B.length!==0||(B.endEmitted=!0,H.readable=!1,H.emit("end"))}function z(B,H){for(var ee=0,K=B.length;ee=H.highWaterMark||H.ended))return g("read: emitReadable",H.length,H.ended),H.length===0&&H.ended?ne(this):D(this),null;if((B=A(B,H))===0&&H.ended)return H.length===0&&ne(this),null;var K,te=H.needReadable;return g("need readable",te),(H.length===0||H.length-B0?Q(B,H):null)===null?(H.needReadable=!0,B=0):H.length-=B,H.length===0&&(H.ended||(H.needReadable=!0),ee!==B&&H.ended&&ne(this)),K!==null&&this.emit("data",K),K},S.prototype._read=function(B){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(B,H){var ee=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=B;break;case 1:K.pipes=[K.pipes,B];break;default:K.pipes.push(B)}K.pipesCount+=1,g("pipe count=%d opts=%j",K.pipesCount,H);var te=H&&H.end===!1||B===i.stdout||B===i.stderr?oe:ie;function ie(){g("onend"),B.end()}K.endEmitted?o.nextTick(te):ee.once("end",te),B.on("unpipe",function he(Se,se){g("onunpipe"),Se===ee&&se&&se.hasUnpiped===!1&&(se.hasUnpiped=!0,g("cleanup"),B.removeListener("close",J),B.removeListener("finish",Y),B.removeListener("drain",ae),B.removeListener("error",U),B.removeListener("unpipe",he),ee.removeListener("end",ie),ee.removeListener("end",oe),ee.removeListener("data",k),fe=!0,!K.awaitDrain||B._writableState&&!B._writableState.needDrain||ae())});var ae=function(he){return function(){var Se=he._readableState;g("pipeOnDrain",Se.awaitDrain),Se.awaitDrain&&Se.awaitDrain--,Se.awaitDrain===0&&l(he,"data")&&(Se.flowing=!0,X(he))}}(ee);B.on("drain",ae);var fe=!1,j=!1;function k(he){g("ondata"),j=!1,B.write(he)!==!1||j||((K.pipesCount===1&&K.pipes===B||K.pipesCount>1&&z(K.pipes,B)!==-1)&&!fe&&(g("false write response, pause",ee._readableState.awaitDrain),ee._readableState.awaitDrain++,j=!0),ee.pause())}function U(he){g("onerror",he),oe(),B.removeListener("error",U),l(B,"error")===0&&B.emit("error",he)}function J(){B.removeListener("finish",Y),oe()}function Y(){g("onfinish"),B.removeListener("close",J),oe()}function oe(){g("unpipe"),ee.unpipe(B)}return ee.on("data",k),function(he,Se,se){if(typeof he.prependListener=="function")return he.prependListener(Se,se);he._events&&he._events[Se]?s(he._events[Se])?he._events[Se].unshift(se):he._events[Se]=[se,he._events[Se]]:he.on(Se,se)}(B,"error",U),B.once("close",J),B.once("finish",Y),B.emit("pipe",ee),K.flowing||(g("pipe resume"),ee.resume()),B},S.prototype.unpipe=function(B){var H=this._readableState,ee={hasUnpiped:!1};if(H.pipesCount===0)return this;if(H.pipesCount===1)return B&&B!==H.pipes?this:(B||(B=H.pipes),H.pipes=null,H.pipesCount=0,H.flowing=!1,B&&B.emit("unpipe",this,ee),this);if(!B){var K=H.pipes,te=H.pipesCount;H.pipes=null,H.pipesCount=0,H.flowing=!1;for(var ie=0;ie>5==6?2:g>>4==14?3:g>>3==30?4:g>>6==2?-1:-2}function s(g){var y=this.lastTotal-this.lastNeed,x=function(_,b,w){if((192&b[0])!=128)return _.lastNeed=0,"�";if(_.lastNeed>1&&b.length>1){if((192&b[1])!=128)return _.lastNeed=1,"�";if(_.lastNeed>2&&b.length>2&&(192&b[2])!=128)return _.lastNeed=2,"�"}}(this,g);return x!==void 0?x:this.lastNeed<=g.length?(g.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(g.copy(this.lastChar,y,0,g.length),void(this.lastNeed-=g.length))}function l(g,y){if((g.length-y)%2==0){var x=g.toString("utf16le",y);if(x){var _=x.charCodeAt(x.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",y,g.length-1)}function c(g){var y=g&&g.length?this.write(g):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,x)}return y}function f(g,y){var x=(g.length-y)%3;return x===0?g.toString("base64",y):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",y,g.length-x))}function d(g){var y=g&&g.length?this.write(g):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function p(g){return g.toString(this.encoding)}function v(g){return g&&g.length?this.write(g):""}t.StringDecoder=o,o.prototype.write=function(g){if(g.length===0)return"";var y,x;if(this.lastNeed){if((y=this.fillLast(g))===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x=0?(C>0&&(b.lastNeed=C-1),C):--E=0?(C>0&&(b.lastNeed=C-2),C):--E=0?(C>0&&(C===2?C=0:b.lastNeed=C-3),C):0}(this,g,y);if(!this.lastNeed)return g.toString("utf8",y);this.lastTotal=x;var _=g.length-(x-this.lastNeed);return g.copy(this.lastChar,0,_),g.toString("utf8",y,_)},o.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length}},function(e,t,n){e.exports=o;var r=n(1),i=n(5);function o(l){if(!(this instanceof o))return new o(l);r.call(this,l),this._transformState={afterTransform:(function(c,f){var d=this._transformState;d.transforming=!1;var p=d.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,f!=null&&this.push(f),p(c);var v=this._readableState;v.reading=!1,(v.needReadable||v.length-1&&a.push(i[s]);return a},t.trimLeft=String.prototype.trimLeft?function(i){return i.trimLeft()}:function(i){return i.replace(/^\s+/,"")},t.trimRight=String.prototype.trimRight?function(i){return i.trimRight()}:function(i){return i.replace(/\s+$/,"")}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)s.hasOwnProperty(l)&&(a[l]=s[l])};return function(a,s){function l(){this.constructor=a}o(a,s),a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(o){function a(s,l,c){var f=o.call(this,"Error: "+s+". JSON Line number: "+l+(c?" near: "+c:""))||this;return f.err=s,f.line=l,f.extra=c,f.name="CSV Parse Error",f}return r(a,o),a.column_mismatched=function(s,l){return new a("column_mismatched",s,l)},a.unclosed_quote=function(s,l){return new a("unclosed_quote",s,l)},a.fromJSON=function(s){return new a(s.err,s.line,s.extra)},a.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},a}(Error);t.default=i},function(e,t,n){var r=n(18),i=n(68),o=n(69),a=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":a&&a in Object(s)?i(s):o(s)}},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){e.exports=n(33)},function(e,t,n){var r=n(34),i=function(o,a){return new r.Converter(o,a)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var x in y)y.hasOwnProperty(x)&&(g[x]=y[x])};return function(g,y){function x(){this.constructor=g}v(g,y),g.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}}(),o=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(36),s=n(50),l=n(51),c=o(n(15)),f=n(52),d=n(105),p=function(v){function g(y,x){x===void 0&&(x={});var _=v.call(this,x)||this;return _.options=x,_.params=s.mergeParams(y),_.runtime=l.initParseRuntime(_),_.result=new d.Result(_),_.processor=new f.ProcessorLocal(_),_.once("error",function(b){r(function(){_.result.processError(b),_.emit("done",b)})}),_.once("done",function(){_.processor.destroy()}),_}return i(g,v),g.prototype.preRawData=function(y){return this.runtime.preRawDataHook=y,this},g.prototype.preFileLine=function(y){return this.runtime.preFileLineHook=y,this},g.prototype.subscribe=function(y,x,_){return this.parseRuntime.subscribe={onNext:y,onError:x,onCompleted:_},this},g.prototype.fromFile=function(y,x){var _=this,b=n(!function(){var w=new Error("Cannot find module 'fs'");throw w.code="MODULE_NOT_FOUND",w}());return b.exists(y,function(w){w?b.createReadStream(y,x).pipe(_):_.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},g.prototype.fromStream=function(y){return y.pipe(this),this},g.prototype.fromString=function(y){y.toString();var x=new a.Readable,_=0;return x._read=function(b){if(_>=y.length)this.push(null);else{var w=y.substr(_,b);this.push(w),_+=b}},this.fromStream(x)},g.prototype.then=function(y,x){var _=this;return new c.default(function(b,w){_.parseRuntime.then={onfulfilled:function(S){b(y?y(S):S)},onrejected:function(S){x?b(x(S)):w(S)}}})},Object.defineProperty(g.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),g.prototype._transform=function(y,x,_){var b=this;this.processor.process(y).then(function(w){if(w.length>0)return b.runtime.started=!0,b.result.processResult(w)}).then(function(){b.emit("drained"),_()},function(w){b.runtime.hasError=!0,b.runtime.error=w,b.emit("error",w),_()})},g.prototype._flush=function(y){var x=this;this.processor.flush().then(function(_){if(_.length>0)return x.result.processResult(_)}).then(function(){x.processEnd(y)},function(_){x.emit("error",_),y()})},g.prototype.processEnd=function(y){this.result.endProcess(),this.emit("done"),y()},Object.defineProperty(g.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),g}(a.Transform);t.Converter=p}).call(this,n(11).setImmediate)},function(e,t,n){(function(r,i){(function(o,a){if(!o.setImmediate){var s,l=1,c={},f=!1,d=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,{}.toString.call(o.process)==="[object process]"?s=function(y){i.nextTick(function(){g(y)})}:function(){if(o.postMessage&&!o.importScripts){var y=!0,x=o.onmessage;return o.onmessage=function(){y=!1},o.postMessage("","*"),o.onmessage=x,y}}()?function(){var y="setImmediate$"+Math.random()+"$",x=function(_){_.source===o&&typeof _.data=="string"&&_.data.indexOf(y)===0&&g(+_.data.slice(y.length))};o.addEventListener?o.addEventListener("message",x,!1):o.attachEvent("onmessage",x),s=function(_){o.postMessage(y+_,"*")}}():o.MessageChannel?function(){var y=new MessageChannel;y.port1.onmessage=function(x){g(x.data)},s=function(x){y.port2.postMessage(x)}}():d&&"onreadystatechange"in d.createElement("script")?function(){var y=d.documentElement;s=function(x){var _=d.createElement("script");_.onreadystatechange=function(){g(x),_.onreadystatechange=null,y.removeChild(_),_=null},y.appendChild(_)}}():s=function(y){setTimeout(g,0,y)},p.setImmediate=function(y){typeof y!="function"&&(y=new Function(""+y));for(var x=new Array(arguments.length-1),_=0;_"u"?r===void 0?this:r:self)}).call(this,n(0),n(4))},function(e,t,n){e.exports=i;var r=n(12).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(13),i.Writable=n(46),i.Duplex=n(47),i.Transform=n(48),i.PassThrough=n(49),i.Stream=i,i.prototype.pipe=function(o,a){var s=this;function l(y){o.writable&&o.write(y)===!1&&s.pause&&s.pause()}function c(){s.readable&&s.resume&&s.resume()}s.on("data",l),o.on("drain",c),o._isStdio||a&&a.end===!1||(s.on("end",d),s.on("close",p));var f=!1;function d(){f||(f=!0,o.end())}function p(){f||(f=!0,typeof o.destroy=="function"&&o.destroy())}function v(y){if(g(),r.listenerCount(this,"error")===0)throw y}function g(){s.removeListener("data",l),o.removeListener("drain",c),s.removeListener("end",d),s.removeListener("close",p),s.removeListener("error",v),o.removeListener("error",v),s.removeListener("end",g),s.removeListener("close",g),o.removeListener("close",g)}return s.on("error",v),o.on("error",v),s.on("end",g),s.on("close",g),o.on("close",g),o.emit("pipe",s),o}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t,n){t.byteLength=function(p){var v=c(p),g=v[0],y=v[1];return 3*(g+y)/4-y},t.toByteArray=function(p){for(var v,g=c(p),y=g[0],x=g[1],_=new o(3*(y+x)/4-x),b=0,w=x>0?y-4:y,S=0;S>16&255,_[b++]=v>>8&255,_[b++]=255&v;return x===2&&(v=i[p.charCodeAt(S)]<<2|i[p.charCodeAt(S+1)]>>4,_[b++]=255&v),x===1&&(v=i[p.charCodeAt(S)]<<10|i[p.charCodeAt(S+1)]<<4|i[p.charCodeAt(S+2)]>>2,_[b++]=v>>8&255,_[b++]=255&v),_},t.fromByteArray=function(p){for(var v,g=p.length,y=g%3,x=[],_=0,b=g-y;_b?b:_+16383));return y===1?(v=p[g-1],x.push(r[v>>2]+r[v<<4&63]+"==")):y===2&&(v=(p[g-2]<<8)+p[g-1],x.push(r[v>>10]+r[v>>4&63]+r[v<<2&63]+"=")),x.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var g=p.indexOf("=");return g===-1&&(g=v),[g,g===v?0:4-g%4]}function f(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[63&p]}function d(p,v,g){for(var y,x=[],_=v;_>1,p=-7,v=i?a-1:0,g=i?-1:1,y=n[r+v];for(v+=g,s=y&(1<<-p)-1,y>>=-p,p+=c;p>0;s=256*s+n[r+v],v+=g,p-=8);for(l=s&(1<<-p)-1,s>>=-p,p+=o;p>0;l=256*l+n[r+v],v+=g,p-=8);if(s===0)s=1-d;else{if(s===f)return l?NaN:1/0*(y?-1:1);l+=Math.pow(2,o),s-=d}return(y?-1:1)*l*Math.pow(2,s-o)},t.write=function(n,r,i,o,a,s){var l,c,f,d=8*s-a-1,p=(1<>1,g=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=o?0:s-1,x=o?1:-1,_=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,l=p):(l=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-l))<1&&(l--,f*=2),(r+=l+v>=1?g/f:g*Math.pow(2,1-v))*f>=2&&(l++,f/=2),l+v>=p?(c=0,l=p):l+v>=1?(c=(r*f-1)*Math.pow(2,a),l+=v):(c=r*Math.pow(2,v-1)*Math.pow(2,a),l=0));a>=8;n[i+y]=255&c,y+=x,c/=256,a-=8);for(l=l<0;n[i+y]=255&l,y+=x,l/=256,d-=8);n[i+y-x]|=128*_}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t){},function(e,t,n){var r=n(7).Buffer,i=n(43);function o(a,s,l){a.copy(s,l)}e.exports=function(){function a(){(function(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")})(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(s){var l={data:s,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},a.prototype.unshift=function(s){var l={data:s,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},a.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(s){if(this.length===0)return"";for(var l=this.head,c=""+l.data;l=l.next;)c+=s+l.data;return c},a.prototype.concat=function(s){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var l=r.allocUnsafe(s>>>0),c=this.head,f=0;c;)o(c.data,l,f),f+=c.data.length,c=c.next;return l},a}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var a=i.inspect({length:this.length});return this.constructor.name+" "+a})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var a=r.localStorage[o];return a!=null&&String(a).toLowerCase()==="true"}e.exports=function(o,a){if(i("noDeprecation"))return o;var s=!1;return function(){if(!s){if(i("throwDeprecation"))throw new Error(a);i("traceDeprecation")?console.trace(a):console.warn(a),s=!0}return o.apply(this,arguments)}}}).call(this,n(0))},function(e,t,n){e.exports=o;var r=n(27),i=n(5);function o(a){if(!(this instanceof o))return new o(a);r.call(this,a)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(a,s,l){l(null,a)}},function(e,t,n){e.exports=n(14)},function(e,t,n){e.exports=n(1)},function(e,t,n){e.exports=n(13).Transform},function(e,t,n){e.exports=n(13).PassThrough},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mergeParams=function(r){var i={delimiter:",",ignoreColumns:void 0,includeColumns:void 0,quote:'"',trim:!0,checkType:!1,ignoreEmpty:!1,noheader:!1,headers:void 0,flatKeys:!1,maxRowLength:0,checkColumn:!1,escape:'"',colParser:{},eol:void 0,alwaysSplitAtEOL:!1,output:"json",nullObject:!1,downstreamFormat:"line",needEmitAll:!0};for(var o in r||(r={}),r)r.hasOwnProperty(o)&&(Array.isArray(r[o])?i[o]=[].concat(r[o]):i[o]=r[o]);return i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initParseRuntime=function(r){var i=r.parseParam,o={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:r.parseParam.delimiter,eol:r.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return i.ignoreColumns&&(o.needProcessIgnoreColumn=!0),i.includeColumns&&(o.needProcessIncludeColumn=!0),o}},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,b){_.__proto__=b}||function(_,b){for(var w in b)b.hasOwnProperty(w)&&(_[w]=b[w])};return function(_,b){function w(){this.constructor=_}x(_,b),_.prototype=b===null?Object.create(b):(w.prototype=b.prototype,new w)}}(),o=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(53),s=o(n(15)),l=n(54),c=o(n(16)),f=n(57),d=n(28),p=n(58),v=o(n(59)),g=o(n(29)),y=function(x){function _(){var b=x!==null&&x.apply(this,arguments)||this;return b.rowSplit=new p.RowSplit(b.converter),b.eolEmitted=!1,b._needEmitEol=void 0,b.headEmitted=!1,b._needEmitHead=void 0,b}return i(_,x),_.prototype.flush=function(){var b=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var w=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(w,!0).then(function(S){return b.runtime.csvLineBuffer&&b.runtime.csvLineBuffer.length>0?s.default.reject(g.default.unclosed_quote(b.runtime.parsedLineNumber,b.runtime.csvLineBuffer.toString())):s.default.resolve(S)})}return s.default.resolve([])},_.prototype.destroy=function(){return s.default.resolve()},Object.defineProperty(_.prototype,"needEmitEol",{get:function(){return this._needEmitEol===void 0&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),_.prototype.process=function(b,w){var S,E=this;return w===void 0&&(w=!1),S=w?b.toString():l.prepareData(b,this.converter.parseRuntime),s.default.resolve().then(function(){return E.runtime.preRawDataHook?E.runtime.preRawDataHook(S):S}).then(function(C){return C&&C.length>0?E.processCSV(C,w):s.default.resolve([])})},_.prototype.processCSV=function(b,w){var S=this,E=this.params,C=this.runtime;C.eol||c.default(b,C),this.needEmitEol&&!this.eolEmitted&&C.eol&&(this.converter.emit("eol",C.eol),this.eolEmitted=!0),E.ignoreEmpty&&!C.started&&(b=d.trimLeft(b));var T=f.stringToLines(b,C);return w?(T.lines.push(T.partial),T.partial=""):this.prependLeftBuf(d.bufFromString(T.partial)),T.lines.length>0?(C.preFileLineHook?this.runPreLineHook(T.lines):s.default.resolve(T.lines)).then(function(A){return C.started||S.runtime.headers?S.processCSVBody(A):S.processDataWithHead(A)}):s.default.resolve([])},_.prototype.processDataWithHead=function(b){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var w="",S=[];b.length;){var E=w+b.shift(),C=this.rowSplit.parse(E);if(C.closed){S=C.cells,w="";break}w=E+c.default(E,this.runtime)}if(this.prependLeftBuf(d.bufFromString(w)),S.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=S}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(b)},_.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var b=this.runtime.headers,w=0;w=T.length)N();else if(A.preFileLineHook){var I=T[D],F=A.preFileLineHook(I,A.parsedLineNumber+D);if(D++,F&&F.then)F.then(function(q){T[D-1]=q,C(T,A,D,N)});else{for(T[D-1]=F;D0?r.concat([d.csvLineBuffer,f]):f}(a,s);s.csvLineBuffer=void 0;var c=function(f,d){var p=f.length-1;if(128&f[p]){for(;(192&f[p])==128;)p--;p--}return p!=f.length-1?(d.csvLineBuffer=f.slice(p+1),f.slice(0,p+1)):f}(l,s).toString("utf8");return s.started===!1?o.default(c):c}}).call(this,n(3).Buffer)},function(e,t,n){(function(r){var i=n(56);e.exports=function(o){return typeof o=="string"&&o.charCodeAt(0)===65279?o.slice(1):r.isBuffer(o)&&i(o)&&o[0]===239&&o[1]===187&&o[2]===191?o.slice(3):o}}).call(this,n(3).Buffer)},function(e,t){e.exports=function(n){for(var r=0;r0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),l.prototype.parse=function(c){if(c.length===0||this.conv.parseParam.ignoreEmpty&&c.trim().length===0)return{cells:[],closed:!0};var f=this.quote,d=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(c)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var p=this.conv.parseRuntime.delimiter,v=c.split(p);if(f==="off"){if(d)for(var g=0;gd&&(p=v,d=g)}),p},l.prototype.isQuoteOpen=function(c){var f=this.quote,d=this.escape;return c[0]===f&&(c[1]!==f||c[1]===d&&(c[2]===f||c.length===2))},l.prototype.isQuoteClose=function(c){var f=this.quote,d=this.escape;this.conv.parseParam.trim&&(c=o.trimRight(c));for(var p=0,v=c.length-1;c[v]===f||c[v]===d;)v--,p++;return p%2!=0},l.prototype.escapeQuote=function(c){var f="es|"+this.quote+"|"+this.escape;this.cachedRegExp[f]===void 0&&(this.cachedRegExp[f]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var d=this.cachedRegExp[f];return c.replace(d,this.quote)},l.prototype.parseMultiLines=function(c){for(var f=[],d="";c.length;){var p=d+c.shift(),v=this.parse(p);v.cells.length===0&&this.conv.parseParam.ignoreEmpty||(v.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?f.push(o.filterArray(v.cells,this.conv.parseRuntime.selectedColumns)):f.push(v.cells),d=""):d=p+(i.default(p,this.conv.parseRuntime)||` `))}return{rowsCells:f,partial:d}},l}();t.RowSplit=s},function(e,t,n){var r=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(29)),o=r(n(60)),a=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function s(_,b,w){if(b.parseParam.checkColumn&&b.parseRuntime.headers&&_.length!==b.parseRuntime.headers.length)throw i.default.column_mismatched(b.parseRuntime.parsedLineNumber+w);return function(S,E,C){for(var T=!1,A={},D=0,N=S.length;D-1){for(var C=b.split("."),T=!0;C.length>0;)if(C.shift().length===0){T=!1;break}!T||S.parseParam.colParser[b]&&S.parseParam.colParser[b].flat?S.parseRuntime.columnValueSetter[E]=d:S.parseRuntime.columnValueSetter[E]=p}else S.parseRuntime.columnValueSetter[E]=d;S.parseParam.nullObject===!0&&w==="null"&&(w=null),S.parseRuntime.columnValueSetter[E](_,b,w)}function d(_,b,w){_[b]=w}function p(_,b,w){o.default(_,b,w)}function v(_,b,w,S){return S.parseRuntime.headerType[w]?S.parseRuntime.headerType[w]:b.indexOf("number#!")>-1?S.parseRuntime.headerType[w]=g:b.indexOf("string#!")>-1?S.parseRuntime.headerType[w]=y:S.parseParam.checkType?S.parseRuntime.headerType[w]=x:S.parseRuntime.headerType[w]=y}function g(_){var b=parseFloat(_);return isNaN(b)?_:b}function y(_){return _.toString()}function x(_){var b=_.trim();return b===""?y(_):a.test(b)?g(_):b.length===5&&b.toLowerCase()==="false"||b.length===4&&b.toLowerCase()==="true"?function(w){var S=w.trim();return S.length!==5||S.toLowerCase()!=="false"}(_):b[0]==="{"&&b[b.length-1]==="}"||b[0]==="["&&b[b.length-1]==="]"?function(w){try{return JSON.parse(w)}catch{return w}}(_):y(_)}},function(e,t,n){var r=n(61);e.exports=function(i,o,a){return i==null?i:r(i,o,a)}},function(e,t,n){var r=n(62),i=n(74),o=n(103),a=n(20),s=n(104);e.exports=function(l,c,f,d){if(!a(l))return l;for(var p=-1,v=(c=i(c,l)).length,g=v-1,y=l;y!=null&&++p-1}},function(e,t,n){var r=n(9);e.exports=function(i,o){var a=this.__data__,s=r(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}},function(e,t,n){var r=n(17)(n(19),"Map");e.exports=r},function(e,t,n){var r=n(10);e.exports=function(i){var o=r(this,i).delete(i);return this.size-=o?1:0,o}},function(e,t){e.exports=function(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).get(i)}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).has(i)}},function(e,t,n){var r=n(10);e.exports=function(i,o){var a=r(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}},function(e,t,n){var r=n(101);e.exports=function(i){return i==null?"":r(i)}},function(e,t,n){var r=n(18),i=n(102),o=n(21),a=n(22),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function c(f){if(typeof f=="string")return f;if(o(f))return i(f,c)+"";if(a(f))return l?l.call(f):"";var d=f+"";return d=="0"&&1/f==-1/0?"-0":d}},function(e,t){e.exports=function(n,r){for(var i=-1,o=n==null?0:n.length,a=Array(o);++i-1&&r%1==0&&r0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!0,configurable:!0}),l.prototype.processResult=function(c){var f=this,d=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&d===0&&s(this.converter,"["+o.EOL),new i.default(function(p,v){f.needEmitLine?function g(y,x,_,b,w){if(_>=y.length)w();else if(x.parseRuntime.subscribe&&x.parseRuntime.subscribe.onNext){var S=x.parseRuntime.subscribe.onNext,E=y[_],C=S(E,x.parseRuntime.parsedLineNumber+_);if(_++,C&&C.then)C.then(function(){(function(A,D,N,I,F,q,W){F&&s(N,W),g(A,N,I,F,q)})(y,0,x,_,b,w,E)},w);else{for(b&&s(x,E);_new Promise(t=>{R6e().fromString(e).then(t)}),I6e=new WD,D6e=e=>I6e.parse(e),F6e="shlink",T4=e=>`${F6e}.${e}`;class B6e{constructor(t){Ul(this,"get",t=>{const n=this.localStorage.getItem(T4(t));return n?JSON.parse(n):void 0});Ul(this,"set",(t,n)=>this.localStorage.setItem(T4(t),JSON.stringify(n)));this.localStorage=t}}class U6e{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const z6e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",B6e,"localStorage"),e.service("TagColorsStorage",U6e,"Storage"),e.constant("csvToJson",$6e),e.constant("jsonToCsv",D6e),e.serviceFactory("useTimeoutToggle",()=>JI)},kl=new y6,{container:SP}=kl,V6e=(e,t)=>(...n)=>e[t](...n),W6e=(e,t)=>({...e,[t]:V6e(SP,t)}),H6e=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),ub=(e,t=[])=>q$(e?H6e(e):null,t.reduce(W6e,{}));Eie(kl,ub);U$e(kl,ub);mK(kl);C6e(kl,ub);z6e(kl);M6e(kl,ub);var EP={},WO={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var c=[],f=0;fz.length)&&(B=z.length);for(var H=0,ee=Array(B);HME({appUpdated:Sie,servers:l6e,selectedServer:e.selectedServerReducer,settings:k6e}),q6e=e=>(e.settings&&e.settings.visits&&e.settings.visits.defaultInterval==="last180days"&&(e.settings.visits.defaultInterval="last180Days"),e),Y6e=!0,GU={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},Z6e=q6e(EP.load(GU)),X6e=e=>gD({devTools:!Y6e,reducer:K6e(e),preloadedState:Z6e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(EP.save(GU))}),Q6e=!!(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 J6e(e){if("serviceWorker"in navigator){if(new URL(Bv.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Bv.homepage}/service-worker.js`;Q6e?(eIe(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")})):KU(n,e)})}}function KU(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 eIe(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()})}):KU(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const qU=X6e(SP),{App:tIe,ScrollToTop:nIe,ErrorHandler:rIe,appUpdateAvailable:iIe}=SP;U$(document.getElementById("root")).render(m.jsx(Y$,{store:qU,children:m.jsx(a6,{basename:Bv.homepage,children:m.jsx(rIe,{children:m.jsx(nIe,{children:m.jsx(tIe,{})})})})}));J6e({onUpdate(){qU.dispatch(iIe())}});