@dhzh/foundry 7.1.1 → 7.1.3
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.
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-editor-
|
|
2
|
-
function HN(e,n){for(var a=0;a<n.length;a++){const o=n[a];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(o,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>o[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function a(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(s){if(s.ep)return;s.ep=!0;const u=a(s);fetch(s.href,u)}})();function qR(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i0={exports:{}},Bu={};var lS;function UN(){if(lS)return Bu;lS=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(o,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var d in s)d!=="key"&&(u[d]=s[d])}else u=s;return s=u.ref,{$$typeof:e,type:o,key:c,ref:s!==void 0?s:null,props:u}}return Bu.Fragment=n,Bu.jsx=a,Bu.jsxs=a,Bu}var uS;function FN(){return uS||(uS=1,i0.exports=UN()),i0.exports}var S=FN(),s0={exports:{}},Tt={};var cS;function BN(){if(cS)return Tt;cS=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),x=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=x&&N[x]||N["@@iterator"],typeof N=="function"?N:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,T={};function O(N,B,W){this.props=N,this.context=B,this.refs=T,this.updater=W||C}O.prototype.isReactComponent={},O.prototype.setState=function(N,B){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,B,"setState")},O.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function M(){}M.prototype=O.prototype;function A(N,B,W){this.props=N,this.context=B,this.refs=T,this.updater=W||C}var I=A.prototype=new M;I.constructor=A,R(I,O.prototype),I.isPureReactComponent=!0;var j=Array.isArray;function k(){}var D={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function F(N,B,W){var re=W.ref;return{$$typeof:e,type:N,key:B,ref:re!==void 0?re:null,props:W}}function G(N,B){return F(N.type,B,N.props)}function J(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function Y(N){var B={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(W){return B[W]})}var U=/\/+/g;function _(N,B){return typeof N=="object"&&N!==null&&N.key!=null?Y(""+N.key):B.toString(36)}function L(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(k,k):(N.status="pending",N.then(function(B){N.status==="pending"&&(N.status="fulfilled",N.value=B)},function(B){N.status==="pending"&&(N.status="rejected",N.reason=B)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function $(N,B,W,re,Re){var le=typeof N;(le==="undefined"||le==="boolean")&&(N=null);var me=!1;if(N===null)me=!0;else switch(le){case"bigint":case"string":case"number":me=!0;break;case"object":switch(N.$$typeof){case e:case n:me=!0;break;case y:return me=N._init,$(me(N._payload),B,W,re,Re)}}if(me)return Re=Re(N),me=re===""?"."+_(N,0):re,j(Re)?(W="",me!=null&&(W=me.replace(U,"$&/")+"/"),$(Re,B,W,"",function(Te){return Te})):Re!=null&&(J(Re)&&(Re=G(Re,W+(Re.key==null||N&&N.key===Re.key?"":(""+Re.key).replace(U,"$&/")+"/")+me)),B.push(Re)),1;me=0;var ge=re===""?".":re+":";if(j(N))for(var ce=0;ce<N.length;ce++)re=N[ce],le=ge+_(re,ce),me+=$(re,B,W,le,Re);else if(ce=w(N),typeof ce=="function")for(N=ce.call(N),ce=0;!(re=N.next()).done;)re=re.value,le=ge+_(re,ce++),me+=$(re,B,W,le,Re);else if(le==="object"){if(typeof N.then=="function")return $(L(N),B,W,re,Re);throw B=String(N),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return me}function K(N,B,W){if(N==null)return N;var re=[],Re=0;return $(N,re,"","",function(le){return B.call(W,le,Re++)}),re}function V(N){if(N._status===-1){var B=N._result,W=B();W.then(function(re){(N._status===0||N._status===-1)&&(N._status=1,N._result=re,W.status===void 0&&(W.status="fulfilled",W.value=re))},function(re){(N._status===0||N._status===-1)&&(N._status=2,N._result=re,W.status===void 0&&(W.status="rejected",W.reason=re))}),N._status===-1&&(N._status=0,N._result=W)}if(N._status===1)return N._result.default;throw N._result}var X=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function ee(N){var B=D.T,W={};W.types=B!==null?B.types:null,D.T=W;try{var re=N(),Re=D.S;Re!==null&&Re(W,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(k,X)}catch(le){X(le)}finally{B!==null&&W.types!==null&&(B.types=W.types),D.T=B}}function q(N){var B=D.T;if(B!==null){var W=B.types;W===null?B.types=[N]:W.indexOf(N)===-1&&W.push(N)}else ee(q.bind(null,N))}var se={map:K,forEach:function(N,B,W){K(N,function(){B.apply(this,arguments)},W)},count:function(N){var B=0;return K(N,function(){B++}),B},toArray:function(N){return K(N,function(B){return B})||[]},only:function(N){if(!J(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Tt.Activity=h,Tt.Children=se,Tt.Component=O,Tt.Fragment=a,Tt.Profiler=s,Tt.PureComponent=A,Tt.StrictMode=o,Tt.Suspense=p,Tt.ViewTransition=b,Tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Tt.__COMPILER_RUNTIME={__proto__:null,c:function(N){return D.H.useMemoCache(N)}},Tt.addTransitionType=q,Tt.cache=function(N){return function(){return N.apply(null,arguments)}},Tt.cacheSignal=function(){return null},Tt.cloneElement=function(N,B,W){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var re=R({},N.props),Re=N.key;if(B!=null)for(le in B.key!==void 0&&(Re=""+B.key),B)!z.call(B,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&B.ref===void 0||(re[le]=B[le]);var le=arguments.length-2;if(le===1)re.children=W;else if(1<le){for(var me=Array(le),ge=0;ge<le;ge++)me[ge]=arguments[ge+2];re.children=me}return F(N.type,Re,re)},Tt.createContext=function(N){return N={$$typeof:c,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:u,_context:N},N},Tt.createElement=function(N,B,W){var re,Re={},le=null;if(B!=null)for(re in B.key!==void 0&&(le=""+B.key),B)z.call(B,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(Re[re]=B[re]);var me=arguments.length-2;if(me===1)Re.children=W;else if(1<me){for(var ge=Array(me),ce=0;ce<me;ce++)ge[ce]=arguments[ce+2];Re.children=ge}if(N&&N.defaultProps)for(re in me=N.defaultProps,me)Re[re]===void 0&&(Re[re]=me[re]);return F(N,le,Re)},Tt.createRef=function(){return{current:null}},Tt.forwardRef=function(N){return{$$typeof:d,render:N}},Tt.isValidElement=J,Tt.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:V}},Tt.memo=function(N,B){return{$$typeof:g,type:N,compare:B===void 0?null:B}},Tt.startTransition=ee,Tt.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Tt.use=function(N){return D.H.use(N)},Tt.useActionState=function(N,B,W){return D.H.useActionState(N,B,W)},Tt.useCallback=function(N,B){return D.H.useCallback(N,B)},Tt.useContext=function(N){return D.H.useContext(N)},Tt.useDebugValue=function(){},Tt.useDeferredValue=function(N,B){return D.H.useDeferredValue(N,B)},Tt.useEffect=function(N,B){return D.H.useEffect(N,B)},Tt.useEffectEvent=function(N){return D.H.useEffectEvent(N)},Tt.useId=function(){return D.H.useId()},Tt.useImperativeHandle=function(N,B,W){return D.H.useImperativeHandle(N,B,W)},Tt.useInsertionEffect=function(N,B){return D.H.useInsertionEffect(N,B)},Tt.useLayoutEffect=function(N,B){return D.H.useLayoutEffect(N,B)},Tt.useMemo=function(N,B){return D.H.useMemo(N,B)},Tt.useOptimistic=function(N,B){return D.H.useOptimistic(N,B)},Tt.useReducer=function(N,B,W){return D.H.useReducer(N,B,W)},Tt.useRef=function(N){return D.H.useRef(N)},Tt.useState=function(N){return D.H.useState(N)},Tt.useSyncExternalStore=function(N,B,W){return D.H.useSyncExternalStore(N,B,W)},Tt.useTransition=function(){return D.H.useTransition()},Tt.version="19.3.1",Tt}var dS;function Ec(){return dS||(dS=1,s0.exports=BN()),s0.exports}var v=Ec();const Ne=qR(v),YR=HN({__proto__:null,default:Ne},[v]);var l0={exports:{}},Vu={},u0={exports:{}},c0={};var fS;function VN(){return fS||(fS=1,(function(e){function n(L,$){var K=L.length;L.push($);e:for(;0<K;){var V=K-1>>>1,X=L[V];if(0<s(X,$))L[V]=$,L[K]=X,K=V;else break e}}function a(L){return L.length===0?null:L[0]}function o(L){if(L.length===0)return null;var $=L[0],K=L.pop();if(K!==$){L[0]=K;e:for(var V=0,X=L.length,ee=X>>>1;V<ee;){var q=2*(V+1)-1,se=L[q],N=q+1,B=L[N];if(0>s(se,K))N<X&&0>s(B,se)?(L[V]=B,L[N]=K,V=N):(L[V]=se,L[q]=K,V=q);else if(N<X&&0>s(B,K))L[V]=B,L[N]=K,V=N;else break e}}return $}function s(L,$){var K=L.sortIndex-$.sortIndex;return K!==0?K:L.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],g=[],y=1,h=null,b=3,x=!1,w=!1,C=!1,R=!1,T=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function A(L){for(var $=a(g);$!==null;){if($.callback===null)o(g);else if($.startTime<=L)o(g),$.sortIndex=$.expirationTime,n(p,$);else break;$=a(g)}}function I(L){if(C=!1,A(L),!w)if(a(p)!==null)w=!0,j||(j=!0,J());else{var $=a(g);$!==null&&_(I,$.startTime-L)}}var j=!1,k=-1,D=5,z=-1;function F(){return R?!0:!(e.unstable_now()-z<D)}function G(){if(R=!1,j){var L=e.unstable_now();z=L;var $=!0;try{e:{w=!1,C&&(C=!1,O(k),k=-1),x=!0;var K=b;try{t:{for(A(L),h=a(p);h!==null&&!(h.expirationTime>L&&F());){var V=h.callback;if(typeof V=="function"){h.callback=null,b=h.priorityLevel;var X=V(h.expirationTime<=L);if(L=e.unstable_now(),typeof X=="function"){h.callback=X,A(L),$=!0;break t}h===a(p)&&o(p),A(L)}else o(p);h=a(p)}if(h!==null)$=!0;else{var ee=a(g);ee!==null&&_(I,ee.startTime-L),$=!1}}break e}finally{h=null,b=K,x=!1}$=void 0}}finally{$?J():j=!1}}}var J;if(typeof M=="function")J=function(){M(G)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,U=Y.port2;Y.port1.onmessage=G,J=function(){U.postMessage(null)}}else J=function(){T(G,0)};function _(L,$){k=T(function(){L(e.unstable_now())},$)}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(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(L){switch(b){case 1:case 2:case 3:var $=3;break;default:$=b}var K=b;b=$;try{return L()}finally{b=K}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(L,$){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var K=b;b=L;try{return $()}finally{b=K}},e.unstable_scheduleCallback=function(L,$,K){var V=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?V+K:V):K=V,L){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=K+X,L={id:y++,callback:$,priorityLevel:L,startTime:K,expirationTime:X,sortIndex:-1},K>V?(L.sortIndex=K,n(g,L),a(p)===null&&L===a(g)&&(C?(O(k),k=-1):C=!0,_(I,K-V))):(L.sortIndex=X,n(p,L),w||x||(w=!0,j||(j=!0,J()))),L},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(L){var $=b;return function(){var K=b;b=$;try{return L.apply(this,arguments)}finally{b=K}}}})(c0)),c0}var hS;function qN(){return hS||(hS=1,u0.exports=VN()),u0.exports}var d0={exports:{}},xr={};var pS;function YN(){if(pS)return xr;pS=1;var e=Ec();function n(y){var h="https://react.dev/errors/"+y;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var o={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal"),u=Symbol.for("react.recoverable"),c=Symbol.for("react.optimistic_key");function d(y,h,b){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:x===c?c:""+x,children:y,containerInfo:h,implementation:b}}var p=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,h){if(y==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return xr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,xr.browser=function(y){return{$$typeof:u,_reason:y}},xr.createPortal=function(y,h){var b=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 d(y,h,null,b)},xr.flushSync=function(y){var h=p.T,b=o.p;try{if(p.T=null,o.p=2,y)return y()}finally{p.T=h,o.p=b,o.d.f()}},xr.preconnect=function(y,h){typeof y=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(y,h))},xr.prefetchDNS=function(y){typeof y=="string"&&o.d.D(y)},xr.preinit=function(y,h){if(typeof y=="string"&&h&&typeof h.as=="string"){var b=h.as,x=g(b,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,C=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?o.d.S(y,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:w,fetchPriority:C}):b==="script"&&o.d.X(y,{crossOrigin:x,integrity:w,fetchPriority:C,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},xr.preinitModule=function(y,h){if(typeof y=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=g(h.as,h.crossOrigin);o.d.M(y,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}}else h==null&&o.d.M(y)},xr.preload=function(y,h){if(typeof y=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,x=g(b,h.crossOrigin);o.d.L(y,b,{crossOrigin:x,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})}},xr.preloadModule=function(y,h){if(typeof y=="string")if(h){var b=g(h.as,h.crossOrigin);o.d.m(y,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}else o.d.m(y)},xr.requestFormReset=function(y){o.d.r(y)},xr.unstable_batchedUpdates=function(y,h){return y(h)},xr.useFormState=function(y,h,b){return p.H.useFormState(y,h,b)},xr.useFormStatus=function(){return p.H.useHostTransitionStatus()},xr.version="19.3.1",xr}var gS;function KR(){if(gS)return d0.exports;gS=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(),d0.exports=YN(),d0.exports}var mS;function KN(){if(mS)return Vu;mS=1;var e=qN(),n=Ec(),a=KR();function o(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){for(var r=t,i=r;i&&!i.alternate;)r=i,(r.flags&4098)!==0&&(t=r.return),i=r.return;for(;r.return;)r=r.return;return r.tag===3?t:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function d(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(o(188))}function g(t){var r=t.alternate;if(!r){if(r=u(t),r===null)throw Error(o(188));return r!==t?null:t}for(var i=t,l=r;;){var f=i.return;if(f===null)break;var m=f.alternate;if(m===null){if(l=f.return,l!==null){i=l;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===i)return p(f),t;if(m===l)return p(f),r;m=m.sibling}throw Error(o(188))}if(i.return!==l.return)i=f,l=m;else{for(var E=!1,P=f.child;P;){if(P===i){E=!0,i=f,l=m;break}if(P===l){E=!0,l=f,i=m;break}P=P.sibling}if(!E){for(P=m.child;P;){if(P===i){E=!0,i=m,l=f;break}if(P===l){E=!0,l=m,i=f;break}P=P.sibling}if(!E)throw Error(o(189))}}if(i.alternate!==l)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}function h(t,r,i,l,f,m){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&i(t,l,f,m)||(t.tag!==22||t.memoizedState===null)&&(r||t.tag!==5&&t.tag!==27)&&h(t.child,r,i,l,f,m))return!0;t=t.sibling}return!1}function b(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function x(t){var r=!1;for(t=t.return;t!==null&&(t.tag===4&&(r=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return r}function w(t){var r=[null,null],i=b(t);return i===null||C(r,t,i.child,{foundSelf:!1}),r}function C(t,r,i,l){for(;i!==null;){if(i===r)l.foundSelf=!0;else if(i.tag===5||i.tag===27||i.tag===6){if(l.foundSelf)return t[1]=i,!0;t[0]=i}else if((i.tag!==22||i.memoizedState===null)&&C(t,r,i.child,l))return!0;i=i.sibling}return!1}function R(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(o(559))}}var T=null,O=null;function M(t,r,i){return t===i?!0:t===r?(T=t,!0):!1}function A(t,r,i){return t===i?(O=t,!1):t===r?(O!==null&&(T=t),!0):!1}function I(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function j(t,r,i){for(var l=0,f=t;f;f=i(f))l++;f=0;for(var m=r;m;m=i(m))f++;for(;0<l-f;)t=i(t),l--;for(;0<f-l;)r=i(r),f--;for(;l--;){if(t===r||r!==null&&t===r.alternate)return t;t=i(t),r=i(r)}return null}var k=Object.assign,D=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),_=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),q=Symbol.for("react.legacy_hidden"),se=Symbol.for("react.memo_cache_sentinel"),N=Symbol.for("react.view_transition"),B=Symbol.for("react.recoverable"),W=Symbol.iterator;function re(t){return t===null||typeof t!="object"?null:(t=W&&t[W]||t["@@iterator"],typeof t=="function"?t:null)}var Re=Symbol.for("react.client.reference");function le(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Re?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case G:return"Fragment";case Y:return"Profiler";case J:return"StrictMode";case $:return"Suspense";case K:return"SuspenseList";case ee:return"Activity";case N:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case F:return"Portal";case _:return t.displayName||"Context";case U:return(t._context.displayName||"Context")+".Consumer";case L:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V:return r=t.displayName||null,r!==null?r:le(t.type)||"Memo";case X:r=t._payload,t=t._init;try{return le(t(r))}catch{}}return null}var me=Array.isArray,ge=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Te={pending:!1,data:null,method:null,action:null},ve=[],Pe=-1;function Me(t){return{current:t}}function Le(t){0>Pe||(t.current=ve[Pe],ve[Pe]=null,Pe--)}function Fe(t,r){Pe++,ve[Pe]=t.current,t.current=r}var Oe=Me(null),He=Me(null),be=Me(null),Ue=Me(null);function Ze(t,r){switch(Fe(be,r),Fe(He,t),Fe(Oe,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?y1(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=y1(r),t=v1(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Le(Oe),Fe(Oe,t)}function it(){Le(Oe),Le(He),Le(be)}function de(t){var r=t.memoizedState;r!==null&&(ul._currentValue=r.memoizedState,Fe(Ue,t)),r=Oe.current;var i=v1(r,t.type);r!==i&&(Fe(He,t),Fe(Oe,i))}function we(t){He.current===t&&(Le(Oe),Le(He)),Ue.current===t&&(Le(Ue),ul._currentValue=Te)}var Ke,De;function Ie(t){if(Ke===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);Ke=r&&r[1]||"",De=-1<i.stack.indexOf(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-editor-CorvPRcj.js","assets/markdown-editor-DMeNDIaI.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
function UN(e,n){for(var a=0;a<n.length;a++){const o=n[a];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(o,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>o[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function a(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(s){if(s.ep)return;s.ep=!0;const u=a(s);fetch(s.href,u)}})();function VR(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i0={exports:{}},Bu={};var sS;function FN(){if(sS)return Bu;sS=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(o,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var d in s)d!=="key"&&(u[d]=s[d])}else u=s;return s=u.ref,{$$typeof:e,type:o,key:c,ref:s!==void 0?s:null,props:u}}return Bu.Fragment=n,Bu.jsx=a,Bu.jsxs=a,Bu}var lS;function BN(){return lS||(lS=1,i0.exports=FN()),i0.exports}var S=BN(),s0={exports:{}},Tt={};var uS;function VN(){if(uS)return Tt;uS=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),x=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=x&&N[x]||N["@@iterator"],typeof N=="function"?N:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,T={};function O(N,B,W){this.props=N,this.context=B,this.refs=T,this.updater=W||C}O.prototype.isReactComponent={},O.prototype.setState=function(N,B){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,B,"setState")},O.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function M(){}M.prototype=O.prototype;function A(N,B,W){this.props=N,this.context=B,this.refs=T,this.updater=W||C}var I=A.prototype=new M;I.constructor=A,R(I,O.prototype),I.isPureReactComponent=!0;var j=Array.isArray;function k(){}var D={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function F(N,B,W){var re=W.ref;return{$$typeof:e,type:N,key:B,ref:re!==void 0?re:null,props:W}}function G(N,B){return F(N.type,B,N.props)}function J(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function Y(N){var B={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(W){return B[W]})}var U=/\/+/g;function _(N,B){return typeof N=="object"&&N!==null&&N.key!=null?Y(""+N.key):B.toString(36)}function L(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(k,k):(N.status="pending",N.then(function(B){N.status==="pending"&&(N.status="fulfilled",N.value=B)},function(B){N.status==="pending"&&(N.status="rejected",N.reason=B)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function $(N,B,W,re,Re){var le=typeof N;(le==="undefined"||le==="boolean")&&(N=null);var me=!1;if(N===null)me=!0;else switch(le){case"bigint":case"string":case"number":me=!0;break;case"object":switch(N.$$typeof){case e:case n:me=!0;break;case y:return me=N._init,$(me(N._payload),B,W,re,Re)}}if(me)return Re=Re(N),me=re===""?"."+_(N,0):re,j(Re)?(W="",me!=null&&(W=me.replace(U,"$&/")+"/"),$(Re,B,W,"",function(Te){return Te})):Re!=null&&(J(Re)&&(Re=G(Re,W+(Re.key==null||N&&N.key===Re.key?"":(""+Re.key).replace(U,"$&/")+"/")+me)),B.push(Re)),1;me=0;var ge=re===""?".":re+":";if(j(N))for(var ce=0;ce<N.length;ce++)re=N[ce],le=ge+_(re,ce),me+=$(re,B,W,le,Re);else if(ce=w(N),typeof ce=="function")for(N=ce.call(N),ce=0;!(re=N.next()).done;)re=re.value,le=ge+_(re,ce++),me+=$(re,B,W,le,Re);else if(le==="object"){if(typeof N.then=="function")return $(L(N),B,W,re,Re);throw B=String(N),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return me}function K(N,B,W){if(N==null)return N;var re=[],Re=0;return $(N,re,"","",function(le){return B.call(W,le,Re++)}),re}function V(N){if(N._status===-1){var B=N._result,W=B();W.then(function(re){(N._status===0||N._status===-1)&&(N._status=1,N._result=re,W.status===void 0&&(W.status="fulfilled",W.value=re))},function(re){(N._status===0||N._status===-1)&&(N._status=2,N._result=re,W.status===void 0&&(W.status="rejected",W.reason=re))}),N._status===-1&&(N._status=0,N._result=W)}if(N._status===1)return N._result.default;throw N._result}var X=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function ee(N){var B=D.T,W={};W.types=B!==null?B.types:null,D.T=W;try{var re=N(),Re=D.S;Re!==null&&Re(W,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(k,X)}catch(le){X(le)}finally{B!==null&&W.types!==null&&(B.types=W.types),D.T=B}}function q(N){var B=D.T;if(B!==null){var W=B.types;W===null?B.types=[N]:W.indexOf(N)===-1&&W.push(N)}else ee(q.bind(null,N))}var se={map:K,forEach:function(N,B,W){K(N,function(){B.apply(this,arguments)},W)},count:function(N){var B=0;return K(N,function(){B++}),B},toArray:function(N){return K(N,function(B){return B})||[]},only:function(N){if(!J(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Tt.Activity=h,Tt.Children=se,Tt.Component=O,Tt.Fragment=a,Tt.Profiler=s,Tt.PureComponent=A,Tt.StrictMode=o,Tt.Suspense=p,Tt.ViewTransition=b,Tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Tt.__COMPILER_RUNTIME={__proto__:null,c:function(N){return D.H.useMemoCache(N)}},Tt.addTransitionType=q,Tt.cache=function(N){return function(){return N.apply(null,arguments)}},Tt.cacheSignal=function(){return null},Tt.cloneElement=function(N,B,W){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var re=R({},N.props),Re=N.key;if(B!=null)for(le in B.key!==void 0&&(Re=""+B.key),B)!z.call(B,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&B.ref===void 0||(re[le]=B[le]);var le=arguments.length-2;if(le===1)re.children=W;else if(1<le){for(var me=Array(le),ge=0;ge<le;ge++)me[ge]=arguments[ge+2];re.children=me}return F(N.type,Re,re)},Tt.createContext=function(N){return N={$$typeof:c,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:u,_context:N},N},Tt.createElement=function(N,B,W){var re,Re={},le=null;if(B!=null)for(re in B.key!==void 0&&(le=""+B.key),B)z.call(B,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(Re[re]=B[re]);var me=arguments.length-2;if(me===1)Re.children=W;else if(1<me){for(var ge=Array(me),ce=0;ce<me;ce++)ge[ce]=arguments[ce+2];Re.children=ge}if(N&&N.defaultProps)for(re in me=N.defaultProps,me)Re[re]===void 0&&(Re[re]=me[re]);return F(N,le,Re)},Tt.createRef=function(){return{current:null}},Tt.forwardRef=function(N){return{$$typeof:d,render:N}},Tt.isValidElement=J,Tt.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:V}},Tt.memo=function(N,B){return{$$typeof:g,type:N,compare:B===void 0?null:B}},Tt.startTransition=ee,Tt.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Tt.use=function(N){return D.H.use(N)},Tt.useActionState=function(N,B,W){return D.H.useActionState(N,B,W)},Tt.useCallback=function(N,B){return D.H.useCallback(N,B)},Tt.useContext=function(N){return D.H.useContext(N)},Tt.useDebugValue=function(){},Tt.useDeferredValue=function(N,B){return D.H.useDeferredValue(N,B)},Tt.useEffect=function(N,B){return D.H.useEffect(N,B)},Tt.useEffectEvent=function(N){return D.H.useEffectEvent(N)},Tt.useId=function(){return D.H.useId()},Tt.useImperativeHandle=function(N,B,W){return D.H.useImperativeHandle(N,B,W)},Tt.useInsertionEffect=function(N,B){return D.H.useInsertionEffect(N,B)},Tt.useLayoutEffect=function(N,B){return D.H.useLayoutEffect(N,B)},Tt.useMemo=function(N,B){return D.H.useMemo(N,B)},Tt.useOptimistic=function(N,B){return D.H.useOptimistic(N,B)},Tt.useReducer=function(N,B,W){return D.H.useReducer(N,B,W)},Tt.useRef=function(N){return D.H.useRef(N)},Tt.useState=function(N){return D.H.useState(N)},Tt.useSyncExternalStore=function(N,B,W){return D.H.useSyncExternalStore(N,B,W)},Tt.useTransition=function(){return D.H.useTransition()},Tt.version="19.3.1",Tt}var cS;function Ec(){return cS||(cS=1,s0.exports=VN()),s0.exports}var v=Ec();const Ne=VR(v),qR=UN({__proto__:null,default:Ne},[v]);var l0={exports:{}},Vu={},u0={exports:{}},c0={};var dS;function qN(){return dS||(dS=1,(function(e){function n(L,$){var K=L.length;L.push($);e:for(;0<K;){var V=K-1>>>1,X=L[V];if(0<s(X,$))L[V]=$,L[K]=X,K=V;else break e}}function a(L){return L.length===0?null:L[0]}function o(L){if(L.length===0)return null;var $=L[0],K=L.pop();if(K!==$){L[0]=K;e:for(var V=0,X=L.length,ee=X>>>1;V<ee;){var q=2*(V+1)-1,se=L[q],N=q+1,B=L[N];if(0>s(se,K))N<X&&0>s(B,se)?(L[V]=B,L[N]=K,V=N):(L[V]=se,L[q]=K,V=q);else if(N<X&&0>s(B,K))L[V]=B,L[N]=K,V=N;else break e}}return $}function s(L,$){var K=L.sortIndex-$.sortIndex;return K!==0?K:L.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],g=[],y=1,h=null,b=3,x=!1,w=!1,C=!1,R=!1,T=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function A(L){for(var $=a(g);$!==null;){if($.callback===null)o(g);else if($.startTime<=L)o(g),$.sortIndex=$.expirationTime,n(p,$);else break;$=a(g)}}function I(L){if(C=!1,A(L),!w)if(a(p)!==null)w=!0,j||(j=!0,J());else{var $=a(g);$!==null&&_(I,$.startTime-L)}}var j=!1,k=-1,D=5,z=-1;function F(){return R?!0:!(e.unstable_now()-z<D)}function G(){if(R=!1,j){var L=e.unstable_now();z=L;var $=!0;try{e:{w=!1,C&&(C=!1,O(k),k=-1),x=!0;var K=b;try{t:{for(A(L),h=a(p);h!==null&&!(h.expirationTime>L&&F());){var V=h.callback;if(typeof V=="function"){h.callback=null,b=h.priorityLevel;var X=V(h.expirationTime<=L);if(L=e.unstable_now(),typeof X=="function"){h.callback=X,A(L),$=!0;break t}h===a(p)&&o(p),A(L)}else o(p);h=a(p)}if(h!==null)$=!0;else{var ee=a(g);ee!==null&&_(I,ee.startTime-L),$=!1}}break e}finally{h=null,b=K,x=!1}$=void 0}}finally{$?J():j=!1}}}var J;if(typeof M=="function")J=function(){M(G)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,U=Y.port2;Y.port1.onmessage=G,J=function(){U.postMessage(null)}}else J=function(){T(G,0)};function _(L,$){k=T(function(){L(e.unstable_now())},$)}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(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(L){switch(b){case 1:case 2:case 3:var $=3;break;default:$=b}var K=b;b=$;try{return L()}finally{b=K}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(L,$){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var K=b;b=L;try{return $()}finally{b=K}},e.unstable_scheduleCallback=function(L,$,K){var V=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?V+K:V):K=V,L){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=K+X,L={id:y++,callback:$,priorityLevel:L,startTime:K,expirationTime:X,sortIndex:-1},K>V?(L.sortIndex=K,n(g,L),a(p)===null&&L===a(g)&&(C?(O(k),k=-1):C=!0,_(I,K-V))):(L.sortIndex=X,n(p,L),w||x||(w=!0,j||(j=!0,J()))),L},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(L){var $=b;return function(){var K=b;b=$;try{return L.apply(this,arguments)}finally{b=K}}}})(c0)),c0}var fS;function YN(){return fS||(fS=1,u0.exports=qN()),u0.exports}var d0={exports:{}},xr={};var hS;function KN(){if(hS)return xr;hS=1;var e=Ec();function n(y){var h="https://react.dev/errors/"+y;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var o={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal"),u=Symbol.for("react.recoverable"),c=Symbol.for("react.optimistic_key");function d(y,h,b){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:x===c?c:""+x,children:y,containerInfo:h,implementation:b}}var p=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,h){if(y==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return xr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,xr.browser=function(y){return{$$typeof:u,_reason:y}},xr.createPortal=function(y,h){var b=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 d(y,h,null,b)},xr.flushSync=function(y){var h=p.T,b=o.p;try{if(p.T=null,o.p=2,y)return y()}finally{p.T=h,o.p=b,o.d.f()}},xr.preconnect=function(y,h){typeof y=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(y,h))},xr.prefetchDNS=function(y){typeof y=="string"&&o.d.D(y)},xr.preinit=function(y,h){if(typeof y=="string"&&h&&typeof h.as=="string"){var b=h.as,x=g(b,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,C=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?o.d.S(y,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:w,fetchPriority:C}):b==="script"&&o.d.X(y,{crossOrigin:x,integrity:w,fetchPriority:C,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},xr.preinitModule=function(y,h){if(typeof y=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=g(h.as,h.crossOrigin);o.d.M(y,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}}else h==null&&o.d.M(y)},xr.preload=function(y,h){if(typeof y=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,x=g(b,h.crossOrigin);o.d.L(y,b,{crossOrigin:x,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})}},xr.preloadModule=function(y,h){if(typeof y=="string")if(h){var b=g(h.as,h.crossOrigin);o.d.m(y,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}else o.d.m(y)},xr.requestFormReset=function(y){o.d.r(y)},xr.unstable_batchedUpdates=function(y,h){return y(h)},xr.useFormState=function(y,h,b){return p.H.useFormState(y,h,b)},xr.useFormStatus=function(){return p.H.useHostTransitionStatus()},xr.version="19.3.1",xr}var pS;function YR(){if(pS)return d0.exports;pS=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(),d0.exports=KN(),d0.exports}var gS;function GN(){if(gS)return Vu;gS=1;var e=YN(),n=Ec(),a=YR();function o(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){for(var r=t,i=r;i&&!i.alternate;)r=i,(r.flags&4098)!==0&&(t=r.return),i=r.return;for(;r.return;)r=r.return;return r.tag===3?t:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function d(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(o(188))}function g(t){var r=t.alternate;if(!r){if(r=u(t),r===null)throw Error(o(188));return r!==t?null:t}for(var i=t,l=r;;){var f=i.return;if(f===null)break;var m=f.alternate;if(m===null){if(l=f.return,l!==null){i=l;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===i)return p(f),t;if(m===l)return p(f),r;m=m.sibling}throw Error(o(188))}if(i.return!==l.return)i=f,l=m;else{for(var E=!1,P=f.child;P;){if(P===i){E=!0,i=f,l=m;break}if(P===l){E=!0,l=f,i=m;break}P=P.sibling}if(!E){for(P=m.child;P;){if(P===i){E=!0,i=m,l=f;break}if(P===l){E=!0,l=m,i=f;break}P=P.sibling}if(!E)throw Error(o(189))}}if(i.alternate!==l)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}function h(t,r,i,l,f,m){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&i(t,l,f,m)||(t.tag!==22||t.memoizedState===null)&&(r||t.tag!==5&&t.tag!==27)&&h(t.child,r,i,l,f,m))return!0;t=t.sibling}return!1}function b(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function x(t){var r=!1;for(t=t.return;t!==null&&(t.tag===4&&(r=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return r}function w(t){var r=[null,null],i=b(t);return i===null||C(r,t,i.child,{foundSelf:!1}),r}function C(t,r,i,l){for(;i!==null;){if(i===r)l.foundSelf=!0;else if(i.tag===5||i.tag===27||i.tag===6){if(l.foundSelf)return t[1]=i,!0;t[0]=i}else if((i.tag!==22||i.memoizedState===null)&&C(t,r,i.child,l))return!0;i=i.sibling}return!1}function R(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(o(559))}}var T=null,O=null;function M(t,r,i){return t===i?!0:t===r?(T=t,!0):!1}function A(t,r,i){return t===i?(O=t,!1):t===r?(O!==null&&(T=t),!0):!1}function I(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function j(t,r,i){for(var l=0,f=t;f;f=i(f))l++;f=0;for(var m=r;m;m=i(m))f++;for(;0<l-f;)t=i(t),l--;for(;0<f-l;)r=i(r),f--;for(;l--;){if(t===r||r!==null&&t===r.alternate)return t;t=i(t),r=i(r)}return null}var k=Object.assign,D=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),_=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),q=Symbol.for("react.legacy_hidden"),se=Symbol.for("react.memo_cache_sentinel"),N=Symbol.for("react.view_transition"),B=Symbol.for("react.recoverable"),W=Symbol.iterator;function re(t){return t===null||typeof t!="object"?null:(t=W&&t[W]||t["@@iterator"],typeof t=="function"?t:null)}var Re=Symbol.for("react.client.reference");function le(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Re?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case G:return"Fragment";case Y:return"Profiler";case J:return"StrictMode";case $:return"Suspense";case K:return"SuspenseList";case ee:return"Activity";case N:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case F:return"Portal";case _:return t.displayName||"Context";case U:return(t._context.displayName||"Context")+".Consumer";case L:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V:return r=t.displayName||null,r!==null?r:le(t.type)||"Memo";case X:r=t._payload,t=t._init;try{return le(t(r))}catch{}}return null}var me=Array.isArray,ge=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Te={pending:!1,data:null,method:null,action:null},ve=[],Pe=-1;function Me(t){return{current:t}}function Le(t){0>Pe||(t.current=ve[Pe],ve[Pe]=null,Pe--)}function Fe(t,r){Pe++,ve[Pe]=t.current,t.current=r}var Oe=Me(null),He=Me(null),be=Me(null),Ue=Me(null);function Ze(t,r){switch(Fe(be,r),Fe(He,t),Fe(Oe,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?m1(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=m1(r),t=y1(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Le(Oe),Fe(Oe,t)}function it(){Le(Oe),Le(He),Le(be)}function de(t){var r=t.memoizedState;r!==null&&(ul._currentValue=r.memoizedState,Fe(Ue,t)),r=Oe.current;var i=y1(r,t.type);r!==i&&(Fe(He,t),Fe(Oe,i))}function we(t){He.current===t&&(Le(Oe),Le(He)),Ue.current===t&&(Le(Ue),ul._currentValue=Te)}var Ke,De;function Ie(t){if(Ke===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);Ke=r&&r[1]||"",De=-1<i.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+Ke+t+De}var yt=!1;function ut(t,r){if(!t||yt)return"";yt=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(r){var Ce=function(){throw Error()};if(Object.defineProperty(Ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ce,[])}catch(Ye){var ae=Ye}Reflect.construct(t,[],Ce)}else{try{Ce.call()}catch(Ye){ae=Ye}Ce=!1;try{var fe=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),Ce=!0,new t}finally{Ce&&(fe!==void 0?Object.defineProperty(t.prototype,"props",fe):delete t.prototype.props)}}}else{try{throw Error()}catch(Ye){ae=Ye}(Ce=t())&&typeof Ce.catch=="function"&&Ce.catch(function(){})}}catch(Ye){if(Ye&&ae&&typeof Ye.stack=="string")return[Ye.stack,ae.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),E=m[0],P=m[1];if(E&&P){var Q=E.split(`
|
|
5
5
|
`),ie=P.split(`
|
|
6
6
|
`);for(f=l=0;l<Q.length&&!Q[l].includes("DetermineComponentFrameRoot");)l++;for(;f<ie.length&&!ie[f].includes("DetermineComponentFrameRoot");)f++;if(l===Q.length||f===ie.length)for(l=Q.length-1,f=ie.length-1;1<=l&&0<=f&&Q[l]!==ie[f];)f--;for(;1<=l&&0<=f;l--,f--)if(Q[l]!==ie[f]){if(l!==1||f!==1)do if(l--,f--,0>f||Q[l]!==ie[f]){var pe=`
|
|
7
7
|
`+Q[l].replace(" at new "," at ");return t.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",t.displayName)),pe}while(1<=l&&0<=f);break}}}finally{yt=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?Ie(i):""}function ht(t,r){switch(t.tag){case 26:case 27:case 5:return Ie(t.type);case 16:return Ie("Lazy");case 13:return t.child!==r&&r!==null?Ie("Suspense Fallback"):Ie("Suspense");case 19:return Ie("SuspenseList");case 0:case 15:return ut(t.type,!1);case 11:return ut(t.type.render,!1);case 1:return ut(t.type,!0);case 31:return Ie("Activity");case 30:return Ie("ViewTransition");default:return""}}function Ot(t){try{var r="",i=null;do r+=ht(t,i),i=t,t=t.return;while(t);return r}catch(l){return`
|
|
8
8
|
Error generating stack: `+l.message+`
|
|
9
|
-
`+l.stack}}var Dt=Object.prototype.hasOwnProperty,Jt=e.unstable_scheduleCallback,rn=e.unstable_cancelCallback,Wt=e.unstable_shouldYield,We=e.unstable_requestPaint,xt=e.unstable_now,$t=e.unstable_getCurrentPriorityLevel,ft=e.unstable_ImmediatePriority,vt=e.unstable_UserBlockingPriority,gt=e.unstable_NormalPriority,Lt=e.unstable_LowPriority,un=e.unstable_IdlePriority,je=e.log,ot=e.unstable_setDisableYieldValue,ke=null,ze=null;function Ge(t){if(typeof je=="function"&&ot(t),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(ke,t)}catch{}}var et=Math.clz32?Math.clz32:Z,Et=Math.log,H=Math.LN2;function Z(t){return t>>>=0,t===0?32:31-(Et(t)/H|0)|0}var ne=256,ye=262144,xe=4194304;function qe(t){var r=t&42;if(r!==0)return r;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&-t;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 Ve(t,r,i){var l=t.pendingLanes;if(l===0)return 0;var f=0,m=t.suspendedLanes,E=t.pingedLanes;t=t.warmLanes;var P=l&134217727;return P!==0?(l=P&~m,l!==0?f=qe(l):(E&=P,E!==0?f=qe(E):i||(i=P&~t,i!==0&&(f=qe(i))))):(P=l&~m,P!==0?f=qe(P):E!==0?f=qe(E):i||(i=l&~t,i!==0&&(f=qe(i)))),f===0?0:r!==0&&r!==f&&(r&m)===0&&(m=f&-f,i=r&-r,m>=i||m===32&&(i&4194048)!==0)?r:f}function Xe(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function $e(t,r){(r&8)!==0&&(r|=r&32);var i=t.entangledLanes;if(i!==0)for(t=t.entanglements,i&=r;0<i;){var l=31-et(i),f=1<<l;r|=t[l],i&=~f}return r}function st(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 tt(){var t=xe;return xe<<=1,(xe&62914560)===0&&(xe=4194304),t}function St(t){for(var r=[],i=0;31>i;i++)r.push(t);return r}function ct(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Bt(t,r,i,l,f,m){var E=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var P=t.entanglements,Q=t.expirationTimes,ie=t.hiddenUpdates;for(i=E&~i;0<i;){var pe=31-et(i),Ce=1<<pe;P[pe]=0,Q[pe]=-1;var ae=ie[pe];if(ae!==null)for(ie[pe]=null,pe=0;pe<ae.length;pe++){var fe=ae[pe];fe!==null&&(fe.lane&=-536870913)}i&=~Ce}l!==0&&Ht(t,l,0),m!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=m&~(E&~r))}function Ht(t,r,i){t.pendingLanes|=r,t.suspendedLanes&=~r;var l=31-et(r);t.entangledLanes|=r,t.entanglements[l]=t.entanglements[l]|1073741824|i&261930}function On(t,r){var i=t.entangledLanes|=r;for(t=t.entanglements;i;){var l=31-et(i),f=1<<l;f&r|t[l]&r&&(t[l]|=r),i&=~f}}function Vt(t,r){var i=r&-r;return i=(i&42)!==0?1:Ut(i),(i&(t.suspendedLanes|r))!==0?0:i}function Ut(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 En(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Cn(){var t=ce.p;return t!==0?t:(t=window.event,t===void 0?32:tS(t.type))}function Xr(t,r){var i=ce.p;try{return ce.p=t,r()}finally{ce.p=i}}var cn=Math.random().toString(36).slice(2),dn="__reactFiber$"+cn,Mn="__reactProps$"+cn,In="__reactContainer$"+cn,vo="__reactEvents$"+cn,Or="__reactListeners$"+cn,ja="__reactHandles$"+cn,Qr="__reactResources$"+cn,pa="__reactMarker$"+cn,kt="__reactLoad$"+cn;function Yn(t){delete t[dn],delete t[Mn],delete t[Or],delete t[ja]}function Fn(t){var r;if(r=t[dn])return r;for(var i=t.parentNode;i;){if(r=i[In]||i[dn]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(t=P1(t);t!==null;){if(i=t[dn])return i;t=P1(t)}return r}t=i,i=t.parentNode}return null}function fr(t){if(t=t[dn]||t[In]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function he(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(o(33))}function Ae(t){var r=t[Qr];return r||(r=t[Qr]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Se(t){t[pa]=!0}function nt(t){t[kt]=void 0}var Ct=new Set,wt={};function zt(t,r){vn(t,r),vn(t+"Capture",r)}function vn(t,r){for(wt[t]=r,t=0;t<r.length;t++)Ct.add(r[t])}var fn=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]*$"),mt={},At={};function an(t){return Dt.call(At,t)?!0:Dt.call(mt,t)?!1:fn.test(t)?At[t]=!0:(mt[t]=!0,!1)}var pt=!1;function nr(){var t=pt;return pt=!1,t}function Ln(t,r,i){if(an(r))if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,i)}}function Zr(t,r,i){if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,i)}}function Gn(t,r,i,l){if(l===null)t.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(r,i,l)}}function $n(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Os(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Zl(t,r,i){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,m=l.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return f.call(this)},set:function(E){i=""+E,m.call(this,E)}}),Object.defineProperty(t,r,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(E){i=""+E},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function bo(t){if(!t._valueTracker){var r=Os(t)?"checked":"value";t._valueTracker=Zl(t,r,""+t[r])}}function Ms(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),l="";return t&&(l=Os(t)?t.checked?"true":"false":t.value),t=l,t!==i?(r.setValue(t),!0):!1}var Jc=/[\n"\\]/g;function Nn(t){return t.replace(Jc,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function wr(t,r,i,l,f,m,E,P){t.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.type=E:t.removeAttribute("type"),r!=null?E==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+$n(r)):t.value!==""+$n(r)&&(t.value=""+$n(r)):E!=="submit"&&E!=="reset"||t.removeAttribute("value"),r!=null?E==="number"&&t.value==r?As(t,$n(t.value)):As(t,$n(r)):i!=null?As(t,$n(i)):l!=null&&t.removeAttribute("value"),f==null&&m!=null&&(t.defaultChecked=!!m),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?t.name=""+$n(P):t.removeAttribute("name")}function Yo(t,r,i,l,f,m,E,P){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),r!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){bo(t);return}i=i!=null?""+$n(i):"",r=r!=null?""+$n(r):i,P||r===t.value||(t.value=r),t.defaultValue=r}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=P?t.checked:!!l,t.defaultChecked=!!l,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(t.name=E),bo(t)}function As(t,r){t.defaultValue!==""+r&&(t.defaultValue=""+r)}function Hr(t,r,i,l){if(t=t.options,r){r={};for(var f=0;f<i.length;f++)r["$"+i[f]]=!0;for(i=0;i<t.length;i++)f=r.hasOwnProperty("$"+t[i].value),t[i].selected!==f&&(t[i].selected=f),f&&l&&(t[i].defaultSelected=!0)}else{for(i=""+$n(i),r=null,f=0;f<t.length;f++){if(t[f].value===i){t[f].selected=!0,l&&(t[f].defaultSelected=!0);return}r!==null||t[f].disabled||(r=t[f])}r!==null&&(r.selected=!0)}}function Ds(t,r,i){if(r!=null&&(r=""+$n(r),r!==t.value&&(t.value=r),i==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=i!=null?""+$n(i):""}function Jr(t,r,i,l){if(r==null){if(l!=null){if(i!=null)throw Error(o(92));if(me(l)){if(1<l.length)throw Error(o(93));l=l[0]}i=l}i==null&&(i=""),r=i}i=$n(r),t.defaultValue=i,l=t.textContent,l===i&&l!==""&&l!==null&&(t.value=l),bo(t)}function Mr(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var Ko=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 Jl(t,r,i){var l=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":l?t.setProperty(r,i):typeof i!="number"||i===0||Ko.has(r)?r==="float"?t.cssFloat=i:t[r]=(""+i).trim():t[r]=i+"px"}function Wr(t,r,i){if(r!=null&&typeof r!="object")throw Error(o(62));if(t=t.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="",pt=!0);for(var f in r)l=r[f],r.hasOwnProperty(f)&&i[f]!==l&&(Jl(t,f,l),pt=!0)}else for(var m in r)r.hasOwnProperty(m)&&Jl(t,m,r[m])}function ki(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 Wl=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"],["maskType","mask-type"],["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"]]),eu=/^[\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 hr(t){return eu.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ar(){}var Pi=null;function Li(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var en=null,or=null;function ga(t){var r=fr(t);if(r&&(t=r.stateNode)){var i=t[Mn]||null;e:switch(t=r.stateNode,r.type){case"input":if(wr(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Nn(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var l=i[r];if(l!==t&&l.form===t.form){var f=l[Mn]||null;if(!f)throw Error(o(90));wr(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<i.length;r++)l=i[r],l.form===t.form&&Ms(l)}break e;case"textarea":Ds(t,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&Hr(t,!!i.multiple,r,!1)}}}var ea=!1;function zi(t,r,i){if(ea)return t(r,i);ea=!0;try{var l=t(r);return l}finally{if(ea=!1,(en!==null||or!==null)&&(Jd(),en&&(r=en,t=or,or=en=null,ga(r),t)))for(r=0;r<t.length;r++)ga(t[r])}}function xo(t,r){var i=t.stateNode;if(i===null)return null;var l=i[Mn]||null;if(l===null)return null;i=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(o(231,r,typeof i));return i}var pr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_i=!1;if(pr)try{var tu={};Object.defineProperty(tu,"passive",{get:function(){_i=!0}}),window.addEventListener("test",tu,tu),window.removeEventListener("test",tu,tu)}catch{_i=!1}var Go=null,qp=null,Wc=null;function hb(){if(Wc)return Wc;var t,r=qp,i=r.length,l,f="value"in Go?Go.value:Go.textContent,m=f.length;for(t=0;t<i&&r[t]===f[t];t++);var E=i-t;for(l=1;l<=E&&r[i-l]===f[m-l];l++);return Wc=f.slice(t,1<l?1-l:void 0)}function ed(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function td(){return!0}function pb(){return!1}function Dr(t){function r(i,l,f,m,E){this._reactName=i,this._targetInst=f,this.type=l,this.nativeEvent=m,this.target=E,this.currentTarget=null;for(var P in t)t.hasOwnProperty(P)&&(i=t[P],this[P]=i?i(m):m[P]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?td:pb,this.isPropagationStopped=pb,this}return k(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=td)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=td)},persist:function(){},isPersistent:td}),r}var $o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nd=Dr($o),nu=k({},$o,{view:0,detail:0}),cA=Dr(nu),Yp,Kp,ru,rd=k({},nu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$p,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!==ru&&(ru&&t.type==="mousemove"?(Yp=t.screenX-ru.screenX,Kp=t.screenY-ru.screenY):Kp=Yp=0,ru=t),Yp)},movementY:function(t){return"movementY"in t?t.movementY:Kp}}),gb=Dr(rd),dA=k({},rd,{dataTransfer:0}),fA=Dr(dA),hA=k({},nu,{relatedTarget:0}),Gp=Dr(hA),pA=k({},$o,{animationName:0,elapsedTime:0,pseudoElement:0}),gA=Dr(pA),mA=k({},$o,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),yA=Dr(mA),vA=k({},$o,{data:0}),mb=Dr(vA),bA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xA={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"},SA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wA(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=SA[t])?!!r[t]:!1}function $p(){return wA}var RA=k({},nu,{key:function(t){if(t.key){var r=bA[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=ed(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?xA[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$p,charCode:function(t){return t.type==="keypress"?ed(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ed(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),EA=Dr(RA),CA=k({},rd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yb=Dr(CA),TA=k({},$o,{submitter:0}),OA=Dr(TA),MA=k({},nu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$p}),AA=Dr(MA),DA=k({},$o,{propertyName:0,elapsedTime:0,pseudoElement:0}),NA=Dr(DA),IA=k({},rd,{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}),jA=Dr(IA),kA=k({},$o,{newState:0,oldState:0,source:0}),PA=Dr(kA),LA=[9,13,27,32],Xp=pr&&"CompositionEvent"in window,au=null;pr&&"documentMode"in document&&(au=document.documentMode);var zA=pr&&"TextEvent"in window&&!au,vb=pr&&(!Xp||au&&8<au&&11>=au),bb=" ",xb=!1;function Sb(t,r){switch(t){case"keyup":return LA.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wb(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ns=!1;function _A(t,r){switch(t){case"compositionend":return wb(r);case"keypress":return r.which!==32?null:(xb=!0,bb);case"textInput":return t=r.data,t===bb&&xb?null:t;default:return null}}function HA(t,r){if(Ns)return t==="compositionend"||!Xp&&Sb(t,r)?(t=hb(),Wc=qp=Go=null,Ns=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return vb&&r.locale!=="ko"?null:r.data;default:return null}}var UA={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 Rb(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!UA[t.type]:r==="textarea"}function Eb(t,r,i,l){en?or?or.push(l):or=[l]:en=l,r=af(r,"onChange"),0<r.length&&(i=new nd("onChange","change",null,i,l),t.push({event:i,listeners:r}))}var ou=null,iu=null;function FA(t){d1(t,0)}function ad(t){var r=he(t);if(Ms(r))return t}function Cb(t,r){if(t==="change")return r}var Tb=!1;if(pr){var Qp;if(pr){var Zp="oninput"in document;if(!Zp){var Ob=document.createElement("div");Ob.setAttribute("oninput","return;"),Zp=typeof Ob.oninput=="function"}Qp=Zp}else Qp=!1;Tb=Qp&&(!document.documentMode||9<document.documentMode)}function Mb(){ou&&(ou.detachEvent("onpropertychange",Ab),iu=ou=null)}function Ab(t){if(t.propertyName==="value"&&ad(iu)){var r=[];Eb(r,iu,t,Li(t)),zi(FA,r)}}function BA(t,r,i){t==="focusin"?(Mb(),ou=r,iu=i,ou.attachEvent("onpropertychange",Ab)):t==="focusout"&&Mb()}function VA(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ad(iu)}function qA(t,r){if(t==="click")return ad(r)}function YA(t,r){if(t==="input"||t==="change")return ad(r)}function KA(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var ta=typeof Object.is=="function"?Object.is:KA;function su(t,r){if(ta(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var i=Object.keys(t),l=Object.keys(r);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var f=i[l];if(!Dt.call(r,f)||!ta(t[f],r[f]))return!1}return!0}function Jp(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}}function Db(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Nb(t,r){var i=Db(t);t=0;for(var l;i;){if(i.nodeType===3){if(l=t+i.textContent.length,t<=r&&l>=r)return{node:i,offset:r-t};t=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Db(i)}}function Ib(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Ib(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function jb(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=Jp(t.document);r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=Jp(t.document)}return r}function Wp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var GA=pr&&"documentMode"in document&&11>=document.documentMode,Is=null,eg=null,lu=null,tg=!1;function kb(t,r,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;tg||Is==null||Is!==Jp(l)||(l=Is,"selectionStart"in l&&Wp(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),lu&&su(lu,l)||(lu=l,l=af(eg,"onSelect"),0<l.length&&(r=new nd("onSelect","select",null,r,i),t.push({event:r,listeners:l}),r.target=Is)))}function Hi(t,r){var i={};return i[t.toLowerCase()]=r.toLowerCase(),i["Webkit"+t]="webkit"+r,i["Moz"+t]="moz"+r,i}var js={animationend:Hi("Animation","AnimationEnd"),animationiteration:Hi("Animation","AnimationIteration"),animationstart:Hi("Animation","AnimationStart"),transitionrun:Hi("Transition","TransitionRun"),transitionstart:Hi("Transition","TransitionStart"),transitioncancel:Hi("Transition","TransitionCancel"),transitionend:Hi("Transition","TransitionEnd")},ng={},Pb={};pr&&(Pb=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function Ui(t){if(ng[t])return ng[t];if(!js[t])return t;var r=js[t],i;for(i in r)if(r.hasOwnProperty(i)&&i in Pb)return ng[t]=r[i];return t}var Lb=Ui("animationend"),zb=Ui("animationiteration"),_b=Ui("animationstart"),$A=Ui("transitionrun"),XA=Ui("transitionstart"),QA=Ui("transitioncancel"),Hb=Ui("transitionend"),Ub=new Map,rg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");rg.push("scrollEnd");function ka(t,r){Ub.set(t,r),zt(r,[t])}var ZA=0;function So(t,r){if(t.name!=null&&t.name!=="auto")return t.name;if(r.autoName!==null)return r.autoName;t=_a.identifierPrefix;var i=ZA++;return t="_"+t+"t_"+i.toString(32)+"_",r.autoName=t}function Fb(t){if(t==null||typeof t=="string")return t;var r=null,i=Ws;if(i!==null)for(var l=0;l<i.length;l++){var f=t[i[l]];if(f!=null){if(f==="none")return"none";r=r==null?f:r+(" "+f)}}return r??t.default}function wo(t,r){return t=Fb(t),r=Fb(r),r==null?t==="auto"?null:t:r==="auto"?null:r}var od=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=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(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},ma=[],ks=0,ag=0;function id(){for(var t=ks,r=ag=ks=0;r<t;){var i=ma[r];ma[r++]=null;var l=ma[r];ma[r++]=null;var f=ma[r];ma[r++]=null;var m=ma[r];if(ma[r++]=null,l!==null&&f!==null){var E=l.pending;E===null?f.next=f:(f.next=E.next,E.next=f),l.pending=f}m!==0&&Bb(i,f,m)}}function sd(t,r,i,l){ma[ks++]=t,ma[ks++]=r,ma[ks++]=i,ma[ks++]=l,ag|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function og(t,r,i,l){return sd(t,r,i,l),ld(t)}function Fi(t,r){return sd(t,null,null,r),ld(t)}function Bb(t,r,i){t.lanes|=i;var l=t.alternate;l!==null&&(l.lanes|=i);for(var f=!1,m=t.return;m!==null;)m.childLanes|=i,l=m.alternate,l!==null&&(l.childLanes|=i),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(f=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,f&&r!==null&&(f=31-et(i),t=m.hiddenUpdates,l=t[f],l===null?t[f]=[r]:l.push(r),r.lane=i|536870912),m):null}function ld(t){if(50<Du)throw Du=0,Zd=null,Error(o(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Ps={};function JA(t,r,i,l){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ur(t,r,i,l){return new JA(t,r,i,l)}function ig(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ro(t,r){var i=t.alternate;return i===null?(i=Ur(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&1206910976,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function Vb(t,r){t.flags&=1206910978;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,r=i.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function ud(t,r,i,l,f,m){var E=0;if(l=t,typeof l=="function")ig(l)&&(E=1);else if(typeof l=="string")E=TN(t,i,Oe.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(l){case ee:return t=Ur(31,i,r,f),t.elementType=ee,t.lanes=m,t;case G:return Bi(i.children,f,m,r);case J:E=8,f|=24;break;case Y:return t=Ur(12,i,r,f|2),t.elementType=Y,t.lanes=m,t;case $:return t=Ur(13,i,r,f),t.elementType=$,t.lanes=m,t;case K:return t=Ur(19,i,r,f),t.elementType=K,t.lanes=m,t;case q:case N:return t=f|32,t=Ur(30,i,r,t),t.elementType=N,t.lanes=m,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case _:E=10;break e;case U:E=9;break e;case L:E=11;break e;case V:E=14;break e;case X:E=16,l=null;break e}E=29,i=Error(o(130,t===null?"null":typeof t,"")),l=null}return r=Ur(E,i,r,f),r.elementType=t,r.type=l,r.lanes=m,r}function Bi(t,r,i,l){return t=Ur(7,t,l,r),t.lanes=i,t}function sg(t,r,i){return t=Ur(6,t,null,r),t.lanes=i,t}function qb(t){var r=Ur(18,null,null,0);return r.stateNode=t,r}function lg(t,r,i){return r=Ur(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Yb=new WeakMap;function ya(t,r){if(typeof t=="object"&&t!==null){var i=Yb.get(t);return i!==void 0?i:(r={value:t,source:r,stack:Ot(r)},Yb.set(t,r),r)}return{value:t,source:r,stack:Ot(r)}}var Ls=[],zs=0,cd=null,uu=0,va=[],ba=0,Xo=null,$a=1,Xa="";function Eo(t,r){Ls[zs++]=uu,Ls[zs++]=cd,cd=t,uu=r}function Kb(t,r,i){va[ba++]=$a,va[ba++]=Xa,va[ba++]=Xo,Xo=t;var l=$a;t=Xa;var f=32-et(l)-1;l&=~(1<<f),i+=1;var m=32-et(r)+f;if(30<m){var E=f-f%5;m=(l&(1<<E)-1).toString(32),l>>=E,f-=E,$a=1<<32-et(r)+f|i<<f|l,Xa=m+t}else $a=1<<m|i<<f|l,Xa=t}function dd(t){t.return!==null&&(Eo(t,1),Kb(t,1,0))}function ug(t){for(;t===cd;)cd=Ls[--zs],Ls[zs]=null,uu=Ls[--zs],Ls[zs]=null;for(;t===Xo;)Xo=va[--ba],va[ba]=null,Xa=va[--ba],va[ba]=null,$a=va[--ba],va[ba]=null}function Gb(t,r){va[ba++]=$a,va[ba++]=Xa,va[ba++]=Xo,$a=r.id,Xa=r.overflow,Xo=t}var ir=null,An=null,Ft=!1,Qo=null,xa=!1,cg=Error(o(519));function Zo(t){var r=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cu(ya(r,t)),cg}function $b(t){var r=t.stateNode,i=t.type,l=t.memoizedProps;switch(r[dn]=t,r[Mn]=l,i){case"dialog":Yt("cancel",r),Yt("close",r);break;case"iframe":case"object":case"embed":Yt("load",r);break;case"video":case"audio":for(i=0;i<Iu.length;i++)Yt(Iu[i],r);break;case"source":Yt("error",r);break;case"img":case"image":case"link":Yt("error",r),Yt("load",r);break;case"details":Yt("toggle",r);break;case"input":Yt("invalid",r),Yo(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Yt("invalid",r);break;case"textarea":Yt("invalid",r),Jr(r,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||l.suppressHydrationWarning===!0||g1(r.textContent,i)?(l.popover!=null&&(Yt("beforetoggle",r),Yt("toggle",r)),l.onScroll!=null&&Yt("scroll",r),l.onScrollEnd!=null&&Yt("scrollend",r),l.onClick!=null&&(r.onclick=Ar),r=!0):r=!1,r||Zo(t,!0)}function fd(t){for(ir=t.return;ir;)switch(ir.tag){case 5:case 31:case 13:xa=!1;return;case 27:case 3:xa=!0;return;default:ir=ir.return}}function _s(t){if(t!==ir)return!1;if(!Ft)return fd(t),Ft=!0,!1;var r=t.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||Um(t.type,t.memoizedProps)),i=!i),i&&An&&Zo(t),fd(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));An=k1(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));An=k1(t)}else r===27?(r=An,hi(t.type)?(t=Xm,Xm=null,An=t):An=r):An=ir?wa(t.stateNode.nextSibling):null;return!0}function Vi(){An=ir=null,Ft=!1}function dg(){var t=Qo;return t!==null&&(Vr===null?Vr=t:Vr.push.apply(Vr,t),Qo=null),t}function cu(t){Qo===null?Qo=[t]:Qo.push(t)}var fg=Me(null),qi=null,Co=null;function Jo(t,r,i){Fe(fg,r._currentValue),r._currentValue=i}function To(t){t._currentValue=fg.current,Le(fg)}function hd(t,r,i){for(;t!==null;){var l=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),t===i)break;t=t.return}}function hg(t,r,i,l){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var m=f.dependencies;if(m!==null){var E=f.child;m=m.firstContext;e:for(;m!==null;){var P=m;m=f;for(var Q=0;Q<r.length;Q++)if(P.context===r[Q]){m.lanes|=i,P=m.alternate,P!==null&&(P.lanes|=i),hd(m.return,i,t),l||(E=null);break e}m=P.next}}else if(f.tag===18){if(E=f.return,E===null)throw Error(o(341));E.lanes|=i,m=E.alternate,m!==null&&(m.lanes|=i),hd(E,i,t),E=null}else f.tag===13&&f.memoizedState!==null&&f.memoizedState.dehydrated===null?(f.lanes|=i,E=f.alternate,E!==null&&(E.lanes|=i),hd(f.return,i,t),E=f.child,E=E!==null?E.sibling:null):E=f.child;if(E!==null)E.return=f;else for(E=f;E!==null;){if(E===t){E=null;break}if(f=E.sibling,f!==null){f.return=E.return,E=f;break}E=E.return}f=E}}function Yi(t,r,i,l){t=null;for(var f=r,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var E=f.alternate;if(E===null)throw Error(o(387));if(E=E.memoizedProps,E!==null){var P=f.type;ta(f.pendingProps.value,E.value)||(t!==null?t.push(P):t=[P])}}else if(f===Ue.current){if(E=f.alternate,E===null)throw Error(o(387));E.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(ul):t=[ul])}f=f.return}return t!==null&&hg(r,t,i,l),r.flags|=262144,t!==null}function pd(t){for(t=t.firstContext;t!==null;){if(!ta(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ki(t){qi=t,Co=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function gr(t){return Xb(qi,t)}function gd(t,r){return qi===null&&Ki(t),Xb(t,r)}function Xb(t,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},Co===null){if(t===null)throw Error(o(308));Co=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Co=Co.next=r;return i}var WA=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(i,l){t.push(l)}};this.abort=function(){r.aborted=!0,t.forEach(function(i){return i()})}},eD=e.unstable_scheduleCallback,tD=e.unstable_NormalPriority,Xn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pg(){return{controller:new WA,data:new Map,refCount:0}}function du(t){t.refCount--,t.refCount===0&&eD(tD,function(){t.controller.abort()})}function Qb(t,r){if((t.pendingLanes&4194048)!==0){var i=t.transitionTypes;for(i===null&&(i=t.transitionTypes=[]),t=0;t<r.length;t++){var l=r[t];i.indexOf(l)===-1&&i.push(l)}}}var fu=null;function nD(t){var r=t.transitionTypes;return t.transitionTypes=null,r}var hu=null,gg=0,Gi=0,Hs=null;function rD(t,r){if(hu===null){var i=hu=[];gg=0,Gi=Nm(),Hs={status:"pending",value:void 0,then:function(l){i.push(l)}}}return gg++,r.then(Zb,Zb),r}function Zb(){if(--gg===0&&(fu=null,hu!==null)){Hs!==null&&(Hs.status="fulfilled");var t=hu;hu=null,Gi=0,Hs=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function aD(t,r){var i=[],l={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return t.then(function(){l.status="fulfilled",l.value=r;for(var f=0;f<i.length;f++)(0,i[f])(r)},function(f){for(l.status="rejected",l.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),l}var Jb=ge.S;ge.S=function(t,r){if(q2=xt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&rD(t,r),fu!==null)for(var i=rl;i!==null;)Qb(i,fu),i=i.next;if(i=t.types,i!==null){for(var l=rl;l!==null;)Qb(l,i),l=l.next;if(Gi!==0){l=fu,l===null&&(l=fu=[]);for(var f=0;f<i.length;f++){var m=i[f];l.indexOf(m)===-1&&l.push(m)}}}Jb!==null&&Jb(t,r)};var $i=Me(null);function mg(){var t=$i.current;return t!==null?t:Tn.pooledCache}function md(t,r){r===null?Fe($i,$i.current):Fe($i,r.pool)}function Wb(){var t=mg();return t===null?null:{parent:Xn._currentValue,pool:t}}var Us=Error(o(460)),yg=Error(o(474)),yd=Error(o(542)),vd={then:function(){}};function ex(t){return t=t.status,t==="fulfilled"||t==="rejected"}function tx(t,r,i){switch(i=t[i],i===void 0?t.push(r):i!==r&&(r.then(Ar,Ar),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,rx(t),t===void 0&&!("reason"in r)?Error(o(600)):t;default:if(typeof r.status=="string")r.then(Ar,Ar);else{if(t=Tn,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=r,t.status="pending",t.then(function(l){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=l}},function(l){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,rx(t),t}throw Qi=r,Us}}function Xi(t){try{var r=t._init;return r(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Qi=i,Us):i}}var Qi=null;function nx(){if(Qi===null)throw Error(o(459));var t=Qi;return Qi=null,t}function rx(t){if(t===Us||t===yd)throw Error(o(483))}var Fs=null,pu=0;function bd(t){var r=pu;return pu+=1,Fs===null&&(Fs=[]),tx(Fs,t,r)}function Wo(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function xd(t,r){throw r.$$typeof===D?Error(o(525)):(t=Object.prototype.toString.call(r),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function ax(t){function r(oe,te){if(t){var ue=oe.deletions;ue===null?(oe.deletions=[te],oe.flags|=16):ue.push(te)}}function i(oe,te){if(!t)return null;for(;te!==null;)r(oe,te),te=te.sibling;return null}function l(oe){for(var te=new Map;oe!==null;)oe.key===null?te.set(oe.index,oe):te.set(oe.key,oe),oe=oe.sibling;return te}function f(oe,te){return oe=Ro(oe,te),oe.index=0,oe.sibling=null,oe}function m(oe,te,ue){return oe.index=ue,t?(ue=oe.alternate,ue!==null?(ue=ue.index,ue<te?(oe.flags|=2,te):ue):(oe.flags|=134217730,te)):(oe.flags|=1048576,te)}function E(oe){return t&&oe.alternate===null&&(oe.flags|=134217730),oe}function P(oe,te,ue,Ee){return te===null||te.tag!==6?(te=sg(ue,oe.mode,Ee),te.return=oe,te):(te=f(te,ue),te.return=oe,te)}function Q(oe,te,ue,Ee){var Je=ue.type;return Je===G?(oe=pe(oe,te,ue.props.children,Ee,ue.key),Wo(oe,ue),oe):te!==null&&(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===X&&Xi(Je)===te.type)?(te=f(te,ue.props),Wo(te,ue),te.return=oe,te):(te=ud(ue.type,ue.key,ue.props,null,oe.mode,Ee),Wo(te,ue),te.return=oe,te)}function ie(oe,te,ue,Ee){return te===null||te.tag!==4||te.stateNode.containerInfo!==ue.containerInfo||te.stateNode.implementation!==ue.implementation?(te=lg(ue,oe.mode,Ee),te.return=oe,te):(te=f(te,ue.children||[]),te.return=oe,te)}function pe(oe,te,ue,Ee,Je){return te===null||te.tag!==7?(te=Bi(ue,oe.mode,Ee,Je),te.return=oe,te):(te=f(te,ue),te.return=oe,te)}function Ce(oe,te,ue){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=sg(""+te,oe.mode,ue),te.return=oe,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case z:return ue=ud(te.type,te.key,te.props,null,oe.mode,ue),Wo(ue,te),ue.return=oe,ue;case F:return te=lg(te,oe.mode,ue),te.return=oe,te;case X:return te=Xi(te),Ce(oe,te,ue)}if(me(te)||re(te))return te=Bi(te,oe.mode,ue,null),te.return=oe,te;if(typeof te.then=="function")return Ce(oe,bd(te),ue);if(te.$$typeof===_)return Ce(oe,gd(oe,te),ue);xd(oe,te)}return null}function ae(oe,te,ue,Ee){var Je=te!==null?te.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Je!==null?null:P(oe,te,""+ue,Ee);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case z:return ue.key===Je?Q(oe,te,ue,Ee):null;case F:return ue.key===Je?ie(oe,te,ue,Ee):null;case X:return ue=Xi(ue),ae(oe,te,ue,Ee)}if(me(ue)||re(ue))return Je!==null?null:pe(oe,te,ue,Ee,null);if(typeof ue.then=="function")return ae(oe,te,bd(ue),Ee);if(ue.$$typeof===_)return ae(oe,te,gd(oe,ue),Ee);xd(oe,ue)}return null}function fe(oe,te,ue,Ee,Je){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return oe=oe.get(ue)||null,P(te,oe,""+Ee,Je);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case z:return oe=oe.get(Ee.key===null?ue:Ee.key)||null,Q(te,oe,Ee,Je);case F:return oe=oe.get(Ee.key===null?ue:Ee.key)||null,ie(te,oe,Ee,Je);case X:return Ee=Xi(Ee),fe(oe,te,ue,Ee,Je)}if(me(Ee)||re(Ee))return oe=oe.get(ue)||null,pe(te,oe,Ee,Je,null);if(typeof Ee.then=="function")return fe(oe,te,ue,bd(Ee),Je);if(Ee.$$typeof===_)return fe(oe,te,ue,gd(te,Ee),Je);xd(te,Ee)}return null}function Ye(oe,te,ue,Ee){for(var Je=null,Qt=null,lt=te,bt=te=0,Jn=null;lt!==null&&bt<ue.length;bt++){lt.index>bt?(Jn=lt,lt=null):Jn=lt.sibling;var tn=ae(oe,lt,ue[bt],Ee);if(tn===null){lt===null&&(lt=Jn);break}t&<&&tn.alternate===null&&r(oe,lt),te=m(tn,te,bt),Qt===null?Je=tn:Qt.sibling=tn,Qt=tn,lt=Jn}if(bt===ue.length)return i(oe,lt),Ft&&Eo(oe,bt),Je;if(lt===null){for(;bt<ue.length;bt++)lt=Ce(oe,ue[bt],Ee),lt!==null&&(te=m(lt,te,bt),Qt===null?Je=lt:Qt.sibling=lt,Qt=lt);return Ft&&Eo(oe,bt),Je}for(lt=l(lt);bt<ue.length;bt++)Jn=fe(lt,oe,bt,ue[bt],Ee),Jn!==null&&(t&&(tn=Jn.alternate,tn!==null&<.delete(tn.key===null?bt:tn.key)),te=m(Jn,te,bt),Qt===null?Je=Jn:Qt.sibling=Jn,Qt=Jn);return t&<.forEach(function(vi){return r(oe,vi)}),Ft&&Eo(oe,bt),Je}function rt(oe,te,ue,Ee){if(ue==null)throw Error(o(151));for(var Je=null,Qt=null,lt=te,bt=te=0,Jn=null,tn=ue.next();lt!==null&&!tn.done;bt++,tn=ue.next()){lt.index>bt?(Jn=lt,lt=null):Jn=lt.sibling;var vi=ae(oe,lt,tn.value,Ee);if(vi===null){lt===null&&(lt=Jn);break}t&<&&vi.alternate===null&&r(oe,lt),te=m(vi,te,bt),Qt===null?Je=vi:Qt.sibling=vi,Qt=vi,lt=Jn}if(tn.done)return i(oe,lt),Ft&&Eo(oe,bt),Je;if(lt===null){for(;!tn.done;bt++,tn=ue.next())tn=Ce(oe,tn.value,Ee),tn!==null&&(te=m(tn,te,bt),Qt===null?Je=tn:Qt.sibling=tn,Qt=tn);return Ft&&Eo(oe,bt),Je}for(lt=l(lt);!tn.done;bt++,tn=ue.next())tn=fe(lt,oe,bt,tn.value,Ee),tn!==null&&(t&&(Jn=tn.alternate,Jn!==null&<.delete(Jn.key===null?bt:Jn.key)),te=m(tn,te,bt),Qt===null?Je=tn:Qt.sibling=tn,Qt=tn);return t&<.forEach(function(_N){return r(oe,_N)}),Ft&&Eo(oe,bt),Je}function It(oe,te,ue,Ee){if(typeof ue=="object"&&ue!==null&&ue.type===G&&ue.key===null&&ue.props.ref===void 0&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case z:e:{for(var Je=ue.key;te!==null;){if(te.key===Je){if(Je=ue.type,Je===G){if(te.tag===7){i(oe,te.sibling),Ee=f(te,ue.props.children),Wo(Ee,ue),Ee.return=oe,oe=Ee;break e}}else if(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===X&&Xi(Je)===te.type){i(oe,te.sibling),Ee=f(te,ue.props),Wo(Ee,ue),Ee.return=oe,oe=Ee;break e}i(oe,te);break}else r(oe,te);te=te.sibling}ue.type===G?(Ee=Bi(ue.props.children,oe.mode,Ee,ue.key),Wo(Ee,ue),Ee.return=oe,oe=Ee):(Ee=ud(ue.type,ue.key,ue.props,null,oe.mode,Ee),Wo(Ee,ue),Ee.return=oe,oe=Ee)}return E(oe);case F:e:{for(Je=ue.key;te!==null;){if(te.key===Je)if(te.tag===4&&te.stateNode.containerInfo===ue.containerInfo&&te.stateNode.implementation===ue.implementation){i(oe,te.sibling),Ee=f(te,ue.children||[]),Ee.return=oe,oe=Ee;break e}else{i(oe,te);break}else r(oe,te);te=te.sibling}Ee=lg(ue,oe.mode,Ee),Ee.return=oe,oe=Ee}return E(oe);case X:return ue=Xi(ue),It(oe,te,ue,Ee)}if(me(ue))return Ye(oe,te,ue,Ee);if(re(ue)){if(Je=re(ue),typeof Je!="function")throw Error(o(150));return ue=Je.call(ue),rt(oe,te,ue,Ee)}if(typeof ue.then=="function")return It(oe,te,bd(ue),Ee);if(ue.$$typeof===_)return It(oe,te,gd(oe,ue),Ee);xd(oe,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,te!==null&&te.tag===6?(i(oe,te.sibling),Ee=f(te,ue),Ee.return=oe,oe=Ee):(i(oe,te),Ee=sg(ue,oe.mode,Ee),Ee.return=oe,oe=Ee),E(oe)):i(oe,te)}return function(oe,te,ue,Ee){try{pu=0;var Je=It(oe,te,ue,Ee);return Fs=null,Je}catch(lt){if(lt===Us||lt===yd)throw lt;var Qt=Ur(29,lt,null,oe.mode);return Qt.lanes=Ee,Qt.return=oe,Qt}}}var Zi=ax(!0),ox=ax(!1),ei=!1;function vg(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bg(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ti(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ni(t,r,i){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(ln&2)!==0){var f=l.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),l.pending=r,r=ld(t),Bb(t,null,i),r}return sd(t,l,r,i),ld(t)}function gu(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var l=r.lanes;l&=t.pendingLanes,i|=l,r.lanes=i,On(t,i)}}function xg(t,r){var i=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var f=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var E={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?f=m=E:m=m.next=E,i=i.next}while(i!==null);m===null?f=m=r:m=m.next=r}else f=m=r;i={baseState:l.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}var Sg=!1;function mu(){if(Sg){var t=Hs;if(t!==null)throw t}}function yu(t,r,i,l){Sg=!1;var f=t.updateQueue;ei=!1;var m=f.firstBaseUpdate,E=f.lastBaseUpdate,P=f.shared.pending;if(P!==null){f.shared.pending=null;var Q=P,ie=Q.next;Q.next=null,E===null?m=ie:E.next=ie,E=Q;var pe=t.alternate;pe!==null&&(pe=pe.updateQueue,P=pe.lastBaseUpdate,P!==E&&(P===null?pe.firstBaseUpdate=ie:P.next=ie,pe.lastBaseUpdate=Q))}if(m!==null){var Ce=f.baseState;E=0,pe=ie=Q=null,P=m;do{var ae=P.lane&-536870913,fe=ae!==P.lane;if(fe?(Xt&ae)===ae:(l&ae)===ae){ae!==0&&ae===Gi&&(Sg=!0),pe!==null&&(pe=pe.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Ye=t,rt=P;ae=r;var It=i;switch(rt.tag){case 1:if(Ye=rt.payload,typeof Ye=="function"){Ce=Ye.call(It,Ce,ae);break e}Ce=Ye;break e;case 3:Ye.flags=Ye.flags&-65537|128;case 0:if(Ye=rt.payload,ae=typeof Ye=="function"?Ye.call(It,Ce,ae):Ye,ae==null)break e;Ce=k({},Ce,ae);break e;case 2:ei=!0}}ae=P.callback,ae!==null&&(t.flags|=64,fe&&(t.flags|=8192),fe=f.callbacks,fe===null?f.callbacks=[ae]:fe.push(ae))}else fe={lane:ae,tag:P.tag,payload:P.payload,callback:P.callback,next:null},pe===null?(ie=pe=fe,Q=Ce):pe=pe.next=fe,E|=ae;if(P=P.next,P===null){if(P=f.shared.pending,P===null)break;fe=P,P=fe.next,fe.next=null,f.lastBaseUpdate=fe,f.shared.pending=null}}while(!0);pe===null&&(Q=Ce),f.baseState=Q,f.firstBaseUpdate=ie,f.lastBaseUpdate=pe,m===null&&(f.shared.lanes=0),ui|=E,t.lanes=E,t.memoizedState=Ce}}function ix(t,r){if(typeof t!="function")throw Error(o(191,t));t.call(r)}function sx(t,r){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)ix(i[t],r)}var ri=Me(null),Sd=Me(0);function lx(t,r){t=No,Fe(Sd,t),Fe(ri,r),No=t|r.baseLanes}function wg(){Fe(Sd,No),Fe(ri,ri.current)}function Rg(){No=Sd.current,Le(ri),Le(Sd)}var mr=Me(null),Rr=null;function ai(t){var r=t.alternate;Fe(yr,yr.current&1),Fe(mr,t),Rr===null&&(r===null||ri.current!==null||r.memoizedState!==null)&&(Rr=t)}function Eg(t){Fe(yr,yr.current),Fe(mr,t),Rr===null&&(Rr=t)}function ux(t){t.tag===22?(Fe(yr,yr.current),Fe(mr,t),Rr===null&&(Rr=t)):oi()}function oi(){Fe(yr,yr.current),Fe(mr,mr.current)}function na(t){Le(mr),Rr===t&&(Rr=null),Le(yr)}var yr=Me(0);function vu(t,r){Fe(mr,mr.current),Fe(yr,r)}function Cg(t){Le(yr),Le(mr),Rr===t&&(Rr=null)}function wd(t){for(var r=t;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Gm(i)||$m(i)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!=="independent"){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Oo=0,Nt=null,bn=null,Qn=null,Rd=!1,Bs=!1,Ji=!1,Ed=0,bu=0,Vs=null,oD=0;function Bn(){throw Error(o(321))}function Tg(t,r){if(r===null)return!1;for(var i=0;i<r.length&&i<t.length;i++)if(!ta(t[i],r[i]))return!1;return!0}function Og(t,r,i,l,f,m){return Oo=m,Nt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,ge.H=t===null||t.memoizedState===null?Kx:Gx,Ji=!1,m=i(l,f),Ji=!1,Bs&&(m=dx(r,i,l,f)),cx(t),m}function cx(t){ge.H=Nd;var r=bn!==null&&bn.next!==null;if(Oo=0,Qn=bn=Nt=null,Rd=!1,bu=0,Vs=null,r)throw Error(o(300));t===null||Zn||(t=t.dependencies,t!==null&&pd(t)&&(Zn=!0))}function dx(t,r,i,l){Nt=t;var f=0;do{if(Bs&&(Vs=null),bu=0,Bs=!1,25<=f)throw Error(o(301));if(f+=1,Qn=bn=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}ge.H=hD,m=r(i,l)}while(Bs);return m}function iD(){var t=ge.H,r=t.useState()[0];return r=typeof r.then=="function"?xu(r):r,t=t.useState()[0],(bn!==null?bn.memoizedState:null)!==t&&(Nt.flags|=1024),r}function Mg(){var t=Ed!==0;return Ed=0,t}function Ag(t,r,i){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~i}function Dg(t){if(Rd){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Rd=!1}Oo=0,Qn=bn=Nt=null,Bs=!1,bu=Ed=0,Vs=null}function Nr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qn===null?Nt.memoizedState=Qn=t:Qn=Qn.next=t,Qn}function Kn(){if(bn===null){var t=Nt.alternate;t=t!==null?t.memoizedState:null}else t=bn.next;var r=Qn===null?Nt.memoizedState:Qn.next;if(r!==null)Qn=r,bn=t;else{if(t===null)throw Nt.alternate===null?Error(o(467)):Error(o(310));bn=t,t={memoizedState:bn.memoizedState,baseState:bn.baseState,baseQueue:bn.baseQueue,queue:bn.queue,next:null},Qn===null?Nt.memoizedState=Qn=t:Qn=Qn.next=t}return Qn}function Cd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xu(t){var r=bu;return bu+=1,Vs===null&&(Vs=[]),t=tx(Vs,t,r),r=Nt,(Qn===null?r.memoizedState:Qn.next)===null&&(r=r.alternate,ge.H=r===null||r.memoizedState===null?Kx:Gx),t}function Td(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return xu(t);if(t.$$typeof===B)return;if(t.$$typeof===_)return gr(t)}throw Error(o(438,String(t)))}function Ng(t){var r=null,i=Nt.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var l=Nt.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Cd(),Nt.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(t),l=0;l<t;l++)i[l]=se;return r.index++,i}function Mo(t,r){return typeof r=="function"?r(t):r}function Od(t){var r=Kn();return Ig(r,bn,t)}function Ig(t,r,i){var l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var f=t.baseQueue,m=l.pending;if(m!==null){if(f!==null){var E=f.next;f.next=m.next,m.next=E}r.baseQueue=f=m,l.pending=null}if(m=t.baseState,f===null)t.memoizedState=m;else{r=f.next;var P=E=null,Q=null,ie=r,pe=!1;do{var Ce=ie.lane&-536870913;if(Ce!==ie.lane?(Xt&Ce)===Ce:(Oo&Ce)===Ce){var ae=ie.revertLane;if(ae===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),Ce===Gi&&(pe=!0);else if((Oo&ae)===ae){ie=ie.next,ae===Gi&&(pe=!0);continue}else Ce={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},Q===null?(P=Q=Ce,E=m):Q=Q.next=Ce,Nt.lanes|=ae,ui|=ae;Ce=ie.action,Ji&&i(m,Ce),m=ie.hasEagerState?ie.eagerState:i(m,Ce)}else ae={lane:Ce,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},Q===null?(P=Q=ae,E=m):Q=Q.next=ae,Nt.lanes|=Ce,ui|=Ce;ie=ie.next}while(ie!==null&&ie!==r);if(Q===null?E=m:Q.next=P,!ta(m,t.memoizedState)&&(Zn=!0,pe&&(i=Hs,i!==null)))throw i;t.memoizedState=m,t.baseState=E,t.baseQueue=Q,l.lastRenderedState=m}return f===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function jg(t){var r=Kn(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var l=i.dispatch,f=i.pending,m=r.memoizedState;if(f!==null){i.pending=null;var E=f=f.next;do m=t(m,E.action),E=E.next;while(E!==f);ta(m,r.memoizedState)||(Zn=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),i.lastRenderedState=m}return[m,l]}function fx(t,r,i){var l=Nt,f=Kn(),m=Ft;if(m){if(i===void 0)throw Error(o(407));i=i()}else i=r();var E=!ta((bn||f).memoizedState,i);if(E&&(f.memoizedState=i,Zn=!0),f=f.queue,Lg(gx.bind(null,l,f,t),[t]),t=f.getSnapshot!==r||E||Qn!==null&&(Qn.memoizedState.tag&1)!==0,qs(t?9:8,{destroy:void 0},px.bind(null,l,f,i,r),null),t){if(l.flags|=2048,Tn===null)throw Error(o(349));m||(Oo&127)!==0||hx(l,r,i)}return i}function hx(t,r,i){t.flags|=16384,t={getSnapshot:r,value:i},r=Nt.updateQueue,r===null?(r=Cd(),Nt.updateQueue=r,r.stores=[t]):(i=r.stores,i===null?r.stores=[t]:i.push(t))}function px(t,r,i,l){r.value=i,r.getSnapshot=l,mx(r)&&yx(t)}function gx(t,r,i){return i(function(){mx(r)&&yx(t)})}function mx(t){var r=t.getSnapshot;t=t.value;try{var i=r();return!ta(t,i)}catch{return!0}}function yx(t){var r=Fi(t,2);r!==null&&qr(r,t,2)}function kg(t){var r=Nr();if(typeof t=="function"){var i=t;if(t=i(),Ji){Ge(!0);try{i()}finally{Ge(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:t},r}function vx(t,r,i,l){return t.baseState=i,Ig(t,bn,typeof l=="function"?l:Mo)}function sD(t,r,i,l,f){if(Dd(t))throw Error(o(485));if(t=r.action,t!==null){var m={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){m.listeners.push(E)}};ge.T!==null?i(!0):m.isTransition=!1,l(m),i=r.pending,i===null?(m.next=r.pending=m,bx(r,m)):(m.next=i.next,r.pending=i.next=m)}}function bx(t,r){var i=r.action,l=r.payload,f=t.state;if(r.isTransition){var m=ge.T,E={};E.types=m!==null?m.types:null,ge.T=E;try{var P=i(f,l),Q=ge.S;Q!==null&&Q(E,P),xx(t,r,P)}catch(ie){Pg(t,r,ie)}finally{m!==null&&E.types!==null&&(m.types=E.types),ge.T=m}}else try{m=i(f,l),xx(t,r,m)}catch(ie){Pg(t,r,ie)}}function xx(t,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Sx(t,r,l)},function(l){return Pg(t,r,l)}):Sx(t,r,i)}function Sx(t,r,i){r.status="fulfilled",r.value=i,wx(r),t.state=i,r=t.pending,r!==null&&(i=r.next,i===r?t.pending=null:(i=i.next,r.next=i,bx(t,i)))}function Pg(t,r,i){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=i,wx(r),r=r.next;while(r!==l)}t.action=null}function wx(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Rx(t,r){return r}function Ex(t,r){if(Ft){var i=Tn.formState;if(i!==null){e:{var l=Nt;if(Ft){if(An){t:{for(var f=An,m=xa;f.nodeType!==8;){if(!m){f=null;break t}if(f=wa(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){An=wa(f.nextSibling),l=f.data==="F!";break e}}Zo(l)}l=!1}l&&(r=i[0])}}return i=Nr(),i.memoizedState=i.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rx,lastRenderedState:r},i.queue=l,i=Vx.bind(null,Nt,l),l.dispatch=i,l=kg(!1),m=Fg.bind(null,Nt,!1,l.queue),l=Nr(),f={state:r,dispatch:null,action:t,pending:null},l.queue=f,i=sD.bind(null,Nt,f,m,i),f.dispatch=i,l.memoizedState=t,[r,i,!1]}function Cx(t){var r=Kn();return Tx(r,bn,t)}function Tx(t,r,i){if(r=Ig(t,r,Rx)[0],t=Od(Mo)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var l=xu(r)}catch(E){throw E===Us?yd:E}else l=r;r=Kn();var f=r.queue,m=f.dispatch;return i!==r.memoizedState&&(Nt.flags|=2048,qs(9,{destroy:void 0},lD.bind(null,f,i),null)),[l,m,t]}function lD(t,r){t.action=r}function Ox(t){var r=Kn(),i=bn;if(i!==null)return Tx(r,i,t);Kn(),r=r.memoizedState,i=Kn();var l=i.queue.dispatch;return i.memoizedState=t,[r,l,!1]}function qs(t,r,i,l){return t={tag:t,create:i,deps:l,inst:r,next:null},r=Nt.updateQueue,r===null&&(r=Cd(),Nt.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=t.next=t:(l=i.next,i.next=t,t.next=l,r.lastEffect=t),t}function Mx(){return Kn().memoizedState}function Md(t,r,i,l){var f=Nr();Nt.flags|=t,f.memoizedState=qs(1|r,{destroy:void 0},i,l===void 0?null:l)}function Ad(t,r,i,l){var f=Kn();l=l===void 0?null:l;var m=f.memoizedState.inst;bn!==null&&l!==null&&Tg(l,bn.memoizedState.deps)?f.memoizedState=qs(r,m,i,l):(Nt.flags|=t,f.memoizedState=qs(1|r,m,i,l))}function Ax(t,r){Md(8390656,8,t,r)}function Lg(t,r){Ad(2048,8,t,r)}function uD(t){Nt.flags|=4;var r=Nt.updateQueue;if(r===null)r=Cd(),Nt.updateQueue=r,r.events=[t];else{var i=r.events;i===null?r.events=[t]:i.push(t)}}function Dx(t){var r=Kn().memoizedState;return uD({ref:r,nextImpl:t}),function(){if((ln&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}function Nx(t,r){return Ad(4,2,t,r)}function Ix(t,r){return Ad(4,4,t,r)}function jx(t,r){if(typeof r=="function"){t=t();var i=r(t);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function kx(t,r,i){i=i!=null?i.concat([t]):null,Ad(4,4,jx.bind(null,r,t),i)}function zg(){}function Px(t,r){var i=Kn();r=r===void 0?null:r;var l=i.memoizedState;return r!==null&&Tg(r,l[1])?l[0]:(i.memoizedState=[t,r],t)}function Lx(t,r){var i=Kn();r=r===void 0?null:r;var l=i.memoizedState;if(r!==null&&Tg(r,l[1]))return l[0];if(l=t(),Ji){Ge(!0);try{t()}finally{Ge(!1)}}return i.memoizedState=[l,r],l}function _g(t,r,i){return i===void 0||(Oo&1073741824)!==0&&(Xt&261930)===0?t.memoizedState=r:(t.memoizedState=i,t=K2(),Nt.lanes|=t,ui|=t,i)}function zx(t,r,i,l){return ta(i,r)?i:ri.current!==null?(t=_g(t,i,l),ta(t,r)||(Zn=!0),t):(Oo&106)===0||(Oo&1073741824)!==0&&(Xt&261930)===0?(Zn=!0,t.memoizedState=i):(t=K2(),Nt.lanes|=t,ui|=t,r)}function _x(t,r,i,l,f){var m=ce.p;ce.p=m!==0&&8>m?m:8;var E=ge.T,P={};P.types=E!==null?E.types:null,ge.T=P,Fg(t,!1,r,i);try{var Q=f(),ie=ge.S;if(ie!==null&&ie(P,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var pe=aD(Q,l);Su(t,r,pe,ia(t))}else Su(t,r,l,ia(t))}catch(Ce){Su(t,r,{then:function(){},status:"rejected",reason:Ce},ia())}finally{ce.p=m,E!==null&&P.types!==null&&(E.types=P.types),ge.T=E}}function cD(){}function Hg(t,r,i,l){if(t.tag!==5)throw Error(o(476));var f=Hx(t).queue;_x(t,f,r,Te,i===null?cD:function(){return Ux(t),i(l)})}function Hx(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:Te,baseState:Te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:Te},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:i},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function Ux(t){var r=Hx(t);r.next===null&&(r=t.alternate.memoizedState),Su(t,r.next.queue,{},ia())}function Ug(){return gr(ul)}function Fx(){return Kn().memoizedState}function Bx(){return Kn().memoizedState}function dD(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var i=ia();t=ti(i);var l=ni(r,t,i);l!==null&&(qr(l,r,i),gu(l,r,i)),r={cache:pg()},t.payload=r;return}r=r.return}}function fD(t,r,i){var l=ia();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Dd(t)?qx(r,i):(i=og(t,r,i,l),i!==null&&(qr(i,t,l),Yx(i,r,l)))}function Vx(t,r,i){var l=ia();Su(t,r,i,l)}function Su(t,r,i,l){var f={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Dd(t))qx(r,f);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var E=r.lastRenderedState,P=m(E,i);if(f.hasEagerState=!0,f.eagerState=P,ta(P,E))return sd(t,r,f,0),Tn===null&&id(),!1}catch{}if(i=og(t,r,f,l),i!==null)return qr(i,t,l),Yx(i,r,l),!0}return!1}function Fg(t,r,i,l){if(l={lane:2,revertLane:Nm(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Dd(t)){if(r)throw Error(o(479))}else r=og(t,i,l,2),r!==null&&qr(r,t,2)}function Dd(t){var r=t.alternate;return t===Nt||r!==null&&r===Nt}function qx(t,r){Bs=Rd=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function Yx(t,r,i){if((i&4194048)!==0){var l=r.lanes;l&=t.pendingLanes,i|=l,r.lanes=i,On(t,i)}}var Nd={readContext:gr,use:Td,useCallback:Bn,useContext:Bn,useEffect:Bn,useImperativeHandle:Bn,useLayoutEffect:Bn,useInsertionEffect:Bn,useMemo:Bn,useReducer:Bn,useRef:Bn,useState:Bn,useDebugValue:Bn,useDeferredValue:Bn,useTransition:Bn,useSyncExternalStore:Bn,useId:Bn,useHostTransitionStatus:Bn,useFormState:Bn,useActionState:Bn,useOptimistic:Bn,useMemoCache:Bn,useCacheRefresh:Bn,useEffectEvent:Bn},Kx={readContext:gr,use:Td,useCallback:function(t,r){return Nr().memoizedState=[t,r===void 0?null:r],t},useContext:gr,useEffect:Ax,useImperativeHandle:function(t,r,i){i=i!=null?i.concat([t]):null,Md(4194308,4,jx.bind(null,r,t),i)},useLayoutEffect:function(t,r){return Md(4194308,4,t,r)},useInsertionEffect:function(t,r){Md(4,2,t,r)},useMemo:function(t,r){var i=Nr();r=r===void 0?null:r;var l=t();if(Ji){Ge(!0);try{t()}finally{Ge(!1)}}return i.memoizedState=[l,r],l},useReducer:function(t,r,i){var l=Nr();if(i!==void 0){var f=i(r);if(Ji){Ge(!0);try{i(r)}finally{Ge(!1)}}}else f=r;return l.memoizedState=l.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},l.queue=t,t=t.dispatch=fD.bind(null,Nt,t),[l.memoizedState,t]},useRef:function(t){var r=Nr();return t={current:t},r.memoizedState=t},useState:function(t){t=kg(t);var r=t.queue,i=Vx.bind(null,Nt,r);return r.dispatch=i,[t.memoizedState,i]},useDebugValue:zg,useDeferredValue:function(t,r){var i=Nr();return _g(i,t,r)},useTransition:function(){var t=kg(!1);return t=_x.bind(null,Nt,t.queue,!0,!1),Nr().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,i){var l=Nt,f=Nr();if(Ft){if(i===void 0)throw Error(o(407));i=i()}else{if(i=r(),Tn===null)throw Error(o(349));(Xt&127)!==0||hx(l,r,i)}f.memoizedState=i;var m={value:i,getSnapshot:r};return f.queue=m,Ax(gx.bind(null,l,m,t),[t]),l.flags|=2048,qs(9,{destroy:void 0},px.bind(null,l,m,i,r),null),i},useId:function(){var t=Nr(),r=Tn.identifierPrefix;if(Ft){var i=Xa,l=$a;i=(l&~(1<<32-et(l)-1)).toString(32)+i,r="_"+r+"R_"+i,i=Ed++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=oD++,r="_"+r+"r_"+i.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:Ug,useFormState:Ex,useActionState:Ex,useOptimistic:function(t){var r=Nr();r.memoizedState=r.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=Fg.bind(null,Nt,!0,i),i.dispatch=r,[t,r]},useMemoCache:Ng,useCacheRefresh:function(){return Nr().memoizedState=dD.bind(null,Nt)},useEffectEvent:function(t){var r=Nr(),i={impl:t};return r.memoizedState=i,function(){if((ln&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Gx={readContext:gr,use:Td,useCallback:Px,useContext:gr,useEffect:Lg,useImperativeHandle:kx,useInsertionEffect:Nx,useLayoutEffect:Ix,useMemo:Lx,useReducer:Od,useRef:Mx,useState:function(){return Od(Mo)},useDebugValue:zg,useDeferredValue:function(t,r){var i=Kn();return zx(i,bn.memoizedState,t,r)},useTransition:function(){var t=Od(Mo)[0],r=Kn().memoizedState;return[typeof t=="boolean"?t:xu(t),r]},useSyncExternalStore:fx,useId:Fx,useHostTransitionStatus:Ug,useFormState:Cx,useActionState:Cx,useOptimistic:function(t,r){var i=Kn();return vx(i,bn,t,r)},useMemoCache:Ng,useCacheRefresh:Bx,useEffectEvent:Dx},hD={readContext:gr,use:Td,useCallback:Px,useContext:gr,useEffect:Lg,useImperativeHandle:kx,useInsertionEffect:Nx,useLayoutEffect:Ix,useMemo:Lx,useReducer:jg,useRef:Mx,useState:function(){return jg(Mo)},useDebugValue:zg,useDeferredValue:function(t,r){var i=Kn();return bn===null?_g(i,t,r):zx(i,bn.memoizedState,t,r)},useTransition:function(){var t=jg(Mo)[0],r=Kn().memoizedState;return[typeof t=="boolean"?t:xu(t),r]},useSyncExternalStore:fx,useId:Fx,useHostTransitionStatus:Ug,useFormState:Ox,useActionState:Ox,useOptimistic:function(t,r){var i=Kn();return bn!==null?vx(i,bn,t,r):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:Ng,useCacheRefresh:Bx,useEffectEvent:Dx};function Bg(t,r,i,l){r=t.memoizedState,i=i(l,r),i=i==null?r:k({},r,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Vg={enqueueSetState:function(t,r,i){t=t._reactInternals;var l=ia(),f=ti(l);f.payload=r,i!=null&&(f.callback=i),r=ni(t,f,l),r!==null&&(qr(r,t,l),gu(r,t,l))},enqueueReplaceState:function(t,r,i){t=t._reactInternals;var l=ia(),f=ti(l);f.tag=1,f.payload=r,i!=null&&(f.callback=i),r=ni(t,f,l),r!==null&&(qr(r,t,l),gu(r,t,l))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var i=ia(),l=ti(i);l.tag=2,r!=null&&(l.callback=r),r=ni(t,l,i),r!==null&&(qr(r,t,i),gu(r,t,i))}};function $x(t,r,i,l,f,m,E){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,m,E):r.prototype&&r.prototype.isPureReactComponent?!su(i,l)||!su(f,m):!0}function Xx(t,r,i,l){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,l),r.state!==t&&Vg.enqueueReplaceState(r,r.state,null)}function Wi(t,r){var i=r;if("ref"in r){i={};for(var l in r)l!=="ref"&&(i[l]=r[l])}if(t=t.defaultProps){i===r&&(i=k({},i));for(var f in t)i[f]===void 0&&(i[f]=t[f])}return i}function Qx(t){od(t)}function Zx(t){console.error(t)}function Jx(t){od(t)}function Id(t,r){try{var i=t.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function Wx(t,r,i){try{var l=t.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function qg(t,r,i){return i=ti(i),i.tag=3,i.payload={element:null},i.callback=function(){Id(t,r)},i}function e2(t){return t=ti(t),t.tag=3,t}function t2(t,r,i,l){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var m=l.value;t.payload=function(){return f(m)},t.callback=function(){Wx(r,i,l)}}var E=i.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(t.callback=function(){Wx(r,i,l),typeof f!="function"&&(ci===null?ci=new Set([this]):ci.add(this));var P=l.stack;this.componentDidCatch(l.value,{componentStack:P!==null?P:""})})}function pD(t,r,i,l,f){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(r=i.alternate,r!==null&&Yi(r,i,f,!0),i=mr.current,i!==null){switch(i.tag){case 31:case 13:case 19:return Rr===null?Wd():i.alternate===null&&Vn===0&&(Vn=3),i.flags&=-257,i.flags|=65536,i.lanes=f,l===vd?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([l]):r.add(l),Mm(t,l,f)),!1;case 22:return i.flags|=65536,l===vd?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([l]):i.add(l)),Mm(t,l,f)),!1}throw Error(o(435,i.tag))}return Mm(t,l,f),Wd(),!1}if(Ft)return r=mr.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=f,l!==cg&&(t=Error(o(422),{cause:l}),cu(ya(t,i)))):(l!==cg&&(r=Error(o(423),{cause:l}),cu(ya(r,i))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,l=ya(l,i),f=qg(t.stateNode,l,f),xg(t,f),Vn!==4&&(Vn=2)),!1;var m=Error(o(520),{cause:l});if(m=ya(m,i),Au===null?Au=[m]:Au.push(m),Vn!==4&&(Vn=2),r===null)return!0;l=ya(l,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,t=f&-f,i.lanes|=t,t=qg(i.stateNode,l,t),xg(i,t),!1;case 1:if(r=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(ci===null||!ci.has(m))))return i.flags|=65536,f&=-f,i.lanes|=f,f=e2(f),t2(f,t,i,l),xg(i,f),!1;break;case 22:if(i.memoizedState!==null)return i.flags|=65536,!1}i=i.return}while(i!==null);return!1}var Yg=Error(o(461)),Zn=!1;function rr(t,r,i,l){r.child=t===null?ox(r,null,i,l):Zi(r,t.child,i,l)}function n2(t,r,i,l,f){i=i.render;var m=r.ref;if("ref"in l){var E={};for(var P in l)P!=="ref"&&(E[P]=l[P])}else E=l;return Ki(r),l=Og(t,r,i,E,m,f),P=Mg(),t!==null&&!Zn?(Ag(t,r,f),Ao(t,r,f)):(Ft&&P&&dd(r),r.flags|=1,rr(t,r,l,f),r.child)}function r2(t,r,i,l,f){if(t===null){var m=i.type;return typeof m=="function"&&!ig(m)&&m.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=m,a2(t,r,m,l,f)):(t=ud(i.type,null,l,r,r.mode,f),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,!Wg(t,f)){var E=m.memoizedProps;if(i=i.compare,i=i!==null?i:su,i(E,l)&&t.ref===r.ref)return Ao(t,r,f)}return r.flags|=1,t=Ro(m,l),t.ref=r.ref,t.return=r,r.child=t}function a2(t,r,i,l,f){if(t!==null){var m=t.memoizedProps;if(su(m,l)&&t.ref===r.ref)if(Zn=!1,r.pendingProps=l=m,Wg(t,f))(t.flags&131072)!==0&&(Zn=!0);else return r.lanes=t.lanes,Ao(t,r,f)}return Kg(t,r,i,l,f)}function o2(t,r,i,l){var f=l.children,m=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|i:i,t!==null){for(l=r.child=t.child,f=0;l!==null;)f=f|l.lanes|l.childLanes,l=l.sibling;l=f&~m}else l=0,r.child=null;return i2(t,r,m,i,l)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&md(r,m!==null?m.cachePool:null),m!==null?lx(r,m):wg(),ux(r);else return l=r.lanes=536870912,i2(t,r,m!==null?m.baseLanes|i:i,i,l)}else m!==null?(md(r,m.cachePool),lx(r,m),oi(),r.memoizedState=null):(t!==null&&md(r,null),wg(),oi());return rr(t,r,f,i),r.child}function wu(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function i2(t,r,i,l,f){var m=mg();return m=m===null?null:{parent:Xn._currentValue,pool:m},r.memoizedState={baseLanes:i,cachePool:m},t!==null&&md(r,null),wg(),ux(r),t!==null&&Yi(t,r,l,!0),r.childLanes=f,null}function jd(t,r){return r=kd({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function s2(t,r,i){return Zi(r,t.child,null,i),t=jd(r,r.pendingProps),t.flags|=2,na(r),r.memoizedState=null,t}function gD(t,r,i){var l=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Ft){if(l.mode==="hidden")return t=jd(r,l),r.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},wu(null,t);if(Eg(r),(t=An)?(t=j1(t,xa),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Xo!==null?{id:$a,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},i=qb(t),i.return=r,r.child=i,ir=r,An=null)):t=null,t===null)throw Zo(r);return r.lanes=536870912,null}return jd(r,l)}var m=t.memoizedState;if(m!==null){var E=m.dehydrated;if(Eg(r),f)if(r.flags&256)r.flags&=-257,r=s2(t,r,i);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(o(558));else if(Zn||Yi(t,r,i,!1),f=(i&t.childLanes)!==0,Zn||f){if(ri.current===null){if(l=Tn,l!==null&&(E=Vt(l,i),E!==0&&E!==m.retryLane))throw m.retryLane=E,Fi(t,E),qr(l,t,E),Yg;Wd()}r=s2(t,r,i)}else t=m.treeContext,An=wa(E.nextSibling),ir=r,Ft=!0,Qo=null,xa=!1,t!==null&&Gb(r,t),r=jd(r,l),r.flags|=134221824;return r}return t=Ro(t.child,{mode:l.mode,children:l.children}),t.ref=r.ref,r.child=t,t.return=r,t}function Ys(t,r){var i=r.ref;if(i===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(t===null||t.ref!==i)&&(r.flags|=4194816)}}function Kg(t,r,i,l,f){return Ki(r),i=Og(t,r,i,l,void 0,f),l=Mg(),t!==null&&!Zn?(Ag(t,r,f),Ao(t,r,f)):(Ft&&l&&dd(r),r.flags|=1,rr(t,r,i,f),r.child)}function l2(t,r,i,l,f,m){return Ki(r),r.updateQueue=null,i=dx(r,l,i,f),cx(t),l=Mg(),t!==null&&!Zn?(Ag(t,r,m),Ao(t,r,m)):(Ft&&l&&dd(r),r.flags|=1,rr(t,r,i,m),r.child)}function u2(t,r,i,l,f){if(Ki(r),r.stateNode===null){var m=Ps,E=i.contextType;typeof E=="object"&&E!==null&&(m=gr(E)),m=new i(l,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Vg,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=l,m.state=r.memoizedState,m.refs={},vg(r),E=i.contextType,m.context=typeof E=="object"&&E!==null?gr(E):Ps,m.state=r.memoizedState,E=i.getDerivedStateFromProps,typeof E=="function"&&(Bg(r,i,E,l),m.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(E=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),E!==m.state&&Vg.enqueueReplaceState(m,m.state,null),yu(r,l,m,f),mu(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(t===null){m=r.stateNode;var P=r.memoizedProps,Q=Wi(i,P);m.props=Q;var ie=m.context,pe=i.contextType;E=Ps,typeof pe=="object"&&pe!==null&&(E=gr(pe));var Ce=i.getDerivedStateFromProps;pe=typeof Ce=="function"||typeof m.getSnapshotBeforeUpdate=="function",P=r.pendingProps!==P,pe||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(P||ie!==E)&&Xx(r,m,l,E),ei=!1;var ae=r.memoizedState;m.state=ae,yu(r,l,m,f),mu(),ie=r.memoizedState,P||ae!==ie||ei?(typeof Ce=="function"&&(Bg(r,i,Ce,l),ie=r.memoizedState),(Q=ei||$x(r,i,Q,l,ae,ie,E))?(pe||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=ie),m.props=l,m.state=ie,m.context=E,l=Q):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{m=r.stateNode,bg(t,r),E=r.memoizedProps,pe=Wi(i,E),m.props=pe,Ce=r.pendingProps,ae=m.context,ie=i.contextType,Q=Ps,typeof ie=="object"&&ie!==null&&(Q=gr(ie)),P=i.getDerivedStateFromProps,(ie=typeof P=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E!==Ce||ae!==Q)&&Xx(r,m,l,Q),ei=!1,ae=r.memoizedState,m.state=ae,yu(r,l,m,f),mu();var fe=r.memoizedState;E!==Ce||ae!==fe||ei||t!==null&&t.dependencies!==null&&pd(t.dependencies)?(typeof P=="function"&&(Bg(r,i,P,l),fe=r.memoizedState),(pe=ei||$x(r,i,pe,l,ae,fe,Q)||t!==null&&t.dependencies!==null&&pd(t.dependencies))?(ie||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,fe,Q),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,fe,Q)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=fe),m.props=l,m.state=fe,m.context=Q,l=pe):(typeof m.componentDidUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=1024),l=!1)}return m=l,Ys(t,r),l=(r.flags&128)!==0,m||l?(m=r.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,t!==null&&l?(r.child=Zi(r,t.child,null,f),r.child=Zi(r,null,i,f)):rr(t,r,i,f),r.memoizedState=m.state,t=r.child):t=Ao(t,r,f),t}function c2(t,r,i,l){return Vi(),r.flags|=256,rr(t,r,i,l),r.child}var Gg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $g(t){return{baseLanes:t,cachePool:Wb()}}function Xg(t,r,i){return t=t!==null?t.childLanes&~i:0,r&&(t|=oa),t}function d2(t,r,i){var l=r.pendingProps,f=!1,m=(r.flags&128)!==0,E;if((E=m)||(E=t!==null&&t.memoizedState===null?!1:(yr.current&2)!==0),E&&(f=!0,r.flags&=-129),E=(r.flags&32)!==0,r.flags&=-33,t===null){if(Ft){if(f?ai(r):oi(),(t=An)?(t=j1(t,xa),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Xo!==null?{id:$a,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},i=qb(t),i.return=r,r.child=i,ir=r,An=null)):t=null,t===null)throw Zo(r);return $m(t)?r.lanes=32:r.lanes=536870912,null}return m=l.children,l=l.fallback,f?(oi(),f=r.mode,m=kd({mode:"hidden",children:m},f),l=Bi(l,f,i,null),m.return=r,l.return=r,m.sibling=l,r.child=m,l=r.child,l.memoizedState=$g(i),l.childLanes=Xg(t,E,i),r.memoizedState=Gg,wu(null,l)):(ai(r),Qg(r,m))}var P=t.memoizedState;if(P!==null){var Q=P.dehydrated;if(Q!==null)return mD(t,r,m,E,l,Q,P,i)}return f?(oi(),f=l.fallback,m=r.mode,P=t.child,Q=P.sibling,l=Ro(P,{mode:"hidden",children:l.children}),l.subtreeFlags=P.subtreeFlags&1206910976,Q!==null?f=Ro(Q,f):(f=Bi(f,m,i,null),f.flags|=2),f.return=r,l.return=r,l.sibling=f,r.child=l,wu(null,l),l=r.child,f=t.child.memoizedState,f===null?f=$g(i):(m=f.cachePool,m!==null?(P=Xn._currentValue,m=m.parent!==P?{parent:P,pool:P}:m):m=Wb(),f={baseLanes:f.baseLanes|i,cachePool:m}),l.memoizedState=f,l.childLanes=Xg(t,E,i),r.memoizedState=Gg,wu(t.child,l)):(ai(r),i=t.child,t=i.sibling,i=Ro(i,{mode:"visible",children:l.children}),i.return=r,i.sibling=null,t!==null&&(E=r.deletions,E===null?(r.deletions=[t],r.flags|=16):E.push(t)),r.child=i,r.memoizedState=null,i)}function Qg(t,r){return r=kd({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function kd(t,r){return t=Ur(22,t,null,r),t.lanes=0,t}function Pd(t,r,i){return Zi(r,t.child,null,i),t=Qg(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function mD(t,r,i,l,f,m,E,P){if(i)return r.flags&256?(ai(r),r.flags&=-257,Pd(t,r,P)):r.memoizedState!==null?(oi(),r.child=t.child,r.flags|=128,null):(oi(),m=f.fallback,E=r.mode,f=kd({mode:"visible",children:f.children},E),m=Bi(m,E,P,null),m.flags|=2,f.return=r,m.return=r,f.sibling=m,r.child=f,Zi(r,t.child,null,P),f=r.child,f.memoizedState=$g(P),f.childLanes=Xg(t,l,P),r.memoizedState=Gg,wu(null,f));if(ai(r),$m(m)){if(l=m.nextSibling&&m.nextSibling.dataset,l)var Q=l.dgst;return l=Q,l!==""&&(f=Error(o(419)),f.stack="",f.digest=l,cu({value:f,source:null,stack:null})),Pd(t,r,P)}if(Zn||Yi(t,r,P,!1),l=(P&t.childLanes)!==0,Zn||l){if(ri.current!==null)return Pd(t,r,P);if(l=Tn,l!==null&&(f=Vt(l,P),f!==0&&f!==E.retryLane))throw E.retryLane=f,Fi(t,f),qr(l,t,f),Yg;return Gm(m)||Wd(),Pd(t,r,P)}return Gm(m)?(r.flags|=192,r.child=t.child,null):(t=E.treeContext,An=wa(m.nextSibling),ir=r,Ft=!0,Qo=null,xa=!1,t!==null&&Gb(r,t),r=Qg(r,f.children),r.flags|=134221824,r)}function f2(t,r,i){t.lanes|=r;var l=t.alternate;l!==null&&(l.lanes|=r),hd(t.return,r,i)}function h2(t){for(var r=null;t!==null;){var i=t.alternate;i!==null&&wd(i)===null&&(r=t),t=t.sibling}return r}function Ld(t,r,i,l,f,m){var E=t.memoizedState;E===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:f,treeForkCount:m}:(E.isBackwards=r,E.rendering=null,E.renderingStartTime=0,E.last=l,E.tail=i,E.tailMode=f,E.treeForkCount=m)}function Zg(t){var r=t.child;for(t.child=null;r!==null;){var i=r.sibling;r.sibling=t.child,t.child=r,r=i}}function Jg(t,r,i){var l=r.pendingProps,f=l.revealOrder,m=l.tail;l=l.children;var E=yr.current;if(r.flags&128)return vu(r,E),null;var P=(E&2)!==0;if(P?(E=E&1|2,r.flags|=128):E&=1,vu(r,E),f==="backwards"&&t!==null?(Zg(t),rr(t,r,l,i),Zg(t)):rr(t,r,l,i),l=Ft?uu:0,!P&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&f2(t,i,r);else if(t.tag===19)f2(t,i,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"backwards":i=h2(r.child),i===null?(f=r.child,r.child=null):(f=i.sibling,i.sibling=null,Zg(r)),Ld(r,!0,f,null,m,l);break;case"unstable_legacy-backwards":for(i=null,f=r.child,r.child=null;f!==null;){if(t=f.alternate,t!==null&&wd(t)===null){r.child=f;break}t=f.sibling,f.sibling=i,i=f,f=t}Ld(r,!0,i,null,m,l);break;case"together":Ld(r,!1,null,null,void 0,l);break;case"independent":r.memoizedState=null;break;default:i=h2(r.child),i===null?(f=r.child,r.child=null):(f=i.sibling,i.sibling=null),Ld(r,!1,f,i,m,l)}return r.child}function p2(t,r,i){var l=r.pendingProps;return Jo(r,r.type,l.value),rr(t,r,l.children,i),r.child}function Ao(t,r,i){if(t!==null&&(r.dependencies=t.dependencies),ui|=r.lanes,(i&r.childLanes)===0)if(t!==null){if(Yi(t,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(o(153));if(r.child!==null){for(t=r.child,i=Ro(t,t.pendingProps),r.child=i,i.return=r;t.sibling!==null;)t=t.sibling,i=i.sibling=Ro(t,t.pendingProps),i.return=r;i.sibling=null}return r.child}function Wg(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&pd(t)))}function yD(t,r,i){switch(r.tag){case 3:Ze(r,r.stateNode.containerInfo),Jo(r,Xn,t.memoizedState.cache),Vi();break;case 27:case 5:de(r);break;case 4:Ze(r,r.stateNode.containerInfo);break;case 10:Jo(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Eg(r),null;break;case 13:var l=r.memoizedState;if(l!==null){if(l.dehydrated!==null)return ai(r),r.flags|=128,null;l=Yi(t,r,i,!1);var f=r.child.childLanes;return l||(i&f)!==0?d2(t,r,i):(ai(r),t=Ao(t,r,i),t!==null?t.sibling:null)}ai(r);break;case 19:if(r.flags&128)return Jg(t,r,i);if(f=(t.flags&128)!==0,l=(i&r.childLanes)!==0,l||(Yi(t,r,i,!1),l=(i&r.childLanes)!==0),f){if(l)return Jg(t,r,i);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),vu(r,yr.current),l)break;return null;case 22:return r.lanes=0,o2(t,r,i,r.pendingProps);case 24:Jo(r,Xn,t.memoizedState.cache)}return Ao(t,r,i)}function g2(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps)Zn=!0;else{if(!Wg(t,i)&&(r.flags&128)===0)return Zn=!1,yD(t,r,i);Zn=(t.flags&131072)!==0}else Zn=!1,Ft&&(r.flags&1048576)!==0&&Kb(r,uu,r.index);switch(r.lanes=0,r.tag){case 16:e:{var l=r.pendingProps;if(t=Xi(r.elementType),r.type=t,typeof t=="function")ig(t)?(l=Wi(t,l),r.tag=1,r=u2(null,r,t,l,i)):(r.tag=0,r=Kg(null,r,t,l,i));else{if(t!=null){var f=t.$$typeof;if(f===L){r.tag=11,r=n2(null,r,t,l,i);break e}else if(f===V){r.tag=14,r=r2(null,r,t,l,i);break e}else if(f===_){r.tag=10,r.type=t,r=p2(null,r,i);break e}}throw r=le(t)||t,Error(o(306,r,""))}}return r;case 0:return Kg(t,r,r.type,r.pendingProps,i);case 1:return l=r.type,f=Wi(l,r.pendingProps),u2(t,r,l,f,i);case 3:e:{if(Ze(r,r.stateNode.containerInfo),t===null)throw Error(o(387));l=r.pendingProps;var m=r.memoizedState;f=m.element,bg(t,r),yu(r,l,null,i);var E=r.memoizedState;if(l=E.cache,Jo(r,Xn,l),l!==m.cache&&hg(r,[Xn],i,!0),mu(),l=E.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:E.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=c2(t,r,l,i);break e}else if(l!==f){f=ya(Error(o(424)),r),cu(f),r=c2(t,r,l,i);break e}else for(t=r.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,An=wa(t.firstChild),ir=r,Ft=!0,Qo=null,xa=!0,i=ox(r,null,l,i),r.child=i;i;)i.flags=i.flags&-3|134221824,i=i.sibling;else{if(Vi(),l===f){r=Ao(t,r,i);break e}rr(t,r,l,i)}r=r.child}return r;case 26:return Ys(t,r),t===null?(i=U1(r.type,null,r.pendingProps,null))?r.memoizedState=i:Ft||(r.stateNode=b1(r.type,r.pendingProps,be.current,r)):r.memoizedState=U1(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return de(r),t===null&&Ft&&(l=r.stateNode=L1(r.type,r.pendingProps,be.current),ir=r,xa=!0,f=An,hi(r.type)?(Xm=f,An=wa(l.firstChild)):An=f),rr(t,r,r.pendingProps.children,i),Ys(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Ft&&((f=l=An)&&(l=dN(l,r.type,r.pendingProps,xa),l!==null?(r.stateNode=l,ir=r,An=wa(l.firstChild),xa=!1,f=!0):f=!1),f||Zo(r)),de(r),f=r.type,m=r.pendingProps,E=t!==null?t.memoizedProps:null,l=m.children,Um(f,m)?l=null:E!==null&&Um(f,E)&&(r.flags|=32),r.memoizedState!==null&&(f=Og(t,r,iD,null,null,i),ul._currentValue=f),Ys(t,r),rr(t,r,l,i),r.child;case 6:return t===null&&Ft&&((t=i=An)&&(i=fN(i,r.pendingProps,xa),i!==null?(r.stateNode=i,ir=r,An=null,t=!0):t=!1),t||Zo(r)),null;case 13:return d2(t,r,i);case 4:return Ze(r,r.stateNode.containerInfo),l=r.pendingProps,t===null?r.child=Zi(r,null,l,i):rr(t,r,l,i),r.child;case 11:return n2(t,r,r.type,r.pendingProps,i);case 7:return l=r.pendingProps,Ys(t,r),rr(t,r,l,i),r.child;case 8:return rr(t,r,r.pendingProps.children,i),r.child;case 12:return rr(t,r,r.pendingProps.children,i),r.child;case 10:return p2(t,r,i);case 9:return f=r.type._context,l=r.pendingProps.children,Ki(r),f=gr(f),l=l(f),r.flags|=1,rr(t,r,l,i),r.child;case 14:return r2(t,r,r.type,r.pendingProps,i);case 15:return a2(t,r,r.type,r.pendingProps,i);case 19:return Jg(t,r,i);case 31:return gD(t,r,i);case 22:return o2(t,r,i,r.pendingProps);case 24:return Ki(r),l=gr(Xn),t===null?(f=mg(),f===null&&(f=Tn,m=pg(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=i),f=m),r.memoizedState={parent:l,cache:f},vg(r),Jo(r,Xn,f)):((t.lanes&i)!==0&&(bg(t,r),yu(r,null,null,i),mu()),f=t.memoizedState,m=r.memoizedState,f.parent!==l?(f={parent:l,cache:l},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),Jo(r,Xn,l)):(l=m.cache,Jo(r,Xn,l),l!==f.cache&&hg(r,[Xn],i,!0))),rr(t,r,r.pendingProps.children,i),r.child;case 30:return r.stateNode===null&&(r.stateNode={autoName:null,paired:null,clones:null,ref:null}),l=r.pendingProps,l.name!=null&&l.name!=="auto"?r.flags|=t===null?18882560:18874368:Ft&&dd(r),t!==null&&t.memoizedProps.name!==l.name?r.flags|=4194816:Ys(t,r),rr(t,r,l.children,i),r.child;case 29:throw r.pendingProps}throw Error(o(156,r.tag))}function Do(t){t.flags|=4}function em(t,r,i,l,f){var m;if((m=(t.mode&32)!==0)&&(m=i===null?q1(r,l):q1(r,l)&&(l.src!==i.src||l.srcSet!==i.srcSet)),m){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if(Q2())t.flags|=8192;else throw Qi=vd,yg}else t.flags&=-16777217}function m2(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Y1(r))if(Q2())t.flags|=8192;else throw Qi=vd,yg}function zd(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?tt():536870912,t.lanes|=r,Qs|=r)}function Ru(t,r){if(!Ft)switch(t.tailMode){case"visible":break;case"collapsed":for(var i=t.tail,l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null;break;default:for(r=t.tail,i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t.tail=null:i.sibling=null}}function Dn(t){var r=t.alternate!==null&&t.alternate.child===t.child,i=0,l=0;if(r)for(var f=t.child;f!==null;)i|=f.lanes|f.childLanes,l|=f.subtreeFlags&1206910976,l|=f.flags&1206910976,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)i|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=l,t.childLanes=i,r}function vD(t,r,i){var l=r.pendingProps;switch(ug(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dn(r),null;case 1:return Dn(r),null;case 3:return i=r.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),To(Xn),it(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(_s(r)?Do(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,dg())),Dn(r),null;case 26:var f=r.type,m=r.memoizedState;return t===null?(Do(r),m!==null?(Dn(r),m2(r,m)):(Dn(r),em(r,f,null,l,i))):m?m!==t.memoizedState?(Do(r),Dn(r),m2(r,m)):(Dn(r),r.flags&=-16777217):(t=t.memoizedProps,t!==l&&Do(r),Dn(r),em(r,f,t,l,i)),null;case 27:if(we(r),i=be.current,f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==l&&Do(r);else{if(!l){if(r.stateNode===null)throw Error(o(166));return Dn(r),r.subtreeFlags&=-33554433,null}t=Oe.current,_s(r)?$b(r):(t=L1(f,l,i),r.stateNode=t,Do(r))}return Dn(r),r.subtreeFlags&=-33554433,null;case 5:if(we(r),f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==l&&Do(r);else{if(!l){if(r.stateNode===null)throw Error(o(166));return Dn(r),r.subtreeFlags&=-33554433,null}if(m=Oe.current,_s(r))$b(r);else{var E=ku(be.current);switch(m){case 1:m=E.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=E.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=E.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=E.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=E.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof l.is=="string"?E.createElement("select",{is:l.is}):E.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?E.createElement(f,{is:l.is}):E.createElement(f)}}m[dn]=r,m[Mn]=l;e:for(E=r.child;E!==null;){if(E.tag===5||E.tag===6)m.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===r)break e;for(;E.sibling===null;){if(E.return===null||E.return===r)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}r.stateNode=m;e:switch(br(m,f,l),f){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Do(r)}}return Dn(r),r.subtreeFlags&=-33554433,em(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,i),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==l&&Do(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(o(166));if(t=be.current,_s(r)){if(t=r.stateNode,i=r.memoizedProps,l=null,f=ir,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}t[dn]=r,t=!!(t.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||g1(t.nodeValue,i)),t||Zo(r,!0)}else t=ku(t).createTextNode(l),t[dn]=r,r.stateNode=t}return Dn(r),null;case 31:if(i=r.memoizedState,t===null||t.memoizedState!==null){if(l=_s(r),i!==null){if(t===null){if(!l)throw Error(o(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[dn]=r}else Vi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Dn(r),t=!1}else i=dg(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return r.flags&256?(na(r),r):(na(r),null);if((r.flags&128)!==0)throw Error(o(558))}return Dn(r),null;case 13:if(l=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=_s(r),l!==null&&l.dehydrated!==null){if(t===null){if(!f)throw Error(o(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));f[dn]=r}else Vi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Dn(r),f=!1}else f=dg(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(na(r),r):(na(r),null)}return na(r),(r.flags&128)!==0?(r.lanes=i,r):(i=l!==null,t=t!==null&&t.memoizedState!==null,i&&(l=r.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==f&&(l.flags|=2048)),i!==t&&i&&(r.child.flags|=8192),zd(r,r.updateQueue),Dn(r),null);case 4:return it(),t===null&&Pm(r.stateNode.containerInfo),r.flags|=67108864,Dn(r),null;case 10:return To(r.type),Dn(r),null;case 19:if(Cg(r),l=r.memoizedState,l===null)return Dn(r),null;if(f=(r.flags&128)!==0,m=l.rendering,m===null)if(f)Ru(l,!1);else{if(Vn!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(m=wd(t),m!==null){for(r.flags|=128,Ru(l,!1),t=m.updateQueue,r.updateQueue=t,zd(r,t),r.subtreeFlags=0,t=i,i=r.child;i!==null;)Vb(i,t),i=i.sibling;return vu(r,yr.current&1|2),Ft&&Eo(r,l.treeForkCount),r.child}t=t.sibling}l.tail!==null&&xt()>Xd&&(r.flags|=128,f=!0,Ru(l,!1),r.lanes=4194304)}else{if(!f)if(t=wd(m),t!==null){if(r.flags|=128,f=!0,t=t.updateQueue,r.updateQueue=t,zd(r,t),Ru(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!m.alternate&&!Ft)return Dn(r),null}else 2*xt()-l.renderingStartTime>Xd&&i!==536870912&&(r.flags|=128,f=!0,Ru(l,!1),r.lanes=4194304);l.isBackwards?(m.sibling=r.child,r.child=m):(t=l.last,t!==null?t.sibling=m:r.child=m,l.last=m)}if(l.tail!==null){t=l.tail;e:{for(i=t;i!==null;){if(i.alternate!==null){i=!1;break e}i=i.sibling}i=!0}return l.rendering=t,l.tail=t.sibling,l.renderingStartTime=xt(),t.sibling=null,m=yr.current,m=f?m&1|2:m&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!i||Ft?vu(r,m):(i=m,Fe(mr,r),Fe(yr,i),Rr===null&&(Rr=r)),Ft&&Eo(r,l.treeForkCount),t}return Dn(r),null;case 22:case 23:return na(r),Rg(),l=r.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(i&536870912)!==0&&(r.flags&128)===0&&(Dn(r),r.subtreeFlags&6&&(r.flags|=8192)):Dn(r),i=r.updateQueue,i!==null&&zd(r,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==i&&(r.flags|=2048),t!==null&&Le($i),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),To(Xn),Dn(r),null;case 25:return null;case 30:return r.flags|=33554432,Dn(r),null}throw Error(o(156,r.tag))}function bD(t,r){switch(ug(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return To(Xn),it(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return we(r),null;case 31:if(r.memoizedState!==null){if(na(r),r.alternate===null)throw Error(o(340));Vi()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(na(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(o(340));Vi()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return Cg(r),t=r.flags,t&65536?(r.flags=t&-65537|128,t=r.memoizedState,t!==null&&(t.rendering=null,t.tail=null),r.flags|=4,r):null;case 4:return it(),null;case 10:return To(r.type),null;case 22:case 23:return na(r),Rg(),t!==null&&Le($i),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return To(Xn),null;case 25:return null;default:return null}}function y2(t,r){switch(ug(r),r.tag){case 3:To(Xn),it();break;case 26:case 27:case 5:we(r);break;case 4:it();break;case 31:r.memoizedState!==null&&na(r);break;case 13:na(r);break;case 19:Cg(r);break;case 10:To(r.type);break;case 22:case 23:na(r),Rg(),t!==null&&Le($i);break;case 24:To(Xn)}}function Eu(t,r){try{var i=r.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var f=l.next;i=f;do{if((i.tag&t)===t){l=void 0;var m=i.create,E=i.inst;l=m(),E.destroy=l}i=i.next}while(i!==f)}}catch(P){gn(r,r.return,P)}}function ii(t,r,i){try{var l=r.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var m=f.next;l=m;do{if((l.tag&t)===t){var E=l.inst,P=E.destroy;if(P!==void 0){E.destroy=void 0,f=r;var Q=i,ie=P;try{ie()}catch(pe){gn(f,Q,pe)}}}l=l.next}while(l!==m)}}catch(pe){gn(r,r.return,pe)}}function v2(t){var r=t.updateQueue;if(r!==null){var i=t.stateNode;try{sx(r,i)}catch(l){gn(t,t.return,l)}}}function b2(t,r,i){i.props=Wi(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(l){gn(t,r,l)}}function Qa(t,r){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:var f=t.stateNode,m=So(t.memoizedProps,f);(f.ref===null||f.ref.name!==m)&&(f.ref=T1(m)),l=f.ref;break;case 7:if(t.stateNode===null){var E=new sa(t);h(t.child,!1,uN,E,void 0,void 0),t.stateNode=E}l=t.stateNode;break;default:l=t.stateNode}typeof i=="function"?t.refCleanup=i(l):i.current=l}}catch(P){gn(t,r,P)}}function vr(t,r){var i=t.ref,l=t.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(f){gn(t,r,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){gn(t,r,f)}else i.current=null}function _d(t,r){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&r!==null)for(var i=0;i<r.length;i++)I1(t.stateNode,r[i])}function x2(t){for(var r=t.return;r!==null&&(nm(r)&&I1(t.stateNode,r.stateNode),!tm(r));)r=r.return}function Cu(t){for(var r=t.return;r!==null&&(nm(r)&&cN(t.stateNode,r.stateNode),!tm(r));)r=r.return}function tm(t){return t.tag===5||t.tag===3||t.tag===27}function nm(t){return t&&t.tag===7&&t.stateNode!==null}function rm(t){var r=t.type,i=t.memoizedProps,l=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(f){gn(t,t.return,f)}}function am(t,r,i){try{var l=t.stateNode;YD(l,t.type,i,r),l[Mn]=r}catch(f){gn(t,t.return,f)}}function S2(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&hi(t.type)||t.tag===4}function om(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||S2(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&&hi(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 im(t,r,i,l){var f=t.tag;if(f===5||f===6)f=t.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(f,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(f),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Ar)),_d(t,l),pt=!0;else if(f!==4&&(f===27&&(_d(t,l),l=null,hi(t.type)&&(i=t.stateNode,r=null)),t=t.child,t!==null))for(im(t,r,i,l),t=t.sibling;t!==null;)im(t,r,i,l),t=t.sibling}function Hd(t,r,i,l){var f=t.tag;if(f===5||f===6)f=t.stateNode,r?i.insertBefore(f,r):i.appendChild(f),_d(t,l),pt=!0;else if(f!==4&&(f===27&&(_d(t,l),l=null,hi(t.type)&&(i=t.stateNode)),t=t.child,t!==null))for(Hd(t,r,i,l),t=t.sibling;t!==null;)Hd(t,r,i,l),t=t.sibling}function w2(t){var r=t.stateNode,i=t.memoizedProps;try{for(var l=t.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);br(r,l,i),r[dn]=t,r[Mn]=i}catch(m){gn(t,t.return,m)}}var Ud=!1,ra=null;function R2(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Ud=!0)}var Za=null;function E2(){var t=Za;return Za=null,t}var Fr=0;function Ks(t,r,i,l,f){return Fr=0,C2(t.child,r,i,l,f)}function C2(t,r,i,l,f){for(var m=!1;t!==null;){if(t.tag===5){var E=t.stateNode;if(l!==null){var P=Vm(E);l.push(P),P.view&&(m=!0)}else m||Vm(E).view&&(m=!0);Ud=!0,E1(E,Fr===0?r:r+"_"+Fr,i),Fr++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&f||C2(t.child,r,i,l,f)&&(m=!0));t=t.sibling}return m}function Ja(t,r){for(;t!==null;)t.tag===5?C1(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&r||Ja(t.child,r)),t=t.sibling}function Fd(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Fd(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var r=t.memoizedProps;if(r.name==null||r.name==="auto")throw Error(o(544));var i=r.name;r=wo(r.default,r.share),r!=="none"&&(Ks(t,i,r,null,!1)||Ja(t.child,!1))}t=t.sibling}}function sm(t,r){if(t.tag===30){var i=t.stateNode,l=t.memoizedProps,f=So(l,i),m=wo(l.default,i.paired?l.share:l.enter);m!=="none"?Ks(t,f,m,null,!1)?(Fd(t),i.paired||r||el(t,l.onEnter)):Ja(t.child,!1):Fd(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)sm(t,r),t=t.sibling;else Fd(t)}function lm(t){if(ra!==null&&ra.size!==0){var r=ra;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var i=t.memoizedProps,l=i.name;if(l!=null&&l!=="auto"){var f=r.get(l);if(f!==void 0){var m=wo(i.default,i.share);if(m!=="none"&&(Ks(t,l,m,null,!1)?(m=t.stateNode,f.paired=m,m.paired=f,el(t,i.onShare)):Ja(t.child,!1)),r.delete(l),r.size===0)break}}}lm(t)}t=t.sibling}}}function um(t){if(t.tag===30){var r=t.memoizedProps,i=So(r,t.stateNode),l=ra!==null?ra.get(i):void 0,f=wo(r.default,l!==void 0?r.share:r.exit);f!=="none"&&(Ks(t,i,f,null,!1)?l!==void 0?(f=t.stateNode,l.paired=f,f.paired=l,ra.delete(i),el(t,r.onShare)):el(t,r.onExit):Ja(t.child,!1)),ra!==null&&lm(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)um(t),t=t.sibling;else ra!==null&&lm(t)}function T2(t){for(t=t.child;t!==null;){if(t.tag===30){var r=t.memoizedProps,i=So(r,t.stateNode);r=wo(r.default,r.update),t.flags&=-5,r!=="none"&&Ks(t,i,r,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&T2(t);t=t.sibling}}function cm(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var r=t.stateNode;r.paired!==null&&(r.paired=null,Ja(t.child,!1))}cm(t)}t=t.sibling}}function Bd(t){if(t.tag===30)t.stateNode.paired=null,Ja(t.child,!1),cm(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Bd(t),t=t.sibling;else cm(t)}function O2(t){for(t=t.child;t!==null;)t.tag===30?Ja(t.child,!1):(t.subtreeFlags&33554432)!==0&&O2(t),t=t.sibling}function dm(t,r,i,l,f,m,E){for(var P=!1;r!==null;){if(r.tag===5){var Q=r.stateNode;if(m!==null&&Fr<m.length){var ie=m[Fr],pe=Vm(Q);(ie.view||pe.view)&&(P=!0);var Ce;if(Ce=(t.flags&4)===0)if(pe.clip)Ce=!0;else{Ce=ie.rect;var ae=pe.rect;Ce=Ce.y!==ae.y||Ce.x!==ae.x||Ce.height!==ae.height||Ce.width!==ae.width}Ce&&(t.flags|=4),pe.abs?pe=!ie.abs:(ie=ie.rect,pe=pe.rect,pe=ie.height!==pe.height||ie.width!==pe.width),pe&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&E1(Q,Fr===0?i:i+"_"+Fr,f),P&&(t.flags&4)!==0||(Za===null&&(Za=[]),Za.push(Q,Fr===0?l:l+"_"+Fr,r.memoizedProps)),Fr++}else(r.tag!==22||r.memoizedState===null)&&(r.tag===30&&E?t.flags|=r.flags&32:dm(t,r.child,i,l,f,m,E)&&(P=!0));r=r.sibling}return P}function M2(t,r){for(t=t.child;t!==null;){if(t.tag===30){var i=t.memoizedProps,l=t.stateNode,f=So(i,l),m=wo(i.default,i.update),E;E=t.memoizedState,t.memoizedState=null,l=t;var P=t.child;Fr=0,f=dm(l,P,f,f,m,E,!1),(t.flags&4)!==0&&f&&el(t,i.onUpdate)}else(t.subtreeFlags&33554432)!==0&&M2(t);t=t.sibling}}var sr=!1,hn=!1,Wa=!1,fm=!1,A2=typeof WeakSet=="function"?WeakSet:Set,lr=null,eo=!1,Tu=!1,Vd=!1,hm=!1;function xD(t,r,i){if(t=t.containerInfo,_m=cl,t=jb(t),Wp(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var m=f.anchorOffset,E=f.focusNode;f=f.focusOffset;try{l.nodeType,E.nodeType}catch{l=null;break e}var P=0,Q=-1,ie=-1,pe=0,Ce=0,ae=t,fe=null;t:for(;;){for(var Ye;ae!==l||m!==0&&ae.nodeType!==3||(Q=P+m),ae!==E||f!==0&&ae.nodeType!==3||(ie=P+f),ae.nodeType===3&&(P+=ae.nodeValue.length),(Ye=ae.firstChild)!==null;)fe=ae,ae=Ye;for(;;){if(ae===t)break t;if(fe===l&&++pe===m&&(Q=P),fe===E&&++Ce===f&&(ie=P),(Ye=ae.nextSibling)!==null)break;ae=fe,fe=ae.parentNode}ae=Ye}l=Q===-1||ie===-1?null:{start:Q,end:ie}}else l=null}l=l||{start:0,end:0}}else l=null;for(Hm={focusedElem:t,selectionRange:l},cl=!1,i=(i&335544064)===i,lr=r,r=i?9270:1024;lr!==null;){if(t=lr,i&&(l=t.deletions,l!==null))for(m=0;m<l.length;m++)i&&um(l[m]);if(t.alternate===null&&(t.flags&2)!==0)i&&R2(t),qd(i);else{if(t.tag===22){if(l=t.alternate,t.memoizedState!==null){l!==null&&l.memoizedState===null&&i&&um(l),qd(i);continue}else if(l!==null&&l.memoizedState!==null){i&&R2(t),qd(i);continue}}l=t.child,(t.subtreeFlags&r)!==0&&l!==null?(l.return=t,lr=l):(i&&T2(t),qd(i))}}ra=null}function qd(t){for(;lr!==null;){var r=lr,i=t,l=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 15:break;case 1:if((f&1024)!==0&&l!==null){i=void 0,f=l.memoizedProps,l=l.memoizedState;var m=r.stateNode;try{var E=Wi(r.type,f);i=m.getSnapshotBeforeUpdate(E,l),m.__reactInternalSnapshotBeforeUpdate=i}catch(P){gn(r,r.return,P)}}break;case 3:if((f&1024)!==0){if(l=r.stateNode.containerInfo,i=l.nodeType,i===9)Km(l);else if(i===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":Km(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:i&&l!==null&&(i=So(l.memoizedProps,l.stateNode),f=r.memoizedProps,f=wo(f.default,f.update),f!=="none"&&Ks(l,i,f,l.memoizedState=[],!0));break;default:if((f&1024)!==0)throw Error(o(163))}if(l=r.sibling,l!==null){l.return=r.return,lr=l;break}lr=r.return}}function D2(t,r,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:to(t,i),l&4&&Eu(5,i);break;case 1:if(to(t,i),l&4)if(t=i.stateNode,r===null)try{t.componentDidMount()}catch(E){gn(i,i.return,E)}else{var f=Wi(i.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(f,r,t.__reactInternalSnapshotBeforeUpdate)}catch(E){gn(i,i.return,E)}}l&64&&v2(i),l&512&&Qa(i,i.return);break;case 3:if(to(t,i),l&64&&(t=i.updateQueue,t!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{sx(t,r)}catch(E){gn(i,i.return,E)}}break;case 27:r===null&&l&4&&w2(i);case 26:case 5:to(t,i),r===null&&l&4&&rm(i),l&512&&Qa(i,i.return);break;case 12:to(t,i);break;case 31:to(t,i),l&4&&k2(t,i);break;case 13:to(t,i),l&4&&P2(t,i),l&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=ID.bind(null,i),hN(t,i))));break;case 22:if(l=i.memoizedState!==null||sr,!l){var m=r!==null&&r.memoizedState!==null||hn;r=sr,f=hn,sr=l,(hn=m)&&!f?(l=2,(i.subtreeFlags&8772)!==0&&(l|=1),za(t,i,l)):to(t,i),sr=r,hn=f}break;case 30:to(t,i),l&512&&Qa(i,i.return);break;case 7:l&512&&Qa(i,i.return);default:to(t,i)}}function pm(t,r){for(t=t.child;t!==null;)N2(t,r),t=t.sibling}function N2(t,r){switch(t.tag){case 5:case 26:try{var i=t.stateNode;if(r){var l=i.style;typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"}else{var f=t.stateNode,m=t.memoizedProps.style,E=m!=null&&m.hasOwnProperty("display")?m.display:null;f.style.display=E==null||typeof E=="boolean"?"":(""+E).trim()}}catch(Q){gn(t,t.return,Q)}gm(t,r);break;case 6:try{t.stateNode.nodeValue=r?"":t.memoizedProps,pt=!0}catch(Q){gn(t,t.return,Q)}break;case 18:try{var P=t.stateNode;r?R1(P,!0):R1(t.stateNode,!1)}catch(Q){gn(t,t.return,Q)}break;case 22:case 23:t.memoizedState===null&&pm(t,r);break;default:pm(t,r)}}function gm(t,r){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var i=t,l=r;switch(i.tag){case 4:N2(i,l);break e;case 22:i.memoizedState===null&&gm(i,l);break e;default:gm(i,l)}}t=t.sibling}}function I2(t){var r=t.alternate;r!==null&&(t.alternate=null,I2(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Yn(r)),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 jn=null,Br=!1;function Pa(t,r,i){for(i=i.child;i!==null;)j2(t,r,i),i=i.sibling}function j2(t,r,i){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(ke,i)}catch{}switch(i.tag){case 26:hn||vr(i,r),Pa(t,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&!hn&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:hn||vr(i,r),Cu(i);var l=jn,f=Br;hi(i.type)&&(jn=i.stateNode,Br=!1),Pa(t,r,i),z1(i.stateNode,i.type,i.memoizedProps),jn=l,Br=f;break;case 5:hn||vr(i,r),Cu(i);case 6:if(i.tag===6&&Cu(i),l=jn,f=Br,jn=null,Pa(t,r,i),jn=l,Br=f,jn!==null)if(Br)try{(jn.nodeType===9?jn.body:jn.nodeName==="HTML"?jn.ownerDocument.body:jn).removeChild(i.stateNode),pt=!0}catch(m){gn(i,r,m)}else try{jn.removeChild(i.stateNode),pt=!0}catch(m){gn(i,r,m)}break;case 18:jn!==null&&(Br?(t=jn,w1(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),dl(t)):w1(jn,i.stateNode));break;case 4:l=jn,f=Br,jn=i.stateNode.containerInfo,Br=!0,Pa(t,r,i),jn=l,Br=f;break;case 0:case 11:case 14:case 15:ii(2,i,r),hn||ii(4,i,r),Pa(t,r,i);break;case 1:hn||(vr(i,r),l=i.stateNode,typeof l.componentWillUnmount=="function"&&b2(i,r,l)),Pa(t,r,i);break;case 21:Pa(t,r,i);break;case 22:hn=(l=hn)||i.memoizedState!==null,Pa(t,r,i),hn=l;break;case 30:vr(i,r),Pa(t,r,i);break;case 7:hn||vr(i,r),Pa(t,r,i);break;default:Pa(t,r,i)}}function k2(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{dl(t)}catch(i){gn(r,r.return,i)}}}function P2(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{dl(t)}catch(i){gn(r,r.return,i)}}function SD(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new A2),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new A2),r;default:throw Error(o(435,t.tag))}}function Yd(t,r){var i=SD(t);r.forEach(function(l){if(!i.has(l)){i.add(l);var f=jD.bind(null,t,l);l.then(f,f)}})}function Ir(t,r,i){var l=r.deletions;if(l!==null)for(var f=0;f<l.length;f++){var m=l[f],E=t,P=r,Q=P;e:for(;Q!==null;){switch(Q.tag){case 27:if(hi(Q.type)){jn=Q.stateNode,Br=!1;break e}break;case 5:jn=Q.stateNode,Br=!1;break e;case 3:case 4:jn=Q.stateNode.containerInfo,Br=!0;break e}Q=Q.return}if(jn===null)throw Error(o(160));j2(E,P,m),jn=null,Br=!1,E=m.alternate,E!==null&&(E.return=null),m.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)L2(r,t,i),r=r.sibling}var La=null;function L2(t,r,i){var l=t.alternate,f=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(f&4&&(l=t.updateQueue,l=l!==null?l.events:null,l!==null))for(var m=0;m<l.length;m++){var E=l[m];E.ref.impl=E.nextImpl}Ir(r,t,i),jr(t),f&4&&(ii(3,t,t.return),Eu(3,t),ii(5,t,t.return));break;case 1:Ir(r,t,i),jr(t),f&512&&(hn||l===null||vr(l,l.return)),f&64&&sr&&(t=t.updateQueue,t!==null&&(r=t.callbacks,r!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:if(m=La,Ir(r,t,i),jr(t),f&512&&(hn||l===null||vr(l,l.return)),f&4)if(f=l!==null?l.memoizedState:null,i=t.memoizedState,l===null)if(i===null)if(t.stateNode===null)if(sr)t.stateNode=b1(t.type,t.memoizedProps,r.containerInfo,t);else{e:{r=t.type,i=t.memoizedProps,f=m.ownerDocument||m;t:switch(r){case"title":l=f.getElementsByTagName("title")[0],(!l||l[pa]||l[dn]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=f.createElement(r),f.head.insertBefore(l,f.querySelector("head > title"))),br(l,r,i),l[dn]=t,Se(l),r=l;break e;case"link":if(m=V1("link","href",f).get(r+(i.href||""))){for(E=0;E<m.length;E++)if(l=m[E],l.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&l.getAttribute("rel")===(i.rel==null?null:i.rel)&&l.getAttribute("title")===(i.title==null?null:i.title)&&l.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){m.splice(E,1);break t}}l=f.createElement(r),br(l,r,i),f.head.appendChild(l);break;case"meta":if(m=V1("meta","content",f).get(r+(i.content||""))){for(E=0;E<m.length;E++)if(l=m[E],l.getAttribute("content")===(i.content==null?null:""+i.content)&&l.getAttribute("name")===(i.name==null?null:i.name)&&l.getAttribute("property")===(i.property==null?null:i.property)&&l.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&l.getAttribute("charset")===(i.charSet==null?null:i.charSet)){m.splice(E,1);break t}}l=f.createElement(r),br(l,r,i),f.head.appendChild(l);break;default:throw Error(o(468,r))}l[dn]=t,Se(l),r=l}t.stateNode=r}else sr||Wm(m,t.type,t.stateNode);else t.stateNode=B1(m,i,t.memoizedProps);else f!==i?(f===null?(r=l.stateNode,r===null||hn||r.parentNode.removeChild(r)):f.count--,i===null?sr||Wm(m,t.type,t.stateNode):B1(m,i,t.memoizedProps)):i===null&&t.stateNode!==null&&am(t,t.memoizedProps,l.memoizedProps);break;case 27:Ir(r,t,i),jr(t),f&512&&(hn||l===null||vr(l,l.return)),l!==null&&f&4&&am(t,t.memoizedProps,l.memoizedProps);break;case 5:if(m=Wa,Wa=!1,Ir(r,t,i),Wa=m,jr(t),f&512&&(hn||l===null||vr(l,l.return)),t.flags&32){r=t.stateNode;try{Mr(r,""),pt=!0}catch(pe){gn(t,t.return,pe)}}f&4&&t.stateNode!=null&&(r=t.memoizedProps,am(t,r,l!==null?l.memoizedProps:r)),f&1024&&(fm=!0);break;case 6:if(Ir(r,t,i),jr(t),f&4){if(t.stateNode===null)throw Error(o(162));r=t.memoizedProps,i=t.stateNode;try{i.nodeValue=r,pt=!0}catch(pe){gn(t,t.return,pe)}}break;case 3:if(pt=!1,sf=null,m=La,La=Pu(r.containerInfo),Ir(r,t,i),La=m,jr(t),f&4&&l!==null&&l.memoizedState.isDehydrated)try{dl(r.containerInfo)}catch(pe){gn(t,t.return,pe)}fm&&(fm=!1,z2(t)),pt=!1;break;case 4:f=Wa,Wa=sr,l=nr(),m=La,La=Pu(t.stateNode.containerInfo),Ir(r,t,i),jr(t),La=m,pt&&Tu&&(Vd=!0),pt=l,Wa=f;break;case 12:Ir(r,t,i),jr(t);break;case 31:Ir(r,t,i),jr(t),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Yd(t,r)));break;case 13:Ir(r,t,i),jr(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&($d=xt()),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Yd(t,r)));break;case 22:m=t.memoizedState!==null,E=l!==null&&l.memoizedState!==null;var P=sr,Q=hn,ie=Wa;sr=P||m,Wa=ie||m,hn=Q||E,Ir(r,t,i),hn=Q,Wa=ie,sr=P,jr(t),f&8192&&(r=t.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,!m||l===null||E||sr||hn||(r=E||hn,i=sr,l=hn,sr=m||sr,hn=r,si(t,2),sr=i,hn=l),!m&&Wa||pm(t,m)),f&4&&(r=t.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,Yd(t,i))));break;case 19:Ir(r,t,i),jr(t),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Yd(t,r)));break;case 30:f&512&&(hn||l===null||vr(l,l.return)),f=nr(),m=Tu,E=(i&335544064)===i,P=t.memoizedProps,Tu=E&&wo(P.default,P.update)!=="none",Ir(r,t,i),jr(t),E&&l!==null&&pt&&(t.flags|=4),Tu=m,pt=f;break;case 21:break;case 7:f&512&&(hn||l===null||vr(l,l.return)),l&&l.stateNode!==null&&(l.stateNode._fragmentFiber=t);default:Ir(r,t,i),jr(t)}}function jr(t){var r=t.flags;if(r&2){try{for(var i,l=t.return;l!==null;){if(S2(l)){i=l;break}l=l.return}l=null;for(var f=t.return;f!==null;){if(nm(f)){var m=f.stateNode;l===null?l=[m]:l.push(m)}if(tm(f))break;f=f.return}var E=l;if(i==null)throw Error(o(160));switch(i.tag){case 27:var P=i.stateNode,Q=om(t);Hd(t,Q,P,E);break;case 5:var ie=i.stateNode;i.flags&32&&(Mr(ie,""),i.flags&=-33);var pe=om(t);Hd(t,pe,ie,E);break;case 3:case 4:var Ce=i.stateNode.containerInfo,ae=om(t);im(t,ae,Ce,E);break;default:throw Error(o(161))}}catch(fe){gn(t,t.return,fe)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function z2(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;z2(r),r.tag===5&&r.flags&1024&&(r=r.stateNode,cl=!0,r.reset(),cl=!1),t=t.sibling}}function Gs(t,r){if(r.subtreeFlags&9270)for(r=r.child;r!==null;)_2(r,t),r=r.sibling;else M2(r)}function _2(t,r){var i=t.alternate;if(i===null)sm(t,!1);else switch(t.tag){case 3:if(hm=eo=!1,E2(),Gs(r,t),!eo&&!Vd){if(t=Za,t!==null)for(var l=0;l<t.length;l+=3){i=t[l];var f=t[l+1];C1(i,t[l+2]),i=i.ownerDocument.documentElement,i!==null&&i.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+f+")"})}t=r.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),hm=!0}Za=null;break;case 5:Gs(r,t);break;case 4:l=eo,eo=!1,Gs(r,t),eo&&(Vd=!0),eo=l;break;case 22:t.memoizedState===null&&(i.memoizedState!==null?sm(t,!1):Gs(r,t));break;case 30:l=eo,f=E2(),eo=!1,Gs(r,t),eo&&(t.flags|=4);var m=t.memoizedProps,E=t.stateNode;r=So(m,E),E=So(i.memoizedProps,E);var P=wo(m.default,m.update);P==="none"?r=!1:(m=i.memoizedState,i.memoizedState=null,i=t.child,Fr=0,r=dm(t,i,r,E,P,m,!0),Fr!==(m===null?0:m.length)&&(t.flags|=32)),(t.flags&4)!==0&&r?(el(t,t.memoizedProps.onUpdate),Za=f):f!==null&&(f.push.apply(f,Za),Za=f),eo=(t.flags&32)!==0?!0:l;break;default:Gs(r,t)}}function to(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)D2(t,r.alternate,r),r=r.sibling}function si(t,r){for(t=t.child;t!==null;){var i=t,l=r;switch(i.tag){case 0:case 11:case 14:case 15:ii(4,i,i.return),si(i,l);break;case 1:vr(i,i.return);var f=i.stateNode;typeof f.componentWillUnmount=="function"&&b2(i,i.return,f),si(i,l);break;case 27:(l&2)!==0&&z1(i.stateNode,i.type,i.memoizedProps);case 5:vr(i,i.return),i.tag!==5&&i.tag!==27||Cu(i),si(i,l);break;case 6:Cu(i);break;case 26:vr(i,i.return),f=i.stateNode,i.memoizedState!==null||f===null||hn||f.parentNode.removeChild(f),si(i,l);break;case 22:i.memoizedState===null&&si(i,l);break;case 30:vr(i,i.return),si(i,l);break;case 7:vr(i,i.return);default:si(i,l)}t=t.sibling}}function za(t,r,i){for(i=(r.subtreeFlags&8772)!==0?i:i&-2,r=r.child;r!==null;){var l=r.alternate,f=t,m=r,E=m.flags,P=(i&1)!==0;switch(m.tag){case 0:case 11:case 15:za(f,m,i),Eu(4,m);break;case 1:if(za(f,m,i),l=m,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(pe){gn(l,l.return,pe)}if(l=m,f=l.updateQueue,f!==null){var Q=l.stateNode;try{var ie=f.shared.hiddenCallbacks;if(ie!==null)for(f.shared.hiddenCallbacks=null,f=0;f<ie.length;f++)ix(ie[f],Q)}catch(pe){gn(l,l.return,pe)}}P&&E&64&&v2(m),Qa(m,m.return);break;case 27:(i&2)!==0&&w2(m);case 5:m.tag!==5&&m.tag!==27||x2(m),za(f,m,i),P&&l===null&&E&4&&rm(m),Qa(m,m.return);break;case 6:x2(m);break;case 26:Q=m.stateNode,m.memoizedState!==null||Q===null||sr||Wm(Pu(Q.ownerDocument),m.type,Q),za(f,m,i),P&&l===null&&E&4&&rm(m),Qa(m,m.return);break;case 12:za(f,m,i);break;case 31:za(f,m,i),P&&E&4&&k2(f,m);break;case 13:za(f,m,i),P&&E&4&&P2(f,m);break;case 22:m.memoizedState===null&&za(f,m,i),Qa(m,m.return);break;case 30:za(f,m,i),Qa(m,m.return);break;case 7:Qa(m,m.return);default:za(f,m,i)}r=r.sibling}}function mm(t,r){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&du(i))}function ym(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&du(t))}function Sa(t,r,i,l){var f=(i&335544064)===i;if(r.subtreeFlags&(f?10262:10256))for(r=r.child;r!==null;)H2(t,r,i,l),r=r.sibling;else f&&O2(r)}function H2(t,r,i,l){var f=(i&335544064)===i;f&&r.alternate===null&&r.return!==null&&r.return.alternate!==null&&Bd(r);var m=r.flags;switch(r.tag){case 0:case 11:case 15:Sa(t,r,i,l),m&2048&&Eu(9,r);break;case 1:Sa(t,r,i,l);break;case 3:Sa(t,r,i,l),f&&hm&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),m&2048&&(m=null,r.alternate!==null&&(m=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==m&&(r.refCount++,m!=null&&du(m)));break;case 12:if(m&2048){Sa(t,r,i,l),m=r.stateNode;try{var E=r.memoizedProps,P=E.id,Q=E.onPostCommit;typeof Q=="function"&&Q(P,r.alternate===null?"mount":"update",m.passiveEffectDuration,-0)}catch(ie){gn(r,r.return,ie)}}else Sa(t,r,i,l);break;case 31:Sa(t,r,i,l);break;case 13:Sa(t,r,i,l);break;case 23:break;case 22:E=r.stateNode,P=r.alternate,r.memoizedState!==null?(f&&P!==null&&P.memoizedState===null&&Bd(P),E._visibility&2?Sa(t,r,i,l):Ou(t,r)):(f&&P!==null&&P.memoizedState!==null&&Bd(r),E._visibility&2?Sa(t,r,i,l):(E._visibility|=2,$s(t,r,i,l,(r.subtreeFlags&10256)!==0||!1))),m&2048&&mm(P,r);break;case 24:Sa(t,r,i,l),m&2048&&ym(r.alternate,r);break;case 30:f&&(m=r.alternate,m!==null&&(Ja(m.child,!0),Ja(r.child,!0))),Sa(t,r,i,l);break;default:Sa(t,r,i,l)}}function $s(t,r,i,l,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=t,E=r,P=i,Q=l,ie=E.flags;switch(E.tag){case 0:case 11:case 15:$s(m,E,P,Q,f),Eu(8,E);break;case 23:break;case 22:var pe=E.stateNode;E.memoizedState!==null?pe._visibility&2?$s(m,E,P,Q,f):Ou(m,E):(pe._visibility|=2,$s(m,E,P,Q,f)),f&&ie&2048&&mm(E.alternate,E);break;case 24:$s(m,E,P,Q,f),f&&ie&2048&&ym(E.alternate,E);break;default:$s(m,E,P,Q,f)}r=r.sibling}}function Ou(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=t,l=r,f=l.flags;switch(l.tag){case 22:Ou(i,l),f&2048&&mm(l.alternate,l);break;case 24:Ou(i,l),f&2048&&ym(l.alternate,l);break;default:Ou(i,l)}r=r.sibling}}var es=8192;function ts(t,r,i){if(t.subtreeFlags&es)for(t=t.child;t!==null;)U2(t,r,i),t=t.sibling}function U2(t,r,i){switch(t.tag){case 26:ts(t,r,i),t.flags&es&&(t.memoizedState!==null?ON(i,La,t.memoizedState,t.memoizedProps):(t=t.stateNode,(r&335544128)===r&&G1(i,t)));break;case 5:ts(t,r,i),t.flags&es&&(t=t.stateNode,(r&335544128)===r&&G1(i,t));break;case 3:case 4:var l=La;La=Pu(t.stateNode.containerInfo),ts(t,r,i),La=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=es,es=16777216,ts(t,r,i),es=l):ts(t,r,i));break;case 30:if((t.flags&es)!==0&&(l=t.memoizedProps.name,l!=null&&l!=="auto")){var f=t.stateNode;f.paired=null,ra===null&&(ra=new Map),ra.set(l,f)}ts(t,r,i);break;default:ts(t,r,i)}}function F2(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Mu(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];lr=l,V2(l,t)}F2(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)B2(t),t=t.sibling}function B2(t){switch(t.tag){case 0:case 11:case 15:Mu(t),t.flags&2048&&ii(9,t,t.return);break;case 3:Mu(t);break;case 12:Mu(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Kd(t)):Mu(t);break;default:Mu(t)}}function Kd(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];lr=l,V2(l,t)}F2(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:ii(8,r,r.return),Kd(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Kd(r));break;default:Kd(r)}t=t.sibling}}function V2(t,r){for(;lr!==null;){var i=lr;switch(i.tag){case 0:case 11:case 15:ii(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:du(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,lr=l;else e:for(i=t;lr!==null;){l=lr;var f=l.sibling,m=l.return;if(I2(l),l===i){lr=null;break e}if(f!==null){f.return=m,lr=f;break e}lr=m}}}var wD={getCacheForType:function(t){var r=gr(Xn),i=r.data.get(t);return i===void 0&&(i=t(),r.data.set(t,i)),i},cacheSignal:function(){return gr(Xn).controller.signal}},RD=typeof WeakMap=="function"?WeakMap:Map,ln=0,Tn=null,qt=null,Xt=0,pn=0,aa=null,li=!1,Xs=!1,vm=!1,No=0,Vn=0,ui=0,ns=0,Gd=0,oa=0,Qs=0,Au=null,Vr=null,bm=!1,$d=0,q2=0,Xd=1/0,Qd=null,ci=null,zn=0,_a=null,rs=null,no=0,xm=0,Sm=null,Y2=null,Zs=null,Js=null,Ws=null,Du=0,Zd=null;function ia(){return(ln&2)!==0&&Xt!==0?Xt&-Xt:ge.T!==null?Nm():Cn()}function K2(){if(oa===0)if((Xt&536870912)===0||Ft){var t=ye;ye<<=1,(ye&3932160)===0&&(ye=262144),oa=t}else oa=536870912;return t=mr.current,t!==null&&(t.flags|=32),oa}function el(t,r){if(r!=null){var i=t.stateNode,l=i.ref;l===null&&(l=i.ref=T1(So(t.memoizedProps,i))),Js===null&&(Js=[]),Js.push(r.bind(null,l))}}function qr(t,r,i){(t===Tn&&(pn===2||pn===9)||t.cancelPendingCommit!==null)&&(tl(t,0),di(t,Xt,oa,!1)),ct(t,i),((ln&2)===0||t!==Tn)&&(t===Tn&&((ln&2)===0&&(ns|=i),Vn===4&&di(t,Xt,oa,!1)),ro(t))}function G2(t,r,i){if((ln&6)!==0)throw Error(o(327));var l=!i&&(r&127)===0&&(r&t.expiredLanes)===0||Xe(t,r),f=l?TD(t,r):Rm(t,r,!0),m=l;do{if(f===0){Xs&&!l&&di(t,r,0,!1);break}else{if(i=t.current.alternate,m&&!ED(i)){f=Rm(t,r,!1),m=!1;continue}if(f===2){if(m=r,t.errorRecoveryDisabledLanes&m)var E=0;else E=t.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){r=E;e:{var P=t;f=Au;var Q=P.current.memoizedState.isDehydrated;if(Q&&(tl(P,E).flags|=256),E=Rm(P,E,!1),E!==2&&E!==6){if(vm&&!Q){P.errorRecoveryDisabledLanes|=m,ns|=m,f=4;break e}m=Vr,Vr=f,m!==null&&(Vr===null?Vr=m:Vr.push.apply(Vr,m))}f=E}if(m=!1,f!==2)continue}}if(f===1){tl(t,0),di(t,r,0,!0);break}e:{switch(l=t,m=f,m){case 0:case 1:throw Error(o(345));case 4:if((r&4194048)!==r&&(r&62914560)!==r)break;case 6:di(l,r,oa,!li);break e;case 2:Vr=null;break;case 3:case 5:break;default:throw Error(o(329))}if((r&62914560)===r&&(f=$d+300-xt(),10<f)){if(di(l,r,oa,!li),Ve(l,0,!0)!==0)break e;no=r,l.timeoutHandle=Bm($2.bind(null,l,i,Vr,Qd,bm,r,oa,ns,Qs,li,m,"Throttled",-0,0),f);break e}$2(l,i,Vr,Qd,bm,r,oa,ns,Qs,li,m,null,-0,0)}}break}while(!0);ro(t)}function $2(t,r,i,l,f,m,E,P,Q,ie,pe,Ce,ae,fe){t.timeoutHandle=-1;var Ye=r.subtreeFlags,rt=(m&335544064)===m;if(Ce=null,(rt||Ye&8192||(Ye&16785408)===16785408)&&(Ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ar},ra=null,U2(r,m,Ce),rt&&(Ye=Ce,rt=t.containerInfo,rt=(rt.nodeType===9?rt:rt.ownerDocument).__reactViewTransition,rt!=null&&(Ye.count++,Ye.waitingForViewTransition=!0,Ye=_u.bind(Ye),rt.finished.then(Ye,Ye))),Ye=(m&62914560)===m?$d-xt():(m&4194048)===m?q2-xt():0,Ye=MN(Ce,Ye),Ye!==null)){no=m,t.cancelPendingCommit=Ye(n1.bind(null,t,r,m,i,l,f,E,P,Q,ie,pe,Ce,null,ae,fe)),di(t,m,E,!ie);return}n1(t,r,m,i,l,f,E,P,Q,ie,pe,Ce)}function ED(t){for(var r=t;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var f=i[l],m=f.getSnapshot;f=f.value;try{if(!ta(m(),f))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function di(t,r,i,l){r=$e(t,r),r&=~Gd,r&=~ns,t.suspendedLanes|=r,t.pingedLanes&=~r,l&&(t.warmLanes|=r),l=t.expirationTimes;for(var f=r;0<f;){var m=31-et(f),E=1<<m;l[m]=-1,f&=~E}i!==0&&Ht(t,i,r)}function Jd(){return(ln&6)===0?(Nu(0),!1):!0}function wm(){if(qt!==null){if(pn===0)var t=qt.return;else t=qt,Co=qi=null,Dg(t),Fs=null,pu=0,t=qt;for(;t!==null;)y2(t.alternate,t),t=t.return;qt=null}}function tl(t,r){var i=t.timeoutHandle;return i!==-1&&(t.timeoutHandle=-1,$D(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),no=0,wm(),Tn=t,qt=i=Ro(t.current,null),Xt=r,pn=0,aa=null,li=!1,Xs=Xe(t,r),vm=!1,Qs=oa=Gd=ns=ui=Vn=0,Vr=Au=null,bm=!1,No=$e(t,r),id(),i}function X2(t,r){Nt=null,ge.H=Nd,r===Us||r===yd?(r=nx(),pn=3):r===yg?(r=nx(),pn=4):pn=r===Yg?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,aa=r,qt===null&&(Vn=1,Id(t,ya(r,t.current)))}function Q2(){var t=mr.current;return t===null?!0:(Xt&4194048)===Xt?Rr===null:(Xt&62914560)===Xt||(Xt&536870912)!==0?t===Rr:!1}function Z2(){var t=ge.H;return ge.H=Nd,t===null?Nd:t}function J2(){var t=ge.A;return ge.A=wD,t}function Wd(){Vn=4,li||(Xt&4194048)!==Xt&&mr.current!==null||(Xs=!0),(ui&134217727)===0&&(ns&134217727)===0||Tn===null||di(Tn,Xt,oa,!1)}function Rm(t,r,i){var l=ln;ln|=2;var f=Z2(),m=J2();(Tn!==t||Xt!==r)&&(Qd=null,tl(t,r)),r=!1;var E=Vn;e:do try{if(pn!==0&&qt!==null){var P=qt,Q=aa;switch(pn){case 8:wm(),E=6;break e;case 3:case 2:case 9:case 6:mr.current===null&&(r=!0);var ie=pn;if(pn=0,aa=null,nl(t,P,Q,ie),i&&Xs){E=0;break e}break;default:ie=pn,pn=0,aa=null,nl(t,P,Q,ie)}}CD(),E=Vn;break}catch(pe){X2(t,pe)}while(!0);return r&&t.shellSuspendCounter++,Co=qi=null,ln=l,ge.H=f,ge.A=m,qt===null&&(Tn=null,Xt=0,id()),E}function CD(){for(;qt!==null;)W2(qt)}function TD(t,r){var i=ln;ln|=2;var l=Z2(),f=J2();Tn!==t||Xt!==r?(Qd=null,Xd=xt()+500,tl(t,r)):Xs=Xe(t,r);e:do try{if(pn!==0&&qt!==null){r=qt;var m=aa;t:switch(pn){case 1:pn=0,aa=null,nl(t,r,m,1);break;case 2:case 9:if(ex(m)){pn=0,aa=null,e1(r);break}r=function(){pn!==2&&pn!==9||Tn!==t||(pn=7),ro(t)},m.then(r,r);break e;case 3:pn=7;break e;case 4:pn=5;break e;case 7:ex(m)?(pn=0,aa=null,e1(r)):(pn=0,aa=null,nl(t,r,m,7));break;case 5:var E=null;switch(qt.tag){case 26:E=qt.memoizedState;case 5:case 27:var P=qt;if(E?Y1(E):P.stateNode.complete){pn=0,aa=null;var Q=P.sibling;if(Q!==null)qt=Q;else{var ie=P.return;ie!==null?(qt=ie,ef(ie)):qt=null}break t}}pn=0,aa=null,nl(t,r,m,5);break;case 6:pn=0,aa=null,nl(t,r,m,6);break;case 8:wm(),Vn=6;break e;default:throw Error(o(462))}}OD();break}catch(pe){X2(t,pe)}while(!0);return Co=qi=null,ge.H=l,ge.A=f,ln=i,qt!==null?0:(Tn=null,Xt=0,id(),Vn)}function OD(){for(;qt!==null&&!Wt();)W2(qt)}function W2(t){var r=g2(t.alternate,t,No);t.memoizedProps=t.pendingProps,r===null?ef(t):qt=r}function e1(t){var r=t,i=r.alternate;switch(r.tag){case 15:case 0:r=l2(i,r,r.pendingProps,r.type,void 0,Xt);break;case 11:r=l2(i,r,r.pendingProps,r.type.render,r.ref,Xt);break;case 5:Dg(r);var l=r;l===ir&&(Ft?(fd(l),l.tag===5&&l.stateNode!=null&&(An=l.stateNode)):(fd(l),Ft=!0));default:y2(i,r),r=qt=Vb(r,No),r=g2(i,r,No)}t.memoizedProps=t.pendingProps,r===null?ef(t):qt=r}function nl(t,r,i,l){Co=qi=null,Dg(r),Fs=null,pu=0;var f=r.return;try{if(pD(t,f,r,i,Xt)){Vn=1,Id(t,ya(i,t.current)),qt=null;return}}catch(m){if(f!==null)throw qt=f,m;Vn=1,Id(t,ya(i,t.current)),qt=null;return}r.flags&32768?(Ft||l===1?t=!0:Xs||(Xt&536870912)!==0?t=!1:(li=t=!0,(l===2||l===9||l===3||l===6)&&(l=mr.current,l!==null&&l.tag===13&&(l.flags|=16384))),t1(r,t)):ef(r)}function ef(t){var r=t;do{if((r.flags&32768)!==0){t1(r,li);return}t=r.return;var i=vD(r.alternate,r,No);if(i!==null){qt=i;return}if(r=r.sibling,r!==null){qt=r;return}qt=r=t}while(r!==null);Vn===0&&(Vn=5)}function t1(t,r){do{var i=bD(t.alternate,t);if(i!==null){i.flags&=32767,qt=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(t=t.sibling,t!==null)){qt=t;return}qt=t=i}while(t!==null);Vn=6,qt=null}function n1(t,r,i,l,f,m,E,P,Q,ie,pe,Ce){t.cancelPendingCommit=null;do tf();while(zn!==0);if((ln&6)!==0)throw Error(o(327));if(r!==null){if(r===t.current)throw Error(o(177));t===Tn&&(qt=Tn=null,Xt=0),rs=r,_a=t,no=i,Sm=f,Y2=l,MD(t,r,i,E,P,Q,Ce)}}function MD(t,r,i,l,f,m,E){var P=r.lanes|r.childLanes;if(xm=P,P|=ag,Bt(t,i,P,l,f,m),Js=null,(i&335544064)===i?(Ws=nD(t),l=10262):(Ws=null,l=10256),(r.subtreeFlags&l)!==0||(r.flags&l)!==0?(t.callbackNode=null,t.callbackPriority=0,kD(gt,function(){return Om(),null})):(t.callbackNode=null,t.callbackPriority=0),Ud=!1,l=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null,f=ce.p,ce.p=2,m=ln,ln|=4;try{xD(t,r,i)}finally{ln=m,ce.p=f,ge.T=l}}zn=1,Ud?Zs=eN(E,t.containerInfo,Ws,Em,Cm,DD,Tm,Om,AD):(Em(),Cm(),Tm())}function AD(t){if(zn!==0){var r=_a.onRecoverableError;r(t,{componentStack:null})}}function DD(){zn===3&&(zn=0,_2(rs,_a),zn=4)}function Em(){if(zn===1){zn=0;var t=_a,r=rs,i=no,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null;var f=ce.p;ce.p=2;var m=ln;ln|=4;try{Tu=Vd=!1,L2(r,t,i),i=Hm;var E=jb(t.containerInfo),P=i.focusedElem,Q=i.selectionRange;if(E!==P&&P&&P.ownerDocument&&Ib(P.ownerDocument.documentElement,P)){if(Q!==null&&Wp(P)){var ie=Q.start,pe=Q.end;if(pe===void 0&&(pe=ie),"selectionStart"in P)P.selectionStart=ie,P.selectionEnd=Math.min(pe,P.value.length);else{var Ce=P.ownerDocument||document,ae=Ce&&Ce.defaultView||window;if(ae.getSelection){var fe=ae.getSelection(),Ye=P.textContent.length,rt=Math.min(Q.start,Ye),It=Q.end===void 0?rt:Math.min(Q.end,Ye);!fe.extend&&rt>It&&(E=It,It=rt,rt=E);var oe=Nb(P,rt),te=Nb(P,It);if(oe&&te&&(fe.rangeCount!==1||fe.anchorNode!==oe.node||fe.anchorOffset!==oe.offset||fe.focusNode!==te.node||fe.focusOffset!==te.offset)){var ue=Ce.createRange();ue.setStart(oe.node,oe.offset),fe.removeAllRanges(),rt>It?(fe.addRange(ue),fe.extend(te.node,te.offset)):(ue.setEnd(te.node,te.offset),fe.addRange(ue))}}}}for(Ce=[],fe=P;fe=fe.parentNode;)fe.nodeType===1&&Ce.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<Ce.length;P++){var Ee=Ce[P];Ee.element.scrollLeft=Ee.left,Ee.element.scrollTop=Ee.top}}cl=!!_m,Hm=_m=null}finally{ln=m,ce.p=f,ge.T=l}}t.current=r,zn=2}}function Cm(){if(zn===2){zn=0;var t=_a,r=rs,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=ge.T,ge.T=null;var l=ce.p;ce.p=2;var f=ln;ln|=4;try{D2(t,r.alternate,r)}finally{ln=f,ce.p=l,ge.T=i}}zn=3}}function Tm(){if(zn===4||zn===3){zn=0;var t=Zs;Zs=null,We();var r=_a,i=rs,l=no,f=Y2,m=(l&335544064)===l?10262:10256;if((i.subtreeFlags&m)!==0||(i.flags&m)!==0?zn=5:(zn=0,rs=_a=null,r1(r,r.pendingLanes)),m=r.pendingLanes,m===0&&(ci=null),En(l),i=i.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(ke,i,void 0,(i.current.flags&128)===128)}catch{}if(f!==null){i=ge.T,m=ce.p,ce.p=2,ge.T=null;try{for(var E=r.onRecoverableError,P=0;P<f.length;P++){var Q=f[P];E(Q.value,{componentStack:Q.stack})}}finally{ge.T=i,ce.p=m}}if(f=Js,E=Ws,Ws=null,f!==null&&(Js=null,E===null&&(E=[]),t!==null))for(Q=0;Q<f.length;Q++)i=(0,f[Q])(E),i!==void 0&&t.finished.finally(i);(no&3)!==0&&tf(),ro(r),m=r.pendingLanes,(l&261930)!==0&&(m&42)!==0?r===Zd?Du++:(Du=0,Zd=r):(Du=0,Zd=null),Nu(0)}}function r1(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,du(r)))}function tf(){return Zs!==null&&(Zs.skipTransition(),Zs=null),Em(),Cm(),Tm(),Om()}function Om(){if(zn!==5)return!1;var t=_a,r=xm;xm=0;var i=En(no),l=ge.T,f=ce.p;try{ce.p=32>i?32:i,ge.T=null,i=Sm,Sm=null;var m=_a,E=no;if(zn=0,rs=_a=null,no=0,(ln&6)!==0)throw Error(o(331));var P=ln;if(ln|=4,B2(m.current),H2(m,m.current,E,i),ln=P,Nu(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(ke,m)}catch{}return!0}finally{ce.p=f,ge.T=l,r1(t,r)}}function a1(t,r,i){r=ya(i,r),r=qg(t.stateNode,r,2),t=ni(t,r,2),t!==null&&(ct(t,2),ro(t))}function gn(t,r,i){if(t.tag===3)a1(t,t,i);else for(;r!==null;){if(r.tag===3){a1(r,t,i);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ci===null||!ci.has(l))){t=ya(i,t),i=e2(2),l=ni(r,i,2),l!==null&&(t2(i,l,r,t),ct(l,2),ro(l));break}}r=r.return}}function Mm(t,r,i){var l=t.pingCache;if(l===null){l=t.pingCache=new RD;var f=new Set;l.set(r,f)}else f=l.get(r),f===void 0&&(f=new Set,l.set(r,f));f.has(i)||(vm=!0,f.add(i),t=ND.bind(null,t,r,i),r.then(t,t))}function ND(t,r,i){var l=t.pingCache;l!==null&&l.delete(r),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Tn===t&&(Xt&i)===i&&((Vn===4||Vn===3&&(Xt&62914560)===Xt&&300>xt()-$d)&&(ln&2)===0?tl(t,0):Gd|=i,Qs===Xt&&(Qs=0)),ro(t)}function o1(t,r){r===0&&(r=tt()),t=Fi(t,r),t!==null&&(ct(t,r),ro(t))}function ID(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),o1(t,i)}function jD(t,r){var i=0;switch(t.tag){case 31:case 13:var l=t.stateNode,f=t.memoizedState;f!==null&&(i=f.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(r),o1(t,i)}function kD(t,r){return Jt(t,r)}var rl=null,al=null,Am=!1,nf=!1,Dm=!1,fi=0;function ro(t){t!==al&&t.next===null&&(al===null?rl=al=t:al=al.next=t),nf=!0,Am||(Am=!0,LD())}function Nu(t,r){if(!Dm&&nf){Dm=!0;do for(var i=!1,l=rl;l!==null;){if(t!==0){var f=l.pendingLanes;if(f===0)var m=0;else{var E=l.suspendedLanes,P=l.pingedLanes;m=(1<<31-et(42|t)+1)-1,m&=f&~(E&~P),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(i=!0,u1(l,m))}else m=Xt,m=Ve(l,l===Tn?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||Xe(l,m)||(i=!0,u1(l,m));l=l.next}while(i);Dm=!1}}function PD(){i1()}function i1(){nf=Am=!1;var t=0;fi!==0&&GD()&&(t=fi);for(var r=xt(),i=null,l=rl;l!==null;){var f=l.next,m=s1(l,r);m===0?(l.next=null,i===null?rl=f:i.next=f,f===null&&(al=i)):(i=l,(t!==0||(m&3)!==0)&&(nf=!0)),l=f}zn!==0&&zn!==5||Nu(t),fi!==0&&(fi=0)}function s1(t,r){for(var i=t.suspendedLanes,l=t.pingedLanes,f=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var E=31-et(m),P=1<<E,Q=f[E];Q===-1?((P&i)===0||(P&l)!==0)&&(f[E]=st(P,r)):Q<=r&&(t.expiredLanes|=P),m&=~P}if(r=Tn,i=Xt,i=Ve(t,t===r?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,i===0||t===r&&(pn===2||pn===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&rn(l),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||Xe(t,i)){if(r=i&-i,r===t.callbackPriority)return r;switch(l!==null&&rn(l),En(i)){case 2:case 8:i=vt;break;case 32:i=gt;break;case 268435456:i=un;break;default:i=gt}return l=l1.bind(null,t),i=Jt(i,l),t.callbackPriority=r,t.callbackNode=i,r}return l!==null&&l!==null&&rn(l),t.callbackPriority=2,t.callbackNode=null,2}function l1(t,r){if(zn!==0&&zn!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(tf()&&t.callbackNode!==i)return null;var l=Xt;return l=Ve(t,t===Tn?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(G2(t,l,r),s1(t,xt()),t.callbackNode!=null&&t.callbackNode===i?l1.bind(null,t):null)}function u1(t,r){if(tf())return null;G2(t,r,!0)}function LD(){XD(function(){(ln&6)!==0?Jt(ft,PD):i1()})}function Nm(){if(fi===0){var t=Gi;t===0&&(t=ne,ne<<=1,(ne&261888)===0&&(ne=256)),fi=t}return fi}function c1(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:hr(t)}function zD(t,r,i,l,f){if(r==="submit"&&i&&i.stateNode===f){var m=c1((f[Mn]||null).action),E=l.submitter;E&&(r=(r=E[Mn]||null)?c1(r.formAction):E.getAttribute("formAction"),r!==null&&(m=r,E=null));var P=new nd("action","action",null,l,f);t.push({event:P,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(fi!==0){var Q=new FormData(f,E);Hg(i,{pending:!0,data:Q,method:f.method,action:m},null,Q)}}else typeof m=="function"&&(P.preventDefault(),Q=new FormData(f,E),Hg(i,{pending:!0,data:Q,method:f.method,action:m},m,Q))},currentTarget:f}]})}}for(var Im=0;Im<rg.length;Im++){var jm=rg[Im],_D=jm.toLowerCase(),HD=jm[0].toUpperCase()+jm.slice(1);ka(_D,"on"+HD)}ka(Lb,"onAnimationEnd"),ka(zb,"onAnimationIteration"),ka(_b,"onAnimationStart"),ka("dblclick","onDoubleClick"),ka("focusin","onFocus"),ka("focusout","onBlur"),ka($A,"onTransitionRun"),ka(XA,"onTransitionStart"),ka(QA,"onTransitionCancel"),ka(Hb,"onTransitionEnd"),vn("onMouseEnter",["mouseout","mouseover"]),vn("onMouseLeave",["mouseout","mouseover"]),vn("onPointerEnter",["pointerout","pointerover"]),vn("onPointerLeave",["pointerout","pointerover"]),zt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zt("onBeforeInput",["compositionend","keypress","textInput","paste"]),zt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Iu="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(" "),UD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Iu));function d1(t,r){r=(r&4)!==0;for(var i=0;i<t.length;i++){var l=t[i],f=l.event;l=l.listeners;e:{var m=void 0;if(r)for(var E=l.length-1;0<=E;E--){var P=l[E],Q=P.instance,ie=P.currentTarget;if(P=P.listener,Q!==m&&f.isPropagationStopped())break e;m=P,f.currentTarget=ie;try{m(f)}catch(pe){od(pe)}f.currentTarget=null,m=Q}else for(E=0;E<l.length;E++){if(P=l[E],Q=P.instance,ie=P.currentTarget,P=P.listener,Q!==m&&f.isPropagationStopped())break e;m=P,f.currentTarget=ie;try{m(f)}catch(pe){od(pe)}f.currentTarget=null,m=Q}}}}function Yt(t,r){var i=r[vo];i===void 0&&(i=r[vo]=new Set);var l=t+"__bubble";i.has(l)||(f1(r,t,2,!1),i.add(l))}function km(t,r,i){var l=0;r&&(l|=4),f1(i,t,l,r)}var rf="_reactListening"+Math.random().toString(36).slice(2);function Pm(t){if(!t[rf]){t[rf]=!0,Ct.forEach(function(i){i!=="selectionchange"&&(UD.has(i)||km(i,!1,t),km(i,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[rf]||(r[rf]=!0,km("selectionchange",!1,r))}}function f1(t,r,i,l){switch(tS(r)){case 2:var f=IN;break;case 8:f=jN;break;default:f=t0}i=f.bind(null,r,i,t),f=void 0,!_i||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),l?f!==void 0?t.addEventListener(r,i,{capture:!0,passive:f}):t.addEventListener(r,i,!0):f!==void 0?t.addEventListener(r,i,{passive:f}):t.addEventListener(r,i,!1)}function Lm(t,r,i,l,f){var m=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var E=l.tag;if(E===3||E===4){var P=l.stateNode.containerInfo;if(P===f)break;if(E===4)for(E=l.return;E!==null;){var Q=E.tag;if((Q===3||Q===4)&&E.stateNode.containerInfo===f)return;E=E.return}for(;P!==null;){if(E=Fn(P),E===null)return;if(Q=E.tag,Q===5||Q===6||Q===26||Q===27){l=m=E;continue e}P=P.parentNode}}l=l.return}zi(function(){var ie=m,pe=Li(i),Ce=[];e:{var ae=Ub.get(t);if(ae!==void 0){var fe=nd,Ye=t;switch(t){case"keypress":if(ed(i)===0)break e;case"keydown":case"keyup":fe=EA;break;case"focusin":Ye="focus",fe=Gp;break;case"focusout":Ye="blur",fe=Gp;break;case"beforeblur":case"afterblur":fe=Gp;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=gb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=fA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=AA;break;case Lb:case zb:case _b:fe=gA;break;case Hb:fe=NA;break;case"scroll":case"scrollend":fe=cA;break;case"wheel":fe=jA;break;case"copy":case"cut":case"paste":fe=yA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=yb;break;case"submit":fe=OA;break;case"toggle":case"beforetoggle":fe=PA}var rt=(r&4)!==0,It=!rt&&(t==="scroll"||t==="scrollend"),oe=rt?ae!==null?ae+"Capture":null:ae;rt=[];for(var te=ie,ue;te!==null;){var Ee=te;if(ue=Ee.stateNode,Ee=Ee.tag,Ee!==5&&Ee!==26&&Ee!==27||ue===null||oe===null||(Ee=xo(te,oe),Ee!=null&&rt.push(ju(te,Ee,ue))),It)break;te=te.return}0<rt.length&&(ae=new fe(ae,Ye,null,i,pe),Ce.push({event:ae,listeners:rt}))}}if((r&7)===0){e:{if(fe=t==="mouseover"||t==="pointerover",ae=t==="mouseout"||t==="pointerout",fe&&i!==Pi&&(Ye=i.relatedTarget||i.fromElement)&&(Fn(Ye)||Ye[In]))break e;(ae||fe)&&(Ye=pe.window===pe?pe:(fe=pe.ownerDocument)?fe.defaultView||fe.parentWindow:window,ae?(fe=i.relatedTarget||i.toElement,ae=ie,fe=fe?Fn(fe):null,fe!==null&&(It=u(fe),rt=fe.tag,fe!==It||rt!==5&&rt!==27&&rt!==6)&&(fe=null)):(ae=null,fe=ie),ae!==fe&&(rt=gb,Ee="onMouseLeave",oe="onMouseEnter",te="mouse",(t==="pointerout"||t==="pointerover")&&(rt=yb,Ee="onPointerLeave",oe="onPointerEnter",te="pointer"),It=ae==null?Ye:he(ae),ue=fe==null?Ye:he(fe),Ye=new rt(Ee,te+"leave",ae,i,pe),Ye.target=It,Ye.relatedTarget=ue,Ee=null,Fn(pe)===ie&&(rt=new rt(oe,te+"enter",fe,i,pe),rt.target=ue,rt.relatedTarget=It,Ee=rt),It=Ee,rt=ae&&fe?j(ae,fe,FD):null,ae!==null&&h1(Ce,Ye,ae,rt,!1),fe!==null&&It!==null&&h1(Ce,It,fe,rt,!0)))}e:{if(ae=ie?he(ie):window,fe=ae.nodeName&&ae.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ae.type==="file")var Je=Cb;else if(Rb(ae))if(Tb)Je=YA;else{Je=VA;var Qt=BA}else fe=ae.nodeName,!fe||fe.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?ie&&ki(ie.elementType)&&(Je=Cb):Je=qA;if(Je&&(Je=Je(t,ie))){Eb(Ce,Je,i,pe);break e}Qt&&Qt(t,ae,ie)}switch(Qt=ie?he(ie):window,t){case"focusin":(Rb(Qt)||Qt.contentEditable==="true")&&(Is=Qt,eg=ie,lu=null);break;case"focusout":lu=eg=Is=null;break;case"mousedown":tg=!0;break;case"contextmenu":case"mouseup":case"dragend":tg=!1,kb(Ce,i,pe);break;case"selectionchange":if(GA)break;case"keydown":case"keyup":kb(Ce,i,pe)}var lt;if(Xp)e:{switch(t){case"compositionstart":var bt="onCompositionStart";break e;case"compositionend":bt="onCompositionEnd";break e;case"compositionupdate":bt="onCompositionUpdate";break e}bt=void 0}else Ns?Sb(t,i)&&(bt="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(bt="onCompositionStart");bt&&(vb&&i.locale!=="ko"&&(Ns||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&Ns&&(lt=hb()):(Go=pe,qp="value"in Go?Go.value:Go.textContent,Ns=!0)),Qt=af(ie,bt),0<Qt.length&&(bt=new mb(bt,t,null,i,pe),Ce.push({event:bt,listeners:Qt}),lt?bt.data=lt:(lt=wb(i),lt!==null&&(bt.data=lt)))),(lt=zA?_A(t,i):HA(t,i))&&(bt=af(ie,"onBeforeInput"),0<bt.length&&(Qt=new mb("onBeforeInput","beforeinput",null,i,pe),Ce.push({event:Qt,listeners:bt}),Qt.data=lt)),zD(Ce,t,ie,i,pe)}d1(Ce,r)})}function ju(t,r,i){return{instance:t,listener:r,currentTarget:i}}function af(t,r){for(var i=r+"Capture",l=[];t!==null;){var f=t,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=xo(t,i),f!=null&&l.unshift(ju(t,f,m)),f=xo(t,r),f!=null&&l.push(ju(t,f,m))),t.tag===3)return l;t=t.return}return[]}function FD(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function h1(t,r,i,l,f){for(var m=r._reactName,E=[];i!==null&&i!==l;){var P=i,Q=P.alternate,ie=P.stateNode;if(P=P.tag,Q!==null&&Q===l)break;P!==5&&P!==26&&P!==27||ie===null||(Q=ie,f?(ie=xo(i,m),ie!=null&&E.unshift(ju(i,ie,Q))):f||(ie=xo(i,m),ie!=null&&E.push(ju(i,ie,Q)))),i=i.return}E.length!==0&&t.push({event:r,listeners:E})}var BD=/\r\n?/g,VD=/\u0000|\uFFFD/g;function p1(t){return(typeof t=="string"?t:""+t).replace(BD,`
|
|
10
|
-
`).replace(VD,"")}function g1(t,r){return r=p1(r),p1(t)===r}function mn(t,r,i,l,f,m){switch(i){case"children":if(typeof l=="string")r==="body"||r==="textarea"&&l===""||Mr(t,l);else if(typeof l=="number"||typeof l=="bigint")r!=="body"&&Mr(t,""+l);else return;break;case"className":Zr(t,"class",l);break;case"tabIndex":Zr(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Zr(t,i,l);break;case"style":Wr(t,l,m);return;case"data":if(r!=="object"){Zr(t,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||i!=="href")){t.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=hr(l),t.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(i,"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 m=="function"&&(i==="formAction"?(r!=="input"&&mn(t,r,"name",f.name,f,null),mn(t,r,"formEncType",f.formEncType,f,null),mn(t,r,"formMethod",f.formMethod,f,null),mn(t,r,"formTarget",f.formTarget,f,null)):(mn(t,r,"encType",f.encType,f,null),mn(t,r,"method",f.method,f,null),mn(t,r,"target",f.target,f,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=hr(l),t.setAttribute(i,l);break;case"onClick":l!=null&&(t.onclick=Ar);return;case"onScroll":l!=null&&Yt("scroll",t);return;case"onScrollEnd":l!=null&&Yt("scrollend",t);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(f.children!=null)throw Error(o(60));m?.__html!==i&&(t.innerHTML=i)}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}i=hr(l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,l):t.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":l===!0?t.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,l):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(i,l):t.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(i):t.setAttribute(i,l);break;case"popover":Yt("beforetoggle",t),Yt("toggle",t),Ln(t,"popover",l);break;case"xlinkActuate":Gn(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gn(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gn(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gn(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gn(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ln(t,"is",l);break;case"innerText":case"textContent":return;default:if(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")i=Wl.get(i)||i,Ln(t,i,l);else return}pt=!0}function zm(t,r,i,l,f,m){switch(i){case"style":Wr(t,l,m);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(f.children!=null)throw Error(o(60));m?.__html!==i&&(t.innerHTML=i)}}break;case"children":if(typeof l=="string")Mr(t,l);else if(typeof l=="number"||typeof l=="bigint")Mr(t,""+l);else return;break;case"onScroll":l!=null&&Yt("scroll",t);return;case"onScrollEnd":l!=null&&Yt("scrollend",t);return;case"onClick":l!=null&&(t.onclick=Ar);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!wt.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),m=i.slice(2,f?i.length-7:void 0),r=t[Mn]||null,r=r!=null?r[i]:null,typeof r=="function"&&t.removeEventListener(m,r,f),typeof l=="function")){typeof r!="function"&&r!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(m,l,f);break e}pt=!0,i in t?t[i]=l:l===!0?t.setAttribute(i,""):Ln(t,i,l)}return}pt=!0}function br(t,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Yt("error",t),Yt("load",t);var l=!1,f=!1,m;for(m in i)if(i.hasOwnProperty(m)){var E=i[m];if(E!=null)switch(m){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,r));default:mn(t,r,m,E,i,null)}}f&&mn(t,r,"srcSet",i.srcSet,i,null),l&&mn(t,r,"src",i.src,i,null);return;case"input":Yt("invalid",t);var P=m=E=f=null,Q=null,ie=null;for(l in i)if(i.hasOwnProperty(l)){var pe=i[l];if(pe!=null)switch(l){case"name":f=pe;break;case"type":E=pe;break;case"checked":Q=pe;break;case"defaultChecked":ie=pe;break;case"value":m=pe;break;case"defaultValue":P=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(o(137,r));break;default:mn(t,r,l,pe,i,null)}}Yo(t,m,P,Q,ie,E,f,!1);return;case"select":Yt("invalid",t),l=E=m=null;for(f in i)if(i.hasOwnProperty(f)&&(P=i[f],P!=null))switch(f){case"value":m=P;break;case"defaultValue":E=P;break;case"multiple":l=P;default:mn(t,r,f,P,i,null)}r=m,i=E,t.multiple=!!l,r!=null?Hr(t,!!l,r,!1):i!=null&&Hr(t,!!l,i,!0);return;case"textarea":Yt("invalid",t),m=f=l=null;for(E in i)if(i.hasOwnProperty(E)&&(P=i[E],P!=null))switch(E){case"value":l=P;break;case"defaultValue":f=P;break;case"children":m=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(91));break;default:mn(t,r,E,P,i,null)}Jr(t,l,f,m);return;case"option":for(Q in i)i.hasOwnProperty(Q)&&(l=i[Q],l!=null)&&(Q==="selected"?t.selected=l&&typeof l!="function"&&typeof l!="symbol":mn(t,r,Q,l,i,null));return;case"dialog":Yt("beforetoggle",t),Yt("toggle",t),Yt("cancel",t),Yt("close",t);break;case"iframe":case"object":Yt("load",t);break;case"video":case"audio":for(l=0;l<Iu.length;l++)Yt(Iu[l],t);break;case"image":Yt("error",t),Yt("load",t);break;case"details":Yt("toggle",t);break;case"embed":case"source":case"link":Yt("error",t),Yt("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(ie in i)if(i.hasOwnProperty(ie)&&(l=i[ie],l!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,r));default:mn(t,r,ie,l,i,null)}return;default:if(ki(r)){for(pe in i)i.hasOwnProperty(pe)&&(l=i[pe],l!==void 0&&zm(t,r,pe,l,i,void 0));return}}for(P in i)i.hasOwnProperty(P)&&(l=i[P],l!=null&&mn(t,r,P,l,i,null))}var qD={};function YD(t,r,i,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,E=null,P=null,Q=null,ie=null,pe=null;for(fe in i){var Ce=i[fe];if(i.hasOwnProperty(fe)&&Ce!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":Q=Ce;default:l.hasOwnProperty(fe)||mn(t,r,fe,null,l,Ce)}}for(var ae in l){var fe=l[ae];if(Ce=i[ae],l.hasOwnProperty(ae)&&(fe!=null||Ce!=null))switch(ae){case"type":fe!==Ce&&(pt=!0),m=fe;break;case"name":fe!==Ce&&(pt=!0),f=fe;break;case"checked":fe!==Ce&&(pt=!0),ie=fe;break;case"defaultChecked":fe!==Ce&&(pt=!0),pe=fe;break;case"value":fe!==Ce&&(pt=!0),E=fe;break;case"defaultValue":fe!==Ce&&(pt=!0),P=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,r));break;default:fe!==Ce&&mn(t,r,ae,fe,l,Ce)}}wr(t,E,P,Q,ie,pe,m,f);return;case"select":fe=E=P=ae=null;for(m in i)if(Q=i[m],i.hasOwnProperty(m)&&Q!=null)switch(m){case"value":break;case"multiple":fe=Q;default:l.hasOwnProperty(m)||mn(t,r,m,null,l,Q)}for(f in l)if(m=l[f],Q=i[f],l.hasOwnProperty(f)&&(m!=null||Q!=null))switch(f){case"value":m!==Q&&(pt=!0),ae=m;break;case"defaultValue":m!==Q&&(pt=!0),P=m;break;case"multiple":m!==Q&&(pt=!0),E=m;default:m!==Q&&mn(t,r,f,m,l,Q)}r=P,i=E,l=fe,ae!=null?Hr(t,!!i,ae,!1):!!l!=!!i&&(r!=null?Hr(t,!!i,r,!0):Hr(t,!!i,i?[]:"",!1));return;case"textarea":fe=ae=null;for(P in i)if(f=i[P],i.hasOwnProperty(P)&&f!=null&&!l.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:mn(t,r,P,null,l,f)}for(E in l)if(f=l[E],m=i[E],l.hasOwnProperty(E)&&(f!=null||m!=null))switch(E){case"value":f!==m&&(pt=!0),ae=f;break;case"defaultValue":f!==m&&(pt=!0),fe=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:f!==m&&mn(t,r,E,f,l,m)}Ds(t,ae,fe);return;case"option":for(var Ye in i)ae=i[Ye],i.hasOwnProperty(Ye)&&ae!=null&&!l.hasOwnProperty(Ye)&&(Ye==="selected"?t.selected=!1:mn(t,r,Ye,null,l,ae));for(Q in l)ae=l[Q],fe=i[Q],l.hasOwnProperty(Q)&&ae!==fe&&(ae!=null||fe!=null)&&(Q==="selected"?(ae!==fe&&(pt=!0),t.selected=ae&&typeof ae!="function"&&typeof ae!="symbol"):mn(t,r,Q,ae,l,fe));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 rt in i)ae=i[rt],i.hasOwnProperty(rt)&&ae!=null&&!l.hasOwnProperty(rt)&&mn(t,r,rt,null,l,ae);for(ie in l)if(ae=l[ie],fe=i[ie],l.hasOwnProperty(ie)&&ae!==fe&&(ae!=null||fe!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,r));break;default:mn(t,r,ie,ae,l,fe)}return;default:if(ki(r)){for(var It in i)ae=i[It],i.hasOwnProperty(It)&&ae!==void 0&&!l.hasOwnProperty(It)&&zm(t,r,It,void 0,l,ae);for(pe in l)ae=l[pe],fe=i[pe],!l.hasOwnProperty(pe)||ae===fe||ae===void 0&&fe===void 0||zm(t,r,pe,ae,l,fe);return}}for(var oe in i)ae=i[oe],i.hasOwnProperty(oe)&&ae!=null&&!l.hasOwnProperty(oe)&&mn(t,r,oe,null,l,ae);for(Ce in l)ae=l[Ce],fe=i[Ce],!l.hasOwnProperty(Ce)||ae===fe||ae==null&&fe==null||mn(t,r,Ce,ae,l,fe)}function m1(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function KD(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var f=i[l],m=f.transferSize,E=f.initiatorType,P=f.duration;if(m&&P&&m1(E)){for(E=0,P=f.responseEnd,l+=1;l<i.length;l++){var Q=i[l],ie=Q.startTime;if(ie>P)break;var pe=Q.transferSize,Ce=Q.initiatorType;pe&&m1(Ce)&&(Q=Q.responseEnd,E+=pe*(Q<P?1:(P-ie)/(Q-ie)))}if(--l,r+=8*(m+E)/(f.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var _m=null,Hm=null;function ku(t){return t.nodeType===9?t:t.ownerDocument}function y1(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 v1(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function b1(t,r,i,l){return i=ku(i).createElement(t),i[dn]=l,i[Mn]=r,br(i,t,r),Se(i),i}function Um(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Fm=null;function GD(){var t=window.event;return t&&t.type==="popstate"?t===Fm?!1:(Fm=t,!0):(Fm=null,!1)}var Bm=typeof setTimeout=="function"?setTimeout:void 0,$D=typeof clearTimeout=="function"?clearTimeout:void 0,x1=typeof Promise=="function"?Promise:void 0,S1=typeof requestAnimationFrame=="function"?requestAnimationFrame:Bm,XD=typeof queueMicrotask=="function"?queueMicrotask:typeof x1<"u"?function(t){return x1.resolve(null).then(t).catch(QD)}:Bm;function QD(t){setTimeout(function(){throw t})}function hi(t){return t==="head"}function w1(t,r){var i=r,l=0;do{var f=i.nextSibling;if(t.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(l===0){t.removeChild(f),dl(r);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Qm(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,Qm(i);for(var m=i.firstChild;m;){var E=m.nextSibling,P=m.nodeName;m[pa]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&m.rel.toLowerCase()==="stylesheet"||i.removeChild(m),m=E}}else i==="body"&&Qm(t.ownerDocument.body);i=f}while(i);dl(r)}function R1(t,r){var i=t;t=0;do{var l=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=l}while(i)}function E1(t,r,i){if(r=CSS.escape(r)!==r?"r-"+btoa(r).replace(/=/g,""):r,t.style.viewTransitionName=r,i!=null&&(t.style.viewTransitionClass=i),i=getComputedStyle(t),i.display==="inline"){if(r=t.getClientRects(),r.length===1)var l=1;else for(var f=l=0;f<r.length;f++){var m=r[f];0<m.width&&0<m.height&&l++}l===1&&(t=t.style,t.display=r.length===1?"inline-block":"block",t.marginTop="-"+i.paddingTop,t.marginBottom="-"+i.paddingBottom)}}function C1(t,r){t=t.style,r=r.style;var i=r!=null?r.hasOwnProperty("viewTransitionName")?r.viewTransitionName:r.hasOwnProperty("view-transition-name")?r["view-transition-name"]:null:null;t.viewTransitionName=i==null||typeof i=="boolean"?"":(""+i).trim(),i=r!=null?r.hasOwnProperty("viewTransitionClass")?r.viewTransitionClass:r.hasOwnProperty("view-transition-class")?r["view-transition-class"]:null:null,t.viewTransitionClass=i==null||typeof i=="boolean"?"":(""+i).trim(),t.display==="inline-block"&&(r==null?t.display=t.margin="":(i=r.display,t.display=i==null||typeof i=="boolean"?"":i,i=r.margin,i!=null?t.margin=i:(i=r.hasOwnProperty("marginTop")?r.marginTop:r["margin-top"],t.marginTop=i==null||typeof i=="boolean"?"":i,r=r.hasOwnProperty("marginBottom")?r.marginBottom:r["margin-bottom"],t.marginBottom=r==null||typeof r=="boolean"?"":r)))}function ZD(t,r,i){return i=i.ownerDocument.defaultView,{rect:t,abs:r.position==="absolute"||r.position==="fixed",clip:r.clipPath!=="none"||r.overflow!=="visible"||r.filter!=="none"||r.mask!=="none"||r.mask!=="none"||r.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=i.innerHeight&&t.left<=i.innerWidth}}function Vm(t){var r=t.getBoundingClientRect(),i=getComputedStyle(t);return ZD(r,i,t)}function JD(t){return t.documentElement.clientHeight}function WD(t){this.addEventListener("load",t),this.addEventListener("error",t)}function eN(t,r,i,l,f,m,E,P,Q){var ie=r.nodeType===9?r:r.ownerDocument;try{var pe=ie.startViewTransition({update:function(){var ae=ie.defaultView,fe=ae.navigation&&ae.navigation.transition,Ye=ie.fonts.status;l();var rt=[];if(Ye==="loaded"&&(JD(ie),ie.fonts.status==="loading"&&rt.push(ie.fonts.ready)),Ye=rt.length,t!==null)for(var It=t.suspenseyImages,oe=0,te=0;te<It.length;te++){var ue=It[te];if(!ue.complete){var Ee=ue.getBoundingClientRect();if(0<Ee.bottom&&0<Ee.right&&Ee.top<ae.innerHeight&&Ee.left<ae.innerWidth){if(oe+=K1(ue),oe>lf){rt.length=Ye;break}ue=new Promise(WD.bind(ue)),rt.push(ue)}}}if(0<rt.length)return ae=Promise.race([Promise.all(rt),new Promise(function(Je){return setTimeout(Je,500)})]).then(f,f),(fe?Promise.allSettled([fe.finished,ae]):ae).then(m,m);if(f(),fe)return fe.finished.then(m,m);m()},types:i});ie.__reactViewTransition=pe;var Ce=[];return pe.ready.then(function(){for(var ae=ie.documentElement.getAnimations({subtree:!0}),fe=0;fe<ae.length;fe++){var Ye=ae[fe],rt=Ye.effect,It=rt.pseudoElement;if(It!=null&&It.startsWith("::view-transition")){Ce.push(Ye),Ye=rt.getKeyframes();for(var oe=It=void 0,te=!0,ue=0;ue<Ye.length;ue++){var Ee=Ye[ue],Je=Ee.width;if(It===void 0)It=Je;else if(It!==Je){te=!1;break}if(Je=Ee.height,oe===void 0)oe=Je;else if(oe!==Je){te=!1;break}delete Ee.width,delete Ee.height,Ee.transform==="none"&&delete Ee.transform}te&&It!==void 0&&oe!==void 0&&(rt.setKeyframes(Ye),te=getComputedStyle(rt.target,rt.pseudoElement),te.width!==It||te.height!==oe)&&(te=Ye[0],te.width=It,te.height=oe,te=Ye[Ye.length-1],te.width=It,te.height=oe,rt.setKeyframes(Ye))}}E()},function(ae){ie.__reactViewTransition===pe&&(ie.__reactViewTransition=null);try{typeof ae=="object"&&ae!==null&&ae.name==="InvalidStateError"&&(ae.message==="View transition was skipped because document visibility state is hidden."||ae.message==="Skipping view transition because document visibility state has become hidden."||ae.message==="Skipping view transition because viewport size changed."||ae.message==="Transition was aborted because of invalid state")&&(ae=null),ae!==null&&Q(ae)}finally{l(),f(),E()}}),pe.finished.finally(function(){for(var ae=0;ae<Ce.length;ae++)Ce[ae].cancel();ie.__reactViewTransition===pe&&(ie.__reactViewTransition=null),P()}),pe}catch{return l(),f(),E(),null}}function as(t,r){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+r+")"}as.prototype.animate=function(t,r){return r=typeof r=="number"?{duration:r}:k({},r),r.pseudoElement=this._selector,this._scope.animate(t,r)},as.prototype.getAnimations=function(){for(var t=this._scope,r=this._selector,i=t.getAnimations({subtree:!0}),l=[],f=0;f<i.length;f++){var m=i[f].effect;m!==null&&m.target===t&&m.pseudoElement===r&&l.push(i[f])}return l},as.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function T1(t){return{name:t,group:new as("group",t),imagePair:new as("image-pair",t),old:new as("old",t),new:new as("new",t)}}function sa(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}sa.prototype.addEventListener=function(t,r,i){var l=null,f=null;if(!(i!=null&&typeof i!="boolean"&&(l=i.signal||null,l!==null&&l.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var m=this._eventListeners;if(M1(m,t,r,i)===-1){var E=this,P=r;i!=null&&typeof i!="boolean"&&i.once===!0&&(P=function(Q){E.removeEventListener(t,r,i),typeof r=="function"?r.call(this,Q):r.handleEvent(Q)}),l!==null&&(f=E.removeEventListener.bind(E,t,r,i),l.addEventListener("abort",f,{once:!0}),f=l.removeEventListener.bind(l,"abort",f)),l=ol(i),m.push({type:t,listener:r,optionsOrUseCapture:i,attachedListener:P,cleanup:f}),h(this._fragmentFiber.child,!1,tN,t,P,l)}this._eventListeners=m}};function tN(t,r,i,l){return R(t).addEventListener(r,i,l),!1}sa.prototype.removeEventListener=function(t,r,i){var l=this._eventListeners;if(l!==null&&(r=M1(l,t,r,i),r!==-1)){var f=l[r];i=f.attachedListener;var m=f.cleanup;f=ol(f.optionsOrUseCapture),h(this._fragmentFiber.child,!1,nN,t,i,f),l.splice(r,1),m!==null&&m()}};function nN(t,r,i,l){return R(t).removeEventListener(r,i,l),!1}function ol(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function O1(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function M1(t,r,i,l){if(t.length===0)return-1;l=O1(l);for(var f=0;f<t.length;f++){var m=t[f];if(m.type===r&&m.listener===i&&O1(m.optionsOrUseCapture)===l)return f}return-1}sa.prototype.dispatchEvent=function(t){var r=b(this._fragmentFiber);if(r===null)return!0;r=R(r);var i=this._eventListeners;if(i!==null&&0<i.length||!t.bubbles){var l=r.nodeType===9?r.createComment(""):document.createTextNode("");if(i)for(var f=0;f<i.length;f++){var m=i[f];l.addEventListener(m.type,m.attachedListener,ol(m.optionsOrUseCapture))}if(r.appendChild(l),t=l.dispatchEvent(t),i)for(f=0;f<i.length;f++)m=i[f],l.removeEventListener(m.type,m.attachedListener,ol(m.optionsOrUseCapture));return r.removeChild(l),t}return r.dispatchEvent(t)},sa.prototype.focus=function(t){h(this._fragmentFiber.child,!0,A1,t,void 0,void 0)};function A1(t,r){return t.tag===6?!1:(t=R(t),pN(t,r))}sa.prototype.focusLast=function(t){var r=[];h(this._fragmentFiber.child,!0,qm,r,void 0,void 0);for(var i=r.length-1;0<=i&&!A1(r[i],t);i--);};function qm(t,r){return r.push(t),!1}sa.prototype.blur=function(){var t=b(this._fragmentFiber);t!==null&&(t=R(t),t=ku(t).activeElement,t!==null&&h(this._fragmentFiber.child,!1,rN,t,void 0,void 0))};function rN(t,r){return t.tag===6?!1:(t=R(t),t===r||t.contains(r)?(r.blur(),!0):!1)}sa.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),h(this._fragmentFiber.child,!1,aN,t,void 0,void 0)};function aN(t,r){return t.tag===6||(t=R(t),r.observe(t)),!1}sa.prototype.unobserveUsing=function(t){var r=this._observers;if(r!==null&&r.has(t)){r.delete(t),h(this._fragmentFiber.child,!1,oN,t,void 0,void 0);for(var i=r=0;i<Ha.length;i++){var l=Ha[i];l.fragmentInstance===this&&l.observer===t?t.unobserve(l.instance):Ha[r++]=l}Ha.length=r}};function oN(t,r){return t.tag===6||(t=R(t),r.unobserve(t)),!1}var Ha=[],Ym=!1;function iN(t,r,i){Ha.push({fragmentInstance:t,observer:r,instance:i}),Ym||(Ym=!0,gN(function(){Ym=!1;var l=Ha;Ha=[];for(var f=0;f<l.length;f++){var m=l[f];m.observer.unobserve(m.instance)}}))}sa.prototype.getClientRects=function(){var t=[];return h(this._fragmentFiber.child,!1,sN,t,void 0,void 0),t};function sN(t,r){if(t.tag===6){t=t.stateNode;var i=t.ownerDocument.createRange();i.selectNodeContents(t),r.push.apply(r,i.getClientRects())}else t=R(t),r.push.apply(r,t.getClientRects());return!1}sa.prototype.getRootNode=function(t){var r=b(this._fragmentFiber);return r===null?this:R(r).getRootNode(t)},sa.prototype.compareDocumentPosition=function(t){var r=b(this._fragmentFiber);if(r===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var i=[];h(this._fragmentFiber.child,!1,qm,i,void 0,void 0);var l=R(r);if(i.length===0){if(i=l,x(this._fragmentFiber)){e:{for(r=this._fragmentFiber.return;r!==null;){if(r.tag===4){r=r.stateNode.containerInfo;break e}if(r.tag===3||r.tag===5||r.tag===27)break;r=r.return}r=null}r!=null&&(i=r)}r=this._fragmentFiber;var f=l=i.compareDocumentPosition(t);return i===t?f=Node.DOCUMENT_POSITION_CONTAINS:l&Node.DOCUMENT_POSITION_CONTAINED_BY&&(i=w(r)[1],i===null?f=Node.DOCUMENT_POSITION_PRECEDING:(t=R(i).compareDocumentPosition(t),f=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),f|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}r=R(i[0]),f=R(i[i.length-1]);var m=x(this._fragmentFiber)?r.parentElement:l;if(m==null)return Node.DOCUMENT_POSITION_DISCONNECTED;l=m.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY,m=m.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY;var E=r.compareDocumentPosition(t),P=f.compareDocumentPosition(t),Q=E&Node.DOCUMENT_POSITION_CONTAINED_BY||P&Node.DOCUMENT_POSITION_CONTAINED_BY;return P=l&&m&&E&Node.DOCUMENT_POSITION_FOLLOWING&&P&Node.DOCUMENT_POSITION_PRECEDING,r=l&&r===t||m&&f===t||Q||P?Node.DOCUMENT_POSITION_CONTAINED_BY:!l&&r===t||!m&&f===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:E,r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||lN(r,this._fragmentFiber,i[0],i[i.length-1],t)?r:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function lN(t,r,i,l,f){var m=Fn(f);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(i=!!m)e:{for(;m!==null;){if(m.tag===7&&(m===r||m.alternate===r)){i=!0;break e}m=m.return}i=!1}return i}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(m===null)return m=f.ownerDocument,f===m||f===m.documentElement||f===m.body;e:{for(m=r,r=b(r);m!==null;){if(!(m.tag!==5&&m.tag!==3&&m.tag!==27||m!==r&&m.alternate!==r)){m=!0;break e}m=m.return}m=!1}return m}return t&Node.DOCUMENT_POSITION_PRECEDING?((r=!!m)&&!(r=m===i)&&(r=j(i,m,I),r===null?r=!1:(h(r,!0,M,m,i),m=T,T=null,r=m!==null)),r):t&Node.DOCUMENT_POSITION_FOLLOWING?((r=!!m)&&!(r=m===l)&&(r=j(l,m,I),r===null?r=!1:(h(r,!0,A,m,l),m=T,O=T=null,r=m!==null)),r):!1}function D1(t,r){var i=t.ownerDocument.createRange();i.selectNodeContents(t),t=i.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,r?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}sa.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(o(566));var r=[];h(this._fragmentFiber.child,!1,qm,r,void 0,void 0);var i=t!==!1;if(r.length===0){var l=w(this._fragmentFiber);if(l=i?l[1]||l[0]||b(this._fragmentFiber):l[0]||l[1],l===null)return;if(l.tag===6){t=R(l),D1(t,i);return}if(l=R(l),l.nodeType!==9){if(l.nodeType===11){i="host"in l?l.host:null,i!==null&&i.scrollIntoView(t);return}l.scrollIntoView(t)}}for(l=i?r.length-1:0;l!==(i?-1:r.length);){var f=r[l];f.tag===6?(f=R(f),D1(f,i)):R(f).scrollIntoView(t),l+=i?-1:1}};function uN(t,r){return t=R(t),N1(t,r),!1}function N1(t,r){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(r)}function I1(t,r){var i=r._eventListeners;if(i!==null)for(var l=0;l<i.length;l++){var f=i[l];t.addEventListener(f.type,f.attachedListener,ol(f.optionsOrUseCapture))}t.nodeType!==3&&(i=r._observers,i!==null&&i.forEach(function(m){for(var E=0,P=0;P<Ha.length;P++){var Q=Ha[P];(Q.fragmentInstance!==r||Q.observer!==m||Q.instance!==t)&&(Ha[E++]=Q)}Ha.length=E,m.observe(t)}),N1(t,r))}function cN(t,r){var i=r._eventListeners;if(i!==null)for(var l=0;l<i.length;l++){var f=i[l];t.removeEventListener(f.type,f.attachedListener,ol(f.optionsOrUseCapture))}t.nodeType!==3&&(i=r._observers,i!==null&&i.forEach(function(m){typeof m.rootMargin=="string"?iN(r,m,t):m.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(r))}function Km(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Km(i),Yn(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function dN(t,r,i,l){for(;t.nodeType===1;){var f=i;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[pa])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=wa(t.nextSibling),t===null)break}return null}function fN(t,r,i){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=wa(t.nextSibling),t===null))return null;return t}function j1(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=wa(t.nextSibling),t===null))return null;return t}function Gm(t){return t.data==="$?"||t.data==="$~"}function $m(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function hN(t,r){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||i.readyState!=="loading")r();else{var l=function(){r(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function wa(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var Xm=null;function k1(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(r===0)return wa(t.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}t=t.nextSibling}return null}function P1(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return t;r--}else i!=="/$"&&i!=="/&"||r++}t=t.previousSibling}return null}function pN(t,r){function i(){l=!0}if(t.ownerDocument.activeElement===t)return!0;var l=!1;try{t.ownerDocument.addEventListener("focus",i,!0),(t.focus||HTMLElement.prototype.focus).call(t,r)}finally{t.ownerDocument.removeEventListener("focus",i,!0)}return l}function gN(t){S1(function(){S1(function(r){return t(r)})})}function L1(t,r,i){switch(r=ku(i),t){case"html":if(t=r.documentElement,!t)throw Error(o(452));return t;case"head":if(t=r.head,!t)throw Error(o(453));return t;case"body":if(t=r.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function z1(t,r,i){for(var l in i){var f=i[l];i.hasOwnProperty(l)&&f!=null&&mn(t,r,l,null,qD,f)}i.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Ar&&(t.onclick=null),Yn(t)}function Qm(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Yn(t)}var Ra=new Map,_1=new Set;function Pu(t){if(typeof t.getRootNode=="function"){var r=t.getRootNode();if(r.nodeType===9||r.nodeType===11)return r}return t.nodeType===9?t:t.ownerDocument}var Io=ce.d;ce.d={f:mN,r:yN,D:vN,C:bN,L:xN,m:SN,X:RN,S:wN,M:EN};function mN(){var t=Io.f(),r=Jd();return t||r}function yN(t){var r=fr(t);r!==null&&r.tag===5&&r.type==="form"?Ux(r):Io.r(t)}var il=typeof document>"u"?null:document;function H1(t,r,i){var l=il;if(l&&typeof r=="string"&&r){var f=Nn(r);f='link[rel="'+t+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),_1.has(f)||(_1.add(f),t={rel:t,crossOrigin:i,href:r},l.querySelector(f)===null&&(r=l.createElement("link"),br(r,"link",t),Se(r),l.head.appendChild(r)))}}function vN(t){Io.D(t),H1("dns-prefetch",t,null)}function bN(t,r){Io.C(t,r),H1("preconnect",t,r)}function xN(t,r,i){Io.L(t,r,i);var l=il;if(l&&t&&r){var f='link[rel="preload"][as="'+Nn(r)+'"]';r==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+Nn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+Nn(i.imageSizes)+'"]')):f+='[href="'+Nn(t)+'"]';var m=f;switch(r){case"style":m=sl(t);break;case"script":m=ll(t)}if(!(Ra.has(m)||(t=k({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:t,as:r},i),Ra.set(m,t),l.querySelector(f)!==null||r==="style"&&l.querySelector(Lu(m))||r==="script"&&l.querySelector(zu(m))))){var E=l.createElement("link");br(E,"link",t),r==="style"&&(E[kt]=!0,E.onload=E.onerror=function(){nt(E)}),Se(E),l.head.appendChild(E)}}}function SN(t,r){Io.m(t,r);var i=il;if(i&&t){var l=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+Nn(l)+'"][href="'+Nn(t)+'"]',m=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=ll(t)}if(!Ra.has(m)&&(t=k({rel:"modulepreload",href:t},r),Ra.set(m,t),i.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(zu(m)))return}l=i.createElement("link"),br(l,"link",t),Se(l),i.head.appendChild(l)}}}function wN(t,r,i){Io.S(t,r,i);var l=il;if(l&&t){var f=Ae(l).hoistableStyles,m=sl(t);r=r||"default";var E=f.get(m);if(!E){var P={loading:0,preload:null};if(E=l.querySelector(Lu(m)))P.loading=5;else{t=k({rel:"stylesheet",href:t,"data-precedence":r},i),(i=Ra.get(m))&&Zm(t,i);var Q=E=l.createElement("link");Se(Q),br(Q,"link",t),Q._p=new Promise(function(ie,pe){Q.onload=ie,Q.onerror=pe}),Q.addEventListener("load",function(){P.loading|=1}),Q.addEventListener("error",function(){P.loading|=2}),P.loading|=4,of(E,r,l)}E={type:"stylesheet",instance:E,count:1,state:P},f.set(m,E)}}}function RN(t,r){Io.X(t,r);var i=il;if(i&&t){var l=Ae(i).hoistableScripts,f=ll(t),m=l.get(f);m||(m=i.querySelector(zu(f)),m||(t=k({src:t,async:!0},r),(r=Ra.get(f))&&Jm(t,r),m=i.createElement("script"),Se(m),br(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function EN(t,r){Io.M(t,r);var i=il;if(i&&t){var l=Ae(i).hoistableScripts,f=ll(t),m=l.get(f);m||(m=i.querySelector(zu(f)),m||(t=k({src:t,async:!0,type:"module"},r),(r=Ra.get(f))&&Jm(t,r),m=i.createElement("script"),Se(m),br(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function U1(t,r,i,l){var f=(f=be.current)?Pu(f):null;if(!f)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(i=sl(i.href),r=Ae(f).hoistableStyles,l=r.get(i),l||(l={type:"style",instance:null,count:0,state:null},r.set(i,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=sl(i.href);var m=Ae(f).hoistableStyles,E=m.get(t);if(E||(f=f.ownerDocument||f,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,E),(m=f.querySelector(Lu(t)))?m._p||(E.instance=m,E.state.loading=5):(m=Ra.get(t),m||(m={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Ra.set(t,m)),CN(f,t,m,E.state))),r&&l===null)throw Error(o(528,""));return E}if(r&&l!==null)throw Error(o(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(i=ll(i),r=Ae(f).hoistableScripts,l=r.get(i),l||(l={type:"script",instance:null,count:0,state:null},r.set(i,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function sl(t){return'href="'+Nn(t)+'"'}function Lu(t){return'link[rel="stylesheet"]['+t+"]"}function F1(t){return k({},t,{"data-precedence":t.precedence,precedence:null})}function CN(t,r,i,l){if(r=t.querySelector('link[rel="preload"][as="style"]['+r+"]")){if(r[kt]!==!0){l.loading=1;return}}else r=t.createElement("link"),r[kt]=!0,r.onload=r.onerror=nt.bind(null,r),br(r,"link",i),Se(r),t.head.appendChild(r);l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2})}function ll(t){return'[src="'+Nn(t)+'"]'}function zu(t){return"script[async]"+t}function B1(t,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var l=t.querySelector('style[data-href~="'+Nn(i.href)+'"]');if(l)return r.instance=l,Se(l),l;var f=k({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),Se(l),br(l,"style",f),of(l,i.precedence,t),r.instance=l;case"stylesheet":f=sl(i.href);var m=t.querySelector(Lu(f));if(m)return r.state.loading|=4,r.instance=m,Se(m),m;l=F1(i),(f=Ra.get(f))&&Zm(l,f),m=(t.ownerDocument||t).createElement("link"),Se(m);var E=m;return E._p=new Promise(function(P,Q){E.onload=P,E.onerror=Q}),br(m,"link",l),r.state.loading|=4,of(m,i.precedence,t),r.instance=m;case"script":return m=ll(i.src),(f=t.querySelector(zu(m)))?(r.instance=f,Se(f),f):(l=i,(f=Ra.get(m))&&(l=k({},i),Jm(l,f)),t=t.ownerDocument||t,f=t.createElement("script"),Se(f),br(f,"link",l),t.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(o(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,of(l,i.precedence,t));return r.instance}function of(t,r,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,m=f,E=0;E<l.length;E++){var P=l[E];if(P.dataset.precedence===r)m=P;else if(m!==f)break}m?m.parentNode.insertBefore(t,m.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(t,r.firstChild))}function Zm(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function Jm(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var sf=null;function V1(t,r,i){if(sf===null){var l=new Map,f=sf=new Map;f.set(i,l)}else f=sf,l=f.get(i),l||(l=new Map,f.set(i,l));if(l.has(t))return l;for(l.set(t,null),i=i.getElementsByTagName(t),f=0;f<i.length;f++){var m=i[f];if(!(m[pa]||m[dn]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var E=m.getAttribute(r)||"";E=t+E;var P=l.get(E);P?P.push(m):l.set(E,[m])}}return l}function Wm(t,r,i){t=t.ownerDocument||t,t.head.insertBefore(i,r==="title"?t.querySelector("head > title"):null)}function TN(t,r,i){if(i===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(t=r.disabled,typeof r.precedence=="string"&&t==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function q1(t,r){return t==="img"&&r.src!=null&&r.src!==""&&r.onLoad==null&&r.loading!=="lazy"}function Y1(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function K1(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function G1(t,r){typeof r.decode=="function"&&(t.imgCount++,r.complete||(t.imgBytes+=K1(r),t.suspenseyImages.push(r)),t=AN.bind(t),r.decode().then(t,t))}function ON(t,r,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=sl(l.href),m=r.querySelector(Lu(f));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=_u.bind(t),r.then(t,t)),i.state.loading|=4,i.instance=m,Se(m);return}m=r.ownerDocument||r,l=F1(l),(f=Ra.get(f))&&Zm(l,f),m=m.createElement("link"),Se(m);var E=m;E._p=new Promise(function(P,Q){E.onload=P,E.onerror=Q}),br(m,"link",l),i.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=_u.bind(t),r.addEventListener("load",i),r.addEventListener("error",i))}}var lf=0;function MN(t,r){return t.stylesheets&&t.count===0&&cf(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var l=setTimeout(function(){if(t.stylesheets&&cf(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+r);0<t.imgBytes&&lf===0&&(lf=62500*KD());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&cf(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>lf?50:800)+r);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(f)}}:null}function $1(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)cf(t,t.stylesheets);else if(t.unsuspend){var r=t.unsuspend;t.unsuspend=null,r()}}}function _u(){this.count--,$1(this)}function AN(){this.imgCount--,$1(this)}var uf=null;function cf(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,uf=new Map,r.forEach(DN,t),uf=null,_u.call(t))}function DN(t,r){if(!(r.state.loading&4)){var i=uf.get(t);if(i)var l=i.get(null);else{i=new Map,uf.set(t,i);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var E=f[m];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(i.set(E.dataset.precedence,E),l=E)}l&&i.set(null,l)}f=r.instance,E=f.getAttribute("data-precedence"),m=i.get(E)||l,m===l&&i.set(null,f),i.set(E,f),this.count++,l=_u.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),m?m.parentNode.insertBefore(f,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),r.state.loading|=4}}var ul={$$typeof:_,Provider:null,Consumer:null,_currentValue:Te,_currentValue2:Te,_threadCount:0};function NN(t,r,i,l,f,m,E,P,Q){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=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.transitionTypes=null,this.incompleteTransitions=new Map}function X1(t,r,i,l,f,m,E,P,Q,ie,pe,Ce){return t=new NN(t,r,i,E,Q,ie,pe,Ce,P),r=1,m===!0&&(r|=24),m=Ur(3,null,null,r),t.current=m,m.stateNode=t,r=pg(),r.refCount++,t.pooledCache=r,r.refCount++,m.memoizedState={element:l,isDehydrated:i,cache:r},vg(m),t}function Q1(t){return t?(t=Ps,t):Ps}function Z1(t,r,i,l,f,m){f=Q1(f),l.context===null?l.context=f:l.pendingContext=f,l=ti(r),l.payload={element:i},m=m===void 0?null:m,m!==null&&(l.callback=m),i=ni(t,l,r),i!==null&&(qr(i,t,r),gu(i,t,r))}function J1(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<r?i:r}}function e0(t,r){J1(t,r),(t=t.alternate)&&J1(t,r)}function W1(t){if(t.tag===13||t.tag===31){var r=Fi(t,67108864);r!==null&&qr(r,t,67108864),e0(t,67108864)}}function eS(t){if(t.tag===13||t.tag===31){var r=ia();r=Ut(r);var i=Fi(t,r);i!==null&&qr(i,t,r),e0(t,r)}}var cl=!0;function IN(t,r,i,l){var f=ge.T;ge.T=null;var m=ce.p;try{ce.p=2,t0(t,r,i,l)}finally{ce.p=m,ge.T=f}}function jN(t,r,i,l){var f=ge.T;ge.T=null;var m=ce.p;try{ce.p=8,t0(t,r,i,l)}finally{ce.p=m,ge.T=f}}function t0(t,r,i,l){if(cl){var f=n0(l);if(f===null)Lm(t,r,l,df,i),nS(t,l);else if(PN(f,t,r,i,l))l.stopPropagation();else if(nS(t,l),r&4&&-1<kN.indexOf(t)){for(;f!==null;){var m=fr(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var E=qe(m.pendingLanes);if(E!==0){var P=m;for(P.pendingLanes|=2,P.entangledLanes|=2;E;){var Q=1<<31-et(E);P.entanglements[1]|=Q,E&=~Q}ro(m),(ln&6)===0&&(Xd=xt()+500,Nu(0))}}break;case 31:case 13:P=Fi(m,2),P!==null&&qr(P,m,2),Jd(),e0(m,2)}if(m=n0(l),m===null&&Lm(t,r,l,df,i),m===f)break;f=m}f!==null&&l.stopPropagation()}else Lm(t,r,l,null,i)}}function n0(t){return t=Li(t),r0(t)}var df=null;function r0(t){if(df=null,t=Fn(t),t!==null){var r=u(t);if(r===null)t=null;else{var i=r.tag;if(i===13){if(t=c(r),t!==null)return t;t=null}else if(i===31){if(t=d(r),t!==null)return t;t=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return df=t,null}function tS(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($t()){case ft:return 2;case vt:return 8;case gt:case Lt:return 32;case un:return 268435456;default:return 32}default:return 32}}var a0=!1,pi=null,gi=null,mi=null,Hu=new Map,Uu=new Map,yi=[],kN="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 nS(t,r){switch(t){case"focusin":case"focusout":pi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":mi=null;break;case"pointerover":case"pointerout":Hu.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uu.delete(r.pointerId)}}function Fu(t,r,i,l,f,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:i,eventSystemFlags:l,nativeEvent:m,targetContainers:[f]},r!==null&&(r=fr(r),r!==null&&W1(r)),t):(t.eventSystemFlags|=l,r=t.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),t)}function PN(t,r,i,l,f){switch(r){case"focusin":return pi=Fu(pi,t,r,i,l,f),!0;case"dragenter":return gi=Fu(gi,t,r,i,l,f),!0;case"mouseover":return mi=Fu(mi,t,r,i,l,f),!0;case"pointerover":var m=f.pointerId;return Hu.set(m,Fu(Hu.get(m)||null,t,r,i,l,f)),!0;case"gotpointercapture":return m=f.pointerId,Uu.set(m,Fu(Uu.get(m)||null,t,r,i,l,f)),!0}return!1}function rS(t){var r=Fn(t.target);if(r!==null){var i=u(r);if(i!==null){if(r=i.tag,r===13){if(r=c(i),r!==null){t.blockedOn=r,Xr(t.priority,function(){eS(i)});return}}else if(r===31){if(r=d(i),r!==null){t.blockedOn=r,Xr(t.priority,function(){eS(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ff(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var i=n0(t.nativeEvent);if(i===null){i=t.nativeEvent;var l=new i.constructor(i.type,i);Pi=l,i.target.dispatchEvent(l),Pi=null}else return r=fr(i),r!==null&&W1(r),t.blockedOn=i,!1;r.shift()}return!0}function aS(t,r,i){ff(t)&&i.delete(r)}function LN(){a0=!1,pi!==null&&ff(pi)&&(pi=null),gi!==null&&ff(gi)&&(gi=null),mi!==null&&ff(mi)&&(mi=null),Hu.forEach(aS),Uu.forEach(aS)}function hf(t,r){t.blockedOn===r&&(t.blockedOn=null,a0||(a0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,LN)))}var pf=null;function oS(t){pf!==t&&(pf=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){pf===t&&(pf=null);for(var r=0;r<t.length;r+=3){var i=t[r],l=t[r+1],f=t[r+2];if(typeof l!="function"){if(r0(l||i)===null)continue;break}var m=fr(i);m!==null&&(t.splice(r,3),r-=3,Hg(m,{pending:!0,data:f,method:i.method,action:l},l,f))}}))}function dl(t){function r(Q){return hf(Q,t)}pi!==null&&hf(pi,t),gi!==null&&hf(gi,t),mi!==null&&hf(mi,t),Hu.forEach(r),Uu.forEach(r);for(var i=0;i<yi.length;i++){var l=yi[i];l.blockedOn===t&&(l.blockedOn=null)}for(;0<yi.length&&(i=yi[0],i.blockedOn===null);)rS(i),i.blockedOn===null&&yi.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var f=i[l],m=i[l+1],E=f[Mn]||null;if(typeof m=="function")E||oS(i);else if(E){var P=null;if(m&&m.hasAttribute("formAction")){if(f=m,E=m[Mn]||null)P=E.formAction;else if(r0(f)!==null)continue}else P=E.action;typeof P=="function"?i[l+1]=P:(i.splice(l,3),l-=3),oS(i)}}}function iS(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(E){return f=E})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function o0(t){this._internalRoot=t}gf.prototype.render=o0.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(o(409));var i=r.current,l=ia();Z1(i,l,t,r,null,null)},gf.prototype.unmount=o0.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Z1(t.current,2,null,t,null,null),Jd(),r[In]=null}};function gf(t){this._internalRoot=t}gf.prototype.unstable_scheduleHydration=function(t){if(t){var r=Cn();t={blockedOn:null,target:t,priority:r};for(var i=0;i<yi.length&&r!==0&&r<yi[i].priority;i++);yi.splice(i,0,t),i===0&&rS(t)}};var sS=n.version;if(sS!=="19.3.1")throw Error(o(527,sS,"19.3.1"));ce.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=g(r),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var zN={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ge,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mf.isDisabled&&mf.supportsFiber)try{ke=mf.inject(zN),ze=mf}catch{}}return Vu.createRoot=function(t,r){if(!s(t))throw Error(o(299));var i=!1,l="",f=Qx,m=Zx,E=Jx;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(E=r.onRecoverableError)),r=X1(t,1,!1,null,null,i,l,null,f,m,E,iS),t[In]=r.current,Pm(t),new o0(r)},Vu.hydrateRoot=function(t,r,i){if(!s(t))throw Error(o(299));var l=!1,f="",m=Qx,E=Zx,P=Jx,Q=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(E=i.onCaughtError),i.onRecoverableError!==void 0&&(P=i.onRecoverableError),i.formState!==void 0&&(Q=i.formState)),r=X1(t,1,!0,r,i??null,l,f,Q,m,E,P,iS),r.context=Q1(null),i=r.current,l=ia(),l=Ut(l),f=ti(l),f.callback=null,ni(i,f,l),i=l,r.current.lanes=i,ct(r,i),ro(r),t[In]=r.current,Pm(t),new gf(r)},Vu.version="19.3.1",Vu}var yS;function GN(){if(yS)return l0.exports;yS=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(),l0.exports=KN(),l0.exports}var $N=GN();const vS={};function er(e,n){const a=v.useRef(vS);return a.current===vS&&(a.current=e(n)),a}const Y0=[];let K0;function XN(){return K0}function QN(e){Y0.push(e)}function Cc(e){const n=(a,o)=>{const s=er(ZN).current;let u;try{K0=s;for(const c of Y0)c.before(s);u=e(a,o);for(const c of Y0)c.after(s);s.didInitialize=!0}finally{K0=void 0}return u};return n.displayName=e.displayName||e.name,n}function GR(e){return v.forwardRef(Cc(e))}function ZN(){return{didInitialize:!1}}function Sn(){}const fo=Object.freeze([]),Gt=Object.freeze({}),JN=()=>{},_e=typeof document<"u"?v.useLayoutEffect:JN;function WN(e,n){return function(o,...s){const u=new URL(e);return u.searchParams.set("code",o.toString()),s.forEach(c=>u.searchParams.append("args[]",c)),`${n} error #${o}; visit ${u} for the full message.`}}const Rn=WN("https://base-ui.com/production-error","Base UI"),$R=v.createContext(void 0);function Tc(e){const n=v.useContext($R);if(n===void 0&&!e)throw new Error(Rn(72));return n}function ky(e){v.useEffect(e,fo)}const qu=0;class Da{static create(){return new Da}currentId=qu;start(n,a){this.clear(),this.currentId=setTimeout(()=>{this.currentId=qu,a()},n)}isStarted(){return this.currentId!==qu}clear=()=>{this.currentId!==qu&&(clearTimeout(this.currentId),this.currentId=qu)};disposeEffect=()=>this.clear}function Hn(){const e=er(Da.create).current;return ky(e.disposeEffect),e}function e4(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:t4,platform:n4,maxTouchPoints:r4}=e4(),kh=t4.toLowerCase(),hc=n4.toLowerCase(),Ph=/^i(os$|p)/.test(hc)||hc==="macintel"&&r4>1,bS="android",G0=hc===bS||kh.includes(bS),Py=!Ph&&hc.startsWith("mac");hc.startsWith("win");const a4=Py||Ph,ho=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!ho&&kh.includes("firefox");!ho&&kh.includes("chrom");const o4=a4,Ly=/jsdom|happydom/.test(kh);function Fa(e){e.preventDefault(),e.stopPropagation()}function i4(e){return"nativeEvent"in e}function Nl(e){return e.pointerType===""&&e.isTrusted?!0:G0&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function zy(e){return Ly?!1:!G0&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(G0||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ci(e,n){const a=["mouse","pen"];return n||a.push("",void 0),a.includes(e)}function s4(e){const n=e.type;return n==="click"||n==="mousedown"||n==="keydown"||n==="keyup"}function Lh(){return typeof window<"u"}function Sr(e){return _y(e)?(e.nodeName||"").toLowerCase():"#document"}function wn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Fo(e){var n;return(n=(_y(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function _y(e){return Lh()?e instanceof Node||e instanceof wn(e).Node:!1}function on(e){return Lh()?e instanceof Element||e instanceof wn(e).Element:!1}function yn(e){return Lh()?e instanceof HTMLElement||e instanceof wn(e).HTMLElement:!1}function gs(e){return!Lh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wn(e).ShadowRoot}function Oc(e){const{overflow:n,overflowX:a,overflowY:o,display:s}=fa(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+a)&&s!=="inline"&&s!=="contents"}function l4(e){return/^(table|td|th)$/.test(Sr(e))}function zh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const u4=/transform|translate|scale|rotate|perspective|filter/,c4=/paint|layout|strict|content/,os=e=>!!e&&e!=="none";let f0;function Hy(e){const n=on(e)?fa(e):e;return os(n.transform)||os(n.translate)||os(n.scale)||os(n.rotate)||os(n.perspective)||!Uy()&&(os(n.backdropFilter)||os(n.filter))||u4.test(n.willChange||"")||c4.test(n.contain||"")}function d4(e){let n=Uo(e);for(;yn(n)&&!zo(n);){if(Hy(n))return n;if(zh(n))return null;n=Uo(n)}return null}function Uy(){return f0==null&&(f0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),f0}function zo(e){return/^(html|body|#document)$/.test(Sr(e))}function fa(e){return wn(e).getComputedStyle(e)}function _h(e){return on(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Uo(e){if(Sr(e)==="html")return e;const n=e.assignedSlot||e.parentNode||gs(e)&&e.host||Fo(e);return gs(n)?n.host:n}function XR(e){const n=Uo(e);return zo(n)?(e.ownerDocument||e).body:yn(n)&&Oc(n)?n:XR(n)}function pc(e,n,a){var o;n===void 0&&(n=[]),a===void 0&&(a=!0);const s=XR(e),u=s===((o=e.ownerDocument)==null?void 0:o.body),c=wn(s);if(u){const d=$0(c);return n.concat(c,c.visualViewport||[],Oc(s)?s:[],d&&a?pc(d):[])}else return n.concat(s,pc(s,[],a))}function $0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kr(e){let n=e.activeElement;for(;n?.shadowRoot?.activeElement!=null;)n=n.shadowRoot.activeElement;return n}function at(e,n){if(!e||!n)return!1;const a=n.getRootNode?.();if(e.contains(n))return!0;if(a&&gs(a)){let o=n;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function gc(e,n){let a=e;for(;a;){if(on(a)&&a.matches(n))return a;a=a.assignedSlot??a.parentNode??(gs(a)?a.host:null)}return null}function tr(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const X0="data-base-ui-focusable",QR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Hh="ArrowLeft",Uh="ArrowRight",ZR="ArrowUp",Fy="ArrowDown",By="data-starting-style",f4="data-ending-style",h4={[By]:""},p4={[f4]:""},po={transitionStatus(e){return e==="starting"?h4:e==="ending"?p4:null}},g4="data-open",m4="data-closed",y4="data-anchor-hidden",JR="data-popup-open",v4="data-pressed",b4={[JR]:""},x4={[JR]:"",[v4]:""},S4={[g4]:""},w4={[m4]:""},R4={[y4]:""},WR={open(e){return e?b4:null}},rh={open(e){return e?x4:null}},Mc={open(e){return e?S4:w4},anchorHidden(e){return e?R4:null}},Fh={...Mc,...po},Q0="data-trigger-disabled";function ah(e,n){if(!on(e))return!1;const a=e;if(n.hasElement(a))return!a.hasAttribute(Q0);for(const[,o]of n.entries())if(at(o,a))return!o.hasAttribute(Q0);return!1}function h0(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const a=e;return a.target!=null&&n.contains(a.target)}function E4(e){return e.matches("html,body")}function Ac(e){return yn(e)&&e.matches(QR)}function C4(e){return gc(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${QR}`)!=null}function Z0(e){return e?e.getAttribute("role")==="combobox"&&Ac(e):!1}function T4(e){if(!e||Ly)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function oh(e){return e?e.hasAttribute(X0)?e:e.querySelector(`[${X0}]`)||e:null}function O4(e,n){return n!=null&&!Ci(n)?0:typeof e=="function"?e():e}function ms(e,n,a){const o=O4(e,a);return typeof o=="number"?o:o?.[n]}function xS(e){return typeof e=="function"?e():e}function eE(e,n){return n||e==="click"||e==="mousedown"}function M4(e){return e?.includes("mouse")&&e!=="mousedown"}function dt(e,n,a,o){let s=!1,u=!1;const c=o??Gt;return{reason:e,event:n??new Event("base-ui"),cancel(){s=!0},allowPropagation(){u=!0},get isCanceled(){return s},get isPropagationAllowed(){return u},trigger:a,...c}}function A4(e,n,a){const o=a??Gt;return{reason:e,event:n??new Event("base-ui"),...o}}const zr="none",Va="trigger-press",qn="trigger-hover",xl="trigger-focus",Bh="outside-press",fs="item-press",tE="close-press",Ti="focus-out",Dc="escape-key",ih="list-navigation",nE="keyboard",D4="pointer",Vy="cancel-open",Zu="sibling-open",N4="disabled",Nc="imperative-action",I4="window-resize",rE=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Da,currentIdRef:{current:null},currentContextRef:{current:null}});function j4(e,n){e.current=n.current}function k4(e){const{children:n,delay:a,timeoutMs:o=0}=e,s=v.useRef(a),u=v.useRef(a),c=v.useRef(null),d=v.useRef(null),p=Hn();return _e(()=>{if(u.current=a,!c.current){s.current=a;return}s.current={open:ms(s.current,"open"),close:ms(a,"close")}},[a,c,s,u]),S.jsx(rE.Provider,{value:v.useMemo(()=>({hasProvider:!0,delayRef:s,initialDelayRef:u,currentIdRef:c,timeoutMs:o,currentContextRef:d,timeout:p}),[o,p]),children:n})}function P4(e,n={open:!1}){const{open:a}=n,o=e.useState("floatingId"),s=v.useContext(rE),{currentIdRef:u,delayRef:c,timeoutMs:d,initialDelayRef:p,currentContextRef:g,hasProvider:y,timeout:h}=s,[b,x]=v.useState(!1),w=v.useRef(a);return _e(()=>{w.current=a},[a]),_e(()=>{function C(){g.current?.setIsInstantPhase(!1),u.current=null,g.current=null,c.current=p.current,h.clear()}if(u.current&&!a&&u.current===o){if(x(!1),d){const R=o;return h.start(d,()=>{e.select("open")||u.current&&u.current!==R||C()}),()=>{(w.current||u.current!==R)&&h.clear()}}C()}},[a,o,u,c,d,p,g,h,e]),_e(()=>{if(!a)return;const C=g.current,R=u.current;h.clear(),g.current={onOpenChange:e.setOpen,setIsInstantPhase:x},u.current=o,c.current={open:0,close:ms(p.current,"close")},R!==null&&R!==o?(x(!0),C?.setIsInstantPhase(!0),C?.onOpenChange(!1,dt(zr))):(x(!1),C?.setIsInstantPhase(!1))},[a,o,e,u,c,p,g,h]),_e(()=>()=>{if(u.current===o){if(g.current=null,!w.current)return;u.current=null,j4(c,p),h.clear()}},[g,u,c,o,p,h]),v.useMemo(()=>({activeIdRef:u,hasProvider:y,delayRef:c,isInstantPhase:b}),[u,y,c,b])}function jt(e,n,a,o){return e.addEventListener(n,a,o),()=>{e.removeEventListener(n,a,o)}}function uo(...e){return()=>{for(let n=0;n<e.length;n+=1){const a=e[n];a&&a()}}}function Gr(e,n,a,o){const s=er(aE).current;return z4(s,e,n,a,o)&&oE(s,[e,n,a,o]),s.callback}function L4(e){const n=er(aE).current;return _4(n,e)&&oE(n,e),n.callback}function aE(){return{callback:null,cleanup:null,refs:[]}}function z4(e,n,a,o,s){return e.refs[0]!==n||e.refs[1]!==a||e.refs[2]!==o||e.refs[3]!==s}function _4(e,n){return e.refs.length!==n.length||e.refs.some((a,o)=>a!==n[o])}function oE(e,n){if(e.refs=n,n.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){const o=Array(n.length).fill(null);for(let s=0;s<n.length;s+=1){const u=n[s];if(u!=null)switch(typeof u){case"function":{const c=u(a);typeof c=="function"&&(o[s]=c);break}case"object":{u.current=a;break}}}e.cleanup=()=>{for(let s=0;s<n.length;s+=1){const u=n[s];if(u!=null)switch(typeof u){case"function":{const c=o[s];typeof c=="function"?c():u(null);break}case"object":{u.current=null;break}}}}}}}function Pn(e){const n=er(H4,e).current;return n.next=e,_e(n.effect),n}function H4(e){const n={current:e,next:e,effect:()=>{n.current=n.next}};return n}const qy={...YR},p0=qy.useInsertionEffect,U4=p0&&p0!==qy.useLayoutEffect?p0:e=>e();function Be(e){const n=er(F4).current;return n.next=e,U4(n.effect),n.trampoline}function F4(){const e={next:void 0,callback:B4,trampoline:(...n)=>e.callback?.(...n),effect:()=>{e.callback=e.next}};return e}function B4(){}const yf=null;class V4{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=n=>{this.isScheduled=!1;const a=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let s=0;s<a.length;s+=1)a[s]?.(n)};request(n){const a=this.nextId;return this.nextId+=1,this.callbacks.push(n),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),a}cancel(n){const a=n-this.startId;a<0||a>=this.callbacks.length||this.callbacks[a]!==null&&(this.callbacks[a]=null,this.callbacksCount-=1)}}let vf=new V4;class Cr{static create(){return new Cr}static request(n){return vf.request(n)}static cancel(n){return vf.cancel(n)}currentId=yf;request(n){this.cancel(),this.currentId=vf.request(()=>{this.currentId=yf,n()})}cancel=()=>{this.currentId!==yf&&(vf.cancel(this.currentId),this.currentId=yf)};disposeEffect=()=>this.cancel}function Il(){const e=er(Cr.create).current;return ky(e.disposeEffect),e}function Kt(e){return e?.ownerDocument||document}const iE={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Ic={...iE,position:"fixed",margin:0,top:0,left:0},Vh={...iE,position:"absolute"},jl=v.forwardRef(function(n,a){const[o,s]=v.useState();_e(()=>{o4&&ho&&s("button")},[]);const u={tabIndex:0,role:o};return S.jsx("span",{...n,ref:a,style:Ic,"aria-hidden":o?void 0:!0,...u,"data-base-ui-focus-guard":""})}),kl=Math.min,_o=Math.max,sh=Math.round,bf=Math.floor,Ho=e=>({x:e,y:e}),q4={left:"right",right:"left",bottom:"top",top:"bottom"};function sE(e,n,a){return _o(e,kl(n,a))}function Oi(e,n){return typeof e=="function"?e(n):e}function da(e){return e.split("-")[0]}function co(e){return e.split("-")[1]}function Yy(e){return e==="x"?"y":"x"}function Ky(e){return e==="y"?"height":"width"}function Oa(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function Gy(e){return Yy(Oa(e))}function Y4(e,n,a){a===void 0&&(a=!1);const o=co(e),s=Gy(e),u=Ky(s);let c=s==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[u]>n.floating[u]&&(c=lh(c)),[c,lh(c)]}function K4(e){const n=lh(e);return[J0(e),n,J0(n)]}function J0(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const SS=["left","right"],wS=["right","left"],G4=["top","bottom"],$4=["bottom","top"];function X4(e,n,a){switch(e){case"top":case"bottom":return a?n?wS:SS:n?SS:wS;case"left":case"right":return n?G4:$4;default:return[]}}function Q4(e,n,a,o){const s=co(e);let u=X4(da(e),a==="start",o);return s&&(u=u.map(c=>c+"-"+s),n&&(u=u.concat(u.map(J0)))),u}function lh(e){const n=da(e);return q4[n]+e.slice(n.length)}function Z4(e){var n,a,o,s;return{top:(n=e.top)!=null?n:0,right:(a=e.right)!=null?a:0,bottom:(o=e.bottom)!=null?o:0,left:(s=e.left)!=null?s:0}}function lE(e){return typeof e!="number"?Z4(e):{top:e,right:e,bottom:e,left:e}}function mc(e){const{x:n,y:a,width:o,height:s}=e;return{width:o,height:s,top:a,left:n,right:n+o,bottom:a+s,x:n,y:a}}function Sl(e,n){return n<0||n>=e.length}function qf(e,n){return wl(e.current,{disabledIndices:n})}function W0(e,n){return wl(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:n})}function J4(e,n,a){const{decrement:o,loopFocus:s,allowEscape:u,disabledIndices:c,minIndex:d,maxIndex:p}=a,g=()=>wl(e,{startingIndex:n,decrement:o,disabledIndices:c});let y,h=!1;if(!s)y=o?Math.max(d,g()):Math.min(p,g());else if(o?n<=d:n>=p){const b=o?-1:e.length;u&&n!==b?y=-1:(y=o?p:d,h=!0)}else y=g();return{index:Sl(e,y)?-1:y,wrapped:h}}function wl(e,{startingIndex:n=-1,decrement:a=!1,disabledIndices:o,amount:s=1}={}){let u=n;do u+=a?-s:s;while(u>=0&&u<=e.length-1&&Rl(e,u,o));return u}function Rl(e,n,a){if(typeof a=="function"?a(n):a?.includes(n)??!1)return!0;const s=e[n];return s?!qh(s)||s.matches(":disabled")?!0:!a&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!1}function W4(e){return e.visibility==="hidden"||e.visibility==="collapse"}function qh(e,n=e?fa(e):null){return!e||!e.isConnected||!n||W4(n)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():n.display!=="none"&&n.display!=="contents"}const e3='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function t3(e){const n=e.assignedSlot;if(n)return n;if(e.parentElement)return e.parentElement;const a=e.getRootNode();return gs(a)?a.host:null}function ey(e){for(const n of Array.from(e.children))if(Sr(n)==="summary")return n;return null}function n3(e,n){const a=ey(n);return!!a&&(e===a||at(a,e))}function uE(e){const n=e?Sr(e):"";return e!=null&&e.matches(e3)&&(n!=="summary"||e.parentElement!=null&&Sr(e.parentElement)==="details"&&ey(e.parentElement)===e)&&(n!=="details"||ey(e)==null)&&(n!=="input"||e.type!=="hidden")}function $y(e){if(!uE(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let n=e;n;n=t3(n)){const a=n!==e,o=Sr(n)==="slot";if(n.hasAttribute("inert")||a&&Sr(n)==="details"&&!n.open&&!n3(e,n)||n.hasAttribute("hidden")||!o&&!r3(n,a))return!1}return!0}function r3(e,n){const a=fa(e);return n?a.display!=="none":qh(e,a)}function cE(e){const n=e.tabIndex;if(n<0){const a=Sr(e);if(a==="details"||a==="audio"||a==="video"||yn(e)&&e.isContentEditable)return 0}return n}function g0(e){if(Sr(e)!=="input")return null;const n=e;return n.type==="radio"&&n.name!==""?n:null}function dE(e,n){const a=g0(e);if(!a)return!0;const o=n.find(s=>{const u=g0(s);return u?.name===a.name&&u.form===a.form&&u.checked});return o?o===a:n.find(s=>{const u=g0(s);return u?.name===a.name&&u.form===a.form})===a}function fE(e){if(yn(e)&&Sr(e)==="slot"){const n=e.assignedElements({flatten:!0});if(n.length>0)return n}return yn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Xy(e,n){fE(e).forEach(a=>{uE(a)&&n.push(a),Xy(a,n)})}function hE(e,n,a){fE(e).forEach(o=>{yn(o)&&o.matches(n)&&a.push(o),hE(o,n,a)})}function Yh(e){return $y(e)&&cE(e)>=0}function pE(e){const n=[];return Xy(e,n),n.filter($y)}function Kh(e){const n=pE(e);return n.filter(a=>cE(a)>=0&&dE(a,n))}function gE(e,n){const a=Kh(e),o=a.length;if(o===0)return;const s=Kr(Kt(e)),u=a.indexOf(s),c=u===-1?n===1?0:o-1:u+n;return a[c]}function mE(e){return gE(Kt(e).body,1)||e}function yE(e){return gE(Kt(e).body,-1)||e}function a3(e,n,a){if(!e)return null;const o=[];Xy(Kt(e).body,o);const s=o.indexOf(e);if(s===-1)return null;const u=o.filter($y);for(let c=1;c<o.length;c+=1){const d=o[(s+n*c+o.length)%o.length];if(!at(a,d)&&Yh(d)&&dE(d,u))return d}return o[s]}function El(e,n){const a=n||e.currentTarget,o=e.relatedTarget;return!o||!at(a,o)}function o3(e){Kh(e).forEach(a=>{a.dataset.tabindex=a.getAttribute("tabindex")||"",a.setAttribute("tabindex","-1")})}function RS(e){const n=[];hE(e,"[data-tabindex]",n),n.forEach(a=>{const o=a.dataset.tabindex;delete a.dataset.tabindex,o?a.setAttribute("tabindex",o):a.removeAttribute("tabindex")})}function Mi(e,n,a=!0){return e.filter(s=>s.parentId===n).flatMap(s=>[...!a||s.context?.open?[s]:[],...Mi(e,s.id,a)])}function ES(e,n){let a=[],o=e.find(s=>s.id===n)?.parentId;for(;o;){const s=e.find(u=>u.id===o);o=s?.parentId,s&&(a=a.concat(s))}return a}function Cl(e){return`data-base-ui-${e}`}let xf=0;function Yf(e,n={}){const{preventScroll:a=!1,sync:o=!1,shouldFocus:s}=n;cancelAnimationFrame(xf);function u(){s&&!s()||e?.focus({preventScroll:a})}if(o)return u(),Sn;const c=requestAnimationFrame(u);return xf=c,()=>{xf===c&&(cancelAnimationFrame(c),xf=0)}}const CS="data-base-ui-inert";let Yu=new WeakMap,Sf=new WeakSet,Ku=new WeakMap,m0=0;function vE(e){return e?gs(e)?e.host:vE(e.parentNode):null}const TS=(e,n)=>n.map(a=>{if(e.contains(a))return a;const o=vE(a);return e.contains(o)?o:null}).filter(a=>a!=null),OS=e=>{const n=new Set;return e.forEach(a=>{let o=a;for(;o&&!n.has(o);)n.add(o),o=o.parentNode}),n},MS=(e,n,a)=>{const o=[],s=u=>{!u||a.has(u)||Array.from(u.children).forEach(c=>{Sr(c)!=="script"&&(n.has(c)?s(c):o.push(c))})};return s(e),o};function i3(e,n,a,{mark:o=!0}){const s=TS(n,e),u=o?MS(n,OS(s),new Set(s)):[],c=[],d=[];if(a){const p=TS(n,Array.from(n.querySelectorAll("[aria-live]"))),g=s.concat(p);MS(n,OS(g),new Set(g)).forEach(h=>{const b=h.getAttribute("aria-hidden"),x=b!==null&&b!=="false",w=(Yu.get(h)||0)+1;Yu.set(h,w),c.push(h),w===1&&x&&Sf.add(h),x||h.setAttribute("aria-hidden","true")})}return o&&u.forEach(p=>{const g=(Ku.get(p)||0)+1;Ku.set(p,g),d.push(p),g===1&&p.setAttribute(CS,"")}),m0+=1,()=>{c.forEach(p=>{const g=(Yu.get(p)||0)-1;Yu.set(p,g),g||(Sf.has(p)||p.removeAttribute("aria-hidden"),Sf.delete(p))}),o&&d.forEach(p=>{const g=(Ku.get(p)||0)-1;Ku.set(p,g),g||p.removeAttribute(CS)}),m0-=1,m0||(Yu=new WeakMap,Sf=new WeakSet,Ku=new WeakMap)}}function AS(e,n={}){const{ariaHidden:a=!1,mark:o=!0}=n,s=Kt(e[0]).body;return i3(e,s,a,{mark:o})}var cr=KR();const s3=qR(cr);function bE(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}let DS=0;function l3(e,n="mui"){const a=v.useRef(void 0),o=bE(),s=e??a.current;return v.useEffect(()=>{a.current==null&&(DS+=1,a.current=`${n}-${DS}`,e==null&&o())},[e,n,o]),s}const NS=qy.useId;function Hl(e,n){if(NS!==void 0){const a=NS();return e??(n?`${n}-${a}`:a)}return l3(e,n)}const u3=parseInt(v.version,10);function Qy(e){return u3>=e}function IS(e){if(!v.isValidElement(e))return null;const n=e,a=n.props;return(Qy(19)?a?.ref:n.ref)??null}function ty(e,n){if(e&&!n)return e;if(!e&&n)return n;if(e||n)return{...e,...n}}function c3(e,n){const a={};for(const o in e){const s=e[o];if(n?.hasOwnProperty(o)){const u=n[o](s);u!=null&&Object.assign(a,u);continue}s===!0?a[`data-${o.toLowerCase()}`]="":s&&(a[`data-${o.toLowerCase()}`]=s.toString())}return a}function d3(e,n){return typeof e=="function"?e(n):e}function xE(e,n){return typeof e=="function"?e(n):e}const SE={};function Pr(e,n,a,o,s){if(!a&&!o&&!s&&!e)return uh(n);let u=uh(e);return n&&(u=Ju(u,n)),a&&(u=Ju(u,a)),o&&(u=Ju(u,o)),s&&(u=Ju(u,s)),u}function f3(e){if(e.length===0)return SE;if(e.length===1)return uh(e[0]);let n=uh(e[0]);for(let a=1;a<e.length;a+=1)n=Ju(n,e[a]);return n}function uh(e){return RE(e)?{...e(SE)}:h3(e)}function Ju(e,n){return RE(n)?n(e):p3(e,n)}function h3(e){const n={...e};for(const a in n){const o=n[a];wE(a,o)&&(n[a]=EE(o))}return n}function p3(e,n){if(!n)return e;for(const a in n){const o=n[a];switch(a){case"style":{e[a]=ty(e.style,o);break}case"className":{e[a]=CE(e.className,o);break}default:wE(a,o)?e[a]=g3(e[a],o):e[a]=o}}return e}function wE(e,n){const a=e.charCodeAt(0),o=e.charCodeAt(1),s=e.charCodeAt(2);return a===111&&o===110&&s>=65&&s<=90&&(typeof n=="function"||typeof n>"u")}function RE(e){return typeof e=="function"}function g3(e,n){return n?e?(...a)=>{const o=a[0];if(TE(o)){const u=o;ch(u);const c=n(...a);return u.baseUIHandlerPrevented||e?.(...a),c}const s=n(...a);return e?.(...a),s}:EE(n):e}function EE(e){return e&&((...n)=>{const a=n[0];return TE(a)&&ch(a),e(...n)})}function ch(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function CE(e,n){return n?e?n+" "+e:n:e}function TE(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Mt(e,n,a={}){let o=n.render;a.enabled!==!1&&(o=Zy(o));const s=m3(n,a,o);if(a.enabled===!1)return null;const u=a.state??Gt;return b3(e,o,s,u)}function m3(e,n,a){const{className:o,style:s}=e,{state:u=Gt,ref:c,props:d,stateAttributesMapping:p,enabled:g=!0}=n,y=g?d3(o,u):void 0,h=g?xE(s,u):void 0,b=g?c3(u,p):Gt,x=g&&d?y3(d):void 0,w=g?ty(b,x)??{}:Gt;return typeof document<"u"&&(g?Array.isArray(c)?w.ref=L4([w.ref,IS(a),...c]):w.ref=Gr(w.ref,IS(a),c):Gr(null,null)),g?(y!==void 0&&(w.className=CE(w.className,y)),h!==void 0&&(w.style=ty(w.style,h)),w):Gt}function y3(e){return Array.isArray(e)?f3(e):Pr(void 0,e)}const v3=Symbol.for("react.lazy");function Zy(e){if(e?.$$typeof!==v3)return e;const n=v.Children.toArray(e)[0];return v.isValidElement(n)?n:e}function b3(e,n,a,o){if(n){if(typeof n=="function")return n(a,o);const s=Pr(a,n.props);return s.ref=a.ref,v.cloneElement(n,s)}return x3(e,a)}function x3(e,n){return e==="button"?v.createElement("button",{type:"button",...n,key:n.key}):e==="img"?v.createElement("img",{alt:"",...n,key:n.key}):v.createElement(e,n)}const S3=500,OE=500,w3={style:{transition:"none"}},R3="data-base-ui-click-trigger",ME={fallbackAxisSide:"none"},Jy={fallbackAxisSide:"end"},E3={clipPath:"inset(50%)",position:"fixed",top:0,left:0},AE=v.createContext(null),DE=()=>v.useContext(AE),C3=Cl("portal");function NE(e={}){const{ref:n,container:a,componentProps:o=Gt,elementProps:s}=e,u=Hl(),d=DE()?.portalNode,[p,g]=v.useState(null),[y,h]=v.useState(null),b=Be(R=>{R!==null&&h(R)}),x=v.useRef(null);_e(()=>{if(a===null){x.current&&(x.current=null,h(null),g(null));return}const R=(a&&(_y(a)?a:a.current))??d??document.body;if(R==null){x.current&&(x.current=null,h(null),g(null));return}x.current!==R&&(x.current=R,h(null),g(R))},[a,d]);const w=Mt("div",o,{ref:[n,b],props:[{id:u,[C3]:""},s]}),C=p&&w?cr.createPortal(w,p):null;return{node:y,nodeId:v.isValidElement(w)?w.props.id:void 0,subtree:C}}const Gh=v.forwardRef(function(n,a){const{render:o,className:s,style:u,children:c,container:d,portalOwnerRole:p,...g}=n,{node:y,nodeId:h,subtree:b}=NE({container:d,ref:a,componentProps:n,elementProps:g}),x=v.useRef(null),w=v.useRef(null),C=v.useRef(null),R=v.useRef(null),[T,O]=v.useState(null),M=v.useRef(!1),A=T?.modal,I=T?.open,j=!!T&&!T.modal&&T.open&&!!y;v.useEffect(()=>{if(!y||A)return;function D(z){y&&z.relatedTarget&&El(z)&&(z.type==="focusin"?M.current&&(RS(y),M.current=!1):(o3(y),M.current=!0))}return uo(jt(y,"focusin",D,!0),jt(y,"focusout",D,!0))},[y,A]),_e(()=>{!y||I!==!0||!M.current||(RS(y),M.current=!1)},[I,y]);const k=v.useMemo(()=>({beforeOutsideRef:x,afterOutsideRef:w,beforeInsideRef:C,afterInsideRef:R,portalNode:y,setFocusManagerState:O}),[y]);return S.jsxs(v.Fragment,{children:[b,S.jsxs(AE.Provider,{value:k,children:[j&&y&&S.jsx(jl,{"data-type":"outside",ref:x,onFocus:D=>{if(El(D,y))C.current?.focus();else{const z=T?T.domReference:null;yE(z)?.focus()}}}),j&&y&&S.jsx("span",{role:p,"aria-owns":h,style:E3}),y&&cr.createPortal(c,y),j&&y&&S.jsx(jl,{"data-type":"outside",ref:w,onFocus:D=>{if(El(D,y))R.current?.focus();else{const z=T?T.domReference:null;mE(z)?.focus(),T?.closeOnFocusOut&&T?.onOpenChange(!1,dt(Ti,D.nativeEvent))}}})]})]})});function IE(){const e=new Map;return{emit(n,a){e.get(n)?.forEach(o=>o(a))},on(n,a){e.has(n)||e.set(n,new Set),e.get(n).add(a)},off(n,a){e.get(n)?.delete(a)}}}class Wy{nodesRef={current:[]};events=IE();addNode(n){this.nodesRef.current.push(n)}removeNode(n){const a=this.nodesRef.current.findIndex(o=>o===n);a!==-1&&this.nodesRef.current.splice(a,1)}}const jE=v.createContext(null),kE=v.createContext(null),Ni=()=>v.useContext(jE)?.id||null,Ii=e=>{const n=v.useContext(kE);return e??n};function ev(e){const n=Hl(),a=Ii(e),o=Ni();return _e(()=>{if(!n)return;const s={id:n,parentId:o};return a?.addNode(s),()=>{a?.removeNode(s)}},[a,n,o]),n}function PE(e){const{children:n,id:a}=e,o=Ni();return S.jsx(jE.Provider,{value:v.useMemo(()=>({id:a,parentId:o}),[a,o]),children:n})}function LE(e){const{children:n,externalTree:a}=e,o=er(()=>a??new Wy).current;return S.jsx(kE.Provider,{value:o,children:n})}function ko(e){return e==null?e:"current"in e?e.current:e}function T3(e,n){const a=wn(tr(e));return e instanceof a.KeyboardEvent?"keyboard":e instanceof a.FocusEvent?n||"keyboard":"pointerType"in e?e.pointerType||(Nl(e)?"keyboard":n||"mouse"):"touches"in e?"touch":e instanceof a.MouseEvent?n||(e.detail===0?"keyboard":"mouse"):""}const jS=20;let Ri=[];function tv(){Ri=Ri.filter(e=>e.deref()?.isConnected)}function kS(e){tv(),e&&Sr(e)!=="body"&&(Ri.push(new WeakRef(e)),Ri.length>jS&&(Ri=Ri.slice(-jS)))}function PS(){return tv(),Ri[Ri.length-1]?.deref()}function O3(e){return e?Yh(e)?e:Kh(e)[0]||e:null}function LS(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const a=pE(e).filter(s=>{const u=s.getAttribute("data-tabindex")||"";return Yh(s)||s.hasAttribute("data-tabindex")&&!u.startsWith("-")}),o=e.getAttribute("tabindex");a.length===0?o!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function $h(e){const{context:n,children:a,disabled:o=!1,initialFocus:s=!0,returnFocus:u=!0,explicitReturnFocus:c,restoreFocus:d=!1,modal:p=!0,closeOnFocusOut:g=!0,openInteractionType:y="",nextFocusableElement:h,previousFocusableElement:b,beforeContentFocusGuardRef:x,externalTree:w,getInsideElements:C}=e,R=n.useState("open"),T=n.useState("domReferenceElement"),O=n.useState("floatingElement"),{events:M,dataRef:A}=n.context,I=Be(()=>A.current.floatingContext?.nodeId),j=s===!1,k=Z0(T)&&j,D=Pn(s),z=Pn(u),F=Pn(c),G=Pn(y),J=Pn(R),Y=Ii(w),U=DE(),_=v.useRef(!1),L=v.useRef(!1),$=v.useRef(!1),K=v.useRef(null),V=v.useRef(""),X=v.useRef(""),ee=v.useRef(null),q=v.useRef(null),se=Gr(ee,x,U?.beforeInsideRef),N=Gr(q,U?.afterInsideRef),B=Hn(),W=Hn(),re=Il(),Re=U!=null,le=oh(O),me=Be((ve=le)=>ve?Kh(ve):[]),ge=Be(()=>C?.().filter(ve=>ve!=null)??[]);v.useEffect(()=>{if(o||!p)return;function ve(Me){Me.key==="Tab"&&at(le,Kr(Kt(le)))&&me().length===0&&!k&&Fa(Me)}const Pe=Kt(le);return jt(Pe,"keydown",ve)},[o,le,p,k,me]),v.useEffect(()=>{if(o||!R)return;const ve=Kt(le);function Pe(){$.current=!1}function Me(Fe){const Oe=tr(Fe),He=ge(),be=at(O,Oe)||at(T,Oe)||at(U?.portalNode,Oe)||He.some(Ue=>Ue===Oe||at(Ue,Oe));$.current=!be,X.current=Fe.pointerType||"keyboard",gc(Oe,`[${R3}]`)&&(L.current=!0,W.start(0,()=>{L.current=!1}))}function Le(){X.current="keyboard"}return uo(jt(ve,"pointerdown",Me,!0),jt(ve,"pointerup",Pe,!0),jt(ve,"pointercancel",Pe,!0),jt(ve,"keydown",Le,!0),Pe)},[o,O,T,le,R,U,W,ge]),v.useEffect(()=>{if(o||!g)return;const ve=Kt(le);function Pe(){L.current=!0,W.start(0,()=>{L.current=!1})}function Me(He){const be=tr(He);Yh(be)&&(K.current=be)}function Le(He){const be=He.relatedTarget,Ue=He.currentTarget,Ze=tr(He);p&&be==null&&Ze!=null&&at(O,Ze)&&kS(Ze),queueMicrotask(()=>{const it=I(),de=n.context.triggerElements,we=ge(),Ke=be?.hasAttribute(Cl("focus-guard"))&&[ee.current,q.current,U?.beforeInsideRef.current,U?.afterInsideRef.current,U?.beforeOutsideRef.current,U?.afterOutsideRef.current,ko(b),ko(h)].includes(be),De=!(at(T,be)||at(O,be)||at(be,O)||at(U?.portalNode,be)||we.some(Ie=>Ie===be||at(Ie,be))||de.hasMatchingElement(Ie=>at(Ie,be))||Ke||Y&&(Mi(Y.nodesRef.current,it).find(Ie=>at(Ie.context?.elements.floating,be)||at(Ie.context?.elements.domReference,be))||ES(Y.nodesRef.current,it).find(Ie=>[Ie.context?.elements.floating,oh(Ie.context?.elements.floating)].includes(be)||Ie.context?.elements.domReference===be)));if(Ue===T&&le&&LS(le),d&&Ue!==T&&!qh(Ze)&&Kr(ve)===ve.body){if(yn(le)&&(le.focus(),d==="popup")){re.request(()=>{le.focus()});return}const Ie=me(),yt=K.current,ut=(yt&&Ie.includes(yt)?yt:null)||Ie[Ie.length-1]||le;yn(ut)&&ut.focus()}if(A.current.insideReactTree){A.current.insideReactTree=!1;return}(k||!p)&&be&&De&&!L.current&&(k||be!==PS())&&(_.current=!0,n.setOpen(!1,dt(Ti,He)))})}function Fe(){$.current||(A.current.insideReactTree=!0,B.start(0,()=>{A.current.insideReactTree=!1}))}const Oe=yn(T)?T:null;if(!(!O&&!Oe))return uo(Oe&&jt(Oe,"focusout",Le),Oe&&jt(Oe,"pointerdown",Pe),O&&jt(O,"focusin",Me),O&&jt(O,"focusout",Le),O&&U&&jt(O,"focusout",Fe,!0))},[o,T,O,le,p,Y,U,n,g,d,me,k,I,A,B,W,re,h,b,ge]),v.useEffect(()=>{if(o||!O||!R)return;const ve=Array.from(U?.portalNode?.querySelectorAll(`[${Cl("portal")}]`)||[]),Me=(Y?ES(Y.nodesRef.current,I()):[]).find(Ue=>Z0(Ue.context?.elements.domReference||null))?.context?.elements.domReference,Fe=[...[O,...ve,ee.current,q.current,U?.beforeOutsideRef.current,U?.afterOutsideRef.current,...ge()],Me,ko(b),ko(h),k?T:null].filter(Ue=>Ue!=null),Oe=AS(Fe,{ariaHidden:p||k,mark:!1}),He=[O,...ve].filter(Ue=>Ue!=null),be=AS(He);return()=>{be(),Oe()}},[R,o,T,O,p,U,k,Y,I,h,b,ge]),_e(()=>{if(!R||o||!yn(le))return;V.current="",X.current="";const ve=Kt(le),Pe=Kr(ve);queueMicrotask(()=>{const Me=D.current,Le=typeof Me=="function"?Me(G.current||""):Me;if(Le===void 0||Le===!1||at(le,Pe))return;let Oe=null;const He=()=>(Oe==null&&(Oe=me(le)),Oe[0]||le);let be;Le===!0||Le===null?be=He():be=ko(Le),be=be||He();const Ue=at(le,Kr(ve)),Ze=A.current.openEvent,it=Ze?.type==="mousedown"&&Nl(Ze);Yf(be,{sync:it,preventScroll:be===le,shouldFocus(){if(!J.current)return!1;if(Ue)return!0;const de=Kr(ve);return!(de!==be&&at(le,de))}})})},[o,R,le,me,D,G,J,A]);const ce=v.useRef(null);_e(()=>{if(o||!le){ce.current=null;return}ce.current&&(ce.current.cancelled=!0,ce.current=null);const ve=Kt(le),Pe=Kr(ve),Me=G.current==null;kS(Pe);function Le(Oe){if(Oe.open||(V.current=T3(Oe.nativeEvent,X.current)),(Oe.reason===Ti&&Oe.triggerElement?.hasAttribute(Cl("focus-guard"))||Oe.reason===qn&&Oe.nativeEvent.type==="mouseleave")&&(_.current=!0),Oe.reason===Bh)if(Oe.nested)_.current=!1;else if(Nl(Oe.nativeEvent)||zy(Oe.nativeEvent))_.current=!1;else{let He=!1;Kt(le).createElement("div").focus({get preventScroll(){return He=!0,!1}}),He?_.current=!1:_.current=!0}}M.on("openchange",Le);function Fe(Oe){const He=z.current;let be=typeof He=="function"?He(Oe):He;if(be===void 0||be===!1)return null;be===null&&(be=!0);const Ue=T?.isConnected?T:null,Ze=Pe?.isConnected&&Sr(Pe)!=="body"?Pe:null;let it=Me?Ze||Ue:Ue||Ze;return it||(it=PS()||null),typeof be=="boolean"?it:ko(be)||it||null}return()=>{M.off("openchange",Le);const Oe=Kr(ve),He=ge(),be=at(O,Oe)||He.some(we=>we===Oe||at(we,Oe))||Y&&Mi(Y.nodesRef.current,I(),!1).some(we=>at(we.context?.elements.floating,Oe)),Ue=z.current,Ze=V.current,it=Fe(Ze),de={cancelled:!1};ce.current=de,queueMicrotask(()=>{ce.current===de&&(ce.current=null);const we=O3(it),Ke=F.current??typeof Ue!="boolean";if(!de.cancelled&&Ue&&!_.current&&yn(we)&&(!(!Ke&&we!==Oe&&Oe!==ve.body)||be)){const De={preventScroll:!0};Ze==="keyboard"&&(De.focusVisible=!0),we.focus(De)}_.current=!1})}},[o,O,le,z,F,G,M,Y,T,I,ge]),_e(()=>{if(!ho||R||!O)return;const ve=Kr(Kt(O));!yn(ve)||!Ac(ve)||at(O,ve)&&ve.blur()},[R,O]),_e(()=>{if(!(o||!U))return U.setFocusManagerState({modal:p,closeOnFocusOut:g,open:R,onOpenChange:n.setOpen,domReference:T}),()=>{U.setFocusManagerState(null)}},[o,U,p,R,n,g,T]),_e(()=>{if(!(o||!le))return LS(le),()=>{queueMicrotask(tv)}},[o,le]);const Te=!o&&(p?!k:!0)&&(Re||p);return S.jsxs(v.Fragment,{children:[Te&&S.jsx(jl,{"data-type":"inside",ref:se,onFocus:ve=>{if(p){const Pe=me();Yf(Pe[Pe.length-1])}else U?.portalNode&&(_.current=!1,El(ve,U.portalNode)?mE(T)?.focus():ko(b??U.beforeOutsideRef)?.focus())}}),a,Te&&S.jsx(jl,{"data-type":"inside",ref:N,onFocus:ve=>{p?Yf(me()[0]):U?.portalNode&&(g&&(_.current=!0),El(ve,U.portalNode)?yE(T)?.focus():ko(h??U.afterOutsideRef)?.focus())}})]})}function zE(e,n={}){const{enabled:a=!0,event:o="click",toggle:s=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:d=0,reason:p=Va}=n,g=e.context.dataRef,y=v.useRef(void 0),h=Il(),b=Hn(),x=v.useMemo(()=>{function w(R,T,O,M){const A=dt(p,T,O);R&&M==="touch"&&d>0?b.start(d,()=>{e.setOpen(!0,A)}):e.setOpen(R,A)}function C(R,T,O){const M=g.current.openEvent,A=e.select("domReferenceElement")!==T;return R&&A||!R||!s?!0:M&&(typeof c=="function"?c():c)?!O(M.type):!1}return{onPointerDown(R){y.current=Ci(R.pointerType,!0)&&zy(R.nativeEvent)?"virtual":R.pointerType},onMouseDown(R){const T=y.current,O=R.nativeEvent,M=e.select("open");if(R.button!==0||o==="click"||Ci(T,!0)&&u)return;const A=C(M,R.currentTarget,D=>D==="click"||D==="mousedown"),I=tr(O),j=Ac(I);if(j||T==="virtual"){w(A,O,j?I:R.currentTarget,T);return}const k=R.currentTarget;h.request(()=>{w(A,O,k,T)})},onClick(R){if(o==="mousedown-only")return;const T=y.current;if(o==="mousedown"&&T){y.current=void 0;return}if(Ci(T,!0)&&u)return;const O=e.select("open"),M=C(O,R.currentTarget,A=>A==="click"||A==="mousedown"||A==="keydown"||A==="keyup");w(M,R.nativeEvent,R.currentTarget,T)},onKeyDown(){y.current=void 0}}},[g,o,u,p,e,c,s,h,b,d]);return v.useMemo(()=>a?{reference:x}:Gt,[a,x])}function M3(e,n){let a=null,o=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const u=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},c=n.axis==="x"||n.axis==="both",d=n.axis==="y"||n.axis==="both",p=["mouseenter","mousemove"].includes(n.dataRef.current.openEvent?.type||"")&&n.pointerType!=="touch",g=n.axis==="y"?u.width:0,y=n.axis==="x"?u.height:0;let h=u.x,b=u.y;return a==null&&n.x&&c&&(a=u.x-n.x),o==null&&n.y&&d&&(o=u.y-n.y),h-=a||0,b-=o||0,(!s||p)&&(h=c&&n.x!=null?n.x:h,b=d&&n.y!=null?n.y:b),s=!0,{width:g,height:y,x:h,y:b,top:b,right:h+g,bottom:b+y,left:h}}}}function zS(e){return e!=null&&e.clientX!=null}function A3(e,n={}){const{enabled:a=!0,axis:o="both"}=n,s=e.useState("open"),u=e.useState("floatingElement"),c=e.useState("domReferenceElement"),d=e.context.dataRef,p=v.useRef(!1),g=v.useRef(null),[y,h]=v.useState(),[b,x]=v.useState([]),w=Be(M=>{e.set("positionReference",M)}),C=Be((M,A,I)=>{p.current||d.current.openEvent&&!zS(d.current.openEvent)||e.set("positionReference",M3(I??c,{x:M,y:A,axis:o,dataRef:d,pointerType:y}))}),R=Be(M=>{s?g.current||(C(M.clientX,M.clientY,M.currentTarget),x([])):C(M.clientX,M.clientY,M.currentTarget)}),T=Ci(y)?u:s;v.useEffect(()=>{if(!a){w(c);return}if(!T)return;function M(){g.current?.(),g.current=null}const A=wn(u);function I(j){const k=tr(j);at(u,k)?M():C(j.clientX,j.clientY)}return!d.current.openEvent||zS(d.current.openEvent)?g.current=jt(A,"mousemove",I):w(c),M},[T,a,u,d,c,e,C,w,b]),v.useEffect(()=>()=>{e.set("positionReference",null)},[e]),v.useEffect(()=>{a&&!u&&(p.current=!1)},[a,u]),v.useEffect(()=>{!a&&s&&(p.current=!0)},[a,s]);const O=v.useMemo(()=>{function M(A){h(A.pointerType)}return{onPointerDown:M,onPointerEnter:M,onMouseMove:R,onMouseEnter:R}},[R]);return v.useMemo(()=>a?{reference:O,trigger:O}:{},[a,O])}function D3(){return!1}function N3(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function jc(e,n={}){const{enabled:a=!0,escapeKey:o=!0,outsidePress:s=!0,outsidePressEvent:u="sloppy",referencePress:c=D3,bubbles:d,externalTree:p}=n,g=e.useState("open"),y=e.useState("floatingElement"),{dataRef:h,events:b}=e.context,x=Ii(p),w=Be(typeof s=="function"?s:()=>!1),C=typeof s=="function"?w:s,R=C!==!1,T=Be(()=>u),{escapeKey:O,outsidePress:M}=N3(d),A=v.useRef(!1),I=v.useRef(!1),j=v.useRef(!1),k=v.useRef(!1),D=v.useRef(!1),z=v.useRef(""),F=v.useRef(null),G=Hn(),J=Hn(),Y=Hn(),U=Be(()=>{J.clear(),h.current.insideReactTree=!1}),_=Be(N=>{const B=h.current.floatingContext?.nodeId;return(x?Mi(x.nodesRef.current,B):[]).some(re=>re.context?.open&&!re.context.dataRef.current[N])}),L=Be(N=>h0(N,e.select("floatingElement"))||h0(N,e.select("domReferenceElement"))),$=Be(N=>{c()&&e.setOpen(!1,dt(Va,N.nativeEvent))}),K=Be(N=>{if(!g||!a||!o||N.key!=="Escape")return;const B=i4(N)?N.nativeEvent:N;if(D.current||B.isComposing||!O&&_("__escapeKeyBubbles"))return;const W=dt(Dc,B);e.setOpen(!1,W),W.isCanceled||N.preventDefault(),!O&&!W.isPropagationAllowed&&N.stopPropagation()}),V=Be(()=>{h.current.insideReactTree=!0,J.start(0,U)}),X=Be(N=>{if(!g||!a||N.button!==0)return;const B=tr(N.nativeEvent);at(e.select("floatingElement"),B)&&(A.current||(A.current=!0,I.current=!1))}),ee=Be(N=>{!g||!a||(N.defaultPrevented||N.nativeEvent.defaultPrevented)&&A.current&&(I.current=!0)});v.useEffect(()=>{function N(B){B.open||(k.current=!1)}return b.on("openchange",N),()=>{b.off("openchange",N)}},[b]),v.useEffect(()=>U,[U]),v.useEffect(()=>{if(!g||!a)return g||(k.current=!1,D.current=!1,z.current="",F.current=null),U;h.current.__escapeKeyBubbles=O,h.current.__outsidePressBubbles=M;const N=new Da,B=Kt(y);function W(){Y.clear(),D.current=!0}function re(){D.current=!0,Y.start(ho?5:0,()=>{D.current=!1})}function Re(){j.current=!0,N.start(0,()=>{j.current=!1})}function le(){A.current=!1,I.current=!1}function me(){const de=z.current,we=de==="pen"||!de?"mouse":de,Ke=T(),De=typeof Ke=="function"?Ke():Ke;return typeof De=="string"?De:De[we]}function ge(de){const we=me();return we==="intentional"&&de.type!=="click"||we==="sloppy"&&de.type==="click"}function ce(de){const we=h.current.floatingContext?.nodeId,Ke=x&&Mi(x.nodesRef.current,we).some(De=>h0(de,De.context?.elements.floating));return L(de)||Ke}function Te(de){if(ge(de)){de.type!=="click"&&!L(de)&&(N.clear(),j.current=!1),U();return}if(h.current.insideReactTree){U();return}const we=tr(de),Ke=`[${Cl("inert")}]`,De=on(we)?we.getRootNode():null,Ie=Array.from((gs(De)?De:Kt(e.select("floatingElement"))).querySelectorAll(Ke)),yt=e.context.triggerElements;if(we&&(yt.hasElement(we)||yt.hasMatchingElement(ht=>at(ht,we))))return;let ut=on(we)?we:null;for(;ut&&!zo(ut);){const ht=Uo(ut);if(zo(ht)||!on(ht))break;ut=ht}if(!(Ie.length&&on(we)&&!E4(we)&&!at(we,e.select("floatingElement"))&&Ie.every(ht=>!at(ut,ht)))){if(yn(we)&&!("touches"in de)){const ht=zo(we),Ot=fa(we),Dt=/auto|scroll/,Jt=ht||Dt.test(Ot.overflowX),rn=ht||Dt.test(Ot.overflowY),Wt=Jt&&we.clientWidth>0&&we.scrollWidth>we.clientWidth,We=rn&&we.clientHeight>0&&we.scrollHeight>we.clientHeight,xt=Ot.direction==="rtl",$t=We&&(xt?de.offsetX<=we.offsetWidth-we.clientWidth:de.offsetX>we.clientWidth),ft=Wt&&de.offsetY>we.clientHeight;if($t||ft)return}if(!ce(de)){if(me()==="intentional"){if(de.detail!==0&&!Nl(de)&&!k.current)return;if(j.current){N.clear(),j.current=!1;return}}typeof C=="function"&&!C(de)||_("__outsidePressBubbles")||(e.setOpen(!1,dt(Bh,de)),U())}}}function ve(de){me()!=="sloppy"||de.pointerType==="touch"||!e.select("open")||!a||L(de)||Te(de)}function Pe(de){if(me()!=="sloppy"||!e.select("open")||!a||L(de))return;const we=de.touches[0];we&&(F.current={startTime:Date.now(),startX:we.clientX,startY:we.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},G.start(1e3,()=>{F.current&&(F.current.dismissOnTouchEnd=!1,F.current.dismissOnMouseDown=!1)}))}function Me(de,we){const Ke=tr(de);if(!Ke)return;const De=jt(Ke,de.type,()=>{we(de),De()})}function Le(de){z.current="touch",Me(de,Pe)}function Fe(de){G.clear(),de.type==="pointerdown"&&(de.button===0&&(k.current=!0),z.current=de.pointerType),!(de.type==="mousedown"&&F.current&&!F.current.dismissOnMouseDown)&&Me(de,we=>{we.type==="pointerdown"?ve(we):Te(we)})}function Oe(de){if(de.type==="pointercancel"&&(k.current=!1),!A.current)return;const we=I.current;if(le(),me()==="intentional"){if(de.type==="pointercancel"){we&&Re();return}if(!ce(de)){if(we){Re();return}typeof C=="function"&&!C(de)||(N.clear(),j.current=!0,U())}}}function He(de){if(me()!=="sloppy"||!F.current||L(de))return;const we=de.touches[0];if(!we)return;const Ke=Math.abs(we.clientX-F.current.startX),De=Math.abs(we.clientY-F.current.startY),Ie=Math.sqrt(Ke*Ke+De*De);Ie>5&&(F.current.dismissOnTouchEnd=!0),Ie>10&&(Te(de),G.clear(),F.current=null)}function be(de){Me(de,He)}function Ue(de){me()!=="sloppy"||!F.current||L(de)||(F.current.dismissOnTouchEnd&&Te(de),G.clear(),F.current=null)}function Ze(de){Me(de,Ue)}const it=uo(o&&uo(jt(B,"keydown",K),jt(B,"compositionstart",W),jt(B,"compositionend",re)),R&&uo(jt(B,"click",Fe,!0),jt(B,"pointerdown",Fe,!0),jt(B,"pointerup",Oe,!0),jt(B,"pointercancel",Oe,!0),jt(B,"mousedown",Fe,!0),jt(B,"mouseup",Oe,!0),jt(B,"touchstart",Le,{capture:!0,passive:!0}),jt(B,"touchmove",be,{capture:!0,passive:!0}),jt(B,"touchend",Ze,{capture:!0,passive:!0})));return()=>{it(),N.clear(),le(),j.current=!1}},[h,y,o,R,C,g,a,O,M,K,U,T,_,L,x,e,G,Y]);const q=v.useMemo(()=>({onKeyDown:K,onPointerDown:$,onClick:$}),[K,$]),se=v.useMemo(()=>({onKeyDown:K,onPointerDown:ee,onMouseDown:ee,onClickCapture:V,onMouseDownCapture(N){V(),X(N)},onPointerDownCapture(N){V(),X(N)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[K,V,X,ee]);return v.useMemo(()=>a?{reference:q,floating:se,trigger:q}:{},[a,q,se])}function _E(e){const{popupStore:n,treatPopupAsFloatingElement:a=!1,floatingRootContext:o,floatingId:s,nested:u,onOpenChange:c}=e,d=n.useState("open"),p=n.useState("activeTriggerElement"),g=n.useState(a?"popupElement":"positionerElement"),y=c;return n.useSyncedValue("floatingId",s),_e(()=>{const h={open:d,floatingId:s,referenceElement:p,floatingElement:g};on(p)&&(h.domReferenceElement=p),o.state.positionReference===o.state.referenceElement&&(h.positionReference=p),o.update(h)},[d,s,p,g,o]),o.context.onOpenChange=y,o.context.nested=u,o}function ws(e,n=!1,a=!1,o=!1){const[s,u]=v.useState(e&&n?"idle":void 0),[c,d]=v.useState(e&&!o);return e&&!c&&(d(!0),u("starting")),!e&&c&&s!=="ending"&&!a&&u("ending"),!e&&!c&&s==="ending"&&u(void 0),_e(()=>{if(!e&&c&&s!=="ending"&&a){const p=Cr.request(()=>{u("ending")});return()=>{Cr.cancel(p)}}},[e,c,s,a]),_e(()=>{if(!e||n||s===void 0)return;const p=Cr.request(()=>{u(void 0)});return()=>{Cr.cancel(p)}},[n,e,s]),_e(()=>{if(!e||!n)return;e&&c&&s!=="idle"&&u("starting");const p=Cr.request(()=>{u("idle")});return()=>{Cr.cancel(p)}},[n,e,c,s]),{mounted:c,setMounted:d,transitionStatus:s}}function _S(e,n){return e.getAnimations(n).filter(a=>{const o=a.effect?.getTiming();return o?.duration!==1/0&&o?.iterations!==1/0})}let wf=null;function I3(e){if(!wf){const n=[];wf=n,queueMicrotask(()=>{wf=null,cr.flushSync(()=>{for(const a of n)a()})})}wf.push(e)}function Xh(e,n=!1,a=!1){const o=Il();return Be((s,u=null)=>{o.cancel();const c=ko(e);if(c==null)return;const d=c,p=()=>{if(!a){cr.flushSync(s);return}I3(()=>{u?.aborted||s()})};if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function g(){Promise.all(_S(d).map(y=>y.finished.then(Sn))).then(()=>{u?.aborted||p()},()=>{if(u?.aborted)return;if(_S(d).some(h=>h.pending||h.playState!=="finished")){g();return}p()})}if(n){const y=By;if(!d.hasAttribute(y)){o.request(g);return}const h=new MutationObserver(()=>{d.hasAttribute(y)||(h.disconnect(),g())});h.observe(d,{attributes:!0,attributeFilter:[y]}),u?.addEventListener("abort",()=>h.disconnect(),{once:!0});return}o.request(g)})}function Ia(e){const{enabled:n=!0,open:a,ref:o,batch:s=!1,onComplete:u}=e,c=Be(u),d=Xh(o,a,s);v.useEffect(()=>{if(!n)return;const p=new AbortController;return d(c,p.signal),()=>{p.abort()}},[n,a,c,d])}function HE(e){const{open:n,ref:a,preventUnmountOnClose:o,setPreventUnmountOnClose:s,onUnmount:u,animateInitialOpen:c}=e,d=Be(s),{mounted:p,setMounted:g,transitionStatus:y}=ws(n,!1,!1,c),h=n?!1:o;_e(()=>{n&&d(!1)},[n,d]);const b=v.useRef(p),x=v.useRef(!1),w=bE(),C=()=>{b.current=!1,g(!1),u()};_e(()=>{b.current=p,x.current&&(x.current=!1,!n&&p&&C())});const R=Be(()=>{if(b.current){if(n){x.current=!0,w();return}C()}});return Ia({enabled:p&&!n&&!h,open:n,ref:a,onComplete(){n||R()}}),{mounted:p,transitionStatus:y,preventUnmountingOnClose:h,forceUnmount:R}}const kc={tabIndex:-1,[X0]:""};function UE(e){return n=>n==="touch"?e.current:!0}function nv(e,n=!1){const a=Hl(),o=Ni()!=null,s=er(()=>e(a,o)).current;return _E({popupStore:s,treatPopupAsFloatingElement:n,floatingRootContext:s.state.floatingRootContext,floatingId:a,nested:o,onOpenChange:s.setOpen}),s}function Qh({handle:e,store:n}){return _e(()=>e.attachStore(n),[e,n]),null}function HS(e){const n=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==n&&e.set("triggerCount",n)}function j3(e,n){const a=v.useRef(null);return Be(o=>{const s=a.current;if(s!==null){if(s.element===o&&s.store===n&&s.id===e)return;a.current=null;const u=s.store;u.context.triggerElements.getById(s.id)===s.element&&(u.context.triggerElements.delete(s.id),HS(u))}o!==null&&e!==void 0&&(a.current={store:n,id:e,element:o},n.context.triggerElements.add(e,o),HS(n))})}function Zh(e,n,a,o=!1){let s=e.preventUnmountingOnClose;n?s=!1:o&&(s=!0);const u=a?.id??null;let c=e.activeTriggerId,d=e.activeTriggerElement;return(u||n)&&(c=u,d=a??null),{open:n,preventUnmountingOnClose:s,activeTriggerId:c,activeTriggerElement:d,openedWithoutTrigger:n?a==null:e.openedWithoutTrigger}}function Jh(e){let n=!1;return e.preventUnmountOnClose=()=>{n=!0},()=>n}function k3(e,n,a,o={}){const s=a.reason,u=s===qn,c=n&&s===xl,d=!n&&(s===Va||s===Dc),p=Jh(a);if(e.context.onOpenChange?.(n,a),a.isCanceled)return;o.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(n,a);const g=()=>{const y=Zh(e.state,n,a.trigger,p()),h={...o.extraState,...y};c?h.instantType="focus":d?h.instantType="dismiss":u&&(h.instantType=void 0),e.update(h)};u?cr.flushSync(g):g()}function FE(e,n,a,o){const s=a.useState("isMountedByTrigger",e),u=j3(e,a),c=Be(p=>{const g=a.select("open"),y=a.select("activeTriggerId");if(y===e){const h={activeTriggerElement:p,...g?o:null};a.update(h);return}if(y==null&&g&&!a.state.openedWithoutTrigger){const h={activeTriggerId:e??null,activeTriggerElement:p,...o};a.update(h)}}),d=Be(p=>{u(p),p&&c(p)});return _e(()=>(d(n.current),()=>d(null)),[d,n,a,e]),_e(()=>{if(s){const p={activeTriggerElement:n.current,...o};a.update(p)}},[s,a,n,...Object.values(o)]),{registerTrigger:d,isMountedByThisTrigger:s}}function Wh(e,n={}){const{closeOnActiveTriggerUnmount:a=!1}=n,o=v.useRef(null),s=e.useState("open"),u=e.useState("triggerCount"),c=e.useState("activeTriggerId"),d=e.useState("activeTriggerElement");_e(()=>{if(!s){o.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}const p=e.context.triggerElements.size,g={};e.state.triggerCount!==p&&(g.triggerCount=p);const y=e.select("activeTriggerId");let h=null;if(y){const b=e.context.triggerElements.getById(y);if(b)o.current=y,b!==e.state.activeTriggerElement&&(g.activeTriggerElement=b);else{for(const[x,w]of e.context.triggerElements.entries())if(w===e.state.activeTriggerElement){g.activeTriggerId=x,g.activeTriggerElement=w,o.current=x;break}g.activeTriggerId===void 0&&(o.current===y?h=y:o.current=null)}}else o.current=null;if(!h&&!y&&!e.state.openedWithoutTrigger&&p===1){const b=e.context.triggerElements.entries().next();if(!b.done){const[x,w]=b.value;g.activeTriggerId=x,g.activeTriggerElement=w,o.current=x}}(g.triggerCount!==void 0||g.activeTriggerId!==void 0||g.activeTriggerElement!==void 0)&&e.update(g),h&&a&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===h&&!e.context.triggerElements.getById(h)){const b=dt(zr);e.setOpen(!1,b),b.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[s,e,u,c,d,a])}function ep(e,n,a,o){const{mounted:s,transitionStatus:u,forceUnmount:c}=HE({open:e,ref:n.context.popupRef,preventUnmountOnClose:n.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:d=>n.set("preventUnmountingOnClose",d),animateInitialOpen:o,onUnmount(){n.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),a?.(),n.context.onOpenChangeComplete?.(!1)}});return er(()=>(n.set("mounted",s),null)),n.useSyncedValues({mounted:s,transitionStatus:u}),{forceUnmount:c,transitionStatus:u}}function tp(e,n){e.useSyncedValues(n),_e(()=>()=>{e.update({activeTriggerProps:Gt,inactiveTriggerProps:Gt,popupProps:Gt})},[e])}function BE(e,n){_e(()=>{!n&&e.state.openMethod!==null&&e.set("openMethod",null)},[n,e]),_e(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class Pc{idMap=new Map;add(n,a){this.idMap.set(n,a)}delete(n){this.idMap.delete(n)}hasElement(n){for(const a of this.idMap.values())if(a===n)return!0;return!1}hasMatchingElement(n){for(const a of this.idMap.values())if(n(a))return!0;return!1}getById(n){return this.idMap.get(n)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}var y0={exports:{}},v0={};var US;function P3(){if(US)return v0;US=1;var e=Ec();function n(h,b){return h===b&&(h!==0||1/h===1/b)||h!==h&&b!==b}var a=typeof Object.is=="function"?Object.is:n,o=e.useState,s=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function d(h,b){var x=b(),w=o({inst:{value:x,getSnapshot:b}}),C=w[0].inst,R=w[1];return u(function(){C.value=x,C.getSnapshot=b,p(C)&&R({inst:C})},[h,x,b]),s(function(){return p(C)&&R({inst:C}),h(function(){p(C)&&R({inst:C})})},[h]),c(x),x}function p(h){var b=h.getSnapshot;h=h.value;try{var x=b();return!a(h,x)}catch{return!0}}function g(h,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return v0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,v0}var FS;function VE(){return FS||(FS=1,y0.exports=P3()),y0.exports}var np=VE(),b0={exports:{}},x0={};var BS;function L3(){if(BS)return x0;BS=1;var e=Ec(),n=VE();function a(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var o=typeof Object.is=="function"?Object.is:a,s=n.useSyncExternalStore,u=e.useRef,c=e.useEffect,d=e.useMemo,p=e.useDebugValue;return x0.useSyncExternalStoreWithSelector=function(g,y,h,b,x){var w=u(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=d(function(){function T(j){if(!O){if(O=!0,M=j,j=b(j),x!==void 0&&C.hasValue){var k=C.value;if(x(k,j))return A=k}return A=j}if(k=A,o(M,j))return k;var D=b(j);return x!==void 0&&x(k,D)?(M=j,k):(M=j,A=D)}var O=!1,M,A,I=h===void 0?null:h;return[function(){return T(y())},I===null?void 0:function(){return T(I())}]},[y,h,b,x]);var R=s(g,w[0],w[1]);return c(function(){C.hasValue=!0,C.value=R},[R]),p(R),R},x0}var VS;function z3(){return VS||(VS=1,b0.exports=L3()),b0.exports}var _3=z3();const H3=Qy(19),U3=H3?B3:V3;function qE(e,n,a,o,s){return U3(e,n,a,o,s)}function F3(e,n,a,o,s){const u=v.useCallback(()=>n(e.getSnapshot(),a,o,s),[e,n,a,o,s]);return np.useSyncExternalStore(e.subscribe,u,u)}QN({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let n=!1;for(let a=0;a<e.syncHooks.length;a+=1){const o=e.syncHooks[a],s=o.selector(o.store.state,o.a1,o.a2,o.a3);Object.is(o.value,s)||(n=!0,o.value=s)}return n&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=n=>{const a=new Set;for(const s of e.syncHooks)a.add(s.store);const o=[];for(const s of a)o.push(s.subscribe(n));return()=>{for(const s of o)s()}}),np.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function B3(e,n,a,o,s){const u=XN();if(!u)return F3(e,n,a,o,s);const c=u.syncIndex;u.syncIndex+=1;let d;return u.didInitialize?(d=u.syncHooks[c],(d.store!==e||d.selector!==n||!Object.is(d.a1,a)||!Object.is(d.a2,o)||!Object.is(d.a3,s))&&(d.store!==e&&(u.didChangeStore=!0),d.store=e,d.selector=n,d.a1=a,d.a2=o,d.a3=s,d.value=n(e.getSnapshot(),a,o,s))):(d={store:e,selector:n,a1:a,a2:o,a3:s,value:n(e.getSnapshot(),a,o,s)},u.syncHooks.push(d)),d.value}function V3(e,n,a,o,s){return _3.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,u=>n(u,a,o,s))}class q3{static create(n){return new this(n)}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 a=this.updateTick;for(const o of this.listeners){if(a!==this.updateTick)return;o(n)}}update(n){for(const a in n)if(!Object.is(this.state[a],n[a])){this.setState({...this.state,...n});return}}set(n,a){Object.is(this.state[n],a)||this.setState({...this.state,[n]:a})}notifyAll(){const n={...this.state};this.setState(n)}use(n,a,o,s){return qE(this,n,a,o,s)}}class Ul extends q3{constructor(n,a={},o){super(n),this.context=a,this.selectors=o}useSyncedValue(n,a){v.useDebugValue(n);const o=this;_e(()=>{o.state[n]!==a&&o.set(n,a)},[o,n,a])}useSyncedValueWithCleanup(n,a){const o=this;_e(()=>(o.state[n]!==a&&o.set(n,a),()=>{o.set(n,void 0)}),[o,n,a])}useSyncedValues(n){const a=this,o=Object.values(n);_e(()=>{a.update(n)},[a,...o])}useControlledProp(n,a){v.useDebugValue(n);const o=this,s=a!==void 0;_e(()=>{s&&!Object.is(o.state[n],a)&&o.setState({...o.state,[n]:a})},[o,n,a,s])}select(n,a,o,s){const u=this.selectors[n];return u(this.state,a,o,s)}useState(n,a,o,s){return v.useDebugValue(n),qE(this,this.selectors[n],a,o,s)}useContextCallback(n,a){v.useDebugValue(n);const o=Be(a??Sn);this.context[n]=o}useStateSetter(n){const a=v.useRef(void 0);return a.current===void 0&&(a.current=o=>{this.set(n,o)}),a.current}observe(n,a){let o;typeof n=="function"?o=n:o=this.selectors[n];let s=o(this.state);return a(s,s,this),this.subscribe(u=>{const c=o(u);if(!Object.is(s,c)){const d=s;s=c,a(c,d,this)}})}}const Y3={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class YE extends Ul{constructor(n){const{syncOnly:a,nested:o,onOpenChange:s,triggerElements:u,...c}=n;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:IE(),nested:o,triggerElements:u},Y3),this.syncOnly=a}syncOpenEvent=(n,a)=>{(!n||!this.state.open||a!=null&&s4(a))&&(this.context.dataRef.current.openEvent=n?a:void 0)};dispatchOpenChange=(n,a)=>{this.syncOpenEvent(n,a.event);const o={open:n,reason:a.reason,nativeEvent:a.event,nested:this.context.nested,triggerElement:a.trigger};this.context.events.emit("openchange",o)};setOpen=(n,a)=>{if(this.syncOnly){this.context.onOpenChange?.(n,a);return}this.dispatchOpenChange(n,a),this.context.onOpenChange?.(n,a)}}function rp(e,n,a=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new YE({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:n,syncOnly:!0,nested:a,onOpenChange:void 0}),floatingId:n,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Gt,inactiveTriggerProps:Gt,popupProps:Gt}}const rc=e=>e.triggerIdProp??e.activeTriggerId,dh=e=>e.openProp??e.open,qS=e=>(e.popupElement?.id??e.floatingId)||void 0;function KE(e,n){return n!==void 0&&dh(e)&&rc(e)===n}function K3(e,n){return KE(e,n)?!0:n!==void 0&&dh(e)&&rc(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const Po={open:dh,mounted:e=>e.mounted,transitionStatus:e=>dh(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:rc,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:qS,isTriggerActive:(e,n)=>n!==void 0&&rc(e)===n,isOpenedByTrigger:(e,n)=>KE(e,n),isMountedByTrigger:(e,n)=>n!==void 0&&rc(e)===n&&e.mounted,triggerProps:(e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,n)=>K3(e,n)?qS(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function GE(e){const n=v.useCallback(o=>e===void 0?Sn:e.subscribeStore(o),[e]),a=v.useCallback(()=>e===void 0?void 0:e.store,[e]);return np.useSyncExternalStore(n,a,()=>e?.serverStore)}function G3(e){const{open:n=!1,onOpenChange:a,elements:o={}}=e,s=Hl(),u=Ni()!=null,c=er(()=>new YE({open:n,transitionStatus:void 0,onOpenChange:a,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new Pc,floatingId:s,syncOnly:!1,nested:u})).current;return _e(()=>{const d={open:n,floatingId:s};o.reference!==void 0&&(d.referenceElement=o.reference,d.domReferenceElement=on(o.reference)?o.reference:null),o.floating!==void 0&&(d.floatingElement=o.floating),c.update(d)},[n,s,o.reference,o.floating,c]),c.context.onOpenChange=a,c.context.nested=u,c}const S0=Py&&ho;function $E(e,n={}){const{enabled:a=!0,delay:o}=n,{events:s,dataRef:u}=e.context,c=v.useRef(!1),d=v.useRef(null),p=v.useRef(!0),g=Hn();v.useEffect(()=>{const h=e.select("domReferenceElement");if(!a)return;const b=wn(h);function x(){const R=e.select("domReferenceElement");!e.select("open")&&yn(R)&&R===Kr(Kt(R))&&(c.current=!0,d.current=R)}function w(){p.current=!0}function C(){p.current=!1}return uo(jt(b,"blur",x),S0&&jt(b,"keydown",w,!0),S0&&jt(b,"pointerdown",C,!0))},[e,a]),v.useEffect(()=>{if(!a)return;function h(b){if(b.reason===Va||b.reason===Dc){const x=e.select("domReferenceElement");on(x)&&(d.current=x,c.current=!0)}}return s.on("openchange",h),()=>{s.off("openchange",h)}},[s,a,e]);const y=v.useMemo(()=>{function h(){c.current=!1,d.current=null}return{onMouseLeave(){h()},onFocus(b){const x=b.currentTarget;if(c.current){if(d.current===x)return;h()}const w=tr(b.nativeEvent);if(on(w)){if(S0&&!b.relatedTarget){if(!p.current&&!Ac(w))return}else if(!T4(w))return}const C=ah(b.relatedTarget,e.context.triggerElements),{nativeEvent:R,currentTarget:T}=b;if(e.select("open")&&C||!o){e.setOpen(!0,dt(xl,R,T));return}g.start(o,()=>{c.current||e.setOpen(!0,dt(xl,R,T))})},onBlur(b){h();const x=b.relatedTarget,w=b.nativeEvent,C=on(x)&&x.hasAttribute(Cl("focus-guard"))&&x.getAttribute("data-type")==="outside";g.start(0,()=>{const R=e.select("domReferenceElement"),T=Kr(Kt(R));!x&&T===R||at(u.current.floatingContext?.refs.floating.current,T)||at(R,T)||C||ah(x??T,e.context.triggerElements)||e.setOpen(!1,dt(xl,w))})}}},[u,o,e,g]);return v.useMemo(()=>a?{reference:y,trigger:y}:{},[a,y])}class rv{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Da;restTimeout=new Da;handleCloseOptions=void 0;static create(){return new rv}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const fh=new WeakMap;function hh(e){if(!e.performedPointerEventsMutation)return;const n=e.pointerEventsScopeElement;n&&fh.get(n)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),fh.delete(n)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function XE(e,n){const{scopeElement:a,referenceElement:o,floatingElement:s}=n,u=fh.get(a);u&&u!==e&&hh(u),hh(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=a,e.pointerEventsReferenceElement=o,e.pointerEventsFloatingElement=s,fh.set(a,e),a.style.pointerEvents="none",o.style.pointerEvents="auto",s.style.pointerEvents="auto"}function av(e){const n=e.context.dataRef.current,a=er(()=>n.hoverInteractionState??rv.create()).current;return n.hoverInteractionState||(n.hoverInteractionState=a),ky(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function ov(e,n={}){const{enabled:a=!0,closeDelay:o=0,nodeId:s}=n,u=e.useState("open"),c=e.useState("floatingElement"),d=e.useState("domReferenceElement"),{dataRef:p}=e.context,g=Ii(),y=Ni(),h=av(e),b=Hn(),x=Be(()=>eE(p.current.openEvent?.type,h.interactedInside)),w=Be(()=>M4(p.current.openEvent?.type)),C=Be(()=>{hh(h)});_e(()=>{u||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,C())},[u,h,C]),v.useEffect(()=>C,[C]),_e(()=>{if(a&&u&&h.handleCloseOptions?.blockPointerEvents&&w()&&on(d)&&c){const R=d,T=c,O=Kt(c),M=g?.nodesRef.current.find(k=>k.id===y)?.context?.elements.floating;M&&(M.style.pointerEvents="");const A=h.pointerEventsScopeElement!==T?h.pointerEventsScopeElement:null,I=M!==T?M:null,j=h.handleCloseOptions?.getScope?.()??A??I??gc(R,"[data-rootownerid]")??O.body;return XE(h,{scopeElement:j,referenceElement:R,floatingElement:T}),()=>{C()}}},[a,u,d,c,h,w,g,y,C]),v.useEffect(()=>{if(!a)return;function R(){return!!(g&&y&&Mi(g.nodesRef.current,y).length>0)}function T(k){const D=ms(o,"close",h.pointerType),z=()=>{e.setOpen(!1,dt(qn,k)),g?.events.emit("floating.closed",k)};D?h.openChangeTimeout.start(D,z):(h.openChangeTimeout.clear(),z())}function O(k){const D=tr(k);if(!C4(D)){h.interactedInside=!1;return}h.interactedInside=gc(D,"[aria-haspopup]")!=null}function M(){h.openChangeTimeout.clear(),b.clear(),g?.events.off("floating.closed",I),C()}function A(k){if(R()&&g){g.events.on("floating.closed",I);return}if(ah(k.relatedTarget,e.context.triggerElements))return;const D=p.current.floatingContext?.nodeId??s,z=k.relatedTarget;if(!(g&&D&&on(z)&&Mi(g.nodesRef.current,D,!1).some(G=>at(G.context?.elements.floating,z)))){if(h.handler){h.handler(k);return}C(),w()&&!x()&&T(k)}}function I(k){!g||!y||R()||b.start(0,()=>{g.events.off("floating.closed",I),e.setOpen(!1,dt(qn,k)),g.events.emit("floating.closed",k)})}const j=c;return uo(j&&jt(j,"mouseenter",M),j&&jt(j,"mouseleave",A),j&&jt(j,"pointerdown",O,!0),()=>{g?.events.off("floating.closed",I)})},[a,c,e,p,o,s,w,x,C,h,g,y,b])}const $3={current:null};function QE(e,n={}){const{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:u=!1,restMs:c=0,move:d=!0,triggerElementRef:p=$3,externalTree:g,isActiveTrigger:y=!0,getHandleCloseContext:h,isClosing:b,shouldOpen:x,guardStaleOpen:w=!1}=n,{dataRef:C,events:R}=e.context,T=Ii(g),O=av(e),M=v.useRef(!1),A=Pn(s),I=Pn(o),j=Pn(c),k=Pn(a),D=Pn(x),z=Pn(b),F=Be(()=>eE(C.current.openEvent?.type,O.interactedInside)),G=Be(()=>D.current?.()!==!1),J=Be((_,L,$)=>{const K=e.context.triggerElements;if(K.hasElement(L))return!_||!at(_,L);if(!on($))return!1;const V=$;return K.hasMatchingElement(X=>at(X,V))&&(!_||!at(_,V))}),Y=Be(()=>{if(!O.handler)return;Kt(e.select("domReferenceElement")).removeEventListener("mousemove",O.handler),O.handler=void 0}),U=Be(()=>{hh(O)});return y&&(O.handleCloseOptions=s?.__options),v.useEffect(()=>Y,[Y]),v.useEffect(()=>{if(!a)return;function _(L){L.open?M.current=!1:(M.current=L.reason===qn,Y(),O.openChangeTimeout.clear(),O.restTimeout.clear(),O.blockMouseMove=!0,O.restTimeoutPending=!1)}return R.on("openchange",_),()=>{R.off("openchange",_)}},[a,R,O,Y]),v.useEffect(()=>{if(!a)return;function _(ee,q=!0){const se=ms(I.current,"close",O.pointerType);se?O.openChangeTimeout.start(se,()=>{e.setOpen(!1,dt(qn,ee)),T?.events.emit("floating.closed",ee)}):q&&(O.openChangeTimeout.clear(),e.setOpen(!1,dt(qn,ee)),T?.events.emit("floating.closed",ee))}const L=p.current??(y?e.select("domReferenceElement"):null);if(!on(L))return;function $(ee){if(O.openChangeTimeout.clear(),O.blockMouseMove=!1,u&&!Ci(O.pointerType))return;const q=xS(j.current),se=ms(I.current,"open",O.pointerType),N=tr(ee),B=ee.currentTarget??null,W=e.select("domReferenceElement");let re=B;if(on(N)&&!e.context.triggerElements.hasElement(N)){for(const Me of e.context.triggerElements.elements())if(at(Me,N)){re=Me;break}}on(B)&&on(W)&&!e.context.triggerElements.hasElement(B)&&at(B,W)&&(re=W);const Re=re==null?!1:J(W,re,N),le=e.select("open"),me=z.current?.()??e.select("transitionStatus")==="ending",ge=!le&&me&&M.current,ce=!Re&&on(re)&&on(W)&&at(W,re)&&ge,Te=q>0&&!se,ve=Re&&(le||ge)||ce,Pe=!le||Re;if(ve){G()&&e.setOpen(!0,dt(qn,ee,re));return}Te||(se?O.openChangeTimeout.start(se,()=>{Pe&&G()&&e.setOpen(!0,dt(qn,ee,re))}):Pe&&G()&&e.setOpen(!0,dt(qn,ee,re)))}function K(ee){if(F()){U();return}Y();const q=e.select("domReferenceElement"),se=Kt(q);O.restTimeout.clear(),O.restTimeoutPending=!1;const N=C.current.floatingContext??h?.();if(ah(ee.relatedTarget,e.context.triggerElements))return;if(A.current&&N){e.select("open")||O.openChangeTimeout.clear();const W=p.current;O.handler=A.current({...N,tree:T,x:ee.clientX,y:ee.clientY,onClose(){U(),Y(),k.current&&!F()&&W===e.select("domReferenceElement")&&_(ee,!0)}}),se.addEventListener("mousemove",O.handler),O.handler(ee);return}(O.pointerType!=="touch"||!at(e.select("floatingElement"),ee.relatedTarget))&&_(ee)}function V(ee){at(L,ee.relatedTarget)||(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1)}const X=w?jt(L,"mouseout",V):void 0;return d?uo(jt(L,"mousemove",$,{once:!0}),jt(L,"mouseenter",$),jt(L,"mouseleave",K),X):uo(jt(L,"mouseenter",$),jt(L,"mouseleave",K),X)},[Y,U,C,I,e,a,A,O,y,J,F,u,d,j,p,T,k,h,z,G,w]),v.useMemo(()=>{if(!a)return;function _(L){O.pointerType=L.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(L){const{nativeEvent:$}=L,K=L.currentTarget,V=e.select("domReferenceElement"),X=e.select("open"),ee=J(V,K,L.target);if(u&&!Ci(O.pointerType))return;if(X&&ee&&O.handleCloseOptions?.blockPointerEvents){const N=e.select("floatingElement");if(N){const B=O.handleCloseOptions?.getScope?.()??K.ownerDocument.body;XE(O,{scopeElement:B,referenceElement:K,floatingElement:N})}}const q=xS(j.current);if(X&&!ee||q===0||!ee&&O.restTimeoutPending&&L.movementX**2+L.movementY**2<2)return;O.restTimeout.clear();function se(){if(O.restTimeoutPending=!1,F())return;const N=e.select("open");!O.blockMouseMove&&(!N||ee)&&G()&&e.setOpen(!0,dt(qn,$,K))}O.pointerType==="touch"?cr.flushSync(()=>{se()}):ee&&X?se():(O.restTimeoutPending=!0,O.restTimeout.start(q,se))}}},[a,O,F,J,u,e,j,G])}function YS(e){return ho&&e.movementX===0&&e.movementY===0}function ap(e,n,a){switch(e){case"vertical":return n;case"horizontal":return a;default:return n||a}}function Rf(e,n){return ap(n,e===ZR||e===Fy,e===Hh||e===Uh)}function w0(e,n,a){return ap(n,e===Fy,a?e===Hh:e===Uh)||e==="Enter"||e===" "||e===""}function X3(e,n,a){return ap(n,a?e===Hh:e===Uh,e===Fy)}function Q3(e,n,a,o){const s=a?e===Uh:e===Hh,u=e===ZR;return n==="both"||n==="horizontal"&&o?e==="Escape":ap(n,s,u)}function ZE(e,n){const{listRef:a,activeIndex:o,onNavigate:s=()=>{},enabled:u=!0,selectedIndex:c=null,allowEscape:d=!1,loopFocus:p=!1,nested:g=!1,rtl:y=!1,virtual:h=!1,focusItemOnOpen:b="auto",focusItemOnHover:x=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:R="vertical",triggerOrientation:T=R,parentOrientation:O,id:M,resetOnPointerLeave:A=!0,externalTree:I,nestedReturnFocusRef:j,grid:k}=n,D=k!=null,z=e.useState("open"),F=e.useState("floatingElement"),G=e.useState("domReferenceElement"),J=e.context.dataRef,Y=oh(F),U=Z0(G),_=Pn(Y),L=Ni(),$=Ii(I),K=v.useRef(b),V=v.useRef(c??-1),X=v.useRef(null),ee=v.useRef(!0),q=Be(de=>{s(V.current===-1?null:V.current,de)}),se=v.useRef(!!F),N=v.useRef(z),B=v.useRef(!1),W=v.useRef(!1),re=v.useRef(null),Re=Pn(C),le=Pn(z),me=Pn(c),ge=Pn(A),ce=Il(),Te=Il(),ve=Be(()=>{ce.cancel();function de(Ie){h||(re.current=Yf(Ie,{sync:B.current,preventScroll:!0}))}const we=a.current[V.current],Ke=W.current;we&&de(we),(B.current?Ie=>Ie():Ie=>ce.request(Ie))(()=>{const Ie=a.current[V.current]||we;if(!Ie)return;we||de(Ie),He&&(Ke||!ee.current)&&Ie.scrollIntoView?.({block:"nearest",inline:"nearest"})})});_e(()=>{J.current.orientation=R},[J,R]),_e(()=>{z||(X.current=null),(!z||b!=="auto")&&(K.current=b)},[z,b]),_e(()=>{u&&(z&&F?(V.current=c??-1,K.current&&c!=null&&(W.current=!0,q())):se.current&&(V.current=-1,q()))},[u,z,F,c,q]),_e(()=>{if(u){if(!z){B.current=!1;return}if(F)if(o==null){if(B.current=!1,me.current!=null)return;if(se.current&&(V.current=-1,ve()),(!N.current||!se.current)&&K.current&&(X.current!=null||K.current===!0&&X.current==null)){let de=0;const we=()=>{a.current[0]==null?(de<2&&(de?De=>Te.request(De):queueMicrotask)(we),de+=1):(V.current=X.current==null||w0(X.current,T,y)||g?qf(a):W0(a),X.current=null,q())};we()}}else Sl(a.current,o)||(V.current=o,ve(),W.current=!1)}},[u,z,F,o,me,g,a,T,y,q,ve,Te]),_e(()=>{if(!u||F||!$||h||!se.current)return;const de=$.nodesRef.current,we=de.find(Ie=>Ie.id===L)?.context?.elements.floating,Ke=Kr(Kt(G??we??null)),De=de.some(Ie=>Ie.context&&at(Ie.context.elements.floating,Ke));we&&!De&&ee.current&&we.focus({preventScroll:!0})},[u,F,G,$,L,h]),_e(()=>{N.current=z,se.current=!!F});const Pe=o!=null,Me=Be(de=>{if(!le.current)return;const we=a.current.indexOf(de.currentTarget);we!==-1&&(V.current!==we||o!==we)&&(V.current=we,q(de))}),Le=Be(()=>O??$?.nodesRef.current.find(de=>de.id===L)?.context?.dataRef?.current.orientation),Fe=Be(()=>qf(a,Re.current)),Oe=Be(de=>{if(ee.current=!1,B.current=!0,de.which===229||!le.current&&de.currentTarget===_.current)return;if(g&&Q3(de.key,R,y,D)){Rf(de.key,Le())||Fa(de),e.setOpen(!1,dt(ih,de.nativeEvent));const Ie=j?.current??G;yn(Ie)&&Ie.focus();return}o!=null&&o!==V.current&&!Sl(a.current,o)&&(V.current=o);const we=V.current,Ke=qf(a,C),De=W0(a,C);if(U||(de.key==="Home"&&(Fa(de),V.current=Ke,q(de)),de.key==="End"&&(Fa(de),V.current=De,q(de))),k!=null){const Ie=k(de,V.current,a,R,p,y,C,Ke,De);if(Ie!=null&&Ie!==V.current&&(V.current=Ie,q(de)),R==="both")return}if(Rf(de.key,R)){Fa(de);const Ie=Kr(de.currentTarget.ownerDocument);if(z&&!h&&at(de.currentTarget,Ie)&&!a.current.some(ht=>ht!=null&&at(ht,Ie))){V.current=w0(de.key,R,y)?Ke:De,q(de),o===V.current&&ve();return}const{index:yt,wrapped:ut}=J4(a.current,we,{decrement:!w0(de.key,R,y),loopFocus:p,allowEscape:d,disabledIndices:C,minIndex:Ke,maxIndex:De});ut&&(B.current=!1),V.current=yt,q(de)}}),He=v.useMemo(()=>({onFocus(we){B.current=!0,Me(we)},onClick({currentTarget:we}){h||we.focus({preventScroll:!0})},onMouseMove(we){YS(we)||(B.current=!0,W.current=!1,x&&Me(we))},onPointerLeave(we){if(!le.current||!ee.current||we.pointerType==="touch")return;B.current=!0;const Ke=we.relatedTarget;if(!(!x||a.current.includes(Ke))&&ge.current&&(re.current?.(),re.current=null,V.current=-1,q(we),!h)){const De=_.current,Ie=Kr(Kt(De));De&&at(De,Ie)&&De.focus({preventScroll:!0})}}}),[Me,le,_,x,a,q,ge,h]),be=v.useMemo(()=>h&&z&&Pe&&{"aria-activedescendant":`${M}-${o}`},[h,z,Pe,M,o]),Ue=v.useMemo(()=>({...U?{}:be,onKeyDown(de){if(de.key==="Tab"&&de.shiftKey&&z&&!h){const we=tr(de.nativeEvent);if(we&&!at(_.current,we))return;Fa(de);const Ke=dt(Ti,de.nativeEvent);e.setOpen(!1,Ke);const De=j?.current??G;!Ke.isCanceled&&yn(De)&&De.focus();return}Oe(de)},onPointerMove(de){YS(de)||(ee.current=!0)}}),[be,Oe,_,U,e,z,h,G,j]),Ze=v.useMemo(()=>{function de(De){e.setOpen(!0,dt(ih,De.nativeEvent,De.currentTarget))}function we(De){b==="auto"&&Nl(De.nativeEvent)&&(K.current=!h)}function Ke(De){K.current=b,b==="auto"&&zy(De.nativeEvent)&&(K.current=!0)}return{onKeyDown(De){const Ie=e.select("open");ee.current=!1;const yt=De.key.startsWith("Arrow"),ut=X3(De.key,Le(),y),ht=Rf(De.key,Ie?R:T),Ot=(g?ut:ht)||De.key==="Enter"||De.key.trim()==="";if(h&&Ie&&(!g||Ac(De.currentTarget)))return Oe(De);if(!(!Ie&&!w&&yt)){if(Ot){const Dt=Rf(De.key,Le());X.current=g&&Dt?null:De.key}if(g){ut&&(Fa(De),Ie?(V.current=Fe(),q(De),h&&_.current?.focus()):de(De));return}ht&&(me.current!=null&&(V.current=me.current),Fa(De),!Ie&&w?de(De):Oe(De),Ie&&q(De))}},onFocus(De){De.target===De.currentTarget&&e.select("open")&&!h&&(V.current=-1,q(De))},onPointerDown:Ke,onPointerEnter:Ke,onMouseDown:we,onClick:we}},[Oe,b,Fe,g,q,e,w,R,T,Le,y,me,h,_]),it=v.useMemo(()=>({...be,...Ze}),[be,Ze]);return v.useMemo(()=>u?{reference:it,floating:Ue,item:He,trigger:Ze}:{},[u,it,Ue,Ze,He])}function JE(e,n){const{listRef:a,elementsRef:o,activeIndex:s,onMatch:u,disabledIndices:c,onTyping:d,enabled:p=!0,resetMs:g=750,selectedIndex:y=null}=n,h=Be(d),b=e.useState("open"),x=Hn(),w=v.useRef(""),C=v.useRef(y??s??-1),R=v.useRef(null),T=Be(A=>{function I(U){return o?.current[U]}function j(U){const _=I(U);return _&&!qh(_)||_?.matches(":disabled")?!1:c==null||!Rl(fo,U,c)}function k(U,_,L=0){if(U.length===0)return-1;const $=(L%U.length+U.length)%U.length,K=_.toLowerCase();for(let V=0;V<U.length;V+=1){const X=($+V)%U.length;if(!(!U[X]?.toLowerCase().startsWith(K)||!j(X)))return X}return-1}const D=a.current;if(w.current.length>0&&A.key===" "&&(Fa(A),h?.(!0)),w.current.length>0&&w.current[0]!==" "&&k(D,w.current)===-1&&A.key!==" "&&h?.(!1),D==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;b&&A.key!==" "&&(Fa(A),h?.(!0));const z=w.current==="";z&&(C.current=y??s??-1),D.every((U,_)=>U&&j(_)?U[0]?.toLowerCase()!==U[1]?.toLowerCase():!0)&&w.current===A.key&&(w.current="",C.current=R.current),w.current+=A.key,x.start(g,()=>{w.current="",C.current=R.current,h?.(!1)});const J=((z?y??s??-1:C.current)??0)+1,Y=k(D,w.current,J);Y!==-1?(u?.(Y,A),R.current=Y):A.key!==" "&&(w.current="",h?.(!1))}),O=Be(A=>{const I=A.relatedTarget,j=e.select("domReferenceElement"),k=e.select("floatingElement");at(j,I)||at(k,I)||(x.clear(),w.current="",C.current=R.current,h?.(!1))});_e(()=>{!b&&y!==null||(x.clear(),R.current=null,w.current!==""&&(w.current="",h?.(!1)))},[b,y,x,h]);const M=v.useMemo(()=>({onKeyDown:T,onBlur:O}),[T,O]);return v.useMemo(()=>p?{reference:M,floating:M}:{},[p,M])}const KS=.1,Z3=KS*KS,xn=.5;function Ef(e,n,a,o,s,u){return o>=n!=u>=n&&e<=(s-a)*(n-o)/(u-o)+a}function Cf(e,n,a,o,s,u,c,d,p,g){let y=!1;return Ef(e,n,a,o,s,u)&&(y=!y),Ef(e,n,s,u,c,d)&&(y=!y),Ef(e,n,c,d,p,g)&&(y=!y),Ef(e,n,p,g,a,o)&&(y=!y),y}function J3(e,n,a){return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function Tf(e,n,a,o,s,u){const c=Math.min(a,s),d=Math.max(a,s),p=Math.min(o,u),g=Math.max(o,u);return e>=c&&e<=d&&n>=p&&n<=g}function WE(e={}){const{blockPointerEvents:n=!1}=e,a=new Da,o=({x:s,y:u,placement:c,elements:d,onClose:p,nodeId:g,tree:y})=>{const h=c?.split("-")[0];let b=!1,x=null,w=null,C=typeof performance<"u"?performance.now():0;function R(O,M){const A=performance.now(),I=A-C;if(x===null||w===null||I===0)return x=O,w=M,C=A,!1;const j=O-x,k=M-w,D=j*j+k*k,z=I*I*Z3;return x=O,w=M,C=A,D<z}function T(){a.clear(),p()}return function(M){a.clear();const A=d.domReference,I=d.floating;if(!A||!I||h==null||s==null||u==null)return;const{clientX:j,clientY:k}=M,D=tr(M),z=M.type==="mouseleave",F=at(I,D),G=at(A,D);if(F&&(b=!0,!z))return;if(G&&(b=!1,!z)){b=!0;return}if(z&&on(M.relatedTarget)&&at(I,M.relatedTarget))return;function J(){return!!(y&&Mi(y.nodesRef.current,g).length>0)}function Y(){J()||T()}if(J())return;const U=A.getBoundingClientRect(),_=I.getBoundingClientRect(),L=s>_.right-_.width/2,$=u>_.bottom-_.height/2,K=_.width>U.width,V=_.height>U.height,X=(K?U:_).left,ee=(K?U:_).right,q=(V?U:_).top,se=(V?U:_).bottom;if(h==="top"&&u>=U.bottom-1||h==="bottom"&&u<=U.top+1||h==="left"&&s>=U.right-1||h==="right"&&s<=U.left+1){Y();return}let N=!1;switch(h){case"top":N=Tf(j,k,X,U.top+1,ee,_.bottom-1);break;case"bottom":N=Tf(j,k,X,_.top+1,ee,U.bottom-1);break;case"left":N=Tf(j,k,_.right-1,se,U.left+1,q);break;case"right":N=Tf(j,k,U.right-1,se,_.left+1,q);break}if(N)return;if(b&&!J3(j,k,U)){Y();return}if(!z&&R(j,k)){Y();return}let B=!1;switch(h){case"top":{const W=K?xn/2:xn*4,re=K||L?s+W:s-W,Re=K?s-W:L?s+W:s-W,le=u+xn+1,me=L||K?_.bottom-xn:_.top,ge=L?K?_.bottom-xn:_.top:_.bottom-xn;B=Cf(j,k,re,le,Re,le,_.left,me,_.right,ge);break}case"bottom":{const W=K?xn/2:xn*4,re=K||L?s+W:s-W,Re=K?s-W:L?s+W:s-W,le=u-xn,me=L||K?_.top+xn:_.bottom,ge=L?K?_.top+xn:_.bottom:_.top+xn;B=Cf(j,k,re,le,Re,le,_.left,me,_.right,ge);break}case"left":{const W=V?xn/2:xn*4,re=V||$?u+W:u-W,Re=V?u-W:$?u+W:u-W,le=s+xn+1,me=$||V?_.right-xn:_.left,ge=$?V?_.right-xn:_.left:_.right-xn;B=Cf(j,k,me,_.top,ge,_.bottom,le,re,le,Re);break}case"right":{const W=V?xn/2:xn*4,re=V||$?u+W:u-W,Re=V?u-W:$?u+W:u-W,le=s-xn,me=$||V?_.left+xn:_.right,ge=$?V?_.left+xn:_.right:_.left+xn;B=Cf(j,k,le,re,le,Re,me,_.top,ge,_.bottom);break}}B?b||a.start(40,Y):Y()}};return o.__options={...e,blockPointerEvents:n},o}function GS(e,n,a){let{reference:o,floating:s}=e;const u=Oa(n),c=Gy(n),d=Ky(c),p=da(n),g=u==="y",y=o.x+o.width/2-s.width/2,h=o.y+o.height/2-s.height/2,b=o[d]/2-s[d]/2;let x;switch(p){case"top":x={x:y,y:o.y-s.height};break;case"bottom":x={x:y,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y:h};break;case"left":x={x:o.x-s.width,y:h};break;default:x={x:o.x,y:o.y}}const w=co(n);return w&&(x[c]+=b*(w==="end"?1:-1)*(a&&g?-1:1)),x}async function W3(e,n){var a;n===void 0&&(n={});const{x:o,y:s,platform:u,rects:c,elements:d,strategy:p}=e,{boundary:g="clippingAncestors",rootBoundary:y="viewport",elementContext:h="floating",altBoundary:b=!1,padding:x=0}=Oi(n,e),w=lE(x),R=d[b?h==="floating"?"reference":"floating":h],T=mc(await u.getClippingRect({element:(a=await(u.isElement==null?void 0:u.isElement(R)))==null||a?R:R.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:g,rootBoundary:y,strategy:p})),O=h==="floating"?{x:o,y:s,width:c.floating.width,height:c.floating.height}:c.reference,M=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),A=await(u.isElement==null?void 0:u.isElement(M))&&await(u.getScale==null?void 0:u.getScale(M))||{x:1,y:1},I=mc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:M,strategy:p}):O);return{top:(T.top-I.top+w.top)/A.y,bottom:(I.bottom-T.bottom+w.bottom)/A.y,left:(T.left-I.left+w.left)/A.x,right:(I.right-T.right+w.right)/A.x}}const eI=50,tI=async(e,n,a)=>{const{placement:o="bottom",strategy:s="absolute",middleware:u=[],platform:c}=a,d=c.detectOverflow?c:{...c,detectOverflow:W3},p=await(c.isRTL==null?void 0:c.isRTL(n));let g=await c.getElementRects({reference:e,floating:n,strategy:s}),{x:y,y:h}=GS(g,o,p),b=o,x=0;const w={};for(let C=0;C<u.length;C++){const R=u[C];if(!R)continue;const{name:T,fn:O}=R,{x:M,y:A,data:I,reset:j}=await O({x:y,y:h,initialPlacement:o,placement:b,strategy:s,middlewareData:w,rects:g,platform:d,elements:{reference:e,floating:n}});y=M??y,h=A??h,w[T]={...w[T],...I},j&&x<eI&&(x++,typeof j=="object"&&(j.placement&&(b=j.placement),j.rects&&(g=j.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:s}):j.rects),{x:y,y:h}=GS(g,b,p)),C=-1)}return{x:y,y:h,placement:b,strategy:s,middlewareData:w}},nI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var a,o;const{placement:s,middlewareData:u,rects:c,initialPlacement:d,platform:p,elements:g}=n,{mainAxis:y=!0,crossAxis:h=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...R}=Oi(e,n);if((a=u.arrow)!=null&&a.alignmentOffset)return{};const T=da(s),O=Oa(d),M=da(d)===d,A=await(p.isRTL==null?void 0:p.isRTL(g.floating)),I=b||(M||!C?[lh(d)]:K4(d)),j=w!=="none";!b&&j&&I.push(...Q4(d,C,w,A));const k=[d,...I],D=await p.detectOverflow(n,R),z=[];let F=((o=u.flip)==null?void 0:o.overflows)||[];if(y&&z.push(D[T]),h){const U=Y4(s,c,A);z.push(D[U[0]],D[U[1]])}if(F=[...F,{placement:s,overflows:z}],!z.every(U=>U<=0)){var G,J;const U=(((G=u.flip)==null?void 0:G.index)||0)+1,_=k[U];if(_&&(!(h==="alignment"?O!==Oa(_):!1)||F.every(K=>Oa(K.placement)===O?K.overflows[0]>0:!0)))return{data:{index:U,overflows:F},reset:{placement:_}};let L=(J=F.filter($=>$.overflows[0]<=0).sort(($,K)=>$.overflows[1]-K.overflows[1])[0])==null?void 0:J.placement;if(!L)switch(x){case"bestFit":{var Y;const $=(Y=F.filter(K=>{if(j){const V=Oa(K.placement);return V===O||V==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(V=>V>0).reduce((V,X)=>V+X,0)]).sort((K,V)=>K[1]-V[1])[0])==null?void 0:Y[0];$&&(L=$);break}case"initialPlacement":L=d;break}if(s!==L)return{reset:{placement:L}}}return{}}}},eC=new Set(["left","top"]);async function rI(e,n){const{placement:a,platform:o,elements:s}=e,u=await(o.isRTL==null?void 0:o.isRTL(s.floating)),c=da(a),d=co(a),p=Oa(a)==="y",g=eC.has(c)?-1:1,y=u&&p?-1:1,h=Oi(n,e);let{mainAxis:b,crossAxis:x,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return d&&typeof w=="number"&&(x=d==="end"?w*-1:w),p?{x:x*y,y:b*g}:{x:b*g,y:x*y}}const aI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var a,o;const{x:s,y:u,placement:c,middlewareData:d}=n,p=await rI(n,e);return c===((a=d.offset)==null?void 0:a.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:s+p.x,y:u+p.y,data:{...p,placement:c}}}}},oI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:a,y:o,placement:s,platform:u}=n,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:O=>{let{x:M,y:A}=O;return{x:M,y:A}}},...g}=Oi(e,n),y={x:a,y:o},h=await u.detectOverflow(n,g),b=Oa(s),x=Yy(b);let w=y[x],C=y[b];const R=(O,M)=>sE(M+h[O==="y"?"top":"left"],M,M-h[O==="y"?"bottom":"right"]);c&&(w=R(x,w)),d&&(C=R(b,C));const T=p.fn({...n,[x]:w,[b]:C});return{...T,data:{x:T.x-a,y:T.y-o,enabled:{[x]:c,[b]:d}}}}}},iI=function(e){return e===void 0&&(e={}),{options:e,fn(n){var a,o;const{x:s,y:u,placement:c,rects:d,middlewareData:p}=n,{offset:g=0,mainAxis:y=!0,crossAxis:h=!0}=Oi(e,n),b={x:s,y:u},x=Oa(c),w=Yy(x);let C=b[w],R=b[x];const T=Oi(g,n),O=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:(a=T.mainAxis)!=null?a:0,crossAxis:(o=T.crossAxis)!=null?o:0};if(y){const I=w==="y"?"height":"width",j=d.reference[w]-d.floating[I]+O.mainAxis,k=d.reference[w]+d.reference[I]-O.mainAxis;C<j?C=j:C>k&&(C=k)}if(h){var M,A;const I=w==="y"?"width":"height",j=eC.has(da(c)),k=d.reference[x]-d.floating[I]+(j&&((M=p.offset)==null?void 0:M[x])||0)+(j?0:O.crossAxis),D=d.reference[x]+d.reference[I]+(j?0:((A=p.offset)==null?void 0:A[x])||0)-(j?O.crossAxis:0);R<k?R=k:R>D&&(R=D)}return{[w]:C,[x]:R}}}},sI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){const{placement:a,rects:o,platform:s,elements:u}=n,{apply:c=()=>{},...d}=Oi(e,n),p=await s.detectOverflow(n,d),g=da(a),y=co(a),h=Oa(a)==="y",{width:b,height:x}=o.floating;let w,C;g==="top"||g==="bottom"?(w=g,C=y===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(C=g,w=y==="end"?"top":"bottom");const R=x-p.top-p.bottom,T=b-p.left-p.right,O=kl(x-p[w],R),M=kl(b-p[C],T),A=n.middlewareData.shift,I=!A;let j=O,k=M;A!=null&&A.enabled.x&&(k=T),A!=null&&A.enabled.y&&(j=R),I&&!y&&(h?k=b-2*_o(p.left,p.right):j=x-2*_o(p.top,p.bottom)),await c({...n,availableWidth:k,availableHeight:j});const D=await s.getDimensions(u.floating);return b!==D.width||x!==D.height?{reset:{rects:!0}}:{}}}};function tC(e){const n=fa(e);let a=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const s=yn(e),u=s?e.offsetWidth:a,c=s?e.offsetHeight:o,d=sh(a)!==u||sh(o)!==c;return d&&(a=u,o=c),{width:a,height:o,$:d}}function iv(e){return on(e)?e:e.contextElement}function Tl(e){const n=iv(e);if(!yn(n))return Ho(1);const a=n.getBoundingClientRect(),{width:o,height:s,$:u}=tC(n);let c=(u?sh(a.width):a.width)/o,d=(u?sh(a.height):a.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const lI=Ho(0);function nC(e){const n=wn(e);return!Uy()||!n.visualViewport?lI:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function uI(e,n,a){return n===void 0&&(n=!1),!!a&&n&&a===wn(e)}function ys(e,n,a,o){n===void 0&&(n=!1),a===void 0&&(a=!1);const s=e.getBoundingClientRect(),u=iv(e);let c=Ho(1);n&&(o?on(o)&&(c=Tl(o)):c=Tl(e));const d=uI(u,a,o)?nC(u):Ho(0);let p=(s.left+d.x)/c.x,g=(s.top+d.y)/c.y,y=s.width/c.x,h=s.height/c.y;if(u&&o){const b=wn(u),x=on(o)?wn(o):o;let w=b,C=$0(w);for(;C&&x!==w;){const R=Tl(C),T=C.getBoundingClientRect(),O=fa(C),M=T.left+(C.clientLeft+parseFloat(O.paddingLeft))*R.x,A=T.top+(C.clientTop+parseFloat(O.paddingTop))*R.y;p*=R.x,g*=R.y,y*=R.x,h*=R.y,p+=M,g+=A,w=wn(C),C=$0(w)}}return mc({width:y,height:h,x:p,y:g})}function op(e,n){const a=_h(e).scrollLeft;return n?n.left+a:ys(Fo(e)).left+a}function rC(e,n){const a=e.getBoundingClientRect(),o=a.left+n.scrollLeft-op(e,a),s=a.top+n.scrollTop;return{x:o,y:s}}function cI(e){let{elements:n,rect:a,offsetParent:o,strategy:s}=e;const u=s==="fixed",c=Fo(o),d=n?zh(n.floating):!1;if(o===c||d&&u)return a;let p={scrollLeft:0,scrollTop:0},g=Ho(1);const y=Ho(0),h=yn(o);if((h||!u)&&((Sr(o)!=="body"||Oc(c))&&(p=_h(o)),h)){const x=ys(o);g=Tl(o),y.x=x.x+o.clientLeft,y.y=x.y+o.clientTop}const b=c&&!h&&!u?rC(c,p):Ho(0);return{width:a.width*g.x,height:a.height*g.y,x:a.x*g.x-p.scrollLeft*g.x+y.x+b.x,y:a.y*g.y-p.scrollTop*g.y+y.y+b.y}}function dI(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function fI(e){const n=_h(e),a=e.ownerDocument.body,o=_o(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),s=_o(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+op(e);const c=-n.scrollTop;return fa(a).direction==="rtl"&&(u+=_o(e.clientWidth,a.clientWidth)-o),{width:o,height:s,x:u,y:c}}const hI=25;function pI(e,n,a){a===void 0&&(a="viewport");const o=a==="layoutViewport",s=wn(e),u=Fo(e),c=s.visualViewport;let d=u.clientWidth,p=u.clientHeight,g=0,y=0;if(c){const b=!Uy()||n==="fixed";o?b||(g=-c.offsetLeft,y=-c.offsetTop):(d=c.width,p=c.height,b&&(g=c.offsetLeft,y=c.offsetTop))}if(op(u)<=0){const b=u.ownerDocument,x=b.body,w=getComputedStyle(x),C=b.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,R=Math.abs(u.clientWidth-x.clientWidth-C),T=getComputedStyle(u).scrollbarGutter==="stable both-edges"?R/2:R;T<=hI&&(d-=T)}return{width:d,height:p,x:g,y}}function gI(e,n){const a=ys(e,!0,n==="fixed"),o=a.top+e.clientTop,s=a.left+e.clientLeft,u=Tl(e),c=e.clientWidth*u.x,d=e.clientHeight*u.y,p=s*u.x,g=o*u.y;return{width:c,height:d,x:p,y:g}}function $S(e,n,a){let o;if(n==="viewport"||n==="layoutViewport")o=pI(e,a,n);else if(n==="document")o=fI(Fo(e));else if(on(n))o=gI(n,a);else{const s=nC(e);o={x:n.x-s.x,y:n.y-s.y,width:n.width,height:n.height}}return mc(o)}function mI(e,n){const a=n.get(e);if(a)return a;let o=pc(e,[],!1).filter(d=>on(d)&&Sr(d)!=="body"),s=null;const u=fa(e).position==="fixed";let c=u?Uo(e):e;for(;on(c)&&!zo(c);){const d=fa(c),p=Hy(c),g=s?s.position:u?"fixed":"";!p&&(g==="fixed"||g==="absolute"&&d.position==="static")?o=o.filter(h=>h!==c):s=d,c=Uo(c)}return n.set(e,o),o}function yI(e){let{element:n,boundary:a,rootBoundary:o,strategy:s}=e;const c=[...a==="clippingAncestors"?zh(n)?[]:mI(n,this._c):[].concat(a),o],d=$S(n,c[0],s);let p=d.top,g=d.right,y=d.bottom,h=d.left;for(let b=1;b<c.length;b++){const x=$S(n,c[b],s);p=_o(x.top,p),g=kl(x.right,g),y=kl(x.bottom,y),h=_o(x.left,h)}return{width:g-h,height:y-p,x:h,y:p}}function vI(e){const{width:n,height:a}=tC(e);return{width:n,height:a}}function bI(e,n,a){const o=yn(n),s=Fo(n),u=a==="fixed",c=ys(e,!0,u,n);let d={scrollLeft:0,scrollTop:0};const p=Ho(0);if((o||!u)&&((Sr(n)!=="body"||Oc(s))&&(d=_h(n)),o)){const b=ys(n,!0,u,n);p.x=b.x+n.clientLeft,p.y=b.y+n.clientTop}!o&&s&&(p.x=op(s));const g=s&&!o&&!u?rC(s,d):Ho(0),y=c.left+d.scrollLeft-p.x-g.x,h=c.top+d.scrollTop-p.y-g.y;return{x:y,y:h,width:c.width,height:c.height}}function R0(e){return fa(e).position==="static"}function XS(e,n){if(!yn(e)||fa(e).position==="fixed")return null;if(n)return n(e);let a=e.offsetParent;return Fo(e)===a&&(a=a.ownerDocument.body),a}function aC(e,n){const a=wn(e);if(zh(e))return a;if(!yn(e)){let s=Uo(e);for(;s&&!zo(s);){if(on(s)&&!R0(s))return s;s=Uo(s)}return a}let o=XS(e,n);for(;o&&l4(o)&&R0(o);)o=XS(o,n);return o&&zo(o)&&R0(o)&&!Hy(o)?a:o||d4(e)||a}const xI=async function(e){const n=this.getOffsetParent||aC,a=this.getDimensions,o=await a(e.floating);return{reference:bI(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function SI(e){return fa(e).direction==="rtl"}const oC={convertOffsetParentRelativeRectToViewportRelativeRect:cI,getDocumentElement:Fo,getClippingRect:yI,getOffsetParent:aC,getElementRects:xI,getClientRects:dI,getDimensions:vI,getScale:Tl,isElement:on,isRTL:SI};function iC(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function wI(e,n,a){let o=null,s;const u=Fo(e);function c(){var y;clearTimeout(s),(y=o)==null||y.disconnect(),o=null}function d(y,h){y===void 0&&(y=!1),h===void 0&&(h=1),c();const b=e.getBoundingClientRect(),{left:x,top:w,width:C,height:R}=b;if(y||n(),!C||!R)return;const T=bf(w),O=bf(u.clientWidth-(x+C)),M=bf(u.clientHeight-(w+R)),A=bf(x),j={rootMargin:-T+"px "+-O+"px "+-M+"px "+-A+"px",threshold:_o(0,kl(1,h))||1};let k=!0;function D(z){const F=z[0].intersectionRatio;if(!iC(b,e.getBoundingClientRect()))return d();if(F!==h){if(!k)return d();F?d(!1,F):s=setTimeout(()=>{d(!1,1e-7)},1e3)}k=!1}try{o=new IntersectionObserver(D,{...j,root:u.ownerDocument})}catch{o=new IntersectionObserver(D,j)}o.observe(e)}const p=wn(e),g=()=>d(a);return p.addEventListener("resize",g),d(!0),()=>{p.removeEventListener("resize",g),c()}}function QS(e,n,a,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,g=iv(e),y=s||u?[...g?pc(g):[],...n?pc(n):[]]:[];y.forEach(T=>{s&&T.addEventListener("scroll",a),u&&T.addEventListener("resize",a)});const h=g&&d?wI(g,a,u):null;let b=-1,x=null;c&&(x=new ResizeObserver(T=>{let[O]=T;O&&O.target===g&&x&&n&&(x.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var M;(M=x)==null||M.observe(n)})),a()}),g&&!p&&x.observe(g),n&&x.observe(n));let w,C=p?ys(e):null;p&&R();function R(){const T=ys(e);C&&!iC(C,T)&&a(),C=T,w=requestAnimationFrame(R)}return a(),()=>{var T;y.forEach(O=>{s&&O.removeEventListener("scroll",a),u&&O.removeEventListener("resize",a)}),h?.(),(T=x)==null||T.disconnect(),x=null,p&&cancelAnimationFrame(w)}}const RI=aI,EI=oI,CI=nI,TI=sI,OI=iI,MI=(e,n,a)=>{const o=new Map,s=a??{},u={...oC,...s.platform,_c:o};return tI(e,n,{...s,platform:u})};var AI=typeof document<"u",DI=function(){},Kf=AI?v.useLayoutEffect:DI;function ph(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 a,o,s;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==n.length)return!1;for(o=a;o--!==0;)if(!ph(e[o],n[o]))return!1;return!0}if(s=Object.keys(e),a=s.length,a!==Object.keys(n).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(n,s[o]))return!1;for(o=a;o--!==0;){const u=s[o];if(!(u==="_owner"&&e.$$typeof)&&!ph(e[u],n[u]))return!1}return!0}return e!==e&&n!==n}function sC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ZS(e,n){const a=sC(e);return Math.round(n*a)/a}function E0(e){const n=v.useRef(e);return Kf(()=>{n.current=e}),n}function NI(e){e===void 0&&(e={});const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:s,elements:{reference:u,floating:c}={},transform:d=!0,whileElementsMounted:p,open:g}=e,[y,h]=v.useState({x:0,y:0,strategy:a,placement:n,middlewareData:{},isPositioned:!1}),[b,x]=v.useState(o);ph(b,o)||x(o);const[w,C]=v.useState(null),[R,T]=v.useState(null),O=v.useCallback(K=>{K!==j.current&&(j.current=K,C(K))},[]),M=v.useCallback(K=>{K!==k.current&&(k.current=K,T(K))},[]),A=u||w,I=c||R,j=v.useRef(null),k=v.useRef(null),D=v.useRef(y),z=p!=null,F=E0(p),G=E0(s),J=E0(g),Y=v.useCallback(()=>{if(!j.current||!k.current)return;const K={placement:n,strategy:a,middleware:b};G.current&&(K.platform=G.current),MI(j.current,k.current,K).then(V=>{const X={...V,isPositioned:J.current!==!1};U.current&&!ph(D.current,X)&&(D.current=X,cr.flushSync(()=>{h(X)}))})},[b,n,a,G,J]);Kf(()=>{g===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(K=>({...K,isPositioned:!1})))},[g]);const U=v.useRef(!1);Kf(()=>(U.current=!0,()=>{U.current=!1}),[]),Kf(()=>{if(A&&(j.current=A),I&&(k.current=I),A&&I){if(F.current)return F.current(A,I,Y);Y()}},[A,I,Y,F,z]);const _=v.useMemo(()=>({reference:j,floating:k,setReference:O,setFloating:M}),[O,M]),L=v.useMemo(()=>({reference:A,floating:I}),[A,I]),$=v.useMemo(()=>{const K={position:a,left:0,top:0};if(!L.floating)return K;const V=ZS(L.floating,y.x),X=ZS(L.floating,y.y);return d?{...K,transform:"translate("+V+"px, "+X+"px)",...sC(L.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:V,top:X}},[a,d,L.floating,y.x,y.y]);return v.useMemo(()=>({...y,update:Y,refs:_,elements:L,floatingStyles:$}),[y,Y,_,L,$])}const II=(e,n)=>{const a=RI(e);return{name:a.name,fn:a.fn,options:[e,n]}},jI=(e,n)=>{const a=EI(e);return{name:a.name,fn:a.fn,options:[e,n]}},kI=(e,n)=>({fn:OI(e).fn,options:[e,n]}),PI=(e,n)=>{const a=CI(e);return{name:a.name,fn:a.fn,options:[e,n]}},LI=(e,n)=>{const a=TI(e);return{name:a.name,fn:a.fn,options:[e,n]}},zI={...Po,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,n)=>n?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class _I extends Ul{constructor(n,a,o){const s=new Pc;super(HI(n,s,a,o),UI(s),zI)}setOpen=(n,a)=>{k3(this,n,a,{extraState:{openChangeReason:a.reason}})};cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,dt(Va,n))}}function HI(e,n,a,o=!1){return{...rp(n,a,o),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function UI(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const FI=Cc(function(n){const{disabled:a=!1,defaultOpen:o=!1,open:s,disableHoverablePopup:u=!1,trackCursorAxis:c="none",actionsRef:d,onOpenChange:p,onOpenChangeComplete:g,handle:y,triggerId:h,defaultTriggerId:b=null,children:x}=n,w=nv((G,J)=>new _I({open:o,openProp:s,activeTriggerId:b,triggerIdProp:h},G,J));w.useControlledProp("openProp",s),w.useControlledProp("triggerIdProp",h),w.useContextCallback("onOpenChange",p),w.useContextCallback("onOpenChangeComplete",g);const C=w.useState("open"),R=!a&&C,T=w.useState("activeTriggerId"),O=w.useState("mounted"),M=w.useState("payload");w.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:u,disabled:a}),Wh(w,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:A,transitionStatus:I}=ep(R,w),j=w.useState("isInstantPhase"),k=w.useState("instantType"),D=w.useState("lastOpenChangeReason"),z=v.useRef(null);_e(()=>{C&&a&&w.setOpen(!1,dt(N4))},[C,a,w]),_e(()=>{I==="ending"&&D===zr||I!=="ending"&&j?(k!=="delay"&&(z.current=k),w.set("instantType","delay")):z.current!==null&&(w.set("instantType",z.current),z.current=null)},[I,j,D,k,w]),_e(()=>{R&&T==null&&w.set("payload",void 0)},[w,T,R]),v.useImperativeHandle(d,()=>({unmount:A,close:()=>w.setOpen(!1,dt(Nc))}),[A,w]);const F=R||O||!a&&c!=="none";return S.jsxs($R.Provider,{value:w,children:[y&&S.jsx(Qh,{handle:y,store:w}),F&&S.jsx(BI,{store:w,disabled:a,trackCursorAxis:c}),typeof x=="function"?x({payload:M}):x]})});function BI({store:e,disabled:n,trackCursorAxis:a}){const o=e.useState("floatingRootContext"),s=jc(o,{enabled:!n,referencePress:()=>e.select("closeOnClick")}),u=A3(o,{enabled:!n&&a!=="none",axis:a==="none"?void 0:a}),c=v.useMemo(()=>Pr(u.reference,s.reference),[u.reference,s.reference]);return tp(e,{activeTriggerProps:c,inactiveTriggerProps:c,popupProps:s.floating??Gt}),null}function Tr(e){return Hl(e,"base-ui")}const lC=v.createContext(void 0);function VI(){return v.useContext(lC)}const qI=600,JS="data-base-ui-tooltip-trigger";function WS(e){const n=tr(e);return on(n)?n:null}const YI=GR(function(n,a){const{render:o,className:s,style:u,handle:c,payload:d,disabled:p,delay:g,closeOnClick:y=!0,closeDelay:h,id:b,...x}=n,w=Tc(!0),R=GE(c)??w;if(!R)throw new Error(Rn(82));const T=Tr(b),O=R.useState("isTriggerActive",T),M=R.useState("isOpenedByTrigger",T),A=R.useState("floatingRootContext"),I=v.useRef(null),j=h??0,{registerTrigger:k,isMountedByThisTrigger:D}=FE(T,I,R,{payload:d,closeOnClick:y,closeDelay:j}),z=VI(),{activeIdRef:F,delayRef:G,isInstantPhase:J,hasProvider:Y}=P4(A,{open:M}),U=av(A);R.useSyncedValue("isInstantPhase",J);const _=R.useState("disabled"),L=p??_,$=Pn(L),K=R.useState("trackCursorAxis"),V=R.useState("disableHoverablePopup"),X=v.useRef(!1),ee=Hn(),q=v.useRef(void 0);function se(){return Y&&F.current!=null?0:g??z??qI}function N(ce){const Te=I.current;if(!Te||!ce)return!1;const ve=gc(ce,`[${JS}]`);return ve!==null&&ve!==Te&&at(Te,ve)}function B(ce){const Te=N(ce);return X.current=Te,Te&&(U.openChangeTimeout.clear(),U.restTimeout.clear(),U.restTimeoutPending=!1,ee.clear()),Te}const W=QE(A,{enabled:!L,mouseOnly:!0,move:!1,handleClose:!V&&K!=="both"?WE():null,restMs:se,delay(){return h==null&&Y?{close:ms(G.current,"close")}:{close:j}},triggerElementRef:I,isActiveTrigger:O,isClosing:()=>R.select("transitionStatus")==="ending",shouldOpen(){return!X.current}}),re=$E(A,{enabled:!L}).reference,Re=ce=>{const Te=X.current,ve=WS(ce),Pe=B(ve),Me=I.current,Le=Me&&ve&&at(Me,ve);if(Pe&&R.select("open")&&R.select("lastOpenChangeReason")===qn){R.setOpen(!1,dt(qn,ce));return}if(Te&&!Pe&&Le&&!$.current&&!R.select("open")&&Me&&Ci(q.current)){const Fe=()=>{!X.current&&!$.current&&!R.select("open")&&R.setOpen(!0,dt(qn,ce,Me))},Oe=se();Oe===0?(ee.clear(),Fe()):ee.start(Oe,Fe)}},le=R.useState("appliedTriggerProps",D||K!=="none");return Mt("button",n,{state:{open:M},ref:[a,k,I],props:[W,re,le,{onMouseOver(ce){Re(ce.nativeEvent)},onFocus(ce){N(WS(ce.nativeEvent))&&ce.preventBaseUIHandler()},onMouseLeave(){X.current=!1,ee.clear(),q.current=void 0},onPointerEnter(ce){q.current=ce.pointerType},onPointerDown(ce){q.current=ce.pointerType,R.set("closeOnClick",y),y&&!R.select("open")&&R.cancelPendingOpen(ce.nativeEvent)},onClick(ce){y&&!R.select("open")&&R.cancelPendingOpen(ce.nativeEvent)},id:T,[Q0]:L?"":void 0,[JS]:L?void 0:""},x],stateAttributesMapping:WR})}),uC=v.createContext(void 0);function KI(){const e=v.useContext(uC);if(e===void 0)throw new Error(Rn(70));return e}const GI=v.forwardRef(function(n,a){const{children:o,container:s,className:u,render:c,style:d,...p}=n,{node:g,subtree:y}=NE({container:s,ref:a,componentProps:n,elementProps:p});return!y&&!g?null:S.jsxs(v.Fragment,{children:[y,g&&cr.createPortal(o,g)]})}),$I=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n;return Tc().useState("mounted")||o?S.jsx(uC.Provider,{value:o,children:S.jsx(GI,{ref:a,...s})}):null}),cC=v.createContext(void 0);function dC(){const e=v.useContext(cC);if(e===void 0)throw new Error(Rn(71));return e}function XI(e){const{nodeId:n,externalTree:a,rootContext:o}=e,s=o.useState("referenceElement"),u=o.useState("floatingElement"),c=o.useState("domReferenceElement"),d=o.useState("open"),p=o.useState("floatingId"),[g,y]=v.useState(null),h=v.useRef(null),b=Ii(a),x=v.useMemo(()=>({reference:s,floating:u,domReference:c}),[s,u,c]),w=NI({...e,elements:{...x,...g&&{reference:g}}}),C=v.useCallback(M=>{const A=on(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;y(A),w.refs.setReference(A)},[w.refs]),R=v.useMemo(()=>({...w.refs,setPositionReference:C,domReference:h}),[w.refs,C]),T=v.useMemo(()=>({...w.elements,domReference:c}),[w.elements,c]),O=v.useMemo(()=>({...w,dataRef:o.context.dataRef,open:d,onOpenChange:o.setOpen,events:o.context.events,floatingId:p,refs:R,elements:T,nodeId:n,rootStore:o}),[w,R,T,n,o,d,p]);return _e(()=>{c&&(h.current=c)},[c]),_e(()=>{o.context.dataRef.current.floatingContext=O;const M=b?.nodesRef.current.find(A=>A.id===n);M&&(M.context=O)}),v.useMemo(()=>({...w,context:O,refs:R,elements:T,rootStore:o}),[w,R,T,O,o])}const QI=v.createContext(void 0);function ip(){return v.useContext(QI)?.direction??"ltr"}const ZI=e=>({name:"arrow",options:e,async fn(n){const{x:a,y:o,placement:s,rects:u,platform:c,elements:d,middlewareData:p}=n,{element:g,padding:y=0}=Oi(e,n)||{};if(g==null)return{};const h=lE(y),b={x:a,y:o},x=Gy(s),w=Ky(x),C=await c.getDimensions(g),R=x==="y",T=R?"top":"left",O=R?"bottom":"right",M=R?"clientHeight":"clientWidth",A=u.reference[w]+u.reference[x]-b[x]-u.floating[w],I=b[x]-u.reference[x],j=d.floating[M]||u.floating[w],k=A/2-I/2,D=j/2-C[w]/2-1,z=Math.min(h[T],D),F=Math.min(h[O],D),G=z,J=j-C[w]-F,Y=j/2-C[w]/2+k,U=sE(G,Y,J),_=!p.arrow&&co(s)!=null&&Y!==U&&u.reference[w]/2-(Y<G?z:F)-C[w]/2<0,L=_?Y<G?Y-G:Y-J:0;return{[x]:b[x]+L,data:{[x]:U,centerOffset:Y-U-L,..._&&{alignmentOffset:L}},reset:_}}}),JI=(e,n)=>{const{name:a,fn:o}=ZI(e);return{name:a,fn:o,options:[e,n]}},WI={name:"hide",async fn(e){const{width:n,height:a,x:o,y:s}=e.rects.reference,u=n===0&&a===0&&o===0&&s===0,c=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:c.top-a>=0||c.right-n>=0||c.bottom-a>=0||c.left-n>=0||u}}}},ej={sideX:"left",sideY:"top"},tj="--available-width",nj="--available-height",rj="--anchor-width",aj="--anchor-height",oj="--transform-origin",ew=tj,tw=nj;function fC(e,n,a){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?a?"inline-start":"inline-end":"right",bottom:"bottom",left:o?a?"inline-end":"inline-start":"left"}[n]}function nw(e,n,a){const{rects:o,placement:s}=e;return{side:fC(n,da(s),a),align:co(s)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function sp(e){return ij(e,XI)}function ij(e,n){const{anchor:a,positionMethod:o="absolute",side:s="bottom",sideOffset:u=0,align:c="center",alignOffset:d=0,collisionBoundary:p,collisionPadding:g=5,sticky:y=!1,arrowPadding:h=5,disableAnchorTracking:b=!1,inline:x,keepMounted:w=!1,floatingRootContext:C,mounted:R,collisionAvoidance:T,shift:O,nodeId:M,adaptiveOrigin:A,lazyFlip:I=!1,externalTree:j}=e,k=T.side||"flip",D=T.align||"flip",z=T.fallbackAxisSide||"end",F=O?.crossAxis??!1,G=O?.rootBoundary,J=typeof a=="function"?a:void 0,Y=Be(J),U=J?Y:a,_=Pn(a),L=Pn(R),K=ip()==="rtl",[V,X]=v.useState(null);!R&&V!==null&&X(null);const ee=I==="placement",q=V?da(V):null,se=V&&ee?co(V)||"center":null,N=q||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":K?"left":"right","inline-start":K?"right":"left"}[s],B=se||c,W=B==="center"?N:`${N}-${B}`;let re=g;typeof re=="number"?re={top:re,right:re,bottom:re,left:re}:re&&(re={top:re.top||0,right:re.right||0,bottom:re.bottom||0,left:re.left||0});const Re=1,le=s==="bottom"?Re:0,me=s==="top"?Re:0,ge=s==="right"?Re:0,ce=s==="left"?Re:0,Te={boundary:p==="clipping-ancestors"?"clippingAncestors":p,padding:re},ve=v.useRef(null),Pe=Pn(u),Me=Pn(d),Le=typeof u!="function"?u:0,Fe=typeof d!="function"?d:0,Oe=[];x&&Oe.push(x),Oe.push(II(je=>{const ot=nw(je,s,K),ke=typeof Pe.current=="function"?Pe.current(ot):Pe.current,ze=typeof Me.current=="function"?Me.current(ot):Me.current;return{mainAxis:ke,crossAxis:ze,alignmentAxis:ze}},[Le,Fe,K,s]));const He=D==="none"&&k!=="shift",be=!He&&(y||F||k==="shift"),Ue=k==="none"?null:PI({...Te,padding:{top:re.top+Re+le,right:re.right+Re+ce,bottom:re.bottom+Re+me,left:re.left+Re+ge},mainAxis:!F&&k==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:z}),Ze=He?null:jI({...Te,rootBoundary:G,mainAxis:D!=="none",crossAxis:be,limiter:y||F?void 0:kI(je=>{if(!ve.current)return{};const{width:ot,height:ke}=ve.current.getBoundingClientRect(),ze=Oa(da(je.placement)),Ge=ze==="y"?ot:ke,et=ze==="y"?re.left+re.right:re.top+re.bottom;return{offset:Ge/2+et/2}})},[Te,y,F,G,re,D]);k==="shift"||D==="shift"||B==="center"?Oe.push(Ze,Ue):Oe.push(Ue,Ze),Oe.push(LI({...Te,apply({elements:{floating:je},availableWidth:ot,availableHeight:ke,rects:ze}){if(!L.current)return;const Ge=je.style;Ge.setProperty(ew,`${ot}px`),Ge.setProperty(tw,`${ke}px`);const et=wn(je).devicePixelRatio||1,{x:Et,y:H,width:Z,height:ne}=ze.reference,ye=(Math.round((Et+Z)*et)-Math.round(Et*et))/et,xe=(Math.round((H+ne)*et)-Math.round(H*et))/et;Ge.setProperty(rj,`${ye}px`),Ge.setProperty(aj,`${xe}px`)}}),JI(je=>({element:ve.current||Kt(je.elements.floating).createElement("div"),padding:ve.current?h:0}),[h]),{name:"transformOrigin",fn(je){const{elements:{floating:ot},middlewareData:ke,placement:ze,platform:Ge,rects:et,y:Et}=je,H=da(ze),Z=co(ze),ne=Oa(H)==="y",ye=ve.current,xe=typeof u=="function"?u(nw(je,s,K)):u;let qe;if(!ye&&Z&&Math.abs(ne?ke.shift?.x||0:ke.shift?.y||0)<=1)qe=Z==="start"===(ne&&Ge.isRTL?.(ot)===!0)?"100%":"0%";else{const Xe=ne?ke.arrow?.x||0:ke.arrow?.y||0,$e=ne?ye?.clientWidth||0:ye?.clientHeight||0;qe=`${Xe+$e/2}px`}let Ve=H==="top"||H==="left"?`calc(100% + ${xe}px)`:`${-xe}px`;return be&&ne&&Math.abs(ke.shift?.y||0)>xe&&(Ve=`${et.reference.y+et.reference.height/2-Et}px`),ot.style.setProperty(oj,ne?`${qe} ${Ve}`:`${Ve} ${qe}`),{}}},WI,A),_e(()=>{!R&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[R,C]);const it=v.useMemo(()=>({ancestorScroll:!b,elementResize:!b&&typeof ResizeObserver<"u",layoutShift:!b&&typeof IntersectionObserver<"u"}),[b]),{refs:de,elements:we,x:Ke,y:De,middlewareData:Ie,update:yt,placement:ut,context:ht,isPositioned:Ot,floatingStyles:Dt}=n({rootContext:C,open:w?R:void 0,placement:W,middleware:Oe,strategy:o,whileElementsMounted:w?void 0:(...je)=>QS(...je,it),nodeId:M,externalTree:j}),{sideX:Jt,sideY:rn}=Ie.adaptiveOrigin||ej,Wt=Ot?o:"fixed",We=v.useMemo(()=>{let je;return Ot?A?je={position:Wt,[Jt]:Ke,[rn]:De}:je={...Dt,position:Wt}:je={position:Wt,top:0,left:0},je[ew]="100vw",je[tw]="100vh",Ot||(je.opacity=0),je},[A,Wt,Jt,Ke,rn,De,Dt,Ot]),xt=v.useRef(null);_e(()=>{if(!R)return;const je=_.current,ot=typeof je=="function"?je():je,ze=(rw(ot)?ot.current:ot)||null||null;ze!==xt.current&&(de.setPositionReference(ze),xt.current=ze)},[R,de,U,_]),v.useEffect(()=>{if(!R)return;const je=_.current;typeof je!="function"&&rw(je)&&je.current!==xt.current&&(de.setPositionReference(je.current),xt.current=je.current)},[R,de,U,_]),v.useEffect(()=>{if(w&&R&&we.reference&&we.floating)return QS(we.reference,we.floating,yt,it)},[w,R,we,yt,it]);const $t=da(ut),ft=fC(s,$t,K),vt=co(ut)||"center",gt=!!Ie.hide?.referenceHidden;_e(()=>{I&&R&&Ot&&($t!==N||ee&&vt!==B)&&X(ut)},[I,ee,R,Ot,ut,$t,vt,N,B]);const Lt=v.useMemo(()=>({position:"absolute",top:Ie.arrow?.y,left:Ie.arrow?.x}),[Ie.arrow]),un=Ie.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:We,arrowStyles:Lt,arrowRef:ve,arrowUncentered:un,side:ft,align:vt,physicalSide:$t,anchorHidden:gt,refs:de,context:ht,isPositioned:Ot,update:yt}),[We,Lt,ve,un,ft,vt,$t,gt,de,ht,Ot,yt])}function rw(e){return e!=null&&"current"in e}function Lc(e){return e==="starting"?w3:Gt}function lp(e,n,{styles:a,transitionStatus:o,props:s,refs:u,hidden:c,inert:d=!1}){const p={...a};return d&&(p.pointerEvents="none"),Mt("div",e,{state:n,ref:u,props:[{role:"presentation",hidden:c,style:p},Lc(o),s],stateAttributesMapping:Mc})}const sj=v.forwardRef(function(n,a){const{render:o,className:s,anchor:u,positionMethod:c="absolute",side:d="top",align:p="center",sideOffset:g=0,alignOffset:y=0,collisionBoundary:h="clipping-ancestors",collisionPadding:b=5,arrowPadding:x=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:R=Jy,style:T,...O}=n,M=Tc(),A=KI(),I=M.useState("open"),j=M.useState("mounted"),k=M.useState("trackCursorAxis"),D=M.useState("disableHoverablePopup"),z=M.useState("floatingRootContext"),F=M.useState("instantType"),G=M.useState("transitionStatus"),J=M.useState("adaptiveOrigin"),Y=sp({anchor:u,positionMethod:c,floatingRootContext:z,mounted:j,side:d,sideOffset:g,align:p,alignOffset:y,collisionBoundary:h,collisionPadding:b,sticky:w,arrowPadding:x,disableAnchorTracking:C,keepMounted:A,collisionAvoidance:R,adaptiveOrigin:J}),U=v.useMemo(()=>({open:I,side:Y.side,align:Y.align,anchorHidden:Y.anchorHidden,instant:k!=="none"?"tracking-cursor":F}),[I,Y.side,Y.align,Y.anchorHidden,k,F]),_=lp(n,U,{styles:Y.positionerStyles,transitionStatus:G,props:O,refs:[a,M.useStateSetter("positionerElement")],hidden:!j,inert:!I||k==="both"||D});return S.jsx(cC.Provider,{value:Y,children:_})}),lj=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=Tc(),{side:p,align:g}=dC(),y=d.useState("open"),h=d.useState("instantType"),b=d.useState("transitionStatus"),x=d.useState("popupProps"),w=d.useState("floatingRootContext"),C=d.useState("disabled"),R=d.useState("closeDelay");Ia({open:y,ref:d.context.popupRef,onComplete(){y&&d.context.onOpenChangeComplete?.(!0)}}),ov(w,{enabled:!C,closeDelay:R});const T=d.useStateSetter("popupElement");return Mt("div",n,{state:{open:y,side:p,align:g,instant:h,transitionStatus:b},ref:[a,d.context.popupRef,T],props:[kc,x,Lc(b),c],stateAttributesMapping:Fh})}),uj=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=Tc(),{arrowRef:p,side:g,align:y,arrowUncentered:h,arrowStyles:b}=dC(),x=d.useState("open"),w=d.useState("instantType");return Mt("div",n,{state:{open:x,side:g,align:y,uncentered:h,instant:w},ref:[a,p],props:[{style:b,"aria-hidden":!0},c],stateAttributesMapping:Mc})}),cj=function(n){const{delay:a,closeDelay:o,timeout:s=400}=n,u=v.useMemo(()=>({open:a,close:o}),[a,o]);return S.jsx(lC.Provider,{value:a,children:S.jsx(k4,{delay:u,timeoutMs:s,children:n.children})})};function up(e){return Qy(19)?e:e?"true":void 0}function dj(e){const[n,a]=v.useState({current:e,previous:null});return Object.is(e,n.current)||a({current:e,previous:n.current}),n.previous}const hC=48,go=(e,n=0)=>{const a=new Int32Array(e.length);for(let o=0;o<e.length;o++)a[o]=e.charCodeAt(o)-hC-n;return a},cp=e=>{const n=new Int32Array(e.length+1);for(let a=0;a<e.length;a++)n[a+1]=n[a]+e[a];return n},Ai=e=>{const n=new Int32Array(e.length);let a=0;for(let o=0;o<e.length;o++){const s=e.charCodeAt(o)-hC;a+=s>>>1^-(s&1),n[o]=a}return n},fj=384,hj=[],ss=cp(go("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),pj=cp(go(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),gj="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",mj=(()=>{const e=ss.length-1,n=new Int32Array(e);for(let s=e-1;s>=0;s--){let u=1,c=s+1;for(let d=ss[s];d<ss[s+1];d++)u+=n[c],c+=n[c];n[s]=u}const a=new Int32Array(ss[e]);let o=0;for(let s=0;s<e;s++){let u=s+1;for(let c=ss[s];c<ss[s+1];c++)a[o++]=u,u+=n[u]}return a})(),yj=go("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),vj=cp(go("123333359346463635126536711576")),bj=go("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),xj=go("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),Sj=Ai("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),wj=(()=>{const e=new Int32Array(319).fill(-1),n=Ai("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),a=Ai("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let o=0;o<n.length;o++)e[n[o]]=a[o];return e})(),Rj="container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map(e=>{const n=e.split(" "),a=n.shift();for(let o=0;o<n.length;o++)n[o]=a+n[o];return n}),aw=Ai("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),Ej=Ai("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>6ʰ22ʷʺʷʺʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"),Cj=Ai("02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}22
:22z22222222222G000qOVI00000{2<40000@00000G¦§000ª00000000000000021K¬«00®000000000000000000000222HGH_1¸222½2¾2222ÇÊ000°2±"),pC=new Int32Array(987),gC=new Int32Array(987),mC=new Int32Array(987);let ny="";const ry=new Int32Array(1022);{const e=new Map;let n=0,a=0;for(let o=0;o<aw.length;o++)for(const s of Rj[Cj[o]]){let u=e.get(s);u===void 0&&(u=n++,e.set(s,u),ry[u*2]=ny.length,ry[u*2+1]=s.length,ny+=s),pC[a]=aw[o],gC[a]=Ej[o],mC[a]=u,a++}}const Tj=Ai("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),Oj=cp(go("1::24444432:442:44:44>222222:44:4421322511111311111114")),Mj=Ai("24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222"),Aj=go("ij"),Dj=go(""),Nj=go("1"),Ij="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var jj={GROUP_COUNT:fj,customValidatorNames:hj,edgeStart:ss,labelStart:pj,labelText:gj,edgeTarget:mj,nodeGroup:yj,nodeVlist:wj,vlistPat:vj,vlistOps:bj,vlistRef:xj,vlistGroup:Sj,litAnchor:pC,litGroup:gC,litPool:mC,poolOffsets:ry,poolText:ny,adjGid:Tj,adjStart:Oj,adjTgt:Mj,patGid:Aj,patTgt:Dj,postfixLookupGroups:Nj,orderSensitiveModifiers:Ij};const kj="line"in new Error,ao=-1,is=-1,C0=(e,n,a)=>{let o=2166136261;for(let s=n;s<a;s++)o=Math.imul(o^e.charCodeAt(s),16777619);return o},Gf=(e,n,a)=>{const o=a-n;let s=Math.imul(o,2654435761)^e.charCodeAt(n);if(o>3){const u=o>>2,c=o>>1;s=Math.imul(s^e.charCodeAt(n+1)<<8^e.charCodeAt(n+2)<<16^e.charCodeAt(n+u),2246822507),s=Math.imul(s^e.charCodeAt(n+c)<<8^e.charCodeAt(n+c+u)<<16^e.charCodeAt(a-3),3266489909),s^=e.charCodeAt(a-2)<<8^e.charCodeAt(a-1)<<16;for(let d=n+3,p=a-4;d<n+8&&d<p;d++,p--)s=Math.imul(s^e.charCodeAt(d)^e.charCodeAt(p)<<8,16777619)}return s^s>>>15|0},Pj=(e,n,a={})=>{const{GROUP_COUNT:o,edgeStart:s,labelStart:u,labelText:c,edgeTarget:d,nodeGroup:p,nodeVlist:g,vlistPat:y,vlistOps:h,vlistRef:b,vlistGroup:x,litAnchor:w,litGroup:C,litPool:R,poolOffsets:T,poolText:O,adjGid:M,adjStart:A,adjTgt:I,patGid:j,patTgt:k,postfixLookupGroups:D,customValidatorNames:z,orderSensitiveModifiers:F}=e,G=new Int32Array(o).fill(-1);for(let he=0;he<M.length;he++)G[M[he]]=he;let J=0;for(let he=0;he+1<A.length;he++){const Ae=A[he+1]-A[he];Ae>J&&(J=Ae)}let Y=32;for(;Y<2*(1+J+j.length);)Y<<=1;const U=new Int32Array(b.length+1);for(let he=0;he<b.length;he++)U[he+1]=U[he]+y[b[he]+1]-y[b[he]];const _=new Uint8Array(o);for(let he=0;he<D.length;he++)_[D[he]]=1;const L=s.length-1,$=new Uint8Array(L);let K=0,V=!0;for(let he=0;he<w.length;he++){$[w[he]]=1;const Ae=T[R[he]*2+1];Ae>K&&(K=Ae);const Se=O.charCodeAt(T[R[he]*2]);(Se===91||Se===40)&&(V=!1)}let X=1;for(;X<w.length*2;)X<<=1;const ee=new Int32Array(X).fill(-1);for(let he=0;he<w.length;he++){const Ae=T[R[he]*2];let Se=(C0(O,Ae,Ae+T[R[he]*2+1])^Math.imul(w[he],2654435761)|0)&X-1;for(;ee[Se]!==-1;)Se=Se+1&X-1;ee[Se]=he}const q=(he,Ae,Se,nt)=>{let Ct=(C0(Ae,Se,nt)^Math.imul(he,2654435761)|0)&X-1;const wt=nt-Se;for(;;){const zt=ee[Ct];if(zt===-1)return-1;if(w[zt]===he&&T[R[zt]*2+1]===wt){const vn=T[R[zt]*2];let fn=!0;for(let mt=0;mt<wt;mt++)if(O.charCodeAt(vn+mt)!==Ae.charCodeAt(Se+mt)){fn=!1;break}if(fn)return C[zt]}Ct=Ct+1&X-1}},se=a.cacheSize??8192,N=a.prefix??e.prefix??"",B=N===""?"":N+":",W=B.length,re=(z??[]).map(he=>{throw new Error("cn: missing validator "+he)}),Re=/\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$/,le=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,me=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ge=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let ce=0,Te=-1,ve=-1,Pe=-1,Me=-1;const Le=he=>he>=97&&he<=122||he>=65&&he<=90||he>=48&&he<=57||he===95,Fe=he=>/\s/.test(String.fromCharCode(he)),Oe=(he,Ae,Se)=>{if(ce=0,Te=-1,Se-Ae<3)return;const nt=he.charCodeAt(Ae),Ct=he.charCodeAt(Se-1);if(nt===91&&Ct===93)ce=1;else if(nt===40&&Ct===41)ce=2;else return;Pe=Ae+1,Me=Se-1;let wt=Ae+1;if(Le(he.charCodeAt(wt))){for(wt++;wt<Se-1;){const zt=he.charCodeAt(wt);if(!Le(zt)&&zt!==45)break;wt++}wt<Se-2&&he.charCodeAt(wt)===58&&(Te=Ae+1,ve=wt,Pe=wt+1)}},He=(he,Ae,Se,nt)=>{if(Se-Ae!==nt.length)return!1;for(let Ct=0;Ct<nt.length;Ct++)if(he.charCodeAt(Ae+Ct)!==nt.charCodeAt(Ct))return!1;return!0},be=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ze=he=>!!he&&!Number.isNaN(Number(he)),it=(he,Ae,Se)=>{if(Se-Ae<11||!He(he,Ae,Ae+10,"@container"))return!1;if(he.charCodeAt(Ae+10)===47)return Se-Ae>=12;const nt=he.charCodeAt(Ae+11);return nt===115&&Se-Ae>=17&&He(he,Ae+10,Ae+16,"-size/")||nt===110&&Se-Ae>=19&&He(he,Ae+10,Ae+18,"-normal/")},de=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],we="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(he=>he.split(" ")),Ke=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],De=(he,Ae,Se,nt)=>{if(he>=10){if(he>=25)return re[he-25](Ae.slice(Se,nt));const Ct=he-10;if(ce!==de[Ct])return!1;if(Te>=0){for(const wt of we[Ct])if(He(Ae,Te,ve,wt))return!0;return!1}switch(Ke[Ct]){case 0:return!1;case 1:return!0;case 2:{const wt=Ae.slice(Pe,Me);return Re.test(wt)&&!le.test(wt)}case 3:return Ze(Ae.slice(Pe,Me));case 4:return ge.test(Ae.slice(Pe,Me));default:return me.test(Ae.slice(Pe,Me))}}switch(he){case 0:return!0;case 1:return ce===0;case 2:return ce===1;case 3:return ce===2;case 4:return be.test(Ae.slice(Se,nt));case 5:return Ze(Ae.slice(Se,nt));case 6:{const Ct=Ae.slice(Se,nt);return!!Ct&&Number.isInteger(Number(Ct))}case 7:return nt>Se&&Ae.charCodeAt(nt-1)===37&&Ze(Ae.slice(Se,nt-1));case 8:return Ue.test(Ae.slice(Se,nt));default:return it(Ae,Se,nt)}},Ie=new Set(typeof F=="string"?F.split(" "):F),yt=(he,Ae,Se,nt,Ct,wt)=>{const zt=C0(Ae,Se,nt)^(Ct?2654435769:0)|0;let vn=he.get(zt);if(vn!==void 0)e:for(let At=0;At<vn.length;At++){const an=vn[At];if(!(an.imp!==Ct||an.k.length!==nt-Se)){for(let pt=0;pt<an.k.length;pt++)if(an.k.charCodeAt(pt)!==Ae.charCodeAt(Se+pt))continue e;return an.id}}else he.set(zt,vn=[]);const fn=Ae.slice(Se,nt),mt=wt(fn);return vn.push({k:fn,imp:Ct,id:mt}),mt};let ut=new Map,ht=new Map,Ot=2;const Dt=4096,Jt=(he,Ae)=>{const Se=[];let nt=0,Ct=0,wt=0;for(let mt=0;mt<he.length;mt++){const At=he.charCodeAt(mt);nt===0&&Ct===0&&At===58?(Se.push(he.slice(wt,mt)),wt=mt+1):At===91?nt++:At===93?nt--:At===40?Ct++:At===41&&Ct--}Se.push(he.slice(wt));let zt=Se[0];if(Se.length>1){const mt=[];let At=[];for(const an of Se)an.charCodeAt(0)===91||Ie.has(an)?(At.length&&(mt.push(...At.sort()),At=[]),mt.push(an)):At.push(an);At.length&&mt.push(...At.sort()),zt=mt.join(":")}const vn=Ae?zt+" !":zt;let fn=ht.get(vn);return fn===void 0&&ht.set(vn,fn=Ot++),fn};let rn=new Map,Wt=o;const We=o+4096,xt=()=>Wt++,$t=2097152,ft=8192,vt=new Int32Array(ft),gt=new Array(ft).fill(null),Lt=new Int32Array(ft),un=new Int32Array(ft),je=new Uint8Array(ft);let ot=0;const ke=(he,Ae,Se,nt,Ct,wt,zt,vn)=>{let fn=he;if(gt[he]!==null)if(gt[he|1]===null)fn=he|1;else if((ot++&3)===0)fn=he|ot>>2&1;else return;gt[fn]=Ae.slice(Se,nt),vt[fn]=Ct,Lt[fn]=wt,un[fn]=zt,je[fn]=vn},ze=()=>gt.fill(null);let Ge=256,et=[new Int32Array(Ge),new Int32Array(Ge),new Int32Array(Ge),new Int32Array(Ge)],[Et,H,Z,ne]=et,ye=new Uint8Array(Ge),xe=new Uint8Array(Ge);const qe=()=>{Ge*=2,et=et.map(Ae=>{const Se=new Int32Array(Ge);return Se.set(Ae),Se}),[Et,H,Z,ne]=et;const he=new Uint8Array(Ge);he.set(ye),ye=he,xe=new Uint8Array(Ge)};let Ve=64,Xe=new Int32Array(Ve),$e=new Int32Array(Ve);const st=new Int32Array(o);let tt=2048,St=21,ct=new Float64Array(tt),Bt=new Int32Array(tt),Ht=0;const On=(he,Ae)=>{if(he===0&&Ae<o)return st[Ae]===Ht?1:(st[Ae]=Ht,0);const Se=he*2097152+Ae+1;let nt=Math.imul(Se,2654435761)>>>St;for(;Bt[nt]===Ht;){if(ct[nt]===Se)return 1;nt=nt+1&tt-1}return ct[nt]=Se,Bt[nt]=Ht,0},Vt=(he,Ae,Se,nt,Ct)=>{if(Se-Ae>=2&&he.charCodeAt(Ae)===91&&he.charCodeAt(Se-1)===93){let wt=-1;for(let zt=Ae+1;zt<Se-1;zt++)if(he.charCodeAt(zt)===58){wt=zt;break}return wt===-1||wt===Ae+1?ao:yt(rn,he,Ae+1,wt,0,xt)}if(nt>=0&&p[nt]>=0)return p[nt];for(let wt=Ct-1;wt>=0;wt--){const zt=$e[wt];if(zt>Se)continue;const vn=Xe[wt],fn=Se-zt;if($[vn]===1&&fn>0&&fn<=K){const Ln=he.charCodeAt(zt);if(V===!1||Ln!==91&&Ln!==40){const Zr=q(vn,he,zt,Se);if(Zr>=0)return Zr}}const mt=g[vn];if(mt<0)continue;const At=b[mt],an=y[At],pt=y[At+1];if(an===pt)continue;Oe(he,zt,Se);const nr=U[mt]-an;for(let Ln=an;Ln<pt;Ln++)if(De(h[Ln],he,zt,Se))return x[nr+Ln]}return ao},Ut=he=>{const Ae=he.length;let Se=0,nt=0,Ct=!1;(Ot>Dt||ut.size>Dt)&&(ut=new Map,ht=new Map,Ot=2,ze()),Wt>We&&(rn=new Map,Wt=o,ze());let wt=0;for(;wt<Ae;){let mt=he.charCodeAt(wt);if(mt===32||mt>=9&&mt<=13||mt>=160&&Fe(mt)){mt!==32&&(Ct=!0),wt++;continue}const At=wt;let an=0;for(;wt<Ae;){if(mt=he.charCodeAt(wt),mt<=32){if(mt===32)break;if(mt>=9&&mt<=13){Ct=!0;break}}else if(mt>=160&&Fe(mt)){Ct=!0;break}an=Math.imul(an^mt,16777619),wt++}const pt=wt,nr=pt-At;Se===Ge&&qe();const Ln=Se++;Et[Ln]=At,H[Ln]=pt,nt+=nr,an^=Math.imul(nr,2654435761);const Zr=an^an>>>15|0,Gn=Zr&8190;{let en=-1;if(vt[Gn]===Zr&>[Gn]!==null&>[Gn].length===nr?en=Gn:vt[Gn|1]===Zr&>[Gn|1]!==null&>[Gn|1].length===nr&&(en=Gn|1),en>=0){const or=gt[en];let ga=!0;for(let ea=0;ea<nr;ea++)if(or.charCodeAt(ea)!==he.charCodeAt(At+ea)){ga=!1;break}if(ga){Z[Ln]=Lt[en],ne[Ln]=un[en],ye[Ln]=je[en];continue}}}let $n=At;if(W!==0){if(pt-At<=W||!he.startsWith(B,At)){Z[Ln]=ao,ke(Gn,he,At,pt,Zr,ao,0,0);continue}$n=At+W}let Os=0,Zl=0,bo=-1,Ms=-1;for(let en=$n;en<pt;en++){const or=he.charCodeAt(en);if(Os===0&&Zl===0){if(or===58){bo=en;continue}if(or===47){Ms=en;continue}}or===91?Os++:or===93?Os--:or===40?Zl++:or===41&&Zl--}const Jc=bo>=$n?bo+1:$n;let Nn=Jc,wr=pt,Yo=!1,As=0;wr>Nn&&he.charCodeAt(wr-1)===33?(Yo=!0,wr--):wr>Nn&&he.charCodeAt(Nn)===33&&(Yo=!0,Nn++,As=1);let Hr=-1;Ms>Jc&&(Hr=Ms+As,Hr>=wr&&(Hr=-1));let Ds=Nn;wr-Nn>1&&he.charCodeAt(Nn)===45&&(Ds=Nn+1);let Jr=0,Mr=0,Ko=0,Jl=-1,Wr=0;(g[0]>=0||$[0]===1)&&(Xe[0]=0,$e[0]=Ds,Wr=1);let ki=is,Wl=0;for(let en=Ds;en<wr;en++)if(en===Hr&&(ki=Mr<Ko?is:Jr,Wl=Wr),Jr!==is){const or=he.charCodeAt(en);let ga=-1;if(Mr<Ko)c.charCodeAt(Mr)===or?(Mr++,Mr===Ko&&(ga=Jr=Jl)):Jr=is;else{const ea=s[Jr],zi=s[Jr+1];let xo=is;for(let pr=ea;pr<zi;pr++){const _i=u[pr];if(c.charCodeAt(_i)===or){u[pr+1]-_i===1?ga=xo=d[pr]:(Mr=_i+1,Ko=u[pr+1],Jl=d[pr],xo=Jr);break}}Jr=xo}if(ga>=0&&(g[ga]>=0||$[ga]===1)&&en+1<wr&&he.charCodeAt(en+1)===45){if(Wr===Ve){Ve*=2;const ea=new Int32Array(Ve);ea.set(Xe),Xe=ea;const zi=new Int32Array(Ve);zi.set($e),$e=zi}Xe[Wr]=ga,$e[Wr]=en+2,Wr++}}Hr===wr&&(ki=Mr<Ko?is:Jr,Wl=Wr);const eu=Mr<Ko?is:Jr;let hr,Ar=!1;if(Hr>=0)if(Ar=!0,hr=Vt(he,Nn,Hr,ki,Wl),hr!==ao&&hr<o&&_[hr]){const en=Vt(he,Nn,wr,eu,Wr);en!==ao&&en!==hr&&(hr=en,Ar=!1)}else hr===ao&&(hr=Vt(he,Nn,wr,eu,Wr),Ar=!1);else hr=Vt(he,Nn,wr,eu,Wr);let Pi=0,Li=0;hr===ao?Z[Ln]=ao:(Li=Ar?1:0,Pi=$n>=bo?Yo?1:0:yt(ut,he,$n,bo,Yo?1:0,en=>Jt(en,Yo)),Z[Ln]=hr,ye[Ln]=Li,ne[Ln]=Pi),ke(Gn,he,At,pt,Zr,hr,Pi,Li)}if(Se===0)return"";if(Se===1)return Et[0]===0&&H[0]===Ae?he:he.slice(Et[0],H[0]);if(Se*Y>tt){for(;Se*Y>tt;)tt<<=1,St--;ct=new Float64Array(tt),Bt=new Int32Array(tt)}if(Ot>=$t||Wt>=$t)throw new Error("cn: too many distinct classes in one merge");Ht=Ht+1|0,Ht===0&&(st.fill(0),Bt.fill(0),Ht=1);let zt=!1;for(let mt=Se-1;mt>=0;mt--){const At=Z[mt];if(At===ao){xe[mt]=1;continue}const an=ne[mt];if(On(an,At)===1){xe[mt]=0,zt=!0;continue}if(xe[mt]=1,At<o){const pt=G[At];if(pt>=0)for(let nr=A[pt];nr<A[pt+1];nr++)On(an,I[nr]);if(ye[mt]&1)for(let nr=0;nr<j.length;nr++)j[nr]===At&&On(an,k[nr])}}if(!zt&&!Ct&&Ae===nt+Se-1)return he;let vn="",fn=0;for(;fn<Se;){if(!xe[fn]){fn++;continue}const mt=Et[fn];let At=H[fn],an=fn+1;for(;an<Se&&xe[an]&&Et[an]===At+1&&he.charCodeAt(At)===32;)At=H[an],an++;vn.length>0&&(vn+=" "),vn+=he.slice(mt,At),fn=an}return vn},En=16384,Cn=new Int32Array(En*2);let Xr=0,cn=1,dn=Object.create(null),Mn=Object.create(null),In=new Map,vo=new Map,Or=0,ja=0;const Qr=()=>{Xr^=En,cn=cn+1|0,ja=0},pa=he=>{let Ae=dn[he];if(Ae!==void 0)return Ae;const Se=Gf(he,0,he.length),nt=(Se&16383)+Xr,Ct=Cn[nt]===(Se^cn)||Cn[nt^En]===(Se^cn-1);return Ct&&(Ae=Mn[he],Ae!==void 0)?(dn[he]=Ae,Ae):(Ae=Ut(he),Ct?(dn[he]=Ae,++Or>se&&(Or=0,Mn=dn,dn=Object.create(null),Qr())):(Cn[nt]=Se^cn,++ja>En&&Qr()),Ae)},kt=he=>{let Ae=In.get(he);if(Ae!==void 0)return Ae;const Se=Gf(he,0,he.length),nt=(Se&16383)+Xr,Ct=Cn[nt]===(Se^cn)||Cn[nt^En]===(Se^cn-1);return Ct&&(Ae=vo.get(he),Ae!==void 0)?(In.set(he,Ae),Ae):(Ae=Ut(he),Ct?(In.set(he,Ae),++Or>se&&(Or=0,vo=In,In=new Map,Qr())):(Cn[nt]=Se^cn,++ja>En&&Qr()),Ae)},Yn=he=>{const Ae=Gf(he,0,he.length),Se=(Ae&16383)+Xr;return Cn[Se]===(Ae^cn)||Cn[Se^En]===(Ae^cn-1)?!0:(Cn[Se]=Ae^cn,++ja>En&&Qr(),!1)},Fn=se===0?Ut:kj?he=>{const Ae=In.get(he);return Ae!==void 0?Ae:kt(he)}:pa;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?Fn(arguments[0]):Fn(zj.apply(null,arguments))},mergeString:Fn,seenBefore:se===0?()=>!1:Yn,mergeUncached:Ut}},gh=(e,n)=>{if(!e)return"";if(typeof e=="string")return e;let a="";if(typeof e.length=="number"&&(!n||Array.isArray(e))){const o=e;for(let s=0;s<o.length;s++){const u=o[s];if(!u)continue;const c=typeof u=="string"?u:gh(u,n);c&&(a&&(a+=" "),a+=c)}return a}if(n){if(typeof e=="number")return""+e;if(typeof e=="object")for(const o in e)e[o]&&(a&&(a+=" "),a+=o)}return a},Lj=(e,n)=>{let a="";for(let o=0;o<e.length;o++){const s=e[o];if(!s)continue;const u=typeof s=="string"?s:gh(s,n);u&&(a&&(a+=" "),a+=u)}return a},zj=function(){return Lj(arguments,!1)},_j=256,ow=16,Hj=1024,T0=4096,Uj=(e,n)=>{const a=n===void 0?()=>!0:n.seenBefore,o=n===void 0?e:n.mergeUncached;let s=new Map,u=new Map,c=0,d=null,p=null,g=[],y=[],h=0;const b=(T,O,M)=>{p===null&&(p=new Array(T0).fill(""),g=new Array(T0).fill(""),y=new Array(T0).fill(""));const A=Gf(T,0,T.length)&4094;if(p[A]===T&&g[A]===O)return y[A];if(p[A|1]===T&&g[A|1]===O)return y[A|1];const I=e(M?O+" "+T:T),j=p[A]===""?A:A|(p[A|1]===""?1:h++&1);return p[j]=T,g[j]=O,y[j]=I,I},x=(T,O,M,A)=>{let I=0;if(O){if(O!==T.a0)return!1;I=1}if(M){if(M!==(I===0?T.a0:T.a1))return!1;I++}if(A){if(A!==(I===0?T.a0:I===1?T.a1:T.a2))return!1;I++}return I===T.t},w=(T,O)=>{const M=T.a;let A=0;for(let I=0;I<O.length;I++){const j=O[I];if(j){if(j!==M[A])return!1;A++}}return A===T.t},C=(T,O)=>{const M=T.length,A=d===null?null:d.n;if(!O){if(A!==null&&w(A,T))return d=A,A.r;if(d!==null&&d!==A&&w(d,T))return d.r}let I="",j=-1,k=0,D=!1;for(let G=0;G<M;G++){let J=T[G];if(J){if(typeof J!="string"){if(J=T[G]=gh(J,!0),!J)continue;D=!0}j<0&&(I=J,j=G),k++}}if(k===0)return"";if(k===1)return e(I);if(D){if(A!==null&&w(A,T))return d=A,A.r;if(d!==null&&d!==A&&w(d,T))return d.r}let z=s.get(I);z===void 0&&(z=u.get(I),z!==void 0&&s.set(I,z));let F=null;if(z!==void 0){if(z.skip>0){z.skip--,d=null;let J=I;for(let Y=j+1;Y<M;Y++){const U=T[Y];U&&(J+=" "+U)}return b(J,"",!1)}const G=z.e;e:for(let J=0;J<G.length;J++){const Y=G[J];if(Y.t!==k)continue;const U=Y.a;let _=1;for(let L=j+1;L<M;L++){const $=T[L];if($&&$!==U[_++])continue e}F=Y;break}F!==null&&(z.miss=0)}if(F===null){let G=I;const J=[I];for(let U=j+1;U<M;U++){const _=T[U];_&&(G+=" "+_,J.push(_))}if(!a(G))return o(G);F={r:e(G),t:J.length,a0:J[0],a1:J[1],a2:J[2]??"",a:J,n:null},z===void 0?s.set(I,z={e:[],miss:0,skip:0,at:0}):++z.miss>ow&&(z.miss=ow,z.skip=Hj,z.e.length=0,z.at=0);const Y=z.e;Y.length<_j?Y.push(F):(Y[z.at]=F,z.at=z.at+1&255),++c>1e3&&(c=0,u=s,s=new Map)}return d!==null&&d!==F&&(d.n=F),d=F,F.r},R=T=>Array.isArray(T)?C(T.slice(),!1):e(gh(T,!0));return function(T,O,M){const A=arguments.length;if((A|1)===3){const k=d;if(k!==null){const D=k.n;if(D!==null&&x(D,T,O,M))return d=D,D.r;if(k!==D&&x(k,T,O,M))return k.r}if(A===2&&typeof O=="string"&&O!==""){const D=s.get(T);if(D!==void 0&&D.skip>0)return D.skip--,d=null,b(O,T,!0)}return C([T,O,M],!0)}if(A===1)return typeof T=="string"?e(T):R(T);const I=d;if(I!==null){const k=I.n;if(k!==null){const D=k.a;let z=0,F=!0;for(let G=0;G<A;G++){const J=arguments[G];if(J){if(J!==D[z]){F=!1;break}z++}}if(F&&z===k.t)return d=k,k.r}if(I!==k){const D=I.a;let z=0,F=!0;for(let G=0;G<A;G++){const J=arguments[G];if(J){if(J!==D[z]){F=!1;break}z++}}if(F&&z===I.t)return I.r}}const j=[];for(let k=0;k<A;k++)j.push(arguments[k]);return C(j,!0)}},iw=Pj(jj),Qe=Uj(iw.mergeString,iw);function Fj({delay:e=0,...n}){return S.jsx(cj,{"data-slot":"tooltip-provider",delay:e,...n})}function mh({...e}){return S.jsx(FI,{"data-slot":"tooltip",...e})}function yh({...e}){return S.jsx(YI,{"data-slot":"tooltip-trigger",...e})}function vh({className:e,side:n="top",sideOffset:a=4,align:o="center",alignOffset:s=0,children:u,...c}){return S.jsx($I,{children:S.jsx(sj,{align:o,alignOffset:s,side:n,sideOffset:a,className:"isolate z-50",children:S.jsxs(lj,{"data-slot":"tooltip-content",className:Qe("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c,children:[u,S.jsx(uj,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 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 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"})]})})})}var Bj=(e,n,a,o,s,u,c,d)=>{let p=document.documentElement,g=["light","dark"];function y(x){(Array.isArray(e)?e:[e]).forEach(w=>{let C=w==="class",R=C&&u?s.map(T=>u[T]||T):s;C?(p.classList.remove(...R),p.classList.add(u&&u[x]?u[x]:x)):p.setAttribute(w,x)}),h(x)}function h(x){d&&g.includes(x)&&(p.style.colorScheme=x)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)y(o);else try{let x=localStorage.getItem(n)||a,w=c&&x==="system"?b():x;y(w)}catch{}},Vj=v.createContext(void 0),qj={setTheme:e=>{},themes:[]},Yj=()=>{var e;return(e=v.useContext(Vj))!=null?e:qj};v.memo(({forcedTheme:e,storageKey:n,attribute:a,enableSystem:o,enableColorScheme:s,defaultTheme:u,value:c,themes:d,nonce:p,scriptProps:g})=>{let y=JSON.stringify([a,n,u,e,d,c,o,s]).slice(1,-1);return v.createElement("script",{...g,suppressHydrationWarning:!0,nonce:typeof window>"u"?p:"",dangerouslySetInnerHTML:{__html:`(${Bj.toString()})(${y})`}})});function Kj(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",n.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}const Gj=e=>{switch(e){case"success":return Qj;case"info":return Jj;case"warning":return Zj;case"error":return Wj;default:return null}},$j=Array(12).fill(0),Xj=({visible:e,className:n})=>Ne.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},Ne.createElement("div",{className:"sonner-spinner"},$j.map((a,o)=>Ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),Qj=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Zj=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Jj=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Wj=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),ek=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},Ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),tk=()=>{const[e,n]=Ne.useState(document.hidden);return Ne.useEffect(()=>{const a=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",a),()=>document.removeEventListener("visibilitychange",a)},[]),e};let nk=1;const rk=100,sw=e=>{var n;return typeof e?.id=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:nk++};class ak{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(a=>n(a)),()=>{const a=this.subscribers.indexOf(n);this.subscribers.splice(a,1)}),this.publish=n=>{this.subscribers.forEach(a=>a(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-rk;n<=0||(this.toasts=this.toasts.filter(a=>n>0&&this.dismissedToasts.has(a.id)?(this.dismissedToasts.delete(a.id),n--,!1):!0))},this.create=n=>{const{message:a,...o}=n,s=sw(n),u=this.pendingDismissals.get(s);u!==void 0&&(cancelAnimationFrame(u),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const c=this.dismissedToasts.has(s),d=n.dismissible===void 0?!0:n.dismissible;return c&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(g=>g.id!==s)),(c?void 0:this.toasts.find(g=>g.id===s))?this.toasts=this.toasts.map(g=>g.id===s?(this.publish({...g,...n,id:s,title:a}),{...g,...n,id:s,dismissible:d,title:a}):g):this.addToast({title:a,...o,dismissible:d,id:s}),s},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(o=>{this.dismissedToasts.add(o.id),this.subscribers.forEach(s=>s({id:o.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const a=this.pendingDismissals.get(n);return a!==void 0&&cancelAnimationFrame(a),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(o=>o({id:n,dismiss:!0}))})),n},this.message=(n,a)=>this.create({...a,message:n,type:void 0}),this.error=(n,a)=>this.create({...a,message:n,type:"error"}),this.success=(n,a)=>this.create({...a,type:"success",message:n}),this.info=(n,a)=>this.create({...a,type:"info",message:n}),this.warning=(n,a)=>this.create({...a,type:"warning",message:n}),this.loading=(n,a)=>this.create({...a,type:"loading",message:n}),this.promise=(n,a)=>{if(!a)return;let o;a.loading!==void 0&&(o=this.create({...a,promise:n,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let u=o!==void 0,c;const d=s.then(async g=>{if(c=["resolve",g],Ne.isValidElement(g))u=!1,this.create({id:o,type:"default",message:g});else if(ik(g)&&!g.ok){u=!1;const h=typeof a.error=="function"?await a.error(`HTTP error! status: ${g.status}`):a.error,b=typeof a.description=="function"?await a.description(`HTTP error! status: ${g.status}`):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"error",description:b,...w})}else if(g instanceof Error){u=!1;const h=typeof a.error=="function"?await a.error(g):a.error,b=typeof a.description=="function"?await a.description(g):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"error",description:b,...w})}else if(a.success!==void 0){u=!1;const h=typeof a.success=="function"?await a.success(g):a.success,b=typeof a.description=="function"?await a.description(g):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"success",description:b,...w})}}).catch(async g=>{if(c=["reject",g],a.error!==void 0){u=!1;const y=typeof a.error=="function"?await a.error(g):a.error,h=typeof a.description=="function"?await a.description(g):a.description,x=typeof y=="object"&&!Ne.isValidElement(y)?y:{message:y};this.create({id:o,type:"error",description:h,...x})}}).finally(()=>{u&&(this.dismiss(o),o=void 0),a.finally==null||a.finally.call(a)}),p=()=>new Promise((g,y)=>d.then(()=>c[0]==="reject"?y(c[1]):g(c[1])).catch(y));return typeof o!="string"&&typeof o!="number"?{unwrap:p}:Object.assign(o,{unwrap:p})},this.custom=(n,a)=>{const o=sw(a);return this.create({...a,jsx:n(o),id:o,type:void 0}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Yr=new ak,ok=(e,n)=>Yr.message(e,n),ik=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",sk=ok,lk=()=>Yr.toasts,uk=()=>Yr.getActiveToasts(),_n=Object.assign(sk,{success:Yr.success,info:Yr.info,warning:Yr.warning,error:Yr.error,custom:Yr.custom,message:Yr.message,promise:Yr.promise,dismiss:Yr.dismiss,loading:Yr.loading},{getHistory:lk,getToasts:uk});Kj("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Of(e){return e.label!==void 0}const ck=3,dk="24px",fk="16px",lw=4e3,hk=356,pk=14,gk=45,mk=200;function oo(...e){return e.filter(Boolean).join(" ")}function yk(e){const[n,a]=e.split("-"),o=[];return n&&o.push(n),a&&o.push(a),o}const vk=e=>{var n,a,o,s,u,c,d,p,g;const{invert:y,toast:h,unstyled:b,interacting:x,setHeights:w,visibleToasts:C,heights:R,index:T,toasts:O,expanded:M,removeToast:A,defaultRichColors:I,closeButton:j,style:k,cancelButtonStyle:D,actionButtonStyle:z,className:F="",descriptionClassName:G="",duration:J,position:Y,gap:U,expandByDefault:_,classNames:L,icons:$,closeButtonAriaLabel:K="Close toast"}=e,[V,X]=Ne.useState(null),[ee,q]=Ne.useState(null),[se,N]=Ne.useState(!1),[B,W]=Ne.useState(!1),[re,Re]=Ne.useState(!1),[le,me]=Ne.useState(!1),[ge,ce]=Ne.useState(!1),[Te,ve]=Ne.useState(0),[Pe,Me]=Ne.useState(0),Le=Ne.useRef(h.duration||J||lw),Fe=Ne.useRef(null),Oe=Ne.useRef(null),He=T===0,be=T+1<=C,Ue=h.type,Ze=Ue??"default",it=h.dismissible!==!1,de=h.className||"",we=h.descriptionClassName||"",Ke=Ne.useMemo(()=>R.findIndex(je=>je.toastId===h.id)||0,[R,h.id]),De=Ne.useMemo(()=>{var je;return(je=h.closeButton)!=null?je:j},[h.closeButton,j]),Ie=Ne.useMemo(()=>h.duration||J||lw,[h.duration,J]),yt=Ne.useRef(0),ut=Ne.useRef(0),ht=Ne.useRef(0),Ot=Ne.useRef(null),[Dt,Jt]=Y.split("-"),rn=Ne.useMemo(()=>R.reduce((je,ot,ke)=>ke>=Ke?je:je+ot.height,0),[R,Ke]),Wt=tk(),We=Ne.useMemo(()=>{var je;return(je=e.swipeDirections)!=null?je:yk(Y)},[e.swipeDirections,Y]),xt=h.invert||y,$t=Ue==="loading";ut.current=Ne.useMemo(()=>Ke*U+rn,[Ke,rn]),Ne.useEffect(()=>{Le.current=Ie},[Ie]),Ne.useEffect(()=>{N(!0)},[]),Ne.useEffect(()=>{const je=Oe.current;if(je){const ot=je.getBoundingClientRect().height;return Me(ot),w(ke=>[{toastId:h.id,height:ot,position:h.position},...ke]),()=>w(ke=>ke.filter(ze=>ze.toastId!==h.id))}},[w,h.id]),Ne.useLayoutEffect(()=>{if(!se)return;const je=Oe.current,ot=je.style.height;je.style.height="auto";const ke=je.getBoundingClientRect().height;je.style.height=ot,Me(ke),w(ze=>ze.find(et=>et.toastId===h.id)?ze.map(et=>et.toastId===h.id?{...et,height:ke}:et):[{toastId:h.id,height:ke,position:h.position},...ze])},[se,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ft=Ne.useCallback(()=>{W(!0),ve(ut.current),w(je=>je.filter(ot=>ot.toastId!==h.id)),setTimeout(()=>{A(h)},mk)},[h,A,w,ut]);Ne.useEffect(()=>{if(h.promise&&Ue==="loading"||h.duration===1/0||h.type==="loading")return;let je;return M||x||Wt?(()=>{if(ht.current<yt.current){const ze=new Date().getTime()-yt.current;Le.current=Le.current-ze}ht.current=new Date().getTime()})():Le.current!==1/0&&(yt.current=new Date().getTime(),je=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ft()},Le.current)),()=>clearTimeout(je)},[M,x,h,Ue,Wt,ft]),Ne.useEffect(()=>{h.delete&&(ft(),h.onDismiss==null||h.onDismiss.call(h,h))},[ft,h.delete]);function vt(){var je;if($?.loading){var ot;return Ne.createElement("div",{className:oo(L?.loader,h==null||(ot=h.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Ue==="loading"},$.loading)}return Ne.createElement(Xj,{className:oo(L?.loader,h==null||(je=h.classNames)==null?void 0:je.loader),visible:Ue==="loading"})}const gt=h.icon||$?.[Ue]||Gj(Ue);var Lt,un;return Ne.createElement("li",{tabIndex:0,ref:Oe,className:oo(F,de,L?.toast,h==null||(n=h.classNames)==null?void 0:n.toast,L?.[Ze],h==null||(a=h.classNames)==null?void 0:a[Ze]),"data-sonner-toast":"","data-rich-colors":(Lt=h.richColors)!=null?Lt:I,"data-styled":!(h.jsx||h.unstyled||b),"data-mounted":se,"data-promise":!!h.promise,"data-swiped":ge,"data-removed":B,"data-visible":be,"data-y-position":Dt,"data-x-position":Jt,"data-index":T,"data-front":He,"data-swiping":re,"data-dismissible":it,"data-type":Ue,"data-invert":xt,"data-swipe-out":le,"data-swipe-direction":ee,"data-expanded":!!(M||_&&se),"data-testid":h.testId,style:{"--index":T,"--toasts-before":T,"--z-index":O.length-T,"--offset":`${B?Te:ut.current}px`,"--initial-height":_?"auto":`${Pe}px`,...k,...h.style},onDragEnd:()=>{Re(!1),X(null),Ot.current=null},onPointerDown:je=>{je.button!==2&&($t||!it||(Fe.current=new Date,ve(ut.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(Re(!0),Ot.current={x:je.clientX,y:je.clientY})))},onPointerUp:()=>{var je,ot,ke;if(le||!it)return;Ot.current=null;const ze=Number(((je=Oe.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ge=Number(((ot=Oe.current)==null?void 0:ot.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((ke=Fe.current)==null?void 0:ke.getTime()),Et=V==="x"?ze:Ge,H=Math.abs(Et)/et;if((V==="x"?We.includes(ze>0?"right":"left"):We.includes(Ge>0?"bottom":"top"))&&(Math.abs(Et)>=gk||H>.11)){ve(ut.current),h.onDismiss==null||h.onDismiss.call(h,h),q(V==="x"?ze>0?"right":"left":Ge>0?"down":"up"),ft(),me(!0);return}else{var ne,ye;(ne=Oe.current)==null||ne.style.setProperty("--swipe-amount-x","0px"),(ye=Oe.current)==null||ye.style.setProperty("--swipe-amount-y","0px")}ce(!1),Re(!1),X(null)},onPointerMove:je=>{var ot,ke,ze;if(!Ot.current||!it||((ot=window.getSelection())==null?void 0:ot.toString().length)>0)return;const et=je.clientY-Ot.current.y,Et=je.clientX-Ot.current.x;!V&&(Math.abs(Et)>1||Math.abs(et)>1)&&X(Math.abs(Et)>Math.abs(et)?"x":"y");let H={x:0,y:0};const Z=ne=>1/(1.5+Math.abs(ne)/20);if(V==="y"){if(We.includes("top")||We.includes("bottom"))if(We.includes("top")&&et<0||We.includes("bottom")&&et>0)H.y=et;else{const ne=et*Z(et);H.y=Math.abs(ne)<Math.abs(et)?ne:et}}else if(V==="x"&&(We.includes("left")||We.includes("right")))if(We.includes("left")&&Et<0||We.includes("right")&&Et>0)H.x=Et;else{const ne=Et*Z(Et);H.x=Math.abs(ne)<Math.abs(Et)?ne:Et}(Math.abs(H.x)>0||Math.abs(H.y)>0)&&ce(!0),(ke=Oe.current)==null||ke.style.setProperty("--swipe-amount-x",`${H.x}px`),(ze=Oe.current)==null||ze.style.setProperty("--swipe-amount-y",`${H.y}px`)}},De&&!h.jsx&&Ue!=="loading"?Ne.createElement("button",{"aria-label":K,"data-disabled":$t,"data-close-button":!0,onClick:$t||!it?()=>{}:()=>{ft(),h.onDismiss==null||h.onDismiss.call(h,h)},className:oo(L?.closeButton,h==null||(o=h.classNames)==null?void 0:o.closeButton)},(un=$?.close)!=null?un:ek):null,(Ue||h.icon||h.promise)&&h.icon!==null&&($?.[Ue]!==null||h.icon)?Ne.createElement("div",{"data-icon":"",className:oo(L?.icon,h==null||(s=h.classNames)==null?void 0:s.icon)},Ue==="loading"?h.icon||vt():h.promise?vt():null,Ue!=="loading"?gt:null):null,Ne.createElement("div",{"data-content":"",className:oo(L?.content,h==null||(u=h.classNames)==null?void 0:u.content)},Ne.createElement("div",{"data-title":"",className:oo(L?.title,h==null||(c=h.classNames)==null?void 0:c.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?Ne.createElement("div",{"data-description":"",className:oo(G,we,L?.description,h==null||(d=h.classNames)==null?void 0:d.description)},typeof h.description=="function"?h.description():h.description):null),Ne.isValidElement(h.cancel)?h.cancel:h.cancel&&Of(h.cancel)?Ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||D,onClick:je=>{Of(h.cancel)&&it&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,je),ft())},className:oo(L?.cancelButton,h==null||(p=h.classNames)==null?void 0:p.cancelButton)},h.cancel.label):null,Ne.isValidElement(h.action)?h.action:h.action&&Of(h.action)?Ne.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:je=>{Of(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,je),!je.defaultPrevented&&ft())},className:oo(L?.actionButton,h==null||(g=h.classNames)==null?void 0:g.actionButton)},h.action.label):null)};function uw(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function bk(e,n){const a={};return[e,n].forEach((o,s)=>{const u=s===1,c=u?"--mobile-offset":"--offset",d=u?fk:dk;function p(g){["top","right","bottom","left"].forEach(y=>{a[`${c}-${y}`]=typeof g=="number"?`${g}px`:g})}typeof o=="number"||typeof o=="string"?p(o):typeof o=="object"?["top","right","bottom","left"].forEach(g=>{o[g]===void 0?a[`${c}-${g}`]=d:a[`${c}-${g}`]=typeof o[g]=="number"?`${o[g]}px`:o[g]}):p(d)}),a}const xk=Ne.forwardRef(function(n,a){const{id:o,invert:s,position:u="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:p,className:g,offset:y,mobileOffset:h,theme:b="light",richColors:x,duration:w,style:C,visibleToasts:R=ck,toastOptions:T,dir:O=uw(),gap:M=pk,icons:A,customAriaLabel:I,containerAriaLabel:j="Notifications"}=n,[k,D]=Ne.useState([]),z=Ne.useMemo(()=>o?k.filter(N=>N.toasterId===o):k.filter(N=>!N.toasterId),[k,o]),F=Ne.useMemo(()=>Array.from(new Set([u].concat(z.filter(N=>N.position).map(N=>N.position)))),[z,u]),[G,J]=Ne.useState([]),[Y,U]=Ne.useState(!1),[_,L]=Ne.useState(!1),[$,K]=Ne.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=Ne.useRef(null),X=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=Ne.useRef(null),q=Ne.useRef(!1),se=Ne.useCallback(N=>{D(B=>{var W;return(W=B.find(re=>re.id===N.id))!=null&&W.delete||Yr.dismiss(N.id),B.filter(({id:re})=>re!==N.id)})},[]);return Ne.useEffect(()=>Yr.subscribe(N=>{if(N.dismiss){requestAnimationFrame(()=>{D(B=>B.map(W=>W.id===N.id?{...W,delete:!0}:W))});return}setTimeout(()=>{s3.flushSync(()=>{D(B=>{const W=B.findIndex(re=>re.id===N.id);return W!==-1?[...B.slice(0,W),{...B[W],...N},...B.slice(W+1)]:[N,...B]})})})}),[]),Ne.useEffect(()=>{if(b!=="system"){K(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;const N=window.matchMedia("(prefers-color-scheme: dark)");try{N.addEventListener("change",({matches:B})=>{K(B?"dark":"light")})}catch{N.addListener(({matches:W})=>{try{K(W?"dark":"light")}catch(re){console.error(re)}})}},[b]),Ne.useEffect(()=>{k.length<=1&&U(!1)},[k]),Ne.useEffect(()=>{const N=B=>{var W;if(c.length>0&&c.every(le=>B[le]||B.code===le)){var Re;U(!0),(Re=V.current)==null||Re.focus()}B.code==="Escape"&&(document.activeElement===V.current||(W=V.current)!=null&&W.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[c]),Ne.useEffect(()=>{if(V.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,q.current=!1)}},[V.current]),Ne.createElement("section",{ref:a,"aria-label":I??`${j} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},F.map((N,B)=>{var W;const[re,Re]=N.split("-");return z.length?Ne.createElement("ol",{key:N,dir:O==="auto"?uw():O,tabIndex:-1,ref:V,className:g,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":re,"data-x-position":Re,style:{"--front-toast-height":`${((W=G[0])==null?void 0:W.height)||0}px`,"--width":`${hk}px`,"--gap":`${M}px`,...C,...bk(y,h)},onBlur:le=>{q.current&&!le.currentTarget.contains(le.relatedTarget)&&(q.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||q.current||(q.current=!0,ee.current=le.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{_||U(!1)},onDragEnd:()=>U(!1),onPointerDown:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},z.filter(le=>!le.position&&B===0||le.position===N).map((le,me)=>{var ge,ce;return Ne.createElement(vk,{key:le.id,icons:A,index:me,toast:le,defaultRichColors:x,duration:(ge=T?.duration)!=null?ge:w,className:T?.className,descriptionClassName:T?.descriptionClassName,invert:s,visibleToasts:R,closeButton:(ce=T?.closeButton)!=null?ce:p,interacting:_,position:N,style:T?.style,unstyled:T?.unstyled,classNames:T?.classNames,cancelButtonStyle:T?.cancelButtonStyle,actionButtonStyle:T?.actionButtonStyle,closeButtonAriaLabel:T?.closeButtonAriaLabel,removeToast:se,toasts:z.filter(Te=>Te.position==le.position),heights:G.filter(Te=>Te.position==le.position),setHeights:J,expandByDefault:d,gap:M,expanded:Y,swipeDirections:n.swipeDirections})})):null}))}),Sk=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join("-").toLowerCase();function wk(e,n,a=[]){if(n==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Sk(e),size:24,node:n,...a.length>0?{aliases:a}:{}}}const Rk=e=>{let n="",a=!1;for(const o of e){if(o==="-"||o==="_"||o<=" "){a=n.length>0;continue}n.length===0?n+=o.toLowerCase():n+=a?o.toUpperCase():o,a=!1}return n},Ek=e=>{const n=Rk(e);return n.charAt(0).toUpperCase()+n.slice(1)},ay=(...e)=>{const n=new Set;for(const a of e)if(typeof a=="string")for(const o of a.split(/\s+/))o&&n.add(o);return[...n].join(" ")},fl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function O0(e){return e!=null}function Ck(e,n={}){const a=n.attributeNames??{},o=b=>a[b]??b,s=e.size??e.width??fl.width,u=e.size??e.height??fl.height,c=e.aliases?.filter(b=>typeof b=="string"&&b.trim()!=="").map(b=>`lucide-${b}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...c],p=n.className?.split(" ").filter(Boolean)??[],g=n.includeDefaultClasses===!1?ay(...p):ay("lucide",...d,...p);let y=n.strokeWidth??fl["stroke-width"];if(n.absoluteStrokeWidth){const b=Number(y)*Number(e.size??e.width??fl.width)/Number(n.size??n.width??fl.width);Number.isFinite(b)&&(y=b)}return["svg",{...Object.entries(fl).reduce((b,[x,w])=>(b[o(x)]=w,b),{}),..."color"in n&&n.color&&{[o("stroke")]:n.color},..."size"in n&&O0(n.size)&&{[o("width")]:n.size,[o("height")]:n.size},..."width"in n&&O0(n.width)&&{[o("width")]:n.width},..."height"in n&&O0(n.height)&&{[o("height")]:n.height},[o("stroke-width")]:y,...g&&{[o("class")]:g},[o("viewBox")]:`0 0 ${s} ${u}`,...n.hasA11yProp===!1?{[o("aria-hidden")]:"true"}:{},..."attributes"in n&&n.attributes},e.node.map(b=>{const[x,w,C]=b,R=n.nonScalingStroke?{[o("vector-effect")]:"non-scaling-stroke",...w}:w;return C?[x,R,C]:[x,R]})]}function Tk(e,n={}){return Ck(e,{...n,attributeNames:{...n.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const Ok=e=>{if(e==null||typeof e!="object")return!1;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&(n.startsWith("aria-")||n==="role"||n==="title")&&e[n]!=null)return!0;return!1},Mk=v.createContext({}),Ak=()=>v.useContext(Mk),Dk=v.forwardRef(({color:e,size:n,width:a,height:o,strokeWidth:s,absoluteStrokeWidth:u,nonScalingStroke:c,className:d="",children:p,iconNode:g=[],icon:y={node:g,aliases:[],size:24},...h},b)=>{const{size:x=24,strokeWidth:w=2,absoluteStrokeWidth:C=!1,nonScalingStroke:R=!1,color:T="currentColor",className:O=""}=Ak()??{},M=!!p||Ok(h),[A,I,j=[]]=Tk(y,{color:e??T,width:a??n??x,height:o??n??x,strokeWidth:s??w,absoluteStrokeWidth:u??C,nonScalingStroke:c??R,className:ay(O,d),hasA11yProp:M,attributes:h});return v.createElement(A,{ref:b,...I},[...j.map(([k,D])=>v.createElement(k,D)),...Array.isArray(p)?p:[p]])});function Pt(e,n=[],a=[]){const o=typeof e=="string"?wk(e,n,a):e,s=v.forwardRef(({className:u,...c},d)=>v.createElement(Dk,{ref:d,icon:o,className:u,...c}));return o.name&&(s.displayName=Ek(o.name)),s}const yC={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};yC.node;const Nk=Pt(yC),vC={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};vC.node;const Ik=Pt(vC),bC={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};bC.node;const xC=Pt(bC),SC={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};SC.node;const dp=Pt(SC),wC={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};wC.node;const RC=Pt(wC),EC={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};EC.node;const jk=Pt(EC),CC={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};CC.node;const kk=Pt(CC),TC={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};TC.node;const Pk=Pt(TC),OC={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};OC.node;const Lk=Pt(OC),MC={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9 9.5a3 2.5 0 016 0c0 2-2 2-3 3.5",key:"1awbb0"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};MC.node;const zk=Pt(MC),AC={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};AC.node;const _k=Pt(AC),DC={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};DC.node;const NC=Pt(DC),IC={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};IC.node;const Hk=Pt(IC),jC={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};jC.node;const Uk=Pt(jC),kC={name:"file-input",size:24,node:[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1",key:"1q9hii"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]};kC.node;const PC=Pt(kC),LC={name:"file-output",size:24,node:[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]]};LC.node;const zC=Pt(LC),_C={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};_C.node;const Fk=Pt(_C),HC={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};HC.node;const Bk=Pt(HC),UC={name:"gallery-vertical-end",size:24,node:[["path",{d:"M7 2h10",key:"nczekb"}],["path",{d:"M5 6h14",key:"u2x4p"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}]]};UC.node;const Vk=Pt(UC),FC={name:"grip-vertical",size:24,node:[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]};FC.node;const sv=Pt(FC),BC={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};BC.node;const qk=Pt(BC),VC={name:"languages",size:24,node:[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]};VC.node;const Yk=Pt(VC),qC={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};qC.node;const Kk=Pt(qC),YC={name:"library-big",size:24,node:[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]]};YC.node;const Gk=Pt(YC),KC={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};KC.node;const Fl=Pt(KC),GC={name:"lock-keyhole",size:24,node:[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]};GC.node;const $k=Pt(GC),$C={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};$C.node;const Xk=Pt($C),XC={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};XC.node;const Qk=Pt(XC),QC={name:"paintbrush",size:24,node:[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]};QC.node;const Zk=Pt(QC),ZC={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};ZC.node;const Jk=Pt(ZC),JC={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};JC.node;const Wk=Pt(JC),WC={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};WC.node;const lv=Pt(WC),eT={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};eT.node;const eP=Pt(eT),tT={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};tT.node;const nT=Pt(tT),rT={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};rT.node;const tP=Pt(rT),aT={name:"settings",size:24,node:[["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"}]]};aT.node;const nP=Pt(aT),oT={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};oT.node;const rP=Pt(oT),iT={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};iT.node;const aP=Pt(iT),sT={name:"trash",size:24,node:[["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"}]],aliases:["trash-2"]};sT.node;const oP=Pt(sT),lT={name:"triangle-exclamation-point",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle","triangle-alert"]};lT.node;const iP=Pt(lT),uT={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};uT.node;const Rs=Pt(uT),sP=({...e})=>{const{theme:n="system"}=Yj();return S.jsx(xk,{theme:n,className:"toaster group",icons:{success:S.jsx(Lk,{className:"size-4"}),info:S.jsx(qk,{className:"size-4"}),warning:S.jsx(iP,{className:"size-4"}),error:S.jsx(Qk,{className:"size-4"}),loading:S.jsx(Fl,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})},cT=v.createContext(void 0),Bo=e=>{const n=v.useContext(cT);if(e)return e;if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},lP=({client:e,children:n})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),S.jsx(cT.Provider,{value:e,children:n})),uP={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var cP=class{#e=uP;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}};const cs=new cP;function dP(e){setTimeout(e,0)}const fP=typeof window>"u"||"Deno"in globalThis;function kr(){}function hP(e,n){return typeof e=="function"?e(n):e}function dT(e){return typeof e=="number"&&e>=0&&e!==1/0}function fT(e,n){return Math.max(e+(n||0)-Date.now(),0)}function kn(e,n){return typeof e=="function"?e(n):e}function cw(e,n){const{type:a="all",exact:o,fetchStatus:s,predicate:u,queryKey:c,stale:d}=e;if(c){if(o){if(n.queryHash!==uv(c,n.options))return!1}else if(!Pl(n.queryKey,c))return!1}if(a!=="all"){const p=n.isActive();if(a==="active"&&!p||a==="inactive"&&p)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||s&&s!==n.state.fetchStatus||u&&!u(n))}function dw(e,n){const{exact:a,status:o,predicate:s,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(a){if(vs(n.options.mutationKey)!==vs(u))return!1}else if(!Pl(n.options.mutationKey,u))return!1}return!(o&&n.state.status!==o||s&&!s(n))}function uv(e,n){return(n?.queryKeyHashFn||vs)(e)}function vs(e){return JSON.stringify(e,(n,a)=>oy(a)?Object.keys(a).sort().reduce((o,s)=>(o[s]=a[s],o),{}):a)}function Pl(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){if(n.length>e.length)return!1;for(let o=0;o<n.length;o++)if(!Pl(e[o],n[o]))return!1;return!0}const a=Object.keys(n);for(const o of a)if(!Pl(e[o],n[o]))return!1;return!0}return!1}const pP=Object.prototype.hasOwnProperty;function cv(e,n,a=0){if(e===n)return e;if(a>500)return n;const o=fw(e)&&fw(n);if(!o&&!(oy(e)&&oy(n)))return n;const s=(o?e:Object.keys(e)).length,u=o?n:Object.keys(n),c=u.length,d=o?new Array(c):{};let p=0;for(let g=0;g<c;g++){const y=o?g:u[g],h=e[y],b=n[y];if(h===b){d[y]=h,(o?g<s:pP.call(e,y))&&p++;continue}if(h===null||b===null||typeof h!="object"||typeof b!="object"){d[y]=b;continue}const x=cv(h,b,a+1);d[y]=x,x===h&&p++}return s===c&&p===s?e:d}function $f(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const a in e)if(e[a]!==n[a])return!1;return!0}function fw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function oy(e){if(!hw(e))return!1;const n=Object.getPrototypeOf(e),a=n?.constructor;if(a===void 0)return!0;if(typeof a!="function")return!1;const o=a.prototype;return!(!hw(o)||!o.hasOwnProperty("isPrototypeOf")||n!==Object.prototype)}function hw(e){return Object.prototype.toString.call(e)==="[object Object]"}function gP(e){return new Promise(n=>{cs.setTimeout(n,e)})}function iy(e,n,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,n):a.structuralSharing!==!1?cv(e,n):n}function mP(e,n,a=0){const o=[...e,n];return a&&o.length>a?o.slice(1):o}function yP(e,n,a=0){const o=[n,...e];return a&&o.length>a?o.slice(0,-1):o}const dv=Symbol();function hT(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===dv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function fv(e,n){return typeof e=="function"?e(...n):!!e}function vP(e,n,a){let o=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=n(),o||(o=!0,s.aborted?a():s.addEventListener("abort",a,{once:!0})),s)}),e}let bP=()=>fP;const hv=()=>bP();var Bl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},xP=class extends Bl{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const pv=new xP,SP=dP;function wP(){let e=[],n=0,a=d=>{d()},o=d=>{d()},s=SP;const u=d=>{n?e.push(d):s(()=>{a(d)})},c=()=>{const d=e;e=[],d.length&&s(()=>{o(()=>{d.forEach(p=>{a(p)})})})};return{batch:d=>{let p;n++;try{p=d()}finally{n--,n||c()}return p},batchCalls:d=>(...p)=>{u(()=>{d(...p)})},schedule:u,setNotifyFunction:d=>{a=d},setBatchNotifyFunction:d=>{o=d},setScheduler:d=>{s=d}}}const Wn=wP();var RP=class extends Bl{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),a=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}};const bh=new RP;function EP(e){return Math.min(1e3*2**e,3e4)}function pT(e){return(e??"online")==="online"?bh.isOnline():!0}var sy=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function gT(e){let n=!1,a=0,o,s="pending",u,c;const d=new Promise((O,M)=>{u=O,c=M});d.catch(kr);const p=()=>s!=="pending",g=O=>{if(!p()){const M=new sy(O);C(M),e.onCancel?.(M)}},y=()=>{n=!0},h=()=>{n=!1},b=()=>pv.isFocused()&&(e.networkMode==="always"||bh.isOnline())&&e.canRun(),x=()=>pT(e.networkMode)&&e.canRun(),w=O=>{p()||(o?.(),s="resolved",u(O))},C=O=>{p()||(o?.(),s="rejected",c(O))},R=O=>new Promise(M=>{o=A=>{(p()||O())&&M(A)},e.onPause?.()}).then(()=>{o=void 0,p()||e.onContinue?.()}),T=()=>{if(p())return;let O;const M=a===0?e.initialPromise:void 0;try{O=M??e.fn()}catch(A){O=Promise.reject(A)}Promise.resolve(O).then(w).catch(A=>{if(p())return;const I=e.retry??(hv()?0:3),j=e.retryDelay??EP,k=typeof j=="function"?j(a,A):j,D=I===!0||typeof I=="number"&&a<I||typeof I=="function"&&I(a,A);if(n||!D){C(A);return}a++,e.onFail?.(a,A),gP(k).then(()=>b()?void 0:R(b)).then(()=>{n?C(A):T()})})};return{promise:d,status:()=>s,cancel:g,continue:()=>(o?.(),d),cancelRetry:y,continueRetry:h,canStart:x,start:()=>(x()?T():R(x).then(T),d)}}var mT=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dT(this.gcTime)&&(this.#e=cs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hv()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(cs.clearTimeout(this.#e),this.#e=void 0)}};function CP(e){return{onFetch:(n,a)=>{const o=n.options,s=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const g=async()=>{let y=!1;const h=w=>{vP(w,()=>n.signal,()=>y=!0)},b=hT(n.options,n.fetchOptions),x=async(w,C,R)=>{if(y)return Promise.reject(n.signal.reason);if(C==null&&w.pages.length)return Promise.resolve(w);const O=(()=>{const j={client:n.client,queryKey:n.queryKey,pageParam:C,direction:R?"backward":"forward",meta:n.options.meta};return h(j),j})(),M=await b(O),{maxPages:A}=n.options,I=R?yP:mP;return{pages:I(w.pages,M,A),pageParams:I(w.pageParams,C,A)}};if(s&&u.length){const w=s==="backward",C=w?TP:pw,R={pages:u,pageParams:c};d=await x(R,C(o,R),w)}else{const w=e??u.length;do{const C=p===0?c[0]===void 0?o.initialPageParam:c[0]:pw(o,d);if(p>0&&C==null)break;d=await x(d,C),p++}while(p<w)}return d};n.options.persister?n.fetchFn=()=>n.options.persister?.(g,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},a):n.fetchFn=g}}}function pw(e,{pages:n,pageParams:a}){const o=n.length-1;return n.length>0?e.getNextPageParam(n[o],n,a[o],a):void 0}function TP(e,{pages:n,pageParams:a}){return n.length>0?e.getPreviousPageParam?.(n[0],n,a[0],a):void 0}var OP=class extends mT{#e;#t;#n;#r;#o;#a;#i;#l;constructor(e){super(),this.#l=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#r=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=mw(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#i,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=mw(this.options);n.data!==void 0&&(this.setState(gw(n.data,n.dataUpdatedAt)),this.#t=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,n){const a=iy(this.state.data,e,this.options);return this.#s({data:a,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),a}setState(e){this.#s({type:"setState",state:e})}cancel(e){const n=this.#a?.promise;return this.#a?.cancel(e),n?n.then(kr).catch(kr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>kn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dv||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>kn(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!fT(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const n=this.observers.indexOf(e);n!==-1&&(this.observers.splice(n,1),this.observers.length||(this.#a&&(this.#l||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.options)}const a=new AbortController,o=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#l=!0,a.signal)})},s=()=>{const p=hT(this.options,n),y=(()=>{const h={client:this.#o,queryKey:this.queryKey,meta:this.meta};return o(h),h})();return this.#l=!1,this.options.persister?this.options.persister(p,y,this):p(y)},c=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:s};return o(p),p})();(this.#e==="infinite"?CP(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#s({type:"fetch",meta:c.fetchOptions?.meta});const d=this.#a=gT({initialPromise:n?.initialPromise,fn:c.fetchFn,onCancel:p=>{p instanceof sy&&p.revert&&this.setState({...this.#n,fetchStatus:"idle"}),a.abort()},onFail:(p,g)=>{this.#s({type:"failed",failureCount:p,error:g})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const p=await d.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#r.config.onSuccess?.(p,this),this.#r.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof sy){if(p.silent)return this.#a.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#s({type:"error",error:p}),this.#r.config.onError?.(p,this),this.#r.config.onSettled?.(this.state.data,p,this),p}finally{this.#a===d&&(this.#a=void 0),this.scheduleGc()}}#s(e){const n=a=>{switch(e.type){case"failed":return{...a,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...yT(a.data,this.options),fetchMeta:e.meta??null};case"success":const o={...a,...gw(e.data,e.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?o:void 0,o;case"error":const s=e.error;return{...a,error:s,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...e.state}}};this.state=n(this.state),Wn.batch(()=>{this.observers.slice().forEach(a=>{a.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function yT(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pT(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function gw(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function mw(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,a=n!==void 0,o=a?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:a?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var MP=class extends Bl{#e;#t=void 0;#n=void 0;#r=void 0;#o;#a;#i;#l;#s;#h;#c;#d;#u;#p=new Set;constructor(e,n){super(),this.options=n,this.#e=e,this.#i=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),yw(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ly(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ly(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const n=this.options,a=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof kn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),n._defaulted&&!$f(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&vw(this.#t,a,this.options,n)&&this.#f(),this.updateResult(),o&&(this.#t!==a||kn(this.options.enabled,this.#t)!==kn(n.enabled,this.#t)||kn(this.options.staleTime,this.#t)!==kn(n.staleTime,this.#t))&&this.#m();const s=this.#y();o&&(this.#t!==a||kn(this.options.enabled,this.#t)!==kn(n.enabled,this.#t)||s!==this.#u)&&this.#v(s)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),a=this.createResult(n,e);return $f(this.getCurrentResult(),a)||(this.#r=a,this.#a=this.options,this.#o=this.#t.state),a}getCurrentResult(){return this.#r}trackResult(e,n){return new Proxy(e,{get:(a,o)=>(this.trackProp(o),n?.(o),Reflect.get(a,o))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#e.defaultQueryOptions(e),a=this.#e.getQueryCache().build(this.#e,n);let o=()=>{},s;const u=new Promise(c=>{s=c,o=this.#e.getQueryCache().subscribe(d=>{d.type==="updated"&&d.query.queryHash===a.queryHash&&a.state.data!==void 0&&(o(),c(this.createResult(a,n)))})});return Promise.race([a.fetch(n).then(()=>{const c=this.createResult(a,n);return s?.(c),c}).finally(()=>{o()}),u])}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(e){this.#w();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch(kr)),n}#g(e){return!hv()&&kn(this.options.enabled,this.#t)!==!1&&dT(e)}#m(){this.#x();const e=kn(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#g(e))return;const n=fT(this.#r.dataUpdatedAt,e)+1;this.#c=cs.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#y(){return kn(this.options.refetchInterval,this.#t)??!1}#v(e){this.#S(),this.#u=e,!(this.#u===0||!this.#g(this.#u))&&(this.#d=cs.setInterval(()=>{(this.options.refetchIntervalInBackground||pv.isFocused())&&this.#f()},this.#u))}#b(){this.#m(),this.#v(this.#y())}#x(){this.#c!==void 0&&(cs.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#d!==void 0&&(cs.clearInterval(this.#d),this.#d=void 0)}createResult(e,n){const a=this.#t,o=this.options,s=this.#r,u=this.#o,c=this.#a,d=e!==a?e.state:this.#n,{state:p}=e;let g={...p},y=!1,h;if(n._optimisticResults){const I=this.hasListeners(),j=!I&&yw(e,n),k=I&&vw(e,a,n,o);(j||k)&&(g={...g,...yT(p.data,e.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:x,status:w}=g;h=g.data;let C=!1;if(n.placeholderData!==void 0&&h===void 0&&w==="pending"){let I;s?.isPlaceholderData&&n.placeholderData===c?.placeholderData?(I=s.data,C=!0):I=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,I!==void 0&&(w="success",h=iy(s?.data,I,n),y=!0)}if(n.select&&h!==void 0&&!C)if(s&&h===u?.data&&n.select===this.#l)h=this.#s;else try{this.#l=n.select,h=n.select(h),h=iy(s?.data,h,n),this.#s=h,this.#i=null}catch(I){this.#i=I}else h===void 0&&(this.#i=null);this.#i&&(b=this.#i,h=this.#s,x=Date.now(),w="error",y=!1);const R=g.fetchStatus==="fetching",T=w==="pending",O=w==="error",M=T&&R,A=h!==void 0;return{status:w,fetchStatus:g.fetchStatus,isPending:T,isSuccess:w==="success",isError:O,isInitialLoading:M,isLoading:M,data:h,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:x,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&!T,isLoadingError:O&&!A,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:O&&A,isStale:gv(e,n),refetch:this.refetch,isEnabled:kn(n.enabled,e)!==!1}}updateResult(){const e=this.#r,n=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#a=this.options,this.#o.data!==void 0&&(this.#h=this.#t),$f(n,e))return;this.#r=n;const o=(()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,u=typeof s=="function"?s():s;if(u==="all"||!u&&!this.#p.size)return!0;const c=new Set(u??this.#p);return this.options.throwOnError&&c.add("error"),Object.keys(this.#r).some(d=>{const p=d;return this.#r[p]!==e[p]&&c.has(p)})})();Wn.batch(()=>{o&&this.listeners.forEach(s=>{s(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function AP(e,n){return kn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&kn(n.retryOnMount,e)===!1)}function yw(e,n){return AP(e,n)||e.state.data!==void 0&&ly(e,n,n.refetchOnMount)}function ly(e,n,a){if(kn(n.enabled,e)!==!1&&kn(n.staleTime,e)!=="static"){const o=kn(a,e);return o==="always"||o!==!1&&gv(e,n)}return!1}function vw(e,n,a,o){return(e!==n||kn(o.enabled,e)===!1)&&(!a.suspense||e.state.status!=="error")&&gv(e,a)}function gv(e,n){return kn(n.enabled,e)!==!1&&e.isStaleByTime(kn(n.staleTime,e))}var DP=class extends mT{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||vT(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(n=>n!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){const n=()=>{this.#o({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},o=this.#r=gT({fn:()=>this.options.mutationFn?this.options.mutationFn(e,a):Promise.reject(new Error("No mutationFn found")),onFail:(c,d)=>{this.#o({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),s=this.state.status==="pending",u=!o.canStart();try{if(s)n();else{this.#o({type:"pending",variables:e,isPaused:u}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,a);const d=await this.options.onMutate?.(e,a);d!==this.state.context&&this.#o({type:"pending",context:d,variables:e,isPaused:u})}const c=await o.start();return await this.#n.config.onSuccess?.(c,e,this.state.context,this,a),await this.options.onSuccess?.(c,e,this.state.context,a),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(c,null,e,this.state.context,a),this.#o({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,e,this.state.context,this,a)}catch(d){Promise.reject(d)}try{await this.options.onError?.(c,e,this.state.context,a)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,a)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,a)}catch(d){Promise.reject(d)}throw this.#o({type:"error",error:c}),c}finally{this.#r===o&&(this.#r=void 0),this.#n.runNext(this)}}#o(e){const n=a=>{switch(e.type){case"failed":return{...a,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...a,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:e.error,failureCount:a.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Wn.batch(()=>{this.#t.forEach(a=>{a.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function vT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var NP=class extends Bl{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,n,a){const o=new DP({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:a});return this.add(o),o}add(e){this.#e.add(e);const n=Mf(e);if(typeof n=="string"){const a=this.#t.get(n);a?a.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=Mf(e);if(typeof n=="string"){const a=this.#t.get(n);if(a)if(a.length>1){const o=a.indexOf(e);o!==-1&&a.splice(o,1)}else a[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Mf(e);if(typeof n=="string"){const a=this.#t.get(n)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const n=Mf(e);return typeof n=="string"?this.#t.get(n)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Wn.batch(()=>{const e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(n=>{this.notify({type:"removed",mutation:n})})})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(a=>dw(n,a))}findAll(e={}){return this.getAll().filter(n=>dw(e,n))}notify(e){Wn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Wn.batch(()=>Promise.all(e.map(n=>n.continue().catch(kr))))}};function Mf(e){return e.options.scope?.id}var IP=class extends Bl{#e;#t=void 0;#n;#r;constructor(n,a){super(),this.#e=n,this.setOptions(a),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const a=this.options;this.options=this.#e.defaultMutationOptions(n),$f(this.options,a)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),a?.mutationKey&&this.options.mutationKey&&vs(a.mutationKey)!==vs(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#o())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#o(),this.#a(n)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#o(),this.#a()}mutate(n,a){return this.#r=a,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(n)}#o(){const n=this.#n?.state??vT();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#a(n){Wn.batch(()=>{const a=this.#r;if(a&&this.hasListeners()){const o=this.#t.variables,s=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{a.onSuccess?.(n.data,o,s,u)}catch(c){Promise.reject(c)}try{a.onSettled?.(n.data,null,o,s,u)}catch(c){Promise.reject(c)}}else if(n?.type==="error"){try{a.onError?.(n.error,o,s,u)}catch(c){Promise.reject(c)}try{a.onSettled?.(void 0,n.error,o,s,u)}catch(c){Promise.reject(c)}}}this.listeners.forEach(o=>{o(this.#t)})})}},bT=class extends Bl{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,n,a){const o=n.queryKey,s=n.queryHash??uv(o,n);let u=this.get(s);return u||(u=new OP({client:e,queryKey:o,queryHash:s,options:e.defaultQueryOptions(n),state:a,defaultOptions:e.getQueryDefaults(o)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Wn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(a=>cw(n,a))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(a=>cw(e,a)):n}notify(e){Wn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},jP=class{#e;#t;#n;#r;#o;#a;#i;#l;constructor(e={}){this.#e=e.queryCache||new bT,this.#t=e.mutationCache||new NP,this.#n=e.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=pv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=bh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),a=this.#e.build(this,n),o=a.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime(kn(n.staleTime,a))&&this.prefetchQuery(n),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:a})=>[n,a.data])}setQueryData(e,n,a){const o=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(o.queryHash)?.state.data,u=hP(n,s);if(u!==void 0)return this.#e.build(this,o).setData(u,{...a,manual:!0})}setQueriesData(e,n,a){return Wn.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,n,a)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;Wn.batch(()=>{n.findAll(e).forEach(a=>{n.remove(a)})})}resetQueries(e,n){const a=this.#e;return Wn.batch(()=>{const o=a.findAll(e),s=new Set(o);return o.forEach(u=>{u.reset()}),this.refetchQueries({type:"active",predicate:u=>s.has(u)},n)})}cancelQueries(e,n={}){const a={revert:!0,...n},o=Wn.batch(()=>this.#e.findAll(e).map(s=>s.cancel(a)));return Promise.all(o).then(kr).catch(kr)}invalidateQueries(e,n={}){return Wn.batch(()=>(this.#e.findAll(e).forEach(a=>{a.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const a={...n,cancelRefetch:n.cancelRefetch??!0},o=Wn.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let u=s.fetch(void 0,a);return a.throwOnError||(u=u.catch(kr)),s.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(kr)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n),o=a.isStaleByTime(kn(n.staleTime,a))?await a.fetch(n):a.state.data,s=n.select;return s?s(o):o}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n);return a.isStaleByTime(kn(n.staleTime,a))?a.fetch(n):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kr).catch(kr)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kr).catch(kr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return bh.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#r.set(vs(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#r.values()],a={};return n.forEach(o=>{Pl(e,o.queryKey)&&Object.assign(a,o.defaultOptions)}),a}setMutationDefaults(e,n){this.#o.set(vs(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#o.values()],a={};return n.forEach(o=>{Pl(e,o.mutationKey)&&Object.assign(a,o.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=uv(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===dv&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const xT=v.createContext(!1),kP=()=>v.useContext(xT);xT.Provider;function PP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const LP=v.createContext(PP()),zP=()=>v.useContext(LP),_P=(e,n,a)=>{const o=a?.state.status==="error"&&typeof e.throwOnError=="function"?fv(e.throwOnError,[a.state.error,a]):e.throwOnError;(e.suspense||o)&&(n.isReset()||(e.retryOnMount=!1))},HP=e=>{v.useEffect(()=>{e.clearReset()},[e])},UP=({result:e,errorResetBoundary:n,throwOnError:a,query:o,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&o&&(s&&e.data===void 0||fv(a,[e.error,o])),FP=e=>{if(e.suspense){const a=s=>s==="static"?s:Math.max(s??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...s)=>a(o(...s)):a(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},BP=(e,n)=>e?.suspense&&n.isPending,VP=(e,n,a)=>n.fetchOptimistic(e).catch(()=>{a.clearReset()});function qP(e,n,a){const o=kP(),s=zP(),u=Bo(a),c=u.defaultQueryOptions(e),d=u.getQueryCache().get(c.queryHash),p=e.subscribed!==!1;c._optimisticResults=o?"isRestoring":p?"optimistic":void 0,FP(c),_P(c,s,d),HP(s);const[g]=v.useState(()=>new n(u,c)),y=g.getOptimisticResult(c),h=!o&&p;if(v.useSyncExternalStore(v.useCallback(b=>{const x=h?g.subscribe(Wn.batchCalls(b)):kr;return g.updateResult(),x},[g,h]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),v.useEffect(()=>{g.setOptions(c)},[c,g]),BP(c,y))throw VP(c,g,s);if(UP({result:y,errorResetBoundary:s,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw y.error;return c.notifyOnChangeProps?y:g.trackResult(y)}function fp(e,n){return qP(e,MP,n)}function YP(e,n){const a=Bo(n);return GP({filters:{...e,status:"pending"}},a).length}function KP(){let e;return(n,a)=>{let o=[],s;return()=>{const u=n.findAll(a.filters),c=u.flatMap(d=>[d,d.state]);return(!s||c.length!==o.length||c.some((d,p)=>!Object.is(d,o[p])))&&(o=c,s=cv(e,u.map(d=>a.select?a.select(d):d.state)),e=s),s}}}function GP(e={},n){const a=Bo(n).getMutationCache(),[o]=v.useState(()=>KP()),s=o(a,e);return v.useSyncExternalStore(v.useCallback(u=>a.subscribe(Wn.batchCalls(u)),[a]),s,s)}function Ma(e,n){const a=Bo(n),[o]=v.useState(()=>new IP(a,e));v.useEffect(()=>{o.setOptions(e)},[o,e]);const s=v.useSyncExternalStore(v.useCallback(c=>o.subscribe(Wn.batchCalls(c)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=v.useCallback((...c)=>{o.mutate(c[0],c[1]).catch(kr)},[o]);if(s.error&&fv(o.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}var ST=e=>{throw TypeError(e)},wT=(e,n,a)=>n.has(e)||ST("Cannot "+a),Ea=(e,n,a)=>(wT(e,n,"read from private field"),a?a.call(e):n.get(e)),Wu=(e,n,a)=>n.has(e)?ST("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,a),io=(e,n,a,o)=>(wT(e,n,"write to private field"),n.set(e,a),a),hp=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,pp=/^[\\/]{2}/;function RT(e,n){return n+e.replace(/\\/g,"/")}var bw="popstate";function xw(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function $P(e={}){function n(s,u){let{pathname:c="/",search:d="",hash:p=""}=Ka(s.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),yc("",{pathname:c,search:d,hash:p},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function a(s,u){let c=s.document.querySelector("base"),d="";if(c&&c.getAttribute("href")){let p=s.location.href,g=p.indexOf("#");d=g===-1?p:p.slice(0,g)}return d+"#"+(typeof u=="string"?u:Lr(u))}function o(s,u){Un(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(u)})`)}return QP(n,a,o,e)}function _t(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Un(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function XP(){return Math.random().toString(36).substring(2,10)}function Sw(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function yc(e,n,a=null,o,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?Ka(n):n,state:a,key:n&&n.key||o||XP(),mask:s}}function Lr({pathname:e="/",search:n="",hash:a=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function Ka(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substring(a),e=e.substring(0,a));let o=e.indexOf("?");o>=0&&(n.search=e.substring(o),e=e.substring(0,o)),e&&(n.pathname=e)}return n}function QP(e,n,a,o={}){let{window:s=document.defaultView,v5Compat:u=!1}=o,c=s.history,d="POP",p=null,g=y();g==null&&(g=0,c.replaceState({...c.state,idx:g},""));function y(){return(c.state||{idx:null}).idx}function h(){d="POP";let R=y(),T=R==null?null:R-g;g=R,p&&p({action:d,location:C.location,delta:T})}function b(R,T){d="PUSH";let O=xw(R)?R:yc(C.location,R,T);a&&a(O,R),g=y()+1;let M=Sw(O,g),A=C.createHref(O.mask||O);try{c.pushState(M,"",A)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;s.location.assign(A)}u&&p&&p({action:d,location:C.location,delta:1})}function x(R,T){d="REPLACE";let O=xw(R)?R:yc(C.location,R,T);a&&a(O,R),g=y();let M=Sw(O,g),A=C.createHref(O.mask||O);c.replaceState(M,"",A),u&&p&&p({action:d,location:C.location,delta:0})}function w(R){return ET(s,R)}let C={get action(){return d},get location(){return e(s,c)},listen(R){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(bw,h),p=R,()=>{s.removeEventListener(bw,h),p=null}},createHref(R){return n(s,R)},createURL:w,encodeLocation(R){let T=w(R);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:b,replace:x,go(R){return c.go(R)}};return C}function ET(e,n,a=!1){let o="http://localhost";e&&(o=e.location.origin!=="null"?e.location.origin:e.location.href),_t(o,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:Lr(n);return s=s.replace(/ $/,"%20"),!a&&pp.test(s)&&(s=o+s),new URL(s,o)}var ec,ww=class{constructor(e){if(Wu(this,ec,new Map),e)for(let[n,a]of e)this.set(n,a)}get(e){if(Ea(this,ec).has(e))return Ea(this,ec).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,n){Ea(this,ec).set(e,n)}};ec=new WeakMap;var ZP=new Set(["lazy","caseSensitive","path","id","index","children"]);function JP(e){return ZP.has(e)}var WP=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function e5(e){return WP.has(e)}function t5(e){return e.index===!0}function vc(e,n,a=[],o={},s=!1){return e.map((u,c)=>{let d=[...a,String(c)],p=typeof u.id=="string"?u.id:d.join("-");if(_t(u.index!==!0||!u.children,"Cannot specify children on an index route"),_t(s||!o[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),t5(u)){let g={...u,id:p};return o[p]=Rw(g,n(g)),g}else{let g={...u,id:p,children:void 0};return o[p]=Rw(g,n(g)),u.children&&(g.children=vc(u.children,n,d,o,s)),g}})}function Rw(e,n){return Object.assign(e,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...e.lazy,...n.lazy}}:{}})}function CT(e,n,a="/"){return Ua(e,n,a,!1)}function Ua(e,n,a,o,s){let u=typeof n=="string"?Ka(n):n,c=Na(u.pathname||"/",a);if(c==null)return null;let d=s??Xf(e),p=null,g=f5(c);for(let y=0;p==null&&y<d.length;++y)p=d5(d[y],g,o);return p}function TT(e,n){let{route:a,pathname:o,params:s}=e;return{id:a.id,pathname:o,params:s,data:n[a.id],loaderData:n[a.id],handle:a.handle}}function Xf(e){let n=OT(e);return n5(n),n}function OT(e,n=[],a=[],o="",s=!1){let u=(c,d,p=s,g)=>{let y={relativePath:g===void 0?c.path||"":g,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&p)return;_t(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let h=Aa([o,y.relativePath]),b=a.concat(y);c.children&&c.children.length>0&&(_t(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),OT(c.children,n,b,h,p)),!(c.path==null&&!c.index)&&n.push({path:h,score:u5(h,c.index),routesMeta:b.map((x,w)=>{let[C,R]=DT(x.relativePath,x.caseSensitive,w===b.length-1);return{...x,matcher:C,compiledParams:R}})})};return e.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))u(c,d);else for(let p of MT(c.path))u(c,d,!0,p)}),n}function MT(e){let n=e.split("/");if(n.length===0)return[];let[a,...o]=n,s=a.endsWith("?"),u=a.replace(/\?$/,"");if(o.length===0)return s?[u,""]:[u];let c=MT(o.join("/")),d=[];return d.push(...c.map(p=>p===""?u:[u,p].join("/"))),s&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function n5(e){e.sort((n,a)=>n.score!==a.score?a.score-n.score:c5(n.routesMeta.map(o=>o.childrenIndex),a.routesMeta.map(o=>o.childrenIndex)))}var r5=/^:[\w-]+$/,a5=3,o5=2,i5=1,s5=10,l5=-2,Ew=e=>e==="*";function u5(e,n){let a=e.split("/"),o=a.length;return a.some(Ew)&&(o+=l5),n&&(o+=o5),a.filter(s=>!Ew(s)).reduce((s,u)=>s+(r5.test(u)?a5:u===""?i5:s5),o)}function c5(e,n){return e.length===n.length&&e.slice(0,-1).every((o,s)=>o===n[s])?e[e.length-1]-n[n.length-1]:0}function d5(e,n,a=!1){let{routesMeta:o}=e,s={},u="/",c=[];for(let d=0;d<o.length;++d){let p=o[d],g=d===o.length-1,y=u==="/"?n:n.slice(u.length)||"/",h={path:p.relativePath,caseSensitive:p.caseSensitive,end:g},b=p.matcher&&p.compiledParams?AT(h,y,p.matcher,p.compiledParams):xh(h,y),x=p.route;if(!b&&g&&a&&!o[o.length-1].route.index&&(b=xh({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!b)return null;Object.assign(s,b.params),c.push({params:s,pathname:Aa([u,b.pathname]),pathnameBase:g5(Aa([u,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(u=Aa([u,b.pathnameBase]))}return c}function xh(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,o]=DT(e.path,e.caseSensitive,e.end);return AT(e,n,a,o)}function AT(e,n,a,o){let s=n.match(a);if(!s)return null;let u=s[0],c=Ll(u,1),d=s.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:h},b)=>{if(y==="*"){let w=d[b]||"";c=Ll(u.slice(0,u.length-w.length),1)}const x=d[b];return h&&!x?g[y]=void 0:g[y]=(x||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:c,pattern:e}}function DT(e,n=!1,a=!0){Un(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let o=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p,g,y)=>{if(o.push({paramName:d,isOptional:p!=null}),p){let h=y.charAt(g+c.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),o]}function f5(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Un(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Na(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,o=e.charAt(a);return o&&o!=="/"?null:e.slice(a)||"/"}function h5({basename:e,pathname:n}){return n==="/"?e:Aa([e,n])}var mv=e=>hp.test(e);function p5(e,n="/"){let{pathname:a,search:o="",hash:s=""}=typeof e=="string"?Ka(e):e,u;return a?(a=yv(a),a.startsWith("/")||a.startsWith("\\")?u=Cw(a.substring(1),"/"):u=Cw(a,n)):u=n,{pathname:u,search:m5(o),hash:y5(s)}}function Cw(e,n){let a=Ll(n).split("/");return e.split("/").forEach(s=>{s===".."?a.length>1&&a.pop():s!=="."&&a.push(s)}),a.length>1?a.join("/"):"/"}function M0(e,n,a,o){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function NT(e){return e.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function gp(e){let n=NT(e);return n.map((a,o)=>o===n.length-1?a.pathname:a.pathnameBase)}function zc(e,n,a,o=!1){let s;typeof e=="string"?s=Ka(e):(s={...e},_t(!s.pathname||!s.pathname.includes("?"),M0("?","pathname","search",s)),_t(!s.pathname||!s.pathname.includes("#"),M0("#","pathname","hash",s)),_t(!s.search||!s.search.includes("#"),M0("#","search","hash",s)));let u=e===""||s.pathname==="",c=u?"/":s.pathname,d;if(c==null)d=a;else{let h=n.length-1;if(!o&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),h-=1;s.pathname=b.join("/")}d=h>=0?n[h]:"/"}let p=p5(s,d),g=c&&c!=="/"&&c.endsWith("/"),y=(u||c===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(g||y)&&(p.pathname+="/"),p}var yv=e=>e.replace(/[\\/]{2,}/g,"/"),Aa=e=>yv(e.join("/"));function Ll(e,n=0){let a=e.length;for(;a>n&&e.charCodeAt(a-1)===47;)a--;return a===e.length?e:e.slice(0,a)}var g5=e=>Ll(e).replace(/^\/*/,"/"),m5=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,y5=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,v5=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_c=class{constructor(e,n,a,o=!1){this.status=e,this.statusText=n||"",this.internal=o,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function bc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Hc(e){let n=e.map(a=>a.route.path).filter(Boolean);return Aa(n)||"/"}var IT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function jT(e,n){let a=e;if(typeof a!="string"||!hp.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let o=a,s=!1;if(IT)try{let u=new URL(window.location.href),c=pp.test(a)?new URL(RT(a,u.protocol)):new URL(a),d=Na(c.pathname,n);c.origin===u.origin&&d!=null?a=d+c.search+c.hash:s=!0}catch{Un(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:s,to:a}}var Ei=Symbol("Uninstrumented");function b5(e,n){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(s=>s({id:n.id,index:n.index,path:n.path,instrument(u){let c=Object.keys(a);for(let d of c)u[d]&&a[d].push(u[d])}}));let o={};if(typeof n.lazy=="function"&&a.lazy.length>0){let s=bl(a.lazy,n.lazy,()=>{});s&&(o.lazy=s)}if(typeof n.lazy=="object"){let s=n.lazy;["middleware","loader","action"].forEach(u=>{let c=s[u],d=a[`lazy.${u}`];if(typeof c=="function"&&d.length>0){let p=bl(d,c,()=>{});p&&(o.lazy=Object.assign(o.lazy||{},{[u]:p}))}})}return["loader","action"].forEach(s=>{let u=n[s];if(typeof u=="function"&&a[s].length>0){let c=u[Ei]??u,d=bl(a[s],c,(...p)=>Tw(p[0]));d&&(s==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[Ei]=c,o[s]=d)}}),n.middleware&&n.middleware.length>0&&a.middleware.length>0&&(o.middleware=n.middleware.map(s=>{let u=s[Ei]??s,c=bl(a.middleware,u,(...d)=>Tw(d[0]));return c?(c[Ei]=u,c):s})),o}function x5(e,n){let a={navigate:[],fetch:[]};if(n.forEach(o=>o({instrument(s){let u=Object.keys(s);for(let c of u)s[c]&&a[c].push(s[c])}})),a.navigate.length>0){let o=e.navigate[Ei]??e.navigate,s=bl(a.navigate,o,(...u)=>{let[c,d]=u;return{to:typeof c=="number"||typeof c=="string"?c:c?Lr(c):".",...Ow(e,d??{})}});s&&(s[Ei]=o,e.navigate=s)}if(a.fetch.length>0){let o=e.fetch[Ei]??e.fetch,s=bl(a.fetch,o,(...u)=>{let[c,,d,p]=u;return{href:d??".",fetcherKey:c,...Ow(e,p??{})}});s&&(s[Ei]=o,e.fetch=s)}return e}function bl(e,n,a){return e.length===0?null:async(...o)=>{let s=await kT(e,a(...o),()=>n(...o),e.length-1);if(s.type==="error")throw s.value;return s.value}}async function kT(e,n,a,o){let s=e[o],u;if(s){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=kT(e,n,a,o-1),u=await c,_t(u,"Expected a result"),u.type==="error"&&u.value instanceof Error?{status:"error",error:u.value}:{status:"success",error:void 0});try{await s(d,n)}catch(p){console.error("An instrumentation function threw an error:",p)}c||await d(),await c}else try{u={type:"success",value:await a()}}catch(c){u={type:"error",value:c}}return u||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Tw(e){let{request:n,context:a,params:o,pattern:s}=e;return{request:S5(n),params:{...o},pattern:s,context:w5(a)}}function Ow(e,n){return{currentUrl:Lr(e.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function S5(e){return{method:e.method,url:e.url,headers:{get:(...n)=>e.headers.get(...n)}}}function w5(e){if(E5(e)){let n={...e};return Object.freeze(n),n}else return{get:n=>e.get(n)}}var R5=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function E5(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===R5}var Mw=new URL("http://localhost");function vv(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Mw)}catch{return Mw}}function A0(e,n){return e.origin===n.origin&&(e.origin!=="null"||e.protocol===n.protocol&&e.host===n.host)}function C5(e,n){if(e.startsWith("//"))return!0;let a=n.protocol.toLowerCase();return e.toLowerCase().startsWith(a)?n.host===""||e.slice(a.length).startsWith("//"):!1}function Ol(e,n,a,o){let s=null;try{s=e==null?null:new URL(e,a)}catch{}let u=new URL(n,a),c=s!=null&&!A0(s,a),d=!A0(u,a);if(o==="reject"){if(c||d)throw new Error("External navigation is not allowed")}else if(d&&(s==null||!C5(e,s)||!A0(s,u)))throw new Error("External navigation is not allowed")}var PT=["POST","PUT","PATCH","DELETE"],T5=new Set(PT),O5=["GET",...PT],M5=new Set(O5),LT=new Set([301,302,303,307,308]),A5=new Set([307,308]),D0={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},D5={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gu={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},N5=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),zT="remix-router-transitions",_T=Symbol("ResetLoaderData"),ls,gl,bi,ml,I5=class{constructor(e){Wu(this,ls),Wu(this,gl),Wu(this,bi),Wu(this,ml),io(this,ls,e),io(this,gl,Xf(e))}get stableRoutes(){return Ea(this,ls)}get activeRoutes(){return Ea(this,bi)??Ea(this,ls)}get branches(){return Ea(this,ml)??Ea(this,gl)}get hasHMRRoutes(){return Ea(this,bi)!=null}setRoutes(e){io(this,ls,e),io(this,gl,Xf(e))}setHmrRoutes(e){io(this,bi,e),io(this,ml,Xf(e))}commitHmrRoutes(){Ea(this,bi)&&(io(this,ls,Ea(this,bi)),io(this,gl,Ea(this,ml)),io(this,bi,void 0),io(this,ml,void 0))}};ls=new WeakMap;gl=new WeakMap;bi=new WeakMap;ml=new WeakMap;function j5(e){const n=e.window?e.window:typeof window<"u"?window:void 0,a=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";_t(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=e.hydrationRouteProperties||[],s=e.mapRouteProperties||N5,u=s;if(e.instrumentations){let H=e.instrumentations;u=Z=>({...s(Z),...b5(H.map(ne=>ne.route).filter(Boolean),Z)})}let c={},d=new I5(vc(e.routes,u,void 0,c)),p=e.basename||"/";p.startsWith("/")||(p=`/${p}`);let g=e.dataStrategy||_5,y={...e.future},h=null,b=new Set,x=null,w=null,C=null,R=null,T=e.hydrationData!=null,O=Ua(d.activeRoutes,e.history.location,p,!1,d.branches),M=!1,A=null,I,j;if(O==null&&!e.patchRoutesOnNavigation){let H=Ca(404,{pathname:e.history.location.pathname}),{matches:Z,route:ne}=Af(d.activeRoutes);I=!0,j=!I,O=Z,A={[ne.id]:H}}else if(O&&!e.hydrationData&&ke(O,d.activeRoutes,e.history.location.pathname).active&&(O=null),O)if(O.some(H=>H.route.lazy))I=!1,j=!I;else if(!O.some(H=>bv(H.route)))I=!0,j=!I;else{let H=e.hydrationData?e.hydrationData.loaderData:null,Z=e.hydrationData?e.hydrationData.errors:null,ne=O;if(Z){let ye=O.findIndex(xe=>Z[xe.route.id]!==void 0);ne=ne.slice(0,ye+1)}j=!1,I=!0,ne.forEach(ye=>{let xe=HT(ye.route,H,Z);j=j||xe.renderFallback,I=I&&!xe.shouldLoad})}else{I=!1,j=!I,O=[];let H=ke(null,d.activeRoutes,e.history.location.pathname);H.active&&H.matches&&(M=!0,O=H.matches)}let k,D={historyAction:e.history.action,location:e.history.location,matches:O,initialized:I,renderFallback:j,navigation:D0,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||A,fetchers:new Map,blockers:new Map},z="POP",F=null,G=!1,J,Y=!1,U=new Map,_=null,L=!1,$=!1,K=new Set,V=new Map,X=0,ee=-1,q=new Map,se=new Set,N=new Map,B=new Map,W=new Set,re=new Map,Re,le=null;function me(){if(h=e.history.listen(({action:H,location:Z,delta:ne})=>{if(Re){Re(),Re=void 0;return}Un(re.size===0||ne!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ye=vt({currentLocation:D.location,nextLocation:Z,historyAction:H});if(ye&&ne!=null){let xe=new Promise(qe=>{Re=qe});e.history.go(ne*-1),ft(ye,{state:"blocked",location:Z,proceed(){ft(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:Z}),xe.then(()=>e.history.go(ne))},reset(){let qe=new Map(D.blockers);qe.set(ye,Gu),Te({blockers:qe})}}),F?.resolve(),F=null;return}return Le(H,Z)}),a){rL(n,U);let H=()=>aL(n,U);n.addEventListener("pagehide",H),_=()=>n.removeEventListener("pagehide",H)}return D.initialized||Le("POP",D.location,{initialHydration:!0}),k}function ge(){h&&h(),_&&_(),b.clear(),J&&J.abort(),D.fetchers.forEach((H,Z)=>Ot(D.fetchers,Z)),D.blockers.forEach((H,Z)=>$t(Z))}function ce(H){if(b.add(H),x){let{newErrors:Z}=x;x=null,H(D,{deletedFetchers:[],newErrors:Z,viewTransitionOpts:void 0,flushSync:!1})}return()=>b.delete(H)}function Te(H,Z={}){H.matches&&(H.matches=H.matches.map(xe=>{let qe=c[xe.route.id],Ve=xe.route;return Ve.element!==qe.element||Ve.errorElement!==qe.errorElement||Ve.hydrateFallbackElement!==qe.hydrateFallbackElement?{...xe,route:qe}:xe})),D={...D,...H};let ne=[],ye=[];D.fetchers.forEach((xe,qe)=>{xe.state==="idle"&&(W.has(qe)?ne.push(qe):ye.push(qe))}),W.forEach(xe=>{!D.fetchers.has(xe)&&!V.has(xe)&&ne.push(xe)}),b.size===0&&(x={newErrors:H.errors??null}),[...b].forEach(xe=>xe(D,{deletedFetchers:ne,newErrors:H.errors??null,viewTransitionOpts:Z.viewTransitionOpts,flushSync:Z.flushSync===!0})),ne.forEach(xe=>Ot(D.fetchers,xe)),ye.forEach(xe=>D.fetchers.delete(xe))}function ve(H,Z,{flushSync:ne}={}){let ye=D.actionData!=null&&D.navigation.formMethod!=null&&Er(D.navigation.formMethod)&&D.navigation.state==="loading"&&H.state?._isRedirect!==!0,xe;Z.actionData?Object.keys(Z.actionData).length>0?xe=Z.actionData:xe=null:ye?xe=D.actionData:xe=null;let qe=Z.loaderData?_w(D.loaderData,Z.loaderData,Z.matches||[],Z.errors):D.loaderData,Ve=D.blockers;Ve.size>0&&(Ve=new Map(Ve),Ve.forEach((tt,St)=>Ve.set(St,Gu)));let Xe=L?!1:ot(H,Z.matches||D.matches),$e=G===!0||D.navigation.formMethod!=null&&Er(D.navigation.formMethod)&&H.state?._isRedirect!==!0;d.commitHmrRoutes(),L||z==="POP"||(z==="PUSH"?e.history.push(H,H.state):z==="REPLACE"&&e.history.replace(H,H.state));let st;if(z==="POP"&&!L&&H!==D.location){let tt=U.get(D.location.pathname);tt&&tt.has(H.pathname)?st={currentLocation:D.location,nextLocation:H}:U.has(H.pathname)&&(st={currentLocation:H,nextLocation:D.location})}else if(Y){let tt=U.get(D.location.pathname);tt?tt.add(H.pathname):(tt=new Set([H.pathname]),U.set(D.location.pathname,tt)),st={currentLocation:D.location,nextLocation:H}}Te({...Z,actionData:xe,loaderData:qe,historyAction:z,location:H,initialized:!0,renderFallback:!1,navigation:D0,revalidation:"idle",restoreScrollPosition:Xe,preventScrollReset:$e,blockers:Ve},{viewTransitionOpts:st,flushSync:ne===!0}),z="POP",G=!1,Y=!1,L=!1,$=!1,F?.resolve(),F=null,le?.resolve(),le=null}async function Pe(H,Z){if(F?.resolve(),F=null,typeof H=="number"){F||(F=Bw());let Ht=F.promise;return e.history.go(H),Ht}let ne=uy(D.location,D.matches,p,H,Z?.fromRouteId,Z?.relative),{path:ye,submission:xe,error:qe}=Aw(!1,ne,Z),Ve;if(Z?.mask){let Ht=typeof Z.mask=="string"?Ka(Z.mask):{...D.location.mask,...Z.mask};if(Ve={pathname:Ht.pathname??"",search:Ht.search??"",hash:Ht.hash??""},pp.test(Ve.pathname))throw new Error("External navigation is not allowed");Ve.pathname.startsWith("\\")&&(Ve.pathname=Ve.pathname.replace(/^\\+/,"/")),Ol(typeof Z.mask=="string"?Z.mask:Lr(Z.mask),Lr(Ve),e.history.createURL("/"),"reject")}let Xe=D.location,$e=yc(Xe,ye,Z&&Z.state,void 0,Ve);$e={...$e,...e.history.encodeLocation($e)},Ol(H==null?e.history.createHref(D.location):typeof H=="string"?H:Lr(H),e.history.createHref($e.mask||$e),e.history.createURL("/"),"reject");let st=Z&&Z.replace!=null?Z.replace:void 0,tt="PUSH";st===!0?tt="REPLACE":st===!1||xe!=null&&Er(xe.formMethod)&&xe.formAction===D.location.pathname+D.location.search&&(tt="REPLACE");let St=Z&&"preventScrollReset"in Z?Z.preventScrollReset===!0:void 0,ct=(Z&&Z.flushSync)===!0,Bt=vt({currentLocation:Xe,nextLocation:$e,historyAction:tt});if(Bt){ft(Bt,{state:"blocked",location:$e,proceed(){ft(Bt,{state:"proceeding",proceed:void 0,reset:void 0,location:$e}),Pe(H,Z)},reset(){let Ht=new Map(D.blockers);Ht.set(Bt,Gu),Te({blockers:Ht})}});return}await Le(tt,$e,{submission:xe,pendingError:qe,preventScrollReset:St,replace:Z&&Z.replace,enableViewTransition:Z&&Z.viewTransition,flushSync:ct,callSiteDefaultShouldRevalidate:Z&&Z.defaultShouldRevalidate})}function Me(){le||(le=Bw()),De(),Te({revalidation:"loading"});let H=le.promise;return D.navigation.state==="submitting"?H:D.navigation.state==="idle"?(Le(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),H):(Le(z||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:Y===!0}),H)}async function Le(H,Z,ne){J&&J.abort(),J=null,z=H,L=(ne&&ne.startUninterruptedRevalidation)===!0,je(D.location,D.matches),G=(ne&&ne.preventScrollReset)===!0,Y=(ne&&ne.enableViewTransition)===!0;let ye=d.activeRoutes,xe=ne?.initialHydration&&D.matches&&D.matches.length>0&&!M?D.matches:Ua(ye,Z,p,!1,d.branches),qe=(ne&&ne.flushSync)===!0;if(xe&&D.initialized&&!$&&G5(D.location,Z)&&!(ne&&ne.submission&&Er(ne.submission.formMethod))){ve(Z,{matches:xe},{flushSync:qe});return}let Ve=ke(xe,ye,Z.pathname);if(Ve.active&&Ve.matches&&(xe=Ve.matches),!xe){let{error:Vt,notFoundMatches:Ut,route:En}=gt(Z.pathname);ve(Z,{matches:Ut,loaderData:{},errors:{[En.id]:Vt}},{flushSync:qe});return}let Xe=ne&&ne.overrideNavigation?{...ne.overrideNavigation,matches:xe,historyAction:H}:void 0;J=new AbortController;let $e=yl(e.history,Z,J.signal,ne&&ne.submission),st=e.getContext?await e.getContext():new ww,tt;if(ne&&ne.pendingError)tt=[wi(xe).route.id,{type:"error",error:ne.pendingError}];else if(ne&&ne.submission&&Er(ne.submission.formMethod)){let Vt=await Fe($e,Z,ne.submission,xe,H,st,Ve.active,ne&&ne.initialHydration===!0,{replace:ne.replace,flushSync:qe});if(Vt.shortCircuited)return;if(Vt.pendingActionResult){let[Ut,En]=Vt.pendingActionResult;if(ua(En)&&bc(En.error)&&En.error.status===404){J=null,ve(Z,{matches:Vt.matches,loaderData:{},errors:{[Ut]:En.error}});return}}xe=Vt.matches||xe,tt=Vt.pendingActionResult,Xe=N0(Z,xe,H,ne.submission),qe=!1,Ve.active=!1,$e=yl(e.history,$e.url,$e.signal)}let{shortCircuited:St,matches:ct,loaderData:Bt,errors:Ht,workingFetchers:On}=await Oe($e,Z,xe,H,st,Ve.active,Xe,ne&&ne.submission,ne&&ne.fetcherSubmission,ne&&ne.replace,ne&&ne.initialHydration===!0,qe,tt,ne&&ne.callSiteDefaultShouldRevalidate);St||(J=null,ve(Z,{matches:ct||xe,...Hw(tt),loaderData:Bt,errors:Ht,...On?{fetchers:On}:{}}))}async function Fe(H,Z,ne,ye,xe,qe,Ve,Xe,$e={}){De();let st=tL(Z,ye,xe,ne);if(Te({navigation:st},{flushSync:$e.flushSync===!0}),Ve){let ct=await ze(ye,Z.pathname,H.signal);if(ct.type==="aborted")return{shortCircuited:!0};if(ct.type==="error"){if(ct.partialMatches.length===0){let{matches:Ht,route:On}=Af(d.activeRoutes);return{matches:Ht,pendingActionResult:[On.id,{type:"error",error:ct.error}]}}let Bt=wi(ct.partialMatches).route.id;return{matches:ct.partialMatches,pendingActionResult:[Bt,{type:"error",error:ct.error}]}}else if(ct.matches)ye=ct.matches;else{let{notFoundMatches:Bt,error:Ht,route:On}=gt(Z.pathname);return{matches:Bt,pendingActionResult:[On.id,{type:"error",error:Ht}]}}}let tt,St=Qf(ye,Z);if(!St.route.action&&!St.route.lazy)tt={type:"error",error:Ca(405,{method:H.method,pathname:Z.pathname,routeId:St.route.id})};else{let ct=Ml(u,c,H,Z,ye,St,Xe?[]:o,qe),Bt=await we(H,Z,ct,qe,null);if(tt=Bt[St.route.id],!tt){for(let Ht of ye)if(Bt[Ht.route.id]){tt=Bt[Ht.route.id];break}}if(H.signal.aborted)return{shortCircuited:!0}}if(ds(tt)){let ct;return $e&&$e.replace!=null?ct=$e.replace:ct=Pw(tt.response.headers.get("Location"),new URL(H.url),p,e.history)===D.location.pathname+D.location.search,await de(H,tt,!0,{submission:ne,replace:ct}),{shortCircuited:!0}}if(ua(tt)){let ct=wi(ye,St.route.id);return($e&&$e.replace)!==!0&&(z="PUSH"),{matches:ye,pendingActionResult:[ct.route.id,tt,St.route.id]}}return{matches:ye,pendingActionResult:[St.route.id,tt]}}async function Oe(H,Z,ne,ye,xe,qe,Ve,Xe,$e,st,tt,St,ct,Bt){let Ht=Ve||N0(Z,ne,ye,Xe),On=Xe||$e||Fw(Ht),Vt=!L&&!tt;if(qe){if(Vt){let Yn=He(ct);Te({navigation:Ht,...Yn!==void 0?{actionData:Yn}:{}},{flushSync:St})}let kt=await ze(ne,Z.pathname,H.signal);if(kt.type==="aborted")return{shortCircuited:!0};if(kt.type==="error"){if(kt.partialMatches.length===0){let{matches:Fn,route:fr}=Af(d.activeRoutes);return{matches:Fn,loaderData:{},errors:{[fr.id]:kt.error}}}let Yn=wi(kt.partialMatches).route.id;return{matches:kt.partialMatches,loaderData:{},errors:{[Yn]:kt.error}}}else if(kt.matches)ne=kt.matches;else{let{error:Yn,notFoundMatches:Fn,route:fr}=gt(Z.pathname);return{matches:Fn,loaderData:{},errors:{[fr.id]:Yn}}}}let Ut=d.activeRoutes,{dsMatches:En,revalidatingFetchers:Cn}=Dw(H,xe,u,c,e.history,D,ne,On,Z,tt?[]:o,tt===!0,$,K,W,N,se,Ut,p,e.patchRoutesOnNavigation!=null,d.branches,ct,Bt);if(ee=++X,!e.dataStrategy&&!En.some(kt=>kt.shouldLoad)&&!En.some(kt=>kt.route.middleware&&kt.route.middleware.length>0)&&Cn.length===0){let kt=new Map(D.fetchers),Yn=Wt(kt);return ve(Z,{matches:ne,loaderData:{},errors:ct&&ua(ct[1])?{[ct[0]]:ct[1].error}:null,...Hw(ct),...Yn?{fetchers:kt}:{}},{flushSync:St}),{shortCircuited:!0}}if(Vt){let kt={};if(!qe){kt.navigation=Ht;let Yn=He(ct);Yn!==void 0&&(kt.actionData=Yn)}Cn.length>0&&(kt.fetchers=be(Cn)),Te(kt,{flushSync:St})}Cn.forEach(kt=>{Jt(kt.key),kt.controller&&V.set(kt.key,kt.controller)});let Xr=()=>Cn.forEach(kt=>Jt(kt.key));J&&J.signal.addEventListener("abort",Xr);let{loaderResults:cn,fetcherResults:dn}=await Ke(En,Cn,H,Z,xe);if(H.signal.aborted)return{shortCircuited:!0};J&&J.signal.removeEventListener("abort",Xr),Cn.forEach(kt=>V.delete(kt.key));let Mn=Df(cn);if(Mn)return await de(H,Mn.result,!0,{replace:st}),{shortCircuited:!0};if(Mn=Df(dn),Mn)return se.add(Mn.key),await de(H,Mn.result,!0,{replace:st}),{shortCircuited:!0};let In=new Map(D.fetchers),{loaderData:vo,errors:Or}=zw(D,ne,cn,ct,Cn,dn,In);tt&&D.errors&&(Or={...D.errors,...Or});let ja=Wt(In),Qr=We(ee,In),pa=ja||Qr||Cn.length>0;return{matches:ne,loaderData:vo,errors:Or,...pa?{workingFetchers:In}:{}}}function He(H){if(H&&!ua(H[1]))return{[H[0]]:H[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function be(H){let Z=new Map(D.fetchers);return H.forEach(ne=>{let ye=Z.get(ne.key),xe=$u(void 0,ye?ye.data:void 0);Z.set(ne.key,xe)}),Z}async function Ue(H,Z,ne,ye){Jt(H);let xe=(ye&&ye.flushSync)===!0,qe=d.activeRoutes,Ve=uy(D.location,D.matches,p,ne,Z,ye?.relative),Xe=Ua(qe,Ve,p,!1,d.branches),$e=ke(Xe,qe,Ve);if($e.active&&$e.matches&&(Xe=$e.matches),!Xe){yt(H,Z,Ca(404,{pathname:Ve}),{flushSync:xe});return}let{path:st,submission:tt,error:St}=Aw(!0,Ve,ye);if(St){yt(H,Z,St,{flushSync:xe});return}let ct=e.getContext?await e.getContext():new ww,Bt=(ye&&ye.preventScrollReset)===!0;if(tt&&Er(tt.formMethod)){await Ze(H,Z,st,Xe,ct,$e.active,xe,Bt,tt,ye&&ye.defaultShouldRevalidate);return}N.set(H,{routeId:Z,path:st}),await it(H,Z,st,Xe,ct,$e.active,xe,Bt,tt)}async function Ze(H,Z,ne,ye,xe,qe,Ve,Xe,$e,st){De(),N.delete(H);let tt=D.fetchers.get(H);Ie(H,nL($e,tt),{flushSync:Ve});let St=new AbortController,ct=yl(e.history,ne,St.signal,$e);if(qe){let Se=await ze(ye,new URL(ct.url).pathname,ct.signal,H);if(Se.type==="aborted")return;if(Se.type==="error"){yt(H,Z,Se.error,{flushSync:Ve});return}else if(Se.matches)ye=Se.matches;else{yt(H,Z,Ca(404,{pathname:ne}),{flushSync:Ve});return}}let Bt=Qf(ye,ne);if(!Bt.route.action&&!Bt.route.lazy){let Se=Ca(405,{method:$e.formMethod,pathname:ne,routeId:Z});yt(H,Z,Se,{flushSync:Ve});return}V.set(H,St);let Ht=X,On=Ml(u,c,ct,ne,ye,Bt,o,xe),Vt=await we(ct,ne,On,xe,H),Ut=Vt[Bt.route.id];if(!Ut){for(let Se of On)if(Vt[Se.route.id]){Ut=Vt[Se.route.id];break}}if(ct.signal.aborted){V.get(H)===St&&V.delete(H);return}if(W.has(H)){if(ds(Ut)||ua(Ut)){Ie(H,so(void 0));return}}else{if(ds(Ut))if(V.delete(H),ee>Ht){Ie(H,so(void 0));return}else return se.add(H),Ie(H,$u($e)),de(ct,Ut,!1,{fetcherSubmission:$e,preventScrollReset:Xe});if(ua(Ut)){yt(H,Z,Ut.error);return}}let En=D.navigation.location||D.location,Cn=yl(e.history,En,St.signal),Xr=d.activeRoutes,cn=D.navigation.state!=="idle"?Ua(Xr,D.navigation.location,p,!1,d.branches):D.matches;_t(cn,"Didn't find any matches after fetcher action");let dn=++X;q.set(H,dn);let{dsMatches:Mn,revalidatingFetchers:In}=Dw(Cn,xe,u,c,e.history,D,cn,$e,En,o,!1,$,K,W,N,se,Xr,p,e.patchRoutesOnNavigation!=null,d.branches,[Bt.route.id,Ut],st),vo=$u($e,Ut.data),Or=new Map(D.fetchers);Or.set(H,vo),In.filter(Se=>Se.key!==H).forEach(Se=>{let nt=Se.key,Ct=Or.get(nt),wt=$u(void 0,Ct?Ct.data:void 0);Or.set(nt,wt),Jt(nt),Se.controller&&V.set(nt,Se.controller)}),Te({fetchers:Or});let ja=()=>In.forEach(Se=>Jt(Se.key));St.signal.addEventListener("abort",ja);let{loaderResults:Qr,fetcherResults:pa}=await Ke(Mn,In,Cn,En,xe);if(St.signal.aborted)return;St.signal.removeEventListener("abort",ja),q.delete(H),V.delete(H),In.forEach(Se=>V.delete(Se.key));let kt=D.fetchers.has(H),Yn=Se=>{if(!kt)return Se;let nt=new Map(Se.fetchers);return nt.set(H,so(Ut.data)),{...Se,fetchers:nt}},Fn=Df(Qr);if(Fn)return D=Yn(D),de(Cn,Fn.result,!1,{preventScrollReset:Xe});if(Fn=Df(pa),Fn)return se.add(Fn.key),D=Yn(D),de(Cn,Fn.result,!1,{preventScrollReset:Xe});let fr=new Map(D.fetchers);kt&&fr.set(H,so(Ut.data));let{loaderData:he,errors:Ae}=zw(D,cn,Qr,void 0,In,pa,fr);We(dn,fr),D.navigation.state==="loading"&&dn>ee?(_t(z,"Expected pending action"),J&&J.abort(),ve(D.navigation.location,{matches:cn,loaderData:he,errors:Ae,fetchers:fr})):(Te({errors:Ae,loaderData:_w(D.loaderData,he,cn,Ae),fetchers:fr}),$=!1)}async function it(H,Z,ne,ye,xe,qe,Ve,Xe,$e){let st=D.fetchers.get(H);Ie(H,$u($e,st?st.data:void 0),{flushSync:Ve});let tt=new AbortController,St=yl(e.history,ne,tt.signal);if(qe){let Ut=await ze(ye,new URL(St.url).pathname,St.signal,H);if(Ut.type==="aborted")return;if(Ut.type==="error"){yt(H,Z,Ut.error,{flushSync:Ve});return}else if(Ut.matches)ye=Ut.matches;else{yt(H,Z,Ca(404,{pathname:ne}),{flushSync:Ve});return}}let ct=Qf(ye,ne);V.set(H,tt);let Bt=X,Ht=Ml(u,c,St,ne,ye,ct,o,xe),On=await we(St,ne,Ht,xe,H),Vt=On[ct.route.id];if(!Vt){for(let Ut of ye)if(On[Ut.route.id]){Vt=On[Ut.route.id];break}}if(V.get(H)===tt&&V.delete(H),!St.signal.aborted){if(W.has(H)){Ie(H,so(void 0));return}if(ds(Vt))if(ee>Bt){Ie(H,so(void 0));return}else{se.add(H),await de(St,Vt,!1,{preventScrollReset:Xe});return}if(ua(Vt)){yt(H,Z,Vt.error);return}Ie(H,so(Vt.data))}}async function de(H,Z,ne,{submission:ye,fetcherSubmission:xe,preventScrollReset:qe,replace:Ve}={}){ne||(F?.resolve(),F=null),Z.response.headers.has("X-Remix-Revalidate")&&($=!0);let Xe=Z.response.headers.get("Location");_t(Xe,"Expected a Location header on the redirect Response");let $e=Xe,st=new URL(H.url);Xe=Pw(Xe,st,p,e.history),Ol($e,Xe,st,"allow-explicit");let tt=yc(D.location,Xe,{_isRedirect:!0});if(a){let Vt=!1;if(Z.response.headers.has("X-Remix-Reload-Document"))Vt=!0;else if(mv(Xe)){const Ut=ET(n,Xe,!0);Vt=Ut.origin!==n.location.origin||Na(Ut.pathname,p)==null}if(Vt){Ve?n.location.replace(Xe):n.location.assign(Xe);return}}J=null;let St=Ve===!0||Z.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ct,formAction:Bt,formEncType:Ht}=D.navigation;!ye&&!xe&&ct&&Bt&&Ht&&(ye=Fw(D.navigation));let On=ye||xe;if(A5.has(Z.response.status)&&On&&Er(On.formMethod))await Le(St,tt,{submission:{...On,formAction:Xe},preventScrollReset:qe||G,enableViewTransition:ne?Y:void 0});else{let Vt=N0(tt,[],St,ye);await Le(St,tt,{overrideNavigation:Vt,fetcherSubmission:xe,preventScrollReset:qe||G,enableViewTransition:ne?Y:void 0})}}async function we(H,Z,ne,ye,xe){let qe,Ve={};try{qe=await U5(g,H,Z,ne,xe,ye,!1)}catch(Xe){return ne.filter($e=>$e.shouldLoad).forEach($e=>{Ve[$e.route.id]={type:"error",error:Xe}}),Ve}if(H.signal.aborted)return Ve;if(!Er(H.method))for(let Xe of ne){if(qe[Xe.route.id]?.type==="error")break;!qe.hasOwnProperty(Xe.route.id)&&!D.loaderData.hasOwnProperty(Xe.route.id)&&(!D.errors||!D.errors.hasOwnProperty(Xe.route.id))&&Xe.shouldCallHandler()&&(qe[Xe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Xe.route.id}`)})}for(let[Xe,$e]of Object.entries(qe))if(Z5($e)){let st=$e.result;Ve[Xe]={type:"redirect",response:q5(st,H,Xe,ne,p)}}else Ve[Xe]=await V5($e);return Ve}async function Ke(H,Z,ne,ye,xe){let qe=we(ne,ye,H,xe,null),Ve=Promise.all(Z.map(async st=>{if(st.matches&&st.match&&st.request&&st.controller){let St=(await we(st.request,st.path,st.matches,xe,st.key))[st.match.route.id];return{[st.key]:St}}else return Promise.resolve({[st.key]:{type:"error",error:Ca(404,{pathname:st.path})}})})),Xe=await qe,$e=(await Ve).reduce((st,tt)=>Object.assign(st,tt),{});return{loaderResults:Xe,fetcherResults:$e}}function De(){$=!0,N.forEach((H,Z)=>{V.has(Z)&&K.add(Z),Jt(Z)})}function Ie(H,Z,ne={}){let ye=new Map(D.fetchers);ye.set(H,Z),Te({fetchers:ye},{flushSync:(ne&&ne.flushSync)===!0})}function yt(H,Z,ne,ye={}){let xe=wi(D.matches,Z),qe=new Map(D.fetchers);Ot(qe,H),Te({errors:{[xe.route.id]:ne},fetchers:qe},{flushSync:(ye&&ye.flushSync)===!0})}function ut(H){return B.set(H,(B.get(H)||0)+1),W.has(H)&&W.delete(H),D.fetchers.get(H)||D5}function ht(H,Z){Jt(H,Z?.reason),Ie(H,so(null))}function Ot(H,Z){let ne=D.fetchers.get(Z);V.has(Z)&&!(ne&&ne.state==="loading"&&q.has(Z))&&Jt(Z),N.delete(Z),q.delete(Z),se.delete(Z),W.delete(Z),K.delete(Z),H.delete(Z)}function Dt(H){let Z=(B.get(H)||0)-1;Z<=0?(B.delete(H),W.add(H)):B.set(H,Z),Te({fetchers:new Map(D.fetchers)})}function Jt(H,Z){let ne=V.get(H);ne&&(ne.abort(Z),V.delete(H))}function rn(H,Z){for(let ne of H){let ye=Z.get(ne);_t(ye,`Expected fetcher: ${ne}`);let xe=so(ye.data);Z.set(ne,xe)}}function Wt(H){let Z=[],ne=!1;for(let ye of se){let xe=H.get(ye);_t(xe,`Expected fetcher: ${ye}`),xe.state==="loading"&&(se.delete(ye),Z.push(ye),ne=!0)}return rn(Z,H),ne}function We(H,Z){let ne=[];for(let[ye,xe]of q)if(xe<H){let qe=Z.get(ye);_t(qe,`Expected fetcher: ${ye}`),qe.state==="loading"&&(Jt(ye),q.delete(ye),ne.push(ye))}return rn(ne,Z),ne.length>0}function xt(H,Z){let ne=D.blockers.get(H)||Gu;return re.get(H)!==Z&&re.set(H,Z),ne}function $t(H){D.blockers.delete(H),re.delete(H)}function ft(H,Z){let ne=D.blockers.get(H)||Gu;_t(ne.state==="unblocked"&&Z.state==="blocked"||ne.state==="blocked"&&Z.state==="blocked"||ne.state==="blocked"&&Z.state==="proceeding"||ne.state==="blocked"&&Z.state==="unblocked"||ne.state==="proceeding"&&Z.state==="unblocked",`Invalid blocker state transition: ${ne.state} -> ${Z.state}`);let ye=new Map(D.blockers);ye.set(H,Z),Te({blockers:ye})}function vt({currentLocation:H,nextLocation:Z,historyAction:ne}){if(re.size===0)return;re.size>1&&Un(!1,"A router only supports one blocker at a time");let ye=Array.from(re.entries()),[xe,qe]=ye[ye.length-1],Ve=D.blockers.get(xe);if(!(Ve&&Ve.state==="proceeding")&&qe({currentLocation:H,nextLocation:Z,historyAction:ne}))return xe}function gt(H){let Z=Ca(404,{pathname:H}),ne=d.activeRoutes,{matches:ye,route:xe}=Af(ne);return{notFoundMatches:ye,route:xe,error:Z}}function Lt(H,Z,ne){if(w=H,R=Z,C=ne||null,!T&&D.navigation===D0){T=!0;let ye=ot(D.location,D.matches);ye!=null&&Te({restoreScrollPosition:ye})}return()=>{w=null,R=null,C=null}}function un(H,Z){return C&&C(H,Z.map(ye=>TT(ye,D.loaderData)))||H.key}function je(H,Z){if(w&&R){let ne=un(H,Z);w[ne]=R()}}function ot(H,Z){if(w){let ne=un(H,Z),ye=w[ne];if(typeof ye=="number")return ye}return null}function ke(H,Z,ne){if(e.patchRoutesOnNavigation){let ye=d.branches;if(H){if(Object.keys(H[0].params).length>0)return{active:!0,matches:Ua(Z,ne,p,!0,ye)}}else return{active:!0,matches:Ua(Z,ne,p,!0,ye)||[]}}return{active:!1,matches:null}}async function ze(H,Z,ne,ye){if(!e.patchRoutesOnNavigation)return{type:"success",matches:H};let xe=H;for(;;){let qe=c;try{await e.patchRoutesOnNavigation({signal:ne,path:Z,matches:xe,fetcherKey:ye,patch:(st,tt)=>{ne.aborted||Nw(st,tt,d,qe,u,!1)}})}catch(st){return{type:"error",error:st,partialMatches:xe}}if(ne.aborted)return{type:"aborted"};let Ve=d.branches,Xe=Ua(d.activeRoutes,Z,p,!1,Ve),$e=null;if(Xe){if(Object.keys(Xe[0].params).length===0)return{type:"success",matches:Xe};if($e=Ua(d.activeRoutes,Z,p,!0,Ve),!($e&&xe.length<$e.length&&Ge(xe,$e.slice(0,xe.length))))return{type:"success",matches:Xe}}if($e||($e=Ua(d.activeRoutes,Z,p,!0,Ve)),!$e||Ge(xe,$e))return{type:"success",matches:null};xe=$e}}function Ge(H,Z){return H.length===Z.length&&H.every((ne,ye)=>ne.route.id===Z[ye].route.id)}function et(H){c={},d.setHmrRoutes(vc(H,u,void 0,c))}function Et(H,Z,ne=!1){Nw(H,Z,d,c,u,ne),d.hasHMRRoutes||Te({})}return k={get basename(){return p},get future(){return y},get state(){return D},get routes(){return d.stableRoutes},get branches(){return d.branches},get manifest(){return c},get window(){return n},initialize:me,subscribe:ce,enableScrollRestoration:Lt,navigate:Pe,fetch:Ue,revalidate:Me,createHref:H=>e.history.createHref(H),createURL:H=>e.history.createURL(H),encodeLocation:H=>e.history.encodeLocation(H),getFetcher:ut,resetFetcher:ht,deleteFetcher:Dt,dispose:ge,getBlocker:xt,deleteBlocker:$t,patchRoutes:Et,_internalFetchControllers:V,_internalSetRoutes:et,_internalSetStateDoNotUseOrYouWillBreakYourApp(H){Te(H)}},e.instrumentations&&(k=x5(k,e.instrumentations.map(H=>H.router).filter(Boolean))),k}function k5(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function uy(e,n,a,o,s,u){let c,d;if(s){c=[];for(let g of n)if(c.push(g),g.route.id===s){d=g;break}}else c=n,d=n[n.length-1];let p=zc(o||".",gp(c),Na(e.pathname,a)||e.pathname,u==="path");if(o==null&&(p.search=e.search,p.hash=e.hash),(o==null||o===""||o===".")&&d){let g=Sv(p.search);if(d.route.index&&!g)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&g){let y=new URLSearchParams(p.search),h=y.getAll("index");y.delete("index"),h.filter(x=>x).forEach(x=>y.append("index",x));let b=y.toString();p.search=b?`?${b}`:""}}return a!=="/"&&(p.pathname=h5({basename:a,pathname:p.pathname})),Lr(p)}function Aw(e,n,a){if(!a||!k5(a))return{path:n};if(a.formMethod&&!eL(a.formMethod))return{path:n,error:Ca(405,{method:a.formMethod})};let o=()=>({path:n,error:Ca(400,{type:"invalid-body"})}),u=(a.formMethod||"get").toUpperCase(),c=KT(n);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Er(u))return o();let h=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((b,[x,w])=>`${b}${x}=${w}
|
|
11
|
-
`,""):String(a.body);return{path:n,submission:{formMethod:u,formAction:c,formEncType:a.formEncType,formData:void 0,json:void 0,text:h}}}else if(a.formEncType==="application/json"){if(!Er(u))return o();try{let h=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:n,submission:{formMethod:u,formAction:c,formEncType:a.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}_t(typeof FormData=="function","FormData is not available in this environment");let d,p;if(a.formData)d=fy(a.formData),p=a.formData;else if(a.body instanceof FormData)d=fy(a.body),p=a.body;else if(a.body instanceof URLSearchParams)d=a.body,p=Lw(d);else if(a.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(a.body),p=Lw(d)}catch{return o()}let g={formMethod:u,formAction:c,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Er(g.formMethod))return{path:n,submission:g};let y=Ka(n);return e&&y.search&&Sv(y.search)&&d.append("index",""),y.search=`?${d}`,{path:Lr(y),submission:g}}function Dw(e,n,a,o,s,u,c,d,p,g,y,h,b,x,w,C,R,T,O,M,A,I){let j=A?ua(A[1])?A[1].error:A[1].data:void 0,k=s.createURL(u.location),D=s.createURL(p),z;if(y&&u.errors){let L=Object.keys(u.errors)[0];z=c.findIndex($=>$.route.id===L)}else if(A&&ua(A[1])){let L=A[0];z=c.findIndex($=>$.route.id===L)-1}let F=A?A[1].statusCode:void 0,G=F&&F>=400,J={currentUrl:k,currentParams:u.matches[0]?.params||{},nextUrl:D,nextParams:c[0].params,...d,actionResult:j,actionStatus:F},Y=Hc(c),U=c.map((L,$)=>{let{route:K}=L,V=null;if(z!=null&&$>z)V=!1;else if(K.lazy)V=!0;else if(!bv(K))V=!1;else if(y){let{shouldLoad:se}=HT(K,u.loaderData,u.errors);V=se}else P5(u.loaderData,u.matches[$],L)&&(V=!0);if(V!==null)return cy(a,o,e,p,Y,L,g,n,V);let X=!1;typeof I=="boolean"?X=I:G?X=!1:(h||k.pathname+k.search===D.pathname+D.search||k.search!==D.search||L5(u.matches[$],L))&&(X=!0);let ee={...J,defaultShouldRevalidate:X},q=ac(L,ee);return cy(a,o,e,p,Y,L,g,n,q,ee,I)}),_=[];return w.forEach((L,$)=>{if(y||!c.some(B=>B.route.id===L.routeId)||x.has($))return;let K=u.fetchers.get($),V=K&&K.state!=="idle"&&K.data===void 0,X=Ua(R,L.path,T??"/",!1,M);if(!X){if(O&&V)return;_.push({key:$,routeId:L.routeId,path:L.path,matches:null,match:null,request:null,controller:null});return}if(C.has($))return;let ee=Qf(X,L.path),q=new AbortController,se=yl(s,L.path,q.signal),N=null;if(b.has($))b.delete($),N=Ml(a,o,se,L.path,X,ee,g,n);else if(V)h&&(N=Ml(a,o,se,L.path,X,ee,g,n));else{let B;typeof I=="boolean"?B=I:G?B=!1:B=h;let W={...J,defaultShouldRevalidate:B};ac(ee,W)&&(N=Ml(a,o,se,L.path,X,ee,g,n,W))}N&&_.push({key:$,routeId:L.routeId,path:L.path,matches:N,match:ee,request:se,controller:q})}),{dsMatches:U,revalidatingFetchers:_}}function bv(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function HT(e,n,a){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!bv(e))return{shouldLoad:!1,renderFallback:!1};let o=n!=null&&e.id in n,s=a!=null&&a[e.id]!==void 0;if(!o&&s)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!o};let u=!o&&!s;return{shouldLoad:u,renderFallback:u}}function P5(e,n,a){let o=!n||a.route.id!==n.route.id,s=!e.hasOwnProperty(a.route.id);return o||s}function L5(e,n){let a=e.route.path;return e.pathname!==n.pathname||a!=null&&a.endsWith("*")&&e.params["*"]!==n.params["*"]}function ac(e,n){if(e.route.shouldRevalidate){let a=e.route.shouldRevalidate(n);if(typeof a=="boolean")return a}return n.defaultShouldRevalidate}function Nw(e,n,a,o,s,u){let c;if(e){let g=o[e];_t(g,`No route found to patch children into: routeId = ${e}`),g.children||(g.children=[]),c=g.children}else c=a.activeRoutes;let d=[],p=[];if(n.forEach(g=>{let y=c.find(h=>UT(g,h));y?p.push({existingRoute:y,newRoute:g}):d.push(g)}),d.length>0){let g=vc(d,s,[e||"_","patch",String(c?.length||"0")],o);c.push(...g)}if(u&&p.length>0)for(let g=0;g<p.length;g++){let{existingRoute:y,newRoute:h}=p[g],b=y,[x]=vc([h],s,[],{},!0);Object.assign(b,{element:x.element?x.element:b.element,errorElement:x.errorElement?x.errorElement:b.errorElement,hydrateFallbackElement:x.hydrateFallbackElement?x.hydrateFallbackElement:b.hydrateFallbackElement})}a.hasHMRRoutes||a.setRoutes([...a.activeRoutes])}function UT(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children?.every((a,o)=>n.children?.some(s=>UT(a,s)))??!1:!1}var Iw=new WeakMap,FT=({key:e,route:n,manifest:a,mapRouteProperties:o})=>{let s=a[n.id];if(_t(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let u=s.lazy[e];if(!u)return;let c=Iw.get(s);c||(c={},Iw.set(s,c));let d=c[e];if(d)return d;let p=(async()=>{let g=JP(e),h=s[e]!==void 0&&e!=="hasErrorBoundary";if(g)Un(!g,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),c[e]=Promise.resolve();else if(h)Un(!1,`Route "${s.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let b=await u();b!=null&&(Object.assign(s,{[e]:b}),Object.assign(s,o(s)))}typeof s.lazy=="object"&&(s.lazy[e]=void 0,Object.values(s.lazy).every(b=>b===void 0)&&(s.lazy=void 0))})();return c[e]=p,p},jw=new WeakMap;function z5(e,n,a,o,s){let u=a[e.id];if(_t(u,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let y=jw.get(u);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let h=(async()=>{_t(typeof e.lazy=="function","No lazy route function found");let b=await e.lazy(),x={};for(let w in b){let C=b[w];if(C===void 0)continue;let R=e5(w),O=u[w]!==void 0&&w!=="hasErrorBoundary";R?Un(!R,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?Un(!O,`Route "${u.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):x[w]=C}Object.assign(u,x),Object.assign(u,{...o(u),lazy:void 0})})();return jw.set(u,h),h.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:h}}let c=Object.keys(e.lazy),d=[],p;for(let y of c){if(s&&s.includes(y))continue;let h=FT({key:y,route:e,manifest:a,mapRouteProperties:o});h&&(d.push(h),y===n&&(p=h))}let g=d.length>0?Promise.all(d).then(()=>{}):void 0;return g?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:p}}async function kw(e){let n=e.matches.filter(s=>s.shouldLoad),a={};return(await Promise.all(n.map(s=>s.resolve()))).forEach((s,u)=>{a[n[u].route.id]=s}),a}async function _5(e){return e.matches.some(n=>n.route.middleware)?BT(e,()=>kw(e)):kw(e)}function BT(e,n){return H5(e,n,o=>{if(W5(o))throw o;return o},X5,a);function a(o,s,u){if(u)return Promise.resolve(Object.assign(u.value,{[s]:{type:"error",result:o}}));{let{matches:c}=e,d=Math.min(Math.max(c.findIndex(g=>g.route.id===s),0),Math.max(c.findIndex(g=>g.shouldCallHandler()),0)),p=wi(c,c[d].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:o}})}}}async function H5(e,n,a,o,s){let{matches:u,...c}=e,d=u.flatMap(g=>g.route.middleware?g.route.middleware.map(y=>[g.route.id,y]):[]);return await VT(c,d,n,a,o,s)}async function VT(e,n,a,o,s,u,c=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let p=n[c];if(!p)return await a();let[g,y]=p,h,b=async()=>{if(h)throw new Error("You may only call `next()` once per middleware");try{return h={value:await VT(e,n,a,o,s,u,c+1)},h.value}catch(x){return h={value:await u(x,g,h)},h.value}};try{let x=await y(e,b),w=x!=null?o(x):void 0;return s(w)?w:h?w??h.value:(h={value:await b()},h.value)}catch(x){return await u(x,g,h)}}function qT(e,n,a,o,s){let u=FT({key:"middleware",route:o.route,manifest:n,mapRouteProperties:e}),c=z5(o.route,Er(a.method)?"action":"loader",n,e,s);return{middleware:u,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function cy(e,n,a,o,s,u,c,d,p,g=null,y){let h=!1,b=qT(e,n,a,u,c);return{...u,_lazyPromises:b,shouldLoad:p,shouldRevalidateArgs:g,shouldCallHandler(x){return h=!0,g?typeof y=="boolean"?ac(u,{...g,defaultShouldRevalidate:y}):typeof x=="boolean"?ac(u,{...g,defaultShouldRevalidate:x}):ac(u,g):p},resolve(x){let{lazy:w,loader:C,middleware:R}=u.route,T=h||p||x&&!Er(a.method)&&(w||C),O=R&&R.length>0&&!C&&!w;return T&&(Er(a.method)||!O)?F5({request:a,path:o,pattern:s,match:u,lazyHandlerPromise:b?.handler,lazyRoutePromise:b?.route,handlerOverride:x,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Ml(e,n,a,o,s,u,c,d,p=null){return s.map(g=>g.route.id!==u.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:p,shouldCallHandler:()=>!1,_lazyPromises:qT(e,n,a,g,c),resolve:()=>Promise.resolve({type:"data",result:void 0})}:cy(e,n,a,o,Hc(s),g,c,d,!0,p))}async function U5(e,n,a,o,s,u,c){o.some(y=>y._lazyPromises?.middleware)&&await Promise.all(o.map(y=>y._lazyPromises?.middleware));let d={request:n,url:YT(n,a),pattern:Hc(o),params:o[0].params,context:u,matches:o},g=await e({...d,fetcherKey:s,runClientMiddleware:y=>{let h=d;return BT(h,()=>y({...h,fetcherKey:s,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(o.flatMap(y=>[y._lazyPromises?.handler,y._lazyPromises?.route]))}catch{}return g}async function F5({request:e,path:n,pattern:a,match:o,lazyHandlerPromise:s,lazyRoutePromise:u,handlerOverride:c,scopedContext:d}){let p,g,y=Er(e.method),h=y?"action":"loader",b=x=>{let w,C=new Promise((O,M)=>w=M);g=()=>w(),e.signal.addEventListener("abort",g);let R=O=>typeof x!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${o.route.id}]`)):x({request:e,url:YT(e,n),pattern:a,params:o.params,context:d},...O!==void 0?[O]:[]),T=(async()=>{try{return{type:"data",result:await(c?c(M=>R(M)):R())}}catch(O){return{type:"error",result:O}}})();return Promise.race([T,C])};try{let x=y?o.route.action:o.route.loader;if(s||u)if(x){let w,[C]=await Promise.all([b(x).catch(R=>{w=R}),s,u]);if(w!==void 0)throw w;p=C}else{await s;let w=y?o.route.action:o.route.loader;if(w)[p]=await Promise.all([b(w),u]);else if(h==="action"){let C=new URL(e.url),R=C.pathname+C.search;throw Ca(405,{method:e.method,pathname:R,routeId:o.route.id})}else return{type:"data",result:void 0}}else if(x)p=await b(x);else{let w=new URL(e.url),C=w.pathname+w.search;throw Ca(404,{pathname:C})}}catch(x){return{type:"error",result:x}}finally{g&&e.signal.removeEventListener("abort",g)}return p}async function B5(e){let n=e.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?e.body==null?null:e.json():e.text()}async function V5(e){let{result:n,type:a}=e;if(xv(n)){let o;try{o=await B5(n)}catch(s){return{type:"error",error:s}}return a==="error"?{type:"error",error:new _c(n.status,n.statusText,o),statusCode:n.status,headers:n.headers}:{type:"data",data:o,statusCode:n.status,headers:n.headers}}return a==="error"?Uw(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:$5(n),statusCode:bc(n)?n.status:void 0,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:bc(n)?n.status:void 0}:Uw(n)?{type:"data",data:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function q5(e,n,a,o,s){let u=e.headers.get("Location");if(_t(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!mv(u)){let c=o.slice(0,o.findIndex(d=>d.route.id===a)+1);u=uy(new URL(n.url),c,s,u),e.headers.set("Location",u)}return e}var Y5=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function dy(e){try{return Y5.includes(new URL(e).protocol)}catch{return!1}}function Pw(e,n,a,o){if(mv(e)){let s=e,u=pp.test(s)?new URL(RT(s,n.protocol)):new URL(s);if(dy(u.toString()))throw new Error("Invalid redirect location");let c=Na(u.pathname,a)!=null;if(u.origin===n.origin&&c)return yv(u.pathname)+u.search+u.hash}try{let s=o.createURL(e);if(dy(s.toString()))throw new Error("Invalid redirect location")}catch{}return e}function yl(e,n,a,o){let s=e.createURL(KT(n)).toString(),u={signal:a};if(o&&Er(o.formMethod)){let{formMethod:c,formEncType:d}=o;u.method=c.toUpperCase(),d==="application/json"?(u.headers=new Headers({"Content-Type":d}),u.body=JSON.stringify(o.json)):d==="text/plain"?u.body=o.text:d==="application/x-www-form-urlencoded"&&o.formData?u.body=fy(o.formData):u.body=o.formData}return new Request(s,u)}function YT(e,n){let a=new URL(e.url),o=typeof n=="string"?Ka(n):n;if(a.pathname=o.pathname||"/",o.search){let s=new URLSearchParams(o.search),u=s.getAll("index");s.delete("index");for(let c of u.filter(Boolean))s.append("index",c);a.search=s.size?`?${s.toString()}`:""}else a.search="";return a.hash=o.hash||"",a}function fy(e){let n=new URLSearchParams;for(let[a,o]of e.entries())n.append(a,typeof o=="string"?o:o.name);return n}function Lw(e){let n=new FormData;for(let[a,o]of e.entries())n.append(a,o);return n}function K5(e,n,a,o=!1,s=!1){let u={},c=null,d,p=!1,g={},y=a&&ua(a[1])?a[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in n))return;let b=h.route.id,x=n[b];if(_t(!ds(x),"Cannot handle redirect results in processLoaderData"),ua(x)){let w=x.error;if(y!==void 0&&(w=y,y=void 0),c=c||{},s)c[b]=w;else{let C=wi(e,b);c[C.route.id]==null&&(c[C.route.id]=w)}o||(u[b]=_T),p||(p=!0,d=bc(x.error)?x.error.status:500),x.headers&&(g[b]=x.headers)}else u[b]=x.data,x.statusCode&&x.statusCode!==200&&!p&&(d=x.statusCode),x.headers&&(g[b]=x.headers)}),y!==void 0&&a&&(c={[a[0]]:y},a[2]&&(u[a[2]]=void 0)),{loaderData:u,errors:c,statusCode:d||200,loaderHeaders:g}}function zw(e,n,a,o,s,u,c){let{loaderData:d,errors:p}=K5(n,a,o);return s.filter(g=>!g.matches||g.matches.some(y=>y.shouldLoad)).forEach(g=>{let{key:y,match:h,controller:b}=g;if(b&&b.signal.aborted)return;let x=u[y];if(_t(x,"Did not find corresponding fetcher result"),ua(x)){let w=wi(e.matches,h?.route.id);p&&p[w.route.id]||(p={...p,[w.route.id]:x.error}),c.delete(y)}else if(ds(x))_t(!1,"Unhandled fetcher revalidation redirect");else{let w=so(x.data);c.set(y,w)}}),{loaderData:d,errors:p}}function _w(e,n,a,o){let s=Object.entries(n).filter(([,u])=>u!==_T).reduce((u,[c,d])=>(u[c]=d,u),{});for(let u of a){let c=u.route.id;if(!n.hasOwnProperty(c)&&e.hasOwnProperty(c)&&u.route.loader&&(s[c]=e[c]),o&&o.hasOwnProperty(c))break}return s}function Hw(e){return e?ua(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function wi(e,n){return(n?e.slice(0,e.findIndex(o=>o.route.id===n)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function Af(e){let n=e.length===1?e[0]:e.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function Ca(e,{pathname:n,routeId:a,method:o,type:s,message:u}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(c="Bad Request",o&&n&&a?d=`You made a ${o} request to "${n}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:s==="invalid-body"&&(d="Unable to encode submission body")):e===403?(c="Forbidden",d=`Route "${a}" does not match URL "${n}"`):e===404?(c="Not Found",d=`No route matches URL "${n}"`):e===405&&(c="Method Not Allowed",o&&n&&a?d=`You made a ${o.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:o&&(d=`Invalid request method "${o.toUpperCase()}"`)),new _c(e||500,c,new Error(d),!0)}function Df(e){let n=Object.entries(e);for(let a=n.length-1;a>=0;a--){let[o,s]=n[a];if(ds(s))return{key:o,result:s}}}function KT(e){let n=typeof e=="string"?Ka(e):e;return Lr({...n,hash:""})}function G5(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function $5(e){return new _c(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function X5(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([n,a])=>typeof n=="string"&&Q5(a))}function Q5(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Z5(e){return xv(e.result)&<.has(e.result.status)}function ua(e){return e.type==="error"}function ds(e){return(e&&e.type)==="redirect"}function Uw(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function xv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function J5(e){return LT.has(e)}function W5(e){return xv(e)&&J5(e.status)&&e.headers.has("Location")}function eL(e){return M5.has(e.toUpperCase())}function Er(e){return T5.has(e.toUpperCase())}function Sv(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function Qf(e,n){let a=typeof n=="string"?Ka(n).search:n.search;if(e[e.length-1].route.index&&Sv(a||""))return e[e.length-1];let o=NT(e);return o[o.length-1]}function Fw(e){let{formMethod:n,formAction:a,formEncType:o,text:s,formData:u,json:c}=e;if(!(!n||!a||!o)){if(s!=null)return{formMethod:n,formAction:a,formEncType:o,formData:void 0,json:void 0,text:s};if(u!=null)return{formMethod:n,formAction:a,formEncType:o,formData:u,json:void 0,text:void 0};if(c!==void 0)return{formMethod:n,formAction:a,formEncType:o,formData:void 0,json:c,text:void 0}}}function N0(e,n,a,o){return o?{state:"loading",location:e,matches:n,historyAction:a,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}:{state:"loading",location:e,matches:n,historyAction:a,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function tL(e,n,a,o){return{state:"submitting",location:e,matches:n,historyAction:a,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}}function $u(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function nL(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function so(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function rL(e,n){try{let a=e.sessionStorage.getItem(zT);if(a){let o=JSON.parse(a);for(let[s,u]of Object.entries(o||{}))u&&Array.isArray(u)&&n.set(s,new Set(u||[]))}}catch{}}function aL(e,n){if(n.size>0){let a={};for(let[o,s]of n)a[o]=[...s];try{e.sessionStorage.setItem(zT,JSON.stringify(a))}catch(o){Un(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function Bw(){let e,n,a=new Promise((o,s)=>{e=async u=>{o(u);try{await a}catch{}},n=async u=>{s(u);try{await a}catch{}}});return{promise:a,resolve:e,reject:n}}var Es=v.createContext(null);Es.displayName="DataRouter";var Uc=v.createContext(null);Uc.displayName="DataRouterState";var GT=v.createContext(!1);function $T(){return v.useContext(GT)}var wv=v.createContext({isTransitioning:!1});wv.displayName="ViewTransition";var XT=v.createContext(new Map);XT.displayName="Fetchers";var oL=v.createContext(null);oL.displayName="Await";var ha=v.createContext(null);ha.displayName="Navigation";var mp=v.createContext(null);mp.displayName="Location";var Ga=v.createContext({outlet:null,matches:[],isDataRoute:!1});Ga.displayName="Route";var Rv=v.createContext(null);Rv.displayName="RouteError";var QT="REACT_ROUTER_ERROR",iL="REDIRECT",sL="ROUTE_ERROR_RESPONSE";function lL(e){if(e.startsWith(`${QT}:${iL}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function uL(e){if(e.startsWith(`${QT}:${sL}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new _c(n.status,n.statusText,n.data)}catch{}}function cL(e,{relative:n}={}){_t(Vl(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:o}=v.useContext(ha),{hash:s,pathname:u,search:c}=Fc(e,{relative:n}),d=u;return a!=="/"&&(d=u==="/"?a:Aa([a,u])),o.createHref({pathname:d,search:c,hash:s})}function Vl(){return v.useContext(mp)!=null}function $r(){return _t(Vl(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(mp).location}var ZT="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function JT(e){v.useContext(ha).static||v.useLayoutEffect(e)}function yp(){let{isDataRoute:e}=v.useContext(Ga);return e?CL():dL()}function dL(){_t(Vl(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(Es),{basename:n,navigator:a}=v.useContext(ha),{matches:o}=v.useContext(Ga),{pathname:s}=$r(),u=JSON.stringify(gp(o)),c=v.useRef(!1);return JT(()=>{c.current=!0}),v.useCallback((p,g={})=>{if(Un(c.current,ZT),!c.current)return;if(typeof p=="number"){a.go(p);return}let y=zc(p,JSON.parse(u),s,g.relative==="path");e==null&&n!=="/"&&(y.pathname=y.pathname==="/"?n:Aa([n,y.pathname])),Ol(typeof p=="string"?p:Lr(p),a.createHref(y),vv(a),"reject"),(g.replace?a.replace:a.push)(y,g.state,g)},[n,a,u,s,e])}var fL=v.createContext(null);function hL(e){let n=v.useContext(Ga).outlet;return v.useMemo(()=>n&&v.createElement(fL.Provider,{value:e},n),[n,e])}function Fc(e,{relative:n}={}){let{matches:a}=v.useContext(Ga),{pathname:o}=$r(),s=JSON.stringify(gp(a));return v.useMemo(()=>zc(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function pL(e,n,a){_t(Vl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=v.useContext(ha),{matches:s}=v.useContext(Ga),u=s[s.length-1],c=u?u.params:{},d=u?u.pathname:"/",p=u?u.pathnameBase:"/",g=u&&u.route;{let R=g&&g.path||"";tO(d,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
9
|
+
`+l.stack}}var Dt=Object.prototype.hasOwnProperty,Jt=e.unstable_scheduleCallback,rn=e.unstable_cancelCallback,Wt=e.unstable_shouldYield,We=e.unstable_requestPaint,xt=e.unstable_now,$t=e.unstable_getCurrentPriorityLevel,ft=e.unstable_ImmediatePriority,vt=e.unstable_UserBlockingPriority,gt=e.unstable_NormalPriority,Lt=e.unstable_LowPriority,un=e.unstable_IdlePriority,je=e.log,ot=e.unstable_setDisableYieldValue,ke=null,ze=null;function Ge(t){if(typeof je=="function"&&ot(t),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(ke,t)}catch{}}var et=Math.clz32?Math.clz32:Z,Et=Math.log,H=Math.LN2;function Z(t){return t>>>=0,t===0?32:31-(Et(t)/H|0)|0}var ne=256,ye=262144,xe=4194304;function qe(t){var r=t&42;if(r!==0)return r;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&-t;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 Ve(t,r,i){var l=t.pendingLanes;if(l===0)return 0;var f=0,m=t.suspendedLanes,E=t.pingedLanes;t=t.warmLanes;var P=l&134217727;return P!==0?(l=P&~m,l!==0?f=qe(l):(E&=P,E!==0?f=qe(E):i||(i=P&~t,i!==0&&(f=qe(i))))):(P=l&~m,P!==0?f=qe(P):E!==0?f=qe(E):i||(i=l&~t,i!==0&&(f=qe(i)))),f===0?0:r!==0&&r!==f&&(r&m)===0&&(m=f&-f,i=r&-r,m>=i||m===32&&(i&4194048)!==0)?r:f}function Xe(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function $e(t,r){(r&8)!==0&&(r|=r&32);var i=t.entangledLanes;if(i!==0)for(t=t.entanglements,i&=r;0<i;){var l=31-et(i),f=1<<l;r|=t[l],i&=~f}return r}function st(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 tt(){var t=xe;return xe<<=1,(xe&62914560)===0&&(xe=4194304),t}function St(t){for(var r=[],i=0;31>i;i++)r.push(t);return r}function ct(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Bt(t,r,i,l,f,m){var E=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var P=t.entanglements,Q=t.expirationTimes,ie=t.hiddenUpdates;for(i=E&~i;0<i;){var pe=31-et(i),Ce=1<<pe;P[pe]=0,Q[pe]=-1;var ae=ie[pe];if(ae!==null)for(ie[pe]=null,pe=0;pe<ae.length;pe++){var fe=ae[pe];fe!==null&&(fe.lane&=-536870913)}i&=~Ce}l!==0&&Ht(t,l,0),m!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=m&~(E&~r))}function Ht(t,r,i){t.pendingLanes|=r,t.suspendedLanes&=~r;var l=31-et(r);t.entangledLanes|=r,t.entanglements[l]=t.entanglements[l]|1073741824|i&261930}function On(t,r){var i=t.entangledLanes|=r;for(t=t.entanglements;i;){var l=31-et(i),f=1<<l;f&r|t[l]&r&&(t[l]|=r),i&=~f}}function Vt(t,r){var i=r&-r;return i=(i&42)!==0?1:Ut(i),(i&(t.suspendedLanes|r))!==0?0:i}function Ut(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 En(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Cn(){var t=ce.p;return t!==0?t:(t=window.event,t===void 0?32:eS(t.type))}function Xr(t,r){var i=ce.p;try{return ce.p=t,r()}finally{ce.p=i}}var cn=Math.random().toString(36).slice(2),dn="__reactFiber$"+cn,Mn="__reactProps$"+cn,In="__reactContainer$"+cn,vo="__reactEvents$"+cn,Or="__reactListeners$"+cn,ja="__reactHandles$"+cn,Qr="__reactResources$"+cn,pa="__reactMarker$"+cn,kt="__reactLoad$"+cn;function Yn(t){delete t[dn],delete t[Mn],delete t[Or],delete t[ja]}function Fn(t){var r;if(r=t[dn])return r;for(var i=t.parentNode;i;){if(r=i[In]||i[dn]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(t=k1(t);t!==null;){if(i=t[dn])return i;t=k1(t)}return r}t=i,i=t.parentNode}return null}function fr(t){if(t=t[dn]||t[In]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function he(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(o(33))}function Ae(t){var r=t[Qr];return r||(r=t[Qr]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Se(t){t[pa]=!0}function nt(t){t[kt]=void 0}var Ct=new Set,wt={};function zt(t,r){vn(t,r),vn(t+"Capture",r)}function vn(t,r){for(wt[t]=r,t=0;t<r.length;t++)Ct.add(r[t])}var fn=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]*$"),mt={},At={};function an(t){return Dt.call(At,t)?!0:Dt.call(mt,t)?!1:fn.test(t)?At[t]=!0:(mt[t]=!0,!1)}var pt=!1;function nr(){var t=pt;return pt=!1,t}function Ln(t,r,i){if(an(r))if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,i)}}function Zr(t,r,i){if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,i)}}function Gn(t,r,i,l){if(l===null)t.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(r,i,l)}}function $n(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Os(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Zl(t,r,i){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,m=l.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return f.call(this)},set:function(E){i=""+E,m.call(this,E)}}),Object.defineProperty(t,r,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(E){i=""+E},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function bo(t){if(!t._valueTracker){var r=Os(t)?"checked":"value";t._valueTracker=Zl(t,r,""+t[r])}}function Ms(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),l="";return t&&(l=Os(t)?t.checked?"true":"false":t.value),t=l,t!==i?(r.setValue(t),!0):!1}var Jc=/[\n"\\]/g;function Nn(t){return t.replace(Jc,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function wr(t,r,i,l,f,m,E,P){t.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.type=E:t.removeAttribute("type"),r!=null?E==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+$n(r)):t.value!==""+$n(r)&&(t.value=""+$n(r)):E!=="submit"&&E!=="reset"||t.removeAttribute("value"),r!=null?E==="number"&&t.value==r?As(t,$n(t.value)):As(t,$n(r)):i!=null?As(t,$n(i)):l!=null&&t.removeAttribute("value"),f==null&&m!=null&&(t.defaultChecked=!!m),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?t.name=""+$n(P):t.removeAttribute("name")}function Yo(t,r,i,l,f,m,E,P){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),r!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){bo(t);return}i=i!=null?""+$n(i):"",r=r!=null?""+$n(r):i,P||r===t.value||(t.value=r),t.defaultValue=r}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=P?t.checked:!!l,t.defaultChecked=!!l,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(t.name=E),bo(t)}function As(t,r){t.defaultValue!==""+r&&(t.defaultValue=""+r)}function Hr(t,r,i,l){if(t=t.options,r){r={};for(var f=0;f<i.length;f++)r["$"+i[f]]=!0;for(i=0;i<t.length;i++)f=r.hasOwnProperty("$"+t[i].value),t[i].selected!==f&&(t[i].selected=f),f&&l&&(t[i].defaultSelected=!0)}else{for(i=""+$n(i),r=null,f=0;f<t.length;f++){if(t[f].value===i){t[f].selected=!0,l&&(t[f].defaultSelected=!0);return}r!==null||t[f].disabled||(r=t[f])}r!==null&&(r.selected=!0)}}function Ds(t,r,i){if(r!=null&&(r=""+$n(r),r!==t.value&&(t.value=r),i==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=i!=null?""+$n(i):""}function Jr(t,r,i,l){if(r==null){if(l!=null){if(i!=null)throw Error(o(92));if(me(l)){if(1<l.length)throw Error(o(93));l=l[0]}i=l}i==null&&(i=""),r=i}i=$n(r),t.defaultValue=i,l=t.textContent,l===i&&l!==""&&l!==null&&(t.value=l),bo(t)}function Mr(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var Ko=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 Jl(t,r,i){var l=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":l?t.setProperty(r,i):typeof i!="number"||i===0||Ko.has(r)?r==="float"?t.cssFloat=i:t[r]=(""+i).trim():t[r]=i+"px"}function Wr(t,r,i){if(r!=null&&typeof r!="object")throw Error(o(62));if(t=t.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="",pt=!0);for(var f in r)l=r[f],r.hasOwnProperty(f)&&i[f]!==l&&(Jl(t,f,l),pt=!0)}else for(var m in r)r.hasOwnProperty(m)&&Jl(t,m,r[m])}function ki(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 Wl=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"],["maskType","mask-type"],["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"]]),eu=/^[\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 hr(t){return eu.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ar(){}var Pi=null;function Li(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var en=null,or=null;function ga(t){var r=fr(t);if(r&&(t=r.stateNode)){var i=t[Mn]||null;e:switch(t=r.stateNode,r.type){case"input":if(wr(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Nn(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var l=i[r];if(l!==t&&l.form===t.form){var f=l[Mn]||null;if(!f)throw Error(o(90));wr(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<i.length;r++)l=i[r],l.form===t.form&&Ms(l)}break e;case"textarea":Ds(t,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&Hr(t,!!i.multiple,r,!1)}}}var ea=!1;function zi(t,r,i){if(ea)return t(r,i);ea=!0;try{var l=t(r);return l}finally{if(ea=!1,(en!==null||or!==null)&&(Jd(),en&&(r=en,t=or,or=en=null,ga(r),t)))for(r=0;r<t.length;r++)ga(t[r])}}function xo(t,r){var i=t.stateNode;if(i===null)return null;var l=i[Mn]||null;if(l===null)return null;i=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(o(231,r,typeof i));return i}var pr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_i=!1;if(pr)try{var tu={};Object.defineProperty(tu,"passive",{get:function(){_i=!0}}),window.addEventListener("test",tu,tu),window.removeEventListener("test",tu,tu)}catch{_i=!1}var Go=null,qp=null,Wc=null;function fb(){if(Wc)return Wc;var t,r=qp,i=r.length,l,f="value"in Go?Go.value:Go.textContent,m=f.length;for(t=0;t<i&&r[t]===f[t];t++);var E=i-t;for(l=1;l<=E&&r[i-l]===f[m-l];l++);return Wc=f.slice(t,1<l?1-l:void 0)}function ed(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function td(){return!0}function hb(){return!1}function Dr(t){function r(i,l,f,m,E){this._reactName=i,this._targetInst=f,this.type=l,this.nativeEvent=m,this.target=E,this.currentTarget=null;for(var P in t)t.hasOwnProperty(P)&&(i=t[P],this[P]=i?i(m):m[P]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?td:hb,this.isPropagationStopped=hb,this}return k(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=td)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=td)},persist:function(){},isPersistent:td}),r}var $o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nd=Dr($o),nu=k({},$o,{view:0,detail:0}),dA=Dr(nu),Yp,Kp,ru,rd=k({},nu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$p,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!==ru&&(ru&&t.type==="mousemove"?(Yp=t.screenX-ru.screenX,Kp=t.screenY-ru.screenY):Kp=Yp=0,ru=t),Yp)},movementY:function(t){return"movementY"in t?t.movementY:Kp}}),pb=Dr(rd),fA=k({},rd,{dataTransfer:0}),hA=Dr(fA),pA=k({},nu,{relatedTarget:0}),Gp=Dr(pA),gA=k({},$o,{animationName:0,elapsedTime:0,pseudoElement:0}),mA=Dr(gA),yA=k({},$o,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),vA=Dr(yA),bA=k({},$o,{data:0}),gb=Dr(bA),xA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SA={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"},wA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RA(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=wA[t])?!!r[t]:!1}function $p(){return RA}var EA=k({},nu,{key:function(t){if(t.key){var r=xA[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=ed(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?SA[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$p,charCode:function(t){return t.type==="keypress"?ed(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ed(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),CA=Dr(EA),TA=k({},rd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mb=Dr(TA),OA=k({},$o,{submitter:0}),MA=Dr(OA),AA=k({},nu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$p}),DA=Dr(AA),NA=k({},$o,{propertyName:0,elapsedTime:0,pseudoElement:0}),IA=Dr(NA),jA=k({},rd,{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}),kA=Dr(jA),PA=k({},$o,{newState:0,oldState:0,source:0}),LA=Dr(PA),zA=[9,13,27,32],Xp=pr&&"CompositionEvent"in window,au=null;pr&&"documentMode"in document&&(au=document.documentMode);var _A=pr&&"TextEvent"in window&&!au,yb=pr&&(!Xp||au&&8<au&&11>=au),vb=" ",bb=!1;function xb(t,r){switch(t){case"keyup":return zA.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sb(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ns=!1;function HA(t,r){switch(t){case"compositionend":return Sb(r);case"keypress":return r.which!==32?null:(bb=!0,vb);case"textInput":return t=r.data,t===vb&&bb?null:t;default:return null}}function UA(t,r){if(Ns)return t==="compositionend"||!Xp&&xb(t,r)?(t=fb(),Wc=qp=Go=null,Ns=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return yb&&r.locale!=="ko"?null:r.data;default:return null}}var FA={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 wb(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!FA[t.type]:r==="textarea"}function Rb(t,r,i,l){en?or?or.push(l):or=[l]:en=l,r=af(r,"onChange"),0<r.length&&(i=new nd("onChange","change",null,i,l),t.push({event:i,listeners:r}))}var ou=null,iu=null;function BA(t){c1(t,0)}function ad(t){var r=he(t);if(Ms(r))return t}function Eb(t,r){if(t==="change")return r}var Cb=!1;if(pr){var Qp;if(pr){var Zp="oninput"in document;if(!Zp){var Tb=document.createElement("div");Tb.setAttribute("oninput","return;"),Zp=typeof Tb.oninput=="function"}Qp=Zp}else Qp=!1;Cb=Qp&&(!document.documentMode||9<document.documentMode)}function Ob(){ou&&(ou.detachEvent("onpropertychange",Mb),iu=ou=null)}function Mb(t){if(t.propertyName==="value"&&ad(iu)){var r=[];Rb(r,iu,t,Li(t)),zi(BA,r)}}function VA(t,r,i){t==="focusin"?(Ob(),ou=r,iu=i,ou.attachEvent("onpropertychange",Mb)):t==="focusout"&&Ob()}function qA(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ad(iu)}function YA(t,r){if(t==="click")return ad(r)}function KA(t,r){if(t==="input"||t==="change")return ad(r)}function GA(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var ta=typeof Object.is=="function"?Object.is:GA;function su(t,r){if(ta(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var i=Object.keys(t),l=Object.keys(r);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var f=i[l];if(!Dt.call(r,f)||!ta(t[f],r[f]))return!1}return!0}function Jp(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}}function Ab(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Db(t,r){var i=Ab(t);t=0;for(var l;i;){if(i.nodeType===3){if(l=t+i.textContent.length,t<=r&&l>=r)return{node:i,offset:r-t};t=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Ab(i)}}function Nb(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Nb(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Ib(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=Jp(t.document);r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=Jp(t.document)}return r}function Wp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var $A=pr&&"documentMode"in document&&11>=document.documentMode,Is=null,eg=null,lu=null,tg=!1;function jb(t,r,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;tg||Is==null||Is!==Jp(l)||(l=Is,"selectionStart"in l&&Wp(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),lu&&su(lu,l)||(lu=l,l=af(eg,"onSelect"),0<l.length&&(r=new nd("onSelect","select",null,r,i),t.push({event:r,listeners:l}),r.target=Is)))}function Hi(t,r){var i={};return i[t.toLowerCase()]=r.toLowerCase(),i["Webkit"+t]="webkit"+r,i["Moz"+t]="moz"+r,i}var js={animationend:Hi("Animation","AnimationEnd"),animationiteration:Hi("Animation","AnimationIteration"),animationstart:Hi("Animation","AnimationStart"),transitionrun:Hi("Transition","TransitionRun"),transitionstart:Hi("Transition","TransitionStart"),transitioncancel:Hi("Transition","TransitionCancel"),transitionend:Hi("Transition","TransitionEnd")},ng={},kb={};pr&&(kb=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function Ui(t){if(ng[t])return ng[t];if(!js[t])return t;var r=js[t],i;for(i in r)if(r.hasOwnProperty(i)&&i in kb)return ng[t]=r[i];return t}var Pb=Ui("animationend"),Lb=Ui("animationiteration"),zb=Ui("animationstart"),XA=Ui("transitionrun"),QA=Ui("transitionstart"),ZA=Ui("transitioncancel"),_b=Ui("transitionend"),Hb=new Map,rg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");rg.push("scrollEnd");function ka(t,r){Hb.set(t,r),zt(r,[t])}var JA=0;function So(t,r){if(t.name!=null&&t.name!=="auto")return t.name;if(r.autoName!==null)return r.autoName;t=_a.identifierPrefix;var i=JA++;return t="_"+t+"t_"+i.toString(32)+"_",r.autoName=t}function Ub(t){if(t==null||typeof t=="string")return t;var r=null,i=Ws;if(i!==null)for(var l=0;l<i.length;l++){var f=t[i[l]];if(f!=null){if(f==="none")return"none";r=r==null?f:r+(" "+f)}}return r??t.default}function wo(t,r){return t=Ub(t),r=Ub(r),r==null?t==="auto"?null:t:r==="auto"?null:r}var od=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=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(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},ma=[],ks=0,ag=0;function id(){for(var t=ks,r=ag=ks=0;r<t;){var i=ma[r];ma[r++]=null;var l=ma[r];ma[r++]=null;var f=ma[r];ma[r++]=null;var m=ma[r];if(ma[r++]=null,l!==null&&f!==null){var E=l.pending;E===null?f.next=f:(f.next=E.next,E.next=f),l.pending=f}m!==0&&Fb(i,f,m)}}function sd(t,r,i,l){ma[ks++]=t,ma[ks++]=r,ma[ks++]=i,ma[ks++]=l,ag|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function og(t,r,i,l){return sd(t,r,i,l),ld(t)}function Fi(t,r){return sd(t,null,null,r),ld(t)}function Fb(t,r,i){t.lanes|=i;var l=t.alternate;l!==null&&(l.lanes|=i);for(var f=!1,m=t.return;m!==null;)m.childLanes|=i,l=m.alternate,l!==null&&(l.childLanes|=i),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(f=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,f&&r!==null&&(f=31-et(i),t=m.hiddenUpdates,l=t[f],l===null?t[f]=[r]:l.push(r),r.lane=i|536870912),m):null}function ld(t){if(50<Du)throw Du=0,Zd=null,Error(o(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Ps={};function WA(t,r,i,l){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ur(t,r,i,l){return new WA(t,r,i,l)}function ig(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ro(t,r){var i=t.alternate;return i===null?(i=Ur(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&1206910976,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function Bb(t,r){t.flags&=1206910978;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,r=i.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function ud(t,r,i,l,f,m){var E=0;if(l=t,typeof l=="function")ig(l)&&(E=1);else if(typeof l=="string")E=ON(t,i,Oe.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(l){case ee:return t=Ur(31,i,r,f),t.elementType=ee,t.lanes=m,t;case G:return Bi(i.children,f,m,r);case J:E=8,f|=24;break;case Y:return t=Ur(12,i,r,f|2),t.elementType=Y,t.lanes=m,t;case $:return t=Ur(13,i,r,f),t.elementType=$,t.lanes=m,t;case K:return t=Ur(19,i,r,f),t.elementType=K,t.lanes=m,t;case q:case N:return t=f|32,t=Ur(30,i,r,t),t.elementType=N,t.lanes=m,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case _:E=10;break e;case U:E=9;break e;case L:E=11;break e;case V:E=14;break e;case X:E=16,l=null;break e}E=29,i=Error(o(130,t===null?"null":typeof t,"")),l=null}return r=Ur(E,i,r,f),r.elementType=t,r.type=l,r.lanes=m,r}function Bi(t,r,i,l){return t=Ur(7,t,l,r),t.lanes=i,t}function sg(t,r,i){return t=Ur(6,t,null,r),t.lanes=i,t}function Vb(t){var r=Ur(18,null,null,0);return r.stateNode=t,r}function lg(t,r,i){return r=Ur(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var qb=new WeakMap;function ya(t,r){if(typeof t=="object"&&t!==null){var i=qb.get(t);return i!==void 0?i:(r={value:t,source:r,stack:Ot(r)},qb.set(t,r),r)}return{value:t,source:r,stack:Ot(r)}}var Ls=[],zs=0,cd=null,uu=0,va=[],ba=0,Xo=null,$a=1,Xa="";function Eo(t,r){Ls[zs++]=uu,Ls[zs++]=cd,cd=t,uu=r}function Yb(t,r,i){va[ba++]=$a,va[ba++]=Xa,va[ba++]=Xo,Xo=t;var l=$a;t=Xa;var f=32-et(l)-1;l&=~(1<<f),i+=1;var m=32-et(r)+f;if(30<m){var E=f-f%5;m=(l&(1<<E)-1).toString(32),l>>=E,f-=E,$a=1<<32-et(r)+f|i<<f|l,Xa=m+t}else $a=1<<m|i<<f|l,Xa=t}function dd(t){t.return!==null&&(Eo(t,1),Yb(t,1,0))}function ug(t){for(;t===cd;)cd=Ls[--zs],Ls[zs]=null,uu=Ls[--zs],Ls[zs]=null;for(;t===Xo;)Xo=va[--ba],va[ba]=null,Xa=va[--ba],va[ba]=null,$a=va[--ba],va[ba]=null}function Kb(t,r){va[ba++]=$a,va[ba++]=Xa,va[ba++]=Xo,$a=r.id,Xa=r.overflow,Xo=t}var ir=null,An=null,Ft=!1,Qo=null,xa=!1,cg=Error(o(519));function Zo(t){var r=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cu(ya(r,t)),cg}function Gb(t){var r=t.stateNode,i=t.type,l=t.memoizedProps;switch(r[dn]=t,r[Mn]=l,i){case"dialog":Yt("cancel",r),Yt("close",r);break;case"iframe":case"object":case"embed":Yt("load",r);break;case"video":case"audio":for(i=0;i<Iu.length;i++)Yt(Iu[i],r);break;case"source":Yt("error",r);break;case"img":case"image":case"link":Yt("error",r),Yt("load",r);break;case"details":Yt("toggle",r);break;case"input":Yt("invalid",r),Yo(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Yt("invalid",r);break;case"textarea":Yt("invalid",r),Jr(r,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||l.suppressHydrationWarning===!0||p1(r.textContent,i)?(l.popover!=null&&(Yt("beforetoggle",r),Yt("toggle",r)),l.onScroll!=null&&Yt("scroll",r),l.onScrollEnd!=null&&Yt("scrollend",r),l.onClick!=null&&(r.onclick=Ar),r=!0):r=!1,r||Zo(t,!0)}function fd(t){for(ir=t.return;ir;)switch(ir.tag){case 5:case 31:case 13:xa=!1;return;case 27:case 3:xa=!0;return;default:ir=ir.return}}function _s(t){if(t!==ir)return!1;if(!Ft)return fd(t),Ft=!0,!1;var r=t.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||Um(t.type,t.memoizedProps)),i=!i),i&&An&&Zo(t),fd(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));An=j1(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));An=j1(t)}else r===27?(r=An,hi(t.type)?(t=Xm,Xm=null,An=t):An=r):An=ir?wa(t.stateNode.nextSibling):null;return!0}function Vi(){An=ir=null,Ft=!1}function dg(){var t=Qo;return t!==null&&(Vr===null?Vr=t:Vr.push.apply(Vr,t),Qo=null),t}function cu(t){Qo===null?Qo=[t]:Qo.push(t)}var fg=Me(null),qi=null,Co=null;function Jo(t,r,i){Fe(fg,r._currentValue),r._currentValue=i}function To(t){t._currentValue=fg.current,Le(fg)}function hd(t,r,i){for(;t!==null;){var l=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),t===i)break;t=t.return}}function hg(t,r,i,l){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var m=f.dependencies;if(m!==null){var E=f.child;m=m.firstContext;e:for(;m!==null;){var P=m;m=f;for(var Q=0;Q<r.length;Q++)if(P.context===r[Q]){m.lanes|=i,P=m.alternate,P!==null&&(P.lanes|=i),hd(m.return,i,t),l||(E=null);break e}m=P.next}}else if(f.tag===18){if(E=f.return,E===null)throw Error(o(341));E.lanes|=i,m=E.alternate,m!==null&&(m.lanes|=i),hd(E,i,t),E=null}else f.tag===13&&f.memoizedState!==null&&f.memoizedState.dehydrated===null?(f.lanes|=i,E=f.alternate,E!==null&&(E.lanes|=i),hd(f.return,i,t),E=f.child,E=E!==null?E.sibling:null):E=f.child;if(E!==null)E.return=f;else for(E=f;E!==null;){if(E===t){E=null;break}if(f=E.sibling,f!==null){f.return=E.return,E=f;break}E=E.return}f=E}}function Yi(t,r,i,l){t=null;for(var f=r,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var E=f.alternate;if(E===null)throw Error(o(387));if(E=E.memoizedProps,E!==null){var P=f.type;ta(f.pendingProps.value,E.value)||(t!==null?t.push(P):t=[P])}}else if(f===Ue.current){if(E=f.alternate,E===null)throw Error(o(387));E.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(ul):t=[ul])}f=f.return}return t!==null&&hg(r,t,i,l),r.flags|=262144,t!==null}function pd(t){for(t=t.firstContext;t!==null;){if(!ta(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ki(t){qi=t,Co=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function gr(t){return $b(qi,t)}function gd(t,r){return qi===null&&Ki(t),$b(t,r)}function $b(t,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},Co===null){if(t===null)throw Error(o(308));Co=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Co=Co.next=r;return i}var eD=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(i,l){t.push(l)}};this.abort=function(){r.aborted=!0,t.forEach(function(i){return i()})}},tD=e.unstable_scheduleCallback,nD=e.unstable_NormalPriority,Xn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pg(){return{controller:new eD,data:new Map,refCount:0}}function du(t){t.refCount--,t.refCount===0&&tD(nD,function(){t.controller.abort()})}function Xb(t,r){if((t.pendingLanes&4194048)!==0){var i=t.transitionTypes;for(i===null&&(i=t.transitionTypes=[]),t=0;t<r.length;t++){var l=r[t];i.indexOf(l)===-1&&i.push(l)}}}var fu=null;function rD(t){var r=t.transitionTypes;return t.transitionTypes=null,r}var hu=null,gg=0,Gi=0,Hs=null;function aD(t,r){if(hu===null){var i=hu=[];gg=0,Gi=Nm(),Hs={status:"pending",value:void 0,then:function(l){i.push(l)}}}return gg++,r.then(Qb,Qb),r}function Qb(){if(--gg===0&&(fu=null,hu!==null)){Hs!==null&&(Hs.status="fulfilled");var t=hu;hu=null,Gi=0,Hs=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function oD(t,r){var i=[],l={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return t.then(function(){l.status="fulfilled",l.value=r;for(var f=0;f<i.length;f++)(0,i[f])(r)},function(f){for(l.status="rejected",l.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),l}var Zb=ge.S;ge.S=function(t,r){if(V2=xt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&aD(t,r),fu!==null)for(var i=rl;i!==null;)Xb(i,fu),i=i.next;if(i=t.types,i!==null){for(var l=rl;l!==null;)Xb(l,i),l=l.next;if(Gi!==0){l=fu,l===null&&(l=fu=[]);for(var f=0;f<i.length;f++){var m=i[f];l.indexOf(m)===-1&&l.push(m)}}}Zb!==null&&Zb(t,r)};var $i=Me(null);function mg(){var t=$i.current;return t!==null?t:Tn.pooledCache}function md(t,r){r===null?Fe($i,$i.current):Fe($i,r.pool)}function Jb(){var t=mg();return t===null?null:{parent:Xn._currentValue,pool:t}}var Us=Error(o(460)),yg=Error(o(474)),yd=Error(o(542)),vd={then:function(){}};function Wb(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ex(t,r,i){switch(i=t[i],i===void 0?t.push(r):i!==r&&(r.then(Ar,Ar),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,nx(t),t===void 0&&!("reason"in r)?Error(o(600)):t;default:if(typeof r.status=="string")r.then(Ar,Ar);else{if(t=Tn,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=r,t.status="pending",t.then(function(l){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=l}},function(l){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,nx(t),t}throw Qi=r,Us}}function Xi(t){try{var r=t._init;return r(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Qi=i,Us):i}}var Qi=null;function tx(){if(Qi===null)throw Error(o(459));var t=Qi;return Qi=null,t}function nx(t){if(t===Us||t===yd)throw Error(o(483))}var Fs=null,pu=0;function bd(t){var r=pu;return pu+=1,Fs===null&&(Fs=[]),ex(Fs,t,r)}function Wo(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function xd(t,r){throw r.$$typeof===D?Error(o(525)):(t=Object.prototype.toString.call(r),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function rx(t){function r(oe,te){if(t){var ue=oe.deletions;ue===null?(oe.deletions=[te],oe.flags|=16):ue.push(te)}}function i(oe,te){if(!t)return null;for(;te!==null;)r(oe,te),te=te.sibling;return null}function l(oe){for(var te=new Map;oe!==null;)oe.key===null?te.set(oe.index,oe):te.set(oe.key,oe),oe=oe.sibling;return te}function f(oe,te){return oe=Ro(oe,te),oe.index=0,oe.sibling=null,oe}function m(oe,te,ue){return oe.index=ue,t?(ue=oe.alternate,ue!==null?(ue=ue.index,ue<te?(oe.flags|=2,te):ue):(oe.flags|=134217730,te)):(oe.flags|=1048576,te)}function E(oe){return t&&oe.alternate===null&&(oe.flags|=134217730),oe}function P(oe,te,ue,Ee){return te===null||te.tag!==6?(te=sg(ue,oe.mode,Ee),te.return=oe,te):(te=f(te,ue),te.return=oe,te)}function Q(oe,te,ue,Ee){var Je=ue.type;return Je===G?(oe=pe(oe,te,ue.props.children,Ee,ue.key),Wo(oe,ue),oe):te!==null&&(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===X&&Xi(Je)===te.type)?(te=f(te,ue.props),Wo(te,ue),te.return=oe,te):(te=ud(ue.type,ue.key,ue.props,null,oe.mode,Ee),Wo(te,ue),te.return=oe,te)}function ie(oe,te,ue,Ee){return te===null||te.tag!==4||te.stateNode.containerInfo!==ue.containerInfo||te.stateNode.implementation!==ue.implementation?(te=lg(ue,oe.mode,Ee),te.return=oe,te):(te=f(te,ue.children||[]),te.return=oe,te)}function pe(oe,te,ue,Ee,Je){return te===null||te.tag!==7?(te=Bi(ue,oe.mode,Ee,Je),te.return=oe,te):(te=f(te,ue),te.return=oe,te)}function Ce(oe,te,ue){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=sg(""+te,oe.mode,ue),te.return=oe,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case z:return ue=ud(te.type,te.key,te.props,null,oe.mode,ue),Wo(ue,te),ue.return=oe,ue;case F:return te=lg(te,oe.mode,ue),te.return=oe,te;case X:return te=Xi(te),Ce(oe,te,ue)}if(me(te)||re(te))return te=Bi(te,oe.mode,ue,null),te.return=oe,te;if(typeof te.then=="function")return Ce(oe,bd(te),ue);if(te.$$typeof===_)return Ce(oe,gd(oe,te),ue);xd(oe,te)}return null}function ae(oe,te,ue,Ee){var Je=te!==null?te.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Je!==null?null:P(oe,te,""+ue,Ee);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case z:return ue.key===Je?Q(oe,te,ue,Ee):null;case F:return ue.key===Je?ie(oe,te,ue,Ee):null;case X:return ue=Xi(ue),ae(oe,te,ue,Ee)}if(me(ue)||re(ue))return Je!==null?null:pe(oe,te,ue,Ee,null);if(typeof ue.then=="function")return ae(oe,te,bd(ue),Ee);if(ue.$$typeof===_)return ae(oe,te,gd(oe,ue),Ee);xd(oe,ue)}return null}function fe(oe,te,ue,Ee,Je){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return oe=oe.get(ue)||null,P(te,oe,""+Ee,Je);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case z:return oe=oe.get(Ee.key===null?ue:Ee.key)||null,Q(te,oe,Ee,Je);case F:return oe=oe.get(Ee.key===null?ue:Ee.key)||null,ie(te,oe,Ee,Je);case X:return Ee=Xi(Ee),fe(oe,te,ue,Ee,Je)}if(me(Ee)||re(Ee))return oe=oe.get(ue)||null,pe(te,oe,Ee,Je,null);if(typeof Ee.then=="function")return fe(oe,te,ue,bd(Ee),Je);if(Ee.$$typeof===_)return fe(oe,te,ue,gd(te,Ee),Je);xd(te,Ee)}return null}function Ye(oe,te,ue,Ee){for(var Je=null,Qt=null,lt=te,bt=te=0,Jn=null;lt!==null&&bt<ue.length;bt++){lt.index>bt?(Jn=lt,lt=null):Jn=lt.sibling;var tn=ae(oe,lt,ue[bt],Ee);if(tn===null){lt===null&&(lt=Jn);break}t&<&&tn.alternate===null&&r(oe,lt),te=m(tn,te,bt),Qt===null?Je=tn:Qt.sibling=tn,Qt=tn,lt=Jn}if(bt===ue.length)return i(oe,lt),Ft&&Eo(oe,bt),Je;if(lt===null){for(;bt<ue.length;bt++)lt=Ce(oe,ue[bt],Ee),lt!==null&&(te=m(lt,te,bt),Qt===null?Je=lt:Qt.sibling=lt,Qt=lt);return Ft&&Eo(oe,bt),Je}for(lt=l(lt);bt<ue.length;bt++)Jn=fe(lt,oe,bt,ue[bt],Ee),Jn!==null&&(t&&(tn=Jn.alternate,tn!==null&<.delete(tn.key===null?bt:tn.key)),te=m(Jn,te,bt),Qt===null?Je=Jn:Qt.sibling=Jn,Qt=Jn);return t&<.forEach(function(vi){return r(oe,vi)}),Ft&&Eo(oe,bt),Je}function rt(oe,te,ue,Ee){if(ue==null)throw Error(o(151));for(var Je=null,Qt=null,lt=te,bt=te=0,Jn=null,tn=ue.next();lt!==null&&!tn.done;bt++,tn=ue.next()){lt.index>bt?(Jn=lt,lt=null):Jn=lt.sibling;var vi=ae(oe,lt,tn.value,Ee);if(vi===null){lt===null&&(lt=Jn);break}t&<&&vi.alternate===null&&r(oe,lt),te=m(vi,te,bt),Qt===null?Je=vi:Qt.sibling=vi,Qt=vi,lt=Jn}if(tn.done)return i(oe,lt),Ft&&Eo(oe,bt),Je;if(lt===null){for(;!tn.done;bt++,tn=ue.next())tn=Ce(oe,tn.value,Ee),tn!==null&&(te=m(tn,te,bt),Qt===null?Je=tn:Qt.sibling=tn,Qt=tn);return Ft&&Eo(oe,bt),Je}for(lt=l(lt);!tn.done;bt++,tn=ue.next())tn=fe(lt,oe,bt,tn.value,Ee),tn!==null&&(t&&(Jn=tn.alternate,Jn!==null&<.delete(Jn.key===null?bt:Jn.key)),te=m(tn,te,bt),Qt===null?Je=tn:Qt.sibling=tn,Qt=tn);return t&<.forEach(function(HN){return r(oe,HN)}),Ft&&Eo(oe,bt),Je}function It(oe,te,ue,Ee){if(typeof ue=="object"&&ue!==null&&ue.type===G&&ue.key===null&&ue.props.ref===void 0&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case z:e:{for(var Je=ue.key;te!==null;){if(te.key===Je){if(Je=ue.type,Je===G){if(te.tag===7){i(oe,te.sibling),Ee=f(te,ue.props.children),Wo(Ee,ue),Ee.return=oe,oe=Ee;break e}}else if(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===X&&Xi(Je)===te.type){i(oe,te.sibling),Ee=f(te,ue.props),Wo(Ee,ue),Ee.return=oe,oe=Ee;break e}i(oe,te);break}else r(oe,te);te=te.sibling}ue.type===G?(Ee=Bi(ue.props.children,oe.mode,Ee,ue.key),Wo(Ee,ue),Ee.return=oe,oe=Ee):(Ee=ud(ue.type,ue.key,ue.props,null,oe.mode,Ee),Wo(Ee,ue),Ee.return=oe,oe=Ee)}return E(oe);case F:e:{for(Je=ue.key;te!==null;){if(te.key===Je)if(te.tag===4&&te.stateNode.containerInfo===ue.containerInfo&&te.stateNode.implementation===ue.implementation){i(oe,te.sibling),Ee=f(te,ue.children||[]),Ee.return=oe,oe=Ee;break e}else{i(oe,te);break}else r(oe,te);te=te.sibling}Ee=lg(ue,oe.mode,Ee),Ee.return=oe,oe=Ee}return E(oe);case X:return ue=Xi(ue),It(oe,te,ue,Ee)}if(me(ue))return Ye(oe,te,ue,Ee);if(re(ue)){if(Je=re(ue),typeof Je!="function")throw Error(o(150));return ue=Je.call(ue),rt(oe,te,ue,Ee)}if(typeof ue.then=="function")return It(oe,te,bd(ue),Ee);if(ue.$$typeof===_)return It(oe,te,gd(oe,ue),Ee);xd(oe,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,te!==null&&te.tag===6?(i(oe,te.sibling),Ee=f(te,ue),Ee.return=oe,oe=Ee):(i(oe,te),Ee=sg(ue,oe.mode,Ee),Ee.return=oe,oe=Ee),E(oe)):i(oe,te)}return function(oe,te,ue,Ee){try{pu=0;var Je=It(oe,te,ue,Ee);return Fs=null,Je}catch(lt){if(lt===Us||lt===yd)throw lt;var Qt=Ur(29,lt,null,oe.mode);return Qt.lanes=Ee,Qt.return=oe,Qt}}}var Zi=rx(!0),ax=rx(!1),ei=!1;function vg(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bg(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ti(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ni(t,r,i){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(ln&2)!==0){var f=l.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),l.pending=r,r=ld(t),Fb(t,null,i),r}return sd(t,l,r,i),ld(t)}function gu(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var l=r.lanes;l&=t.pendingLanes,i|=l,r.lanes=i,On(t,i)}}function xg(t,r){var i=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var f=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var E={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?f=m=E:m=m.next=E,i=i.next}while(i!==null);m===null?f=m=r:m=m.next=r}else f=m=r;i={baseState:l.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}var Sg=!1;function mu(){if(Sg){var t=Hs;if(t!==null)throw t}}function yu(t,r,i,l){Sg=!1;var f=t.updateQueue;ei=!1;var m=f.firstBaseUpdate,E=f.lastBaseUpdate,P=f.shared.pending;if(P!==null){f.shared.pending=null;var Q=P,ie=Q.next;Q.next=null,E===null?m=ie:E.next=ie,E=Q;var pe=t.alternate;pe!==null&&(pe=pe.updateQueue,P=pe.lastBaseUpdate,P!==E&&(P===null?pe.firstBaseUpdate=ie:P.next=ie,pe.lastBaseUpdate=Q))}if(m!==null){var Ce=f.baseState;E=0,pe=ie=Q=null,P=m;do{var ae=P.lane&-536870913,fe=ae!==P.lane;if(fe?(Xt&ae)===ae:(l&ae)===ae){ae!==0&&ae===Gi&&(Sg=!0),pe!==null&&(pe=pe.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Ye=t,rt=P;ae=r;var It=i;switch(rt.tag){case 1:if(Ye=rt.payload,typeof Ye=="function"){Ce=Ye.call(It,Ce,ae);break e}Ce=Ye;break e;case 3:Ye.flags=Ye.flags&-65537|128;case 0:if(Ye=rt.payload,ae=typeof Ye=="function"?Ye.call(It,Ce,ae):Ye,ae==null)break e;Ce=k({},Ce,ae);break e;case 2:ei=!0}}ae=P.callback,ae!==null&&(t.flags|=64,fe&&(t.flags|=8192),fe=f.callbacks,fe===null?f.callbacks=[ae]:fe.push(ae))}else fe={lane:ae,tag:P.tag,payload:P.payload,callback:P.callback,next:null},pe===null?(ie=pe=fe,Q=Ce):pe=pe.next=fe,E|=ae;if(P=P.next,P===null){if(P=f.shared.pending,P===null)break;fe=P,P=fe.next,fe.next=null,f.lastBaseUpdate=fe,f.shared.pending=null}}while(!0);pe===null&&(Q=Ce),f.baseState=Q,f.firstBaseUpdate=ie,f.lastBaseUpdate=pe,m===null&&(f.shared.lanes=0),ui|=E,t.lanes=E,t.memoizedState=Ce}}function ox(t,r){if(typeof t!="function")throw Error(o(191,t));t.call(r)}function ix(t,r){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)ox(i[t],r)}var ri=Me(null),Sd=Me(0);function sx(t,r){t=No,Fe(Sd,t),Fe(ri,r),No=t|r.baseLanes}function wg(){Fe(Sd,No),Fe(ri,ri.current)}function Rg(){No=Sd.current,Le(ri),Le(Sd)}var mr=Me(null),Rr=null;function ai(t){var r=t.alternate;Fe(yr,yr.current&1),Fe(mr,t),Rr===null&&(r===null||ri.current!==null||r.memoizedState!==null)&&(Rr=t)}function Eg(t){Fe(yr,yr.current),Fe(mr,t),Rr===null&&(Rr=t)}function lx(t){t.tag===22?(Fe(yr,yr.current),Fe(mr,t),Rr===null&&(Rr=t)):oi()}function oi(){Fe(yr,yr.current),Fe(mr,mr.current)}function na(t){Le(mr),Rr===t&&(Rr=null),Le(yr)}var yr=Me(0);function vu(t,r){Fe(mr,mr.current),Fe(yr,r)}function Cg(t){Le(yr),Le(mr),Rr===t&&(Rr=null)}function wd(t){for(var r=t;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Gm(i)||$m(i)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!=="independent"){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Oo=0,Nt=null,bn=null,Qn=null,Rd=!1,Bs=!1,Ji=!1,Ed=0,bu=0,Vs=null,iD=0;function Bn(){throw Error(o(321))}function Tg(t,r){if(r===null)return!1;for(var i=0;i<r.length&&i<t.length;i++)if(!ta(t[i],r[i]))return!1;return!0}function Og(t,r,i,l,f,m){return Oo=m,Nt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,ge.H=t===null||t.memoizedState===null?Yx:Kx,Ji=!1,m=i(l,f),Ji=!1,Bs&&(m=cx(r,i,l,f)),ux(t),m}function ux(t){ge.H=Nd;var r=bn!==null&&bn.next!==null;if(Oo=0,Qn=bn=Nt=null,Rd=!1,bu=0,Vs=null,r)throw Error(o(300));t===null||Zn||(t=t.dependencies,t!==null&&pd(t)&&(Zn=!0))}function cx(t,r,i,l){Nt=t;var f=0;do{if(Bs&&(Vs=null),bu=0,Bs=!1,25<=f)throw Error(o(301));if(f+=1,Qn=bn=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}ge.H=pD,m=r(i,l)}while(Bs);return m}function sD(){var t=ge.H,r=t.useState()[0];return r=typeof r.then=="function"?xu(r):r,t=t.useState()[0],(bn!==null?bn.memoizedState:null)!==t&&(Nt.flags|=1024),r}function Mg(){var t=Ed!==0;return Ed=0,t}function Ag(t,r,i){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~i}function Dg(t){if(Rd){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Rd=!1}Oo=0,Qn=bn=Nt=null,Bs=!1,bu=Ed=0,Vs=null}function Nr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qn===null?Nt.memoizedState=Qn=t:Qn=Qn.next=t,Qn}function Kn(){if(bn===null){var t=Nt.alternate;t=t!==null?t.memoizedState:null}else t=bn.next;var r=Qn===null?Nt.memoizedState:Qn.next;if(r!==null)Qn=r,bn=t;else{if(t===null)throw Nt.alternate===null?Error(o(467)):Error(o(310));bn=t,t={memoizedState:bn.memoizedState,baseState:bn.baseState,baseQueue:bn.baseQueue,queue:bn.queue,next:null},Qn===null?Nt.memoizedState=Qn=t:Qn=Qn.next=t}return Qn}function Cd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xu(t){var r=bu;return bu+=1,Vs===null&&(Vs=[]),t=ex(Vs,t,r),r=Nt,(Qn===null?r.memoizedState:Qn.next)===null&&(r=r.alternate,ge.H=r===null||r.memoizedState===null?Yx:Kx),t}function Td(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return xu(t);if(t.$$typeof===B)return;if(t.$$typeof===_)return gr(t)}throw Error(o(438,String(t)))}function Ng(t){var r=null,i=Nt.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var l=Nt.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Cd(),Nt.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(t),l=0;l<t;l++)i[l]=se;return r.index++,i}function Mo(t,r){return typeof r=="function"?r(t):r}function Od(t){var r=Kn();return Ig(r,bn,t)}function Ig(t,r,i){var l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var f=t.baseQueue,m=l.pending;if(m!==null){if(f!==null){var E=f.next;f.next=m.next,m.next=E}r.baseQueue=f=m,l.pending=null}if(m=t.baseState,f===null)t.memoizedState=m;else{r=f.next;var P=E=null,Q=null,ie=r,pe=!1;do{var Ce=ie.lane&-536870913;if(Ce!==ie.lane?(Xt&Ce)===Ce:(Oo&Ce)===Ce){var ae=ie.revertLane;if(ae===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),Ce===Gi&&(pe=!0);else if((Oo&ae)===ae){ie=ie.next,ae===Gi&&(pe=!0);continue}else Ce={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},Q===null?(P=Q=Ce,E=m):Q=Q.next=Ce,Nt.lanes|=ae,ui|=ae;Ce=ie.action,Ji&&i(m,Ce),m=ie.hasEagerState?ie.eagerState:i(m,Ce)}else ae={lane:Ce,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},Q===null?(P=Q=ae,E=m):Q=Q.next=ae,Nt.lanes|=Ce,ui|=Ce;ie=ie.next}while(ie!==null&&ie!==r);if(Q===null?E=m:Q.next=P,!ta(m,t.memoizedState)&&(Zn=!0,pe&&(i=Hs,i!==null)))throw i;t.memoizedState=m,t.baseState=E,t.baseQueue=Q,l.lastRenderedState=m}return f===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function jg(t){var r=Kn(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var l=i.dispatch,f=i.pending,m=r.memoizedState;if(f!==null){i.pending=null;var E=f=f.next;do m=t(m,E.action),E=E.next;while(E!==f);ta(m,r.memoizedState)||(Zn=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),i.lastRenderedState=m}return[m,l]}function dx(t,r,i){var l=Nt,f=Kn(),m=Ft;if(m){if(i===void 0)throw Error(o(407));i=i()}else i=r();var E=!ta((bn||f).memoizedState,i);if(E&&(f.memoizedState=i,Zn=!0),f=f.queue,Lg(px.bind(null,l,f,t),[t]),t=f.getSnapshot!==r||E||Qn!==null&&(Qn.memoizedState.tag&1)!==0,qs(t?9:8,{destroy:void 0},hx.bind(null,l,f,i,r),null),t){if(l.flags|=2048,Tn===null)throw Error(o(349));m||(Oo&127)!==0||fx(l,r,i)}return i}function fx(t,r,i){t.flags|=16384,t={getSnapshot:r,value:i},r=Nt.updateQueue,r===null?(r=Cd(),Nt.updateQueue=r,r.stores=[t]):(i=r.stores,i===null?r.stores=[t]:i.push(t))}function hx(t,r,i,l){r.value=i,r.getSnapshot=l,gx(r)&&mx(t)}function px(t,r,i){return i(function(){gx(r)&&mx(t)})}function gx(t){var r=t.getSnapshot;t=t.value;try{var i=r();return!ta(t,i)}catch{return!0}}function mx(t){var r=Fi(t,2);r!==null&&qr(r,t,2)}function kg(t){var r=Nr();if(typeof t=="function"){var i=t;if(t=i(),Ji){Ge(!0);try{i()}finally{Ge(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:t},r}function yx(t,r,i,l){return t.baseState=i,Ig(t,bn,typeof l=="function"?l:Mo)}function lD(t,r,i,l,f){if(Dd(t))throw Error(o(485));if(t=r.action,t!==null){var m={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){m.listeners.push(E)}};ge.T!==null?i(!0):m.isTransition=!1,l(m),i=r.pending,i===null?(m.next=r.pending=m,vx(r,m)):(m.next=i.next,r.pending=i.next=m)}}function vx(t,r){var i=r.action,l=r.payload,f=t.state;if(r.isTransition){var m=ge.T,E={};E.types=m!==null?m.types:null,ge.T=E;try{var P=i(f,l),Q=ge.S;Q!==null&&Q(E,P),bx(t,r,P)}catch(ie){Pg(t,r,ie)}finally{m!==null&&E.types!==null&&(m.types=E.types),ge.T=m}}else try{m=i(f,l),bx(t,r,m)}catch(ie){Pg(t,r,ie)}}function bx(t,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){xx(t,r,l)},function(l){return Pg(t,r,l)}):xx(t,r,i)}function xx(t,r,i){r.status="fulfilled",r.value=i,Sx(r),t.state=i,r=t.pending,r!==null&&(i=r.next,i===r?t.pending=null:(i=i.next,r.next=i,vx(t,i)))}function Pg(t,r,i){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=i,Sx(r),r=r.next;while(r!==l)}t.action=null}function Sx(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function wx(t,r){return r}function Rx(t,r){if(Ft){var i=Tn.formState;if(i!==null){e:{var l=Nt;if(Ft){if(An){t:{for(var f=An,m=xa;f.nodeType!==8;){if(!m){f=null;break t}if(f=wa(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){An=wa(f.nextSibling),l=f.data==="F!";break e}}Zo(l)}l=!1}l&&(r=i[0])}}return i=Nr(),i.memoizedState=i.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wx,lastRenderedState:r},i.queue=l,i=Bx.bind(null,Nt,l),l.dispatch=i,l=kg(!1),m=Fg.bind(null,Nt,!1,l.queue),l=Nr(),f={state:r,dispatch:null,action:t,pending:null},l.queue=f,i=lD.bind(null,Nt,f,m,i),f.dispatch=i,l.memoizedState=t,[r,i,!1]}function Ex(t){var r=Kn();return Cx(r,bn,t)}function Cx(t,r,i){if(r=Ig(t,r,wx)[0],t=Od(Mo)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var l=xu(r)}catch(E){throw E===Us?yd:E}else l=r;r=Kn();var f=r.queue,m=f.dispatch;return i!==r.memoizedState&&(Nt.flags|=2048,qs(9,{destroy:void 0},uD.bind(null,f,i),null)),[l,m,t]}function uD(t,r){t.action=r}function Tx(t){var r=Kn(),i=bn;if(i!==null)return Cx(r,i,t);Kn(),r=r.memoizedState,i=Kn();var l=i.queue.dispatch;return i.memoizedState=t,[r,l,!1]}function qs(t,r,i,l){return t={tag:t,create:i,deps:l,inst:r,next:null},r=Nt.updateQueue,r===null&&(r=Cd(),Nt.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=t.next=t:(l=i.next,i.next=t,t.next=l,r.lastEffect=t),t}function Ox(){return Kn().memoizedState}function Md(t,r,i,l){var f=Nr();Nt.flags|=t,f.memoizedState=qs(1|r,{destroy:void 0},i,l===void 0?null:l)}function Ad(t,r,i,l){var f=Kn();l=l===void 0?null:l;var m=f.memoizedState.inst;bn!==null&&l!==null&&Tg(l,bn.memoizedState.deps)?f.memoizedState=qs(r,m,i,l):(Nt.flags|=t,f.memoizedState=qs(1|r,m,i,l))}function Mx(t,r){Md(8390656,8,t,r)}function Lg(t,r){Ad(2048,8,t,r)}function cD(t){Nt.flags|=4;var r=Nt.updateQueue;if(r===null)r=Cd(),Nt.updateQueue=r,r.events=[t];else{var i=r.events;i===null?r.events=[t]:i.push(t)}}function Ax(t){var r=Kn().memoizedState;return cD({ref:r,nextImpl:t}),function(){if((ln&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}function Dx(t,r){return Ad(4,2,t,r)}function Nx(t,r){return Ad(4,4,t,r)}function Ix(t,r){if(typeof r=="function"){t=t();var i=r(t);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function jx(t,r,i){i=i!=null?i.concat([t]):null,Ad(4,4,Ix.bind(null,r,t),i)}function zg(){}function kx(t,r){var i=Kn();r=r===void 0?null:r;var l=i.memoizedState;return r!==null&&Tg(r,l[1])?l[0]:(i.memoizedState=[t,r],t)}function Px(t,r){var i=Kn();r=r===void 0?null:r;var l=i.memoizedState;if(r!==null&&Tg(r,l[1]))return l[0];if(l=t(),Ji){Ge(!0);try{t()}finally{Ge(!1)}}return i.memoizedState=[l,r],l}function _g(t,r,i){return i===void 0||(Oo&1073741824)!==0&&(Xt&261930)===0?t.memoizedState=r:(t.memoizedState=i,t=Y2(),Nt.lanes|=t,ui|=t,i)}function Lx(t,r,i,l){return ta(i,r)?i:ri.current!==null?(t=_g(t,i,l),ta(t,r)||(Zn=!0),t):(Oo&106)===0||(Oo&1073741824)!==0&&(Xt&261930)===0?(Zn=!0,t.memoizedState=i):(t=Y2(),Nt.lanes|=t,ui|=t,r)}function zx(t,r,i,l,f){var m=ce.p;ce.p=m!==0&&8>m?m:8;var E=ge.T,P={};P.types=E!==null?E.types:null,ge.T=P,Fg(t,!1,r,i);try{var Q=f(),ie=ge.S;if(ie!==null&&ie(P,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var pe=oD(Q,l);Su(t,r,pe,ia(t))}else Su(t,r,l,ia(t))}catch(Ce){Su(t,r,{then:function(){},status:"rejected",reason:Ce},ia())}finally{ce.p=m,E!==null&&P.types!==null&&(E.types=P.types),ge.T=E}}function dD(){}function Hg(t,r,i,l){if(t.tag!==5)throw Error(o(476));var f=_x(t).queue;zx(t,f,r,Te,i===null?dD:function(){return Hx(t),i(l)})}function _x(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:Te,baseState:Te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:Te},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:i},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function Hx(t){var r=_x(t);r.next===null&&(r=t.alternate.memoizedState),Su(t,r.next.queue,{},ia())}function Ug(){return gr(ul)}function Ux(){return Kn().memoizedState}function Fx(){return Kn().memoizedState}function fD(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var i=ia();t=ti(i);var l=ni(r,t,i);l!==null&&(qr(l,r,i),gu(l,r,i)),r={cache:pg()},t.payload=r;return}r=r.return}}function hD(t,r,i){var l=ia();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Dd(t)?Vx(r,i):(i=og(t,r,i,l),i!==null&&(qr(i,t,l),qx(i,r,l)))}function Bx(t,r,i){var l=ia();Su(t,r,i,l)}function Su(t,r,i,l){var f={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Dd(t))Vx(r,f);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var E=r.lastRenderedState,P=m(E,i);if(f.hasEagerState=!0,f.eagerState=P,ta(P,E))return sd(t,r,f,0),Tn===null&&id(),!1}catch{}if(i=og(t,r,f,l),i!==null)return qr(i,t,l),qx(i,r,l),!0}return!1}function Fg(t,r,i,l){if(l={lane:2,revertLane:Nm(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Dd(t)){if(r)throw Error(o(479))}else r=og(t,i,l,2),r!==null&&qr(r,t,2)}function Dd(t){var r=t.alternate;return t===Nt||r!==null&&r===Nt}function Vx(t,r){Bs=Rd=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function qx(t,r,i){if((i&4194048)!==0){var l=r.lanes;l&=t.pendingLanes,i|=l,r.lanes=i,On(t,i)}}var Nd={readContext:gr,use:Td,useCallback:Bn,useContext:Bn,useEffect:Bn,useImperativeHandle:Bn,useLayoutEffect:Bn,useInsertionEffect:Bn,useMemo:Bn,useReducer:Bn,useRef:Bn,useState:Bn,useDebugValue:Bn,useDeferredValue:Bn,useTransition:Bn,useSyncExternalStore:Bn,useId:Bn,useHostTransitionStatus:Bn,useFormState:Bn,useActionState:Bn,useOptimistic:Bn,useMemoCache:Bn,useCacheRefresh:Bn,useEffectEvent:Bn},Yx={readContext:gr,use:Td,useCallback:function(t,r){return Nr().memoizedState=[t,r===void 0?null:r],t},useContext:gr,useEffect:Mx,useImperativeHandle:function(t,r,i){i=i!=null?i.concat([t]):null,Md(4194308,4,Ix.bind(null,r,t),i)},useLayoutEffect:function(t,r){return Md(4194308,4,t,r)},useInsertionEffect:function(t,r){Md(4,2,t,r)},useMemo:function(t,r){var i=Nr();r=r===void 0?null:r;var l=t();if(Ji){Ge(!0);try{t()}finally{Ge(!1)}}return i.memoizedState=[l,r],l},useReducer:function(t,r,i){var l=Nr();if(i!==void 0){var f=i(r);if(Ji){Ge(!0);try{i(r)}finally{Ge(!1)}}}else f=r;return l.memoizedState=l.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},l.queue=t,t=t.dispatch=hD.bind(null,Nt,t),[l.memoizedState,t]},useRef:function(t){var r=Nr();return t={current:t},r.memoizedState=t},useState:function(t){t=kg(t);var r=t.queue,i=Bx.bind(null,Nt,r);return r.dispatch=i,[t.memoizedState,i]},useDebugValue:zg,useDeferredValue:function(t,r){var i=Nr();return _g(i,t,r)},useTransition:function(){var t=kg(!1);return t=zx.bind(null,Nt,t.queue,!0,!1),Nr().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,i){var l=Nt,f=Nr();if(Ft){if(i===void 0)throw Error(o(407));i=i()}else{if(i=r(),Tn===null)throw Error(o(349));(Xt&127)!==0||fx(l,r,i)}f.memoizedState=i;var m={value:i,getSnapshot:r};return f.queue=m,Mx(px.bind(null,l,m,t),[t]),l.flags|=2048,qs(9,{destroy:void 0},hx.bind(null,l,m,i,r),null),i},useId:function(){var t=Nr(),r=Tn.identifierPrefix;if(Ft){var i=Xa,l=$a;i=(l&~(1<<32-et(l)-1)).toString(32)+i,r="_"+r+"R_"+i,i=Ed++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=iD++,r="_"+r+"r_"+i.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:Ug,useFormState:Rx,useActionState:Rx,useOptimistic:function(t){var r=Nr();r.memoizedState=r.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=Fg.bind(null,Nt,!0,i),i.dispatch=r,[t,r]},useMemoCache:Ng,useCacheRefresh:function(){return Nr().memoizedState=fD.bind(null,Nt)},useEffectEvent:function(t){var r=Nr(),i={impl:t};return r.memoizedState=i,function(){if((ln&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Kx={readContext:gr,use:Td,useCallback:kx,useContext:gr,useEffect:Lg,useImperativeHandle:jx,useInsertionEffect:Dx,useLayoutEffect:Nx,useMemo:Px,useReducer:Od,useRef:Ox,useState:function(){return Od(Mo)},useDebugValue:zg,useDeferredValue:function(t,r){var i=Kn();return Lx(i,bn.memoizedState,t,r)},useTransition:function(){var t=Od(Mo)[0],r=Kn().memoizedState;return[typeof t=="boolean"?t:xu(t),r]},useSyncExternalStore:dx,useId:Ux,useHostTransitionStatus:Ug,useFormState:Ex,useActionState:Ex,useOptimistic:function(t,r){var i=Kn();return yx(i,bn,t,r)},useMemoCache:Ng,useCacheRefresh:Fx,useEffectEvent:Ax},pD={readContext:gr,use:Td,useCallback:kx,useContext:gr,useEffect:Lg,useImperativeHandle:jx,useInsertionEffect:Dx,useLayoutEffect:Nx,useMemo:Px,useReducer:jg,useRef:Ox,useState:function(){return jg(Mo)},useDebugValue:zg,useDeferredValue:function(t,r){var i=Kn();return bn===null?_g(i,t,r):Lx(i,bn.memoizedState,t,r)},useTransition:function(){var t=jg(Mo)[0],r=Kn().memoizedState;return[typeof t=="boolean"?t:xu(t),r]},useSyncExternalStore:dx,useId:Ux,useHostTransitionStatus:Ug,useFormState:Tx,useActionState:Tx,useOptimistic:function(t,r){var i=Kn();return bn!==null?yx(i,bn,t,r):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:Ng,useCacheRefresh:Fx,useEffectEvent:Ax};function Bg(t,r,i,l){r=t.memoizedState,i=i(l,r),i=i==null?r:k({},r,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Vg={enqueueSetState:function(t,r,i){t=t._reactInternals;var l=ia(),f=ti(l);f.payload=r,i!=null&&(f.callback=i),r=ni(t,f,l),r!==null&&(qr(r,t,l),gu(r,t,l))},enqueueReplaceState:function(t,r,i){t=t._reactInternals;var l=ia(),f=ti(l);f.tag=1,f.payload=r,i!=null&&(f.callback=i),r=ni(t,f,l),r!==null&&(qr(r,t,l),gu(r,t,l))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var i=ia(),l=ti(i);l.tag=2,r!=null&&(l.callback=r),r=ni(t,l,i),r!==null&&(qr(r,t,i),gu(r,t,i))}};function Gx(t,r,i,l,f,m,E){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,m,E):r.prototype&&r.prototype.isPureReactComponent?!su(i,l)||!su(f,m):!0}function $x(t,r,i,l){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,l),r.state!==t&&Vg.enqueueReplaceState(r,r.state,null)}function Wi(t,r){var i=r;if("ref"in r){i={};for(var l in r)l!=="ref"&&(i[l]=r[l])}if(t=t.defaultProps){i===r&&(i=k({},i));for(var f in t)i[f]===void 0&&(i[f]=t[f])}return i}function Xx(t){od(t)}function Qx(t){console.error(t)}function Zx(t){od(t)}function Id(t,r){try{var i=t.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function Jx(t,r,i){try{var l=t.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function qg(t,r,i){return i=ti(i),i.tag=3,i.payload={element:null},i.callback=function(){Id(t,r)},i}function Wx(t){return t=ti(t),t.tag=3,t}function e2(t,r,i,l){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var m=l.value;t.payload=function(){return f(m)},t.callback=function(){Jx(r,i,l)}}var E=i.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(t.callback=function(){Jx(r,i,l),typeof f!="function"&&(ci===null?ci=new Set([this]):ci.add(this));var P=l.stack;this.componentDidCatch(l.value,{componentStack:P!==null?P:""})})}function gD(t,r,i,l,f){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(r=i.alternate,r!==null&&Yi(r,i,f,!0),i=mr.current,i!==null){switch(i.tag){case 31:case 13:case 19:return Rr===null?Wd():i.alternate===null&&Vn===0&&(Vn=3),i.flags&=-257,i.flags|=65536,i.lanes=f,l===vd?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([l]):r.add(l),Mm(t,l,f)),!1;case 22:return i.flags|=65536,l===vd?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([l]):i.add(l)),Mm(t,l,f)),!1}throw Error(o(435,i.tag))}return Mm(t,l,f),Wd(),!1}if(Ft)return r=mr.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=f,l!==cg&&(t=Error(o(422),{cause:l}),cu(ya(t,i)))):(l!==cg&&(r=Error(o(423),{cause:l}),cu(ya(r,i))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,l=ya(l,i),f=qg(t.stateNode,l,f),xg(t,f),Vn!==4&&(Vn=2)),!1;var m=Error(o(520),{cause:l});if(m=ya(m,i),Au===null?Au=[m]:Au.push(m),Vn!==4&&(Vn=2),r===null)return!0;l=ya(l,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,t=f&-f,i.lanes|=t,t=qg(i.stateNode,l,t),xg(i,t),!1;case 1:if(r=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(ci===null||!ci.has(m))))return i.flags|=65536,f&=-f,i.lanes|=f,f=Wx(f),e2(f,t,i,l),xg(i,f),!1;break;case 22:if(i.memoizedState!==null)return i.flags|=65536,!1}i=i.return}while(i!==null);return!1}var Yg=Error(o(461)),Zn=!1;function rr(t,r,i,l){r.child=t===null?ax(r,null,i,l):Zi(r,t.child,i,l)}function t2(t,r,i,l,f){i=i.render;var m=r.ref;if("ref"in l){var E={};for(var P in l)P!=="ref"&&(E[P]=l[P])}else E=l;return Ki(r),l=Og(t,r,i,E,m,f),P=Mg(),t!==null&&!Zn?(Ag(t,r,f),Ao(t,r,f)):(Ft&&P&&dd(r),r.flags|=1,rr(t,r,l,f),r.child)}function n2(t,r,i,l,f){if(t===null){var m=i.type;return typeof m=="function"&&!ig(m)&&m.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=m,r2(t,r,m,l,f)):(t=ud(i.type,null,l,r,r.mode,f),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,!Wg(t,f)){var E=m.memoizedProps;if(i=i.compare,i=i!==null?i:su,i(E,l)&&t.ref===r.ref)return Ao(t,r,f)}return r.flags|=1,t=Ro(m,l),t.ref=r.ref,t.return=r,r.child=t}function r2(t,r,i,l,f){if(t!==null){var m=t.memoizedProps;if(su(m,l)&&t.ref===r.ref)if(Zn=!1,r.pendingProps=l=m,Wg(t,f))(t.flags&131072)!==0&&(Zn=!0);else return r.lanes=t.lanes,Ao(t,r,f)}return Kg(t,r,i,l,f)}function a2(t,r,i,l){var f=l.children,m=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|i:i,t!==null){for(l=r.child=t.child,f=0;l!==null;)f=f|l.lanes|l.childLanes,l=l.sibling;l=f&~m}else l=0,r.child=null;return o2(t,r,m,i,l)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&md(r,m!==null?m.cachePool:null),m!==null?sx(r,m):wg(),lx(r);else return l=r.lanes=536870912,o2(t,r,m!==null?m.baseLanes|i:i,i,l)}else m!==null?(md(r,m.cachePool),sx(r,m),oi(),r.memoizedState=null):(t!==null&&md(r,null),wg(),oi());return rr(t,r,f,i),r.child}function wu(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function o2(t,r,i,l,f){var m=mg();return m=m===null?null:{parent:Xn._currentValue,pool:m},r.memoizedState={baseLanes:i,cachePool:m},t!==null&&md(r,null),wg(),lx(r),t!==null&&Yi(t,r,l,!0),r.childLanes=f,null}function jd(t,r){return r=kd({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function i2(t,r,i){return Zi(r,t.child,null,i),t=jd(r,r.pendingProps),t.flags|=2,na(r),r.memoizedState=null,t}function mD(t,r,i){var l=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Ft){if(l.mode==="hidden")return t=jd(r,l),r.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},wu(null,t);if(Eg(r),(t=An)?(t=I1(t,xa),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Xo!==null?{id:$a,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},i=Vb(t),i.return=r,r.child=i,ir=r,An=null)):t=null,t===null)throw Zo(r);return r.lanes=536870912,null}return jd(r,l)}var m=t.memoizedState;if(m!==null){var E=m.dehydrated;if(Eg(r),f)if(r.flags&256)r.flags&=-257,r=i2(t,r,i);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(o(558));else if(Zn||Yi(t,r,i,!1),f=(i&t.childLanes)!==0,Zn||f){if(ri.current===null){if(l=Tn,l!==null&&(E=Vt(l,i),E!==0&&E!==m.retryLane))throw m.retryLane=E,Fi(t,E),qr(l,t,E),Yg;Wd()}r=i2(t,r,i)}else t=m.treeContext,An=wa(E.nextSibling),ir=r,Ft=!0,Qo=null,xa=!1,t!==null&&Kb(r,t),r=jd(r,l),r.flags|=134221824;return r}return t=Ro(t.child,{mode:l.mode,children:l.children}),t.ref=r.ref,r.child=t,t.return=r,t}function Ys(t,r){var i=r.ref;if(i===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(t===null||t.ref!==i)&&(r.flags|=4194816)}}function Kg(t,r,i,l,f){return Ki(r),i=Og(t,r,i,l,void 0,f),l=Mg(),t!==null&&!Zn?(Ag(t,r,f),Ao(t,r,f)):(Ft&&l&&dd(r),r.flags|=1,rr(t,r,i,f),r.child)}function s2(t,r,i,l,f,m){return Ki(r),r.updateQueue=null,i=cx(r,l,i,f),ux(t),l=Mg(),t!==null&&!Zn?(Ag(t,r,m),Ao(t,r,m)):(Ft&&l&&dd(r),r.flags|=1,rr(t,r,i,m),r.child)}function l2(t,r,i,l,f){if(Ki(r),r.stateNode===null){var m=Ps,E=i.contextType;typeof E=="object"&&E!==null&&(m=gr(E)),m=new i(l,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Vg,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=l,m.state=r.memoizedState,m.refs={},vg(r),E=i.contextType,m.context=typeof E=="object"&&E!==null?gr(E):Ps,m.state=r.memoizedState,E=i.getDerivedStateFromProps,typeof E=="function"&&(Bg(r,i,E,l),m.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(E=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),E!==m.state&&Vg.enqueueReplaceState(m,m.state,null),yu(r,l,m,f),mu(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(t===null){m=r.stateNode;var P=r.memoizedProps,Q=Wi(i,P);m.props=Q;var ie=m.context,pe=i.contextType;E=Ps,typeof pe=="object"&&pe!==null&&(E=gr(pe));var Ce=i.getDerivedStateFromProps;pe=typeof Ce=="function"||typeof m.getSnapshotBeforeUpdate=="function",P=r.pendingProps!==P,pe||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(P||ie!==E)&&$x(r,m,l,E),ei=!1;var ae=r.memoizedState;m.state=ae,yu(r,l,m,f),mu(),ie=r.memoizedState,P||ae!==ie||ei?(typeof Ce=="function"&&(Bg(r,i,Ce,l),ie=r.memoizedState),(Q=ei||Gx(r,i,Q,l,ae,ie,E))?(pe||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=ie),m.props=l,m.state=ie,m.context=E,l=Q):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{m=r.stateNode,bg(t,r),E=r.memoizedProps,pe=Wi(i,E),m.props=pe,Ce=r.pendingProps,ae=m.context,ie=i.contextType,Q=Ps,typeof ie=="object"&&ie!==null&&(Q=gr(ie)),P=i.getDerivedStateFromProps,(ie=typeof P=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E!==Ce||ae!==Q)&&$x(r,m,l,Q),ei=!1,ae=r.memoizedState,m.state=ae,yu(r,l,m,f),mu();var fe=r.memoizedState;E!==Ce||ae!==fe||ei||t!==null&&t.dependencies!==null&&pd(t.dependencies)?(typeof P=="function"&&(Bg(r,i,P,l),fe=r.memoizedState),(pe=ei||Gx(r,i,pe,l,ae,fe,Q)||t!==null&&t.dependencies!==null&&pd(t.dependencies))?(ie||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,fe,Q),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,fe,Q)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=fe),m.props=l,m.state=fe,m.context=Q,l=pe):(typeof m.componentDidUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=1024),l=!1)}return m=l,Ys(t,r),l=(r.flags&128)!==0,m||l?(m=r.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,t!==null&&l?(r.child=Zi(r,t.child,null,f),r.child=Zi(r,null,i,f)):rr(t,r,i,f),r.memoizedState=m.state,t=r.child):t=Ao(t,r,f),t}function u2(t,r,i,l){return Vi(),r.flags|=256,rr(t,r,i,l),r.child}var Gg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $g(t){return{baseLanes:t,cachePool:Jb()}}function Xg(t,r,i){return t=t!==null?t.childLanes&~i:0,r&&(t|=oa),t}function c2(t,r,i){var l=r.pendingProps,f=!1,m=(r.flags&128)!==0,E;if((E=m)||(E=t!==null&&t.memoizedState===null?!1:(yr.current&2)!==0),E&&(f=!0,r.flags&=-129),E=(r.flags&32)!==0,r.flags&=-33,t===null){if(Ft){if(f?ai(r):oi(),(t=An)?(t=I1(t,xa),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Xo!==null?{id:$a,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},i=Vb(t),i.return=r,r.child=i,ir=r,An=null)):t=null,t===null)throw Zo(r);return $m(t)?r.lanes=32:r.lanes=536870912,null}return m=l.children,l=l.fallback,f?(oi(),f=r.mode,m=kd({mode:"hidden",children:m},f),l=Bi(l,f,i,null),m.return=r,l.return=r,m.sibling=l,r.child=m,l=r.child,l.memoizedState=$g(i),l.childLanes=Xg(t,E,i),r.memoizedState=Gg,wu(null,l)):(ai(r),Qg(r,m))}var P=t.memoizedState;if(P!==null){var Q=P.dehydrated;if(Q!==null)return yD(t,r,m,E,l,Q,P,i)}return f?(oi(),f=l.fallback,m=r.mode,P=t.child,Q=P.sibling,l=Ro(P,{mode:"hidden",children:l.children}),l.subtreeFlags=P.subtreeFlags&1206910976,Q!==null?f=Ro(Q,f):(f=Bi(f,m,i,null),f.flags|=2),f.return=r,l.return=r,l.sibling=f,r.child=l,wu(null,l),l=r.child,f=t.child.memoizedState,f===null?f=$g(i):(m=f.cachePool,m!==null?(P=Xn._currentValue,m=m.parent!==P?{parent:P,pool:P}:m):m=Jb(),f={baseLanes:f.baseLanes|i,cachePool:m}),l.memoizedState=f,l.childLanes=Xg(t,E,i),r.memoizedState=Gg,wu(t.child,l)):(ai(r),i=t.child,t=i.sibling,i=Ro(i,{mode:"visible",children:l.children}),i.return=r,i.sibling=null,t!==null&&(E=r.deletions,E===null?(r.deletions=[t],r.flags|=16):E.push(t)),r.child=i,r.memoizedState=null,i)}function Qg(t,r){return r=kd({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function kd(t,r){return t=Ur(22,t,null,r),t.lanes=0,t}function Pd(t,r,i){return Zi(r,t.child,null,i),t=Qg(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function yD(t,r,i,l,f,m,E,P){if(i)return r.flags&256?(ai(r),r.flags&=-257,Pd(t,r,P)):r.memoizedState!==null?(oi(),r.child=t.child,r.flags|=128,null):(oi(),m=f.fallback,E=r.mode,f=kd({mode:"visible",children:f.children},E),m=Bi(m,E,P,null),m.flags|=2,f.return=r,m.return=r,f.sibling=m,r.child=f,Zi(r,t.child,null,P),f=r.child,f.memoizedState=$g(P),f.childLanes=Xg(t,l,P),r.memoizedState=Gg,wu(null,f));if(ai(r),$m(m)){if(l=m.nextSibling&&m.nextSibling.dataset,l)var Q=l.dgst;return l=Q,l!==""&&(f=Error(o(419)),f.stack="",f.digest=l,cu({value:f,source:null,stack:null})),Pd(t,r,P)}if(Zn||Yi(t,r,P,!1),l=(P&t.childLanes)!==0,Zn||l){if(ri.current!==null)return Pd(t,r,P);if(l=Tn,l!==null&&(f=Vt(l,P),f!==0&&f!==E.retryLane))throw E.retryLane=f,Fi(t,f),qr(l,t,f),Yg;return Gm(m)||Wd(),Pd(t,r,P)}return Gm(m)?(r.flags|=192,r.child=t.child,null):(t=E.treeContext,An=wa(m.nextSibling),ir=r,Ft=!0,Qo=null,xa=!1,t!==null&&Kb(r,t),r=Qg(r,f.children),r.flags|=134221824,r)}function d2(t,r,i){t.lanes|=r;var l=t.alternate;l!==null&&(l.lanes|=r),hd(t.return,r,i)}function f2(t){for(var r=null;t!==null;){var i=t.alternate;i!==null&&wd(i)===null&&(r=t),t=t.sibling}return r}function Ld(t,r,i,l,f,m){var E=t.memoizedState;E===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:f,treeForkCount:m}:(E.isBackwards=r,E.rendering=null,E.renderingStartTime=0,E.last=l,E.tail=i,E.tailMode=f,E.treeForkCount=m)}function Zg(t){var r=t.child;for(t.child=null;r!==null;){var i=r.sibling;r.sibling=t.child,t.child=r,r=i}}function Jg(t,r,i){var l=r.pendingProps,f=l.revealOrder,m=l.tail;l=l.children;var E=yr.current;if(r.flags&128)return vu(r,E),null;var P=(E&2)!==0;if(P?(E=E&1|2,r.flags|=128):E&=1,vu(r,E),f==="backwards"&&t!==null?(Zg(t),rr(t,r,l,i),Zg(t)):rr(t,r,l,i),l=Ft?uu:0,!P&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&d2(t,i,r);else if(t.tag===19)d2(t,i,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"backwards":i=f2(r.child),i===null?(f=r.child,r.child=null):(f=i.sibling,i.sibling=null,Zg(r)),Ld(r,!0,f,null,m,l);break;case"unstable_legacy-backwards":for(i=null,f=r.child,r.child=null;f!==null;){if(t=f.alternate,t!==null&&wd(t)===null){r.child=f;break}t=f.sibling,f.sibling=i,i=f,f=t}Ld(r,!0,i,null,m,l);break;case"together":Ld(r,!1,null,null,void 0,l);break;case"independent":r.memoizedState=null;break;default:i=f2(r.child),i===null?(f=r.child,r.child=null):(f=i.sibling,i.sibling=null),Ld(r,!1,f,i,m,l)}return r.child}function h2(t,r,i){var l=r.pendingProps;return Jo(r,r.type,l.value),rr(t,r,l.children,i),r.child}function Ao(t,r,i){if(t!==null&&(r.dependencies=t.dependencies),ui|=r.lanes,(i&r.childLanes)===0)if(t!==null){if(Yi(t,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(o(153));if(r.child!==null){for(t=r.child,i=Ro(t,t.pendingProps),r.child=i,i.return=r;t.sibling!==null;)t=t.sibling,i=i.sibling=Ro(t,t.pendingProps),i.return=r;i.sibling=null}return r.child}function Wg(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&pd(t)))}function vD(t,r,i){switch(r.tag){case 3:Ze(r,r.stateNode.containerInfo),Jo(r,Xn,t.memoizedState.cache),Vi();break;case 27:case 5:de(r);break;case 4:Ze(r,r.stateNode.containerInfo);break;case 10:Jo(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Eg(r),null;break;case 13:var l=r.memoizedState;if(l!==null){if(l.dehydrated!==null)return ai(r),r.flags|=128,null;l=Yi(t,r,i,!1);var f=r.child.childLanes;return l||(i&f)!==0?c2(t,r,i):(ai(r),t=Ao(t,r,i),t!==null?t.sibling:null)}ai(r);break;case 19:if(r.flags&128)return Jg(t,r,i);if(f=(t.flags&128)!==0,l=(i&r.childLanes)!==0,l||(Yi(t,r,i,!1),l=(i&r.childLanes)!==0),f){if(l)return Jg(t,r,i);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),vu(r,yr.current),l)break;return null;case 22:return r.lanes=0,a2(t,r,i,r.pendingProps);case 24:Jo(r,Xn,t.memoizedState.cache)}return Ao(t,r,i)}function p2(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps)Zn=!0;else{if(!Wg(t,i)&&(r.flags&128)===0)return Zn=!1,vD(t,r,i);Zn=(t.flags&131072)!==0}else Zn=!1,Ft&&(r.flags&1048576)!==0&&Yb(r,uu,r.index);switch(r.lanes=0,r.tag){case 16:e:{var l=r.pendingProps;if(t=Xi(r.elementType),r.type=t,typeof t=="function")ig(t)?(l=Wi(t,l),r.tag=1,r=l2(null,r,t,l,i)):(r.tag=0,r=Kg(null,r,t,l,i));else{if(t!=null){var f=t.$$typeof;if(f===L){r.tag=11,r=t2(null,r,t,l,i);break e}else if(f===V){r.tag=14,r=n2(null,r,t,l,i);break e}else if(f===_){r.tag=10,r.type=t,r=h2(null,r,i);break e}}throw r=le(t)||t,Error(o(306,r,""))}}return r;case 0:return Kg(t,r,r.type,r.pendingProps,i);case 1:return l=r.type,f=Wi(l,r.pendingProps),l2(t,r,l,f,i);case 3:e:{if(Ze(r,r.stateNode.containerInfo),t===null)throw Error(o(387));l=r.pendingProps;var m=r.memoizedState;f=m.element,bg(t,r),yu(r,l,null,i);var E=r.memoizedState;if(l=E.cache,Jo(r,Xn,l),l!==m.cache&&hg(r,[Xn],i,!0),mu(),l=E.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:E.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=u2(t,r,l,i);break e}else if(l!==f){f=ya(Error(o(424)),r),cu(f),r=u2(t,r,l,i);break e}else for(t=r.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,An=wa(t.firstChild),ir=r,Ft=!0,Qo=null,xa=!0,i=ax(r,null,l,i),r.child=i;i;)i.flags=i.flags&-3|134221824,i=i.sibling;else{if(Vi(),l===f){r=Ao(t,r,i);break e}rr(t,r,l,i)}r=r.child}return r;case 26:return Ys(t,r),t===null?(i=H1(r.type,null,r.pendingProps,null))?r.memoizedState=i:Ft||(r.stateNode=v1(r.type,r.pendingProps,be.current,r)):r.memoizedState=H1(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return de(r),t===null&&Ft&&(l=r.stateNode=P1(r.type,r.pendingProps,be.current),ir=r,xa=!0,f=An,hi(r.type)?(Xm=f,An=wa(l.firstChild)):An=f),rr(t,r,r.pendingProps.children,i),Ys(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Ft&&((f=l=An)&&(l=fN(l,r.type,r.pendingProps,xa),l!==null?(r.stateNode=l,ir=r,An=wa(l.firstChild),xa=!1,f=!0):f=!1),f||Zo(r)),de(r),f=r.type,m=r.pendingProps,E=t!==null?t.memoizedProps:null,l=m.children,Um(f,m)?l=null:E!==null&&Um(f,E)&&(r.flags|=32),r.memoizedState!==null&&(f=Og(t,r,sD,null,null,i),ul._currentValue=f),Ys(t,r),rr(t,r,l,i),r.child;case 6:return t===null&&Ft&&((t=i=An)&&(i=hN(i,r.pendingProps,xa),i!==null?(r.stateNode=i,ir=r,An=null,t=!0):t=!1),t||Zo(r)),null;case 13:return c2(t,r,i);case 4:return Ze(r,r.stateNode.containerInfo),l=r.pendingProps,t===null?r.child=Zi(r,null,l,i):rr(t,r,l,i),r.child;case 11:return t2(t,r,r.type,r.pendingProps,i);case 7:return l=r.pendingProps,Ys(t,r),rr(t,r,l,i),r.child;case 8:return rr(t,r,r.pendingProps.children,i),r.child;case 12:return rr(t,r,r.pendingProps.children,i),r.child;case 10:return h2(t,r,i);case 9:return f=r.type._context,l=r.pendingProps.children,Ki(r),f=gr(f),l=l(f),r.flags|=1,rr(t,r,l,i),r.child;case 14:return n2(t,r,r.type,r.pendingProps,i);case 15:return r2(t,r,r.type,r.pendingProps,i);case 19:return Jg(t,r,i);case 31:return mD(t,r,i);case 22:return a2(t,r,i,r.pendingProps);case 24:return Ki(r),l=gr(Xn),t===null?(f=mg(),f===null&&(f=Tn,m=pg(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=i),f=m),r.memoizedState={parent:l,cache:f},vg(r),Jo(r,Xn,f)):((t.lanes&i)!==0&&(bg(t,r),yu(r,null,null,i),mu()),f=t.memoizedState,m=r.memoizedState,f.parent!==l?(f={parent:l,cache:l},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),Jo(r,Xn,l)):(l=m.cache,Jo(r,Xn,l),l!==f.cache&&hg(r,[Xn],i,!0))),rr(t,r,r.pendingProps.children,i),r.child;case 30:return r.stateNode===null&&(r.stateNode={autoName:null,paired:null,clones:null,ref:null}),l=r.pendingProps,l.name!=null&&l.name!=="auto"?r.flags|=t===null?18882560:18874368:Ft&&dd(r),t!==null&&t.memoizedProps.name!==l.name?r.flags|=4194816:Ys(t,r),rr(t,r,l.children,i),r.child;case 29:throw r.pendingProps}throw Error(o(156,r.tag))}function Do(t){t.flags|=4}function em(t,r,i,l,f){var m;if((m=(t.mode&32)!==0)&&(m=i===null?V1(r,l):V1(r,l)&&(l.src!==i.src||l.srcSet!==i.srcSet)),m){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if(X2())t.flags|=8192;else throw Qi=vd,yg}else t.flags&=-16777217}function g2(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!q1(r))if(X2())t.flags|=8192;else throw Qi=vd,yg}function zd(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?tt():536870912,t.lanes|=r,Qs|=r)}function Ru(t,r){if(!Ft)switch(t.tailMode){case"visible":break;case"collapsed":for(var i=t.tail,l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null;break;default:for(r=t.tail,i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t.tail=null:i.sibling=null}}function Dn(t){var r=t.alternate!==null&&t.alternate.child===t.child,i=0,l=0;if(r)for(var f=t.child;f!==null;)i|=f.lanes|f.childLanes,l|=f.subtreeFlags&1206910976,l|=f.flags&1206910976,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)i|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=l,t.childLanes=i,r}function bD(t,r,i){var l=r.pendingProps;switch(ug(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dn(r),null;case 1:return Dn(r),null;case 3:return i=r.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),To(Xn),it(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(_s(r)?Do(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,dg())),Dn(r),null;case 26:var f=r.type,m=r.memoizedState;return t===null?(Do(r),m!==null?(Dn(r),g2(r,m)):(Dn(r),em(r,f,null,l,i))):m?m!==t.memoizedState?(Do(r),Dn(r),g2(r,m)):(Dn(r),r.flags&=-16777217):(t=t.memoizedProps,t!==l&&Do(r),Dn(r),em(r,f,t,l,i)),null;case 27:if(we(r),i=be.current,f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==l&&Do(r);else{if(!l){if(r.stateNode===null)throw Error(o(166));return Dn(r),r.subtreeFlags&=-33554433,null}t=Oe.current,_s(r)?Gb(r):(t=P1(f,l,i),r.stateNode=t,Do(r))}return Dn(r),r.subtreeFlags&=-33554433,null;case 5:if(we(r),f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==l&&Do(r);else{if(!l){if(r.stateNode===null)throw Error(o(166));return Dn(r),r.subtreeFlags&=-33554433,null}if(m=Oe.current,_s(r))Gb(r);else{var E=ku(be.current);switch(m){case 1:m=E.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=E.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=E.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=E.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=E.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof l.is=="string"?E.createElement("select",{is:l.is}):E.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?E.createElement(f,{is:l.is}):E.createElement(f)}}m[dn]=r,m[Mn]=l;e:for(E=r.child;E!==null;){if(E.tag===5||E.tag===6)m.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===r)break e;for(;E.sibling===null;){if(E.return===null||E.return===r)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}r.stateNode=m;e:switch(br(m,f,l),f){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Do(r)}}return Dn(r),r.subtreeFlags&=-33554433,em(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,i),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==l&&Do(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(o(166));if(t=be.current,_s(r)){if(t=r.stateNode,i=r.memoizedProps,l=null,f=ir,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}t[dn]=r,t=!!(t.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||p1(t.nodeValue,i)),t||Zo(r,!0)}else t=ku(t).createTextNode(l),t[dn]=r,r.stateNode=t}return Dn(r),null;case 31:if(i=r.memoizedState,t===null||t.memoizedState!==null){if(l=_s(r),i!==null){if(t===null){if(!l)throw Error(o(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[dn]=r}else Vi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Dn(r),t=!1}else i=dg(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return r.flags&256?(na(r),r):(na(r),null);if((r.flags&128)!==0)throw Error(o(558))}return Dn(r),null;case 13:if(l=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=_s(r),l!==null&&l.dehydrated!==null){if(t===null){if(!f)throw Error(o(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));f[dn]=r}else Vi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Dn(r),f=!1}else f=dg(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(na(r),r):(na(r),null)}return na(r),(r.flags&128)!==0?(r.lanes=i,r):(i=l!==null,t=t!==null&&t.memoizedState!==null,i&&(l=r.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==f&&(l.flags|=2048)),i!==t&&i&&(r.child.flags|=8192),zd(r,r.updateQueue),Dn(r),null);case 4:return it(),t===null&&Pm(r.stateNode.containerInfo),r.flags|=67108864,Dn(r),null;case 10:return To(r.type),Dn(r),null;case 19:if(Cg(r),l=r.memoizedState,l===null)return Dn(r),null;if(f=(r.flags&128)!==0,m=l.rendering,m===null)if(f)Ru(l,!1);else{if(Vn!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(m=wd(t),m!==null){for(r.flags|=128,Ru(l,!1),t=m.updateQueue,r.updateQueue=t,zd(r,t),r.subtreeFlags=0,t=i,i=r.child;i!==null;)Bb(i,t),i=i.sibling;return vu(r,yr.current&1|2),Ft&&Eo(r,l.treeForkCount),r.child}t=t.sibling}l.tail!==null&&xt()>Xd&&(r.flags|=128,f=!0,Ru(l,!1),r.lanes=4194304)}else{if(!f)if(t=wd(m),t!==null){if(r.flags|=128,f=!0,t=t.updateQueue,r.updateQueue=t,zd(r,t),Ru(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!m.alternate&&!Ft)return Dn(r),null}else 2*xt()-l.renderingStartTime>Xd&&i!==536870912&&(r.flags|=128,f=!0,Ru(l,!1),r.lanes=4194304);l.isBackwards?(m.sibling=r.child,r.child=m):(t=l.last,t!==null?t.sibling=m:r.child=m,l.last=m)}if(l.tail!==null){t=l.tail;e:{for(i=t;i!==null;){if(i.alternate!==null){i=!1;break e}i=i.sibling}i=!0}return l.rendering=t,l.tail=t.sibling,l.renderingStartTime=xt(),t.sibling=null,m=yr.current,m=f?m&1|2:m&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!i||Ft?vu(r,m):(i=m,Fe(mr,r),Fe(yr,i),Rr===null&&(Rr=r)),Ft&&Eo(r,l.treeForkCount),t}return Dn(r),null;case 22:case 23:return na(r),Rg(),l=r.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(i&536870912)!==0&&(r.flags&128)===0&&(Dn(r),r.subtreeFlags&6&&(r.flags|=8192)):Dn(r),i=r.updateQueue,i!==null&&zd(r,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==i&&(r.flags|=2048),t!==null&&Le($i),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),To(Xn),Dn(r),null;case 25:return null;case 30:return r.flags|=33554432,Dn(r),null}throw Error(o(156,r.tag))}function xD(t,r){switch(ug(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return To(Xn),it(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return we(r),null;case 31:if(r.memoizedState!==null){if(na(r),r.alternate===null)throw Error(o(340));Vi()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(na(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(o(340));Vi()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return Cg(r),t=r.flags,t&65536?(r.flags=t&-65537|128,t=r.memoizedState,t!==null&&(t.rendering=null,t.tail=null),r.flags|=4,r):null;case 4:return it(),null;case 10:return To(r.type),null;case 22:case 23:return na(r),Rg(),t!==null&&Le($i),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return To(Xn),null;case 25:return null;default:return null}}function m2(t,r){switch(ug(r),r.tag){case 3:To(Xn),it();break;case 26:case 27:case 5:we(r);break;case 4:it();break;case 31:r.memoizedState!==null&&na(r);break;case 13:na(r);break;case 19:Cg(r);break;case 10:To(r.type);break;case 22:case 23:na(r),Rg(),t!==null&&Le($i);break;case 24:To(Xn)}}function Eu(t,r){try{var i=r.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var f=l.next;i=f;do{if((i.tag&t)===t){l=void 0;var m=i.create,E=i.inst;l=m(),E.destroy=l}i=i.next}while(i!==f)}}catch(P){gn(r,r.return,P)}}function ii(t,r,i){try{var l=r.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var m=f.next;l=m;do{if((l.tag&t)===t){var E=l.inst,P=E.destroy;if(P!==void 0){E.destroy=void 0,f=r;var Q=i,ie=P;try{ie()}catch(pe){gn(f,Q,pe)}}}l=l.next}while(l!==m)}}catch(pe){gn(r,r.return,pe)}}function y2(t){var r=t.updateQueue;if(r!==null){var i=t.stateNode;try{ix(r,i)}catch(l){gn(t,t.return,l)}}}function v2(t,r,i){i.props=Wi(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(l){gn(t,r,l)}}function Qa(t,r){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:var f=t.stateNode,m=So(t.memoizedProps,f);(f.ref===null||f.ref.name!==m)&&(f.ref=C1(m)),l=f.ref;break;case 7:if(t.stateNode===null){var E=new sa(t);h(t.child,!1,cN,E,void 0,void 0),t.stateNode=E}l=t.stateNode;break;default:l=t.stateNode}typeof i=="function"?t.refCleanup=i(l):i.current=l}}catch(P){gn(t,r,P)}}function vr(t,r){var i=t.ref,l=t.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(f){gn(t,r,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){gn(t,r,f)}else i.current=null}function _d(t,r){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&r!==null)for(var i=0;i<r.length;i++)N1(t.stateNode,r[i])}function b2(t){for(var r=t.return;r!==null&&(nm(r)&&N1(t.stateNode,r.stateNode),!tm(r));)r=r.return}function Cu(t){for(var r=t.return;r!==null&&(nm(r)&&dN(t.stateNode,r.stateNode),!tm(r));)r=r.return}function tm(t){return t.tag===5||t.tag===3||t.tag===27}function nm(t){return t&&t.tag===7&&t.stateNode!==null}function rm(t){var r=t.type,i=t.memoizedProps,l=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(f){gn(t,t.return,f)}}function am(t,r,i){try{var l=t.stateNode;KD(l,t.type,i,r),l[Mn]=r}catch(f){gn(t,t.return,f)}}function x2(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&hi(t.type)||t.tag===4}function om(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||x2(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&&hi(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 im(t,r,i,l){var f=t.tag;if(f===5||f===6)f=t.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(f,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(f),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Ar)),_d(t,l),pt=!0;else if(f!==4&&(f===27&&(_d(t,l),l=null,hi(t.type)&&(i=t.stateNode,r=null)),t=t.child,t!==null))for(im(t,r,i,l),t=t.sibling;t!==null;)im(t,r,i,l),t=t.sibling}function Hd(t,r,i,l){var f=t.tag;if(f===5||f===6)f=t.stateNode,r?i.insertBefore(f,r):i.appendChild(f),_d(t,l),pt=!0;else if(f!==4&&(f===27&&(_d(t,l),l=null,hi(t.type)&&(i=t.stateNode)),t=t.child,t!==null))for(Hd(t,r,i,l),t=t.sibling;t!==null;)Hd(t,r,i,l),t=t.sibling}function S2(t){var r=t.stateNode,i=t.memoizedProps;try{for(var l=t.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);br(r,l,i),r[dn]=t,r[Mn]=i}catch(m){gn(t,t.return,m)}}var Ud=!1,ra=null;function w2(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Ud=!0)}var Za=null;function R2(){var t=Za;return Za=null,t}var Fr=0;function Ks(t,r,i,l,f){return Fr=0,E2(t.child,r,i,l,f)}function E2(t,r,i,l,f){for(var m=!1;t!==null;){if(t.tag===5){var E=t.stateNode;if(l!==null){var P=Vm(E);l.push(P),P.view&&(m=!0)}else m||Vm(E).view&&(m=!0);Ud=!0,R1(E,Fr===0?r:r+"_"+Fr,i),Fr++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&f||E2(t.child,r,i,l,f)&&(m=!0));t=t.sibling}return m}function Ja(t,r){for(;t!==null;)t.tag===5?E1(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&r||Ja(t.child,r)),t=t.sibling}function Fd(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Fd(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var r=t.memoizedProps;if(r.name==null||r.name==="auto")throw Error(o(544));var i=r.name;r=wo(r.default,r.share),r!=="none"&&(Ks(t,i,r,null,!1)||Ja(t.child,!1))}t=t.sibling}}function sm(t,r){if(t.tag===30){var i=t.stateNode,l=t.memoizedProps,f=So(l,i),m=wo(l.default,i.paired?l.share:l.enter);m!=="none"?Ks(t,f,m,null,!1)?(Fd(t),i.paired||r||el(t,l.onEnter)):Ja(t.child,!1):Fd(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)sm(t,r),t=t.sibling;else Fd(t)}function lm(t){if(ra!==null&&ra.size!==0){var r=ra;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var i=t.memoizedProps,l=i.name;if(l!=null&&l!=="auto"){var f=r.get(l);if(f!==void 0){var m=wo(i.default,i.share);if(m!=="none"&&(Ks(t,l,m,null,!1)?(m=t.stateNode,f.paired=m,m.paired=f,el(t,i.onShare)):Ja(t.child,!1)),r.delete(l),r.size===0)break}}}lm(t)}t=t.sibling}}}function um(t){if(t.tag===30){var r=t.memoizedProps,i=So(r,t.stateNode),l=ra!==null?ra.get(i):void 0,f=wo(r.default,l!==void 0?r.share:r.exit);f!=="none"&&(Ks(t,i,f,null,!1)?l!==void 0?(f=t.stateNode,l.paired=f,f.paired=l,ra.delete(i),el(t,r.onShare)):el(t,r.onExit):Ja(t.child,!1)),ra!==null&&lm(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)um(t),t=t.sibling;else ra!==null&&lm(t)}function C2(t){for(t=t.child;t!==null;){if(t.tag===30){var r=t.memoizedProps,i=So(r,t.stateNode);r=wo(r.default,r.update),t.flags&=-5,r!=="none"&&Ks(t,i,r,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&C2(t);t=t.sibling}}function cm(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var r=t.stateNode;r.paired!==null&&(r.paired=null,Ja(t.child,!1))}cm(t)}t=t.sibling}}function Bd(t){if(t.tag===30)t.stateNode.paired=null,Ja(t.child,!1),cm(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Bd(t),t=t.sibling;else cm(t)}function T2(t){for(t=t.child;t!==null;)t.tag===30?Ja(t.child,!1):(t.subtreeFlags&33554432)!==0&&T2(t),t=t.sibling}function dm(t,r,i,l,f,m,E){for(var P=!1;r!==null;){if(r.tag===5){var Q=r.stateNode;if(m!==null&&Fr<m.length){var ie=m[Fr],pe=Vm(Q);(ie.view||pe.view)&&(P=!0);var Ce;if(Ce=(t.flags&4)===0)if(pe.clip)Ce=!0;else{Ce=ie.rect;var ae=pe.rect;Ce=Ce.y!==ae.y||Ce.x!==ae.x||Ce.height!==ae.height||Ce.width!==ae.width}Ce&&(t.flags|=4),pe.abs?pe=!ie.abs:(ie=ie.rect,pe=pe.rect,pe=ie.height!==pe.height||ie.width!==pe.width),pe&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&R1(Q,Fr===0?i:i+"_"+Fr,f),P&&(t.flags&4)!==0||(Za===null&&(Za=[]),Za.push(Q,Fr===0?l:l+"_"+Fr,r.memoizedProps)),Fr++}else(r.tag!==22||r.memoizedState===null)&&(r.tag===30&&E?t.flags|=r.flags&32:dm(t,r.child,i,l,f,m,E)&&(P=!0));r=r.sibling}return P}function O2(t,r){for(t=t.child;t!==null;){if(t.tag===30){var i=t.memoizedProps,l=t.stateNode,f=So(i,l),m=wo(i.default,i.update),E;E=t.memoizedState,t.memoizedState=null,l=t;var P=t.child;Fr=0,f=dm(l,P,f,f,m,E,!1),(t.flags&4)!==0&&f&&el(t,i.onUpdate)}else(t.subtreeFlags&33554432)!==0&&O2(t);t=t.sibling}}var sr=!1,hn=!1,Wa=!1,fm=!1,M2=typeof WeakSet=="function"?WeakSet:Set,lr=null,eo=!1,Tu=!1,Vd=!1,hm=!1;function SD(t,r,i){if(t=t.containerInfo,_m=cl,t=Ib(t),Wp(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var m=f.anchorOffset,E=f.focusNode;f=f.focusOffset;try{l.nodeType,E.nodeType}catch{l=null;break e}var P=0,Q=-1,ie=-1,pe=0,Ce=0,ae=t,fe=null;t:for(;;){for(var Ye;ae!==l||m!==0&&ae.nodeType!==3||(Q=P+m),ae!==E||f!==0&&ae.nodeType!==3||(ie=P+f),ae.nodeType===3&&(P+=ae.nodeValue.length),(Ye=ae.firstChild)!==null;)fe=ae,ae=Ye;for(;;){if(ae===t)break t;if(fe===l&&++pe===m&&(Q=P),fe===E&&++Ce===f&&(ie=P),(Ye=ae.nextSibling)!==null)break;ae=fe,fe=ae.parentNode}ae=Ye}l=Q===-1||ie===-1?null:{start:Q,end:ie}}else l=null}l=l||{start:0,end:0}}else l=null;for(Hm={focusedElem:t,selectionRange:l},cl=!1,i=(i&335544064)===i,lr=r,r=i?9270:1024;lr!==null;){if(t=lr,i&&(l=t.deletions,l!==null))for(m=0;m<l.length;m++)i&&um(l[m]);if(t.alternate===null&&(t.flags&2)!==0)i&&w2(t),qd(i);else{if(t.tag===22){if(l=t.alternate,t.memoizedState!==null){l!==null&&l.memoizedState===null&&i&&um(l),qd(i);continue}else if(l!==null&&l.memoizedState!==null){i&&w2(t),qd(i);continue}}l=t.child,(t.subtreeFlags&r)!==0&&l!==null?(l.return=t,lr=l):(i&&C2(t),qd(i))}}ra=null}function qd(t){for(;lr!==null;){var r=lr,i=t,l=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 15:break;case 1:if((f&1024)!==0&&l!==null){i=void 0,f=l.memoizedProps,l=l.memoizedState;var m=r.stateNode;try{var E=Wi(r.type,f);i=m.getSnapshotBeforeUpdate(E,l),m.__reactInternalSnapshotBeforeUpdate=i}catch(P){gn(r,r.return,P)}}break;case 3:if((f&1024)!==0){if(l=r.stateNode.containerInfo,i=l.nodeType,i===9)Km(l);else if(i===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":Km(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:i&&l!==null&&(i=So(l.memoizedProps,l.stateNode),f=r.memoizedProps,f=wo(f.default,f.update),f!=="none"&&Ks(l,i,f,l.memoizedState=[],!0));break;default:if((f&1024)!==0)throw Error(o(163))}if(l=r.sibling,l!==null){l.return=r.return,lr=l;break}lr=r.return}}function A2(t,r,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:to(t,i),l&4&&Eu(5,i);break;case 1:if(to(t,i),l&4)if(t=i.stateNode,r===null)try{t.componentDidMount()}catch(E){gn(i,i.return,E)}else{var f=Wi(i.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(f,r,t.__reactInternalSnapshotBeforeUpdate)}catch(E){gn(i,i.return,E)}}l&64&&y2(i),l&512&&Qa(i,i.return);break;case 3:if(to(t,i),l&64&&(t=i.updateQueue,t!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{ix(t,r)}catch(E){gn(i,i.return,E)}}break;case 27:r===null&&l&4&&S2(i);case 26:case 5:to(t,i),r===null&&l&4&&rm(i),l&512&&Qa(i,i.return);break;case 12:to(t,i);break;case 31:to(t,i),l&4&&j2(t,i);break;case 13:to(t,i),l&4&&k2(t,i),l&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=jD.bind(null,i),pN(t,i))));break;case 22:if(l=i.memoizedState!==null||sr,!l){var m=r!==null&&r.memoizedState!==null||hn;r=sr,f=hn,sr=l,(hn=m)&&!f?(l=2,(i.subtreeFlags&8772)!==0&&(l|=1),za(t,i,l)):to(t,i),sr=r,hn=f}break;case 30:to(t,i),l&512&&Qa(i,i.return);break;case 7:l&512&&Qa(i,i.return);default:to(t,i)}}function pm(t,r){for(t=t.child;t!==null;)D2(t,r),t=t.sibling}function D2(t,r){switch(t.tag){case 5:case 26:try{var i=t.stateNode;if(r){var l=i.style;typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"}else{var f=t.stateNode,m=t.memoizedProps.style,E=m!=null&&m.hasOwnProperty("display")?m.display:null;f.style.display=E==null||typeof E=="boolean"?"":(""+E).trim()}}catch(Q){gn(t,t.return,Q)}gm(t,r);break;case 6:try{t.stateNode.nodeValue=r?"":t.memoizedProps,pt=!0}catch(Q){gn(t,t.return,Q)}break;case 18:try{var P=t.stateNode;r?w1(P,!0):w1(t.stateNode,!1)}catch(Q){gn(t,t.return,Q)}break;case 22:case 23:t.memoizedState===null&&pm(t,r);break;default:pm(t,r)}}function gm(t,r){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var i=t,l=r;switch(i.tag){case 4:D2(i,l);break e;case 22:i.memoizedState===null&&gm(i,l);break e;default:gm(i,l)}}t=t.sibling}}function N2(t){var r=t.alternate;r!==null&&(t.alternate=null,N2(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Yn(r)),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 jn=null,Br=!1;function Pa(t,r,i){for(i=i.child;i!==null;)I2(t,r,i),i=i.sibling}function I2(t,r,i){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(ke,i)}catch{}switch(i.tag){case 26:hn||vr(i,r),Pa(t,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&!hn&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:hn||vr(i,r),Cu(i);var l=jn,f=Br;hi(i.type)&&(jn=i.stateNode,Br=!1),Pa(t,r,i),L1(i.stateNode,i.type,i.memoizedProps),jn=l,Br=f;break;case 5:hn||vr(i,r),Cu(i);case 6:if(i.tag===6&&Cu(i),l=jn,f=Br,jn=null,Pa(t,r,i),jn=l,Br=f,jn!==null)if(Br)try{(jn.nodeType===9?jn.body:jn.nodeName==="HTML"?jn.ownerDocument.body:jn).removeChild(i.stateNode),pt=!0}catch(m){gn(i,r,m)}else try{jn.removeChild(i.stateNode),pt=!0}catch(m){gn(i,r,m)}break;case 18:jn!==null&&(Br?(t=jn,S1(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),dl(t)):S1(jn,i.stateNode));break;case 4:l=jn,f=Br,jn=i.stateNode.containerInfo,Br=!0,Pa(t,r,i),jn=l,Br=f;break;case 0:case 11:case 14:case 15:ii(2,i,r),hn||ii(4,i,r),Pa(t,r,i);break;case 1:hn||(vr(i,r),l=i.stateNode,typeof l.componentWillUnmount=="function"&&v2(i,r,l)),Pa(t,r,i);break;case 21:Pa(t,r,i);break;case 22:hn=(l=hn)||i.memoizedState!==null,Pa(t,r,i),hn=l;break;case 30:vr(i,r),Pa(t,r,i);break;case 7:hn||vr(i,r),Pa(t,r,i);break;default:Pa(t,r,i)}}function j2(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{dl(t)}catch(i){gn(r,r.return,i)}}}function k2(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{dl(t)}catch(i){gn(r,r.return,i)}}function wD(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new M2),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new M2),r;default:throw Error(o(435,t.tag))}}function Yd(t,r){var i=wD(t);r.forEach(function(l){if(!i.has(l)){i.add(l);var f=kD.bind(null,t,l);l.then(f,f)}})}function Ir(t,r,i){var l=r.deletions;if(l!==null)for(var f=0;f<l.length;f++){var m=l[f],E=t,P=r,Q=P;e:for(;Q!==null;){switch(Q.tag){case 27:if(hi(Q.type)){jn=Q.stateNode,Br=!1;break e}break;case 5:jn=Q.stateNode,Br=!1;break e;case 3:case 4:jn=Q.stateNode.containerInfo,Br=!0;break e}Q=Q.return}if(jn===null)throw Error(o(160));I2(E,P,m),jn=null,Br=!1,E=m.alternate,E!==null&&(E.return=null),m.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)P2(r,t,i),r=r.sibling}var La=null;function P2(t,r,i){var l=t.alternate,f=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(f&4&&(l=t.updateQueue,l=l!==null?l.events:null,l!==null))for(var m=0;m<l.length;m++){var E=l[m];E.ref.impl=E.nextImpl}Ir(r,t,i),jr(t),f&4&&(ii(3,t,t.return),Eu(3,t),ii(5,t,t.return));break;case 1:Ir(r,t,i),jr(t),f&512&&(hn||l===null||vr(l,l.return)),f&64&&sr&&(t=t.updateQueue,t!==null&&(r=t.callbacks,r!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:if(m=La,Ir(r,t,i),jr(t),f&512&&(hn||l===null||vr(l,l.return)),f&4)if(f=l!==null?l.memoizedState:null,i=t.memoizedState,l===null)if(i===null)if(t.stateNode===null)if(sr)t.stateNode=v1(t.type,t.memoizedProps,r.containerInfo,t);else{e:{r=t.type,i=t.memoizedProps,f=m.ownerDocument||m;t:switch(r){case"title":l=f.getElementsByTagName("title")[0],(!l||l[pa]||l[dn]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=f.createElement(r),f.head.insertBefore(l,f.querySelector("head > title"))),br(l,r,i),l[dn]=t,Se(l),r=l;break e;case"link":if(m=B1("link","href",f).get(r+(i.href||""))){for(E=0;E<m.length;E++)if(l=m[E],l.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&l.getAttribute("rel")===(i.rel==null?null:i.rel)&&l.getAttribute("title")===(i.title==null?null:i.title)&&l.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){m.splice(E,1);break t}}l=f.createElement(r),br(l,r,i),f.head.appendChild(l);break;case"meta":if(m=B1("meta","content",f).get(r+(i.content||""))){for(E=0;E<m.length;E++)if(l=m[E],l.getAttribute("content")===(i.content==null?null:""+i.content)&&l.getAttribute("name")===(i.name==null?null:i.name)&&l.getAttribute("property")===(i.property==null?null:i.property)&&l.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&l.getAttribute("charset")===(i.charSet==null?null:i.charSet)){m.splice(E,1);break t}}l=f.createElement(r),br(l,r,i),f.head.appendChild(l);break;default:throw Error(o(468,r))}l[dn]=t,Se(l),r=l}t.stateNode=r}else sr||Wm(m,t.type,t.stateNode);else t.stateNode=F1(m,i,t.memoizedProps);else f!==i?(f===null?(r=l.stateNode,r===null||hn||r.parentNode.removeChild(r)):f.count--,i===null?sr||Wm(m,t.type,t.stateNode):F1(m,i,t.memoizedProps)):i===null&&t.stateNode!==null&&am(t,t.memoizedProps,l.memoizedProps);break;case 27:Ir(r,t,i),jr(t),f&512&&(hn||l===null||vr(l,l.return)),l!==null&&f&4&&am(t,t.memoizedProps,l.memoizedProps);break;case 5:if(m=Wa,Wa=!1,Ir(r,t,i),Wa=m,jr(t),f&512&&(hn||l===null||vr(l,l.return)),t.flags&32){r=t.stateNode;try{Mr(r,""),pt=!0}catch(pe){gn(t,t.return,pe)}}f&4&&t.stateNode!=null&&(r=t.memoizedProps,am(t,r,l!==null?l.memoizedProps:r)),f&1024&&(fm=!0);break;case 6:if(Ir(r,t,i),jr(t),f&4){if(t.stateNode===null)throw Error(o(162));r=t.memoizedProps,i=t.stateNode;try{i.nodeValue=r,pt=!0}catch(pe){gn(t,t.return,pe)}}break;case 3:if(pt=!1,sf=null,m=La,La=Pu(r.containerInfo),Ir(r,t,i),La=m,jr(t),f&4&&l!==null&&l.memoizedState.isDehydrated)try{dl(r.containerInfo)}catch(pe){gn(t,t.return,pe)}fm&&(fm=!1,L2(t)),pt=!1;break;case 4:f=Wa,Wa=sr,l=nr(),m=La,La=Pu(t.stateNode.containerInfo),Ir(r,t,i),jr(t),La=m,pt&&Tu&&(Vd=!0),pt=l,Wa=f;break;case 12:Ir(r,t,i),jr(t);break;case 31:Ir(r,t,i),jr(t),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Yd(t,r)));break;case 13:Ir(r,t,i),jr(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&($d=xt()),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Yd(t,r)));break;case 22:m=t.memoizedState!==null,E=l!==null&&l.memoizedState!==null;var P=sr,Q=hn,ie=Wa;sr=P||m,Wa=ie||m,hn=Q||E,Ir(r,t,i),hn=Q,Wa=ie,sr=P,jr(t),f&8192&&(r=t.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,!m||l===null||E||sr||hn||(r=E||hn,i=sr,l=hn,sr=m||sr,hn=r,si(t,2),sr=i,hn=l),!m&&Wa||pm(t,m)),f&4&&(r=t.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,Yd(t,i))));break;case 19:Ir(r,t,i),jr(t),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Yd(t,r)));break;case 30:f&512&&(hn||l===null||vr(l,l.return)),f=nr(),m=Tu,E=(i&335544064)===i,P=t.memoizedProps,Tu=E&&wo(P.default,P.update)!=="none",Ir(r,t,i),jr(t),E&&l!==null&&pt&&(t.flags|=4),Tu=m,pt=f;break;case 21:break;case 7:f&512&&(hn||l===null||vr(l,l.return)),l&&l.stateNode!==null&&(l.stateNode._fragmentFiber=t);default:Ir(r,t,i),jr(t)}}function jr(t){var r=t.flags;if(r&2){try{for(var i,l=t.return;l!==null;){if(x2(l)){i=l;break}l=l.return}l=null;for(var f=t.return;f!==null;){if(nm(f)){var m=f.stateNode;l===null?l=[m]:l.push(m)}if(tm(f))break;f=f.return}var E=l;if(i==null)throw Error(o(160));switch(i.tag){case 27:var P=i.stateNode,Q=om(t);Hd(t,Q,P,E);break;case 5:var ie=i.stateNode;i.flags&32&&(Mr(ie,""),i.flags&=-33);var pe=om(t);Hd(t,pe,ie,E);break;case 3:case 4:var Ce=i.stateNode.containerInfo,ae=om(t);im(t,ae,Ce,E);break;default:throw Error(o(161))}}catch(fe){gn(t,t.return,fe)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function L2(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;L2(r),r.tag===5&&r.flags&1024&&(r=r.stateNode,cl=!0,r.reset(),cl=!1),t=t.sibling}}function Gs(t,r){if(r.subtreeFlags&9270)for(r=r.child;r!==null;)z2(r,t),r=r.sibling;else O2(r)}function z2(t,r){var i=t.alternate;if(i===null)sm(t,!1);else switch(t.tag){case 3:if(hm=eo=!1,R2(),Gs(r,t),!eo&&!Vd){if(t=Za,t!==null)for(var l=0;l<t.length;l+=3){i=t[l];var f=t[l+1];E1(i,t[l+2]),i=i.ownerDocument.documentElement,i!==null&&i.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+f+")"})}t=r.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),hm=!0}Za=null;break;case 5:Gs(r,t);break;case 4:l=eo,eo=!1,Gs(r,t),eo&&(Vd=!0),eo=l;break;case 22:t.memoizedState===null&&(i.memoizedState!==null?sm(t,!1):Gs(r,t));break;case 30:l=eo,f=R2(),eo=!1,Gs(r,t),eo&&(t.flags|=4);var m=t.memoizedProps,E=t.stateNode;r=So(m,E),E=So(i.memoizedProps,E);var P=wo(m.default,m.update);P==="none"?r=!1:(m=i.memoizedState,i.memoizedState=null,i=t.child,Fr=0,r=dm(t,i,r,E,P,m,!0),Fr!==(m===null?0:m.length)&&(t.flags|=32)),(t.flags&4)!==0&&r?(el(t,t.memoizedProps.onUpdate),Za=f):f!==null&&(f.push.apply(f,Za),Za=f),eo=(t.flags&32)!==0?!0:l;break;default:Gs(r,t)}}function to(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)A2(t,r.alternate,r),r=r.sibling}function si(t,r){for(t=t.child;t!==null;){var i=t,l=r;switch(i.tag){case 0:case 11:case 14:case 15:ii(4,i,i.return),si(i,l);break;case 1:vr(i,i.return);var f=i.stateNode;typeof f.componentWillUnmount=="function"&&v2(i,i.return,f),si(i,l);break;case 27:(l&2)!==0&&L1(i.stateNode,i.type,i.memoizedProps);case 5:vr(i,i.return),i.tag!==5&&i.tag!==27||Cu(i),si(i,l);break;case 6:Cu(i);break;case 26:vr(i,i.return),f=i.stateNode,i.memoizedState!==null||f===null||hn||f.parentNode.removeChild(f),si(i,l);break;case 22:i.memoizedState===null&&si(i,l);break;case 30:vr(i,i.return),si(i,l);break;case 7:vr(i,i.return);default:si(i,l)}t=t.sibling}}function za(t,r,i){for(i=(r.subtreeFlags&8772)!==0?i:i&-2,r=r.child;r!==null;){var l=r.alternate,f=t,m=r,E=m.flags,P=(i&1)!==0;switch(m.tag){case 0:case 11:case 15:za(f,m,i),Eu(4,m);break;case 1:if(za(f,m,i),l=m,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(pe){gn(l,l.return,pe)}if(l=m,f=l.updateQueue,f!==null){var Q=l.stateNode;try{var ie=f.shared.hiddenCallbacks;if(ie!==null)for(f.shared.hiddenCallbacks=null,f=0;f<ie.length;f++)ox(ie[f],Q)}catch(pe){gn(l,l.return,pe)}}P&&E&64&&y2(m),Qa(m,m.return);break;case 27:(i&2)!==0&&S2(m);case 5:m.tag!==5&&m.tag!==27||b2(m),za(f,m,i),P&&l===null&&E&4&&rm(m),Qa(m,m.return);break;case 6:b2(m);break;case 26:Q=m.stateNode,m.memoizedState!==null||Q===null||sr||Wm(Pu(Q.ownerDocument),m.type,Q),za(f,m,i),P&&l===null&&E&4&&rm(m),Qa(m,m.return);break;case 12:za(f,m,i);break;case 31:za(f,m,i),P&&E&4&&j2(f,m);break;case 13:za(f,m,i),P&&E&4&&k2(f,m);break;case 22:m.memoizedState===null&&za(f,m,i),Qa(m,m.return);break;case 30:za(f,m,i),Qa(m,m.return);break;case 7:Qa(m,m.return);default:za(f,m,i)}r=r.sibling}}function mm(t,r){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&du(i))}function ym(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&du(t))}function Sa(t,r,i,l){var f=(i&335544064)===i;if(r.subtreeFlags&(f?10262:10256))for(r=r.child;r!==null;)_2(t,r,i,l),r=r.sibling;else f&&T2(r)}function _2(t,r,i,l){var f=(i&335544064)===i;f&&r.alternate===null&&r.return!==null&&r.return.alternate!==null&&Bd(r);var m=r.flags;switch(r.tag){case 0:case 11:case 15:Sa(t,r,i,l),m&2048&&Eu(9,r);break;case 1:Sa(t,r,i,l);break;case 3:Sa(t,r,i,l),f&&hm&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),m&2048&&(m=null,r.alternate!==null&&(m=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==m&&(r.refCount++,m!=null&&du(m)));break;case 12:if(m&2048){Sa(t,r,i,l),m=r.stateNode;try{var E=r.memoizedProps,P=E.id,Q=E.onPostCommit;typeof Q=="function"&&Q(P,r.alternate===null?"mount":"update",m.passiveEffectDuration,-0)}catch(ie){gn(r,r.return,ie)}}else Sa(t,r,i,l);break;case 31:Sa(t,r,i,l);break;case 13:Sa(t,r,i,l);break;case 23:break;case 22:E=r.stateNode,P=r.alternate,r.memoizedState!==null?(f&&P!==null&&P.memoizedState===null&&Bd(P),E._visibility&2?Sa(t,r,i,l):Ou(t,r)):(f&&P!==null&&P.memoizedState!==null&&Bd(r),E._visibility&2?Sa(t,r,i,l):(E._visibility|=2,$s(t,r,i,l,(r.subtreeFlags&10256)!==0||!1))),m&2048&&mm(P,r);break;case 24:Sa(t,r,i,l),m&2048&&ym(r.alternate,r);break;case 30:f&&(m=r.alternate,m!==null&&(Ja(m.child,!0),Ja(r.child,!0))),Sa(t,r,i,l);break;default:Sa(t,r,i,l)}}function $s(t,r,i,l,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=t,E=r,P=i,Q=l,ie=E.flags;switch(E.tag){case 0:case 11:case 15:$s(m,E,P,Q,f),Eu(8,E);break;case 23:break;case 22:var pe=E.stateNode;E.memoizedState!==null?pe._visibility&2?$s(m,E,P,Q,f):Ou(m,E):(pe._visibility|=2,$s(m,E,P,Q,f)),f&&ie&2048&&mm(E.alternate,E);break;case 24:$s(m,E,P,Q,f),f&&ie&2048&&ym(E.alternate,E);break;default:$s(m,E,P,Q,f)}r=r.sibling}}function Ou(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=t,l=r,f=l.flags;switch(l.tag){case 22:Ou(i,l),f&2048&&mm(l.alternate,l);break;case 24:Ou(i,l),f&2048&&ym(l.alternate,l);break;default:Ou(i,l)}r=r.sibling}}var es=8192;function ts(t,r,i){if(t.subtreeFlags&es)for(t=t.child;t!==null;)H2(t,r,i),t=t.sibling}function H2(t,r,i){switch(t.tag){case 26:ts(t,r,i),t.flags&es&&(t.memoizedState!==null?MN(i,La,t.memoizedState,t.memoizedProps):(t=t.stateNode,(r&335544128)===r&&K1(i,t)));break;case 5:ts(t,r,i),t.flags&es&&(t=t.stateNode,(r&335544128)===r&&K1(i,t));break;case 3:case 4:var l=La;La=Pu(t.stateNode.containerInfo),ts(t,r,i),La=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=es,es=16777216,ts(t,r,i),es=l):ts(t,r,i));break;case 30:if((t.flags&es)!==0&&(l=t.memoizedProps.name,l!=null&&l!=="auto")){var f=t.stateNode;f.paired=null,ra===null&&(ra=new Map),ra.set(l,f)}ts(t,r,i);break;default:ts(t,r,i)}}function U2(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Mu(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];lr=l,B2(l,t)}U2(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)F2(t),t=t.sibling}function F2(t){switch(t.tag){case 0:case 11:case 15:Mu(t),t.flags&2048&&ii(9,t,t.return);break;case 3:Mu(t);break;case 12:Mu(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Kd(t)):Mu(t);break;default:Mu(t)}}function Kd(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];lr=l,B2(l,t)}U2(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:ii(8,r,r.return),Kd(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Kd(r));break;default:Kd(r)}t=t.sibling}}function B2(t,r){for(;lr!==null;){var i=lr;switch(i.tag){case 0:case 11:case 15:ii(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:du(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,lr=l;else e:for(i=t;lr!==null;){l=lr;var f=l.sibling,m=l.return;if(N2(l),l===i){lr=null;break e}if(f!==null){f.return=m,lr=f;break e}lr=m}}}var RD={getCacheForType:function(t){var r=gr(Xn),i=r.data.get(t);return i===void 0&&(i=t(),r.data.set(t,i)),i},cacheSignal:function(){return gr(Xn).controller.signal}},ED=typeof WeakMap=="function"?WeakMap:Map,ln=0,Tn=null,qt=null,Xt=0,pn=0,aa=null,li=!1,Xs=!1,vm=!1,No=0,Vn=0,ui=0,ns=0,Gd=0,oa=0,Qs=0,Au=null,Vr=null,bm=!1,$d=0,V2=0,Xd=1/0,Qd=null,ci=null,zn=0,_a=null,rs=null,no=0,xm=0,Sm=null,q2=null,Zs=null,Js=null,Ws=null,Du=0,Zd=null;function ia(){return(ln&2)!==0&&Xt!==0?Xt&-Xt:ge.T!==null?Nm():Cn()}function Y2(){if(oa===0)if((Xt&536870912)===0||Ft){var t=ye;ye<<=1,(ye&3932160)===0&&(ye=262144),oa=t}else oa=536870912;return t=mr.current,t!==null&&(t.flags|=32),oa}function el(t,r){if(r!=null){var i=t.stateNode,l=i.ref;l===null&&(l=i.ref=C1(So(t.memoizedProps,i))),Js===null&&(Js=[]),Js.push(r.bind(null,l))}}function qr(t,r,i){(t===Tn&&(pn===2||pn===9)||t.cancelPendingCommit!==null)&&(tl(t,0),di(t,Xt,oa,!1)),ct(t,i),((ln&2)===0||t!==Tn)&&(t===Tn&&((ln&2)===0&&(ns|=i),Vn===4&&di(t,Xt,oa,!1)),ro(t))}function K2(t,r,i){if((ln&6)!==0)throw Error(o(327));var l=!i&&(r&127)===0&&(r&t.expiredLanes)===0||Xe(t,r),f=l?OD(t,r):Rm(t,r,!0),m=l;do{if(f===0){Xs&&!l&&di(t,r,0,!1);break}else{if(i=t.current.alternate,m&&!CD(i)){f=Rm(t,r,!1),m=!1;continue}if(f===2){if(m=r,t.errorRecoveryDisabledLanes&m)var E=0;else E=t.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){r=E;e:{var P=t;f=Au;var Q=P.current.memoizedState.isDehydrated;if(Q&&(tl(P,E).flags|=256),E=Rm(P,E,!1),E!==2&&E!==6){if(vm&&!Q){P.errorRecoveryDisabledLanes|=m,ns|=m,f=4;break e}m=Vr,Vr=f,m!==null&&(Vr===null?Vr=m:Vr.push.apply(Vr,m))}f=E}if(m=!1,f!==2)continue}}if(f===1){tl(t,0),di(t,r,0,!0);break}e:{switch(l=t,m=f,m){case 0:case 1:throw Error(o(345));case 4:if((r&4194048)!==r&&(r&62914560)!==r)break;case 6:di(l,r,oa,!li);break e;case 2:Vr=null;break;case 3:case 5:break;default:throw Error(o(329))}if((r&62914560)===r&&(f=$d+300-xt(),10<f)){if(di(l,r,oa,!li),Ve(l,0,!0)!==0)break e;no=r,l.timeoutHandle=Bm(G2.bind(null,l,i,Vr,Qd,bm,r,oa,ns,Qs,li,m,"Throttled",-0,0),f);break e}G2(l,i,Vr,Qd,bm,r,oa,ns,Qs,li,m,null,-0,0)}}break}while(!0);ro(t)}function G2(t,r,i,l,f,m,E,P,Q,ie,pe,Ce,ae,fe){t.timeoutHandle=-1;var Ye=r.subtreeFlags,rt=(m&335544064)===m;if(Ce=null,(rt||Ye&8192||(Ye&16785408)===16785408)&&(Ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ar},ra=null,H2(r,m,Ce),rt&&(Ye=Ce,rt=t.containerInfo,rt=(rt.nodeType===9?rt:rt.ownerDocument).__reactViewTransition,rt!=null&&(Ye.count++,Ye.waitingForViewTransition=!0,Ye=_u.bind(Ye),rt.finished.then(Ye,Ye))),Ye=(m&62914560)===m?$d-xt():(m&4194048)===m?V2-xt():0,Ye=AN(Ce,Ye),Ye!==null)){no=m,t.cancelPendingCommit=Ye(t1.bind(null,t,r,m,i,l,f,E,P,Q,ie,pe,Ce,null,ae,fe)),di(t,m,E,!ie);return}t1(t,r,m,i,l,f,E,P,Q,ie,pe,Ce)}function CD(t){for(var r=t;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var f=i[l],m=f.getSnapshot;f=f.value;try{if(!ta(m(),f))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function di(t,r,i,l){r=$e(t,r),r&=~Gd,r&=~ns,t.suspendedLanes|=r,t.pingedLanes&=~r,l&&(t.warmLanes|=r),l=t.expirationTimes;for(var f=r;0<f;){var m=31-et(f),E=1<<m;l[m]=-1,f&=~E}i!==0&&Ht(t,i,r)}function Jd(){return(ln&6)===0?(Nu(0),!1):!0}function wm(){if(qt!==null){if(pn===0)var t=qt.return;else t=qt,Co=qi=null,Dg(t),Fs=null,pu=0,t=qt;for(;t!==null;)m2(t.alternate,t),t=t.return;qt=null}}function tl(t,r){var i=t.timeoutHandle;return i!==-1&&(t.timeoutHandle=-1,XD(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),no=0,wm(),Tn=t,qt=i=Ro(t.current,null),Xt=r,pn=0,aa=null,li=!1,Xs=Xe(t,r),vm=!1,Qs=oa=Gd=ns=ui=Vn=0,Vr=Au=null,bm=!1,No=$e(t,r),id(),i}function $2(t,r){Nt=null,ge.H=Nd,r===Us||r===yd?(r=tx(),pn=3):r===yg?(r=tx(),pn=4):pn=r===Yg?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,aa=r,qt===null&&(Vn=1,Id(t,ya(r,t.current)))}function X2(){var t=mr.current;return t===null?!0:(Xt&4194048)===Xt?Rr===null:(Xt&62914560)===Xt||(Xt&536870912)!==0?t===Rr:!1}function Q2(){var t=ge.H;return ge.H=Nd,t===null?Nd:t}function Z2(){var t=ge.A;return ge.A=RD,t}function Wd(){Vn=4,li||(Xt&4194048)!==Xt&&mr.current!==null||(Xs=!0),(ui&134217727)===0&&(ns&134217727)===0||Tn===null||di(Tn,Xt,oa,!1)}function Rm(t,r,i){var l=ln;ln|=2;var f=Q2(),m=Z2();(Tn!==t||Xt!==r)&&(Qd=null,tl(t,r)),r=!1;var E=Vn;e:do try{if(pn!==0&&qt!==null){var P=qt,Q=aa;switch(pn){case 8:wm(),E=6;break e;case 3:case 2:case 9:case 6:mr.current===null&&(r=!0);var ie=pn;if(pn=0,aa=null,nl(t,P,Q,ie),i&&Xs){E=0;break e}break;default:ie=pn,pn=0,aa=null,nl(t,P,Q,ie)}}TD(),E=Vn;break}catch(pe){$2(t,pe)}while(!0);return r&&t.shellSuspendCounter++,Co=qi=null,ln=l,ge.H=f,ge.A=m,qt===null&&(Tn=null,Xt=0,id()),E}function TD(){for(;qt!==null;)J2(qt)}function OD(t,r){var i=ln;ln|=2;var l=Q2(),f=Z2();Tn!==t||Xt!==r?(Qd=null,Xd=xt()+500,tl(t,r)):Xs=Xe(t,r);e:do try{if(pn!==0&&qt!==null){r=qt;var m=aa;t:switch(pn){case 1:pn=0,aa=null,nl(t,r,m,1);break;case 2:case 9:if(Wb(m)){pn=0,aa=null,W2(r);break}r=function(){pn!==2&&pn!==9||Tn!==t||(pn=7),ro(t)},m.then(r,r);break e;case 3:pn=7;break e;case 4:pn=5;break e;case 7:Wb(m)?(pn=0,aa=null,W2(r)):(pn=0,aa=null,nl(t,r,m,7));break;case 5:var E=null;switch(qt.tag){case 26:E=qt.memoizedState;case 5:case 27:var P=qt;if(E?q1(E):P.stateNode.complete){pn=0,aa=null;var Q=P.sibling;if(Q!==null)qt=Q;else{var ie=P.return;ie!==null?(qt=ie,ef(ie)):qt=null}break t}}pn=0,aa=null,nl(t,r,m,5);break;case 6:pn=0,aa=null,nl(t,r,m,6);break;case 8:wm(),Vn=6;break e;default:throw Error(o(462))}}MD();break}catch(pe){$2(t,pe)}while(!0);return Co=qi=null,ge.H=l,ge.A=f,ln=i,qt!==null?0:(Tn=null,Xt=0,id(),Vn)}function MD(){for(;qt!==null&&!Wt();)J2(qt)}function J2(t){var r=p2(t.alternate,t,No);t.memoizedProps=t.pendingProps,r===null?ef(t):qt=r}function W2(t){var r=t,i=r.alternate;switch(r.tag){case 15:case 0:r=s2(i,r,r.pendingProps,r.type,void 0,Xt);break;case 11:r=s2(i,r,r.pendingProps,r.type.render,r.ref,Xt);break;case 5:Dg(r);var l=r;l===ir&&(Ft?(fd(l),l.tag===5&&l.stateNode!=null&&(An=l.stateNode)):(fd(l),Ft=!0));default:m2(i,r),r=qt=Bb(r,No),r=p2(i,r,No)}t.memoizedProps=t.pendingProps,r===null?ef(t):qt=r}function nl(t,r,i,l){Co=qi=null,Dg(r),Fs=null,pu=0;var f=r.return;try{if(gD(t,f,r,i,Xt)){Vn=1,Id(t,ya(i,t.current)),qt=null;return}}catch(m){if(f!==null)throw qt=f,m;Vn=1,Id(t,ya(i,t.current)),qt=null;return}r.flags&32768?(Ft||l===1?t=!0:Xs||(Xt&536870912)!==0?t=!1:(li=t=!0,(l===2||l===9||l===3||l===6)&&(l=mr.current,l!==null&&l.tag===13&&(l.flags|=16384))),e1(r,t)):ef(r)}function ef(t){var r=t;do{if((r.flags&32768)!==0){e1(r,li);return}t=r.return;var i=bD(r.alternate,r,No);if(i!==null){qt=i;return}if(r=r.sibling,r!==null){qt=r;return}qt=r=t}while(r!==null);Vn===0&&(Vn=5)}function e1(t,r){do{var i=xD(t.alternate,t);if(i!==null){i.flags&=32767,qt=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(t=t.sibling,t!==null)){qt=t;return}qt=t=i}while(t!==null);Vn=6,qt=null}function t1(t,r,i,l,f,m,E,P,Q,ie,pe,Ce){t.cancelPendingCommit=null;do tf();while(zn!==0);if((ln&6)!==0)throw Error(o(327));if(r!==null){if(r===t.current)throw Error(o(177));t===Tn&&(qt=Tn=null,Xt=0),rs=r,_a=t,no=i,Sm=f,q2=l,AD(t,r,i,E,P,Q,Ce)}}function AD(t,r,i,l,f,m,E){var P=r.lanes|r.childLanes;if(xm=P,P|=ag,Bt(t,i,P,l,f,m),Js=null,(i&335544064)===i?(Ws=rD(t),l=10262):(Ws=null,l=10256),(r.subtreeFlags&l)!==0||(r.flags&l)!==0?(t.callbackNode=null,t.callbackPriority=0,PD(gt,function(){return Om(),null})):(t.callbackNode=null,t.callbackPriority=0),Ud=!1,l=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null,f=ce.p,ce.p=2,m=ln,ln|=4;try{SD(t,r,i)}finally{ln=m,ce.p=f,ge.T=l}}zn=1,Ud?Zs=tN(E,t.containerInfo,Ws,Em,Cm,ND,Tm,Om,DD):(Em(),Cm(),Tm())}function DD(t){if(zn!==0){var r=_a.onRecoverableError;r(t,{componentStack:null})}}function ND(){zn===3&&(zn=0,z2(rs,_a),zn=4)}function Em(){if(zn===1){zn=0;var t=_a,r=rs,i=no,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null;var f=ce.p;ce.p=2;var m=ln;ln|=4;try{Tu=Vd=!1,P2(r,t,i),i=Hm;var E=Ib(t.containerInfo),P=i.focusedElem,Q=i.selectionRange;if(E!==P&&P&&P.ownerDocument&&Nb(P.ownerDocument.documentElement,P)){if(Q!==null&&Wp(P)){var ie=Q.start,pe=Q.end;if(pe===void 0&&(pe=ie),"selectionStart"in P)P.selectionStart=ie,P.selectionEnd=Math.min(pe,P.value.length);else{var Ce=P.ownerDocument||document,ae=Ce&&Ce.defaultView||window;if(ae.getSelection){var fe=ae.getSelection(),Ye=P.textContent.length,rt=Math.min(Q.start,Ye),It=Q.end===void 0?rt:Math.min(Q.end,Ye);!fe.extend&&rt>It&&(E=It,It=rt,rt=E);var oe=Db(P,rt),te=Db(P,It);if(oe&&te&&(fe.rangeCount!==1||fe.anchorNode!==oe.node||fe.anchorOffset!==oe.offset||fe.focusNode!==te.node||fe.focusOffset!==te.offset)){var ue=Ce.createRange();ue.setStart(oe.node,oe.offset),fe.removeAllRanges(),rt>It?(fe.addRange(ue),fe.extend(te.node,te.offset)):(ue.setEnd(te.node,te.offset),fe.addRange(ue))}}}}for(Ce=[],fe=P;fe=fe.parentNode;)fe.nodeType===1&&Ce.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<Ce.length;P++){var Ee=Ce[P];Ee.element.scrollLeft=Ee.left,Ee.element.scrollTop=Ee.top}}cl=!!_m,Hm=_m=null}finally{ln=m,ce.p=f,ge.T=l}}t.current=r,zn=2}}function Cm(){if(zn===2){zn=0;var t=_a,r=rs,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=ge.T,ge.T=null;var l=ce.p;ce.p=2;var f=ln;ln|=4;try{A2(t,r.alternate,r)}finally{ln=f,ce.p=l,ge.T=i}}zn=3}}function Tm(){if(zn===4||zn===3){zn=0;var t=Zs;Zs=null,We();var r=_a,i=rs,l=no,f=q2,m=(l&335544064)===l?10262:10256;if((i.subtreeFlags&m)!==0||(i.flags&m)!==0?zn=5:(zn=0,rs=_a=null,n1(r,r.pendingLanes)),m=r.pendingLanes,m===0&&(ci=null),En(l),i=i.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(ke,i,void 0,(i.current.flags&128)===128)}catch{}if(f!==null){i=ge.T,m=ce.p,ce.p=2,ge.T=null;try{for(var E=r.onRecoverableError,P=0;P<f.length;P++){var Q=f[P];E(Q.value,{componentStack:Q.stack})}}finally{ge.T=i,ce.p=m}}if(f=Js,E=Ws,Ws=null,f!==null&&(Js=null,E===null&&(E=[]),t!==null))for(Q=0;Q<f.length;Q++)i=(0,f[Q])(E),i!==void 0&&t.finished.finally(i);(no&3)!==0&&tf(),ro(r),m=r.pendingLanes,(l&261930)!==0&&(m&42)!==0?r===Zd?Du++:(Du=0,Zd=r):(Du=0,Zd=null),Nu(0)}}function n1(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,du(r)))}function tf(){return Zs!==null&&(Zs.skipTransition(),Zs=null),Em(),Cm(),Tm(),Om()}function Om(){if(zn!==5)return!1;var t=_a,r=xm;xm=0;var i=En(no),l=ge.T,f=ce.p;try{ce.p=32>i?32:i,ge.T=null,i=Sm,Sm=null;var m=_a,E=no;if(zn=0,rs=_a=null,no=0,(ln&6)!==0)throw Error(o(331));var P=ln;if(ln|=4,F2(m.current),_2(m,m.current,E,i),ln=P,Nu(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(ke,m)}catch{}return!0}finally{ce.p=f,ge.T=l,n1(t,r)}}function r1(t,r,i){r=ya(i,r),r=qg(t.stateNode,r,2),t=ni(t,r,2),t!==null&&(ct(t,2),ro(t))}function gn(t,r,i){if(t.tag===3)r1(t,t,i);else for(;r!==null;){if(r.tag===3){r1(r,t,i);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ci===null||!ci.has(l))){t=ya(i,t),i=Wx(2),l=ni(r,i,2),l!==null&&(e2(i,l,r,t),ct(l,2),ro(l));break}}r=r.return}}function Mm(t,r,i){var l=t.pingCache;if(l===null){l=t.pingCache=new ED;var f=new Set;l.set(r,f)}else f=l.get(r),f===void 0&&(f=new Set,l.set(r,f));f.has(i)||(vm=!0,f.add(i),t=ID.bind(null,t,r,i),r.then(t,t))}function ID(t,r,i){var l=t.pingCache;l!==null&&l.delete(r),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Tn===t&&(Xt&i)===i&&((Vn===4||Vn===3&&(Xt&62914560)===Xt&&300>xt()-$d)&&(ln&2)===0?tl(t,0):Gd|=i,Qs===Xt&&(Qs=0)),ro(t)}function a1(t,r){r===0&&(r=tt()),t=Fi(t,r),t!==null&&(ct(t,r),ro(t))}function jD(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),a1(t,i)}function kD(t,r){var i=0;switch(t.tag){case 31:case 13:var l=t.stateNode,f=t.memoizedState;f!==null&&(i=f.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(r),a1(t,i)}function PD(t,r){return Jt(t,r)}var rl=null,al=null,Am=!1,nf=!1,Dm=!1,fi=0;function ro(t){t!==al&&t.next===null&&(al===null?rl=al=t:al=al.next=t),nf=!0,Am||(Am=!0,zD())}function Nu(t,r){if(!Dm&&nf){Dm=!0;do for(var i=!1,l=rl;l!==null;){if(t!==0){var f=l.pendingLanes;if(f===0)var m=0;else{var E=l.suspendedLanes,P=l.pingedLanes;m=(1<<31-et(42|t)+1)-1,m&=f&~(E&~P),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(i=!0,l1(l,m))}else m=Xt,m=Ve(l,l===Tn?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||Xe(l,m)||(i=!0,l1(l,m));l=l.next}while(i);Dm=!1}}function LD(){o1()}function o1(){nf=Am=!1;var t=0;fi!==0&&$D()&&(t=fi);for(var r=xt(),i=null,l=rl;l!==null;){var f=l.next,m=i1(l,r);m===0?(l.next=null,i===null?rl=f:i.next=f,f===null&&(al=i)):(i=l,(t!==0||(m&3)!==0)&&(nf=!0)),l=f}zn!==0&&zn!==5||Nu(t),fi!==0&&(fi=0)}function i1(t,r){for(var i=t.suspendedLanes,l=t.pingedLanes,f=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var E=31-et(m),P=1<<E,Q=f[E];Q===-1?((P&i)===0||(P&l)!==0)&&(f[E]=st(P,r)):Q<=r&&(t.expiredLanes|=P),m&=~P}if(r=Tn,i=Xt,i=Ve(t,t===r?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,i===0||t===r&&(pn===2||pn===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&rn(l),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||Xe(t,i)){if(r=i&-i,r===t.callbackPriority)return r;switch(l!==null&&rn(l),En(i)){case 2:case 8:i=vt;break;case 32:i=gt;break;case 268435456:i=un;break;default:i=gt}return l=s1.bind(null,t),i=Jt(i,l),t.callbackPriority=r,t.callbackNode=i,r}return l!==null&&l!==null&&rn(l),t.callbackPriority=2,t.callbackNode=null,2}function s1(t,r){if(zn!==0&&zn!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(tf()&&t.callbackNode!==i)return null;var l=Xt;return l=Ve(t,t===Tn?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(K2(t,l,r),i1(t,xt()),t.callbackNode!=null&&t.callbackNode===i?s1.bind(null,t):null)}function l1(t,r){if(tf())return null;K2(t,r,!0)}function zD(){QD(function(){(ln&6)!==0?Jt(ft,LD):o1()})}function Nm(){if(fi===0){var t=Gi;t===0&&(t=ne,ne<<=1,(ne&261888)===0&&(ne=256)),fi=t}return fi}function u1(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:hr(t)}function _D(t,r,i,l,f){if(r==="submit"&&i&&i.stateNode===f){var m=u1((f[Mn]||null).action),E=l.submitter;E&&(r=(r=E[Mn]||null)?u1(r.formAction):E.getAttribute("formAction"),r!==null&&(m=r,E=null));var P=new nd("action","action",null,l,f);t.push({event:P,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(fi!==0){var Q=new FormData(f,E);Hg(i,{pending:!0,data:Q,method:f.method,action:m},null,Q)}}else typeof m=="function"&&(P.preventDefault(),Q=new FormData(f,E),Hg(i,{pending:!0,data:Q,method:f.method,action:m},m,Q))},currentTarget:f}]})}}for(var Im=0;Im<rg.length;Im++){var jm=rg[Im],HD=jm.toLowerCase(),UD=jm[0].toUpperCase()+jm.slice(1);ka(HD,"on"+UD)}ka(Pb,"onAnimationEnd"),ka(Lb,"onAnimationIteration"),ka(zb,"onAnimationStart"),ka("dblclick","onDoubleClick"),ka("focusin","onFocus"),ka("focusout","onBlur"),ka(XA,"onTransitionRun"),ka(QA,"onTransitionStart"),ka(ZA,"onTransitionCancel"),ka(_b,"onTransitionEnd"),vn("onMouseEnter",["mouseout","mouseover"]),vn("onMouseLeave",["mouseout","mouseover"]),vn("onPointerEnter",["pointerout","pointerover"]),vn("onPointerLeave",["pointerout","pointerover"]),zt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zt("onBeforeInput",["compositionend","keypress","textInput","paste"]),zt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Iu="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(" "),FD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Iu));function c1(t,r){r=(r&4)!==0;for(var i=0;i<t.length;i++){var l=t[i],f=l.event;l=l.listeners;e:{var m=void 0;if(r)for(var E=l.length-1;0<=E;E--){var P=l[E],Q=P.instance,ie=P.currentTarget;if(P=P.listener,Q!==m&&f.isPropagationStopped())break e;m=P,f.currentTarget=ie;try{m(f)}catch(pe){od(pe)}f.currentTarget=null,m=Q}else for(E=0;E<l.length;E++){if(P=l[E],Q=P.instance,ie=P.currentTarget,P=P.listener,Q!==m&&f.isPropagationStopped())break e;m=P,f.currentTarget=ie;try{m(f)}catch(pe){od(pe)}f.currentTarget=null,m=Q}}}}function Yt(t,r){var i=r[vo];i===void 0&&(i=r[vo]=new Set);var l=t+"__bubble";i.has(l)||(d1(r,t,2,!1),i.add(l))}function km(t,r,i){var l=0;r&&(l|=4),d1(i,t,l,r)}var rf="_reactListening"+Math.random().toString(36).slice(2);function Pm(t){if(!t[rf]){t[rf]=!0,Ct.forEach(function(i){i!=="selectionchange"&&(FD.has(i)||km(i,!1,t),km(i,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[rf]||(r[rf]=!0,km("selectionchange",!1,r))}}function d1(t,r,i,l){switch(eS(r)){case 2:var f=jN;break;case 8:f=kN;break;default:f=t0}i=f.bind(null,r,i,t),f=void 0,!_i||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),l?f!==void 0?t.addEventListener(r,i,{capture:!0,passive:f}):t.addEventListener(r,i,!0):f!==void 0?t.addEventListener(r,i,{passive:f}):t.addEventListener(r,i,!1)}function Lm(t,r,i,l,f){var m=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var E=l.tag;if(E===3||E===4){var P=l.stateNode.containerInfo;if(P===f)break;if(E===4)for(E=l.return;E!==null;){var Q=E.tag;if((Q===3||Q===4)&&E.stateNode.containerInfo===f)return;E=E.return}for(;P!==null;){if(E=Fn(P),E===null)return;if(Q=E.tag,Q===5||Q===6||Q===26||Q===27){l=m=E;continue e}P=P.parentNode}}l=l.return}zi(function(){var ie=m,pe=Li(i),Ce=[];e:{var ae=Hb.get(t);if(ae!==void 0){var fe=nd,Ye=t;switch(t){case"keypress":if(ed(i)===0)break e;case"keydown":case"keyup":fe=CA;break;case"focusin":Ye="focus",fe=Gp;break;case"focusout":Ye="blur",fe=Gp;break;case"beforeblur":case"afterblur":fe=Gp;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=pb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=hA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=DA;break;case Pb:case Lb:case zb:fe=mA;break;case _b:fe=IA;break;case"scroll":case"scrollend":fe=dA;break;case"wheel":fe=kA;break;case"copy":case"cut":case"paste":fe=vA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=mb;break;case"submit":fe=MA;break;case"toggle":case"beforetoggle":fe=LA}var rt=(r&4)!==0,It=!rt&&(t==="scroll"||t==="scrollend"),oe=rt?ae!==null?ae+"Capture":null:ae;rt=[];for(var te=ie,ue;te!==null;){var Ee=te;if(ue=Ee.stateNode,Ee=Ee.tag,Ee!==5&&Ee!==26&&Ee!==27||ue===null||oe===null||(Ee=xo(te,oe),Ee!=null&&rt.push(ju(te,Ee,ue))),It)break;te=te.return}0<rt.length&&(ae=new fe(ae,Ye,null,i,pe),Ce.push({event:ae,listeners:rt}))}}if((r&7)===0){e:{if(fe=t==="mouseover"||t==="pointerover",ae=t==="mouseout"||t==="pointerout",fe&&i!==Pi&&(Ye=i.relatedTarget||i.fromElement)&&(Fn(Ye)||Ye[In]))break e;(ae||fe)&&(Ye=pe.window===pe?pe:(fe=pe.ownerDocument)?fe.defaultView||fe.parentWindow:window,ae?(fe=i.relatedTarget||i.toElement,ae=ie,fe=fe?Fn(fe):null,fe!==null&&(It=u(fe),rt=fe.tag,fe!==It||rt!==5&&rt!==27&&rt!==6)&&(fe=null)):(ae=null,fe=ie),ae!==fe&&(rt=pb,Ee="onMouseLeave",oe="onMouseEnter",te="mouse",(t==="pointerout"||t==="pointerover")&&(rt=mb,Ee="onPointerLeave",oe="onPointerEnter",te="pointer"),It=ae==null?Ye:he(ae),ue=fe==null?Ye:he(fe),Ye=new rt(Ee,te+"leave",ae,i,pe),Ye.target=It,Ye.relatedTarget=ue,Ee=null,Fn(pe)===ie&&(rt=new rt(oe,te+"enter",fe,i,pe),rt.target=ue,rt.relatedTarget=It,Ee=rt),It=Ee,rt=ae&&fe?j(ae,fe,BD):null,ae!==null&&f1(Ce,Ye,ae,rt,!1),fe!==null&&It!==null&&f1(Ce,It,fe,rt,!0)))}e:{if(ae=ie?he(ie):window,fe=ae.nodeName&&ae.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ae.type==="file")var Je=Eb;else if(wb(ae))if(Cb)Je=KA;else{Je=qA;var Qt=VA}else fe=ae.nodeName,!fe||fe.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?ie&&ki(ie.elementType)&&(Je=Eb):Je=YA;if(Je&&(Je=Je(t,ie))){Rb(Ce,Je,i,pe);break e}Qt&&Qt(t,ae,ie)}switch(Qt=ie?he(ie):window,t){case"focusin":(wb(Qt)||Qt.contentEditable==="true")&&(Is=Qt,eg=ie,lu=null);break;case"focusout":lu=eg=Is=null;break;case"mousedown":tg=!0;break;case"contextmenu":case"mouseup":case"dragend":tg=!1,jb(Ce,i,pe);break;case"selectionchange":if($A)break;case"keydown":case"keyup":jb(Ce,i,pe)}var lt;if(Xp)e:{switch(t){case"compositionstart":var bt="onCompositionStart";break e;case"compositionend":bt="onCompositionEnd";break e;case"compositionupdate":bt="onCompositionUpdate";break e}bt=void 0}else Ns?xb(t,i)&&(bt="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(bt="onCompositionStart");bt&&(yb&&i.locale!=="ko"&&(Ns||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&Ns&&(lt=fb()):(Go=pe,qp="value"in Go?Go.value:Go.textContent,Ns=!0)),Qt=af(ie,bt),0<Qt.length&&(bt=new gb(bt,t,null,i,pe),Ce.push({event:bt,listeners:Qt}),lt?bt.data=lt:(lt=Sb(i),lt!==null&&(bt.data=lt)))),(lt=_A?HA(t,i):UA(t,i))&&(bt=af(ie,"onBeforeInput"),0<bt.length&&(Qt=new gb("onBeforeInput","beforeinput",null,i,pe),Ce.push({event:Qt,listeners:bt}),Qt.data=lt)),_D(Ce,t,ie,i,pe)}c1(Ce,r)})}function ju(t,r,i){return{instance:t,listener:r,currentTarget:i}}function af(t,r){for(var i=r+"Capture",l=[];t!==null;){var f=t,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=xo(t,i),f!=null&&l.unshift(ju(t,f,m)),f=xo(t,r),f!=null&&l.push(ju(t,f,m))),t.tag===3)return l;t=t.return}return[]}function BD(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function f1(t,r,i,l,f){for(var m=r._reactName,E=[];i!==null&&i!==l;){var P=i,Q=P.alternate,ie=P.stateNode;if(P=P.tag,Q!==null&&Q===l)break;P!==5&&P!==26&&P!==27||ie===null||(Q=ie,f?(ie=xo(i,m),ie!=null&&E.unshift(ju(i,ie,Q))):f||(ie=xo(i,m),ie!=null&&E.push(ju(i,ie,Q)))),i=i.return}E.length!==0&&t.push({event:r,listeners:E})}var VD=/\r\n?/g,qD=/\u0000|\uFFFD/g;function h1(t){return(typeof t=="string"?t:""+t).replace(VD,`
|
|
10
|
+
`).replace(qD,"")}function p1(t,r){return r=h1(r),h1(t)===r}function mn(t,r,i,l,f,m){switch(i){case"children":if(typeof l=="string")r==="body"||r==="textarea"&&l===""||Mr(t,l);else if(typeof l=="number"||typeof l=="bigint")r!=="body"&&Mr(t,""+l);else return;break;case"className":Zr(t,"class",l);break;case"tabIndex":Zr(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Zr(t,i,l);break;case"style":Wr(t,l,m);return;case"data":if(r!=="object"){Zr(t,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||i!=="href")){t.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=hr(l),t.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(i,"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 m=="function"&&(i==="formAction"?(r!=="input"&&mn(t,r,"name",f.name,f,null),mn(t,r,"formEncType",f.formEncType,f,null),mn(t,r,"formMethod",f.formMethod,f,null),mn(t,r,"formTarget",f.formTarget,f,null)):(mn(t,r,"encType",f.encType,f,null),mn(t,r,"method",f.method,f,null),mn(t,r,"target",f.target,f,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=hr(l),t.setAttribute(i,l);break;case"onClick":l!=null&&(t.onclick=Ar);return;case"onScroll":l!=null&&Yt("scroll",t);return;case"onScrollEnd":l!=null&&Yt("scrollend",t);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(f.children!=null)throw Error(o(60));m?.__html!==i&&(t.innerHTML=i)}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}i=hr(l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,l):t.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":l===!0?t.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,l):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(i,l):t.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(i):t.setAttribute(i,l);break;case"popover":Yt("beforetoggle",t),Yt("toggle",t),Ln(t,"popover",l);break;case"xlinkActuate":Gn(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gn(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gn(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gn(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gn(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ln(t,"is",l);break;case"innerText":case"textContent":return;default:if(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")i=Wl.get(i)||i,Ln(t,i,l);else return}pt=!0}function zm(t,r,i,l,f,m){switch(i){case"style":Wr(t,l,m);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(f.children!=null)throw Error(o(60));m?.__html!==i&&(t.innerHTML=i)}}break;case"children":if(typeof l=="string")Mr(t,l);else if(typeof l=="number"||typeof l=="bigint")Mr(t,""+l);else return;break;case"onScroll":l!=null&&Yt("scroll",t);return;case"onScrollEnd":l!=null&&Yt("scrollend",t);return;case"onClick":l!=null&&(t.onclick=Ar);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!wt.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),m=i.slice(2,f?i.length-7:void 0),r=t[Mn]||null,r=r!=null?r[i]:null,typeof r=="function"&&t.removeEventListener(m,r,f),typeof l=="function")){typeof r!="function"&&r!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(m,l,f);break e}pt=!0,i in t?t[i]=l:l===!0?t.setAttribute(i,""):Ln(t,i,l)}return}pt=!0}function br(t,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Yt("error",t),Yt("load",t);var l=!1,f=!1,m;for(m in i)if(i.hasOwnProperty(m)){var E=i[m];if(E!=null)switch(m){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,r));default:mn(t,r,m,E,i,null)}}f&&mn(t,r,"srcSet",i.srcSet,i,null),l&&mn(t,r,"src",i.src,i,null);return;case"input":Yt("invalid",t);var P=m=E=f=null,Q=null,ie=null;for(l in i)if(i.hasOwnProperty(l)){var pe=i[l];if(pe!=null)switch(l){case"name":f=pe;break;case"type":E=pe;break;case"checked":Q=pe;break;case"defaultChecked":ie=pe;break;case"value":m=pe;break;case"defaultValue":P=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(o(137,r));break;default:mn(t,r,l,pe,i,null)}}Yo(t,m,P,Q,ie,E,f,!1);return;case"select":Yt("invalid",t),l=E=m=null;for(f in i)if(i.hasOwnProperty(f)&&(P=i[f],P!=null))switch(f){case"value":m=P;break;case"defaultValue":E=P;break;case"multiple":l=P;default:mn(t,r,f,P,i,null)}r=m,i=E,t.multiple=!!l,r!=null?Hr(t,!!l,r,!1):i!=null&&Hr(t,!!l,i,!0);return;case"textarea":Yt("invalid",t),m=f=l=null;for(E in i)if(i.hasOwnProperty(E)&&(P=i[E],P!=null))switch(E){case"value":l=P;break;case"defaultValue":f=P;break;case"children":m=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(91));break;default:mn(t,r,E,P,i,null)}Jr(t,l,f,m);return;case"option":for(Q in i)i.hasOwnProperty(Q)&&(l=i[Q],l!=null)&&(Q==="selected"?t.selected=l&&typeof l!="function"&&typeof l!="symbol":mn(t,r,Q,l,i,null));return;case"dialog":Yt("beforetoggle",t),Yt("toggle",t),Yt("cancel",t),Yt("close",t);break;case"iframe":case"object":Yt("load",t);break;case"video":case"audio":for(l=0;l<Iu.length;l++)Yt(Iu[l],t);break;case"image":Yt("error",t),Yt("load",t);break;case"details":Yt("toggle",t);break;case"embed":case"source":case"link":Yt("error",t),Yt("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(ie in i)if(i.hasOwnProperty(ie)&&(l=i[ie],l!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,r));default:mn(t,r,ie,l,i,null)}return;default:if(ki(r)){for(pe in i)i.hasOwnProperty(pe)&&(l=i[pe],l!==void 0&&zm(t,r,pe,l,i,void 0));return}}for(P in i)i.hasOwnProperty(P)&&(l=i[P],l!=null&&mn(t,r,P,l,i,null))}var YD={};function KD(t,r,i,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,E=null,P=null,Q=null,ie=null,pe=null;for(fe in i){var Ce=i[fe];if(i.hasOwnProperty(fe)&&Ce!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":Q=Ce;default:l.hasOwnProperty(fe)||mn(t,r,fe,null,l,Ce)}}for(var ae in l){var fe=l[ae];if(Ce=i[ae],l.hasOwnProperty(ae)&&(fe!=null||Ce!=null))switch(ae){case"type":fe!==Ce&&(pt=!0),m=fe;break;case"name":fe!==Ce&&(pt=!0),f=fe;break;case"checked":fe!==Ce&&(pt=!0),ie=fe;break;case"defaultChecked":fe!==Ce&&(pt=!0),pe=fe;break;case"value":fe!==Ce&&(pt=!0),E=fe;break;case"defaultValue":fe!==Ce&&(pt=!0),P=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,r));break;default:fe!==Ce&&mn(t,r,ae,fe,l,Ce)}}wr(t,E,P,Q,ie,pe,m,f);return;case"select":fe=E=P=ae=null;for(m in i)if(Q=i[m],i.hasOwnProperty(m)&&Q!=null)switch(m){case"value":break;case"multiple":fe=Q;default:l.hasOwnProperty(m)||mn(t,r,m,null,l,Q)}for(f in l)if(m=l[f],Q=i[f],l.hasOwnProperty(f)&&(m!=null||Q!=null))switch(f){case"value":m!==Q&&(pt=!0),ae=m;break;case"defaultValue":m!==Q&&(pt=!0),P=m;break;case"multiple":m!==Q&&(pt=!0),E=m;default:m!==Q&&mn(t,r,f,m,l,Q)}r=P,i=E,l=fe,ae!=null?Hr(t,!!i,ae,!1):!!l!=!!i&&(r!=null?Hr(t,!!i,r,!0):Hr(t,!!i,i?[]:"",!1));return;case"textarea":fe=ae=null;for(P in i)if(f=i[P],i.hasOwnProperty(P)&&f!=null&&!l.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:mn(t,r,P,null,l,f)}for(E in l)if(f=l[E],m=i[E],l.hasOwnProperty(E)&&(f!=null||m!=null))switch(E){case"value":f!==m&&(pt=!0),ae=f;break;case"defaultValue":f!==m&&(pt=!0),fe=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:f!==m&&mn(t,r,E,f,l,m)}Ds(t,ae,fe);return;case"option":for(var Ye in i)ae=i[Ye],i.hasOwnProperty(Ye)&&ae!=null&&!l.hasOwnProperty(Ye)&&(Ye==="selected"?t.selected=!1:mn(t,r,Ye,null,l,ae));for(Q in l)ae=l[Q],fe=i[Q],l.hasOwnProperty(Q)&&ae!==fe&&(ae!=null||fe!=null)&&(Q==="selected"?(ae!==fe&&(pt=!0),t.selected=ae&&typeof ae!="function"&&typeof ae!="symbol"):mn(t,r,Q,ae,l,fe));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 rt in i)ae=i[rt],i.hasOwnProperty(rt)&&ae!=null&&!l.hasOwnProperty(rt)&&mn(t,r,rt,null,l,ae);for(ie in l)if(ae=l[ie],fe=i[ie],l.hasOwnProperty(ie)&&ae!==fe&&(ae!=null||fe!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,r));break;default:mn(t,r,ie,ae,l,fe)}return;default:if(ki(r)){for(var It in i)ae=i[It],i.hasOwnProperty(It)&&ae!==void 0&&!l.hasOwnProperty(It)&&zm(t,r,It,void 0,l,ae);for(pe in l)ae=l[pe],fe=i[pe],!l.hasOwnProperty(pe)||ae===fe||ae===void 0&&fe===void 0||zm(t,r,pe,ae,l,fe);return}}for(var oe in i)ae=i[oe],i.hasOwnProperty(oe)&&ae!=null&&!l.hasOwnProperty(oe)&&mn(t,r,oe,null,l,ae);for(Ce in l)ae=l[Ce],fe=i[Ce],!l.hasOwnProperty(Ce)||ae===fe||ae==null&&fe==null||mn(t,r,Ce,ae,l,fe)}function g1(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function GD(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var f=i[l],m=f.transferSize,E=f.initiatorType,P=f.duration;if(m&&P&&g1(E)){for(E=0,P=f.responseEnd,l+=1;l<i.length;l++){var Q=i[l],ie=Q.startTime;if(ie>P)break;var pe=Q.transferSize,Ce=Q.initiatorType;pe&&g1(Ce)&&(Q=Q.responseEnd,E+=pe*(Q<P?1:(P-ie)/(Q-ie)))}if(--l,r+=8*(m+E)/(f.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var _m=null,Hm=null;function ku(t){return t.nodeType===9?t:t.ownerDocument}function m1(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 y1(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function v1(t,r,i,l){return i=ku(i).createElement(t),i[dn]=l,i[Mn]=r,br(i,t,r),Se(i),i}function Um(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Fm=null;function $D(){var t=window.event;return t&&t.type==="popstate"?t===Fm?!1:(Fm=t,!0):(Fm=null,!1)}var Bm=typeof setTimeout=="function"?setTimeout:void 0,XD=typeof clearTimeout=="function"?clearTimeout:void 0,b1=typeof Promise=="function"?Promise:void 0,x1=typeof requestAnimationFrame=="function"?requestAnimationFrame:Bm,QD=typeof queueMicrotask=="function"?queueMicrotask:typeof b1<"u"?function(t){return b1.resolve(null).then(t).catch(ZD)}:Bm;function ZD(t){setTimeout(function(){throw t})}function hi(t){return t==="head"}function S1(t,r){var i=r,l=0;do{var f=i.nextSibling;if(t.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(l===0){t.removeChild(f),dl(r);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Qm(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,Qm(i);for(var m=i.firstChild;m;){var E=m.nextSibling,P=m.nodeName;m[pa]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&m.rel.toLowerCase()==="stylesheet"||i.removeChild(m),m=E}}else i==="body"&&Qm(t.ownerDocument.body);i=f}while(i);dl(r)}function w1(t,r){var i=t;t=0;do{var l=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=l}while(i)}function R1(t,r,i){if(r=CSS.escape(r)!==r?"r-"+btoa(r).replace(/=/g,""):r,t.style.viewTransitionName=r,i!=null&&(t.style.viewTransitionClass=i),i=getComputedStyle(t),i.display==="inline"){if(r=t.getClientRects(),r.length===1)var l=1;else for(var f=l=0;f<r.length;f++){var m=r[f];0<m.width&&0<m.height&&l++}l===1&&(t=t.style,t.display=r.length===1?"inline-block":"block",t.marginTop="-"+i.paddingTop,t.marginBottom="-"+i.paddingBottom)}}function E1(t,r){t=t.style,r=r.style;var i=r!=null?r.hasOwnProperty("viewTransitionName")?r.viewTransitionName:r.hasOwnProperty("view-transition-name")?r["view-transition-name"]:null:null;t.viewTransitionName=i==null||typeof i=="boolean"?"":(""+i).trim(),i=r!=null?r.hasOwnProperty("viewTransitionClass")?r.viewTransitionClass:r.hasOwnProperty("view-transition-class")?r["view-transition-class"]:null:null,t.viewTransitionClass=i==null||typeof i=="boolean"?"":(""+i).trim(),t.display==="inline-block"&&(r==null?t.display=t.margin="":(i=r.display,t.display=i==null||typeof i=="boolean"?"":i,i=r.margin,i!=null?t.margin=i:(i=r.hasOwnProperty("marginTop")?r.marginTop:r["margin-top"],t.marginTop=i==null||typeof i=="boolean"?"":i,r=r.hasOwnProperty("marginBottom")?r.marginBottom:r["margin-bottom"],t.marginBottom=r==null||typeof r=="boolean"?"":r)))}function JD(t,r,i){return i=i.ownerDocument.defaultView,{rect:t,abs:r.position==="absolute"||r.position==="fixed",clip:r.clipPath!=="none"||r.overflow!=="visible"||r.filter!=="none"||r.mask!=="none"||r.mask!=="none"||r.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=i.innerHeight&&t.left<=i.innerWidth}}function Vm(t){var r=t.getBoundingClientRect(),i=getComputedStyle(t);return JD(r,i,t)}function WD(t){return t.documentElement.clientHeight}function eN(t){this.addEventListener("load",t),this.addEventListener("error",t)}function tN(t,r,i,l,f,m,E,P,Q){var ie=r.nodeType===9?r:r.ownerDocument;try{var pe=ie.startViewTransition({update:function(){var ae=ie.defaultView,fe=ae.navigation&&ae.navigation.transition,Ye=ie.fonts.status;l();var rt=[];if(Ye==="loaded"&&(WD(ie),ie.fonts.status==="loading"&&rt.push(ie.fonts.ready)),Ye=rt.length,t!==null)for(var It=t.suspenseyImages,oe=0,te=0;te<It.length;te++){var ue=It[te];if(!ue.complete){var Ee=ue.getBoundingClientRect();if(0<Ee.bottom&&0<Ee.right&&Ee.top<ae.innerHeight&&Ee.left<ae.innerWidth){if(oe+=Y1(ue),oe>lf){rt.length=Ye;break}ue=new Promise(eN.bind(ue)),rt.push(ue)}}}if(0<rt.length)return ae=Promise.race([Promise.all(rt),new Promise(function(Je){return setTimeout(Je,500)})]).then(f,f),(fe?Promise.allSettled([fe.finished,ae]):ae).then(m,m);if(f(),fe)return fe.finished.then(m,m);m()},types:i});ie.__reactViewTransition=pe;var Ce=[];return pe.ready.then(function(){for(var ae=ie.documentElement.getAnimations({subtree:!0}),fe=0;fe<ae.length;fe++){var Ye=ae[fe],rt=Ye.effect,It=rt.pseudoElement;if(It!=null&&It.startsWith("::view-transition")){Ce.push(Ye),Ye=rt.getKeyframes();for(var oe=It=void 0,te=!0,ue=0;ue<Ye.length;ue++){var Ee=Ye[ue],Je=Ee.width;if(It===void 0)It=Je;else if(It!==Je){te=!1;break}if(Je=Ee.height,oe===void 0)oe=Je;else if(oe!==Je){te=!1;break}delete Ee.width,delete Ee.height,Ee.transform==="none"&&delete Ee.transform}te&&It!==void 0&&oe!==void 0&&(rt.setKeyframes(Ye),te=getComputedStyle(rt.target,rt.pseudoElement),te.width!==It||te.height!==oe)&&(te=Ye[0],te.width=It,te.height=oe,te=Ye[Ye.length-1],te.width=It,te.height=oe,rt.setKeyframes(Ye))}}E()},function(ae){ie.__reactViewTransition===pe&&(ie.__reactViewTransition=null);try{typeof ae=="object"&&ae!==null&&ae.name==="InvalidStateError"&&(ae.message==="View transition was skipped because document visibility state is hidden."||ae.message==="Skipping view transition because document visibility state has become hidden."||ae.message==="Skipping view transition because viewport size changed."||ae.message==="Transition was aborted because of invalid state")&&(ae=null),ae!==null&&Q(ae)}finally{l(),f(),E()}}),pe.finished.finally(function(){for(var ae=0;ae<Ce.length;ae++)Ce[ae].cancel();ie.__reactViewTransition===pe&&(ie.__reactViewTransition=null),P()}),pe}catch{return l(),f(),E(),null}}function as(t,r){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+r+")"}as.prototype.animate=function(t,r){return r=typeof r=="number"?{duration:r}:k({},r),r.pseudoElement=this._selector,this._scope.animate(t,r)},as.prototype.getAnimations=function(){for(var t=this._scope,r=this._selector,i=t.getAnimations({subtree:!0}),l=[],f=0;f<i.length;f++){var m=i[f].effect;m!==null&&m.target===t&&m.pseudoElement===r&&l.push(i[f])}return l},as.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function C1(t){return{name:t,group:new as("group",t),imagePair:new as("image-pair",t),old:new as("old",t),new:new as("new",t)}}function sa(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}sa.prototype.addEventListener=function(t,r,i){var l=null,f=null;if(!(i!=null&&typeof i!="boolean"&&(l=i.signal||null,l!==null&&l.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var m=this._eventListeners;if(O1(m,t,r,i)===-1){var E=this,P=r;i!=null&&typeof i!="boolean"&&i.once===!0&&(P=function(Q){E.removeEventListener(t,r,i),typeof r=="function"?r.call(this,Q):r.handleEvent(Q)}),l!==null&&(f=E.removeEventListener.bind(E,t,r,i),l.addEventListener("abort",f,{once:!0}),f=l.removeEventListener.bind(l,"abort",f)),l=ol(i),m.push({type:t,listener:r,optionsOrUseCapture:i,attachedListener:P,cleanup:f}),h(this._fragmentFiber.child,!1,nN,t,P,l)}this._eventListeners=m}};function nN(t,r,i,l){return R(t).addEventListener(r,i,l),!1}sa.prototype.removeEventListener=function(t,r,i){var l=this._eventListeners;if(l!==null&&(r=O1(l,t,r,i),r!==-1)){var f=l[r];i=f.attachedListener;var m=f.cleanup;f=ol(f.optionsOrUseCapture),h(this._fragmentFiber.child,!1,rN,t,i,f),l.splice(r,1),m!==null&&m()}};function rN(t,r,i,l){return R(t).removeEventListener(r,i,l),!1}function ol(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function T1(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function O1(t,r,i,l){if(t.length===0)return-1;l=T1(l);for(var f=0;f<t.length;f++){var m=t[f];if(m.type===r&&m.listener===i&&T1(m.optionsOrUseCapture)===l)return f}return-1}sa.prototype.dispatchEvent=function(t){var r=b(this._fragmentFiber);if(r===null)return!0;r=R(r);var i=this._eventListeners;if(i!==null&&0<i.length||!t.bubbles){var l=r.nodeType===9?r.createComment(""):document.createTextNode("");if(i)for(var f=0;f<i.length;f++){var m=i[f];l.addEventListener(m.type,m.attachedListener,ol(m.optionsOrUseCapture))}if(r.appendChild(l),t=l.dispatchEvent(t),i)for(f=0;f<i.length;f++)m=i[f],l.removeEventListener(m.type,m.attachedListener,ol(m.optionsOrUseCapture));return r.removeChild(l),t}return r.dispatchEvent(t)},sa.prototype.focus=function(t){h(this._fragmentFiber.child,!0,M1,t,void 0,void 0)};function M1(t,r){return t.tag===6?!1:(t=R(t),gN(t,r))}sa.prototype.focusLast=function(t){var r=[];h(this._fragmentFiber.child,!0,qm,r,void 0,void 0);for(var i=r.length-1;0<=i&&!M1(r[i],t);i--);};function qm(t,r){return r.push(t),!1}sa.prototype.blur=function(){var t=b(this._fragmentFiber);t!==null&&(t=R(t),t=ku(t).activeElement,t!==null&&h(this._fragmentFiber.child,!1,aN,t,void 0,void 0))};function aN(t,r){return t.tag===6?!1:(t=R(t),t===r||t.contains(r)?(r.blur(),!0):!1)}sa.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),h(this._fragmentFiber.child,!1,oN,t,void 0,void 0)};function oN(t,r){return t.tag===6||(t=R(t),r.observe(t)),!1}sa.prototype.unobserveUsing=function(t){var r=this._observers;if(r!==null&&r.has(t)){r.delete(t),h(this._fragmentFiber.child,!1,iN,t,void 0,void 0);for(var i=r=0;i<Ha.length;i++){var l=Ha[i];l.fragmentInstance===this&&l.observer===t?t.unobserve(l.instance):Ha[r++]=l}Ha.length=r}};function iN(t,r){return t.tag===6||(t=R(t),r.unobserve(t)),!1}var Ha=[],Ym=!1;function sN(t,r,i){Ha.push({fragmentInstance:t,observer:r,instance:i}),Ym||(Ym=!0,mN(function(){Ym=!1;var l=Ha;Ha=[];for(var f=0;f<l.length;f++){var m=l[f];m.observer.unobserve(m.instance)}}))}sa.prototype.getClientRects=function(){var t=[];return h(this._fragmentFiber.child,!1,lN,t,void 0,void 0),t};function lN(t,r){if(t.tag===6){t=t.stateNode;var i=t.ownerDocument.createRange();i.selectNodeContents(t),r.push.apply(r,i.getClientRects())}else t=R(t),r.push.apply(r,t.getClientRects());return!1}sa.prototype.getRootNode=function(t){var r=b(this._fragmentFiber);return r===null?this:R(r).getRootNode(t)},sa.prototype.compareDocumentPosition=function(t){var r=b(this._fragmentFiber);if(r===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var i=[];h(this._fragmentFiber.child,!1,qm,i,void 0,void 0);var l=R(r);if(i.length===0){if(i=l,x(this._fragmentFiber)){e:{for(r=this._fragmentFiber.return;r!==null;){if(r.tag===4){r=r.stateNode.containerInfo;break e}if(r.tag===3||r.tag===5||r.tag===27)break;r=r.return}r=null}r!=null&&(i=r)}r=this._fragmentFiber;var f=l=i.compareDocumentPosition(t);return i===t?f=Node.DOCUMENT_POSITION_CONTAINS:l&Node.DOCUMENT_POSITION_CONTAINED_BY&&(i=w(r)[1],i===null?f=Node.DOCUMENT_POSITION_PRECEDING:(t=R(i).compareDocumentPosition(t),f=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),f|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}r=R(i[0]),f=R(i[i.length-1]);var m=x(this._fragmentFiber)?r.parentElement:l;if(m==null)return Node.DOCUMENT_POSITION_DISCONNECTED;l=m.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY,m=m.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY;var E=r.compareDocumentPosition(t),P=f.compareDocumentPosition(t),Q=E&Node.DOCUMENT_POSITION_CONTAINED_BY||P&Node.DOCUMENT_POSITION_CONTAINED_BY;return P=l&&m&&E&Node.DOCUMENT_POSITION_FOLLOWING&&P&Node.DOCUMENT_POSITION_PRECEDING,r=l&&r===t||m&&f===t||Q||P?Node.DOCUMENT_POSITION_CONTAINED_BY:!l&&r===t||!m&&f===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:E,r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||uN(r,this._fragmentFiber,i[0],i[i.length-1],t)?r:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function uN(t,r,i,l,f){var m=Fn(f);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(i=!!m)e:{for(;m!==null;){if(m.tag===7&&(m===r||m.alternate===r)){i=!0;break e}m=m.return}i=!1}return i}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(m===null)return m=f.ownerDocument,f===m||f===m.documentElement||f===m.body;e:{for(m=r,r=b(r);m!==null;){if(!(m.tag!==5&&m.tag!==3&&m.tag!==27||m!==r&&m.alternate!==r)){m=!0;break e}m=m.return}m=!1}return m}return t&Node.DOCUMENT_POSITION_PRECEDING?((r=!!m)&&!(r=m===i)&&(r=j(i,m,I),r===null?r=!1:(h(r,!0,M,m,i),m=T,T=null,r=m!==null)),r):t&Node.DOCUMENT_POSITION_FOLLOWING?((r=!!m)&&!(r=m===l)&&(r=j(l,m,I),r===null?r=!1:(h(r,!0,A,m,l),m=T,O=T=null,r=m!==null)),r):!1}function A1(t,r){var i=t.ownerDocument.createRange();i.selectNodeContents(t),t=i.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,r?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}sa.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(o(566));var r=[];h(this._fragmentFiber.child,!1,qm,r,void 0,void 0);var i=t!==!1;if(r.length===0){var l=w(this._fragmentFiber);if(l=i?l[1]||l[0]||b(this._fragmentFiber):l[0]||l[1],l===null)return;if(l.tag===6){t=R(l),A1(t,i);return}if(l=R(l),l.nodeType!==9){if(l.nodeType===11){i="host"in l?l.host:null,i!==null&&i.scrollIntoView(t);return}l.scrollIntoView(t)}}for(l=i?r.length-1:0;l!==(i?-1:r.length);){var f=r[l];f.tag===6?(f=R(f),A1(f,i)):R(f).scrollIntoView(t),l+=i?-1:1}};function cN(t,r){return t=R(t),D1(t,r),!1}function D1(t,r){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(r)}function N1(t,r){var i=r._eventListeners;if(i!==null)for(var l=0;l<i.length;l++){var f=i[l];t.addEventListener(f.type,f.attachedListener,ol(f.optionsOrUseCapture))}t.nodeType!==3&&(i=r._observers,i!==null&&i.forEach(function(m){for(var E=0,P=0;P<Ha.length;P++){var Q=Ha[P];(Q.fragmentInstance!==r||Q.observer!==m||Q.instance!==t)&&(Ha[E++]=Q)}Ha.length=E,m.observe(t)}),D1(t,r))}function dN(t,r){var i=r._eventListeners;if(i!==null)for(var l=0;l<i.length;l++){var f=i[l];t.removeEventListener(f.type,f.attachedListener,ol(f.optionsOrUseCapture))}t.nodeType!==3&&(i=r._observers,i!==null&&i.forEach(function(m){typeof m.rootMargin=="string"?sN(r,m,t):m.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(r))}function Km(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Km(i),Yn(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function fN(t,r,i,l){for(;t.nodeType===1;){var f=i;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[pa])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=wa(t.nextSibling),t===null)break}return null}function hN(t,r,i){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=wa(t.nextSibling),t===null))return null;return t}function I1(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=wa(t.nextSibling),t===null))return null;return t}function Gm(t){return t.data==="$?"||t.data==="$~"}function $m(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function pN(t,r){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||i.readyState!=="loading")r();else{var l=function(){r(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function wa(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var Xm=null;function j1(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(r===0)return wa(t.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}t=t.nextSibling}return null}function k1(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return t;r--}else i!=="/$"&&i!=="/&"||r++}t=t.previousSibling}return null}function gN(t,r){function i(){l=!0}if(t.ownerDocument.activeElement===t)return!0;var l=!1;try{t.ownerDocument.addEventListener("focus",i,!0),(t.focus||HTMLElement.prototype.focus).call(t,r)}finally{t.ownerDocument.removeEventListener("focus",i,!0)}return l}function mN(t){x1(function(){x1(function(r){return t(r)})})}function P1(t,r,i){switch(r=ku(i),t){case"html":if(t=r.documentElement,!t)throw Error(o(452));return t;case"head":if(t=r.head,!t)throw Error(o(453));return t;case"body":if(t=r.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function L1(t,r,i){for(var l in i){var f=i[l];i.hasOwnProperty(l)&&f!=null&&mn(t,r,l,null,YD,f)}i.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Ar&&(t.onclick=null),Yn(t)}function Qm(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Yn(t)}var Ra=new Map,z1=new Set;function Pu(t){if(typeof t.getRootNode=="function"){var r=t.getRootNode();if(r.nodeType===9||r.nodeType===11)return r}return t.nodeType===9?t:t.ownerDocument}var Io=ce.d;ce.d={f:yN,r:vN,D:bN,C:xN,L:SN,m:wN,X:EN,S:RN,M:CN};function yN(){var t=Io.f(),r=Jd();return t||r}function vN(t){var r=fr(t);r!==null&&r.tag===5&&r.type==="form"?Hx(r):Io.r(t)}var il=typeof document>"u"?null:document;function _1(t,r,i){var l=il;if(l&&typeof r=="string"&&r){var f=Nn(r);f='link[rel="'+t+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),z1.has(f)||(z1.add(f),t={rel:t,crossOrigin:i,href:r},l.querySelector(f)===null&&(r=l.createElement("link"),br(r,"link",t),Se(r),l.head.appendChild(r)))}}function bN(t){Io.D(t),_1("dns-prefetch",t,null)}function xN(t,r){Io.C(t,r),_1("preconnect",t,r)}function SN(t,r,i){Io.L(t,r,i);var l=il;if(l&&t&&r){var f='link[rel="preload"][as="'+Nn(r)+'"]';r==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+Nn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+Nn(i.imageSizes)+'"]')):f+='[href="'+Nn(t)+'"]';var m=f;switch(r){case"style":m=sl(t);break;case"script":m=ll(t)}if(!(Ra.has(m)||(t=k({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:t,as:r},i),Ra.set(m,t),l.querySelector(f)!==null||r==="style"&&l.querySelector(Lu(m))||r==="script"&&l.querySelector(zu(m))))){var E=l.createElement("link");br(E,"link",t),r==="style"&&(E[kt]=!0,E.onload=E.onerror=function(){nt(E)}),Se(E),l.head.appendChild(E)}}}function wN(t,r){Io.m(t,r);var i=il;if(i&&t){var l=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+Nn(l)+'"][href="'+Nn(t)+'"]',m=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=ll(t)}if(!Ra.has(m)&&(t=k({rel:"modulepreload",href:t},r),Ra.set(m,t),i.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(zu(m)))return}l=i.createElement("link"),br(l,"link",t),Se(l),i.head.appendChild(l)}}}function RN(t,r,i){Io.S(t,r,i);var l=il;if(l&&t){var f=Ae(l).hoistableStyles,m=sl(t);r=r||"default";var E=f.get(m);if(!E){var P={loading:0,preload:null};if(E=l.querySelector(Lu(m)))P.loading=5;else{t=k({rel:"stylesheet",href:t,"data-precedence":r},i),(i=Ra.get(m))&&Zm(t,i);var Q=E=l.createElement("link");Se(Q),br(Q,"link",t),Q._p=new Promise(function(ie,pe){Q.onload=ie,Q.onerror=pe}),Q.addEventListener("load",function(){P.loading|=1}),Q.addEventListener("error",function(){P.loading|=2}),P.loading|=4,of(E,r,l)}E={type:"stylesheet",instance:E,count:1,state:P},f.set(m,E)}}}function EN(t,r){Io.X(t,r);var i=il;if(i&&t){var l=Ae(i).hoistableScripts,f=ll(t),m=l.get(f);m||(m=i.querySelector(zu(f)),m||(t=k({src:t,async:!0},r),(r=Ra.get(f))&&Jm(t,r),m=i.createElement("script"),Se(m),br(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function CN(t,r){Io.M(t,r);var i=il;if(i&&t){var l=Ae(i).hoistableScripts,f=ll(t),m=l.get(f);m||(m=i.querySelector(zu(f)),m||(t=k({src:t,async:!0,type:"module"},r),(r=Ra.get(f))&&Jm(t,r),m=i.createElement("script"),Se(m),br(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function H1(t,r,i,l){var f=(f=be.current)?Pu(f):null;if(!f)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(i=sl(i.href),r=Ae(f).hoistableStyles,l=r.get(i),l||(l={type:"style",instance:null,count:0,state:null},r.set(i,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=sl(i.href);var m=Ae(f).hoistableStyles,E=m.get(t);if(E||(f=f.ownerDocument||f,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,E),(m=f.querySelector(Lu(t)))?m._p||(E.instance=m,E.state.loading=5):(m=Ra.get(t),m||(m={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Ra.set(t,m)),TN(f,t,m,E.state))),r&&l===null)throw Error(o(528,""));return E}if(r&&l!==null)throw Error(o(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(i=ll(i),r=Ae(f).hoistableScripts,l=r.get(i),l||(l={type:"script",instance:null,count:0,state:null},r.set(i,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function sl(t){return'href="'+Nn(t)+'"'}function Lu(t){return'link[rel="stylesheet"]['+t+"]"}function U1(t){return k({},t,{"data-precedence":t.precedence,precedence:null})}function TN(t,r,i,l){if(r=t.querySelector('link[rel="preload"][as="style"]['+r+"]")){if(r[kt]!==!0){l.loading=1;return}}else r=t.createElement("link"),r[kt]=!0,r.onload=r.onerror=nt.bind(null,r),br(r,"link",i),Se(r),t.head.appendChild(r);l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2})}function ll(t){return'[src="'+Nn(t)+'"]'}function zu(t){return"script[async]"+t}function F1(t,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var l=t.querySelector('style[data-href~="'+Nn(i.href)+'"]');if(l)return r.instance=l,Se(l),l;var f=k({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),Se(l),br(l,"style",f),of(l,i.precedence,t),r.instance=l;case"stylesheet":f=sl(i.href);var m=t.querySelector(Lu(f));if(m)return r.state.loading|=4,r.instance=m,Se(m),m;l=U1(i),(f=Ra.get(f))&&Zm(l,f),m=(t.ownerDocument||t).createElement("link"),Se(m);var E=m;return E._p=new Promise(function(P,Q){E.onload=P,E.onerror=Q}),br(m,"link",l),r.state.loading|=4,of(m,i.precedence,t),r.instance=m;case"script":return m=ll(i.src),(f=t.querySelector(zu(m)))?(r.instance=f,Se(f),f):(l=i,(f=Ra.get(m))&&(l=k({},i),Jm(l,f)),t=t.ownerDocument||t,f=t.createElement("script"),Se(f),br(f,"link",l),t.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(o(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,of(l,i.precedence,t));return r.instance}function of(t,r,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,m=f,E=0;E<l.length;E++){var P=l[E];if(P.dataset.precedence===r)m=P;else if(m!==f)break}m?m.parentNode.insertBefore(t,m.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(t,r.firstChild))}function Zm(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function Jm(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var sf=null;function B1(t,r,i){if(sf===null){var l=new Map,f=sf=new Map;f.set(i,l)}else f=sf,l=f.get(i),l||(l=new Map,f.set(i,l));if(l.has(t))return l;for(l.set(t,null),i=i.getElementsByTagName(t),f=0;f<i.length;f++){var m=i[f];if(!(m[pa]||m[dn]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var E=m.getAttribute(r)||"";E=t+E;var P=l.get(E);P?P.push(m):l.set(E,[m])}}return l}function Wm(t,r,i){t=t.ownerDocument||t,t.head.insertBefore(i,r==="title"?t.querySelector("head > title"):null)}function ON(t,r,i){if(i===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(t=r.disabled,typeof r.precedence=="string"&&t==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function V1(t,r){return t==="img"&&r.src!=null&&r.src!==""&&r.onLoad==null&&r.loading!=="lazy"}function q1(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Y1(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function K1(t,r){typeof r.decode=="function"&&(t.imgCount++,r.complete||(t.imgBytes+=Y1(r),t.suspenseyImages.push(r)),t=DN.bind(t),r.decode().then(t,t))}function MN(t,r,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=sl(l.href),m=r.querySelector(Lu(f));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=_u.bind(t),r.then(t,t)),i.state.loading|=4,i.instance=m,Se(m);return}m=r.ownerDocument||r,l=U1(l),(f=Ra.get(f))&&Zm(l,f),m=m.createElement("link"),Se(m);var E=m;E._p=new Promise(function(P,Q){E.onload=P,E.onerror=Q}),br(m,"link",l),i.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=_u.bind(t),r.addEventListener("load",i),r.addEventListener("error",i))}}var lf=0;function AN(t,r){return t.stylesheets&&t.count===0&&cf(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var l=setTimeout(function(){if(t.stylesheets&&cf(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+r);0<t.imgBytes&&lf===0&&(lf=62500*GD());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&cf(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>lf?50:800)+r);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(f)}}:null}function G1(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)cf(t,t.stylesheets);else if(t.unsuspend){var r=t.unsuspend;t.unsuspend=null,r()}}}function _u(){this.count--,G1(this)}function DN(){this.imgCount--,G1(this)}var uf=null;function cf(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,uf=new Map,r.forEach(NN,t),uf=null,_u.call(t))}function NN(t,r){if(!(r.state.loading&4)){var i=uf.get(t);if(i)var l=i.get(null);else{i=new Map,uf.set(t,i);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var E=f[m];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(i.set(E.dataset.precedence,E),l=E)}l&&i.set(null,l)}f=r.instance,E=f.getAttribute("data-precedence"),m=i.get(E)||l,m===l&&i.set(null,f),i.set(E,f),this.count++,l=_u.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),m?m.parentNode.insertBefore(f,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),r.state.loading|=4}}var ul={$$typeof:_,Provider:null,Consumer:null,_currentValue:Te,_currentValue2:Te,_threadCount:0};function IN(t,r,i,l,f,m,E,P,Q){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=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.transitionTypes=null,this.incompleteTransitions=new Map}function $1(t,r,i,l,f,m,E,P,Q,ie,pe,Ce){return t=new IN(t,r,i,E,Q,ie,pe,Ce,P),r=1,m===!0&&(r|=24),m=Ur(3,null,null,r),t.current=m,m.stateNode=t,r=pg(),r.refCount++,t.pooledCache=r,r.refCount++,m.memoizedState={element:l,isDehydrated:i,cache:r},vg(m),t}function X1(t){return t?(t=Ps,t):Ps}function Q1(t,r,i,l,f,m){f=X1(f),l.context===null?l.context=f:l.pendingContext=f,l=ti(r),l.payload={element:i},m=m===void 0?null:m,m!==null&&(l.callback=m),i=ni(t,l,r),i!==null&&(qr(i,t,r),gu(i,t,r))}function Z1(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<r?i:r}}function e0(t,r){Z1(t,r),(t=t.alternate)&&Z1(t,r)}function J1(t){if(t.tag===13||t.tag===31){var r=Fi(t,67108864);r!==null&&qr(r,t,67108864),e0(t,67108864)}}function W1(t){if(t.tag===13||t.tag===31){var r=ia();r=Ut(r);var i=Fi(t,r);i!==null&&qr(i,t,r),e0(t,r)}}var cl=!0;function jN(t,r,i,l){var f=ge.T;ge.T=null;var m=ce.p;try{ce.p=2,t0(t,r,i,l)}finally{ce.p=m,ge.T=f}}function kN(t,r,i,l){var f=ge.T;ge.T=null;var m=ce.p;try{ce.p=8,t0(t,r,i,l)}finally{ce.p=m,ge.T=f}}function t0(t,r,i,l){if(cl){var f=n0(l);if(f===null)Lm(t,r,l,df,i),tS(t,l);else if(LN(f,t,r,i,l))l.stopPropagation();else if(tS(t,l),r&4&&-1<PN.indexOf(t)){for(;f!==null;){var m=fr(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var E=qe(m.pendingLanes);if(E!==0){var P=m;for(P.pendingLanes|=2,P.entangledLanes|=2;E;){var Q=1<<31-et(E);P.entanglements[1]|=Q,E&=~Q}ro(m),(ln&6)===0&&(Xd=xt()+500,Nu(0))}}break;case 31:case 13:P=Fi(m,2),P!==null&&qr(P,m,2),Jd(),e0(m,2)}if(m=n0(l),m===null&&Lm(t,r,l,df,i),m===f)break;f=m}f!==null&&l.stopPropagation()}else Lm(t,r,l,null,i)}}function n0(t){return t=Li(t),r0(t)}var df=null;function r0(t){if(df=null,t=Fn(t),t!==null){var r=u(t);if(r===null)t=null;else{var i=r.tag;if(i===13){if(t=c(r),t!==null)return t;t=null}else if(i===31){if(t=d(r),t!==null)return t;t=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return df=t,null}function eS(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($t()){case ft:return 2;case vt:return 8;case gt:case Lt:return 32;case un:return 268435456;default:return 32}default:return 32}}var a0=!1,pi=null,gi=null,mi=null,Hu=new Map,Uu=new Map,yi=[],PN="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 tS(t,r){switch(t){case"focusin":case"focusout":pi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":mi=null;break;case"pointerover":case"pointerout":Hu.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uu.delete(r.pointerId)}}function Fu(t,r,i,l,f,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:i,eventSystemFlags:l,nativeEvent:m,targetContainers:[f]},r!==null&&(r=fr(r),r!==null&&J1(r)),t):(t.eventSystemFlags|=l,r=t.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),t)}function LN(t,r,i,l,f){switch(r){case"focusin":return pi=Fu(pi,t,r,i,l,f),!0;case"dragenter":return gi=Fu(gi,t,r,i,l,f),!0;case"mouseover":return mi=Fu(mi,t,r,i,l,f),!0;case"pointerover":var m=f.pointerId;return Hu.set(m,Fu(Hu.get(m)||null,t,r,i,l,f)),!0;case"gotpointercapture":return m=f.pointerId,Uu.set(m,Fu(Uu.get(m)||null,t,r,i,l,f)),!0}return!1}function nS(t){var r=Fn(t.target);if(r!==null){var i=u(r);if(i!==null){if(r=i.tag,r===13){if(r=c(i),r!==null){t.blockedOn=r,Xr(t.priority,function(){W1(i)});return}}else if(r===31){if(r=d(i),r!==null){t.blockedOn=r,Xr(t.priority,function(){W1(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ff(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var i=n0(t.nativeEvent);if(i===null){i=t.nativeEvent;var l=new i.constructor(i.type,i);Pi=l,i.target.dispatchEvent(l),Pi=null}else return r=fr(i),r!==null&&J1(r),t.blockedOn=i,!1;r.shift()}return!0}function rS(t,r,i){ff(t)&&i.delete(r)}function zN(){a0=!1,pi!==null&&ff(pi)&&(pi=null),gi!==null&&ff(gi)&&(gi=null),mi!==null&&ff(mi)&&(mi=null),Hu.forEach(rS),Uu.forEach(rS)}function hf(t,r){t.blockedOn===r&&(t.blockedOn=null,a0||(a0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,zN)))}var pf=null;function aS(t){pf!==t&&(pf=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){pf===t&&(pf=null);for(var r=0;r<t.length;r+=3){var i=t[r],l=t[r+1],f=t[r+2];if(typeof l!="function"){if(r0(l||i)===null)continue;break}var m=fr(i);m!==null&&(t.splice(r,3),r-=3,Hg(m,{pending:!0,data:f,method:i.method,action:l},l,f))}}))}function dl(t){function r(Q){return hf(Q,t)}pi!==null&&hf(pi,t),gi!==null&&hf(gi,t),mi!==null&&hf(mi,t),Hu.forEach(r),Uu.forEach(r);for(var i=0;i<yi.length;i++){var l=yi[i];l.blockedOn===t&&(l.blockedOn=null)}for(;0<yi.length&&(i=yi[0],i.blockedOn===null);)nS(i),i.blockedOn===null&&yi.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var f=i[l],m=i[l+1],E=f[Mn]||null;if(typeof m=="function")E||aS(i);else if(E){var P=null;if(m&&m.hasAttribute("formAction")){if(f=m,E=m[Mn]||null)P=E.formAction;else if(r0(f)!==null)continue}else P=E.action;typeof P=="function"?i[l+1]=P:(i.splice(l,3),l-=3),aS(i)}}}function oS(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(E){return f=E})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function o0(t){this._internalRoot=t}gf.prototype.render=o0.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(o(409));var i=r.current,l=ia();Q1(i,l,t,r,null,null)},gf.prototype.unmount=o0.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Q1(t.current,2,null,t,null,null),Jd(),r[In]=null}};function gf(t){this._internalRoot=t}gf.prototype.unstable_scheduleHydration=function(t){if(t){var r=Cn();t={blockedOn:null,target:t,priority:r};for(var i=0;i<yi.length&&r!==0&&r<yi[i].priority;i++);yi.splice(i,0,t),i===0&&nS(t)}};var iS=n.version;if(iS!=="19.3.1")throw Error(o(527,iS,"19.3.1"));ce.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=g(r),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var _N={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ge,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mf.isDisabled&&mf.supportsFiber)try{ke=mf.inject(_N),ze=mf}catch{}}return Vu.createRoot=function(t,r){if(!s(t))throw Error(o(299));var i=!1,l="",f=Xx,m=Qx,E=Zx;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(E=r.onRecoverableError)),r=$1(t,1,!1,null,null,i,l,null,f,m,E,oS),t[In]=r.current,Pm(t),new o0(r)},Vu.hydrateRoot=function(t,r,i){if(!s(t))throw Error(o(299));var l=!1,f="",m=Xx,E=Qx,P=Zx,Q=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(E=i.onCaughtError),i.onRecoverableError!==void 0&&(P=i.onRecoverableError),i.formState!==void 0&&(Q=i.formState)),r=$1(t,1,!0,r,i??null,l,f,Q,m,E,P,oS),r.context=X1(null),i=r.current,l=ia(),l=Ut(l),f=ti(l),f.callback=null,ni(i,f,l),i=l,r.current.lanes=i,ct(r,i),ro(r),t[In]=r.current,Pm(t),new gf(r)},Vu.version="19.3.1",Vu}var mS;function $N(){if(mS)return l0.exports;mS=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(),l0.exports=GN(),l0.exports}var XN=$N();const yS={};function er(e,n){const a=v.useRef(yS);return a.current===yS&&(a.current=e(n)),a}const Y0=[];let K0;function QN(){return K0}function ZN(e){Y0.push(e)}function Cc(e){const n=(a,o)=>{const s=er(JN).current;let u;try{K0=s;for(const c of Y0)c.before(s);u=e(a,o);for(const c of Y0)c.after(s);s.didInitialize=!0}finally{K0=void 0}return u};return n.displayName=e.displayName||e.name,n}function KR(e){return v.forwardRef(Cc(e))}function JN(){return{didInitialize:!1}}function Sn(){}const fo=Object.freeze([]),Gt=Object.freeze({}),WN=()=>{},_e=typeof document<"u"?v.useLayoutEffect:WN;function e4(e,n){return function(o,...s){const u=new URL(e);return u.searchParams.set("code",o.toString()),s.forEach(c=>u.searchParams.append("args[]",c)),`${n} error #${o}; visit ${u} for the full message.`}}const Rn=e4("https://base-ui.com/production-error","Base UI"),GR=v.createContext(void 0);function Tc(e){const n=v.useContext(GR);if(n===void 0&&!e)throw new Error(Rn(72));return n}function ky(e){v.useEffect(e,fo)}const qu=0;class Da{static create(){return new Da}currentId=qu;start(n,a){this.clear(),this.currentId=setTimeout(()=>{this.currentId=qu,a()},n)}isStarted(){return this.currentId!==qu}clear=()=>{this.currentId!==qu&&(clearTimeout(this.currentId),this.currentId=qu)};disposeEffect=()=>this.clear}function Hn(){const e=er(Da.create).current;return ky(e.disposeEffect),e}function t4(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:n4,platform:r4,maxTouchPoints:a4}=t4(),kh=n4.toLowerCase(),hc=r4.toLowerCase(),Ph=/^i(os$|p)/.test(hc)||hc==="macintel"&&a4>1,vS="android",G0=hc===vS||kh.includes(vS),Py=!Ph&&hc.startsWith("mac");hc.startsWith("win");const o4=Py||Ph,ho=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!ho&&kh.includes("firefox");!ho&&kh.includes("chrom");const i4=o4,Ly=/jsdom|happydom/.test(kh);function Fa(e){e.preventDefault(),e.stopPropagation()}function s4(e){return"nativeEvent"in e}function Nl(e){return e.pointerType===""&&e.isTrusted?!0:G0&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function zy(e){return Ly?!1:!G0&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(G0||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ci(e,n){const a=["mouse","pen"];return n||a.push("",void 0),a.includes(e)}function l4(e){const n=e.type;return n==="click"||n==="mousedown"||n==="keydown"||n==="keyup"}function Lh(){return typeof window<"u"}function Sr(e){return _y(e)?(e.nodeName||"").toLowerCase():"#document"}function wn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Fo(e){var n;return(n=(_y(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function _y(e){return Lh()?e instanceof Node||e instanceof wn(e).Node:!1}function on(e){return Lh()?e instanceof Element||e instanceof wn(e).Element:!1}function yn(e){return Lh()?e instanceof HTMLElement||e instanceof wn(e).HTMLElement:!1}function gs(e){return!Lh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wn(e).ShadowRoot}function Oc(e){const{overflow:n,overflowX:a,overflowY:o,display:s}=fa(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+a)&&s!=="inline"&&s!=="contents"}function u4(e){return/^(table|td|th)$/.test(Sr(e))}function zh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const c4=/transform|translate|scale|rotate|perspective|filter/,d4=/paint|layout|strict|content/,os=e=>!!e&&e!=="none";let f0;function Hy(e){const n=on(e)?fa(e):e;return os(n.transform)||os(n.translate)||os(n.scale)||os(n.rotate)||os(n.perspective)||!Uy()&&(os(n.backdropFilter)||os(n.filter))||c4.test(n.willChange||"")||d4.test(n.contain||"")}function f4(e){let n=Uo(e);for(;yn(n)&&!zo(n);){if(Hy(n))return n;if(zh(n))return null;n=Uo(n)}return null}function Uy(){return f0==null&&(f0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),f0}function zo(e){return/^(html|body|#document)$/.test(Sr(e))}function fa(e){return wn(e).getComputedStyle(e)}function _h(e){return on(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Uo(e){if(Sr(e)==="html")return e;const n=e.assignedSlot||e.parentNode||gs(e)&&e.host||Fo(e);return gs(n)?n.host:n}function $R(e){const n=Uo(e);return zo(n)?(e.ownerDocument||e).body:yn(n)&&Oc(n)?n:$R(n)}function pc(e,n,a){var o;n===void 0&&(n=[]),a===void 0&&(a=!0);const s=$R(e),u=s===((o=e.ownerDocument)==null?void 0:o.body),c=wn(s);if(u){const d=$0(c);return n.concat(c,c.visualViewport||[],Oc(s)?s:[],d&&a?pc(d):[])}else return n.concat(s,pc(s,[],a))}function $0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kr(e){let n=e.activeElement;for(;n?.shadowRoot?.activeElement!=null;)n=n.shadowRoot.activeElement;return n}function at(e,n){if(!e||!n)return!1;const a=n.getRootNode?.();if(e.contains(n))return!0;if(a&&gs(a)){let o=n;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function gc(e,n){let a=e;for(;a;){if(on(a)&&a.matches(n))return a;a=a.assignedSlot??a.parentNode??(gs(a)?a.host:null)}return null}function tr(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const X0="data-base-ui-focusable",XR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Hh="ArrowLeft",Uh="ArrowRight",QR="ArrowUp",Fy="ArrowDown",By="data-starting-style",h4="data-ending-style",p4={[By]:""},g4={[h4]:""},po={transitionStatus(e){return e==="starting"?p4:e==="ending"?g4:null}},m4="data-open",y4="data-closed",v4="data-anchor-hidden",ZR="data-popup-open",b4="data-pressed",x4={[ZR]:""},S4={[ZR]:"",[b4]:""},w4={[m4]:""},R4={[y4]:""},E4={[v4]:""},JR={open(e){return e?x4:null}},rh={open(e){return e?S4:null}},Mc={open(e){return e?w4:R4},anchorHidden(e){return e?E4:null}},Fh={...Mc,...po},Q0="data-trigger-disabled";function ah(e,n){if(!on(e))return!1;const a=e;if(n.hasElement(a))return!a.hasAttribute(Q0);for(const[,o]of n.entries())if(at(o,a))return!o.hasAttribute(Q0);return!1}function h0(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const a=e;return a.target!=null&&n.contains(a.target)}function C4(e){return e.matches("html,body")}function Ac(e){return yn(e)&&e.matches(XR)}function T4(e){return gc(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${XR}`)!=null}function Z0(e){return e?e.getAttribute("role")==="combobox"&&Ac(e):!1}function O4(e){if(!e||Ly)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function oh(e){return e?e.hasAttribute(X0)?e:e.querySelector(`[${X0}]`)||e:null}function M4(e,n){return n!=null&&!Ci(n)?0:typeof e=="function"?e():e}function ms(e,n,a){const o=M4(e,a);return typeof o=="number"?o:o?.[n]}function bS(e){return typeof e=="function"?e():e}function WR(e,n){return n||e==="click"||e==="mousedown"}function A4(e){return e?.includes("mouse")&&e!=="mousedown"}function dt(e,n,a,o){let s=!1,u=!1;const c=o??Gt;return{reason:e,event:n??new Event("base-ui"),cancel(){s=!0},allowPropagation(){u=!0},get isCanceled(){return s},get isPropagationAllowed(){return u},trigger:a,...c}}function D4(e,n,a){const o=a??Gt;return{reason:e,event:n??new Event("base-ui"),...o}}const zr="none",Va="trigger-press",qn="trigger-hover",xl="trigger-focus",Bh="outside-press",fs="item-press",eE="close-press",Ti="focus-out",Dc="escape-key",ih="list-navigation",tE="keyboard",N4="pointer",Vy="cancel-open",Zu="sibling-open",I4="disabled",Nc="imperative-action",j4="window-resize",nE=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Da,currentIdRef:{current:null},currentContextRef:{current:null}});function k4(e,n){e.current=n.current}function P4(e){const{children:n,delay:a,timeoutMs:o=0}=e,s=v.useRef(a),u=v.useRef(a),c=v.useRef(null),d=v.useRef(null),p=Hn();return _e(()=>{if(u.current=a,!c.current){s.current=a;return}s.current={open:ms(s.current,"open"),close:ms(a,"close")}},[a,c,s,u]),S.jsx(nE.Provider,{value:v.useMemo(()=>({hasProvider:!0,delayRef:s,initialDelayRef:u,currentIdRef:c,timeoutMs:o,currentContextRef:d,timeout:p}),[o,p]),children:n})}function L4(e,n={open:!1}){const{open:a}=n,o=e.useState("floatingId"),s=v.useContext(nE),{currentIdRef:u,delayRef:c,timeoutMs:d,initialDelayRef:p,currentContextRef:g,hasProvider:y,timeout:h}=s,[b,x]=v.useState(!1),w=v.useRef(a);return _e(()=>{w.current=a},[a]),_e(()=>{function C(){g.current?.setIsInstantPhase(!1),u.current=null,g.current=null,c.current=p.current,h.clear()}if(u.current&&!a&&u.current===o){if(x(!1),d){const R=o;return h.start(d,()=>{e.select("open")||u.current&&u.current!==R||C()}),()=>{(w.current||u.current!==R)&&h.clear()}}C()}},[a,o,u,c,d,p,g,h,e]),_e(()=>{if(!a)return;const C=g.current,R=u.current;h.clear(),g.current={onOpenChange:e.setOpen,setIsInstantPhase:x},u.current=o,c.current={open:0,close:ms(p.current,"close")},R!==null&&R!==o?(x(!0),C?.setIsInstantPhase(!0),C?.onOpenChange(!1,dt(zr))):(x(!1),C?.setIsInstantPhase(!1))},[a,o,e,u,c,p,g,h]),_e(()=>()=>{if(u.current===o){if(g.current=null,!w.current)return;u.current=null,k4(c,p),h.clear()}},[g,u,c,o,p,h]),v.useMemo(()=>({activeIdRef:u,hasProvider:y,delayRef:c,isInstantPhase:b}),[u,y,c,b])}function jt(e,n,a,o){return e.addEventListener(n,a,o),()=>{e.removeEventListener(n,a,o)}}function uo(...e){return()=>{for(let n=0;n<e.length;n+=1){const a=e[n];a&&a()}}}function Gr(e,n,a,o){const s=er(rE).current;return _4(s,e,n,a,o)&&aE(s,[e,n,a,o]),s.callback}function z4(e){const n=er(rE).current;return H4(n,e)&&aE(n,e),n.callback}function rE(){return{callback:null,cleanup:null,refs:[]}}function _4(e,n,a,o,s){return e.refs[0]!==n||e.refs[1]!==a||e.refs[2]!==o||e.refs[3]!==s}function H4(e,n){return e.refs.length!==n.length||e.refs.some((a,o)=>a!==n[o])}function aE(e,n){if(e.refs=n,n.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){const o=Array(n.length).fill(null);for(let s=0;s<n.length;s+=1){const u=n[s];if(u!=null)switch(typeof u){case"function":{const c=u(a);typeof c=="function"&&(o[s]=c);break}case"object":{u.current=a;break}}}e.cleanup=()=>{for(let s=0;s<n.length;s+=1){const u=n[s];if(u!=null)switch(typeof u){case"function":{const c=o[s];typeof c=="function"?c():u(null);break}case"object":{u.current=null;break}}}}}}}function Pn(e){const n=er(U4,e).current;return n.next=e,_e(n.effect),n}function U4(e){const n={current:e,next:e,effect:()=>{n.current=n.next}};return n}const qy={...qR},p0=qy.useInsertionEffect,F4=p0&&p0!==qy.useLayoutEffect?p0:e=>e();function Be(e){const n=er(B4).current;return n.next=e,F4(n.effect),n.trampoline}function B4(){const e={next:void 0,callback:V4,trampoline:(...n)=>e.callback?.(...n),effect:()=>{e.callback=e.next}};return e}function V4(){}const yf=null;class q4{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=n=>{this.isScheduled=!1;const a=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let s=0;s<a.length;s+=1)a[s]?.(n)};request(n){const a=this.nextId;return this.nextId+=1,this.callbacks.push(n),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),a}cancel(n){const a=n-this.startId;a<0||a>=this.callbacks.length||this.callbacks[a]!==null&&(this.callbacks[a]=null,this.callbacksCount-=1)}}let vf=new q4;class Cr{static create(){return new Cr}static request(n){return vf.request(n)}static cancel(n){return vf.cancel(n)}currentId=yf;request(n){this.cancel(),this.currentId=vf.request(()=>{this.currentId=yf,n()})}cancel=()=>{this.currentId!==yf&&(vf.cancel(this.currentId),this.currentId=yf)};disposeEffect=()=>this.cancel}function Il(){const e=er(Cr.create).current;return ky(e.disposeEffect),e}function Kt(e){return e?.ownerDocument||document}const oE={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Ic={...oE,position:"fixed",margin:0,top:0,left:0},Vh={...oE,position:"absolute"},jl=v.forwardRef(function(n,a){const[o,s]=v.useState();_e(()=>{i4&&ho&&s("button")},[]);const u={tabIndex:0,role:o};return S.jsx("span",{...n,ref:a,style:Ic,"aria-hidden":o?void 0:!0,...u,"data-base-ui-focus-guard":""})}),kl=Math.min,_o=Math.max,sh=Math.round,bf=Math.floor,Ho=e=>({x:e,y:e}),Y4={left:"right",right:"left",bottom:"top",top:"bottom"};function iE(e,n,a){return _o(e,kl(n,a))}function Oi(e,n){return typeof e=="function"?e(n):e}function da(e){return e.split("-")[0]}function co(e){return e.split("-")[1]}function Yy(e){return e==="x"?"y":"x"}function Ky(e){return e==="y"?"height":"width"}function Oa(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function Gy(e){return Yy(Oa(e))}function K4(e,n,a){a===void 0&&(a=!1);const o=co(e),s=Gy(e),u=Ky(s);let c=s==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[u]>n.floating[u]&&(c=lh(c)),[c,lh(c)]}function G4(e){const n=lh(e);return[J0(e),n,J0(n)]}function J0(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const xS=["left","right"],SS=["right","left"],$4=["top","bottom"],X4=["bottom","top"];function Q4(e,n,a){switch(e){case"top":case"bottom":return a?n?SS:xS:n?xS:SS;case"left":case"right":return n?$4:X4;default:return[]}}function Z4(e,n,a,o){const s=co(e);let u=Q4(da(e),a==="start",o);return s&&(u=u.map(c=>c+"-"+s),n&&(u=u.concat(u.map(J0)))),u}function lh(e){const n=da(e);return Y4[n]+e.slice(n.length)}function J4(e){var n,a,o,s;return{top:(n=e.top)!=null?n:0,right:(a=e.right)!=null?a:0,bottom:(o=e.bottom)!=null?o:0,left:(s=e.left)!=null?s:0}}function sE(e){return typeof e!="number"?J4(e):{top:e,right:e,bottom:e,left:e}}function mc(e){const{x:n,y:a,width:o,height:s}=e;return{width:o,height:s,top:a,left:n,right:n+o,bottom:a+s,x:n,y:a}}function Sl(e,n){return n<0||n>=e.length}function qf(e,n){return wl(e.current,{disabledIndices:n})}function W0(e,n){return wl(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:n})}function W4(e,n,a){const{decrement:o,loopFocus:s,allowEscape:u,disabledIndices:c,minIndex:d,maxIndex:p}=a,g=()=>wl(e,{startingIndex:n,decrement:o,disabledIndices:c});let y,h=!1;if(!s)y=o?Math.max(d,g()):Math.min(p,g());else if(o?n<=d:n>=p){const b=o?-1:e.length;u&&n!==b?y=-1:(y=o?p:d,h=!0)}else y=g();return{index:Sl(e,y)?-1:y,wrapped:h}}function wl(e,{startingIndex:n=-1,decrement:a=!1,disabledIndices:o,amount:s=1}={}){let u=n;do u+=a?-s:s;while(u>=0&&u<=e.length-1&&Rl(e,u,o));return u}function Rl(e,n,a){if(typeof a=="function"?a(n):a?.includes(n)??!1)return!0;const s=e[n];return s?!qh(s)||s.matches(":disabled")?!0:!a&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!1}function e3(e){return e.visibility==="hidden"||e.visibility==="collapse"}function qh(e,n=e?fa(e):null){return!e||!e.isConnected||!n||e3(n)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():n.display!=="none"&&n.display!=="contents"}const t3='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function n3(e){const n=e.assignedSlot;if(n)return n;if(e.parentElement)return e.parentElement;const a=e.getRootNode();return gs(a)?a.host:null}function ey(e){for(const n of Array.from(e.children))if(Sr(n)==="summary")return n;return null}function r3(e,n){const a=ey(n);return!!a&&(e===a||at(a,e))}function lE(e){const n=e?Sr(e):"";return e!=null&&e.matches(t3)&&(n!=="summary"||e.parentElement!=null&&Sr(e.parentElement)==="details"&&ey(e.parentElement)===e)&&(n!=="details"||ey(e)==null)&&(n!=="input"||e.type!=="hidden")}function $y(e){if(!lE(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let n=e;n;n=n3(n)){const a=n!==e,o=Sr(n)==="slot";if(n.hasAttribute("inert")||a&&Sr(n)==="details"&&!n.open&&!r3(e,n)||n.hasAttribute("hidden")||!o&&!a3(n,a))return!1}return!0}function a3(e,n){const a=fa(e);return n?a.display!=="none":qh(e,a)}function uE(e){const n=e.tabIndex;if(n<0){const a=Sr(e);if(a==="details"||a==="audio"||a==="video"||yn(e)&&e.isContentEditable)return 0}return n}function g0(e){if(Sr(e)!=="input")return null;const n=e;return n.type==="radio"&&n.name!==""?n:null}function cE(e,n){const a=g0(e);if(!a)return!0;const o=n.find(s=>{const u=g0(s);return u?.name===a.name&&u.form===a.form&&u.checked});return o?o===a:n.find(s=>{const u=g0(s);return u?.name===a.name&&u.form===a.form})===a}function dE(e){if(yn(e)&&Sr(e)==="slot"){const n=e.assignedElements({flatten:!0});if(n.length>0)return n}return yn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Xy(e,n){dE(e).forEach(a=>{lE(a)&&n.push(a),Xy(a,n)})}function fE(e,n,a){dE(e).forEach(o=>{yn(o)&&o.matches(n)&&a.push(o),fE(o,n,a)})}function Yh(e){return $y(e)&&uE(e)>=0}function hE(e){const n=[];return Xy(e,n),n.filter($y)}function Kh(e){const n=hE(e);return n.filter(a=>uE(a)>=0&&cE(a,n))}function pE(e,n){const a=Kh(e),o=a.length;if(o===0)return;const s=Kr(Kt(e)),u=a.indexOf(s),c=u===-1?n===1?0:o-1:u+n;return a[c]}function gE(e){return pE(Kt(e).body,1)||e}function mE(e){return pE(Kt(e).body,-1)||e}function o3(e,n,a){if(!e)return null;const o=[];Xy(Kt(e).body,o);const s=o.indexOf(e);if(s===-1)return null;const u=o.filter($y);for(let c=1;c<o.length;c+=1){const d=o[(s+n*c+o.length)%o.length];if(!at(a,d)&&Yh(d)&&cE(d,u))return d}return o[s]}function El(e,n){const a=n||e.currentTarget,o=e.relatedTarget;return!o||!at(a,o)}function i3(e){Kh(e).forEach(a=>{a.dataset.tabindex=a.getAttribute("tabindex")||"",a.setAttribute("tabindex","-1")})}function wS(e){const n=[];fE(e,"[data-tabindex]",n),n.forEach(a=>{const o=a.dataset.tabindex;delete a.dataset.tabindex,o?a.setAttribute("tabindex",o):a.removeAttribute("tabindex")})}function Mi(e,n,a=!0){return e.filter(s=>s.parentId===n).flatMap(s=>[...!a||s.context?.open?[s]:[],...Mi(e,s.id,a)])}function RS(e,n){let a=[],o=e.find(s=>s.id===n)?.parentId;for(;o;){const s=e.find(u=>u.id===o);o=s?.parentId,s&&(a=a.concat(s))}return a}function Cl(e){return`data-base-ui-${e}`}let xf=0;function Yf(e,n={}){const{preventScroll:a=!1,sync:o=!1,shouldFocus:s}=n;cancelAnimationFrame(xf);function u(){s&&!s()||e?.focus({preventScroll:a})}if(o)return u(),Sn;const c=requestAnimationFrame(u);return xf=c,()=>{xf===c&&(cancelAnimationFrame(c),xf=0)}}const ES="data-base-ui-inert";let Yu=new WeakMap,Sf=new WeakSet,Ku=new WeakMap,m0=0;function yE(e){return e?gs(e)?e.host:yE(e.parentNode):null}const CS=(e,n)=>n.map(a=>{if(e.contains(a))return a;const o=yE(a);return e.contains(o)?o:null}).filter(a=>a!=null),TS=e=>{const n=new Set;return e.forEach(a=>{let o=a;for(;o&&!n.has(o);)n.add(o),o=o.parentNode}),n},OS=(e,n,a)=>{const o=[],s=u=>{!u||a.has(u)||Array.from(u.children).forEach(c=>{Sr(c)!=="script"&&(n.has(c)?s(c):o.push(c))})};return s(e),o};function s3(e,n,a,{mark:o=!0}){const s=CS(n,e),u=o?OS(n,TS(s),new Set(s)):[],c=[],d=[];if(a){const p=CS(n,Array.from(n.querySelectorAll("[aria-live]"))),g=s.concat(p);OS(n,TS(g),new Set(g)).forEach(h=>{const b=h.getAttribute("aria-hidden"),x=b!==null&&b!=="false",w=(Yu.get(h)||0)+1;Yu.set(h,w),c.push(h),w===1&&x&&Sf.add(h),x||h.setAttribute("aria-hidden","true")})}return o&&u.forEach(p=>{const g=(Ku.get(p)||0)+1;Ku.set(p,g),d.push(p),g===1&&p.setAttribute(ES,"")}),m0+=1,()=>{c.forEach(p=>{const g=(Yu.get(p)||0)-1;Yu.set(p,g),g||(Sf.has(p)||p.removeAttribute("aria-hidden"),Sf.delete(p))}),o&&d.forEach(p=>{const g=(Ku.get(p)||0)-1;Ku.set(p,g),g||p.removeAttribute(ES)}),m0-=1,m0||(Yu=new WeakMap,Sf=new WeakSet,Ku=new WeakMap)}}function MS(e,n={}){const{ariaHidden:a=!1,mark:o=!0}=n,s=Kt(e[0]).body;return s3(e,s,a,{mark:o})}var cr=YR();const l3=VR(cr);function vE(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}let AS=0;function u3(e,n="mui"){const a=v.useRef(void 0),o=vE(),s=e??a.current;return v.useEffect(()=>{a.current==null&&(AS+=1,a.current=`${n}-${AS}`,e==null&&o())},[e,n,o]),s}const DS=qy.useId;function Hl(e,n){if(DS!==void 0){const a=DS();return e??(n?`${n}-${a}`:a)}return u3(e,n)}const c3=parseInt(v.version,10);function Qy(e){return c3>=e}function NS(e){if(!v.isValidElement(e))return null;const n=e,a=n.props;return(Qy(19)?a?.ref:n.ref)??null}function ty(e,n){if(e&&!n)return e;if(!e&&n)return n;if(e||n)return{...e,...n}}function d3(e,n){const a={};for(const o in e){const s=e[o];if(n?.hasOwnProperty(o)){const u=n[o](s);u!=null&&Object.assign(a,u);continue}s===!0?a[`data-${o.toLowerCase()}`]="":s&&(a[`data-${o.toLowerCase()}`]=s.toString())}return a}function f3(e,n){return typeof e=="function"?e(n):e}function bE(e,n){return typeof e=="function"?e(n):e}const xE={};function Pr(e,n,a,o,s){if(!a&&!o&&!s&&!e)return uh(n);let u=uh(e);return n&&(u=Ju(u,n)),a&&(u=Ju(u,a)),o&&(u=Ju(u,o)),s&&(u=Ju(u,s)),u}function h3(e){if(e.length===0)return xE;if(e.length===1)return uh(e[0]);let n=uh(e[0]);for(let a=1;a<e.length;a+=1)n=Ju(n,e[a]);return n}function uh(e){return wE(e)?{...e(xE)}:p3(e)}function Ju(e,n){return wE(n)?n(e):g3(e,n)}function p3(e){const n={...e};for(const a in n){const o=n[a];SE(a,o)&&(n[a]=RE(o))}return n}function g3(e,n){if(!n)return e;for(const a in n){const o=n[a];switch(a){case"style":{e[a]=ty(e.style,o);break}case"className":{e[a]=EE(e.className,o);break}default:SE(a,o)?e[a]=m3(e[a],o):e[a]=o}}return e}function SE(e,n){const a=e.charCodeAt(0),o=e.charCodeAt(1),s=e.charCodeAt(2);return a===111&&o===110&&s>=65&&s<=90&&(typeof n=="function"||typeof n>"u")}function wE(e){return typeof e=="function"}function m3(e,n){return n?e?(...a)=>{const o=a[0];if(CE(o)){const u=o;ch(u);const c=n(...a);return u.baseUIHandlerPrevented||e?.(...a),c}const s=n(...a);return e?.(...a),s}:RE(n):e}function RE(e){return e&&((...n)=>{const a=n[0];return CE(a)&&ch(a),e(...n)})}function ch(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function EE(e,n){return n?e?n+" "+e:n:e}function CE(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Mt(e,n,a={}){let o=n.render;a.enabled!==!1&&(o=Zy(o));const s=y3(n,a,o);if(a.enabled===!1)return null;const u=a.state??Gt;return x3(e,o,s,u)}function y3(e,n,a){const{className:o,style:s}=e,{state:u=Gt,ref:c,props:d,stateAttributesMapping:p,enabled:g=!0}=n,y=g?f3(o,u):void 0,h=g?bE(s,u):void 0,b=g?d3(u,p):Gt,x=g&&d?v3(d):void 0,w=g?ty(b,x)??{}:Gt;return typeof document<"u"&&(g?Array.isArray(c)?w.ref=z4([w.ref,NS(a),...c]):w.ref=Gr(w.ref,NS(a),c):Gr(null,null)),g?(y!==void 0&&(w.className=EE(w.className,y)),h!==void 0&&(w.style=ty(w.style,h)),w):Gt}function v3(e){return Array.isArray(e)?h3(e):Pr(void 0,e)}const b3=Symbol.for("react.lazy");function Zy(e){if(e?.$$typeof!==b3)return e;const n=v.Children.toArray(e)[0];return v.isValidElement(n)?n:e}function x3(e,n,a,o){if(n){if(typeof n=="function")return n(a,o);const s=Pr(a,n.props);return s.ref=a.ref,v.cloneElement(n,s)}return S3(e,a)}function S3(e,n){return e==="button"?v.createElement("button",{type:"button",...n,key:n.key}):e==="img"?v.createElement("img",{alt:"",...n,key:n.key}):v.createElement(e,n)}const w3=500,TE=500,R3={style:{transition:"none"}},E3="data-base-ui-click-trigger",OE={fallbackAxisSide:"none"},Jy={fallbackAxisSide:"end"},C3={clipPath:"inset(50%)",position:"fixed",top:0,left:0},ME=v.createContext(null),AE=()=>v.useContext(ME),T3=Cl("portal");function DE(e={}){const{ref:n,container:a,componentProps:o=Gt,elementProps:s}=e,u=Hl(),d=AE()?.portalNode,[p,g]=v.useState(null),[y,h]=v.useState(null),b=Be(R=>{R!==null&&h(R)}),x=v.useRef(null);_e(()=>{if(a===null){x.current&&(x.current=null,h(null),g(null));return}const R=(a&&(_y(a)?a:a.current))??d??document.body;if(R==null){x.current&&(x.current=null,h(null),g(null));return}x.current!==R&&(x.current=R,h(null),g(R))},[a,d]);const w=Mt("div",o,{ref:[n,b],props:[{id:u,[T3]:""},s]}),C=p&&w?cr.createPortal(w,p):null;return{node:y,nodeId:v.isValidElement(w)?w.props.id:void 0,subtree:C}}const Gh=v.forwardRef(function(n,a){const{render:o,className:s,style:u,children:c,container:d,portalOwnerRole:p,...g}=n,{node:y,nodeId:h,subtree:b}=DE({container:d,ref:a,componentProps:n,elementProps:g}),x=v.useRef(null),w=v.useRef(null),C=v.useRef(null),R=v.useRef(null),[T,O]=v.useState(null),M=v.useRef(!1),A=T?.modal,I=T?.open,j=!!T&&!T.modal&&T.open&&!!y;v.useEffect(()=>{if(!y||A)return;function D(z){y&&z.relatedTarget&&El(z)&&(z.type==="focusin"?M.current&&(wS(y),M.current=!1):(i3(y),M.current=!0))}return uo(jt(y,"focusin",D,!0),jt(y,"focusout",D,!0))},[y,A]),_e(()=>{!y||I!==!0||!M.current||(wS(y),M.current=!1)},[I,y]);const k=v.useMemo(()=>({beforeOutsideRef:x,afterOutsideRef:w,beforeInsideRef:C,afterInsideRef:R,portalNode:y,setFocusManagerState:O}),[y]);return S.jsxs(v.Fragment,{children:[b,S.jsxs(ME.Provider,{value:k,children:[j&&y&&S.jsx(jl,{"data-type":"outside",ref:x,onFocus:D=>{if(El(D,y))C.current?.focus();else{const z=T?T.domReference:null;mE(z)?.focus()}}}),j&&y&&S.jsx("span",{role:p,"aria-owns":h,style:C3}),y&&cr.createPortal(c,y),j&&y&&S.jsx(jl,{"data-type":"outside",ref:w,onFocus:D=>{if(El(D,y))R.current?.focus();else{const z=T?T.domReference:null;gE(z)?.focus(),T?.closeOnFocusOut&&T?.onOpenChange(!1,dt(Ti,D.nativeEvent))}}})]})]})});function NE(){const e=new Map;return{emit(n,a){e.get(n)?.forEach(o=>o(a))},on(n,a){e.has(n)||e.set(n,new Set),e.get(n).add(a)},off(n,a){e.get(n)?.delete(a)}}}class Wy{nodesRef={current:[]};events=NE();addNode(n){this.nodesRef.current.push(n)}removeNode(n){const a=this.nodesRef.current.findIndex(o=>o===n);a!==-1&&this.nodesRef.current.splice(a,1)}}const IE=v.createContext(null),jE=v.createContext(null),Ni=()=>v.useContext(IE)?.id||null,Ii=e=>{const n=v.useContext(jE);return e??n};function ev(e){const n=Hl(),a=Ii(e),o=Ni();return _e(()=>{if(!n)return;const s={id:n,parentId:o};return a?.addNode(s),()=>{a?.removeNode(s)}},[a,n,o]),n}function kE(e){const{children:n,id:a}=e,o=Ni();return S.jsx(IE.Provider,{value:v.useMemo(()=>({id:a,parentId:o}),[a,o]),children:n})}function PE(e){const{children:n,externalTree:a}=e,o=er(()=>a??new Wy).current;return S.jsx(jE.Provider,{value:o,children:n})}function ko(e){return e==null?e:"current"in e?e.current:e}function O3(e,n){const a=wn(tr(e));return e instanceof a.KeyboardEvent?"keyboard":e instanceof a.FocusEvent?n||"keyboard":"pointerType"in e?e.pointerType||(Nl(e)?"keyboard":n||"mouse"):"touches"in e?"touch":e instanceof a.MouseEvent?n||(e.detail===0?"keyboard":"mouse"):""}const IS=20;let Ri=[];function tv(){Ri=Ri.filter(e=>e.deref()?.isConnected)}function jS(e){tv(),e&&Sr(e)!=="body"&&(Ri.push(new WeakRef(e)),Ri.length>IS&&(Ri=Ri.slice(-IS)))}function kS(){return tv(),Ri[Ri.length-1]?.deref()}function M3(e){return e?Yh(e)?e:Kh(e)[0]||e:null}function PS(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const a=hE(e).filter(s=>{const u=s.getAttribute("data-tabindex")||"";return Yh(s)||s.hasAttribute("data-tabindex")&&!u.startsWith("-")}),o=e.getAttribute("tabindex");a.length===0?o!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function $h(e){const{context:n,children:a,disabled:o=!1,initialFocus:s=!0,returnFocus:u=!0,explicitReturnFocus:c,restoreFocus:d=!1,modal:p=!0,closeOnFocusOut:g=!0,openInteractionType:y="",nextFocusableElement:h,previousFocusableElement:b,beforeContentFocusGuardRef:x,externalTree:w,getInsideElements:C}=e,R=n.useState("open"),T=n.useState("domReferenceElement"),O=n.useState("floatingElement"),{events:M,dataRef:A}=n.context,I=Be(()=>A.current.floatingContext?.nodeId),j=s===!1,k=Z0(T)&&j,D=Pn(s),z=Pn(u),F=Pn(c),G=Pn(y),J=Pn(R),Y=Ii(w),U=AE(),_=v.useRef(!1),L=v.useRef(!1),$=v.useRef(!1),K=v.useRef(null),V=v.useRef(""),X=v.useRef(""),ee=v.useRef(null),q=v.useRef(null),se=Gr(ee,x,U?.beforeInsideRef),N=Gr(q,U?.afterInsideRef),B=Hn(),W=Hn(),re=Il(),Re=U!=null,le=oh(O),me=Be((ve=le)=>ve?Kh(ve):[]),ge=Be(()=>C?.().filter(ve=>ve!=null)??[]);v.useEffect(()=>{if(o||!p)return;function ve(Me){Me.key==="Tab"&&at(le,Kr(Kt(le)))&&me().length===0&&!k&&Fa(Me)}const Pe=Kt(le);return jt(Pe,"keydown",ve)},[o,le,p,k,me]),v.useEffect(()=>{if(o||!R)return;const ve=Kt(le);function Pe(){$.current=!1}function Me(Fe){const Oe=tr(Fe),He=ge(),be=at(O,Oe)||at(T,Oe)||at(U?.portalNode,Oe)||He.some(Ue=>Ue===Oe||at(Ue,Oe));$.current=!be,X.current=Fe.pointerType||"keyboard",gc(Oe,`[${E3}]`)&&(L.current=!0,W.start(0,()=>{L.current=!1}))}function Le(){X.current="keyboard"}return uo(jt(ve,"pointerdown",Me,!0),jt(ve,"pointerup",Pe,!0),jt(ve,"pointercancel",Pe,!0),jt(ve,"keydown",Le,!0),Pe)},[o,O,T,le,R,U,W,ge]),v.useEffect(()=>{if(o||!g)return;const ve=Kt(le);function Pe(){L.current=!0,W.start(0,()=>{L.current=!1})}function Me(He){const be=tr(He);Yh(be)&&(K.current=be)}function Le(He){const be=He.relatedTarget,Ue=He.currentTarget,Ze=tr(He);p&&be==null&&Ze!=null&&at(O,Ze)&&jS(Ze),queueMicrotask(()=>{const it=I(),de=n.context.triggerElements,we=ge(),Ke=be?.hasAttribute(Cl("focus-guard"))&&[ee.current,q.current,U?.beforeInsideRef.current,U?.afterInsideRef.current,U?.beforeOutsideRef.current,U?.afterOutsideRef.current,ko(b),ko(h)].includes(be),De=!(at(T,be)||at(O,be)||at(be,O)||at(U?.portalNode,be)||we.some(Ie=>Ie===be||at(Ie,be))||de.hasMatchingElement(Ie=>at(Ie,be))||Ke||Y&&(Mi(Y.nodesRef.current,it).find(Ie=>at(Ie.context?.elements.floating,be)||at(Ie.context?.elements.domReference,be))||RS(Y.nodesRef.current,it).find(Ie=>[Ie.context?.elements.floating,oh(Ie.context?.elements.floating)].includes(be)||Ie.context?.elements.domReference===be)));if(Ue===T&&le&&PS(le),d&&Ue!==T&&!qh(Ze)&&Kr(ve)===ve.body){if(yn(le)&&(le.focus(),d==="popup")){re.request(()=>{le.focus()});return}const Ie=me(),yt=K.current,ut=(yt&&Ie.includes(yt)?yt:null)||Ie[Ie.length-1]||le;yn(ut)&&ut.focus()}if(A.current.insideReactTree){A.current.insideReactTree=!1;return}(k||!p)&&be&&De&&!L.current&&(k||be!==kS())&&(_.current=!0,n.setOpen(!1,dt(Ti,He)))})}function Fe(){$.current||(A.current.insideReactTree=!0,B.start(0,()=>{A.current.insideReactTree=!1}))}const Oe=yn(T)?T:null;if(!(!O&&!Oe))return uo(Oe&&jt(Oe,"focusout",Le),Oe&&jt(Oe,"pointerdown",Pe),O&&jt(O,"focusin",Me),O&&jt(O,"focusout",Le),O&&U&&jt(O,"focusout",Fe,!0))},[o,T,O,le,p,Y,U,n,g,d,me,k,I,A,B,W,re,h,b,ge]),v.useEffect(()=>{if(o||!O||!R)return;const ve=Array.from(U?.portalNode?.querySelectorAll(`[${Cl("portal")}]`)||[]),Me=(Y?RS(Y.nodesRef.current,I()):[]).find(Ue=>Z0(Ue.context?.elements.domReference||null))?.context?.elements.domReference,Fe=[...[O,...ve,ee.current,q.current,U?.beforeOutsideRef.current,U?.afterOutsideRef.current,...ge()],Me,ko(b),ko(h),k?T:null].filter(Ue=>Ue!=null),Oe=MS(Fe,{ariaHidden:p||k,mark:!1}),He=[O,...ve].filter(Ue=>Ue!=null),be=MS(He);return()=>{be(),Oe()}},[R,o,T,O,p,U,k,Y,I,h,b,ge]),_e(()=>{if(!R||o||!yn(le))return;V.current="",X.current="";const ve=Kt(le),Pe=Kr(ve);queueMicrotask(()=>{const Me=D.current,Le=typeof Me=="function"?Me(G.current||""):Me;if(Le===void 0||Le===!1||at(le,Pe))return;let Oe=null;const He=()=>(Oe==null&&(Oe=me(le)),Oe[0]||le);let be;Le===!0||Le===null?be=He():be=ko(Le),be=be||He();const Ue=at(le,Kr(ve)),Ze=A.current.openEvent,it=Ze?.type==="mousedown"&&Nl(Ze);Yf(be,{sync:it,preventScroll:be===le,shouldFocus(){if(!J.current)return!1;if(Ue)return!0;const de=Kr(ve);return!(de!==be&&at(le,de))}})})},[o,R,le,me,D,G,J,A]);const ce=v.useRef(null);_e(()=>{if(o||!le){ce.current=null;return}ce.current&&(ce.current.cancelled=!0,ce.current=null);const ve=Kt(le),Pe=Kr(ve),Me=G.current==null;jS(Pe);function Le(Oe){if(Oe.open||(V.current=O3(Oe.nativeEvent,X.current)),(Oe.reason===Ti&&Oe.triggerElement?.hasAttribute(Cl("focus-guard"))||Oe.reason===qn&&Oe.nativeEvent.type==="mouseleave")&&(_.current=!0),Oe.reason===Bh)if(Oe.nested)_.current=!1;else if(Nl(Oe.nativeEvent)||zy(Oe.nativeEvent))_.current=!1;else{let He=!1;Kt(le).createElement("div").focus({get preventScroll(){return He=!0,!1}}),He?_.current=!1:_.current=!0}}M.on("openchange",Le);function Fe(Oe){const He=z.current;let be=typeof He=="function"?He(Oe):He;if(be===void 0||be===!1)return null;be===null&&(be=!0);const Ue=T?.isConnected?T:null,Ze=Pe?.isConnected&&Sr(Pe)!=="body"?Pe:null;let it=Me?Ze||Ue:Ue||Ze;return it||(it=kS()||null),typeof be=="boolean"?it:ko(be)||it||null}return()=>{M.off("openchange",Le);const Oe=Kr(ve),He=ge(),be=at(O,Oe)||He.some(we=>we===Oe||at(we,Oe))||Y&&Mi(Y.nodesRef.current,I(),!1).some(we=>at(we.context?.elements.floating,Oe)),Ue=z.current,Ze=V.current,it=Fe(Ze),de={cancelled:!1};ce.current=de,queueMicrotask(()=>{ce.current===de&&(ce.current=null);const we=M3(it),Ke=F.current??typeof Ue!="boolean";if(!de.cancelled&&Ue&&!_.current&&yn(we)&&(!(!Ke&&we!==Oe&&Oe!==ve.body)||be)){const De={preventScroll:!0};Ze==="keyboard"&&(De.focusVisible=!0),we.focus(De)}_.current=!1})}},[o,O,le,z,F,G,M,Y,T,I,ge]),_e(()=>{if(!ho||R||!O)return;const ve=Kr(Kt(O));!yn(ve)||!Ac(ve)||at(O,ve)&&ve.blur()},[R,O]),_e(()=>{if(!(o||!U))return U.setFocusManagerState({modal:p,closeOnFocusOut:g,open:R,onOpenChange:n.setOpen,domReference:T}),()=>{U.setFocusManagerState(null)}},[o,U,p,R,n,g,T]),_e(()=>{if(!(o||!le))return PS(le),()=>{queueMicrotask(tv)}},[o,le]);const Te=!o&&(p?!k:!0)&&(Re||p);return S.jsxs(v.Fragment,{children:[Te&&S.jsx(jl,{"data-type":"inside",ref:se,onFocus:ve=>{if(p){const Pe=me();Yf(Pe[Pe.length-1])}else U?.portalNode&&(_.current=!1,El(ve,U.portalNode)?gE(T)?.focus():ko(b??U.beforeOutsideRef)?.focus())}}),a,Te&&S.jsx(jl,{"data-type":"inside",ref:N,onFocus:ve=>{p?Yf(me()[0]):U?.portalNode&&(g&&(_.current=!0),El(ve,U.portalNode)?mE(T)?.focus():ko(h??U.afterOutsideRef)?.focus())}})]})}function LE(e,n={}){const{enabled:a=!0,event:o="click",toggle:s=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:d=0,reason:p=Va}=n,g=e.context.dataRef,y=v.useRef(void 0),h=Il(),b=Hn(),x=v.useMemo(()=>{function w(R,T,O,M){const A=dt(p,T,O);R&&M==="touch"&&d>0?b.start(d,()=>{e.setOpen(!0,A)}):e.setOpen(R,A)}function C(R,T,O){const M=g.current.openEvent,A=e.select("domReferenceElement")!==T;return R&&A||!R||!s?!0:M&&(typeof c=="function"?c():c)?!O(M.type):!1}return{onPointerDown(R){y.current=Ci(R.pointerType,!0)&&zy(R.nativeEvent)?"virtual":R.pointerType},onMouseDown(R){const T=y.current,O=R.nativeEvent,M=e.select("open");if(R.button!==0||o==="click"||Ci(T,!0)&&u)return;const A=C(M,R.currentTarget,D=>D==="click"||D==="mousedown"),I=tr(O),j=Ac(I);if(j||T==="virtual"){w(A,O,j?I:R.currentTarget,T);return}const k=R.currentTarget;h.request(()=>{w(A,O,k,T)})},onClick(R){if(o==="mousedown-only")return;const T=y.current;if(o==="mousedown"&&T){y.current=void 0;return}if(Ci(T,!0)&&u)return;const O=e.select("open"),M=C(O,R.currentTarget,A=>A==="click"||A==="mousedown"||A==="keydown"||A==="keyup");w(M,R.nativeEvent,R.currentTarget,T)},onKeyDown(){y.current=void 0}}},[g,o,u,p,e,c,s,h,b,d]);return v.useMemo(()=>a?{reference:x}:Gt,[a,x])}function A3(e,n){let a=null,o=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const u=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},c=n.axis==="x"||n.axis==="both",d=n.axis==="y"||n.axis==="both",p=["mouseenter","mousemove"].includes(n.dataRef.current.openEvent?.type||"")&&n.pointerType!=="touch",g=n.axis==="y"?u.width:0,y=n.axis==="x"?u.height:0;let h=u.x,b=u.y;return a==null&&n.x&&c&&(a=u.x-n.x),o==null&&n.y&&d&&(o=u.y-n.y),h-=a||0,b-=o||0,(!s||p)&&(h=c&&n.x!=null?n.x:h,b=d&&n.y!=null?n.y:b),s=!0,{width:g,height:y,x:h,y:b,top:b,right:h+g,bottom:b+y,left:h}}}}function LS(e){return e!=null&&e.clientX!=null}function D3(e,n={}){const{enabled:a=!0,axis:o="both"}=n,s=e.useState("open"),u=e.useState("floatingElement"),c=e.useState("domReferenceElement"),d=e.context.dataRef,p=v.useRef(!1),g=v.useRef(null),[y,h]=v.useState(),[b,x]=v.useState([]),w=Be(M=>{e.set("positionReference",M)}),C=Be((M,A,I)=>{p.current||d.current.openEvent&&!LS(d.current.openEvent)||e.set("positionReference",A3(I??c,{x:M,y:A,axis:o,dataRef:d,pointerType:y}))}),R=Be(M=>{s?g.current||(C(M.clientX,M.clientY,M.currentTarget),x([])):C(M.clientX,M.clientY,M.currentTarget)}),T=Ci(y)?u:s;v.useEffect(()=>{if(!a){w(c);return}if(!T)return;function M(){g.current?.(),g.current=null}const A=wn(u);function I(j){const k=tr(j);at(u,k)?M():C(j.clientX,j.clientY)}return!d.current.openEvent||LS(d.current.openEvent)?g.current=jt(A,"mousemove",I):w(c),M},[T,a,u,d,c,e,C,w,b]),v.useEffect(()=>()=>{e.set("positionReference",null)},[e]),v.useEffect(()=>{a&&!u&&(p.current=!1)},[a,u]),v.useEffect(()=>{!a&&s&&(p.current=!0)},[a,s]);const O=v.useMemo(()=>{function M(A){h(A.pointerType)}return{onPointerDown:M,onPointerEnter:M,onMouseMove:R,onMouseEnter:R}},[R]);return v.useMemo(()=>a?{reference:O,trigger:O}:{},[a,O])}function N3(){return!1}function I3(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function jc(e,n={}){const{enabled:a=!0,escapeKey:o=!0,outsidePress:s=!0,outsidePressEvent:u="sloppy",referencePress:c=N3,bubbles:d,externalTree:p}=n,g=e.useState("open"),y=e.useState("floatingElement"),{dataRef:h,events:b}=e.context,x=Ii(p),w=Be(typeof s=="function"?s:()=>!1),C=typeof s=="function"?w:s,R=C!==!1,T=Be(()=>u),{escapeKey:O,outsidePress:M}=I3(d),A=v.useRef(!1),I=v.useRef(!1),j=v.useRef(!1),k=v.useRef(!1),D=v.useRef(!1),z=v.useRef(""),F=v.useRef(null),G=Hn(),J=Hn(),Y=Hn(),U=Be(()=>{J.clear(),h.current.insideReactTree=!1}),_=Be(N=>{const B=h.current.floatingContext?.nodeId;return(x?Mi(x.nodesRef.current,B):[]).some(re=>re.context?.open&&!re.context.dataRef.current[N])}),L=Be(N=>h0(N,e.select("floatingElement"))||h0(N,e.select("domReferenceElement"))),$=Be(N=>{c()&&e.setOpen(!1,dt(Va,N.nativeEvent))}),K=Be(N=>{if(!g||!a||!o||N.key!=="Escape")return;const B=s4(N)?N.nativeEvent:N;if(D.current||B.isComposing||!O&&_("__escapeKeyBubbles"))return;const W=dt(Dc,B);e.setOpen(!1,W),W.isCanceled||N.preventDefault(),!O&&!W.isPropagationAllowed&&N.stopPropagation()}),V=Be(()=>{h.current.insideReactTree=!0,J.start(0,U)}),X=Be(N=>{if(!g||!a||N.button!==0)return;const B=tr(N.nativeEvent);at(e.select("floatingElement"),B)&&(A.current||(A.current=!0,I.current=!1))}),ee=Be(N=>{!g||!a||(N.defaultPrevented||N.nativeEvent.defaultPrevented)&&A.current&&(I.current=!0)});v.useEffect(()=>{function N(B){B.open||(k.current=!1)}return b.on("openchange",N),()=>{b.off("openchange",N)}},[b]),v.useEffect(()=>U,[U]),v.useEffect(()=>{if(!g||!a)return g||(k.current=!1,D.current=!1,z.current="",F.current=null),U;h.current.__escapeKeyBubbles=O,h.current.__outsidePressBubbles=M;const N=new Da,B=Kt(y);function W(){Y.clear(),D.current=!0}function re(){D.current=!0,Y.start(ho?5:0,()=>{D.current=!1})}function Re(){j.current=!0,N.start(0,()=>{j.current=!1})}function le(){A.current=!1,I.current=!1}function me(){const de=z.current,we=de==="pen"||!de?"mouse":de,Ke=T(),De=typeof Ke=="function"?Ke():Ke;return typeof De=="string"?De:De[we]}function ge(de){const we=me();return we==="intentional"&&de.type!=="click"||we==="sloppy"&&de.type==="click"}function ce(de){const we=h.current.floatingContext?.nodeId,Ke=x&&Mi(x.nodesRef.current,we).some(De=>h0(de,De.context?.elements.floating));return L(de)||Ke}function Te(de){if(ge(de)){de.type!=="click"&&!L(de)&&(N.clear(),j.current=!1),U();return}if(h.current.insideReactTree){U();return}const we=tr(de),Ke=`[${Cl("inert")}]`,De=on(we)?we.getRootNode():null,Ie=Array.from((gs(De)?De:Kt(e.select("floatingElement"))).querySelectorAll(Ke)),yt=e.context.triggerElements;if(we&&(yt.hasElement(we)||yt.hasMatchingElement(ht=>at(ht,we))))return;let ut=on(we)?we:null;for(;ut&&!zo(ut);){const ht=Uo(ut);if(zo(ht)||!on(ht))break;ut=ht}if(!(Ie.length&&on(we)&&!C4(we)&&!at(we,e.select("floatingElement"))&&Ie.every(ht=>!at(ut,ht)))){if(yn(we)&&!("touches"in de)){const ht=zo(we),Ot=fa(we),Dt=/auto|scroll/,Jt=ht||Dt.test(Ot.overflowX),rn=ht||Dt.test(Ot.overflowY),Wt=Jt&&we.clientWidth>0&&we.scrollWidth>we.clientWidth,We=rn&&we.clientHeight>0&&we.scrollHeight>we.clientHeight,xt=Ot.direction==="rtl",$t=We&&(xt?de.offsetX<=we.offsetWidth-we.clientWidth:de.offsetX>we.clientWidth),ft=Wt&&de.offsetY>we.clientHeight;if($t||ft)return}if(!ce(de)){if(me()==="intentional"){if(de.detail!==0&&!Nl(de)&&!k.current)return;if(j.current){N.clear(),j.current=!1;return}}typeof C=="function"&&!C(de)||_("__outsidePressBubbles")||(e.setOpen(!1,dt(Bh,de)),U())}}}function ve(de){me()!=="sloppy"||de.pointerType==="touch"||!e.select("open")||!a||L(de)||Te(de)}function Pe(de){if(me()!=="sloppy"||!e.select("open")||!a||L(de))return;const we=de.touches[0];we&&(F.current={startTime:Date.now(),startX:we.clientX,startY:we.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},G.start(1e3,()=>{F.current&&(F.current.dismissOnTouchEnd=!1,F.current.dismissOnMouseDown=!1)}))}function Me(de,we){const Ke=tr(de);if(!Ke)return;const De=jt(Ke,de.type,()=>{we(de),De()})}function Le(de){z.current="touch",Me(de,Pe)}function Fe(de){G.clear(),de.type==="pointerdown"&&(de.button===0&&(k.current=!0),z.current=de.pointerType),!(de.type==="mousedown"&&F.current&&!F.current.dismissOnMouseDown)&&Me(de,we=>{we.type==="pointerdown"?ve(we):Te(we)})}function Oe(de){if(de.type==="pointercancel"&&(k.current=!1),!A.current)return;const we=I.current;if(le(),me()==="intentional"){if(de.type==="pointercancel"){we&&Re();return}if(!ce(de)){if(we){Re();return}typeof C=="function"&&!C(de)||(N.clear(),j.current=!0,U())}}}function He(de){if(me()!=="sloppy"||!F.current||L(de))return;const we=de.touches[0];if(!we)return;const Ke=Math.abs(we.clientX-F.current.startX),De=Math.abs(we.clientY-F.current.startY),Ie=Math.sqrt(Ke*Ke+De*De);Ie>5&&(F.current.dismissOnTouchEnd=!0),Ie>10&&(Te(de),G.clear(),F.current=null)}function be(de){Me(de,He)}function Ue(de){me()!=="sloppy"||!F.current||L(de)||(F.current.dismissOnTouchEnd&&Te(de),G.clear(),F.current=null)}function Ze(de){Me(de,Ue)}const it=uo(o&&uo(jt(B,"keydown",K),jt(B,"compositionstart",W),jt(B,"compositionend",re)),R&&uo(jt(B,"click",Fe,!0),jt(B,"pointerdown",Fe,!0),jt(B,"pointerup",Oe,!0),jt(B,"pointercancel",Oe,!0),jt(B,"mousedown",Fe,!0),jt(B,"mouseup",Oe,!0),jt(B,"touchstart",Le,{capture:!0,passive:!0}),jt(B,"touchmove",be,{capture:!0,passive:!0}),jt(B,"touchend",Ze,{capture:!0,passive:!0})));return()=>{it(),N.clear(),le(),j.current=!1}},[h,y,o,R,C,g,a,O,M,K,U,T,_,L,x,e,G,Y]);const q=v.useMemo(()=>({onKeyDown:K,onPointerDown:$,onClick:$}),[K,$]),se=v.useMemo(()=>({onKeyDown:K,onPointerDown:ee,onMouseDown:ee,onClickCapture:V,onMouseDownCapture(N){V(),X(N)},onPointerDownCapture(N){V(),X(N)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[K,V,X,ee]);return v.useMemo(()=>a?{reference:q,floating:se,trigger:q}:{},[a,q,se])}function zE(e){const{popupStore:n,treatPopupAsFloatingElement:a=!1,floatingRootContext:o,floatingId:s,nested:u,onOpenChange:c}=e,d=n.useState("open"),p=n.useState("activeTriggerElement"),g=n.useState(a?"popupElement":"positionerElement"),y=c;return n.useSyncedValue("floatingId",s),_e(()=>{const h={open:d,floatingId:s,referenceElement:p,floatingElement:g};on(p)&&(h.domReferenceElement=p),o.state.positionReference===o.state.referenceElement&&(h.positionReference=p),o.update(h)},[d,s,p,g,o]),o.context.onOpenChange=y,o.context.nested=u,o}function ws(e,n=!1,a=!1,o=!1){const[s,u]=v.useState(e&&n?"idle":void 0),[c,d]=v.useState(e&&!o);return e&&!c&&(d(!0),u("starting")),!e&&c&&s!=="ending"&&!a&&u("ending"),!e&&!c&&s==="ending"&&u(void 0),_e(()=>{if(!e&&c&&s!=="ending"&&a){const p=Cr.request(()=>{u("ending")});return()=>{Cr.cancel(p)}}},[e,c,s,a]),_e(()=>{if(!e||n||s===void 0)return;const p=Cr.request(()=>{u(void 0)});return()=>{Cr.cancel(p)}},[n,e,s]),_e(()=>{if(!e||!n)return;e&&c&&s!=="idle"&&u("starting");const p=Cr.request(()=>{u("idle")});return()=>{Cr.cancel(p)}},[n,e,c,s]),{mounted:c,setMounted:d,transitionStatus:s}}function zS(e,n){return e.getAnimations(n).filter(a=>{const o=a.effect?.getTiming();return o?.duration!==1/0&&o?.iterations!==1/0})}let wf=null;function j3(e){if(!wf){const n=[];wf=n,queueMicrotask(()=>{wf=null,cr.flushSync(()=>{for(const a of n)a()})})}wf.push(e)}function Xh(e,n=!1,a=!1){const o=Il();return Be((s,u=null)=>{o.cancel();const c=ko(e);if(c==null)return;const d=c,p=()=>{if(!a){cr.flushSync(s);return}j3(()=>{u?.aborted||s()})};if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function g(){Promise.all(zS(d).map(y=>y.finished.then(Sn))).then(()=>{u?.aborted||p()},()=>{if(u?.aborted)return;if(zS(d).some(h=>h.pending||h.playState!=="finished")){g();return}p()})}if(n){const y=By;if(!d.hasAttribute(y)){o.request(g);return}const h=new MutationObserver(()=>{d.hasAttribute(y)||(h.disconnect(),g())});h.observe(d,{attributes:!0,attributeFilter:[y]}),u?.addEventListener("abort",()=>h.disconnect(),{once:!0});return}o.request(g)})}function Ia(e){const{enabled:n=!0,open:a,ref:o,batch:s=!1,onComplete:u}=e,c=Be(u),d=Xh(o,a,s);v.useEffect(()=>{if(!n)return;const p=new AbortController;return d(c,p.signal),()=>{p.abort()}},[n,a,c,d])}function _E(e){const{open:n,ref:a,preventUnmountOnClose:o,setPreventUnmountOnClose:s,onUnmount:u,animateInitialOpen:c}=e,d=Be(s),{mounted:p,setMounted:g,transitionStatus:y}=ws(n,!1,!1,c),h=n?!1:o;_e(()=>{n&&d(!1)},[n,d]);const b=v.useRef(p),x=v.useRef(!1),w=vE(),C=()=>{b.current=!1,g(!1),u()};_e(()=>{b.current=p,x.current&&(x.current=!1,!n&&p&&C())});const R=Be(()=>{if(b.current){if(n){x.current=!0,w();return}C()}});return Ia({enabled:p&&!n&&!h,open:n,ref:a,onComplete(){n||R()}}),{mounted:p,transitionStatus:y,preventUnmountingOnClose:h,forceUnmount:R}}const kc={tabIndex:-1,[X0]:""};function HE(e){return n=>n==="touch"?e.current:!0}function nv(e,n=!1){const a=Hl(),o=Ni()!=null,s=er(()=>e(a,o)).current;return zE({popupStore:s,treatPopupAsFloatingElement:n,floatingRootContext:s.state.floatingRootContext,floatingId:a,nested:o,onOpenChange:s.setOpen}),s}function Qh({handle:e,store:n}){return _e(()=>e.attachStore(n),[e,n]),null}function _S(e){const n=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==n&&e.set("triggerCount",n)}function k3(e,n){const a=v.useRef(null);return Be(o=>{const s=a.current;if(s!==null){if(s.element===o&&s.store===n&&s.id===e)return;a.current=null;const u=s.store;u.context.triggerElements.getById(s.id)===s.element&&(u.context.triggerElements.delete(s.id),_S(u))}o!==null&&e!==void 0&&(a.current={store:n,id:e,element:o},n.context.triggerElements.add(e,o),_S(n))})}function Zh(e,n,a,o=!1){let s=e.preventUnmountingOnClose;n?s=!1:o&&(s=!0);const u=a?.id??null;let c=e.activeTriggerId,d=e.activeTriggerElement;return(u||n)&&(c=u,d=a??null),{open:n,preventUnmountingOnClose:s,activeTriggerId:c,activeTriggerElement:d,openedWithoutTrigger:n?a==null:e.openedWithoutTrigger}}function Jh(e){let n=!1;return e.preventUnmountOnClose=()=>{n=!0},()=>n}function P3(e,n,a,o={}){const s=a.reason,u=s===qn,c=n&&s===xl,d=!n&&(s===Va||s===Dc),p=Jh(a);if(e.context.onOpenChange?.(n,a),a.isCanceled)return;o.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(n,a);const g=()=>{const y=Zh(e.state,n,a.trigger,p()),h={...o.extraState,...y};c?h.instantType="focus":d?h.instantType="dismiss":u&&(h.instantType=void 0),e.update(h)};u?cr.flushSync(g):g()}function UE(e,n,a,o){const s=a.useState("isMountedByTrigger",e),u=k3(e,a),c=Be(p=>{const g=a.select("open"),y=a.select("activeTriggerId");if(y===e){const h={activeTriggerElement:p,...g?o:null};a.update(h);return}if(y==null&&g&&!a.state.openedWithoutTrigger){const h={activeTriggerId:e??null,activeTriggerElement:p,...o};a.update(h)}}),d=Be(p=>{u(p),p&&c(p)});return _e(()=>(d(n.current),()=>d(null)),[d,n,a,e]),_e(()=>{if(s){const p={activeTriggerElement:n.current,...o};a.update(p)}},[s,a,n,...Object.values(o)]),{registerTrigger:d,isMountedByThisTrigger:s}}function Wh(e,n={}){const{closeOnActiveTriggerUnmount:a=!1}=n,o=v.useRef(null),s=e.useState("open"),u=e.useState("triggerCount"),c=e.useState("activeTriggerId"),d=e.useState("activeTriggerElement");_e(()=>{if(!s){o.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}const p=e.context.triggerElements.size,g={};e.state.triggerCount!==p&&(g.triggerCount=p);const y=e.select("activeTriggerId");let h=null;if(y){const b=e.context.triggerElements.getById(y);if(b)o.current=y,b!==e.state.activeTriggerElement&&(g.activeTriggerElement=b);else{for(const[x,w]of e.context.triggerElements.entries())if(w===e.state.activeTriggerElement){g.activeTriggerId=x,g.activeTriggerElement=w,o.current=x;break}g.activeTriggerId===void 0&&(o.current===y?h=y:o.current=null)}}else o.current=null;if(!h&&!y&&!e.state.openedWithoutTrigger&&p===1){const b=e.context.triggerElements.entries().next();if(!b.done){const[x,w]=b.value;g.activeTriggerId=x,g.activeTriggerElement=w,o.current=x}}(g.triggerCount!==void 0||g.activeTriggerId!==void 0||g.activeTriggerElement!==void 0)&&e.update(g),h&&a&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===h&&!e.context.triggerElements.getById(h)){const b=dt(zr);e.setOpen(!1,b),b.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[s,e,u,c,d,a])}function ep(e,n,a,o){const{mounted:s,transitionStatus:u,forceUnmount:c}=_E({open:e,ref:n.context.popupRef,preventUnmountOnClose:n.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:d=>n.set("preventUnmountingOnClose",d),animateInitialOpen:o,onUnmount(){n.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),a?.(),n.context.onOpenChangeComplete?.(!1)}});return er(()=>(n.set("mounted",s),null)),n.useSyncedValues({mounted:s,transitionStatus:u}),{forceUnmount:c,transitionStatus:u}}function tp(e,n){e.useSyncedValues(n),_e(()=>()=>{e.update({activeTriggerProps:Gt,inactiveTriggerProps:Gt,popupProps:Gt})},[e])}function FE(e,n){_e(()=>{!n&&e.state.openMethod!==null&&e.set("openMethod",null)},[n,e]),_e(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class Pc{idMap=new Map;add(n,a){this.idMap.set(n,a)}delete(n){this.idMap.delete(n)}hasElement(n){for(const a of this.idMap.values())if(a===n)return!0;return!1}hasMatchingElement(n){for(const a of this.idMap.values())if(n(a))return!0;return!1}getById(n){return this.idMap.get(n)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}var y0={exports:{}},v0={};var HS;function L3(){if(HS)return v0;HS=1;var e=Ec();function n(h,b){return h===b&&(h!==0||1/h===1/b)||h!==h&&b!==b}var a=typeof Object.is=="function"?Object.is:n,o=e.useState,s=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function d(h,b){var x=b(),w=o({inst:{value:x,getSnapshot:b}}),C=w[0].inst,R=w[1];return u(function(){C.value=x,C.getSnapshot=b,p(C)&&R({inst:C})},[h,x,b]),s(function(){return p(C)&&R({inst:C}),h(function(){p(C)&&R({inst:C})})},[h]),c(x),x}function p(h){var b=h.getSnapshot;h=h.value;try{var x=b();return!a(h,x)}catch{return!0}}function g(h,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return v0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,v0}var US;function BE(){return US||(US=1,y0.exports=L3()),y0.exports}var np=BE(),b0={exports:{}},x0={};var FS;function z3(){if(FS)return x0;FS=1;var e=Ec(),n=BE();function a(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var o=typeof Object.is=="function"?Object.is:a,s=n.useSyncExternalStore,u=e.useRef,c=e.useEffect,d=e.useMemo,p=e.useDebugValue;return x0.useSyncExternalStoreWithSelector=function(g,y,h,b,x){var w=u(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=d(function(){function T(j){if(!O){if(O=!0,M=j,j=b(j),x!==void 0&&C.hasValue){var k=C.value;if(x(k,j))return A=k}return A=j}if(k=A,o(M,j))return k;var D=b(j);return x!==void 0&&x(k,D)?(M=j,k):(M=j,A=D)}var O=!1,M,A,I=h===void 0?null:h;return[function(){return T(y())},I===null?void 0:function(){return T(I())}]},[y,h,b,x]);var R=s(g,w[0],w[1]);return c(function(){C.hasValue=!0,C.value=R},[R]),p(R),R},x0}var BS;function _3(){return BS||(BS=1,b0.exports=z3()),b0.exports}var H3=_3();const U3=Qy(19),F3=U3?V3:q3;function VE(e,n,a,o,s){return F3(e,n,a,o,s)}function B3(e,n,a,o,s){const u=v.useCallback(()=>n(e.getSnapshot(),a,o,s),[e,n,a,o,s]);return np.useSyncExternalStore(e.subscribe,u,u)}ZN({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let n=!1;for(let a=0;a<e.syncHooks.length;a+=1){const o=e.syncHooks[a],s=o.selector(o.store.state,o.a1,o.a2,o.a3);Object.is(o.value,s)||(n=!0,o.value=s)}return n&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=n=>{const a=new Set;for(const s of e.syncHooks)a.add(s.store);const o=[];for(const s of a)o.push(s.subscribe(n));return()=>{for(const s of o)s()}}),np.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function V3(e,n,a,o,s){const u=QN();if(!u)return B3(e,n,a,o,s);const c=u.syncIndex;u.syncIndex+=1;let d;return u.didInitialize?(d=u.syncHooks[c],(d.store!==e||d.selector!==n||!Object.is(d.a1,a)||!Object.is(d.a2,o)||!Object.is(d.a3,s))&&(d.store!==e&&(u.didChangeStore=!0),d.store=e,d.selector=n,d.a1=a,d.a2=o,d.a3=s,d.value=n(e.getSnapshot(),a,o,s))):(d={store:e,selector:n,a1:a,a2:o,a3:s,value:n(e.getSnapshot(),a,o,s)},u.syncHooks.push(d)),d.value}function q3(e,n,a,o,s){return H3.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,u=>n(u,a,o,s))}class Y3{static create(n){return new this(n)}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 a=this.updateTick;for(const o of this.listeners){if(a!==this.updateTick)return;o(n)}}update(n){for(const a in n)if(!Object.is(this.state[a],n[a])){this.setState({...this.state,...n});return}}set(n,a){Object.is(this.state[n],a)||this.setState({...this.state,[n]:a})}notifyAll(){const n={...this.state};this.setState(n)}use(n,a,o,s){return VE(this,n,a,o,s)}}class Ul extends Y3{constructor(n,a={},o){super(n),this.context=a,this.selectors=o}useSyncedValue(n,a){v.useDebugValue(n);const o=this;_e(()=>{o.state[n]!==a&&o.set(n,a)},[o,n,a])}useSyncedValueWithCleanup(n,a){const o=this;_e(()=>(o.state[n]!==a&&o.set(n,a),()=>{o.set(n,void 0)}),[o,n,a])}useSyncedValues(n){const a=this,o=Object.values(n);_e(()=>{a.update(n)},[a,...o])}useControlledProp(n,a){v.useDebugValue(n);const o=this,s=a!==void 0;_e(()=>{s&&!Object.is(o.state[n],a)&&o.setState({...o.state,[n]:a})},[o,n,a,s])}select(n,a,o,s){const u=this.selectors[n];return u(this.state,a,o,s)}useState(n,a,o,s){return v.useDebugValue(n),VE(this,this.selectors[n],a,o,s)}useContextCallback(n,a){v.useDebugValue(n);const o=Be(a??Sn);this.context[n]=o}useStateSetter(n){const a=v.useRef(void 0);return a.current===void 0&&(a.current=o=>{this.set(n,o)}),a.current}observe(n,a){let o;typeof n=="function"?o=n:o=this.selectors[n];let s=o(this.state);return a(s,s,this),this.subscribe(u=>{const c=o(u);if(!Object.is(s,c)){const d=s;s=c,a(c,d,this)}})}}const K3={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class qE extends Ul{constructor(n){const{syncOnly:a,nested:o,onOpenChange:s,triggerElements:u,...c}=n;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:NE(),nested:o,triggerElements:u},K3),this.syncOnly=a}syncOpenEvent=(n,a)=>{(!n||!this.state.open||a!=null&&l4(a))&&(this.context.dataRef.current.openEvent=n?a:void 0)};dispatchOpenChange=(n,a)=>{this.syncOpenEvent(n,a.event);const o={open:n,reason:a.reason,nativeEvent:a.event,nested:this.context.nested,triggerElement:a.trigger};this.context.events.emit("openchange",o)};setOpen=(n,a)=>{if(this.syncOnly){this.context.onOpenChange?.(n,a);return}this.dispatchOpenChange(n,a),this.context.onOpenChange?.(n,a)}}function rp(e,n,a=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new qE({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:n,syncOnly:!0,nested:a,onOpenChange:void 0}),floatingId:n,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Gt,inactiveTriggerProps:Gt,popupProps:Gt}}const rc=e=>e.triggerIdProp??e.activeTriggerId,dh=e=>e.openProp??e.open,VS=e=>(e.popupElement?.id??e.floatingId)||void 0;function YE(e,n){return n!==void 0&&dh(e)&&rc(e)===n}function G3(e,n){return YE(e,n)?!0:n!==void 0&&dh(e)&&rc(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const Po={open:dh,mounted:e=>e.mounted,transitionStatus:e=>dh(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:rc,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:VS,isTriggerActive:(e,n)=>n!==void 0&&rc(e)===n,isOpenedByTrigger:(e,n)=>YE(e,n),isMountedByTrigger:(e,n)=>n!==void 0&&rc(e)===n&&e.mounted,triggerProps:(e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,n)=>G3(e,n)?VS(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function KE(e){const n=v.useCallback(o=>e===void 0?Sn:e.subscribeStore(o),[e]),a=v.useCallback(()=>e===void 0?void 0:e.store,[e]);return np.useSyncExternalStore(n,a,()=>e?.serverStore)}function $3(e){const{open:n=!1,onOpenChange:a,elements:o={}}=e,s=Hl(),u=Ni()!=null,c=er(()=>new qE({open:n,transitionStatus:void 0,onOpenChange:a,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new Pc,floatingId:s,syncOnly:!1,nested:u})).current;return _e(()=>{const d={open:n,floatingId:s};o.reference!==void 0&&(d.referenceElement=o.reference,d.domReferenceElement=on(o.reference)?o.reference:null),o.floating!==void 0&&(d.floatingElement=o.floating),c.update(d)},[n,s,o.reference,o.floating,c]),c.context.onOpenChange=a,c.context.nested=u,c}const S0=Py&&ho;function GE(e,n={}){const{enabled:a=!0,delay:o}=n,{events:s,dataRef:u}=e.context,c=v.useRef(!1),d=v.useRef(null),p=v.useRef(!0),g=Hn();v.useEffect(()=>{const h=e.select("domReferenceElement");if(!a)return;const b=wn(h);function x(){const R=e.select("domReferenceElement");!e.select("open")&&yn(R)&&R===Kr(Kt(R))&&(c.current=!0,d.current=R)}function w(){p.current=!0}function C(){p.current=!1}return uo(jt(b,"blur",x),S0&&jt(b,"keydown",w,!0),S0&&jt(b,"pointerdown",C,!0))},[e,a]),v.useEffect(()=>{if(!a)return;function h(b){if(b.reason===Va||b.reason===Dc){const x=e.select("domReferenceElement");on(x)&&(d.current=x,c.current=!0)}}return s.on("openchange",h),()=>{s.off("openchange",h)}},[s,a,e]);const y=v.useMemo(()=>{function h(){c.current=!1,d.current=null}return{onMouseLeave(){h()},onFocus(b){const x=b.currentTarget;if(c.current){if(d.current===x)return;h()}const w=tr(b.nativeEvent);if(on(w)){if(S0&&!b.relatedTarget){if(!p.current&&!Ac(w))return}else if(!O4(w))return}const C=ah(b.relatedTarget,e.context.triggerElements),{nativeEvent:R,currentTarget:T}=b;if(e.select("open")&&C||!o){e.setOpen(!0,dt(xl,R,T));return}g.start(o,()=>{c.current||e.setOpen(!0,dt(xl,R,T))})},onBlur(b){h();const x=b.relatedTarget,w=b.nativeEvent,C=on(x)&&x.hasAttribute(Cl("focus-guard"))&&x.getAttribute("data-type")==="outside";g.start(0,()=>{const R=e.select("domReferenceElement"),T=Kr(Kt(R));!x&&T===R||at(u.current.floatingContext?.refs.floating.current,T)||at(R,T)||C||ah(x??T,e.context.triggerElements)||e.setOpen(!1,dt(xl,w))})}}},[u,o,e,g]);return v.useMemo(()=>a?{reference:y,trigger:y}:{},[a,y])}class rv{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Da;restTimeout=new Da;handleCloseOptions=void 0;static create(){return new rv}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const fh=new WeakMap;function hh(e){if(!e.performedPointerEventsMutation)return;const n=e.pointerEventsScopeElement;n&&fh.get(n)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),fh.delete(n)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function $E(e,n){const{scopeElement:a,referenceElement:o,floatingElement:s}=n,u=fh.get(a);u&&u!==e&&hh(u),hh(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=a,e.pointerEventsReferenceElement=o,e.pointerEventsFloatingElement=s,fh.set(a,e),a.style.pointerEvents="none",o.style.pointerEvents="auto",s.style.pointerEvents="auto"}function av(e){const n=e.context.dataRef.current,a=er(()=>n.hoverInteractionState??rv.create()).current;return n.hoverInteractionState||(n.hoverInteractionState=a),ky(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function ov(e,n={}){const{enabled:a=!0,closeDelay:o=0,nodeId:s}=n,u=e.useState("open"),c=e.useState("floatingElement"),d=e.useState("domReferenceElement"),{dataRef:p}=e.context,g=Ii(),y=Ni(),h=av(e),b=Hn(),x=Be(()=>WR(p.current.openEvent?.type,h.interactedInside)),w=Be(()=>A4(p.current.openEvent?.type)),C=Be(()=>{hh(h)});_e(()=>{u||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,C())},[u,h,C]),v.useEffect(()=>C,[C]),_e(()=>{if(a&&u&&h.handleCloseOptions?.blockPointerEvents&&w()&&on(d)&&c){const R=d,T=c,O=Kt(c),M=g?.nodesRef.current.find(k=>k.id===y)?.context?.elements.floating;M&&(M.style.pointerEvents="");const A=h.pointerEventsScopeElement!==T?h.pointerEventsScopeElement:null,I=M!==T?M:null,j=h.handleCloseOptions?.getScope?.()??A??I??gc(R,"[data-rootownerid]")??O.body;return $E(h,{scopeElement:j,referenceElement:R,floatingElement:T}),()=>{C()}}},[a,u,d,c,h,w,g,y,C]),v.useEffect(()=>{if(!a)return;function R(){return!!(g&&y&&Mi(g.nodesRef.current,y).length>0)}function T(k){const D=ms(o,"close",h.pointerType),z=()=>{e.setOpen(!1,dt(qn,k)),g?.events.emit("floating.closed",k)};D?h.openChangeTimeout.start(D,z):(h.openChangeTimeout.clear(),z())}function O(k){const D=tr(k);if(!T4(D)){h.interactedInside=!1;return}h.interactedInside=gc(D,"[aria-haspopup]")!=null}function M(){h.openChangeTimeout.clear(),b.clear(),g?.events.off("floating.closed",I),C()}function A(k){if(R()&&g){g.events.on("floating.closed",I);return}if(ah(k.relatedTarget,e.context.triggerElements))return;const D=p.current.floatingContext?.nodeId??s,z=k.relatedTarget;if(!(g&&D&&on(z)&&Mi(g.nodesRef.current,D,!1).some(G=>at(G.context?.elements.floating,z)))){if(h.handler){h.handler(k);return}C(),w()&&!x()&&T(k)}}function I(k){!g||!y||R()||b.start(0,()=>{g.events.off("floating.closed",I),e.setOpen(!1,dt(qn,k)),g.events.emit("floating.closed",k)})}const j=c;return uo(j&&jt(j,"mouseenter",M),j&&jt(j,"mouseleave",A),j&&jt(j,"pointerdown",O,!0),()=>{g?.events.off("floating.closed",I)})},[a,c,e,p,o,s,w,x,C,h,g,y,b])}const X3={current:null};function XE(e,n={}){const{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:u=!1,restMs:c=0,move:d=!0,triggerElementRef:p=X3,externalTree:g,isActiveTrigger:y=!0,getHandleCloseContext:h,isClosing:b,shouldOpen:x,guardStaleOpen:w=!1}=n,{dataRef:C,events:R}=e.context,T=Ii(g),O=av(e),M=v.useRef(!1),A=Pn(s),I=Pn(o),j=Pn(c),k=Pn(a),D=Pn(x),z=Pn(b),F=Be(()=>WR(C.current.openEvent?.type,O.interactedInside)),G=Be(()=>D.current?.()!==!1),J=Be((_,L,$)=>{const K=e.context.triggerElements;if(K.hasElement(L))return!_||!at(_,L);if(!on($))return!1;const V=$;return K.hasMatchingElement(X=>at(X,V))&&(!_||!at(_,V))}),Y=Be(()=>{if(!O.handler)return;Kt(e.select("domReferenceElement")).removeEventListener("mousemove",O.handler),O.handler=void 0}),U=Be(()=>{hh(O)});return y&&(O.handleCloseOptions=s?.__options),v.useEffect(()=>Y,[Y]),v.useEffect(()=>{if(!a)return;function _(L){L.open?M.current=!1:(M.current=L.reason===qn,Y(),O.openChangeTimeout.clear(),O.restTimeout.clear(),O.blockMouseMove=!0,O.restTimeoutPending=!1)}return R.on("openchange",_),()=>{R.off("openchange",_)}},[a,R,O,Y]),v.useEffect(()=>{if(!a)return;function _(ee,q=!0){const se=ms(I.current,"close",O.pointerType);se?O.openChangeTimeout.start(se,()=>{e.setOpen(!1,dt(qn,ee)),T?.events.emit("floating.closed",ee)}):q&&(O.openChangeTimeout.clear(),e.setOpen(!1,dt(qn,ee)),T?.events.emit("floating.closed",ee))}const L=p.current??(y?e.select("domReferenceElement"):null);if(!on(L))return;function $(ee){if(O.openChangeTimeout.clear(),O.blockMouseMove=!1,u&&!Ci(O.pointerType))return;const q=bS(j.current),se=ms(I.current,"open",O.pointerType),N=tr(ee),B=ee.currentTarget??null,W=e.select("domReferenceElement");let re=B;if(on(N)&&!e.context.triggerElements.hasElement(N)){for(const Me of e.context.triggerElements.elements())if(at(Me,N)){re=Me;break}}on(B)&&on(W)&&!e.context.triggerElements.hasElement(B)&&at(B,W)&&(re=W);const Re=re==null?!1:J(W,re,N),le=e.select("open"),me=z.current?.()??e.select("transitionStatus")==="ending",ge=!le&&me&&M.current,ce=!Re&&on(re)&&on(W)&&at(W,re)&&ge,Te=q>0&&!se,ve=Re&&(le||ge)||ce,Pe=!le||Re;if(ve){G()&&e.setOpen(!0,dt(qn,ee,re));return}Te||(se?O.openChangeTimeout.start(se,()=>{Pe&&G()&&e.setOpen(!0,dt(qn,ee,re))}):Pe&&G()&&e.setOpen(!0,dt(qn,ee,re)))}function K(ee){if(F()){U();return}Y();const q=e.select("domReferenceElement"),se=Kt(q);O.restTimeout.clear(),O.restTimeoutPending=!1;const N=C.current.floatingContext??h?.();if(ah(ee.relatedTarget,e.context.triggerElements))return;if(A.current&&N){e.select("open")||O.openChangeTimeout.clear();const W=p.current;O.handler=A.current({...N,tree:T,x:ee.clientX,y:ee.clientY,onClose(){U(),Y(),k.current&&!F()&&W===e.select("domReferenceElement")&&_(ee,!0)}}),se.addEventListener("mousemove",O.handler),O.handler(ee);return}(O.pointerType!=="touch"||!at(e.select("floatingElement"),ee.relatedTarget))&&_(ee)}function V(ee){at(L,ee.relatedTarget)||(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1)}const X=w?jt(L,"mouseout",V):void 0;return d?uo(jt(L,"mousemove",$,{once:!0}),jt(L,"mouseenter",$),jt(L,"mouseleave",K),X):uo(jt(L,"mouseenter",$),jt(L,"mouseleave",K),X)},[Y,U,C,I,e,a,A,O,y,J,F,u,d,j,p,T,k,h,z,G,w]),v.useMemo(()=>{if(!a)return;function _(L){O.pointerType=L.pointerType}return{onPointerDown:_,onPointerEnter:_,onMouseMove(L){const{nativeEvent:$}=L,K=L.currentTarget,V=e.select("domReferenceElement"),X=e.select("open"),ee=J(V,K,L.target);if(u&&!Ci(O.pointerType))return;if(X&&ee&&O.handleCloseOptions?.blockPointerEvents){const N=e.select("floatingElement");if(N){const B=O.handleCloseOptions?.getScope?.()??K.ownerDocument.body;$E(O,{scopeElement:B,referenceElement:K,floatingElement:N})}}const q=bS(j.current);if(X&&!ee||q===0||!ee&&O.restTimeoutPending&&L.movementX**2+L.movementY**2<2)return;O.restTimeout.clear();function se(){if(O.restTimeoutPending=!1,F())return;const N=e.select("open");!O.blockMouseMove&&(!N||ee)&&G()&&e.setOpen(!0,dt(qn,$,K))}O.pointerType==="touch"?cr.flushSync(()=>{se()}):ee&&X?se():(O.restTimeoutPending=!0,O.restTimeout.start(q,se))}}},[a,O,F,J,u,e,j,G])}function qS(e){return ho&&e.movementX===0&&e.movementY===0}function ap(e,n,a){switch(e){case"vertical":return n;case"horizontal":return a;default:return n||a}}function Rf(e,n){return ap(n,e===QR||e===Fy,e===Hh||e===Uh)}function w0(e,n,a){return ap(n,e===Fy,a?e===Hh:e===Uh)||e==="Enter"||e===" "||e===""}function Q3(e,n,a){return ap(n,a?e===Hh:e===Uh,e===Fy)}function Z3(e,n,a,o){const s=a?e===Uh:e===Hh,u=e===QR;return n==="both"||n==="horizontal"&&o?e==="Escape":ap(n,s,u)}function QE(e,n){const{listRef:a,activeIndex:o,onNavigate:s=()=>{},enabled:u=!0,selectedIndex:c=null,allowEscape:d=!1,loopFocus:p=!1,nested:g=!1,rtl:y=!1,virtual:h=!1,focusItemOnOpen:b="auto",focusItemOnHover:x=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:R="vertical",triggerOrientation:T=R,parentOrientation:O,id:M,resetOnPointerLeave:A=!0,externalTree:I,nestedReturnFocusRef:j,grid:k}=n,D=k!=null,z=e.useState("open"),F=e.useState("floatingElement"),G=e.useState("domReferenceElement"),J=e.context.dataRef,Y=oh(F),U=Z0(G),_=Pn(Y),L=Ni(),$=Ii(I),K=v.useRef(b),V=v.useRef(c??-1),X=v.useRef(null),ee=v.useRef(!0),q=Be(de=>{s(V.current===-1?null:V.current,de)}),se=v.useRef(!!F),N=v.useRef(z),B=v.useRef(!1),W=v.useRef(!1),re=v.useRef(null),Re=Pn(C),le=Pn(z),me=Pn(c),ge=Pn(A),ce=Il(),Te=Il(),ve=Be(()=>{ce.cancel();function de(Ie){h||(re.current=Yf(Ie,{sync:B.current,preventScroll:!0}))}const we=a.current[V.current],Ke=W.current;we&&de(we),(B.current?Ie=>Ie():Ie=>ce.request(Ie))(()=>{const Ie=a.current[V.current]||we;if(!Ie)return;we||de(Ie),He&&(Ke||!ee.current)&&Ie.scrollIntoView?.({block:"nearest",inline:"nearest"})})});_e(()=>{J.current.orientation=R},[J,R]),_e(()=>{z||(X.current=null),(!z||b!=="auto")&&(K.current=b)},[z,b]),_e(()=>{u&&(z&&F?(V.current=c??-1,K.current&&c!=null&&(W.current=!0,q())):se.current&&(V.current=-1,q()))},[u,z,F,c,q]),_e(()=>{if(u){if(!z){B.current=!1;return}if(F)if(o==null){if(B.current=!1,me.current!=null)return;if(se.current&&(V.current=-1,ve()),(!N.current||!se.current)&&K.current&&(X.current!=null||K.current===!0&&X.current==null)){let de=0;const we=()=>{a.current[0]==null?(de<2&&(de?De=>Te.request(De):queueMicrotask)(we),de+=1):(V.current=X.current==null||w0(X.current,T,y)||g?qf(a):W0(a),X.current=null,q())};we()}}else Sl(a.current,o)||(V.current=o,ve(),W.current=!1)}},[u,z,F,o,me,g,a,T,y,q,ve,Te]),_e(()=>{if(!u||F||!$||h||!se.current)return;const de=$.nodesRef.current,we=de.find(Ie=>Ie.id===L)?.context?.elements.floating,Ke=Kr(Kt(G??we??null)),De=de.some(Ie=>Ie.context&&at(Ie.context.elements.floating,Ke));we&&!De&&ee.current&&we.focus({preventScroll:!0})},[u,F,G,$,L,h]),_e(()=>{N.current=z,se.current=!!F});const Pe=o!=null,Me=Be(de=>{if(!le.current)return;const we=a.current.indexOf(de.currentTarget);we!==-1&&(V.current!==we||o!==we)&&(V.current=we,q(de))}),Le=Be(()=>O??$?.nodesRef.current.find(de=>de.id===L)?.context?.dataRef?.current.orientation),Fe=Be(()=>qf(a,Re.current)),Oe=Be(de=>{if(ee.current=!1,B.current=!0,de.which===229||!le.current&&de.currentTarget===_.current)return;if(g&&Z3(de.key,R,y,D)){Rf(de.key,Le())||Fa(de),e.setOpen(!1,dt(ih,de.nativeEvent));const Ie=j?.current??G;yn(Ie)&&Ie.focus();return}o!=null&&o!==V.current&&!Sl(a.current,o)&&(V.current=o);const we=V.current,Ke=qf(a,C),De=W0(a,C);if(U||(de.key==="Home"&&(Fa(de),V.current=Ke,q(de)),de.key==="End"&&(Fa(de),V.current=De,q(de))),k!=null){const Ie=k(de,V.current,a,R,p,y,C,Ke,De);if(Ie!=null&&Ie!==V.current&&(V.current=Ie,q(de)),R==="both")return}if(Rf(de.key,R)){Fa(de);const Ie=Kr(de.currentTarget.ownerDocument);if(z&&!h&&at(de.currentTarget,Ie)&&!a.current.some(ht=>ht!=null&&at(ht,Ie))){V.current=w0(de.key,R,y)?Ke:De,q(de),o===V.current&&ve();return}const{index:yt,wrapped:ut}=W4(a.current,we,{decrement:!w0(de.key,R,y),loopFocus:p,allowEscape:d,disabledIndices:C,minIndex:Ke,maxIndex:De});ut&&(B.current=!1),V.current=yt,q(de)}}),He=v.useMemo(()=>({onFocus(we){B.current=!0,Me(we)},onClick({currentTarget:we}){h||we.focus({preventScroll:!0})},onMouseMove(we){qS(we)||(B.current=!0,W.current=!1,x&&Me(we))},onPointerLeave(we){if(!le.current||!ee.current||we.pointerType==="touch")return;B.current=!0;const Ke=we.relatedTarget;if(!(!x||a.current.includes(Ke))&&ge.current&&(re.current?.(),re.current=null,V.current=-1,q(we),!h)){const De=_.current,Ie=Kr(Kt(De));De&&at(De,Ie)&&De.focus({preventScroll:!0})}}}),[Me,le,_,x,a,q,ge,h]),be=v.useMemo(()=>h&&z&&Pe&&{"aria-activedescendant":`${M}-${o}`},[h,z,Pe,M,o]),Ue=v.useMemo(()=>({...U?{}:be,onKeyDown(de){if(de.key==="Tab"&&de.shiftKey&&z&&!h){const we=tr(de.nativeEvent);if(we&&!at(_.current,we))return;Fa(de);const Ke=dt(Ti,de.nativeEvent);e.setOpen(!1,Ke);const De=j?.current??G;!Ke.isCanceled&&yn(De)&&De.focus();return}Oe(de)},onPointerMove(de){qS(de)||(ee.current=!0)}}),[be,Oe,_,U,e,z,h,G,j]),Ze=v.useMemo(()=>{function de(De){e.setOpen(!0,dt(ih,De.nativeEvent,De.currentTarget))}function we(De){b==="auto"&&Nl(De.nativeEvent)&&(K.current=!h)}function Ke(De){K.current=b,b==="auto"&&zy(De.nativeEvent)&&(K.current=!0)}return{onKeyDown(De){const Ie=e.select("open");ee.current=!1;const yt=De.key.startsWith("Arrow"),ut=Q3(De.key,Le(),y),ht=Rf(De.key,Ie?R:T),Ot=(g?ut:ht)||De.key==="Enter"||De.key.trim()==="";if(h&&Ie&&(!g||Ac(De.currentTarget)))return Oe(De);if(!(!Ie&&!w&&yt)){if(Ot){const Dt=Rf(De.key,Le());X.current=g&&Dt?null:De.key}if(g){ut&&(Fa(De),Ie?(V.current=Fe(),q(De),h&&_.current?.focus()):de(De));return}ht&&(me.current!=null&&(V.current=me.current),Fa(De),!Ie&&w?de(De):Oe(De),Ie&&q(De))}},onFocus(De){De.target===De.currentTarget&&e.select("open")&&!h&&(V.current=-1,q(De))},onPointerDown:Ke,onPointerEnter:Ke,onMouseDown:we,onClick:we}},[Oe,b,Fe,g,q,e,w,R,T,Le,y,me,h,_]),it=v.useMemo(()=>({...be,...Ze}),[be,Ze]);return v.useMemo(()=>u?{reference:it,floating:Ue,item:He,trigger:Ze}:{},[u,it,Ue,Ze,He])}function ZE(e,n){const{listRef:a,elementsRef:o,activeIndex:s,onMatch:u,disabledIndices:c,onTyping:d,enabled:p=!0,resetMs:g=750,selectedIndex:y=null}=n,h=Be(d),b=e.useState("open"),x=Hn(),w=v.useRef(""),C=v.useRef(y??s??-1),R=v.useRef(null),T=Be(A=>{function I(U){return o?.current[U]}function j(U){const _=I(U);return _&&!qh(_)||_?.matches(":disabled")?!1:c==null||!Rl(fo,U,c)}function k(U,_,L=0){if(U.length===0)return-1;const $=(L%U.length+U.length)%U.length,K=_.toLowerCase();for(let V=0;V<U.length;V+=1){const X=($+V)%U.length;if(!(!U[X]?.toLowerCase().startsWith(K)||!j(X)))return X}return-1}const D=a.current;if(w.current.length>0&&A.key===" "&&(Fa(A),h?.(!0)),w.current.length>0&&w.current[0]!==" "&&k(D,w.current)===-1&&A.key!==" "&&h?.(!1),D==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;b&&A.key!==" "&&(Fa(A),h?.(!0));const z=w.current==="";z&&(C.current=y??s??-1),D.every((U,_)=>U&&j(_)?U[0]?.toLowerCase()!==U[1]?.toLowerCase():!0)&&w.current===A.key&&(w.current="",C.current=R.current),w.current+=A.key,x.start(g,()=>{w.current="",C.current=R.current,h?.(!1)});const J=((z?y??s??-1:C.current)??0)+1,Y=k(D,w.current,J);Y!==-1?(u?.(Y,A),R.current=Y):A.key!==" "&&(w.current="",h?.(!1))}),O=Be(A=>{const I=A.relatedTarget,j=e.select("domReferenceElement"),k=e.select("floatingElement");at(j,I)||at(k,I)||(x.clear(),w.current="",C.current=R.current,h?.(!1))});_e(()=>{!b&&y!==null||(x.clear(),R.current=null,w.current!==""&&(w.current="",h?.(!1)))},[b,y,x,h]);const M=v.useMemo(()=>({onKeyDown:T,onBlur:O}),[T,O]);return v.useMemo(()=>p?{reference:M,floating:M}:{},[p,M])}const YS=.1,J3=YS*YS,xn=.5;function Ef(e,n,a,o,s,u){return o>=n!=u>=n&&e<=(s-a)*(n-o)/(u-o)+a}function Cf(e,n,a,o,s,u,c,d,p,g){let y=!1;return Ef(e,n,a,o,s,u)&&(y=!y),Ef(e,n,s,u,c,d)&&(y=!y),Ef(e,n,c,d,p,g)&&(y=!y),Ef(e,n,p,g,a,o)&&(y=!y),y}function W3(e,n,a){return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function Tf(e,n,a,o,s,u){const c=Math.min(a,s),d=Math.max(a,s),p=Math.min(o,u),g=Math.max(o,u);return e>=c&&e<=d&&n>=p&&n<=g}function JE(e={}){const{blockPointerEvents:n=!1}=e,a=new Da,o=({x:s,y:u,placement:c,elements:d,onClose:p,nodeId:g,tree:y})=>{const h=c?.split("-")[0];let b=!1,x=null,w=null,C=typeof performance<"u"?performance.now():0;function R(O,M){const A=performance.now(),I=A-C;if(x===null||w===null||I===0)return x=O,w=M,C=A,!1;const j=O-x,k=M-w,D=j*j+k*k,z=I*I*J3;return x=O,w=M,C=A,D<z}function T(){a.clear(),p()}return function(M){a.clear();const A=d.domReference,I=d.floating;if(!A||!I||h==null||s==null||u==null)return;const{clientX:j,clientY:k}=M,D=tr(M),z=M.type==="mouseleave",F=at(I,D),G=at(A,D);if(F&&(b=!0,!z))return;if(G&&(b=!1,!z)){b=!0;return}if(z&&on(M.relatedTarget)&&at(I,M.relatedTarget))return;function J(){return!!(y&&Mi(y.nodesRef.current,g).length>0)}function Y(){J()||T()}if(J())return;const U=A.getBoundingClientRect(),_=I.getBoundingClientRect(),L=s>_.right-_.width/2,$=u>_.bottom-_.height/2,K=_.width>U.width,V=_.height>U.height,X=(K?U:_).left,ee=(K?U:_).right,q=(V?U:_).top,se=(V?U:_).bottom;if(h==="top"&&u>=U.bottom-1||h==="bottom"&&u<=U.top+1||h==="left"&&s>=U.right-1||h==="right"&&s<=U.left+1){Y();return}let N=!1;switch(h){case"top":N=Tf(j,k,X,U.top+1,ee,_.bottom-1);break;case"bottom":N=Tf(j,k,X,_.top+1,ee,U.bottom-1);break;case"left":N=Tf(j,k,_.right-1,se,U.left+1,q);break;case"right":N=Tf(j,k,U.right-1,se,_.left+1,q);break}if(N)return;if(b&&!W3(j,k,U)){Y();return}if(!z&&R(j,k)){Y();return}let B=!1;switch(h){case"top":{const W=K?xn/2:xn*4,re=K||L?s+W:s-W,Re=K?s-W:L?s+W:s-W,le=u+xn+1,me=L||K?_.bottom-xn:_.top,ge=L?K?_.bottom-xn:_.top:_.bottom-xn;B=Cf(j,k,re,le,Re,le,_.left,me,_.right,ge);break}case"bottom":{const W=K?xn/2:xn*4,re=K||L?s+W:s-W,Re=K?s-W:L?s+W:s-W,le=u-xn,me=L||K?_.top+xn:_.bottom,ge=L?K?_.top+xn:_.bottom:_.top+xn;B=Cf(j,k,re,le,Re,le,_.left,me,_.right,ge);break}case"left":{const W=V?xn/2:xn*4,re=V||$?u+W:u-W,Re=V?u-W:$?u+W:u-W,le=s+xn+1,me=$||V?_.right-xn:_.left,ge=$?V?_.right-xn:_.left:_.right-xn;B=Cf(j,k,me,_.top,ge,_.bottom,le,re,le,Re);break}case"right":{const W=V?xn/2:xn*4,re=V||$?u+W:u-W,Re=V?u-W:$?u+W:u-W,le=s-xn,me=$||V?_.left+xn:_.right,ge=$?V?_.left+xn:_.right:_.left+xn;B=Cf(j,k,le,re,le,Re,me,_.top,ge,_.bottom);break}}B?b||a.start(40,Y):Y()}};return o.__options={...e,blockPointerEvents:n},o}function KS(e,n,a){let{reference:o,floating:s}=e;const u=Oa(n),c=Gy(n),d=Ky(c),p=da(n),g=u==="y",y=o.x+o.width/2-s.width/2,h=o.y+o.height/2-s.height/2,b=o[d]/2-s[d]/2;let x;switch(p){case"top":x={x:y,y:o.y-s.height};break;case"bottom":x={x:y,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y:h};break;case"left":x={x:o.x-s.width,y:h};break;default:x={x:o.x,y:o.y}}const w=co(n);return w&&(x[c]+=b*(w==="end"?1:-1)*(a&&g?-1:1)),x}async function eI(e,n){var a;n===void 0&&(n={});const{x:o,y:s,platform:u,rects:c,elements:d,strategy:p}=e,{boundary:g="clippingAncestors",rootBoundary:y="viewport",elementContext:h="floating",altBoundary:b=!1,padding:x=0}=Oi(n,e),w=sE(x),R=d[b?h==="floating"?"reference":"floating":h],T=mc(await u.getClippingRect({element:(a=await(u.isElement==null?void 0:u.isElement(R)))==null||a?R:R.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:g,rootBoundary:y,strategy:p})),O=h==="floating"?{x:o,y:s,width:c.floating.width,height:c.floating.height}:c.reference,M=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),A=await(u.isElement==null?void 0:u.isElement(M))&&await(u.getScale==null?void 0:u.getScale(M))||{x:1,y:1},I=mc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:M,strategy:p}):O);return{top:(T.top-I.top+w.top)/A.y,bottom:(I.bottom-T.bottom+w.bottom)/A.y,left:(T.left-I.left+w.left)/A.x,right:(I.right-T.right+w.right)/A.x}}const tI=50,nI=async(e,n,a)=>{const{placement:o="bottom",strategy:s="absolute",middleware:u=[],platform:c}=a,d=c.detectOverflow?c:{...c,detectOverflow:eI},p=await(c.isRTL==null?void 0:c.isRTL(n));let g=await c.getElementRects({reference:e,floating:n,strategy:s}),{x:y,y:h}=KS(g,o,p),b=o,x=0;const w={};for(let C=0;C<u.length;C++){const R=u[C];if(!R)continue;const{name:T,fn:O}=R,{x:M,y:A,data:I,reset:j}=await O({x:y,y:h,initialPlacement:o,placement:b,strategy:s,middlewareData:w,rects:g,platform:d,elements:{reference:e,floating:n}});y=M??y,h=A??h,w[T]={...w[T],...I},j&&x<tI&&(x++,typeof j=="object"&&(j.placement&&(b=j.placement),j.rects&&(g=j.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:s}):j.rects),{x:y,y:h}=KS(g,b,p)),C=-1)}return{x:y,y:h,placement:b,strategy:s,middlewareData:w}},rI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var a,o;const{placement:s,middlewareData:u,rects:c,initialPlacement:d,platform:p,elements:g}=n,{mainAxis:y=!0,crossAxis:h=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...R}=Oi(e,n);if((a=u.arrow)!=null&&a.alignmentOffset)return{};const T=da(s),O=Oa(d),M=da(d)===d,A=await(p.isRTL==null?void 0:p.isRTL(g.floating)),I=b||(M||!C?[lh(d)]:G4(d)),j=w!=="none";!b&&j&&I.push(...Z4(d,C,w,A));const k=[d,...I],D=await p.detectOverflow(n,R),z=[];let F=((o=u.flip)==null?void 0:o.overflows)||[];if(y&&z.push(D[T]),h){const U=K4(s,c,A);z.push(D[U[0]],D[U[1]])}if(F=[...F,{placement:s,overflows:z}],!z.every(U=>U<=0)){var G,J;const U=(((G=u.flip)==null?void 0:G.index)||0)+1,_=k[U];if(_&&(!(h==="alignment"?O!==Oa(_):!1)||F.every(K=>Oa(K.placement)===O?K.overflows[0]>0:!0)))return{data:{index:U,overflows:F},reset:{placement:_}};let L=(J=F.filter($=>$.overflows[0]<=0).sort(($,K)=>$.overflows[1]-K.overflows[1])[0])==null?void 0:J.placement;if(!L)switch(x){case"bestFit":{var Y;const $=(Y=F.filter(K=>{if(j){const V=Oa(K.placement);return V===O||V==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(V=>V>0).reduce((V,X)=>V+X,0)]).sort((K,V)=>K[1]-V[1])[0])==null?void 0:Y[0];$&&(L=$);break}case"initialPlacement":L=d;break}if(s!==L)return{reset:{placement:L}}}return{}}}},WE=new Set(["left","top"]);async function aI(e,n){const{placement:a,platform:o,elements:s}=e,u=await(o.isRTL==null?void 0:o.isRTL(s.floating)),c=da(a),d=co(a),p=Oa(a)==="y",g=WE.has(c)?-1:1,y=u&&p?-1:1,h=Oi(n,e);let{mainAxis:b,crossAxis:x,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return d&&typeof w=="number"&&(x=d==="end"?w*-1:w),p?{x:x*y,y:b*g}:{x:b*g,y:x*y}}const oI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var a,o;const{x:s,y:u,placement:c,middlewareData:d}=n,p=await aI(n,e);return c===((a=d.offset)==null?void 0:a.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:s+p.x,y:u+p.y,data:{...p,placement:c}}}}},iI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:a,y:o,placement:s,platform:u}=n,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:O=>{let{x:M,y:A}=O;return{x:M,y:A}}},...g}=Oi(e,n),y={x:a,y:o},h=await u.detectOverflow(n,g),b=Oa(s),x=Yy(b);let w=y[x],C=y[b];const R=(O,M)=>iE(M+h[O==="y"?"top":"left"],M,M-h[O==="y"?"bottom":"right"]);c&&(w=R(x,w)),d&&(C=R(b,C));const T=p.fn({...n,[x]:w,[b]:C});return{...T,data:{x:T.x-a,y:T.y-o,enabled:{[x]:c,[b]:d}}}}}},sI=function(e){return e===void 0&&(e={}),{options:e,fn(n){var a,o;const{x:s,y:u,placement:c,rects:d,middlewareData:p}=n,{offset:g=0,mainAxis:y=!0,crossAxis:h=!0}=Oi(e,n),b={x:s,y:u},x=Oa(c),w=Yy(x);let C=b[w],R=b[x];const T=Oi(g,n),O=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:(a=T.mainAxis)!=null?a:0,crossAxis:(o=T.crossAxis)!=null?o:0};if(y){const I=w==="y"?"height":"width",j=d.reference[w]-d.floating[I]+O.mainAxis,k=d.reference[w]+d.reference[I]-O.mainAxis;C<j?C=j:C>k&&(C=k)}if(h){var M,A;const I=w==="y"?"width":"height",j=WE.has(da(c)),k=d.reference[x]-d.floating[I]+(j&&((M=p.offset)==null?void 0:M[x])||0)+(j?0:O.crossAxis),D=d.reference[x]+d.reference[I]+(j?0:((A=p.offset)==null?void 0:A[x])||0)-(j?O.crossAxis:0);R<k?R=k:R>D&&(R=D)}return{[w]:C,[x]:R}}}},lI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){const{placement:a,rects:o,platform:s,elements:u}=n,{apply:c=()=>{},...d}=Oi(e,n),p=await s.detectOverflow(n,d),g=da(a),y=co(a),h=Oa(a)==="y",{width:b,height:x}=o.floating;let w,C;g==="top"||g==="bottom"?(w=g,C=y===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(C=g,w=y==="end"?"top":"bottom");const R=x-p.top-p.bottom,T=b-p.left-p.right,O=kl(x-p[w],R),M=kl(b-p[C],T),A=n.middlewareData.shift,I=!A;let j=O,k=M;A!=null&&A.enabled.x&&(k=T),A!=null&&A.enabled.y&&(j=R),I&&!y&&(h?k=b-2*_o(p.left,p.right):j=x-2*_o(p.top,p.bottom)),await c({...n,availableWidth:k,availableHeight:j});const D=await s.getDimensions(u.floating);return b!==D.width||x!==D.height?{reset:{rects:!0}}:{}}}};function eC(e){const n=fa(e);let a=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const s=yn(e),u=s?e.offsetWidth:a,c=s?e.offsetHeight:o,d=sh(a)!==u||sh(o)!==c;return d&&(a=u,o=c),{width:a,height:o,$:d}}function iv(e){return on(e)?e:e.contextElement}function Tl(e){const n=iv(e);if(!yn(n))return Ho(1);const a=n.getBoundingClientRect(),{width:o,height:s,$:u}=eC(n);let c=(u?sh(a.width):a.width)/o,d=(u?sh(a.height):a.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const uI=Ho(0);function tC(e){const n=wn(e);return!Uy()||!n.visualViewport?uI:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function cI(e,n,a){return n===void 0&&(n=!1),!!a&&n&&a===wn(e)}function ys(e,n,a,o){n===void 0&&(n=!1),a===void 0&&(a=!1);const s=e.getBoundingClientRect(),u=iv(e);let c=Ho(1);n&&(o?on(o)&&(c=Tl(o)):c=Tl(e));const d=cI(u,a,o)?tC(u):Ho(0);let p=(s.left+d.x)/c.x,g=(s.top+d.y)/c.y,y=s.width/c.x,h=s.height/c.y;if(u&&o){const b=wn(u),x=on(o)?wn(o):o;let w=b,C=$0(w);for(;C&&x!==w;){const R=Tl(C),T=C.getBoundingClientRect(),O=fa(C),M=T.left+(C.clientLeft+parseFloat(O.paddingLeft))*R.x,A=T.top+(C.clientTop+parseFloat(O.paddingTop))*R.y;p*=R.x,g*=R.y,y*=R.x,h*=R.y,p+=M,g+=A,w=wn(C),C=$0(w)}}return mc({width:y,height:h,x:p,y:g})}function op(e,n){const a=_h(e).scrollLeft;return n?n.left+a:ys(Fo(e)).left+a}function nC(e,n){const a=e.getBoundingClientRect(),o=a.left+n.scrollLeft-op(e,a),s=a.top+n.scrollTop;return{x:o,y:s}}function dI(e){let{elements:n,rect:a,offsetParent:o,strategy:s}=e;const u=s==="fixed",c=Fo(o),d=n?zh(n.floating):!1;if(o===c||d&&u)return a;let p={scrollLeft:0,scrollTop:0},g=Ho(1);const y=Ho(0),h=yn(o);if((h||!u)&&((Sr(o)!=="body"||Oc(c))&&(p=_h(o)),h)){const x=ys(o);g=Tl(o),y.x=x.x+o.clientLeft,y.y=x.y+o.clientTop}const b=c&&!h&&!u?nC(c,p):Ho(0);return{width:a.width*g.x,height:a.height*g.y,x:a.x*g.x-p.scrollLeft*g.x+y.x+b.x,y:a.y*g.y-p.scrollTop*g.y+y.y+b.y}}function fI(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function hI(e){const n=_h(e),a=e.ownerDocument.body,o=_o(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),s=_o(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+op(e);const c=-n.scrollTop;return fa(a).direction==="rtl"&&(u+=_o(e.clientWidth,a.clientWidth)-o),{width:o,height:s,x:u,y:c}}const pI=25;function gI(e,n,a){a===void 0&&(a="viewport");const o=a==="layoutViewport",s=wn(e),u=Fo(e),c=s.visualViewport;let d=u.clientWidth,p=u.clientHeight,g=0,y=0;if(c){const b=!Uy()||n==="fixed";o?b||(g=-c.offsetLeft,y=-c.offsetTop):(d=c.width,p=c.height,b&&(g=c.offsetLeft,y=c.offsetTop))}if(op(u)<=0){const b=u.ownerDocument,x=b.body,w=getComputedStyle(x),C=b.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,R=Math.abs(u.clientWidth-x.clientWidth-C),T=getComputedStyle(u).scrollbarGutter==="stable both-edges"?R/2:R;T<=pI&&(d-=T)}return{width:d,height:p,x:g,y}}function mI(e,n){const a=ys(e,!0,n==="fixed"),o=a.top+e.clientTop,s=a.left+e.clientLeft,u=Tl(e),c=e.clientWidth*u.x,d=e.clientHeight*u.y,p=s*u.x,g=o*u.y;return{width:c,height:d,x:p,y:g}}function GS(e,n,a){let o;if(n==="viewport"||n==="layoutViewport")o=gI(e,a,n);else if(n==="document")o=hI(Fo(e));else if(on(n))o=mI(n,a);else{const s=tC(e);o={x:n.x-s.x,y:n.y-s.y,width:n.width,height:n.height}}return mc(o)}function yI(e,n){const a=n.get(e);if(a)return a;let o=pc(e,[],!1).filter(d=>on(d)&&Sr(d)!=="body"),s=null;const u=fa(e).position==="fixed";let c=u?Uo(e):e;for(;on(c)&&!zo(c);){const d=fa(c),p=Hy(c),g=s?s.position:u?"fixed":"";!p&&(g==="fixed"||g==="absolute"&&d.position==="static")?o=o.filter(h=>h!==c):s=d,c=Uo(c)}return n.set(e,o),o}function vI(e){let{element:n,boundary:a,rootBoundary:o,strategy:s}=e;const c=[...a==="clippingAncestors"?zh(n)?[]:yI(n,this._c):[].concat(a),o],d=GS(n,c[0],s);let p=d.top,g=d.right,y=d.bottom,h=d.left;for(let b=1;b<c.length;b++){const x=GS(n,c[b],s);p=_o(x.top,p),g=kl(x.right,g),y=kl(x.bottom,y),h=_o(x.left,h)}return{width:g-h,height:y-p,x:h,y:p}}function bI(e){const{width:n,height:a}=eC(e);return{width:n,height:a}}function xI(e,n,a){const o=yn(n),s=Fo(n),u=a==="fixed",c=ys(e,!0,u,n);let d={scrollLeft:0,scrollTop:0};const p=Ho(0);if((o||!u)&&((Sr(n)!=="body"||Oc(s))&&(d=_h(n)),o)){const b=ys(n,!0,u,n);p.x=b.x+n.clientLeft,p.y=b.y+n.clientTop}!o&&s&&(p.x=op(s));const g=s&&!o&&!u?nC(s,d):Ho(0),y=c.left+d.scrollLeft-p.x-g.x,h=c.top+d.scrollTop-p.y-g.y;return{x:y,y:h,width:c.width,height:c.height}}function R0(e){return fa(e).position==="static"}function $S(e,n){if(!yn(e)||fa(e).position==="fixed")return null;if(n)return n(e);let a=e.offsetParent;return Fo(e)===a&&(a=a.ownerDocument.body),a}function rC(e,n){const a=wn(e);if(zh(e))return a;if(!yn(e)){let s=Uo(e);for(;s&&!zo(s);){if(on(s)&&!R0(s))return s;s=Uo(s)}return a}let o=$S(e,n);for(;o&&u4(o)&&R0(o);)o=$S(o,n);return o&&zo(o)&&R0(o)&&!Hy(o)?a:o||f4(e)||a}const SI=async function(e){const n=this.getOffsetParent||rC,a=this.getDimensions,o=await a(e.floating);return{reference:xI(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function wI(e){return fa(e).direction==="rtl"}const aC={convertOffsetParentRelativeRectToViewportRelativeRect:dI,getDocumentElement:Fo,getClippingRect:vI,getOffsetParent:rC,getElementRects:SI,getClientRects:fI,getDimensions:bI,getScale:Tl,isElement:on,isRTL:wI};function oC(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function RI(e,n,a){let o=null,s;const u=Fo(e);function c(){var y;clearTimeout(s),(y=o)==null||y.disconnect(),o=null}function d(y,h){y===void 0&&(y=!1),h===void 0&&(h=1),c();const b=e.getBoundingClientRect(),{left:x,top:w,width:C,height:R}=b;if(y||n(),!C||!R)return;const T=bf(w),O=bf(u.clientWidth-(x+C)),M=bf(u.clientHeight-(w+R)),A=bf(x),j={rootMargin:-T+"px "+-O+"px "+-M+"px "+-A+"px",threshold:_o(0,kl(1,h))||1};let k=!0;function D(z){const F=z[0].intersectionRatio;if(!oC(b,e.getBoundingClientRect()))return d();if(F!==h){if(!k)return d();F?d(!1,F):s=setTimeout(()=>{d(!1,1e-7)},1e3)}k=!1}try{o=new IntersectionObserver(D,{...j,root:u.ownerDocument})}catch{o=new IntersectionObserver(D,j)}o.observe(e)}const p=wn(e),g=()=>d(a);return p.addEventListener("resize",g),d(!0),()=>{p.removeEventListener("resize",g),c()}}function XS(e,n,a,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,g=iv(e),y=s||u?[...g?pc(g):[],...n?pc(n):[]]:[];y.forEach(T=>{s&&T.addEventListener("scroll",a),u&&T.addEventListener("resize",a)});const h=g&&d?RI(g,a,u):null;let b=-1,x=null;c&&(x=new ResizeObserver(T=>{let[O]=T;O&&O.target===g&&x&&n&&(x.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var M;(M=x)==null||M.observe(n)})),a()}),g&&!p&&x.observe(g),n&&x.observe(n));let w,C=p?ys(e):null;p&&R();function R(){const T=ys(e);C&&!oC(C,T)&&a(),C=T,w=requestAnimationFrame(R)}return a(),()=>{var T;y.forEach(O=>{s&&O.removeEventListener("scroll",a),u&&O.removeEventListener("resize",a)}),h?.(),(T=x)==null||T.disconnect(),x=null,p&&cancelAnimationFrame(w)}}const EI=oI,CI=iI,TI=rI,OI=lI,MI=sI,AI=(e,n,a)=>{const o=new Map,s=a??{},u={...aC,...s.platform,_c:o};return nI(e,n,{...s,platform:u})};var DI=typeof document<"u",NI=function(){},Kf=DI?v.useLayoutEffect:NI;function ph(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 a,o,s;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==n.length)return!1;for(o=a;o--!==0;)if(!ph(e[o],n[o]))return!1;return!0}if(s=Object.keys(e),a=s.length,a!==Object.keys(n).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(n,s[o]))return!1;for(o=a;o--!==0;){const u=s[o];if(!(u==="_owner"&&e.$$typeof)&&!ph(e[u],n[u]))return!1}return!0}return e!==e&&n!==n}function iC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function QS(e,n){const a=iC(e);return Math.round(n*a)/a}function E0(e){const n=v.useRef(e);return Kf(()=>{n.current=e}),n}function II(e){e===void 0&&(e={});const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:s,elements:{reference:u,floating:c}={},transform:d=!0,whileElementsMounted:p,open:g}=e,[y,h]=v.useState({x:0,y:0,strategy:a,placement:n,middlewareData:{},isPositioned:!1}),[b,x]=v.useState(o);ph(b,o)||x(o);const[w,C]=v.useState(null),[R,T]=v.useState(null),O=v.useCallback(K=>{K!==j.current&&(j.current=K,C(K))},[]),M=v.useCallback(K=>{K!==k.current&&(k.current=K,T(K))},[]),A=u||w,I=c||R,j=v.useRef(null),k=v.useRef(null),D=v.useRef(y),z=p!=null,F=E0(p),G=E0(s),J=E0(g),Y=v.useCallback(()=>{if(!j.current||!k.current)return;const K={placement:n,strategy:a,middleware:b};G.current&&(K.platform=G.current),AI(j.current,k.current,K).then(V=>{const X={...V,isPositioned:J.current!==!1};U.current&&!ph(D.current,X)&&(D.current=X,cr.flushSync(()=>{h(X)}))})},[b,n,a,G,J]);Kf(()=>{g===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(K=>({...K,isPositioned:!1})))},[g]);const U=v.useRef(!1);Kf(()=>(U.current=!0,()=>{U.current=!1}),[]),Kf(()=>{if(A&&(j.current=A),I&&(k.current=I),A&&I){if(F.current)return F.current(A,I,Y);Y()}},[A,I,Y,F,z]);const _=v.useMemo(()=>({reference:j,floating:k,setReference:O,setFloating:M}),[O,M]),L=v.useMemo(()=>({reference:A,floating:I}),[A,I]),$=v.useMemo(()=>{const K={position:a,left:0,top:0};if(!L.floating)return K;const V=QS(L.floating,y.x),X=QS(L.floating,y.y);return d?{...K,transform:"translate("+V+"px, "+X+"px)",...iC(L.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:V,top:X}},[a,d,L.floating,y.x,y.y]);return v.useMemo(()=>({...y,update:Y,refs:_,elements:L,floatingStyles:$}),[y,Y,_,L,$])}const jI=(e,n)=>{const a=EI(e);return{name:a.name,fn:a.fn,options:[e,n]}},kI=(e,n)=>{const a=CI(e);return{name:a.name,fn:a.fn,options:[e,n]}},PI=(e,n)=>({fn:MI(e).fn,options:[e,n]}),LI=(e,n)=>{const a=TI(e);return{name:a.name,fn:a.fn,options:[e,n]}},zI=(e,n)=>{const a=OI(e);return{name:a.name,fn:a.fn,options:[e,n]}},_I={...Po,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,n)=>n?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class HI extends Ul{constructor(n,a,o){const s=new Pc;super(UI(n,s,a,o),FI(s),_I)}setOpen=(n,a)=>{P3(this,n,a,{extraState:{openChangeReason:a.reason}})};cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,dt(Va,n))}}function UI(e,n,a,o=!1){return{...rp(n,a,o),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function FI(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const BI=Cc(function(n){const{disabled:a=!1,defaultOpen:o=!1,open:s,disableHoverablePopup:u=!1,trackCursorAxis:c="none",actionsRef:d,onOpenChange:p,onOpenChangeComplete:g,handle:y,triggerId:h,defaultTriggerId:b=null,children:x}=n,w=nv((G,J)=>new HI({open:o,openProp:s,activeTriggerId:b,triggerIdProp:h},G,J));w.useControlledProp("openProp",s),w.useControlledProp("triggerIdProp",h),w.useContextCallback("onOpenChange",p),w.useContextCallback("onOpenChangeComplete",g);const C=w.useState("open"),R=!a&&C,T=w.useState("activeTriggerId"),O=w.useState("mounted"),M=w.useState("payload");w.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:u,disabled:a}),Wh(w,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:A,transitionStatus:I}=ep(R,w),j=w.useState("isInstantPhase"),k=w.useState("instantType"),D=w.useState("lastOpenChangeReason"),z=v.useRef(null);_e(()=>{C&&a&&w.setOpen(!1,dt(I4))},[C,a,w]),_e(()=>{I==="ending"&&D===zr||I!=="ending"&&j?(k!=="delay"&&(z.current=k),w.set("instantType","delay")):z.current!==null&&(w.set("instantType",z.current),z.current=null)},[I,j,D,k,w]),_e(()=>{R&&T==null&&w.set("payload",void 0)},[w,T,R]),v.useImperativeHandle(d,()=>({unmount:A,close:()=>w.setOpen(!1,dt(Nc))}),[A,w]);const F=R||O||!a&&c!=="none";return S.jsxs(GR.Provider,{value:w,children:[y&&S.jsx(Qh,{handle:y,store:w}),F&&S.jsx(VI,{store:w,disabled:a,trackCursorAxis:c}),typeof x=="function"?x({payload:M}):x]})});function VI({store:e,disabled:n,trackCursorAxis:a}){const o=e.useState("floatingRootContext"),s=jc(o,{enabled:!n,referencePress:()=>e.select("closeOnClick")}),u=D3(o,{enabled:!n&&a!=="none",axis:a==="none"?void 0:a}),c=v.useMemo(()=>Pr(u.reference,s.reference),[u.reference,s.reference]);return tp(e,{activeTriggerProps:c,inactiveTriggerProps:c,popupProps:s.floating??Gt}),null}function Tr(e){return Hl(e,"base-ui")}const sC=v.createContext(void 0);function qI(){return v.useContext(sC)}const YI=600,ZS="data-base-ui-tooltip-trigger";function JS(e){const n=tr(e);return on(n)?n:null}const KI=KR(function(n,a){const{render:o,className:s,style:u,handle:c,payload:d,disabled:p,delay:g,closeOnClick:y=!0,closeDelay:h,id:b,...x}=n,w=Tc(!0),R=KE(c)??w;if(!R)throw new Error(Rn(82));const T=Tr(b),O=R.useState("isTriggerActive",T),M=R.useState("isOpenedByTrigger",T),A=R.useState("floatingRootContext"),I=v.useRef(null),j=h??0,{registerTrigger:k,isMountedByThisTrigger:D}=UE(T,I,R,{payload:d,closeOnClick:y,closeDelay:j}),z=qI(),{activeIdRef:F,delayRef:G,isInstantPhase:J,hasProvider:Y}=L4(A,{open:M}),U=av(A);R.useSyncedValue("isInstantPhase",J);const _=R.useState("disabled"),L=p??_,$=Pn(L),K=R.useState("trackCursorAxis"),V=R.useState("disableHoverablePopup"),X=v.useRef(!1),ee=Hn(),q=v.useRef(void 0);function se(){return Y&&F.current!=null?0:g??z??YI}function N(ce){const Te=I.current;if(!Te||!ce)return!1;const ve=gc(ce,`[${ZS}]`);return ve!==null&&ve!==Te&&at(Te,ve)}function B(ce){const Te=N(ce);return X.current=Te,Te&&(U.openChangeTimeout.clear(),U.restTimeout.clear(),U.restTimeoutPending=!1,ee.clear()),Te}const W=XE(A,{enabled:!L,mouseOnly:!0,move:!1,handleClose:!V&&K!=="both"?JE():null,restMs:se,delay(){return h==null&&Y?{close:ms(G.current,"close")}:{close:j}},triggerElementRef:I,isActiveTrigger:O,isClosing:()=>R.select("transitionStatus")==="ending",shouldOpen(){return!X.current}}),re=GE(A,{enabled:!L}).reference,Re=ce=>{const Te=X.current,ve=JS(ce),Pe=B(ve),Me=I.current,Le=Me&&ve&&at(Me,ve);if(Pe&&R.select("open")&&R.select("lastOpenChangeReason")===qn){R.setOpen(!1,dt(qn,ce));return}if(Te&&!Pe&&Le&&!$.current&&!R.select("open")&&Me&&Ci(q.current)){const Fe=()=>{!X.current&&!$.current&&!R.select("open")&&R.setOpen(!0,dt(qn,ce,Me))},Oe=se();Oe===0?(ee.clear(),Fe()):ee.start(Oe,Fe)}},le=R.useState("appliedTriggerProps",D||K!=="none");return Mt("button",n,{state:{open:M},ref:[a,k,I],props:[W,re,le,{onMouseOver(ce){Re(ce.nativeEvent)},onFocus(ce){N(JS(ce.nativeEvent))&&ce.preventBaseUIHandler()},onMouseLeave(){X.current=!1,ee.clear(),q.current=void 0},onPointerEnter(ce){q.current=ce.pointerType},onPointerDown(ce){q.current=ce.pointerType,R.set("closeOnClick",y),y&&!R.select("open")&&R.cancelPendingOpen(ce.nativeEvent)},onClick(ce){y&&!R.select("open")&&R.cancelPendingOpen(ce.nativeEvent)},id:T,[Q0]:L?"":void 0,[ZS]:L?void 0:""},x],stateAttributesMapping:JR})}),lC=v.createContext(void 0);function GI(){const e=v.useContext(lC);if(e===void 0)throw new Error(Rn(70));return e}const $I=v.forwardRef(function(n,a){const{children:o,container:s,className:u,render:c,style:d,...p}=n,{node:g,subtree:y}=DE({container:s,ref:a,componentProps:n,elementProps:p});return!y&&!g?null:S.jsxs(v.Fragment,{children:[y,g&&cr.createPortal(o,g)]})}),XI=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n;return Tc().useState("mounted")||o?S.jsx(lC.Provider,{value:o,children:S.jsx($I,{ref:a,...s})}):null}),uC=v.createContext(void 0);function cC(){const e=v.useContext(uC);if(e===void 0)throw new Error(Rn(71));return e}function QI(e){const{nodeId:n,externalTree:a,rootContext:o}=e,s=o.useState("referenceElement"),u=o.useState("floatingElement"),c=o.useState("domReferenceElement"),d=o.useState("open"),p=o.useState("floatingId"),[g,y]=v.useState(null),h=v.useRef(null),b=Ii(a),x=v.useMemo(()=>({reference:s,floating:u,domReference:c}),[s,u,c]),w=II({...e,elements:{...x,...g&&{reference:g}}}),C=v.useCallback(M=>{const A=on(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;y(A),w.refs.setReference(A)},[w.refs]),R=v.useMemo(()=>({...w.refs,setPositionReference:C,domReference:h}),[w.refs,C]),T=v.useMemo(()=>({...w.elements,domReference:c}),[w.elements,c]),O=v.useMemo(()=>({...w,dataRef:o.context.dataRef,open:d,onOpenChange:o.setOpen,events:o.context.events,floatingId:p,refs:R,elements:T,nodeId:n,rootStore:o}),[w,R,T,n,o,d,p]);return _e(()=>{c&&(h.current=c)},[c]),_e(()=>{o.context.dataRef.current.floatingContext=O;const M=b?.nodesRef.current.find(A=>A.id===n);M&&(M.context=O)}),v.useMemo(()=>({...w,context:O,refs:R,elements:T,rootStore:o}),[w,R,T,O,o])}const ZI=v.createContext(void 0);function ip(){return v.useContext(ZI)?.direction??"ltr"}const JI=e=>({name:"arrow",options:e,async fn(n){const{x:a,y:o,placement:s,rects:u,platform:c,elements:d,middlewareData:p}=n,{element:g,padding:y=0}=Oi(e,n)||{};if(g==null)return{};const h=sE(y),b={x:a,y:o},x=Gy(s),w=Ky(x),C=await c.getDimensions(g),R=x==="y",T=R?"top":"left",O=R?"bottom":"right",M=R?"clientHeight":"clientWidth",A=u.reference[w]+u.reference[x]-b[x]-u.floating[w],I=b[x]-u.reference[x],j=d.floating[M]||u.floating[w],k=A/2-I/2,D=j/2-C[w]/2-1,z=Math.min(h[T],D),F=Math.min(h[O],D),G=z,J=j-C[w]-F,Y=j/2-C[w]/2+k,U=iE(G,Y,J),_=!p.arrow&&co(s)!=null&&Y!==U&&u.reference[w]/2-(Y<G?z:F)-C[w]/2<0,L=_?Y<G?Y-G:Y-J:0;return{[x]:b[x]+L,data:{[x]:U,centerOffset:Y-U-L,..._&&{alignmentOffset:L}},reset:_}}}),WI=(e,n)=>{const{name:a,fn:o}=JI(e);return{name:a,fn:o,options:[e,n]}},ej={name:"hide",async fn(e){const{width:n,height:a,x:o,y:s}=e.rects.reference,u=n===0&&a===0&&o===0&&s===0,c=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:c.top-a>=0||c.right-n>=0||c.bottom-a>=0||c.left-n>=0||u}}}},tj={sideX:"left",sideY:"top"},nj="--available-width",rj="--available-height",aj="--anchor-width",oj="--anchor-height",ij="--transform-origin",WS=nj,ew=rj;function dC(e,n,a){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?a?"inline-start":"inline-end":"right",bottom:"bottom",left:o?a?"inline-end":"inline-start":"left"}[n]}function tw(e,n,a){const{rects:o,placement:s}=e;return{side:dC(n,da(s),a),align:co(s)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function sp(e){return sj(e,QI)}function sj(e,n){const{anchor:a,positionMethod:o="absolute",side:s="bottom",sideOffset:u=0,align:c="center",alignOffset:d=0,collisionBoundary:p,collisionPadding:g=5,sticky:y=!1,arrowPadding:h=5,disableAnchorTracking:b=!1,inline:x,keepMounted:w=!1,floatingRootContext:C,mounted:R,collisionAvoidance:T,shift:O,nodeId:M,adaptiveOrigin:A,lazyFlip:I=!1,externalTree:j}=e,k=T.side||"flip",D=T.align||"flip",z=T.fallbackAxisSide||"end",F=O?.crossAxis??!1,G=O?.rootBoundary,J=typeof a=="function"?a:void 0,Y=Be(J),U=J?Y:a,_=Pn(a),L=Pn(R),K=ip()==="rtl",[V,X]=v.useState(null);!R&&V!==null&&X(null);const ee=I==="placement",q=V?da(V):null,se=V&&ee?co(V)||"center":null,N=q||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":K?"left":"right","inline-start":K?"right":"left"}[s],B=se||c,W=B==="center"?N:`${N}-${B}`;let re=g;typeof re=="number"?re={top:re,right:re,bottom:re,left:re}:re&&(re={top:re.top||0,right:re.right||0,bottom:re.bottom||0,left:re.left||0});const Re=1,le=s==="bottom"?Re:0,me=s==="top"?Re:0,ge=s==="right"?Re:0,ce=s==="left"?Re:0,Te={boundary:p==="clipping-ancestors"?"clippingAncestors":p,padding:re},ve=v.useRef(null),Pe=Pn(u),Me=Pn(d),Le=typeof u!="function"?u:0,Fe=typeof d!="function"?d:0,Oe=[];x&&Oe.push(x),Oe.push(jI(je=>{const ot=tw(je,s,K),ke=typeof Pe.current=="function"?Pe.current(ot):Pe.current,ze=typeof Me.current=="function"?Me.current(ot):Me.current;return{mainAxis:ke,crossAxis:ze,alignmentAxis:ze}},[Le,Fe,K,s]));const He=D==="none"&&k!=="shift",be=!He&&(y||F||k==="shift"),Ue=k==="none"?null:LI({...Te,padding:{top:re.top+Re+le,right:re.right+Re+ce,bottom:re.bottom+Re+me,left:re.left+Re+ge},mainAxis:!F&&k==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:z}),Ze=He?null:kI({...Te,rootBoundary:G,mainAxis:D!=="none",crossAxis:be,limiter:y||F?void 0:PI(je=>{if(!ve.current)return{};const{width:ot,height:ke}=ve.current.getBoundingClientRect(),ze=Oa(da(je.placement)),Ge=ze==="y"?ot:ke,et=ze==="y"?re.left+re.right:re.top+re.bottom;return{offset:Ge/2+et/2}})},[Te,y,F,G,re,D]);k==="shift"||D==="shift"||B==="center"?Oe.push(Ze,Ue):Oe.push(Ue,Ze),Oe.push(zI({...Te,apply({elements:{floating:je},availableWidth:ot,availableHeight:ke,rects:ze}){if(!L.current)return;const Ge=je.style;Ge.setProperty(WS,`${ot}px`),Ge.setProperty(ew,`${ke}px`);const et=wn(je).devicePixelRatio||1,{x:Et,y:H,width:Z,height:ne}=ze.reference,ye=(Math.round((Et+Z)*et)-Math.round(Et*et))/et,xe=(Math.round((H+ne)*et)-Math.round(H*et))/et;Ge.setProperty(aj,`${ye}px`),Ge.setProperty(oj,`${xe}px`)}}),WI(je=>({element:ve.current||Kt(je.elements.floating).createElement("div"),padding:ve.current?h:0}),[h]),{name:"transformOrigin",fn(je){const{elements:{floating:ot},middlewareData:ke,placement:ze,platform:Ge,rects:et,y:Et}=je,H=da(ze),Z=co(ze),ne=Oa(H)==="y",ye=ve.current,xe=typeof u=="function"?u(tw(je,s,K)):u;let qe;if(!ye&&Z&&Math.abs(ne?ke.shift?.x||0:ke.shift?.y||0)<=1)qe=Z==="start"===(ne&&Ge.isRTL?.(ot)===!0)?"100%":"0%";else{const Xe=ne?ke.arrow?.x||0:ke.arrow?.y||0,$e=ne?ye?.clientWidth||0:ye?.clientHeight||0;qe=`${Xe+$e/2}px`}let Ve=H==="top"||H==="left"?`calc(100% + ${xe}px)`:`${-xe}px`;return be&&ne&&Math.abs(ke.shift?.y||0)>xe&&(Ve=`${et.reference.y+et.reference.height/2-Et}px`),ot.style.setProperty(ij,ne?`${qe} ${Ve}`:`${Ve} ${qe}`),{}}},ej,A),_e(()=>{!R&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[R,C]);const it=v.useMemo(()=>({ancestorScroll:!b,elementResize:!b&&typeof ResizeObserver<"u",layoutShift:!b&&typeof IntersectionObserver<"u"}),[b]),{refs:de,elements:we,x:Ke,y:De,middlewareData:Ie,update:yt,placement:ut,context:ht,isPositioned:Ot,floatingStyles:Dt}=n({rootContext:C,open:w?R:void 0,placement:W,middleware:Oe,strategy:o,whileElementsMounted:w?void 0:(...je)=>XS(...je,it),nodeId:M,externalTree:j}),{sideX:Jt,sideY:rn}=Ie.adaptiveOrigin||tj,Wt=Ot?o:"fixed",We=v.useMemo(()=>{let je;return Ot?A?je={position:Wt,[Jt]:Ke,[rn]:De}:je={...Dt,position:Wt}:je={position:Wt,top:0,left:0},je[WS]="100vw",je[ew]="100vh",Ot||(je.opacity=0),je},[A,Wt,Jt,Ke,rn,De,Dt,Ot]),xt=v.useRef(null);_e(()=>{if(!R)return;const je=_.current,ot=typeof je=="function"?je():je,ze=(nw(ot)?ot.current:ot)||null||null;ze!==xt.current&&(de.setPositionReference(ze),xt.current=ze)},[R,de,U,_]),v.useEffect(()=>{if(!R)return;const je=_.current;typeof je!="function"&&nw(je)&&je.current!==xt.current&&(de.setPositionReference(je.current),xt.current=je.current)},[R,de,U,_]),v.useEffect(()=>{if(w&&R&&we.reference&&we.floating)return XS(we.reference,we.floating,yt,it)},[w,R,we,yt,it]);const $t=da(ut),ft=dC(s,$t,K),vt=co(ut)||"center",gt=!!Ie.hide?.referenceHidden;_e(()=>{I&&R&&Ot&&($t!==N||ee&&vt!==B)&&X(ut)},[I,ee,R,Ot,ut,$t,vt,N,B]);const Lt=v.useMemo(()=>({position:"absolute",top:Ie.arrow?.y,left:Ie.arrow?.x}),[Ie.arrow]),un=Ie.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:We,arrowStyles:Lt,arrowRef:ve,arrowUncentered:un,side:ft,align:vt,physicalSide:$t,anchorHidden:gt,refs:de,context:ht,isPositioned:Ot,update:yt}),[We,Lt,ve,un,ft,vt,$t,gt,de,ht,Ot,yt])}function nw(e){return e!=null&&"current"in e}function Lc(e){return e==="starting"?R3:Gt}function lp(e,n,{styles:a,transitionStatus:o,props:s,refs:u,hidden:c,inert:d=!1}){const p={...a};return d&&(p.pointerEvents="none"),Mt("div",e,{state:n,ref:u,props:[{role:"presentation",hidden:c,style:p},Lc(o),s],stateAttributesMapping:Mc})}const lj=v.forwardRef(function(n,a){const{render:o,className:s,anchor:u,positionMethod:c="absolute",side:d="top",align:p="center",sideOffset:g=0,alignOffset:y=0,collisionBoundary:h="clipping-ancestors",collisionPadding:b=5,arrowPadding:x=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:R=Jy,style:T,...O}=n,M=Tc(),A=GI(),I=M.useState("open"),j=M.useState("mounted"),k=M.useState("trackCursorAxis"),D=M.useState("disableHoverablePopup"),z=M.useState("floatingRootContext"),F=M.useState("instantType"),G=M.useState("transitionStatus"),J=M.useState("adaptiveOrigin"),Y=sp({anchor:u,positionMethod:c,floatingRootContext:z,mounted:j,side:d,sideOffset:g,align:p,alignOffset:y,collisionBoundary:h,collisionPadding:b,sticky:w,arrowPadding:x,disableAnchorTracking:C,keepMounted:A,collisionAvoidance:R,adaptiveOrigin:J}),U=v.useMemo(()=>({open:I,side:Y.side,align:Y.align,anchorHidden:Y.anchorHidden,instant:k!=="none"?"tracking-cursor":F}),[I,Y.side,Y.align,Y.anchorHidden,k,F]),_=lp(n,U,{styles:Y.positionerStyles,transitionStatus:G,props:O,refs:[a,M.useStateSetter("positionerElement")],hidden:!j,inert:!I||k==="both"||D});return S.jsx(uC.Provider,{value:Y,children:_})}),uj=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=Tc(),{side:p,align:g}=cC(),y=d.useState("open"),h=d.useState("instantType"),b=d.useState("transitionStatus"),x=d.useState("popupProps"),w=d.useState("floatingRootContext"),C=d.useState("disabled"),R=d.useState("closeDelay");Ia({open:y,ref:d.context.popupRef,onComplete(){y&&d.context.onOpenChangeComplete?.(!0)}}),ov(w,{enabled:!C,closeDelay:R});const T=d.useStateSetter("popupElement");return Mt("div",n,{state:{open:y,side:p,align:g,instant:h,transitionStatus:b},ref:[a,d.context.popupRef,T],props:[kc,x,Lc(b),c],stateAttributesMapping:Fh})}),cj=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=Tc(),{arrowRef:p,side:g,align:y,arrowUncentered:h,arrowStyles:b}=cC(),x=d.useState("open"),w=d.useState("instantType");return Mt("div",n,{state:{open:x,side:g,align:y,uncentered:h,instant:w},ref:[a,p],props:[{style:b,"aria-hidden":!0},c],stateAttributesMapping:Mc})}),dj=function(n){const{delay:a,closeDelay:o,timeout:s=400}=n,u=v.useMemo(()=>({open:a,close:o}),[a,o]);return S.jsx(sC.Provider,{value:a,children:S.jsx(P4,{delay:u,timeoutMs:s,children:n.children})})};function up(e){return Qy(19)?e:e?"true":void 0}function fj(e){const[n,a]=v.useState({current:e,previous:null});return Object.is(e,n.current)||a({current:e,previous:n.current}),n.previous}const fC=48,go=(e,n=0)=>{const a=new Int32Array(e.length);for(let o=0;o<e.length;o++)a[o]=e.charCodeAt(o)-fC-n;return a},cp=e=>{const n=new Int32Array(e.length+1);for(let a=0;a<e.length;a++)n[a+1]=n[a]+e[a];return n},Ai=e=>{const n=new Int32Array(e.length);let a=0;for(let o=0;o<e.length;o++){const s=e.charCodeAt(o)-fC;a+=s>>>1^-(s&1),n[o]=a}return n},hj=384,pj=[],ss=cp(go("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),gj=cp(go(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),mj="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",yj=(()=>{const e=ss.length-1,n=new Int32Array(e);for(let s=e-1;s>=0;s--){let u=1,c=s+1;for(let d=ss[s];d<ss[s+1];d++)u+=n[c],c+=n[c];n[s]=u}const a=new Int32Array(ss[e]);let o=0;for(let s=0;s<e;s++){let u=s+1;for(let c=ss[s];c<ss[s+1];c++)a[o++]=u,u+=n[u]}return a})(),vj=go("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),bj=cp(go("123333359346463635126536711576")),xj=go("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),Sj=go("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),wj=Ai("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),Rj=(()=>{const e=new Int32Array(319).fill(-1),n=Ai("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),a=Ai("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let o=0;o<n.length;o++)e[n[o]]=a[o];return e})(),Ej="container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map(e=>{const n=e.split(" "),a=n.shift();for(let o=0;o<n.length;o++)n[o]=a+n[o];return n}),rw=Ai("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),Cj=Ai("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>6ʰ22ʷʺʷʺʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"),Tj=Ai("02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}22
:22z22222222222G000qOVI00000{2<40000@00000G¦§000ª00000000000000021K¬«00®000000000000000000000222HGH_1¸222½2¾2222ÇÊ000°2±"),hC=new Int32Array(987),pC=new Int32Array(987),gC=new Int32Array(987);let ny="";const ry=new Int32Array(1022);{const e=new Map;let n=0,a=0;for(let o=0;o<rw.length;o++)for(const s of Ej[Tj[o]]){let u=e.get(s);u===void 0&&(u=n++,e.set(s,u),ry[u*2]=ny.length,ry[u*2+1]=s.length,ny+=s),hC[a]=rw[o],pC[a]=Cj[o],gC[a]=u,a++}}const Oj=Ai("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),Mj=cp(go("1::24444432:442:44:44>222222:44:4421322511111311111114")),Aj=Ai("24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222"),Dj=go("ij"),Nj=go(""),Ij=go("1"),jj="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var kj={GROUP_COUNT:hj,customValidatorNames:pj,edgeStart:ss,labelStart:gj,labelText:mj,edgeTarget:yj,nodeGroup:vj,nodeVlist:Rj,vlistPat:bj,vlistOps:xj,vlistRef:Sj,vlistGroup:wj,litAnchor:hC,litGroup:pC,litPool:gC,poolOffsets:ry,poolText:ny,adjGid:Oj,adjStart:Mj,adjTgt:Aj,patGid:Dj,patTgt:Nj,postfixLookupGroups:Ij,orderSensitiveModifiers:jj};const Pj="line"in new Error,ao=-1,is=-1,C0=(e,n,a)=>{let o=2166136261;for(let s=n;s<a;s++)o=Math.imul(o^e.charCodeAt(s),16777619);return o},Gf=(e,n,a)=>{const o=a-n;let s=Math.imul(o,2654435761)^e.charCodeAt(n);if(o>3){const u=o>>2,c=o>>1;s=Math.imul(s^e.charCodeAt(n+1)<<8^e.charCodeAt(n+2)<<16^e.charCodeAt(n+u),2246822507),s=Math.imul(s^e.charCodeAt(n+c)<<8^e.charCodeAt(n+c+u)<<16^e.charCodeAt(a-3),3266489909),s^=e.charCodeAt(a-2)<<8^e.charCodeAt(a-1)<<16;for(let d=n+3,p=a-4;d<n+8&&d<p;d++,p--)s=Math.imul(s^e.charCodeAt(d)^e.charCodeAt(p)<<8,16777619)}return s^s>>>15|0},Lj=(e,n,a={})=>{const{GROUP_COUNT:o,edgeStart:s,labelStart:u,labelText:c,edgeTarget:d,nodeGroup:p,nodeVlist:g,vlistPat:y,vlistOps:h,vlistRef:b,vlistGroup:x,litAnchor:w,litGroup:C,litPool:R,poolOffsets:T,poolText:O,adjGid:M,adjStart:A,adjTgt:I,patGid:j,patTgt:k,postfixLookupGroups:D,customValidatorNames:z,orderSensitiveModifiers:F}=e,G=new Int32Array(o).fill(-1);for(let he=0;he<M.length;he++)G[M[he]]=he;let J=0;for(let he=0;he+1<A.length;he++){const Ae=A[he+1]-A[he];Ae>J&&(J=Ae)}let Y=32;for(;Y<2*(1+J+j.length);)Y<<=1;const U=new Int32Array(b.length+1);for(let he=0;he<b.length;he++)U[he+1]=U[he]+y[b[he]+1]-y[b[he]];const _=new Uint8Array(o);for(let he=0;he<D.length;he++)_[D[he]]=1;const L=s.length-1,$=new Uint8Array(L);let K=0,V=!0;for(let he=0;he<w.length;he++){$[w[he]]=1;const Ae=T[R[he]*2+1];Ae>K&&(K=Ae);const Se=O.charCodeAt(T[R[he]*2]);(Se===91||Se===40)&&(V=!1)}let X=1;for(;X<w.length*2;)X<<=1;const ee=new Int32Array(X).fill(-1);for(let he=0;he<w.length;he++){const Ae=T[R[he]*2];let Se=(C0(O,Ae,Ae+T[R[he]*2+1])^Math.imul(w[he],2654435761)|0)&X-1;for(;ee[Se]!==-1;)Se=Se+1&X-1;ee[Se]=he}const q=(he,Ae,Se,nt)=>{let Ct=(C0(Ae,Se,nt)^Math.imul(he,2654435761)|0)&X-1;const wt=nt-Se;for(;;){const zt=ee[Ct];if(zt===-1)return-1;if(w[zt]===he&&T[R[zt]*2+1]===wt){const vn=T[R[zt]*2];let fn=!0;for(let mt=0;mt<wt;mt++)if(O.charCodeAt(vn+mt)!==Ae.charCodeAt(Se+mt)){fn=!1;break}if(fn)return C[zt]}Ct=Ct+1&X-1}},se=a.cacheSize??8192,N=a.prefix??e.prefix??"",B=N===""?"":N+":",W=B.length,re=(z??[]).map(he=>{throw new Error("cn: missing validator "+he)}),Re=/\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$/,le=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,me=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ge=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let ce=0,Te=-1,ve=-1,Pe=-1,Me=-1;const Le=he=>he>=97&&he<=122||he>=65&&he<=90||he>=48&&he<=57||he===95,Fe=he=>/\s/.test(String.fromCharCode(he)),Oe=(he,Ae,Se)=>{if(ce=0,Te=-1,Se-Ae<3)return;const nt=he.charCodeAt(Ae),Ct=he.charCodeAt(Se-1);if(nt===91&&Ct===93)ce=1;else if(nt===40&&Ct===41)ce=2;else return;Pe=Ae+1,Me=Se-1;let wt=Ae+1;if(Le(he.charCodeAt(wt))){for(wt++;wt<Se-1;){const zt=he.charCodeAt(wt);if(!Le(zt)&&zt!==45)break;wt++}wt<Se-2&&he.charCodeAt(wt)===58&&(Te=Ae+1,ve=wt,Pe=wt+1)}},He=(he,Ae,Se,nt)=>{if(Se-Ae!==nt.length)return!1;for(let Ct=0;Ct<nt.length;Ct++)if(he.charCodeAt(Ae+Ct)!==nt.charCodeAt(Ct))return!1;return!0},be=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ze=he=>!!he&&!Number.isNaN(Number(he)),it=(he,Ae,Se)=>{if(Se-Ae<11||!He(he,Ae,Ae+10,"@container"))return!1;if(he.charCodeAt(Ae+10)===47)return Se-Ae>=12;const nt=he.charCodeAt(Ae+11);return nt===115&&Se-Ae>=17&&He(he,Ae+10,Ae+16,"-size/")||nt===110&&Se-Ae>=19&&He(he,Ae+10,Ae+18,"-normal/")},de=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],we="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(he=>he.split(" ")),Ke=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],De=(he,Ae,Se,nt)=>{if(he>=10){if(he>=25)return re[he-25](Ae.slice(Se,nt));const Ct=he-10;if(ce!==de[Ct])return!1;if(Te>=0){for(const wt of we[Ct])if(He(Ae,Te,ve,wt))return!0;return!1}switch(Ke[Ct]){case 0:return!1;case 1:return!0;case 2:{const wt=Ae.slice(Pe,Me);return Re.test(wt)&&!le.test(wt)}case 3:return Ze(Ae.slice(Pe,Me));case 4:return ge.test(Ae.slice(Pe,Me));default:return me.test(Ae.slice(Pe,Me))}}switch(he){case 0:return!0;case 1:return ce===0;case 2:return ce===1;case 3:return ce===2;case 4:return be.test(Ae.slice(Se,nt));case 5:return Ze(Ae.slice(Se,nt));case 6:{const Ct=Ae.slice(Se,nt);return!!Ct&&Number.isInteger(Number(Ct))}case 7:return nt>Se&&Ae.charCodeAt(nt-1)===37&&Ze(Ae.slice(Se,nt-1));case 8:return Ue.test(Ae.slice(Se,nt));default:return it(Ae,Se,nt)}},Ie=new Set(typeof F=="string"?F.split(" "):F),yt=(he,Ae,Se,nt,Ct,wt)=>{const zt=C0(Ae,Se,nt)^(Ct?2654435769:0)|0;let vn=he.get(zt);if(vn!==void 0)e:for(let At=0;At<vn.length;At++){const an=vn[At];if(!(an.imp!==Ct||an.k.length!==nt-Se)){for(let pt=0;pt<an.k.length;pt++)if(an.k.charCodeAt(pt)!==Ae.charCodeAt(Se+pt))continue e;return an.id}}else he.set(zt,vn=[]);const fn=Ae.slice(Se,nt),mt=wt(fn);return vn.push({k:fn,imp:Ct,id:mt}),mt};let ut=new Map,ht=new Map,Ot=2;const Dt=4096,Jt=(he,Ae)=>{const Se=[];let nt=0,Ct=0,wt=0;for(let mt=0;mt<he.length;mt++){const At=he.charCodeAt(mt);nt===0&&Ct===0&&At===58?(Se.push(he.slice(wt,mt)),wt=mt+1):At===91?nt++:At===93?nt--:At===40?Ct++:At===41&&Ct--}Se.push(he.slice(wt));let zt=Se[0];if(Se.length>1){const mt=[];let At=[];for(const an of Se)an.charCodeAt(0)===91||Ie.has(an)?(At.length&&(mt.push(...At.sort()),At=[]),mt.push(an)):At.push(an);At.length&&mt.push(...At.sort()),zt=mt.join(":")}const vn=Ae?zt+" !":zt;let fn=ht.get(vn);return fn===void 0&&ht.set(vn,fn=Ot++),fn};let rn=new Map,Wt=o;const We=o+4096,xt=()=>Wt++,$t=2097152,ft=8192,vt=new Int32Array(ft),gt=new Array(ft).fill(null),Lt=new Int32Array(ft),un=new Int32Array(ft),je=new Uint8Array(ft);let ot=0;const ke=(he,Ae,Se,nt,Ct,wt,zt,vn)=>{let fn=he;if(gt[he]!==null)if(gt[he|1]===null)fn=he|1;else if((ot++&3)===0)fn=he|ot>>2&1;else return;gt[fn]=Ae.slice(Se,nt),vt[fn]=Ct,Lt[fn]=wt,un[fn]=zt,je[fn]=vn},ze=()=>gt.fill(null);let Ge=256,et=[new Int32Array(Ge),new Int32Array(Ge),new Int32Array(Ge),new Int32Array(Ge)],[Et,H,Z,ne]=et,ye=new Uint8Array(Ge),xe=new Uint8Array(Ge);const qe=()=>{Ge*=2,et=et.map(Ae=>{const Se=new Int32Array(Ge);return Se.set(Ae),Se}),[Et,H,Z,ne]=et;const he=new Uint8Array(Ge);he.set(ye),ye=he,xe=new Uint8Array(Ge)};let Ve=64,Xe=new Int32Array(Ve),$e=new Int32Array(Ve);const st=new Int32Array(o);let tt=2048,St=21,ct=new Float64Array(tt),Bt=new Int32Array(tt),Ht=0;const On=(he,Ae)=>{if(he===0&&Ae<o)return st[Ae]===Ht?1:(st[Ae]=Ht,0);const Se=he*2097152+Ae+1;let nt=Math.imul(Se,2654435761)>>>St;for(;Bt[nt]===Ht;){if(ct[nt]===Se)return 1;nt=nt+1&tt-1}return ct[nt]=Se,Bt[nt]=Ht,0},Vt=(he,Ae,Se,nt,Ct)=>{if(Se-Ae>=2&&he.charCodeAt(Ae)===91&&he.charCodeAt(Se-1)===93){let wt=-1;for(let zt=Ae+1;zt<Se-1;zt++)if(he.charCodeAt(zt)===58){wt=zt;break}return wt===-1||wt===Ae+1?ao:yt(rn,he,Ae+1,wt,0,xt)}if(nt>=0&&p[nt]>=0)return p[nt];for(let wt=Ct-1;wt>=0;wt--){const zt=$e[wt];if(zt>Se)continue;const vn=Xe[wt],fn=Se-zt;if($[vn]===1&&fn>0&&fn<=K){const Ln=he.charCodeAt(zt);if(V===!1||Ln!==91&&Ln!==40){const Zr=q(vn,he,zt,Se);if(Zr>=0)return Zr}}const mt=g[vn];if(mt<0)continue;const At=b[mt],an=y[At],pt=y[At+1];if(an===pt)continue;Oe(he,zt,Se);const nr=U[mt]-an;for(let Ln=an;Ln<pt;Ln++)if(De(h[Ln],he,zt,Se))return x[nr+Ln]}return ao},Ut=he=>{const Ae=he.length;let Se=0,nt=0,Ct=!1;(Ot>Dt||ut.size>Dt)&&(ut=new Map,ht=new Map,Ot=2,ze()),Wt>We&&(rn=new Map,Wt=o,ze());let wt=0;for(;wt<Ae;){let mt=he.charCodeAt(wt);if(mt===32||mt>=9&&mt<=13||mt>=160&&Fe(mt)){mt!==32&&(Ct=!0),wt++;continue}const At=wt;let an=0;for(;wt<Ae;){if(mt=he.charCodeAt(wt),mt<=32){if(mt===32)break;if(mt>=9&&mt<=13){Ct=!0;break}}else if(mt>=160&&Fe(mt)){Ct=!0;break}an=Math.imul(an^mt,16777619),wt++}const pt=wt,nr=pt-At;Se===Ge&&qe();const Ln=Se++;Et[Ln]=At,H[Ln]=pt,nt+=nr,an^=Math.imul(nr,2654435761);const Zr=an^an>>>15|0,Gn=Zr&8190;{let en=-1;if(vt[Gn]===Zr&>[Gn]!==null&>[Gn].length===nr?en=Gn:vt[Gn|1]===Zr&>[Gn|1]!==null&>[Gn|1].length===nr&&(en=Gn|1),en>=0){const or=gt[en];let ga=!0;for(let ea=0;ea<nr;ea++)if(or.charCodeAt(ea)!==he.charCodeAt(At+ea)){ga=!1;break}if(ga){Z[Ln]=Lt[en],ne[Ln]=un[en],ye[Ln]=je[en];continue}}}let $n=At;if(W!==0){if(pt-At<=W||!he.startsWith(B,At)){Z[Ln]=ao,ke(Gn,he,At,pt,Zr,ao,0,0);continue}$n=At+W}let Os=0,Zl=0,bo=-1,Ms=-1;for(let en=$n;en<pt;en++){const or=he.charCodeAt(en);if(Os===0&&Zl===0){if(or===58){bo=en;continue}if(or===47){Ms=en;continue}}or===91?Os++:or===93?Os--:or===40?Zl++:or===41&&Zl--}const Jc=bo>=$n?bo+1:$n;let Nn=Jc,wr=pt,Yo=!1,As=0;wr>Nn&&he.charCodeAt(wr-1)===33?(Yo=!0,wr--):wr>Nn&&he.charCodeAt(Nn)===33&&(Yo=!0,Nn++,As=1);let Hr=-1;Ms>Jc&&(Hr=Ms+As,Hr>=wr&&(Hr=-1));let Ds=Nn;wr-Nn>1&&he.charCodeAt(Nn)===45&&(Ds=Nn+1);let Jr=0,Mr=0,Ko=0,Jl=-1,Wr=0;(g[0]>=0||$[0]===1)&&(Xe[0]=0,$e[0]=Ds,Wr=1);let ki=is,Wl=0;for(let en=Ds;en<wr;en++)if(en===Hr&&(ki=Mr<Ko?is:Jr,Wl=Wr),Jr!==is){const or=he.charCodeAt(en);let ga=-1;if(Mr<Ko)c.charCodeAt(Mr)===or?(Mr++,Mr===Ko&&(ga=Jr=Jl)):Jr=is;else{const ea=s[Jr],zi=s[Jr+1];let xo=is;for(let pr=ea;pr<zi;pr++){const _i=u[pr];if(c.charCodeAt(_i)===or){u[pr+1]-_i===1?ga=xo=d[pr]:(Mr=_i+1,Ko=u[pr+1],Jl=d[pr],xo=Jr);break}}Jr=xo}if(ga>=0&&(g[ga]>=0||$[ga]===1)&&en+1<wr&&he.charCodeAt(en+1)===45){if(Wr===Ve){Ve*=2;const ea=new Int32Array(Ve);ea.set(Xe),Xe=ea;const zi=new Int32Array(Ve);zi.set($e),$e=zi}Xe[Wr]=ga,$e[Wr]=en+2,Wr++}}Hr===wr&&(ki=Mr<Ko?is:Jr,Wl=Wr);const eu=Mr<Ko?is:Jr;let hr,Ar=!1;if(Hr>=0)if(Ar=!0,hr=Vt(he,Nn,Hr,ki,Wl),hr!==ao&&hr<o&&_[hr]){const en=Vt(he,Nn,wr,eu,Wr);en!==ao&&en!==hr&&(hr=en,Ar=!1)}else hr===ao&&(hr=Vt(he,Nn,wr,eu,Wr),Ar=!1);else hr=Vt(he,Nn,wr,eu,Wr);let Pi=0,Li=0;hr===ao?Z[Ln]=ao:(Li=Ar?1:0,Pi=$n>=bo?Yo?1:0:yt(ut,he,$n,bo,Yo?1:0,en=>Jt(en,Yo)),Z[Ln]=hr,ye[Ln]=Li,ne[Ln]=Pi),ke(Gn,he,At,pt,Zr,hr,Pi,Li)}if(Se===0)return"";if(Se===1)return Et[0]===0&&H[0]===Ae?he:he.slice(Et[0],H[0]);if(Se*Y>tt){for(;Se*Y>tt;)tt<<=1,St--;ct=new Float64Array(tt),Bt=new Int32Array(tt)}if(Ot>=$t||Wt>=$t)throw new Error("cn: too many distinct classes in one merge");Ht=Ht+1|0,Ht===0&&(st.fill(0),Bt.fill(0),Ht=1);let zt=!1;for(let mt=Se-1;mt>=0;mt--){const At=Z[mt];if(At===ao){xe[mt]=1;continue}const an=ne[mt];if(On(an,At)===1){xe[mt]=0,zt=!0;continue}if(xe[mt]=1,At<o){const pt=G[At];if(pt>=0)for(let nr=A[pt];nr<A[pt+1];nr++)On(an,I[nr]);if(ye[mt]&1)for(let nr=0;nr<j.length;nr++)j[nr]===At&&On(an,k[nr])}}if(!zt&&!Ct&&Ae===nt+Se-1)return he;let vn="",fn=0;for(;fn<Se;){if(!xe[fn]){fn++;continue}const mt=Et[fn];let At=H[fn],an=fn+1;for(;an<Se&&xe[an]&&Et[an]===At+1&&he.charCodeAt(At)===32;)At=H[an],an++;vn.length>0&&(vn+=" "),vn+=he.slice(mt,At),fn=an}return vn},En=16384,Cn=new Int32Array(En*2);let Xr=0,cn=1,dn=Object.create(null),Mn=Object.create(null),In=new Map,vo=new Map,Or=0,ja=0;const Qr=()=>{Xr^=En,cn=cn+1|0,ja=0},pa=he=>{let Ae=dn[he];if(Ae!==void 0)return Ae;const Se=Gf(he,0,he.length),nt=(Se&16383)+Xr,Ct=Cn[nt]===(Se^cn)||Cn[nt^En]===(Se^cn-1);return Ct&&(Ae=Mn[he],Ae!==void 0)?(dn[he]=Ae,Ae):(Ae=Ut(he),Ct?(dn[he]=Ae,++Or>se&&(Or=0,Mn=dn,dn=Object.create(null),Qr())):(Cn[nt]=Se^cn,++ja>En&&Qr()),Ae)},kt=he=>{let Ae=In.get(he);if(Ae!==void 0)return Ae;const Se=Gf(he,0,he.length),nt=(Se&16383)+Xr,Ct=Cn[nt]===(Se^cn)||Cn[nt^En]===(Se^cn-1);return Ct&&(Ae=vo.get(he),Ae!==void 0)?(In.set(he,Ae),Ae):(Ae=Ut(he),Ct?(In.set(he,Ae),++Or>se&&(Or=0,vo=In,In=new Map,Qr())):(Cn[nt]=Se^cn,++ja>En&&Qr()),Ae)},Yn=he=>{const Ae=Gf(he,0,he.length),Se=(Ae&16383)+Xr;return Cn[Se]===(Ae^cn)||Cn[Se^En]===(Ae^cn-1)?!0:(Cn[Se]=Ae^cn,++ja>En&&Qr(),!1)},Fn=se===0?Ut:Pj?he=>{const Ae=In.get(he);return Ae!==void 0?Ae:kt(he)}:pa;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?Fn(arguments[0]):Fn(_j.apply(null,arguments))},mergeString:Fn,seenBefore:se===0?()=>!1:Yn,mergeUncached:Ut}},gh=(e,n)=>{if(!e)return"";if(typeof e=="string")return e;let a="";if(typeof e.length=="number"&&(!n||Array.isArray(e))){const o=e;for(let s=0;s<o.length;s++){const u=o[s];if(!u)continue;const c=typeof u=="string"?u:gh(u,n);c&&(a&&(a+=" "),a+=c)}return a}if(n){if(typeof e=="number")return""+e;if(typeof e=="object")for(const o in e)e[o]&&(a&&(a+=" "),a+=o)}return a},zj=(e,n)=>{let a="";for(let o=0;o<e.length;o++){const s=e[o];if(!s)continue;const u=typeof s=="string"?s:gh(s,n);u&&(a&&(a+=" "),a+=u)}return a},_j=function(){return zj(arguments,!1)},Hj=256,aw=16,Uj=1024,T0=4096,Fj=(e,n)=>{const a=n===void 0?()=>!0:n.seenBefore,o=n===void 0?e:n.mergeUncached;let s=new Map,u=new Map,c=0,d=null,p=null,g=[],y=[],h=0;const b=(T,O,M)=>{p===null&&(p=new Array(T0).fill(""),g=new Array(T0).fill(""),y=new Array(T0).fill(""));const A=Gf(T,0,T.length)&4094;if(p[A]===T&&g[A]===O)return y[A];if(p[A|1]===T&&g[A|1]===O)return y[A|1];const I=e(M?O+" "+T:T),j=p[A]===""?A:A|(p[A|1]===""?1:h++&1);return p[j]=T,g[j]=O,y[j]=I,I},x=(T,O,M,A)=>{let I=0;if(O){if(O!==T.a0)return!1;I=1}if(M){if(M!==(I===0?T.a0:T.a1))return!1;I++}if(A){if(A!==(I===0?T.a0:I===1?T.a1:T.a2))return!1;I++}return I===T.t},w=(T,O)=>{const M=T.a;let A=0;for(let I=0;I<O.length;I++){const j=O[I];if(j){if(j!==M[A])return!1;A++}}return A===T.t},C=(T,O)=>{const M=T.length,A=d===null?null:d.n;if(!O){if(A!==null&&w(A,T))return d=A,A.r;if(d!==null&&d!==A&&w(d,T))return d.r}let I="",j=-1,k=0,D=!1;for(let G=0;G<M;G++){let J=T[G];if(J){if(typeof J!="string"){if(J=T[G]=gh(J,!0),!J)continue;D=!0}j<0&&(I=J,j=G),k++}}if(k===0)return"";if(k===1)return e(I);if(D){if(A!==null&&w(A,T))return d=A,A.r;if(d!==null&&d!==A&&w(d,T))return d.r}let z=s.get(I);z===void 0&&(z=u.get(I),z!==void 0&&s.set(I,z));let F=null;if(z!==void 0){if(z.skip>0){z.skip--,d=null;let J=I;for(let Y=j+1;Y<M;Y++){const U=T[Y];U&&(J+=" "+U)}return b(J,"",!1)}const G=z.e;e:for(let J=0;J<G.length;J++){const Y=G[J];if(Y.t!==k)continue;const U=Y.a;let _=1;for(let L=j+1;L<M;L++){const $=T[L];if($&&$!==U[_++])continue e}F=Y;break}F!==null&&(z.miss=0)}if(F===null){let G=I;const J=[I];for(let U=j+1;U<M;U++){const _=T[U];_&&(G+=" "+_,J.push(_))}if(!a(G))return o(G);F={r:e(G),t:J.length,a0:J[0],a1:J[1],a2:J[2]??"",a:J,n:null},z===void 0?s.set(I,z={e:[],miss:0,skip:0,at:0}):++z.miss>aw&&(z.miss=aw,z.skip=Uj,z.e.length=0,z.at=0);const Y=z.e;Y.length<Hj?Y.push(F):(Y[z.at]=F,z.at=z.at+1&255),++c>1e3&&(c=0,u=s,s=new Map)}return d!==null&&d!==F&&(d.n=F),d=F,F.r},R=T=>Array.isArray(T)?C(T.slice(),!1):e(gh(T,!0));return function(T,O,M){const A=arguments.length;if((A|1)===3){const k=d;if(k!==null){const D=k.n;if(D!==null&&x(D,T,O,M))return d=D,D.r;if(k!==D&&x(k,T,O,M))return k.r}if(A===2&&typeof O=="string"&&O!==""){const D=s.get(T);if(D!==void 0&&D.skip>0)return D.skip--,d=null,b(O,T,!0)}return C([T,O,M],!0)}if(A===1)return typeof T=="string"?e(T):R(T);const I=d;if(I!==null){const k=I.n;if(k!==null){const D=k.a;let z=0,F=!0;for(let G=0;G<A;G++){const J=arguments[G];if(J){if(J!==D[z]){F=!1;break}z++}}if(F&&z===k.t)return d=k,k.r}if(I!==k){const D=I.a;let z=0,F=!0;for(let G=0;G<A;G++){const J=arguments[G];if(J){if(J!==D[z]){F=!1;break}z++}}if(F&&z===I.t)return I.r}}const j=[];for(let k=0;k<A;k++)j.push(arguments[k]);return C(j,!0)}},ow=Lj(kj),Qe=Fj(ow.mergeString,ow);function Bj({delay:e=0,...n}){return S.jsx(dj,{"data-slot":"tooltip-provider",delay:e,...n})}function mh({...e}){return S.jsx(BI,{"data-slot":"tooltip",...e})}function yh({...e}){return S.jsx(KI,{"data-slot":"tooltip-trigger",...e})}function vh({className:e,side:n="top",sideOffset:a=4,align:o="center",alignOffset:s=0,children:u,...c}){return S.jsx(XI,{children:S.jsx(lj,{align:o,alignOffset:s,side:n,sideOffset:a,className:"isolate z-50",children:S.jsxs(uj,{"data-slot":"tooltip-content",className:Qe("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c,children:[u,S.jsx(cj,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 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 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"})]})})})}var Vj=(e,n,a,o,s,u,c,d)=>{let p=document.documentElement,g=["light","dark"];function y(x){(Array.isArray(e)?e:[e]).forEach(w=>{let C=w==="class",R=C&&u?s.map(T=>u[T]||T):s;C?(p.classList.remove(...R),p.classList.add(u&&u[x]?u[x]:x)):p.setAttribute(w,x)}),h(x)}function h(x){d&&g.includes(x)&&(p.style.colorScheme=x)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)y(o);else try{let x=localStorage.getItem(n)||a,w=c&&x==="system"?b():x;y(w)}catch{}},qj=v.createContext(void 0),Yj={setTheme:e=>{},themes:[]},Kj=()=>{var e;return(e=v.useContext(qj))!=null?e:Yj};v.memo(({forcedTheme:e,storageKey:n,attribute:a,enableSystem:o,enableColorScheme:s,defaultTheme:u,value:c,themes:d,nonce:p,scriptProps:g})=>{let y=JSON.stringify([a,n,u,e,d,c,o,s]).slice(1,-1);return v.createElement("script",{...g,suppressHydrationWarning:!0,nonce:typeof window>"u"?p:"",dangerouslySetInnerHTML:{__html:`(${Vj.toString()})(${y})`}})});function Gj(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",n.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}const $j=e=>{switch(e){case"success":return Zj;case"info":return Wj;case"warning":return Jj;case"error":return ek;default:return null}},Xj=Array(12).fill(0),Qj=({visible:e,className:n})=>Ne.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},Ne.createElement("div",{className:"sonner-spinner"},Xj.map((a,o)=>Ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),Zj=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Jj=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Wj=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ek=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),tk=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},Ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),nk=()=>{const[e,n]=Ne.useState(document.hidden);return Ne.useEffect(()=>{const a=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",a),()=>document.removeEventListener("visibilitychange",a)},[]),e};let rk=1;const ak=100,iw=e=>{var n;return typeof e?.id=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:rk++};class ok{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(a=>n(a)),()=>{const a=this.subscribers.indexOf(n);this.subscribers.splice(a,1)}),this.publish=n=>{this.subscribers.forEach(a=>a(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-ak;n<=0||(this.toasts=this.toasts.filter(a=>n>0&&this.dismissedToasts.has(a.id)?(this.dismissedToasts.delete(a.id),n--,!1):!0))},this.create=n=>{const{message:a,...o}=n,s=iw(n),u=this.pendingDismissals.get(s);u!==void 0&&(cancelAnimationFrame(u),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const c=this.dismissedToasts.has(s),d=n.dismissible===void 0?!0:n.dismissible;return c&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(g=>g.id!==s)),(c?void 0:this.toasts.find(g=>g.id===s))?this.toasts=this.toasts.map(g=>g.id===s?(this.publish({...g,...n,id:s,title:a}),{...g,...n,id:s,dismissible:d,title:a}):g):this.addToast({title:a,...o,dismissible:d,id:s}),s},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(o=>{this.dismissedToasts.add(o.id),this.subscribers.forEach(s=>s({id:o.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const a=this.pendingDismissals.get(n);return a!==void 0&&cancelAnimationFrame(a),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(o=>o({id:n,dismiss:!0}))})),n},this.message=(n,a)=>this.create({...a,message:n,type:void 0}),this.error=(n,a)=>this.create({...a,message:n,type:"error"}),this.success=(n,a)=>this.create({...a,type:"success",message:n}),this.info=(n,a)=>this.create({...a,type:"info",message:n}),this.warning=(n,a)=>this.create({...a,type:"warning",message:n}),this.loading=(n,a)=>this.create({...a,type:"loading",message:n}),this.promise=(n,a)=>{if(!a)return;let o;a.loading!==void 0&&(o=this.create({...a,promise:n,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let u=o!==void 0,c;const d=s.then(async g=>{if(c=["resolve",g],Ne.isValidElement(g))u=!1,this.create({id:o,type:"default",message:g});else if(sk(g)&&!g.ok){u=!1;const h=typeof a.error=="function"?await a.error(`HTTP error! status: ${g.status}`):a.error,b=typeof a.description=="function"?await a.description(`HTTP error! status: ${g.status}`):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"error",description:b,...w})}else if(g instanceof Error){u=!1;const h=typeof a.error=="function"?await a.error(g):a.error,b=typeof a.description=="function"?await a.description(g):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"error",description:b,...w})}else if(a.success!==void 0){u=!1;const h=typeof a.success=="function"?await a.success(g):a.success,b=typeof a.description=="function"?await a.description(g):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"success",description:b,...w})}}).catch(async g=>{if(c=["reject",g],a.error!==void 0){u=!1;const y=typeof a.error=="function"?await a.error(g):a.error,h=typeof a.description=="function"?await a.description(g):a.description,x=typeof y=="object"&&!Ne.isValidElement(y)?y:{message:y};this.create({id:o,type:"error",description:h,...x})}}).finally(()=>{u&&(this.dismiss(o),o=void 0),a.finally==null||a.finally.call(a)}),p=()=>new Promise((g,y)=>d.then(()=>c[0]==="reject"?y(c[1]):g(c[1])).catch(y));return typeof o!="string"&&typeof o!="number"?{unwrap:p}:Object.assign(o,{unwrap:p})},this.custom=(n,a)=>{const o=iw(a);return this.create({...a,jsx:n(o),id:o,type:void 0}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Yr=new ok,ik=(e,n)=>Yr.message(e,n),sk=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",lk=ik,uk=()=>Yr.toasts,ck=()=>Yr.getActiveToasts(),_n=Object.assign(lk,{success:Yr.success,info:Yr.info,warning:Yr.warning,error:Yr.error,custom:Yr.custom,message:Yr.message,promise:Yr.promise,dismiss:Yr.dismiss,loading:Yr.loading},{getHistory:uk,getToasts:ck});Gj("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Of(e){return e.label!==void 0}const dk=3,fk="24px",hk="16px",sw=4e3,pk=356,gk=14,mk=45,yk=200;function oo(...e){return e.filter(Boolean).join(" ")}function vk(e){const[n,a]=e.split("-"),o=[];return n&&o.push(n),a&&o.push(a),o}const bk=e=>{var n,a,o,s,u,c,d,p,g;const{invert:y,toast:h,unstyled:b,interacting:x,setHeights:w,visibleToasts:C,heights:R,index:T,toasts:O,expanded:M,removeToast:A,defaultRichColors:I,closeButton:j,style:k,cancelButtonStyle:D,actionButtonStyle:z,className:F="",descriptionClassName:G="",duration:J,position:Y,gap:U,expandByDefault:_,classNames:L,icons:$,closeButtonAriaLabel:K="Close toast"}=e,[V,X]=Ne.useState(null),[ee,q]=Ne.useState(null),[se,N]=Ne.useState(!1),[B,W]=Ne.useState(!1),[re,Re]=Ne.useState(!1),[le,me]=Ne.useState(!1),[ge,ce]=Ne.useState(!1),[Te,ve]=Ne.useState(0),[Pe,Me]=Ne.useState(0),Le=Ne.useRef(h.duration||J||sw),Fe=Ne.useRef(null),Oe=Ne.useRef(null),He=T===0,be=T+1<=C,Ue=h.type,Ze=Ue??"default",it=h.dismissible!==!1,de=h.className||"",we=h.descriptionClassName||"",Ke=Ne.useMemo(()=>R.findIndex(je=>je.toastId===h.id)||0,[R,h.id]),De=Ne.useMemo(()=>{var je;return(je=h.closeButton)!=null?je:j},[h.closeButton,j]),Ie=Ne.useMemo(()=>h.duration||J||sw,[h.duration,J]),yt=Ne.useRef(0),ut=Ne.useRef(0),ht=Ne.useRef(0),Ot=Ne.useRef(null),[Dt,Jt]=Y.split("-"),rn=Ne.useMemo(()=>R.reduce((je,ot,ke)=>ke>=Ke?je:je+ot.height,0),[R,Ke]),Wt=nk(),We=Ne.useMemo(()=>{var je;return(je=e.swipeDirections)!=null?je:vk(Y)},[e.swipeDirections,Y]),xt=h.invert||y,$t=Ue==="loading";ut.current=Ne.useMemo(()=>Ke*U+rn,[Ke,rn]),Ne.useEffect(()=>{Le.current=Ie},[Ie]),Ne.useEffect(()=>{N(!0)},[]),Ne.useEffect(()=>{const je=Oe.current;if(je){const ot=je.getBoundingClientRect().height;return Me(ot),w(ke=>[{toastId:h.id,height:ot,position:h.position},...ke]),()=>w(ke=>ke.filter(ze=>ze.toastId!==h.id))}},[w,h.id]),Ne.useLayoutEffect(()=>{if(!se)return;const je=Oe.current,ot=je.style.height;je.style.height="auto";const ke=je.getBoundingClientRect().height;je.style.height=ot,Me(ke),w(ze=>ze.find(et=>et.toastId===h.id)?ze.map(et=>et.toastId===h.id?{...et,height:ke}:et):[{toastId:h.id,height:ke,position:h.position},...ze])},[se,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ft=Ne.useCallback(()=>{W(!0),ve(ut.current),w(je=>je.filter(ot=>ot.toastId!==h.id)),setTimeout(()=>{A(h)},yk)},[h,A,w,ut]);Ne.useEffect(()=>{if(h.promise&&Ue==="loading"||h.duration===1/0||h.type==="loading")return;let je;return M||x||Wt?(()=>{if(ht.current<yt.current){const ze=new Date().getTime()-yt.current;Le.current=Le.current-ze}ht.current=new Date().getTime()})():Le.current!==1/0&&(yt.current=new Date().getTime(),je=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ft()},Le.current)),()=>clearTimeout(je)},[M,x,h,Ue,Wt,ft]),Ne.useEffect(()=>{h.delete&&(ft(),h.onDismiss==null||h.onDismiss.call(h,h))},[ft,h.delete]);function vt(){var je;if($?.loading){var ot;return Ne.createElement("div",{className:oo(L?.loader,h==null||(ot=h.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Ue==="loading"},$.loading)}return Ne.createElement(Qj,{className:oo(L?.loader,h==null||(je=h.classNames)==null?void 0:je.loader),visible:Ue==="loading"})}const gt=h.icon||$?.[Ue]||$j(Ue);var Lt,un;return Ne.createElement("li",{tabIndex:0,ref:Oe,className:oo(F,de,L?.toast,h==null||(n=h.classNames)==null?void 0:n.toast,L?.[Ze],h==null||(a=h.classNames)==null?void 0:a[Ze]),"data-sonner-toast":"","data-rich-colors":(Lt=h.richColors)!=null?Lt:I,"data-styled":!(h.jsx||h.unstyled||b),"data-mounted":se,"data-promise":!!h.promise,"data-swiped":ge,"data-removed":B,"data-visible":be,"data-y-position":Dt,"data-x-position":Jt,"data-index":T,"data-front":He,"data-swiping":re,"data-dismissible":it,"data-type":Ue,"data-invert":xt,"data-swipe-out":le,"data-swipe-direction":ee,"data-expanded":!!(M||_&&se),"data-testid":h.testId,style:{"--index":T,"--toasts-before":T,"--z-index":O.length-T,"--offset":`${B?Te:ut.current}px`,"--initial-height":_?"auto":`${Pe}px`,...k,...h.style},onDragEnd:()=>{Re(!1),X(null),Ot.current=null},onPointerDown:je=>{je.button!==2&&($t||!it||(Fe.current=new Date,ve(ut.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(Re(!0),Ot.current={x:je.clientX,y:je.clientY})))},onPointerUp:()=>{var je,ot,ke;if(le||!it)return;Ot.current=null;const ze=Number(((je=Oe.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ge=Number(((ot=Oe.current)==null?void 0:ot.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((ke=Fe.current)==null?void 0:ke.getTime()),Et=V==="x"?ze:Ge,H=Math.abs(Et)/et;if((V==="x"?We.includes(ze>0?"right":"left"):We.includes(Ge>0?"bottom":"top"))&&(Math.abs(Et)>=mk||H>.11)){ve(ut.current),h.onDismiss==null||h.onDismiss.call(h,h),q(V==="x"?ze>0?"right":"left":Ge>0?"down":"up"),ft(),me(!0);return}else{var ne,ye;(ne=Oe.current)==null||ne.style.setProperty("--swipe-amount-x","0px"),(ye=Oe.current)==null||ye.style.setProperty("--swipe-amount-y","0px")}ce(!1),Re(!1),X(null)},onPointerMove:je=>{var ot,ke,ze;if(!Ot.current||!it||((ot=window.getSelection())==null?void 0:ot.toString().length)>0)return;const et=je.clientY-Ot.current.y,Et=je.clientX-Ot.current.x;!V&&(Math.abs(Et)>1||Math.abs(et)>1)&&X(Math.abs(Et)>Math.abs(et)?"x":"y");let H={x:0,y:0};const Z=ne=>1/(1.5+Math.abs(ne)/20);if(V==="y"){if(We.includes("top")||We.includes("bottom"))if(We.includes("top")&&et<0||We.includes("bottom")&&et>0)H.y=et;else{const ne=et*Z(et);H.y=Math.abs(ne)<Math.abs(et)?ne:et}}else if(V==="x"&&(We.includes("left")||We.includes("right")))if(We.includes("left")&&Et<0||We.includes("right")&&Et>0)H.x=Et;else{const ne=Et*Z(Et);H.x=Math.abs(ne)<Math.abs(Et)?ne:Et}(Math.abs(H.x)>0||Math.abs(H.y)>0)&&ce(!0),(ke=Oe.current)==null||ke.style.setProperty("--swipe-amount-x",`${H.x}px`),(ze=Oe.current)==null||ze.style.setProperty("--swipe-amount-y",`${H.y}px`)}},De&&!h.jsx&&Ue!=="loading"?Ne.createElement("button",{"aria-label":K,"data-disabled":$t,"data-close-button":!0,onClick:$t||!it?()=>{}:()=>{ft(),h.onDismiss==null||h.onDismiss.call(h,h)},className:oo(L?.closeButton,h==null||(o=h.classNames)==null?void 0:o.closeButton)},(un=$?.close)!=null?un:tk):null,(Ue||h.icon||h.promise)&&h.icon!==null&&($?.[Ue]!==null||h.icon)?Ne.createElement("div",{"data-icon":"",className:oo(L?.icon,h==null||(s=h.classNames)==null?void 0:s.icon)},Ue==="loading"?h.icon||vt():h.promise?vt():null,Ue!=="loading"?gt:null):null,Ne.createElement("div",{"data-content":"",className:oo(L?.content,h==null||(u=h.classNames)==null?void 0:u.content)},Ne.createElement("div",{"data-title":"",className:oo(L?.title,h==null||(c=h.classNames)==null?void 0:c.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?Ne.createElement("div",{"data-description":"",className:oo(G,we,L?.description,h==null||(d=h.classNames)==null?void 0:d.description)},typeof h.description=="function"?h.description():h.description):null),Ne.isValidElement(h.cancel)?h.cancel:h.cancel&&Of(h.cancel)?Ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||D,onClick:je=>{Of(h.cancel)&&it&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,je),ft())},className:oo(L?.cancelButton,h==null||(p=h.classNames)==null?void 0:p.cancelButton)},h.cancel.label):null,Ne.isValidElement(h.action)?h.action:h.action&&Of(h.action)?Ne.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:je=>{Of(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,je),!je.defaultPrevented&&ft())},className:oo(L?.actionButton,h==null||(g=h.classNames)==null?void 0:g.actionButton)},h.action.label):null)};function lw(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function xk(e,n){const a={};return[e,n].forEach((o,s)=>{const u=s===1,c=u?"--mobile-offset":"--offset",d=u?hk:fk;function p(g){["top","right","bottom","left"].forEach(y=>{a[`${c}-${y}`]=typeof g=="number"?`${g}px`:g})}typeof o=="number"||typeof o=="string"?p(o):typeof o=="object"?["top","right","bottom","left"].forEach(g=>{o[g]===void 0?a[`${c}-${g}`]=d:a[`${c}-${g}`]=typeof o[g]=="number"?`${o[g]}px`:o[g]}):p(d)}),a}const Sk=Ne.forwardRef(function(n,a){const{id:o,invert:s,position:u="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:p,className:g,offset:y,mobileOffset:h,theme:b="light",richColors:x,duration:w,style:C,visibleToasts:R=dk,toastOptions:T,dir:O=lw(),gap:M=gk,icons:A,customAriaLabel:I,containerAriaLabel:j="Notifications"}=n,[k,D]=Ne.useState([]),z=Ne.useMemo(()=>o?k.filter(N=>N.toasterId===o):k.filter(N=>!N.toasterId),[k,o]),F=Ne.useMemo(()=>Array.from(new Set([u].concat(z.filter(N=>N.position).map(N=>N.position)))),[z,u]),[G,J]=Ne.useState([]),[Y,U]=Ne.useState(!1),[_,L]=Ne.useState(!1),[$,K]=Ne.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=Ne.useRef(null),X=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=Ne.useRef(null),q=Ne.useRef(!1),se=Ne.useCallback(N=>{D(B=>{var W;return(W=B.find(re=>re.id===N.id))!=null&&W.delete||Yr.dismiss(N.id),B.filter(({id:re})=>re!==N.id)})},[]);return Ne.useEffect(()=>Yr.subscribe(N=>{if(N.dismiss){requestAnimationFrame(()=>{D(B=>B.map(W=>W.id===N.id?{...W,delete:!0}:W))});return}setTimeout(()=>{l3.flushSync(()=>{D(B=>{const W=B.findIndex(re=>re.id===N.id);return W!==-1?[...B.slice(0,W),{...B[W],...N},...B.slice(W+1)]:[N,...B]})})})}),[]),Ne.useEffect(()=>{if(b!=="system"){K(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;const N=window.matchMedia("(prefers-color-scheme: dark)");try{N.addEventListener("change",({matches:B})=>{K(B?"dark":"light")})}catch{N.addListener(({matches:W})=>{try{K(W?"dark":"light")}catch(re){console.error(re)}})}},[b]),Ne.useEffect(()=>{k.length<=1&&U(!1)},[k]),Ne.useEffect(()=>{const N=B=>{var W;if(c.length>0&&c.every(le=>B[le]||B.code===le)){var Re;U(!0),(Re=V.current)==null||Re.focus()}B.code==="Escape"&&(document.activeElement===V.current||(W=V.current)!=null&&W.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[c]),Ne.useEffect(()=>{if(V.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,q.current=!1)}},[V.current]),Ne.createElement("section",{ref:a,"aria-label":I??`${j} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},F.map((N,B)=>{var W;const[re,Re]=N.split("-");return z.length?Ne.createElement("ol",{key:N,dir:O==="auto"?lw():O,tabIndex:-1,ref:V,className:g,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":re,"data-x-position":Re,style:{"--front-toast-height":`${((W=G[0])==null?void 0:W.height)||0}px`,"--width":`${pk}px`,"--gap":`${M}px`,...C,...xk(y,h)},onBlur:le=>{q.current&&!le.currentTarget.contains(le.relatedTarget)&&(q.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||q.current||(q.current=!0,ee.current=le.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{_||U(!1)},onDragEnd:()=>U(!1),onPointerDown:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},z.filter(le=>!le.position&&B===0||le.position===N).map((le,me)=>{var ge,ce;return Ne.createElement(bk,{key:le.id,icons:A,index:me,toast:le,defaultRichColors:x,duration:(ge=T?.duration)!=null?ge:w,className:T?.className,descriptionClassName:T?.descriptionClassName,invert:s,visibleToasts:R,closeButton:(ce=T?.closeButton)!=null?ce:p,interacting:_,position:N,style:T?.style,unstyled:T?.unstyled,classNames:T?.classNames,cancelButtonStyle:T?.cancelButtonStyle,actionButtonStyle:T?.actionButtonStyle,closeButtonAriaLabel:T?.closeButtonAriaLabel,removeToast:se,toasts:z.filter(Te=>Te.position==le.position),heights:G.filter(Te=>Te.position==le.position),setHeights:J,expandByDefault:d,gap:M,expanded:Y,swipeDirections:n.swipeDirections})})):null}))}),wk=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join("-").toLowerCase();function Rk(e,n,a=[]){if(n==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:wk(e),size:24,node:n,...a.length>0?{aliases:a}:{}}}const Ek=e=>{let n="",a=!1;for(const o of e){if(o==="-"||o==="_"||o<=" "){a=n.length>0;continue}n.length===0?n+=o.toLowerCase():n+=a?o.toUpperCase():o,a=!1}return n},Ck=e=>{const n=Ek(e);return n.charAt(0).toUpperCase()+n.slice(1)},ay=(...e)=>{const n=new Set;for(const a of e)if(typeof a=="string")for(const o of a.split(/\s+/))o&&n.add(o);return[...n].join(" ")},fl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function O0(e){return e!=null}function Tk(e,n={}){const a=n.attributeNames??{},o=b=>a[b]??b,s=e.size??e.width??fl.width,u=e.size??e.height??fl.height,c=e.aliases?.filter(b=>typeof b=="string"&&b.trim()!=="").map(b=>`lucide-${b}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...c],p=n.className?.split(" ").filter(Boolean)??[],g=n.includeDefaultClasses===!1?ay(...p):ay("lucide",...d,...p);let y=n.strokeWidth??fl["stroke-width"];if(n.absoluteStrokeWidth){const b=Number(y)*Number(e.size??e.width??fl.width)/Number(n.size??n.width??fl.width);Number.isFinite(b)&&(y=b)}return["svg",{...Object.entries(fl).reduce((b,[x,w])=>(b[o(x)]=w,b),{}),..."color"in n&&n.color&&{[o("stroke")]:n.color},..."size"in n&&O0(n.size)&&{[o("width")]:n.size,[o("height")]:n.size},..."width"in n&&O0(n.width)&&{[o("width")]:n.width},..."height"in n&&O0(n.height)&&{[o("height")]:n.height},[o("stroke-width")]:y,...g&&{[o("class")]:g},[o("viewBox")]:`0 0 ${s} ${u}`,...n.hasA11yProp===!1?{[o("aria-hidden")]:"true"}:{},..."attributes"in n&&n.attributes},e.node.map(b=>{const[x,w,C]=b,R=n.nonScalingStroke?{[o("vector-effect")]:"non-scaling-stroke",...w}:w;return C?[x,R,C]:[x,R]})]}function Ok(e,n={}){return Tk(e,{...n,attributeNames:{...n.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const Mk=e=>{if(e==null||typeof e!="object")return!1;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&(n.startsWith("aria-")||n==="role"||n==="title")&&e[n]!=null)return!0;return!1},Ak=v.createContext({}),Dk=()=>v.useContext(Ak),Nk=v.forwardRef(({color:e,size:n,width:a,height:o,strokeWidth:s,absoluteStrokeWidth:u,nonScalingStroke:c,className:d="",children:p,iconNode:g=[],icon:y={node:g,aliases:[],size:24},...h},b)=>{const{size:x=24,strokeWidth:w=2,absoluteStrokeWidth:C=!1,nonScalingStroke:R=!1,color:T="currentColor",className:O=""}=Dk()??{},M=!!p||Mk(h),[A,I,j=[]]=Ok(y,{color:e??T,width:a??n??x,height:o??n??x,strokeWidth:s??w,absoluteStrokeWidth:u??C,nonScalingStroke:c??R,className:ay(O,d),hasA11yProp:M,attributes:h});return v.createElement(A,{ref:b,...I},[...j.map(([k,D])=>v.createElement(k,D)),...Array.isArray(p)?p:[p]])});function Pt(e,n=[],a=[]){const o=typeof e=="string"?Rk(e,n,a):e,s=v.forwardRef(({className:u,...c},d)=>v.createElement(Nk,{ref:d,icon:o,className:u,...c}));return o.name&&(s.displayName=Ck(o.name)),s}const mC={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};mC.node;const Ik=Pt(mC),yC={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};yC.node;const jk=Pt(yC),vC={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};vC.node;const bC=Pt(vC),xC={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};xC.node;const dp=Pt(xC),SC={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};SC.node;const wC=Pt(SC),RC={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};RC.node;const kk=Pt(RC),EC={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};EC.node;const Pk=Pt(EC),CC={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};CC.node;const Lk=Pt(CC),TC={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};TC.node;const zk=Pt(TC),OC={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9 9.5a3 2.5 0 016 0c0 2-2 2-3 3.5",key:"1awbb0"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};OC.node;const _k=Pt(OC),MC={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};MC.node;const Hk=Pt(MC),AC={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};AC.node;const DC=Pt(AC),NC={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};NC.node;const Uk=Pt(NC),IC={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};IC.node;const Fk=Pt(IC),jC={name:"file-input",size:24,node:[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1",key:"1q9hii"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]};jC.node;const kC=Pt(jC),PC={name:"file-output",size:24,node:[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]]};PC.node;const LC=Pt(PC),zC={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};zC.node;const Bk=Pt(zC),_C={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};_C.node;const Vk=Pt(_C),HC={name:"gallery-vertical-end",size:24,node:[["path",{d:"M7 2h10",key:"nczekb"}],["path",{d:"M5 6h14",key:"u2x4p"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}]]};HC.node;const qk=Pt(HC),UC={name:"grip-vertical",size:24,node:[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]};UC.node;const sv=Pt(UC),FC={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};FC.node;const Yk=Pt(FC),BC={name:"languages",size:24,node:[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]};BC.node;const Kk=Pt(BC),VC={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};VC.node;const Gk=Pt(VC),qC={name:"library-big",size:24,node:[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]]};qC.node;const $k=Pt(qC),YC={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};YC.node;const Fl=Pt(YC),KC={name:"lock-keyhole",size:24,node:[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]};KC.node;const Xk=Pt(KC),GC={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};GC.node;const Qk=Pt(GC),$C={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};$C.node;const Zk=Pt($C),XC={name:"paintbrush",size:24,node:[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]};XC.node;const Jk=Pt(XC),QC={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};QC.node;const Wk=Pt(QC),ZC={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};ZC.node;const eP=Pt(ZC),JC={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};JC.node;const lv=Pt(JC),WC={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};WC.node;const tP=Pt(WC),eT={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};eT.node;const tT=Pt(eT),nT={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};nT.node;const nP=Pt(nT),rT={name:"settings",size:24,node:[["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"}]]};rT.node;const rP=Pt(rT),aT={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};aT.node;const aP=Pt(aT),oT={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};oT.node;const oP=Pt(oT),iT={name:"trash",size:24,node:[["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"}]],aliases:["trash-2"]};iT.node;const iP=Pt(iT),sT={name:"triangle-exclamation-point",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle","triangle-alert"]};sT.node;const sP=Pt(sT),lT={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};lT.node;const Rs=Pt(lT),lP=({...e})=>{const{theme:n="system"}=Kj();return S.jsx(Sk,{theme:n,className:"toaster group",icons:{success:S.jsx(zk,{className:"size-4"}),info:S.jsx(Yk,{className:"size-4"}),warning:S.jsx(sP,{className:"size-4"}),error:S.jsx(Zk,{className:"size-4"}),loading:S.jsx(Fl,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})},uT=v.createContext(void 0),Bo=e=>{const n=v.useContext(uT);if(e)return e;if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},uP=({client:e,children:n})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),S.jsx(uT.Provider,{value:e,children:n})),cP={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var dP=class{#e=cP;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}};const cs=new dP;function fP(e){setTimeout(e,0)}const hP=typeof window>"u"||"Deno"in globalThis;function kr(){}function pP(e,n){return typeof e=="function"?e(n):e}function cT(e){return typeof e=="number"&&e>=0&&e!==1/0}function dT(e,n){return Math.max(e+(n||0)-Date.now(),0)}function kn(e,n){return typeof e=="function"?e(n):e}function uw(e,n){const{type:a="all",exact:o,fetchStatus:s,predicate:u,queryKey:c,stale:d}=e;if(c){if(o){if(n.queryHash!==uv(c,n.options))return!1}else if(!Pl(n.queryKey,c))return!1}if(a!=="all"){const p=n.isActive();if(a==="active"&&!p||a==="inactive"&&p)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||s&&s!==n.state.fetchStatus||u&&!u(n))}function cw(e,n){const{exact:a,status:o,predicate:s,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(a){if(vs(n.options.mutationKey)!==vs(u))return!1}else if(!Pl(n.options.mutationKey,u))return!1}return!(o&&n.state.status!==o||s&&!s(n))}function uv(e,n){return(n?.queryKeyHashFn||vs)(e)}function vs(e){return JSON.stringify(e,(n,a)=>oy(a)?Object.keys(a).sort().reduce((o,s)=>(o[s]=a[s],o),{}):a)}function Pl(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){if(n.length>e.length)return!1;for(let o=0;o<n.length;o++)if(!Pl(e[o],n[o]))return!1;return!0}const a=Object.keys(n);for(const o of a)if(!Pl(e[o],n[o]))return!1;return!0}return!1}const gP=Object.prototype.hasOwnProperty;function cv(e,n,a=0){if(e===n)return e;if(a>500)return n;const o=dw(e)&&dw(n);if(!o&&!(oy(e)&&oy(n)))return n;const s=(o?e:Object.keys(e)).length,u=o?n:Object.keys(n),c=u.length,d=o?new Array(c):{};let p=0;for(let g=0;g<c;g++){const y=o?g:u[g],h=e[y],b=n[y];if(h===b){d[y]=h,(o?g<s:gP.call(e,y))&&p++;continue}if(h===null||b===null||typeof h!="object"||typeof b!="object"){d[y]=b;continue}const x=cv(h,b,a+1);d[y]=x,x===h&&p++}return s===c&&p===s?e:d}function $f(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const a in e)if(e[a]!==n[a])return!1;return!0}function dw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function oy(e){if(!fw(e))return!1;const n=Object.getPrototypeOf(e),a=n?.constructor;if(a===void 0)return!0;if(typeof a!="function")return!1;const o=a.prototype;return!(!fw(o)||!o.hasOwnProperty("isPrototypeOf")||n!==Object.prototype)}function fw(e){return Object.prototype.toString.call(e)==="[object Object]"}function mP(e){return new Promise(n=>{cs.setTimeout(n,e)})}function iy(e,n,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,n):a.structuralSharing!==!1?cv(e,n):n}function yP(e,n,a=0){const o=[...e,n];return a&&o.length>a?o.slice(1):o}function vP(e,n,a=0){const o=[n,...e];return a&&o.length>a?o.slice(0,-1):o}const dv=Symbol();function fT(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===dv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function fv(e,n){return typeof e=="function"?e(...n):!!e}function bP(e,n,a){let o=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=n(),o||(o=!0,s.aborted?a():s.addEventListener("abort",a,{once:!0})),s)}),e}let xP=()=>hP;const hv=()=>xP();var Bl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},SP=class extends Bl{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const pv=new SP,wP=fP;function RP(){let e=[],n=0,a=d=>{d()},o=d=>{d()},s=wP;const u=d=>{n?e.push(d):s(()=>{a(d)})},c=()=>{const d=e;e=[],d.length&&s(()=>{o(()=>{d.forEach(p=>{a(p)})})})};return{batch:d=>{let p;n++;try{p=d()}finally{n--,n||c()}return p},batchCalls:d=>(...p)=>{u(()=>{d(...p)})},schedule:u,setNotifyFunction:d=>{a=d},setBatchNotifyFunction:d=>{o=d},setScheduler:d=>{s=d}}}const Wn=RP();var EP=class extends Bl{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),a=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}};const bh=new EP;function CP(e){return Math.min(1e3*2**e,3e4)}function hT(e){return(e??"online")==="online"?bh.isOnline():!0}var sy=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function pT(e){let n=!1,a=0,o,s="pending",u,c;const d=new Promise((O,M)=>{u=O,c=M});d.catch(kr);const p=()=>s!=="pending",g=O=>{if(!p()){const M=new sy(O);C(M),e.onCancel?.(M)}},y=()=>{n=!0},h=()=>{n=!1},b=()=>pv.isFocused()&&(e.networkMode==="always"||bh.isOnline())&&e.canRun(),x=()=>hT(e.networkMode)&&e.canRun(),w=O=>{p()||(o?.(),s="resolved",u(O))},C=O=>{p()||(o?.(),s="rejected",c(O))},R=O=>new Promise(M=>{o=A=>{(p()||O())&&M(A)},e.onPause?.()}).then(()=>{o=void 0,p()||e.onContinue?.()}),T=()=>{if(p())return;let O;const M=a===0?e.initialPromise:void 0;try{O=M??e.fn()}catch(A){O=Promise.reject(A)}Promise.resolve(O).then(w).catch(A=>{if(p())return;const I=e.retry??(hv()?0:3),j=e.retryDelay??CP,k=typeof j=="function"?j(a,A):j,D=I===!0||typeof I=="number"&&a<I||typeof I=="function"&&I(a,A);if(n||!D){C(A);return}a++,e.onFail?.(a,A),mP(k).then(()=>b()?void 0:R(b)).then(()=>{n?C(A):T()})})};return{promise:d,status:()=>s,cancel:g,continue:()=>(o?.(),d),cancelRetry:y,continueRetry:h,canStart:x,start:()=>(x()?T():R(x).then(T),d)}}var gT=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cT(this.gcTime)&&(this.#e=cs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hv()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(cs.clearTimeout(this.#e),this.#e=void 0)}};function TP(e){return{onFetch:(n,a)=>{const o=n.options,s=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const g=async()=>{let y=!1;const h=w=>{bP(w,()=>n.signal,()=>y=!0)},b=fT(n.options,n.fetchOptions),x=async(w,C,R)=>{if(y)return Promise.reject(n.signal.reason);if(C==null&&w.pages.length)return Promise.resolve(w);const O=(()=>{const j={client:n.client,queryKey:n.queryKey,pageParam:C,direction:R?"backward":"forward",meta:n.options.meta};return h(j),j})(),M=await b(O),{maxPages:A}=n.options,I=R?vP:yP;return{pages:I(w.pages,M,A),pageParams:I(w.pageParams,C,A)}};if(s&&u.length){const w=s==="backward",C=w?OP:hw,R={pages:u,pageParams:c};d=await x(R,C(o,R),w)}else{const w=e??u.length;do{const C=p===0?c[0]===void 0?o.initialPageParam:c[0]:hw(o,d);if(p>0&&C==null)break;d=await x(d,C),p++}while(p<w)}return d};n.options.persister?n.fetchFn=()=>n.options.persister?.(g,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},a):n.fetchFn=g}}}function hw(e,{pages:n,pageParams:a}){const o=n.length-1;return n.length>0?e.getNextPageParam(n[o],n,a[o],a):void 0}function OP(e,{pages:n,pageParams:a}){return n.length>0?e.getPreviousPageParam?.(n[0],n,a[0],a):void 0}var MP=class extends gT{#e;#t;#n;#r;#o;#a;#i;#l;constructor(e){super(),this.#l=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#r=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=gw(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#i,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=gw(this.options);n.data!==void 0&&(this.setState(pw(n.data,n.dataUpdatedAt)),this.#t=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,n){const a=iy(this.state.data,e,this.options);return this.#s({data:a,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),a}setState(e){this.#s({type:"setState",state:e})}cancel(e){const n=this.#a?.promise;return this.#a?.cancel(e),n?n.then(kr).catch(kr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>kn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dv||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>kn(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!dT(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const n=this.observers.indexOf(e);n!==-1&&(this.observers.splice(n,1),this.observers.length||(this.#a&&(this.#l||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.options)}const a=new AbortController,o=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#l=!0,a.signal)})},s=()=>{const p=fT(this.options,n),y=(()=>{const h={client:this.#o,queryKey:this.queryKey,meta:this.meta};return o(h),h})();return this.#l=!1,this.options.persister?this.options.persister(p,y,this):p(y)},c=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:s};return o(p),p})();(this.#e==="infinite"?TP(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#s({type:"fetch",meta:c.fetchOptions?.meta});const d=this.#a=pT({initialPromise:n?.initialPromise,fn:c.fetchFn,onCancel:p=>{p instanceof sy&&p.revert&&this.setState({...this.#n,fetchStatus:"idle"}),a.abort()},onFail:(p,g)=>{this.#s({type:"failed",failureCount:p,error:g})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const p=await d.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#r.config.onSuccess?.(p,this),this.#r.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof sy){if(p.silent)return this.#a.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#s({type:"error",error:p}),this.#r.config.onError?.(p,this),this.#r.config.onSettled?.(this.state.data,p,this),p}finally{this.#a===d&&(this.#a=void 0),this.scheduleGc()}}#s(e){const n=a=>{switch(e.type){case"failed":return{...a,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...mT(a.data,this.options),fetchMeta:e.meta??null};case"success":const o={...a,...pw(e.data,e.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?o:void 0,o;case"error":const s=e.error;return{...a,error:s,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...e.state}}};this.state=n(this.state),Wn.batch(()=>{this.observers.slice().forEach(a=>{a.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function mT(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hT(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function pw(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function gw(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,a=n!==void 0,o=a?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:a?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var AP=class extends Bl{#e;#t=void 0;#n=void 0;#r=void 0;#o;#a;#i;#l;#s;#h;#c;#d;#u;#p=new Set;constructor(e,n){super(),this.options=n,this.#e=e,this.#i=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),mw(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ly(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ly(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const n=this.options,a=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof kn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),n._defaulted&&!$f(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&yw(this.#t,a,this.options,n)&&this.#f(),this.updateResult(),o&&(this.#t!==a||kn(this.options.enabled,this.#t)!==kn(n.enabled,this.#t)||kn(this.options.staleTime,this.#t)!==kn(n.staleTime,this.#t))&&this.#m();const s=this.#y();o&&(this.#t!==a||kn(this.options.enabled,this.#t)!==kn(n.enabled,this.#t)||s!==this.#u)&&this.#v(s)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),a=this.createResult(n,e);return $f(this.getCurrentResult(),a)||(this.#r=a,this.#a=this.options,this.#o=this.#t.state),a}getCurrentResult(){return this.#r}trackResult(e,n){return new Proxy(e,{get:(a,o)=>(this.trackProp(o),n?.(o),Reflect.get(a,o))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#e.defaultQueryOptions(e),a=this.#e.getQueryCache().build(this.#e,n);let o=()=>{},s;const u=new Promise(c=>{s=c,o=this.#e.getQueryCache().subscribe(d=>{d.type==="updated"&&d.query.queryHash===a.queryHash&&a.state.data!==void 0&&(o(),c(this.createResult(a,n)))})});return Promise.race([a.fetch(n).then(()=>{const c=this.createResult(a,n);return s?.(c),c}).finally(()=>{o()}),u])}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(e){this.#w();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch(kr)),n}#g(e){return!hv()&&kn(this.options.enabled,this.#t)!==!1&&cT(e)}#m(){this.#x();const e=kn(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#g(e))return;const n=dT(this.#r.dataUpdatedAt,e)+1;this.#c=cs.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#y(){return kn(this.options.refetchInterval,this.#t)??!1}#v(e){this.#S(),this.#u=e,!(this.#u===0||!this.#g(this.#u))&&(this.#d=cs.setInterval(()=>{(this.options.refetchIntervalInBackground||pv.isFocused())&&this.#f()},this.#u))}#b(){this.#m(),this.#v(this.#y())}#x(){this.#c!==void 0&&(cs.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#d!==void 0&&(cs.clearInterval(this.#d),this.#d=void 0)}createResult(e,n){const a=this.#t,o=this.options,s=this.#r,u=this.#o,c=this.#a,d=e!==a?e.state:this.#n,{state:p}=e;let g={...p},y=!1,h;if(n._optimisticResults){const I=this.hasListeners(),j=!I&&mw(e,n),k=I&&yw(e,a,n,o);(j||k)&&(g={...g,...mT(p.data,e.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:x,status:w}=g;h=g.data;let C=!1;if(n.placeholderData!==void 0&&h===void 0&&w==="pending"){let I;s?.isPlaceholderData&&n.placeholderData===c?.placeholderData?(I=s.data,C=!0):I=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,I!==void 0&&(w="success",h=iy(s?.data,I,n),y=!0)}if(n.select&&h!==void 0&&!C)if(s&&h===u?.data&&n.select===this.#l)h=this.#s;else try{this.#l=n.select,h=n.select(h),h=iy(s?.data,h,n),this.#s=h,this.#i=null}catch(I){this.#i=I}else h===void 0&&(this.#i=null);this.#i&&(b=this.#i,h=this.#s,x=Date.now(),w="error",y=!1);const R=g.fetchStatus==="fetching",T=w==="pending",O=w==="error",M=T&&R,A=h!==void 0;return{status:w,fetchStatus:g.fetchStatus,isPending:T,isSuccess:w==="success",isError:O,isInitialLoading:M,isLoading:M,data:h,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:x,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&!T,isLoadingError:O&&!A,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:O&&A,isStale:gv(e,n),refetch:this.refetch,isEnabled:kn(n.enabled,e)!==!1}}updateResult(){const e=this.#r,n=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#a=this.options,this.#o.data!==void 0&&(this.#h=this.#t),$f(n,e))return;this.#r=n;const o=(()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,u=typeof s=="function"?s():s;if(u==="all"||!u&&!this.#p.size)return!0;const c=new Set(u??this.#p);return this.options.throwOnError&&c.add("error"),Object.keys(this.#r).some(d=>{const p=d;return this.#r[p]!==e[p]&&c.has(p)})})();Wn.batch(()=>{o&&this.listeners.forEach(s=>{s(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function DP(e,n){return kn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&kn(n.retryOnMount,e)===!1)}function mw(e,n){return DP(e,n)||e.state.data!==void 0&&ly(e,n,n.refetchOnMount)}function ly(e,n,a){if(kn(n.enabled,e)!==!1&&kn(n.staleTime,e)!=="static"){const o=kn(a,e);return o==="always"||o!==!1&&gv(e,n)}return!1}function yw(e,n,a,o){return(e!==n||kn(o.enabled,e)===!1)&&(!a.suspense||e.state.status!=="error")&&gv(e,a)}function gv(e,n){return kn(n.enabled,e)!==!1&&e.isStaleByTime(kn(n.staleTime,e))}var NP=class extends gT{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||yT(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(n=>n!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){const n=()=>{this.#o({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},o=this.#r=pT({fn:()=>this.options.mutationFn?this.options.mutationFn(e,a):Promise.reject(new Error("No mutationFn found")),onFail:(c,d)=>{this.#o({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),s=this.state.status==="pending",u=!o.canStart();try{if(s)n();else{this.#o({type:"pending",variables:e,isPaused:u}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,a);const d=await this.options.onMutate?.(e,a);d!==this.state.context&&this.#o({type:"pending",context:d,variables:e,isPaused:u})}const c=await o.start();return await this.#n.config.onSuccess?.(c,e,this.state.context,this,a),await this.options.onSuccess?.(c,e,this.state.context,a),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(c,null,e,this.state.context,a),this.#o({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,e,this.state.context,this,a)}catch(d){Promise.reject(d)}try{await this.options.onError?.(c,e,this.state.context,a)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,a)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,a)}catch(d){Promise.reject(d)}throw this.#o({type:"error",error:c}),c}finally{this.#r===o&&(this.#r=void 0),this.#n.runNext(this)}}#o(e){const n=a=>{switch(e.type){case"failed":return{...a,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...a,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:e.error,failureCount:a.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Wn.batch(()=>{this.#t.forEach(a=>{a.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function yT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var IP=class extends Bl{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,n,a){const o=new NP({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:a});return this.add(o),o}add(e){this.#e.add(e);const n=Mf(e);if(typeof n=="string"){const a=this.#t.get(n);a?a.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=Mf(e);if(typeof n=="string"){const a=this.#t.get(n);if(a)if(a.length>1){const o=a.indexOf(e);o!==-1&&a.splice(o,1)}else a[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Mf(e);if(typeof n=="string"){const a=this.#t.get(n)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const n=Mf(e);return typeof n=="string"?this.#t.get(n)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Wn.batch(()=>{const e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(n=>{this.notify({type:"removed",mutation:n})})})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(a=>cw(n,a))}findAll(e={}){return this.getAll().filter(n=>cw(e,n))}notify(e){Wn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Wn.batch(()=>Promise.all(e.map(n=>n.continue().catch(kr))))}};function Mf(e){return e.options.scope?.id}var jP=class extends Bl{#e;#t=void 0;#n;#r;constructor(n,a){super(),this.#e=n,this.setOptions(a),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const a=this.options;this.options=this.#e.defaultMutationOptions(n),$f(this.options,a)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),a?.mutationKey&&this.options.mutationKey&&vs(a.mutationKey)!==vs(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#o())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#o(),this.#a(n)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#o(),this.#a()}mutate(n,a){return this.#r=a,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(n)}#o(){const n=this.#n?.state??yT();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#a(n){Wn.batch(()=>{const a=this.#r;if(a&&this.hasListeners()){const o=this.#t.variables,s=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{a.onSuccess?.(n.data,o,s,u)}catch(c){Promise.reject(c)}try{a.onSettled?.(n.data,null,o,s,u)}catch(c){Promise.reject(c)}}else if(n?.type==="error"){try{a.onError?.(n.error,o,s,u)}catch(c){Promise.reject(c)}try{a.onSettled?.(void 0,n.error,o,s,u)}catch(c){Promise.reject(c)}}}this.listeners.forEach(o=>{o(this.#t)})})}},vT=class extends Bl{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,n,a){const o=n.queryKey,s=n.queryHash??uv(o,n);let u=this.get(s);return u||(u=new MP({client:e,queryKey:o,queryHash:s,options:e.defaultQueryOptions(n),state:a,defaultOptions:e.getQueryDefaults(o)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Wn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(a=>uw(n,a))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(a=>uw(e,a)):n}notify(e){Wn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},kP=class{#e;#t;#n;#r;#o;#a;#i;#l;constructor(e={}){this.#e=e.queryCache||new vT,this.#t=e.mutationCache||new IP,this.#n=e.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=pv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=bh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),a=this.#e.build(this,n),o=a.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime(kn(n.staleTime,a))&&this.prefetchQuery(n),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:a})=>[n,a.data])}setQueryData(e,n,a){const o=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(o.queryHash)?.state.data,u=pP(n,s);if(u!==void 0)return this.#e.build(this,o).setData(u,{...a,manual:!0})}setQueriesData(e,n,a){return Wn.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,n,a)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;Wn.batch(()=>{n.findAll(e).forEach(a=>{n.remove(a)})})}resetQueries(e,n){const a=this.#e;return Wn.batch(()=>{const o=a.findAll(e),s=new Set(o);return o.forEach(u=>{u.reset()}),this.refetchQueries({type:"active",predicate:u=>s.has(u)},n)})}cancelQueries(e,n={}){const a={revert:!0,...n},o=Wn.batch(()=>this.#e.findAll(e).map(s=>s.cancel(a)));return Promise.all(o).then(kr).catch(kr)}invalidateQueries(e,n={}){return Wn.batch(()=>(this.#e.findAll(e).forEach(a=>{a.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const a={...n,cancelRefetch:n.cancelRefetch??!0},o=Wn.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let u=s.fetch(void 0,a);return a.throwOnError||(u=u.catch(kr)),s.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(kr)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n),o=a.isStaleByTime(kn(n.staleTime,a))?await a.fetch(n):a.state.data,s=n.select;return s?s(o):o}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n);return a.isStaleByTime(kn(n.staleTime,a))?a.fetch(n):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kr).catch(kr)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kr).catch(kr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return bh.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#r.set(vs(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#r.values()],a={};return n.forEach(o=>{Pl(e,o.queryKey)&&Object.assign(a,o.defaultOptions)}),a}setMutationDefaults(e,n){this.#o.set(vs(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#o.values()],a={};return n.forEach(o=>{Pl(e,o.mutationKey)&&Object.assign(a,o.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=uv(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===dv&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const bT=v.createContext(!1),PP=()=>v.useContext(bT);bT.Provider;function LP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const zP=v.createContext(LP()),_P=()=>v.useContext(zP),HP=(e,n,a)=>{const o=a?.state.status==="error"&&typeof e.throwOnError=="function"?fv(e.throwOnError,[a.state.error,a]):e.throwOnError;(e.suspense||o)&&(n.isReset()||(e.retryOnMount=!1))},UP=e=>{v.useEffect(()=>{e.clearReset()},[e])},FP=({result:e,errorResetBoundary:n,throwOnError:a,query:o,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&o&&(s&&e.data===void 0||fv(a,[e.error,o])),BP=e=>{if(e.suspense){const a=s=>s==="static"?s:Math.max(s??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...s)=>a(o(...s)):a(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},VP=(e,n)=>e?.suspense&&n.isPending,qP=(e,n,a)=>n.fetchOptimistic(e).catch(()=>{a.clearReset()});function YP(e,n,a){const o=PP(),s=_P(),u=Bo(a),c=u.defaultQueryOptions(e),d=u.getQueryCache().get(c.queryHash),p=e.subscribed!==!1;c._optimisticResults=o?"isRestoring":p?"optimistic":void 0,BP(c),HP(c,s,d),UP(s);const[g]=v.useState(()=>new n(u,c)),y=g.getOptimisticResult(c),h=!o&&p;if(v.useSyncExternalStore(v.useCallback(b=>{const x=h?g.subscribe(Wn.batchCalls(b)):kr;return g.updateResult(),x},[g,h]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),v.useEffect(()=>{g.setOptions(c)},[c,g]),VP(c,y))throw qP(c,g,s);if(FP({result:y,errorResetBoundary:s,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw y.error;return c.notifyOnChangeProps?y:g.trackResult(y)}function fp(e,n){return YP(e,AP,n)}function KP(e,n){const a=Bo(n);return $P({filters:{...e,status:"pending"}},a).length}function GP(){let e;return(n,a)=>{let o=[],s;return()=>{const u=n.findAll(a.filters),c=u.flatMap(d=>[d,d.state]);return(!s||c.length!==o.length||c.some((d,p)=>!Object.is(d,o[p])))&&(o=c,s=cv(e,u.map(d=>a.select?a.select(d):d.state)),e=s),s}}}function $P(e={},n){const a=Bo(n).getMutationCache(),[o]=v.useState(()=>GP()),s=o(a,e);return v.useSyncExternalStore(v.useCallback(u=>a.subscribe(Wn.batchCalls(u)),[a]),s,s)}function Ma(e,n){const a=Bo(n),[o]=v.useState(()=>new jP(a,e));v.useEffect(()=>{o.setOptions(e)},[o,e]);const s=v.useSyncExternalStore(v.useCallback(c=>o.subscribe(Wn.batchCalls(c)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=v.useCallback((...c)=>{o.mutate(c[0],c[1]).catch(kr)},[o]);if(s.error&&fv(o.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}var xT=e=>{throw TypeError(e)},ST=(e,n,a)=>n.has(e)||xT("Cannot "+a),Ea=(e,n,a)=>(ST(e,n,"read from private field"),a?a.call(e):n.get(e)),Wu=(e,n,a)=>n.has(e)?xT("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,a),io=(e,n,a,o)=>(ST(e,n,"write to private field"),n.set(e,a),a),hp=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,pp=/^[\\/]{2}/;function wT(e,n){return n+e.replace(/\\/g,"/")}var vw="popstate";function bw(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function XP(e={}){function n(s,u){let{pathname:c="/",search:d="",hash:p=""}=Ka(s.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),yc("",{pathname:c,search:d,hash:p},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function a(s,u){let c=s.document.querySelector("base"),d="";if(c&&c.getAttribute("href")){let p=s.location.href,g=p.indexOf("#");d=g===-1?p:p.slice(0,g)}return d+"#"+(typeof u=="string"?u:Lr(u))}function o(s,u){Un(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(u)})`)}return ZP(n,a,o,e)}function _t(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Un(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function QP(){return Math.random().toString(36).substring(2,10)}function xw(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function yc(e,n,a=null,o,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?Ka(n):n,state:a,key:n&&n.key||o||QP(),mask:s}}function Lr({pathname:e="/",search:n="",hash:a=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function Ka(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substring(a),e=e.substring(0,a));let o=e.indexOf("?");o>=0&&(n.search=e.substring(o),e=e.substring(0,o)),e&&(n.pathname=e)}return n}function ZP(e,n,a,o={}){let{window:s=document.defaultView,v5Compat:u=!1}=o,c=s.history,d="POP",p=null,g=y();g==null&&(g=0,c.replaceState({...c.state,idx:g},""));function y(){return(c.state||{idx:null}).idx}function h(){d="POP";let R=y(),T=R==null?null:R-g;g=R,p&&p({action:d,location:C.location,delta:T})}function b(R,T){d="PUSH";let O=bw(R)?R:yc(C.location,R,T);a&&a(O,R),g=y()+1;let M=xw(O,g),A=C.createHref(O.mask||O);try{c.pushState(M,"",A)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;s.location.assign(A)}u&&p&&p({action:d,location:C.location,delta:1})}function x(R,T){d="REPLACE";let O=bw(R)?R:yc(C.location,R,T);a&&a(O,R),g=y();let M=xw(O,g),A=C.createHref(O.mask||O);c.replaceState(M,"",A),u&&p&&p({action:d,location:C.location,delta:0})}function w(R){return RT(s,R)}let C={get action(){return d},get location(){return e(s,c)},listen(R){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(vw,h),p=R,()=>{s.removeEventListener(vw,h),p=null}},createHref(R){return n(s,R)},createURL:w,encodeLocation(R){let T=w(R);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:b,replace:x,go(R){return c.go(R)}};return C}function RT(e,n,a=!1){let o="http://localhost";e&&(o=e.location.origin!=="null"?e.location.origin:e.location.href),_t(o,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:Lr(n);return s=s.replace(/ $/,"%20"),!a&&pp.test(s)&&(s=o+s),new URL(s,o)}var ec,Sw=class{constructor(e){if(Wu(this,ec,new Map),e)for(let[n,a]of e)this.set(n,a)}get(e){if(Ea(this,ec).has(e))return Ea(this,ec).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,n){Ea(this,ec).set(e,n)}};ec=new WeakMap;var JP=new Set(["lazy","caseSensitive","path","id","index","children"]);function WP(e){return JP.has(e)}var e5=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function t5(e){return e5.has(e)}function n5(e){return e.index===!0}function vc(e,n,a=[],o={},s=!1){return e.map((u,c)=>{let d=[...a,String(c)],p=typeof u.id=="string"?u.id:d.join("-");if(_t(u.index!==!0||!u.children,"Cannot specify children on an index route"),_t(s||!o[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),n5(u)){let g={...u,id:p};return o[p]=ww(g,n(g)),g}else{let g={...u,id:p,children:void 0};return o[p]=ww(g,n(g)),u.children&&(g.children=vc(u.children,n,d,o,s)),g}})}function ww(e,n){return Object.assign(e,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...e.lazy,...n.lazy}}:{}})}function ET(e,n,a="/"){return Ua(e,n,a,!1)}function Ua(e,n,a,o,s){let u=typeof n=="string"?Ka(n):n,c=Na(u.pathname||"/",a);if(c==null)return null;let d=s??Xf(e),p=null,g=h5(c);for(let y=0;p==null&&y<d.length;++y)p=f5(d[y],g,o);return p}function CT(e,n){let{route:a,pathname:o,params:s}=e;return{id:a.id,pathname:o,params:s,data:n[a.id],loaderData:n[a.id],handle:a.handle}}function Xf(e){let n=TT(e);return r5(n),n}function TT(e,n=[],a=[],o="",s=!1){let u=(c,d,p=s,g)=>{let y={relativePath:g===void 0?c.path||"":g,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&p)return;_t(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let h=Aa([o,y.relativePath]),b=a.concat(y);c.children&&c.children.length>0&&(_t(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),TT(c.children,n,b,h,p)),!(c.path==null&&!c.index)&&n.push({path:h,score:c5(h,c.index),routesMeta:b.map((x,w)=>{let[C,R]=AT(x.relativePath,x.caseSensitive,w===b.length-1);return{...x,matcher:C,compiledParams:R}})})};return e.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))u(c,d);else for(let p of OT(c.path))u(c,d,!0,p)}),n}function OT(e){let n=e.split("/");if(n.length===0)return[];let[a,...o]=n,s=a.endsWith("?"),u=a.replace(/\?$/,"");if(o.length===0)return s?[u,""]:[u];let c=OT(o.join("/")),d=[];return d.push(...c.map(p=>p===""?u:[u,p].join("/"))),s&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function r5(e){e.sort((n,a)=>n.score!==a.score?a.score-n.score:d5(n.routesMeta.map(o=>o.childrenIndex),a.routesMeta.map(o=>o.childrenIndex)))}var a5=/^:[\w-]+$/,o5=3,i5=2,s5=1,l5=10,u5=-2,Rw=e=>e==="*";function c5(e,n){let a=e.split("/"),o=a.length;return a.some(Rw)&&(o+=u5),n&&(o+=i5),a.filter(s=>!Rw(s)).reduce((s,u)=>s+(a5.test(u)?o5:u===""?s5:l5),o)}function d5(e,n){return e.length===n.length&&e.slice(0,-1).every((o,s)=>o===n[s])?e[e.length-1]-n[n.length-1]:0}function f5(e,n,a=!1){let{routesMeta:o}=e,s={},u="/",c=[];for(let d=0;d<o.length;++d){let p=o[d],g=d===o.length-1,y=u==="/"?n:n.slice(u.length)||"/",h={path:p.relativePath,caseSensitive:p.caseSensitive,end:g},b=p.matcher&&p.compiledParams?MT(h,y,p.matcher,p.compiledParams):xh(h,y),x=p.route;if(!b&&g&&a&&!o[o.length-1].route.index&&(b=xh({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!b)return null;Object.assign(s,b.params),c.push({params:s,pathname:Aa([u,b.pathname]),pathnameBase:m5(Aa([u,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(u=Aa([u,b.pathnameBase]))}return c}function xh(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,o]=AT(e.path,e.caseSensitive,e.end);return MT(e,n,a,o)}function MT(e,n,a,o){let s=n.match(a);if(!s)return null;let u=s[0],c=Ll(u,1),d=s.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:h},b)=>{if(y==="*"){let w=d[b]||"";c=Ll(u.slice(0,u.length-w.length),1)}const x=d[b];return h&&!x?g[y]=void 0:g[y]=(x||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:c,pattern:e}}function AT(e,n=!1,a=!0){Un(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let o=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p,g,y)=>{if(o.push({paramName:d,isOptional:p!=null}),p){let h=y.charAt(g+c.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),o]}function h5(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Un(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Na(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,o=e.charAt(a);return o&&o!=="/"?null:e.slice(a)||"/"}function p5({basename:e,pathname:n}){return n==="/"?e:Aa([e,n])}var mv=e=>hp.test(e);function g5(e,n="/"){let{pathname:a,search:o="",hash:s=""}=typeof e=="string"?Ka(e):e,u;return a?(a=yv(a),a.startsWith("/")||a.startsWith("\\")?u=Ew(a.substring(1),"/"):u=Ew(a,n)):u=n,{pathname:u,search:y5(o),hash:v5(s)}}function Ew(e,n){let a=Ll(n).split("/");return e.split("/").forEach(s=>{s===".."?a.length>1&&a.pop():s!=="."&&a.push(s)}),a.length>1?a.join("/"):"/"}function M0(e,n,a,o){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function DT(e){return e.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function gp(e){let n=DT(e);return n.map((a,o)=>o===n.length-1?a.pathname:a.pathnameBase)}function zc(e,n,a,o=!1){let s;typeof e=="string"?s=Ka(e):(s={...e},_t(!s.pathname||!s.pathname.includes("?"),M0("?","pathname","search",s)),_t(!s.pathname||!s.pathname.includes("#"),M0("#","pathname","hash",s)),_t(!s.search||!s.search.includes("#"),M0("#","search","hash",s)));let u=e===""||s.pathname==="",c=u?"/":s.pathname,d;if(c==null)d=a;else{let h=n.length-1;if(!o&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),h-=1;s.pathname=b.join("/")}d=h>=0?n[h]:"/"}let p=g5(s,d),g=c&&c!=="/"&&c.endsWith("/"),y=(u||c===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(g||y)&&(p.pathname+="/"),p}var yv=e=>e.replace(/[\\/]{2,}/g,"/"),Aa=e=>yv(e.join("/"));function Ll(e,n=0){let a=e.length;for(;a>n&&e.charCodeAt(a-1)===47;)a--;return a===e.length?e:e.slice(0,a)}var m5=e=>Ll(e).replace(/^\/*/,"/"),y5=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,v5=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,b5=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_c=class{constructor(e,n,a,o=!1){this.status=e,this.statusText=n||"",this.internal=o,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function bc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Hc(e){let n=e.map(a=>a.route.path).filter(Boolean);return Aa(n)||"/"}var NT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function IT(e,n){let a=e;if(typeof a!="string"||!hp.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let o=a,s=!1;if(NT)try{let u=new URL(window.location.href),c=pp.test(a)?new URL(wT(a,u.protocol)):new URL(a),d=Na(c.pathname,n);c.origin===u.origin&&d!=null?a=d+c.search+c.hash:s=!0}catch{Un(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:s,to:a}}var Ei=Symbol("Uninstrumented");function x5(e,n){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(s=>s({id:n.id,index:n.index,path:n.path,instrument(u){let c=Object.keys(a);for(let d of c)u[d]&&a[d].push(u[d])}}));let o={};if(typeof n.lazy=="function"&&a.lazy.length>0){let s=bl(a.lazy,n.lazy,()=>{});s&&(o.lazy=s)}if(typeof n.lazy=="object"){let s=n.lazy;["middleware","loader","action"].forEach(u=>{let c=s[u],d=a[`lazy.${u}`];if(typeof c=="function"&&d.length>0){let p=bl(d,c,()=>{});p&&(o.lazy=Object.assign(o.lazy||{},{[u]:p}))}})}return["loader","action"].forEach(s=>{let u=n[s];if(typeof u=="function"&&a[s].length>0){let c=u[Ei]??u,d=bl(a[s],c,(...p)=>Cw(p[0]));d&&(s==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[Ei]=c,o[s]=d)}}),n.middleware&&n.middleware.length>0&&a.middleware.length>0&&(o.middleware=n.middleware.map(s=>{let u=s[Ei]??s,c=bl(a.middleware,u,(...d)=>Cw(d[0]));return c?(c[Ei]=u,c):s})),o}function S5(e,n){let a={navigate:[],fetch:[]};if(n.forEach(o=>o({instrument(s){let u=Object.keys(s);for(let c of u)s[c]&&a[c].push(s[c])}})),a.navigate.length>0){let o=e.navigate[Ei]??e.navigate,s=bl(a.navigate,o,(...u)=>{let[c,d]=u;return{to:typeof c=="number"||typeof c=="string"?c:c?Lr(c):".",...Tw(e,d??{})}});s&&(s[Ei]=o,e.navigate=s)}if(a.fetch.length>0){let o=e.fetch[Ei]??e.fetch,s=bl(a.fetch,o,(...u)=>{let[c,,d,p]=u;return{href:d??".",fetcherKey:c,...Tw(e,p??{})}});s&&(s[Ei]=o,e.fetch=s)}return e}function bl(e,n,a){return e.length===0?null:async(...o)=>{let s=await jT(e,a(...o),()=>n(...o),e.length-1);if(s.type==="error")throw s.value;return s.value}}async function jT(e,n,a,o){let s=e[o],u;if(s){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=jT(e,n,a,o-1),u=await c,_t(u,"Expected a result"),u.type==="error"&&u.value instanceof Error?{status:"error",error:u.value}:{status:"success",error:void 0});try{await s(d,n)}catch(p){console.error("An instrumentation function threw an error:",p)}c||await d(),await c}else try{u={type:"success",value:await a()}}catch(c){u={type:"error",value:c}}return u||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Cw(e){let{request:n,context:a,params:o,pattern:s}=e;return{request:w5(n),params:{...o},pattern:s,context:R5(a)}}function Tw(e,n){return{currentUrl:Lr(e.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function w5(e){return{method:e.method,url:e.url,headers:{get:(...n)=>e.headers.get(...n)}}}function R5(e){if(C5(e)){let n={...e};return Object.freeze(n),n}else return{get:n=>e.get(n)}}var E5=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function C5(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===E5}var Ow=new URL("http://localhost");function vv(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Ow)}catch{return Ow}}function A0(e,n){return e.origin===n.origin&&(e.origin!=="null"||e.protocol===n.protocol&&e.host===n.host)}function T5(e,n){if(e.startsWith("//"))return!0;let a=n.protocol.toLowerCase();return e.toLowerCase().startsWith(a)?n.host===""||e.slice(a.length).startsWith("//"):!1}function Ol(e,n,a,o){let s=null;try{s=e==null?null:new URL(e,a)}catch{}let u=new URL(n,a),c=s!=null&&!A0(s,a),d=!A0(u,a);if(o==="reject"){if(c||d)throw new Error("External navigation is not allowed")}else if(d&&(s==null||!T5(e,s)||!A0(s,u)))throw new Error("External navigation is not allowed")}var kT=["POST","PUT","PATCH","DELETE"],O5=new Set(kT),M5=["GET",...kT],A5=new Set(M5),PT=new Set([301,302,303,307,308]),D5=new Set([307,308]),D0={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},N5={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gu={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},I5=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),LT="remix-router-transitions",zT=Symbol("ResetLoaderData"),ls,gl,bi,ml,j5=class{constructor(e){Wu(this,ls),Wu(this,gl),Wu(this,bi),Wu(this,ml),io(this,ls,e),io(this,gl,Xf(e))}get stableRoutes(){return Ea(this,ls)}get activeRoutes(){return Ea(this,bi)??Ea(this,ls)}get branches(){return Ea(this,ml)??Ea(this,gl)}get hasHMRRoutes(){return Ea(this,bi)!=null}setRoutes(e){io(this,ls,e),io(this,gl,Xf(e))}setHmrRoutes(e){io(this,bi,e),io(this,ml,Xf(e))}commitHmrRoutes(){Ea(this,bi)&&(io(this,ls,Ea(this,bi)),io(this,gl,Ea(this,ml)),io(this,bi,void 0),io(this,ml,void 0))}};ls=new WeakMap;gl=new WeakMap;bi=new WeakMap;ml=new WeakMap;function k5(e){const n=e.window?e.window:typeof window<"u"?window:void 0,a=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";_t(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=e.hydrationRouteProperties||[],s=e.mapRouteProperties||I5,u=s;if(e.instrumentations){let H=e.instrumentations;u=Z=>({...s(Z),...x5(H.map(ne=>ne.route).filter(Boolean),Z)})}let c={},d=new j5(vc(e.routes,u,void 0,c)),p=e.basename||"/";p.startsWith("/")||(p=`/${p}`);let g=e.dataStrategy||H5,y={...e.future},h=null,b=new Set,x=null,w=null,C=null,R=null,T=e.hydrationData!=null,O=Ua(d.activeRoutes,e.history.location,p,!1,d.branches),M=!1,A=null,I,j;if(O==null&&!e.patchRoutesOnNavigation){let H=Ca(404,{pathname:e.history.location.pathname}),{matches:Z,route:ne}=Af(d.activeRoutes);I=!0,j=!I,O=Z,A={[ne.id]:H}}else if(O&&!e.hydrationData&&ke(O,d.activeRoutes,e.history.location.pathname).active&&(O=null),O)if(O.some(H=>H.route.lazy))I=!1,j=!I;else if(!O.some(H=>bv(H.route)))I=!0,j=!I;else{let H=e.hydrationData?e.hydrationData.loaderData:null,Z=e.hydrationData?e.hydrationData.errors:null,ne=O;if(Z){let ye=O.findIndex(xe=>Z[xe.route.id]!==void 0);ne=ne.slice(0,ye+1)}j=!1,I=!0,ne.forEach(ye=>{let xe=_T(ye.route,H,Z);j=j||xe.renderFallback,I=I&&!xe.shouldLoad})}else{I=!1,j=!I,O=[];let H=ke(null,d.activeRoutes,e.history.location.pathname);H.active&&H.matches&&(M=!0,O=H.matches)}let k,D={historyAction:e.history.action,location:e.history.location,matches:O,initialized:I,renderFallback:j,navigation:D0,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||A,fetchers:new Map,blockers:new Map},z="POP",F=null,G=!1,J,Y=!1,U=new Map,_=null,L=!1,$=!1,K=new Set,V=new Map,X=0,ee=-1,q=new Map,se=new Set,N=new Map,B=new Map,W=new Set,re=new Map,Re,le=null;function me(){if(h=e.history.listen(({action:H,location:Z,delta:ne})=>{if(Re){Re(),Re=void 0;return}Un(re.size===0||ne!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ye=vt({currentLocation:D.location,nextLocation:Z,historyAction:H});if(ye&&ne!=null){let xe=new Promise(qe=>{Re=qe});e.history.go(ne*-1),ft(ye,{state:"blocked",location:Z,proceed(){ft(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:Z}),xe.then(()=>e.history.go(ne))},reset(){let qe=new Map(D.blockers);qe.set(ye,Gu),Te({blockers:qe})}}),F?.resolve(),F=null;return}return Le(H,Z)}),a){aL(n,U);let H=()=>oL(n,U);n.addEventListener("pagehide",H),_=()=>n.removeEventListener("pagehide",H)}return D.initialized||Le("POP",D.location,{initialHydration:!0}),k}function ge(){h&&h(),_&&_(),b.clear(),J&&J.abort(),D.fetchers.forEach((H,Z)=>Ot(D.fetchers,Z)),D.blockers.forEach((H,Z)=>$t(Z))}function ce(H){if(b.add(H),x){let{newErrors:Z}=x;x=null,H(D,{deletedFetchers:[],newErrors:Z,viewTransitionOpts:void 0,flushSync:!1})}return()=>b.delete(H)}function Te(H,Z={}){H.matches&&(H.matches=H.matches.map(xe=>{let qe=c[xe.route.id],Ve=xe.route;return Ve.element!==qe.element||Ve.errorElement!==qe.errorElement||Ve.hydrateFallbackElement!==qe.hydrateFallbackElement?{...xe,route:qe}:xe})),D={...D,...H};let ne=[],ye=[];D.fetchers.forEach((xe,qe)=>{xe.state==="idle"&&(W.has(qe)?ne.push(qe):ye.push(qe))}),W.forEach(xe=>{!D.fetchers.has(xe)&&!V.has(xe)&&ne.push(xe)}),b.size===0&&(x={newErrors:H.errors??null}),[...b].forEach(xe=>xe(D,{deletedFetchers:ne,newErrors:H.errors??null,viewTransitionOpts:Z.viewTransitionOpts,flushSync:Z.flushSync===!0})),ne.forEach(xe=>Ot(D.fetchers,xe)),ye.forEach(xe=>D.fetchers.delete(xe))}function ve(H,Z,{flushSync:ne}={}){let ye=D.actionData!=null&&D.navigation.formMethod!=null&&Er(D.navigation.formMethod)&&D.navigation.state==="loading"&&H.state?._isRedirect!==!0,xe;Z.actionData?Object.keys(Z.actionData).length>0?xe=Z.actionData:xe=null:ye?xe=D.actionData:xe=null;let qe=Z.loaderData?zw(D.loaderData,Z.loaderData,Z.matches||[],Z.errors):D.loaderData,Ve=D.blockers;Ve.size>0&&(Ve=new Map(Ve),Ve.forEach((tt,St)=>Ve.set(St,Gu)));let Xe=L?!1:ot(H,Z.matches||D.matches),$e=G===!0||D.navigation.formMethod!=null&&Er(D.navigation.formMethod)&&H.state?._isRedirect!==!0;d.commitHmrRoutes(),L||z==="POP"||(z==="PUSH"?e.history.push(H,H.state):z==="REPLACE"&&e.history.replace(H,H.state));let st;if(z==="POP"&&!L&&H!==D.location){let tt=U.get(D.location.pathname);tt&&tt.has(H.pathname)?st={currentLocation:D.location,nextLocation:H}:U.has(H.pathname)&&(st={currentLocation:H,nextLocation:D.location})}else if(Y){let tt=U.get(D.location.pathname);tt?tt.add(H.pathname):(tt=new Set([H.pathname]),U.set(D.location.pathname,tt)),st={currentLocation:D.location,nextLocation:H}}Te({...Z,actionData:xe,loaderData:qe,historyAction:z,location:H,initialized:!0,renderFallback:!1,navigation:D0,revalidation:"idle",restoreScrollPosition:Xe,preventScrollReset:$e,blockers:Ve},{viewTransitionOpts:st,flushSync:ne===!0}),z="POP",G=!1,Y=!1,L=!1,$=!1,F?.resolve(),F=null,le?.resolve(),le=null}async function Pe(H,Z){if(F?.resolve(),F=null,typeof H=="number"){F||(F=Fw());let Ht=F.promise;return e.history.go(H),Ht}let ne=uy(D.location,D.matches,p,H,Z?.fromRouteId,Z?.relative),{path:ye,submission:xe,error:qe}=Mw(!1,ne,Z),Ve;if(Z?.mask){let Ht=typeof Z.mask=="string"?Ka(Z.mask):{...D.location.mask,...Z.mask};if(Ve={pathname:Ht.pathname??"",search:Ht.search??"",hash:Ht.hash??""},pp.test(Ve.pathname))throw new Error("External navigation is not allowed");Ve.pathname.startsWith("\\")&&(Ve.pathname=Ve.pathname.replace(/^\\+/,"/")),Ol(typeof Z.mask=="string"?Z.mask:Lr(Z.mask),Lr(Ve),e.history.createURL("/"),"reject")}let Xe=D.location,$e=yc(Xe,ye,Z&&Z.state,void 0,Ve);$e={...$e,...e.history.encodeLocation($e)},Ol(H==null?e.history.createHref(D.location):typeof H=="string"?H:Lr(H),e.history.createHref($e.mask||$e),e.history.createURL("/"),"reject");let st=Z&&Z.replace!=null?Z.replace:void 0,tt="PUSH";st===!0?tt="REPLACE":st===!1||xe!=null&&Er(xe.formMethod)&&xe.formAction===D.location.pathname+D.location.search&&(tt="REPLACE");let St=Z&&"preventScrollReset"in Z?Z.preventScrollReset===!0:void 0,ct=(Z&&Z.flushSync)===!0,Bt=vt({currentLocation:Xe,nextLocation:$e,historyAction:tt});if(Bt){ft(Bt,{state:"blocked",location:$e,proceed(){ft(Bt,{state:"proceeding",proceed:void 0,reset:void 0,location:$e}),Pe(H,Z)},reset(){let Ht=new Map(D.blockers);Ht.set(Bt,Gu),Te({blockers:Ht})}});return}await Le(tt,$e,{submission:xe,pendingError:qe,preventScrollReset:St,replace:Z&&Z.replace,enableViewTransition:Z&&Z.viewTransition,flushSync:ct,callSiteDefaultShouldRevalidate:Z&&Z.defaultShouldRevalidate})}function Me(){le||(le=Fw()),De(),Te({revalidation:"loading"});let H=le.promise;return D.navigation.state==="submitting"?H:D.navigation.state==="idle"?(Le(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),H):(Le(z||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:Y===!0}),H)}async function Le(H,Z,ne){J&&J.abort(),J=null,z=H,L=(ne&&ne.startUninterruptedRevalidation)===!0,je(D.location,D.matches),G=(ne&&ne.preventScrollReset)===!0,Y=(ne&&ne.enableViewTransition)===!0;let ye=d.activeRoutes,xe=ne?.initialHydration&&D.matches&&D.matches.length>0&&!M?D.matches:Ua(ye,Z,p,!1,d.branches),qe=(ne&&ne.flushSync)===!0;if(xe&&D.initialized&&!$&&$5(D.location,Z)&&!(ne&&ne.submission&&Er(ne.submission.formMethod))){ve(Z,{matches:xe},{flushSync:qe});return}let Ve=ke(xe,ye,Z.pathname);if(Ve.active&&Ve.matches&&(xe=Ve.matches),!xe){let{error:Vt,notFoundMatches:Ut,route:En}=gt(Z.pathname);ve(Z,{matches:Ut,loaderData:{},errors:{[En.id]:Vt}},{flushSync:qe});return}let Xe=ne&&ne.overrideNavigation?{...ne.overrideNavigation,matches:xe,historyAction:H}:void 0;J=new AbortController;let $e=yl(e.history,Z,J.signal,ne&&ne.submission),st=e.getContext?await e.getContext():new Sw,tt;if(ne&&ne.pendingError)tt=[wi(xe).route.id,{type:"error",error:ne.pendingError}];else if(ne&&ne.submission&&Er(ne.submission.formMethod)){let Vt=await Fe($e,Z,ne.submission,xe,H,st,Ve.active,ne&&ne.initialHydration===!0,{replace:ne.replace,flushSync:qe});if(Vt.shortCircuited)return;if(Vt.pendingActionResult){let[Ut,En]=Vt.pendingActionResult;if(ua(En)&&bc(En.error)&&En.error.status===404){J=null,ve(Z,{matches:Vt.matches,loaderData:{},errors:{[Ut]:En.error}});return}}xe=Vt.matches||xe,tt=Vt.pendingActionResult,Xe=N0(Z,xe,H,ne.submission),qe=!1,Ve.active=!1,$e=yl(e.history,$e.url,$e.signal)}let{shortCircuited:St,matches:ct,loaderData:Bt,errors:Ht,workingFetchers:On}=await Oe($e,Z,xe,H,st,Ve.active,Xe,ne&&ne.submission,ne&&ne.fetcherSubmission,ne&&ne.replace,ne&&ne.initialHydration===!0,qe,tt,ne&&ne.callSiteDefaultShouldRevalidate);St||(J=null,ve(Z,{matches:ct||xe,..._w(tt),loaderData:Bt,errors:Ht,...On?{fetchers:On}:{}}))}async function Fe(H,Z,ne,ye,xe,qe,Ve,Xe,$e={}){De();let st=nL(Z,ye,xe,ne);if(Te({navigation:st},{flushSync:$e.flushSync===!0}),Ve){let ct=await ze(ye,Z.pathname,H.signal);if(ct.type==="aborted")return{shortCircuited:!0};if(ct.type==="error"){if(ct.partialMatches.length===0){let{matches:Ht,route:On}=Af(d.activeRoutes);return{matches:Ht,pendingActionResult:[On.id,{type:"error",error:ct.error}]}}let Bt=wi(ct.partialMatches).route.id;return{matches:ct.partialMatches,pendingActionResult:[Bt,{type:"error",error:ct.error}]}}else if(ct.matches)ye=ct.matches;else{let{notFoundMatches:Bt,error:Ht,route:On}=gt(Z.pathname);return{matches:Bt,pendingActionResult:[On.id,{type:"error",error:Ht}]}}}let tt,St=Qf(ye,Z);if(!St.route.action&&!St.route.lazy)tt={type:"error",error:Ca(405,{method:H.method,pathname:Z.pathname,routeId:St.route.id})};else{let ct=Ml(u,c,H,Z,ye,St,Xe?[]:o,qe),Bt=await we(H,Z,ct,qe,null);if(tt=Bt[St.route.id],!tt){for(let Ht of ye)if(Bt[Ht.route.id]){tt=Bt[Ht.route.id];break}}if(H.signal.aborted)return{shortCircuited:!0}}if(ds(tt)){let ct;return $e&&$e.replace!=null?ct=$e.replace:ct=kw(tt.response.headers.get("Location"),new URL(H.url),p,e.history)===D.location.pathname+D.location.search,await de(H,tt,!0,{submission:ne,replace:ct}),{shortCircuited:!0}}if(ua(tt)){let ct=wi(ye,St.route.id);return($e&&$e.replace)!==!0&&(z="PUSH"),{matches:ye,pendingActionResult:[ct.route.id,tt,St.route.id]}}return{matches:ye,pendingActionResult:[St.route.id,tt]}}async function Oe(H,Z,ne,ye,xe,qe,Ve,Xe,$e,st,tt,St,ct,Bt){let Ht=Ve||N0(Z,ne,ye,Xe),On=Xe||$e||Uw(Ht),Vt=!L&&!tt;if(qe){if(Vt){let Yn=He(ct);Te({navigation:Ht,...Yn!==void 0?{actionData:Yn}:{}},{flushSync:St})}let kt=await ze(ne,Z.pathname,H.signal);if(kt.type==="aborted")return{shortCircuited:!0};if(kt.type==="error"){if(kt.partialMatches.length===0){let{matches:Fn,route:fr}=Af(d.activeRoutes);return{matches:Fn,loaderData:{},errors:{[fr.id]:kt.error}}}let Yn=wi(kt.partialMatches).route.id;return{matches:kt.partialMatches,loaderData:{},errors:{[Yn]:kt.error}}}else if(kt.matches)ne=kt.matches;else{let{error:Yn,notFoundMatches:Fn,route:fr}=gt(Z.pathname);return{matches:Fn,loaderData:{},errors:{[fr.id]:Yn}}}}let Ut=d.activeRoutes,{dsMatches:En,revalidatingFetchers:Cn}=Aw(H,xe,u,c,e.history,D,ne,On,Z,tt?[]:o,tt===!0,$,K,W,N,se,Ut,p,e.patchRoutesOnNavigation!=null,d.branches,ct,Bt);if(ee=++X,!e.dataStrategy&&!En.some(kt=>kt.shouldLoad)&&!En.some(kt=>kt.route.middleware&&kt.route.middleware.length>0)&&Cn.length===0){let kt=new Map(D.fetchers),Yn=Wt(kt);return ve(Z,{matches:ne,loaderData:{},errors:ct&&ua(ct[1])?{[ct[0]]:ct[1].error}:null,..._w(ct),...Yn?{fetchers:kt}:{}},{flushSync:St}),{shortCircuited:!0}}if(Vt){let kt={};if(!qe){kt.navigation=Ht;let Yn=He(ct);Yn!==void 0&&(kt.actionData=Yn)}Cn.length>0&&(kt.fetchers=be(Cn)),Te(kt,{flushSync:St})}Cn.forEach(kt=>{Jt(kt.key),kt.controller&&V.set(kt.key,kt.controller)});let Xr=()=>Cn.forEach(kt=>Jt(kt.key));J&&J.signal.addEventListener("abort",Xr);let{loaderResults:cn,fetcherResults:dn}=await Ke(En,Cn,H,Z,xe);if(H.signal.aborted)return{shortCircuited:!0};J&&J.signal.removeEventListener("abort",Xr),Cn.forEach(kt=>V.delete(kt.key));let Mn=Df(cn);if(Mn)return await de(H,Mn.result,!0,{replace:st}),{shortCircuited:!0};if(Mn=Df(dn),Mn)return se.add(Mn.key),await de(H,Mn.result,!0,{replace:st}),{shortCircuited:!0};let In=new Map(D.fetchers),{loaderData:vo,errors:Or}=Lw(D,ne,cn,ct,Cn,dn,In);tt&&D.errors&&(Or={...D.errors,...Or});let ja=Wt(In),Qr=We(ee,In),pa=ja||Qr||Cn.length>0;return{matches:ne,loaderData:vo,errors:Or,...pa?{workingFetchers:In}:{}}}function He(H){if(H&&!ua(H[1]))return{[H[0]]:H[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function be(H){let Z=new Map(D.fetchers);return H.forEach(ne=>{let ye=Z.get(ne.key),xe=$u(void 0,ye?ye.data:void 0);Z.set(ne.key,xe)}),Z}async function Ue(H,Z,ne,ye){Jt(H);let xe=(ye&&ye.flushSync)===!0,qe=d.activeRoutes,Ve=uy(D.location,D.matches,p,ne,Z,ye?.relative),Xe=Ua(qe,Ve,p,!1,d.branches),$e=ke(Xe,qe,Ve);if($e.active&&$e.matches&&(Xe=$e.matches),!Xe){yt(H,Z,Ca(404,{pathname:Ve}),{flushSync:xe});return}let{path:st,submission:tt,error:St}=Mw(!0,Ve,ye);if(St){yt(H,Z,St,{flushSync:xe});return}let ct=e.getContext?await e.getContext():new Sw,Bt=(ye&&ye.preventScrollReset)===!0;if(tt&&Er(tt.formMethod)){await Ze(H,Z,st,Xe,ct,$e.active,xe,Bt,tt,ye&&ye.defaultShouldRevalidate);return}N.set(H,{routeId:Z,path:st}),await it(H,Z,st,Xe,ct,$e.active,xe,Bt,tt)}async function Ze(H,Z,ne,ye,xe,qe,Ve,Xe,$e,st){De(),N.delete(H);let tt=D.fetchers.get(H);Ie(H,rL($e,tt),{flushSync:Ve});let St=new AbortController,ct=yl(e.history,ne,St.signal,$e);if(qe){let Se=await ze(ye,new URL(ct.url).pathname,ct.signal,H);if(Se.type==="aborted")return;if(Se.type==="error"){yt(H,Z,Se.error,{flushSync:Ve});return}else if(Se.matches)ye=Se.matches;else{yt(H,Z,Ca(404,{pathname:ne}),{flushSync:Ve});return}}let Bt=Qf(ye,ne);if(!Bt.route.action&&!Bt.route.lazy){let Se=Ca(405,{method:$e.formMethod,pathname:ne,routeId:Z});yt(H,Z,Se,{flushSync:Ve});return}V.set(H,St);let Ht=X,On=Ml(u,c,ct,ne,ye,Bt,o,xe),Vt=await we(ct,ne,On,xe,H),Ut=Vt[Bt.route.id];if(!Ut){for(let Se of On)if(Vt[Se.route.id]){Ut=Vt[Se.route.id];break}}if(ct.signal.aborted){V.get(H)===St&&V.delete(H);return}if(W.has(H)){if(ds(Ut)||ua(Ut)){Ie(H,so(void 0));return}}else{if(ds(Ut))if(V.delete(H),ee>Ht){Ie(H,so(void 0));return}else return se.add(H),Ie(H,$u($e)),de(ct,Ut,!1,{fetcherSubmission:$e,preventScrollReset:Xe});if(ua(Ut)){yt(H,Z,Ut.error);return}}let En=D.navigation.location||D.location,Cn=yl(e.history,En,St.signal),Xr=d.activeRoutes,cn=D.navigation.state!=="idle"?Ua(Xr,D.navigation.location,p,!1,d.branches):D.matches;_t(cn,"Didn't find any matches after fetcher action");let dn=++X;q.set(H,dn);let{dsMatches:Mn,revalidatingFetchers:In}=Aw(Cn,xe,u,c,e.history,D,cn,$e,En,o,!1,$,K,W,N,se,Xr,p,e.patchRoutesOnNavigation!=null,d.branches,[Bt.route.id,Ut],st),vo=$u($e,Ut.data),Or=new Map(D.fetchers);Or.set(H,vo),In.filter(Se=>Se.key!==H).forEach(Se=>{let nt=Se.key,Ct=Or.get(nt),wt=$u(void 0,Ct?Ct.data:void 0);Or.set(nt,wt),Jt(nt),Se.controller&&V.set(nt,Se.controller)}),Te({fetchers:Or});let ja=()=>In.forEach(Se=>Jt(Se.key));St.signal.addEventListener("abort",ja);let{loaderResults:Qr,fetcherResults:pa}=await Ke(Mn,In,Cn,En,xe);if(St.signal.aborted)return;St.signal.removeEventListener("abort",ja),q.delete(H),V.delete(H),In.forEach(Se=>V.delete(Se.key));let kt=D.fetchers.has(H),Yn=Se=>{if(!kt)return Se;let nt=new Map(Se.fetchers);return nt.set(H,so(Ut.data)),{...Se,fetchers:nt}},Fn=Df(Qr);if(Fn)return D=Yn(D),de(Cn,Fn.result,!1,{preventScrollReset:Xe});if(Fn=Df(pa),Fn)return se.add(Fn.key),D=Yn(D),de(Cn,Fn.result,!1,{preventScrollReset:Xe});let fr=new Map(D.fetchers);kt&&fr.set(H,so(Ut.data));let{loaderData:he,errors:Ae}=Lw(D,cn,Qr,void 0,In,pa,fr);We(dn,fr),D.navigation.state==="loading"&&dn>ee?(_t(z,"Expected pending action"),J&&J.abort(),ve(D.navigation.location,{matches:cn,loaderData:he,errors:Ae,fetchers:fr})):(Te({errors:Ae,loaderData:zw(D.loaderData,he,cn,Ae),fetchers:fr}),$=!1)}async function it(H,Z,ne,ye,xe,qe,Ve,Xe,$e){let st=D.fetchers.get(H);Ie(H,$u($e,st?st.data:void 0),{flushSync:Ve});let tt=new AbortController,St=yl(e.history,ne,tt.signal);if(qe){let Ut=await ze(ye,new URL(St.url).pathname,St.signal,H);if(Ut.type==="aborted")return;if(Ut.type==="error"){yt(H,Z,Ut.error,{flushSync:Ve});return}else if(Ut.matches)ye=Ut.matches;else{yt(H,Z,Ca(404,{pathname:ne}),{flushSync:Ve});return}}let ct=Qf(ye,ne);V.set(H,tt);let Bt=X,Ht=Ml(u,c,St,ne,ye,ct,o,xe),On=await we(St,ne,Ht,xe,H),Vt=On[ct.route.id];if(!Vt){for(let Ut of ye)if(On[Ut.route.id]){Vt=On[Ut.route.id];break}}if(V.get(H)===tt&&V.delete(H),!St.signal.aborted){if(W.has(H)){Ie(H,so(void 0));return}if(ds(Vt))if(ee>Bt){Ie(H,so(void 0));return}else{se.add(H),await de(St,Vt,!1,{preventScrollReset:Xe});return}if(ua(Vt)){yt(H,Z,Vt.error);return}Ie(H,so(Vt.data))}}async function de(H,Z,ne,{submission:ye,fetcherSubmission:xe,preventScrollReset:qe,replace:Ve}={}){ne||(F?.resolve(),F=null),Z.response.headers.has("X-Remix-Revalidate")&&($=!0);let Xe=Z.response.headers.get("Location");_t(Xe,"Expected a Location header on the redirect Response");let $e=Xe,st=new URL(H.url);Xe=kw(Xe,st,p,e.history),Ol($e,Xe,st,"allow-explicit");let tt=yc(D.location,Xe,{_isRedirect:!0});if(a){let Vt=!1;if(Z.response.headers.has("X-Remix-Reload-Document"))Vt=!0;else if(mv(Xe)){const Ut=RT(n,Xe,!0);Vt=Ut.origin!==n.location.origin||Na(Ut.pathname,p)==null}if(Vt){Ve?n.location.replace(Xe):n.location.assign(Xe);return}}J=null;let St=Ve===!0||Z.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ct,formAction:Bt,formEncType:Ht}=D.navigation;!ye&&!xe&&ct&&Bt&&Ht&&(ye=Uw(D.navigation));let On=ye||xe;if(D5.has(Z.response.status)&&On&&Er(On.formMethod))await Le(St,tt,{submission:{...On,formAction:Xe},preventScrollReset:qe||G,enableViewTransition:ne?Y:void 0});else{let Vt=N0(tt,[],St,ye);await Le(St,tt,{overrideNavigation:Vt,fetcherSubmission:xe,preventScrollReset:qe||G,enableViewTransition:ne?Y:void 0})}}async function we(H,Z,ne,ye,xe){let qe,Ve={};try{qe=await F5(g,H,Z,ne,xe,ye,!1)}catch(Xe){return ne.filter($e=>$e.shouldLoad).forEach($e=>{Ve[$e.route.id]={type:"error",error:Xe}}),Ve}if(H.signal.aborted)return Ve;if(!Er(H.method))for(let Xe of ne){if(qe[Xe.route.id]?.type==="error")break;!qe.hasOwnProperty(Xe.route.id)&&!D.loaderData.hasOwnProperty(Xe.route.id)&&(!D.errors||!D.errors.hasOwnProperty(Xe.route.id))&&Xe.shouldCallHandler()&&(qe[Xe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Xe.route.id}`)})}for(let[Xe,$e]of Object.entries(qe))if(J5($e)){let st=$e.result;Ve[Xe]={type:"redirect",response:Y5(st,H,Xe,ne,p)}}else Ve[Xe]=await q5($e);return Ve}async function Ke(H,Z,ne,ye,xe){let qe=we(ne,ye,H,xe,null),Ve=Promise.all(Z.map(async st=>{if(st.matches&&st.match&&st.request&&st.controller){let St=(await we(st.request,st.path,st.matches,xe,st.key))[st.match.route.id];return{[st.key]:St}}else return Promise.resolve({[st.key]:{type:"error",error:Ca(404,{pathname:st.path})}})})),Xe=await qe,$e=(await Ve).reduce((st,tt)=>Object.assign(st,tt),{});return{loaderResults:Xe,fetcherResults:$e}}function De(){$=!0,N.forEach((H,Z)=>{V.has(Z)&&K.add(Z),Jt(Z)})}function Ie(H,Z,ne={}){let ye=new Map(D.fetchers);ye.set(H,Z),Te({fetchers:ye},{flushSync:(ne&&ne.flushSync)===!0})}function yt(H,Z,ne,ye={}){let xe=wi(D.matches,Z),qe=new Map(D.fetchers);Ot(qe,H),Te({errors:{[xe.route.id]:ne},fetchers:qe},{flushSync:(ye&&ye.flushSync)===!0})}function ut(H){return B.set(H,(B.get(H)||0)+1),W.has(H)&&W.delete(H),D.fetchers.get(H)||N5}function ht(H,Z){Jt(H,Z?.reason),Ie(H,so(null))}function Ot(H,Z){let ne=D.fetchers.get(Z);V.has(Z)&&!(ne&&ne.state==="loading"&&q.has(Z))&&Jt(Z),N.delete(Z),q.delete(Z),se.delete(Z),W.delete(Z),K.delete(Z),H.delete(Z)}function Dt(H){let Z=(B.get(H)||0)-1;Z<=0?(B.delete(H),W.add(H)):B.set(H,Z),Te({fetchers:new Map(D.fetchers)})}function Jt(H,Z){let ne=V.get(H);ne&&(ne.abort(Z),V.delete(H))}function rn(H,Z){for(let ne of H){let ye=Z.get(ne);_t(ye,`Expected fetcher: ${ne}`);let xe=so(ye.data);Z.set(ne,xe)}}function Wt(H){let Z=[],ne=!1;for(let ye of se){let xe=H.get(ye);_t(xe,`Expected fetcher: ${ye}`),xe.state==="loading"&&(se.delete(ye),Z.push(ye),ne=!0)}return rn(Z,H),ne}function We(H,Z){let ne=[];for(let[ye,xe]of q)if(xe<H){let qe=Z.get(ye);_t(qe,`Expected fetcher: ${ye}`),qe.state==="loading"&&(Jt(ye),q.delete(ye),ne.push(ye))}return rn(ne,Z),ne.length>0}function xt(H,Z){let ne=D.blockers.get(H)||Gu;return re.get(H)!==Z&&re.set(H,Z),ne}function $t(H){D.blockers.delete(H),re.delete(H)}function ft(H,Z){let ne=D.blockers.get(H)||Gu;_t(ne.state==="unblocked"&&Z.state==="blocked"||ne.state==="blocked"&&Z.state==="blocked"||ne.state==="blocked"&&Z.state==="proceeding"||ne.state==="blocked"&&Z.state==="unblocked"||ne.state==="proceeding"&&Z.state==="unblocked",`Invalid blocker state transition: ${ne.state} -> ${Z.state}`);let ye=new Map(D.blockers);ye.set(H,Z),Te({blockers:ye})}function vt({currentLocation:H,nextLocation:Z,historyAction:ne}){if(re.size===0)return;re.size>1&&Un(!1,"A router only supports one blocker at a time");let ye=Array.from(re.entries()),[xe,qe]=ye[ye.length-1],Ve=D.blockers.get(xe);if(!(Ve&&Ve.state==="proceeding")&&qe({currentLocation:H,nextLocation:Z,historyAction:ne}))return xe}function gt(H){let Z=Ca(404,{pathname:H}),ne=d.activeRoutes,{matches:ye,route:xe}=Af(ne);return{notFoundMatches:ye,route:xe,error:Z}}function Lt(H,Z,ne){if(w=H,R=Z,C=ne||null,!T&&D.navigation===D0){T=!0;let ye=ot(D.location,D.matches);ye!=null&&Te({restoreScrollPosition:ye})}return()=>{w=null,R=null,C=null}}function un(H,Z){return C&&C(H,Z.map(ye=>CT(ye,D.loaderData)))||H.key}function je(H,Z){if(w&&R){let ne=un(H,Z);w[ne]=R()}}function ot(H,Z){if(w){let ne=un(H,Z),ye=w[ne];if(typeof ye=="number")return ye}return null}function ke(H,Z,ne){if(e.patchRoutesOnNavigation){let ye=d.branches;if(H){if(Object.keys(H[0].params).length>0)return{active:!0,matches:Ua(Z,ne,p,!0,ye)}}else return{active:!0,matches:Ua(Z,ne,p,!0,ye)||[]}}return{active:!1,matches:null}}async function ze(H,Z,ne,ye){if(!e.patchRoutesOnNavigation)return{type:"success",matches:H};let xe=H;for(;;){let qe=c;try{await e.patchRoutesOnNavigation({signal:ne,path:Z,matches:xe,fetcherKey:ye,patch:(st,tt)=>{ne.aborted||Dw(st,tt,d,qe,u,!1)}})}catch(st){return{type:"error",error:st,partialMatches:xe}}if(ne.aborted)return{type:"aborted"};let Ve=d.branches,Xe=Ua(d.activeRoutes,Z,p,!1,Ve),$e=null;if(Xe){if(Object.keys(Xe[0].params).length===0)return{type:"success",matches:Xe};if($e=Ua(d.activeRoutes,Z,p,!0,Ve),!($e&&xe.length<$e.length&&Ge(xe,$e.slice(0,xe.length))))return{type:"success",matches:Xe}}if($e||($e=Ua(d.activeRoutes,Z,p,!0,Ve)),!$e||Ge(xe,$e))return{type:"success",matches:null};xe=$e}}function Ge(H,Z){return H.length===Z.length&&H.every((ne,ye)=>ne.route.id===Z[ye].route.id)}function et(H){c={},d.setHmrRoutes(vc(H,u,void 0,c))}function Et(H,Z,ne=!1){Dw(H,Z,d,c,u,ne),d.hasHMRRoutes||Te({})}return k={get basename(){return p},get future(){return y},get state(){return D},get routes(){return d.stableRoutes},get branches(){return d.branches},get manifest(){return c},get window(){return n},initialize:me,subscribe:ce,enableScrollRestoration:Lt,navigate:Pe,fetch:Ue,revalidate:Me,createHref:H=>e.history.createHref(H),createURL:H=>e.history.createURL(H),encodeLocation:H=>e.history.encodeLocation(H),getFetcher:ut,resetFetcher:ht,deleteFetcher:Dt,dispose:ge,getBlocker:xt,deleteBlocker:$t,patchRoutes:Et,_internalFetchControllers:V,_internalSetRoutes:et,_internalSetStateDoNotUseOrYouWillBreakYourApp(H){Te(H)}},e.instrumentations&&(k=S5(k,e.instrumentations.map(H=>H.router).filter(Boolean))),k}function P5(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function uy(e,n,a,o,s,u){let c,d;if(s){c=[];for(let g of n)if(c.push(g),g.route.id===s){d=g;break}}else c=n,d=n[n.length-1];let p=zc(o||".",gp(c),Na(e.pathname,a)||e.pathname,u==="path");if(o==null&&(p.search=e.search,p.hash=e.hash),(o==null||o===""||o===".")&&d){let g=Sv(p.search);if(d.route.index&&!g)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&g){let y=new URLSearchParams(p.search),h=y.getAll("index");y.delete("index"),h.filter(x=>x).forEach(x=>y.append("index",x));let b=y.toString();p.search=b?`?${b}`:""}}return a!=="/"&&(p.pathname=p5({basename:a,pathname:p.pathname})),Lr(p)}function Mw(e,n,a){if(!a||!P5(a))return{path:n};if(a.formMethod&&!tL(a.formMethod))return{path:n,error:Ca(405,{method:a.formMethod})};let o=()=>({path:n,error:Ca(400,{type:"invalid-body"})}),u=(a.formMethod||"get").toUpperCase(),c=YT(n);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Er(u))return o();let h=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((b,[x,w])=>`${b}${x}=${w}
|
|
11
|
+
`,""):String(a.body);return{path:n,submission:{formMethod:u,formAction:c,formEncType:a.formEncType,formData:void 0,json:void 0,text:h}}}else if(a.formEncType==="application/json"){if(!Er(u))return o();try{let h=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:n,submission:{formMethod:u,formAction:c,formEncType:a.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}_t(typeof FormData=="function","FormData is not available in this environment");let d,p;if(a.formData)d=fy(a.formData),p=a.formData;else if(a.body instanceof FormData)d=fy(a.body),p=a.body;else if(a.body instanceof URLSearchParams)d=a.body,p=Pw(d);else if(a.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(a.body),p=Pw(d)}catch{return o()}let g={formMethod:u,formAction:c,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Er(g.formMethod))return{path:n,submission:g};let y=Ka(n);return e&&y.search&&Sv(y.search)&&d.append("index",""),y.search=`?${d}`,{path:Lr(y),submission:g}}function Aw(e,n,a,o,s,u,c,d,p,g,y,h,b,x,w,C,R,T,O,M,A,I){let j=A?ua(A[1])?A[1].error:A[1].data:void 0,k=s.createURL(u.location),D=s.createURL(p),z;if(y&&u.errors){let L=Object.keys(u.errors)[0];z=c.findIndex($=>$.route.id===L)}else if(A&&ua(A[1])){let L=A[0];z=c.findIndex($=>$.route.id===L)-1}let F=A?A[1].statusCode:void 0,G=F&&F>=400,J={currentUrl:k,currentParams:u.matches[0]?.params||{},nextUrl:D,nextParams:c[0].params,...d,actionResult:j,actionStatus:F},Y=Hc(c),U=c.map((L,$)=>{let{route:K}=L,V=null;if(z!=null&&$>z)V=!1;else if(K.lazy)V=!0;else if(!bv(K))V=!1;else if(y){let{shouldLoad:se}=_T(K,u.loaderData,u.errors);V=se}else L5(u.loaderData,u.matches[$],L)&&(V=!0);if(V!==null)return cy(a,o,e,p,Y,L,g,n,V);let X=!1;typeof I=="boolean"?X=I:G?X=!1:(h||k.pathname+k.search===D.pathname+D.search||k.search!==D.search||z5(u.matches[$],L))&&(X=!0);let ee={...J,defaultShouldRevalidate:X},q=ac(L,ee);return cy(a,o,e,p,Y,L,g,n,q,ee,I)}),_=[];return w.forEach((L,$)=>{if(y||!c.some(B=>B.route.id===L.routeId)||x.has($))return;let K=u.fetchers.get($),V=K&&K.state!=="idle"&&K.data===void 0,X=Ua(R,L.path,T??"/",!1,M);if(!X){if(O&&V)return;_.push({key:$,routeId:L.routeId,path:L.path,matches:null,match:null,request:null,controller:null});return}if(C.has($))return;let ee=Qf(X,L.path),q=new AbortController,se=yl(s,L.path,q.signal),N=null;if(b.has($))b.delete($),N=Ml(a,o,se,L.path,X,ee,g,n);else if(V)h&&(N=Ml(a,o,se,L.path,X,ee,g,n));else{let B;typeof I=="boolean"?B=I:G?B=!1:B=h;let W={...J,defaultShouldRevalidate:B};ac(ee,W)&&(N=Ml(a,o,se,L.path,X,ee,g,n,W))}N&&_.push({key:$,routeId:L.routeId,path:L.path,matches:N,match:ee,request:se,controller:q})}),{dsMatches:U,revalidatingFetchers:_}}function bv(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function _T(e,n,a){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!bv(e))return{shouldLoad:!1,renderFallback:!1};let o=n!=null&&e.id in n,s=a!=null&&a[e.id]!==void 0;if(!o&&s)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!o};let u=!o&&!s;return{shouldLoad:u,renderFallback:u}}function L5(e,n,a){let o=!n||a.route.id!==n.route.id,s=!e.hasOwnProperty(a.route.id);return o||s}function z5(e,n){let a=e.route.path;return e.pathname!==n.pathname||a!=null&&a.endsWith("*")&&e.params["*"]!==n.params["*"]}function ac(e,n){if(e.route.shouldRevalidate){let a=e.route.shouldRevalidate(n);if(typeof a=="boolean")return a}return n.defaultShouldRevalidate}function Dw(e,n,a,o,s,u){let c;if(e){let g=o[e];_t(g,`No route found to patch children into: routeId = ${e}`),g.children||(g.children=[]),c=g.children}else c=a.activeRoutes;let d=[],p=[];if(n.forEach(g=>{let y=c.find(h=>HT(g,h));y?p.push({existingRoute:y,newRoute:g}):d.push(g)}),d.length>0){let g=vc(d,s,[e||"_","patch",String(c?.length||"0")],o);c.push(...g)}if(u&&p.length>0)for(let g=0;g<p.length;g++){let{existingRoute:y,newRoute:h}=p[g],b=y,[x]=vc([h],s,[],{},!0);Object.assign(b,{element:x.element?x.element:b.element,errorElement:x.errorElement?x.errorElement:b.errorElement,hydrateFallbackElement:x.hydrateFallbackElement?x.hydrateFallbackElement:b.hydrateFallbackElement})}a.hasHMRRoutes||a.setRoutes([...a.activeRoutes])}function HT(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children?.every((a,o)=>n.children?.some(s=>HT(a,s)))??!1:!1}var Nw=new WeakMap,UT=({key:e,route:n,manifest:a,mapRouteProperties:o})=>{let s=a[n.id];if(_t(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let u=s.lazy[e];if(!u)return;let c=Nw.get(s);c||(c={},Nw.set(s,c));let d=c[e];if(d)return d;let p=(async()=>{let g=WP(e),h=s[e]!==void 0&&e!=="hasErrorBoundary";if(g)Un(!g,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),c[e]=Promise.resolve();else if(h)Un(!1,`Route "${s.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let b=await u();b!=null&&(Object.assign(s,{[e]:b}),Object.assign(s,o(s)))}typeof s.lazy=="object"&&(s.lazy[e]=void 0,Object.values(s.lazy).every(b=>b===void 0)&&(s.lazy=void 0))})();return c[e]=p,p},Iw=new WeakMap;function _5(e,n,a,o,s){let u=a[e.id];if(_t(u,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let y=Iw.get(u);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let h=(async()=>{_t(typeof e.lazy=="function","No lazy route function found");let b=await e.lazy(),x={};for(let w in b){let C=b[w];if(C===void 0)continue;let R=t5(w),O=u[w]!==void 0&&w!=="hasErrorBoundary";R?Un(!R,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?Un(!O,`Route "${u.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):x[w]=C}Object.assign(u,x),Object.assign(u,{...o(u),lazy:void 0})})();return Iw.set(u,h),h.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:h}}let c=Object.keys(e.lazy),d=[],p;for(let y of c){if(s&&s.includes(y))continue;let h=UT({key:y,route:e,manifest:a,mapRouteProperties:o});h&&(d.push(h),y===n&&(p=h))}let g=d.length>0?Promise.all(d).then(()=>{}):void 0;return g?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:p}}async function jw(e){let n=e.matches.filter(s=>s.shouldLoad),a={};return(await Promise.all(n.map(s=>s.resolve()))).forEach((s,u)=>{a[n[u].route.id]=s}),a}async function H5(e){return e.matches.some(n=>n.route.middleware)?FT(e,()=>jw(e)):jw(e)}function FT(e,n){return U5(e,n,o=>{if(eL(o))throw o;return o},Q5,a);function a(o,s,u){if(u)return Promise.resolve(Object.assign(u.value,{[s]:{type:"error",result:o}}));{let{matches:c}=e,d=Math.min(Math.max(c.findIndex(g=>g.route.id===s),0),Math.max(c.findIndex(g=>g.shouldCallHandler()),0)),p=wi(c,c[d].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:o}})}}}async function U5(e,n,a,o,s){let{matches:u,...c}=e,d=u.flatMap(g=>g.route.middleware?g.route.middleware.map(y=>[g.route.id,y]):[]);return await BT(c,d,n,a,o,s)}async function BT(e,n,a,o,s,u,c=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let p=n[c];if(!p)return await a();let[g,y]=p,h,b=async()=>{if(h)throw new Error("You may only call `next()` once per middleware");try{return h={value:await BT(e,n,a,o,s,u,c+1)},h.value}catch(x){return h={value:await u(x,g,h)},h.value}};try{let x=await y(e,b),w=x!=null?o(x):void 0;return s(w)?w:h?w??h.value:(h={value:await b()},h.value)}catch(x){return await u(x,g,h)}}function VT(e,n,a,o,s){let u=UT({key:"middleware",route:o.route,manifest:n,mapRouteProperties:e}),c=_5(o.route,Er(a.method)?"action":"loader",n,e,s);return{middleware:u,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function cy(e,n,a,o,s,u,c,d,p,g=null,y){let h=!1,b=VT(e,n,a,u,c);return{...u,_lazyPromises:b,shouldLoad:p,shouldRevalidateArgs:g,shouldCallHandler(x){return h=!0,g?typeof y=="boolean"?ac(u,{...g,defaultShouldRevalidate:y}):typeof x=="boolean"?ac(u,{...g,defaultShouldRevalidate:x}):ac(u,g):p},resolve(x){let{lazy:w,loader:C,middleware:R}=u.route,T=h||p||x&&!Er(a.method)&&(w||C),O=R&&R.length>0&&!C&&!w;return T&&(Er(a.method)||!O)?B5({request:a,path:o,pattern:s,match:u,lazyHandlerPromise:b?.handler,lazyRoutePromise:b?.route,handlerOverride:x,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Ml(e,n,a,o,s,u,c,d,p=null){return s.map(g=>g.route.id!==u.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:p,shouldCallHandler:()=>!1,_lazyPromises:VT(e,n,a,g,c),resolve:()=>Promise.resolve({type:"data",result:void 0})}:cy(e,n,a,o,Hc(s),g,c,d,!0,p))}async function F5(e,n,a,o,s,u,c){o.some(y=>y._lazyPromises?.middleware)&&await Promise.all(o.map(y=>y._lazyPromises?.middleware));let d={request:n,url:qT(n,a),pattern:Hc(o),params:o[0].params,context:u,matches:o},g=await e({...d,fetcherKey:s,runClientMiddleware:y=>{let h=d;return FT(h,()=>y({...h,fetcherKey:s,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(o.flatMap(y=>[y._lazyPromises?.handler,y._lazyPromises?.route]))}catch{}return g}async function B5({request:e,path:n,pattern:a,match:o,lazyHandlerPromise:s,lazyRoutePromise:u,handlerOverride:c,scopedContext:d}){let p,g,y=Er(e.method),h=y?"action":"loader",b=x=>{let w,C=new Promise((O,M)=>w=M);g=()=>w(),e.signal.addEventListener("abort",g);let R=O=>typeof x!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${o.route.id}]`)):x({request:e,url:qT(e,n),pattern:a,params:o.params,context:d},...O!==void 0?[O]:[]),T=(async()=>{try{return{type:"data",result:await(c?c(M=>R(M)):R())}}catch(O){return{type:"error",result:O}}})();return Promise.race([T,C])};try{let x=y?o.route.action:o.route.loader;if(s||u)if(x){let w,[C]=await Promise.all([b(x).catch(R=>{w=R}),s,u]);if(w!==void 0)throw w;p=C}else{await s;let w=y?o.route.action:o.route.loader;if(w)[p]=await Promise.all([b(w),u]);else if(h==="action"){let C=new URL(e.url),R=C.pathname+C.search;throw Ca(405,{method:e.method,pathname:R,routeId:o.route.id})}else return{type:"data",result:void 0}}else if(x)p=await b(x);else{let w=new URL(e.url),C=w.pathname+w.search;throw Ca(404,{pathname:C})}}catch(x){return{type:"error",result:x}}finally{g&&e.signal.removeEventListener("abort",g)}return p}async function V5(e){let n=e.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?e.body==null?null:e.json():e.text()}async function q5(e){let{result:n,type:a}=e;if(xv(n)){let o;try{o=await V5(n)}catch(s){return{type:"error",error:s}}return a==="error"?{type:"error",error:new _c(n.status,n.statusText,o),statusCode:n.status,headers:n.headers}:{type:"data",data:o,statusCode:n.status,headers:n.headers}}return a==="error"?Hw(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:X5(n),statusCode:bc(n)?n.status:void 0,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:bc(n)?n.status:void 0}:Hw(n)?{type:"data",data:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function Y5(e,n,a,o,s){let u=e.headers.get("Location");if(_t(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!mv(u)){let c=o.slice(0,o.findIndex(d=>d.route.id===a)+1);u=uy(new URL(n.url),c,s,u),e.headers.set("Location",u)}return e}var K5=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function dy(e){try{return K5.includes(new URL(e).protocol)}catch{return!1}}function kw(e,n,a,o){if(mv(e)){let s=e,u=pp.test(s)?new URL(wT(s,n.protocol)):new URL(s);if(dy(u.toString()))throw new Error("Invalid redirect location");let c=Na(u.pathname,a)!=null;if(u.origin===n.origin&&c)return yv(u.pathname)+u.search+u.hash}try{let s=o.createURL(e);if(dy(s.toString()))throw new Error("Invalid redirect location")}catch{}return e}function yl(e,n,a,o){let s=e.createURL(YT(n)).toString(),u={signal:a};if(o&&Er(o.formMethod)){let{formMethod:c,formEncType:d}=o;u.method=c.toUpperCase(),d==="application/json"?(u.headers=new Headers({"Content-Type":d}),u.body=JSON.stringify(o.json)):d==="text/plain"?u.body=o.text:d==="application/x-www-form-urlencoded"&&o.formData?u.body=fy(o.formData):u.body=o.formData}return new Request(s,u)}function qT(e,n){let a=new URL(e.url),o=typeof n=="string"?Ka(n):n;if(a.pathname=o.pathname||"/",o.search){let s=new URLSearchParams(o.search),u=s.getAll("index");s.delete("index");for(let c of u.filter(Boolean))s.append("index",c);a.search=s.size?`?${s.toString()}`:""}else a.search="";return a.hash=o.hash||"",a}function fy(e){let n=new URLSearchParams;for(let[a,o]of e.entries())n.append(a,typeof o=="string"?o:o.name);return n}function Pw(e){let n=new FormData;for(let[a,o]of e.entries())n.append(a,o);return n}function G5(e,n,a,o=!1,s=!1){let u={},c=null,d,p=!1,g={},y=a&&ua(a[1])?a[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in n))return;let b=h.route.id,x=n[b];if(_t(!ds(x),"Cannot handle redirect results in processLoaderData"),ua(x)){let w=x.error;if(y!==void 0&&(w=y,y=void 0),c=c||{},s)c[b]=w;else{let C=wi(e,b);c[C.route.id]==null&&(c[C.route.id]=w)}o||(u[b]=zT),p||(p=!0,d=bc(x.error)?x.error.status:500),x.headers&&(g[b]=x.headers)}else u[b]=x.data,x.statusCode&&x.statusCode!==200&&!p&&(d=x.statusCode),x.headers&&(g[b]=x.headers)}),y!==void 0&&a&&(c={[a[0]]:y},a[2]&&(u[a[2]]=void 0)),{loaderData:u,errors:c,statusCode:d||200,loaderHeaders:g}}function Lw(e,n,a,o,s,u,c){let{loaderData:d,errors:p}=G5(n,a,o);return s.filter(g=>!g.matches||g.matches.some(y=>y.shouldLoad)).forEach(g=>{let{key:y,match:h,controller:b}=g;if(b&&b.signal.aborted)return;let x=u[y];if(_t(x,"Did not find corresponding fetcher result"),ua(x)){let w=wi(e.matches,h?.route.id);p&&p[w.route.id]||(p={...p,[w.route.id]:x.error}),c.delete(y)}else if(ds(x))_t(!1,"Unhandled fetcher revalidation redirect");else{let w=so(x.data);c.set(y,w)}}),{loaderData:d,errors:p}}function zw(e,n,a,o){let s=Object.entries(n).filter(([,u])=>u!==zT).reduce((u,[c,d])=>(u[c]=d,u),{});for(let u of a){let c=u.route.id;if(!n.hasOwnProperty(c)&&e.hasOwnProperty(c)&&u.route.loader&&(s[c]=e[c]),o&&o.hasOwnProperty(c))break}return s}function _w(e){return e?ua(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function wi(e,n){return(n?e.slice(0,e.findIndex(o=>o.route.id===n)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function Af(e){let n=e.length===1?e[0]:e.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function Ca(e,{pathname:n,routeId:a,method:o,type:s,message:u}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(c="Bad Request",o&&n&&a?d=`You made a ${o} request to "${n}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:s==="invalid-body"&&(d="Unable to encode submission body")):e===403?(c="Forbidden",d=`Route "${a}" does not match URL "${n}"`):e===404?(c="Not Found",d=`No route matches URL "${n}"`):e===405&&(c="Method Not Allowed",o&&n&&a?d=`You made a ${o.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:o&&(d=`Invalid request method "${o.toUpperCase()}"`)),new _c(e||500,c,new Error(d),!0)}function Df(e){let n=Object.entries(e);for(let a=n.length-1;a>=0;a--){let[o,s]=n[a];if(ds(s))return{key:o,result:s}}}function YT(e){let n=typeof e=="string"?Ka(e):e;return Lr({...n,hash:""})}function $5(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function X5(e){return new _c(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Q5(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([n,a])=>typeof n=="string"&&Z5(a))}function Z5(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function J5(e){return xv(e.result)&&PT.has(e.result.status)}function ua(e){return e.type==="error"}function ds(e){return(e&&e.type)==="redirect"}function Hw(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function xv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function W5(e){return PT.has(e)}function eL(e){return xv(e)&&W5(e.status)&&e.headers.has("Location")}function tL(e){return A5.has(e.toUpperCase())}function Er(e){return O5.has(e.toUpperCase())}function Sv(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function Qf(e,n){let a=typeof n=="string"?Ka(n).search:n.search;if(e[e.length-1].route.index&&Sv(a||""))return e[e.length-1];let o=DT(e);return o[o.length-1]}function Uw(e){let{formMethod:n,formAction:a,formEncType:o,text:s,formData:u,json:c}=e;if(!(!n||!a||!o)){if(s!=null)return{formMethod:n,formAction:a,formEncType:o,formData:void 0,json:void 0,text:s};if(u!=null)return{formMethod:n,formAction:a,formEncType:o,formData:u,json:void 0,text:void 0};if(c!==void 0)return{formMethod:n,formAction:a,formEncType:o,formData:void 0,json:c,text:void 0}}}function N0(e,n,a,o){return o?{state:"loading",location:e,matches:n,historyAction:a,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}:{state:"loading",location:e,matches:n,historyAction:a,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function nL(e,n,a,o){return{state:"submitting",location:e,matches:n,historyAction:a,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}}function $u(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function rL(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function so(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function aL(e,n){try{let a=e.sessionStorage.getItem(LT);if(a){let o=JSON.parse(a);for(let[s,u]of Object.entries(o||{}))u&&Array.isArray(u)&&n.set(s,new Set(u||[]))}}catch{}}function oL(e,n){if(n.size>0){let a={};for(let[o,s]of n)a[o]=[...s];try{e.sessionStorage.setItem(LT,JSON.stringify(a))}catch(o){Un(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function Fw(){let e,n,a=new Promise((o,s)=>{e=async u=>{o(u);try{await a}catch{}},n=async u=>{s(u);try{await a}catch{}}});return{promise:a,resolve:e,reject:n}}var Es=v.createContext(null);Es.displayName="DataRouter";var Uc=v.createContext(null);Uc.displayName="DataRouterState";var KT=v.createContext(!1);function GT(){return v.useContext(KT)}var wv=v.createContext({isTransitioning:!1});wv.displayName="ViewTransition";var $T=v.createContext(new Map);$T.displayName="Fetchers";var iL=v.createContext(null);iL.displayName="Await";var ha=v.createContext(null);ha.displayName="Navigation";var mp=v.createContext(null);mp.displayName="Location";var Ga=v.createContext({outlet:null,matches:[],isDataRoute:!1});Ga.displayName="Route";var Rv=v.createContext(null);Rv.displayName="RouteError";var XT="REACT_ROUTER_ERROR",sL="REDIRECT",lL="ROUTE_ERROR_RESPONSE";function uL(e){if(e.startsWith(`${XT}:${sL}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function cL(e){if(e.startsWith(`${XT}:${lL}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new _c(n.status,n.statusText,n.data)}catch{}}function dL(e,{relative:n}={}){_t(Vl(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:o}=v.useContext(ha),{hash:s,pathname:u,search:c}=Fc(e,{relative:n}),d=u;return a!=="/"&&(d=u==="/"?a:Aa([a,u])),o.createHref({pathname:d,search:c,hash:s})}function Vl(){return v.useContext(mp)!=null}function $r(){return _t(Vl(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(mp).location}var QT="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ZT(e){v.useContext(ha).static||v.useLayoutEffect(e)}function yp(){let{isDataRoute:e}=v.useContext(Ga);return e?TL():fL()}function fL(){_t(Vl(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(Es),{basename:n,navigator:a}=v.useContext(ha),{matches:o}=v.useContext(Ga),{pathname:s}=$r(),u=JSON.stringify(gp(o)),c=v.useRef(!1);return ZT(()=>{c.current=!0}),v.useCallback((p,g={})=>{if(Un(c.current,QT),!c.current)return;if(typeof p=="number"){a.go(p);return}let y=zc(p,JSON.parse(u),s,g.relative==="path");e==null&&n!=="/"&&(y.pathname=y.pathname==="/"?n:Aa([n,y.pathname])),Ol(typeof p=="string"?p:Lr(p),a.createHref(y),vv(a),"reject"),(g.replace?a.replace:a.push)(y,g.state,g)},[n,a,u,s,e])}var hL=v.createContext(null);function pL(e){let n=v.useContext(Ga).outlet;return v.useMemo(()=>n&&v.createElement(hL.Provider,{value:e},n),[n,e])}function Fc(e,{relative:n}={}){let{matches:a}=v.useContext(Ga),{pathname:o}=$r(),s=JSON.stringify(gp(a));return v.useMemo(()=>zc(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function gL(e,n,a){_t(Vl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=v.useContext(ha),{matches:s}=v.useContext(Ga),u=s[s.length-1],c=u?u.params:{},d=u?u.pathname:"/",p=u?u.pathnameBase:"/",g=u&&u.route;{let R=g&&g.path||"";eO(d,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
12
12
|
|
|
13
|
-
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let y=$r(),h;h=y;let b=h.pathname||"/",x=b;if(p!=="/"){let R=p.replace(/^\//,"").split("/");x="/"+b.replace(/^\//,"").split("/").slice(R.length).join("/")}let w=a&&a.state.matches.length?a.state.matches.map(R=>Object.assign(R,{route:a.manifest[R.route.id]||R.route})):CT(e,{pathname:x});return Un(g||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Un(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),bL(w&&w.map(R=>Object.assign({},R,{params:Object.assign({},c,R.params),pathname:Aa([p,o.encodeLocation?o.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?p:Aa([p,o.encodeLocation?o.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),s,a)}function gL(){let e=EL(),n=bc(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:u},"ErrorBoundary")," or"," ",v.createElement("code",{style:u},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},n),a?v.createElement("pre",{style:s},a):null,c)}var mL=v.createElement(gL,null),WT=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=uL(e.digest);a&&(e=a)}let n=e!==void 0?v.createElement(Ga.Provider,{value:this.props.routeContext},v.createElement(Rv.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(yL,{error:e},n):n}};WT.contextType=GT;var I0=new WeakMap;function yL({children:e,error:n}){let{basename:a,navigator:o}=v.useContext(ha);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let s=lL(n.digest);if(s){let u=I0.get(n);if(u)throw u;let c=jT(s.location,a),d=c.absoluteURL||c.to;if(Ol(s.location,d,vv(o),"allow-explicit"),dy(d))throw new Error("Invalid redirect location");if(IT&&!I0.get(n))if(c.isExternal||s.reloadDocument)window.location.href=d;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:s.replace}));throw I0.set(n,p),p}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function vL({routeContext:e,match:n,children:a}){let o=v.useContext(Es);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Ga.Provider,{value:e},a)}function bL(e,n=[],a){let o=a?.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(n.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let s=e,u=o?.errors;if(u!=null){let y=s.findIndex(h=>h.route.id&&u?.[h.route.id]!==void 0);_t(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,d=-1;if(a&&o){c=o.renderFallback;for(let y=0;y<s.length;y++){let h=s[y];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=y),h.route.id){let{loaderData:b,errors:x}=o,w=h.route.loader&&!b.hasOwnProperty(h.route.id)&&(!x||x[h.route.id]===void 0);if(h.route.lazy||w){a.isStatic&&(c=!0),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let p=a?.onError,g=o&&p?(y,h)=>{p(y,{location:o.location,params:o.matches?.[0]?.params??{},pattern:Hc(o.matches),errorInfo:h})}:void 0;return s.reduceRight((y,h,b)=>{let x,w=!1,C=null,R=null;o&&(x=u&&h.route.id?u[h.route.id]:void 0,C=h.route.errorElement||mL,c&&(d<0&&b===0?(tO("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,R=null):d===b&&(w=!0,R=h.route.hydrateFallbackElement||null)));let T=n.concat(s.slice(0,b+1)),O=()=>{let M;return x?M=C:w?M=R:h.route.Component?M=v.createElement(h.route.Component,null):h.route.element?M=h.route.element:M=y,v.createElement(vL,{match:h,routeContext:{outlet:y,matches:T,isDataRoute:o!=null},children:M})};return o&&(h.route.ErrorBoundary||h.route.errorElement||b===0)?v.createElement(WT,{location:o.location,revalidation:o.revalidation,component:C,error:x,children:O(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:g}):O()},null)}function Ev(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xL(e){let n=v.useContext(Es);return _t(n,Ev(e)),n}function eO(e){let n=v.useContext(Uc);return _t(n,Ev(e)),n}function SL(e){let n=v.useContext(Ga);return _t(n,Ev(e)),n}function Cv(e){let n=SL(e),a=n.matches[n.matches.length-1];return _t(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function wL(){return Cv("useRouteId")}function RL(){let{matches:e,loaderData:n}=eO("useMatches");return v.useMemo(()=>e.map(a=>TT(a,n)),[e,n])}function EL(){let e=v.useContext(Rv),n=eO("useRouteError"),a=Cv("useRouteError");return e!==void 0?e:n.errors?.[a]}function CL(){let{router:e}=xL("useNavigate"),n=Cv("useNavigate"),a=v.useRef(!1);return JT(()=>{a.current=!0}),v.useCallback(async(s,u={})=>{Un(a.current,ZT),a.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:n,...u}))},[e,n])}var Vw={};function tO(e,n,a){!n&&!Vw[e]&&(Vw[e]=!0,Un(!1,a))}var qw={};function Yw(e,n){!e&&!qw[n]&&(qw[n]=!0,console.warn(n))}var TL="useOptimistic",Kw=YR[TL],OL=()=>{};function ML(e){return Kw?Kw(e):[e,OL]}function AL(e){let n={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Un(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:v.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Un(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Un(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),n}var DL=["HydrateFallback","hydrateFallbackElement"],NL=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",e(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",n(a))}})}};function IL({router:e,flushSync:n,onError:a,useTransitions:o}){o=$T()||o;let[u,c]=v.useState(e.state),[d,p]=ML(u),[g,y]=v.useState(),[h,b]=v.useState({isTransitioning:!1}),[x,w]=v.useState(),[C,R]=v.useState(),[T,O]=v.useState(),M=v.useRef(new Map),A=v.useCallback((D,{deletedFetchers:z,newErrors:F,flushSync:G,viewTransitionOpts:J})=>{F&&a&&Object.values(F).forEach(U=>a(U,{location:D.location,params:D.matches[0]?.params??{},pattern:Hc(D.matches)})),D.fetchers.forEach((U,_)=>{U.data!==void 0&&M.current.set(_,U.data)}),z.forEach(U=>M.current.delete(U)),Yw(G===!1||n!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Yw(J==null||Y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!J||!Y){n&&G?n(()=>c(D)):o===!1?c(D):v.startTransition(()=>{o===!0&&p(U=>Gw(U,D)),c(D)});return}if(n&&G){n(()=>{C&&(x?.resolve(),C.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:J.currentLocation,nextLocation:J.nextLocation})});let U=e.window.document.startViewTransition(()=>{n(()=>c(D))});U.finished.finally(()=>{n(()=>{w(void 0),R(void 0),y(void 0),b({isTransitioning:!1})})}),n(()=>R(U));return}C?(x?.resolve(),C.skipTransition(),O({state:D,currentLocation:J.currentLocation,nextLocation:J.nextLocation})):(y(D),b({isTransitioning:!0,flushSync:!1,currentLocation:J.currentLocation,nextLocation:J.nextLocation}))},[e.window,n,C,x,o,p,a]);v.useLayoutEffect(()=>e.subscribe(A),[e,A]),v.useEffect(()=>{h.isTransitioning&&!h.flushSync&&w(new NL)},[h]),v.useEffect(()=>{if(x&&g&&e.window){let D=g,z=x.promise,F=e.window.document.startViewTransition(async()=>{o===!1?c(D):v.startTransition(()=>{o===!0&&p(G=>Gw(G,D)),c(D)}),await z});F.finished.finally(()=>{w(void 0),R(void 0),y(void 0),b({isTransitioning:!1})}),R(F)}},[g,x,e.window,o,p]),v.useEffect(()=>{x&&g&&d.location.key===g.location.key&&x.resolve()},[x,C,d.location,g]),v.useEffect(()=>{!h.isTransitioning&&T&&(y(T.state),b({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}),O(void 0))},[h.isTransitioning,T]);let I=v.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:D=>e.navigate(D),push:(D,z,F)=>e.navigate(D,{state:z,preventScrollReset:F?.preventScrollReset}),replace:(D,z,F)=>e.navigate(D,{replace:!0,state:z,preventScrollReset:F?.preventScrollReset})}),[e]),j=e.basename||"/",k=v.useMemo(()=>({router:e,navigator:I,static:!1,basename:j,onError:a}),[e,I,j,a]);return v.createElement(v.Fragment,null,v.createElement(Es.Provider,{value:k},v.createElement(Uc.Provider,{value:d},v.createElement(XT.Provider,{value:M.current},v.createElement(wv.Provider,{value:h},v.createElement(LL,{basename:j,location:d.location,navigationType:d.historyAction,navigator:I,useTransitions:o},v.createElement(jL,{routes:e.routes,manifest:e.manifest,future:e.future,state:d,isStatic:!1,onError:a})))))),null)}function Gw(e,n){return{...e,navigation:n.navigation.state!=="idle"?n.navigation:e.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:e.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:e.actionData,fetchers:n.fetchers}}var jL=v.memo(kL);function kL({routes:e,manifest:n,future:a,state:o,isStatic:s,onError:u}){return pL(e,void 0,{manifest:n,state:o,isStatic:s,onError:u})}function PL({to:e,replace:n,state:a,relative:o}){_t(Vl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s,navigator:u}=v.useContext(ha);Un(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=v.useContext(Ga),{pathname:d}=$r(),p=yp(),g=zc(e,gp(c),d,o==="path");Ol(typeof e=="string"?e:Lr(e),u.createHref(g),vv(u),"reject");let y=JSON.stringify(g);return v.useEffect(()=>{p(JSON.parse(y),{replace:n,state:a,relative:o})},[p,y,o,n,a]),null}function nO(e){return hL(e.context)}function LL({basename:e="/",children:n=null,location:a,navigationType:o="POP",navigator:s,static:u=!1,useTransitions:c}){_t(!Vl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=v.useMemo(()=>({basename:d,navigator:s,static:u,useTransitions:c,future:{}}),[d,s,u,c]);typeof a=="string"&&(a=Ka(a));let{pathname:g="/",search:y="",hash:h="",state:b=null,key:x="default",mask:w}=a,C=v.useMemo(()=>{let R=Na(g,d);return R==null?null:{location:{pathname:R,search:y,hash:h,state:b,key:x,mask:w},navigationType:o}},[d,g,y,h,b,x,o,w]);return Un(C!=null,`<Router basename="${d}"> is not able to match the URL "${g}${y}${h}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:v.createElement(ha.Provider,{value:p},v.createElement(mp.Provider,{children:n,value:C}))}var Zf="get",Jf="application/x-www-form-urlencoded";function vp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function zL(e){return vp(e)&&e.tagName.toLowerCase()==="button"}function _L(e){return vp(e)&&e.tagName.toLowerCase()==="form"}function HL(e){return vp(e)&&e.tagName.toLowerCase()==="input"}function UL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function FL(e,n){return e.button===0&&(!n||n==="_self")&&!UL(e)}function hy(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,a)=>{let o=e[a];return n.concat(Array.isArray(o)?o.map(s=>[a,s]):[[a,o]])},[]))}function BL(e,n){let a=hy(e);return n&&n.forEach((o,s)=>{a.has(s)||n.getAll(s).forEach(u=>{a.append(s,u)})}),a}var Nf=null;function VL(){if(Nf===null)try{new FormData(document.createElement("form"),0),Nf=!1}catch{Nf=!0}return Nf}var qL=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function j0(e){return e!=null&&!qL.has(e)?(Un(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jf}"`),null):e}function YL(e,n){let a,o,s,u,c;if(_L(e)){let d=e.getAttribute("action");o=d?Na(d,n):null,a=e.getAttribute("method")||Zf,s=j0(e.getAttribute("enctype"))||Jf,u=new FormData(e)}else if(zL(e)||HL(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||d.getAttribute("action");if(o=p?Na(p,n):null,a=e.getAttribute("formmethod")||d.getAttribute("method")||Zf,s=j0(e.getAttribute("formenctype"))||j0(d.getAttribute("enctype"))||Jf,u=new FormData(d,e),!VL()){let{name:g,type:y,value:h}=e;if(y==="image"){let b=g?`${g}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else g&&u.append(g,h)}}else{if(vp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Zf,o=null,s=Jf,c=e}return u&&s==="text/plain"&&(c=u,u=void 0),{action:o,method:a.toLowerCase(),encType:s,formData:u,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Tv(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function rO(e,n,a,o){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${o}`:s.pathname=`${s.pathname}.${o}`:s.pathname==="/"?s.pathname=`_root.${o}`:n&&Na(s.pathname,n)==="/"?s.pathname=`${Ll(n)}/_root.${o}`:s.pathname=`${Ll(s.pathname)}.${o}`,s}async function KL(e,n){if(e.id in n)return n[e.id];try{let a=await import(e.module);return n[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function GL(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function $L(e,n,a){let o=await Promise.all(e.map(async s=>{let u=n.routes[s.route.id];if(u){let c=await KL(u,a);return c.links?c.links():[]}return[]}));return JL(o.flat(1).filter(GL).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function $w(e,n,a,o,s,u){let c=(p,g)=>a[g]?p.route.id!==a[g].route.id:!0,d=(p,g)=>a[g].pathname!==p.pathname||a[g].route.path?.endsWith("*")&&a[g].params["*"]!==p.params["*"];return u==="assets"?n.filter((p,g)=>c(p,g)||d(p,g)):u==="data"?n.filter((p,g)=>{let y=o.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(c(p,g)||d(p,g))return!0;if(p.route.shouldRevalidate){let h=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function XL(e,n,{includeHydrateFallback:a}={}){return QL(e.map(o=>{let s=n.routes[o.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),a&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function QL(e){return[...new Set(e)]}function ZL(e){let n={},a=Object.keys(e).sort();for(let o of a)n[o]=e[o];return n}function JL(e,n){let a=new Set;return new Set(n),e.reduce((o,s)=>{let u=JSON.stringify(ZL(s));return a.has(u)||(a.add(u),o.push({key:u,link:s})),o},[])}function Ov(){let e=v.useContext(Es);return Tv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function WL(){let e=v.useContext(Uc);return Tv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Mv=v.createContext(void 0);Mv.displayName="FrameworkContext";function bp(){let e=v.useContext(Mv);return Tv(e,"You must render this element inside a <HydratedRouter> element"),e}function ez(e,n){let a=v.useContext(Mv),[o,s]=v.useState(!1),[u,c]=v.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:g,onMouseLeave:y,onTouchStart:h}=n,b=v.useRef(null);v.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=T=>{T.forEach(O=>{c(O.isIntersecting)})},R=new IntersectionObserver(C,{threshold:.5});return b.current&&R.observe(b.current),()=>{R.disconnect()}}},[e]),v.useEffect(()=>{if(o){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[o]);let x=()=>{s(!0)},w=()=>{s(!1),c(!1)};return a?e!=="intent"?[u,b,{}]:[u,b,{onFocus:Xu(d,x),onBlur:Xu(p,w),onMouseEnter:Xu(g,x),onMouseLeave:Xu(y,w),onTouchStart:Xu(h,x)}]:[!1,b,{}]}function Xu(e,n){return a=>{e&&e(a),a.defaultPrevented||n(a)}}function tz({page:e,...n}){let a=$T(),{nonce:o}=bp(),{router:s}=Ov(),u=v.useMemo(()=>CT(s.routes,e,s.basename),[s.routes,e,s.basename]);return u?(n.nonce==null&&o&&(n={...n,nonce:o}),a?v.createElement(rz,{page:e,matches:u,...n}):v.createElement(az,{page:e,matches:u,...n})):null}function nz(e){let{manifest:n,routeModules:a}=bp(),[o,s]=v.useState([]);return v.useEffect(()=>{let u=!1;return $L(e,n,a).then(c=>{u||s(c)}),()=>{u=!0}},[e,n,a]),o}function rz({page:e,matches:n,...a}){let o=$r(),{future:s}=bp(),{basename:u}=Ov(),c=v.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let d=rO(e,u,s.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,g=[];for(let y of n)typeof y.route.shouldRevalidate=="function"?p=!0:g.push(y.route.id);return p&&g.length>0&&d.searchParams.set("_routes",g.join(",")),[d.pathname+d.search]},[u,s.v8_trailingSlashAwareDataRequests,e,o,n]);return v.createElement(v.Fragment,null,c.map(d=>v.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...a})))}function az({page:e,matches:n,...a}){let o=$r(),{future:s,manifest:u,routeModules:c}=bp(),{basename:d}=Ov(),{loaderData:p,matches:g}=WL(),y=v.useMemo(()=>$w(e,n,g,u,o,"data"),[e,n,g,u,o]),h=v.useMemo(()=>$w(e,n,g,u,o,"assets"),[e,n,g,u,o]),b=v.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let C=new Set,R=!1;if(n.forEach(O=>{let M=u.routes[O.route.id];!M||!M.hasLoader||(!y.some(A=>A.route.id===O.route.id)&&O.route.id in p&&c[O.route.id]?.shouldRevalidate||M.hasClientLoader?R=!0:C.add(O.route.id))}),C.size===0)return[];let T=rO(e,d,s.v8_trailingSlashAwareDataRequests,"data");return R&&C.size>0&&T.searchParams.set("_routes",n.filter(O=>C.has(O.route.id)).map(O=>O.route.id).join(",")),[T.pathname+T.search]},[d,s.v8_trailingSlashAwareDataRequests,p,o,u,y,n,e,c]),x=v.useMemo(()=>XL(h,u),[h,u]),w=nz(h);return v.createElement(v.Fragment,null,b.map(C=>v.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...a})),x.map(C=>v.createElement("link",{key:C,rel:"modulepreload",href:C,...a})),w.map(({key:C,link:R})=>v.createElement("link",{key:C,nonce:a.nonce,...R,crossOrigin:R.crossOrigin??a.crossOrigin})))}function oz(...e){return n=>{e.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})}}var iz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{iz&&(window.__reactRouterVersion="7.18.5")}catch{}function sz(e,n){return j5({basename:n?.basename,getContext:n?.getContext,future:n?.future,history:$P({window:n?.window}),hydrationData:lz(),routes:e,mapRouteProperties:AL,hydrationRouteProperties:DL,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window,instrumentations:n?.instrumentations}).initialize()}function lz(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:uz(e.errors)}),e}function uz(e){if(!e)return null;let n=Object.entries(e),a={};for(let[o,s]of n)if(s&&s.__type==="RouteErrorResponse")a[o]=new _c(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(typeof s.__subType=="string"&&v5.includes(s.__subType)){let u=window[s.__subType];if(typeof u=="function")try{let c=new u(s.message);c.stack="",a[o]=c}catch{}}if(a[o]==null){let u=new Error(s.message);u.stack="",a[o]=u}}else a[o]=s;return a}var aO=v.forwardRef(function({onClick:n,discover:a="render",prefetch:o="none",relative:s,reloadDocument:u,replace:c,mask:d,state:p,target:g,to:y,preventScrollReset:h,viewTransition:b,defaultShouldRevalidate:x,...w},C){let{basename:R,navigator:T,useTransitions:O}=v.useContext(ha),M=typeof y=="string"&&hp.test(y),A=jT(y,R);y=A.to;let I=cL(y,{relative:s}),j=$r(),k=null;if(d){let _=zc(d,[],j.mask?j.mask.pathname:"/",!0);R!=="/"&&(_.pathname=_.pathname==="/"?R:Aa([R,_.pathname])),k=T.createHref(_)}let[D,z,F]=ez(o,w),G=fz(y,{replace:c,mask:d,state:p,target:g,preventScrollReset:h,relative:s,viewTransition:b,defaultShouldRevalidate:x,useTransitions:O});function J(_){n&&n(_),_.defaultPrevented||G(_)}let Y=!(A.isExternal||u),U=v.createElement("a",{...w,...F,href:(Y?k:void 0)||A.absoluteURL||I,onClick:Y?J:n,ref:oz(C,z),target:g,"data-discover":!M&&a==="render"?"true":void 0});return D&&!M?v.createElement(v.Fragment,null,U,v.createElement(tz,{page:I})):U});aO.displayName="Link";var oc=v.forwardRef(function({"aria-current":n="page",caseSensitive:a=!1,className:o="",end:s=!1,style:u,to:c,viewTransition:d,children:p,...g},y){let h=Fc(c,{relative:g.relative}),b=$r(),x=v.useContext(Uc),{navigator:w,basename:C}=v.useContext(ha),R=x!=null&&vz(h)&&d===!0,T=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,O=b.pathname,M=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;a||(O=O.toLowerCase(),M=M?M.toLowerCase():null,T=T.toLowerCase()),M&&C&&(M=Na(M,C)||M);const A=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let I=O===T||!s&&O.startsWith(T)&&O.charAt(A)==="/",j=M!=null&&(M===T||!s&&M.startsWith(T)&&M.charAt(T.length)==="/"),k={isActive:I,isPending:j,isTransitioning:R},D=I?n:void 0,z;typeof o=="function"?z=o(k):z=[o,I?"active":null,j?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let F=typeof u=="function"?u(k):u;return v.createElement(aO,{...g,"aria-current":D,className:z,ref:y,style:F,to:c,viewTransition:d},typeof p=="function"?p(k):p)});oc.displayName="NavLink";var cz=v.forwardRef(({discover:e="render",fetcherKey:n,navigate:a,reloadDocument:o,replace:s,state:u,method:c=Zf,action:d,onSubmit:p,relative:g,preventScrollReset:y,viewTransition:h,defaultShouldRevalidate:b,...x},w)=>{let{useTransitions:C}=v.useContext(ha),R=mz(),T=yz(d,{relative:g}),O=c.toLowerCase()==="get"?"get":"post",M=typeof d=="string"&&hp.test(d),A=I=>{if(p&&p(I),I.defaultPrevented)return;I.preventDefault();let j=I.nativeEvent.submitter,k=j?.getAttribute("formmethod")||c,D=()=>R(j||I.currentTarget,{fetcherKey:n,method:k,navigate:a,replace:s,state:u,relative:g,preventScrollReset:y,viewTransition:h,defaultShouldRevalidate:b});C&&a!==!1?v.startTransition(()=>D()):D()};return v.createElement("form",{ref:w,method:O,action:T,onSubmit:o?p:A,...x,"data-discover":!M&&e==="render"?"true":void 0})});cz.displayName="Form";function dz(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function oO(e){let n=v.useContext(Es);return _t(n,dz(e)),n}function fz(e,{target:n,replace:a,mask:o,state:s,preventScrollReset:u,relative:c,viewTransition:d,defaultShouldRevalidate:p,useTransitions:g}={}){let y=yp(),h=$r(),b=Fc(e,{relative:c});return v.useCallback(x=>{if(FL(x,n)){x.preventDefault();let w=a!==void 0?a:Lr(h)===Lr(b),C=()=>y(e,{replace:w,mask:o,state:s,preventScrollReset:u,relative:c,viewTransition:d,defaultShouldRevalidate:p});g?v.startTransition(()=>C()):C()}},[h,y,b,a,o,s,n,e,u,c,d,p,g])}function hz(e){Un(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=v.useRef(hy(e)),a=v.useRef(!1),o=$r(),s=v.useMemo(()=>BL(o.search,a.current?null:n.current),[o.search]),u=yp(),c=v.useCallback((d,p)=>{const g=hy(typeof d=="function"?d(new URLSearchParams(s)):d);a.current=!0,u("?"+g,p)},[u,s]);return[s,c]}var pz=0,gz=()=>`__${String(++pz)}__`;function mz(){let{router:e}=oO("useSubmit"),{basename:n}=v.useContext(ha),a=wL(),o=e.fetch,s=e.navigate;return v.useCallback(async(u,c={})=>{let{action:d,method:p,encType:g,formData:y,body:h}=YL(u,n);if(c.navigate===!1){let b=c.fetcherKey||gz();await o(b,a,c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:h,formMethod:c.method||p,formEncType:c.encType||g,flushSync:c.flushSync})}else await s(c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:h,formMethod:c.method||p,formEncType:c.encType||g,replace:c.replace,state:c.state,fromRouteId:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[o,s,n,a])}function yz(e,{relative:n}={}){let{basename:a}=v.useContext(ha),o=v.useContext(Ga);_t(o,"useFormAction must be used inside a RouteContext");let[s]=o.matches.slice(-1),u={...Fc(e||".",{relative:n})},c=$r();if(e==null){u.search=c.search;let d=new URLSearchParams(u.search),p=d.getAll("index");if(p.some(y=>y==="")){d.delete("index"),p.filter(h=>h).forEach(h=>d.append("index",h));let y=d.toString();u.search=y?`?${y}`:""}}return(!e||e===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(u.pathname=u.pathname==="/"?a:Aa([a,u.pathname])),Lr(u)}function vz(e,{relative:n}={}){let a=v.useContext(wv);_t(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=oO("useViewTransitionState"),s=Fc(e,{relative:n});if(!a.isTransitioning)return!1;let u=Na(a.currentLocation.pathname,o)||a.currentLocation.pathname,c=Na(a.nextLocation.pathname,o)||a.nextLocation.pathname;return xh(s.pathname,c)!=null||xh(s.pathname,u)!=null}function bz(e){return v.createElement(IL,{flushSync:cr.flushSync,...e})}function bs({controlled:e,default:n,name:a,state:o="value"}){const{current:s}=v.useRef(e!==void 0),[u,c]=v.useState(()=>n),d=s&&e!==void 0?e:u,p=v.useCallback(g=>{s||c(g)},[]);return[d,p]}function xz(e){const{open:n,defaultOpen:a=!1,onOpenChange:o,disabled:s}=e,[u,c]=bs({controlled:n,default:a,name:"Collapsible",state:"open"}),{mounted:d,setMounted:p,transitionStatus:g}=ws(u,!0,!0),y=Tr(),[h,b]=v.useState(),x=h===null?void 0:h??y,w=Be(C=>{const R=!u,T=dt(Va,C.nativeEvent);o(R,T),!T.isCanceled&&c(R)});return v.useMemo(()=>({defaultPanelId:y,disabled:s,handleTrigger:w,mounted:d,open:u,panelId:x,setMounted:p,setOpen:c,setPanelIdState:b,transitionStatus:g}),[y,s,w,d,u,x,p,c,b,g])}const iO=v.createContext(void 0);function sO(){const e=v.useContext(iO);if(e===void 0)throw new Error(Rn(15));return e}const Sz="data-open",wz="data-closed",If=By,Rz="data-panel-open",Ez={[Sz]:""},Cz={[wz]:""},Tz={open(e){return e?{[Rz]:""}:null}},Oz={open(e){return e?Ez:Cz}},lO={...Oz,...po},Mz=v.forwardRef(function(n,a){const{render:o,className:s,defaultOpen:u=!1,disabled:c=!1,onOpenChange:d,open:p,style:g,...y}=n,h=Be(d),b=xz({open:p,defaultOpen:u,onOpenChange:h,disabled:c}),x=v.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),w=v.useMemo(()=>({...b,onOpenChange:h,state:x}),[b,h,x]),C=Mt("div",n,{state:x,ref:a,props:y,stateAttributesMapping:lO});return S.jsx(iO.Provider,{value:w,children:C})}),uO=v.createContext(void 0);function Av(e=!1){const n=v.useContext(uO);if(n===void 0&&!e)throw new Error(Rn(16));return n}function Az(e){const{focusableWhenDisabled:n,disabled:a,composite:o=!1,tabIndex:s=0,isNativeButton:u}=e,c=o&&n!==!1,d=o&&n===!1;return{props:v.useMemo(()=>{const g={onKeyDown(y){a&&n&&y.key!=="Tab"&&y.preventDefault()}};return o||(g.tabIndex=s,!u&&a&&(g.tabIndex=n?s:-1)),(u&&(n||c)||!u&&a)&&(g["aria-disabled"]=a),u&&(!n||d)&&(g.disabled=a),g},[o,a,n,c,d,u,s])}}function hs(e,n,{detail:a=0,pointerType:o=""}={}){e.dispatchEvent(new(wn(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:a,pointerType:o,shiftKey:n.shiftKey,ctrlKey:n.ctrlKey,altKey:n.altKey,metaKey:n.metaKey}))}function mo(e={}){const{disabled:n=!1,focusableWhenDisabled:a,tabIndex:o=0,native:s=!0,composite:u}=e,c=v.useRef(null),d=Av(!0),p=u??d!==void 0,{props:g}=Az({focusableWhenDisabled:a,disabled:n,composite:p,tabIndex:o,isNativeButton:s}),y=v.useCallback(()=>{const x=c.current;k0(x)&&p&&n&&g.disabled===void 0&&x.disabled&&(x.disabled=!1)},[n,g.disabled,p]);_e(y,[y]);const h=v.useCallback((x={})=>{const{onClick:w,onMouseDown:C,onKeyUp:R,onKeyDown:T,onPointerDown:O,...M}=x;return Pr({onClick(A){if(n){A.preventDefault();return}w?.(A)},onMouseDown(A){n||C?.(A)},onKeyDown(A){if(n||(ch(A),T?.(A),A.baseUIHandlerPrevented))return;const I=A.target===A.currentTarget,j=A.currentTarget,k=k0(j),D=!s&&Dz(j),z=I&&(s?k:!D),F=A.key==="Enter",G=A.key===" ",J=j.getAttribute("role"),Y=J?.startsWith("menuitem")||J==="option"||J==="gridcell";if(I&&p&&G){if(A.defaultPrevented&&Y)return;A.preventDefault(),(!s||k)&&(A.preventBaseUIHandler(),hs(j,A));return}if(!z||s||!G&&!F){I&&D&&G&&A.preventDefault();return}A.defaultPrevented||(A.preventDefault(),F&&(A.preventBaseUIHandler(),hs(j,A)))},onKeyUp(A){if(!n){if(ch(A),R?.(A),A.target===A.currentTarget&&s&&p&&k0(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!s&&!p&&!A.defaultPrevented&&A.key===" "&&(A.preventBaseUIHandler(),hs(A.currentTarget,A))}},onPointerDown(A){if(n){A.preventDefault();return}O?.(A)}},s?{type:"button"}:{role:"button"},g,M)},[n,g,p,s]),b=Be(x=>{c.current=x,y()});return{getButtonProps:h,buttonRef:b}}function k0(e){return yn(e)&&e.tagName==="BUTTON"}function Dz(e){return yn(e)&&e.tagName==="A"&&!!e.href}const Nz={...Tz,...po},Iz=v.forwardRef(function(n,a){const{panelId:o,open:s,handleTrigger:u,state:c,disabled:d}=sO(),{className:p,disabled:g=d,render:y,nativeButton:h=!0,style:b,...x}=n,{getButtonProps:w,buttonRef:C}=mo({disabled:g,native:h});return Mt("button",n,{state:c,ref:[a,C],props:[{"aria-controls":s?o:void 0,"aria-expanded":s,onClick:u},x,w],stateAttributesMapping:Nz})}),hl={height:void 0,width:void 0};function jz(e){const{externalRef:n,hiddenUntilFound:a,id:o,keepMounted:s,mounted:u,onOpenChange:c,open:d,setMounted:p,setOpen:g,transitionStatus:y}=e,h=v.useRef(null),b=v.useRef(null),[x,w]=v.useState(hl),C=v.useRef(hl),R=v.useRef(!1),T=v.useRef(d),O=v.useRef(!1),[M,A]=v.useState(!1),I=v.useRef(null),j=Gr(n,h),k=Pn(d),D=Xh(h),z=!d&&!u,F=M?"idle":y,G=d&&(T.current||O.current),J=!d&&u&&b.current==="css-animation"&&x.height===void 0&&x.width===void 0?C.current:x,Y=a&&z&&b.current!=="css-animation",U=Be((V,X=!0)=>{X&&(C.current=V),w(V)}),_=Be(()=>{I.current?.(),I.current=null}),L=Be(V=>{_(),I.current=()=>{I.current=null,V()}}),$=Be(()=>{d&&u&&b.current==="css-animation"&&(O.current=!0)});_e(()=>{!M||y==="starting"||A(!1)},[M,y]),v.useEffect(()=>()=>{$(),_()},[$,_]),_e(()=>{d||(T.current=!1,O.current=!1);const V=h.current;if(!V)return;!d&&I.current&&_();const X=kz(V,G);if(b.current=X,d&&y==="idle"&&T.current&&X==="css-animation"){C.current=pl(V);return}if(d&&y==="starting"){const se=R.current;if(R.current=!1,X==="none"){U(pl(V)),A(!0);return}if(X==="css-transition"){const W=Pz(V);if(U(pl(V)),!se)return W;const re=jf(V,"transition-duration","0s");return L(re),A(!0),W}U(pl(V));const N=jf(V,"animation-name","none");if(!se){N();return}const B=jf(V,"animation-duration","0s");N(),L(B),A(!0);return}if(!d&&u&&(y==="idle"||y==="starting")){if(X==="none"){U(hl,!1),p(!1);return}U(pl(V));return}if(y!=="ending")return;if(X==="none"){p(!1);return}const ee=pl(V);if(!(ee.height>0||ee.width>0)){p(!1);return}U(ee),X==="css-animation"&&jf(V,"animation-name","none")()},[u,d,_,U,p,L,G,y]),Ia({enabled:d&&u&&F==="idle",open:!0,ref:h,onComplete(){d&&U(hl,!1)}}),v.useEffect(()=>{if(d||!u||F!=="ending")return;if(!h.current){p(!1),U(hl,!1);return}const X=new AbortController;let ee=-1;function q(){k.current||(p(!1),U(hl,!1))}return ee=Cr.request(()=>{D(q,X.signal)}),()=>{Cr.cancel(ee),X.abort()}},[k,u,d,F,D,U,p]),_e(()=>{const V=h.current;!V||!a||!z||V.setAttribute("hidden","until-found")},[z,a]),v.useEffect(function(){const X=h.current;if(!X)return;const ee=Da.create();let q=-1;const se=(W,re)=>{ee.start(0,()=>{k.current||(q=Cr.request(()=>{k.current||(W&&(R.current=!1),re&&X.setAttribute(If,""),X.setAttribute("hidden","until-found"))}))})},B=jt(X,"beforematch",W=>{const re=dt(zr,W);if(c(!0,re),re.isCanceled){se(!1,!1);return}R.current=!0;const Re=X.hasAttribute(If);X.removeAttribute(If),g(!0),se(!0,Re)});return()=>{ee.clear(),Cr.cancel(q),B()}},[k,c,g]);const K=s||a||u||d;return{height:J.height,props:{...Y?{[If]:""}:void 0,hidden:z,id:o},ref:j,shouldPreventOpenAnimation:G,shouldRender:K,transitionStatus:F,width:J.width}}function pl(e){return{height:e.scrollHeight,width:e.scrollWidth}}function kz(e,n){const a=wn(e).getComputedStyle(e),o=(a.animationName.split(",").map(u=>u.trim()).some(u=>u!==""&&u!=="none")||n)&&Xw(a.animationDuration),s=Xw(a.transitionDuration);return o&&s||s?"css-transition":o?"css-animation":"none"}function Xw(e){return e.split(",").map(n=>n.trim()).some(n=>n!==""&&Number.parseFloat(n)>0)}function jf(e,n,a){const o=e.style.getPropertyValue(n),s=e.style.getPropertyPriority(n);return e.style.setProperty(n,a),()=>{if(o===""){e.style.removeProperty(n);return}e.style.setProperty(n,o,s)}}function Pz(e){const n={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(n).forEach(s=>{e.style.setProperty(s,"initial","important")});function a(){Object.entries(n).forEach(([s,u])=>{if(u===""){e.style.removeProperty(s);return}e.style.setProperty(s,u)})}const o=Cr.request(a);return()=>{Cr.cancel(o),a()}}const Lz="--collapsible-panel-height",zz="--collapsible-panel-width",_z=v.forwardRef(function(n,a){const{className:o,hiddenUntilFound:s,keepMounted:u,render:c,id:d,style:p,...g}=n,{defaultPanelId:y,mounted:h,onOpenChange:b,open:x,setMounted:w,setPanelIdState:C,setOpen:R,state:T,transitionStatus:O}=sO(),M=s??!1,A=u??!1,I=d||void 0,j=I??y;_e(()=>(C($=>I??($===null?void 0:$)),()=>{C($=>$===I?null:$)}),[I,C]);const{height:k,props:D,ref:z,shouldPreventOpenAnimation:F,shouldRender:G,transitionStatus:J,width:Y}=jz({externalRef:a,hiddenUntilFound:M,id:j,keepMounted:A,mounted:h,onOpenChange:b,open:x,setMounted:w,setOpen:R,transitionStatus:O}),U={...T,transitionStatus:J},_=xE(p,U),L=Mt("div",{...n,style:void 0},{state:U,ref:z,props:[D,{style:{[Lz]:k===void 0?"auto":`${k}px`,[zz]:Y===void 0?"auto":`${Y}px`}},g,_?{style:_}:void 0,F?{style:{animationName:"none"}}:void 0],stateAttributesMapping:lO});return G?L:null});function Hz({...e}){return S.jsx(Mz,{"data-slot":"collapsible",...e})}function Uz({...e}){return S.jsx(Iz,{"data-slot":"collapsible-trigger",...e})}function Fz({...e}){return S.jsx(_z,{"data-slot":"collapsible-content",...e})}const cO=v.createContext(void 0);function Bz(e){const n=v.useContext(cO);if(n===void 0)throw new Error(Rn(33));return n}const xp=v.createContext(void 0);function Vo(e){const n=v.useContext(xp);if(n===void 0&&!e)throw new Error(Rn(36));return n}const dO=v.createContext(void 0);function Sp(e=!0){const n=v.useContext(dO);if(n===void 0&&!e)throw new Error(Rn(25));return n}const fO=v.createContext(null);function wp(e="root"){const n=v.useContext(fO),a=v.useContext(xp);return n===null||a===void 0?null:(e==="submenu-trigger"?a.virtualFocus||a.parentVirtualFocus:a.virtualFocus)?n:null}const Vz={visible:!0,ref:null};function qz(){return Vz}function hO(e,n,a="root"){const o=wp(a),u=((a==="submenu-trigger"?o?.useSubmenuTrigger:o?.useItem)??qz)({label:e.label,children:e.children,render:e.render}),c=Gr(n,u.ref);return{visible:u.visible,ref:c,props:u.props}}function Yz(e){e.preventDefault()}function Kz(e){const{closeOnClick:n,highlighted:a,id:o,nodeId:s,store:u,typingRef:c,itemRef:d,itemMetadata:p}=e,g=Vo(),y=Sp(!0),h=p.type==="submenu-trigger",b=h?g.parentVirtualFocus:g.virtualFocus,w=(h&&g.parent.type==="menu"?g.parent.store:g.store).useState("webkitAriaSelected",a),{events:C}=u.useState("floatingTreeRoot"),R=u.useState("open"),T=y!==void 0,O=!b&&R&&a?0:-1;return v.useMemo(()=>({id:o,role:"menuitem",tabIndex:O,"aria-selected":w,onMouseDown:b?Yz:void 0,onKeyDown(M){M.key===" "&&c?.current&&M.preventDefault()},onMouseMove(M){s&&C.emit("itemhover",{nodeId:s,target:M.currentTarget})},onClick(M){n&&C.emit("close",{domEvent:M.nativeEvent,reason:fs})},onMouseUp(M){if(y){const A=y.initialCursorPointRef.current;if(y.initialCursorPointRef.current=null,T&&A&&Math.abs(M.clientX-A.x)<=1&&Math.abs(M.clientY-A.y)<=1||T&&!Py&&M.button===2)return}d.current&&u.context.allowMouseUpTriggerRef.current&&(!T||M.button===2)&&p.type==="regular-item"&&hs(d.current,M,{detail:1,pointerType:"mouse"})}}),[n,O,o,C,s,u.context.allowMouseUpTriggerRef,c,d,y,T,p.type,w,b])}const pO={type:"regular-item"};function gO(e){const{closeOnClick:n,disabled:a,highlighted:o,id:s,store:u,typingRef:c=u.context.typingRef,nativeButton:d,itemMetadata:p,nodeId:g}=e,y=v.useRef(null),{getButtonProps:h,buttonRef:b}=mo({disabled:a,focusableWhenDisabled:!0,native:d,composite:!0}),x=Kz({closeOnClick:n,highlighted:o,id:s,nodeId:g,store:u,typingRef:c,itemRef:y,itemMetadata:p}),w=v.useCallback(R=>Pr(x,{onMouseEnter(T){p.type==="submenu-trigger"&&p.setActive(T.nativeEvent)}},R,h),[x,h,p]),C=Gr(y,b);return v.useMemo(()=>({getItemProps:w,itemRef:C}),[w,C])}const mO=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Gz(){return v.useContext(mO)}function Rp(e={}){const{guess:n,label:a,metadata:o,textRef:s,index:u}=e,{register:c,unregister:d,subscribeMapChange:p,nextIndexRef:g}=Gz(),y=v.useRef(-1),[h,b]=v.useState(u==null&&n?()=>{if(y.current===-1){const R=g.current;g.current+=1,y.current=R}return y.current}:-1),x=u??h,w=v.useRef(null),C=v.useCallback(R=>{const T=w.current;T&&d(T),w.current=R,R&&c(R,{metadata:o??null,index:u??null,label:a,textRef:s})},[u,c,d,o,a,s]);return _e(()=>{if(u==null)return p(R=>{const T=w.current?R.get(w.current)?.index:null;T!=null&&b(T)})},[u,p]),{ref:C,index:x}}const $z="data-checked",Xz="data-unchecked",yO={checked(e){return e?{[$z]:""}:{[Xz]:""}},...po},Dv=v.createContext(void 0);function Qz(){const e=v.useContext(Dv);if(e===void 0)throw new Error(Rn(31));return e}const Zz=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,[d,p]=v.useState(void 0),g=Mt("div",n,{ref:a,props:{role:"group","aria-labelledby":d,...c}});return S.jsx(Dv.Provider,{value:p,children:g})}),Jz=v.forwardRef(function(n,a){const o=wp()?.Group??Zz;return S.jsx(o,{...n,ref:a})}),Wz=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=Tr(c),g=Qz();return _e(()=>(g(p),()=>{g(y=>y===p?void 0:y)}),[g,p]),Mt("div",n,{ref:a,props:{id:p,"aria-hidden":!0,...d}})}),e_=v.forwardRef(function(n,a){const{render:o,className:s,id:u,label:c,nativeButton:d=!1,disabled:p=!1,closeOnClick:g=!0,style:y,...h}=n,{store:b}=Vo(),x=Rp({guess:!0,label:c}),w=Tr(u),C=b.useState("disabled"),R=b.useState("isActive",x.index),T=b.useState("floatingNodeId"),O=b.useState("itemProps"),M=p||C,{getItemProps:A,itemRef:I}=gO({closeOnClick:g,disabled:M,highlighted:R,id:w,store:b,nativeButton:d,nodeId:T,itemMetadata:pO});return Mt("div",n,{state:{disabled:M,highlighted:R},props:[O,h,A],ref:[I,a,x.ref]})}),vO=v.forwardRef(function(n,a){const o=hO(n,a);return o.visible?S.jsx(e_,{...n,ref:o.ref}):null}),t_=v.createContext(void 0);function Nv(e){return v.useContext(t_)}const py="ArrowUp",gy="ArrowDown",my="ArrowLeft",yy="ArrowRight",vy="Home",by="End",Bc=new Set([py,gy,my,yy,vy,by]),bO="Shift",n_=[bO,"Control","Alt","Meta"];function r_(e){return yn(e)&&e.tagName==="INPUT"}function Qw(e){return!!(r_(e)&&e.selectionStart!=null||yn(e)&&e.tagName==="TEXTAREA")}function Zw(e,n,a,o){if(!e||!n||!n.scrollTo)return;let s=e.scrollLeft,u=e.scrollTop;const c=e.clientWidth<e.scrollWidth,d=e.clientHeight<e.scrollHeight;if(c&&o!=="vertical"){const p=Jw(e,n,"left"),g=kf(e),y=kf(n);a==="ltr"&&(p+n.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight?s=p+n.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight:p-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft&&(s=p-y.scrollMarginLeft-g.scrollPaddingLeft)),a==="rtl"&&(p-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft?s=p-y.scrollMarginLeft-g.scrollPaddingLeft:p+n.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight&&(s=p+n.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight))}if(d&&o!=="horizontal"){const p=Jw(e,n,"top"),g=kf(e),y=kf(n);p-y.scrollMarginTop<e.scrollTop+g.scrollPaddingTop?u=p-y.scrollMarginTop-g.scrollPaddingTop:p+n.offsetHeight+y.scrollMarginBottom>e.scrollTop+e.clientHeight-g.scrollPaddingBottom&&(u=p+n.offsetHeight+y.scrollMarginBottom-e.clientHeight+g.scrollPaddingBottom)}e.scrollTo({left:s,top:u,behavior:"auto"})}function Jw(e,n,a){const o=a==="left"?"offsetLeft":"offsetTop";let s=0;for(;n.offsetParent&&(s+=n[o],n.offsetParent!==e);)n=n.offsetParent;return s}function kf(e){const n=getComputedStyle(e);return{scrollMarginTop:parseFloat(n.scrollMarginTop)||0,scrollMarginRight:parseFloat(n.scrollMarginRight)||0,scrollMarginBottom:parseFloat(n.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(n.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(n.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(n.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(n.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(n.scrollPaddingLeft)||0}}const a_=v.createContext(void 0);function o_(){return v.useContext(a_)}function i_(e,n){const a=Zy(e.render);if(v.isValidElement(a)){const o=a.props;if(Object.hasOwn(o,"id"))return o.id??""}return e.id??n}function s_(e,n,a){const o=i_(e,n),s=o===n?void 0:o,u=v.useCallback(c=>a?.(c?s:void 0),[s,a]);return[o,u]}function l_(e,n,a){const o=Zy(e.render),s=v.isValidElement(o)?o.props:void 0,u=e["aria-label"]??s?.["aria-label"];let c=e["aria-labelledby"]??s?.["aria-labelledby"];return c==null&&!u&&(c=n?n.id||void 0:a||void 0),c}const u_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,id:d,initialFocus:p,...g}=n,{store:y,defaultFloatingId:h,setRenderedFloatingId:b,virtualFocus:x,orientation:w}=Vo(),C=o_(),{side:R,align:T}=Bz(),O=Nv()!=null,M=y.useState("open"),A=y.useState("transitionStatus"),I=y.useState("popupProps"),j=y.useState("mounted"),k=y.useState("instantType"),D=y.useState("activeTriggerElement"),z=y.useState("parent"),F=y.useState("lastOpenChangeReason"),G=y.useState("rootId"),J=y.useState("floatingRootContext"),Y=y.useState("floatingTreeRoot"),U=y.useState("closeDelay"),_=y.useState("hoverEnabled"),L=y.useState("disabled"),$=y.useState("openMethod"),K=y.useState("activeTriggerId"),V=y.useState("listElement"),[X,ee]=s_(n,h,b),q=l_(n,D,K),se=z.type==="menu"?C:void 0,N=z.type==="context-menu";let B=p??z.type!=="menu";p===void 0&&V&&z.type!=="menu"&&(B=()=>y.state.activeIndex!==null?!1:V),Ia({open:M,ref:y.context.popupRef,onComplete(){M&&y.context.onOpenChangeComplete?.(!0)}}),v.useEffect(()=>{function ve(Pe){y.setOpen(!1,dt(Pe.reason,Pe.domEvent))}return Y.events.on("close",ve),()=>{Y.events.off("close",ve)}},[Y.events,y]),ov(J,{enabled:_&&!L&&!N&&z.type!=="menubar",closeDelay:U});const W=y.useStateSetter("popupElement"),re=v.useContext(fO)?.useParentHandoff??d_,{parentVirtualFocusRef:Re,handleFocus:le}=re(y,z,M,x),me={transitionStatus:A,side:R,align:T,open:M,nested:z.type==="menu",instant:k},ge=Mt("div",n,{state:me,ref:[a,y.context.popupRef,W,ee],stateAttributesMapping:Fh,props:[I,{id:X,...V?{role:"presentation"}:{role:"menu","aria-orientation":w==="horizontal"?"horizontal":void 0,"aria-labelledby":q},onKeyDown(ve){se?.onPopupKeyDown?.(ve),O&&Bc.has(ve.key)&&ve.stopPropagation()},onFocus:le},Lc(A),g,{"data-rootownerid":G}]});let ce=z.type===void 0||N;(D||z.type==="menubar"&&F!==Bh)&&(ce=!0);const Te=se?.getReturnElement??Re;return S.jsx($h,{context:J,openInteractionType:$,modal:N,disabled:!j,returnFocus:c??Te??ce,explicitReturnFocus:c===void 0&&Te?!1:void 0,initialFocus:B,restoreFocus:!0,getInsideElements:z.type===void 0?()=>[y.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:z.type!=="menubar"?Y:void 0,previousFocusableElement:D,nextFocusableElement:z.type===void 0?y.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:y.context.beforeContentFocusGuardRef,children:ge})}),c_={parentVirtualFocusRef:void 0,handleFocus:void 0};function d_(){return c_}const xO=v.forwardRef(function(n,a){const o=wp()?.Popup??u_;return S.jsx(o,{...n,ref:a})}),SO=v.createContext(void 0);function f_(){const e=v.useContext(SO);if(e===void 0)throw new Error(Rn(32));return e}const wO=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n,{store:u,parent:c}=Vo();if(!(u.useState("mounted")||o))return null;const g=c.type==="menu"||c.type==="menubar"?"group":void 0;return S.jsx(SO.Provider,{value:o,children:S.jsx(Gh,{ref:a,...s,portalOwnerRole:g})})});function Iv(e){const{children:n,elementsRef:a,labelsRef:o,onMapChange:s}=e,u=Be(s),[,c]=v.useState(0),d=er(p_).current,p=er(h_).current,g=v.useRef(0),y=v.useRef(!0),h=v.useRef(null),b=v.useRef(null),x=Be(()=>{y.current||(y.current=!0,c(I=>I+1))}),w=Be((I,j)=>{p.set(I,j),x()}),C=Be(I=>{p.delete(I),x()}),R=Be(I=>{const j=new Map;return a.current.length=0,o&&(o.current.length=0),I.forEach(k=>{j.set(k.element,{...k.registration.metadata??{},index:k.index}),a.current[k.index]=k.element,o&&(o.current[k.index]=k.registration.label!==void 0?k.registration.label:k.registration.textRef?.current?.textContent??k.element.textContent)}),g.current=a.current.length,j});function T(I){if(b.current?.disconnect(),b.current=null,typeof MutationObserver!="function"||I.length<2)return;const j=new MutationObserver(D=>{if(!y_(D))return;let z=null;for(const F of I)if(F.isConnected){if(z&&RO(z,F)>0){j.disconnect(),x();return}z=F}});b.current=j;const k=new Set;for(let D=1;D<I.length;D+=1){const z=m_(I[D-1],I[D]);z&&k.add(z)}k.forEach(D=>j.observe(D,{childList:!0}))}const O=Be(()=>{const[I,j]=g_(p),k=R(I),D=h.current,z=!D||D.length!==I.length||I.some((F,G)=>{const J=D[G];return F.index!==J.index||F.element!==J.element||F.registration.index!==J.registration.index||F.registration.metadata!==J.registration.metadata});T(j),h.current=I,y.current=!1,z&&(d.forEach(F=>F(k)),u(k))});_e(()=>(!y.current&&h.current&&R(h.current),()=>{a.current=[],o&&(o.current=[])}),[a,o,R]),_e(()=>{y.current&&O()}),_e(()=>()=>{b.current?.disconnect(),y.current=!0},[]);const M=Be(I=>(d.add(I),()=>{d.delete(I)})),A=v.useMemo(()=>({register:w,unregister:C,subscribeMapChange:M,nextIndexRef:g}),[w,C,M,g]);return S.jsx(mO.Provider,{value:A,children:n})}function h_(){return new Map}function p_(){return new Set}function g_(e){const n=new Set,a=[],o=[];e.forEach((u,c)=>{if(!c.isConnected)return;const d=u.index,p={index:d??-1,element:c,registration:u};d===null?o.push(p):d>=0&&(n.add(d),a.push(p))});let s=0;return o.sort((u,c)=>RO(u.element,c.element)),o.forEach(u=>{for(;n.has(s);)s+=1;u.index=s,a.push(u),s+=1}),n.size>0&&a.sort((u,c)=>u.index-c.index),[a,o.map(u=>u.element)]}function m_(e,n){let a=e.parentElement;for(;a&&!a.contains(n);)a=a.parentElement;return a}function y_(e){for(const n of e)for(let a=0;a<n.removedNodes.length;a+=1)if(n.removedNodes[a].isConnected)return!0;return!1}function RO(e,n){return e.nextElementSibling===n?-1:n.nextElementSibling===e?1:e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const Ep=v.forwardRef(function(n,a){const{cutout:o,...s}=n;let u;if(o){const c=o.getBoundingClientRect();u=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${c.left}px ${c.top}px,${c.left}px ${c.bottom}px,${c.right}px ${c.bottom}px,${c.right}px ${c.top}px,${c.left}px ${c.top}px)`}return S.jsx("div",{ref:a,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:u}})});function EO(e){const{store:n,domReference:a,positionerElement:o,open:s}=e,u=v.useRef(null),c=v.useRef(null),d=Xh(o);_e(()=>{s||(c.current?.abort(),c.current=null,n.state.instantType==="trigger-change"&&n.set("instantType",void 0))},[s,n]),_e(()=>{const p=a,g=u.current;if(p&&(u.current=p),!g||!p||p===g||!n.select("open"))return;n.set("instantType",void 0);const y=new AbortController;return c.current=y,d(()=>{n.select("open")&&n.set("instantType","trigger-change")},y.signal),()=>{y.abort()}},[a,d,n])}let Ww={},eR={},tR="";function Cp(e,n){return Oc(e)?e:n}function nR(e,n,a){return/hidden|clip/.test(e.getComputedStyle(Cp(n,a)).overflowY)}function v_(e){if(typeof document>"u")return!1;const n=Kt(e);return wn(n).innerWidth-n.documentElement.clientWidth>0}function b_(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const a=Kt(e),o=a.documentElement,s=a.body,u=Cp(o,s),c=u.style.overflowY,d=o.style.scrollbarGutter;o.style.scrollbarGutter="stable",u.style.overflowY="scroll";const p=u.offsetWidth;u.style.overflowY="hidden";const g=u.offsetWidth;return u.style.overflowY=c,o.style.scrollbarGutter=d,p===g}function x_(e){const n=Kt(e),a=n.documentElement,o=n.body,s=Cp(a,o),u={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,u)}}function S_(e){const n=Kt(e),a=n.documentElement,o=n.body,s=wn(a);let u=0,c=0,d=!1;const p=Cr.create();if(ho&&(s.visualViewport?.scale??1)!==1)return()=>{};function g(){const x=s.getComputedStyle(a),w=s.getComputedStyle(o),T=(x.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";u=a.scrollTop,c=a.scrollLeft,Ww={scrollbarGutter:a.style.scrollbarGutter,overflowY:a.style.overflowY,overflowX:a.style.overflowX},tR=a.style.scrollBehavior,eR={position:o.style.position,height:o.style.height,width:o.style.width,boxSizing:o.style.boxSizing,overflowY:o.style.overflowY,overflowX:o.style.overflowX,scrollBehavior:o.style.scrollBehavior};const O=a.scrollHeight>a.clientHeight,M=a.scrollWidth>a.clientWidth,A=x.overflowY==="scroll"||w.overflowY==="scroll",I=x.overflowX==="scroll"||w.overflowX==="scroll",j=Math.max(0,s.innerWidth-o.clientWidth),k=Math.max(0,s.innerHeight-o.clientHeight),D=parseFloat(w.marginTop)+parseFloat(w.marginBottom),z=parseFloat(w.marginLeft)+parseFloat(w.marginRight),F=Cp(a,o);if(d=b_(e),d){a.style.scrollbarGutter=T,F.style.overflowY="hidden",F.style.overflowX="hidden";return}Object.assign(a.style,{scrollbarGutter:T,overflowY:"hidden",overflowX:"hidden"}),(O||A)&&(a.style.overflowY="scroll"),(M||I)&&(a.style.overflowX="scroll"),Object.assign(o.style,{position:"relative",height:D||k?`calc(100dvh - ${D+k}px)`:"100dvh",width:z||j?`calc(100vw - ${z+j}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),o.scrollTop=u,o.scrollLeft=c,a.setAttribute("data-base-ui-scroll-locked",""),a.style.scrollBehavior="unset"}function y(){Object.assign(a.style,Ww),Object.assign(o.style,eR),d||(a.scrollTop=u,a.scrollLeft=c,a.removeAttribute("data-base-ui-scroll-locked"),a.style.scrollBehavior=tR)}function h(){y(),p.request(g)}g();const b=jt(s,"resize",h);return()=>{p.cancel(),y(),typeof s.removeEventListener=="function"&&b()}}class w_{lockCount=0;restore=null;timeoutLock=Da.create();timeoutUnlock=Da.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=Kt(n),o=a.documentElement,s=a.body,u=wn(o);if(nR(u,o,s)){const d=new u.MutationObserver(()=>{nR(u,o,s)||(d.disconnect(),this.restore=null,this.lock(n))}),p={attributes:!0};d.observe(o,p),d.observe(s,p),this.restore=()=>d.disconnect();return}const c=Ph||!v_(n);this.restore=c?x_(n):S_(n)}}const R_=new w_;function CO(e=!0,n=null){_e(()=>{if(e)return R_.acquire(n)},[e,n])}const E_=20;function jv(e,n,a,o){const[s,u]=v.useState(!1);_e(()=>{if(!e||!n||a==null){u(!1);return}const c=Kt(a).documentElement.clientWidth,d=a.offsetWidth;u(c>0&&d>0&&d>=c-E_)},[e,n,a]),CO(e&&(!n||s),o)}const TO=v.forwardRef(function(n,a){const{anchor:o,positionMethod:s="absolute",className:u,render:c,side:d,align:p,sideOffset:g=0,alignOffset:y=0,collisionBoundary:h="clipping-ancestors",collisionPadding:b=5,arrowPadding:x=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:R=ME,style:T,...O}=n,{store:M,virtualFocus:A,syncHighlightedItem:I}=Vo(),j=f_(),k=Sp(!0),D=M.useState("parent"),z=M.useState("floatingRootContext"),F=M.useState("floatingTreeRoot"),G=M.useState("mounted"),J=M.useState("open"),Y=M.useState("modal"),U=M.useState("openMethod"),_=M.useState("activeTriggerElement"),L=M.useState("transitionStatus"),$=M.useState("positionerElement"),K=M.useState("instantType"),V=M.useState("adaptiveOrigin"),X=M.useState("lastOpenChangeReason"),ee=M.useState("floatingNodeId"),q=M.useState("floatingParentNodeId"),se=z.useState("domReferenceElement");let N=o,B=g,W=y,re=p,Re=R;D.type==="context-menu"&&(N=o??D.context?.anchor,re=re??"start",!d&&re!=="center"&&(W=n.alignOffset??2,B=n.sideOffset??-5));let le=d,me=re;D.type==="menu"?(le=le??"inline-end",me=me??"start",Re=n.collisionAvoidance??Jy):D.type==="menubar"&&(le=le??(D.context.orientation==="vertical"?"inline-end":"bottom"),me=me??"start");const ge=D.type==="context-menu",ce=sp({anchor:N,floatingRootContext:z,positionMethod:k?"fixed":s,mounted:G,side:le,sideOffset:B,align:me,alignOffset:W,arrowPadding:ge?0:x,collisionBoundary:h,collisionPadding:b,sticky:w,nodeId:ee,keepMounted:j,disableAnchorTracking:C,collisionAvoidance:Re,shift:ge?{crossAxis:!("side"in Re&&Re.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:F,adaptiveOrigin:V,lazyFlip:A?"placement":!1});v.useEffect(()=>{function He(be){be.open&&(be.parentNodeId===ee&&M.set("hoverEnabled",!1),be.nodeId!==ee&&be.parentNodeId===M.select("floatingParentNodeId")&&M.setOpen(!1,dt(Zu)))}return F.events.on("menuopenchange",He),()=>{F.events.off("menuopenchange",He)}},[M,F.events,ee]),v.useEffect(()=>{if(M.select("floatingParentNodeId")==null)return;function He(be){if(be.open||be.nodeId!==M.select("floatingParentNodeId"))return;const Ue=be.reason??Zu;M.setOpen(!1,dt(Ue))}return F.events.on("menuopenchange",He),()=>{F.events.off("menuopenchange",He)}},[F.events,M]);const Te=Hn();v.useEffect(()=>{J||Te.clear()},[J,Te]),v.useEffect(()=>{function He(be){if(!(!J||be.nodeId!==M.select("floatingParentNodeId")))if(be.target&&_&&_!==be.target){const Ue=M.select("closeDelay");Ue>0?Te.isStarted()||Te.start(Ue,()=>{M.setOpen(!1,dt(Zu))}):M.setOpen(!1,dt(Zu))}else Te.clear()}return F.events.on("itemhover",He),()=>{F.events.off("itemhover",He)}},[F.events,J,_,M,Te]),v.useEffect(()=>{const He={open:J,nodeId:ee,parentNodeId:q,reason:M.select("lastOpenChangeReason")};F.events.emit("menuopenchange",He)},[F.events,J,M,ee,q]),EO({store:M,domReference:se,positionerElement:$,open:J});const ve={open:J,side:ce.side,align:ce.align,anchorHidden:ce.anchorHidden,nested:D.type==="menu",instant:K},Pe=D.type==="menubar"&&D.context.modal;jv(J&&(Pe||Y&&X!==qn),U==="touch",$,_);const Le=lp(n,ve,{styles:ce.positionerStyles,transitionStatus:L,props:O,refs:[a,M.useStateSetter("positionerElement")],hidden:!G,inert:!J}),Fe=G&&D.type!=="menu"&&(D.type!=="menubar"&&Y&&X!==qn||D.type==="menubar"&&D.context.modal);let Oe=null;return D.type==="menubar"?Oe=D.context.contentElement:D.type===void 0&&(Oe=_),S.jsxs(cO.Provider,{value:ce,children:[Fe&&S.jsx(Ep,{ref:D.type==="context-menu"||D.type==="nested-context-menu"?D.context.internalBackdropRef:null,inert:up(!J),cutout:Oe}),S.jsx(PE,{id:ee,children:S.jsx(Iv,{elementsRef:M.context.itemDomElements,labelsRef:M.context.itemLabels,onMapChange:I,children:Le})})]})}),OO=v.createContext(void 0);function C_(){const e=v.useContext(OO);if(e===void 0)throw new Error(Rn(34));return e}const T_=v.forwardRef(function(n,a){const{render:o,className:s,value:u,defaultValue:c,onValueChange:d,disabled:p=!1,style:g,"aria-labelledby":y,...h}=n,[b,x]=v.useState(void 0),[w,C]=bs({controlled:u,default:c,name:"MenuRadioGroup"}),R=Be((A,I)=>{d?.(A,I),!I.isCanceled&&C(A)}),O=Mt("div",n,{state:{disabled:p},ref:a,props:{role:"group","aria-labelledby":y??b,"aria-disabled":p||void 0,...h}}),M=v.useMemo(()=>({value:w,setValue:R,disabled:p}),[w,R,p]);return S.jsx(Dv.Provider,{value:x,children:S.jsx(OO.Provider,{value:M,children:O})})}),O_=v.memo(v.forwardRef(function(n,a){const o=wp()?.RadioGroup??T_;return S.jsx(o,{...n,ref:a})})),MO=v.createContext(void 0);function M_(){const e=v.useContext(MO);if(e===void 0)throw new Error(Rn(35));return e}const A_=v.forwardRef(function(n,a){const{render:o,className:s,id:u,label:c,nativeButton:d=!1,disabled:p=!1,closeOnClick:g=!1,value:y,style:h,...b}=n,{store:x}=Vo(),{value:w,setValue:C,disabled:R}=C_(),T=Rp({guess:!0,label:c}),O=Tr(u),M=x.useState("isActive",T.index),A=x.useState("floatingNodeId"),I=x.useState("itemProps"),j=x.useState("disabled"),k=p||R||j,D=w===y,{getItemProps:z,itemRef:F}=gO({closeOnClick:g,disabled:k,highlighted:M,id:O,store:x,nativeButton:d,nodeId:A,itemMetadata:pO}),G=v.useMemo(()=>({disabled:k,highlighted:M,checked:D}),[k,M,D]);function J(U){const _=dt(fs,U.nativeEvent,void 0,{preventUnmountOnClose:Sn});C(y,_)}const Y=Mt("div",n,{state:G,stateAttributesMapping:yO,props:[I,{role:"menuitemradio","aria-checked":D,onClick:J},b,z],ref:[F,a,T.ref]});return S.jsx(MO.Provider,{value:G,children:Y})}),D_=v.forwardRef(function(n,a){const o=hO(n,a);return o.visible?S.jsx(A_,{...n,ref:o.ref}):null}),N_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c=!1,...d}=n,p=M_(),g=v.useRef(null),{transitionStatus:y,mounted:h,setMounted:b}=ws(p.checked);Ia({batch:!0,enabled:!p.checked,open:p.checked,ref:g,onComplete(){p.checked||b(!1)}});const x={checked:p.checked,disabled:p.disabled,highlighted:p.highlighted,transitionStatus:y};return Mt("span",n,{state:x,stateAttributesMapping:yO,ref:[a,g],props:{"aria-hidden":!0,...d},enabled:c||h})}),I_=v.createContext(null);function AO(e){return v.useContext(I_)}function j_(e){const n=v.useRef(""),a=v.useCallback(s=>{s.defaultPrevented||(n.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:v.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,n.current),n.current=""},[e]),onPointerDown:a}}function ql(e,n){const a=v.useRef(e),o=Be(n);_e(()=>{a.current!==e&&o(a.current),a.current=e},[e,o])}function k_(e,n){const a=Be((u,c)=>{(typeof e=="function"?e():e)||n(c||(Ph?"touch":""))}),{onClick:o,onPointerDown:s}=j_(a);return v.useMemo(()=>({onClick:o,onPointerDown:s}),[o,s])}function DO(e){const[n,a]=v.useState(null),o=k_(e,a);return ql(e,s=>{s&&!e&&a(null)}),v.useMemo(()=>({openMethod:n,triggerProps:o}),[n,o])}function P_(e){return e==null?zr:e.type.startsWith("key")?nE:e.type.startsWith("mouse")||e.type.startsWith("pointer")?D4:zr}const L_={...Po,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,n)=>{const a=Po.triggerPopupId(e,n);return a?e.listElement?.id||a:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,n)=>ho&&e.inputFocused&&n?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,n)=>e.activeIndex===n,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType==="trigger-change"&&!Po.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class z_ extends Ul{constructor(n,a,o=!1){const s=new Pc,u=H_(s,a,o,n);super(u,__(s),L_),this.observe("parent",c=>{c.type==="menu"?this.context.allowMouseUpTriggerRef=c.store.context.allowMouseUpTriggerRef:c.type!==void 0&&(this.context.allowMouseUpTriggerRef=c.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){const n=this.state.parent;if(n.type!=="menu")return;let a=n.store.select("rootId"),o=n.store.select("floatingTreeRoot"),s=n.store.select("keyboardEventRelay");return n.store.subscribe(()=>{const u=n.store.select("rootId"),c=n.store.select("floatingTreeRoot"),d=n.store.select("keyboardEventRelay");a===u&&o===c&&s===d||(a=u,o=c,s=d,this.notifyAll())})}setOpen(n,a){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:a})}setActiveIndex(n,a,o){if(this.state.activeIndex!==n){const u=(n===null?void 0:this.context.itemDomElements.current[n])===this.context.reportedItem;this.context.highlightReason=u?"none":a,this.context.highlightEvent=u?void 0:o}this.set("activeIndex",n)}highlightItem(n,a,o){const s=this.context.itemDomElements.current.indexOf(n);s>-1&&this.setActiveIndex(s,a,o)}}function __(e){return{positionerRef:v.createRef(),popupRef:v.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:"none",highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function H_(e,n,a=!1,o){return{...rp(e,n,a),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:Gt,inputProps:Gt,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Wy,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Gt,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...o}}const rR=v.createContext(null);function NO(e,n){return(e===Va||e===fs)&&n?.detail===0}function U_(e,n){return e===ih||NO(e,n)}const F_=Cc(function(n){const{children:a,open:o,onOpenChange:s,onOpenChangeComplete:u,onItemHighlighted:c,defaultOpen:d=!1,disabled:p=!1,modal:g,loopFocus:y=!0,orientation:h="vertical",actionsRef:b,closeParentOnEsc:x=!1,handle:w,triggerId:C,defaultTriggerId:R=null,highlightItemOnHover:T=!0,isSubmenu:O=!1,virtualFocus:M=!1,virtualFocusRef:A,allowEscape:I=!0,resetOnPointerLeave:j=!0}=n,k=Sp(!0),D=Vo(!0),z=AO(!0),F=D?.store,G=D?.virtualFocus??!1,J=v.useMemo(()=>O&&F?{type:"menu",store:F}:z?{type:"menubar",context:z}:k&&!F?{type:"context-menu",context:k}:{type:void 0},[k,F,z,O]),Y=Tr(),U=Tr(),[_,L]=v.useState(void 0),$=(_??U)||void 0,K=Ni(),V=J.type==="menu"?J.store:void 0,X=(o??d)&&V?.state.transitionStatus==="starting",ee=er(()=>X?V?.state.instantType:void 0).current,q=er(()=>{const ke=new z_({open:d,openProp:o,activeTriggerId:R,triggerIdProp:C,parent:J,disabled:p,highlightItemOnHover:T,modal:J.type===void 0?g:void 0,rootId:Y,instantType:ee},$,K!=null);return ke.context.virtualFocusRef=A,ke}).current;q.useControlledProp("openProp",o),q.useControlledProp("triggerIdProp",C),q.useContextCallback("onOpenChangeComplete",u);const se=q.useState("floatingTreeRoot"),N=ev(se),B=q.useState("open"),W=q.useState("activeTriggerElement"),re=q.useState("positionerElement"),Re=q.useState("hoverEnabled"),le=q.useState("disabled"),me=q.useState("lastOpenChangeReason"),ge=q.useState("parent"),ce=q.useState("activeIndex"),Te=q.useState("keyboardOpen"),ve=q.useState("payload"),Pe=q.useState("floatingParentNodeId"),Me=v.useRef(null),Le=v.useRef(ge.type!=="context-menu"),Fe=Hn(),Oe=v.useRef(!0),He=Hn(),be=Pe!=null,{openMethod:Ue,triggerProps:Ze}=DO(B);q.useSyncedValues({disabled:p,highlightItemOnHover:T,modal:ge.type===void 0?g:void 0,openMethod:Ue,rootId:Y}),Wh(q);const{forceUnmount:it,transitionStatus:de}=ep(B,q,()=>{q.set("allowMouseEnter",!1)},X),we=Xh(q.context.popupRef);v.useEffect(()=>{if(ee===void 0)return;const ke=()=>{q.state.instantType===ee&&q.set("instantType",void 0)};if(!B){ke();return}if(de!==void 0)return;if(q.context.popupRef.current==null){ke();return}const ze=new AbortController;return we(ke,ze.signal),()=>{ze.abort()}},[ee,B,de,we,q]),_e(()=>{k&&!D?q.update({parent:{type:"context-menu",context:k},floatingNodeId:N,floatingParentNodeId:K}):(D||!q.select("activeTriggerElement"))&&q.update({floatingNodeId:N,floatingParentNodeId:K})},[k,D,N,K,W,q]),v.useEffect(()=>{if(B||(Me.current=null),ge.type==="context-menu"){if(!B){Fe.clear(),Le.current=!1;return}Fe.start(500,()=>{Le.current=!0})}},[Fe,B,ge.type]),_e(()=>{!B&&!Re&&q.set("hoverEnabled",!0)},[B,Re,q]);const Ke=Be((ke,ze)=>{const Ge=ze.reason;if(!ke&&!q.select("open")||B===ke&&ze.trigger===W&&me===Ge)return;const et=Jh(ze);if(!ke&&ze.trigger==null&&(ze.trigger=W??void 0),s?.(ke,ze),ze.isCanceled)return;q.state.floatingRootContext.dispatchOpenChange(ke,ze);const Et=ze.event;if(ke===!1&&Ge!==fs&&Et?.type==="click"&&Et.pointerType==="touch"&&!Oe.current)return;ke&&Ge===xl?(Oe.current=!1,He.start(300,()=>{Oe.current=!0})):(Oe.current=!0,He.clear());const H=!ke&&(Ge===Dc||Ge==null);Me.current=ze.event;const Z=Zh(q.state,ke,ze.trigger,et());Z.openChangeReason=Ge,Z.keyboardOpen=ke&&U_(Ge,Et),ge.type==="menubar"&&(Ge===xl||Ge===Ti||Ge===qn||Ge===ih||Ge===Zu)?Z.instantType="group":NO(Ge,Et)?Z.instantType="click":H?Z.instantType="dismiss":Z.instantType=void 0,q.update(Z)}),De=_E({popupStore:q,floatingRootContext:q.state.floatingRootContext,floatingId:$,nested:K!=null,onOpenChange:Ke}),Ie=De.context.events;_e(()=>{const ke=({open:ze,eventDetails:Ge})=>Ke(ze,Ge);return Ie.on("setOpen",ke),()=>{Ie?.off("setOpen",ke)}},[Ie,Ke]),_e(()=>q.subscribeToParentMenu(),[q]);const yt=v.useCallback(()=>{q.setOpen(!1,dt(Nc))},[q]);v.useImperativeHandle(b,()=>({unmount:it,close:yt}),[it,yt]);let ut;ge.type==="context-menu"&&(ut=ge.context),v.useImperativeHandle(ut?.positionerRef,()=>re,[re]),v.useImperativeHandle(ut?.actionsRef,()=>({setOpen:Ke}),[Ke]);const ht=jc(De,{enabled:!le,bubbles:{escapeKey:x&&ge.type==="menu"},outsidePress(){return ge.type!=="context-menu"||Me.current?.type==="contextmenu"?!0:Le.current},externalTree:be?se:void 0}),Ot=ip(),Dt=ZE(De,{enabled:!le,listRef:q.context.itemDomElements,activeIndex:ce,virtual:M,nested:ge.type==="menubar"||!M&&ge.type!==void 0,parentOrientation:ge.type==="menubar"?ge.context.orientation:void 0,loopFocus:y,focusItemOnOpen:M?Te:void 0,allowEscape:M&&y&&I,orientation:h,triggerOrientation:M?"vertical":h,rtl:Ot==="rtl",disabledIndices:fo,onNavigate(ke,ze){q.setActiveIndex(ke,P_(ze),ze?.nativeEvent)},openOnArrowKeyDown:ge.type!=="context-menu"&&!(M&&O),externalTree:!M&&be?se:void 0,nestedReturnFocusRef:V?.context.virtualFocusRef,focusItemOnHover:T,resetOnPointerLeave:j}),Jt=v.useCallback(ke=>{q.context.typingRef.current=ke},[q]),rn=JE(De,{enabled:!le&&!M,listRef:q.context.itemLabels,elementsRef:q.context.itemDomElements,activeIndex:ce,resetMs:S3,onMatch:(ke,ze)=>{B&&ke!==ce&&q.setActiveIndex(ke,nE,ze.nativeEvent)},onTyping:Jt}),Wt=Be(c),We=v.useRef(-1),xt=Be(()=>{const ke=q.state.activeIndex,ze=ke===null?void 0:q.context.itemDomElements.current[ke]??void 0;if(ze?.isConnected===!1)return;const Ge=ze===void 0?-1:ke;if(We.current===Ge&&q.context.reportedItem===ze)return;We.current=Ge,q.context.reportedItem=ze,M&&q.set("highlightedItem",ze);const{highlightReason:et,highlightEvent:Et}=q.context;q.context.highlightReason=zr,q.context.highlightEvent=void 0,c&&Wt(ze,A4(et,Et,{label:ze===void 0?void 0:q.context.itemLabels.current[Ge]??void 0}))});_e(()=>{xt()},[ce,xt]);const $t=v.useMemo(()=>{if(!M)return Dt.reference;if(!Dt.trigger)return Gt;const{onFocus:ke,...ze}=Dt.trigger;return ze},[M,Dt.reference,Dt.trigger]);q.useSyncedValue("inputProps",M?Dt.reference??Gt:Gt);const ft=v.useMemo(()=>{const ke=Pr(rn.reference,$t,ht.reference,{onMouseMove(){q.set("allowMouseEnter",!0)}},Ze);return ke["aria-haspopup"]="menu",ke["aria-expanded"]=B,ke},[q,rn.reference,$t,ht.reference,Ze,B]),vt=v.useMemo(()=>{const ke=Pr(Dt.trigger,ht.trigger,Ze);return ke["aria-haspopup"]="menu",ke["aria-expanded"]=!1,ke},[Dt.trigger,ht.trigger,Ze]);er(()=>(q.update({inactiveTriggerProps:vt}),null));const gt=v.useMemo(()=>Pr(kc,{onMouseMove(){q.set("allowMouseEnter",!0),ge.type==="menu"&&q.set("hoverEnabled",!1)},onClick(){q.select("hoverEnabled")&&q.set("hoverEnabled",!1)},onKeyDown(ke){const ze=q.select("keyboardEventRelay");ze&&!ke.isPropagationStopped()&&ze(ke)}},rn.floating,Dt.floating,ht.floating),[ge.type,q,rn.floating,Dt.floating,ht.floating]),Lt=Dt.item??Gt;tp(q,{floatingRootContext:De,activeTriggerProps:ft,inactiveTriggerProps:vt,popupProps:gt,itemProps:Lt});const un=v.useMemo(()=>({store:q,parent:J,orientation:h,loopFocus:y,allowEscape:I,defaultFloatingId:U,setRenderedFloatingId:L,virtualFocus:M,parentVirtualFocus:G,syncHighlightedItem:xt}),[q,J,h,y,I,U,M,G,xt]),je=typeof a=="function"?a({payload:ve}):a;let ot=S.jsxs(xp.Provider,{value:un,children:[w&&S.jsx(Qh,{handle:w,store:q}),je]});return(ge.type===void 0||ge.type==="context-menu")&&(ot=S.jsx(LE,{externalTree:se,children:ot})),ot});function IO(e){const n=v.useContext(rR);if(n===null)return S.jsx(F_,{...e});const a=n.Root;return S.jsx(rR.Provider,{value:null,children:S.jsx(a,{...n.options,...e})})}const Pf=5;function jO(e,n){const a=B_(n);return e.clientX>=a.left-Pf&&e.clientX<=a.right+Pf&&e.clientY>=a.top-Pf&&e.clientY<=a.bottom+Pf}function B_(e){const n=e.getBoundingClientRect(),a=wn(e);if(Ly)return n;const o=a.getComputedStyle(e,"::before"),s=a.getComputedStyle(e,"::after");if(!(o.content!=="none"||s.content!=="none"))return n;const c=parseFloat(o.width)||0,d=parseFloat(o.height)||0,p=parseFloat(s.width)||0,g=parseFloat(s.height)||0,y=Math.max(n.width,c,p),h=Math.max(n.height,d,g),b=y-n.width,x=h-n.height;return{left:n.left-b/2,right:n.right+b/2,top:n.top-x/2,bottom:n.bottom+x/2}}function V_(e={}){const{highlightItemOnHover:n,highlightedIndex:a,onHighlightedIndexChange:o}=Av(),{ref:s,index:u}=Rp(e),c=a===u,d=v.useRef(null),p=Gr(s,d);return{compositeProps:{tabIndex:c?0:-1,onFocus(){o(u)},onMouseMove(){const y=d.current;if(!n||!y)return;const h=y.hasAttribute("disabled")||y.ariaDisabled==="true";!c&&!h&&y.focus()}},compositeRef:p,index:u}}function kO(e){const{render:n,className:a,style:o,state:s=Gt,props:u=fo,refs:c=fo,metadata:d,stateAttributesMapping:p,tag:g="div",...y}=e,{compositeProps:h,compositeRef:b}=V_({metadata:d});return Mt(g,e,{state:s,ref:[b,...c],props:[h,...u,y],stateAttributesMapping:p})}function kv(e){if(yn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!zo(e))return kv(Uo(e))}function q_(e,n){function a(u,c,d){const p=u.currentTarget;cr.flushSync(()=>{e.setOpen(!1,dt(Ti,u.nativeEvent,p))}),a3(p.isConnected?p:n.current,c,d)?.focus()}function o(u){a(u,-1,e.select("positionerElement"))}function s(u){const c=e.select("positionerElement");c&&El(u,c)?e.context.beforeContentFocusGuardRef.current?.focus():a(u,1,c)}return{handlePreFocusGuardFocus:o,handleFocusTargetFocus:s}}function Y_(e){const{enabled:n=!0,mouseDownAction:a,open:o}=e,s=v.useRef(!1);return v.useMemo(()=>n?{onMouseDown:u=>{(a==="open"&&!o||a==="close"&&o)&&(s.current=!0,Kt(u.currentTarget).addEventListener("click",()=>{s.current=!1},{once:!0}))},onClick:u=>{s.current&&(s.current=!1,u.preventBaseUIHandler())}}:Gt,[n,a,o])}const K_=GR(function(n,a){const{render:o,className:s,style:u,disabled:c=!1,nativeButton:d=!0,id:p,openOnHover:g,delay:y=100,closeDelay:h=0,handle:b,payload:x,...w}=n,C=Vo(!0),T=GE(b)??C?.store;if(!T)throw new Error(Rn(85));const O=Tr(p),M=T.useState("isTriggerActive",O),A=T.useState("floatingRootContext"),I=T.useState("isOpenedByTrigger",O),j=T.useState("triggerControlsId",O),k=v.useRef(null),D=$_(),z=Av(!0),F=Ii(),G=v.useMemo(()=>F??new Wy,[F]),J=ev(G),Y=Ni(),{registerTrigger:U,isMountedByThisTrigger:_}=FE(O,k,T,{payload:x,closeDelay:h,parent:D,floatingTreeRoot:G,floatingNodeId:J,floatingParentNodeId:Y,keyboardEventRelay:z?.relayKeyboardEvent}),L=D.type==="menubar",$=T.useState("disabled"),K=c||$||L&&D.context.disabled,{getButtonProps:V,buttonRef:X}=mo({disabled:K,native:d});v.useEffect(()=>{!I&&D.type===void 0&&(T.context.allowMouseUpTriggerRef.current=!1)},[T,I,D.type]);const ee=v.useRef(null),q=Hn(),se=Be(He=>{if(!ee.current)return;q.clear(),T.context.allowMouseUpTriggerRef.current=!1;const be=He.target;at(ee.current,be)||at(T.select("positionerElement"),be)||be===ee.current||be!=null&&kv(be)===T.select("rootId")||jO(He,ee.current)||G.events.emit("close",{domEvent:He,reason:Vy})});v.useEffect(()=>{const He=Kt(ee.current);if(I&&T.select("lastOpenChangeReason")===qn)return He.addEventListener("mouseup",se,{once:!0}),()=>{He.removeEventListener("mouseup",se)}},[I,se,T]);const N=L&&D.context.hasSubmenuOpen,W=QE(A,{enabled:(g??N)&&!K&&(!L||N&&!_),handleClose:WE({blockPointerEvents:!L}),mouseOnly:!0,move:!1,restMs:D.type===void 0?y:void 0,delay:{close:h},triggerElementRef:k,externalTree:G,isActiveTrigger:M,isClosing:()=>T.select("transitionStatus")==="ending"}),re=G_(I,T.select("lastOpenChangeReason")),Re=zE(A,{enabled:!K,event:I&&L?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:D.type===void 0?re:!1}),le=$E(A,{enabled:!K&&N}),me=Y_({open:I,enabled:L,mouseDownAction:"open"}),ge=v.useMemo(()=>Pr(le.reference,Re.reference),[le.reference,Re.reference]),ce=T.useState("triggerProps",_),Te=T.useState("filterTriggerProps"),{handlePreFocusGuardFocus:ve,handleFocusTargetFocus:Pe}=q_(T,k),Me={disabled:K,open:I},Le=[ee,a,X,U,k],Fe=[ge,W??Gt,ce,{"aria-haspopup":"menu","aria-controls":j,id:O,onMouseDown:He=>{if(T.select("open"))return;q.start(200,()=>{T.context.allowMouseUpTriggerRef.current=!0}),Kt(He.currentTarget).addEventListener("mouseup",se,{once:!0})}},Te,L?{role:"menuitem"}:{},me,w,V],Oe=Mt("button",n,{enabled:!L,stateAttributesMapping:rh,state:Me,ref:Le,props:Fe});return L?S.jsx(kO,{tag:"button",render:o,className:s,style:u,state:Me,refs:Le,props:Fe,stateAttributesMapping:rh}):I?S.jsxs(v.Fragment,{children:[S.jsx(jl,{ref:T.context.beforeTriggerFocusGuardRef,onFocus:ve},`${O}-pre-focus-guard`),S.jsx(v.Fragment,{children:Oe},O),S.jsx(jl,{ref:T.context.triggerFocusTargetRef,onFocus:Pe},`${O}-post-focus-guard`)]}):S.jsx(v.Fragment,{children:Oe},O)});function G_(e,n){const a=Hn(),[o,s]=v.useState(!1);return _e(()=>{e&&n===qn?(s(!0),a.start(OE,()=>{s(!1)})):e||(a.clear(),s(!1))},[e,n,a]),o}function $_(){const e=AO();return v.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}const PO=v.forwardRef(function(n,a){const{className:o,render:s,orientation:u="horizontal",style:c,...d}=n;return Mt("div",n,{state:{orientation:u},ref:a,props:[{role:"separator","aria-orientation":u},d]})});function LO(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Sh(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function X_(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function zO(e){return X_(e?.[0])}function Q_(e){return zO(e)?e.flatMap(n=>n.items):e}function Z_(e){if(!Array.isArray(e))return e!=null&&"null"in e;const n=e;if(zO(n)){for(const a of n)for(const o of a.items)if(o&&o.value==null&&o.label!=null)return!0;return!1}for(const a of n)if(a&&a.value==null&&a.label!=null)return!0;return!1}function _O(e,n){if(n&&e!=null)return n(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Sh(e)}function vl(e,n){return n&&e!=null?n(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Sh(e.value):Sh(e)}function HO(e,n,a){function o(){return _O(e,a)}if(a&&e!=null)return a(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(n&&!Array.isArray(n))return(Object.hasOwn(n,e)?n[e]:void 0)??o();if(Array.isArray(n)){const u=Q_(n);if(e==null||typeof e!="object"){const c=u.find(d=>d.value===e);return c&&c.label!=null?c.label:o()}if("value"in e){const c=u.find(d=>d&&d.value===e.value);if(c&&c.label!=null)return c.label}}return o()}function J_(e,n,a){return e.reduce((o,s,u)=>(u>0&&o.push(", "),o.push(S.jsx(v.Fragment,{children:HO(s,n,a)},u)),o),[])}function Pv({...e}){return S.jsx(IO,{"data-slot":"dropdown-menu",...e})}function Lv({...e}){return S.jsx(K_,{"data-slot":"dropdown-menu-trigger",...e})}function zv({align:e="start",alignOffset:n=0,side:a="bottom",sideOffset:o=4,className:s,...u}){return S.jsx(wO,{children:S.jsx(TO,{className:"isolate z-50 outline-none",align:e,alignOffset:n,side:a,sideOffset:o,children:S.jsx(xO,{"data-slot":"dropdown-menu-content",className:Qe("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",s),...u})})})}function wh({...e}){return S.jsx(Jz,{"data-slot":"dropdown-menu-group",...e})}function _v({className:e,inset:n,...a}){return S.jsx(Wz,{"data-slot":"dropdown-menu-label","data-inset":n,className:Qe("px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5",e),...a})}function xy({className:e,inset:n,variant:a="default",...o}){return S.jsx(vO,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":a,className:Qe("group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",e),...o})}function W_({...e}){return S.jsx(O_,{"data-slot":"dropdown-menu-radio-group",...e})}function e6({className:e,children:n,inset:a,...o}){return S.jsxs(D_,{"data-slot":"dropdown-menu-radio-item","data-inset":a,className:Qe("relative flex min-h-7 cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",e),...o,children:[S.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:S.jsx(N_,{children:S.jsx(dp,{})})}),n]})}function t6({className:e,...n}){return S.jsx(PO,{"data-slot":"dropdown-menu-separator",className:Qe("-mx-1 my-1 h-px bg-border/50",e),...n})}function n6({className:e,...n}){return S.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:Qe("ml-auto text-[0.625rem] tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",e),...n})}function UO(e){return Mt(e.defaultTagName??"div",e,e)}function FO(e){var n,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(a=FO(e[n]))&&(o&&(o+=" "),o+=a)}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function r6(){for(var e,n,a=0,o="",s=arguments.length;a<s;a++)(e=arguments[a])&&(n=FO(e))&&(o&&(o+=" "),o+=n);return o}const aR=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,oR=r6,Tp=(e,n)=>a=>{var o;if(n?.variants==null)return oR(e,a?.class,a?.className);const{variants:s,defaultVariants:u}=n,c=Object.keys(s).map(g=>{const y=a?.[g],h=u?.[g];if(y===null)return null;const b=aR(y)||aR(h);return s[g][b]}),d=a&&Object.entries(a).reduce((g,y)=>{let[h,b]=y;return b===void 0||(g[h]=b),g},{}),p=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((g,y)=>{let{class:h,className:b,...x}=y;return Object.entries(x).every(w=>{let[C,R]=w;return Array.isArray(R)?R.includes({...u,...d}[C]):{...u,...d}[C]===R})?[...g,h,b]:g},[]);return oR(e,c,p,a?.class,a?.className)},P0=768;function a6(){const[e,n]=v.useState(void 0);return v.useEffect(()=>{const a=window.matchMedia(`(max-width: ${P0-1}px)`),o=()=>{n(window.innerWidth<P0)};return a.addEventListener("change",o),n(window.innerWidth<P0),()=>a.removeEventListener("change",o)},[]),!!e}const o6=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u=!1,focusableWhenDisabled:c=!1,nativeButton:d=!0,style:p,...g}=n,{getButtonProps:y,buttonRef:h}=mo({disabled:u,focusableWhenDisabled:c,native:d});return Mt("button",n,{state:{disabled:u},ref:[a,h],props:[g,y]})}),i6=Tp("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function nn({className:e,variant:n="default",size:a="default",...o}){return S.jsx(o6,{"data-slot":"button",className:Qe(i6({variant:n,size:a,className:e})),...o})}const s6="data-valid",l6="data-invalid",u6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},c6={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},d6={disabled:!1,...c6},Yl={valid(e){return e===null?null:e?{[s6]:""}:{[l6]:""}}},f6={invalid:void 0,name:void 0,validityData:{state:u6,errors:[],error:"",value:"",initialValue:null},setValidityData:Sn,disabled:void 0,setTouched:Sn,setDirty:Sn,setFilled:Sn,setFocused:Sn,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:d6,registerFieldControl:Sn,validation:{getValidationProps:(e,n=Gt)=>n,inputRef:{current:null},registeredInputs:new Map,registerInput:Sn,getInputControl:()=>null,commit:async()=>{},change:Sn}},h6=v.createContext(f6);function qo(e=!0){const n=v.useContext(h6);if(n.setValidityData===Sn&&!e)throw new Error(Rn(28));return n}const p6=v.createContext(void 0);function g6(e=!1){const n=v.useContext(p6);if(!n&&!e)throw new Error(Rn(86));return n}const m6=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Sn,validationMode:"onSubmit",submitCountRef:{current:0}});function Vc(){return v.useContext(m6)}const y6=v.createContext({controlId:void 0,registerControlId:Sn,resetControlId:Sn,labelId:void 0,setLabelId:Sn,messageIds:[],setMessageIds:Sn,getDescriptionProps:e=>e});function Cs(){return v.useContext(y6)}function Hv(e,n,a,o=!0,s,u){const[c,d]=v.useState(),p=Tr(s?`${s}-label`:void 0),g=!!u?.trim(),h=e??(g?void 0:n)??c;return _e(()=>{const b=e||n||g||!o?void 0:v6(a.current,p);c!==b&&d(b)}),h}function v6(e,n){const a=b6(e);if(a)return!a.id&&n&&(a.id=n),a.id||void 0}function b6(e){if(!e)return;const n=e.parentElement;if(n&&n.tagName==="LABEL")return n;const a=e.id;if(a){const s=e.nextElementSibling;if(s&&s.htmlFor===a)return s}const o=e.labels;return o&&o[0]}function Kl(e={}){const{id:n,enabled:a=!0}=e,{controlId:o,registerControlId:s,resetControlId:u}=Cs(),c=Tr(),d=er(()=>Symbol()),p=v.useRef(!1),g=v.useRef(!1),y=Be(()=>{!p.current||s===Sn||(p.current=!1,s(d.current,void 0))});return _e(()=>{if(!a||s===Sn){y();return}let h;if(n!==void 0)g.current=!0,h=n;else if(g.current)h=c;else{u();return}if(h===void 0){y();return}p.current=!0,s(d.current,h)},[n,a,s,u,c,d,y]),_e(()=>y,[y]),(a?o:void 0)??n??c}function x6(e,n){return e.matches(":disabled")?!1:!n||e.form===n?!0:e.form===null&&!e.hasAttribute("form")}const S6=v.createContext({disabled:!1});function BO(){return v.useContext(S6)}function qc(e,n,a){const{setFocused:o,focusOwnerRef:s}=qo(),u=Be(c=>{(c?!e:s.current===u)&&(s.current=c&&u,o(c))});return _e(()=>{const c=n.current;return c?.getRootNode()?.activeElement===c&&u(!0),()=>u(!1)},[e,n,u]),u}function Yc(e,n,a,o,s=!0,u){const{registerFieldControl:c}=qo(),d=er(()=>Symbol());_e(()=>{const p=d.current;if(!s){c(p,void 0);return}c(p,{controlRef:e,getValue:o,id:n,name:u,value:a})},[e,s,o,n,u,c,d,a]),_e(()=>{const p=d.current;return()=>{c(p,void 0)}},[c,d])}const w6=v.forwardRef(function(n,a){const{render:o,className:s,id:u,name:c,value:d,disabled:p=!1,onValueChange:g,defaultValue:y,autoFocus:h=!1,style:b,...x}=n,{state:w,name:C,disabled:R,setTouched:T,setDirty:O,validityData:M,setFilled:A,validationMode:I,validation:j}=qo(),{clearErrors:k,elementRef:D,submitCountRef:z}=Vc(),F=R||p,G=C??c,J={...w,disabled:F},{labelId:Y}=Cs(),U=Kl({id:u}),_=d!==void 0,L=d==null?void 0:String(d),$=Be(()=>j.inputRef.current?.value);Yc(j.inputRef,U,L,$,!F,c),_e(()=>{const q=L??j.inputRef.current?.value;q!==void 0&&A(q!=="")},[L,y,j.inputRef,A]),ql(L,()=>{L!==void 0&&(k(G),O(L!==(M.initialValue??"")),j.change(L))});const K=v.useRef(null),V=qc(F,K),X=Hn();return Mt("input",n,{ref:[a,K],state:J,props:[{id:U,disabled:F,name:G,ref:j.inputRef,"aria-labelledby":Y,autoFocus:h,..._?{value:d}:{defaultValue:y},onChange(q){const se=q.currentTarget.value,N=dt(zr,q.nativeEvent);g?.(se,N),!_&&(O(se!==(M.initialValue??"")),A(se!==""),!q.nativeEvent.defaultPrevented&&!N.isCanceled&&(k(G),j.change(se)))},onFocus(){V(!0)},onBlur(q){if(T(!0),V(!1),I==="onBlur"){const se=q.currentTarget.value;j.commit(se),_&&queueMicrotask(()=>{const N=j.inputRef.current?.value;N!==void 0&&N!==se&&N!==(M.initialValue??"")&&j.commit(N)})}},onKeyDown(q){if(q.currentTarget.tagName==="INPUT"&&q.key==="Enter"){T(!0);const se=q.currentTarget.value,N=q.currentTarget.form;if(N&&N===D.current&&!q.defaultPrevented){const B=q.currentTarget,W=z.current;X.start(0,()=>{z.current===W&&j.commit(B.value)})}else j.commit(se)}}},x,q=>j.getValidationProps(F,q)],stateAttributesMapping:Yl})}),R6=v.forwardRef(function(n,a){return S.jsx(w6,{ref:a,...n})});function VO({className:e,type:n,...a}){return S.jsx(R6,{type:n,"data-slot":"input",className:Qe("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a})}function qO({className:e,orientation:n="horizontal",...a}){return S.jsx(PO,{"data-slot":"separator",orientation:n,className:Qe("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...a})}const YO=v.createContext(void 0);function Ts(e){const n=v.useContext(YO);if(!e&&n===void 0)throw new Error(Rn(27));return n}const KO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,forceRender:c=!1,...d}=n,p=Ts(),g=p.useState("open"),y=p.useState("nested"),h=p.useState("mounted"),b=p.useState("transitionStatus");return Mt("div",n,{state:{open:g,transitionStatus:b},ref:[p.context.backdropRef,a],stateAttributesMapping:Fh,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:c||!y})}),Op=v.forwardRef(function(n,a){const{render:o,className:s,style:u,disabled:c=!1,nativeButton:d=!0,...p}=n,g=Ts(),y=g.useState("open"),{getButtonProps:h,buttonRef:b}=mo({disabled:c,native:d}),x={disabled:c};function w(C){y&&g.setOpen(!1,dt(tE,C.nativeEvent))}return Mt("button",n,{state:x,ref:[a,b],props:[{onClick:w},p,h]})}),GO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=Ts(),g=Tr(c);return p.useSyncedValueWithCleanup("descriptionElementId",g),Mt("p",n,{ref:a,props:[{id:g},d]})}),$O=v.createContext(void 0);function E6(){const e=v.useContext($O);if(e===void 0)throw new Error(Rn(26));return e}const C6="--nested-dialogs",T6="data-nested-dialog-open",O6={...Mc,...po,nestedDialogOpen(e){return e?{[T6]:""}:null}},XO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,initialFocus:d,...p}=n,g=Ts(),y=g.useState("descriptionElementId"),h=g.useState("disablePointerDismissal"),b=g.useState("floatingRootContext"),x=g.useState("popupProps"),w=g.useState("modal"),C=g.useState("mounted"),R=g.useState("nested"),T=g.useState("nestedOpenDialogCount"),O=g.useState("open"),M=g.useState("openMethod"),A=g.useState("titleElementId"),I=g.useState("transitionStatus"),j=g.useState("role"),k=b.useState("floatingId");E6(),Ia({open:O,ref:g.context.popupRef,onComplete(){O&&g.context.onOpenChangeComplete?.(!0)}});const D=d===void 0?UE(g.context.popupRef):d,z=T>0,F=g.useStateSetter("popupElement"),J=Mt("div",n,{state:{open:O,nested:R,transitionStatus:I,nestedDialogOpen:z},props:[x,{id:k,"aria-labelledby":A,"aria-describedby":y,role:j,...kc,hidden:!C,onKeyDown(Y){Bc.has(Y.key)&&Y.stopPropagation()},style:{[C6]:T}},p],ref:[a,g.context.popupRef,F],stateAttributesMapping:O6});return S.jsx($h,{context:b,openInteractionType:M,disabled:!C,closeOnFocusOut:!h,initialFocus:D,returnFocus:c,modal:w!==!1,restoreFocus:"popup",children:J})}),QO=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n,u=Ts(),c=u.useState("mounted"),d=u.useState("modal"),p=u.useState("open");return c||o?S.jsx($O.Provider,{value:o,children:S.jsxs(Gh,{ref:a,...s,children:[c&&d===!0&&S.jsx(Ep,{ref:u.context.internalBackdropRef,inert:up(!p)}),n.children]})}):null});function M6({store:e,parentContext:n,isDrawer:a}){const o=e.useState("open"),s=e.useState("mounted"),u=e.useState("disablePointerDismissal"),c=e.useState("modal"),d=e.useState("popupElement"),p=e.useState("floatingRootContext"),[g,y]=v.useState(0),[h,b]=v.useState(0),x=g===0,w=jc(p,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(C){if(!e.context.outsidePressEnabledRef.current||"button"in C&&C.button!==0)return!1;if("touches"in C){if(C.type==="touchend"){if(C.changedTouches.length!==1||C.touches.length!==0)return!1}else if(C.touches.length!==1)return!1}const R=tr(C);if(x&&!u){if(c){const T=e.context.internalBackdropRef.current,O=e.context.backdropRef.current;return T||O?T===R||O===R||at(R,d)&&!R?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:x});return CO(o&&c===!0,d),e.useContextCallback("onNestedDialogOpen",(C,R)=>{!e.select("open")&&!e.select("mounted")||(y(C),b(R))}),_e(()=>{!o&&!s&&(y(0),b(0))},[o,s]),_e(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(g+1,h+(a?1:0)),()=>{n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(0,0)}),[a,o,g,h,n]),tp(e,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:g,nestedOpenDrawerCount:h}),null}const A6={...Po,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class D6 extends Ul{constructor(n,a,o){const s=new Pc,u=N6(n,s,a,o);super(u,I6(s),A6)}setOpen=(n,a)=>{a.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&a.trigger==null&&this.state.activeTriggerId!=null&&(a.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(n,a),!a.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(n,a),this.update(Zh(this.state,n,a.trigger)))}}function N6(e,n,a,o=!1){return{...rp(n,a,o),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function I6(e){return{popupRef:v.createRef(),backdropRef:v.createRef(),internalBackdropRef:v.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function j6(e,n){const{children:a,open:o,defaultOpen:s=!1,onOpenChange:u,onOpenChangeComplete:c,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:g,handle:y,triggerId:h,defaultTriggerId:b=null}=n,x=e==="drawer",w=p,C=d,R="dialog",T=Ts(!0),O=T!=null,M={modal:w,disablePointerDismissal:C,nested:O,role:R},A=nv((F,G)=>new D6({open:s,openProp:o,activeTriggerId:b,triggerIdProp:h,...M},F,G),!0);A.useControlledProp("openProp",o),A.useControlledProp("triggerIdProp",h),A.useSyncedValues(M),A.useContextCallback("onOpenChange",u),A.useContextCallback("onOpenChangeComplete",c);const I=A.useState("open"),j=A.useState("mounted"),k=A.useState("payload");BE(A,I),Wh(A);const{forceUnmount:D}=ep(I,A);v.useImperativeHandle(g,()=>({unmount:D,close:()=>A.setOpen(!1,dt(Nc))}),[D,A]);const z=I||j||y!=null;return S.jsxs(YO.Provider,{value:A,children:[y&&S.jsx(Qh,{handle:y,store:A}),z&&S.jsx(M6,{store:A,parentContext:T?.context,isDrawer:x}),typeof a=="function"?a({payload:k}):a]})}const ZO=Cc(function(n){return j6("dialog",n)}),JO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=Ts(),g=Tr(c);return p.useSyncedValueWithCleanup("titleElementId",g),Mt("h2",n,{ref:a,props:[{id:g},d]})}),Rt=e=>typeof e=="string",Qu=()=>{let e,n;const a=new Promise((o,s)=>{e=o,n=s});return a.resolve=e,a.reject=n,a},Lf=e=>e==null?"":String(e),k6=(e,n,a)=>{e.forEach(o=>{n[o]&&(a[o]=n[o])})},P6=/###/g,iR=e=>e&&e.includes("###")?e.replace(P6,"."):e,sR=e=>!e||Rt(e),ic=(e,n,a)=>{const o=Rt(n)?n.split("."):n;let s=0;for(;s<o.length-1;){if(sR(e))return{};const u=iR(o[s]);!e[u]&&a&&(e[u]=new a),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++s}return sR(e)?{}:{obj:e,k:iR(o[s])}},lR=(e,n,a)=>{const{obj:o,k:s}=ic(e,n,Object);if(o!==void 0||n.length===1){o[s]=a;return}let u=n[n.length-1],c=n.slice(0,n.length-1),d=ic(e,c,Object);for(;d.obj===void 0&&c.length;)u=`${c[c.length-1]}.${u}`,c=c.slice(0,c.length-1),d=ic(e,c,Object),d?.obj&&typeof d.obj[`${d.k}.${u}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${u}`]=a},L6=(e,n,a,o)=>{const{obj:s,k:u}=ic(e,n,Object);s[u]=s[u]||[],s[u].push(a)},Rh=(e,n)=>{const{obj:a,k:o}=ic(e,n);if(a&&Object.prototype.hasOwnProperty.call(a,o))return a[o]},z6=(e,n,a)=>{const o=Rh(e,a);return o!==void 0?o:Rh(n,a)},WO=(e,n,a)=>{for(const o in n)o!=="__proto__"&&o!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,o)?Rt(e[o])||e[o]instanceof String||Rt(n[o])||n[o]instanceof String?a&&(e[o]=n[o]):WO(e[o],n[o],a):e[o]=n[o]);return e},jo=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),_6={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},H6=e=>Rt(e)?e.replace(/[&<>"'\/]/g,n=>_6[n]):e;class U6{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const a=this.regExpMap.get(n);if(a!==void 0)return a;const o=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,o),this.regExpQueue.push(n),o}}const F6=[" ",",","?","!",";"],B6=new U6(20),V6=(e,n,a)=>{n=n||"",a=a||"";const o=F6.filter(c=>!n.includes(c)&&!a.includes(c));if(o.length===0)return!0;const s=B6.getRegExp(`(${o.map(c=>c==="?"?"\\?":c).join("|")})`);let u=!s.test(e);if(!u){const c=e.indexOf(a);c>0&&!s.test(e.substring(0,c))&&(u=!0)}return u},Sy=(e,n,a=".")=>{if(!e)return;if(e[n])return Object.prototype.hasOwnProperty.call(e,n)?e[n]:void 0;const o=n.split(a);let s=e;for(let u=0;u<o.length;){if(!s||typeof s!="object")return;let c,d="";for(let p=u;p<o.length;++p)if(p!==u&&(d+=a),d+=o[p],c=s[d],(typeof c=="function"||d==="__proto__")&&!Object.prototype.hasOwnProperty.call(s,d)&&(c=void 0),c!==void 0){if(["string","number","boolean"].includes(typeof c)&&p<o.length-1)continue;u+=p-u+1;break}s=c}return s},zl=e=>e?.replace(/_/g,"-"),q6={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,n){console?.[e]?.apply?.(console,n)}};class Eh{constructor(n,a={}){this.init(n,a)}init(n,a={}){this.prefix=a.prefix||"i18next:",this.logger=n||q6,this.options=a,this.debug=a.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,a,o,s){return s&&!this.debug?null:(n=n.map(u=>Rt(u)?u.replace(/[\r\n\x00-\x1F\x7F]/g," "):u),Rt(n[0])&&(n[0]=`${o}${this.prefix} ${n[0]}`),this.logger[a](n))}create(n){return new Eh(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new Eh(this.logger,n)}}var lo=new Eh;class Mp{constructor(){this.observers={}}on(n,a){return n.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const s=this.observers[o].get(a)||0;this.observers[o].set(a,s+1)}),this}off(n,a){if(this.observers[n]){if(!a){delete this.observers[n];return}this.observers[n].delete(a)}}once(n,a){const o=(...s)=>{a(...s),this.off(n,o)};return this.on(n,o),this}emit(n,...a){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([s,u])=>{for(let c=0;c<u;c++)s(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,u])=>{for(let c=0;c<u;c++)s(n,...a)})}}const uR=new WeakSet;class cR extends Mp{constructor(n,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=n||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.includes(n)||this.options.ns.push(n)}removeNamespaces(n){const a=this.options.ns.indexOf(n);a>-1&&this.options.ns.splice(a,1)}getResource(n,a,o,s={}){const u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;n.includes(".")?d=n.split("."):(d=[n,a],o&&(Array.isArray(o)?d.push(...o):Rt(o)&&u?d.push(...o.split(u)):d.push(o)));const p=Rh(this.data,d);return p==null&&!a&&!o&&n.includes(".")&&(n=d[0],a=d[1],o=d.slice(2).join(".")),p!=null||!c||!Rt(o)?p:Sy(this.data?.[n]?.[a],o,u)}addResource(n,a,o,s,u={silent:!1}){const c=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let d=[n,a];o&&(d=d.concat(c?o.split(c):o)),n.includes(".")&&(d=n.split("."),s=a,a=d[1]),this.addNamespaces(a),lR(this.data,d,s),u.silent||this.emit("added",n,a,o,s)}addResources(n,a,o,s={silent:!1}){for(const u in o)(Rt(o[u])||Array.isArray(o[u]))&&this.addResource(n,a,u,o[u],{silent:!0});s.silent||this.emit("added",n,a,o)}addResourceBundle(n,a,o,s,u,c={silent:!1,skipCopy:!1}){let d=[n,a];n.includes(".")&&(d=n.split("."),s=o,o=a,a=d[1]),this.addNamespaces(a);let p=Rh(this.data,d)||{};c.skipCopy||(o=JSON.parse(JSON.stringify(o))),s?WO(p,o,u):p={...p,...o},lR(this.data,d,p),c.silent||this.emit("added",n,a,o)}removeResourceBundle(n,a){this.hasResourceBundle(n,a)&&delete this.data[n][a],this.removeNamespaces(a),this.emit("removed",n,a)}hasResourceBundle(n,a){return this.getResource(n,a)!==void 0}getResourceBundle(n,a){return a||(a=this.options.defaultNS),this.getResource(n,a)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const a=this.getDataByLanguage(n);return!!(a&&Object.keys(a)||[]).find(s=>{const u=a[s];return uR.has(u)?!0:!u||Object.keys(u).length===0?!1:(typeof u=="object"&&uR.add(u),!0)})}toJSON(){return this.data}}var eM={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,n,a,o,s){return e.forEach(u=>{n=this.processors[u]?.process(n,a,o,s)??n}),n}};const tM=Symbol("i18next/PATH_KEY");function Y6(){const e=[],n=Object.create(null);let a;return n.get=(o,s)=>(a?.revoke?.(),s===tM?e:(e.push(s),a=Proxy.revocable(o,n),a.proxy)),Proxy.revocable(Object.create(null),n).proxy}function ps(e,n){const{[tM]:a}=e(Y6()),o=n?.keySeparator??".",s=n?.nsSeparator??":",u=n?.enableSelector==="strict";if(a.length>1&&s){const c=n?.ns,d=u?Array.isArray(c)?c:c?[c]:null:Array.isArray(c)?c:null;if(d&&(u?d:d.length>1?d.slice(1):[]).includes(a[0]))return`${a[0]}${s}${a.slice(1).join(o)}`}return a.join(o)}const L0=e=>!Rt(e)&&typeof e!="boolean"&&typeof e!="number";class Ch extends Mp{constructor(n,a={}){super(),k6(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=lo.create("translator"),this.checkedLoadedFor={}}changeLanguage(n){n&&(this.language=n)}exists(n,a={interpolation:{}}){const o={...a};if(n==null)return!1;const s=this.resolve(n,o);if(s?.res===void 0)return!1;const u=L0(s.res);return!(o.returnObjects===!1&&u)}extractFromKey(n,a){let o=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let u=a.ns||this.options.defaultNS||[];const c=o&&n.includes(o),d=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!V6(n,o,s);if(c&&!d){const p=n.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:n,namespaces:Rt(u)?[u]:u};const g=n.split(o);(o!==s||o===s&&this.options.ns.includes(g[0]))&&(u=g.shift()),n=g.join(s)}return{key:n,namespaces:Rt(u)?[u]:u}}translate(n,a,o){let s=typeof a=="object"?{...a}:a;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),n==null)return"";typeof n=="function"&&(n=ps(n,{...this.options,...s})),Array.isArray(n)||(n=[String(n)]),n=n.map(Y=>typeof Y=="function"?ps(Y,{...this.options,...s}):String(Y));const u=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:d,namespaces:p}=this.extractFromKey(n[n.length-1],s),g=p[p.length-1];let y=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const h=s.lng||this.language,b=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return b?u?{res:`${g}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:`${g}${y}${d}`:u?{res:d,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:d;const x=this.resolve(n,s);let w=x?.res;const C=x?.usedKey||d,R=x?.exactUsedKey||d,T=["[object Number]","[object Function]","[object RegExp]"],O=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,A=s.count!==void 0&&!Rt(s.count),I=Ch.hasDefaultValue(s),j=A?this.pluralResolver.getSuffix(h,s.count,s):"",k=s.ordinal&&A?this.pluralResolver.getSuffix(h,s.count,{ordinal:!1}):"",D=A&&!s.ordinal&&s.count===0,z=D&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${j}`]||s[`defaultValue${k}`]||s.defaultValue;let F=w;M&&!w&&I&&(F=z);const G=L0(F),J=Object.prototype.toString.apply(F);if(M&&F&&G&&!T.includes(J)&&!(Rt(O)&&Array.isArray(F))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,F,{...s,ns:p}):`key '${d} (${this.language})' returned an object instead of string.`;return u?(x.res=Y,x.usedParams=this.getUsedParamsDetails(s),x):Y}if(c){const Y=Array.isArray(F),U=Y?[]:{},_=Y?R:C;for(const L in F)if(Object.prototype.hasOwnProperty.call(F,L)){const $=`${_}${c}${L}`;I&&!w?U[L]=this.translate($,{...s,defaultValue:L0(z)?z[L]:void 0,joinArrays:!1,ns:p}):U[L]=this.translate($,{...s,joinArrays:!1,ns:p}),U[L]===$&&(U[L]=F[L])}w=U}}else if(M&&Rt(O)&&Array.isArray(w))w=w.join(O),w&&(w=this.extendTranslation(w,n,s,x,o));else{let Y=!1,U=!1;!this.isValidLookup(w)&&I&&(Y=!0,w=z),this.isValidLookup(w)||(U=!0,w=d);const L=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&U?void 0:w,$=I&&z!==w&&this.options.updateMissing;if(U||Y||$){if(this.logger.log($?"updateKey":"missingKey",h,g,A&&!$?`${d}${this.pluralResolver.getSuffix(h,s.count,s)}`:d,$?z:w),c){const ee=this.resolve(d,{...s,keySeparator:!1});ee&&ee.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let K=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let ee=0;ee<V.length;ee++)K.push(V[ee]);else this.options.saveMissingTo==="all"?K=this.languageUtils.toResolveHierarchy(s.lng||this.language):K.push(s.lng||this.language);const X=(ee,q,se)=>{const N=I&&se!==w?se:L;this.options.missingKeyHandler?this.options.missingKeyHandler(ee,g,q,N,$,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ee,g,q,N,$,s),this.emit("missingKey",ee,g,q,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?K.forEach(ee=>{const q=this.pluralResolver.getSuffixes(ee,s);D&&s[`defaultValue${this.options.pluralSeparator}zero`]&&!q.includes(`${this.options.pluralSeparator}zero`)&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(se=>{X([ee],d+se,s[`defaultValue${se}`]||z)})}):X(K,d,z))}w=this.extendTranslation(w,n,s,x,o),U&&w===d&&this.options.appendNamespaceToMissingKey&&(w=`${g}${y}${d}`),(U||Y)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${y}${d}`:d,Y?w:void 0,s))}return u?(x.res=w,x.usedParams=this.getUsedParamsDetails(s),x):w}extendTranslation(n,a,o,s,u){if(this.i18nFormat?.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const p=Rt(n)&&(o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(p){const h=n.match(this.interpolator.nestingRegexp);g=h&&h.length}let y=o.replace&&!Rt(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),n=this.interpolator.interpolate(n,y,o.lng||this.language||s.usedLng,o),p){const h=n.match(this.interpolator.nestingRegexp),b=h&&h.length;g<b&&(o.nest=!1)}!o.lng&&s&&s.res&&(o.lng=this.language||s.usedLng),o.nest!==!1&&(n=this.interpolator.nest(n,(...h)=>u?.[0]===h[0]&&!o.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${a[0]}`),null):this.translate(...h,a),o)),o.interpolation&&this.interpolator.reset()}const c=o.postProcess||this.options.postProcess,d=Rt(c)?[c]:c;return n!=null&&d?.length&&o.applyPostProcessor!==!1&&(n=eM.handle(d,n,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),n}resolve(n,a={}){let o,s,u,c,d;return Rt(n)&&(n=[n]),Array.isArray(n)&&(n=n.map(p=>typeof p=="function"?ps(p,{...this.options,...a}):p)),n.forEach(p=>{if(this.isValidLookup(o))return;const g=this.extractFromKey(p,a),y=g.key;s=y;let h=g.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const b=a.count!==void 0&&!Rt(a.count),x=b&&!a.ordinal&&a.count===0,w=a.context!==void 0&&(Rt(a.context)||typeof a.context=="number")&&a.context!=="",C=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);h.forEach(R=>{this.isValidLookup(o)||(d=R,!this.checkedLoadedFor[`${C[0]}-${R}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(this.checkedLoadedFor[`${C[0]}-${R}`]=!0,this.logger.warn(`key "${s}" for languages "${C.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(T=>{if(this.isValidLookup(o))return;c=T;const O=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(O,y,T,R,a);else{let A;b&&(A=this.pluralResolver.getSuffix(T,a.count,a));const I=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(a.ordinal&&A.startsWith(j)&&O.push(y+A.replace(j,this.options.pluralSeparator)),O.push(y+A),x&&O.push(y+I)),w){const k=`${y}${this.options.contextSeparator||"_"}${a.context}`;O.push(k),b&&(a.ordinal&&A.startsWith(j)&&O.push(k+A.replace(j,this.options.pluralSeparator)),O.push(k+A),x&&O.push(k+I))}}let M;for(;M=O.pop();)this.isValidLookup(o)||(u=M,o=this.getResource(T,R,M,a))}))})}),{res:o,usedKey:s,exactUsedKey:u,usedLng:c,usedNS:d}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,a,o,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(n,a,o,s):this.resourceStore.getResource(n,a,o,s)}getUsedParamsDetails(n={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=n.replace&&!Rt(n.replace);let s=o?n.replace:n;if(o&&typeof n.count<"u"&&(s={...s,count:n.count}),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!o){s={...s};for(const u of a)delete s[u]}return s}static hasDefaultValue(n){const a="defaultValue";for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&o.startsWith(a)&&n[o]!==void 0)return!0;return!1}}class dR{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=lo.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(n){if(n=zl(n),!n||!n.includes("-"))return null;const a=n.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(n){if(n=zl(n),!n||!n.includes("-"))return n;const a=n.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(n){if(Rt(n)&&n.includes("-")){let a;try{a=Intl.getCanonicalLocales(n)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(n)}getBestMatchFromCodes(n){if(!n)return null;let a;return n.forEach(o=>{if(a)return;const s=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(s))&&(a=s)}),!a&&this.options.supportedLngs&&n.forEach(o=>{if(a)return;const s=this.getScriptPartFromCode(o);if(this.isSupportedCode(s))return a=s;const u=this.getLanguagePartFromCode(o);if(this.isSupportedCode(u))return a=u;a=this.options.supportedLngs.find(c=>c===u?!0:!c.includes("-")&&!u.includes("-")?!1:!!(c.includes("-")&&!u.includes("-")&&c.slice(0,c.indexOf("-"))===u))}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(n,a){if(!n)return[];if(typeof n=="function"&&(n=n(a)),Rt(n)&&(n=[n]),Array.isArray(n))return n;if(!a)return n.default||[];let o=n[a];return o||(o=n[this.getScriptPartFromCode(a)]),o||(o=n[this.formatLanguageCode(a)]),o||(o=n[this.getLanguagePartFromCode(a)]),o||(o=n.default),o||[]}toResolveHierarchy(n,a){const o=this.options.fallbackLng,s=Array.isArray(o)?o.join("|"):o;s!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=s);const u=a===void 0||a===!1||Rt(a),c=a===void 0&&typeof this.options.fallbackLng=="function",d=Rt(n)&&u&&!c;let p=null;if(d){let b;a===void 0?b="undefined":a===!1?b="boolean:false":b=`string:${a}`,p=`${n.length}:${n}|${b}`}if(p!==null){const b=this.resolveHierarchyCache[p];if(b!==void 0)return b.slice()}const g=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],n),y=[],h=b=>{b&&(this.isSupportedCode(b)?y.push(b):this.logger.warn(`rejecting language code not found in supportedLngs: ${b}`))};return Rt(n)&&(n.includes("-")||n.includes("_"))?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(n))):Rt(n)&&h(this.formatLanguageCode(n)),g.forEach(b=>{const x=this.formatLanguageCode(b);y.includes(x)||h(x)}),p!==null?(this.resolveHierarchyCache[p]=y,y.slice()):y}}const fR={zero:0,one:1,two:2,few:3,many:4,other:5},hR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class K6{constructor(n,a={}){this.languageUtils=n,this.options=a,this.logger=lo.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(n,a={}){const o=zl(n==="dev"?"en":n),s=a.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:o,type:s});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let c;try{c=new Intl.PluralRules(o,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),hR;if(!n.match(/-|_/))return hR;const p=this.languageUtils.getLanguagePartFromCode(n);c=this.getRule(p,a)}return this.pluralRulesCache[u]=c,c}needsPlural(n,a={}){let o=this.getRule(n,a);return o||(o=this.getRule("dev",a)),o?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(n,a,o={}){return this.getSuffixes(n,o).map(s=>`${a}${s}`)}getSuffixes(n,a={}){let o=this.getRule(n,a);return o||(o=this.getRule("dev",a)),o?o.resolvedOptions().pluralCategories.sort((s,u)=>fR[s]-fR[u]).map(s=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(n,a,o={}){const s=this.getRule(n,o);return s?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${s.select(a)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",a,o))}}const pR=(e,n,a,o=".",s=!0)=>{let u=z6(e,n,a);return!u&&s&&Rt(a)&&(u=Sy(e,a,o),u===void 0&&(u=Sy(n,a,o))),u};class gR{constructor(n={}){this.logger=lo.create("interpolator"),this.options=n,this.format=n?.interpolation?.format||(a=>a),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:a,escapeValue:o,useRawValueToEscape:s,prefix:u,prefixEscaped:c,suffix:d,suffixEscaped:p,formatSeparator:g,unescapeSuffix:y,unescapePrefix:h,nestingPrefix:b,nestingPrefixEscaped:x,nestingSuffix:w,nestingSuffixEscaped:C,nestingOptionsSeparator:R,maxReplaces:T,alwaysFormat:O}=n.interpolation;this.escape=a!==void 0?a:H6,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=u?jo(u):c||"{{",this.suffix=d?jo(d):p||"}}",this.formatSeparator=g||",",this.unescapePrefix=y?"":h?jo(h):"-",this.unescapeSuffix=this.unescapePrefix?"":y?jo(y):"",this.nestingPrefix=b?jo(b):x||jo("$t("),this.nestingSuffix=w?jo(w):C||jo(")"),this.nestingOptionsSeparator=R||",",this.maxReplaces=T||1e3,this.alwaysFormat=O!==void 0?O:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(a,o)=>a?.source===o?(a.lastIndex=0,a):new RegExp(o,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(n,a,o,s){let u,c,d;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=C=>{if(!C.includes(this.formatSeparator)){const M=pR(a,p,C,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(M,void 0,o,{...s,...a,interpolationkey:C}):M}const R=C.split(this.formatSeparator),T=R.shift().trim(),O=R.join(this.formatSeparator).trim();return this.format(pR(a,p,T,this.options.keySeparator,this.options.ignoreJSONStructure),O,o,{...s,...a,interpolationkey:T})};this.resetRegExp(),!this.escapeValue&&typeof n=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(n)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const y=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,b=[{regex:this.regexpUnescape,safeValue:C=>C},{regex:this.regexp,safeValue:C=>this.escapeValue?this.escape(C):C}],x=[];let w=0;return b.forEach(C=>{for(d=0;u=C.regex.exec(n);){const R=u.index-w,T=x.find(([A,I])=>R>=A&&R<I);if(T){C.regex.lastIndex=T[1]+w;continue}const O=u[1].trim();if(c=g(O),c===void 0)if(typeof y=="function"){const A=y(n,u,s);c=Rt(A)?A:""}else if(s&&Object.prototype.hasOwnProperty.call(s,O))c="";else if(h){c=u[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${n}`),c="";else!Rt(c)&&!this.useRawValueToEscape&&(c=Lf(c));const M=Lf(C.safeValue(c));if(n=n.slice(0,u.index)+M+n.slice(u.index+u[0].length),h?(C.regex===this.regexpUnescape?x.push([u.index,u.index+M.length]):w+=M.length-u[0].length,C.regex.lastIndex+=M.length,C.regex.lastIndex-=u[0].length):C.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),n}nest(n,a,o={}){let s,u,c;const d=(h,b)=>{const x=this.nestingOptionsSeparator;if(!h.includes(x))return h;const w=h.split(new RegExp(`${jo(x)}[ ]*{`));let C=`{${w[1]}`;h=w[0],C=this.interpolate(C,c);const R=C.match(/'/g),T=C.match(/"/g);((R?.length??0)%2===0&&!T||(T?.length??0)%2!==0)&&(C=C.replace(/'/g,'"'));try{c=JSON.parse(C),b&&(c={...b,...c})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,O),`${h}${x}${C}`}return c.defaultValue&&c.defaultValue.includes(this.prefix)&&delete c.defaultValue,h},p=new RegExp(this.nestingRegexp);let g="",y=0;for(;s=p.exec(n);){let h=[];c={...o},c=c.replace&&!Rt(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const b=/{.*}/s.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(b!==-1&&(h=s[1].slice(b).split(this.formatSeparator).map(x=>x.trim()).filter(Boolean),s[1]=s[1].slice(0,b)),u=a(d.call(this,s[1].trim(),c),c),u&&s[0]===n&&!Rt(u))return u;Rt(u)||(u=Lf(u)),u||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${n}`),u=""),h.length&&(u=h.reduce((x,w)=>this.format(x,w,o.lng,{...o,interpolationkey:s[1].trim()}),u.trim())),g+=n.slice(y,s.index)+Lf(u),y=p.lastIndex,this.regexp.lastIndex=0}return y?g+n.slice(y):n}}const G6=e=>{let n=e.toLowerCase().trim();const a={};if(e.includes("(")){const o=e.split("(");n=o[0].toLowerCase().trim();const s=o[1].slice(0,-1);n==="currency"&&!s.includes(":")?a.currency||(a.currency=s.trim()):n==="relativetime"&&!s.includes(":")?a.range||(a.range=s.trim()):s.split(";").forEach(c=>{if(c){const[d,...p]=c.split(":"),g=p.join(":").trim().replace(/^'+|'+$/g,""),y=d.trim();a[y]||(a[y]=g),g==="false"&&(a[y]=!1),g==="true"&&(a[y]=!0),isNaN(g)||(a[y]=parseInt(g,10))}})}return{formatName:n,formatOptions:a}},mR=e=>{const n={};return(a,o,s)=>{let u=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(u={...u,[s.interpolationkey]:void 0});let c;try{c=o+JSON.stringify(u)}catch{return e(zl(o),s)(a)}let d=n[c];return d||(d=e(zl(o),s),n[c]=d),d(a)}},$6=e=>(n,a,o)=>e(zl(a),o)(n);class X6{constructor(n={}){this.logger=lo.create("formatter"),this.options=n,this.init(n)}init(n,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const o=a.cacheInBuiltFormats?mR:$6;this.formats={number:o((s,u)=>{const c=new Intl.NumberFormat(s,{...u});return d=>c.format(d)}),currency:o((s,u)=>{const c=new Intl.NumberFormat(s,{...u,style:"currency"});return d=>c.format(d)}),datetime:o((s,u)=>{const c=new Intl.DateTimeFormat(s,{...u});return d=>c.format(d)}),relativetime:o((s,u)=>{const c=new Intl.RelativeTimeFormat(s,{...u});return d=>c.format(d,u.range||"day")}),list:o((s,u)=>{const c=new Intl.ListFormat(s,{...u});return d=>c.format(d)})}}add(n,a){this.formats[n.toLowerCase().trim()]=a}addCached(n,a){this.formats[n.toLowerCase().trim()]=mR(a)}format(n,a,o,s={}){if(!a||n==null)return n;const u=a.split(this.formatSeparator),c=[];for(let p=0;p<u.length;p++){let g=u[p];for(;g.indexOf("(")>-1&&!g.includes(")")&&p+1<u.length;)g=`${g}${this.formatSeparator}${u[++p]}`;c.push(g)}return c.reduce((p,g)=>{const{formatName:y,formatOptions:h}=G6(g);if(this.formats[y]){let b=p;try{const x=s?.formatParams?.[s.interpolationkey]||{},w=x.locale||x.lng||s.locale||s.lng||o;b=this.formats[y](p,w,{...h,...s,...x})}catch(x){this.logger.warn(x)}return b}else this.logger.warn(`there was no format function for ${y}`);return p},n)}}const Q6=(e,n)=>{e.pending[n]!==void 0&&(delete e.pending[n],e.pendingCount--)};class Z6 extends Mp{constructor(n,a,o,s={}){super(),this.backend=n,this.store=a,this.services=o,this.languageUtils=o.languageUtils,this.options=s,this.logger=lo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(o,s.backend,s)}queueLoad(n,a,o,s){const u={},c={},d={},p={};return n.forEach(g=>{let y=!0;a.forEach(h=>{const b=`${g}|${h}`;!o.reload&&this.store.hasResourceBundle(g,h)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?c[b]===void 0&&(c[b]=!0):(this.state[b]=1,y=!1,c[b]===void 0&&(c[b]=!0),u[b]===void 0&&(u[b]=!0),p[h]===void 0&&(p[h]=!0)))}),y||(d[g]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}loaded(n,a,o){const s=n.split("|"),u=s[0],c=s[1];a&&this.emit("failedLoading",u,c,a),!a&&o&&this.store.addResourceBundle(u,c,o,void 0,void 0,{skipCopy:!0}),this.state[n]=a?-1:2,a&&o&&(this.state[n]=0);const d={};this.queue.forEach(p=>{L6(p.loaded,[u],c),Q6(p,n),a&&p.errors.push(a),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(g=>{d[g]||(d[g]={});const y=p.loaded[g];y.length&&y.forEach(h=>{d[g][h]===void 0&&(d[g][h]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(p=>!p.done)}read(n,a,o,s=0,u=this.retryTimeout,c){if(!n.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:a,fcName:o,tried:s,wait:u,callback:c});return}this.readingCalls++;const d=(g,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(g&&y&&s<this.maxRetries){setTimeout(()=>{this.read(n,a,o,s+1,u*2,c)},u);return}c(g,y)},p=this.backend[o].bind(this.backend);if(p.length===2){try{const g=p(n,a);g&&typeof g.then=="function"?g.then(y=>d(null,y)).catch(d):d(null,g)}catch(g){d(g)}return}return p(n,a,d)}prepareLoading(n,a,o={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Rt(n)&&(n=this.languageUtils.toResolveHierarchy(n)),Rt(a)&&(a=[a]);const u=this.queueLoad(n,a,o,s);if(!u.toLoad.length)return u.pending.length||s(),null;u.toLoad.forEach(c=>{this.loadOne(c)})}load(n,a,o){this.prepareLoading(n,a,{},o)}reload(n,a,o){this.prepareLoading(n,a,{reload:!0},o)}loadOne(n,a=""){const o=n.split("|"),s=o[0],u=o[1];this.read(s,u,"read",void 0,void 0,(c,d)=>{c&&this.logger.warn(`${a}loading namespace ${u} for language ${s} failed`,c),!c&&d&&this.logger.log(`${a}loaded namespace ${u} for language ${s}`,d),this.loaded(n,c,d)})}saveMissing(n,a,o,s,u,c={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(a)){this.logger.warn(`did not save key "${o}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if(this.backend?.create){const p={...c,isUpdate:u},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(n,a,o,s,p):y=g(n,a,o,s),y&&typeof y.then=="function"?y.then(h=>d(null,h)).catch(d):d(null,y)}catch(y){d(y)}else g(n,a,o,s,d,p)}!n||!n[0]||this.store.addResource(n[0],a,o,s)}}}const z0=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let n={};if(typeof e[1]=="object"&&(n=e[1]),Rt(e[1])&&(n.defaultValue=e[1]),Rt(e[2])&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(o=>{n[o]=a[o]})}return n},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),yR=e=>(Rt(e.ns)&&(e.ns=[e.ns]),Rt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Rt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),zf=()=>{},J6=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class sc extends Mp{constructor(n={},a){if(super(),this.options=yR(n),this.services={},this.logger=lo,this.modules={external:[]},J6(this),a&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,a),this;setTimeout(()=>{this.init(n,a)},0)}}init(n={},a){this.isInitializing=!0,typeof n=="function"&&(a=n,n={}),n.defaultNS==null&&n.ns&&(Rt(n.ns)?n.defaultNS=n.ns:n.ns.includes("translation")||(n.defaultNS=n.ns[0]));const o=z0();this.options={...o,...this.options,...yR(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=o.overloadTranslationOptionHandler);const s=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?lo.init(s(this.modules.logger),this.options):lo.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=X6;const y=new dR(this.options);this.store=new cR(this.options.resources,this.options);const h=this.services;h.logger=lo,h.resourceStore=this.store,h.languageUtils=y,h.pluralResolver=new K6(y,{prepend:this.options.pluralSeparator}),g&&(h.formatter=s(g),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new gR(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Z6(s(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(b,...x)=>{this.emit(b,...x)}),this.modules.languageDetector&&(h.languageDetector=s(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=s(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Ch(this.services,this.options),this.translator.on("*",(b,...x)=>{this.emit(b,...x)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,a||(a=zf),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=(...y)=>this.store[g](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...y)=>(this.store[g](...y),this)});const d=Qu(),p=()=>{const g=(y,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(h),a(y,h)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),d}loadResources(n,a=zf){let o=a;const s=Rt(n)?n:this.language;if(typeof n=="function"&&(o=n),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const u=[],c=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(g=>{g!=="cimode"&&(u.includes(g)||u.push(g))})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(p=>c(p)),this.options.preload?.forEach?.(d=>c(d)),this.services.backendConnector.load(u,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(d)})}else o(null)}reloadResources(n,a,o){const s=Qu();return typeof n=="function"&&(o=n,n=void 0),typeof a=="function"&&(o=a,a=void 0),n||(n=this.languages),a||(a=this.options.ns),o||(o=zf),this.services.backendConnector.reload(n,a,u=>{s.resolve(),o(u)}),s}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&eM.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!["cimode","dev"].includes(n)){for(let a=0;a<this.languages.length;a++){const o=this.languages[a];if(!["cimode","dev"].includes(o)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}!this.resolvedLanguage&&!this.languages.includes(n)&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,a){this.isLanguageChangingTo=n;const o=Qu();this.emit("languageChanging",n);const s=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},u=(d,p)=>{p?this.isLanguageChangingTo===n&&(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,o.resolve((...g)=>this.t(...g)),a&&a(d,(...g)=>this.t(...g))},c=d=>{!n&&!d&&this.services.languageDetector&&(d=[]);const p=Rt(d)?d:d&&d[0],g=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(Rt(d)?[d]:d);g&&(this.language||s(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,y=>{u(y,g)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(n),o}getFixedT(n,a,o,s){const u=s?.scopeNs,c=(d,p,...g)=>{let y;typeof p!="object"?y=this.options.overloadTranslationOptionHandler([d,p].concat(g)):y={...p},y.lng=y.lng||c.lng,y.lngs=y.lngs||c.lngs;const h=y.ns!==void 0&&y.ns!==null;y.ns=y.ns||c.ns,y.keyPrefix!==""&&(y.keyPrefix=y.keyPrefix||o||c.keyPrefix);const b={...this.options,...y};Array.isArray(u)&&!h&&(b.ns=u),typeof y.keyPrefix=="function"&&(y.keyPrefix=ps(y.keyPrefix,b));const x=this.options.keySeparator||".";let w;return y.keyPrefix&&Array.isArray(d)?w=d.map(C=>(typeof C=="function"&&(C=ps(C,b)),`${y.keyPrefix}${x}${C}`)):(typeof d=="function"&&(d=ps(d,b)),w=y.keyPrefix?`${y.keyPrefix}${x}${d}`:d),this.t(w,y)};return Rt(n)?c.lng=n:c.lngs=n,c.ns=a,c.keyPrefix=o,c}t(...n){return this.translator?.translate(...n)}exists(...n){return this.translator?.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,a={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=a.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const c=(g,y)=>{const h=this.services.backendConnector.state[`${g}|${y}`];return h===-1||h===0||h===2};if(a.precheck){const g=a.precheck(this,c);if(g!==void 0)return g}if(this.hasResourceBundle(o,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return!0;const{languageUtils:d}=this.services,p=a.lng?d.isSupportedCode(o)&&d.toResolveHierarchy(o,!1)[0]:o;return!!((!p||c(p,n))&&(!s||c(u,n)))}loadNamespaces(n,a){const o=Qu();return this.options.ns?(Rt(n)&&(n=[n]),n.forEach(s=>{this.options.ns.includes(s)||this.options.ns.push(s)}),this.loadResources(s=>{o.resolve(),a&&a(s)}),o):(a&&a(),Promise.resolve())}loadLanguages(n,a){const o=Qu();Rt(n)&&(n=[n]);const s=this.options.preload||[],u=n.filter(c=>!s.includes(c)&&this.services.languageUtils.isSupportedCode(c));return u.length?(this.options.preload=s.concat(u),this.loadResources(c=>{o.resolve(),a&&a(c)}),o):(a&&a(),Promise.resolve())}dir(n){if(n||(n=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!n)return"rtl";try{const s=new Intl.Locale(n);if(s&&s.getTextInfo){const u=s.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=this.services?.languageUtils||new dR(z0());return n.toLowerCase().indexOf("-latn")>1?"ltr":a.includes(o.getLanguagePartFromCode(n))||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},a){const o=new sc(n,a);return o.createInstance=sc.createInstance,o}cloneInstance(n={},a=zf){const o=n.forkResourceStore;o&&delete n.forkResourceStore;const s={...this.options,preload:!1,...n,isClone:!0},u=new sc(s);if((n.debug!==void 0||n.prefix!==void 0)&&(u.logger=u.logger.clone(n)),["store","services","language"].forEach(d=>{u[d]=this[d]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},o){const d=g=>{const y=Array.isArray(g)?[...g]:{...g};return Object.keys(y).forEach(h=>{y[h]&&typeof y[h]=="object"&&(y[h]=d(y[h]))}),y},p=d(this.store.data);u.store=new cR(p,s),u.services.resourceStore=u.store}if(n.interpolation){const p={...z0().interpolation,...this.options.interpolation,...n.interpolation},g={...s,interpolation:p};u.services.interpolator=new gR(g)}return u.translator=new Ch(u.services,s),u.translator.on("*",(d,...p)=>{u.emit(d,...p)}),u.init(s,a),u.translator.options=s,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const dr=sc.createInstance();dr.createInstance;dr.dir;dr.init;dr.loadResources;dr.reloadResources;dr.use;dr.changeLanguage;dr.getFixedT;dr.t;dr.exists;dr.setDefaultNamespace;dr.hasLoadedNamespace;dr.loadNamespaces;dr.loadLanguages;const W6=(e,n,a,o)=>{const s=[a,{code:n,...o||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);xs(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...s):console?.warn&&console.warn(...s)},vR={},Wf=(e,n,a,o)=>{xs(a)&&vR[a]||(xs(a)&&(vR[a]=new Date),W6(e,n,a,o))},nM=(e,n)=>()=>{if(e.isInitialized)n();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),n()};e.on("initialized",a)}},wy=(e,n,a)=>{e.loadNamespaces(n,nM(e,a))},bR=(e,n,a,o)=>{if(xs(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(n)>-1)return wy(e,a,o);a.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(n,nM(e,o))},e8=(e,n,a={})=>!n.languages||!n.languages.length?(Wf(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(e,{lng:a.lng,precheck:(o,s)=>{if(a.bindI18n&&a.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,e))return!1}}),xs=e=>typeof e=="string",t8=e=>typeof e=="object"&&e!==null,n8=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,r8={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},a8=e=>r8[e],o8=e=>e.replace(n8,a8);let Ry={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:o8,transDefaultProps:void 0};const i8=(e={})=>{Ry={...Ry,...e}},s8=()=>Ry;let rM;const l8=e=>{rM=e},u8=()=>rM,c8={type:"3rdParty",init(e){i8(e.options.react),l8(e)}},d8=v.createContext();class f8{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const h8=(e,n)=>{if(xs(n))return n;if(t8(n)&&xs(n.defaultValue))return n.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const a=e[e.length-1];return typeof a=="function"?"":a}return e},p8={t:h8,ready:!1},g8=()=>()=>{},sn=(e,n={})=>{const{i18n:a}=n,{i18n:o,defaultNS:s}=v.useContext(d8)||{},u=a||o||u8();u&&!u.reportNamespaces&&(u.reportNamespaces=new f8),u||Wf(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const c=v.useMemo(()=>({...s8(),...u?.options?.react,...n}),[u,n]),{useSuspense:d,keyPrefix:p,bindI18n:g,bindI18nStore:y}=c,h=s||u?.options?.defaultNS,b=xs(h)?[h]:h||["translation"],x=JSON.stringify(b),w=v.useMemo(()=>b,[x]);u?.reportNamespaces?.addUsedNamespaces?.(w);const C=v.useRef(0),R=v.useCallback(U=>{if(!u)return g8;const _=()=>{C.current+=1,U()};return g&&u.on(g,_),y&&u.store.on(y,_),()=>{g&&g.split(" ").forEach(L=>u.off(L,_)),y&&y.split(" ").forEach(L=>u.store.off(L,_))}},[u,g,y]),T=v.useRef(),O=v.useCallback(()=>{if(!u)return p8;const U=!!(u.isInitialized||u.initializedStoreOnce)&&w.every(ee=>e8(ee,u,c)),_=n.lng||u.language,L=C.current,$=typeof p=="function"?ps(p,{...u.options,ns:w}):p,K=T.current;if(K&&K.i18n===u&&K.ready===U&&K.lng===_&&K.namespaces===w&&K.keyPrefix===$&&K.revision===L)return K;const X={t:u.getFixedT(_,c.nsMode==="fallback"?w:w[0],p,{scopeNs:w}),i18n:u,ready:U,lng:_,namespaces:w,keyPrefix:$,revision:L};return T.current=X,X},[u,w,p,c,n.lng]),[M,A]=v.useState(0);let{t:I,ready:j}=np.useSyncExternalStore(R,O,O),k;u&&d&&!j&&(k=new Promise(U=>{const _=()=>U();n.lng?bR(u,n.lng,w,_):wy(u,w,_)}),{t:I,ready:j}=O()),v.useEffect(()=>{if(u&&!j&&!d){const U=()=>A(_=>_+1);n.lng?bR(u,n.lng,w,U):wy(u,w,U)}},[u,n.lng,w,j,d,M]);const D=u||{},z=v.useRef(null),F=v.useRef(),G=U=>`${U.language}|${U.resolvedLanguage}|${U.languages?.join(",")}`,J=U=>{const _=Object.getOwnPropertyDescriptors(U);_.__original&&delete _.__original;const L=Object.create(Object.getPrototypeOf(U),_);if(!Object.prototype.hasOwnProperty.call(L,"__original"))try{Object.defineProperty(L,"__original",{value:U,writable:!1,enumerable:!1,configurable:!1})}catch{}return L},Y=v.useMemo(()=>{const U=D,_=U&&G(U);let L=U;U&&(z.current&&z.current.__original===U?F.current!==_?(L=J(U),z.current=L,F.current=_):L=z.current:(L=J(U),z.current=L,F.current=_));const $=!j&&!d?(...V)=>(Wf(u,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),I(...V)):I,K=[$,L,j];return K.t=$,K.i18n=L,K.ready=j,K},[I,D,j,D.resolvedLanguage,D.language,D.languages]);if(u&&d&&!j){let U=!1;try{U=!1}catch{}throw U&&Wf(u,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),k}return Y};function m8({...e}){return S.jsx(ZO,{"data-slot":"sheet",...e})}function y8({...e}){return S.jsx(QO,{"data-slot":"sheet-portal",...e})}function v8({className:e,...n}){return S.jsx(KO,{"data-slot":"sheet-overlay",className:Qe("fixed inset-0 z-50 bg-black/80 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...n})}function b8({className:e,children:n,side:a="right",showCloseButton:o=!0,...s}){const{t:u}=sn();return S.jsxs(y8,{children:[S.jsx(v8,{}),S.jsxs(XO,{"data-slot":"sheet-content","data-side":a,className:Qe("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-10 data-[side=bottom]:data-starting-style:translate-y-10 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=left]:data-ending-style:-translate-x-10 data-[side=left]:data-starting-style:-translate-x-10 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=right]:data-ending-style:translate-x-10 data-[side=right]:data-starting-style:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:-translate-y-10 data-[side=top]:data-starting-style:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...s,children:[n,o&&S.jsxs(Op,{"data-slot":"sheet-close",render:S.jsx(nn,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[S.jsx(Rs,{}),S.jsx("span",{className:"sr-only",children:u("a11y.close")})]})]})]})}function x8({className:e,...n}){return S.jsx("div",{"data-slot":"sheet-header",className:Qe("flex flex-col gap-1.5 p-6",e),...n})}function S8({className:e,...n}){return S.jsx(JO,{"data-slot":"sheet-title",className:Qe("font-heading text-sm font-medium text-foreground",e),...n})}function w8({className:e,...n}){return S.jsx(GO,{"data-slot":"sheet-description",className:Qe("text-xs/relaxed text-muted-foreground",e),...n})}function ca({className:e,...n}){return S.jsx("div",{"data-slot":"skeleton",className:Qe("animate-pulse rounded-md bg-muted",e),...n})}const R8="sidebar_state",E8=3600*24*7,C8="16rem",T8="18rem",O8="3rem",M8="b",aM=v.createContext(null);function Gl(){const e=v.useContext(aM);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function A8({defaultOpen:e=!0,open:n,onOpenChange:a,className:o,style:s,children:u,...c}){const d=a6(),[p,g]=v.useState(!1),[y,h]=v.useState(e),b=n??y,x=v.useCallback(T=>{const O=typeof T=="function"?T(b):T;a?a(O):h(O),document.cookie=`${R8}=${O}; path=/; max-age=${E8}`},[a,b]),w=v.useCallback(()=>d?g(T=>!T):x(T=>!T),[d,x,g]);v.useEffect(()=>{const T=O=>{O.key===M8&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),w())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[w]);const C=b?"expanded":"collapsed",R=v.useMemo(()=>({state:C,open:b,setOpen:x,isMobile:d,openMobile:p,setOpenMobile:g,toggleSidebar:w}),[C,b,x,d,p,g,w]);return S.jsx(aM.Provider,{value:R,children:S.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":C8,"--sidebar-width-icon":O8,...s},className:Qe("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",o),...c,children:u})})}function D8({side:e="left",variant:n="sidebar",collapsible:a="offcanvas",className:o,children:s,dir:u,...c}){const{t:d}=sn(),{isMobile:p,state:g,openMobile:y,setOpenMobile:h}=Gl();return a==="none"?S.jsx("div",{"data-slot":"sidebar",className:Qe("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",o),...c,children:s}):p?S.jsx(m8,{open:y,onOpenChange:h,...c,children:S.jsxs(b8,{dir:u,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":T8},side:e,children:[S.jsxs(x8,{className:"sr-only",children:[S.jsx(S8,{children:d("a11y.sidebar")}),S.jsx(w8,{children:d("a11y.sidebarDescription")})]}),S.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):S.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":g,"data-collapsible":g==="collapsed"?a:"","data-variant":n,"data-side":e,"data-slot":"sidebar",children:[S.jsx("div",{"data-slot":"sidebar-gap",className:Qe("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","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)")}),S.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:Qe("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-(--sidebar-width) data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:-right-(--sidebar-width) 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",o),...c,children:S.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:s})})]})}function N8({className:e,onClick:n,...a}){const{t:o}=sn(),{toggleSidebar:s}=Gl();return S.jsxs(nn,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:Qe(e),onClick:u=>{n?.(u),s()},...a,children:[S.jsx(Jk,{}),S.jsx("span",{className:"sr-only",children:o("a11y.toggleSidebar")})]})}function I8({className:e,...n}){const{t:a}=sn(),{toggleSidebar:o}=Gl();return S.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":a("a11y.toggleSidebar"),tabIndex:-1,onClick:o,title:a("a11y.toggleSidebar"),className:Qe("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:inset-s-1/2 after:w-0.5 hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...n})}function j8({className:e,...n}){return S.jsx("main",{"data-slot":"sidebar-inset",className:Qe("relative flex w-full flex-1 flex-col 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",e),...n})}function k8({className:e,...n}){return S.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:Qe("flex flex-col gap-2 p-2",e),...n})}function P8({className:e,...n}){return S.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Qe("flex flex-col gap-2 p-2",e),...n})}function L8({className:e,...n}){return S.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Qe("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n})}function z8({className:e,...n}){return S.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Qe("relative flex w-full min-w-0 flex-col px-2 py-1",e),...n})}function Uv({className:e,...n}){return S.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Qe("flex w-full min-w-0 flex-col gap-px",e),...n})}function lc({className:e,...n}){return S.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Qe("group/menu-item relative",e),...n})}const _8=Tp("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs ring-sidebar-ring outline-hidden 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! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function uc({render:e,isActive:n=!1,variant:a="default",size:o="default",tooltip:s,className:u,...c}){const{isMobile:d,state:p}=Gl(),g=UO({defaultTagName:"button",props:Pr({className:Qe(_8({variant:a,size:o}),u)},c),render:s?S.jsx(yh,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:o,active:n}});return s?(typeof s=="string"&&(s={children:s}),S.jsxs(mh,{children:[g,S.jsx(vh,{side:"right",align:"center",hidden:p!=="collapsed"||d,...s})]})):g}function H8({className:e,...n}){return S.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:Qe("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),...n})}function U8({className:e,...n}){return S.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:Qe("group/menu-sub-item relative",e),...n})}function F8({render:e,size:n="md",isActive:a=!1,className:o,...s}){return UO({defaultTagName:"a",props:Pr({className:Qe("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-xs data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",o)},s),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:n,active:a}})}function B8({items:e}){const{t:n}=sn(),{pathname:a}=$r(),{isMobile:o,state:s}=Gl(),u=s==="collapsed"&&!o;return S.jsx(z8,{children:S.jsx(Uv,{children:e.map(c=>{const d=c.icon,p=c.items?.some(g=>g.url===a)??!1;return c.items?u?S.jsx(lc,{children:S.jsxs(Pv,{children:[S.jsxs(Lv,{render:S.jsx(uc,{tooltip:n(c.titleKey),isActive:p}),children:[S.jsx(d,{}),S.jsx("span",{children:n(c.titleKey)})]}),S.jsx(zv,{className:"w-40",side:"right",align:"start",sideOffset:4,children:S.jsxs(wh,{children:[S.jsx(_v,{children:n(c.titleKey)}),c.items.map(g=>S.jsx(xy,{className:"cursor-pointer",render:S.jsx(oc,{to:g.url}),children:S.jsx("span",{children:n(g.titleKey)})},g.titleKey))]})})]})},c.titleKey):S.jsxs(Hz,{defaultOpen:p,className:"group/collapsible",render:S.jsx(lc,{}),children:[S.jsxs(Uz,{render:S.jsx(uc,{tooltip:n(c.titleKey),isActive:p}),children:[S.jsx(d,{}),S.jsx("span",{children:n(c.titleKey)}),S.jsx(jk,{className:`
|
|
13
|
+
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let y=$r(),h;h=y;let b=h.pathname||"/",x=b;if(p!=="/"){let R=p.replace(/^\//,"").split("/");x="/"+b.replace(/^\//,"").split("/").slice(R.length).join("/")}let w=a&&a.state.matches.length?a.state.matches.map(R=>Object.assign(R,{route:a.manifest[R.route.id]||R.route})):ET(e,{pathname:x});return Un(g||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Un(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),xL(w&&w.map(R=>Object.assign({},R,{params:Object.assign({},c,R.params),pathname:Aa([p,o.encodeLocation?o.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?p:Aa([p,o.encodeLocation?o.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),s,a)}function mL(){let e=CL(),n=bc(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:u},"ErrorBoundary")," or"," ",v.createElement("code",{style:u},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},n),a?v.createElement("pre",{style:s},a):null,c)}var yL=v.createElement(mL,null),JT=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=cL(e.digest);a&&(e=a)}let n=e!==void 0?v.createElement(Ga.Provider,{value:this.props.routeContext},v.createElement(Rv.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(vL,{error:e},n):n}};JT.contextType=KT;var I0=new WeakMap;function vL({children:e,error:n}){let{basename:a,navigator:o}=v.useContext(ha);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let s=uL(n.digest);if(s){let u=I0.get(n);if(u)throw u;let c=IT(s.location,a),d=c.absoluteURL||c.to;if(Ol(s.location,d,vv(o),"allow-explicit"),dy(d))throw new Error("Invalid redirect location");if(NT&&!I0.get(n))if(c.isExternal||s.reloadDocument)window.location.href=d;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:s.replace}));throw I0.set(n,p),p}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function bL({routeContext:e,match:n,children:a}){let o=v.useContext(Es);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Ga.Provider,{value:e},a)}function xL(e,n=[],a){let o=a?.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(n.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let s=e,u=o?.errors;if(u!=null){let y=s.findIndex(h=>h.route.id&&u?.[h.route.id]!==void 0);_t(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,d=-1;if(a&&o){c=o.renderFallback;for(let y=0;y<s.length;y++){let h=s[y];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=y),h.route.id){let{loaderData:b,errors:x}=o,w=h.route.loader&&!b.hasOwnProperty(h.route.id)&&(!x||x[h.route.id]===void 0);if(h.route.lazy||w){a.isStatic&&(c=!0),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let p=a?.onError,g=o&&p?(y,h)=>{p(y,{location:o.location,params:o.matches?.[0]?.params??{},pattern:Hc(o.matches),errorInfo:h})}:void 0;return s.reduceRight((y,h,b)=>{let x,w=!1,C=null,R=null;o&&(x=u&&h.route.id?u[h.route.id]:void 0,C=h.route.errorElement||yL,c&&(d<0&&b===0?(eO("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,R=null):d===b&&(w=!0,R=h.route.hydrateFallbackElement||null)));let T=n.concat(s.slice(0,b+1)),O=()=>{let M;return x?M=C:w?M=R:h.route.Component?M=v.createElement(h.route.Component,null):h.route.element?M=h.route.element:M=y,v.createElement(bL,{match:h,routeContext:{outlet:y,matches:T,isDataRoute:o!=null},children:M})};return o&&(h.route.ErrorBoundary||h.route.errorElement||b===0)?v.createElement(JT,{location:o.location,revalidation:o.revalidation,component:C,error:x,children:O(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:g}):O()},null)}function Ev(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function SL(e){let n=v.useContext(Es);return _t(n,Ev(e)),n}function WT(e){let n=v.useContext(Uc);return _t(n,Ev(e)),n}function wL(e){let n=v.useContext(Ga);return _t(n,Ev(e)),n}function Cv(e){let n=wL(e),a=n.matches[n.matches.length-1];return _t(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function RL(){return Cv("useRouteId")}function EL(){let{matches:e,loaderData:n}=WT("useMatches");return v.useMemo(()=>e.map(a=>CT(a,n)),[e,n])}function CL(){let e=v.useContext(Rv),n=WT("useRouteError"),a=Cv("useRouteError");return e!==void 0?e:n.errors?.[a]}function TL(){let{router:e}=SL("useNavigate"),n=Cv("useNavigate"),a=v.useRef(!1);return ZT(()=>{a.current=!0}),v.useCallback(async(s,u={})=>{Un(a.current,QT),a.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:n,...u}))},[e,n])}var Bw={};function eO(e,n,a){!n&&!Bw[e]&&(Bw[e]=!0,Un(!1,a))}var Vw={};function qw(e,n){!e&&!Vw[n]&&(Vw[n]=!0,console.warn(n))}var OL="useOptimistic",Yw=qR[OL],ML=()=>{};function AL(e){return Yw?Yw(e):[e,ML]}function DL(e){let n={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Un(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:v.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Un(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Un(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),n}var NL=["HydrateFallback","hydrateFallbackElement"],IL=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",e(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",n(a))}})}};function jL({router:e,flushSync:n,onError:a,useTransitions:o}){o=GT()||o;let[u,c]=v.useState(e.state),[d,p]=AL(u),[g,y]=v.useState(),[h,b]=v.useState({isTransitioning:!1}),[x,w]=v.useState(),[C,R]=v.useState(),[T,O]=v.useState(),M=v.useRef(new Map),A=v.useCallback((D,{deletedFetchers:z,newErrors:F,flushSync:G,viewTransitionOpts:J})=>{F&&a&&Object.values(F).forEach(U=>a(U,{location:D.location,params:D.matches[0]?.params??{},pattern:Hc(D.matches)})),D.fetchers.forEach((U,_)=>{U.data!==void 0&&M.current.set(_,U.data)}),z.forEach(U=>M.current.delete(U)),qw(G===!1||n!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(qw(J==null||Y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!J||!Y){n&&G?n(()=>c(D)):o===!1?c(D):v.startTransition(()=>{o===!0&&p(U=>Kw(U,D)),c(D)});return}if(n&&G){n(()=>{C&&(x?.resolve(),C.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:J.currentLocation,nextLocation:J.nextLocation})});let U=e.window.document.startViewTransition(()=>{n(()=>c(D))});U.finished.finally(()=>{n(()=>{w(void 0),R(void 0),y(void 0),b({isTransitioning:!1})})}),n(()=>R(U));return}C?(x?.resolve(),C.skipTransition(),O({state:D,currentLocation:J.currentLocation,nextLocation:J.nextLocation})):(y(D),b({isTransitioning:!0,flushSync:!1,currentLocation:J.currentLocation,nextLocation:J.nextLocation}))},[e.window,n,C,x,o,p,a]);v.useLayoutEffect(()=>e.subscribe(A),[e,A]),v.useEffect(()=>{h.isTransitioning&&!h.flushSync&&w(new IL)},[h]),v.useEffect(()=>{if(x&&g&&e.window){let D=g,z=x.promise,F=e.window.document.startViewTransition(async()=>{o===!1?c(D):v.startTransition(()=>{o===!0&&p(G=>Kw(G,D)),c(D)}),await z});F.finished.finally(()=>{w(void 0),R(void 0),y(void 0),b({isTransitioning:!1})}),R(F)}},[g,x,e.window,o,p]),v.useEffect(()=>{x&&g&&d.location.key===g.location.key&&x.resolve()},[x,C,d.location,g]),v.useEffect(()=>{!h.isTransitioning&&T&&(y(T.state),b({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}),O(void 0))},[h.isTransitioning,T]);let I=v.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:D=>e.navigate(D),push:(D,z,F)=>e.navigate(D,{state:z,preventScrollReset:F?.preventScrollReset}),replace:(D,z,F)=>e.navigate(D,{replace:!0,state:z,preventScrollReset:F?.preventScrollReset})}),[e]),j=e.basename||"/",k=v.useMemo(()=>({router:e,navigator:I,static:!1,basename:j,onError:a}),[e,I,j,a]);return v.createElement(v.Fragment,null,v.createElement(Es.Provider,{value:k},v.createElement(Uc.Provider,{value:d},v.createElement($T.Provider,{value:M.current},v.createElement(wv.Provider,{value:h},v.createElement(zL,{basename:j,location:d.location,navigationType:d.historyAction,navigator:I,useTransitions:o},v.createElement(kL,{routes:e.routes,manifest:e.manifest,future:e.future,state:d,isStatic:!1,onError:a})))))),null)}function Kw(e,n){return{...e,navigation:n.navigation.state!=="idle"?n.navigation:e.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:e.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:e.actionData,fetchers:n.fetchers}}var kL=v.memo(PL);function PL({routes:e,manifest:n,future:a,state:o,isStatic:s,onError:u}){return gL(e,void 0,{manifest:n,state:o,isStatic:s,onError:u})}function LL({to:e,replace:n,state:a,relative:o}){_t(Vl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s,navigator:u}=v.useContext(ha);Un(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=v.useContext(Ga),{pathname:d}=$r(),p=yp(),g=zc(e,gp(c),d,o==="path");Ol(typeof e=="string"?e:Lr(e),u.createHref(g),vv(u),"reject");let y=JSON.stringify(g);return v.useEffect(()=>{p(JSON.parse(y),{replace:n,state:a,relative:o})},[p,y,o,n,a]),null}function tO(e){return pL(e.context)}function zL({basename:e="/",children:n=null,location:a,navigationType:o="POP",navigator:s,static:u=!1,useTransitions:c}){_t(!Vl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=v.useMemo(()=>({basename:d,navigator:s,static:u,useTransitions:c,future:{}}),[d,s,u,c]);typeof a=="string"&&(a=Ka(a));let{pathname:g="/",search:y="",hash:h="",state:b=null,key:x="default",mask:w}=a,C=v.useMemo(()=>{let R=Na(g,d);return R==null?null:{location:{pathname:R,search:y,hash:h,state:b,key:x,mask:w},navigationType:o}},[d,g,y,h,b,x,o,w]);return Un(C!=null,`<Router basename="${d}"> is not able to match the URL "${g}${y}${h}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:v.createElement(ha.Provider,{value:p},v.createElement(mp.Provider,{children:n,value:C}))}var Zf="get",Jf="application/x-www-form-urlencoded";function vp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function _L(e){return vp(e)&&e.tagName.toLowerCase()==="button"}function HL(e){return vp(e)&&e.tagName.toLowerCase()==="form"}function UL(e){return vp(e)&&e.tagName.toLowerCase()==="input"}function FL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function BL(e,n){return e.button===0&&(!n||n==="_self")&&!FL(e)}function hy(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,a)=>{let o=e[a];return n.concat(Array.isArray(o)?o.map(s=>[a,s]):[[a,o]])},[]))}function VL(e,n){let a=hy(e);return n&&n.forEach((o,s)=>{a.has(s)||n.getAll(s).forEach(u=>{a.append(s,u)})}),a}var Nf=null;function qL(){if(Nf===null)try{new FormData(document.createElement("form"),0),Nf=!1}catch{Nf=!0}return Nf}var YL=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function j0(e){return e!=null&&!YL.has(e)?(Un(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jf}"`),null):e}function KL(e,n){let a,o,s,u,c;if(HL(e)){let d=e.getAttribute("action");o=d?Na(d,n):null,a=e.getAttribute("method")||Zf,s=j0(e.getAttribute("enctype"))||Jf,u=new FormData(e)}else if(_L(e)||UL(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||d.getAttribute("action");if(o=p?Na(p,n):null,a=e.getAttribute("formmethod")||d.getAttribute("method")||Zf,s=j0(e.getAttribute("formenctype"))||j0(d.getAttribute("enctype"))||Jf,u=new FormData(d,e),!qL()){let{name:g,type:y,value:h}=e;if(y==="image"){let b=g?`${g}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else g&&u.append(g,h)}}else{if(vp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Zf,o=null,s=Jf,c=e}return u&&s==="text/plain"&&(c=u,u=void 0),{action:o,method:a.toLowerCase(),encType:s,formData:u,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Tv(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function nO(e,n,a,o){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${o}`:s.pathname=`${s.pathname}.${o}`:s.pathname==="/"?s.pathname=`_root.${o}`:n&&Na(s.pathname,n)==="/"?s.pathname=`${Ll(n)}/_root.${o}`:s.pathname=`${Ll(s.pathname)}.${o}`,s}async function GL(e,n){if(e.id in n)return n[e.id];try{let a=await import(e.module);return n[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $L(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function XL(e,n,a){let o=await Promise.all(e.map(async s=>{let u=n.routes[s.route.id];if(u){let c=await GL(u,a);return c.links?c.links():[]}return[]}));return WL(o.flat(1).filter($L).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Gw(e,n,a,o,s,u){let c=(p,g)=>a[g]?p.route.id!==a[g].route.id:!0,d=(p,g)=>a[g].pathname!==p.pathname||a[g].route.path?.endsWith("*")&&a[g].params["*"]!==p.params["*"];return u==="assets"?n.filter((p,g)=>c(p,g)||d(p,g)):u==="data"?n.filter((p,g)=>{let y=o.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(c(p,g)||d(p,g))return!0;if(p.route.shouldRevalidate){let h=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function QL(e,n,{includeHydrateFallback:a}={}){return ZL(e.map(o=>{let s=n.routes[o.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),a&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function ZL(e){return[...new Set(e)]}function JL(e){let n={},a=Object.keys(e).sort();for(let o of a)n[o]=e[o];return n}function WL(e,n){let a=new Set;return new Set(n),e.reduce((o,s)=>{let u=JSON.stringify(JL(s));return a.has(u)||(a.add(u),o.push({key:u,link:s})),o},[])}function Ov(){let e=v.useContext(Es);return Tv(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ez(){let e=v.useContext(Uc);return Tv(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Mv=v.createContext(void 0);Mv.displayName="FrameworkContext";function bp(){let e=v.useContext(Mv);return Tv(e,"You must render this element inside a <HydratedRouter> element"),e}function tz(e,n){let a=v.useContext(Mv),[o,s]=v.useState(!1),[u,c]=v.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:g,onMouseLeave:y,onTouchStart:h}=n,b=v.useRef(null);v.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=T=>{T.forEach(O=>{c(O.isIntersecting)})},R=new IntersectionObserver(C,{threshold:.5});return b.current&&R.observe(b.current),()=>{R.disconnect()}}},[e]),v.useEffect(()=>{if(o){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[o]);let x=()=>{s(!0)},w=()=>{s(!1),c(!1)};return a?e!=="intent"?[u,b,{}]:[u,b,{onFocus:Xu(d,x),onBlur:Xu(p,w),onMouseEnter:Xu(g,x),onMouseLeave:Xu(y,w),onTouchStart:Xu(h,x)}]:[!1,b,{}]}function Xu(e,n){return a=>{e&&e(a),a.defaultPrevented||n(a)}}function nz({page:e,...n}){let a=GT(),{nonce:o}=bp(),{router:s}=Ov(),u=v.useMemo(()=>ET(s.routes,e,s.basename),[s.routes,e,s.basename]);return u?(n.nonce==null&&o&&(n={...n,nonce:o}),a?v.createElement(az,{page:e,matches:u,...n}):v.createElement(oz,{page:e,matches:u,...n})):null}function rz(e){let{manifest:n,routeModules:a}=bp(),[o,s]=v.useState([]);return v.useEffect(()=>{let u=!1;return XL(e,n,a).then(c=>{u||s(c)}),()=>{u=!0}},[e,n,a]),o}function az({page:e,matches:n,...a}){let o=$r(),{future:s}=bp(),{basename:u}=Ov(),c=v.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let d=nO(e,u,s.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,g=[];for(let y of n)typeof y.route.shouldRevalidate=="function"?p=!0:g.push(y.route.id);return p&&g.length>0&&d.searchParams.set("_routes",g.join(",")),[d.pathname+d.search]},[u,s.v8_trailingSlashAwareDataRequests,e,o,n]);return v.createElement(v.Fragment,null,c.map(d=>v.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...a})))}function oz({page:e,matches:n,...a}){let o=$r(),{future:s,manifest:u,routeModules:c}=bp(),{basename:d}=Ov(),{loaderData:p,matches:g}=ez(),y=v.useMemo(()=>Gw(e,n,g,u,o,"data"),[e,n,g,u,o]),h=v.useMemo(()=>Gw(e,n,g,u,o,"assets"),[e,n,g,u,o]),b=v.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let C=new Set,R=!1;if(n.forEach(O=>{let M=u.routes[O.route.id];!M||!M.hasLoader||(!y.some(A=>A.route.id===O.route.id)&&O.route.id in p&&c[O.route.id]?.shouldRevalidate||M.hasClientLoader?R=!0:C.add(O.route.id))}),C.size===0)return[];let T=nO(e,d,s.v8_trailingSlashAwareDataRequests,"data");return R&&C.size>0&&T.searchParams.set("_routes",n.filter(O=>C.has(O.route.id)).map(O=>O.route.id).join(",")),[T.pathname+T.search]},[d,s.v8_trailingSlashAwareDataRequests,p,o,u,y,n,e,c]),x=v.useMemo(()=>QL(h,u),[h,u]),w=rz(h);return v.createElement(v.Fragment,null,b.map(C=>v.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...a})),x.map(C=>v.createElement("link",{key:C,rel:"modulepreload",href:C,...a})),w.map(({key:C,link:R})=>v.createElement("link",{key:C,nonce:a.nonce,...R,crossOrigin:R.crossOrigin??a.crossOrigin})))}function iz(...e){return n=>{e.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})}}var sz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{sz&&(window.__reactRouterVersion="7.18.5")}catch{}function lz(e,n){return k5({basename:n?.basename,getContext:n?.getContext,future:n?.future,history:XP({window:n?.window}),hydrationData:uz(),routes:e,mapRouteProperties:DL,hydrationRouteProperties:NL,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window,instrumentations:n?.instrumentations}).initialize()}function uz(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:cz(e.errors)}),e}function cz(e){if(!e)return null;let n=Object.entries(e),a={};for(let[o,s]of n)if(s&&s.__type==="RouteErrorResponse")a[o]=new _c(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(typeof s.__subType=="string"&&b5.includes(s.__subType)){let u=window[s.__subType];if(typeof u=="function")try{let c=new u(s.message);c.stack="",a[o]=c}catch{}}if(a[o]==null){let u=new Error(s.message);u.stack="",a[o]=u}}else a[o]=s;return a}var rO=v.forwardRef(function({onClick:n,discover:a="render",prefetch:o="none",relative:s,reloadDocument:u,replace:c,mask:d,state:p,target:g,to:y,preventScrollReset:h,viewTransition:b,defaultShouldRevalidate:x,...w},C){let{basename:R,navigator:T,useTransitions:O}=v.useContext(ha),M=typeof y=="string"&&hp.test(y),A=IT(y,R);y=A.to;let I=dL(y,{relative:s}),j=$r(),k=null;if(d){let _=zc(d,[],j.mask?j.mask.pathname:"/",!0);R!=="/"&&(_.pathname=_.pathname==="/"?R:Aa([R,_.pathname])),k=T.createHref(_)}let[D,z,F]=tz(o,w),G=hz(y,{replace:c,mask:d,state:p,target:g,preventScrollReset:h,relative:s,viewTransition:b,defaultShouldRevalidate:x,useTransitions:O});function J(_){n&&n(_),_.defaultPrevented||G(_)}let Y=!(A.isExternal||u),U=v.createElement("a",{...w,...F,href:(Y?k:void 0)||A.absoluteURL||I,onClick:Y?J:n,ref:iz(C,z),target:g,"data-discover":!M&&a==="render"?"true":void 0});return D&&!M?v.createElement(v.Fragment,null,U,v.createElement(nz,{page:I})):U});rO.displayName="Link";var oc=v.forwardRef(function({"aria-current":n="page",caseSensitive:a=!1,className:o="",end:s=!1,style:u,to:c,viewTransition:d,children:p,...g},y){let h=Fc(c,{relative:g.relative}),b=$r(),x=v.useContext(Uc),{navigator:w,basename:C}=v.useContext(ha),R=x!=null&&bz(h)&&d===!0,T=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,O=b.pathname,M=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;a||(O=O.toLowerCase(),M=M?M.toLowerCase():null,T=T.toLowerCase()),M&&C&&(M=Na(M,C)||M);const A=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let I=O===T||!s&&O.startsWith(T)&&O.charAt(A)==="/",j=M!=null&&(M===T||!s&&M.startsWith(T)&&M.charAt(T.length)==="/"),k={isActive:I,isPending:j,isTransitioning:R},D=I?n:void 0,z;typeof o=="function"?z=o(k):z=[o,I?"active":null,j?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let F=typeof u=="function"?u(k):u;return v.createElement(rO,{...g,"aria-current":D,className:z,ref:y,style:F,to:c,viewTransition:d},typeof p=="function"?p(k):p)});oc.displayName="NavLink";var dz=v.forwardRef(({discover:e="render",fetcherKey:n,navigate:a,reloadDocument:o,replace:s,state:u,method:c=Zf,action:d,onSubmit:p,relative:g,preventScrollReset:y,viewTransition:h,defaultShouldRevalidate:b,...x},w)=>{let{useTransitions:C}=v.useContext(ha),R=yz(),T=vz(d,{relative:g}),O=c.toLowerCase()==="get"?"get":"post",M=typeof d=="string"&&hp.test(d),A=I=>{if(p&&p(I),I.defaultPrevented)return;I.preventDefault();let j=I.nativeEvent.submitter,k=j?.getAttribute("formmethod")||c,D=()=>R(j||I.currentTarget,{fetcherKey:n,method:k,navigate:a,replace:s,state:u,relative:g,preventScrollReset:y,viewTransition:h,defaultShouldRevalidate:b});C&&a!==!1?v.startTransition(()=>D()):D()};return v.createElement("form",{ref:w,method:O,action:T,onSubmit:o?p:A,...x,"data-discover":!M&&e==="render"?"true":void 0})});dz.displayName="Form";function fz(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function aO(e){let n=v.useContext(Es);return _t(n,fz(e)),n}function hz(e,{target:n,replace:a,mask:o,state:s,preventScrollReset:u,relative:c,viewTransition:d,defaultShouldRevalidate:p,useTransitions:g}={}){let y=yp(),h=$r(),b=Fc(e,{relative:c});return v.useCallback(x=>{if(BL(x,n)){x.preventDefault();let w=a!==void 0?a:Lr(h)===Lr(b),C=()=>y(e,{replace:w,mask:o,state:s,preventScrollReset:u,relative:c,viewTransition:d,defaultShouldRevalidate:p});g?v.startTransition(()=>C()):C()}},[h,y,b,a,o,s,n,e,u,c,d,p,g])}function pz(e){Un(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=v.useRef(hy(e)),a=v.useRef(!1),o=$r(),s=v.useMemo(()=>VL(o.search,a.current?null:n.current),[o.search]),u=yp(),c=v.useCallback((d,p)=>{const g=hy(typeof d=="function"?d(new URLSearchParams(s)):d);a.current=!0,u("?"+g,p)},[u,s]);return[s,c]}var gz=0,mz=()=>`__${String(++gz)}__`;function yz(){let{router:e}=aO("useSubmit"),{basename:n}=v.useContext(ha),a=RL(),o=e.fetch,s=e.navigate;return v.useCallback(async(u,c={})=>{let{action:d,method:p,encType:g,formData:y,body:h}=KL(u,n);if(c.navigate===!1){let b=c.fetcherKey||mz();await o(b,a,c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:h,formMethod:c.method||p,formEncType:c.encType||g,flushSync:c.flushSync})}else await s(c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:h,formMethod:c.method||p,formEncType:c.encType||g,replace:c.replace,state:c.state,fromRouteId:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[o,s,n,a])}function vz(e,{relative:n}={}){let{basename:a}=v.useContext(ha),o=v.useContext(Ga);_t(o,"useFormAction must be used inside a RouteContext");let[s]=o.matches.slice(-1),u={...Fc(e||".",{relative:n})},c=$r();if(e==null){u.search=c.search;let d=new URLSearchParams(u.search),p=d.getAll("index");if(p.some(y=>y==="")){d.delete("index"),p.filter(h=>h).forEach(h=>d.append("index",h));let y=d.toString();u.search=y?`?${y}`:""}}return(!e||e===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(u.pathname=u.pathname==="/"?a:Aa([a,u.pathname])),Lr(u)}function bz(e,{relative:n}={}){let a=v.useContext(wv);_t(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=aO("useViewTransitionState"),s=Fc(e,{relative:n});if(!a.isTransitioning)return!1;let u=Na(a.currentLocation.pathname,o)||a.currentLocation.pathname,c=Na(a.nextLocation.pathname,o)||a.nextLocation.pathname;return xh(s.pathname,c)!=null||xh(s.pathname,u)!=null}function xz(e){return v.createElement(jL,{flushSync:cr.flushSync,...e})}function bs({controlled:e,default:n,name:a,state:o="value"}){const{current:s}=v.useRef(e!==void 0),[u,c]=v.useState(()=>n),d=s&&e!==void 0?e:u,p=v.useCallback(g=>{s||c(g)},[]);return[d,p]}function Sz(e){const{open:n,defaultOpen:a=!1,onOpenChange:o,disabled:s}=e,[u,c]=bs({controlled:n,default:a,name:"Collapsible",state:"open"}),{mounted:d,setMounted:p,transitionStatus:g}=ws(u,!0,!0),y=Tr(),[h,b]=v.useState(),x=h===null?void 0:h??y,w=Be(C=>{const R=!u,T=dt(Va,C.nativeEvent);o(R,T),!T.isCanceled&&c(R)});return v.useMemo(()=>({defaultPanelId:y,disabled:s,handleTrigger:w,mounted:d,open:u,panelId:x,setMounted:p,setOpen:c,setPanelIdState:b,transitionStatus:g}),[y,s,w,d,u,x,p,c,b,g])}const oO=v.createContext(void 0);function iO(){const e=v.useContext(oO);if(e===void 0)throw new Error(Rn(15));return e}const wz="data-open",Rz="data-closed",If=By,Ez="data-panel-open",Cz={[wz]:""},Tz={[Rz]:""},Oz={open(e){return e?{[Ez]:""}:null}},Mz={open(e){return e?Cz:Tz}},sO={...Mz,...po},Az=v.forwardRef(function(n,a){const{render:o,className:s,defaultOpen:u=!1,disabled:c=!1,onOpenChange:d,open:p,style:g,...y}=n,h=Be(d),b=Sz({open:p,defaultOpen:u,onOpenChange:h,disabled:c}),x=v.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),w=v.useMemo(()=>({...b,onOpenChange:h,state:x}),[b,h,x]),C=Mt("div",n,{state:x,ref:a,props:y,stateAttributesMapping:sO});return S.jsx(oO.Provider,{value:w,children:C})}),lO=v.createContext(void 0);function Av(e=!1){const n=v.useContext(lO);if(n===void 0&&!e)throw new Error(Rn(16));return n}function Dz(e){const{focusableWhenDisabled:n,disabled:a,composite:o=!1,tabIndex:s=0,isNativeButton:u}=e,c=o&&n!==!1,d=o&&n===!1;return{props:v.useMemo(()=>{const g={onKeyDown(y){a&&n&&y.key!=="Tab"&&y.preventDefault()}};return o||(g.tabIndex=s,!u&&a&&(g.tabIndex=n?s:-1)),(u&&(n||c)||!u&&a)&&(g["aria-disabled"]=a),u&&(!n||d)&&(g.disabled=a),g},[o,a,n,c,d,u,s])}}function hs(e,n,{detail:a=0,pointerType:o=""}={}){e.dispatchEvent(new(wn(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:a,pointerType:o,shiftKey:n.shiftKey,ctrlKey:n.ctrlKey,altKey:n.altKey,metaKey:n.metaKey}))}function mo(e={}){const{disabled:n=!1,focusableWhenDisabled:a,tabIndex:o=0,native:s=!0,composite:u}=e,c=v.useRef(null),d=Av(!0),p=u??d!==void 0,{props:g}=Dz({focusableWhenDisabled:a,disabled:n,composite:p,tabIndex:o,isNativeButton:s}),y=v.useCallback(()=>{const x=c.current;k0(x)&&p&&n&&g.disabled===void 0&&x.disabled&&(x.disabled=!1)},[n,g.disabled,p]);_e(y,[y]);const h=v.useCallback((x={})=>{const{onClick:w,onMouseDown:C,onKeyUp:R,onKeyDown:T,onPointerDown:O,...M}=x;return Pr({onClick(A){if(n){A.preventDefault();return}w?.(A)},onMouseDown(A){n||C?.(A)},onKeyDown(A){if(n||(ch(A),T?.(A),A.baseUIHandlerPrevented))return;const I=A.target===A.currentTarget,j=A.currentTarget,k=k0(j),D=!s&&Nz(j),z=I&&(s?k:!D),F=A.key==="Enter",G=A.key===" ",J=j.getAttribute("role"),Y=J?.startsWith("menuitem")||J==="option"||J==="gridcell";if(I&&p&&G){if(A.defaultPrevented&&Y)return;A.preventDefault(),(!s||k)&&(A.preventBaseUIHandler(),hs(j,A));return}if(!z||s||!G&&!F){I&&D&&G&&A.preventDefault();return}A.defaultPrevented||(A.preventDefault(),F&&(A.preventBaseUIHandler(),hs(j,A)))},onKeyUp(A){if(!n){if(ch(A),R?.(A),A.target===A.currentTarget&&s&&p&&k0(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!s&&!p&&!A.defaultPrevented&&A.key===" "&&(A.preventBaseUIHandler(),hs(A.currentTarget,A))}},onPointerDown(A){if(n){A.preventDefault();return}O?.(A)}},s?{type:"button"}:{role:"button"},g,M)},[n,g,p,s]),b=Be(x=>{c.current=x,y()});return{getButtonProps:h,buttonRef:b}}function k0(e){return yn(e)&&e.tagName==="BUTTON"}function Nz(e){return yn(e)&&e.tagName==="A"&&!!e.href}const Iz={...Oz,...po},jz=v.forwardRef(function(n,a){const{panelId:o,open:s,handleTrigger:u,state:c,disabled:d}=iO(),{className:p,disabled:g=d,render:y,nativeButton:h=!0,style:b,...x}=n,{getButtonProps:w,buttonRef:C}=mo({disabled:g,native:h});return Mt("button",n,{state:c,ref:[a,C],props:[{"aria-controls":s?o:void 0,"aria-expanded":s,onClick:u},x,w],stateAttributesMapping:Iz})}),hl={height:void 0,width:void 0};function kz(e){const{externalRef:n,hiddenUntilFound:a,id:o,keepMounted:s,mounted:u,onOpenChange:c,open:d,setMounted:p,setOpen:g,transitionStatus:y}=e,h=v.useRef(null),b=v.useRef(null),[x,w]=v.useState(hl),C=v.useRef(hl),R=v.useRef(!1),T=v.useRef(d),O=v.useRef(!1),[M,A]=v.useState(!1),I=v.useRef(null),j=Gr(n,h),k=Pn(d),D=Xh(h),z=!d&&!u,F=M?"idle":y,G=d&&(T.current||O.current),J=!d&&u&&b.current==="css-animation"&&x.height===void 0&&x.width===void 0?C.current:x,Y=a&&z&&b.current!=="css-animation",U=Be((V,X=!0)=>{X&&(C.current=V),w(V)}),_=Be(()=>{I.current?.(),I.current=null}),L=Be(V=>{_(),I.current=()=>{I.current=null,V()}}),$=Be(()=>{d&&u&&b.current==="css-animation"&&(O.current=!0)});_e(()=>{!M||y==="starting"||A(!1)},[M,y]),v.useEffect(()=>()=>{$(),_()},[$,_]),_e(()=>{d||(T.current=!1,O.current=!1);const V=h.current;if(!V)return;!d&&I.current&&_();const X=Pz(V,G);if(b.current=X,d&&y==="idle"&&T.current&&X==="css-animation"){C.current=pl(V);return}if(d&&y==="starting"){const se=R.current;if(R.current=!1,X==="none"){U(pl(V)),A(!0);return}if(X==="css-transition"){const W=Lz(V);if(U(pl(V)),!se)return W;const re=jf(V,"transition-duration","0s");return L(re),A(!0),W}U(pl(V));const N=jf(V,"animation-name","none");if(!se){N();return}const B=jf(V,"animation-duration","0s");N(),L(B),A(!0);return}if(!d&&u&&(y==="idle"||y==="starting")){if(X==="none"){U(hl,!1),p(!1);return}U(pl(V));return}if(y!=="ending")return;if(X==="none"){p(!1);return}const ee=pl(V);if(!(ee.height>0||ee.width>0)){p(!1);return}U(ee),X==="css-animation"&&jf(V,"animation-name","none")()},[u,d,_,U,p,L,G,y]),Ia({enabled:d&&u&&F==="idle",open:!0,ref:h,onComplete(){d&&U(hl,!1)}}),v.useEffect(()=>{if(d||!u||F!=="ending")return;if(!h.current){p(!1),U(hl,!1);return}const X=new AbortController;let ee=-1;function q(){k.current||(p(!1),U(hl,!1))}return ee=Cr.request(()=>{D(q,X.signal)}),()=>{Cr.cancel(ee),X.abort()}},[k,u,d,F,D,U,p]),_e(()=>{const V=h.current;!V||!a||!z||V.setAttribute("hidden","until-found")},[z,a]),v.useEffect(function(){const X=h.current;if(!X)return;const ee=Da.create();let q=-1;const se=(W,re)=>{ee.start(0,()=>{k.current||(q=Cr.request(()=>{k.current||(W&&(R.current=!1),re&&X.setAttribute(If,""),X.setAttribute("hidden","until-found"))}))})},B=jt(X,"beforematch",W=>{const re=dt(zr,W);if(c(!0,re),re.isCanceled){se(!1,!1);return}R.current=!0;const Re=X.hasAttribute(If);X.removeAttribute(If),g(!0),se(!0,Re)});return()=>{ee.clear(),Cr.cancel(q),B()}},[k,c,g]);const K=s||a||u||d;return{height:J.height,props:{...Y?{[If]:""}:void 0,hidden:z,id:o},ref:j,shouldPreventOpenAnimation:G,shouldRender:K,transitionStatus:F,width:J.width}}function pl(e){return{height:e.scrollHeight,width:e.scrollWidth}}function Pz(e,n){const a=wn(e).getComputedStyle(e),o=(a.animationName.split(",").map(u=>u.trim()).some(u=>u!==""&&u!=="none")||n)&&$w(a.animationDuration),s=$w(a.transitionDuration);return o&&s||s?"css-transition":o?"css-animation":"none"}function $w(e){return e.split(",").map(n=>n.trim()).some(n=>n!==""&&Number.parseFloat(n)>0)}function jf(e,n,a){const o=e.style.getPropertyValue(n),s=e.style.getPropertyPriority(n);return e.style.setProperty(n,a),()=>{if(o===""){e.style.removeProperty(n);return}e.style.setProperty(n,o,s)}}function Lz(e){const n={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(n).forEach(s=>{e.style.setProperty(s,"initial","important")});function a(){Object.entries(n).forEach(([s,u])=>{if(u===""){e.style.removeProperty(s);return}e.style.setProperty(s,u)})}const o=Cr.request(a);return()=>{Cr.cancel(o),a()}}const zz="--collapsible-panel-height",_z="--collapsible-panel-width",Hz=v.forwardRef(function(n,a){const{className:o,hiddenUntilFound:s,keepMounted:u,render:c,id:d,style:p,...g}=n,{defaultPanelId:y,mounted:h,onOpenChange:b,open:x,setMounted:w,setPanelIdState:C,setOpen:R,state:T,transitionStatus:O}=iO(),M=s??!1,A=u??!1,I=d||void 0,j=I??y;_e(()=>(C($=>I??($===null?void 0:$)),()=>{C($=>$===I?null:$)}),[I,C]);const{height:k,props:D,ref:z,shouldPreventOpenAnimation:F,shouldRender:G,transitionStatus:J,width:Y}=kz({externalRef:a,hiddenUntilFound:M,id:j,keepMounted:A,mounted:h,onOpenChange:b,open:x,setMounted:w,setOpen:R,transitionStatus:O}),U={...T,transitionStatus:J},_=bE(p,U),L=Mt("div",{...n,style:void 0},{state:U,ref:z,props:[D,{style:{[zz]:k===void 0?"auto":`${k}px`,[_z]:Y===void 0?"auto":`${Y}px`}},g,_?{style:_}:void 0,F?{style:{animationName:"none"}}:void 0],stateAttributesMapping:sO});return G?L:null});function Uz({...e}){return S.jsx(Az,{"data-slot":"collapsible",...e})}function Fz({...e}){return S.jsx(jz,{"data-slot":"collapsible-trigger",...e})}function Bz({...e}){return S.jsx(Hz,{"data-slot":"collapsible-content",...e})}const uO=v.createContext(void 0);function Vz(e){const n=v.useContext(uO);if(n===void 0)throw new Error(Rn(33));return n}const xp=v.createContext(void 0);function Vo(e){const n=v.useContext(xp);if(n===void 0&&!e)throw new Error(Rn(36));return n}const cO=v.createContext(void 0);function Sp(e=!0){const n=v.useContext(cO);if(n===void 0&&!e)throw new Error(Rn(25));return n}const dO=v.createContext(null);function wp(e="root"){const n=v.useContext(dO),a=v.useContext(xp);return n===null||a===void 0?null:(e==="submenu-trigger"?a.virtualFocus||a.parentVirtualFocus:a.virtualFocus)?n:null}const qz={visible:!0,ref:null};function Yz(){return qz}function fO(e,n,a="root"){const o=wp(a),u=((a==="submenu-trigger"?o?.useSubmenuTrigger:o?.useItem)??Yz)({label:e.label,children:e.children,render:e.render}),c=Gr(n,u.ref);return{visible:u.visible,ref:c,props:u.props}}function Kz(e){e.preventDefault()}function Gz(e){const{closeOnClick:n,highlighted:a,id:o,nodeId:s,store:u,typingRef:c,itemRef:d,itemMetadata:p}=e,g=Vo(),y=Sp(!0),h=p.type==="submenu-trigger",b=h?g.parentVirtualFocus:g.virtualFocus,w=(h&&g.parent.type==="menu"?g.parent.store:g.store).useState("webkitAriaSelected",a),{events:C}=u.useState("floatingTreeRoot"),R=u.useState("open"),T=y!==void 0,O=!b&&R&&a?0:-1;return v.useMemo(()=>({id:o,role:"menuitem",tabIndex:O,"aria-selected":w,onMouseDown:b?Kz:void 0,onKeyDown(M){M.key===" "&&c?.current&&M.preventDefault()},onMouseMove(M){s&&C.emit("itemhover",{nodeId:s,target:M.currentTarget})},onClick(M){n&&C.emit("close",{domEvent:M.nativeEvent,reason:fs})},onMouseUp(M){if(y){const A=y.initialCursorPointRef.current;if(y.initialCursorPointRef.current=null,T&&A&&Math.abs(M.clientX-A.x)<=1&&Math.abs(M.clientY-A.y)<=1||T&&!Py&&M.button===2)return}d.current&&u.context.allowMouseUpTriggerRef.current&&(!T||M.button===2)&&p.type==="regular-item"&&hs(d.current,M,{detail:1,pointerType:"mouse"})}}),[n,O,o,C,s,u.context.allowMouseUpTriggerRef,c,d,y,T,p.type,w,b])}const hO={type:"regular-item"};function pO(e){const{closeOnClick:n,disabled:a,highlighted:o,id:s,store:u,typingRef:c=u.context.typingRef,nativeButton:d,itemMetadata:p,nodeId:g}=e,y=v.useRef(null),{getButtonProps:h,buttonRef:b}=mo({disabled:a,focusableWhenDisabled:!0,native:d,composite:!0}),x=Gz({closeOnClick:n,highlighted:o,id:s,nodeId:g,store:u,typingRef:c,itemRef:y,itemMetadata:p}),w=v.useCallback(R=>Pr(x,{onMouseEnter(T){p.type==="submenu-trigger"&&p.setActive(T.nativeEvent)}},R,h),[x,h,p]),C=Gr(y,b);return v.useMemo(()=>({getItemProps:w,itemRef:C}),[w,C])}const gO=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function $z(){return v.useContext(gO)}function Rp(e={}){const{guess:n,label:a,metadata:o,textRef:s,index:u}=e,{register:c,unregister:d,subscribeMapChange:p,nextIndexRef:g}=$z(),y=v.useRef(-1),[h,b]=v.useState(u==null&&n?()=>{if(y.current===-1){const R=g.current;g.current+=1,y.current=R}return y.current}:-1),x=u??h,w=v.useRef(null),C=v.useCallback(R=>{const T=w.current;T&&d(T),w.current=R,R&&c(R,{metadata:o??null,index:u??null,label:a,textRef:s})},[u,c,d,o,a,s]);return _e(()=>{if(u==null)return p(R=>{const T=w.current?R.get(w.current)?.index:null;T!=null&&b(T)})},[u,p]),{ref:C,index:x}}const Xz="data-checked",Qz="data-unchecked",mO={checked(e){return e?{[Xz]:""}:{[Qz]:""}},...po},Dv=v.createContext(void 0);function Zz(){const e=v.useContext(Dv);if(e===void 0)throw new Error(Rn(31));return e}const Jz=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,[d,p]=v.useState(void 0),g=Mt("div",n,{ref:a,props:{role:"group","aria-labelledby":d,...c}});return S.jsx(Dv.Provider,{value:p,children:g})}),Wz=v.forwardRef(function(n,a){const o=wp()?.Group??Jz;return S.jsx(o,{...n,ref:a})}),e_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=Tr(c),g=Zz();return _e(()=>(g(p),()=>{g(y=>y===p?void 0:y)}),[g,p]),Mt("div",n,{ref:a,props:{id:p,"aria-hidden":!0,...d}})}),t_=v.forwardRef(function(n,a){const{render:o,className:s,id:u,label:c,nativeButton:d=!1,disabled:p=!1,closeOnClick:g=!0,style:y,...h}=n,{store:b}=Vo(),x=Rp({guess:!0,label:c}),w=Tr(u),C=b.useState("disabled"),R=b.useState("isActive",x.index),T=b.useState("floatingNodeId"),O=b.useState("itemProps"),M=p||C,{getItemProps:A,itemRef:I}=pO({closeOnClick:g,disabled:M,highlighted:R,id:w,store:b,nativeButton:d,nodeId:T,itemMetadata:hO});return Mt("div",n,{state:{disabled:M,highlighted:R},props:[O,h,A],ref:[I,a,x.ref]})}),yO=v.forwardRef(function(n,a){const o=fO(n,a);return o.visible?S.jsx(t_,{...n,ref:o.ref}):null}),n_=v.createContext(void 0);function Nv(e){return v.useContext(n_)}const py="ArrowUp",gy="ArrowDown",my="ArrowLeft",yy="ArrowRight",vy="Home",by="End",Bc=new Set([py,gy,my,yy,vy,by]),vO="Shift",r_=[vO,"Control","Alt","Meta"];function a_(e){return yn(e)&&e.tagName==="INPUT"}function Xw(e){return!!(a_(e)&&e.selectionStart!=null||yn(e)&&e.tagName==="TEXTAREA")}function Qw(e,n,a,o){if(!e||!n||!n.scrollTo)return;let s=e.scrollLeft,u=e.scrollTop;const c=e.clientWidth<e.scrollWidth,d=e.clientHeight<e.scrollHeight;if(c&&o!=="vertical"){const p=Zw(e,n,"left"),g=kf(e),y=kf(n);a==="ltr"&&(p+n.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight?s=p+n.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight:p-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft&&(s=p-y.scrollMarginLeft-g.scrollPaddingLeft)),a==="rtl"&&(p-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft?s=p-y.scrollMarginLeft-g.scrollPaddingLeft:p+n.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight&&(s=p+n.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight))}if(d&&o!=="horizontal"){const p=Zw(e,n,"top"),g=kf(e),y=kf(n);p-y.scrollMarginTop<e.scrollTop+g.scrollPaddingTop?u=p-y.scrollMarginTop-g.scrollPaddingTop:p+n.offsetHeight+y.scrollMarginBottom>e.scrollTop+e.clientHeight-g.scrollPaddingBottom&&(u=p+n.offsetHeight+y.scrollMarginBottom-e.clientHeight+g.scrollPaddingBottom)}e.scrollTo({left:s,top:u,behavior:"auto"})}function Zw(e,n,a){const o=a==="left"?"offsetLeft":"offsetTop";let s=0;for(;n.offsetParent&&(s+=n[o],n.offsetParent!==e);)n=n.offsetParent;return s}function kf(e){const n=getComputedStyle(e);return{scrollMarginTop:parseFloat(n.scrollMarginTop)||0,scrollMarginRight:parseFloat(n.scrollMarginRight)||0,scrollMarginBottom:parseFloat(n.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(n.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(n.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(n.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(n.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(n.scrollPaddingLeft)||0}}const o_=v.createContext(void 0);function i_(){return v.useContext(o_)}function s_(e,n){const a=Zy(e.render);if(v.isValidElement(a)){const o=a.props;if(Object.hasOwn(o,"id"))return o.id??""}return e.id??n}function l_(e,n,a){const o=s_(e,n),s=o===n?void 0:o,u=v.useCallback(c=>a?.(c?s:void 0),[s,a]);return[o,u]}function u_(e,n,a){const o=Zy(e.render),s=v.isValidElement(o)?o.props:void 0,u=e["aria-label"]??s?.["aria-label"];let c=e["aria-labelledby"]??s?.["aria-labelledby"];return c==null&&!u&&(c=n?n.id||void 0:a||void 0),c}const c_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,id:d,initialFocus:p,...g}=n,{store:y,defaultFloatingId:h,setRenderedFloatingId:b,virtualFocus:x,orientation:w}=Vo(),C=i_(),{side:R,align:T}=Vz(),O=Nv()!=null,M=y.useState("open"),A=y.useState("transitionStatus"),I=y.useState("popupProps"),j=y.useState("mounted"),k=y.useState("instantType"),D=y.useState("activeTriggerElement"),z=y.useState("parent"),F=y.useState("lastOpenChangeReason"),G=y.useState("rootId"),J=y.useState("floatingRootContext"),Y=y.useState("floatingTreeRoot"),U=y.useState("closeDelay"),_=y.useState("hoverEnabled"),L=y.useState("disabled"),$=y.useState("openMethod"),K=y.useState("activeTriggerId"),V=y.useState("listElement"),[X,ee]=l_(n,h,b),q=u_(n,D,K),se=z.type==="menu"?C:void 0,N=z.type==="context-menu";let B=p??z.type!=="menu";p===void 0&&V&&z.type!=="menu"&&(B=()=>y.state.activeIndex!==null?!1:V),Ia({open:M,ref:y.context.popupRef,onComplete(){M&&y.context.onOpenChangeComplete?.(!0)}}),v.useEffect(()=>{function ve(Pe){y.setOpen(!1,dt(Pe.reason,Pe.domEvent))}return Y.events.on("close",ve),()=>{Y.events.off("close",ve)}},[Y.events,y]),ov(J,{enabled:_&&!L&&!N&&z.type!=="menubar",closeDelay:U});const W=y.useStateSetter("popupElement"),re=v.useContext(dO)?.useParentHandoff??f_,{parentVirtualFocusRef:Re,handleFocus:le}=re(y,z,M,x),me={transitionStatus:A,side:R,align:T,open:M,nested:z.type==="menu",instant:k},ge=Mt("div",n,{state:me,ref:[a,y.context.popupRef,W,ee],stateAttributesMapping:Fh,props:[I,{id:X,...V?{role:"presentation"}:{role:"menu","aria-orientation":w==="horizontal"?"horizontal":void 0,"aria-labelledby":q},onKeyDown(ve){se?.onPopupKeyDown?.(ve),O&&Bc.has(ve.key)&&ve.stopPropagation()},onFocus:le},Lc(A),g,{"data-rootownerid":G}]});let ce=z.type===void 0||N;(D||z.type==="menubar"&&F!==Bh)&&(ce=!0);const Te=se?.getReturnElement??Re;return S.jsx($h,{context:J,openInteractionType:$,modal:N,disabled:!j,returnFocus:c??Te??ce,explicitReturnFocus:c===void 0&&Te?!1:void 0,initialFocus:B,restoreFocus:!0,getInsideElements:z.type===void 0?()=>[y.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:z.type!=="menubar"?Y:void 0,previousFocusableElement:D,nextFocusableElement:z.type===void 0?y.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:y.context.beforeContentFocusGuardRef,children:ge})}),d_={parentVirtualFocusRef:void 0,handleFocus:void 0};function f_(){return d_}const bO=v.forwardRef(function(n,a){const o=wp()?.Popup??c_;return S.jsx(o,{...n,ref:a})}),xO=v.createContext(void 0);function h_(){const e=v.useContext(xO);if(e===void 0)throw new Error(Rn(32));return e}const SO=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n,{store:u,parent:c}=Vo();if(!(u.useState("mounted")||o))return null;const g=c.type==="menu"||c.type==="menubar"?"group":void 0;return S.jsx(xO.Provider,{value:o,children:S.jsx(Gh,{ref:a,...s,portalOwnerRole:g})})});function Iv(e){const{children:n,elementsRef:a,labelsRef:o,onMapChange:s}=e,u=Be(s),[,c]=v.useState(0),d=er(g_).current,p=er(p_).current,g=v.useRef(0),y=v.useRef(!0),h=v.useRef(null),b=v.useRef(null),x=Be(()=>{y.current||(y.current=!0,c(I=>I+1))}),w=Be((I,j)=>{p.set(I,j),x()}),C=Be(I=>{p.delete(I),x()}),R=Be(I=>{const j=new Map;return a.current.length=0,o&&(o.current.length=0),I.forEach(k=>{j.set(k.element,{...k.registration.metadata??{},index:k.index}),a.current[k.index]=k.element,o&&(o.current[k.index]=k.registration.label!==void 0?k.registration.label:k.registration.textRef?.current?.textContent??k.element.textContent)}),g.current=a.current.length,j});function T(I){if(b.current?.disconnect(),b.current=null,typeof MutationObserver!="function"||I.length<2)return;const j=new MutationObserver(D=>{if(!v_(D))return;let z=null;for(const F of I)if(F.isConnected){if(z&&wO(z,F)>0){j.disconnect(),x();return}z=F}});b.current=j;const k=new Set;for(let D=1;D<I.length;D+=1){const z=y_(I[D-1],I[D]);z&&k.add(z)}k.forEach(D=>j.observe(D,{childList:!0}))}const O=Be(()=>{const[I,j]=m_(p),k=R(I),D=h.current,z=!D||D.length!==I.length||I.some((F,G)=>{const J=D[G];return F.index!==J.index||F.element!==J.element||F.registration.index!==J.registration.index||F.registration.metadata!==J.registration.metadata});T(j),h.current=I,y.current=!1,z&&(d.forEach(F=>F(k)),u(k))});_e(()=>(!y.current&&h.current&&R(h.current),()=>{a.current=[],o&&(o.current=[])}),[a,o,R]),_e(()=>{y.current&&O()}),_e(()=>()=>{b.current?.disconnect(),y.current=!0},[]);const M=Be(I=>(d.add(I),()=>{d.delete(I)})),A=v.useMemo(()=>({register:w,unregister:C,subscribeMapChange:M,nextIndexRef:g}),[w,C,M,g]);return S.jsx(gO.Provider,{value:A,children:n})}function p_(){return new Map}function g_(){return new Set}function m_(e){const n=new Set,a=[],o=[];e.forEach((u,c)=>{if(!c.isConnected)return;const d=u.index,p={index:d??-1,element:c,registration:u};d===null?o.push(p):d>=0&&(n.add(d),a.push(p))});let s=0;return o.sort((u,c)=>wO(u.element,c.element)),o.forEach(u=>{for(;n.has(s);)s+=1;u.index=s,a.push(u),s+=1}),n.size>0&&a.sort((u,c)=>u.index-c.index),[a,o.map(u=>u.element)]}function y_(e,n){let a=e.parentElement;for(;a&&!a.contains(n);)a=a.parentElement;return a}function v_(e){for(const n of e)for(let a=0;a<n.removedNodes.length;a+=1)if(n.removedNodes[a].isConnected)return!0;return!1}function wO(e,n){return e.nextElementSibling===n?-1:n.nextElementSibling===e?1:e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const Ep=v.forwardRef(function(n,a){const{cutout:o,...s}=n;let u;if(o){const c=o.getBoundingClientRect();u=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${c.left}px ${c.top}px,${c.left}px ${c.bottom}px,${c.right}px ${c.bottom}px,${c.right}px ${c.top}px,${c.left}px ${c.top}px)`}return S.jsx("div",{ref:a,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:u}})});function RO(e){const{store:n,domReference:a,positionerElement:o,open:s}=e,u=v.useRef(null),c=v.useRef(null),d=Xh(o);_e(()=>{s||(c.current?.abort(),c.current=null,n.state.instantType==="trigger-change"&&n.set("instantType",void 0))},[s,n]),_e(()=>{const p=a,g=u.current;if(p&&(u.current=p),!g||!p||p===g||!n.select("open"))return;n.set("instantType",void 0);const y=new AbortController;return c.current=y,d(()=>{n.select("open")&&n.set("instantType","trigger-change")},y.signal),()=>{y.abort()}},[a,d,n])}let Jw={},Ww={},eR="";function Cp(e,n){return Oc(e)?e:n}function tR(e,n,a){return/hidden|clip/.test(e.getComputedStyle(Cp(n,a)).overflowY)}function b_(e){if(typeof document>"u")return!1;const n=Kt(e);return wn(n).innerWidth-n.documentElement.clientWidth>0}function x_(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const a=Kt(e),o=a.documentElement,s=a.body,u=Cp(o,s),c=u.style.overflowY,d=o.style.scrollbarGutter;o.style.scrollbarGutter="stable",u.style.overflowY="scroll";const p=u.offsetWidth;u.style.overflowY="hidden";const g=u.offsetWidth;return u.style.overflowY=c,o.style.scrollbarGutter=d,p===g}function S_(e){const n=Kt(e),a=n.documentElement,o=n.body,s=Cp(a,o),u={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,u)}}function w_(e){const n=Kt(e),a=n.documentElement,o=n.body,s=wn(a);let u=0,c=0,d=!1;const p=Cr.create();if(ho&&(s.visualViewport?.scale??1)!==1)return()=>{};function g(){const x=s.getComputedStyle(a),w=s.getComputedStyle(o),T=(x.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";u=a.scrollTop,c=a.scrollLeft,Jw={scrollbarGutter:a.style.scrollbarGutter,overflowY:a.style.overflowY,overflowX:a.style.overflowX},eR=a.style.scrollBehavior,Ww={position:o.style.position,height:o.style.height,width:o.style.width,boxSizing:o.style.boxSizing,overflowY:o.style.overflowY,overflowX:o.style.overflowX,scrollBehavior:o.style.scrollBehavior};const O=a.scrollHeight>a.clientHeight,M=a.scrollWidth>a.clientWidth,A=x.overflowY==="scroll"||w.overflowY==="scroll",I=x.overflowX==="scroll"||w.overflowX==="scroll",j=Math.max(0,s.innerWidth-o.clientWidth),k=Math.max(0,s.innerHeight-o.clientHeight),D=parseFloat(w.marginTop)+parseFloat(w.marginBottom),z=parseFloat(w.marginLeft)+parseFloat(w.marginRight),F=Cp(a,o);if(d=x_(e),d){a.style.scrollbarGutter=T,F.style.overflowY="hidden",F.style.overflowX="hidden";return}Object.assign(a.style,{scrollbarGutter:T,overflowY:"hidden",overflowX:"hidden"}),(O||A)&&(a.style.overflowY="scroll"),(M||I)&&(a.style.overflowX="scroll"),Object.assign(o.style,{position:"relative",height:D||k?`calc(100dvh - ${D+k}px)`:"100dvh",width:z||j?`calc(100vw - ${z+j}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),o.scrollTop=u,o.scrollLeft=c,a.setAttribute("data-base-ui-scroll-locked",""),a.style.scrollBehavior="unset"}function y(){Object.assign(a.style,Jw),Object.assign(o.style,Ww),d||(a.scrollTop=u,a.scrollLeft=c,a.removeAttribute("data-base-ui-scroll-locked"),a.style.scrollBehavior=eR)}function h(){y(),p.request(g)}g();const b=jt(s,"resize",h);return()=>{p.cancel(),y(),typeof s.removeEventListener=="function"&&b()}}class R_{lockCount=0;restore=null;timeoutLock=Da.create();timeoutUnlock=Da.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=Kt(n),o=a.documentElement,s=a.body,u=wn(o);if(tR(u,o,s)){const d=new u.MutationObserver(()=>{tR(u,o,s)||(d.disconnect(),this.restore=null,this.lock(n))}),p={attributes:!0};d.observe(o,p),d.observe(s,p),this.restore=()=>d.disconnect();return}const c=Ph||!b_(n);this.restore=c?S_(n):w_(n)}}const E_=new R_;function EO(e=!0,n=null){_e(()=>{if(e)return E_.acquire(n)},[e,n])}const C_=20;function jv(e,n,a,o){const[s,u]=v.useState(!1);_e(()=>{if(!e||!n||a==null){u(!1);return}const c=Kt(a).documentElement.clientWidth,d=a.offsetWidth;u(c>0&&d>0&&d>=c-C_)},[e,n,a]),EO(e&&(!n||s),o)}const CO=v.forwardRef(function(n,a){const{anchor:o,positionMethod:s="absolute",className:u,render:c,side:d,align:p,sideOffset:g=0,alignOffset:y=0,collisionBoundary:h="clipping-ancestors",collisionPadding:b=5,arrowPadding:x=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:R=OE,style:T,...O}=n,{store:M,virtualFocus:A,syncHighlightedItem:I}=Vo(),j=h_(),k=Sp(!0),D=M.useState("parent"),z=M.useState("floatingRootContext"),F=M.useState("floatingTreeRoot"),G=M.useState("mounted"),J=M.useState("open"),Y=M.useState("modal"),U=M.useState("openMethod"),_=M.useState("activeTriggerElement"),L=M.useState("transitionStatus"),$=M.useState("positionerElement"),K=M.useState("instantType"),V=M.useState("adaptiveOrigin"),X=M.useState("lastOpenChangeReason"),ee=M.useState("floatingNodeId"),q=M.useState("floatingParentNodeId"),se=z.useState("domReferenceElement");let N=o,B=g,W=y,re=p,Re=R;D.type==="context-menu"&&(N=o??D.context?.anchor,re=re??"start",!d&&re!=="center"&&(W=n.alignOffset??2,B=n.sideOffset??-5));let le=d,me=re;D.type==="menu"?(le=le??"inline-end",me=me??"start",Re=n.collisionAvoidance??Jy):D.type==="menubar"&&(le=le??(D.context.orientation==="vertical"?"inline-end":"bottom"),me=me??"start");const ge=D.type==="context-menu",ce=sp({anchor:N,floatingRootContext:z,positionMethod:k?"fixed":s,mounted:G,side:le,sideOffset:B,align:me,alignOffset:W,arrowPadding:ge?0:x,collisionBoundary:h,collisionPadding:b,sticky:w,nodeId:ee,keepMounted:j,disableAnchorTracking:C,collisionAvoidance:Re,shift:ge?{crossAxis:!("side"in Re&&Re.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:F,adaptiveOrigin:V,lazyFlip:A?"placement":!1});v.useEffect(()=>{function He(be){be.open&&(be.parentNodeId===ee&&M.set("hoverEnabled",!1),be.nodeId!==ee&&be.parentNodeId===M.select("floatingParentNodeId")&&M.setOpen(!1,dt(Zu)))}return F.events.on("menuopenchange",He),()=>{F.events.off("menuopenchange",He)}},[M,F.events,ee]),v.useEffect(()=>{if(M.select("floatingParentNodeId")==null)return;function He(be){if(be.open||be.nodeId!==M.select("floatingParentNodeId"))return;const Ue=be.reason??Zu;M.setOpen(!1,dt(Ue))}return F.events.on("menuopenchange",He),()=>{F.events.off("menuopenchange",He)}},[F.events,M]);const Te=Hn();v.useEffect(()=>{J||Te.clear()},[J,Te]),v.useEffect(()=>{function He(be){if(!(!J||be.nodeId!==M.select("floatingParentNodeId")))if(be.target&&_&&_!==be.target){const Ue=M.select("closeDelay");Ue>0?Te.isStarted()||Te.start(Ue,()=>{M.setOpen(!1,dt(Zu))}):M.setOpen(!1,dt(Zu))}else Te.clear()}return F.events.on("itemhover",He),()=>{F.events.off("itemhover",He)}},[F.events,J,_,M,Te]),v.useEffect(()=>{const He={open:J,nodeId:ee,parentNodeId:q,reason:M.select("lastOpenChangeReason")};F.events.emit("menuopenchange",He)},[F.events,J,M,ee,q]),RO({store:M,domReference:se,positionerElement:$,open:J});const ve={open:J,side:ce.side,align:ce.align,anchorHidden:ce.anchorHidden,nested:D.type==="menu",instant:K},Pe=D.type==="menubar"&&D.context.modal;jv(J&&(Pe||Y&&X!==qn),U==="touch",$,_);const Le=lp(n,ve,{styles:ce.positionerStyles,transitionStatus:L,props:O,refs:[a,M.useStateSetter("positionerElement")],hidden:!G,inert:!J}),Fe=G&&D.type!=="menu"&&(D.type!=="menubar"&&Y&&X!==qn||D.type==="menubar"&&D.context.modal);let Oe=null;return D.type==="menubar"?Oe=D.context.contentElement:D.type===void 0&&(Oe=_),S.jsxs(uO.Provider,{value:ce,children:[Fe&&S.jsx(Ep,{ref:D.type==="context-menu"||D.type==="nested-context-menu"?D.context.internalBackdropRef:null,inert:up(!J),cutout:Oe}),S.jsx(kE,{id:ee,children:S.jsx(Iv,{elementsRef:M.context.itemDomElements,labelsRef:M.context.itemLabels,onMapChange:I,children:Le})})]})}),TO=v.createContext(void 0);function T_(){const e=v.useContext(TO);if(e===void 0)throw new Error(Rn(34));return e}const O_=v.forwardRef(function(n,a){const{render:o,className:s,value:u,defaultValue:c,onValueChange:d,disabled:p=!1,style:g,"aria-labelledby":y,...h}=n,[b,x]=v.useState(void 0),[w,C]=bs({controlled:u,default:c,name:"MenuRadioGroup"}),R=Be((A,I)=>{d?.(A,I),!I.isCanceled&&C(A)}),O=Mt("div",n,{state:{disabled:p},ref:a,props:{role:"group","aria-labelledby":y??b,"aria-disabled":p||void 0,...h}}),M=v.useMemo(()=>({value:w,setValue:R,disabled:p}),[w,R,p]);return S.jsx(Dv.Provider,{value:x,children:S.jsx(TO.Provider,{value:M,children:O})})}),M_=v.memo(v.forwardRef(function(n,a){const o=wp()?.RadioGroup??O_;return S.jsx(o,{...n,ref:a})})),OO=v.createContext(void 0);function A_(){const e=v.useContext(OO);if(e===void 0)throw new Error(Rn(35));return e}const D_=v.forwardRef(function(n,a){const{render:o,className:s,id:u,label:c,nativeButton:d=!1,disabled:p=!1,closeOnClick:g=!1,value:y,style:h,...b}=n,{store:x}=Vo(),{value:w,setValue:C,disabled:R}=T_(),T=Rp({guess:!0,label:c}),O=Tr(u),M=x.useState("isActive",T.index),A=x.useState("floatingNodeId"),I=x.useState("itemProps"),j=x.useState("disabled"),k=p||R||j,D=w===y,{getItemProps:z,itemRef:F}=pO({closeOnClick:g,disabled:k,highlighted:M,id:O,store:x,nativeButton:d,nodeId:A,itemMetadata:hO}),G=v.useMemo(()=>({disabled:k,highlighted:M,checked:D}),[k,M,D]);function J(U){const _=dt(fs,U.nativeEvent,void 0,{preventUnmountOnClose:Sn});C(y,_)}const Y=Mt("div",n,{state:G,stateAttributesMapping:mO,props:[I,{role:"menuitemradio","aria-checked":D,onClick:J},b,z],ref:[F,a,T.ref]});return S.jsx(OO.Provider,{value:G,children:Y})}),N_=v.forwardRef(function(n,a){const o=fO(n,a);return o.visible?S.jsx(D_,{...n,ref:o.ref}):null}),I_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c=!1,...d}=n,p=A_(),g=v.useRef(null),{transitionStatus:y,mounted:h,setMounted:b}=ws(p.checked);Ia({batch:!0,enabled:!p.checked,open:p.checked,ref:g,onComplete(){p.checked||b(!1)}});const x={checked:p.checked,disabled:p.disabled,highlighted:p.highlighted,transitionStatus:y};return Mt("span",n,{state:x,stateAttributesMapping:mO,ref:[a,g],props:{"aria-hidden":!0,...d},enabled:c||h})}),j_=v.createContext(null);function MO(e){return v.useContext(j_)}function k_(e){const n=v.useRef(""),a=v.useCallback(s=>{s.defaultPrevented||(n.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:v.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,n.current),n.current=""},[e]),onPointerDown:a}}function ql(e,n){const a=v.useRef(e),o=Be(n);_e(()=>{a.current!==e&&o(a.current),a.current=e},[e,o])}function P_(e,n){const a=Be((u,c)=>{(typeof e=="function"?e():e)||n(c||(Ph?"touch":""))}),{onClick:o,onPointerDown:s}=k_(a);return v.useMemo(()=>({onClick:o,onPointerDown:s}),[o,s])}function AO(e){const[n,a]=v.useState(null),o=P_(e,a);return ql(e,s=>{s&&!e&&a(null)}),v.useMemo(()=>({openMethod:n,triggerProps:o}),[n,o])}function L_(e){return e==null?zr:e.type.startsWith("key")?tE:e.type.startsWith("mouse")||e.type.startsWith("pointer")?N4:zr}const z_={...Po,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,n)=>{const a=Po.triggerPopupId(e,n);return a?e.listElement?.id||a:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,n)=>ho&&e.inputFocused&&n?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,n)=>e.activeIndex===n,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType==="trigger-change"&&!Po.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class __ extends Ul{constructor(n,a,o=!1){const s=new Pc,u=U_(s,a,o,n);super(u,H_(s),z_),this.observe("parent",c=>{c.type==="menu"?this.context.allowMouseUpTriggerRef=c.store.context.allowMouseUpTriggerRef:c.type!==void 0&&(this.context.allowMouseUpTriggerRef=c.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){const n=this.state.parent;if(n.type!=="menu")return;let a=n.store.select("rootId"),o=n.store.select("floatingTreeRoot"),s=n.store.select("keyboardEventRelay");return n.store.subscribe(()=>{const u=n.store.select("rootId"),c=n.store.select("floatingTreeRoot"),d=n.store.select("keyboardEventRelay");a===u&&o===c&&s===d||(a=u,o=c,s=d,this.notifyAll())})}setOpen(n,a){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:a})}setActiveIndex(n,a,o){if(this.state.activeIndex!==n){const u=(n===null?void 0:this.context.itemDomElements.current[n])===this.context.reportedItem;this.context.highlightReason=u?"none":a,this.context.highlightEvent=u?void 0:o}this.set("activeIndex",n)}highlightItem(n,a,o){const s=this.context.itemDomElements.current.indexOf(n);s>-1&&this.setActiveIndex(s,a,o)}}function H_(e){return{positionerRef:v.createRef(),popupRef:v.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:"none",highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function U_(e,n,a=!1,o){return{...rp(e,n,a),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:Gt,inputProps:Gt,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Wy,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Gt,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...o}}const nR=v.createContext(null);function DO(e,n){return(e===Va||e===fs)&&n?.detail===0}function F_(e,n){return e===ih||DO(e,n)}const B_=Cc(function(n){const{children:a,open:o,onOpenChange:s,onOpenChangeComplete:u,onItemHighlighted:c,defaultOpen:d=!1,disabled:p=!1,modal:g,loopFocus:y=!0,orientation:h="vertical",actionsRef:b,closeParentOnEsc:x=!1,handle:w,triggerId:C,defaultTriggerId:R=null,highlightItemOnHover:T=!0,isSubmenu:O=!1,virtualFocus:M=!1,virtualFocusRef:A,allowEscape:I=!0,resetOnPointerLeave:j=!0}=n,k=Sp(!0),D=Vo(!0),z=MO(!0),F=D?.store,G=D?.virtualFocus??!1,J=v.useMemo(()=>O&&F?{type:"menu",store:F}:z?{type:"menubar",context:z}:k&&!F?{type:"context-menu",context:k}:{type:void 0},[k,F,z,O]),Y=Tr(),U=Tr(),[_,L]=v.useState(void 0),$=(_??U)||void 0,K=Ni(),V=J.type==="menu"?J.store:void 0,X=(o??d)&&V?.state.transitionStatus==="starting",ee=er(()=>X?V?.state.instantType:void 0).current,q=er(()=>{const ke=new __({open:d,openProp:o,activeTriggerId:R,triggerIdProp:C,parent:J,disabled:p,highlightItemOnHover:T,modal:J.type===void 0?g:void 0,rootId:Y,instantType:ee},$,K!=null);return ke.context.virtualFocusRef=A,ke}).current;q.useControlledProp("openProp",o),q.useControlledProp("triggerIdProp",C),q.useContextCallback("onOpenChangeComplete",u);const se=q.useState("floatingTreeRoot"),N=ev(se),B=q.useState("open"),W=q.useState("activeTriggerElement"),re=q.useState("positionerElement"),Re=q.useState("hoverEnabled"),le=q.useState("disabled"),me=q.useState("lastOpenChangeReason"),ge=q.useState("parent"),ce=q.useState("activeIndex"),Te=q.useState("keyboardOpen"),ve=q.useState("payload"),Pe=q.useState("floatingParentNodeId"),Me=v.useRef(null),Le=v.useRef(ge.type!=="context-menu"),Fe=Hn(),Oe=v.useRef(!0),He=Hn(),be=Pe!=null,{openMethod:Ue,triggerProps:Ze}=AO(B);q.useSyncedValues({disabled:p,highlightItemOnHover:T,modal:ge.type===void 0?g:void 0,openMethod:Ue,rootId:Y}),Wh(q);const{forceUnmount:it,transitionStatus:de}=ep(B,q,()=>{q.set("allowMouseEnter",!1)},X),we=Xh(q.context.popupRef);v.useEffect(()=>{if(ee===void 0)return;const ke=()=>{q.state.instantType===ee&&q.set("instantType",void 0)};if(!B){ke();return}if(de!==void 0)return;if(q.context.popupRef.current==null){ke();return}const ze=new AbortController;return we(ke,ze.signal),()=>{ze.abort()}},[ee,B,de,we,q]),_e(()=>{k&&!D?q.update({parent:{type:"context-menu",context:k},floatingNodeId:N,floatingParentNodeId:K}):(D||!q.select("activeTriggerElement"))&&q.update({floatingNodeId:N,floatingParentNodeId:K})},[k,D,N,K,W,q]),v.useEffect(()=>{if(B||(Me.current=null),ge.type==="context-menu"){if(!B){Fe.clear(),Le.current=!1;return}Fe.start(500,()=>{Le.current=!0})}},[Fe,B,ge.type]),_e(()=>{!B&&!Re&&q.set("hoverEnabled",!0)},[B,Re,q]);const Ke=Be((ke,ze)=>{const Ge=ze.reason;if(!ke&&!q.select("open")||B===ke&&ze.trigger===W&&me===Ge)return;const et=Jh(ze);if(!ke&&ze.trigger==null&&(ze.trigger=W??void 0),s?.(ke,ze),ze.isCanceled)return;q.state.floatingRootContext.dispatchOpenChange(ke,ze);const Et=ze.event;if(ke===!1&&Ge!==fs&&Et?.type==="click"&&Et.pointerType==="touch"&&!Oe.current)return;ke&&Ge===xl?(Oe.current=!1,He.start(300,()=>{Oe.current=!0})):(Oe.current=!0,He.clear());const H=!ke&&(Ge===Dc||Ge==null);Me.current=ze.event;const Z=Zh(q.state,ke,ze.trigger,et());Z.openChangeReason=Ge,Z.keyboardOpen=ke&&F_(Ge,Et),ge.type==="menubar"&&(Ge===xl||Ge===Ti||Ge===qn||Ge===ih||Ge===Zu)?Z.instantType="group":DO(Ge,Et)?Z.instantType="click":H?Z.instantType="dismiss":Z.instantType=void 0,q.update(Z)}),De=zE({popupStore:q,floatingRootContext:q.state.floatingRootContext,floatingId:$,nested:K!=null,onOpenChange:Ke}),Ie=De.context.events;_e(()=>{const ke=({open:ze,eventDetails:Ge})=>Ke(ze,Ge);return Ie.on("setOpen",ke),()=>{Ie?.off("setOpen",ke)}},[Ie,Ke]),_e(()=>q.subscribeToParentMenu(),[q]);const yt=v.useCallback(()=>{q.setOpen(!1,dt(Nc))},[q]);v.useImperativeHandle(b,()=>({unmount:it,close:yt}),[it,yt]);let ut;ge.type==="context-menu"&&(ut=ge.context),v.useImperativeHandle(ut?.positionerRef,()=>re,[re]),v.useImperativeHandle(ut?.actionsRef,()=>({setOpen:Ke}),[Ke]);const ht=jc(De,{enabled:!le,bubbles:{escapeKey:x&&ge.type==="menu"},outsidePress(){return ge.type!=="context-menu"||Me.current?.type==="contextmenu"?!0:Le.current},externalTree:be?se:void 0}),Ot=ip(),Dt=QE(De,{enabled:!le,listRef:q.context.itemDomElements,activeIndex:ce,virtual:M,nested:ge.type==="menubar"||!M&&ge.type!==void 0,parentOrientation:ge.type==="menubar"?ge.context.orientation:void 0,loopFocus:y,focusItemOnOpen:M?Te:void 0,allowEscape:M&&y&&I,orientation:h,triggerOrientation:M?"vertical":h,rtl:Ot==="rtl",disabledIndices:fo,onNavigate(ke,ze){q.setActiveIndex(ke,L_(ze),ze?.nativeEvent)},openOnArrowKeyDown:ge.type!=="context-menu"&&!(M&&O),externalTree:!M&&be?se:void 0,nestedReturnFocusRef:V?.context.virtualFocusRef,focusItemOnHover:T,resetOnPointerLeave:j}),Jt=v.useCallback(ke=>{q.context.typingRef.current=ke},[q]),rn=ZE(De,{enabled:!le&&!M,listRef:q.context.itemLabels,elementsRef:q.context.itemDomElements,activeIndex:ce,resetMs:w3,onMatch:(ke,ze)=>{B&&ke!==ce&&q.setActiveIndex(ke,tE,ze.nativeEvent)},onTyping:Jt}),Wt=Be(c),We=v.useRef(-1),xt=Be(()=>{const ke=q.state.activeIndex,ze=ke===null?void 0:q.context.itemDomElements.current[ke]??void 0;if(ze?.isConnected===!1)return;const Ge=ze===void 0?-1:ke;if(We.current===Ge&&q.context.reportedItem===ze)return;We.current=Ge,q.context.reportedItem=ze,M&&q.set("highlightedItem",ze);const{highlightReason:et,highlightEvent:Et}=q.context;q.context.highlightReason=zr,q.context.highlightEvent=void 0,c&&Wt(ze,D4(et,Et,{label:ze===void 0?void 0:q.context.itemLabels.current[Ge]??void 0}))});_e(()=>{xt()},[ce,xt]);const $t=v.useMemo(()=>{if(!M)return Dt.reference;if(!Dt.trigger)return Gt;const{onFocus:ke,...ze}=Dt.trigger;return ze},[M,Dt.reference,Dt.trigger]);q.useSyncedValue("inputProps",M?Dt.reference??Gt:Gt);const ft=v.useMemo(()=>{const ke=Pr(rn.reference,$t,ht.reference,{onMouseMove(){q.set("allowMouseEnter",!0)}},Ze);return ke["aria-haspopup"]="menu",ke["aria-expanded"]=B,ke},[q,rn.reference,$t,ht.reference,Ze,B]),vt=v.useMemo(()=>{const ke=Pr(Dt.trigger,ht.trigger,Ze);return ke["aria-haspopup"]="menu",ke["aria-expanded"]=!1,ke},[Dt.trigger,ht.trigger,Ze]);er(()=>(q.update({inactiveTriggerProps:vt}),null));const gt=v.useMemo(()=>Pr(kc,{onMouseMove(){q.set("allowMouseEnter",!0),ge.type==="menu"&&q.set("hoverEnabled",!1)},onClick(){q.select("hoverEnabled")&&q.set("hoverEnabled",!1)},onKeyDown(ke){const ze=q.select("keyboardEventRelay");ze&&!ke.isPropagationStopped()&&ze(ke)}},rn.floating,Dt.floating,ht.floating),[ge.type,q,rn.floating,Dt.floating,ht.floating]),Lt=Dt.item??Gt;tp(q,{floatingRootContext:De,activeTriggerProps:ft,inactiveTriggerProps:vt,popupProps:gt,itemProps:Lt});const un=v.useMemo(()=>({store:q,parent:J,orientation:h,loopFocus:y,allowEscape:I,defaultFloatingId:U,setRenderedFloatingId:L,virtualFocus:M,parentVirtualFocus:G,syncHighlightedItem:xt}),[q,J,h,y,I,U,M,G,xt]),je=typeof a=="function"?a({payload:ve}):a;let ot=S.jsxs(xp.Provider,{value:un,children:[w&&S.jsx(Qh,{handle:w,store:q}),je]});return(ge.type===void 0||ge.type==="context-menu")&&(ot=S.jsx(PE,{externalTree:se,children:ot})),ot});function NO(e){const n=v.useContext(nR);if(n===null)return S.jsx(B_,{...e});const a=n.Root;return S.jsx(nR.Provider,{value:null,children:S.jsx(a,{...n.options,...e})})}const Pf=5;function IO(e,n){const a=V_(n);return e.clientX>=a.left-Pf&&e.clientX<=a.right+Pf&&e.clientY>=a.top-Pf&&e.clientY<=a.bottom+Pf}function V_(e){const n=e.getBoundingClientRect(),a=wn(e);if(Ly)return n;const o=a.getComputedStyle(e,"::before"),s=a.getComputedStyle(e,"::after");if(!(o.content!=="none"||s.content!=="none"))return n;const c=parseFloat(o.width)||0,d=parseFloat(o.height)||0,p=parseFloat(s.width)||0,g=parseFloat(s.height)||0,y=Math.max(n.width,c,p),h=Math.max(n.height,d,g),b=y-n.width,x=h-n.height;return{left:n.left-b/2,right:n.right+b/2,top:n.top-x/2,bottom:n.bottom+x/2}}function q_(e={}){const{highlightItemOnHover:n,highlightedIndex:a,onHighlightedIndexChange:o}=Av(),{ref:s,index:u}=Rp(e),c=a===u,d=v.useRef(null),p=Gr(s,d);return{compositeProps:{tabIndex:c?0:-1,onFocus(){o(u)},onMouseMove(){const y=d.current;if(!n||!y)return;const h=y.hasAttribute("disabled")||y.ariaDisabled==="true";!c&&!h&&y.focus()}},compositeRef:p,index:u}}function jO(e){const{render:n,className:a,style:o,state:s=Gt,props:u=fo,refs:c=fo,metadata:d,stateAttributesMapping:p,tag:g="div",...y}=e,{compositeProps:h,compositeRef:b}=q_({metadata:d});return Mt(g,e,{state:s,ref:[b,...c],props:[h,...u,y],stateAttributesMapping:p})}function kv(e){if(yn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!zo(e))return kv(Uo(e))}function Y_(e,n){function a(u,c,d){const p=u.currentTarget;cr.flushSync(()=>{e.setOpen(!1,dt(Ti,u.nativeEvent,p))}),o3(p.isConnected?p:n.current,c,d)?.focus()}function o(u){a(u,-1,e.select("positionerElement"))}function s(u){const c=e.select("positionerElement");c&&El(u,c)?e.context.beforeContentFocusGuardRef.current?.focus():a(u,1,c)}return{handlePreFocusGuardFocus:o,handleFocusTargetFocus:s}}function K_(e){const{enabled:n=!0,mouseDownAction:a,open:o}=e,s=v.useRef(!1);return v.useMemo(()=>n?{onMouseDown:u=>{(a==="open"&&!o||a==="close"&&o)&&(s.current=!0,Kt(u.currentTarget).addEventListener("click",()=>{s.current=!1},{once:!0}))},onClick:u=>{s.current&&(s.current=!1,u.preventBaseUIHandler())}}:Gt,[n,a,o])}const G_=KR(function(n,a){const{render:o,className:s,style:u,disabled:c=!1,nativeButton:d=!0,id:p,openOnHover:g,delay:y=100,closeDelay:h=0,handle:b,payload:x,...w}=n,C=Vo(!0),T=KE(b)??C?.store;if(!T)throw new Error(Rn(85));const O=Tr(p),M=T.useState("isTriggerActive",O),A=T.useState("floatingRootContext"),I=T.useState("isOpenedByTrigger",O),j=T.useState("triggerControlsId",O),k=v.useRef(null),D=X_(),z=Av(!0),F=Ii(),G=v.useMemo(()=>F??new Wy,[F]),J=ev(G),Y=Ni(),{registerTrigger:U,isMountedByThisTrigger:_}=UE(O,k,T,{payload:x,closeDelay:h,parent:D,floatingTreeRoot:G,floatingNodeId:J,floatingParentNodeId:Y,keyboardEventRelay:z?.relayKeyboardEvent}),L=D.type==="menubar",$=T.useState("disabled"),K=c||$||L&&D.context.disabled,{getButtonProps:V,buttonRef:X}=mo({disabled:K,native:d});v.useEffect(()=>{!I&&D.type===void 0&&(T.context.allowMouseUpTriggerRef.current=!1)},[T,I,D.type]);const ee=v.useRef(null),q=Hn(),se=Be(He=>{if(!ee.current)return;q.clear(),T.context.allowMouseUpTriggerRef.current=!1;const be=He.target;at(ee.current,be)||at(T.select("positionerElement"),be)||be===ee.current||be!=null&&kv(be)===T.select("rootId")||IO(He,ee.current)||G.events.emit("close",{domEvent:He,reason:Vy})});v.useEffect(()=>{const He=Kt(ee.current);if(I&&T.select("lastOpenChangeReason")===qn)return He.addEventListener("mouseup",se,{once:!0}),()=>{He.removeEventListener("mouseup",se)}},[I,se,T]);const N=L&&D.context.hasSubmenuOpen,W=XE(A,{enabled:(g??N)&&!K&&(!L||N&&!_),handleClose:JE({blockPointerEvents:!L}),mouseOnly:!0,move:!1,restMs:D.type===void 0?y:void 0,delay:{close:h},triggerElementRef:k,externalTree:G,isActiveTrigger:M,isClosing:()=>T.select("transitionStatus")==="ending"}),re=$_(I,T.select("lastOpenChangeReason")),Re=LE(A,{enabled:!K,event:I&&L?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:D.type===void 0?re:!1}),le=GE(A,{enabled:!K&&N}),me=K_({open:I,enabled:L,mouseDownAction:"open"}),ge=v.useMemo(()=>Pr(le.reference,Re.reference),[le.reference,Re.reference]),ce=T.useState("triggerProps",_),Te=T.useState("filterTriggerProps"),{handlePreFocusGuardFocus:ve,handleFocusTargetFocus:Pe}=Y_(T,k),Me={disabled:K,open:I},Le=[ee,a,X,U,k],Fe=[ge,W??Gt,ce,{"aria-haspopup":"menu","aria-controls":j,id:O,onMouseDown:He=>{if(T.select("open"))return;q.start(200,()=>{T.context.allowMouseUpTriggerRef.current=!0}),Kt(He.currentTarget).addEventListener("mouseup",se,{once:!0})}},Te,L?{role:"menuitem"}:{},me,w,V],Oe=Mt("button",n,{enabled:!L,stateAttributesMapping:rh,state:Me,ref:Le,props:Fe});return L?S.jsx(jO,{tag:"button",render:o,className:s,style:u,state:Me,refs:Le,props:Fe,stateAttributesMapping:rh}):I?S.jsxs(v.Fragment,{children:[S.jsx(jl,{ref:T.context.beforeTriggerFocusGuardRef,onFocus:ve},`${O}-pre-focus-guard`),S.jsx(v.Fragment,{children:Oe},O),S.jsx(jl,{ref:T.context.triggerFocusTargetRef,onFocus:Pe},`${O}-post-focus-guard`)]}):S.jsx(v.Fragment,{children:Oe},O)});function $_(e,n){const a=Hn(),[o,s]=v.useState(!1);return _e(()=>{e&&n===qn?(s(!0),a.start(TE,()=>{s(!1)})):e||(a.clear(),s(!1))},[e,n,a]),o}function X_(){const e=MO();return v.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}const kO=v.forwardRef(function(n,a){const{className:o,render:s,orientation:u="horizontal",style:c,...d}=n;return Mt("div",n,{state:{orientation:u},ref:a,props:[{role:"separator","aria-orientation":u},d]})});function PO(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Sh(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function Q_(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function LO(e){return Q_(e?.[0])}function Z_(e){return LO(e)?e.flatMap(n=>n.items):e}function J_(e){if(!Array.isArray(e))return e!=null&&"null"in e;const n=e;if(LO(n)){for(const a of n)for(const o of a.items)if(o&&o.value==null&&o.label!=null)return!0;return!1}for(const a of n)if(a&&a.value==null&&a.label!=null)return!0;return!1}function zO(e,n){if(n&&e!=null)return n(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Sh(e)}function vl(e,n){return n&&e!=null?n(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Sh(e.value):Sh(e)}function _O(e,n,a){function o(){return zO(e,a)}if(a&&e!=null)return a(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(n&&!Array.isArray(n))return(Object.hasOwn(n,e)?n[e]:void 0)??o();if(Array.isArray(n)){const u=Z_(n);if(e==null||typeof e!="object"){const c=u.find(d=>d.value===e);return c&&c.label!=null?c.label:o()}if("value"in e){const c=u.find(d=>d&&d.value===e.value);if(c&&c.label!=null)return c.label}}return o()}function W_(e,n,a){return e.reduce((o,s,u)=>(u>0&&o.push(", "),o.push(S.jsx(v.Fragment,{children:_O(s,n,a)},u)),o),[])}function Pv({...e}){return S.jsx(NO,{"data-slot":"dropdown-menu",...e})}function Lv({...e}){return S.jsx(G_,{"data-slot":"dropdown-menu-trigger",...e})}function zv({align:e="start",alignOffset:n=0,side:a="bottom",sideOffset:o=4,className:s,...u}){return S.jsx(SO,{children:S.jsx(CO,{className:"isolate z-50 outline-none",align:e,alignOffset:n,side:a,sideOffset:o,children:S.jsx(bO,{"data-slot":"dropdown-menu-content",className:Qe("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",s),...u})})})}function wh({...e}){return S.jsx(Wz,{"data-slot":"dropdown-menu-group",...e})}function _v({className:e,inset:n,...a}){return S.jsx(e_,{"data-slot":"dropdown-menu-label","data-inset":n,className:Qe("px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5",e),...a})}function xy({className:e,inset:n,variant:a="default",...o}){return S.jsx(yO,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":a,className:Qe("group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",e),...o})}function e6({...e}){return S.jsx(M_,{"data-slot":"dropdown-menu-radio-group",...e})}function t6({className:e,children:n,inset:a,...o}){return S.jsxs(N_,{"data-slot":"dropdown-menu-radio-item","data-inset":a,className:Qe("relative flex min-h-7 cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",e),...o,children:[S.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:S.jsx(I_,{children:S.jsx(dp,{})})}),n]})}function n6({className:e,...n}){return S.jsx(kO,{"data-slot":"dropdown-menu-separator",className:Qe("-mx-1 my-1 h-px bg-border/50",e),...n})}function r6({className:e,...n}){return S.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:Qe("ml-auto text-[0.625rem] tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",e),...n})}function HO(e){return Mt(e.defaultTagName??"div",e,e)}function UO(e){var n,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(a=UO(e[n]))&&(o&&(o+=" "),o+=a)}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function a6(){for(var e,n,a=0,o="",s=arguments.length;a<s;a++)(e=arguments[a])&&(n=UO(e))&&(o&&(o+=" "),o+=n);return o}const rR=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,aR=a6,Tp=(e,n)=>a=>{var o;if(n?.variants==null)return aR(e,a?.class,a?.className);const{variants:s,defaultVariants:u}=n,c=Object.keys(s).map(g=>{const y=a?.[g],h=u?.[g];if(y===null)return null;const b=rR(y)||rR(h);return s[g][b]}),d=a&&Object.entries(a).reduce((g,y)=>{let[h,b]=y;return b===void 0||(g[h]=b),g},{}),p=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((g,y)=>{let{class:h,className:b,...x}=y;return Object.entries(x).every(w=>{let[C,R]=w;return Array.isArray(R)?R.includes({...u,...d}[C]):{...u,...d}[C]===R})?[...g,h,b]:g},[]);return aR(e,c,p,a?.class,a?.className)},P0=768;function o6(){const[e,n]=v.useState(void 0);return v.useEffect(()=>{const a=window.matchMedia(`(max-width: ${P0-1}px)`),o=()=>{n(window.innerWidth<P0)};return a.addEventListener("change",o),n(window.innerWidth<P0),()=>a.removeEventListener("change",o)},[]),!!e}const i6=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u=!1,focusableWhenDisabled:c=!1,nativeButton:d=!0,style:p,...g}=n,{getButtonProps:y,buttonRef:h}=mo({disabled:u,focusableWhenDisabled:c,native:d});return Mt("button",n,{state:{disabled:u},ref:[a,h],props:[g,y]})}),s6=Tp("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function nn({className:e,variant:n="default",size:a="default",...o}){return S.jsx(i6,{"data-slot":"button",className:Qe(s6({variant:n,size:a,className:e})),...o})}const l6="data-valid",u6="data-invalid",c6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},d6={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},f6={disabled:!1,...d6},Yl={valid(e){return e===null?null:e?{[l6]:""}:{[u6]:""}}},h6={invalid:void 0,name:void 0,validityData:{state:c6,errors:[],error:"",value:"",initialValue:null},setValidityData:Sn,disabled:void 0,setTouched:Sn,setDirty:Sn,setFilled:Sn,setFocused:Sn,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:f6,registerFieldControl:Sn,validation:{getValidationProps:(e,n=Gt)=>n,inputRef:{current:null},registeredInputs:new Map,registerInput:Sn,getInputControl:()=>null,commit:async()=>{},change:Sn}},p6=v.createContext(h6);function qo(e=!0){const n=v.useContext(p6);if(n.setValidityData===Sn&&!e)throw new Error(Rn(28));return n}const g6=v.createContext(void 0);function m6(e=!1){const n=v.useContext(g6);if(!n&&!e)throw new Error(Rn(86));return n}const y6=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Sn,validationMode:"onSubmit",submitCountRef:{current:0}});function Vc(){return v.useContext(y6)}const v6=v.createContext({controlId:void 0,registerControlId:Sn,resetControlId:Sn,labelId:void 0,setLabelId:Sn,messageIds:[],setMessageIds:Sn,getDescriptionProps:e=>e});function Cs(){return v.useContext(v6)}function Hv(e,n,a,o=!0,s,u){const[c,d]=v.useState(),p=Tr(s?`${s}-label`:void 0),g=!!u?.trim(),h=e??(g?void 0:n)??c;return _e(()=>{const b=e||n||g||!o?void 0:b6(a.current,p);c!==b&&d(b)}),h}function b6(e,n){const a=x6(e);if(a)return!a.id&&n&&(a.id=n),a.id||void 0}function x6(e){if(!e)return;const n=e.parentElement;if(n&&n.tagName==="LABEL")return n;const a=e.id;if(a){const s=e.nextElementSibling;if(s&&s.htmlFor===a)return s}const o=e.labels;return o&&o[0]}function Kl(e={}){const{id:n,enabled:a=!0}=e,{controlId:o,registerControlId:s,resetControlId:u}=Cs(),c=Tr(),d=er(()=>Symbol()),p=v.useRef(!1),g=v.useRef(!1),y=Be(()=>{!p.current||s===Sn||(p.current=!1,s(d.current,void 0))});return _e(()=>{if(!a||s===Sn){y();return}let h;if(n!==void 0)g.current=!0,h=n;else if(g.current)h=c;else{u();return}if(h===void 0){y();return}p.current=!0,s(d.current,h)},[n,a,s,u,c,d,y]),_e(()=>y,[y]),(a?o:void 0)??n??c}function S6(e,n){return e.matches(":disabled")?!1:!n||e.form===n?!0:e.form===null&&!e.hasAttribute("form")}const w6=v.createContext({disabled:!1});function FO(){return v.useContext(w6)}function qc(e,n,a){const{setFocused:o,focusOwnerRef:s}=qo(),u=Be(c=>{(c?!e:s.current===u)&&(s.current=c&&u,o(c))});return _e(()=>{const c=n.current;return c?.getRootNode()?.activeElement===c&&u(!0),()=>u(!1)},[e,n,u]),u}function Yc(e,n,a,o,s=!0,u){const{registerFieldControl:c}=qo(),d=er(()=>Symbol());_e(()=>{const p=d.current;if(!s){c(p,void 0);return}c(p,{controlRef:e,getValue:o,id:n,name:u,value:a})},[e,s,o,n,u,c,d,a]),_e(()=>{const p=d.current;return()=>{c(p,void 0)}},[c,d])}const R6=v.forwardRef(function(n,a){const{render:o,className:s,id:u,name:c,value:d,disabled:p=!1,onValueChange:g,defaultValue:y,autoFocus:h=!1,style:b,...x}=n,{state:w,name:C,disabled:R,setTouched:T,setDirty:O,validityData:M,setFilled:A,validationMode:I,validation:j}=qo(),{clearErrors:k,elementRef:D,submitCountRef:z}=Vc(),F=R||p,G=C??c,J={...w,disabled:F},{labelId:Y}=Cs(),U=Kl({id:u}),_=d!==void 0,L=d==null?void 0:String(d),$=Be(()=>j.inputRef.current?.value);Yc(j.inputRef,U,L,$,!F,c),_e(()=>{const q=L??j.inputRef.current?.value;q!==void 0&&A(q!=="")},[L,y,j.inputRef,A]),ql(L,()=>{L!==void 0&&(k(G),O(L!==(M.initialValue??"")),j.change(L))});const K=v.useRef(null),V=qc(F,K),X=Hn();return Mt("input",n,{ref:[a,K],state:J,props:[{id:U,disabled:F,name:G,ref:j.inputRef,"aria-labelledby":Y,autoFocus:h,..._?{value:d}:{defaultValue:y},onChange(q){const se=q.currentTarget.value,N=dt(zr,q.nativeEvent);g?.(se,N),!_&&(O(se!==(M.initialValue??"")),A(se!==""),!q.nativeEvent.defaultPrevented&&!N.isCanceled&&(k(G),j.change(se)))},onFocus(){V(!0)},onBlur(q){if(T(!0),V(!1),I==="onBlur"){const se=q.currentTarget.value;j.commit(se),_&&queueMicrotask(()=>{const N=j.inputRef.current?.value;N!==void 0&&N!==se&&N!==(M.initialValue??"")&&j.commit(N)})}},onKeyDown(q){if(q.currentTarget.tagName==="INPUT"&&q.key==="Enter"){T(!0);const se=q.currentTarget.value,N=q.currentTarget.form;if(N&&N===D.current&&!q.defaultPrevented){const B=q.currentTarget,W=z.current;X.start(0,()=>{z.current===W&&j.commit(B.value)})}else j.commit(se)}}},x,q=>j.getValidationProps(F,q)],stateAttributesMapping:Yl})}),E6=v.forwardRef(function(n,a){return S.jsx(R6,{ref:a,...n})});function BO({className:e,type:n,...a}){return S.jsx(E6,{type:n,"data-slot":"input",className:Qe("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a})}function VO({className:e,orientation:n="horizontal",...a}){return S.jsx(kO,{"data-slot":"separator",orientation:n,className:Qe("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...a})}const qO=v.createContext(void 0);function Ts(e){const n=v.useContext(qO);if(!e&&n===void 0)throw new Error(Rn(27));return n}const YO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,forceRender:c=!1,...d}=n,p=Ts(),g=p.useState("open"),y=p.useState("nested"),h=p.useState("mounted"),b=p.useState("transitionStatus");return Mt("div",n,{state:{open:g,transitionStatus:b},ref:[p.context.backdropRef,a],stateAttributesMapping:Fh,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:c||!y})}),Op=v.forwardRef(function(n,a){const{render:o,className:s,style:u,disabled:c=!1,nativeButton:d=!0,...p}=n,g=Ts(),y=g.useState("open"),{getButtonProps:h,buttonRef:b}=mo({disabled:c,native:d}),x={disabled:c};function w(C){y&&g.setOpen(!1,dt(eE,C.nativeEvent))}return Mt("button",n,{state:x,ref:[a,b],props:[{onClick:w},p,h]})}),KO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=Ts(),g=Tr(c);return p.useSyncedValueWithCleanup("descriptionElementId",g),Mt("p",n,{ref:a,props:[{id:g},d]})}),GO=v.createContext(void 0);function C6(){const e=v.useContext(GO);if(e===void 0)throw new Error(Rn(26));return e}const T6="--nested-dialogs",O6="data-nested-dialog-open",M6={...Mc,...po,nestedDialogOpen(e){return e?{[O6]:""}:null}},$O=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,initialFocus:d,...p}=n,g=Ts(),y=g.useState("descriptionElementId"),h=g.useState("disablePointerDismissal"),b=g.useState("floatingRootContext"),x=g.useState("popupProps"),w=g.useState("modal"),C=g.useState("mounted"),R=g.useState("nested"),T=g.useState("nestedOpenDialogCount"),O=g.useState("open"),M=g.useState("openMethod"),A=g.useState("titleElementId"),I=g.useState("transitionStatus"),j=g.useState("role"),k=b.useState("floatingId");C6(),Ia({open:O,ref:g.context.popupRef,onComplete(){O&&g.context.onOpenChangeComplete?.(!0)}});const D=d===void 0?HE(g.context.popupRef):d,z=T>0,F=g.useStateSetter("popupElement"),J=Mt("div",n,{state:{open:O,nested:R,transitionStatus:I,nestedDialogOpen:z},props:[x,{id:k,"aria-labelledby":A,"aria-describedby":y,role:j,...kc,hidden:!C,onKeyDown(Y){Bc.has(Y.key)&&Y.stopPropagation()},style:{[T6]:T}},p],ref:[a,g.context.popupRef,F],stateAttributesMapping:M6});return S.jsx($h,{context:b,openInteractionType:M,disabled:!C,closeOnFocusOut:!h,initialFocus:D,returnFocus:c,modal:w!==!1,restoreFocus:"popup",children:J})}),XO=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n,u=Ts(),c=u.useState("mounted"),d=u.useState("modal"),p=u.useState("open");return c||o?S.jsx(GO.Provider,{value:o,children:S.jsxs(Gh,{ref:a,...s,children:[c&&d===!0&&S.jsx(Ep,{ref:u.context.internalBackdropRef,inert:up(!p)}),n.children]})}):null});function A6({store:e,parentContext:n,isDrawer:a}){const o=e.useState("open"),s=e.useState("mounted"),u=e.useState("disablePointerDismissal"),c=e.useState("modal"),d=e.useState("popupElement"),p=e.useState("floatingRootContext"),[g,y]=v.useState(0),[h,b]=v.useState(0),x=g===0,w=jc(p,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(C){if(!e.context.outsidePressEnabledRef.current||"button"in C&&C.button!==0)return!1;if("touches"in C){if(C.type==="touchend"){if(C.changedTouches.length!==1||C.touches.length!==0)return!1}else if(C.touches.length!==1)return!1}const R=tr(C);if(x&&!u){if(c){const T=e.context.internalBackdropRef.current,O=e.context.backdropRef.current;return T||O?T===R||O===R||at(R,d)&&!R?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:x});return EO(o&&c===!0,d),e.useContextCallback("onNestedDialogOpen",(C,R)=>{!e.select("open")&&!e.select("mounted")||(y(C),b(R))}),_e(()=>{!o&&!s&&(y(0),b(0))},[o,s]),_e(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(g+1,h+(a?1:0)),()=>{n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(0,0)}),[a,o,g,h,n]),tp(e,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:g,nestedOpenDrawerCount:h}),null}const D6={...Po,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class N6 extends Ul{constructor(n,a,o){const s=new Pc,u=I6(n,s,a,o);super(u,j6(s),D6)}setOpen=(n,a)=>{a.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&a.trigger==null&&this.state.activeTriggerId!=null&&(a.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(n,a),!a.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(n,a),this.update(Zh(this.state,n,a.trigger)))}}function I6(e,n,a,o=!1){return{...rp(n,a,o),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function j6(e){return{popupRef:v.createRef(),backdropRef:v.createRef(),internalBackdropRef:v.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function k6(e,n){const{children:a,open:o,defaultOpen:s=!1,onOpenChange:u,onOpenChangeComplete:c,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:g,handle:y,triggerId:h,defaultTriggerId:b=null}=n,x=e==="drawer",w=p,C=d,R="dialog",T=Ts(!0),O=T!=null,M={modal:w,disablePointerDismissal:C,nested:O,role:R},A=nv((F,G)=>new N6({open:s,openProp:o,activeTriggerId:b,triggerIdProp:h,...M},F,G),!0);A.useControlledProp("openProp",o),A.useControlledProp("triggerIdProp",h),A.useSyncedValues(M),A.useContextCallback("onOpenChange",u),A.useContextCallback("onOpenChangeComplete",c);const I=A.useState("open"),j=A.useState("mounted"),k=A.useState("payload");FE(A,I),Wh(A);const{forceUnmount:D}=ep(I,A);v.useImperativeHandle(g,()=>({unmount:D,close:()=>A.setOpen(!1,dt(Nc))}),[D,A]);const z=I||j||y!=null;return S.jsxs(qO.Provider,{value:A,children:[y&&S.jsx(Qh,{handle:y,store:A}),z&&S.jsx(A6,{store:A,parentContext:T?.context,isDrawer:x}),typeof a=="function"?a({payload:k}):a]})}const QO=Cc(function(n){return k6("dialog",n)}),ZO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=Ts(),g=Tr(c);return p.useSyncedValueWithCleanup("titleElementId",g),Mt("h2",n,{ref:a,props:[{id:g},d]})}),Rt=e=>typeof e=="string",Qu=()=>{let e,n;const a=new Promise((o,s)=>{e=o,n=s});return a.resolve=e,a.reject=n,a},Lf=e=>e==null?"":String(e),P6=(e,n,a)=>{e.forEach(o=>{n[o]&&(a[o]=n[o])})},L6=/###/g,oR=e=>e&&e.includes("###")?e.replace(L6,"."):e,iR=e=>!e||Rt(e),ic=(e,n,a)=>{const o=Rt(n)?n.split("."):n;let s=0;for(;s<o.length-1;){if(iR(e))return{};const u=oR(o[s]);!e[u]&&a&&(e[u]=new a),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++s}return iR(e)?{}:{obj:e,k:oR(o[s])}},sR=(e,n,a)=>{const{obj:o,k:s}=ic(e,n,Object);if(o!==void 0||n.length===1){o[s]=a;return}let u=n[n.length-1],c=n.slice(0,n.length-1),d=ic(e,c,Object);for(;d.obj===void 0&&c.length;)u=`${c[c.length-1]}.${u}`,c=c.slice(0,c.length-1),d=ic(e,c,Object),d?.obj&&typeof d.obj[`${d.k}.${u}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${u}`]=a},z6=(e,n,a,o)=>{const{obj:s,k:u}=ic(e,n,Object);s[u]=s[u]||[],s[u].push(a)},Rh=(e,n)=>{const{obj:a,k:o}=ic(e,n);if(a&&Object.prototype.hasOwnProperty.call(a,o))return a[o]},_6=(e,n,a)=>{const o=Rh(e,a);return o!==void 0?o:Rh(n,a)},JO=(e,n,a)=>{for(const o in n)o!=="__proto__"&&o!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,o)?Rt(e[o])||e[o]instanceof String||Rt(n[o])||n[o]instanceof String?a&&(e[o]=n[o]):JO(e[o],n[o],a):e[o]=n[o]);return e},jo=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),H6={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},U6=e=>Rt(e)?e.replace(/[&<>"'\/]/g,n=>H6[n]):e;class F6{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const a=this.regExpMap.get(n);if(a!==void 0)return a;const o=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,o),this.regExpQueue.push(n),o}}const B6=[" ",",","?","!",";"],V6=new F6(20),q6=(e,n,a)=>{n=n||"",a=a||"";const o=B6.filter(c=>!n.includes(c)&&!a.includes(c));if(o.length===0)return!0;const s=V6.getRegExp(`(${o.map(c=>c==="?"?"\\?":c).join("|")})`);let u=!s.test(e);if(!u){const c=e.indexOf(a);c>0&&!s.test(e.substring(0,c))&&(u=!0)}return u},Sy=(e,n,a=".")=>{if(!e)return;if(e[n])return Object.prototype.hasOwnProperty.call(e,n)?e[n]:void 0;const o=n.split(a);let s=e;for(let u=0;u<o.length;){if(!s||typeof s!="object")return;let c,d="";for(let p=u;p<o.length;++p)if(p!==u&&(d+=a),d+=o[p],c=s[d],(typeof c=="function"||d==="__proto__")&&!Object.prototype.hasOwnProperty.call(s,d)&&(c=void 0),c!==void 0){if(["string","number","boolean"].includes(typeof c)&&p<o.length-1)continue;u+=p-u+1;break}s=c}return s},zl=e=>e?.replace(/_/g,"-"),Y6={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,n){console?.[e]?.apply?.(console,n)}};class Eh{constructor(n,a={}){this.init(n,a)}init(n,a={}){this.prefix=a.prefix||"i18next:",this.logger=n||Y6,this.options=a,this.debug=a.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,a,o,s){return s&&!this.debug?null:(n=n.map(u=>Rt(u)?u.replace(/[\r\n\x00-\x1F\x7F]/g," "):u),Rt(n[0])&&(n[0]=`${o}${this.prefix} ${n[0]}`),this.logger[a](n))}create(n){return new Eh(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new Eh(this.logger,n)}}var lo=new Eh;class Mp{constructor(){this.observers={}}on(n,a){return n.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const s=this.observers[o].get(a)||0;this.observers[o].set(a,s+1)}),this}off(n,a){if(this.observers[n]){if(!a){delete this.observers[n];return}this.observers[n].delete(a)}}once(n,a){const o=(...s)=>{a(...s),this.off(n,o)};return this.on(n,o),this}emit(n,...a){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([s,u])=>{for(let c=0;c<u;c++)s(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,u])=>{for(let c=0;c<u;c++)s(n,...a)})}}const lR=new WeakSet;class uR extends Mp{constructor(n,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=n||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.includes(n)||this.options.ns.push(n)}removeNamespaces(n){const a=this.options.ns.indexOf(n);a>-1&&this.options.ns.splice(a,1)}getResource(n,a,o,s={}){const u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;n.includes(".")?d=n.split("."):(d=[n,a],o&&(Array.isArray(o)?d.push(...o):Rt(o)&&u?d.push(...o.split(u)):d.push(o)));const p=Rh(this.data,d);return p==null&&!a&&!o&&n.includes(".")&&(n=d[0],a=d[1],o=d.slice(2).join(".")),p!=null||!c||!Rt(o)?p:Sy(this.data?.[n]?.[a],o,u)}addResource(n,a,o,s,u={silent:!1}){const c=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let d=[n,a];o&&(d=d.concat(c?o.split(c):o)),n.includes(".")&&(d=n.split("."),s=a,a=d[1]),this.addNamespaces(a),sR(this.data,d,s),u.silent||this.emit("added",n,a,o,s)}addResources(n,a,o,s={silent:!1}){for(const u in o)(Rt(o[u])||Array.isArray(o[u]))&&this.addResource(n,a,u,o[u],{silent:!0});s.silent||this.emit("added",n,a,o)}addResourceBundle(n,a,o,s,u,c={silent:!1,skipCopy:!1}){let d=[n,a];n.includes(".")&&(d=n.split("."),s=o,o=a,a=d[1]),this.addNamespaces(a);let p=Rh(this.data,d)||{};c.skipCopy||(o=JSON.parse(JSON.stringify(o))),s?JO(p,o,u):p={...p,...o},sR(this.data,d,p),c.silent||this.emit("added",n,a,o)}removeResourceBundle(n,a){this.hasResourceBundle(n,a)&&delete this.data[n][a],this.removeNamespaces(a),this.emit("removed",n,a)}hasResourceBundle(n,a){return this.getResource(n,a)!==void 0}getResourceBundle(n,a){return a||(a=this.options.defaultNS),this.getResource(n,a)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const a=this.getDataByLanguage(n);return!!(a&&Object.keys(a)||[]).find(s=>{const u=a[s];return lR.has(u)?!0:!u||Object.keys(u).length===0?!1:(typeof u=="object"&&lR.add(u),!0)})}toJSON(){return this.data}}var WO={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,n,a,o,s){return e.forEach(u=>{n=this.processors[u]?.process(n,a,o,s)??n}),n}};const eM=Symbol("i18next/PATH_KEY");function K6(){const e=[],n=Object.create(null);let a;return n.get=(o,s)=>(a?.revoke?.(),s===eM?e:(e.push(s),a=Proxy.revocable(o,n),a.proxy)),Proxy.revocable(Object.create(null),n).proxy}function ps(e,n){const{[eM]:a}=e(K6()),o=n?.keySeparator??".",s=n?.nsSeparator??":",u=n?.enableSelector==="strict";if(a.length>1&&s){const c=n?.ns,d=u?Array.isArray(c)?c:c?[c]:null:Array.isArray(c)?c:null;if(d&&(u?d:d.length>1?d.slice(1):[]).includes(a[0]))return`${a[0]}${s}${a.slice(1).join(o)}`}return a.join(o)}const L0=e=>!Rt(e)&&typeof e!="boolean"&&typeof e!="number";class Ch extends Mp{constructor(n,a={}){super(),P6(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=lo.create("translator"),this.checkedLoadedFor={}}changeLanguage(n){n&&(this.language=n)}exists(n,a={interpolation:{}}){const o={...a};if(n==null)return!1;const s=this.resolve(n,o);if(s?.res===void 0)return!1;const u=L0(s.res);return!(o.returnObjects===!1&&u)}extractFromKey(n,a){let o=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let u=a.ns||this.options.defaultNS||[];const c=o&&n.includes(o),d=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!q6(n,o,s);if(c&&!d){const p=n.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:n,namespaces:Rt(u)?[u]:u};const g=n.split(o);(o!==s||o===s&&this.options.ns.includes(g[0]))&&(u=g.shift()),n=g.join(s)}return{key:n,namespaces:Rt(u)?[u]:u}}translate(n,a,o){let s=typeof a=="object"?{...a}:a;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),n==null)return"";typeof n=="function"&&(n=ps(n,{...this.options,...s})),Array.isArray(n)||(n=[String(n)]),n=n.map(Y=>typeof Y=="function"?ps(Y,{...this.options,...s}):String(Y));const u=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:d,namespaces:p}=this.extractFromKey(n[n.length-1],s),g=p[p.length-1];let y=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const h=s.lng||this.language,b=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return b?u?{res:`${g}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:`${g}${y}${d}`:u?{res:d,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:d;const x=this.resolve(n,s);let w=x?.res;const C=x?.usedKey||d,R=x?.exactUsedKey||d,T=["[object Number]","[object Function]","[object RegExp]"],O=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,A=s.count!==void 0&&!Rt(s.count),I=Ch.hasDefaultValue(s),j=A?this.pluralResolver.getSuffix(h,s.count,s):"",k=s.ordinal&&A?this.pluralResolver.getSuffix(h,s.count,{ordinal:!1}):"",D=A&&!s.ordinal&&s.count===0,z=D&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${j}`]||s[`defaultValue${k}`]||s.defaultValue;let F=w;M&&!w&&I&&(F=z);const G=L0(F),J=Object.prototype.toString.apply(F);if(M&&F&&G&&!T.includes(J)&&!(Rt(O)&&Array.isArray(F))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,F,{...s,ns:p}):`key '${d} (${this.language})' returned an object instead of string.`;return u?(x.res=Y,x.usedParams=this.getUsedParamsDetails(s),x):Y}if(c){const Y=Array.isArray(F),U=Y?[]:{},_=Y?R:C;for(const L in F)if(Object.prototype.hasOwnProperty.call(F,L)){const $=`${_}${c}${L}`;I&&!w?U[L]=this.translate($,{...s,defaultValue:L0(z)?z[L]:void 0,joinArrays:!1,ns:p}):U[L]=this.translate($,{...s,joinArrays:!1,ns:p}),U[L]===$&&(U[L]=F[L])}w=U}}else if(M&&Rt(O)&&Array.isArray(w))w=w.join(O),w&&(w=this.extendTranslation(w,n,s,x,o));else{let Y=!1,U=!1;!this.isValidLookup(w)&&I&&(Y=!0,w=z),this.isValidLookup(w)||(U=!0,w=d);const L=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&U?void 0:w,$=I&&z!==w&&this.options.updateMissing;if(U||Y||$){if(this.logger.log($?"updateKey":"missingKey",h,g,A&&!$?`${d}${this.pluralResolver.getSuffix(h,s.count,s)}`:d,$?z:w),c){const ee=this.resolve(d,{...s,keySeparator:!1});ee&&ee.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let K=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let ee=0;ee<V.length;ee++)K.push(V[ee]);else this.options.saveMissingTo==="all"?K=this.languageUtils.toResolveHierarchy(s.lng||this.language):K.push(s.lng||this.language);const X=(ee,q,se)=>{const N=I&&se!==w?se:L;this.options.missingKeyHandler?this.options.missingKeyHandler(ee,g,q,N,$,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ee,g,q,N,$,s),this.emit("missingKey",ee,g,q,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?K.forEach(ee=>{const q=this.pluralResolver.getSuffixes(ee,s);D&&s[`defaultValue${this.options.pluralSeparator}zero`]&&!q.includes(`${this.options.pluralSeparator}zero`)&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(se=>{X([ee],d+se,s[`defaultValue${se}`]||z)})}):X(K,d,z))}w=this.extendTranslation(w,n,s,x,o),U&&w===d&&this.options.appendNamespaceToMissingKey&&(w=`${g}${y}${d}`),(U||Y)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${y}${d}`:d,Y?w:void 0,s))}return u?(x.res=w,x.usedParams=this.getUsedParamsDetails(s),x):w}extendTranslation(n,a,o,s,u){if(this.i18nFormat?.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const p=Rt(n)&&(o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(p){const h=n.match(this.interpolator.nestingRegexp);g=h&&h.length}let y=o.replace&&!Rt(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),n=this.interpolator.interpolate(n,y,o.lng||this.language||s.usedLng,o),p){const h=n.match(this.interpolator.nestingRegexp),b=h&&h.length;g<b&&(o.nest=!1)}!o.lng&&s&&s.res&&(o.lng=this.language||s.usedLng),o.nest!==!1&&(n=this.interpolator.nest(n,(...h)=>u?.[0]===h[0]&&!o.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${a[0]}`),null):this.translate(...h,a),o)),o.interpolation&&this.interpolator.reset()}const c=o.postProcess||this.options.postProcess,d=Rt(c)?[c]:c;return n!=null&&d?.length&&o.applyPostProcessor!==!1&&(n=WO.handle(d,n,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),n}resolve(n,a={}){let o,s,u,c,d;return Rt(n)&&(n=[n]),Array.isArray(n)&&(n=n.map(p=>typeof p=="function"?ps(p,{...this.options,...a}):p)),n.forEach(p=>{if(this.isValidLookup(o))return;const g=this.extractFromKey(p,a),y=g.key;s=y;let h=g.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const b=a.count!==void 0&&!Rt(a.count),x=b&&!a.ordinal&&a.count===0,w=a.context!==void 0&&(Rt(a.context)||typeof a.context=="number")&&a.context!=="",C=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);h.forEach(R=>{this.isValidLookup(o)||(d=R,!this.checkedLoadedFor[`${C[0]}-${R}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(this.checkedLoadedFor[`${C[0]}-${R}`]=!0,this.logger.warn(`key "${s}" for languages "${C.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(T=>{if(this.isValidLookup(o))return;c=T;const O=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(O,y,T,R,a);else{let A;b&&(A=this.pluralResolver.getSuffix(T,a.count,a));const I=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(a.ordinal&&A.startsWith(j)&&O.push(y+A.replace(j,this.options.pluralSeparator)),O.push(y+A),x&&O.push(y+I)),w){const k=`${y}${this.options.contextSeparator||"_"}${a.context}`;O.push(k),b&&(a.ordinal&&A.startsWith(j)&&O.push(k+A.replace(j,this.options.pluralSeparator)),O.push(k+A),x&&O.push(k+I))}}let M;for(;M=O.pop();)this.isValidLookup(o)||(u=M,o=this.getResource(T,R,M,a))}))})}),{res:o,usedKey:s,exactUsedKey:u,usedLng:c,usedNS:d}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,a,o,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(n,a,o,s):this.resourceStore.getResource(n,a,o,s)}getUsedParamsDetails(n={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=n.replace&&!Rt(n.replace);let s=o?n.replace:n;if(o&&typeof n.count<"u"&&(s={...s,count:n.count}),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!o){s={...s};for(const u of a)delete s[u]}return s}static hasDefaultValue(n){const a="defaultValue";for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&o.startsWith(a)&&n[o]!==void 0)return!0;return!1}}class cR{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=lo.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(n){if(n=zl(n),!n||!n.includes("-"))return null;const a=n.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(n){if(n=zl(n),!n||!n.includes("-"))return n;const a=n.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(n){if(Rt(n)&&n.includes("-")){let a;try{a=Intl.getCanonicalLocales(n)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(n)}getBestMatchFromCodes(n){if(!n)return null;let a;return n.forEach(o=>{if(a)return;const s=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(s))&&(a=s)}),!a&&this.options.supportedLngs&&n.forEach(o=>{if(a)return;const s=this.getScriptPartFromCode(o);if(this.isSupportedCode(s))return a=s;const u=this.getLanguagePartFromCode(o);if(this.isSupportedCode(u))return a=u;a=this.options.supportedLngs.find(c=>c===u?!0:!c.includes("-")&&!u.includes("-")?!1:!!(c.includes("-")&&!u.includes("-")&&c.slice(0,c.indexOf("-"))===u))}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(n,a){if(!n)return[];if(typeof n=="function"&&(n=n(a)),Rt(n)&&(n=[n]),Array.isArray(n))return n;if(!a)return n.default||[];let o=n[a];return o||(o=n[this.getScriptPartFromCode(a)]),o||(o=n[this.formatLanguageCode(a)]),o||(o=n[this.getLanguagePartFromCode(a)]),o||(o=n.default),o||[]}toResolveHierarchy(n,a){const o=this.options.fallbackLng,s=Array.isArray(o)?o.join("|"):o;s!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=s);const u=a===void 0||a===!1||Rt(a),c=a===void 0&&typeof this.options.fallbackLng=="function",d=Rt(n)&&u&&!c;let p=null;if(d){let b;a===void 0?b="undefined":a===!1?b="boolean:false":b=`string:${a}`,p=`${n.length}:${n}|${b}`}if(p!==null){const b=this.resolveHierarchyCache[p];if(b!==void 0)return b.slice()}const g=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],n),y=[],h=b=>{b&&(this.isSupportedCode(b)?y.push(b):this.logger.warn(`rejecting language code not found in supportedLngs: ${b}`))};return Rt(n)&&(n.includes("-")||n.includes("_"))?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(n))):Rt(n)&&h(this.formatLanguageCode(n)),g.forEach(b=>{const x=this.formatLanguageCode(b);y.includes(x)||h(x)}),p!==null?(this.resolveHierarchyCache[p]=y,y.slice()):y}}const dR={zero:0,one:1,two:2,few:3,many:4,other:5},fR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class G6{constructor(n,a={}){this.languageUtils=n,this.options=a,this.logger=lo.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(n,a={}){const o=zl(n==="dev"?"en":n),s=a.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:o,type:s});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let c;try{c=new Intl.PluralRules(o,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),fR;if(!n.match(/-|_/))return fR;const p=this.languageUtils.getLanguagePartFromCode(n);c=this.getRule(p,a)}return this.pluralRulesCache[u]=c,c}needsPlural(n,a={}){let o=this.getRule(n,a);return o||(o=this.getRule("dev",a)),o?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(n,a,o={}){return this.getSuffixes(n,o).map(s=>`${a}${s}`)}getSuffixes(n,a={}){let o=this.getRule(n,a);return o||(o=this.getRule("dev",a)),o?o.resolvedOptions().pluralCategories.sort((s,u)=>dR[s]-dR[u]).map(s=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(n,a,o={}){const s=this.getRule(n,o);return s?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${s.select(a)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",a,o))}}const hR=(e,n,a,o=".",s=!0)=>{let u=_6(e,n,a);return!u&&s&&Rt(a)&&(u=Sy(e,a,o),u===void 0&&(u=Sy(n,a,o))),u};class pR{constructor(n={}){this.logger=lo.create("interpolator"),this.options=n,this.format=n?.interpolation?.format||(a=>a),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:a,escapeValue:o,useRawValueToEscape:s,prefix:u,prefixEscaped:c,suffix:d,suffixEscaped:p,formatSeparator:g,unescapeSuffix:y,unescapePrefix:h,nestingPrefix:b,nestingPrefixEscaped:x,nestingSuffix:w,nestingSuffixEscaped:C,nestingOptionsSeparator:R,maxReplaces:T,alwaysFormat:O}=n.interpolation;this.escape=a!==void 0?a:U6,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=u?jo(u):c||"{{",this.suffix=d?jo(d):p||"}}",this.formatSeparator=g||",",this.unescapePrefix=y?"":h?jo(h):"-",this.unescapeSuffix=this.unescapePrefix?"":y?jo(y):"",this.nestingPrefix=b?jo(b):x||jo("$t("),this.nestingSuffix=w?jo(w):C||jo(")"),this.nestingOptionsSeparator=R||",",this.maxReplaces=T||1e3,this.alwaysFormat=O!==void 0?O:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(a,o)=>a?.source===o?(a.lastIndex=0,a):new RegExp(o,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(n,a,o,s){let u,c,d;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=C=>{if(!C.includes(this.formatSeparator)){const M=hR(a,p,C,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(M,void 0,o,{...s,...a,interpolationkey:C}):M}const R=C.split(this.formatSeparator),T=R.shift().trim(),O=R.join(this.formatSeparator).trim();return this.format(hR(a,p,T,this.options.keySeparator,this.options.ignoreJSONStructure),O,o,{...s,...a,interpolationkey:T})};this.resetRegExp(),!this.escapeValue&&typeof n=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(n)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const y=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,b=[{regex:this.regexpUnescape,safeValue:C=>C},{regex:this.regexp,safeValue:C=>this.escapeValue?this.escape(C):C}],x=[];let w=0;return b.forEach(C=>{for(d=0;u=C.regex.exec(n);){const R=u.index-w,T=x.find(([A,I])=>R>=A&&R<I);if(T){C.regex.lastIndex=T[1]+w;continue}const O=u[1].trim();if(c=g(O),c===void 0)if(typeof y=="function"){const A=y(n,u,s);c=Rt(A)?A:""}else if(s&&Object.prototype.hasOwnProperty.call(s,O))c="";else if(h){c=u[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${n}`),c="";else!Rt(c)&&!this.useRawValueToEscape&&(c=Lf(c));const M=Lf(C.safeValue(c));if(n=n.slice(0,u.index)+M+n.slice(u.index+u[0].length),h?(C.regex===this.regexpUnescape?x.push([u.index,u.index+M.length]):w+=M.length-u[0].length,C.regex.lastIndex+=M.length,C.regex.lastIndex-=u[0].length):C.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),n}nest(n,a,o={}){let s,u,c;const d=(h,b)=>{const x=this.nestingOptionsSeparator;if(!h.includes(x))return h;const w=h.split(new RegExp(`${jo(x)}[ ]*{`));let C=`{${w[1]}`;h=w[0],C=this.interpolate(C,c);const R=C.match(/'/g),T=C.match(/"/g);((R?.length??0)%2===0&&!T||(T?.length??0)%2!==0)&&(C=C.replace(/'/g,'"'));try{c=JSON.parse(C),b&&(c={...b,...c})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,O),`${h}${x}${C}`}return c.defaultValue&&c.defaultValue.includes(this.prefix)&&delete c.defaultValue,h},p=new RegExp(this.nestingRegexp);let g="",y=0;for(;s=p.exec(n);){let h=[];c={...o},c=c.replace&&!Rt(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const b=/{.*}/s.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(b!==-1&&(h=s[1].slice(b).split(this.formatSeparator).map(x=>x.trim()).filter(Boolean),s[1]=s[1].slice(0,b)),u=a(d.call(this,s[1].trim(),c),c),u&&s[0]===n&&!Rt(u))return u;Rt(u)||(u=Lf(u)),u||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${n}`),u=""),h.length&&(u=h.reduce((x,w)=>this.format(x,w,o.lng,{...o,interpolationkey:s[1].trim()}),u.trim())),g+=n.slice(y,s.index)+Lf(u),y=p.lastIndex,this.regexp.lastIndex=0}return y?g+n.slice(y):n}}const $6=e=>{let n=e.toLowerCase().trim();const a={};if(e.includes("(")){const o=e.split("(");n=o[0].toLowerCase().trim();const s=o[1].slice(0,-1);n==="currency"&&!s.includes(":")?a.currency||(a.currency=s.trim()):n==="relativetime"&&!s.includes(":")?a.range||(a.range=s.trim()):s.split(";").forEach(c=>{if(c){const[d,...p]=c.split(":"),g=p.join(":").trim().replace(/^'+|'+$/g,""),y=d.trim();a[y]||(a[y]=g),g==="false"&&(a[y]=!1),g==="true"&&(a[y]=!0),isNaN(g)||(a[y]=parseInt(g,10))}})}return{formatName:n,formatOptions:a}},gR=e=>{const n={};return(a,o,s)=>{let u=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(u={...u,[s.interpolationkey]:void 0});let c;try{c=o+JSON.stringify(u)}catch{return e(zl(o),s)(a)}let d=n[c];return d||(d=e(zl(o),s),n[c]=d),d(a)}},X6=e=>(n,a,o)=>e(zl(a),o)(n);class Q6{constructor(n={}){this.logger=lo.create("formatter"),this.options=n,this.init(n)}init(n,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const o=a.cacheInBuiltFormats?gR:X6;this.formats={number:o((s,u)=>{const c=new Intl.NumberFormat(s,{...u});return d=>c.format(d)}),currency:o((s,u)=>{const c=new Intl.NumberFormat(s,{...u,style:"currency"});return d=>c.format(d)}),datetime:o((s,u)=>{const c=new Intl.DateTimeFormat(s,{...u});return d=>c.format(d)}),relativetime:o((s,u)=>{const c=new Intl.RelativeTimeFormat(s,{...u});return d=>c.format(d,u.range||"day")}),list:o((s,u)=>{const c=new Intl.ListFormat(s,{...u});return d=>c.format(d)})}}add(n,a){this.formats[n.toLowerCase().trim()]=a}addCached(n,a){this.formats[n.toLowerCase().trim()]=gR(a)}format(n,a,o,s={}){if(!a||n==null)return n;const u=a.split(this.formatSeparator),c=[];for(let p=0;p<u.length;p++){let g=u[p];for(;g.indexOf("(")>-1&&!g.includes(")")&&p+1<u.length;)g=`${g}${this.formatSeparator}${u[++p]}`;c.push(g)}return c.reduce((p,g)=>{const{formatName:y,formatOptions:h}=$6(g);if(this.formats[y]){let b=p;try{const x=s?.formatParams?.[s.interpolationkey]||{},w=x.locale||x.lng||s.locale||s.lng||o;b=this.formats[y](p,w,{...h,...s,...x})}catch(x){this.logger.warn(x)}return b}else this.logger.warn(`there was no format function for ${y}`);return p},n)}}const Z6=(e,n)=>{e.pending[n]!==void 0&&(delete e.pending[n],e.pendingCount--)};class J6 extends Mp{constructor(n,a,o,s={}){super(),this.backend=n,this.store=a,this.services=o,this.languageUtils=o.languageUtils,this.options=s,this.logger=lo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(o,s.backend,s)}queueLoad(n,a,o,s){const u={},c={},d={},p={};return n.forEach(g=>{let y=!0;a.forEach(h=>{const b=`${g}|${h}`;!o.reload&&this.store.hasResourceBundle(g,h)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?c[b]===void 0&&(c[b]=!0):(this.state[b]=1,y=!1,c[b]===void 0&&(c[b]=!0),u[b]===void 0&&(u[b]=!0),p[h]===void 0&&(p[h]=!0)))}),y||(d[g]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}loaded(n,a,o){const s=n.split("|"),u=s[0],c=s[1];a&&this.emit("failedLoading",u,c,a),!a&&o&&this.store.addResourceBundle(u,c,o,void 0,void 0,{skipCopy:!0}),this.state[n]=a?-1:2,a&&o&&(this.state[n]=0);const d={};this.queue.forEach(p=>{z6(p.loaded,[u],c),Z6(p,n),a&&p.errors.push(a),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(g=>{d[g]||(d[g]={});const y=p.loaded[g];y.length&&y.forEach(h=>{d[g][h]===void 0&&(d[g][h]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(p=>!p.done)}read(n,a,o,s=0,u=this.retryTimeout,c){if(!n.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:a,fcName:o,tried:s,wait:u,callback:c});return}this.readingCalls++;const d=(g,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(g&&y&&s<this.maxRetries){setTimeout(()=>{this.read(n,a,o,s+1,u*2,c)},u);return}c(g,y)},p=this.backend[o].bind(this.backend);if(p.length===2){try{const g=p(n,a);g&&typeof g.then=="function"?g.then(y=>d(null,y)).catch(d):d(null,g)}catch(g){d(g)}return}return p(n,a,d)}prepareLoading(n,a,o={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Rt(n)&&(n=this.languageUtils.toResolveHierarchy(n)),Rt(a)&&(a=[a]);const u=this.queueLoad(n,a,o,s);if(!u.toLoad.length)return u.pending.length||s(),null;u.toLoad.forEach(c=>{this.loadOne(c)})}load(n,a,o){this.prepareLoading(n,a,{},o)}reload(n,a,o){this.prepareLoading(n,a,{reload:!0},o)}loadOne(n,a=""){const o=n.split("|"),s=o[0],u=o[1];this.read(s,u,"read",void 0,void 0,(c,d)=>{c&&this.logger.warn(`${a}loading namespace ${u} for language ${s} failed`,c),!c&&d&&this.logger.log(`${a}loaded namespace ${u} for language ${s}`,d),this.loaded(n,c,d)})}saveMissing(n,a,o,s,u,c={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(a)){this.logger.warn(`did not save key "${o}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if(this.backend?.create){const p={...c,isUpdate:u},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(n,a,o,s,p):y=g(n,a,o,s),y&&typeof y.then=="function"?y.then(h=>d(null,h)).catch(d):d(null,y)}catch(y){d(y)}else g(n,a,o,s,d,p)}!n||!n[0]||this.store.addResource(n[0],a,o,s)}}}const z0=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let n={};if(typeof e[1]=="object"&&(n=e[1]),Rt(e[1])&&(n.defaultValue=e[1]),Rt(e[2])&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(o=>{n[o]=a[o]})}return n},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),mR=e=>(Rt(e.ns)&&(e.ns=[e.ns]),Rt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Rt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),zf=()=>{},W6=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class sc extends Mp{constructor(n={},a){if(super(),this.options=mR(n),this.services={},this.logger=lo,this.modules={external:[]},W6(this),a&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,a),this;setTimeout(()=>{this.init(n,a)},0)}}init(n={},a){this.isInitializing=!0,typeof n=="function"&&(a=n,n={}),n.defaultNS==null&&n.ns&&(Rt(n.ns)?n.defaultNS=n.ns:n.ns.includes("translation")||(n.defaultNS=n.ns[0]));const o=z0();this.options={...o,...this.options,...mR(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=o.overloadTranslationOptionHandler);const s=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?lo.init(s(this.modules.logger),this.options):lo.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=Q6;const y=new cR(this.options);this.store=new uR(this.options.resources,this.options);const h=this.services;h.logger=lo,h.resourceStore=this.store,h.languageUtils=y,h.pluralResolver=new G6(y,{prepend:this.options.pluralSeparator}),g&&(h.formatter=s(g),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new pR(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new J6(s(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(b,...x)=>{this.emit(b,...x)}),this.modules.languageDetector&&(h.languageDetector=s(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=s(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Ch(this.services,this.options),this.translator.on("*",(b,...x)=>{this.emit(b,...x)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,a||(a=zf),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=(...y)=>this.store[g](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...y)=>(this.store[g](...y),this)});const d=Qu(),p=()=>{const g=(y,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(h),a(y,h)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),d}loadResources(n,a=zf){let o=a;const s=Rt(n)?n:this.language;if(typeof n=="function"&&(o=n),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const u=[],c=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(g=>{g!=="cimode"&&(u.includes(g)||u.push(g))})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(p=>c(p)),this.options.preload?.forEach?.(d=>c(d)),this.services.backendConnector.load(u,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(d)})}else o(null)}reloadResources(n,a,o){const s=Qu();return typeof n=="function"&&(o=n,n=void 0),typeof a=="function"&&(o=a,a=void 0),n||(n=this.languages),a||(a=this.options.ns),o||(o=zf),this.services.backendConnector.reload(n,a,u=>{s.resolve(),o(u)}),s}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&WO.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!["cimode","dev"].includes(n)){for(let a=0;a<this.languages.length;a++){const o=this.languages[a];if(!["cimode","dev"].includes(o)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}!this.resolvedLanguage&&!this.languages.includes(n)&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,a){this.isLanguageChangingTo=n;const o=Qu();this.emit("languageChanging",n);const s=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},u=(d,p)=>{p?this.isLanguageChangingTo===n&&(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,o.resolve((...g)=>this.t(...g)),a&&a(d,(...g)=>this.t(...g))},c=d=>{!n&&!d&&this.services.languageDetector&&(d=[]);const p=Rt(d)?d:d&&d[0],g=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(Rt(d)?[d]:d);g&&(this.language||s(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,y=>{u(y,g)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(n),o}getFixedT(n,a,o,s){const u=s?.scopeNs,c=(d,p,...g)=>{let y;typeof p!="object"?y=this.options.overloadTranslationOptionHandler([d,p].concat(g)):y={...p},y.lng=y.lng||c.lng,y.lngs=y.lngs||c.lngs;const h=y.ns!==void 0&&y.ns!==null;y.ns=y.ns||c.ns,y.keyPrefix!==""&&(y.keyPrefix=y.keyPrefix||o||c.keyPrefix);const b={...this.options,...y};Array.isArray(u)&&!h&&(b.ns=u),typeof y.keyPrefix=="function"&&(y.keyPrefix=ps(y.keyPrefix,b));const x=this.options.keySeparator||".";let w;return y.keyPrefix&&Array.isArray(d)?w=d.map(C=>(typeof C=="function"&&(C=ps(C,b)),`${y.keyPrefix}${x}${C}`)):(typeof d=="function"&&(d=ps(d,b)),w=y.keyPrefix?`${y.keyPrefix}${x}${d}`:d),this.t(w,y)};return Rt(n)?c.lng=n:c.lngs=n,c.ns=a,c.keyPrefix=o,c}t(...n){return this.translator?.translate(...n)}exists(...n){return this.translator?.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,a={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=a.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const c=(g,y)=>{const h=this.services.backendConnector.state[`${g}|${y}`];return h===-1||h===0||h===2};if(a.precheck){const g=a.precheck(this,c);if(g!==void 0)return g}if(this.hasResourceBundle(o,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return!0;const{languageUtils:d}=this.services,p=a.lng?d.isSupportedCode(o)&&d.toResolveHierarchy(o,!1)[0]:o;return!!((!p||c(p,n))&&(!s||c(u,n)))}loadNamespaces(n,a){const o=Qu();return this.options.ns?(Rt(n)&&(n=[n]),n.forEach(s=>{this.options.ns.includes(s)||this.options.ns.push(s)}),this.loadResources(s=>{o.resolve(),a&&a(s)}),o):(a&&a(),Promise.resolve())}loadLanguages(n,a){const o=Qu();Rt(n)&&(n=[n]);const s=this.options.preload||[],u=n.filter(c=>!s.includes(c)&&this.services.languageUtils.isSupportedCode(c));return u.length?(this.options.preload=s.concat(u),this.loadResources(c=>{o.resolve(),a&&a(c)}),o):(a&&a(),Promise.resolve())}dir(n){if(n||(n=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!n)return"rtl";try{const s=new Intl.Locale(n);if(s&&s.getTextInfo){const u=s.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=this.services?.languageUtils||new cR(z0());return n.toLowerCase().indexOf("-latn")>1?"ltr":a.includes(o.getLanguagePartFromCode(n))||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},a){const o=new sc(n,a);return o.createInstance=sc.createInstance,o}cloneInstance(n={},a=zf){const o=n.forkResourceStore;o&&delete n.forkResourceStore;const s={...this.options,preload:!1,...n,isClone:!0},u=new sc(s);if((n.debug!==void 0||n.prefix!==void 0)&&(u.logger=u.logger.clone(n)),["store","services","language"].forEach(d=>{u[d]=this[d]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},o){const d=g=>{const y=Array.isArray(g)?[...g]:{...g};return Object.keys(y).forEach(h=>{y[h]&&typeof y[h]=="object"&&(y[h]=d(y[h]))}),y},p=d(this.store.data);u.store=new uR(p,s),u.services.resourceStore=u.store}if(n.interpolation){const p={...z0().interpolation,...this.options.interpolation,...n.interpolation},g={...s,interpolation:p};u.services.interpolator=new pR(g)}return u.translator=new Ch(u.services,s),u.translator.on("*",(d,...p)=>{u.emit(d,...p)}),u.init(s,a),u.translator.options=s,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const dr=sc.createInstance();dr.createInstance;dr.dir;dr.init;dr.loadResources;dr.reloadResources;dr.use;dr.changeLanguage;dr.getFixedT;dr.t;dr.exists;dr.setDefaultNamespace;dr.hasLoadedNamespace;dr.loadNamespaces;dr.loadLanguages;const e8=(e,n,a,o)=>{const s=[a,{code:n,...o||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);xs(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...s):console?.warn&&console.warn(...s)},yR={},Wf=(e,n,a,o)=>{xs(a)&&yR[a]||(xs(a)&&(yR[a]=new Date),e8(e,n,a,o))},tM=(e,n)=>()=>{if(e.isInitialized)n();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),n()};e.on("initialized",a)}},wy=(e,n,a)=>{e.loadNamespaces(n,tM(e,a))},vR=(e,n,a,o)=>{if(xs(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(n)>-1)return wy(e,a,o);a.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(n,tM(e,o))},t8=(e,n,a={})=>!n.languages||!n.languages.length?(Wf(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(e,{lng:a.lng,precheck:(o,s)=>{if(a.bindI18n&&a.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,e))return!1}}),xs=e=>typeof e=="string",n8=e=>typeof e=="object"&&e!==null,r8=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,a8={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},o8=e=>a8[e],i8=e=>e.replace(r8,o8);let Ry={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:i8,transDefaultProps:void 0};const s8=(e={})=>{Ry={...Ry,...e}},l8=()=>Ry;let nM;const u8=e=>{nM=e},c8=()=>nM,d8={type:"3rdParty",init(e){s8(e.options.react),u8(e)}},f8=v.createContext();class h8{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const p8=(e,n)=>{if(xs(n))return n;if(n8(n)&&xs(n.defaultValue))return n.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const a=e[e.length-1];return typeof a=="function"?"":a}return e},g8={t:p8,ready:!1},m8=()=>()=>{},sn=(e,n={})=>{const{i18n:a}=n,{i18n:o,defaultNS:s}=v.useContext(f8)||{},u=a||o||c8();u&&!u.reportNamespaces&&(u.reportNamespaces=new h8),u||Wf(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const c=v.useMemo(()=>({...l8(),...u?.options?.react,...n}),[u,n]),{useSuspense:d,keyPrefix:p,bindI18n:g,bindI18nStore:y}=c,h=s||u?.options?.defaultNS,b=xs(h)?[h]:h||["translation"],x=JSON.stringify(b),w=v.useMemo(()=>b,[x]);u?.reportNamespaces?.addUsedNamespaces?.(w);const C=v.useRef(0),R=v.useCallback(U=>{if(!u)return m8;const _=()=>{C.current+=1,U()};return g&&u.on(g,_),y&&u.store.on(y,_),()=>{g&&g.split(" ").forEach(L=>u.off(L,_)),y&&y.split(" ").forEach(L=>u.store.off(L,_))}},[u,g,y]),T=v.useRef(),O=v.useCallback(()=>{if(!u)return g8;const U=!!(u.isInitialized||u.initializedStoreOnce)&&w.every(ee=>t8(ee,u,c)),_=n.lng||u.language,L=C.current,$=typeof p=="function"?ps(p,{...u.options,ns:w}):p,K=T.current;if(K&&K.i18n===u&&K.ready===U&&K.lng===_&&K.namespaces===w&&K.keyPrefix===$&&K.revision===L)return K;const X={t:u.getFixedT(_,c.nsMode==="fallback"?w:w[0],p,{scopeNs:w}),i18n:u,ready:U,lng:_,namespaces:w,keyPrefix:$,revision:L};return T.current=X,X},[u,w,p,c,n.lng]),[M,A]=v.useState(0);let{t:I,ready:j}=np.useSyncExternalStore(R,O,O),k;u&&d&&!j&&(k=new Promise(U=>{const _=()=>U();n.lng?vR(u,n.lng,w,_):wy(u,w,_)}),{t:I,ready:j}=O()),v.useEffect(()=>{if(u&&!j&&!d){const U=()=>A(_=>_+1);n.lng?vR(u,n.lng,w,U):wy(u,w,U)}},[u,n.lng,w,j,d,M]);const D=u||{},z=v.useRef(null),F=v.useRef(),G=U=>`${U.language}|${U.resolvedLanguage}|${U.languages?.join(",")}`,J=U=>{const _=Object.getOwnPropertyDescriptors(U);_.__original&&delete _.__original;const L=Object.create(Object.getPrototypeOf(U),_);if(!Object.prototype.hasOwnProperty.call(L,"__original"))try{Object.defineProperty(L,"__original",{value:U,writable:!1,enumerable:!1,configurable:!1})}catch{}return L},Y=v.useMemo(()=>{const U=D,_=U&&G(U);let L=U;U&&(z.current&&z.current.__original===U?F.current!==_?(L=J(U),z.current=L,F.current=_):L=z.current:(L=J(U),z.current=L,F.current=_));const $=!j&&!d?(...V)=>(Wf(u,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),I(...V)):I,K=[$,L,j];return K.t=$,K.i18n=L,K.ready=j,K},[I,D,j,D.resolvedLanguage,D.language,D.languages]);if(u&&d&&!j){let U=!1;try{U=!1}catch{}throw U&&Wf(u,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),k}return Y};function y8({...e}){return S.jsx(QO,{"data-slot":"sheet",...e})}function v8({...e}){return S.jsx(XO,{"data-slot":"sheet-portal",...e})}function b8({className:e,...n}){return S.jsx(YO,{"data-slot":"sheet-overlay",className:Qe("fixed inset-0 z-50 bg-black/80 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...n})}function x8({className:e,children:n,side:a="right",showCloseButton:o=!0,...s}){const{t:u}=sn();return S.jsxs(v8,{children:[S.jsx(b8,{}),S.jsxs($O,{"data-slot":"sheet-content","data-side":a,className:Qe("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-10 data-[side=bottom]:data-starting-style:translate-y-10 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=left]:data-ending-style:-translate-x-10 data-[side=left]:data-starting-style:-translate-x-10 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=right]:data-ending-style:translate-x-10 data-[side=right]:data-starting-style:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:-translate-y-10 data-[side=top]:data-starting-style:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...s,children:[n,o&&S.jsxs(Op,{"data-slot":"sheet-close",render:S.jsx(nn,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[S.jsx(Rs,{}),S.jsx("span",{className:"sr-only",children:u("a11y.close")})]})]})]})}function S8({className:e,...n}){return S.jsx("div",{"data-slot":"sheet-header",className:Qe("flex flex-col gap-1.5 p-6",e),...n})}function w8({className:e,...n}){return S.jsx(ZO,{"data-slot":"sheet-title",className:Qe("font-heading text-sm font-medium text-foreground",e),...n})}function R8({className:e,...n}){return S.jsx(KO,{"data-slot":"sheet-description",className:Qe("text-xs/relaxed text-muted-foreground",e),...n})}function ca({className:e,...n}){return S.jsx("div",{"data-slot":"skeleton",className:Qe("animate-pulse rounded-md bg-muted",e),...n})}const E8="sidebar_state",C8=3600*24*7,T8="16rem",O8="18rem",M8="3rem",A8="b",rM=v.createContext(null);function Gl(){const e=v.useContext(rM);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function D8({defaultOpen:e=!0,open:n,onOpenChange:a,className:o,style:s,children:u,...c}){const d=o6(),[p,g]=v.useState(!1),[y,h]=v.useState(e),b=n??y,x=v.useCallback(T=>{const O=typeof T=="function"?T(b):T;a?a(O):h(O),document.cookie=`${E8}=${O}; path=/; max-age=${C8}`},[a,b]),w=v.useCallback(()=>d?g(T=>!T):x(T=>!T),[d,x,g]);v.useEffect(()=>{const T=O=>{O.key===A8&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),w())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[w]);const C=b?"expanded":"collapsed",R=v.useMemo(()=>({state:C,open:b,setOpen:x,isMobile:d,openMobile:p,setOpenMobile:g,toggleSidebar:w}),[C,b,x,d,p,g,w]);return S.jsx(rM.Provider,{value:R,children:S.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":T8,"--sidebar-width-icon":M8,...s},className:Qe("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",o),...c,children:u})})}function N8({side:e="left",variant:n="sidebar",collapsible:a="offcanvas",className:o,children:s,dir:u,...c}){const{t:d}=sn(),{isMobile:p,state:g,openMobile:y,setOpenMobile:h}=Gl();return a==="none"?S.jsx("div",{"data-slot":"sidebar",className:Qe("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",o),...c,children:s}):p?S.jsx(y8,{open:y,onOpenChange:h,...c,children:S.jsxs(x8,{dir:u,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":O8},side:e,children:[S.jsxs(S8,{className:"sr-only",children:[S.jsx(w8,{children:d("a11y.sidebar")}),S.jsx(R8,{children:d("a11y.sidebarDescription")})]}),S.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):S.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":g,"data-collapsible":g==="collapsed"?a:"","data-variant":n,"data-side":e,"data-slot":"sidebar",children:[S.jsx("div",{"data-slot":"sidebar-gap",className:Qe("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","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)")}),S.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:Qe("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-(--sidebar-width) data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:-right-(--sidebar-width) 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",o),...c,children:S.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:s})})]})}function I8({className:e,onClick:n,...a}){const{t:o}=sn(),{toggleSidebar:s}=Gl();return S.jsxs(nn,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:Qe(e),onClick:u=>{n?.(u),s()},...a,children:[S.jsx(Wk,{}),S.jsx("span",{className:"sr-only",children:o("a11y.toggleSidebar")})]})}function j8({className:e,...n}){const{t:a}=sn(),{toggleSidebar:o}=Gl();return S.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":a("a11y.toggleSidebar"),tabIndex:-1,onClick:o,title:a("a11y.toggleSidebar"),className:Qe("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:inset-s-1/2 after:w-0.5 hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...n})}function k8({className:e,...n}){return S.jsx("main",{"data-slot":"sidebar-inset",className:Qe("relative flex w-full flex-1 flex-col 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",e),...n})}function P8({className:e,...n}){return S.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:Qe("flex flex-col gap-2 p-2",e),...n})}function L8({className:e,...n}){return S.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Qe("flex flex-col gap-2 p-2",e),...n})}function z8({className:e,...n}){return S.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Qe("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n})}function _8({className:e,...n}){return S.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Qe("relative flex w-full min-w-0 flex-col px-2 py-1",e),...n})}function Uv({className:e,...n}){return S.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Qe("flex w-full min-w-0 flex-col gap-px",e),...n})}function lc({className:e,...n}){return S.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Qe("group/menu-item relative",e),...n})}const H8=Tp("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs ring-sidebar-ring outline-hidden 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! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function uc({render:e,isActive:n=!1,variant:a="default",size:o="default",tooltip:s,className:u,...c}){const{isMobile:d,state:p}=Gl(),g=HO({defaultTagName:"button",props:Pr({className:Qe(H8({variant:a,size:o}),u)},c),render:s?S.jsx(yh,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:o,active:n}});return s?(typeof s=="string"&&(s={children:s}),S.jsxs(mh,{children:[g,S.jsx(vh,{side:"right",align:"center",hidden:p!=="collapsed"||d,...s})]})):g}function U8({className:e,...n}){return S.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:Qe("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),...n})}function F8({className:e,...n}){return S.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:Qe("group/menu-sub-item relative",e),...n})}function B8({render:e,size:n="md",isActive:a=!1,className:o,...s}){return HO({defaultTagName:"a",props:Pr({className:Qe("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-xs data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",o)},s),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:n,active:a}})}function V8({items:e}){const{t:n}=sn(),{pathname:a}=$r(),{isMobile:o,state:s}=Gl(),u=s==="collapsed"&&!o;return S.jsx(_8,{children:S.jsx(Uv,{children:e.map(c=>{const d=c.icon,p=c.items?.some(g=>g.url===a)??!1;return c.items?u?S.jsx(lc,{children:S.jsxs(Pv,{children:[S.jsxs(Lv,{render:S.jsx(uc,{tooltip:n(c.titleKey),isActive:p}),children:[S.jsx(d,{}),S.jsx("span",{children:n(c.titleKey)})]}),S.jsx(zv,{className:"w-40",side:"right",align:"start",sideOffset:4,children:S.jsxs(wh,{children:[S.jsx(_v,{children:n(c.titleKey)}),c.items.map(g=>S.jsx(xy,{className:"cursor-pointer",render:S.jsx(oc,{to:g.url}),children:S.jsx("span",{children:n(g.titleKey)})},g.titleKey))]})})]})},c.titleKey):S.jsxs(Uz,{defaultOpen:p,className:"group/collapsible",render:S.jsx(lc,{}),children:[S.jsxs(Fz,{render:S.jsx(uc,{tooltip:n(c.titleKey),isActive:p}),children:[S.jsx(d,{}),S.jsx("span",{children:n(c.titleKey)}),S.jsx(kk,{className:`
|
|
14
14
|
ml-auto transition-transform duration-200
|
|
15
15
|
group-data-open/collapsible:rotate-90
|
|
16
|
-
`})]}),S.jsx(
|
|
16
|
+
`})]}),S.jsx(Bz,{children:S.jsx(U8,{children:c.items.map(g=>S.jsx(F8,{children:S.jsx(B8,{isActive:a===g.url,render:S.jsx(oc,{to:g.url}),children:S.jsx("span",{children:n(g.titleKey)})})},g.titleKey))})})]},`${c.titleKey}-${p?"active":"inactive"}`):S.jsx(lc,{children:S.jsxs(uc,{tooltip:n(c.titleKey),isActive:a===c.url,render:S.jsx(oc,{to:c.url??"/dashboard"}),children:[S.jsx(d,{}),S.jsx("span",{children:n(c.titleKey)})]})},c.titleKey)})})})}const _0=[{id:"acme-inc",nameKey:"sidebar.team.acmeInc",logo:S.jsx(qk,{}),planKey:"sidebar.plan.enterprise"},{id:"acme-corp",nameKey:"sidebar.team.acmeCorp",logo:S.jsx(jk,{}),planKey:"sidebar.plan.startup"},{id:"evil-corp",nameKey:"sidebar.team.evilCorp",logo:S.jsx(oP,{}),planKey:"sidebar.plan.free"}];function q8(){const{t:e}=sn(),{isMobile:n}=Gl(),[a,o]=v.useState(_0[0]?.id),s=_0.find(u=>u.id===a);return s?S.jsx(Uv,{children:S.jsx(lc,{children:S.jsxs(Pv,{children:[S.jsxs(Lv,{render:S.jsx(uc,{size:"lg",className:`
|
|
17
17
|
data-open:bg-sidebar-accent
|
|
18
18
|
data-open:text-sidebar-accent-foreground
|
|
19
19
|
`}),children:[S.jsx("div",{className:`
|
|
20
20
|
flex aspect-square size-8 items-center justify-center rounded-lg
|
|
21
21
|
bg-sidebar-primary text-sidebar-primary-foreground
|
|
22
|
-
`,children:s.logo}),S.jsxs("div",{className:"grid flex-1 text-left text-sm/tight",children:[S.jsx("span",{className:"truncate font-medium",children:e(s.nameKey)}),S.jsx("span",{className:"truncate text-xs",children:e(s.planKey)})]}),S.jsx(
|
|
22
|
+
`,children:s.logo}),S.jsxs("div",{className:"grid flex-1 text-left text-sm/tight",children:[S.jsx("span",{className:"truncate font-medium",children:e(s.nameKey)}),S.jsx("span",{className:"truncate text-xs",children:e(s.planKey)})]}),S.jsx(Lk,{className:"ml-auto"})]}),S.jsxs(zv,{className:"w-fit",align:"start",side:n?"bottom":"right",sideOffset:4,children:[S.jsxs(wh,{children:[S.jsx(_v,{className:"text-xs text-muted-foreground",children:e("sidebar.teams")}),_0.map((u,c)=>S.jsxs(xy,{onClick:()=>o(u.id),className:"gap-2 p-2",children:[S.jsx("div",{className:`
|
|
23
23
|
flex size-6 items-center justify-center rounded-md border
|
|
24
|
-
`,children:u.logo}),e(u.nameKey),S.jsxs(
|
|
24
|
+
`,children:u.logo}),e(u.nameKey),S.jsxs(r6,{children:["⌘",c+1]})]},u.id))]}),S.jsx(n6,{}),S.jsx(wh,{children:S.jsxs(xy,{className:"gap-2 p-2",children:[S.jsx("div",{className:`
|
|
25
25
|
flex size-6 items-center justify-center rounded-md border
|
|
26
26
|
bg-transparent
|
|
27
|
-
`,children:S.jsx(lv,{className:"size-4"})}),S.jsx("div",{className:"font-medium text-muted-foreground",children:e("sidebar.addTeam")})]})})]})]})})}):null}const Fv=[{titleKey:"nav.dashboard",url:"/dashboard",icon:
|
|
27
|
+
`,children:S.jsx(lv,{className:"size-4"})}),S.jsx("div",{className:"font-medium text-muted-foreground",children:e("sidebar.addTeam")})]})})]})]})})}):null}const Fv=[{titleKey:"nav.dashboard",url:"/dashboard",icon:Gk},{titleKey:"nav.library",icon:$k,items:[{titleKey:"nav.instructions",url:"/library/instructions"},{titleKey:"nav.skills",url:"/library/skills"}]},{titleKey:"nav.models",icon:bC,items:[{titleKey:"nav.genesis",url:"/models/genesis"},{titleKey:"nav.explorer",url:"/models/explorer"},{titleKey:"nav.quantum",url:"/models/quantum"}]}],Y8=new Map([["/settings","nav.settings"],...Fv.flatMap(e=>[...e.url?[[e.url,e.titleKey]]:[],...e.items?.map(n=>[n.url,n.titleKey])??[]])]);function aM(e){return Y8.get(e)??"nav.dashboard"}const K8=Fv.flatMap(e=>[...e.url?[e.url]:[],...e.items?.map(n=>n.url)??[]]),G8=K8;function $8({...e}){const{t:n}=sn();return S.jsxs(N8,{collapsible:"icon",...e,children:[S.jsx(P8,{children:S.jsx(q8,{})}),S.jsx(z8,{children:S.jsx(V8,{items:Fv})}),S.jsx(L8,{children:S.jsx(Uv,{children:S.jsx(lc,{children:S.jsxs(uc,{tooltip:n("nav.settings"),render:S.jsx(oc,{to:"/settings"}),children:[S.jsx(rP,{}),S.jsx("span",{children:n("nav.settings")})]})})})}),S.jsx(j8,{})]})}const Ap=v.createContext(null);Ap.displayName="PageHeaderActionsContext";function X8({children:e}){const[n,a]=v.useState(null);return S.jsx(Ap,{value:{container:n,setContainer:a},children:e})}function Q8(){const e=v.use(Ap);if(!e)throw new Error("PageHeaderActionsSlot must be used within PageHeaderActionsProvider");const n=e.setContainer,a=v.useCallback(o=>{n(o)},[n]);return S.jsx("div",{ref:a,className:"ml-auto flex shrink-0 items-center gap-2 px-4"})}function Z8({children:e}){const n=v.use(Ap);return n?.container?cr.createPortal(e,n.container):null}function J8(){const{t:e}=sn(),{pathname:n}=$r();return S.jsx(X8,{children:S.jsxs(D8,{children:[S.jsx($8,{}),S.jsxs(k8,{children:[S.jsxs("header",{className:`
|
|
28
28
|
flex h-16 shrink-0 items-center gap-2 transition-[width,height]
|
|
29
29
|
ease-linear
|
|
30
30
|
group-has-data-[collapsible=icon]/sidebar-wrapper:h-12
|
|
31
|
-
`,children:[S.jsxs("div",{className:"flex min-w-0 items-center gap-2 px-4",children:[S.jsx(
|
|
31
|
+
`,children:[S.jsxs("div",{className:"flex min-w-0 items-center gap-2 px-4",children:[S.jsx(I8,{size:"icon",className:"-ml-1"}),S.jsx(VO,{orientation:"vertical",className:`
|
|
32
32
|
mr-2
|
|
33
33
|
data-vertical:h-4 data-vertical:self-auto
|
|
34
|
-
`}),S.jsx("span",{className:"truncate text-sm font-medium",children:e(
|
|
34
|
+
`}),S.jsx("span",{className:"truncate text-sm font-medium",children:e(aM(n))})]}),S.jsx(Q8,{})]}),S.jsx(tO,{})]})]})})}function W8(){const{t:e}=sn(),{pathname:n}=$r(),a=EL(),o=yp();let s;for(const c of a.toReversed())if(eH(c.handle)){s=c.handle.backTo;break}const u=()=>{if(s===void 0){o(-1);return}o(s)};return S.jsxs("div",{className:"flex h-dvh flex-col overflow-hidden bg-background",children:[S.jsx("header",{className:`
|
|
35
35
|
flex h-16 shrink-0 items-center gap-2 transition-[width,height]
|
|
36
36
|
ease-linear
|
|
37
|
-
`,children:S.jsxs("div",{className:"flex items-center gap-2 px-4",children:[S.jsxs(nn,{variant:"ghost",size:"icon",className:"-ml-1",onClick:u,children:[S.jsx(
|
|
37
|
+
`,children:S.jsxs("div",{className:"flex items-center gap-2 px-4",children:[S.jsxs(nn,{variant:"ghost",size:"icon",className:"-ml-1",onClick:u,children:[S.jsx(Ik,{}),S.jsx("span",{className:"sr-only",children:e("a11y.goBack")})]}),S.jsx(VO,{orientation:"vertical",className:`
|
|
38
38
|
mr-2
|
|
39
39
|
data-vertical:h-4 data-vertical:self-auto
|
|
40
|
-
`}),S.jsx("span",{className:"text-sm font-medium",children:e(
|
|
40
|
+
`}),S.jsx("span",{className:"text-sm font-medium",children:e(aM(n))})]})}),S.jsx("main",{className:"min-h-0 flex-1 overflow-hidden",children:S.jsx(tO,{})})]})}function eH(e){return typeof e=="object"&&e!==null&&"backTo"in e&&typeof e.backTo=="string"}function tH(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return v.useMemo(()=>o=>{n.forEach(s=>s(o))},n)}const Dp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $l(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function Bv(e){return"nodeType"in e}function _r(e){var n,a;return e?$l(e)?e:Bv(e)&&(n=(a=e.ownerDocument)==null?void 0:a.defaultView)!=null?n:window:window}function Vv(e){const{Document:n}=_r(e);return e instanceof n}function Kc(e){return $l(e)?!1:e instanceof _r(e).HTMLElement}function oM(e){return e instanceof _r(e).SVGElement}function Xl(e){return e?$l(e)?e.document:Bv(e)?Vv(e)?e:Kc(e)||oM(e)?e.ownerDocument:document:document:document}const qa=Dp?v.useLayoutEffect:v.useEffect;function Np(e){const n=v.useRef(e);return qa(()=>{n.current=e}),v.useCallback(function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return n.current==null?void 0:n.current(...o)},[])}function nH(){const e=v.useRef(null),n=v.useCallback((o,s)=>{e.current=setInterval(o,s)},[]),a=v.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,a]}function xc(e,n){n===void 0&&(n=[e]);const a=v.useRef(e);return qa(()=>{a.current!==e&&(a.current=e)},n),a}function Gc(e,n){const a=v.useRef();return v.useMemo(()=>{const o=e(a.current);return a.current=o,o},[...n])}function Th(e){const n=Np(e),a=v.useRef(null),o=v.useCallback(s=>{s!==a.current&&n?.(s,a.current),a.current=s},[]);return[a,o]}function Oh(e){const n=v.useRef();return v.useEffect(()=>{n.current=e},[e]),n.current}let H0={};function $c(e,n){return v.useMemo(()=>{if(n)return n;const a=H0[e]==null?0:H0[e]+1;return H0[e]=a,e+"-"+a},[e,n])}function iM(e){return function(n){for(var a=arguments.length,o=new Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];return o.reduce((u,c)=>{const d=Object.entries(c);for(const[p,g]of d){const y=u[p];y!=null&&(u[p]=y+e*g)}return u},{...n})}}const Al=iM(1),Sc=iM(-1);function rH(e){return"clientX"in e&&"clientY"in e}function Ip(e){if(!e)return!1;const{KeyboardEvent:n}=_r(e.target);return n&&e instanceof n}function aH(e){if(!e)return!1;const{TouchEvent:n}=_r(e.target);return n&&e instanceof n}function Mh(e){if(aH(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:a}=e.touches[0];return{x:n,y:a}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:a}=e.changedTouches[0];return{x:n,y:a}}}return rH(e)?{x:e.clientX,y:e.clientY}:null}const Di=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:a}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(a?Math.round(a):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:a}=e;return"scaleX("+n+") scaleY("+a+")"}},Transform:{toString(e){if(e)return[Di.Translate.toString(e),Di.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:a,easing:o}=e;return n+" "+a+"ms "+o}}}),bR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function oH(e){return e.matches(bR)?e:e.querySelector(bR)}const iH={display:"none"};function sH(e){let{id:n,value:a}=e;return Ne.createElement("div",{id:n,style:iH},a)}function lH(e){let{id:n,announcement:a,ariaLiveType:o="assertive"}=e;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Ne.createElement("div",{id:n,style:s,role:"status","aria-live":o,"aria-atomic":!0},a)}function uH(){const[e,n]=v.useState("");return{announce:v.useCallback(o=>{o!=null&&n(o)},[]),announcement:e}}const sM=v.createContext(null);function cH(e){const n=v.useContext(sM);v.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of <DndContext>");return n(e)},[e,n])}function dH(){const[e]=v.useState(()=>new Set),n=v.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[v.useCallback(o=>{let{type:s,event:u}=o;e.forEach(c=>{var d;return(d=c[s])==null?void 0:d.call(c,u)})},[e]),n]}const fH={draggable:`
|
|
41
41
|
To pick up a draggable item, press the space bar.
|
|
42
42
|
While dragging, use the arrow keys to move the item.
|
|
43
43
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
44
|
-
`},fH={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:a}=e;return a?"Draggable item "+n.id+" was moved over droppable area "+a.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:a}=e;return a?"Draggable item "+n.id+" was dropped over droppable area "+a.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function hH(e){let{announcements:n=fH,container:a,hiddenTextDescribedById:o,screenReaderInstructions:s=dH}=e;const{announce:u,announcement:c}=lH(),d=$c("DndLiveRegion"),[p,g]=v.useState(!1);if(v.useEffect(()=>{g(!0)},[]),uH(v.useMemo(()=>({onDragStart(h){let{active:b}=h;u(n.onDragStart({active:b}))},onDragMove(h){let{active:b,over:x}=h;n.onDragMove&&u(n.onDragMove({active:b,over:x}))},onDragOver(h){let{active:b,over:x}=h;u(n.onDragOver({active:b,over:x}))},onDragEnd(h){let{active:b,over:x}=h;u(n.onDragEnd({active:b,over:x}))},onDragCancel(h){let{active:b,over:x}=h;u(n.onDragCancel({active:b,over:x}))}}),[u,n])),!p)return null;const y=Ne.createElement(Ne.Fragment,null,Ne.createElement(iH,{id:o,value:s.draggable}),Ne.createElement(sH,{id:d,announcement:c}));return a?cr.createPortal(y,a):y}var ar;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ar||(ar={}));function Ah(){}function U0(e,n){return v.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function pH(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return v.useMemo(()=>[...n].filter(o=>o!=null),[...n])}const Ya=Object.freeze({x:0,y:0});function qv(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function gH(e,n){const a=Mh(e);if(!a)return"0 0";const o={x:(a.x-n.left)/n.width*100,y:(a.y-n.top)/n.height*100};return o.x+"% "+o.y+"%"}function Yv(e,n){let{data:{value:a}}=e,{data:{value:o}}=n;return a-o}function mH(e,n){let{data:{value:a}}=e,{data:{value:o}}=n;return o-a}function Ey(e){let{left:n,top:a,height:o,width:s}=e;return[{x:n,y:a},{x:n+s,y:a},{x:n,y:a+o},{x:n+s,y:a+o}]}function uM(e,n){if(!e||e.length===0)return null;const[a]=e;return a[n]}function SR(e,n,a){return n===void 0&&(n=e.left),a===void 0&&(a=e.top),{x:n+e.width*.5,y:a+e.height*.5}}const yH=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=SR(n,n.left,n.top),u=[];for(const c of o){const{id:d}=c,p=a.get(d);if(p){const g=qv(SR(p),s);u.push({id:d,data:{droppableContainer:c,value:g}})}}return u.sort(Yv)},vH=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=Ey(n),u=[];for(const c of o){const{id:d}=c,p=a.get(d);if(p){const g=Ey(p),y=s.reduce((b,x,w)=>b+qv(g[w],x),0),h=Number((y/4).toFixed(4));u.push({id:d,data:{droppableContainer:c,value:h}})}}return u.sort(Yv)};function bH(e,n){const a=Math.max(n.top,e.top),o=Math.max(n.left,e.left),s=Math.min(n.left+n.width,e.left+e.width),u=Math.min(n.top+n.height,e.top+e.height),c=s-o,d=u-a;if(o<s&&a<u){const p=n.width*n.height,g=e.width*e.height,y=c*d,h=y/(p+g-y);return Number(h.toFixed(4))}return 0}const xH=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=[];for(const u of o){const{id:c}=u,d=a.get(c);if(d){const p=bH(d,n);p>0&&s.push({id:c,data:{droppableContainer:u,value:p}})}}return s.sort(mH)};function SH(e,n){const{top:a,left:o,bottom:s,right:u}=n;return a<=e.y&&e.y<=s&&o<=e.x&&e.x<=u}const wH=e=>{let{droppableContainers:n,droppableRects:a,pointerCoordinates:o}=e;if(!o)return[];const s=[];for(const u of n){const{id:c}=u,d=a.get(c);if(d&&SH(o,d)){const g=Ey(d).reduce((h,b)=>h+qv(o,b),0),y=Number((g/4).toFixed(4));s.push({id:c,data:{droppableContainer:u,value:y}})}}return s.sort(Yv)};function RH(e,n,a){return{...e,scaleX:n&&a?n.width/a.width:1,scaleY:n&&a?n.height/a.height:1}}function cM(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Ya}function EH(e){return function(a){for(var o=arguments.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=arguments[u];return s.reduce((c,d)=>({...c,top:c.top+e*d.y,bottom:c.bottom+e*d.y,left:c.left+e*d.x,right:c.right+e*d.x}),{...a})}}const CH=EH(1);function dM(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function TH(e,n,a){const o=dM(n);if(!o)return e;const{scaleX:s,scaleY:u,x:c,y:d}=o,p=e.left-c-(1-s)*parseFloat(a),g=e.top-d-(1-u)*parseFloat(a.slice(a.indexOf(" ")+1)),y=s?e.width/s:e.width,h=u?e.height/u:e.height;return{width:y,height:h,top:g,right:p+y,bottom:g+h,left:p}}const OH={ignoreTransform:!1};function Ql(e,n){n===void 0&&(n=OH);let a=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:g,transformOrigin:y}=_r(e).getComputedStyle(e);g&&(a=TH(a,g,y))}const{top:o,left:s,width:u,height:c,bottom:d,right:p}=a;return{top:o,left:s,width:u,height:c,bottom:d,right:p}}function wR(e){return Ql(e,{ignoreTransform:!0})}function MH(e){const n=e.innerWidth,a=e.innerHeight;return{top:0,left:0,right:n,bottom:a,width:n,height:a}}function AH(e,n){return n===void 0&&(n=_r(e).getComputedStyle(e)),n.position==="fixed"}function DH(e,n){n===void 0&&(n=_r(e).getComputedStyle(e));const a=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const u=n[s];return typeof u=="string"?a.test(u):!1})}function jp(e,n){const a=[];function o(s){if(n!=null&&a.length>=n||!s)return a;if(Vv(s)&&s.scrollingElement!=null&&!a.includes(s.scrollingElement))return a.push(s.scrollingElement),a;if(!Kc(s)||iM(s)||a.includes(s))return a;const u=_r(e).getComputedStyle(s);return s!==e&&DH(s,u)&&a.push(s),AH(s,u)?a:o(s.parentNode)}return e?o(e):a}function fM(e){const[n]=jp(e,1);return n??null}function F0(e){return!Dp||!e?null:$l(e)?e:Bv(e)?Vv(e)||e===Xl(e).scrollingElement?window:Kc(e)?e:null:null}function hM(e){return $l(e)?e.scrollX:e.scrollLeft}function pM(e){return $l(e)?e.scrollY:e.scrollTop}function Cy(e){return{x:hM(e),y:pM(e)}}var ur;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ur||(ur={}));function gM(e){return!Dp||!e?!1:e===document.scrollingElement}function mM(e){const n={x:0,y:0},a=gM(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-a.width,y:e.scrollHeight-a.height},s=e.scrollTop<=n.y,u=e.scrollLeft<=n.x,c=e.scrollTop>=o.y,d=e.scrollLeft>=o.x;return{isTop:s,isLeft:u,isBottom:c,isRight:d,maxScroll:o,minScroll:n}}const NH={x:.2,y:.2};function IH(e,n,a,o,s){let{top:u,left:c,right:d,bottom:p}=a;o===void 0&&(o=10),s===void 0&&(s=NH);const{isTop:g,isBottom:y,isLeft:h,isRight:b}=mM(e),x={x:0,y:0},w={x:0,y:0},C={height:n.height*s.y,width:n.width*s.x};return!g&&u<=n.top+C.height?(x.y=ur.Backward,w.y=o*Math.abs((n.top+C.height-u)/C.height)):!y&&p>=n.bottom-C.height&&(x.y=ur.Forward,w.y=o*Math.abs((n.bottom-C.height-p)/C.height)),!b&&d>=n.right-C.width?(x.x=ur.Forward,w.x=o*Math.abs((n.right-C.width-d)/C.width)):!h&&c<=n.left+C.width&&(x.x=ur.Backward,w.x=o*Math.abs((n.left+C.width-c)/C.width)),{direction:x,speed:w}}function jH(e){if(e===document.scrollingElement){const{innerWidth:u,innerHeight:c}=window;return{top:0,left:0,right:u,bottom:c,width:u,height:c}}const{top:n,left:a,right:o,bottom:s}=e.getBoundingClientRect();return{top:n,left:a,right:o,bottom:s,width:e.clientWidth,height:e.clientHeight}}function yM(e){return e.reduce((n,a)=>Al(n,Cy(a)),Ya)}function kH(e){return e.reduce((n,a)=>n+hM(a),0)}function PH(e){return e.reduce((n,a)=>n+pM(a),0)}function vM(e,n){if(n===void 0&&(n=Ql),!e)return;const{top:a,left:o,bottom:s,right:u}=n(e);fM(e)&&(s<=0||u<=0||a>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const LH=[["x",["left","right"],kH],["y",["top","bottom"],PH]];class Kv{constructor(n,a){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=jp(a),s=yM(o);this.rect={...n},this.width=n.width,this.height=n.height;for(const[u,c,d]of LH)for(const p of c)Object.defineProperty(this,p,{get:()=>{const g=d(o),y=s[u]-g;return this.rect[p]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class cc{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(a=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...a)})},this.target=n}add(n,a,o){var s;(s=this.target)==null||s.addEventListener(n,a,o),this.listeners.push([n,a,o])}}function zH(e){const{EventTarget:n}=_r(e);return e instanceof n?e:Xl(e)}function B0(e,n){const a=Math.abs(e.x),o=Math.abs(e.y);return typeof n=="number"?Math.sqrt(a**2+o**2)>n:"x"in n&&"y"in n?a>n.x&&o>n.y:"x"in n?a>n.x:"y"in n?o>n.y:!1}var Ta;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ta||(Ta={}));function RR(e){e.preventDefault()}function _H(e){e.stopPropagation()}var Zt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Zt||(Zt={}));const bM={start:[Zt.Space,Zt.Enter],cancel:[Zt.Esc],end:[Zt.Space,Zt.Enter,Zt.Tab]},HH=(e,n)=>{let{currentCoordinates:a}=n;switch(e.code){case Zt.Right:return{...a,x:a.x+25};case Zt.Left:return{...a,x:a.x-25};case Zt.Down:return{...a,y:a.y+25};case Zt.Up:return{...a,y:a.y-25}}};class Gv{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:a}}=n;this.props=n,this.listeners=new cc(Xl(a)),this.windowListeners=new cc(_r(a)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ta.Resize,this.handleCancel),this.windowListeners.add(Ta.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ta.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:a}=this.props,o=n.node.current;o&&vM(o),a(Ya)}handleKeyDown(n){if(Ip(n)){const{active:a,context:o,options:s}=this.props,{keyboardCodes:u=bM,coordinateGetter:c=HH,scrollBehavior:d="smooth"}=s,{code:p}=n;if(u.end.includes(p)){this.handleEnd(n);return}if(u.cancel.includes(p)){this.handleCancel(n);return}const{collisionRect:g}=o.current,y=g?{x:g.left,y:g.top}:Ya;this.referenceCoordinates||(this.referenceCoordinates=y);const h=c(n,{active:a,context:o.current,currentCoordinates:y});if(h){const b=Sc(h,y),x={x:0,y:0},{scrollableAncestors:w}=o.current;for(const C of w){const R=n.code,{isTop:T,isRight:O,isLeft:M,isBottom:A,maxScroll:I,minScroll:j}=mM(C),k=jH(C),D={x:Math.min(R===Zt.Right?k.right-k.width/2:k.right,Math.max(R===Zt.Right?k.left:k.left+k.width/2,h.x)),y:Math.min(R===Zt.Down?k.bottom-k.height/2:k.bottom,Math.max(R===Zt.Down?k.top:k.top+k.height/2,h.y))},z=R===Zt.Right&&!O||R===Zt.Left&&!M,F=R===Zt.Down&&!A||R===Zt.Up&&!T;if(z&&D.x!==h.x){const G=C.scrollLeft+b.x,J=R===Zt.Right&&G<=I.x||R===Zt.Left&&G>=j.x;if(J&&!b.y){C.scrollTo({left:G,behavior:d});return}J?x.x=C.scrollLeft-G:x.x=R===Zt.Right?C.scrollLeft-I.x:C.scrollLeft-j.x,x.x&&C.scrollBy({left:-x.x,behavior:d});break}else if(F&&D.y!==h.y){const G=C.scrollTop+b.y,J=R===Zt.Down&&G<=I.y||R===Zt.Up&&G>=j.y;if(J&&!b.x){C.scrollTo({top:G,behavior:d});return}J?x.y=C.scrollTop-G:x.y=R===Zt.Down?C.scrollTop-I.y:C.scrollTop-j.y,x.y&&C.scrollBy({top:-x.y,behavior:d});break}}this.handleMove(n,Al(Sc(h,this.referenceCoordinates),x))}}}handleMove(n,a){const{onMove:o}=this.props;n.preventDefault(),o(a)}handleEnd(n){const{onEnd:a}=this.props;n.preventDefault(),this.detach(),a()}handleCancel(n){const{onCancel:a}=this.props;n.preventDefault(),this.detach(),a()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Gv.activators=[{eventName:"onKeyDown",handler:(e,n,a)=>{let{keyboardCodes:o=bM,onActivation:s}=n,{active:u}=a;const{code:c}=e.nativeEvent;if(o.start.includes(c)){const d=u.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),s?.({event:e.nativeEvent}),!0)}return!1}}];function ER(e){return!!(e&&"distance"in e)}function CR(e){return!!(e&&"delay"in e)}class $v{constructor(n,a,o){var s;o===void 0&&(o=zH(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=a;const{event:u}=n,{target:c}=u;this.props=n,this.events=a,this.document=Xl(c),this.documentListeners=new cc(this.document),this.listeners=new cc(o),this.windowListeners=new cc(_r(c)),this.initialCoordinates=(s=Mh(u))!=null?s:Ya,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:a,bypassActivationConstraint:o}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(Ta.Resize,this.handleCancel),this.windowListeners.add(Ta.DragStart,RR),this.windowListeners.add(Ta.VisibilityChange,this.handleCancel),this.windowListeners.add(Ta.ContextMenu,RR),this.documentListeners.add(Ta.Keydown,this.handleKeydown),a){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(CR(a)){this.timeoutId=setTimeout(this.handleStart,a.delay),this.handlePending(a);return}if(ER(a)){this.handlePending(a);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,a){const{active:o,onPending:s}=this.props;s(o,n,this.initialCoordinates,a)}handleStart(){const{initialCoordinates:n}=this,{onStart:a}=this.props;n&&(this.activated=!0,this.documentListeners.add(Ta.Click,_H,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ta.SelectionChange,this.removeTextSelection),a(n))}handleMove(n){var a;const{activated:o,initialCoordinates:s,props:u}=this,{onMove:c,options:{activationConstraint:d}}=u;if(!s)return;const p=(a=Mh(n))!=null?a:Ya,g=Sc(s,p);if(!o&&d){if(ER(d)){if(d.tolerance!=null&&B0(g,d.tolerance))return this.handleCancel();if(B0(g,d.distance))return this.handleStart()}if(CR(d)&&B0(g,d.tolerance))return this.handleCancel();this.handlePending(d,g);return}n.cancelable&&n.preventDefault(),c(p)}handleEnd(){const{onAbort:n,onEnd:a}=this.props;this.detach(),this.activated||n(this.props.active),a()}handleCancel(){const{onAbort:n,onCancel:a}=this.props;this.detach(),this.activated||n(this.props.active),a()}handleKeydown(n){n.code===Zt.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const UH={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Xv extends $v{constructor(n){const{event:a}=n,o=Xl(a.target);super(n,UH,o)}}Xv.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;return!a.isPrimary||a.button!==0?!1:(o?.({event:a}),!0)}}];const FH={move:{name:"mousemove"},end:{name:"mouseup"}};var Ty;(function(e){e[e.RightClick=2]="RightClick"})(Ty||(Ty={}));class BH extends $v{constructor(n){super(n,FH,Xl(n.event.target))}}BH.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;return a.button===Ty.RightClick?!1:(o?.({event:a}),!0)}}];const V0={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class xM extends $v{constructor(n){super(n,V0)}static setup(){return window.addEventListener(V0.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(V0.move.name,n)};function n(){}}}xM.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;const{touches:s}=a;return s.length>1?!1:(o?.({event:a}),!0)}}];var dc;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(dc||(dc={}));var Dh;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Dh||(Dh={}));function VH(e){let{acceleration:n,activator:a=dc.Pointer,canScroll:o,draggingRect:s,enabled:u,interval:c=5,order:d=Dh.TreeOrder,pointerCoordinates:p,scrollableAncestors:g,scrollableAncestorRects:y,delta:h,threshold:b}=e;const x=YH({delta:h,disabled:!u}),[w,C]=tH(),R=v.useRef({x:0,y:0}),T=v.useRef({x:0,y:0}),O=v.useMemo(()=>{switch(a){case dc.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case dc.DraggableRect:return s}},[a,s,p]),M=v.useRef(null),A=v.useCallback(()=>{const j=M.current;if(!j)return;const k=R.current.x*T.current.x,D=R.current.y*T.current.y;j.scrollBy(k,D)},[]),I=v.useMemo(()=>d===Dh.TreeOrder?[...g].reverse():g,[d,g]);v.useEffect(()=>{if(!u||!g.length||!O){C();return}for(const j of I){if(o?.(j)===!1)continue;const k=g.indexOf(j),D=y[k];if(!D)continue;const{direction:z,speed:F}=IH(j,D,O,n,b);for(const G of["x","y"])x[G][z[G]]||(F[G]=0,z[G]=0);if(F.x>0||F.y>0){C(),M.current=j,w(A,c),R.current=F,T.current=z;return}}R.current={x:0,y:0},T.current={x:0,y:0},C()},[n,A,o,C,u,c,JSON.stringify(O),JSON.stringify(x),w,g,I,y,JSON.stringify(b)])}const qH={x:{[ur.Backward]:!1,[ur.Forward]:!1},y:{[ur.Backward]:!1,[ur.Forward]:!1}};function YH(e){let{delta:n,disabled:a}=e;const o=Oh(n);return Gc(s=>{if(a||!o||!s)return qH;const u={x:Math.sign(n.x-o.x),y:Math.sign(n.y-o.y)};return{x:{[ur.Backward]:s.x[ur.Backward]||u.x===-1,[ur.Forward]:s.x[ur.Forward]||u.x===1},y:{[ur.Backward]:s.y[ur.Backward]||u.y===-1,[ur.Forward]:s.y[ur.Forward]||u.y===1}}},[a,n,o])}function KH(e,n){const a=n!=null?e.get(n):void 0,o=a?a.node.current:null;return Gc(s=>{var u;return n==null?null:(u=o??s)!=null?u:null},[o,n])}function GH(e,n){return v.useMemo(()=>e.reduce((a,o)=>{const{sensor:s}=o,u=s.activators.map(c=>({eventName:c.eventName,handler:n(c.handler,o)}));return[...a,...u]},[]),[e,n])}var wc;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(wc||(wc={}));var Oy;(function(e){e.Optimized="optimized"})(Oy||(Oy={}));const TR=new Map;function $H(e,n){let{dragging:a,dependencies:o,config:s}=n;const[u,c]=v.useState(null),{frequency:d,measure:p,strategy:g}=s,y=v.useRef(e),h=R(),b=xc(h),x=v.useCallback(function(T){T===void 0&&(T=[]),!b.current&&c(O=>O===null?T:O.concat(T.filter(M=>!O.includes(M))))},[b]),w=v.useRef(null),C=Gc(T=>{if(h&&!a)return TR;if(!T||T===TR||y.current!==e||u!=null){const O=new Map;for(let M of e){if(!M)continue;if(u&&u.length>0&&!u.includes(M.id)&&M.rect.current){O.set(M.id,M.rect.current);continue}const A=M.node.current,I=A?new Kv(p(A),A):null;M.rect.current=I,I&&O.set(M.id,I)}return O}return T},[e,u,a,h,p]);return v.useEffect(()=>{y.current=e},[e]),v.useEffect(()=>{h||x()},[a,h]),v.useEffect(()=>{u&&u.length>0&&c(null)},[JSON.stringify(u)]),v.useEffect(()=>{h||typeof d!="number"||w.current!==null||(w.current=setTimeout(()=>{x(),w.current=null},d))},[d,h,x,...o]),{droppableRects:C,measureDroppableContainers:x,measuringScheduled:u!=null};function R(){switch(g){case wc.Always:return!1;case wc.BeforeDragging:return a;default:return!a}}}function Qv(e,n){return Gc(a=>e?a||(typeof n=="function"?n(e):e):null,[n,e])}function XH(e,n){return Qv(e,n)}function QH(e){let{callback:n,disabled:a}=e;const o=Np(n),s=v.useMemo(()=>{if(a||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:u}=window;return new u(o)},[o,a]);return v.useEffect(()=>()=>s?.disconnect(),[s]),s}function kp(e){let{callback:n,disabled:a}=e;const o=Np(n),s=v.useMemo(()=>{if(a||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:u}=window;return new u(o)},[a]);return v.useEffect(()=>()=>s?.disconnect(),[s]),s}function ZH(e){return new Kv(Ql(e),e)}function OR(e,n,a){n===void 0&&(n=ZH);const[o,s]=v.useState(null);function u(){s(p=>{if(!e)return null;if(e.isConnected===!1){var g;return(g=p??a)!=null?g:null}const y=n(e);return JSON.stringify(p)===JSON.stringify(y)?p:y})}const c=QH({callback(p){if(e)for(const g of p){const{type:y,target:h}=g;if(y==="childList"&&h instanceof HTMLElement&&h.contains(e)){u();break}}}}),d=kp({callback:u});return qa(()=>{u(),e?(d?.observe(e),c?.observe(document.body,{childList:!0,subtree:!0})):(d?.disconnect(),c?.disconnect())},[e]),o}function JH(e){const n=Qv(e);return cM(e,n)}const MR=[];function WH(e){const n=v.useRef(e),a=Gc(o=>e?o&&o!==MR&&e&&n.current&&e.parentNode===n.current.parentNode?o:jp(e):MR,[e]);return v.useEffect(()=>{n.current=e},[e]),a}function eU(e){const[n,a]=v.useState(null),o=v.useRef(e),s=v.useCallback(u=>{const c=F0(u.target);c&&a(d=>d?(d.set(c,Cy(c)),new Map(d)):null)},[]);return v.useEffect(()=>{const u=o.current;if(e!==u){c(u);const d=e.map(p=>{const g=F0(p);return g?(g.addEventListener("scroll",s,{passive:!0}),[g,Cy(g)]):null}).filter(p=>p!=null);a(d.length?new Map(d):null),o.current=e}return()=>{c(e),c(u)};function c(d){d.forEach(p=>{const g=F0(p);g?.removeEventListener("scroll",s)})}},[s,e]),v.useMemo(()=>e.length?n?Array.from(n.values()).reduce((u,c)=>Al(u,c),Ya):yM(e):Ya,[e,n])}function AR(e,n){n===void 0&&(n=[]);const a=v.useRef(null);return v.useEffect(()=>{a.current=null},n),v.useEffect(()=>{const o=e!==Ya;o&&!a.current&&(a.current=e),!o&&a.current&&(a.current=null)},[e]),a.current?Sc(e,a.current):Ya}function tU(e){v.useEffect(()=>{if(!Dp)return;const n=e.map(a=>{let{sensor:o}=a;return o.setup==null?void 0:o.setup()});return()=>{for(const a of n)a?.()}},e.map(n=>{let{sensor:a}=n;return a}))}function nU(e,n){return v.useMemo(()=>e.reduce((a,o)=>{let{eventName:s,handler:u}=o;return a[s]=c=>{u(c,n)},a},{}),[e,n])}function SM(e){return v.useMemo(()=>e?MH(e):null,[e])}const DR=[];function rU(e,n){n===void 0&&(n=Ql);const[a]=e,o=SM(a?_r(a):null),[s,u]=v.useState(DR);function c(){u(()=>e.length?e.map(p=>gM(p)?o:new Kv(n(p),p)):DR)}const d=kp({callback:c});return qa(()=>{d?.disconnect(),c(),e.forEach(p=>d?.observe(p))},[e]),s}function wM(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Kc(n)?n:e}function aU(e){let{measure:n}=e;const[a,o]=v.useState(null),s=v.useCallback(g=>{for(const{target:y}of g)if(Kc(y)){o(h=>{const b=n(y);return h?{...h,width:b.width,height:b.height}:b});break}},[n]),u=kp({callback:s}),c=v.useCallback(g=>{const y=wM(g);u?.disconnect(),y&&u?.observe(y),o(y?n(y):null)},[n,u]),[d,p]=Th(c);return v.useMemo(()=>({nodeRef:d,rect:a,setRef:p}),[a,d,p])}const oU=[{sensor:Xv,options:{}},{sensor:Gv,options:{}}],iU={current:{}},eh={draggable:{measure:wR},droppable:{measure:wR,strategy:wc.WhileDragging,frequency:Oy.Optimized},dragOverlay:{measure:Ql}};class fc extends Map{get(n){var a;return n!=null&&(a=super.get(n))!=null?a:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:a}=n;return!a})}getNodeFor(n){var a,o;return(a=(o=this.get(n))==null?void 0:o.node.current)!=null?a:void 0}}const sU={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new fc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ah},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:eh,measureDroppableContainers:Ah,windowRect:null,measuringScheduled:!1},RM={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ah,draggableNodes:new Map,over:null,measureDroppableContainers:Ah},Xc=v.createContext(RM),EM=v.createContext(sU);function lU(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new fc}}}function uU(e,n){switch(n.type){case ar.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case ar.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case ar.DragEnd:case ar.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ar.RegisterDroppable:{const{element:a}=n,{id:o}=a,s=new fc(e.droppable.containers);return s.set(o,a),{...e,droppable:{...e.droppable,containers:s}}}case ar.SetDroppableDisabled:{const{id:a,key:o,disabled:s}=n,u=e.droppable.containers.get(a);if(!u||o!==u.key)return e;const c=new fc(e.droppable.containers);return c.set(a,{...u,disabled:s}),{...e,droppable:{...e.droppable,containers:c}}}case ar.UnregisterDroppable:{const{id:a,key:o}=n,s=e.droppable.containers.get(a);if(!s||o!==s.key)return e;const u=new fc(e.droppable.containers);return u.delete(a),{...e,droppable:{...e.droppable,containers:u}}}default:return e}}function cU(e){let{disabled:n}=e;const{active:a,activatorEvent:o,draggableNodes:s}=v.useContext(Xc),u=Oh(o),c=Oh(a?.id);return v.useEffect(()=>{if(!n&&!o&&u&&c!=null){if(!Ip(u)||document.activeElement===u.target)return;const d=s.get(c);if(!d)return;const{activatorNode:p,node:g}=d;if(!p.current&&!g.current)return;requestAnimationFrame(()=>{for(const y of[p.current,g.current]){if(!y)continue;const h=aH(y);if(h){h.focus();break}}})}},[o,n,s,c,u]),null}function CM(e,n){let{transform:a,...o}=n;return e!=null&&e.length?e.reduce((s,u)=>u({transform:s,...o}),a):a}function dU(e){return v.useMemo(()=>({draggable:{...eh.draggable,...e?.draggable},droppable:{...eh.droppable,...e?.droppable},dragOverlay:{...eh.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function fU(e){let{activeNode:n,measure:a,initialRect:o,config:s=!0}=e;const u=v.useRef(!1),{x:c,y:d}=typeof s=="boolean"?{x:s,y:s}:s;qa(()=>{if(!c&&!d||!n){u.current=!1;return}if(u.current||!o)return;const g=n?.node.current;if(!g||g.isConnected===!1)return;const y=a(g),h=cM(y,o);if(c||(h.x=0),d||(h.y=0),u.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const b=fM(g);b&&b.scrollBy({top:h.y,left:h.x})}},[n,c,d,o,a])}const Pp=v.createContext({...Ya,scaleX:1,scaleY:1});var Si;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Si||(Si={}));const hU=v.memo(function(n){var a,o,s,u;let{id:c,accessibility:d,autoScroll:p=!0,children:g,sensors:y=oU,collisionDetection:h=xH,measuring:b,modifiers:x,...w}=n;const C=v.useReducer(uU,void 0,lU),[R,T]=C,[O,M]=cH(),[A,I]=v.useState(Si.Uninitialized),j=A===Si.Initialized,{draggable:{active:k,nodes:D,translate:z},droppable:{containers:F}}=R,G=k!=null?D.get(k):null,J=v.useRef({initial:null,translated:null}),Y=v.useMemo(()=>{var vt;return k!=null?{id:k,data:(vt=G?.data)!=null?vt:iU,rect:J}:null},[k,G]),U=v.useRef(null),[_,L]=v.useState(null),[$,K]=v.useState(null),V=xc(w,Object.values(w)),X=$c("DndDescribedBy",c),ee=v.useMemo(()=>F.getEnabled(),[F]),q=dU(b),{droppableRects:se,measureDroppableContainers:N,measuringScheduled:B}=$H(ee,{dragging:j,dependencies:[z.x,z.y],config:q.droppable}),W=KH(D,k),re=v.useMemo(()=>$?Mh($):null,[$]),Re=ft(),le=XH(W,q.draggable.measure);fU({activeNode:k!=null?D.get(k):null,config:Re.layoutShiftCompensation,initialRect:le,measure:q.draggable.measure});const me=OR(W,q.draggable.measure,le),ge=OR(W?W.parentElement:null),ce=v.useRef({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:se,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Te=F.getNodeFor((a=ce.current.over)==null?void 0:a.id),ve=aU({measure:q.dragOverlay.measure}),Pe=(o=ve.nodeRef.current)!=null?o:W,Me=j?(s=ve.rect)!=null?s:me:null,Le=!!(ve.nodeRef.current&&ve.rect),Fe=JH(Le?null:me),Oe=SM(Pe?_r(Pe):null),He=WH(j?Te??W:null),be=rU(He),Ue=CM(x,{transform:{x:z.x-Fe.x,y:z.y-Fe.y,scaleX:1,scaleY:1},activatorEvent:$,active:Y,activeNodeRect:me,containerNodeRect:ge,draggingNodeRect:Me,over:ce.current.over,overlayNodeRect:ve.rect,scrollableAncestors:He,scrollableAncestorRects:be,windowRect:Oe}),Ze=re?Al(re,z):null,it=eU(He),de=AR(it),we=AR(it,[me]),Ke=Al(Ue,de),De=Me?CH(Me,Ue):null,Ie=Y&&De?h({active:Y,collisionRect:De,droppableRects:se,droppableContainers:ee,pointerCoordinates:Ze}):null,yt=uM(Ie,"id"),[ut,ht]=v.useState(null),Ot=Le?Ue:Al(Ue,we),Dt=RH(Ot,(u=ut?.rect)!=null?u:null,me),Jt=v.useRef(null),rn=v.useCallback((vt,gt)=>{let{sensor:Lt,options:un}=gt;if(U.current==null)return;const je=D.get(U.current);if(!je)return;const ot=vt.nativeEvent,ke=new Lt({active:U.current,activeNode:je,event:ot,options:un,context:ce,onAbort(Ge){if(!D.get(Ge))return;const{onDragAbort:Et}=V.current,H={id:Ge};Et?.(H),O({type:"onDragAbort",event:H})},onPending(Ge,et,Et,H){if(!D.get(Ge))return;const{onDragPending:ne}=V.current,ye={id:Ge,constraint:et,initialCoordinates:Et,offset:H};ne?.(ye),O({type:"onDragPending",event:ye})},onStart(Ge){const et=U.current;if(et==null)return;const Et=D.get(et);if(!Et)return;const{onDragStart:H}=V.current,Z={activatorEvent:ot,active:{id:et,data:Et.data,rect:J}};cr.unstable_batchedUpdates(()=>{H?.(Z),I(Si.Initializing),T({type:ar.DragStart,initialCoordinates:Ge,active:et}),O({type:"onDragStart",event:Z}),L(Jt.current),K(ot)})},onMove(Ge){T({type:ar.DragMove,coordinates:Ge})},onEnd:ze(ar.DragEnd),onCancel:ze(ar.DragCancel)});Jt.current=ke;function ze(Ge){return async function(){const{active:Et,collisions:H,over:Z,scrollAdjustedTranslate:ne}=ce.current;let ye=null;if(Et&&ne){const{cancelDrop:xe}=V.current;ye={activatorEvent:ot,active:Et,collisions:H,delta:ne,over:Z},Ge===ar.DragEnd&&typeof xe=="function"&&await Promise.resolve(xe(ye))&&(Ge=ar.DragCancel)}U.current=null,cr.unstable_batchedUpdates(()=>{T({type:Ge}),I(Si.Uninitialized),ht(null),L(null),K(null),Jt.current=null;const xe=Ge===ar.DragEnd?"onDragEnd":"onDragCancel";if(ye){const qe=V.current[xe];qe?.(ye),O({type:xe,event:ye})}})}}},[D]),Wt=v.useCallback((vt,gt)=>(Lt,un)=>{const je=Lt.nativeEvent,ot=D.get(un);if(U.current!==null||!ot||je.dndKit||je.defaultPrevented)return;const ke={active:ot};vt(Lt,gt.options,ke)===!0&&(je.dndKit={capturedBy:gt.sensor},U.current=un,rn(Lt,gt))},[D,rn]),We=GH(y,Wt);tU(y),qa(()=>{me&&A===Si.Initializing&&I(Si.Initialized)},[me,A]),v.useEffect(()=>{const{onDragMove:vt}=V.current,{active:gt,activatorEvent:Lt,collisions:un,over:je}=ce.current;if(!gt||!Lt)return;const ot={active:gt,activatorEvent:Lt,collisions:un,delta:{x:Ke.x,y:Ke.y},over:je};cr.unstable_batchedUpdates(()=>{vt?.(ot),O({type:"onDragMove",event:ot})})},[Ke.x,Ke.y]),v.useEffect(()=>{const{active:vt,activatorEvent:gt,collisions:Lt,droppableContainers:un,scrollAdjustedTranslate:je}=ce.current;if(!vt||U.current==null||!gt||!je)return;const{onDragOver:ot}=V.current,ke=un.get(yt),ze=ke&&ke.rect.current?{id:ke.id,rect:ke.rect.current,data:ke.data,disabled:ke.disabled}:null,Ge={active:vt,activatorEvent:gt,collisions:Lt,delta:{x:je.x,y:je.y},over:ze};cr.unstable_batchedUpdates(()=>{ht(ze),ot?.(Ge),O({type:"onDragOver",event:Ge})})},[yt]),qa(()=>{ce.current={activatorEvent:$,active:Y,activeNode:W,collisionRect:De,collisions:Ie,droppableRects:se,draggableNodes:D,draggingNode:Pe,draggingNodeRect:Me,droppableContainers:F,over:ut,scrollableAncestors:He,scrollAdjustedTranslate:Ke},J.current={initial:Me,translated:De}},[Y,W,Ie,De,D,Pe,Me,se,F,ut,He,Ke]),VH({...Re,delta:z,draggingRect:De,pointerCoordinates:Ze,scrollableAncestors:He,scrollableAncestorRects:be});const xt=v.useMemo(()=>({active:Y,activeNode:W,activeNodeRect:me,activatorEvent:$,collisions:Ie,containerNodeRect:ge,dragOverlay:ve,draggableNodes:D,droppableContainers:F,droppableRects:se,over:ut,measureDroppableContainers:N,scrollableAncestors:He,scrollableAncestorRects:be,measuringConfiguration:q,measuringScheduled:B,windowRect:Oe}),[Y,W,me,$,Ie,ge,ve,D,F,se,ut,N,He,be,q,B,Oe]),$t=v.useMemo(()=>({activatorEvent:$,activators:We,active:Y,activeNodeRect:me,ariaDescribedById:{draggable:X},dispatch:T,draggableNodes:D,over:ut,measureDroppableContainers:N}),[$,We,Y,me,T,X,D,ut,N]);return Ne.createElement(lM.Provider,{value:M},Ne.createElement(Xc.Provider,{value:$t},Ne.createElement(EM.Provider,{value:xt},Ne.createElement(Pp.Provider,{value:Dt},g)),Ne.createElement(cU,{disabled:d?.restoreFocus===!1})),Ne.createElement(hH,{...d,hiddenTextDescribedById:X}));function ft(){const vt=_?.autoScrollEnabled===!1,gt=typeof p=="object"?p.enabled===!1:p===!1,Lt=j&&!vt&&!gt;return typeof p=="object"?{...p,enabled:Lt}:{enabled:Lt}}}),pU=v.createContext(null),NR="button",gU="Draggable";function TM(e){let{id:n,data:a,disabled:o=!1,attributes:s}=e;const u=$c(gU),{activators:c,activatorEvent:d,active:p,activeNodeRect:g,ariaDescribedById:y,draggableNodes:h,over:b}=v.useContext(Xc),{role:x=NR,roleDescription:w="draggable",tabIndex:C=0}=s??{},R=p?.id===n,T=v.useContext(R?Pp:pU),[O,M]=Th(),[A,I]=Th(),j=nU(c,n),k=xc(a);qa(()=>(h.set(n,{id:n,key:u,node:O,activatorNode:A,data:k}),()=>{const z=h.get(n);z&&z.key===u&&h.delete(n)}),[h,n]);const D=v.useMemo(()=>({role:x,tabIndex:C,"aria-disabled":o,"aria-pressed":R&&x===NR?!0:void 0,"aria-roledescription":w,"aria-describedby":y.draggable}),[o,x,C,R,w,y.draggable]);return{active:p,activatorEvent:d,activeNodeRect:g,attributes:D,isDragging:R,listeners:o?void 0:j,node:O,over:b,setNodeRef:M,setActivatorNodeRef:I,transform:T}}function OM(){return v.useContext(EM)}const mU="Droppable",yU={timeout:25};function MM(e){let{data:n,disabled:a=!1,id:o,resizeObserverConfig:s}=e;const u=$c(mU),{active:c,dispatch:d,over:p,measureDroppableContainers:g}=v.useContext(Xc),y=v.useRef({disabled:a}),h=v.useRef(!1),b=v.useRef(null),x=v.useRef(null),{disabled:w,updateMeasurementsFor:C,timeout:R}={...yU,...s},T=xc(C??o),O=v.useCallback(()=>{if(!h.current){h.current=!0;return}x.current!=null&&clearTimeout(x.current),x.current=setTimeout(()=>{g(Array.isArray(T.current)?T.current:[T.current]),x.current=null},R)},[R]),M=kp({callback:O,disabled:w||!c}),A=v.useCallback((D,z)=>{M&&(z&&(M.unobserve(z),h.current=!1),D&&M.observe(D))},[M]),[I,j]=Th(A),k=xc(n);return v.useEffect(()=>{!M||!I.current||(M.disconnect(),h.current=!1,M.observe(I.current))},[I,M]),v.useEffect(()=>(d({type:ar.RegisterDroppable,element:{id:o,key:u,disabled:a,node:I,rect:b,data:k}}),()=>d({type:ar.UnregisterDroppable,key:u,id:o})),[o]),v.useEffect(()=>{a!==y.current.disabled&&(d({type:ar.SetDroppableDisabled,id:o,key:u,disabled:a}),y.current.disabled=a)},[o,u,a,d]),{active:c,rect:b,isOver:p?.id===o,node:I,over:p,setNodeRef:j}}function vU(e){let{animation:n,children:a}=e;const[o,s]=v.useState(null),[u,c]=v.useState(null),d=Oh(a);return!a&&!o&&d&&s(d),qa(()=>{if(!u)return;const p=o?.key,g=o?.props.id;if(p==null||g==null){s(null);return}Promise.resolve(n(g,u)).then(()=>{s(null)})},[n,o,u]),Ne.createElement(Ne.Fragment,null,a,o?v.cloneElement(o,{ref:c}):null)}const bU={x:0,y:0,scaleX:1,scaleY:1};function xU(e){let{children:n}=e;return Ne.createElement(Xc.Provider,{value:RM},Ne.createElement(Pp.Provider,{value:bU},n))}const SU={position:"fixed",touchAction:"none"},wU=e=>Ip(e)?"transform 250ms ease":void 0,RU=v.forwardRef((e,n)=>{let{as:a,activatorEvent:o,adjustScale:s,children:u,className:c,rect:d,style:p,transform:g,transition:y=wU}=e;if(!d)return null;const h=s?g:{...g,scaleX:1,scaleY:1},b={...SU,width:d.width,height:d.height,top:d.top,left:d.left,transform:Di.Transform.toString(h),transformOrigin:s&&o?gH(o,d):void 0,transition:typeof y=="function"?y(o):y,...p};return Ne.createElement(a,{className:c,style:b,ref:n},u)}),EU=e=>n=>{let{active:a,dragOverlay:o}=n;const s={},{styles:u,className:c}=e;if(u!=null&&u.active)for(const[d,p]of Object.entries(u.active))p!==void 0&&(s[d]=a.node.style.getPropertyValue(d),a.node.style.setProperty(d,p));if(u!=null&&u.dragOverlay)for(const[d,p]of Object.entries(u.dragOverlay))p!==void 0&&o.node.style.setProperty(d,p);return c!=null&&c.active&&a.node.classList.add(c.active),c!=null&&c.dragOverlay&&o.node.classList.add(c.dragOverlay),function(){for(const[p,g]of Object.entries(s))a.node.style.setProperty(p,g);c!=null&&c.active&&a.node.classList.remove(c.active)}},CU=e=>{let{transform:{initial:n,final:a}}=e;return[{transform:Di.Transform.toString(n)},{transform:Di.Transform.toString(a)}]},TU={duration:250,easing:"ease",keyframes:CU,sideEffects:EU({styles:{active:{opacity:"0"}}})};function OU(e){let{config:n,draggableNodes:a,droppableContainers:o,measuringConfiguration:s}=e;return Np((u,c)=>{if(n===null)return;const d=a.get(u);if(!d)return;const p=d.node.current;if(!p)return;const g=wM(c);if(!g)return;const{transform:y}=_r(c).getComputedStyle(c),h=dM(y);if(!h)return;const b=typeof n=="function"?n:MU(n);return vM(p,s.draggable.measure),b({active:{id:u,data:d.data,node:p,rect:s.draggable.measure(p)},draggableNodes:a,dragOverlay:{node:c,rect:s.dragOverlay.measure(g)},droppableContainers:o,measuringConfiguration:s,transform:h})})}function MU(e){const{duration:n,easing:a,sideEffects:o,keyframes:s}={...TU,...e};return u=>{let{active:c,dragOverlay:d,transform:p,...g}=u;if(!n)return;const y={x:d.rect.left-c.rect.left,y:d.rect.top-c.rect.top},h={scaleX:p.scaleX!==1?c.rect.width*p.scaleX/d.rect.width:1,scaleY:p.scaleY!==1?c.rect.height*p.scaleY/d.rect.height:1},b={x:p.x-y.x,y:p.y-y.y,...h},x=s({...g,active:c,dragOverlay:d,transform:{initial:p,final:b}}),[w]=x,C=x[x.length-1];if(JSON.stringify(w)===JSON.stringify(C))return;const R=o?.({active:c,dragOverlay:d,...g}),T=d.node.animate(x,{duration:n,easing:a,fill:"forwards"});return new Promise(O=>{T.onfinish=()=>{R?.(),O()}})}}let IR=0;function AU(e){return v.useMemo(()=>{if(e!=null)return IR++,IR},[e])}const DU=Ne.memo(e=>{let{adjustScale:n=!1,children:a,dropAnimation:o,style:s,transition:u,modifiers:c,wrapperElement:d="div",className:p,zIndex:g=999}=e;const{activatorEvent:y,active:h,activeNodeRect:b,containerNodeRect:x,draggableNodes:w,droppableContainers:C,dragOverlay:R,over:T,measuringConfiguration:O,scrollableAncestors:M,scrollableAncestorRects:A,windowRect:I}=OM(),j=v.useContext(Pp),k=AU(h?.id),D=CM(c,{activatorEvent:y,active:h,activeNodeRect:b,containerNodeRect:x,draggingNodeRect:R.rect,over:T,overlayNodeRect:R.rect,scrollableAncestors:M,scrollableAncestorRects:A,transform:j,windowRect:I}),z=Qv(b),F=OU({config:o,draggableNodes:w,droppableContainers:C,measuringConfiguration:O}),G=z?R.setRef:void 0;return Ne.createElement(xU,null,Ne.createElement(vU,{animation:F},h&&k?Ne.createElement(RU,{key:k,id:h.id,ref:G,as:d,activatorEvent:y,adjustScale:n,className:p,transition:u,rect:z,style:{zIndex:g,...s},transform:D},a):null))});function Zv(e,n,a){const o=e.slice();return o.splice(a<0?o.length+a:a,0,o.splice(n,1)[0]),o}function NU(e,n){return e.reduce((a,o,s)=>{const u=n.get(o);return u&&(a[s]=u),a},Array(e.length))}function _f(e){return e!==null&&e>=0}function IU(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==n[a])return!1;return!0}function jU(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const AM=e=>{let{rects:n,activeIndex:a,overIndex:o,index:s}=e;const u=Zv(n,o,a),c=n[s],d=u[s];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},Hf={scaleX:1,scaleY:1},kU=e=>{var n;let{activeIndex:a,activeNodeRect:o,index:s,rects:u,overIndex:c}=e;const d=(n=u[a])!=null?n:o;if(!d)return null;if(s===a){const g=u[c];return g?{x:0,y:a<c?g.top+g.height-(d.top+d.height):g.top-d.top,...Hf}:null}const p=PU(u,s,a);return s>a&&s<=c?{x:0,y:-d.height-p,...Hf}:s<a&&s>=c?{x:0,y:d.height+p,...Hf}:{x:0,y:0,...Hf}};function PU(e,n,a){const o=e[n],s=e[n-1],u=e[n+1];return o?a<n?s?o.top-(s.top+s.height):u?u.top-(o.top+o.height):0:u?u.top-(o.top+o.height):s?o.top-(s.top+s.height):0:0}const DM="Sortable",NM=Ne.createContext({activeIndex:-1,containerId:DM,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:AM,disabled:{draggable:!1,droppable:!1}});function LU(e){let{children:n,id:a,items:o,strategy:s=AM,disabled:u=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:g,measureDroppableContainers:y}=OM(),h=$c(DM,a),b=d.rect!==null,x=v.useMemo(()=>o.map(j=>typeof j=="object"&&"id"in j?j.id:j),[o]),w=c!=null,C=c?x.indexOf(c.id):-1,R=g?x.indexOf(g.id):-1,T=v.useRef(x),O=!IU(x,T.current),M=R!==-1&&C===-1||O,A=jU(u);qa(()=>{O&&w&&y(x)},[O,x,w,y]),v.useEffect(()=>{T.current=x},[x]);const I=v.useMemo(()=>({activeIndex:C,containerId:h,disabled:A,disableTransforms:M,items:x,overIndex:R,useDragOverlay:b,sortedRects:NU(x,p),strategy:s}),[C,h,A.draggable,A.droppable,M,x,R,p,b,s]);return Ne.createElement(NM.Provider,{value:I},n)}const zU=e=>{let{id:n,items:a,activeIndex:o,overIndex:s}=e;return Zv(a,o,s).indexOf(n)},_U=e=>{let{containerId:n,isSorting:a,wasDragging:o,index:s,items:u,newIndex:c,previousItems:d,previousContainerId:p,transition:g}=e;return!g||!o||d!==u&&s===c?!1:a?!0:c!==s&&n===p},HU={duration:200,easing:"ease"},IM="transform",UU=Di.Transition.toString({property:IM,duration:0,easing:"linear"}),FU={roleDescription:"sortable"};function BU(e){let{disabled:n,index:a,node:o,rect:s}=e;const[u,c]=v.useState(null),d=v.useRef(a);return qa(()=>{if(!n&&a!==d.current&&o.current){const p=s.current;if(p){const g=Ql(o.current,{ignoreTransform:!0}),y={x:p.left-g.left,y:p.top-g.top,scaleX:p.width/g.width,scaleY:p.height/g.height};(y.x||y.y)&&c(y)}}a!==d.current&&(d.current=a)},[n,a,o,s]),v.useEffect(()=>{u&&c(null)},[u]),u}function VU(e){let{animateLayoutChanges:n=_U,attributes:a,disabled:o,data:s,getNewIndex:u=zU,id:c,strategy:d,resizeObserverConfig:p,transition:g=HU}=e;const{items:y,containerId:h,activeIndex:b,disabled:x,disableTransforms:w,sortedRects:C,overIndex:R,useDragOverlay:T,strategy:O}=v.useContext(NM),M=qU(o,x),A=y.indexOf(c),I=v.useMemo(()=>({sortable:{containerId:h,index:A,items:y},...s}),[h,s,A,y]),j=v.useMemo(()=>y.slice(y.indexOf(c)),[y,c]),{rect:k,node:D,isOver:z,setNodeRef:F}=MM({id:c,data:I,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...p}}),{active:G,activatorEvent:J,activeNodeRect:Y,attributes:U,setNodeRef:_,listeners:L,isDragging:$,over:K,setActivatorNodeRef:V,transform:X}=TM({id:c,data:I,attributes:{...FU,...a},disabled:M.draggable}),ee=eH(F,_),q=!!G,se=q&&!w&&_f(b)&&_f(R),N=!T&&$,B=N&&se?X:null,re=se?B??(d??O)({rects:C,activeNodeRect:Y,activeIndex:b,overIndex:R,index:A}):null,Re=_f(b)&&_f(R)?u({id:c,items:y,activeIndex:b,overIndex:R}):A,le=G?.id,me=v.useRef({activeId:le,items:y,newIndex:Re,containerId:h}),ge=y!==me.current.items,ce=n({active:G,containerId:h,isDragging:$,isSorting:q,id:c,index:A,items:y,newIndex:me.current.newIndex,previousItems:me.current.items,previousContainerId:me.current.containerId,transition:g,wasDragging:me.current.activeId!=null}),Te=BU({disabled:!ce,index:A,node:D,rect:k});return v.useEffect(()=>{q&&me.current.newIndex!==Re&&(me.current.newIndex=Re),h!==me.current.containerId&&(me.current.containerId=h),y!==me.current.items&&(me.current.items=y)},[q,Re,h,y]),v.useEffect(()=>{if(le===me.current.activeId)return;if(le!=null&&me.current.activeId==null){me.current.activeId=le;return}const Pe=setTimeout(()=>{me.current.activeId=le},50);return()=>clearTimeout(Pe)},[le]),{active:G,activeIndex:b,attributes:U,data:I,rect:k,index:A,newIndex:Re,items:y,isOver:z,isSorting:q,isDragging:$,listeners:L,node:D,overIndex:R,over:K,setNodeRef:ee,setActivatorNodeRef:V,setDroppableNodeRef:F,setDraggableNodeRef:_,transform:Te??re,transition:ve()};function ve(){if(Te||ge&&me.current.newIndex===A)return UU;if(!(N&&!Ip(J)||!g)&&(q||ce))return Di.Transition.toString({...g,property:IM})}}function qU(e,n){var a,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(a=e?.draggable)!=null?a:n.draggable,droppable:(o=e?.droppable)!=null?o:n.droppable}}function Nh(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const YU=[Zt.Down,Zt.Right,Zt.Up,Zt.Left],KU=(e,n)=>{let{context:{active:a,collisionRect:o,droppableRects:s,droppableContainers:u,over:c,scrollableAncestors:d}}=n;if(YU.includes(e.code)){if(e.preventDefault(),!a||!o)return;const p=[];u.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const b=s.get(h.id);if(b)switch(e.code){case Zt.Down:o.top<b.top&&p.push(h);break;case Zt.Up:o.top>b.top&&p.push(h);break;case Zt.Left:o.left>b.left&&p.push(h);break;case Zt.Right:o.left<b.left&&p.push(h);break}});const g=vH({collisionRect:o,droppableRects:s,droppableContainers:p});let y=uM(g,"id");if(y===c?.id&&g.length>1&&(y=g[1].id),y!=null){const h=u.get(a.id),b=u.get(y),x=b?s.get(b.id):null,w=b?.node.current;if(w&&x&&h&&b){const R=jp(w).some((j,k)=>d[k]!==j),T=jM(h,b),O=GU(h,b),M=R||!T?{x:0,y:0}:{x:O?o.width-x.width:0,y:O?o.height-x.height:0},A={x:x.left,y:x.top};return M.x&&M.y?A:Sc(A,M)}}}};function jM(e,n){return!Nh(e)||!Nh(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function GU(e,n){return!Nh(e)||!Nh(n)||!jM(e,n)?!1:e.data.current.sortable.index<n.data.current.sortable.index}function Lo({className:e,size:n="default",...a}){return S.jsx("div",{"data-slot":"card","data-size":n,className:Qe("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-lg bg-card py-(--card-spacing) text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",e),...a})}function $U({className:e,...n}){return S.jsx("div",{"data-slot":"card-header",className:Qe("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...n})}function XU({className:e,...n}){return S.jsx("div",{"data-slot":"card-content",className:Qe("px-(--card-spacing)",e),...n})}const kM=v.createContext(void 0);function QU(){const e=v.useContext(kM);if(e===void 0)throw new Error(Rn(63));return e}const ZU="data-checked",JU="data-unchecked",PM={...Yl,checked(e){return e?{[ZU]:""}:{[JU]:""}}},WU=v.forwardRef(function(n,a){const{checked:o,className:s,defaultChecked:u,"aria-labelledby":c,form:d,id:p,inputRef:g,name:y,nativeButton:h=!1,onCheckedChange:b,readOnly:x=!1,required:w=!1,disabled:C=!1,render:R,uncheckedValue:T,value:O,style:M,...A}=n,{clearErrors:I}=Vc(),{state:j,setTouched:k,setDirty:D,validityData:z,setFilled:F,validationMode:G,disabled:J,name:Y,validation:U}=qo(),{labelId:_}=Cs(),L=J||C,$=Y??y,K=v.useRef(null),V=Gr(K,g,U.inputRef),X=v.useRef(null),ee=qc(L,X),q=Tr(),se=Kl({id:p}),N=h?void 0:se,[B,W]=bs({controlled:o,default:!!u,name:"Switch",state:"checked"});Yc(X,q,B,void 0,!L,y),_e(()=>{F(B)},[B,F]),ql(B,()=>{I($),D(B!==z.initialValue),U.change(B)});const{getButtonProps:re,buttonRef:Re}=mo({disabled:L,native:h}),le=Hv(c,_,K,!h,N,A["aria-label"]),me={id:h?se:q,role:"switch","aria-checked":B,"aria-readonly":x||void 0,"aria-required":w||void 0,"aria-labelledby":le,onFocus(){ee(!0)},onBlur(){const ve=K.current;!ve||L||(k(!0),ee(!1),G==="onBlur"&&U.commit(ve.checked))},onClick(ve){if(x||L)return;ve.preventDefault();const Pe=K.current;Pe&&hs(Pe,ve)}},ge={...U.getValidationProps(L),checked:B,disabled:L,form:d,id:N,name:$,required:w,style:$?Vh:Ic,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:V,onChange(ve){if(ve.nativeEvent.defaultPrevented)return;if(x){ve.preventDefault();return}const Pe=ve.currentTarget.checked,Me=dt(zr,ve.nativeEvent);b?.(Pe,Me),!Me.isCanceled&&W(Pe)},onClick(ve){ve.stopPropagation()},onFocus(){X.current?.focus()},...O!==void 0?{value:O}:Gt},ce=v.useMemo(()=>({...j,checked:B,disabled:L,readOnly:x,required:w}),[j,B,L,x,w]),Te=Mt("span",n,{state:ce,ref:[a,X,Re],props:[me,A,re,ve=>U.getValidationProps(L,ve)],stateAttributesMapping:PM});return S.jsxs(kM.Provider,{value:ce,children:[Te,!B&&$&&T!==void 0&&S.jsx("input",{type:"hidden",form:d,name:$,value:T,disabled:L}),S.jsx("input",{...ge,suppressHydrationWarning:!0})]})}),eF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=QU();return Mt("span",n,{state:d,ref:a,stateAttributesMapping:PM,props:c})});function tF({className:e,...n}){return S.jsx(WU,{"data-slot":"switch",className:Qe(`
|
|
44
|
+
`},hH={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:a}=e;return a?"Draggable item "+n.id+" was moved over droppable area "+a.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:a}=e;return a?"Draggable item "+n.id+" was dropped over droppable area "+a.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function pH(e){let{announcements:n=hH,container:a,hiddenTextDescribedById:o,screenReaderInstructions:s=fH}=e;const{announce:u,announcement:c}=uH(),d=$c("DndLiveRegion"),[p,g]=v.useState(!1);if(v.useEffect(()=>{g(!0)},[]),cH(v.useMemo(()=>({onDragStart(h){let{active:b}=h;u(n.onDragStart({active:b}))},onDragMove(h){let{active:b,over:x}=h;n.onDragMove&&u(n.onDragMove({active:b,over:x}))},onDragOver(h){let{active:b,over:x}=h;u(n.onDragOver({active:b,over:x}))},onDragEnd(h){let{active:b,over:x}=h;u(n.onDragEnd({active:b,over:x}))},onDragCancel(h){let{active:b,over:x}=h;u(n.onDragCancel({active:b,over:x}))}}),[u,n])),!p)return null;const y=Ne.createElement(Ne.Fragment,null,Ne.createElement(sH,{id:o,value:s.draggable}),Ne.createElement(lH,{id:d,announcement:c}));return a?cr.createPortal(y,a):y}var ar;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ar||(ar={}));function Ah(){}function U0(e,n){return v.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function gH(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return v.useMemo(()=>[...n].filter(o=>o!=null),[...n])}const Ya=Object.freeze({x:0,y:0});function qv(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function mH(e,n){const a=Mh(e);if(!a)return"0 0";const o={x:(a.x-n.left)/n.width*100,y:(a.y-n.top)/n.height*100};return o.x+"% "+o.y+"%"}function Yv(e,n){let{data:{value:a}}=e,{data:{value:o}}=n;return a-o}function yH(e,n){let{data:{value:a}}=e,{data:{value:o}}=n;return o-a}function Ey(e){let{left:n,top:a,height:o,width:s}=e;return[{x:n,y:a},{x:n+s,y:a},{x:n,y:a+o},{x:n+s,y:a+o}]}function lM(e,n){if(!e||e.length===0)return null;const[a]=e;return a[n]}function xR(e,n,a){return n===void 0&&(n=e.left),a===void 0&&(a=e.top),{x:n+e.width*.5,y:a+e.height*.5}}const vH=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=xR(n,n.left,n.top),u=[];for(const c of o){const{id:d}=c,p=a.get(d);if(p){const g=qv(xR(p),s);u.push({id:d,data:{droppableContainer:c,value:g}})}}return u.sort(Yv)},bH=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=Ey(n),u=[];for(const c of o){const{id:d}=c,p=a.get(d);if(p){const g=Ey(p),y=s.reduce((b,x,w)=>b+qv(g[w],x),0),h=Number((y/4).toFixed(4));u.push({id:d,data:{droppableContainer:c,value:h}})}}return u.sort(Yv)};function xH(e,n){const a=Math.max(n.top,e.top),o=Math.max(n.left,e.left),s=Math.min(n.left+n.width,e.left+e.width),u=Math.min(n.top+n.height,e.top+e.height),c=s-o,d=u-a;if(o<s&&a<u){const p=n.width*n.height,g=e.width*e.height,y=c*d,h=y/(p+g-y);return Number(h.toFixed(4))}return 0}const SH=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=[];for(const u of o){const{id:c}=u,d=a.get(c);if(d){const p=xH(d,n);p>0&&s.push({id:c,data:{droppableContainer:u,value:p}})}}return s.sort(yH)};function wH(e,n){const{top:a,left:o,bottom:s,right:u}=n;return a<=e.y&&e.y<=s&&o<=e.x&&e.x<=u}const RH=e=>{let{droppableContainers:n,droppableRects:a,pointerCoordinates:o}=e;if(!o)return[];const s=[];for(const u of n){const{id:c}=u,d=a.get(c);if(d&&wH(o,d)){const g=Ey(d).reduce((h,b)=>h+qv(o,b),0),y=Number((g/4).toFixed(4));s.push({id:c,data:{droppableContainer:u,value:y}})}}return s.sort(Yv)};function EH(e,n,a){return{...e,scaleX:n&&a?n.width/a.width:1,scaleY:n&&a?n.height/a.height:1}}function uM(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Ya}function CH(e){return function(a){for(var o=arguments.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=arguments[u];return s.reduce((c,d)=>({...c,top:c.top+e*d.y,bottom:c.bottom+e*d.y,left:c.left+e*d.x,right:c.right+e*d.x}),{...a})}}const TH=CH(1);function cM(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function OH(e,n,a){const o=cM(n);if(!o)return e;const{scaleX:s,scaleY:u,x:c,y:d}=o,p=e.left-c-(1-s)*parseFloat(a),g=e.top-d-(1-u)*parseFloat(a.slice(a.indexOf(" ")+1)),y=s?e.width/s:e.width,h=u?e.height/u:e.height;return{width:y,height:h,top:g,right:p+y,bottom:g+h,left:p}}const MH={ignoreTransform:!1};function Ql(e,n){n===void 0&&(n=MH);let a=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:g,transformOrigin:y}=_r(e).getComputedStyle(e);g&&(a=OH(a,g,y))}const{top:o,left:s,width:u,height:c,bottom:d,right:p}=a;return{top:o,left:s,width:u,height:c,bottom:d,right:p}}function SR(e){return Ql(e,{ignoreTransform:!0})}function AH(e){const n=e.innerWidth,a=e.innerHeight;return{top:0,left:0,right:n,bottom:a,width:n,height:a}}function DH(e,n){return n===void 0&&(n=_r(e).getComputedStyle(e)),n.position==="fixed"}function NH(e,n){n===void 0&&(n=_r(e).getComputedStyle(e));const a=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const u=n[s];return typeof u=="string"?a.test(u):!1})}function jp(e,n){const a=[];function o(s){if(n!=null&&a.length>=n||!s)return a;if(Vv(s)&&s.scrollingElement!=null&&!a.includes(s.scrollingElement))return a.push(s.scrollingElement),a;if(!Kc(s)||oM(s)||a.includes(s))return a;const u=_r(e).getComputedStyle(s);return s!==e&&NH(s,u)&&a.push(s),DH(s,u)?a:o(s.parentNode)}return e?o(e):a}function dM(e){const[n]=jp(e,1);return n??null}function F0(e){return!Dp||!e?null:$l(e)?e:Bv(e)?Vv(e)||e===Xl(e).scrollingElement?window:Kc(e)?e:null:null}function fM(e){return $l(e)?e.scrollX:e.scrollLeft}function hM(e){return $l(e)?e.scrollY:e.scrollTop}function Cy(e){return{x:fM(e),y:hM(e)}}var ur;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ur||(ur={}));function pM(e){return!Dp||!e?!1:e===document.scrollingElement}function gM(e){const n={x:0,y:0},a=pM(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-a.width,y:e.scrollHeight-a.height},s=e.scrollTop<=n.y,u=e.scrollLeft<=n.x,c=e.scrollTop>=o.y,d=e.scrollLeft>=o.x;return{isTop:s,isLeft:u,isBottom:c,isRight:d,maxScroll:o,minScroll:n}}const IH={x:.2,y:.2};function jH(e,n,a,o,s){let{top:u,left:c,right:d,bottom:p}=a;o===void 0&&(o=10),s===void 0&&(s=IH);const{isTop:g,isBottom:y,isLeft:h,isRight:b}=gM(e),x={x:0,y:0},w={x:0,y:0},C={height:n.height*s.y,width:n.width*s.x};return!g&&u<=n.top+C.height?(x.y=ur.Backward,w.y=o*Math.abs((n.top+C.height-u)/C.height)):!y&&p>=n.bottom-C.height&&(x.y=ur.Forward,w.y=o*Math.abs((n.bottom-C.height-p)/C.height)),!b&&d>=n.right-C.width?(x.x=ur.Forward,w.x=o*Math.abs((n.right-C.width-d)/C.width)):!h&&c<=n.left+C.width&&(x.x=ur.Backward,w.x=o*Math.abs((n.left+C.width-c)/C.width)),{direction:x,speed:w}}function kH(e){if(e===document.scrollingElement){const{innerWidth:u,innerHeight:c}=window;return{top:0,left:0,right:u,bottom:c,width:u,height:c}}const{top:n,left:a,right:o,bottom:s}=e.getBoundingClientRect();return{top:n,left:a,right:o,bottom:s,width:e.clientWidth,height:e.clientHeight}}function mM(e){return e.reduce((n,a)=>Al(n,Cy(a)),Ya)}function PH(e){return e.reduce((n,a)=>n+fM(a),0)}function LH(e){return e.reduce((n,a)=>n+hM(a),0)}function yM(e,n){if(n===void 0&&(n=Ql),!e)return;const{top:a,left:o,bottom:s,right:u}=n(e);dM(e)&&(s<=0||u<=0||a>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const zH=[["x",["left","right"],PH],["y",["top","bottom"],LH]];class Kv{constructor(n,a){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=jp(a),s=mM(o);this.rect={...n},this.width=n.width,this.height=n.height;for(const[u,c,d]of zH)for(const p of c)Object.defineProperty(this,p,{get:()=>{const g=d(o),y=s[u]-g;return this.rect[p]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class cc{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(a=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...a)})},this.target=n}add(n,a,o){var s;(s=this.target)==null||s.addEventListener(n,a,o),this.listeners.push([n,a,o])}}function _H(e){const{EventTarget:n}=_r(e);return e instanceof n?e:Xl(e)}function B0(e,n){const a=Math.abs(e.x),o=Math.abs(e.y);return typeof n=="number"?Math.sqrt(a**2+o**2)>n:"x"in n&&"y"in n?a>n.x&&o>n.y:"x"in n?a>n.x:"y"in n?o>n.y:!1}var Ta;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ta||(Ta={}));function wR(e){e.preventDefault()}function HH(e){e.stopPropagation()}var Zt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Zt||(Zt={}));const vM={start:[Zt.Space,Zt.Enter],cancel:[Zt.Esc],end:[Zt.Space,Zt.Enter,Zt.Tab]},UH=(e,n)=>{let{currentCoordinates:a}=n;switch(e.code){case Zt.Right:return{...a,x:a.x+25};case Zt.Left:return{...a,x:a.x-25};case Zt.Down:return{...a,y:a.y+25};case Zt.Up:return{...a,y:a.y-25}}};class Gv{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:a}}=n;this.props=n,this.listeners=new cc(Xl(a)),this.windowListeners=new cc(_r(a)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ta.Resize,this.handleCancel),this.windowListeners.add(Ta.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ta.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:a}=this.props,o=n.node.current;o&&yM(o),a(Ya)}handleKeyDown(n){if(Ip(n)){const{active:a,context:o,options:s}=this.props,{keyboardCodes:u=vM,coordinateGetter:c=UH,scrollBehavior:d="smooth"}=s,{code:p}=n;if(u.end.includes(p)){this.handleEnd(n);return}if(u.cancel.includes(p)){this.handleCancel(n);return}const{collisionRect:g}=o.current,y=g?{x:g.left,y:g.top}:Ya;this.referenceCoordinates||(this.referenceCoordinates=y);const h=c(n,{active:a,context:o.current,currentCoordinates:y});if(h){const b=Sc(h,y),x={x:0,y:0},{scrollableAncestors:w}=o.current;for(const C of w){const R=n.code,{isTop:T,isRight:O,isLeft:M,isBottom:A,maxScroll:I,minScroll:j}=gM(C),k=kH(C),D={x:Math.min(R===Zt.Right?k.right-k.width/2:k.right,Math.max(R===Zt.Right?k.left:k.left+k.width/2,h.x)),y:Math.min(R===Zt.Down?k.bottom-k.height/2:k.bottom,Math.max(R===Zt.Down?k.top:k.top+k.height/2,h.y))},z=R===Zt.Right&&!O||R===Zt.Left&&!M,F=R===Zt.Down&&!A||R===Zt.Up&&!T;if(z&&D.x!==h.x){const G=C.scrollLeft+b.x,J=R===Zt.Right&&G<=I.x||R===Zt.Left&&G>=j.x;if(J&&!b.y){C.scrollTo({left:G,behavior:d});return}J?x.x=C.scrollLeft-G:x.x=R===Zt.Right?C.scrollLeft-I.x:C.scrollLeft-j.x,x.x&&C.scrollBy({left:-x.x,behavior:d});break}else if(F&&D.y!==h.y){const G=C.scrollTop+b.y,J=R===Zt.Down&&G<=I.y||R===Zt.Up&&G>=j.y;if(J&&!b.x){C.scrollTo({top:G,behavior:d});return}J?x.y=C.scrollTop-G:x.y=R===Zt.Down?C.scrollTop-I.y:C.scrollTop-j.y,x.y&&C.scrollBy({top:-x.y,behavior:d});break}}this.handleMove(n,Al(Sc(h,this.referenceCoordinates),x))}}}handleMove(n,a){const{onMove:o}=this.props;n.preventDefault(),o(a)}handleEnd(n){const{onEnd:a}=this.props;n.preventDefault(),this.detach(),a()}handleCancel(n){const{onCancel:a}=this.props;n.preventDefault(),this.detach(),a()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Gv.activators=[{eventName:"onKeyDown",handler:(e,n,a)=>{let{keyboardCodes:o=vM,onActivation:s}=n,{active:u}=a;const{code:c}=e.nativeEvent;if(o.start.includes(c)){const d=u.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),s?.({event:e.nativeEvent}),!0)}return!1}}];function RR(e){return!!(e&&"distance"in e)}function ER(e){return!!(e&&"delay"in e)}class $v{constructor(n,a,o){var s;o===void 0&&(o=_H(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=a;const{event:u}=n,{target:c}=u;this.props=n,this.events=a,this.document=Xl(c),this.documentListeners=new cc(this.document),this.listeners=new cc(o),this.windowListeners=new cc(_r(c)),this.initialCoordinates=(s=Mh(u))!=null?s:Ya,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:a,bypassActivationConstraint:o}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(Ta.Resize,this.handleCancel),this.windowListeners.add(Ta.DragStart,wR),this.windowListeners.add(Ta.VisibilityChange,this.handleCancel),this.windowListeners.add(Ta.ContextMenu,wR),this.documentListeners.add(Ta.Keydown,this.handleKeydown),a){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ER(a)){this.timeoutId=setTimeout(this.handleStart,a.delay),this.handlePending(a);return}if(RR(a)){this.handlePending(a);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,a){const{active:o,onPending:s}=this.props;s(o,n,this.initialCoordinates,a)}handleStart(){const{initialCoordinates:n}=this,{onStart:a}=this.props;n&&(this.activated=!0,this.documentListeners.add(Ta.Click,HH,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ta.SelectionChange,this.removeTextSelection),a(n))}handleMove(n){var a;const{activated:o,initialCoordinates:s,props:u}=this,{onMove:c,options:{activationConstraint:d}}=u;if(!s)return;const p=(a=Mh(n))!=null?a:Ya,g=Sc(s,p);if(!o&&d){if(RR(d)){if(d.tolerance!=null&&B0(g,d.tolerance))return this.handleCancel();if(B0(g,d.distance))return this.handleStart()}if(ER(d)&&B0(g,d.tolerance))return this.handleCancel();this.handlePending(d,g);return}n.cancelable&&n.preventDefault(),c(p)}handleEnd(){const{onAbort:n,onEnd:a}=this.props;this.detach(),this.activated||n(this.props.active),a()}handleCancel(){const{onAbort:n,onCancel:a}=this.props;this.detach(),this.activated||n(this.props.active),a()}handleKeydown(n){n.code===Zt.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const FH={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class bM extends $v{constructor(n){const{event:a}=n,o=Xl(a.target);super(n,FH,o)}}bM.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;return!a.isPrimary||a.button!==0?!1:(o?.({event:a}),!0)}}];const BH={move:{name:"mousemove"},end:{name:"mouseup"}};var Ty;(function(e){e[e.RightClick=2]="RightClick"})(Ty||(Ty={}));class xM extends $v{constructor(n){super(n,BH,Xl(n.event.target))}}xM.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;return a.button===Ty.RightClick?!1:(o?.({event:a}),!0)}}];const V0={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class SM extends $v{constructor(n){super(n,V0)}static setup(){return window.addEventListener(V0.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(V0.move.name,n)};function n(){}}}SM.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;const{touches:s}=a;return s.length>1?!1:(o?.({event:a}),!0)}}];var dc;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(dc||(dc={}));var Dh;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Dh||(Dh={}));function VH(e){let{acceleration:n,activator:a=dc.Pointer,canScroll:o,draggingRect:s,enabled:u,interval:c=5,order:d=Dh.TreeOrder,pointerCoordinates:p,scrollableAncestors:g,scrollableAncestorRects:y,delta:h,threshold:b}=e;const x=YH({delta:h,disabled:!u}),[w,C]=nH(),R=v.useRef({x:0,y:0}),T=v.useRef({x:0,y:0}),O=v.useMemo(()=>{switch(a){case dc.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case dc.DraggableRect:return s}},[a,s,p]),M=v.useRef(null),A=v.useCallback(()=>{const j=M.current;if(!j)return;const k=R.current.x*T.current.x,D=R.current.y*T.current.y;j.scrollBy(k,D)},[]),I=v.useMemo(()=>d===Dh.TreeOrder?[...g].reverse():g,[d,g]);v.useEffect(()=>{if(!u||!g.length||!O){C();return}for(const j of I){if(o?.(j)===!1)continue;const k=g.indexOf(j),D=y[k];if(!D)continue;const{direction:z,speed:F}=jH(j,D,O,n,b);for(const G of["x","y"])x[G][z[G]]||(F[G]=0,z[G]=0);if(F.x>0||F.y>0){C(),M.current=j,w(A,c),R.current=F,T.current=z;return}}R.current={x:0,y:0},T.current={x:0,y:0},C()},[n,A,o,C,u,c,JSON.stringify(O),JSON.stringify(x),w,g,I,y,JSON.stringify(b)])}const qH={x:{[ur.Backward]:!1,[ur.Forward]:!1},y:{[ur.Backward]:!1,[ur.Forward]:!1}};function YH(e){let{delta:n,disabled:a}=e;const o=Oh(n);return Gc(s=>{if(a||!o||!s)return qH;const u={x:Math.sign(n.x-o.x),y:Math.sign(n.y-o.y)};return{x:{[ur.Backward]:s.x[ur.Backward]||u.x===-1,[ur.Forward]:s.x[ur.Forward]||u.x===1},y:{[ur.Backward]:s.y[ur.Backward]||u.y===-1,[ur.Forward]:s.y[ur.Forward]||u.y===1}}},[a,n,o])}function KH(e,n){const a=n!=null?e.get(n):void 0,o=a?a.node.current:null;return Gc(s=>{var u;return n==null?null:(u=o??s)!=null?u:null},[o,n])}function GH(e,n){return v.useMemo(()=>e.reduce((a,o)=>{const{sensor:s}=o,u=s.activators.map(c=>({eventName:c.eventName,handler:n(c.handler,o)}));return[...a,...u]},[]),[e,n])}var wc;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(wc||(wc={}));var Oy;(function(e){e.Optimized="optimized"})(Oy||(Oy={}));const CR=new Map;function $H(e,n){let{dragging:a,dependencies:o,config:s}=n;const[u,c]=v.useState(null),{frequency:d,measure:p,strategy:g}=s,y=v.useRef(e),h=R(),b=xc(h),x=v.useCallback(function(T){T===void 0&&(T=[]),!b.current&&c(O=>O===null?T:O.concat(T.filter(M=>!O.includes(M))))},[b]),w=v.useRef(null),C=Gc(T=>{if(h&&!a)return CR;if(!T||T===CR||y.current!==e||u!=null){const O=new Map;for(let M of e){if(!M)continue;if(u&&u.length>0&&!u.includes(M.id)&&M.rect.current){O.set(M.id,M.rect.current);continue}const A=M.node.current,I=A?new Kv(p(A),A):null;M.rect.current=I,I&&O.set(M.id,I)}return O}return T},[e,u,a,h,p]);return v.useEffect(()=>{y.current=e},[e]),v.useEffect(()=>{h||x()},[a,h]),v.useEffect(()=>{u&&u.length>0&&c(null)},[JSON.stringify(u)]),v.useEffect(()=>{h||typeof d!="number"||w.current!==null||(w.current=setTimeout(()=>{x(),w.current=null},d))},[d,h,x,...o]),{droppableRects:C,measureDroppableContainers:x,measuringScheduled:u!=null};function R(){switch(g){case wc.Always:return!1;case wc.BeforeDragging:return a;default:return!a}}}function Xv(e,n){return Gc(a=>e?a||(typeof n=="function"?n(e):e):null,[n,e])}function XH(e,n){return Xv(e,n)}function QH(e){let{callback:n,disabled:a}=e;const o=Np(n),s=v.useMemo(()=>{if(a||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:u}=window;return new u(o)},[o,a]);return v.useEffect(()=>()=>s?.disconnect(),[s]),s}function kp(e){let{callback:n,disabled:a}=e;const o=Np(n),s=v.useMemo(()=>{if(a||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:u}=window;return new u(o)},[a]);return v.useEffect(()=>()=>s?.disconnect(),[s]),s}function ZH(e){return new Kv(Ql(e),e)}function TR(e,n,a){n===void 0&&(n=ZH);const[o,s]=v.useState(null);function u(){s(p=>{if(!e)return null;if(e.isConnected===!1){var g;return(g=p??a)!=null?g:null}const y=n(e);return JSON.stringify(p)===JSON.stringify(y)?p:y})}const c=QH({callback(p){if(e)for(const g of p){const{type:y,target:h}=g;if(y==="childList"&&h instanceof HTMLElement&&h.contains(e)){u();break}}}}),d=kp({callback:u});return qa(()=>{u(),e?(d?.observe(e),c?.observe(document.body,{childList:!0,subtree:!0})):(d?.disconnect(),c?.disconnect())},[e]),o}function JH(e){const n=Xv(e);return uM(e,n)}const OR=[];function WH(e){const n=v.useRef(e),a=Gc(o=>e?o&&o!==OR&&e&&n.current&&e.parentNode===n.current.parentNode?o:jp(e):OR,[e]);return v.useEffect(()=>{n.current=e},[e]),a}function eU(e){const[n,a]=v.useState(null),o=v.useRef(e),s=v.useCallback(u=>{const c=F0(u.target);c&&a(d=>d?(d.set(c,Cy(c)),new Map(d)):null)},[]);return v.useEffect(()=>{const u=o.current;if(e!==u){c(u);const d=e.map(p=>{const g=F0(p);return g?(g.addEventListener("scroll",s,{passive:!0}),[g,Cy(g)]):null}).filter(p=>p!=null);a(d.length?new Map(d):null),o.current=e}return()=>{c(e),c(u)};function c(d){d.forEach(p=>{const g=F0(p);g?.removeEventListener("scroll",s)})}},[s,e]),v.useMemo(()=>e.length?n?Array.from(n.values()).reduce((u,c)=>Al(u,c),Ya):mM(e):Ya,[e,n])}function MR(e,n){n===void 0&&(n=[]);const a=v.useRef(null);return v.useEffect(()=>{a.current=null},n),v.useEffect(()=>{const o=e!==Ya;o&&!a.current&&(a.current=e),!o&&a.current&&(a.current=null)},[e]),a.current?Sc(e,a.current):Ya}function tU(e){v.useEffect(()=>{if(!Dp)return;const n=e.map(a=>{let{sensor:o}=a;return o.setup==null?void 0:o.setup()});return()=>{for(const a of n)a?.()}},e.map(n=>{let{sensor:a}=n;return a}))}function nU(e,n){return v.useMemo(()=>e.reduce((a,o)=>{let{eventName:s,handler:u}=o;return a[s]=c=>{u(c,n)},a},{}),[e,n])}function wM(e){return v.useMemo(()=>e?AH(e):null,[e])}const AR=[];function rU(e,n){n===void 0&&(n=Ql);const[a]=e,o=wM(a?_r(a):null),[s,u]=v.useState(AR);function c(){u(()=>e.length?e.map(p=>pM(p)?o:new Kv(n(p),p)):AR)}const d=kp({callback:c});return qa(()=>{d?.disconnect(),c(),e.forEach(p=>d?.observe(p))},[e]),s}function RM(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Kc(n)?n:e}function aU(e){let{measure:n}=e;const[a,o]=v.useState(null),s=v.useCallback(g=>{for(const{target:y}of g)if(Kc(y)){o(h=>{const b=n(y);return h?{...h,width:b.width,height:b.height}:b});break}},[n]),u=kp({callback:s}),c=v.useCallback(g=>{const y=RM(g);u?.disconnect(),y&&u?.observe(y),o(y?n(y):null)},[n,u]),[d,p]=Th(c);return v.useMemo(()=>({nodeRef:d,rect:a,setRef:p}),[a,d,p])}const oU=[{sensor:bM,options:{}},{sensor:Gv,options:{}}],iU={current:{}},eh={draggable:{measure:SR},droppable:{measure:SR,strategy:wc.WhileDragging,frequency:Oy.Optimized},dragOverlay:{measure:Ql}};class fc extends Map{get(n){var a;return n!=null&&(a=super.get(n))!=null?a:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:a}=n;return!a})}getNodeFor(n){var a,o;return(a=(o=this.get(n))==null?void 0:o.node.current)!=null?a:void 0}}const sU={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new fc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ah},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:eh,measureDroppableContainers:Ah,windowRect:null,measuringScheduled:!1},EM={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ah,draggableNodes:new Map,over:null,measureDroppableContainers:Ah},Xc=v.createContext(EM),CM=v.createContext(sU);function lU(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new fc}}}function uU(e,n){switch(n.type){case ar.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case ar.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case ar.DragEnd:case ar.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ar.RegisterDroppable:{const{element:a}=n,{id:o}=a,s=new fc(e.droppable.containers);return s.set(o,a),{...e,droppable:{...e.droppable,containers:s}}}case ar.SetDroppableDisabled:{const{id:a,key:o,disabled:s}=n,u=e.droppable.containers.get(a);if(!u||o!==u.key)return e;const c=new fc(e.droppable.containers);return c.set(a,{...u,disabled:s}),{...e,droppable:{...e.droppable,containers:c}}}case ar.UnregisterDroppable:{const{id:a,key:o}=n,s=e.droppable.containers.get(a);if(!s||o!==s.key)return e;const u=new fc(e.droppable.containers);return u.delete(a),{...e,droppable:{...e.droppable,containers:u}}}default:return e}}function cU(e){let{disabled:n}=e;const{active:a,activatorEvent:o,draggableNodes:s}=v.useContext(Xc),u=Oh(o),c=Oh(a?.id);return v.useEffect(()=>{if(!n&&!o&&u&&c!=null){if(!Ip(u)||document.activeElement===u.target)return;const d=s.get(c);if(!d)return;const{activatorNode:p,node:g}=d;if(!p.current&&!g.current)return;requestAnimationFrame(()=>{for(const y of[p.current,g.current]){if(!y)continue;const h=oH(y);if(h){h.focus();break}}})}},[o,n,s,c,u]),null}function TM(e,n){let{transform:a,...o}=n;return e!=null&&e.length?e.reduce((s,u)=>u({transform:s,...o}),a):a}function dU(e){return v.useMemo(()=>({draggable:{...eh.draggable,...e?.draggable},droppable:{...eh.droppable,...e?.droppable},dragOverlay:{...eh.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function fU(e){let{activeNode:n,measure:a,initialRect:o,config:s=!0}=e;const u=v.useRef(!1),{x:c,y:d}=typeof s=="boolean"?{x:s,y:s}:s;qa(()=>{if(!c&&!d||!n){u.current=!1;return}if(u.current||!o)return;const g=n?.node.current;if(!g||g.isConnected===!1)return;const y=a(g),h=uM(y,o);if(c||(h.x=0),d||(h.y=0),u.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const b=dM(g);b&&b.scrollBy({top:h.y,left:h.x})}},[n,c,d,o,a])}const Pp=v.createContext({...Ya,scaleX:1,scaleY:1});var Si;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Si||(Si={}));const hU=v.memo(function(n){var a,o,s,u;let{id:c,accessibility:d,autoScroll:p=!0,children:g,sensors:y=oU,collisionDetection:h=SH,measuring:b,modifiers:x,...w}=n;const C=v.useReducer(uU,void 0,lU),[R,T]=C,[O,M]=dH(),[A,I]=v.useState(Si.Uninitialized),j=A===Si.Initialized,{draggable:{active:k,nodes:D,translate:z},droppable:{containers:F}}=R,G=k!=null?D.get(k):null,J=v.useRef({initial:null,translated:null}),Y=v.useMemo(()=>{var vt;return k!=null?{id:k,data:(vt=G?.data)!=null?vt:iU,rect:J}:null},[k,G]),U=v.useRef(null),[_,L]=v.useState(null),[$,K]=v.useState(null),V=xc(w,Object.values(w)),X=$c("DndDescribedBy",c),ee=v.useMemo(()=>F.getEnabled(),[F]),q=dU(b),{droppableRects:se,measureDroppableContainers:N,measuringScheduled:B}=$H(ee,{dragging:j,dependencies:[z.x,z.y],config:q.droppable}),W=KH(D,k),re=v.useMemo(()=>$?Mh($):null,[$]),Re=ft(),le=XH(W,q.draggable.measure);fU({activeNode:k!=null?D.get(k):null,config:Re.layoutShiftCompensation,initialRect:le,measure:q.draggable.measure});const me=TR(W,q.draggable.measure,le),ge=TR(W?W.parentElement:null),ce=v.useRef({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:se,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Te=F.getNodeFor((a=ce.current.over)==null?void 0:a.id),ve=aU({measure:q.dragOverlay.measure}),Pe=(o=ve.nodeRef.current)!=null?o:W,Me=j?(s=ve.rect)!=null?s:me:null,Le=!!(ve.nodeRef.current&&ve.rect),Fe=JH(Le?null:me),Oe=wM(Pe?_r(Pe):null),He=WH(j?Te??W:null),be=rU(He),Ue=TM(x,{transform:{x:z.x-Fe.x,y:z.y-Fe.y,scaleX:1,scaleY:1},activatorEvent:$,active:Y,activeNodeRect:me,containerNodeRect:ge,draggingNodeRect:Me,over:ce.current.over,overlayNodeRect:ve.rect,scrollableAncestors:He,scrollableAncestorRects:be,windowRect:Oe}),Ze=re?Al(re,z):null,it=eU(He),de=MR(it),we=MR(it,[me]),Ke=Al(Ue,de),De=Me?TH(Me,Ue):null,Ie=Y&&De?h({active:Y,collisionRect:De,droppableRects:se,droppableContainers:ee,pointerCoordinates:Ze}):null,yt=lM(Ie,"id"),[ut,ht]=v.useState(null),Ot=Le?Ue:Al(Ue,we),Dt=EH(Ot,(u=ut?.rect)!=null?u:null,me),Jt=v.useRef(null),rn=v.useCallback((vt,gt)=>{let{sensor:Lt,options:un}=gt;if(U.current==null)return;const je=D.get(U.current);if(!je)return;const ot=vt.nativeEvent,ke=new Lt({active:U.current,activeNode:je,event:ot,options:un,context:ce,onAbort(Ge){if(!D.get(Ge))return;const{onDragAbort:Et}=V.current,H={id:Ge};Et?.(H),O({type:"onDragAbort",event:H})},onPending(Ge,et,Et,H){if(!D.get(Ge))return;const{onDragPending:ne}=V.current,ye={id:Ge,constraint:et,initialCoordinates:Et,offset:H};ne?.(ye),O({type:"onDragPending",event:ye})},onStart(Ge){const et=U.current;if(et==null)return;const Et=D.get(et);if(!Et)return;const{onDragStart:H}=V.current,Z={activatorEvent:ot,active:{id:et,data:Et.data,rect:J}};cr.unstable_batchedUpdates(()=>{H?.(Z),I(Si.Initializing),T({type:ar.DragStart,initialCoordinates:Ge,active:et}),O({type:"onDragStart",event:Z}),L(Jt.current),K(ot)})},onMove(Ge){T({type:ar.DragMove,coordinates:Ge})},onEnd:ze(ar.DragEnd),onCancel:ze(ar.DragCancel)});Jt.current=ke;function ze(Ge){return async function(){const{active:Et,collisions:H,over:Z,scrollAdjustedTranslate:ne}=ce.current;let ye=null;if(Et&&ne){const{cancelDrop:xe}=V.current;ye={activatorEvent:ot,active:Et,collisions:H,delta:ne,over:Z},Ge===ar.DragEnd&&typeof xe=="function"&&await Promise.resolve(xe(ye))&&(Ge=ar.DragCancel)}U.current=null,cr.unstable_batchedUpdates(()=>{T({type:Ge}),I(Si.Uninitialized),ht(null),L(null),K(null),Jt.current=null;const xe=Ge===ar.DragEnd?"onDragEnd":"onDragCancel";if(ye){const qe=V.current[xe];qe?.(ye),O({type:xe,event:ye})}})}}},[D]),Wt=v.useCallback((vt,gt)=>(Lt,un)=>{const je=Lt.nativeEvent,ot=D.get(un);if(U.current!==null||!ot||je.dndKit||je.defaultPrevented)return;const ke={active:ot};vt(Lt,gt.options,ke)===!0&&(je.dndKit={capturedBy:gt.sensor},U.current=un,rn(Lt,gt))},[D,rn]),We=GH(y,Wt);tU(y),qa(()=>{me&&A===Si.Initializing&&I(Si.Initialized)},[me,A]),v.useEffect(()=>{const{onDragMove:vt}=V.current,{active:gt,activatorEvent:Lt,collisions:un,over:je}=ce.current;if(!gt||!Lt)return;const ot={active:gt,activatorEvent:Lt,collisions:un,delta:{x:Ke.x,y:Ke.y},over:je};cr.unstable_batchedUpdates(()=>{vt?.(ot),O({type:"onDragMove",event:ot})})},[Ke.x,Ke.y]),v.useEffect(()=>{const{active:vt,activatorEvent:gt,collisions:Lt,droppableContainers:un,scrollAdjustedTranslate:je}=ce.current;if(!vt||U.current==null||!gt||!je)return;const{onDragOver:ot}=V.current,ke=un.get(yt),ze=ke&&ke.rect.current?{id:ke.id,rect:ke.rect.current,data:ke.data,disabled:ke.disabled}:null,Ge={active:vt,activatorEvent:gt,collisions:Lt,delta:{x:je.x,y:je.y},over:ze};cr.unstable_batchedUpdates(()=>{ht(ze),ot?.(Ge),O({type:"onDragOver",event:Ge})})},[yt]),qa(()=>{ce.current={activatorEvent:$,active:Y,activeNode:W,collisionRect:De,collisions:Ie,droppableRects:se,draggableNodes:D,draggingNode:Pe,draggingNodeRect:Me,droppableContainers:F,over:ut,scrollableAncestors:He,scrollAdjustedTranslate:Ke},J.current={initial:Me,translated:De}},[Y,W,Ie,De,D,Pe,Me,se,F,ut,He,Ke]),VH({...Re,delta:z,draggingRect:De,pointerCoordinates:Ze,scrollableAncestors:He,scrollableAncestorRects:be});const xt=v.useMemo(()=>({active:Y,activeNode:W,activeNodeRect:me,activatorEvent:$,collisions:Ie,containerNodeRect:ge,dragOverlay:ve,draggableNodes:D,droppableContainers:F,droppableRects:se,over:ut,measureDroppableContainers:N,scrollableAncestors:He,scrollableAncestorRects:be,measuringConfiguration:q,measuringScheduled:B,windowRect:Oe}),[Y,W,me,$,Ie,ge,ve,D,F,se,ut,N,He,be,q,B,Oe]),$t=v.useMemo(()=>({activatorEvent:$,activators:We,active:Y,activeNodeRect:me,ariaDescribedById:{draggable:X},dispatch:T,draggableNodes:D,over:ut,measureDroppableContainers:N}),[$,We,Y,me,T,X,D,ut,N]);return Ne.createElement(sM.Provider,{value:M},Ne.createElement(Xc.Provider,{value:$t},Ne.createElement(CM.Provider,{value:xt},Ne.createElement(Pp.Provider,{value:Dt},g)),Ne.createElement(cU,{disabled:d?.restoreFocus===!1})),Ne.createElement(pH,{...d,hiddenTextDescribedById:X}));function ft(){const vt=_?.autoScrollEnabled===!1,gt=typeof p=="object"?p.enabled===!1:p===!1,Lt=j&&!vt&&!gt;return typeof p=="object"?{...p,enabled:Lt}:{enabled:Lt}}}),pU=v.createContext(null),DR="button",gU="Draggable";function OM(e){let{id:n,data:a,disabled:o=!1,attributes:s}=e;const u=$c(gU),{activators:c,activatorEvent:d,active:p,activeNodeRect:g,ariaDescribedById:y,draggableNodes:h,over:b}=v.useContext(Xc),{role:x=DR,roleDescription:w="draggable",tabIndex:C=0}=s??{},R=p?.id===n,T=v.useContext(R?Pp:pU),[O,M]=Th(),[A,I]=Th(),j=nU(c,n),k=xc(a);qa(()=>(h.set(n,{id:n,key:u,node:O,activatorNode:A,data:k}),()=>{const z=h.get(n);z&&z.key===u&&h.delete(n)}),[h,n]);const D=v.useMemo(()=>({role:x,tabIndex:C,"aria-disabled":o,"aria-pressed":R&&x===DR?!0:void 0,"aria-roledescription":w,"aria-describedby":y.draggable}),[o,x,C,R,w,y.draggable]);return{active:p,activatorEvent:d,activeNodeRect:g,attributes:D,isDragging:R,listeners:o?void 0:j,node:O,over:b,setNodeRef:M,setActivatorNodeRef:I,transform:T}}function MM(){return v.useContext(CM)}const mU="Droppable",yU={timeout:25};function AM(e){let{data:n,disabled:a=!1,id:o,resizeObserverConfig:s}=e;const u=$c(mU),{active:c,dispatch:d,over:p,measureDroppableContainers:g}=v.useContext(Xc),y=v.useRef({disabled:a}),h=v.useRef(!1),b=v.useRef(null),x=v.useRef(null),{disabled:w,updateMeasurementsFor:C,timeout:R}={...yU,...s},T=xc(C??o),O=v.useCallback(()=>{if(!h.current){h.current=!0;return}x.current!=null&&clearTimeout(x.current),x.current=setTimeout(()=>{g(Array.isArray(T.current)?T.current:[T.current]),x.current=null},R)},[R]),M=kp({callback:O,disabled:w||!c}),A=v.useCallback((D,z)=>{M&&(z&&(M.unobserve(z),h.current=!1),D&&M.observe(D))},[M]),[I,j]=Th(A),k=xc(n);return v.useEffect(()=>{!M||!I.current||(M.disconnect(),h.current=!1,M.observe(I.current))},[I,M]),v.useEffect(()=>(d({type:ar.RegisterDroppable,element:{id:o,key:u,disabled:a,node:I,rect:b,data:k}}),()=>d({type:ar.UnregisterDroppable,key:u,id:o})),[o]),v.useEffect(()=>{a!==y.current.disabled&&(d({type:ar.SetDroppableDisabled,id:o,key:u,disabled:a}),y.current.disabled=a)},[o,u,a,d]),{active:c,rect:b,isOver:p?.id===o,node:I,over:p,setNodeRef:j}}function vU(e){let{animation:n,children:a}=e;const[o,s]=v.useState(null),[u,c]=v.useState(null),d=Oh(a);return!a&&!o&&d&&s(d),qa(()=>{if(!u)return;const p=o?.key,g=o?.props.id;if(p==null||g==null){s(null);return}Promise.resolve(n(g,u)).then(()=>{s(null)})},[n,o,u]),Ne.createElement(Ne.Fragment,null,a,o?v.cloneElement(o,{ref:c}):null)}const bU={x:0,y:0,scaleX:1,scaleY:1};function xU(e){let{children:n}=e;return Ne.createElement(Xc.Provider,{value:EM},Ne.createElement(Pp.Provider,{value:bU},n))}const SU={position:"fixed",touchAction:"none"},wU=e=>Ip(e)?"transform 250ms ease":void 0,RU=v.forwardRef((e,n)=>{let{as:a,activatorEvent:o,adjustScale:s,children:u,className:c,rect:d,style:p,transform:g,transition:y=wU}=e;if(!d)return null;const h=s?g:{...g,scaleX:1,scaleY:1},b={...SU,width:d.width,height:d.height,top:d.top,left:d.left,transform:Di.Transform.toString(h),transformOrigin:s&&o?mH(o,d):void 0,transition:typeof y=="function"?y(o):y,...p};return Ne.createElement(a,{className:c,style:b,ref:n},u)}),EU=e=>n=>{let{active:a,dragOverlay:o}=n;const s={},{styles:u,className:c}=e;if(u!=null&&u.active)for(const[d,p]of Object.entries(u.active))p!==void 0&&(s[d]=a.node.style.getPropertyValue(d),a.node.style.setProperty(d,p));if(u!=null&&u.dragOverlay)for(const[d,p]of Object.entries(u.dragOverlay))p!==void 0&&o.node.style.setProperty(d,p);return c!=null&&c.active&&a.node.classList.add(c.active),c!=null&&c.dragOverlay&&o.node.classList.add(c.dragOverlay),function(){for(const[p,g]of Object.entries(s))a.node.style.setProperty(p,g);c!=null&&c.active&&a.node.classList.remove(c.active)}},CU=e=>{let{transform:{initial:n,final:a}}=e;return[{transform:Di.Transform.toString(n)},{transform:Di.Transform.toString(a)}]},TU={duration:250,easing:"ease",keyframes:CU,sideEffects:EU({styles:{active:{opacity:"0"}}})};function OU(e){let{config:n,draggableNodes:a,droppableContainers:o,measuringConfiguration:s}=e;return Np((u,c)=>{if(n===null)return;const d=a.get(u);if(!d)return;const p=d.node.current;if(!p)return;const g=RM(c);if(!g)return;const{transform:y}=_r(c).getComputedStyle(c),h=cM(y);if(!h)return;const b=typeof n=="function"?n:MU(n);return yM(p,s.draggable.measure),b({active:{id:u,data:d.data,node:p,rect:s.draggable.measure(p)},draggableNodes:a,dragOverlay:{node:c,rect:s.dragOverlay.measure(g)},droppableContainers:o,measuringConfiguration:s,transform:h})})}function MU(e){const{duration:n,easing:a,sideEffects:o,keyframes:s}={...TU,...e};return u=>{let{active:c,dragOverlay:d,transform:p,...g}=u;if(!n)return;const y={x:d.rect.left-c.rect.left,y:d.rect.top-c.rect.top},h={scaleX:p.scaleX!==1?c.rect.width*p.scaleX/d.rect.width:1,scaleY:p.scaleY!==1?c.rect.height*p.scaleY/d.rect.height:1},b={x:p.x-y.x,y:p.y-y.y,...h},x=s({...g,active:c,dragOverlay:d,transform:{initial:p,final:b}}),[w]=x,C=x[x.length-1];if(JSON.stringify(w)===JSON.stringify(C))return;const R=o?.({active:c,dragOverlay:d,...g}),T=d.node.animate(x,{duration:n,easing:a,fill:"forwards"});return new Promise(O=>{T.onfinish=()=>{R?.(),O()}})}}let NR=0;function AU(e){return v.useMemo(()=>{if(e!=null)return NR++,NR},[e])}const DU=Ne.memo(e=>{let{adjustScale:n=!1,children:a,dropAnimation:o,style:s,transition:u,modifiers:c,wrapperElement:d="div",className:p,zIndex:g=999}=e;const{activatorEvent:y,active:h,activeNodeRect:b,containerNodeRect:x,draggableNodes:w,droppableContainers:C,dragOverlay:R,over:T,measuringConfiguration:O,scrollableAncestors:M,scrollableAncestorRects:A,windowRect:I}=MM(),j=v.useContext(Pp),k=AU(h?.id),D=TM(c,{activatorEvent:y,active:h,activeNodeRect:b,containerNodeRect:x,draggingNodeRect:R.rect,over:T,overlayNodeRect:R.rect,scrollableAncestors:M,scrollableAncestorRects:A,transform:j,windowRect:I}),z=Xv(b),F=OU({config:o,draggableNodes:w,droppableContainers:C,measuringConfiguration:O}),G=z?R.setRef:void 0;return Ne.createElement(xU,null,Ne.createElement(vU,{animation:F},h&&k?Ne.createElement(RU,{key:k,id:h.id,ref:G,as:d,activatorEvent:y,adjustScale:n,className:p,transition:u,rect:z,style:{zIndex:g,...s},transform:D},a):null))});function Qv(e,n,a){const o=e.slice();return o.splice(a<0?o.length+a:a,0,o.splice(n,1)[0]),o}function NU(e,n){return e.reduce((a,o,s)=>{const u=n.get(o);return u&&(a[s]=u),a},Array(e.length))}function _f(e){return e!==null&&e>=0}function IU(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==n[a])return!1;return!0}function jU(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const DM=e=>{let{rects:n,activeIndex:a,overIndex:o,index:s}=e;const u=Qv(n,o,a),c=n[s],d=u[s];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},Hf={scaleX:1,scaleY:1},kU=e=>{var n;let{activeIndex:a,activeNodeRect:o,index:s,rects:u,overIndex:c}=e;const d=(n=u[a])!=null?n:o;if(!d)return null;if(s===a){const g=u[c];return g?{x:0,y:a<c?g.top+g.height-(d.top+d.height):g.top-d.top,...Hf}:null}const p=PU(u,s,a);return s>a&&s<=c?{x:0,y:-d.height-p,...Hf}:s<a&&s>=c?{x:0,y:d.height+p,...Hf}:{x:0,y:0,...Hf}};function PU(e,n,a){const o=e[n],s=e[n-1],u=e[n+1];return o?a<n?s?o.top-(s.top+s.height):u?u.top-(o.top+o.height):0:u?u.top-(o.top+o.height):s?o.top-(s.top+s.height):0:0}const NM="Sortable",IM=Ne.createContext({activeIndex:-1,containerId:NM,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:DM,disabled:{draggable:!1,droppable:!1}});function LU(e){let{children:n,id:a,items:o,strategy:s=DM,disabled:u=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:g,measureDroppableContainers:y}=MM(),h=$c(NM,a),b=d.rect!==null,x=v.useMemo(()=>o.map(j=>typeof j=="object"&&"id"in j?j.id:j),[o]),w=c!=null,C=c?x.indexOf(c.id):-1,R=g?x.indexOf(g.id):-1,T=v.useRef(x),O=!IU(x,T.current),M=R!==-1&&C===-1||O,A=jU(u);qa(()=>{O&&w&&y(x)},[O,x,w,y]),v.useEffect(()=>{T.current=x},[x]);const I=v.useMemo(()=>({activeIndex:C,containerId:h,disabled:A,disableTransforms:M,items:x,overIndex:R,useDragOverlay:b,sortedRects:NU(x,p),strategy:s}),[C,h,A.draggable,A.droppable,M,x,R,p,b,s]);return Ne.createElement(IM.Provider,{value:I},n)}const zU=e=>{let{id:n,items:a,activeIndex:o,overIndex:s}=e;return Qv(a,o,s).indexOf(n)},_U=e=>{let{containerId:n,isSorting:a,wasDragging:o,index:s,items:u,newIndex:c,previousItems:d,previousContainerId:p,transition:g}=e;return!g||!o||d!==u&&s===c?!1:a?!0:c!==s&&n===p},HU={duration:200,easing:"ease"},jM="transform",UU=Di.Transition.toString({property:jM,duration:0,easing:"linear"}),FU={roleDescription:"sortable"};function BU(e){let{disabled:n,index:a,node:o,rect:s}=e;const[u,c]=v.useState(null),d=v.useRef(a);return qa(()=>{if(!n&&a!==d.current&&o.current){const p=s.current;if(p){const g=Ql(o.current,{ignoreTransform:!0}),y={x:p.left-g.left,y:p.top-g.top,scaleX:p.width/g.width,scaleY:p.height/g.height};(y.x||y.y)&&c(y)}}a!==d.current&&(d.current=a)},[n,a,o,s]),v.useEffect(()=>{u&&c(null)},[u]),u}function VU(e){let{animateLayoutChanges:n=_U,attributes:a,disabled:o,data:s,getNewIndex:u=zU,id:c,strategy:d,resizeObserverConfig:p,transition:g=HU}=e;const{items:y,containerId:h,activeIndex:b,disabled:x,disableTransforms:w,sortedRects:C,overIndex:R,useDragOverlay:T,strategy:O}=v.useContext(IM),M=qU(o,x),A=y.indexOf(c),I=v.useMemo(()=>({sortable:{containerId:h,index:A,items:y},...s}),[h,s,A,y]),j=v.useMemo(()=>y.slice(y.indexOf(c)),[y,c]),{rect:k,node:D,isOver:z,setNodeRef:F}=AM({id:c,data:I,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...p}}),{active:G,activatorEvent:J,activeNodeRect:Y,attributes:U,setNodeRef:_,listeners:L,isDragging:$,over:K,setActivatorNodeRef:V,transform:X}=OM({id:c,data:I,attributes:{...FU,...a},disabled:M.draggable}),ee=tH(F,_),q=!!G,se=q&&!w&&_f(b)&&_f(R),N=!T&&$,B=N&&se?X:null,re=se?B??(d??O)({rects:C,activeNodeRect:Y,activeIndex:b,overIndex:R,index:A}):null,Re=_f(b)&&_f(R)?u({id:c,items:y,activeIndex:b,overIndex:R}):A,le=G?.id,me=v.useRef({activeId:le,items:y,newIndex:Re,containerId:h}),ge=y!==me.current.items,ce=n({active:G,containerId:h,isDragging:$,isSorting:q,id:c,index:A,items:y,newIndex:me.current.newIndex,previousItems:me.current.items,previousContainerId:me.current.containerId,transition:g,wasDragging:me.current.activeId!=null}),Te=BU({disabled:!ce,index:A,node:D,rect:k});return v.useEffect(()=>{q&&me.current.newIndex!==Re&&(me.current.newIndex=Re),h!==me.current.containerId&&(me.current.containerId=h),y!==me.current.items&&(me.current.items=y)},[q,Re,h,y]),v.useEffect(()=>{if(le===me.current.activeId)return;if(le!=null&&me.current.activeId==null){me.current.activeId=le;return}const Pe=setTimeout(()=>{me.current.activeId=le},50);return()=>clearTimeout(Pe)},[le]),{active:G,activeIndex:b,attributes:U,data:I,rect:k,index:A,newIndex:Re,items:y,isOver:z,isSorting:q,isDragging:$,listeners:L,node:D,overIndex:R,over:K,setNodeRef:ee,setActivatorNodeRef:V,setDroppableNodeRef:F,setDraggableNodeRef:_,transform:Te??re,transition:ve()};function ve(){if(Te||ge&&me.current.newIndex===A)return UU;if(!(N&&!Ip(J)||!g)&&(q||ce))return Di.Transition.toString({...g,property:jM})}}function qU(e,n){var a,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(a=e?.draggable)!=null?a:n.draggable,droppable:(o=e?.droppable)!=null?o:n.droppable}}function Nh(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const YU=[Zt.Down,Zt.Right,Zt.Up,Zt.Left],KU=(e,n)=>{let{context:{active:a,collisionRect:o,droppableRects:s,droppableContainers:u,over:c,scrollableAncestors:d}}=n;if(YU.includes(e.code)){if(e.preventDefault(),!a||!o)return;const p=[];u.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const b=s.get(h.id);if(b)switch(e.code){case Zt.Down:o.top<b.top&&p.push(h);break;case Zt.Up:o.top>b.top&&p.push(h);break;case Zt.Left:o.left>b.left&&p.push(h);break;case Zt.Right:o.left<b.left&&p.push(h);break}});const g=bH({collisionRect:o,droppableRects:s,droppableContainers:p});let y=lM(g,"id");if(y===c?.id&&g.length>1&&(y=g[1].id),y!=null){const h=u.get(a.id),b=u.get(y),x=b?s.get(b.id):null,w=b?.node.current;if(w&&x&&h&&b){const R=jp(w).some((j,k)=>d[k]!==j),T=kM(h,b),O=GU(h,b),M=R||!T?{x:0,y:0}:{x:O?o.width-x.width:0,y:O?o.height-x.height:0},A={x:x.left,y:x.top};return M.x&&M.y?A:Sc(A,M)}}}};function kM(e,n){return!Nh(e)||!Nh(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function GU(e,n){return!Nh(e)||!Nh(n)||!kM(e,n)?!1:e.data.current.sortable.index<n.data.current.sortable.index}function Lo({className:e,size:n="default",...a}){return S.jsx("div",{"data-slot":"card","data-size":n,className:Qe("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-lg bg-card py-(--card-spacing) text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",e),...a})}function $U({className:e,...n}){return S.jsx("div",{"data-slot":"card-header",className:Qe("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...n})}function XU({className:e,...n}){return S.jsx("div",{"data-slot":"card-content",className:Qe("px-(--card-spacing)",e),...n})}const PM=v.createContext(void 0);function QU(){const e=v.useContext(PM);if(e===void 0)throw new Error(Rn(63));return e}const ZU="data-checked",JU="data-unchecked",LM={...Yl,checked(e){return e?{[ZU]:""}:{[JU]:""}}},WU=v.forwardRef(function(n,a){const{checked:o,className:s,defaultChecked:u,"aria-labelledby":c,form:d,id:p,inputRef:g,name:y,nativeButton:h=!1,onCheckedChange:b,readOnly:x=!1,required:w=!1,disabled:C=!1,render:R,uncheckedValue:T,value:O,style:M,...A}=n,{clearErrors:I}=Vc(),{state:j,setTouched:k,setDirty:D,validityData:z,setFilled:F,validationMode:G,disabled:J,name:Y,validation:U}=qo(),{labelId:_}=Cs(),L=J||C,$=Y??y,K=v.useRef(null),V=Gr(K,g,U.inputRef),X=v.useRef(null),ee=qc(L,X),q=Tr(),se=Kl({id:p}),N=h?void 0:se,[B,W]=bs({controlled:o,default:!!u,name:"Switch",state:"checked"});Yc(X,q,B,void 0,!L,y),_e(()=>{F(B)},[B,F]),ql(B,()=>{I($),D(B!==z.initialValue),U.change(B)});const{getButtonProps:re,buttonRef:Re}=mo({disabled:L,native:h}),le=Hv(c,_,K,!h,N,A["aria-label"]),me={id:h?se:q,role:"switch","aria-checked":B,"aria-readonly":x||void 0,"aria-required":w||void 0,"aria-labelledby":le,onFocus(){ee(!0)},onBlur(){const ve=K.current;!ve||L||(k(!0),ee(!1),G==="onBlur"&&U.commit(ve.checked))},onClick(ve){if(x||L)return;ve.preventDefault();const Pe=K.current;Pe&&hs(Pe,ve)}},ge={...U.getValidationProps(L),checked:B,disabled:L,form:d,id:N,name:$,required:w,style:$?Vh:Ic,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:V,onChange(ve){if(ve.nativeEvent.defaultPrevented)return;if(x){ve.preventDefault();return}const Pe=ve.currentTarget.checked,Me=dt(zr,ve.nativeEvent);b?.(Pe,Me),!Me.isCanceled&&W(Pe)},onClick(ve){ve.stopPropagation()},onFocus(){X.current?.focus()},...O!==void 0?{value:O}:Gt},ce=v.useMemo(()=>({...j,checked:B,disabled:L,readOnly:x,required:w}),[j,B,L,x,w]),Te=Mt("span",n,{state:ce,ref:[a,X,Re],props:[me,A,re,ve=>U.getValidationProps(L,ve)],stateAttributesMapping:LM});return S.jsxs(PM.Provider,{value:ce,children:[Te,!B&&$&&T!==void 0&&S.jsx("input",{type:"hidden",form:d,name:$,value:T,disabled:L}),S.jsx("input",{...ge,suppressHydrationWarning:!0})]})}),eF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=QU();return Mt("span",n,{state:d,ref:a,stateAttributesMapping:LM,props:c})});function tF({className:e,...n}){return S.jsx(WU,{"data-slot":"switch",className:Qe(`
|
|
45
45
|
peer relative inline-flex h-4 w-7 shrink-0 items-center rounded-full
|
|
46
46
|
border border-transparent bg-input p-0.5 transition-colors outline-none
|
|
47
47
|
focus-visible:border-ring focus-visible:ring-2
|
|
@@ -50,18 +50,18 @@ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}
|
|
|
50
50
|
`,e),...n,children:S.jsx(eF,{"data-slot":"switch-thumb",className:`
|
|
51
51
|
pointer-events-none block size-3 rounded-full bg-background shadow-sm
|
|
52
52
|
transition-transform data-checked:translate-x-3
|
|
53
|
-
`})})}function nF(e){return`library:${e}`}function
|
|
53
|
+
`})})}function nF(e){return`library:${e}`}function zM(e,n){return`assigned:${e}:${n}`}function _M(e){return`agent:${e}`}function rF(e){return String(e).startsWith("assigned:")}function My(e){return Zv(e)&&e.type==="library-instruction"&&typeof e.instructionId=="string"}function Dl(e){return Zv(e)&&e.type==="assigned-instruction"&&typeof e.agentId=="string"&&typeof e.instructionId=="string"}function IR(e){return Zv(e)&&e.type==="agent"&&typeof e.agentId=="string"}function Zv(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const aF="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M9.205%208.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357%201.356-.523%202.117-.523%202.854%200%204.662%202.212%204.662%204.566%200%20.167%200%20.357-.024.547l-4.71-2.759a.797.797%200%2000-.856%200l-5.97%203.473zm10.609%208.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473%201.95-1.118a.433.433%200%2001.476%200l4.543%202.617c1.309.76%202.189%202.378%202.189%203.948%200%201.808-1.07%203.473-2.76%204.163zM7.802%2012.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545%201.95-4.472%204.591-4.472%201%200%201.927.333%202.712.928L8.23%205.067c-.285.166-.428.404-.428.737v6.898zM12%2015.128l-2.795-1.57v-3.33L12%208.658l2.795%201.57v3.33L12%2015.128zm1.796%207.23c-1%200-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974%201.142c.167.095.238.238.238.428v5.233c0%202.545-1.974%204.472-4.614%204.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482%204.482%200%20014.21%206.327v5.423c0%20.333.143.571.428.738l5.947%203.449-1.95%201.118a.432.432%200%2001-.476%200zm-.262%203.9c-2.688%200-4.662-2.021-4.662-4.519%200-.19.024-.38.047-.57l4.686%202.71c.286.167.571.167.856%200l5.97-3.448v2.26c0%20.19-.07.333-.237.428l-4.543%202.616c-.619.357-1.356.523-2.117.523zm5.899%202.83a5.947%205.947%200%20005.827-4.756C22.287%2018.339%2024%2015.84%2024%2013.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498%200-3.401-2.759-5.947-5.946-5.947-.642%200-1.26.095-1.88.31A5.962%205.962%200%200010.205%200a5.947%205.947%200%2000-5.827%204.757C1.713%205.447%200%207.945%200%2010.49c0%201.666.713%203.283%201.998%204.448-.119.5-.19%201-.19%201.499%200%203.401%202.759%205.946%205.946%205.946.642%200%201.26-.095%201.88-.309a5.96%205.96%200%20004.162%201.713z'%3e%3c/path%3e%3c/svg%3e",oF="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%20Code%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M20.998%2010.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6%2010.949h1.488V8.102H6v2.847zm10.51%200H18V8.102h-1.49v2.847z'%20fill='%23D97757'%20fill-rule='evenodd'%3e%3c/path%3e%3c/svg%3e",iF=new Map([["openai",{src:aF,className:"dark:invert"}],["claudecode",{src:oF}]]);function sF({icon:e,className:n}){const a=iF.get(e);return S.jsx("div",{"aria-hidden":"true",className:Qe(`
|
|
54
54
|
flex size-8 shrink-0 items-center justify-center rounded-md bg-muted
|
|
55
55
|
text-foreground
|
|
56
|
-
`,n),children:a?S.jsx("img",{src:a.src,alt:"",draggable:!1,className:Qe("size-4",a.className)}):S.jsx(
|
|
56
|
+
`,n),children:a?S.jsx("img",{src:a.src,alt:"",draggable:!1,className:Qe("size-4",a.className)}):S.jsx(bC,{className:"size-4"})})}function lF({agent:e,instructionsById:n,isInstructionsLoading:a,isPending:o,isReapplying:s,onRemoveInstruction:u,onToggle:c,onReapply:d,onOpenFile:p}){const{t:g}=sn(),{isOver:y,setNodeRef:h}=AM({id:_M(e.id),data:{type:"agent",agentId:e.id},disabled:o}),b=e.enabled||e.instructionIds.length>0,x=e.enabled?g("agents.reapplyHint"):g("agents.reapplyDisabledHint"),w=g(b?e.enabled?"agents.toggleOnHint":"agents.toggleOffHint":"agents.enableRequiresInstruction");return S.jsxs(Lo,{"data-agent-id":e.id,ref:h,className:Qe("gap-0 py-0 transition-shadow",y&&"ring-2 ring-ring/40"),children:[S.jsxs("div",{className:"flex items-center gap-3 p-3",children:[S.jsx(sF,{icon:e.icon}),S.jsxs("div",{className:"min-w-0 flex-1",children:[S.jsx("div",{className:"truncate text-sm font-medium",children:e.name}),S.jsx("button",{type:"button",className:`
|
|
57
57
|
block max-w-full truncate font-mono text-[11px]
|
|
58
58
|
text-muted-foreground
|
|
59
59
|
hover:text-foreground hover:underline
|
|
60
|
-
`,"aria-label":g("agents.openFileAria",{name:e.name}),onClick:()=>{p(e.id)},children:e.instructionFile})]}),S.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[S.jsxs(mh,{children:[S.jsx(yh,{render:S.jsx("span",{className:"inline-flex"}),children:S.jsx(nn,{type:"button",variant:"ghost",size:"icon","aria-label":g("agents.reapplyAria",{name:e.name}),disabled:o||!e.enabled,onClick:()=>{d(e.id)},children:S.jsx(
|
|
60
|
+
`,"aria-label":g("agents.openFileAria",{name:e.name}),onClick:()=>{p(e.id)},children:e.instructionFile})]}),S.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[S.jsxs(mh,{children:[S.jsx(yh,{render:S.jsx("span",{className:"inline-flex"}),children:S.jsx(nn,{type:"button",variant:"ghost",size:"icon","aria-label":g("agents.reapplyAria",{name:e.name}),disabled:o||!e.enabled,onClick:()=>{d(e.id)},children:S.jsx(tP,{className:Qe(s&&"animate-spin")})})}),S.jsx(vh,{children:x})]}),S.jsxs(mh,{children:[S.jsx(yh,{render:S.jsx("span",{className:"inline-flex"}),children:S.jsx(tF,{checked:e.enabled,disabled:o||!b,"aria-label":g("agents.toggleAria",{name:e.name}),onCheckedChange:C=>{c(e.id,C)}})}),S.jsx(vh,{children:w})]})]})]}),S.jsx("div",{className:"border-t border-border/60 p-3",children:e.instructionIds.length===0?S.jsx("div",{className:`
|
|
61
61
|
flex min-h-20 items-center justify-center rounded-md border
|
|
62
62
|
border-dashed border-border px-4 text-center text-xs
|
|
63
63
|
text-muted-foreground
|
|
64
|
-
`,children:g("agents.emptyAssigned")}):S.jsx(LU,{items:e.instructionIds.map(C=>
|
|
64
|
+
`,children:g("agents.emptyAssigned")}):S.jsx(LU,{items:e.instructionIds.map(C=>zM(e.id,C)),strategy:kU,children:S.jsx("ol",{className:"flex flex-col gap-1",children:e.instructionIds.map((C,R)=>{const T=n.get(C),O=T?.name??C;return S.jsx(uF,{agentId:e.id,index:R,instructionId:C,instructionName:a&&!T?g("agents.loadingInstruction"):O,isPending:o,onRemove:u},C)})})})})]})}function uF({agentId:e,index:n,instructionId:a,instructionName:o,isPending:s,onRemove:u}){const{t:c}=sn(),{attributes:d,isDragging:p,isOver:g,listeners:y,setNodeRef:h,transform:b,transition:x}=VU({id:zM(e,a),animateLayoutChanges:()=>!1,data:{type:"assigned-instruction",agentId:e,instructionId:a},disabled:s});return S.jsxs("li",{...d,...y,ref:h,"data-instruction-id":a,style:{transform:Di.Transform.toString(b),transition:x},className:Qe(`
|
|
65
65
|
group flex items-center gap-2 rounded-md border border-transparent
|
|
66
66
|
bg-muted/40 px-2 py-1.5
|
|
67
67
|
`,g&&"border-ring bg-muted",p&&"z-10",s?"cursor-default":`
|
|
@@ -72,10 +72,10 @@ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}
|
|
|
72
72
|
group-active:cursor-grabbing
|
|
73
73
|
`}),S.jsx("span",{className:`
|
|
74
74
|
w-4 shrink-0 text-center font-mono text-[10px] text-muted-foreground
|
|
75
|
-
`,children:n+1}),S.jsx("span",{className:"min-w-0 flex-1 truncate text-xs",children:o}),S.jsx(nn,{type:"button",variant:"ghost",size:"icon","aria-label":c("agents.removeInstructionAria",{name:o}),disabled:s,onClick:()=>{u(e,a)},onKeyDown:w=>{w.stopPropagation()},onPointerDown:w=>{w.stopPropagation()},children:S.jsx(Rs,{})})]})}const
|
|
75
|
+
`,children:n+1}),S.jsx("span",{className:"min-w-0 flex-1 truncate text-xs",children:o}),S.jsx(nn,{type:"button",variant:"ghost",size:"icon","aria-label":c("agents.removeInstructionAria",{name:o}),disabled:s,onClick:()=>{u(e,a)},onKeyDown:w=>{w.stopPropagation()},onPointerDown:w=>{w.stopPropagation()},children:S.jsx(Rs,{})})]})}const HM="/api/agents";class UM extends Error{constructor(n,a){super(a),this.code=n,this.name="AgentApiError"}code}function cF(e){return Qc(HM,{signal:e})}function dF(e,n){return Qc(Lp(e,"instructions"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({instructionIds:n})})}function fF(e,n){return Qc(Lp(e,"enabled"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:n})})}function hF(e){return Qc(Lp(e,"reapply"),{method:"POST"})}function pF(e){return Qc(Lp(e,"open-file"),{method:"POST"})}function Lp(e,n){return`${HM}/${encodeURIComponent(e)}/${n}`}async function Qc(e,n){const a=await fetch(e,n);if(!a.ok){const o=await gF(a);throw new UM(o.code,o.message)}return a.json()}async function gF(e){try{const n=await e.json();return{code:n.error?.code??"AGENT_REQUEST_FAILED",message:n.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"AGENT_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}const la=["agents"],Uf=["agents","update"];function mF(){const{t:e}=sn(),n=Bo(),a=fp({queryKey:la,queryFn:({signal:h})=>cF(h),retry:!1});function o(h){n.setQueryData(la,b=>b?.map(x=>x.id===h.id?h:x))}const s=Ma({mutationKey:Uf,mutationFn:({agentId:h,instructionIds:b})=>dF(h,b),onMutate:async({previous:h})=>(await n.cancelQueries({queryKey:la}),{previous:h}),onError:(h,b,x)=>{x?.previous&&n.setQueryData(la,x.previous),_n.error(e("agents.updateError"))},onSuccess:o,onSettled:()=>n.invalidateQueries({queryKey:la})}),u=Ma({mutationKey:Uf,mutationFn:({agentId:h,enabled:b})=>fF(h,b),onMutate:async({agentId:h,enabled:b})=>{await n.cancelQueries({queryKey:la});const x=n.getQueryData(la);return n.setQueryData(la,w=>w?.map(C=>C.id===h?{...C,enabled:b}:C)),{previous:x}},onError:(h,b,x)=>{x?.previous&&n.setQueryData(la,x.previous),_n.error(e("agents.enableError"))},onSuccess:h=>{o(h),_n.success(e(h.enabled?"agents.applied":"agents.removed"))},onSettled:()=>n.invalidateQueries({queryKey:la})}),c=Ma({mutationKey:Uf,mutationFn:h=>hF(h),onSuccess:h=>{o(h),_n.success(e("agents.reapplied"))},onError:()=>{_n.error(e("agents.reapplyError"))},onSettled:()=>n.invalidateQueries({queryKey:la})}),d=Ma({mutationKey:Uf,mutationFn:h=>pF(h),onError:h=>{_n.error(e(h instanceof UM&&h.code==="AGENT_FILE_NOT_FOUND"?"agents.fileMissing":"agents.openFileError"))}}),p=[s,u,c,d],g=new Set;for(const h of p){if(!h.isPending)continue;const b=yF(h.variables);b&&g.add(b)}const y=new Set(c.isPending&&typeof c.variables=="string"?[c.variables]:[]);return{agents:a.data??[],isLoading:a.isPending,isError:a.isError&&a.data===void 0,retry:a.refetch,pendingAgentIds:g,reapplyingAgentIds:y,updateInstructions:(h,b)=>{const x=n.getQueryData(la);n.setQueryData(la,w=>w?.map(C=>C.id===h?{...C,instructionIds:b,enabled:b.length>0&&C.enabled}:C)),s.mutate({agentId:h,instructionIds:b,previous:x})},setEnabled:(h,b)=>{u.mutate({agentId:h,enabled:b})},reapply:h=>{c.mutate(h)},openFile:h=>{d.mutate(h)}}}function yF(e){if(typeof e=="string")return e;if(e&&typeof e=="object"&&"agentId"in e){const n=e.agentId;return typeof n=="string"?n:void 0}}const Jv="/api/instructions";class Wv extends Error{constructor(n,a){super(a),this.code=n,this.name="InstructionApiError"}code}function vF(e){return eb(Jv,{signal:e})}function bF(e){return eb(Jv,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function xF(e,n){return eb(FM(e),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)})}async function SF(e){const n=await fetch(FM(e),{method:"DELETE"});if(n.ok)return;const a=await BM(n);throw new Wv(a.code,a.message)}async function eb(e,n){const a=await fetch(e,n);if(!a.ok){const o=await BM(a);throw new Wv(o.code,o.message)}return a.json()}function FM(e){return`${Jv}/${encodeURIComponent(e)}`}async function BM(e){try{const n=await e.json();return{code:n.error?.code??"INSTRUCTION_REQUEST_FAILED",message:n.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"INSTRUCTION_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}function wF({className:e,description:n,icon:a,title:o}){let s=null;return n!=null&&(s=S.jsx("p",{className:"max-w-64 text-xs/relaxed text-muted-foreground",children:n})),S.jsxs("div",{"data-slot":"empty",className:Qe("flex flex-col items-center gap-2 px-4 py-10 text-center",e),children:[a&&S.jsx("div",{className:`
|
|
76
76
|
flex size-8 items-center justify-center rounded-md bg-muted
|
|
77
77
|
text-muted-foreground
|
|
78
|
-
`,children:S.jsx(a,{"aria-hidden":"true",className:"size-4"})}),S.jsx("div",{className:"text-sm font-medium",children:o}),s]})}function RF(e){const[n,a]=v.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),o=v.useRef(null),s=v.useRef(null),u=v.useRef(null),c=v.useRef(null),d=v.useRef(!0),p=v.useRef(null),g=Hl(),y=v.useMemo(()=>({anchor:n,setAnchor:a,actionsRef:u,backdropRef:o,internalBackdropRef:s,positionerRef:c,allowMouseUpTriggerRef:d,initialCursorPointRef:p,rootId:g}),[n,g]);return S.jsx(dO.Provider,{value:y,children:S.jsx(xp.Provider,{value:void 0,children:S.jsx(IO,{...e})})})}const kR=500,EF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,{setAnchor:d,actionsRef:p,internalBackdropRef:g,backdropRef:y,positionerRef:h,allowMouseUpTriggerRef:b,initialCursorPointRef:x,rootId:w}=Sp(!1),{store:C}=Vo(!1),R=C.useState("open"),T=C.useState("disabled"),O=v.useRef(null),M=v.useRef(null),A=Hn(),I=Hn(),j=v.useRef(!1),k=v.useRef(null);function D(_,L,$){const K=$.type.startsWith("touch");x.current={x:_,y:L},d({getBoundingClientRect(){return DOMRect.fromRect({width:K?10:0,height:K?10:0,x:_,y:L})}}),j.current=!1,p.current?.setOpen(!0,dt(Va,$)),I.start(kR,()=>{j.current=!0})}function z(_){if(T)return;b.current=!0,Fa(_),D(_.clientX,_.clientY,_.nativeEvent);const L=Kt(O.current);k.current?.abort();const $=new AbortController;k.current=$,L.addEventListener("mouseup",K=>{if(b.current=!1,!j.current)return;I.clear(),j.current=!1;const V=tr(K);at(h.current,V)||w&&V&&kv(V)===w||p.current?.setOpen(!1,dt(Vy,K))},{once:!0,signal:$.signal})}function F(){A.clear(),M.current=null}function G(_){if(T){F();return}if(b.current=!1,_.touches.length!==1){F();return}_.stopPropagation();const L=_.touches[0],$={x:L.clientX,y:L.clientY};M.current=$,A.start(kR,()=>{D($.x,$.y,_.nativeEvent)})}function J(_){if(_.touches.length!==1){F();return}if(A.isStarted()&&M.current){const L=_.touches[0],$=10,K=Math.abs(L.clientX-M.current.x),V=Math.abs(L.clientY-M.current.y);(K>$||V>$)&&F()}}return v.useEffect(()=>()=>{k.current?.abort()},[]),v.useEffect(()=>{function _($){if(T)return;const V=tr($);(at(O.current,V)||at(g.current,V)||at(y.current,V))&&$.preventDefault()}const L=Kt(O.current);return jt(L,"contextmenu",_)},[y,T,g]),Mt("div",n,{state:{open:R},ref:[O,a],props:[{onContextMenu:z,onTouchStart:G,onTouchMove:J,onTouchEnd:F,onTouchCancel:F,style:{WebkitTouchCallout:"none"}},c],stateAttributesMapping:rh})}),CF=TO;function TF({...e}){return S.jsx(RF,{"data-slot":"context-menu",...e})}function OF({className:e,...n}){return S.jsx(EF,{"data-slot":"context-menu-trigger",className:Qe("select-none",e),...n})}function MF({className:e,align:n="start",alignOffset:a=4,side:o="right",sideOffset:s=0,...u}){return S.jsx(wO,{children:S.jsx(CF,{className:"isolate z-50 outline-none",align:n,alignOffset:a,side:o,sideOffset:s,children:S.jsx(xO,{"data-slot":"context-menu-content",className:Qe("z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...u})})})}function PR({className:e,inset:n,variant:a="default",...o}){return S.jsx(vO,{"data-slot":"context-menu-item","data-inset":n,"data-variant":a,className:Qe("group/context-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",e),...o})}const BM=v.createContext(void 0);function zp(e){const n=v.useContext(BM);if(n===void 0&&!e)throw new Error(Rn(47));return n}const AF={...Po,disabled:e=>e.disabled,instantType:e=>e.instantType==="trigger-change"&&!Po.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,n)=>e.openChangeReason===Va&&Po.isOpenedByTrigger(e,n),isTouchPressOpen:(e,n)=>n&&e.openMethod==="touch"&&e.openChangeReason===Va,hasTriggerFocusGuards:(e,n)=>Po.isOpenedByTrigger(e,n)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class DF extends Ul{constructor(n,a,o){const s=new Pc;super(NF(n,s,a,o),IF(s),AF)}setOpen=(n,a)=>{const o=a.reason===qn,s=a.reason===Va&&a.event.detail===0,u=!n&&(a.reason===Dc||a.reason==null),c=Jh(a),d=this.select("activeTriggerId");if(!n&&a.reason===tE&&a.trigger==null&&d!=null&&(a.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(n,a),a.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(n,a);const p=()=>{const y=Zh(this.state,n,a.trigger,c());y.openChangeReason=a.reason,this.update(y)};o?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(OE,()=>{this.context.stickIfOpen=!1}),cr.flushSync(p)):p();let g;s?g="click":u?g="dismiss":a.reason===Ti&&(g="focus"),this.set("instantType",g)}}function NF(e,n,a,o=!1){const s={...rp(n,a,o),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return s.open&&e?.mounted===void 0&&(s.mounted=!0),s}function IF(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),stickIfOpenTimeout:new Da,stickIfOpen:!0,triggerElements:e}}const LR=Cc(function({props:n}){const{children:a,open:o,defaultOpen:s=!1,onOpenChange:u,onOpenChangeComplete:c,modal:d=!1,handle:p,triggerId:g,defaultTriggerId:y=null}=n,h=kF(p,{modal:d,open:s,openProp:o,activeTriggerId:y,triggerIdProp:g});h.useControlledProp("openProp",o),h.useControlledProp("triggerIdProp",g);const b=h.useState("open"),x=h.useState("mounted"),w=h.useState("payload");h.useContextCallback("onOpenChange",u),h.useContextCallback("onOpenChangeComplete",c),BE(h,b),Wh(h);const{forceUnmount:C}=ep(b,h,()=>{h.context.stickIfOpen=!0,h.set("openChangeReason",null)});h.useSyncedValues({modal:d}),v.useEffect(()=>{b||h.context.stickIfOpenTimeout.clear()},[h,b]),v.useImperativeHandle(n.actionsRef,()=>({unmount:C,close:()=>h.setOpen(!1,dt(Nc))}),[C,h]);const R=b||x||p!=null;return S.jsxs(BM.Provider,{value:h,children:[p&&S.jsx(Qh,{handle:p,store:h}),R&&S.jsx(PF,{store:h,modal:d}),typeof a=="function"?a({payload:w}):a]})});function jF(e){return zp(!0)?S.jsx(LR,{props:e}):S.jsx(LE,{children:S.jsx(LR,{props:e})})}function kF(e,n){const a=nv((o,s)=>new DF(n,o,s));return v.useEffect(()=>a.context.stickIfOpenTimeout.disposeEffect(),[a]),a}function PF({store:e,modal:n}){const a=e.useState("floatingRootContext"),o=jc(a,{outsidePressEvent:{mouse:n==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),s=o.reference,u=o.floating;return tp(e,{activeTriggerProps:s,inactiveTriggerProps:s,popupProps:u}),null}const VM=v.createContext(void 0);function LF(){const e=v.useContext(VM);if(e===void 0)throw new Error(Rn(45));return e}const zF=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n;return zp().useState("mounted")||o?S.jsx(VM.Provider,{value:o,children:S.jsx(Gh,{ref:a,...s})}):null}),qM=v.createContext(void 0);function _F(){const e=v.useContext(qM);if(!e)throw new Error(Rn(46));return e}const HF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,anchor:c,positionMethod:d,side:p,align:g,sideOffset:y,alignOffset:h,collisionBoundary:b="clipping-ancestors",collisionPadding:x,arrowPadding:w,sticky:C,disableAnchorTracking:R=!1,collisionAvoidance:T=Jy,...O}=n,M=zp(),A=LF(),I=ev(),j=M.useState("floatingRootContext"),k=M.useState("mounted"),D=M.useState("open"),z=M.useState("openChangeReason"),F=M.useState("activeTriggerElement"),G=M.useState("modal"),J=M.useState("openMethod"),Y=M.useState("positionerElement"),U=M.useState("instantType"),_=M.useState("transitionStatus"),L=M.useState("adaptiveOrigin"),$=sp({anchor:c,floatingRootContext:j,positionMethod:d,mounted:k,side:p,sideOffset:y,align:g,alignOffset:h,arrowPadding:w,collisionBoundary:b,collisionPadding:x,sticky:C,disableAnchorTracking:R,keepMounted:A,nodeId:I,collisionAvoidance:T,adaptiveOrigin:L}),K=j.useState("domReferenceElement");EO({store:M,domReference:K,positionerElement:Y,open:D});const V=G===!0&&z!==qn;jv(D&&V,J==="touch",Y,F);const X=M.useStateSetter("positionerElement"),ee={open:D,side:$.side,align:$.align,anchorHidden:$.anchorHidden,instant:U},q=lp(n,ee,{styles:$.positionerStyles,transitionStatus:_,props:O,refs:[a,X],hidden:!k,inert:!D});return S.jsxs(qM.Provider,{value:$,children:[k&&V&&S.jsx(Ep,{inert:up(!D),cutout:F}),S.jsx(PE,{id:I,children:q})]})}),UF=v.createContext(void 0);function FF(){const[e,n]=v.useState(0),a=Be(()=>(n(s=>s+1),()=>{n(s=>Math.max(0,s-1))}));return{context:v.useMemo(()=>({register:a}),[a]),hasClosePart:e>0}}const BF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,initialFocus:c,finalFocus:d,...p}=n,g=zp(),y=_F(),h=Nv()!=null,{context:b,hasClosePart:x}=FF(),w=g.useState("open"),C=g.useState("openMethod"),R=g.useState("instantType"),T=g.useState("transitionStatus"),O=g.useState("popupProps"),M=g.useState("titleElementId"),A=g.useState("descriptionElementId"),I=g.useState("modal"),j=g.useState("mounted"),k=g.useState("openChangeReason"),D=g.useState("activeTriggerElement"),z=g.useState("floatingRootContext"),F=z.useState("floatingId"),G=g.useState("disabled"),J=g.useState("openOnHover"),Y=g.useState("closeDelay");Ia({open:w,ref:g.context.popupRef,onComplete(){w&&g.context.onOpenChangeComplete?.(!0)}}),ov(z,{enabled:J&&!G,closeDelay:Y});const U=c===void 0?UE(g.context.popupRef):c,_=I!==!1&&x;g.useSyncedValue("focusManagerModal",_);const L=g.useStateSetter("popupElement"),$={open:w,side:y.side,align:y.align,instant:R,transitionStatus:T},K=Mt("div",n,{state:$,ref:[a,g.context.popupRef,L],props:[O,{id:F,role:"dialog",...kc,"aria-labelledby":M,"aria-describedby":A,onKeyDown(V){h&&Bc.has(V.key)&&V.stopPropagation()}},Lc(T),p],stateAttributesMapping:Fh});return S.jsx($h,{context:z,openInteractionType:C,modal:_,disabled:!j||k===qn,initialFocus:U,returnFocus:d,restoreFocus:"popup",getInsideElements:()=>[g.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:yn(D)?D:void 0,nextFocusableElement:g.context.triggerFocusTargetRef,beforeContentFocusGuardRef:g.context.beforeContentFocusGuardRef,children:S.jsx(UF.Provider,{value:b,children:K})})});function VF({...e}){return S.jsx(jF,{"data-slot":"popover",...e})}function qF({anchor:e,align:n="center",alignOffset:a=0,side:o="bottom",sideOffset:s=4,className:u,...c}){return S.jsx(zF,{children:S.jsx(HF,{anchor:e,className:"isolate z-50 outline-none",align:n,alignOffset:a,side:o,sideOffset:s,children:S.jsx(BF,{"data-slot":"popover-content",className:Qe("z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-4 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",u),...c})})})}function YF({assignedInstructionIds:e,instructions:n,isAssignmentStateReady:a,isLoading:o,isError:s,onRetry:u,onEdit:c,onDelete:d,onPreload:p}){const{t:g}=sn(),[y,h]=v.useState(null);return o?S.jsx(Lo,{className:"gap-0 py-0",children:S.jsx("div",{className:"divide-y",children:[0,1,2].map(b=>S.jsxs("div",{className:"flex items-center gap-2 p-3",children:[S.jsx(ca,{className:"size-3.5 rounded-sm"}),S.jsx(ca,{className:"h-4 w-2/3"})]},b))})}):s?S.jsxs(Lo,{className:"items-start gap-3 p-4",children:[S.jsx("p",{className:"text-xs text-muted-foreground",children:g("instructions.loadError")}),S.jsxs(nn,{type:"button",variant:"outline",onClick:u,children:[S.jsx(nT,{}),S.jsx("span",{children:g("common.retry")})]})]}):n.length===0?S.jsx(Lo,{className:"gap-0 py-0",children:S.jsx(wF,{icon:Fk,title:g("instructions.emptyTitle"),description:g("instructions.emptyDescription")})}):S.jsxs(Lo,{className:"gap-0 py-0",children:[S.jsx("ul",{"aria-label":g("instructions.listAria"),className:"divide-y",children:n.map(b=>S.jsx(KF,{instruction:b,isAssignmentStateReady:a,isInUse:e.has(b.id),onRequestDelete:x=>{h({anchor:x,instruction:b})},onEdit:()=>{c(b)},onPreload:p},b.id))}),S.jsx(VF,{open:y!==null,onOpenChange:b=>{b||h(null)},children:S.jsxs(qF,{anchor:y?.anchor,side:"bottom",align:"start",sideOffset:6,className:"w-64 p-3",children:[S.jsxs("div",{className:"flex flex-col gap-1",children:[S.jsx("div",{className:"text-xs font-medium",children:g("instructions.deleteConfirmTitle")}),S.jsx("p",{className:"text-xs/relaxed text-muted-foreground",children:g("instructions.deleteConfirmDescription",{name:y?.instruction.name??""})})]}),S.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[S.jsx(nn,{type:"button",variant:"ghost",onClick:()=>{h(null)},children:g("common.cancel")}),S.jsx(nn,{type:"button",variant:"destructive",onClick:()=>{if(!y)return;const{instruction:b}=y;h(null),d(b)},children:g("instructions.delete")})]})]})})]})}function KF({instruction:e,isAssignmentStateReady:n,isInUse:a,onEdit:o,onPreload:s,onRequestDelete:u}){const{t:c}=sn(),d=v.useRef(null),{attributes:p,isDragging:g,listeners:y,setNodeRef:h}=TM({id:nF(e.id),data:{type:"library-instruction",instructionId:e.id}});return S.jsxs(TF,{children:[S.jsxs(OF,{ref:b=>{d.current=b,h(b)},render:S.jsx("li",{...y,"data-instruction-id":e.id,className:Qe(`
|
|
78
|
+
`,children:S.jsx(a,{"aria-hidden":"true",className:"size-4"})}),S.jsx("div",{className:"text-sm font-medium",children:o}),s]})}function RF(e){const[n,a]=v.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),o=v.useRef(null),s=v.useRef(null),u=v.useRef(null),c=v.useRef(null),d=v.useRef(!0),p=v.useRef(null),g=Hl(),y=v.useMemo(()=>({anchor:n,setAnchor:a,actionsRef:u,backdropRef:o,internalBackdropRef:s,positionerRef:c,allowMouseUpTriggerRef:d,initialCursorPointRef:p,rootId:g}),[n,g]);return S.jsx(cO.Provider,{value:y,children:S.jsx(xp.Provider,{value:void 0,children:S.jsx(NO,{...e})})})}const jR=500,EF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,{setAnchor:d,actionsRef:p,internalBackdropRef:g,backdropRef:y,positionerRef:h,allowMouseUpTriggerRef:b,initialCursorPointRef:x,rootId:w}=Sp(!1),{store:C}=Vo(!1),R=C.useState("open"),T=C.useState("disabled"),O=v.useRef(null),M=v.useRef(null),A=Hn(),I=Hn(),j=v.useRef(!1),k=v.useRef(null);function D(_,L,$){const K=$.type.startsWith("touch");x.current={x:_,y:L},d({getBoundingClientRect(){return DOMRect.fromRect({width:K?10:0,height:K?10:0,x:_,y:L})}}),j.current=!1,p.current?.setOpen(!0,dt(Va,$)),I.start(jR,()=>{j.current=!0})}function z(_){if(T)return;b.current=!0,Fa(_),D(_.clientX,_.clientY,_.nativeEvent);const L=Kt(O.current);k.current?.abort();const $=new AbortController;k.current=$,L.addEventListener("mouseup",K=>{if(b.current=!1,!j.current)return;I.clear(),j.current=!1;const V=tr(K);at(h.current,V)||w&&V&&kv(V)===w||p.current?.setOpen(!1,dt(Vy,K))},{once:!0,signal:$.signal})}function F(){A.clear(),M.current=null}function G(_){if(T){F();return}if(b.current=!1,_.touches.length!==1){F();return}_.stopPropagation();const L=_.touches[0],$={x:L.clientX,y:L.clientY};M.current=$,A.start(jR,()=>{D($.x,$.y,_.nativeEvent)})}function J(_){if(_.touches.length!==1){F();return}if(A.isStarted()&&M.current){const L=_.touches[0],$=10,K=Math.abs(L.clientX-M.current.x),V=Math.abs(L.clientY-M.current.y);(K>$||V>$)&&F()}}return v.useEffect(()=>()=>{k.current?.abort()},[]),v.useEffect(()=>{function _($){if(T)return;const V=tr($);(at(O.current,V)||at(g.current,V)||at(y.current,V))&&$.preventDefault()}const L=Kt(O.current);return jt(L,"contextmenu",_)},[y,T,g]),Mt("div",n,{state:{open:R},ref:[O,a],props:[{onContextMenu:z,onTouchStart:G,onTouchMove:J,onTouchEnd:F,onTouchCancel:F,style:{WebkitTouchCallout:"none"}},c],stateAttributesMapping:rh})}),CF=CO;function TF({...e}){return S.jsx(RF,{"data-slot":"context-menu",...e})}function OF({className:e,...n}){return S.jsx(EF,{"data-slot":"context-menu-trigger",className:Qe("select-none",e),...n})}function MF({className:e,align:n="start",alignOffset:a=4,side:o="right",sideOffset:s=0,...u}){return S.jsx(SO,{children:S.jsx(CF,{className:"isolate z-50 outline-none",align:n,alignOffset:a,side:o,sideOffset:s,children:S.jsx(bO,{"data-slot":"context-menu-content",className:Qe("z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...u})})})}function kR({className:e,inset:n,variant:a="default",...o}){return S.jsx(yO,{"data-slot":"context-menu-item","data-inset":n,"data-variant":a,className:Qe("group/context-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",e),...o})}const VM=v.createContext(void 0);function zp(e){const n=v.useContext(VM);if(n===void 0&&!e)throw new Error(Rn(47));return n}const AF={...Po,disabled:e=>e.disabled,instantType:e=>e.instantType==="trigger-change"&&!Po.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,n)=>e.openChangeReason===Va&&Po.isOpenedByTrigger(e,n),isTouchPressOpen:(e,n)=>n&&e.openMethod==="touch"&&e.openChangeReason===Va,hasTriggerFocusGuards:(e,n)=>Po.isOpenedByTrigger(e,n)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class DF extends Ul{constructor(n,a,o){const s=new Pc;super(NF(n,s,a,o),IF(s),AF)}setOpen=(n,a)=>{const o=a.reason===qn,s=a.reason===Va&&a.event.detail===0,u=!n&&(a.reason===Dc||a.reason==null),c=Jh(a),d=this.select("activeTriggerId");if(!n&&a.reason===eE&&a.trigger==null&&d!=null&&(a.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(n,a),a.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(n,a);const p=()=>{const y=Zh(this.state,n,a.trigger,c());y.openChangeReason=a.reason,this.update(y)};o?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(TE,()=>{this.context.stickIfOpen=!1}),cr.flushSync(p)):p();let g;s?g="click":u?g="dismiss":a.reason===Ti&&(g="focus"),this.set("instantType",g)}}function NF(e,n,a,o=!1){const s={...rp(n,a,o),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return s.open&&e?.mounted===void 0&&(s.mounted=!0),s}function IF(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),stickIfOpenTimeout:new Da,stickIfOpen:!0,triggerElements:e}}const PR=Cc(function({props:n}){const{children:a,open:o,defaultOpen:s=!1,onOpenChange:u,onOpenChangeComplete:c,modal:d=!1,handle:p,triggerId:g,defaultTriggerId:y=null}=n,h=kF(p,{modal:d,open:s,openProp:o,activeTriggerId:y,triggerIdProp:g});h.useControlledProp("openProp",o),h.useControlledProp("triggerIdProp",g);const b=h.useState("open"),x=h.useState("mounted"),w=h.useState("payload");h.useContextCallback("onOpenChange",u),h.useContextCallback("onOpenChangeComplete",c),FE(h,b),Wh(h);const{forceUnmount:C}=ep(b,h,()=>{h.context.stickIfOpen=!0,h.set("openChangeReason",null)});h.useSyncedValues({modal:d}),v.useEffect(()=>{b||h.context.stickIfOpenTimeout.clear()},[h,b]),v.useImperativeHandle(n.actionsRef,()=>({unmount:C,close:()=>h.setOpen(!1,dt(Nc))}),[C,h]);const R=b||x||p!=null;return S.jsxs(VM.Provider,{value:h,children:[p&&S.jsx(Qh,{handle:p,store:h}),R&&S.jsx(PF,{store:h,modal:d}),typeof a=="function"?a({payload:w}):a]})});function jF(e){return zp(!0)?S.jsx(PR,{props:e}):S.jsx(PE,{children:S.jsx(PR,{props:e})})}function kF(e,n){const a=nv((o,s)=>new DF(n,o,s));return v.useEffect(()=>a.context.stickIfOpenTimeout.disposeEffect(),[a]),a}function PF({store:e,modal:n}){const a=e.useState("floatingRootContext"),o=jc(a,{outsidePressEvent:{mouse:n==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),s=o.reference,u=o.floating;return tp(e,{activeTriggerProps:s,inactiveTriggerProps:s,popupProps:u}),null}const qM=v.createContext(void 0);function LF(){const e=v.useContext(qM);if(e===void 0)throw new Error(Rn(45));return e}const zF=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n;return zp().useState("mounted")||o?S.jsx(qM.Provider,{value:o,children:S.jsx(Gh,{ref:a,...s})}):null}),YM=v.createContext(void 0);function _F(){const e=v.useContext(YM);if(!e)throw new Error(Rn(46));return e}const HF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,anchor:c,positionMethod:d,side:p,align:g,sideOffset:y,alignOffset:h,collisionBoundary:b="clipping-ancestors",collisionPadding:x,arrowPadding:w,sticky:C,disableAnchorTracking:R=!1,collisionAvoidance:T=Jy,...O}=n,M=zp(),A=LF(),I=ev(),j=M.useState("floatingRootContext"),k=M.useState("mounted"),D=M.useState("open"),z=M.useState("openChangeReason"),F=M.useState("activeTriggerElement"),G=M.useState("modal"),J=M.useState("openMethod"),Y=M.useState("positionerElement"),U=M.useState("instantType"),_=M.useState("transitionStatus"),L=M.useState("adaptiveOrigin"),$=sp({anchor:c,floatingRootContext:j,positionMethod:d,mounted:k,side:p,sideOffset:y,align:g,alignOffset:h,arrowPadding:w,collisionBoundary:b,collisionPadding:x,sticky:C,disableAnchorTracking:R,keepMounted:A,nodeId:I,collisionAvoidance:T,adaptiveOrigin:L}),K=j.useState("domReferenceElement");RO({store:M,domReference:K,positionerElement:Y,open:D});const V=G===!0&&z!==qn;jv(D&&V,J==="touch",Y,F);const X=M.useStateSetter("positionerElement"),ee={open:D,side:$.side,align:$.align,anchorHidden:$.anchorHidden,instant:U},q=lp(n,ee,{styles:$.positionerStyles,transitionStatus:_,props:O,refs:[a,X],hidden:!k,inert:!D});return S.jsxs(YM.Provider,{value:$,children:[k&&V&&S.jsx(Ep,{inert:up(!D),cutout:F}),S.jsx(kE,{id:I,children:q})]})}),UF=v.createContext(void 0);function FF(){const[e,n]=v.useState(0),a=Be(()=>(n(s=>s+1),()=>{n(s=>Math.max(0,s-1))}));return{context:v.useMemo(()=>({register:a}),[a]),hasClosePart:e>0}}const BF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,initialFocus:c,finalFocus:d,...p}=n,g=zp(),y=_F(),h=Nv()!=null,{context:b,hasClosePart:x}=FF(),w=g.useState("open"),C=g.useState("openMethod"),R=g.useState("instantType"),T=g.useState("transitionStatus"),O=g.useState("popupProps"),M=g.useState("titleElementId"),A=g.useState("descriptionElementId"),I=g.useState("modal"),j=g.useState("mounted"),k=g.useState("openChangeReason"),D=g.useState("activeTriggerElement"),z=g.useState("floatingRootContext"),F=z.useState("floatingId"),G=g.useState("disabled"),J=g.useState("openOnHover"),Y=g.useState("closeDelay");Ia({open:w,ref:g.context.popupRef,onComplete(){w&&g.context.onOpenChangeComplete?.(!0)}}),ov(z,{enabled:J&&!G,closeDelay:Y});const U=c===void 0?HE(g.context.popupRef):c,_=I!==!1&&x;g.useSyncedValue("focusManagerModal",_);const L=g.useStateSetter("popupElement"),$={open:w,side:y.side,align:y.align,instant:R,transitionStatus:T},K=Mt("div",n,{state:$,ref:[a,g.context.popupRef,L],props:[O,{id:F,role:"dialog",...kc,"aria-labelledby":M,"aria-describedby":A,onKeyDown(V){h&&Bc.has(V.key)&&V.stopPropagation()}},Lc(T),p],stateAttributesMapping:Fh});return S.jsx($h,{context:z,openInteractionType:C,modal:_,disabled:!j||k===qn,initialFocus:U,returnFocus:d,restoreFocus:"popup",getInsideElements:()=>[g.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:yn(D)?D:void 0,nextFocusableElement:g.context.triggerFocusTargetRef,beforeContentFocusGuardRef:g.context.beforeContentFocusGuardRef,children:S.jsx(UF.Provider,{value:b,children:K})})});function VF({...e}){return S.jsx(jF,{"data-slot":"popover",...e})}function qF({anchor:e,align:n="center",alignOffset:a=0,side:o="bottom",sideOffset:s=4,className:u,...c}){return S.jsx(zF,{children:S.jsx(HF,{anchor:e,className:"isolate z-50 outline-none",align:n,alignOffset:a,side:o,sideOffset:s,children:S.jsx(BF,{"data-slot":"popover-content",className:Qe("z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-4 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",u),...c})})})}function YF({assignedInstructionIds:e,instructions:n,isAssignmentStateReady:a,isLoading:o,isError:s,onRetry:u,onEdit:c,onDelete:d,onPreload:p}){const{t:g}=sn(),[y,h]=v.useState(null);return o?S.jsx(Lo,{className:"gap-0 py-0",children:S.jsx("div",{className:"divide-y",children:[0,1,2].map(b=>S.jsxs("div",{className:"flex items-center gap-2 p-3",children:[S.jsx(ca,{className:"size-3.5 rounded-sm"}),S.jsx(ca,{className:"h-4 w-2/3"})]},b))})}):s?S.jsxs(Lo,{className:"items-start gap-3 p-4",children:[S.jsx("p",{className:"text-xs text-muted-foreground",children:g("instructions.loadError")}),S.jsxs(nn,{type:"button",variant:"outline",onClick:u,children:[S.jsx(tT,{}),S.jsx("span",{children:g("common.retry")})]})]}):n.length===0?S.jsx(Lo,{className:"gap-0 py-0",children:S.jsx(wF,{icon:Bk,title:g("instructions.emptyTitle"),description:g("instructions.emptyDescription")})}):S.jsxs(Lo,{className:"gap-0 py-0",children:[S.jsx("ul",{"aria-label":g("instructions.listAria"),className:"divide-y",children:n.map(b=>S.jsx(KF,{instruction:b,isAssignmentStateReady:a,isInUse:e.has(b.id),onRequestDelete:x=>{h({anchor:x,instruction:b})},onEdit:()=>{c(b)},onPreload:p},b.id))}),S.jsx(VF,{open:y!==null,onOpenChange:b=>{b||h(null)},children:S.jsxs(qF,{anchor:y?.anchor,side:"bottom",align:"start",sideOffset:6,className:"w-64 p-3",children:[S.jsxs("div",{className:"flex flex-col gap-1",children:[S.jsx("div",{className:"text-xs font-medium",children:g("instructions.deleteConfirmTitle")}),S.jsx("p",{className:"text-xs/relaxed text-muted-foreground",children:g("instructions.deleteConfirmDescription",{name:y?.instruction.name??""})})]}),S.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[S.jsx(nn,{type:"button",variant:"ghost",onClick:()=>{h(null)},children:g("common.cancel")}),S.jsx(nn,{type:"button",variant:"destructive",onClick:()=>{if(!y)return;const{instruction:b}=y;h(null),d(b)},children:g("instructions.delete")})]})]})})]})}function KF({instruction:e,isAssignmentStateReady:n,isInUse:a,onEdit:o,onPreload:s,onRequestDelete:u}){const{t:c}=sn(),d=v.useRef(null),{attributes:p,isDragging:g,listeners:y,setNodeRef:h}=OM({id:nF(e.id),data:{type:"library-instruction",instructionId:e.id}});return S.jsxs(TF,{children:[S.jsxs(OF,{ref:b=>{d.current=b,h(b)},render:S.jsx("li",{...y,"data-instruction-id":e.id,className:Qe(`
|
|
79
79
|
flex cursor-grab items-center gap-2 px-3 py-2.5
|
|
80
80
|
hover:bg-muted/40
|
|
81
81
|
active:cursor-grabbing
|
|
@@ -84,28 +84,28 @@ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}
|
|
|
84
84
|
outline-none
|
|
85
85
|
focus-visible:underline focus-visible:underline-offset-3
|
|
86
86
|
active:cursor-grabbing
|
|
87
|
-
`,onClick:o,onFocus:s,onPointerEnter:s,children:S.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.name})})]}),S.jsxs(MF,{children:[S.jsxs(
|
|
87
|
+
`,onClick:o,onFocus:s,onPointerEnter:s,children:S.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.name})})]}),S.jsxs(MF,{children:[S.jsxs(kR,{onClick:o,children:[S.jsx(eP,{}),S.jsx("span",{children:c("instructions.edit")})]}),S.jsxs(kR,{variant:"destructive",disabled:!n||a,onClick:()=>{const b=d.current;b&&u(b)},children:[S.jsx(iP,{}),S.jsx("span",{children:c("instructions.delete")}),a&&S.jsx("span",{className:"ml-auto text-[10px] text-muted-foreground",children:c("instructions.inUse")})]})]})]})}function KM({className:e,...n}){return S.jsx("label",{"data-slot":"label",className:Qe("flex items-center gap-2 text-xs/relaxed leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...n})}function _l({children:e,className:n,...a}){return S.jsxs(KM,{className:Qe("gap-1",n),...a,children:[e,S.jsx("span",{"aria-hidden":"true",className:"text-destructive",children:"*"})]})}function _p({...e}){return S.jsx(QO,{"data-slot":"dialog",...e})}function GF({...e}){return S.jsx(XO,{"data-slot":"dialog-portal",...e})}function tb({...e}){return S.jsx(Op,{"data-slot":"dialog-close",...e})}function $F({className:e,...n}){return S.jsx(YO,{"data-slot":"dialog-overlay",className:Qe("fixed inset-0 isolate z-50 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...n})}function Hp({className:e,children:n,showCloseButton:a=!0,...o}){return S.jsxs(GF,{children:[S.jsx($F,{}),S.jsxs($O,{"data-slot":"dialog-content",className:Qe("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-xs/relaxed text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o,children:[n,a&&S.jsxs(Op,{"data-slot":"dialog-close",render:S.jsx(nn,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[S.jsx(Rs,{}),S.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Up({className:e,...n}){return S.jsx("div",{"data-slot":"dialog-header",className:Qe("flex flex-col gap-1",e),...n})}function Fp({className:e,showCloseButton:n=!1,children:a,...o}){return S.jsxs("div",{"data-slot":"dialog-footer",className:Qe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...o,children:[a,n&&S.jsx(Op,{render:S.jsx(nn,{variant:"outline"}),children:"Close"})]})}function Bp({className:e,...n}){return S.jsx(ZO,{"data-slot":"dialog-title",className:Qe("font-heading text-sm font-medium",e),...n})}function nb({className:e,...n}){return S.jsx(KO,{"data-slot":"dialog-description",className:Qe("text-xs/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...n})}const Rc=["instructions"];function XF(){const e=fp({queryKey:Rc,queryFn:({signal:n})=>vF(n),retry:!1});return{instructions:e.data??[],isLoading:e.isPending,isError:e.isError&&e.data===void 0,retry:e.refetch}}const QF="modulepreload",ZF=function(e){return"/"+e},LR={},JF=function(n,a,o){let s=Promise.resolve();if(a&&a.length>0){let p=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");s=p(a.map(g=>{if(g=ZF(g),g in LR)return;LR[g]=!0;const y=g.endsWith(".css"),h=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${h}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":QF,y||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),y)return new Promise((x,w)=>{b.addEventListener("load",x),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return s.then(c=>{for(const d of c||[])d.status==="rejected"&&u(d.reason);return n().catch(u)})},GM=()=>JF(()=>import("./markdown-editor-CorvPRcj.js"),__vite__mapDeps([0,1]));function q0(){GM()}const WF=v.lazy(async()=>({default:(await GM()).MarkdownEditor}));function e7(e){const{t:n}=sn();return S.jsx(v.Suspense,{fallback:S.jsx("div",{style:{height:e.height??"16rem"},className:`
|
|
88
88
|
flex items-center justify-center text-xs text-muted-foreground
|
|
89
|
-
`,children:n("instructions.editorLoading")}),children:S.jsx(WF,{...e})})}const t7="16rem";function
|
|
89
|
+
`,children:n("instructions.editorLoading")}),children:S.jsx(WF,{...e})})}const t7="16rem";function zR({instruction:e,onClose:n}){const{t:a}=sn(),o=Bo(),s=v.useId(),u=v.useId(),c=e!==void 0,[d,p]=v.useState(e?.name??""),[g,y]=v.useState(e?.content??""),h=Ma({mutationFn:M=>e?xF(e.id,M):bF(M),onSuccess:M=>{o.setQueryData(Rc,A=>[...(A??[]).filter(I=>I.id!==M.id),M].toSorted((I,j)=>j.updatedAt-I.updatedAt)),o.invalidateQueries({queryKey:Rc}),_n.success(a(c?"instructions.updated":"instructions.created")),n()},onError:()=>{_n.error(a(c?"instructions.updateError":"instructions.error"))}}),b=h.isPending,x=!!(d.trim()&&g.trim())&&!b,w=c?"instructions.editTitle":"instructions.createTitle",C=c?"instructions.updating":"instructions.creating",R=c?"instructions.updateSave":"instructions.save",T=c?nP:lv;function O(){b||n()}return S.jsx(_p,{open:!0,onOpenChange:M=>{M||O()},children:S.jsxs(Hp,{showCloseButton:!1,className:`
|
|
90
90
|
grid max-h-[calc(100vh-2rem)] grid-rows-[auto_minmax(0,1fr)_auto]
|
|
91
91
|
overflow-hidden
|
|
92
92
|
sm:max-w-3xl
|
|
93
|
-
`,children:[S.jsxs("form",{className:"contents","aria-busy":b,onSubmit:M=>{M.preventDefault(),x&&h.mutate({name:d.trim(),content:g})},children:[S.jsx(Up,{className:"pr-8",children:S.jsx(Bp,{children:a(w)})}),S.jsxs("div",{className:"flex min-h-0 flex-col gap-3 overflow-y-auto pr-1",children:[S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx(_l,{htmlFor:s,children:a("instructions.name")}),S.jsx(
|
|
93
|
+
`,children:[S.jsxs("form",{className:"contents","aria-busy":b,onSubmit:M=>{M.preventDefault(),x&&h.mutate({name:d.trim(),content:g})},children:[S.jsx(Up,{className:"pr-8",children:S.jsx(Bp,{children:a(w)})}),S.jsxs("div",{className:"flex min-h-0 flex-col gap-3 overflow-y-auto pr-1",children:[S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx(_l,{htmlFor:s,children:a("instructions.name")}),S.jsx(BO,{id:s,autoFocus:!0,required:!0,maxLength:200,value:d,disabled:b,placeholder:a("instructions.namePlaceholder"),onChange:M=>{p(M.target.value)}})]}),S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx(_l,{id:u,children:a("instructions.content")}),S.jsx("div",{role:"group","aria-labelledby":u,"aria-required":"true",className:`
|
|
94
94
|
overflow-hidden rounded-md border border-input bg-input/20
|
|
95
95
|
focus-within:border-ring focus-within:ring-2
|
|
96
96
|
focus-within:ring-ring/30
|
|
97
|
-
`,children:S.jsx(e7,{height:t7,value:g,ariaLabel:a("instructions.content"),placeholder:a("instructions.contentPlaceholder"),readOnly:b,onChange:y})})]})]}),S.jsxs(Fp,{children:[S.jsx(nn,{type:"button",variant:"ghost",disabled:b,onClick:O,children:a("common.cancel")}),S.jsxs(nn,{type:"submit",disabled:!x,children:[b?S.jsx(Fl,{className:"animate-spin"}):S.jsx(T,{}),S.jsx("span",{children:a(b?C:R)})]})]})]}),S.jsxs(
|
|
97
|
+
`,children:S.jsx(e7,{height:t7,value:g,ariaLabel:a("instructions.content"),placeholder:a("instructions.contentPlaceholder"),readOnly:b,onChange:y})})]})]}),S.jsxs(Fp,{children:[S.jsx(nn,{type:"button",variant:"ghost",disabled:b,onClick:O,children:a("common.cancel")}),S.jsxs(nn,{type:"submit",disabled:!x,children:[b?S.jsx(Fl,{className:"animate-spin"}):S.jsx(T,{}),S.jsx("span",{children:a(b?C:R)})]})]})]}),S.jsxs(tb,{disabled:b,render:S.jsx(nn,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[S.jsx(Rs,{}),S.jsx("span",{className:"sr-only",children:a("a11y.close")})]})]})})}const n7=e=>{const n=e.active.data.current;if(Dl(n))return r7(e,n.agentId);const a=e.pointerCoordinates?RH(e):vH(e),o=a.filter(({id:s})=>rF(s));return o.length>0?o:a};function r7(e,n){const a=e.collisionRect.left+e.collisionRect.width/2,o=e.collisionRect.top+e.collisionRect.height/2,s=e.droppableRects.get(_M(n));if(s&&(a<s.left||a>s.left+s.width||o<s.top||o>s.top+s.height))return[];let u;for(const c of e.droppableContainers){const d=c.data.current;if(!Dl(d)||d.agentId!==n)continue;const p=e.droppableRects.get(c.id);if(!p)continue;const g=(p.left+p.width/2-a)**2+(p.top+p.height/2-o)**2;(!u||g<u.distance)&&(u={id:c.id,distance:g})}return u?[{id:u.id}]:[]}function a7(){const{t:e}=sn(),n=Bo(),[a,o]=v.useState(null),[s,u]=v.useState(!1),[c,d]=v.useState(null),p=XF(),g=mF(),y=gH(U0(xM,{activationConstraint:{distance:4}}),U0(SM,{activationConstraint:{delay:200,tolerance:8}}),U0(Gv,{coordinateGetter:KU})),h=v.useMemo(()=>new Set(g.agents.flatMap(({instructionIds:j})=>j)),[g.agents]),b=v.useMemo(()=>new Map(p.instructions.map(j=>[j.id,j])),[p.instructions]),x=c?p.instructions.find(({id:j})=>j===c):void 0,w=a?.data.current,C=o7(w),R=C?b.get(C)?.name??C:"",T=a?.rect.current.initial?.width,O=Ma({mutationFn:j=>SF(j.id),onSuccess:(j,k)=>{n.setQueryData(Rc,D=>D?.filter(({id:z})=>z!==k.id)),n.invalidateQueries({queryKey:Rc}),_n.success(e("instructions.deleted"))},onError:j=>{_n.error(e(j instanceof Wv&&j.code==="INSTRUCTION_IN_USE"?"instructions.deleteInUse":"instructions.deleteError"))}});function M(j,k,D){const z=g.agents.find(({id:J})=>J===j);if(!z||g.pendingAgentIds.has(j))return;if(z.instructionIds.includes(k)){_n.error(e("agents.duplicateError"));return}const F=[...z.instructionIds],G=D?F.indexOf(D):-1;F.splice(G<0?F.length:G,0,k),g.updateInstructions(j,F)}function A(j,k){const D=g.agents.find(({id:z})=>z===j);!D||g.pendingAgentIds.has(j)||g.updateInstructions(j,D.instructionIds.filter(z=>z!==k))}function I({active:j,over:k}){if(o(null),!k)return;const D=j.data.current,z=k.data.current;if(My(D)){if(IR(z)){M(z.agentId,D.instructionId);return}Dl(z)&&M(z.agentId,D.instructionId,z.instructionId);return}if(!Dl(D))return;const F=g.agents.find(({id:_})=>_===D.agentId);if(!F||g.pendingAgentIds.has(F.id))return;const G=F.instructionIds,J=G.indexOf(D.instructionId),Y=Dl(z)&&z.agentId===D.agentId?G.indexOf(z.instructionId):IR(z)&&z.agentId===D.agentId?G.length-1:-1;if(J===Y||J===-1||Y===-1)return;const U=Qv([...G],J,Y);U.length===G.length&&U.every((_,L)=>_===G[L])||g.updateInstructions(F.id,U)}return S.jsxs(hU,{sensors:y,collisionDetection:n7,onDragStart:({active:j})=>{o(j)},onDragCancel:()=>{o(null)},onDragEnd:I,children:[S.jsxs("div",{className:`
|
|
98
98
|
grid min-h-0 flex-1 gap-4 overflow-hidden p-4
|
|
99
99
|
max-md:overflow-y-auto
|
|
100
100
|
md:grid-cols-[minmax(220px,0.8fr)_minmax(0,1.2fr)]
|
|
101
|
-
`,children:[S.jsx(
|
|
101
|
+
`,children:[S.jsx(Z8,{children:S.jsxs(nn,{type:"button",onFocus:q0,onPointerEnter:q0,onClick:()=>{u(!0)},children:[S.jsx(lv,{}),S.jsx("span",{children:e("instructions.create")})]})}),S.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[S.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[S.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("nav.instructions")}),S.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("instructions.dragHint")})]}),S.jsx("div",{className:`
|
|
102
102
|
min-h-0 flex-1 overflow-y-auto p-1
|
|
103
103
|
max-md:max-h-64
|
|
104
104
|
`,children:S.jsx(YF,{assignedInstructionIds:h,instructions:p.instructions,isAssignmentStateReady:!g.isLoading&&!g.isError,isLoading:p.isLoading,isError:p.isError,onRetry:()=>{p.retry()},onEdit:j=>{d(j.id)},onDelete:j=>{O.mutate(j)},onPreload:q0})})]}),S.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[S.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[S.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("agents.title")}),S.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("agents.orderHint")})]}),S.jsxs("div",{className:`
|
|
105
105
|
flex min-h-0 flex-1 flex-col gap-3 p-1
|
|
106
106
|
max-md:pb-2
|
|
107
107
|
md:overflow-y-auto
|
|
108
|
-
`,children:[g.isLoading&&S.jsx(i7,{}),!g.isLoading&&g.isError&&S.jsxs(Lo,{className:"items-start gap-3 p-4",children:[S.jsx("p",{className:"text-xs text-muted-foreground",children:e("agents.loadError")}),S.jsxs(nn,{type:"button",variant:"outline",onClick:()=>{g.retry()},children:[S.jsx(
|
|
108
|
+
`,children:[g.isLoading&&S.jsx(i7,{}),!g.isLoading&&g.isError&&S.jsxs(Lo,{className:"items-start gap-3 p-4",children:[S.jsx("p",{className:"text-xs text-muted-foreground",children:e("agents.loadError")}),S.jsxs(nn,{type:"button",variant:"outline",onClick:()=>{g.retry()},children:[S.jsx(tT,{}),S.jsx("span",{children:e("common.retry")})]})]}),!g.isLoading&&!g.isError&&g.agents.map(j=>S.jsx(lF,{agent:j,instructionsById:b,isInstructionsLoading:p.isLoading,isPending:g.pendingAgentIds.has(j.id),isReapplying:g.reapplyingAgentIds.has(j.id),onRemoveInstruction:A,onToggle:(k,D)=>{g.setEnabled(k,D)},onReapply:k=>{g.reapply(k)},onOpenFile:k=>{g.openFile(k)}},j.id))]})]}),s&&S.jsx(zR,{onClose:()=>{u(!1)}}),x&&S.jsx(zR,{instruction:x,onClose:()=>{d(null)}})]}),My(w)&&S.jsx(DU,{dropAnimation:null,children:R&&S.jsxs("div",{style:{width:T},className:"flex items-center gap-2 bg-card px-3 py-2.5 text-xs",children:[S.jsx(sv,{className:"size-3.5 text-muted-foreground"}),S.jsx("span",{className:"truncate",children:R})]})})]})}function o7(e){if(My(e)||Dl(e))return e.instructionId}function i7(){return S.jsx(S.Fragment,{children:[0,1].map(e=>S.jsxs(Lo,{className:"gap-0 py-0",children:[S.jsxs("div",{className:"flex items-center gap-3 p-3",children:[S.jsx(ca,{className:"size-8 rounded-md"}),S.jsxs("div",{className:"min-w-0 flex-1",children:[S.jsx(ca,{className:"h-4 w-24"}),S.jsx(ca,{className:"mt-2 h-3 w-40"})]}),S.jsx(ca,{className:"h-4 w-7 rounded-full"})]}),S.jsx("div",{className:"border-t border-border/60 p-3",children:S.jsx(ca,{className:"h-20 w-full"})})]},e))})}const Vp="/api/settings";function s7(e){return Zc({signal:e})}function l7(e){return Zc({method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function u7(){return Zc({method:"POST"},`${Vp}/config-folder/open`)}function c7(e){return Zc({signal:e},`${Vp}/skill-copy`)}function d7(e){return Zc({method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)},`${Vp}/skill-copy`)}async function Zc(e,n=Vp){const a=await fetch(n,e);if(!a.ok)throw new Error(await f7(a));return a.json()}async function f7(e){try{return(await e.json()).error?.message??`Request failed with status ${e.status}`}catch{return`Request failed with status ${e.status}`}}function ji({label:e,description:n,children:a,className:o,controlClassName:s}){return S.jsxs("div",{className:Qe(`
|
|
109
109
|
flex flex-col items-start gap-3 p-4
|
|
110
110
|
min-[680px]:min-h-16 min-[680px]:flex-row min-[680px]:items-center
|
|
111
111
|
min-[680px]:justify-between min-[680px]:gap-8
|
|
@@ -119,10 +119,10 @@ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}
|
|
|
119
119
|
`,children:[e&&S.jsx("span",{className:`
|
|
120
120
|
min-w-0 font-mono text-xs break-all text-muted-foreground
|
|
121
121
|
select-text
|
|
122
|
-
`,children:e}),S.jsx(nn,{type:"button",variant:"ghost",size:"icon","aria-label":d,title:d,disabled:c,"aria-busy":o.isPending,onClick:()=>{!e||c||(a.current&&clearTimeout(a.current),o.mutate(e,{onSuccess:()=>{a.current=setTimeout(()=>o.reset(),2e3)}}))},children:u?S.jsx(dp,{}):S.jsx(
|
|
122
|
+
`,children:e}),S.jsx(nn,{type:"button",variant:"ghost",size:"icon","aria-label":d,title:d,disabled:c,"aria-busy":o.isPending,onClick:()=>{!e||c||(a.current&&clearTimeout(a.current),o.mutate(e,{onSuccess:()=>{a.current=setTimeout(()=>o.reset(),2e3)}}))},children:u?S.jsx(dp,{}):S.jsx(Hk,{})}),S.jsxs(nn,{type:"button",variant:"outline",disabled:c,"aria-busy":s.isPending,onClick:()=>{c||s.mutate()},children:[s.isPending?S.jsx(Fl,{className:"animate-spin"}):S.jsx(Vk,{}),S.jsx("span",{children:n("settings.openFolder")})]})]})})}function p7(e){if(!e)return null;for(const n of e.elements){const a=n.tagName;if(a==="BUTTON"||a==="INPUT"){const o=n;if(o.type==="submit")return o}}return null}const g7="data-checked",m7="data-unchecked";function $M(e){return{checked(n){return e.indeterminate?{}:n?{[g7]:""}:{[m7]:""}},...Yl}}const y7=v.createContext(void 0);function v7(){return v.useContext(y7)}const XM=v.createContext(void 0);function b7(){const e=v.useContext(XM);if(e===void 0)throw new Error(Rn(14));return e}const x7="data-parent",S7=v.forwardRef(function(n,a){const{checked:o,className:s,defaultChecked:u=!1,"aria-labelledby":c,disabled:d=!1,form:p,id:g,indeterminate:y=!1,inputRef:h,name:b,onCheckedChange:x,parent:w=!1,readOnly:C=!1,render:R,required:T=!1,uncheckedValue:O,value:M,nativeButton:A=!1,style:I,...j}=n,{clearErrors:k}=Vc(),{disabled:D,name:z,setDirty:F,setFilled:G,setTouched:J,state:Y,validationMode:U,validityData:_,validation:L}=qo(),$=FO(),{labelId:K,registerControlId:V,getDescriptionProps:X}=Cs(),ee=v7(),q=ee?.allValues===void 0?void 0:ee.parent,se=q!==void 0,N=D||$.disabled||ee?.disabled||d,B=z??b,W=M??B,re=Tr(),Re=ee?.registerControlId!==V,le=Kl({id:g||void 0,enabled:Re}),me=A?le:re;let ge={};se&&(w?ge=q.getParentProps():W!==void 0&&(ge=q.getChildProps(W)));const{checked:ce=o,indeterminate:Te=y,onCheckedChange:ve,...Pe}=ge,Me=ee?.value,Le=v.useRef(null),Fe=qc(N,Le),{getButtonProps:Oe,buttonRef:He}=mo({disabled:N,native:A}),be=ee?.validation??L,[Ue,Ze]=bs({controlled:W!==void 0&&Me!==void 0&&!w?Me.includes(W):ce,default:u,name:"Checkbox",state:"checked"}),it=se?!!ce:Ue,de=se&&Te||y;Yc(Le,re,Ue,void 0,!ee&&!N,b);const we=q?.registerChildId,Ke=v.useRef(null),De=be.registerInput,Ie=ee?W:void 0,yt=v.useCallback(We=>De(We,{controlRef:Le,value:Ie}),[De,Ie]),ut=Gr(h,Ke,w?void 0:yt),ht=Hv(c,K,Ke,!A,le,j["aria-label"]);_e(()=>{Ke.current&&(Ke.current.indeterminate=de),ee||G(Ue)},[Ue,de,ee,G]),ql(Ue,()=>{ee||(k(B),F(Ue!==_.initialValue),be.change(Ue))});const Ot=Pr({checked:Ue,disabled:N,form:p,name:w?void 0:B,id:A?void 0:le,required:T,ref:ut,style:B?Vh:Ic,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(We){if(We.nativeEvent.defaultPrevented)return;if(C){We.preventDefault();return}const xt=We.currentTarget.checked,$t=dt(zr,We.nativeEvent);if(x?.(xt,$t),!$t.isCanceled&&(ve?.(xt,$t),!$t.isCanceled&&(Ze(xt),W!==void 0&&ee!==void 0&&!w&&!se))){const ft=xt?[...ee.value,W]:ee.value.filter(vt=>vt!==W);ee.setValue(ft,$t)}},onClick(We){We.stopPropagation()},onFocus(){Le.current?.focus()}},M!==void 0?{value:(ee?Ue&&M:M)||""}:Gt,X,We=>be.getValidationProps(N,We));v.useEffect(()=>{if(!q||W===void 0)return;const We=q.disabledStatesRef.current;return We.set(W,N),()=>{We.delete(W)}},[q,N,W]);const Dt=v.useMemo(()=>({...Y,checked:it,disabled:N,readOnly:C,required:T,indeterminate:de}),[Y,it,N,C,T,de]),Jt=$M(Dt),rn=Mt("span",n,{state:Dt,ref:[He,Le,a],props:[{id:me,role:"checkbox","aria-checked":de?"mixed":it,"aria-readonly":C||void 0,"aria-required":T||void 0,"aria-labelledby":ht,[x7]:w?"":void 0,onFocus(){Fe(!0)},onBlur(){const We=Ke.current;We&&(J(!0),Fe(!1),U==="onBlur"&&be.commit(ee?Me:We.checked))},onKeyDown(We){if(We.key!=="Enter"||(We.preventBaseUIHandler(),We.defaultPrevented))return;const xt=Ke.current?.form??null,$t=We.currentTarget,ft=We.nativeEvent,vt=We.preventDefault,gt=ft.preventDefault;let Lt=!1;We.preventDefault=()=>{Lt=!0,vt.call(We)},ft.preventDefault=()=>{Lt=!0,gt.call(ft)},gt.call(ft),wn($t).queueMicrotask(()=>{We.preventDefault=vt,ft.preventDefault=gt,Lt||p7(xt)?.click()})},onClick(We){if(C||N)return;We.preventDefault();const xt=Ke.current;xt&&hs(xt,We)}},j,Pe,Oe,X,We=>be.getValidationProps(N,We)],stateAttributesMapping:Jt}),Wt=rn.props.id;return _e(()=>{if(!(!we||w||W===void 0||Wt===void 0))return we(W,Wt)},[we,w,W,Wt]),S.jsxs(XM.Provider,{value:Dt,children:[rn,!Ue&&!ee&&B&&!w&&O!==void 0&&S.jsx("input",{type:"hidden",form:p,name:B,value:O,disabled:N}),S.jsx("input",{...Ot,suppressHydrationWarning:!0})]})}),w7=v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c=!1,...d}=n,p=b7(),g=p.checked||p.indeterminate,{mounted:y,transitionStatus:h,setMounted:b}=ws(g),x=v.useRef(null),w={...p,transitionStatus:h};Ia({batch:!0,enabled:!g,open:g,ref:x,onComplete(){g||b(!1)}});const R={...$M(p),...po},T=c||y,O=Mt("span",n,{ref:[a,x],state:w,stateAttributesMapping:R,props:d});return T?O:null});function R7({className:e,...n}){return S.jsx(S7,{"data-slot":"checkbox",className:Qe("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",e),...n,children:S.jsx(w7,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:S.jsx(dp,{})})})}function E7({onClose:e}){const{t:n}=sn(),a=v.useId(),[o,s]=v.useState(["agents"]),u=fp({queryKey:["skill-targets"],queryFn:({signal:d})=>c7(d),retry:!1}),c=Ma({mutationFn:d7,onSuccess:()=>{_n.success(n("settings.skillDownloaded")),e()},onError:()=>_n.error(n("settings.errors.downloadSkill"))});return S.jsx(_p,{open:!0,onOpenChange:d=>{!d&&!c.isPending&&e()},children:S.jsxs(Hp,{showCloseButton:!1,children:[S.jsxs("form",{className:"flex flex-col gap-4","aria-busy":c.isPending,onSubmit:d=>{d.preventDefault(),o.length>0&&u.isSuccess&&!c.isPending&&c.mutate({targets:o})},children:[S.jsxs(Up,{children:[S.jsx(Bp,{children:n("settings.downloadSkill")}),S.jsx(nb,{children:n("settings.downloadSkillDescription")})]}),S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx(_l,{id:a,children:n("settings.skillTargets")}),u.isPending&&S.jsxs("div",{className:"space-y-2",children:[S.jsx(ca,{className:"h-12 w-full"}),S.jsx(ca,{className:"h-12 w-full"})]}),u.isError&&S.jsx(nn,{type:"button",variant:"outline",disabled:u.isFetching,onClick:()=>{u.refetch()},children:n("common.retry")}),u.data&&S.jsx("div",{role:"group","aria-labelledby":a,"aria-required":"true",className:"flex flex-col gap-2",children:u.data.targets.map(({target:d,destination:p})=>S.jsxs(KM,{className:"flex items-start gap-3 rounded-lg border p-3",children:[S.jsx(R7,{checked:o.includes(d),disabled:c.isPending,onCheckedChange:g=>{s(y=>g?[...y,d]:y.filter(h=>h!==d))}}),S.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[S.jsx("span",{children:d==="agents"?".agents":".claude"}),S.jsx("span",{className:`
|
|
123
123
|
font-mono text-xs font-normal break-all
|
|
124
124
|
text-muted-foreground
|
|
125
|
-
`,children:p})]})]},d))})]}),S.jsxs(Fp,{children:[S.jsx(nn,{type:"button",variant:"ghost",disabled:c.isPending,onClick:e,children:n("common.cancel")}),S.jsxs(nn,{type:"submit",disabled:o.length===0||!u.isSuccess||c.isPending,children:[c.isPending?S.jsx(Fl,{className:"animate-spin"}):S.jsx(NC,{}),S.jsx("span",{children:n(c.isPending?"settings.downloadingSkill":"settings.downloadSkill")})]})]})]}),S.jsxs(nb,{disabled:c.isPending,render:S.jsx(nn,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[S.jsx(Rs,{}),S.jsx("span",{className:"sr-only",children:n("a11y.close")})]})]})})}function C7({disabled:e=!1}){const{t:n}=sn(),[a,o]=v.useState(!1);return S.jsxs(ji,{label:S.jsxs("span",{className:"flex items-center gap-1",children:[n("settings.downloadSkill"),S.jsxs(mh,{children:[S.jsx(yh,{render:S.jsx(nn,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground","aria-label":n("settings.aboutFoundrySkill")}),children:S.jsx(zk,{})}),S.jsx(vh,{children:n("settings.foundrySkillHint")})]})]}),children:[S.jsxs(nn,{type:"button",variant:"outline",disabled:e,onClick:()=>o(!0),children:[S.jsx(NC,{}),n("settings.downloadSkill")]}),a&&S.jsx(E7,{onClose:()=>o(!1)})]})}function T7({className:e,...n}){return S.jsx("div",{"data-slot":"input-group",role:"group",className:Qe("group/input-group relative flex h-7 w-full min-w-0 items-center rounded-md border border-input bg-input/20 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...n})}const O7=Tp("flex h-auto cursor-text items-center justify-center gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem]","block-start":"order-first w-full justify-start px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function M7({className:e,align:n="inline-start",...a}){return S.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":n,className:Qe(O7({align:n}),e),onClick:o=>{o.target.closest("button")||o.currentTarget.parentElement?.querySelector("input")?.focus()},...a})}const A7=Tp("flex items-center gap-2 rounded-md text-xs/relaxed shadow-none",{variants:{size:{xs:"h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",sm:"gap-1","icon-xs":"size-6 p-0 has-[>svg]:p-0","icon-sm":"size-7 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function D7({className:e,type:n="button",variant:a="ghost",size:o="xs",...s}){return S.jsx(nn,{type:n,"data-size":o,variant:a,className:Qe(A7({size:o}),e),...s})}function N7({className:e,...n}){return S.jsx(VO,{"data-slot":"input-group-control",className:Qe("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...n})}function Ay({id:e,disabled:n,...a}){const{t:o}=sn(),s=v.useId(),u=e??s,[c,d]=v.useState(!1),p=o(c?"a11y.hidePassword":"a11y.showPassword");return S.jsxs(T7,{"data-disabled":n,children:[S.jsx(N7,{...a,id:u,type:c?"text":"password",disabled:n}),S.jsx(M7,{align:"inline-end",children:S.jsx(D7,{type:"button",size:"icon-xs","aria-label":p,"aria-controls":u,title:p,disabled:n,onClick:()=>d(g=>!g),children:c?S.jsx(Hk,{}):S.jsx(Uk,{})})})]})}function I7(e,n){const a=URL.createObjectURL(e),o=document.createElement("a");o.href=a,o.download=n,document.body.append(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(a),1e3)}async function j7(e){const n=await fetch("/api/data-export",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw new Error("Unable to export data");const a=n.headers.get("content-disposition")??"",o=/filename="([^"]+)"/u.exec(a)?.[1]??"foundry.foundry-backup";I7(await n.blob(),o)}function k7({onClose:e}){const{t:n}=sn(),a=v.useId(),o=v.useId(),[s,u]=v.useState(""),[c,d]=v.useState(""),p=Ma({mutationFn:j7,onSuccess:()=>{_n.success(n("dataExport.exported")),e()},onError:()=>{_n.error(n("dataExport.error"))}});return S.jsx(_p,{open:!0,onOpenChange:g=>{!g&&!p.isPending&&e()},children:S.jsxs(Hp,{showCloseButton:!1,children:[S.jsxs("form",{className:"flex flex-col gap-4","aria-busy":p.isPending,onSubmit:g=>{if(g.preventDefault(),!(!s||!c||p.isPending)){if(s!==c){_n.error(n("dataExport.passphraseMismatch"));return}p.mutate({passphrase:s})}},children:[S.jsxs(Up,{children:[S.jsx(Bp,{children:n("dataExport.title")}),S.jsx(rb,{children:n("dataExport.description")})]}),S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx(_l,{htmlFor:a,children:n("dataExport.passphrase")}),S.jsx(Ay,{id:a,autoComplete:"new-password",required:!0,value:s,disabled:p.isPending,onChange:g=>u(g.target.value)})]}),S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx(_l,{htmlFor:o,children:n("dataExport.confirmPassphrase")}),S.jsx(Ay,{id:o,autoComplete:"new-password",required:!0,value:c,disabled:p.isPending,"aria-invalid":c.length>0&&s!==c,onChange:g=>d(g.target.value)})]}),S.jsxs("p",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[S.jsx($k,{className:"size-4 shrink-0"}),S.jsx("span",{children:n("dataExport.passphraseHint")})]}),S.jsxs(Fp,{children:[S.jsx(nn,{type:"button",variant:"ghost",disabled:p.isPending,onClick:e,children:n("common.cancel")}),S.jsxs(nn,{type:"submit",disabled:!s||!c||p.isPending,children:[p.isPending?S.jsx(Fl,{className:"animate-spin"}):S.jsx(zC,{}),S.jsx("span",{children:n(p.isPending?"dataExport.exporting":"dataExport.action")})]})]})]}),S.jsxs(nb,{disabled:p.isPending,render:S.jsx(nn,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[S.jsx(Rs,{}),S.jsx("span",{className:"sr-only",children:n("a11y.close")})]})]})})}function P7({disabled:e=!1}){const{t:n}=sn(),[a,o]=v.useState(!1);return S.jsxs(ji,{label:n("settings.export"),children:[S.jsxs(nn,{type:"button",variant:"outline",disabled:e,onClick:()=>o(!0),children:[S.jsx(zC,{}),n("settings.export")]}),a&&S.jsx(k7,{onClose:()=>o(!1)})]})}class XM extends Error{constructor(n){super(n),this.code=n}code}async function L7(e,n){const a=await fetch("/api/data-import",{method:"POST",headers:{"content-type":"application/octet-stream","x-foundry-passphrase":encodeURIComponent(n)},body:e});await z7(a)}async function z7(e){if(e.ok)return;let n="IMPORT_FAILED";try{const o=(await e.json()).error?.code;(o==="INVALID_BACKUP"||o==="INVALID_PASSPHRASE")&&(n=o)}catch{}throw new XM(n)}function _7({file:e,onClose:n}){const{t:a}=sn(),o=v.useId(),[s,u]=v.useState(""),c=Ma({mutationFn:()=>L7(e,s),onSuccess:()=>{location.replace(`${location.pathname}${location.search}`)},onError:g=>_n.error(a(H7(g)))}),d=c.isPending||c.isSuccess,p=()=>{d||n()};return S.jsx(_p,{open:!0,onOpenChange:g=>{g||p()},children:S.jsxs(Hp,{showCloseButton:!1,children:[S.jsxs("form",{className:"flex flex-col gap-4","aria-busy":d,onSubmit:g=>{g.preventDefault(),!d&&s&&c.mutate()},children:[S.jsxs(Up,{children:[S.jsx(Bp,{children:a("dataImport.title")}),S.jsx(rb,{className:"break-all",children:e.name})]}),S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx(_l,{htmlFor:o,children:a("dataImport.passphrase")}),S.jsx(Ay,{id:o,autoComplete:"current-password",required:!0,value:s,disabled:d,onChange:g=>u(g.target.value)})]}),S.jsx("p",{className:"text-xs text-muted-foreground",children:a("dataImport.replaceWarning")}),S.jsxs(Fp,{children:[S.jsx(nn,{type:"button",variant:"ghost",disabled:d,onClick:p,children:a("common.cancel")}),S.jsxs(nn,{type:"submit",variant:"destructive",disabled:d||!s,children:[d?S.jsx(Fl,{className:"animate-spin"}):S.jsx(PC,{}),S.jsx("span",{children:a("dataImport.replaceAction")})]})]})]}),S.jsxs(nn,{type:"button",disabled:d,onClick:p,variant:"ghost",size:"icon",className:"absolute top-2 right-2",children:[S.jsx(Rs,{}),S.jsx("span",{className:"sr-only",children:a("a11y.close")})]})]})})}function H7(e){if(e instanceof XM)switch(e.code){case"INVALID_BACKUP":return"dataImport.invalidBackup";case"INVALID_PASSPHRASE":return"dataImport.invalidPassphrase"}return"dataImport.error"}function U7({disabled:e=!1}){const{t:n}=sn(),a=v.useRef(null),[o,s]=v.useState(null);return S.jsxs(ji,{label:n("settings.import"),children:[S.jsx("input",{ref:a,type:"file",accept:".foundry-backup,application/octet-stream",hidden:!0,onChange:u=>{s(u.target.files?.[0]??null),u.target.value=""}}),S.jsxs(nn,{type:"button",variant:"outline",disabled:e,onClick:()=>a.current?.click(),children:[S.jsx(PC,{}),n("settings.import")]}),o&&S.jsx(_7,{file:o,onClose:()=>s(null)})]})}const F7="data-checked",B7="data-unchecked",Dy={checked(e){return e?{[F7]:""}:{[B7]:""}},...po,...Yl},ab="data-composite-item-active",QM=v.createContext(void 0);function V7(){return v.useContext(QM)}const ZM=v.createContext(void 0);function q7(){const e=v.useContext(ZM);if(e===void 0)throw new Error(Rn(52));return e}const Y7=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u=!1,readOnly:c=!1,required:d=!1,"aria-labelledby":p,value:g,inputRef:y,nativeButton:h=!1,id:b,style:x,...w}=n,C=V7(),{disabled:R,readOnly:T,required:O,form:M,checkedValue:A,touched:I=!1,validation:j,name:k,setCheckedValue:D=Sn,setTouched:z=Sn,registerInputRef:F=Sn}=C??{},{setTouched:G,setFilled:J,state:Y,disabled:U}=qo(),_=BO(),{labelId:L,getDescriptionProps:$}=Cs(),K=U||_.disabled||R||u,V=T||c,X=O||d,ee=M,q=C?A===g:g==="",se=v.useRef(null),N=qc(K,se),B=v.useRef(null),W=j?.registerInput,re=v.useCallback(Ze=>W?.(Ze,{controlRef:se,value:void 0}),[W]),Re=Gr(y,B,F,re);_e(()=>{B.current?.checked&&J(!0)},[J]),_e(()=>{if(B.current){if(K&&q){F(null);return}F(B.current)}},[q,K,F]);const le=Tr(),me=Kl({id:b}),ge=h?void 0:me,ce=Hv(p,L,B,!h,ge,w["aria-label"]),Te={role:"radio","aria-checked":q,"aria-labelledby":ce,[ab]:q?"":void 0,id:h?me:le,onKeyDown(Ze){Ze.key==="Enter"&&Ze.preventDefault()},onClick(Ze){if(Ze.defaultPrevented||K||V)return;Ze.preventDefault();const it=B.current;it&&hs(it,Ze)},onFocus(Ze){N(!0),!(Ze.defaultPrevented||K||V||!I)&&(B.current?.click(),z(!1))},onBlur(){C||N(!1)}},{getButtonProps:ve,buttonRef:Pe}=mo({disabled:K,native:h,composite:!1}),Me={type:"radio",ref:Re,form:ee,id:ge,name:k,tabIndex:-1,style:k?Vh:Ic,"aria-hidden":!0,...g!==void 0?{value:Sh(g)}:Gt,disabled:K,checked:q,required:X,readOnly:V,onChange(Ze){if(Ze.nativeEvent.defaultPrevented||K||V||g===void 0)return;const it=dt(zr,Ze.nativeEvent);D(g,it),!it.isCanceled&&G(!0)},onClick(Ze){Ze.stopPropagation()},onFocus(){se.current?.focus()}},Le=v.useMemo(()=>({...Y,required:X,disabled:K,readOnly:V,checked:q}),[Y,K,V,q,X]),Fe=Le,Oe=C!==void 0,He=[a,se,Pe],be=[Te,w,ve,$,j?Ze=>j.getValidationProps(K,Ze):Gt],Ue=Mt("span",n,{enabled:!Oe,state:Le,ref:He,props:be,stateAttributesMapping:Dy});return S.jsxs(ZM.Provider,{value:Fe,children:[Oe?S.jsx(kO,{tag:"span",render:o,className:s,style:x,state:Le,refs:He,props:be,stateAttributesMapping:Dy}):Ue,S.jsx("input",{...Me,suppressHydrationWarning:!0})]})}),K7=v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c=!1,...d}=n,p=q7(),g=p.checked,{mounted:y,transitionStatus:h,setMounted:b}=ws(g),x={...p,transitionStatus:h},w=v.useRef(null),C=c||y,R=Mt("span",n,{ref:[a,w],state:x,props:d,stateAttributesMapping:Dy});return Ia({batch:!0,enabled:!g,open:g,ref:w,onComplete(){g||b(!1)}}),C?R:null});function G7(e){const{loopFocus:n=!0,orientation:a="both",grid:o,onLoop:s,direction:u,highlightedIndex:c,onHighlightedIndexChange:d,rootRef:p,enableHomeAndEndKeys:g=!1,stopEventPropagation:y,disabledIndices:h,modifierKeys:b=fo}=e,[x,w]=v.useState(0),C=o!=null,R=v.useRef(null),T=Gr(R,p),O=v.useRef([]),M=v.useRef(!1),A=v.useRef(null),I=c??x,j=Be((G,J=!1)=>{if(A.current=O.current[G]??null,(d??w)(G),J){const Y=O.current[G];Zw(R.current,Y,u,a)}}),k=Be(G=>{if(G.size===0)return;if(M.current){const _=O.current,L=_.indexOf(A.current);if(L===-1){const $=_[I];!$||Rl(_,I,h)?j($7(_,h)):A.current=$}else L!==I&&j(L);return}M.current=!0;const J=Array.from(G.keys()),Y=J.find(_=>_?.hasAttribute(ab))??null,U=Y?G.get(Y)?.index??-1:-1;if(U!==-1)j(U);else if(Rl(J,I,h)){const _=wl(J,{disabledIndices:h});Sl(J,_)||j(_)}Zw(R.current,Y,u,a)});_e(()=>{if(h==null||c!=null||!M.current)return;const G=O.current;if(Rl(G,I,h)){const J=wl(G,{disabledIndices:h});Sl(G,J)||j(J)}},[h,c,I,O,j]);const D=Be((G,J,Y)=>s?s(G,J,Y,O):Y),z=Be(G=>{const J=G.key===vy||G.key===by;if(!Bc.has(G.key)||!g&&J||X7(G,b)||!R.current)return;const U=u==="rtl",_=U?my:yy,L=U?yy:my,$=a==="vertical"?gy:_,K=a==="vertical"?py:L,V=tr(G.nativeEvent);if(V!=null&&Qw(V)&&!LO(V)){const B=V.selectionStart,W=V.selectionEnd,re=V.value;if(B==null||G.shiftKey||B!==W||G.key!==K&&B<re.length||G.key!==$&&B>0)return}let X=I;const ee=qf(O,h),q=W0(O,h);o!=null&&(X=o({disabledIndices:h,elementsRef:O,event:G,highlightedIndex:I,loopFocus:n,maxIndex:q,minIndex:ee,onLoop:D,orientation:a,rtl:U}));const se=a!=="vertical"&&G.key===_||a!=="horizontal"&&G.key===gy,N=a!=="vertical"&&G.key===L||a!=="horizontal"&&G.key===py;g&&(G.key===vy?X=ee:G.key===by&&(X=q)),X===I&&(se||N)&&(n&&X===q&&se?(X=ee,s&&(X=s(G,I,X,O))):n&&X===ee&&N?(X=q,s&&(X=s(G,I,X,O))):X=wl(O.current,{startingIndex:X,decrement:N,disabledIndices:h})),X!==I&&!Sl(O.current,X)&&(y&&G.stopPropagation(),(C||J||se||N)&&G.preventDefault(),j(X,!0),queueMicrotask(()=>{O.current[X]?.focus()}))});return{props:{ref:T,onFocus(G){const J=R.current,Y=tr(G.nativeEvent);!J||Y==null||!Qw(Y)||Y.setSelectionRange(0,Y.value.length)},onKeyDown:z},highlightedIndex:I,onHighlightedIndexChange:j,elementsRef:O,onMapChange:k,relayKeyboardEvent:z}}function $7(e,n){let a=-1;for(let o=0;o<e.length;o+=1){const s=e[o];if(!(!s||Rl(e,o,n))){if(s.hasAttribute(ab))return o;a===-1&&(a=o)}}return Math.max(a,0)}function X7(e,n){for(const a of n_)if(!n.includes(a)&&e.getModifierState(a))return!0;return!1}function Q7(e){const{render:n,className:a,style:o,refs:s=fo,props:u=fo,state:c=Gt,stateAttributesMapping:d,highlightedIndex:p,onHighlightedIndexChange:g,orientation:y,grid:h,loopFocus:b,onLoop:x,enableHomeAndEndKeys:w,onMapChange:C,stopEventPropagation:R=!0,rootRef:T,disabledIndices:O,modifierKeys:M,highlightItemOnHover:A=!1,tag:I="div",...j}=e,k=ip(),{props:D,highlightedIndex:z,onHighlightedIndexChange:F,elementsRef:G,onMapChange:J,relayKeyboardEvent:Y}=G7({grid:h,loopFocus:b,onLoop:x,orientation:y,highlightedIndex:p,onHighlightedIndexChange:g,rootRef:T,stopEventPropagation:R,enableHomeAndEndKeys:w,direction:k,disabledIndices:O,modifierKeys:M}),U=Mt(I,e,{state:c,ref:s,props:[D,...u,j],stateAttributesMapping:d}),_=v.useMemo(()=>({highlightedIndex:z,onHighlightedIndexChange:F,highlightItemOnHover:A,relayKeyboardEvent:Y}),[z,F,A,Y]);return S.jsx(uO.Provider,{value:_,children:S.jsx(Iv,{elementsRef:G,onMapChange:L=>{C?.(L),J(L)},children:U})})}const Z7=[bO],J7=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u,readOnly:c,required:d,onValueChange:p,value:g,defaultValue:y,form:h,name:b,inputRef:x,id:w,style:C,...R}=n,{setTouched:T,setFocused:O,validationMode:M,name:A,disabled:I,state:j,validation:k,setDirty:D,setFilled:z,validityData:F}=qo(),{labelId:G}=Cs(),{clearErrors:J,elementRef:Y}=Vc(),U=g6(!0),_=I||u,L=A??b,$=Tr(w),[K,V]=bs({controlled:g,default:y,name:"RadioGroup",state:"value"}),[X,ee]=v.useState(!1),q=Be((Me,Le)=>{p?.(Me,Le),!Le.isCanceled&&V(Me)}),se=k.getInputControl,N=v.useMemo(()=>({get current(){return se()}}),[se]),B=v.useRef(null),W=v.useRef(null),re=Gr(B,x),Re=v.useRef(re),le=Be(Me=>{B.current===Me&&Re.current===re||(Re.current=re,re?.(Me))});_e(()=>{le(B.current)},[re,le]);const me=Be(Me=>{if(Me){if(!Me.disabled){W.current||(W.current=Me);const Le=B.current;(Me.checked||Le==null||Le.disabled)&&le(Me)}return()=>{W.current===Me&&(W.current=null),B.current===Me&&le(null)}}}),ge=Be(()=>{const Me=Y.current;if(!Me)return K??null;for(const Le of k.registeredInputs.keys())if(Le.checked&&x6(Le,Me))return K??null;return null});Yc(N,$,K??null,ge,!_,b),ql(K,()=>{J(L),D(K!==F.initialValue),z(K!=null),k.change(K);const Me=W.current;K==null&&Me&&!Me.disabled&&le(Me)});const ce=G??U?.legendId,Te={...j,disabled:_??!1,required:d??!1,readOnly:c??!1},ve=v.useMemo(()=>({checkedValue:K,disabled:_,form:h,validation:k,name:L,readOnly:c,registerInputRef:me,required:d,setCheckedValue:q,setTouched:ee,touched:X}),[K,_,h,k,L,c,me,d,q,ee,X]),Pe={id:w,role:"radiogroup","aria-required":d||void 0,"aria-disabled":_||void 0,"aria-readonly":c||void 0,"aria-labelledby":ce,onBlur(Me){at(Me.currentTarget,Me.relatedTarget)||(ee(!1),T(!0),O(!1),M==="onBlur"&&k.commit(K))},onKeyDownCapture(Me){Me.key.startsWith("Arrow")&&ee(!0)}};return S.jsx(QM.Provider,{value:ve,children:S.jsx(Q7,{render:o,className:s,style:C,state:Te,props:[Pe,R,Me=>k.getValidationProps(_??!1,Me)],refs:[a],stateAttributesMapping:Yl,enableHomeAndEndKeys:!1,modifierKeys:Z7})})});function W7({className:e,...n}){return S.jsx(J7,{"data-slot":"radio-group",className:Qe("grid w-full gap-3",e),...n})}function eB({className:e,...n}){return S.jsx(Y7,{"data-slot":"radio-group-item",className:Qe("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-focus-visible/field-label:ring-0 group-has-focus-visible/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:data-checked:bg-primary",e),...n,children:S.jsx(K7,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:S.jsx("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}const tB=[{value:"system",labelKey:"common.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function nB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn();return S.jsx(ji,{label:o("settings.colorTheme"),children:S.jsx(W7,{"aria-label":o("settings.colorTheme"),value:e,onValueChange:n,disabled:a,"aria-busy":a,className:"flex w-auto flex-row flex-wrap items-center gap-x-6 gap-y-2",children:tB.map(s=>S.jsxs("label",{className:Qe("flex items-center gap-2 text-sm select-none",s.value===e?"font-medium text-foreground":"text-muted-foreground",a?"cursor-not-allowed opacity-60":"cursor-pointer"),children:[S.jsx(eB,{value:s.value,disabled:a}),S.jsx("span",{children:o(s.labelKey)})]},s.value))})})}function rB(e){const n=v.useRef(!0);n.current&&(n.current=!1,e())}const JM=v.createContext(void 0),WM=v.createContext(void 0);function yo(){const e=v.useContext(JM);if(e===void 0)throw new Error(Rn(60));return e}function eA(){const e=v.useContext(WM);if(e===void 0)throw new Error(Rn(61));return e}function aB(e,n,a=Object.is){const{length:o}=e;if(o!==n.length)return!1;for(let s=0;s<o;s+=1)if(!a(e[s],n[s]))return!1;return!0}const tA=(e,n)=>Object.is(e,n);function Ss(e,n,a){return e==null||n==null?Object.is(e,n):a(e,n)}function oB(e,n,a){return Array.isArray(e)&&Array.isArray(n)?!aB(e,n,(o,s)=>Ss(o,s,a)):e!==n}function Ny(e,n,a){return e?e.some(o=>o===void 0?!1:Ss(n,o,a)):!1}function th(e,n,a){return e?e.findIndex(o=>o===void 0?!1:Ss(o,n,a)):-1}function iB(e,n){if(n!==tA)return o=>Ny(e,o,n);const a=new Set(e);return a.delete(void 0),o=>a.has(o)&&(o!==0||e.some(s=>Object.is(o,s)))}function nA(e,n,a,o){const s=o&&Array.isArray(n)?e.findIndex(iB(n,a)):th(e,n,a);return s===-1?null:s}function sB(e,n,a,o,s,u){return Ny(o,n,s)?u!=null&&e>u&&Ny(o,a[u],s)?u:e:e===u?nA(a,o,s,!0):u}function lB(e,n,a){return e.filter(o=>!Ss(n,o,a))}const uB={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:n,multiple:a,itemToStringValue:o}=e;return n==null?!1:a&&Array.isArray(n)?n.length>0:vl(n,o)!==""},hasNullItemLabel:(e,n)=>n?Z_(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,n)=>e.activeIndex===n,isSelected:(e,n)=>{const a=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(s=>Ss(n,s,a)):Ss(n,o,a)},isSelectedByFocus:(e,n)=>e.selectedIndex===n,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function tc(e,n=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER){return Math.max(n,Math.min(e,a))}const Ba=1;function ob(e,n){return Math.max(0,e-n)}function Ih(e,n){if(n<=0)return 0;const a=tc(e,0,n),o=a,s=n-a,u=o<=Ba,c=s<=Ba;return u&&c?o<=s?0:n:u?0:c?n:a}function cB(e){const{id:n,value:a,defaultValue:o=null,onValueChange:s,open:u,defaultOpen:c=!1,onOpenChange:d,name:p,form:g,autoComplete:y,disabled:h=!1,readOnly:b=!1,required:x=!1,modal:w=!0,actionsRef:C,inputRef:R,onOpenChangeComplete:T,items:O,multiple:M=!1,itemToStringLabel:A,itemToStringValue:I,isItemEqualToValue:j=tA,highlightItemOnHover:k=!0,children:D}=e,{clearErrors:z}=Vc(),{setDirty:F,setTouched:G,setFocused:J,validityData:Y,setFilled:U,name:_,disabled:L,validation:$,validationMode:K}=qo(),V=Kl({id:n}),X=L||h,ee=_??p,[q,se]=bs({controlled:a,default:M?o??fo:o,name:"Select",state:"value"}),[N,B]=bs({controlled:u,default:c,name:"Select",state:"open"}),W=v.useRef([]),re=v.useRef([]),Re=v.useRef(null),le=v.useRef(null),me=v.useRef(0),ge=v.useRef(null),ce=v.useRef([]),Te=v.useRef(!1),ve=v.useRef(null),Pe=v.useRef(null),Me=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Le=v.useRef(!1),Fe=v.useRef(q),{openMethod:Oe,triggerProps:He}=DO(N),be=er(()=>new Ul({id:V,labelId:void 0,modal:w,multiple:M,disabled:X,readOnly:b,required:x,highlightItemOnHover:k,itemToStringLabel:A,itemToStringValue:I,isItemEqualToValue:j,value:q,open:N,mounted:N,transitionStatus:void 0,items:O,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Gt,triggerProps:Gt,itemRoot:{props:Gt,multiple:M,disabled:X,readOnly:b,isItemEqualToValue:j},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Sn,setOpen:Sn,handleScrollArrowVisibility:Sn,onOpenChangeComplete:Sn,listRef:W,popupRef:Re,scrollHandlerRef:le,scrollArrowsMountedCountRef:me,valueRef:ge,valuesRef:ce,labelsRef:re,typingRef:Te,selectionRef:Me,firstItemTextRef:ve,selectedItemTextRef:Pe,alignItemWithTriggerActiveRef:Le,initialValueRef:Fe},uB)).current,[Ue,Ze]=v.useState(!1),{mounted:it,transitionStatus:de,forceUnmount:we}=HE({open:N,ref:Re,preventUnmountOnClose:Ue,setPreventUnmountOnClose:Ze,onUnmount(){be.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),T?.(!1)}}),Ke=be.useState("activeIndex"),De=be.useState("selectedIndex"),Ie=be.useState("triggerElement"),yt=be.useState("positionerElement"),ut=dj(Oe),ht=Oe??ut,Ot=v.useMemo(()=>M?"":vl(q,I),[M,q,I]),Dt=v.useMemo(()=>M&&Array.isArray(q)?q.map(H=>vl(H,I)):vl(q,I),[M,q,I]),Jt=Pn(Ie),rn=Be(()=>Dt);Yc(Jt,V,q,rn,!X,p);const Wt=M?Array.isArray(q)&&q.length>0:q!=null&&Ot!=="";_e(()=>{U(Wt)},[Wt,U]),_e(function(){const Z=nA(ce.current,q,j,M);Z===null&&(Pe.current=null),!N&&be.set("selectedIndex",Z)},[M,N,q,j,be]),ql(q,()=>{z(ee),F(oB(q,Y.initialValue,j)),$.change(q)});const We=Be((H,Z)=>{const ne=Z,ye=Jh(ne);d?.(H,ne),!Z.isCanceled&&(H||Ze(ye()),B(H),!H&&(Z.reason===Ti||Z.reason===Bh)&&(G(!0),J(!1),K==="onBlur"&&$.commit(q)))});v.useImperativeHandle(C,()=>({unmount:we,close:()=>{be.state.open&&We(!1,dt(Nc))}}),[we,We,be]);const xt=Be((H,Z)=>{s?.(H,Z),!Z.isCanceled&&se(H)}),$t=Be(H=>{const Z=ob(H.scrollHeight,H.clientHeight),ne=Ih(H.scrollTop,Z),ye=ne>0,xe=ne<Z;be.set("scrollUpArrowVisible",ye),be.set("scrollDownArrowVisible",xe)}),ft=G3({open:N,onOpenChange:We,elements:{reference:Ie,floating:yt}}),vt=zE(ft,{enabled:!X,event:"mousedown"}),gt=jc(ft),Lt=ZE(ft,{enabled:!X,listRef:W,activeIndex:Ke,selectedIndex:De,disabledIndices:fo,onNavigate(H){H===null&&!N||be.set("activeIndex",H)},focusItemOnHover:k}),un=JE(ft,{enabled:!X&&(N||!b&&!M),listRef:re,activeIndex:Ke,selectedIndex:De,disabledIndices:H=>LO(W.current[H]),onMatch(H){N?be.set("activeIndex",H):xt(ce.current[H],dt(zr))},onTyping(H){Te.current=H}}),je=v.useMemo(()=>Pr(un.reference,Lt.reference,gt.reference,vt.reference,He),[vt.reference,un.reference,Lt.reference,gt.reference,He]),ot=v.useMemo(()=>Pr(kc,un.floating,Lt.floating,gt.floating),[un.floating,Lt.floating,gt.floating]),ke=Lt.item??Gt,ze=v.useMemo(()=>({props:ke,multiple:M,disabled:X,readOnly:b,isItemEqualToValue:j}),[ke,M,X,b,j]);be.useContextCallback("setValue",xt),be.useContextCallback("setOpen",We),be.useContextCallback("handleScrollArrowVisibility",$t),be.useContextCallback("onOpenChangeComplete",T),rB(()=>{be.update({popupProps:ot,triggerProps:je,itemRoot:ze})}),be.useSyncedValues({id:V,modal:w,multiple:M,disabled:X,readOnly:b,required:x,highlightItemOnHover:k,value:q,open:N,mounted:it,transitionStatus:de,popupProps:ot,triggerProps:je,itemRoot:ze,items:O,itemToStringLabel:A,itemToStringValue:I,isItemEqualToValue:j,openMethod:ht});const Ge=Gr(R,$.inputRef),et=M?void 0:ee,Et=v.useMemo(()=>!M||!Array.isArray(q)||!ee?null:q.map(H=>{const Z=vl(H,I);return S.jsx("input",{type:"hidden",form:g,name:ee,value:Z,disabled:X},Z)}),[M,q,g,ee,I,X]);return S.jsxs(JM.Provider,{value:be,children:[S.jsx(WM.Provider,{value:ft,children:D}),S.jsx("input",{...$.getValidationProps(X,{onFocus(){be.state.triggerElement?.focus({focusVisible:!0})},onChange(H){if(H.nativeEvent.defaultPrevented||X||b)return;const Z=H.currentTarget.value,ne=dt(zr,H.nativeEvent);function ye(){if(M)return;const xe=Z.toLowerCase();let qe=ce.current.findIndex(Xe=>vl(Xe,I).toLowerCase()===xe||_O(Xe,A).toLowerCase()===xe);qe===-1&&(qe=ce.current.findIndex((Xe,$e)=>{const st=re.current[$e];return st!=null&&st.toLowerCase()===xe}));const Ve=ce.current[qe];Ve!=null&&xt(Ve,ne)}be.set("forceMount",!0),queueMicrotask(ye)}}),id:V&&et==null?`${V}-hidden-input`:void 0,form:g,name:et,autoComplete:y,value:Ot,disabled:X,required:x&&!(M&&Wt),readOnly:b,ref:Ge,style:ee?Vh:Ic,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Et]})}function dB(e,n){return e??n}const fB="data-popup-side",hB=400,pB={...rh,...Yl,popupSide:e=>e?{[fB]:e}:null,value:()=>null},gB=v.forwardRef(function(n,a){const{render:o,className:s,id:u,disabled:c=!1,nativeButton:d=!0,style:p,...g}=n,{setTouched:y,validationMode:h,validation:b,state:x,disabled:w}=qo(),{labelId:C}=Cs(),R=yo(),T=R.useState("readOnly"),O=R.useState("required"),M=R.useState("disabled"),A=w||M||c,I=R.useState("open"),j=R.useState("mounted"),k=R.useState("value"),D=R.useState("triggerProps"),z=R.useState("positionerElement"),F=R.useState("listElement"),G=R.useState("popupSide"),J=R.useState("id"),Y=R.useState("labelId"),U=R.useState("hasSelectedValue"),_=j&&z?G:null,L=u??J,$=dB(C,Y);Kl({id:u});const K=Pn(z),V=v.useRef(null),X=qc(A,V),{getButtonProps:ee,buttonRef:q}=mo({disabled:A,native:d}),se=R.useStateSetter("triggerElement"),N=Hn(),B=Hn(),W=Hn();v.useEffect(()=>{if(I)return W.start(hB,()=>{R.context.selectionRef.current.allowUnselectedMouseUp=!0,R.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{W.clear()};R.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},B.clear()},[I,R,B,W]);const re=Pr(D,{id:L,role:"combobox","aria-expanded":I,"aria-haspopup":"listbox","aria-controls":I?F?.id??oh(z)?.id:void 0,"aria-labelledby":$,"aria-readonly":T||void 0,"aria-required":O||void 0,tabIndex:A?-1:0,onFocus(me){X(!0),I&&R.context.alignItemWithTriggerActiveRef.current&&R.context.setOpen(!1,dt(zr,me.nativeEvent)),N.start(0,()=>{R.set("forceMount",!0)})},onBlur(me){at(z,me.relatedTarget)||(y(!0),X(!1),h==="onBlur"&&b.commit(k))},onMouseDown(me){if(I)return;const ge=Kt(me.currentTarget);function ce(Te){if(!V.current)return;const ve=Te.target;at(V.current,ve)||at(K.current,ve)||jO(Te,V.current)||R.context.setOpen(!1,dt(Vy,Te))}B.start(0,()=>{ge.addEventListener("mouseup",ce,{once:!0})})}},g,ee),Re=b.getValidationProps(A,re);Re.role="combobox";const le={...x,open:I,disabled:A,value:k,readOnly:T,popupSide:_,placeholder:!U};return Mt("button",n,{ref:[a,V,q,se],state:le,stateAttributesMapping:pB,props:Re})}),mB={value:()=>null},yB=v.forwardRef(function(n,a){const{className:o,render:s,children:u,placeholder:c,style:d,...p}=n,g=yo(),y=g.useState("value"),h=g.useState("items"),b=g.useState("itemToStringLabel"),x=g.useState("hasSelectedValue"),w=!x&&c!=null&&u==null,C=g.useState("hasNullItemLabel",w),R={value:y,placeholder:!x};let T=null;return typeof u=="function"?T=u(y):u!=null?T=u:w&&!C?T=c:Array.isArray(y)?T=J_(y,h,b):T=HO(y,h,b),Mt("span",n,{state:R,ref:[a,g.context.valueRef],props:[{children:T},p],stateAttributesMapping:mB})}),vB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,g={open:yo().useState("open")};return Mt("span",n,{state:g,ref:a,props:[{"aria-hidden":!0,children:"▼"},c],stateAttributesMapping:WR})}),bB=v.forwardRef(function(n,a){const o=yo(),s=o.useState("mounted"),u=o.useState("forceMount");return s||u?S.jsx(Gh,{ref:a,...n}):null}),rA=v.createContext(void 0);function ib(){const e=v.useContext(rA);if(!e)throw new Error(Rn(59));return e}function jh(e,n){e&&Object.assign(e.style,n)}const aA={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},xB={position:"fixed"},SB=v.forwardRef(function(n,a){const{anchor:o,className:s,render:u,positionMethod:c,side:d,align:p,sideOffset:g,alignOffset:y,collisionBoundary:h="clipping-ancestors",collisionPadding:b,arrowPadding:x,sticky:w,disableAnchorTracking:C,alignItemWithTrigger:R=!0,collisionAvoidance:T=ME,style:O,...M}=n,A=yo(),I=eA(),j=A.useState("open"),k=A.useState("mounted"),D=A.useState("modal"),z=A.useState("value"),F=A.useState("openMethod"),G=A.useState("positionerElement"),J=A.useState("triggerElement"),Y=A.useState("isItemEqualToValue"),U=A.useState("transitionStatus"),_=v.useRef(null),L=v.useRef(null),[$,K]=v.useState(R),V=k&&$&&F!=="touch";!k&&$!==R&&K(R),v.useImperativeHandle(A.context.alignItemWithTriggerActiveRef,()=>V),jv((V||D)&&j,F==="touch",G,J);const X=sp({anchor:o,floatingRootContext:I,positionMethod:c,mounted:k,side:d,sideOffset:g,align:p,alignOffset:y,arrowPadding:x,collisionBoundary:h,collisionPadding:b,sticky:w,disableAnchorTracking:C??V,collisionAvoidance:T,keepMounted:!0}),ee=V?"none":X.side,q=V?xB:X.positionerStyles,se={open:j,side:ee,align:X.align,anchorHidden:X.anchorHidden};_e(()=>{A.set("popupSide",X.side)},[A,X.side]);const N=A.useStateSetter("positionerElement"),B=lp(n,se,{styles:q,transitionStatus:U,props:M,refs:[a,N],hidden:!k,inert:!j}),W=v.useRef(0),re=Be(le=>{if(A.context.valuesRef.current.length===0)return;const me=W.current;W.current=le.size;const ge=dt(zr);if(me!==0&&!A.state.multiple&&z!==null&&th(A.context.valuesRef.current,z,Y)===-1){const Te=A.context.initialValueRef.current,Pe=Te!=null&&th(A.context.valuesRef.current,Te,Y)!==-1?Te:null;A.context.setValue(Pe,ge),Pe===null&&(A.set("selectedIndex",null),A.context.selectedItemTextRef.current=null)}if(me!==0&&A.state.multiple&&Array.isArray(z)){const ce=z.filter(Te=>th(A.context.valuesRef.current,Te,Y)!==-1);ce.length!==z.length&&(A.context.setValue(ce,ge),ce.length===0&&(A.set("selectedIndex",null),A.context.selectedItemTextRef.current=null))}if(j&&V){A.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ce={height:""};jh(G,ce),jh(A.context.popupRef.current,ce)}}),Re=v.useMemo(()=>({...X,side:ee,alignItemWithTriggerActive:V,setControlledAlignItemWithTrigger:K,scrollUpArrowRef:_,scrollDownArrowRef:L}),[X,ee,V,K]);return S.jsx(Iv,{elementsRef:A.context.listRef,labelsRef:A.context.labelsRef,onMapChange:re,children:S.jsxs(rA.Provider,{value:Re,children:[k&&D&&S.jsx(Ep,{inert:up(!j),cutout:J}),B]})})}),Ff="base-ui-disable-scrollbar",Iy={className:Ff,getElement(e){return S.jsx("style",{nonce:e,href:Ff,precedence:"base-ui:low",children:`.${Ff}{scrollbar-width:none}.${Ff}::-webkit-scrollbar{display:none}`})}},wB=v.createContext(void 0),RB={disableStyleElements:!1};function EB(){return v.useContext(wB)??RB}const HR="--transform-origin",CB={...Mc,...po},TB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,...d}=n,p=yo(),g=p.useState("multiple"),y=p.useState("readOnly"),h=p.useState("highlightItemOnHover"),b=eA(),{side:x,align:w,alignItemWithTriggerActive:C,isPositioned:R,setControlledAlignItemWithTrigger:T}=ib(),O=Nv()!=null,M=ip(),{nonce:A,disableStyleElements:I}=EB(),j=p.useState("id"),k=p.useState("open"),D=p.useState("openMethod"),z=p.useState("mounted"),F=p.useState("popupProps"),G=p.useState("transitionStatus"),J=p.useState("triggerElement"),Y=p.useState("positionerElement"),U=p.useState("listElement"),_=v.useRef(!1),L=v.useRef(!1),$=v.useRef({}),K=Il(),V=Be(se=>{if(!Y||!p.context.popupRef.current||!L.current)return;const N=Y.style.top==="0px",B=Y.style.bottom==="0px";if(_.current||!C||!N&&!B){p.context.handleScrollArrowVisibility(se);return}const W=FR(Y),re=nc(Y.getBoundingClientRect().height,"y",W),Re=Kt(Y),le=wn(Y),me=le.getComputedStyle(Y),ge=parseFloat(me.marginTop),ce=parseFloat(me.marginBottom),Te=UR(le.getComputedStyle(p.context.popupRef.current)),ve=Math.min(Re.documentElement.clientHeight-ge-ce,Te),Pe=se.scrollTop,Me=Bf(se);let Le=null;const Fe=Ue=>{Y.style.height=`${Ue}px`},Oe=N?Me-Pe:Pe,He=Math.min(re+Oe,ve);if(Oe<=Ba){const Ue=tc(Oe,0,ve-re);Ue>0&&Fe(re+Ue),se.scrollTop=N?Me:0,ve-(re+Ue)<=Ba&&(_.current=!0),p.context.handleScrollArrowVisibility(se);return}if(ve-He>Ba)Le=N?1/0:0;else if(B&&Pe<Me){const Ue=re+Oe-ve;Le=Pe-(Oe-Ue)}const be=Math.ceil(He);if(be!==0&&Fe(be),Le!=null){const Ue=tc(Le,0,Bf(se));Math.abs(se.scrollTop-Ue)>Ba&&(se.scrollTop=Ue)}be>=ve-Ba&&(_.current=!0),p.context.handleScrollArrowVisibility(se)});v.useImperativeHandle(p.context.scrollHandlerRef,()=>V,[V]),Ia({open:k,ref:p.context.popupRef,onComplete(){k&&p.context.onOpenChangeComplete(!0)}});const X={open:k,transitionStatus:G,side:x,align:w};_e(()=>{!Y||!p.context.popupRef.current||Object.keys($.current).length||($.current={top:Y.style.top||"0",left:Y.style.left||"0",right:Y.style.right,height:Y.style.height,bottom:Y.style.bottom,minHeight:Y.style.minHeight,maxHeight:Y.style.maxHeight,marginTop:Y.style.marginTop,marginBottom:Y.style.marginBottom})},[p,Y]),_e(()=>{k||C||(L.current=!1,_.current=!1,jh(Y,$.current))},[k,C,Y]),_e(()=>{const se=p.context.popupRef.current;if(!k||!J||!Y||!se||C&&!R||p.state.transitionStatus==="ending")return;if(L.current=!0,se.style.removeProperty(HR),!C){K.request(()=>p.context.handleScrollArrowVisibility(U||se));return}const N=OB(se);try{let B=p.context.selectedItemTextRef.current;B?.isConnected||(B=!p.select("hasSelectedValue")&&p.context.firstItemTextRef.current?.isConnected?p.context.firstItemTextRef.current:null);const W=p.context.valueRef.current,re=wn(Y),Re=re.getComputedStyle(Y),le=re.getComputedStyle(se),me=Kt(J),ge=FR(J),ce=Vf(J.getBoundingClientRect(),ge),Te=Vf(Y.getBoundingClientRect(),ge),ve=ce.height,Pe=U||se,Me=Pe.scrollHeight,Le=parseFloat(le.borderBottomWidth),Fe=parseFloat(Re.marginTop)||10,Oe=parseFloat(Re.marginBottom)||10,He=parseFloat(Re.minHeight)||100,be=UR(le),Ue=5,Ze=5,it=20,de=me.documentElement.clientHeight-Fe-Oe,we=me.documentElement.clientWidth,Ke=de-ce.bottom+ve;let De,Ie=M==="rtl"?ce.right-Te.width:ce.left,yt=0;if(B&&W){const ft=Vf(W.getBoundingClientRect(),ge);De=Vf(B.getBoundingClientRect(),ge),Ie=Te.left+(M==="rtl"?ft.right-De.right:ft.left-De.left);const vt=ft.top-ce.top+ft.height/2;yt=De.top-Te.top+De.height/2-vt}const ut=Ke+yt+Oe+Le;let ht=Math.min(de,ut);const Ot=de-Fe-Oe,Dt=ut-ht,Jt=we-Ze;Y.style.left=`${tc(Ie,Ue,Jt-Te.width)}px`,Y.style.height=`${ht}px`,Y.style.maxHeight="none",Y.style.marginTop=`${Fe}px`,Y.style.marginBottom=`${Oe}px`,se.style.height="100%";const rn=Bf(Pe),Wt=Dt>=rn-Ba;Wt&&(ht=Math.min(de,Te.height)-(Dt-rn));const We=ce.top<it||ce.bottom>de-it||Math.ceil(ht)+Ba<Math.min(Me,He),xt=(re.visualViewport?.scale??1)!==1&&ho;if(We||xt){jh(Y,$.current),T(!1);return}const $t=Math.max(He,ht);if(Wt){const ft=Math.max(0,de-ut);Y.style.top=Te.height>=Ot?"0":`${ft}px`,Y.style.height=`${ht}px`,Pe.scrollTop=Bf(Pe)}else Y.style.bottom="0",Pe.scrollTop=Dt;if(De){const ft=Te.top,vt=Te.height,gt=De.top+De.height/2,Lt=tc(vt>0?(gt-ft)/vt*100:50,0,100);se.style.setProperty(HR,`50% ${Lt}%`)}($t===de||ht>=be)&&(_.current=!0),p.context.handleScrollArrowVisibility(Pe),h&&p.state.selectedIndex===null&&p.state.activeIndex===null&&p.context.listRef.current[0]!=null&&p.set("activeIndex",0)}finally{N()}},[p,k,Y,J,C,T,K,U,h,M,R]),v.useEffect(()=>{if(!C||!Y||!k)return;const se=wn(Y);function N(B){p.context.setOpen(!1,dt(I4,B))}return jt(se,"resize",N)},[p,C,Y,k]);const ee={...U?{role:"presentation"}:{role:"listbox","aria-multiselectable":g||void 0,"aria-readonly":y||void 0,id:`${j}-list`},onKeyDown(se){O&&Bc.has(se.key)&&se.stopPropagation()},onScroll(se){U||V(se.currentTarget)},...C&&{style:U?{height:"100%"}:aA},className:!U&&C?Iy.className:void 0},q=Mt("div",n,{ref:[a,p.context.popupRef],state:X,stateAttributesMapping:CB,props:[F,ee,Lc(G),d]});return S.jsxs(v.Fragment,{children:[!I&&Iy.getElement(A),S.jsx($h,{context:b,modal:!1,disabled:!z,openInteractionType:D,returnFocus:c,restoreFocus:!0,children:q})]})});function UR(e){const n=e.maxHeight;return n.endsWith("px")&&parseFloat(n)||1/0}function Bf(e){return ob(e.scrollHeight,e.clientHeight)}function FR(e){return oC.getScale(e)}function nc(e,n,a){return e/a[n]}function Vf(e,n){return mc({x:nc(e.x,"x",n),y:nc(e.y,"y",n),width:nc(e.width,"x",n),height:nc(e.height,"y",n)})}const BR=[["transform","none"],["scale","1"],["translate","0 0"]];function OB(e){const{style:n}=e,a={};for(const[o,s]of BR)a[o]=n.getPropertyValue(o),n.setProperty(o,s,"important");return()=>{for(const[o]of BR){const s=a[o];s?n.setProperty(o,s):n.removeProperty(o)}}}const MB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=yo(),p=d.useState("multiple"),g=d.useState("readOnly"),{alignItemWithTriggerActive:y}=ib(),h=d.useState("hasScrollArrows"),b=d.useState("openMethod"),w={id:`${d.useState("id")}-list`,role:"listbox","aria-multiselectable":p||void 0,"aria-readonly":g||void 0,onScroll(R){d.context.scrollHandlerRef.current?.(R.currentTarget)},...y&&{style:aA},className:h&&b!=="touch"?Iy.className:void 0},C=d.useStateSetter("listElement");return Mt("div",n,{ref:[a,C],props:[w,c]})}),oA=v.createContext(void 0);function iA(){const e=v.useContext(oA);if(!e)throw new Error(Rn(57));return e}const AB=v.memo(v.forwardRef(function(n,a){const{render:o,className:s,style:u,value:c=null,label:d,disabled:p=!1,nativeButton:g=!1,...y}=n,h=v.useRef(null),b=Rp({guess:!0,label:d,textRef:h}),x=yo(),{props:w,multiple:C,disabled:R,readOnly:T,isItemEqualToValue:O}=x.useState("itemRoot"),M=R||p,A=x.useState("isActive",b.index),I=x.useState("open"),j=x.useState("isSelected",c),k=x.useState("isSelectedByFocus",b.index),D=b.index,z=v.useRef(null);_e(()=>{const X=x.context.valuesRef.current;return X[D]=c,()=>{delete X[D]}},[D,c,x]),_e(()=>{const X=x.state.value,ee=x.state.selectedIndex;let q=ee,se;C&&Array.isArray(X)?(q=sB(D,c,x.context.valuesRef.current,X,O,ee),se=q===D,D===ee&&!se&&(x.context.selectedItemTextRef.current=null)):(se=X!==void 0&&Ss(c,X,O),se&&(q=D)),x.set("selectedIndex",q),se&&h.current&&(x.context.selectedItemTextRef.current=h.current)},[D,C,O,x,c]);const F=v.useRef("mouse"),G=v.useRef(!1),{getButtonProps:J,buttonRef:Y}=mo({disabled:M,focusableWhenDisabled:!0,native:g,composite:!0}),U={disabled:M,selected:j,highlighted:A};function _(X){if(R||T)return;const ee=x.state.value;if(C){const q=Array.isArray(ee)?ee:[],se=j?lB(q,c,O):[...q,c];x.context.setValue(se,dt(fs,X))}else x.context.setValue(c,dt(fs,X)),x.context.setOpen(!1,dt(fs,X))}function L(){x.context.selectionRef.current.dragY=0}const $={role:"option","aria-selected":j,tabIndex:I&&A?0:-1,onKeyDown(X){x.set("activeIndex",D),X.key===" "&&x.context.typingRef.current&&X.preventDefault()},onClick(X){const ee=F.current!=="touch",q=X.nativeEvent.pointerType,se=ee&&Nl(X.nativeEvent)&&(q!==void 0||A),N=ee&&!se&&!G.current;G.current=!1,!(M||N)&&_(X.nativeEvent)},onPointerEnter(X){F.current=X.pointerType},onPointerMove(X){if(X.pointerType==="mouse"&&X.buttons===1){const ee=x.context.selectionRef.current;ee.dragY+=X.movementY,ee.dragY**2>=64&&(ee.allowUnselectedMouseUp=!0)}},onPointerDown(X){F.current=X.pointerType,G.current=!0,L()},onMouseUp(){if(L(),M||F.current==="touch"||G.current)return;const X=!x.context.selectionRef.current.allowSelectedMouseUp&&j,ee=!x.context.selectionRef.current.allowUnselectedMouseUp&&!j;X||ee||(G.current=!0,z.current?.click(),G.current=!1)}},K=Mt("div",n,{ref:[Y,a,b.ref,z],state:U,props:[w,$,y,J]}),V=v.useMemo(()=>({selected:j,index:D,textRef:h,selectedByFocus:k}),[j,D,h,k]);return S.jsx(oA.Provider,{value:V,children:K})})),DB=v.memo(v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c,selected:d,...p}=n,g=v.useRef(null),{transitionStatus:y,setMounted:h}=ws(d),x=Mt("span",n,{ref:[a,g],state:{selected:d,transitionStatus:y},props:[{"aria-hidden":!0,children:"✔️"},p],stateAttributesMapping:po});return Ia({batch:!0,enabled:!d,open:d,ref:g,onComplete(){d||h(!1)}}),x})),NB=v.forwardRef(function(n,a){const{selected:o}=iA();return n.keepMounted||o?S.jsx(DB,{...n,selected:o,ref:a}):null}),IB=v.memo(v.forwardRef(function(n,a){const{index:o,textRef:s,selectedByFocus:u}=iA(),c=yo(),{render:d,className:p,style:g,...y}=n,h=v.useCallback(x=>{x&&(o===0&&(c.context.firstItemTextRef.current=x),u&&(c.context.selectedItemTextRef.current=x))},[c,o,u]);return Mt("div",n,{ref:[h,a,s],props:y})})),sA=v.forwardRef(function(n,a){const{render:o,className:s,style:u,direction:c,keepMounted:d,...p}=n,g=c==="up",y=yo(),{side:h,scrollDownArrowRef:b,scrollUpArrowRef:x}=ib(),w=g?"scrollUpArrowVisible":"scrollDownArrowVisible",C=y.useState(w),R=y.useState("openMethod"),T=C&&R!=="touch",O=Hn(),M=g?x:b,{mounted:A,transitionStatus:I,setMounted:j}=ws(T);_e(()=>(y.context.scrollArrowsMountedCountRef.current+=1,y.set("hasScrollArrows",!0),()=>{y.context.scrollArrowsMountedCountRef.current=Math.max(0,y.context.scrollArrowsMountedCountRef.current-1),y.context.scrollArrowsMountedCountRef.current===0&&y.set("hasScrollArrows",!1)}),[y]),Ia({open:T,ref:M,onComplete(){T||j(!1)}});const z=Mt("div",n,{ref:[a,M],state:{direction:c,visible:T,side:h,transitionStatus:I},props:[{"aria-hidden":!0,children:g?"▲":"▼",style:{position:"absolute"},onMouseMove(G){if(G.movementX===0&&G.movementY===0||O.isStarted())return;y.set("activeIndex",null);function J(){const Y=y.state.listElement??y.context.popupRef.current;if(!Y)return;y.set("activeIndex",null),y.context.handleScrollArrowVisibility(Y);const U=ob(Y.scrollHeight,Y.clientHeight),_=Ih(Y.scrollTop,U),L=_===(g?0:U),$=y.context.listRef.current;if(_!==Y.scrollTop&&(Y.scrollTop=_),L){O.clear();return}if($.length>0){const K=M.current?.offsetHeight||0;Y.scrollTop=jB($,g,_,Y.clientHeight,K,U)}O.start(40,J)}O.start(40,J)},onMouseLeave(){O.clear()}},p],stateAttributesMapping:po});return A||d?z:null});function jB(e,n,a,o,s,u){if(n){let y=0;const h=a+s-Ba;for(let w=0;w<e.length;w+=1){const C=e[w];if(C&&C.offsetTop>=h){y=w;break}}const b=Math.max(0,y-1),x=e[b];return b<y&&x?Ih(x.offsetTop-s,u):0}let c=e.length-1;const d=a+o-s+Ba;for(let y=0;y<e.length;y+=1){const h=e[y];if(h&&h.offsetTop+h.offsetHeight>d){c=Math.max(0,y-1);break}}const p=Math.min(e.length-1,c+1),g=e[p];return p>c&&g?Ih(g.offsetTop+g.offsetHeight-o+s,u):u}const kB=v.forwardRef(function(n,a){return S.jsx(sA,{...n,ref:a,direction:"down"})}),PB=v.forwardRef(function(n,a){return S.jsx(sA,{...n,ref:a,direction:"up"})}),sb=cB;function lb({className:e,...n}){return S.jsx(yB,{"data-slot":"select-value",className:Qe("flex flex-1 text-left",e),...n})}function ub({className:e,size:n="default",children:a,...o}){return S.jsxs(gB,{"data-slot":"select-trigger","data-size":n,className:Qe("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",e),...o,children:[a,S.jsx(vB,{render:S.jsx(RC,{className:"pointer-events-none size-3.5 text-muted-foreground"})})]})}function cb({className:e,children:n,side:a="bottom",sideOffset:o=4,align:s="center",alignOffset:u=0,alignItemWithTrigger:c=!0,...d}){return S.jsx(bB,{children:S.jsx(SB,{side:a,sideOffset:o,align:s,alignOffset:u,alignItemWithTrigger:c,className:"isolate z-50",children:S.jsxs(TB,{"data-slot":"select-content","data-align-trigger":c,className:Qe("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...d,children:[S.jsx(LB,{}),S.jsx(MB,{children:n}),S.jsx(zB,{})]})})})}function db({className:e,children:n,...a}){return S.jsxs(AB,{"data-slot":"select-item",className:Qe("relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...a,children:[S.jsx(IB,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:n}),S.jsx(NB,{render:S.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:S.jsx(dp,{className:"pointer-events-none"})})]})}function LB({className:e,...n}){return S.jsx(PB,{"data-slot":"select-scroll-up-button",className:Qe("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",e),...n,children:S.jsx(kk,{})})}function zB({className:e,...n}){return S.jsx(kB,{"data-slot":"select-scroll-down-button",className:Qe("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",e),...n,children:S.jsx(RC,{})})}const lA=["en-US","zh-CN","zh-TW","ja-JP"],_B={"en-US":"English","zh-CN":"简体中文","zh-TW":"繁體中文","ja-JP":"日本語"},HB={"nav.dashboard":"Dashboard","nav.library":"Library","nav.skills":"Skills","nav.instructions":"Instructions","nav.models":"Models","nav.genesis":"Genesis","nav.explorer":"Explorer","nav.quantum":"Quantum","instructions.create":"New instruction","instructions.createTitle":"New instruction","instructions.name":"Name","instructions.namePlaceholder":"e.g. Code review checklist","instructions.content":"Content","instructions.contentPlaceholder":"Write Markdown instructions. Content is saved as Markdown.","instructions.editorLoading":"Loading editor…","instructions.save":"Create instruction","instructions.creating":"Creating…","instructions.created":"Instruction created.","instructions.error":"Unable to create the instruction. Please try again.","instructions.editTitle":"Edit instruction","instructions.updateSave":"Save changes","instructions.updating":"Saving…","instructions.updated":"Instruction updated. Reapply enabled agents to write the new content.","instructions.updateError":"Unable to update the instruction. Please try again.","instructions.edit":"Edit","instructions.delete":"Delete","instructions.deleted":"Instruction deleted.","instructions.deleteError":"Unable to delete the instruction. Please try again.","instructions.deleteInUse":"This instruction is assigned to an agent. Remove it from all agents before deleting.","instructions.deleteConfirmTitle":"Delete instruction?","instructions.deleteConfirmDescription":'"{{name}}" will be removed. This cannot be undone.',"instructions.inUse":"In use","instructions.dragHint":"Drag an instruction to an agent","instructions.listAria":"Instructions","instructions.emptyTitle":"No instructions yet","instructions.emptyDescription":"Create an instruction from the New instruction action in the page header.","instructions.loadError":"Unable to load instructions. Please try again.","agents.title":"Agents","agents.orderHint":"Order controls how instructions are combined","agents.loadError":"Unable to load agents. Please try again.","agents.updateError":"Unable to update the agent instructions.","agents.enableError":"Unable to update the agent.","agents.reapplyError":"Unable to reapply the agent instructions.","agents.reapplyHint":"Rewrite the managed instruction block.","agents.reapplyDisabledHint":"Enable instructions before reapplying.","agents.openFileError":"Unable to open the instruction file.","agents.fileMissing":"The instruction file does not exist yet.","agents.duplicateError":"This instruction is already assigned to the agent.","agents.applied":"Instructions applied.","agents.removed":"Foundry instructions removed.","agents.reapplied":"Instructions reapplied.","agents.enableRequiresInstruction":"Add at least one instruction first.","agents.toggleOnHint":"Remove Foundry instructions from this file.","agents.toggleOffHint":"Write Foundry instructions to this file.","agents.emptyAssigned":"Drag instructions here","agents.loadingInstruction":"Loading instruction…","agents.openFileAria":"Open instruction file for {{name}}","agents.reapplyAria":"Reapply instructions for {{name}}","agents.toggleAria":"Apply instructions to {{name}}","agents.removeInstructionAria":"Remove {{name}} from this agent","sidebar.teams":"Teams","sidebar.addTeam":"Add team","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"Enterprise","sidebar.plan.startup":"Startup","sidebar.plan.free":"Free","common.retry":"Retry","settings.downloadSkill":"Download Skill","settings.skillTargets":"Install targets","settings.aboutFoundrySkill":"About the Foundry Skill","settings.foundrySkillHint":"Download the Foundry Skill to teach agents how to operate Foundry through the Foundry CLI.","settings.downloadSkillDescription":"Choose user-level folders to install the Foundry agent skill. Existing copies will be replaced.","settings.skillDownloaded":"Skill installed.","settings.errors.downloadSkill":"Unable to download the skill. Please try again.","settings.errors.skillTargets":"Unable to load skill destinations. Please try again.","settings.downloadingSkill":"Downloading…","timeZone.losAngeles":"Los Angeles","timeZone.newYork":"New York","timeZone.shanghai":"Shanghai","timeZone.taipei":"Taipei","timeZone.tokyo":"Tokyo","timeZone.utc":"Coordinated Universal Time (UTC)","dataImport.title":"Import data","dataImport.passphrase":"Backup passphrase","dataImport.replaceAction":"Replace and import","dataImport.replaceWarning":"Importing completely replaces current Foundry data with this backup. Existing data will not be merged. This cannot be undone.","dataImport.error":"Unable to import data. Please try again.","dataImport.invalidBackup":"This backup is invalid or unsupported.","dataImport.invalidPassphrase":"The passphrase is incorrect or the backup is corrupted.","nav.settings":"Settings","settings.workspace":"Workspace","settings.appearance":"Appearance","settings.appearanceAria":"Appearance settings","settings.languageRegion":"Language & Region","settings.languageRegionAria":"Language & Region settings","settings.advanced":"Advanced","settings.advancedAria":"Advanced settings","settings.export":"Export","dataExport.title":"Export data","dataExport.action":"Export","dataExport.description":"Download an encrypted backup of your Foundry data.","dataExport.passphrase":"Passphrase","dataExport.confirmPassphrase":"Confirm passphrase","dataExport.passphraseHint":"Keep this passphrase. You will need it to import the backup; it cannot be recovered.","dataExport.passphraseMismatch":"The passphrases do not match.","dataExport.exporting":"Exporting…","dataExport.exported":"Backup download started.","dataExport.error":"Unable to export data. Please try again.","common.cancel":"Cancel","settings.import":"Import","settings.configFolder":"Config Folder","settings.openFolder":"Open","settings.copyConfigFolder":"Copy config folder path","settings.configFolderCopied":"Config folder path copied","settings.errors.copyConfigFolder":"Unable to copy the config folder path.","settings.errors.openConfigFolder":"Unable to open the config folder.","settings.language":"Language","settings.timeFormat":"Time format","settings.timeZone":"Time zone","settings.colorTheme":"Color theme","settings.navigation":"Settings navigation","settings.openNavigation":"Open settings navigation","settings.errors.load":"Unable to load settings.","settings.errors.theme":"Unable to update the color theme.","settings.errors.language":"Unable to update the language.","settings.errors.timeFormat":"Unable to update the time format.","settings.errors.timeZone":"Unable to update the time zone.","common.system":"System","theme.light":"Light","theme.dark":"Dark","a11y.goBack":"Go back","a11y.close":"Close","a11y.showPassword":"Reveal password","a11y.hidePassword":"Hide password","a11y.sidebar":"Sidebar","a11y.sidebarDescription":"Displays the mobile sidebar.","a11y.toggleSidebar":"Toggle sidebar"},UB={"nav.dashboard":"仪表盘","nav.library":"资料库","nav.skills":"技能","nav.instructions":"指令","nav.models":"模型","nav.genesis":"创世","nav.explorer":"探索","nav.quantum":"量子","instructions.create":"新建指令","instructions.createTitle":"新建指令","instructions.name":"名称","instructions.namePlaceholder":"例如:代码审查清单","instructions.content":"内容","instructions.contentPlaceholder":"编写 Markdown 指令。内容将以 Markdown 格式保存。","instructions.editorLoading":"正在加载编辑器…","instructions.save":"创建指令","instructions.creating":"创建中…","instructions.created":"指令已创建。","instructions.error":"无法创建指令,请重试。","instructions.editTitle":"编辑指令","instructions.updateSave":"保存修改","instructions.updating":"保存中…","instructions.updated":"指令已更新。对已启用的 Agent 执行重新写入后才会使用新内容。","instructions.updateError":"无法更新指令,请重试。","instructions.edit":"编辑","instructions.delete":"删除","instructions.deleted":"指令已删除。","instructions.deleteError":"无法删除指令,请重试。","instructions.deleteInUse":"该指令已被 Agent 使用,请先从所有 Agent 中移除。","instructions.deleteConfirmTitle":"删除指令?","instructions.deleteConfirmDescription":"“{{name}}”将被移除,此操作无法撤销。","instructions.inUse":"使用中","instructions.dragHint":"将指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.emptyTitle":"还没有指令","instructions.emptyDescription":"使用页面右上角的“新建指令”操作创建第一条指令。","instructions.loadError":"无法加载指令,请重试。","agents.title":"Agents","agents.orderHint":"顺序决定指令的拼接方式","agents.loadError":"无法加载 Agent,请重试。","agents.updateError":"无法更新 Agent 的指令。","agents.enableError":"无法更新 Agent。","agents.reapplyError":"无法重新写入 Agent 指令。","agents.reapplyHint":"重新生成文件中的 Foundry 指令块。","agents.reapplyDisabledHint":"启用指令后才能重新写入。","agents.openFileError":"无法打开指令文件。","agents.fileMissing":"指令文件尚不存在。","agents.duplicateError":"该指令已经添加到此 Agent。","agents.applied":"指令已写入。","agents.removed":"Foundry 指令已移除。","agents.reapplied":"指令已重新写入。","agents.enableRequiresInstruction":"请先添加至少一条指令。","agents.toggleOnHint":"从文件中移除 Foundry 指令。","agents.toggleOffHint":"将 Foundry 指令写入此文件。","agents.emptyAssigned":"将指令拖到这里","agents.loadingInstruction":"正在加载指令…","agents.openFileAria":"打开 {{name}} 的指令文件","agents.reapplyAria":"重新写入 {{name}} 的指令","agents.toggleAria":"将指令应用到 {{name}}","agents.removeInstructionAria":"从此 Agent 移除 {{name}}","sidebar.teams":"团队","sidebar.addTeam":"添加团队","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"企业版","sidebar.plan.startup":"初创版","sidebar.plan.free":"免费版","common.retry":"重试","settings.downloadSkill":"下载 Skill","settings.skillTargets":"安装目标","settings.aboutFoundrySkill":"关于 Foundry Skill","settings.foundrySkillHint":"下载 Foundry Skill,让 Agent 了解如何通过 Foundry CLI 操作 Foundry。","settings.downloadSkillDescription":"选择用于安装 Foundry Agent Skill 的用户目录,已有副本将被替换。","settings.skillDownloaded":"Skill 已安装。","settings.errors.downloadSkill":"无法下载 Skill,请重试。","settings.errors.skillTargets":"无法加载 Skill 目标路径,请重试。","settings.downloadingSkill":"下载中…","timeZone.losAngeles":"洛杉矶","timeZone.newYork":"纽约","timeZone.shanghai":"上海","timeZone.taipei":"台北","timeZone.tokyo":"东京","timeZone.utc":"协调世界时(UTC)","dataImport.title":"导入数据","dataImport.passphrase":"备份密码","dataImport.replaceAction":"覆盖并导入","dataImport.replaceWarning":"导入会用备份完全覆盖当前 Foundry 数据,不会合并现有数据。此操作无法撤销。","dataImport.error":"无法导入数据,请重试。","dataImport.invalidBackup":"备份无效或不受支持。","dataImport.invalidPassphrase":"密码不正确或备份已损坏。","nav.settings":"设置","settings.workspace":"工作区","settings.appearance":"外观","settings.appearanceAria":"外观设置","settings.languageRegion":"语言和地区","settings.languageRegionAria":"语言和地区设置","settings.advanced":"高级","settings.advancedAria":"高级设置","settings.export":"导出","dataExport.title":"导出数据","dataExport.action":"导出","dataExport.description":"下载当前 Foundry 数据的加密备份。","dataExport.passphrase":"密码","dataExport.confirmPassphrase":"确认密码","dataExport.passphraseHint":"请保存此密码,导入备份时需要使用。密码无法找回。","dataExport.passphraseMismatch":"两次输入的密码不一致。","dataExport.exporting":"导出中…","dataExport.exported":"已开始下载数据备份。","dataExport.error":"无法导出数据,请重试。","common.cancel":"取消","settings.import":"导入","settings.configFolder":"配置文件夹","settings.openFolder":"打开","settings.copyConfigFolder":"复制配置文件夹路径","settings.configFolderCopied":"已复制配置文件夹路径","settings.errors.copyConfigFolder":"无法复制配置文件夹路径。","settings.errors.openConfigFolder":"无法打开配置文件夹。","settings.language":"语言","settings.timeFormat":"时间格式","settings.timeZone":"时区","settings.colorTheme":"颜色主题","settings.navigation":"设置导航","settings.openNavigation":"打开设置导航","settings.errors.load":"无法加载设置。","settings.errors.theme":"无法更新颜色主题。","settings.errors.language":"无法更新语言。","settings.errors.timeFormat":"无法更新时间格式。","settings.errors.timeZone":"无法更新时区。","common.system":"跟随系统","theme.light":"浅色","theme.dark":"深色","a11y.goBack":"返回","a11y.close":"关闭","a11y.showPassword":"显示密码","a11y.hidePassword":"隐藏密码","a11y.sidebar":"侧边栏","a11y.sidebarDescription":"显示移动端侧边栏。","a11y.toggleSidebar":"切换侧边栏"},FB={"nav.dashboard":"儀表板","nav.library":"資料庫","nav.skills":"技能","nav.instructions":"指令","nav.models":"模型","nav.genesis":"創世","nav.explorer":"探索","nav.quantum":"量子","instructions.create":"新增指令","instructions.createTitle":"新增指令","instructions.name":"名稱","instructions.namePlaceholder":"例如:程式碼審查清單","instructions.content":"內容","instructions.contentPlaceholder":"撰寫 Markdown 指令。內容將以 Markdown 格式儲存。","instructions.editorLoading":"正在載入編輯器…","instructions.save":"建立指令","instructions.creating":"建立中…","instructions.created":"指令已建立。","instructions.error":"無法建立指令,請重試。","instructions.editTitle":"編輯指令","instructions.updateSave":"儲存修改","instructions.updating":"儲存中…","instructions.updated":"指令已更新。對已啟用的 Agent 執行重新寫入後才會使用新內容。","instructions.updateError":"無法更新指令,請重試。","instructions.edit":"編輯","instructions.delete":"刪除","instructions.deleted":"指令已刪除。","instructions.deleteError":"無法刪除指令,請重試。","instructions.deleteInUse":"此指令已被 Agent 使用,請先從所有 Agent 中移除。","instructions.deleteConfirmTitle":"刪除指令?","instructions.deleteConfirmDescription":"「{{name}}」將被移除,此操作無法復原。","instructions.inUse":"使用中","instructions.dragHint":"將指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.emptyTitle":"尚無指令","instructions.emptyDescription":"使用頁面右上角的「新增指令」操作建立第一條指令。","instructions.loadError":"無法載入指令,請重試。","agents.title":"Agents","agents.orderHint":"順序決定指令的拼接方式","agents.loadError":"無法載入 Agent,請重試。","agents.updateError":"無法更新 Agent 的指令。","agents.enableError":"無法更新 Agent。","agents.reapplyError":"無法重新寫入 Agent 指令。","agents.reapplyHint":"重新產生檔案中的 Foundry 指令區塊。","agents.reapplyDisabledHint":"啟用指令後才能重新寫入。","agents.openFileError":"無法開啟指令檔案。","agents.fileMissing":"指令檔案尚不存在。","agents.duplicateError":"此指令已經加入此 Agent。","agents.applied":"指令已寫入。","agents.removed":"Foundry 指令已移除。","agents.reapplied":"指令已重新寫入。","agents.enableRequiresInstruction":"請先加入至少一條指令。","agents.toggleOnHint":"從檔案中移除 Foundry 指令。","agents.toggleOffHint":"將 Foundry 指令寫入此檔案。","agents.emptyAssigned":"將指令拖到這裡","agents.loadingInstruction":"正在載入指令…","agents.openFileAria":"開啟 {{name}} 的指令檔案","agents.reapplyAria":"重新寫入 {{name}} 的指令","agents.toggleAria":"將指令套用到 {{name}}","agents.removeInstructionAria":"從此 Agent 移除 {{name}}","sidebar.teams":"團隊","sidebar.addTeam":"新增團隊","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"企業版","sidebar.plan.startup":"新創版","sidebar.plan.free":"免費版","common.retry":"重試","settings.downloadSkill":"下載 Skill","settings.skillTargets":"安裝目標","settings.aboutFoundrySkill":"關於 Foundry Skill","settings.foundrySkillHint":"下載 Foundry Skill,讓 Agent 瞭解如何透過 Foundry CLI 操作 Foundry。","settings.downloadSkillDescription":"選擇用於安裝 Foundry Agent Skill 的使用者目錄,已有副本將被替換。","settings.skillDownloaded":"Skill 已安裝。","settings.errors.downloadSkill":"無法下載 Skill,請重試。","settings.errors.skillTargets":"無法載入 Skill 目標路徑,請重試。","settings.downloadingSkill":"下載中…","timeZone.losAngeles":"洛杉磯","timeZone.newYork":"紐約","timeZone.shanghai":"上海","timeZone.taipei":"臺北","timeZone.tokyo":"東京","timeZone.utc":"協調世界時(UTC)","dataImport.title":"匯入資料","dataImport.passphrase":"備份密碼","dataImport.replaceAction":"覆蓋並匯入","dataImport.replaceWarning":"匯入會以備份完全覆蓋目前的 Foundry 資料,不會合併現有資料。此操作無法復原。","dataImport.error":"無法匯入資料,請重試。","dataImport.invalidBackup":"備份無效或不受支援。","dataImport.invalidPassphrase":"密碼不正確或備份已損壞。","nav.settings":"設定","settings.workspace":"工作區","settings.appearance":"外觀","settings.appearanceAria":"外觀設定","settings.languageRegion":"語言與地區","settings.languageRegionAria":"語言與地區設定","settings.advanced":"進階","settings.advancedAria":"進階設定","settings.export":"匯出","dataExport.title":"匯出資料","dataExport.action":"匯出","dataExport.description":"下載目前 Foundry 資料的加密備份。","dataExport.passphrase":"密碼","dataExport.confirmPassphrase":"確認密碼","dataExport.passphraseHint":"請保留此密碼,匯入備份時需要使用。密碼無法復原。","dataExport.passphraseMismatch":"兩次輸入的密碼不一致。","dataExport.exporting":"匯出中…","dataExport.exported":"已開始下載資料備份。","dataExport.error":"無法匯出資料,請重試。","common.cancel":"取消","settings.import":"匯入","settings.configFolder":"設定資料夾","settings.openFolder":"開啟","settings.copyConfigFolder":"複製設定資料夾路徑","settings.configFolderCopied":"已複製設定資料夾路徑","settings.errors.copyConfigFolder":"無法複製設定資料夾路徑。","settings.errors.openConfigFolder":"無法開啟設定資料夾。","settings.language":"語言","settings.timeFormat":"時間格式","settings.timeZone":"時區","settings.colorTheme":"色彩主題","settings.navigation":"設定導覽","settings.openNavigation":"開啟設定導覽","settings.errors.load":"無法載入設定。","settings.errors.theme":"無法更新色彩主題。","settings.errors.language":"無法更新語言。","settings.errors.timeFormat":"無法更新時間格式。","settings.errors.timeZone":"無法更新時區。","common.system":"跟隨系統","theme.light":"淺色","theme.dark":"深色","a11y.goBack":"返回","a11y.close":"關閉","a11y.showPassword":"顯示密碼","a11y.hidePassword":"隱藏密碼","a11y.sidebar":"側邊欄","a11y.sidebarDescription":"顯示行動版側邊欄。","a11y.toggleSidebar":"切換側邊欄"},BB={"nav.dashboard":"ダッシュボード","nav.library":"ライブラリ","nav.skills":"スキル","nav.instructions":"指示","nav.models":"モデル","nav.genesis":"ジェネシス","nav.explorer":"エクスプローラー","nav.quantum":"クォンタム","instructions.create":"新しい指示","instructions.createTitle":"新しい指示","instructions.name":"名前","instructions.namePlaceholder":"例:コードレビューチェックリスト","instructions.content":"内容","instructions.contentPlaceholder":"Markdown の指示を入力。内容は Markdown 形式で保存されます。","instructions.editorLoading":"エディターを読み込み中…","instructions.save":"指示を作成","instructions.creating":"作成中…","instructions.created":"指示を作成しました。","instructions.error":"指示を作成できませんでした。もう一度お試しください。","instructions.editTitle":"指示を編集","instructions.updateSave":"変更を保存","instructions.updating":"保存中…","instructions.updated":"指示を更新しました。有効な Agent は再書き込みすると新しい内容が反映されます。","instructions.updateError":"指示を更新できませんでした。もう一度お試しください。","instructions.edit":"編集","instructions.delete":"削除","instructions.deleted":"指示を削除しました。","instructions.deleteError":"指示を削除できませんでした。もう一度お試しください。","instructions.deleteInUse":"この指示は Agent に割り当てられています。すべての Agent から外してから削除してください。","instructions.deleteConfirmTitle":"指示を削除しますか?","instructions.deleteConfirmDescription":"「{{name}}」を削除します。この操作は取り消せません。","instructions.inUse":"使用中","instructions.dragHint":"指示を Agent にドラッグ","instructions.listAria":"指示一覧","instructions.emptyTitle":"指示はまだありません","instructions.emptyDescription":"ページ右上の「新しい指示」から最初の指示を作成してください。","instructions.loadError":"指示を読み込めませんでした。もう一度お試しください。","agents.title":"Agents","agents.orderHint":"順序が指示の結合順になります","agents.loadError":"Agent を読み込めませんでした。もう一度お試しください。","agents.updateError":"Agent の指示を更新できませんでした。","agents.enableError":"Agent を更新できませんでした。","agents.reapplyError":"Agent の指示を再書き込みできませんでした。","agents.reapplyHint":"管理対象の指示ブロックを再生成します。","agents.reapplyDisabledHint":"再書き込みするには指示を有効にしてください。","agents.openFileError":"指示ファイルを開けませんでした。","agents.fileMissing":"指示ファイルはまだ存在しません。","agents.duplicateError":"この指示はすでに Agent に追加されています。","agents.applied":"指示を書き込みました。","agents.removed":"Foundry の指示を削除しました。","agents.reapplied":"指示を再書き込みしました。","agents.enableRequiresInstruction":"先に指示を 1 つ以上追加してください。","agents.toggleOnHint":"このファイルから Foundry の指示を削除します。","agents.toggleOffHint":"Foundry の指示をこのファイルに書き込みます。","agents.emptyAssigned":"ここに指示をドラッグ","agents.loadingInstruction":"指示を読み込み中…","agents.openFileAria":"{{name}} の指示ファイルを開く","agents.reapplyAria":"{{name}} の指示を再書き込み","agents.toggleAria":"{{name}} に指示を適用","agents.removeInstructionAria":"この Agent から {{name}} を削除","sidebar.teams":"チーム","sidebar.addTeam":"チームを追加","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"エンタープライズ","sidebar.plan.startup":"スタートアップ","sidebar.plan.free":"無料","common.retry":"再試行","settings.downloadSkill":"Skill をダウンロード","settings.skillTargets":"インストール先","settings.aboutFoundrySkill":"Foundry Skill について","settings.foundrySkillHint":"Foundry Skill をダウンロードして、Agent に Foundry CLI を使った Foundry の操作方法を伝えます。","settings.downloadSkillDescription":"Foundry Agent Skill のインストール先を選択します。既存のコピーは置き換えられます。","settings.skillDownloaded":"Skill をインストールしました。","settings.errors.downloadSkill":"Skill をダウンロードできません。再試行してください。","settings.errors.skillTargets":"Skill の保存先を取得できません。再試行してください。","settings.downloadingSkill":"ダウンロード中…","timeZone.losAngeles":"ロサンゼルス","timeZone.newYork":"ニューヨーク","timeZone.shanghai":"上海","timeZone.taipei":"台北","timeZone.tokyo":"東京","timeZone.utc":"協定世界時(UTC)","dataImport.title":"データをインポート","dataImport.passphrase":"バックアップのパスフレーズ","dataImport.replaceAction":"上書きしてインポート","dataImport.replaceWarning":"現在の Foundry データはバックアップの内容で完全に置き換えられます。既存データとの結合は行われません。この操作は取り消せません。","dataImport.error":"データをインポートできませんでした。もう一度お試しください。","dataImport.invalidBackup":"バックアップが無効または未対応です。","dataImport.invalidPassphrase":"パスフレーズが違うか、バックアップが破損しています。","nav.settings":"設定","settings.workspace":"ワークスペース","settings.appearance":"外観","settings.appearanceAria":"外観設定","settings.languageRegion":"言語と地域","settings.languageRegionAria":"言語と地域の設定","settings.advanced":"詳細設定","settings.advancedAria":"詳細設定","settings.export":"エクスポート","dataExport.title":"データをエクスポート","dataExport.action":"エクスポート","dataExport.description":"Foundry のデータを暗号化したバックアップとしてダウンロードします。","dataExport.passphrase":"パスフレーズ","dataExport.confirmPassphrase":"パスフレーズの確認","dataExport.passphraseHint":"インポート時に必要なため、このパスフレーズを保管してください。復元はできません。","dataExport.passphraseMismatch":"パスフレーズが一致しません。","dataExport.exporting":"エクスポート中…","dataExport.exported":"バックアップのダウンロードを開始しました。","dataExport.error":"データをエクスポートできませんでした。もう一度お試しください。","common.cancel":"キャンセル","settings.import":"インポート","settings.configFolder":"設定フォルダー","settings.openFolder":"開く","settings.copyConfigFolder":"設定フォルダーのパスをコピー","settings.configFolderCopied":"設定フォルダーのパスをコピーしました","settings.errors.copyConfigFolder":"設定フォルダーのパスをコピーできませんでした。","settings.errors.openConfigFolder":"設定フォルダーを開けませんでした。","settings.language":"言語","settings.timeFormat":"時刻形式","settings.timeZone":"タイムゾーン","settings.colorTheme":"カラーテーマ","settings.navigation":"設定ナビゲーション","settings.openNavigation":"設定ナビゲーションを開く","settings.errors.load":"設定を読み込めませんでした。","settings.errors.theme":"カラーテーマを更新できませんでした。","settings.errors.language":"言語を更新できませんでした。","settings.errors.timeFormat":"時刻形式を更新できませんでした。","settings.errors.timeZone":"タイムゾーンを更新できませんでした。","common.system":"システム","theme.light":"ライト","theme.dark":"ダーク","a11y.goBack":"戻る","a11y.close":"閉じる","a11y.showPassword":"パスワードを表示","a11y.hidePassword":"パスワードを非表示","a11y.sidebar":"サイドバー","a11y.sidebarDescription":"モバイル用サイドバーを表示します。","a11y.toggleSidebar":"サイドバーを切り替える"},VB={"en-US":{translation:HB},"zh-CN":{translation:UB},"zh-TW":{translation:FB},"ja-JP":{translation:BB}};function qB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn(),s=[{value:"system",label:o("common.system")},...lA.map(u=>({value:u,label:_B[u]}))];return S.jsx(ji,{label:o("settings.language"),children:S.jsxs(sb,{items:s,value:e,onValueChange:u=>{u&&n(u)},disabled:a,children:[S.jsx(ub,{"aria-label":o("settings.language"),className:"w-52",children:S.jsx(lb,{})}),S.jsx(cb,{children:s.map(u=>S.jsx(db,{value:u.value,children:u.label},u.value))})]})})}const YB=["YYYY-MM-DD HH:mm:ss","YYYY-MM-DD","YYYY/MM/DD HH:mm:ss","DD/MM/YYYY HH:mm:ss","MM/DD/YYYY hh:mm:ss A","HH:mm:ss"],KB=["America/Los_Angeles","America/New_York","Asia/Shanghai","Asia/Taipei","Asia/Tokyo","UTC"],GB=1,$B="settings.changed",VR=YB.map(e=>({value:e,label:e}));function XB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn();return S.jsx(ji,{label:o("settings.timeFormat"),children:S.jsxs(sb,{items:VR,value:e,onValueChange:s=>{s&&n(s)},disabled:a,children:[S.jsx(ub,{"aria-label":o("settings.timeFormat"),className:"w-52",children:S.jsx(lb,{})}),S.jsx(cb,{children:VR.map(s=>S.jsx(db,{value:s.value,children:s.label},s.value))})]})})}const QB={"America/Los_Angeles":"timeZone.losAngeles","America/New_York":"timeZone.newYork","Asia/Shanghai":"timeZone.shanghai","Asia/Taipei":"timeZone.taipei","Asia/Tokyo":"timeZone.tokyo",UTC:"timeZone.utc"};function ZB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn(),s=KB.map(u=>({value:u,label:o(QB[u])}));return S.jsx(ji,{label:o("settings.timeZone"),children:S.jsxs(sb,{items:s,value:e,onValueChange:u=>{u&&n(u)},disabled:a,children:[S.jsx(ub,{"aria-label":o("settings.timeZone"),className:"w-52",children:S.jsx(lb,{})}),S.jsx(cb,{children:s.map(u=>S.jsx(db,{value:u.value,children:u.label},u.value))})]})})}const xi=["settings"],nh=["settings","update"];function fb(){const{t:e}=sn(),n=Bo(),a=YP({mutationKey:nh})>0,o=fp({queryKey:xi,queryFn:({signal:h})=>s7(h),staleTime:1/0,retry:!1}),s=Ma({mutationKey:nh,mutationFn:l7,onMutate:async h=>{await n.cancelQueries({queryKey:xi});const b=n.getQueryData(xi);return b&&n.setQueryData(xi,JB(b,h)),{previous:b}},onSuccess:h=>{n.setQueryData(xi,h)},onError:(h,b,x)=>{x?.previous&&n.setQueryData(xi,x.previous),_n.error(e(WB(b)))},onSettled:()=>n.invalidateQueries({queryKey:xi})}),u=o.data??null,c=u?.workspace.appearance["color-theme"]??"system",d=u?.workspace["language-region"].language??"system",p=u?.workspace["language-region"]["time-format"]??"YYYY-MM-DD HH:mm:ss",g=u?.workspace["language-region"]["time-zone"]??"America/Los_Angeles";function y(h){!u||n.isMutating({mutationKey:nh})>0||s.mutate(h)}return{settings:u,theme:c,language:d,timeFormat:p,timeZone:g,isLoading:o.isPending,isUpdating:a,setTheme:h=>{h!==c&&y({theme:h})},setLanguage:h=>{h!==d&&y({language:h})},setTimeFormat:h=>{h!==p&&y({timeFormat:h})},setTimeZone:h=>{h!==g&&y({timezone:h})}}}function JB(e,n){const a=e.workspace,o=a["language-region"];return{...e,workspace:{appearance:{"color-theme":n.theme??a.appearance["color-theme"]},"language-region":{language:n.language??o.language,"time-format":n.timeFormat??o["time-format"],"time-zone":n.timezone??o["time-zone"]}}}}function WB(e){return e.theme!==void 0?"settings.errors.theme":e.language!==void 0?"settings.errors.language":e.timeFormat!==void 0?"settings.errors.timeFormat":"settings.errors.timeZone"}const us=[{id:"appearance",labelKey:"settings.appearance",ariaKey:"settings.appearanceAria",icon:Zk},{id:"language-region",labelKey:"settings.languageRegion",ariaKey:"settings.languageRegionAria",icon:Yk},{id:"advanced",labelKey:"settings.advanced",ariaKey:"settings.advancedAria",icon:rP}];function e9(){const{t:e}=sn(),[n,a]=hz(),o=us.find(({id:O})=>O===n.get("panel"))?.id??us[0].id,s=O=>{a(M=>{const A=new URLSearchParams(M);return A.set("panel",O),A})},{settings:u,theme:c,language:d,timeFormat:p,timeZone:g,isLoading:y,isUpdating:h,setTheme:b,setLanguage:x,setTimeFormat:w,setTimeZone:C}=fb(),R=us.find(O=>O.id===o)?.ariaKey??"settings.appearanceAria",T=us.find(O=>O.id===o)?.labelKey??"settings.appearance";return S.jsxs("div",{className:`
|
|
125
|
+
`,children:p})]})]},d))})]}),S.jsxs(Fp,{children:[S.jsx(nn,{type:"button",variant:"ghost",disabled:c.isPending,onClick:e,children:n("common.cancel")}),S.jsxs(nn,{type:"submit",disabled:o.length===0||!u.isSuccess||c.isPending,children:[c.isPending?S.jsx(Fl,{className:"animate-spin"}):S.jsx(DC,{}),S.jsx("span",{children:n(c.isPending?"settings.downloadingSkill":"settings.downloadSkill")})]})]})]}),S.jsxs(tb,{disabled:c.isPending,render:S.jsx(nn,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[S.jsx(Rs,{}),S.jsx("span",{className:"sr-only",children:n("a11y.close")})]})]})})}function C7({disabled:e=!1}){const{t:n}=sn(),[a,o]=v.useState(!1);return S.jsxs(ji,{label:S.jsxs("span",{className:"flex items-center gap-1",children:[n("settings.downloadSkill"),S.jsxs(mh,{children:[S.jsx(yh,{render:S.jsx(nn,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground","aria-label":n("settings.aboutFoundrySkill")}),children:S.jsx(_k,{})}),S.jsx(vh,{children:n("settings.foundrySkillHint")})]})]}),children:[S.jsxs(nn,{type:"button",variant:"outline",disabled:e,onClick:()=>o(!0),children:[S.jsx(DC,{}),n("settings.downloadSkill")]}),a&&S.jsx(E7,{onClose:()=>o(!1)})]})}function T7({className:e,...n}){return S.jsx("div",{"data-slot":"input-group",role:"group",className:Qe("group/input-group relative flex h-7 w-full min-w-0 items-center rounded-md border border-input bg-input/20 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...n})}const O7=Tp("flex h-auto cursor-text items-center justify-center gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem]","block-start":"order-first w-full justify-start px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function M7({className:e,align:n="inline-start",...a}){return S.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":n,className:Qe(O7({align:n}),e),onClick:o=>{o.target.closest("button")||o.currentTarget.parentElement?.querySelector("input")?.focus()},...a})}const A7=Tp("flex items-center gap-2 rounded-md text-xs/relaxed shadow-none",{variants:{size:{xs:"h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",sm:"gap-1","icon-xs":"size-6 p-0 has-[>svg]:p-0","icon-sm":"size-7 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function D7({className:e,type:n="button",variant:a="ghost",size:o="xs",...s}){return S.jsx(nn,{type:n,"data-size":o,variant:a,className:Qe(A7({size:o}),e),...s})}function N7({className:e,...n}){return S.jsx(BO,{"data-slot":"input-group-control",className:Qe("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...n})}function Ay({id:e,disabled:n,...a}){const{t:o}=sn(),s=v.useId(),u=e??s,[c,d]=v.useState(!1),p=o(c?"a11y.hidePassword":"a11y.showPassword");return S.jsxs(T7,{"data-disabled":n,children:[S.jsx(N7,{...a,id:u,type:c?"text":"password",disabled:n}),S.jsx(M7,{align:"inline-end",children:S.jsx(D7,{type:"button",size:"icon-xs","aria-label":p,"aria-controls":u,title:p,disabled:n,onClick:()=>d(g=>!g),children:c?S.jsx(Uk,{}):S.jsx(Fk,{})})})]})}function I7(e,n){const a=URL.createObjectURL(e),o=document.createElement("a");o.href=a,o.download=n,document.body.append(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(a),1e3)}async function j7(e){const n=await fetch("/api/data-export",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw new Error("Unable to export data");const a=n.headers.get("content-disposition")??"",o=/filename="([^"]+)"/u.exec(a)?.[1]??"foundry.foundry-backup";I7(await n.blob(),o)}function k7({onClose:e}){const{t:n}=sn(),a=v.useId(),o=v.useId(),[s,u]=v.useState(""),[c,d]=v.useState(""),p=Ma({mutationFn:j7,onSuccess:()=>{_n.success(n("dataExport.exported")),e()},onError:()=>{_n.error(n("dataExport.error"))}});return S.jsx(_p,{open:!0,onOpenChange:g=>{!g&&!p.isPending&&e()},children:S.jsxs(Hp,{showCloseButton:!1,children:[S.jsxs("form",{className:"flex flex-col gap-4","aria-busy":p.isPending,onSubmit:g=>{if(g.preventDefault(),!(!s||!c||p.isPending)){if(s!==c){_n.error(n("dataExport.passphraseMismatch"));return}p.mutate({passphrase:s})}},children:[S.jsxs(Up,{children:[S.jsx(Bp,{children:n("dataExport.title")}),S.jsx(nb,{children:n("dataExport.description")})]}),S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx(_l,{htmlFor:a,children:n("dataExport.passphrase")}),S.jsx(Ay,{id:a,autoComplete:"new-password",required:!0,value:s,disabled:p.isPending,onChange:g=>u(g.target.value)})]}),S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx(_l,{htmlFor:o,children:n("dataExport.confirmPassphrase")}),S.jsx(Ay,{id:o,autoComplete:"new-password",required:!0,value:c,disabled:p.isPending,"aria-invalid":c.length>0&&s!==c,onChange:g=>d(g.target.value)})]}),S.jsxs("p",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[S.jsx(Xk,{className:"size-4 shrink-0"}),S.jsx("span",{children:n("dataExport.passphraseHint")})]}),S.jsxs(Fp,{children:[S.jsx(nn,{type:"button",variant:"ghost",disabled:p.isPending,onClick:e,children:n("common.cancel")}),S.jsxs(nn,{type:"submit",disabled:!s||!c||p.isPending,children:[p.isPending?S.jsx(Fl,{className:"animate-spin"}):S.jsx(LC,{}),S.jsx("span",{children:n(p.isPending?"dataExport.exporting":"dataExport.action")})]})]})]}),S.jsxs(tb,{disabled:p.isPending,render:S.jsx(nn,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[S.jsx(Rs,{}),S.jsx("span",{className:"sr-only",children:n("a11y.close")})]})]})})}function P7({disabled:e=!1}){const{t:n}=sn(),[a,o]=v.useState(!1);return S.jsxs(ji,{label:n("settings.export"),children:[S.jsxs(nn,{type:"button",variant:"outline",disabled:e,onClick:()=>o(!0),children:[S.jsx(LC,{}),n("settings.export")]}),a&&S.jsx(k7,{onClose:()=>o(!1)})]})}class QM extends Error{constructor(n){super(n),this.code=n}code}async function L7(e,n){const a=await fetch("/api/data-import",{method:"POST",headers:{"content-type":"application/octet-stream","x-foundry-passphrase":encodeURIComponent(n)},body:e});await z7(a)}async function z7(e){if(e.ok)return;let n="IMPORT_FAILED";try{const o=(await e.json()).error?.code;(o==="INVALID_BACKUP"||o==="INVALID_PASSPHRASE")&&(n=o)}catch{}throw new QM(n)}function _7({file:e,onClose:n}){const{t:a}=sn(),o=v.useId(),[s,u]=v.useState(""),c=Ma({mutationFn:()=>L7(e,s),onSuccess:()=>{location.replace(`${location.pathname}${location.search}`)},onError:g=>_n.error(a(H7(g)))}),d=c.isPending||c.isSuccess,p=()=>{d||n()};return S.jsx(_p,{open:!0,onOpenChange:g=>{g||p()},children:S.jsxs(Hp,{showCloseButton:!1,children:[S.jsxs("form",{className:"flex flex-col gap-4","aria-busy":d,onSubmit:g=>{g.preventDefault(),!d&&s&&c.mutate()},children:[S.jsxs(Up,{children:[S.jsx(Bp,{children:a("dataImport.title")}),S.jsx(nb,{className:"break-all",children:e.name})]}),S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsx(_l,{htmlFor:o,children:a("dataImport.passphrase")}),S.jsx(Ay,{id:o,autoComplete:"current-password",required:!0,value:s,disabled:d,onChange:g=>u(g.target.value)})]}),S.jsx("p",{className:"text-xs text-muted-foreground",children:a("dataImport.replaceWarning")}),S.jsxs(Fp,{children:[S.jsx(nn,{type:"button",variant:"ghost",disabled:d,onClick:p,children:a("common.cancel")}),S.jsxs(nn,{type:"submit",variant:"destructive",disabled:d||!s,children:[d?S.jsx(Fl,{className:"animate-spin"}):S.jsx(kC,{}),S.jsx("span",{children:a("dataImport.replaceAction")})]})]})]}),S.jsxs(nn,{type:"button",disabled:d,onClick:p,variant:"ghost",size:"icon",className:"absolute top-2 right-2",children:[S.jsx(Rs,{}),S.jsx("span",{className:"sr-only",children:a("a11y.close")})]})]})})}function H7(e){if(e instanceof QM)switch(e.code){case"INVALID_BACKUP":return"dataImport.invalidBackup";case"INVALID_PASSPHRASE":return"dataImport.invalidPassphrase"}return"dataImport.error"}function U7({disabled:e=!1}){const{t:n}=sn(),a=v.useRef(null),[o,s]=v.useState(null);return S.jsxs(ji,{label:n("settings.import"),children:[S.jsx("input",{ref:a,type:"file",accept:".foundry-backup,application/octet-stream",hidden:!0,onChange:u=>{s(u.target.files?.[0]??null),u.target.value=""}}),S.jsxs(nn,{type:"button",variant:"outline",disabled:e,onClick:()=>a.current?.click(),children:[S.jsx(kC,{}),n("settings.import")]}),o&&S.jsx(_7,{file:o,onClose:()=>s(null)})]})}const F7="data-checked",B7="data-unchecked",Dy={checked(e){return e?{[F7]:""}:{[B7]:""}},...po,...Yl},rb="data-composite-item-active",ZM=v.createContext(void 0);function V7(){return v.useContext(ZM)}const JM=v.createContext(void 0);function q7(){const e=v.useContext(JM);if(e===void 0)throw new Error(Rn(52));return e}const Y7=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u=!1,readOnly:c=!1,required:d=!1,"aria-labelledby":p,value:g,inputRef:y,nativeButton:h=!1,id:b,style:x,...w}=n,C=V7(),{disabled:R,readOnly:T,required:O,form:M,checkedValue:A,touched:I=!1,validation:j,name:k,setCheckedValue:D=Sn,setTouched:z=Sn,registerInputRef:F=Sn}=C??{},{setTouched:G,setFilled:J,state:Y,disabled:U}=qo(),_=FO(),{labelId:L,getDescriptionProps:$}=Cs(),K=U||_.disabled||R||u,V=T||c,X=O||d,ee=M,q=C?A===g:g==="",se=v.useRef(null),N=qc(K,se),B=v.useRef(null),W=j?.registerInput,re=v.useCallback(Ze=>W?.(Ze,{controlRef:se,value:void 0}),[W]),Re=Gr(y,B,F,re);_e(()=>{B.current?.checked&&J(!0)},[J]),_e(()=>{if(B.current){if(K&&q){F(null);return}F(B.current)}},[q,K,F]);const le=Tr(),me=Kl({id:b}),ge=h?void 0:me,ce=Hv(p,L,B,!h,ge,w["aria-label"]),Te={role:"radio","aria-checked":q,"aria-labelledby":ce,[rb]:q?"":void 0,id:h?me:le,onKeyDown(Ze){Ze.key==="Enter"&&Ze.preventDefault()},onClick(Ze){if(Ze.defaultPrevented||K||V)return;Ze.preventDefault();const it=B.current;it&&hs(it,Ze)},onFocus(Ze){N(!0),!(Ze.defaultPrevented||K||V||!I)&&(B.current?.click(),z(!1))},onBlur(){C||N(!1)}},{getButtonProps:ve,buttonRef:Pe}=mo({disabled:K,native:h,composite:!1}),Me={type:"radio",ref:Re,form:ee,id:ge,name:k,tabIndex:-1,style:k?Vh:Ic,"aria-hidden":!0,...g!==void 0?{value:Sh(g)}:Gt,disabled:K,checked:q,required:X,readOnly:V,onChange(Ze){if(Ze.nativeEvent.defaultPrevented||K||V||g===void 0)return;const it=dt(zr,Ze.nativeEvent);D(g,it),!it.isCanceled&&G(!0)},onClick(Ze){Ze.stopPropagation()},onFocus(){se.current?.focus()}},Le=v.useMemo(()=>({...Y,required:X,disabled:K,readOnly:V,checked:q}),[Y,K,V,q,X]),Fe=Le,Oe=C!==void 0,He=[a,se,Pe],be=[Te,w,ve,$,j?Ze=>j.getValidationProps(K,Ze):Gt],Ue=Mt("span",n,{enabled:!Oe,state:Le,ref:He,props:be,stateAttributesMapping:Dy});return S.jsxs(JM.Provider,{value:Fe,children:[Oe?S.jsx(jO,{tag:"span",render:o,className:s,style:x,state:Le,refs:He,props:be,stateAttributesMapping:Dy}):Ue,S.jsx("input",{...Me,suppressHydrationWarning:!0})]})}),K7=v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c=!1,...d}=n,p=q7(),g=p.checked,{mounted:y,transitionStatus:h,setMounted:b}=ws(g),x={...p,transitionStatus:h},w=v.useRef(null),C=c||y,R=Mt("span",n,{ref:[a,w],state:x,props:d,stateAttributesMapping:Dy});return Ia({batch:!0,enabled:!g,open:g,ref:w,onComplete(){g||b(!1)}}),C?R:null});function G7(e){const{loopFocus:n=!0,orientation:a="both",grid:o,onLoop:s,direction:u,highlightedIndex:c,onHighlightedIndexChange:d,rootRef:p,enableHomeAndEndKeys:g=!1,stopEventPropagation:y,disabledIndices:h,modifierKeys:b=fo}=e,[x,w]=v.useState(0),C=o!=null,R=v.useRef(null),T=Gr(R,p),O=v.useRef([]),M=v.useRef(!1),A=v.useRef(null),I=c??x,j=Be((G,J=!1)=>{if(A.current=O.current[G]??null,(d??w)(G),J){const Y=O.current[G];Qw(R.current,Y,u,a)}}),k=Be(G=>{if(G.size===0)return;if(M.current){const _=O.current,L=_.indexOf(A.current);if(L===-1){const $=_[I];!$||Rl(_,I,h)?j($7(_,h)):A.current=$}else L!==I&&j(L);return}M.current=!0;const J=Array.from(G.keys()),Y=J.find(_=>_?.hasAttribute(rb))??null,U=Y?G.get(Y)?.index??-1:-1;if(U!==-1)j(U);else if(Rl(J,I,h)){const _=wl(J,{disabledIndices:h});Sl(J,_)||j(_)}Qw(R.current,Y,u,a)});_e(()=>{if(h==null||c!=null||!M.current)return;const G=O.current;if(Rl(G,I,h)){const J=wl(G,{disabledIndices:h});Sl(G,J)||j(J)}},[h,c,I,O,j]);const D=Be((G,J,Y)=>s?s(G,J,Y,O):Y),z=Be(G=>{const J=G.key===vy||G.key===by;if(!Bc.has(G.key)||!g&&J||X7(G,b)||!R.current)return;const U=u==="rtl",_=U?my:yy,L=U?yy:my,$=a==="vertical"?gy:_,K=a==="vertical"?py:L,V=tr(G.nativeEvent);if(V!=null&&Xw(V)&&!PO(V)){const B=V.selectionStart,W=V.selectionEnd,re=V.value;if(B==null||G.shiftKey||B!==W||G.key!==K&&B<re.length||G.key!==$&&B>0)return}let X=I;const ee=qf(O,h),q=W0(O,h);o!=null&&(X=o({disabledIndices:h,elementsRef:O,event:G,highlightedIndex:I,loopFocus:n,maxIndex:q,minIndex:ee,onLoop:D,orientation:a,rtl:U}));const se=a!=="vertical"&&G.key===_||a!=="horizontal"&&G.key===gy,N=a!=="vertical"&&G.key===L||a!=="horizontal"&&G.key===py;g&&(G.key===vy?X=ee:G.key===by&&(X=q)),X===I&&(se||N)&&(n&&X===q&&se?(X=ee,s&&(X=s(G,I,X,O))):n&&X===ee&&N?(X=q,s&&(X=s(G,I,X,O))):X=wl(O.current,{startingIndex:X,decrement:N,disabledIndices:h})),X!==I&&!Sl(O.current,X)&&(y&&G.stopPropagation(),(C||J||se||N)&&G.preventDefault(),j(X,!0),queueMicrotask(()=>{O.current[X]?.focus()}))});return{props:{ref:T,onFocus(G){const J=R.current,Y=tr(G.nativeEvent);!J||Y==null||!Xw(Y)||Y.setSelectionRange(0,Y.value.length)},onKeyDown:z},highlightedIndex:I,onHighlightedIndexChange:j,elementsRef:O,onMapChange:k,relayKeyboardEvent:z}}function $7(e,n){let a=-1;for(let o=0;o<e.length;o+=1){const s=e[o];if(!(!s||Rl(e,o,n))){if(s.hasAttribute(rb))return o;a===-1&&(a=o)}}return Math.max(a,0)}function X7(e,n){for(const a of r_)if(!n.includes(a)&&e.getModifierState(a))return!0;return!1}function Q7(e){const{render:n,className:a,style:o,refs:s=fo,props:u=fo,state:c=Gt,stateAttributesMapping:d,highlightedIndex:p,onHighlightedIndexChange:g,orientation:y,grid:h,loopFocus:b,onLoop:x,enableHomeAndEndKeys:w,onMapChange:C,stopEventPropagation:R=!0,rootRef:T,disabledIndices:O,modifierKeys:M,highlightItemOnHover:A=!1,tag:I="div",...j}=e,k=ip(),{props:D,highlightedIndex:z,onHighlightedIndexChange:F,elementsRef:G,onMapChange:J,relayKeyboardEvent:Y}=G7({grid:h,loopFocus:b,onLoop:x,orientation:y,highlightedIndex:p,onHighlightedIndexChange:g,rootRef:T,stopEventPropagation:R,enableHomeAndEndKeys:w,direction:k,disabledIndices:O,modifierKeys:M}),U=Mt(I,e,{state:c,ref:s,props:[D,...u,j],stateAttributesMapping:d}),_=v.useMemo(()=>({highlightedIndex:z,onHighlightedIndexChange:F,highlightItemOnHover:A,relayKeyboardEvent:Y}),[z,F,A,Y]);return S.jsx(lO.Provider,{value:_,children:S.jsx(Iv,{elementsRef:G,onMapChange:L=>{C?.(L),J(L)},children:U})})}const Z7=[vO],J7=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u,readOnly:c,required:d,onValueChange:p,value:g,defaultValue:y,form:h,name:b,inputRef:x,id:w,style:C,...R}=n,{setTouched:T,setFocused:O,validationMode:M,name:A,disabled:I,state:j,validation:k,setDirty:D,setFilled:z,validityData:F}=qo(),{labelId:G}=Cs(),{clearErrors:J,elementRef:Y}=Vc(),U=m6(!0),_=I||u,L=A??b,$=Tr(w),[K,V]=bs({controlled:g,default:y,name:"RadioGroup",state:"value"}),[X,ee]=v.useState(!1),q=Be((Me,Le)=>{p?.(Me,Le),!Le.isCanceled&&V(Me)}),se=k.getInputControl,N=v.useMemo(()=>({get current(){return se()}}),[se]),B=v.useRef(null),W=v.useRef(null),re=Gr(B,x),Re=v.useRef(re),le=Be(Me=>{B.current===Me&&Re.current===re||(Re.current=re,re?.(Me))});_e(()=>{le(B.current)},[re,le]);const me=Be(Me=>{if(Me){if(!Me.disabled){W.current||(W.current=Me);const Le=B.current;(Me.checked||Le==null||Le.disabled)&&le(Me)}return()=>{W.current===Me&&(W.current=null),B.current===Me&&le(null)}}}),ge=Be(()=>{const Me=Y.current;if(!Me)return K??null;for(const Le of k.registeredInputs.keys())if(Le.checked&&S6(Le,Me))return K??null;return null});Yc(N,$,K??null,ge,!_,b),ql(K,()=>{J(L),D(K!==F.initialValue),z(K!=null),k.change(K);const Me=W.current;K==null&&Me&&!Me.disabled&&le(Me)});const ce=G??U?.legendId,Te={...j,disabled:_??!1,required:d??!1,readOnly:c??!1},ve=v.useMemo(()=>({checkedValue:K,disabled:_,form:h,validation:k,name:L,readOnly:c,registerInputRef:me,required:d,setCheckedValue:q,setTouched:ee,touched:X}),[K,_,h,k,L,c,me,d,q,ee,X]),Pe={id:w,role:"radiogroup","aria-required":d||void 0,"aria-disabled":_||void 0,"aria-readonly":c||void 0,"aria-labelledby":ce,onBlur(Me){at(Me.currentTarget,Me.relatedTarget)||(ee(!1),T(!0),O(!1),M==="onBlur"&&k.commit(K))},onKeyDownCapture(Me){Me.key.startsWith("Arrow")&&ee(!0)}};return S.jsx(ZM.Provider,{value:ve,children:S.jsx(Q7,{render:o,className:s,style:C,state:Te,props:[Pe,R,Me=>k.getValidationProps(_??!1,Me)],refs:[a],stateAttributesMapping:Yl,enableHomeAndEndKeys:!1,modifierKeys:Z7})})});function W7({className:e,...n}){return S.jsx(J7,{"data-slot":"radio-group",className:Qe("grid w-full gap-3",e),...n})}function eB({className:e,...n}){return S.jsx(Y7,{"data-slot":"radio-group-item",className:Qe("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-focus-visible/field-label:ring-0 group-has-focus-visible/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:data-checked:bg-primary",e),...n,children:S.jsx(K7,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:S.jsx("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}const tB=[{value:"system",labelKey:"common.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function nB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn();return S.jsx(ji,{label:o("settings.colorTheme"),children:S.jsx(W7,{"aria-label":o("settings.colorTheme"),value:e,onValueChange:n,disabled:a,"aria-busy":a,className:"flex w-auto flex-row flex-wrap items-center gap-x-6 gap-y-2",children:tB.map(s=>S.jsxs("label",{className:Qe("flex items-center gap-2 text-sm select-none",s.value===e?"font-medium text-foreground":"text-muted-foreground",a?"cursor-not-allowed opacity-60":"cursor-pointer"),children:[S.jsx(eB,{value:s.value,disabled:a}),S.jsx("span",{children:o(s.labelKey)})]},s.value))})})}function rB(e){const n=v.useRef(!0);n.current&&(n.current=!1,e())}const WM=v.createContext(void 0),eA=v.createContext(void 0);function yo(){const e=v.useContext(WM);if(e===void 0)throw new Error(Rn(60));return e}function tA(){const e=v.useContext(eA);if(e===void 0)throw new Error(Rn(61));return e}function aB(e,n,a=Object.is){const{length:o}=e;if(o!==n.length)return!1;for(let s=0;s<o;s+=1)if(!a(e[s],n[s]))return!1;return!0}const nA=(e,n)=>Object.is(e,n);function Ss(e,n,a){return e==null||n==null?Object.is(e,n):a(e,n)}function oB(e,n,a){return Array.isArray(e)&&Array.isArray(n)?!aB(e,n,(o,s)=>Ss(o,s,a)):e!==n}function Ny(e,n,a){return e?e.some(o=>o===void 0?!1:Ss(n,o,a)):!1}function th(e,n,a){return e?e.findIndex(o=>o===void 0?!1:Ss(o,n,a)):-1}function iB(e,n){if(n!==nA)return o=>Ny(e,o,n);const a=new Set(e);return a.delete(void 0),o=>a.has(o)&&(o!==0||e.some(s=>Object.is(o,s)))}function rA(e,n,a,o){const s=o&&Array.isArray(n)?e.findIndex(iB(n,a)):th(e,n,a);return s===-1?null:s}function sB(e,n,a,o,s,u){return Ny(o,n,s)?u!=null&&e>u&&Ny(o,a[u],s)?u:e:e===u?rA(a,o,s,!0):u}function lB(e,n,a){return e.filter(o=>!Ss(n,o,a))}const uB={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:n,multiple:a,itemToStringValue:o}=e;return n==null?!1:a&&Array.isArray(n)?n.length>0:vl(n,o)!==""},hasNullItemLabel:(e,n)=>n?J_(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,n)=>e.activeIndex===n,isSelected:(e,n)=>{const a=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(s=>Ss(n,s,a)):Ss(n,o,a)},isSelectedByFocus:(e,n)=>e.selectedIndex===n,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function tc(e,n=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER){return Math.max(n,Math.min(e,a))}const Ba=1;function ab(e,n){return Math.max(0,e-n)}function Ih(e,n){if(n<=0)return 0;const a=tc(e,0,n),o=a,s=n-a,u=o<=Ba,c=s<=Ba;return u&&c?o<=s?0:n:u?0:c?n:a}function cB(e){const{id:n,value:a,defaultValue:o=null,onValueChange:s,open:u,defaultOpen:c=!1,onOpenChange:d,name:p,form:g,autoComplete:y,disabled:h=!1,readOnly:b=!1,required:x=!1,modal:w=!0,actionsRef:C,inputRef:R,onOpenChangeComplete:T,items:O,multiple:M=!1,itemToStringLabel:A,itemToStringValue:I,isItemEqualToValue:j=nA,highlightItemOnHover:k=!0,children:D}=e,{clearErrors:z}=Vc(),{setDirty:F,setTouched:G,setFocused:J,validityData:Y,setFilled:U,name:_,disabled:L,validation:$,validationMode:K}=qo(),V=Kl({id:n}),X=L||h,ee=_??p,[q,se]=bs({controlled:a,default:M?o??fo:o,name:"Select",state:"value"}),[N,B]=bs({controlled:u,default:c,name:"Select",state:"open"}),W=v.useRef([]),re=v.useRef([]),Re=v.useRef(null),le=v.useRef(null),me=v.useRef(0),ge=v.useRef(null),ce=v.useRef([]),Te=v.useRef(!1),ve=v.useRef(null),Pe=v.useRef(null),Me=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Le=v.useRef(!1),Fe=v.useRef(q),{openMethod:Oe,triggerProps:He}=AO(N),be=er(()=>new Ul({id:V,labelId:void 0,modal:w,multiple:M,disabled:X,readOnly:b,required:x,highlightItemOnHover:k,itemToStringLabel:A,itemToStringValue:I,isItemEqualToValue:j,value:q,open:N,mounted:N,transitionStatus:void 0,items:O,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Gt,triggerProps:Gt,itemRoot:{props:Gt,multiple:M,disabled:X,readOnly:b,isItemEqualToValue:j},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Sn,setOpen:Sn,handleScrollArrowVisibility:Sn,onOpenChangeComplete:Sn,listRef:W,popupRef:Re,scrollHandlerRef:le,scrollArrowsMountedCountRef:me,valueRef:ge,valuesRef:ce,labelsRef:re,typingRef:Te,selectionRef:Me,firstItemTextRef:ve,selectedItemTextRef:Pe,alignItemWithTriggerActiveRef:Le,initialValueRef:Fe},uB)).current,[Ue,Ze]=v.useState(!1),{mounted:it,transitionStatus:de,forceUnmount:we}=_E({open:N,ref:Re,preventUnmountOnClose:Ue,setPreventUnmountOnClose:Ze,onUnmount(){be.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),T?.(!1)}}),Ke=be.useState("activeIndex"),De=be.useState("selectedIndex"),Ie=be.useState("triggerElement"),yt=be.useState("positionerElement"),ut=fj(Oe),ht=Oe??ut,Ot=v.useMemo(()=>M?"":vl(q,I),[M,q,I]),Dt=v.useMemo(()=>M&&Array.isArray(q)?q.map(H=>vl(H,I)):vl(q,I),[M,q,I]),Jt=Pn(Ie),rn=Be(()=>Dt);Yc(Jt,V,q,rn,!X,p);const Wt=M?Array.isArray(q)&&q.length>0:q!=null&&Ot!=="";_e(()=>{U(Wt)},[Wt,U]),_e(function(){const Z=rA(ce.current,q,j,M);Z===null&&(Pe.current=null),!N&&be.set("selectedIndex",Z)},[M,N,q,j,be]),ql(q,()=>{z(ee),F(oB(q,Y.initialValue,j)),$.change(q)});const We=Be((H,Z)=>{const ne=Z,ye=Jh(ne);d?.(H,ne),!Z.isCanceled&&(H||Ze(ye()),B(H),!H&&(Z.reason===Ti||Z.reason===Bh)&&(G(!0),J(!1),K==="onBlur"&&$.commit(q)))});v.useImperativeHandle(C,()=>({unmount:we,close:()=>{be.state.open&&We(!1,dt(Nc))}}),[we,We,be]);const xt=Be((H,Z)=>{s?.(H,Z),!Z.isCanceled&&se(H)}),$t=Be(H=>{const Z=ab(H.scrollHeight,H.clientHeight),ne=Ih(H.scrollTop,Z),ye=ne>0,xe=ne<Z;be.set("scrollUpArrowVisible",ye),be.set("scrollDownArrowVisible",xe)}),ft=$3({open:N,onOpenChange:We,elements:{reference:Ie,floating:yt}}),vt=LE(ft,{enabled:!X,event:"mousedown"}),gt=jc(ft),Lt=QE(ft,{enabled:!X,listRef:W,activeIndex:Ke,selectedIndex:De,disabledIndices:fo,onNavigate(H){H===null&&!N||be.set("activeIndex",H)},focusItemOnHover:k}),un=ZE(ft,{enabled:!X&&(N||!b&&!M),listRef:re,activeIndex:Ke,selectedIndex:De,disabledIndices:H=>PO(W.current[H]),onMatch(H){N?be.set("activeIndex",H):xt(ce.current[H],dt(zr))},onTyping(H){Te.current=H}}),je=v.useMemo(()=>Pr(un.reference,Lt.reference,gt.reference,vt.reference,He),[vt.reference,un.reference,Lt.reference,gt.reference,He]),ot=v.useMemo(()=>Pr(kc,un.floating,Lt.floating,gt.floating),[un.floating,Lt.floating,gt.floating]),ke=Lt.item??Gt,ze=v.useMemo(()=>({props:ke,multiple:M,disabled:X,readOnly:b,isItemEqualToValue:j}),[ke,M,X,b,j]);be.useContextCallback("setValue",xt),be.useContextCallback("setOpen",We),be.useContextCallback("handleScrollArrowVisibility",$t),be.useContextCallback("onOpenChangeComplete",T),rB(()=>{be.update({popupProps:ot,triggerProps:je,itemRoot:ze})}),be.useSyncedValues({id:V,modal:w,multiple:M,disabled:X,readOnly:b,required:x,highlightItemOnHover:k,value:q,open:N,mounted:it,transitionStatus:de,popupProps:ot,triggerProps:je,itemRoot:ze,items:O,itemToStringLabel:A,itemToStringValue:I,isItemEqualToValue:j,openMethod:ht});const Ge=Gr(R,$.inputRef),et=M?void 0:ee,Et=v.useMemo(()=>!M||!Array.isArray(q)||!ee?null:q.map(H=>{const Z=vl(H,I);return S.jsx("input",{type:"hidden",form:g,name:ee,value:Z,disabled:X},Z)}),[M,q,g,ee,I,X]);return S.jsxs(WM.Provider,{value:be,children:[S.jsx(eA.Provider,{value:ft,children:D}),S.jsx("input",{...$.getValidationProps(X,{onFocus(){be.state.triggerElement?.focus({focusVisible:!0})},onChange(H){if(H.nativeEvent.defaultPrevented||X||b)return;const Z=H.currentTarget.value,ne=dt(zr,H.nativeEvent);function ye(){if(M)return;const xe=Z.toLowerCase();let qe=ce.current.findIndex(Xe=>vl(Xe,I).toLowerCase()===xe||zO(Xe,A).toLowerCase()===xe);qe===-1&&(qe=ce.current.findIndex((Xe,$e)=>{const st=re.current[$e];return st!=null&&st.toLowerCase()===xe}));const Ve=ce.current[qe];Ve!=null&&xt(Ve,ne)}be.set("forceMount",!0),queueMicrotask(ye)}}),id:V&&et==null?`${V}-hidden-input`:void 0,form:g,name:et,autoComplete:y,value:Ot,disabled:X,required:x&&!(M&&Wt),readOnly:b,ref:Ge,style:ee?Vh:Ic,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Et]})}function dB(e,n){return e??n}const fB="data-popup-side",hB=400,pB={...rh,...Yl,popupSide:e=>e?{[fB]:e}:null,value:()=>null},gB=v.forwardRef(function(n,a){const{render:o,className:s,id:u,disabled:c=!1,nativeButton:d=!0,style:p,...g}=n,{setTouched:y,validationMode:h,validation:b,state:x,disabled:w}=qo(),{labelId:C}=Cs(),R=yo(),T=R.useState("readOnly"),O=R.useState("required"),M=R.useState("disabled"),A=w||M||c,I=R.useState("open"),j=R.useState("mounted"),k=R.useState("value"),D=R.useState("triggerProps"),z=R.useState("positionerElement"),F=R.useState("listElement"),G=R.useState("popupSide"),J=R.useState("id"),Y=R.useState("labelId"),U=R.useState("hasSelectedValue"),_=j&&z?G:null,L=u??J,$=dB(C,Y);Kl({id:u});const K=Pn(z),V=v.useRef(null),X=qc(A,V),{getButtonProps:ee,buttonRef:q}=mo({disabled:A,native:d}),se=R.useStateSetter("triggerElement"),N=Hn(),B=Hn(),W=Hn();v.useEffect(()=>{if(I)return W.start(hB,()=>{R.context.selectionRef.current.allowUnselectedMouseUp=!0,R.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{W.clear()};R.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},B.clear()},[I,R,B,W]);const re=Pr(D,{id:L,role:"combobox","aria-expanded":I,"aria-haspopup":"listbox","aria-controls":I?F?.id??oh(z)?.id:void 0,"aria-labelledby":$,"aria-readonly":T||void 0,"aria-required":O||void 0,tabIndex:A?-1:0,onFocus(me){X(!0),I&&R.context.alignItemWithTriggerActiveRef.current&&R.context.setOpen(!1,dt(zr,me.nativeEvent)),N.start(0,()=>{R.set("forceMount",!0)})},onBlur(me){at(z,me.relatedTarget)||(y(!0),X(!1),h==="onBlur"&&b.commit(k))},onMouseDown(me){if(I)return;const ge=Kt(me.currentTarget);function ce(Te){if(!V.current)return;const ve=Te.target;at(V.current,ve)||at(K.current,ve)||IO(Te,V.current)||R.context.setOpen(!1,dt(Vy,Te))}B.start(0,()=>{ge.addEventListener("mouseup",ce,{once:!0})})}},g,ee),Re=b.getValidationProps(A,re);Re.role="combobox";const le={...x,open:I,disabled:A,value:k,readOnly:T,popupSide:_,placeholder:!U};return Mt("button",n,{ref:[a,V,q,se],state:le,stateAttributesMapping:pB,props:Re})}),mB={value:()=>null},yB=v.forwardRef(function(n,a){const{className:o,render:s,children:u,placeholder:c,style:d,...p}=n,g=yo(),y=g.useState("value"),h=g.useState("items"),b=g.useState("itemToStringLabel"),x=g.useState("hasSelectedValue"),w=!x&&c!=null&&u==null,C=g.useState("hasNullItemLabel",w),R={value:y,placeholder:!x};let T=null;return typeof u=="function"?T=u(y):u!=null?T=u:w&&!C?T=c:Array.isArray(y)?T=W_(y,h,b):T=_O(y,h,b),Mt("span",n,{state:R,ref:[a,g.context.valueRef],props:[{children:T},p],stateAttributesMapping:mB})}),vB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,g={open:yo().useState("open")};return Mt("span",n,{state:g,ref:a,props:[{"aria-hidden":!0,children:"▼"},c],stateAttributesMapping:JR})}),bB=v.forwardRef(function(n,a){const o=yo(),s=o.useState("mounted"),u=o.useState("forceMount");return s||u?S.jsx(Gh,{ref:a,...n}):null}),aA=v.createContext(void 0);function ob(){const e=v.useContext(aA);if(!e)throw new Error(Rn(59));return e}function jh(e,n){e&&Object.assign(e.style,n)}const oA={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},xB={position:"fixed"},SB=v.forwardRef(function(n,a){const{anchor:o,className:s,render:u,positionMethod:c,side:d,align:p,sideOffset:g,alignOffset:y,collisionBoundary:h="clipping-ancestors",collisionPadding:b,arrowPadding:x,sticky:w,disableAnchorTracking:C,alignItemWithTrigger:R=!0,collisionAvoidance:T=OE,style:O,...M}=n,A=yo(),I=tA(),j=A.useState("open"),k=A.useState("mounted"),D=A.useState("modal"),z=A.useState("value"),F=A.useState("openMethod"),G=A.useState("positionerElement"),J=A.useState("triggerElement"),Y=A.useState("isItemEqualToValue"),U=A.useState("transitionStatus"),_=v.useRef(null),L=v.useRef(null),[$,K]=v.useState(R),V=k&&$&&F!=="touch";!k&&$!==R&&K(R),v.useImperativeHandle(A.context.alignItemWithTriggerActiveRef,()=>V),jv((V||D)&&j,F==="touch",G,J);const X=sp({anchor:o,floatingRootContext:I,positionMethod:c,mounted:k,side:d,sideOffset:g,align:p,alignOffset:y,arrowPadding:x,collisionBoundary:h,collisionPadding:b,sticky:w,disableAnchorTracking:C??V,collisionAvoidance:T,keepMounted:!0}),ee=V?"none":X.side,q=V?xB:X.positionerStyles,se={open:j,side:ee,align:X.align,anchorHidden:X.anchorHidden};_e(()=>{A.set("popupSide",X.side)},[A,X.side]);const N=A.useStateSetter("positionerElement"),B=lp(n,se,{styles:q,transitionStatus:U,props:M,refs:[a,N],hidden:!k,inert:!j}),W=v.useRef(0),re=Be(le=>{if(A.context.valuesRef.current.length===0)return;const me=W.current;W.current=le.size;const ge=dt(zr);if(me!==0&&!A.state.multiple&&z!==null&&th(A.context.valuesRef.current,z,Y)===-1){const Te=A.context.initialValueRef.current,Pe=Te!=null&&th(A.context.valuesRef.current,Te,Y)!==-1?Te:null;A.context.setValue(Pe,ge),Pe===null&&(A.set("selectedIndex",null),A.context.selectedItemTextRef.current=null)}if(me!==0&&A.state.multiple&&Array.isArray(z)){const ce=z.filter(Te=>th(A.context.valuesRef.current,Te,Y)!==-1);ce.length!==z.length&&(A.context.setValue(ce,ge),ce.length===0&&(A.set("selectedIndex",null),A.context.selectedItemTextRef.current=null))}if(j&&V){A.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ce={height:""};jh(G,ce),jh(A.context.popupRef.current,ce)}}),Re=v.useMemo(()=>({...X,side:ee,alignItemWithTriggerActive:V,setControlledAlignItemWithTrigger:K,scrollUpArrowRef:_,scrollDownArrowRef:L}),[X,ee,V,K]);return S.jsx(Iv,{elementsRef:A.context.listRef,labelsRef:A.context.labelsRef,onMapChange:re,children:S.jsxs(aA.Provider,{value:Re,children:[k&&D&&S.jsx(Ep,{inert:up(!j),cutout:J}),B]})})}),Ff="base-ui-disable-scrollbar",Iy={className:Ff,getElement(e){return S.jsx("style",{nonce:e,href:Ff,precedence:"base-ui:low",children:`.${Ff}{scrollbar-width:none}.${Ff}::-webkit-scrollbar{display:none}`})}},wB=v.createContext(void 0),RB={disableStyleElements:!1};function EB(){return v.useContext(wB)??RB}const _R="--transform-origin",CB={...Mc,...po},TB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,...d}=n,p=yo(),g=p.useState("multiple"),y=p.useState("readOnly"),h=p.useState("highlightItemOnHover"),b=tA(),{side:x,align:w,alignItemWithTriggerActive:C,isPositioned:R,setControlledAlignItemWithTrigger:T}=ob(),O=Nv()!=null,M=ip(),{nonce:A,disableStyleElements:I}=EB(),j=p.useState("id"),k=p.useState("open"),D=p.useState("openMethod"),z=p.useState("mounted"),F=p.useState("popupProps"),G=p.useState("transitionStatus"),J=p.useState("triggerElement"),Y=p.useState("positionerElement"),U=p.useState("listElement"),_=v.useRef(!1),L=v.useRef(!1),$=v.useRef({}),K=Il(),V=Be(se=>{if(!Y||!p.context.popupRef.current||!L.current)return;const N=Y.style.top==="0px",B=Y.style.bottom==="0px";if(_.current||!C||!N&&!B){p.context.handleScrollArrowVisibility(se);return}const W=UR(Y),re=nc(Y.getBoundingClientRect().height,"y",W),Re=Kt(Y),le=wn(Y),me=le.getComputedStyle(Y),ge=parseFloat(me.marginTop),ce=parseFloat(me.marginBottom),Te=HR(le.getComputedStyle(p.context.popupRef.current)),ve=Math.min(Re.documentElement.clientHeight-ge-ce,Te),Pe=se.scrollTop,Me=Bf(se);let Le=null;const Fe=Ue=>{Y.style.height=`${Ue}px`},Oe=N?Me-Pe:Pe,He=Math.min(re+Oe,ve);if(Oe<=Ba){const Ue=tc(Oe,0,ve-re);Ue>0&&Fe(re+Ue),se.scrollTop=N?Me:0,ve-(re+Ue)<=Ba&&(_.current=!0),p.context.handleScrollArrowVisibility(se);return}if(ve-He>Ba)Le=N?1/0:0;else if(B&&Pe<Me){const Ue=re+Oe-ve;Le=Pe-(Oe-Ue)}const be=Math.ceil(He);if(be!==0&&Fe(be),Le!=null){const Ue=tc(Le,0,Bf(se));Math.abs(se.scrollTop-Ue)>Ba&&(se.scrollTop=Ue)}be>=ve-Ba&&(_.current=!0),p.context.handleScrollArrowVisibility(se)});v.useImperativeHandle(p.context.scrollHandlerRef,()=>V,[V]),Ia({open:k,ref:p.context.popupRef,onComplete(){k&&p.context.onOpenChangeComplete(!0)}});const X={open:k,transitionStatus:G,side:x,align:w};_e(()=>{!Y||!p.context.popupRef.current||Object.keys($.current).length||($.current={top:Y.style.top||"0",left:Y.style.left||"0",right:Y.style.right,height:Y.style.height,bottom:Y.style.bottom,minHeight:Y.style.minHeight,maxHeight:Y.style.maxHeight,marginTop:Y.style.marginTop,marginBottom:Y.style.marginBottom})},[p,Y]),_e(()=>{k||C||(L.current=!1,_.current=!1,jh(Y,$.current))},[k,C,Y]),_e(()=>{const se=p.context.popupRef.current;if(!k||!J||!Y||!se||C&&!R||p.state.transitionStatus==="ending")return;if(L.current=!0,se.style.removeProperty(_R),!C){K.request(()=>p.context.handleScrollArrowVisibility(U||se));return}const N=OB(se);try{let B=p.context.selectedItemTextRef.current;B?.isConnected||(B=!p.select("hasSelectedValue")&&p.context.firstItemTextRef.current?.isConnected?p.context.firstItemTextRef.current:null);const W=p.context.valueRef.current,re=wn(Y),Re=re.getComputedStyle(Y),le=re.getComputedStyle(se),me=Kt(J),ge=UR(J),ce=Vf(J.getBoundingClientRect(),ge),Te=Vf(Y.getBoundingClientRect(),ge),ve=ce.height,Pe=U||se,Me=Pe.scrollHeight,Le=parseFloat(le.borderBottomWidth),Fe=parseFloat(Re.marginTop)||10,Oe=parseFloat(Re.marginBottom)||10,He=parseFloat(Re.minHeight)||100,be=HR(le),Ue=5,Ze=5,it=20,de=me.documentElement.clientHeight-Fe-Oe,we=me.documentElement.clientWidth,Ke=de-ce.bottom+ve;let De,Ie=M==="rtl"?ce.right-Te.width:ce.left,yt=0;if(B&&W){const ft=Vf(W.getBoundingClientRect(),ge);De=Vf(B.getBoundingClientRect(),ge),Ie=Te.left+(M==="rtl"?ft.right-De.right:ft.left-De.left);const vt=ft.top-ce.top+ft.height/2;yt=De.top-Te.top+De.height/2-vt}const ut=Ke+yt+Oe+Le;let ht=Math.min(de,ut);const Ot=de-Fe-Oe,Dt=ut-ht,Jt=we-Ze;Y.style.left=`${tc(Ie,Ue,Jt-Te.width)}px`,Y.style.height=`${ht}px`,Y.style.maxHeight="none",Y.style.marginTop=`${Fe}px`,Y.style.marginBottom=`${Oe}px`,se.style.height="100%";const rn=Bf(Pe),Wt=Dt>=rn-Ba;Wt&&(ht=Math.min(de,Te.height)-(Dt-rn));const We=ce.top<it||ce.bottom>de-it||Math.ceil(ht)+Ba<Math.min(Me,He),xt=(re.visualViewport?.scale??1)!==1&&ho;if(We||xt){jh(Y,$.current),T(!1);return}const $t=Math.max(He,ht);if(Wt){const ft=Math.max(0,de-ut);Y.style.top=Te.height>=Ot?"0":`${ft}px`,Y.style.height=`${ht}px`,Pe.scrollTop=Bf(Pe)}else Y.style.bottom="0",Pe.scrollTop=Dt;if(De){const ft=Te.top,vt=Te.height,gt=De.top+De.height/2,Lt=tc(vt>0?(gt-ft)/vt*100:50,0,100);se.style.setProperty(_R,`50% ${Lt}%`)}($t===de||ht>=be)&&(_.current=!0),p.context.handleScrollArrowVisibility(Pe),h&&p.state.selectedIndex===null&&p.state.activeIndex===null&&p.context.listRef.current[0]!=null&&p.set("activeIndex",0)}finally{N()}},[p,k,Y,J,C,T,K,U,h,M,R]),v.useEffect(()=>{if(!C||!Y||!k)return;const se=wn(Y);function N(B){p.context.setOpen(!1,dt(j4,B))}return jt(se,"resize",N)},[p,C,Y,k]);const ee={...U?{role:"presentation"}:{role:"listbox","aria-multiselectable":g||void 0,"aria-readonly":y||void 0,id:`${j}-list`},onKeyDown(se){O&&Bc.has(se.key)&&se.stopPropagation()},onScroll(se){U||V(se.currentTarget)},...C&&{style:U?{height:"100%"}:oA},className:!U&&C?Iy.className:void 0},q=Mt("div",n,{ref:[a,p.context.popupRef],state:X,stateAttributesMapping:CB,props:[F,ee,Lc(G),d]});return S.jsxs(v.Fragment,{children:[!I&&Iy.getElement(A),S.jsx($h,{context:b,modal:!1,disabled:!z,openInteractionType:D,returnFocus:c,restoreFocus:!0,children:q})]})});function HR(e){const n=e.maxHeight;return n.endsWith("px")&&parseFloat(n)||1/0}function Bf(e){return ab(e.scrollHeight,e.clientHeight)}function UR(e){return aC.getScale(e)}function nc(e,n,a){return e/a[n]}function Vf(e,n){return mc({x:nc(e.x,"x",n),y:nc(e.y,"y",n),width:nc(e.width,"x",n),height:nc(e.height,"y",n)})}const FR=[["transform","none"],["scale","1"],["translate","0 0"]];function OB(e){const{style:n}=e,a={};for(const[o,s]of FR)a[o]=n.getPropertyValue(o),n.setProperty(o,s,"important");return()=>{for(const[o]of FR){const s=a[o];s?n.setProperty(o,s):n.removeProperty(o)}}}const MB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=yo(),p=d.useState("multiple"),g=d.useState("readOnly"),{alignItemWithTriggerActive:y}=ob(),h=d.useState("hasScrollArrows"),b=d.useState("openMethod"),w={id:`${d.useState("id")}-list`,role:"listbox","aria-multiselectable":p||void 0,"aria-readonly":g||void 0,onScroll(R){d.context.scrollHandlerRef.current?.(R.currentTarget)},...y&&{style:oA},className:h&&b!=="touch"?Iy.className:void 0},C=d.useStateSetter("listElement");return Mt("div",n,{ref:[a,C],props:[w,c]})}),iA=v.createContext(void 0);function sA(){const e=v.useContext(iA);if(!e)throw new Error(Rn(57));return e}const AB=v.memo(v.forwardRef(function(n,a){const{render:o,className:s,style:u,value:c=null,label:d,disabled:p=!1,nativeButton:g=!1,...y}=n,h=v.useRef(null),b=Rp({guess:!0,label:d,textRef:h}),x=yo(),{props:w,multiple:C,disabled:R,readOnly:T,isItemEqualToValue:O}=x.useState("itemRoot"),M=R||p,A=x.useState("isActive",b.index),I=x.useState("open"),j=x.useState("isSelected",c),k=x.useState("isSelectedByFocus",b.index),D=b.index,z=v.useRef(null);_e(()=>{const X=x.context.valuesRef.current;return X[D]=c,()=>{delete X[D]}},[D,c,x]),_e(()=>{const X=x.state.value,ee=x.state.selectedIndex;let q=ee,se;C&&Array.isArray(X)?(q=sB(D,c,x.context.valuesRef.current,X,O,ee),se=q===D,D===ee&&!se&&(x.context.selectedItemTextRef.current=null)):(se=X!==void 0&&Ss(c,X,O),se&&(q=D)),x.set("selectedIndex",q),se&&h.current&&(x.context.selectedItemTextRef.current=h.current)},[D,C,O,x,c]);const F=v.useRef("mouse"),G=v.useRef(!1),{getButtonProps:J,buttonRef:Y}=mo({disabled:M,focusableWhenDisabled:!0,native:g,composite:!0}),U={disabled:M,selected:j,highlighted:A};function _(X){if(R||T)return;const ee=x.state.value;if(C){const q=Array.isArray(ee)?ee:[],se=j?lB(q,c,O):[...q,c];x.context.setValue(se,dt(fs,X))}else x.context.setValue(c,dt(fs,X)),x.context.setOpen(!1,dt(fs,X))}function L(){x.context.selectionRef.current.dragY=0}const $={role:"option","aria-selected":j,tabIndex:I&&A?0:-1,onKeyDown(X){x.set("activeIndex",D),X.key===" "&&x.context.typingRef.current&&X.preventDefault()},onClick(X){const ee=F.current!=="touch",q=X.nativeEvent.pointerType,se=ee&&Nl(X.nativeEvent)&&(q!==void 0||A),N=ee&&!se&&!G.current;G.current=!1,!(M||N)&&_(X.nativeEvent)},onPointerEnter(X){F.current=X.pointerType},onPointerMove(X){if(X.pointerType==="mouse"&&X.buttons===1){const ee=x.context.selectionRef.current;ee.dragY+=X.movementY,ee.dragY**2>=64&&(ee.allowUnselectedMouseUp=!0)}},onPointerDown(X){F.current=X.pointerType,G.current=!0,L()},onMouseUp(){if(L(),M||F.current==="touch"||G.current)return;const X=!x.context.selectionRef.current.allowSelectedMouseUp&&j,ee=!x.context.selectionRef.current.allowUnselectedMouseUp&&!j;X||ee||(G.current=!0,z.current?.click(),G.current=!1)}},K=Mt("div",n,{ref:[Y,a,b.ref,z],state:U,props:[w,$,y,J]}),V=v.useMemo(()=>({selected:j,index:D,textRef:h,selectedByFocus:k}),[j,D,h,k]);return S.jsx(iA.Provider,{value:V,children:K})})),DB=v.memo(v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c,selected:d,...p}=n,g=v.useRef(null),{transitionStatus:y,setMounted:h}=ws(d),x=Mt("span",n,{ref:[a,g],state:{selected:d,transitionStatus:y},props:[{"aria-hidden":!0,children:"✔️"},p],stateAttributesMapping:po});return Ia({batch:!0,enabled:!d,open:d,ref:g,onComplete(){d||h(!1)}}),x})),NB=v.forwardRef(function(n,a){const{selected:o}=sA();return n.keepMounted||o?S.jsx(DB,{...n,selected:o,ref:a}):null}),IB=v.memo(v.forwardRef(function(n,a){const{index:o,textRef:s,selectedByFocus:u}=sA(),c=yo(),{render:d,className:p,style:g,...y}=n,h=v.useCallback(x=>{x&&(o===0&&(c.context.firstItemTextRef.current=x),u&&(c.context.selectedItemTextRef.current=x))},[c,o,u]);return Mt("div",n,{ref:[h,a,s],props:y})})),lA=v.forwardRef(function(n,a){const{render:o,className:s,style:u,direction:c,keepMounted:d,...p}=n,g=c==="up",y=yo(),{side:h,scrollDownArrowRef:b,scrollUpArrowRef:x}=ob(),w=g?"scrollUpArrowVisible":"scrollDownArrowVisible",C=y.useState(w),R=y.useState("openMethod"),T=C&&R!=="touch",O=Hn(),M=g?x:b,{mounted:A,transitionStatus:I,setMounted:j}=ws(T);_e(()=>(y.context.scrollArrowsMountedCountRef.current+=1,y.set("hasScrollArrows",!0),()=>{y.context.scrollArrowsMountedCountRef.current=Math.max(0,y.context.scrollArrowsMountedCountRef.current-1),y.context.scrollArrowsMountedCountRef.current===0&&y.set("hasScrollArrows",!1)}),[y]),Ia({open:T,ref:M,onComplete(){T||j(!1)}});const z=Mt("div",n,{ref:[a,M],state:{direction:c,visible:T,side:h,transitionStatus:I},props:[{"aria-hidden":!0,children:g?"▲":"▼",style:{position:"absolute"},onMouseMove(G){if(G.movementX===0&&G.movementY===0||O.isStarted())return;y.set("activeIndex",null);function J(){const Y=y.state.listElement??y.context.popupRef.current;if(!Y)return;y.set("activeIndex",null),y.context.handleScrollArrowVisibility(Y);const U=ab(Y.scrollHeight,Y.clientHeight),_=Ih(Y.scrollTop,U),L=_===(g?0:U),$=y.context.listRef.current;if(_!==Y.scrollTop&&(Y.scrollTop=_),L){O.clear();return}if($.length>0){const K=M.current?.offsetHeight||0;Y.scrollTop=jB($,g,_,Y.clientHeight,K,U)}O.start(40,J)}O.start(40,J)},onMouseLeave(){O.clear()}},p],stateAttributesMapping:po});return A||d?z:null});function jB(e,n,a,o,s,u){if(n){let y=0;const h=a+s-Ba;for(let w=0;w<e.length;w+=1){const C=e[w];if(C&&C.offsetTop>=h){y=w;break}}const b=Math.max(0,y-1),x=e[b];return b<y&&x?Ih(x.offsetTop-s,u):0}let c=e.length-1;const d=a+o-s+Ba;for(let y=0;y<e.length;y+=1){const h=e[y];if(h&&h.offsetTop+h.offsetHeight>d){c=Math.max(0,y-1);break}}const p=Math.min(e.length-1,c+1),g=e[p];return p>c&&g?Ih(g.offsetTop+g.offsetHeight-o+s,u):u}const kB=v.forwardRef(function(n,a){return S.jsx(lA,{...n,ref:a,direction:"down"})}),PB=v.forwardRef(function(n,a){return S.jsx(lA,{...n,ref:a,direction:"up"})}),ib=cB;function sb({className:e,...n}){return S.jsx(yB,{"data-slot":"select-value",className:Qe("flex flex-1 text-left",e),...n})}function lb({className:e,size:n="default",children:a,...o}){return S.jsxs(gB,{"data-slot":"select-trigger","data-size":n,className:Qe("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",e),...o,children:[a,S.jsx(vB,{render:S.jsx(wC,{className:"pointer-events-none size-3.5 text-muted-foreground"})})]})}function ub({className:e,children:n,side:a="bottom",sideOffset:o=4,align:s="center",alignOffset:u=0,alignItemWithTrigger:c=!0,...d}){return S.jsx(bB,{children:S.jsx(SB,{side:a,sideOffset:o,align:s,alignOffset:u,alignItemWithTrigger:c,className:"isolate z-50",children:S.jsxs(TB,{"data-slot":"select-content","data-align-trigger":c,className:Qe("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...d,children:[S.jsx(LB,{}),S.jsx(MB,{children:n}),S.jsx(zB,{})]})})})}function cb({className:e,children:n,...a}){return S.jsxs(AB,{"data-slot":"select-item",className:Qe("relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...a,children:[S.jsx(IB,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:n}),S.jsx(NB,{render:S.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:S.jsx(dp,{className:"pointer-events-none"})})]})}function LB({className:e,...n}){return S.jsx(PB,{"data-slot":"select-scroll-up-button",className:Qe("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",e),...n,children:S.jsx(Pk,{})})}function zB({className:e,...n}){return S.jsx(kB,{"data-slot":"select-scroll-down-button",className:Qe("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",e),...n,children:S.jsx(wC,{})})}const uA=["en-US","zh-CN","zh-TW","ja-JP"],_B={"en-US":"English","zh-CN":"简体中文","zh-TW":"繁體中文","ja-JP":"日本語"},HB={"nav.dashboard":"Dashboard","nav.library":"Library","nav.skills":"Skills","nav.instructions":"Instructions","nav.models":"Models","nav.genesis":"Genesis","nav.explorer":"Explorer","nav.quantum":"Quantum","instructions.create":"New instruction","instructions.createTitle":"New instruction","instructions.name":"Name","instructions.namePlaceholder":"e.g. Code review checklist","instructions.content":"Content","instructions.contentPlaceholder":"Write Markdown instructions. Content is saved as Markdown.","instructions.editorLoading":"Loading editor…","instructions.save":"Create instruction","instructions.creating":"Creating…","instructions.created":"Instruction created.","instructions.error":"Unable to create the instruction. Please try again.","instructions.editTitle":"Edit instruction","instructions.updateSave":"Save changes","instructions.updating":"Saving…","instructions.updated":"Instruction updated. Reapply enabled agents to write the new content.","instructions.updateError":"Unable to update the instruction. Please try again.","instructions.edit":"Edit","instructions.delete":"Delete","instructions.deleted":"Instruction deleted.","instructions.deleteError":"Unable to delete the instruction. Please try again.","instructions.deleteInUse":"This instruction is assigned to an agent. Remove it from all agents before deleting.","instructions.deleteConfirmTitle":"Delete instruction?","instructions.deleteConfirmDescription":'"{{name}}" will be removed. This cannot be undone.',"instructions.inUse":"In use","instructions.dragHint":"Drag an instruction to an agent","instructions.listAria":"Instructions","instructions.emptyTitle":"No instructions yet","instructions.emptyDescription":"Create an instruction from the New instruction action in the page header.","instructions.loadError":"Unable to load instructions. Please try again.","agents.title":"Agents","agents.orderHint":"Order controls how instructions are combined","agents.loadError":"Unable to load agents. Please try again.","agents.updateError":"Unable to update the agent instructions.","agents.enableError":"Unable to update the agent.","agents.reapplyError":"Unable to reapply the agent instructions.","agents.reapplyHint":"Rewrite the managed instruction block.","agents.reapplyDisabledHint":"Enable instructions before reapplying.","agents.openFileError":"Unable to open the instruction file.","agents.fileMissing":"The instruction file does not exist yet.","agents.duplicateError":"This instruction is already assigned to the agent.","agents.applied":"Instructions applied.","agents.removed":"Foundry instructions removed.","agents.reapplied":"Instructions reapplied.","agents.enableRequiresInstruction":"Add at least one instruction first.","agents.toggleOnHint":"Remove Foundry instructions from this file.","agents.toggleOffHint":"Write Foundry instructions to this file.","agents.emptyAssigned":"Drag instructions here","agents.loadingInstruction":"Loading instruction…","agents.openFileAria":"Open instruction file for {{name}}","agents.reapplyAria":"Reapply instructions for {{name}}","agents.toggleAria":"Apply instructions to {{name}}","agents.removeInstructionAria":"Remove {{name}} from this agent","sidebar.teams":"Teams","sidebar.addTeam":"Add team","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"Enterprise","sidebar.plan.startup":"Startup","sidebar.plan.free":"Free","common.retry":"Retry","settings.downloadSkill":"Download Skill","settings.skillTargets":"Install targets","settings.aboutFoundrySkill":"About the Foundry Skill","settings.foundrySkillHint":"Download the Foundry Skill to teach agents how to operate Foundry through the Foundry CLI.","settings.downloadSkillDescription":"Choose user-level folders to install the Foundry agent skill. Existing copies will be replaced.","settings.skillDownloaded":"Skill installed.","settings.errors.downloadSkill":"Unable to download the skill. Please try again.","settings.errors.skillTargets":"Unable to load skill destinations. Please try again.","settings.downloadingSkill":"Downloading…","timeZone.losAngeles":"Los Angeles","timeZone.newYork":"New York","timeZone.shanghai":"Shanghai","timeZone.taipei":"Taipei","timeZone.tokyo":"Tokyo","timeZone.utc":"Coordinated Universal Time (UTC)","dataImport.title":"Import data","dataImport.passphrase":"Backup passphrase","dataImport.replaceAction":"Replace and import","dataImport.replaceWarning":"Importing completely replaces current Foundry data with this backup. Existing data will not be merged. This cannot be undone.","dataImport.error":"Unable to import data. Please try again.","dataImport.invalidBackup":"This backup is invalid or unsupported.","dataImport.invalidPassphrase":"The passphrase is incorrect or the backup is corrupted.","nav.settings":"Settings","settings.workspace":"Workspace","settings.appearance":"Appearance","settings.appearanceAria":"Appearance settings","settings.languageRegion":"Language & Region","settings.languageRegionAria":"Language & Region settings","settings.advanced":"Advanced","settings.advancedAria":"Advanced settings","settings.export":"Export","dataExport.title":"Export data","dataExport.action":"Export","dataExport.description":"Download an encrypted backup of your Foundry data.","dataExport.passphrase":"Passphrase","dataExport.confirmPassphrase":"Confirm passphrase","dataExport.passphraseHint":"Keep this passphrase. You will need it to import the backup; it cannot be recovered.","dataExport.passphraseMismatch":"The passphrases do not match.","dataExport.exporting":"Exporting…","dataExport.exported":"Backup download started.","dataExport.error":"Unable to export data. Please try again.","common.cancel":"Cancel","settings.import":"Import","settings.configFolder":"Config Folder","settings.openFolder":"Open","settings.copyConfigFolder":"Copy config folder path","settings.configFolderCopied":"Config folder path copied","settings.errors.copyConfigFolder":"Unable to copy the config folder path.","settings.errors.openConfigFolder":"Unable to open the config folder.","settings.language":"Language","settings.timeFormat":"Time format","settings.timeZone":"Time zone","settings.colorTheme":"Color theme","settings.navigation":"Settings navigation","settings.openNavigation":"Open settings navigation","settings.errors.load":"Unable to load settings.","settings.errors.theme":"Unable to update the color theme.","settings.errors.language":"Unable to update the language.","settings.errors.timeFormat":"Unable to update the time format.","settings.errors.timeZone":"Unable to update the time zone.","common.system":"System","theme.light":"Light","theme.dark":"Dark","a11y.goBack":"Go back","a11y.close":"Close","a11y.showPassword":"Reveal password","a11y.hidePassword":"Hide password","a11y.sidebar":"Sidebar","a11y.sidebarDescription":"Displays the mobile sidebar.","a11y.toggleSidebar":"Toggle sidebar"},UB={"nav.dashboard":"仪表盘","nav.library":"资料库","nav.skills":"技能","nav.instructions":"指令","nav.models":"模型","nav.genesis":"创世","nav.explorer":"探索","nav.quantum":"量子","instructions.create":"新建指令","instructions.createTitle":"新建指令","instructions.name":"名称","instructions.namePlaceholder":"例如:代码审查清单","instructions.content":"内容","instructions.contentPlaceholder":"编写 Markdown 指令。内容将以 Markdown 格式保存。","instructions.editorLoading":"正在加载编辑器…","instructions.save":"创建指令","instructions.creating":"创建中…","instructions.created":"指令已创建。","instructions.error":"无法创建指令,请重试。","instructions.editTitle":"编辑指令","instructions.updateSave":"保存修改","instructions.updating":"保存中…","instructions.updated":"指令已更新。对已启用的 Agent 执行重新写入后才会使用新内容。","instructions.updateError":"无法更新指令,请重试。","instructions.edit":"编辑","instructions.delete":"删除","instructions.deleted":"指令已删除。","instructions.deleteError":"无法删除指令,请重试。","instructions.deleteInUse":"该指令已被 Agent 使用,请先从所有 Agent 中移除。","instructions.deleteConfirmTitle":"删除指令?","instructions.deleteConfirmDescription":"“{{name}}”将被移除,此操作无法撤销。","instructions.inUse":"使用中","instructions.dragHint":"将指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.emptyTitle":"还没有指令","instructions.emptyDescription":"使用页面右上角的“新建指令”操作创建第一条指令。","instructions.loadError":"无法加载指令,请重试。","agents.title":"Agents","agents.orderHint":"顺序决定指令的拼接方式","agents.loadError":"无法加载 Agent,请重试。","agents.updateError":"无法更新 Agent 的指令。","agents.enableError":"无法更新 Agent。","agents.reapplyError":"无法重新写入 Agent 指令。","agents.reapplyHint":"重新生成文件中的 Foundry 指令块。","agents.reapplyDisabledHint":"启用指令后才能重新写入。","agents.openFileError":"无法打开指令文件。","agents.fileMissing":"指令文件尚不存在。","agents.duplicateError":"该指令已经添加到此 Agent。","agents.applied":"指令已写入。","agents.removed":"Foundry 指令已移除。","agents.reapplied":"指令已重新写入。","agents.enableRequiresInstruction":"请先添加至少一条指令。","agents.toggleOnHint":"从文件中移除 Foundry 指令。","agents.toggleOffHint":"将 Foundry 指令写入此文件。","agents.emptyAssigned":"将指令拖到这里","agents.loadingInstruction":"正在加载指令…","agents.openFileAria":"打开 {{name}} 的指令文件","agents.reapplyAria":"重新写入 {{name}} 的指令","agents.toggleAria":"将指令应用到 {{name}}","agents.removeInstructionAria":"从此 Agent 移除 {{name}}","sidebar.teams":"团队","sidebar.addTeam":"添加团队","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"企业版","sidebar.plan.startup":"初创版","sidebar.plan.free":"免费版","common.retry":"重试","settings.downloadSkill":"下载 Skill","settings.skillTargets":"安装目标","settings.aboutFoundrySkill":"关于 Foundry Skill","settings.foundrySkillHint":"下载 Foundry Skill,让 Agent 了解如何通过 Foundry CLI 操作 Foundry。","settings.downloadSkillDescription":"选择用于安装 Foundry Agent Skill 的用户目录,已有副本将被替换。","settings.skillDownloaded":"Skill 已安装。","settings.errors.downloadSkill":"无法下载 Skill,请重试。","settings.errors.skillTargets":"无法加载 Skill 目标路径,请重试。","settings.downloadingSkill":"下载中…","timeZone.losAngeles":"洛杉矶","timeZone.newYork":"纽约","timeZone.shanghai":"上海","timeZone.taipei":"台北","timeZone.tokyo":"东京","timeZone.utc":"协调世界时(UTC)","dataImport.title":"导入数据","dataImport.passphrase":"备份密码","dataImport.replaceAction":"覆盖并导入","dataImport.replaceWarning":"导入会用备份完全覆盖当前 Foundry 数据,不会合并现有数据。此操作无法撤销。","dataImport.error":"无法导入数据,请重试。","dataImport.invalidBackup":"备份无效或不受支持。","dataImport.invalidPassphrase":"密码不正确或备份已损坏。","nav.settings":"设置","settings.workspace":"工作区","settings.appearance":"外观","settings.appearanceAria":"外观设置","settings.languageRegion":"语言和地区","settings.languageRegionAria":"语言和地区设置","settings.advanced":"高级","settings.advancedAria":"高级设置","settings.export":"导出","dataExport.title":"导出数据","dataExport.action":"导出","dataExport.description":"下载当前 Foundry 数据的加密备份。","dataExport.passphrase":"密码","dataExport.confirmPassphrase":"确认密码","dataExport.passphraseHint":"请保存此密码,导入备份时需要使用。密码无法找回。","dataExport.passphraseMismatch":"两次输入的密码不一致。","dataExport.exporting":"导出中…","dataExport.exported":"已开始下载数据备份。","dataExport.error":"无法导出数据,请重试。","common.cancel":"取消","settings.import":"导入","settings.configFolder":"配置文件夹","settings.openFolder":"打开","settings.copyConfigFolder":"复制配置文件夹路径","settings.configFolderCopied":"已复制配置文件夹路径","settings.errors.copyConfigFolder":"无法复制配置文件夹路径。","settings.errors.openConfigFolder":"无法打开配置文件夹。","settings.language":"语言","settings.timeFormat":"时间格式","settings.timeZone":"时区","settings.colorTheme":"颜色主题","settings.navigation":"设置导航","settings.openNavigation":"打开设置导航","settings.errors.load":"无法加载设置。","settings.errors.theme":"无法更新颜色主题。","settings.errors.language":"无法更新语言。","settings.errors.timeFormat":"无法更新时间格式。","settings.errors.timeZone":"无法更新时区。","common.system":"跟随系统","theme.light":"浅色","theme.dark":"深色","a11y.goBack":"返回","a11y.close":"关闭","a11y.showPassword":"显示密码","a11y.hidePassword":"隐藏密码","a11y.sidebar":"侧边栏","a11y.sidebarDescription":"显示移动端侧边栏。","a11y.toggleSidebar":"切换侧边栏"},FB={"nav.dashboard":"儀表板","nav.library":"資料庫","nav.skills":"技能","nav.instructions":"指令","nav.models":"模型","nav.genesis":"創世","nav.explorer":"探索","nav.quantum":"量子","instructions.create":"新增指令","instructions.createTitle":"新增指令","instructions.name":"名稱","instructions.namePlaceholder":"例如:程式碼審查清單","instructions.content":"內容","instructions.contentPlaceholder":"撰寫 Markdown 指令。內容將以 Markdown 格式儲存。","instructions.editorLoading":"正在載入編輯器…","instructions.save":"建立指令","instructions.creating":"建立中…","instructions.created":"指令已建立。","instructions.error":"無法建立指令,請重試。","instructions.editTitle":"編輯指令","instructions.updateSave":"儲存修改","instructions.updating":"儲存中…","instructions.updated":"指令已更新。對已啟用的 Agent 執行重新寫入後才會使用新內容。","instructions.updateError":"無法更新指令,請重試。","instructions.edit":"編輯","instructions.delete":"刪除","instructions.deleted":"指令已刪除。","instructions.deleteError":"無法刪除指令,請重試。","instructions.deleteInUse":"此指令已被 Agent 使用,請先從所有 Agent 中移除。","instructions.deleteConfirmTitle":"刪除指令?","instructions.deleteConfirmDescription":"「{{name}}」將被移除,此操作無法復原。","instructions.inUse":"使用中","instructions.dragHint":"將指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.emptyTitle":"尚無指令","instructions.emptyDescription":"使用頁面右上角的「新增指令」操作建立第一條指令。","instructions.loadError":"無法載入指令,請重試。","agents.title":"Agents","agents.orderHint":"順序決定指令的拼接方式","agents.loadError":"無法載入 Agent,請重試。","agents.updateError":"無法更新 Agent 的指令。","agents.enableError":"無法更新 Agent。","agents.reapplyError":"無法重新寫入 Agent 指令。","agents.reapplyHint":"重新產生檔案中的 Foundry 指令區塊。","agents.reapplyDisabledHint":"啟用指令後才能重新寫入。","agents.openFileError":"無法開啟指令檔案。","agents.fileMissing":"指令檔案尚不存在。","agents.duplicateError":"此指令已經加入此 Agent。","agents.applied":"指令已寫入。","agents.removed":"Foundry 指令已移除。","agents.reapplied":"指令已重新寫入。","agents.enableRequiresInstruction":"請先加入至少一條指令。","agents.toggleOnHint":"從檔案中移除 Foundry 指令。","agents.toggleOffHint":"將 Foundry 指令寫入此檔案。","agents.emptyAssigned":"將指令拖到這裡","agents.loadingInstruction":"正在載入指令…","agents.openFileAria":"開啟 {{name}} 的指令檔案","agents.reapplyAria":"重新寫入 {{name}} 的指令","agents.toggleAria":"將指令套用到 {{name}}","agents.removeInstructionAria":"從此 Agent 移除 {{name}}","sidebar.teams":"團隊","sidebar.addTeam":"新增團隊","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"企業版","sidebar.plan.startup":"新創版","sidebar.plan.free":"免費版","common.retry":"重試","settings.downloadSkill":"下載 Skill","settings.skillTargets":"安裝目標","settings.aboutFoundrySkill":"關於 Foundry Skill","settings.foundrySkillHint":"下載 Foundry Skill,讓 Agent 瞭解如何透過 Foundry CLI 操作 Foundry。","settings.downloadSkillDescription":"選擇用於安裝 Foundry Agent Skill 的使用者目錄,已有副本將被替換。","settings.skillDownloaded":"Skill 已安裝。","settings.errors.downloadSkill":"無法下載 Skill,請重試。","settings.errors.skillTargets":"無法載入 Skill 目標路徑,請重試。","settings.downloadingSkill":"下載中…","timeZone.losAngeles":"洛杉磯","timeZone.newYork":"紐約","timeZone.shanghai":"上海","timeZone.taipei":"臺北","timeZone.tokyo":"東京","timeZone.utc":"協調世界時(UTC)","dataImport.title":"匯入資料","dataImport.passphrase":"備份密碼","dataImport.replaceAction":"覆蓋並匯入","dataImport.replaceWarning":"匯入會以備份完全覆蓋目前的 Foundry 資料,不會合併現有資料。此操作無法復原。","dataImport.error":"無法匯入資料,請重試。","dataImport.invalidBackup":"備份無效或不受支援。","dataImport.invalidPassphrase":"密碼不正確或備份已損壞。","nav.settings":"設定","settings.workspace":"工作區","settings.appearance":"外觀","settings.appearanceAria":"外觀設定","settings.languageRegion":"語言與地區","settings.languageRegionAria":"語言與地區設定","settings.advanced":"進階","settings.advancedAria":"進階設定","settings.export":"匯出","dataExport.title":"匯出資料","dataExport.action":"匯出","dataExport.description":"下載目前 Foundry 資料的加密備份。","dataExport.passphrase":"密碼","dataExport.confirmPassphrase":"確認密碼","dataExport.passphraseHint":"請保留此密碼,匯入備份時需要使用。密碼無法復原。","dataExport.passphraseMismatch":"兩次輸入的密碼不一致。","dataExport.exporting":"匯出中…","dataExport.exported":"已開始下載資料備份。","dataExport.error":"無法匯出資料,請重試。","common.cancel":"取消","settings.import":"匯入","settings.configFolder":"設定資料夾","settings.openFolder":"開啟","settings.copyConfigFolder":"複製設定資料夾路徑","settings.configFolderCopied":"已複製設定資料夾路徑","settings.errors.copyConfigFolder":"無法複製設定資料夾路徑。","settings.errors.openConfigFolder":"無法開啟設定資料夾。","settings.language":"語言","settings.timeFormat":"時間格式","settings.timeZone":"時區","settings.colorTheme":"色彩主題","settings.navigation":"設定導覽","settings.openNavigation":"開啟設定導覽","settings.errors.load":"無法載入設定。","settings.errors.theme":"無法更新色彩主題。","settings.errors.language":"無法更新語言。","settings.errors.timeFormat":"無法更新時間格式。","settings.errors.timeZone":"無法更新時區。","common.system":"跟隨系統","theme.light":"淺色","theme.dark":"深色","a11y.goBack":"返回","a11y.close":"關閉","a11y.showPassword":"顯示密碼","a11y.hidePassword":"隱藏密碼","a11y.sidebar":"側邊欄","a11y.sidebarDescription":"顯示行動版側邊欄。","a11y.toggleSidebar":"切換側邊欄"},BB={"nav.dashboard":"ダッシュボード","nav.library":"ライブラリ","nav.skills":"スキル","nav.instructions":"指示","nav.models":"モデル","nav.genesis":"ジェネシス","nav.explorer":"エクスプローラー","nav.quantum":"クォンタム","instructions.create":"新しい指示","instructions.createTitle":"新しい指示","instructions.name":"名前","instructions.namePlaceholder":"例:コードレビューチェックリスト","instructions.content":"内容","instructions.contentPlaceholder":"Markdown の指示を入力。内容は Markdown 形式で保存されます。","instructions.editorLoading":"エディターを読み込み中…","instructions.save":"指示を作成","instructions.creating":"作成中…","instructions.created":"指示を作成しました。","instructions.error":"指示を作成できませんでした。もう一度お試しください。","instructions.editTitle":"指示を編集","instructions.updateSave":"変更を保存","instructions.updating":"保存中…","instructions.updated":"指示を更新しました。有効な Agent は再書き込みすると新しい内容が反映されます。","instructions.updateError":"指示を更新できませんでした。もう一度お試しください。","instructions.edit":"編集","instructions.delete":"削除","instructions.deleted":"指示を削除しました。","instructions.deleteError":"指示を削除できませんでした。もう一度お試しください。","instructions.deleteInUse":"この指示は Agent に割り当てられています。すべての Agent から外してから削除してください。","instructions.deleteConfirmTitle":"指示を削除しますか?","instructions.deleteConfirmDescription":"「{{name}}」を削除します。この操作は取り消せません。","instructions.inUse":"使用中","instructions.dragHint":"指示を Agent にドラッグ","instructions.listAria":"指示一覧","instructions.emptyTitle":"指示はまだありません","instructions.emptyDescription":"ページ右上の「新しい指示」から最初の指示を作成してください。","instructions.loadError":"指示を読み込めませんでした。もう一度お試しください。","agents.title":"Agents","agents.orderHint":"順序が指示の結合順になります","agents.loadError":"Agent を読み込めませんでした。もう一度お試しください。","agents.updateError":"Agent の指示を更新できませんでした。","agents.enableError":"Agent を更新できませんでした。","agents.reapplyError":"Agent の指示を再書き込みできませんでした。","agents.reapplyHint":"管理対象の指示ブロックを再生成します。","agents.reapplyDisabledHint":"再書き込みするには指示を有効にしてください。","agents.openFileError":"指示ファイルを開けませんでした。","agents.fileMissing":"指示ファイルはまだ存在しません。","agents.duplicateError":"この指示はすでに Agent に追加されています。","agents.applied":"指示を書き込みました。","agents.removed":"Foundry の指示を削除しました。","agents.reapplied":"指示を再書き込みしました。","agents.enableRequiresInstruction":"先に指示を 1 つ以上追加してください。","agents.toggleOnHint":"このファイルから Foundry の指示を削除します。","agents.toggleOffHint":"Foundry の指示をこのファイルに書き込みます。","agents.emptyAssigned":"ここに指示をドラッグ","agents.loadingInstruction":"指示を読み込み中…","agents.openFileAria":"{{name}} の指示ファイルを開く","agents.reapplyAria":"{{name}} の指示を再書き込み","agents.toggleAria":"{{name}} に指示を適用","agents.removeInstructionAria":"この Agent から {{name}} を削除","sidebar.teams":"チーム","sidebar.addTeam":"チームを追加","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"エンタープライズ","sidebar.plan.startup":"スタートアップ","sidebar.plan.free":"無料","common.retry":"再試行","settings.downloadSkill":"Skill をダウンロード","settings.skillTargets":"インストール先","settings.aboutFoundrySkill":"Foundry Skill について","settings.foundrySkillHint":"Foundry Skill をダウンロードして、Agent に Foundry CLI を使った Foundry の操作方法を伝えます。","settings.downloadSkillDescription":"Foundry Agent Skill のインストール先を選択します。既存のコピーは置き換えられます。","settings.skillDownloaded":"Skill をインストールしました。","settings.errors.downloadSkill":"Skill をダウンロードできません。再試行してください。","settings.errors.skillTargets":"Skill の保存先を取得できません。再試行してください。","settings.downloadingSkill":"ダウンロード中…","timeZone.losAngeles":"ロサンゼルス","timeZone.newYork":"ニューヨーク","timeZone.shanghai":"上海","timeZone.taipei":"台北","timeZone.tokyo":"東京","timeZone.utc":"協定世界時(UTC)","dataImport.title":"データをインポート","dataImport.passphrase":"バックアップのパスフレーズ","dataImport.replaceAction":"上書きしてインポート","dataImport.replaceWarning":"現在の Foundry データはバックアップの内容で完全に置き換えられます。既存データとの結合は行われません。この操作は取り消せません。","dataImport.error":"データをインポートできませんでした。もう一度お試しください。","dataImport.invalidBackup":"バックアップが無効または未対応です。","dataImport.invalidPassphrase":"パスフレーズが違うか、バックアップが破損しています。","nav.settings":"設定","settings.workspace":"ワークスペース","settings.appearance":"外観","settings.appearanceAria":"外観設定","settings.languageRegion":"言語と地域","settings.languageRegionAria":"言語と地域の設定","settings.advanced":"詳細設定","settings.advancedAria":"詳細設定","settings.export":"エクスポート","dataExport.title":"データをエクスポート","dataExport.action":"エクスポート","dataExport.description":"Foundry のデータを暗号化したバックアップとしてダウンロードします。","dataExport.passphrase":"パスフレーズ","dataExport.confirmPassphrase":"パスフレーズの確認","dataExport.passphraseHint":"インポート時に必要なため、このパスフレーズを保管してください。復元はできません。","dataExport.passphraseMismatch":"パスフレーズが一致しません。","dataExport.exporting":"エクスポート中…","dataExport.exported":"バックアップのダウンロードを開始しました。","dataExport.error":"データをエクスポートできませんでした。もう一度お試しください。","common.cancel":"キャンセル","settings.import":"インポート","settings.configFolder":"設定フォルダー","settings.openFolder":"開く","settings.copyConfigFolder":"設定フォルダーのパスをコピー","settings.configFolderCopied":"設定フォルダーのパスをコピーしました","settings.errors.copyConfigFolder":"設定フォルダーのパスをコピーできませんでした。","settings.errors.openConfigFolder":"設定フォルダーを開けませんでした。","settings.language":"言語","settings.timeFormat":"時刻形式","settings.timeZone":"タイムゾーン","settings.colorTheme":"カラーテーマ","settings.navigation":"設定ナビゲーション","settings.openNavigation":"設定ナビゲーションを開く","settings.errors.load":"設定を読み込めませんでした。","settings.errors.theme":"カラーテーマを更新できませんでした。","settings.errors.language":"言語を更新できませんでした。","settings.errors.timeFormat":"時刻形式を更新できませんでした。","settings.errors.timeZone":"タイムゾーンを更新できませんでした。","common.system":"システム","theme.light":"ライト","theme.dark":"ダーク","a11y.goBack":"戻る","a11y.close":"閉じる","a11y.showPassword":"パスワードを表示","a11y.hidePassword":"パスワードを非表示","a11y.sidebar":"サイドバー","a11y.sidebarDescription":"モバイル用サイドバーを表示します。","a11y.toggleSidebar":"サイドバーを切り替える"},VB={"en-US":{translation:HB},"zh-CN":{translation:UB},"zh-TW":{translation:FB},"ja-JP":{translation:BB}};function qB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn(),s=[{value:"system",label:o("common.system")},...uA.map(u=>({value:u,label:_B[u]}))];return S.jsx(ji,{label:o("settings.language"),children:S.jsxs(ib,{items:s,value:e,onValueChange:u=>{u&&n(u)},disabled:a,children:[S.jsx(lb,{"aria-label":o("settings.language"),className:"w-52",children:S.jsx(sb,{})}),S.jsx(ub,{children:s.map(u=>S.jsx(cb,{value:u.value,children:u.label},u.value))})]})})}const YB=["YYYY-MM-DD HH:mm:ss","YYYY-MM-DD","YYYY/MM/DD HH:mm:ss","DD/MM/YYYY HH:mm:ss","MM/DD/YYYY hh:mm:ss A","HH:mm:ss"],KB=["America/Los_Angeles","America/New_York","Asia/Shanghai","Asia/Taipei","Asia/Tokyo","UTC"],GB=1,$B="settings.changed",BR=YB.map(e=>({value:e,label:e}));function XB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn();return S.jsx(ji,{label:o("settings.timeFormat"),children:S.jsxs(ib,{items:BR,value:e,onValueChange:s=>{s&&n(s)},disabled:a,children:[S.jsx(lb,{"aria-label":o("settings.timeFormat"),className:"w-52",children:S.jsx(sb,{})}),S.jsx(ub,{children:BR.map(s=>S.jsx(cb,{value:s.value,children:s.label},s.value))})]})})}const QB={"America/Los_Angeles":"timeZone.losAngeles","America/New_York":"timeZone.newYork","Asia/Shanghai":"timeZone.shanghai","Asia/Taipei":"timeZone.taipei","Asia/Tokyo":"timeZone.tokyo",UTC:"timeZone.utc"};function ZB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn(),s=KB.map(u=>({value:u,label:o(QB[u])}));return S.jsx(ji,{label:o("settings.timeZone"),children:S.jsxs(ib,{items:s,value:e,onValueChange:u=>{u&&n(u)},disabled:a,children:[S.jsx(lb,{"aria-label":o("settings.timeZone"),className:"w-52",children:S.jsx(sb,{})}),S.jsx(ub,{children:s.map(u=>S.jsx(cb,{value:u.value,children:u.label},u.value))})]})})}const xi=["settings"],nh=["settings","update"];function db(){const{t:e}=sn(),n=Bo(),a=KP({mutationKey:nh})>0,o=fp({queryKey:xi,queryFn:({signal:h})=>s7(h),staleTime:1/0,retry:!1}),s=Ma({mutationKey:nh,mutationFn:l7,onMutate:async h=>{await n.cancelQueries({queryKey:xi});const b=n.getQueryData(xi);return b&&n.setQueryData(xi,JB(b,h)),{previous:b}},onSuccess:h=>{n.setQueryData(xi,h)},onError:(h,b,x)=>{x?.previous&&n.setQueryData(xi,x.previous),_n.error(e(WB(b)))},onSettled:()=>n.invalidateQueries({queryKey:xi})}),u=o.data??null,c=u?.workspace.appearance["color-theme"]??"system",d=u?.workspace["language-region"].language??"system",p=u?.workspace["language-region"]["time-format"]??"YYYY-MM-DD HH:mm:ss",g=u?.workspace["language-region"]["time-zone"]??"America/Los_Angeles";function y(h){!u||n.isMutating({mutationKey:nh})>0||s.mutate(h)}return{settings:u,theme:c,language:d,timeFormat:p,timeZone:g,isLoading:o.isPending,isUpdating:a,setTheme:h=>{h!==c&&y({theme:h})},setLanguage:h=>{h!==d&&y({language:h})},setTimeFormat:h=>{h!==p&&y({timeFormat:h})},setTimeZone:h=>{h!==g&&y({timezone:h})}}}function JB(e,n){const a=e.workspace,o=a["language-region"];return{...e,workspace:{appearance:{"color-theme":n.theme??a.appearance["color-theme"]},"language-region":{language:n.language??o.language,"time-format":n.timeFormat??o["time-format"],"time-zone":n.timezone??o["time-zone"]}}}}function WB(e){return e.theme!==void 0?"settings.errors.theme":e.language!==void 0?"settings.errors.language":e.timeFormat!==void 0?"settings.errors.timeFormat":"settings.errors.timeZone"}const us=[{id:"appearance",labelKey:"settings.appearance",ariaKey:"settings.appearanceAria",icon:Jk},{id:"language-region",labelKey:"settings.languageRegion",ariaKey:"settings.languageRegionAria",icon:Kk},{id:"advanced",labelKey:"settings.advanced",ariaKey:"settings.advancedAria",icon:aP}];function e9(){const{t:e}=sn(),[n,a]=pz(),o=us.find(({id:O})=>O===n.get("panel"))?.id??us[0].id,s=O=>{a(M=>{const A=new URLSearchParams(M);return A.set("panel",O),A})},{settings:u,theme:c,language:d,timeFormat:p,timeZone:g,isLoading:y,isUpdating:h,setTheme:b,setLanguage:x,setTimeFormat:w,setTimeZone:C}=db(),R=us.find(O=>O.id===o)?.ariaKey??"settings.appearanceAria",T=us.find(O=>O.id===o)?.labelKey??"settings.appearance";return S.jsxs("div",{className:`
|
|
126
126
|
grid h-full min-h-0 grid-cols-[260px_minmax(0,1fr)]
|
|
127
127
|
max-[680px]:grid-cols-1
|
|
128
128
|
`,children:[S.jsx("aside",{className:`
|
|
@@ -131,9 +131,9 @@ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}
|
|
|
131
131
|
`,children:S.jsx(t9,{activeSection:o,onSectionChange:s})}),S.jsxs("section",{"aria-label":e(R),className:"min-h-0 overflow-y-auto p-4",children:[S.jsxs("div",{className:`
|
|
132
132
|
mb-3 flex items-center gap-3
|
|
133
133
|
min-[680px]:hidden
|
|
134
|
-
`,children:[S.jsxs(Pv,{children:[S.jsx(Lv,{render:S.jsx(nn,{type:"button",variant:"outline",size:"icon","aria-label":e("settings.openNavigation")}),children:S.jsx(
|
|
134
|
+
`,children:[S.jsxs(Pv,{children:[S.jsx(Lv,{render:S.jsx(nn,{type:"button",variant:"outline",size:"icon","aria-label":e("settings.openNavigation")}),children:S.jsx(Qk,{})}),S.jsx(zv,{side:"bottom",align:"start",sideOffset:8,"aria-label":e("settings.navigation"),className:"w-56",children:S.jsxs(wh,{children:[S.jsx(_v,{children:e("settings.workspace")}),S.jsx(e6,{value:o,onValueChange:O=>{const M=us.find(({id:A})=>A===O);M&&s(M.id)},children:us.map(({id:O,labelKey:M,icon:A})=>S.jsxs(t6,{value:O,closeOnClick:!0,children:[S.jsx(A,{}),e(M)]},O))})]})})]}),S.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:e(T)})]}),S.jsxs(Lo,{className:"gap-0 py-0",children:[y&&S.jsxs("div",{className:`
|
|
135
135
|
flex flex-col items-start gap-3 p-4
|
|
136
136
|
min-[680px]:min-h-16 min-[680px]:flex-row
|
|
137
137
|
min-[680px]:items-center min-[680px]:justify-between
|
|
138
138
|
min-[680px]:gap-8
|
|
139
|
-
`,children:[S.jsx(ca,{className:"h-4 w-24"}),S.jsxs("div",{className:"flex items-center gap-6",children:[S.jsx(ca,{className:"h-4 w-16"}),S.jsx(ca,{className:"h-4 w-10"}),S.jsx(ca,{className:"h-4 w-10"})]})]}),!y&&o==="appearance"&&S.jsx(nB,{value:c,onValueChange:O=>{b(O)},disabled:h||!u}),!y&&o==="language-region"&&S.jsxs("div",{className:"divide-y",children:[S.jsx(qB,{value:d,onValueChange:O=>{x(O)},disabled:h||!u}),S.jsx(ZB,{value:g,onValueChange:O=>{C(O)},disabled:h||!u}),S.jsx(XB,{value:p,onValueChange:O=>{w(O)},disabled:h||!u})]}),!y&&o==="advanced"&&S.jsxs("div",{className:"divide-y",children:[S.jsx(P7,{disabled:h||!u}),S.jsx(U7,{disabled:h||!u}),S.jsx(h7,{configFolder:u?.configFolder}),S.jsx(C7,{disabled:h||!u})]})]})]})]})}function t9({activeSection:e,onSectionChange:n}){const{t:a}=sn();return S.jsx("nav",{"aria-label":a("settings.navigation"),children:S.jsxs(Lo,{size:"sm",children:[S.jsx($U,{children:S.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:a("settings.workspace")})}),S.jsx(XU,{className:"flex flex-col gap-1",children:us.map(({id:o,labelKey:s,icon:u})=>{const c=o===e;return S.jsxs(nn,{type:"button",variant:c?"secondary":"ghost","aria-current":c?"page":void 0,onClick:()=>{n(o)},className:"w-full justify-start gap-2",children:[S.jsx(u,{className:c?void 0:"text-muted-foreground"}),S.jsx("span",{children:a(s)})]},o)})})]})})}dr.use(
|
|
139
|
+
`,children:[S.jsx(ca,{className:"h-4 w-24"}),S.jsxs("div",{className:"flex items-center gap-6",children:[S.jsx(ca,{className:"h-4 w-16"}),S.jsx(ca,{className:"h-4 w-10"}),S.jsx(ca,{className:"h-4 w-10"})]})]}),!y&&o==="appearance"&&S.jsx(nB,{value:c,onValueChange:O=>{b(O)},disabled:h||!u}),!y&&o==="language-region"&&S.jsxs("div",{className:"divide-y",children:[S.jsx(qB,{value:d,onValueChange:O=>{x(O)},disabled:h||!u}),S.jsx(ZB,{value:g,onValueChange:O=>{C(O)},disabled:h||!u}),S.jsx(XB,{value:p,onValueChange:O=>{w(O)},disabled:h||!u})]}),!y&&o==="advanced"&&S.jsxs("div",{className:"divide-y",children:[S.jsx(P7,{disabled:h||!u}),S.jsx(U7,{disabled:h||!u}),S.jsx(h7,{configFolder:u?.configFolder}),S.jsx(C7,{disabled:h||!u})]})]})]})]})}function t9({activeSection:e,onSectionChange:n}){const{t:a}=sn();return S.jsx("nav",{"aria-label":a("settings.navigation"),children:S.jsxs(Lo,{size:"sm",children:[S.jsx($U,{children:S.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:a("settings.workspace")})}),S.jsx(XU,{className:"flex flex-col gap-1",children:us.map(({id:o,labelKey:s,icon:u})=>{const c=o===e;return S.jsxs(nn,{type:"button",variant:c?"secondary":"ghost","aria-current":c?"page":void 0,onClick:()=>{n(o)},className:"w-full justify-start gap-2",children:[S.jsx(u,{className:c?void 0:"text-muted-foreground"}),S.jsx("span",{children:a(s)})]},o)})})]})})}dr.use(d8).init({resources:VB,lng:cA(),fallbackLng:"en-US",supportedLngs:[...uA],keySeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});function cA(){const e=new Intl.DateTimeFormat().resolvedOptions().locale.toLowerCase();return e.startsWith("zh-tw")||e.startsWith("zh-hk")||e.startsWith("zh-mo")||e.startsWith("zh-hant")?"zh-TW":e.startsWith("zh")?"zh-CN":e.startsWith("ja")?"ja-JP":"en-US"}function n9(){const e=Bo();v.useEffect(()=>{const n=new EventSource("/api/events"),a=()=>{e.invalidateQueries({queryKey:xi,refetchType:e.isMutating({mutationKey:nh})>0?"none":"active"})},o=s=>{try{const u=JSON.parse(s.data);typeof u=="object"&&u!==null&&"version"in u&&u.version===GB&&"type"in u&&u.type===$B&&a()}catch{}};return n.addEventListener("open",a),n.addEventListener("foundry",o),()=>{n.removeEventListener("open",a),n.removeEventListener("foundry",o),n.close()}},[e])}const jy=matchMedia("(prefers-color-scheme: dark)");function r9(e){return jy.addEventListener("change",e),()=>jy.removeEventListener("change",e)}function a9(){return jy.matches?"dark":"light"}function o9({children:e}){n9();const{theme:n,language:a}=db(),o=v.useSyncExternalStore(r9,a9),s=n==="system"?o:n,u=a==="system"?cA():a;return v.useLayoutEffect(()=>{const c=document.documentElement;c.classList.toggle("dark",s==="dark"),c.style.colorScheme=s},[s]),v.useLayoutEffect(()=>{dr.changeLanguage(u),document.documentElement.lang=u},[u]),e}const i9=new kP({queryCache:new vT({onError:(e,n)=>{n.queryKey[0]==="skill-targets"?_n.error(dr.t("settings.errors.skillTargets")):n.queryKey[0]==="settings"&&_n.error(dr.t("settings.errors.load"))}})});function s9(){return null}const l9=lz([{element:S.jsx(J8,{}),children:G8.map(e=>({path:e,element:e==="/library/instructions"?S.jsx(a7,{}):S.jsx(s9,{})}))},{element:S.jsx(W8,{}),children:[{path:"/settings",element:S.jsx(e9,{}),handle:{backTo:"/dashboard"}}]},{path:"*",element:S.jsx(LL,{to:"/dashboard",replace:!0})}]);function u9(){return S.jsx(uP,{client:i9,children:S.jsx(Bj,{children:S.jsx(o9,{children:S.jsx(c9,{})})})})}function c9(){const{theme:e}=db();return S.jsxs(S.Fragment,{children:[S.jsx(xz,{router:l9}),S.jsx(lP,{theme:e})]})}XN.createRoot(document.getElementById("root")).render(S.jsx(v.StrictMode,{children:S.jsx(u9,{})}));export{Ne as W,JF as _,S as j,v as r,sn as u};
|