clankie 0.2.13 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +40 -223
  2. package/dist/cli.js +12116 -27954
  3. package/package.json +10 -10
  4. package/web-ui-dist/_shell.html +2 -2
  5. package/web-ui-dist/assets/auth-js9k1Rhz.js +1 -0
  6. package/web-ui-dist/assets/badge-BHJdQwRZ.js +1 -0
  7. package/web-ui-dist/assets/circle-alert-DCRgcJjZ.js +1 -0
  8. package/web-ui-dist/assets/connection-C-eUc8pB.js +1 -0
  9. package/web-ui-dist/assets/extensions-CfM4cd1k.js +1 -0
  10. package/web-ui-dist/assets/extensions-VKiAe2xJ.js +1 -0
  11. package/web-ui-dist/assets/field-DEnoPHIp.js +1 -0
  12. package/web-ui-dist/assets/index-QqHwIr0R.js +1 -0
  13. package/web-ui-dist/assets/index-wQYa97UB.js +1 -0
  14. package/web-ui-dist/assets/json-render-renderer-iSQAWNBF.js +94 -0
  15. package/web-ui-dist/assets/main-pUlhQiIA.js +35 -0
  16. package/web-ui-dist/assets/sessions._sessionId-UF84S83t.js +38 -0
  17. package/web-ui-dist/assets/skills-CnPlzEye.js +1 -0
  18. package/web-ui-dist/assets/styles-CEa8RAD6.css +1 -0
  19. package/dist/koffi-216xhpes.node +0 -0
  20. package/dist/koffi-2erktc37.node +0 -0
  21. package/dist/koffi-2rrez93a.node +0 -0
  22. package/dist/koffi-2wv0r22g.node +0 -0
  23. package/dist/koffi-3kae4xj3.node +0 -0
  24. package/dist/koffi-3rkr2zqv.node +0 -0
  25. package/dist/koffi-abxfktv9.node +0 -0
  26. package/dist/koffi-c67c0c5b.node +0 -0
  27. package/dist/koffi-cnf0q0dx.node +0 -0
  28. package/dist/koffi-df38sqz5.node +0 -0
  29. package/dist/koffi-gfbqb3a0.node +0 -0
  30. package/dist/koffi-kjemmmem.node +0 -0
  31. package/dist/koffi-kkrfq9yv.node +0 -0
  32. package/dist/koffi-mzaqwwqy.node +0 -0
  33. package/dist/koffi-q49fgkeq.node +0 -0
  34. package/dist/koffi-q54bk8bf.node +0 -0
  35. package/dist/koffi-x1790w0j.node +0 -0
  36. package/dist/koffi-yxvjwcj6.node +0 -0
  37. package/web-ui-dist/assets/extensions-Ce8R4mF3.js +0 -1
  38. package/web-ui-dist/assets/field-omFPry7c.js +0 -1
  39. package/web-ui-dist/assets/index-CdxpJyJ4.js +0 -1
  40. package/web-ui-dist/assets/loader-circle-DJwIWnWV.js +0 -1
  41. package/web-ui-dist/assets/main-UkFzTTck.js +0 -35
  42. package/web-ui-dist/assets/sessions._sessionId-DA8C51jO.js +0 -131
  43. package/web-ui-dist/assets/settings-Db2CTnq7.js +0 -1
  44. package/web-ui-dist/assets/styles-DAZ1IN1z.css +0 -1
@@ -1,35 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/settings-Db2CTnq7.js","assets/field-omFPry7c.js","assets/loader-circle-DJwIWnWV.js","assets/extensions-Ce8R4mF3.js","assets/sessions._sessionId-DA8C51jO.js"])))=>i.map(i=>d[i]);
2
- function GR(e,n){for(var r=0;r<n.length;r++){const a=n[r];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in e)){const c=Object.getOwnPropertyDescriptor(a,l);c&&Object.defineProperty(e,l,c.get?c:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function lS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sh={exports:{}},Li={};var pb;function FR(){if(pb)return Li;pb=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(a,l,c){var d=null;if(c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),"key"in l){c={};for(var f in l)f!=="key"&&(c[f]=l[f])}else c=l;return l=c.ref,{$$typeof:e,type:a,key:d,ref:l!==void 0?l:null,props:c}}return Li.Fragment=n,Li.jsx=r,Li.jsxs=r,Li}var mb;function XR(){return mb||(mb=1,Sh.exports=FR()),Sh.exports}var _=XR(),xh={exports:{}},Ie={};var gb;function KR(){if(gb)return Ie;gb=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function b(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,E={};function C(P,X,le){this.props=P,this.context=X,this.refs=E,this.updater=le||x}C.prototype.isReactComponent={},C.prototype.setState=function(P,X){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,X,"setState")},C.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=C.prototype;function k(P,X,le){this.props=P,this.context=X,this.refs=E,this.updater=le||x}var O=k.prototype=new A;O.constructor=k,w(O,C.prototype),O.isPureReactComponent=!0;var L=Array.isArray;function N(){}var j={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function q(P,X,le){var se=le.ref;return{$$typeof:e,type:P,key:X,ref:se!==void 0?se:null,props:le}}function Z(P,X){return q(P.type,X,P.props)}function Q(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function V(P){var X={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(le){return X[le]})}var J=/\/+/g;function te(P,X){return typeof P=="object"&&P!==null&&P.key!=null?V(""+P.key):X.toString(36)}function re(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(N,N):(P.status="pending",P.then(function(X){P.status==="pending"&&(P.status="fulfilled",P.value=X)},function(X){P.status==="pending"&&(P.status="rejected",P.reason=X)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function I(P,X,le,se,ue){var he=typeof P;(he==="undefined"||he==="boolean")&&(P=null);var ve=!1;if(P===null)ve=!0;else switch(he){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(P.$$typeof){case e:case n:ve=!0;break;case y:return ve=P._init,I(ve(P._payload),X,le,se,ue)}}if(ve)return ue=ue(P),ve=se===""?"."+te(P,0):se,L(ue)?(le="",ve!=null&&(le=ve.replace(J,"$&/")+"/"),I(ue,X,le,"",function(Ne){return Ne})):ue!=null&&(Q(ue)&&(ue=Z(ue,le+(ue.key==null||P&&P.key===ue.key?"":(""+ue.key).replace(J,"$&/")+"/")+ve)),X.push(ue)),1;ve=0;var Oe=se===""?".":se+":";if(L(P))for(var fe=0;fe<P.length;fe++)se=P[fe],he=Oe+te(se,fe),ve+=I(se,X,le,he,ue);else if(fe=b(P),typeof fe=="function")for(P=fe.call(P),fe=0;!(se=P.next()).done;)se=se.value,he=Oe+te(se,fe++),ve+=I(se,X,le,he,ue);else if(he==="object"){if(typeof P.then=="function")return I(re(P),X,le,se,ue);throw X=String(P),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return ve}function B(P,X,le){if(P==null)return P;var se=[],ue=0;return I(P,se,"","",function(he){return X.call(le,he,ue++)}),se}function G(P){if(P._status===-1){var X=P._result;X=X(),X.then(function(le){(P._status===0||P._status===-1)&&(P._status=1,P._result=le)},function(le){(P._status===0||P._status===-1)&&(P._status=2,P._result=le)}),P._status===-1&&(P._status=0,P._result=X)}if(P._status===1)return P._result.default;throw P._result}var ce=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},W={map:B,forEach:function(P,X,le){B(P,function(){X.apply(this,arguments)},le)},count:function(P){var X=0;return B(P,function(){X++}),X},toArray:function(P){return B(P,function(X){return X})||[]},only:function(P){if(!Q(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Ie.Activity=g,Ie.Children=W,Ie.Component=C,Ie.Fragment=r,Ie.Profiler=l,Ie.PureComponent=k,Ie.StrictMode=a,Ie.Suspense=m,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(P){return j.H.useMemoCache(P)}},Ie.cache=function(P){return function(){return P.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(P,X,le){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var se=w({},P.props),ue=P.key;if(X!=null)for(he in X.key!==void 0&&(ue=""+X.key),X)!z.call(X,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&X.ref===void 0||(se[he]=X[he]);var he=arguments.length-2;if(he===1)se.children=le;else if(1<he){for(var ve=Array(he),Oe=0;Oe<he;Oe++)ve[Oe]=arguments[Oe+2];se.children=ve}return q(P.type,ue,se)},Ie.createContext=function(P){return P={$$typeof:d,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:c,_context:P},P},Ie.createElement=function(P,X,le){var se,ue={},he=null;if(X!=null)for(se in X.key!==void 0&&(he=""+X.key),X)z.call(X,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(ue[se]=X[se]);var ve=arguments.length-2;if(ve===1)ue.children=le;else if(1<ve){for(var Oe=Array(ve),fe=0;fe<ve;fe++)Oe[fe]=arguments[fe+2];ue.children=Oe}if(P&&P.defaultProps)for(se in ve=P.defaultProps,ve)ue[se]===void 0&&(ue[se]=ve[se]);return q(P,he,ue)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(P){return{$$typeof:f,render:P}},Ie.isValidElement=Q,Ie.lazy=function(P){return{$$typeof:y,_payload:{_status:-1,_result:P},_init:G}},Ie.memo=function(P,X){return{$$typeof:h,type:P,compare:X===void 0?null:X}},Ie.startTransition=function(P){var X=j.T,le={};j.T=le;try{var se=P(),ue=j.S;ue!==null&&ue(le,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(N,ce)}catch(he){ce(he)}finally{X!==null&&le.types!==null&&(X.types=le.types),j.T=X}},Ie.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},Ie.use=function(P){return j.H.use(P)},Ie.useActionState=function(P,X,le){return j.H.useActionState(P,X,le)},Ie.useCallback=function(P,X){return j.H.useCallback(P,X)},Ie.useContext=function(P){return j.H.useContext(P)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(P,X){return j.H.useDeferredValue(P,X)},Ie.useEffect=function(P,X){return j.H.useEffect(P,X)},Ie.useEffectEvent=function(P){return j.H.useEffectEvent(P)},Ie.useId=function(){return j.H.useId()},Ie.useImperativeHandle=function(P,X,le){return j.H.useImperativeHandle(P,X,le)},Ie.useInsertionEffect=function(P,X){return j.H.useInsertionEffect(P,X)},Ie.useLayoutEffect=function(P,X){return j.H.useLayoutEffect(P,X)},Ie.useMemo=function(P,X){return j.H.useMemo(P,X)},Ie.useOptimistic=function(P,X){return j.H.useOptimistic(P,X)},Ie.useReducer=function(P,X,le){return j.H.useReducer(P,X,le)},Ie.useRef=function(P){return j.H.useRef(P)},Ie.useState=function(P){return j.H.useState(P)},Ie.useSyncExternalStore=function(P,X,le){return j.H.useSyncExternalStore(P,X,le)},Ie.useTransition=function(){return j.H.useTransition()},Ie.version="19.2.4",Ie}var yb;function el(){return yb||(yb=1,xh.exports=KR()),xh.exports}var R=el();const _a=lS(R),Tp=GR({__proto__:null,default:_a},[R]);var wh={exports:{}},ji={},Eh={exports:{}},Rh={};var vb;function QR(){return vb||(vb=1,(function(e){function n(I,B){var G=I.length;I.push(B);e:for(;0<G;){var ce=G-1>>>1,W=I[ce];if(0<l(W,B))I[ce]=B,I[G]=W,G=ce;else break e}}function r(I){return I.length===0?null:I[0]}function a(I){if(I.length===0)return null;var B=I[0],G=I.pop();if(G!==B){I[0]=G;e:for(var ce=0,W=I.length,P=W>>>1;ce<P;){var X=2*(ce+1)-1,le=I[X],se=X+1,ue=I[se];if(0>l(le,G))se<W&&0>l(ue,le)?(I[ce]=ue,I[se]=G,ce=se):(I[ce]=le,I[X]=G,ce=X);else if(se<W&&0>l(ue,G))I[ce]=ue,I[se]=G,ce=se;else break e}}return B}function l(I,B){var G=I.sortIndex-B.sortIndex;return G!==0?G:I.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var m=[],h=[],y=1,g=null,v=3,b=!1,x=!1,w=!1,E=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function O(I){for(var B=r(h);B!==null;){if(B.callback===null)a(h);else if(B.startTime<=I)a(h),B.sortIndex=B.expirationTime,n(m,B);else break;B=r(h)}}function L(I){if(w=!1,O(I),!x)if(r(m)!==null)x=!0,N||(N=!0,V());else{var B=r(h);B!==null&&re(L,B.startTime-I)}}var N=!1,j=-1,z=5,q=-1;function Z(){return E?!0:!(e.unstable_now()-q<z)}function Q(){if(E=!1,N){var I=e.unstable_now();q=I;var B=!0;try{e:{x=!1,w&&(w=!1,A(j),j=-1),b=!0;var G=v;try{t:{for(O(I),g=r(m);g!==null&&!(g.expirationTime>I&&Z());){var ce=g.callback;if(typeof ce=="function"){g.callback=null,v=g.priorityLevel;var W=ce(g.expirationTime<=I);if(I=e.unstable_now(),typeof W=="function"){g.callback=W,O(I),B=!0;break t}g===r(m)&&a(m),O(I)}else a(m);g=r(m)}if(g!==null)B=!0;else{var P=r(h);P!==null&&re(L,P.startTime-I),B=!1}}break e}finally{g=null,v=G,b=!1}B=void 0}}finally{B?V():N=!1}}}var V;if(typeof k=="function")V=function(){k(Q)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,te=J.port2;J.port1.onmessage=Q,V=function(){te.postMessage(null)}}else V=function(){C(Q,0)};function re(I,B){j=C(function(){I(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(I){switch(v){case 1:case 2:case 3:var B=3;break;default:B=v}var G=v;v=B;try{return I()}finally{v=G}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(I,B){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var G=v;v=I;try{return B()}finally{v=G}},e.unstable_scheduleCallback=function(I,B,G){var ce=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?ce+G:ce):G=ce,I){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=G+W,I={id:y++,callback:B,priorityLevel:I,startTime:G,expirationTime:W,sortIndex:-1},G>ce?(I.sortIndex=G,n(h,I),r(m)===null&&I===r(h)&&(w?(A(j),j=-1):w=!0,re(L,G-ce))):(I.sortIndex=W,n(m,I),x||b||(x=!0,N||(N=!0,V()))),I},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(I){var B=v;return function(){var G=v;v=B;try{return I.apply(this,arguments)}finally{v=G}}}})(Rh)),Rh}var bb;function ZR(){return bb||(bb=1,Eh.exports=QR()),Eh.exports}var Th={exports:{}},Jt={};var Sb;function $R(){if(Sb)return Jt;Sb=1;var e=el();function n(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function c(m,h,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:g==null?null:""+g,children:m,containerInfo:h,implementation:y}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Jt.createPortal=function(m,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return c(m,h,null,y)},Jt.flushSync=function(m){var h=d.T,y=a.p;try{if(d.T=null,a.p=2,m)return m()}finally{d.T=h,a.p=y,a.d.f()}},Jt.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(m,h))},Jt.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},Jt.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?a.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:b}):y==="script"&&a.d.X(m,{crossOrigin:g,integrity:v,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Jt.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=f(h.as,h.crossOrigin);a.d.M(m,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(m)},Jt.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin);a.d.L(m,y,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Jt.preloadModule=function(m,h){if(typeof m=="string")if(h){var y=f(h.as,h.crossOrigin);a.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(m)},Jt.requestFormReset=function(m){a.d.r(m)},Jt.unstable_batchedUpdates=function(m,h){return m(h)},Jt.useFormState=function(m,h,y){return d.H.useFormState(m,h,y)},Jt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Jt.version="19.2.4",Jt}var xb;function cS(){if(xb)return Th.exports;xb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Th.exports=$R(),Th.exports}var wb;function JR(){if(wb)return ji;wb=1;var e=ZR(),n=el(),r=cS();function a(t){var o="https://react.dev/errors/"+t;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)o+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var o=t,s=t;if(t.alternate)for(;o.return;)o=o.return;else{t=o;do o=t,(o.flags&4098)!==0&&(s=o.return),t=o.return;while(t)}return o.tag===3?s:null}function d(t){if(t.tag===13){var o=t.memoizedState;if(o===null&&(t=t.alternate,t!==null&&(o=t.memoizedState)),o!==null)return o.dehydrated}return null}function f(t){if(t.tag===31){var o=t.memoizedState;if(o===null&&(t=t.alternate,t!==null&&(o=t.memoizedState)),o!==null)return o.dehydrated}return null}function m(t){if(c(t)!==t)throw Error(a(188))}function h(t){var o=t.alternate;if(!o){if(o=c(t),o===null)throw Error(a(188));return o!==t?null:t}for(var s=t,i=o;;){var u=s.return;if(u===null)break;var p=u.alternate;if(p===null){if(i=u.return,i!==null){s=i;continue}break}if(u.child===p.child){for(p=u.child;p;){if(p===s)return m(u),t;if(p===i)return m(u),o;p=p.sibling}throw Error(a(188))}if(s.return!==i.return)s=u,i=p;else{for(var S=!1,M=u.child;M;){if(M===s){S=!0,s=u,i=p;break}if(M===i){S=!0,i=u,s=p;break}M=M.sibling}if(!S){for(M=p.child;M;){if(M===s){S=!0,s=p,i=u;break}if(M===i){S=!0,i=p,s=u;break}M=M.sibling}if(!S)throw Error(a(189))}}if(s.alternate!==i)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?t:o}function y(t){var o=t.tag;if(o===5||o===26||o===27||o===6)return t;for(t=t.child;t!==null;){if(o=y(t),o!==null)return o;t=t.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),k=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function V(t){return t===null||typeof t!="object"?null:(t=Q&&t[Q]||t["@@iterator"],typeof t=="function"?t:null)}var J=Symbol.for("react.client.reference");function te(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===J?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case w:return"Fragment";case C:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case N:return"SuspenseList";case q:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case x:return"Portal";case k:return t.displayName||"Context";case A:return(t._context.displayName||"Context")+".Consumer";case O:var o=t.render;return t=t.displayName,t||(t=o.displayName||o.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case j:return o=t.displayName||null,o!==null?o:te(t.type)||"Memo";case z:o=t._payload,t=t._init;try{return te(t(o))}catch{}}return null}var re=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},ce=[],W=-1;function P(t){return{current:t}}function X(t){0>W||(t.current=ce[W],ce[W]=null,W--)}function le(t,o){W++,ce[W]=t.current,t.current=o}var se=P(null),ue=P(null),he=P(null),ve=P(null);function Oe(t,o){switch(le(he,o),le(ue,t),le(se,null),o.nodeType){case 9:case 11:t=(t=o.documentElement)&&(t=t.namespaceURI)?Pv(t):0;break;default:if(t=o.tagName,o=o.namespaceURI)o=Pv(o),t=Iv(o,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}X(se),le(se,t)}function fe(){X(se),X(ue),X(he)}function Ne(t){t.memoizedState!==null&&le(ve,t);var o=se.current,s=Iv(o,t.type);o!==s&&(le(ue,t),le(se,s))}function je(t){ue.current===t&&(X(se),X(ue)),ve.current===t&&(X(ve),Di._currentValue=G)}var ne,me;function pe(t){if(ne===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);ne=o&&o[1]||"",me=-1<s.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+ne+t+me}var ze=!1;function be(t,o){if(!t||ze)return"";ze=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(o){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(ee){var $=ee}Reflect.construct(t,[],ie)}else{try{ie.call()}catch(ee){$=ee}t.call(ie.prototype)}}else{try{throw Error()}catch(ee){$=ee}(ie=t())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(ee){if(ee&&$&&typeof ee.stack=="string")return[ee.stack,$.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=i.DetermineComponentFrameRoot(),S=p[0],M=p[1];if(S&&M){var U=S.split(`
5
- `),K=M.split(`
6
- `);for(u=i=0;i<U.length&&!U[i].includes("DetermineComponentFrameRoot");)i++;for(;u<K.length&&!K[u].includes("DetermineComponentFrameRoot");)u++;if(i===U.length||u===K.length)for(i=U.length-1,u=K.length-1;1<=i&&0<=u&&U[i]!==K[u];)u--;for(;1<=i&&0<=u;i--,u--)if(U[i]!==K[u]){if(i!==1||u!==1)do if(i--,u--,0>u||U[i]!==K[u]){var oe=`
7
- `+U[i].replace(" at new "," at ");return t.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",t.displayName)),oe}while(1<=i&&0<=u);break}}}finally{ze=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?pe(s):""}function Se(t,o){switch(t.tag){case 26:case 27:case 5:return pe(t.type);case 16:return pe("Lazy");case 13:return t.child!==o&&o!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return be(t.type,!1);case 11:return be(t.type.render,!1);case 1:return be(t.type,!0);case 31:return pe("Activity");default:return""}}function ye(t){try{var o="",s=null;do o+=Se(t,s),s=t,t=t.return;while(t);return o}catch(i){return`
8
- Error generating stack: `+i.message+`
9
- `+i.stack}}var de=Object.prototype.hasOwnProperty,we=e.unstable_scheduleCallback,ge=e.unstable_cancelCallback,De=e.unstable_shouldYield,Ye=e.unstable_requestPaint,Ue=e.unstable_now,Ot=e.unstable_getCurrentPriorityLevel,He=e.unstable_ImmediatePriority,We=e.unstable_UserBlockingPriority,Pe=e.unstable_NormalPriority,Rt=e.unstable_LowPriority,$t=e.unstable_IdlePriority,Xn=e.log,As=e.unstable_setDisableYieldValue,Kn=null,Le=null;function Xe(t){if(typeof Xn=="function"&&As(t),Le&&typeof Le.setStrictMode=="function")try{Le.setStrictMode(Kn,t)}catch{}}var st=Math.clz32?Math.clz32:nn,ht=Math.log,Tt=Math.LN2;function nn(t){return t>>>=0,t===0?32:31-(ht(t)/Tt|0)|0}var Lt=256,Ht=262144,_n=4194304;function cn(t){var o=t&42;if(o!==0)return o;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Qo(t,o,s){var i=t.pendingLanes;if(i===0)return 0;var u=0,p=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var M=i&134217727;return M!==0?(i=M&~p,i!==0?u=cn(i):(S&=M,S!==0?u=cn(S):s||(s=M&~t,s!==0&&(u=cn(s))))):(M=i&~p,M!==0?u=cn(M):S!==0?u=cn(S):s||(s=i&~t,s!==0&&(u=cn(s)))),u===0?0:o!==0&&o!==u&&(o&p)===0&&(p=u&-u,s=o&-o,p>=s||p===32&&(s&4194048)!==0)?o:u}function Zo(t,o){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&o)===0}function uf(t,o){switch(t){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dl(){var t=_n;return _n<<=1,(_n&62914560)===0&&(_n=4194304),t}function Va(t){for(var o=[],s=0;31>s;s++)o.push(t);return o}function qr(t,o){t.pendingLanes|=o,o!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ya(t,o,s,i,u,p){var S=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var M=t.entanglements,U=t.expirationTimes,K=t.hiddenUpdates;for(s=S&~s;0<s;){var oe=31-st(s),ie=1<<oe;M[oe]=0,U[oe]=-1;var $=K[oe];if($!==null)for(K[oe]=null,oe=0;oe<$.length;oe++){var ee=$[oe];ee!==null&&(ee.lane&=-536870913)}s&=~ie}i!==0&&qa(t,i,0),p!==0&&u===0&&t.tag!==0&&(t.suspendedLanes|=p&~(S&~o))}function qa(t,o,s){t.pendingLanes|=o,t.suspendedLanes&=~o;var i=31-st(o);t.entangledLanes|=o,t.entanglements[i]=t.entanglements[i]|1073741824|s&261930}function hl(t,o){var s=t.entangledLanes|=o;for(t=t.entanglements;s;){var i=31-st(s),u=1<<i;u&o|t[i]&o&&(t[i]|=o),s&=~u}}function pl(t,o){var s=o&-o;return s=(s&42)!==0?1:go(s),(s&(t.suspendedLanes|o))!==0?0:s}function go(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Ga(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function ml(){var t=B.p;return t!==0?t:(t=window.event,t===void 0?32:ib(t.type))}function gl(t,o){var s=B.p;try{return B.p=t,o()}finally{B.p=s}}var $o=Math.random().toString(36).slice(2),qt="__reactFiber$"+$o,un="__reactProps$"+$o,_s="__reactContainer$"+$o,ff="__reactEvents$"+$o,zE="__reactListeners$"+$o,LE="__reactHandles$"+$o,Rm="__reactResources$"+$o,Fa="__reactMarker$"+$o;function df(t){delete t[qt],delete t[un],delete t[ff],delete t[zE],delete t[LE]}function Ds(t){var o=t[qt];if(o)return o;for(var s=t.parentNode;s;){if(o=s[_s]||s[qt]){if(s=o.alternate,o.child!==null||s!==null&&s.child!==null)for(t=Gv(t);t!==null;){if(s=t[qt])return s;t=Gv(t)}return o}t=s,s=t.parentNode}return null}function ks(t){if(t=t[qt]||t[_s]){var o=t.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return t}return null}function Xa(t){var o=t.tag;if(o===5||o===26||o===27||o===6)return t.stateNode;throw Error(a(33))}function Ns(t){var o=t[Rm];return o||(o=t[Rm]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Vt(t){t[Fa]=!0}var Tm=new Set,Cm={};function Gr(t,o){zs(t,o),zs(t+"Capture",o)}function zs(t,o){for(Cm[t]=o,t=0;t<o.length;t++)Tm.add(o[t])}var jE=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Mm={},Om={};function PE(t){return de.call(Om,t)?!0:de.call(Mm,t)?!1:jE.test(t)?Om[t]=!0:(Mm[t]=!0,!1)}function yl(t,o,s){if(PE(o))if(s===null)t.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":t.removeAttribute(o);return;case"boolean":var i=o.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){t.removeAttribute(o);return}}t.setAttribute(o,""+s)}}function vl(t,o,s){if(s===null)t.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttribute(o,""+s)}}function yo(t,o,s,i){if(i===null)t.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttributeNS(o,s,""+i)}}function Dn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Am(t){var o=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function IE(t,o,s){var i=Object.getOwnPropertyDescriptor(t.constructor.prototype,o);if(!t.hasOwnProperty(o)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var u=i.get,p=i.set;return Object.defineProperty(t,o,{configurable:!0,get:function(){return u.call(this)},set:function(S){s=""+S,p.call(this,S)}}),Object.defineProperty(t,o,{enumerable:i.enumerable}),{getValue:function(){return s},setValue:function(S){s=""+S},stopTracking:function(){t._valueTracker=null,delete t[o]}}}}function hf(t){if(!t._valueTracker){var o=Am(t)?"checked":"value";t._valueTracker=IE(t,o,""+t[o])}}function _m(t){if(!t)return!1;var o=t._valueTracker;if(!o)return!0;var s=o.getValue(),i="";return t&&(i=Am(t)?t.checked?"true":"false":t.value),t=i,t!==s?(o.setValue(t),!0):!1}function bl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var UE=/[\n"\\]/g;function kn(t){return t.replace(UE,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function pf(t,o,s,i,u,p,S,M){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),o!=null?S==="number"?(o===0&&t.value===""||t.value!=o)&&(t.value=""+Dn(o)):t.value!==""+Dn(o)&&(t.value=""+Dn(o)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),o!=null?mf(t,S,Dn(o)):s!=null?mf(t,S,Dn(s)):i!=null&&t.removeAttribute("value"),u==null&&p!=null&&(t.defaultChecked=!!p),u!=null&&(t.checked=u&&typeof u!="function"&&typeof u!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?t.name=""+Dn(M):t.removeAttribute("name")}function Dm(t,o,s,i,u,p,S,M){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(t.type=p),o!=null||s!=null){if(!(p!=="submit"&&p!=="reset"||o!=null)){hf(t);return}s=s!=null?""+Dn(s):"",o=o!=null?""+Dn(o):s,M||o===t.value||(t.value=o),t.defaultValue=o}i=i??u,i=typeof i!="function"&&typeof i!="symbol"&&!!i,t.checked=M?t.checked:!!i,t.defaultChecked=!!i,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S),hf(t)}function mf(t,o,s){o==="number"&&bl(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function Ls(t,o,s,i){if(t=t.options,o){o={};for(var u=0;u<s.length;u++)o["$"+s[u]]=!0;for(s=0;s<t.length;s++)u=o.hasOwnProperty("$"+t[s].value),t[s].selected!==u&&(t[s].selected=u),u&&i&&(t[s].defaultSelected=!0)}else{for(s=""+Dn(s),o=null,u=0;u<t.length;u++){if(t[u].value===s){t[u].selected=!0,i&&(t[u].defaultSelected=!0);return}o!==null||t[u].disabled||(o=t[u])}o!==null&&(o.selected=!0)}}function km(t,o,s){if(o!=null&&(o=""+Dn(o),o!==t.value&&(t.value=o),s==null)){t.defaultValue!==o&&(t.defaultValue=o);return}t.defaultValue=s!=null?""+Dn(s):""}function Nm(t,o,s,i){if(o==null){if(i!=null){if(s!=null)throw Error(a(92));if(re(i)){if(1<i.length)throw Error(a(93));i=i[0]}s=i}s==null&&(s=""),o=s}s=Dn(o),t.defaultValue=s,i=t.textContent,i===s&&i!==""&&i!==null&&(t.value=i),hf(t)}function js(t,o){if(o){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=o;return}}t.textContent=o}var BE=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function zm(t,o,s){var i=o.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?i?t.setProperty(o,""):o==="float"?t.cssFloat="":t[o]="":i?t.setProperty(o,s):typeof s!="number"||s===0||BE.has(o)?o==="float"?t.cssFloat=s:t[o]=(""+s).trim():t[o]=s+"px"}function Lm(t,o,s){if(o!=null&&typeof o!="object")throw Error(a(62));if(t=t.style,s!=null){for(var i in s)!s.hasOwnProperty(i)||o!=null&&o.hasOwnProperty(i)||(i.indexOf("--")===0?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="");for(var u in o)i=o[u],o.hasOwnProperty(u)&&s[u]!==i&&zm(t,u,i)}else for(var p in o)o.hasOwnProperty(p)&&zm(t,p,o[p])}function gf(t){if(t.indexOf("-")===-1)return!1;switch(t){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 HE=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),VE=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Sl(t){return VE.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function vo(){}var yf=null;function vf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ps=null,Is=null;function jm(t){var o=ks(t);if(o&&(t=o.stateNode)){var s=t[un]||null;e:switch(t=o.stateNode,o.type){case"input":if(pf(t,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),o=s.name,s.type==="radio"&&o!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+kn(""+o)+'"][type="radio"]'),o=0;o<s.length;o++){var i=s[o];if(i!==t&&i.form===t.form){var u=i[un]||null;if(!u)throw Error(a(90));pf(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(o=0;o<s.length;o++)i=s[o],i.form===t.form&&_m(i)}break e;case"textarea":km(t,s.value,s.defaultValue);break e;case"select":o=s.value,o!=null&&Ls(t,!!s.multiple,o,!1)}}}var bf=!1;function Pm(t,o,s){if(bf)return t(o,s);bf=!0;try{var i=t(o);return i}finally{if(bf=!1,(Ps!==null||Is!==null)&&(ic(),Ps&&(o=Ps,t=Is,Is=Ps=null,jm(o),t)))for(o=0;o<t.length;o++)jm(t[o])}}function Ka(t,o){var s=t.stateNode;if(s===null)return null;var i=s[un]||null;if(i===null)return null;s=i[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(t=t.type,i=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!i;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(a(231,o,typeof s));return s}var bo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sf=!1;if(bo)try{var Qa={};Object.defineProperty(Qa,"passive",{get:function(){Sf=!0}}),window.addEventListener("test",Qa,Qa),window.removeEventListener("test",Qa,Qa)}catch{Sf=!1}var Jo=null,xf=null,xl=null;function Im(){if(xl)return xl;var t,o=xf,s=o.length,i,u="value"in Jo?Jo.value:Jo.textContent,p=u.length;for(t=0;t<s&&o[t]===u[t];t++);var S=s-t;for(i=1;i<=S&&o[s-i]===u[p-i];i++);return xl=u.slice(t,1<i?1-i:void 0)}function wl(t){var o=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&o===13&&(t=13)):t=o,t===10&&(t=13),32<=t||t===13?t:0}function El(){return!0}function Um(){return!1}function fn(t){function o(s,i,u,p,S){this._reactName=s,this._targetInst=u,this.type=i,this.nativeEvent=p,this.target=S,this.currentTarget=null;for(var M in t)t.hasOwnProperty(M)&&(s=t[M],this[M]=s?s(p):p[M]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?El:Um,this.isPropagationStopped=Um,this}return g(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=El)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=El)},persist:function(){},isPersistent:El}),o}var Fr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rl=fn(Fr),Za=g({},Fr,{view:0,detail:0}),YE=fn(Za),wf,Ef,$a,Tl=g({},Za,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tf,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==$a&&($a&&t.type==="mousemove"?(wf=t.screenX-$a.screenX,Ef=t.screenY-$a.screenY):Ef=wf=0,$a=t),wf)},movementY:function(t){return"movementY"in t?t.movementY:Ef}}),Bm=fn(Tl),qE=g({},Tl,{dataTransfer:0}),GE=fn(qE),FE=g({},Za,{relatedTarget:0}),Rf=fn(FE),XE=g({},Fr,{animationName:0,elapsedTime:0,pseudoElement:0}),KE=fn(XE),QE=g({},Fr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ZE=fn(QE),$E=g({},Fr,{data:0}),Hm=fn($E),JE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},WE={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},e1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function t1(t){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(t):(t=e1[t])?!!o[t]:!1}function Tf(){return t1}var n1=g({},Za,{key:function(t){if(t.key){var o=JE[t.key]||t.key;if(o!=="Unidentified")return o}return t.type==="keypress"?(t=wl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?WE[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tf,charCode:function(t){return t.type==="keypress"?wl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?wl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),o1=fn(n1),r1=g({},Tl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vm=fn(r1),s1=g({},Za,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tf}),a1=fn(s1),i1=g({},Fr,{propertyName:0,elapsedTime:0,pseudoElement:0}),l1=fn(i1),c1=g({},Tl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),u1=fn(c1),f1=g({},Fr,{newState:0,oldState:0}),d1=fn(f1),h1=[9,13,27,32],Cf=bo&&"CompositionEvent"in window,Ja=null;bo&&"documentMode"in document&&(Ja=document.documentMode);var p1=bo&&"TextEvent"in window&&!Ja,Ym=bo&&(!Cf||Ja&&8<Ja&&11>=Ja),qm=" ",Gm=!1;function Fm(t,o){switch(t){case"keyup":return h1.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Us=!1;function m1(t,o){switch(t){case"compositionend":return Xm(o);case"keypress":return o.which!==32?null:(Gm=!0,qm);case"textInput":return t=o.data,t===qm&&Gm?null:t;default:return null}}function g1(t,o){if(Us)return t==="compositionend"||!Cf&&Fm(t,o)?(t=Im(),xl=xf=Jo=null,Us=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Ym&&o.locale!=="ko"?null:o.data;default:return null}}var y1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Km(t){var o=t&&t.nodeName&&t.nodeName.toLowerCase();return o==="input"?!!y1[t.type]:o==="textarea"}function Qm(t,o,s,i){Ps?Is?Is.push(i):Is=[i]:Ps=i,o=pc(o,"onChange"),0<o.length&&(s=new Rl("onChange","change",null,s,i),t.push({event:s,listeners:o}))}var Wa=null,ei=null;function v1(t){Dv(t,0)}function Cl(t){var o=Xa(t);if(_m(o))return t}function Zm(t,o){if(t==="change")return o}var $m=!1;if(bo){var Mf;if(bo){var Of="oninput"in document;if(!Of){var Jm=document.createElement("div");Jm.setAttribute("oninput","return;"),Of=typeof Jm.oninput=="function"}Mf=Of}else Mf=!1;$m=Mf&&(!document.documentMode||9<document.documentMode)}function Wm(){Wa&&(Wa.detachEvent("onpropertychange",eg),ei=Wa=null)}function eg(t){if(t.propertyName==="value"&&Cl(ei)){var o=[];Qm(o,ei,t,vf(t)),Pm(v1,o)}}function b1(t,o,s){t==="focusin"?(Wm(),Wa=o,ei=s,Wa.attachEvent("onpropertychange",eg)):t==="focusout"&&Wm()}function S1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Cl(ei)}function x1(t,o){if(t==="click")return Cl(o)}function w1(t,o){if(t==="input"||t==="change")return Cl(o)}function E1(t,o){return t===o&&(t!==0||1/t===1/o)||t!==t&&o!==o}var Sn=typeof Object.is=="function"?Object.is:E1;function ti(t,o){if(Sn(t,o))return!0;if(typeof t!="object"||t===null||typeof o!="object"||o===null)return!1;var s=Object.keys(t),i=Object.keys(o);if(s.length!==i.length)return!1;for(i=0;i<s.length;i++){var u=s[i];if(!de.call(o,u)||!Sn(t[u],o[u]))return!1}return!0}function tg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ng(t,o){var s=tg(t);t=0;for(var i;s;){if(s.nodeType===3){if(i=t+s.textContent.length,t<=o&&i>=o)return{node:s,offset:o-t};t=i}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=tg(s)}}function og(t,o){return t&&o?t===o?!0:t&&t.nodeType===3?!1:o&&o.nodeType===3?og(t,o.parentNode):"contains"in t?t.contains(o):t.compareDocumentPosition?!!(t.compareDocumentPosition(o)&16):!1:!1}function rg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var o=bl(t.document);o instanceof t.HTMLIFrameElement;){try{var s=typeof o.contentWindow.location.href=="string"}catch{s=!1}if(s)t=o.contentWindow;else break;o=bl(t.document)}return o}function Af(t){var o=t&&t.nodeName&&t.nodeName.toLowerCase();return o&&(o==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||o==="textarea"||t.contentEditable==="true")}var R1=bo&&"documentMode"in document&&11>=document.documentMode,Bs=null,_f=null,ni=null,Df=!1;function sg(t,o,s){var i=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Df||Bs==null||Bs!==bl(i)||(i=Bs,"selectionStart"in i&&Af(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ni&&ti(ni,i)||(ni=i,i=pc(_f,"onSelect"),0<i.length&&(o=new Rl("onSelect","select",null,o,s),t.push({event:o,listeners:i}),o.target=Bs)))}function Xr(t,o){var s={};return s[t.toLowerCase()]=o.toLowerCase(),s["Webkit"+t]="webkit"+o,s["Moz"+t]="moz"+o,s}var Hs={animationend:Xr("Animation","AnimationEnd"),animationiteration:Xr("Animation","AnimationIteration"),animationstart:Xr("Animation","AnimationStart"),transitionrun:Xr("Transition","TransitionRun"),transitionstart:Xr("Transition","TransitionStart"),transitioncancel:Xr("Transition","TransitionCancel"),transitionend:Xr("Transition","TransitionEnd")},kf={},ag={};bo&&(ag=document.createElement("div").style,"AnimationEvent"in window||(delete Hs.animationend.animation,delete Hs.animationiteration.animation,delete Hs.animationstart.animation),"TransitionEvent"in window||delete Hs.transitionend.transition);function Kr(t){if(kf[t])return kf[t];if(!Hs[t])return t;var o=Hs[t],s;for(s in o)if(o.hasOwnProperty(s)&&s in ag)return kf[t]=o[s];return t}var ig=Kr("animationend"),lg=Kr("animationiteration"),cg=Kr("animationstart"),T1=Kr("transitionrun"),C1=Kr("transitionstart"),M1=Kr("transitioncancel"),ug=Kr("transitionend"),fg=new Map,Nf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Nf.push("scrollEnd");function Qn(t,o){fg.set(t,o),Gr(o,[t])}var Ml=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Nn=[],Vs=0,zf=0;function Ol(){for(var t=Vs,o=zf=Vs=0;o<t;){var s=Nn[o];Nn[o++]=null;var i=Nn[o];Nn[o++]=null;var u=Nn[o];Nn[o++]=null;var p=Nn[o];if(Nn[o++]=null,i!==null&&u!==null){var S=i.pending;S===null?u.next=u:(u.next=S.next,S.next=u),i.pending=u}p!==0&&dg(s,u,p)}}function Al(t,o,s,i){Nn[Vs++]=t,Nn[Vs++]=o,Nn[Vs++]=s,Nn[Vs++]=i,zf|=i,t.lanes|=i,t=t.alternate,t!==null&&(t.lanes|=i)}function Lf(t,o,s,i){return Al(t,o,s,i),_l(t)}function Qr(t,o){return Al(t,null,null,o),_l(t)}function dg(t,o,s){t.lanes|=s;var i=t.alternate;i!==null&&(i.lanes|=s);for(var u=!1,p=t.return;p!==null;)p.childLanes|=s,i=p.alternate,i!==null&&(i.childLanes|=s),p.tag===22&&(t=p.stateNode,t===null||t._visibility&1||(u=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,u&&o!==null&&(u=31-st(s),t=p.hiddenUpdates,i=t[u],i===null?t[u]=[o]:i.push(o),o.lane=s|536870912),p):null}function _l(t){if(50<Ri)throw Ri=0,qd=null,Error(a(185));for(var o=t.return;o!==null;)t=o,o=t.return;return t.tag===3?t.stateNode:null}var Ys={};function O1(t,o,s,i){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xn(t,o,s,i){return new O1(t,o,s,i)}function jf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function So(t,o){var s=t.alternate;return s===null?(s=xn(t.tag,o,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=o,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&65011712,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,o=t.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s.refCleanup=t.refCleanup,s}function hg(t,o){t.flags&=65011714;var s=t.alternate;return s===null?(t.childLanes=0,t.lanes=o,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,t.type=s.type,o=s.dependencies,t.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),t}function Dl(t,o,s,i,u,p){var S=0;if(i=t,typeof t=="function")jf(t)&&(S=1);else if(typeof t=="string")S=NR(t,s,se.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case q:return t=xn(31,s,o,u),t.elementType=q,t.lanes=p,t;case w:return Zr(s.children,u,p,o);case E:S=8,u|=24;break;case C:return t=xn(12,s,o,u|2),t.elementType=C,t.lanes=p,t;case L:return t=xn(13,s,o,u),t.elementType=L,t.lanes=p,t;case N:return t=xn(19,s,o,u),t.elementType=N,t.lanes=p,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case k:S=10;break e;case A:S=9;break e;case O:S=11;break e;case j:S=14;break e;case z:S=16,i=null;break e}S=29,s=Error(a(130,t===null?"null":typeof t,"")),i=null}return o=xn(S,s,o,u),o.elementType=t,o.type=i,o.lanes=p,o}function Zr(t,o,s,i){return t=xn(7,t,i,o),t.lanes=s,t}function Pf(t,o,s){return t=xn(6,t,null,o),t.lanes=s,t}function pg(t){var o=xn(18,null,null,0);return o.stateNode=t,o}function If(t,o,s){return o=xn(4,t.children!==null?t.children:[],t.key,o),o.lanes=s,o.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},o}var mg=new WeakMap;function zn(t,o){if(typeof t=="object"&&t!==null){var s=mg.get(t);return s!==void 0?s:(o={value:t,source:o,stack:ye(o)},mg.set(t,o),o)}return{value:t,source:o,stack:ye(o)}}var qs=[],Gs=0,kl=null,oi=0,Ln=[],jn=0,Wo=null,Wn=1,eo="";function xo(t,o){qs[Gs++]=oi,qs[Gs++]=kl,kl=t,oi=o}function gg(t,o,s){Ln[jn++]=Wn,Ln[jn++]=eo,Ln[jn++]=Wo,Wo=t;var i=Wn;t=eo;var u=32-st(i)-1;i&=~(1<<u),s+=1;var p=32-st(o)+u;if(30<p){var S=u-u%5;p=(i&(1<<S)-1).toString(32),i>>=S,u-=S,Wn=1<<32-st(o)+u|s<<u|i,eo=p+t}else Wn=1<<p|s<<u|i,eo=t}function Uf(t){t.return!==null&&(xo(t,1),gg(t,1,0))}function Bf(t){for(;t===kl;)kl=qs[--Gs],qs[Gs]=null,oi=qs[--Gs],qs[Gs]=null;for(;t===Wo;)Wo=Ln[--jn],Ln[jn]=null,eo=Ln[--jn],Ln[jn]=null,Wn=Ln[--jn],Ln[jn]=null}function yg(t,o){Ln[jn++]=Wn,Ln[jn++]=eo,Ln[jn++]=Wo,Wn=o.id,eo=o.overflow,Wo=t}var Gt=null,gt=null,et=!1,er=null,Pn=!1,Hf=Error(a(519));function tr(t){var o=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ri(zn(o,t)),Hf}function vg(t){var o=t.stateNode,s=t.type,i=t.memoizedProps;switch(o[qt]=t,o[un]=i,s){case"dialog":Qe("cancel",o),Qe("close",o);break;case"iframe":case"object":case"embed":Qe("load",o);break;case"video":case"audio":for(s=0;s<Ci.length;s++)Qe(Ci[s],o);break;case"source":Qe("error",o);break;case"img":case"image":case"link":Qe("error",o),Qe("load",o);break;case"details":Qe("toggle",o);break;case"input":Qe("invalid",o),Dm(o,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Qe("invalid",o);break;case"textarea":Qe("invalid",o),Nm(o,i.value,i.defaultValue,i.children)}s=i.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||o.textContent===""+s||i.suppressHydrationWarning===!0||Lv(o.textContent,s)?(i.popover!=null&&(Qe("beforetoggle",o),Qe("toggle",o)),i.onScroll!=null&&Qe("scroll",o),i.onScrollEnd!=null&&Qe("scrollend",o),i.onClick!=null&&(o.onclick=vo),o=!0):o=!1,o||tr(t,!0)}function bg(t){for(Gt=t.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:Pn=!1;return;case 27:case 3:Pn=!0;return;default:Gt=Gt.return}}function Fs(t){if(t!==Gt)return!1;if(!et)return bg(t),et=!0,!1;var o=t.tag,s;if((s=o!==3&&o!==27)&&((s=o===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||sh(t.type,t.memoizedProps)),s=!s),s&&gt&&tr(t),bg(t),o===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));gt=qv(t)}else if(o===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));gt=qv(t)}else o===27?(o=gt,mr(t.type)?(t=uh,uh=null,gt=t):gt=o):gt=Gt?Un(t.stateNode.nextSibling):null;return!0}function $r(){gt=Gt=null,et=!1}function Vf(){var t=er;return t!==null&&(mn===null?mn=t:mn.push.apply(mn,t),er=null),t}function ri(t){er===null?er=[t]:er.push(t)}var Yf=P(null),Jr=null,wo=null;function nr(t,o,s){le(Yf,o._currentValue),o._currentValue=s}function Eo(t){t._currentValue=Yf.current,X(Yf)}function qf(t,o,s){for(;t!==null;){var i=t.alternate;if((t.childLanes&o)!==o?(t.childLanes|=o,i!==null&&(i.childLanes|=o)):i!==null&&(i.childLanes&o)!==o&&(i.childLanes|=o),t===s)break;t=t.return}}function Gf(t,o,s,i){var u=t.child;for(u!==null&&(u.return=t);u!==null;){var p=u.dependencies;if(p!==null){var S=u.child;p=p.firstContext;e:for(;p!==null;){var M=p;p=u;for(var U=0;U<o.length;U++)if(M.context===o[U]){p.lanes|=s,M=p.alternate,M!==null&&(M.lanes|=s),qf(p.return,s,t),i||(S=null);break e}p=M.next}}else if(u.tag===18){if(S=u.return,S===null)throw Error(a(341));S.lanes|=s,p=S.alternate,p!==null&&(p.lanes|=s),qf(S,s,t),S=null}else S=u.child;if(S!==null)S.return=u;else for(S=u;S!==null;){if(S===t){S=null;break}if(u=S.sibling,u!==null){u.return=S.return,S=u;break}S=S.return}u=S}}function Xs(t,o,s,i){t=null;for(var u=o,p=!1;u!==null;){if(!p){if((u.flags&524288)!==0)p=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var S=u.alternate;if(S===null)throw Error(a(387));if(S=S.memoizedProps,S!==null){var M=u.type;Sn(u.pendingProps.value,S.value)||(t!==null?t.push(M):t=[M])}}else if(u===ve.current){if(S=u.alternate,S===null)throw Error(a(387));S.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(t!==null?t.push(Di):t=[Di])}u=u.return}t!==null&&Gf(o,t,s,i),o.flags|=262144}function Nl(t){for(t=t.firstContext;t!==null;){if(!Sn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Wr(t){Jr=t,wo=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ft(t){return Sg(Jr,t)}function zl(t,o){return Jr===null&&Wr(t),Sg(t,o)}function Sg(t,o){var s=o._currentValue;if(o={context:o,memoizedValue:s,next:null},wo===null){if(t===null)throw Error(a(308));wo=o,t.dependencies={lanes:0,firstContext:o},t.flags|=524288}else wo=wo.next=o;return s}var A1=typeof AbortController<"u"?AbortController:function(){var t=[],o=this.signal={aborted:!1,addEventListener:function(s,i){t.push(i)}};this.abort=function(){o.aborted=!0,t.forEach(function(s){return s()})}},_1=e.unstable_scheduleCallback,D1=e.unstable_NormalPriority,At={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ff(){return{controller:new A1,data:new Map,refCount:0}}function si(t){t.refCount--,t.refCount===0&&_1(D1,function(){t.controller.abort()})}var ai=null,Xf=0,Ks=0,Qs=null;function k1(t,o){if(ai===null){var s=ai=[];Xf=0,Ks=Zd(),Qs={status:"pending",value:void 0,then:function(i){s.push(i)}}}return Xf++,o.then(xg,xg),o}function xg(){if(--Xf===0&&ai!==null){Qs!==null&&(Qs.status="fulfilled");var t=ai;ai=null,Ks=0,Qs=null;for(var o=0;o<t.length;o++)(0,t[o])()}}function N1(t,o){var s=[],i={status:"pending",value:null,reason:null,then:function(u){s.push(u)}};return t.then(function(){i.status="fulfilled",i.value=o;for(var u=0;u<s.length;u++)(0,s[u])(o)},function(u){for(i.status="rejected",i.reason=u,u=0;u<s.length;u++)(0,s[u])(void 0)}),i}var wg=I.S;I.S=function(t,o){sv=Ue(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&k1(t,o),wg!==null&&wg(t,o)};var es=P(null);function Kf(){var t=es.current;return t!==null?t:pt.pooledCache}function Ll(t,o){o===null?le(es,es.current):le(es,o.pool)}function Eg(){var t=Kf();return t===null?null:{parent:At._currentValue,pool:t}}var Zs=Error(a(460)),Qf=Error(a(474)),jl=Error(a(542)),Pl={then:function(){}};function Rg(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Tg(t,o,s){switch(s=t[s],s===void 0?t.push(o):s!==o&&(o.then(vo,vo),o=s),o.status){case"fulfilled":return o.value;case"rejected":throw t=o.reason,Mg(t),t;default:if(typeof o.status=="string")o.then(vo,vo);else{if(t=pt,t!==null&&100<t.shellSuspendCounter)throw Error(a(482));t=o,t.status="pending",t.then(function(i){if(o.status==="pending"){var u=o;u.status="fulfilled",u.value=i}},function(i){if(o.status==="pending"){var u=o;u.status="rejected",u.reason=i}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw t=o.reason,Mg(t),t}throw ns=o,Zs}}function ts(t){try{var o=t._init;return o(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(ns=s,Zs):s}}var ns=null;function Cg(){if(ns===null)throw Error(a(459));var t=ns;return ns=null,t}function Mg(t){if(t===Zs||t===jl)throw Error(a(483))}var $s=null,ii=0;function Il(t){var o=ii;return ii+=1,$s===null&&($s=[]),Tg($s,t,o)}function li(t,o){o=o.props.ref,t.ref=o!==void 0?o:null}function Ul(t,o){throw o.$$typeof===v?Error(a(525)):(t=Object.prototype.toString.call(o),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":t)))}function Og(t){function o(Y,H){if(t){var F=Y.deletions;F===null?(Y.deletions=[H],Y.flags|=16):F.push(H)}}function s(Y,H){if(!t)return null;for(;H!==null;)o(Y,H),H=H.sibling;return null}function i(Y){for(var H=new Map;Y!==null;)Y.key!==null?H.set(Y.key,Y):H.set(Y.index,Y),Y=Y.sibling;return H}function u(Y,H){return Y=So(Y,H),Y.index=0,Y.sibling=null,Y}function p(Y,H,F){return Y.index=F,t?(F=Y.alternate,F!==null?(F=F.index,F<H?(Y.flags|=67108866,H):F):(Y.flags|=67108866,H)):(Y.flags|=1048576,H)}function S(Y){return t&&Y.alternate===null&&(Y.flags|=67108866),Y}function M(Y,H,F,ae){return H===null||H.tag!==6?(H=Pf(F,Y.mode,ae),H.return=Y,H):(H=u(H,F),H.return=Y,H)}function U(Y,H,F,ae){var Ae=F.type;return Ae===w?oe(Y,H,F.props.children,ae,F.key):H!==null&&(H.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===z&&ts(Ae)===H.type)?(H=u(H,F.props),li(H,F),H.return=Y,H):(H=Dl(F.type,F.key,F.props,null,Y.mode,ae),li(H,F),H.return=Y,H)}function K(Y,H,F,ae){return H===null||H.tag!==4||H.stateNode.containerInfo!==F.containerInfo||H.stateNode.implementation!==F.implementation?(H=If(F,Y.mode,ae),H.return=Y,H):(H=u(H,F.children||[]),H.return=Y,H)}function oe(Y,H,F,ae,Ae){return H===null||H.tag!==7?(H=Zr(F,Y.mode,ae,Ae),H.return=Y,H):(H=u(H,F),H.return=Y,H)}function ie(Y,H,F){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=Pf(""+H,Y.mode,F),H.return=Y,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return F=Dl(H.type,H.key,H.props,null,Y.mode,F),li(F,H),F.return=Y,F;case x:return H=If(H,Y.mode,F),H.return=Y,H;case z:return H=ts(H),ie(Y,H,F)}if(re(H)||V(H))return H=Zr(H,Y.mode,F,null),H.return=Y,H;if(typeof H.then=="function")return ie(Y,Il(H),F);if(H.$$typeof===k)return ie(Y,zl(Y,H),F);Ul(Y,H)}return null}function $(Y,H,F,ae){var Ae=H!==null?H.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return Ae!==null?null:M(Y,H,""+F,ae);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case b:return F.key===Ae?U(Y,H,F,ae):null;case x:return F.key===Ae?K(Y,H,F,ae):null;case z:return F=ts(F),$(Y,H,F,ae)}if(re(F)||V(F))return Ae!==null?null:oe(Y,H,F,ae,null);if(typeof F.then=="function")return $(Y,H,Il(F),ae);if(F.$$typeof===k)return $(Y,H,zl(Y,F),ae);Ul(Y,F)}return null}function ee(Y,H,F,ae,Ae){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return Y=Y.get(F)||null,M(H,Y,""+ae,Ae);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return Y=Y.get(ae.key===null?F:ae.key)||null,U(H,Y,ae,Ae);case x:return Y=Y.get(ae.key===null?F:ae.key)||null,K(H,Y,ae,Ae);case z:return ae=ts(ae),ee(Y,H,F,ae,Ae)}if(re(ae)||V(ae))return Y=Y.get(F)||null,oe(H,Y,ae,Ae,null);if(typeof ae.then=="function")return ee(Y,H,F,Il(ae),Ae);if(ae.$$typeof===k)return ee(Y,H,F,zl(H,ae),Ae);Ul(H,ae)}return null}function xe(Y,H,F,ae){for(var Ae=null,tt=null,Te=H,Ve=H=0,$e=null;Te!==null&&Ve<F.length;Ve++){Te.index>Ve?($e=Te,Te=null):$e=Te.sibling;var nt=$(Y,Te,F[Ve],ae);if(nt===null){Te===null&&(Te=$e);break}t&&Te&&nt.alternate===null&&o(Y,Te),H=p(nt,H,Ve),tt===null?Ae=nt:tt.sibling=nt,tt=nt,Te=$e}if(Ve===F.length)return s(Y,Te),et&&xo(Y,Ve),Ae;if(Te===null){for(;Ve<F.length;Ve++)Te=ie(Y,F[Ve],ae),Te!==null&&(H=p(Te,H,Ve),tt===null?Ae=Te:tt.sibling=Te,tt=Te);return et&&xo(Y,Ve),Ae}for(Te=i(Te);Ve<F.length;Ve++)$e=ee(Te,Y,Ve,F[Ve],ae),$e!==null&&(t&&$e.alternate!==null&&Te.delete($e.key===null?Ve:$e.key),H=p($e,H,Ve),tt===null?Ae=$e:tt.sibling=$e,tt=$e);return t&&Te.forEach(function(Sr){return o(Y,Sr)}),et&&xo(Y,Ve),Ae}function ke(Y,H,F,ae){if(F==null)throw Error(a(151));for(var Ae=null,tt=null,Te=H,Ve=H=0,$e=null,nt=F.next();Te!==null&&!nt.done;Ve++,nt=F.next()){Te.index>Ve?($e=Te,Te=null):$e=Te.sibling;var Sr=$(Y,Te,nt.value,ae);if(Sr===null){Te===null&&(Te=$e);break}t&&Te&&Sr.alternate===null&&o(Y,Te),H=p(Sr,H,Ve),tt===null?Ae=Sr:tt.sibling=Sr,tt=Sr,Te=$e}if(nt.done)return s(Y,Te),et&&xo(Y,Ve),Ae;if(Te===null){for(;!nt.done;Ve++,nt=F.next())nt=ie(Y,nt.value,ae),nt!==null&&(H=p(nt,H,Ve),tt===null?Ae=nt:tt.sibling=nt,tt=nt);return et&&xo(Y,Ve),Ae}for(Te=i(Te);!nt.done;Ve++,nt=F.next())nt=ee(Te,Y,Ve,nt.value,ae),nt!==null&&(t&&nt.alternate!==null&&Te.delete(nt.key===null?Ve:nt.key),H=p(nt,H,Ve),tt===null?Ae=nt:tt.sibling=nt,tt=nt);return t&&Te.forEach(function(qR){return o(Y,qR)}),et&&xo(Y,Ve),Ae}function dt(Y,H,F,ae){if(typeof F=="object"&&F!==null&&F.type===w&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case b:e:{for(var Ae=F.key;H!==null;){if(H.key===Ae){if(Ae=F.type,Ae===w){if(H.tag===7){s(Y,H.sibling),ae=u(H,F.props.children),ae.return=Y,Y=ae;break e}}else if(H.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===z&&ts(Ae)===H.type){s(Y,H.sibling),ae=u(H,F.props),li(ae,F),ae.return=Y,Y=ae;break e}s(Y,H);break}else o(Y,H);H=H.sibling}F.type===w?(ae=Zr(F.props.children,Y.mode,ae,F.key),ae.return=Y,Y=ae):(ae=Dl(F.type,F.key,F.props,null,Y.mode,ae),li(ae,F),ae.return=Y,Y=ae)}return S(Y);case x:e:{for(Ae=F.key;H!==null;){if(H.key===Ae)if(H.tag===4&&H.stateNode.containerInfo===F.containerInfo&&H.stateNode.implementation===F.implementation){s(Y,H.sibling),ae=u(H,F.children||[]),ae.return=Y,Y=ae;break e}else{s(Y,H);break}else o(Y,H);H=H.sibling}ae=If(F,Y.mode,ae),ae.return=Y,Y=ae}return S(Y);case z:return F=ts(F),dt(Y,H,F,ae)}if(re(F))return xe(Y,H,F,ae);if(V(F)){if(Ae=V(F),typeof Ae!="function")throw Error(a(150));return F=Ae.call(F),ke(Y,H,F,ae)}if(typeof F.then=="function")return dt(Y,H,Il(F),ae);if(F.$$typeof===k)return dt(Y,H,zl(Y,F),ae);Ul(Y,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,H!==null&&H.tag===6?(s(Y,H.sibling),ae=u(H,F),ae.return=Y,Y=ae):(s(Y,H),ae=Pf(F,Y.mode,ae),ae.return=Y,Y=ae),S(Y)):s(Y,H)}return function(Y,H,F,ae){try{ii=0;var Ae=dt(Y,H,F,ae);return $s=null,Ae}catch(Te){if(Te===Zs||Te===jl)throw Te;var tt=xn(29,Te,null,Y.mode);return tt.lanes=ae,tt.return=Y,tt}}}var os=Og(!0),Ag=Og(!1),or=!1;function Zf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $f(t,o){t=t.updateQueue,o.updateQueue===t&&(o.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function rr(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function sr(t,o,s){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,(at&2)!==0){var u=i.pending;return u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o,o=_l(t),dg(t,null,s),o}return Al(t,i,o,s),_l(t)}function ci(t,o,s){if(o=o.updateQueue,o!==null&&(o=o.shared,(s&4194048)!==0)){var i=o.lanes;i&=t.pendingLanes,s|=i,o.lanes=s,hl(t,s)}}function Jf(t,o){var s=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,s===i)){var u=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var S={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};p===null?u=p=S:p=p.next=S,s=s.next}while(s!==null);p===null?u=p=o:p=p.next=o}else u=p=o;s={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:p,shared:i.shared,callbacks:i.callbacks},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=o:t.next=o,s.lastBaseUpdate=o}var Wf=!1;function ui(){if(Wf){var t=Qs;if(t!==null)throw t}}function fi(t,o,s,i){Wf=!1;var u=t.updateQueue;or=!1;var p=u.firstBaseUpdate,S=u.lastBaseUpdate,M=u.shared.pending;if(M!==null){u.shared.pending=null;var U=M,K=U.next;U.next=null,S===null?p=K:S.next=K,S=U;var oe=t.alternate;oe!==null&&(oe=oe.updateQueue,M=oe.lastBaseUpdate,M!==S&&(M===null?oe.firstBaseUpdate=K:M.next=K,oe.lastBaseUpdate=U))}if(p!==null){var ie=u.baseState;S=0,oe=K=U=null,M=p;do{var $=M.lane&-536870913,ee=$!==M.lane;if(ee?(Ze&$)===$:(i&$)===$){$!==0&&$===Ks&&(Wf=!0),oe!==null&&(oe=oe.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var xe=t,ke=M;$=o;var dt=s;switch(ke.tag){case 1:if(xe=ke.payload,typeof xe=="function"){ie=xe.call(dt,ie,$);break e}ie=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ke.payload,$=typeof xe=="function"?xe.call(dt,ie,$):xe,$==null)break e;ie=g({},ie,$);break e;case 2:or=!0}}$=M.callback,$!==null&&(t.flags|=64,ee&&(t.flags|=8192),ee=u.callbacks,ee===null?u.callbacks=[$]:ee.push($))}else ee={lane:$,tag:M.tag,payload:M.payload,callback:M.callback,next:null},oe===null?(K=oe=ee,U=ie):oe=oe.next=ee,S|=$;if(M=M.next,M===null){if(M=u.shared.pending,M===null)break;ee=M,M=ee.next,ee.next=null,u.lastBaseUpdate=ee,u.shared.pending=null}}while(!0);oe===null&&(U=ie),u.baseState=U,u.firstBaseUpdate=K,u.lastBaseUpdate=oe,p===null&&(u.shared.lanes=0),ur|=S,t.lanes=S,t.memoizedState=ie}}function _g(t,o){if(typeof t!="function")throw Error(a(191,t));t.call(o)}function Dg(t,o){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)_g(s[t],o)}var Js=P(null),Bl=P(0);function kg(t,o){t=ko,le(Bl,t),le(Js,o),ko=t|o.baseLanes}function ed(){le(Bl,ko),le(Js,Js.current)}function td(){ko=Bl.current,X(Js),X(Bl)}var wn=P(null),In=null;function ar(t){var o=t.alternate;le(Ct,Ct.current&1),le(wn,t),In===null&&(o===null||Js.current!==null||o.memoizedState!==null)&&(In=t)}function nd(t){le(Ct,Ct.current),le(wn,t),In===null&&(In=t)}function Ng(t){t.tag===22?(le(Ct,Ct.current),le(wn,t),In===null&&(In=t)):ir()}function ir(){le(Ct,Ct.current),le(wn,wn.current)}function En(t){X(wn),In===t&&(In=null),X(Ct)}var Ct=P(0);function Hl(t){for(var o=t;o!==null;){if(o.tag===13){var s=o.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||lh(s)||ch(s)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break;for(;o.sibling===null;){if(o.return===null||o.return===t)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Ro=0,Be=null,ut=null,_t=null,Vl=!1,Ws=!1,rs=!1,Yl=0,di=0,ea=null,z1=0;function xt(){throw Error(a(321))}function od(t,o){if(o===null)return!1;for(var s=0;s<o.length&&s<t.length;s++)if(!Sn(t[s],o[s]))return!1;return!0}function rd(t,o,s,i,u,p){return Ro=p,Be=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,I.H=t===null||t.memoizedState===null?gy:bd,rs=!1,p=s(i,u),rs=!1,Ws&&(p=Lg(o,s,i,u)),zg(t),p}function zg(t){I.H=mi;var o=ut!==null&&ut.next!==null;if(Ro=0,_t=ut=Be=null,Vl=!1,di=0,ea=null,o)throw Error(a(300));t===null||Dt||(t=t.dependencies,t!==null&&Nl(t)&&(Dt=!0))}function Lg(t,o,s,i){Be=t;var u=0;do{if(Ws&&(ea=null),di=0,Ws=!1,25<=u)throw Error(a(301));if(u+=1,_t=ut=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}I.H=yy,p=o(s,i)}while(Ws);return p}function L1(){var t=I.H,o=t.useState()[0];return o=typeof o.then=="function"?hi(o):o,t=t.useState()[0],(ut!==null?ut.memoizedState:null)!==t&&(Be.flags|=1024),o}function sd(){var t=Yl!==0;return Yl=0,t}function ad(t,o,s){o.updateQueue=t.updateQueue,o.flags&=-2053,t.lanes&=~s}function id(t){if(Vl){for(t=t.memoizedState;t!==null;){var o=t.queue;o!==null&&(o.pending=null),t=t.next}Vl=!1}Ro=0,_t=ut=Be=null,Ws=!1,di=Yl=0,ea=null}function on(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?Be.memoizedState=_t=t:_t=_t.next=t,_t}function Mt(){if(ut===null){var t=Be.alternate;t=t!==null?t.memoizedState:null}else t=ut.next;var o=_t===null?Be.memoizedState:_t.next;if(o!==null)_t=o,ut=t;else{if(t===null)throw Be.alternate===null?Error(a(467)):Error(a(310));ut=t,t={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},_t===null?Be.memoizedState=_t=t:_t=_t.next=t}return _t}function ql(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hi(t){var o=di;return di+=1,ea===null&&(ea=[]),t=Tg(ea,t,o),o=Be,(_t===null?o.memoizedState:_t.next)===null&&(o=o.alternate,I.H=o===null||o.memoizedState===null?gy:bd),t}function Gl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return hi(t);if(t.$$typeof===k)return Ft(t)}throw Error(a(438,String(t)))}function ld(t){var o=null,s=Be.updateQueue;if(s!==null&&(o=s.memoCache),o==null){var i=Be.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(o={data:i.data.map(function(u){return u.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),s===null&&(s=ql(),Be.updateQueue=s),s.memoCache=o,s=o.data[o.index],s===void 0)for(s=o.data[o.index]=Array(t),i=0;i<t;i++)s[i]=Z;return o.index++,s}function To(t,o){return typeof o=="function"?o(t):o}function Fl(t){var o=Mt();return cd(o,ut,t)}function cd(t,o,s){var i=t.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=s;var u=t.baseQueue,p=i.pending;if(p!==null){if(u!==null){var S=u.next;u.next=p.next,p.next=S}o.baseQueue=u=p,i.pending=null}if(p=t.baseState,u===null)t.memoizedState=p;else{o=u.next;var M=S=null,U=null,K=o,oe=!1;do{var ie=K.lane&-536870913;if(ie!==K.lane?(Ze&ie)===ie:(Ro&ie)===ie){var $=K.revertLane;if($===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),ie===Ks&&(oe=!0);else if((Ro&$)===$){K=K.next,$===Ks&&(oe=!0);continue}else ie={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},U===null?(M=U=ie,S=p):U=U.next=ie,Be.lanes|=$,ur|=$;ie=K.action,rs&&s(p,ie),p=K.hasEagerState?K.eagerState:s(p,ie)}else $={lane:ie,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},U===null?(M=U=$,S=p):U=U.next=$,Be.lanes|=ie,ur|=ie;K=K.next}while(K!==null&&K!==o);if(U===null?S=p:U.next=M,!Sn(p,t.memoizedState)&&(Dt=!0,oe&&(s=Qs,s!==null)))throw s;t.memoizedState=p,t.baseState=S,t.baseQueue=U,i.lastRenderedState=p}return u===null&&(i.lanes=0),[t.memoizedState,i.dispatch]}function ud(t){var o=Mt(),s=o.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=t;var i=s.dispatch,u=s.pending,p=o.memoizedState;if(u!==null){s.pending=null;var S=u=u.next;do p=t(p,S.action),S=S.next;while(S!==u);Sn(p,o.memoizedState)||(Dt=!0),o.memoizedState=p,o.baseQueue===null&&(o.baseState=p),s.lastRenderedState=p}return[p,i]}function jg(t,o,s){var i=Be,u=Mt(),p=et;if(p){if(s===void 0)throw Error(a(407));s=s()}else s=o();var S=!Sn((ut||u).memoizedState,s);if(S&&(u.memoizedState=s,Dt=!0),u=u.queue,hd(Ug.bind(null,i,u,t),[t]),u.getSnapshot!==o||S||_t!==null&&_t.memoizedState.tag&1){if(i.flags|=2048,ta(9,{destroy:void 0},Ig.bind(null,i,u,s,o),null),pt===null)throw Error(a(349));p||(Ro&127)!==0||Pg(i,o,s)}return s}function Pg(t,o,s){t.flags|=16384,t={getSnapshot:o,value:s},o=Be.updateQueue,o===null?(o=ql(),Be.updateQueue=o,o.stores=[t]):(s=o.stores,s===null?o.stores=[t]:s.push(t))}function Ig(t,o,s,i){o.value=s,o.getSnapshot=i,Bg(o)&&Hg(t)}function Ug(t,o,s){return s(function(){Bg(o)&&Hg(t)})}function Bg(t){var o=t.getSnapshot;t=t.value;try{var s=o();return!Sn(t,s)}catch{return!0}}function Hg(t){var o=Qr(t,2);o!==null&&gn(o,t,2)}function fd(t){var o=on();if(typeof t=="function"){var s=t;if(t=s(),rs){Xe(!0);try{s()}finally{Xe(!1)}}}return o.memoizedState=o.baseState=t,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:To,lastRenderedState:t},o}function Vg(t,o,s,i){return t.baseState=s,cd(t,ut,typeof i=="function"?i:To)}function j1(t,o,s,i,u){if(Ql(t))throw Error(a(485));if(t=o.action,t!==null){var p={payload:u,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){p.listeners.push(S)}};I.T!==null?s(!0):p.isTransition=!1,i(p),s=o.pending,s===null?(p.next=o.pending=p,Yg(o,p)):(p.next=s.next,o.pending=s.next=p)}}function Yg(t,o){var s=o.action,i=o.payload,u=t.state;if(o.isTransition){var p=I.T,S={};I.T=S;try{var M=s(u,i),U=I.S;U!==null&&U(S,M),qg(t,o,M)}catch(K){dd(t,o,K)}finally{p!==null&&S.types!==null&&(p.types=S.types),I.T=p}}else try{p=s(u,i),qg(t,o,p)}catch(K){dd(t,o,K)}}function qg(t,o,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(i){Gg(t,o,i)},function(i){return dd(t,o,i)}):Gg(t,o,s)}function Gg(t,o,s){o.status="fulfilled",o.value=s,Fg(o),t.state=s,o=t.pending,o!==null&&(s=o.next,s===o?t.pending=null:(s=s.next,o.next=s,Yg(t,s)))}function dd(t,o,s){var i=t.pending;if(t.pending=null,i!==null){i=i.next;do o.status="rejected",o.reason=s,Fg(o),o=o.next;while(o!==i)}t.action=null}function Fg(t){t=t.listeners;for(var o=0;o<t.length;o++)(0,t[o])()}function Xg(t,o){return o}function Kg(t,o){if(et){var s=pt.formState;if(s!==null){e:{var i=Be;if(et){if(gt){t:{for(var u=gt,p=Pn;u.nodeType!==8;){if(!p){u=null;break t}if(u=Un(u.nextSibling),u===null){u=null;break t}}p=u.data,u=p==="F!"||p==="F"?u:null}if(u){gt=Un(u.nextSibling),i=u.data==="F!";break e}}tr(i)}i=!1}i&&(o=s[0])}}return s=on(),s.memoizedState=s.baseState=o,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xg,lastRenderedState:o},s.queue=i,s=hy.bind(null,Be,i),i.dispatch=s,i=fd(!1),p=vd.bind(null,Be,!1,i.queue),i=on(),u={state:o,dispatch:null,action:t,pending:null},i.queue=u,s=j1.bind(null,Be,u,p,s),u.dispatch=s,i.memoizedState=t,[o,s,!1]}function Qg(t){var o=Mt();return Zg(o,ut,t)}function Zg(t,o,s){if(o=cd(t,o,Xg)[0],t=Fl(To)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var i=hi(o)}catch(S){throw S===Zs?jl:S}else i=o;o=Mt();var u=o.queue,p=u.dispatch;return s!==o.memoizedState&&(Be.flags|=2048,ta(9,{destroy:void 0},P1.bind(null,u,s),null)),[i,p,t]}function P1(t,o){t.action=o}function $g(t){var o=Mt(),s=ut;if(s!==null)return Zg(o,s,t);Mt(),o=o.memoizedState,s=Mt();var i=s.queue.dispatch;return s.memoizedState=t,[o,i,!1]}function ta(t,o,s,i){return t={tag:t,create:s,deps:i,inst:o,next:null},o=Be.updateQueue,o===null&&(o=ql(),Be.updateQueue=o),s=o.lastEffect,s===null?o.lastEffect=t.next=t:(i=s.next,s.next=t,t.next=i,o.lastEffect=t),t}function Jg(){return Mt().memoizedState}function Xl(t,o,s,i){var u=on();Be.flags|=t,u.memoizedState=ta(1|o,{destroy:void 0},s,i===void 0?null:i)}function Kl(t,o,s,i){var u=Mt();i=i===void 0?null:i;var p=u.memoizedState.inst;ut!==null&&i!==null&&od(i,ut.memoizedState.deps)?u.memoizedState=ta(o,p,s,i):(Be.flags|=t,u.memoizedState=ta(1|o,p,s,i))}function Wg(t,o){Xl(8390656,8,t,o)}function hd(t,o){Kl(2048,8,t,o)}function I1(t){Be.flags|=4;var o=Be.updateQueue;if(o===null)o=ql(),Be.updateQueue=o,o.events=[t];else{var s=o.events;s===null?o.events=[t]:s.push(t)}}function ey(t){var o=Mt().memoizedState;return I1({ref:o,nextImpl:t}),function(){if((at&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}function ty(t,o){return Kl(4,2,t,o)}function ny(t,o){return Kl(4,4,t,o)}function oy(t,o){if(typeof o=="function"){t=t();var s=o(t);return function(){typeof s=="function"?s():o(null)}}if(o!=null)return t=t(),o.current=t,function(){o.current=null}}function ry(t,o,s){s=s!=null?s.concat([t]):null,Kl(4,4,oy.bind(null,o,t),s)}function pd(){}function sy(t,o){var s=Mt();o=o===void 0?null:o;var i=s.memoizedState;return o!==null&&od(o,i[1])?i[0]:(s.memoizedState=[t,o],t)}function ay(t,o){var s=Mt();o=o===void 0?null:o;var i=s.memoizedState;if(o!==null&&od(o,i[1]))return i[0];if(i=t(),rs){Xe(!0);try{t()}finally{Xe(!1)}}return s.memoizedState=[i,o],i}function md(t,o,s){return s===void 0||(Ro&1073741824)!==0&&(Ze&261930)===0?t.memoizedState=o:(t.memoizedState=s,t=iv(),Be.lanes|=t,ur|=t,s)}function iy(t,o,s,i){return Sn(s,o)?s:Js.current!==null?(t=md(t,s,i),Sn(t,o)||(Dt=!0),t):(Ro&42)===0||(Ro&1073741824)!==0&&(Ze&261930)===0?(Dt=!0,t.memoizedState=s):(t=iv(),Be.lanes|=t,ur|=t,o)}function ly(t,o,s,i,u){var p=B.p;B.p=p!==0&&8>p?p:8;var S=I.T,M={};I.T=M,vd(t,!1,o,s);try{var U=u(),K=I.S;if(K!==null&&K(M,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var oe=N1(U,i);pi(t,o,oe,Cn(t))}else pi(t,o,i,Cn(t))}catch(ie){pi(t,o,{then:function(){},status:"rejected",reason:ie},Cn())}finally{B.p=p,S!==null&&M.types!==null&&(S.types=M.types),I.T=S}}function U1(){}function gd(t,o,s,i){if(t.tag!==5)throw Error(a(476));var u=cy(t).queue;ly(t,u,o,G,s===null?U1:function(){return uy(t),s(i)})}function cy(t){var o=t.memoizedState;if(o!==null)return o;o={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:To,lastRenderedState:G},next:null};var s={};return o.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:To,lastRenderedState:s},next:null},t.memoizedState=o,t=t.alternate,t!==null&&(t.memoizedState=o),o}function uy(t){var o=cy(t);o.next===null&&(o=t.alternate.memoizedState),pi(t,o.next.queue,{},Cn())}function yd(){return Ft(Di)}function fy(){return Mt().memoizedState}function dy(){return Mt().memoizedState}function B1(t){for(var o=t.return;o!==null;){switch(o.tag){case 24:case 3:var s=Cn();t=rr(s);var i=sr(o,t,s);i!==null&&(gn(i,o,s),ci(i,o,s)),o={cache:Ff()},t.payload=o;return}o=o.return}}function H1(t,o,s){var i=Cn();s={lane:i,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ql(t)?py(o,s):(s=Lf(t,o,s,i),s!==null&&(gn(s,t,i),my(s,o,i)))}function hy(t,o,s){var i=Cn();pi(t,o,s,i)}function pi(t,o,s,i){var u={lane:i,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Ql(t))py(o,u);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=o.lastRenderedReducer,p!==null))try{var S=o.lastRenderedState,M=p(S,s);if(u.hasEagerState=!0,u.eagerState=M,Sn(M,S))return Al(t,o,u,0),pt===null&&Ol(),!1}catch{}if(s=Lf(t,o,u,i),s!==null)return gn(s,t,i),my(s,o,i),!0}return!1}function vd(t,o,s,i){if(i={lane:2,revertLane:Zd(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Ql(t)){if(o)throw Error(a(479))}else o=Lf(t,s,i,2),o!==null&&gn(o,t,2)}function Ql(t){var o=t.alternate;return t===Be||o!==null&&o===Be}function py(t,o){Ws=Vl=!0;var s=t.pending;s===null?o.next=o:(o.next=s.next,s.next=o),t.pending=o}function my(t,o,s){if((s&4194048)!==0){var i=o.lanes;i&=t.pendingLanes,s|=i,o.lanes=s,hl(t,s)}}var mi={readContext:Ft,use:Gl,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};mi.useEffectEvent=xt;var gy={readContext:Ft,use:Gl,useCallback:function(t,o){return on().memoizedState=[t,o===void 0?null:o],t},useContext:Ft,useEffect:Wg,useImperativeHandle:function(t,o,s){s=s!=null?s.concat([t]):null,Xl(4194308,4,oy.bind(null,o,t),s)},useLayoutEffect:function(t,o){return Xl(4194308,4,t,o)},useInsertionEffect:function(t,o){Xl(4,2,t,o)},useMemo:function(t,o){var s=on();o=o===void 0?null:o;var i=t();if(rs){Xe(!0);try{t()}finally{Xe(!1)}}return s.memoizedState=[i,o],i},useReducer:function(t,o,s){var i=on();if(s!==void 0){var u=s(o);if(rs){Xe(!0);try{s(o)}finally{Xe(!1)}}}else u=o;return i.memoizedState=i.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},i.queue=t,t=t.dispatch=H1.bind(null,Be,t),[i.memoizedState,t]},useRef:function(t){var o=on();return t={current:t},o.memoizedState=t},useState:function(t){t=fd(t);var o=t.queue,s=hy.bind(null,Be,o);return o.dispatch=s,[t.memoizedState,s]},useDebugValue:pd,useDeferredValue:function(t,o){var s=on();return md(s,t,o)},useTransition:function(){var t=fd(!1);return t=ly.bind(null,Be,t.queue,!0,!1),on().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,o,s){var i=Be,u=on();if(et){if(s===void 0)throw Error(a(407));s=s()}else{if(s=o(),pt===null)throw Error(a(349));(Ze&127)!==0||Pg(i,o,s)}u.memoizedState=s;var p={value:s,getSnapshot:o};return u.queue=p,Wg(Ug.bind(null,i,p,t),[t]),i.flags|=2048,ta(9,{destroy:void 0},Ig.bind(null,i,p,s,o),null),s},useId:function(){var t=on(),o=pt.identifierPrefix;if(et){var s=eo,i=Wn;s=(i&~(1<<32-st(i)-1)).toString(32)+s,o="_"+o+"R_"+s,s=Yl++,0<s&&(o+="H"+s.toString(32)),o+="_"}else s=z1++,o="_"+o+"r_"+s.toString(32)+"_";return t.memoizedState=o},useHostTransitionStatus:yd,useFormState:Kg,useActionState:Kg,useOptimistic:function(t){var o=on();o.memoizedState=o.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=s,o=vd.bind(null,Be,!0,s),s.dispatch=o,[t,o]},useMemoCache:ld,useCacheRefresh:function(){return on().memoizedState=B1.bind(null,Be)},useEffectEvent:function(t){var o=on(),s={impl:t};return o.memoizedState=s,function(){if((at&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},bd={readContext:Ft,use:Gl,useCallback:sy,useContext:Ft,useEffect:hd,useImperativeHandle:ry,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:ay,useReducer:Fl,useRef:Jg,useState:function(){return Fl(To)},useDebugValue:pd,useDeferredValue:function(t,o){var s=Mt();return iy(s,ut.memoizedState,t,o)},useTransition:function(){var t=Fl(To)[0],o=Mt().memoizedState;return[typeof t=="boolean"?t:hi(t),o]},useSyncExternalStore:jg,useId:fy,useHostTransitionStatus:yd,useFormState:Qg,useActionState:Qg,useOptimistic:function(t,o){var s=Mt();return Vg(s,ut,t,o)},useMemoCache:ld,useCacheRefresh:dy};bd.useEffectEvent=ey;var yy={readContext:Ft,use:Gl,useCallback:sy,useContext:Ft,useEffect:hd,useImperativeHandle:ry,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:ay,useReducer:ud,useRef:Jg,useState:function(){return ud(To)},useDebugValue:pd,useDeferredValue:function(t,o){var s=Mt();return ut===null?md(s,t,o):iy(s,ut.memoizedState,t,o)},useTransition:function(){var t=ud(To)[0],o=Mt().memoizedState;return[typeof t=="boolean"?t:hi(t),o]},useSyncExternalStore:jg,useId:fy,useHostTransitionStatus:yd,useFormState:$g,useActionState:$g,useOptimistic:function(t,o){var s=Mt();return ut!==null?Vg(s,ut,t,o):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:ld,useCacheRefresh:dy};yy.useEffectEvent=ey;function Sd(t,o,s,i){o=t.memoizedState,s=s(i,o),s=s==null?o:g({},o,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var xd={enqueueSetState:function(t,o,s){t=t._reactInternals;var i=Cn(),u=rr(i);u.payload=o,s!=null&&(u.callback=s),o=sr(t,u,i),o!==null&&(gn(o,t,i),ci(o,t,i))},enqueueReplaceState:function(t,o,s){t=t._reactInternals;var i=Cn(),u=rr(i);u.tag=1,u.payload=o,s!=null&&(u.callback=s),o=sr(t,u,i),o!==null&&(gn(o,t,i),ci(o,t,i))},enqueueForceUpdate:function(t,o){t=t._reactInternals;var s=Cn(),i=rr(s);i.tag=2,o!=null&&(i.callback=o),o=sr(t,i,s),o!==null&&(gn(o,t,s),ci(o,t,s))}};function vy(t,o,s,i,u,p,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(i,p,S):o.prototype&&o.prototype.isPureReactComponent?!ti(s,i)||!ti(u,p):!0}function by(t,o,s,i){t=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(s,i),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(s,i),o.state!==t&&xd.enqueueReplaceState(o,o.state,null)}function ss(t,o){var s=o;if("ref"in o){s={};for(var i in o)i!=="ref"&&(s[i]=o[i])}if(t=t.defaultProps){s===o&&(s=g({},s));for(var u in t)s[u]===void 0&&(s[u]=t[u])}return s}function Sy(t){Ml(t)}function xy(t){console.error(t)}function wy(t){Ml(t)}function Zl(t,o){try{var s=t.onUncaughtError;s(o.value,{componentStack:o.stack})}catch(i){setTimeout(function(){throw i})}}function Ey(t,o,s){try{var i=t.onCaughtError;i(s.value,{componentStack:s.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function wd(t,o,s){return s=rr(s),s.tag=3,s.payload={element:null},s.callback=function(){Zl(t,o)},s}function Ry(t){return t=rr(t),t.tag=3,t}function Ty(t,o,s,i){var u=s.type.getDerivedStateFromError;if(typeof u=="function"){var p=i.value;t.payload=function(){return u(p)},t.callback=function(){Ey(o,s,i)}}var S=s.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){Ey(o,s,i),typeof u!="function"&&(fr===null?fr=new Set([this]):fr.add(this));var M=i.stack;this.componentDidCatch(i.value,{componentStack:M!==null?M:""})})}function V1(t,o,s,i,u){if(s.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(o=s.alternate,o!==null&&Xs(o,s,u,!0),s=wn.current,s!==null){switch(s.tag){case 31:case 13:return In===null?lc():s.alternate===null&&wt===0&&(wt=3),s.flags&=-257,s.flags|=65536,s.lanes=u,i===Pl?s.flags|=16384:(o=s.updateQueue,o===null?s.updateQueue=new Set([i]):o.add(i),Xd(t,i,u)),!1;case 22:return s.flags|=65536,i===Pl?s.flags|=16384:(o=s.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([i])},s.updateQueue=o):(s=o.retryQueue,s===null?o.retryQueue=new Set([i]):s.add(i)),Xd(t,i,u)),!1}throw Error(a(435,s.tag))}return Xd(t,i,u),lc(),!1}if(et)return o=wn.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=u,i!==Hf&&(t=Error(a(422),{cause:i}),ri(zn(t,s)))):(i!==Hf&&(o=Error(a(423),{cause:i}),ri(zn(o,s))),t=t.current.alternate,t.flags|=65536,u&=-u,t.lanes|=u,i=zn(i,s),u=wd(t.stateNode,i,u),Jf(t,u),wt!==4&&(wt=2)),!1;var p=Error(a(520),{cause:i});if(p=zn(p,s),Ei===null?Ei=[p]:Ei.push(p),wt!==4&&(wt=2),o===null)return!0;i=zn(i,s),s=o;do{switch(s.tag){case 3:return s.flags|=65536,t=u&-u,s.lanes|=t,t=wd(s.stateNode,i,t),Jf(s,t),!1;case 1:if(o=s.type,p=s.stateNode,(s.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(fr===null||!fr.has(p))))return s.flags|=65536,u&=-u,s.lanes|=u,u=Ry(u),Ty(u,t,s,i),Jf(s,u),!1}s=s.return}while(s!==null);return!1}var Ed=Error(a(461)),Dt=!1;function Xt(t,o,s,i){o.child=t===null?Ag(o,null,s,i):os(o,t.child,s,i)}function Cy(t,o,s,i,u){s=s.render;var p=o.ref;if("ref"in i){var S={};for(var M in i)M!=="ref"&&(S[M]=i[M])}else S=i;return Wr(o),i=rd(t,o,s,S,p,u),M=sd(),t!==null&&!Dt?(ad(t,o,u),Co(t,o,u)):(et&&M&&Uf(o),o.flags|=1,Xt(t,o,i,u),o.child)}function My(t,o,s,i,u){if(t===null){var p=s.type;return typeof p=="function"&&!jf(p)&&p.defaultProps===void 0&&s.compare===null?(o.tag=15,o.type=p,Oy(t,o,p,i,u)):(t=Dl(s.type,null,i,o,o.mode,u),t.ref=o.ref,t.return=o,o.child=t)}if(p=t.child,!Dd(t,u)){var S=p.memoizedProps;if(s=s.compare,s=s!==null?s:ti,s(S,i)&&t.ref===o.ref)return Co(t,o,u)}return o.flags|=1,t=So(p,i),t.ref=o.ref,t.return=o,o.child=t}function Oy(t,o,s,i,u){if(t!==null){var p=t.memoizedProps;if(ti(p,i)&&t.ref===o.ref)if(Dt=!1,o.pendingProps=i=p,Dd(t,u))(t.flags&131072)!==0&&(Dt=!0);else return o.lanes=t.lanes,Co(t,o,u)}return Rd(t,o,s,i,u)}function Ay(t,o,s,i){var u=i.children,p=t!==null?t.memoizedState:null;if(t===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((o.flags&128)!==0){if(p=p!==null?p.baseLanes|s:s,t!==null){for(i=o.child=t.child,u=0;i!==null;)u=u|i.lanes|i.childLanes,i=i.sibling;i=u&~p}else i=0,o.child=null;return _y(t,o,p,s,i)}if((s&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ll(o,p!==null?p.cachePool:null),p!==null?kg(o,p):ed(),Ng(o);else return i=o.lanes=536870912,_y(t,o,p!==null?p.baseLanes|s:s,s,i)}else p!==null?(Ll(o,p.cachePool),kg(o,p),ir(),o.memoizedState=null):(t!==null&&Ll(o,null),ed(),ir());return Xt(t,o,u,s),o.child}function gi(t,o){return t!==null&&t.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function _y(t,o,s,i,u){var p=Kf();return p=p===null?null:{parent:At._currentValue,pool:p},o.memoizedState={baseLanes:s,cachePool:p},t!==null&&Ll(o,null),ed(),Ng(o),t!==null&&Xs(t,o,i,!0),o.childLanes=u,null}function $l(t,o){return o=Wl({mode:o.mode,children:o.children},t.mode),o.ref=t.ref,t.child=o,o.return=t,o}function Dy(t,o,s){return os(o,t.child,null,s),t=$l(o,o.pendingProps),t.flags|=2,En(o),o.memoizedState=null,t}function Y1(t,o,s){var i=o.pendingProps,u=(o.flags&128)!==0;if(o.flags&=-129,t===null){if(et){if(i.mode==="hidden")return t=$l(o,i),o.lanes=536870912,gi(null,t);if(nd(o),(t=gt)?(t=Yv(t,Pn),t=t!==null&&t.data==="&"?t:null,t!==null&&(o.memoizedState={dehydrated:t,treeContext:Wo!==null?{id:Wn,overflow:eo}:null,retryLane:536870912,hydrationErrors:null},s=pg(t),s.return=o,o.child=s,Gt=o,gt=null)):t=null,t===null)throw tr(o);return o.lanes=536870912,null}return $l(o,i)}var p=t.memoizedState;if(p!==null){var S=p.dehydrated;if(nd(o),u)if(o.flags&256)o.flags&=-257,o=Dy(t,o,s);else if(o.memoizedState!==null)o.child=t.child,o.flags|=128,o=null;else throw Error(a(558));else if(Dt||Xs(t,o,s,!1),u=(s&t.childLanes)!==0,Dt||u){if(i=pt,i!==null&&(S=pl(i,s),S!==0&&S!==p.retryLane))throw p.retryLane=S,Qr(t,S),gn(i,t,S),Ed;lc(),o=Dy(t,o,s)}else t=p.treeContext,gt=Un(S.nextSibling),Gt=o,et=!0,er=null,Pn=!1,t!==null&&yg(o,t),o=$l(o,i),o.flags|=4096;return o}return t=So(t.child,{mode:i.mode,children:i.children}),t.ref=o.ref,o.child=t,t.return=o,t}function Jl(t,o){var s=o.ref;if(s===null)t!==null&&t.ref!==null&&(o.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(t===null||t.ref!==s)&&(o.flags|=4194816)}}function Rd(t,o,s,i,u){return Wr(o),s=rd(t,o,s,i,void 0,u),i=sd(),t!==null&&!Dt?(ad(t,o,u),Co(t,o,u)):(et&&i&&Uf(o),o.flags|=1,Xt(t,o,s,u),o.child)}function ky(t,o,s,i,u,p){return Wr(o),o.updateQueue=null,s=Lg(o,i,s,u),zg(t),i=sd(),t!==null&&!Dt?(ad(t,o,p),Co(t,o,p)):(et&&i&&Uf(o),o.flags|=1,Xt(t,o,s,p),o.child)}function Ny(t,o,s,i,u){if(Wr(o),o.stateNode===null){var p=Ys,S=s.contextType;typeof S=="object"&&S!==null&&(p=Ft(S)),p=new s(i,p),o.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=xd,o.stateNode=p,p._reactInternals=o,p=o.stateNode,p.props=i,p.state=o.memoizedState,p.refs={},Zf(o),S=s.contextType,p.context=typeof S=="object"&&S!==null?Ft(S):Ys,p.state=o.memoizedState,S=s.getDerivedStateFromProps,typeof S=="function"&&(Sd(o,s,S,i),p.state=o.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(S=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),S!==p.state&&xd.enqueueReplaceState(p,p.state,null),fi(o,i,p,u),ui(),p.state=o.memoizedState),typeof p.componentDidMount=="function"&&(o.flags|=4194308),i=!0}else if(t===null){p=o.stateNode;var M=o.memoizedProps,U=ss(s,M);p.props=U;var K=p.context,oe=s.contextType;S=Ys,typeof oe=="object"&&oe!==null&&(S=Ft(oe));var ie=s.getDerivedStateFromProps;oe=typeof ie=="function"||typeof p.getSnapshotBeforeUpdate=="function",M=o.pendingProps!==M,oe||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(M||K!==S)&&by(o,p,i,S),or=!1;var $=o.memoizedState;p.state=$,fi(o,i,p,u),ui(),K=o.memoizedState,M||$!==K||or?(typeof ie=="function"&&(Sd(o,s,ie,i),K=o.memoizedState),(U=or||vy(o,s,U,i,$,K,S))?(oe||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(o.flags|=4194308)):(typeof p.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=i,o.memoizedState=K),p.props=i,p.state=K,p.context=S,i=U):(typeof p.componentDidMount=="function"&&(o.flags|=4194308),i=!1)}else{p=o.stateNode,$f(t,o),S=o.memoizedProps,oe=ss(s,S),p.props=oe,ie=o.pendingProps,$=p.context,K=s.contextType,U=Ys,typeof K=="object"&&K!==null&&(U=Ft(K)),M=s.getDerivedStateFromProps,(K=typeof M=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(S!==ie||$!==U)&&by(o,p,i,U),or=!1,$=o.memoizedState,p.state=$,fi(o,i,p,u),ui();var ee=o.memoizedState;S!==ie||$!==ee||or||t!==null&&t.dependencies!==null&&Nl(t.dependencies)?(typeof M=="function"&&(Sd(o,s,M,i),ee=o.memoizedState),(oe=or||vy(o,s,oe,i,$,ee,U)||t!==null&&t.dependencies!==null&&Nl(t.dependencies))?(K||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(i,ee,U),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(i,ee,U)),typeof p.componentDidUpdate=="function"&&(o.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof p.componentDidUpdate!="function"||S===t.memoizedProps&&$===t.memoizedState||(o.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&$===t.memoizedState||(o.flags|=1024),o.memoizedProps=i,o.memoizedState=ee),p.props=i,p.state=ee,p.context=U,i=oe):(typeof p.componentDidUpdate!="function"||S===t.memoizedProps&&$===t.memoizedState||(o.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&$===t.memoizedState||(o.flags|=1024),i=!1)}return p=i,Jl(t,o),i=(o.flags&128)!==0,p||i?(p=o.stateNode,s=i&&typeof s.getDerivedStateFromError!="function"?null:p.render(),o.flags|=1,t!==null&&i?(o.child=os(o,t.child,null,u),o.child=os(o,null,s,u)):Xt(t,o,s,u),o.memoizedState=p.state,t=o.child):t=Co(t,o,u),t}function zy(t,o,s,i){return $r(),o.flags|=256,Xt(t,o,s,i),o.child}var Td={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cd(t){return{baseLanes:t,cachePool:Eg()}}function Md(t,o,s){return t=t!==null?t.childLanes&~s:0,o&&(t|=Tn),t}function Ly(t,o,s){var i=o.pendingProps,u=!1,p=(o.flags&128)!==0,S;if((S=p)||(S=t!==null&&t.memoizedState===null?!1:(Ct.current&2)!==0),S&&(u=!0,o.flags&=-129),S=(o.flags&32)!==0,o.flags&=-33,t===null){if(et){if(u?ar(o):ir(),(t=gt)?(t=Yv(t,Pn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(o.memoizedState={dehydrated:t,treeContext:Wo!==null?{id:Wn,overflow:eo}:null,retryLane:536870912,hydrationErrors:null},s=pg(t),s.return=o,o.child=s,Gt=o,gt=null)):t=null,t===null)throw tr(o);return ch(t)?o.lanes=32:o.lanes=536870912,null}var M=i.children;return i=i.fallback,u?(ir(),u=o.mode,M=Wl({mode:"hidden",children:M},u),i=Zr(i,u,s,null),M.return=o,i.return=o,M.sibling=i,o.child=M,i=o.child,i.memoizedState=Cd(s),i.childLanes=Md(t,S,s),o.memoizedState=Td,gi(null,i)):(ar(o),Od(o,M))}var U=t.memoizedState;if(U!==null&&(M=U.dehydrated,M!==null)){if(p)o.flags&256?(ar(o),o.flags&=-257,o=Ad(t,o,s)):o.memoizedState!==null?(ir(),o.child=t.child,o.flags|=128,o=null):(ir(),M=i.fallback,u=o.mode,i=Wl({mode:"visible",children:i.children},u),M=Zr(M,u,s,null),M.flags|=2,i.return=o,M.return=o,i.sibling=M,o.child=i,os(o,t.child,null,s),i=o.child,i.memoizedState=Cd(s),i.childLanes=Md(t,S,s),o.memoizedState=Td,o=gi(null,i));else if(ar(o),ch(M)){if(S=M.nextSibling&&M.nextSibling.dataset,S)var K=S.dgst;S=K,i=Error(a(419)),i.stack="",i.digest=S,ri({value:i,source:null,stack:null}),o=Ad(t,o,s)}else if(Dt||Xs(t,o,s,!1),S=(s&t.childLanes)!==0,Dt||S){if(S=pt,S!==null&&(i=pl(S,s),i!==0&&i!==U.retryLane))throw U.retryLane=i,Qr(t,i),gn(S,t,i),Ed;lh(M)||lc(),o=Ad(t,o,s)}else lh(M)?(o.flags|=192,o.child=t.child,o=null):(t=U.treeContext,gt=Un(M.nextSibling),Gt=o,et=!0,er=null,Pn=!1,t!==null&&yg(o,t),o=Od(o,i.children),o.flags|=4096);return o}return u?(ir(),M=i.fallback,u=o.mode,U=t.child,K=U.sibling,i=So(U,{mode:"hidden",children:i.children}),i.subtreeFlags=U.subtreeFlags&65011712,K!==null?M=So(K,M):(M=Zr(M,u,s,null),M.flags|=2),M.return=o,i.return=o,i.sibling=M,o.child=i,gi(null,i),i=o.child,M=t.child.memoizedState,M===null?M=Cd(s):(u=M.cachePool,u!==null?(U=At._currentValue,u=u.parent!==U?{parent:U,pool:U}:u):u=Eg(),M={baseLanes:M.baseLanes|s,cachePool:u}),i.memoizedState=M,i.childLanes=Md(t,S,s),o.memoizedState=Td,gi(t.child,i)):(ar(o),s=t.child,t=s.sibling,s=So(s,{mode:"visible",children:i.children}),s.return=o,s.sibling=null,t!==null&&(S=o.deletions,S===null?(o.deletions=[t],o.flags|=16):S.push(t)),o.child=s,o.memoizedState=null,s)}function Od(t,o){return o=Wl({mode:"visible",children:o},t.mode),o.return=t,t.child=o}function Wl(t,o){return t=xn(22,t,null,o),t.lanes=0,t}function Ad(t,o,s){return os(o,t.child,null,s),t=Od(o,o.pendingProps.children),t.flags|=2,o.memoizedState=null,t}function jy(t,o,s){t.lanes|=o;var i=t.alternate;i!==null&&(i.lanes|=o),qf(t.return,o,s)}function _d(t,o,s,i,u,p){var S=t.memoizedState;S===null?t.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:i,tail:s,tailMode:u,treeForkCount:p}:(S.isBackwards=o,S.rendering=null,S.renderingStartTime=0,S.last=i,S.tail=s,S.tailMode=u,S.treeForkCount=p)}function Py(t,o,s){var i=o.pendingProps,u=i.revealOrder,p=i.tail;i=i.children;var S=Ct.current,M=(S&2)!==0;if(M?(S=S&1|2,o.flags|=128):S&=1,le(Ct,S),Xt(t,o,i,s),i=et?oi:0,!M&&t!==null&&(t.flags&128)!==0)e:for(t=o.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&jy(t,s,o);else if(t.tag===19)jy(t,s,o);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===o)break e;for(;t.sibling===null;){if(t.return===null||t.return===o)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(u){case"forwards":for(s=o.child,u=null;s!==null;)t=s.alternate,t!==null&&Hl(t)===null&&(u=s),s=s.sibling;s=u,s===null?(u=o.child,o.child=null):(u=s.sibling,s.sibling=null),_d(o,!1,u,s,p,i);break;case"backwards":case"unstable_legacy-backwards":for(s=null,u=o.child,o.child=null;u!==null;){if(t=u.alternate,t!==null&&Hl(t)===null){o.child=u;break}t=u.sibling,u.sibling=s,s=u,u=t}_d(o,!0,s,null,p,i);break;case"together":_d(o,!1,null,null,void 0,i);break;default:o.memoizedState=null}return o.child}function Co(t,o,s){if(t!==null&&(o.dependencies=t.dependencies),ur|=o.lanes,(s&o.childLanes)===0)if(t!==null){if(Xs(t,o,s,!1),(s&o.childLanes)===0)return null}else return null;if(t!==null&&o.child!==t.child)throw Error(a(153));if(o.child!==null){for(t=o.child,s=So(t,t.pendingProps),o.child=s,s.return=o;t.sibling!==null;)t=t.sibling,s=s.sibling=So(t,t.pendingProps),s.return=o;s.sibling=null}return o.child}function Dd(t,o){return(t.lanes&o)!==0?!0:(t=t.dependencies,!!(t!==null&&Nl(t)))}function q1(t,o,s){switch(o.tag){case 3:Oe(o,o.stateNode.containerInfo),nr(o,At,t.memoizedState.cache),$r();break;case 27:case 5:Ne(o);break;case 4:Oe(o,o.stateNode.containerInfo);break;case 10:nr(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,nd(o),null;break;case 13:var i=o.memoizedState;if(i!==null)return i.dehydrated!==null?(ar(o),o.flags|=128,null):(s&o.child.childLanes)!==0?Ly(t,o,s):(ar(o),t=Co(t,o,s),t!==null?t.sibling:null);ar(o);break;case 19:var u=(t.flags&128)!==0;if(i=(s&o.childLanes)!==0,i||(Xs(t,o,s,!1),i=(s&o.childLanes)!==0),u){if(i)return Py(t,o,s);o.flags|=128}if(u=o.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),le(Ct,Ct.current),i)break;return null;case 22:return o.lanes=0,Ay(t,o,s,o.pendingProps);case 24:nr(o,At,t.memoizedState.cache)}return Co(t,o,s)}function Iy(t,o,s){if(t!==null)if(t.memoizedProps!==o.pendingProps)Dt=!0;else{if(!Dd(t,s)&&(o.flags&128)===0)return Dt=!1,q1(t,o,s);Dt=(t.flags&131072)!==0}else Dt=!1,et&&(o.flags&1048576)!==0&&gg(o,oi,o.index);switch(o.lanes=0,o.tag){case 16:e:{var i=o.pendingProps;if(t=ts(o.elementType),o.type=t,typeof t=="function")jf(t)?(i=ss(t,i),o.tag=1,o=Ny(null,o,t,i,s)):(o.tag=0,o=Rd(null,o,t,i,s));else{if(t!=null){var u=t.$$typeof;if(u===O){o.tag=11,o=Cy(null,o,t,i,s);break e}else if(u===j){o.tag=14,o=My(null,o,t,i,s);break e}}throw o=te(t)||t,Error(a(306,o,""))}}return o;case 0:return Rd(t,o,o.type,o.pendingProps,s);case 1:return i=o.type,u=ss(i,o.pendingProps),Ny(t,o,i,u,s);case 3:e:{if(Oe(o,o.stateNode.containerInfo),t===null)throw Error(a(387));i=o.pendingProps;var p=o.memoizedState;u=p.element,$f(t,o),fi(o,i,null,s);var S=o.memoizedState;if(i=S.cache,nr(o,At,i),i!==p.cache&&Gf(o,[At],s,!0),ui(),i=S.element,p.isDehydrated)if(p={element:i,isDehydrated:!1,cache:S.cache},o.updateQueue.baseState=p,o.memoizedState=p,o.flags&256){o=zy(t,o,i,s);break e}else if(i!==u){u=zn(Error(a(424)),o),ri(u),o=zy(t,o,i,s);break e}else for(t=o.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,gt=Un(t.firstChild),Gt=o,et=!0,er=null,Pn=!0,s=Ag(o,null,i,s),o.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if($r(),i===u){o=Co(t,o,s);break e}Xt(t,o,i,s)}o=o.child}return o;case 26:return Jl(t,o),t===null?(s=Qv(o.type,null,o.pendingProps,null))?o.memoizedState=s:et||(s=o.type,t=o.pendingProps,i=mc(he.current).createElement(s),i[qt]=o,i[un]=t,Kt(i,s,t),Vt(i),o.stateNode=i):o.memoizedState=Qv(o.type,t.memoizedProps,o.pendingProps,t.memoizedState),null;case 27:return Ne(o),t===null&&et&&(i=o.stateNode=Fv(o.type,o.pendingProps,he.current),Gt=o,Pn=!0,u=gt,mr(o.type)?(uh=u,gt=Un(i.firstChild)):gt=u),Xt(t,o,o.pendingProps.children,s),Jl(t,o),t===null&&(o.flags|=4194304),o.child;case 5:return t===null&&et&&((u=i=gt)&&(i=SR(i,o.type,o.pendingProps,Pn),i!==null?(o.stateNode=i,Gt=o,gt=Un(i.firstChild),Pn=!1,u=!0):u=!1),u||tr(o)),Ne(o),u=o.type,p=o.pendingProps,S=t!==null?t.memoizedProps:null,i=p.children,sh(u,p)?i=null:S!==null&&sh(u,S)&&(o.flags|=32),o.memoizedState!==null&&(u=rd(t,o,L1,null,null,s),Di._currentValue=u),Jl(t,o),Xt(t,o,i,s),o.child;case 6:return t===null&&et&&((t=s=gt)&&(s=xR(s,o.pendingProps,Pn),s!==null?(o.stateNode=s,Gt=o,gt=null,t=!0):t=!1),t||tr(o)),null;case 13:return Ly(t,o,s);case 4:return Oe(o,o.stateNode.containerInfo),i=o.pendingProps,t===null?o.child=os(o,null,i,s):Xt(t,o,i,s),o.child;case 11:return Cy(t,o,o.type,o.pendingProps,s);case 7:return Xt(t,o,o.pendingProps,s),o.child;case 8:return Xt(t,o,o.pendingProps.children,s),o.child;case 12:return Xt(t,o,o.pendingProps.children,s),o.child;case 10:return i=o.pendingProps,nr(o,o.type,i.value),Xt(t,o,i.children,s),o.child;case 9:return u=o.type._context,i=o.pendingProps.children,Wr(o),u=Ft(u),i=i(u),o.flags|=1,Xt(t,o,i,s),o.child;case 14:return My(t,o,o.type,o.pendingProps,s);case 15:return Oy(t,o,o.type,o.pendingProps,s);case 19:return Py(t,o,s);case 31:return Y1(t,o,s);case 22:return Ay(t,o,s,o.pendingProps);case 24:return Wr(o),i=Ft(At),t===null?(u=Kf(),u===null&&(u=pt,p=Ff(),u.pooledCache=p,p.refCount++,p!==null&&(u.pooledCacheLanes|=s),u=p),o.memoizedState={parent:i,cache:u},Zf(o),nr(o,At,u)):((t.lanes&s)!==0&&($f(t,o),fi(o,null,null,s),ui()),u=t.memoizedState,p=o.memoizedState,u.parent!==i?(u={parent:i,cache:i},o.memoizedState=u,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=u),nr(o,At,i)):(i=p.cache,nr(o,At,i),i!==u.cache&&Gf(o,[At],s,!0))),Xt(t,o,o.pendingProps.children,s),o.child;case 29:throw o.pendingProps}throw Error(a(156,o.tag))}function Mo(t){t.flags|=4}function kd(t,o,s,i,u){if((o=(t.mode&32)!==0)&&(o=!1),o){if(t.flags|=16777216,(u&335544128)===u)if(t.stateNode.complete)t.flags|=8192;else if(fv())t.flags|=8192;else throw ns=Pl,Qf}else t.flags&=-16777217}function Uy(t,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!eb(o))if(fv())t.flags|=8192;else throw ns=Pl,Qf}function ec(t,o){o!==null&&(t.flags|=4),t.flags&16384&&(o=t.tag!==22?dl():536870912,t.lanes|=o,sa|=o)}function yi(t,o){if(!et)switch(t.tailMode){case"hidden":o=t.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?o||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function yt(t){var o=t.alternate!==null&&t.alternate.child===t.child,s=0,i=0;if(o)for(var u=t.child;u!==null;)s|=u.lanes|u.childLanes,i|=u.subtreeFlags&65011712,i|=u.flags&65011712,u.return=t,u=u.sibling;else for(u=t.child;u!==null;)s|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=t,u=u.sibling;return t.subtreeFlags|=i,t.childLanes=s,o}function G1(t,o,s){var i=o.pendingProps;switch(Bf(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(o),null;case 1:return yt(o),null;case 3:return s=o.stateNode,i=null,t!==null&&(i=t.memoizedState.cache),o.memoizedState.cache!==i&&(o.flags|=2048),Eo(At),fe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(Fs(o)?Mo(o):t===null||t.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Vf())),yt(o),null;case 26:var u=o.type,p=o.memoizedState;return t===null?(Mo(o),p!==null?(yt(o),Uy(o,p)):(yt(o),kd(o,u,null,i,s))):p?p!==t.memoizedState?(Mo(o),yt(o),Uy(o,p)):(yt(o),o.flags&=-16777217):(t=t.memoizedProps,t!==i&&Mo(o),yt(o),kd(o,u,t,i,s)),null;case 27:if(je(o),s=he.current,u=o.type,t!==null&&o.stateNode!=null)t.memoizedProps!==i&&Mo(o);else{if(!i){if(o.stateNode===null)throw Error(a(166));return yt(o),null}t=se.current,Fs(o)?vg(o):(t=Fv(u,i,s),o.stateNode=t,Mo(o))}return yt(o),null;case 5:if(je(o),u=o.type,t!==null&&o.stateNode!=null)t.memoizedProps!==i&&Mo(o);else{if(!i){if(o.stateNode===null)throw Error(a(166));return yt(o),null}if(p=se.current,Fs(o))vg(o);else{var S=mc(he.current);switch(p){case 1:p=S.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:p=S.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":p=S.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":p=S.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":p=S.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof i.is=="string"?S.createElement("select",{is:i.is}):S.createElement("select"),i.multiple?p.multiple=!0:i.size&&(p.size=i.size);break;default:p=typeof i.is=="string"?S.createElement(u,{is:i.is}):S.createElement(u)}}p[qt]=o,p[un]=i;e:for(S=o.child;S!==null;){if(S.tag===5||S.tag===6)p.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===o)break e;for(;S.sibling===null;){if(S.return===null||S.return===o)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}o.stateNode=p;e:switch(Kt(p,u,i),u){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Mo(o)}}return yt(o),kd(o,o.type,t===null?null:t.memoizedProps,o.pendingProps,s),null;case 6:if(t&&o.stateNode!=null)t.memoizedProps!==i&&Mo(o);else{if(typeof i!="string"&&o.stateNode===null)throw Error(a(166));if(t=he.current,Fs(o)){if(t=o.stateNode,s=o.memoizedProps,i=null,u=Gt,u!==null)switch(u.tag){case 27:case 5:i=u.memoizedProps}t[qt]=o,t=!!(t.nodeValue===s||i!==null&&i.suppressHydrationWarning===!0||Lv(t.nodeValue,s)),t||tr(o,!0)}else t=mc(t).createTextNode(i),t[qt]=o,o.stateNode=t}return yt(o),null;case 31:if(s=o.memoizedState,t===null||t.memoizedState!==null){if(i=Fs(o),s!==null){if(t===null){if(!i)throw Error(a(318));if(t=o.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(557));t[qt]=o}else $r(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;yt(o),t=!1}else s=Vf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return o.flags&256?(En(o),o):(En(o),null);if((o.flags&128)!==0)throw Error(a(558))}return yt(o),null;case 13:if(i=o.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(u=Fs(o),i!==null&&i.dehydrated!==null){if(t===null){if(!u)throw Error(a(318));if(u=o.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(a(317));u[qt]=o}else $r(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;yt(o),u=!1}else u=Vf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return o.flags&256?(En(o),o):(En(o),null)}return En(o),(o.flags&128)!==0?(o.lanes=s,o):(s=i!==null,t=t!==null&&t.memoizedState!==null,s&&(i=o.child,u=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(u=i.alternate.memoizedState.cachePool.pool),p=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(p=i.memoizedState.cachePool.pool),p!==u&&(i.flags|=2048)),s!==t&&s&&(o.child.flags|=8192),ec(o,o.updateQueue),yt(o),null);case 4:return fe(),t===null&&eh(o.stateNode.containerInfo),yt(o),null;case 10:return Eo(o.type),yt(o),null;case 19:if(X(Ct),i=o.memoizedState,i===null)return yt(o),null;if(u=(o.flags&128)!==0,p=i.rendering,p===null)if(u)yi(i,!1);else{if(wt!==0||t!==null&&(t.flags&128)!==0)for(t=o.child;t!==null;){if(p=Hl(t),p!==null){for(o.flags|=128,yi(i,!1),t=p.updateQueue,o.updateQueue=t,ec(o,t),o.subtreeFlags=0,t=s,s=o.child;s!==null;)hg(s,t),s=s.sibling;return le(Ct,Ct.current&1|2),et&&xo(o,i.treeForkCount),o.child}t=t.sibling}i.tail!==null&&Ue()>sc&&(o.flags|=128,u=!0,yi(i,!1),o.lanes=4194304)}else{if(!u)if(t=Hl(p),t!==null){if(o.flags|=128,u=!0,t=t.updateQueue,o.updateQueue=t,ec(o,t),yi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!p.alternate&&!et)return yt(o),null}else 2*Ue()-i.renderingStartTime>sc&&s!==536870912&&(o.flags|=128,u=!0,yi(i,!1),o.lanes=4194304);i.isBackwards?(p.sibling=o.child,o.child=p):(t=i.last,t!==null?t.sibling=p:o.child=p,i.last=p)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ue(),t.sibling=null,s=Ct.current,le(Ct,u?s&1|2:s&1),et&&xo(o,i.treeForkCount),t):(yt(o),null);case 22:case 23:return En(o),td(),i=o.memoizedState!==null,t!==null?t.memoizedState!==null!==i&&(o.flags|=8192):i&&(o.flags|=8192),i?(s&536870912)!==0&&(o.flags&128)===0&&(yt(o),o.subtreeFlags&6&&(o.flags|=8192)):yt(o),s=o.updateQueue,s!==null&&ec(o,s.retryQueue),s=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==s&&(o.flags|=2048),t!==null&&X(es),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),o.memoizedState.cache!==s&&(o.flags|=2048),Eo(At),yt(o),null;case 25:return null;case 30:return null}throw Error(a(156,o.tag))}function F1(t,o){switch(Bf(o),o.tag){case 1:return t=o.flags,t&65536?(o.flags=t&-65537|128,o):null;case 3:return Eo(At),fe(),t=o.flags,(t&65536)!==0&&(t&128)===0?(o.flags=t&-65537|128,o):null;case 26:case 27:case 5:return je(o),null;case 31:if(o.memoizedState!==null){if(En(o),o.alternate===null)throw Error(a(340));$r()}return t=o.flags,t&65536?(o.flags=t&-65537|128,o):null;case 13:if(En(o),t=o.memoizedState,t!==null&&t.dehydrated!==null){if(o.alternate===null)throw Error(a(340));$r()}return t=o.flags,t&65536?(o.flags=t&-65537|128,o):null;case 19:return X(Ct),null;case 4:return fe(),null;case 10:return Eo(o.type),null;case 22:case 23:return En(o),td(),t!==null&&X(es),t=o.flags,t&65536?(o.flags=t&-65537|128,o):null;case 24:return Eo(At),null;case 25:return null;default:return null}}function By(t,o){switch(Bf(o),o.tag){case 3:Eo(At),fe();break;case 26:case 27:case 5:je(o);break;case 4:fe();break;case 31:o.memoizedState!==null&&En(o);break;case 13:En(o);break;case 19:X(Ct);break;case 10:Eo(o.type);break;case 22:case 23:En(o),td(),t!==null&&X(es);break;case 24:Eo(At)}}function vi(t,o){try{var s=o.updateQueue,i=s!==null?s.lastEffect:null;if(i!==null){var u=i.next;s=u;do{if((s.tag&t)===t){i=void 0;var p=s.create,S=s.inst;i=p(),S.destroy=i}s=s.next}while(s!==u)}}catch(M){ct(o,o.return,M)}}function lr(t,o,s){try{var i=o.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var p=u.next;i=p;do{if((i.tag&t)===t){var S=i.inst,M=S.destroy;if(M!==void 0){S.destroy=void 0,u=o;var U=s,K=M;try{K()}catch(oe){ct(u,U,oe)}}}i=i.next}while(i!==p)}}catch(oe){ct(o,o.return,oe)}}function Hy(t){var o=t.updateQueue;if(o!==null){var s=t.stateNode;try{Dg(o,s)}catch(i){ct(t,t.return,i)}}}function Vy(t,o,s){s.props=ss(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(i){ct(t,o,i)}}function bi(t,o){try{var s=t.ref;if(s!==null){switch(t.tag){case 26:case 27:case 5:var i=t.stateNode;break;case 30:i=t.stateNode;break;default:i=t.stateNode}typeof s=="function"?t.refCleanup=s(i):s.current=i}}catch(u){ct(t,o,u)}}function to(t,o){var s=t.ref,i=t.refCleanup;if(s!==null)if(typeof i=="function")try{i()}catch(u){ct(t,o,u)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(u){ct(t,o,u)}else s.current=null}function Yy(t){var o=t.type,s=t.memoizedProps,i=t.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":s.autoFocus&&i.focus();break e;case"img":s.src?i.src=s.src:s.srcSet&&(i.srcset=s.srcSet)}}catch(u){ct(t,t.return,u)}}function Nd(t,o,s){try{var i=t.stateNode;pR(i,t.type,s,o),i[un]=o}catch(u){ct(t,t.return,u)}}function qy(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&mr(t.type)||t.tag===4}function zd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||qy(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&mr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ld(t,o,s){var i=t.tag;if(i===5||i===6)t=t.stateNode,o?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(t,o):(o=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,o.appendChild(t),s=s._reactRootContainer,s!=null||o.onclick!==null||(o.onclick=vo));else if(i!==4&&(i===27&&mr(t.type)&&(s=t.stateNode,o=null),t=t.child,t!==null))for(Ld(t,o,s),t=t.sibling;t!==null;)Ld(t,o,s),t=t.sibling}function tc(t,o,s){var i=t.tag;if(i===5||i===6)t=t.stateNode,o?s.insertBefore(t,o):s.appendChild(t);else if(i!==4&&(i===27&&mr(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(tc(t,o,s),t=t.sibling;t!==null;)tc(t,o,s),t=t.sibling}function Gy(t){var o=t.stateNode,s=t.memoizedProps;try{for(var i=t.type,u=o.attributes;u.length;)o.removeAttributeNode(u[0]);Kt(o,i,s),o[qt]=t,o[un]=s}catch(p){ct(t,t.return,p)}}var Oo=!1,kt=!1,jd=!1,Fy=typeof WeakSet=="function"?WeakSet:Set,Yt=null;function X1(t,o){if(t=t.containerInfo,oh=wc,t=rg(t),Af(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var i=s.getSelection&&s.getSelection();if(i&&i.rangeCount!==0){s=i.anchorNode;var u=i.anchorOffset,p=i.focusNode;i=i.focusOffset;try{s.nodeType,p.nodeType}catch{s=null;break e}var S=0,M=-1,U=-1,K=0,oe=0,ie=t,$=null;t:for(;;){for(var ee;ie!==s||u!==0&&ie.nodeType!==3||(M=S+u),ie!==p||i!==0&&ie.nodeType!==3||(U=S+i),ie.nodeType===3&&(S+=ie.nodeValue.length),(ee=ie.firstChild)!==null;)$=ie,ie=ee;for(;;){if(ie===t)break t;if($===s&&++K===u&&(M=S),$===p&&++oe===i&&(U=S),(ee=ie.nextSibling)!==null)break;ie=$,$=ie.parentNode}ie=ee}s=M===-1||U===-1?null:{start:M,end:U}}else s=null}s=s||{start:0,end:0}}else s=null;for(rh={focusedElem:t,selectionRange:s},wc=!1,Yt=o;Yt!==null;)if(o=Yt,t=o.child,(o.subtreeFlags&1028)!==0&&t!==null)t.return=o,Yt=t;else for(;Yt!==null;){switch(o=Yt,p=o.alternate,t=o.flags,o.tag){case 0:if((t&4)!==0&&(t=o.updateQueue,t=t!==null?t.events:null,t!==null))for(s=0;s<t.length;s++)u=t[s],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&p!==null){t=void 0,s=o,u=p.memoizedProps,p=p.memoizedState,i=s.stateNode;try{var xe=ss(s.type,u);t=i.getSnapshotBeforeUpdate(xe,p),i.__reactInternalSnapshotBeforeUpdate=t}catch(ke){ct(s,s.return,ke)}}break;case 3:if((t&1024)!==0){if(t=o.stateNode.containerInfo,s=t.nodeType,s===9)ih(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":ih(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(a(163))}if(t=o.sibling,t!==null){t.return=o.return,Yt=t;break}Yt=o.return}}function Xy(t,o,s){var i=s.flags;switch(s.tag){case 0:case 11:case 15:_o(t,s),i&4&&vi(5,s);break;case 1:if(_o(t,s),i&4)if(t=s.stateNode,o===null)try{t.componentDidMount()}catch(S){ct(s,s.return,S)}else{var u=ss(s.type,o.memoizedProps);o=o.memoizedState;try{t.componentDidUpdate(u,o,t.__reactInternalSnapshotBeforeUpdate)}catch(S){ct(s,s.return,S)}}i&64&&Hy(s),i&512&&bi(s,s.return);break;case 3:if(_o(t,s),i&64&&(t=s.updateQueue,t!==null)){if(o=null,s.child!==null)switch(s.child.tag){case 27:case 5:o=s.child.stateNode;break;case 1:o=s.child.stateNode}try{Dg(t,o)}catch(S){ct(s,s.return,S)}}break;case 27:o===null&&i&4&&Gy(s);case 26:case 5:_o(t,s),o===null&&i&4&&Yy(s),i&512&&bi(s,s.return);break;case 12:_o(t,s);break;case 31:_o(t,s),i&4&&Zy(t,s);break;case 13:_o(t,s),i&4&&$y(t,s),i&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=nR.bind(null,s),wR(t,s))));break;case 22:if(i=s.memoizedState!==null||Oo,!i){o=o!==null&&o.memoizedState!==null||kt,u=Oo;var p=kt;Oo=i,(kt=o)&&!p?Do(t,s,(s.subtreeFlags&8772)!==0):_o(t,s),Oo=u,kt=p}break;case 30:break;default:_o(t,s)}}function Ky(t){var o=t.alternate;o!==null&&(t.alternate=null,Ky(o)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(o=t.stateNode,o!==null&&df(o)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var vt=null,dn=!1;function Ao(t,o,s){for(s=s.child;s!==null;)Qy(t,o,s),s=s.sibling}function Qy(t,o,s){if(Le&&typeof Le.onCommitFiberUnmount=="function")try{Le.onCommitFiberUnmount(Kn,s)}catch{}switch(s.tag){case 26:kt||to(s,o),Ao(t,o,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:kt||to(s,o);var i=vt,u=dn;mr(s.type)&&(vt=s.stateNode,dn=!1),Ao(t,o,s),Oi(s.stateNode),vt=i,dn=u;break;case 5:kt||to(s,o);case 6:if(i=vt,u=dn,vt=null,Ao(t,o,s),vt=i,dn=u,vt!==null)if(dn)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(s.stateNode)}catch(p){ct(s,o,p)}else try{vt.removeChild(s.stateNode)}catch(p){ct(s,o,p)}break;case 18:vt!==null&&(dn?(t=vt,Hv(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),ha(t)):Hv(vt,s.stateNode));break;case 4:i=vt,u=dn,vt=s.stateNode.containerInfo,dn=!0,Ao(t,o,s),vt=i,dn=u;break;case 0:case 11:case 14:case 15:lr(2,s,o),kt||lr(4,s,o),Ao(t,o,s);break;case 1:kt||(to(s,o),i=s.stateNode,typeof i.componentWillUnmount=="function"&&Vy(s,o,i)),Ao(t,o,s);break;case 21:Ao(t,o,s);break;case 22:kt=(i=kt)||s.memoizedState!==null,Ao(t,o,s),kt=i;break;default:Ao(t,o,s)}}function Zy(t,o){if(o.memoizedState===null&&(t=o.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ha(t)}catch(s){ct(o,o.return,s)}}}function $y(t,o){if(o.memoizedState===null&&(t=o.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ha(t)}catch(s){ct(o,o.return,s)}}function K1(t){switch(t.tag){case 31:case 13:case 19:var o=t.stateNode;return o===null&&(o=t.stateNode=new Fy),o;case 22:return t=t.stateNode,o=t._retryCache,o===null&&(o=t._retryCache=new Fy),o;default:throw Error(a(435,t.tag))}}function nc(t,o){var s=K1(t);o.forEach(function(i){if(!s.has(i)){s.add(i);var u=oR.bind(null,t,i);i.then(u,u)}})}function hn(t,o){var s=o.deletions;if(s!==null)for(var i=0;i<s.length;i++){var u=s[i],p=t,S=o,M=S;e:for(;M!==null;){switch(M.tag){case 27:if(mr(M.type)){vt=M.stateNode,dn=!1;break e}break;case 5:vt=M.stateNode,dn=!1;break e;case 3:case 4:vt=M.stateNode.containerInfo,dn=!0;break e}M=M.return}if(vt===null)throw Error(a(160));Qy(p,S,u),vt=null,dn=!1,p=u.alternate,p!==null&&(p.return=null),u.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)Jy(o,t),o=o.sibling}var Zn=null;function Jy(t,o){var s=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:hn(o,t),pn(t),i&4&&(lr(3,t,t.return),vi(3,t),lr(5,t,t.return));break;case 1:hn(o,t),pn(t),i&512&&(kt||s===null||to(s,s.return)),i&64&&Oo&&(t=t.updateQueue,t!==null&&(i=t.callbacks,i!==null&&(s=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=s===null?i:s.concat(i))));break;case 26:var u=Zn;if(hn(o,t),pn(t),i&512&&(kt||s===null||to(s,s.return)),i&4){var p=s!==null?s.memoizedState:null;if(i=t.memoizedState,s===null)if(i===null)if(t.stateNode===null){e:{i=t.type,s=t.memoizedProps,u=u.ownerDocument||u;t:switch(i){case"title":p=u.getElementsByTagName("title")[0],(!p||p[Fa]||p[qt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=u.createElement(i),u.head.insertBefore(p,u.querySelector("head > title"))),Kt(p,i,s),p[qt]=t,Vt(p),i=p;break e;case"link":var S=Jv("link","href",u).get(i+(s.href||""));if(S){for(var M=0;M<S.length;M++)if(p=S[M],p.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&p.getAttribute("rel")===(s.rel==null?null:s.rel)&&p.getAttribute("title")===(s.title==null?null:s.title)&&p.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){S.splice(M,1);break t}}p=u.createElement(i),Kt(p,i,s),u.head.appendChild(p);break;case"meta":if(S=Jv("meta","content",u).get(i+(s.content||""))){for(M=0;M<S.length;M++)if(p=S[M],p.getAttribute("content")===(s.content==null?null:""+s.content)&&p.getAttribute("name")===(s.name==null?null:s.name)&&p.getAttribute("property")===(s.property==null?null:s.property)&&p.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&p.getAttribute("charset")===(s.charSet==null?null:s.charSet)){S.splice(M,1);break t}}p=u.createElement(i),Kt(p,i,s),u.head.appendChild(p);break;default:throw Error(a(468,i))}p[qt]=t,Vt(p),i=p}t.stateNode=i}else Wv(u,t.type,t.stateNode);else t.stateNode=$v(u,i,t.memoizedProps);else p!==i?(p===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):p.count--,i===null?Wv(u,t.type,t.stateNode):$v(u,i,t.memoizedProps)):i===null&&t.stateNode!==null&&Nd(t,t.memoizedProps,s.memoizedProps)}break;case 27:hn(o,t),pn(t),i&512&&(kt||s===null||to(s,s.return)),s!==null&&i&4&&Nd(t,t.memoizedProps,s.memoizedProps);break;case 5:if(hn(o,t),pn(t),i&512&&(kt||s===null||to(s,s.return)),t.flags&32){u=t.stateNode;try{js(u,"")}catch(xe){ct(t,t.return,xe)}}i&4&&t.stateNode!=null&&(u=t.memoizedProps,Nd(t,u,s!==null?s.memoizedProps:u)),i&1024&&(jd=!0);break;case 6:if(hn(o,t),pn(t),i&4){if(t.stateNode===null)throw Error(a(162));i=t.memoizedProps,s=t.stateNode;try{s.nodeValue=i}catch(xe){ct(t,t.return,xe)}}break;case 3:if(vc=null,u=Zn,Zn=gc(o.containerInfo),hn(o,t),Zn=u,pn(t),i&4&&s!==null&&s.memoizedState.isDehydrated)try{ha(o.containerInfo)}catch(xe){ct(t,t.return,xe)}jd&&(jd=!1,Wy(t));break;case 4:i=Zn,Zn=gc(t.stateNode.containerInfo),hn(o,t),pn(t),Zn=i;break;case 12:hn(o,t),pn(t);break;case 31:hn(o,t),pn(t),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,nc(t,i)));break;case 13:hn(o,t),pn(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(rc=Ue()),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,nc(t,i)));break;case 22:u=t.memoizedState!==null;var U=s!==null&&s.memoizedState!==null,K=Oo,oe=kt;if(Oo=K||u,kt=oe||U,hn(o,t),kt=oe,Oo=K,pn(t),i&8192)e:for(o=t.stateNode,o._visibility=u?o._visibility&-2:o._visibility|1,u&&(s===null||U||Oo||kt||as(t)),s=null,o=t;;){if(o.tag===5||o.tag===26){if(s===null){U=s=o;try{if(p=U.stateNode,u)S=p.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{M=U.stateNode;var ie=U.memoizedProps.style,$=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;M.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(xe){ct(U,U.return,xe)}}}else if(o.tag===6){if(s===null){U=o;try{U.stateNode.nodeValue=u?"":U.memoizedProps}catch(xe){ct(U,U.return,xe)}}}else if(o.tag===18){if(s===null){U=o;try{var ee=U.stateNode;u?Vv(ee,!0):Vv(U.stateNode,!1)}catch(xe){ct(U,U.return,xe)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===t)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;s===o&&(s=null),o=o.return}s===o&&(s=null),o.sibling.return=o.return,o=o.sibling}i&4&&(i=t.updateQueue,i!==null&&(s=i.retryQueue,s!==null&&(i.retryQueue=null,nc(t,s))));break;case 19:hn(o,t),pn(t),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,nc(t,i)));break;case 30:break;case 21:break;default:hn(o,t),pn(t)}}function pn(t){var o=t.flags;if(o&2){try{for(var s,i=t.return;i!==null;){if(qy(i)){s=i;break}i=i.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var u=s.stateNode,p=zd(t);tc(t,p,u);break;case 5:var S=s.stateNode;s.flags&32&&(js(S,""),s.flags&=-33);var M=zd(t);tc(t,M,S);break;case 3:case 4:var U=s.stateNode.containerInfo,K=zd(t);Ld(t,K,U);break;default:throw Error(a(161))}}catch(oe){ct(t,t.return,oe)}t.flags&=-3}o&4096&&(t.flags&=-4097)}function Wy(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var o=t;Wy(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),t=t.sibling}}function _o(t,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)Xy(t,o.alternate,o),o=o.sibling}function as(t){for(t=t.child;t!==null;){var o=t;switch(o.tag){case 0:case 11:case 14:case 15:lr(4,o,o.return),as(o);break;case 1:to(o,o.return);var s=o.stateNode;typeof s.componentWillUnmount=="function"&&Vy(o,o.return,s),as(o);break;case 27:Oi(o.stateNode);case 26:case 5:to(o,o.return),as(o);break;case 22:o.memoizedState===null&&as(o);break;case 30:as(o);break;default:as(o)}t=t.sibling}}function Do(t,o,s){for(s=s&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var i=o.alternate,u=t,p=o,S=p.flags;switch(p.tag){case 0:case 11:case 15:Do(u,p,s),vi(4,p);break;case 1:if(Do(u,p,s),i=p,u=i.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(K){ct(i,i.return,K)}if(i=p,u=i.updateQueue,u!==null){var M=i.stateNode;try{var U=u.shared.hiddenCallbacks;if(U!==null)for(u.shared.hiddenCallbacks=null,u=0;u<U.length;u++)_g(U[u],M)}catch(K){ct(i,i.return,K)}}s&&S&64&&Hy(p),bi(p,p.return);break;case 27:Gy(p);case 26:case 5:Do(u,p,s),s&&i===null&&S&4&&Yy(p),bi(p,p.return);break;case 12:Do(u,p,s);break;case 31:Do(u,p,s),s&&S&4&&Zy(u,p);break;case 13:Do(u,p,s),s&&S&4&&$y(u,p);break;case 22:p.memoizedState===null&&Do(u,p,s),bi(p,p.return);break;case 30:break;default:Do(u,p,s)}o=o.sibling}}function Pd(t,o){var s=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),t=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(t=o.memoizedState.cachePool.pool),t!==s&&(t!=null&&t.refCount++,s!=null&&si(s))}function Id(t,o){t=null,o.alternate!==null&&(t=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==t&&(o.refCount++,t!=null&&si(t))}function $n(t,o,s,i){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)ev(t,o,s,i),o=o.sibling}function ev(t,o,s,i){var u=o.flags;switch(o.tag){case 0:case 11:case 15:$n(t,o,s,i),u&2048&&vi(9,o);break;case 1:$n(t,o,s,i);break;case 3:$n(t,o,s,i),u&2048&&(t=null,o.alternate!==null&&(t=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==t&&(o.refCount++,t!=null&&si(t)));break;case 12:if(u&2048){$n(t,o,s,i),t=o.stateNode;try{var p=o.memoizedProps,S=p.id,M=p.onPostCommit;typeof M=="function"&&M(S,o.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(U){ct(o,o.return,U)}}else $n(t,o,s,i);break;case 31:$n(t,o,s,i);break;case 13:$n(t,o,s,i);break;case 23:break;case 22:p=o.stateNode,S=o.alternate,o.memoizedState!==null?p._visibility&2?$n(t,o,s,i):Si(t,o):p._visibility&2?$n(t,o,s,i):(p._visibility|=2,na(t,o,s,i,(o.subtreeFlags&10256)!==0||!1)),u&2048&&Pd(S,o);break;case 24:$n(t,o,s,i),u&2048&&Id(o.alternate,o);break;default:$n(t,o,s,i)}}function na(t,o,s,i,u){for(u=u&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var p=t,S=o,M=s,U=i,K=S.flags;switch(S.tag){case 0:case 11:case 15:na(p,S,M,U,u),vi(8,S);break;case 23:break;case 22:var oe=S.stateNode;S.memoizedState!==null?oe._visibility&2?na(p,S,M,U,u):Si(p,S):(oe._visibility|=2,na(p,S,M,U,u)),u&&K&2048&&Pd(S.alternate,S);break;case 24:na(p,S,M,U,u),u&&K&2048&&Id(S.alternate,S);break;default:na(p,S,M,U,u)}o=o.sibling}}function Si(t,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var s=t,i=o,u=i.flags;switch(i.tag){case 22:Si(s,i),u&2048&&Pd(i.alternate,i);break;case 24:Si(s,i),u&2048&&Id(i.alternate,i);break;default:Si(s,i)}o=o.sibling}}var xi=8192;function oa(t,o,s){if(t.subtreeFlags&xi)for(t=t.child;t!==null;)tv(t,o,s),t=t.sibling}function tv(t,o,s){switch(t.tag){case 26:oa(t,o,s),t.flags&xi&&t.memoizedState!==null&&zR(s,Zn,t.memoizedState,t.memoizedProps);break;case 5:oa(t,o,s);break;case 3:case 4:var i=Zn;Zn=gc(t.stateNode.containerInfo),oa(t,o,s),Zn=i;break;case 22:t.memoizedState===null&&(i=t.alternate,i!==null&&i.memoizedState!==null?(i=xi,xi=16777216,oa(t,o,s),xi=i):oa(t,o,s));break;default:oa(t,o,s)}}function nv(t){var o=t.alternate;if(o!==null&&(t=o.child,t!==null)){o.child=null;do o=t.sibling,t.sibling=null,t=o;while(t!==null)}}function wi(t){var o=t.deletions;if((t.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var i=o[s];Yt=i,rv(i,t)}nv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ov(t),t=t.sibling}function ov(t){switch(t.tag){case 0:case 11:case 15:wi(t),t.flags&2048&&lr(9,t,t.return);break;case 3:wi(t);break;case 12:wi(t);break;case 22:var o=t.stateNode;t.memoizedState!==null&&o._visibility&2&&(t.return===null||t.return.tag!==13)?(o._visibility&=-3,oc(t)):wi(t);break;default:wi(t)}}function oc(t){var o=t.deletions;if((t.flags&16)!==0){if(o!==null)for(var s=0;s<o.length;s++){var i=o[s];Yt=i,rv(i,t)}nv(t)}for(t=t.child;t!==null;){switch(o=t,o.tag){case 0:case 11:case 15:lr(8,o,o.return),oc(o);break;case 22:s=o.stateNode,s._visibility&2&&(s._visibility&=-3,oc(o));break;default:oc(o)}t=t.sibling}}function rv(t,o){for(;Yt!==null;){var s=Yt;switch(s.tag){case 0:case 11:case 15:lr(8,s,o);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var i=s.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:si(s.memoizedState.cache)}if(i=s.child,i!==null)i.return=s,Yt=i;else e:for(s=t;Yt!==null;){i=Yt;var u=i.sibling,p=i.return;if(Ky(i),i===s){Yt=null;break e}if(u!==null){u.return=p,Yt=u;break e}Yt=p}}}var Q1={getCacheForType:function(t){var o=Ft(At),s=o.data.get(t);return s===void 0&&(s=t(),o.data.set(t,s)),s},cacheSignal:function(){return Ft(At).controller.signal}},Z1=typeof WeakMap=="function"?WeakMap:Map,at=0,pt=null,Ke=null,Ze=0,lt=0,Rn=null,cr=!1,ra=!1,Ud=!1,ko=0,wt=0,ur=0,is=0,Bd=0,Tn=0,sa=0,Ei=null,mn=null,Hd=!1,rc=0,sv=0,sc=1/0,ac=null,fr=null,jt=0,dr=null,aa=null,No=0,Vd=0,Yd=null,av=null,Ri=0,qd=null;function Cn(){return(at&2)!==0&&Ze!==0?Ze&-Ze:I.T!==null?Zd():ml()}function iv(){if(Tn===0)if((Ze&536870912)===0||et){var t=Ht;Ht<<=1,(Ht&3932160)===0&&(Ht=262144),Tn=t}else Tn=536870912;return t=wn.current,t!==null&&(t.flags|=32),Tn}function gn(t,o,s){(t===pt&&(lt===2||lt===9)||t.cancelPendingCommit!==null)&&(ia(t,0),hr(t,Ze,Tn,!1)),qr(t,s),((at&2)===0||t!==pt)&&(t===pt&&((at&2)===0&&(is|=s),wt===4&&hr(t,Ze,Tn,!1)),no(t))}function lv(t,o,s){if((at&6)!==0)throw Error(a(327));var i=!s&&(o&127)===0&&(o&t.expiredLanes)===0||Zo(t,o),u=i?W1(t,o):Fd(t,o,!0),p=i;do{if(u===0){ra&&!i&&hr(t,o,0,!1);break}else{if(s=t.current.alternate,p&&!$1(s)){u=Fd(t,o,!1),p=!1;continue}if(u===2){if(p=o,t.errorRecoveryDisabledLanes&p)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){o=S;e:{var M=t;u=Ei;var U=M.current.memoizedState.isDehydrated;if(U&&(ia(M,S).flags|=256),S=Fd(M,S,!1),S!==2){if(Ud&&!U){M.errorRecoveryDisabledLanes|=p,is|=p,u=4;break e}p=mn,mn=u,p!==null&&(mn===null?mn=p:mn.push.apply(mn,p))}u=S}if(p=!1,u!==2)continue}}if(u===1){ia(t,0),hr(t,o,0,!0);break}e:{switch(i=t,p=u,p){case 0:case 1:throw Error(a(345));case 4:if((o&4194048)!==o)break;case 6:hr(i,o,Tn,!cr);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((o&62914560)===o&&(u=rc+300-Ue(),10<u)){if(hr(i,o,Tn,!cr),Qo(i,0,!0)!==0)break e;No=o,i.timeoutHandle=Uv(cv.bind(null,i,s,mn,ac,Hd,o,Tn,is,sa,cr,p,"Throttled",-0,0),u);break e}cv(i,s,mn,ac,Hd,o,Tn,is,sa,cr,p,null,-0,0)}}break}while(!0);no(t)}function cv(t,o,s,i,u,p,S,M,U,K,oe,ie,$,ee){if(t.timeoutHandle=-1,ie=o.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:vo},tv(o,p,ie);var xe=(p&62914560)===p?rc-Ue():(p&4194048)===p?sv-Ue():0;if(xe=LR(ie,xe),xe!==null){No=p,t.cancelPendingCommit=xe(yv.bind(null,t,o,p,s,i,u,S,M,U,oe,ie,null,$,ee)),hr(t,p,S,!K);return}}yv(t,o,p,s,i,u,S,M,U)}function $1(t){for(var o=t;;){var s=o.tag;if((s===0||s===11||s===15)&&o.flags&16384&&(s=o.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var i=0;i<s.length;i++){var u=s[i],p=u.getSnapshot;u=u.value;try{if(!Sn(p(),u))return!1}catch{return!1}}if(s=o.child,o.subtreeFlags&16384&&s!==null)s.return=o,o=s;else{if(o===t)break;for(;o.sibling===null;){if(o.return===null||o.return===t)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function hr(t,o,s,i){o&=~Bd,o&=~is,t.suspendedLanes|=o,t.pingedLanes&=~o,i&&(t.warmLanes|=o),i=t.expirationTimes;for(var u=o;0<u;){var p=31-st(u),S=1<<p;i[p]=-1,u&=~S}s!==0&&qa(t,s,o)}function ic(){return(at&6)===0?(Ti(0),!1):!0}function Gd(){if(Ke!==null){if(lt===0)var t=Ke.return;else t=Ke,wo=Jr=null,id(t),$s=null,ii=0,t=Ke;for(;t!==null;)By(t.alternate,t),t=t.return;Ke=null}}function ia(t,o){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,yR(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),No=0,Gd(),pt=t,Ke=s=So(t.current,null),Ze=o,lt=0,Rn=null,cr=!1,ra=Zo(t,o),Ud=!1,sa=Tn=Bd=is=ur=wt=0,mn=Ei=null,Hd=!1,(o&8)!==0&&(o|=o&32);var i=t.entangledLanes;if(i!==0)for(t=t.entanglements,i&=o;0<i;){var u=31-st(i),p=1<<u;o|=t[u],i&=~p}return ko=o,Ol(),s}function uv(t,o){Be=null,I.H=mi,o===Zs||o===jl?(o=Cg(),lt=3):o===Qf?(o=Cg(),lt=4):lt=o===Ed?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Rn=o,Ke===null&&(wt=1,Zl(t,zn(o,t.current)))}function fv(){var t=wn.current;return t===null?!0:(Ze&4194048)===Ze?In===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?t===In:!1}function dv(){var t=I.H;return I.H=mi,t===null?mi:t}function hv(){var t=I.A;return I.A=Q1,t}function lc(){wt=4,cr||(Ze&4194048)!==Ze&&wn.current!==null||(ra=!0),(ur&134217727)===0&&(is&134217727)===0||pt===null||hr(pt,Ze,Tn,!1)}function Fd(t,o,s){var i=at;at|=2;var u=dv(),p=hv();(pt!==t||Ze!==o)&&(ac=null,ia(t,o)),o=!1;var S=wt;e:do try{if(lt!==0&&Ke!==null){var M=Ke,U=Rn;switch(lt){case 8:Gd(),S=6;break e;case 3:case 2:case 9:case 6:wn.current===null&&(o=!0);var K=lt;if(lt=0,Rn=null,la(t,M,U,K),s&&ra){S=0;break e}break;default:K=lt,lt=0,Rn=null,la(t,M,U,K)}}J1(),S=wt;break}catch(oe){uv(t,oe)}while(!0);return o&&t.shellSuspendCounter++,wo=Jr=null,at=i,I.H=u,I.A=p,Ke===null&&(pt=null,Ze=0,Ol()),S}function J1(){for(;Ke!==null;)pv(Ke)}function W1(t,o){var s=at;at|=2;var i=dv(),u=hv();pt!==t||Ze!==o?(ac=null,sc=Ue()+500,ia(t,o)):ra=Zo(t,o);e:do try{if(lt!==0&&Ke!==null){o=Ke;var p=Rn;t:switch(lt){case 1:lt=0,Rn=null,la(t,o,p,1);break;case 2:case 9:if(Rg(p)){lt=0,Rn=null,mv(o);break}o=function(){lt!==2&&lt!==9||pt!==t||(lt=7),no(t)},p.then(o,o);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:Rg(p)?(lt=0,Rn=null,mv(o)):(lt=0,Rn=null,la(t,o,p,7));break;case 5:var S=null;switch(Ke.tag){case 26:S=Ke.memoizedState;case 5:case 27:var M=Ke;if(S?eb(S):M.stateNode.complete){lt=0,Rn=null;var U=M.sibling;if(U!==null)Ke=U;else{var K=M.return;K!==null?(Ke=K,cc(K)):Ke=null}break t}}lt=0,Rn=null,la(t,o,p,5);break;case 6:lt=0,Rn=null,la(t,o,p,6);break;case 8:Gd(),wt=6;break e;default:throw Error(a(462))}}eR();break}catch(oe){uv(t,oe)}while(!0);return wo=Jr=null,I.H=i,I.A=u,at=s,Ke!==null?0:(pt=null,Ze=0,Ol(),wt)}function eR(){for(;Ke!==null&&!De();)pv(Ke)}function pv(t){var o=Iy(t.alternate,t,ko);t.memoizedProps=t.pendingProps,o===null?cc(t):Ke=o}function mv(t){var o=t,s=o.alternate;switch(o.tag){case 15:case 0:o=ky(s,o,o.pendingProps,o.type,void 0,Ze);break;case 11:o=ky(s,o,o.pendingProps,o.type.render,o.ref,Ze);break;case 5:id(o);default:By(s,o),o=Ke=hg(o,ko),o=Iy(s,o,ko)}t.memoizedProps=t.pendingProps,o===null?cc(t):Ke=o}function la(t,o,s,i){wo=Jr=null,id(o),$s=null,ii=0;var u=o.return;try{if(V1(t,u,o,s,Ze)){wt=1,Zl(t,zn(s,t.current)),Ke=null;return}}catch(p){if(u!==null)throw Ke=u,p;wt=1,Zl(t,zn(s,t.current)),Ke=null;return}o.flags&32768?(et||i===1?t=!0:ra||(Ze&536870912)!==0?t=!1:(cr=t=!0,(i===2||i===9||i===3||i===6)&&(i=wn.current,i!==null&&i.tag===13&&(i.flags|=16384))),gv(o,t)):cc(o)}function cc(t){var o=t;do{if((o.flags&32768)!==0){gv(o,cr);return}t=o.return;var s=G1(o.alternate,o,ko);if(s!==null){Ke=s;return}if(o=o.sibling,o!==null){Ke=o;return}Ke=o=t}while(o!==null);wt===0&&(wt=5)}function gv(t,o){do{var s=F1(t.alternate,t);if(s!==null){s.flags&=32767,Ke=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!o&&(t=t.sibling,t!==null)){Ke=t;return}Ke=t=s}while(t!==null);wt=6,Ke=null}function yv(t,o,s,i,u,p,S,M,U){t.cancelPendingCommit=null;do uc();while(jt!==0);if((at&6)!==0)throw Error(a(327));if(o!==null){if(o===t.current)throw Error(a(177));if(p=o.lanes|o.childLanes,p|=zf,Ya(t,s,p,S,M,U),t===pt&&(Ke=pt=null,Ze=0),aa=o,dr=t,No=s,Vd=p,Yd=u,av=i,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,rR(Pe,function(){return wv(),null})):(t.callbackNode=null,t.callbackPriority=0),i=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||i){i=I.T,I.T=null,u=B.p,B.p=2,S=at,at|=4;try{X1(t,o,s)}finally{at=S,B.p=u,I.T=i}}jt=1,vv(),bv(),Sv()}}function vv(){if(jt===1){jt=0;var t=dr,o=aa,s=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||s){s=I.T,I.T=null;var i=B.p;B.p=2;var u=at;at|=4;try{Jy(o,t);var p=rh,S=rg(t.containerInfo),M=p.focusedElem,U=p.selectionRange;if(S!==M&&M&&M.ownerDocument&&og(M.ownerDocument.documentElement,M)){if(U!==null&&Af(M)){var K=U.start,oe=U.end;if(oe===void 0&&(oe=K),"selectionStart"in M)M.selectionStart=K,M.selectionEnd=Math.min(oe,M.value.length);else{var ie=M.ownerDocument||document,$=ie&&ie.defaultView||window;if($.getSelection){var ee=$.getSelection(),xe=M.textContent.length,ke=Math.min(U.start,xe),dt=U.end===void 0?ke:Math.min(U.end,xe);!ee.extend&&ke>dt&&(S=dt,dt=ke,ke=S);var Y=ng(M,ke),H=ng(M,dt);if(Y&&H&&(ee.rangeCount!==1||ee.anchorNode!==Y.node||ee.anchorOffset!==Y.offset||ee.focusNode!==H.node||ee.focusOffset!==H.offset)){var F=ie.createRange();F.setStart(Y.node,Y.offset),ee.removeAllRanges(),ke>dt?(ee.addRange(F),ee.extend(H.node,H.offset)):(F.setEnd(H.node,H.offset),ee.addRange(F))}}}}for(ie=[],ee=M;ee=ee.parentNode;)ee.nodeType===1&&ie.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<ie.length;M++){var ae=ie[M];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}wc=!!oh,rh=oh=null}finally{at=u,B.p=i,I.T=s}}t.current=o,jt=2}}function bv(){if(jt===2){jt=0;var t=dr,o=aa,s=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||s){s=I.T,I.T=null;var i=B.p;B.p=2;var u=at;at|=4;try{Xy(t,o.alternate,o)}finally{at=u,B.p=i,I.T=s}}jt=3}}function Sv(){if(jt===4||jt===3){jt=0,Ye();var t=dr,o=aa,s=No,i=av;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?jt=5:(jt=0,aa=dr=null,xv(t,t.pendingLanes));var u=t.pendingLanes;if(u===0&&(fr=null),Ga(s),o=o.stateNode,Le&&typeof Le.onCommitFiberRoot=="function")try{Le.onCommitFiberRoot(Kn,o,void 0,(o.current.flags&128)===128)}catch{}if(i!==null){o=I.T,u=B.p,B.p=2,I.T=null;try{for(var p=t.onRecoverableError,S=0;S<i.length;S++){var M=i[S];p(M.value,{componentStack:M.stack})}}finally{I.T=o,B.p=u}}(No&3)!==0&&uc(),no(t),u=t.pendingLanes,(s&261930)!==0&&(u&42)!==0?t===qd?Ri++:(Ri=0,qd=t):Ri=0,Ti(0)}}function xv(t,o){(t.pooledCacheLanes&=o)===0&&(o=t.pooledCache,o!=null&&(t.pooledCache=null,si(o)))}function uc(){return vv(),bv(),Sv(),wv()}function wv(){if(jt!==5)return!1;var t=dr,o=Vd;Vd=0;var s=Ga(No),i=I.T,u=B.p;try{B.p=32>s?32:s,I.T=null,s=Yd,Yd=null;var p=dr,S=No;if(jt=0,aa=dr=null,No=0,(at&6)!==0)throw Error(a(331));var M=at;if(at|=4,ov(p.current),ev(p,p.current,S,s),at=M,Ti(0,!1),Le&&typeof Le.onPostCommitFiberRoot=="function")try{Le.onPostCommitFiberRoot(Kn,p)}catch{}return!0}finally{B.p=u,I.T=i,xv(t,o)}}function Ev(t,o,s){o=zn(s,o),o=wd(t.stateNode,o,2),t=sr(t,o,2),t!==null&&(qr(t,2),no(t))}function ct(t,o,s){if(t.tag===3)Ev(t,t,s);else for(;o!==null;){if(o.tag===3){Ev(o,t,s);break}else if(o.tag===1){var i=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(fr===null||!fr.has(i))){t=zn(s,t),s=Ry(2),i=sr(o,s,2),i!==null&&(Ty(s,i,o,t),qr(i,2),no(i));break}}o=o.return}}function Xd(t,o,s){var i=t.pingCache;if(i===null){i=t.pingCache=new Z1;var u=new Set;i.set(o,u)}else u=i.get(o),u===void 0&&(u=new Set,i.set(o,u));u.has(s)||(Ud=!0,u.add(s),t=tR.bind(null,t,o,s),o.then(t,t))}function tR(t,o,s){var i=t.pingCache;i!==null&&i.delete(o),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,pt===t&&(Ze&s)===s&&(wt===4||wt===3&&(Ze&62914560)===Ze&&300>Ue()-rc?(at&2)===0&&ia(t,0):Bd|=s,sa===Ze&&(sa=0)),no(t)}function Rv(t,o){o===0&&(o=dl()),t=Qr(t,o),t!==null&&(qr(t,o),no(t))}function nR(t){var o=t.memoizedState,s=0;o!==null&&(s=o.retryLane),Rv(t,s)}function oR(t,o){var s=0;switch(t.tag){case 31:case 13:var i=t.stateNode,u=t.memoizedState;u!==null&&(s=u.retryLane);break;case 19:i=t.stateNode;break;case 22:i=t.stateNode._retryCache;break;default:throw Error(a(314))}i!==null&&i.delete(o),Rv(t,s)}function rR(t,o){return we(t,o)}var fc=null,ca=null,Kd=!1,dc=!1,Qd=!1,pr=0;function no(t){t!==ca&&t.next===null&&(ca===null?fc=ca=t:ca=ca.next=t),dc=!0,Kd||(Kd=!0,aR())}function Ti(t,o){if(!Qd&&dc){Qd=!0;do for(var s=!1,i=fc;i!==null;){if(t!==0){var u=i.pendingLanes;if(u===0)var p=0;else{var S=i.suspendedLanes,M=i.pingedLanes;p=(1<<31-st(42|t)+1)-1,p&=u&~(S&~M),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(s=!0,Ov(i,p))}else p=Ze,p=Qo(i,i===pt?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(p&3)===0||Zo(i,p)||(s=!0,Ov(i,p));i=i.next}while(s);Qd=!1}}function sR(){Tv()}function Tv(){dc=Kd=!1;var t=0;pr!==0&&gR()&&(t=pr);for(var o=Ue(),s=null,i=fc;i!==null;){var u=i.next,p=Cv(i,o);p===0?(i.next=null,s===null?fc=u:s.next=u,u===null&&(ca=s)):(s=i,(t!==0||(p&3)!==0)&&(dc=!0)),i=u}jt!==0&&jt!==5||Ti(t),pr!==0&&(pr=0)}function Cv(t,o){for(var s=t.suspendedLanes,i=t.pingedLanes,u=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var S=31-st(p),M=1<<S,U=u[S];U===-1?((M&s)===0||(M&i)!==0)&&(u[S]=uf(M,o)):U<=o&&(t.expiredLanes|=M),p&=~M}if(o=pt,s=Ze,s=Qo(t,t===o?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),i=t.callbackNode,s===0||t===o&&(lt===2||lt===9)||t.cancelPendingCommit!==null)return i!==null&&i!==null&&ge(i),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||Zo(t,s)){if(o=s&-s,o===t.callbackPriority)return o;switch(i!==null&&ge(i),Ga(s)){case 2:case 8:s=We;break;case 32:s=Pe;break;case 268435456:s=$t;break;default:s=Pe}return i=Mv.bind(null,t),s=we(s,i),t.callbackPriority=o,t.callbackNode=s,o}return i!==null&&i!==null&&ge(i),t.callbackPriority=2,t.callbackNode=null,2}function Mv(t,o){if(jt!==0&&jt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if(uc()&&t.callbackNode!==s)return null;var i=Ze;return i=Qo(t,t===pt?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),i===0?null:(lv(t,i,o),Cv(t,Ue()),t.callbackNode!=null&&t.callbackNode===s?Mv.bind(null,t):null)}function Ov(t,o){if(uc())return null;lv(t,o,!0)}function aR(){vR(function(){(at&6)!==0?we(He,sR):Tv()})}function Zd(){if(pr===0){var t=Ks;t===0&&(t=Lt,Lt<<=1,(Lt&261888)===0&&(Lt=256)),pr=t}return pr}function Av(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Sl(""+t)}function _v(t,o){var s=o.ownerDocument.createElement("input");return s.name=o.name,s.value=o.value,t.id&&s.setAttribute("form",t.id),o.parentNode.insertBefore(s,o),t=new FormData(t),s.parentNode.removeChild(s),t}function iR(t,o,s,i,u){if(o==="submit"&&s&&s.stateNode===u){var p=Av((u[un]||null).action),S=i.submitter;S&&(o=(o=S[un]||null)?Av(o.formAction):S.getAttribute("formAction"),o!==null&&(p=o,S=null));var M=new Rl("action","action",null,i,u);t.push({event:M,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(pr!==0){var U=S?_v(u,S):new FormData(u);gd(s,{pending:!0,data:U,method:u.method,action:p},null,U)}}else typeof p=="function"&&(M.preventDefault(),U=S?_v(u,S):new FormData(u),gd(s,{pending:!0,data:U,method:u.method,action:p},p,U))},currentTarget:u}]})}}for(var $d=0;$d<Nf.length;$d++){var Jd=Nf[$d],lR=Jd.toLowerCase(),cR=Jd[0].toUpperCase()+Jd.slice(1);Qn(lR,"on"+cR)}Qn(ig,"onAnimationEnd"),Qn(lg,"onAnimationIteration"),Qn(cg,"onAnimationStart"),Qn("dblclick","onDoubleClick"),Qn("focusin","onFocus"),Qn("focusout","onBlur"),Qn(T1,"onTransitionRun"),Qn(C1,"onTransitionStart"),Qn(M1,"onTransitionCancel"),Qn(ug,"onTransitionEnd"),zs("onMouseEnter",["mouseout","mouseover"]),zs("onMouseLeave",["mouseout","mouseover"]),zs("onPointerEnter",["pointerout","pointerover"]),zs("onPointerLeave",["pointerout","pointerover"]),Gr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ci="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),uR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ci));function Dv(t,o){o=(o&4)!==0;for(var s=0;s<t.length;s++){var i=t[s],u=i.event;i=i.listeners;e:{var p=void 0;if(o)for(var S=i.length-1;0<=S;S--){var M=i[S],U=M.instance,K=M.currentTarget;if(M=M.listener,U!==p&&u.isPropagationStopped())break e;p=M,u.currentTarget=K;try{p(u)}catch(oe){Ml(oe)}u.currentTarget=null,p=U}else for(S=0;S<i.length;S++){if(M=i[S],U=M.instance,K=M.currentTarget,M=M.listener,U!==p&&u.isPropagationStopped())break e;p=M,u.currentTarget=K;try{p(u)}catch(oe){Ml(oe)}u.currentTarget=null,p=U}}}}function Qe(t,o){var s=o[ff];s===void 0&&(s=o[ff]=new Set);var i=t+"__bubble";s.has(i)||(kv(o,t,2,!1),s.add(i))}function Wd(t,o,s){var i=0;o&&(i|=4),kv(s,t,i,o)}var hc="_reactListening"+Math.random().toString(36).slice(2);function eh(t){if(!t[hc]){t[hc]=!0,Tm.forEach(function(s){s!=="selectionchange"&&(uR.has(s)||Wd(s,!1,t),Wd(s,!0,t))});var o=t.nodeType===9?t:t.ownerDocument;o===null||o[hc]||(o[hc]=!0,Wd("selectionchange",!1,o))}}function kv(t,o,s,i){switch(ib(o)){case 2:var u=IR;break;case 8:u=UR;break;default:u=mh}s=u.bind(null,o,s,t),u=void 0,!Sf||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(u=!0),i?u!==void 0?t.addEventListener(o,s,{capture:!0,passive:u}):t.addEventListener(o,s,!0):u!==void 0?t.addEventListener(o,s,{passive:u}):t.addEventListener(o,s,!1)}function th(t,o,s,i,u){var p=i;if((o&1)===0&&(o&2)===0&&i!==null)e:for(;;){if(i===null)return;var S=i.tag;if(S===3||S===4){var M=i.stateNode.containerInfo;if(M===u)break;if(S===4)for(S=i.return;S!==null;){var U=S.tag;if((U===3||U===4)&&S.stateNode.containerInfo===u)return;S=S.return}for(;M!==null;){if(S=Ds(M),S===null)return;if(U=S.tag,U===5||U===6||U===26||U===27){i=p=S;continue e}M=M.parentNode}}i=i.return}Pm(function(){var K=p,oe=vf(s),ie=[];e:{var $=fg.get(t);if($!==void 0){var ee=Rl,xe=t;switch(t){case"keypress":if(wl(s)===0)break e;case"keydown":case"keyup":ee=o1;break;case"focusin":xe="focus",ee=Rf;break;case"focusout":xe="blur",ee=Rf;break;case"beforeblur":case"afterblur":ee=Rf;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=Bm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=GE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=a1;break;case ig:case lg:case cg:ee=KE;break;case ug:ee=l1;break;case"scroll":case"scrollend":ee=YE;break;case"wheel":ee=u1;break;case"copy":case"cut":case"paste":ee=ZE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Vm;break;case"toggle":case"beforetoggle":ee=d1}var ke=(o&4)!==0,dt=!ke&&(t==="scroll"||t==="scrollend"),Y=ke?$!==null?$+"Capture":null:$;ke=[];for(var H=K,F;H!==null;){var ae=H;if(F=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||F===null||Y===null||(ae=Ka(H,Y),ae!=null&&ke.push(Mi(H,ae,F))),dt)break;H=H.return}0<ke.length&&($=new ee($,xe,null,s,oe),ie.push({event:$,listeners:ke}))}}if((o&7)===0){e:{if($=t==="mouseover"||t==="pointerover",ee=t==="mouseout"||t==="pointerout",$&&s!==yf&&(xe=s.relatedTarget||s.fromElement)&&(Ds(xe)||xe[_s]))break e;if((ee||$)&&($=oe.window===oe?oe:($=oe.ownerDocument)?$.defaultView||$.parentWindow:window,ee?(xe=s.relatedTarget||s.toElement,ee=K,xe=xe?Ds(xe):null,xe!==null&&(dt=c(xe),ke=xe.tag,xe!==dt||ke!==5&&ke!==27&&ke!==6)&&(xe=null)):(ee=null,xe=K),ee!==xe)){if(ke=Bm,ae="onMouseLeave",Y="onMouseEnter",H="mouse",(t==="pointerout"||t==="pointerover")&&(ke=Vm,ae="onPointerLeave",Y="onPointerEnter",H="pointer"),dt=ee==null?$:Xa(ee),F=xe==null?$:Xa(xe),$=new ke(ae,H+"leave",ee,s,oe),$.target=dt,$.relatedTarget=F,ae=null,Ds(oe)===K&&(ke=new ke(Y,H+"enter",xe,s,oe),ke.target=F,ke.relatedTarget=dt,ae=ke),dt=ae,ee&&xe)t:{for(ke=fR,Y=ee,H=xe,F=0,ae=Y;ae;ae=ke(ae))F++;ae=0;for(var Ae=H;Ae;Ae=ke(Ae))ae++;for(;0<F-ae;)Y=ke(Y),F--;for(;0<ae-F;)H=ke(H),ae--;for(;F--;){if(Y===H||H!==null&&Y===H.alternate){ke=Y;break t}Y=ke(Y),H=ke(H)}ke=null}else ke=null;ee!==null&&Nv(ie,$,ee,ke,!1),xe!==null&&dt!==null&&Nv(ie,dt,xe,ke,!0)}}e:{if($=K?Xa(K):window,ee=$.nodeName&&$.nodeName.toLowerCase(),ee==="select"||ee==="input"&&$.type==="file")var tt=Zm;else if(Km($))if($m)tt=w1;else{tt=S1;var Te=b1}else ee=$.nodeName,!ee||ee.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?K&&gf(K.elementType)&&(tt=Zm):tt=x1;if(tt&&(tt=tt(t,K))){Qm(ie,tt,s,oe);break e}Te&&Te(t,$,K),t==="focusout"&&K&&$.type==="number"&&K.memoizedProps.value!=null&&mf($,"number",$.value)}switch(Te=K?Xa(K):window,t){case"focusin":(Km(Te)||Te.contentEditable==="true")&&(Bs=Te,_f=K,ni=null);break;case"focusout":ni=_f=Bs=null;break;case"mousedown":Df=!0;break;case"contextmenu":case"mouseup":case"dragend":Df=!1,sg(ie,s,oe);break;case"selectionchange":if(R1)break;case"keydown":case"keyup":sg(ie,s,oe)}var Ve;if(Cf)e:{switch(t){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else Us?Fm(t,s)&&($e="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&($e="onCompositionStart");$e&&(Ym&&s.locale!=="ko"&&(Us||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&Us&&(Ve=Im()):(Jo=oe,xf="value"in Jo?Jo.value:Jo.textContent,Us=!0)),Te=pc(K,$e),0<Te.length&&($e=new Hm($e,t,null,s,oe),ie.push({event:$e,listeners:Te}),Ve?$e.data=Ve:(Ve=Xm(s),Ve!==null&&($e.data=Ve)))),(Ve=p1?m1(t,s):g1(t,s))&&($e=pc(K,"onBeforeInput"),0<$e.length&&(Te=new Hm("onBeforeInput","beforeinput",null,s,oe),ie.push({event:Te,listeners:$e}),Te.data=Ve)),iR(ie,t,K,s,oe)}Dv(ie,o)})}function Mi(t,o,s){return{instance:t,listener:o,currentTarget:s}}function pc(t,o){for(var s=o+"Capture",i=[];t!==null;){var u=t,p=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||p===null||(u=Ka(t,s),u!=null&&i.unshift(Mi(t,u,p)),u=Ka(t,o),u!=null&&i.push(Mi(t,u,p))),t.tag===3)return i;t=t.return}return[]}function fR(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Nv(t,o,s,i,u){for(var p=o._reactName,S=[];s!==null&&s!==i;){var M=s,U=M.alternate,K=M.stateNode;if(M=M.tag,U!==null&&U===i)break;M!==5&&M!==26&&M!==27||K===null||(U=K,u?(K=Ka(s,p),K!=null&&S.unshift(Mi(s,K,U))):u||(K=Ka(s,p),K!=null&&S.push(Mi(s,K,U)))),s=s.return}S.length!==0&&t.push({event:o,listeners:S})}var dR=/\r\n?/g,hR=/\u0000|\uFFFD/g;function zv(t){return(typeof t=="string"?t:""+t).replace(dR,`
10
- `).replace(hR,"")}function Lv(t,o){return o=zv(o),zv(t)===o}function ft(t,o,s,i,u,p){switch(s){case"children":typeof i=="string"?o==="body"||o==="textarea"&&i===""||js(t,i):(typeof i=="number"||typeof i=="bigint")&&o!=="body"&&js(t,""+i);break;case"className":vl(t,"class",i);break;case"tabIndex":vl(t,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":vl(t,s,i);break;case"style":Lm(t,i,p);break;case"data":if(o!=="object"){vl(t,"data",i);break}case"src":case"href":if(i===""&&(o!=="a"||s!=="href")){t.removeAttribute(s);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){t.removeAttribute(s);break}i=Sl(""+i),t.setAttribute(s,i);break;case"action":case"formAction":if(typeof i=="function"){t.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(s==="formAction"?(o!=="input"&&ft(t,o,"name",u.name,u,null),ft(t,o,"formEncType",u.formEncType,u,null),ft(t,o,"formMethod",u.formMethod,u,null),ft(t,o,"formTarget",u.formTarget,u,null)):(ft(t,o,"encType",u.encType,u,null),ft(t,o,"method",u.method,u,null),ft(t,o,"target",u.target,u,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){t.removeAttribute(s);break}i=Sl(""+i),t.setAttribute(s,i);break;case"onClick":i!=null&&(t.onclick=vo);break;case"onScroll":i!=null&&Qe("scroll",t);break;case"onScrollEnd":i!=null&&Qe("scrollend",t);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(a(61));if(s=i.__html,s!=null){if(u.children!=null)throw Error(a(60));t.innerHTML=s}}break;case"multiple":t.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":t.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){t.removeAttribute("xlink:href");break}s=Sl(""+i),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(s,""+i):t.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":i===!0?t.setAttribute(s,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(s,i):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?t.setAttribute(s,i):t.removeAttribute(s);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?t.removeAttribute(s):t.setAttribute(s,i);break;case"popover":Qe("beforetoggle",t),Qe("toggle",t),yl(t,"popover",i);break;case"xlinkActuate":yo(t,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":yo(t,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":yo(t,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":yo(t,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":yo(t,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":yo(t,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":yo(t,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":yo(t,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":yo(t,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":yl(t,"is",i);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=HE.get(s)||s,yl(t,s,i))}}function nh(t,o,s,i,u,p){switch(s){case"style":Lm(t,i,p);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(a(61));if(s=i.__html,s!=null){if(u.children!=null)throw Error(a(60));t.innerHTML=s}}break;case"children":typeof i=="string"?js(t,i):(typeof i=="number"||typeof i=="bigint")&&js(t,""+i);break;case"onScroll":i!=null&&Qe("scroll",t);break;case"onScrollEnd":i!=null&&Qe("scrollend",t);break;case"onClick":i!=null&&(t.onclick=vo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Cm.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(u=s.endsWith("Capture"),o=s.slice(2,u?s.length-7:void 0),p=t[un]||null,p=p!=null?p[s]:null,typeof p=="function"&&t.removeEventListener(o,p,u),typeof i=="function")){typeof p!="function"&&p!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(o,i,u);break e}s in t?t[s]=i:i===!0?t.setAttribute(s,""):yl(t,s,i)}}}function Kt(t,o,s){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",t),Qe("load",t);var i=!1,u=!1,p;for(p in s)if(s.hasOwnProperty(p)){var S=s[p];if(S!=null)switch(p){case"src":i=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,o));default:ft(t,o,p,S,s,null)}}u&&ft(t,o,"srcSet",s.srcSet,s,null),i&&ft(t,o,"src",s.src,s,null);return;case"input":Qe("invalid",t);var M=p=S=u=null,U=null,K=null;for(i in s)if(s.hasOwnProperty(i)){var oe=s[i];if(oe!=null)switch(i){case"name":u=oe;break;case"type":S=oe;break;case"checked":U=oe;break;case"defaultChecked":K=oe;break;case"value":p=oe;break;case"defaultValue":M=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,o));break;default:ft(t,o,i,oe,s,null)}}Dm(t,p,M,U,K,S,u,!1);return;case"select":Qe("invalid",t),i=S=p=null;for(u in s)if(s.hasOwnProperty(u)&&(M=s[u],M!=null))switch(u){case"value":p=M;break;case"defaultValue":S=M;break;case"multiple":i=M;default:ft(t,o,u,M,s,null)}o=p,s=S,t.multiple=!!i,o!=null?Ls(t,!!i,o,!1):s!=null&&Ls(t,!!i,s,!0);return;case"textarea":Qe("invalid",t),p=u=i=null;for(S in s)if(s.hasOwnProperty(S)&&(M=s[S],M!=null))switch(S){case"value":i=M;break;case"defaultValue":u=M;break;case"children":p=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(a(91));break;default:ft(t,o,S,M,s,null)}Nm(t,i,u,p);return;case"option":for(U in s)s.hasOwnProperty(U)&&(i=s[U],i!=null)&&(U==="selected"?t.selected=i&&typeof i!="function"&&typeof i!="symbol":ft(t,o,U,i,s,null));return;case"dialog":Qe("beforetoggle",t),Qe("toggle",t),Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":Qe("load",t);break;case"video":case"audio":for(i=0;i<Ci.length;i++)Qe(Ci[i],t);break;case"image":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"embed":case"source":case"link":Qe("error",t),Qe("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in s)if(s.hasOwnProperty(K)&&(i=s[K],i!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,o));default:ft(t,o,K,i,s,null)}return;default:if(gf(o)){for(oe in s)s.hasOwnProperty(oe)&&(i=s[oe],i!==void 0&&nh(t,o,oe,i,s,void 0));return}}for(M in s)s.hasOwnProperty(M)&&(i=s[M],i!=null&&ft(t,o,M,i,s,null))}function pR(t,o,s,i){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,p=null,S=null,M=null,U=null,K=null,oe=null;for(ee in s){var ie=s[ee];if(s.hasOwnProperty(ee)&&ie!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":U=ie;default:i.hasOwnProperty(ee)||ft(t,o,ee,null,i,ie)}}for(var $ in i){var ee=i[$];if(ie=s[$],i.hasOwnProperty($)&&(ee!=null||ie!=null))switch($){case"type":p=ee;break;case"name":u=ee;break;case"checked":K=ee;break;case"defaultChecked":oe=ee;break;case"value":S=ee;break;case"defaultValue":M=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,o));break;default:ee!==ie&&ft(t,o,$,ee,i,ie)}}pf(t,S,M,U,K,oe,p,u);return;case"select":ee=S=M=$=null;for(p in s)if(U=s[p],s.hasOwnProperty(p)&&U!=null)switch(p){case"value":break;case"multiple":ee=U;default:i.hasOwnProperty(p)||ft(t,o,p,null,i,U)}for(u in i)if(p=i[u],U=s[u],i.hasOwnProperty(u)&&(p!=null||U!=null))switch(u){case"value":$=p;break;case"defaultValue":M=p;break;case"multiple":S=p;default:p!==U&&ft(t,o,u,p,i,U)}o=M,s=S,i=ee,$!=null?Ls(t,!!s,$,!1):!!i!=!!s&&(o!=null?Ls(t,!!s,o,!0):Ls(t,!!s,s?[]:"",!1));return;case"textarea":ee=$=null;for(M in s)if(u=s[M],s.hasOwnProperty(M)&&u!=null&&!i.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:ft(t,o,M,null,i,u)}for(S in i)if(u=i[S],p=s[S],i.hasOwnProperty(S)&&(u!=null||p!=null))switch(S){case"value":$=u;break;case"defaultValue":ee=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(a(91));break;default:u!==p&&ft(t,o,S,u,i,p)}km(t,$,ee);return;case"option":for(var xe in s)$=s[xe],s.hasOwnProperty(xe)&&$!=null&&!i.hasOwnProperty(xe)&&(xe==="selected"?t.selected=!1:ft(t,o,xe,null,i,$));for(U in i)$=i[U],ee=s[U],i.hasOwnProperty(U)&&$!==ee&&($!=null||ee!=null)&&(U==="selected"?t.selected=$&&typeof $!="function"&&typeof $!="symbol":ft(t,o,U,$,i,ee));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ke in s)$=s[ke],s.hasOwnProperty(ke)&&$!=null&&!i.hasOwnProperty(ke)&&ft(t,o,ke,null,i,$);for(K in i)if($=i[K],ee=s[K],i.hasOwnProperty(K)&&$!==ee&&($!=null||ee!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(a(137,o));break;default:ft(t,o,K,$,i,ee)}return;default:if(gf(o)){for(var dt in s)$=s[dt],s.hasOwnProperty(dt)&&$!==void 0&&!i.hasOwnProperty(dt)&&nh(t,o,dt,void 0,i,$);for(oe in i)$=i[oe],ee=s[oe],!i.hasOwnProperty(oe)||$===ee||$===void 0&&ee===void 0||nh(t,o,oe,$,i,ee);return}}for(var Y in s)$=s[Y],s.hasOwnProperty(Y)&&$!=null&&!i.hasOwnProperty(Y)&&ft(t,o,Y,null,i,$);for(ie in i)$=i[ie],ee=s[ie],!i.hasOwnProperty(ie)||$===ee||$==null&&ee==null||ft(t,o,ie,$,i,ee)}function jv(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mR(){if(typeof performance.getEntriesByType=="function"){for(var t=0,o=0,s=performance.getEntriesByType("resource"),i=0;i<s.length;i++){var u=s[i],p=u.transferSize,S=u.initiatorType,M=u.duration;if(p&&M&&jv(S)){for(S=0,M=u.responseEnd,i+=1;i<s.length;i++){var U=s[i],K=U.startTime;if(K>M)break;var oe=U.transferSize,ie=U.initiatorType;oe&&jv(ie)&&(U=U.responseEnd,S+=oe*(U<M?1:(M-K)/(U-K)))}if(--i,o+=8*(p+S)/(u.duration/1e3),t++,10<t)break}}if(0<t)return o/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var oh=null,rh=null;function mc(t){return t.nodeType===9?t:t.ownerDocument}function Pv(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Iv(t,o){if(t===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&o==="foreignObject"?0:t}function sh(t,o){return t==="textarea"||t==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var ah=null;function gR(){var t=window.event;return t&&t.type==="popstate"?t===ah?!1:(ah=t,!0):(ah=null,!1)}var Uv=typeof setTimeout=="function"?setTimeout:void 0,yR=typeof clearTimeout=="function"?clearTimeout:void 0,Bv=typeof Promise=="function"?Promise:void 0,vR=typeof queueMicrotask=="function"?queueMicrotask:typeof Bv<"u"?function(t){return Bv.resolve(null).then(t).catch(bR)}:Uv;function bR(t){setTimeout(function(){throw t})}function mr(t){return t==="head"}function Hv(t,o){var s=o,i=0;do{var u=s.nextSibling;if(t.removeChild(s),u&&u.nodeType===8)if(s=u.data,s==="/$"||s==="/&"){if(i===0){t.removeChild(u),ha(o);return}i--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")i++;else if(s==="html")Oi(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,Oi(s);for(var p=s.firstChild;p;){var S=p.nextSibling,M=p.nodeName;p[Fa]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&p.rel.toLowerCase()==="stylesheet"||s.removeChild(p),p=S}}else s==="body"&&Oi(t.ownerDocument.body);s=u}while(s);ha(o)}function Vv(t,o){var s=t;t=0;do{var i=s.nextSibling;if(s.nodeType===1?o?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(o?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),i&&i.nodeType===8)if(s=i.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=i}while(s)}function ih(t){var o=t.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var s=o;switch(o=o.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":ih(s),df(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function SR(t,o,s,i){for(;t.nodeType===1;){var u=s;if(t.nodeName.toLowerCase()!==o.toLowerCase()){if(!i&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(i){if(!t[Fa])switch(o){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==u.rel||t.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||t.getAttribute("title")!==(u.title==null?null:u.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(p=t.getAttribute("src"),(p!==(u.src==null?null:u.src)||t.getAttribute("type")!==(u.type==null?null:u.type)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(o==="input"&&t.type==="hidden"){var p=u.name==null?null:""+u.name;if(u.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=Un(t.nextSibling),t===null)break}return null}function xR(t,o,s){if(o==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=Un(t.nextSibling),t===null))return null;return t}function Yv(t,o){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=Un(t.nextSibling),t===null))return null;return t}function lh(t){return t.data==="$?"||t.data==="$~"}function ch(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function wR(t,o){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=o;else if(t.data!=="$?"||s.readyState!=="loading")o();else{var i=function(){o(),s.removeEventListener("DOMContentLoaded",i)};s.addEventListener("DOMContentLoaded",i),t._reactRetry=i}}function Un(t){for(;t!=null;t=t.nextSibling){var o=t.nodeType;if(o===1||o===3)break;if(o===8){if(o=t.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return t}var uh=null;function qv(t){t=t.nextSibling;for(var o=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(o===0)return Un(t.nextSibling);o--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||o++}t=t.nextSibling}return null}function Gv(t){t=t.previousSibling;for(var o=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(o===0)return t;o--}else s!=="/$"&&s!=="/&"||o++}t=t.previousSibling}return null}function Fv(t,o,s){switch(o=mc(s),t){case"html":if(t=o.documentElement,!t)throw Error(a(452));return t;case"head":if(t=o.head,!t)throw Error(a(453));return t;case"body":if(t=o.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function Oi(t){for(var o=t.attributes;o.length;)t.removeAttributeNode(o[0]);df(t)}var Bn=new Map,Xv=new Set;function gc(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var zo=B.d;B.d={f:ER,r:RR,D:TR,C:CR,L:MR,m:OR,X:_R,S:AR,M:DR};function ER(){var t=zo.f(),o=ic();return t||o}function RR(t){var o=ks(t);o!==null&&o.tag===5&&o.type==="form"?uy(o):zo.r(t)}var ua=typeof document>"u"?null:document;function Kv(t,o,s){var i=ua;if(i&&typeof o=="string"&&o){var u=kn(o);u='link[rel="'+t+'"][href="'+u+'"]',typeof s=="string"&&(u+='[crossorigin="'+s+'"]'),Xv.has(u)||(Xv.add(u),t={rel:t,crossOrigin:s,href:o},i.querySelector(u)===null&&(o=i.createElement("link"),Kt(o,"link",t),Vt(o),i.head.appendChild(o)))}}function TR(t){zo.D(t),Kv("dns-prefetch",t,null)}function CR(t,o){zo.C(t,o),Kv("preconnect",t,o)}function MR(t,o,s){zo.L(t,o,s);var i=ua;if(i&&t&&o){var u='link[rel="preload"][as="'+kn(o)+'"]';o==="image"&&s&&s.imageSrcSet?(u+='[imagesrcset="'+kn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(u+='[imagesizes="'+kn(s.imageSizes)+'"]')):u+='[href="'+kn(t)+'"]';var p=u;switch(o){case"style":p=fa(t);break;case"script":p=da(t)}Bn.has(p)||(t=g({rel:"preload",href:o==="image"&&s&&s.imageSrcSet?void 0:t,as:o},s),Bn.set(p,t),i.querySelector(u)!==null||o==="style"&&i.querySelector(Ai(p))||o==="script"&&i.querySelector(_i(p))||(o=i.createElement("link"),Kt(o,"link",t),Vt(o),i.head.appendChild(o)))}}function OR(t,o){zo.m(t,o);var s=ua;if(s&&t){var i=o&&typeof o.as=="string"?o.as:"script",u='link[rel="modulepreload"][as="'+kn(i)+'"][href="'+kn(t)+'"]',p=u;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=da(t)}if(!Bn.has(p)&&(t=g({rel:"modulepreload",href:t},o),Bn.set(p,t),s.querySelector(u)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(_i(p)))return}i=s.createElement("link"),Kt(i,"link",t),Vt(i),s.head.appendChild(i)}}}function AR(t,o,s){zo.S(t,o,s);var i=ua;if(i&&t){var u=Ns(i).hoistableStyles,p=fa(t);o=o||"default";var S=u.get(p);if(!S){var M={loading:0,preload:null};if(S=i.querySelector(Ai(p)))M.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":o},s),(s=Bn.get(p))&&fh(t,s);var U=S=i.createElement("link");Vt(U),Kt(U,"link",t),U._p=new Promise(function(K,oe){U.onload=K,U.onerror=oe}),U.addEventListener("load",function(){M.loading|=1}),U.addEventListener("error",function(){M.loading|=2}),M.loading|=4,yc(S,o,i)}S={type:"stylesheet",instance:S,count:1,state:M},u.set(p,S)}}}function _R(t,o){zo.X(t,o);var s=ua;if(s&&t){var i=Ns(s).hoistableScripts,u=da(t),p=i.get(u);p||(p=s.querySelector(_i(u)),p||(t=g({src:t,async:!0},o),(o=Bn.get(u))&&dh(t,o),p=s.createElement("script"),Vt(p),Kt(p,"link",t),s.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},i.set(u,p))}}function DR(t,o){zo.M(t,o);var s=ua;if(s&&t){var i=Ns(s).hoistableScripts,u=da(t),p=i.get(u);p||(p=s.querySelector(_i(u)),p||(t=g({src:t,async:!0,type:"module"},o),(o=Bn.get(u))&&dh(t,o),p=s.createElement("script"),Vt(p),Kt(p,"link",t),s.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},i.set(u,p))}}function Qv(t,o,s,i){var u=(u=he.current)?gc(u):null;if(!u)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(o=fa(s.href),s=Ns(u).hoistableStyles,i=s.get(o),i||(i={type:"style",instance:null,count:0,state:null},s.set(o,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=fa(s.href);var p=Ns(u).hoistableStyles,S=p.get(t);if(S||(u=u.ownerDocument||u,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(t,S),(p=u.querySelector(Ai(t)))&&!p._p&&(S.instance=p,S.state.loading=5),Bn.has(t)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Bn.set(t,s),p||kR(u,t,s,S.state))),o&&i===null)throw Error(a(528,""));return S}if(o&&i!==null)throw Error(a(529,""));return null;case"script":return o=s.async,s=s.src,typeof s=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=da(s),s=Ns(u).hoistableScripts,i=s.get(o),i||(i={type:"script",instance:null,count:0,state:null},s.set(o,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function fa(t){return'href="'+kn(t)+'"'}function Ai(t){return'link[rel="stylesheet"]['+t+"]"}function Zv(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function kR(t,o,s,i){t.querySelector('link[rel="preload"][as="style"]['+o+"]")?i.loading=1:(o=t.createElement("link"),i.preload=o,o.addEventListener("load",function(){return i.loading|=1}),o.addEventListener("error",function(){return i.loading|=2}),Kt(o,"link",s),Vt(o),t.head.appendChild(o))}function da(t){return'[src="'+kn(t)+'"]'}function _i(t){return"script[async]"+t}function $v(t,o,s){if(o.count++,o.instance===null)switch(o.type){case"style":var i=t.querySelector('style[data-href~="'+kn(s.href)+'"]');if(i)return o.instance=i,Vt(i),i;var u=g({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return i=(t.ownerDocument||t).createElement("style"),Vt(i),Kt(i,"style",u),yc(i,s.precedence,t),o.instance=i;case"stylesheet":u=fa(s.href);var p=t.querySelector(Ai(u));if(p)return o.state.loading|=4,o.instance=p,Vt(p),p;i=Zv(s),(u=Bn.get(u))&&fh(i,u),p=(t.ownerDocument||t).createElement("link"),Vt(p);var S=p;return S._p=new Promise(function(M,U){S.onload=M,S.onerror=U}),Kt(p,"link",i),o.state.loading|=4,yc(p,s.precedence,t),o.instance=p;case"script":return p=da(s.src),(u=t.querySelector(_i(p)))?(o.instance=u,Vt(u),u):(i=s,(u=Bn.get(p))&&(i=g({},s),dh(i,u)),t=t.ownerDocument||t,u=t.createElement("script"),Vt(u),Kt(u,"link",i),t.head.appendChild(u),o.instance=u);case"void":return null;default:throw Error(a(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(i=o.instance,o.state.loading|=4,yc(i,s.precedence,t));return o.instance}function yc(t,o,s){for(var i=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=i.length?i[i.length-1]:null,p=u,S=0;S<i.length;S++){var M=i[S];if(M.dataset.precedence===o)p=M;else if(p!==u)break}p?p.parentNode.insertBefore(t,p.nextSibling):(o=s.nodeType===9?s.head:s,o.insertBefore(t,o.firstChild))}function fh(t,o){t.crossOrigin==null&&(t.crossOrigin=o.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=o.referrerPolicy),t.title==null&&(t.title=o.title)}function dh(t,o){t.crossOrigin==null&&(t.crossOrigin=o.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=o.referrerPolicy),t.integrity==null&&(t.integrity=o.integrity)}var vc=null;function Jv(t,o,s){if(vc===null){var i=new Map,u=vc=new Map;u.set(s,i)}else u=vc,i=u.get(s),i||(i=new Map,u.set(s,i));if(i.has(t))return i;for(i.set(t,null),s=s.getElementsByTagName(t),u=0;u<s.length;u++){var p=s[u];if(!(p[Fa]||p[qt]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var S=p.getAttribute(o)||"";S=t+S;var M=i.get(S);M?M.push(p):i.set(S,[p])}}return i}function Wv(t,o,s){t=t.ownerDocument||t,t.head.insertBefore(s,o==="title"?t.querySelector("head > title"):null)}function NR(t,o,s){if(s===1||o.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(t=o.disabled,typeof o.precedence=="string"&&t==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function eb(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function zR(t,o,s,i){if(s.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var u=fa(i.href),p=o.querySelector(Ai(u));if(p){o=p._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(t.count++,t=bc.bind(t),o.then(t,t)),s.state.loading|=4,s.instance=p,Vt(p);return}p=o.ownerDocument||o,i=Zv(i),(u=Bn.get(u))&&fh(i,u),p=p.createElement("link"),Vt(p);var S=p;S._p=new Promise(function(M,U){S.onload=M,S.onerror=U}),Kt(p,"link",i),s.instance=p}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,o),(o=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=bc.bind(t),o.addEventListener("load",s),o.addEventListener("error",s))}}var hh=0;function LR(t,o){return t.stylesheets&&t.count===0&&xc(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var i=setTimeout(function(){if(t.stylesheets&&xc(t,t.stylesheets),t.unsuspend){var p=t.unsuspend;t.unsuspend=null,p()}},6e4+o);0<t.imgBytes&&hh===0&&(hh=62500*mR());var u=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&xc(t,t.stylesheets),t.unsuspend)){var p=t.unsuspend;t.unsuspend=null,p()}},(t.imgBytes>hh?50:800)+o);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(i),clearTimeout(u)}}:null}function bc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xc(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Sc=null;function xc(t,o){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Sc=new Map,o.forEach(jR,t),Sc=null,bc.call(t))}function jR(t,o){if(!(o.state.loading&4)){var s=Sc.get(t);if(s)var i=s.get(null);else{s=new Map,Sc.set(t,s);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<u.length;p++){var S=u[p];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(s.set(S.dataset.precedence,S),i=S)}i&&s.set(null,i)}u=o.instance,S=u.getAttribute("data-precedence"),p=s.get(S)||i,p===i&&s.set(null,u),s.set(S,u),this.count++,i=bc.bind(this),u.addEventListener("load",i),u.addEventListener("error",i),p?p.parentNode.insertBefore(u,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(u,t.firstChild)),o.state.loading|=4}}var Di={$$typeof:k,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function PR(t,o,s,i,u,p,S,M,U){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Va(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Va(0),this.hiddenUpdates=Va(null),this.identifierPrefix=i,this.onUncaughtError=u,this.onCaughtError=p,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function tb(t,o,s,i,u,p,S,M,U,K,oe,ie){return t=new PR(t,o,s,S,U,K,oe,ie,M),o=1,p===!0&&(o|=24),p=xn(3,null,null,o),t.current=p,p.stateNode=t,o=Ff(),o.refCount++,t.pooledCache=o,o.refCount++,p.memoizedState={element:i,isDehydrated:s,cache:o},Zf(p),t}function nb(t){return t?(t=Ys,t):Ys}function ob(t,o,s,i,u,p){u=nb(u),i.context===null?i.context=u:i.pendingContext=u,i=rr(o),i.payload={element:s},p=p===void 0?null:p,p!==null&&(i.callback=p),s=sr(t,i,o),s!==null&&(gn(s,t,o),ci(s,t,o))}function rb(t,o){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<o?s:o}}function ph(t,o){rb(t,o),(t=t.alternate)&&rb(t,o)}function sb(t){if(t.tag===13||t.tag===31){var o=Qr(t,67108864);o!==null&&gn(o,t,67108864),ph(t,67108864)}}function ab(t){if(t.tag===13||t.tag===31){var o=Cn();o=go(o);var s=Qr(t,o);s!==null&&gn(s,t,o),ph(t,o)}}var wc=!0;function IR(t,o,s,i){var u=I.T;I.T=null;var p=B.p;try{B.p=2,mh(t,o,s,i)}finally{B.p=p,I.T=u}}function UR(t,o,s,i){var u=I.T;I.T=null;var p=B.p;try{B.p=8,mh(t,o,s,i)}finally{B.p=p,I.T=u}}function mh(t,o,s,i){if(wc){var u=gh(i);if(u===null)th(t,o,i,Ec,s),lb(t,i);else if(HR(u,t,o,s,i))i.stopPropagation();else if(lb(t,i),o&4&&-1<BR.indexOf(t)){for(;u!==null;){var p=ks(u);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var S=cn(p.pendingLanes);if(S!==0){var M=p;for(M.pendingLanes|=2,M.entangledLanes|=2;S;){var U=1<<31-st(S);M.entanglements[1]|=U,S&=~U}no(p),(at&6)===0&&(sc=Ue()+500,Ti(0))}}break;case 31:case 13:M=Qr(p,2),M!==null&&gn(M,p,2),ic(),ph(p,2)}if(p=gh(i),p===null&&th(t,o,i,Ec,s),p===u)break;u=p}u!==null&&i.stopPropagation()}else th(t,o,i,null,s)}}function gh(t){return t=vf(t),yh(t)}var Ec=null;function yh(t){if(Ec=null,t=Ds(t),t!==null){var o=c(t);if(o===null)t=null;else{var s=o.tag;if(s===13){if(t=d(o),t!==null)return t;t=null}else if(s===31){if(t=f(o),t!==null)return t;t=null}else if(s===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;t=null}else o!==t&&(t=null)}}return Ec=t,null}function ib(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ot()){case He:return 2;case We:return 8;case Pe:case Rt:return 32;case $t:return 268435456;default:return 32}default:return 32}}var vh=!1,gr=null,yr=null,vr=null,ki=new Map,Ni=new Map,br=[],BR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function lb(t,o){switch(t){case"focusin":case"focusout":gr=null;break;case"dragenter":case"dragleave":yr=null;break;case"mouseover":case"mouseout":vr=null;break;case"pointerover":case"pointerout":ki.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ni.delete(o.pointerId)}}function zi(t,o,s,i,u,p){return t===null||t.nativeEvent!==p?(t={blockedOn:o,domEventName:s,eventSystemFlags:i,nativeEvent:p,targetContainers:[u]},o!==null&&(o=ks(o),o!==null&&sb(o)),t):(t.eventSystemFlags|=i,o=t.targetContainers,u!==null&&o.indexOf(u)===-1&&o.push(u),t)}function HR(t,o,s,i,u){switch(o){case"focusin":return gr=zi(gr,t,o,s,i,u),!0;case"dragenter":return yr=zi(yr,t,o,s,i,u),!0;case"mouseover":return vr=zi(vr,t,o,s,i,u),!0;case"pointerover":var p=u.pointerId;return ki.set(p,zi(ki.get(p)||null,t,o,s,i,u)),!0;case"gotpointercapture":return p=u.pointerId,Ni.set(p,zi(Ni.get(p)||null,t,o,s,i,u)),!0}return!1}function cb(t){var o=Ds(t.target);if(o!==null){var s=c(o);if(s!==null){if(o=s.tag,o===13){if(o=d(s),o!==null){t.blockedOn=o,gl(t.priority,function(){ab(s)});return}}else if(o===31){if(o=f(s),o!==null){t.blockedOn=o,gl(t.priority,function(){ab(s)});return}}else if(o===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Rc(t){if(t.blockedOn!==null)return!1;for(var o=t.targetContainers;0<o.length;){var s=gh(t.nativeEvent);if(s===null){s=t.nativeEvent;var i=new s.constructor(s.type,s);yf=i,s.target.dispatchEvent(i),yf=null}else return o=ks(s),o!==null&&sb(o),t.blockedOn=s,!1;o.shift()}return!0}function ub(t,o,s){Rc(t)&&s.delete(o)}function VR(){vh=!1,gr!==null&&Rc(gr)&&(gr=null),yr!==null&&Rc(yr)&&(yr=null),vr!==null&&Rc(vr)&&(vr=null),ki.forEach(ub),Ni.forEach(ub)}function Tc(t,o){t.blockedOn===o&&(t.blockedOn=null,vh||(vh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,VR)))}var Cc=null;function fb(t){Cc!==t&&(Cc=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Cc===t&&(Cc=null);for(var o=0;o<t.length;o+=3){var s=t[o],i=t[o+1],u=t[o+2];if(typeof i!="function"){if(yh(i||s)===null)continue;break}var p=ks(s);p!==null&&(t.splice(o,3),o-=3,gd(p,{pending:!0,data:u,method:s.method,action:i},i,u))}}))}function ha(t){function o(U){return Tc(U,t)}gr!==null&&Tc(gr,t),yr!==null&&Tc(yr,t),vr!==null&&Tc(vr,t),ki.forEach(o),Ni.forEach(o);for(var s=0;s<br.length;s++){var i=br[s];i.blockedOn===t&&(i.blockedOn=null)}for(;0<br.length&&(s=br[0],s.blockedOn===null);)cb(s),s.blockedOn===null&&br.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(i=0;i<s.length;i+=3){var u=s[i],p=s[i+1],S=u[un]||null;if(typeof p=="function")S||fb(s);else if(S){var M=null;if(p&&p.hasAttribute("formAction")){if(u=p,S=p[un]||null)M=S.formAction;else if(yh(u)!==null)continue}else M=S.action;typeof M=="function"?s[i+1]=M:(s.splice(i,3),i-=3),fb(s)}}}function db(){function t(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(S){return u=S})},focusReset:"manual",scroll:"manual"})}function o(){u!==null&&(u(),u=null),i||setTimeout(s,20)}function s(){if(!i&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,u=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(s,100),function(){i=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),u!==null&&(u(),u=null)}}}function bh(t){this._internalRoot=t}Mc.prototype.render=bh.prototype.render=function(t){var o=this._internalRoot;if(o===null)throw Error(a(409));var s=o.current,i=Cn();ob(s,i,t,o,null,null)},Mc.prototype.unmount=bh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var o=t.containerInfo;ob(t.current,2,null,t,null,null),ic(),o[_s]=null}};function Mc(t){this._internalRoot=t}Mc.prototype.unstable_scheduleHydration=function(t){if(t){var o=ml();t={blockedOn:null,target:t,priority:o};for(var s=0;s<br.length&&o!==0&&o<br[s].priority;s++);br.splice(s,0,t),s===0&&cb(t)}};var hb=n.version;if(hb!=="19.2.4")throw Error(a(527,hb,"19.2.4"));B.findDOMNode=function(t){var o=t._reactInternals;if(o===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=h(o),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var YR={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oc.isDisabled&&Oc.supportsFiber)try{Kn=Oc.inject(YR),Le=Oc}catch{}}return ji.createRoot=function(t,o){if(!l(t))throw Error(a(299));var s=!1,i="",u=Sy,p=xy,S=wy;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(i=o.identifierPrefix),o.onUncaughtError!==void 0&&(u=o.onUncaughtError),o.onCaughtError!==void 0&&(p=o.onCaughtError),o.onRecoverableError!==void 0&&(S=o.onRecoverableError)),o=tb(t,1,!1,null,null,s,i,null,u,p,S,db),t[_s]=o.current,eh(t),new bh(o)},ji.hydrateRoot=function(t,o,s){if(!l(t))throw Error(a(299));var i=!1,u="",p=Sy,S=xy,M=wy,U=null;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onUncaughtError!==void 0&&(p=s.onUncaughtError),s.onCaughtError!==void 0&&(S=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError),s.formState!==void 0&&(U=s.formState)),o=tb(t,1,!0,o,s??null,i,u,U,p,S,M,db),o.context=nb(null),s=o.current,i=Cn(),i=go(i),u=rr(i),u.callback=null,sr(s,u,i),s=i,o.current.lanes=s,qr(o,s),no(o),t[_s]=o.current,eh(t),new Mc(o)},ji.version="19.2.4",ji}var Eb;function WR(){if(Eb)return wh.exports;Eb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),wh.exports=JR(),wh.exports}var eT=WR(),bt=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(bt||{});function uS({update:e,notify:n,unwatched:r}){return{link:a,unlink:l,propagate:c,checkDirty:d,shallowPropagate:f};function a(h,y,g){const v=y.depsTail;if(v!==void 0&&v.dep===h)return;const b=v!==void 0?v.nextDep:y.deps;if(b!==void 0&&b.dep===h){b.version=g,y.depsTail=b;return}const x=h.subsTail;if(x!==void 0&&x.version===g&&x.sub===y)return;const w=y.depsTail=h.subsTail={version:g,dep:h,sub:y,prevDep:v,nextDep:b,prevSub:x,nextSub:void 0};b!==void 0&&(b.prevDep=w),v!==void 0?v.nextDep=w:y.deps=w,x!==void 0?x.nextSub=w:h.subs=w}function l(h,y=h.sub){const g=h.dep,v=h.prevDep,b=h.nextDep,x=h.nextSub,w=h.prevSub;return b!==void 0?b.prevDep=v:y.depsTail=v,v!==void 0?v.nextDep=b:y.deps=b,x!==void 0?x.prevSub=w:g.subsTail=w,w!==void 0?w.nextSub=x:(g.subs=x)===void 0&&r(g),b}function c(h){let y=h.nextSub,g;e:do{const v=h.sub;let b=v.flags;if(b&60?b&12?b&4?!(b&48)&&m(h,v)?(v.flags=b|40,b&=1):b=0:v.flags=b&-9|32:b=0:v.flags=b|32,b&2&&n(v),b&1){const x=v.subs;if(x!==void 0){const w=(h=x).nextSub;w!==void 0&&(g={value:y,prev:g},y=w);continue}}if((h=y)!==void 0){y=h.nextSub;continue}for(;g!==void 0;)if(h=g.value,g=g.prev,h!==void 0){y=h.nextSub;continue e}break}while(!0)}function d(h,y){let g,v=0,b=!1;e:do{const x=h.dep,w=x.flags;if(y.flags&16)b=!0;else if((w&17)===17){if(e(x)){const E=x.subs;E.nextSub!==void 0&&f(E),b=!0}}else if((w&33)===33){(h.nextSub!==void 0||h.prevSub!==void 0)&&(g={value:h,prev:g}),h=x.deps,y=x,++v;continue}if(!b){const E=h.nextDep;if(E!==void 0){h=E;continue}}for(;v--;){const E=y.subs,C=E.nextSub!==void 0;if(C?(h=g.value,g=g.prev):h=E,b){if(e(y)){C&&f(E),y=h.sub;continue}b=!1}else y.flags&=-33;y=h.sub;const A=h.nextDep;if(A!==void 0){h=A;continue e}}return b}while(!0)}function f(h){do{const y=h.sub,g=y.flags;(g&48)===32&&(y.flags=g|16,(g&6)===2&&n(y))}while((h=h.nextSub)!==void 0)}function m(h,y){let g=y.depsTail;for(;g!==void 0;){if(g===h)return!0;g=g.prevDep}return!1}}let Cp=0,ls=0,Yi=0;const Io=[],{link:V4,unlink:fS,propagate:Y4,checkDirty:tT,shallowPropagate:q4}=uS({update(e){return e.depsTail!==void 0?sT(e):aT(e)},notify(e){let n=Yi,r=n;do if(Io[n++]=e,e.flags&=-3,e=e.subs?.sub,e===void 0||!(e.flags&2))break;while(!0);for(Yi=n;r<--n;){const a=Io[r];Io[r++]=Io[n],Io[n]=a}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Du(e)):cT.call(e)}});function nT(){return Cp}function oT(){++Cp}function rT(){--Cp||lT()}function sT(e){e.depsTail=void 0,e.flags=5;try{const n=e.value;return n!==(e.value=e.getter(n))}finally{e.flags&=-5,Du(e)}}function aT(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function iT(e){const n=e.flags;if(n&16||n&32&&tT(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,Du(e)}}else e.flags=2}function lT(){try{for(;ls<Yi;){const e=Io[ls];Io[ls++]=void 0,iT(e)}}finally{for(;ls<Yi;){const e=Io[ls];Io[ls++]=void 0,e.flags|=10}ls=0,Yi=0}}function cT(){this.depsTail=void 0,this.flags=0,Du(this);const e=this.subs;e!==void 0&&fS(e)}function Du(e){const n=e.depsTail;let r=n!==void 0?n.nextDep:e.deps;for(;r!==void 0;)r=fS(r,e)}function Mp(e,n,r){const a=typeof e=="object",l=a?e:void 0;return{next:(a?e.next:e)?.bind(l),error:(a?e.error:n)?.bind(l),complete:(a?e.complete:r)?.bind(l)}}const ep=[];let Xc=0;const{link:Rb,unlink:uT,propagate:fT,checkDirty:dS,shallowPropagate:Tb}=uS({update(e){return e._update()},notify(e){ep[tp++]=e,e.flags&=~bt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=bt.Mutable|bt.Dirty,au(e))}});let Ac=0,tp=0,ro;function au(e){const n=e.depsTail;let r=n!==void 0?n.nextDep:e.deps;for(;r!==void 0;)r=uT(r,e)}function hS(){if(!(nT()>0)){for(;Ac<tp;){const e=ep[Ac];ep[Ac++]=void 0,e.notify()}Ac=0,tp=0}}function pS(e,n){const r=typeof e=="function",a=e,l={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?bt.None:bt.Mutable,get(){return ro!==void 0&&Rb(l,ro,Xc),l._snapshot},subscribe(c){const d=Mp(c),f={current:!1},m=dT(()=>{l.get(),f.current?d.next?.(l._snapshot):f.current=!0});return{unsubscribe:()=>{m.stop()}}},_update(c){const d=ro,f=Object.is;ro=l,++Xc,l.depsTail=void 0,r&&(l.flags=bt.Mutable|bt.RecursedCheck);try{const m=l._snapshot,h=typeof c=="function"?c(m):c===void 0&&r?a(m):c;return m===void 0||!f(m,h)?(l._snapshot=h,!0):!1}finally{ro=d,r&&(l.flags&=~bt.RecursedCheck),au(l)}}};return r?(l.flags=bt.Mutable|bt.Dirty,l.get=function(){const c=l.flags;if(c&bt.Dirty||c&bt.Pending&&dS(l.deps,l)){if(l._update()){const d=l.subs;d!==void 0&&Tb(d)}}else c&bt.Pending&&(l.flags=c&~bt.Pending);return ro!==void 0&&Rb(l,ro,Xc),l._snapshot}):l.set=function(c){if(l._update(c)){const d=l.subs;d!==void 0&&(fT(d),Tb(d),hS())}},l}function dT(e){const n=()=>{const a=ro;ro=r,++Xc,r.depsTail=void 0,r.flags=bt.Watching|bt.RecursedCheck;try{return e()}finally{ro=a,r.flags&=~bt.RecursedCheck,au(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:bt.Watching|bt.RecursedCheck,notify(){const a=this.flags;a&bt.Dirty||a&bt.Pending&&dS(this.deps,this)?n():this.flags=bt.Watching},stop(){this.flags=bt.None,this.depsTail=void 0,au(this)}};return n(),r}let zr=class{constructor(n){this.atom=pS(n)}setState(n){this.atom.set(n)}get state(){return this.atom.get()}get(){return this.state}subscribe(n){return this.atom.subscribe(Mp(n))}};class hT{constructor(n){this.atom=pS(n)}get state(){return this.atom.get()}get(){return this.state}subscribe(n){return this.atom.subscribe(Mp(n))}}function pT(e){return typeof e=="function"?new hT(e):new zr(e)}function mT(e){try{oT(),e()}finally{rT(),hS()}}const Or="__TSR_index",Cb="popstate",Mb="beforeunload";function gT(e){let n=e.getLocation();const r=new Set,a=d=>{n=e.getLocation(),r.forEach(f=>f({location:n,action:d}))},l=d=>{e.notifyOnIndexChange??!0?a(d):n=e.getLocation()},c=async({task:d,navigateOpts:f,...m})=>{if(f?.ignoreBlocker??!1){d();return}const y=e.getBlockers?.()??[],g=m.type==="PUSH"||m.type==="REPLACE";if(typeof document<"u"&&y.length&&g)for(const v of y){const b=iu(m.path,m.state);if(await v.blockerFn({currentLocation:n,nextLocation:b,action:m.type})){e.onBlocked?.();return}}d()};return{get location(){return n},get length(){return e.getLength()},subscribers:r,subscribe:d=>(r.add(d),()=>{r.delete(d)}),push:(d,f,m)=>{const h=n.state[Or];f=Ob(h+1,f),c({task:()=>{e.pushState(d,f),a({type:"PUSH"})},navigateOpts:m,type:"PUSH",path:d,state:f})},replace:(d,f,m)=>{const h=n.state[Or];f=Ob(h,f),c({task:()=>{e.replaceState(d,f),a({type:"REPLACE"})},navigateOpts:m,type:"REPLACE",path:d,state:f})},go:(d,f)=>{c({task:()=>{e.go(d),l({type:"GO",index:d})},navigateOpts:f,type:"GO"})},back:d=>{c({task:()=>{e.back(d?.ignoreBlocker??!1),l({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{c({task:()=>{e.forward(d?.ignoreBlocker??!1),l({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>n.state[Or]!==0,createHref:d=>e.createHref(d),block:d=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,d]),()=>{const m=e.getBlockers?.()??[];e.setBlockers?.(m.filter(h=>h!==d))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function Ob(e,n){n||(n={});const r=Op();return{...n,key:r,__TSR_key:r,[Or]:e}}function yT(e){const n=typeof document<"u"?window:void 0,r=n.history.pushState,a=n.history.replaceState;let l=[];const c=()=>l,d=z=>l=z,f=(z=>z),m=(()=>iu(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!n.history.state?.__TSR_key&&!n.history.state?.key){const z=Op();n.history.replaceState({[Or]:0,key:z,__TSR_key:z},"")}let h=m(),y,g=!1,v=!1,b=!1,x=!1;const w=()=>h;let E,C;const A=()=>{E&&(j._ignoreSubscribers=!0,(E.isPush?n.history.pushState:n.history.replaceState)(E.state,"",E.href),j._ignoreSubscribers=!1,E=void 0,C=void 0,y=void 0)},k=(z,q,Z)=>{const Q=f(q);C||(y=h),h=iu(q,Z),E={href:Q,state:Z,isPush:E?.isPush||z==="push"},C||(C=Promise.resolve().then(()=>A()))},O=z=>{h=m(),j.notify({type:z})},L=async()=>{if(v){v=!1;return}const z=m(),q=z.state[Or]-h.state[Or],Z=q===1,Q=q===-1,V=!Z&&!Q||g;g=!1;const J=V?"GO":Q?"BACK":"FORWARD",te=V?{type:"GO",index:q}:{type:Q?"BACK":"FORWARD"};if(b)b=!1;else{const re=c();if(typeof document<"u"&&re.length){for(const I of re)if(await I.blockerFn({currentLocation:h,nextLocation:z,action:J})){v=!0,n.history.go(1),j.notify(te);return}}}h=m(),j.notify(te)},N=z=>{if(x){x=!1;return}let q=!1;const Z=c();if(typeof document<"u"&&Z.length)for(const Q of Z){const V=Q.enableBeforeUnload??!0;if(V===!0){q=!0;break}if(typeof V=="function"&&V()===!0){q=!0;break}}if(q)return z.preventDefault(),z.returnValue=""},j=gT({getLocation:w,getLength:()=>n.history.length,pushState:(z,q)=>k("push",z,q),replaceState:(z,q)=>k("replace",z,q),back:z=>(z&&(b=!0),x=!0,n.history.back()),forward:z=>{z&&(b=!0),x=!0,n.history.forward()},go:z=>{g=!0,n.history.go(z)},createHref:z=>f(z),flush:A,destroy:()=>{n.history.pushState=r,n.history.replaceState=a,n.removeEventListener(Mb,N,{capture:!0}),n.removeEventListener(Cb,L)},onBlocked:()=>{y&&h!==y&&(h=y)},getBlockers:c,setBlockers:d,notifyOnIndexChange:!1});return n.addEventListener(Mb,N,{capture:!0}),n.addEventListener(Cb,L),n.history.pushState=function(...z){const q=r.apply(n.history,z);return j._ignoreSubscribers||O("PUSH"),q},n.history.replaceState=function(...z){const q=a.apply(n.history,z);return j._ignoreSubscribers||O("REPLACE"),q},j}function vT(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function iu(e,n){const r=vT(e),a=r.indexOf("#"),l=r.indexOf("?"),c=Op();return{href:r,pathname:r.substring(0,a>0?l>0?Math.min(a,l):a:l>0?l:r.length),hash:a>-1?r.substring(a):"",search:l>-1?r.slice(l,a===-1?void 0:a):"",state:n||{[Or]:0,key:c,__TSR_key:c}}}function Op(){return(Math.random()+1).toString(36).substring(7)}const bT=!1;function ba(e){let n;return mT(()=>{n=e()}),n}function Zi(e){return e[e.length-1]}function ST(e){return typeof e=="function"}function Tr(e,n){return ST(e)?e(n):e}const xT=Object.prototype.hasOwnProperty,Ab=Object.prototype.propertyIsEnumerable;function Mn(e,n,r=0){if(e===n)return e;if(r>500)return n;const a=n,l=kb(e)&&kb(a);if(!l&&!(lu(e)&&lu(a)))return a;const c=l?e:_b(e);if(!c)return a;const d=l?a:_b(a);if(!d)return a;const f=c.length,m=d.length,h=l?new Array(m):{};let y=0;for(let g=0;g<m;g++){const v=l?g:d[g],b=e[v],x=a[v];if(b===x){h[v]=b,(l?g<f:xT.call(e,v))&&y++;continue}if(b===null||x===null||typeof b!="object"||typeof x!="object"){h[v]=x;continue}const w=Mn(b,x,r+1);h[v]=w,w===b&&y++}return f===m&&y===f?e:h}function _b(e){const n=Object.getOwnPropertyNames(e);for(const l of n)if(!Ab.call(e,l))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return n;const a=n;for(const l of r){if(!Ab.call(e,l))return!1;a.push(l)}return a}function lu(e){if(!Db(e))return!1;const n=e.constructor;if(typeof n>"u")return!0;const r=n.prototype;return!(!Db(r)||!r.hasOwnProperty("isPrototypeOf"))}function Db(e){return Object.prototype.toString.call(e)==="[object Object]"}function kb(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ps(e,n,r){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let a=0,l=e.length;a<l;a++)if(!ps(e[a],n[a],r))return!1;return!0}if(lu(e)&&lu(n)){const a=r?.ignoreUndefined??!0;if(r?.partial){for(const d in n)if((!a||n[d]!==void 0)&&!ps(e[d],n[d],r))return!1;return!0}let l=0;if(!a)l=Object.keys(e).length;else for(const d in e)e[d]!==void 0&&l++;let c=0;for(const d in n)if((!a||n[d]!==void 0)&&(c++,c>l||!ps(e[d],n[d],r)))return!1;return l===c}return!1}function vs(e){let n,r;const a=new Promise((l,c)=>{n=l,r=c});return a.status="pending",a.resolve=l=>{a.status="resolved",a.value=l,n(l),e?.(l)},a.reject=l=>{a.status="rejected",r(l)},a}function wT(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Sa(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function ET(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Nb(e){let n;try{n=decodeURI(e)}catch{n=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return ET(n)}const RT=["http:","https:","mailto:","tel:"];function cu(e,n){if(!e)return!1;try{const r=new URL(e);return!n.has(r.protocol)}catch{return!1}}const TT={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},CT=/[&><\u2028\u2029]/g;function MT(e){return e.replace(CT,n=>TT[n])}function Pi(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const n=/%25|%5C/gi;let r=0,a="",l;for(;(l=n.exec(e))!==null;)a+=Nb(e.slice(r,l.index))+l[0],r=n.lastIndex;a=a+Nb(r?e.slice(r):e);let c=!1;return a.startsWith("//")&&(c=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:c}}function OT(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var AT="Invariant failed";function vn(e,n){if(!e)throw new Error(AT)}function uu(e){const n=new Map;let r,a;const l=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,a&&(a.next=c,c.prev=a)):(c.next.prev=void 0,r=c.next,c.next=void 0,a&&(c.prev=a,a.next=c)),a=c)};return{get(c){const d=n.get(c);if(d)return l(d),d.value},set(c,d){if(n.size>=e&&r){const m=r;n.delete(m.key),m.next&&(r=m.next,m.next.prev=void 0),m===a&&(a=void 0)}const f=n.get(c);if(f)f.value=d,l(f);else{const m={key:c,value:d,prev:a};a&&(a.next=m),a=m,r||(r=m),n.set(c,m)}},clear(){n.clear(),r=void 0,a=void 0}}}const Da=0,bs=1,Ss=2,$i=3,us=4,mS=5;function _T(e){const n=e.indexOf("{");if(n===-1)return null;const r=e.indexOf("}",n);return r===-1||n+1>=e.length?null:[n,r]}function Ap(e,n,r=new Uint16Array(6)){const a=e.indexOf("/",n),l=a===-1?e.length:a,c=e.substring(n,l);if(!c||!c.includes("$"))return r[0]=Da,r[1]=n,r[2]=n,r[3]=l,r[4]=l,r[5]=l,r;if(c==="$"){const f=e.length;return r[0]=Ss,r[1]=n,r[2]=n,r[3]=f,r[4]=f,r[5]=f,r}if(c.charCodeAt(0)===36)return r[0]=bs,r[1]=n,r[2]=n+1,r[3]=l,r[4]=l,r[5]=l,r;const d=_T(c);if(d){const[f,m]=d,h=c.charCodeAt(f+1);if(h===45){if(f+2<c.length&&c.charCodeAt(f+2)===36){const y=f+3,g=m;if(y<g)return r[0]=$i,r[1]=n+f,r[2]=n+y,r[3]=n+g,r[4]=n+m+1,r[5]=l,r}}else if(h===36){const y=f+1,g=f+2;return g===m?(r[0]=Ss,r[1]=n+f,r[2]=n+y,r[3]=n+g,r[4]=n+m+1,r[5]=e.length,r):(r[0]=bs,r[1]=n+f,r[2]=n+g,r[3]=n+m,r[4]=n+m+1,r[5]=l,r)}}return r[0]=Da,r[1]=n,r[2]=n,r[3]=l,r[4]=l,r[5]=l,r}function ku(e,n,r,a,l,c,d){d?.(r);let f=a;{const m=r.fullPath??r.from,h=m.length,y=r.options?.caseSensitive??e,g=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;f<h;){const b=Ap(m,f,n);let x;const w=f,E=b[5];switch(f=E+1,c++,b[0]){case Da:{const A=m.substring(b[2],b[3]);if(y){const k=l.static?.get(A);if(k)x=k;else{l.static??=new Map;const O=fs(r.fullPath??r.from);O.parent=l,O.depth=c,x=O,l.static.set(A,O)}}else{const k=A.toLowerCase(),O=l.staticInsensitive?.get(k);if(O)x=O;else{l.staticInsensitive??=new Map;const L=fs(r.fullPath??r.from);L.parent=l,L.depth=c,x=L,l.staticInsensitive.set(k,L)}}break}case bs:{const A=m.substring(w,b[1]),k=m.substring(b[4],E),O=y&&!!(A||k),L=A?O?A:A.toLowerCase():void 0,N=k?O?k:k.toLowerCase():void 0,j=!g&&l.dynamic?.find(z=>!z.skipOnParamError&&z.caseSensitive===O&&z.prefix===L&&z.suffix===N);if(j)x=j;else{const z=Mh(bs,r.fullPath??r.from,O,L,N);x=z,z.depth=c,z.parent=l,l.dynamic??=[],l.dynamic.push(z)}break}case $i:{const A=m.substring(w,b[1]),k=m.substring(b[4],E),O=y&&!!(A||k),L=A?O?A:A.toLowerCase():void 0,N=k?O?k:k.toLowerCase():void 0,j=!g&&l.optional?.find(z=>!z.skipOnParamError&&z.caseSensitive===O&&z.prefix===L&&z.suffix===N);if(j)x=j;else{const z=Mh($i,r.fullPath??r.from,O,L,N);x=z,z.parent=l,z.depth=c,l.optional??=[],l.optional.push(z)}break}case Ss:{const A=m.substring(w,b[1]),k=m.substring(b[4],E),O=y&&!!(A||k),L=A?O?A:A.toLowerCase():void 0,N=k?O?k:k.toLowerCase():void 0,j=Mh(Ss,r.fullPath??r.from,O,L,N);x=j,j.parent=l,j.depth=c,l.wildcard??=[],l.wildcard.push(j)}}l=x}if(g&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const b=fs(r.fullPath??r.from);b.kind=mS,b.parent=l,c++,b.depth=c,l.pathless??=[],l.pathless.push(b),l=b}const v=(r.path||!r.children)&&!r.isRoot;if(v&&m.endsWith("/")){const b=fs(r.fullPath??r.from);b.kind=us,b.parent=l,c++,b.depth=c,l.index=b,l=b}l.parse=r.options?.params?.parse??null,l.skipOnParamError=g,l.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,v&&!l.route&&(l.route=r,l.fullPath=r.fullPath??r.from)}if(r.children)for(const m of r.children)ku(e,n,m,f,l,c,d)}function Ch(e,n){if(e.skipOnParamError&&!n.skipOnParamError)return-1;if(!e.skipOnParamError&&n.skipOnParamError)return 1;if(e.skipOnParamError&&n.skipOnParamError&&(e.parsingPriority||n.parsingPriority))return n.parsingPriority-e.parsingPriority;if(e.prefix&&n.prefix&&e.prefix!==n.prefix){if(e.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(e.prefix))return 1}if(e.suffix&&n.suffix&&e.suffix!==n.suffix){if(e.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(e.suffix))return 1}return e.prefix&&!n.prefix?-1:!e.prefix&&n.prefix?1:e.suffix&&!n.suffix?-1:!e.suffix&&n.suffix?1:e.caseSensitive&&!n.caseSensitive?-1:!e.caseSensitive&&n.caseSensitive?1:0}function Er(e){if(e.pathless)for(const n of e.pathless)Er(n);if(e.static)for(const n of e.static.values())Er(n);if(e.staticInsensitive)for(const n of e.staticInsensitive.values())Er(n);if(e.dynamic?.length){e.dynamic.sort(Ch);for(const n of e.dynamic)Er(n)}if(e.optional?.length){e.optional.sort(Ch);for(const n of e.optional)Er(n)}if(e.wildcard?.length){e.wildcard.sort(Ch);for(const n of e.wildcard)Er(n)}}function fs(e){return{kind:Da,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Mh(e,n,r,a,l){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:a,suffix:l}}function DT(e,n){const r=fs("/"),a=new Uint16Array(6);for(const l of e)ku(!1,a,l,1,r,0);Er(r),n.masksTree=r,n.flatCache=uu(1e3)}function kT(e,n){e||="/";const r=n.flatCache.get(e);if(r)return r;const a=_p(e,n.masksTree);return n.flatCache.set(e,a),a}function NT(e,n,r,a,l){e||="/",a||="/";const c=n?`case\0${e}`:e;let d=l.singleCache.get(c);if(!d){d=fs("/");const f=new Uint16Array(6);ku(n,f,{from:e},1,d,0),l.singleCache.set(c,d)}return _p(a,d,r)}function zT(e,n,r=!1){const a=r?e:`nofuzz\0${e}`,l=n.matchCache.get(a);if(l!==void 0)return l;e||="/";let c;try{c=_p(e,n.segmentTree,r)}catch(d){if(d instanceof URIError)c=null;else throw d}return c&&(c.branch=PT(c.route)),n.matchCache.set(a,c),c}function LT(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function jT(e,n=!1,r){const a=fs(e.fullPath),l=new Uint16Array(6),c={},d={};let f=0;return ku(n,l,e,1,a,0,h=>{if(r?.(h,f),vn(!(h.id in c),`Duplicate routes found with id: ${String(h.id)}`),c[h.id]=h,f!==0&&h.path){const y=LT(h.fullPath);(!d[y]||h.fullPath.endsWith("/"))&&(d[y]=h)}f++}),Er(a),{processedTree:{segmentTree:a,singleCache:uu(1e3),matchCache:uu(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:d}}function _p(e,n,r=!1){const a=e.split("/"),l=UT(e,a,n,r);if(!l)return null;const[c]=gS(e,a,l);return{route:l.node.route,rawParams:c,parsedParams:l.parsedParams}}function gS(e,n,r){const a=IT(r.node);let l=null;const c={};let d=r.extract?.part??0,f=r.extract?.node??0,m=r.extract?.path??0,h=r.extract?.segment??0;for(;f<a.length;d++,f++,m++,h++){const y=a[f];if(y.kind===us)break;if(y.kind===mS){h--,d--,m--;continue}const g=n[d],v=m;if(g&&(m+=g.length),y.kind===bs){l??=r.node.fullPath.split("/");const b=l[h],x=y.prefix?.length??0;if(b.charCodeAt(x)===123){const E=y.suffix?.length??0,C=b.substring(x+2,b.length-E-1),A=g.substring(x,g.length-E);c[C]=decodeURIComponent(A)}else{const E=b.substring(1);c[E]=decodeURIComponent(g)}}else if(y.kind===$i){if(r.skipped&1<<f){d--,m=v-1;continue}l??=r.node.fullPath.split("/");const b=l[h],x=y.prefix?.length??0,w=y.suffix?.length??0,E=b.substring(x+3,b.length-w-1),C=y.suffix||y.prefix?g.substring(x,g.length-w):g;C&&(c[E]=decodeURIComponent(C))}else if(y.kind===Ss){const b=y,x=e.substring(v+(b.prefix?.length??0),e.length-(b.suffix?.length??0)),w=decodeURIComponent(x);c["*"]=w,c._splat=w;break}}return r.rawParams&&Object.assign(c,r.rawParams),[c,{part:d,node:f,path:m,segment:h}]}function PT(e){const n=[e];for(;e.parentRoute;)e=e.parentRoute,n.push(e);return n.reverse(),n}function IT(e){const n=Array(e.depth+1);do n[e.depth]=e,e=e.parent;while(e);return n}function UT(e,n,r,a){if(e==="/"&&r.index)return{node:r.index,skipped:0};const l=!Zi(n),c=l&&e!=="/",d=n.length-(l?1:0),f=[{node:r,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let m=null,h=null,y=null;for(;f.length;){const g=f.pop(),{node:v,index:b,skipped:x,depth:w,statics:E,dynamics:C,optionals:A}=g;let{extract:k,rawParams:O,parsedParams:L}=g;if(v.skipOnParamError){if(!Oh(e,n,g))continue;O=g.rawParams,k=g.extract,L=g.parsedParams}a&&v.route&&v.kind!==us&&Ii(h,g)&&(h=g);const N=b===d;if(N&&(v.route&&!c&&Ii(y,g)&&(y=g),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const j=N?void 0:n[b];let z;if(N&&v.index){const q={node:v.index,index:b,skipped:x,depth:w+1,statics:E,dynamics:C,optionals:A,extract:k,rawParams:O,parsedParams:L};let Z=!0;if(v.index.skipOnParamError&&(Oh(e,n,q)||(Z=!1)),Z){if(E===d&&!C&&!A&&!x)return q;Ii(y,q)&&(y=q)}}if(v.wildcard&&Ii(m,g))for(const q of v.wildcard){const{prefix:Z,suffix:Q}=q;if(Z&&(N||!(q.caseSensitive?j:z??=j.toLowerCase()).startsWith(Z)))continue;if(Q){if(N)continue;const J=n.slice(b).join("/").slice(-Q.length);if((q.caseSensitive?J:J.toLowerCase())!==Q)continue}const V={node:q,index:d,skipped:x,depth:w,statics:E,dynamics:C,optionals:A,extract:k,rawParams:O,parsedParams:L};if(!(q.skipOnParamError&&!Oh(e,n,V))){m=V;break}}if(v.optional){const q=x|1<<w,Z=w+1;for(let Q=v.optional.length-1;Q>=0;Q--){const V=v.optional[Q];f.push({node:V,index:b,skipped:q,depth:Z,statics:E,dynamics:C,optionals:A,extract:k,rawParams:O,parsedParams:L})}if(!N)for(let Q=v.optional.length-1;Q>=0;Q--){const V=v.optional[Q],{prefix:J,suffix:te}=V;if(J||te){const re=V.caseSensitive?j:z??=j.toLowerCase();if(J&&!re.startsWith(J)||te&&!re.endsWith(te))continue}f.push({node:V,index:b+1,skipped:x,depth:Z,statics:E,dynamics:C,optionals:A+1,extract:k,rawParams:O,parsedParams:L})}}if(!N&&v.dynamic&&j)for(let q=v.dynamic.length-1;q>=0;q--){const Z=v.dynamic[q],{prefix:Q,suffix:V}=Z;if(Q||V){const J=Z.caseSensitive?j:z??=j.toLowerCase();if(Q&&!J.startsWith(Q)||V&&!J.endsWith(V))continue}f.push({node:Z,index:b+1,skipped:x,depth:w+1,statics:E,dynamics:C+1,optionals:A,extract:k,rawParams:O,parsedParams:L})}if(!N&&v.staticInsensitive){const q=v.staticInsensitive.get(z??=j.toLowerCase());q&&f.push({node:q,index:b+1,skipped:x,depth:w+1,statics:E+1,dynamics:C,optionals:A,extract:k,rawParams:O,parsedParams:L})}if(!N&&v.static){const q=v.static.get(j);q&&f.push({node:q,index:b+1,skipped:x,depth:w+1,statics:E+1,dynamics:C,optionals:A,extract:k,rawParams:O,parsedParams:L})}if(v.pathless){const q=w+1;for(let Z=v.pathless.length-1;Z>=0;Z--){const Q=v.pathless[Z];f.push({node:Q,index:b,skipped:x,depth:q,statics:E,dynamics:C,optionals:A,extract:k,rawParams:O,parsedParams:L})}}}if(y&&m)return Ii(m,y)?y:m;if(y)return y;if(m)return m;if(a&&h){let g=h.index;for(let b=0;b<h.index;b++)g+=n[b].length;const v=g===e.length?"/":e.slice(g);return h.rawParams??={},h.rawParams["**"]=decodeURIComponent(v),h}return null}function Oh(e,n,r){try{const[a,l]=gS(e,n,r);r.rawParams=a,r.extract=l;const c=r.node.parse(a);return r.parsedParams=Object.assign({},r.parsedParams,c),!0}catch{return null}}function Ii(e,n){return e?n.statics>e.statics||n.statics===e.statics&&(n.dynamics>e.dynamics||n.dynamics===e.dynamics&&(n.optionals>e.optionals||n.optionals===e.optionals&&((n.node.kind===us)>(e.node.kind===us)||n.node.kind===us==(e.node.kind===us)&&n.depth>e.depth))):!0}function Kc(e){return Dp(e.filter(n=>n!==void 0).join("/"))}function Dp(e){return e.replace(/\/{2,}/g,"/")}function yS(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ar(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function vS(e){return Ar(yS(e))}function fu(e,n){return e?.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function BT(e,n,r){return fu(e,r)===fu(n,r)}function HT({base:e,to:n,trailingSlash:r="never",cache:a}){const l=n.startsWith("/"),c=!l&&n===".";let d;if(a){d=l?n:c?e:e+"\0"+n;const g=a.get(d);if(g)return g}let f;if(c)f=e.split("/");else if(l)f=n.split("/");else{for(f=e.split("/");f.length>1&&Zi(f)==="";)f.pop();const g=n.split("/");for(let v=0,b=g.length;v<b;v++){const x=g[v];x===""?v?v===b-1&&f.push(x):f=[x]:x===".."?f.pop():x==="."||f.push(x)}}f.length>1&&(Zi(f)===""?r==="never"&&f.pop():r==="always"&&f.push(""));let m,h="";for(let g=0;g<f.length;g++){g>0&&(h+="/");const v=f[g];if(!v)continue;m=Ap(v,0,m);const b=m[0];if(b===Da){h+=v;continue}const x=m[5],w=v.substring(0,m[1]),E=v.substring(m[4],x),C=v.substring(m[2],m[3]);b===bs?h+=w||E?`${w}{$${C}}${E}`:`$${C}`:b===Ss?h+=w||E?`${w}{$}${E}`:"$":h+=`${w}{-$${C}}${E}`}h=Dp(h);const y=h||"/";return d&&a&&a.set(d,y),y}function VT(e){const n=new Map(e.map(l=>[encodeURIComponent(l),l])),r=Array.from(n.keys()).map(l=>l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(r,"g");return l=>l.replace(a,c=>n.get(c)??c)}function Ah(e,n,r){const a=n[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(l=>Lb(l,r)).join("/"):Lb(a,r)}function zb({path:e,params:n,decoder:r,...a}){let l=!1;const c={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:c,isMissingParams:l};if(!e.includes("$"))return{interpolatedPath:e,usedParams:c,isMissingParams:l};const d=e.length;let f=0,m,h="";for(;f<d;){const g=f;m=Ap(e,g,m);const v=m[5];if(f=v+1,g===v)continue;const b=m[0];if(b===Da){h+="/"+e.substring(g,v);continue}if(b===Ss){const x=n._splat;c._splat=x,c["*"]=x;const w=e.substring(g,m[1]),E=e.substring(m[4],v);if(!x){l=!0,(w||E)&&(h+="/"+w+E);continue}const C=Ah("_splat",n,r);h+="/"+w+C+E;continue}if(b===bs){const x=e.substring(m[2],m[3]);!l&&!(x in n)&&(l=!0),c[x]=n[x];const w=e.substring(g,m[1]),E=e.substring(m[4],v),C=Ah(x,n,r)??"undefined";h+="/"+w+C+E;continue}if(b===$i){const x=e.substring(m[2],m[3]),w=n[x];if(w==null)continue;c[x]=w;const E=e.substring(g,m[1]),C=e.substring(m[4],v),A=Ah(x,n,r)??"";h+="/"+E+A+C;continue}}return e.endsWith("/")&&(h+="/"),{usedParams:c,interpolatedPath:h||"/",isMissingParams:l}}function Lb(e,n){const r=encodeURIComponent(e);return n?.(r)??r}function ln(e){return!!e?.isNotFound}function YT(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const np="tsr-scroll-restoration-v1_3",qT=(e,n)=>{let r;return(...a)=>{r||(r=setTimeout(()=>{e(...a),r=null},n))}};function GT(){const e=YT();if(!e)return null;const n=e.getItem(np);let r=n?JSON.parse(n):{};return{state:r,set:a=>{r=Tr(a,r)||r;try{e.setItem(np,JSON.stringify(r))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const _c=GT(),FT=e=>e.state.__TSR_key||e.href;function XT(e){const n=[];let r;for(;r=e.parentNode;)n.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${n.reverse().join(" > ")}`.toLowerCase()}let du=!1;function KT({storageKey:e,key:n,behavior:r,shouldScrollRestoration:a,scrollToTopSelectors:l,location:c}){let d;try{d=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const f=n||window.history.state?.__TSR_key,m=d[f];du=!0;e:{if(a&&m&&Object.keys(m).length>0){for(const g in m){const v=m[g];if(g==="window")window.scrollTo({top:v.scrollY,left:v.scrollX,behavior:r});else if(g){const b=document.querySelector(g);b&&(b.scrollLeft=v.scrollX,b.scrollTop=v.scrollY)}}break e}const h=(c??window.location).hash.split("#",2)[1];if(h){const g=window.history.state?.__hashScrollIntoViewOptions??!0;if(g){const v=document.getElementById(h);v&&v.scrollIntoView(g)}break e}const y={top:0,left:0,behavior:r};if(window.scrollTo(y),l)for(const g of l){if(g==="window")continue;const v=typeof g=="function"?g():document.querySelector(g);v&&v.scrollTo(y)}}du=!1}function QT(e,n){if(!_c||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!_c))return;e.isScrollRestorationSetup=!0,du=!1;const a=e.options.getScrollRestorationKey||FT;window.history.scrollRestoration="manual";const l=c=>{if(du||!e.isScrollRestoring)return;let d="";if(c.target===document||c.target===window)d="window";else{const m=c.target.getAttribute("data-scroll-restoration-id");m?d=`[data-scroll-restoration-id="${m}"]`:d=XT(c.target)}const f=a(e.state.location);_c.set(m=>{const h=m[f]||={},y=h[d]||={};if(d==="window")y.scrollX=window.scrollX||0,y.scrollY=window.scrollY||0;else if(d){const g=document.querySelector(d);g&&(y.scrollX=g.scrollLeft||0,y.scrollY=g.scrollTop||0)}return m})};typeof document<"u"&&document.addEventListener("scroll",qT(l,100),!0),e.subscribe("onRendered",c=>{const d=a(c.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(KT({storageKey:np,key:d,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&_c.set(f=>(f[d]||={},f)))})}function ZT(e){if(typeof document<"u"&&document.querySelector){const n=e.state.location.state.__hashScrollIntoViewOptions??!0;if(n&&e.state.location.hash!==""){const r=document.getElementById(e.state.location.hash);r&&r.scrollIntoView(n)}}}function bS(e,n=String){const r=new URLSearchParams;for(const a in e){const l=e[a];l!==void 0&&r.set(a,n(l))}return r.toString()}function _h(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function $T(e){const n=new URLSearchParams(e),r={};for(const[a,l]of n.entries()){const c=r[a];c==null?r[a]=_h(l):Array.isArray(c)?c.push(_h(l)):r[a]=[c,_h(l)]}return r}const JT=eC(JSON.parse),WT=tC(JSON.stringify,JSON.parse);function eC(e){return n=>{n[0]==="?"&&(n=n.substring(1));const r=$T(n);for(const a in r){const l=r[a];if(typeof l=="string")try{r[a]=e(l)}catch{}}return r}}function tC(e,n){const r=typeof n=="function";function a(l){if(typeof l=="object"&&l!==null)try{return e(l)}catch{}else if(r&&typeof l=="string")try{return n(l),e(l)}catch{}return l}return l=>{const c=bS(l,a);return c?`?${c}`:""}}const Hn="__root__";function SS(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const n=new Headers(e.headers);e.href&&n.get("Location")===null&&n.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:n});if(r.options=e,e.throw)throw r;return r}function Yn(e){return e instanceof Response&&!!e.options}function nC(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return SS(e)}const Qc=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Nu=(e,n)=>!!(e.preload&&!e.router.state.matches.some(r=>r.id===n)),xa=(e,n,r=!0)=>{const a={...e.router.options.context??{}},l=r?n:n-1;for(let c=0;c<=l;c++){const d=e.matches[c];if(!d)continue;const f=e.router.getMatch(d.id);f&&Object.assign(a,f.__routeContext,f.__beforeLoadContext)}return a},xS=(e,n,r)=>{const a=e.router.routesById[n.routeId??""]??e.router.routeTree;!a.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(a.options.notFoundComponent=e.router.options.defaultNotFoundComponent);const l=r==="BEFORE_LOAD"&&a.parentRoute;l||vn(a.options.notFoundComponent);const c=e.matches.find(d=>d.routeId===a.id);vn(c,"Could not find match for route: "+a.id),e.updateMatch(c.id,d=>({...d,status:"notFound",error:n,isFetching:!1})),l&&(n.routeId=a.parentRoute.id,xS(e,n,r))},Cr=(e,n,r,a)=>{if(!(!Yn(r)&&!ln(r))){if(Yn(r)&&r.redirectHandled&&!r.options.reloadDocument)throw r;if(n){n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.loaderPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,n._nonReactive.loaderPromise=void 0;const l=Yn(r)?"redirected":"notFound";n._nonReactive.error=r,e.updateMatch(n.id,c=>({...c,status:l,context:xa(e,n.index),isFetching:!1,error:r})),ln(r)&&!r.routeId&&(r.routeId=n.routeId),n._nonReactive.loadPromise?.resolve()}throw Yn(r)?(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r),r):(xS(e,r,a),r)}},wS=(e,n)=>!!e.router.getMatch(n)._nonReactive.dehydrated,Ui=(e,n,r,a)=>{const{id:l,routeId:c}=e.matches[n],d=e.router.looseRoutesById[c];if(r instanceof Promise)throw r;r.routerCode=a,e.firstBadMatchIndex??=n,Cr(e,e.router.getMatch(l),r,a);try{d.options.onError?.(r)}catch(f){r=f,Cr(e,e.router.getMatch(l),r,a)}e.updateMatch(l,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},ES=(e,n,r,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const l=r.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Nu(e,n)&&(r.options.loader||r.options.beforeLoad||CS(r))&&typeof l=="number"&&l!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent))){const d=setTimeout(()=>{Qc(e)},l);a._nonReactive.pendingTimeout=d}},oC=(e,n,r)=>{const a=e.router.getMatch(n);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;ES(e,n,r,a);const l=()=>{const c=e.router.getMatch(n);c.preload&&(c.status==="redirected"||c.status==="notFound")&&Cr(e,c,c.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(l):l()},rC=(e,n,r,a)=>{const l=e.router.getMatch(n),c=l._nonReactive.loadPromise;l._nonReactive.loadPromise=vs(()=>{c?.resolve()});const{paramsError:d,searchError:f}=l;d&&Ui(e,r,d,"PARSE_PARAMS"),f&&Ui(e,r,f,"VALIDATE_SEARCH"),ES(e,n,a,l);const m=new AbortController;let h=!1;const y=()=>{h||(h=!0,e.updateMatch(n,O=>({...O,isFetching:"beforeLoad",fetchCount:O.fetchCount+1,abortController:m})))},g=()=>{l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,e.updateMatch(n,O=>({...O,isFetching:!1}))};if(!a.options.beforeLoad){ba(()=>{y(),g()});return}l._nonReactive.beforeLoadPromise=vs();const v={...xa(e,r,!1),...l.__routeContext},{search:b,params:x,cause:w}=l,E=Nu(e,n),C={search:b,abortController:m,params:x,preload:E,context:v,location:e.location,navigate:O=>e.router.navigate({...O,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":w,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},A=O=>{if(O===void 0){ba(()=>{y(),g()});return}(Yn(O)||ln(O))&&(y(),Ui(e,r,O,"BEFORE_LOAD")),ba(()=>{y(),e.updateMatch(n,L=>({...L,__beforeLoadContext:O})),g()})};let k;try{if(k=a.options.beforeLoad(C),Sa(k))return y(),k.catch(O=>{Ui(e,r,O,"BEFORE_LOAD")}).then(A)}catch(O){y(),Ui(e,r,O,"BEFORE_LOAD")}A(k)},sC=(e,n)=>{const{id:r,routeId:a}=e.matches[n],l=e.router.looseRoutesById[a],c=()=>f(),d=()=>rC(e,r,n,l),f=()=>{if(wS(e,r))return;const m=oC(e,r,l);return Sa(m)?m.then(d):d()};return c()},aC=(e,n,r)=>{const a=e.router.getMatch(n);if(!a||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const l={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([r.options.head?.(l),r.options.scripts?.(l),r.options.headers?.(l)]).then(([c,d,f])=>{const m=c?.meta,h=c?.links,y=c?.scripts,g=c?.styles;return{meta:m,links:h,headScripts:y,headers:f,scripts:d,styles:g}})},RS=(e,n,r,a)=>{const l=e.matchPromises[r-1],{params:c,loaderDeps:d,abortController:f,cause:m}=e.router.getMatch(n),h=xa(e,r),y=Nu(e,n);return{params:c,deps:d,preload:!!y,parentMatchPromise:l,abortController:f,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:y?"preload":m,route:a,...e.router.options.additionalContext}},jb=async(e,n,r,a)=>{try{const l=e.router.getMatch(n);try{(!(bT??e.router.isServer)||l.ssr===!0)&&TS(a);const c=a.options.loader?.(RS(e,n,r,a)),d=a.options.loader&&Sa(c);if((d||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||l._nonReactive.minPendingPromise)&&e.updateMatch(n,h=>({...h,isFetching:"loader"})),a.options.loader){const h=d?await c:c;Cr(e,e.router.getMatch(n),h),h!==void 0&&e.updateMatch(n,y=>({...y,loaderData:h}))}a._lazyPromise&&await a._lazyPromise;const m=l._nonReactive.minPendingPromise;m&&await m,a._componentsPromise&&await a._componentsPromise,e.updateMatch(n,h=>({...h,error:void 0,context:xa(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let d=c;if(d?.name==="AbortError"){if(l.abortController.signal.aborted){l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:xa(e,r)}));return}const f=l._nonReactive.minPendingPromise;f&&await f,ln(c)&&await a.options.notFoundComponent?.preload?.(),Cr(e,e.router.getMatch(n),c);try{a.options.onError?.(c)}catch(m){d=m,Cr(e,e.router.getMatch(n),m)}e.updateMatch(n,m=>({...m,error:d,context:xa(e,r),status:"error",isFetching:!1}))}}catch(l){const c=e.router.getMatch(n);c&&(c._nonReactive.loaderPromise=void 0),Cr(e,c,l)}},iC=async(e,n)=>{async function r(y,g,v,b){const x=Date.now()-g.updatedAt,w=y?b.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:b.options.staleTime??e.router.options.defaultStaleTime??0,E=b.options.shouldReload,C=typeof E=="function"?E(RS(e,a,n,b)):E,{status:A,invalid:k}=v;c=A==="success"&&(k||(C??x>w)),y&&b.options.preload===!1||(c&&!e.sync?(d=!0,(async()=>{try{await jb(e,a,n,b);const O=e.router.getMatch(a);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){Yn(O)&&await e.router.navigate(O.options)}})()):(A!=="success"||c&&e.sync)&&await jb(e,a,n,b))}const{id:a,routeId:l}=e.matches[n];let c=!1,d=!1;const f=e.router.looseRoutesById[l];if(!wS(e,a)){const y=e.router.getMatch(a),g=Nu(e,a);if(y._nonReactive.loaderPromise){if(y.status==="success"&&!e.sync&&!y.preload)return y;await y._nonReactive.loaderPromise;const v=e.router.getMatch(a),b=v._nonReactive.error||v.error;b&&Cr(e,v,b),v.status==="pending"&&await r(g,y,v,f)}else{const v=g&&!e.router.state.matches.some(x=>x.id===a),b=e.router.getMatch(a);b._nonReactive.loaderPromise=vs(),v!==b.preload&&e.updateMatch(a,x=>({...x,preload:v})),await r(g,y,b,f)}}const m=e.router.getMatch(a);d||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve()),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,d||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const h=d?m.isFetching:!1;return h!==m.isFetching||m.invalid!==!1?(e.updateMatch(a,y=>({...y,isFetching:h,invalid:!1})),e.router.getMatch(a)):m};async function Pb(e){const n=Object.assign(e,{matchPromises:[]});n.router.state.matches.some(r=>r._forcePending)&&Qc(n);try{for(let f=0;f<n.matches.length;f++){const m=sC(n,f);Sa(m)&&await m}const r=n.firstBadMatchIndex??n.matches.length;for(let f=0;f<r;f++)n.matchPromises.push(iC(n,f));const l=(await Promise.allSettled(n.matchPromises)).filter(f=>f.status==="rejected").map(f=>f.reason);let c;for(const f of l){if(Yn(f))throw f;!c&&ln(f)&&(c=f)}for(const f of n.matches){const{id:m,routeId:h}=f,y=n.router.looseRoutesById[h];try{const g=aC(n,m,y);if(g){const v=await g;n.updateMatch(m,b=>({...b,...v}))}}catch(g){console.error(`Error executing head for route ${h}:`,g)}}if(c)throw c;const d=Qc(n);Sa(d)&&await d}catch(r){if(ln(r)&&!n.preload){const a=Qc(n);throw Sa(a)&&await a,r}if(Yn(r))throw r}return n.matches}async function TS(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(n=>{const{id:r,...a}=n.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const n=()=>{const r=[];for(const a of MS){const l=e.options[a]?.preload;l&&r.push(l())}if(r.length)return Promise.all(r).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(n):n()}return e._componentsPromise}function CS(e){for(const n of MS)if(e.options[n]?.preload)return!0;return!1}const MS=["component","errorComponent","pendingComponent","notFoundComponent"];function lC(e){return{input:({url:n})=>{for(const r of e)n=op(r,n);return n},output:({url:n})=>{for(let r=e.length-1;r>=0;r--)n=OS(e[r],n);return n}}}function cC(e){const n=vS(e.basepath),r=`/${n}`,a=`${r}/`,l=e.caseSensitive?r:r.toLowerCase(),c=e.caseSensitive?a:a.toLowerCase();return{input:({url:d})=>{const f=e.caseSensitive?d.pathname:d.pathname.toLowerCase();return f===l?d.pathname="/":f.startsWith(c)&&(d.pathname=d.pathname.slice(r.length)),d},output:({url:d})=>(d.pathname=Kc(["/",n,d.pathname]),d)}}function op(e,n){const r=e?.input?.({url:n});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return n}function OS(e,n){const r=e?.output?.({url:n});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return n}function uC(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function ms(e){const n=e.resolvedLocation,r=e.location,a=n?.pathname!==r.pathname,l=n?.href!==r.href,c=n?.hash!==r.hash;return{fromLocation:n,toLocation:r,pathChanged:a,hrefChanged:l,hashChanged:c}}function fC(e){const n=e.filter(r=>r.status!=="redirected");return n.length===e.length?e:n}class dC{constructor(n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=r=>r(),this.update=r=>{const a=this.options,l=this.basepath??a?.basepath??"/",c=this.basepath===void 0,d=a?.rewrite;if(this.options={...a,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=VT(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=yT()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let v;this.resolvePathCache=uu(1e3),v=this.buildRouteTree(),this.setRoutes(v)}!this.__store&&this.latestLocation&&(this.__store=pT(pC(this.latestLocation)),QT(this));let f=!1;const m=this.options.basepath??"/",h=this.options.rewrite;if(c||l!==m||d!==h){this.basepath=m;const v=[],b=vS(m);b&&b!=="/"&&v.push(cC({basepath:m})),h&&v.push(h),this.rewrite=v.length===0?void 0:v.length===1?v[0]:lC(v),this.history&&this.updateLatestLocation(),f=!0}f&&this.__store&&this.__store.setState(v=>({...v,location:this.latestLocation})),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=jT(this.routeTree,this.options.caseSensitive,(a,l)=>{a.init({originalIndex:l})});return this.options.routeMasks&&DT(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,a)=>{const l={eventType:r,fn:a};return this.subscribers.add(l),()=>{this.subscribers.delete(l)}},this.emit=r=>{this.subscribers.forEach(a=>{a.eventType===r.type&&a.fn(r)})},this.parseLocation=(r,a)=>{const l=({pathname:m,search:h,hash:y,href:g,state:v})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(m)){const A=this.options.parseSearch(h),k=this.options.stringifySearch(A);return{href:m+k+y,publicHref:g,pathname:Pi(m).path,external:!1,searchStr:k,search:Mn(a?.search,A),hash:Pi(y.slice(1)).path,state:Mn(a?.state,v)}}const b=new URL(g,this.origin),x=op(this.rewrite,b),w=this.options.parseSearch(x.search),E=this.options.stringifySearch(w);return x.search=E,{href:x.href.replace(x.origin,""),publicHref:g,pathname:Pi(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:E,search:Mn(a?.search,w),hash:Pi(x.hash.slice(1)).path,state:Mn(a?.state,v)}},c=l(r),{__tempLocation:d,__tempKey:f}=c.state;if(d&&(!f||f===this.tempLocationKey)){const m=l(d);return m.state.key=c.state.key,m.state.__TSR_key=c.state.__TSR_key,delete m.state.__tempLocation,{...m,maskedLocation:c}}return c},this.resolvePathWithBase=(r,a)=>HT({base:r,to:Dp(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,a,l)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:a},l):this.matchRoutesInternal(r,a),this.getMatchedRoutes=r=>mC({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const a=this.getMatch(r);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const r=this.state.matches.filter(c=>c.status==="pending"),a=this.state.matches.filter(c=>c.isFetching==="loader");new Set([...this.state.pendingMatches??[],...r,...a]).forEach(c=>{this.cancelMatch(c.id)})},this.buildLocation=r=>{const a=(c={})=>{const d=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(d);c.from;const m=c.unsafeRelative==="path"?d.pathname:c.from??f.fullPath,h=this.resolvePathWithBase(m,"."),y=f.search,g={...f.params},v=c.to?this.resolvePathWithBase(h,`${c.to}`):this.resolvePathWithBase(h,"."),b=c.params===!1||c.params===null?{}:(c.params??!0)===!0?g:Object.assign(g,Tr(c.params,g)),x=this.getMatchedRoutes(v);let w=x.matchedRoutes;if((!x.foundRoute||x.foundRoute.path!=="/"&&x.routeParams["**"])&&this.options.notFoundRoute&&(w=[...w,this.options.notFoundRoute]),Object.keys(b).length>0)for(const Q of w){const V=Q.options.params?.stringify??Q.options.stringifyParams;if(V)try{Object.assign(b,V(b))}catch{}}const C=r.leaveParams?v:Pi(zb({path:v,params:b,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=y;if(r._includeValidateSearch&&this.options.search?.strict){const Q={};w.forEach(V=>{if(V.options.validateSearch)try{Object.assign(Q,Zc(V.options.validateSearch,{...Q,...A}))}catch{}}),A=Q}A=gC({search:A,dest:c,destRoutes:w,_includeValidateSearch:r._includeValidateSearch}),A=Mn(y,A);const k=this.options.stringifySearch(A),O=c.hash===!0?d.hash:c.hash?Tr(c.hash,d.hash):void 0,L=O?`#${O}`:"";let N=c.state===!0?d.state:c.state?Tr(c.state,d.state):{};N=Mn(d.state,N);const j=`${C}${k}${L}`;let z,q,Z=!1;if(this.rewrite){const Q=new URL(j,this.origin),V=OS(this.rewrite,Q);z=Q.href.replace(Q.origin,""),V.origin!==this.origin?(q=V.href,Z=!0):q=V.pathname+V.search+V.hash}else z=OT(j),q=z;return{publicHref:q,href:z,pathname:C,search:A,searchStr:k,state:N,hash:O??"",external:Z,unmaskOnReload:c.unmaskOnReload}},l=(c={},d)=>{const f=a(c);let m=d?a(d):void 0;if(!m){const h={};if(this.options.routeMasks){const y=kT(f.pathname,this.processedTree);if(y){Object.assign(h,y.rawParams);const{from:g,params:v,...b}=y.route,x=v===!1||v===null?{}:(v??!0)===!0?h:Object.assign(h,Tr(v,h));d={from:r.from,...b,params:x},m=a(d)}}}return m&&(f.maskedLocation=m),f};return r.mask?l(r,{from:r.from,...r.mask}):l(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:a,...l})=>{const c=()=>{const m=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];m.forEach(y=>{l.state[y]=this.latestLocation.state[y]});const h=ps(l.state,this.latestLocation.state);return m.forEach(y=>{delete l.state[y]}),h},d=Ar(this.latestLocation.href)===Ar(l.href),f=this.commitLocationPromise;if(this.commitLocationPromise=vs(()=>{f?.resolve()}),d&&c())this.load();else{let{maskedLocation:m,hashScrollIntoView:h,...y}=l;m&&(y={...m,state:{...m.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[l.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:a})}return this.resetNextScroll=l.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:a,hashScrollIntoView:l,viewTransition:c,ignoreBlocker:d,href:f,...m}={})=>{if(f){const g=this.history.location.state.__TSR_index,v=iu(f,{__TSR_index:r?g:g+1}),b=new URL(v.pathname,this.origin),x=op(this.rewrite,b);m.to=x.pathname,m.search=this.options.parseSearch(v.search),m.hash=v.hash.slice(1)}const h=this.buildLocation({...m,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const y=this.commitLocation({...h,viewTransition:c,replace:r,resetScroll:a,hashScrollIntoView:l,ignoreBlocker:d});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:a,href:l,publicHref:c,...d})=>{let f=!1;if(l)try{new URL(`${l}`),f=!0}catch{}if(f&&!a&&(a=!0),a){if(r!==void 0||!l){const h=this.buildLocation({to:r,...d});l=l??h.publicHref,c=c??h.publicHref}const m=!f&&c?c:l;if(cu(m,this.protocolAllowlist))return Promise.resolve();if(!d.ignoreBlocker){const y=this.history.getBlockers?.()??[];for(const g of y)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return d.replace?window.location.replace(m):window.location.href=m,Promise.resolve()}return this.buildAndCommitLocation({...d,href:l,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation);this.__store.setState(a=>({...a,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:r,cachedMatches:a.cachedMatches.filter(l=>!r.some(c=>c.id===l.id))}))},this.load=async r=>{let a,l,c;for(c=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad();const m=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ms({resolvedLocation:h,location:m})}),this.emit({type:"onBeforeLoad",...ms({resolvedLocation:h,location:m})}),await Pb({router:this,sync:r?.sync,matches:this.state.pendingMatches,location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=[],g=[],v=[];ba(()=>{this.__store.setState(b=>{const x=b.matches,w=b.pendingMatches||b.matches;return y=x.filter(E=>!w.some(C=>C.id===E.id)),g=w.filter(E=>!x.some(C=>C.id===E.id)),v=w.filter(E=>x.some(C=>C.id===E.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...y.filter(E=>E.status!=="error"&&E.status!=="notFound"&&E.status!=="redirected")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[g,"onEnter"],[v,"onStay"]].forEach(([b,x])=>{b.forEach(w=>{this.looseRoutesById[w.routeId].options[x]?.(w)})})})})}})}catch(m){Yn(m)?(a=m,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):ln(m)&&(l=m),this.__store.setState(h=>({...h,statusCode:a?a.status:l?404:h.matches.some(y=>y.status==="error")?500:200,redirect:a}))}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.__store.state.matches.some(f=>f.status==="error")&&(d=500),d!==void 0&&this.__store.setState(f=>({...f,statusCode:d}))},this.startViewTransition=r=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let l;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,d=this.state.resolvedLocation,f=typeof a.types=="function"?a.types(ms({resolvedLocation:d,location:c})):a.types;if(f===!1){r();return}l={update:r,types:f}}else l=r;document.startViewTransition(l)}else r()},this.updateMatch=(r,a)=>{this.startTransition(()=>{const l=this.state.pendingMatches?.some(c=>c.id===r)?"pendingMatches":this.state.matches.some(c=>c.id===r)?"matches":this.state.cachedMatches.some(c=>c.id===r)?"cachedMatches":"";l&&(l==="cachedMatches"?this.__store.setState(c=>({...c,cachedMatches:fC(c.cachedMatches.map(d=>d.id===r?a(d):d))})):this.__store.setState(c=>({...c,[l]:c[l]?.map(d=>d.id===r?a(d):d)})))})},this.getMatch=r=>{const a=l=>l.id===r;return this.state.cachedMatches.find(a)??this.state.pendingMatches?.find(a)??this.state.matches.find(a)},this.invalidate=r=>{const a=l=>r?.filter?.(l)??!0?{...l,invalid:!0,...r?.forcePending||l.status==="error"||l.status==="notFound"?{status:"pending",error:void 0}:void 0}:l;return this.__store.setState(l=>({...l,matches:l.matches.map(a),cachedMatches:l.cachedMatches.map(a),pendingMatches:l.pendingMatches?.map(a)})),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const a=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const l=r.options._builtLocation??this.buildLocation(r.options),c=this.getParsedLocationHref(l);r.options.href=c,r.headers.set("Location",c)}else if(a)try{const l=new URL(a);if(this.origin&&l.origin===this.origin){const c=l.pathname+l.search+l.hash;r.options.href=c,r.headers.set("Location",c)}}catch{}if(r.options.href&&!r.options._builtLocation&&cu(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const a=r?.filter;a!==void 0?this.__store.setState(l=>({...l,cachedMatches:l.cachedMatches.filter(c=>!a(c))})):this.__store.setState(l=>({...l,cachedMatches:[]}))},this.clearExpiredCache=()=>{const r=a=>{const l=this.looseRoutesById[a.routeId];if(!l.options.loader)return!0;const c=(a.preload?l.options.preloadGcTime??this.options.defaultPreloadGcTime:l.options.gcTime??this.options.defaultGcTime)??300*1e3;return a.status==="error"?!0:Date.now()-a.updatedAt>=c};this.clearCache({filter:r})},this.loadRouteChunk=TS,this.preloadRoute=async r=>{const a=r._builtLocation??this.buildLocation(r);let l=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:r});const c=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(f=>f.id)),d=new Set([...c,...this.state.cachedMatches.map(f=>f.id)]);ba(()=>{l.forEach(f=>{d.has(f.id)||this.__store.setState(m=>({...m,cachedMatches:[...m.cachedMatches,f]}))})});try{return l=await Pb({router:this,matches:l,location:a,preload:!0,updateMatch:(f,m)=>{c.has(f)?l=l.map(h=>h.id===f?m(h):h):this.updateMatch(f,m)}}),l}catch(f){if(Yn(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:a});ln(f)||console.error(f);return}},this.matchRoute=(r,a)=>{const l={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},c=this.buildLocation(l);if(a?.pending&&this.state.status!=="pending")return!1;const f=(a?.pending===void 0?!this.state.isLoading:a.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,m=NT(c.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,f.pathname,this.processedTree);return!m||r.params&&!ps(m.rawParams,r.params,{partial:!0})?!1:a?.includeSearch??!0?ps(f.search,c.search,{partial:!0})?m.rawParams:!1:m.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(r=>r.status==="notFound"||r.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??WT,parseSearch:n.parseSearch??JT,protocolAllowlist:n.protocolAllowlist??RT}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:n,routesByPath:r,processedTree:a}){this.routesById=n,this.routesByPath=r,this.processedTree=a;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)}get looseRoutesById(){return this.routesById}getParentContext(n){return n?.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,r){const a=this.getMatchedRoutes(n.pathname),{foundRoute:l,routeParams:c,parsedParams:d}=a;let{matchedRoutes:f}=a,m=!1;(l?l.path!=="/"&&c["**"]:Ar(n.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:m=!0);const h=m?vC(this.options.notFoundMode,f):void 0,y=new Array(f.length),g=new Map(this.state.matches.map(v=>[v.routeId,v]));for(let v=0;v<f.length;v++){const b=f[v],x=y[v-1];let w,E,C;{const te=x?.search??n.search,re=x?._strictSearch??void 0;try{const I=Zc(b.options.validateSearch,{...te})??void 0;w={...te,...I},E={...re,...I},C=void 0}catch(I){let B=I;if(I instanceof hu||(B=new hu(I.message,{cause:I})),r?.throwOnError)throw B;w=te,E={},C=B}}const A=b.options.loaderDeps?.({search:w})??"",k=A?JSON.stringify(A):"",{interpolatedPath:O,usedParams:L}=zb({path:b.fullPath,params:c,decoder:this.pathParamsDecoder,server:this.isServer}),N=b.id+O+k,j=this.getMatch(N),z=g.get(b.id),q=j?._strictParams??L;let Z;if(!j)try{Ib(b,L,d,q)}catch(te){if(ln(te)||Yn(te)?Z=te:Z=new hC(te.message,{cause:te}),r?.throwOnError)throw Z}Object.assign(c,q);const Q=z?"stay":"enter";let V;if(j)V={...j,cause:Q,params:z?.params??c,_strictParams:q,search:Mn(z?z.search:j.search,w),_strictSearch:E};else{const te=b.options.loader||b.options.beforeLoad||b.lazyFn||CS(b)?"pending":"success";V={id:N,ssr:b.options.ssr,index:v,routeId:b.id,params:z?.params??c,_strictParams:q,pathname:O,updatedAt:Date.now(),search:z?Mn(z.search,w):w,_strictSearch:E,searchError:void 0,status:te,isFetching:!1,error:void 0,paramsError:Z,__routeContext:void 0,_nonReactive:{loadPromise:vs()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:Q,loaderDeps:z?Mn(z.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}r?.preload||(V.globalNotFound=h===b.id),V.searchError=C;const J=this.getParentContext(x);V.context={...J,...V.__routeContext,...V.__beforeLoadContext},y[v]=V}for(let v=0;v<y.length;v++){const b=y[v],x=this.looseRoutesById[b.routeId],w=this.getMatch(b.id),E=g.get(b.routeId);if(b.params=E?Mn(E.params,c):c,!w){const C=y[v-1],A=this.getParentContext(C);if(x.options.context){const k={deps:b.loaderDeps,params:b.params,context:A??{},location:n,navigate:O=>this.navigate({...O,_fromLocation:n}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:y,routeId:x.id};b.__routeContext=x.options.context(k)??void 0}b.context={...A,...b.__routeContext,...b.__beforeLoadContext}}}return y}matchRoutesLightweight(n){const{matchedRoutes:r,routeParams:a,parsedParams:l}=this.getMatchedRoutes(n.pathname),c=Zi(r),d={...n.search};for(const y of r)try{Object.assign(d,Zc(y.options.validateSearch,d))}catch{}const f=Zi(this.state.matches),m=f&&f.routeId===c.id&&n.pathname===this.state.location.pathname;let h;if(m)h=f.params;else{const y={...a};for(const g of r)try{Ib(g,a,l??{},y)}catch{}h=y}return{matchedRoutes:r,fullPath:c.fullPath,search:d,params:h}}}class hu extends Error{}class hC extends Error{}function pC(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Zc(e,n){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(n);if(r instanceof Promise)throw new hu("Async validation not supported");if(r.issues)throw new hu(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(n):typeof e=="function"?e(n):{}}function mC({pathname:e,routesById:n,processedTree:r}){const a={},l=Ar(e);let c,d;const f=zT(l,r,!0);return f&&(c=f.route,Object.assign(a,f.rawParams),d=Object.assign({},f.parsedParams)),{matchedRoutes:f?.branch||[n[Hn]],routeParams:a,foundRoute:c,parsedParams:d}}function gC({search:e,dest:n,destRoutes:r,_includeValidateSearch:a}){return yC(r)(e,n,a??!1)}function yC(e){const n={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of e){if("search"in l.options)l.options.search?.middlewares&&n.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const c=({search:d,next:f})=>{let m=d;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(m=l.options.preSearchFilters.reduce((y,g)=>g(y),d));const h=f(m);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,g)=>g(y),h):h};n.middlewares.push(c)}if(l.options.validateSearch){const c=({search:d,next:f})=>{const m=f(d);if(!n._includeValidateSearch)return m;try{return{...m,...Zc(l.options.validateSearch,m)??void 0}}catch{return m}};n.middlewares.push(c)}}const r=({search:l})=>{const c=n.dest;return c.search?c.search===!0?l:Tr(c.search,l):{}};n.middlewares.push(r);const a=(l,c,d)=>{if(l>=d.length)return c;const f=d[l];return f({search:c,next:h=>a(l+1,h,d)})};return function(c,d,f){return n.dest=d,n._includeValidateSearch=f,a(0,c,n.middlewares)}}function vC(e,n){if(e!=="root")for(let r=n.length-1;r>=0;r--){const a=n[r];if(a.children)return a.id}return Hn}function Ib(e,n,r,a){const l=e.options.params?.parse??e.options.parseParams;if(l)if(e.options.skipRouteOnParseError)for(const c in n)c in r&&(a[c]=r[c]);else{const c=l(a);Object.assign(a,c)}}const so=Symbol.for("TSR_DEFERRED_PROMISE");function bC(e,n){const r=e;return r[so]||(r[so]={status:"pending"},r.then(a=>{r[so].status="success",r[so].data=a}).catch(a=>{r[so].status="error",r[so].error={data:uC(a),__isServerError:!0}})),r}const SC="Error preloading route! ☝️";class AS{constructor(n){if(this.init=r=>{this.originalIndex=r.originalIndex;const a=this.options,l=!a?.path&&!a?.id;this.parentRoute=this.options.getParentRoute?.(),l?this._path=Hn:this.parentRoute||vn(!1);let c=l?Hn:a?.path;c&&c!=="/"&&(c=yS(c));const d=a?.id||c;let f=l?Hn:Kc([this.parentRoute.id===Hn?"":this.parentRoute.id,d]);c===Hn&&(c="/"),f!==Hn&&(f=Kc(["/",f]));const m=f===Hn?"/":Kc([this.parentRoute.fullPath,c]);this._path=c,this._id=f,this._fullPath=m,this._to=Ar(m)},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.redirect=r=>SS({from:this.fullPath,...r}),this.options=n||{},this.isRoot=!n?.getParentRoute,n?.id&&n?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class xC extends AS{constructor(n){super(n)}}var wC=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(wC||{}),Uo=Symbol.asyncIterator,_S=Symbol.hasInstance,wa=Symbol.isConcatSpreadable,Bo=Symbol.iterator,DS=Symbol.match,kS=Symbol.matchAll,NS=Symbol.replace,zS=Symbol.search,LS=Symbol.species,jS=Symbol.split,PS=Symbol.toPrimitive,Ea=Symbol.toStringTag,IS=Symbol.unscopables,US={[Uo]:0,[_S]:1,[wa]:2,[Bo]:3,[DS]:4,[kS]:5,[NS]:6,[zS]:7,[LS]:8,[jS]:9,[PS]:10,[Ea]:11,[IS]:12},EC={0:Uo,1:_S,2:wa,3:Bo,4:DS,5:kS,6:NS,7:zS,8:LS,9:jS,10:PS,11:Ea,12:IS},D=void 0,RC={2:!0,3:!1,1:D,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},TC={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},CC={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function rt(e,n,r,a,l,c,d,f,m,h,y,g){return{t:e,i:n,s:r,c:a,m:l,p:c,e:d,a:f,f:m,b:h,o:y,l:g}}function Lr(e){return rt(2,D,e,D,D,D,D,D,D,D,D,D)}var BS=Lr(2),HS=Lr(3),MC=Lr(1),OC=Lr(0),AC=Lr(4),_C=Lr(5),DC=Lr(6),kC=Lr(7);function NC(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case`
11
- `:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return D}}function jr(e){let n="",r=0,a;for(let l=0,c=e.length;l<c;l++)a=NC(e[l]),a&&(n+=e.slice(r,l)+a,r=l+1);return r===0?n=e:n+=e.slice(r),n}function zC(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
12
- `;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function Es(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,zC)}var Dc="__SEROVAL_REFS__",VS=new Map,ya=new Map;function YS(e){return VS.has(e)}function LC(e){return ya.has(e)}function jC(e){if(YS(e))return VS.get(e);throw new hM(e)}function PC(e){if(LC(e))return ya.get(e);throw new pM(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,Dc,{value:ya,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Dc,{value:ya,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Dc,{value:ya,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Dc,{value:ya,configurable:!0,writable:!1,enumerable:!1});function kp(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function IC(e){let n=TC[kp(e)];return e.name!==n?{name:e.name}:e.constructor.name!==n?{name:e.constructor.name}:{}}function qS(e,n){let r=IC(e),a=Object.getOwnPropertyNames(e);for(let l=0,c=a.length,d;l<c;l++)d=a[l],d!=="name"&&d!=="message"&&(d==="stack"?n&4&&(r=r||{},r[d]=e[d]):(r=r||{},r[d]=e[d]));return r}function GS(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function UC(e){switch(e){case Number.POSITIVE_INFINITY:return _C;case Number.NEGATIVE_INFINITY:return DC}return e!==e?kC:Object.is(e,-0)?AC:rt(0,D,e,D,D,D,D,D,D,D,D,D)}function FS(e){return rt(1,D,jr(e),D,D,D,D,D,D,D,D,D)}function BC(e){return rt(3,D,""+e,D,D,D,D,D,D,D,D,D)}function HC(e){return rt(4,e,D,D,D,D,D,D,D,D,D,D)}function VC(e,n){let r=n.valueOf();return rt(5,e,r!==r?"":n.toISOString(),D,D,D,D,D,D,D,D,D)}function YC(e,n){return rt(6,e,D,jr(n.source),n.flags,D,D,D,D,D,D,D)}function qC(e,n){return rt(17,e,US[n],D,D,D,D,D,D,D,D,D)}function GC(e,n){return rt(18,e,jr(jC(n)),D,D,D,D,D,D,D,D,D)}function FC(e,n,r){return rt(25,e,r,jr(n),D,D,D,D,D,D,D,D)}function XC(e,n,r){return rt(9,e,D,D,D,D,D,r,D,D,GS(n),D)}function KC(e,n){return rt(21,e,D,D,D,D,D,D,n,D,D,D)}function QC(e,n,r){return rt(15,e,D,n.constructor.name,D,D,D,D,r,n.byteOffset,D,n.length)}function ZC(e,n,r){return rt(16,e,D,n.constructor.name,D,D,D,D,r,n.byteOffset,D,n.byteLength)}function $C(e,n,r){return rt(20,e,D,D,D,D,D,D,r,n.byteOffset,D,n.byteLength)}function JC(e,n,r){return rt(13,e,kp(n),D,jr(n.message),r,D,D,D,D,D,D)}function WC(e,n,r){return rt(14,e,kp(n),D,jr(n.message),r,D,D,D,D,D,D)}function eM(e,n){return rt(7,e,D,D,D,D,D,n,D,D,D,D)}function tM(e,n){return rt(28,D,D,D,D,D,D,[e,n],D,D,D,D)}function nM(e,n){return rt(30,D,D,D,D,D,D,[e,n],D,D,D,D)}function oM(e,n,r){return rt(31,e,D,D,D,D,D,r,n,D,D,D)}function rM(e,n){return rt(32,e,D,D,D,D,D,D,n,D,D,D)}function sM(e,n){return rt(33,e,D,D,D,D,D,D,n,D,D,D)}function aM(e,n){return rt(34,e,D,D,D,D,D,D,n,D,D,D)}function iM(e,n,r,a){return rt(35,e,r,D,D,D,D,n,D,D,D,a)}var lM={parsing:1,serialization:2,deserialization:3};function cM(e){return`Seroval Error (step: ${lM[e]})`}var uM=(e,n)=>cM(e),XS=class extends Error{constructor(e,n){super(uM(e)),this.cause=n}},Ub=class extends XS{constructor(e){super("parsing",e)}},fM=class extends XS{constructor(e){super("deserialization",e)}};function Yo(e){return`Seroval Error (specific: ${e})`}var zu=class extends Error{constructor(n){super(Yo(1)),this.value=n}},KS=class extends Error{constructor(n){super(Yo(2))}},dM=class extends Error{constructor(e){super(Yo(3))}},tl=class extends Error{constructor(e){super(Yo(4))}},hM=class extends Error{constructor(e){super(Yo(5)),this.value=e}},pM=class extends Error{constructor(e){super(Yo(6))}},mM=class extends Error{constructor(e){super(Yo(7))}},Pr=class extends Error{constructor(e){super(Yo(8))}},gM=class extends Error{constructor(n){super(Yo(9))}},yM=class{constructor(e,n){this.value=e,this.replacement=n}},Lu=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((n,r)=>{e.s=n,e.f=r}),e},vM=(e,n)=>{e.s(n),e.p.s=1,e.p.v=n},bM=(e,n)=>{e.f(n),e.p.s=2,e.p.v=n};Lu.toString();vM.toString();bM.toString();var SM=()=>{let e=[],n=[],r=!0,a=!1,l=0,c=(m,h,y)=>{for(y=0;y<l;y++)n[y]&&n[y][h](m)},d=(m,h,y,g)=>{for(h=0,y=e.length;h<y;h++)g=e[h],!r&&h===y-1?m[a?"return":"throw"](g):m.next(g)},f=(m,h)=>(r&&(h=l++,n[h]=m),d(m),()=>{r&&(n[h]=n[l],n[l--]=void 0)});return{__SEROVAL_STREAM__:!0,on:m=>f(m),next:m=>{r&&(e.push(m),c(m,"next"))},throw:m=>{r&&(e.push(m),c(m,"throw"),r=!1,a=!1,n.length=0)},return:m=>{r&&(e.push(m),c(m,"return"),r=!1,a=!0,n.length=0)}}},xM=e=>n=>()=>{let r=0,a={[e]:()=>a,next:()=>{if(r>n.d)return{done:!0,value:void 0};let l=r++,c=n.v[l];if(l===n.t)throw c;return{done:l===n.d,value:c}}};return a},wM=(e,n)=>r=>()=>{let a=0,l=-1,c=!1,d=[],f=[],m=(y=0,g=f.length)=>{for(;y<g;y++)f[y].s({done:!0,value:void 0})};r.on({next:y=>{let g=f.shift();g&&g.s({done:!1,value:y}),d.push(y)},throw:y=>{let g=f.shift();g&&g.f(y),m(),l=d.length,c=!0,d.push(y)},return:y=>{let g=f.shift();g&&g.s({done:!0,value:y}),m(),l=d.length,d.push(y)}});let h={[e]:()=>h,next:()=>{if(l===-1){let v=a++;if(v>=d.length){let b=n();return f.push(b),b.p}return{done:!1,value:d[v]}}if(a>l)return{done:!0,value:void 0};let y=a++,g=d[y];if(y!==l)return{done:!1,value:g};if(c)throw g;return{done:!0,value:g}}};return h},QS=e=>{let n=atob(e),r=n.length,a=new Uint8Array(r);for(let l=0;l<r;l++)a[l]=n.charCodeAt(l);return a.buffer};QS.toString();function EM(e){return"__SEROVAL_SEQUENCE__"in e}function ZS(e,n,r){return{__SEROVAL_SEQUENCE__:!0,v:e,t:n,d:r}}function RM(e){let n=[],r=-1,a=-1,l=e[Bo]();for(;;)try{let c=l.next();if(n.push(c.value),c.done){a=n.length-1;break}}catch(c){r=n.length,n.push(c)}return ZS(n,r,a)}var TM=xM(Bo);function CM(e){return TM(e)}var MM={},OM={},AM={0:{},1:{},2:{},3:{},4:{},5:{}};function ju(e){return"__SEROVAL_STREAM__"in e}function Rs(){return SM()}function _M(e){let n=Rs(),r=e[Uo]();async function a(){try{let l=await r.next();l.done?n.return(l.value):(n.next(l.value),await a())}catch(l){n.throw(l)}}return a().catch(()=>{}),n}var DM=wM(Uo,Lu);function kM(e){return DM(e)}async function NM(e){try{return[1,await e]}catch(n){return[0,n]}}function zM(e,n){return{plugins:n.plugins,mode:e,marked:new Set,features:63^(n.disabledFeatures||0),refs:n.refs||new Map,depthLimit:n.depthLimit||1e3}}function $c(e,n){e.marked.add(n)}function LM(e,n){let r=e.refs.size;return e.refs.set(n,r),r}function Pu(e,n){let r=e.refs.get(n);return r!=null?($c(e,r),{type:1,value:HC(r)}):{type:0,value:LM(e,n)}}function Np(e,n){let r=Pu(e,n);return r.type===1?r:YS(n)?{type:2,value:GC(r.value,n)}:r}function ds(e,n){let r=Np(e,n);if(r.type!==0)return r.value;if(n in US)return qC(r.value,n);throw new zu(n)}function Iu(e,n){let r=Pu(e,AM[n]);return r.type===1?r.value:rt(26,r.value,n,D,D,D,D,D,D,D,D,D)}function jM(e){let n=Pu(e,MM);return n.type===1?n.value:rt(27,n.value,D,D,D,D,D,D,ds(e,Bo),D,D,D)}function PM(e){let n=Pu(e,OM);return n.type===1?n.value:rt(29,n.value,D,D,D,D,D,[Iu(e,1),ds(e,Uo)],D,D,D,D)}function IM(e,n,r,a){return rt(r?11:10,e,D,D,D,a,D,D,D,D,GS(n),D)}function UM(e,n,r,a){return rt(8,n,D,D,D,D,{k:r,v:a},D,Iu(e,0),D,D,D)}function BM(e,n,r){let a=new Uint8Array(r),l="";for(let c=0,d=a.length;c<d;c++)l+=String.fromCharCode(a[c]);return rt(19,n,jr(btoa(l)),D,D,D,D,D,Iu(e,5),D,D,D)}function HM(e,n){return{base:zM(e,n),child:void 0}}var VM=class{constructor(e,n){this._p=e,this.depth=n}parse(e){return Ut(this._p,this.depth,e)}};async function YM(e,n,r){let a=[];for(let l=0,c=r.length;l<c;l++)l in r?a[l]=await Ut(e,n,r[l]):a[l]=0;return a}async function qM(e,n,r,a){return XC(r,a,await YM(e,n,a))}async function zp(e,n,r){let a=Object.entries(r),l=[],c=[];for(let d=0,f=a.length;d<f;d++)l.push(jr(a[d][0])),c.push(await Ut(e,n,a[d][1]));return Bo in r&&(l.push(ds(e.base,Bo)),c.push(tM(jM(e.base),await Ut(e,n,RM(r))))),Uo in r&&(l.push(ds(e.base,Uo)),c.push(nM(PM(e.base),await Ut(e,n,_M(r))))),Ea in r&&(l.push(ds(e.base,Ea)),c.push(FS(r[Ea]))),wa in r&&(l.push(ds(e.base,wa)),c.push(r[wa]?BS:HS)),{k:l,v:c}}async function Dh(e,n,r,a,l){return IM(r,a,l,await zp(e,n,a))}async function GM(e,n,r,a){return KC(r,await Ut(e,n,a.valueOf()))}async function FM(e,n,r,a){return QC(r,a,await Ut(e,n,a.buffer))}async function XM(e,n,r,a){return ZC(r,a,await Ut(e,n,a.buffer))}async function KM(e,n,r,a){return $C(r,a,await Ut(e,n,a.buffer))}async function Bb(e,n,r,a){let l=qS(a,e.base.features);return JC(r,a,l?await zp(e,n,l):D)}async function QM(e,n,r,a){let l=qS(a,e.base.features);return WC(r,a,l?await zp(e,n,l):D)}async function ZM(e,n,r,a){let l=[],c=[];for(let[d,f]of a.entries())l.push(await Ut(e,n,d)),c.push(await Ut(e,n,f));return UM(e.base,r,l,c)}async function $M(e,n,r,a){let l=[];for(let c of a.keys())l.push(await Ut(e,n,c));return eM(r,l)}async function $S(e,n,r,a){let l=e.base.plugins;if(l)for(let c=0,d=l.length;c<d;c++){let f=l[c];if(f.parse.async&&f.test(a))return FC(r,f.tag,await f.parse.async(a,new VM(e,n),{id:r}))}return D}async function JM(e,n,r,a){let[l,c]=await NM(a);return rt(12,r,l,D,D,D,D,D,await Ut(e,n,c),D,D,D)}function WM(e,n,r,a,l){let c=[],d=r.on({next:f=>{$c(this.base,n),Ut(this,e,f).then(m=>{c.push(rM(n,m))},m=>{l(m),d()})},throw:f=>{$c(this.base,n),Ut(this,e,f).then(m=>{c.push(sM(n,m)),a(c),d()},m=>{l(m),d()})},return:f=>{$c(this.base,n),Ut(this,e,f).then(m=>{c.push(aM(n,m)),a(c),d()},m=>{l(m),d()})}})}async function eO(e,n,r,a){return oM(r,Iu(e.base,4),await new Promise(WM.bind(e,n,r,a)))}async function tO(e,n,r,a){let l=[];for(let c=0,d=a.v.length;c<d;c++)l[c]=await Ut(e,n,a.v[c]);return iM(r,l,a.t,a.d)}async function nO(e,n,r,a){if(Array.isArray(a))return qM(e,n,r,a);if(ju(a))return eO(e,n,r,a);if(EM(a))return tO(e,n,r,a);let l=a.constructor;if(l===yM)return Ut(e,n,a.replacement);let c=await $S(e,n,r,a);if(c)return c;switch(l){case Object:return Dh(e,n,r,a,!1);case D:return Dh(e,n,r,a,!0);case Date:return VC(r,a);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Bb(e,n,r,a);case Number:case Boolean:case String:case BigInt:return GM(e,n,r,a);case ArrayBuffer:return BM(e.base,r,a);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return FM(e,n,r,a);case DataView:return KM(e,n,r,a);case Map:return ZM(e,n,r,a);case Set:return $M(e,n,r,a)}if(l===Promise||a instanceof Promise)return JM(e,n,r,a);let d=e.base.features;if(d&32&&l===RegExp)return YC(r,a);if(d&16)switch(l){case BigInt64Array:case BigUint64Array:return XM(e,n,r,a)}if(d&1&&typeof AggregateError<"u"&&(l===AggregateError||a instanceof AggregateError))return QM(e,n,r,a);if(a instanceof Error)return Bb(e,n,r,a);if(Bo in a||Uo in a)return Dh(e,n,r,a,!!l);throw new zu(a)}async function oO(e,n,r){let a=Np(e.base,r);if(a.type!==0)return a.value;let l=await $S(e,n,a.value,r);if(l)return l;throw new zu(r)}async function Ut(e,n,r){switch(typeof r){case"boolean":return r?BS:HS;case"undefined":return MC;case"string":return FS(r);case"number":return UC(r);case"bigint":return BC(r);case"object":{if(r){let a=Np(e.base,r);return a.type===0?await nO(e,n+1,a.value,r):a.value}return OC}case"symbol":return ds(e.base,r);case"function":return oO(e,n,r);default:throw new zu(r)}}async function rO(e,n){try{return await Ut(e,0,n)}catch(r){throw r instanceof Ub?r:new Ub(r)}}var sO=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(sO||{});function JS(e,n){for(let r=0,a=n.length;r<a;r++){let l=n[r];e.has(l)||(e.add(l),l.extends&&JS(e,l.extends))}}function WS(e){if(e){let n=new Set;return JS(n,e),[...n]}}function aO(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new mM(e)}}var iO=1e6,lO=1e4,cO=2e4;function ex(e,n){switch(n){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var uO=1e3;function fO(e,n){var r;return{mode:e,plugins:n.plugins,refs:n.refs||new Map,features:(r=n.features)!=null?r:63^(n.disabledFeatures||0),depthLimit:n.depthLimit||uO}}function dO(e){return{mode:2,base:fO(2,e),child:D}}var hO=class{constructor(e,n){this._p=e,this.depth=n}deserialize(e){return mt(this._p,this.depth,e)}};function tx(e,n){if(n<0||!Number.isFinite(n)||!Number.isInteger(n))throw new Pr({t:4,i:n});if(e.refs.has(n))throw new Error("Conflicted ref id: "+n)}function pO(e,n,r){return tx(e.base,n),e.state.marked.has(n)&&e.base.refs.set(n,r),r}function mO(e,n,r){return tx(e.base,n),e.base.refs.set(n,r),r}function Bt(e,n,r){return e.mode===1?pO(e,n,r):mO(e,n,r)}function rp(e,n,r){if(Object.hasOwn(n,r))return n[r];throw new Pr(e)}function gO(e,n){return Bt(e,n.i,PC(Es(n.s)))}function yO(e,n,r){let a=r.a,l=a.length,c=Bt(e,r.i,new Array(l));for(let d=0,f;d<l;d++)f=a[d],f&&(c[d]=mt(e,n,f));return ex(c,r.o),c}function vO(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function bO(e){switch(e){case Uo:case wa:case Ea:case Bo:return!0;default:return!1}}function Hb(e,n,r){vO(n)?e[n]=r:Object.defineProperty(e,n,{value:r,configurable:!0,enumerable:!0,writable:!0})}function SO(e,n,r,a,l){if(typeof a=="string")Hb(r,a,mt(e,n,l));else{let c=mt(e,n,a);switch(typeof c){case"string":Hb(r,c,mt(e,n,l));break;case"symbol":bO(c)&&(r[c]=mt(e,n,l));break;default:throw new Pr(a)}}}function nx(e,n,r,a){let l=r.k;if(l.length>0)for(let c=0,d=r.v,f=l.length;c<f;c++)SO(e,n,a,l[c],d[c]);return a}function xO(e,n,r){let a=Bt(e,r.i,r.t===10?{}:Object.create(null));return nx(e,n,r.p,a),ex(a,r.o),a}function wO(e,n){return Bt(e,n.i,new Date(n.s))}function EO(e,n){if(e.base.features&32){let r=Es(n.c);if(r.length>cO)throw new Pr(n);return Bt(e,n.i,new RegExp(r,n.m))}throw new KS(n)}function RO(e,n,r){let a=Bt(e,r.i,new Set);for(let l=0,c=r.a,d=c.length;l<d;l++)a.add(mt(e,n,c[l]));return a}function TO(e,n,r){let a=Bt(e,r.i,new Map);for(let l=0,c=r.e.k,d=r.e.v,f=c.length;l<f;l++)a.set(mt(e,n,c[l]),mt(e,n,d[l]));return a}function CO(e,n){if(n.s.length>iO)throw new Pr(n);return Bt(e,n.i,QS(Es(n.s)))}function MO(e,n,r){var a;let l=aO(r.c),c=mt(e,n,r.f),d=(a=r.b)!=null?a:0;if(d<0||d>c.byteLength)throw new Pr(r);return Bt(e,r.i,new l(c,d,r.l))}function OO(e,n,r){var a;let l=mt(e,n,r.f),c=(a=r.b)!=null?a:0;if(c<0||c>l.byteLength)throw new Pr(r);return Bt(e,r.i,new DataView(l,c,r.l))}function ox(e,n,r,a){if(r.p){let l=nx(e,n,r.p,{});Object.defineProperties(a,Object.getOwnPropertyDescriptors(l))}return a}function AO(e,n,r){let a=Bt(e,r.i,new AggregateError([],Es(r.m)));return ox(e,n,r,a)}function _O(e,n,r){let a=rp(r,CC,r.s),l=Bt(e,r.i,new a(Es(r.m)));return ox(e,n,r,l)}function DO(e,n,r){let a=Lu(),l=Bt(e,r.i,a.p),c=mt(e,n,r.f);return r.s?a.s(c):a.f(c),l}function kO(e,n,r){return Bt(e,r.i,Object(mt(e,n,r.f)))}function NO(e,n,r){let a=e.base.plugins;if(a){let l=Es(r.c);for(let c=0,d=a.length;c<d;c++){let f=a[c];if(f.tag===l)return Bt(e,r.i,f.deserialize(r.s,new hO(e,n),{id:r.i}))}}throw new dM(r.c)}function zO(e,n){return Bt(e,n.i,Bt(e,n.s,Lu()).p)}function LO(e,n,r){let a=e.base.refs.get(r.i);if(a)return a.s(mt(e,n,r.a[1])),D;throw new tl("Promise")}function jO(e,n,r){let a=e.base.refs.get(r.i);if(a)return a.f(mt(e,n,r.a[1])),D;throw new tl("Promise")}function PO(e,n,r){mt(e,n,r.a[0]);let a=mt(e,n,r.a[1]);return CM(a)}function IO(e,n,r){mt(e,n,r.a[0]);let a=mt(e,n,r.a[1]);return kM(a)}function UO(e,n,r){let a=Bt(e,r.i,Rs()),l=r.a,c=l.length;if(c)for(let d=0;d<c;d++)mt(e,n,l[d]);return a}function BO(e,n,r){let a=e.base.refs.get(r.i);if(a&&ju(a))return a.next(mt(e,n,r.f)),D;throw new tl("Stream")}function HO(e,n,r){let a=e.base.refs.get(r.i);if(a&&ju(a))return a.throw(mt(e,n,r.f)),D;throw new tl("Stream")}function VO(e,n,r){let a=e.base.refs.get(r.i);if(a&&ju(a))return a.return(mt(e,n,r.f)),D;throw new tl("Stream")}function YO(e,n,r){return mt(e,n,r.f),D}function qO(e,n,r){return mt(e,n,r.a[1]),D}function GO(e,n,r){let a=Bt(e,r.i,ZS([],r.s,r.l));for(let l=0,c=r.a.length;l<c;l++)a.v[l]=mt(e,n,r.a[l]);return a}function mt(e,n,r){if(n>e.base.depthLimit)throw new gM(e.base.depthLimit);switch(n+=1,r.t){case 2:return rp(r,RC,r.s);case 0:return Number(r.s);case 1:return Es(String(r.s));case 3:if(String(r.s).length>lO)throw new Pr(r);return BigInt(r.s);case 4:return e.base.refs.get(r.i);case 18:return gO(e,r);case 9:return yO(e,n,r);case 10:case 11:return xO(e,n,r);case 5:return wO(e,r);case 6:return EO(e,r);case 7:return RO(e,n,r);case 8:return TO(e,n,r);case 19:return CO(e,r);case 16:case 15:return MO(e,n,r);case 20:return OO(e,n,r);case 14:return AO(e,n,r);case 13:return _O(e,n,r);case 12:return DO(e,n,r);case 17:return rp(r,EC,r.s);case 21:return kO(e,n,r);case 25:return NO(e,n,r);case 22:return zO(e,r);case 23:return LO(e,n,r);case 24:return jO(e,n,r);case 28:return PO(e,n,r);case 30:return IO(e,n,r);case 31:return UO(e,n,r);case 32:return BO(e,n,r);case 33:return HO(e,n,r);case 34:return VO(e,n,r);case 27:return YO(e,n,r);case 29:return qO(e,n,r);case 35:return GO(e,n,r);default:throw new KS(r)}}function FO(e,n){try{return mt(e,0,n)}catch(r){throw new fM(r)}}var XO=()=>T;XO.toString();function kh(e,n){let r=WS(n.plugins),a=dO({plugins:r,refs:n.refs,features:n.features,disabledFeatures:n.disabledFeatures});return FO(a,e)}async function KO(e,n={}){let r=WS(n.plugins),a=HM(1,{plugins:r,disabledFeatures:n.disabledFeatures});return{t:await rO(a,e),f:a.base.features,m:Array.from(a.base.marked)}}function QO(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(n,r){return r.parse(e.toSerializable(n))},async async(n,r){return await r.parse(e.toSerializable(n))},stream(n,r){return r.parse(e.toSerializable(n))}},serialize:void 0,deserialize(n,r){return e.fromSerializable(r.deserialize(n))}}}var Rr={},rx=e=>new ReadableStream({start:n=>{e.on({next:r=>{try{n.enqueue(r)}catch{}},throw:r=>{n.error(r)},return:()=>{try{n.close()}catch{}}})}}),ZO={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===Rr},parse:{sync(){return Rr},async async(){return await Promise.resolve(Rr)},stream(){return Rr}},serialize(){return rx.toString()},deserialize(){return Rr}};function Vb(e){let n=Rs(),r=e.getReader();async function a(){try{let l=await r.read();l.done?n.return(l.value):(n.next(l.value),await a())}catch(l){n.throw(l)}}return a().catch(()=>{}),n}var $O={tag:"seroval/plugins/web/ReadableStream",extends:[ZO],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,n){return{factory:n.parse(Rr),stream:n.parse(Rs())}},async async(e,n){return{factory:await n.parse(Rr),stream:await n.parse(Vb(e))}},stream(e,n){return{factory:n.parse(Rr),stream:n.parse(Vb(e))}}},serialize(e,n){return"("+n.serialize(e.factory)+")("+n.serialize(e.stream)+")"},deserialize(e,n){let r=n.deserialize(e.stream);return rx(r)}},JO=$O;const WO={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,n){return{message:n.parse(e.message)}},async async(e,n){return{message:await n.parse(e.message)}},stream(e,n){return{message:n.parse(e.message)}}},serialize(e,n){return"new Error("+n.serialize(e.message)+")"},deserialize(e,n){return new Error(n.deserialize(e.message))}};class eA{constructor(n,r){this.stream=n,this.hint=r?.hint??"binary"}}const pu=globalThis.Buffer,sx=!!pu&&typeof pu.from=="function";function ax(e){if(e.length===0)return"";if(sx)return pu.from(e).toString("base64");const n=32768,r=[];for(let a=0;a<e.length;a+=n){const l=e.subarray(a,a+n);r.push(String.fromCharCode.apply(null,l))}return btoa(r.join(""))}function ix(e){if(e.length===0)return new Uint8Array(0);if(sx){const a=pu.from(e,"base64");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}const n=atob(e),r=new Uint8Array(n.length);for(let a=0;a<n.length;a++)r[a]=n.charCodeAt(a);return r}const qi=Object.create(null),Gi=Object.create(null),tA=e=>new ReadableStream({start(n){e.on({next(r){try{n.enqueue(ix(r))}catch{}},throw(r){n.error(r)},return(){try{n.close()}catch{}}})}}),nA=new TextEncoder,oA=e=>new ReadableStream({start(n){e.on({next(r){try{typeof r=="string"?n.enqueue(nA.encode(r)):n.enqueue(ix(r.$b64))}catch{}},throw(r){n.error(r)},return(){try{n.close()}catch{}}})}}),rA="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",sA="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function Yb(e){const n=Rs(),r=e.getReader();return(async()=>{try{for(;;){const{done:a,value:l}=await r.read();if(a){n.return(void 0);break}n.next(ax(l))}}catch(a){n.throw(a)}finally{r.releaseLock()}})(),n}function qb(e){const n=Rs(),r=e.getReader(),a=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:l,value:c}=await r.read();if(l){try{const d=a.decode();d.length>0&&n.next(d)}catch{}n.return(void 0);break}try{const d=a.decode(c,{stream:!0});d.length>0&&n.next(d)}catch{n.next({$b64:ax(c)})}}}catch(l){n.throw(l)}finally{r.releaseLock()}})(),n}const aA={tag:"tss/RawStreamFactory",test(e){return e===qi},parse:{sync(){},async(){return Promise.resolve(void 0)},stream(){}},serialize(){return rA},deserialize(){return qi}},iA={tag:"tss/RawStreamFactoryText",test(e){return e===Gi},parse:{sync(){},async(){return Promise.resolve(void 0)},stream(){}},serialize(){return sA},deserialize(){return Gi}},lA={tag:"tss/RawStream",extends:[aA,iA],test(e){return e instanceof eA},parse:{sync(e,n){const r=e.hint==="text"?Gi:qi;return{hint:e.hint,factory:n.parse(r),stream:n.parse(Rs())}},async async(e,n){const r=e.hint==="text"?Gi:qi,a=e.hint==="text"?qb(e.stream):Yb(e.stream);return{hint:e.hint,factory:await n.parse(r),stream:await n.parse(a)}},stream(e,n){const r=e.hint==="text"?Gi:qi,a=e.hint==="text"?qb(e.stream):Yb(e.stream);return{hint:e.hint,factory:n.parse(r),stream:n.parse(a)}}},serialize(e,n){return"("+n.serialize(e.factory)+")("+n.serialize(e.stream)+")"},deserialize(e,n){const r=n.deserialize(e.stream);return e.hint==="text"?oA(r):tA(r)}};function cA(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(n){return e(n.streamId)}}}const uA=[WO,lA,JO],fA="use",mu=Tp[fA],kc=typeof window<"u"?R.useLayoutEffect:R.useEffect;function Nh(e){const n=R.useRef({value:e,prev:null}),r=n.current.value;return e!==r&&(n.current={value:e,prev:r}),n.current.prev}function dA(e,n,r={},a={}){R.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const l=new IntersectionObserver(([c])=>{n(c)},r);return l.observe(e.current),()=>{l.disconnect()}},[n,r,a.disabled,e])}function hA(e){const n=R.useRef(null);return R.useImperativeHandle(e,()=>n.current,[]),n}function pA({promise:e}){if(mu)return mu(e);const n=bC(e);if(n[so].status==="pending")throw n;if(n[so].status==="error")throw n[so].error;return n[so].data}function mA(e){const n=_.jsx(gA,{...e});return e.fallback?_.jsx(R.Suspense,{fallback:e.fallback,children:n}):n}function gA(e){const n=pA(e);return e.children(n)}function Lp(e){const n=e.errorComponent??jp;return _.jsx(yA,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:a})=>r?R.createElement(n,{error:r,reset:a}):e.children})}class yA extends R.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(n){return{resetKey:n.getResetKey()}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidUpdate(n,r){r.error&&r.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(n,r){this.props.onCatch&&this.props.onCatch(n,r)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function jp({error:e}){const[n,r]=R.useState(!1);return _.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[_.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),_.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(a=>!a),children:n?"Hide Error":"Show Error"})]}),_.jsx("div",{style:{height:".25rem"}}),n?_.jsx("div",{children:_.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?_.jsx("code",{children:e.message}):null})}):null]})}function vA({children:e,fallback:n=null}){return Pp()?_.jsx(_a.Fragment,{children:e}):_.jsx(_a.Fragment,{children:n})}function Pp(){return _a.useSyncExternalStore(bA,()=>!0,()=>!1)}function bA(){return()=>{}}var zh={exports:{}},Lh={},jh={exports:{}},Ph={};var Gb;function SA(){if(Gb)return Ph;Gb=1;var e=el();function n(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:n,a=e.useState,l=e.useEffect,c=e.useLayoutEffect,d=e.useDebugValue;function f(g,v){var b=v(),x=a({inst:{value:b,getSnapshot:v}}),w=x[0].inst,E=x[1];return c(function(){w.value=b,w.getSnapshot=v,m(w)&&E({inst:w})},[g,b,v]),l(function(){return m(w)&&E({inst:w}),g(function(){m(w)&&E({inst:w})})},[g]),d(b),b}function m(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!r(g,b)}catch{return!0}}function h(g,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Ph.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Ph}var Fb;function lx(){return Fb||(Fb=1,jh.exports=SA()),jh.exports}var Xb;function xA(){if(Xb)return Lh;Xb=1;var e=el(),n=lx();function r(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var a=typeof Object.is=="function"?Object.is:r,l=n.useSyncExternalStore,c=e.useRef,d=e.useEffect,f=e.useMemo,m=e.useDebugValue;return Lh.useSyncExternalStoreWithSelector=function(h,y,g,v,b){var x=c(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=f(function(){function C(N){if(!A){if(A=!0,k=N,N=v(N),b!==void 0&&w.hasValue){var j=w.value;if(b(j,N))return O=j}return O=N}if(j=O,a(k,N))return j;var z=v(N);return b!==void 0&&b(j,z)?(k=N,j):(k=N,O=z)}var A=!1,k,O,L=g===void 0?null:g;return[function(){return C(y())},L===null?void 0:function(){return C(L())}]},[y,g,v,b]);var E=l(h,x[0],x[1]);return d(function(){w.hasValue=!0,w.value=E},[E]),m(E),E},Lh}var Kb;function wA(){return Kb||(Kb=1,zh.exports=xA()),zh.exports}var cx=wA();function EA(e,n){return e===n}function Uu(e,n,r=EA){const a=R.useCallback(d=>{if(!e)return()=>{};const{unsubscribe:f}=e.subscribe(d);return f},[e]),l=R.useCallback(()=>e?.get(),[e]);return cx.useSyncExternalStoreWithSelector(a,l,l,n,r)}const ux=R.createContext(null);function tn(e){const n=R.useContext(ux);return e?.warn,n}function It(e){const n=tn({warn:e?.router===void 0}),r=e?.router||n,a=R.useRef(void 0);return Uu(r.__store,l=>{if(e?.select){if(e.structuralSharing??r.options.defaultStructuralSharing){const c=Mn(a.current,e.select(l));return a.current=c,c}return e.select(l)}return l})}const Bu=R.createContext(void 0),RA=R.createContext(void 0);function co(e){const n=R.useContext(e.from?RA:Bu);return It({select:a=>{const l=a.matches.find(c=>e.from?e.from===c.routeId:c.id===n);if(vn(!((e.shouldThrow??!0)&&!l),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),l!==void 0)return e.select?e.select(l):l},structuralSharing:e.structuralSharing})}function Ip(e){return co({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function Up(e){const{select:n,...r}=e;return co({...r,select:a=>n?n(a.loaderDeps):a.loaderDeps})}function Bp(e){return co({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const r=e.strict===!1?n.params:n._strictParams;return e.select?e.select(r):r}})}function Hp(e){return co({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function nl(e){const n=tn();return R.useCallback(r=>n.navigate({...r,from:r.from??e?.from}),[e?.from,n])}var Gn=cS();const Q4=lS(Gn);function TA(e,n){const r=tn(),a=hA(n),{activeProps:l,inactiveProps:c,activeOptions:d,to:f,preload:m,preloadDelay:h,hashScrollIntoView:y,replace:g,startTransition:v,resetScroll:b,viewTransition:x,children:w,target:E,disabled:C,style:A,className:k,onClick:O,onBlur:L,onFocus:N,onMouseEnter:j,onMouseLeave:z,onTouchStart:q,ignoreBlocker:Z,params:Q,search:V,hash:J,state:te,mask:re,reloadDocument:I,unsafeRelative:B,from:G,_fromLocation:ce,...W}=e,P=Pp(),X=It({select:He=>{const We=He.matches[He.matches.length-1];return{search:We?.search,hash:He.location.hash,path:We?.pathname}},structuralSharing:!0}),le=e.from,se=R.useMemo(()=>({...e,from:le}),[r,X,le,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ue=R.useMemo(()=>r.buildLocation({...se}),[r,se]),he=ue.maskedLocation?ue.maskedLocation.publicHref:ue.publicHref,ve=ue.maskedLocation?ue.maskedLocation.external:ue.external,Oe=R.useMemo(()=>DA(he,ve,r.history,C),[C,ve,he,r.history]),fe=R.useMemo(()=>{if(Oe?.external)return cu(Oe.href,r.protocolAllowlist)?void 0:Oe.href;if(!kA(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),cu(f,r.protocolAllowlist)?void 0:f}catch{}},[f,Oe,r.protocolAllowlist]),Ne=It({select:He=>{if(fe)return!1;if(d?.exact){if(!BT(He.location.pathname,ue.pathname,r.basepath))return!1}else{const We=fu(He.location.pathname,r.basepath),Pe=fu(ue.pathname,r.basepath);if(!(We.startsWith(Pe)&&(We.length===Pe.length||We[Pe.length]==="/")))return!1}return(d?.includeSearch??!0)&&!ps(He.location.search,ue.search,{partial:!d?.exact,ignoreUndefined:!d?.explicitUndefined})?!1:d?.includeHash?P&&He.location.hash===ue.hash:!0}}),je=Ne?Tr(l,{})??CA:Ih,ne=Ne?Ih:Tr(c,{})??Ih,me=[k,je.className,ne.className].filter(Boolean).join(" "),pe=(A||je.style||ne.style)&&{...A,...je.style,...ne.style},[ze,be]=R.useState(!1),Se=R.useRef(!1),ye=e.reloadDocument||fe?!1:m??r.options.defaultPreload,de=h??r.options.defaultPreloadDelay??0,we=R.useCallback(()=>{r.preloadRoute({...se,_builtLocation:ue}).catch(He=>{console.warn(He),console.warn(SC)})},[r,se,ue]),ge=R.useCallback(He=>{He?.isIntersecting&&we()},[we]);dA(a,ge,_A,{disabled:!!C||ye!=="viewport"}),R.useEffect(()=>{Se.current||!C&&ye==="render"&&(we(),Se.current=!0)},[C,we,ye]);const De=He=>{const We=He.currentTarget.getAttribute("target"),Pe=E!==void 0?E:We;if(!C&&!NA(He)&&!He.defaultPrevented&&(!Pe||Pe==="_self")&&He.button===0){He.preventDefault(),Gn.flushSync(()=>{be(!0)});const Rt=r.subscribe("onResolved",()=>{Rt(),be(!1)});r.navigate({...se,replace:g,resetScroll:b,hashScrollIntoView:y,startTransition:v,viewTransition:x,ignoreBlocker:Z})}};if(fe)return{...W,ref:a,href:fe,...w&&{children:w},...E&&{target:E},...C&&{disabled:C},...A&&{style:A},...k&&{className:k},...O&&{onClick:O},...L&&{onBlur:L},...N&&{onFocus:N},...j&&{onMouseEnter:j},...z&&{onMouseLeave:z},...q&&{onTouchStart:q}};const Ye=He=>{if(C||ye!=="intent")return;if(!de){we();return}const We=He.currentTarget;if(Bi.has(We))return;const Pe=setTimeout(()=>{Bi.delete(We),we()},de);Bi.set(We,Pe)},Ue=He=>{C||ye!=="intent"||we()},Ot=He=>{if(C||!ye||!de)return;const We=He.currentTarget,Pe=Bi.get(We);Pe&&(clearTimeout(Pe),Bi.delete(We))};return{...W,...je,...ne,href:Oe?.href,ref:a,onClick:pa([O,De]),onBlur:pa([L,Ot]),onFocus:pa([N,Ye]),onMouseEnter:pa([j,Ye]),onMouseLeave:pa([z,Ot]),onTouchStart:pa([q,Ue]),disabled:!!C,target:E,...pe&&{style:pe},...me&&{className:me},...C&&MA,...Ne&&OA,...P&&ze&&AA}}const Ih={},CA={className:"active"},MA={role:"link","aria-disabled":!0},OA={"data-status":"active","aria-current":"page"},AA={"data-transitioning":"transitioning"},Bi=new WeakMap,_A={rootMargin:"100px"},pa=e=>n=>{for(const r of e)if(r){if(n.defaultPrevented)return;r(n)}};function DA(e,n,r,a){if(!a)return n?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function kA(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}const Ji=R.forwardRef((e,n)=>{const{_asChild:r,...a}=e,{type:l,...c}=TA(a,n),d=typeof a.children=="function"?a.children({isActive:c["data-status"]==="active"}):a.children;if(!r){const{disabled:f,...m}=c;return R.createElement("a",m,d)}return R.createElement(r,c,d)});function NA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let zA=class extends AS{constructor(n){super(n),this.useMatch=r=>co({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>co({...r,from:this.id,select:a=>r?.select?r.select(a.context):a.context}),this.useSearch=r=>Hp({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Bp({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Up({...r,from:this.id}),this.useLoaderData=r=>Ip({...r,from:this.id}),this.useNavigate=()=>nl({from:this.fullPath}),this.Link=_a.forwardRef((r,a)=>_.jsx(Ji,{ref:a,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}};function LA(e){return new zA(e)}class jA extends xC{constructor(n){super(n),this.useMatch=r=>co({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>co({...r,from:this.id,select:a=>r?.select?r.select(a.context):a.context}),this.useSearch=r=>Hp({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Bp({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Up({...r,from:this.id}),this.useLoaderData=r=>Ip({...r,from:this.id}),this.useNavigate=()=>nl({from:this.fullPath}),this.Link=_a.forwardRef((r,a)=>_.jsx(Ji,{ref:a,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}}function PA(e){return new jA(e)}function ka(e){return typeof e=="object"?new Qb(e,{silent:!0}).createRoute(e):new Qb(e,{silent:!0}).createRoute}class Qb{constructor(n,r){this.path=n,this.createRoute=a=>{const l=LA(a);return l.isRoot=!1,l},this.silent=r?.silent}}class Zb{constructor(n){this.useMatch=r=>co({select:r?.select,from:this.options.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>co({from:this.options.id,select:a=>r?.select?r.select(a.context):a.context}),this.useSearch=r=>Hp({select:r?.select,structuralSharing:r?.structuralSharing,from:this.options.id}),this.useParams=r=>Bp({select:r?.select,structuralSharing:r?.structuralSharing,from:this.options.id}),this.useLoaderDeps=r=>Up({...r,from:this.options.id}),this.useLoaderData=r=>Ip({...r,from:this.options.id}),this.useNavigate=()=>{const r=tn();return nl({from:r.routesById[this.options.id].fullPath})},this.options=n,this.$$typeof=Symbol.for("react.memo")}}function $b(e){return typeof e=="object"?new Zb(e):n=>new Zb({id:e,...n})}function Hu(e,n){let r,a,l,c;const d=()=>(r||(r=e().then(m=>{r=void 0,a=m[n]}).catch(m=>{if(l=m,wT(l)&&l instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${l.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),c=!0)}})),r),f=function(h){if(c)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!a)if(mu)mu(d());else throw d();return R.createElement(a,h)};return f.preload=d,f}function IA(){const e=tn(),n=R.useRef({router:e,mounted:!1}),[r,a]=R.useState(!1),{hasPendingMatches:l,isLoading:c}=It({select:g=>({isLoading:g.isLoading,hasPendingMatches:g.matches.some(v=>v.status==="pending")}),structuralSharing:!0}),d=Nh(c),f=c||r||l,m=Nh(f),h=c||l,y=Nh(h);return e.startTransition=g=>{a(!0),R.startTransition(()=>{g(),a(!1)})},R.useEffect(()=>{const g=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ar(e.latestLocation.publicHref)!==Ar(v.publicHref)&&e.commitLocation({...v,replace:!0}),()=>{g()}},[e,e.history]),kc(()=>{if(typeof window<"u"&&e.ssr||n.current.router===e&&n.current.mounted)return;n.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(v){console.error(v)}})()},[e]),kc(()=>{d&&!c&&e.emit({type:"onLoad",...ms(e.state)})},[d,e,c]),kc(()=>{y&&!h&&e.emit({type:"onBeforeRouteMount",...ms(e.state)})},[h,y,e]),kc(()=>{if(m&&!f){const g=ms(e.state);e.emit({type:"onResolved",...g}),e.__store.setState(v=>({...v,status:"idle",resolvedLocation:v.location})),g.hrefChanged&&ZT(e)}},[f,m,e]),null}function UA(e){const n=It({select:r=>`not-found-${r.location.pathname}-${r.status}`});return _.jsx(Lp,{getResetKey:()=>n,onCatch:(r,a)=>{if(ln(r))e.onCatch?.(r,a);else throw r},errorComponent:({error:r})=>{if(ln(r))return e.fallback?.(r);throw r},children:e.children})}function BA(){return _.jsx("p",{children:"Not Found"})}function ga(e){return _.jsx(_.Fragment,{children:e.children})}function fx(e,n,r){return n.options.notFoundComponent?_.jsx(n.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?_.jsx(e.options.defaultNotFoundComponent,{...r}):_.jsx(BA,{})}function HA(){return tn().isScrollRestoring,null}const dx=R.memo(function({matchId:n}){const r=tn(),a=It({select:w=>{const E=w.matches.findIndex(A=>A.id===n),C=w.matches[E];return vn(C),{routeId:C.routeId,ssr:C.ssr,_displayPending:C._displayPending,resetKey:w.loadedAt,parentRouteId:w.matches[E-1]?.routeId}},structuralSharing:!0}),l=r.routesById[a.routeId],c=l.options.pendingComponent??r.options.defaultPendingComponent,d=c?_.jsx(c,{}):null,f=l.options.errorComponent??r.options.defaultErrorComponent,m=l.options.onCatch??r.options.defaultOnCatch,h=l.isRoot?l.options.notFoundComponent??r.options.notFoundRoute?.options.component:l.options.notFoundComponent,y=a.ssr===!1||a.ssr==="data-only",g=(!l.isRoot||l.options.wrapInSuspense||y)&&(l.options.wrapInSuspense??c??(l.options.errorComponent?.preload||y))?R.Suspense:ga,v=f?Lp:ga,b=h?UA:ga,x=l.isRoot?l.options.shellComponent??ga:ga;return _.jsxs(x,{children:[_.jsx(Bu.Provider,{value:n,children:_.jsx(g,{fallback:d,children:_.jsx(v,{getResetKey:()=>a.resetKey,errorComponent:f||jp,onCatch:(w,E)=>{if(ln(w))throw w;m?.(w,E)},children:_.jsx(b,{fallback:w=>{if(!h||w.routeId&&w.routeId!==a.routeId||!w.routeId&&!l.isRoot)throw w;return R.createElement(h,w)},children:y||a._displayPending?_.jsx(vA,{fallback:d,children:_.jsx(Jb,{matchId:n})}):_.jsx(Jb,{matchId:n})})})})}),a.parentRouteId===Hn&&r.options.scrollRestoration?_.jsxs(_.Fragment,{children:[_.jsx(VA,{}),_.jsx(HA,{})]}):null]})});function VA(){const e=tn(),n=R.useRef(void 0);return _.jsx("script",{suppressHydrationWarning:!0,ref:r=>{r&&(n.current===void 0||n.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...ms(e.state)}),n.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Jb=R.memo(function({matchId:n}){const r=tn(),{match:a,key:l,routeId:c}=It({select:m=>{const h=m.matches.find(x=>x.id===n),y=h.routeId,v=(r.routesById[y].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:y,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:v?JSON.stringify(v):void 0,routeId:y,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),d=r.routesById[c],f=R.useMemo(()=>{const m=d.options.component??r.options.defaultComponent;return m?_.jsx(m,{},l):_.jsx(hx,{})},[l,d.options.component,r.options.defaultComponent]);if(a._displayPending)throw r.getMatch(a.id)?._nonReactive.displayPendingPromise;if(a._forcePending)throw r.getMatch(a.id)?._nonReactive.minPendingPromise;if(a.status==="pending"){const m=d.options.pendingMinMs??r.options.defaultPendingMinMs;if(m){const h=r.getMatch(a.id);if(h&&!h._nonReactive.minPendingPromise){const y=vs();h._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),h._nonReactive.minPendingPromise=void 0},m)}}throw r.getMatch(a.id)?._nonReactive.loadPromise}if(a.status==="notFound")return vn(ln(a.error)),fx(r,d,a.error);if(a.status==="redirected")throw vn(Yn(a.error)),r.getMatch(a.id)?._nonReactive.loadPromise;if(a.status==="error")throw a.error;return f}),hx=R.memo(function(){const n=tn(),r=R.useContext(Bu),a=It({select:h=>h.matches.find(y=>y.id===r)?.routeId}),l=n.routesById[a],c=It({select:h=>{const g=h.matches.find(v=>v.id===r);return vn(g),g.globalNotFound}}),d=It({select:h=>{const y=h.matches,g=y.findIndex(v=>v.id===r);return y[g+1]?.id}}),f=n.options.defaultPendingComponent?_.jsx(n.options.defaultPendingComponent,{}):null;if(c)return fx(n,l,void 0);if(!d)return null;const m=_.jsx(dx,{matchId:d});return a===Hn?_.jsx(R.Suspense,{fallback:f,children:m}):m});function YA(){const e=tn(),r=e.routesById[Hn].options.pendingComponent??e.options.defaultPendingComponent,a=r?_.jsx(r,{}):null,l=typeof document<"u"&&e.ssr?ga:R.Suspense,c=_.jsxs(l,{fallback:a,children:[_.jsx(IA,{}),_.jsx(qA,{})]});return e.options.InnerWrap?_.jsx(e.options.InnerWrap,{children:c}):c}function qA(){const e=tn(),n=It({select:l=>l.matches[0]?.id}),r=It({select:l=>l.loadedAt}),a=n?_.jsx(dx,{matchId:n}):null;return _.jsx(Bu.Provider,{value:n,children:e.options.disableGlobalCatchBoundary?a:_.jsx(Lp,{getResetKey:()=>r,errorComponent:jp,onCatch:void 0,children:a})})}const GA=e=>new FA(e);class FA extends dC{constructor(n){super(n)}}typeof globalThis<"u"?(globalThis.createFileRoute=ka,globalThis.createLazyFileRoute=$b):typeof window<"u"&&(window.createFileRoute=ka,window.createLazyFileRoute=$b);function XA({router:e,children:n,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const a=_.jsx(ux.Provider,{value:e,children:n});return e.options.Wrap?_.jsx(e.options.Wrap,{children:a}):a}function KA({router:e,...n}){return _.jsx(XA,{router:e,...n,children:_.jsx(YA,{})})}function px({tag:e,attrs:n,children:r,nonce:a}){switch(e){case"title":return _.jsx("title",{...n,suppressHydrationWarning:!0,children:r});case"meta":return _.jsx("meta",{...n,suppressHydrationWarning:!0});case"link":return _.jsx("link",{...n,nonce:a,suppressHydrationWarning:!0});case"style":return _.jsx("style",{...n,dangerouslySetInnerHTML:{__html:r},nonce:a});case"script":return _.jsx(QA,{attrs:n,children:r});default:return null}}function QA({attrs:e,children:n}){tn();const r=Pp(),a=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(R.useEffect(()=>{if(!a){if(e?.src){const l=(()=>{try{const f=document.baseURI||window.location.href;return new URL(e.src,f).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(f=>f.src===l))return;const d=document.createElement("script");for(const[f,m]of Object.entries(e))f!=="suppressHydrationWarning"&&m!==void 0&&m!==!1&&d.setAttribute(f,typeof m=="boolean"?"":String(m));return document.head.appendChild(d),()=>{d.parentNode&&d.parentNode.removeChild(d)}}if(typeof n=="string"){const l=typeof e?.type=="string"?e.type:"text/javascript",c=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(m=>{if(!(m instanceof HTMLScriptElement))return!1;const h=m.getAttribute("type")??"text/javascript",y=m.getAttribute("nonce")??void 0;return m.textContent===n&&h===l&&y===c}))return;const f=document.createElement("script");if(f.textContent=n,e)for(const[m,h]of Object.entries(e))m!=="suppressHydrationWarning"&&h!==void 0&&h!==!1&&f.setAttribute(m,typeof h=="boolean"?"":String(h));return document.head.appendChild(f),()=>{f.parentNode&&f.parentNode.removeChild(f)}}}},[e,n,a]),a&&typeof n=="string")return _.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:n}});if(!r){if(e?.src)return _.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof n=="string")return _.jsx("script",{...e,dangerouslySetInnerHTML:{__html:n},suppressHydrationWarning:!0})}return null}const ZA=()=>{const e=tn(),n=e.options.ssr?.nonce,r=It({select:m=>m.matches.map(h=>h.meta).filter(Boolean)}),a=R.useMemo(()=>{const m=[],h={};let y;for(let g=r.length-1;g>=0;g--){const v=r[g];for(let b=v.length-1;b>=0;b--){const x=v[b];if(x)if(x.title)y||(y={tag:"title",children:x.title});else if("script:ld+json"in x)try{const w=JSON.stringify(x["script:ld+json"]);m.push({tag:"script",attrs:{type:"application/ld+json"},children:MT(w)})}catch{}else{const w=x.name??x.property;if(w){if(h[w])continue;h[w]=!0}m.push({tag:"meta",attrs:{...x,nonce:n}})}}}return y&&m.push(y),n&&m.push({tag:"meta",attrs:{property:"csp-nonce",content:n}}),m.reverse(),m},[r,n]),l=It({select:m=>{const h=m.matches.map(v=>v.links).filter(Boolean).flat(1).map(v=>({tag:"link",attrs:{...v,nonce:n}})),y=e.ssr?.manifest,g=m.matches.map(v=>y?.routes[v.routeId]?.assets??[]).filter(Boolean).flat(1).filter(v=>v.tag==="link").map(v=>({tag:"link",attrs:{...v.attrs,suppressHydrationWarning:!0,nonce:n}}));return[...h,...g]},structuralSharing:!0}),c=It({select:m=>{const h=[];return m.matches.map(y=>e.looseRoutesById[y.routeId]).forEach(y=>e.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(g=>{h.push({tag:"link",attrs:{rel:"modulepreload",href:g,nonce:n}})})),h},structuralSharing:!0}),d=It({select:m=>m.matches.map(h=>h.styles).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"style",attrs:{...y,nonce:n},children:h})),structuralSharing:!0}),f=It({select:m=>m.matches.map(h=>h.headScripts).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"script",attrs:{...y,nonce:n},children:h})),structuralSharing:!0});return $A([...a,...c,...l,...d,...f],m=>JSON.stringify(m))};function $A(e,n){const r=new Set;return e.filter(a=>{const l=n(a);return r.has(l)?!1:(r.add(l),!0)})}function JA(){const e=ZA(),r=tn().options.ssr?.nonce;return _.jsx(_.Fragment,{children:e.map(a=>R.createElement(px,{...a,key:`tsr-meta-${JSON.stringify(a)}`,nonce:r}))})}const WA=()=>{const e=tn(),n=e.options.ssr?.nonce,r=It({select:d=>{const f=[],m=e.ssr?.manifest;return m?(d.matches.map(h=>e.looseRoutesById[h.routeId]).forEach(h=>m.routes[h.id]?.assets?.filter(y=>y.tag==="script").forEach(y=>{f.push({tag:"script",attrs:{...y.attrs,nonce:n},children:y.children})})),f):[]},structuralSharing:!0}),{scripts:a}=It({select:d=>({scripts:d.matches.map(f=>f.scripts).flat(1).filter(Boolean).map(({children:f,...m})=>({tag:"script",attrs:{...m,suppressHydrationWarning:!0,nonce:n},children:f}))}),structuralSharing:!0});let l;e.serverSsr&&(l=e.serverSsr.takeBufferedScripts());const c=[...a,...r];return l&&c.unshift(l),_.jsx(_.Fragment,{children:c.map((d,f)=>R.createElement(px,{...d,key:`tsr-scripts-${d.tag}-${f}`}))})};function Wb(e){return e.replaceAll("\0","/").replaceAll("�","/")}function e_(e,n){e.id=n.i,e.__beforeLoadContext=n.b,e.loaderData=n.l,e.status=n.s,e.ssr=n.ssr,e.updatedAt=n.u,e.error=n.e}async function t_(e){vn(window.$_TSR);const n=e.options.serializationAdapters;if(n?.length){const E=new Map;n.forEach(C=>{E.set(C.key,C.fromSerializable)}),window.$_TSR.t=E,window.$_TSR.buffer.forEach(C=>C())}window.$_TSR.initialized=!0,vn(window.$_TSR.router);const r=window.$_TSR.router;r.matches.forEach(E=>{E.i=Wb(E.i)}),r.lastMatchId&&(r.lastMatchId=Wb(r.lastMatchId));const{manifest:a,dehydratedData:l,lastMatchId:c}=r;e.ssr={manifest:a};const f=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:f};const m=e.matchRoutes(e.state.location),h=Promise.all(m.map(E=>{const C=e.looseRoutesById[E.routeId];return e.loadRouteChunk(C)}));function y(E){const A=e.looseRoutesById[E.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(A){const k=vs();E._nonReactive.minPendingPromise=k,E._forcePending=!0,setTimeout(()=>{k.resolve(),e.updateMatch(E.id,O=>(O._nonReactive.minPendingPromise=void 0,{...O,_forcePending:void 0}))},A)}}function g(E){const C=e.looseRoutesById[E.routeId];C&&(C.options.ssr=E.ssr)}let v;m.forEach(E=>{const C=r.matches.find(A=>A.i===E.id);if(!C){E._nonReactive.dehydrated=!1,E.ssr=!1,g(E);return}e_(E,C),g(E),E._nonReactive.dehydrated=E.ssr!==!1,(E.ssr==="data-only"||E.ssr===!1)&&v===void 0&&(v=E.index,y(E))}),e.__store.setState(E=>({...E,matches:m})),await e.options.hydrate?.(l),await Promise.all(e.state.matches.map(async E=>{try{const C=e.looseRoutesById[E.routeId],k=e.state.matches[E.index-1]?.context??e.options.context;if(C.options.context){const j={deps:E.loaderDeps,params:E.params,context:k??{},location:e.state.location,navigate:z=>e.navigate({...z,_fromLocation:e.state.location}),buildLocation:e.buildLocation,cause:E.cause,abortController:E.abortController,preload:!1,matches:m,routeId:C.id};E.__routeContext=C.options.context(j)??void 0}E.context={...k,...E.__routeContext,...E.__beforeLoadContext};const O={ssr:e.options.ssr,matches:e.state.matches,match:E,params:E.params,loaderData:E.loaderData},L=await C.options.head?.(O),N=await C.options.scripts?.(O);E.meta=L?.meta,E.links=L?.links,E.headScripts=L?.scripts,E.styles=L?.styles,E.scripts=N}catch(C){if(ln(C))E.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${E.routeId}`,C);else throw E.error=C,console.error(`Error during hydration for route ${E.routeId}:`,C),C}}));const b=m[m.length-1].id!==c;if(!m.some(E=>E.ssr===!1)&&!b)return m.forEach(E=>{E._nonReactive.dehydrated=void 0}),h;const w=Promise.resolve().then(()=>e.load()).catch(E=>{console.error("Error during router hydration:",E)});if(b){const E=m[1];vn(E),y(E),E._displayPending=!0,E._nonReactive.displayPendingPromise=w,w.then(()=>{ba(()=>{e.__store.state.status==="pending"&&e.__store.setState(C=>({...C,status:"idle",resolvedLocation:C.location})),e.updateMatch(E.id,C=>({...C,_displayPending:void 0,displayPendingPromise:void 0}))})})}return h}const n_="__TSS_CONTEXT",sp=Symbol.for("TSS_SERVER_FUNCTION"),o_="x-tss-serialized",r_="x-tss-raw",mx="application/x-tss-framed",Lo={JSON:0,CHUNK:1,END:2,ERROR:3},ma=9,e0=1,s_=/;\s*v=(\d+)/;function a_(e){const n=e.match(s_);return n?parseInt(n[1],10):void 0}function i_(e){const n=a_(e);if(n!==void 0&&n!==e0)throw new Error(`Incompatible framed protocol version: server=${n}, client=${e0}. Please ensure client and server are using compatible versions.`)}const gx=()=>window.__TSS_START_OPTIONS__;function l_(){return[...gx()?.serializationAdapters?.map(QO)??[],...uA]}const t0=new TextDecoder,c_=new Uint8Array(0),n0=16*1024*1024,o0=32*1024*1024,r0=1024,s0=1e5;function u_(e){const n=new Map,r=new Map,a=new Set;let l=!1,c=null,d=0,f;const m=new ReadableStream({start(g){f=g},cancel(){l=!0;try{c?.cancel()}catch{}n.forEach(g=>{try{g.error(new Error("Framed response cancelled"))}catch{}}),n.clear(),r.clear(),a.clear()}});function h(g){const v=r.get(g);if(v)return v;if(a.has(g))return new ReadableStream({start(x){x.close()}});if(r.size>=r0)throw new Error(`Too many raw streams in framed response (max ${r0})`);const b=new ReadableStream({start(x){n.set(g,x)},cancel(){a.add(g),n.delete(g),r.delete(g)}});return r.set(g,b),b}function y(g){return h(g),n.get(g)}return(async()=>{const g=e.getReader();c=g;const v=[];let b=0;function x(){if(b<ma)return null;const E=v[0];if(E.length>=ma){const j=E[0],z=(E[1]<<24|E[2]<<16|E[3]<<8|E[4])>>>0,q=(E[5]<<24|E[6]<<16|E[7]<<8|E[8])>>>0;return{type:j,streamId:z,length:q}}const C=new Uint8Array(ma);let A=0,k=ma;for(let j=0;j<v.length&&k>0;j++){const z=v[j],q=Math.min(z.length,k);C.set(z.subarray(0,q),A),A+=q,k-=q}const O=C[0],L=(C[1]<<24|C[2]<<16|C[3]<<8|C[4])>>>0,N=(C[5]<<24|C[6]<<16|C[7]<<8|C[8])>>>0;return{type:O,streamId:L,length:N}}function w(E){if(E===0)return c_;const C=new Uint8Array(E);let A=0,k=E;for(;k>0&&v.length>0;){const O=v[0];if(!O)break;const L=Math.min(O.length,k);C.set(O.subarray(0,L),A),A+=L,k-=L,L===O.length?v.shift():v[0]=O.subarray(L)}return b-=E,C}try{for(;;){const{done:E,value:C}=await g.read();if(l||E)break;if(C){if(b+C.length>o0)throw new Error(`Framed response buffer exceeded ${o0} bytes`);for(v.push(C),b+=C.length;;){const A=x();if(!A)break;const{type:k,streamId:O,length:L}=A;if(k!==Lo.JSON&&k!==Lo.CHUNK&&k!==Lo.END&&k!==Lo.ERROR)throw new Error(`Unknown frame type: ${k}`);if(k===Lo.JSON){if(O!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(O===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(L>n0)throw new Error(`Frame payload too large: ${L} bytes (max ${n0})`);const N=ma+L;if(b<N)break;if(++d>s0)throw new Error(`Too many frames in framed response (max ${s0})`);w(ma);const j=w(L);switch(k){case Lo.JSON:{try{f.enqueue(t0.decode(j))}catch{}break}case Lo.CHUNK:{const z=y(O);z&&z.enqueue(j);break}case Lo.END:{const z=y(O);if(a.add(O),z){try{z.close()}catch{}n.delete(O)}break}case Lo.ERROR:{const z=y(O);if(a.add(O),z){const q=t0.decode(j);z.error(new Error(q)),n.delete(O)}break}}}}}if(b!==0)throw new Error("Incomplete frame at end of framed response");try{f.close()}catch{}n.forEach(E=>{try{E.close()}catch{}}),n.clear()}catch(E){try{f.error(E)}catch{}n.forEach(C=>{try{C.error(E)}catch{}}),n.clear()}finally{try{g.releaseLock()}catch{}c=null}})(),{getOrCreateStream:h,jsonChunks:m}}let Ra=null;const f_=Object.prototype.hasOwnProperty;function yx(e){for(const n in e)if(f_.call(e,n))return!0;return!1}async function d_(e,n,r){Ra||(Ra=l_());const l=n[0],c=l.fetch??r,d=l.data instanceof FormData?"formData":"payload",f=l.headers?new Headers(l.headers):new Headers;if(f.set("x-tsr-serverFn","true"),d==="payload"&&f.set("accept",`${mx}, application/x-ndjson, application/json`),l.method==="GET"){if(d==="formData")throw new Error("FormData is not supported with GET requests");const h=await vx(l);if(h!==void 0){const y=bS({payload:h});e.includes("?")?e+=`&${y}`:e+=`?${y}`}}let m;if(l.method==="POST"){const h=await h_(l);h?.contentType&&f.set("content-type",h.contentType),m=h?.body}return await p_(async()=>c(e,{method:l.method,headers:f,signal:l.signal,body:m}))}async function vx(e){let n=!1;const r={};if(e.data!==void 0&&(n=!0,r.data=e.data),e.context&&yx(e.context)&&(n=!0,r.context=e.context),n)return bx(r)}async function bx(e){return JSON.stringify(await Promise.resolve(KO(e,{plugins:Ra})))}async function h_(e){if(e.data instanceof FormData){let r;return e.context&&yx(e.context)&&(r=await bx(e.context)),r!==void 0&&e.data.set(n_,r),{body:e.data}}const n=await vx(e);if(n)return{body:n,contentType:"application/json"}}async function p_(e){let n;try{n=await e()}catch(l){if(l instanceof Response)n=l;else throw console.log(l),l}if(n.headers.get(r_)==="true")return n;const r=n.headers.get("content-type");if(vn(r),!!n.headers.get(o_)){let l;if(r.includes(mx)){if(i_(r),!n.body)throw new Error("No response body for framed response");const{getOrCreateStream:c,jsonChunks:d}=u_(n.body),m=[cA(c),...Ra||[]],h=new Map;l=await g_({jsonStream:d,onMessage:y=>kh(y,{refs:h,plugins:m}),onError(y,g){console.error(y,g)}})}else if(r.includes("application/x-ndjson")){const c=new Map;l=await m_({response:n,onMessage:d=>kh(d,{refs:c,plugins:Ra}),onError(d,f){console.error(d,f)}})}else if(r.includes("application/json")){const c=await n.json();l=kh(c,{plugins:Ra})}if(vn(l),l instanceof Error)throw l;return l}if(r.includes("application/json")){const l=await n.json(),c=nC(l);if(c)throw c;if(ln(l))throw l;return l}if(!n.ok)throw new Error(await n.text());return n}async function m_({response:e,onMessage:n,onError:r}){if(!e.body)throw new Error("No response body");const a=e.body.pipeThrough(new TextDecoderStream).getReader();let l="",c=!1,d;for(;!c;){const{value:f,done:m}=await a.read();if(f&&(l+=f),l.length===0&&m)throw new Error("Stream ended before first object");if(l.endsWith(`
13
- `)){const h=l.split(`
14
- `).filter(Boolean),y=h[0];if(!y)throw new Error("No JSON line in the first chunk");d=JSON.parse(y),c=!0,l=h.slice(1).join(`
15
- `)}else{const h=l.indexOf(`
16
- `);if(h>=0){const y=l.slice(0,h).trim();l=l.slice(h+1),y.length>0&&(d=JSON.parse(y),c=!0)}}}return(async()=>{try{for(;;){const{value:f,done:m}=await a.read();f&&(l+=f);const h=l.lastIndexOf(`
17
- `);if(h>=0){const y=l.slice(0,h);l=l.slice(h+1);const g=y.split(`
18
- `).filter(Boolean);for(const v of g)try{n(JSON.parse(v))}catch(b){r?.(`Invalid JSON line: ${v}`,b)}}if(m)break}}catch(f){r?.("Stream processing error:",f)}})(),n(d)}async function g_({jsonStream:e,onMessage:n,onError:r}){const a=e.getReader(),{value:l,done:c}=await a.read();if(c||!l)throw new Error("Stream ended before first object");const d=JSON.parse(l);return(async()=>{try{for(;;){const{value:f,done:m}=await a.read();if(m)break;if(f)try{n(JSON.parse(f))}catch(h){r?.(`Invalid JSON: ${f}`,h)}}}catch(f){r?.("Stream processing error:",f)}})(),n(d)}function y_(e){const n="/_serverFn/"+e;return Object.assign((...l)=>{const c=gx()?.serverFns?.fetch;return d_(n,l,c??fetch)},{url:n,serverFnMeta:{id:e},[sp]:!0})}const v_={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(sp in e)?!1:!!e[sp],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>y_(e)},b_="/assets/styles-DAZ1IN1z.css";const Sx=(...e)=>e.filter((n,r,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===r).join(" ").trim();const S_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const x_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,a)=>a?a.toUpperCase():r.toLowerCase());const a0=e=>{const n=x_(e);return n.charAt(0).toUpperCase()+n.slice(1)};var w_={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"};const E_=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};const R_=R.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:l="",children:c,iconNode:d,...f},m)=>R.createElement("svg",{ref:m,...w_,width:n,height:n,stroke:e,strokeWidth:a?Number(r)*24/Number(n):r,className:Sx("lucide",l),...!c&&!E_(f)&&{"aria-hidden":"true"},...f},[...d.map(([h,y])=>R.createElement(h,y)),...Array.isArray(c)?c:[c]]));const qo=(e,n)=>{const r=R.forwardRef(({className:a,...l},c)=>R.createElement(R_,{ref:c,iconNode:n,className:Sx(`lucide-${S_(a0(e))}`,`lucide-${e}`,a),...l}));return r.displayName=a0(e),r};const T_=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],C_=qo("chevron-right",T_);const M_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],O_=qo("circle-plus",M_);const A_=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],__=qo("ellipsis",A_);const D_=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],i0=qo("message-square",D_);const k_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],N_=qo("panel-left",k_);const z_=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],L_=qo("puzzle",z_);const j_=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],P_=qo("settings",j_);const I_=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],U_=qo("trash-2",I_);const B_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],H_=qo("x",B_);function ap(e,n){if(e&&!n)return e;if(!e&&n)return n;if(e||n)return{...e,...n}}const Fi={};function Ho(e,n,r,a,l){let c={...ip(e,Fi)};return n&&(c=Jc(c,n)),r&&(c=Jc(c,r)),a&&(c=Jc(c,a)),c}function V_(e){if(e.length===0)return Fi;if(e.length===1)return ip(e[0],Fi);let n={...ip(e[0],Fi)};for(let r=1;r<e.length;r+=1)n=Jc(n,e[r]);return n}function Jc(e,n){return xx(n)?n(e):Y_(e,n)}function Y_(e,n){if(!n)return e;for(const r in n){const a=n[r];switch(r){case"style":{e[r]=ap(e.style,a);break}case"className":{e[r]=wx(e.className,a);break}default:q_(r,a)?e[r]=G_(e[r],a):e[r]=a}}return e}function q_(e,n){const r=e.charCodeAt(0),a=e.charCodeAt(1),l=e.charCodeAt(2);return r===111&&a===110&&l>=65&&l<=90&&(typeof n=="function"||typeof n>"u")}function xx(e){return typeof e=="function"}function ip(e,n){return xx(e)?e(n):e??Fi}function G_(e,n){return n?e?r=>{if(F_(r)){const l=r;lp(l);const c=n(l);return l.baseUIHandlerPrevented||e?.(l),c}const a=n(r);return e?.(r),a}:n:e}function lp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function wx(e,n){return n?e?n+" "+e:n:e}function F_(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Zt(e,...n){const r=new URL("https://base-ui.com/production-error");return r.searchParams.set("code",e.toString()),n.forEach(a=>r.searchParams.append("args[]",a)),`Base UI error #${e}; visit ${r} for the full message.`}const l0={};function Qt(e,n){const r=R.useRef(l0);return r.current===l0&&(r.current=e(n)),r}function Na(e,n,r,a){const l=Qt(Ex).current;return K_(l,e,n,r,a)&&Rx(l,[e,n,r,a]),l.callback}function X_(e){const n=Qt(Ex).current;return Q_(n,e)&&Rx(n,e),n.callback}function Ex(){return{callback:null,cleanup:null,refs:[]}}function K_(e,n,r,a,l){return e.refs[0]!==n||e.refs[1]!==r||e.refs[2]!==a||e.refs[3]!==l}function Q_(e,n){return e.refs.length!==n.length||e.refs.some((r,a)=>r!==n[a])}function Rx(e,n){if(e.refs=n,n.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const a=Array(n.length).fill(null);for(let l=0;l<n.length;l+=1){const c=n[l];if(c!=null)switch(typeof c){case"function":{const d=c(r);typeof d=="function"&&(a[l]=d);break}case"object":{c.current=r;break}}}e.cleanup=()=>{for(let l=0;l<n.length;l+=1){const c=n[l];if(c!=null)switch(typeof c){case"function":{const d=a[l];typeof d=="function"?d():c(null);break}case"object":{c.current=null;break}}}}}}}const Z_=parseInt(R.version,10);function Vp(e){return Z_>=e}function c0(e){if(!R.isValidElement(e))return null;const n=e,r=n.props;return(Vp(19)?r?.ref:n.ref)??null}function $_(e,n){const r={};for(const a in e){const l=e[a];if(n?.hasOwnProperty(a)){const c=n[a](l);c!=null&&Object.assign(r,c);continue}l===!0?r[`data-${a.toLowerCase()}`]="":l&&(r[`data-${a.toLowerCase()}`]=l.toString())}return r}function J_(e,n){return typeof e=="function"?e(n):e}function W_(e,n){return typeof e=="function"?e(n):e}function yn(){}const cp=Object.freeze([]),Nt=Object.freeze({}),e2=500,t2=500,n2={style:{transition:"none"}},o2="data-base-ui-click-trigger",r2={fallbackAxisSide:"none"},Tx={fallbackAxisSide:"end"},s2={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Et(e,n,r={}){const a=n.render,l=a2(n,r);if(r.enabled===!1)return null;const c=r.state??Nt;return l2(e,a,l,c)}function a2(e,n={}){const{className:r,style:a,render:l}=e,{state:c=Nt,ref:d,props:f,stateAttributesMapping:m,enabled:h=!0}=n,y=h?J_(r,c):void 0,g=h?W_(a,c):void 0,v=h?$_(c,m):Nt,b=h?ap(v,Array.isArray(f)?V_(f):f)??Nt:Nt;return typeof document<"u"&&(h?Array.isArray(d)?b.ref=X_([b.ref,c0(l),...d]):b.ref=Na(b.ref,c0(l),d):Na(null,null)),h?(y!==void 0&&(b.className=wx(b.className,y)),g!==void 0&&(b.style=ap(b.style,g)),b):Nt}const i2=Symbol.for("react.lazy");function l2(e,n,r,a){if(n){if(typeof n=="function")return n(r,a);const l=Ho(r,n.props);l.ref=r.ref;let c=n;return c?.$$typeof===i2&&(c=R.Children.toArray(n)[0]),R.cloneElement(c,l)}if(e&&typeof e=="string")return c2(e,r);throw new Error(Zt(8))}function c2(e,n){return e==="button"?R.createElement("button",{type:"button",...n,key:n.key}):e==="img"?R.createElement("img",{alt:"",...n,key:n.key}):R.createElement(e,n)}function Vu(e){return Et(e.defaultTagName??"div",e,e)}function Cx(e){var n,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(n=0;n<l;n++)e[n]&&(r=Cx(e[n]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function Mx(){for(var e,n,r=0,a="",l=arguments.length;r<l;r++)(e=arguments[r])&&(n=Cx(e))&&(a&&(a+=" "),a+=n);return a}const u0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,f0=Mx,Yp=(e,n)=>r=>{var a;if(n?.variants==null)return f0(e,r?.class,r?.className);const{variants:l,defaultVariants:c}=n,d=Object.keys(l).map(h=>{const y=r?.[h],g=c?.[h];if(y===null)return null;const v=u0(y)||u0(g);return l[h][v]}),f=r&&Object.entries(r).reduce((h,y)=>{let[g,v]=y;return v===void 0||(h[g]=v),h},{}),m=n==null||(a=n.compoundVariants)===null||a===void 0?void 0:a.reduce((h,y)=>{let{class:g,className:v,...b}=y;return Object.entries(b).every(x=>{let[w,E]=x;return Array.isArray(E)?E.includes({...c,...f}[w]):{...c,...f}[w]===E})?[...h,g,v]:h},[]);return f0(e,d,m,r?.class,r?.className)};function Yu(){return typeof window<"u"}function Ir(e){return qp(e)?(e.nodeName||"").toLowerCase():"#document"}function zt(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function po(e){var n;return(n=(qp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function qp(e){return Yu()?e instanceof Node||e instanceof zt(e).Node:!1}function ot(e){return Yu()?e instanceof Element||e instanceof zt(e).Element:!1}function St(e){return Yu()?e instanceof HTMLElement||e instanceof zt(e).HTMLElement:!1}function up(e){return!Yu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zt(e).ShadowRoot}const u2=new Set(["inline","contents"]);function Ur(e){const{overflow:n,overflowX:r,overflowY:a,display:l}=An(e);return/auto|scroll|overlay|hidden|clip/.test(n+a+r)&&!u2.has(l)}const f2=new Set(["table","td","th"]);function d2(e){return f2.has(Ir(e))}const h2=[":popover-open",":modal"];function qu(e){return h2.some(n=>{try{return e.matches(n)}catch{return!1}})}const p2=["transform","translate","scale","rotate","perspective"],m2=["transform","translate","scale","rotate","perspective","filter"],g2=["paint","layout","strict","content"];function Gp(e){const n=Gu(),r=ot(e)?An(e):e;return p2.some(a=>r[a]?r[a]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||m2.some(a=>(r.willChange||"").includes(a))||g2.some(a=>(r.contain||"").includes(a))}function y2(e){let n=uo(e);for(;St(n)&&!io(n);){if(Gp(n))return n;if(qu(n))return null;n=uo(n)}return null}function Gu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const v2=new Set(["html","body","#document"]);function io(e){return v2.has(Ir(e))}function An(e){return zt(e).getComputedStyle(e)}function Fu(e){return ot(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uo(e){if(Ir(e)==="html")return e;const n=e.assignedSlot||e.parentNode||up(e)&&e.host||po(e);return up(n)?n.host:n}function Ox(e){const n=uo(e);return io(n)?e.ownerDocument?e.ownerDocument.body:e.body:St(n)&&Ur(n)?n:Ox(n)}function _r(e,n,r){var a;n===void 0&&(n=[]),r===void 0&&(r=!0);const l=Ox(e),c=l===((a=e.ownerDocument)==null?void 0:a.body),d=zt(l);if(c){const f=fp(d);return n.concat(d,d.visualViewport||[],Ur(l)?l:[],f&&r?_r(f):[])}return n.concat(l,_r(l,[],r))}function fp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Uh=Tp[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],b2=Uh&&Uh!==R.useLayoutEffect?Uh:e=>e();function Ce(e){const n=Qt(S2).current;return n.next=e,b2(n.effect),n.trampoline}function S2(){const e={next:void 0,callback:x2,trampoline:(...n)=>e.callback?.(...n),effect:()=>{e.callback=e.next}};return e}function x2(){}const w2={...Tp},E2=()=>{},Me=typeof document<"u"?R.useLayoutEffect:E2,R2=R.createContext(void 0);function Fp(e=!1){const n=R.useContext(R2);if(n===void 0&&!e)throw new Error(Zt(16));return n}function T2(e){const{focusableWhenDisabled:n,disabled:r,composite:a=!1,tabIndex:l=0,isNativeButton:c}=e,d=a&&n!==!1,f=a&&n===!1;return{props:R.useMemo(()=>{const h={onKeyDown(y){r&&n&&y.key!=="Tab"&&y.preventDefault()}};return a||(h.tabIndex=l,!c&&r&&(h.tabIndex=n?l:-1)),(c&&(n||d)||!c&&r)&&(h["aria-disabled"]=r),c&&(!n||f)&&(h.disabled=r),h},[a,r,n,d,f,c,l])}}function Xu(e={}){const{disabled:n=!1,focusableWhenDisabled:r,tabIndex:a=0,native:l=!0}=e,c=R.useRef(null),d=Fp(!0)!==void 0,f=Ce(()=>{const v=c.current;return!!(v?.tagName==="A"&&v?.href)}),{props:m}=T2({focusableWhenDisabled:r,disabled:n,composite:d,tabIndex:a,isNativeButton:l}),h=R.useCallback(()=>{const v=c.current;C2(v)&&d&&n&&m.disabled===void 0&&v.disabled&&(v.disabled=!1)},[n,m.disabled,d]);Me(h,[h]);const y=R.useCallback((v={})=>{const{onClick:b,onMouseDown:x,onKeyUp:w,onKeyDown:E,onPointerDown:C,...A}=v;return Ho({type:l?"button":void 0,onClick(O){if(n){O.preventDefault();return}b?.(O)},onMouseDown(O){n||x?.(O)},onKeyDown(O){if(n||(lp(O),E?.(O)),O.baseUIHandlerPrevented)return;const L=O.target===O.currentTarget&&!l&&!f()&&!n,N=O.key==="Enter",j=O.key===" ";L&&((j||N)&&O.preventDefault(),N&&b?.(O))},onKeyUp(O){n||(lp(O),w?.(O)),!O.baseUIHandlerPrevented&&O.target===O.currentTarget&&!l&&!n&&O.key===" "&&b?.(O)},onPointerDown(O){if(n){O.preventDefault();return}C?.(O)}},l?void 0:{role:"button"},m,A)},[n,m,l,f]),g=Ce(v=>{c.current=v,h()});return{getButtonProps:y,buttonRef:g}}function C2(e){return St(e)&&e.tagName==="BUTTON"}const M2=R.forwardRef(function(n,r){const{render:a,className:l,disabled:c=!1,focusableWhenDisabled:d=!1,nativeButton:f=!0,...m}=n,{getButtonProps:h,buttonRef:y}=Xu({disabled:c,focusableWhenDisabled:d,native:f});return Et("button",n,{state:{disabled:c},ref:[r,y],props:[m,h]})}),O2=(e,n)=>{const r=new Array(e.length+n.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<n.length;a++)r[e.length+a]=n[a];return r},A2=(e,n)=>({classGroupId:e,validator:n}),Ax=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),gu="-",d0=[],_2="arbitrary..",D2=e=>{const n=N2(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return k2(d);const f=d.split(gu),m=f[0]===""&&f.length>1?1:0;return _x(f,m,n)},getConflictingClassGroupIds:(d,f)=>{if(f){const m=a[d],h=r[d];return m?h?O2(h,m):m:h||d0}return r[d]||d0}}},_x=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const l=e[n],c=r.nextPart.get(l);if(c){const h=_x(e,n+1,c);if(h)return h}const d=r.validators;if(d===null)return;const f=n===0?e.join(gu):e.slice(n).join(gu),m=d.length;for(let h=0;h<m;h++){const y=d[h];if(y.validator(f))return y.classGroupId}},k2=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),a=n.slice(0,r);return a?_2+a:void 0})(),N2=e=>{const{theme:n,classGroups:r}=e;return z2(r,n)},z2=(e,n)=>{const r=Ax();for(const a in e){const l=e[a];Xp(l,r,a,n)}return r},Xp=(e,n,r,a)=>{const l=e.length;for(let c=0;c<l;c++){const d=e[c];L2(d,n,r,a)}},L2=(e,n,r,a)=>{if(typeof e=="string"){j2(e,n,r);return}if(typeof e=="function"){P2(e,n,r,a);return}I2(e,n,r,a)},j2=(e,n,r)=>{const a=e===""?n:Dx(n,e);a.classGroupId=r},P2=(e,n,r,a)=>{if(U2(e)){Xp(e(a),n,r,a);return}n.validators===null&&(n.validators=[]),n.validators.push(A2(r,e))},I2=(e,n,r,a)=>{const l=Object.entries(e),c=l.length;for(let d=0;d<c;d++){const[f,m]=l[d];Xp(m,Dx(n,f),r,a)}},Dx=(e,n)=>{let r=e;const a=n.split(gu),l=a.length;for(let c=0;c<l;c++){const d=a[c];let f=r.nextPart.get(d);f||(f=Ax(),r.nextPart.set(d,f)),r=f}return r},U2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,B2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),a=Object.create(null);const l=(c,d)=>{r[c]=d,n++,n>e&&(n=0,a=r,r=Object.create(null))};return{get(c){let d=r[c];if(d!==void 0)return d;if((d=a[c])!==void 0)return l(c,d),d},set(c,d){c in r?r[c]=d:l(c,d)}}},dp="!",h0=":",H2=[],p0=(e,n,r,a,l)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:a,isExternal:l}),V2=e=>{const{prefix:n,experimentalParseClassName:r}=e;let a=l=>{const c=[];let d=0,f=0,m=0,h;const y=l.length;for(let w=0;w<y;w++){const E=l[w];if(d===0&&f===0){if(E===h0){c.push(l.slice(m,w)),m=w+1;continue}if(E==="/"){h=w;continue}}E==="["?d++:E==="]"?d--:E==="("?f++:E===")"&&f--}const g=c.length===0?l:l.slice(m);let v=g,b=!1;g.endsWith(dp)?(v=g.slice(0,-1),b=!0):g.startsWith(dp)&&(v=g.slice(1),b=!0);const x=h&&h>m?h-m:void 0;return p0(c,b,v,x)};if(n){const l=n+h0,c=a;a=d=>d.startsWith(l)?c(d.slice(l.length)):p0(H2,!1,d,void 0,!0)}if(r){const l=a;a=c=>r({className:c,parseClassName:l})}return a},Y2=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{n.set(r,1e6+a)}),r=>{const a=[];let l=[];for(let c=0;c<r.length;c++){const d=r[c],f=d[0]==="[",m=n.has(d);f||m?(l.length>0&&(l.sort(),a.push(...l),l=[]),a.push(d)):l.push(d)}return l.length>0&&(l.sort(),a.push(...l)),a}},q2=e=>({cache:B2(e.cacheSize),parseClassName:V2(e),sortModifiers:Y2(e),...D2(e)}),G2=/\s+/,F2=(e,n)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:l,sortModifiers:c}=n,d=[],f=e.trim().split(G2);let m="";for(let h=f.length-1;h>=0;h-=1){const y=f[h],{isExternal:g,modifiers:v,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:w}=r(y);if(g){m=y+(m.length>0?" "+m:m);continue}let E=!!w,C=a(E?x.substring(0,w):x);if(!C){if(!E){m=y+(m.length>0?" "+m:m);continue}if(C=a(x),!C){m=y+(m.length>0?" "+m:m);continue}E=!1}const A=v.length===0?"":v.length===1?v[0]:c(v).join(":"),k=b?A+dp:A,O=k+C;if(d.indexOf(O)>-1)continue;d.push(O);const L=l(C,E);for(let N=0;N<L.length;++N){const j=L[N];d.push(k+j)}m=y+(m.length>0?" "+m:m)}return m},X2=(...e)=>{let n=0,r,a,l="";for(;n<e.length;)(r=e[n++])&&(a=kx(r))&&(l&&(l+=" "),l+=a);return l},kx=e=>{if(typeof e=="string")return e;let n,r="";for(let a=0;a<e.length;a++)e[a]&&(n=kx(e[a]))&&(r&&(r+=" "),r+=n);return r},K2=(e,...n)=>{let r,a,l,c;const d=m=>{const h=n.reduce((y,g)=>g(y),e());return r=q2(h),a=r.cache.get,l=r.cache.set,c=f,f(m)},f=m=>{const h=a(m);if(h)return h;const y=F2(m,r);return l(m,y),y};return c=d,(...m)=>c(X2(...m))},Q2=[],Pt=e=>{const n=r=>r[e]||Q2;return n.isThemeGetter=!0,n},Nx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Z2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,$2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,J2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,W2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xr=e=>Z2.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),wr=e=>!!e&&Number.isInteger(Number(e)),Bh=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),jo=e=>$2.test(e),Lx=()=>!0,nD=e=>J2.test(e)&&!W2.test(e),Kp=()=>!1,oD=e=>eD.test(e),rD=e=>tD.test(e),sD=e=>!Ee(e)&&!Re(e),aD=e=>Br(e,Ix,Kp),Ee=e=>Nx.test(e),cs=e=>Br(e,Ux,nD),m0=e=>Br(e,pD,Ge),iD=e=>Br(e,Hx,Lx),lD=e=>Br(e,Bx,Kp),g0=e=>Br(e,jx,Kp),cD=e=>Br(e,Px,rD),Nc=e=>Br(e,Vx,oD),Re=e=>zx.test(e),Hi=e=>Ts(e,Ux),uD=e=>Ts(e,Bx),y0=e=>Ts(e,jx),fD=e=>Ts(e,Ix),dD=e=>Ts(e,Px),zc=e=>Ts(e,Vx,!0),hD=e=>Ts(e,Hx,!0),Br=(e,n,r)=>{const a=Nx.exec(e);return a?a[1]?n(a[1]):r(a[2]):!1},Ts=(e,n,r=!1)=>{const a=zx.exec(e);return a?a[1]?n(a[1]):r:!1},jx=e=>e==="position"||e==="percentage",Px=e=>e==="image"||e==="url",Ix=e=>e==="length"||e==="size"||e==="bg-size",Ux=e=>e==="length",pD=e=>e==="number",Bx=e=>e==="family-name",Hx=e=>e==="number"||e==="weight",Vx=e=>e==="shadow",mD=()=>{const e=Pt("color"),n=Pt("font"),r=Pt("text"),a=Pt("font-weight"),l=Pt("tracking"),c=Pt("leading"),d=Pt("breakpoint"),f=Pt("container"),m=Pt("spacing"),h=Pt("radius"),y=Pt("shadow"),g=Pt("inset-shadow"),v=Pt("text-shadow"),b=Pt("drop-shadow"),x=Pt("blur"),w=Pt("perspective"),E=Pt("aspect"),C=Pt("ease"),A=Pt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...O(),Re,Ee],N=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],z=()=>[Re,Ee,m],q=()=>[xr,"full","auto",...z()],Z=()=>[wr,"none","subgrid",Re,Ee],Q=()=>["auto",{span:["full",wr,Re,Ee]},wr,Re,Ee],V=()=>[wr,"auto",Re,Ee],J=()=>["auto","min","max","fr",Re,Ee],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...z()],B=()=>[xr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],G=()=>[xr,"screen","full","dvw","lvw","svw","min","max","fit",...z()],ce=()=>[xr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],W=()=>[e,Re,Ee],P=()=>[...O(),y0,g0,{position:[Re,Ee]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],le=()=>["auto","cover","contain",fD,aD,{size:[Re,Ee]}],se=()=>[Bh,Hi,cs],ue=()=>["","none","full",h,Re,Ee],he=()=>["",Ge,Hi,cs],ve=()=>["solid","dashed","dotted","double"],Oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[Ge,Bh,y0,g0],Ne=()=>["","none",x,Re,Ee],je=()=>["none",Ge,Re,Ee],ne=()=>["none",Ge,Re,Ee],me=()=>[Ge,Re,Ee],pe=()=>[xr,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[jo],breakpoint:[jo],color:[Lx],container:[jo],"drop-shadow":[jo],ease:["in","out","in-out"],font:[sD],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[jo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[jo],shadow:[jo],spacing:["px",Ge],text:[jo],"text-shadow":[jo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xr,Ee,Re,E]}],container:["container"],columns:[{columns:[Ge,Ee,Re,f]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:q()}],"inset-x":[{"inset-x":q()}],"inset-y":[{"inset-y":q()}],start:[{"inset-s":q(),start:q()}],end:[{"inset-e":q(),end:q()}],"inset-bs":[{"inset-bs":q()}],"inset-be":[{"inset-be":q()}],top:[{top:q()}],right:[{right:q()}],bottom:[{bottom:q()}],left:[{left:q()}],visibility:["visible","invisible","collapse"],z:[{z:[wr,"auto",Re,Ee]}],basis:[{basis:[xr,"full","auto",f,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,xr,"auto","initial","none",Ee]}],grow:[{grow:["",Ge,Re,Ee]}],shrink:[{shrink:["",Ge,Re,Ee]}],order:[{order:[wr,"first","last","none",Re,Ee]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...ce()]}],"min-block-size":[{"min-block":["auto",...ce()]}],"max-block-size":[{"max-block":["none",...ce()]}],w:[{w:[f,"screen",...B()]}],"min-w":[{"min-w":[f,"screen","none",...B()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[d]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",r,Hi,cs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,hD,iD]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bh,Ee]}],"font-family":[{font:[uD,lD,n]}],"font-features":[{"font-features":[Ee]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,Re,Ee]}],"line-clamp":[{"line-clamp":[Ge,"none",Re,m0]}],leading:[{leading:[c,...z()]}],"list-image":[{"list-image":["none",Re,Ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,Ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",Re,cs]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[Ge,"auto",Re,Ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re,Ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Re,Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wr,Re,Ee],radial:["",Re,Ee],conic:[wr,Re,Ee]},dD,cD]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,Re,Ee]}],"outline-w":[{outline:["",Ge,Hi,cs]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",y,zc,Nc]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",g,zc,Nc]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[Ge,cs]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",v,zc,Nc]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[Ge,Re,Ee]}],"mix-blend":[{"mix-blend":[...Oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Oe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Re,Ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,Ee]}],filter:[{filter:["","none",Re,Ee]}],blur:[{blur:Ne()}],brightness:[{brightness:[Ge,Re,Ee]}],contrast:[{contrast:[Ge,Re,Ee]}],"drop-shadow":[{"drop-shadow":["","none",b,zc,Nc]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",Ge,Re,Ee]}],"hue-rotate":[{"hue-rotate":[Ge,Re,Ee]}],invert:[{invert:["",Ge,Re,Ee]}],saturate:[{saturate:[Ge,Re,Ee]}],sepia:[{sepia:["",Ge,Re,Ee]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,Ee]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,Re,Ee]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,Re,Ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,Re,Ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,Re,Ee]}],"backdrop-invert":[{"backdrop-invert":["",Ge,Re,Ee]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,Re,Ee]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,Re,Ee]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,Re,Ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Re,Ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",Re,Ee]}],ease:[{ease:["linear","initial",C,Re,Ee]}],delay:[{delay:[Ge,Re,Ee]}],animate:[{animate:["none",A,Re,Ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Re,Ee]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[Re,Ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Re,Ee]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Re,Ee]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[Ge,Hi,cs,m0]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},gD=K2(mD);function Je(...e){return gD(Mx(e))}const yD=Yp("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function oo({className:e,variant:n="default",size:r="default",...a}){return _.jsx(M2,{"data-slot":"button",className:Je(yD({variant:n,size:r,className:e})),...a})}let v0=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const vD={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},bD={valid(e){return e===null?null:e?{[v0.valid]:""}:{[v0.invalid]:""}}},SD=R.createContext({invalid:void 0,name:void 0,validityData:{state:vD,errors:[],error:"",value:"",initialValue:null},setValidityData:yn,disabled:void 0,touched:!1,setTouched:yn,dirty:!1,setDirty:yn,filled:!1,setFilled:yn,focused:!1,setFocused:yn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Nt)=>e,getInputValidationProps:(e=Nt)=>e,inputRef:{current:null},commit:async()=>{}}});function Yx(e=!0){const n=R.useContext(SD);if(n.setValidityData===yn&&!e)throw new Error(Zt(28));return n}const xD=R.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:yn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function wD(){return R.useContext(xD)}let b0=0;function ED(e,n="mui"){const[r,a]=R.useState(e),l=e||r;return R.useEffect(()=>{r==null&&(b0+=1,a(`${n}-${b0}`))},[r,n]),l}const S0=w2.useId;function Cs(e,n){if(S0!==void 0){const r=S0();return e??(n?`${n}-${r}`:r)}return ED(e,n)}function Hr(e){return Cs(e,"base-ui")}const RD=R.createContext({controlId:void 0,registerControlId:yn,labelId:void 0,setLabelId:yn,messageIds:[],setMessageIds:yn,getDescriptionProps:e=>e});function qx(){return R.useContext(RD)}const TD=[];function Qp(e){R.useEffect(e,TD)}const Vi=0;class fo{static create(){return new fo}currentId=Vi;start(n,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Vi,r()},n)}isStarted(){return this.currentId!==Vi}clear=()=>{this.currentId!==Vi&&(clearTimeout(this.currentId),this.currentId=Vi)};disposeEffect=()=>this.clear}function Fn(){const e=Qt(fo.create).current;return Qp(e.disposeEffect),e}function CD(e,n){return{...e,state:{...e.state,valid:!n&&e.state.valid}}}function it(e){return e?.ownerDocument||document}const Ba=typeof navigator<"u",Hh=OD(),Gx=_D(),Fx=AD(),Xx=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Kx=Hh.platform==="MacIntel"&&Hh.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Hh.platform),Qx=Ba&&/apple/i.test(navigator.vendor),hp=Ba&&/android/i.test(Gx)||/android/i.test(Fx),MD=Ba&&Gx.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Zx=Fx.includes("jsdom/");function OD(){if(!Ba)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function AD(){if(!Ba)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:n,version:r})=>`${n}/${r}`).join(" "):navigator.userAgent}function _D(){if(!Ba)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const pp="data-base-ui-focusable",$x="active",Jx="selected",Wx="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Dr="ArrowLeft",kr="ArrowRight",Zp="ArrowUp",ol="ArrowDown";function Vn(e){let n=e.activeElement;for(;n?.shadowRoot?.activeElement!=null;)n=n.shadowRoot.activeElement;return n}function qe(e,n){if(!e||!n)return!1;const r=n.getRootNode?.();if(e.contains(n))return!0;if(r&&up(r)){let a=n;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function yu(e,n){if(!ot(e))return!1;const r=e;if(n.hasElement(r))return!r.hasAttribute("data-trigger-disabled");for(const[,a]of n.entries())if(qe(a,r))return!a.hasAttribute("data-trigger-disabled");return!1}function rn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Jn(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const r=e;return r.target!=null&&n.contains(r.target)}function DD(e){return e.matches("html,body")}function Ku(e){return St(e)&&e.matches(Wx)}function mp(e){return e?e.getAttribute("role")==="combobox"&&Ku(e):!1}function kD(e){if(!e||Zx)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function vu(e){return e?e.hasAttribute(pp)?e:e.querySelector(`[${pp}]`)||e:null}function gs(e,n,r=!0){return e.filter(l=>l.parentId===n&&(!r||l.context?.open)).flatMap(l=>[l,...gs(e,l.id,r)])}function x0(e,n){let r=[],a=e.find(l=>l.id===n)?.parentId;for(;a;){const l=e.find(c=>c.id===a);a=l?.parentId,l&&(r=r.concat(l))}return r}function en(e){e.preventDefault(),e.stopPropagation()}function ND(e){return"nativeEvent"in e}function ew(e){return e.pointerType===""&&e.isTrusted?!0:hp&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function tw(e){return Zx?!1:!hp&&e.width===0&&e.height===0||hp&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function xs(e,n){const r=["mouse","pen"];return n||r.push("",void 0),r.includes(e)}function nw(e){const n=e.type;return n==="click"||n==="mousedown"||n==="keydown"||n==="keyup"}const zD=["top","right","bottom","left"],Nr=Math.min,On=Math.max,bu=Math.round,va=Math.floor,lo=e=>({x:e,y:e}),LD={left:"right",right:"left",bottom:"top",top:"bottom"},jD={start:"end",end:"start"};function Su(e,n,r){return On(e,Nr(n,r))}function ho(e,n){return typeof e=="function"?e(n):e}function bn(e){return e.split("-")[0]}function Go(e){return e.split("-")[1]}function $p(e){return e==="x"?"y":"x"}function Qu(e){return e==="y"?"height":"width"}const PD=new Set(["top","bottom"]);function qn(e){return PD.has(bn(e))?"y":"x"}function Zu(e){return $p(qn(e))}function ID(e,n,r){r===void 0&&(r=!1);const a=Go(e),l=Zu(e),c=Qu(l);let d=l==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";return n.reference[c]>n.floating[c]&&(d=xu(d)),[d,xu(d)]}function UD(e){const n=xu(e);return[gp(e),n,gp(n)]}function gp(e){return e.replace(/start|end/g,n=>jD[n])}const w0=["left","right"],E0=["right","left"],BD=["top","bottom"],HD=["bottom","top"];function VD(e,n,r){switch(e){case"top":case"bottom":return r?n?E0:w0:n?w0:E0;case"left":case"right":return n?BD:HD;default:return[]}}function YD(e,n,r,a){const l=Go(e);let c=VD(bn(e),r==="start",a);return l&&(c=c.map(d=>d+"-"+l),n&&(c=c.concat(c.map(gp)))),c}function xu(e){return e.replace(/left|right|bottom|top/g,n=>LD[n])}function qD(e){return{top:0,right:0,bottom:0,left:0,...e}}function Jp(e){return typeof e!="number"?qD(e):{top:e,right:e,bottom:e,left:e}}function wu(e){const{x:n,y:r,width:a,height:l}=e;return{width:a,height:l,top:r,left:n,right:n+a,bottom:r+l,x:n,y:r}}function Lc(e,n,r){return Math.floor(e/n)!==r}function Xi(e,n){return n<0||n>=e.current.length}function Vh(e,n){return Wt(e,{disabledIndices:n})}function R0(e,n){return Wt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:n})}function Wt(e,{startingIndex:n=-1,decrement:r=!1,disabledIndices:a,amount:l=1}={}){let c=n;do c+=r?-l:l;while(c>=0&&c<=e.current.length-1&&Ki(e,c,a));return c}function GD(e,{event:n,orientation:r,loopFocus:a,rtl:l,cols:c,disabledIndices:d,minIndex:f,maxIndex:m,prevIndex:h,stopEvent:y=!1}){let g=h;const v=[],b={};let x=!1;{let C=null,A=-1;e.current.forEach((k,O)=>{if(k==null)return;const L=k.closest('[role="row"]');L&&(x=!0),(L!==C||A===-1)&&(C=L,A+=1,v[A]=[]),v[A].push(O),b[O]=A})}const w=x&&v.length>0&&v.some(C=>C.length!==c);function E(C){if(!w||h===-1)return;const A=b[h];if(A==null)return;const k=v[A].indexOf(h);let O=C==="up"?A-1:A+1;a&&(O<0?O=v.length-1:O>=v.length&&(O=0));const L=new Set;for(;O>=0&&O<v.length&&!L.has(O);){L.add(O);const N=v[O];if(N.length===0){O=C==="up"?O-1:O+1;continue}const j=Math.min(k,N.length-1);for(let z=j;z>=0;z-=1){const q=N[z];if(!Ki(e,q,d))return q}O=C==="up"?O-1:O+1,a&&(O<0?O=v.length-1:O>=v.length&&(O=0))}}if(n.key===Zp){const C=E("up");if(C!==void 0)y&&en(n),g=C;else{if(y&&en(n),h===-1)g=m;else if(g=Wt(e,{startingIndex:g,amount:c,decrement:!0,disabledIndices:d}),a&&(h-c<f||g<0)){const A=h%c,k=m%c,O=m-(k-A);k===A?g=m:g=k>A?O:O-c}Xi(e,g)&&(g=h)}}if(n.key===ol){const C=E("down");C!==void 0?(y&&en(n),g=C):(y&&en(n),h===-1?g=f:(g=Wt(e,{startingIndex:h,amount:c,disabledIndices:d}),a&&h+c>m&&(g=Wt(e,{startingIndex:h%c-c,amount:c,disabledIndices:d}))),Xi(e,g)&&(g=h))}if(r==="both"){const C=va(h/c);n.key===(l?Dr:kr)&&(y&&en(n),h%c!==c-1?(g=Wt(e,{startingIndex:h,disabledIndices:d}),a&&Lc(g,c,C)&&(g=Wt(e,{startingIndex:h-h%c-1,disabledIndices:d}))):a&&(g=Wt(e,{startingIndex:h-h%c-1,disabledIndices:d})),Lc(g,c,C)&&(g=h)),n.key===(l?kr:Dr)&&(y&&en(n),h%c!==0?(g=Wt(e,{startingIndex:h,decrement:!0,disabledIndices:d}),a&&Lc(g,c,C)&&(g=Wt(e,{startingIndex:h+(c-h%c),decrement:!0,disabledIndices:d}))):a&&(g=Wt(e,{startingIndex:h+(c-h%c),decrement:!0,disabledIndices:d})),Lc(g,c,C)&&(g=h));const A=va(m/c)===C;Xi(e,g)&&(a&&A?g=n.key===(l?kr:Dr)?m:Wt(e,{startingIndex:h-h%c-1,disabledIndices:d}):g=h)}return g}function FD(e,n,r){const a=[];let l=0;return e.forEach(({width:c,height:d},f)=>{let m=!1;for(;!m;){const h=[];for(let y=0;y<c;y+=1)for(let g=0;g<d;g+=1)h.push(l+y+g*n);l%n+c<=n&&h.every(y=>a[y]==null)?(h.forEach(y=>{a[y]=f}),m=!0):l+=1}}),[...a]}function XD(e,n,r,a,l){if(e===-1)return-1;const c=r.indexOf(e),d=n[e];switch(l){case"tl":return c;case"tr":return d?c+d.width-1:c;case"bl":return d?c+(d.height-1)*a:c;case"br":return r.lastIndexOf(e);default:return-1}}function KD(e,n){return n.flatMap((r,a)=>e.includes(r)?[a]:[])}function Ki(e,n,r){if(typeof r=="function")return r(n);if(r)return r.includes(n);const a=e.current[n];return a?a.hasAttribute("disabled")||a.getAttribute("aria-disabled")==="true":!1}var QD=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Eu=QD.join(","),ow=typeof Element>"u",za=ow?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ru=!ow&&Element.prototype.getRootNode?function(e){var n;return e==null||(n=e.getRootNode)===null||n===void 0?void 0:n.call(e)}:function(e){return e?.ownerDocument},Tu=function(n,r){var a;r===void 0&&(r=!0);var l=n==null||(a=n.getAttribute)===null||a===void 0?void 0:a.call(n,"inert"),c=l===""||l==="true",d=c||r&&n&&(typeof n.closest=="function"?n.closest("[inert]"):Tu(n.parentNode));return d},ZD=function(n){var r,a=n==null||(r=n.getAttribute)===null||r===void 0?void 0:r.call(n,"contenteditable");return a===""||a==="true"},rw=function(n,r,a){if(Tu(n))return[];var l=Array.prototype.slice.apply(n.querySelectorAll(Eu));return r&&za.call(n,Eu)&&l.unshift(n),l=l.filter(a),l},Cu=function(n,r,a){for(var l=[],c=Array.from(n);c.length;){var d=c.shift();if(!Tu(d,!1))if(d.tagName==="SLOT"){var f=d.assignedElements(),m=f.length?f:d.children,h=Cu(m,!0,a);a.flatten?l.push.apply(l,h):l.push({scopeParent:d,candidates:h})}else{var y=za.call(d,Eu);y&&a.filter(d)&&(r||!n.includes(d))&&l.push(d);var g=d.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(d),v=!Tu(g,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(d));if(g&&v){var b=Cu(g===!0?d.children:g.children,!0,a);a.flatten?l.push.apply(l,b):l.push({scopeParent:d,candidates:b})}else c.unshift.apply(c,d.children)}}return l},sw=function(n){return!isNaN(parseInt(n.getAttribute("tabindex"),10))},aw=function(n){if(!n)throw new Error("No node provided");return n.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(n.tagName)||ZD(n))&&!sw(n)?0:n.tabIndex},$D=function(n,r){var a=aw(n);return a<0&&r&&!sw(n)?0:a},JD=function(n,r){return n.tabIndex===r.tabIndex?n.documentOrder-r.documentOrder:n.tabIndex-r.tabIndex},iw=function(n){return n.tagName==="INPUT"},WD=function(n){return iw(n)&&n.type==="hidden"},ek=function(n){var r=n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(a){return a.tagName==="SUMMARY"});return r},tk=function(n,r){for(var a=0;a<n.length;a++)if(n[a].checked&&n[a].form===r)return n[a]},nk=function(n){if(!n.name)return!0;var r=n.form||Ru(n),a=function(f){return r.querySelectorAll('input[type="radio"][name="'+f+'"]')},l;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")l=a(window.CSS.escape(n.name));else try{l=a(n.name)}catch(d){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",d.message),!1}var c=tk(l,n.form);return!c||c===n},ok=function(n){return iw(n)&&n.type==="radio"},rk=function(n){return ok(n)&&!nk(n)},sk=function(n){var r,a=n&&Ru(n),l=(r=a)===null||r===void 0?void 0:r.host,c=!1;if(a&&a!==n){var d,f,m;for(c=!!((d=l)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(l)||n!=null&&(m=n.ownerDocument)!==null&&m!==void 0&&m.contains(n));!c&&l;){var h,y,g;a=Ru(l),l=(h=a)===null||h===void 0?void 0:h.host,c=!!((y=l)!==null&&y!==void 0&&(g=y.ownerDocument)!==null&&g!==void 0&&g.contains(l))}}return c},T0=function(n){var r=n.getBoundingClientRect(),a=r.width,l=r.height;return a===0&&l===0},ak=function(n,r){var a=r.displayCheck,l=r.getShadowRoot;if(a==="full-native"&&"checkVisibility"in n){var c=n.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!c}if(getComputedStyle(n).visibility==="hidden")return!0;var d=za.call(n,"details>summary:first-of-type"),f=d?n.parentElement:n;if(za.call(f,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof l=="function"){for(var m=n;n;){var h=n.parentElement,y=Ru(n);if(h&&!h.shadowRoot&&l(h)===!0)return T0(n);n.assignedSlot?n=n.assignedSlot:!h&&y!==n.ownerDocument?n=y.host:n=h}n=m}if(sk(n))return!n.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return T0(n);return!1},ik=function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var r=n.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var a=0;a<r.children.length;a++){var l=r.children.item(a);if(l.tagName==="LEGEND")return za.call(r,"fieldset[disabled] *")?!0:!l.contains(n)}return!0}r=r.parentElement}return!1},yp=function(n,r){return!(r.disabled||WD(r)||ak(r,n)||ek(r)||ik(r))},vp=function(n,r){return!(rk(r)||aw(r)<0||!yp(n,r))},lk=function(n){var r=parseInt(n.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},lw=function(n){var r=[],a=[];return n.forEach(function(l,c){var d=!!l.scopeParent,f=d?l.scopeParent:l,m=$D(f,d),h=d?lw(l.candidates):f;m===0?d?r.push.apply(r,h):r.push(f):a.push({documentOrder:c,tabIndex:m,item:l,isScope:d,content:h})}),a.sort(JD).reduce(function(l,c){return c.isScope?l.push.apply(l,c.content):l.push(c.content),l},[]).concat(r)},rl=function(n,r){r=r||{};var a;return r.getShadowRoot?a=Cu([n],r.includeContainer,{filter:vp.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:lk}):a=rw(n,r.includeContainer,vp.bind(null,r)),lw(a)},ck=function(n,r){r=r||{};var a;return r.getShadowRoot?a=Cu([n],r.includeContainer,{filter:yp.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):a=rw(n,r.includeContainer,yp.bind(null,r)),a},cw=function(n,r){if(r=r||{},!n)throw new Error("No node provided");return za.call(n,Eu)===!1?!1:vp(r,n)};const Ha=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function uw(e,n){const r=rl(e,Ha()),a=r.length;if(a===0)return;const l=Vn(it(e)),c=r.indexOf(l),d=c===-1?n===1?0:a-1:c+n;return r[d]}function Wp(e){return uw(it(e).body,1)||e}function fw(e){return uw(it(e).body,-1)||e}function dw(e,n){if(!e)return null;const r=rl(it(e).body,Ha()),a=r.length;if(a===0)return null;const l=r.indexOf(e);if(l===-1)return null;const c=(l+n+a)%a;return r[c]}function uk(e){return dw(e,1)}function fk(e){return dw(e,-1)}function Ta(e,n){const r=n||e.currentTarget,a=e.relatedTarget;return!a||!qe(r,a)}function dk(e){rl(e,Ha()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function C0(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{const a=r.dataset.tabindex;delete r.dataset.tabindex,a?r.setAttribute("tabindex",a):r.removeAttribute("tabindex")})}const jc=null;class hk{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=n=>{this.isScheduled=!1;const r=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let l=0;l<r.length;l+=1)r[l]?.(n)};request(n){const r=this.nextId;return this.nextId+=1,this.callbacks.push(n),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(n){const r=n-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}}const Pc=new hk;class ao{static create(){return new ao}static request(n){return Pc.request(n)}static cancel(n){return Pc.cancel(n)}currentId=jc;request(n){this.cancel(),this.currentId=Pc.request(()=>{this.currentId=jc,n()})}cancel=()=>{this.currentId!==jc&&(Pc.cancel(this.currentId),this.currentId=jc)};disposeEffect=()=>this.cancel}function em(){const e=Qt(ao.create).current;return Qp(e.disposeEffect),e}function Po(e){return e==null?e:"current"in e?e.current:e}let Wi=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const pk={[Wi.startingStyle]:""},mk={[Wi.endingStyle]:""},$u={transitionStatus(e){return e==="starting"?pk:e==="ending"?mk:null}};function gk(e,n=!1,r=!0){const a=em();return Ce((l,c=null)=>{a.cancel();function d(){Gn.flushSync(l)}const f=Po(e);if(f==null)return;const m=f;if(typeof m.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)l();else{let h=function(){const g=Wi.startingStyle;if(!m.hasAttribute(g)){a.request(y);return}const v=new MutationObserver(()=>{m.hasAttribute(g)||(v.disconnect(),y())});v.observe(m,{attributes:!0,attributeFilter:[g]}),c?.addEventListener("abort",()=>v.disconnect(),{once:!0})},y=function(){Promise.all(m.getAnimations().map(g=>g.finished)).then(()=>{c?.aborted||d()}).catch(()=>{const g=m.getAnimations();if(r){if(c?.aborted)return;d()}else g.length>0&&g.some(v=>v.pending||v.playState!=="finished")&&y()})};if(n){h();return}a.request(y)}})}function Ju(e){const{enabled:n=!0,open:r,ref:a,onComplete:l}=e,c=Ce(l),d=gk(a,r,!1);R.useEffect(()=>{if(!n)return;const f=new AbortController;return d(c,f.signal),()=>{f.abort()}},[n,r,c,d])}function yk(e,n=!1,r=!1){const[a,l]=R.useState(e&&n?"idle":void 0),[c,d]=R.useState(e);return e&&!c&&(d(!0),l("starting")),!e&&c&&a!=="ending"&&!r&&l("ending"),!e&&!c&&a==="ending"&&l(void 0),Me(()=>{if(!e&&c&&a!=="ending"&&r){const f=ao.request(()=>{l("ending")});return()=>{ao.cancel(f)}}},[e,c,a,r]),Me(()=>{if(!e||n)return;const f=ao.request(()=>{l(void 0)});return()=>{ao.cancel(f)}},[n,e]),Me(()=>{if(!e||!n)return;e&&c&&a!=="idle"&&l("starting");const f=ao.request(()=>{l("idle")});return()=>{ao.cancel(f)}},[n,e,c,l,a]),R.useMemo(()=>({mounted:c,setMounted:d,transitionStatus:a}),[c,a])}function vk({controlled:e,default:n,name:r,state:a="value"}){const{current:l}=R.useRef(e!==void 0),[c,d]=R.useState(n),f=l?e:c,m=R.useCallback(h=>{l||d(h)},[]);return[f,m]}function bk(e={}){const{id:n,implicit:r=!1,controlRef:a}=e,{controlId:l,registerControlId:c}=qx(),d=Hr(n),f=r?l:void 0,m=Qt(()=>Symbol("labelable-control")),h=R.useRef(!1),y=R.useRef(n!=null),g=Ce(()=>{!h.current||c===yn||(h.current=!1,c(m.current,void 0))});return Me(()=>{if(c===yn)return;let v;if(r){const b=a?.current;ot(b)&&b.closest("label")!=null?v=n??null:v=f??d}else if(n!=null)y.current=!0,v=n;else if(y.current)v=d;else{g();return}if(v===void 0){g();return}h.current=!0,c(m.current,v)},[n,a,f,c,r,d,m,g]),R.useEffect(()=>g,[g]),l??d}function Sk(e){const{enabled:n=!0,value:r,id:a,name:l,controlRef:c,commit:d}=e,{formRef:f}=wD(),{invalid:m,markedDirtyRef:h,validityData:y,setValidityData:g}=Yx(),v=Ce(e.getValue);Me(()=>{if(!n)return;let b=r;b===void 0&&(b=v()),y.initialValue===null&&b!==null&&g(x=>({...x,initialValue:b}))},[n,g,r,y.initialValue,v]),Me(()=>{!n||!a||f.current.fields.set(a,{getValue:v,name:l,controlRef:c,validityData:CD(y,m),validate(b=!0){let x=r;x===void 0&&(x=v()),h.current=!0,b?Gn.flushSync(()=>d(x)):d(x)}})},[d,c,n,f,v,a,m,h,l,y,r]),Me(()=>{const b=f.current.fields;return()=>{a&&b.delete(a)}},[f,a])}const Wu="none",La="trigger-press",sn="trigger-hover",Ca="trigger-focus",tm="outside-press",hw="item-press",xk="close-press",ja="focus-out",ef="escape-key",Wc="list-navigation",wk="cancel-open",eu="sibling-open",Ek="disabled",nm="imperative-action";function Fe(e,n,r,a){let l=!1,c=!1;const d=Nt;return{reason:e,event:n??new Event("base-ui"),cancel(){l=!0},allowPropagation(){c=!0},get isCanceled(){return l},get isPropagationAllowed(){return c},trigger:r,...d}}const Rk=R.forwardRef(function(n,r){const{render:a,className:l,id:c,name:d,value:f,disabled:m=!1,onValueChange:h,defaultValue:y,autoFocus:g=!1,...v}=n,{state:b,name:x,disabled:w,setTouched:E,setDirty:C,validityData:A,setFocused:k,setFilled:O,validationMode:L,validation:N}=Yx(),j=w||m,z=x??d,q={...b,disabled:j},{labelId:Z}=qx(),Q=bk({id:c});Me(()=>{const B=f!=null;N.inputRef.current?.value||B&&f!==""?O(!0):B&&f===""&&O(!1)},[N.inputRef,O,f]);const V=R.useRef(null);Me(()=>{g&&V.current===Vn(it(V.current))&&k(!0)},[g,k]);const[J]=vk({controlled:f,default:y,name:"FieldControl",state:"value"}),te=f!==void 0,re=te?J:void 0;return Sk({id:Q,name:z,commit:N.commit,value:re,getValue:()=>N.inputRef.current?.value,controlRef:N.inputRef}),Et("input",n,{ref:[r,V],state:q,props:[{id:Q,disabled:j,name:z,ref:N.inputRef,"aria-labelledby":Z,autoFocus:g,...te?{value:re}:{defaultValue:y},onChange(B){const G=B.currentTarget.value;h?.(G,Fe(Wu,B.nativeEvent)),C(G!==A.initialValue),O(G!=="")},onFocus(){k(!0)},onBlur(B){E(!0),k(!1),L==="onBlur"&&N.commit(B.currentTarget.value)},onKeyDown(B){B.currentTarget.tagName==="INPUT"&&B.key==="Enter"&&(E(!0),N.commit(B.currentTarget.value))}},N.getInputValidationProps(),v],stateAttributesMapping:bD})}),Tk=R.forwardRef(function(n,r){return _.jsx(Rk,{ref:r,...n})});function Ck({className:e,type:n,...r}){return _.jsx(Tk,{type:n,"data-slot":"input",className:Je("dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",e),...r})}const Mk=R.forwardRef(function(n,r){const{className:a,render:l,orientation:c="horizontal",...d}=n;return Et("div",n,{state:{orientation:c},ref:r,props:[{role:"separator","aria-orientation":c},d]})}),pw=R.createContext(void 0);function Ms(e){const n=R.useContext(pw);if(e===!1&&n===void 0)throw new Error(Zt(27));return n}let hs=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Wi.startingStyle]="startingStyle",e[e.endingStyle=Wi.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Mu=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Ok={[Mu.popupOpen]:""},Ak={[Mu.popupOpen]:"",[Mu.pressed]:""},_k={[hs.open]:""},Dk={[hs.closed]:""},kk={[hs.anchorHidden]:""},mw={open(e){return e?Ok:null}},M0={open(e){return e?Ak:null}},Os={open(e){return e?_k:Dk},anchorHidden(e){return e?kk:null}},Nk={...Os,...$u},zk=R.forwardRef(function(n,r){const{render:a,className:l,forceRender:c=!1,...d}=n,{store:f}=Ms(),m=f.useState("open"),h=f.useState("nested"),y=f.useState("mounted"),g=f.useState("transitionStatus");return Et("div",n,{state:{open:m,transitionStatus:g},ref:[f.context.backdropRef,r],stateAttributesMapping:Nk,props:[{role:"presentation",hidden:!y,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:c||!h})}),Lk=R.forwardRef(function(n,r){const{render:a,className:l,disabled:c=!1,nativeButton:d=!0,...f}=n,{store:m}=Ms(),h=m.useState("open");function y(x){h&&m.setOpen(!1,Fe(xk,x.nativeEvent))}const{getButtonProps:g,buttonRef:v}=Xu({disabled:c,native:d});return Et("button",n,{state:{disabled:c},ref:[r,v],props:[{onClick:y},f,g]})}),jk=R.forwardRef(function(n,r){const{render:a,className:l,id:c,...d}=n,{store:f}=Ms(),m=Hr(c);return f.useSyncedValueWithCleanup("descriptionElementId",m),Et("p",n,{ref:r,props:[{id:m},d]})});function an(e){const n=Qt(Pk,e).current;return n.next=e,Me(n.effect),n}function Pk(e){const n={current:e,next:e,effect:()=>{n.current=n.next}};return n}function gw(){const e=new Map;return{emit(n,r){e.get(n)?.forEach(a=>a(r))},on(n,r){e.has(n)||e.set(n,new Set),e.get(n).add(r)},off(n,r){e.get(n)?.delete(r)}}}class om{nodesRef={current:[]};events=gw();addNode(n){this.nodesRef.current.push(n)}removeNode(n){const r=this.nodesRef.current.findIndex(a=>a===n);r!==-1&&this.nodesRef.current.splice(r,1)}}const yw=R.createContext(null),vw=R.createContext(null),Fo=()=>R.useContext(yw)?.id||null,Vr=e=>{const n=R.useContext(vw);return e??n};function bw(e){const n=Cs(),r=Vr(e),a=Fo();return Me(()=>{if(!n)return;const l={id:n,parentId:a};return r?.addNode(l),()=>{r?.removeNode(l)}},[r,n,a]),n}function Ik(e){const{children:n,id:r}=e,a=Fo();return _.jsx(yw.Provider,{value:R.useMemo(()=>({id:r,parentId:a}),[r,a]),children:n})}function Uk(e){const{children:n,externalTree:r}=e,a=Qt(()=>r??new om).current;return _.jsx(vw.Provider,{value:a,children:n})}function Pa(e){return`data-base-ui-${e}`}function tu(e,n,r){if(r&&!xs(r))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const a=e();return typeof a=="number"?a:a?.[n]}return e?.[n]}const Sw=R.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new fo,currentIdRef:{current:null},currentContextRef:{current:null}});function Bk(e){const{children:n,delay:r,timeoutMs:a=0}=e,l=R.useRef(r),c=R.useRef(r),d=R.useRef(null),f=R.useRef(null),m=Fn();return _.jsx(Sw.Provider,{value:R.useMemo(()=>({hasProvider:!0,delayRef:l,initialDelayRef:c,currentIdRef:d,timeoutMs:a,currentContextRef:f,timeout:m}),[a,m]),children:n})}function Hk(e,n={open:!1}){const r="rootStore"in e?e.rootStore:e,a=r.useState("floatingId"),{open:l}=n,c=R.useContext(Sw),{currentIdRef:d,delayRef:f,timeoutMs:m,initialDelayRef:h,currentContextRef:y,hasProvider:g,timeout:v}=c,[b,x]=R.useState(!1);return Me(()=>{function w(){x(!1),y.current?.setIsInstantPhase(!1),d.current=null,y.current=null,f.current=h.current}if(d.current&&!l&&d.current===a){if(x(!1),m){const E=a;return v.start(m,()=>{r.select("open")||d.current&&d.current!==E||w()}),()=>{v.clear()}}w()}},[l,a,d,f,m,h,y,v,r]),Me(()=>{if(!l)return;const w=y.current,E=d.current;v.clear(),y.current={onOpenChange:r.setOpen,setIsInstantPhase:x},d.current=a,f.current={open:0,close:tu(h.current,"close")},E!==null&&E!==a?(x(!0),w?.setIsInstantPhase(!0),w?.onOpenChange(!1,Fe(Wu))):(x(!1),w?.setIsInstantPhase(!1))},[l,a,r,d,f,m,h,y,v]),Me(()=>()=>{y.current=null},[y]),R.useMemo(()=>({hasProvider:g,delayRef:f,isInstantPhase:b}),[g,f,b])}const Vk={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},xw={...Vk,position:"fixed",top:0,left:0},Ia=R.forwardRef(function(n,r){const[a,l]=R.useState();Me(()=>{Qx&&l("button")},[]);const c={tabIndex:0,role:a};return _.jsx("span",{...n,ref:r,style:xw,"aria-hidden":a?void 0:!0,...c,"data-base-ui-focus-guard":""})});let O0=0;function Qi(e,n={}){const{preventScroll:r=!1,cancelPrevious:a=!0,sync:l=!1}=n;a&&cancelAnimationFrame(O0);const c=()=>e?.focus({preventScroll:r});l?c():O0=requestAnimationFrame(c)}const Ma={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function A0(e){return e==="inert"?Ma.inert:e==="aria-hidden"?Ma["aria-hidden"]:Ma.none}let Ic=new WeakSet,Uc={},Yh=0;const ww=e=>e&&(e.host||ww(e.parentNode)),Yk=(e,n)=>n.map(r=>{if(e.contains(r))return r;const a=ww(r);return e.contains(a)?a:null}).filter(r=>r!=null);function qk(e,n,r,a){const l="data-base-ui-inert",c=a?"inert":r?"aria-hidden":null,d=Yk(n,e),f=new Set,m=new Set(d),h=[];Uc[l]||(Uc[l]=new WeakMap);const y=Uc[l];d.forEach(g),v(n),f.clear();function g(b){!b||f.has(b)||(f.add(b),b.parentNode&&g(b.parentNode))}function v(b){!b||m.has(b)||[].forEach.call(b.children,x=>{if(Ir(x)!=="script")if(f.has(x))v(x);else{const w=c?x.getAttribute(c):null,E=w!==null&&w!=="false",C=A0(c),A=(C.get(x)||0)+1,k=(y.get(x)||0)+1;C.set(x,A),y.set(x,k),h.push(x),A===1&&E&&Ic.add(x),k===1&&x.setAttribute(l,""),!E&&c&&x.setAttribute(c,c==="inert"?"":"true")}})}return Yh+=1,()=>{h.forEach(b=>{const x=A0(c),E=(x.get(b)||0)-1,C=(y.get(b)||0)-1;x.set(b,E),y.set(b,C),E||(!Ic.has(b)&&c&&b.removeAttribute(c),Ic.delete(b)),C||b.removeAttribute(l)}),Yh-=1,Yh||(Ma.inert=new WeakMap,Ma["aria-hidden"]=new WeakMap,Ma.none=new WeakMap,Ic=new WeakSet,Uc={})}}function Gk(e,n=!1,r=!1){const a=it(e[0]).body;return qk(e.concat(Array.from(a.querySelectorAll("[aria-live]"))),a,n,r)}const Ew=R.createContext(null),Rw=()=>R.useContext(Ew),Fk=Pa("portal");function Tw(e={}){const{ref:n,container:r,componentProps:a=Nt,elementProps:l}=e,c=Cs(),f=Rw()?.portalNode,[m,h]=R.useState(null),[y,g]=R.useState(null),v=Ce(E=>{E!==null&&g(E)}),b=R.useRef(null);Me(()=>{if(r===null){b.current&&(b.current=null,g(null),h(null));return}if(c==null)return;const E=(r&&(qp(r)?r:r.current))??f??document.body;if(E==null){b.current&&(b.current=null,g(null),h(null));return}b.current!==E&&(b.current=E,g(null),h(E))},[r,f,c]);const x=Et("div",a,{ref:[n,v],props:[{id:c,[Fk]:""},l]});return{portalNode:y,portalSubtree:m&&x?Gn.createPortal(x,m):null}}const Cw=R.forwardRef(function(n,r){const{children:a,container:l,className:c,render:d,renderGuards:f,...m}=n,{portalNode:h,portalSubtree:y}=Tw({container:l,ref:r,componentProps:n,elementProps:m}),g=R.useRef(null),v=R.useRef(null),b=R.useRef(null),x=R.useRef(null),[w,E]=R.useState(null),C=w?.modal,A=w?.open,k=typeof f=="boolean"?f:!!w&&!w.modal&&w.open&&!!h;R.useEffect(()=>{if(!h||C)return;function L(N){h&&N.relatedTarget&&Ta(N)&&(N.type==="focusin"?C0:dk)(h)}return h.addEventListener("focusin",L,!0),h.addEventListener("focusout",L,!0),()=>{h.removeEventListener("focusin",L,!0),h.removeEventListener("focusout",L,!0)}},[h,C]),R.useEffect(()=>{!h||A||C0(h)},[A,h]);const O=R.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:v,beforeInsideRef:b,afterInsideRef:x,portalNode:h,setFocusManagerState:E}),[h]);return _.jsxs(R.Fragment,{children:[y,_.jsxs(Ew.Provider,{value:O,children:[k&&h&&_.jsx(Ia,{"data-type":"outside",ref:g,onFocus:L=>{if(Ta(L,h))b.current?.focus();else{const N=w?w.domReference:null;fw(N)?.focus()}}}),k&&h&&_.jsx("span",{"aria-owns":h.id,style:s2}),h&&Gn.createPortal(a,h),k&&h&&_.jsx(Ia,{"data-type":"outside",ref:v,onFocus:L=>{if(Ta(L,h))x.current?.focus();else{const N=w?w.domReference:null;Wp(N)?.focus(),w?.closeOnFocusOut&&w?.onOpenChange(!1,Fe(ja,L.nativeEvent))}}})]})]})});function Xk(e,n){const r=zt(e.target);return e instanceof r.KeyboardEvent?"keyboard":e instanceof r.FocusEvent?n||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof r.MouseEvent?n||(e.detail===0?"keyboard":"mouse"):""}const _0=20;let Mr=[];function rm(){Mr=Mr.filter(e=>e.deref()?.isConnected)}function Kk(e){rm(),e&&Ir(e)!=="body"&&(Mr.push(new WeakRef(e)),Mr.length>_0&&(Mr=Mr.slice(-_0)))}function qh(){return rm(),Mr[Mr.length-1]?.deref()}function Qk(e){if(!e)return null;const n=Ha();return cw(e,n)?e:rl(e,n)[0]||e}function Zk(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():An(e).display!=="none"}function D0(e,n){if(!n.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const r=Ha(),l=ck(e,r).filter(d=>{const f=d.getAttribute("data-tabindex")||"";return cw(d,r)||d.hasAttribute("data-tabindex")&&!f.startsWith("-")}),c=e.getAttribute("tabindex");n.current.includes("floating")||l.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Mw(e){const{context:n,children:r,disabled:a=!1,initialFocus:l=!0,returnFocus:c=!0,restoreFocus:d=!1,modal:f=!0,closeOnFocusOut:m=!0,openInteractionType:h="",nextFocusableElement:y,previousFocusableElement:g,beforeContentFocusGuardRef:v,externalTree:b}=e,x="rootStore"in n?n.rootStore:n,w=x.useState("open"),E=x.useState("domReferenceElement"),C=x.useState("floatingElement"),{events:A,dataRef:k}=x.context,O=Ce(()=>k.current.floatingContext?.nodeId),L=l===!1,N=mp(E)&&L,j=R.useRef(["content"]),z=an(l),q=an(c),Z=an(h),Q=Vr(b),V=Rw(),J=R.useRef(null),te=R.useRef(null),re=R.useRef(!1),I=R.useRef(!1),B=R.useRef(!1),G=R.useRef(-1),ce=R.useRef(""),W=R.useRef(""),P=R.useRef(null),X=R.useRef(null),le=Na(P,v,V?.beforeInsideRef),se=Na(X,V?.afterInsideRef),ue=Fn(),he=Fn(),ve=em(),Oe=V!=null,fe=vu(C),Ne=Ce((me=fe)=>me?rl(me,Ha()):[]),je=Ce(me=>{const pe=Ne(me);return j.current.map(()=>pe).filter(Boolean).flat()});R.useEffect(()=>{if(a||!f)return;function me(ze){ze.key==="Tab"&&qe(fe,Vn(it(fe)))&&Ne().length===0&&!N&&en(ze)}const pe=it(fe);return pe.addEventListener("keydown",me),()=>{pe.removeEventListener("keydown",me)}},[a,E,fe,f,j,N,Ne,je]),R.useEffect(()=>{if(a||!w)return;const me=it(fe);function pe(){B.current=!1}function ze(Se){const ye=rn(Se),de=qe(C,ye)||qe(E,ye)||qe(V?.portalNode,ye);B.current=!de,W.current=Se.pointerType||"keyboard",ye?.closest(`[${o2}]`)&&(I.current=!0)}function be(){W.current="keyboard"}return me.addEventListener("pointerdown",ze,!0),me.addEventListener("pointerup",pe,!0),me.addEventListener("pointercancel",pe,!0),me.addEventListener("keydown",be,!0),()=>{me.removeEventListener("pointerdown",ze,!0),me.removeEventListener("pointerup",pe,!0),me.removeEventListener("pointercancel",pe,!0),me.removeEventListener("keydown",be,!0)}},[a,C,E,fe,w,V]),R.useEffect(()=>{if(a||!m)return;const me=it(fe);function pe(){I.current=!0,he.start(0,()=>{I.current=!1})}function ze(we){const ge=rn(we),Ye=Ne().indexOf(ge);Ye!==-1&&(G.current=Ye)}function be(we){const ge=we.relatedTarget,De=we.currentTarget,Ye=rn(we);queueMicrotask(()=>{const Ue=O(),Ot=x.context.triggerElements,He=ge?.hasAttribute(Pa("focus-guard"))&&[P.current,X.current,V?.beforeInsideRef.current,V?.afterInsideRef.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,Po(g),Po(y)].includes(ge),We=!(qe(E,ge)||qe(C,ge)||qe(ge,C)||qe(V?.portalNode,ge)||ge!=null&&Ot.hasElement(ge)||Ot.hasMatchingElement(Pe=>qe(Pe,ge))||He||Q&&(gs(Q.nodesRef.current,Ue).find(Pe=>qe(Pe.context?.elements.floating,ge)||qe(Pe.context?.elements.domReference,ge))||x0(Q.nodesRef.current,Ue).find(Pe=>[Pe.context?.elements.floating,vu(Pe.context?.elements.floating)].includes(ge)||Pe.context?.elements.domReference===ge)));if(De===E&&fe&&D0(fe,j),d&&De!==E&&!Zk(Ye)&&Vn(me)===me.body){if(St(fe)&&(fe.focus(),d==="popup")){ve.request(()=>{fe.focus()});return}const Pe=G.current,Rt=Ne(),$t=Rt[Pe]||Rt[Rt.length-1]||fe;St($t)&&$t.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(N||!f)&&ge&&We&&!I.current&&(N||ge!==qh())&&(re.current=!0,x.setOpen(!1,Fe(ja,we)))})}function Se(){B.current||(k.current.insideReactTree=!0,ue.start(0,()=>{k.current.insideReactTree=!1}))}const ye=St(E)?E:null,de=[];if(!(!C&&!ye))return ye&&(ye.addEventListener("focusout",be),ye.addEventListener("pointerdown",pe),de.push(()=>{ye.removeEventListener("focusout",be),ye.removeEventListener("pointerdown",pe)})),C&&(C.addEventListener("focusin",ze),C.addEventListener("focusout",be),V&&(C.addEventListener("focusout",Se,!0),de.push(()=>{C.removeEventListener("focusout",Se,!0)})),de.push(()=>{C.removeEventListener("focusin",ze),C.removeEventListener("focusout",be)})),()=>{de.forEach(we=>{we()})}},[a,E,C,fe,f,Q,V,x,m,d,Ne,N,O,j,k,ue,he,ve,y,g]),R.useEffect(()=>{if(a||!C||!w)return;const me=Array.from(V?.portalNode?.querySelectorAll(`[${Pa("portal")}]`)||[]),ze=(Q?x0(Q.nodesRef.current,O()):[]).find(Se=>mp(Se.context?.elements.domReference||null))?.context?.elements.domReference,be=[C,ze,...me,J.current,te.current,P.current,X.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,Po(g),Po(y),N?E:null].filter(Se=>Se!=null);return Gk(be,f||N)},[w,a,E,C,f,j,V,N,Q,O,y,g]),Me(()=>{if(!w||a||!St(fe))return;const me=it(fe),pe=Vn(me);queueMicrotask(()=>{const ze=je(fe),be=z.current,Se=typeof be=="function"?be(Z.current||""):be;if(Se===void 0||Se===!1)return;let ye;Se===!0||Se===null?ye=ze[0]||fe:ye=Po(Se),ye=ye||ze[0]||fe,!qe(fe,pe)&&Qi(ye,{preventScroll:ye===fe})})},[a,w,fe,L,je,z,Z]),Me(()=>{if(a||!fe)return;const me=it(fe),pe=Vn(me);Kk(pe);function ze(ye){if(ye.open||(ce.current=Xk(ye.nativeEvent,W.current)),ye.reason===sn&&ye.nativeEvent.type==="mouseleave"&&(re.current=!0),ye.reason===tm)if(ye.nested)re.current=!1;else if(ew(ye.nativeEvent)||tw(ye.nativeEvent))re.current=!1;else{let de=!1;document.createElement("div").focus({get preventScroll(){return de=!0,!1}}),de?re.current=!1:re.current=!0}}A.on("openchange",ze);const be=me.createElement("span");be.setAttribute("tabindex","-1"),be.setAttribute("aria-hidden","true"),Object.assign(be.style,xw),Oe&&E&&E.insertAdjacentElement("afterend",be);function Se(){const ye=q.current;let de=typeof ye=="function"?ye(ce.current):ye;if(de===void 0||de===!1)return null;if(de===null&&(de=!0),typeof de=="boolean"){const ge=E||qh();return ge&&ge.isConnected?ge:be}const we=E||qh()||be;return Po(de)||we}return()=>{A.off("openchange",ze);const ye=Vn(me),de=qe(C,ye)||Q&&gs(Q.nodesRef.current,O(),!1).some(ge=>qe(ge.context?.elements.floating,ye)),we=Se();queueMicrotask(()=>{const ge=Qk(we),De=typeof q.current!="boolean";q.current&&!re.current&&St(ge)&&(!(!De&&ge!==ye&&ye!==me.body)||de)&&ge.focus({preventScroll:!0}),be.remove(),re.current=!1})}},[a,C,fe,q,k,A,Q,Oe,E,O]),Me(()=>{if(!Xx||w||!C)return;const me=Vn(it(C));!St(me)||!Ku(me)||qe(C,me)&&me.blur()},[w,C]),Me(()=>{if(!(a||!V))return V.setFocusManagerState({modal:f,closeOnFocusOut:m,open:w,onOpenChange:x.setOpen,domReference:E}),()=>{V.setFocusManagerState(null)}},[a,V,f,w,x,m,E]),Me(()=>{if(!(a||!fe))return D0(fe,j),()=>{queueMicrotask(rm)}},[a,fe,j]);const ne=!a&&(f?!N:!0)&&(Oe||f);return _.jsxs(R.Fragment,{children:[ne&&_.jsx(Ia,{"data-type":"inside",ref:le,onFocus:me=>{if(f){const pe=je();Qi(pe[pe.length-1])}else V?.portalNode&&(re.current=!1,Ta(me,V.portalNode)?Wp(E)?.focus():Po(g??V.beforeOutsideRef)?.focus())}}),r,ne&&_.jsx(Ia,{"data-type":"inside",ref:se,onFocus:me=>{f?Qi(je()[0]):V?.portalNode&&(m&&(re.current=!0),Ta(me,V.portalNode)?fw(E)?.focus():Po(y??V.afterOutsideRef)?.focus())}})]})}function Ow(e,n={}){const r="rootStore"in e?e.rootStore:e,a=r.context.dataRef,{enabled:l=!0,event:c="click",toggle:d=!0,ignoreMouse:f=!1,stickIfOpen:m=!0,touchOpenDelay:h=0,reason:y=La}=n,g=R.useRef(void 0),v=em(),b=Fn(),x=R.useMemo(()=>({onPointerDown(w){g.current=w.pointerType},onMouseDown(w){const E=g.current,C=w.nativeEvent,A=r.select("open");if(w.button!==0||c==="click"||xs(E,!0)&&f)return;const k=a.current.openEvent,O=k?.type,L=r.select("domReferenceElement")!==w.currentTarget,N=A&&L||!(A&&d&&(!(k&&m)||O==="click"||O==="mousedown"));if(Ku(C.target)){const z=Fe(y,C,C.target);N&&E==="touch"&&h>0?b.start(h,()=>{r.setOpen(!0,z)}):r.setOpen(N,z);return}const j=w.currentTarget;v.request(()=>{const z=Fe(y,C,j);N&&E==="touch"&&h>0?b.start(h,()=>{r.setOpen(!0,z)}):r.setOpen(N,z)})},onClick(w){if(c==="mousedown-only")return;const E=g.current;if(c==="mousedown"&&E){g.current=void 0;return}if(xs(E,!0)&&f)return;const C=r.select("open"),A=a.current.openEvent,k=r.select("domReferenceElement")!==w.currentTarget,O=C&&k||!(C&&d&&(!(A&&m)||nw(A))),L=Fe(y,w.nativeEvent,w.currentTarget);O&&E==="touch"&&h>0?b.start(h,()=>{r.setOpen(!0,L)}):r.setOpen(O,L)},onKeyDown(){g.current=void 0}}),[a,c,f,r,m,d,v,b,h,y]);return R.useMemo(()=>l?{reference:x}:Nt,[l,x])}function $k(e,n){let r=null,a=null,l=!1;return{contextElement:e||void 0,getBoundingClientRect(){const c=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},d=n.axis==="x"||n.axis==="both",f=n.axis==="y"||n.axis==="both",m=["mouseenter","mousemove"].includes(n.dataRef.current.openEvent?.type||"")&&n.pointerType!=="touch";let h=c.width,y=c.height,g=c.x,v=c.y;return r==null&&n.x&&d&&(r=c.x-n.x),a==null&&n.y&&f&&(a=c.y-n.y),g-=r||0,v-=a||0,h=0,y=0,!l||m?(h=n.axis==="y"?c.width:0,y=n.axis==="x"?c.height:0,g=d&&n.x!=null?n.x:g,v=f&&n.y!=null?n.y:v):l&&!m&&(y=n.axis==="x"?c.height:y,h=n.axis==="y"?c.width:h),l=!0,{width:h,height:y,x:g,y:v,top:v,right:g+h,bottom:v+y,left:g}}}}function k0(e){return e!=null&&e.clientX!=null}function Jk(e,n={}){const r="rootStore"in e?e.rootStore:e,a=r.useState("open"),l=r.useState("floatingElement"),c=r.useState("domReferenceElement"),d=r.context.dataRef,{enabled:f=!0,axis:m="both"}=n,h=R.useRef(!1),y=R.useRef(null),[g,v]=R.useState(),[b,x]=R.useState([]),w=Ce((O,L,N)=>{h.current||d.current.openEvent&&!k0(d.current.openEvent)||r.set("positionReference",$k(N??c,{x:O,y:L,axis:m,dataRef:d,pointerType:g}))}),E=Ce(O=>{a?y.current||x([]):w(O.clientX,O.clientY,O.currentTarget)}),C=xs(g)?l:a,A=R.useCallback(()=>{if(!C||!f)return;const O=zt(l);function L(N){const j=rn(N);qe(l,j)?(O.removeEventListener("mousemove",L),y.current=null):w(N.clientX,N.clientY)}if(!d.current.openEvent||k0(d.current.openEvent)){O.addEventListener("mousemove",L);const N=()=>{O.removeEventListener("mousemove",L),y.current=null};return y.current=N,N}r.set("positionReference",c)},[C,f,l,d,c,r,w]);R.useEffect(()=>A(),[A,b]),R.useEffect(()=>{f&&!l&&(h.current=!1)},[f,l]),R.useEffect(()=>{!f&&a&&(h.current=!0)},[f,a]);const k=R.useMemo(()=>{function O(L){v(L.pointerType)}return{onPointerDown:O,onPointerEnter:O,onMouseMove:E,onMouseEnter:E}},[E]);return R.useMemo(()=>f?{reference:k,trigger:k}:{},[f,k])}function N0(e,n,r){let{reference:a,floating:l}=e;const c=qn(n),d=Zu(n),f=Qu(d),m=bn(n),h=c==="y",y=a.x+a.width/2-l.width/2,g=a.y+a.height/2-l.height/2,v=a[f]/2-l[f]/2;let b;switch(m){case"top":b={x:y,y:a.y-l.height};break;case"bottom":b={x:y,y:a.y+a.height};break;case"right":b={x:a.x+a.width,y:g};break;case"left":b={x:a.x-l.width,y:g};break;default:b={x:a.x,y:a.y}}switch(Go(n)){case"start":b[d]-=v*(r&&h?-1:1);break;case"end":b[d]+=v*(r&&h?-1:1);break}return b}async function Wk(e,n){var r;n===void 0&&(n={});const{x:a,y:l,platform:c,rects:d,elements:f,strategy:m}=e,{boundary:h="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:v=!1,padding:b=0}=ho(n,e),x=Jp(b),E=f[v?g==="floating"?"reference":"floating":g],C=wu(await c.getClippingRect({element:(r=await(c.isElement==null?void 0:c.isElement(E)))==null||r?E:E.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:h,rootBoundary:y,strategy:m})),A=g==="floating"?{x:a,y:l,width:d.floating.width,height:d.floating.height}:d.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),O=await(c.isElement==null?void 0:c.isElement(k))?await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1}:{x:1,y:1},L=wu(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:A,offsetParent:k,strategy:m}):A);return{top:(C.top-L.top+x.top)/O.y,bottom:(L.bottom-C.bottom+x.bottom)/O.y,left:(C.left-L.left+x.left)/O.x,right:(L.right-C.right+x.right)/O.x}}const eN=async(e,n,r)=>{const{placement:a="bottom",strategy:l="absolute",middleware:c=[],platform:d}=r,f=c.filter(Boolean),m=await(d.isRTL==null?void 0:d.isRTL(n));let h=await d.getElementRects({reference:e,floating:n,strategy:l}),{x:y,y:g}=N0(h,a,m),v=a,b={},x=0;for(let E=0;E<f.length;E++){var w;const{name:C,fn:A}=f[E],{x:k,y:O,data:L,reset:N}=await A({x:y,y:g,initialPlacement:a,placement:v,strategy:l,middlewareData:b,rects:h,platform:{...d,detectOverflow:(w=d.detectOverflow)!=null?w:Wk},elements:{reference:e,floating:n}});y=k??y,g=O??g,b={...b,[C]:{...b[C],...L}},N&&x<=50&&(x++,typeof N=="object"&&(N.placement&&(v=N.placement),N.rects&&(h=N.rects===!0?await d.getElementRects({reference:e,floating:n,strategy:l}):N.rects),{x:y,y:g}=N0(h,v,m)),E=-1)}return{x:y,y:g,placement:v,strategy:l,middlewareData:b}},tN=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:a,placement:l,rects:c,platform:d,elements:f,middlewareData:m}=n,{element:h,padding:y=0}=ho(e,n)||{};if(h==null)return{};const g=Jp(y),v={x:r,y:a},b=Zu(l),x=Qu(b),w=await d.getDimensions(h),E=b==="y",C=E?"top":"left",A=E?"bottom":"right",k=E?"clientHeight":"clientWidth",O=c.reference[x]+c.reference[b]-v[b]-c.floating[x],L=v[b]-c.reference[b],N=await(d.getOffsetParent==null?void 0:d.getOffsetParent(h));let j=N?N[k]:0;(!j||!await(d.isElement==null?void 0:d.isElement(N)))&&(j=f.floating[k]||c.floating[x]);const z=O/2-L/2,q=j/2-w[x]/2-1,Z=Nr(g[C],q),Q=Nr(g[A],q),V=Z,J=j-w[x]-Q,te=j/2-w[x]/2+z,re=Su(V,te,J),I=!m.arrow&&Go(l)!=null&&te!==re&&c.reference[x]/2-(te<V?Z:Q)-w[x]/2<0,B=I?te<V?te-V:te-J:0;return{[b]:v[b]+B,data:{[b]:re,centerOffset:te-re-B,...I&&{alignmentOffset:B}},reset:I}}}),nN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,a;const{placement:l,middlewareData:c,rects:d,initialPlacement:f,platform:m,elements:h}=n,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,...E}=ho(e,n);if((r=c.arrow)!=null&&r.alignmentOffset)return{};const C=bn(l),A=qn(f),k=bn(f)===f,O=await(m.isRTL==null?void 0:m.isRTL(h.floating)),L=v||(k||!w?[xu(f)]:UD(f)),N=x!=="none";!v&&N&&L.push(...YD(f,w,x,O));const j=[f,...L],z=await m.detectOverflow(n,E),q=[];let Z=((a=c.flip)==null?void 0:a.overflows)||[];if(y&&q.push(z[C]),g){const te=ID(l,d,O);q.push(z[te[0]],z[te[1]])}if(Z=[...Z,{placement:l,overflows:q}],!q.every(te=>te<=0)){var Q,V;const te=(((Q=c.flip)==null?void 0:Q.index)||0)+1,re=j[te];if(re&&(!(g==="alignment"?A!==qn(re):!1)||Z.every(G=>qn(G.placement)===A?G.overflows[0]>0:!0)))return{data:{index:te,overflows:Z},reset:{placement:re}};let I=(V=Z.filter(B=>B.overflows[0]<=0).sort((B,G)=>B.overflows[1]-G.overflows[1])[0])==null?void 0:V.placement;if(!I)switch(b){case"bestFit":{var J;const B=(J=Z.filter(G=>{if(N){const ce=qn(G.placement);return ce===A||ce==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(ce=>ce>0).reduce((ce,W)=>ce+W,0)]).sort((G,ce)=>G[1]-ce[1])[0])==null?void 0:J[0];B&&(I=B);break}case"initialPlacement":I=f;break}if(l!==I)return{reset:{placement:I}}}return{}}}};function z0(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function L0(e){return zD.some(n=>e[n]>=0)}const oN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r,platform:a}=n,{strategy:l="referenceHidden",...c}=ho(e,n);switch(l){case"referenceHidden":{const d=await a.detectOverflow(n,{...c,elementContext:"reference"}),f=z0(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:L0(f)}}}case"escaped":{const d=await a.detectOverflow(n,{...c,altBoundary:!0}),f=z0(d,r.floating);return{data:{escapedOffsets:f,escaped:L0(f)}}}default:return{}}}}},Aw=new Set(["left","top"]);async function rN(e,n){const{placement:r,platform:a,elements:l}=e,c=await(a.isRTL==null?void 0:a.isRTL(l.floating)),d=bn(r),f=Go(r),m=qn(r)==="y",h=Aw.has(d)?-1:1,y=c&&m?-1:1,g=ho(n,e);let{mainAxis:v,crossAxis:b,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof x=="number"&&(b=f==="end"?x*-1:x),m?{x:b*y,y:v*h}:{x:v*h,y:b*y}}const sN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,a;const{x:l,y:c,placement:d,middlewareData:f}=n,m=await rN(n,e);return d===((r=f.offset)==null?void 0:r.placement)&&(a=f.arrow)!=null&&a.alignmentOffset?{}:{x:l+m.x,y:c+m.y,data:{...m,placement:d}}}}},aN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:a,placement:l,platform:c}=n,{mainAxis:d=!0,crossAxis:f=!1,limiter:m={fn:C=>{let{x:A,y:k}=C;return{x:A,y:k}}},...h}=ho(e,n),y={x:r,y:a},g=await c.detectOverflow(n,h),v=qn(bn(l)),b=$p(v);let x=y[b],w=y[v];if(d){const C=b==="y"?"top":"left",A=b==="y"?"bottom":"right",k=x+g[C],O=x-g[A];x=Su(k,x,O)}if(f){const C=v==="y"?"top":"left",A=v==="y"?"bottom":"right",k=w+g[C],O=w-g[A];w=Su(k,w,O)}const E=m.fn({...n,[b]:x,[v]:w});return{...E,data:{x:E.x-r,y:E.y-a,enabled:{[b]:d,[v]:f}}}}}},iN=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:a,placement:l,rects:c,middlewareData:d}=n,{offset:f=0,mainAxis:m=!0,crossAxis:h=!0}=ho(e,n),y={x:r,y:a},g=qn(l),v=$p(g);let b=y[v],x=y[g];const w=ho(f,n),E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(m){const k=v==="y"?"height":"width",O=c.reference[v]-c.floating[k]+E.mainAxis,L=c.reference[v]+c.reference[k]-E.mainAxis;b<O?b=O:b>L&&(b=L)}if(h){var C,A;const k=v==="y"?"width":"height",O=Aw.has(bn(l)),L=c.reference[g]-c.floating[k]+(O&&((C=d.offset)==null?void 0:C[g])||0)+(O?0:E.crossAxis),N=c.reference[g]+c.reference[k]+(O?0:((A=d.offset)==null?void 0:A[g])||0)-(O?E.crossAxis:0);x<L?x=L:x>N&&(x=N)}return{[v]:b,[g]:x}}}},lN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,a;const{placement:l,rects:c,platform:d,elements:f}=n,{apply:m=()=>{},...h}=ho(e,n),y=await d.detectOverflow(n,h),g=bn(l),v=Go(l),b=qn(l)==="y",{width:x,height:w}=c.floating;let E,C;g==="top"||g==="bottom"?(E=g,C=v===(await(d.isRTL==null?void 0:d.isRTL(f.floating))?"start":"end")?"left":"right"):(C=g,E=v==="end"?"top":"bottom");const A=w-y.top-y.bottom,k=x-y.left-y.right,O=Nr(w-y[E],A),L=Nr(x-y[C],k),N=!n.middlewareData.shift;let j=O,z=L;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(z=k),(a=n.middlewareData.shift)!=null&&a.enabled.y&&(j=A),N&&!v){const Z=On(y.left,0),Q=On(y.right,0),V=On(y.top,0),J=On(y.bottom,0);b?z=x-2*(Z!==0||Q!==0?Z+Q:On(y.left,y.right)):j=w-2*(V!==0||J!==0?V+J:On(y.top,y.bottom))}await m({...n,availableWidth:z,availableHeight:j});const q=await d.getDimensions(f.floating);return x!==q.width||w!==q.height?{reset:{rects:!0}}:{}}}};function _w(e){const n=An(e);let r=parseFloat(n.width)||0,a=parseFloat(n.height)||0;const l=St(e),c=l?e.offsetWidth:r,d=l?e.offsetHeight:a,f=bu(r)!==c||bu(a)!==d;return f&&(r=c,a=d),{width:r,height:a,$:f}}function sm(e){return ot(e)?e:e.contextElement}function Oa(e){const n=sm(e);if(!St(n))return lo(1);const r=n.getBoundingClientRect(),{width:a,height:l,$:c}=_w(n);let d=(c?bu(r.width):r.width)/a,f=(c?bu(r.height):r.height)/l;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const cN=lo(0);function Dw(e){const n=zt(e);return!Gu()||!n.visualViewport?cN:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function uN(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==zt(e)?!1:n}function ws(e,n,r,a){n===void 0&&(n=!1),r===void 0&&(r=!1);const l=e.getBoundingClientRect(),c=sm(e);let d=lo(1);n&&(a?ot(a)&&(d=Oa(a)):d=Oa(e));const f=uN(c,r,a)?Dw(c):lo(0);let m=(l.left+f.x)/d.x,h=(l.top+f.y)/d.y,y=l.width/d.x,g=l.height/d.y;if(c){const v=zt(c),b=a&&ot(a)?zt(a):a;let x=v,w=fp(x);for(;w&&a&&b!==x;){const E=Oa(w),C=w.getBoundingClientRect(),A=An(w),k=C.left+(w.clientLeft+parseFloat(A.paddingLeft))*E.x,O=C.top+(w.clientTop+parseFloat(A.paddingTop))*E.y;m*=E.x,h*=E.y,y*=E.x,g*=E.y,m+=k,h+=O,x=zt(w),w=fp(x)}}return wu({width:y,height:g,x:m,y:h})}function tf(e,n){const r=Fu(e).scrollLeft;return n?n.left+r:ws(po(e)).left+r}function kw(e,n){const r=e.getBoundingClientRect(),a=r.left+n.scrollLeft-tf(e,r),l=r.top+n.scrollTop;return{x:a,y:l}}function fN(e){let{elements:n,rect:r,offsetParent:a,strategy:l}=e;const c=l==="fixed",d=po(a),f=n?qu(n.floating):!1;if(a===d||f&&c)return r;let m={scrollLeft:0,scrollTop:0},h=lo(1);const y=lo(0),g=St(a);if((g||!g&&!c)&&((Ir(a)!=="body"||Ur(d))&&(m=Fu(a)),St(a))){const b=ws(a);h=Oa(a),y.x=b.x+a.clientLeft,y.y=b.y+a.clientTop}const v=d&&!g&&!c?kw(d,m):lo(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-m.scrollLeft*h.x+y.x+v.x,y:r.y*h.y-m.scrollTop*h.y+y.y+v.y}}function dN(e){return Array.from(e.getClientRects())}function hN(e){const n=po(e),r=Fu(e),a=e.ownerDocument.body,l=On(n.scrollWidth,n.clientWidth,a.scrollWidth,a.clientWidth),c=On(n.scrollHeight,n.clientHeight,a.scrollHeight,a.clientHeight);let d=-r.scrollLeft+tf(e);const f=-r.scrollTop;return An(a).direction==="rtl"&&(d+=On(n.clientWidth,a.clientWidth)-l),{width:l,height:c,x:d,y:f}}const j0=25;function pN(e,n){const r=zt(e),a=po(e),l=r.visualViewport;let c=a.clientWidth,d=a.clientHeight,f=0,m=0;if(l){c=l.width,d=l.height;const y=Gu();(!y||y&&n==="fixed")&&(f=l.offsetLeft,m=l.offsetTop)}const h=tf(a);if(h<=0){const y=a.ownerDocument,g=y.body,v=getComputedStyle(g),b=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(a.clientWidth-g.clientWidth-b);x<=j0&&(c-=x)}else h<=j0&&(c+=h);return{width:c,height:d,x:f,y:m}}const mN=new Set(["absolute","fixed"]);function gN(e,n){const r=ws(e,!0,n==="fixed"),a=r.top+e.clientTop,l=r.left+e.clientLeft,c=St(e)?Oa(e):lo(1),d=e.clientWidth*c.x,f=e.clientHeight*c.y,m=l*c.x,h=a*c.y;return{width:d,height:f,x:m,y:h}}function P0(e,n,r){let a;if(n==="viewport")a=pN(e,r);else if(n==="document")a=hN(po(e));else if(ot(n))a=gN(n,r);else{const l=Dw(e);a={x:n.x-l.x,y:n.y-l.y,width:n.width,height:n.height}}return wu(a)}function Nw(e,n){const r=uo(e);return r===n||!ot(r)||io(r)?!1:An(r).position==="fixed"||Nw(r,n)}function yN(e,n){const r=n.get(e);if(r)return r;let a=_r(e,[],!1).filter(f=>ot(f)&&Ir(f)!=="body"),l=null;const c=An(e).position==="fixed";let d=c?uo(e):e;for(;ot(d)&&!io(d);){const f=An(d),m=Gp(d);!m&&f.position==="fixed"&&(l=null),(c?!m&&!l:!m&&f.position==="static"&&!!l&&mN.has(l.position)||Ur(d)&&!m&&Nw(e,d))?a=a.filter(y=>y!==d):l=f,d=uo(d)}return n.set(e,a),a}function vN(e){let{element:n,boundary:r,rootBoundary:a,strategy:l}=e;const d=[...r==="clippingAncestors"?qu(n)?[]:yN(n,this._c):[].concat(r),a],f=d[0],m=d.reduce((h,y)=>{const g=P0(n,y,l);return h.top=On(g.top,h.top),h.right=Nr(g.right,h.right),h.bottom=Nr(g.bottom,h.bottom),h.left=On(g.left,h.left),h},P0(n,f,l));return{width:m.right-m.left,height:m.bottom-m.top,x:m.left,y:m.top}}function bN(e){const{width:n,height:r}=_w(e);return{width:n,height:r}}function SN(e,n,r){const a=St(n),l=po(n),c=r==="fixed",d=ws(e,!0,c,n);let f={scrollLeft:0,scrollTop:0};const m=lo(0);function h(){m.x=tf(l)}if(a||!a&&!c)if((Ir(n)!=="body"||Ur(l))&&(f=Fu(n)),a){const b=ws(n,!0,c,n);m.x=b.x+n.clientLeft,m.y=b.y+n.clientTop}else l&&h();c&&!a&&l&&h();const y=l&&!a&&!c?kw(l,f):lo(0),g=d.left+f.scrollLeft-m.x-y.x,v=d.top+f.scrollTop-m.y-y.y;return{x:g,y:v,width:d.width,height:d.height}}function Gh(e){return An(e).position==="static"}function I0(e,n){if(!St(e)||An(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return po(e)===r&&(r=r.ownerDocument.body),r}function zw(e,n){const r=zt(e);if(qu(e))return r;if(!St(e)){let l=uo(e);for(;l&&!io(l);){if(ot(l)&&!Gh(l))return l;l=uo(l)}return r}let a=I0(e,n);for(;a&&d2(a)&&Gh(a);)a=I0(a,n);return a&&io(a)&&Gh(a)&&!Gp(a)?r:a||y2(e)||r}const xN=async function(e){const n=this.getOffsetParent||zw,r=this.getDimensions,a=await r(e.floating);return{reference:SN(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function wN(e){return An(e).direction==="rtl"}const EN={convertOffsetParentRelativeRectToViewportRelativeRect:fN,getDocumentElement:po,getClippingRect:vN,getOffsetParent:zw,getElementRects:xN,getClientRects:dN,getDimensions:bN,getScale:Oa,isElement:ot,isRTL:wN};function Lw(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function RN(e,n){let r=null,a;const l=po(e);function c(){var f;clearTimeout(a),(f=r)==null||f.disconnect(),r=null}function d(f,m){f===void 0&&(f=!1),m===void 0&&(m=1),c();const h=e.getBoundingClientRect(),{left:y,top:g,width:v,height:b}=h;if(f||n(),!v||!b)return;const x=va(g),w=va(l.clientWidth-(y+v)),E=va(l.clientHeight-(g+b)),C=va(y),k={rootMargin:-x+"px "+-w+"px "+-E+"px "+-C+"px",threshold:On(0,Nr(1,m))||1};let O=!0;function L(N){const j=N[0].intersectionRatio;if(j!==m){if(!O)return d();j?d(!1,j):a=setTimeout(()=>{d(!1,1e-7)},1e3)}j===1&&!Lw(h,e.getBoundingClientRect())&&d(),O=!1}try{r=new IntersectionObserver(L,{...k,root:l.ownerDocument})}catch{r=new IntersectionObserver(L,k)}r.observe(e)}return d(!0),c}function U0(e,n,r,a){a===void 0&&(a={});const{ancestorScroll:l=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=a,h=sm(e),y=l||c?[...h?_r(h):[],..._r(n)]:[];y.forEach(C=>{l&&C.addEventListener("scroll",r,{passive:!0}),c&&C.addEventListener("resize",r)});const g=h&&f?RN(h,r):null;let v=-1,b=null;d&&(b=new ResizeObserver(C=>{let[A]=C;A&&A.target===h&&b&&(b.unobserve(n),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var k;(k=b)==null||k.observe(n)})),r()}),h&&!m&&b.observe(h),b.observe(n));let x,w=m?ws(e):null;m&&E();function E(){const C=ws(e);w&&!Lw(w,C)&&r(),w=C,x=requestAnimationFrame(E)}return r(),()=>{var C;y.forEach(A=>{l&&A.removeEventListener("scroll",r),c&&A.removeEventListener("resize",r)}),g?.(),(C=b)==null||C.disconnect(),b=null,m&&cancelAnimationFrame(x)}}const TN=sN,CN=aN,MN=nN,ON=lN,AN=oN,B0=tN,_N=iN,DN=(e,n,r)=>{const a=new Map,l={platform:EN,...r},c={...l.platform,_c:a};return eN(e,n,{...l,platform:c})};var kN=typeof document<"u",NN=function(){},nu=kN?R.useLayoutEffect:NN;function Ou(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,a,l;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(a=r;a--!==0;)if(!Ou(e[a],n[a]))return!1;return!0}if(l=Object.keys(e),r=l.length,r!==Object.keys(n).length)return!1;for(a=r;a--!==0;)if(!{}.hasOwnProperty.call(n,l[a]))return!1;for(a=r;a--!==0;){const c=l[a];if(!(c==="_owner"&&e.$$typeof)&&!Ou(e[c],n[c]))return!1}return!0}return e!==e&&n!==n}function jw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function H0(e,n){const r=jw(e);return Math.round(n*r)/r}function Fh(e){const n=R.useRef(e);return nu(()=>{n.current=e}),n}function zN(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:a=[],platform:l,elements:{reference:c,floating:d}={},transform:f=!0,whileElementsMounted:m,open:h}=e,[y,g]=R.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[v,b]=R.useState(a);Ou(v,a)||b(a);const[x,w]=R.useState(null),[E,C]=R.useState(null),A=R.useCallback(G=>{G!==N.current&&(N.current=G,w(G))},[]),k=R.useCallback(G=>{G!==j.current&&(j.current=G,C(G))},[]),O=c||x,L=d||E,N=R.useRef(null),j=R.useRef(null),z=R.useRef(y),q=m!=null,Z=Fh(m),Q=Fh(l),V=Fh(h),J=R.useCallback(()=>{if(!N.current||!j.current)return;const G={placement:n,strategy:r,middleware:v};Q.current&&(G.platform=Q.current),DN(N.current,j.current,G).then(ce=>{const W={...ce,isPositioned:V.current!==!1};te.current&&!Ou(z.current,W)&&(z.current=W,Gn.flushSync(()=>{g(W)}))})},[v,n,r,Q,V]);nu(()=>{h===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,g(G=>({...G,isPositioned:!1})))},[h]);const te=R.useRef(!1);nu(()=>(te.current=!0,()=>{te.current=!1}),[]),nu(()=>{if(O&&(N.current=O),L&&(j.current=L),O&&L){if(Z.current)return Z.current(O,L,J);J()}},[O,L,J,Z,q]);const re=R.useMemo(()=>({reference:N,floating:j,setReference:A,setFloating:k}),[A,k]),I=R.useMemo(()=>({reference:O,floating:L}),[O,L]),B=R.useMemo(()=>{const G={position:r,left:0,top:0};if(!I.floating)return G;const ce=H0(I.floating,y.x),W=H0(I.floating,y.y);return f?{...G,transform:"translate("+ce+"px, "+W+"px)",...jw(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ce,top:W}},[r,f,I.floating,y.x,y.y]);return R.useMemo(()=>({...y,update:J,refs:re,elements:I,floatingStyles:B}),[y,J,re,I,B])}const LN=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:a,padding:l}=typeof e=="function"?e(r):e;return a&&n(a)?a.current!=null?B0({element:a.current,padding:l}).fn(r):{}:a?B0({element:a,padding:l}).fn(r):{}}}},jN=(e,n)=>({...TN(e),options:[e,n]}),PN=(e,n)=>({...CN(e),options:[e,n]}),IN=(e,n)=>({..._N(e),options:[e,n]}),UN=(e,n)=>({...MN(e),options:[e,n]}),BN=(e,n)=>({...ON(e),options:[e,n]}),HN=(e,n)=>({...AN(e),options:[e,n]}),$4=(e,n)=>({...LN(e),options:[e,n]}),VN={intentional:"onClick",sloppy:"onPointerDown"};function YN(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function am(e,n={}){const r="rootStore"in e?e.rootStore:e,a=r.useState("open"),l=r.useState("floatingElement"),c=r.useState("referenceElement"),d=r.useState("domReferenceElement"),{onOpenChange:f,dataRef:m}=r.context,{enabled:h=!0,escapeKey:y=!0,outsidePress:g=!0,outsidePressEvent:v="sloppy",referencePress:b=!1,referencePressEvent:x="sloppy",ancestorScroll:w=!1,bubbles:E,externalTree:C}=n,A=Vr(C),k=Ce(typeof g=="function"?g:()=>!1),O=typeof g=="function"?k:g,L=R.useRef(!1),{escapeKey:N,outsidePress:j}=YN(E),z=R.useRef(null),q=Fn(),Z=Fn(),Q=Ce(()=>{Z.clear(),m.current.insideReactTree=!1}),V=R.useRef(!1),J=R.useRef(""),te=Ce(ne=>{J.current=ne.pointerType}),re=Ce(()=>{const ne=J.current,me=ne==="pen"||!ne?"mouse":ne,pe=typeof v=="function"?v():v;return typeof pe=="string"?pe:pe[me]}),I=Ce(ne=>{if(!a||!h||!y||ne.key!=="Escape"||V.current)return;const me=m.current.floatingContext?.nodeId,pe=A?gs(A.nodesRef.current,me):[];if(!N&&pe.length>0){let Se=!0;if(pe.forEach(ye=>{ye.context?.open&&!ye.context.dataRef.current.__escapeKeyBubbles&&(Se=!1)}),!Se)return}const ze=ND(ne)?ne.nativeEvent:ne,be=Fe(ef,ze);r.setOpen(!1,be),!N&&!be.isPropagationAllowed&&ne.stopPropagation()}),B=Ce(ne=>{const me=re();return me==="intentional"&&ne.type!=="click"||me==="sloppy"&&ne.type==="click"}),G=Ce(()=>{m.current.insideReactTree=!0,Z.start(0,Q)}),ce=Ce((ne,me=!1)=>{if(B(ne)){Q();return}if(m.current.insideReactTree){Q();return}if(re()==="intentional"&&me||typeof O=="function"&&!O(ne))return;const pe=rn(ne),ze=`[${Pa("inert")}]`,be=it(r.select("floatingElement")).querySelectorAll(ze),Se=r.context.triggerElements;if(pe&&(Se.hasElement(pe)||Se.hasMatchingElement(De=>qe(De,pe))))return;let ye=ot(pe)?pe:null;for(;ye&&!io(ye);){const De=uo(ye);if(io(De)||!ot(De))break;ye=De}if(be.length&&ot(pe)&&!DD(pe)&&!qe(pe,r.select("floatingElement"))&&Array.from(be).every(De=>!qe(ye,De)))return;if(St(pe)&&!("touches"in ne)){const De=io(pe),Ye=An(pe),Ue=/auto|scroll/,Ot=De||Ue.test(Ye.overflowX),He=De||Ue.test(Ye.overflowY),We=Ot&&pe.clientWidth>0&&pe.scrollWidth>pe.clientWidth,Pe=He&&pe.clientHeight>0&&pe.scrollHeight>pe.clientHeight,Rt=Ye.direction==="rtl",$t=Pe&&(Rt?ne.offsetX<=pe.offsetWidth-pe.clientWidth:ne.offsetX>pe.clientWidth),Xn=We&&ne.offsetY>pe.clientHeight;if($t||Xn)return}const de=m.current.floatingContext?.nodeId,we=A&&gs(A.nodesRef.current,de).some(De=>Jn(ne,De.context?.elements.floating));if(Jn(ne,r.select("floatingElement"))||Jn(ne,r.select("domReferenceElement"))||we)return;const ge=A?gs(A.nodesRef.current,de):[];if(ge.length>0){let De=!0;if(ge.forEach(Ye=>{Ye.context?.open&&!Ye.context.dataRef.current.__outsidePressBubbles&&(De=!1)}),!De)return}r.setOpen(!1,Fe(tm,ne)),Q()}),W=Ce(ne=>{re()!=="sloppy"||ne.pointerType==="touch"||!r.select("open")||!h||Jn(ne,r.select("floatingElement"))||Jn(ne,r.select("domReferenceElement"))||ce(ne)}),P=Ce(ne=>{if(re()!=="sloppy"||!r.select("open")||!h||Jn(ne,r.select("floatingElement"))||Jn(ne,r.select("domReferenceElement")))return;const me=ne.touches[0];me&&(z.current={startTime:Date.now(),startX:me.clientX,startY:me.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},q.start(1e3,()=>{z.current&&(z.current.dismissOnTouchEnd=!1,z.current.dismissOnMouseDown=!1)}))}),X=Ce(ne=>{const me=rn(ne);function pe(){P(ne),me?.removeEventListener(ne.type,pe)}me?.addEventListener(ne.type,pe)}),le=Ce(ne=>{const me=L.current;if(L.current=!1,q.clear(),ne.type==="mousedown"&&z.current&&!z.current.dismissOnMouseDown)return;const pe=rn(ne);function ze(){ne.type==="pointerdown"?W(ne):ce(ne,me),pe?.removeEventListener(ne.type,ze)}pe?.addEventListener(ne.type,ze)}),se=Ce(ne=>{if(re()!=="sloppy"||!z.current||Jn(ne,r.select("floatingElement"))||Jn(ne,r.select("domReferenceElement")))return;const me=ne.touches[0];if(!me)return;const pe=Math.abs(me.clientX-z.current.startX),ze=Math.abs(me.clientY-z.current.startY),be=Math.sqrt(pe*pe+ze*ze);be>5&&(z.current.dismissOnTouchEnd=!0),be>10&&(ce(ne),q.clear(),z.current=null)}),ue=Ce(ne=>{const me=rn(ne);function pe(){se(ne),me?.removeEventListener(ne.type,pe)}me?.addEventListener(ne.type,pe)}),he=Ce(ne=>{re()!=="sloppy"||!z.current||Jn(ne,r.select("floatingElement"))||Jn(ne,r.select("domReferenceElement"))||(z.current.dismissOnTouchEnd&&ce(ne),q.clear(),z.current=null)}),ve=Ce(ne=>{const me=rn(ne);function pe(){he(ne),me?.removeEventListener(ne.type,pe)}me?.addEventListener(ne.type,pe)});R.useEffect(()=>{if(!a||!h)return;m.current.__escapeKeyBubbles=N,m.current.__outsidePressBubbles=j;const ne=new fo;function me(ye){r.setOpen(!1,Fe(Wu,ye))}function pe(){ne.clear(),V.current=!0}function ze(){ne.start(Gu()?5:0,()=>{V.current=!1})}const be=it(l);be.addEventListener("pointerdown",te,!0),y&&(be.addEventListener("keydown",I),be.addEventListener("compositionstart",pe),be.addEventListener("compositionend",ze)),O&&(be.addEventListener("click",le,!0),be.addEventListener("pointerdown",le,!0),be.addEventListener("touchstart",X,!0),be.addEventListener("touchmove",ue,!0),be.addEventListener("touchend",ve,!0),be.addEventListener("mousedown",le,!0));let Se=[];return w&&(ot(d)&&(Se=_r(d)),ot(l)&&(Se=Se.concat(_r(l))),!ot(c)&&c&&c.contextElement&&(Se=Se.concat(_r(c.contextElement)))),Se=Se.filter(ye=>ye!==be.defaultView?.visualViewport),Se.forEach(ye=>{ye.addEventListener("scroll",me,{passive:!0})}),()=>{be.removeEventListener("pointerdown",te,!0),y&&(be.removeEventListener("keydown",I),be.removeEventListener("compositionstart",pe),be.removeEventListener("compositionend",ze)),O&&(be.removeEventListener("click",le,!0),be.removeEventListener("pointerdown",le,!0),be.removeEventListener("touchstart",X,!0),be.removeEventListener("touchmove",ue,!0),be.removeEventListener("touchend",ve,!0),be.removeEventListener("mousedown",le,!0)),Se.forEach(ye=>{ye.removeEventListener("scroll",me)}),ne.clear(),L.current=!1}},[m,l,c,d,y,O,a,f,w,h,N,j,I,ce,le,W,X,ue,ve,te,r]),R.useEffect(Q,[O,Q]);const Oe=R.useMemo(()=>({onKeyDown:I,...b&&{[VN[x]]:ne=>{r.setOpen(!1,Fe(La,ne.nativeEvent))},...x!=="intentional"&&{onClick(ne){r.setOpen(!1,Fe(La,ne.nativeEvent))}}}}),[I,r,b,x]),fe=Ce(ne=>{const me=rn(ne.nativeEvent);!qe(r.select("floatingElement"),me)||ne.button!==0||(L.current=!0)}),Ne=Ce(ne=>{!a||!h||ne.button!==0||(L.current=!0)}),je=R.useMemo(()=>({onKeyDown:I,onPointerDown:fe,onMouseDown:fe,onMouseUp:fe,onClickCapture:G,onMouseDownCapture(ne){G(),Ne(ne)},onPointerDownCapture(ne){G(),Ne(ne)},onMouseUpCapture:G,onTouchEndCapture:G,onTouchMoveCapture:G}),[I,fe,G,Ne]);return R.useMemo(()=>h?{reference:Oe,floating:je,trigger:Oe}:{},[h,Oe,je])}var Au=Symbol("NOT_FOUND");function qN(e,n=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(n)}function GN(e,n=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(n)}function FN(e,n="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(a=>typeof a=="function"?`function ${a.name||"unnamed"}()`:typeof a).join(", ");throw new TypeError(`${n}[${r}]`)}}var V0=e=>Array.isArray(e)?e:[e];function XN(e){const n=Array.isArray(e[0])?e[0]:e;return FN(n,"createSelector expects all input-selectors to be functions, but received the following types: "),n}function KN(e,n){const r=[],{length:a}=e;for(let l=0;l<a;l++)r.push(e[l].apply(null,n));return r}function QN(e){let n;return{get(r){return n&&e(n.key,r)?n.value:Au},put(r,a){n={key:r,value:a}},getEntries(){return n?[n]:[]},clear(){n=void 0}}}function ZN(e,n){let r=[];function a(f){const m=r.findIndex(h=>n(f,h.key));if(m>-1){const h=r[m];return m>0&&(r.splice(m,1),r.unshift(h)),h.value}return Au}function l(f,m){a(f)===Au&&(r.unshift({key:f,value:m}),r.length>e&&r.pop())}function c(){return r}function d(){r=[]}return{get:a,put:l,getEntries:c,clear:d}}var $N=(e,n)=>e===n;function JN(e){return function(r,a){if(r===null||a===null||r.length!==a.length)return!1;const{length:l}=r;for(let c=0;c<l;c++)if(!e(r[c],a[c]))return!1;return!0}}function WN(e,n){const r=typeof n=="object"?n:{equalityCheck:n},{equalityCheck:a=$N,maxSize:l=1,resultEqualityCheck:c}=r,d=JN(a);let f=0;const m=l<=1?QN(d):ZN(l,d);function h(){let y=m.get(arguments);if(y===Au){if(y=e.apply(null,arguments),f++,c){const v=m.getEntries().find(b=>c(b.value,y));v&&(y=v.value,f!==0&&f--)}m.put(arguments,y)}return y}return h.clearCache=()=>{m.clear(),h.resetResultsCount()},h.resultsCount=()=>f,h.resetResultsCount=()=>{f=0},h}var ez=class{constructor(e){this.value=e}deref(){return this.value}},tz=typeof WeakRef<"u"?WeakRef:ez,nz=0,Y0=1;function Bc(){return{s:nz,v:void 0,o:null,p:null}}function Pw(e,n={}){let r=Bc();const{resultEqualityCheck:a}=n;let l,c=0;function d(){let f=r;const{length:m}=arguments;for(let g=0,v=m;g<v;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let x=f.o;x===null&&(f.o=x=new WeakMap);const w=x.get(b);w===void 0?(f=Bc(),x.set(b,f)):f=w}else{let x=f.p;x===null&&(f.p=x=new Map);const w=x.get(b);w===void 0?(f=Bc(),x.set(b,f)):f=w}}const h=f;let y;if(f.s===Y0)y=f.v;else if(y=e.apply(null,arguments),c++,a){const g=l?.deref?.()??l;g!=null&&a(g,y)&&(y=g,c!==0&&c--),l=typeof y=="object"&&y!==null||typeof y=="function"?new tz(y):y}return h.s=Y0,h.v=y,y}return d.clearCache=()=>{r=Bc(),d.resetResultsCount()},d.resultsCount=()=>c,d.resetResultsCount=()=>{c=0},d}function Iw(e,...n){const r=typeof e=="function"?{memoize:e,memoizeOptions:n}:e,a=(...l)=>{let c=0,d=0,f,m={},h=l.pop();typeof h=="object"&&(m=h,h=l.pop()),qN(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const y={...r,...m},{memoize:g,memoizeOptions:v=[],argsMemoize:b=Pw,argsMemoizeOptions:x=[]}=y,w=V0(v),E=V0(x),C=XN(l),A=g(function(){return c++,h.apply(null,arguments)},...w),k=b(function(){d++;const L=KN(C,arguments);return f=A.apply(null,L),f},...E);return Object.assign(k,{resultFunc:h,memoizedResultFunc:A,dependencies:C,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>f,recomputations:()=>c,resetRecomputations:()=>{c=0},memoize:g,argsMemoize:b})};return Object.assign(a,{withTypes:()=>a}),a}var oz=Iw(Pw),rz=Object.assign((e,n=oz)=>{GN(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),a=r.map(c=>e[c]);return n(a,(...c)=>c.reduce((d,f,m)=>(d[r[m]]=f,d),{}))},{withTypes:()=>rz});Iw({memoize:WN,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const _e=(e,n,r,a,l,c,...d)=>{if(d.length>0)throw new Error(Zt(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var Uw=lx();const bp=[];let Sp;function sz(){return Sp}function az(e){bp.push(e)}function im(e){const n=(r,a)=>{const l=Qt(iz).current;let c;try{Sp=l;for(const d of bp)d.before(l);c=e(r,a);for(const d of bp)d.after(l);l.didInitialize=!0}finally{Sp=void 0}return c};return n.displayName=e.displayName||e.name,n}function Bw(e){return R.forwardRef(im(e))}function iz(){return{didInitialize:!1}}const lz=Vp(19),cz=lz?fz:dz;function Hw(e,n,r,a,l){return cz(e,n,r,a,l)}function uz(e,n,r,a,l){const c=R.useCallback(()=>n(e.getSnapshot(),r,a,l),[e,n,r,a,l]);return Uw.useSyncExternalStore(e.subscribe,c,c)}az({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let n=!1;for(let r=0;r<e.syncHooks.length;r+=1){const a=e.syncHooks[r],l=a.selector(a.store.state,a.a1,a.a2,a.a3);(a.didChange||!Object.is(a.value,l))&&(n=!0,a.value=l,a.didChange=!1)}return n&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=n=>{const r=new Set;for(const l of e.syncHooks)r.add(l.store);const a=[];for(const l of r)a.push(l.subscribe(n));return()=>{for(const l of a)l()}}),Uw.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function fz(e,n,r,a,l){const c=sz();if(!c)return uz(e,n,r,a,l);const d=c.syncIndex;c.syncIndex+=1;let f;return c.didInitialize?(f=c.syncHooks[d],(f.store!==e||f.selector!==n||!Object.is(f.a1,r)||!Object.is(f.a2,a)||!Object.is(f.a3,l))&&(f.store!==e&&(c.didChangeStore=!0),f.store=e,f.selector=n,f.a1=r,f.a2=a,f.a3=l,f.didChange=!0)):(f={store:e,selector:n,a1:r,a2:a,a3:l,value:n(e.getSnapshot(),r,a,l),didChange:!1},c.syncHooks.push(f)),f.value}function dz(e,n,r,a,l){return cx.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,c=>n(c,r,a,l))}class hz{constructor(n){this.state=n,this.listeners=new Set,this.updateTick=0}subscribe=n=>(this.listeners.add(n),()=>{this.listeners.delete(n)});getSnapshot=()=>this.state;setState(n){if(this.state===n)return;this.state=n,this.updateTick+=1;const r=this.updateTick;for(const a of this.listeners){if(r!==this.updateTick)return;a(n)}}update(n){for(const r in n)if(!Object.is(this.state[r],n[r])){this.setState({...this.state,...n});return}}set(n,r){Object.is(this.state[n],r)||this.setState({...this.state,[n]:r})}notifyAll(){const n={...this.state};this.setState(n)}use(n,r,a,l){return Hw(this,n,r,a,l)}}class nf extends hz{constructor(n,r={},a){super(n),this.context=r,this.selectors=a}useSyncedValue(n,r){R.useDebugValue(n),Me(()=>{this.state[n]!==r&&this.set(n,r)},[n,r])}useSyncedValueWithCleanup(n,r){const a=this;Me(()=>(a.state[n]!==r&&a.set(n,r),()=>{a.set(n,void 0)}),[a,n,r])}useSyncedValues(n){const r=this,a=Object.values(n);Me(()=>{r.update(n)},[r,...a])}useControlledProp(n,r){R.useDebugValue(n);const a=r!==void 0;Me(()=>{a&&!Object.is(this.state[n],r)&&super.setState({...this.state,[n]:r})},[n,r,a])}select(n,r,a,l){const c=this.selectors[n];return c(this.state,r,a,l)}useState(n,r,a,l){return R.useDebugValue(n),Hw(this,this.selectors[n],r,a,l)}useContextCallback(n,r){R.useDebugValue(n);const a=Ce(r??yn);this.context[n]=a}useStateSetter(n){const r=R.useRef(void 0);return r.current===void 0&&(r.current=a=>{this.set(n,a)}),r.current}observe(n,r){let a;typeof n=="function"?a=n:a=this.selectors[n];let l=a(this.state);return r(l,l,this),this.subscribe(c=>{const d=a(c);if(!Object.is(l,d)){const f=l;l=d,r(d,f,this)}})}}const pz={open:_e(e=>e.open),domReferenceElement:_e(e=>e.domReferenceElement),referenceElement:_e(e=>e.positionReference??e.referenceElement),floatingElement:_e(e=>e.floatingElement),floatingId:_e(e=>e.floatingId)};class lm extends nf{constructor(n){const{nested:r,noEmit:a,onOpenChange:l,triggerElements:c,...d}=n;super({...d,positionReference:d.referenceElement,domReferenceElement:d.referenceElement},{onOpenChange:l,dataRef:{current:{}},events:gw(),nested:r,noEmit:a,triggerElements:c},pz)}setOpen=(n,r)=>{if((!n||!this.state.open||nw(r.event))&&(this.context.dataRef.current.openEvent=n?r.event:void 0),!this.context.noEmit){const a={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",a)}this.context.onOpenChange?.(n,r)}}function Vw(e,n){const r=R.useRef(null),a=R.useRef(null);return R.useCallback(l=>{if(e!==void 0){if(r.current!==null){const c=r.current,d=a.current,f=n.context.triggerElements.getById(c);d&&f===d&&n.context.triggerElements.delete(c),r.current=null,a.current=null}l!==null&&(r.current=e,a.current=l,n.context.triggerElements.add(e,l))}},[n,e])}function Yw(e,n,r,a){const l=r.useState("isMountedByTrigger",e),c=Vw(e,r),d=Ce(f=>{if(c(f),!f||!r.select("open"))return;const m=r.select("activeTriggerId");if(m===e){r.update({activeTriggerElement:f,...a});return}m==null&&r.update({activeTriggerId:e,activeTriggerElement:f,...a})});return Me(()=>{l&&r.update({activeTriggerElement:n.current,...a})},[l,r,n,...Object.values(a)]),{registerTrigger:d,isMountedByThisTrigger:l}}function cm(e){const n=e.useState("open");Me(()=>{if(n&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const r=e.context.triggerElements.entries().next();if(!r.done){const[a,l]=r.value;e.update({activeTriggerId:a,activeTriggerElement:l})}}},[n,e])}function um(e,n,r){const{mounted:a,setMounted:l,transitionStatus:c}=yk(e);n.useSyncedValues({mounted:a,transitionStatus:c});const d=Ce(()=>{l(!1),n.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r?.(),n.context.onOpenChangeComplete?.(!1)}),f=n.useState("preventUnmountingOnClose");return Ju({enabled:!f,open:e,ref:n.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:c}}class sl{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(n,r){const a=this.idMap.get(n);a!==r&&(a!==void 0&&this.elementsSet.delete(a),this.elementsSet.add(r),this.idMap.set(n,r))}delete(n){const r=this.idMap.get(n);r&&(this.elementsSet.delete(r),this.idMap.delete(n))}hasElement(n){return this.elementsSet.has(n)}hasMatchingElement(n){for(const r of this.elementsSet)if(n(r))return!0;return!1}getById(n){return this.idMap.get(n)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function mz(){return new lm({open:!1,floatingElement:null,referenceElement:null,triggerElements:new sl,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function fm(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:mz(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Nt,inactiveTriggerProps:Nt,popupProps:Nt}}const Hc=_e(e=>e.triggerIdProp??e.activeTriggerId),dm={open:_e(e=>e.openProp??e.open),mounted:_e(e=>e.mounted),transitionStatus:_e(e=>e.transitionStatus),floatingRootContext:_e(e=>e.floatingRootContext),preventUnmountingOnClose:_e(e=>e.preventUnmountingOnClose),payload:_e(e=>e.payload),activeTriggerId:Hc,activeTriggerElement:_e(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:_e((e,n)=>n!==void 0&&Hc(e)===n),isOpenedByTrigger:_e((e,n)=>n!==void 0&&Hc(e)===n&&e.open),isMountedByTrigger:_e((e,n)=>n!==void 0&&Hc(e)===n&&e.mounted),triggerProps:_e((e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:_e(e=>e.popupProps),popupElement:_e(e=>e.popupElement),positionerElement:_e(e=>e.positionerElement)};function gz(e){const{open:n=!1,onOpenChange:r,elements:a={}}=e,l=Cs(),c=Fo()!=null,d=Qt(()=>new lm({open:n,onOpenChange:r,referenceElement:a.reference??null,floatingElement:a.floating??null,triggerElements:new sl,floatingId:l,nested:c,noEmit:!1})).current;return Me(()=>{const f={open:n,floatingId:l};a.reference!==void 0&&(f.referenceElement=a.reference,f.domReferenceElement=ot(a.reference)?a.reference:null),a.floating!==void 0&&(f.floatingElement=a.floating),d.update(f)},[n,l,a.reference,a.floating,d]),d.context.onOpenChange=r,d.context.nested=c,d.context.noEmit=!1,d}function yz(e={}){const{nodeId:n,externalTree:r}=e,a=gz(e),l=e.rootContext||a,c={reference:l.useState("referenceElement"),floating:l.useState("floatingElement"),domReference:l.useState("domReferenceElement")},[d,f]=R.useState(null),m=R.useRef(null),h=Vr(r);Me(()=>{c.domReference&&(m.current=c.domReference)},[c.domReference]);const y=zN({...e,elements:{...c,...d&&{reference:d}}}),g=R.useCallback(j=>{const z=ot(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;f(z),y.refs.setReference(z)},[y.refs]),[v,b]=R.useState(null),[x,w]=R.useState(null);l.useSyncedValue("referenceElement",v),l.useSyncedValue("domReferenceElement",ot(v)?v:null),l.useSyncedValue("floatingElement",x);const E=R.useCallback(j=>{(ot(j)||j===null)&&(m.current=j,b(j)),(ot(y.refs.reference.current)||y.refs.reference.current===null||j!==null&&!ot(j))&&y.refs.setReference(j)},[y.refs,b]),C=R.useCallback(j=>{w(j),y.refs.setFloating(j)},[y.refs]),A=R.useMemo(()=>({...y.refs,setReference:E,setFloating:C,setPositionReference:g,domReference:m}),[y.refs,E,C,g]),k=R.useMemo(()=>({...y.elements,domReference:c.domReference}),[y.elements,c.domReference]),O=l.useState("open"),L=l.useState("floatingId"),N=R.useMemo(()=>({...y,dataRef:l.context.dataRef,open:O,onOpenChange:l.setOpen,events:l.context.events,floatingId:L,refs:A,elements:k,nodeId:n,rootStore:l}),[y,A,k,n,l,O,L]);return Me(()=>{l.context.dataRef.current.floatingContext=N;const j=h?.nodesRef.current.find(z=>z.id===n);j&&(j.context=N)}),R.useMemo(()=>({...y,context:N,refs:A,elements:k,rootStore:l}),[y,A,k,N,l])}function hm(e){const{popupStore:n,noEmit:r=!1,treatPopupAsFloatingElement:a=!1,onOpenChange:l}=e,c=Cs(),d=Fo()!=null,f=n.useState("open"),m=n.useState("activeTriggerElement"),h=n.useState(a?"popupElement":"positionerElement"),y=n.context.triggerElements,g=Qt(()=>new lm({open:f,referenceElement:m,floatingElement:h,triggerElements:y,onOpenChange:l,floatingId:c,nested:d,noEmit:r})).current;return Me(()=>{const v={open:f,floatingId:c,referenceElement:m,floatingElement:h};ot(m)&&(v.domReferenceElement=m),g.state.positionReference===g.state.referenceElement&&(v.positionReference=m),g.update(v)},[f,c,m,h,g]),g.context.onOpenChange=l,g.context.nested=d,g.context.noEmit=r,g}const Xh=MD&&Qx;function qw(e,n={}){const r="rootStore"in e?e.rootStore:e,{events:a,dataRef:l}=r.context,{enabled:c=!0,delay:d}=n,f=R.useRef(!1),m=R.useRef(null),h=Fn(),y=R.useRef(!0);R.useEffect(()=>{const v=r.select("domReferenceElement");if(!c)return;const b=zt(v);function x(){const C=r.select("domReferenceElement");!r.select("open")&&St(C)&&C===Vn(it(C))&&(f.current=!0)}function w(){y.current=!0}function E(){y.current=!1}return b.addEventListener("blur",x),Xh&&(b.addEventListener("keydown",w,!0),b.addEventListener("pointerdown",E,!0)),()=>{b.removeEventListener("blur",x),Xh&&(b.removeEventListener("keydown",w,!0),b.removeEventListener("pointerdown",E,!0))}},[r,c]),R.useEffect(()=>{if(!c)return;function v(b){if(b.reason===La||b.reason===ef){const x=r.select("domReferenceElement");ot(x)&&(m.current=x,f.current=!0)}}return a.on("openchange",v),()=>{a.off("openchange",v)}},[a,c,r]);const g=R.useMemo(()=>({onMouseLeave(){f.current=!1,m.current=null},onFocus(v){const b=v.currentTarget;if(f.current){if(m.current===b)return;f.current=!1,m.current=null}const x=rn(v.nativeEvent);if(ot(x)){if(Xh&&!v.relatedTarget){if(!y.current&&!Ku(x))return}else if(!kD(x))return}const w=yu(v.relatedTarget,r.context.triggerElements),{nativeEvent:E,currentTarget:C}=v,A=typeof d=="function"?d():d;if(r.select("open")&&w||A===0||A===void 0){r.setOpen(!0,Fe(Ca,E,C));return}h.start(A,()=>{f.current||r.setOpen(!0,Fe(Ca,E,C))})},onBlur(v){f.current=!1,m.current=null;const b=v.relatedTarget,x=v.nativeEvent,w=ot(b)&&b.hasAttribute(Pa("focus-guard"))&&b.getAttribute("data-type")==="outside";h.start(0,()=>{const E=r.select("domReferenceElement"),C=Vn(E?E.ownerDocument:document);!b&&C===E||qe(l.current.floatingContext?.refs.floating.current,C)||qe(E,C)||w||yu(b??C,r.context.triggerElements)||r.setOpen(!1,Fe(Ca,x))})}}),[l,r,h,d]);return R.useMemo(()=>c?{reference:g,trigger:g}:{},[c,g])}const xp=Pa("safe-polygon"),vz=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Wx}`;function bz(e){return e?!!e.closest(vz):!1}class pm{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.unbindMouseMove=()=>{},this.restTimeoutPending=!1,this.openChangeTimeout=new fo,this.restTimeout=new fo,this.handleCloseOptions=void 0}static create(){return new pm}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function Gw(e){const n=Qt(pm.create).current,r=e.context.dataRef.current;return r.hoverInteractionState||(r.hoverInteractionState=n),Qp(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}const Sz=new Set(["click","mousedown"]);function Fw(e,n={}){const r="rootStore"in e?e.rootStore:e,a=r.useState("open"),l=r.useState("floatingElement"),c=r.useState("domReferenceElement"),{dataRef:d}=r.context,{enabled:f=!0,closeDelay:m=0}=n,h=Gw(r),y=Vr(),g=Fo(),v=Ce(()=>h.interactedInside?!0:d.current.openEvent?Sz.has(d.current.openEvent.type):!1),b=Ce(()=>{const k=d.current.openEvent?.type;return k?.includes("mouse")&&k!=="mousedown"}),x=Ce(k=>yu(k,r.context.triggerElements)),w=R.useCallback((k,O=!0)=>{const L=xz(m,h.pointerType);L&&!h.handler?h.openChangeTimeout.start(L,()=>r.setOpen(!1,Fe(sn,k))):O&&(h.openChangeTimeout.clear(),r.setOpen(!1,Fe(sn,k)))},[m,r,h]),E=Ce(()=>{h.unbindMouseMove(),h.handler=void 0}),C=Ce(()=>{if(h.performedPointerEventsMutation){const k=it(l).body;k.style.pointerEvents="",k.removeAttribute(xp),h.performedPointerEventsMutation=!1}}),A=Ce(k=>{const O=rn(k);if(!bz(O)){h.interactedInside=!1;return}h.interactedInside=!0});Me(()=>{a||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,E(),C())},[a,h,E,C]),R.useEffect(()=>()=>{E()},[E]),R.useEffect(()=>C,[C]),Me(()=>{if(f&&a&&h.handleCloseOptions?.blockPointerEvents&&b()&&ot(c)&&l){h.performedPointerEventsMutation=!0;const k=it(l).body;k.setAttribute(xp,"");const O=c,L=l,N=y?.nodesRef.current.find(j=>j.id===g)?.context?.elements.floating;return N&&(N.style.pointerEvents=""),k.style.pointerEvents="none",O.style.pointerEvents="auto",L.style.pointerEvents="auto",()=>{k.style.pointerEvents="",O.style.pointerEvents="",L.style.pointerEvents=""}}},[f,a,c,l,h,b,y,g]),R.useEffect(()=>{if(!f)return;function k(j){v()||!d.current.floatingContext||!r.select("open")||x(j.relatedTarget)||(C(),E(),v()||w(j))}function O(j){h.openChangeTimeout.clear(),C(),h.handler?.(j),E()}function L(j){v()||w(j,!1)}const N=l;return N&&(N.addEventListener("mouseleave",k),N.addEventListener("mouseenter",O),N.addEventListener("mouseleave",L),N.addEventListener("pointerdown",A,!0)),()=>{N&&(N.removeEventListener("mouseleave",k),N.removeEventListener("mouseenter",O),N.removeEventListener("mouseleave",L),N.removeEventListener("pointerdown",A,!0))}},[f,l,r,d,v,x,w,C,E,A,h])}function xz(e,n){return n&&!xs(n)?0:typeof e=="function"?e():e}function Kh(e){return typeof e=="function"?e():e}const wz={current:null};function mm(e,n={}){const r="rootStore"in e?e.rootStore:e,{dataRef:a,events:l}=r.context,{enabled:c=!0,delay:d=0,handleClose:f=null,mouseOnly:m=!1,restMs:h=0,move:y=!0,triggerElementRef:g=wz,externalTree:v,isActiveTrigger:b=!0}=n,x=Vr(v),w=Gw(r),E=an(f),C=an(d),A=an(h),k=an(c);b&&(w.handleCloseOptions=E.current?.__options);const O=Ce(()=>w.interactedInside?!0:a.current.openEvent?["click","mousedown"].includes(a.current.openEvent.type):!1),L=Ce(Z=>yu(Z,r.context.triggerElements)),N=R.useCallback((Z,Q=!0)=>{const V=tu(C.current,"close",w.pointerType);V&&!w.handler?w.openChangeTimeout.start(V,()=>r.setOpen(!1,Fe(sn,Z))):Q&&(w.openChangeTimeout.clear(),r.setOpen(!1,Fe(sn,Z)))},[C,r,w]),j=Ce(()=>{w.unbindMouseMove(),w.handler=void 0}),z=Ce(()=>{if(w.performedPointerEventsMutation){const Z=it(r.select("domReferenceElement")).body;Z.style.pointerEvents="",Z.removeAttribute(xp),w.performedPointerEventsMutation=!1}});R.useEffect(()=>{if(!c)return;function Z(Q){Q.open||(w.openChangeTimeout.clear(),w.restTimeout.clear(),w.blockMouseMove=!0,w.restTimeoutPending=!1)}return l.on("openchange",Z),()=>{l.off("openchange",Z)}},[c,l,w]);const q=Ce(Z=>{if(O()||!a.current.floatingContext||L(Z.relatedTarget))return;const Q=g.current;E.current?.({...a.current.floatingContext,tree:x,x:Z.clientX,y:Z.clientY,onClose(){z(),j(),!O()&&Q===r.select("domReferenceElement")&&N(Z)}})(Z)});return R.useEffect(()=>{if(!c)return;const Z=g.current??(b?r.select("domReferenceElement"):null);if(!ot(Z))return;function Q(te){if(w.openChangeTimeout.clear(),w.blockMouseMove=!1,m&&!xs(w.pointerType)||Kh(A.current)>0&&!tu(C.current,"open"))return;const re=tu(C.current,"open",w.pointerType),I=r.select("domReferenceElement"),B=r.context.triggerElements,G=(B.hasElement(te.target)||B.hasMatchingElement(X=>qe(X,te.target)))&&(!I||!qe(I,te.target)),ce=te.currentTarget??null,W=r.select("open"),P=!W||G;G&&W?r.setOpen(!0,Fe(sn,te,ce)):re?w.openChangeTimeout.start(re,()=>{P&&r.setOpen(!0,Fe(sn,te,ce))}):P&&r.setOpen(!0,Fe(sn,te,ce))}function V(te){if(O()){z();return}w.unbindMouseMove();const re=r.select("domReferenceElement"),I=it(re);if(w.restTimeout.clear(),w.restTimeoutPending=!1,L(te.relatedTarget))return;if(E.current&&a.current.floatingContext){r.select("open")||w.openChangeTimeout.clear();const G=g.current;w.handler=E.current({...a.current.floatingContext,tree:x,x:te.clientX,y:te.clientY,onClose(){z(),j(),k.current&&!O()&&G===r.select("domReferenceElement")&&N(te,!0)}});const ce=w.handler;ce(te),I.addEventListener("mousemove",ce),w.unbindMouseMove=()=>{I.removeEventListener("mousemove",ce)};return}(w.pointerType!=="touch"||!qe(r.select("floatingElement"),te.relatedTarget))&&N(te)}function J(te){q(te)}return r.select("open")&&Z.addEventListener("mouseleave",J),y&&Z.addEventListener("mousemove",Q,{once:!0}),Z.addEventListener("mouseenter",Q),Z.addEventListener("mouseleave",V),()=>{Z.removeEventListener("mouseleave",J),y&&Z.removeEventListener("mousemove",Q),Z.removeEventListener("mouseenter",Q),Z.removeEventListener("mouseleave",V)}},[j,z,a,C,N,r,c,E,q,w,b,O,L,m,y,A,g,x,k]),R.useMemo(()=>{if(!c)return;function Z(Q){w.pointerType=Q.pointerType}return{onPointerDown:Z,onPointerEnter:Z,onMouseMove(Q){const{nativeEvent:V}=Q,J=Q.currentTarget,te=r.select("domReferenceElement"),re=r.context.triggerElements,I=r.select("open"),B=(re.hasElement(Q.target)||re.hasMatchingElement(ce=>qe(ce,Q.target)))&&(!te||!qe(te,Q.target));if(m&&!xs(w.pointerType)||I&&!B||Kh(A.current)===0||!B&&w.restTimeoutPending&&Q.movementX**2+Q.movementY**2<2)return;w.restTimeout.clear();function G(){if(w.restTimeoutPending=!1,O())return;const ce=r.select("open");!w.blockMouseMove&&(!ce||B)&&r.setOpen(!0,Fe(sn,V,J))}w.pointerType==="touch"?Gn.flushSync(()=>{G()}):B&&I?G():(w.restTimeoutPending=!0,w.restTimeout.start(Kh(A.current),G))}}},[c,w,O,m,r,A])}function al(e=[]){const n=e.map(h=>h?.reference),r=e.map(h=>h?.floating),a=e.map(h=>h?.item),l=e.map(h=>h?.trigger),c=R.useCallback(h=>Vc(h,e,"reference"),n),d=R.useCallback(h=>Vc(h,e,"floating"),r),f=R.useCallback(h=>Vc(h,e,"item"),a),m=R.useCallback(h=>Vc(h,e,"trigger"),l);return R.useMemo(()=>({getReferenceProps:c,getFloatingProps:d,getItemProps:f,getTriggerProps:m}),[c,d,f,m])}function Vc(e,n,r){const a=new Map,l=r==="item",c={};r==="floating"&&(c.tabIndex=-1,c[pp]="");for(const d in e)l&&e&&(d===$x||d===Jx)||(c[d]=e[d]);for(let d=0;d<n.length;d+=1){let f;const m=n[d]?.[r];typeof m=="function"?f=e?m(e):null:f=m,f&&q0(c,f,l,a)}return q0(c,e,l,a),c}function q0(e,n,r,a){for(const l in n){const c=n[l];r&&(l===$x||l===Jx)||(l.startsWith("on")?(a.has(l)||a.set(l,[]),typeof c=="function"&&(a.get(l)?.push(c),e[l]=(...d)=>a.get(l)?.map(f=>f(...d)).find(f=>f!==void 0))):e[l]=c)}}const Ez="Escape";function of(e,n,r){switch(e){case"vertical":return n;case"horizontal":return r;default:return n||r}}function Yc(e,n){return of(n,e===Zp||e===ol,e===Dr||e===kr)}function Qh(e,n,r){return of(n,e===ol,r?e===Dr:e===kr)||e==="Enter"||e===" "||e===""}function Rz(e,n,r){return of(n,r?e===Dr:e===kr,e===ol)}function Tz(e,n,r,a){const l=r?e===kr:e===Dr,c=e===Zp;return n==="both"||n==="horizontal"&&a&&a>1?e===Ez:of(n,l,c)}function Cz(e,n){const r="rootStore"in e?e.rootStore:e,a=r.useState("open"),l=r.useState("floatingElement"),c=r.useState("domReferenceElement"),d=r.context.dataRef,{listRef:f,activeIndex:m,onNavigate:h=()=>{},enabled:y=!0,selectedIndex:g=null,allowEscape:v=!1,loopFocus:b=!1,nested:x=!1,rtl:w=!1,virtual:E=!1,focusItemOnOpen:C="auto",focusItemOnHover:A=!0,openOnArrowKeyDown:k=!0,disabledIndices:O=void 0,orientation:L="vertical",parentOrientation:N,cols:j=1,id:z,resetOnPointerLeave:q=!0,externalTree:Z}=n,Q=vu(l),V=an(Q),J=Fo(),te=Vr(Z);Me(()=>{d.current.orientation=L},[d,L]);const re=mp(c),I=R.useRef(C),B=R.useRef(g??-1),G=R.useRef(null),ce=R.useRef(!0),W=Ce(de=>{h(B.current===-1?null:B.current,de)}),P=R.useRef(W),X=R.useRef(!!l),le=R.useRef(a),se=R.useRef(!1),ue=R.useRef(!1),he=an(O),ve=an(a),Oe=an(g),fe=an(q),Ne=Ce(()=>{function de(Ye){E?te?.events.emit("virtualfocus",Ye):Qi(Ye,{sync:se.current,preventScroll:!0})}const we=f.current[B.current],ge=ue.current;we&&de(we),(se.current?Ye=>Ye():requestAnimationFrame)(()=>{const Ye=f.current[B.current]||we;if(!Ye)return;we||de(Ye),ne&&(ge||!ce.current)&&Ye.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Me(()=>{y&&(a&&l?(B.current=g??-1,I.current&&g!=null&&(ue.current=!0,W())):X.current&&(B.current=-1,P.current()))},[y,a,l,g,W]),Me(()=>{if(y){if(!a){se.current=!1;return}if(l)if(m==null){if(se.current=!1,Oe.current!=null)return;if(X.current&&(B.current=-1,Ne()),(!le.current||!X.current)&&I.current&&(G.current!=null||I.current===!0&&G.current==null)){let de=0;const we=()=>{f.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(we),de+=1):(B.current=G.current==null||Qh(G.current,L,w)||x?Vh(f):R0(f),G.current=null,W())};we()}}else Xi(f,m)||(B.current=m,Ne(),ue.current=!1)}},[y,a,l,m,Oe,x,f,L,w,W,Ne,he]),Me(()=>{if(!y||l||!te||E||!X.current)return;const de=te.nodesRef.current,we=de.find(Ye=>Ye.id===J)?.context?.elements.floating,ge=Vn(it(l)),De=de.some(Ye=>Ye.context&&qe(Ye.context.elements.floating,ge));we&&!De&&ce.current&&we.focus({preventScroll:!0})},[y,l,te,J,E]),Me(()=>{P.current=W,le.current=a,X.current=!!l}),Me(()=>{a||(G.current=null,I.current=C)},[a,C]);const je=m!=null,ne=R.useMemo(()=>{function de(ge){if(!ve.current)return;const De=f.current.indexOf(ge.currentTarget);De!==-1&&B.current!==De&&(B.current=De,W(ge))}return{onFocus(ge){se.current=!0,de(ge)},onClick:({currentTarget:ge})=>ge.focus({preventScroll:!0}),onMouseMove(ge){se.current=!0,ue.current=!1,A&&de(ge)},onPointerLeave(ge){if(!ve.current||!ce.current||ge.pointerType==="touch")return;se.current=!0;const De=ge.relatedTarget;!A||f.current.includes(De)||fe.current&&(Qi(null,{sync:!0}),B.current=-1,W(ge),E||V.current?.focus({preventScroll:!0}))}}},[ve,V,A,f,W,fe,E]),me=R.useCallback(()=>N??te?.nodesRef.current.find(de=>de.id===J)?.context?.dataRef?.current.orientation,[J,te,N]),pe=Ce(de=>{if(ce.current=!1,se.current=!0,de.which===229||!ve.current&&de.currentTarget===V.current)return;if(x&&Tz(de.key,L,w,j)){Yc(de.key,me())||en(de),r.setOpen(!1,Fe(Wc,de.nativeEvent)),St(c)&&(E?te?.events.emit("virtualfocus",c):c.focus());return}const we=B.current,ge=Vh(f,O),De=R0(f,O);if(re||(de.key==="Home"&&(en(de),B.current=ge,W(de)),de.key==="End"&&(en(de),B.current=De,W(de))),j>1){const Ye=Array.from({length:f.current.length},()=>({width:1,height:1})),Ue=FD(Ye,j),Ot=Ue.findIndex(Pe=>Pe!=null&&!Ki(f,Pe,O)),He=Ue.reduce((Pe,Rt,$t)=>Rt!=null&&!Ki(f,Rt,O)?$t:Pe,-1),We=Ue[GD({current:Ue.map(Pe=>Pe!=null?f.current[Pe]:null)},{event:de,orientation:L,loopFocus:b,rtl:w,cols:j,disabledIndices:KD([...(typeof O!="function"?O:null)||f.current.map((Pe,Rt)=>Ki(f,Rt,O)?Rt:void 0),void 0],Ue),minIndex:Ot,maxIndex:He,prevIndex:XD(B.current>De?ge:B.current,Ye,Ue,j,de.key===ol?"bl":de.key===(w?Dr:kr)?"tr":"tl"),stopEvent:!0})];if(We!=null&&(B.current=We,W(de)),L==="both")return}if(Yc(de.key,L)){if(en(de),a&&!E&&Vn(de.currentTarget.ownerDocument)===de.currentTarget){B.current=Qh(de.key,L,w)?ge:De,W(de);return}Qh(de.key,L,w)?b?we>=De?v&&we!==f.current.length?B.current=-1:(se.current=!1,B.current=ge):B.current=Wt(f,{startingIndex:we,disabledIndices:O}):B.current=Math.min(De,Wt(f,{startingIndex:we,disabledIndices:O})):b?we<=ge?v&&we!==-1?B.current=f.current.length:(se.current=!1,B.current=De):B.current=Wt(f,{startingIndex:we,decrement:!0,disabledIndices:O}):B.current=Math.max(ge,Wt(f,{startingIndex:we,decrement:!0,disabledIndices:O})),Xi(f,B.current)&&(B.current=-1),W(de)}}),ze=R.useMemo(()=>E&&a&&je&&{"aria-activedescendant":`${z}-${m}`},[E,a,je,z,m]),be=R.useMemo(()=>({"aria-orientation":L==="both"?void 0:L,...re?{}:ze,onKeyDown(de){if(de.key==="Tab"&&de.shiftKey&&a&&!E){const we=rn(de.nativeEvent);if(we&&!qe(V.current,we))return;en(de),r.setOpen(!1,Fe(ja,de.nativeEvent)),St(c)&&c.focus();return}pe(de)},onPointerMove(){ce.current=!0}}),[ze,pe,V,L,re,r,a,E,c]),Se=R.useMemo(()=>{function de(ge){C==="auto"&&ew(ge.nativeEvent)&&(I.current=!E)}function we(ge){I.current=C,C==="auto"&&tw(ge.nativeEvent)&&(I.current=!0)}return{onKeyDown(ge){const De=r.select("open");ce.current=!1;const Ye=ge.key.startsWith("Arrow"),Ue=Rz(ge.key,me(),w),Ot=Yc(ge.key,L),He=(x?Ue:Ot)||ge.key==="Enter"||ge.key.trim()==="";if(E&&De)return pe(ge);if(!(!De&&!k&&Ye)){if(He){const We=Yc(ge.key,me());G.current=x&&We?null:ge.key}if(x){Ue&&(en(ge),De?(B.current=Vh(f,he.current),W(ge)):r.setOpen(!0,Fe(Wc,ge.nativeEvent,ge.currentTarget)));return}Ot&&(Oe.current!=null&&(B.current=Oe.current),en(ge),!De&&k?r.setOpen(!0,Fe(Wc,ge.nativeEvent,ge.currentTarget)):pe(ge),De&&W(ge))}},onFocus(ge){r.select("open")&&!E&&(B.current=-1,W(ge))},onPointerDown:we,onPointerEnter:we,onMouseDown:de,onClick:de}},[pe,he,C,f,x,W,r,k,L,me,w,Oe,E]),ye=R.useMemo(()=>({...ze,...Se}),[ze,Se]);return R.useMemo(()=>y?{reference:ye,floating:be,item:ne,trigger:Se}:{},[y,ye,be,Se,ne])}const Mz=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Xw(e,n={}){const r="rootStore"in e?e.rootStore:e,a=r.useState("open"),l=r.useState("floatingId"),c=r.useState("domReferenceElement"),d=r.useState("floatingElement"),{role:f="dialog"}=n,m=Cs(),h=c?.id||m,y=R.useMemo(()=>vu(d)?.id||l,[d,l]),g=Mz.get(f)??f,b=Fo()!=null,x=R.useMemo(()=>g==="tooltip"||f==="label"?Nt:{"aria-haspopup":g==="alertdialog"?"dialog":g,"aria-expanded":"false",...g==="listbox"&&{role:"combobox"},...g==="menu"&&b&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[g,b,f]),w=R.useMemo(()=>g==="tooltip"||f==="label"?{[`aria-${f==="label"?"labelledby":"describedby"}`]:a?y:void 0}:{...x,"aria-expanded":a?"true":"false","aria-controls":a?y:void 0,...g==="menu"&&{id:h}},[g,y,a,h,f,x]),E=R.useMemo(()=>{const A={id:y,...g&&{role:g}};return g==="tooltip"||f==="label"?A:{...A,...g==="menu"&&{"aria-labelledby":h}}},[g,y,h,f]),C=R.useCallback(({active:A,selected:k})=>{const O={role:"option",...A&&{id:`${y}-fui-option`}};switch(f){case"select":case"combobox":return{...O,"aria-selected":k}}return{}},[y,f]);return R.useMemo(()=>({reference:w,floating:E,item:C,trigger:x}),[w,E,x,C])}function Oz(e,n){const r="rootStore"in e?e.rootStore:e,a=r.context.dataRef,l=r.useState("open"),{listRef:c,activeIndex:d,onMatch:f,onTypingChange:m,enabled:h=!0,resetMs:y=750,selectedIndex:g=null}=n,v=Fn(),b=R.useRef(""),x=R.useRef(g??d??-1),w=R.useRef(null);Me(()=>{!l&&g!==null||(v.clear(),w.current=null,b.current!==""&&(b.current=""))},[l,g,v]),Me(()=>{l&&b.current===""&&(x.current=g??d??-1)},[l,g,d]);const E=Ce(L=>{L?a.current.typing||(a.current.typing=L,m?.(L)):a.current.typing&&(a.current.typing=L,m?.(L))}),C=Ce(L=>{function N(V,J,te){const re=J.find(I=>I?.toLocaleLowerCase().indexOf(te.toLocaleLowerCase())===0);return re?V.indexOf(re):-1}const j=c.current;if(b.current.length>0&&b.current[0]!==" "&&(N(j,j,b.current)===-1?E(!1):L.key===" "&&en(L)),j==null||L.key.length!==1||L.ctrlKey||L.metaKey||L.altKey)return;l&&L.key!==" "&&(en(L),E(!0));const z=b.current==="";z&&(x.current=g??d??-1),j.every(V=>V?V[0]?.toLocaleLowerCase()!==V[1]?.toLocaleLowerCase():!0)&&b.current===L.key&&(b.current="",x.current=w.current),b.current+=L.key,v.start(y,()=>{b.current="",x.current=w.current,E(!1)});const Z=z?g??d??-1:x.current,Q=N(j,[...j.slice((Z||0)+1),...j.slice(0,(Z||0)+1)],b.current);Q!==-1?(f?.(Q),w.current=Q):L.key!==" "&&(b.current="",E(!1))}),A=Ce(L=>{const N=L.relatedTarget,j=r.select("domReferenceElement"),z=r.select("floatingElement"),q=qe(j,N),Z=qe(z,N);q||Z||(v.clear(),b.current="",x.current=w.current,E(!1))}),k=R.useMemo(()=>({onKeyDown:C,onBlur:A}),[C,A]),O=R.useMemo(()=>({onKeyDown:C,onKeyUp(L){L.key===" "&&E(!1)},onBlur:A}),[C,A,E]);return R.useMemo(()=>h?{reference:k,floating:O}:{},[h,k,O])}function G0(e,n){const[r,a]=e;let l=!1;const c=n.length;for(let d=0,f=c-1;d<c;f=d++){const[m,h]=n[d]||[0,0],[y,g]=n[f]||[0,0];h>=a!=g>=a&&r<=(y-m)*(a-h)/(g-h)+m&&(l=!l)}return l}function Az(e,n){return e[0]>=n.x&&e[0]<=n.x+n.width&&e[1]>=n.y&&e[1]<=n.y+n.height}function gm(e={}){const{buffer:n=.5,blockPointerEvents:r=!1,requireIntent:a=!0}=e,l=new fo;let c=!1,d=null,f=null,m=typeof performance<"u"?performance.now():0;function h(g,v){const b=performance.now(),x=b-m;if(d===null||f===null||x===0)return d=g,f=v,m=b,null;const w=g-d,E=v-f,A=Math.sqrt(w*w+E*E)/x;return d=g,f=v,m=b,A}const y=({x:g,y:v,placement:b,elements:x,onClose:w,nodeId:E,tree:C})=>function(k){function O(){l.clear(),w()}if(l.clear(),!x.domReference||!x.floating||b==null||g==null||v==null)return;const{clientX:L,clientY:N}=k,j=[L,N],z=rn(k),q=k.type==="mouseleave",Z=qe(x.floating,z),Q=qe(x.domReference,z),V=x.domReference.getBoundingClientRect(),J=x.floating.getBoundingClientRect(),te=b.split("-")[0],re=g>J.right-J.width/2,I=v>J.bottom-J.height/2,B=Az(j,V),G=J.width>V.width,ce=J.height>V.height,W=(G?V:J).left,P=(G?V:J).right,X=(ce?V:J).top,le=(ce?V:J).bottom;if(Z&&(c=!0,!q))return;if(Q&&(c=!1),Q&&!q){c=!0;return}if(q&&ot(k.relatedTarget)&&qe(x.floating,k.relatedTarget)||C&&gs(C.nodesRef.current,E).some(({context:he})=>he?.open))return;if(te==="top"&&v>=V.bottom-1||te==="bottom"&&v<=V.top+1||te==="left"&&g>=V.right-1||te==="right"&&g<=V.left+1)return O();let se=[];switch(te){case"top":se=[[W,V.top+1],[W,J.bottom-1],[P,J.bottom-1],[P,V.top+1]];break;case"bottom":se=[[W,J.top+1],[W,V.bottom-1],[P,V.bottom-1],[P,J.top+1]];break;case"left":se=[[J.right-1,le],[J.right-1,X],[V.left+1,X],[V.left+1,le]];break;case"right":se=[[V.right-1,le],[V.right-1,X],[J.left+1,X],[J.left+1,le]];break}function ue([he,ve]){switch(te){case"top":{const Oe=[G?he+n/2:re?he+n*4:he-n*4,ve+n+1],fe=[G?he-n/2:re?he+n*4:he-n*4,ve+n+1],Ne=[[J.left,re||G?J.bottom-n:J.top],[J.right,re?G?J.bottom-n:J.top:J.bottom-n]];return[Oe,fe,...Ne]}case"bottom":{const Oe=[G?he+n/2:re?he+n*4:he-n*4,ve-n],fe=[G?he-n/2:re?he+n*4:he-n*4,ve-n],Ne=[[J.left,re||G?J.top+n:J.bottom],[J.right,re?G?J.top+n:J.bottom:J.top+n]];return[Oe,fe,...Ne]}case"left":{const Oe=[he+n+1,ce?ve+n/2:I?ve+n*4:ve-n*4],fe=[he+n+1,ce?ve-n/2:I?ve+n*4:ve-n*4];return[...[[I||ce?J.right-n:J.left,J.top],[I?ce?J.right-n:J.left:J.right-n,J.bottom]],Oe,fe]}case"right":{const Oe=[he-n,ce?ve+n/2:I?ve+n*4:ve-n*4],fe=[he-n,ce?ve-n/2:I?ve+n*4:ve-n*4],Ne=[[I||ce?J.left+n:J.right,J.top],[I?ce?J.left+n:J.right:J.left+n,J.bottom]];return[Oe,fe,...Ne]}default:return[]}}if(!G0([L,N],se)){if(c&&!B)return O();if(!q&&a){const he=h(k.clientX,k.clientY);if(he!==null&&he<.1)return O()}G0([L,N],ue([g,v]))?!c&&a&&l.start(40,O):O()}};return y.__options={blockPointerEvents:r},y}let _z=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),Dz=(function(e){return e[e.open=hs.open]="open",e[e.closed=hs.closed]="closed",e[e.startingStyle=hs.startingStyle]="startingStyle",e[e.endingStyle=hs.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const Kw=R.createContext(void 0);function kz(){const e=R.useContext(Kw);if(e===void 0)throw new Error(Zt(26));return e}const Qw="ArrowUp",Zw="ArrowDown",$w="ArrowLeft",Jw="ArrowRight",Ww="Home",eE="End",Nz=new Set([$w,Jw]),zz=new Set([Qw,Zw]),Lz=new Set([...Nz,...zz]);[...Lz];const tE=new Set([Qw,Zw,$w,Jw,Ww,eE]),jz={...Os,...$u,nestedDialogOpen(e){return e?{[Dz.nestedDialogOpen]:""}:null}},Pz=R.forwardRef(function(n,r){const{className:a,finalFocus:l,initialFocus:c,render:d,...f}=n,{store:m}=Ms(),h=m.useState("descriptionElementId"),y=m.useState("disablePointerDismissal"),g=m.useState("floatingRootContext"),v=m.useState("popupProps"),b=m.useState("modal"),x=m.useState("mounted"),w=m.useState("nested"),E=m.useState("nestedOpenDialogCount"),C=m.useState("open"),A=m.useState("openMethod"),k=m.useState("titleElementId"),O=m.useState("transitionStatus"),L=m.useState("role");kz(),Ju({open:C,ref:m.context.popupRef,onComplete(){C&&m.context.onOpenChangeComplete?.(!0)}});function N(Q){return Q==="touch"?m.context.popupRef.current:!0}const j=c===void 0?N:c,z=E>0,Z=Et("div",n,{state:{open:C,nested:w,transitionStatus:O,nestedDialogOpen:z},props:[v,{"aria-labelledby":k??void 0,"aria-describedby":h??void 0,role:L,tabIndex:-1,hidden:!x,onKeyDown(Q){tE.has(Q.key)&&Q.stopPropagation()},style:{[_z.nestedDialogs]:E}},f],ref:[r,m.context.popupRef,m.useStateSetter("popupElement")],stateAttributesMapping:jz});return _.jsx(Mw,{context:g,openInteractionType:A,disabled:!x,closeOnFocusOut:!y,initialFocus:j,returnFocus:l,modal:b!==!1,restoreFocus:"popup",children:Z})});function nE(e){return Vp(19)?e:e?"true":void 0}const oE=R.forwardRef(function(n,r){const{cutout:a,...l}=n;let c;if(a){const d=a?.getBoundingClientRect();c=`polygon(
19
- 0% 0%,
20
- 100% 0%,
21
- 100% 100%,
22
- 0% 100%,
23
- 0% 0%,
24
- ${d.left}px ${d.top}px,
25
- ${d.left}px ${d.bottom}px,
26
- ${d.right}px ${d.bottom}px,
27
- ${d.right}px ${d.top}px,
28
- ${d.left}px ${d.top}px
29
- )`}return _.jsx("div",{ref:r,role:"presentation","data-base-ui-inert":"",...l,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:c}})}),Iz=R.forwardRef(function(n,r){const{keepMounted:a=!1,...l}=n,{store:c}=Ms(),d=c.useState("mounted"),f=c.useState("modal"),m=c.useState("open");return d||a?_.jsx(Kw.Provider,{value:a,children:_.jsxs(Cw,{ref:r,...l,children:[d&&f===!0&&_.jsx(oE,{ref:c.context.internalBackdropRef,inert:nE(!m)}),n.children]})}):null});function ym(e){const n=R.useRef(!0);n.current&&(n.current=!1,e())}let F0={},X0={},K0="";function Uz(e){if(typeof document>"u")return!1;const n=it(e);return zt(n).innerWidth-n.documentElement.clientWidth>0}function Bz(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=it(e),a=r.documentElement,l=r.body,c=Ur(a)?a:l,d=c.style.overflowY,f=a.style.scrollbarGutter;a.style.scrollbarGutter="stable",c.style.overflowY="scroll";const m=c.offsetWidth;c.style.overflowY="hidden";const h=c.offsetWidth;return c.style.overflowY=d,a.style.scrollbarGutter=f,m===h}function Hz(e){const n=it(e),r=n.documentElement,a=n.body,l=Ur(r)?r:a,c={overflowY:l.style.overflowY,overflowX:l.style.overflowX};return Object.assign(l.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(l.style,c)}}function Vz(e){const n=it(e),r=n.documentElement,a=n.body,l=zt(r);let c=0,d=0,f=!1;const m=ao.create();if(Xx&&(l.visualViewport?.scale??1)!==1)return()=>{};function h(){const v=l.getComputedStyle(r),b=l.getComputedStyle(a),E=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=r.scrollTop,d=r.scrollLeft,F0={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},K0=r.style.scrollBehavior,X0={position:a.style.position,height:a.style.height,width:a.style.width,boxSizing:a.style.boxSizing,overflowY:a.style.overflowY,overflowX:a.style.overflowX,scrollBehavior:a.style.scrollBehavior};const C=r.scrollHeight>r.clientHeight,A=r.scrollWidth>r.clientWidth,k=v.overflowY==="scroll"||b.overflowY==="scroll",O=v.overflowX==="scroll"||b.overflowX==="scroll",L=Math.max(0,l.innerWidth-a.clientWidth),N=Math.max(0,l.innerHeight-a.clientHeight),j=parseFloat(b.marginTop)+parseFloat(b.marginBottom),z=parseFloat(b.marginLeft)+parseFloat(b.marginRight),q=Ur(r)?r:a;if(f=Bz(e),f){r.style.scrollbarGutter=E,q.style.overflowY="hidden",q.style.overflowX="hidden";return}Object.assign(r.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(C||k)&&(r.style.overflowY="scroll"),(A||O)&&(r.style.overflowX="scroll"),Object.assign(a.style,{position:"relative",height:j||N?`calc(100dvh - ${j+N}px)`:"100dvh",width:z||L?`calc(100vw - ${z+L}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),a.scrollTop=c,a.scrollLeft=d,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function y(){Object.assign(r.style,F0),Object.assign(a.style,X0),f||(r.scrollTop=c,r.scrollLeft=d,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=K0)}function g(){y(),m.request(h)}return h(),l.addEventListener("resize",g),()=>{m.cancel(),y(),typeof l.removeEventListener=="function"&&l.removeEventListener("resize",g)}}class Yz{lockCount=0;restore=null;timeoutLock=fo.create();timeoutUnlock=fo.create();acquire(n){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(n)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(n){if(this.lockCount===0||this.restore!==null)return;const a=it(n).documentElement,l=zt(a).getComputedStyle(a).overflowY;if(l==="hidden"||l==="clip"){this.restore=yn;return}const c=Kx||!Uz(n);this.restore=c?Hz(n):Vz(n)}}const qz=new Yz;function rE(e=!0,n=null){Me(()=>{if(e)return qz.acquire(n)},[e,n])}function Gz(e){const n=R.useRef(""),r=R.useCallback(l=>{l.defaultPrevented||(n.current=l.pointerType,e(l,l.pointerType))},[e]);return{onClick:R.useCallback(l=>{if(l.detail===0){e(l,"keyboard");return}"pointerType"in l?e(l,l.pointerType):e(l,n.current),n.current=""},[e]),onPointerDown:r}}function sE(e){const[n,r]=R.useState(null),a=Ce((f,m)=>{e||r(m||(Kx?"touch":""))}),l=R.useCallback(()=>{r(null)},[]),{onClick:c,onPointerDown:d}=Gz(a);return R.useMemo(()=>({openMethod:n,reset:l,triggerProps:{onClick:c,onPointerDown:d}}),[n,l,c,d])}function Fz(e){const{store:n,parentContext:r,actionsRef:a}=e,l=n.useState("open"),c=n.useState("disablePointerDismissal"),d=n.useState("modal"),f=n.useState("popupElement"),{openMethod:m,triggerProps:h,reset:y}=sE(l);cm(n);const{forceUnmount:g}=um(l,n,()=>{y()}),v=Ce(Z=>{const Q=Fe(Z);return Q.preventUnmountOnClose=()=>{n.set("preventUnmountingOnClose",!0)},Q}),b=R.useCallback(()=>{n.setOpen(!1,v(nm))},[n,v]);R.useImperativeHandle(a,()=>({unmount:g,close:b}),[g,b]);const x=hm({popupStore:n,onOpenChange:n.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[w,E]=R.useState(0),C=w===0,A=Xw(x),k=am(x,{outsidePressEvent(){return n.context.internalBackdropRef.current||n.context.backdropRef.current?"intentional":{mouse:d==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(Z){if(!n.context.outsidePressEnabledRef.current||"button"in Z&&Z.button!==0||"touches"in Z&&Z.touches.length!==1)return!1;const Q=rn(Z);if(C&&!c){const V=Q;return d&&(n.context.internalBackdropRef.current||n.context.backdropRef.current)?n.context.internalBackdropRef.current===V||n.context.backdropRef.current===V||qe(V,f)&&!V?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:C});rE(l&&d===!0,f);const{getReferenceProps:O,getFloatingProps:L,getTriggerProps:N}=al([A,k]);n.useContextCallback("onNestedDialogOpen",Z=>{E(Z+1)}),n.useContextCallback("onNestedDialogClose",()=>{E(0)}),R.useEffect(()=>(r?.onNestedDialogOpen&&l&&r.onNestedDialogOpen(w),r?.onNestedDialogClose&&!l&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&l&&r.onNestedDialogClose()}),[l,r,w]);const j=R.useMemo(()=>O(h),[O,h]),z=R.useMemo(()=>N(h),[N,h]),q=R.useMemo(()=>L(),[L]);n.useSyncedValues({openMethod:m,activeTriggerProps:j,inactiveTriggerProps:z,popupProps:q,floatingRootContext:x,nestedOpenDialogCount:w})}const Xz={...dm,modal:_e(e=>e.modal),nested:_e(e=>e.nested),nestedOpenDialogCount:_e(e=>e.nestedOpenDialogCount),disablePointerDismissal:_e(e=>e.disablePointerDismissal),openMethod:_e(e=>e.openMethod),descriptionElementId:_e(e=>e.descriptionElementId),titleElementId:_e(e=>e.titleElementId),viewportElement:_e(e=>e.viewportElement),role:_e(e=>e.role)};class Kz extends nf{constructor(n){super(Qz(n),{popupRef:R.createRef(),backdropRef:R.createRef(),internalBackdropRef:R.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new sl,onOpenChange:void 0,onOpenChangeComplete:void 0},Xz)}setOpen=(n,r)=>{if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(n,r),r.isCanceled)return;const a={open:n,nativeEvent:r.event,reason:r.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",a);const l={open:n},c=r.trigger?.id??null;(c||n)&&(l.activeTriggerId=c,l.activeTriggerElement=r.trigger??null),this.update(l)}}function Qz(e={}){return{...fm(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function Zz(e){const{children:n,open:r,defaultOpen:a=!1,onOpenChange:l,onOpenChangeComplete:c,disablePointerDismissal:d=!1,modal:f=!0,actionsRef:m,handle:h,triggerId:y,defaultTriggerId:g=null}=e,v=Ms(!0),b=!!v,x=Qt(()=>h?.store??new Kz({open:a,openProp:r,activeTriggerId:g,triggerIdProp:y,modal:f,disablePointerDismissal:d,nested:b})).current;ym(()=>{r===void 0&&x.state.open===!1&&a===!0&&x.update({open:!0,activeTriggerId:g})}),x.useControlledProp("openProp",r),x.useControlledProp("triggerIdProp",y),x.useSyncedValues({disablePointerDismissal:d,nested:b,modal:f}),x.useContextCallback("onOpenChange",l),x.useContextCallback("onOpenChangeComplete",c);const w=x.useState("payload");Fz({store:x,actionsRef:m,parentContext:v?.store.context});const E=R.useMemo(()=>({store:x}),[x]);return _.jsx(pw.Provider,{value:E,children:typeof n=="function"?n({payload:w}):n})}const $z=R.forwardRef(function(n,r){const{render:a,className:l,id:c,...d}=n,{store:f}=Ms(),m=Hr(c);return f.useSyncedValueWithCleanup("titleElementId",m),Et("h2",n,{ref:r,props:[{id:m},d]})});function Jz({...e}){return _.jsx(Zz,{"data-slot":"sheet",...e})}function Wz({...e}){return _.jsx(Iz,{"data-slot":"sheet-portal",...e})}function eL({className:e,...n}){return _.jsx(zk,{"data-slot":"sheet-overlay",className:Je("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50",e),...n})}function tL({className:e,children:n,side:r="right",showCloseButton:a=!0,...l}){return _.jsxs(Wz,{children:[_.jsx(eL,{}),_.jsxs(Pz,{"data-slot":"sheet-content","data-side":r,className:Je("bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...l,children:[n,a&&_.jsxs(Lk,{"data-slot":"sheet-close",render:_.jsx(oo,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[_.jsx(H_,{}),_.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function nL({className:e,...n}){return _.jsx("div",{"data-slot":"sheet-header",className:Je("gap-0.5 p-4 flex flex-col",e),...n})}function oL({className:e,...n}){return _.jsx($z,{"data-slot":"sheet-title",className:Je("text-foreground text-base font-medium",e),...n})}function rL({className:e,...n}){return _.jsx(jk,{"data-slot":"sheet-description",className:Je("text-muted-foreground text-sm",e),...n})}const aE=R.createContext(void 0);function il(e){const n=R.useContext(aE);if(n===void 0&&!e)throw new Error(Zt(72));return n}const sL={...dm,disabled:_e(e=>e.disabled),instantType:_e(e=>e.instantType),isInstantPhase:_e(e=>e.isInstantPhase),trackCursorAxis:_e(e=>e.trackCursorAxis),disableHoverablePopup:_e(e=>e.disableHoverablePopup),lastOpenChangeReason:_e(e=>e.openChangeReason),closeDelay:_e(e=>e.closeDelay),hasViewport:_e(e=>e.hasViewport)};class vm extends nf{constructor(n){super({...aL(),...n},{popupRef:R.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new sl},sL)}setOpen=(n,r)=>{const a=r.reason,l=a===sn,c=n&&a===Ca,d=!n&&(a===La||a===ef);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(n,r),r.isCanceled)return;const f=()=>{const m={open:n,openChangeReason:a};c?m.instantType="focus":d?m.instantType="dismiss":a===sn&&(m.instantType=void 0);const h=r.trigger?.id??null;(h||n)&&(m.activeTriggerId=h,m.activeTriggerElement=r.trigger??null),this.update(m)};l?Gn.flushSync(f):f()};static useStore(n,r){const a=Qt(()=>new vm(r)).current,l=n??a,c=hm({popupStore:l,onOpenChange:l.setOpen});return l.state.floatingRootContext=c,l}}function aL(){return{...fm(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}const iL=im(function(n){const{disabled:r=!1,defaultOpen:a=!1,open:l,disableHoverablePopup:c=!1,trackCursorAxis:d="none",actionsRef:f,onOpenChange:m,onOpenChangeComplete:h,handle:y,triggerId:g,defaultTriggerId:v=null,children:b}=n,x=vm.useStore(y?.store,{open:a,openProp:l,activeTriggerId:v,triggerIdProp:g});ym(()=>{l===void 0&&x.state.open===!1&&a===!0&&x.update({open:!0,activeTriggerId:v})}),x.useControlledProp("openProp",l),x.useControlledProp("triggerIdProp",g),x.useContextCallback("onOpenChange",m),x.useContextCallback("onOpenChangeComplete",h);const w=x.useState("open"),E=!r&&w,C=x.useState("activeTriggerId"),A=x.useState("payload");x.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:c}),Me(()=>{w&&r&&x.setOpen(!1,Fe(Ek))},[w,r,x]),x.useSyncedValue("disabled",r),cm(x);const{forceUnmount:k,transitionStatus:O}=um(E,x),L=x.useState("isInstantPhase"),N=x.useState("instantType"),j=x.useState("lastOpenChangeReason"),z=R.useRef(null);Me(()=>{O==="ending"&&j===Wu||O!=="ending"&&L?(N!=="delay"&&(z.current=N),x.set("instantType","delay")):z.current!==null&&(x.set("instantType",z.current),z.current=null)},[O,L,j,N,x]),Me(()=>{E&&C==null&&x.set("payload",void 0)},[x,C,E]);const q=R.useCallback(()=>{x.setOpen(!1,lL(x,nm))},[x]);R.useImperativeHandle(f,()=>({unmount:k,close:q}),[k,q]);const Z=x.useState("floatingRootContext"),Q=am(Z,{enabled:!r,referencePress:!0}),V=Jk(Z,{enabled:!r&&d!=="none",axis:d==="none"?void 0:d}),{getReferenceProps:J,getFloatingProps:te,getTriggerProps:re}=al([Q,V]),I=R.useMemo(()=>J(),[J]),B=R.useMemo(()=>re(),[re]),G=R.useMemo(()=>te(),[te]);return x.useSyncedValues({activeTriggerProps:I,inactiveTriggerProps:B,popupProps:G}),_.jsx(aE.Provider,{value:x,children:typeof b=="function"?b({payload:A}):b})});function lL(e,n){const r=Fe(n);return r.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},r}const iE=R.createContext(void 0);function cL(){return R.useContext(iE)}let uL=(function(e){return e[e.popupOpen=Mu.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const fL=600,dL=Bw(function(n,r){const{className:a,render:l,handle:c,payload:d,disabled:f,delay:m,closeDelay:h,id:y,...g}=n,v=il(!0),b=c?.store??v;if(!b)throw new Error(Zt(82));const x=Hr(y),w=b.useState("isTriggerActive",x),E=b.useState("isOpenedByTrigger",x),C=b.useState("floatingRootContext"),A=R.useRef(null),k=m??fL,O=h??0,{registerTrigger:L,isMountedByThisTrigger:N}=Yw(x,A,b,{payload:d,closeDelay:O}),j=cL(),{delayRef:z,isInstantPhase:q,hasProvider:Z}=Hk(C,{open:E});b.useSyncedValue("isInstantPhase",q);const Q=b.useState("disabled"),V=f??Q,J=b.useState("trackCursorAxis"),te=b.useState("disableHoverablePopup"),re=mm(C,{enabled:!V,mouseOnly:!0,move:!1,handleClose:!te&&J!=="both"?gm():null,restMs(){const W=j?.delay,P=typeof z.current=="object"?z.current.open:void 0;let X=k;return Z&&(P!==0?X=m??W??k:X=0),X},delay(){const W=typeof z.current=="object"?z.current.close:void 0;let P=O;return h==null&&Z&&(P=W),{close:P}},triggerElementRef:A,isActiveTrigger:w}),I=qw(C,{enabled:!V}).reference,B={open:E},G=b.useState("triggerProps",N);return Et("button",n,{state:B,ref:[r,L,A],props:[re,I,G,{id:x,[uL.triggerDisabled]:V?"":void 0},g],stateAttributesMapping:mw})}),lE=R.createContext(void 0);function hL(){const e=R.useContext(lE);if(e===void 0)throw new Error(Zt(70));return e}const pL=R.forwardRef(function(n,r){const{children:a,container:l,className:c,render:d,...f}=n,{portalNode:m,portalSubtree:h}=Tw({container:l,ref:r,componentProps:n,elementProps:f});return!h&&!m?null:_.jsxs(R.Fragment,{children:[h,m&&Gn.createPortal(a,m)]})}),mL=R.forwardRef(function(n,r){const{keepMounted:a=!1,...l}=n;return il().useState("mounted")||a?_.jsx(lE.Provider,{value:a,children:_.jsx(pL,{ref:r,...l})}):null}),cE=R.createContext(void 0);function uE(){const e=R.useContext(cE);if(e===void 0)throw new Error(Zt(71));return e}const gL=R.createContext(void 0);function fE(){return R.useContext(gL)?.direction??"ltr"}const yL=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:a,placement:l,rects:c,platform:d,elements:f,middlewareData:m}=n,{element:h,padding:y=0,offsetParent:g="real"}=ho(e,n)||{};if(h==null)return{};const v=Jp(y),b={x:r,y:a},x=Zu(l),w=Qu(x),E=await d.getDimensions(h),C=x==="y",A=C?"top":"left",k=C?"bottom":"right",O=C?"clientHeight":"clientWidth",L=c.reference[w]+c.reference[x]-b[x]-c.floating[w],N=b[x]-c.reference[x],j=g==="real"?await d.getOffsetParent?.(h):f.floating;let z=f.floating[O]||c.floating[w];(!z||!await d.isElement?.(j))&&(z=f.floating[O]||c.floating[w]);const q=L/2-N/2,Z=z/2-E[w]/2-1,Q=Math.min(v[A],Z),V=Math.min(v[k],Z),J=Q,te=z-E[w]-V,re=z/2-E[w]/2+q,I=Su(J,re,te),B=!m.arrow&&Go(l)!=null&&re!==I&&c.reference[w]/2-(re<J?Q:V)-E[w]/2<0,G=B?re<J?re-J:re-te:0;return{[x]:b[x]+G,data:{[x]:I,centerOffset:re-I-G,...B&&{alignmentOffset:G}},reset:B}}}),vL=(e,n)=>({...yL(e),options:[e,n]}),bL={name:"hide",async fn(e){const{width:n,height:r,x:a,y:l}=e.rects.reference,c=n===0&&r===0&&a===0&&l===0;return{data:{referenceHidden:(await HN().fn(e)).data?.referenceHidden||c}}}},ou={sideX:"left",sideY:"top"},SL={name:"adaptiveOrigin",async fn(e){const{x:n,y:r,rects:{floating:a},elements:{floating:l},platform:c,strategy:d,placement:f}=e,m=zt(l),h=m.getComputedStyle(l);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:n,y:r,data:ou};const g=await c.getOffsetParent?.(l);let v={width:0,height:0};if(d==="fixed"&&m?.visualViewport)v={width:m.visualViewport.width,height:m.visualViewport.height};else if(g===m){const A=it(l);v={width:A.documentElement.clientWidth,height:A.documentElement.clientHeight}}else await c.isElement?.(g)&&(v=await c.getDimensions(g));const b=bn(f);let x=n,w=r;b==="left"&&(x=v.width-(n+a.width)),b==="top"&&(w=v.height-(r+a.height));const E=b==="left"?"right":ou.sideX,C=b==="top"?"bottom":ou.sideY;return{x,y:w,data:{sideX:E,sideY:C}}}};function dE(e,n,r){const a=e==="inline-start"||e==="inline-end";return{top:"top",right:a?r?"inline-start":"inline-end":"right",bottom:"bottom",left:a?r?"inline-end":"inline-start":"left"}[n]}function Q0(e,n,r){const{rects:a,placement:l}=e;return{side:dE(n,bn(l),r),align:Go(l)||"center",anchor:{width:a.reference.width,height:a.reference.height},positioner:{width:a.floating.width,height:a.floating.height}}}function hE(e){const{anchor:n,positionMethod:r="absolute",side:a="bottom",sideOffset:l=0,align:c="center",alignOffset:d=0,collisionBoundary:f,collisionPadding:m=5,sticky:h=!1,arrowPadding:y=5,disableAnchorTracking:g=!1,keepMounted:v=!1,floatingRootContext:b,mounted:x,collisionAvoidance:w,shiftCrossAxis:E=!1,nodeId:C,adaptiveOrigin:A,lazyFlip:k=!1,externalTree:O}=e,[L,N]=R.useState(null);!x&&L!==null&&N(null);const j=w.side||"flip",z=w.align||"flip",q=w.fallbackAxisSide||"end",Z=typeof n=="function"?n:void 0,Q=Ce(Z),V=Z?Q:n,J=an(n),re=fE()==="rtl",I=L||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":re?"left":"right","inline-start":re?"right":"left"}[a],B=c==="center"?I:`${I}-${c}`;let G=m;const ce=1,W=a==="bottom"?ce:0,P=a==="top"?ce:0,X=a==="right"?ce:0,le=a==="left"?ce:0;typeof G=="number"?G={top:G+W,right:G+le,bottom:G+P,left:G+X}:G&&(G={top:(G.top||0)+W,right:(G.right||0)+le,bottom:(G.bottom||0)+P,left:(G.left||0)+X});const se={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:G},ue=R.useRef(null),he=an(l),ve=an(d),Ne=[jN(ht=>{const Tt=Q0(ht,a,re),nn=typeof he.current=="function"?he.current(Tt):he.current,Lt=typeof ve.current=="function"?ve.current(Tt):ve.current;return{mainAxis:nn,crossAxis:Lt,alignmentAxis:Lt}},[typeof l!="function"?l:0,typeof d!="function"?d:0,re,a])],je=z==="none"&&j!=="shift",ne=!je&&(h||E||j==="shift"),me=j==="none"?null:UN({...se,padding:{top:G.top+ce,right:G.right+ce,bottom:G.bottom+ce,left:G.left+ce},mainAxis:!E&&j==="flip",crossAxis:z==="flip"?"alignment":!1,fallbackAxisSideDirection:q}),pe=je?null:PN(ht=>{const Tt=it(ht.elements.floating).documentElement;return{...se,rootBoundary:E?{x:0,y:0,width:Tt.clientWidth,height:Tt.clientHeight}:void 0,mainAxis:z!=="none",crossAxis:ne,limiter:h||E?void 0:IN(nn=>{if(!ue.current)return{};const{width:Lt,height:Ht}=ue.current.getBoundingClientRect(),_n=qn(bn(nn.placement)),cn=_n==="y"?Lt:Ht,Qo=_n==="y"?G.left+G.right:G.top+G.bottom;return{offset:cn/2+Qo/2}})}},[se,h,E,G,z]);j==="shift"||z==="shift"||c==="center"?Ne.push(pe,me):Ne.push(me,pe),Ne.push(BN({...se,apply({elements:{floating:ht},rects:{reference:Tt},availableWidth:nn,availableHeight:Lt}){const Ht=ht.style;Ht.setProperty("--available-width",`${nn}px`),Ht.setProperty("--available-height",`${Lt}px`),Ht.setProperty("--anchor-width",`${Tt.width}px`),Ht.setProperty("--anchor-height",`${Tt.height}px`)}}),vL(()=>({element:ue.current||document.createElement("div"),padding:y,offsetParent:"floating"}),[y]),{name:"transformOrigin",fn(ht){const{elements:Tt,middlewareData:nn,placement:Lt,rects:Ht,y:_n}=ht,cn=bn(Lt),Qo=qn(cn),Zo=ue.current,uf=nn.arrow?.x||0,dl=nn.arrow?.y||0,Va=Zo?.clientWidth||0,qr=Zo?.clientHeight||0,Ya=uf+Va/2,qa=dl+qr/2,hl=Math.abs(nn.shift?.y||0),pl=Ht.reference.height/2,go=typeof l=="function"?l(Q0(ht,a,re)):l,Ga=hl>go,ml={top:`${Ya}px calc(100% + ${go}px)`,bottom:`${Ya}px ${-go}px`,left:`calc(100% + ${go}px) ${qa}px`,right:`${-go}px ${qa}px`}[cn],gl=`${Ya}px ${Ht.reference.y+pl-_n}px`;return Tt.floating.style.setProperty("--transform-origin",ne&&Qo==="y"&&Ga?gl:ml),{}}},bL,A),Me(()=>{!x&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[x,b]);const ze=R.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:be,elements:Se,x:ye,y:de,middlewareData:we,update:ge,placement:De,context:Ye,isPositioned:Ue,floatingStyles:Ot}=yz({rootContext:b,placement:B,middleware:Ne,strategy:r,whileElementsMounted:v?void 0:(...ht)=>U0(...ht,ze),nodeId:C,externalTree:O}),{sideX:He,sideY:We}=we.adaptiveOrigin||ou,Pe=Ue?r:"fixed",Rt=R.useMemo(()=>{const ht=A?{position:Pe,[He]:ye,[We]:de}:{position:Pe,...Ot};return Ue||(ht.opacity=0),ht},[A,Pe,He,ye,We,de,Ot,Ue]),$t=R.useRef(null);Me(()=>{if(!x)return;const ht=J.current,Tt=typeof ht=="function"?ht():ht,Lt=(Z0(Tt)?Tt.current:Tt)||null||null;Lt!==$t.current&&(be.setPositionReference(Lt),$t.current=Lt)},[x,be,V,J]),R.useEffect(()=>{if(!x)return;const ht=J.current;typeof ht!="function"&&Z0(ht)&&ht.current!==$t.current&&(be.setPositionReference(ht.current),$t.current=ht.current)},[x,be,V,J]),R.useEffect(()=>{if(v&&x&&Se.domReference&&Se.floating)return U0(Se.domReference,Se.floating,ge,ze)},[v,x,Se,ge,ze]);const Xn=bn(De),As=dE(a,Xn,re),Kn=Go(De)||"center",Le=!!we.hide?.referenceHidden;Me(()=>{k&&x&&Ue&&N(Xn)},[k,x,Ue,Xn]);const Xe=R.useMemo(()=>({position:"absolute",top:we.arrow?.y,left:we.arrow?.x}),[we.arrow]),st=we.arrow?.centerOffset!==0;return R.useMemo(()=>({positionerStyles:Rt,arrowStyles:Xe,arrowRef:ue,arrowUncentered:st,side:As,align:Kn,physicalSide:Xn,anchorHidden:Le,refs:be,context:Ye,isPositioned:Ue,update:ge}),[Rt,Xe,ue,st,As,Kn,Xn,Le,be,Ye,Ue,ge])}function Z0(e){return e!=null&&"current"in e}function rf(e){return e==="starting"?n2:Nt}const xL=R.forwardRef(function(n,r){const{render:a,className:l,anchor:c,positionMethod:d="absolute",side:f="top",align:m="center",sideOffset:h=0,alignOffset:y=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:x=!1,disableAnchorTracking:w=!1,collisionAvoidance:E=Tx,...C}=n,A=il(),k=hL(),O=A.useState("open"),L=A.useState("mounted"),N=A.useState("trackCursorAxis"),j=A.useState("disableHoverablePopup"),z=A.useState("floatingRootContext"),q=A.useState("instantType"),Z=A.useState("transitionStatus"),Q=A.useState("hasViewport"),V=hE({anchor:c,positionMethod:d,floatingRootContext:z,mounted:L,side:f,sideOffset:h,align:m,alignOffset:y,collisionBoundary:g,collisionPadding:v,sticky:x,arrowPadding:b,disableAnchorTracking:w,keepMounted:k,collisionAvoidance:E,adaptiveOrigin:Q?SL:void 0}),J=R.useMemo(()=>{const B={};return(!O||N==="both"||j)&&(B.pointerEvents="none"),{role:"presentation",hidden:!L,style:{...V.positionerStyles,...B}}},[O,N,j,L,V.positionerStyles]),te=R.useMemo(()=>({open:O,side:V.side,align:V.align,anchorHidden:V.anchorHidden,instant:N!=="none"?"tracking-cursor":q}),[O,V.side,V.align,V.anchorHidden,N,q]),re=R.useMemo(()=>({...te,arrowRef:V.arrowRef,arrowStyles:V.arrowStyles,arrowUncentered:V.arrowUncentered}),[te,V.arrowRef,V.arrowStyles,V.arrowUncentered]),I=Et("div",n,{state:te,props:[J,rf(Z),C],ref:[r,A.useStateSetter("positionerElement")],stateAttributesMapping:Os});return _.jsx(cE.Provider,{value:re,children:I})}),wL={...Os,...$u},EL=R.forwardRef(function(n,r){const{className:a,render:l,...c}=n,d=il(),{side:f,align:m}=uE(),h=d.useState("open"),y=d.useState("instantType"),g=d.useState("transitionStatus"),v=d.useState("popupProps"),b=d.useState("floatingRootContext");Ju({open:h,ref:d.context.popupRef,onComplete(){h&&d.context.onOpenChangeComplete?.(!0)}});const x=d.useState("disabled"),w=d.useState("closeDelay");return Fw(b,{enabled:!x,closeDelay:w}),Et("div",n,{state:{open:h,side:f,align:m,instant:y,transitionStatus:g},ref:[r,d.context.popupRef,d.useStateSetter("popupElement")],props:[v,rf(g),c],stateAttributesMapping:wL})}),RL=R.forwardRef(function(n,r){const{className:a,render:l,...c}=n,f=il().useState("instantType"),{open:m,arrowRef:h,side:y,align:g,arrowUncentered:v,arrowStyles:b}=uE();return Et("div",n,{state:{open:m,side:y,align:g,uncentered:v,instant:f},ref:[r,h],props:[{style:b,"aria-hidden":!0},c],stateAttributesMapping:Os})}),TL=function(n){const{delay:r,closeDelay:a,timeout:l=400}=n,c=R.useMemo(()=>({delay:r,closeDelay:a}),[r,a]),d=R.useMemo(()=>({open:r,close:a}),[r,a]);return _.jsx(iE.Provider,{value:c,children:_.jsx(Bk,{delay:d,timeoutMs:l,children:n.children})})};function CL({delay:e=0,...n}){return _.jsx(TL,{"data-slot":"tooltip-provider",delay:e,...n})}function ML({...e}){return _.jsx(iL,{"data-slot":"tooltip",...e})}function OL({...e}){return _.jsx(dL,{"data-slot":"tooltip-trigger",...e})}function AL({className:e,side:n="top",sideOffset:r=4,align:a="center",alignOffset:l=0,children:c,...d}){return _.jsx(mL,{children:_.jsx(xL,{align:a,alignOffset:l,side:n,sideOffset:r,className:"isolate z-50",children:_.jsxs(EL,{"data-slot":"tooltip-content",className:Je("data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 rounded-md px-3 py-1.5 text-xs data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 bg-foreground text-background z-50 w-fit max-w-xs origin-(--transform-origin)",e),...d,children:[c,_.jsx(RL,{className:"size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 bg-foreground fill-foreground z-50 data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}const Zh=768;function _L(){const[e,n]=R.useState(void 0);return R.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Zh-1}px)`),a=()=>{n(window.innerWidth<Zh)};return r.addEventListener("change",a),n(window.innerWidth<Zh),()=>r.removeEventListener("change",a)},[]),!!e}const DL="sidebar_state",kL=3600*24*7,NL="16rem",zL="18rem",LL="3rem",jL="b",pE=R.createContext(null);function sf(){const e=R.useContext(pE);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function PL({defaultOpen:e=!0,open:n,onOpenChange:r,className:a,style:l,children:c,...d}){const f=_L(),[m,h]=R.useState(!1),[y,g]=R.useState(e),v=n??y,b=R.useCallback(C=>{const A=typeof C=="function"?C(v):C;r?r(A):g(A),document.cookie=`${DL}=${A}; path=/; max-age=${kL}`},[r,v]),x=R.useCallback(()=>f?h(C=>!C):b(C=>!C),[f,b,h]);R.useEffect(()=>{const C=A=>{A.key===jL&&(A.metaKey||A.ctrlKey)&&(A.preventDefault(),x())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[x]);const w=v?"expanded":"collapsed",E=R.useMemo(()=>({state:w,open:v,setOpen:b,isMobile:f,openMobile:m,setOpenMobile:h,toggleSidebar:x}),[w,v,b,f,m,h,x]);return _.jsx(pE.Provider,{value:E,children:_.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":NL,"--sidebar-width-icon":LL,...l},className:Je("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",a),...d,children:c})})}function IL({side:e="left",variant:n="sidebar",collapsible:r="offcanvas",className:a,children:l,dir:c,...d}){const{isMobile:f,state:m,openMobile:h,setOpenMobile:y}=sf();return r==="none"?_.jsx("div",{"data-slot":"sidebar",className:Je("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),...d,children:l}):f?_.jsx(Jz,{open:h,onOpenChange:y,...d,children:_.jsxs(tL,{dir:c,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":zL},side:e,children:[_.jsxs(nL,{className:"sr-only",children:[_.jsx(oL,{children:"Sidebar"}),_.jsx(rL,{children:"Displays the mobile sidebar."})]}),_.jsx("div",{className:"flex h-full w-full flex-col",children:l})]})}):_.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":m,"data-collapsible":m==="collapsed"?r:"","data-variant":n,"data-side":e,"data-slot":"sidebar",children:[_.jsx("div",{"data-slot":"sidebar-gap",className:Je("transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n==="floating"||n==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),_.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:Je("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",n==="floating"||n==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...d,children:_.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col",children:l})})]})}function UL({className:e,onClick:n,...r}){const{toggleSidebar:a}=sf();return _.jsxs(oo,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:Je(e),onClick:l=>{n?.(l),a()},...r,children:[_.jsx(N_,{}),_.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function BL({className:e,...n}){return _.jsx("main",{"data-slot":"sidebar-inset",className:Je("bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 relative flex w-full flex-1 flex-col",e),...n})}function HL({className:e,...n}){return _.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:Je("gap-2 p-2 flex flex-col",e),...n})}function VL({className:e,...n}){return _.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Je("no-scrollbar gap-0 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n})}function bm({className:e,...n}){return _.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Je("p-2 relative flex w-full min-w-0 flex-col",e),...n})}function YL({className:e,render:n,...r}){return Vu({defaultTagName:"div",props:Ho({className:Je("text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0",e)},r),render:n,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function mE({className:e,...n}){return _.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:Je("text-sm w-full",e),...n})}function af({className:e,...n}){return _.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Je("gap-0 flex w-full min-w-0 flex-col",e),...n})}function ys({className:e,...n}){return _.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Je("group/menu-item relative",e),...n})}const qL=Yp("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ua({render:e,isActive:n=!1,variant:r="default",size:a="default",tooltip:l,className:c,...d}){const{isMobile:f,state:m}=sf(),h=Vu({defaultTagName:"button",props:Ho({className:Je(qL({variant:r,size:a}),c)},d),render:l?OL:e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:n}});return l?(typeof l=="string"&&(l={children:l}),_.jsxs(ML,{children:[h,_.jsx(AL,{side:"right",align:"center",hidden:m!=="collapsed"||f,...l})]})):h}function GL({className:e,render:n,showOnHover:r=!1,...a}){return Vu({defaultTagName:"button",props:Ho({className:Je("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 aspect-square w-5 rounded-md p-0 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 focus-visible:ring-2 [&>svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0",r&&"peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 aria-expanded:opacity-100 md:opacity-0",e)},a),render:n,state:{slot:"sidebar-menu-action",sidebar:"menu-action"}})}class FL{ws=null;options;state="disconnected";reconnectAttempt=0;reconnectTimer=null;shouldReconnect=!0;visibilityHandler=null;onlineHandler=null;constructor(n){this.options={reconnect:!0,reconnectDelay:1e3,maxReconnectDelay:3e4,...n},this.setupVisibilityHandlers()}connect(){if(!(this.state==="connected"||this.state==="connecting")){this.shouldReconnect=!0,this.setState("connecting");try{const n=new URL(this.options.url);n.searchParams.set("token",this.options.authToken),this.ws=new WebSocket(n.toString()),this.ws.onopen=()=>{this.reconnectAttempt=0,this.setState("connected")},this.ws.onmessage=r=>{try{const a=JSON.parse(r.data);this.options.onMessage(a)}catch(a){console.error("[ws] Failed to parse message:",a)}},this.ws.onerror=r=>{console.error("[ws] WebSocket error:",r),this.setState("error","Connection error")},this.ws.onclose=()=>{this.ws=null,this.shouldReconnect&&this.options.reconnect?this.scheduleReconnect():this.setState("disconnected")}}catch(n){const r=n instanceof Error?n.message:String(n);this.setState("error",r)}}}disconnect(){this.shouldReconnect=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null),this.cleanupVisibilityHandlers(),this.setState("disconnected")}send(n){if(this.state!=="connected"||!this.ws)throw new Error("WebSocket is not connected");this.ws.send(JSON.stringify(n))}getState(){return this.state}setState(n,r){this.state!==n&&(this.state=n,this.options.onStateChange(n,r))}scheduleReconnect(){if(this.reconnectTimer)return;const n=Math.min(this.options.reconnectDelay*2**this.reconnectAttempt,this.options.maxReconnectDelay);this.reconnectAttempt++,console.log(`[ws] Reconnecting in ${n}ms (attempt ${this.reconnectAttempt})...`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}setupVisibilityHandlers(){typeof window>"u"||typeof document>"u"||(this.visibilityHandler=()=>{document.visibilityState==="visible"&&(console.log("[ws] Tab became visible, checking connection..."),this.shouldReconnect&&this.state!=="connected"&&this.state!=="connecting"&&(console.log("[ws] Reconnecting immediately (tab visible)"),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.reconnectAttempt=0,this.connect()))},this.onlineHandler=()=>{console.log("[ws] Network came online, checking connection..."),this.shouldReconnect&&this.state!=="connected"&&this.state!=="connecting"&&(console.log("[ws] Reconnecting immediately (network online)"),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.reconnectAttempt=0,this.connect())},document.addEventListener("visibilitychange",this.visibilityHandler),window.addEventListener("online",this.onlineHandler))}cleanupVisibilityHandlers(){typeof window>"u"||typeof document>"u"||(this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null),this.onlineHandler&&(window.removeEventListener("online",this.onlineHandler),this.onlineHandler=null))}}class XL{ws;options;pendingRequests=new Map;requestIdCounter=0;constructor(n){this.options=n,this.ws=new FL({url:n.url,authToken:n.authToken,onMessage:r=>this.handleMessage(r),onStateChange:n.onStateChange})}connect(){this.ws.connect()}disconnect(){this.ws.disconnect();for(const[n,r]of this.pendingRequests.entries())r.reject(new Error("Connection closed")),this.pendingRequests.delete(n)}getConnectionState(){return this.ws.getState()}async newSession(n){const r=await this.sendCommand({type:"new_session",parentSession:n});return console.log("[clankie-client] newSession response:",r),r}async listSessions(){return await this.sendCommand({type:"list_sessions"})}async prompt(n,r,a){await this.sendCommand({type:"prompt",message:r,images:a},n)}async steer(n,r){await this.sendCommand({type:"steer",message:r},n)}async followUp(n,r){await this.sendCommand({type:"follow_up",message:r},n)}async abort(n){await this.sendCommand({type:"abort"},n)}async uploadAttachment(n,r,a,l){return await this.sendCommand({type:"upload_attachment",fileName:r,data:a,mimeType:l},n)}async getState(n){return await this.sendCommand({type:"get_state"},n)}async getMessages(n){return await this.sendCommand({type:"get_messages"},n)}async setModel(n,r,a){return await this.sendCommand({type:"set_model",provider:r,modelId:a},n)}async cycleModel(n){return await this.sendCommand({type:"cycle_model"},n)}async getAvailableModels(n){return await this.sendCommand({type:"get_available_models"},n)}async setThinkingLevel(n,r){await this.sendCommand({type:"set_thinking_level",level:r},n)}async cycleThinkingLevel(n){return await this.sendCommand({type:"cycle_thinking_level"},n)}async compact(n,r){return await this.sendCommand({type:"compact",customInstructions:r},n)}async getSessionStats(n){return await this.sendCommand({type:"get_session_stats"},n)}async getAuthProviders(){return await this.sendCommand({type:"get_auth_providers"})}async authLogin(n){return await this.sendCommand({type:"auth_login",providerId:n})}async authSetApiKey(n,r){await this.sendCommand({type:"auth_set_api_key",providerId:n,apiKey:r})}authLoginInput(n,r){const a={command:{type:"auth_login_input",loginFlowId:n,value:r}};this.ws.send(a)}authLoginCancel(n){const r={command:{type:"auth_login_cancel",loginFlowId:n}};this.ws.send(r)}sendExtensionUIResponse(n){this.ws.send(n)}async authLogout(n){await this.sendCommand({type:"auth_logout",providerId:n})}async getExtensions(n){return await this.sendCommand({type:"get_extensions"},n)}async getSkills(n){return await this.sendCommand({type:"get_skills"},n)}async installPackage(n,r,a){return await this.sendCommand({type:"install_package",source:r,local:a},n)}async reload(n){await this.sendCommand({type:"reload"},n)}handleMessage(n){if("type"in n&&!("sessionId"in n)){const r=n;if(!r.id)return;const a=this.pendingRequests.get(r.id);if(a){this.pendingRequests.delete(r.id),r.success?a.resolve(r.data):a.reject(new Error(r.error));return}return}if("sessionId"in n&&"event"in n){const{sessionId:r,event:a}=n;if(a.type==="response"&&a.id){const l=this.pendingRequests.get(a.id);if(l){this.pendingRequests.delete(a.id),a.success?l.resolve(a.data):l.reject(new Error(a.error));return}}if(r==="_auth"&&a.type==="auth_event"){this.options.onAuthEvent(a);return}if(a.type==="extension_ui_request"){this.options.onExtensionUIRequest(a);return}this.options.onEvent(r,a);return}console.warn("[clankie-client] Unknown message format:",n)}async sendCommand(n,r){if(this.getConnectionState()!=="connected")throw new Error("WebSocket is not connected");const a=`req-${++this.requestIdCounter}`,l={...r!==void 0&&{sessionId:r},command:{...n,id:a}};return new Promise((c,d)=>{this.pendingRequests.set(a,{resolve:c,reject:d}),this.ws.send(l),setTimeout(()=>{this.pendingRequests.has(a)&&(this.pendingRequests.delete(a),d(new Error("Request timeout")))},3e4)})}}const KL={providers:[],isLoadingProviders:!1,loginFlow:null},ll=new zr(KL);function J4(e){ll.setState(n=>({...n,isLoadingProviders:e}))}function W4(e){ll.setState(n=>({...n,providers:e,isLoadingProviders:!1}))}function ej(e,n){ll.setState(r=>({...r,loginFlow:{loginFlowId:e,providerId:n,status:"idle"}}))}function QL(e){ll.setState(n=>{if(!n.loginFlow||n.loginFlow.loginFlowId!==e.loginFlowId)return n;const r={...n.loginFlow};switch(e.event){case"url":r.status="waiting_url",r.url=e.url,r.instructions=e.instructions;break;case"prompt":r.status="waiting_input",r.promptMessage=e.message,r.promptPlaceholder=e.placeholder;break;case"manual_input":r.showManualInput=!0;break;case"progress":r.status="in_progress",r.progressMessage=e.message;break;case"complete":r.status=e.success?"complete":"error",r.success=e.success,r.error=e.error;break}return{...n,loginFlow:r}})}function tj(){ll.setState(e=>({...e,loginFlow:null}))}const $0=/(?:^|\n)\[Attached: ([^\]]+)\]/g,gE={messages:[],streamingContent:"",thinkingContent:"",currentMessageId:null},mo=new zr(gE);function nj(e,n){const r=`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`;mo.setState(a=>({...a,messages:[...a.messages,{id:r,role:"user",content:e,timestamp:Date.now(),attachments:n?.length?n:void 0}]}))}function ZL(){const e=`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`;mo.setState(n=>({...n,currentMessageId:e,streamingContent:"",messages:[...n.messages,{id:e,role:"assistant",content:"",timestamp:Date.now(),isStreaming:!0}]}))}function $L(e){mo.setState(n=>n.currentMessageId?{...n,streamingContent:e,messages:n.messages.map(r=>r.id===n.currentMessageId?{...r,content:e,isStreaming:!0}:r)}:n)}function JL(){mo.setState(e=>({...e,streamingContent:"",thinkingContent:"",currentMessageId:null,messages:e.messages.map(n=>n.id===e.currentMessageId?{...n,isStreaming:!1,isThinking:!1}:n).filter(n=>{if(n.id!==e.currentMessageId||n.role!=="assistant")return!0;const r=n.content.trim().length>0,a=(n.thinkingContent??"").trim().length>0;return r||a})}))}function WL(){mo.setState(e=>e.currentMessageId?{...e,thinkingContent:"",messages:e.messages.map(n=>n.id===e.currentMessageId?{...n,isThinking:!0}:n)}:e)}function e3(e){mo.setState(n=>n.currentMessageId?{...n,thinkingContent:e,messages:n.messages.map(r=>r.id===n.currentMessageId?{...r,thinkingContent:e}:r)}:n)}function t3(){mo.setState(e=>e.currentMessageId?{...e,messages:e.messages.map(n=>n.id===e.currentMessageId?{...n,isThinking:!1}:n)}:e)}function n3(e){const n=e.filter(r=>r.role==="user"||r.role==="assistant").map((r,a)=>{let l="",c,d=[];if(typeof r.content=="string"?l=r.content:Array.isArray(r.content)&&(l=r.content.filter(f=>f.type==="text").map(f=>f.text).join(`
30
-
31
- `),r.role==="assistant"&&(c=r.content.filter(m=>m.type==="thinking").map(m=>m.thinking).join(`
32
-
33
- `)||void 0),r.role==="user"&&(d=o3(r.content))),r.role==="user"){const{content:f,attachments:m}=r3(l);l=f,d=[...d,...m]}return{id:`msg-${a}`,role:r.role,content:l,persistedThinkingContent:c,attachments:d.length>0?d:void 0,timestamp:Date.now()-(e.length-a)*1e3}}).filter(r=>{if(r.role==="user")return!0;const a=r.content.trim().length>0,l=(r.persistedThinkingContent??"").trim().length>0;return a||l});mo.setState(r=>({...r,messages:n}))}function o3(e){return e.filter(n=>n.type==="image").map(n=>({type:"image",mimeType:n.mimeType,previewUrl:`data:${n.mimeType};base64,${n.data}`}))}function r3(e){const r=Array.from(e.matchAll($0)).map(l=>({type:"file",name:l[1]}));return{content:e.replace($0,"").replace(/\n{3,}/g,`
34
-
35
- `).trim(),attachments:r}}function $h(){mo.setState(()=>gE)}const yE={executions:{},executionOrder:[]},cl=new zr(yE);function _u(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function s3(e){return _u(e)&&e.type==="toolCall"&&typeof e.id=="string"&&typeof e.name=="string"}function a3(e){if(e.role!=="toolResult"||typeof e.toolCallId!="string")return null;let n;typeof e.content=="string"?n=[{type:"text",text:e.content}]:Array.isArray(e.content)&&(n=e.content.filter(a=>_u(a)));const r=_u(e.details)?e.details:void 0;return{result:{...n!==void 0?{content:n}:{},...r!==void 0?{details:r}:{}},isError:!!e.isError}}function i3(){const{currentMessageId:e,messages:n}=mo.state;return e||([...n].reverse().find(a=>a.role==="assistant")?.id??null)}function l3(e){const n=i3();cl.setState(r=>({...r,executions:{...r.executions,[e.toolCallId]:{toolCallId:e.toolCallId,toolName:e.toolName,args:e.args,status:"running",startTime:Date.now(),messageId:n}},executionOrder:r.executionOrder.includes(e.toolCallId)?r.executionOrder:[...r.executionOrder,e.toolCallId]}))}function c3(e,n){cl.setState(r=>{const a=r.executions[e];return a?{...r,executions:{...r.executions,[e]:{...a,partialResult:n}}}:r})}function u3(e){cl.setState(n=>{const r=n.executions[e.toolCallId];return r?{...n,executions:{...n.executions,[e.toolCallId]:{...r,status:e.isError?"error":"completed",result:e.result,isError:e.isError,endTime:Date.now()}}}:n})}function f3(e){console.log("[tool-executions] hydrate start",e.map((f,m)=>({index:m,role:f.role,contentType:Array.isArray(f.content)?"array":typeof f.content,contentLength:Array.isArray(f.content)?f.content.length:void 0,toolCallId:typeof f.toolCallId=="string"?f.toolCallId:void 0})));const n=new Map;for(const f of e){const m=a3(f);!m||typeof f.toolCallId!="string"||n.set(f.toolCallId,m)}console.log("[tool-executions] toolResult callIds:",Array.from(n.keys()));const r=Date.now(),a={},l=[];let c=0;const d=[];for(const f of e){if(f.role!=="user"&&f.role!=="assistant")continue;const m=`msg-${c}`;if(f.role==="assistant"&&Array.isArray(f.content))for(const h of f.content){if(!s3(h))continue;const y=n.get(h.id),g=_u(h.arguments)?h.arguments:{};y||d.push(h.id),a[h.id]={toolCallId:h.id,toolName:h.name,args:g,status:y&&y.isError?"error":"completed",result:y?.result,isError:y?.isError,startTime:r,endTime:r,messageId:m},l.includes(h.id)||l.push(h.id)}c+=1}cl.setState(()=>({executions:a,executionOrder:l})),console.log("[tool-executions] hydrate complete",{hydratedExecutions:l.length,executionOrder:l,unmatchedToolUses:d})}function oj(e,n){return n.executionOrder.map(r=>n.executions[r]).filter(r=>!!r).filter(r=>r.messageId===e)}function Jh(){cl.setState(()=>yE)}const vE={sessionId:null,model:null,availableModels:[],thinkingLevel:"medium",isStreaming:!1,isCompacting:!1,steeringMode:"one-at-a-time",followUpMode:"one-at-a-time",sessionName:void 0,autoCompactionEnabled:!1,messageCount:0},Xo=new zr(vE);function ru(e){Xo.setState(n=>({...n,sessionId:e}))}function wp(e){const{sessionId:n,...r}=e;Xo.setState(a=>({...a,...r}))}function Ep(e){Xo.setState(n=>({...n,model:e}))}function J0(e){Xo.setState(n=>({...n,availableModels:e}))}function Rp(e){Xo.setState(n=>({...n,thinkingLevel:e}))}function bE(e){Xo.setState(n=>({...n,sessionName:e}))}function W0(e){Xo.setState(n=>({...n,isStreaming:e}))}function eS(e){Xo.setState(n=>({...n,isCompacting:e}))}function d3(){Xo.setState(()=>vE)}const SE={sessions:[],activeSessionId:null},Vo=new zr(SE);function su(e){Vo.setState(n=>n.sessions.some(r=>r.sessionId===e.sessionId)?(console.log(`[sessions-list] Skipping duplicate session: ${e.sessionId}`),n):(console.log(`[sessions-list] Adding session: ${e.sessionId}`,e),{...n,sessions:[...n.sessions,e]}))}function h3(e){Vo.setState(n=>({...n,sessions:n.sessions.filter(r=>r.sessionId!==e),activeSessionId:n.activeSessionId===e?null:n.activeSessionId}))}function tS(e){console.log(`[sessions-list] Setting active session: ${e}`),Vo.setState(n=>({...n,activeSessionId:e}))}function p3(e){const n=Date.now();Vo.setState(r=>({...r,sessions:r.sessions.map(a=>a.sessionId===e?{...a,updatedAt:n}:a)}))}function nS(e,n){Vo.setState(r=>({...r,sessions:r.sessions.map(a=>a.sessionId===e?{...a,...n}:a)}))}function oS(){console.log("[sessions-list] Clearing all sessions"),Vo.setState(()=>SE)}function m3(e){return[...e].sort((n,r)=>{const a=n.updatedAt??n.createdAt;return(r.updatedAt??r.createdAt)-a})}function g3(e,n,r){if(n.type==="response"){console.log("[event-handlers] RPC response:",n);return}console.log(`[event-handlers] Received event for session ${e}:`,n.type,n);const a=e===r;switch((n.type==="model_changed"||n.type==="thinking_level_changed")&&console.log("[event-handlers] Event check:",{eventType:n.type,eventSessionId:e,activeSessionId:r,isActiveSession:a}),n.type){case"session_start":su({sessionId:e,title:void 0,messageCount:0,createdAt:Date.now()}),a&&ru(e);break;case"session_name_changed":a&&bE(n.name);break;case"model_changed":console.log("[event-handlers] model_changed event:",{sessionId:e,isActiveSession:a,model:n.model}),a&&Ep(n.model);break;case"thinking_level_changed":a&&Rp(n.level);break;case"state_update":nS(e,{messageCount:n.state.messageCount}),a&&wp(n.state);break;case"agent_start":a&&W0(!0);break;case"agent_end":a&&W0(!1);break;case"message_start":a&&n.message?.role==="assistant"&&ZL();break;case"message_update":{if(!a)break;const l=n.assistantMessageEvent;switch(l.type){case"text_delta":$L(l.partial?.content?.filter(c=>c.type==="text").map(c=>c.text).join("")??"");break;case"thinking_start":WL();break;case"thinking_delta":e3(l.partial?.content?.filter(c=>c.type==="thinking").map(c=>c.thinking).join("")??"");break;case"thinking_end":t3();break}break}case"message_end":if(p3(e),a){if(n.message?.role==="assistant")JL();else if(n.message?.role==="user"){const l=n.message.content?.filter(c=>c.type==="text").map(c=>c.text).join(" ");if(l){const c=l.substring(0,100);nS(e,{title:c})}}}break;case"turn_start":case"turn_end":break;case"tool_execution_start":a&&l3({toolCallId:n.toolCallId,toolName:n.toolName,args:n.args??{}});break;case"tool_execution_update":a&&c3(n.toolCallId,n.partialResult??{});break;case"tool_execution_end":a&&u3({toolCallId:n.toolCallId,result:n.result??{},isError:n.isError});break;case"compact_start":case"auto_compaction_start":a&&eS(!0);break;case"compact_end":case"auto_compaction_end":a&&eS(!1);break;case"error":console.error("[event-handlers] Agent error:",n.error);break;default:console.log("[event-handlers] Unhandled event:",n)}}function y3(e){console.log("[event-handlers] Auth event:",e),QL(e)}function v3(){if(typeof window>"u")return"ws://localhost:3100";const e=window.location.protocol==="https:"?"wss:":"ws:",n=window.location.host;return n.startsWith("localhost:3000")||n.startsWith("127.0.0.1:3000")?"ws://localhost:3100":`${e}//${n}`}const rS={url:v3(),authToken:""};function b3(){if(typeof window>"u")return rS;try{const e=localStorage.getItem("clankie-connection");if(e)return JSON.parse(e)}catch(e){console.error("Failed to load connection settings:",e)}return rS}function S3(e){if(!(typeof window>"u"))try{localStorage.setItem("clankie-connection",JSON.stringify(e))}catch(n){console.error("Failed to save connection settings:",n)}}const ul=new zr({settings:b3(),status:"disconnected",error:void 0});function x3(e){ul.setState(n=>{const r={...n.settings,...e};return S3(r),{...n,settings:r}})}function sS(e,n){ul.setState(r=>({...r,status:e,error:n}))}const xE={pendingDialog:null,statusByKey:{},widgetsByKey:{},notifications:[],editorText:"",title:void 0},Yr=new zr(xE);function w3(e){Yr.setState(n=>{if(e.method==="notify")return{...n,notifications:[...n.notifications,{id:e.id,type:e.notifyType??"info",message:e.message}].slice(-5)};if(e.method==="setStatus"){const r={...n.statusByKey};return e.statusText?r[e.statusKey]=e.statusText:delete r[e.statusKey],{...n,statusByKey:r}}if(e.method==="setWidget"){const r={...n.widgetsByKey};return e.widgetLines&&e.widgetLines.length>0?r[e.widgetKey]={key:e.widgetKey,lines:e.widgetLines,placement:e.widgetPlacement??"aboveEditor"}:delete r[e.widgetKey],{...n,widgetsByKey:r}}return e.method==="setTitle"?{...n,title:e.title}:e.method==="set_editor_text"?{...n,editorText:e.text}:{...n,pendingDialog:e}})}function Sm(){Yr.setState(e=>({...e,pendingDialog:null}))}function E3(){Yr.setState(e=>({...e,notifications:e.notifications.slice(1)}))}function R3(){Yr.setState(()=>xE)}function T3(e){const n=Yr.state.pendingDialog;return n?(Sm(),{type:"extension_ui_response",id:n.id,confirmed:e}):{type:"extension_ui_response",id:"",cancelled:!0}}function C3(e){const n=Yr.state.pendingDialog;return n?(Sm(),{type:"extension_ui_response",id:n.id,value:e}):{type:"extension_ui_response",id:"",cancelled:!0}}function M3(){const e=Yr.state.pendingDialog;return e?(Sm(),{type:"extension_ui_response",id:e.id,cancelled:!0}):{type:"extension_ui_response",id:"",cancelled:!0}}class O3{client=null;connect(){if(this.client){console.warn("Client already connected");return}const{settings:n}=ul.state;if(!n.authToken){sS("error","Auth token is required");return}this.client=new XL({url:n.url,authToken:n.authToken,onEvent:(r,a)=>{const{activeSessionId:l}=Vo.state;g3(r,a,l)},onAuthEvent:r=>y3(r),onExtensionUIRequest:r=>w3(r),onStateChange:(r,a)=>{sS(r,a),r==="connected"&&this.restoreOrCreateSession()}}),this.client.connect()}disconnect(){this.client&&(this.client.disconnect(),this.client=null),oS(),d3(),$h(),Jh(),R3()}async restoreOrCreateSession(){if(!this.client){console.error("[client-manager] Cannot restore session: not connected");return}try{await this.loadAllSessions();const n=localStorage.getItem("clankie-last-session-id");if(n){console.log(`[client-manager] Attempting to restore session: ${n}`);try{await this.switchSession(n),console.log(`[client-manager] Successfully restored session: ${n}`);return}catch(r){console.warn(`[client-manager] Failed to restore session ${n}, creating new:`,r),localStorage.removeItem("clankie-last-session-id")}}console.log("[client-manager] Creating new session"),await this.createNewSession()}catch(n){console.error("[client-manager] Failed to restore or create session:",n)}}async loadAllSessions(){if(!this.client){console.error("[client-manager] Cannot load sessions: not connected");return}try{const{sessions:n}=await this.client.listSessions();console.log(`[client-manager] Loaded ${n.length} sessions from server:`,n),oS();for(const r of n)console.log("[client-manager] Adding session to store:",r),su({sessionId:r.sessionId,title:r.title,messageCount:r.messageCount,createdAt:Date.now()})}catch(n){console.error("[client-manager] Failed to load sessions:",n)}}getClient(){return this.client}sendExtensionUIResponse(n){this.client?.sendExtensionUIResponse(n)}isConnected(){return this.client?.getConnectionState()==="connected"}async createNewSession(){if(!this.client)return console.error("[client-manager] Cannot create session: not connected"),null;try{console.log("[client-manager] Requesting new session from server...");const n=await this.client.newSession();if(console.log("[client-manager] Received new session result:",n),n.cancelled)return console.log("[client-manager] Session creation cancelled"),null;console.log(`[client-manager] Creating new session with ID: ${n.sessionId}`),su({sessionId:n.sessionId,title:void 0,messageCount:0,createdAt:Date.now()}),tS(n.sessionId),ru(n.sessionId),localStorage.setItem("clankie-last-session-id",n.sessionId),$h(),Jh();try{const r=await this.client.getState(n.sessionId);Ep(r.model),Rp(r.thinkingLevel),wp(r);const{models:a}=await this.client.getAvailableModels(n.sessionId);J0(a)}catch(r){console.error("[client-manager] Failed to fetch session state or models:",r)}return n.sessionId}catch(n){return console.error("[client-manager] Failed to create session:",n),null}}async switchSession(n){if(!this.client){console.error("[client-manager] Cannot switch session: not connected");return}try{tS(n),ru(n),localStorage.setItem("clankie-last-session-id",n),$h(),Jh(),console.log(`[client-manager] Fetching messages for session: ${n}`);const{messages:r}=await this.client.getMessages(n);console.log(`[client-manager] Loaded ${r.length} messages for session ${n}`);const a=r.reduce((f,m)=>{const h=String(m.role);return f[h]=(f[h]??0)+1,f},{});console.log("[client-manager] getMessages roles summary:",a);const l=r.filter(f=>f.role==="assistant"&&Array.isArray(f.content)).map((f,m)=>{const h=Array.isArray(f.content)?f.content:[];return{assistantIndex:m,contentTypes:h.map(y=>y?.type),toolCallIds:h.filter(y=>y?.type==="toolCall").map(y=>y?.id)}});console.log("[client-manager] assistant content/toolCall summary:",l),n3(r),f3(r);const c=await this.client.getState(n);ru(n),Ep(c.model),Rp(c.thinkingLevel),c.sessionName&&bE(c.sessionName),wp(c);try{const{models:f}=await this.client.getAvailableModels(n);J0(f)}catch(f){console.error("[client-manager] Failed to fetch available models:",f)}const{sessions:d}=Vo.state;if(!d.some(f=>f.sessionId===n)){const f=[...r].reverse().find(h=>h.role==="user");let m;if(f){let h;typeof f.content=="string"?h=f.content:Array.isArray(f.content)&&(h=f.content.filter(y=>y.type==="text").map(y=>y.text).join(" ")),m=h?.substring(0,100)||c.sessionName}else m=c.sessionName;su({sessionId:n,title:m,messageCount:c.messageCount,createdAt:Date.now()})}console.log(`[client-manager] Switched to session ${n}`)}catch(r){throw console.error("[client-manager] Failed to switch session:",r),r}}}const Aa=new O3;function A3(){const e=nl(),n=async()=>{try{const r=await Aa.createNewSession();r&&e({to:"/sessions/$sessionId",params:{sessionId:r}})}catch(r){console.error("[nav-main] Failed to create new session:",r)}};return _.jsx(bm,{children:_.jsx(mE,{children:_.jsx(af,{children:_.jsx(ys,{children:_.jsxs(Ua,{tooltip:"Create Chat",className:"bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground duration-200 ease-linear",onClick:n,children:[_.jsx(O_,{}),_.jsx("span",{children:"Create Chat"})]})})})})})}const _3=Yp("h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function D3({className:e,variant:n="default",render:r,...a}){return Vu({defaultTagName:"span",props:Ho({className:Je(_3({variant:n}),e)},a),render:r,state:{slot:"badge",variant:n}})}function k3({...e}){const{status:n}=Uu(ul,a=>({status:a.status})),r={connected:{label:"Connected",variant:"default",className:"bg-green-500/10 text-green-500 border-green-500/20",dotColor:"bg-green-500"},connecting:{label:"Connecting",variant:"secondary",className:"bg-yellow-500/10 text-yellow-500 border-yellow-500/20",dotColor:"bg-yellow-500"},disconnected:{label:"Disconnected",variant:"secondary",className:"bg-red-500/10 text-red-500 border-red-500/20",dotColor:"bg-red-500"},error:{label:"Error",variant:"destructive",className:"bg-red-500/10 text-red-500 border-red-500/20",dotColor:"bg-red-500"}}[n];return _.jsx(bm,{...e,children:_.jsx(mE,{children:_.jsxs(af,{children:[_.jsx(ys,{children:_.jsxs(Ua,{render:_.jsx(Ji,{to:"/settings"}),children:[_.jsx(P_,{}),_.jsx("span",{children:"Settings"})]})}),_.jsx(ys,{children:_.jsxs(Ua,{render:_.jsx(Ji,{to:"/extensions"}),children:[_.jsx(L_,{}),_.jsx("span",{children:"Extensions"})]})}),_.jsx(ys,{children:_.jsx("div",{className:"px-2 py-1.5",children:_.jsxs(D3,{variant:r.variant,className:`${r.className} w-full justify-start`,children:[_.jsx("div",{className:`size-2 rounded-full mr-2 ${r.dotColor} ${n==="connected"?"animate-breathe":""}`}),r.label]})})})]})})})}const wE=R.createContext(void 0);function xm(e){const n=R.useContext(wE);if(n===void 0&&!e)throw new Error(Zt(33));return n}const EE=R.createContext(void 0);function Ko(e){const n=R.useContext(EE);if(n===void 0&&!e)throw new Error(Zt(36));return n}const N3=R.createContext(void 0);function lf(e=!0){const n=R.useContext(N3);if(n===void 0&&!e)throw new Error(Zt(25));return n}function z3(e){const{closeOnClick:n,highlighted:r,id:a,nodeId:l,store:c,itemRef:d,itemMetadata:f}=e,{events:m}=c.useState("floatingTreeRoot"),h=lf(!0),y=h!==void 0;return R.useMemo(()=>({id:a,role:"menuitem",tabIndex:r?0:-1,onMouseMove(g){l&&m.emit("itemhover",{nodeId:l,target:g.currentTarget})},onClick(g){n&&m.emit("close",{domEvent:g,reason:hw})},onMouseUp(g){if(h){const v=h.initialCursorPointRef.current;if(h.initialCursorPointRef.current=null,y&&v&&Math.abs(g.clientX-v.x)<=1&&Math.abs(g.clientY-v.y)<=1)return}d.current&&c.context.allowMouseUpTriggerRef.current&&(!y||g.button===2)&&(!f||f.type==="regular-item")&&d.current.click()}}),[n,r,a,m,l,c,d,h,y,f])}const L3={type:"regular-item"};function RE(e){const{closeOnClick:n,disabled:r=!1,highlighted:a,id:l,store:c,nativeButton:d,itemMetadata:f,nodeId:m}=e,h=R.useRef(null),{getButtonProps:y,buttonRef:g}=Xu({disabled:r,focusableWhenDisabled:!0,native:d}),v=z3({closeOnClick:n,highlighted:a,id:l,nodeId:m,store:c,itemRef:h,itemMetadata:f}),b=R.useCallback(w=>Ho(v,{onMouseEnter(){f.type==="submenu-trigger"&&f.setActive()},onKeyUp(E){E.key===" "&&c.context.typingRef.current&&E.preventBaseUIHandler()}},w,y),[v,y,c,f]),x=Na(h,g);return R.useMemo(()=>({getItemProps:b,itemRef:x}),[b,x])}const TE=R.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function j3(){return R.useContext(TE)}let P3=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function wm(e={}){const{label:n,metadata:r,textRef:a,indexGuessBehavior:l,index:c}=e,{register:d,unregister:f,subscribeMapChange:m,elementsRef:h,labelsRef:y,nextIndexRef:g}=j3(),v=R.useRef(-1),[b,x]=R.useState(c??(l===P3.GuessFromOrder?()=>{if(v.current===-1){const C=g.current;g.current+=1,v.current=C}return v.current}:-1)),w=R.useRef(null),E=R.useCallback(C=>{if(w.current=C,b!==-1&&C!==null&&(h.current[b]=C,y)){const A=n!==void 0;y.current[b]=A?n:a?.current?.textContent??C.textContent}},[b,h,y,n,a]);return Me(()=>{if(c!=null)return;const C=w.current;if(C)return d(C,r),()=>{f(C)}},[c,d,f,r]),Me(()=>{if(c==null)return m(C=>{const A=w.current?C.get(w.current)?.index:null;A!=null&&x(A)})},[c,m,x]),R.useMemo(()=>({ref:E,index:b}),[b,E])}const CE=R.createContext(void 0);function I3(){const e=R.useContext(CE);if(e===void 0)throw new Error(Zt(31));return e}const U3=R.forwardRef(function(n,r){const{render:a,className:l,...c}=n,[d,f]=R.useState(void 0),m=R.useMemo(()=>({setLabelId:f}),[f]),h=Et("div",n,{ref:r,props:{role:"group","aria-labelledby":d,...c}});return _.jsx(CE.Provider,{value:m,children:h})}),B3=R.forwardRef(function(n,r){const{className:a,render:l,id:c,...d}=n,f=Hr(c),{setLabelId:m}=I3();return Me(()=>(m(f),()=>{m(void 0)}),[m,f]),Et("div",n,{ref:r,props:{id:f,role:"presentation",...d}})}),H3=R.forwardRef(function(n,r){const{render:a,className:l,id:c,label:d,nativeButton:f=!1,disabled:m=!1,closeOnClick:h=!0,...y}=n,g=wm({label:d}),v=xm(!0),b=Hr(c),{store:x}=Ko(),w=x.useState("isActive",g.index),E=x.useState("itemProps"),{getItemProps:C,itemRef:A}=RE({closeOnClick:h,disabled:m,highlighted:w,id:b,store:x,nativeButton:f,nodeId:v?.nodeId,itemMetadata:L3});return Et("div",n,{state:{disabled:m,highlighted:w},props:[E,y,C],ref:[A,r,g.ref]})}),V3=R.createContext(void 0);function Y3(e){return R.useContext(V3)}const q3={...Os,...$u},G3=R.forwardRef(function(n,r){const{render:a,className:l,finalFocus:c,...d}=n,{store:f}=Ko(),{side:m,align:h}=xm(),y=Y3()!=null,g=f.useState("open"),v=f.useState("transitionStatus"),b=f.useState("popupProps"),x=f.useState("mounted"),w=f.useState("instantType"),E=f.useState("activeTriggerElement"),C=f.useState("parent"),A=f.useState("lastOpenChangeReason"),k=f.useState("rootId"),O=f.useState("floatingRootContext"),L=f.useState("floatingTreeRoot"),N=f.useState("closeDelay"),j=f.useState("activeTriggerElement"),z=C.type==="context-menu";Ju({open:g,ref:f.context.popupRef,onComplete(){g&&f.context.onOpenChangeComplete?.(!0)}}),R.useEffect(()=>{function te(re){f.setOpen(!1,Fe(re.reason,re.domEvent))}return L.events.on("close",te),()=>{L.events.off("close",te)}},[L.events,f]);const q=f.useState("hoverEnabled"),Z=f.useState("disabled");Fw(O,{enabled:q&&!Z&&!z&&C.type!=="menubar",closeDelay:N});const Q={transitionStatus:v,side:m,align:h,open:g,nested:C.type==="menu",instant:w},V=Et("div",n,{state:Q,ref:[r,f.context.popupRef],stateAttributesMapping:q3,props:[b,{onKeyDown(te){y&&tE.has(te.key)&&te.stopPropagation()}},rf(v),d,{"data-rootownerid":k}]});let J=C.type===void 0||z;return(E||C.type==="menubar"&&A!==tm)&&(J=!0),_.jsx(Mw,{context:O,modal:z,disabled:!x,returnFocus:c===void 0?J:c,initialFocus:C.type!=="menu",restoreFocus:!0,externalTree:C.type!=="menubar"?L:void 0,previousFocusableElement:j,nextFocusableElement:C.type===void 0?f.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:C.type===void 0?f.context.beforeContentFocusGuardRef:void 0,children:V})}),ME=R.createContext(void 0);function F3(){const e=R.useContext(ME);if(e===void 0)throw new Error(Zt(32));return e}const X3=R.forwardRef(function(n,r){const{keepMounted:a=!1,...l}=n,{store:c}=Ko();return c.useState("mounted")||a?_.jsx(ME.Provider,{value:a,children:_.jsx(Cw,{ref:r,...l})}):null});function K3(e){const{children:n,elementsRef:r,labelsRef:a,onMapChange:l}=e,c=Ce(l),d=R.useRef(0),f=Qt(Z3).current,m=Qt(Q3).current,[h,y]=R.useState(0),g=R.useRef(h),v=Ce((C,A)=>{m.set(C,A??null),g.current+=1,y(g.current)}),b=Ce(C=>{m.delete(C),g.current+=1,y(g.current)}),x=R.useMemo(()=>{const C=new Map;return Array.from(m.keys()).filter(k=>k.isConnected).sort($3).forEach((k,O)=>{const L=m.get(k)??{};C.set(k,{...L,index:O})}),C},[m,h]);Me(()=>{if(typeof MutationObserver!="function"||x.size===0)return;const C=new MutationObserver(A=>{const k=new Set,O=L=>k.has(L)?k.delete(L):k.add(L);A.forEach(L=>{L.removedNodes.forEach(O),L.addedNodes.forEach(O)}),k.size===0&&(g.current+=1,y(g.current))});return x.forEach((A,k)=>{k.parentElement&&C.observe(k.parentElement,{childList:!0})}),()=>{C.disconnect()}},[x]),Me(()=>{g.current===h&&(r.current.length!==x.size&&(r.current.length=x.size),a&&a.current.length!==x.size&&(a.current.length=x.size),d.current=x.size),c(x)},[c,x,r,a,h]),Me(()=>()=>{r.current=[]},[r]),Me(()=>()=>{a&&(a.current=[])},[a]);const w=Ce(C=>(f.add(C),()=>{f.delete(C)}));Me(()=>{f.forEach(C=>C(x))},[f,x]);const E=R.useMemo(()=>({register:v,unregister:b,subscribeMapChange:w,elementsRef:r,labelsRef:a,nextIndexRef:d}),[v,b,w,r,a,d]);return _.jsx(TE.Provider,{value:E,children:n})}function Q3(){return new Map}function Z3(){return new Set}function $3(e,n){const r=e.compareDocumentPosition(n);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}const J3=R.forwardRef(function(n,r){const{anchor:a,positionMethod:l="absolute",className:c,render:d,side:f,align:m,sideOffset:h=0,alignOffset:y=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:x=!1,disableAnchorTracking:w=!1,collisionAvoidance:E=r2,...C}=n,{store:A}=Ko(),k=F3(),O=lf(!0),L=A.useState("parent"),N=A.useState("floatingRootContext"),j=A.useState("floatingTreeRoot"),z=A.useState("mounted"),q=A.useState("open"),Z=A.useState("modal"),Q=A.useState("activeTriggerElement"),V=A.useState("transitionStatus"),J=A.useState("lastOpenChangeReason"),te=A.useState("floatingNodeId"),re=A.useState("floatingParentNodeId");let I=a,B=h,G=y,ce=m,W=E;L.type==="context-menu"&&(I=a??L.context?.anchor,ce=ce??"start",!f&&ce!=="center"&&(G=n.alignOffset??2,B=n.sideOffset??-5));let P=f,X=ce;L.type==="menu"?(P=P??"inline-end",X=X??"start",W=n.collisionAvoidance??Tx):L.type==="menubar"&&(P=P??"bottom",X=X??"start");const le=L.type==="context-menu",se=hE({anchor:I,floatingRootContext:N,positionMethod:O?"fixed":l,mounted:z,side:P,sideOffset:B,align:X,alignOffset:G,arrowPadding:le?0:b,collisionBoundary:g,collisionPadding:v,sticky:x,nodeId:te,keepMounted:k,disableAnchorTracking:w,collisionAvoidance:W,shiftCrossAxis:le&&!("side"in W&&W.side==="flip"),externalTree:j}),ue=R.useMemo(()=>{const je={};return q||(je.pointerEvents="none"),{role:"presentation",hidden:!z,style:{...se.positionerStyles,...je}}},[q,z,se.positionerStyles]);R.useEffect(()=>{function je(ne){ne.open&&(ne.parentNodeId===te&&A.set("hoverEnabled",!1),ne.nodeId!==te&&ne.parentNodeId===A.select("floatingParentNodeId")&&A.setOpen(!1,Fe(eu)))}return j.events.on("menuopenchange",je),()=>{j.events.off("menuopenchange",je)}},[A,j.events,te]),R.useEffect(()=>{if(A.select("floatingParentNodeId")==null)return;function je(ne){if(ne.open||ne.nodeId!==A.select("floatingParentNodeId"))return;const me=ne.reason??eu;A.setOpen(!1,Fe(me))}return j.events.on("menuopenchange",je),()=>{j.events.off("menuopenchange",je)}},[j.events,A]),R.useEffect(()=>{function je(ne){!q||ne.nodeId!==A.select("floatingParentNodeId")||ne.target&&Q&&Q!==ne.target&&A.setOpen(!1,Fe(eu))}return j.events.on("itemhover",je),()=>{j.events.off("itemhover",je)}},[j.events,q,Q,A]),R.useEffect(()=>{const je={open:q,nodeId:te,parentNodeId:re,reason:A.select("lastOpenChangeReason")};j.events.emit("menuopenchange",je)},[j.events,q,A,te,re]);const he={open:q,side:se.side,align:se.align,anchorHidden:se.anchorHidden,nested:L.type==="menu"},ve=R.useMemo(()=>({side:se.side,align:se.align,arrowRef:se.arrowRef,arrowUncentered:se.arrowUncentered,arrowStyles:se.arrowStyles,nodeId:se.context.nodeId}),[se.side,se.align,se.arrowRef,se.arrowUncentered,se.arrowStyles,se.context.nodeId]),Oe=Et("div",n,{state:he,stateAttributesMapping:Os,ref:[r,A.useStateSetter("positionerElement")],props:[ue,rf(V),C]}),fe=z&&L.type!=="menu"&&(L.type!=="menubar"&&Z&&J!==sn||L.type==="menubar"&&L.context.modal);let Ne=null;return L.type==="menubar"?Ne=L.context.contentElement:L.type===void 0&&(Ne=Q),_.jsxs(wE.Provider,{value:ve,children:[fe&&_.jsx(oE,{ref:L.type==="context-menu"||L.type==="nested-context-menu"?L.context.internalBackdropRef:null,inert:nE(!q),cutout:Ne}),_.jsx(Ik,{id:te,children:_.jsx(K3,{elementsRef:A.context.itemDomElements,labelsRef:A.context.itemLabels,children:Oe})})]})}),W3=R.createContext(null);function OE(e){return R.useContext(W3)}const e4={...dm,disabled:_e(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:_e(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:_e(e=>e.allowMouseEnter),stickIfOpen:_e(e=>e.stickIfOpen),parent:_e(e=>e.parent),rootId:_e(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:_e(e=>e.activeIndex),isActive:_e((e,n)=>e.activeIndex===n),hoverEnabled:_e(e=>e.hoverEnabled),instantType:_e(e=>e.instantType),lastOpenChangeReason:_e(e=>e.openChangeReason),floatingTreeRoot:_e(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:_e(e=>e.floatingNodeId),floatingParentNodeId:_e(e=>e.floatingParentNodeId),itemProps:_e(e=>e.itemProps),closeDelay:_e(e=>e.closeDelay),keyboardEventRelay:_e(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class Em extends nf{constructor(n){super({...t4(),...n},{positionerRef:R.createRef(),popupRef:R.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:R.createRef(),beforeContentFocusGuardRef:R.createRef(),onOpenChangeComplete:void 0,triggerElements:new sl},e4),this.unsubscribeParentListener=this.observe("parent",r=>{if(this.unsubscribeParentListener?.(),r.type==="menu"){this.unsubscribeParentListener=r.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=r.store.context.allowMouseUpTriggerRef;return}r.type!==void 0&&(this.context.allowMouseUpTriggerRef=r.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,r){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:r})}static useStore(n,r){const a=Qt(()=>new Em(r)).current;return n??a}unsubscribeParentListener=null}function t4(){return{...fm(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new om,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Nt,keyboardEventRelay:void 0,closeDelay:0}}const AE=R.createContext(void 0);function _E(){return R.useContext(AE)}const DE=im(function(n){const{children:r,open:a,onOpenChange:l,onOpenChangeComplete:c,defaultOpen:d=!1,disabled:f=!1,modal:m,loopFocus:h=!0,orientation:y="vertical",actionsRef:g,closeParentOnEsc:v=!1,handle:b,triggerId:x,defaultTriggerId:w=null,highlightItemOnHover:E=!0}=n,C=lf(!0),A=Ko(!0),k=OE(!0),O=_E(),L=R.useMemo(()=>O&&A?{type:"menu",store:A.store}:k?{type:"menubar",context:k}:C&&!A?{type:"context-menu",context:C}:{type:void 0},[C,A,k,O]),N=Em.useStore(b?.store,{open:d,openProp:a,activeTriggerId:w,triggerIdProp:x,parent:L});ym(()=>{a===void 0&&N.state.open===!1&&d===!0&&N.update({open:!0,activeTriggerId:w})}),N.useControlledProp("openProp",a),N.useControlledProp("triggerIdProp",x),N.useContextCallback("onOpenChangeComplete",c);const j=N.useState("floatingTreeRoot"),z=bw(j),q=Fo();Me(()=>{C&&!A?N.update({parent:{type:"context-menu",context:C},floatingNodeId:z,floatingParentNodeId:q}):A&&N.update({floatingNodeId:z,floatingParentNodeId:q})},[C,A,z,q,N]);const Z=N.useState("open"),Q=N.useState("activeTriggerElement"),V=N.useState("positionerElement"),J=N.useState("hoverEnabled"),te=N.useState("modal"),re=N.useState("disabled"),I=N.useState("lastOpenChangeReason"),B=N.useState("parent"),G=N.useState("activeIndex"),ce=N.useState("payload"),W=N.useState("floatingParentNodeId"),P=R.useRef(null),X=W!=null;let le;N.useSyncedValues({disabled:f,modal:B.type===void 0?m:void 0,rootId:Cs()});const{openMethod:se,triggerProps:ue,reset:he}=sE(Z);cm(N);const{forceUnmount:ve}=um(Z,N,()=>{N.update({allowMouseEnter:!1,stickIfOpen:!0}),he()}),Oe=R.useRef(B.type!=="context-menu"),fe=Fn();R.useEffect(()=>{if(Z||(P.current=null),B.type==="context-menu"){if(!Z){fe.clear(),Oe.current=!1;return}fe.start(500,()=>{Oe.current=!0})}},[fe,Z,B.type]),rE(Z&&te&&I!==sn&&se!=="touch",V),Me(()=>{!Z&&!J&&N.set("hoverEnabled",!0)},[Z,J,N]);const Ne=R.useRef(!0),je=Fn(),ne=Ce((Le,Xe)=>{const st=Xe.reason;if(Z===Le&&Xe.trigger===Q&&I===st||(Xe.preventUnmountOnClose=()=>{N.set("preventUnmountingOnClose",!0)},!Le&&Xe.trigger==null&&(Xe.trigger=Q??void 0),l?.(Le,Xe),Xe.isCanceled))return;const ht={open:Le,nativeEvent:Xe.event,reason:Xe.reason,nested:X};le?.emit("openchange",ht);const Tt=Xe.event;if(Le===!1&&Tt?.type==="click"&&Tt.pointerType==="touch"&&!Ne.current)return;if(!Le&&G!==null){const cn=N.context.itemDomElements.current[G];queueMicrotask(()=>{cn?.setAttribute("tabindex","-1")})}Le&&st===Ca?(Ne.current=!1,je.start(300,()=>{Ne.current=!0})):(Ne.current=!0,je.clear());const nn=(st===La||st===hw)&&Tt.detail===0&&Tt?.isTrusted,Lt=!Le&&(st===ef||st==null),Ht={open:Le,openChangeReason:st};P.current=Xe.event??null;const _n=Xe.trigger?.id??null;(_n||Le)&&(Ht.activeTriggerId=_n,Ht.activeTriggerElement=Xe.trigger??null),N.update(Ht),B.type==="menubar"&&(st===Ca||st===ja||st===sn||st===Wc||st===eu)?N.set("instantType","group"):nn||Lt?N.set("instantType",nn?"click":"dismiss"):N.set("instantType",void 0)}),me=R.useCallback(Le=>{const Xe=Fe(Le);return Xe.preventUnmountOnClose=()=>{N.set("preventUnmountingOnClose",!0)},Xe},[N]),pe=R.useCallback(()=>{N.setOpen(!1,me(nm))},[N,me]);R.useImperativeHandle(g,()=>({unmount:ve,close:pe}),[ve,pe]);let ze;B.type==="context-menu"&&(ze=B.context),R.useImperativeHandle(ze?.positionerRef,()=>V,[V]),R.useImperativeHandle(ze?.actionsRef,()=>({setOpen:ne}),[ne]);const be=hm({popupStore:N,onOpenChange:ne});le=be.context.events,R.useEffect(()=>{const Le=({open:Xe,eventDetails:st})=>ne(Xe,st);return le.on("setOpen",Le),()=>{le?.off("setOpen",Le)}},[le,ne]);const Se=am(be,{enabled:!re,bubbles:{escapeKey:v&&B.type==="menu"},outsidePress(){return B.type!=="context-menu"||P.current?.type==="contextmenu"?!0:Oe.current},externalTree:X?j:void 0}),ye=Xw(be,{role:"menu"}),de=fE(),we=R.useCallback(Le=>{N.select("activeIndex")!==Le&&N.set("activeIndex",Le)},[N]),ge=Cz(be,{enabled:!re,listRef:N.context.itemDomElements,activeIndex:G,nested:B.type!==void 0,loopFocus:h,orientation:y,parentOrientation:B.type==="menubar"?B.context.orientation:void 0,rtl:de==="rtl",disabledIndices:cp,onNavigate:we,openOnArrowKeyDown:B.type!=="context-menu",externalTree:X?j:void 0,focusItemOnHover:E}),De=R.useCallback(Le=>{N.context.typingRef.current=Le},[N]),Ye=Oz(be,{listRef:N.context.itemLabels,activeIndex:G,resetMs:e2,onMatch:Le=>{Z&&Le!==G&&N.set("activeIndex",Le)},onTypingChange:De}),{getReferenceProps:Ue,getFloatingProps:Ot,getItemProps:He,getTriggerProps:We}=al([Se,ye,ge,Ye]),Pe=R.useMemo(()=>{const Le=Ho(Ue(),{onMouseMove(){N.set("allowMouseEnter",!0)}},ue);return delete Le.role,Le},[Ue,N,ue]),Rt=R.useMemo(()=>{const Le=We();if(!Le)return Le;const Xe=Ho(Le,ue);return delete Xe.role,delete Xe["aria-controls"],Xe},[We,ue]),$t=R.useMemo(()=>Ot({onMouseMove(){N.set("allowMouseEnter",!0),B.type==="menu"&&N.set("hoverEnabled",!1)},onClick(){N.select("hoverEnabled")&&N.set("hoverEnabled",!1)},onKeyDown(Le){const Xe=N.select("keyboardEventRelay");Xe&&!Le.isPropagationStopped()&&Xe(Le)}}),[Ot,B.type,N]),Xn=R.useMemo(()=>He(),[He]);N.useSyncedValues({floatingRootContext:be,activeTriggerProps:Pe,inactiveTriggerProps:Rt,popupProps:$t,itemProps:Xn});const As=R.useMemo(()=>({store:N,parent:L}),[N,L]),Kn=_.jsx(EE.Provider,{value:As,children:typeof r=="function"?r({payload:ce}):r});return B.type===void 0||B.type==="context-menu"?_.jsx(Uk,{externalTree:j,children:Kn}):Kn});function n4(e){const n=Ko().store,r=R.useMemo(()=>({parentMenu:n}),[n]);return _.jsx(AE.Provider,{value:r,children:_.jsx(DE,{...e})})}function o4(e){const n=e.getBoundingClientRect(),r=window.getComputedStyle(e,"::before"),a=window.getComputedStyle(e,"::after");if(!(r.content!=="none"||a.content!=="none"))return n;const c=parseFloat(r.width)||0,d=parseFloat(r.height)||0,f=parseFloat(a.width)||0,m=parseFloat(a.height)||0,h=Math.max(n.width,c,f),y=Math.max(n.height,d,m),g=h-n.width,v=y-n.height;return{left:n.left-g/2,right:n.right+g/2,top:n.top-v/2,bottom:n.bottom+v/2}}function r4(e={}){const{highlightItemOnHover:n,highlightedIndex:r,onHighlightedIndexChange:a}=Fp(),{ref:l,index:c}=wm(e),d=r===c,f=R.useRef(null),m=Na(l,f);return{compositeProps:R.useMemo(()=>({tabIndex:d?0:-1,onFocus(){a(c)},onMouseMove(){const y=f.current;if(!n||!y)return;const g=y.hasAttribute("disabled")||y.ariaDisabled==="true";!d&&!g&&y.focus()}}),[d,a,c,n]),compositeRef:m,index:c}}function s4(e){const{render:n,className:r,state:a=Nt,props:l=cp,refs:c=cp,metadata:d,stateAttributesMapping:f,tag:m="div",...h}=e,{compositeProps:y,compositeRef:g}=r4({metadata:d});return Et(m,e,{state:a,ref:[...c,g],props:[y,...l,h],stateAttributesMapping:f})}function kE(e){if(St(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!io(e))return kE(uo(e))}function a4(e){const{enabled:n=!0,mouseDownAction:r,open:a}=e,l=R.useRef(!1);return R.useMemo(()=>n?{onMouseDown:c=>{(r==="open"&&!a||r==="close"&&a)&&(l.current=!0,it(c.currentTarget).addEventListener("click",()=>{l.current=!1},{once:!0}))},onClick:c=>{l.current&&(l.current=!1,c.preventBaseUIHandler())}}:Nt,[n,r,a])}const qc=2,i4=Bw(function(n,r){const{render:a,className:l,disabled:c=!1,nativeButton:d=!0,id:f,openOnHover:m,delay:h=100,closeDelay:y=0,handle:g,payload:v,...b}=n,x=Ko(!0),w=g?.store??x?.store;if(!w)throw new Error(Zt(85));const E=Hr(f),C=w.useState("isTriggerActive",E),A=w.useState("floatingRootContext"),k=w.useState("isOpenedByTrigger",E),O=R.useRef(null),L=c4(),N=Fp(!0),j=Vr(),z=R.useMemo(()=>j??new om,[j]),q=bw(z),Z=Fo(),{registerTrigger:Q,isMountedByThisTrigger:V}=Yw(E,O,w,{payload:v,closeDelay:y,parent:L,floatingTreeRoot:z,floatingNodeId:q,floatingParentNodeId:Z,keyboardEventRelay:N?.relayKeyboardEvent}),J=L.type==="menubar",te=w.useState("disabled"),re=c||te||J&&L.context.disabled,{getButtonProps:I,buttonRef:B}=Xu({disabled:re,native:d});R.useEffect(()=>{!k&&L.type===void 0&&(w.context.allowMouseUpTriggerRef.current=!1)},[w,k,L.type]);const G=R.useRef(null),ce=Fn(),W=Ce(Se=>{if(!G.current)return;ce.clear(),w.context.allowMouseUpTriggerRef.current=!1;const ye=Se.target;if(qe(G.current,ye)||qe(w.select("positionerElement"),ye)||ye===G.current||ye!=null&&kE(ye)===w.select("rootId"))return;const de=o4(G.current);Se.clientX>=de.left-qc&&Se.clientX<=de.right+qc&&Se.clientY>=de.top-qc&&Se.clientY<=de.bottom+qc||z.events.emit("close",{domEvent:Se,reason:wk})});R.useEffect(()=>{k&&w.select("lastOpenChangeReason")===sn&&it(G.current).addEventListener("mouseup",W,{once:!0})},[k,W,w]);const P=J&&L.context.hasSubmenuOpen,le=mm(A,{enabled:(m??P)&&!re&&L.type!=="context-menu"&&(!J||P&&!V),handleClose:gm({blockPointerEvents:!J}),mouseOnly:!0,move:!1,restMs:L.type===void 0?h:void 0,delay:{close:y},triggerElementRef:O,externalTree:z,isActiveTrigger:C}),se=l4(k,w.select("lastOpenChangeReason")),ue=Ow(A,{enabled:!re&&L.type!=="context-menu",event:k&&J?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:L.type===void 0?se:!1}),he=qw(A,{enabled:!re&&P}),ve=a4({open:k,enabled:J,mouseDownAction:"open"}),Oe=al([ue,he]),fe={disabled:re,open:k},Ne=w.useState("triggerProps",V),je=[G,r,B,Q,O],ne=[Oe.getReferenceProps(),le??Nt,Ne,{"aria-haspopup":"menu",id:E,onMouseDown:Se=>{if(w.select("open"))return;ce.start(200,()=>{w.context.allowMouseUpTriggerRef.current=!0}),it(Se.currentTarget).addEventListener("mouseup",W,{once:!0})}},J?{role:"menuitem"}:{},ve,b,I],me=R.useRef(null),pe=Ce(Se=>{Gn.flushSync(()=>{w.setOpen(!1,Fe(ja,Se.nativeEvent,Se.currentTarget))}),fk(me.current)?.focus()}),ze=Ce(Se=>{const ye=w.select("positionerElement");if(ye&&Ta(Se,ye))w.context.beforeContentFocusGuardRef.current?.focus();else{Gn.flushSync(()=>{w.setOpen(!1,Fe(ja,Se.nativeEvent,Se.currentTarget))});let de=uk(w.context.triggerFocusTargetRef.current||O.current);for(;de!==null&&qe(ye,de);){const we=de;if(de=Wp(de),de===we)break}de?.focus()}}),be=Et("button",n,{enabled:!J,stateAttributesMapping:M0,state:fe,ref:je,props:ne});return J?_.jsx(s4,{tag:"button",render:a,className:l,state:fe,refs:je,props:ne,stateAttributesMapping:M0}):k?_.jsxs(R.Fragment,{children:[_.jsx(Ia,{ref:me,onFocus:pe},`${E}-pre-focus-guard`),_.jsx(R.Fragment,{children:be},E),_.jsx(Ia,{ref:w.context.triggerFocusTargetRef,onFocus:ze},`${E}-post-focus-guard`)]}):_.jsx(R.Fragment,{children:be},E)});function l4(e,n){const r=Fn(),[a,l]=R.useState(!1);return Me(()=>{e&&n==="trigger-hover"?(l(!0),r.start(t2,()=>{l(!1)})):e||(r.clear(),l(!1))},[e,n,r]),a}function c4(){const e=lf(!0),n=Ko(!0),r=OE();return R.useMemo(()=>r?{type:"menubar",context:r}:e&&!n?{type:"context-menu",context:e}:{type:void 0},[e,n,r])}const u4=R.forwardRef(function(n,r){const{render:a,className:l,label:c,id:d,nativeButton:f=!1,openOnHover:m=!0,delay:h=100,closeDelay:y=0,disabled:g=!1,...v}=n,b=wm(),x=xm(),{store:w}=Ko(),E=Hr(d),C=w.useState("open"),A=w.useState("floatingRootContext"),k=w.useState("floatingTreeRoot"),O=Vw(E,w),L=R.useCallback(ue=>{const he=O(ue);return ue!==null&&w.select("open")&&w.select("activeTriggerId")==null&&w.update({activeTriggerId:E,activeTriggerElement:ue,closeDelay:y}),he},[O,y,w,E]),N=R.useRef(null),j=R.useCallback(ue=>{N.current=ue,w.set("activeTriggerElement",ue)},[w]),z=_E();if(!z?.parentMenu)throw new Error(Zt(37));w.useSyncedValue("closeDelay",y);const q=z.parentMenu,Z=q.useState("itemProps"),Q=q.useState("isActive",b.index),V=R.useMemo(()=>({type:"submenu-trigger",setActive(){q.set("activeIndex",b.index)}}),[q,b.index]),J=w.useState("disabled"),te=g||J,{getItemProps:re,itemRef:I}=RE({closeOnClick:!1,disabled:te,highlighted:Q,id:E,store:w,nativeButton:f,itemMetadata:V,nodeId:x?.nodeId}),B=w.useState("hoverEnabled"),G=q.useState("allowMouseEnter"),ce=mm(A,{enabled:B&&m&&!te,handleClose:gm({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:h,delay:G?{open:h,close:y}:0,triggerElementRef:N,externalTree:k}),W=Ow(A,{enabled:!te,event:"mousedown",toggle:!m,ignoreMouse:m,stickIfOpen:!1}),P=al([W]),X=w.useState("triggerProps",!0);return delete X.id,Et("div",n,{state:{disabled:te,highlighted:Q,open:C},stateAttributesMapping:mw,props:[P.getReferenceProps(),ce,X,Z,{tabIndex:C||Q?0:-1,onBlur(){Q&&q.set("activeIndex",null)}},v,re],ref:[r,b.ref,I,L,j]})});function f4({...e}){return _.jsx(DE,{"data-slot":"dropdown-menu",...e})}function d4({...e}){return _.jsx(i4,{"data-slot":"dropdown-menu-trigger",...e})}function NE({align:e="start",alignOffset:n=0,side:r="bottom",sideOffset:a=4,className:l,...c}){return _.jsx(X3,{children:_.jsx(J3,{className:"isolate z-50 outline-none",align:e,alignOffset:n,side:r,sideOffset:a,children:_.jsx(G3,{"data-slot":"dropdown-menu-content",className:Je("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none data-closed:overflow-hidden",l),...c})})})}function rj({...e}){return _.jsx(U3,{"data-slot":"dropdown-menu-group",...e})}function sj({className:e,inset:n,...r}){return _.jsx(B3,{"data-slot":"dropdown-menu-label","data-inset":n,className:Je("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7",e),...r})}function aS({className:e,inset:n,variant:r="default",...a}){return _.jsx(H3,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":r,className:Je("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...a})}function aj({...e}){return _.jsx(n4,{"data-slot":"dropdown-menu-sub",...e})}function ij({className:e,inset:n,children:r,...a}){return _.jsxs(u4,{"data-slot":"dropdown-menu-sub-trigger","data-inset":n,className:Je("focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 data-popup-open:bg-accent data-popup-open:text-accent-foreground flex cursor-default items-center outline-hidden select-none [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...a,children:[r,_.jsx(C_,{className:"ml-auto"})]})}function lj({align:e="start",alignOffset:n=-3,side:r="right",sideOffset:a=0,className:l,...c}){return _.jsx(NE,{"data-slot":"dropdown-menu-sub-content",className:Je("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-[96px] rounded-lg p-1 shadow-lg ring-1 duration-100 w-auto",l),align:e,alignOffset:n,side:r,sideOffset:a,...c})}function h4({className:e,...n}){return _.jsx(Mk,{"data-slot":"dropdown-menu-separator",className:Je("bg-border -mx-1 my-1 h-px",e),...n})}function p4(){const e=nl(),{isMobile:n}=sf(),{sessions:r,activeSessionId:a}=Uu(Vo,f=>({sessions:f.sessions??[],activeSessionId:f.activeSessionId})),l=f=>{e({to:"/sessions/$sessionId",params:{sessionId:f}})},c=f=>{h3(f)},d=m3(r||[]).slice(0,15);return _.jsxs(bm,{className:"group-data-[collapsible=icon]:hidden",children:[_.jsx(YL,{children:"Recent Sessions"}),_.jsx(af,{children:d.length===0?_.jsx(ys,{children:_.jsx(Ua,{disabled:!0,children:_.jsx("span",{className:"text-sidebar-foreground/70",children:"No sessions yet"})})}):d.map(f=>_.jsxs(ys,{children:[_.jsxs(Ua,{isActive:f.sessionId===a,onClick:()=>l(f.sessionId),className:f.sessionId===a?"border-l-2 border-primary":"hover:border-l-2 hover:border-primary/40 transition-all",children:[_.jsx(i0,{}),_.jsx("span",{className:"truncate",children:f.title||`Session ${f.sessionId.slice(0,8)}`})]}),_.jsxs(f4,{children:[_.jsxs(d4,{render:_.jsx(GL,{showOnHover:!0,className:"aria-expanded:bg-muted"}),children:[_.jsx(__,{}),_.jsx("span",{className:"sr-only",children:"More"})]}),_.jsxs(NE,{className:"w-32",side:n?"bottom":"right",align:n?"end":"start",children:[_.jsxs(aS,{onClick:()=>l(f.sessionId),children:[_.jsx(i0,{}),_.jsx("span",{children:"Open"})]}),_.jsx(h4,{}),_.jsxs(aS,{variant:"destructive",onClick:()=>c(f.sessionId),children:[_.jsx(U_,{}),_.jsx("span",{children:"Delete"})]})]})]})]},f.sessionId))})]})}function m4({...e}){return _.jsxs(IL,{collapsible:"offcanvas",...e,children:[_.jsx(HL,{children:_.jsx(af,{children:_.jsx(ys,{children:_.jsx(Ua,{size:"lg",render:_.jsx(Ji,{to:"/"}),children:_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 border border-primary/20",children:_.jsx("span",{className:"text-sm font-mono font-bold text-primary",children:"c/"})}),_.jsx("span",{className:"text-base font-mono font-semibold tracking-tight",children:"clankie"})]})})})})}),_.jsxs(VL,{children:[_.jsx(A3,{}),_.jsx(p4,{}),_.jsx(k3,{className:"mt-auto"})]})]})}function Gc({className:e,size:n="default",...r}){return _.jsx("div",{"data-slot":"card","data-size":n,className:Je("ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col",e),...r})}function g4({className:e,...n}){return _.jsx("div",{"data-slot":"card-header",className:Je("gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...n})}function y4({className:e,...n}){return _.jsx("div",{"data-slot":"card-title",className:Je("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}function cj({className:e,...n}){return _.jsx("div",{"data-slot":"card-description",className:Je("text-muted-foreground text-sm",e),...n})}function Fc({className:e,...n}){return _.jsx("div",{"data-slot":"card-content",className:Je("px-4 group-data-[size=sm]/card:px-3",e),...n})}function v4({className:e,...n}){return _.jsx("textarea",{"data-slot":"textarea",className:Je("border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors focus-visible:ring-3 aria-invalid:ring-3 md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...n})}function b4(){const{pendingDialog:e,notifications:n,statusByKey:r,widgetsByKey:a}=Uu(Yr,g=>g),[l,c]=R.useState("");R.useEffect(()=>{e?.method==="editor"?c(e.prefill??""):c("")},[e]),R.useEffect(()=>{if(n.length===0)return;const g=setTimeout(()=>E3(),3e3);return()=>clearTimeout(g)},[n]);function d(){const g=M3();g.id&&Aa.sendExtensionUIResponse(g)}function f(g){const v=T3(g);v.id&&Aa.sendExtensionUIResponse(v)}function m(g){const v=C3(g);v.id&&Aa.sendExtensionUIResponse(v)}const h=Object.values(a).filter(g=>g.placement==="aboveEditor"),y=Object.values(a).filter(g=>g.placement==="belowEditor");return _.jsxs(_.Fragment,{children:[h.length>0&&_.jsx("div",{className:"fixed bottom-28 right-4 z-40 space-y-2 max-w-md",children:h.map(g=>_.jsx(Gc,{children:_.jsx(Fc,{className:"py-2 px-3",children:g.lines.map((v,b)=>_.jsx("p",{className:"text-xs",children:v},b))})},g.key))}),Object.keys(r).length>0&&_.jsx("div",{className:"fixed bottom-4 left-4 z-40 flex gap-2 flex-wrap max-w-xl",children:Object.entries(r).map(([g,v])=>_.jsxs("span",{className:"rounded bg-muted px-2 py-1 text-xs text-muted-foreground",children:[g,": ",v]},g))}),n.length>0&&_.jsx("div",{className:"fixed top-4 right-4 z-50 space-y-2 max-w-md",children:n.map(g=>_.jsx(Gc,{children:_.jsx(Fc,{className:"py-2 px-3 text-sm",children:g.message})},g.id))}),e&&(e.method==="select"||e.method==="confirm"||e.method==="input"||e.method==="editor")&&_.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 flex items-center justify-center p-4",children:_.jsxs(Gc,{className:"w-full max-w-lg",children:[_.jsx(g4,{children:_.jsx(y4,{children:e.title})}),_.jsxs(Fc,{className:"space-y-3",children:[e.method==="confirm"&&_.jsxs(_.Fragment,{children:[_.jsx("p",{className:"text-sm text-muted-foreground",children:e.message}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsx(oo,{variant:"outline",onClick:()=>f(!1),children:"Cancel"}),_.jsx(oo,{onClick:()=>f(!0),children:"Confirm"})]})]}),e.method==="select"&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"space-y-2",children:e.options.map(g=>_.jsx(oo,{variant:"outline",className:"w-full justify-start",onClick:()=>m(g),children:g},g))}),_.jsx("div",{className:"flex justify-end",children:_.jsx(oo,{variant:"ghost",onClick:d,children:"Cancel"})})]}),e.method==="input"&&_.jsxs(_.Fragment,{children:[_.jsx(Ck,{value:l,onChange:g=>c(g.target.value),placeholder:e.placeholder}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsx(oo,{variant:"outline",onClick:d,children:"Cancel"}),_.jsx(oo,{onClick:()=>m(l),children:"Submit"})]})]}),e.method==="editor"&&_.jsxs(_.Fragment,{children:[_.jsx(v4,{value:l,onChange:g=>c(g.target.value),rows:12}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsx(oo,{variant:"outline",onClick:d,children:"Cancel"}),_.jsx(oo,{onClick:()=>m(l),children:"Save"})]})]})]})]})}),y.length>0&&_.jsx("div",{className:"fixed bottom-16 right-4 z-40 space-y-2 max-w-md",children:y.map(g=>_.jsx(Gc,{children:_.jsx(Fc,{className:"py-2 px-3",children:g.lines.map((v,b)=>_.jsx("p",{className:"text-xs",children:v},b))})},g.key))})]})}const fl=PA({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"clankie — Personal AI Assistant"}],links:[{rel:"stylesheet",href:b_},{rel:"icon",type:"image/svg+xml",href:"/favicon.svg"}]}),component:S4});function S4(){return R.useEffect(()=>{if(typeof window<"u"){const r=new URLSearchParams(window.location.search).get("token");r&&(x3({authToken:r}),window.history.replaceState(null,"",window.location.pathname),console.log("[root] Detected auth token from URL, saved to localStorage"))}const{settings:e}=ul.state;e.authToken&&!Aa.isConnected()&&Aa.connect()},[]),_.jsx(x4,{children:_.jsx(CL,{children:_.jsxs(PL,{children:[_.jsx(m4,{variant:"inset"}),_.jsx(BL,{children:_.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[_.jsx("header",{className:"flex h-14 shrink-0 items-center gap-2 border-b px-4",children:_.jsx(UL,{})}),_.jsx(hx,{})]})}),_.jsx(b4,{})]})})})}function x4({children:e}){return _.jsxs("html",{lang:"en",className:"dark",children:[_.jsx("head",{children:_.jsx(JA,{})}),_.jsxs("body",{children:[e,_.jsx(WA,{})]})]})}const w4="modulepreload",E4=function(e){return"/"+e},iS={},cf=function(n,r,a){let l=Promise.resolve();if(r&&r.length>0){let m=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");l=m(r.map(h=>{if(h=E4(h),h in iS)return;iS[h]=!0;const y=h.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=y?"stylesheet":w4,y||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),y)return new Promise((b,x)=>{v.addEventListener("load",b),v.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return l.then(d=>{for(const f of d||[])f.status==="rejected"&&c(f.reason);return n().catch(c)})},R4=()=>cf(()=>import("./settings-Db2CTnq7.js"),__vite__mapDeps([0,1,2])),T4=ka("/settings")({component:Hu(R4,"component")}),C4=()=>cf(()=>import("./extensions-Ce8R4mF3.js"),__vite__mapDeps([3,1,2])),M4=ka("/extensions")({component:Hu(C4,"component")}),O4=()=>cf(()=>import("./index-CdxpJyJ4.js"),[]),A4=ka("/")({component:Hu(O4,"component")}),_4=()=>cf(()=>import("./sessions._sessionId-DA8C51jO.js"),__vite__mapDeps([4,2])),D4=ka("/sessions/$sessionId")({component:Hu(_4,"component")}),k4=T4.update({id:"/settings",path:"/settings",getParentRoute:()=>fl}),N4=M4.update({id:"/extensions",path:"/extensions",getParentRoute:()=>fl}),z4=A4.update({id:"/",path:"/",getParentRoute:()=>fl}),L4=D4.update({id:"/sessions/$sessionId",path:"/sessions/$sessionId",getParentRoute:()=>fl}),j4={IndexRoute:z4,ExtensionsRoute:N4,SettingsRoute:k4,SessionsSessionIdRoute:L4},P4=fl._addFileChildren(j4),I4=()=>GA({routeTree:P4,scrollRestoration:!0,defaultPreloadStaleTime:0});async function U4(){const e=await I4();let n;return n=[],window.__TSS_START_OPTIONS__={serializationAdapters:n},n.push(v_),e.options.serializationAdapters&&n.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:n}),e.state.matches.length||await t_(e),e}async function B4(){const e=await U4();return window.$_TSR?.h(),e}let Wh;function H4(){return Wh||(Wh=B4()),_.jsx(mA,{promise:Wh,children:e=>_.jsx(KA,{router:e})})}R.startTransition(()=>{eT.hydrateRoot(document,_.jsx(R.StrictMode,{children:_.jsx(H4,{})}))});export{Ep as $,Vo as A,oo as B,Gc as C,Kz as D,J0 as E,D3 as F,ej as G,P_ as H,Ck as I,Yp as J,nl as K,Ji as L,Xo as M,f4 as N,d4 as O,L_ as P,NE as Q,rj as R,zr as S,sj as T,h4 as U,aj as V,ij as W,H_ as X,lj as Y,aS as Z,Rp as _,Qt as a,v4 as a0,nj as a1,lS as a2,_a as a3,Gn as a4,Tp as a5,Q4 as a6,Uw as a7,zN as a8,jN as a9,PN as aa,UN as ab,BN as ac,$4 as ad,HN as ae,U0 as af,IN as ag,gD as ah,Mx as ai,C_ as aj,oj as ak,cl as al,mo as am,D4 as an,Fz as b,qo as c,pw as d,Pz as e,Je as f,$z as g,jk as h,Lk as i,_ as j,Iz as k,zk as l,Uu as m,ll as n,tj as o,Aa as p,ul as q,R as r,g4 as s,y4 as t,Ms as u,cj as v,Fc as w,x3 as x,J4 as y,W4 as z};