const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Leads-BslN9fC9.js","assets/extract-BrmgE3YG.js","assets/x-DNZhsXYo.js","assets/search-7suDLq6i.js","assets/LeadDetail-DmwovjY5.js","assets/ErrorState-DZfY9b6v.js","assets/Pipeline-DU6qmhJT.js"])))=>i.map(i=>d[i]); var _m=Object.defineProperty;var tc=e=>{throw TypeError(e)};var Om=(e,t,n)=>t in e?_m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bl=(e,t,n)=>Om(e,typeof t!="symbol"?t+"":t,n),Bl=(e,t,n)=>t.has(e)||tc("Cannot "+n);var w=(e,t,n)=>(Bl(e,t,"read from private field"),n?n.call(e):t.get(e)),F=(e,t,n)=>t.has(e)?tc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),L=(e,t,n,r)=>(Bl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),$=(e,t,n)=>(Bl(e,t,"access private method"),n);var ii=(e,t,n,r)=>({set _(s){L(e,t,s,n)},get _(){return w(e,t,r)}});function Tm(e,t){for(var n=0;nr[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Lm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fd={exports:{}},gl={},dd={exports:{}},U={};/** * @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 Vs=Symbol.for("react.element"),Am=Symbol.for("react.portal"),Fm=Symbol.for("react.fragment"),Im=Symbol.for("react.strict_mode"),Mm=Symbol.for("react.profiler"),Dm=Symbol.for("react.provider"),Um=Symbol.for("react.context"),zm=Symbol.for("react.forward_ref"),$m=Symbol.for("react.suspense"),bm=Symbol.for("react.memo"),Bm=Symbol.for("react.lazy"),nc=Symbol.iterator;function Hm(e){return e===null||typeof e!="object"?null:(e=nc&&e[nc]||e["@@iterator"],typeof e=="function"?e:null)}var hd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pd=Object.assign,md={};function Hr(e,t,n){this.props=e,this.context=t,this.refs=md,this.updater=n||hd}Hr.prototype.isReactComponent={};Hr.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")};Hr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function yd(){}yd.prototype=Hr.prototype;function Ha(e,t,n){this.props=e,this.context=t,this.refs=md,this.updater=n||hd}var Qa=Ha.prototype=new yd;Qa.constructor=Ha;pd(Qa,Hr.prototype);Qa.isPureReactComponent=!0;var rc=Array.isArray,gd=Object.prototype.hasOwnProperty,Va={current:null},vd={key:!0,ref:!0,__self:!0,__source:!0};function wd(e,t,n){var r,s={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)gd.call(t,r)&&!vd.hasOwnProperty(r)&&(s[r]=t[r]);var o=arguments.length-2;if(o===1)s.children=n;else if(1>>1,J=O[H];if(0>>1;Hs(rr,D))Nns(si,rr)?(O[H]=si,O[Nn]=D,H=Nn):(O[H]=rr,O[Je]=D,H=Je);else if(Nns(si,D))O[H]=si,O[Nn]=D,H=Nn;else break e}}return I}function s(O,I){var D=O.sortIndex-I.sortIndex;return D!==0?D:O.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var a=[],u=[],f=1,c=null,y=3,E=!1,v=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(O){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=O)r(u),I.sortIndex=I.expirationTime,t(a,I);else break;I=n(u)}}function g(O){if(x=!1,h(O),!v)if(n(a)!==null)v=!0,Ae(N);else{var I=n(u);I!==null&&nr(g,I.startTime-O)}}function N(O,I){v=!1,x&&(x=!1,p(_),_=-1),E=!0;var D=y;try{for(h(I),c=n(a);c!==null&&(!(c.expirationTime>I)||O&&!W());){var H=c.callback;if(typeof H=="function"){c.callback=null,y=c.priorityLevel;var J=H(c.expirationTime<=I);I=e.unstable_now(),typeof J=="function"?c.callback=J:c===n(a)&&r(a),h(I)}else r(a);c=n(a)}if(c!==null)var bt=!0;else{var Je=n(u);Je!==null&&nr(g,Je.startTime-I),bt=!1}return bt}finally{c=null,y=D,E=!1}}var R=!1,j=null,_=-1,z=5,T=-1;function W(){return!(e.unstable_now()-TO||125H?(O.sortIndex=D,t(u,O),n(a)===null&&O===n(u)&&(x?(p(_),_=-1):x=!0,nr(g,D-H))):(O.sortIndex=J,t(a,O),v||E||(v=!0,Ae(N))),O},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(O){var I=y;return function(){var D=y;y=I;try{return O.apply(this,arguments)}finally{y=D}}}})(Cd);kd.exports=Cd;var ty=kd.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 ny=C,We=ty;function P(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"),Eo=Object.prototype.hasOwnProperty,ry=/^[: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]*$/,ic={},lc={};function sy(e){return Eo.call(lc,e)?!0:Eo.call(ic,e)?!1:ry.test(e)?lc[e]=!0:(ic[e]=!0,!1)}function iy(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 ly(e,t,n,r){if(t===null||typeof t>"u"||iy(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 Le(e,t,n,r,s,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var we={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){we[e]=new Le(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];we[t]=new Le(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){we[e]=new Le(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){we[e]=new Le(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){we[e]=new Le(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){we[e]=new Le(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){we[e]=new Le(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){we[e]=new Le(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){we[e]=new Le(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ka=/[\-:]([a-z])/g;function Ja(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(Ka,Ja);we[t]=new Le(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(Ka,Ja);we[t]=new Le(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(Ka,Ja);we[t]=new Le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){we[e]=new Le(e,1,!1,e.toLowerCase(),null,!1,!1)});we.xlinkHref=new Le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){we[e]=new Le(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ga(e,t,n,r){var s=we.hasOwnProperty(t)?we[t]:null;(s!==null?s.type!==0:r||!(2o||s[l]!==i[o]){var a=` `+s[l].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=l&&0<=o);break}}}finally{Vl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?is(e):""}function oy(e){switch(e.tag){case 5:return is(e.type);case 16:return is("Lazy");case 13:return is("Suspense");case 19:return is("SuspenseList");case 0:case 2:case 15:return e=Wl(e.type,!1),e;case 11:return e=Wl(e.type.render,!1),e;case 1:return e=Wl(e.type,!0),e;default:return""}}function Po(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 lr:return"Fragment";case ir:return"Portal";case ko:return"Profiler";case Xa:return"StrictMode";case Co:return"Suspense";case No:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Rd:return(e.displayName||"Context")+".Consumer";case Pd:return(e._context.displayName||"Context")+".Provider";case Ya:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Za:return t=e.displayName||null,t!==null?t:Po(e.type)||"Memo";case Vt:t=e._payload,e=e._init;try{return Po(e(t))}catch{}}return null}function ay(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 Po(t);case 8:return t===Xa?"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 vn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _d(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uy(e){var t=_d(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 s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ai(e){e._valueTracker||(e._valueTracker=uy(e))}function Od(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_d(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hi(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 Ro(e,t){var n=t.checked;return ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ac(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=vn(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 Td(e,t){t=t.checked,t!=null&&Ga(e,"checked",t,!1)}function jo(e,t){Td(e,t);var n=vn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?_o(e,t.type,n):t.hasOwnProperty("defaultValue")&&_o(e,t.type,vn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function uc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function _o(e,t,n){(t!=="number"||Hi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ls=Array.isArray;function gr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=ui.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cs={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},cy=["Webkit","ms","Moz","O"];Object.keys(cs).forEach(function(e){cy.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cs[t]=cs[e]})});function Id(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cs.hasOwnProperty(e)&&cs[e]?(""+t).trim():t+"px"}function Md(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Id(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var fy=ne({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 Lo(e,t){if(t){if(fy[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Ao(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 Fo=null;function eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Io=null,vr=null,wr=null;function dc(e){if(e=Ks(e)){if(typeof Io!="function")throw Error(P(280));var t=e.stateNode;t&&(t=El(t),Io(e.stateNode,e.type,t))}}function Dd(e){vr?wr?wr.push(e):wr=[e]:vr=e}function Ud(){if(vr){var e=vr,t=wr;if(wr=vr=null,dc(e),t)for(e=0;e>>=0,e===0?32:31-(Ey(e)/ky|0)|0}var ci=64,fi=4194304;function os(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 qi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var o=l&~s;o!==0?r=os(o):(i&=l,i!==0&&(r=os(i)))}else l=n&~s,l!==0?r=os(l):i!==0&&(r=os(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&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 Ws(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=n}function Ry(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=ds),Sc=" ",Ec=!1;function sh(e,t){switch(e){case"keyup":return tg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ih(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var or=!1;function rg(e,t){switch(e){case"compositionend":return ih(t);case"keypress":return t.which!==32?null:(Ec=!0,Sc);case"textInput":return e=t.data,e===Sc&&Ec?null:e;default:return null}}function sg(e,t){if(or)return e==="compositionend"||!au&&sh(e,t)?(e=nh(),Oi=iu=sn=null,or=!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=Pc(n)}}function uh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?uh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ch(){for(var e=window,t=Hi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hi(e.document)}return t}function uu(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 hg(e){var t=ch(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&uh(n.ownerDocument.documentElement,n)){if(r!==null&&uu(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 s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Rc(n,i);var l=Rc(n,r);s&&l&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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,ar=null,bo=null,ps=null,Bo=!1;function jc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bo||ar==null||ar!==Hi(r)||(r=ar,"selectionStart"in r&&uu(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}),ps&&Ps(ps,r)||(ps=r,r=Gi(bo,"onSelect"),0fr||(e.current=Ko[fr],Ko[fr]=null,fr--)}function K(e,t){fr++,Ko[fr]=e.current,e.current=t}var wn={},Ne=Sn(wn),Ue=Sn(!1),Wn=wn;function Mr(e,t){var n=e.type.contextTypes;if(!n)return wn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ze(e){return e=e.childContextTypes,e!=null}function Yi(){X(Ue),X(Ne)}function Ic(e,t,n){if(Ne.current!==wn)throw Error(P(168));K(Ne,t),K(Ue,n)}function wh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(P(108,ay(e)||"Unknown",s));return ne({},n,r)}function Zi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wn,Wn=Ne.current,K(Ne,e),K(Ue,Ue.current),!0}function Mc(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=wh(e,t,Wn),r.__reactInternalMemoizedMergedChildContext=e,X(Ue),X(Ne),K(Ne,e)):X(Ue),K(Ue,n)}var _t=null,kl=!1,lo=!1;function xh(e){_t===null?_t=[e]:_t.push(e)}function Ng(e){kl=!0,xh(e)}function En(){if(!lo&&_t!==null){lo=!0;var e=0,t=V;try{var n=_t;for(V=1;e>=l,s-=l,Lt=1<<32-ct(t)+s|n<_?(z=j,j=null):z=j.sibling;var T=y(p,j,h[_],g);if(T===null){j===null&&(j=z);break}e&&j&&T.alternate===null&&t(p,j),d=i(T,d,_),R===null?N=T:R.sibling=T,R=T,j=z}if(_===h.length)return n(p,j),Y&&Pn(p,_),N;if(j===null){for(;__?(z=j,j=null):z=j.sibling;var W=y(p,j,T.value,g);if(W===null){j===null&&(j=z);break}e&&j&&W.alternate===null&&t(p,j),d=i(W,d,_),R===null?N=W:R.sibling=W,R=W,j=z}if(T.done)return n(p,j),Y&&Pn(p,_),N;if(j===null){for(;!T.done;_++,T=h.next())T=c(p,T.value,g),T!==null&&(d=i(T,d,_),R===null?N=T:R.sibling=T,R=T);return Y&&Pn(p,_),N}for(j=r(p,j);!T.done;_++,T=h.next())T=E(j,p,_,T.value,g),T!==null&&(e&&T.alternate!==null&&j.delete(T.key===null?_:T.key),d=i(T,d,_),R===null?N=T:R.sibling=T,R=T);return e&&j.forEach(function(me){return t(p,me)}),Y&&Pn(p,_),N}function S(p,d,h,g){if(typeof h=="object"&&h!==null&&h.type===lr&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case oi:e:{for(var N=h.key,R=d;R!==null;){if(R.key===N){if(N=h.type,N===lr){if(R.tag===7){n(p,R.sibling),d=s(R,h.props.children),d.return=p,p=d;break e}}else if(R.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Vt&&zc(N)===R.type){n(p,R.sibling),d=s(R,h.props),d.ref=ts(p,R,h),d.return=p,p=d;break e}n(p,R);break}else t(p,R);R=R.sibling}h.type===lr?(d=Hn(h.props.children,p.mode,g,h.key),d.return=p,p=d):(g=Ui(h.type,h.key,h.props,null,p.mode,g),g.ref=ts(p,d,h),g.return=p,p=g)}return l(p);case ir:e:{for(R=h.key;d!==null;){if(d.key===R)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){n(p,d.sibling),d=s(d,h.children||[]),d.return=p,p=d;break e}else{n(p,d);break}else t(p,d);d=d.sibling}d=mo(h,p.mode,g),d.return=p,p=d}return l(p);case Vt:return R=h._init,S(p,d,R(h._payload),g)}if(ls(h))return v(p,d,h,g);if(Gr(h))return x(p,d,h,g);vi(p,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(n(p,d.sibling),d=s(d,h),d.return=p,p=d):(n(p,d),d=po(h,p.mode,g),d.return=p,p=d),l(p)):n(p,d)}return S}var Ur=Ch(!0),Nh=Ch(!1),nl=Sn(null),rl=null,pr=null,hu=null;function pu(){hu=pr=rl=null}function mu(e){var t=nl.current;X(nl),e._currentValue=t}function Xo(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 Sr(e,t){rl=e,hu=pr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(De=!0),e.firstContext=null)}function nt(e){var t=e._currentValue;if(hu!==e)if(e={context:e,memoizedValue:t,next:null},pr===null){if(rl===null)throw Error(P(308));pr=e,rl.dependencies={lanes:0,firstContext:e}}else pr=pr.next=e;return t}var _n=null;function yu(e){_n===null?_n=[e]:_n.push(e)}function Ph(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,yu(t)):(n.next=s.next,s.next=n),t.interleaved=n,Dt(e,r)}function Dt(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 Wt=!1;function gu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rh(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 Ft(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function dn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,B&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Dt(e,n)}return s=r.interleaved,s===null?(t.next=t,yu(r)):(t.next=s.next,s.next=t),r.interleaved=t,Dt(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,nu(e,n)}}function $c(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,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 sl(e,t,n,r){var s=e.updateQueue;Wt=!1;var i=s.firstBaseUpdate,l=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var a=o,u=a.next;a.next=null,l===null?i=u:l.next=u,l=a;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==l&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=a))}if(i!==null){var c=s.baseState;l=0,f=u=a=null,o=i;do{var y=o.lane,E=o.eventTime;if((r&y)===y){f!==null&&(f=f.next={eventTime:E,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var v=e,x=o;switch(y=t,E=n,x.tag){case 1:if(v=x.payload,typeof v=="function"){c=v.call(E,c,y);break e}c=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,y=typeof v=="function"?v.call(E,c,y):v,y==null)break e;c=ne({},c,y);break e;case 2:Wt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,y=s.effects,y===null?s.effects=[o]:y.push(o))}else E={eventTime:E,lane:y,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(u=f=E,a=c):f=f.next=E,l|=y;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;y=o,o=y.next,y.next=null,s.lastBaseUpdate=y,s.shared.pending=null}}while(!0);if(f===null&&(a=c),s.baseState=a,s.firstBaseUpdate=u,s.lastBaseUpdate=f,t=s.shared.interleaved,t!==null){s=t;do l|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Jn|=l,e.lanes=l,e.memoizedState=c}}function bc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ao.transition;ao.transition={};try{e(!1),t()}finally{V=n,ao.transition=r}}function Qh(){return rt().memoizedState}function _g(e,t,n){var r=pn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vh(e))Wh(t,n);else if(n=Ph(e,t,n,r),n!==null){var s=Oe();ft(n,e,r,s),qh(n,t,r)}}function Og(e,t,n){var r=pn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vh(e))Wh(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,n);if(s.hasEagerState=!0,s.eagerState=o,dt(o,l)){var a=t.interleaved;a===null?(s.next=s,yu(t)):(s.next=a.next,a.next=s),t.interleaved=s;return}}catch{}finally{}n=Ph(e,t,s,r),n!==null&&(s=Oe(),ft(n,e,r,s),qh(n,t,r))}}function Vh(e){var t=e.alternate;return e===te||t!==null&&t===te}function Wh(e,t){ms=ll=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nu(e,n)}}var ol={readContext:nt,useCallback:Se,useContext:Se,useEffect:Se,useImperativeHandle:Se,useInsertionEffect:Se,useLayoutEffect:Se,useMemo:Se,useReducer:Se,useRef:Se,useState:Se,useDebugValue:Se,useDeferredValue:Se,useTransition:Se,useMutableSource:Se,useSyncExternalStore:Se,useId:Se,unstable_isNewReconciler:!1},Tg={readContext:nt,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:Hc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Fi(4194308,4,zh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fi(4,2,e,t)},useMemo:function(e,t){var n=gt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gt();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=_g.bind(null,te,e),[r.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:Bc,useDebugValue:Nu,useDeferredValue:function(e){return gt().memoizedState=e},useTransition:function(){var e=Bc(!1),t=e[0];return e=jg.bind(null,e[1]),gt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=te,s=gt();if(Y){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),pe===null)throw Error(P(349));Kn&30||Th(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Hc(Ah.bind(null,r,i,e),[e]),r.flags|=2048,Fs(9,Lh.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=gt(),t=pe.identifierPrefix;if(Y){var n=At,r=Lt;n=(r&~(1<<32-ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ls++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[St]=t,e[_s]=r,rp(e,t,!1,!1),t.stateNode=e;e:{switch(l=Ao(n,r),n){case"dialog":G("cancel",e),G("close",e),s=r;break;case"iframe":case"object":case"embed":G("load",e),s=r;break;case"video":case"audio":for(s=0;sbr&&(t.flags|=128,r=!0,ns(i,!1),t.lanes=4194304)}else{if(!r)if(e=il(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ns(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Y)return Ee(t),null}else 2*ie()-i.renderingStartTime>br&&n!==1073741824&&(t.flags|=128,r=!0,ns(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ie(),t.sibling=null,n=ee.current,K(ee,r?n&1|2:n&1),t):(Ee(t),null);case 22:case 23:return Tu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?He&1073741824&&(Ee(t),t.subtreeFlags&6&&(t.flags|=8192)):Ee(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function zg(e,t){switch(fu(t),t.tag){case 1:return ze(t.type)&&Yi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zr(),X(Ue),X(Ne),xu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return wu(t),null;case 13:if(X(ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));Dr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(ee),null;case 4:return zr(),null;case 10:return mu(t.type._context),null;case 22:case 23:return Tu(),null;case 24:return null;default:return null}}var xi=!1,ke=!1,$g=typeof WeakSet=="function"?WeakSet:Set,A=null;function mr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){se(e,t,r)}else n.current=null}function la(e,t,n){try{n()}catch(r){se(e,t,r)}}var ef=!1;function bg(e,t){if(Ho=Ki,e=ch(),uu(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 s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,o=-1,a=-1,u=0,f=0,c=e,y=null;t:for(;;){for(var E;c!==n||s!==0&&c.nodeType!==3||(o=l+s),c!==i||r!==0&&c.nodeType!==3||(a=l+r),c.nodeType===3&&(l+=c.nodeValue.length),(E=c.firstChild)!==null;)y=c,c=E;for(;;){if(c===e)break t;if(y===n&&++u===s&&(o=l),y===i&&++f===r&&(a=l),(E=c.nextSibling)!==null)break;c=y,y=c.parentNode}c=E}n=o===-1||a===-1?null:{start:o,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qo={focusedElem:e,selectionRange:n},Ki=!1,A=t;A!==null;)if(t=A,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,A=e;else for(;A!==null;){t=A;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var x=v.memoizedProps,S=v.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:it(t.type,x),S);p.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(g){se(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,A=e;break}A=t.return}return v=ef,ef=!1,v}function ys(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&la(t,n,i)}s=s.next}while(s!==r)}}function Pl(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 oa(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 lp(e){var t=e.alternate;t!==null&&(e.alternate=null,lp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[St],delete t[_s],delete t[qo],delete t[kg],delete t[Cg])),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 op(e){return e.tag===5||e.tag===3||e.tag===4}function tf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||op(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 aa(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=Xi));else if(r!==4&&(e=e.child,e!==null))for(aa(e,t,n),e=e.sibling;e!==null;)aa(e,t,n),e=e.sibling}function ua(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(ua(e,t,n),e=e.sibling;e!==null;)ua(e,t,n),e=e.sibling}var ye=null,at=!1;function Bt(e,t,n){for(n=n.child;n!==null;)ap(e,t,n),n=n.sibling}function ap(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(vl,n)}catch{}switch(n.tag){case 5:ke||mr(n,t);case 6:var r=ye,s=at;ye=null,Bt(e,t,n),ye=r,at=s,ye!==null&&(at?(e=ye,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ye.removeChild(n.stateNode));break;case 18:ye!==null&&(at?(e=ye,n=n.stateNode,e.nodeType===8?io(e.parentNode,n):e.nodeType===1&&io(e,n),Cs(e)):io(ye,n.stateNode));break;case 4:r=ye,s=at,ye=n.stateNode.containerInfo,at=!0,Bt(e,t,n),ye=r,at=s;break;case 0:case 11:case 14:case 15:if(!ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&la(n,t,l),s=s.next}while(s!==r)}Bt(e,t,n);break;case 1:if(!ke&&(mr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){se(n,t,o)}Bt(e,t,n);break;case 21:Bt(e,t,n);break;case 22:n.mode&1?(ke=(r=ke)||n.memoizedState!==null,Bt(e,t,n),ke=r):Bt(e,t,n);break;default:Bt(e,t,n)}}function nf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new $g),t.forEach(function(r){var s=Gg.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function st(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=l),r&=~i}if(r=s,r=ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Hg(r/1960))-r,10e?16:e,ln===null)var r=!1;else{if(e=ln,ln=null,cl=0,B&6)throw Error(P(331));var s=B;for(B|=4,A=e.current;A!==null;){var i=A,l=i.child;if(A.flags&16){var o=i.deletions;if(o!==null){for(var a=0;aie()-_u?Bn(e,0):ju|=n),$e(e,t)}function yp(e,t){t===0&&(e.mode&1?(t=fi,fi<<=1,!(fi&130023424)&&(fi=4194304)):t=1);var n=Oe();e=Dt(e,t),e!==null&&(Ws(e,t,n),$e(e,n))}function Jg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yp(e,n)}function Gg(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),yp(e,n)}var gp;gp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ue.current)De=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return De=!1,Dg(e,t,n);De=!!(e.flags&131072)}else De=!1,Y&&t.flags&1048576&&Sh(t,tl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ii(e,t),e=t.pendingProps;var s=Mr(t,Ne.current);Sr(t,n),s=Eu(null,t,r,e,s,n);var i=ku();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ze(r)?(i=!0,Zi(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,gu(t),s.updater=Nl,t.stateNode=s,s._reactInternals=t,Zo(t,r,e,n),t=na(null,t,r,!0,i,n)):(t.tag=0,Y&&i&&cu(t),_e(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ii(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Yg(r),e=it(r,e),s){case 0:t=ta(null,t,r,e,n);break e;case 1:t=Xc(null,t,r,e,n);break e;case 11:t=Jc(null,t,r,e,n);break e;case 14:t=Gc(null,t,r,it(r.type,e),n);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:it(r,s),ta(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:it(r,s),Xc(e,t,r,s,n);case 3:e:{if(ep(t),e===null)throw Error(P(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Rh(e,t),sl(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=$r(Error(P(423)),t),t=Yc(e,t,r,n,s);break e}else if(r!==s){s=$r(Error(P(424)),t),t=Yc(e,t,r,n,s);break e}else for(Qe=fn(t.stateNode.containerInfo.firstChild),Ve=t,Y=!0,ut=null,n=Nh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Dr(),r===s){t=Ut(e,t,n);break e}_e(e,t,r,n)}t=t.child}return t;case 5:return jh(t),e===null&&Go(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,l=s.children,Vo(r,s)?l=null:i!==null&&Vo(r,i)&&(t.flags|=32),Zh(e,t),_e(e,t,l,n),t.child;case 6:return e===null&&Go(t),null;case 13:return tp(e,t,n);case 4:return vu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ur(t,null,r,n):_e(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:it(r,s),Jc(e,t,r,s,n);case 7:return _e(e,t,t.pendingProps,n),t.child;case 8:return _e(e,t,t.pendingProps.children,n),t.child;case 12:return _e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,l=s.value,K(nl,r._currentValue),r._currentValue=l,i!==null)if(dt(i.value,l)){if(i.children===s.children&&!Ue.current){t=Ut(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){l=i.child;for(var a=o.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Ft(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?a.next=a:(a.next=f.next,f.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Xo(i.return,n,t),o.lanes|=n;break}a=a.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(P(341));l.lanes|=n,o=l.alternate,o!==null&&(o.lanes|=n),Xo(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}_e(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Sr(t,n),s=nt(s),r=r(s),t.flags|=1,_e(e,t,r,n),t.child;case 14:return r=t.type,s=it(r,t.pendingProps),s=it(r.type,s),Gc(e,t,r,s,n);case 15:return Xh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:it(r,s),Ii(e,t),t.tag=1,ze(r)?(e=!0,Zi(t)):e=!1,Sr(t,n),Kh(t,r,s),Zo(t,r,s,n),na(null,t,r,!0,e,n);case 19:return np(e,t,n);case 22:return Yh(e,t,n)}throw Error(P(156,t.tag))};function vp(e,t){return Vd(e,t)}function Xg(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 et(e,t,n,r){return new Xg(e,t,n,r)}function Au(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yg(e){if(typeof e=="function")return Au(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ya)return 11;if(e===Za)return 14}return 2}function mn(e,t){var n=e.alternate;return n===null?(n=et(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,s,i){var l=2;if(r=e,typeof e=="function")Au(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case lr:return Hn(n.children,s,i,t);case Xa:l=8,s|=8;break;case ko:return e=et(12,n,t,s|2),e.elementType=ko,e.lanes=i,e;case Co:return e=et(13,n,t,s),e.elementType=Co,e.lanes=i,e;case No:return e=et(19,n,t,s),e.elementType=No,e.lanes=i,e;case jd:return jl(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Pd:l=10;break e;case Rd:l=9;break e;case Ya:l=11;break e;case Za:l=14;break e;case Vt:l=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=et(l,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Hn(e,t,n,r){return e=et(7,e,r,t),e.lanes=n,e}function jl(e,t,n,r){return e=et(22,e,r,t),e.elementType=jd,e.lanes=n,e.stateNode={isHidden:!1},e}function po(e,t,n){return e=et(6,e,null,t),e.lanes=n,e}function mo(e,t,n){return t=et(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zg(e,t,n,r,s){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=Kl(0),this.expirationTimes=Kl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,r,s,i,l,o,a){return e=new Zg(e,t,n,o,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=et(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},gu(i),e}function ev(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ep)}catch(e){console.error(e)}}Ep(),Ed.exports=qe;var iv=Ed.exports,ff=iv;So.createRoot=ff.createRoot,So.hydrateRoot=ff.hydrateRoot;/** * @remix-run/router v1.23.1 * * 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 Ms(){return Ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Uu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ov(){return Math.random().toString(36).substr(2,8)}function hf(e,t){return{usr:e.state,key:e.key,idx:t}}function pa(e,t,n,r){return n===void 0&&(n=null),Ms({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Wr(t):t,{state:n,key:t&&t.key||r||ov()})}function hl(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 Wr(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 av(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,l=s.history,o=on.Pop,a=null,u=f();u==null&&(u=0,l.replaceState(Ms({},l.state,{idx:u}),""));function f(){return(l.state||{idx:null}).idx}function c(){o=on.Pop;let S=f(),p=S==null?null:S-u;u=S,a&&a({action:o,location:x.location,delta:p})}function y(S,p){o=on.Push;let d=pa(x.location,S,p);u=f()+1;let h=hf(d,u),g=x.createHref(d);try{l.pushState(h,"",g)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;s.location.assign(g)}i&&a&&a({action:o,location:x.location,delta:1})}function E(S,p){o=on.Replace;let d=pa(x.location,S,p);u=f();let h=hf(d,u),g=x.createHref(d);l.replaceState(h,"",g),i&&a&&a({action:o,location:x.location,delta:0})}function v(S){let p=s.location.origin!=="null"?s.location.origin:s.location.href,d=typeof S=="string"?S:hl(S);return d=d.replace(/ $/,"%20"),le(p,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,p)}let x={get action(){return o},get location(){return e(s,l)},listen(S){if(a)throw new Error("A history only accepts one active listener");return s.addEventListener(df,c),a=S,()=>{s.removeEventListener(df,c),a=null}},createHref(S){return t(s,S)},createURL:v,encodeLocation(S){let p=v(S);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:y,replace:E,go(S){return l.go(S)}};return x}var pf;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(pf||(pf={}));function uv(e,t,n){return n===void 0&&(n="/"),cv(e,t,n)}function cv(e,t,n,r){let s=typeof t=="string"?Wr(t):t,i=zu(s.pathname||"/",n);if(i==null)return null;let l=kp(e);fv(l);let o=null;for(let a=0;o==null&&a{let a={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};a.relativePath.startsWith("/")&&(le(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=yn([r,a.relativePath]),f=n.concat(a);i.children&&i.children.length>0&&(le(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),kp(i.children,t,f,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:vv(u,i.index),routesMeta:f})};return e.forEach((i,l)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))s(i,l);else for(let a of Cp(i.path))s(i,l,a)}),t}function Cp(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let l=Cp(r.join("/")),o=[];return o.push(...l.map(a=>a===""?i:[i,a].join("/"))),s&&o.push(...l),o.map(a=>e.startsWith("/")&&a===""?"/":a)}function fv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:wv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const dv=/^:[\w-]+$/,hv=3,pv=2,mv=1,yv=10,gv=-2,mf=e=>e==="*";function vv(e,t){let n=e.split("/"),r=n.length;return n.some(mf)&&(r+=gv),t&&(r+=pv),n.filter(s=>!mf(s)).reduce((s,i)=>s+(dv.test(i)?hv:i===""?mv:yv),r)}function wv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function xv(e,t,n){let{routesMeta:r}=e,s={},i="/",l=[];for(let o=0;o{let{paramName:y,isOptional:E}=f;if(y==="*"){let x=o[c]||"";l=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const v=o[c];return E&&!v?u[y]=void 0:u[y]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:l,pattern:e}}function Ev(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Uu(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,a)=>(r.push({paramName:o,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function kv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Uu(!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 zu(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 Cv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Nv=e=>Cv.test(e);function Pv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Wr(e):e,i;if(n)if(Nv(n))i=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Uu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?i=yf(n.substring(1),"/"):i=yf(n,t)}else i=t;return{pathname:i,search:_v(r),hash:Ov(s)}}function yf(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function yo(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 Rv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function $u(e,t){let n=Rv(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function bu(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Wr(e):(s=Ms({},e),le(!s.pathname||!s.pathname.includes("?"),yo("?","pathname","search",s)),le(!s.pathname||!s.pathname.includes("#"),yo("#","pathname","hash",s)),le(!s.search||!s.search.includes("#"),yo("#","search","hash",s)));let i=e===""||s.pathname==="",l=i?"/":s.pathname,o;if(l==null)o=n;else{let c=t.length-1;if(!r&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),c-=1;s.pathname=y.join("/")}o=c>=0?t[c]:"/"}let a=Pv(s,o),u=l&&l!=="/"&&l.endsWith("/"),f=(i||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||f)&&(a.pathname+="/"),a}const yn=e=>e.join("/").replace(/\/\/+/g,"/"),jv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_v=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ov=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Tv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Np=["post","put","patch","delete"];new Set(Np);const Lv=["get",...Np];new Set(Lv);/** * React Router v6.30.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Ds(){return Ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.current=!0}),C.useCallback(function(u,f){if(f===void 0&&(f={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let c=bu(u,JSON.parse(l),i,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:yn([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,l,i,e])}const Mv=C.createContext(null);function Dv(e){let t=C.useContext(Nt).outlet;return t&&C.createElement(Mv.Provider,{value:e},t)}function kS(){let{matches:e}=C.useContext(Nt),t=e[e.length-1];return t?t.params:{}}function jp(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=C.useContext(kn),{matches:s}=C.useContext(Nt),{pathname:i}=tr(),l=JSON.stringify($u(s,r.v7_relativeSplatPath));return C.useMemo(()=>bu(e,JSON.parse(l),i,n==="path"),[e,l,i,n])}function Uv(e,t){return zv(e,t)}function zv(e,t,n,r){qr()||le(!1);let{navigator:s}=C.useContext(kn),{matches:i}=C.useContext(Nt),l=i[i.length-1],o=l?l.params:{};l&&l.pathname;let a=l?l.pathnameBase:"/";l&&l.route;let u=tr(),f;if(t){var c;let S=typeof t=="string"?Wr(t):t;a==="/"||(c=S.pathname)!=null&&c.startsWith(a)||le(!1),f=S}else f=u;let y=f.pathname||"/",E=y;if(a!=="/"){let S=a.replace(/^\//,"").split("/");E="/"+y.replace(/^\//,"").split("/").slice(S.length).join("/")}let v=uv(e,{pathname:E}),x=Qv(v&&v.map(S=>Object.assign({},S,{params:Object.assign({},o,S.params),pathname:yn([a,s.encodeLocation?s.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?a:yn([a,s.encodeLocation?s.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),i,n,r);return t&&x?C.createElement(Al.Provider,{value:{location:Ds({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:on.Pop}},x):x}function $v(){let e=Kv(),t=Tv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:s},n):null,null)}const bv=C.createElement($v,null);class Bv extends C.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?C.createElement(Nt.Provider,{value:this.props.routeContext},C.createElement(Pp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Hv(e){let{routeContext:t,match:n,children:r}=e,s=C.useContext(Bu);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(Nt.Provider,{value:t},r)}function Qv(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,o=(s=n)==null?void 0:s.errors;if(o!=null){let f=l.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id])!==void 0);f>=0||le(!1),l=l.slice(0,Math.min(l.length,f+1))}let a=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?l=l.slice(0,u+1):l=[l[0]];break}}}return l.reduceRight((f,c,y)=>{let E,v=!1,x=null,S=null;n&&(E=o&&c.route.id?o[c.route.id]:void 0,x=c.route.errorElement||bv,a&&(u<0&&y===0?(Gv("route-fallback"),v=!0,S=null):u===y&&(v=!0,S=c.route.hydrateFallbackElement||null)));let p=t.concat(l.slice(0,y+1)),d=()=>{let h;return E?h=x:v?h=S:c.route.Component?h=C.createElement(c.route.Component,null):c.route.element?h=c.route.element:h=f,C.createElement(Hv,{match:c,routeContext:{outlet:f,matches:p,isDataRoute:n!=null},children:h})};return n&&(c.route.ErrorBoundary||c.route.errorElement||y===0)?C.createElement(Bv,{location:n.location,revalidation:n.revalidation,component:x,error:E,children:d(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):d()},null)}var _p=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(_p||{}),Op=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}(Op||{});function Vv(e){let t=C.useContext(Bu);return t||le(!1),t}function Wv(e){let t=C.useContext(Av);return t||le(!1),t}function qv(e){let t=C.useContext(Nt);return t||le(!1),t}function Tp(e){let t=qv(),n=t.matches[t.matches.length-1];return n.route.id||le(!1),n.route.id}function Kv(){var e;let t=C.useContext(Pp),n=Wv(),r=Tp();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Jv(){let{router:e}=Vv(_p.UseNavigateStable),t=Tp(Op.UseNavigateStable),n=C.useRef(!1);return Rp(()=>{n.current=!0}),C.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ds({fromRouteId:t},i)))},[e,t])}const gf={};function Gv(e,t,n){gf[e]||(gf[e]=!0)}function Xv(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Yv(e){let{to:t,replace:n,state:r,relative:s}=e;qr()||le(!1);let{future:i,static:l}=C.useContext(kn),{matches:o}=C.useContext(Nt),{pathname:a}=tr(),u=Gs(),f=bu(t,$u(o,i.v7_relativeSplatPath),a,s==="path"),c=JSON.stringify(f);return C.useEffect(()=>u(JSON.parse(c),{replace:n,state:r,relative:s}),[u,c,s,n,r]),null}function Zv(e){return Dv(e.context)}function Ht(e){le(!1)}function e0(e){let{basename:t="/",children:n=null,location:r,navigationType:s=on.Pop,navigator:i,static:l=!1,future:o}=e;qr()&&le(!1);let a=t.replace(/^\/*/,"/"),u=C.useMemo(()=>({basename:a,navigator:i,static:l,future:Ds({v7_relativeSplatPath:!1},o)}),[a,o,i,l]);typeof r=="string"&&(r=Wr(r));let{pathname:f="/",search:c="",hash:y="",state:E=null,key:v="default"}=r,x=C.useMemo(()=>{let S=zu(f,a);return S==null?null:{location:{pathname:S,search:c,hash:y,state:E,key:v},navigationType:s}},[a,f,c,y,E,v,s]);return x==null?null:C.createElement(kn.Provider,{value:u},C.createElement(Al.Provider,{children:n,value:x}))}function t0(e){let{children:t,location:n}=e;return Uv(ma(t),n)}new Promise(()=>{});function ma(e,t){t===void 0&&(t=[]);let n=[];return C.Children.forEach(e,(r,s)=>{if(!C.isValidElement(r))return;let i=[...t,s];if(r.type===C.Fragment){n.push.apply(n,ma(r.props.children,i));return}r.type!==Ht&&le(!1),!r.props.index||!r.props.children||le(!1);let l={id:r.props.id||i.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&&(l.children=ma(r.props.children,i)),n.push(l)}),n}/** * React Router DOM v6.30.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ya(){return ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function r0(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function s0(e,t){return e.button===0&&(!t||t==="_self")&&!r0(e)}function ga(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function i0(e,t){let n=ga(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const l0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],o0="6";try{window.__reactRouterVersion=o0}catch{}const a0="startTransition",vf=Km[a0];function u0(e){let{basename:t,children:n,future:r,window:s}=e,i=C.useRef();i.current==null&&(i.current=lv({window:s,v5Compat:!0}));let l=i.current,[o,a]=C.useState({action:l.action,location:l.location}),{v7_startTransition:u}=r||{},f=C.useCallback(c=>{u&&vf?vf(()=>a(c)):a(c)},[a,u]);return C.useLayoutEffect(()=>l.listen(f),[l,f]),C.useEffect(()=>Xv(r),[r]),C.createElement(e0,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:l,future:r})}const c0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",f0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qn=C.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:l,state:o,target:a,to:u,preventScrollReset:f,viewTransition:c}=t,y=n0(t,l0),{basename:E}=C.useContext(kn),v,x=!1;if(typeof u=="string"&&f0.test(u)&&(v=u,c0))try{let h=new URL(window.location.href),g=u.startsWith("//")?new URL(h.protocol+u):new URL(u),N=zu(g.pathname,E);g.origin===h.origin&&N!=null?u=N+g.search+g.hash:x=!0}catch{}let S=Fv(u,{relative:s}),p=d0(u,{replace:l,state:o,target:a,preventScrollReset:f,relative:s,viewTransition:c});function d(h){r&&r(h),h.defaultPrevented||p(h)}return C.createElement("a",ya({},y,{href:v||S,onClick:x||i?r:d,ref:n,target:a}))});var wf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wf||(wf={}));var xf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(xf||(xf={}));function d0(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:l,viewTransition:o}=t===void 0?{}:t,a=Gs(),u=tr(),f=jp(e,{relative:l});return C.useCallback(c=>{if(s0(c,n)){c.preventDefault();let y=r!==void 0?r:hl(u)===hl(f);a(e,{replace:y,state:s,preventScrollReset:i,relative:l,viewTransition:o})}},[u,a,f,r,s,n,e,i,l,o])}function CS(e){let t=C.useRef(ga(e)),n=C.useRef(!1),r=tr(),s=C.useMemo(()=>i0(r.search,n.current?null:t.current),[r.search]),i=Gs(),l=C.useCallback((o,a)=>{const u=ga(typeof o=="function"?o(s):o);n.current=!0,i("?"+u,a)},[i,s]);return[s,l]}var Xs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},h0={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Gt,Ba,td,p0=(td=class{constructor(){F(this,Gt,h0);F(this,Ba,!1)}setTimeoutProvider(e){L(this,Gt,e)}setTimeout(e,t){return w(this,Gt).setTimeout(e,t)}clearTimeout(e){w(this,Gt).clearTimeout(e)}setInterval(e,t){return w(this,Gt).setInterval(e,t)}clearInterval(e){w(this,Gt).clearInterval(e)}},Gt=new WeakMap,Ba=new WeakMap,td),Tn=new p0;function m0(e){setTimeout(e,0)}var Xn=typeof window>"u"||"Deno"in globalThis;function Ie(){}function y0(e,t){return typeof e=="function"?e(t):e}function va(e){return typeof e=="number"&&e>=0&&e!==1/0}function Lp(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gn(e,t){return typeof e=="function"?e(t):e}function Xe(e,t){return typeof e=="function"?e(t):e}function Sf(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:l,stale:o}=e;if(l){if(r){if(t.queryHash!==Hu(l,t.options))return!1}else if(!zs(t.queryKey,l))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||i&&!i(t))}function Ef(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Us(t.options.mutationKey)!==Us(i))return!1}else if(!zs(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Hu(e,t){return((t==null?void 0:t.queryKeyHashFn)||Us)(e)}function Us(e){return JSON.stringify(e,(t,n)=>xa(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function zs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>zs(e[n],t[n])):!1}var g0=Object.prototype.hasOwnProperty;function Ap(e,t){if(e===t)return e;const n=kf(e)&&kf(t);if(!n&&!(xa(e)&&xa(t)))return t;const s=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),l=i.length,o=n?new Array(l):{};let a=0;for(let u=0;u{Tn.setTimeout(t,e)})}function Sa(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Ap(e,t):t}function w0(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function x0(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Qu=Symbol();function Fp(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Qu?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function S0(e,t){return typeof e=="function"?e(...t):!!e}var An,Xt,kr,nd,E0=(nd=class extends Xs{constructor(){super();F(this,An);F(this,Xt);F(this,kr);L(this,kr,t=>{if(!Xn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){w(this,Xt)||this.setEventListener(w(this,kr))}onUnsubscribe(){var t;this.hasListeners()||((t=w(this,Xt))==null||t.call(this),L(this,Xt,void 0))}setEventListener(t){var n;L(this,kr,t),(n=w(this,Xt))==null||n.call(this),L(this,Xt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){w(this,An)!==t&&(L(this,An,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof w(this,An)=="boolean"?w(this,An):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},An=new WeakMap,Xt=new WeakMap,kr=new WeakMap,nd),Vu=new E0;function Ea(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var k0=m0;function C0(){let e=[],t=0,n=o=>{o()},r=o=>{o()},s=k0;const i=o=>{t?e.push(o):s(()=>{n(o)})},l=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(a=>{n(a)})})})};return{batch:o=>{let a;t++;try{a=o()}finally{t--,t||l()}return a},batchCalls:o=>(...a)=>{i(()=>{o(...a)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}var ge=C0(),Cr,Yt,Nr,rd,N0=(rd=class extends Xs{constructor(){super();F(this,Cr,!0);F(this,Yt);F(this,Nr);L(this,Nr,t=>{if(!Xn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){w(this,Yt)||this.setEventListener(w(this,Nr))}onUnsubscribe(){var t;this.hasListeners()||((t=w(this,Yt))==null||t.call(this),L(this,Yt,void 0))}setEventListener(t){var n;L(this,Nr,t),(n=w(this,Yt))==null||n.call(this),L(this,Yt,t(this.setOnline.bind(this)))}setOnline(t){w(this,Cr)!==t&&(L(this,Cr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return w(this,Cr)}},Cr=new WeakMap,Yt=new WeakMap,Nr=new WeakMap,rd),pl=new N0;function P0(e){return Math.min(1e3*2**e,3e4)}function Ip(e){return(e??"online")==="online"?pl.isOnline():!0}var ka=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Mp(e){let t=!1,n=0,r;const s=Ea(),i=()=>s.status!=="pending",l=x=>{var S;if(!i()){const p=new ka(x);y(p),(S=e.onCancel)==null||S.call(e,p)}},o=()=>{t=!0},a=()=>{t=!1},u=()=>Vu.isFocused()&&(e.networkMode==="always"||pl.isOnline())&&e.canRun(),f=()=>Ip(e.networkMode)&&e.canRun(),c=x=>{i()||(r==null||r(),s.resolve(x))},y=x=>{i()||(r==null||r(),s.reject(x))},E=()=>new Promise(x=>{var S;r=p=>{(i()||u())&&x(p)},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;r=void 0,i()||(x=e.onContinue)==null||x.call(e)}),v=()=>{if(i())return;let x;const S=n===0?e.initialPromise:void 0;try{x=S??e.fn()}catch(p){x=Promise.reject(p)}Promise.resolve(x).then(c).catch(p=>{var R;if(i())return;const d=e.retry??(Xn?0:3),h=e.retryDelay??P0,g=typeof h=="function"?h(n,p):h,N=d===!0||typeof d=="number"&&nu()?void 0:E()).then(()=>{t?y(p):v()})})};return{promise:s,status:()=>s.status,cancel:l,continue:()=>(r==null||r(),s),cancelRetry:o,continueRetry:a,canStart:f,start:()=>(f()?v():E().then(v),s)}}var Fn,sd,Dp=(sd=class{constructor(){F(this,Fn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),va(this.gcTime)&&L(this,Fn,Tn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xn?1/0:5*60*1e3))}clearGcTimeout(){w(this,Fn)&&(Tn.clearTimeout(w(this,Fn)),L(this,Fn,void 0))}},Fn=new WeakMap,sd),In,Pr,Ge,Mn,de,$s,Dn,lt,Rt,id,R0=(id=class extends Dp{constructor(t){super();F(this,lt);F(this,In);F(this,Pr);F(this,Ge);F(this,Mn);F(this,de);F(this,$s);F(this,Dn);L(this,Dn,!1),L(this,$s,t.defaultOptions),this.setOptions(t.options),this.observers=[],L(this,Mn,t.client),L(this,Ge,w(this,Mn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,L(this,In,Pf(this.options)),this.state=t.state??w(this,In),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=w(this,de))==null?void 0:t.promise}setOptions(t){if(this.options={...w(this,$s),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Pf(this.options);n.data!==void 0&&(this.setState(Nf(n.data,n.dataUpdatedAt)),L(this,In,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&w(this,Ge).remove(this)}setData(t,n){const r=Sa(this.state.data,t,this.options);return $(this,lt,Rt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){$(this,lt,Rt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=w(this,de))==null?void 0:r.promise;return(s=w(this,de))==null||s.cancel(t),n?n.then(Ie).catch(Ie):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(w(this,In))}isActive(){return this.observers.some(t=>Xe(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qu||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>gn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Lp(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=w(this,de))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=w(this,de))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),w(this,Ge).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(w(this,de)&&(w(this,Dn)?w(this,de).cancel({revert:!0}):w(this,de).cancelRetry()),this.scheduleGc()),w(this,Ge).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$(this,lt,Rt).call(this,{type:"invalidate"})}async fetch(t,n){var a,u,f,c,y,E,v,x,S,p,d,h;if(this.state.fetchStatus!=="idle"&&((a=w(this,de))==null?void 0:a.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(w(this,de))return w(this,de).continueRetry(),w(this,de).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(N=>N.options.queryFn);g&&this.setOptions(g.options)}const r=new AbortController,s=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(L(this,Dn,!0),r.signal)})},i=()=>{const g=Fp(this.options,n),R=(()=>{const j={client:w(this,Mn),queryKey:this.queryKey,meta:this.meta};return s(j),j})();return L(this,Dn,!1),this.options.persister?this.options.persister(g,R,this):g(R)},o=(()=>{const g={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:w(this,Mn),state:this.state,fetchFn:i};return s(g),g})();(u=this.options.behavior)==null||u.onFetch(o,this),L(this,Pr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&$(this,lt,Rt).call(this,{type:"fetch",meta:(c=o.fetchOptions)==null?void 0:c.meta}),L(this,de,Mp({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:g=>{g instanceof ka&&g.revert&&this.setState({...w(this,Pr),fetchStatus:"idle"}),r.abort()},onFail:(g,N)=>{$(this,lt,Rt).call(this,{type:"failed",failureCount:g,error:N})},onPause:()=>{$(this,lt,Rt).call(this,{type:"pause"})},onContinue:()=>{$(this,lt,Rt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const g=await w(this,de).start();if(g===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(g),(E=(y=w(this,Ge).config).onSuccess)==null||E.call(y,g,this),(x=(v=w(this,Ge).config).onSettled)==null||x.call(v,g,this.state.error,this),g}catch(g){if(g instanceof ka){if(g.silent)return w(this,de).promise;if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw $(this,lt,Rt).call(this,{type:"error",error:g}),(p=(S=w(this,Ge).config).onError)==null||p.call(S,g,this),(h=(d=w(this,Ge).config).onSettled)==null||h.call(d,this.state.data,g,this),g}finally{this.scheduleGc()}}},In=new WeakMap,Pr=new WeakMap,Ge=new WeakMap,Mn=new WeakMap,de=new WeakMap,$s=new WeakMap,Dn=new WeakMap,lt=new WeakSet,Rt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Up(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...Nf(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return L(this,Pr,t.manual?s:void 0),s;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ge.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),w(this,Ge).notify({query:this,type:"updated",action:t})})},id);function Up(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ip(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Nf(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Pf(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Fe,b,bs,Re,Un,Rr,Ot,Zt,Bs,jr,_r,zn,$n,en,Or,Q,us,Ca,Na,Pa,Ra,ja,_a,Oa,zp,ld,j0=(ld=class extends Xs{constructor(t,n){super();F(this,Q);F(this,Fe);F(this,b);F(this,bs);F(this,Re);F(this,Un);F(this,Rr);F(this,Ot);F(this,Zt);F(this,Bs);F(this,jr);F(this,_r);F(this,zn);F(this,$n);F(this,en);F(this,Or,new Set);this.options=n,L(this,Fe,t),L(this,Zt,null),L(this,Ot,Ea()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(w(this,b).addObserver(this),Rf(w(this,b),this.options)?$(this,Q,us).call(this):this.updateResult(),$(this,Q,Ra).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ta(w(this,b),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ta(w(this,b),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$(this,Q,ja).call(this),$(this,Q,_a).call(this),w(this,b).removeObserver(this)}setOptions(t){const n=this.options,r=w(this,b);if(this.options=w(this,Fe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xe(this.options.enabled,w(this,b))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$(this,Q,Oa).call(this),w(this,b).setOptions(this.options),n._defaulted&&!wa(this.options,n)&&w(this,Fe).getQueryCache().notify({type:"observerOptionsUpdated",query:w(this,b),observer:this});const s=this.hasListeners();s&&jf(w(this,b),r,this.options,n)&&$(this,Q,us).call(this),this.updateResult(),s&&(w(this,b)!==r||Xe(this.options.enabled,w(this,b))!==Xe(n.enabled,w(this,b))||gn(this.options.staleTime,w(this,b))!==gn(n.staleTime,w(this,b)))&&$(this,Q,Ca).call(this);const i=$(this,Q,Na).call(this);s&&(w(this,b)!==r||Xe(this.options.enabled,w(this,b))!==Xe(n.enabled,w(this,b))||i!==w(this,en))&&$(this,Q,Pa).call(this,i)}getOptimisticResult(t){const n=w(this,Fe).getQueryCache().build(w(this,Fe),t),r=this.createResult(n,t);return O0(this,r)&&(L(this,Re,r),L(this,Rr,this.options),L(this,Un,w(this,b).state)),r}getCurrentResult(){return w(this,Re)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&w(this,Ot).status==="pending"&&w(this,Ot).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){w(this,Or).add(t)}getCurrentQuery(){return w(this,b)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=w(this,Fe).defaultQueryOptions(t),r=w(this,Fe).getQueryCache().build(w(this,Fe),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return $(this,Q,us).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),w(this,Re)))}createResult(t,n){var z;const r=w(this,b),s=this.options,i=w(this,Re),l=w(this,Un),o=w(this,Rr),u=t!==r?t.state:w(this,bs),{state:f}=t;let c={...f},y=!1,E;if(n._optimisticResults){const T=this.hasListeners(),W=!T&&Rf(t,n),me=T&&jf(t,r,n,s);(W||me)&&(c={...c,...Up(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:v,errorUpdatedAt:x,status:S}=c;E=c.data;let p=!1;if(n.placeholderData!==void 0&&E===void 0&&S==="pending"){let T;i!=null&&i.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(T=i.data,p=!0):T=typeof n.placeholderData=="function"?n.placeholderData((z=w(this,_r))==null?void 0:z.state.data,w(this,_r)):n.placeholderData,T!==void 0&&(S="success",E=Sa(i==null?void 0:i.data,T,n),y=!0)}if(n.select&&E!==void 0&&!p)if(i&&E===(l==null?void 0:l.data)&&n.select===w(this,Bs))E=w(this,jr);else try{L(this,Bs,n.select),E=n.select(E),E=Sa(i==null?void 0:i.data,E,n),L(this,jr,E),L(this,Zt,null)}catch(T){L(this,Zt,T)}w(this,Zt)&&(v=w(this,Zt),E=w(this,jr),x=Date.now(),S="error");const d=c.fetchStatus==="fetching",h=S==="pending",g=S==="error",N=h&&d,R=E!==void 0,_={status:S,fetchStatus:c.fetchStatus,isPending:h,isSuccess:S==="success",isError:g,isInitialLoading:N,isLoading:N,data:E,dataUpdatedAt:c.dataUpdatedAt,error:v,errorUpdatedAt:x,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:d,isRefetching:d&&!h,isLoadingError:g&&!R,isPaused:c.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:g&&R,isStale:Wu(t,n),refetch:this.refetch,promise:w(this,Ot),isEnabled:Xe(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=xe=>{_.status==="error"?xe.reject(_.error):_.data!==void 0&&xe.resolve(_.data)},W=()=>{const xe=L(this,Ot,_.promise=Ea());T(xe)},me=w(this,Ot);switch(me.status){case"pending":t.queryHash===r.queryHash&&T(me);break;case"fulfilled":(_.status==="error"||_.data!==me.value)&&W();break;case"rejected":(_.status!=="error"||_.error!==me.reason)&&W();break}}return _}updateResult(){const t=w(this,Re),n=this.createResult(w(this,b),this.options);if(L(this,Un,w(this,b).state),L(this,Rr,this.options),w(this,Un).data!==void 0&&L(this,_r,w(this,b)),wa(n,t))return;L(this,Re,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!w(this,Or).size)return!0;const l=new Set(i??w(this,Or));return this.options.throwOnError&&l.add("error"),Object.keys(w(this,Re)).some(o=>{const a=o;return w(this,Re)[a]!==t[a]&&l.has(a)})};$(this,Q,zp).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$(this,Q,Ra).call(this)}},Fe=new WeakMap,b=new WeakMap,bs=new WeakMap,Re=new WeakMap,Un=new WeakMap,Rr=new WeakMap,Ot=new WeakMap,Zt=new WeakMap,Bs=new WeakMap,jr=new WeakMap,_r=new WeakMap,zn=new WeakMap,$n=new WeakMap,en=new WeakMap,Or=new WeakMap,Q=new WeakSet,us=function(t){$(this,Q,Oa).call(this);let n=w(this,b).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ie)),n},Ca=function(){$(this,Q,ja).call(this);const t=gn(this.options.staleTime,w(this,b));if(Xn||w(this,Re).isStale||!va(t))return;const r=Lp(w(this,Re).dataUpdatedAt,t)+1;L(this,zn,Tn.setTimeout(()=>{w(this,Re).isStale||this.updateResult()},r))},Na=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(w(this,b)):this.options.refetchInterval)??!1},Pa=function(t){$(this,Q,_a).call(this),L(this,en,t),!(Xn||Xe(this.options.enabled,w(this,b))===!1||!va(w(this,en))||w(this,en)===0)&&L(this,$n,Tn.setInterval(()=>{(this.options.refetchIntervalInBackground||Vu.isFocused())&&$(this,Q,us).call(this)},w(this,en)))},Ra=function(){$(this,Q,Ca).call(this),$(this,Q,Pa).call(this,$(this,Q,Na).call(this))},ja=function(){w(this,zn)&&(Tn.clearTimeout(w(this,zn)),L(this,zn,void 0))},_a=function(){w(this,$n)&&(Tn.clearInterval(w(this,$n)),L(this,$n,void 0))},Oa=function(){const t=w(this,Fe).getQueryCache().build(w(this,Fe),this.options);if(t===w(this,b))return;const n=w(this,b);L(this,b,t),L(this,bs,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},zp=function(t){ge.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(w(this,Re))}),w(this,Fe).getQueryCache().notify({query:w(this,b),type:"observerResultsUpdated"})})},ld);function _0(e,t){return Xe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rf(e,t){return _0(e,t)||e.state.data!==void 0&&Ta(e,t,t.refetchOnMount)}function Ta(e,t,n){if(Xe(t.enabled,e)!==!1&&gn(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Wu(e,t)}return!1}function jf(e,t,n,r){return(e!==t||Xe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Wu(e,n)}function Wu(e,t){return Xe(t.enabled,e)!==!1&&e.isStaleByTime(gn(t.staleTime,e))}function O0(e,t){return!wa(e.getCurrentResult(),t)}function _f(e){return{onFetch:(t,n)=>{var f,c,y,E,v;const r=t.options,s=(y=(c=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:y.direction,i=((E=t.state.data)==null?void 0:E.pages)||[],l=((v=t.state.data)==null?void 0:v.pageParams)||[];let o={pages:[],pageParams:[]},a=0;const u=async()=>{let x=!1;const S=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},p=Fp(t.options,t.fetchOptions),d=async(h,g,N)=>{if(x)return Promise.reject();if(g==null&&h.pages.length)return Promise.resolve(h);const j=(()=>{const W={client:t.client,queryKey:t.queryKey,pageParam:g,direction:N?"backward":"forward",meta:t.options.meta};return S(W),W})(),_=await p(j),{maxPages:z}=t.options,T=N?x0:w0;return{pages:T(h.pages,_,z),pageParams:T(h.pageParams,g,z)}};if(s&&i.length){const h=s==="backward",g=h?T0:Of,N={pages:i,pageParams:l},R=g(r,N);o=await d(N,R,h)}else{const h=e??i.length;do{const g=a===0?l[0]??r.initialPageParam:Of(r,o);if(a>0&&g==null)break;o=await d(o,g),a++}while(a{var x,S;return(S=(x=t.options).persister)==null?void 0:S.call(x,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Of(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function T0(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Hs,vt,je,bn,wt,Qt,od,L0=(od=class extends Dp{constructor(t){super();F(this,wt);F(this,Hs);F(this,vt);F(this,je);F(this,bn);L(this,Hs,t.client),this.mutationId=t.mutationId,L(this,je,t.mutationCache),L(this,vt,[]),this.state=t.state||A0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){w(this,vt).includes(t)||(w(this,vt).push(t),this.clearGcTimeout(),w(this,je).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){L(this,vt,w(this,vt).filter(n=>n!==t)),this.scheduleGc(),w(this,je).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){w(this,vt).length||(this.state.status==="pending"?this.scheduleGc():w(this,je).remove(this))}continue(){var t;return((t=w(this,bn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,o,a,u,f,c,y,E,v,x,S,p,d,h,g,N,R,j,_,z;const n=()=>{$(this,wt,Qt).call(this,{type:"continue"})},r={client:w(this,Hs),meta:this.options.meta,mutationKey:this.options.mutationKey};L(this,bn,Mp({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(T,W)=>{$(this,wt,Qt).call(this,{type:"failed",failureCount:T,error:W})},onPause:()=>{$(this,wt,Qt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>w(this,je).canRun(this)}));const s=this.state.status==="pending",i=!w(this,bn).canStart();try{if(s)n();else{$(this,wt,Qt).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(l=w(this,je).config).onMutate)==null?void 0:o.call(l,t,this,r));const W=await((u=(a=this.options).onMutate)==null?void 0:u.call(a,t,r));W!==this.state.context&&$(this,wt,Qt).call(this,{type:"pending",context:W,variables:t,isPaused:i})}const T=await w(this,bn).start();return await((c=(f=w(this,je).config).onSuccess)==null?void 0:c.call(f,T,t,this.state.context,this,r)),await((E=(y=this.options).onSuccess)==null?void 0:E.call(y,T,t,this.state.context,r)),await((x=(v=w(this,je).config).onSettled)==null?void 0:x.call(v,T,null,this.state.variables,this.state.context,this,r)),await((p=(S=this.options).onSettled)==null?void 0:p.call(S,T,null,t,this.state.context,r)),$(this,wt,Qt).call(this,{type:"success",data:T}),T}catch(T){try{throw await((h=(d=w(this,je).config).onError)==null?void 0:h.call(d,T,t,this.state.context,this,r)),await((N=(g=this.options).onError)==null?void 0:N.call(g,T,t,this.state.context,r)),await((j=(R=w(this,je).config).onSettled)==null?void 0:j.call(R,void 0,T,this.state.variables,this.state.context,this,r)),await((z=(_=this.options).onSettled)==null?void 0:z.call(_,void 0,T,t,this.state.context,r)),T}finally{$(this,wt,Qt).call(this,{type:"error",error:T})}}finally{w(this,je).runNext(this)}}},Hs=new WeakMap,vt=new WeakMap,je=new WeakMap,bn=new WeakMap,wt=new WeakSet,Qt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ge.batch(()=>{w(this,vt).forEach(r=>{r.onMutationUpdate(t)}),w(this,je).notify({mutation:this,type:"updated",action:t})})},od);function A0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Tt,ot,Qs,ad,F0=(ad=class extends Xs{constructor(t={}){super();F(this,Tt);F(this,ot);F(this,Qs);this.config=t,L(this,Tt,new Set),L(this,ot,new Map),L(this,Qs,0)}build(t,n,r){const s=new L0({client:t,mutationCache:this,mutationId:++ii(this,Qs)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){w(this,Tt).add(t);const n=ki(t);if(typeof n=="string"){const r=w(this,ot).get(n);r?r.push(t):w(this,ot).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(w(this,Tt).delete(t)){const n=ki(t);if(typeof n=="string"){const r=w(this,ot).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&w(this,ot).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ki(t);if(typeof n=="string"){const r=w(this,ot).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=ki(t);if(typeof n=="string"){const s=(r=w(this,ot).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ge.batch(()=>{w(this,Tt).forEach(t=>{this.notify({type:"removed",mutation:t})}),w(this,Tt).clear(),w(this,ot).clear()})}getAll(){return Array.from(w(this,Tt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ef(n,r))}findAll(t={}){return this.getAll().filter(n=>Ef(t,n))}notify(t){ge.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ge.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ie))))}},Tt=new WeakMap,ot=new WeakMap,Qs=new WeakMap,ad);function ki(e){var t;return(t=e.options.scope)==null?void 0:t.id}var xt,ud,I0=(ud=class extends Xs{constructor(t={}){super();F(this,xt);this.config=t,L(this,xt,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??Hu(s,n);let l=this.get(i);return l||(l=new R0({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(l)),l}add(t){w(this,xt).has(t.queryHash)||(w(this,xt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=w(this,xt).get(t.queryHash);n&&(t.destroy(),n===t&&w(this,xt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return w(this,xt).get(t)}getAll(){return[...w(this,xt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Sf(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Sf(t,r)):n}notify(t){ge.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},xt=new WeakMap,ud),re,tn,nn,Tr,Lr,rn,Ar,Fr,cd,M0=(cd=class{constructor(e={}){F(this,re);F(this,tn);F(this,nn);F(this,Tr);F(this,Lr);F(this,rn);F(this,Ar);F(this,Fr);L(this,re,e.queryCache||new I0),L(this,tn,e.mutationCache||new F0),L(this,nn,e.defaultOptions||{}),L(this,Tr,new Map),L(this,Lr,new Map),L(this,rn,0)}mount(){ii(this,rn)._++,w(this,rn)===1&&(L(this,Ar,Vu.subscribe(async e=>{e&&(await this.resumePausedMutations(),w(this,re).onFocus())})),L(this,Fr,pl.subscribe(async e=>{e&&(await this.resumePausedMutations(),w(this,re).onOnline())})))}unmount(){var e,t;ii(this,rn)._--,w(this,rn)===0&&((e=w(this,Ar))==null||e.call(this),L(this,Ar,void 0),(t=w(this,Fr))==null||t.call(this),L(this,Fr,void 0))}isFetching(e){return w(this,re).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return w(this,tn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=w(this,re).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=w(this,re).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(gn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return w(this,re).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=w(this,re).get(r.queryHash),i=s==null?void 0:s.state.data,l=y0(t,i);if(l!==void 0)return w(this,re).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return ge.batch(()=>w(this,re).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=w(this,re).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=w(this,re);ge.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=w(this,re);return ge.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ge.batch(()=>w(this,re).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Ie).catch(Ie)}invalidateQueries(e,t={}){return ge.batch(()=>(w(this,re).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ge.batch(()=>w(this,re).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Ie)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Ie)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=w(this,re).build(this,t);return n.isStaleByTime(gn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ie).catch(Ie)}fetchInfiniteQuery(e){return e.behavior=_f(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ie).catch(Ie)}ensureInfiniteQueryData(e){return e.behavior=_f(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return pl.isOnline()?w(this,tn).resumePausedMutations():Promise.resolve()}getQueryCache(){return w(this,re)}getMutationCache(){return w(this,tn)}getDefaultOptions(){return w(this,nn)}setDefaultOptions(e){L(this,nn,e)}setQueryDefaults(e,t){w(this,Tr).set(Us(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...w(this,Tr).values()],n={};return t.forEach(r=>{zs(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){w(this,Lr).set(Us(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...w(this,Lr).values()],n={};return t.forEach(r=>{zs(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...w(this,nn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Hu(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Qu&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...w(this,nn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){w(this,re).clear(),w(this,tn).clear()}},re=new WeakMap,tn=new WeakMap,nn=new WeakMap,Tr=new WeakMap,Lr=new WeakMap,rn=new WeakMap,Ar=new WeakMap,Fr=new WeakMap,cd),$p=C.createContext(void 0),qu=e=>{const t=C.useContext($p);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},D0=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx($p.Provider,{value:e,children:t})),bp=C.createContext(!1),U0=()=>C.useContext(bp);bp.Provider;function z0(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $0=C.createContext(z0()),b0=()=>C.useContext($0),B0=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},H0=e=>{C.useEffect(()=>{e.clearReset()},[e])},Q0=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||S0(n,[e.error,r])),V0=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},W0=(e,t)=>e.isLoading&&e.isFetching&&!t,q0=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Tf=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function K0(e,t,n){var c,y,E,v,x;const r=U0(),s=b0(),i=qu(),l=i.defaultQueryOptions(e);(y=(c=i.getDefaultOptions().queries)==null?void 0:c._experimental_beforeQuery)==null||y.call(c,l),l._optimisticResults=r?"isRestoring":"optimistic",V0(l),B0(l,s),H0(s);const o=!i.getQueryCache().get(l.queryHash),[a]=C.useState(()=>new t(i,l)),u=a.getOptimisticResult(l),f=!r&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(S=>{const p=f?a.subscribe(ge.batchCalls(S)):Ie;return a.updateResult(),p},[a,f]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),C.useEffect(()=>{a.setOptions(l)},[l,a]),q0(l,u))throw Tf(l,a,s);if(Q0({result:u,errorResetBoundary:s,throwOnError:l.throwOnError,query:i.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw u.error;if((v=(E=i.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||v.call(E,l,u),l.experimental_prefetchInRender&&!Xn&&W0(u,r)){const S=o?Tf(l,a,s):(x=i.getQueryCache().get(l.queryHash))==null?void 0:x.promise;S==null||S.catch(Ie).finally(()=>{a.updateResult()})}return l.notifyOnChangeProps?u:a.trackResult(u)}function Ci(e,t){return K0(e,j0)}let J0={data:""},G0=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||J0},X0=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Y0=/\/\*[^]*?\*\/| +/g,Lf=/\n+/g,Jt=(e,t)=>{let n="",r="",s="";for(let i in e){let l=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+l+";":r+=i[1]=="f"?Jt(l,i):i+"{"+Jt(l,i[1]=="k"?"":t)+"}":typeof l=="object"?r+=Jt(l,t?t.replace(/([^,])+/g,o=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,a=>/&/.test(a)?a.replace(/&/g,o):o?o+" "+a:a)):i):l!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=Jt.p?Jt.p(i,l):i+":"+l+";")}return n+(t&&s?t+"{"+s+"}":s)+r},Pt={},Bp=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Bp(e[n]);return t}return e},Z0=(e,t,n,r,s)=>{let i=Bp(e),l=Pt[i]||(Pt[i]=(a=>{let u=0,f=11;for(;u>>0;return"go"+f})(i));if(!Pt[l]){let a=i!==e?e:(u=>{let f,c,y=[{}];for(;f=X0.exec(u.replace(Y0,""));)f[4]?y.shift():f[3]?(c=f[3].replace(Lf," ").trim(),y.unshift(y[0][c]=y[0][c]||{})):y[0][f[1]]=f[2].replace(Lf," ").trim();return y[0]})(e);Pt[l]=Jt(s?{["@keyframes "+l]:a}:a,n?"":"."+l)}let o=n&&Pt.g?Pt.g:null;return n&&(Pt.g=Pt[l]),((a,u,f,c)=>{c?u.data=u.data.replace(c,a):u.data.indexOf(a)===-1&&(u.data=f?a+u.data:u.data+a)})(Pt[l],t,r,o),l},e1=(e,t,n)=>e.reduce((r,s,i)=>{let l=t[i];if(l&&l.call){let o=l(n),a=o&&o.props&&o.props.className||/^go/.test(o)&&o;l=a?"."+a:o&&typeof o=="object"?o.props?"":Jt(o,""):o===!1?"":o}return r+s+(l??"")},"");function Fl(e){let t=this||{},n=e.call?e(t.p):e;return Z0(n.unshift?n.raw?e1(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,G0(t.target),t.g,t.o,t.k)}let Hp,La,Aa;Fl.bind({g:1});let zt=Fl.bind({k:1});function t1(e,t,n,r){Jt.p=t,Hp=e,La=n,Aa=r}function Cn(e,t){let n=this||{};return function(){let r=arguments;function s(i,l){let o=Object.assign({},i),a=o.className||s.className;n.p=Object.assign({theme:La&&La()},o),n.o=/ *go\d+/.test(a),o.className=Fl.apply(n,r)+(a?" "+a:"");let u=e;return e[0]&&(u=o.as||e,delete o.as),Aa&&u[0]&&Aa(o),Hp(u,o)}return s}}var n1=e=>typeof e=="function",ml=(e,t)=>n1(e)?e(t):e,r1=(()=>{let e=0;return()=>(++e).toString()})(),Qp=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),s1=20,Ku="default",Vp=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(l=>l.id===t.toast.id?{...l,...t.toast}:l)};case 2:let{toast:r}=t;return Vp(e,{type:e.toasts.find(l=>l.id===r.id)?1:0,toast:r});case 3:let{toastId:s}=t;return{...e,toasts:e.toasts.map(l=>l.id===s||s===void 0?{...l,dismissed:!0,visible:!1}:l)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(l=>l.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(l=>({...l,pauseDuration:l.pauseDuration+i}))}}},zi=[],Wp={toasts:[],pausedAt:void 0,settings:{toastLimit:s1}},Et={},qp=(e,t=Ku)=>{Et[t]=Vp(Et[t]||Wp,e),zi.forEach(([n,r])=>{n===t&&r(Et[t])})},Kp=e=>Object.keys(Et).forEach(t=>qp(e,t)),i1=e=>Object.keys(Et).find(t=>Et[t].toasts.some(n=>n.id===e)),Il=(e=Ku)=>t=>{qp(t,e)},l1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},o1=(e={},t=Ku)=>{let[n,r]=C.useState(Et[t]||Wp),s=C.useRef(Et[t]);C.useEffect(()=>(s.current!==Et[t]&&r(Et[t]),zi.push([t,r]),()=>{let l=zi.findIndex(([o])=>o===t);l>-1&&zi.splice(l,1)}),[t]);let i=n.toasts.map(l=>{var o,a,u;return{...e,...e[l.type],...l,removeDelay:l.removeDelay||((o=e[l.type])==null?void 0:o.removeDelay)||(e==null?void 0:e.removeDelay),duration:l.duration||((a=e[l.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||l1[l.type],style:{...e.style,...(u=e[l.type])==null?void 0:u.style,...l.style}}});return{...n,toasts:i}},a1=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||r1()}),Ys=e=>(t,n)=>{let r=a1(t,e,n);return Il(r.toasterId||i1(r.id))({type:2,toast:r}),r.id},ce=(e,t)=>Ys("blank")(e,t);ce.error=Ys("error");ce.success=Ys("success");ce.loading=Ys("loading");ce.custom=Ys("custom");ce.dismiss=(e,t)=>{let n={type:3,toastId:e};t?Il(t)(n):Kp(n)};ce.dismissAll=e=>ce.dismiss(void 0,e);ce.remove=(e,t)=>{let n={type:4,toastId:e};t?Il(t)(n):Kp(n)};ce.removeAll=e=>ce.remove(void 0,e);ce.promise=(e,t,n)=>{let r=ce.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(s=>{let i=t.success?ml(t.success,s):void 0;return i?ce.success(i,{id:r,...n,...n==null?void 0:n.success}):ce.dismiss(r),s}).catch(s=>{let i=t.error?ml(t.error,s):void 0;i?ce.error(i,{id:r,...n,...n==null?void 0:n.error}):ce.dismiss(r)}),e};var u1=1e3,c1=(e,t="default")=>{let{toasts:n,pausedAt:r}=o1(e,t),s=C.useRef(new Map).current,i=C.useCallback((c,y=u1)=>{if(s.has(c))return;let E=setTimeout(()=>{s.delete(c),l({type:4,toastId:c})},y);s.set(c,E)},[]);C.useEffect(()=>{if(r)return;let c=Date.now(),y=n.map(E=>{if(E.duration===1/0)return;let v=(E.duration||0)+E.pauseDuration-(c-E.createdAt);if(v<0){E.visible&&ce.dismiss(E.id);return}return setTimeout(()=>ce.dismiss(E.id,t),v)});return()=>{y.forEach(E=>E&&clearTimeout(E))}},[n,r,t]);let l=C.useCallback(Il(t),[t]),o=C.useCallback(()=>{l({type:5,time:Date.now()})},[l]),a=C.useCallback((c,y)=>{l({type:1,toast:{id:c,height:y}})},[l]),u=C.useCallback(()=>{r&&l({type:6,time:Date.now()})},[r,l]),f=C.useCallback((c,y)=>{let{reverseOrder:E=!1,gutter:v=8,defaultPosition:x}=y||{},S=n.filter(h=>(h.position||x)===(c.position||x)&&h.height),p=S.findIndex(h=>h.id===c.id),d=S.filter((h,g)=>gh.visible).slice(...E?[d+1]:[0,d]).reduce((h,g)=>h+(g.height||0)+v,0)},[n]);return C.useEffect(()=>{n.forEach(c=>{if(c.dismissed)i(c.id,c.removeDelay);else{let y=s.get(c.id);y&&(clearTimeout(y),s.delete(c.id))}})},[n,i]),{toasts:n,handlers:{updateHeight:a,startPause:o,endPause:u,calculateOffset:f}}},f1=zt` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,d1=zt` from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; }`,h1=zt` from { transform: scale(0) rotate(90deg); opacity: 0; } to { transform: scale(1) rotate(90deg); opacity: 1; }`,p1=Cn("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#ff4b4b"}; position: relative; transform: rotate(45deg); animation: ${f1} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after, &:before { content: ''; animation: ${d1} 0.15s ease-out forwards; animation-delay: 150ms; position: absolute; border-radius: 3px; opacity: 0; background: ${e=>e.secondary||"#fff"}; bottom: 9px; left: 4px; height: 2px; width: 12px; } &:before { animation: ${h1} 0.15s ease-out forwards; animation-delay: 180ms; transform: rotate(90deg); } `,m1=zt` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,y1=Cn("div")` width: 12px; height: 12px; box-sizing: border-box; border: 2px solid; border-radius: 100%; border-color: ${e=>e.secondary||"#e0e0e0"}; border-right-color: ${e=>e.primary||"#616161"}; animation: ${m1} 1s linear infinite; `,g1=zt` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,v1=zt` 0% { height: 0; width: 0; opacity: 0; } 40% { height: 0; width: 6px; opacity: 1; } 100% { opacity: 1; height: 10px; }`,w1=Cn("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#61d345"}; position: relative; transform: rotate(45deg); animation: ${g1} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after { content: ''; box-sizing: border-box; animation: ${v1} 0.2s ease-out forwards; opacity: 0; animation-delay: 200ms; position: absolute; border-right: 2px solid; border-bottom: 2px solid; border-color: ${e=>e.secondary||"#fff"}; bottom: 6px; left: 6px; height: 10px; width: 6px; } `,x1=Cn("div")` position: absolute; `,S1=Cn("div")` position: relative; display: flex; justify-content: center; align-items: center; min-width: 20px; min-height: 20px; `,E1=zt` from { transform: scale(0.6); opacity: 0.4; } to { transform: scale(1); opacity: 1; }`,k1=Cn("div")` position: relative; transform: scale(0.6); opacity: 0.4; min-width: 20px; animation: ${E1} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; `,C1=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?C.createElement(k1,null,t):t:n==="blank"?null:C.createElement(S1,null,C.createElement(y1,{...r}),n!=="loading"&&C.createElement(x1,null,n==="error"?C.createElement(p1,{...r}):C.createElement(w1,{...r})))},N1=e=>` 0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} 100% {transform: translate3d(0,0,0) scale(1); opacity:1;} `,P1=e=>` 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} `,R1="0%{opacity:0;} 100%{opacity:1;}",j1="0%{opacity:1;} 100%{opacity:0;}",_1=Cn("div")` display: flex; align-items: center; background: #fff; color: #363636; line-height: 1.3; will-change: transform; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); max-width: 350px; pointer-events: auto; padding: 8px 10px; border-radius: 8px; `,O1=Cn("div")` display: flex; justify-content: center; margin: 4px 10px; color: inherit; flex: 1 1 auto; white-space: pre-line; `,T1=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=Qp()?[R1,j1]:[N1(n),P1(n)];return{animation:t?`${zt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${zt(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},L1=C.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?T1(e.position||t||"top-center",e.visible):{opacity:0},i=C.createElement(C1,{toast:e}),l=C.createElement(O1,{...e.ariaProps},ml(e.message,e));return C.createElement(_1,{className:e.className,style:{...s,...n,...e.style}},typeof r=="function"?r({icon:i,message:l}):C.createElement(C.Fragment,null,i,l))});t1(C.createElement);var A1=({id:e,className:t,style:n,onHeightUpdate:r,children:s})=>{let i=C.useCallback(l=>{if(l){let o=()=>{let a=l.getBoundingClientRect().height;r(e,a)};o(),new MutationObserver(o).observe(l,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return C.createElement("div",{ref:i,className:t,style:n},s)},F1=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},s=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Qp()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...s}},I1=Fl` z-index: 9999; > * { pointer-events: auto; } `,Ni=16,M1=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,toasterId:i,containerStyle:l,containerClassName:o})=>{let{toasts:a,handlers:u}=c1(n,i);return C.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:Ni,left:Ni,right:Ni,bottom:Ni,pointerEvents:"none",...l},className:o,onMouseEnter:u.startPause,onMouseLeave:u.endPause},a.map(f=>{let c=f.position||t,y=u.calculateOffset(f,{reverseOrder:e,gutter:r,defaultPosition:t}),E=F1(c,y);return C.createElement(A1,{id:f.id,key:f.id,onHeightUpdate:u.updateHeight,className:f.visible?I1:"",style:E},f.type==="custom"?ml(f.message,f):s?s(f):C.createElement(L1,{toast:f,position:c}))}))},NS=ce;const D1="modulepreload",U1=function(e){return"/"+e},Af={},Ju=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),o=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));s=Promise.allSettled(n.map(a=>{if(a=U1(a),a in Af)return;Af[a]=!0;const u=a.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${f}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":D1,u||(c.as="script"),c.crossOrigin="",c.href=a,o&&c.setAttribute("nonce",o),document.head.appendChild(c),u)return new Promise((y,E)=>{c.addEventListener("load",y),c.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${a}`)))})}))}function i(l){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l}return s.then(l=>{for(const o of l||[])o.status==="rejected"&&i(o.reason);return t().catch(i)})};function Jp(){const[e,t]=C.useState(null),[n,r]=C.useState(!1),[s,i]=C.useState(!0);return C.useEffect(()=>{const a=localStorage.getItem("accessToken");if(r(!!a),a){const u=localStorage.getItem("user");if(u)try{t(JSON.parse(u))}catch{}}i(!1)},[]),{user:e,isAuthenticated:n,isLoading:s,login:(a,u)=>{r(!0),u&&(localStorage.setItem("user",JSON.stringify(u)),t(u))},logout:()=>{localStorage.removeItem("accessToken"),localStorage.removeItem("user"),t(null),r(!1)}}}/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const z1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gp=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var $1={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.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const b1=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:l,...o},a)=>C.createElement("svg",{ref:a,...$1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Gp("lucide",s),...o},[...l.map(([u,f])=>C.createElement(u,f)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pe=(e,t)=>{const n=C.forwardRef(({className:r,...s},i)=>C.createElement(b1,{ref:i,iconNode:t,className:Gp(`lucide-${z1(e)}`,r),...s}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const B1=Pe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const H1=Pe("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Q1=Pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Xp=Pe("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const V1=Pe("Kanban",[["path",{d:"M6 5v11",key:"mdvv1e"}],["path",{d:"M12 5v6",key:"14ar3b"}],["path",{d:"M18 5v14",key:"7ji314"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const W1=Pe("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.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const q1=Pe("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const K1=Pe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const J1=Pe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Yp=Pe("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const G1=Pe("Snowflake",[["line",{x1:"2",x2:"22",y1:"12",y2:"12",key:"1dnqot"}],["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"m20 16-4-4 4-4",key:"rquw4f"}],["path",{d:"m4 8 4 4-4 4",key:"12s3z9"}],["path",{d:"m16 4-4 4-4-4",key:"1tumq1"}],["path",{d:"m8 20 4-4 4 4",key:"9p200w"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const X1=Pe("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Y1=Pe("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Z1=Pe("TriangleAlert",[["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-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ew=Pe("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** * @license lucide-react v0.378.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Zp=Pe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);function tw(){const{user:e,logout:t}=Jp(),n=tr(),r=[{path:"/",label:"لوحة التحكم",icon:W1},{path:"/leads",label:"العملاء المحتملين",icon:Zp},{path:"/pipeline",label:"البايبلاين",icon:V1}];return m.jsxs("div",{className:"min-h-screen flex",children:[m.jsxs("aside",{className:"w-64 bg-gray-900 text-white",children:[m.jsx("div",{className:"p-4 border-b border-gray-800",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"w-10 h-10 bg-primary-600 rounded-lg flex items-center justify-center",children:m.jsx("span",{className:"font-bold text-lg",children:"C"})}),m.jsxs("div",{children:[m.jsx("h1",{className:"font-bold",children:"Clal CRM"}),m.jsx("p",{className:"text-xs text-gray-400",children:e==null?void 0:e.name})]})]})}),m.jsx("nav",{className:"p-4 space-y-1",children:r.map(s=>{const i=n.pathname===s.path;return m.jsxs(Qn,{to:s.path,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition ${i?"bg-primary-600 text-white":"text-gray-400 hover:bg-gray-800 hover:text-white"}`,children:[m.jsx(s.icon,{className:"w-5 h-5"}),m.jsx("span",{children:s.label})]},s.path)})}),m.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-4",children:m.jsxs("button",{onClick:t,className:"flex items-center gap-3 px-4 py-3 rounded-lg text-gray-400 hover:bg-gray-800 hover:text-white w-full transition",children:[m.jsx(q1,{className:"w-5 h-5"}),m.jsx("span",{children:"تسجيل الخروج"})]})})]}),m.jsx("main",{className:"flex-1 p-6 overflow-y-auto",children:m.jsx(Zv,{})})]})}function nw(){const[e,t]=C.useState(!1);return qu(),null}function rw(){const e=qu();return C.useRef(null),C.useEffect(()=>{},[e]),null}function Z({className:e=""}){return m.jsx("div",{className:`animate-pulse bg-gray-200 rounded ${e}`})}function sw(){return m.jsxs("div",{className:"bg-white rounded-lg border p-4 space-y-3",children:[m.jsx(Z,{className:"h-40 w-full rounded-lg"}),m.jsx(Z,{className:"h-4 w-3/4"}),m.jsx(Z,{className:"h-4 w-1/2"}),m.jsxs("div",{className:"flex justify-between items-center pt-2",children:[m.jsx(Z,{className:"h-6 w-20"}),m.jsx(Z,{className:"h-8 w-24 rounded-lg"})]})]})}function iw(){return m.jsxs("div",{className:"bg-white rounded-lg border p-4 flex items-center gap-4",children:[m.jsx(Z,{className:"h-12 w-12 rounded-full"}),m.jsxs("div",{className:"flex-1 space-y-2",children:[m.jsx(Z,{className:"h-4 w-1/3"}),m.jsx(Z,{className:"h-3 w-1/2"})]}),m.jsx(Z,{className:"h-8 w-20 rounded"})]})}function lw(){return m.jsx("div",{className:"flex gap-4 overflow-x-auto p-4",children:[1,2,3,4].map(e=>m.jsxs("div",{className:"min-w-[280px] bg-gray-50 rounded-lg p-3 space-y-3",children:[m.jsx(Z,{className:"h-8 w-full rounded"}),[1,2,3].map(t=>m.jsxs("div",{className:"bg-white rounded-lg border p-3 space-y-2",children:[m.jsx(Z,{className:"h-4 w-3/4"}),m.jsx(Z,{className:"h-3 w-1/2"})]},t))]},e))})}function ow(){return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"bg-white rounded-lg border p-6 space-y-4",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx(Z,{className:"h-16 w-16 rounded-full"}),m.jsxs("div",{className:"flex-1 space-y-2",children:[m.jsx(Z,{className:"h-6 w-1/3"}),m.jsx(Z,{className:"h-4 w-1/4"})]})]}),m.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 pt-4",children:[1,2,3,4].map(e=>m.jsxs("div",{className:"space-y-2",children:[m.jsx(Z,{className:"h-3 w-16"}),m.jsx(Z,{className:"h-5 w-24"})]},e))})]}),m.jsxs("div",{className:"bg-white rounded-lg border p-6 space-y-4",children:[m.jsx(Z,{className:"h-5 w-32"}),[1,2,3].map(e=>m.jsxs("div",{className:"flex gap-4 py-3 border-b last:border-0",children:[m.jsx(Z,{className:"h-10 w-10 rounded-full"}),m.jsxs("div",{className:"flex-1 space-y-2",children:[m.jsx(Z,{className:"h-4 w-1/2"}),m.jsx(Z,{className:"h-3 w-3/4"})]})]},e))]})]})}function aw({count:e=5}){return m.jsxs("div",{className:"bg-white rounded-lg border overflow-hidden",children:[m.jsx("div",{className:"bg-gray-50 px-4 py-3 flex gap-4",children:[1,2,3,4,5].map(t=>m.jsx(Z,{className:"h-4 w-24"},t))}),Array.from({length:e}).map((t,n)=>m.jsx("div",{className:"px-4 py-3 flex gap-4 border-t",children:[1,2,3,4,5].map(r=>m.jsx(Z,{className:"h-4 w-24"},r))},n))]})}function go({variant:e="list",count:t=4}){switch(e){case"cards":return m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 p-4",children:Array.from({length:t}).map((n,r)=>m.jsx(sw,{},r))});case"kanban":return m.jsx(lw,{});case"detail":return m.jsx(ow,{});case"table":return m.jsx(aw,{count:t});case"list":default:return m.jsx("div",{className:"space-y-3 p-4",children:Array.from({length:t}).map((n,r)=>m.jsx(iw,{},r))})}}class uw extends qa.Component{constructor(n){super(n);bl(this,"handleReload",()=>{window.location.reload()});bl(this,"handleReset",()=>{this.setState({hasError:!1,error:void 0})});this.state={hasError:!1}}static getDerivedStateFromError(n){return{hasError:!0,error:n}}componentDidCatch(n,r){console.error("[ErrorBoundary] Caught error:",n,r);try{const s="https://api.clalmobile.com/api";s&&fetch(`${s.replace(/\/+$/,"")}/errors`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"react_crash",message:n.message,stack:n.stack,component_stack:r.componentStack,url:window.location.href,timestamp:new Date().toISOString()})}).catch(()=>{})}catch{}}render(){var n,r,s;if(this.state.hasError){if(this.props.fallback)return this.props.fallback;const i=(r=(n=this.state.error)==null?void 0:n.message)==null?void 0:r.includes(".map is not a function");return m.jsx("div",{className:"min-h-[400px] flex items-center justify-center p-4",children:m.jsxs("div",{className:"text-center max-w-md",children:[m.jsx("div",{className:"text-6xl mb-4",children:"⚠️"}),m.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"حدث خطأ غير متوقع"}),m.jsx("p",{className:"text-gray-500 mb-2",children:i?"خطأ في تحميل البيانات. قد تكون البيانات بصيغة غير متوقعة.":"نعتذر عن هذا الخطأ. يرجى إعادة تحميل الصفحة."}),((s=this.state.error)==null?void 0:s.message)&&m.jsx("p",{className:"text-xs text-gray-400 mb-4 font-mono bg-gray-50 p-2 rounded overflow-auto",children:this.state.error.message.slice(0,200)}),m.jsxs("div",{className:"flex gap-3 justify-center flex-wrap",children:[m.jsx("button",{onClick:this.handleReload,className:"btn btn-primary",children:"إعادة تحميل"}),m.jsx("button",{onClick:this.handleReset,className:"btn btn-secondary",children:"حاول مرة أخرى"}),m.jsx(Qn,{to:"/pipeline",className:"btn btn-secondary",children:"العودة للبايبلاين"})]})]})})}return this.props.children}}const cw="https://api.clalmobile.com/api";function fw(){const e=Gs(),[t,n]=C.useState("جاري تسجيل الدخول...");return C.useEffect(()=>{(async()=>{try{const i=await(await fetch(`${cw}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:"admin@clalmobile.co.il",password:"admin123"})})).json();i.accessToken?(localStorage.setItem("accessToken",i.accessToken),localStorage.setItem("token",i.accessToken),localStorage.setItem("user",JSON.stringify(i.user)),n("تم تسجيل الدخول بنجاح!"),setTimeout(()=>e("/",{replace:!0}),500)):n("فشل تسجيل الدخول")}catch(s){console.error("Auto-login error:",s),n("خطأ في الاتصال")}})()},[e]),m.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-900 px-4",children:m.jsxs("div",{className:"w-full max-w-md",children:[m.jsxs("div",{className:"text-center mb-8",children:[m.jsx("div",{className:"w-16 h-16 bg-primary-600 rounded-2xl flex items-center justify-center mx-auto mb-4",children:m.jsx("span",{className:"text-white font-bold text-3xl",children:"C"})}),m.jsx("h1",{className:"text-2xl font-bold text-white",children:"Clal CRM"}),m.jsx("p",{className:"text-gray-400 mt-2",children:"إدارة علاقات العملاء"})]}),m.jsxs("div",{className:"card text-center py-8",children:[m.jsx("div",{className:"w-12 h-12 border-4 border-primary-600 border-t-transparent rounded-full animate-spin mx-auto mb-4"}),m.jsx("p",{className:"text-lg text-gray-300",children:t})]})]})})}function em(e,t){return function(){return e.apply(t,arguments)}}const{toString:dw}=Object.prototype,{getPrototypeOf:Gu}=Object,{iterator:Ml,toStringTag:tm}=Symbol,Dl=(e=>t=>{const n=dw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ht=e=>(e=e.toLowerCase(),t=>Dl(t)===e),Ul=e=>t=>typeof t===e,{isArray:Kr}=Array,Br=Ul("undefined");function Zs(e){return e!==null&&!Br(e)&&e.constructor!==null&&!Br(e.constructor)&&be(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const nm=ht("ArrayBuffer");function hw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&nm(e.buffer),t}const pw=Ul("string"),be=Ul("function"),rm=Ul("number"),ei=e=>e!==null&&typeof e=="object",mw=e=>e===!0||e===!1,$i=e=>{if(Dl(e)!=="object")return!1;const t=Gu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(tm in e)&&!(Ml in e)},yw=e=>{if(!ei(e)||Zs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},gw=ht("Date"),vw=ht("File"),ww=ht("Blob"),xw=ht("FileList"),Sw=e=>ei(e)&&be(e.pipe),Ew=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||be(e.append)&&((t=Dl(e))==="formdata"||t==="object"&&be(e.toString)&&e.toString()==="[object FormData]"))},kw=ht("URLSearchParams"),[Cw,Nw,Pw,Rw]=["ReadableStream","Request","Response","Headers"].map(ht),jw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ti(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Kr(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Ln=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,im=e=>!Br(e)&&e!==Ln;function Fa(){const{caseless:e,skipUndefined:t}=im(this)&&this||{},n={},r=(s,i)=>{const l=e&&sm(n,i)||i;$i(n[l])&&$i(s)?n[l]=Fa(n[l],s):$i(s)?n[l]=Fa({},s):Kr(s)?n[l]=s.slice():(!t||!Br(s))&&(n[l]=s)};for(let s=0,i=arguments.length;s(ti(t,(s,i)=>{n&&be(s)?e[i]=em(s,n):e[i]=s},{allOwnKeys:r}),e),Ow=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Tw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Lw=(e,t,n,r)=>{let s,i,l;const o={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)l=s[i],(!r||r(l,e,t))&&!o[l]&&(t[l]=e[l],o[l]=!0);e=n!==!1&&Gu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Aw=(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},Fw=e=>{if(!e)return null;if(Kr(e))return e;let t=e.length;if(!rm(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Iw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Gu(Uint8Array)),Mw=(e,t)=>{const r=(e&&e[Ml]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Dw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Uw=ht("HTMLFormElement"),zw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ff=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$w=ht("RegExp"),lm=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ti(n,(s,i)=>{let l;(l=t(s,i,e))!==!1&&(r[i]=l||s)}),Object.defineProperties(e,r)},bw=e=>{lm(e,(t,n)=>{if(be(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(be(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+"'")})}})},Bw=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Kr(e)?r(e):r(String(e).split(t)),n},Hw=()=>{},Qw=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Vw(e){return!!(e&&be(e.append)&&e[tm]==="FormData"&&e[Ml])}const Ww=e=>{const t=new Array(10),n=(r,s)=>{if(ei(r)){if(t.indexOf(r)>=0)return;if(Zs(r))return r;if(!("toJSON"in r)){t[s]=r;const i=Kr(r)?[]:{};return ti(r,(l,o)=>{const a=n(l,s+1);!Br(a)&&(i[o]=a)}),t[s]=void 0,i}}return r};return n(e,0)},qw=ht("AsyncFunction"),Kw=e=>e&&(ei(e)||be(e))&&be(e.then)&&be(e.catch),om=((e,t)=>e?setImmediate:t?((n,r)=>(Ln.addEventListener("message",({source:s,data:i})=>{s===Ln&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Ln.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",be(Ln.postMessage)),Jw=typeof queueMicrotask<"u"?queueMicrotask.bind(Ln):typeof process<"u"&&process.nextTick||om,Gw=e=>e!=null&&be(e[Ml]),k={isArray:Kr,isArrayBuffer:nm,isBuffer:Zs,isFormData:Ew,isArrayBufferView:hw,isString:pw,isNumber:rm,isBoolean:mw,isObject:ei,isPlainObject:$i,isEmptyObject:yw,isReadableStream:Cw,isRequest:Nw,isResponse:Pw,isHeaders:Rw,isUndefined:Br,isDate:gw,isFile:vw,isBlob:ww,isRegExp:$w,isFunction:be,isStream:Sw,isURLSearchParams:kw,isTypedArray:Iw,isFileList:xw,forEach:ti,merge:Fa,extend:_w,trim:jw,stripBOM:Ow,inherits:Tw,toFlatObject:Lw,kindOf:Dl,kindOfTest:ht,endsWith:Aw,toArray:Fw,forEachEntry:Mw,matchAll:Dw,isHTMLForm:Uw,hasOwnProperty:Ff,hasOwnProp:Ff,reduceDescriptors:lm,freezeMethods:bw,toObjectSet:Bw,toCamelCase:zw,noop:Hw,toFiniteNumber:Qw,findKey:sm,global:Ln,isContextDefined:im,isSpecCompliantForm:Vw,toJSONObject:Ww,isAsyncFn:qw,isThenable:Kw,setImmediate:om,asap:Jw,isIterable:Gw};function M(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}k.inherits(M,Error,{toJSON:function(){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:k.toJSONObject(this.config),code:this.code,status:this.status}}});const am=M.prototype,um={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{um[e]={value:e}});Object.defineProperties(M,um);Object.defineProperty(am,"isAxiosError",{value:!0});M.from=(e,t,n,r,s,i)=>{const l=Object.create(am);k.toFlatObject(e,l,function(f){return f!==Error.prototype},u=>u!=="isAxiosError");const o=e&&e.message?e.message:"Error",a=t==null&&e?e.code:t;return M.call(l,o,a,n,r,s),e&&l.cause==null&&Object.defineProperty(l,"cause",{value:e,configurable:!0}),l.name=e&&e.name||"Error",i&&Object.assign(l,i),l};const Xw=null;function Ia(e){return k.isPlainObject(e)||k.isArray(e)}function cm(e){return k.endsWith(e,"[]")?e.slice(0,-2):e}function If(e,t,n){return e?e.concat(t).map(function(s,i){return s=cm(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function Yw(e){return k.isArray(e)&&!e.some(Ia)}const Zw=k.toFlatObject(k,{},null,function(t){return/^is[A-Z]/.test(t)});function zl(e,t,n){if(!k.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,S){return!k.isUndefined(S[x])});const r=n.metaTokens,s=n.visitor||f,i=n.dots,l=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(t);if(!k.isFunction(s))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(k.isDate(v))return v.toISOString();if(k.isBoolean(v))return v.toString();if(!a&&k.isBlob(v))throw new M("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(v)||k.isTypedArray(v)?a&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function f(v,x,S){let p=v;if(v&&!S&&typeof v=="object"){if(k.endsWith(x,"{}"))x=r?x:x.slice(0,-2),v=JSON.stringify(v);else if(k.isArray(v)&&Yw(v)||(k.isFileList(v)||k.endsWith(x,"[]"))&&(p=k.toArray(v)))return x=cm(x),p.forEach(function(h,g){!(k.isUndefined(h)||h===null)&&t.append(l===!0?If([x],g,i):l===null?x:x+"[]",u(h))}),!1}return Ia(v)?!0:(t.append(If(S,x,i),u(v)),!1)}const c=[],y=Object.assign(Zw,{defaultVisitor:f,convertValue:u,isVisitable:Ia});function E(v,x){if(!k.isUndefined(v)){if(c.indexOf(v)!==-1)throw Error("Circular reference detected in "+x.join("."));c.push(v),k.forEach(v,function(p,d){(!(k.isUndefined(p)||p===null)&&s.call(t,p,k.isString(d)?d.trim():d,x,y))===!0&&E(p,x?x.concat(d):[d])}),c.pop()}}if(!k.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Mf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Xu(e,t){this._pairs=[],e&&zl(e,this,t)}const fm=Xu.prototype;fm.append=function(t,n){this._pairs.push([t,n])};fm.toString=function(t){const n=t?function(r){return t.call(this,r,Mf)}:Mf;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function ex(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dm(e,t,n){if(!t)return e;const r=n&&n.encode||ex;k.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=k.isURLSearchParams(t)?t.toString():new Xu(t,n).toString(r),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Df{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){k.forEach(this.handlers,function(r){r!==null&&t(r)})}}const hm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tx=typeof URLSearchParams<"u"?URLSearchParams:Xu,nx=typeof FormData<"u"?FormData:null,rx=typeof Blob<"u"?Blob:null,sx={isBrowser:!0,classes:{URLSearchParams:tx,FormData:nx,Blob:rx},protocols:["http","https","file","blob","url","data"]},Yu=typeof window<"u"&&typeof document<"u",Ma=typeof navigator=="object"&&navigator||void 0,ix=Yu&&(!Ma||["ReactNative","NativeScript","NS"].indexOf(Ma.product)<0),lx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ox=Yu&&window.location.href||"http://localhost",ax=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Yu,hasStandardBrowserEnv:ix,hasStandardBrowserWebWorkerEnv:lx,navigator:Ma,origin:ox},Symbol.toStringTag,{value:"Module"})),Ce={...ax,...sx};function ux(e,t){return zl(e,new Ce.classes.URLSearchParams,{visitor:function(n,r,s,i){return Ce.isNode&&k.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function cx(e){return k.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fx(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r=n.length;return l=!l&&k.isArray(s)?s.length:l,a?(k.hasOwnProp(s,l)?s[l]=[s[l],r]:s[l]=r,!o):((!s[l]||!k.isObject(s[l]))&&(s[l]=[]),t(n,r,s[l],i)&&k.isArray(s[l])&&(s[l]=fx(s[l])),!o)}if(k.isFormData(e)&&k.isFunction(e.entries)){const n={};return k.forEachEntry(e,(r,s)=>{t(cx(r),s,n,0)}),n}return null}function dx(e,t,n){if(k.isString(e))try{return(t||JSON.parse)(e),k.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ni={transitional:hm,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=k.isObject(t);if(i&&k.isHTMLForm(t)&&(t=new FormData(t)),k.isFormData(t))return s?JSON.stringify(pm(t)):t;if(k.isArrayBuffer(t)||k.isBuffer(t)||k.isStream(t)||k.isFile(t)||k.isBlob(t)||k.isReadableStream(t))return t;if(k.isArrayBufferView(t))return t.buffer;if(k.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ux(t,this.formSerializer).toString();if((o=k.isFileList(t))||r.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return zl(o?{"files[]":t}:t,a&&new a,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),dx(t)):t}],transformResponse:[function(t){const n=this.transitional||ni.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(k.isResponse(t)||k.isReadableStream(t))return t;if(t&&k.isString(t)&&(r&&!this.responseType||s)){const l=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(o){if(l)throw o.name==="SyntaxError"?M.from(o,M.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ce.classes.FormData,Blob:Ce.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],e=>{ni.headers[e]={}});const hx=k.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"]),px=e=>{const t={};let n,r,s;return e&&e.split(` `).forEach(function(l){s=l.indexOf(":"),n=l.substring(0,s).trim().toLowerCase(),r=l.substring(s+1).trim(),!(!n||t[n]&&hx[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Uf=Symbol("internals");function ss(e){return e&&String(e).trim().toLowerCase()}function bi(e){return e===!1||e==null?e:k.isArray(e)?e.map(bi):String(e)}function mx(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 yx=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function vo(e,t,n,r,s){if(k.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!k.isString(t)){if(k.isString(r))return t.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(t)}}function gx(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function vx(e,t){const n=k.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,l){return this[r].call(this,t,s,i,l)},configurable:!0})})}let Be=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(o,a,u){const f=ss(a);if(!f)throw new Error("header name must be a non-empty string");const c=k.findKey(s,f);(!c||s[c]===void 0||u===!0||u===void 0&&s[c]!==!1)&&(s[c||a]=bi(o))}const l=(o,a)=>k.forEach(o,(u,f)=>i(u,f,a));if(k.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(k.isString(t)&&(t=t.trim())&&!yx(t))l(px(t),n);else if(k.isObject(t)&&k.isIterable(t)){let o={},a,u;for(const f of t){if(!k.isArray(f))throw TypeError("Object iterator must return a key-value pair");o[u=f[0]]=(a=o[u])?k.isArray(a)?[...a,f[1]]:[a,f[1]]:f[1]}l(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ss(t),t){const r=k.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return mx(s);if(k.isFunction(n))return n.call(this,s,r);if(k.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ss(t),t){const r=k.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||vo(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(l){if(l=ss(l),l){const o=k.findKey(r,l);o&&(!n||vo(r,r[o],o,n))&&(delete r[o],s=!0)}}return k.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||vo(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return k.forEach(this,(s,i)=>{const l=k.findKey(r,i);if(l){n[l]=bi(s),delete n[i];return}const o=t?gx(i):String(i).trim();o!==i&&delete n[i],n[o]=bi(s),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return k.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&k.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(s=>r.set(s)),r}static accessor(t){const r=(this[Uf]=this[Uf]={accessors:{}}).accessors,s=this.prototype;function i(l){const o=ss(l);r[o]||(vx(s,l),r[o]=!0)}return k.isArray(t)?t.forEach(i):i(t),this}};Be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(Be.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});k.freezeMethods(Be);function wo(e,t){const n=this||ni,r=t||n,s=Be.from(r.headers);let i=r.data;return k.forEach(e,function(o){i=o.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function mm(e){return!!(e&&e.__CANCEL__)}function Jr(e,t,n){M.call(this,e??"canceled",M.ERR_CANCELED,t,n),this.name="CanceledError"}k.inherits(Jr,M,{__CANCEL__:!0});function ym(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new M("Request failed with status code "+n.status,[M.ERR_BAD_REQUEST,M.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function wx(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xx(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,l;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),f=r[i];l||(l=u),n[s]=a,r[s]=u;let c=i,y=0;for(;c!==s;)y+=n[c++],c=c%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-l{n=f,s=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const f=Date.now(),c=f-n;c>=r?l(u,f):(s=u,i||(i=setTimeout(()=>{i=null,l(s)},r-c)))},()=>s&&l(s)]}const yl=(e,t,n=3)=>{let r=0;const s=xx(50,250);return Sx(i=>{const l=i.loaded,o=i.lengthComputable?i.total:void 0,a=l-r,u=s(a),f=l<=o;r=l;const c={loaded:l,total:o,progress:o?l/o:void 0,bytes:a,rate:u||void 0,estimated:u&&o&&f?(o-l)/u:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(c)},n)},zf=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},$f=e=>(...t)=>k.asap(()=>e(...t)),Ex=Ce.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ce.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ce.origin),Ce.navigator&&/(msie|trident)/i.test(Ce.navigator.userAgent)):()=>!0,kx=Ce.hasStandardBrowserEnv?{write(e,t,n,r,s,i,l){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];k.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),k.isString(r)&&o.push(`path=${r}`),k.isString(s)&&o.push(`domain=${s}`),i===!0&&o.push("secure"),k.isString(l)&&o.push(`SameSite=${l}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Cx(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Nx(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function gm(e,t,n){let r=!Cx(t);return e&&(r||n==!1)?Nx(e,t):t}const bf=e=>e instanceof Be?{...e}:e;function Yn(e,t){t=t||{};const n={};function r(u,f,c,y){return k.isPlainObject(u)&&k.isPlainObject(f)?k.merge.call({caseless:y},u,f):k.isPlainObject(f)?k.merge({},f):k.isArray(f)?f.slice():f}function s(u,f,c,y){if(k.isUndefined(f)){if(!k.isUndefined(u))return r(void 0,u,c,y)}else return r(u,f,c,y)}function i(u,f){if(!k.isUndefined(f))return r(void 0,f)}function l(u,f){if(k.isUndefined(f)){if(!k.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function o(u,f,c){if(c in t)return r(u,f);if(c in e)return r(void 0,u)}const a={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:o,headers:(u,f,c)=>s(bf(u),bf(f),c,!0)};return k.forEach(Object.keys({...e,...t}),function(f){const c=a[f]||s,y=c(e[f],t[f],f);k.isUndefined(y)&&c!==o||(n[f]=y)}),n}const vm=e=>{const t=Yn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:l,auth:o}=t;if(t.headers=l=Be.from(l),t.url=dm(gm(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&l.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),k.isFormData(n)){if(Ce.hasStandardBrowserEnv||Ce.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(k.isFunction(n.getHeaders)){const a=n.getHeaders(),u=["content-type","content-length"];Object.entries(a).forEach(([f,c])=>{u.includes(f.toLowerCase())&&l.set(f,c)})}}if(Ce.hasStandardBrowserEnv&&(r&&k.isFunction(r)&&(r=r(t)),r||r!==!1&&Ex(t.url))){const a=s&&i&&kx.read(i);a&&l.set(s,a)}return t},Px=typeof XMLHttpRequest<"u",Rx=Px&&function(e){return new Promise(function(n,r){const s=vm(e);let i=s.data;const l=Be.from(s.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:u}=s,f,c,y,E,v;function x(){E&&E(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let S=new XMLHttpRequest;S.open(s.method.toUpperCase(),s.url,!0),S.timeout=s.timeout;function p(){if(!S)return;const h=Be.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),N={data:!o||o==="text"||o==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:h,config:e,request:S};ym(function(j){n(j),x()},function(j){r(j),x()},N),S=null}"onloadend"in S?S.onloadend=p:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(p)},S.onabort=function(){S&&(r(new M("Request aborted",M.ECONNABORTED,e,S)),S=null)},S.onerror=function(g){const N=g&&g.message?g.message:"Network Error",R=new M(N,M.ERR_NETWORK,e,S);R.event=g||null,r(R),S=null},S.ontimeout=function(){let g=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||hm;s.timeoutErrorMessage&&(g=s.timeoutErrorMessage),r(new M(g,N.clarifyTimeoutError?M.ETIMEDOUT:M.ECONNABORTED,e,S)),S=null},i===void 0&&l.setContentType(null),"setRequestHeader"in S&&k.forEach(l.toJSON(),function(g,N){S.setRequestHeader(N,g)}),k.isUndefined(s.withCredentials)||(S.withCredentials=!!s.withCredentials),o&&o!=="json"&&(S.responseType=s.responseType),u&&([y,v]=yl(u,!0),S.addEventListener("progress",y)),a&&S.upload&&([c,E]=yl(a),S.upload.addEventListener("progress",c),S.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(f=h=>{S&&(r(!h||h.type?new Jr(null,e,S):h),S.abort(),S=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const d=wx(s.url);if(d&&Ce.protocols.indexOf(d)===-1){r(new M("Unsupported protocol "+d+":",M.ERR_BAD_REQUEST,e));return}S.send(i||null)})},jx=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,o();const f=u instanceof Error?u:this.reason;r.abort(f instanceof M?f:new Jr(f instanceof Error?f.message:f))}};let l=t&&setTimeout(()=>{l=null,i(new M(`timeout ${t} of ms exceeded`,M.ETIMEDOUT))},t);const o=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:a}=r;return a.unsubscribe=()=>k.asap(o),a}},_x=function*(e,t){let n=e.byteLength;if(n{const s=Ox(e,t);let i=0,l,o=a=>{l||(l=!0,r&&r(a))};return new ReadableStream({async pull(a){try{const{done:u,value:f}=await s.next();if(u){o(),a.close();return}let c=f.byteLength;if(n){let y=i+=c;n(y)}a.enqueue(new Uint8Array(f))}catch(u){throw o(u),u}},cancel(a){return o(a),s.return()}},{highWaterMark:2})},Hf=64*1024,{isFunction:Pi}=k,Lx=(({Request:e,Response:t})=>({Request:e,Response:t}))(k.global),{ReadableStream:Qf,TextEncoder:Vf}=k.global,Wf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ax=e=>{e=k.merge.call({skipUndefined:!0},Lx,e);const{fetch:t,Request:n,Response:r}=e,s=t?Pi(t):typeof fetch=="function",i=Pi(n),l=Pi(r);if(!s)return!1;const o=s&&Pi(Qf),a=s&&(typeof Vf=="function"?(v=>x=>v.encode(x))(new Vf):async v=>new Uint8Array(await new n(v).arrayBuffer())),u=i&&o&&Wf(()=>{let v=!1;const x=new n(Ce.origin,{body:new Qf,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!x}),f=l&&o&&Wf(()=>k.isReadableStream(new r("").body)),c={stream:f&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!c[v]&&(c[v]=(x,S)=>{let p=x&&x[v];if(p)return p.call(x);throw new M(`Response type '${v}' is not supported`,M.ERR_NOT_SUPPORT,S)})});const y=async v=>{if(v==null)return 0;if(k.isBlob(v))return v.size;if(k.isSpecCompliantForm(v))return(await new n(Ce.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(k.isArrayBufferView(v)||k.isArrayBuffer(v))return v.byteLength;if(k.isURLSearchParams(v)&&(v=v+""),k.isString(v))return(await a(v)).byteLength},E=async(v,x)=>{const S=k.toFiniteNumber(v.getContentLength());return S??y(x)};return async v=>{let{url:x,method:S,data:p,signal:d,cancelToken:h,timeout:g,onDownloadProgress:N,onUploadProgress:R,responseType:j,headers:_,withCredentials:z="same-origin",fetchOptions:T}=vm(v),W=t||fetch;j=j?(j+"").toLowerCase():"text";let me=jx([d,h&&h.toAbortSignal()],g),xe=null;const pt=me&&me.unsubscribe&&(()=>{me.unsubscribe()});let ri;try{if(R&&u&&S!=="get"&&S!=="head"&&(ri=await E(_,p))!==0){let H=new n(x,{method:"POST",body:p,duplex:"half"}),J;if(k.isFormData(p)&&(J=H.headers.get("content-type"))&&_.setContentType(J),H.body){const[bt,Je]=zf(ri,yl($f(R)));p=Bf(H.body,Hf,bt,Je)}}k.isString(z)||(z=z?"include":"omit");const Ae=i&&"credentials"in n.prototype,nr={...T,signal:me,method:S.toUpperCase(),headers:_.normalize().toJSON(),body:p,duplex:"half",credentials:Ae?z:void 0};xe=i&&new n(x,nr);let O=await(i?W(xe,T):W(x,nr));const I=f&&(j==="stream"||j==="response");if(f&&(N||I&&pt)){const H={};["status","statusText","headers"].forEach(rr=>{H[rr]=O[rr]});const J=k.toFiniteNumber(O.headers.get("content-length")),[bt,Je]=N&&zf(J,yl($f(N),!0))||[];O=new r(Bf(O.body,Hf,bt,()=>{Je&&Je(),pt&&pt()}),H)}j=j||"text";let D=await c[k.findKey(c,j)||"text"](O,v);return!I&&pt&&pt(),await new Promise((H,J)=>{ym(H,J,{data:D,headers:Be.from(O.headers),status:O.status,statusText:O.statusText,config:v,request:xe})})}catch(Ae){throw pt&&pt(),Ae&&Ae.name==="TypeError"&&/Load failed|fetch/i.test(Ae.message)?Object.assign(new M("Network Error",M.ERR_NETWORK,v,xe),{cause:Ae.cause||Ae}):M.from(Ae,Ae&&Ae.code,v,xe)}}},Fx=new Map,wm=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let l=i.length,o=l,a,u,f=Fx;for(;o--;)a=i[o],u=f.get(a),u===void 0&&f.set(a,u=o?new Map:Ax(t)),f=u;return u};wm();const Zu={http:Xw,xhr:Rx,fetch:{get:wm}};k.forEach(Zu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const qf=e=>`- ${e}`,Ix=e=>k.isFunction(e)||e===null||e===!1;function Mx(e,t){e=k.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let l=0;l`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=n?l.length>1?`since : `+l.map(qf).join(` `):" "+qf(l[0]):"as no adapter specified";throw new M("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s}const xm={getAdapter:Mx,adapters:Zu};function xo(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jr(null,e)}function Kf(e){return xo(e),e.headers=Be.from(e.headers),e.data=wo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xm.getAdapter(e.adapter||ni.adapter,e)(e).then(function(r){return xo(e),r.data=wo.call(e,e.transformResponse,r),r.headers=Be.from(r.headers),r},function(r){return mm(r)||(xo(e),r&&r.response&&(r.response.data=wo.call(e,e.transformResponse,r.response),r.response.headers=Be.from(r.response.headers))),Promise.reject(r)})}const Sm="1.13.2",$l={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$l[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Jf={};$l.transitional=function(t,n,r){function s(i,l){return"[Axios v"+Sm+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,o)=>{if(t===!1)throw new M(s(l," has been removed"+(n?" in "+n:"")),M.ERR_DEPRECATED);return n&&!Jf[l]&&(Jf[l]=!0,console.warn(s(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,o):!0}};$l.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Dx(e,t,n){if(typeof e!="object")throw new M("options must be an object",M.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],l=t[i];if(l){const o=e[i],a=o===void 0||l(o,i,e);if(a!==!0)throw new M("option "+i+" must be "+a,M.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new M("Unknown option "+i,M.ERR_BAD_OPTION)}}const Bi={assertOptions:Dx,validators:$l},yt=Bi.validators;let Vn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Df,response:new Df}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Yn(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Bi.assertOptions(r,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean)},!1),s!=null&&(k.isFunction(s)?n.paramsSerializer={serialize:s}:Bi.assertOptions(s,{encode:yt.function,serialize:yt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Bi.assertOptions(n,{baseUrl:yt.spelling("baseURL"),withXsrfToken:yt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&k.merge(i.common,i[n.method]);i&&k.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=Be.concat(l,i);const o=[];let a=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(a=a&&x.synchronous,o.unshift(x.fulfilled,x.rejected))});const u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let f,c=0,y;if(!a){const v=[Kf.bind(this),void 0];for(v.unshift(...o),v.push(...u),y=v.length,f=Promise.resolve(n);c{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const l=new Promise(o=>{r.subscribe(o),i=o}).then(s);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,o){r.reason||(r.reason=new Jr(i,l,o),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 Em(function(s){t=s}),cancel:t}}};function zx(e){return function(n){return e.apply(null,n)}}function $x(e){return k.isObject(e)&&e.isAxiosError===!0}const Da={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(Da).forEach(([e,t])=>{Da[t]=e});function km(e){const t=new Vn(e),n=em(Vn.prototype.request,t);return k.extend(n,Vn.prototype,t,{allOwnKeys:!0}),k.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return km(Yn(e,s))},n}const oe=km(ni);oe.Axios=Vn;oe.CanceledError=Jr;oe.CancelToken=Ux;oe.isCancel=mm;oe.VERSION=Sm;oe.toFormData=zl;oe.AxiosError=M;oe.Cancel=oe.CanceledError;oe.all=function(t){return Promise.all(t)};oe.spread=zx;oe.isAxiosError=$x;oe.mergeConfig=Yn;oe.AxiosHeaders=Be;oe.formToJSON=e=>pm(k.isHTMLForm(e)?new FormData(e):e);oe.getAdapter=xm.getAdapter;oe.HttpStatusCode=Da;oe.default=oe;const{Axios:jS,AxiosError:_S,CanceledError:OS,isCancel:TS,CancelToken:LS,VERSION:AS,all:FS,Cancel:IS,isAxiosError:MS,spread:DS,toFormData:US,AxiosHeaders:zS,HttpStatusCode:$S,formToJSON:bS,getAdapter:BS,mergeConfig:HS}=oe,Ua=/[ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀ-ſ]/,bx=/Ø[§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß]/,Bx=/×[×ŸŠšŒœŽž]/,Hx=/[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF]/,Qx=/[\u0590-\u05FF]/;function Vx(e){return!e||typeof e!="string"?!1:Ua.test(e)&&(bx.test(e)||Bx.test(e))}function Wx(e){try{const t=new Uint8Array([...e].map(r=>r.charCodeAt(0)&255));return new TextDecoder("utf-8",{fatal:!1}).decode(t)}catch{return e}}function qx(e,t){if(!t||t===e)return!1;const n=(e.match(Ua)||[]).length,r=(t.match(Ua)||[]).length;return(Hx.test(t)||Qx.test(t))&&rza(t));if(typeof e=="object"&&e.constructor===Object){const t={};for(const[n,r]of Object.entries(e))t[n]=za(r);return t}return e}function Jx(e){if(!e)return!1;try{const t=JSON.stringify(e);return t.includes("Ø")||t.includes("Ù")||t.includes("Ã")||t.includes("Â")}catch{return!1}}function Gx(e){return Jx(e)?za(e):e}const Xx=(()=>{const e="https://api.clalmobile.com/api";return console.log(`[CRM] VITE_API_BASE=${e}`),e.replace(/\/+$/,"")})(),q=oe.create({baseURL:Xx,headers:{"Content-Type":"application/json"}});q.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&(e.headers.Authorization=`Bearer ${t}`),e});q.interceptors.response.use(e=>(e.data&&(e.data=Gx(e.data)),e),e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem("accessToken"),localStorage.removeItem("user"),window.location.href="/login"),Promise.reject(e)});const Yx=e=>q.get("/leads",{params:e}),QS=e=>q.get(`/leads/${e}`),VS=e=>q.post("/leads",e),WS=(e,t)=>q.patch(`/leads/${e}`,t),qS=e=>q.delete(`/leads/${e}`),KS=e=>q.get(`/leads/${e}/notes`),JS=(e,t)=>q.post(`/leads/${e}/notes`,{content:t}),GS=(e,t)=>q.get(`/crm/leads/${e}/tasks`,{params:{status:t}}),XS=(e,t)=>q.post(`/crm/leads/${e}/tasks`,t),YS=(e,t)=>q.patch(`/crm/tasks/${e}`,t),ZS=(e,t,n)=>q.post("/messages/whatsapp/send",{lead_id:e,message:t,template_id:n}),eE=e=>q.get("/messages/templates",{params:{channel:e}}),tE=(e,t)=>q.post(`/leads/${e}/calls`,t),nE=e=>q.get(`/leads/${e}/calls`),Zx=()=>q.get("/leads/dashboard/stats"),rE=(e,t)=>q.post(`/crm/leads/${e}/messages`,t),sE=(e,t)=>q.post(`/crm/leads/${e}/calls`,t),iE=(e,t)=>q.get(`/crm/leads/${e}/timeline`,{params:{limit:t}}),lE=e=>q.get("/templates",{params:e}),eS=e=>q.get("/crm/dashboard/tasks",{params:e}),oE=()=>q.get("/crm/stages"),aE=(e,t)=>q.patch(`/crm/leads/${e}/stage`,t),tS=e=>q.get("/crm/leads/hot",{params:e}),uE=e=>q.post("/marketing/upsell/suggest",e),cE=e=>q.post("/marketing/upsell/track",e),$a={new:"جديد",contacted:"تم التواصل",qualified:"مؤهل",won:"مكتسب",lost:"مفقود"},nS={low:"bg-gray-100 text-gray-600",normal:"bg-blue-100 text-blue-700",high:"bg-orange-100 text-orange-700",urgent:"bg-red-100 text-red-700"},rS={low:"منخفض",normal:"عادي",high:"مرتفع",urgent:"عاجل"},sS={call:m.jsx(Yp,{className:"w-3 h-3"}),whatsapp:m.jsx(K1,{className:"w-3 h-3"}),sms:m.jsx(J1,{className:"w-3 h-3"})},iS={call:"bg-blue-100 text-blue-700",whatsapp:"bg-green-100 text-green-700",sms:"bg-purple-100 text-purple-700"},Gf={hot:{bg:"bg-red-100",text:"text-red-700",icon:m.jsx(Xp,{className:"w-4 h-4 text-red-500"})},warm:{bg:"bg-orange-100",text:"text-orange-700",icon:m.jsx(X1,{className:"w-4 h-4 text-orange-500"})},cold:{bg:"bg-blue-100",text:"text-blue-700",icon:m.jsx(G1,{className:"w-4 h-4 text-blue-500"})}};function lS({lead:e}){const t=Gf[e.score_label]||Gf.cold;return m.jsxs(Qn,{to:`/leads/${e.id}`,className:"flex items-center justify-between p-3 rounded-lg hover:bg-gray-50 transition border border-gray-100",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:`w-10 h-10 rounded-full ${t.bg} flex items-center justify-center`,children:t.icon}),m.jsxs("div",{children:[m.jsx("p",{className:"font-medium text-gray-900",children:e.first_name||e.last_name?`${e.first_name||""} ${e.last_name||""}`.trim():e.phone}),m.jsx("p",{className:"text-sm text-gray-500",dir:"ltr",children:e.phone})]})]}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"text-left",children:m.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium ${t.bg} ${t.text}`,children:[t.icon,e.score]})}),m.jsx("span",{className:`badge badge-${e.status}`,children:$a[e.status]||e.status})]})]})}function Xf({task:e}){const n=new Date(e.due_at.replace(" ","T")).toLocaleTimeString("ar-EG",{hour:"2-digit",minute:"2-digit"});return m.jsxs(Qn,{to:`/leads/${e.lead_id}?tab=tasks`,className:"flex items-center justify-between p-3 rounded-lg hover:bg-gray-50 transition border border-gray-100",children:[m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("p",{className:"font-medium text-gray-900 truncate",children:e.title}),m.jsx("p",{className:"text-sm text-gray-500 truncate",children:e.lead_name||e.lead_phone||`ليد #${e.lead_id}`})]}),m.jsxs("div",{className:"flex items-center gap-2 mr-3",children:[m.jsx("span",{className:"text-xs text-gray-500",children:n}),m.jsx("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${iS[e.channel]}`,children:sS[e.channel]}),m.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${nS[e.priority]}`,children:rS[e.priority]})]})]})}function oS(){var h;const[e,t]=C.useState("overdue"),{data:n,isLoading:r}=Ci({queryKey:["dashboard-stats"],queryFn:Zx}),{data:s,isLoading:i}=Ci({queryKey:["recent-leads"],queryFn:()=>Yx({limit:5})}),{data:l,isLoading:o}=Ci({queryKey:["dashboard-tasks"],queryFn:()=>eS({limit:5}),refetchInterval:6e4}),{data:a,isLoading:u,isError:f,refetch:c}=Ci({queryKey:["hot-leads"],queryFn:()=>tS({limit:10,min_score:0}),refetchInterval:12e4}),y=(n==null?void 0:n.data)||{},E=g=>{var N;return Array.isArray(g)?g:Array.isArray(g==null?void 0:g.leads)?g.leads:Array.isArray((N=g==null?void 0:g.data)==null?void 0:N.leads)?g.data.leads:Array.isArray(g==null?void 0:g.data)?g.data:Array.isArray(g==null?void 0:g.items)?g.items:[]},v=E(s==null?void 0:s.data),x=((h=l==null?void 0:l.data)==null?void 0:h.data)??(l==null?void 0:l.data)??{},S={overdue_count:(x==null?void 0:x.overdue_count)??0,today_count:(x==null?void 0:x.today_count)??0,upcoming_count:(x==null?void 0:x.upcoming_count)??0,overdue:Array.isArray(x==null?void 0:x.overdue)?x.overdue:[],today:Array.isArray(x==null?void 0:x.today)?x.today:[]},p=E(a==null?void 0:a.data),d=[{label:"إجمالي العملاء",value:y.total_leads||0,icon:Zp,color:"bg-blue-500"},{label:"عملاء جدد",value:y.new_leads||0,icon:ew,color:"bg-green-500"},{label:"معدل التحويل",value:`${y.conversion_rate||0}%`,icon:Y1,color:"bg-purple-500"},{label:"مكالمات اليوم",value:y.calls_today||0,icon:Yp,color:"bg-orange-500"}];return m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-6",children:"لوحة التحكم"}),m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:d.map((g,N)=>m.jsx("div",{className:"card",children:m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("div",{className:`w-12 h-12 ${g.color} rounded-lg flex items-center justify-center`,children:m.jsx(g.icon,{className:"w-6 h-6 text-white"})}),m.jsxs("div",{children:[m.jsx("p",{className:"text-2xl font-bold text-gray-900",children:g.value}),m.jsx("p",{className:"text-sm text-gray-500",children:g.label})]})]})},N))}),m.jsxs("div",{className:"card mb-8",children:[m.jsxs("div",{className:"flex items-center justify-between mb-4",children:[m.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[m.jsx(Q1,{className:"w-5 h-5 text-gray-500"}),"المهام"]}),m.jsx("div",{className:"flex items-center gap-4",children:m.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[m.jsxs("span",{className:"flex items-center gap-1 text-red-600",children:[m.jsx(Z1,{className:"w-4 h-4"}),"متأخر: ",S.overdue_count]}),m.jsx("span",{className:"text-gray-300",children:"|"}),m.jsxs("span",{className:"flex items-center gap-1 text-blue-600",children:[m.jsx(H1,{className:"w-4 h-4"}),"اليوم: ",S.today_count]}),m.jsx("span",{className:"text-gray-300",children:"|"}),m.jsxs("span",{className:"text-gray-500",children:["قادم: ",S.upcoming_count]})]})})]}),m.jsxs("div",{className:"flex gap-2 mb-4 border-b",children:[m.jsxs("button",{onClick:()=>t("overdue"),className:`px-4 py-2 text-sm font-medium border-b-2 transition ${e==="overdue"?"border-red-500 text-red-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:["متأخر (",S.overdue_count,")"]}),m.jsxs("button",{onClick:()=>t("today"),className:`px-4 py-2 text-sm font-medium border-b-2 transition ${e==="today"?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:["اليوم (",S.today_count,")"]})]}),o?m.jsx("div",{className:"animate-pulse space-y-3",children:[1,2,3].map(g=>m.jsx("div",{className:"h-16 bg-gray-100 rounded"},g))}):m.jsx("div",{className:"space-y-2",children:e==="overdue"?S.overdue.length===0?m.jsx("p",{className:"text-gray-500 text-center py-6",children:"لا يوجد مهام متأخرة "}):S.overdue.map(g=>m.jsx(Xf,{task:g},g.id)):S.today.length===0?m.jsx("p",{className:"text-gray-500 text-center py-6",children:"لا يوجد مهام لليوم"}):S.today.map(g=>m.jsx(Xf,{task:g},g.id))})]}),m.jsxs("div",{className:"card mb-8",children:[m.jsxs("div",{className:"flex items-center justify-between mb-4",children:[m.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[m.jsx(Xp,{className:"w-5 h-5 text-red-500"}),"العملاء الساخنين"]}),m.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[m.jsxs("span",{className:"flex items-center gap-1",children:[m.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-red-500"}),"ساخن ≥60"]}),m.jsxs("span",{className:"flex items-center gap-1",children:[m.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-orange-500"}),"دافئ ≥30"]}),m.jsxs("span",{className:"flex items-center gap-1",children:[m.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),"بارد <30"]})]})]}),u?m.jsx("div",{className:"animate-pulse space-y-3",children:[1,2,3].map(g=>m.jsx("div",{className:"h-16 bg-gray-100 rounded"},g))}):f?m.jsxs("div",{className:"text-center py-6",children:[m.jsx("p",{className:"text-red-500 mb-2",children:"حدث خطأ في تحميل العملاء الساخنين"}),m.jsx("button",{onClick:()=>c(),className:"text-primary-600 hover:underline text-sm",children:"إعادة المحاولة"})]}):p.length===0?m.jsx("p",{className:"text-gray-500 text-center py-6",children:"لا يوجد عملاء ساخنين"}):m.jsx("div",{className:"space-y-2",children:p.slice(0,10).map(g=>m.jsx(lS,{lead:g},g.id))})]}),m.jsxs("div",{className:"card mb-8",children:[m.jsx("h2",{className:"text-lg font-semibold mb-4",children:"مراحل المبيعات"}),m.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2",children:["new","contacted","qualified","won","lost"].map(g=>{const N=y[`${g}_count`]||0;return m.jsxs(Qn,{to:`/leads?stage=${g}`,className:`flex-1 min-w-[120px] p-4 rounded-lg text-center transition hover:opacity-80 badge-${g}`,children:[m.jsx("p",{className:"text-2xl font-bold",children:N}),m.jsx("p",{className:"text-sm",children:$a[g]})]},g)})})]}),m.jsxs("div",{className:"card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-4",children:[m.jsx("h2",{className:"text-lg font-semibold",children:"آخر العملاء المحتملين"}),m.jsxs(Qn,{to:"/leads",className:"text-primary-600 hover:underline flex items-center gap-1 text-sm",children:["عرض الكل",m.jsx(B1,{className:"w-4 h-4"})]})]}),i?m.jsx("div",{className:"animate-pulse space-y-3",children:[1,2,3].map(g=>m.jsx("div",{className:"h-16 bg-gray-100 rounded"},g))}):v.length===0?m.jsx("p",{className:"text-gray-500 text-center py-8",children:"لا يوجد عملاء محتملين"}):m.jsx("div",{className:"table-container",children:m.jsxs("table",{className:"data-table",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"الاسم"}),m.jsx("th",{children:"الهاتف"}),m.jsx("th",{children:"المصدر"}),m.jsx("th",{children:"المرحلة"}),m.jsx("th",{children:"التاريخ"})]})}),m.jsx("tbody",{className:"divide-y divide-gray-100",children:v.map(g=>m.jsxs("tr",{className:"hover:bg-gray-50",children:[m.jsx("td",{children:m.jsx(Qn,{to:`/leads/${g.id}`,className:"font-medium text-primary-600 hover:underline",children:g.name})}),m.jsx("td",{dir:"ltr",className:"text-gray-600",children:g.phone}),m.jsx("td",{children:g.source||"-"}),m.jsx("td",{children:m.jsx("span",{className:`badge badge-${g.stage}`,children:$a[g.stage]})}),m.jsx("td",{className:"text-gray-500",children:new Date(g.created_at).toLocaleDateString("ar-EG")})]},g.id))})]})})]})]})}const aS=C.lazy(()=>Ju(()=>import("./Leads-BslN9fC9.js"),__vite__mapDeps([0,1,2,3]))),uS=C.lazy(()=>Ju(()=>import("./LeadDetail-DmwovjY5.js"),__vite__mapDeps([4,1,2,5]))),cS=C.lazy(()=>Ju(()=>import("./Pipeline-DU6qmhJT.js"),__vite__mapDeps([6,1,5,3])));function fS({children:e}){const{isAuthenticated:t,isLoading:n}=Jp(),r=Gs();return C.useEffect(()=>{!n&&!t&&r("/login",{replace:!0})},[t,n,r]),n?m.jsx("div",{className:"min-h-screen flex items-center justify-center",children:m.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):t?m.jsx(m.Fragment,{children:e}):null}function dS(){return m.jsxs(uw,{children:[m.jsx(nw,{}),m.jsx(rw,{}),m.jsxs(t0,{children:[m.jsx(Ht,{path:"/login",element:m.jsx(fw,{})}),m.jsxs(Ht,{path:"/",element:m.jsx(fS,{children:m.jsx(tw,{})}),children:[m.jsx(Ht,{index:!0,element:m.jsx(oS,{})}),m.jsx(Ht,{path:"leads",element:m.jsx(C.Suspense,{fallback:m.jsx(go,{variant:"table",count:10}),children:m.jsx(aS,{})})}),m.jsx(Ht,{path:"leads/:id",element:m.jsx(C.Suspense,{fallback:m.jsx(go,{variant:"detail"}),children:m.jsx(uS,{})})}),m.jsx(Ht,{path:"pipeline",element:m.jsx(C.Suspense,{fallback:m.jsx(go,{variant:"kanban",count:5}),children:m.jsx(cS,{})})})]}),m.jsx(Ht,{path:"*",element:m.jsx(Yv,{to:"/",replace:!0})})]})]})}const Cm="error_queue",Nm="/errors",hS="dev";let Yf=!1,Pm="unknown",ba="";function pS(e,t){const n=[(e==null?void 0:e.substring(0,200))||"",(t==null?void 0:t.split(` `)[0])||""].join("|");let r=0;for(let s=0;s{Zf(l||String(n),"error",{source:r,lineno:s,colno:i})},window.onunhandledrejection=n=>{var s;const r=((s=n.reason)==null?void 0:s.message)||String(n.reason);Zf(n.reason instanceof Error?n.reason:r,"error",{type:"unhandledrejection"})},setTimeout(ed,5e3),setInterval(ed,6e4),window.addEventListener("beforeunload",()=>{const n=ec();n.length>0&&navigator.sendBeacon(`${ba}${Nm}`,JSON.stringify(n[0]))}),new URLSearchParams(window.location.search).get("throw")==="1"&&setTimeout(()=>{throw new Error("Test error triggered via ?throw=1")},1e3),console.log(`[${e.app}] Error capture initialized`)}const yS="lang",gS="ar";function vS(){var n;const e=localStorage.getItem(yS);if(e==="ar"||e==="he"||e==="en")return e;const t=((n=navigator.language)==null?void 0:n.toLowerCase())||"";return t.startsWith("ar")?"ar":t.startsWith("he")||t.startsWith("iw")?"he":t.startsWith("en")?"en":gS}function wS(e){document.documentElement.lang=e,document.documentElement.dir=e==="ar"?"rtl":"ltr",document.body.classList.remove("lang-ar","lang-he","lang-en"),document.body.classList.add(`lang-${e}`)}function xS(){const e=vS();return wS(e),e}mS({app:"crm",apiBase:"https://api.clalmobile.com/api"});xS();const SS=new M0({defaultOptions:{queries:{staleTime:1e3*60,gcTime:1e3*60*10,retry:1,refetchOnWindowFocus:!1,refetchOnReconnect:!1}}});So.createRoot(document.getElementById("root")).render(m.jsx(qa.StrictMode,{children:m.jsx(D0,{client:SS,children:m.jsxs(u0,{children:[m.jsx(dS,{}),m.jsx(M1,{position:"top-center"})]})})}));export{QS as A,KS as B,H1 as C,GS as D,nE as E,Xp as F,eE as G,iE as H,iv as I,aE as J,oE as K,Qn as L,K1 as M,Xs as N,wa as O,Yp as P,Us as Q,qa as R,G1 as S,Z1 as T,A0 as U,ge as V,Ie as W,S0 as X,qu as a,Ci as b,Pe as c,VS as d,qS as e,J1 as f,Yx as g,lE as h,uE as i,m as j,kS as k,sE as l,Gs as m,go as n,Q1 as o,WS as p,JS as q,C as r,rE as s,cE as t,CS as u,XS as v,YS as w,ZS as x,tE as y,NS as z}; //# sourceMappingURL=index-KcWkQuwG.js.map