function Wh(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Ic(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mc={exports:{}},Oo={},Uc={exports:{}},z={};/** * @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 Jr=Symbol.for("react.element"),Kh=Symbol.for("react.portal"),Xh=Symbol.for("react.fragment"),Jh=Symbol.for("react.strict_mode"),Gh=Symbol.for("react.profiler"),Yh=Symbol.for("react.provider"),Zh=Symbol.for("react.context"),ep=Symbol.for("react.forward_ref"),tp=Symbol.for("react.suspense"),np=Symbol.for("react.memo"),rp=Symbol.for("react.lazy"),$u=Symbol.iterator;function ip(e){return e===null||typeof e!="object"?null:(e=$u&&e[$u]||e["@@iterator"],typeof e=="function"?e:null)}var zc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bc=Object.assign,Bc={};function Jn(e,t,n){this.props=e,this.context=t,this.refs=Bc,this.updater=n||zc}Jn.prototype.isReactComponent={};Jn.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")};Jn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function $c(){}$c.prototype=Jn.prototype;function Al(e,t,n){this.props=e,this.context=t,this.refs=Bc,this.updater=n||zc}var Dl=Al.prototype=new $c;Dl.constructor=Al;bc(Dl,Jn.prototype);Dl.isPureReactComponent=!0;var Qu=Array.isArray,Qc=Object.prototype.hasOwnProperty,Il={current:null},Hc={key:!0,ref:!0,__self:!0,__source:!0};function qc(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Qc.call(t,r)&&!Hc.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,H=j[I];if(0>>1;Ii(wn,A))bi(de,wn)?(j[I]=de,j[b]=A,I=b):(j[I]=wn,j[Me]=A,I=Me);else if(bi(de,A))j[I]=de,j[b]=A,I=b;else break e}}return F}function i(j,F){var A=j.sortIndex-F.sortIndex;return A!==0?A:j.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],a=[],c=1,f=null,v=3,g=!1,x=!1,y=!1,C=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(j){for(var F=n(a);F!==null;){if(F.callback===null)r(a);else if(F.startTime<=j)r(a),F.sortIndex=F.expirationTime,t(u,F);else break;F=n(a)}}function S(j){if(y=!1,m(j),!x)if(n(u)!==null)x=!0,oe(k);else{var F=n(a);F!==null&&Ie(S,F.startTime-j)}}function k(j,F){x=!1,y&&(y=!1,d(P),P=-1),g=!0;var A=v;try{for(m(F),f=n(u);f!==null&&(!(f.expirationTime>F)||j&&!q());){var I=f.callback;if(typeof I=="function"){f.callback=null,v=f.priorityLevel;var H=I(f.expirationTime<=F);F=e.unstable_now(),typeof H=="function"?f.callback=H:f===n(u)&&r(u),m(F)}else r(u);f=n(u)}if(f!==null)var Ge=!0;else{var Me=n(a);Me!==null&&Ie(S,Me.startTime-F),Ge=!1}return Ge}finally{f=null,v=A,g=!1}}var E=!1,R=null,P=-1,D=5,L=-1;function q(){return!(e.unstable_now()-Lj||125I?(j.sortIndex=A,t(a,j),n(u)===null&&j===n(a)&&(y?(d(P),P=-1):y=!0,Ie(S,A-I))):(j.sortIndex=H,t(u,j),x||g||(x=!0,oe(k))),j},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(j){var F=v;return function(){var A=v;v=F;try{return j.apply(this,arguments)}finally{v=A}}}})(Jc);Xc.exports=Jc;var vp=Xc.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 yp=O,$e=vp;function _(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"),js=Object.prototype.hasOwnProperty,gp=/^[: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]*$/,qu={},Vu={};function wp(e){return js.call(Vu,e)?!0:js.call(qu,e)?!1:gp.test(e)?Vu[e]=!0:(qu[e]=!0,!1)}function xp(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 Sp(e,t,n,r){if(t===null||typeof t>"u"||xp(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 Pe(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ye[e]=new Pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ye[t]=new Pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ye[e]=new Pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ye[e]=new Pe(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){ye[e]=new Pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ye[e]=new Pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ye[e]=new Pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ye[e]=new Pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ye[e]=new Pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ul=/[\-:]([a-z])/g;function zl(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(Ul,zl);ye[t]=new Pe(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(Ul,zl);ye[t]=new Pe(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(Ul,zl);ye[t]=new Pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ye[e]=new Pe(e,1,!1,e.toLowerCase(),null,!1,!1)});ye.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ye[e]=new Pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function bl(e,t,n,r){var i=ye.hasOwnProperty(t)?ye[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var u=` `+i[s].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{Zo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?vr(e):""}function Ep(e){switch(e.tag){case 5:return vr(e.type);case 16:return vr("Lazy");case 13:return vr("Suspense");case 19:return vr("SuspenseList");case 0:case 2:case 15:return e=es(e.type,!1),e;case 11:return e=es(e.type.render,!1),e;case 1:return e=es(e.type,!0),e;default:return""}}function Fs(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 Cn:return"Fragment";case En:return"Portal";case Ns:return"Profiler";case Bl:return"StrictMode";case Ts:return"Suspense";case Ls:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zc:return(e.displayName||"Context")+".Consumer";case Yc:return(e._context.displayName||"Context")+".Provider";case $l:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ql:return t=e.displayName||null,t!==null?t:Fs(e.type)||"Memo";case Ot:t=e._payload,e=e._init;try{return Fs(e(t))}catch{}}return null}function Cp(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 Fs(t);case 8:return t===Bl?"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 Ht(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kp(e){var t=tf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fi(e){e._valueTracker||(e._valueTracker=kp(e))}function nf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=tf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function qi(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 As(e,t){var n=t.checked;return Z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ku(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ht(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 rf(e,t){t=t.checked,t!=null&&bl(e,"checked",t,!1)}function Ds(e,t){rf(e,t);var n=Ht(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")?Is(e,t.type,n):t.hasOwnProperty("defaultValue")&&Is(e,t.type,Ht(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xu(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 Is(e,t,n){(t!=="number"||qi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var yr=Array.isArray;function An(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=di.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Tr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xr={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},Rp=["Webkit","ms","Moz","O"];Object.keys(xr).forEach(function(e){Rp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xr[t]=xr[e]})});function uf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xr.hasOwnProperty(e)&&xr[e]?(""+t).trim():t+"px"}function af(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=uf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var _p=Z({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 zs(e,t){if(t){if(_p[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function bs(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 Bs=null;function Hl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $s=null,Dn=null,In=null;function Yu(e){if(e=Zr(e)){if(typeof $s!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Lo(t),$s(e.stateNode,e.type,t))}}function cf(e){Dn?In?In.push(e):In=[e]:Dn=e}function ff(){if(Dn){var e=Dn,t=In;if(In=Dn=null,Yu(e),t)for(e=0;e>>=0,e===0?32:31-(Mp(e)/Up|0)|0}var hi=64,pi=4194304;function gr(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 Xi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=gr(l):(o&=s,o!==0&&(r=gr(o)))}else s=n&~i,s!==0?r=gr(s):o!==0&&(r=gr(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 Gr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nt(t),e[t]=n}function $p(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=Er),la=" ",ua=!1;function Tf(e,t){switch(e){case"keyup":return vm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kn=!1;function gm(e,t){switch(e){case"compositionend":return Lf(t);case"keypress":return t.which!==32?null:(ua=!0,la);case"textInput":return e=t.data,e===la&&ua?null:e;default:return null}}function wm(e,t){if(kn)return e==="compositionend"||!Yl&&Tf(e,t)?(e=jf(),Ni=Xl=Lt=null,kn=!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=da(n)}}function If(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?If(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mf(){for(var e=window,t=qi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=qi(e.document)}return t}function Zl(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 Pm(e){var t=Mf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&If(n.ownerDocument.documentElement,n)){if(r!==null&&Zl(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=ha(n,o);var s=ha(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Rn=null,Ks=null,kr=null,Xs=!1;function pa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xs||Rn==null||Rn!==qi(r)||(r=Rn,"selectionStart"in r&&Zl(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}),kr&&Mr(kr,r)||(kr=r,r=Yi(Ks,"onSelect"),0Pn||(e.current=tl[Pn],tl[Pn]=null,Pn--)}function V(e,t){Pn++,tl[Pn]=e.current,e.current=t}var qt={},ke=Wt(qt),Te=Wt(!1),an=qt;function Bn(e,t){var n=e.type.contextTypes;if(!n)return qt;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 Le(e){return e=e.childContextTypes,e!=null}function eo(){K(Te),K(ke)}function Sa(e,t,n){if(ke.current!==qt)throw Error(_(168));V(ke,t),V(Te,n)}function Vf(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(_(108,Cp(e)||"Unknown",i));return Z({},n,r)}function to(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qt,an=ke.current,V(ke,e),V(Te,Te.current),!0}function Ea(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Vf(e,t,an),r.__reactInternalMemoizedMergedChildContext=e,K(Te),K(ke),V(ke,e)):K(Te),V(Te,n)}var vt=null,Fo=!1,ps=!1;function Wf(e){vt===null?vt=[e]:vt.push(e)}function bm(e){Fo=!0,Wf(e)}function Kt(){if(!ps&&vt!==null){ps=!0;var e=0,t=Q;try{var n=vt;for(Q=1;e>=s,i-=s,yt=1<<32-nt(t)+i|n<P?(D=R,R=null):D=R.sibling;var L=v(d,R,m[P],S);if(L===null){R===null&&(R=D);break}e&&R&&L.alternate===null&&t(d,R),h=o(L,h,P),E===null?k=L:E.sibling=L,E=L,R=D}if(P===m.length)return n(d,R),J&&Gt(d,P),k;if(R===null){for(;PP?(D=R,R=null):D=R.sibling;var q=v(d,R,L.value,S);if(q===null){R===null&&(R=D);break}e&&R&&q.alternate===null&&t(d,R),h=o(q,h,P),E===null?k=q:E.sibling=q,E=q,R=D}if(L.done)return n(d,R),J&&Gt(d,P),k;if(R===null){for(;!L.done;P++,L=m.next())L=f(d,L.value,S),L!==null&&(h=o(L,h,P),E===null?k=L:E.sibling=L,E=L);return J&&Gt(d,P),k}for(R=r(d,R);!L.done;P++,L=m.next())L=g(R,d,P,L.value,S),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?P:L.key),h=o(L,h,P),E===null?k=L:E.sibling=L,E=L);return e&&R.forEach(function(ae){return t(d,ae)}),J&&Gt(d,P),k}function C(d,h,m,S){if(typeof m=="object"&&m!==null&&m.type===Cn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case ci:e:{for(var k=m.key,E=h;E!==null;){if(E.key===k){if(k=m.type,k===Cn){if(E.tag===7){n(d,E.sibling),h=i(E,m.props.children),h.return=d,d=h;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Ot&&Ra(k)===E.type){n(d,E.sibling),h=i(E,m.props),h.ref=cr(d,E,m),h.return=d,d=h;break e}n(d,E);break}else t(d,E);E=E.sibling}m.type===Cn?(h=ln(m.props.children,d.mode,S,m.key),h.return=d,d=h):(S=Ui(m.type,m.key,m.props,null,d.mode,S),S.ref=cr(d,h,m),S.return=d,d=S)}return s(d);case En:e:{for(E=m.key;h!==null;){if(h.key===E)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(d,h.sibling),h=i(h,m.children||[]),h.return=d,d=h;break e}else{n(d,h);break}else t(d,h);h=h.sibling}h=Es(m,d.mode,S),h.return=d,d=h}return s(d);case Ot:return E=m._init,C(d,h,E(m._payload),S)}if(yr(m))return x(d,h,m,S);if(or(m))return y(d,h,m,S);Si(d,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(n(d,h.sibling),h=i(h,m),h.return=d,d=h):(n(d,h),h=Ss(m,d.mode,S),h.return=d,d=h),s(d)):n(d,h)}return C}var Qn=Gf(!0),Yf=Gf(!1),io=Wt(null),oo=null,Tn=null,ru=null;function iu(){ru=Tn=oo=null}function ou(e){var t=io.current;K(io),e._currentValue=t}function il(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 Un(e,t){oo=e,ru=Tn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ne=!0),e.firstContext=null)}function Xe(e){var t=e._currentValue;if(ru!==e)if(e={context:e,memoizedValue:t,next:null},Tn===null){if(oo===null)throw Error(_(308));Tn=e,oo.dependencies={lanes:0,firstContext:e}}else Tn=Tn.next=e;return t}var tn=null;function su(e){tn===null?tn=[e]:tn.push(e)}function Zf(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,su(t)):(n.next=i.next,i.next=n),t.interleaved=n,Et(e,r)}function Et(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 Pt=!1;function lu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ed(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 wt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,$&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Et(e,n)}return i=r.interleaved,i===null?(t.next=t,su(r)):(t.next=i.next,i.next=t),r.interleaved=t,Et(e,n)}function Li(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,Vl(e,n)}}function _a(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 s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,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 so(e,t,n,r){var i=e.updateQueue;Pt=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,a=u.next;u.next=null,s===null?o=a:s.next=a,s=u;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=a:l.next=a,c.lastBaseUpdate=u))}if(o!==null){var f=i.baseState;s=0,c=a=u=null,l=o;do{var v=l.lane,g=l.eventTime;if((r&v)===v){c!==null&&(c=c.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,y=l;switch(v=t,g=n,y.tag){case 1:if(x=y.payload,typeof x=="function"){f=x.call(g,f,v);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=y.payload,v=typeof x=="function"?x.call(g,f,v):x,v==null)break e;f=Z({},f,v);break e;case 2:Pt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,v=i.effects,v===null?i.effects=[l]:v.push(l))}else g={eventTime:g,lane:v,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(a=c=g,u=f):c=c.next=g,s|=v;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;v=l,l=v.next,v.next=null,i.lastBaseUpdate=v,i.shared.pending=null}}while(!0);if(c===null&&(u=f),i.baseState=u,i.firstBaseUpdate=a,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);dn|=s,e.lanes=s,e.memoizedState=f}}function Oa(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=vs.transition;vs.transition={};try{e(!1),t()}finally{Q=n,vs.transition=r}}function yd(){return Je().memoizedState}function Hm(e,t,n){var r=Bt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gd(e))wd(t,n);else if(n=Zf(e,t,n,r),n!==null){var i=_e();rt(n,e,r,i),xd(n,t,r)}}function qm(e,t,n){var r=Bt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gd(e))wd(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,ot(l,s)){var u=t.interleaved;u===null?(i.next=i,su(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=Zf(e,t,i,r),n!==null&&(i=_e(),rt(n,e,r,i),xd(n,t,r))}}function gd(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function wd(e,t){Rr=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vl(e,n)}}var ao={readContext:Xe,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useInsertionEffect:we,useLayoutEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useMutableSource:we,useSyncExternalStore:we,useId:we,unstable_isNewReconciler:!1},Vm={readContext:Xe,useCallback:function(e,t){return at().memoizedState=[e,t===void 0?null:t],e},useContext:Xe,useEffect:ja,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ai(4194308,4,dd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ai(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ai(4,2,e,t)},useMemo:function(e,t){var n=at();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=at();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=Hm.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=at();return e={current:e},t.memoizedState=e},useState:Pa,useDebugValue:mu,useDeferredValue:function(e){return at().memoizedState=e},useTransition:function(){var e=Pa(!1),t=e[0];return e=Qm.bind(null,e[1]),at().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,i=at();if(J){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),fe===null)throw Error(_(349));fn&30||id(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ja(sd.bind(null,r,o,e),[e]),r.flags|=2048,qr(9,od.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=at(),t=fe.identifierPrefix;if(J){var n=gt,r=yt;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Qr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ct]=t,e[br]=r,Nd(e,t,!1,!1),t.stateNode=e;e:{switch(s=bs(n,r),n){case"dialog":W("cancel",e),W("close",e),i=r;break;case"iframe":case"object":case"embed":W("load",e),i=r;break;case"video":case"audio":for(i=0;iVn&&(t.flags|=128,r=!0,fr(o,!1),t.lanes=4194304)}else{if(!r)if(e=lo(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!J)return xe(t),null}else 2*re()-o.renderingStartTime>Vn&&n!==1073741824&&(t.flags|=128,r=!0,fr(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=re(),t.sibling=null,n=G.current,V(G,r?n&1|2:n&1),t):(xe(t),null);case 22:case 23:return Su(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ze&1073741824&&(xe(t),t.subtreeFlags&6&&(t.flags|=8192)):xe(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function ev(e,t){switch(tu(t),t.tag){case 1:return Le(t.type)&&eo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hn(),K(Te),K(ke),cu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return au(t),null;case 13:if(K(G),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));$n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(G),null;case 4:return Hn(),null;case 10:return ou(t.type._context),null;case 22:case 23:return Su(),null;case 24:return null;default:return null}}var Ci=!1,Ee=!1,tv=typeof WeakSet=="function"?WeakSet:Set,T=null;function Ln(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){te(e,t,r)}else n.current=null}function hl(e,t,n){try{n()}catch(r){te(e,t,r)}}var ba=!1;function nv(e,t){if(Js=Ji,e=Mf(),Zl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,u=-1,a=0,c=0,f=e,v=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(l=s+i),f!==o||r!==0&&f.nodeType!==3||(u=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(g=f.firstChild)!==null;)v=f,f=g;for(;;){if(f===e)break t;if(v===n&&++a===i&&(l=s),v===o&&++c===r&&(u=s),(g=f.nextSibling)!==null)break;f=v,v=f.parentNode}f=g}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gs={focusedElem:e,selectionRange:n},Ji=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var y=x.memoizedProps,C=x.memoizedState,d=t.stateNode,h=d.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ze(t.type,y),C);d.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(S){te(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return x=ba,ba=!1,x}function _r(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&&hl(t,n,o)}i=i.next}while(i!==r)}}function Io(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 pl(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 Fd(e){var t=e.alternate;t!==null&&(e.alternate=null,Fd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ct],delete t[br],delete t[el],delete t[Um],delete t[zm])),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 Ad(e){return e.tag===5||e.tag===3||e.tag===4}function Ba(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ad(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 ml(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=Zi));else if(r!==4&&(e=e.child,e!==null))for(ml(e,t,n),e=e.sibling;e!==null;)ml(e,t,n),e=e.sibling}function vl(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(vl(e,t,n),e=e.sibling;e!==null;)vl(e,t,n),e=e.sibling}var he=null,et=!1;function _t(e,t,n){for(n=n.child;n!==null;)Dd(e,t,n),n=n.sibling}function Dd(e,t,n){if(ft&&typeof ft.onCommitFiberUnmount=="function")try{ft.onCommitFiberUnmount(Po,n)}catch{}switch(n.tag){case 5:Ee||Ln(n,t);case 6:var r=he,i=et;he=null,_t(e,t,n),he=r,et=i,he!==null&&(et?(e=he,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):he.removeChild(n.stateNode));break;case 18:he!==null&&(et?(e=he,n=n.stateNode,e.nodeType===8?hs(e.parentNode,n):e.nodeType===1&&hs(e,n),Dr(e)):hs(he,n.stateNode));break;case 4:r=he,i=et,he=n.stateNode.containerInfo,et=!0,_t(e,t,n),he=r,et=i;break;case 0:case 11:case 14:case 15:if(!Ee&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&hl(n,t,s),i=i.next}while(i!==r)}_t(e,t,n);break;case 1:if(!Ee&&(Ln(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){te(n,t,l)}_t(e,t,n);break;case 21:_t(e,t,n);break;case 22:n.mode&1?(Ee=(r=Ee)||n.memoizedState!==null,_t(e,t,n),Ee=r):_t(e,t,n);break;default:_t(e,t,n)}}function $a(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tv),t.forEach(function(r){var i=fv.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ye(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=re()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*iv(r/1960))-r,10e?16:e,Ft===null)var r=!1;else{if(e=Ft,Ft=null,ho=0,$&6)throw Error(_(331));var i=$;for($|=4,T=e.current;T!==null;){var o=T,s=o.child;if(T.flags&16){var l=o.deletions;if(l!==null){for(var u=0;ure()-wu?sn(e,0):gu|=n),Fe(e,t)}function Qd(e,t){t===0&&(e.mode&1?(t=pi,pi<<=1,!(pi&130023424)&&(pi=4194304)):t=1);var n=_e();e=Et(e,t),e!==null&&(Gr(e,t,n),Fe(e,n))}function cv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qd(e,n)}function fv(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(_(314))}r!==null&&r.delete(t),Qd(e,n)}var Hd;Hd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Te.current)Ne=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ne=!1,Ym(e,t,n);Ne=!!(e.flags&131072)}else Ne=!1,J&&t.flags&1048576&&Kf(t,ro,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Di(e,t),e=t.pendingProps;var i=Bn(t,ke.current);Un(t,n),i=du(null,t,r,e,i,n);var o=hu();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,Le(r)?(o=!0,to(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,lu(t),i.updater=Do,t.stateNode=i,i._reactInternals=t,sl(t,r,e,n),t=al(null,t,r,!0,o,n)):(t.tag=0,J&&o&&eu(t),Re(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Di(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=hv(r),e=Ze(r,e),i){case 0:t=ul(null,t,r,e,n);break e;case 1:t=Ma(null,t,r,e,n);break e;case 11:t=Da(null,t,r,e,n);break e;case 14:t=Ia(null,t,r,Ze(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ze(r,i),ul(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ze(r,i),Ma(e,t,r,i,n);case 3:e:{if(Od(t),e===null)throw Error(_(387));r=t.pendingProps,o=t.memoizedState,i=o.element,ed(e,t),so(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=qn(Error(_(423)),t),t=Ua(e,t,r,n,i);break e}else if(r!==i){i=qn(Error(_(424)),t),t=Ua(e,t,r,n,i);break e}else for(be=Ut(t.stateNode.containerInfo.firstChild),Be=t,J=!0,tt=null,n=Yf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($n(),r===i){t=Ct(e,t,n);break e}Re(e,t,r,n)}t=t.child}return t;case 5:return td(t),e===null&&rl(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Ys(r,i)?s=null:o!==null&&Ys(r,o)&&(t.flags|=32),_d(e,t),Re(e,t,s,n),t.child;case 6:return e===null&&rl(t),null;case 13:return Pd(e,t,n);case 4:return uu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qn(t,null,r,n):Re(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ze(r,i),Da(e,t,r,i,n);case 7:return Re(e,t,t.pendingProps,n),t.child;case 8:return Re(e,t,t.pendingProps.children,n),t.child;case 12:return Re(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,V(io,r._currentValue),r._currentValue=s,o!==null)if(ot(o.value,s)){if(o.children===i.children&&!Te.current){t=Ct(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=wt(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?u.next=u:(u.next=c.next,c.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),il(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(_(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),il(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Re(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Un(t,n),i=Xe(i),r=r(i),t.flags|=1,Re(e,t,r,n),t.child;case 14:return r=t.type,i=Ze(r,t.pendingProps),i=Ze(r.type,i),Ia(e,t,r,i,n);case 15:return kd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ze(r,i),Di(e,t),t.tag=1,Le(r)?(e=!0,to(t)):e=!1,Un(t,n),Sd(t,r,i),sl(t,r,i,n),al(null,t,r,!0,e,n);case 19:return jd(e,t,n);case 22:return Rd(e,t,n)}throw Error(_(156,t.tag))};function qd(e,t){return gf(e,t)}function dv(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 We(e,t,n,r){return new dv(e,t,n,r)}function Cu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hv(e){if(typeof e=="function")return Cu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$l)return 11;if(e===Ql)return 14}return 2}function $t(e,t){var n=e.alternate;return n===null?(n=We(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 Ui(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Cu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Cn:return ln(n.children,i,o,t);case Bl:s=8,i|=8;break;case Ns:return e=We(12,n,t,i|2),e.elementType=Ns,e.lanes=o,e;case Ts:return e=We(13,n,t,i),e.elementType=Ts,e.lanes=o,e;case Ls:return e=We(19,n,t,i),e.elementType=Ls,e.lanes=o,e;case ef:return Uo(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yc:s=10;break e;case Zc:s=9;break e;case $l:s=11;break e;case Ql:s=14;break e;case Ot:s=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=We(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ln(e,t,n,r){return e=We(7,e,r,t),e.lanes=n,e}function Uo(e,t,n,r){return e=We(22,e,r,t),e.elementType=ef,e.lanes=n,e.stateNode={isHidden:!1},e}function Ss(e,t,n){return e=We(6,e,null,t),e.lanes=n,e}function Es(e,t,n){return t=We(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pv(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=ns(0),this.expirationTimes=ns(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ns(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ku(e,t,n,r,i,o,s,l,u){return e=new pv(e,t,n,l,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=We(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},lu(o),e}function mv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xd)}catch(e){console.error(e)}}Xd(),Kc.exports=Qe;var Jd=Kc.exports;const xv=Ic(Jd);var Ja=Jd;Ps.createRoot=Ja.createRoot,Ps.hydrateRoot=Ja.hydrateRoot;function Sl(e,t){return Sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Sl(e,t)}function Zn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Sl(e,t)}var er=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(r){var i=this,o=r||function(){};return this.listeners.push(o),this.onSubscribe(),function(){i.listeners=i.listeners.filter(function(s){return s!==o}),i.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}();function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u";function pe(){}function Sv(e,t){return typeof e=="function"?e(t):e}function El(e){return typeof e=="number"&&e>=0&&e!==1/0}function yo(e){return Array.isArray(e)?e:[e]}function Gd(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zi(e,t,n){return ti(e)?typeof t=="function"?U({},n,{queryKey:e,queryFn:t}):U({},t,{queryKey:e}):e}function Ev(e,t,n){return ti(e)?typeof t=="function"?U({},n,{mutationKey:e,mutationFn:t}):U({},t,{mutationKey:e}):typeof e=="function"?U({},t,{mutationFn:e}):U({},e)}function jt(e,t,n){return ti(e)?[U({},t,{queryKey:e}),n]:[e||{},t]}function Cv(e,t){if(e===!0&&t===!0||e==null&&t==null)return"all";if(e===!1&&t===!1)return"none";var n=e??!t;return n?"active":"inactive"}function Ga(e,t){var n=e.active,r=e.exact,i=e.fetching,o=e.inactive,s=e.predicate,l=e.queryKey,u=e.stale;if(ti(l)){if(r){if(t.queryHash!==Pu(l,t.options))return!1}else if(!go(t.queryKey,l))return!1}var a=Cv(n,o);if(a==="none")return!1;if(a!=="all"){var c=t.isActive();if(a==="active"&&!c||a==="inactive"&&c)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||typeof i=="boolean"&&t.isFetching()!==i||s&&!s(t))}function Ya(e,t){var n=e.exact,r=e.fetching,i=e.predicate,o=e.mutationKey;if(ti(o)){if(!t.options.mutationKey)return!1;if(n){if(rn(t.options.mutationKey)!==rn(o))return!1}else if(!go(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function Pu(e,t){var n=(t==null?void 0:t.queryKeyHashFn)||rn;return n(e)}function rn(e){var t=yo(e);return kv(t)}function kv(e){return JSON.stringify(e,function(t,n){return Cl(n)?Object.keys(n).sort().reduce(function(r,i){return r[i]=n[i],r},{}):n})}function go(e,t){return Yd(yo(e),yo(t))}function Yd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(function(n){return!Yd(e[n],t[n])}):!1}function wo(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||Cl(e)&&Cl(t)){for(var r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{},l=0,u=0;u"u")return!0;var n=t.prototype;return!(!Za(n)||!n.hasOwnProperty("isPrototypeOf"))}function Za(e){return Object.prototype.toString.call(e)==="[object Object]"}function ti(e){return typeof e=="string"||Array.isArray(e)}function _v(e){return new Promise(function(t){setTimeout(t,e)})}function ec(e){Promise.resolve().then(e).catch(function(t){return setTimeout(function(){throw t})})}function Zd(){if(typeof AbortController=="function")return new AbortController}var Ov=function(e){Zn(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(i){var o;if(!vo&&((o=window)!=null&&o.addEventListener)){var s=function(){return i()};return window.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1),function(){window.removeEventListener("visibilitychange",s),window.removeEventListener("focus",s)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var o,s=this;this.setup=i,(o=this.cleanup)==null||o.call(this),this.cleanup=i(function(l){typeof l=="boolean"?s.setFocused(l):s.onFocus()})},n.setFocused=function(i){this.focused=i,i&&this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(i){i()})},n.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},t}(er),jr=new Ov,Pv=function(e){Zn(t,e);function t(){var r;return r=e.call(this)||this,r.setup=function(i){var o;if(!vo&&((o=window)!=null&&o.addEventListener)){var s=function(){return i()};return window.addEventListener("online",s,!1),window.addEventListener("offline",s,!1),function(){window.removeEventListener("online",s),window.removeEventListener("offline",s)}}},r}var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var o,s=this;this.setup=i,(o=this.cleanup)==null||o.call(this),this.cleanup=i(function(l){typeof l=="boolean"?s.setOnline(l):s.onOnline()})},n.setOnline=function(i){this.online=i,i&&this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(i){i()})},n.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},t}(er),bi=new Pv;function jv(e){return Math.min(1e3*Math.pow(2,e),3e4)}function xo(e){return typeof(e==null?void 0:e.cancel)=="function"}var eh=function(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent};function Bi(e){return e instanceof eh}var th=function(t){var n=this,r=!1,i,o,s,l;this.abort=t.abort,this.cancel=function(v){return i==null?void 0:i(v)},this.cancelRetry=function(){r=!0},this.continueRetry=function(){r=!1},this.continue=function(){return o==null?void 0:o()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(v,g){s=v,l=g});var u=function(g){n.isResolved||(n.isResolved=!0,t.onSuccess==null||t.onSuccess(g),o==null||o(),s(g))},a=function(g){n.isResolved||(n.isResolved=!0,t.onError==null||t.onError(g),o==null||o(),l(g))},c=function(){return new Promise(function(g){o=g,n.isPaused=!0,t.onPause==null||t.onPause()}).then(function(){o=void 0,n.isPaused=!1,t.onContinue==null||t.onContinue()})},f=function v(){if(!n.isResolved){var g;try{g=t.fn()}catch(x){g=Promise.reject(x)}i=function(y){if(!n.isResolved&&(a(new eh(y)),n.abort==null||n.abort(),xo(g)))try{g.cancel()}catch{}},n.isTransportCancelable=xo(g),Promise.resolve(g).then(u).catch(function(x){var y,C;if(!n.isResolved){var d=(y=t.retry)!=null?y:3,h=(C=t.retryDelay)!=null?C:jv,m=typeof h=="function"?h(n.failureCount,x):h,S=d===!0||typeof d=="number"&&n.failureCount"u"&&(l.exact=!0),this.queries.find(function(u){return Ga(l,u)})},n.findAll=function(i,o){var s=jt(i,o),l=s[0];return Object.keys(l).length>0?this.queries.filter(function(u){return Ga(l,u)}):this.queries},n.notify=function(i){var o=this;X.batch(function(){o.listeners.forEach(function(s){s(i)})})},n.onFocus=function(){var i=this;X.batch(function(){i.queries.forEach(function(o){o.onFocus()})})},n.onOnline=function(){var i=this;X.batch(function(){i.queries.forEach(function(o){o.onOnline()})})},t}(er),Av=function(){function e(n){this.options=U({},n.defaultOptions,n.options),this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.observers=[],this.state=n.state||rh(),this.meta=n.meta}var t=e.prototype;return t.setState=function(r){this.dispatch({type:"setState",state:r})},t.addObserver=function(r){this.observers.indexOf(r)===-1&&this.observers.push(r)},t.removeObserver=function(r){this.observers=this.observers.filter(function(i){return i!==r})},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(pe).catch(pe)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var r=this,i,o=this.state.status==="loading",s=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),s=s.then(function(){r.mutationCache.config.onMutate==null||r.mutationCache.config.onMutate(r.state.variables,r)}).then(function(){return r.options.onMutate==null?void 0:r.options.onMutate(r.state.variables)}).then(function(l){l!==r.state.context&&r.dispatch({type:"loading",context:l,variables:r.state.variables})})),s.then(function(){return r.executeMutation()}).then(function(l){i=l,r.mutationCache.config.onSuccess==null||r.mutationCache.config.onSuccess(i,r.state.variables,r.state.context,r)}).then(function(){return r.options.onSuccess==null?void 0:r.options.onSuccess(i,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(i,null,r.state.variables,r.state.context)}).then(function(){return r.dispatch({type:"success",data:i}),i}).catch(function(l){return r.mutationCache.config.onError==null||r.mutationCache.config.onError(l,r.state.variables,r.state.context,r),So().error(l),Promise.resolve().then(function(){return r.options.onError==null?void 0:r.options.onError(l,r.state.variables,r.state.context)}).then(function(){return r.options.onSettled==null?void 0:r.options.onSettled(void 0,l,r.state.variables,r.state.context)}).then(function(){throw r.dispatch({type:"error",error:l}),l})})},t.executeMutation=function(){var r=this,i;return this.retryer=new th({fn:function(){return r.options.mutationFn?r.options.mutationFn(r.state.variables):Promise.reject("No mutationFn found")},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:(i=this.options.retry)!=null?i:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(r){var i=this;this.state=Dv(this.state,r),X.batch(function(){i.observers.forEach(function(o){o.onMutationUpdate(r)}),i.mutationCache.notify(i)})},e}();function rh(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function Dv(e,t){switch(t.type){case"failed":return U({},e,{failureCount:e.failureCount+1});case"pause":return U({},e,{isPaused:!0});case"continue":return U({},e,{isPaused:!1});case"loading":return U({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return U({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return U({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return U({},e,t.state);default:return e}}var Iv=function(e){Zn(t,e);function t(r){var i;return i=e.call(this)||this,i.config=r||{},i.mutations=[],i.mutationId=0,i}var n=t.prototype;return n.build=function(i,o,s){var l=new Av({mutationCache:this,mutationId:++this.mutationId,options:i.defaultMutationOptions(o),state:s,defaultOptions:o.mutationKey?i.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(l),l},n.add=function(i){this.mutations.push(i),this.notify(i)},n.remove=function(i){this.mutations=this.mutations.filter(function(o){return o!==i}),i.cancel(),this.notify(i)},n.clear=function(){var i=this;X.batch(function(){i.mutations.forEach(function(o){i.remove(o)})})},n.getAll=function(){return this.mutations},n.find=function(i){return typeof i.exact>"u"&&(i.exact=!0),this.mutations.find(function(o){return Ya(i,o)})},n.findAll=function(i){return this.mutations.filter(function(o){return Ya(i,o)})},n.notify=function(i){var o=this;X.batch(function(){o.listeners.forEach(function(s){s(i)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var i=this.mutations.filter(function(o){return o.state.isPaused});return X.batch(function(){return i.reduce(function(o,s){return o.then(function(){return s.continue().catch(pe)})},Promise.resolve())})},t}(er);function Mv(){return{onFetch:function(t){t.fetchFn=function(){var n,r,i,o,s,l,u=(n=t.fetchOptions)==null||(r=n.meta)==null?void 0:r.refetchPage,a=(i=t.fetchOptions)==null||(o=i.meta)==null?void 0:o.fetchMore,c=a==null?void 0:a.pageParam,f=(a==null?void 0:a.direction)==="forward",v=(a==null?void 0:a.direction)==="backward",g=((s=t.state.data)==null?void 0:s.pages)||[],x=((l=t.state.data)==null?void 0:l.pageParams)||[],y=Zd(),C=y==null?void 0:y.signal,d=x,h=!1,m=t.options.queryFn||function(){return Promise.reject("Missing queryFn")},S=function(ee,De,oe,Ie){return d=Ie?[De].concat(d):[].concat(d,[De]),Ie?[oe].concat(ee):[].concat(ee,[oe])},k=function(ee,De,oe,Ie){if(h)return Promise.reject("Cancelled");if(typeof oe>"u"&&!De&&ee.length)return Promise.resolve(ee);var j={queryKey:t.queryKey,signal:C,pageParam:oe,meta:t.meta},F=m(j),A=Promise.resolve(F).then(function(H){return S(ee,oe,H,Ie)});if(xo(F)){var I=A;I.cancel=F.cancel}return A},E;if(!g.length)E=k([]);else if(f){var R=typeof c<"u",P=R?c:tc(t.options,g);E=k(g,R,P)}else if(v){var D=typeof c<"u",L=D?c:Uv(t.options,g);E=k(g,D,L,!0)}else(function(){d=[];var ge=typeof t.options.getNextPageParam>"u",ee=u&&g[0]?u(g[0],0,g):!0;E=ee?k([],ge,x[0]):Promise.resolve(S([],x[0],g[0]));for(var De=function(j){E=E.then(function(F){var A=u&&g[j]?u(g[j],j,g):!0;if(A){var I=ge?x[j]:tc(t.options,F);return k(F,ge,I)}return Promise.resolve(S(F,x[j],g[j]))})},oe=1;oe"u"&&(c.revert=!0);var f=X.batch(function(){return s.queryCache.findAll(u).map(function(v){return v.cancel(c)})});return Promise.all(f).then(pe).catch(pe)},t.invalidateQueries=function(r,i,o){var s,l,u,a=this,c=jt(r,i,o),f=c[0],v=c[1],g=U({},f,{active:(s=(l=f.refetchActive)!=null?l:f.active)!=null?s:!0,inactive:(u=f.refetchInactive)!=null?u:!1});return X.batch(function(){return a.queryCache.findAll(f).forEach(function(x){x.invalidate()}),a.refetchQueries(g,v)})},t.refetchQueries=function(r,i,o){var s=this,l=jt(r,i,o),u=l[0],a=l[1],c=X.batch(function(){return s.queryCache.findAll(u).map(function(v){return v.fetch(void 0,U({},a,{meta:{refetchPage:u==null?void 0:u.refetchPage}}))})}),f=Promise.all(c).then(pe);return a!=null&&a.throwOnError||(f=f.catch(pe)),f},t.fetchQuery=function(r,i,o){var s=zi(r,i,o),l=this.defaultQueryOptions(s);typeof l.retry>"u"&&(l.retry=!1);var u=this.queryCache.build(this,l);return u.isStaleByTime(l.staleTime)?u.fetch(l):Promise.resolve(u.state.data)},t.prefetchQuery=function(r,i,o){return this.fetchQuery(r,i,o).then(pe).catch(pe)},t.fetchInfiniteQuery=function(r,i,o){var s=zi(r,i,o);return s.behavior=Mv(),this.fetchQuery(s)},t.prefetchInfiniteQuery=function(r,i,o){return this.fetchInfiniteQuery(r,i,o).then(pe).catch(pe)},t.cancelMutations=function(){var r=this,i=X.batch(function(){return r.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(i).then(pe).catch(pe)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(r){return this.mutationCache.build(this,r).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(r){this.defaultOptions=r},t.setQueryDefaults=function(r,i){var o=this.queryDefaults.find(function(s){return rn(r)===rn(s.queryKey)});o?o.defaultOptions=i:this.queryDefaults.push({queryKey:r,defaultOptions:i})},t.getQueryDefaults=function(r){var i;return r?(i=this.queryDefaults.find(function(o){return go(r,o.queryKey)}))==null?void 0:i.defaultOptions:void 0},t.setMutationDefaults=function(r,i){var o=this.mutationDefaults.find(function(s){return rn(r)===rn(s.mutationKey)});o?o.defaultOptions=i:this.mutationDefaults.push({mutationKey:r,defaultOptions:i})},t.getMutationDefaults=function(r){var i;return r?(i=this.mutationDefaults.find(function(o){return go(r,o.mutationKey)}))==null?void 0:i.defaultOptions:void 0},t.defaultQueryOptions=function(r){if(r!=null&&r._defaulted)return r;var i=U({},this.defaultOptions.queries,this.getQueryDefaults(r==null?void 0:r.queryKey),r,{_defaulted:!0});return!i.queryHash&&i.queryKey&&(i.queryHash=Pu(i.queryKey,i)),i},t.defaultQueryObserverOptions=function(r){return this.defaultQueryOptions(r)},t.defaultMutationOptions=function(r){return r!=null&&r._defaulted?r:U({},this.defaultOptions.mutations,this.getMutationDefaults(r==null?void 0:r.mutationKey),r,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}(),bv=function(e){Zn(t,e);function t(r,i){var o;return o=e.call(this)||this,o.client=r,o.options=i,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(i),o}var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),nc(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return kl(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return kl(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(i,o){var s=this.options,l=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(i),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();var u=this.hasListeners();u&&rc(this.currentQuery,l,this.options,s)&&this.executeFetch(),this.updateResult(o),u&&(this.currentQuery!==l||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();var a=this.computeRefetchInterval();u&&(this.currentQuery!==l||this.options.enabled!==s.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)},n.getOptimisticResult=function(i){var o=this.client.defaultQueryObserverOptions(i),s=this.client.getQueryCache().build(this.client,o);return this.createResult(s,o)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(i,o){var s=this,l={},u=function(c){s.trackedProps.includes(c)||s.trackedProps.push(c)};return Object.keys(i).forEach(function(a){Object.defineProperty(l,a,{configurable:!1,enumerable:!0,get:function(){return u(a),i[a]}})}),(o.useErrorBoundary||o.suspense)&&u("error"),l},n.getNextResult=function(i){var o=this;return new Promise(function(s,l){var u=o.subscribe(function(a){a.isFetching||(u(),a.isError&&(i!=null&&i.throwOnError)?l(a.error):s(a))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(i){return this.fetch(U({},i,{meta:{refetchPage:i==null?void 0:i.refetchPage}}))},n.fetchOptimistic=function(i){var o=this,s=this.client.defaultQueryObserverOptions(i),l=this.client.getQueryCache().build(this.client,s);return l.fetch().then(function(){return o.createResult(l,s)})},n.fetch=function(i){var o=this;return this.executeFetch(i).then(function(){return o.updateResult(),o.currentResult})},n.executeFetch=function(i){this.updateQuery();var o=this.currentQuery.fetch(this.options,i);return i!=null&&i.throwOnError||(o=o.catch(pe)),o},n.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(vo||this.currentResult.isStale||!El(this.options.staleTime))){var o=Gd(this.currentResult.dataUpdatedAt,this.options.staleTime),s=o+1;this.staleTimeoutId=setTimeout(function(){i.currentResult.isStale||i.updateResult()},s)}},n.computeRefetchInterval=function(){var i;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(i=this.options.refetchInterval)!=null?i:!1},n.updateRefetchInterval=function(i){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=i,!(vo||this.options.enabled===!1||!El(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||jr.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(i,o){var s=this.currentQuery,l=this.options,u=this.currentResult,a=this.currentResultState,c=this.currentResultOptions,f=i!==s,v=f?i.state:this.currentQueryInitialState,g=f?this.currentResult:this.previousQueryResult,x=i.state,y=x.dataUpdatedAt,C=x.error,d=x.errorUpdatedAt,h=x.isFetching,m=x.status,S=!1,k=!1,E;if(o.optimisticResults){var R=this.hasListeners(),P=!R&&nc(i,o),D=R&&rc(i,s,o,l);(P||D)&&(h=!0,y||(m="loading"))}if(o.keepPreviousData&&!x.dataUpdateCount&&(g!=null&&g.isSuccess)&&m!=="error")E=g.data,y=g.dataUpdatedAt,m=g.status,S=!0;else if(o.select&&typeof x.data<"u")if(u&&x.data===(a==null?void 0:a.data)&&o.select===this.selectFn)E=this.selectResult;else try{this.selectFn=o.select,E=o.select(x.data),o.structuralSharing!==!1&&(E=wo(u==null?void 0:u.data,E)),this.selectResult=E,this.selectError=null}catch(ae){So().error(ae),this.selectError=ae}else E=x.data;if(typeof o.placeholderData<"u"&&typeof E>"u"&&(m==="loading"||m==="idle")){var L;if(u!=null&&u.isPlaceholderData&&o.placeholderData===(c==null?void 0:c.placeholderData))L=u.data;else if(L=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof L<"u")try{L=o.select(L),o.structuralSharing!==!1&&(L=wo(u==null?void 0:u.data,L)),this.selectError=null}catch(ae){So().error(ae),this.selectError=ae}typeof L<"u"&&(m="success",E=L,k=!0)}this.selectError&&(C=this.selectError,E=this.selectResult,d=Date.now(),m="error");var q={status:m,isLoading:m==="loading",isSuccess:m==="success",isError:m==="error",isIdle:m==="idle",data:E,dataUpdatedAt:y,error:C,errorUpdatedAt:d,failureCount:x.fetchFailureCount,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>v.dataUpdateCount||x.errorUpdateCount>v.errorUpdateCount,isFetching:h,isRefetching:h&&m!=="loading",isLoadingError:m==="error"&&x.dataUpdatedAt===0,isPlaceholderData:k,isPreviousData:S,isRefetchError:m==="error"&&x.dataUpdatedAt!==0,isStale:ju(i,o),refetch:this.refetch,remove:this.remove};return q},n.shouldNotifyListeners=function(i,o){if(!o)return!0;var s=this.options,l=s.notifyOnChangeProps,u=s.notifyOnChangePropsExclusions;if(!l&&!u||l==="tracked"&&!this.trackedProps.length)return!0;var a=l==="tracked"?this.trackedProps:l;return Object.keys(i).some(function(c){var f=c,v=i[f]!==o[f],g=a==null?void 0:a.some(function(y){return y===c}),x=u==null?void 0:u.some(function(y){return y===c});return v&&!x&&(!a||g)})},n.updateResult=function(i){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!Rv(this.currentResult,o)){var s={cache:!0};(i==null?void 0:i.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(s.listeners=!0),this.notify(U({},s,i))}},n.updateQuery=function(){var i=this.client.getQueryCache().build(this.client,this.options);if(i!==this.currentQuery){var o=this.currentQuery;this.currentQuery=i,this.currentQueryInitialState=i.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),i.addObserver(this))}},n.onQueryUpdate=function(i){var o={};i.type==="success"?o.onSuccess=!0:i.type==="error"&&!Bi(i.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},n.notify=function(i){var o=this;X.batch(function(){i.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):i.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),i.listeners&&o.listeners.forEach(function(s){s(o.currentResult)}),i.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},t}(er);function Bv(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function nc(e,t){return Bv(e,t)||e.state.dataUpdatedAt>0&&kl(e,t,t.refetchOnMount)}function kl(e,t,n){if(t.enabled!==!1){var r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ju(e,t)}return!1}function rc(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&ju(e,n)}function ju(e,t){return e.isStaleByTime(t.staleTime)}var $v=function(e){Zn(t,e);function t(r,i){var o;return o=e.call(this)||this,o.client=r,o.setOptions(i),o.bindMethods(),o.updateResult(),o}var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(i){this.options=this.client.defaultMutationOptions(i)},n.onUnsubscribe=function(){if(!this.listeners.length){var i;(i=this.currentMutation)==null||i.removeObserver(this)}},n.onMutationUpdate=function(i){this.updateResult();var o={listeners:!0};i.type==="success"?o.onSuccess=!0:i.type==="error"&&(o.onError=!0),this.notify(o)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(i,o){return this.mutateOptions=o,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,U({},this.options,{variables:typeof i<"u"?i:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var i=this.currentMutation?this.currentMutation.state:rh(),o=U({},i,{isLoading:i.status==="loading",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=o},n.notify=function(i){var o=this;X.batch(function(){o.mutateOptions&&(i.onSuccess?(o.mutateOptions.onSuccess==null||o.mutateOptions.onSuccess(o.currentResult.data,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(o.currentResult.data,null,o.currentResult.variables,o.currentResult.context)):i.onError&&(o.mutateOptions.onError==null||o.mutateOptions.onError(o.currentResult.error,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(void 0,o.currentResult.error,o.currentResult.variables,o.currentResult.context))),i.listeners&&o.listeners.forEach(function(s){s(o.currentResult)})})},t}(er),Qv=xv.unstable_batchedUpdates;X.setBatchNotifyFunction(Qv);var Hv=console;Tv(Hv);var ic=ie.createContext(void 0),ih=ie.createContext(!1);function oh(e){return e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ic),window.ReactQueryClientContext):ic}var Qo=function(){var t=ie.useContext(oh(ie.useContext(ih)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qv=function(t){var n=t.client,r=t.contextSharing,i=r===void 0?!1:r,o=t.children;ie.useEffect(function(){return n.mount(),function(){n.unmount()}},[n]);var s=oh(i);return ie.createElement(ih.Provider,{value:i},ie.createElement(s.Provider,{value:n},o))};function Vv(){var e=!1;return{clearReset:function(){e=!1},reset:function(){e=!0},isReset:function(){return e}}}var Wv=ie.createContext(Vv()),Kv=function(){return ie.useContext(Wv)};function sh(e,t,n){return typeof t=="function"?t.apply(void 0,n):typeof t=="boolean"?t:!!e}function Rl(e,t,n){var r=ie.useRef(!1),i=ie.useState(0),o=i[1],s=Ev(e,t,n),l=Qo(),u=ie.useRef();u.current?u.current.setOptions(s):u.current=new $v(l,s);var a=u.current.getCurrentResult();ie.useEffect(function(){r.current=!0;var f=u.current.subscribe(X.batchCalls(function(){r.current&&o(function(v){return v+1})}));return function(){r.current=!1,f()}},[]);var c=ie.useCallback(function(f,v){u.current.mutate(f,v).catch(pe)},[]);if(a.error&&sh(void 0,u.current.options.useErrorBoundary,[a.error]))throw a.error;return U({},a,{mutate:c,mutateAsync:a.mutate})}function Xv(e,t){var n=ie.useRef(!1),r=ie.useState(0),i=r[1],o=Qo(),s=Kv(),l=o.defaultQueryObserverOptions(e);l.optimisticResults=!0,l.onError&&(l.onError=X.batchCalls(l.onError)),l.onSuccess&&(l.onSuccess=X.batchCalls(l.onSuccess)),l.onSettled&&(l.onSettled=X.batchCalls(l.onSettled)),l.suspense&&(typeof l.staleTime!="number"&&(l.staleTime=1e3),l.cacheTime===0&&(l.cacheTime=1)),(l.suspense||l.useErrorBoundary)&&(s.isReset()||(l.retryOnMount=!1));var u=ie.useState(function(){return new t(o,l)}),a=u[0],c=a.getOptimisticResult(l);if(ie.useEffect(function(){n.current=!0,s.clearReset();var f=a.subscribe(X.batchCalls(function(){n.current&&i(function(v){return v+1})}));return a.updateResult(),function(){n.current=!1,f()}},[s,a]),ie.useEffect(function(){a.setOptions(l,{listeners:!1})},[l,a]),l.suspense&&c.isLoading)throw a.fetchOptimistic(l).then(function(f){var v=f.data;l.onSuccess==null||l.onSuccess(v),l.onSettled==null||l.onSettled(v,null)}).catch(function(f){s.clearReset(),l.onError==null||l.onError(f),l.onSettled==null||l.onSettled(void 0,f)});if(c.isError&&!s.isReset()&&!c.isFetching&&sh(l.suspense,l.useErrorBoundary,[c.error,a.getCurrentQuery()]))throw c.error;return l.notifyOnChangeProps==="tracked"&&(c=a.trackResult(c,l)),c}function it(e,t,n){var r=zi(e,t,n);return Xv(r,bv)}/** * @remix-run/router v1.23.3 * * 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 Wr(){return Wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Nu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Gv(){return Math.random().toString(36).substr(2,8)}function sc(e,t){return{usr:e.state,key:e.key,idx:t}}function _l(e,t,n,r){return n===void 0&&(n=null),Wr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?tr(t):t,{state:n,key:t&&t.key||r||Gv()})}function Eo(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 tr(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 Yv(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,l=At.Pop,u=null,a=c();a==null&&(a=0,s.replaceState(Wr({},s.state,{idx:a}),""));function c(){return(s.state||{idx:null}).idx}function f(){l=At.Pop;let C=c(),d=C==null?null:C-a;a=C,u&&u({action:l,location:y.location,delta:d})}function v(C,d){l=At.Push;let h=_l(y.location,C,d);a=c()+1;let m=sc(h,a),S=y.createHref(h);try{s.pushState(m,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(S)}o&&u&&u({action:l,location:y.location,delta:1})}function g(C,d){l=At.Replace;let h=_l(y.location,C,d);a=c();let m=sc(h,a),S=y.createHref(h);s.replaceState(m,"",S),o&&u&&u({action:l,location:y.location,delta:0})}function x(C){let d=i.location.origin!=="null"?i.location.origin:i.location.href,h=typeof C=="string"?C:Eo(C);return h=h.replace(/ $/,"%20"),ne(d,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,d)}let y={get action(){return l},get location(){return e(i,s)},listen(C){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(oc,f),u=C,()=>{i.removeEventListener(oc,f),u=null}},createHref(C){return t(i,C)},createURL:x,encodeLocation(C){let d=x(C);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:v,replace:g,go(C){return s.go(C)}};return y}var lc;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(lc||(lc={}));function Zv(e,t,n){return n===void 0&&(n="/"),ey(e,t,n)}function ey(e,t,n,r){let i=typeof t=="string"?tr(t):t,o=Wn(i.pathname||"/",n);if(o==null)return null;let s=lh(e);ty(s);let l=null,u=dy(o);for(let a=0;l==null&&a{let u={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};u.relativePath.startsWith("/")&&(ne(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let a=Qt([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(ne(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),lh(o.children,t,c,a)),!(o.path==null&&!o.index)&&t.push({path:a,score:uy(a,o.index),routesMeta:c})};return e.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,s);else for(let u of uh(o.path))i(o,s,u)}),t}function uh(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=uh(r.join("/")),l=[];return l.push(...s.map(u=>u===""?o:[o,u].join("/"))),i&&l.push(...s),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function ty(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ay(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ny=/^:[\w-]+$/,ry=3,iy=2,oy=1,sy=10,ly=-2,uc=e=>e==="*";function uy(e,t){let n=e.split("/"),r=n.length;return n.some(uc)&&(r+=ly),t&&(r+=iy),n.filter(i=>!uc(i)).reduce((i,o)=>i+(ny.test(o)?ry:o===""?oy:sy),r)}function ay(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 cy(e,t,n){let{routesMeta:r}=e,i={},o="/",s=[];for(let l=0;l{let{paramName:v,isOptional:g}=c;if(v==="*"){let y=l[f]||"";s=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const x=l[f];return g&&!x?a[v]=void 0:a[v]=(x||"").replace(/%2F/g,"/"),a},{}),pathname:o,pathnameBase:s,pattern:e}}function fy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Nu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,u)=>(r.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function dy(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Nu(!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 Wn(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)||"/"}const hy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,py=e=>hy.test(e);function my(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?tr(e):e,o;if(n)if(py(n))o=n;else{if(n.includes("//")){let s=n;n=fh(n),Nu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+n))}n.startsWith("/")?o=ac(n.substring(1),"/"):o=ac(n,t)}else o=t;return{pathname:o,search:gy(r),hash:wy(i)}}function ac(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 Cs(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 vy(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ah(e,t){let n=vy(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ch(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=tr(e):(i=Wr({},e),ne(!i.pathname||!i.pathname.includes("?"),Cs("?","pathname","search",i)),ne(!i.pathname||!i.pathname.includes("#"),Cs("#","pathname","hash",i)),ne(!i.search||!i.search.includes("#"),Cs("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,l;if(s==null)l=n;else{let f=t.length-1;if(!r&&s.startsWith("..")){let v=s.split("/");for(;v[0]==="..";)v.shift(),f-=1;i.pathname=v.join("/")}l=f>=0?t[f]:"/"}let u=my(i,l),a=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(a||c)&&(u.pathname+="/"),u}const fh=e=>e.replace(/\/\/+/g,"/"),Qt=e=>fh(e.join("/")),yy=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),gy=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wy=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function xy(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const dh=["post","put","patch","delete"];new Set(dh);const Sy=["get",...dh];new Set(Sy);/** * React Router v6.30.4 * * 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 Kr(){return Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l.current=!0}),O.useCallback(function(a,c){if(c===void 0&&(c={}),!l.current)return;if(typeof a=="number"){r.go(a);return}let f=ch(a,JSON.parse(s),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Qt([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,s,o,e])}function Vo(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=O.useContext(Xt),{matches:i}=O.useContext(gn),{pathname:o}=ri(),s=JSON.stringify(ah(i,r.v7_relativeSplatPath));return O.useMemo(()=>ch(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function Ry(e,t){return _y(e,t)}function _y(e,t,n,r){ni()||ne(!1);let{navigator:i}=O.useContext(Xt),{matches:o}=O.useContext(gn),s=o[o.length-1],l=s?s.params:{};s&&s.pathname;let u=s?s.pathnameBase:"/";s&&s.route;let a=ri(),c;if(t){var f;let C=typeof t=="string"?tr(t):t;u==="/"||(f=C.pathname)!=null&&f.startsWith(u)||ne(!1),c=C}else c=a;let v=c.pathname||"/",g=v;if(u!=="/"){let C=u.replace(/^\//,"").split("/");g="/"+v.replace(/^\//,"").split("/").slice(C.length).join("/")}let x=Zv(e,{pathname:g}),y=Ty(x&&x.map(C=>Object.assign({},C,{params:Object.assign({},l,C.params),pathname:Qt([u,i.encodeLocation?i.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?u:Qt([u,i.encodeLocation?i.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),o,n,r);return t&&y?O.createElement(qo.Provider,{value:{location:Kr({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:At.Pop}},y):y}function Oy(){let e=Dy(),t=xy(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 O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},t),n?O.createElement("pre",{style:i},n):null,null)}const Py=O.createElement(Oy,null);class jy extends O.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?O.createElement(gn.Provider,{value:this.props.routeContext},O.createElement(ph.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ny(e){let{routeContext:t,match:n,children:r}=e,i=O.useContext(Ho);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),O.createElement(gn.Provider,{value:t},r)}function Ty(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 s=e,l=(i=n)==null?void 0:i.errors;if(l!=null){let c=s.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);c>=0||ne(!1),s=s.slice(0,Math.min(s.length,c+1))}let u=!1,a=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,a+1):s=[s[0]];break}}}return s.reduceRight((c,f,v)=>{let g,x=!1,y=null,C=null;n&&(g=l&&f.route.id?l[f.route.id]:void 0,y=f.route.errorElement||Py,u&&(a<0&&v===0?(My("route-fallback"),x=!0,C=null):a===v&&(x=!0,C=f.route.hydrateFallbackElement||null)));let d=t.concat(s.slice(0,v+1)),h=()=>{let m;return g?m=y:x?m=C:f.route.Component?m=O.createElement(f.route.Component,null):f.route.element?m=f.route.element:m=c,O.createElement(Ny,{match:f,routeContext:{outlet:c,matches:d,isDataRoute:n!=null},children:m})};return n&&(f.route.ErrorBoundary||f.route.errorElement||v===0)?O.createElement(jy,{location:n.location,revalidation:n.revalidation,component:y,error:g,children:h(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):h()},null)}var vh=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(vh||{}),yh=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}(yh||{});function Ly(e){let t=O.useContext(Ho);return t||ne(!1),t}function Fy(e){let t=O.useContext(hh);return t||ne(!1),t}function Ay(e){let t=O.useContext(gn);return t||ne(!1),t}function gh(e){let t=Ay(),n=t.matches[t.matches.length-1];return n.route.id||ne(!1),n.route.id}function Dy(){var e;let t=O.useContext(ph),n=Fy(),r=gh();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Iy(){let{router:e}=Ly(vh.UseNavigateStable),t=gh(yh.UseNavigateStable),n=O.useRef(!1);return mh(()=>{n.current=!0}),O.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Kr({fromRouteId:t},o)))},[e,t])}const cc={};function My(e,t,n){cc[e]||(cc[e]=!0)}function Uy(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Zt(e){ne(!1)}function zy(e){let{basename:t="/",children:n=null,location:r,navigationType:i=At.Pop,navigator:o,static:s=!1,future:l}=e;ni()&&ne(!1);let u=t.replace(/^\/*/,"/"),a=O.useMemo(()=>({basename:u,navigator:o,static:s,future:Kr({v7_relativeSplatPath:!1},l)}),[u,l,o,s]);typeof r=="string"&&(r=tr(r));let{pathname:c="/",search:f="",hash:v="",state:g=null,key:x="default"}=r,y=O.useMemo(()=>{let C=Wn(c,u);return C==null?null:{location:{pathname:C,search:f,hash:v,state:g,key:x},navigationType:i}},[u,c,f,v,g,x,i]);return y==null?null:O.createElement(Xt.Provider,{value:a},O.createElement(qo.Provider,{children:n,value:y}))}function by(e){let{children:t,location:n}=e;return Ry(Pl(t),n)}new Promise(()=>{});function Pl(e,t){t===void 0&&(t=[]);let n=[];return O.Children.forEach(e,(r,i)=>{if(!O.isValidElement(r))return;let o=[...t,i];if(r.type===O.Fragment){n.push.apply(n,Pl(r.props.children,o));return}r.type!==Zt&&ne(!1),!r.props.index||!r.props.children||ne(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Pl(r.props.children,o)),n.push(s)}),n}/** * React Router DOM v6.30.4 * * 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 Co(){return Co=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a&&fc?fc(()=>u(f)):u(f)},[u,a]);return O.useLayoutEffect(()=>s.listen(c),[s,c]),O.useEffect(()=>Uy(r),[r]),O.createElement(zy,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}const Xy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Jy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Gy=O.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:l,target:u,to:a,preventScrollReset:c,viewTransition:f}=t,v=wh(t,Qy),{basename:g}=O.useContext(Xt),x,y=!1;if(typeof a=="string"&&Jy.test(a)&&(x=a,Xy))try{let m=new URL(window.location.href),S=a.startsWith("//")?new URL(m.protocol+a):new URL(a),k=Wn(S.pathname,g);S.origin===m.origin&&k!=null?a=k+S.search+S.hash:y=!0}catch{}let C=Ey(a,{relative:i}),d=Zy(a,{replace:s,state:l,target:u,preventScrollReset:c,relative:i,viewTransition:f});function h(m){r&&r(m),m.defaultPrevented||d(m)}return O.createElement("a",Co({},v,{href:x||C,onClick:y||o?r:h,ref:n,target:u}))}),dc=O.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:l,to:u,viewTransition:a,children:c}=t,f=wh(t,Hy),v=Vo(u,{relative:f.relative}),g=ri(),x=O.useContext(hh),{navigator:y,basename:C}=O.useContext(Xt),d=x!=null&&eg(v)&&a===!0,h=y.encodeLocation?y.encodeLocation(v).pathname:v.pathname,m=g.pathname,S=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;i||(m=m.toLowerCase(),S=S?S.toLowerCase():null,h=h.toLowerCase()),S&&C&&(S=Wn(S,C)||S);const k=h!=="/"&&h.endsWith("/")?h.length-1:h.length;let E=m===h||!s&&m.startsWith(h)&&m.charAt(k)==="/",R=S!=null&&(S===h||!s&&S.startsWith(h)&&S.charAt(h.length)==="/"),P={isActive:E,isPending:R,isTransitioning:d},D=E?r:void 0,L;typeof o=="function"?L=o(P):L=[o,E?"active":null,R?"pending":null,d?"transitioning":null].filter(Boolean).join(" ");let q=typeof l=="function"?l(P):l;return O.createElement(Gy,Co({},f,{"aria-current":D,className:L,ref:n,style:q,to:u,viewTransition:a}),typeof c=="function"?c(P):c)});var jl;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(jl||(jl={}));var hc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(hc||(hc={}));function Yy(e){let t=O.useContext(Ho);return t||ne(!1),t}function Zy(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,viewTransition:l}=t===void 0?{}:t,u=Cy(),a=ri(),c=Vo(e,{relative:s});return O.useCallback(f=>{if($y(f,n)){f.preventDefault();let v=r!==void 0?r:Eo(a)===Eo(c);u(e,{replace:v,state:i,preventScrollReset:o,relative:s,viewTransition:l})}},[a,u,c,r,i,n,e,o,s,l])}function eg(e,t){t===void 0&&(t={});let n=O.useContext(Vy);n==null&&ne(!1);let{basename:r}=Yy(jl.useViewTransitionState),i=Vo(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Wn(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Wn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ol(i.pathname,s)!=null||Ol(i.pathname,o)!=null}/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var tg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ng=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),st=(e,t)=>{const n=O.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:l="",children:u,...a},c)=>O.createElement("svg",{ref:c,...tg,width:i,height:i,stroke:r,strokeWidth:s?Number(o)*24/Number(i):o,className:["lucide",`lucide-${ng(e)}`,l].join(" "),...a},[...t.map(([f,v])=>O.createElement(f,v)),...Array.isArray(u)?u:[u]]));return n.displayName=`${e}`,n};/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pc=st("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const rg=st("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ig=st("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const og=st("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const sg=st("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lg=st("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ug=st("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ag=st("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cg=st("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const fg=st("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** * @license lucide-react v0.294.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dg=st("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function hg({children:e}){const[t,n]=O.useState(!1),r=[{to:"/",icon:ug,label:"Översikt"},{to:"/finance",icon:lg,label:"Ekonomi"},{to:"/quixzoom",icon:rg,label:"quiXzoom"},{to:"/support",icon:og,label:"Support"},{to:"/apis",icon:cg,label:"API:er"},{to:"/systems",icon:fg,label:"System"}];return p.jsxs("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column"},children:[p.jsxs("header",{style:{background:"var(--navy)",color:"white",padding:"16px 20px",position:"sticky",top:0,zIndex:100,display:"flex",alignItems:"center",gap:12},children:[p.jsx("div",{style:{width:36,height:36,borderRadius:10,background:"var(--amber)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18},children:"🔁"}),p.jsx("h1",{style:{fontSize:"1.1rem",fontWeight:700,flex:1,margin:0},children:"AAMOS Command Center"}),p.jsx("button",{onClick:()=>n(!t),style:{background:"none",border:"none",color:"white",cursor:"pointer"},children:t?p.jsx(dg,{size:24}):p.jsx(ag,{size:24})})]}),p.jsx("nav",{style:{display:"flex",gap:8,padding:"12px 16px",overflowX:"auto",background:"white",borderBottom:"1px solid var(--border)",WebkitOverflowScrolling:"touch"},children:r.map(i=>p.jsxs(dc,{to:i.to,style:({isActive:o})=>({whiteSpace:"nowrap",padding:"8px 16px",borderRadius:20,border:"1px solid var(--border)",background:o?"var(--navy)":"white",color:o?"white":"var(--navy)",fontSize:"0.88rem",fontWeight:500,textDecoration:"none",display:"flex",alignItems:"center",gap:6}),children:[p.jsx(i.icon,{size:16}),i.label]},i.to))}),p.jsx("main",{style:{flex:1,padding:16,paddingBottom:80},children:e}),p.jsx("nav",{style:{position:"fixed",bottom:0,left:0,right:0,background:"white",borderTop:"1px solid var(--border)",display:"flex",justifyContent:"space-around",padding:"8px 0",zIndex:100},children:r.slice(0,4).map(i=>p.jsxs(dc,{to:i.to,style:({isActive:o})=>({background:"none",border:"none",fontSize:"0.7rem",color:o?"var(--navy)":"var(--muted)",display:"flex",flexDirection:"column",alignItems:"center",gap:3,textDecoration:"none",padding:"4px 12px"}),children:[p.jsx(i.icon,{size:20}),i.label]},i.to))})]})}function xh(e,t){return function(){return e.apply(t,arguments)}}const{toString:pg}=Object.prototype,{getPrototypeOf:Kn}=Object,{iterator:ii,toStringTag:Sh}=Symbol,ko=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Xr=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),ko(n,t))return!0;n=Kn(n)}return!1},mg=(e,t)=>e!=null&&Xr(e,t)?e[t]:void 0,Tu=(e=>t=>{const n=pg.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),lt=e=>(e=e.toLowerCase(),t=>Tu(t)===e),Wo=e=>t=>typeof t===e,{isArray:pn}=Array,Xn=Wo("undefined");function nr(e){return e!==null&&!Xn(e)&&e.constructor!==null&&!Xn(e.constructor)&&Ae(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Eh=lt("ArrayBuffer");function vg(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Eh(e.buffer),t}const yg=Wo("string"),Ae=Wo("function"),Ch=Wo("number"),rr=e=>e!==null&&typeof e=="object",gg=e=>e===!0||e===!1,$i=e=>{if(!rr(e))return!1;const t=Kn(e);return(t===null||t===Object.prototype||Kn(t)===null)&&!Xr(e,Sh)&&!Xr(e,ii)},wg=e=>{if(!rr(e)||nr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},xg=lt("Date"),Sg=lt("File"),Eg=e=>!!(e&&typeof e.uri<"u"),Cg=e=>e&&typeof e.getParts<"u",kg=lt("Blob"),Rg=lt("FileList"),_g=e=>rr(e)&&Ae(e.pipe);function Og(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const mc=Og(),vc=typeof mc.FormData<"u"?mc.FormData:void 0,Pg=e=>{if(!e)return!1;if(vc&&e instanceof vc)return!0;const t=Kn(e);if(!t||t===Object.prototype||!Ae(e.append))return!1;const n=Tu(e);return n==="formdata"||n==="object"&&Ae(e.toString)&&e.toString()==="[object FormData]"},jg=lt("URLSearchParams"),[Ng,Tg,Lg,Fg]=["ReadableStream","Request","Response","Headers"].map(lt),Ag=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),pn(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const on=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rh=e=>!Xn(e)&&e!==on;function Nl(...e){const{caseless:t,skipUndefined:n}=Rh(this)&&this||{},r={},i=(o,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const l=t&&typeof s=="string"&&kh(r,s)||s,u=ko(r,l)?r[l]:void 0;$i(u)&&$i(o)?r[l]=Nl(u,o):$i(o)?r[l]=Nl({},o):pn(o)?r[l]=o.slice():(!n||!Xn(o))&&(r[l]=o)};for(let o=0,s=e.length;o(oi(t,(i,o)=>{n&&Ae(i)?Object.defineProperty(e,o,{__proto__:null,value:xh(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Ig=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Mg=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Ug=(e,t,n,r)=>{let i,o,s;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&Kn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},zg=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},bg=e=>{if(!e)return null;if(pn(e))return e;let t=e.length;if(!Ch(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Bg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Kn(Uint8Array)),$g=(e,t)=>{const r=(e&&e[ii]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Qg=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Hg=lt("HTMLFormElement"),qg=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:Vg}=Object.prototype,Wg=lt("RegExp"),_h=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oi(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},Kg=e=>{_h(e,(t,n)=>{if(Ae(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ae(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Xg=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return pn(e)?r(e):r(String(e).split(t)),n},Jg=()=>{},Gg=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yg(e){return!!(e&&Ae(e.append)&&e[Sh]==="FormData"&&e[ii])}const Zg=e=>{const t=new WeakSet,n=r=>{if(rr(r)){if(t.has(r))return;if(nr(r))return r;if(!("toJSON"in r)){t.add(r);const i=pn(r)?[]:{};return oi(r,(o,s)=>{const l=n(o);!Xn(l)&&(i[s]=l)}),t.delete(r),i}}return r};return n(e)},e0=lt("AsyncFunction"),t0=e=>e&&(rr(e)||Ae(e))&&Ae(e.then)&&Ae(e.catch),Oh=((e,t)=>e?setImmediate:t?((n,r)=>(on.addEventListener("message",({source:i,data:o})=>{i===on&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),on.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ae(on.postMessage)),n0=typeof queueMicrotask<"u"?queueMicrotask.bind(on):typeof process<"u"&&process.nextTick||Oh,Ph=e=>e!=null&&Ae(e[ii]),r0=e=>e!=null&&Xr(e,ii)&&Ph(e),w={isArray:pn,isArrayBuffer:Eh,isBuffer:nr,isFormData:Pg,isArrayBufferView:vg,isString:yg,isNumber:Ch,isBoolean:gg,isObject:rr,isPlainObject:$i,isEmptyObject:wg,isReadableStream:Ng,isRequest:Tg,isResponse:Lg,isHeaders:Fg,isUndefined:Xn,isDate:xg,isFile:Sg,isReactNativeBlob:Eg,isReactNative:Cg,isBlob:kg,isRegExp:Wg,isFunction:Ae,isStream:_g,isURLSearchParams:jg,isTypedArray:Bg,isFileList:Rg,forEach:oi,merge:Nl,extend:Dg,trim:Ag,stripBOM:Ig,inherits:Mg,toFlatObject:Ug,kindOf:Tu,kindOfTest:lt,endsWith:zg,toArray:bg,forEachEntry:$g,matchAll:Qg,isHTMLForm:Hg,hasOwnProperty:ko,hasOwnProp:ko,hasOwnInPrototypeChain:Xr,getSafeProp:mg,reduceDescriptors:_h,freezeMethods:Kg,toObjectSet:Xg,toCamelCase:qg,noop:Jg,toFiniteNumber:Gg,findKey:kh,global:on,isContextDefined:Rh,isSpecCompliantForm:Yg,toJSONObject:Zg,isAsyncFn:e0,isThenable:t0,setImmediate:Oh,asap:n0,isIterable:Ph,isSafeIterable:r0},i0=w.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),o0=e=>{const t={};let n,r,i;return e&&e.split(` `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&i0[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function s0(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const l0=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),u0=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Lu(e,t){return w.isArray(e)?e.map(n=>Lu(n,t)):s0(String(e).replace(t,""))}const a0=e=>Lu(e,l0),c0=e=>Lu(e,u0);function jh(e){const t=Object.create(null);return w.forEach(e.toJSON(),(n,r)=>{t[r]=c0(n)}),t}const yc=Symbol("internals");function hr(e){return e&&String(e).trim().toLowerCase()}function Qi(e){return e===!1||e==null?e:w.isArray(e)?e.map(Qi):a0(String(e))}function f0(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const d0=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ks(e,t,n,r,i){if(w.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!w.isString(t)){if(w.isString(r))return t.indexOf(r)!==-1;if(w.isRegExp(r))return r.test(t)}}function h0(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function p0(e,t){const n=w.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let Ce=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(l,u,a){const c=hr(u);if(!c)return;const f=w.findKey(i,c);(!f||i[f]===void 0||a===!0||a===void 0&&i[f]!==!1)&&(i[f||u]=Qi(l))}const s=(l,u)=>w.forEach(l,(a,c)=>o(a,c,u));if(w.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(w.isString(t)&&(t=t.trim())&&!d0(t))s(o0(t),n);else if(w.isObject(t)&&w.isSafeIterable(t)){let l=Object.create(null),u,a;for(const c of t){if(!w.isArray(c))throw new TypeError("Object iterator must return a key-value pair");a=c[0],w.hasOwnProp(l,a)?(u=l[a],l[a]=w.isArray(u)?[...u,c[1]]:[u,c[1]]):l[a]=c[1]}s(l,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=hr(t),t){const r=w.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return f0(i);if(w.isFunction(n))return n.call(this,i,r);if(w.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=hr(t),t){const r=w.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ks(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=hr(s),s){const l=w.findKey(r,s);l&&(!n||ks(r,r[l],l,n))&&(delete r[l],i=!0)}}return w.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||ks(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return w.forEach(this,(i,o)=>{const s=w.findKey(r,o);if(s){n[s]=Qi(i),delete n[o];return}const l=t?h0(o):String(o).trim();l!==o&&delete n[o],n[l]=Qi(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return w.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&w.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[yc]=this[yc]={accessors:{}}).accessors,i=this.prototype;function o(s){const l=hr(s);r[l]||(p0(i,s),r[l]=!0)}return w.isArray(t)?t.forEach(o):o(t),this}};Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);w.reduceDescriptors(Ce.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});w.freezeMethods(Ce);const m0="[REDACTED ****]";function v0(e){if(w.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(w.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function y0(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],i=o=>{if(o===null||typeof o!="object"||w.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof Ce&&(o=o.toJSON()),r.push(o);let s;if(w.isArray(o))s=[],o.forEach((l,u)=>{const a=i(l);w.isUndefined(a)||(s[u]=a)});else{if(!w.isPlainObject(o)&&v0(o))return r.pop(),o;s=Object.create(null);for(const[l,u]of Object.entries(o)){const a=n.has(l.toLowerCase())?m0:i(u);w.isUndefined(a)||(s[l]=a)}}return r.pop(),s};return i(e)}let N=class Nh extends Error{static from(t,n,r,i,o,s){const l=new Nh(t.message,n||t.code,r,i,o);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),s&&Object.assign(l,s),l}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&w.hasOwnProp(t,"redact")?t.redact:void 0,r=w.isArray(n)&&n.length>0?y0(t,n):w.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};N.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";N.ERR_BAD_OPTION="ERR_BAD_OPTION";N.ECONNABORTED="ECONNABORTED";N.ETIMEDOUT="ETIMEDOUT";N.ECONNREFUSED="ECONNREFUSED";N.ERR_NETWORK="ERR_NETWORK";N.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";N.ERR_DEPRECATED="ERR_DEPRECATED";N.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";N.ERR_BAD_REQUEST="ERR_BAD_REQUEST";N.ERR_CANCELED="ERR_CANCELED";N.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";N.ERR_INVALID_URL="ERR_INVALID_URL";N.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const g0=null,Th=100;function Tl(e){return w.isPlainObject(e)||w.isArray(e)}function Lh(e){return w.endsWith(e,"[]")?e.slice(0,-2):e}function Rs(e,t,n){return e?e.concat(t).map(function(i,o){return i=Lh(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function w0(e){return w.isArray(e)&&!e.some(Tl)}const x0=w.toFlatObject(w,{},null,function(t){return/^is[A-Z]/.test(t)});function Ko(e,t,n){if(!w.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=w.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,m){return!w.isUndefined(m[h])});const r=n.metaTokens,i=n.visitor||x,o=n.dots,s=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,u=n.maxDepth===void 0?Th:n.maxDepth,a=l&&w.isSpecCompliantForm(t),c=[];if(!w.isFunction(i))throw new TypeError("visitor must be a function");function f(d){if(d===null)return"";if(w.isDate(d))return d.toISOString();if(w.isBoolean(d))return d.toString();if(!a&&w.isBlob(d))throw new N("Blob is not supported. Use a Buffer instead.");if(w.isArrayBuffer(d)||w.isTypedArray(d)){if(a&&typeof l=="function")return new l([d]);if(typeof Buffer<"u")return Buffer.from(d);throw new N("Blob is not supported. Use a Buffer instead.",N.ERR_NOT_SUPPORT)}return d}function v(d){if(d>u)throw new N("Object is too deeply nested ("+d+" levels). Max depth: "+u,N.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g(d,h){if(u===1/0)return JSON.stringify(d);const m=[];return JSON.stringify(d,function(k,E){if(!w.isObject(E))return E;for(;m.length&&m[m.length-1]!==this;)m.pop();return m.push(E),v(h+m.length-1),E})}function x(d,h,m){let S=d;if(w.isReactNative(t)&&w.isReactNativeBlob(d))return t.append(Rs(m,h,o),f(d)),!1;if(d&&!m&&typeof d=="object"){if(w.endsWith(h,"{}"))h=r?h:h.slice(0,-2),d=g(d,1);else if(w.isArray(d)&&w0(d)||(w.isFileList(d)||w.endsWith(h,"[]"))&&(S=w.toArray(d)))return h=Lh(h),S.forEach(function(E,R){!(w.isUndefined(E)||E===null)&&t.append(s===!0?Rs([h],R,o):s===null?h:h+"[]",f(E))}),!1}return Tl(d)?!0:(t.append(Rs(m,h,o),f(d)),!1)}const y=Object.assign(x0,{defaultVisitor:x,convertValue:f,isVisitable:Tl});function C(d,h,m=0){if(!w.isUndefined(d)){if(v(m),c.indexOf(d)!==-1)throw new Error("Circular reference detected in "+h.join("."));c.push(d),w.forEach(d,function(k,E){(!(w.isUndefined(k)||k===null)&&i.call(t,k,w.isString(E)?E.trim():E,h,y))===!0&&C(k,h?h.concat(E):[E],m+1)}),c.pop()}}if(!w.isObject(e))throw new TypeError("data must be an object");return C(e),t}function gc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Fu(e,t){this._pairs=[],e&&Ko(e,this,t)}const Fh=Fu.prototype;Fh.append=function(t,n){this._pairs.push([t,n])};Fh.toString=function(t){const n=t?r=>t.call(this,r,gc):gc;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function S0(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ah(e,t,n){if(!t)return e;e=e||"";const r=w.isFunction(n)?{serialize:n}:n,i=w.getSafeProp(r,"encode")||S0,o=w.getSafeProp(r,"serialize");let s;if(o?s=o(t,r):s=w.isURLSearchParams(t)?t.toString():new Fu(t,r).toString(i),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class wc{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){w.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Au={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},E0=typeof URLSearchParams<"u"?URLSearchParams:Fu,C0=typeof FormData<"u"?FormData:null,k0=typeof Blob<"u"?Blob:null,R0={isBrowser:!0,classes:{URLSearchParams:E0,FormData:C0,Blob:k0},protocols:["http","https","file","blob","url","data"]},Du=typeof window<"u"&&typeof document<"u",Ll=typeof navigator=="object"&&navigator||void 0,_0=Du&&(!Ll||["ReactNative","NativeScript","NS"].indexOf(Ll.product)<0),O0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",P0=Du&&window.location.href||"http://localhost",j0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Du,hasStandardBrowserEnv:_0,hasStandardBrowserWebWorkerEnv:O0,navigator:Ll,origin:P0},Symbol.toStringTag,{value:"Module"})),me={...j0,...R0};function N0(e,t){return Ko(e,new me.classes.URLSearchParams,{visitor:function(n,r,i,o){return me.isNode&&w.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const xc=Th;function Dh(e){if(e>xc)throw new N("FormData field is too deeply nested ("+e+" levels). Max depth: "+xc,N.ERR_FORM_DATA_DEPTH_EXCEEDED)}function T0(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)Dh(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function L0(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&w.isArray(i)?i.length:s,u?(w.hasOwnProp(i,s)?i[s]=w.isArray(i[s])?i[s].concat(r):[i[s],r]:i[s]=r,!l):((!w.hasOwnProp(i,s)||!w.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&w.isArray(i[s])&&(i[s]=L0(i[s])),!l)}if(w.isFormData(e)&&w.isFunction(e.entries)){const n={};return w.forEachEntry(e,(r,i)=>{t(T0(r),i,n,0)}),n}return null}const Sn=(e,t)=>e!=null&&w.hasOwnProp(e,t)?e[t]:void 0;function F0(e,t,n){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const si={transitional:Au,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=w.isObject(t);if(o&&w.isHTMLForm(t)&&(t=new FormData(t)),w.isFormData(t))return i?JSON.stringify(Ih(t)):t;if(w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t)||w.isReadableStream(t))return t;if(w.isArrayBufferView(t))return t.buffer;if(w.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){const u=Sn(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return N0(t,u).toString();if((l=w.isFileList(t))||r.indexOf("multipart/form-data")>-1){const a=Sn(this,"env"),c=a&&a.FormData;return Ko(l?{"files[]":t}:t,c&&new c,u)}}return o||i?(n.setContentType("application/json",!1),F0(t)):t}],transformResponse:[function(t){const n=Sn(this,"transitional")||si.transitional,r=n&&n.forcedJSONParsing,i=Sn(this,"responseType"),o=i==="json";if(w.isResponse(t)||w.isReadableStream(t))return t;if(t&&w.isString(t)&&(r&&!i||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Sn(this,"parseReviver"))}catch(u){if(l)throw u.name==="SyntaxError"?N.from(u,N.ERR_BAD_RESPONSE,this,null,Sn(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w.forEach(["delete","get","head","post","put","patch","query"],e=>{si.headers[e]={}});function _s(e,t){const n=this||si,r=t||n,i=Ce.from(r.headers);let o=r.data;return w.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Mh(e){return!!(e&&e.__CANCEL__)}let li=class extends N{constructor(t,n,r){super(t??"canceled",N.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Uh(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new N("Request failed with status code "+n.status,n.status>=400&&n.status<500?N.ERR_BAD_REQUEST:N.ERR_BAD_RESPONSE,n.config,n.request,n))}function A0(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function D0(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(u){const a=Date.now(),c=r[o];s||(s=a),n[i]=u,r[i]=a;let f=o,v=0;for(;f!==i;)v+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),a-s{n=c,i=null,o&&(clearTimeout(o),o=null),e(...a)};return[(...a)=>{const c=Date.now(),f=c-n;f>=r?s(a,c):(i=a,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const Ro=(e,t,n=3)=>{let r=0;const i=D0(50,250);return I0(o=>{if(!o||typeof o.loaded!="number")return;const s=o.loaded,l=o.lengthComputable?o.total:void 0,u=l!=null?Math.min(s,l):s,a=Math.max(0,u-r),c=i(a);r=Math.max(r,u);const f={loaded:u,total:l,progress:l?u/l:void 0,bytes:a,rate:c||void 0,estimated:c&&l?(l-u)/c:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},Sc=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ec=e=>(...t)=>w.asap(()=>e(...t)),M0=me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,U0=me.hasStandardBrowserEnv?{write(e,t,n,r,i,o,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];w.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),w.isString(r)&&l.push(`path=${r}`),w.isString(i)&&l.push(`domain=${i}`),o===!0&&l.push("secure"),w.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof Ce?{...e}:e;function mn(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,f,v,g){return w.isPlainObject(c)&&w.isPlainObject(f)?w.merge.call({caseless:g},c,f):w.isPlainObject(f)?w.merge({},f):w.isArray(f)?f.slice():f}function i(c,f,v,g){if(w.isUndefined(f)){if(!w.isUndefined(c))return r(void 0,c,v,g)}else return r(c,f,v,g)}function o(c,f){if(!w.isUndefined(f))return r(void 0,f)}function s(c,f){if(w.isUndefined(f)){if(!w.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function l(c){const f=w.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!w.isUndefined(f))if(w.isPlainObject(f)){if(w.hasOwnProp(f,c))return f[c]}else return;const v=w.hasOwnProp(e,"transitional")?e.transitional:void 0;if(w.isPlainObject(v)&&w.hasOwnProp(v,c))return v[c]}function u(c,f,v){if(w.hasOwnProp(t,v))return r(c,f);if(w.hasOwnProp(e,v))return r(void 0,c)}const a={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:u,headers:(c,f,v)=>i(kc(c),kc(f),v,!0)};return w.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const v=w.hasOwnProp(a,f)?a[f]:i,g=w.hasOwnProp(e,f)?e[f]:void 0,x=w.hasOwnProp(t,f)?t[f]:void 0,y=v(g,x,f);w.isUndefined(y)&&v!==u||(n[f]=y)}),w.hasOwnProp(t,"validateStatus")&&w.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(w.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const q0=["content-type","content-length"];function V0(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{q0.includes(r.toLowerCase())&&e.set(r,i)})}const W0=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function bh(e){const t=mn({},e),n=v=>w.hasOwnProp(t,v)?t[v]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),s=n("xsrfCookieName");let l=n("headers");const u=n("auth"),a=n("baseURL"),c=n("allowAbsoluteUrls"),f=n("url");if(t.headers=l=Ce.from(l),t.url=Ah(zh(a,f,c,t),n("params"),n("paramsSerializer")),u){const v=w.getSafeProp(u,"username")||"",g=w.getSafeProp(u,"password")||"";try{l.set("Authorization","Basic "+btoa(v+":"+(g?W0(g):"")))}catch(x){throw N.from(x,N.ERR_BAD_OPTION_VALUE,e)}}if(w.isFormData(r)&&(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv||w.isReactNative(r)?l.setContentType(void 0):w.isFunction(r.getHeaders)&&V0(l,r.getHeaders(),n("formDataHeaderPolicy"))),me.hasStandardBrowserEnv&&(w.isFunction(i)&&(i=i(t)),i===!0||i==null&&M0(t.url))){const g=o&&s&&U0.read(s);g&&l.set(o,g)}return t}const K0=typeof XMLHttpRequest<"u",X0=K0&&function(e){return new Promise(function(n,r){const i=bh(e);let o=i.data;const s=Ce.from(i.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:a}=i,c,f,v,g,x;function y(){g&&g(),x&&x(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let C=new XMLHttpRequest;C.open(i.method.toUpperCase(),i.url,!0),C.timeout=i.timeout;function d(){if(!C)return;const m=Ce.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),k={data:!l||l==="text"||l==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:m,config:e,request:C};Uh(function(R){n(R),y()},function(R){r(R),y()},k),C=null}"onloadend"in C?C.onloadend=d:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.startsWith("file:"))||setTimeout(d)},C.onabort=function(){C&&(r(new N("Request aborted",N.ECONNABORTED,e,C)),y(),C=null)},C.onerror=function(S){const k=S&&S.message?S.message:"Network Error",E=new N(k,N.ERR_NETWORK,e,C);E.event=S||null,r(E),y(),C=null},C.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const k=i.transitional||Au;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new N(S,k.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,e,C)),y(),C=null},o===void 0&&s.setContentType(null),"setRequestHeader"in C&&w.forEach(jh(s),function(S,k){C.setRequestHeader(k,S)}),w.isUndefined(i.withCredentials)||(C.withCredentials=!!i.withCredentials),l&&l!=="json"&&(C.responseType=i.responseType),a&&([v,x]=Ro(a,!0),C.addEventListener("progress",v)),u&&C.upload&&([f,g]=Ro(u),C.upload.addEventListener("progress",f),C.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(c=m=>{C&&(r(!m||m.type?new li(null,e,C):m),C.abort(),y(),C=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const h=A0(i.url);if(h&&!me.protocols.includes(h)){r(new N("Unsupported protocol "+h+":",N.ERR_BAD_REQUEST,e)),y();return}C.send(o||null)})},J0=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(u){if(!r){r=!0,s();const a=u instanceof Error?u:this.reason;n.abort(a instanceof N?a:new li(a instanceof Error?a.message:a))}};let o=t&&setTimeout(()=>{o=null,i(new N(`timeout of ${t}ms exceeded`,N.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i,{once:!0}));const{signal:l}=n;return l.unsubscribe=()=>w.asap(s),l},G0=function*(e,t){let n=e.byteLength;if(n{const i=Y0(e,t);let o=0,s,l=u=>{s||(s=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:a,value:c}=await i.next();if(a){l(),u.close();return}let f=c.byteLength;if(n){let v=o+=f;n(v)}u.enqueue(new Uint8Array(c))}catch(a){throw l(a),a}},cancel(u){return l(u),i.return()}},{highWaterMark:2})},_o=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,e1=(e,t,n)=>t+2g>=2&&r.charCodeAt(g-2)===37&&r.charCodeAt(g-1)===51&&(r.charCodeAt(g)===68||r.charCodeAt(g)===100);a>=0&&(r.charCodeAt(a)===61?(u++,a--):c(a)&&(u++,a-=3)),u===1&&a>=0&&(r.charCodeAt(a)===61||c(a))&&u++;const v=Math.floor(s/4)*3-(u||0);return v>0?v:0}let o=0;for(let s=0,l=r.length;s=55296&&u<=56319&&s+1=56320&&a<=57343?(o+=4,s++):o+=3}else o+=3}return o}const Iu="1.18.1",_c=64*1024,{isFunction:_i}=w,n1=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Oc=e=>{if(!w.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Pc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},r1=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},i1=e=>{const t=w.global!==void 0&&w.global!==null?w.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=w.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:o,Response:s}=e,l=i?_i(i):typeof fetch=="function",u=_i(o),a=_i(s);if(!l)return!1;const c=l&&_i(n),f=l&&(typeof r=="function"?(d=>h=>d.encode(h))(new r):async d=>new Uint8Array(await new o(d).arrayBuffer())),v=u&&c&&Pc(()=>{let d=!1;const h=new o(me.origin,{body:new n,method:"POST",get duplex(){return d=!0,"half"}}),m=h.headers.has("Content-Type");return h.body!=null&&h.body.cancel(),d&&!m}),g=a&&c&&Pc(()=>w.isReadableStream(new s("").body)),x={stream:g&&(d=>d.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!x[d]&&(x[d]=(h,m)=>{let S=h&&h[d];if(S)return S.call(h);throw new N(`Response type '${d}' is not supported`,N.ERR_NOT_SUPPORT,m)})});const y=async d=>{if(d==null)return 0;if(w.isBlob(d))return d.size;if(w.isSpecCompliantForm(d))return(await new o(me.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(w.isArrayBufferView(d)||w.isArrayBuffer(d))return d.byteLength;if(w.isURLSearchParams(d)&&(d=d+""),w.isString(d))return(await f(d)).byteLength},C=async(d,h)=>{const m=w.toFiniteNumber(d.getContentLength());return m??y(h)};return async d=>{let{url:h,method:m,data:S,signal:k,cancelToken:E,timeout:R,onDownloadProgress:P,onUploadProgress:D,responseType:L,headers:q,withCredentials:ae="same-origin",fetchOptions:ge,maxContentLength:ee,maxBodyLength:De}=bh(d);const oe=w.isNumber(ee)&&ee>-1,Ie=w.isNumber(De)&&De>-1,j=b=>w.hasOwnProp(d,b)?d[b]:void 0;let F=i||fetch;L=L?(L+"").toLowerCase():"text";let A=J0([k,E&&E.toAbortSignal()],R),I=null;const H=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let Ge,Me=null;const wn=()=>new N("Request body larger than maxBodyLength limit",N.ERR_BAD_REQUEST,d,I);try{let b;const de=j("auth");if(de){const M=w.getSafeProp(de,"username")||"",Ue=w.getSafeProp(de,"password")||"";b={username:M,password:Ue}}if(r1(h)){const M=new URL(h,me.origin);if(!b&&(M.username||M.password)){const Ue=Oc(M.username),Rt=Oc(M.password);b={username:Ue,password:Rt}}(M.username||M.password)&&(M.username="",M.password="",h=M.href)}if(b&&(q.delete("authorization"),q.set("Authorization","Basic "+btoa(n1((b.username||"")+":"+(b.password||""))))),oe&&typeof h=="string"&&h.startsWith("data:")&&t1(h)>ee)throw new N("maxContentLength size of "+ee+" exceeded",N.ERR_BAD_RESPONSE,d,I);if(Ie&&m!=="get"&&m!=="head"){const M=await y(S);if(typeof M=="number"&&isFinite(M)&&(Ge=M,M>De))throw wn()}const ui=Ie&&(w.isReadableStream(S)||w.isStream(S)),Uu=(M,Ue,Rt)=>Rc(M,_c,Jt=>{if(Ie&&Jt>De)throw Me=wn();Ue&&Ue(Jt)},Rt);if(v&&m!=="get"&&m!=="head"&&(D||ui)){if(Ge=Ge??await C(q,S),Ge!==0||ui){let M=new o(h,{method:"POST",body:S,duplex:"half"}),Ue;if(w.isFormData(S)&&(Ue=M.headers.get("content-type"))&&q.setContentType(Ue),M.body){const[Rt,Jt]=D&&Sc(Ge,Ro(Ec(D)))||[];S=Uu(M.body,Rt,Jt)}}}else if(ui&&!u&&c&&m!=="get"&&m!=="head")S=Uu(S);else if(ui&&u&&!v&&m!=="get"&&m!=="head")throw new N("Stream request bodies are not supported by the current fetch implementation",N.ERR_NOT_SUPPORT,d,I);w.isString(ae)||(ae=ae?"include":"omit");const qh=u&&"credentials"in o.prototype;if(w.isFormData(S)){const M=q.getContentType();M&&/^multipart\/form-data/i.test(M)&&!/boundary=/i.test(M)&&q.delete("content-type")}q.set("User-Agent","axios/"+Iu,!1);const zu={...ge,signal:A,method:m.toUpperCase(),headers:jh(q.normalize()),body:S,duplex:"half",credentials:qh?ae:void 0};I=u&&new o(h,zu);let ht=await(u?F(I,ge):F(h,zu));const bu=Ce.from(ht.headers);if(oe){const M=w.toFiniteNumber(bu.getContentLength());if(M!=null&&M>ee)throw new N("maxContentLength size of "+ee+" exceeded",N.ERR_BAD_RESPONSE,d,I)}const Jo=g&&(L==="stream"||L==="response");if(g&&ht.body&&(P||oe||Jo&&H)){const M={};["status","statusText","headers"].forEach(ir=>{M[ir]=ht[ir]});const Ue=w.toFiniteNumber(bu.getContentLength()),[Rt,Jt]=P&&Sc(Ue,Ro(Ec(P),!0))||[];let Bu=0;const Vh=ir=>{if(oe&&(Bu=ir,Bu>ee))throw new N("maxContentLength size of "+ee+" exceeded",N.ERR_BAD_RESPONSE,d,I);Rt&&Rt(ir)};ht=new s(Rc(ht.body,_c,Vh,()=>{Jt&&Jt(),H&&H()}),M)}L=L||"text";let pt=await x[w.findKey(x,L)||"text"](ht,d);if(oe&&!g&&!Jo){let M;if(pt!=null&&(typeof pt.byteLength=="number"?M=pt.byteLength:typeof pt.size=="number"?M=pt.size:typeof pt=="string"&&(M=typeof r=="function"?new r().encode(pt).byteLength:pt.length)),typeof M=="number"&&M>ee)throw new N("maxContentLength size of "+ee+" exceeded",N.ERR_BAD_RESPONSE,d,I)}return!Jo&&H&&H(),await new Promise((M,Ue)=>{Uh(M,Ue,{data:pt,headers:Ce.from(ht.headers),status:ht.status,statusText:ht.statusText,config:d,request:I})})}catch(b){if(H&&H(),A&&A.aborted&&A.reason instanceof N){const de=A.reason;throw de.config=d,I&&(de.request=I),b!==de&&Object.defineProperty(de,"cause",{__proto__:null,value:b,writable:!0,enumerable:!1,configurable:!0}),de}if(Me)throw I&&!Me.request&&(Me.request=I),Me;if(b instanceof N)throw I&&!b.request&&(b.request=I),b;if(b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)){const de=new N("Network Error",N.ERR_NETWORK,d,I,b&&b.response);throw Object.defineProperty(de,"cause",{__proto__:null,value:b.cause||b,writable:!0,enumerable:!1,configurable:!0}),de}throw N.from(b,b&&b.code,d,I,b&&b.response)}}},o1=new Map,Bh=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,l=s,u,a,c=o1;for(;l--;)u=o[l],a=c.get(u),a===void 0&&c.set(u,a=l?new Map:i1(t)),c=a;return a};Bh();const Mu={http:g0,xhr:X0,fetch:{get:Bh}};w.forEach(Mu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const jc=e=>`- ${e}`,s1=e=>w.isFunction(e)||e===null||e===!1;function l1(e,t){e=w.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s`adapter ${u} `+(a===!1?"is not supported by the environment":"is not available in the build"));let l=n?s.length>1?`since : `+s.map(jc).join(` `):" "+jc(s[0]):"as no adapter specified";throw new N("There is no suitable adapter to dispatch the request "+l,N.ERR_NOT_SUPPORT)}return i}const $h={getAdapter:l1,adapters:Mu};function Os(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new li(null,e)}function Nc(e){return Os(e),e.headers=Ce.from(e.headers),e.data=_s.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$h.getAdapter(e.adapter||si.adapter,e)(e).then(function(r){Os(e),e.response=r;try{r.data=_s.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Ce.from(r.headers),r},function(r){if(!Mh(r)&&(Os(e),r&&r.response)){e.response=r.response;try{r.response.data=_s.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Ce.from(r.response.headers)}return Promise.reject(r)})}const Xo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xo[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Tc={};Xo.transitional=function(t,n,r){function i(o,s){return"[Axios v"+Iu+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,l)=>{if(t===!1)throw new N(i(s," has been removed"+(n?" in "+n:"")),N.ERR_DEPRECATED);return n&&!Tc[s]&&(Tc[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,l):!0}};Xo.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function u1(e,t,n){if(typeof e!="object"||e===null)throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(s){const l=e[o],u=l===void 0||s(l,o,e);if(u!==!0)throw new N("option "+o+" must be "+u,N.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new N("Unknown option "+o,N.ERR_BAD_OPTION)}}const Hi={assertOptions:u1,validators:Xo},Se=Hi.validators;let un=class{constructor(t){this.defaults=t||{},this.interceptors={request:new wc,response:new wc}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=(()=>{if(!i.stack)return"";const s=i.stack.indexOf(` `);return s===-1?"":i.stack.slice(s+1)})();try{if(!r.stack)r.stack=o;else if(o){const s=o.indexOf(` `),l=s===-1?-1:o.indexOf(` `,s+1),u=l===-1?"":o.slice(l+1);String(r.stack).endsWith(u)||(r.stack+=` `+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Hi.assertOptions(r,{silentJSONParsing:Se.transitional(Se.boolean),forcedJSONParsing:Se.transitional(Se.boolean),clarifyTimeoutError:Se.transitional(Se.boolean),legacyInterceptorReqResOrdering:Se.transitional(Se.boolean),advertiseZstdAcceptEncoding:Se.transitional(Se.boolean),validateStatusUndefinedResolves:Se.transitional(Se.boolean)},!1),i!=null&&(w.isFunction(i)?n.paramsSerializer={serialize:i}:Hi.assertOptions(i,{encode:Se.function,serialize:Se.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Hi.assertOptions(n,{baseUrl:Se.spelling("baseURL"),withXsrfToken:Se.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&w.merge(o.common,o[n.method]);o&&w.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete o[x]}),n.headers=Ce.concat(s,o);const l=[];let u=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(n)===!1)return;u=u&&y.synchronous;const C=n.transitional||Au;C&&C.legacyInterceptorReqResOrdering?l.unshift(y.fulfilled,y.rejected):l.push(y.fulfilled,y.rejected)});const a=[];this.interceptors.response.forEach(function(y){a.push(y.fulfilled,y.rejected)});let c,f=0,v;if(!u){const x=[Nc.bind(this),void 0];for(x.unshift(...l),x.push(...a),v=x.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new li(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Qh(function(i){t=i}),cancel:t}}};function c1(e){return function(n){return e.apply(null,n)}}function f1(e){return w.isObject(e)&&e.isAxiosError===!0}const Fl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Fl).forEach(([e,t])=>{Fl[t]=e});function Hh(e){const t=new un(e),n=xh(un.prototype.request,t);return w.extend(n,un.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Hh(mn(e,i))},n}const B=Hh(si);B.Axios=un;B.CanceledError=li;B.CancelToken=a1;B.isCancel=Mh;B.VERSION=Iu;B.toFormData=Ko;B.AxiosError=N;B.Cancel=B.CanceledError;B.all=function(t){return Promise.all(t)};B.spread=c1;B.isAxiosError=f1;B.mergeConfig=mn;B.AxiosHeaders=Ce;B.formToJSON=e=>Ih(w.isHTMLForm(e)?new FormData(e):e);B.getAdapter=$h.getAdapter;B.HttpStatusCode=Fl;B.default=B;const{Axios:k1,AxiosError:R1,CanceledError:_1,isCancel:O1,CancelToken:P1,VERSION:j1,all:N1,Cancel:T1,isAxiosError:L1,spread:F1,toFormData:A1,AxiosHeaders:D1,HttpStatusCode:I1,formToJSON:M1,getAdapter:U1,mergeConfig:z1,create:b1}=B,Lc="/api/cc";function d1(){var s,l;const{data:e,isLoading:t}=it("dashboard",()=>B.get(`${Lc}/dashboard`).then(u=>u.data)),{data:n}=it("kpi",()=>B.get(`${Lc}/dashboard/kpi`).then(u=>u.data));if(t)return p.jsx("div",{className:"loading",children:"Laddar dashboard..."});const r=(n==null?void 0:n.data)||{},i=((s=e==null?void 0:e.data)==null?void 0:s.alerts)||[],o=((l=e==null?void 0:e.data)==null?void 0:l.services)||[];return p.jsxs("div",{children:[p.jsxs("div",{className:"kpi-grid",children:[p.jsx(pr,{value:r.cash_balance,label:"Kassa (SEK)",format:"sek"}),p.jsx(pr,{value:r.missions_count,label:"Missions"}),p.jsx(pr,{value:r.journal_entries,label:"Verifikat"}),p.jsx(pr,{value:`${r.services_running}/${r.services_total}`,label:"Tjänster"}),p.jsx(pr,{value:r.tickets_open,label:"Ärenden"})]}),p.jsxs("div",{className:"card",children:[p.jsx("h3",{children:"🚨 Kritiska åtgärder"}),i.length===0?p.jsxs("div",{className:"alert info",children:[p.jsx(ig,{size:20,color:"var(--green)"}),p.jsxs("div",{children:[p.jsx("strong",{children:"Allt ser bra ut"}),p.jsx("br",{}),"Inga kritiska ärenden just nu"]})]}):i.map((u,a)=>p.jsxs("div",{className:`alert ${u.level}`,children:[u.level==="critical"&&p.jsx(pc,{size:20,color:"var(--red)"}),u.level==="warning"&&p.jsx(pc,{size:20,color:"var(--yellow)"}),u.level==="info"&&p.jsx(sg,{size:20,color:"#007AFF"}),p.jsxs("div",{children:[p.jsx("strong",{children:u.title}),p.jsx("br",{}),u.message]})]},a))]}),p.jsxs("div",{className:"card",children:[p.jsx("h3",{children:"🖥️ Systemstatus"}),o.map(u=>p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 0",borderBottom:"1px solid var(--border)"},children:[p.jsxs("div",{children:[p.jsx("div",{style:{fontWeight:600},children:u.name}),p.jsxs("div",{style:{fontSize:"0.8rem",color:"var(--muted)"},children:["Port ",u.port," ",u.response_time_ms&&`• ${u.response_time_ms}ms`]})]}),p.jsx("span",{className:`badge ${u.status==="running"?"green":"red"}`,children:u.status})]},u.name))]})]})}function pr({value:e,label:t,format:n}){const r=n==="sek"?new Intl.NumberFormat("sv-SE").format(e||0)+" kr":e||"--",i=n==="sek"&&e<0;return p.jsxs("div",{className:"kpi-card",children:[p.jsx("div",{className:`kpi-value ${i?"bad":""}`,children:r}),p.jsx("div",{className:"kpi-label",children:t})]})}const Fc="/api/cc";function h1(){const[e,t]=O.useState(""),[n,r]=O.useState("all"),{data:i,isLoading:o}=it("economy",()=>B.get(`${Fc}/economy/overview`).then(y=>y.data)),{data:s}=it("trial-balance",()=>B.get(`${Fc}/economy/trial-balance`).then(y=>y.data)),{data:l}=it("journal",()=>B.get("/api/ledger/journal").then(y=>y.data)),u=(i==null?void 0:i.accounts)||[],a=(i==null?void 0:i.summary)||{},c=(l==null?void 0:l.entries)||[];let f=u;n!=="all"&&(f=u.filter(y=>y.type===n));let v=c;if(e){const y=e.toLowerCase();v=c.filter(C=>{var d,h,m;return((d=C.description)==null?void 0:d.toLowerCase().includes(y))||((h=C.entry_number)==null?void 0:h.toString().includes(y))||((m=C.entry_date)==null?void 0:m.includes(y))})}const g=u.find(y=>y.account_number==="1930"),x=g?g.balance:0;return o?p.jsx("div",{className:"loading",children:"Laddar ekonomi..."}):p.jsxs("div",{children:[p.jsxs("div",{className:"kpi-grid",children:[p.jsxs("div",{className:"kpi-card",children:[p.jsxs("div",{className:`kpi-value ${x<0?"bad":""}`,children:[new Intl.NumberFormat("sv-SE").format(x)," kr"]}),p.jsx("div",{className:"kpi-label",children:"Bank (1930)"})]}),p.jsxs("div",{className:"kpi-card",children:[p.jsx("div",{className:"kpi-value",children:a.total_accounts||0}),p.jsx("div",{className:"kpi-label",children:"Konton"})]}),p.jsxs("div",{className:"kpi-card",children:[p.jsx("div",{className:"kpi-value",children:a.total_entries||0}),p.jsx("div",{className:"kpi-label",children:"Verifikat"})]}),p.jsxs("div",{className:"kpi-card",children:[p.jsx("div",{className:"kpi-value",children:a.total_periods||0}),p.jsx("div",{className:"kpi-label",children:"Perioder"})]})]}),x<0&&p.jsxs("div",{className:"alert critical",children:[p.jsx("span",{style:{fontSize:"1.3rem"},children:"🏦"}),p.jsxs("div",{children:[p.jsx("strong",{children:"Bankövertrassering"}),p.jsx("br",{}),"Konto 1930: ",new Intl.NumberFormat("sv-SE").format(x)," kr"]})]}),p.jsxs("div",{className:"card",children:[p.jsx("h3",{children:"🔍 Sök verifikat"}),p.jsx("input",{type:"text",placeholder:"Sök beskrivning, konto, belopp, datum...",value:e,onChange:y=>t(y.target.value)})]}),p.jsxs("div",{className:"card",children:[p.jsx("h3",{children:"🏦 Konton"}),p.jsx("div",{style:{display:"flex",gap:8,marginBottom:16,overflowX:"auto"},children:["all","asset","liability","income","expense","equity"].map(y=>p.jsx("button",{onClick:()=>r(y),className:"btn secondary",style:{background:n===y?"var(--navy)":"var(--bg)",color:n===y?"white":"var(--navy)",padding:"6px 12px",fontSize:"0.8rem"},children:y==="all"?"Alla":y==="asset"?"Tillgångar":y==="liability"?"Skulder":y==="income"?"Intäkter":y==="expense"?"Kostnader":"Eget kapital"},y))}),f.map(y=>p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 0",borderBottom:"1px solid var(--border)"},children:[p.jsxs("div",{children:[p.jsxs("div",{style:{fontWeight:600},children:[y.account_number," ",y.name]}),p.jsx("div",{style:{fontSize:"0.8rem",color:"var(--muted)"},children:y.type})]}),p.jsxs("div",{style:{fontWeight:700,color:y.balance<0?"var(--red)":y.balance>0?"var(--green)":"var(--muted)"},children:[new Intl.NumberFormat("sv-SE").format(y.balance)," kr"]})]},y.account_number))]}),s&&p.jsxs("div",{className:"card",children:[p.jsx("h3",{children:"📊 Saldobalans"}),p.jsxs("div",{style:{display:"flex",gap:16,marginBottom:16},children:[p.jsxs("div",{children:[p.jsx("div",{style:{fontSize:"0.8rem",color:"var(--muted)"},children:"Total Debet"}),p.jsxs("div",{style:{fontWeight:700},children:[new Intl.NumberFormat("sv-SE").format(s.total_debit||0)," kr"]})]}),p.jsxs("div",{children:[p.jsx("div",{style:{fontSize:"0.8rem",color:"var(--muted)"},children:"Total Kredit"}),p.jsxs("div",{style:{fontWeight:700},children:[new Intl.NumberFormat("sv-SE").format(s.total_credit||0)," kr"]})]}),p.jsxs("div",{children:[p.jsx("div",{style:{fontSize:"0.8rem",color:"var(--muted)"},children:"Status"}),p.jsx("span",{className:`badge ${s.balanced?"green":"yellow"}`,children:s.balanced?"Balanserad":"Obalanserad"})]})]})]}),p.jsxs("div",{className:"card",children:[p.jsxs("h3",{children:["📋 Verifikat (",v.length,")"]}),v.slice(-20).reverse().map(y=>p.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 0",borderBottom:"1px solid var(--border)"},children:p.jsxs("div",{children:[p.jsxs("div",{style:{fontWeight:600},children:["#",y.entry_number||"-"," ",y.description]}),p.jsxs("div",{style:{fontSize:"0.8rem",color:"var(--muted)"},children:[y.entry_date," • ",y.period," • ",y.status]})]})},y.id))]}),p.jsxs("div",{className:"card",children:[p.jsx("h3",{children:"🔗 Export"}),p.jsx("a",{href:"/api/ledger/export/sie4?fiscal_year=2026",target:"_blank",className:"btn",children:"📥 SIE4 Export 2026"})]})]})}const p1="/api/quixzoom";function m1(){const[e,t]=O.useState(""),[n,r]=O.useState("all"),{data:i}=it("missions",()=>B.get(`${p1}/missions`).then(c=>c.data)),o=(i==null?void 0:i.missions)||[];let s=o;if(n!=="all"&&(s=o.filter(c=>c.status===n)),e){const c=e.toLowerCase();s=o.filter(f=>{var v,g,x;return((v=f.title)==null?void 0:v.toLowerCase().includes(c))||((g=f.address)==null?void 0:g.toLowerCase().includes(c))||((x=f.status)==null?void 0:x.includes(c))})}const l=o.filter(c=>c.status==="open").length,u=o.filter(c=>c.status==="assigned").length,a=o.reduce((c,f)=>c+(f.reward_sek||0),0);return p.jsxs("div",{children:[p.jsxs("div",{className:"kpi-grid",children:[p.jsxs("div",{className:"kpi-card",children:[p.jsx("div",{className:"kpi-value",children:o.length}),p.jsx("div",{className:"kpi-label",children:"Missions"})]}),p.jsxs("div",{className:"kpi-card",children:[p.jsx("div",{className:"kpi-value",children:l}),p.jsx("div",{className:"kpi-label",children:"Öppna"})]}),p.jsxs("div",{className:"kpi-card",children:[p.jsx("div",{className:"kpi-value",children:u}),p.jsx("div",{className:"kpi-label",children:"Tilldelade"})]}),p.jsxs("div",{className:"kpi-card",children:[p.jsxs("div",{className:"kpi-value",children:[new Intl.NumberFormat("sv-SE").format(a)," kr"]}),p.jsx("div",{className:"kpi-label",children:"Reward-pool"})]})]}),p.jsxs("div",{className:"card",children:[p.jsx("h3",{children:"🔍 Sök missions"}),p.jsx("input",{type:"text",placeholder:"Sök titel, adress, status...",value:e,onChange:c=>t(c.target.value)})]}),p.jsxs("div",{className:"card",children:[p.jsx("h3",{children:"📱 Missions"}),p.jsx("div",{style:{display:"flex",gap:8,marginBottom:16,overflowX:"auto"},children:["all","open","assigned","submitted","approved"].map(c=>p.jsx("button",{onClick:()=>r(c),className:"btn secondary",style:{background:n===c?"var(--navy)":"var(--bg)",color:n===c?"white":"var(--navy)"},children:c==="all"?"Alla":c==="open"?"Öppna":c==="assigned"?"Tilldelade":c==="submitted"?"Inskickade":"Godkända"},c))}),s.map(c=>p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 0",borderBottom:"1px solid var(--border)",cursor:"pointer"},children:[p.jsxs("div",{children:[p.jsx("div",{style:{fontWeight:600},children:c.title}),p.jsxs("div",{style:{fontSize:"0.8rem",color:"var(--muted)"},children:[c.address," • ",new Intl.NumberFormat("sv-SE").format(c.reward_sek)," kr",c.zoomer_id&&` • Zoomer: ${c.zoomer_id}`]})]}),p.jsx("span",{className:`badge ${c.status==="open"?"green":c.status==="assigned"?"blue":c.status==="submitted"?"yellow":"green"}`,children:c.status})]},c.id))]})]})}const Ac="/api/cc";function v1(){const[e,t]=O.useState(!1),[n,r]=O.useState("all"),i=Qo(),{data:o}=it("tickets",()=>B.get(`${Ac}/tickets`).then(f=>f.data)),s=Rl(f=>B.post(`${Ac}/tickets`,f),{onSuccess:()=>{i.invalidateQueries("tickets"),t(!1)}}),l=(o==null?void 0:o.tickets)||[];let u=l;n==="open"&&(u=l.filter(f=>f.status==="open")),n==="critical"&&(u=l.filter(f=>f.priority==="critical"&&f.status==="open")),n==="resolved"&&(u=l.filter(f=>f.status==="resolved"));const a=l.filter(f=>f.status==="open").length,c=l.filter(f=>f.priority==="critical"&&f.status==="open").length;return p.jsxs("div",{children:[p.jsxs("div",{className:"kpi-grid",children:[p.jsxs("div",{className:"kpi-card",children:[p.jsx("div",{className:"kpi-value",children:a}),p.jsx("div",{className:"kpi-label",children:"Öppna"})]}),p.jsxs("div",{className:"kpi-card",children:[p.jsx("div",{className:"kpi-value",style:{color:"var(--red)"},children:c}),p.jsx("div",{className:"kpi-label",children:"Kritiska"})]}),p.jsxs("div",{className:"kpi-card",children:[p.jsx("div",{className:"kpi-value",children:l.length}),p.jsx("div",{className:"kpi-label",children:"Totalt"})]})]}),p.jsxs("div",{className:"card",children:[p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[p.jsx("h3",{style:{margin:0},children:"📋 Supportärenden"}),p.jsx("button",{className:"btn",onClick:()=>t(!0),children:"➕ Nytt ärende"})]}),p.jsx("div",{style:{display:"flex",gap:8,marginBottom:16},children:["all","open","critical","resolved"].map(f=>p.jsx("button",{onClick:()=>r(f),className:"btn secondary",style:{background:n===f?"var(--navy)":"var(--bg)",color:n===f?"white":"var(--navy)",padding:"6px 12px",fontSize:"0.8rem"},children:f==="all"?"Alla":f==="open"?"Öppna":f==="critical"?"Kritiska":"Lösta"},f))}),u.map(f=>p.jsxs("div",{style:{border:"1px solid var(--border)",borderRadius:8,padding:16,marginBottom:12},children:[p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[p.jsx("div",{style:{fontWeight:600},children:f.ticket_number}),p.jsxs("div",{style:{display:"flex",gap:8},children:[p.jsx("span",{className:`badge ${f.priority==="critical"?"red":f.priority==="high"?"yellow":"blue"}`,children:f.priority}),p.jsx("span",{className:`badge ${f.status==="resolved"?"green":"yellow"}`,children:f.status})]})]}),p.jsx("div",{style:{fontWeight:600,marginBottom:4},children:f.title}),p.jsx("div",{style:{fontSize:"0.85rem",color:"var(--muted)",marginBottom:8},children:f.description}),p.jsxs("div",{style:{fontSize:"0.8rem",color:"var(--muted)"},children:[f.zoomer_id&&`Zoomer: ${f.zoomer_id} • `,f.mission_id&&`Mission: ${f.mission_id} • `,new Date(f.created_at).toLocaleString("sv-SE")]})]},f.id))]}),e&&p.jsx("div",{className:"modal-overlay",onClick:()=>t(!1),children:p.jsxs("div",{className:"modal-content",onClick:f=>f.stopPropagation(),children:[p.jsx("h2",{children:"🎫 Nytt supportärende"}),p.jsxs("form",{onSubmit:f=>{f.preventDefault();const v=new FormData(f.target);s.mutate({type:v.get("type"),priority:v.get("priority"),title:v.get("title"),description:v.get("description"),zoomer_id:v.get("zoomer_id")||null,mission_id:v.get("mission_id")||null})},children:[p.jsxs("div",{className:"form-group",children:[p.jsx("label",{children:"Titel"}),p.jsx("input",{name:"title",required:!0})]}),p.jsxs("div",{className:"form-group",children:[p.jsx("label",{children:"Beskrivning"}),p.jsx("textarea",{name:"description",rows:3,required:!0})]}),p.jsxs("div",{className:"form-group",children:[p.jsx("label",{children:"Typ"}),p.jsxs("select",{name:"type",children:[p.jsx("option",{value:"payment",children:"Betalningsfråga"}),p.jsx("option",{value:"mission",children:"Mission-problem"}),p.jsx("option",{value:"account",children:"Kontoåtkomst"}),p.jsx("option",{value:"technical",children:"Tekniskt fel"}),p.jsx("option",{value:"other",children:"Annat"})]})]}),p.jsxs("div",{className:"form-group",children:[p.jsx("label",{children:"Prioritet"}),p.jsxs("select",{name:"priority",children:[p.jsx("option",{value:"low",children:"Låg"}),p.jsx("option",{value:"medium",selected:!0,children:"Medium"}),p.jsx("option",{value:"high",children:"Hög"}),p.jsx("option",{value:"critical",children:"Kritisk"})]})]}),p.jsxs("div",{className:"form-group",children:[p.jsx("label",{children:"Zoomer ID (valfritt)"}),p.jsx("input",{name:"zoomer_id"})]}),p.jsxs("div",{className:"form-group",children:[p.jsx("label",{children:"Mission ID (valfritt)"}),p.jsx("input",{name:"mission_id"})]}),p.jsxs("div",{style:{display:"flex",gap:12},children:[p.jsx("button",{type:"submit",className:"btn",children:"💾 Spara"}),p.jsx("button",{type:"button",className:"btn secondary",onClick:()=>t(!1),children:"Avbryt"})]})]})]})})]})}const Dc="/api/gateway";function y1(){const[e,t]=O.useState("59.3349"),[n,r]=O.useState("18.0632"),[i,o]=O.useState("business"),[s,l]=O.useState(null),{data:u}=it("gateway",()=>B.get(`${Dc}/`).then(c=>c.data).catch(()=>null)),a=async()=>{try{const c=await B.get(`${Dc}/v1/intelligence/point?lat=${e}&lng=${n}&profile=${i}`);l(c.data)}catch(c){l({error:c.message})}};return p.jsxs("div",{children:[p.jsxs("div",{className:"card",children:[p.jsx("h3",{children:"🌍 Landvex Intelligence API"}),p.jsx("p",{style:{color:"var(--muted)",fontSize:"0.9rem",marginBottom:16},children:(u==null?void 0:u.description)||"Control Intelligence"}),(u==null?void 0:u.endpoints)&&p.jsxs("div",{style:{marginBottom:16},children:[p.jsx("strong",{children:"Endpoints:"}),u.endpoints.map((c,f)=>p.jsx("div",{style:{fontFamily:"monospace",fontSize:"0.8rem",background:"var(--bg)",padding:"4px 8px",borderRadius:4,margin:"4px 0"},children:c},f))]})]}),p.jsxs("div",{className:"card",children:[p.jsx("h3",{children:"🔍 Testa Intelligence"}),p.jsxs("div",{className:"form-group",children:[p.jsx("label",{children:"Latitud"}),p.jsx("input",{type:"number",value:e,onChange:c=>t(c.target.value),step:"0.0001"})]}),p.jsxs("div",{className:"form-group",children:[p.jsx("label",{children:"Longitud"}),p.jsx("input",{type:"number",value:n,onChange:c=>r(c.target.value),step:"0.0001"})]}),p.jsxs("div",{className:"form-group",children:[p.jsx("label",{children:"Profil"}),p.jsxs("select",{value:i,onChange:c=>o(c.target.value),children:[p.jsx("option",{value:"business",children:"Business"}),p.jsx("option",{value:"infrastructure",children:"Infrastructure"}),p.jsx("option",{value:"safety",children:"Safety"}),p.jsx("option",{value:"investment",children:"Investment"}),p.jsx("option",{value:"nightlife",children:"Nightlife"}),p.jsx("option",{value:"tourist",children:"Tourist"})]})]}),p.jsx("button",{className:"btn",onClick:a,children:"🔍 Analysera plats"}),s&&p.jsx("pre",{style:{marginTop:16,background:"var(--bg)",padding:16,borderRadius:8,overflow:"auto",fontSize:"0.8rem"},children:JSON.stringify(s,null,2)})]})]})}const mr="/api/cc";function g1(){var k;const e=Qo(),[t,n]=O.useState(""),[r,i]=O.useState(!1),[o,s]=O.useState({description:"",date:new Date().toISOString().split("T")[0],lines:[{account:"",debit:"",credit:""},{account:"",debit:"",credit:""}]}),{data:l}=it("services",()=>B.get(`${mr}/services`).then(E=>E.data),{refetchInterval:1e4}),{data:u}=it("economy-systems",()=>B.get(`${mr}/economy/overview`).then(E=>E.data)),{data:a}=it("journal-systems",()=>B.get(`${mr}/journal`).then(E=>E.data)),c=(l==null?void 0:l.services)||[],f=(a==null?void 0:a.entries)||[],v=Rl(async({service:E,action:R})=>(n(`Kör ${R} på ${E}...`),(await B.post(`${mr}/system/action`,{service:E,action:R})).data),{onSuccess:()=>{e.invalidateQueries("services"),n("Klart!"),setTimeout(()=>n(""),3e3)},onError:E=>{n(`Fel: ${E.message}`)}}),g=Rl(async E=>{const R={description:E.description,entry_date:E.date,fiscal_year:parseInt(E.date.split("-")[0]),period:E.date.substring(0,7),lines:E.lines.filter(D=>D.account&&(D.debit||D.credit)).map(D=>({account_number:D.account,debit:parseInt(D.debit)||0,credit:parseInt(D.credit)||0,description:E.description}))};return(await B.post(`${mr}/journal`,R)).data},{onSuccess:()=>{e.invalidateQueries("economy-systems"),e.invalidateQueries("journal-systems"),i(!1),s({description:"",date:new Date().toISOString().split("T")[0],lines:[{account:"",debit:"",credit:""},{account:"",debit:"",credit:""}]}),n("Verifikat bokfört!"),setTimeout(()=>n(""),3e3)}}),x=()=>{s({...o,lines:[...o.lines,{account:"",debit:"",credit:""}]})},y=(E,R,P)=>{const D=[...o.lines];D[E][R]=P,s({...o,lines:D})},C=o.lines.reduce((E,R)=>E+(parseInt(R.debit)||0),0),d=o.lines.reduce((E,R)=>E+(parseInt(R.credit)||0),0),h=C===d&&C>0,m=(k=u==null?void 0:u.accounts)==null?void 0:k.find(E=>E.account_number==="1930"),S=m?m.balance:0;return p.jsxs("div",{children:[p.jsx("h2",{children:"⚙️ System & Operationer"}),t&&p.jsx("div",{className:"alert info",style:{marginBottom:16},children:t}),S<0&&p.jsxs("div",{className:"alert critical",children:[p.jsx("span",{style:{fontSize:"1.3rem"},children:"🏦"}),p.jsxs("div",{children:[p.jsx("strong",{children:"Bankövertrassering"}),p.jsx("br",{}),"Konto 1930: ",new Intl.NumberFormat("sv-SE").format(S)," kr"]})]}),p.jsxs("div",{className:"card",children:[p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[p.jsx("h3",{children:"➕ Nytt verifikat"}),p.jsx("button",{onClick:()=>i(!r),className:"btn",children:r?"Avbryt":"Skapa"})]}),r&&p.jsxs("div",{children:[p.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,marginBottom:12},children:[p.jsxs("div",{children:[p.jsx("label",{children:"Beskrivning"}),p.jsx("input",{type:"text",value:o.description,onChange:E=>s({...o,description:E.target.value}),placeholder:"t.ex. Faktura #123"})]}),p.jsxs("div",{children:[p.jsx("label",{children:"Datum"}),p.jsx("input",{type:"date",value:o.date,onChange:E=>s({...o,date:E.target.value})})]})]}),p.jsxs("table",{style:{width:"100%",fontSize:"0.9rem"},children:[p.jsx("thead",{children:p.jsxs("tr",{style:{textAlign:"left",borderBottom:"2px solid var(--border)"},children:[p.jsx("th",{children:"Konto"}),p.jsx("th",{children:"Debet"}),p.jsx("th",{children:"Kredit"}),p.jsx("th",{})]})}),p.jsx("tbody",{children:o.lines.map((E,R)=>p.jsxs("tr",{children:[p.jsx("td",{children:p.jsx("input",{type:"text",value:E.account,onChange:P=>y(R,"account",P.target.value),placeholder:"t.ex. 1930",style:{width:80}})}),p.jsx("td",{children:p.jsx("input",{type:"number",value:E.debit,onChange:P=>y(R,"debit",P.target.value),placeholder:"0",style:{width:100}})}),p.jsx("td",{children:p.jsx("input",{type:"number",value:E.credit,onChange:P=>y(R,"credit",P.target.value),placeholder:"0",style:{width:100}})}),p.jsx("td",{children:R>=2&&p.jsx("button",{onClick:()=>s({...o,lines:o.lines.filter((P,D)=>D!==R)}),className:"btn secondary",style:{padding:"4px 8px",fontSize:"0.7rem"},children:"Ta bort"})})]},R))})]}),p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:12},children:[p.jsx("button",{onClick:x,className:"btn secondary",children:"+ Rad"}),p.jsxs("div",{style:{textAlign:"right"},children:[p.jsxs("div",{style:{fontSize:"0.8rem",color:"var(--muted)"},children:["Debet: ",C.toLocaleString("sv-SE")," kr | Kredit: ",d.toLocaleString("sv-SE")," kr"]}),p.jsx("div",{style:{fontWeight:700,color:h?"var(--green)":"var(--red)"},children:h?"✅ Balanserad":"❌ Obalanserad"})]})]}),p.jsx("button",{onClick:()=>g.mutate(o),disabled:!h||!o.description,className:"btn",style:{width:"100%",marginTop:12},children:g.isLoading?"Bokför...":"Bokför verifikat"})]})]}),p.jsxs("div",{className:"card",children:[p.jsx("h3",{children:"📋 Senaste verifikat"}),f.slice(0,10).map(E=>{var R,P;return p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 0",borderBottom:"1px solid var(--border)"},children:[p.jsxs("div",{children:[p.jsxs("div",{style:{fontWeight:600},children:["#",E.entry_number," ",E.description]}),p.jsxs("div",{style:{fontSize:"0.8rem",color:"var(--muted)"},children:[E.entry_date," • ",((R=E.lines)==null?void 0:R.length)||0," rader"]})]}),p.jsxs("div",{style:{fontSize:"0.8rem",color:"var(--muted)"},children:[(P=E.lines)==null?void 0:P.reduce((D,L)=>D+(L.debit||0),0).toLocaleString("sv-SE")," kr"]})]},E.id)})]}),p.jsxs("div",{className:"card",children:[p.jsxs("h3",{children:["🔧 Tjänster (",c.filter(E=>E.status==="running").length," running)"]}),c.map(E=>p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid var(--border)"},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:E.status==="running"?"var(--green)":"var(--red)",display:"inline-block"}}),p.jsx("div",{style:{fontSize:"0.85rem"},children:E.name.replace(".service","")})]}),p.jsxs("div",{style:{display:"flex",gap:4},children:[p.jsx("button",{onClick:()=>v.mutate({service:E.name,action:"restart"}),className:"btn secondary",style:{padding:"2px 6px",fontSize:"0.7rem"},children:"🔄"}),p.jsx("button",{onClick:()=>v.mutate({service:E.name,action:"stop"}),className:"btn secondary",style:{padding:"2px 6px",fontSize:"0.7rem"},children:"⏹"})]})]},E.name))]})]})}function w1(){return p.jsx(hg,{children:p.jsxs(by,{children:[p.jsx(Zt,{path:"/",element:p.jsx(d1,{})}),p.jsx(Zt,{path:"/finance",element:p.jsx(h1,{})}),p.jsx(Zt,{path:"/quixzoom",element:p.jsx(m1,{})}),p.jsx(Zt,{path:"/support",element:p.jsx(v1,{})}),p.jsx(Zt,{path:"/apis",element:p.jsx(y1,{})}),p.jsx(Zt,{path:"/systems",element:p.jsx(g1,{})})]})})}const x1=new zv({defaultOptions:{queries:{refetchInterval:3e4,staleTime:1e4}}});Ps.createRoot(document.getElementById("root")).render(p.jsx(ie.StrictMode,{children:p.jsx(qv,{client:x1,children:p.jsx(Ky,{children:p.jsx(w1,{})})})})); //# sourceMappingURL=index-dtAml4Xa.js.map