@dhzh/foundry 11.1.0 → 11.2.1
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.
- package/README.md +2 -0
- package/dist/index.mjs +8 -8
- package/dist/skills/foundry/SKILL.md +1 -1
- package/dist/skills/foundry/references/agents.md +1 -1
- package/dist/skills/foundry/references/skills.md +7 -0
- package/dist/web/assets/{code-editor-BLV7kBvd.js → code-editor-DPhX4AH6.js} +3 -3
- package/dist/web/assets/{freemarker2-Co03aady.js → freemarker2-Bc9HflFJ.js} +1 -1
- package/dist/web/assets/{handlebars-D13u43fU.js → handlebars-DR6-VBzX.js} +1 -1
- package/dist/web/assets/{html-99qniDkp.js → html-U1MNdbA5.js} +1 -1
- package/dist/web/assets/index-CImNq_-o.css +1 -0
- package/dist/web/assets/index-COCzhlLZ.js +257 -0
- package/dist/web/assets/{javascript-blyYBaQ_.js → javascript-9ozWcIzY.js} +1 -1
- package/dist/web/assets/{jsonMode-BRAf7thr.js → jsonMode-IZrrA8Ei.js} +1 -1
- package/dist/web/assets/{liquid-CYmDvMEA.js → liquid-8GENz1ov.js} +1 -1
- package/dist/web/assets/{mdx-BRAebpb_.js → mdx-BuK-gWFV.js} +1 -1
- package/dist/web/assets/{python-BqkCF7Yt.js → python-Bdc4U4B2.js} +1 -1
- package/dist/web/assets/{razor-DKnNIUnY.js → razor-CjV5pSPO.js} +1 -1
- package/dist/web/assets/{typescript-BQMBetT5.js → typescript-BP-EmJCQ.js} +1 -1
- package/dist/web/assets/{xml-BEEzuT5O.js → xml-BMpoI2wr.js} +1 -1
- package/dist/web/assets/{yaml-CAPgFTfU.js → yaml-BfvOXRkr.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-CLgPnrAm.css +0 -1
- package/dist/web/assets/index-Cij2fBcr.js +0 -254
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-editor-BLV7kBvd.js","assets/code-editor-DMeNDIaI.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
function vj(e,t){for(var i=0;i<t.length;i++){const s=t[i];if(typeof s!="string"&&!Array.isArray(s)){for(const o in s)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(s,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>s[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function i(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=i(o);fetch(o.href,l)}})();function VC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var V0={exports:{}},uu={};var iw;function bj(){if(iw)return uu;iw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(s,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:e,type:s,key:u,ref:o!==void 0?o:null,props:l}}return uu.Fragment=t,uu.jsx=i,uu.jsxs=i,uu}var sw;function xj(){return sw||(sw=1,V0.exports=bj()),V0.exports}var v=xj(),K0={exports:{}},Mt={};var aw;function Sj(){if(aw)return Mt;aw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),x=Symbol.for("react.view_transition"),S=Symbol.iterator;function w(I){return I===null||typeof I!="object"?null:(I=S&&I[S]||I["@@iterator"],typeof I=="function"?I:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function O(I,V,W){this.props=I,this.context=V,this.refs=C,this.updater=W||R}O.prototype.isReactComponent={},O.prototype.setState=function(I,V){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,V,"setState")},O.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function k(){}k.prototype=O.prototype;function A(I,V,W){this.props=I,this.context=V,this.refs=C,this.updater=W||R}var N=A.prototype=new k;N.constructor=A,E(N,O.prototype),N.isPureReactComponent=!0;var j=Array.isArray;function D(){}var M={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function L(I,V,W){var re=W.ref;return{$$typeof:e,type:I,key:V,ref:re!==void 0?re:null,props:W}}function q(I,V){return L(I.type,V,I.props)}function X(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function B(I){var V={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(W){return V[W]})}var H=/\/+/g;function U(I,V){return typeof I=="object"&&I!==null&&I.key!=null?B(""+I.key):V.toString(36)}function z(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(D,D):(I.status="pending",I.then(function(V){I.status==="pending"&&(I.status="fulfilled",I.value=V)},function(V){I.status==="pending"&&(I.status="rejected",I.reason=V)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function Q(I,V,W,re,Ee){var le=typeof I;(le==="undefined"||le==="boolean")&&(I=null);var me=!1;if(I===null)me=!0;else switch(le){case"bigint":case"string":case"number":me=!0;break;case"object":switch(I.$$typeof){case e:case t:me=!0;break;case m:return me=I._init,Q(me(I._payload),V,W,re,Ee)}}if(me)return Ee=Ee(I),me=re===""?"."+U(I,0):re,j(Ee)?(W="",me!=null&&(W=me.replace(H,"$&/")+"/"),Q(Ee,V,W,"",function(Te){return Te})):Ee!=null&&(X(Ee)&&(Ee=q(Ee,W+(Ee.key==null||I&&I.key===Ee.key?"":(""+Ee.key).replace(H,"$&/")+"/")+me)),V.push(Ee)),1;me=0;var ge=re===""?".":re+":";if(j(I))for(var ue=0;ue<I.length;ue++)re=I[ue],le=ge+U(re,ue),me+=Q(re,V,W,le,Ee);else if(ue=w(I),typeof ue=="function")for(I=ue.call(I),ue=0;!(re=I.next()).done;)re=re.value,le=ge+U(re,ue++),me+=Q(re,V,W,le,Ee);else if(le==="object"){if(typeof I.then=="function")return Q(z(I),V,W,re,Ee);throw V=String(I),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return me}function $(I,V,W){if(I==null)return I;var re=[],Ee=0;return Q(I,re,"","",function(le){return V.call(W,le,Ee++)}),re}function K(I){if(I._status===-1){var V=I._result,W=V();W.then(function(re){(I._status===0||I._status===-1)&&(I._status=1,I._result=re,W.status===void 0&&(W.status="fulfilled",W.value=re))},function(re){(I._status===0||I._status===-1)&&(I._status=2,I._result=re,W.status===void 0&&(W.status="rejected",W.reason=re))}),I._status===-1&&(I._status=0,I._result=W)}if(I._status===1)return I._result.default;throw I._result}var Y=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)};function ee(I){var V=M.T,W={};W.types=V!==null?V.types:null,M.T=W;try{var re=I(),Ee=M.S;Ee!==null&&Ee(W,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(D,Y)}catch(le){Y(le)}finally{V!==null&&W.types!==null&&(V.types=W.types),M.T=V}}function G(I){var V=M.T;if(V!==null){var W=V.types;W===null?V.types=[I]:W.indexOf(I)===-1&&W.push(I)}else ee(G.bind(null,I))}var oe={map:$,forEach:function(I,V,W){$(I,function(){V.apply(this,arguments)},W)},count:function(I){var V=0;return $(I,function(){V++}),V},toArray:function(I){return $(I,function(V){return V})||[]},only:function(I){if(!X(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Mt.Activity=h,Mt.Children=oe,Mt.Component=O,Mt.Fragment=i,Mt.Profiler=o,Mt.PureComponent=A,Mt.StrictMode=s,Mt.Suspense=f,Mt.ViewTransition=x,Mt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Mt.__COMPILER_RUNTIME={__proto__:null,c:function(I){return M.H.useMemoCache(I)}},Mt.addTransitionType=G,Mt.cache=function(I){return function(){return I.apply(null,arguments)}},Mt.cacheSignal=function(){return null},Mt.cloneElement=function(I,V,W){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var re=E({},I.props),Ee=I.key;if(V!=null)for(le in V.key!==void 0&&(Ee=""+V.key),V)!_.call(V,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&V.ref===void 0||(re[le]=V[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 L(I.type,Ee,re)},Mt.createContext=function(I){return I={$$typeof:u,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:l,_context:I},I},Mt.createElement=function(I,V,W){var re,Ee={},le=null;if(V!=null)for(re in V.key!==void 0&&(le=""+V.key),V)_.call(V,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(Ee[re]=V[re]);var me=arguments.length-2;if(me===1)Ee.children=W;else if(1<me){for(var ge=Array(me),ue=0;ue<me;ue++)ge[ue]=arguments[ue+2];Ee.children=ge}if(I&&I.defaultProps)for(re in me=I.defaultProps,me)Ee[re]===void 0&&(Ee[re]=me[re]);return L(I,le,Ee)},Mt.createRef=function(){return{current:null}},Mt.forwardRef=function(I){return{$$typeof:d,render:I}},Mt.isValidElement=X,Mt.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:K}},Mt.memo=function(I,V){return{$$typeof:g,type:I,compare:V===void 0?null:V}},Mt.startTransition=ee,Mt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Mt.use=function(I){return M.H.use(I)},Mt.useActionState=function(I,V,W){return M.H.useActionState(I,V,W)},Mt.useCallback=function(I,V){return M.H.useCallback(I,V)},Mt.useContext=function(I){return M.H.useContext(I)},Mt.useDebugValue=function(){},Mt.useDeferredValue=function(I,V){return M.H.useDeferredValue(I,V)},Mt.useEffect=function(I,V){return M.H.useEffect(I,V)},Mt.useEffectEvent=function(I){return M.H.useEffectEvent(I)},Mt.useId=function(){return M.H.useId()},Mt.useImperativeHandle=function(I,V,W){return M.H.useImperativeHandle(I,V,W)},Mt.useInsertionEffect=function(I,V){return M.H.useInsertionEffect(I,V)},Mt.useLayoutEffect=function(I,V){return M.H.useLayoutEffect(I,V)},Mt.useMemo=function(I,V){return M.H.useMemo(I,V)},Mt.useOptimistic=function(I,V){return M.H.useOptimistic(I,V)},Mt.useReducer=function(I,V,W){return M.H.useReducer(I,V,W)},Mt.useRef=function(I){return M.H.useRef(I)},Mt.useState=function(I){return M.H.useState(I)},Mt.useSyncExternalStore=function(I,V,W){return M.H.useSyncExternalStore(I,V,W)},Mt.useTransition=function(){return M.H.useTransition()},Mt.version="19.3.1",Mt}var ow;function Qu(){return ow||(ow=1,K0.exports=Sj()),K0.exports}var b=Qu();const Ne=VC(b),KC=vj({__proto__:null,default:Ne},[b]);var q0={exports:{}},du={},Y0={exports:{}},G0={};var lw;function wj(){return lw||(lw=1,(function(e){function t(z,Q){var $=z.length;z.push(Q);e:for(;0<$;){var K=$-1>>>1,Y=z[K];if(0<o(Y,Q))z[K]=Q,z[$]=Y,$=K;else break e}}function i(z){return z.length===0?null:z[0]}function s(z){if(z.length===0)return null;var Q=z[0],$=z.pop();if($!==Q){z[0]=$;e:for(var K=0,Y=z.length,ee=Y>>>1;K<ee;){var G=2*(K+1)-1,oe=z[G],I=G+1,V=z[I];if(0>o(oe,$))I<Y&&0>o(V,oe)?(z[K]=V,z[I]=$,K=I):(z[K]=oe,z[G]=$,K=G);else if(I<Y&&0>o(V,$))z[K]=V,z[I]=$,K=I;else break e}}return Q}function o(z,Q){var $=z.sortIndex-Q.sortIndex;return $!==0?$:z.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],g=[],m=1,h=null,x=3,S=!1,w=!1,R=!1,E=!1,C=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function A(z){for(var Q=i(g);Q!==null;){if(Q.callback===null)s(g);else if(Q.startTime<=z)s(g),Q.sortIndex=Q.expirationTime,t(f,Q);else break;Q=i(g)}}function N(z){if(R=!1,A(z),!w)if(i(f)!==null)w=!0,j||(j=!0,X());else{var Q=i(g);Q!==null&&U(N,Q.startTime-z)}}var j=!1,D=-1,M=5,_=-1;function L(){return E?!0:!(e.unstable_now()-_<M)}function q(){if(E=!1,j){var z=e.unstable_now();_=z;var Q=!0;try{e:{w=!1,R&&(R=!1,O(D),D=-1),S=!0;var $=x;try{t:{for(A(z),h=i(f);h!==null&&!(h.expirationTime>z&&L());){var K=h.callback;if(typeof K=="function"){h.callback=null,x=h.priorityLevel;var Y=K(h.expirationTime<=z);if(z=e.unstable_now(),typeof Y=="function"){h.callback=Y,A(z),Q=!0;break t}h===i(f)&&s(f),A(z)}else s(f);h=i(f)}if(h!==null)Q=!0;else{var ee=i(g);ee!==null&&U(N,ee.startTime-z),Q=!1}}break e}finally{h=null,x=$,S=!1}Q=void 0}}finally{Q?X():j=!1}}}var X;if(typeof k=="function")X=function(){k(q)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,H=B.port2;B.port1.onmessage=q,X=function(){H.postMessage(null)}}else X=function(){C(q,0)};function U(z,Q){D=C(function(){z(e.unstable_now())},Q)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(z){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var $=x;x=Q;try{return z()}finally{x=$}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(z,Q){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var $=x;x=z;try{return Q()}finally{x=$}},e.unstable_scheduleCallback=function(z,Q,$){var K=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?K+$:K):$=K,z){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=$+Y,z={id:m++,callback:Q,priorityLevel:z,startTime:$,expirationTime:Y,sortIndex:-1},$>K?(z.sortIndex=$,t(g,z),i(f)===null&&z===i(g)&&(R?(O(D),D=-1):R=!0,U(N,$-K))):(z.sortIndex=Y,t(f,z),w||S||(w=!0,j||(j=!0,X()))),z},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(z){var Q=x;return function(){var $=x;x=Q;try{return z.apply(this,arguments)}finally{x=$}}}})(G0)),G0}var cw;function Ej(){return cw||(cw=1,Y0.exports=wj()),Y0.exports}var $0={exports:{}},Er={};var uw;function Cj(){if(uw)return Er;uw=1;var e=Qu();function t(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)h+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal"),l=Symbol.for("react.recoverable"),u=Symbol.for("react.optimistic_key");function d(m,h,x){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:S==null?null:S===u?u:""+S,children:m,containerInfo:h,implementation:x}}var f=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Er.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Er.browser=function(m){return{$$typeof:l,_reason:m}},Er.createPortal=function(m,h){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return d(m,h,null,x)},Er.flushSync=function(m){var h=f.T,x=s.p;try{if(f.T=null,s.p=2,m)return m()}finally{f.T=h,s.p=x,s.d.f()}},Er.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,s.d.C(m,h))},Er.prefetchDNS=function(m){typeof m=="string"&&s.d.D(m)},Er.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var x=h.as,S=g(x,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,R=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;x==="style"?s.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:S,integrity:w,fetchPriority:R}):x==="script"&&s.d.X(m,{crossOrigin:S,integrity:w,fetchPriority:R,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Er.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var x=g(h.as,h.crossOrigin);s.d.M(m,{crossOrigin:x,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&&s.d.M(m)},Er.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var x=h.as,S=g(x,h.crossOrigin);s.d.L(m,x,{crossOrigin:S,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})}},Er.preloadModule=function(m,h){if(typeof m=="string")if(h){var x=g(h.as,h.crossOrigin);s.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:x,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 s.d.m(m)},Er.requestFormReset=function(m){s.d.r(m)},Er.unstable_batchedUpdates=function(m,h){return m(h)},Er.useFormState=function(m,h,x){return f.H.useFormState(m,h,x)},Er.useFormStatus=function(){return f.H.useHostTransitionStatus()},Er.version="19.3.1",Er}var dw;function qC(){if(dw)return $0.exports;dw=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(t){console.error(t)}}return e(),$0.exports=Cj(),$0.exports}var fw;function Rj(){if(fw)return du;fw=1;var e=Ej(),t=Qu(),i=qC();function s(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){for(var r=n,a=r;a&&!a.alternate;)r=a,(r.flags&4098)!==0&&(n=r.return),a=r.return;for(;r.return;)r=r.return;return r.tag===3?n:null}function u(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(l(n)!==n)throw Error(s(188))}function g(n){var r=n.alternate;if(!r){if(r=l(n),r===null)throw Error(s(188));return r!==n?null:n}for(var a=n,c=r;;){var p=a.return;if(p===null)break;var y=p.alternate;if(y===null){if(c=p.return,c!==null){a=c;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===a)return f(p),n;if(y===c)return f(p),r;y=y.sibling}throw Error(s(188))}if(a.return!==c.return)a=p,c=y;else{for(var T=!1,P=p.child;P;){if(P===a){T=!0,a=p,c=y;break}if(P===c){T=!0,c=p,a=y;break}P=P.sibling}if(!T){for(P=y.child;P;){if(P===a){T=!0,a=y,c=p;break}if(P===c){T=!0,c=y,a=p;break}P=P.sibling}if(!T)throw Error(s(189))}}if(a.alternate!==c)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?n:r}function m(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=m(n),r!==null)return r;n=n.sibling}return null}function h(n,r,a,c,p,y){for(;n!==null;){if((n.tag===5||n.tag===27||n.tag===6)&&a(n,c,p,y)||(n.tag!==22||n.memoizedState===null)&&(r||n.tag!==5&&n.tag!==27)&&h(n.child,r,a,c,p,y))return!0;n=n.sibling}return!1}function x(n){for(n=n.return;n!==null;){if(n.tag===3||n.tag===5||n.tag===27)return n;n=n.return}return null}function S(n){var r=!1;for(n=n.return;n!==null&&(n.tag===4&&(r=!0),!(n.tag===3||n.tag===5||n.tag===27));)n=n.return;return r}function w(n){var r=[null,null],a=x(n);return a===null||R(r,n,a.child,{foundSelf:!1}),r}function R(n,r,a,c){for(;a!==null;){if(a===r)c.foundSelf=!0;else if(a.tag===5||a.tag===27||a.tag===6){if(c.foundSelf)return n[1]=a,!0;n[0]=a}else if((a.tag!==22||a.memoizedState===null)&&R(n,r,a.child,c))return!0;a=a.sibling}return!1}function E(n){switch(n.tag){case 5:case 27:case 6:return n.stateNode;case 3:return n.stateNode.containerInfo;default:throw Error(s(559))}}var C=null,O=null;function k(n,r,a){return n===a?!0:n===r?(C=n,!0):!1}function A(n,r,a){return n===a?(O=n,!1):n===r?(O!==null&&(C=n),!0):!1}function N(n){if(n===null)return null;do n=n===null?null:n.return;while(n&&n.tag!==5&&n.tag!==27&&n.tag!==3);return n||null}function j(n,r,a){for(var c=0,p=n;p;p=a(p))c++;p=0;for(var y=r;y;y=a(y))p++;for(;0<c-p;)n=a(n),c--;for(;0<p-c;)r=a(r),p--;for(;c--;){if(n===r||r!==null&&n===r.alternate)return n;n=a(n),r=a(r)}return null}var D=Object.assign,M=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),U=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),G=Symbol.for("react.legacy_hidden"),oe=Symbol.for("react.memo_cache_sentinel"),I=Symbol.for("react.view_transition"),V=Symbol.for("react.recoverable"),W=Symbol.iterator;function re(n){return n===null||typeof n!="object"?null:(n=W&&n[W]||n["@@iterator"],typeof n=="function"?n:null)}var Ee=Symbol.for("react.client.reference");function le(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Ee?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case q:return"Fragment";case B:return"Profiler";case X:return"StrictMode";case Q:return"Suspense";case $:return"SuspenseList";case ee:return"Activity";case I:return"ViewTransition"}if(typeof n=="object")switch(n.$$typeof){case L:return"Portal";case U:return n.displayName||"Context";case H:return(n._context.displayName||"Context")+".Consumer";case z:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case K:return r=n.displayName||null,r!==null?r:le(n.type)||"Memo";case Y:r=n._payload,n=n._init;try{return le(n(r))}catch{}}return null}var me=Array.isArray,ge=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Te={pending:!1,data:null,method:null,action:null},ve=[],Pe=-1;function Oe(n){return{current:n}}function Le(n){0>Pe||(n.current=ve[Pe],ve[Pe]=null,Pe--)}function Ve(n,r){Pe++,ve[Pe]=n.current,n.current=r}var ke=Oe(null),Ue=Oe(null),be=Oe(null),He=Oe(null);function Ze(n,r){switch(Ve(be,r),Ve(Ue,n),Ve(ke,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?hS(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=hS(r),n=pS(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Le(ke),Ve(ke,n)}function ot(){Le(ke),Le(Ue),Le(be)}function de(n){var r=n.memoizedState;r!==null&&(Ml._currentValue=r.memoizedState,Ve(He,n)),r=ke.current;var a=pS(r,n.type);r!==a&&(Ve(Ue,n),Ve(ke,a))}function we(n){Ue.current===n&&(Le(ke),Le(Ue)),He.current===n&&(Le(He),Ml._currentValue=Te)}var Ge,Me;function De(n){if(Ge===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);Ge=r&&r[1]||"",Me=-1<a.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+Ge+n+Me}var bt=!1;function dt(n,r){if(!n||bt)return"";bt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var Re=function(){throw Error()};if(Object.defineProperty(Re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Re,[])}catch(Ye){var ie=Ye}Reflect.construct(n,[],Re)}else{try{Re.call()}catch(Ye){ie=Ye}Re=!1;try{var fe=Object.getOwnPropertyDescriptor(n.prototype,"props");Object.defineProperty(n.prototype,"props",{configurable:!0,set:function(){throw Error()}}),Re=!0,new n}finally{Re&&(fe!==void 0?Object.defineProperty(n.prototype,"props",fe):delete n.prototype.props)}}}else{try{throw Error()}catch(Ye){ie=Ye}(Re=n())&&typeof Re.catch=="function"&&Re.catch(function(){})}}catch(Ye){if(Ye&&ie&&typeof Ye.stack=="string")return[Ye.stack,ie.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=c.DetermineComponentFrameRoot(),T=y[0],P=y[1];if(T&&P){var Z=T.split(`
|
|
5
|
-
`),ae=P.split(`
|
|
6
|
-
`);for(p=c=0;c<Z.length&&!Z[c].includes("DetermineComponentFrameRoot");)c++;for(;p<ae.length&&!ae[p].includes("DetermineComponentFrameRoot");)p++;if(c===Z.length||p===ae.length)for(c=Z.length-1,p=ae.length-1;1<=c&&0<=p&&Z[c]!==ae[p];)p--;for(;1<=c&&0<=p;c--,p--)if(Z[c]!==ae[p]){if(c!==1||p!==1)do if(c--,p--,0>p||Z[c]!==ae[p]){var pe=`
|
|
7
|
-
`+Z[c].replace(" at new "," at ");return n.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",n.displayName)),pe}while(1<=c&&0<=p);break}}}finally{bt=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?De(a):""}function gt(n,r){switch(n.tag){case 26:case 27:case 5:return De(n.type);case 16:return De("Lazy");case 13:return n.child!==r&&r!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return dt(n.type,!1);case 11:return dt(n.type.render,!1);case 1:return dt(n.type,!0);case 31:return De("Activity");case 30:return De("ViewTransition");default:return""}}function Nt(n){try{var r="",a=null;do r+=gt(n,a),a=n,n=n.return;while(n);return r}catch(c){return`
|
|
8
|
-
Error generating stack: `+c.message+`
|
|
9
|
-
`+c.stack}}var jt=Object.prototype.hasOwnProperty,tn=e.unstable_scheduleCallback,an=e.unstable_cancelCallback,nn=e.unstable_shouldYield,We=e.unstable_requestPaint,wt=e.unstable_now,Zt=e.unstable_getCurrentPriorityLevel,ht=e.unstable_ImmediatePriority,xt=e.unstable_UserBlockingPriority,yt=e.unstable_NormalPriority,Ut=e.unstable_LowPriority,un=e.unstable_IdlePriority,je=e.log,at=e.unstable_setDisableYieldValue,Ie=null,ze=null;function $e(n){if(typeof je=="function"&&at(n),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(Ie,n)}catch{}}var et=Math.clz32?Math.clz32:J,Tt=Math.log,F=Math.LN2;function J(n){return n>>>=0,n===0?32:31-(Tt(n)/F|0)|0}var ne=256,ye=262144,xe=4194304;function qe(n){var r=n&42;if(r!==0)return r;switch(n&-n){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 n&-n;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Ke(n,r,a){var c=n.pendingLanes;if(c===0)return 0;var p=0,y=n.suspendedLanes,T=n.pingedLanes;n=n.warmLanes;var P=c&134217727;return P!==0?(c=P&~y,c!==0?p=qe(c):(T&=P,T!==0?p=qe(T):a||(a=P&~n,a!==0&&(p=qe(a))))):(P=c&~y,P!==0?p=qe(P):T!==0?p=qe(T):a||(a=c&~n,a!==0&&(p=qe(a)))),p===0?0:r!==0&&r!==p&&(r&y)===0&&(y=p&-p,a=r&-r,y>=a||y===32&&(a&4194048)!==0)?r:p}function Xe(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function Qe(n,r){(r&8)!==0&&(r|=r&32);var a=n.entangledLanes;if(a!==0)for(n=n.entanglements,a&=r;0<a;){var c=31-et(a),p=1<<c;r|=n[c],a&=~p}return r}function lt(n,r){switch(n){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 n=xe;return xe<<=1,(xe&62914560)===0&&(xe=4194304),n}function Et(n){for(var r=[],a=0;31>a;a++)r.push(n);return r}function ft(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function qt(n,r,a,c,p,y){var T=n.pendingLanes;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0;var P=n.entanglements,Z=n.expirationTimes,ae=n.hiddenUpdates;for(a=T&~a;0<a;){var pe=31-et(a),Re=1<<pe;P[pe]=0,Z[pe]=-1;var ie=ae[pe];if(ie!==null)for(ae[pe]=null,pe=0;pe<ie.length;pe++){var fe=ie[pe];fe!==null&&(fe.lane&=-536870913)}a&=~Re}c!==0&&Bt(n,c,0),y!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=y&~(T&~r))}function Bt(n,r,a){n.pendingLanes|=r,n.suspendedLanes&=~r;var c=31-et(r);n.entangledLanes|=r,n.entanglements[c]=n.entanglements[c]|1073741824|a&261930}function On(n,r){var a=n.entangledLanes|=r;for(n=n.entanglements;a;){var c=31-et(a),p=1<<c;p&r|n[c]&r&&(n[c]|=r),a&=~p}}function Yt(n,r){var a=r&-r;return a=(a&42)!==0?1:Vt(a),(a&(n.suspendedLanes|r))!==0?0:a}function Vt(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Rn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Tn(){var n=ue.p;return n!==0?n:(n=window.event,n===void 0?32:ZS(n.type))}function ni(n,r){var a=ue.p;try{return ue.p=n,r()}finally{ue.p=a}}var dn=Math.random().toString(36).slice(2),fn="__reactFiber$"+dn,An="__reactProps$"+dn,jn="__reactContainer$"+dn,Os="__reactEvents$"+dn,Ir="__reactListeners$"+dn,_i="__reactHandles$"+dn,ri="__reactResources$"+dn,xi="__reactMarker$"+dn,zt="__reactLoad$"+dn;function qn(n){delete n[fn],delete n[An],delete n[Ir],delete n[_i]}function Fn(n){var r;if(r=n[fn])return r;for(var a=n.parentNode;a;){if(r=a[jn]||a[fn]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(n=NS(n);n!==null;){if(a=n[fn])return a;n=NS(n)}return r}n=a,a=n.parentNode}return null}function gr(n){if(n=n[fn]||n[jn]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function he(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(s(33))}function Ae(n){var r=n[ri];return r||(r=n[ri]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Se(n){n[xi]=!0}function rt(n){n[zt]=void 0}var Ot=new Set,Ct={};function Ht(n,r){xn(n,r),xn(n+"Capture",r)}function xn(n,r){for(Ct[n]=r,n=0;n<r.length;n++)Ot.add(r[n])}var hn=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]*$"),vt={},Dt={};function on(n){return jt.call(Dt,n)?!0:jt.call(vt,n)?!1:hn.test(n)?Dt[n]=!0:(vt[n]=!0,!1)}var mt=!1;function rr(){var n=mt;return mt=!1,n}function zn(n,r,a){if(on(r))if(a===null)n.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,a)}}function ii(n,r,a){if(a===null)n.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,a)}}function Gn(n,r,a,c){if(c===null)n.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(r,a,c)}}function $n(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function $o(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function bc(n,r,a){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,y=c.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return p.call(this)},set:function(T){a=""+T,y.call(this,T)}}),Object.defineProperty(n,r,{enumerable:c.enumerable}),{getValue:function(){return a},setValue:function(T){a=""+T},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function As(n){if(!n._valueTracker){var r=$o(n)?"checked":"value";n._valueTracker=bc(n,r,""+n[r])}}function Qo(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return n&&(c=$o(n)?n.checked?"true":"false":n.value),n=c,n!==a?(r.setValue(n),!0):!1}var Ad=/[\n"\\]/g;function Dn(n){return n.replace(Ad,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Tr(n,r,a,c,p,y,T,P){n.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?n.type=T:n.removeAttribute("type"),r!=null?T==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+$n(r)):n.value!==""+$n(r)&&(n.value=""+$n(r)):T!=="submit"&&T!=="reset"||n.removeAttribute("value"),r!=null?T==="number"&&n.value==r?Xo(n,$n(n.value)):Xo(n,$n(r)):a!=null?Xo(n,$n(a)):c!=null&&n.removeAttribute("value"),p==null&&y!=null&&(n.defaultChecked=!!y),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?n.name=""+$n(P):n.removeAttribute("name")}function sa(n,r,a,c,p,y,T,P){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),r!=null||a!=null){if(!(y!=="submit"&&y!=="reset"||r!=null)){As(n);return}a=a!=null?""+$n(a):"",r=r!=null?""+$n(r):a,P||r===n.value||(n.value=r),n.defaultValue=r}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=P?n.checked:!!c,n.defaultChecked=!!c,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(n.name=T),As(n)}function Xo(n,r){n.defaultValue!==""+r&&(n.defaultValue=""+r)}function qr(n,r,a,c){if(n=n.options,r){r={};for(var p=0;p<a.length;p++)r["$"+a[p]]=!0;for(a=0;a<n.length;a++)p=r.hasOwnProperty("$"+n[a].value),n[a].selected!==p&&(n[a].selected=p),p&&c&&(n[a].defaultSelected=!0)}else{for(a=""+$n(a),r=null,p=0;p<n.length;p++){if(n[p].value===a){n[p].selected=!0,c&&(n[p].defaultSelected=!0);return}r!==null||n[p].disabled||(r=n[p])}r!==null&&(r.selected=!0)}}function Zo(n,r,a){if(r!=null&&(r=""+$n(r),r!==n.value&&(n.value=r),a==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=a!=null?""+$n(a):""}function si(n,r,a,c){if(r==null){if(c!=null){if(a!=null)throw Error(s(92));if(me(c)){if(1<c.length)throw Error(s(93));c=c[0]}a=c}a==null&&(a=""),r=a}a=$n(r),n.defaultValue=a,c=n.textContent,c===a&&c!==""&&c!==null&&(n.value=c),As(n)}function Pr(n,r){if(r){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=r;return}}n.textContent=r}var aa=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 xc(n,r,a){var c=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":c?n.setProperty(r,a):typeof a!="number"||a===0||aa.has(r)?r==="float"?n.cssFloat=a:n[r]=(""+a).trim():n[r]=a+"px"}function ai(n,r,a){if(r!=null&&typeof r!="object")throw Error(s(62));if(n=n.style,a!=null){for(var c in a)!a.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="",mt=!0);for(var p in r)c=r[p],r.hasOwnProperty(p)&&a[p]!==c&&(xc(n,p,c),mt=!0)}else for(var y in r)r.hasOwnProperty(y)&&xc(n,y,r[y])}function Ja(n){if(n.indexOf("-")===-1)return!1;switch(n){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 Sc=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"]]),wc=/^[\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 mr(n){return wc.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Lr(){}var Wa=null;function eo(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var rn=null,or=null;function Si(n){var r=gr(n);if(r&&(n=r.stateNode)){var a=n[An]||null;e:switch(n=r.stateNode,r.type){case"input":if(Tr(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Dn(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==n&&c.form===n.form){var p=c[An]||null;if(!p)throw Error(s(90));Tr(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<a.length;r++)c=a[r],c.form===n.form&&Qo(c)}break e;case"textarea":Zo(n,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&qr(n,!!a.multiple,r,!1)}}}var oi=!1;function to(n,r,a){if(oi)return n(r,a);oi=!0;try{var c=n(r);return c}finally{if(oi=!1,(rn!==null||or!==null)&&(Mf(),rn&&(r=rn,n=or,or=rn=null,Si(r),n)))for(r=0;r<n.length;r++)Si(n[r])}}function Ms(n,r){var a=n.stateNode;if(a===null)return null;var c=a[An]||null;if(c===null)return null;a=c[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":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(s(231,r,typeof a));return a}var yr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),no=!1;if(yr)try{var Ec={};Object.defineProperty(Ec,"passive",{get:function(){no=!0}}),window.addEventListener("test",Ec,Ec),window.removeEventListener("test",Ec,Ec)}catch{no=!1}var oa=null,kg=null,Md=null;function cx(){if(Md)return Md;var n,r=kg,a=r.length,c,p="value"in oa?oa.value:oa.textContent,y=p.length;for(n=0;n<a&&r[n]===p[n];n++);var T=a-n;for(c=1;c<=T&&r[a-c]===p[y-c];c++);return Md=p.slice(n,1<c?1-c:void 0)}function Nd(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Dd(){return!0}function ux(){return!1}function zr(n){function r(a,c,p,y,T){this._reactName=a,this._targetInst=p,this.type=c,this.nativeEvent=y,this.target=T,this.currentTarget=null;for(var P in n)n.hasOwnProperty(P)&&(a=n[P],this[P]=a?a(y):y[P]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Dd:ux,this.isPropagationStopped=ux,this}return D(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Dd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Dd)},persist:function(){},isPersistent:Dd}),r}var la={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jd=zr(la),Cc=D({},la,{view:0,detail:0}),VM=zr(Cc),Og,Ag,Rc,Id=D({},Cc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ng,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Rc&&(Rc&&n.type==="mousemove"?(Og=n.screenX-Rc.screenX,Ag=n.screenY-Rc.screenY):Ag=Og=0,Rc=n),Og)},movementY:function(n){return"movementY"in n?n.movementY:Ag}}),dx=zr(Id),KM=D({},Id,{dataTransfer:0}),qM=zr(KM),YM=D({},Cc,{relatedTarget:0}),Mg=zr(YM),GM=D({},la,{animationName:0,elapsedTime:0,pseudoElement:0}),$M=zr(GM),QM=D({},la,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),XM=zr(QM),ZM=D({},la,{data:0}),fx=zr(ZM),JM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},WM={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"},eN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tN(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=eN[n])?!!r[n]:!1}function Ng(){return tN}var nN=D({},Cc,{key:function(n){if(n.key){var r=JM[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Nd(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?WM[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ng,charCode:function(n){return n.type==="keypress"?Nd(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Nd(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),rN=zr(nN),iN=D({},Id,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hx=zr(iN),sN=D({},la,{submitter:0}),aN=zr(sN),oN=D({},Cc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ng}),lN=zr(oN),cN=D({},la,{propertyName:0,elapsedTime:0,pseudoElement:0}),uN=zr(cN),dN=D({},Id,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),fN=zr(dN),hN=D({},la,{newState:0,oldState:0,source:0}),pN=zr(hN),gN=[9,13,27,32],Dg=yr&&"CompositionEvent"in window,Tc=null;yr&&"documentMode"in document&&(Tc=document.documentMode);var mN=yr&&"TextEvent"in window&&!Tc,px=yr&&(!Dg||Tc&&8<Tc&&11>=Tc),gx=" ",mx=!1;function yx(n,r){switch(n){case"keyup":return gN.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vx(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Jo=!1;function yN(n,r){switch(n){case"compositionend":return vx(r);case"keypress":return r.which!==32?null:(mx=!0,gx);case"textInput":return n=r.data,n===gx&&mx?null:n;default:return null}}function vN(n,r){if(Jo)return n==="compositionend"||!Dg&&yx(n,r)?(n=cx(),Md=kg=oa=null,Jo=!1,n):null;switch(n){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 px&&r.locale!=="ko"?null:r.data;default:return null}}var bN={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 bx(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!bN[n.type]:r==="textarea"}function xx(n,r,a,c){rn?or?or.push(c):or=[c]:rn=c,r=Lf(r,"onChange"),0<r.length&&(a=new jd("onChange","change",null,a,c),n.push({event:a,listeners:r}))}var kc=null,Oc=null;function xN(n){oS(n,0)}function Pd(n){var r=he(n);if(Qo(r))return n}function Sx(n,r){if(n==="change")return r}var wx=!1;if(yr){var jg;if(yr){var Ig="oninput"in document;if(!Ig){var Ex=document.createElement("div");Ex.setAttribute("oninput","return;"),Ig=typeof Ex.oninput=="function"}jg=Ig}else jg=!1;wx=jg&&(!document.documentMode||9<document.documentMode)}function Cx(){kc&&(kc.detachEvent("onpropertychange",Rx),Oc=kc=null)}function Rx(n){if(n.propertyName==="value"&&Pd(Oc)){var r=[];xx(r,Oc,n,eo(n)),to(xN,r)}}function SN(n,r,a){n==="focusin"?(Cx(),kc=r,Oc=a,kc.attachEvent("onpropertychange",Rx)):n==="focusout"&&Cx()}function wN(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Pd(Oc)}function EN(n,r){if(n==="click")return Pd(r)}function CN(n,r){if(n==="input"||n==="change")return Pd(r)}function RN(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var li=typeof Object.is=="function"?Object.is:RN;function Ac(n,r){if(li(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var a=Object.keys(n),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var p=a[c];if(!jt.call(r,p)||!li(n[p],r[p]))return!1}return!0}function Pg(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Tx(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function kx(n,r){var a=Tx(n);n=0;for(var c;a;){if(a.nodeType===3){if(c=n+a.textContent.length,n<=r&&c>=r)return{node:a,offset:r-n};n=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Tx(a)}}function Ox(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Ox(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Ax(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Pg(n.document);r instanceof n.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)n=r.contentWindow;else break;r=Pg(n.document)}return r}function Lg(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var TN=yr&&"documentMode"in document&&11>=document.documentMode,Wo=null,zg=null,Mc=null,_g=!1;function Mx(n,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;_g||Wo==null||Wo!==Pg(c)||(c=Wo,"selectionStart"in c&&Lg(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Mc&&Ac(Mc,c)||(Mc=c,c=Lf(zg,"onSelect"),0<c.length&&(r=new jd("onSelect","select",null,r,a),n.push({event:r,listeners:c}),r.target=Wo)))}function ro(n,r){var a={};return a[n.toLowerCase()]=r.toLowerCase(),a["Webkit"+n]="webkit"+r,a["Moz"+n]="moz"+r,a}var el={animationend:ro("Animation","AnimationEnd"),animationiteration:ro("Animation","AnimationIteration"),animationstart:ro("Animation","AnimationStart"),transitionrun:ro("Transition","TransitionRun"),transitionstart:ro("Transition","TransitionStart"),transitioncancel:ro("Transition","TransitionCancel"),transitionend:ro("Transition","TransitionEnd")},Ug={},Nx={};yr&&(Nx=document.createElement("div").style,"AnimationEvent"in window||(delete el.animationend.animation,delete el.animationiteration.animation,delete el.animationstart.animation),"TransitionEvent"in window||delete el.transitionend.transition);function io(n){if(Ug[n])return Ug[n];if(!el[n])return n;var r=el[n],a;for(a in r)if(r.hasOwnProperty(a)&&a in Nx)return Ug[n]=r[a];return n}var Dx=io("animationend"),jx=io("animationiteration"),Ix=io("animationstart"),kN=io("transitionrun"),ON=io("transitionstart"),AN=io("transitioncancel"),Px=io("transitionend"),Lx=new Map,Hg="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(" ");Hg.push("scrollEnd");function Ui(n,r){Lx.set(n,r),Ht(r,[n])}var MN=0;function Ns(n,r){if(n.name!=null&&n.name!=="auto")return n.name;if(r.autoName!==null)return r.autoName;n=Vi.identifierPrefix;var a=MN++;return n="_"+n+"t_"+a.toString(32)+"_",r.autoName=n}function zx(n){if(n==null||typeof n=="string")return n;var r=null,a=xl;if(a!==null)for(var c=0;c<a.length;c++){var p=n[a[c]];if(p!=null){if(p==="none")return"none";r=r==null?p:r+(" "+p)}}return r??n.default}function Ds(n,r){return n=zx(n),r=zx(r),r==null?n==="auto"?null:n:r==="auto"?null:r}var Ld=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=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(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},wi=[],tl=0,Fg=0;function zd(){for(var n=tl,r=Fg=tl=0;r<n;){var a=wi[r];wi[r++]=null;var c=wi[r];wi[r++]=null;var p=wi[r];wi[r++]=null;var y=wi[r];if(wi[r++]=null,c!==null&&p!==null){var T=c.pending;T===null?p.next=p:(p.next=T.next,T.next=p),c.pending=p}y!==0&&_x(a,p,y)}}function _d(n,r,a,c){wi[tl++]=n,wi[tl++]=r,wi[tl++]=a,wi[tl++]=c,Fg|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function Bg(n,r,a,c){return _d(n,r,a,c),Ud(n)}function so(n,r){return _d(n,null,null,r),Ud(n)}function _x(n,r,a){n.lanes|=a;var c=n.alternate;c!==null&&(c.lanes|=a);for(var p=!1,y=n.return;y!==null;)y.childLanes|=a,c=y.alternate,c!==null&&(c.childLanes|=a),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(p=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,p&&r!==null&&(p=31-et(a),n=y.hiddenUpdates,c=n[p],c===null?n[p]=[r]:c.push(r),r.lane=a|536870912),y):null}function Ud(n){if(50<Jc)throw Jc=0,Af=null,Error(s(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var nl={};function NN(n,r,a,c){this.tag=n,this.key=a,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=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(n,r,a,c){return new NN(n,r,a,c)}function Vg(n){return n=n.prototype,!(!n||!n.isReactComponent)}function js(n,r){var a=n.alternate;return a===null?(a=Yr(n.tag,r,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=r,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&1206910976,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,r=n.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a.refCleanup=n.refCleanup,a}function Ux(n,r){n.flags&=1206910978;var a=n.alternate;return a===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,r=a.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Hd(n,r,a,c,p,y){var T=0;if(c=n,typeof c=="function")Vg(c)&&(T=1);else if(typeof c=="string")T=sj(n,a,ke.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(c){case ee:return n=Yr(31,a,r,p),n.elementType=ee,n.lanes=y,n;case q:return ao(a.children,p,y,r);case X:T=8,p|=24;break;case B:return n=Yr(12,a,r,p|2),n.elementType=B,n.lanes=y,n;case Q:return n=Yr(13,a,r,p),n.elementType=Q,n.lanes=y,n;case $:return n=Yr(19,a,r,p),n.elementType=$,n.lanes=y,n;case G:case I:return n=p|32,n=Yr(30,a,r,n),n.elementType=I,n.lanes=y,n.stateNode={autoName:null,paired:null,clones:null,ref:null},n;default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case U:T=10;break e;case H:T=9;break e;case z:T=11;break e;case K:T=14;break e;case Y:T=16,c=null;break e}T=29,a=Error(s(130,n===null?"null":typeof n,"")),c=null}return r=Yr(T,a,r,p),r.elementType=n,r.type=c,r.lanes=y,r}function ao(n,r,a,c){return n=Yr(7,n,c,r),n.lanes=a,n}function Kg(n,r,a){return n=Yr(6,n,null,r),n.lanes=a,n}function Hx(n){var r=Yr(18,null,null,0);return r.stateNode=n,r}function qg(n,r,a){return r=Yr(4,n.children!==null?n.children:[],n.key,r),r.lanes=a,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Fx=new WeakMap;function Ei(n,r){if(typeof n=="object"&&n!==null){var a=Fx.get(n);return a!==void 0?a:(r={value:n,source:r,stack:Nt(r)},Fx.set(n,r),r)}return{value:n,source:r,stack:Nt(r)}}var rl=[],il=0,Fd=null,Nc=0,Ci=[],Ri=0,ca=null,ts=1,ns="";function Is(n,r){rl[il++]=Nc,rl[il++]=Fd,Fd=n,Nc=r}function Bx(n,r,a){Ci[Ri++]=ts,Ci[Ri++]=ns,Ci[Ri++]=ca,ca=n;var c=ts;n=ns;var p=32-et(c)-1;c&=~(1<<p),a+=1;var y=32-et(r)+p;if(30<y){var T=p-p%5;y=(c&(1<<T)-1).toString(32),c>>=T,p-=T,ts=1<<32-et(r)+p|a<<p|c,ns=y+n}else ts=1<<y|a<<p|c,ns=n}function Bd(n){n.return!==null&&(Is(n,1),Bx(n,1,0))}function Yg(n){for(;n===Fd;)Fd=rl[--il],rl[il]=null,Nc=rl[--il],rl[il]=null;for(;n===ca;)ca=Ci[--Ri],Ci[Ri]=null,ns=Ci[--Ri],Ci[Ri]=null,ts=Ci[--Ri],Ci[Ri]=null}function Vx(n,r){Ci[Ri++]=ts,Ci[Ri++]=ns,Ci[Ri++]=ca,ts=r.id,ns=r.overflow,ca=n}var lr=null,Mn=null,Kt=!1,ua=null,Ti=!1,Gg=Error(s(519));function da(n){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Dc(Ei(r,n)),Gg}function Kx(n){var r=n.stateNode,a=n.type,c=n.memoizedProps;switch(r[fn]=n,r[An]=c,a){case"dialog":$t("cancel",r),$t("close",r);break;case"iframe":case"object":case"embed":$t("load",r);break;case"video":case"audio":for(a=0;a<eu.length;a++)$t(eu[a],r);break;case"source":$t("error",r);break;case"img":case"image":case"link":$t("error",r),$t("load",r);break;case"details":$t("toggle",r);break;case"input":$t("invalid",r),sa(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":$t("invalid",r);break;case"textarea":$t("invalid",r),si(r,c.value,c.defaultValue,c.children)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||c.suppressHydrationWarning===!0||dS(r.textContent,a)?(c.popover!=null&&($t("beforetoggle",r),$t("toggle",r)),c.onScroll!=null&&$t("scroll",r),c.onScrollEnd!=null&&$t("scrollend",r),c.onClick!=null&&(r.onclick=Lr),r=!0):r=!1,r||da(n,!0)}function Vd(n){for(lr=n.return;lr;)switch(lr.tag){case 5:case 31:case 13:Ti=!1;return;case 27:case 3:Ti=!0;return;default:lr=lr.return}}function sl(n){if(n!==lr)return!1;if(!Kt)return Vd(n),Kt=!0,!1;var r=n.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||E0(n.type,n.memoizedProps)),a=!a),a&&Mn&&da(n),Vd(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Mn=MS(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));Mn=MS(n)}else r===27?(r=Mn,ka(n.type)?(n=D0,D0=null,Mn=n):Mn=r):Mn=lr?Oi(n.stateNode.nextSibling):null;return!0}function oo(){Mn=lr=null,Kt=!1}function $g(){var n=ua;return n!==null&&(Qr===null?Qr=n:Qr.push.apply(Qr,n),ua=null),n}function Dc(n){ua===null?ua=[n]:ua.push(n)}var Qg=Oe(null),lo=null,Ps=null;function fa(n,r,a){Ve(Qg,r._currentValue),r._currentValue=a}function Ls(n){n._currentValue=Qg.current,Le(Qg)}function Kd(n,r,a){for(;n!==null;){var c=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),n===a)break;n=n.return}}function Xg(n,r,a,c){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var y=p.dependencies;if(y!==null){var T=p.child;y=y.firstContext;e:for(;y!==null;){var P=y;y=p;for(var Z=0;Z<r.length;Z++)if(P.context===r[Z]){y.lanes|=a,P=y.alternate,P!==null&&(P.lanes|=a),Kd(y.return,a,n),c||(T=null);break e}y=P.next}}else if(p.tag===18){if(T=p.return,T===null)throw Error(s(341));T.lanes|=a,y=T.alternate,y!==null&&(y.lanes|=a),Kd(T,a,n),T=null}else p.tag===13&&p.memoizedState!==null&&p.memoizedState.dehydrated===null?(p.lanes|=a,T=p.alternate,T!==null&&(T.lanes|=a),Kd(p.return,a,n),T=p.child,T=T!==null?T.sibling:null):T=p.child;if(T!==null)T.return=p;else for(T=p;T!==null;){if(T===n){T=null;break}if(p=T.sibling,p!==null){p.return=T.return,T=p;break}T=T.return}p=T}}function co(n,r,a,c){n=null;for(var p=r,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var T=p.alternate;if(T===null)throw Error(s(387));if(T=T.memoizedProps,T!==null){var P=p.type;li(p.pendingProps.value,T.value)||(n!==null?n.push(P):n=[P])}}else if(p===He.current){if(T=p.alternate,T===null)throw Error(s(387));T.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Ml):n=[Ml])}p=p.return}return n!==null&&Xg(r,n,a,c),r.flags|=262144,n!==null}function qd(n){for(n=n.firstContext;n!==null;){if(!li(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function uo(n){lo=n,Ps=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function vr(n){return qx(lo,n)}function Yd(n,r){return lo===null&&uo(n),qx(n,r)}function qx(n,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},Ps===null){if(n===null)throw Error(s(308));Ps=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else Ps=Ps.next=r;return a}var DN=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(a,c){n.push(c)}};this.abort=function(){r.aborted=!0,n.forEach(function(a){return a()})}},jN=e.unstable_scheduleCallback,IN=e.unstable_NormalPriority,Qn={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zg(){return{controller:new DN,data:new Map,refCount:0}}function jc(n){n.refCount--,n.refCount===0&&jN(IN,function(){n.controller.abort()})}function Yx(n,r){if((n.pendingLanes&4194048)!==0){var a=n.transitionTypes;for(a===null&&(a=n.transitionTypes=[]),n=0;n<r.length;n++){var c=r[n];a.indexOf(c)===-1&&a.push(c)}}}var Ic=null;function PN(n){var r=n.transitionTypes;return n.transitionTypes=null,r}var Pc=null,Jg=0,fo=0,al=null;function LN(n,r){if(Pc===null){var a=Pc=[];Jg=0,fo=p0(),al={status:"pending",value:void 0,then:function(c){a.push(c)}}}return Jg++,r.then(Gx,Gx),r}function Gx(){if(--Jg===0&&(Ic=null,Pc!==null)){al!==null&&(al.status="fulfilled");var n=Pc;Pc=null,fo=0,al=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function zN(n,r){var a=[],c={status:"pending",value:null,reason:null,then:function(p){a.push(p)}};return n.then(function(){c.status="fulfilled",c.value=r;for(var p=0;p<a.length;p++)(0,a[p])(r)},function(p){for(c.status="rejected",c.reason=p,p=0;p<a.length;p++)(0,a[p])(void 0)}),c}var $x=ge.S;ge.S=function(n,r){if(H1=wt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&LN(n,r),Ic!==null)for(var a=Cl;a!==null;)Yx(a,Ic),a=a.next;if(a=n.types,a!==null){for(var c=Cl;c!==null;)Yx(c,a),c=c.next;if(fo!==0){c=Ic,c===null&&(c=Ic=[]);for(var p=0;p<a.length;p++){var y=a[p];c.indexOf(y)===-1&&c.push(y)}}}$x!==null&&$x(n,r)};var ho=Oe(null);function Wg(){var n=ho.current;return n!==null?n:kn.pooledCache}function Gd(n,r){r===null?Ve(ho,ho.current):Ve(ho,r.pool)}function Qx(){var n=Wg();return n===null?null:{parent:Qn._currentValue,pool:n}}var ol=Error(s(460)),em=Error(s(474)),$d=Error(s(542)),Qd={then:function(){}};function Xx(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Zx(n,r,a){switch(a=n[a],a===void 0?n.push(r):a!==r&&(r.then(Lr,Lr),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Wx(n),n===void 0&&!("reason"in r)?Error(s(600)):n;default:if(typeof r.status=="string")r.then(Lr,Lr);else{if(n=kn,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=r,n.status="pending",n.then(function(c){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=c}},function(c){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Wx(n),n}throw go=r,ol}}function po(n){try{var r=n._init;return r(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(go=a,ol):a}}var go=null;function Jx(){if(go===null)throw Error(s(459));var n=go;return go=null,n}function Wx(n){if(n===ol||n===$d)throw Error(s(483))}var ll=null,Lc=0;function Xd(n){var r=Lc;return Lc+=1,ll===null&&(ll=[]),Zx(ll,n,r)}function ha(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Zd(n,r){throw r.$$typeof===M?Error(s(525)):(n=Object.prototype.toString.call(r),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function e2(n){function r(se,te){if(n){var ce=se.deletions;ce===null?(se.deletions=[te],se.flags|=16):ce.push(te)}}function a(se,te){if(!n)return null;for(;te!==null;)r(se,te),te=te.sibling;return null}function c(se){for(var te=new Map;se!==null;)se.key===null?te.set(se.index,se):te.set(se.key,se),se=se.sibling;return te}function p(se,te){return se=js(se,te),se.index=0,se.sibling=null,se}function y(se,te,ce){return se.index=ce,n?(ce=se.alternate,ce!==null?(ce=ce.index,ce<te?(se.flags|=2,te):ce):(se.flags|=134217730,te)):(se.flags|=1048576,te)}function T(se){return n&&se.alternate===null&&(se.flags|=134217730),se}function P(se,te,ce,Ce){return te===null||te.tag!==6?(te=Kg(ce,se.mode,Ce),te.return=se,te):(te=p(te,ce),te.return=se,te)}function Z(se,te,ce,Ce){var Je=ce.type;return Je===q?(se=pe(se,te,ce.props.children,Ce,ce.key),ha(se,ce),se):te!==null&&(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===Y&&po(Je)===te.type)?(te=p(te,ce.props),ha(te,ce),te.return=se,te):(te=Hd(ce.type,ce.key,ce.props,null,se.mode,Ce),ha(te,ce),te.return=se,te)}function ae(se,te,ce,Ce){return te===null||te.tag!==4||te.stateNode.containerInfo!==ce.containerInfo||te.stateNode.implementation!==ce.implementation?(te=qg(ce,se.mode,Ce),te.return=se,te):(te=p(te,ce.children||[]),te.return=se,te)}function pe(se,te,ce,Ce,Je){return te===null||te.tag!==7?(te=ao(ce,se.mode,Ce,Je),te.return=se,te):(te=p(te,ce),te.return=se,te)}function Re(se,te,ce){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Kg(""+te,se.mode,ce),te.return=se,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case _:return ce=Hd(te.type,te.key,te.props,null,se.mode,ce),ha(ce,te),ce.return=se,ce;case L:return te=qg(te,se.mode,ce),te.return=se,te;case Y:return te=po(te),Re(se,te,ce)}if(me(te)||re(te))return te=ao(te,se.mode,ce,null),te.return=se,te;if(typeof te.then=="function")return Re(se,Xd(te),ce);if(te.$$typeof===U)return Re(se,Yd(se,te),ce);Zd(se,te)}return null}function ie(se,te,ce,Ce){var Je=te!==null?te.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Je!==null?null:P(se,te,""+ce,Ce);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:return ce.key===Je?Z(se,te,ce,Ce):null;case L:return ce.key===Je?ae(se,te,ce,Ce):null;case Y:return ce=po(ce),ie(se,te,ce,Ce)}if(me(ce)||re(ce))return Je!==null?null:pe(se,te,ce,Ce,null);if(typeof ce.then=="function")return ie(se,te,Xd(ce),Ce);if(ce.$$typeof===U)return ie(se,te,Yd(se,ce),Ce);Zd(se,ce)}return null}function fe(se,te,ce,Ce,Je){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return se=se.get(ce)||null,P(te,se,""+Ce,Je);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case _:return se=se.get(Ce.key===null?ce:Ce.key)||null,Z(te,se,Ce,Je);case L:return se=se.get(Ce.key===null?ce:Ce.key)||null,ae(te,se,Ce,Je);case Y:return Ce=po(Ce),fe(se,te,ce,Ce,Je)}if(me(Ce)||re(Ce))return se=se.get(ce)||null,pe(te,se,Ce,Je,null);if(typeof Ce.then=="function")return fe(se,te,ce,Xd(Ce),Je);if(Ce.$$typeof===U)return fe(se,te,ce,Yd(te,Ce),Je);Zd(te,Ce)}return null}function Ye(se,te,ce,Ce){for(var Je=null,Wt=null,ct=te,St=te=0,Jn=null;ct!==null&&St<ce.length;St++){ct.index>St?(Jn=ct,ct=null):Jn=ct.sibling;var sn=ie(se,ct,ce[St],Ce);if(sn===null){ct===null&&(ct=Jn);break}n&&ct&&sn.alternate===null&&r(se,ct),te=y(sn,te,St),Wt===null?Je=sn:Wt.sibling=sn,Wt=sn,ct=Jn}if(St===ce.length)return a(se,ct),Kt&&Is(se,St),Je;if(ct===null){for(;St<ce.length;St++)ct=Re(se,ce[St],Ce),ct!==null&&(te=y(ct,te,St),Wt===null?Je=ct:Wt.sibling=ct,Wt=ct);return Kt&&Is(se,St),Je}for(ct=c(ct);St<ce.length;St++)Jn=fe(ct,se,St,ce[St],Ce),Jn!==null&&(n&&(sn=Jn.alternate,sn!==null&&ct.delete(sn.key===null?St:sn.key)),te=y(Jn,te,St),Wt===null?Je=Jn:Wt.sibling=Jn,Wt=Jn);return n&&ct.forEach(function(Da){return r(se,Da)}),Kt&&Is(se,St),Je}function it(se,te,ce,Ce){if(ce==null)throw Error(s(151));for(var Je=null,Wt=null,ct=te,St=te=0,Jn=null,sn=ce.next();ct!==null&&!sn.done;St++,sn=ce.next()){ct.index>St?(Jn=ct,ct=null):Jn=ct.sibling;var Da=ie(se,ct,sn.value,Ce);if(Da===null){ct===null&&(ct=Jn);break}n&&ct&&Da.alternate===null&&r(se,ct),te=y(Da,te,St),Wt===null?Je=Da:Wt.sibling=Da,Wt=Da,ct=Jn}if(sn.done)return a(se,ct),Kt&&Is(se,St),Je;if(ct===null){for(;!sn.done;St++,sn=ce.next())sn=Re(se,sn.value,Ce),sn!==null&&(te=y(sn,te,St),Wt===null?Je=sn:Wt.sibling=sn,Wt=sn);return Kt&&Is(se,St),Je}for(ct=c(ct);!sn.done;St++,sn=ce.next())sn=fe(ct,se,St,sn.value,Ce),sn!==null&&(n&&(Jn=sn.alternate,Jn!==null&&ct.delete(Jn.key===null?St:Jn.key)),te=y(sn,te,St),Wt===null?Je=sn:Wt.sibling=sn,Wt=sn);return n&&ct.forEach(function(yj){return r(se,yj)}),Kt&&Is(se,St),Je}function Pt(se,te,ce,Ce){if(typeof ce=="object"&&ce!==null&&ce.type===q&&ce.key===null&&ce.props.ref===void 0&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:e:{for(var Je=ce.key;te!==null;){if(te.key===Je){if(Je=ce.type,Je===q){if(te.tag===7){a(se,te.sibling),Ce=p(te,ce.props.children),ha(Ce,ce),Ce.return=se,se=Ce;break e}}else if(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===Y&&po(Je)===te.type){a(se,te.sibling),Ce=p(te,ce.props),ha(Ce,ce),Ce.return=se,se=Ce;break e}a(se,te);break}else r(se,te);te=te.sibling}ce.type===q?(Ce=ao(ce.props.children,se.mode,Ce,ce.key),ha(Ce,ce),Ce.return=se,se=Ce):(Ce=Hd(ce.type,ce.key,ce.props,null,se.mode,Ce),ha(Ce,ce),Ce.return=se,se=Ce)}return T(se);case L:e:{for(Je=ce.key;te!==null;){if(te.key===Je)if(te.tag===4&&te.stateNode.containerInfo===ce.containerInfo&&te.stateNode.implementation===ce.implementation){a(se,te.sibling),Ce=p(te,ce.children||[]),Ce.return=se,se=Ce;break e}else{a(se,te);break}else r(se,te);te=te.sibling}Ce=qg(ce,se.mode,Ce),Ce.return=se,se=Ce}return T(se);case Y:return ce=po(ce),Pt(se,te,ce,Ce)}if(me(ce))return Ye(se,te,ce,Ce);if(re(ce)){if(Je=re(ce),typeof Je!="function")throw Error(s(150));return ce=Je.call(ce),it(se,te,ce,Ce)}if(typeof ce.then=="function")return Pt(se,te,Xd(ce),Ce);if(ce.$$typeof===U)return Pt(se,te,Yd(se,ce),Ce);Zd(se,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,te!==null&&te.tag===6?(a(se,te.sibling),Ce=p(te,ce),Ce.return=se,se=Ce):(a(se,te),Ce=Kg(ce,se.mode,Ce),Ce.return=se,se=Ce),T(se)):a(se,te)}return function(se,te,ce,Ce){try{Lc=0;var Je=Pt(se,te,ce,Ce);return ll=null,Je}catch(ct){if(ct===ol||ct===$d)throw ct;var Wt=Yr(29,ct,null,se.mode);return Wt.lanes=Ce,Wt.return=se,Wt}}}var mo=e2(!0),t2=e2(!1),pa=!1;function tm(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nm(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function ga(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function ma(n,r,a){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(cn&2)!==0){var p=c.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),c.pending=r,r=Ud(n),_x(n,null,a),r}return _d(n,c,r,a),Ud(n)}function zc(n,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var c=r.lanes;c&=n.pendingLanes,a|=c,r.lanes=a,On(n,a)}}function rm(n,r){var a=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var p=null,y=null;if(a=a.firstBaseUpdate,a!==null){do{var T={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};y===null?p=y=T:y=y.next=T,a=a.next}while(a!==null);y===null?p=y=r:y=y.next=r}else p=y=r;a={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:c.shared,callbacks:c.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=r:n.next=r,a.lastBaseUpdate=r}var im=!1;function _c(){if(im){var n=al;if(n!==null)throw n}}function Uc(n,r,a,c){im=!1;var p=n.updateQueue;pa=!1;var y=p.firstBaseUpdate,T=p.lastBaseUpdate,P=p.shared.pending;if(P!==null){p.shared.pending=null;var Z=P,ae=Z.next;Z.next=null,T===null?y=ae:T.next=ae,T=Z;var pe=n.alternate;pe!==null&&(pe=pe.updateQueue,P=pe.lastBaseUpdate,P!==T&&(P===null?pe.firstBaseUpdate=ae:P.next=ae,pe.lastBaseUpdate=Z))}if(y!==null){var Re=p.baseState;T=0,pe=ae=Z=null,P=y;do{var ie=P.lane&-536870913,fe=ie!==P.lane;if(fe?(Jt&ie)===ie:(c&ie)===ie){ie!==0&&ie===fo&&(im=!0),pe!==null&&(pe=pe.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Ye=n,it=P;ie=r;var Pt=a;switch(it.tag){case 1:if(Ye=it.payload,typeof Ye=="function"){Re=Ye.call(Pt,Re,ie);break e}Re=Ye;break e;case 3:Ye.flags=Ye.flags&-65537|128;case 0:if(Ye=it.payload,ie=typeof Ye=="function"?Ye.call(Pt,Re,ie):Ye,ie==null)break e;Re=D({},Re,ie);break e;case 2:pa=!0}}ie=P.callback,ie!==null&&(n.flags|=64,fe&&(n.flags|=8192),fe=p.callbacks,fe===null?p.callbacks=[ie]:fe.push(ie))}else fe={lane:ie,tag:P.tag,payload:P.payload,callback:P.callback,next:null},pe===null?(ae=pe=fe,Z=Re):pe=pe.next=fe,T|=ie;if(P=P.next,P===null){if(P=p.shared.pending,P===null)break;fe=P,P=fe.next,fe.next=null,p.lastBaseUpdate=fe,p.shared.pending=null}}while(!0);pe===null&&(Z=Re),p.baseState=Z,p.firstBaseUpdate=ae,p.lastBaseUpdate=pe,y===null&&(p.shared.lanes=0),Ea|=T,n.lanes=T,n.memoizedState=Re}}function n2(n,r){if(typeof n!="function")throw Error(s(191,n));n.call(r)}function r2(n,r){var a=n.callbacks;if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)n2(a[n],r)}var ya=Oe(null),Jd=Oe(0);function i2(n,r){n=Fs,Ve(Jd,n),Ve(ya,r),Fs=n|r.baseLanes}function sm(){Ve(Jd,Fs),Ve(ya,ya.current)}function am(){Fs=Jd.current,Le(ya),Le(Jd)}var br=Oe(null),kr=null;function va(n){var r=n.alternate;Ve(xr,xr.current&1),Ve(br,n),kr===null&&(r===null||ya.current!==null||r.memoizedState!==null)&&(kr=n)}function om(n){Ve(xr,xr.current),Ve(br,n),kr===null&&(kr=n)}function s2(n){n.tag===22?(Ve(xr,xr.current),Ve(br,n),kr===null&&(kr=n)):ba()}function ba(){Ve(xr,xr.current),Ve(br,br.current)}function ci(n){Le(br),kr===n&&(kr=null),Le(xr)}var xr=Oe(0);function Hc(n,r){Ve(br,br.current),Ve(xr,r)}function lm(n){Le(xr),Le(br),kr===n&&(kr=null)}function Wd(n){for(var r=n;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||M0(a)||N0(a)))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===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var zs=0,It=null,Sn=null,Xn=null,ef=!1,cl=!1,yo=!1,tf=0,Fc=0,ul=null,_N=0;function Bn(){throw Error(s(321))}function cm(n,r){if(r===null)return!1;for(var a=0;a<r.length&&a<n.length;a++)if(!li(n[a],r[a]))return!1;return!0}function um(n,r,a,c,p,y){return zs=y,It=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,ge.H=n===null||n.memoizedState===null?B2:V2,yo=!1,y=a(c,p),yo=!1,cl&&(y=o2(r,a,c,p)),a2(n),y}function a2(n){ge.H=cf;var r=Sn!==null&&Sn.next!==null;if(zs=0,Xn=Sn=It=null,ef=!1,Fc=0,ul=null,r)throw Error(s(300));n===null||Zn||(n=n.dependencies,n!==null&&qd(n)&&(Zn=!0))}function o2(n,r,a,c){It=n;var p=0;do{if(cl&&(ul=null),Fc=0,cl=!1,25<=p)throw Error(s(301));if(p+=1,Xn=Sn=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}ge.H=YN,y=r(a,c)}while(cl);return y}function UN(){var n=ge.H,r=n.useState()[0];return r=typeof r.then=="function"?Bc(r):r,n=n.useState()[0],(Sn!==null?Sn.memoizedState:null)!==n&&(It.flags|=1024),r}function dm(){var n=tf!==0;return tf=0,n}function fm(n,r,a){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~a}function hm(n){if(ef){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}ef=!1}zs=0,Xn=Sn=It=null,cl=!1,Fc=tf=0,ul=null}function _r(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xn===null?It.memoizedState=Xn=n:Xn=Xn.next=n,Xn}function Yn(){if(Sn===null){var n=It.alternate;n=n!==null?n.memoizedState:null}else n=Sn.next;var r=Xn===null?It.memoizedState:Xn.next;if(r!==null)Xn=r,Sn=n;else{if(n===null)throw It.alternate===null?Error(s(467)):Error(s(310));Sn=n,n={memoizedState:Sn.memoizedState,baseState:Sn.baseState,baseQueue:Sn.baseQueue,queue:Sn.queue,next:null},Xn===null?It.memoizedState=Xn=n:Xn=Xn.next=n}return Xn}function nf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bc(n){var r=Fc;return Fc+=1,ul===null&&(ul=[]),n=Zx(ul,n,r),r=It,(Xn===null?r.memoizedState:Xn.next)===null&&(r=r.alternate,ge.H=r===null||r.memoizedState===null?B2:V2),n}function rf(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Bc(n);if(n.$$typeof===V)return;if(n.$$typeof===U)return vr(n)}throw Error(s(438,String(n)))}function pm(n){var r=null,a=It.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var c=It.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=nf(),It.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(n),c=0;c<n;c++)a[c]=oe;return r.index++,a}function _s(n,r){return typeof r=="function"?r(n):r}function sf(n){var r=Yn();return gm(r,Sn,n)}function gm(n,r,a){var c=n.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=a;var p=n.baseQueue,y=c.pending;if(y!==null){if(p!==null){var T=p.next;p.next=y.next,y.next=T}r.baseQueue=p=y,c.pending=null}if(y=n.baseState,p===null)n.memoizedState=y;else{r=p.next;var P=T=null,Z=null,ae=r,pe=!1;do{var Re=ae.lane&-536870913;if(Re!==ae.lane?(Jt&Re)===Re:(zs&Re)===Re){var ie=ae.revertLane;if(ie===0)Z!==null&&(Z=Z.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),Re===fo&&(pe=!0);else if((zs&ie)===ie){ae=ae.next,ie===fo&&(pe=!0);continue}else Re={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Z===null?(P=Z=Re,T=y):Z=Z.next=Re,It.lanes|=ie,Ea|=ie;Re=ae.action,yo&&a(y,Re),y=ae.hasEagerState?ae.eagerState:a(y,Re)}else ie={lane:Re,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Z===null?(P=Z=ie,T=y):Z=Z.next=ie,It.lanes|=Re,Ea|=Re;ae=ae.next}while(ae!==null&&ae!==r);if(Z===null?T=y:Z.next=P,!li(y,n.memoizedState)&&(Zn=!0,pe&&(a=al,a!==null)))throw a;n.memoizedState=y,n.baseState=T,n.baseQueue=Z,c.lastRenderedState=y}return p===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function mm(n){var r=Yn(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var c=a.dispatch,p=a.pending,y=r.memoizedState;if(p!==null){a.pending=null;var T=p=p.next;do y=n(y,T.action),T=T.next;while(T!==p);li(y,r.memoizedState)||(Zn=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),a.lastRenderedState=y}return[y,c]}function l2(n,r,a){var c=It,p=Yn(),y=Kt;if(y){if(a===void 0)throw Error(s(407));a=a()}else a=r();var T=!li((Sn||p).memoizedState,a);if(T&&(p.memoizedState=a,Zn=!0),p=p.queue,bm(d2.bind(null,c,p,n),[n]),n=p.getSnapshot!==r||T||Xn!==null&&(Xn.memoizedState.tag&1)!==0,dl(n?9:8,{destroy:void 0},u2.bind(null,c,p,a,r),null),n){if(c.flags|=2048,kn===null)throw Error(s(349));y||(zs&127)!==0||c2(c,r,a)}return a}function c2(n,r,a){n.flags|=16384,n={getSnapshot:r,value:a},r=It.updateQueue,r===null?(r=nf(),It.updateQueue=r,r.stores=[n]):(a=r.stores,a===null?r.stores=[n]:a.push(n))}function u2(n,r,a,c){r.value=a,r.getSnapshot=c,f2(r)&&h2(n)}function d2(n,r,a){return a(function(){f2(r)&&h2(n)})}function f2(n){var r=n.getSnapshot;n=n.value;try{var a=r();return!li(n,a)}catch{return!0}}function h2(n){var r=so(n,2);r!==null&&Xr(r,n,2)}function ym(n){var r=_r();if(typeof n=="function"){var a=n;if(n=a(),yo){$e(!0);try{a()}finally{$e(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_s,lastRenderedState:n},r}function p2(n,r,a,c){return n.baseState=a,gm(n,Sn,typeof c=="function"?c:_s)}function HN(n,r,a,c,p){if(lf(n))throw Error(s(485));if(n=r.action,n!==null){var y={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){y.listeners.push(T)}};ge.T!==null?a(!0):y.isTransition=!1,c(y),a=r.pending,a===null?(y.next=r.pending=y,g2(r,y)):(y.next=a.next,r.pending=a.next=y)}}function g2(n,r){var a=r.action,c=r.payload,p=n.state;if(r.isTransition){var y=ge.T,T={};T.types=y!==null?y.types:null,ge.T=T;try{var P=a(p,c),Z=ge.S;Z!==null&&Z(T,P),m2(n,r,P)}catch(ae){vm(n,r,ae)}finally{y!==null&&T.types!==null&&(y.types=T.types),ge.T=y}}else try{y=a(p,c),m2(n,r,y)}catch(ae){vm(n,r,ae)}}function m2(n,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){y2(n,r,c)},function(c){return vm(n,r,c)}):y2(n,r,a)}function y2(n,r,a){r.status="fulfilled",r.value=a,v2(r),n.state=a,r=n.pending,r!==null&&(a=r.next,a===r?n.pending=null:(a=a.next,r.next=a,g2(n,a)))}function vm(n,r,a){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=a,v2(r),r=r.next;while(r!==c)}n.action=null}function v2(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function b2(n,r){return r}function x2(n,r){if(Kt){var a=kn.formState;if(a!==null){e:{var c=It;if(Kt){if(Mn){t:{for(var p=Mn,y=Ti;p.nodeType!==8;){if(!y){p=null;break t}if(p=Oi(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Mn=Oi(p.nextSibling),c=p.data==="F!";break e}}da(c)}c=!1}c&&(r=a[0])}}return a=_r(),a.memoizedState=a.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:b2,lastRenderedState:r},a.queue=c,a=U2.bind(null,It,c),c.dispatch=a,c=ym(!1),y=Cm.bind(null,It,!1,c.queue),c=_r(),p={state:r,dispatch:null,action:n,pending:null},c.queue=p,a=HN.bind(null,It,p,y,a),p.dispatch=a,c.memoizedState=n,[r,a,!1]}function S2(n){var r=Yn();return w2(r,Sn,n)}function w2(n,r,a){if(r=gm(n,r,b2)[0],n=sf(_s)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=Bc(r)}catch(T){throw T===ol?$d:T}else c=r;r=Yn();var p=r.queue,y=p.dispatch;return a!==r.memoizedState&&(It.flags|=2048,dl(9,{destroy:void 0},FN.bind(null,p,a),null)),[c,y,n]}function FN(n,r){n.action=r}function E2(n){var r=Yn(),a=Sn;if(a!==null)return w2(r,a,n);Yn(),r=r.memoizedState,a=Yn();var c=a.queue.dispatch;return a.memoizedState=n,[r,c,!1]}function dl(n,r,a,c){return n={tag:n,create:a,deps:c,inst:r,next:null},r=It.updateQueue,r===null&&(r=nf(),It.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=n.next=n:(c=a.next,a.next=n,n.next=c,r.lastEffect=n),n}function C2(){return Yn().memoizedState}function af(n,r,a,c){var p=_r();It.flags|=n,p.memoizedState=dl(1|r,{destroy:void 0},a,c===void 0?null:c)}function of(n,r,a,c){var p=Yn();c=c===void 0?null:c;var y=p.memoizedState.inst;Sn!==null&&c!==null&&cm(c,Sn.memoizedState.deps)?p.memoizedState=dl(r,y,a,c):(It.flags|=n,p.memoizedState=dl(1|r,y,a,c))}function R2(n,r){af(8390656,8,n,r)}function bm(n,r){of(2048,8,n,r)}function BN(n){It.flags|=4;var r=It.updateQueue;if(r===null)r=nf(),It.updateQueue=r,r.events=[n];else{var a=r.events;a===null?r.events=[n]:a.push(n)}}function T2(n){var r=Yn().memoizedState;return BN({ref:r,nextImpl:n}),function(){if((cn&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function k2(n,r){return of(4,2,n,r)}function O2(n,r){return of(4,4,n,r)}function A2(n,r){if(typeof r=="function"){n=n();var a=r(n);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function M2(n,r,a){a=a!=null?a.concat([n]):null,of(4,4,A2.bind(null,r,n),a)}function xm(){}function N2(n,r){var a=Yn();r=r===void 0?null:r;var c=a.memoizedState;return r!==null&&cm(r,c[1])?c[0]:(a.memoizedState=[n,r],n)}function D2(n,r){var a=Yn();r=r===void 0?null:r;var c=a.memoizedState;if(r!==null&&cm(r,c[1]))return c[0];if(c=n(),yo){$e(!0);try{n()}finally{$e(!1)}}return a.memoizedState=[c,r],c}function Sm(n,r,a){return a===void 0||(zs&1073741824)!==0&&(Jt&261930)===0?n.memoizedState=r:(n.memoizedState=a,n=B1(),It.lanes|=n,Ea|=n,a)}function j2(n,r,a,c){return li(a,r)?a:ya.current!==null?(n=Sm(n,a,c),li(n,r)||(Zn=!0),n):(zs&106)===0||(zs&1073741824)!==0&&(Jt&261930)===0?(Zn=!0,n.memoizedState=a):(n=B1(),It.lanes|=n,Ea|=n,r)}function I2(n,r,a,c,p){var y=ue.p;ue.p=y!==0&&8>y?y:8;var T=ge.T,P={};P.types=T!==null?T.types:null,ge.T=P,Cm(n,!1,r,a);try{var Z=p(),ae=ge.S;if(ae!==null&&ae(P,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var pe=zN(Z,c);Vc(n,r,pe,hi(n))}else Vc(n,r,c,hi(n))}catch(Re){Vc(n,r,{then:function(){},status:"rejected",reason:Re},hi())}finally{ue.p=y,T!==null&&P.types!==null&&(T.types=P.types),ge.T=T}}function VN(){}function wm(n,r,a,c){if(n.tag!==5)throw Error(s(476));var p=P2(n).queue;I2(n,p,r,Te,a===null?VN:function(){return L2(n),a(c)})}function P2(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:Te,baseState:Te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_s,lastRenderedState:Te},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_s,lastRenderedState:a},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function L2(n){var r=P2(n);r.next===null&&(r=n.alternate.memoizedState),Vc(n,r.next.queue,{},hi())}function Em(){return vr(Ml)}function z2(){return Yn().memoizedState}function _2(){return Yn().memoizedState}function KN(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var a=hi();n=ga(a);var c=ma(r,n,a);c!==null&&(Xr(c,r,a),zc(c,r,a)),r={cache:Zg()},n.payload=r;return}r=r.return}}function qN(n,r,a){var c=hi();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},lf(n)?H2(r,a):(a=Bg(n,r,a,c),a!==null&&(Xr(a,n,c),F2(a,r,c)))}function U2(n,r,a){var c=hi();Vc(n,r,a,c)}function Vc(n,r,a,c){var p={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(lf(n))H2(r,p);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var T=r.lastRenderedState,P=y(T,a);if(p.hasEagerState=!0,p.eagerState=P,li(P,T))return _d(n,r,p,0),kn===null&&zd(),!1}catch{}if(a=Bg(n,r,p,c),a!==null)return Xr(a,n,c),F2(a,r,c),!0}return!1}function Cm(n,r,a,c){if(c={lane:2,revertLane:p0(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},lf(n)){if(r)throw Error(s(479))}else r=Bg(n,a,c,2),r!==null&&Xr(r,n,2)}function lf(n){var r=n.alternate;return n===It||r!==null&&r===It}function H2(n,r){cl=ef=!0;var a=n.pending;a===null?r.next=r:(r.next=a.next,a.next=r),n.pending=r}function F2(n,r,a){if((a&4194048)!==0){var c=r.lanes;c&=n.pendingLanes,a|=c,r.lanes=a,On(n,a)}}var cf={readContext:vr,use:rf,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},B2={readContext:vr,use:rf,useCallback:function(n,r){return _r().memoizedState=[n,r===void 0?null:r],n},useContext:vr,useEffect:R2,useImperativeHandle:function(n,r,a){a=a!=null?a.concat([n]):null,af(4194308,4,A2.bind(null,r,n),a)},useLayoutEffect:function(n,r){return af(4194308,4,n,r)},useInsertionEffect:function(n,r){af(4,2,n,r)},useMemo:function(n,r){var a=_r();r=r===void 0?null:r;var c=n();if(yo){$e(!0);try{n()}finally{$e(!1)}}return a.memoizedState=[c,r],c},useReducer:function(n,r,a){var c=_r();if(a!==void 0){var p=a(r);if(yo){$e(!0);try{a(r)}finally{$e(!1)}}}else p=r;return c.memoizedState=c.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},c.queue=n,n=n.dispatch=qN.bind(null,It,n),[c.memoizedState,n]},useRef:function(n){var r=_r();return n={current:n},r.memoizedState=n},useState:function(n){n=ym(n);var r=n.queue,a=U2.bind(null,It,r);return r.dispatch=a,[n.memoizedState,a]},useDebugValue:xm,useDeferredValue:function(n,r){var a=_r();return Sm(a,n,r)},useTransition:function(){var n=ym(!1);return n=I2.bind(null,It,n.queue,!0,!1),_r().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,a){var c=It,p=_r();if(Kt){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),kn===null)throw Error(s(349));(Jt&127)!==0||c2(c,r,a)}p.memoizedState=a;var y={value:a,getSnapshot:r};return p.queue=y,R2(d2.bind(null,c,y,n),[n]),c.flags|=2048,dl(9,{destroy:void 0},u2.bind(null,c,y,a,r),null),a},useId:function(){var n=_r(),r=kn.identifierPrefix;if(Kt){var a=ns,c=ts;a=(c&~(1<<32-et(c)-1)).toString(32)+a,r="_"+r+"R_"+a,a=tf++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=_N++,r="_"+r+"r_"+a.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:Em,useFormState:x2,useActionState:x2,useOptimistic:function(n){var r=_r();r.memoizedState=r.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=Cm.bind(null,It,!0,a),a.dispatch=r,[n,r]},useMemoCache:pm,useCacheRefresh:function(){return _r().memoizedState=KN.bind(null,It)},useEffectEvent:function(n){var r=_r(),a={impl:n};return r.memoizedState=a,function(){if((cn&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},V2={readContext:vr,use:rf,useCallback:N2,useContext:vr,useEffect:bm,useImperativeHandle:M2,useInsertionEffect:k2,useLayoutEffect:O2,useMemo:D2,useReducer:sf,useRef:C2,useState:function(){return sf(_s)},useDebugValue:xm,useDeferredValue:function(n,r){var a=Yn();return j2(a,Sn.memoizedState,n,r)},useTransition:function(){var n=sf(_s)[0],r=Yn().memoizedState;return[typeof n=="boolean"?n:Bc(n),r]},useSyncExternalStore:l2,useId:z2,useHostTransitionStatus:Em,useFormState:S2,useActionState:S2,useOptimistic:function(n,r){var a=Yn();return p2(a,Sn,n,r)},useMemoCache:pm,useCacheRefresh:_2,useEffectEvent:T2},YN={readContext:vr,use:rf,useCallback:N2,useContext:vr,useEffect:bm,useImperativeHandle:M2,useInsertionEffect:k2,useLayoutEffect:O2,useMemo:D2,useReducer:mm,useRef:C2,useState:function(){return mm(_s)},useDebugValue:xm,useDeferredValue:function(n,r){var a=Yn();return Sn===null?Sm(a,n,r):j2(a,Sn.memoizedState,n,r)},useTransition:function(){var n=mm(_s)[0],r=Yn().memoizedState;return[typeof n=="boolean"?n:Bc(n),r]},useSyncExternalStore:l2,useId:z2,useHostTransitionStatus:Em,useFormState:E2,useActionState:E2,useOptimistic:function(n,r){var a=Yn();return Sn!==null?p2(a,Sn,n,r):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:pm,useCacheRefresh:_2,useEffectEvent:T2};function Rm(n,r,a,c){r=n.memoizedState,a=a(c,r),a=a==null?r:D({},r,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var Tm={enqueueSetState:function(n,r,a){n=n._reactInternals;var c=hi(),p=ga(c);p.payload=r,a!=null&&(p.callback=a),r=ma(n,p,c),r!==null&&(Xr(r,n,c),zc(r,n,c))},enqueueReplaceState:function(n,r,a){n=n._reactInternals;var c=hi(),p=ga(c);p.tag=1,p.payload=r,a!=null&&(p.callback=a),r=ma(n,p,c),r!==null&&(Xr(r,n,c),zc(r,n,c))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var a=hi(),c=ga(a);c.tag=2,r!=null&&(c.callback=r),r=ma(n,c,a),r!==null&&(Xr(r,n,a),zc(r,n,a))}};function K2(n,r,a,c,p,y,T){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,y,T):r.prototype&&r.prototype.isPureReactComponent?!Ac(a,c)||!Ac(p,y):!0}function q2(n,r,a,c){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==n&&Tm.enqueueReplaceState(r,r.state,null)}function vo(n,r){var a=r;if("ref"in r){a={};for(var c in r)c!=="ref"&&(a[c]=r[c])}if(n=n.defaultProps){a===r&&(a=D({},a));for(var p in n)a[p]===void 0&&(a[p]=n[p])}return a}function Y2(n){Ld(n)}function G2(n){console.error(n)}function $2(n){Ld(n)}function uf(n,r){try{var a=n.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function Q2(n,r,a){try{var c=n.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function km(n,r,a){return a=ga(a),a.tag=3,a.payload={element:null},a.callback=function(){uf(n,r)},a}function X2(n){return n=ga(n),n.tag=3,n}function Z2(n,r,a,c){var p=a.type.getDerivedStateFromError;if(typeof p=="function"){var y=c.value;n.payload=function(){return p(y)},n.callback=function(){Q2(r,a,c)}}var T=a.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(n.callback=function(){Q2(r,a,c),typeof p!="function"&&(Ca===null?Ca=new Set([this]):Ca.add(this));var P=c.stack;this.componentDidCatch(c.value,{componentStack:P!==null?P:""})})}function GN(n,r,a,c,p){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=a.alternate,r!==null&&co(r,a,p,!0),a=br.current,a!==null){switch(a.tag){case 31:case 13:case 19:return kr===null?Nf():a.alternate===null&&Vn===0&&(Vn=3),a.flags&=-257,a.flags|=65536,a.lanes=p,c===Qd?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([c]):r.add(c),d0(n,c,p)),!1;case 22:return a.flags|=65536,c===Qd?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([c]):a.add(c)),d0(n,c,p)),!1}throw Error(s(435,a.tag))}return d0(n,c,p),Nf(),!1}if(Kt)return r=br.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,c!==Gg&&(n=Error(s(422),{cause:c}),Dc(Ei(n,a)))):(c!==Gg&&(r=Error(s(423),{cause:c}),Dc(Ei(r,a))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,c=Ei(c,a),p=km(n.stateNode,c,p),rm(n,p),Vn!==4&&(Vn=2)),!1;var y=Error(s(520),{cause:c});if(y=Ei(y,a),Zc===null?Zc=[y]:Zc.push(y),Vn!==4&&(Vn=2),r===null)return!0;c=Ei(c,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,n=p&-p,a.lanes|=n,n=km(a.stateNode,c,n),rm(a,n),!1;case 1:if(r=a.type,y=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Ca===null||!Ca.has(y))))return a.flags|=65536,p&=-p,a.lanes|=p,p=X2(p),Z2(p,n,a,c),rm(a,p),!1;break;case 22:if(a.memoizedState!==null)return a.flags|=65536,!1}a=a.return}while(a!==null);return!1}var Om=Error(s(461)),Zn=!1;function ir(n,r,a,c){r.child=n===null?t2(r,null,a,c):mo(r,n.child,a,c)}function J2(n,r,a,c,p){a=a.render;var y=r.ref;if("ref"in c){var T={};for(var P in c)P!=="ref"&&(T[P]=c[P])}else T=c;return uo(r),c=um(n,r,a,T,y,p),P=dm(),n!==null&&!Zn?(fm(n,r,p),Us(n,r,p)):(Kt&&P&&Bd(r),r.flags|=1,ir(n,r,c,p),r.child)}function W2(n,r,a,c,p){if(n===null){var y=a.type;return typeof y=="function"&&!Vg(y)&&y.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=y,e1(n,r,y,c,p)):(n=Hd(a.type,null,c,r,r.mode,p),n.ref=r.ref,n.return=r,r.child=n)}if(y=n.child,!Lm(n,p)){var T=y.memoizedProps;if(a=a.compare,a=a!==null?a:Ac,a(T,c)&&n.ref===r.ref)return Us(n,r,p)}return r.flags|=1,n=js(y,c),n.ref=r.ref,n.return=r,r.child=n}function e1(n,r,a,c,p){if(n!==null){var y=n.memoizedProps;if(Ac(y,c)&&n.ref===r.ref)if(Zn=!1,r.pendingProps=c=y,Lm(n,p))(n.flags&131072)!==0&&(Zn=!0);else return r.lanes=n.lanes,Us(n,r,p)}return Am(n,r,a,c,p)}function t1(n,r,a,c){var p=c.children,y=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((r.flags&128)!==0){if(y=y!==null?y.baseLanes|a:a,n!==null){for(c=r.child=n.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~y}else c=0,r.child=null;return n1(n,r,y,a,c)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Gd(r,y!==null?y.cachePool:null),y!==null?i2(r,y):sm(),s2(r);else return c=r.lanes=536870912,n1(n,r,y!==null?y.baseLanes|a:a,a,c)}else y!==null?(Gd(r,y.cachePool),i2(r,y),ba(),r.memoizedState=null):(n!==null&&Gd(r,null),sm(),ba());return ir(n,r,p,a),r.child}function Kc(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function n1(n,r,a,c,p){var y=Wg();return y=y===null?null:{parent:Qn._currentValue,pool:y},r.memoizedState={baseLanes:a,cachePool:y},n!==null&&Gd(r,null),sm(),s2(r),n!==null&&co(n,r,c,!0),r.childLanes=p,null}function df(n,r){return r=ff({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function r1(n,r,a){return mo(r,n.child,null,a),n=df(r,r.pendingProps),n.flags|=2,ci(r),r.memoizedState=null,n}function $N(n,r,a){var c=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Kt){if(c.mode==="hidden")return n=df(r,c),r.lanes=536870912,n.memoizedState={baseLanes:0,cachePool:null},Kc(null,n);if(om(r),(n=Mn)?(n=AS(n,Ti),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ca!==null?{id:ts,overflow:ns}:null,retryLane:536870912,hydrationErrors:null},a=Hx(n),a.return=r,r.child=a,lr=r,Mn=null)):n=null,n===null)throw da(r);return r.lanes=536870912,null}return df(r,c)}var y=n.memoizedState;if(y!==null){var T=y.dehydrated;if(om(r),p)if(r.flags&256)r.flags&=-257,r=r1(n,r,a);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(s(558));else if(Zn||co(n,r,a,!1),p=(a&n.childLanes)!==0,Zn||p){if(ya.current===null){if(c=kn,c!==null&&(T=Yt(c,a),T!==0&&T!==y.retryLane))throw y.retryLane=T,so(n,T),Xr(c,n,T),Om;Nf()}r=r1(n,r,a)}else n=y.treeContext,Mn=Oi(T.nextSibling),lr=r,Kt=!0,ua=null,Ti=!1,n!==null&&Vx(r,n),r=df(r,c),r.flags|=134221824;return r}return n=js(n.child,{mode:c.mode,children:c.children}),n.ref=r.ref,r.child=n,n.return=r,n}function fl(n,r){var a=r.ref;if(a===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(n===null||n.ref!==a)&&(r.flags|=4194816)}}function Am(n,r,a,c,p){return uo(r),a=um(n,r,a,c,void 0,p),c=dm(),n!==null&&!Zn?(fm(n,r,p),Us(n,r,p)):(Kt&&c&&Bd(r),r.flags|=1,ir(n,r,a,p),r.child)}function i1(n,r,a,c,p,y){return uo(r),r.updateQueue=null,a=o2(r,c,a,p),a2(n),c=dm(),n!==null&&!Zn?(fm(n,r,y),Us(n,r,y)):(Kt&&c&&Bd(r),r.flags|=1,ir(n,r,a,y),r.child)}function s1(n,r,a,c,p){if(uo(r),r.stateNode===null){var y=nl,T=a.contextType;typeof T=="object"&&T!==null&&(y=vr(T)),y=new a(c,y),r.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Tm,r.stateNode=y,y._reactInternals=r,y=r.stateNode,y.props=c,y.state=r.memoizedState,y.refs={},tm(r),T=a.contextType,y.context=typeof T=="object"&&T!==null?vr(T):nl,y.state=r.memoizedState,T=a.getDerivedStateFromProps,typeof T=="function"&&(Rm(r,a,T,c),y.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(T=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),T!==y.state&&Tm.enqueueReplaceState(y,y.state,null),Uc(r,c,y,p),_c(),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(n===null){y=r.stateNode;var P=r.memoizedProps,Z=vo(a,P);y.props=Z;var ae=y.context,pe=a.contextType;T=nl,typeof pe=="object"&&pe!==null&&(T=vr(pe));var Re=a.getDerivedStateFromProps;pe=typeof Re=="function"||typeof y.getSnapshotBeforeUpdate=="function",P=r.pendingProps!==P,pe||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(P||ae!==T)&&q2(r,y,c,T),pa=!1;var ie=r.memoizedState;y.state=ie,Uc(r,c,y,p),_c(),ae=r.memoizedState,P||ie!==ae||pa?(typeof Re=="function"&&(Rm(r,a,Re,c),ae=r.memoizedState),(Z=pa||K2(r,a,Z,c,ie,ae,T))?(pe||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(r.flags|=4194308)):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=ae),y.props=c,y.state=ae,y.context=T,c=Z):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{y=r.stateNode,nm(n,r),T=r.memoizedProps,pe=vo(a,T),y.props=pe,Re=r.pendingProps,ie=y.context,ae=a.contextType,Z=nl,typeof ae=="object"&&ae!==null&&(Z=vr(ae)),P=a.getDerivedStateFromProps,(ae=typeof P=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(T!==Re||ie!==Z)&&q2(r,y,c,Z),pa=!1,ie=r.memoizedState,y.state=ie,Uc(r,c,y,p),_c();var fe=r.memoizedState;T!==Re||ie!==fe||pa||n!==null&&n.dependencies!==null&&qd(n.dependencies)?(typeof P=="function"&&(Rm(r,a,P,c),fe=r.memoizedState),(pe=pa||K2(r,a,pe,c,ie,fe,Z)||n!==null&&n.dependencies!==null&&qd(n.dependencies))?(ae||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,fe,Z),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,fe,Z)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=fe),y.props=c,y.state=fe,y.context=Z,c=pe):(typeof y.componentDidUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=1024),c=!1)}return y=c,fl(n,r),c=(r.flags&128)!==0,y||c?(y=r.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:y.render(),r.flags|=1,n!==null&&c?(r.child=mo(r,n.child,null,p),r.child=mo(r,null,a,p)):ir(n,r,a,p),r.memoizedState=y.state,n=r.child):n=Us(n,r,p),n}function a1(n,r,a,c){return oo(),r.flags|=256,ir(n,r,a,c),r.child}var Mm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Nm(n){return{baseLanes:n,cachePool:Qx()}}function Dm(n,r,a){return n=n!==null?n.childLanes&~a:0,r&&(n|=fi),n}function o1(n,r,a){var c=r.pendingProps,p=!1,y=(r.flags&128)!==0,T;if((T=y)||(T=n!==null&&n.memoizedState===null?!1:(xr.current&2)!==0),T&&(p=!0,r.flags&=-129),T=(r.flags&32)!==0,r.flags&=-33,n===null){if(Kt){if(p?va(r):ba(),(n=Mn)?(n=AS(n,Ti),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ca!==null?{id:ts,overflow:ns}:null,retryLane:536870912,hydrationErrors:null},a=Hx(n),a.return=r,r.child=a,lr=r,Mn=null)):n=null,n===null)throw da(r);return N0(n)?r.lanes=32:r.lanes=536870912,null}return y=c.children,c=c.fallback,p?(ba(),p=r.mode,y=ff({mode:"hidden",children:y},p),c=ao(c,p,a,null),y.return=r,c.return=r,y.sibling=c,r.child=y,c=r.child,c.memoizedState=Nm(a),c.childLanes=Dm(n,T,a),r.memoizedState=Mm,Kc(null,c)):(va(r),jm(r,y))}var P=n.memoizedState;if(P!==null){var Z=P.dehydrated;if(Z!==null)return QN(n,r,y,T,c,Z,P,a)}return p?(ba(),p=c.fallback,y=r.mode,P=n.child,Z=P.sibling,c=js(P,{mode:"hidden",children:c.children}),c.subtreeFlags=P.subtreeFlags&1206910976,Z!==null?p=js(Z,p):(p=ao(p,y,a,null),p.flags|=2),p.return=r,c.return=r,c.sibling=p,r.child=c,Kc(null,c),c=r.child,p=n.child.memoizedState,p===null?p=Nm(a):(y=p.cachePool,y!==null?(P=Qn._currentValue,y=y.parent!==P?{parent:P,pool:P}:y):y=Qx(),p={baseLanes:p.baseLanes|a,cachePool:y}),c.memoizedState=p,c.childLanes=Dm(n,T,a),r.memoizedState=Mm,Kc(n.child,c)):(va(r),a=n.child,n=a.sibling,a=js(a,{mode:"visible",children:c.children}),a.return=r,a.sibling=null,n!==null&&(T=r.deletions,T===null?(r.deletions=[n],r.flags|=16):T.push(n)),r.child=a,r.memoizedState=null,a)}function jm(n,r){return r=ff({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function ff(n,r){return n=Yr(22,n,null,r),n.lanes=0,n}function hf(n,r,a){return mo(r,n.child,null,a),n=jm(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function QN(n,r,a,c,p,y,T,P){if(a)return r.flags&256?(va(r),r.flags&=-257,hf(n,r,P)):r.memoizedState!==null?(ba(),r.child=n.child,r.flags|=128,null):(ba(),y=p.fallback,T=r.mode,p=ff({mode:"visible",children:p.children},T),y=ao(y,T,P,null),y.flags|=2,p.return=r,y.return=r,p.sibling=y,r.child=p,mo(r,n.child,null,P),p=r.child,p.memoizedState=Nm(P),p.childLanes=Dm(n,c,P),r.memoizedState=Mm,Kc(null,p));if(va(r),N0(y)){if(c=y.nextSibling&&y.nextSibling.dataset,c)var Z=c.dgst;return c=Z,c!==""&&(p=Error(s(419)),p.stack="",p.digest=c,Dc({value:p,source:null,stack:null})),hf(n,r,P)}if(Zn||co(n,r,P,!1),c=(P&n.childLanes)!==0,Zn||c){if(ya.current!==null)return hf(n,r,P);if(c=kn,c!==null&&(p=Yt(c,P),p!==0&&p!==T.retryLane))throw T.retryLane=p,so(n,p),Xr(c,n,p),Om;return M0(y)||Nf(),hf(n,r,P)}return M0(y)?(r.flags|=192,r.child=n.child,null):(n=T.treeContext,Mn=Oi(y.nextSibling),lr=r,Kt=!0,ua=null,Ti=!1,n!==null&&Vx(r,n),r=jm(r,p.children),r.flags|=134221824,r)}function l1(n,r,a){n.lanes|=r;var c=n.alternate;c!==null&&(c.lanes|=r),Kd(n.return,r,a)}function c1(n){for(var r=null;n!==null;){var a=n.alternate;a!==null&&Wd(a)===null&&(r=n),n=n.sibling}return r}function pf(n,r,a,c,p,y){var T=n.memoizedState;T===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:p,treeForkCount:y}:(T.isBackwards=r,T.rendering=null,T.renderingStartTime=0,T.last=c,T.tail=a,T.tailMode=p,T.treeForkCount=y)}function Im(n){var r=n.child;for(n.child=null;r!==null;){var a=r.sibling;r.sibling=n.child,n.child=r,r=a}}function Pm(n,r,a){var c=r.pendingProps,p=c.revealOrder,y=c.tail;c=c.children;var T=xr.current;if(r.flags&128)return Hc(r,T),null;var P=(T&2)!==0;if(P?(T=T&1|2,r.flags|=128):T&=1,Hc(r,T),p==="backwards"&&n!==null?(Im(n),ir(n,r,c,a),Im(n)):ir(n,r,c,a),c=Kt?Nc:0,!P&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&l1(n,a,r);else if(n.tag===19)l1(n,a,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"backwards":a=c1(r.child),a===null?(p=r.child,r.child=null):(p=a.sibling,a.sibling=null,Im(r)),pf(r,!0,p,null,y,c);break;case"unstable_legacy-backwards":for(a=null,p=r.child,r.child=null;p!==null;){if(n=p.alternate,n!==null&&Wd(n)===null){r.child=p;break}n=p.sibling,p.sibling=a,a=p,p=n}pf(r,!0,a,null,y,c);break;case"together":pf(r,!1,null,null,void 0,c);break;case"independent":r.memoizedState=null;break;default:a=c1(r.child),a===null?(p=r.child,r.child=null):(p=a.sibling,a.sibling=null),pf(r,!1,p,a,y,c)}return r.child}function u1(n,r,a){var c=r.pendingProps;return fa(r,r.type,c.value),ir(n,r,c.children,a),r.child}function Us(n,r,a){if(n!==null&&(r.dependencies=n.dependencies),Ea|=r.lanes,(a&r.childLanes)===0)if(n!==null){if(co(n,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(s(153));if(r.child!==null){for(n=r.child,a=js(n,n.pendingProps),r.child=a,a.return=r;n.sibling!==null;)n=n.sibling,a=a.sibling=js(n,n.pendingProps),a.return=r;a.sibling=null}return r.child}function Lm(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&qd(n)))}function XN(n,r,a){switch(r.tag){case 3:Ze(r,r.stateNode.containerInfo),fa(r,Qn,n.memoizedState.cache),oo();break;case 27:case 5:de(r);break;case 4:Ze(r,r.stateNode.containerInfo);break;case 10:fa(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,om(r),null;break;case 13:var c=r.memoizedState;if(c!==null){if(c.dehydrated!==null)return va(r),r.flags|=128,null;c=co(n,r,a,!1);var p=r.child.childLanes;return c||(a&p)!==0?o1(n,r,a):(va(r),n=Us(n,r,a),n!==null?n.sibling:null)}va(r);break;case 19:if(r.flags&128)return Pm(n,r,a);if(p=(n.flags&128)!==0,c=(a&r.childLanes)!==0,c||(co(n,r,a,!1),c=(a&r.childLanes)!==0),p){if(c)return Pm(n,r,a);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Hc(r,xr.current),c)break;return null;case 22:return r.lanes=0,t1(n,r,a,r.pendingProps);case 24:fa(r,Qn,n.memoizedState.cache)}return Us(n,r,a)}function d1(n,r,a){if(n!==null)if(n.memoizedProps!==r.pendingProps)Zn=!0;else{if(!Lm(n,a)&&(r.flags&128)===0)return Zn=!1,XN(n,r,a);Zn=(n.flags&131072)!==0}else Zn=!1,Kt&&(r.flags&1048576)!==0&&Bx(r,Nc,r.index);switch(r.lanes=0,r.tag){case 16:e:{var c=r.pendingProps;if(n=po(r.elementType),r.type=n,typeof n=="function")Vg(n)?(c=vo(n,c),r.tag=1,r=s1(null,r,n,c,a)):(r.tag=0,r=Am(null,r,n,c,a));else{if(n!=null){var p=n.$$typeof;if(p===z){r.tag=11,r=J2(null,r,n,c,a);break e}else if(p===K){r.tag=14,r=W2(null,r,n,c,a);break e}else if(p===U){r.tag=10,r.type=n,r=u1(null,r,a);break e}}throw r=le(n)||n,Error(s(306,r,""))}}return r;case 0:return Am(n,r,r.type,r.pendingProps,a);case 1:return c=r.type,p=vo(c,r.pendingProps),s1(n,r,c,p,a);case 3:e:{if(Ze(r,r.stateNode.containerInfo),n===null)throw Error(s(387));c=r.pendingProps;var y=r.memoizedState;p=y.element,nm(n,r),Uc(r,c,null,a);var T=r.memoizedState;if(c=T.cache,fa(r,Qn,c),c!==y.cache&&Xg(r,[Qn],a,!0),_c(),c=T.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:T.cache},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){r=a1(n,r,c,a);break e}else if(c!==p){p=Ei(Error(s(424)),r),Dc(p),r=a1(n,r,c,a);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Mn=Oi(n.firstChild),lr=r,Kt=!0,ua=null,Ti=!0,a=t2(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|134221824,a=a.sibling;else{if(oo(),c===p){r=Us(n,r,a);break e}ir(n,r,c,a)}r=r.child}return r;case 26:return fl(n,r),n===null?(a=LS(r.type,null,r.pendingProps,null))?r.memoizedState=a:Kt||(r.stateNode=gS(r.type,r.pendingProps,be.current,r)):r.memoizedState=LS(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return de(r),n===null&&Kt&&(c=r.stateNode=DS(r.type,r.pendingProps,be.current),lr=r,Ti=!0,p=Mn,ka(r.type)?(D0=p,Mn=Oi(c.firstChild)):Mn=p),ir(n,r,r.pendingProps.children,a),fl(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Kt&&((p=c=Mn)&&(c=KD(c,r.type,r.pendingProps,Ti),c!==null?(r.stateNode=c,lr=r,Mn=Oi(c.firstChild),Ti=!1,p=!0):p=!1),p||da(r)),de(r),p=r.type,y=r.pendingProps,T=n!==null?n.memoizedProps:null,c=y.children,E0(p,y)?c=null:T!==null&&E0(p,T)&&(r.flags|=32),r.memoizedState!==null&&(p=um(n,r,UN,null,null,a),Ml._currentValue=p),fl(n,r),ir(n,r,c,a),r.child;case 6:return n===null&&Kt&&((n=a=Mn)&&(a=qD(a,r.pendingProps,Ti),a!==null?(r.stateNode=a,lr=r,Mn=null,n=!0):n=!1),n||da(r)),null;case 13:return o1(n,r,a);case 4:return Ze(r,r.stateNode.containerInfo),c=r.pendingProps,n===null?r.child=mo(r,null,c,a):ir(n,r,c,a),r.child;case 11:return J2(n,r,r.type,r.pendingProps,a);case 7:return c=r.pendingProps,fl(n,r),ir(n,r,c,a),r.child;case 8:return ir(n,r,r.pendingProps.children,a),r.child;case 12:return ir(n,r,r.pendingProps.children,a),r.child;case 10:return u1(n,r,a);case 9:return p=r.type._context,c=r.pendingProps.children,uo(r),p=vr(p),c=c(p),r.flags|=1,ir(n,r,c,a),r.child;case 14:return W2(n,r,r.type,r.pendingProps,a);case 15:return e1(n,r,r.type,r.pendingProps,a);case 19:return Pm(n,r,a);case 31:return $N(n,r,a);case 22:return t1(n,r,a,r.pendingProps);case 24:return uo(r),c=vr(Qn),n===null?(p=Wg(),p===null&&(p=kn,y=Zg(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=a),p=y),r.memoizedState={parent:c,cache:p},tm(r),fa(r,Qn,p)):((n.lanes&a)!==0&&(nm(n,r),Uc(r,null,null,a),_c()),p=n.memoizedState,y=r.memoizedState,p.parent!==c?(p={parent:c,cache:c},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),fa(r,Qn,c)):(c=y.cache,fa(r,Qn,c),c!==p.cache&&Xg(r,[Qn],a,!0))),ir(n,r,r.pendingProps.children,a),r.child;case 30:return r.stateNode===null&&(r.stateNode={autoName:null,paired:null,clones:null,ref:null}),c=r.pendingProps,c.name!=null&&c.name!=="auto"?r.flags|=n===null?18882560:18874368:Kt&&Bd(r),n!==null&&n.memoizedProps.name!==c.name?r.flags|=4194816:fl(n,r),ir(n,r,c.children,a),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function Hs(n){n.flags|=4}function zm(n,r,a,c,p){var y;if((y=(n.mode&32)!==0)&&(y=a===null?HS(r,c):HS(r,c)&&(c.src!==a.src||c.srcSet!==a.srcSet)),y){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(Y1())n.flags|=8192;else throw go=Qd,em}else n.flags&=-16777217}function f1(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!FS(r))if(Y1())n.flags|=8192;else throw go=Qd,em}function gf(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?tt():536870912,n.lanes|=r,yl|=r)}function qc(n,r){if(!Kt)switch(n.tailMode){case"visible":break;case"collapsed":for(var a=n.tail,c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null;break;default:for(r=n.tail,a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?n.tail=null:a.sibling=null}}function Nn(n){var r=n.alternate!==null&&n.alternate.child===n.child,a=0,c=0;if(r)for(var p=n.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags&1206910976,c|=p.flags&1206910976,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=c,n.childLanes=a,r}function ZN(n,r,a){var c=r.pendingProps;switch(Yg(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nn(r),null;case 1:return Nn(r),null;case 3:return a=r.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),Ls(Qn),ot(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&(sl(r)?Hs(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,$g())),Nn(r),null;case 26:var p=r.type,y=r.memoizedState;return n===null?(Hs(r),y!==null?(Nn(r),f1(r,y)):(Nn(r),zm(r,p,null,c,a))):y?y!==n.memoizedState?(Hs(r),Nn(r),f1(r,y)):(Nn(r),r.flags&=-16777217):(n=n.memoizedProps,n!==c&&Hs(r),Nn(r),zm(r,p,n,c,a)),null;case 27:if(we(r),a=be.current,p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==c&&Hs(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Nn(r),r.subtreeFlags&=-33554433,null}n=ke.current,sl(r)?Kx(r):(n=DS(p,c,a),r.stateNode=n,Hs(r))}return Nn(r),r.subtreeFlags&=-33554433,null;case 5:if(we(r),p=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==c&&Hs(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Nn(r),r.subtreeFlags&=-33554433,null}if(y=ke.current,sl(r))Kx(r);else{var T=nu(be.current);switch(y){case 1:y=T.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=T.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=T.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=T.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=T.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof c.is=="string"?T.createElement("select",{is:c.is}):T.createElement("select"),c.multiple?y.multiple=!0:c.size&&(y.size=c.size);break;default:y=typeof c.is=="string"?T.createElement(p,{is:c.is}):T.createElement(p)}}y[fn]=r,y[An]=c;e:for(T=r.child;T!==null;){if(T.tag===5||T.tag===6)y.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&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}r.stateNode=y;e:switch(wr(y,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Hs(r)}}return Nn(r),r.subtreeFlags&=-33554433,zm(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,a),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==c&&Hs(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(s(166));if(n=be.current,sl(r)){if(n=r.stateNode,a=r.memoizedProps,c=null,p=lr,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}n[fn]=r,n=!!(n.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||dS(n.nodeValue,a)),n||da(r,!0)}else n=nu(n).createTextNode(c),n[fn]=r,r.stateNode=n}return Nn(r),null;case 31:if(a=r.memoizedState,n===null||n.memoizedState!==null){if(c=sl(r),a!==null){if(n===null){if(!c)throw Error(s(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[fn]=r}else oo(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Nn(r),n=!1}else a=$g(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return r.flags&256?(ci(r),r):(ci(r),null);if((r.flags&128)!==0)throw Error(s(558))}return Nn(r),null;case 13:if(c=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=sl(r),c!==null&&c.dehydrated!==null){if(n===null){if(!p)throw Error(s(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(s(317));p[fn]=r}else oo(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Nn(r),p=!1}else p=$g(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(ci(r),r):(ci(r),null)}return ci(r),(r.flags&128)!==0?(r.lanes=a,r):(a=c!==null,n=n!==null&&n.memoizedState!==null,a&&(c=r.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==p&&(c.flags|=2048)),a!==n&&a&&(r.child.flags|=8192),gf(r,r.updateQueue),Nn(r),null);case 4:return ot(),n===null&&v0(r.stateNode.containerInfo),r.flags|=67108864,Nn(r),null;case 10:return Ls(r.type),Nn(r),null;case 19:if(lm(r),c=r.memoizedState,c===null)return Nn(r),null;if(p=(r.flags&128)!==0,y=c.rendering,y===null)if(p)qc(c,!1);else{if(Vn!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(y=Wd(n),y!==null){for(r.flags|=128,qc(c,!1),n=y.updateQueue,r.updateQueue=n,gf(r,n),r.subtreeFlags=0,n=a,a=r.child;a!==null;)Ux(a,n),a=a.sibling;return Hc(r,xr.current&1|2),Kt&&Is(r,c.treeForkCount),r.child}n=n.sibling}c.tail!==null&&wt()>kf&&(r.flags|=128,p=!0,qc(c,!1),r.lanes=4194304)}else{if(!p)if(n=Wd(y),n!==null){if(r.flags|=128,p=!0,n=n.updateQueue,r.updateQueue=n,gf(r,n),qc(c,!0),c.tail===null&&c.tailMode!=="collapsed"&&c.tailMode!=="visible"&&!y.alternate&&!Kt)return Nn(r),null}else 2*wt()-c.renderingStartTime>kf&&a!==536870912&&(r.flags|=128,p=!0,qc(c,!1),r.lanes=4194304);c.isBackwards?(y.sibling=r.child,r.child=y):(n=c.last,n!==null?n.sibling=y:r.child=y,c.last=y)}if(c.tail!==null){n=c.tail;e:{for(a=n;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return c.rendering=n,c.tail=n.sibling,c.renderingStartTime=wt(),n.sibling=null,y=xr.current,y=p?y&1|2:y&1,c.tailMode==="visible"||c.tailMode==="collapsed"||!a||Kt?Hc(r,y):(a=y,Ve(br,r),Ve(xr,a),kr===null&&(kr=r)),Kt&&Is(r,c.treeForkCount),n}return Nn(r),null;case 22:case 23:return ci(r),am(),c=r.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(a&536870912)!==0&&(r.flags&128)===0&&(Nn(r),r.subtreeFlags&6&&(r.flags|=8192)):Nn(r),a=r.updateQueue,a!==null&&gf(r,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==a&&(r.flags|=2048),n!==null&&Le(ho),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),Ls(Qn),Nn(r),null;case 25:return null;case 30:return r.flags|=33554432,Nn(r),null}throw Error(s(156,r.tag))}function JN(n,r){switch(Yg(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Ls(Qn),ot(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return we(r),null;case 31:if(r.memoizedState!==null){if(ci(r),r.alternate===null)throw Error(s(340));oo()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(ci(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(s(340));oo()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return lm(r),n=r.flags,n&65536?(r.flags=n&-65537|128,n=r.memoizedState,n!==null&&(n.rendering=null,n.tail=null),r.flags|=4,r):null;case 4:return ot(),null;case 10:return Ls(r.type),null;case 22:case 23:return ci(r),am(),n!==null&&Le(ho),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return Ls(Qn),null;case 25:return null;default:return null}}function h1(n,r){switch(Yg(r),r.tag){case 3:Ls(Qn),ot();break;case 26:case 27:case 5:we(r);break;case 4:ot();break;case 31:r.memoizedState!==null&&ci(r);break;case 13:ci(r);break;case 19:lm(r);break;case 10:Ls(r.type);break;case 22:case 23:ci(r),am(),n!==null&&Le(ho);break;case 24:Ls(Qn)}}function Yc(n,r){try{var a=r.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var p=c.next;a=p;do{if((a.tag&n)===n){c=void 0;var y=a.create,T=a.inst;c=y(),T.destroy=c}a=a.next}while(a!==p)}}catch(P){yn(r,r.return,P)}}function xa(n,r,a){try{var c=r.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var y=p.next;c=y;do{if((c.tag&n)===n){var T=c.inst,P=T.destroy;if(P!==void 0){T.destroy=void 0,p=r;var Z=a,ae=P;try{ae()}catch(pe){yn(p,Z,pe)}}}c=c.next}while(c!==y)}}catch(pe){yn(r,r.return,pe)}}function p1(n){var r=n.updateQueue;if(r!==null){var a=n.stateNode;try{r2(r,a)}catch(c){yn(n,n.return,c)}}}function g1(n,r,a){a.props=vo(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(c){yn(n,r,c)}}function rs(n,r){try{var a=n.ref;if(a!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:var p=n.stateNode,y=Ns(n.memoizedProps,p);(p.ref===null||p.ref.name!==y)&&(p.ref=wS(y)),c=p.ref;break;case 7:if(n.stateNode===null){var T=new pi(n);h(n.child,!1,BD,T,void 0,void 0),n.stateNode=T}c=n.stateNode;break;default:c=n.stateNode}typeof a=="function"?n.refCleanup=a(c):a.current=c}}catch(P){yn(n,r,P)}}function Sr(n,r){var a=n.ref,c=n.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(p){yn(n,r,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(p){yn(n,r,p)}else a.current=null}function mf(n,r){if((n.tag===5||n.tag===27||n.tag===6)&&n.alternate===null&&r!==null)for(var a=0;a<r.length;a++)OS(n.stateNode,r[a])}function m1(n){for(var r=n.return;r!==null&&(Um(r)&&OS(n.stateNode,r.stateNode),!_m(r));)r=r.return}function Gc(n){for(var r=n.return;r!==null&&(Um(r)&&VD(n.stateNode,r.stateNode),!_m(r));)r=r.return}function _m(n){return n.tag===5||n.tag===3||n.tag===27}function Um(n){return n&&n.tag===7&&n.stateNode!==null}function Hm(n){var r=n.type,a=n.memoizedProps,c=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break e;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(p){yn(n,n.return,p)}}function Fm(n,r,a){try{var c=n.stateNode;CD(c,n.type,a,r),c[An]=r}catch(p){yn(n,n.return,p)}}function y1(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ka(n.type)||n.tag===4}function Bm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||y1(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ka(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Vm(n,r,a,c){var p=n.tag;if(p===5||p===6)p=n.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(p,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(p),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Lr)),mf(n,c),mt=!0;else if(p!==4&&(p===27&&(mf(n,c),c=null,ka(n.type)&&(a=n.stateNode,r=null)),n=n.child,n!==null))for(Vm(n,r,a,c),n=n.sibling;n!==null;)Vm(n,r,a,c),n=n.sibling}function yf(n,r,a,c){var p=n.tag;if(p===5||p===6)p=n.stateNode,r?a.insertBefore(p,r):a.appendChild(p),mf(n,c),mt=!0;else if(p!==4&&(p===27&&(mf(n,c),c=null,ka(n.type)&&(a=n.stateNode)),n=n.child,n!==null))for(yf(n,r,a,c),n=n.sibling;n!==null;)yf(n,r,a,c),n=n.sibling}function v1(n){var r=n.stateNode,a=n.memoizedProps;try{for(var c=n.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);wr(r,c,a),r[fn]=n,r[An]=a}catch(y){yn(n,n.return,y)}}var vf=!1,ui=null;function b1(n){(n.tag===30||(n.subtreeFlags&33554432)!==0)&&(vf=!0)}var is=null;function x1(){var n=is;return is=null,n}var Gr=0;function hl(n,r,a,c,p){return Gr=0,S1(n.child,r,a,c,p)}function S1(n,r,a,c,p){for(var y=!1;n!==null;){if(n.tag===5){var T=n.stateNode;if(c!==null){var P=T0(T);c.push(P),P.view&&(y=!0)}else y||T0(T).view&&(y=!0);vf=!0,xS(T,Gr===0?r:r+"_"+Gr,a),Gr++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&p||S1(n.child,r,a,c,p)&&(y=!0));n=n.sibling}return y}function ss(n,r){for(;n!==null;)n.tag===5?SS(n.stateNode,n.memoizedProps):(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&r||ss(n.child,r)),n=n.sibling}function bf(n){if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if((n.tag!==22||n.memoizedState===null)&&(bf(n),n.tag===30&&(n.flags&18874368)!==0&&n.stateNode.paired)){var r=n.memoizedProps;if(r.name==null||r.name==="auto")throw Error(s(544));var a=r.name;r=Ds(r.default,r.share),r!=="none"&&(hl(n,a,r,null,!1)||ss(n.child,!1))}n=n.sibling}}function Km(n,r){if(n.tag===30){var a=n.stateNode,c=n.memoizedProps,p=Ns(c,a),y=Ds(c.default,a.paired?c.share:c.enter);y!=="none"?hl(n,p,y,null,!1)?(bf(n),a.paired||r||Sl(n,c.onEnter)):ss(n.child,!1):bf(n)}else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)Km(n,r),n=n.sibling;else bf(n)}function qm(n){if(ui!==null&&ui.size!==0){var r=ui;if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if(n.tag!==22||n.memoizedState===null){if(n.tag===30&&(n.flags&18874368)!==0){var a=n.memoizedProps,c=a.name;if(c!=null&&c!=="auto"){var p=r.get(c);if(p!==void 0){var y=Ds(a.default,a.share);if(y!=="none"&&(hl(n,c,y,null,!1)?(y=n.stateNode,p.paired=y,y.paired=p,Sl(n,a.onShare)):ss(n.child,!1)),r.delete(c),r.size===0)break}}}qm(n)}n=n.sibling}}}function Ym(n){if(n.tag===30){var r=n.memoizedProps,a=Ns(r,n.stateNode),c=ui!==null?ui.get(a):void 0,p=Ds(r.default,c!==void 0?r.share:r.exit);p!=="none"&&(hl(n,a,p,null,!1)?c!==void 0?(p=n.stateNode,c.paired=p,p.paired=c,ui.delete(a),Sl(n,r.onShare)):Sl(n,r.onExit):ss(n.child,!1)),ui!==null&&qm(n)}else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)Ym(n),n=n.sibling;else ui!==null&&qm(n)}function w1(n){for(n=n.child;n!==null;){if(n.tag===30){var r=n.memoizedProps,a=Ns(r,n.stateNode);r=Ds(r.default,r.update),n.flags&=-5,r!=="none"&&hl(n,a,r,n.memoizedState=[],!1)}else(n.subtreeFlags&33554432)!==0&&w1(n);n=n.sibling}}function Gm(n){if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if(n.tag!==22||n.memoizedState===null){if(n.tag===30&&(n.flags&18874368)!==0){var r=n.stateNode;r.paired!==null&&(r.paired=null,ss(n.child,!1))}Gm(n)}n=n.sibling}}function xf(n){if(n.tag===30)n.stateNode.paired=null,ss(n.child,!1),Gm(n);else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)xf(n),n=n.sibling;else Gm(n)}function E1(n){for(n=n.child;n!==null;)n.tag===30?ss(n.child,!1):(n.subtreeFlags&33554432)!==0&&E1(n),n=n.sibling}function $m(n,r,a,c,p,y,T){for(var P=!1;r!==null;){if(r.tag===5){var Z=r.stateNode;if(y!==null&&Gr<y.length){var ae=y[Gr],pe=T0(Z);(ae.view||pe.view)&&(P=!0);var Re;if(Re=(n.flags&4)===0)if(pe.clip)Re=!0;else{Re=ae.rect;var ie=pe.rect;Re=Re.y!==ie.y||Re.x!==ie.x||Re.height!==ie.height||Re.width!==ie.width}Re&&(n.flags|=4),pe.abs?pe=!ae.abs:(ae=ae.rect,pe=pe.rect,pe=ae.height!==pe.height||ae.width!==pe.width),pe&&(n.flags|=32)}else n.flags|=32;(n.flags&4)!==0&&xS(Z,Gr===0?a:a+"_"+Gr,p),P&&(n.flags&4)!==0||(is===null&&(is=[]),is.push(Z,Gr===0?c:c+"_"+Gr,r.memoizedProps)),Gr++}else(r.tag!==22||r.memoizedState===null)&&(r.tag===30&&T?n.flags|=r.flags&32:$m(n,r.child,a,c,p,y,T)&&(P=!0));r=r.sibling}return P}function C1(n,r){for(n=n.child;n!==null;){if(n.tag===30){var a=n.memoizedProps,c=n.stateNode,p=Ns(a,c),y=Ds(a.default,a.update),T;T=n.memoizedState,n.memoizedState=null,c=n;var P=n.child;Gr=0,p=$m(c,P,p,p,y,T,!1),(n.flags&4)!==0&&p&&Sl(n,a.onUpdate)}else(n.subtreeFlags&33554432)!==0&&C1(n);n=n.sibling}}var cr=!1,pn=!1,as=!1,Qm=!1,R1=typeof WeakSet=="function"?WeakSet:Set,ur=null,os=!1,$c=!1,Sf=!1,Xm=!1;function WN(n,r,a){if(n=n.containerInfo,S0=Nl,n=Ax(n),Lg(n)){if("selectionStart"in n)var c={start:n.selectionStart,end:n.selectionEnd};else e:{c=(c=n.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var y=p.anchorOffset,T=p.focusNode;p=p.focusOffset;try{c.nodeType,T.nodeType}catch{c=null;break e}var P=0,Z=-1,ae=-1,pe=0,Re=0,ie=n,fe=null;t:for(;;){for(var Ye;ie!==c||y!==0&&ie.nodeType!==3||(Z=P+y),ie!==T||p!==0&&ie.nodeType!==3||(ae=P+p),ie.nodeType===3&&(P+=ie.nodeValue.length),(Ye=ie.firstChild)!==null;)fe=ie,ie=Ye;for(;;){if(ie===n)break t;if(fe===c&&++pe===y&&(Z=P),fe===T&&++Re===p&&(ae=P),(Ye=ie.nextSibling)!==null)break;ie=fe,fe=ie.parentNode}ie=Ye}c=Z===-1||ae===-1?null:{start:Z,end:ae}}else c=null}c=c||{start:0,end:0}}else c=null;for(w0={focusedElem:n,selectionRange:c},Nl=!1,a=(a&335544064)===a,ur=r,r=a?9270:1024;ur!==null;){if(n=ur,a&&(c=n.deletions,c!==null))for(y=0;y<c.length;y++)a&&Ym(c[y]);if(n.alternate===null&&(n.flags&2)!==0)a&&b1(n),wf(a);else{if(n.tag===22){if(c=n.alternate,n.memoizedState!==null){c!==null&&c.memoizedState===null&&a&&Ym(c),wf(a);continue}else if(c!==null&&c.memoizedState!==null){a&&b1(n),wf(a);continue}}c=n.child,(n.subtreeFlags&r)!==0&&c!==null?(c.return=n,ur=c):(a&&w1(n),wf(a))}}ui=null}function wf(n){for(;ur!==null;){var r=ur,a=n,c=r.alternate,p=r.flags;switch(r.tag){case 0:case 11:case 15:break;case 1:if((p&1024)!==0&&c!==null){a=void 0,p=c.memoizedProps,c=c.memoizedState;var y=r.stateNode;try{var T=vo(r.type,p);a=y.getSnapshotBeforeUpdate(T,c),y.__reactInternalSnapshotBeforeUpdate=a}catch(P){yn(r,r.return,P)}}break;case 3:if((p&1024)!==0){if(c=r.stateNode.containerInfo,a=c.nodeType,a===9)A0(c);else if(a===1)switch(c.nodeName){case"HEAD":case"HTML":case"BODY":A0(c);break;default:c.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:a&&c!==null&&(a=Ns(c.memoizedProps,c.stateNode),p=r.memoizedProps,p=Ds(p.default,p.update),p!=="none"&&hl(c,a,p,c.memoizedState=[],!0));break;default:if((p&1024)!==0)throw Error(s(163))}if(c=r.sibling,c!==null){c.return=r.return,ur=c;break}ur=r.return}}function T1(n,r,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:ls(n,a),c&4&&Yc(5,a);break;case 1:if(ls(n,a),c&4)if(n=a.stateNode,r===null)try{n.componentDidMount()}catch(T){yn(a,a.return,T)}else{var p=vo(a.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(p,r,n.__reactInternalSnapshotBeforeUpdate)}catch(T){yn(a,a.return,T)}}c&64&&p1(a),c&512&&rs(a,a.return);break;case 3:if(ls(n,a),c&64&&(n=a.updateQueue,n!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{r2(n,r)}catch(T){yn(a,a.return,T)}}break;case 27:r===null&&c&4&&v1(a);case 26:case 5:ls(n,a),r===null&&c&4&&Hm(a),c&512&&rs(a,a.return);break;case 12:ls(n,a);break;case 31:ls(n,a),c&4&&M1(n,a);break;case 13:ls(n,a),c&4&&N1(n,a),c&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=dD.bind(null,a),YD(n,a))));break;case 22:if(c=a.memoizedState!==null||cr,!c){var y=r!==null&&r.memoizedState!==null||pn;r=cr,p=pn,cr=c,(pn=y)&&!p?(c=2,(a.subtreeFlags&8772)!==0&&(c|=1),Bi(n,a,c)):ls(n,a),cr=r,pn=p}break;case 30:ls(n,a),c&512&&rs(a,a.return);break;case 7:c&512&&rs(a,a.return);default:ls(n,a)}}function Zm(n,r){for(n=n.child;n!==null;)k1(n,r),n=n.sibling}function k1(n,r){switch(n.tag){case 5:case 26:try{var a=n.stateNode;if(r){var c=a.style;typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"}else{var p=n.stateNode,y=n.memoizedProps.style,T=y!=null&&y.hasOwnProperty("display")?y.display:null;p.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(Z){yn(n,n.return,Z)}Jm(n,r);break;case 6:try{n.stateNode.nodeValue=r?"":n.memoizedProps,mt=!0}catch(Z){yn(n,n.return,Z)}break;case 18:try{var P=n.stateNode;r?bS(P,!0):bS(n.stateNode,!1)}catch(Z){yn(n,n.return,Z)}break;case 22:case 23:n.memoizedState===null&&Zm(n,r);break;default:Zm(n,r)}}function Jm(n,r){if(n.subtreeFlags&67108864)for(n=n.child;n!==null;){e:{var a=n,c=r;switch(a.tag){case 4:k1(a,c);break e;case 22:a.memoizedState===null&&Jm(a,c);break e;default:Jm(a,c)}}n=n.sibling}}function O1(n){var r=n.alternate;r!==null&&(n.alternate=null,O1(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&qn(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var In=null,$r=!1;function Hi(n,r,a){for(a=a.child;a!==null;)A1(n,r,a),a=a.sibling}function A1(n,r,a){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(Ie,a)}catch{}switch(a.tag){case 26:pn||Sr(a,r),Hi(n,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&!pn&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:pn||Sr(a,r),Gc(a);var c=In,p=$r;ka(a.type)&&(In=a.stateNode,$r=!1),Hi(n,r,a),jS(a.stateNode,a.type,a.memoizedProps),In=c,$r=p;break;case 5:pn||Sr(a,r),Gc(a);case 6:if(a.tag===6&&Gc(a),c=In,p=$r,In=null,Hi(n,r,a),In=c,$r=p,In!==null)if($r)try{(In.nodeType===9?In.body:In.nodeName==="HTML"?In.ownerDocument.body:In).removeChild(a.stateNode),mt=!0}catch(y){yn(a,r,y)}else try{In.removeChild(a.stateNode),mt=!0}catch(y){yn(a,r,y)}break;case 18:In!==null&&($r?(n=In,vS(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),Dl(n)):vS(In,a.stateNode));break;case 4:c=In,p=$r,In=a.stateNode.containerInfo,$r=!0,Hi(n,r,a),In=c,$r=p;break;case 0:case 11:case 14:case 15:xa(2,a,r),pn||xa(4,a,r),Hi(n,r,a);break;case 1:pn||(Sr(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"&&g1(a,r,c)),Hi(n,r,a);break;case 21:Hi(n,r,a);break;case 22:pn=(c=pn)||a.memoizedState!==null,Hi(n,r,a),pn=c;break;case 30:Sr(a,r),Hi(n,r,a);break;case 7:pn||Sr(a,r),Hi(n,r,a);break;default:Hi(n,r,a)}}function M1(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Dl(n)}catch(a){yn(r,r.return,a)}}}function N1(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Dl(n)}catch(a){yn(r,r.return,a)}}function eD(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new R1),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new R1),r;default:throw Error(s(435,n.tag))}}function Ef(n,r){var a=eD(n);r.forEach(function(c){if(!a.has(c)){a.add(c);var p=fD.bind(null,n,c);c.then(p,p)}})}function Ur(n,r,a){var c=r.deletions;if(c!==null)for(var p=0;p<c.length;p++){var y=c[p],T=n,P=r,Z=P;e:for(;Z!==null;){switch(Z.tag){case 27:if(ka(Z.type)){In=Z.stateNode,$r=!1;break e}break;case 5:In=Z.stateNode,$r=!1;break e;case 3:case 4:In=Z.stateNode.containerInfo,$r=!0;break e}Z=Z.return}if(In===null)throw Error(s(160));A1(T,P,y),In=null,$r=!1,T=y.alternate,T!==null&&(T.return=null),y.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)D1(r,n,a),r=r.sibling}var Fi=null;function D1(n,r,a){var c=n.alternate,p=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(p&4&&(c=n.updateQueue,c=c!==null?c.events:null,c!==null))for(var y=0;y<c.length;y++){var T=c[y];T.ref.impl=T.nextImpl}Ur(r,n,a),Hr(n),p&4&&(xa(3,n,n.return),Yc(3,n),xa(5,n,n.return));break;case 1:Ur(r,n,a),Hr(n),p&512&&(pn||c===null||Sr(c,c.return)),p&64&&cr&&(n=n.updateQueue,n!==null&&(r=n.callbacks,r!==null&&(a=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:if(y=Fi,Ur(r,n,a),Hr(n),p&512&&(pn||c===null||Sr(c,c.return)),p&4)if(p=c!==null?c.memoizedState:null,a=n.memoizedState,c===null)if(a===null)if(n.stateNode===null)if(cr)n.stateNode=gS(n.type,n.memoizedProps,r.containerInfo,n);else{e:{r=n.type,a=n.memoizedProps,p=y.ownerDocument||y;t:switch(r){case"title":c=p.getElementsByTagName("title")[0],(!c||c[xi]||c[fn]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=p.createElement(r),p.head.insertBefore(c,p.querySelector("head > title"))),wr(c,r,a),c[fn]=n,Se(c),r=c;break e;case"link":if(y=US("link","href",p).get(r+(a.href||""))){for(T=0;T<y.length;T++)if(c=y[T],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(T,1);break t}}c=p.createElement(r),wr(c,r,a),p.head.appendChild(c);break;case"meta":if(y=US("meta","content",p).get(r+(a.content||""))){for(T=0;T<y.length;T++)if(c=y[T],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(T,1);break t}}c=p.createElement(r),wr(c,r,a),p.head.appendChild(c);break;default:throw Error(s(468,r))}c[fn]=n,Se(c),r=c}n.stateNode=r}else cr||L0(y,n.type,n.stateNode);else n.stateNode=_S(y,a,n.memoizedProps);else p!==a?(p===null?(r=c.stateNode,r===null||pn||r.parentNode.removeChild(r)):p.count--,a===null?cr||L0(y,n.type,n.stateNode):_S(y,a,n.memoizedProps)):a===null&&n.stateNode!==null&&Fm(n,n.memoizedProps,c.memoizedProps);break;case 27:Ur(r,n,a),Hr(n),p&512&&(pn||c===null||Sr(c,c.return)),c!==null&&p&4&&Fm(n,n.memoizedProps,c.memoizedProps);break;case 5:if(y=as,as=!1,Ur(r,n,a),as=y,Hr(n),p&512&&(pn||c===null||Sr(c,c.return)),n.flags&32){r=n.stateNode;try{Pr(r,""),mt=!0}catch(pe){yn(n,n.return,pe)}}p&4&&n.stateNode!=null&&(r=n.memoizedProps,Fm(n,r,c!==null?c.memoizedProps:r)),p&1024&&(Qm=!0);break;case 6:if(Ur(r,n,a),Hr(n),p&4){if(n.stateNode===null)throw Error(s(162));r=n.memoizedProps,a=n.stateNode;try{a.nodeValue=r,mt=!0}catch(pe){yn(n,n.return,pe)}}break;case 3:if(mt=!1,_f=null,y=Fi,Fi=ru(r.containerInfo),Ur(r,n,a),Fi=y,Hr(n),p&4&&c!==null&&c.memoizedState.isDehydrated)try{Dl(r.containerInfo)}catch(pe){yn(n,n.return,pe)}Qm&&(Qm=!1,j1(n)),mt=!1;break;case 4:p=as,as=cr,c=rr(),y=Fi,Fi=ru(n.stateNode.containerInfo),Ur(r,n,a),Hr(n),Fi=y,mt&&$c&&(Sf=!0),mt=c,as=p;break;case 12:Ur(r,n,a),Hr(n);break;case 31:Ur(r,n,a),Hr(n),p&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,Ef(n,r)));break;case 13:Ur(r,n,a),Hr(n),n.child.flags&8192&&n.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Tf=wt()),p&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,Ef(n,r)));break;case 22:y=n.memoizedState!==null,T=c!==null&&c.memoizedState!==null;var P=cr,Z=pn,ae=as;cr=P||y,as=ae||y,pn=Z||T,Ur(r,n,a),pn=Z,as=ae,cr=P,Hr(n),p&8192&&(r=n.stateNode,r._visibility=y?r._visibility&-2:r._visibility|1,!y||c===null||T||cr||pn||(r=T||pn,a=cr,c=pn,cr=y||cr,pn=r,Sa(n,2),cr=a,pn=c),!y&&as||Zm(n,y)),p&4&&(r=n.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,Ef(n,a))));break;case 19:Ur(r,n,a),Hr(n),p&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,Ef(n,r)));break;case 30:p&512&&(pn||c===null||Sr(c,c.return)),p=rr(),y=$c,T=(a&335544064)===a,P=n.memoizedProps,$c=T&&Ds(P.default,P.update)!=="none",Ur(r,n,a),Hr(n),T&&c!==null&&mt&&(n.flags|=4),$c=y,mt=p;break;case 21:break;case 7:p&512&&(pn||c===null||Sr(c,c.return)),c&&c.stateNode!==null&&(c.stateNode._fragmentFiber=n);default:Ur(r,n,a),Hr(n)}}function Hr(n){var r=n.flags;if(r&2){try{for(var a,c=n.return;c!==null;){if(y1(c)){a=c;break}c=c.return}c=null;for(var p=n.return;p!==null;){if(Um(p)){var y=p.stateNode;c===null?c=[y]:c.push(y)}if(_m(p))break;p=p.return}var T=c;if(a==null)throw Error(s(160));switch(a.tag){case 27:var P=a.stateNode,Z=Bm(n);yf(n,Z,P,T);break;case 5:var ae=a.stateNode;a.flags&32&&(Pr(ae,""),a.flags&=-33);var pe=Bm(n);yf(n,pe,ae,T);break;case 3:case 4:var Re=a.stateNode.containerInfo,ie=Bm(n);Vm(n,ie,Re,T);break;default:throw Error(s(161))}}catch(fe){yn(n,n.return,fe)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function j1(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;j1(r),r.tag===5&&r.flags&1024&&(r=r.stateNode,Nl=!0,r.reset(),Nl=!1),n=n.sibling}}function pl(n,r){if(r.subtreeFlags&9270)for(r=r.child;r!==null;)I1(r,n),r=r.sibling;else C1(r)}function I1(n,r){var a=n.alternate;if(a===null)Km(n,!1);else switch(n.tag){case 3:if(Xm=os=!1,x1(),pl(r,n),!os&&!Sf){if(n=is,n!==null)for(var c=0;c<n.length;c+=3){a=n[c];var p=n[c+1];SS(a,n[c+2]),a=a.ownerDocument.documentElement,a!==null&&a.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+p+")"})}n=r.containerInfo,n=n.nodeType===9?n.documentElement:n.ownerDocument.documentElement,n!==null&&n.style.viewTransitionName===""&&(n.style.viewTransitionName="none",n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),n.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Xm=!0}is=null;break;case 5:pl(r,n);break;case 4:c=os,os=!1,pl(r,n),os&&(Sf=!0),os=c;break;case 22:n.memoizedState===null&&(a.memoizedState!==null?Km(n,!1):pl(r,n));break;case 30:c=os,p=x1(),os=!1,pl(r,n),os&&(n.flags|=4);var y=n.memoizedProps,T=n.stateNode;r=Ns(y,T),T=Ns(a.memoizedProps,T);var P=Ds(y.default,y.update);P==="none"?r=!1:(y=a.memoizedState,a.memoizedState=null,a=n.child,Gr=0,r=$m(n,a,r,T,P,y,!0),Gr!==(y===null?0:y.length)&&(n.flags|=32)),(n.flags&4)!==0&&r?(Sl(n,n.memoizedProps.onUpdate),is=p):p!==null&&(p.push.apply(p,is),is=p),os=(n.flags&32)!==0?!0:c;break;default:pl(r,n)}}function ls(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)T1(n,r.alternate,r),r=r.sibling}function Sa(n,r){for(n=n.child;n!==null;){var a=n,c=r;switch(a.tag){case 0:case 11:case 14:case 15:xa(4,a,a.return),Sa(a,c);break;case 1:Sr(a,a.return);var p=a.stateNode;typeof p.componentWillUnmount=="function"&&g1(a,a.return,p),Sa(a,c);break;case 27:(c&2)!==0&&jS(a.stateNode,a.type,a.memoizedProps);case 5:Sr(a,a.return),a.tag!==5&&a.tag!==27||Gc(a),Sa(a,c);break;case 6:Gc(a);break;case 26:Sr(a,a.return),p=a.stateNode,a.memoizedState!==null||p===null||pn||p.parentNode.removeChild(p),Sa(a,c);break;case 22:a.memoizedState===null&&Sa(a,c);break;case 30:Sr(a,a.return),Sa(a,c);break;case 7:Sr(a,a.return);default:Sa(a,c)}n=n.sibling}}function Bi(n,r,a){for(a=(r.subtreeFlags&8772)!==0?a:a&-2,r=r.child;r!==null;){var c=r.alternate,p=n,y=r,T=y.flags,P=(a&1)!==0;switch(y.tag){case 0:case 11:case 15:Bi(p,y,a),Yc(4,y);break;case 1:if(Bi(p,y,a),c=y,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(pe){yn(c,c.return,pe)}if(c=y,p=c.updateQueue,p!==null){var Z=c.stateNode;try{var ae=p.shared.hiddenCallbacks;if(ae!==null)for(p.shared.hiddenCallbacks=null,p=0;p<ae.length;p++)n2(ae[p],Z)}catch(pe){yn(c,c.return,pe)}}P&&T&64&&p1(y),rs(y,y.return);break;case 27:(a&2)!==0&&v1(y);case 5:y.tag!==5&&y.tag!==27||m1(y),Bi(p,y,a),P&&c===null&&T&4&&Hm(y),rs(y,y.return);break;case 6:m1(y);break;case 26:Z=y.stateNode,y.memoizedState!==null||Z===null||cr||L0(ru(Z.ownerDocument),y.type,Z),Bi(p,y,a),P&&c===null&&T&4&&Hm(y),rs(y,y.return);break;case 12:Bi(p,y,a);break;case 31:Bi(p,y,a),P&&T&4&&M1(p,y);break;case 13:Bi(p,y,a),P&&T&4&&N1(p,y);break;case 22:y.memoizedState===null&&Bi(p,y,a),rs(y,y.return);break;case 30:Bi(p,y,a),rs(y,y.return);break;case 7:rs(y,y.return);default:Bi(p,y,a)}r=r.sibling}}function Wm(n,r){var a=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==a&&(n!=null&&n.refCount++,a!=null&&jc(a))}function e0(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&jc(n))}function ki(n,r,a,c){var p=(a&335544064)===a;if(r.subtreeFlags&(p?10262:10256))for(r=r.child;r!==null;)P1(n,r,a,c),r=r.sibling;else p&&E1(r)}function P1(n,r,a,c){var p=(a&335544064)===a;p&&r.alternate===null&&r.return!==null&&r.return.alternate!==null&&xf(r);var y=r.flags;switch(r.tag){case 0:case 11:case 15:ki(n,r,a,c),y&2048&&Yc(9,r);break;case 1:ki(n,r,a,c);break;case 3:ki(n,r,a,c),p&&Xm&&(n=n.containerInfo,n=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,n.style.viewTransitionName==="root"&&(n.style.viewTransitionName=""),n=n.ownerDocument.documentElement,n!==null&&n.style.viewTransitionName==="none"&&(n.style.viewTransitionName="")),y&2048&&(y=null,r.alternate!==null&&(y=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==y&&(r.refCount++,y!=null&&jc(y)));break;case 12:if(y&2048){ki(n,r,a,c),y=r.stateNode;try{var T=r.memoizedProps,P=T.id,Z=T.onPostCommit;typeof Z=="function"&&Z(P,r.alternate===null?"mount":"update",y.passiveEffectDuration,-0)}catch(ae){yn(r,r.return,ae)}}else ki(n,r,a,c);break;case 31:ki(n,r,a,c);break;case 13:ki(n,r,a,c);break;case 23:break;case 22:T=r.stateNode,P=r.alternate,r.memoizedState!==null?(p&&P!==null&&P.memoizedState===null&&xf(P),T._visibility&2?ki(n,r,a,c):Qc(n,r)):(p&&P!==null&&P.memoizedState!==null&&xf(r),T._visibility&2?ki(n,r,a,c):(T._visibility|=2,gl(n,r,a,c,(r.subtreeFlags&10256)!==0||!1))),y&2048&&Wm(P,r);break;case 24:ki(n,r,a,c),y&2048&&e0(r.alternate,r);break;case 30:p&&(y=r.alternate,y!==null&&(ss(y.child,!0),ss(r.child,!0))),ki(n,r,a,c);break;default:ki(n,r,a,c)}}function gl(n,r,a,c,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var y=n,T=r,P=a,Z=c,ae=T.flags;switch(T.tag){case 0:case 11:case 15:gl(y,T,P,Z,p),Yc(8,T);break;case 23:break;case 22:var pe=T.stateNode;T.memoizedState!==null?pe._visibility&2?gl(y,T,P,Z,p):Qc(y,T):(pe._visibility|=2,gl(y,T,P,Z,p)),p&&ae&2048&&Wm(T.alternate,T);break;case 24:gl(y,T,P,Z,p),p&&ae&2048&&e0(T.alternate,T);break;default:gl(y,T,P,Z,p)}r=r.sibling}}function Qc(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=n,c=r,p=c.flags;switch(c.tag){case 22:Qc(a,c),p&2048&&Wm(c.alternate,c);break;case 24:Qc(a,c),p&2048&&e0(c.alternate,c);break;default:Qc(a,c)}r=r.sibling}}var bo=8192;function xo(n,r,a){if(n.subtreeFlags&bo)for(n=n.child;n!==null;)L1(n,r,a),n=n.sibling}function L1(n,r,a){switch(n.tag){case 26:xo(n,r,a),n.flags&bo&&(n.memoizedState!==null?aj(a,Fi,n.memoizedState,n.memoizedProps):(n=n.stateNode,(r&335544128)===r&&VS(a,n)));break;case 5:xo(n,r,a),n.flags&bo&&(n=n.stateNode,(r&335544128)===r&&VS(a,n));break;case 3:case 4:var c=Fi;Fi=ru(n.stateNode.containerInfo),xo(n,r,a),Fi=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=bo,bo=16777216,xo(n,r,a),bo=c):xo(n,r,a));break;case 30:if((n.flags&bo)!==0&&(c=n.memoizedProps.name,c!=null&&c!=="auto")){var p=n.stateNode;p.paired=null,ui===null&&(ui=new Map),ui.set(c,p)}xo(n,r,a);break;default:xo(n,r,a)}}function z1(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function Xc(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];ur=c,U1(c,n)}z1(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)_1(n),n=n.sibling}function _1(n){switch(n.tag){case 0:case 11:case 15:Xc(n),n.flags&2048&&xa(9,n,n.return);break;case 3:Xc(n);break;case 12:Xc(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Cf(n)):Xc(n);break;default:Xc(n)}}function Cf(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];ur=c,U1(c,n)}z1(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:xa(8,r,r.return),Cf(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,Cf(r));break;default:Cf(r)}n=n.sibling}}function U1(n,r){for(;ur!==null;){var a=ur;switch(a.tag){case 0:case 11:case 15:xa(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var c=a.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:jc(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,ur=c;else e:for(a=n;ur!==null;){c=ur;var p=c.sibling,y=c.return;if(O1(c),c===a){ur=null;break e}if(p!==null){p.return=y,ur=p;break e}ur=y}}}var tD={getCacheForType:function(n){var r=vr(Qn),a=r.data.get(n);return a===void 0&&(a=n(),r.data.set(n,a)),a},cacheSignal:function(){return vr(Qn).controller.signal}},nD=typeof WeakMap=="function"?WeakMap:Map,cn=0,kn=null,Gt=null,Jt=0,mn=0,di=null,wa=!1,ml=!1,t0=!1,Fs=0,Vn=0,Ea=0,So=0,Rf=0,fi=0,yl=0,Zc=null,Qr=null,n0=!1,Tf=0,H1=0,kf=1/0,Of=null,Ca=null,_n=0,Vi=null,wo=null,cs=0,r0=0,i0=null,F1=null,vl=null,bl=null,xl=null,Jc=0,Af=null;function hi(){return(cn&2)!==0&&Jt!==0?Jt&-Jt:ge.T!==null?p0():Tn()}function B1(){if(fi===0)if((Jt&536870912)===0||Kt){var n=ye;ye<<=1,(ye&3932160)===0&&(ye=262144),fi=n}else fi=536870912;return n=br.current,n!==null&&(n.flags|=32),fi}function Sl(n,r){if(r!=null){var a=n.stateNode,c=a.ref;c===null&&(c=a.ref=wS(Ns(n.memoizedProps,a))),bl===null&&(bl=[]),bl.push(r.bind(null,c))}}function Xr(n,r,a){(n===kn&&(mn===2||mn===9)||n.cancelPendingCommit!==null)&&(wl(n,0),Ra(n,Jt,fi,!1)),ft(n,a),((cn&2)===0||n!==kn)&&(n===kn&&((cn&2)===0&&(So|=a),Vn===4&&Ra(n,Jt,fi,!1)),us(n))}function V1(n,r,a){if((cn&6)!==0)throw Error(s(327));var c=!a&&(r&127)===0&&(r&n.expiredLanes)===0||Xe(n,r),p=c?sD(n,r):a0(n,r,!0),y=c;do{if(p===0){ml&&!c&&Ra(n,r,0,!1);break}else{if(a=n.current.alternate,y&&!rD(a)){p=a0(n,r,!1),y=!1;continue}if(p===2){if(y=r,n.errorRecoveryDisabledLanes&y)var T=0;else T=n.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){r=T;e:{var P=n;p=Zc;var Z=P.current.memoizedState.isDehydrated;if(Z&&(wl(P,T).flags|=256),T=a0(P,T,!1),T!==2&&T!==6){if(t0&&!Z){P.errorRecoveryDisabledLanes|=y,So|=y,p=4;break e}y=Qr,Qr=p,y!==null&&(Qr===null?Qr=y:Qr.push.apply(Qr,y))}p=T}if(y=!1,p!==2)continue}}if(p===1){wl(n,0),Ra(n,r,0,!0);break}e:{switch(c=n,y=p,y){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r&&(r&62914560)!==r)break;case 6:Ra(c,r,fi,!wa);break e;case 2:Qr=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(p=Tf+300-wt(),10<p)){if(Ra(c,r,fi,!wa),Ke(c,0,!0)!==0)break e;cs=r,c.timeoutHandle=R0(K1.bind(null,c,a,Qr,Of,n0,r,fi,So,yl,wa,y,"Throttled",-0,0),p);break e}K1(c,a,Qr,Of,n0,r,fi,So,yl,wa,y,null,-0,0)}}break}while(!0);us(n)}function K1(n,r,a,c,p,y,T,P,Z,ae,pe,Re,ie,fe){n.timeoutHandle=-1;var Ye=r.subtreeFlags,it=(y&335544064)===y;if(Re=null,(it||Ye&8192||(Ye&16785408)===16785408)&&(Re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Lr},ui=null,L1(r,y,Re),it&&(Ye=Re,it=n.containerInfo,it=(it.nodeType===9?it:it.ownerDocument).__reactViewTransition,it!=null&&(Ye.count++,Ye.waitingForViewTransition=!0,Ye=au.bind(Ye),it.finished.then(Ye,Ye))),Ye=(y&62914560)===y?Tf-wt():(y&4194048)===y?H1-wt():0,Ye=oj(Re,Ye),Ye!==null)){cs=y,n.cancelPendingCommit=Ye(J1.bind(null,n,r,y,a,c,p,T,P,Z,ae,pe,Re,null,ie,fe)),Ra(n,y,T,!ae);return}J1(n,r,y,a,c,p,T,P,Z,ae,pe,Re)}function rD(n){for(var r=n;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var c=0;c<a.length;c++){var p=a[c],y=p.getSnapshot;p=p.value;try{if(!li(y(),p))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Ra(n,r,a,c){r=Qe(n,r),r&=~Rf,r&=~So,n.suspendedLanes|=r,n.pingedLanes&=~r,c&&(n.warmLanes|=r),c=n.expirationTimes;for(var p=r;0<p;){var y=31-et(p),T=1<<y;c[y]=-1,p&=~T}a!==0&&Bt(n,a,r)}function Mf(){return(cn&6)===0?(Wc(0),!1):!0}function s0(){if(Gt!==null){if(mn===0)var n=Gt.return;else n=Gt,Ps=lo=null,hm(n),ll=null,Lc=0,n=Gt;for(;n!==null;)h1(n.alternate,n),n=n.return;Gt=null}}function wl(n,r){var a=n.timeoutHandle;return a!==-1&&(n.timeoutHandle=-1,kD(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),cs=0,s0(),kn=n,Gt=a=js(n.current,null),Jt=r,mn=0,di=null,wa=!1,ml=Xe(n,r),t0=!1,yl=fi=Rf=So=Ea=Vn=0,Qr=Zc=null,n0=!1,Fs=Qe(n,r),zd(),a}function q1(n,r){It=null,ge.H=cf,r===ol||r===$d?(r=Jx(),mn=3):r===em?(r=Jx(),mn=4):mn=r===Om?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,di=r,Gt===null&&(Vn=1,uf(n,Ei(r,n.current)))}function Y1(){var n=br.current;return n===null?!0:(Jt&4194048)===Jt?kr===null:(Jt&62914560)===Jt||(Jt&536870912)!==0?n===kr:!1}function G1(){var n=ge.H;return ge.H=cf,n===null?cf:n}function $1(){var n=ge.A;return ge.A=tD,n}function Nf(){Vn=4,wa||(Jt&4194048)!==Jt&&br.current!==null||(ml=!0),(Ea&134217727)===0&&(So&134217727)===0||kn===null||Ra(kn,Jt,fi,!1)}function a0(n,r,a){var c=cn;cn|=2;var p=G1(),y=$1();(kn!==n||Jt!==r)&&(Of=null,wl(n,r)),r=!1;var T=Vn;e:do try{if(mn!==0&&Gt!==null){var P=Gt,Z=di;switch(mn){case 8:s0(),T=6;break e;case 3:case 2:case 9:case 6:br.current===null&&(r=!0);var ae=mn;if(mn=0,di=null,El(n,P,Z,ae),a&&ml){T=0;break e}break;default:ae=mn,mn=0,di=null,El(n,P,Z,ae)}}iD(),T=Vn;break}catch(pe){q1(n,pe)}while(!0);return r&&n.shellSuspendCounter++,Ps=lo=null,cn=c,ge.H=p,ge.A=y,Gt===null&&(kn=null,Jt=0,zd()),T}function iD(){for(;Gt!==null;)Q1(Gt)}function sD(n,r){var a=cn;cn|=2;var c=G1(),p=$1();kn!==n||Jt!==r?(Of=null,kf=wt()+500,wl(n,r)):ml=Xe(n,r);e:do try{if(mn!==0&&Gt!==null){r=Gt;var y=di;t:switch(mn){case 1:mn=0,di=null,El(n,r,y,1);break;case 2:case 9:if(Xx(y)){mn=0,di=null,X1(r);break}r=function(){mn!==2&&mn!==9||kn!==n||(mn=7),us(n)},y.then(r,r);break e;case 3:mn=7;break e;case 4:mn=5;break e;case 7:Xx(y)?(mn=0,di=null,X1(r)):(mn=0,di=null,El(n,r,y,7));break;case 5:var T=null;switch(Gt.tag){case 26:T=Gt.memoizedState;case 5:case 27:var P=Gt;if(T?FS(T):P.stateNode.complete){mn=0,di=null;var Z=P.sibling;if(Z!==null)Gt=Z;else{var ae=P.return;ae!==null?(Gt=ae,Df(ae)):Gt=null}break t}}mn=0,di=null,El(n,r,y,5);break;case 6:mn=0,di=null,El(n,r,y,6);break;case 8:s0(),Vn=6;break e;default:throw Error(s(462))}}aD();break}catch(pe){q1(n,pe)}while(!0);return Ps=lo=null,ge.H=c,ge.A=p,cn=a,Gt!==null?0:(kn=null,Jt=0,zd(),Vn)}function aD(){for(;Gt!==null&&!nn();)Q1(Gt)}function Q1(n){var r=d1(n.alternate,n,Fs);n.memoizedProps=n.pendingProps,r===null?Df(n):Gt=r}function X1(n){var r=n,a=r.alternate;switch(r.tag){case 15:case 0:r=i1(a,r,r.pendingProps,r.type,void 0,Jt);break;case 11:r=i1(a,r,r.pendingProps,r.type.render,r.ref,Jt);break;case 5:hm(r);var c=r;c===lr&&(Kt?(Vd(c),c.tag===5&&c.stateNode!=null&&(Mn=c.stateNode)):(Vd(c),Kt=!0));default:h1(a,r),r=Gt=Ux(r,Fs),r=d1(a,r,Fs)}n.memoizedProps=n.pendingProps,r===null?Df(n):Gt=r}function El(n,r,a,c){Ps=lo=null,hm(r),ll=null,Lc=0;var p=r.return;try{if(GN(n,p,r,a,Jt)){Vn=1,uf(n,Ei(a,n.current)),Gt=null;return}}catch(y){if(p!==null)throw Gt=p,y;Vn=1,uf(n,Ei(a,n.current)),Gt=null;return}r.flags&32768?(Kt||c===1?n=!0:ml||(Jt&536870912)!==0?n=!1:(wa=n=!0,(c===2||c===9||c===3||c===6)&&(c=br.current,c!==null&&c.tag===13&&(c.flags|=16384))),Z1(r,n)):Df(r)}function Df(n){var r=n;do{if((r.flags&32768)!==0){Z1(r,wa);return}n=r.return;var a=ZN(r.alternate,r,Fs);if(a!==null){Gt=a;return}if(r=r.sibling,r!==null){Gt=r;return}Gt=r=n}while(r!==null);Vn===0&&(Vn=5)}function Z1(n,r){do{var a=JN(n.alternate,n);if(a!==null){a.flags&=32767,Gt=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(n=n.sibling,n!==null)){Gt=n;return}Gt=n=a}while(n!==null);Vn=6,Gt=null}function J1(n,r,a,c,p,y,T,P,Z,ae,pe,Re){n.cancelPendingCommit=null;do jf();while(_n!==0);if((cn&6)!==0)throw Error(s(327));if(r!==null){if(r===n.current)throw Error(s(177));n===kn&&(Gt=kn=null,Jt=0),wo=r,Vi=n,cs=a,i0=p,F1=c,oD(n,r,a,T,P,Z,Re)}}function oD(n,r,a,c,p,y,T){var P=r.lanes|r.childLanes;if(r0=P,P|=Fg,qt(n,a,P,c,p,y),bl=null,(a&335544064)===a?(xl=PN(n),c=10262):(xl=null,c=10256),(r.subtreeFlags&c)!==0||(r.flags&c)!==0?(n.callbackNode=null,n.callbackPriority=0,hD(yt,function(){return u0(),null})):(n.callbackNode=null,n.callbackPriority=0),vf=!1,c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=ge.T,ge.T=null,p=ue.p,ue.p=2,y=cn,cn|=4;try{WN(n,r,a)}finally{cn=y,ue.p=p,ge.T=c}}_n=1,vf?vl=jD(T,n.containerInfo,xl,o0,l0,cD,c0,u0,lD):(o0(),l0(),c0())}function lD(n){if(_n!==0){var r=Vi.onRecoverableError;r(n,{componentStack:null})}}function cD(){_n===3&&(_n=0,I1(wo,Vi),_n=4)}function o0(){if(_n===1){_n=0;var n=Vi,r=wo,a=cs,c=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||c){c=ge.T,ge.T=null;var p=ue.p;ue.p=2;var y=cn;cn|=4;try{$c=Sf=!1,D1(r,n,a),a=w0;var T=Ax(n.containerInfo),P=a.focusedElem,Z=a.selectionRange;if(T!==P&&P&&P.ownerDocument&&Ox(P.ownerDocument.documentElement,P)){if(Z!==null&&Lg(P)){var ae=Z.start,pe=Z.end;if(pe===void 0&&(pe=ae),"selectionStart"in P)P.selectionStart=ae,P.selectionEnd=Math.min(pe,P.value.length);else{var Re=P.ownerDocument||document,ie=Re&&Re.defaultView||window;if(ie.getSelection){var fe=ie.getSelection(),Ye=P.textContent.length,it=Math.min(Z.start,Ye),Pt=Z.end===void 0?it:Math.min(Z.end,Ye);!fe.extend&&it>Pt&&(T=Pt,Pt=it,it=T);var se=kx(P,it),te=kx(P,Pt);if(se&&te&&(fe.rangeCount!==1||fe.anchorNode!==se.node||fe.anchorOffset!==se.offset||fe.focusNode!==te.node||fe.focusOffset!==te.offset)){var ce=Re.createRange();ce.setStart(se.node,se.offset),fe.removeAllRanges(),it>Pt?(fe.addRange(ce),fe.extend(te.node,te.offset)):(ce.setEnd(te.node,te.offset),fe.addRange(ce))}}}}for(Re=[],fe=P;fe=fe.parentNode;)fe.nodeType===1&&Re.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<Re.length;P++){var Ce=Re[P];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}Nl=!!S0,w0=S0=null}finally{cn=y,ue.p=p,ge.T=c}}n.current=r,_n=2}}function l0(){if(_n===2){_n=0;var n=Vi,r=wo,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=ge.T,ge.T=null;var c=ue.p;ue.p=2;var p=cn;cn|=4;try{T1(n,r.alternate,r)}finally{cn=p,ue.p=c,ge.T=a}}_n=3}}function c0(){if(_n===4||_n===3){_n=0;var n=vl;vl=null,We();var r=Vi,a=wo,c=cs,p=F1,y=(c&335544064)===c?10262:10256;if((a.subtreeFlags&y)!==0||(a.flags&y)!==0?_n=5:(_n=0,wo=Vi=null,W1(r,r.pendingLanes)),y=r.pendingLanes,y===0&&(Ca=null),Rn(c),a=a.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(Ie,a,void 0,(a.current.flags&128)===128)}catch{}if(p!==null){a=ge.T,y=ue.p,ue.p=2,ge.T=null;try{for(var T=r.onRecoverableError,P=0;P<p.length;P++){var Z=p[P];T(Z.value,{componentStack:Z.stack})}}finally{ge.T=a,ue.p=y}}if(p=bl,T=xl,xl=null,p!==null&&(bl=null,T===null&&(T=[]),n!==null))for(Z=0;Z<p.length;Z++)a=(0,p[Z])(T),a!==void 0&&n.finished.finally(a);(cs&3)!==0&&jf(),us(r),y=r.pendingLanes,(c&261930)!==0&&(y&42)!==0?r===Af?Jc++:(Jc=0,Af=r):(Jc=0,Af=null),Wc(0)}}function W1(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,jc(r)))}function jf(){return vl!==null&&(vl.skipTransition(),vl=null),o0(),l0(),c0(),u0()}function u0(){if(_n!==5)return!1;var n=Vi,r=r0;r0=0;var a=Rn(cs),c=ge.T,p=ue.p;try{ue.p=32>a?32:a,ge.T=null,a=i0,i0=null;var y=Vi,T=cs;if(_n=0,wo=Vi=null,cs=0,(cn&6)!==0)throw Error(s(331));var P=cn;if(cn|=4,_1(y.current),P1(y,y.current,T,a),cn=P,Wc(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(Ie,y)}catch{}return!0}finally{ue.p=p,ge.T=c,W1(n,r)}}function eS(n,r,a){r=Ei(a,r),r=km(n.stateNode,r,2),n=ma(n,r,2),n!==null&&(ft(n,2),us(n))}function yn(n,r,a){if(n.tag===3)eS(n,n,a);else for(;r!==null;){if(r.tag===3){eS(r,n,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ca===null||!Ca.has(c))){n=Ei(a,n),a=X2(2),c=ma(r,a,2),c!==null&&(Z2(a,c,r,n),ft(c,2),us(c));break}}r=r.return}}function d0(n,r,a){var c=n.pingCache;if(c===null){c=n.pingCache=new nD;var p=new Set;c.set(r,p)}else p=c.get(r),p===void 0&&(p=new Set,c.set(r,p));p.has(a)||(t0=!0,p.add(a),n=uD.bind(null,n,r,a),r.then(n,n))}function uD(n,r,a){var c=n.pingCache;c!==null&&c.delete(r),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,kn===n&&(Jt&a)===a&&((Vn===4||Vn===3&&(Jt&62914560)===Jt&&300>wt()-Tf)&&(cn&2)===0?wl(n,0):Rf|=a,yl===Jt&&(yl=0)),us(n)}function tS(n,r){r===0&&(r=tt()),n=so(n,r),n!==null&&(ft(n,r),us(n))}function dD(n){var r=n.memoizedState,a=0;r!==null&&(a=r.retryLane),tS(n,a)}function fD(n,r){var a=0;switch(n.tag){case 31:case 13:var c=n.stateNode,p=n.memoizedState;p!==null&&(a=p.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(r),tS(n,a)}function hD(n,r){return tn(n,r)}var Cl=null,Rl=null,f0=!1,If=!1,h0=!1,Ta=0;function us(n){n!==Rl&&n.next===null&&(Rl===null?Cl=Rl=n:Rl=Rl.next=n),If=!0,f0||(f0=!0,gD())}function Wc(n,r){if(!h0&&If){h0=!0;do for(var a=!1,c=Cl;c!==null;){if(n!==0){var p=c.pendingLanes;if(p===0)var y=0;else{var T=c.suspendedLanes,P=c.pingedLanes;y=(1<<31-et(42|n)+1)-1,y&=p&~(T&~P),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(a=!0,sS(c,y))}else y=Jt,y=Ke(c,c===kn?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(y&3)===0||Xe(c,y)||(a=!0,sS(c,y));c=c.next}while(a);h0=!1}}function pD(){nS()}function nS(){If=f0=!1;var n=0;Ta!==0&&TD()&&(n=Ta);for(var r=wt(),a=null,c=Cl;c!==null;){var p=c.next,y=rS(c,r);y===0?(c.next=null,a===null?Cl=p:a.next=p,p===null&&(Rl=a)):(a=c,(n!==0||(y&3)!==0)&&(If=!0)),c=p}_n!==0&&_n!==5||Wc(n),Ta!==0&&(Ta=0)}function rS(n,r){for(var a=n.suspendedLanes,c=n.pingedLanes,p=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var T=31-et(y),P=1<<T,Z=p[T];Z===-1?((P&a)===0||(P&c)!==0)&&(p[T]=lt(P,r)):Z<=r&&(n.expiredLanes|=P),y&=~P}if(r=kn,a=Jt,a=Ke(n,n===r?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,a===0||n===r&&(mn===2||mn===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&an(c),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||Xe(n,a)){if(r=a&-a,r===n.callbackPriority)return r;switch(c!==null&&an(c),Rn(a)){case 2:case 8:a=xt;break;case 32:a=yt;break;case 268435456:a=un;break;default:a=yt}return c=iS.bind(null,n),a=tn(a,c),n.callbackPriority=r,n.callbackNode=a,r}return c!==null&&c!==null&&an(c),n.callbackPriority=2,n.callbackNode=null,2}function iS(n,r){if(_n!==0&&_n!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(jf()&&n.callbackNode!==a)return null;var c=Jt;return c=Ke(n,n===kn?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(V1(n,c,r),rS(n,wt()),n.callbackNode!=null&&n.callbackNode===a?iS.bind(null,n):null)}function sS(n,r){if(jf())return null;V1(n,r,!0)}function gD(){OD(function(){(cn&6)!==0?tn(ht,pD):nS()})}function p0(){if(Ta===0){var n=fo;n===0&&(n=ne,ne<<=1,(ne&261888)===0&&(ne=256)),Ta=n}return Ta}function aS(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:mr(n)}function mD(n,r,a,c,p){if(r==="submit"&&a&&a.stateNode===p){var y=aS((p[An]||null).action),T=c.submitter;T&&(r=(r=T[An]||null)?aS(r.formAction):T.getAttribute("formAction"),r!==null&&(y=r,T=null));var P=new jd("action","action",null,c,p);n.push({event:P,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Ta!==0){var Z=new FormData(p,T);wm(a,{pending:!0,data:Z,method:p.method,action:y},null,Z)}}else typeof y=="function"&&(P.preventDefault(),Z=new FormData(p,T),wm(a,{pending:!0,data:Z,method:p.method,action:y},y,Z))},currentTarget:p}]})}}for(var g0=0;g0<Hg.length;g0++){var m0=Hg[g0],yD=m0.toLowerCase(),vD=m0[0].toUpperCase()+m0.slice(1);Ui(yD,"on"+vD)}Ui(Dx,"onAnimationEnd"),Ui(jx,"onAnimationIteration"),Ui(Ix,"onAnimationStart"),Ui("dblclick","onDoubleClick"),Ui("focusin","onFocus"),Ui("focusout","onBlur"),Ui(kN,"onTransitionRun"),Ui(ON,"onTransitionStart"),Ui(AN,"onTransitionCancel"),Ui(Px,"onTransitionEnd"),xn("onMouseEnter",["mouseout","mouseover"]),xn("onMouseLeave",["mouseout","mouseover"]),xn("onPointerEnter",["pointerout","pointerover"]),xn("onPointerLeave",["pointerout","pointerover"]),Ht("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ht("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ht("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ht("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ht("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ht("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eu="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(" "),bD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(eu));function oS(n,r){r=(r&4)!==0;for(var a=0;a<n.length;a++){var c=n[a],p=c.event;c=c.listeners;e:{var y=void 0;if(r)for(var T=c.length-1;0<=T;T--){var P=c[T],Z=P.instance,ae=P.currentTarget;if(P=P.listener,Z!==y&&p.isPropagationStopped())break e;y=P,p.currentTarget=ae;try{y(p)}catch(pe){Ld(pe)}p.currentTarget=null,y=Z}else for(T=0;T<c.length;T++){if(P=c[T],Z=P.instance,ae=P.currentTarget,P=P.listener,Z!==y&&p.isPropagationStopped())break e;y=P,p.currentTarget=ae;try{y(p)}catch(pe){Ld(pe)}p.currentTarget=null,y=Z}}}}function $t(n,r){var a=r[Os];a===void 0&&(a=r[Os]=new Set);var c=n+"__bubble";a.has(c)||(lS(r,n,2,!1),a.add(c))}function y0(n,r,a){var c=0;r&&(c|=4),lS(a,n,c,r)}var Pf="_reactListening"+Math.random().toString(36).slice(2);function v0(n){if(!n[Pf]){n[Pf]=!0,Ot.forEach(function(a){a!=="selectionchange"&&(bD.has(a)||y0(a,!1,n),y0(a,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Pf]||(r[Pf]=!0,y0("selectionchange",!1,r))}}function lS(n,r,a,c){switch(ZS(r)){case 2:var p=dj;break;case 8:p=fj;break;default:p=_0}a=p.bind(null,r,a,n),p=void 0,!no||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),c?p!==void 0?n.addEventListener(r,a,{capture:!0,passive:p}):n.addEventListener(r,a,!0):p!==void 0?n.addEventListener(r,a,{passive:p}):n.addEventListener(r,a,!1)}function b0(n,r,a,c,p){var y=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var T=c.tag;if(T===3||T===4){var P=c.stateNode.containerInfo;if(P===p)break;if(T===4)for(T=c.return;T!==null;){var Z=T.tag;if((Z===3||Z===4)&&T.stateNode.containerInfo===p)return;T=T.return}for(;P!==null;){if(T=Fn(P),T===null)return;if(Z=T.tag,Z===5||Z===6||Z===26||Z===27){c=y=T;continue e}P=P.parentNode}}c=c.return}to(function(){var ae=y,pe=eo(a),Re=[];e:{var ie=Lx.get(n);if(ie!==void 0){var fe=jd,Ye=n;switch(n){case"keypress":if(Nd(a)===0)break e;case"keydown":case"keyup":fe=rN;break;case"focusin":Ye="focus",fe=Mg;break;case"focusout":Ye="blur",fe=Mg;break;case"beforeblur":case"afterblur":fe=Mg;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=dx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=qM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=lN;break;case Dx:case jx:case Ix:fe=$M;break;case Px:fe=uN;break;case"scroll":case"scrollend":fe=VM;break;case"wheel":fe=fN;break;case"copy":case"cut":case"paste":fe=XM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=hx;break;case"submit":fe=aN;break;case"toggle":case"beforetoggle":fe=pN}var it=(r&4)!==0,Pt=!it&&(n==="scroll"||n==="scrollend"),se=it?ie!==null?ie+"Capture":null:ie;it=[];for(var te=ae,ce;te!==null;){var Ce=te;if(ce=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||ce===null||se===null||(Ce=Ms(te,se),Ce!=null&&it.push(tu(te,Ce,ce))),Pt)break;te=te.return}0<it.length&&(ie=new fe(ie,Ye,null,a,pe),Re.push({event:ie,listeners:it}))}}if((r&7)===0){e:{if(fe=n==="mouseover"||n==="pointerover",ie=n==="mouseout"||n==="pointerout",fe&&a!==Wa&&(Ye=a.relatedTarget||a.fromElement)&&(Fn(Ye)||Ye[jn]))break e;(ie||fe)&&(Ye=pe.window===pe?pe:(fe=pe.ownerDocument)?fe.defaultView||fe.parentWindow:window,ie?(fe=a.relatedTarget||a.toElement,ie=ae,fe=fe?Fn(fe):null,fe!==null&&(Pt=l(fe),it=fe.tag,fe!==Pt||it!==5&&it!==27&&it!==6)&&(fe=null)):(ie=null,fe=ae),ie!==fe&&(it=dx,Ce="onMouseLeave",se="onMouseEnter",te="mouse",(n==="pointerout"||n==="pointerover")&&(it=hx,Ce="onPointerLeave",se="onPointerEnter",te="pointer"),Pt=ie==null?Ye:he(ie),ce=fe==null?Ye:he(fe),Ye=new it(Ce,te+"leave",ie,a,pe),Ye.target=Pt,Ye.relatedTarget=ce,Ce=null,Fn(pe)===ae&&(it=new it(se,te+"enter",fe,a,pe),it.target=ce,it.relatedTarget=Pt,Ce=it),Pt=Ce,it=ie&&fe?j(ie,fe,xD):null,ie!==null&&cS(Re,Ye,ie,it,!1),fe!==null&&Pt!==null&&cS(Re,Pt,fe,it,!0)))}e:{if(ie=ae?he(ae):window,fe=ie.nodeName&&ie.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ie.type==="file")var Je=Sx;else if(bx(ie))if(wx)Je=CN;else{Je=wN;var Wt=SN}else fe=ie.nodeName,!fe||fe.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?ae&&Ja(ae.elementType)&&(Je=Sx):Je=EN;if(Je&&(Je=Je(n,ae))){xx(Re,Je,a,pe);break e}Wt&&Wt(n,ie,ae)}switch(Wt=ae?he(ae):window,n){case"focusin":(bx(Wt)||Wt.contentEditable==="true")&&(Wo=Wt,zg=ae,Mc=null);break;case"focusout":Mc=zg=Wo=null;break;case"mousedown":_g=!0;break;case"contextmenu":case"mouseup":case"dragend":_g=!1,Mx(Re,a,pe);break;case"selectionchange":if(TN)break;case"keydown":case"keyup":Mx(Re,a,pe)}var ct;if(Dg)e:{switch(n){case"compositionstart":var St="onCompositionStart";break e;case"compositionend":St="onCompositionEnd";break e;case"compositionupdate":St="onCompositionUpdate";break e}St=void 0}else Jo?yx(n,a)&&(St="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(St="onCompositionStart");St&&(px&&a.locale!=="ko"&&(Jo||St!=="onCompositionStart"?St==="onCompositionEnd"&&Jo&&(ct=cx()):(oa=pe,kg="value"in oa?oa.value:oa.textContent,Jo=!0)),Wt=Lf(ae,St),0<Wt.length&&(St=new fx(St,n,null,a,pe),Re.push({event:St,listeners:Wt}),ct?St.data=ct:(ct=vx(a),ct!==null&&(St.data=ct)))),(ct=mN?yN(n,a):vN(n,a))&&(St=Lf(ae,"onBeforeInput"),0<St.length&&(Wt=new fx("onBeforeInput","beforeinput",null,a,pe),Re.push({event:Wt,listeners:St}),Wt.data=ct)),mD(Re,n,ae,a,pe)}oS(Re,r)})}function tu(n,r,a){return{instance:n,listener:r,currentTarget:a}}function Lf(n,r){for(var a=r+"Capture",c=[];n!==null;){var p=n,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=Ms(n,a),p!=null&&c.unshift(tu(n,p,y)),p=Ms(n,r),p!=null&&c.push(tu(n,p,y))),n.tag===3)return c;n=n.return}return[]}function xD(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function cS(n,r,a,c,p){for(var y=r._reactName,T=[];a!==null&&a!==c;){var P=a,Z=P.alternate,ae=P.stateNode;if(P=P.tag,Z!==null&&Z===c)break;P!==5&&P!==26&&P!==27||ae===null||(Z=ae,p?(ae=Ms(a,y),ae!=null&&T.unshift(tu(a,ae,Z))):p||(ae=Ms(a,y),ae!=null&&T.push(tu(a,ae,Z)))),a=a.return}T.length!==0&&n.push({event:r,listeners:T})}var SD=/\r\n?/g,wD=/\u0000|\uFFFD/g;function uS(n){return(typeof n=="string"?n:""+n).replace(SD,`
|
|
10
|
-
`).replace(wD,"")}function dS(n,r){return r=uS(r),uS(n)===r}function vn(n,r,a,c,p,y){switch(a){case"children":if(typeof c=="string")r==="body"||r==="textarea"&&c===""||Pr(n,c);else if(typeof c=="number"||typeof c=="bigint")r!=="body"&&Pr(n,""+c);else return;break;case"className":ii(n,"class",c);break;case"tabIndex":ii(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ii(n,a,c);break;case"style":ai(n,c,y);return;case"data":if(r!=="object"){ii(n,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||a!=="href")){n.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(a);break}c=mr(c),n.setAttribute(a,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(a,"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 y=="function"&&(a==="formAction"?(r!=="input"&&vn(n,r,"name",p.name,p,null),vn(n,r,"formEncType",p.formEncType,p,null),vn(n,r,"formMethod",p.formMethod,p,null),vn(n,r,"formTarget",p.formTarget,p,null)):(vn(n,r,"encType",p.encType,p,null),vn(n,r,"method",p.method,p,null),vn(n,r,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(a);break}c=mr(c),n.setAttribute(a,c);break;case"onClick":c!=null&&(n.onclick=Lr);return;case"onScroll":c!=null&&$t("scroll",n);return;case"onScrollEnd":c!=null&&$t("scrollend",n);return;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(a=c.__html,a!=null){if(p.children!=null)throw Error(s(60));y?.__html!==a&&(n.innerHTML=a)}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}a=mr(c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,c):n.removeAttribute(a);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":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":c===!0?n.setAttribute(a,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,c):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(a,c):n.removeAttribute(a);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(a):n.setAttribute(a,c);break;case"popover":$t("beforetoggle",n),$t("toggle",n),zn(n,"popover",c);break;case"xlinkActuate":Gn(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Gn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Gn(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Gn(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Gn(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Gn(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":zn(n,"is",c);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=Sc.get(a)||a,zn(n,a,c);else return}mt=!0}function x0(n,r,a,c,p,y){switch(a){case"style":ai(n,c,y);return;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(a=c.__html,a!=null){if(p.children!=null)throw Error(s(60));y?.__html!==a&&(n.innerHTML=a)}}break;case"children":if(typeof c=="string")Pr(n,c);else if(typeof c=="number"||typeof c=="bigint")Pr(n,""+c);else return;break;case"onScroll":c!=null&&$t("scroll",n);return;case"onScrollEnd":c!=null&&$t("scrollend",n);return;case"onClick":c!=null&&(n.onclick=Lr);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Ct.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(p=a.endsWith("Capture"),y=a.slice(2,p?a.length-7:void 0),r=n[An]||null,r=r!=null?r[a]:null,typeof r=="function"&&n.removeEventListener(y,r,p),typeof c=="function")){typeof r!="function"&&r!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(y,c,p);break e}mt=!0,a in n?n[a]=c:c===!0?n.setAttribute(a,""):zn(n,a,c)}return}mt=!0}function wr(n,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$t("error",n),$t("load",n);var c=!1,p=!1,y;for(y in a)if(a.hasOwnProperty(y)){var T=a[y];if(T!=null)switch(y){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:vn(n,r,y,T,a,null)}}p&&vn(n,r,"srcSet",a.srcSet,a,null),c&&vn(n,r,"src",a.src,a,null);return;case"input":$t("invalid",n);var P=y=T=p=null,Z=null,ae=null;for(c in a)if(a.hasOwnProperty(c)){var pe=a[c];if(pe!=null)switch(c){case"name":p=pe;break;case"type":T=pe;break;case"checked":Z=pe;break;case"defaultChecked":ae=pe;break;case"value":y=pe;break;case"defaultValue":P=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(s(137,r));break;default:vn(n,r,c,pe,a,null)}}sa(n,y,P,Z,ae,T,p,!1);return;case"select":$t("invalid",n),c=T=y=null;for(p in a)if(a.hasOwnProperty(p)&&(P=a[p],P!=null))switch(p){case"value":y=P;break;case"defaultValue":T=P;break;case"multiple":c=P;default:vn(n,r,p,P,a,null)}r=y,a=T,n.multiple=!!c,r!=null?qr(n,!!c,r,!1):a!=null&&qr(n,!!c,a,!0);return;case"textarea":$t("invalid",n),y=p=c=null;for(T in a)if(a.hasOwnProperty(T)&&(P=a[T],P!=null))switch(T){case"value":c=P;break;case"defaultValue":p=P;break;case"children":y=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(s(91));break;default:vn(n,r,T,P,a,null)}si(n,c,p,y);return;case"option":for(Z in a)a.hasOwnProperty(Z)&&(c=a[Z],c!=null)&&(Z==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":vn(n,r,Z,c,a,null));return;case"dialog":$t("beforetoggle",n),$t("toggle",n),$t("cancel",n),$t("close",n);break;case"iframe":case"object":$t("load",n);break;case"video":case"audio":for(c=0;c<eu.length;c++)$t(eu[c],n);break;case"image":$t("error",n),$t("load",n);break;case"details":$t("toggle",n);break;case"embed":case"source":case"link":$t("error",n),$t("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in a)if(a.hasOwnProperty(ae)&&(c=a[ae],c!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:vn(n,r,ae,c,a,null)}return;default:if(Ja(r)){for(pe in a)a.hasOwnProperty(pe)&&(c=a[pe],c!==void 0&&x0(n,r,pe,c,a,void 0));return}}for(P in a)a.hasOwnProperty(P)&&(c=a[P],c!=null&&vn(n,r,P,c,a,null))}var ED={};function CD(n,r,a,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,T=null,P=null,Z=null,ae=null,pe=null;for(fe in a){var Re=a[fe];if(a.hasOwnProperty(fe)&&Re!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":Z=Re;default:c.hasOwnProperty(fe)||vn(n,r,fe,null,c,Re)}}for(var ie in c){var fe=c[ie];if(Re=a[ie],c.hasOwnProperty(ie)&&(fe!=null||Re!=null))switch(ie){case"type":fe!==Re&&(mt=!0),y=fe;break;case"name":fe!==Re&&(mt=!0),p=fe;break;case"checked":fe!==Re&&(mt=!0),ae=fe;break;case"defaultChecked":fe!==Re&&(mt=!0),pe=fe;break;case"value":fe!==Re&&(mt=!0),T=fe;break;case"defaultValue":fe!==Re&&(mt=!0),P=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(s(137,r));break;default:fe!==Re&&vn(n,r,ie,fe,c,Re)}}Tr(n,T,P,Z,ae,pe,y,p);return;case"select":fe=T=P=ie=null;for(y in a)if(Z=a[y],a.hasOwnProperty(y)&&Z!=null)switch(y){case"value":break;case"multiple":fe=Z;default:c.hasOwnProperty(y)||vn(n,r,y,null,c,Z)}for(p in c)if(y=c[p],Z=a[p],c.hasOwnProperty(p)&&(y!=null||Z!=null))switch(p){case"value":y!==Z&&(mt=!0),ie=y;break;case"defaultValue":y!==Z&&(mt=!0),P=y;break;case"multiple":y!==Z&&(mt=!0),T=y;default:y!==Z&&vn(n,r,p,y,c,Z)}r=P,a=T,c=fe,ie!=null?qr(n,!!a,ie,!1):!!c!=!!a&&(r!=null?qr(n,!!a,r,!0):qr(n,!!a,a?[]:"",!1));return;case"textarea":fe=ie=null;for(P in a)if(p=a[P],a.hasOwnProperty(P)&&p!=null&&!c.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:vn(n,r,P,null,c,p)}for(T in c)if(p=c[T],y=a[T],c.hasOwnProperty(T)&&(p!=null||y!=null))switch(T){case"value":p!==y&&(mt=!0),ie=p;break;case"defaultValue":p!==y&&(mt=!0),fe=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(s(91));break;default:p!==y&&vn(n,r,T,p,c,y)}Zo(n,ie,fe);return;case"option":for(var Ye in a)ie=a[Ye],a.hasOwnProperty(Ye)&&ie!=null&&!c.hasOwnProperty(Ye)&&(Ye==="selected"?n.selected=!1:vn(n,r,Ye,null,c,ie));for(Z in c)ie=c[Z],fe=a[Z],c.hasOwnProperty(Z)&&ie!==fe&&(ie!=null||fe!=null)&&(Z==="selected"?(ie!==fe&&(mt=!0),n.selected=ie&&typeof ie!="function"&&typeof ie!="symbol"):vn(n,r,Z,ie,c,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 it in a)ie=a[it],a.hasOwnProperty(it)&&ie!=null&&!c.hasOwnProperty(it)&&vn(n,r,it,null,c,ie);for(ae in c)if(ie=c[ae],fe=a[ae],c.hasOwnProperty(ae)&&ie!==fe&&(ie!=null||fe!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(s(137,r));break;default:vn(n,r,ae,ie,c,fe)}return;default:if(Ja(r)){for(var Pt in a)ie=a[Pt],a.hasOwnProperty(Pt)&&ie!==void 0&&!c.hasOwnProperty(Pt)&&x0(n,r,Pt,void 0,c,ie);for(pe in c)ie=c[pe],fe=a[pe],!c.hasOwnProperty(pe)||ie===fe||ie===void 0&&fe===void 0||x0(n,r,pe,ie,c,fe);return}}for(var se in a)ie=a[se],a.hasOwnProperty(se)&&ie!=null&&!c.hasOwnProperty(se)&&vn(n,r,se,null,c,ie);for(Re in c)ie=c[Re],fe=a[Re],!c.hasOwnProperty(Re)||ie===fe||ie==null&&fe==null||vn(n,r,Re,ie,c,fe)}function fS(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function RD(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,a=performance.getEntriesByType("resource"),c=0;c<a.length;c++){var p=a[c],y=p.transferSize,T=p.initiatorType,P=p.duration;if(y&&P&&fS(T)){for(T=0,P=p.responseEnd,c+=1;c<a.length;c++){var Z=a[c],ae=Z.startTime;if(ae>P)break;var pe=Z.transferSize,Re=Z.initiatorType;pe&&fS(Re)&&(Z=Z.responseEnd,T+=pe*(Z<P?1:(P-ae)/(Z-ae)))}if(--c,r+=8*(y+T)/(p.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var S0=null,w0=null;function nu(n){return n.nodeType===9?n:n.ownerDocument}function hS(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function pS(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function gS(n,r,a,c){return a=nu(a).createElement(n),a[fn]=c,a[An]=r,wr(a,n,r),Se(a),a}function E0(n,r){return n==="textarea"||n==="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 C0=null;function TD(){var n=window.event;return n&&n.type==="popstate"?n===C0?!1:(C0=n,!0):(C0=null,!1)}var R0=typeof setTimeout=="function"?setTimeout:void 0,kD=typeof clearTimeout=="function"?clearTimeout:void 0,mS=typeof Promise=="function"?Promise:void 0,yS=typeof requestAnimationFrame=="function"?requestAnimationFrame:R0,OD=typeof queueMicrotask=="function"?queueMicrotask:typeof mS<"u"?function(n){return mS.resolve(null).then(n).catch(AD)}:R0;function AD(n){setTimeout(function(){throw n})}function ka(n){return n==="head"}function vS(n,r){var a=r,c=0;do{var p=a.nextSibling;if(n.removeChild(a),p&&p.nodeType===8)if(a=p.data,a==="/$"||a==="/&"){if(c===0){n.removeChild(p),Dl(r);return}c--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")c++;else if(a==="html")j0(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,j0(a);for(var y=a.firstChild;y;){var T=y.nextSibling,P=y.nodeName;y[xi]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&y.rel.toLowerCase()==="stylesheet"||a.removeChild(y),y=T}}else a==="body"&&j0(n.ownerDocument.body);a=p}while(a);Dl(r)}function bS(n,r){var a=n;n=0;do{var c=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=c}while(a)}function xS(n,r,a){if(r=CSS.escape(r)!==r?"r-"+btoa(r).replace(/=/g,""):r,n.style.viewTransitionName=r,a!=null&&(n.style.viewTransitionClass=a),a=getComputedStyle(n),a.display==="inline"){if(r=n.getClientRects(),r.length===1)var c=1;else for(var p=c=0;p<r.length;p++){var y=r[p];0<y.width&&0<y.height&&c++}c===1&&(n=n.style,n.display=r.length===1?"inline-block":"block",n.marginTop="-"+a.paddingTop,n.marginBottom="-"+a.paddingBottom)}}function SS(n,r){n=n.style,r=r.style;var a=r!=null?r.hasOwnProperty("viewTransitionName")?r.viewTransitionName:r.hasOwnProperty("view-transition-name")?r["view-transition-name"]:null:null;n.viewTransitionName=a==null||typeof a=="boolean"?"":(""+a).trim(),a=r!=null?r.hasOwnProperty("viewTransitionClass")?r.viewTransitionClass:r.hasOwnProperty("view-transition-class")?r["view-transition-class"]:null:null,n.viewTransitionClass=a==null||typeof a=="boolean"?"":(""+a).trim(),n.display==="inline-block"&&(r==null?n.display=n.margin="":(a=r.display,n.display=a==null||typeof a=="boolean"?"":a,a=r.margin,a!=null?n.margin=a:(a=r.hasOwnProperty("marginTop")?r.marginTop:r["margin-top"],n.marginTop=a==null||typeof a=="boolean"?"":a,r=r.hasOwnProperty("marginBottom")?r.marginBottom:r["margin-bottom"],n.marginBottom=r==null||typeof r=="boolean"?"":r)))}function MD(n,r,a){return a=a.ownerDocument.defaultView,{rect:n,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<=n.bottom&&0<=n.right&&n.top<=a.innerHeight&&n.left<=a.innerWidth}}function T0(n){var r=n.getBoundingClientRect(),a=getComputedStyle(n);return MD(r,a,n)}function ND(n){return n.documentElement.clientHeight}function DD(n){this.addEventListener("load",n),this.addEventListener("error",n)}function jD(n,r,a,c,p,y,T,P,Z){var ae=r.nodeType===9?r:r.ownerDocument;try{var pe=ae.startViewTransition({update:function(){var ie=ae.defaultView,fe=ie.navigation&&ie.navigation.transition,Ye=ae.fonts.status;c();var it=[];if(Ye==="loaded"&&(ND(ae),ae.fonts.status==="loading"&&it.push(ae.fonts.ready)),Ye=it.length,n!==null)for(var Pt=n.suspenseyImages,se=0,te=0;te<Pt.length;te++){var ce=Pt[te];if(!ce.complete){var Ce=ce.getBoundingClientRect();if(0<Ce.bottom&&0<Ce.right&&Ce.top<ie.innerHeight&&Ce.left<ie.innerWidth){if(se+=BS(ce),se>Uf){it.length=Ye;break}ce=new Promise(DD.bind(ce)),it.push(ce)}}}if(0<it.length)return ie=Promise.race([Promise.all(it),new Promise(function(Je){return setTimeout(Je,500)})]).then(p,p),(fe?Promise.allSettled([fe.finished,ie]):ie).then(y,y);if(p(),fe)return fe.finished.then(y,y);y()},types:a});ae.__reactViewTransition=pe;var Re=[];return pe.ready.then(function(){for(var ie=ae.documentElement.getAnimations({subtree:!0}),fe=0;fe<ie.length;fe++){var Ye=ie[fe],it=Ye.effect,Pt=it.pseudoElement;if(Pt!=null&&Pt.startsWith("::view-transition")){Re.push(Ye),Ye=it.getKeyframes();for(var se=Pt=void 0,te=!0,ce=0;ce<Ye.length;ce++){var Ce=Ye[ce],Je=Ce.width;if(Pt===void 0)Pt=Je;else if(Pt!==Je){te=!1;break}if(Je=Ce.height,se===void 0)se=Je;else if(se!==Je){te=!1;break}delete Ce.width,delete Ce.height,Ce.transform==="none"&&delete Ce.transform}te&&Pt!==void 0&&se!==void 0&&(it.setKeyframes(Ye),te=getComputedStyle(it.target,it.pseudoElement),te.width!==Pt||te.height!==se)&&(te=Ye[0],te.width=Pt,te.height=se,te=Ye[Ye.length-1],te.width=Pt,te.height=se,it.setKeyframes(Ye))}}T()},function(ie){ae.__reactViewTransition===pe&&(ae.__reactViewTransition=null);try{typeof ie=="object"&&ie!==null&&ie.name==="InvalidStateError"&&(ie.message==="View transition was skipped because document visibility state is hidden."||ie.message==="Skipping view transition because document visibility state has become hidden."||ie.message==="Skipping view transition because viewport size changed."||ie.message==="Transition was aborted because of invalid state")&&(ie=null),ie!==null&&Z(ie)}finally{c(),p(),T()}}),pe.finished.finally(function(){for(var ie=0;ie<Re.length;ie++)Re[ie].cancel();ae.__reactViewTransition===pe&&(ae.__reactViewTransition=null),P()}),pe}catch{return c(),p(),T(),null}}function Eo(n,r){this._scope=document.documentElement,this._selector="::view-transition-"+n+"("+r+")"}Eo.prototype.animate=function(n,r){return r=typeof r=="number"?{duration:r}:D({},r),r.pseudoElement=this._selector,this._scope.animate(n,r)},Eo.prototype.getAnimations=function(){for(var n=this._scope,r=this._selector,a=n.getAnimations({subtree:!0}),c=[],p=0;p<a.length;p++){var y=a[p].effect;y!==null&&y.target===n&&y.pseudoElement===r&&c.push(a[p])}return c},Eo.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function wS(n){return{name:n,group:new Eo("group",n),imagePair:new Eo("image-pair",n),old:new Eo("old",n),new:new Eo("new",n)}}function pi(n){this._fragmentFiber=n,this._observers=this._eventListeners=null}pi.prototype.addEventListener=function(n,r,a){var c=null,p=null;if(!(a!=null&&typeof a!="boolean"&&(c=a.signal||null,c!==null&&c.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var y=this._eventListeners;if(CS(y,n,r,a)===-1){var T=this,P=r;a!=null&&typeof a!="boolean"&&a.once===!0&&(P=function(Z){T.removeEventListener(n,r,a),typeof r=="function"?r.call(this,Z):r.handleEvent(Z)}),c!==null&&(p=T.removeEventListener.bind(T,n,r,a),c.addEventListener("abort",p,{once:!0}),p=c.removeEventListener.bind(c,"abort",p)),c=Tl(a),y.push({type:n,listener:r,optionsOrUseCapture:a,attachedListener:P,cleanup:p}),h(this._fragmentFiber.child,!1,ID,n,P,c)}this._eventListeners=y}};function ID(n,r,a,c){return E(n).addEventListener(r,a,c),!1}pi.prototype.removeEventListener=function(n,r,a){var c=this._eventListeners;if(c!==null&&(r=CS(c,n,r,a),r!==-1)){var p=c[r];a=p.attachedListener;var y=p.cleanup;p=Tl(p.optionsOrUseCapture),h(this._fragmentFiber.child,!1,PD,n,a,p),c.splice(r,1),y!==null&&y()}};function PD(n,r,a,c){return E(n).removeEventListener(r,a,c),!1}function Tl(n){return n!=null&&typeof n!="boolean"&&(n.once===!0||n.signal instanceof AbortSignal)?{capture:n.capture,passive:n.passive}:n}function ES(n){return n==null?"c=0":typeof n=="boolean"?"c="+(n?"1":"0"):"c="+(n.capture?"1":"0")}function CS(n,r,a,c){if(n.length===0)return-1;c=ES(c);for(var p=0;p<n.length;p++){var y=n[p];if(y.type===r&&y.listener===a&&ES(y.optionsOrUseCapture)===c)return p}return-1}pi.prototype.dispatchEvent=function(n){var r=x(this._fragmentFiber);if(r===null)return!0;r=E(r);var a=this._eventListeners;if(a!==null&&0<a.length||!n.bubbles){var c=r.nodeType===9?r.createComment(""):document.createTextNode("");if(a)for(var p=0;p<a.length;p++){var y=a[p];c.addEventListener(y.type,y.attachedListener,Tl(y.optionsOrUseCapture))}if(r.appendChild(c),n=c.dispatchEvent(n),a)for(p=0;p<a.length;p++)y=a[p],c.removeEventListener(y.type,y.attachedListener,Tl(y.optionsOrUseCapture));return r.removeChild(c),n}return r.dispatchEvent(n)},pi.prototype.focus=function(n){h(this._fragmentFiber.child,!0,RS,n,void 0,void 0)};function RS(n,r){return n.tag===6?!1:(n=E(n),GD(n,r))}pi.prototype.focusLast=function(n){var r=[];h(this._fragmentFiber.child,!0,k0,r,void 0,void 0);for(var a=r.length-1;0<=a&&!RS(r[a],n);a--);};function k0(n,r){return r.push(n),!1}pi.prototype.blur=function(){var n=x(this._fragmentFiber);n!==null&&(n=E(n),n=nu(n).activeElement,n!==null&&h(this._fragmentFiber.child,!1,LD,n,void 0,void 0))};function LD(n,r){return n.tag===6?!1:(n=E(n),n===r||n.contains(r)?(r.blur(),!0):!1)}pi.prototype.observeUsing=function(n){this._observers===null&&(this._observers=new Set),this._observers.add(n),h(this._fragmentFiber.child,!1,zD,n,void 0,void 0)};function zD(n,r){return n.tag===6||(n=E(n),r.observe(n)),!1}pi.prototype.unobserveUsing=function(n){var r=this._observers;if(r!==null&&r.has(n)){r.delete(n),h(this._fragmentFiber.child,!1,_D,n,void 0,void 0);for(var a=r=0;a<Ki.length;a++){var c=Ki[a];c.fragmentInstance===this&&c.observer===n?n.unobserve(c.instance):Ki[r++]=c}Ki.length=r}};function _D(n,r){return n.tag===6||(n=E(n),r.unobserve(n)),!1}var Ki=[],O0=!1;function UD(n,r,a){Ki.push({fragmentInstance:n,observer:r,instance:a}),O0||(O0=!0,$D(function(){O0=!1;var c=Ki;Ki=[];for(var p=0;p<c.length;p++){var y=c[p];y.observer.unobserve(y.instance)}}))}pi.prototype.getClientRects=function(){var n=[];return h(this._fragmentFiber.child,!1,HD,n,void 0,void 0),n};function HD(n,r){if(n.tag===6){n=n.stateNode;var a=n.ownerDocument.createRange();a.selectNodeContents(n),r.push.apply(r,a.getClientRects())}else n=E(n),r.push.apply(r,n.getClientRects());return!1}pi.prototype.getRootNode=function(n){var r=x(this._fragmentFiber);return r===null?this:E(r).getRootNode(n)},pi.prototype.compareDocumentPosition=function(n){var r=x(this._fragmentFiber);if(r===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];h(this._fragmentFiber.child,!1,k0,a,void 0,void 0);var c=E(r);if(a.length===0){if(a=c,S(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&&(a=r)}r=this._fragmentFiber;var p=c=a.compareDocumentPosition(n);return a===n?p=Node.DOCUMENT_POSITION_CONTAINS:c&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=w(r)[1],a===null?p=Node.DOCUMENT_POSITION_PRECEDING:(n=E(a).compareDocumentPosition(n),p=n===0||n&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),p|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}r=E(a[0]),p=E(a[a.length-1]);var y=S(this._fragmentFiber)?r.parentElement:c;if(y==null)return Node.DOCUMENT_POSITION_DISCONNECTED;c=y.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY,y=y.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_CONTAINED_BY;var T=r.compareDocumentPosition(n),P=p.compareDocumentPosition(n),Z=T&Node.DOCUMENT_POSITION_CONTAINED_BY||P&Node.DOCUMENT_POSITION_CONTAINED_BY;return P=c&&y&&T&Node.DOCUMENT_POSITION_FOLLOWING&&P&Node.DOCUMENT_POSITION_PRECEDING,r=c&&r===n||y&&p===n||Z||P?Node.DOCUMENT_POSITION_CONTAINED_BY:!c&&r===n||!y&&p===n?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:T,r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||FD(r,this._fragmentFiber,a[0],a[a.length-1],n)?r:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function FD(n,r,a,c,p){var y=Fn(p);if(n&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!y)e:{for(;y!==null;){if(y.tag===7&&(y===r||y.alternate===r)){a=!0;break e}y=y.return}a=!1}return a}if(n&Node.DOCUMENT_POSITION_CONTAINS){if(y===null)return y=p.ownerDocument,p===y||p===y.documentElement||p===y.body;e:{for(y=r,r=x(r);y!==null;){if(!(y.tag!==5&&y.tag!==3&&y.tag!==27||y!==r&&y.alternate!==r)){y=!0;break e}y=y.return}y=!1}return y}return n&Node.DOCUMENT_POSITION_PRECEDING?((r=!!y)&&!(r=y===a)&&(r=j(a,y,N),r===null?r=!1:(h(r,!0,k,y,a),y=C,C=null,r=y!==null)),r):n&Node.DOCUMENT_POSITION_FOLLOWING?((r=!!y)&&!(r=y===c)&&(r=j(c,y,N),r===null?r=!1:(h(r,!0,A,y,c),y=C,O=C=null,r=y!==null)),r):!1}function TS(n,r){var a=n.ownerDocument.createRange();a.selectNodeContents(n),n=a.getBoundingClientRect(),window.scrollTo(window.scrollX+n.left,r?window.scrollY+n.top:window.scrollY+n.bottom-window.innerHeight)}pi.prototype.scrollIntoView=function(n){if(typeof n=="object")throw Error(s(566));var r=[];h(this._fragmentFiber.child,!1,k0,r,void 0,void 0);var a=n!==!1;if(r.length===0){var c=w(this._fragmentFiber);if(c=a?c[1]||c[0]||x(this._fragmentFiber):c[0]||c[1],c===null)return;if(c.tag===6){n=E(c),TS(n,a);return}if(c=E(c),c.nodeType!==9){if(c.nodeType===11){a="host"in c?c.host:null,a!==null&&a.scrollIntoView(n);return}c.scrollIntoView(n)}}for(c=a?r.length-1:0;c!==(a?-1:r.length);){var p=r[c];p.tag===6?(p=E(p),TS(p,a)):E(p).scrollIntoView(n),c+=a?-1:1}};function BD(n,r){return n=E(n),kS(n,r),!1}function kS(n,r){n.reactFragments==null&&(n.reactFragments=new Set),n.reactFragments.add(r)}function OS(n,r){var a=r._eventListeners;if(a!==null)for(var c=0;c<a.length;c++){var p=a[c];n.addEventListener(p.type,p.attachedListener,Tl(p.optionsOrUseCapture))}n.nodeType!==3&&(a=r._observers,a!==null&&a.forEach(function(y){for(var T=0,P=0;P<Ki.length;P++){var Z=Ki[P];(Z.fragmentInstance!==r||Z.observer!==y||Z.instance!==n)&&(Ki[T++]=Z)}Ki.length=T,y.observe(n)}),kS(n,r))}function VD(n,r){var a=r._eventListeners;if(a!==null)for(var c=0;c<a.length;c++){var p=a[c];n.removeEventListener(p.type,p.attachedListener,Tl(p.optionsOrUseCapture))}n.nodeType!==3&&(a=r._observers,a!==null&&a.forEach(function(y){typeof y.rootMargin=="string"?UD(r,y,n):y.unobserve(n)}),n.reactFragments!=null&&n.reactFragments.delete(r))}function A0(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":A0(a),qn(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function KD(n,r,a,c){for(;n.nodeType===1;){var p=a;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[xi])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=Oi(n.nextSibling),n===null)break}return null}function qD(n,r,a){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Oi(n.nextSibling),n===null))return null;return n}function AS(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=Oi(n.nextSibling),n===null))return null;return n}function M0(n){return n.data==="$?"||n.data==="$~"}function N0(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function YD(n,r){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||a.readyState!=="loading")r();else{var c=function(){r(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function Oi(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var D0=null;function MS(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(r===0)return Oi(n.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}n=n.nextSibling}return null}function NS(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return n;r--}else a!=="/$"&&a!=="/&"||r++}n=n.previousSibling}return null}function GD(n,r){function a(){c=!0}if(n.ownerDocument.activeElement===n)return!0;var c=!1;try{n.ownerDocument.addEventListener("focus",a,!0),(n.focus||HTMLElement.prototype.focus).call(n,r)}finally{n.ownerDocument.removeEventListener("focus",a,!0)}return c}function $D(n){yS(function(){yS(function(r){return n(r)})})}function DS(n,r,a){switch(r=nu(a),n){case"html":if(n=r.documentElement,!n)throw Error(s(452));return n;case"head":if(n=r.head,!n)throw Error(s(453));return n;case"body":if(n=r.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function jS(n,r,a){for(var c in a){var p=a[c];a.hasOwnProperty(c)&&p!=null&&vn(n,r,c,null,ED,p)}a.dangerouslySetInnerHTML!=null&&(n.textContent=""),n.onclick===Lr&&(n.onclick=null),qn(n)}function j0(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);qn(n)}var Ai=new Map,IS=new Set;function ru(n){if(typeof n.getRootNode=="function"){var r=n.getRootNode();if(r.nodeType===9||r.nodeType===11)return r}return n.nodeType===9?n:n.ownerDocument}var Bs=ue.d;ue.d={f:QD,r:XD,D:ZD,C:JD,L:WD,m:ej,X:nj,S:tj,M:rj};function QD(){var n=Bs.f(),r=Mf();return n||r}function XD(n){var r=gr(n);r!==null&&r.tag===5&&r.type==="form"?L2(r):Bs.r(n)}var kl=typeof document>"u"?null:document;function PS(n,r,a){var c=kl;if(c&&typeof r=="string"&&r){var p=Dn(r);p='link[rel="'+n+'"][href="'+p+'"]',typeof a=="string"&&(p+='[crossorigin="'+a+'"]'),IS.has(p)||(IS.add(p),n={rel:n,crossOrigin:a,href:r},c.querySelector(p)===null&&(r=c.createElement("link"),wr(r,"link",n),Se(r),c.head.appendChild(r)))}}function ZD(n){Bs.D(n),PS("dns-prefetch",n,null)}function JD(n,r){Bs.C(n,r),PS("preconnect",n,r)}function WD(n,r,a){Bs.L(n,r,a);var c=kl;if(c&&n&&r){var p='link[rel="preload"][as="'+Dn(r)+'"]';r==="image"&&a&&a.imageSrcSet?(p+='[imagesrcset="'+Dn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(p+='[imagesizes="'+Dn(a.imageSizes)+'"]')):p+='[href="'+Dn(n)+'"]';var y=p;switch(r){case"style":y=Ol(n);break;case"script":y=Al(n)}if(!(Ai.has(y)||(n=D({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:n,as:r},a),Ai.set(y,n),c.querySelector(p)!==null||r==="style"&&c.querySelector(iu(y))||r==="script"&&c.querySelector(su(y))))){var T=c.createElement("link");wr(T,"link",n),r==="style"&&(T[zt]=!0,T.onload=T.onerror=function(){rt(T)}),Se(T),c.head.appendChild(T)}}}function ej(n,r){Bs.m(n,r);var a=kl;if(a&&n){var c=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+Dn(c)+'"][href="'+Dn(n)+'"]',y=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Al(n)}if(!Ai.has(y)&&(n=D({rel:"modulepreload",href:n},r),Ai.set(y,n),a.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(su(y)))return}c=a.createElement("link"),wr(c,"link",n),Se(c),a.head.appendChild(c)}}}function tj(n,r,a){Bs.S(n,r,a);var c=kl;if(c&&n){var p=Ae(c).hoistableStyles,y=Ol(n);r=r||"default";var T=p.get(y);if(!T){var P={loading:0,preload:null};if(T=c.querySelector(iu(y)))P.loading=5;else{n=D({rel:"stylesheet",href:n,"data-precedence":r},a),(a=Ai.get(y))&&I0(n,a);var Z=T=c.createElement("link");Se(Z),wr(Z,"link",n),Z._p=new Promise(function(ae,pe){Z.onload=ae,Z.onerror=pe}),Z.addEventListener("load",function(){P.loading|=1}),Z.addEventListener("error",function(){P.loading|=2}),P.loading|=4,zf(T,r,c)}T={type:"stylesheet",instance:T,count:1,state:P},p.set(y,T)}}}function nj(n,r){Bs.X(n,r);var a=kl;if(a&&n){var c=Ae(a).hoistableScripts,p=Al(n),y=c.get(p);y||(y=a.querySelector(su(p)),y||(n=D({src:n,async:!0},r),(r=Ai.get(p))&&P0(n,r),y=a.createElement("script"),Se(y),wr(y,"link",n),a.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function rj(n,r){Bs.M(n,r);var a=kl;if(a&&n){var c=Ae(a).hoistableScripts,p=Al(n),y=c.get(p);y||(y=a.querySelector(su(p)),y||(n=D({src:n,async:!0,type:"module"},r),(r=Ai.get(p))&&P0(n,r),y=a.createElement("script"),Se(y),wr(y,"link",n),a.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function LS(n,r,a,c){var p=(p=be.current)?ru(p):null;if(!p)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=Ol(a.href),r=Ae(p).hoistableStyles,c=r.get(a),c||(c={type:"style",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=Ol(a.href);var y=Ae(p).hoistableStyles,T=y.get(n);if(T||(p=p.ownerDocument||p,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,T),(y=p.querySelector(iu(n)))?y._p||(T.instance=y,T.state.loading=5):(y=Ai.get(n),y||(y={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ai.set(n,y)),ij(p,n,y,T.state))),r&&c===null)throw Error(s(528,""));return T}if(r&&c!==null)throw Error(s(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(a=Al(a),r=Ae(p).hoistableScripts,c=r.get(a),c||(c={type:"script",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function Ol(n){return'href="'+Dn(n)+'"'}function iu(n){return'link[rel="stylesheet"]['+n+"]"}function zS(n){return D({},n,{"data-precedence":n.precedence,precedence:null})}function ij(n,r,a,c){if(r=n.querySelector('link[rel="preload"][as="style"]['+r+"]")){if(r[zt]!==!0){c.loading=1;return}}else r=n.createElement("link"),r[zt]=!0,r.onload=r.onerror=rt.bind(null,r),wr(r,"link",a),Se(r),n.head.appendChild(r);c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2})}function Al(n){return'[src="'+Dn(n)+'"]'}function su(n){return"script[async]"+n}function _S(n,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var c=n.querySelector('style[data-href~="'+Dn(a.href)+'"]');if(c)return r.instance=c,Se(c),c;var p=D({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),Se(c),wr(c,"style",p),zf(c,a.precedence,n),r.instance=c;case"stylesheet":p=Ol(a.href);var y=n.querySelector(iu(p));if(y)return r.state.loading|=4,r.instance=y,Se(y),y;c=zS(a),(p=Ai.get(p))&&I0(c,p),y=(n.ownerDocument||n).createElement("link"),Se(y);var T=y;return T._p=new Promise(function(P,Z){T.onload=P,T.onerror=Z}),wr(y,"link",c),r.state.loading|=4,zf(y,a.precedence,n),r.instance=y;case"script":return y=Al(a.src),(p=n.querySelector(su(y)))?(r.instance=p,Se(p),p):(c=a,(p=Ai.get(y))&&(c=D({},a),P0(c,p)),n=n.ownerDocument||n,p=n.createElement("script"),Se(p),wr(p,"link",c),n.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,zf(c,a.precedence,n));return r.instance}function zf(n,r,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,y=p,T=0;T<c.length;T++){var P=c[T];if(P.dataset.precedence===r)y=P;else if(y!==p)break}y?y.parentNode.insertBefore(n,y.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(n,r.firstChild))}function I0(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function P0(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var _f=null;function US(n,r,a){if(_f===null){var c=new Map,p=_f=new Map;p.set(a,c)}else p=_f,c=p.get(a),c||(c=new Map,p.set(a,c));if(c.has(n))return c;for(c.set(n,null),a=a.getElementsByTagName(n),p=0;p<a.length;p++){var y=a[p];if(!(y[xi]||y[fn]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var T=y.getAttribute(r)||"";T=n+T;var P=c.get(T);P?P.push(y):c.set(T,[y])}}return c}function L0(n,r,a){n=n.ownerDocument||n,n.head.insertBefore(a,r==="title"?n.querySelector("head > title"):null)}function sj(n,r,a){if(a===1||r.itemProp!=null)return!1;switch(n){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"?(n=r.disabled,typeof r.precedence=="string"&&n==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 HS(n,r){return n==="img"&&r.src!=null&&r.src!==""&&r.onLoad==null&&r.loading!=="lazy"}function FS(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function BS(n){return(n.width||100)*(n.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function VS(n,r){typeof r.decode=="function"&&(n.imgCount++,r.complete||(n.imgBytes+=BS(r),n.suspenseyImages.push(r)),n=lj.bind(n),r.decode().then(n,n))}function aj(n,r,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=Ol(c.href),y=r.querySelector(iu(p));if(y){r=y._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=au.bind(n),r.then(n,n)),a.state.loading|=4,a.instance=y,Se(y);return}y=r.ownerDocument||r,c=zS(c),(p=Ai.get(p))&&I0(c,p),y=y.createElement("link"),Se(y);var T=y;T._p=new Promise(function(P,Z){T.onload=P,T.onerror=Z}),wr(y,"link",c),a.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,r),(r=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=au.bind(n),r.addEventListener("load",a),r.addEventListener("error",a))}}var Uf=0;function oj(n,r){return n.stylesheets&&n.count===0&&Ff(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var c=setTimeout(function(){if(n.stylesheets&&Ff(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+r);0<n.imgBytes&&Uf===0&&(Uf=62500*RD());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Ff(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>Uf?50:800)+r);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function KS(n){if(n.count===0&&(n.imgCount===0||!n.waitingForImages)){if(n.stylesheets)Ff(n,n.stylesheets);else if(n.unsuspend){var r=n.unsuspend;n.unsuspend=null,r()}}}function au(){this.count--,KS(this)}function lj(){this.imgCount--,KS(this)}var Hf=null;function Ff(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Hf=new Map,r.forEach(cj,n),Hf=null,au.call(n))}function cj(n,r){if(!(r.state.loading&4)){var a=Hf.get(n);if(a)var c=a.get(null);else{a=new Map,Hf.set(n,a);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var T=p[y];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(a.set(T.dataset.precedence,T),c=T)}c&&a.set(null,c)}p=r.instance,T=p.getAttribute("data-precedence"),y=a.get(T)||c,y===c&&a.set(null,p),a.set(T,p),this.count++,c=au.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),y?y.parentNode.insertBefore(p,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),r.state.loading|=4}}var Ml={$$typeof:U,Provider:null,Consumer:null,_currentValue:Te,_currentValue2:Te,_threadCount:0};function uj(n,r,a,c,p,y,T,P,Z){this.tag=1,this.containerInfo=n,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=Et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Et(0),this.hiddenUpdates=Et(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.transitionTypes=null,this.incompleteTransitions=new Map}function qS(n,r,a,c,p,y,T,P,Z,ae,pe,Re){return n=new uj(n,r,a,T,Z,ae,pe,Re,P),r=1,y===!0&&(r|=24),y=Yr(3,null,null,r),n.current=y,y.stateNode=n,r=Zg(),r.refCount++,n.pooledCache=r,r.refCount++,y.memoizedState={element:c,isDehydrated:a,cache:r},tm(y),n}function YS(n){return n?(n=nl,n):nl}function GS(n,r,a,c,p,y){p=YS(p),c.context===null?c.context=p:c.pendingContext=p,c=ga(r),c.payload={element:a},y=y===void 0?null:y,y!==null&&(c.callback=y),a=ma(n,c,r),a!==null&&(Xr(a,n,r),zc(a,n,r))}function $S(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<r?a:r}}function z0(n,r){$S(n,r),(n=n.alternate)&&$S(n,r)}function QS(n){if(n.tag===13||n.tag===31){var r=so(n,67108864);r!==null&&Xr(r,n,67108864),z0(n,67108864)}}function XS(n){if(n.tag===13||n.tag===31){var r=hi();r=Vt(r);var a=so(n,r);a!==null&&Xr(a,n,r),z0(n,r)}}var Nl=!0;function dj(n,r,a,c){var p=ge.T;ge.T=null;var y=ue.p;try{ue.p=2,_0(n,r,a,c)}finally{ue.p=y,ge.T=p}}function fj(n,r,a,c){var p=ge.T;ge.T=null;var y=ue.p;try{ue.p=8,_0(n,r,a,c)}finally{ue.p=y,ge.T=p}}function _0(n,r,a,c){if(Nl){var p=U0(c);if(p===null)b0(n,r,c,Bf,a),JS(n,c);else if(pj(p,n,r,a,c))c.stopPropagation();else if(JS(n,c),r&4&&-1<hj.indexOf(n)){for(;p!==null;){var y=gr(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var T=qe(y.pendingLanes);if(T!==0){var P=y;for(P.pendingLanes|=2,P.entangledLanes|=2;T;){var Z=1<<31-et(T);P.entanglements[1]|=Z,T&=~Z}us(y),(cn&6)===0&&(kf=wt()+500,Wc(0))}}break;case 31:case 13:P=so(y,2),P!==null&&Xr(P,y,2),Mf(),z0(y,2)}if(y=U0(c),y===null&&b0(n,r,c,Bf,a),y===p)break;p=y}p!==null&&c.stopPropagation()}else b0(n,r,c,null,a)}}function U0(n){return n=eo(n),H0(n)}var Bf=null;function H0(n){if(Bf=null,n=Fn(n),n!==null){var r=l(n);if(r===null)n=null;else{var a=r.tag;if(a===13){if(n=u(r),n!==null)return n;n=null}else if(a===31){if(n=d(r),n!==null)return n;n=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Bf=n,null}function ZS(n){switch(n){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(Zt()){case ht:return 2;case xt:return 8;case yt:case Ut:return 32;case un:return 268435456;default:return 32}default:return 32}}var F0=!1,Oa=null,Aa=null,Ma=null,ou=new Map,lu=new Map,Na=[],hj="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 JS(n,r){switch(n){case"focusin":case"focusout":Oa=null;break;case"dragenter":case"dragleave":Aa=null;break;case"mouseover":case"mouseout":Ma=null;break;case"pointerover":case"pointerout":ou.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":lu.delete(r.pointerId)}}function cu(n,r,a,c,p,y){return n===null||n.nativeEvent!==y?(n={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:y,targetContainers:[p]},r!==null&&(r=gr(r),r!==null&&QS(r)),n):(n.eventSystemFlags|=c,r=n.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),n)}function pj(n,r,a,c,p){switch(r){case"focusin":return Oa=cu(Oa,n,r,a,c,p),!0;case"dragenter":return Aa=cu(Aa,n,r,a,c,p),!0;case"mouseover":return Ma=cu(Ma,n,r,a,c,p),!0;case"pointerover":var y=p.pointerId;return ou.set(y,cu(ou.get(y)||null,n,r,a,c,p)),!0;case"gotpointercapture":return y=p.pointerId,lu.set(y,cu(lu.get(y)||null,n,r,a,c,p)),!0}return!1}function WS(n){var r=Fn(n.target);if(r!==null){var a=l(r);if(a!==null){if(r=a.tag,r===13){if(r=u(a),r!==null){n.blockedOn=r,ni(n.priority,function(){XS(a)});return}}else if(r===31){if(r=d(a),r!==null){n.blockedOn=r,ni(n.priority,function(){XS(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Vf(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var a=U0(n.nativeEvent);if(a===null){a=n.nativeEvent;var c=new a.constructor(a.type,a);Wa=c,a.target.dispatchEvent(c),Wa=null}else return r=gr(a),r!==null&&QS(r),n.blockedOn=a,!1;r.shift()}return!0}function ew(n,r,a){Vf(n)&&a.delete(r)}function gj(){F0=!1,Oa!==null&&Vf(Oa)&&(Oa=null),Aa!==null&&Vf(Aa)&&(Aa=null),Ma!==null&&Vf(Ma)&&(Ma=null),ou.forEach(ew),lu.forEach(ew)}function Kf(n,r){n.blockedOn===r&&(n.blockedOn=null,F0||(F0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,gj)))}var qf=null;function tw(n){qf!==n&&(qf=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qf===n&&(qf=null);for(var r=0;r<n.length;r+=3){var a=n[r],c=n[r+1],p=n[r+2];if(typeof c!="function"){if(H0(c||a)===null)continue;break}var y=gr(a);y!==null&&(n.splice(r,3),r-=3,wm(y,{pending:!0,data:p,method:a.method,action:c},c,p))}}))}function Dl(n){function r(Z){return Kf(Z,n)}Oa!==null&&Kf(Oa,n),Aa!==null&&Kf(Aa,n),Ma!==null&&Kf(Ma,n),ou.forEach(r),lu.forEach(r);for(var a=0;a<Na.length;a++){var c=Na[a];c.blockedOn===n&&(c.blockedOn=null)}for(;0<Na.length&&(a=Na[0],a.blockedOn===null);)WS(a),a.blockedOn===null&&Na.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var p=a[c],y=a[c+1],T=p[An]||null;if(typeof y=="function")T||tw(a);else if(T){var P=null;if(y&&y.hasAttribute("formAction")){if(p=y,T=y[An]||null)P=T.formAction;else if(H0(p)!==null)continue}else P=T.action;typeof P=="function"?a[c+1]=P:(a.splice(c,3),c-=3),tw(a)}}}function nw(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(T){return p=T})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),c||setTimeout(a,20)}function a(){if(!c&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function B0(n){this._internalRoot=n}Yf.prototype.render=B0.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(s(409));var a=r.current,c=hi();GS(a,c,n,r,null,null)},Yf.prototype.unmount=B0.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;GS(n.current,2,null,n,null,null),Mf(),r[jn]=null}};function Yf(n){this._internalRoot=n}Yf.prototype.unstable_scheduleHydration=function(n){if(n){var r=Tn();n={blockedOn:null,target:n,priority:r};for(var a=0;a<Na.length&&r!==0&&r<Na[a].priority;a++);Na.splice(a,0,n),a===0&&WS(n)}};var rw=t.version;if(rw!=="19.3.1")throw Error(s(527,rw,"19.3.1"));ue.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=g(r),n=n!==null?m(n):null,n=n===null?null:n.stateNode,n};var mj={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ge,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gf.isDisabled&&Gf.supportsFiber)try{Ie=Gf.inject(mj),ze=Gf}catch{}}return du.createRoot=function(n,r){if(!o(n))throw Error(s(299));var a=!1,c="",p=Y2,y=G2,T=$2;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(y=r.onCaughtError),r.onRecoverableError!==void 0&&(T=r.onRecoverableError)),r=qS(n,1,!1,null,null,a,c,null,p,y,T,nw),n[jn]=r.current,v0(n),new B0(r)},du.hydrateRoot=function(n,r,a){if(!o(n))throw Error(s(299));var c=!1,p="",y=Y2,T=G2,P=$2,Z=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(T=a.onCaughtError),a.onRecoverableError!==void 0&&(P=a.onRecoverableError),a.formState!==void 0&&(Z=a.formState)),r=qS(n,1,!0,r,a??null,c,p,Z,y,T,P,nw),r.context=YS(null),a=r.current,c=hi(),c=Vt(c),p=ga(c),p.callback=null,ma(a,p,c),a=c,r.current.lanes=a,ft(r,a),us(r),n[jn]=r.current,v0(n),new Yf(r)},du.version="19.3.1",du}var hw;function Tj(){if(hw)return q0.exports;hw=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(t){console.error(t)}}return e(),q0.exports=Rj(),q0.exports}var kj=Tj();const pw={};function tr(e,t){const i=b.useRef(pw);return i.current===pw&&(i.current=e(t)),i}const Oy=[];let Ay;function Oj(){return Ay}function Aj(e){Oy.push(e)}function Xu(e){const t=(i,s)=>{const o=tr(Mj).current;let l;try{Ay=o;for(const u of Oy)u.before(o);l=e(i,s);for(const u of Oy)u.after(o);o.didInitialize=!0}finally{Ay=void 0}return l};return t.displayName=e.displayName||e.name,t}function gp(e){return b.forwardRef(Xu(e))}function Mj(){return{didInitialize:!1}}function En(){}const $i=Object.freeze([]),Xt=Object.freeze({}),Nj=()=>{},_e=typeof document<"u"?b.useLayoutEffect:Nj;function Dj(e,t){return function(s,...o){const l=new URL(e);return l.searchParams.set("code",s.toString()),o.forEach(u=>l.searchParams.append("args[]",u)),`${t} error #${s}; visit ${l} for the full message.`}}const gn=Dj("https://base-ui.com/production-error","Base UI"),YC=b.createContext(void 0);function Zu(e){const t=b.useContext(YC);if(t===void 0&&!e)throw new Error(gn(72));return t}function Sv(e){b.useEffect(e,$i)}const fu=0;class Pi{static create(){return new Pi}currentId=fu;start(t,i){this.clear(),this.currentId=setTimeout(()=>{this.currentId=fu,i()},t)}isStarted(){return this.currentId!==fu}clear=()=>{this.currentId!==fu&&(clearTimeout(this.currentId),this.currentId=fu)};disposeEffect=()=>this.clear}function Un(){const e=tr(Pi.create).current;return Sv(e.disposeEffect),e}function jj(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:Ij,platform:Pj,maxTouchPoints:Lj}=jj(),mp=Ij.toLowerCase(),Pu=Pj.toLowerCase(),yp=/^i(os$|p)/.test(Pu)||Pu==="macintel"&&Lj>1,gw="android",My=Pu===gw||mp.includes(gw),wv=!yp&&Pu.startsWith("mac");Pu.startsWith("win");const zj=wv||yp,Ss=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!Ss&&mp.includes("firefox");!Ss&&mp.includes("chrom");const _j=zj,Ev=/jsdom|happydom/.test(mp);function Yi(e){e.preventDefault(),e.stopPropagation()}function Uj(e){return"nativeEvent"in e}function ec(e){return e.pointerType===""&&e.isTrusted?!0:My&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Cv(e){return Ev?!1:!My&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(My||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ua(e,t){const i=["mouse","pen"];return t||i.push("",void 0),i.includes(e)}function Hj(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function vp(){return typeof window<"u"}function Cr(e){return Rv(e)?(e.nodeName||"").toLowerCase():"#document"}function Cn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ea(e){var t;return(t=(Rv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rv(e){return vp()?e instanceof Node||e instanceof Cn(e).Node:!1}function ln(e){return vp()?e instanceof Element||e instanceof Cn(e).Element:!1}function bn(e){return vp()?e instanceof HTMLElement||e instanceof Cn(e).HTMLElement:!1}function Io(e){return!vp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cn(e).ShadowRoot}function Ju(e){const{overflow:t,overflowX:i,overflowY:s,display:o}=yi(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+i)&&o!=="inline"&&o!=="contents"}function Fj(e){return/^(table|td|th)$/.test(Cr(e))}function bp(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Bj=/transform|translate|scale|rotate|perspective|filter/,Vj=/paint|layout|strict|content/,Co=e=>!!e&&e!=="none";let Q0;function Tv(e){const t=ln(e)?yi(e):e;return Co(t.transform)||Co(t.translate)||Co(t.scale)||Co(t.rotate)||Co(t.perspective)||!kv()&&(Co(t.backdropFilter)||Co(t.filter))||Bj.test(t.willChange||"")||Vj.test(t.contain||"")}function Kj(e){let t=Zs(e);for(;bn(t)&&!$s(t);){if(Tv(t))return t;if(bp(t))return null;t=Zs(t)}return null}function kv(){return Q0==null&&(Q0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Q0}function $s(e){return/^(html|body|#document)$/.test(Cr(e))}function yi(e){return Cn(e).getComputedStyle(e)}function xp(e){return ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zs(e){if(Cr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Io(e)&&e.host||ea(e);return Io(t)?t.host:t}function GC(e){const t=Zs(e);return $s(t)?(e.ownerDocument||e).body:bn(t)&&Ju(t)?t:GC(t)}function Lu(e,t,i){var s;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=GC(e),l=o===((s=e.ownerDocument)==null?void 0:s.body),u=Cn(o);if(l){const d=Ny(u);return t.concat(u,u.visualViewport||[],Ju(o)?o:[],d&&i?Lu(d):[])}else return t.concat(o,Lu(o,[],i))}function Ny(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Jr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function st(e,t){if(!e||!t)return!1;const i=t.getRootNode?.();if(e.contains(t))return!0;if(i&&Io(i)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function zu(e,t){let i=e;for(;i;){if(ln(i)&&i.matches(t))return i;i=i.assignedSlot??i.parentNode??(Io(i)?i.host:null)}return null}function nr(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const Dy="data-base-ui-focusable",$C="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Sp="ArrowLeft",wp="ArrowRight",QC="ArrowUp",Ov="ArrowDown",Av="data-starting-style",qj="data-ending-style",Yj={[Av]:""},Gj={[qj]:""},ws={transitionStatus(e){return e==="starting"?Yj:e==="ending"?Gj:null}},$j="data-open",Qj="data-closed",Xj="data-anchor-hidden",XC="data-popup-open",Zj="data-pressed",Jj={[XC]:""},Wj={[XC]:"",[Zj]:""},e4={[$j]:""},t4={[Qj]:""},n4={[Xj]:""},Ep={open(e){return e?Jj:null}},_u={open(e){return e?Wj:null}},Wu={open(e){return e?e4:t4},anchorHidden(e){return e?n4:null}},Cp={...Wu,...ws},jy="data-trigger-disabled";function _h(e,t){if(!ln(e))return!1;const i=e;if(t.hasElement(i))return!i.hasAttribute(jy);for(const[,s]of t.entries())if(st(s,i))return!s.hasAttribute(jy);return!1}function X0(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const i=e;return i.target!=null&&t.contains(i.target)}function r4(e){return e.matches("html,body")}function ed(e){return bn(e)&&e.matches($C)}function i4(e){return zu(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${$C}`)!=null}function Iy(e){return e?e.getAttribute("role")==="combobox"&&ed(e):!1}function s4(e){if(!e||Ev)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Uh(e){return e?e.hasAttribute(Dy)?e:e.querySelector(`[${Dy}]`)||e:null}function a4(e,t){return t!=null&&!Ua(t)?0:typeof e=="function"?e():e}function Po(e,t,i){const s=a4(e,i);return typeof s=="number"?s:s?.[t]}function mw(e){return typeof e=="function"?e():e}function ZC(e,t){return t||e==="click"||e==="mousedown"}function o4(e){return e?.includes("mouse")&&e!=="mousedown"}function ut(e,t,i,s){let o=!1,l=!1;const u=s??Xt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){l=!0},get isCanceled(){return o},get isPropagationAllowed(){return l},trigger:i,...u}}function l4(e,t,i){const s=i??Xt;return{reason:e,event:t??new Event("base-ui"),...s}}const Dr="none",Qi="trigger-press",Kn="trigger-hover",Bl="trigger-focus",Rp="outside-press",No="item-press",JC="close-press",Fa="focus-out",td="escape-key",Hh="list-navigation",WC="keyboard",c4="pointer",Mv="cancel-open",vu="sibling-open",u4="disabled",nd="imperative-action",d4="window-resize",eR=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Pi,currentIdRef:{current:null},currentContextRef:{current:null}});function f4(e,t){e.current=t.current}function h4(e){const{children:t,delay:i,timeoutMs:s=0}=e,o=b.useRef(i),l=b.useRef(i),u=b.useRef(null),d=b.useRef(null),f=Un();return _e(()=>{if(l.current=i,!u.current){o.current=i;return}o.current={open:Po(o.current,"open"),close:Po(i,"close")}},[i,u,o,l]),v.jsx(eR.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:l,currentIdRef:u,timeoutMs:s,currentContextRef:d,timeout:f}),[s,f]),children:t})}function p4(e,t={open:!1}){const{open:i}=t,s=e.useState("floatingId"),o=b.useContext(eR),{currentIdRef:l,delayRef:u,timeoutMs:d,initialDelayRef:f,currentContextRef:g,hasProvider:m,timeout:h}=o,[x,S]=b.useState(!1),w=b.useRef(i);return _e(()=>{w.current=i},[i]),_e(()=>{function R(){g.current?.setIsInstantPhase(!1),l.current=null,g.current=null,u.current=f.current,h.clear()}if(l.current&&!i&&l.current===s){if(S(!1),d){const E=s;return h.start(d,()=>{e.select("open")||l.current&&l.current!==E||R()}),()=>{(w.current||l.current!==E)&&h.clear()}}R()}},[i,s,l,u,d,f,g,h,e]),_e(()=>{if(!i)return;const R=g.current,E=l.current;h.clear(),g.current={onOpenChange:e.setOpen,setIsInstantPhase:S},l.current=s,u.current={open:0,close:Po(f.current,"close")},E!==null&&E!==s?(S(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,ut(Dr))):(S(!1),R?.setIsInstantPhase(!1))},[i,s,e,l,u,f,g,h]),_e(()=>()=>{if(l.current===s){if(g.current=null,!w.current)return;l.current=null,f4(u,f),h.clear()}},[g,l,u,s,f,h]),b.useMemo(()=>({activeIdRef:l,hasProvider:m,delayRef:u,isInstantPhase:x}),[l,m,u,x])}function Lt(e,t,i,s){return e.addEventListener(t,i,s),()=>{e.removeEventListener(t,i,s)}}function ys(...e){return()=>{for(let t=0;t<e.length;t+=1){const i=e[t];i&&i()}}}function ei(e,t,i,s){const o=tr(tR).current;return m4(o,e,t,i,s)&&nR(o,[e,t,i,s]),o.callback}function g4(e){const t=tr(tR).current;return y4(t,e)&&nR(t,e),t.callback}function tR(){return{callback:null,cleanup:null,refs:[]}}function m4(e,t,i,s,o){return e.refs[0]!==t||e.refs[1]!==i||e.refs[2]!==s||e.refs[3]!==o}function y4(e,t){return e.refs.length!==t.length||e.refs.some((i,s)=>i!==t[s])}function nR(e,t){if(e.refs=t,t.every(i=>i==null)){e.callback=null;return}e.callback=i=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),i!=null){const s=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const u=l(i);typeof u=="function"&&(s[o]=u);break}case"object":{l.current=i;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const u=s[o];typeof u=="function"?u():l(null);break}case"object":{l.current=null;break}}}}}}}function Ln(e){const t=tr(v4,e).current;return t.next=e,_e(t.effect),t}function v4(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Nv={...KC},Z0=Nv.useInsertionEffect,b4=Z0&&Z0!==Nv.useLayoutEffect?Z0:e=>e();function Be(e){const t=tr(x4).current;return t.next=e,b4(t.effect),t.trampoline}function x4(){const e={next:void 0,callback:S4,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function S4(){}const $f=null;class w4{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const i=this.callbacks,s=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,s>0)for(let o=0;o<i.length;o+=1)i[o]?.(t)};request(t){const i=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),i}cancel(t){const i=t-this.startId;i<0||i>=this.callbacks.length||this.callbacks[i]!==null&&(this.callbacks[i]=null,this.callbacksCount-=1)}}let Qf=new w4;class Ar{static create(){return new Ar}static request(t){return Qf.request(t)}static cancel(t){return Qf.cancel(t)}currentId=$f;request(t){this.cancel(),this.currentId=Qf.request(()=>{this.currentId=$f,t()})}cancel=()=>{this.currentId!==$f&&(Qf.cancel(this.currentId),this.currentId=$f)};disposeEffect=()=>this.cancel}function tc(){const e=tr(Ar.create).current;return Sv(e.disposeEffect),e}function Qt(e){return e?.ownerDocument||document}const rR={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},rd={...rR,position:"fixed",margin:0,top:0,left:0},Tp={...rR,position:"absolute"},Ba=b.forwardRef(function(t,i){const[s,o]=b.useState();_e(()=>{_j&&Ss&&o("button")},[]);const l={tabIndex:0,role:s};return v.jsx("span",{...t,ref:i,style:rd,"aria-hidden":s?void 0:!0,...l,"data-base-ui-focus-guard":""})}),nc=Math.min,Qs=Math.max,Fh=Math.round,Xf=Math.floor,Xs=e=>({x:e,y:e}),E4={left:"right",right:"left",bottom:"top",top:"bottom"};function iR(e,t,i){return Qs(e,nc(t,i))}function Va(e,t){return typeof e=="function"?e(t):e}function mi(e){return e.split("-")[0]}function vs(e){return e.split("-")[1]}function Dv(e){return e==="x"?"y":"x"}function jv(e){return e==="y"?"height":"width"}function ji(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Iv(e){return Dv(ji(e))}function C4(e,t,i){i===void 0&&(i=!1);const s=vs(e),o=Iv(e),l=jv(o);let u=o==="x"?s===(i?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=Bh(u)),[u,Bh(u)]}function R4(e){const t=Bh(e);return[Py(e),t,Py(t)]}function Py(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const yw=["left","right"],vw=["right","left"],T4=["top","bottom"],k4=["bottom","top"];function O4(e,t,i){switch(e){case"top":case"bottom":return i?t?vw:yw:t?yw:vw;case"left":case"right":return t?T4:k4;default:return[]}}function A4(e,t,i,s){const o=vs(e);let l=O4(mi(e),i==="start",s);return o&&(l=l.map(u=>u+"-"+o),t&&(l=l.concat(l.map(Py)))),l}function Bh(e){const t=mi(e);return E4[t]+e.slice(t.length)}function M4(e){var t,i,s,o;return{top:(t=e.top)!=null?t:0,right:(i=e.right)!=null?i:0,bottom:(s=e.bottom)!=null?s:0,left:(o=e.left)!=null?o:0}}function sR(e){return typeof e!="number"?M4(e):{top:e,right:e,bottom:e,left:e}}function Uu(e){const{x:t,y:i,width:s,height:o}=e;return{width:s,height:o,top:i,left:t,right:t+s,bottom:i+o,x:t,y:i}}function Vl(e,t){return t<0||t>=e.length}function wh(e,t){return Kl(e.current,{disabledIndices:t})}function Ly(e,t){return Kl(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function N4(e,t,i){const{decrement:s,loopFocus:o,allowEscape:l,disabledIndices:u,minIndex:d,maxIndex:f}=i,g=()=>Kl(e,{startingIndex:t,decrement:s,disabledIndices:u});let m,h=!1;if(!o)m=s?Math.max(d,g()):Math.min(f,g());else if(s?t<=d:t>=f){const x=s?-1:e.length;l&&t!==x?m=-1:(m=s?f:d,h=!0)}else m=g();return{index:Vl(e,m)?-1:m,wrapped:h}}function Kl(e,{startingIndex:t=-1,decrement:i=!1,disabledIndices:s,amount:o=1}={}){let l=t;do l+=i?-o:o;while(l>=0&&l<=e.length-1&&ql(e,l,s));return l}function ql(e,t,i){if(typeof i=="function"?i(t):i?.includes(t)??!1)return!0;const o=e[t];return o?!kp(o)||o.matches(":disabled")?!0:!i&&(o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"):!1}function D4(e){return e.visibility==="hidden"||e.visibility==="collapse"}function kp(e,t=e?yi(e):null){return!e||!e.isConnected||!t||D4(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const j4='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function I4(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const i=e.getRootNode();return Io(i)?i.host:null}function zy(e){for(const t of Array.from(e.children))if(Cr(t)==="summary")return t;return null}function P4(e,t){const i=zy(t);return!!i&&(e===i||st(i,e))}function aR(e){const t=e?Cr(e):"";return e!=null&&e.matches(j4)&&(t!=="summary"||e.parentElement!=null&&Cr(e.parentElement)==="details"&&zy(e.parentElement)===e)&&(t!=="details"||zy(e)==null)&&(t!=="input"||e.type!=="hidden")}function Pv(e){if(!aR(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=I4(t)){const i=t!==e,s=Cr(t)==="slot";if(t.hasAttribute("inert")||i&&Cr(t)==="details"&&!t.open&&!P4(e,t)||t.hasAttribute("hidden")||!s&&!L4(t,i))return!1}return!0}function L4(e,t){const i=yi(e);return t?i.display!=="none":kp(e,i)}function oR(e){const t=e.tabIndex;if(t<0){const i=Cr(e);if(i==="details"||i==="audio"||i==="video"||bn(e)&&e.isContentEditable)return 0}return t}function J0(e){if(Cr(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function lR(e,t){const i=J0(e);if(!i)return!0;const s=t.find(o=>{const l=J0(o);return l?.name===i.name&&l.form===i.form&&l.checked});return s?s===i:t.find(o=>{const l=J0(o);return l?.name===i.name&&l.form===i.form})===i}function cR(e){if(bn(e)&&Cr(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return bn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Lv(e,t){cR(e).forEach(i=>{aR(i)&&t.push(i),Lv(i,t)})}function uR(e,t,i){cR(e).forEach(s=>{bn(s)&&s.matches(t)&&i.push(s),uR(s,t,i)})}function Op(e){return Pv(e)&&oR(e)>=0}function dR(e){const t=[];return Lv(e,t),t.filter(Pv)}function Ap(e){const t=dR(e);return t.filter(i=>oR(i)>=0&&lR(i,t))}function fR(e,t){const i=Ap(e),s=i.length;if(s===0)return;const o=Jr(Qt(e)),l=i.indexOf(o),u=l===-1?t===1?0:s-1:l+t;return i[u]}function hR(e){return fR(Qt(e).body,1)||e}function pR(e){return fR(Qt(e).body,-1)||e}function z4(e,t,i){if(!e)return null;const s=[];Lv(Qt(e).body,s);const o=s.indexOf(e);if(o===-1)return null;const l=s.filter(Pv);for(let u=1;u<s.length;u+=1){const d=s[(o+t*u+s.length)%s.length];if(!st(i,d)&&Op(d)&&lR(d,l))return d}return s[o]}function Yl(e,t){const i=t||e.currentTarget,s=e.relatedTarget;return!s||!st(i,s)}function _4(e){Ap(e).forEach(i=>{i.dataset.tabindex=i.getAttribute("tabindex")||"",i.setAttribute("tabindex","-1")})}function bw(e){const t=[];uR(e,"[data-tabindex]",t),t.forEach(i=>{const s=i.dataset.tabindex;delete i.dataset.tabindex,s?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")})}function Ka(e,t,i=!0){return e.filter(o=>o.parentId===t).flatMap(o=>[...!i||o.context?.open?[o]:[],...Ka(e,o.id,i)])}function xw(e,t){let i=[],s=e.find(o=>o.id===t)?.parentId;for(;s;){const o=e.find(l=>l.id===s);s=o?.parentId,o&&(i=i.concat(o))}return i}function Gl(e){return`data-base-ui-${e}`}let Zf=0;function Eh(e,t={}){const{preventScroll:i=!1,sync:s=!1,shouldFocus:o}=t;cancelAnimationFrame(Zf);function l(){o&&!o()||e?.focus({preventScroll:i})}if(s)return l(),En;const u=requestAnimationFrame(l);return Zf=u,()=>{Zf===u&&(cancelAnimationFrame(u),Zf=0)}}const Sw="data-base-ui-inert";let hu=new WeakMap,Jf=new WeakSet,pu=new WeakMap,W0=0;function gR(e){return e?Io(e)?e.host:gR(e.parentNode):null}const ww=(e,t)=>t.map(i=>{if(e.contains(i))return i;const s=gR(i);return e.contains(s)?s:null}).filter(i=>i!=null),Ew=e=>{const t=new Set;return e.forEach(i=>{let s=i;for(;s&&!t.has(s);)t.add(s),s=s.parentNode}),t},Cw=(e,t,i)=>{const s=[],o=l=>{!l||i.has(l)||Array.from(l.children).forEach(u=>{Cr(u)!=="script"&&(t.has(u)?o(u):s.push(u))})};return o(e),s};function U4(e,t,i,{mark:s=!0}){const o=ww(t,e),l=s?Cw(t,Ew(o),new Set(o)):[],u=[],d=[];if(i){const f=ww(t,Array.from(t.querySelectorAll("[aria-live]"))),g=o.concat(f);Cw(t,Ew(g),new Set(g)).forEach(h=>{const x=h.getAttribute("aria-hidden"),S=x!==null&&x!=="false",w=(hu.get(h)||0)+1;hu.set(h,w),u.push(h),w===1&&S&&Jf.add(h),S||h.setAttribute("aria-hidden","true")})}return s&&l.forEach(f=>{const g=(pu.get(f)||0)+1;pu.set(f,g),d.push(f),g===1&&f.setAttribute(Sw,"")}),W0+=1,()=>{u.forEach(f=>{const g=(hu.get(f)||0)-1;hu.set(f,g),g||(Jf.has(f)||f.removeAttribute("aria-hidden"),Jf.delete(f))}),s&&d.forEach(f=>{const g=(pu.get(f)||0)-1;pu.set(f,g),g||f.removeAttribute(Sw)}),W0-=1,W0||(hu=new WeakMap,Jf=new WeakSet,pu=new WeakMap)}}function Rw(e,t={}){const{ariaHidden:i=!1,mark:s=!0}=t,o=Qt(e[0]).body;return U4(e,o,i,{mark:s})}var hr=qC();const H4=VC(hr);function mR(){const[,e]=b.useState({});return b.useCallback(()=>{e({})},[])}let Tw=0;function F4(e,t="mui"){const i=b.useRef(void 0),s=mR(),o=e??i.current;return b.useEffect(()=>{i.current==null&&(Tw+=1,i.current=`${t}-${Tw}`,e==null&&s())},[e,t,s]),o}const kw=Nv.useId;function ac(e,t){if(kw!==void 0){const i=kw();return e??(t?`${t}-${i}`:i)}return F4(e,t)}const B4=parseInt(b.version,10);function zv(e){return B4>=e}function Ow(e){if(!b.isValidElement(e))return null;const t=e,i=t.props;return(zv(19)?i?.ref:t.ref)??null}function _y(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function V4(e,t){const i={};for(const s in e){const o=e[s];if(t?.hasOwnProperty(s)){const l=t[s](o);l!=null&&Object.assign(i,l);continue}o===!0?i[`data-${s.toLowerCase()}`]="":o&&(i[`data-${s.toLowerCase()}`]=o.toString())}return i}function K4(e,t){return typeof e=="function"?e(t):e}function yR(e,t){return typeof e=="function"?e(t):e}const vR={};function Mr(e,t,i,s,o){if(!i&&!s&&!o&&!e)return Vh(t);let l=Vh(e);return t&&(l=bu(l,t)),i&&(l=bu(l,i)),s&&(l=bu(l,s)),o&&(l=bu(l,o)),l}function q4(e){if(e.length===0)return vR;if(e.length===1)return Vh(e[0]);let t=Vh(e[0]);for(let i=1;i<e.length;i+=1)t=bu(t,e[i]);return t}function Vh(e){return xR(e)?{...e(vR)}:Y4(e)}function bu(e,t){return xR(t)?t(e):G4(e,t)}function Y4(e){const t={...e};for(const i in t){const s=t[i];bR(i,s)&&(t[i]=SR(s))}return t}function G4(e,t){if(!t)return e;for(const i in t){const s=t[i];switch(i){case"style":{e[i]=_y(e.style,s);break}case"className":{e[i]=wR(e.className,s);break}default:bR(i,s)?e[i]=$4(e[i],s):e[i]=s}}return e}function bR(e,t){const i=e.charCodeAt(0),s=e.charCodeAt(1),o=e.charCodeAt(2);return i===111&&s===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function xR(e){return typeof e=="function"}function $4(e,t){return t?e?(...i)=>{const s=i[0];if(ER(s)){const l=s;Kh(l);const u=t(...i);return l.baseUIHandlerPrevented||e?.(...i),u}const o=t(...i);return e?.(...i),o}:SR(t):e}function SR(e){return e&&((...t)=>{const i=t[0];return ER(i)&&Kh(i),e(...t)})}function Kh(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function wR(e,t){return t?e?t+" "+e:t:e}function ER(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function kt(e,t,i={}){let s=t.render;i.enabled!==!1&&(s=_v(s));const o=Q4(t,i,s);if(i.enabled===!1)return null;const l=i.state??Xt;return J4(e,s,o,l)}function Q4(e,t,i){const{className:s,style:o}=e,{state:l=Xt,ref:u,props:d,stateAttributesMapping:f,enabled:g=!0}=t,m=g?K4(s,l):void 0,h=g?yR(o,l):void 0,x=g?V4(l,f):Xt,S=g&&d?X4(d):void 0,w=g?_y(x,S)??{}:Xt;return typeof document<"u"&&(g?Array.isArray(u)?w.ref=g4([w.ref,Ow(i),...u]):w.ref=ei(w.ref,Ow(i),u):ei(null,null)),g?(m!==void 0&&(w.className=wR(w.className,m)),h!==void 0&&(w.style=_y(w.style,h)),w):Xt}function X4(e){return Array.isArray(e)?q4(e):Mr(void 0,e)}const Z4=Symbol.for("react.lazy");function _v(e){if(e?.$$typeof!==Z4)return e;const t=b.Children.toArray(e)[0];return b.isValidElement(t)?t:e}function J4(e,t,i,s){if(t){if(typeof t=="function")return t(i,s);const o=Mr(i,t.props);return o.ref=i.ref,b.cloneElement(t,o)}return W4(e,i)}function W4(e,t){return e==="button"?b.createElement("button",{type:"button",...t,key:t.key}):e==="img"?b.createElement("img",{alt:"",...t,key:t.key}):b.createElement(e,t)}const eI=500,CR=500,tI={style:{transition:"none"}},Uv="data-base-ui-click-trigger",RR={fallbackAxisSide:"none"},Hv={fallbackAxisSide:"end"},nI={clipPath:"inset(50%)",position:"fixed",top:0,left:0},TR=b.createContext(null),kR=()=>b.useContext(TR),rI=Gl("portal");function OR(e={}){const{ref:t,container:i,componentProps:s=Xt,elementProps:o}=e,l=ac(),d=kR()?.portalNode,[f,g]=b.useState(null),[m,h]=b.useState(null),x=Be(E=>{E!==null&&h(E)}),S=b.useRef(null);_e(()=>{if(i===null){S.current&&(S.current=null,h(null),g(null));return}const E=(i&&(Rv(i)?i:i.current))??d??document.body;if(E==null){S.current&&(S.current=null,h(null),g(null));return}S.current!==E&&(S.current=E,h(null),g(E))},[i,d]);const w=kt("div",s,{ref:[t,x],props:[{id:l,[rI]:""},o]}),R=f&&w?hr.createPortal(w,f):null;return{node:m,nodeId:b.isValidElement(w)?w.props.id:void 0,subtree:R}}const Mp=b.forwardRef(function(t,i){const{render:s,className:o,style:l,children:u,container:d,portalOwnerRole:f,...g}=t,{node:m,nodeId:h,subtree:x}=OR({container:d,ref:i,componentProps:t,elementProps:g}),S=b.useRef(null),w=b.useRef(null),R=b.useRef(null),E=b.useRef(null),[C,O]=b.useState(null),k=b.useRef(!1),A=C?.modal,N=C?.open,j=!!C&&!C.modal&&C.open&&!!m;b.useEffect(()=>{if(!m||A)return;function M(_){m&&_.relatedTarget&&Yl(_)&&(_.type==="focusin"?k.current&&(bw(m),k.current=!1):(_4(m),k.current=!0))}return ys(Lt(m,"focusin",M,!0),Lt(m,"focusout",M,!0))},[m,A]),_e(()=>{!m||N!==!0||!k.current||(bw(m),k.current=!1)},[N,m]);const D=b.useMemo(()=>({beforeOutsideRef:S,afterOutsideRef:w,beforeInsideRef:R,afterInsideRef:E,portalNode:m,setFocusManagerState:O}),[m]);return v.jsxs(b.Fragment,{children:[x,v.jsxs(TR.Provider,{value:D,children:[j&&m&&v.jsx(Ba,{"data-type":"outside",ref:S,onFocus:M=>{if(Yl(M,m))R.current?.focus();else{const _=C?C.domReference:null;pR(_)?.focus()}}}),j&&m&&v.jsx("span",{role:f,"aria-owns":h,style:nI}),m&&hr.createPortal(u,m),j&&m&&v.jsx(Ba,{"data-type":"outside",ref:w,onFocus:M=>{if(Yl(M,m))E.current?.focus();else{const _=C?C.domReference:null;hR(_)?.focus(),C?.closeOnFocusOut&&C?.onOpenChange(!1,ut(Fa,M.nativeEvent))}}})]})]})});function AR(){const e=new Map;return{emit(t,i){e.get(t)?.forEach(s=>s(i))},on(t,i){e.has(t)||e.set(t,new Set),e.get(t).add(i)},off(t,i){e.get(t)?.delete(i)}}}class Fv{nodesRef={current:[]};events=AR();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const i=this.nodesRef.current.findIndex(s=>s===t);i!==-1&&this.nodesRef.current.splice(i,1)}}const MR=b.createContext(null),NR=b.createContext(null),$a=()=>b.useContext(MR)?.id||null,Qa=e=>{const t=b.useContext(NR);return e??t};function Bv(e){const t=ac(),i=Qa(e),s=$a();return _e(()=>{if(!t)return;const o={id:t,parentId:s};return i?.addNode(o),()=>{i?.removeNode(o)}},[i,t,s]),t}function DR(e){const{children:t,id:i}=e,s=$a();return v.jsx(MR.Provider,{value:b.useMemo(()=>({id:i,parentId:s}),[i,s]),children:t})}function jR(e){const{children:t,externalTree:i}=e,s=tr(()=>i??new Fv).current;return v.jsx(NR.Provider,{value:s,children:t})}function Ks(e){return e==null?e:"current"in e?e.current:e}function iI(e,t){const i=Cn(nr(e));return e instanceof i.KeyboardEvent?"keyboard":e instanceof i.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||(ec(e)?"keyboard":t||"mouse"):"touches"in e?"touch":e instanceof i.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const Aw=20;let za=[];function Vv(){za=za.filter(e=>e.deref()?.isConnected)}function Mw(e){Vv(),e&&Cr(e)!=="body"&&(za.push(new WeakRef(e)),za.length>Aw&&(za=za.slice(-Aw)))}function Nw(){return Vv(),za[za.length-1]?.deref()}function sI(e){return e?Op(e)?e:Ap(e)[0]||e:null}function Dw(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const i=dR(e).filter(o=>{const l=o.getAttribute("data-tabindex")||"";return Op(o)||o.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");i.length===0?s!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Np(e){const{context:t,children:i,disabled:s=!1,initialFocus:o=!0,returnFocus:l=!0,explicitReturnFocus:u,restoreFocus:d=!1,modal:f=!0,closeOnFocusOut:g=!0,openInteractionType:m="",nextFocusableElement:h,previousFocusableElement:x,beforeContentFocusGuardRef:S,externalTree:w,getInsideElements:R}=e,E=t.useState("open"),C=t.useState("domReferenceElement"),O=t.useState("floatingElement"),{events:k,dataRef:A}=t.context,N=Be(()=>A.current.floatingContext?.nodeId),j=o===!1,D=Iy(C)&&j,M=Ln(o),_=Ln(l),L=Ln(u),q=Ln(m),X=Ln(E),B=Qa(w),H=kR(),U=b.useRef(!1),z=b.useRef(!1),Q=b.useRef(!1),$=b.useRef(null),K=b.useRef(""),Y=b.useRef(""),ee=b.useRef(null),G=b.useRef(null),oe=ei(ee,S,H?.beforeInsideRef),I=ei(G,H?.afterInsideRef),V=Un(),W=Un(),re=tc(),Ee=H!=null,le=Uh(O),me=Be((ve=le)=>ve?Ap(ve):[]),ge=Be(()=>R?.().filter(ve=>ve!=null)??[]);b.useEffect(()=>{if(s||!f)return;function ve(Oe){Oe.key==="Tab"&&st(le,Jr(Qt(le)))&&me().length===0&&!D&&Yi(Oe)}const Pe=Qt(le);return Lt(Pe,"keydown",ve)},[s,le,f,D,me]),b.useEffect(()=>{if(s||!E)return;const ve=Qt(le);function Pe(){Q.current=!1}function Oe(Ve){const ke=nr(Ve),Ue=ge(),be=st(O,ke)||st(C,ke)||st(H?.portalNode,ke)||Ue.some(He=>He===ke||st(He,ke));Q.current=!be,Y.current=Ve.pointerType||"keyboard",zu(ke,`[${Uv}]`)&&(z.current=!0,W.start(0,()=>{z.current=!1}))}function Le(){Y.current="keyboard"}return ys(Lt(ve,"pointerdown",Oe,!0),Lt(ve,"pointerup",Pe,!0),Lt(ve,"pointercancel",Pe,!0),Lt(ve,"keydown",Le,!0),Pe)},[s,O,C,le,E,H,W,ge]),b.useEffect(()=>{if(s||!g)return;const ve=Qt(le);function Pe(){z.current=!0,W.start(0,()=>{z.current=!1})}function Oe(Ue){const be=nr(Ue);Op(be)&&($.current=be)}function Le(Ue){const be=Ue.relatedTarget,He=Ue.currentTarget,Ze=nr(Ue);f&&be==null&&Ze!=null&&st(O,Ze)&&Mw(Ze),queueMicrotask(()=>{const ot=N(),de=t.context.triggerElements,we=ge(),Ge=be?.hasAttribute(Gl("focus-guard"))&&[ee.current,G.current,H?.beforeInsideRef.current,H?.afterInsideRef.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,Ks(x),Ks(h)].includes(be),Me=!(st(C,be)||st(O,be)||st(be,O)||st(H?.portalNode,be)||we.some(De=>De===be||st(De,be))||de.hasMatchingElement(De=>st(De,be))||Ge||B&&(Ka(B.nodesRef.current,ot).find(De=>st(De.context?.elements.floating,be)||st(De.context?.elements.domReference,be))||xw(B.nodesRef.current,ot).find(De=>[De.context?.elements.floating,Uh(De.context?.elements.floating)].includes(be)||De.context?.elements.domReference===be)));if(He===C&&le&&Dw(le),d&&He!==C&&!kp(Ze)&&Jr(ve)===ve.body){if(bn(le)&&(le.focus(),d==="popup")){re.request(()=>{le.focus()});return}const De=me(),bt=$.current,dt=(bt&&De.includes(bt)?bt:null)||De[De.length-1]||le;bn(dt)&&dt.focus()}if(A.current.insideReactTree){A.current.insideReactTree=!1;return}(D||!f)&&be&&Me&&!z.current&&(D||be!==Nw())&&(U.current=!0,t.setOpen(!1,ut(Fa,Ue)))})}function Ve(){Q.current||(A.current.insideReactTree=!0,V.start(0,()=>{A.current.insideReactTree=!1}))}const ke=bn(C)?C:null;if(!(!O&&!ke))return ys(ke&&Lt(ke,"focusout",Le),ke&&Lt(ke,"pointerdown",Pe),O&&Lt(O,"focusin",Oe),O&&Lt(O,"focusout",Le),O&&H&&Lt(O,"focusout",Ve,!0))},[s,C,O,le,f,B,H,t,g,d,me,D,N,A,V,W,re,h,x,ge]),b.useEffect(()=>{if(s||!O||!E)return;const ve=Array.from(H?.portalNode?.querySelectorAll(`[${Gl("portal")}]`)||[]),Oe=(B?xw(B.nodesRef.current,N()):[]).find(He=>Iy(He.context?.elements.domReference||null))?.context?.elements.domReference,Ve=[...[O,...ve,ee.current,G.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,...ge()],Oe,Ks(x),Ks(h),D?C:null].filter(He=>He!=null),ke=Rw(Ve,{ariaHidden:f||D,mark:!1}),Ue=[O,...ve].filter(He=>He!=null),be=Rw(Ue);return()=>{be(),ke()}},[E,s,C,O,f,H,D,B,N,h,x,ge]),_e(()=>{if(!E||s||!bn(le))return;K.current="",Y.current="";const ve=Qt(le),Pe=Jr(ve);queueMicrotask(()=>{const Oe=M.current,Le=typeof Oe=="function"?Oe(q.current||""):Oe;if(Le===void 0||Le===!1||st(le,Pe))return;let ke=null;const Ue=()=>(ke==null&&(ke=me(le)),ke[0]||le);let be;Le===!0||Le===null?be=Ue():be=Ks(Le),be=be||Ue();const He=st(le,Jr(ve)),Ze=A.current.openEvent,ot=Ze?.type==="mousedown"&&ec(Ze);Eh(be,{sync:ot,preventScroll:be===le,shouldFocus(){if(!X.current)return!1;if(He)return!0;const de=Jr(ve);return!(de!==be&&st(le,de))}})})},[s,E,le,me,M,q,X,A]);const ue=b.useRef(null);_e(()=>{if(s||!le){ue.current=null;return}ue.current&&(ue.current.cancelled=!0,ue.current=null);const ve=Qt(le),Pe=Jr(ve),Oe=q.current==null;Mw(Pe);function Le(ke){if(ke.open||(K.current=iI(ke.nativeEvent,Y.current)),(ke.reason===Fa&&ke.triggerElement?.hasAttribute(Gl("focus-guard"))||ke.reason===Kn&&ke.nativeEvent.type==="mouseleave")&&(U.current=!0),ke.reason===Rp)if(ke.nested)U.current=!1;else if(ec(ke.nativeEvent)||Cv(ke.nativeEvent))U.current=!1;else{let Ue=!1;Qt(le).createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?U.current=!1:U.current=!0}}k.on("openchange",Le);function Ve(ke){const Ue=_.current;let be=typeof Ue=="function"?Ue(ke):Ue;if(be===void 0||be===!1)return null;be===null&&(be=!0);const He=C?.isConnected?C:null,Ze=Pe?.isConnected&&Cr(Pe)!=="body"?Pe:null;let ot=Oe?Ze||He:He||Ze;return ot||(ot=Nw()||null),typeof be=="boolean"?ot:Ks(be)||ot||null}return()=>{k.off("openchange",Le);const ke=Jr(ve),Ue=ge(),be=st(O,ke)||Ue.some(we=>we===ke||st(we,ke))||B&&Ka(B.nodesRef.current,N(),!1).some(we=>st(we.context?.elements.floating,ke)),He=_.current,Ze=K.current,ot=Ve(Ze),de={cancelled:!1};ue.current=de,queueMicrotask(()=>{ue.current===de&&(ue.current=null);const we=sI(ot),Ge=L.current??typeof He!="boolean";if(!de.cancelled&&He&&!U.current&&bn(we)&&(!(!Ge&&we!==ke&&ke!==ve.body)||be)){const Me={preventScroll:!0};Ze==="keyboard"&&(Me.focusVisible=!0),we.focus(Me)}U.current=!1})}},[s,O,le,_,L,q,k,B,C,N,ge]),_e(()=>{if(!Ss||E||!O)return;const ve=Jr(Qt(O));!bn(ve)||!ed(ve)||st(O,ve)&&ve.blur()},[E,O]),_e(()=>{if(!(s||!H))return H.setFocusManagerState({modal:f,closeOnFocusOut:g,open:E,onOpenChange:t.setOpen,domReference:C}),()=>{H.setFocusManagerState(null)}},[s,H,f,E,t,g,C]),_e(()=>{if(!(s||!le))return Dw(le),()=>{queueMicrotask(Vv)}},[s,le]);const Te=!s&&(f?!D:!0)&&(Ee||f);return v.jsxs(b.Fragment,{children:[Te&&v.jsx(Ba,{"data-type":"inside",ref:oe,onFocus:ve=>{if(f){const Pe=me();Eh(Pe[Pe.length-1])}else H?.portalNode&&(U.current=!1,Yl(ve,H.portalNode)?hR(C)?.focus():Ks(x??H.beforeOutsideRef)?.focus())}}),i,Te&&v.jsx(Ba,{"data-type":"inside",ref:I,onFocus:ve=>{f?Eh(me()[0]):H?.portalNode&&(g&&(U.current=!0),Yl(ve,H.portalNode)?pR(C)?.focus():Ks(h??H.afterOutsideRef)?.focus())}})]})}function Dp(e,t={}){const{enabled:i=!0,event:s="click",toggle:o=!0,ignoreMouse:l=!1,stickIfOpen:u=!0,touchOpenDelay:d=0,reason:f=Qi}=t,g=e.context.dataRef,m=b.useRef(void 0),h=tc(),x=Un(),S=b.useMemo(()=>{function w(E,C,O,k){const A=ut(f,C,O);E&&k==="touch"&&d>0?x.start(d,()=>{e.setOpen(!0,A)}):e.setOpen(E,A)}function R(E,C,O){const k=g.current.openEvent,A=e.select("domReferenceElement")!==C;return E&&A||!E||!o?!0:k&&(typeof u=="function"?u():u)?!O(k.type):!1}return{onPointerDown(E){m.current=Ua(E.pointerType,!0)&&Cv(E.nativeEvent)?"virtual":E.pointerType},onMouseDown(E){const C=m.current,O=E.nativeEvent,k=e.select("open");if(E.button!==0||s==="click"||Ua(C,!0)&&l)return;const A=R(k,E.currentTarget,M=>M==="click"||M==="mousedown"),N=nr(O),j=ed(N);if(j||C==="virtual"){w(A,O,j?N:E.currentTarget,C);return}const D=E.currentTarget;h.request(()=>{w(A,O,D,C)})},onClick(E){if(s==="mousedown-only")return;const C=m.current;if(s==="mousedown"&&C){m.current=void 0;return}if(Ua(C,!0)&&l)return;const O=e.select("open"),k=R(O,E.currentTarget,A=>A==="click"||A==="mousedown"||A==="keydown"||A==="keyup");w(k,E.nativeEvent,E.currentTarget,C)},onKeyDown(){m.current=void 0}}},[g,s,l,f,e,u,o,h,x,d]);return b.useMemo(()=>i?{reference:S}:Xt,[i,S])}function aI(e,t){let i=null,s=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){const l=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},u=t.axis==="x"||t.axis==="both",d=t.axis==="y"||t.axis==="both",f=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",g=t.axis==="y"?l.width:0,m=t.axis==="x"?l.height:0;let h=l.x,x=l.y;return i==null&&t.x&&u&&(i=l.x-t.x),s==null&&t.y&&d&&(s=l.y-t.y),h-=i||0,x-=s||0,(!o||f)&&(h=u&&t.x!=null?t.x:h,x=d&&t.y!=null?t.y:x),o=!0,{width:g,height:m,x:h,y:x,top:x,right:h+g,bottom:x+m,left:h}}}}function jw(e){return e!=null&&e.clientX!=null}function oI(e,t={}){const{enabled:i=!0,axis:s="both"}=t,o=e.useState("open"),l=e.useState("floatingElement"),u=e.useState("domReferenceElement"),d=e.context.dataRef,f=b.useRef(!1),g=b.useRef(null),[m,h]=b.useState(),[x,S]=b.useState([]),w=Be(k=>{e.set("positionReference",k)}),R=Be((k,A,N)=>{f.current||d.current.openEvent&&!jw(d.current.openEvent)||e.set("positionReference",aI(N??u,{x:k,y:A,axis:s,dataRef:d,pointerType:m}))}),E=Be(k=>{o?g.current||(R(k.clientX,k.clientY,k.currentTarget),S([])):R(k.clientX,k.clientY,k.currentTarget)}),C=Ua(m)?l:o;b.useEffect(()=>{if(!i){w(u);return}if(!C)return;function k(){g.current?.(),g.current=null}const A=Cn(l);function N(j){const D=nr(j);st(l,D)?k():R(j.clientX,j.clientY)}return!d.current.openEvent||jw(d.current.openEvent)?g.current=Lt(A,"mousemove",N):w(u),k},[C,i,l,d,u,e,R,w,x]),b.useEffect(()=>()=>{e.set("positionReference",null)},[e]),b.useEffect(()=>{i&&!l&&(f.current=!1)},[i,l]),b.useEffect(()=>{!i&&o&&(f.current=!0)},[i,o]);const O=b.useMemo(()=>{function k(A){h(A.pointerType)}return{onPointerDown:k,onPointerEnter:k,onMouseMove:E,onMouseEnter:E}},[E]);return b.useMemo(()=>i?{reference:O,trigger:O}:{},[i,O])}function lI(){return!1}function cI(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function id(e,t={}){const{enabled:i=!0,escapeKey:s=!0,outsidePress:o=!0,outsidePressEvent:l="sloppy",referencePress:u=lI,bubbles:d,externalTree:f}=t,g=e.useState("open"),m=e.useState("floatingElement"),{dataRef:h,events:x}=e.context,S=Qa(f),w=Be(typeof o=="function"?o:()=>!1),R=typeof o=="function"?w:o,E=R!==!1,C=Be(()=>l),{escapeKey:O,outsidePress:k}=cI(d),A=b.useRef(!1),N=b.useRef(!1),j=b.useRef(!1),D=b.useRef(!1),M=b.useRef(!1),_=b.useRef(""),L=b.useRef(null),q=Un(),X=Un(),B=Un(),H=Be(()=>{X.clear(),h.current.insideReactTree=!1}),U=Be(I=>{const V=h.current.floatingContext?.nodeId;return(S?Ka(S.nodesRef.current,V):[]).some(re=>re.context?.open&&!re.context.dataRef.current[I])}),z=Be(I=>X0(I,e.select("floatingElement"))||X0(I,e.select("domReferenceElement"))),Q=Be(I=>{u()&&e.setOpen(!1,ut(Qi,I.nativeEvent))}),$=Be(I=>{if(!g||!i||!s||I.key!=="Escape")return;const V=Uj(I)?I.nativeEvent:I;if(M.current||V.isComposing||!O&&U("__escapeKeyBubbles"))return;const W=ut(td,V);e.setOpen(!1,W),W.isCanceled||I.preventDefault(),!O&&!W.isPropagationAllowed&&I.stopPropagation()}),K=Be(()=>{h.current.insideReactTree=!0,X.start(0,H)}),Y=Be(I=>{if(!g||!i||I.button!==0)return;const V=nr(I.nativeEvent);st(e.select("floatingElement"),V)&&(A.current||(A.current=!0,N.current=!1))}),ee=Be(I=>{!g||!i||(I.defaultPrevented||I.nativeEvent.defaultPrevented)&&A.current&&(N.current=!0)});b.useEffect(()=>{function I(V){V.open||(D.current=!1)}return x.on("openchange",I),()=>{x.off("openchange",I)}},[x]),b.useEffect(()=>H,[H]),b.useEffect(()=>{if(!g||!i)return g||(D.current=!1,M.current=!1,_.current="",L.current=null),H;h.current.__escapeKeyBubbles=O,h.current.__outsidePressBubbles=k;const I=new Pi,V=Qt(m);function W(){B.clear(),M.current=!0}function re(){M.current=!0,B.start(Ss?5:0,()=>{M.current=!1})}function Ee(){j.current=!0,I.start(0,()=>{j.current=!1})}function le(){A.current=!1,N.current=!1}function me(){const de=_.current,we=de==="pen"||!de?"mouse":de,Ge=C(),Me=typeof Ge=="function"?Ge():Ge;return typeof Me=="string"?Me:Me[we]}function ge(de){const we=me();return we==="intentional"&&de.type!=="click"||we==="sloppy"&&de.type==="click"}function ue(de){const we=h.current.floatingContext?.nodeId,Ge=S&&Ka(S.nodesRef.current,we).some(Me=>X0(de,Me.context?.elements.floating));return z(de)||Ge}function Te(de){if(ge(de)){de.type!=="click"&&!z(de)&&(I.clear(),j.current=!1),H();return}if(h.current.insideReactTree){H();return}const we=nr(de),Ge=`[${Gl("inert")}]`,Me=ln(we)?we.getRootNode():null,De=Array.from((Io(Me)?Me:Qt(e.select("floatingElement"))).querySelectorAll(Ge)),bt=e.context.triggerElements;if(we&&(bt.hasElement(we)||bt.hasMatchingElement(gt=>st(gt,we))))return;let dt=ln(we)?we:null;for(;dt&&!$s(dt);){const gt=Zs(dt);if($s(gt)||!ln(gt))break;dt=gt}if(!(De.length&&ln(we)&&!r4(we)&&!st(we,e.select("floatingElement"))&&De.every(gt=>!st(dt,gt)))){if(bn(we)&&!("touches"in de)){const gt=$s(we),Nt=yi(we),jt=/auto|scroll/,tn=gt||jt.test(Nt.overflowX),an=gt||jt.test(Nt.overflowY),nn=tn&&we.clientWidth>0&&we.scrollWidth>we.clientWidth,We=an&&we.clientHeight>0&&we.scrollHeight>we.clientHeight,wt=Nt.direction==="rtl",Zt=We&&(wt?de.offsetX<=we.offsetWidth-we.clientWidth:de.offsetX>we.clientWidth),ht=nn&&de.offsetY>we.clientHeight;if(Zt||ht)return}if(!ue(de)){if(me()==="intentional"){if(de.detail!==0&&!ec(de)&&!D.current)return;if(j.current){I.clear(),j.current=!1;return}}typeof R=="function"&&!R(de)||U("__outsidePressBubbles")||(e.setOpen(!1,ut(Rp,de)),H())}}}function ve(de){me()!=="sloppy"||de.pointerType==="touch"||!e.select("open")||!i||z(de)||Te(de)}function Pe(de){if(me()!=="sloppy"||!e.select("open")||!i||z(de))return;const we=de.touches[0];we&&(L.current={startTime:Date.now(),startX:we.clientX,startY:we.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},q.start(1e3,()=>{L.current&&(L.current.dismissOnTouchEnd=!1,L.current.dismissOnMouseDown=!1)}))}function Oe(de,we){const Ge=nr(de);if(!Ge)return;const Me=Lt(Ge,de.type,()=>{we(de),Me()})}function Le(de){_.current="touch",Oe(de,Pe)}function Ve(de){q.clear(),de.type==="pointerdown"&&(de.button===0&&(D.current=!0),_.current=de.pointerType),!(de.type==="mousedown"&&L.current&&!L.current.dismissOnMouseDown)&&Oe(de,we=>{we.type==="pointerdown"?ve(we):Te(we)})}function ke(de){if(de.type==="pointercancel"&&(D.current=!1),!A.current)return;const we=N.current;if(le(),me()==="intentional"){if(de.type==="pointercancel"){we&&Ee();return}if(!ue(de)){if(we){Ee();return}typeof R=="function"&&!R(de)||(I.clear(),j.current=!0,H())}}}function Ue(de){if(me()!=="sloppy"||!L.current||z(de))return;const we=de.touches[0];if(!we)return;const Ge=Math.abs(we.clientX-L.current.startX),Me=Math.abs(we.clientY-L.current.startY),De=Math.sqrt(Ge*Ge+Me*Me);De>5&&(L.current.dismissOnTouchEnd=!0),De>10&&(Te(de),q.clear(),L.current=null)}function be(de){Oe(de,Ue)}function He(de){me()!=="sloppy"||!L.current||z(de)||(L.current.dismissOnTouchEnd&&Te(de),q.clear(),L.current=null)}function Ze(de){Oe(de,He)}const ot=ys(s&&ys(Lt(V,"keydown",$),Lt(V,"compositionstart",W),Lt(V,"compositionend",re)),E&&ys(Lt(V,"click",Ve,!0),Lt(V,"pointerdown",Ve,!0),Lt(V,"pointerup",ke,!0),Lt(V,"pointercancel",ke,!0),Lt(V,"mousedown",Ve,!0),Lt(V,"mouseup",ke,!0),Lt(V,"touchstart",Le,{capture:!0,passive:!0}),Lt(V,"touchmove",be,{capture:!0,passive:!0}),Lt(V,"touchend",Ze,{capture:!0,passive:!0})));return()=>{ot(),I.clear(),le(),j.current=!1}},[h,m,s,E,R,g,i,O,k,$,H,C,U,z,S,e,q,B]);const G=b.useMemo(()=>({onKeyDown:$,onPointerDown:Q,onClick:Q}),[$,Q]),oe=b.useMemo(()=>({onKeyDown:$,onPointerDown:ee,onMouseDown:ee,onClickCapture:K,onMouseDownCapture(I){K(),Y(I)},onPointerDownCapture(I){K(),Y(I)},onMouseUpCapture:K,onTouchEndCapture:K,onTouchMoveCapture:K}),[$,K,Y,ee]);return b.useMemo(()=>i?{reference:G,floating:oe,trigger:G}:{},[i,G,oe])}function IR(e){const{popupStore:t,treatPopupAsFloatingElement:i=!1,floatingRootContext:s,floatingId:o,nested:l,onOpenChange:u}=e,d=t.useState("open"),f=t.useState("activeTriggerElement"),g=t.useState(i?"popupElement":"positionerElement"),m=u;return t.useSyncedValue("floatingId",o),_e(()=>{const h={open:d,floatingId:o,referenceElement:f,floatingElement:g};ln(f)&&(h.domReferenceElement=f),s.state.positionReference===s.state.referenceElement&&(h.positionReference=f),s.update(h)},[d,o,f,g,s]),s.context.onOpenChange=m,s.context.nested=l,s}function Uo(e,t=!1,i=!1,s=!1){const[o,l]=b.useState(e&&t?"idle":void 0),[u,d]=b.useState(e&&!s);return e&&!u&&(d(!0),l("starting")),!e&&u&&o!=="ending"&&!i&&l("ending"),!e&&!u&&o==="ending"&&l(void 0),_e(()=>{if(!e&&u&&o!=="ending"&&i){const f=Ar.request(()=>{l("ending")});return()=>{Ar.cancel(f)}}},[e,u,o,i]),_e(()=>{if(!e||t||o===void 0)return;const f=Ar.request(()=>{l(void 0)});return()=>{Ar.cancel(f)}},[t,e,o]),_e(()=>{if(!e||!t)return;e&&u&&o!=="idle"&&l("starting");const f=Ar.request(()=>{l("idle")});return()=>{Ar.cancel(f)}},[t,e,u,o]),{mounted:u,setMounted:d,transitionStatus:o}}function Iw(e,t){return e.getAnimations(t).filter(i=>{const s=i.effect?.getTiming();return s?.duration!==1/0&&s?.iterations!==1/0})}let Wf=null;function uI(e){if(!Wf){const t=[];Wf=t,queueMicrotask(()=>{Wf=null,hr.flushSync(()=>{for(const i of t)i()})})}Wf.push(e)}function jp(e,t=!1,i=!1){const s=tc();return Be((o,l=null)=>{s.cancel();const u=Ks(e);if(u==null)return;const d=u,f=()=>{if(!i){hr.flushSync(o);return}uI(()=>{l?.aborted||o()})};if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){o();return}function g(){Promise.all(Iw(d).map(m=>m.finished.then(En))).then(()=>{l?.aborted||f()},()=>{if(l?.aborted)return;if(Iw(d).some(h=>h.pending||h.playState!=="finished")){g();return}f()})}if(t){const m=Av;if(!d.hasAttribute(m)){s.request(g);return}const h=new MutationObserver(()=>{d.hasAttribute(m)||(h.disconnect(),g())});h.observe(d,{attributes:!0,attributeFilter:[m]}),l?.addEventListener("abort",()=>h.disconnect(),{once:!0});return}s.request(g)})}function Li(e){const{enabled:t=!0,open:i,ref:s,batch:o=!1,onComplete:l}=e,u=Be(l),d=jp(s,i,o);b.useEffect(()=>{if(!t)return;const f=new AbortController;return d(u,f.signal),()=>{f.abort()}},[t,i,u,d])}function PR(e){const{open:t,ref:i,preventUnmountOnClose:s,setPreventUnmountOnClose:o,onUnmount:l,animateInitialOpen:u}=e,d=Be(o),{mounted:f,setMounted:g,transitionStatus:m}=Uo(t,!1,!1,u),h=t?!1:s;_e(()=>{t&&d(!1)},[t,d]);const x=b.useRef(f),S=b.useRef(!1),w=mR(),R=()=>{x.current=!1,g(!1),l()};_e(()=>{x.current=f,S.current&&(S.current=!1,!t&&f&&R())});const E=Be(()=>{if(x.current){if(t){S.current=!0,w();return}R()}});return Li({enabled:f&&!t&&!h,open:t,ref:i,onComplete(){t||E()}}),{mounted:f,transitionStatus:m,preventUnmountingOnClose:h,forceUnmount:E}}const sd={tabIndex:-1,[Dy]:""};function LR(e){return t=>t==="touch"?e.current:!0}function Kv(e,t=!1){const i=ac(),s=$a()!=null,o=tr(()=>e(i,s)).current;return IR({popupStore:o,treatPopupAsFloatingElement:t,floatingRootContext:o.state.floatingRootContext,floatingId:i,nested:s,onOpenChange:o.setOpen}),o}function Ip({handle:e,store:t}){return _e(()=>e.attachStore(t),[e,t]),null}function Pw(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function dI(e,t){const i=b.useRef(null);return Be(s=>{const o=i.current;if(o!==null){if(o.element===s&&o.store===t&&o.id===e)return;i.current=null;const l=o.store;l.context.triggerElements.getById(o.id)===o.element&&(l.context.triggerElements.delete(o.id),Pw(l))}s!==null&&e!==void 0&&(i.current={store:t,id:e,element:s},t.context.triggerElements.add(e,s),Pw(t))})}function Pp(e,t,i,s=!1){let o=e.preventUnmountingOnClose;t?o=!1:s&&(o=!0);const l=i?.id??null;let u=e.activeTriggerId,d=e.activeTriggerElement;return(l||t)&&(u=l,d=i??null),{open:t,preventUnmountingOnClose:o,activeTriggerId:u,activeTriggerElement:d,openedWithoutTrigger:t?i==null:e.openedWithoutTrigger}}function Lp(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function fI(e,t,i,s={}){const o=i.reason,l=o===Kn,u=t&&o===Bl,d=!t&&(o===Qi||o===td),f=Lp(i);if(e.context.onOpenChange?.(t,i),i.isCanceled)return;s.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,i);const g=()=>{const m=Pp(e.state,t,i.trigger,f()),h={...s.extraState,...m};u?h.instantType="focus":d?h.instantType="dismiss":l&&(h.instantType=void 0),e.update(h)};l?hr.flushSync(g):g()}function zp(e,t,i,s){const o=i.useState("isMountedByTrigger",e),l=dI(e,i),u=Be(f=>{const g=i.select("open"),m=i.select("activeTriggerId");if(m===e){const h={activeTriggerElement:f,...g?s:null};i.update(h);return}if(m==null&&g&&!i.state.openedWithoutTrigger){const h={activeTriggerId:e??null,activeTriggerElement:f,...s};i.update(h)}}),d=Be(f=>{l(f),f&&u(f)});return _e(()=>(d(t.current),()=>d(null)),[d,t,i,e]),_e(()=>{if(o){const f={activeTriggerElement:t.current,...s};i.update(f)}},[o,i,t,...Object.values(s)]),{registerTrigger:d,isMountedByThisTrigger:o}}function _p(e,t={}){const{closeOnActiveTriggerUnmount:i=!1}=t,s=b.useRef(null),o=e.useState("open"),l=e.useState("triggerCount"),u=e.useState("activeTriggerId"),d=e.useState("activeTriggerElement");_e(()=>{if(!o){s.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}const f=e.context.triggerElements.size,g={};e.state.triggerCount!==f&&(g.triggerCount=f);const m=e.select("activeTriggerId");let h=null;if(m){const x=e.context.triggerElements.getById(m);if(x)s.current=m,x!==e.state.activeTriggerElement&&(g.activeTriggerElement=x);else{for(const[S,w]of e.context.triggerElements.entries())if(w===e.state.activeTriggerElement){g.activeTriggerId=S,g.activeTriggerElement=w,s.current=S;break}g.activeTriggerId===void 0&&(s.current===m?h=m:s.current=null)}}else s.current=null;if(!h&&!m&&!e.state.openedWithoutTrigger&&f===1){const x=e.context.triggerElements.entries().next();if(!x.done){const[S,w]=x.value;g.activeTriggerId=S,g.activeTriggerElement=w,s.current=S}}(g.triggerCount!==void 0||g.activeTriggerId!==void 0||g.activeTriggerElement!==void 0)&&e.update(g),h&&i&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===h&&!e.context.triggerElements.getById(h)){const x=ut(Dr);e.setOpen(!1,x),x.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,l,u,d,i])}function Up(e,t,i,s){const{mounted:o,transitionStatus:l,forceUnmount:u}=PR({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:d=>t.set("preventUnmountingOnClose",d),animateInitialOpen:s,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),i?.(),t.context.onOpenChangeComplete?.(!1)}});return tr(()=>(t.set("mounted",o),null)),t.useSyncedValues({mounted:o,transitionStatus:l}),{forceUnmount:u,transitionStatus:l}}function Hp(e,t){e.useSyncedValues(t),_e(()=>()=>{e.update({activeTriggerProps:Xt,inactiveTriggerProps:Xt,popupProps:Xt})},[e])}function zR(e,t){_e(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),_e(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class ad{idMap=new Map;add(t,i){this.idMap.set(t,i)}delete(t){this.idMap.delete(t)}hasElement(t){for(const i of this.idMap.values())if(i===t)return!0;return!1}hasMatchingElement(t){for(const i of this.idMap.values())if(t(i))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}var ey={exports:{}},ty={};var Lw;function hI(){if(Lw)return ty;Lw=1;var e=Qu();function t(h,x){return h===x&&(h!==0||1/h===1/x)||h!==h&&x!==x}var i=typeof Object.is=="function"?Object.is:t,s=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function d(h,x){var S=x(),w=s({inst:{value:S,getSnapshot:x}}),R=w[0].inst,E=w[1];return l(function(){R.value=S,R.getSnapshot=x,f(R)&&E({inst:R})},[h,S,x]),o(function(){return f(R)&&E({inst:R}),h(function(){f(R)&&E({inst:R})})},[h]),u(S),S}function f(h){var x=h.getSnapshot;h=h.value;try{var S=x();return!i(h,S)}catch{return!0}}function g(h,x){return x()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return ty.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,ty}var zw;function _R(){return zw||(zw=1,ey.exports=hI()),ey.exports}var Fp=_R(),ny={exports:{}},ry={};var _w;function pI(){if(_w)return ry;_w=1;var e=Qu(),t=_R();function i(g,m){return g===m&&(g!==0||1/g===1/m)||g!==g&&m!==m}var s=typeof Object.is=="function"?Object.is:i,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,d=e.useMemo,f=e.useDebugValue;return ry.useSyncExternalStoreWithSelector=function(g,m,h,x,S){var w=l(null);if(w.current===null){var R={hasValue:!1,value:null};w.current=R}else R=w.current;w=d(function(){function C(j){if(!O){if(O=!0,k=j,j=x(j),S!==void 0&&R.hasValue){var D=R.value;if(S(D,j))return A=D}return A=j}if(D=A,s(k,j))return D;var M=x(j);return S!==void 0&&S(D,M)?(k=j,D):(k=j,A=M)}var O=!1,k,A,N=h===void 0?null:h;return[function(){return C(m())},N===null?void 0:function(){return C(N())}]},[m,h,x,S]);var E=o(g,w[0],w[1]);return u(function(){R.hasValue=!0,R.value=E},[E]),f(E),E},ry}var Uw;function gI(){return Uw||(Uw=1,ny.exports=pI()),ny.exports}var mI=gI();const yI=zv(19),vI=yI?xI:SI;function UR(e,t,i,s,o){return vI(e,t,i,s,o)}function bI(e,t,i,s,o){const l=b.useCallback(()=>t(e.getSnapshot(),i,s,o),[e,t,i,s,o]);return Fp.useSyncExternalStore(e.subscribe,l,l)}Aj({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let i=0;i<e.syncHooks.length;i+=1){const s=e.syncHooks[i],o=s.selector(s.store.state,s.a1,s.a2,s.a3);Object.is(s.value,o)||(t=!0,s.value=o)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const i=new Set;for(const o of e.syncHooks)i.add(o.store);const s=[];for(const o of i)s.push(o.subscribe(t));return()=>{for(const o of s)o()}}),Fp.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function xI(e,t,i,s,o){const l=Oj();if(!l)return bI(e,t,i,s,o);const u=l.syncIndex;l.syncIndex+=1;let d;return l.didInitialize?(d=l.syncHooks[u],(d.store!==e||d.selector!==t||!Object.is(d.a1,i)||!Object.is(d.a2,s)||!Object.is(d.a3,o))&&(d.store!==e&&(l.didChangeStore=!0),d.store=e,d.selector=t,d.a1=i,d.a2=s,d.a3=o,d.value=t(e.getSnapshot(),i,s,o))):(d={store:e,selector:t,a1:i,a2:s,a3:o,value:t(e.getSnapshot(),i,s,o)},l.syncHooks.push(d)),d.value}function SI(e,t,i,s,o){return mI.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,l=>t(l,i,s,o))}class wI{static create(t){return new this(t)}constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const i=this.updateTick;for(const s of this.listeners){if(i!==this.updateTick)return;s(t)}}update(t){for(const i in t)if(!Object.is(this.state[i],t[i])){this.setState({...this.state,...t});return}}set(t,i){Object.is(this.state[t],i)||this.setState({...this.state,[t]:i})}notifyAll(){const t={...this.state};this.setState(t)}use(t,i,s,o){return UR(this,t,i,s,o)}}class oc extends wI{constructor(t,i={},s){super(t),this.context=i,this.selectors=s}useSyncedValue(t,i){b.useDebugValue(t);const s=this;_e(()=>{s.state[t]!==i&&s.set(t,i)},[s,t,i])}useSyncedValueWithCleanup(t,i){const s=this;_e(()=>(s.state[t]!==i&&s.set(t,i),()=>{s.set(t,void 0)}),[s,t,i])}useSyncedValues(t){const i=this,s=Object.values(t);_e(()=>{i.update(t)},[i,...s])}useControlledProp(t,i){b.useDebugValue(t);const s=this,o=i!==void 0;_e(()=>{o&&!Object.is(s.state[t],i)&&s.setState({...s.state,[t]:i})},[s,t,i,o])}select(t,i,s,o){const l=this.selectors[t];return l(this.state,i,s,o)}useState(t,i,s,o){return b.useDebugValue(t),UR(this,this.selectors[t],i,s,o)}useContextCallback(t,i){b.useDebugValue(t);const s=Be(i??En);this.context[t]=s}useStateSetter(t){const i=b.useRef(void 0);return i.current===void 0&&(i.current=s=>{this.set(t,s)}),i.current}observe(t,i){let s;typeof t=="function"?s=t:s=this.selectors[t];let o=s(this.state);return i(o,o,this),this.subscribe(l=>{const u=s(l);if(!Object.is(o,u)){const d=o;o=u,i(u,d,this)}})}}const EI={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 HR extends oc{constructor(t){const{syncOnly:i,nested:s,onOpenChange:o,triggerElements:l,...u}=t;super({...u,positionReference:u.referenceElement,domReferenceElement:u.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:AR(),nested:s,triggerElements:l},EI),this.syncOnly=i}syncOpenEvent=(t,i)=>{(!t||!this.state.open||i!=null&&Hj(i))&&(this.context.dataRef.current.openEvent=t?i:void 0)};dispatchOpenChange=(t,i)=>{this.syncOpenEvent(t,i.event);const s={open:t,reason:i.reason,nativeEvent:i.event,nested:this.context.nested,triggerElement:i.trigger};this.context.events.emit("openchange",s)};setOpen=(t,i)=>{if(this.syncOnly){this.context.onOpenChange?.(t,i);return}this.dispatchOpenChange(t,i),this.context.onOpenChange?.(t,i)}}function Bp(e,t,i=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new HR({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:i,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Xt,inactiveTriggerProps:Xt,popupProps:Xt}}const Tu=e=>e.triggerIdProp??e.activeTriggerId,qh=e=>e.openProp??e.open,Hw=e=>(e.popupElement?.id??e.floatingId)||void 0;function FR(e,t){return t!==void 0&&qh(e)&&Tu(e)===t}function CI(e,t){return FR(e,t)?!0:t!==void 0&&qh(e)&&Tu(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const Ys={open:qh,mounted:e=>e.mounted,transitionStatus:e=>qh(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Tu,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Hw,isTriggerActive:(e,t)=>t!==void 0&&Tu(e)===t,isOpenedByTrigger:(e,t)=>FR(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Tu(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>CI(e,t)?Hw(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Vp(e){const t=b.useCallback(s=>e===void 0?En:e.subscribeStore(s),[e]),i=b.useCallback(()=>e===void 0?void 0:e.store,[e]);return Fp.useSyncExternalStore(t,i,()=>e?.serverStore)}function RI(e){const{open:t=!1,onOpenChange:i,elements:s={}}=e,o=ac(),l=$a()!=null,u=tr(()=>new HR({open:t,transitionStatus:void 0,onOpenChange:i,referenceElement:s.reference??null,floatingElement:s.floating??null,triggerElements:new ad,floatingId:o,syncOnly:!1,nested:l})).current;return _e(()=>{const d={open:t,floatingId:o};s.reference!==void 0&&(d.referenceElement=s.reference,d.domReferenceElement=ln(s.reference)?s.reference:null),s.floating!==void 0&&(d.floatingElement=s.floating),u.update(d)},[t,o,s.reference,s.floating,u]),u.context.onOpenChange=i,u.context.nested=l,u}const iy=wv&&Ss;function BR(e,t={}){const{enabled:i=!0,delay:s}=t,{events:o,dataRef:l}=e.context,u=b.useRef(!1),d=b.useRef(null),f=b.useRef(!0),g=Un();b.useEffect(()=>{const h=e.select("domReferenceElement");if(!i)return;const x=Cn(h);function S(){const E=e.select("domReferenceElement");!e.select("open")&&bn(E)&&E===Jr(Qt(E))&&(u.current=!0,d.current=E)}function w(){f.current=!0}function R(){f.current=!1}return ys(Lt(x,"blur",S),iy&&Lt(x,"keydown",w,!0),iy&&Lt(x,"pointerdown",R,!0))},[e,i]),b.useEffect(()=>{if(!i)return;function h(x){if(x.reason===Qi||x.reason===td){const S=e.select("domReferenceElement");ln(S)&&(d.current=S,u.current=!0)}}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,i,e]);const m=b.useMemo(()=>{function h(){u.current=!1,d.current=null}return{onMouseLeave(){h()},onFocus(x){const S=x.currentTarget;if(u.current){if(d.current===S)return;h()}const w=nr(x.nativeEvent);if(ln(w)){if(iy&&!x.relatedTarget){if(!f.current&&!ed(w))return}else if(!s4(w))return}const R=_h(x.relatedTarget,e.context.triggerElements),{nativeEvent:E,currentTarget:C}=x;if(e.select("open")&&R||!s){e.setOpen(!0,ut(Bl,E,C));return}g.start(s,()=>{u.current||e.setOpen(!0,ut(Bl,E,C))})},onBlur(x){h();const S=x.relatedTarget,w=x.nativeEvent,R=ln(S)&&S.hasAttribute(Gl("focus-guard"))&&S.getAttribute("data-type")==="outside";g.start(0,()=>{const E=e.select("domReferenceElement"),C=Jr(Qt(E));!S&&C===E||st(l.current.floatingContext?.refs.floating.current,C)||st(E,C)||R||_h(S??C,e.context.triggerElements)||e.setOpen(!1,ut(Bl,w))})}}},[l,s,e,g]);return b.useMemo(()=>i?{reference:m,trigger:m}:{},[i,m])}class qv{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Pi;restTimeout=new Pi;handleCloseOptions=void 0;static create(){return new qv}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Yh=new WeakMap;function Gh(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Yh.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Yh.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function VR(e,t){const{scopeElement:i,referenceElement:s,floatingElement:o}=t,l=Yh.get(i);l&&l!==e&&Gh(l),Gh(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=i,e.pointerEventsReferenceElement=s,e.pointerEventsFloatingElement=o,Yh.set(i,e),i.style.pointerEvents="none",s.style.pointerEvents="auto",o.style.pointerEvents="auto"}function Yv(e){const t=e.context.dataRef.current,i=tr(()=>t.hoverInteractionState??qv.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=i),Sv(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Gv(e,t={}){const{enabled:i=!0,closeDelay:s=0,nodeId:o}=t,l=e.useState("open"),u=e.useState("floatingElement"),d=e.useState("domReferenceElement"),{dataRef:f}=e.context,g=Qa(),m=$a(),h=Yv(e),x=Un(),S=Be(()=>ZC(f.current.openEvent?.type,h.interactedInside)),w=Be(()=>o4(f.current.openEvent?.type)),R=Be(()=>{Gh(h)});_e(()=>{l||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,R())},[l,h,R]),b.useEffect(()=>R,[R]),_e(()=>{if(i&&l&&h.handleCloseOptions?.blockPointerEvents&&w()&&ln(d)&&u){const E=d,C=u,O=Qt(u),k=g?.nodesRef.current.find(D=>D.id===m)?.context?.elements.floating;k&&(k.style.pointerEvents="");const A=h.pointerEventsScopeElement!==C?h.pointerEventsScopeElement:null,N=k!==C?k:null,j=h.handleCloseOptions?.getScope?.()??A??N??zu(E,"[data-rootownerid]")??O.body;return VR(h,{scopeElement:j,referenceElement:E,floatingElement:C}),()=>{R()}}},[i,l,d,u,h,w,g,m,R]),b.useEffect(()=>{if(!i)return;function E(){return!!(g&&m&&Ka(g.nodesRef.current,m).length>0)}function C(D){const M=Po(s,"close",h.pointerType),_=()=>{e.setOpen(!1,ut(Kn,D)),g?.events.emit("floating.closed",D)};M?h.openChangeTimeout.start(M,_):(h.openChangeTimeout.clear(),_())}function O(D){const M=nr(D);if(!i4(M)){h.interactedInside=!1;return}h.interactedInside=zu(M,"[aria-haspopup]")!=null}function k(){h.openChangeTimeout.clear(),x.clear(),g?.events.off("floating.closed",N),R()}function A(D){if(E()&&g){g.events.on("floating.closed",N);return}if(_h(D.relatedTarget,e.context.triggerElements))return;const M=f.current.floatingContext?.nodeId??o,_=D.relatedTarget;if(!(g&&M&&ln(_)&&Ka(g.nodesRef.current,M,!1).some(q=>st(q.context?.elements.floating,_)))){if(h.handler){h.handler(D);return}R(),w()&&!S()&&C(D)}}function N(D){!g||!m||E()||x.start(0,()=>{g.events.off("floating.closed",N),e.setOpen(!1,ut(Kn,D)),g.events.emit("floating.closed",D)})}const j=u;return ys(j&&Lt(j,"mouseenter",k),j&&Lt(j,"mouseleave",A),j&&Lt(j,"pointerdown",O,!0),()=>{g?.events.off("floating.closed",N)})},[i,u,e,f,s,o,w,S,R,h,g,m,x])}const TI={current:null};function $v(e,t={}){const{enabled:i=!0,delay:s=0,handleClose:o=null,mouseOnly:l=!1,restMs:u=0,move:d=!0,triggerElementRef:f=TI,externalTree:g,isActiveTrigger:m=!0,getHandleCloseContext:h,isClosing:x,shouldOpen:S,guardStaleOpen:w=!1}=t,{dataRef:R,events:E}=e.context,C=Qa(g),O=Yv(e),k=b.useRef(!1),A=Ln(o),N=Ln(s),j=Ln(u),D=Ln(i),M=Ln(S),_=Ln(x),L=Be(()=>ZC(R.current.openEvent?.type,O.interactedInside)),q=Be(()=>M.current?.()!==!1),X=Be((U,z,Q)=>{const $=e.context.triggerElements;if($.hasElement(z))return!U||!st(U,z);if(!ln(Q))return!1;const K=Q;return $.hasMatchingElement(Y=>st(Y,K))&&(!U||!st(U,K))}),B=Be(()=>{if(!O.handler)return;Qt(e.select("domReferenceElement")).removeEventListener("mousemove",O.handler),O.handler=void 0}),H=Be(()=>{Gh(O)});return m&&(O.handleCloseOptions=o?.__options),b.useEffect(()=>B,[B]),b.useEffect(()=>{if(!i)return;function U(z){z.open?k.current=!1:(k.current=z.reason===Kn,B(),O.openChangeTimeout.clear(),O.restTimeout.clear(),O.blockMouseMove=!0,O.restTimeoutPending=!1)}return E.on("openchange",U),()=>{E.off("openchange",U)}},[i,E,O,B]),b.useEffect(()=>{if(!i)return;function U(ee,G=!0){const oe=Po(N.current,"close",O.pointerType);oe?O.openChangeTimeout.start(oe,()=>{e.setOpen(!1,ut(Kn,ee)),C?.events.emit("floating.closed",ee)}):G&&(O.openChangeTimeout.clear(),e.setOpen(!1,ut(Kn,ee)),C?.events.emit("floating.closed",ee))}const z=f.current??(m?e.select("domReferenceElement"):null);if(!ln(z))return;function Q(ee){if(O.openChangeTimeout.clear(),O.blockMouseMove=!1,l&&!Ua(O.pointerType))return;const G=mw(j.current),oe=Po(N.current,"open",O.pointerType),I=nr(ee),V=ee.currentTarget??null,W=e.select("domReferenceElement");let re=V;if(ln(I)&&!e.context.triggerElements.hasElement(I)){for(const Oe of e.context.triggerElements.elements())if(st(Oe,I)){re=Oe;break}}ln(V)&&ln(W)&&!e.context.triggerElements.hasElement(V)&&st(V,W)&&(re=W);const Ee=re==null?!1:X(W,re,I),le=e.select("open"),me=_.current?.()??e.select("transitionStatus")==="ending",ge=!le&&me&&k.current,ue=!Ee&&ln(re)&&ln(W)&&st(W,re)&&ge,Te=G>0&&!oe,ve=Ee&&(le||ge)||ue,Pe=!le||Ee;if(ve){q()&&e.setOpen(!0,ut(Kn,ee,re));return}Te||(oe?O.openChangeTimeout.start(oe,()=>{Pe&&q()&&e.setOpen(!0,ut(Kn,ee,re))}):Pe&&q()&&e.setOpen(!0,ut(Kn,ee,re)))}function $(ee){if(L()){H();return}B();const G=e.select("domReferenceElement"),oe=Qt(G);O.restTimeout.clear(),O.restTimeoutPending=!1;const I=R.current.floatingContext??h?.();if(_h(ee.relatedTarget,e.context.triggerElements))return;if(A.current&&I){e.select("open")||O.openChangeTimeout.clear();const W=f.current;O.handler=A.current({...I,tree:C,x:ee.clientX,y:ee.clientY,onClose(){H(),B(),D.current&&!L()&&W===e.select("domReferenceElement")&&U(ee,!0)}}),oe.addEventListener("mousemove",O.handler),O.handler(ee);return}(O.pointerType!=="touch"||!st(e.select("floatingElement"),ee.relatedTarget))&&U(ee)}function K(ee){st(z,ee.relatedTarget)||(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1)}const Y=w?Lt(z,"mouseout",K):void 0;return d?ys(Lt(z,"mousemove",Q,{once:!0}),Lt(z,"mouseenter",Q),Lt(z,"mouseleave",$),Y):ys(Lt(z,"mouseenter",Q),Lt(z,"mouseleave",$),Y)},[B,H,R,N,e,i,A,O,m,X,L,l,d,j,f,C,D,h,_,q,w]),b.useMemo(()=>{if(!i)return;function U(z){O.pointerType=z.pointerType}return{onPointerDown:U,onPointerEnter:U,onMouseMove(z){const{nativeEvent:Q}=z,$=z.currentTarget,K=e.select("domReferenceElement"),Y=e.select("open"),ee=X(K,$,z.target);if(l&&!Ua(O.pointerType))return;if(Y&&ee&&O.handleCloseOptions?.blockPointerEvents){const I=e.select("floatingElement");if(I){const V=O.handleCloseOptions?.getScope?.()??$.ownerDocument.body;VR(O,{scopeElement:V,referenceElement:$,floatingElement:I})}}const G=mw(j.current);if(Y&&!ee||G===0||!ee&&O.restTimeoutPending&&z.movementX**2+z.movementY**2<2)return;O.restTimeout.clear();function oe(){if(O.restTimeoutPending=!1,L())return;const I=e.select("open");!O.blockMouseMove&&(!I||ee)&&q()&&e.setOpen(!0,ut(Kn,Q,$))}O.pointerType==="touch"?hr.flushSync(()=>{oe()}):ee&&Y?oe():(O.restTimeoutPending=!0,O.restTimeout.start(G,oe))}}},[i,O,L,X,l,e,j,q])}function Fw(e){return Ss&&e.movementX===0&&e.movementY===0}function Kp(e,t,i){switch(e){case"vertical":return t;case"horizontal":return i;default:return t||i}}function eh(e,t){return Kp(t,e===QC||e===Ov,e===Sp||e===wp)}function sy(e,t,i){return Kp(t,e===Ov,i?e===Sp:e===wp)||e==="Enter"||e===" "||e===""}function kI(e,t,i){return Kp(t,i?e===Sp:e===wp,e===Ov)}function OI(e,t,i,s){const o=i?e===wp:e===Sp,l=e===QC;return t==="both"||t==="horizontal"&&s?e==="Escape":Kp(t,o,l)}function KR(e,t){const{listRef:i,activeIndex:s,onNavigate:o=()=>{},enabled:l=!0,selectedIndex:u=null,allowEscape:d=!1,loopFocus:f=!1,nested:g=!1,rtl:m=!1,virtual:h=!1,focusItemOnOpen:x="auto",focusItemOnHover:S=!0,openOnArrowKeyDown:w=!0,disabledIndices:R=void 0,orientation:E="vertical",triggerOrientation:C=E,parentOrientation:O,id:k,resetOnPointerLeave:A=!0,externalTree:N,nestedReturnFocusRef:j,grid:D}=t,M=D!=null,_=e.useState("open"),L=e.useState("floatingElement"),q=e.useState("domReferenceElement"),X=e.context.dataRef,B=Uh(L),H=Iy(q),U=Ln(B),z=$a(),Q=Qa(N),$=b.useRef(x),K=b.useRef(u??-1),Y=b.useRef(null),ee=b.useRef(!0),G=Be(de=>{o(K.current===-1?null:K.current,de)}),oe=b.useRef(!!L),I=b.useRef(_),V=b.useRef(!1),W=b.useRef(!1),re=b.useRef(null),Ee=Ln(R),le=Ln(_),me=Ln(u),ge=Ln(A),ue=tc(),Te=tc(),ve=Be(()=>{ue.cancel();function de(De){h||(re.current=Eh(De,{sync:V.current,preventScroll:!0}))}const we=i.current[K.current],Ge=W.current;we&&de(we),(V.current?De=>De():De=>ue.request(De))(()=>{const De=i.current[K.current]||we;if(!De)return;we||de(De),Ue&&(Ge||!ee.current)&&De.scrollIntoView?.({block:"nearest",inline:"nearest"})})});_e(()=>{X.current.orientation=E},[X,E]),_e(()=>{_||(Y.current=null),(!_||x!=="auto")&&($.current=x)},[_,x]),_e(()=>{l&&(_&&L?(K.current=u??-1,$.current&&u!=null&&(W.current=!0,G())):oe.current&&(K.current=-1,G()))},[l,_,L,u,G]),_e(()=>{if(l){if(!_){V.current=!1;return}if(L)if(s==null){if(V.current=!1,me.current!=null)return;if(oe.current&&(K.current=-1,ve()),(!I.current||!oe.current)&&$.current&&(Y.current!=null||$.current===!0&&Y.current==null)){let de=0;const we=()=>{i.current[0]==null?(de<2&&(de?Me=>Te.request(Me):queueMicrotask)(we),de+=1):(K.current=Y.current==null||sy(Y.current,C,m)||g?wh(i):Ly(i),Y.current=null,G())};we()}}else Vl(i.current,s)||(K.current=s,ve(),W.current=!1)}},[l,_,L,s,me,g,i,C,m,G,ve,Te]),_e(()=>{if(!l||L||!Q||h||!oe.current)return;const de=Q.nodesRef.current,we=de.find(De=>De.id===z)?.context?.elements.floating,Ge=Jr(Qt(q??we??null)),Me=de.some(De=>De.context&&st(De.context.elements.floating,Ge));we&&!Me&&ee.current&&we.focus({preventScroll:!0})},[l,L,q,Q,z,h]),_e(()=>{I.current=_,oe.current=!!L});const Pe=s!=null,Oe=Be(de=>{if(!le.current)return;const we=i.current.indexOf(de.currentTarget);we!==-1&&(K.current!==we||s!==we)&&(K.current=we,G(de))}),Le=Be(()=>O??Q?.nodesRef.current.find(de=>de.id===z)?.context?.dataRef?.current.orientation),Ve=Be(()=>wh(i,Ee.current)),ke=Be(de=>{if(ee.current=!1,V.current=!0,de.which===229||!le.current&&de.currentTarget===U.current)return;if(g&&OI(de.key,E,m,M)){eh(de.key,Le())||Yi(de),e.setOpen(!1,ut(Hh,de.nativeEvent));const De=j?.current??q;bn(De)&&De.focus();return}s!=null&&s!==K.current&&!Vl(i.current,s)&&(K.current=s);const we=K.current,Ge=wh(i,R),Me=Ly(i,R);if(H||(de.key==="Home"&&(Yi(de),K.current=Ge,G(de)),de.key==="End"&&(Yi(de),K.current=Me,G(de))),D!=null){const De=D(de,K.current,i,E,f,m,R,Ge,Me);if(De!=null&&De!==K.current&&(K.current=De,G(de)),E==="both")return}if(eh(de.key,E)){Yi(de);const De=Jr(de.currentTarget.ownerDocument);if(_&&!h&&st(de.currentTarget,De)&&!i.current.some(gt=>gt!=null&&st(gt,De))){K.current=sy(de.key,E,m)?Ge:Me,G(de),s===K.current&&ve();return}const{index:bt,wrapped:dt}=N4(i.current,we,{decrement:!sy(de.key,E,m),loopFocus:f,allowEscape:d,disabledIndices:R,minIndex:Ge,maxIndex:Me});dt&&(V.current=!1),K.current=bt,G(de)}}),Ue=b.useMemo(()=>({onFocus(we){V.current=!0,Oe(we)},onClick({currentTarget:we}){h||we.focus({preventScroll:!0})},onMouseMove(we){Fw(we)||(V.current=!0,W.current=!1,S&&Oe(we))},onPointerLeave(we){if(!le.current||!ee.current||we.pointerType==="touch")return;V.current=!0;const Ge=we.relatedTarget;if(!(!S||i.current.includes(Ge))&&ge.current&&(re.current?.(),re.current=null,K.current=-1,G(we),!h)){const Me=U.current,De=Jr(Qt(Me));Me&&st(Me,De)&&Me.focus({preventScroll:!0})}}}),[Oe,le,U,S,i,G,ge,h]),be=b.useMemo(()=>h&&_&&Pe&&{"aria-activedescendant":`${k}-${s}`},[h,_,Pe,k,s]),He=b.useMemo(()=>({...H?{}:be,onKeyDown(de){if(de.key==="Tab"&&de.shiftKey&&_&&!h){const we=nr(de.nativeEvent);if(we&&!st(U.current,we))return;Yi(de);const Ge=ut(Fa,de.nativeEvent);e.setOpen(!1,Ge);const Me=j?.current??q;!Ge.isCanceled&&bn(Me)&&Me.focus();return}ke(de)},onPointerMove(de){Fw(de)||(ee.current=!0)}}),[be,ke,U,H,e,_,h,q,j]),Ze=b.useMemo(()=>{function de(Me){e.setOpen(!0,ut(Hh,Me.nativeEvent,Me.currentTarget))}function we(Me){x==="auto"&&ec(Me.nativeEvent)&&($.current=!h)}function Ge(Me){$.current=x,x==="auto"&&Cv(Me.nativeEvent)&&($.current=!0)}return{onKeyDown(Me){const De=e.select("open");ee.current=!1;const bt=Me.key.startsWith("Arrow"),dt=kI(Me.key,Le(),m),gt=eh(Me.key,De?E:C),Nt=(g?dt:gt)||Me.key==="Enter"||Me.key.trim()==="";if(h&&De&&(!g||ed(Me.currentTarget)))return ke(Me);if(!(!De&&!w&&bt)){if(Nt){const jt=eh(Me.key,Le());Y.current=g&&jt?null:Me.key}if(g){dt&&(Yi(Me),De?(K.current=Ve(),G(Me),h&&U.current?.focus()):de(Me));return}gt&&(me.current!=null&&(K.current=me.current),Yi(Me),!De&&w?de(Me):ke(Me),De&&G(Me))}},onFocus(Me){Me.target===Me.currentTarget&&e.select("open")&&!h&&(K.current=-1,G(Me))},onPointerDown:Ge,onPointerEnter:Ge,onMouseDown:we,onClick:we}},[ke,x,Ve,g,G,e,w,E,C,Le,m,me,h,U]),ot=b.useMemo(()=>({...be,...Ze}),[be,Ze]);return b.useMemo(()=>l?{reference:ot,floating:He,item:Ue,trigger:Ze}:{},[l,ot,He,Ze,Ue])}function qR(e,t){const{listRef:i,elementsRef:s,activeIndex:o,onMatch:l,disabledIndices:u,onTyping:d,enabled:f=!0,resetMs:g=750,selectedIndex:m=null}=t,h=Be(d),x=e.useState("open"),S=Un(),w=b.useRef(""),R=b.useRef(m??o??-1),E=b.useRef(null),C=Be(A=>{function N(H){return s?.current[H]}function j(H){const U=N(H);return U&&!kp(U)||U?.matches(":disabled")?!1:u==null||!ql($i,H,u)}function D(H,U,z=0){if(H.length===0)return-1;const Q=(z%H.length+H.length)%H.length,$=U.toLowerCase();for(let K=0;K<H.length;K+=1){const Y=(Q+K)%H.length;if(!(!H[Y]?.toLowerCase().startsWith($)||!j(Y)))return Y}return-1}const M=i.current;if(w.current.length>0&&A.key===" "&&(Yi(A),h?.(!0)),w.current.length>0&&w.current[0]!==" "&&D(M,w.current)===-1&&A.key!==" "&&h?.(!1),M==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;x&&A.key!==" "&&(Yi(A),h?.(!0));const _=w.current==="";_&&(R.current=m??o??-1),M.every((H,U)=>H&&j(U)?H[0]?.toLowerCase()!==H[1]?.toLowerCase():!0)&&w.current===A.key&&(w.current="",R.current=E.current),w.current+=A.key,S.start(g,()=>{w.current="",R.current=E.current,h?.(!1)});const X=((_?m??o??-1:R.current)??0)+1,B=D(M,w.current,X);B!==-1?(l?.(B,A),E.current=B):A.key!==" "&&(w.current="",h?.(!1))}),O=Be(A=>{const N=A.relatedTarget,j=e.select("domReferenceElement"),D=e.select("floatingElement");st(j,N)||st(D,N)||(S.clear(),w.current="",R.current=E.current,h?.(!1))});_e(()=>{!x&&m!==null||(S.clear(),E.current=null,w.current!==""&&(w.current="",h?.(!1)))},[x,m,S,h]);const k=b.useMemo(()=>({onKeyDown:C,onBlur:O}),[C,O]);return b.useMemo(()=>f?{reference:k,floating:k}:{},[f,k])}const Bw=.1,AI=Bw*Bw,wn=.5;function th(e,t,i,s,o,l){return s>=t!=l>=t&&e<=(o-i)*(t-s)/(l-s)+i}function nh(e,t,i,s,o,l,u,d,f,g){let m=!1;return th(e,t,i,s,o,l)&&(m=!m),th(e,t,o,l,u,d)&&(m=!m),th(e,t,u,d,f,g)&&(m=!m),th(e,t,f,g,i,s)&&(m=!m),m}function MI(e,t,i){return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height}function rh(e,t,i,s,o,l){const u=Math.min(i,o),d=Math.max(i,o),f=Math.min(s,l),g=Math.max(s,l);return e>=u&&e<=d&&t>=f&&t<=g}function Qv(e={}){const{blockPointerEvents:t=!1}=e,i=new Pi,s=({x:o,y:l,placement:u,elements:d,onClose:f,nodeId:g,tree:m})=>{const h=u?.split("-")[0];let x=!1,S=null,w=null,R=typeof performance<"u"?performance.now():0;function E(O,k){const A=performance.now(),N=A-R;if(S===null||w===null||N===0)return S=O,w=k,R=A,!1;const j=O-S,D=k-w,M=j*j+D*D,_=N*N*AI;return S=O,w=k,R=A,M<_}function C(){i.clear(),f()}return function(k){i.clear();const A=d.domReference,N=d.floating;if(!A||!N||h==null||o==null||l==null)return;const{clientX:j,clientY:D}=k,M=nr(k),_=k.type==="mouseleave",L=st(N,M),q=st(A,M);if(L&&(x=!0,!_))return;if(q&&(x=!1,!_)){x=!0;return}if(_&&ln(k.relatedTarget)&&st(N,k.relatedTarget))return;function X(){return!!(m&&Ka(m.nodesRef.current,g).length>0)}function B(){X()||C()}if(X())return;const H=A.getBoundingClientRect(),U=N.getBoundingClientRect(),z=o>U.right-U.width/2,Q=l>U.bottom-U.height/2,$=U.width>H.width,K=U.height>H.height,Y=($?H:U).left,ee=($?H:U).right,G=(K?H:U).top,oe=(K?H:U).bottom;if(h==="top"&&l>=H.bottom-1||h==="bottom"&&l<=H.top+1||h==="left"&&o>=H.right-1||h==="right"&&o<=H.left+1){B();return}let I=!1;switch(h){case"top":I=rh(j,D,Y,H.top+1,ee,U.bottom-1);break;case"bottom":I=rh(j,D,Y,U.top+1,ee,H.bottom-1);break;case"left":I=rh(j,D,U.right-1,oe,H.left+1,G);break;case"right":I=rh(j,D,H.right-1,oe,U.left+1,G);break}if(I)return;if(x&&!MI(j,D,H)){B();return}if(!_&&E(j,D)){B();return}let V=!1;switch(h){case"top":{const W=$?wn/2:wn*4,re=$||z?o+W:o-W,Ee=$?o-W:z?o+W:o-W,le=l+wn+1,me=z||$?U.bottom-wn:U.top,ge=z?$?U.bottom-wn:U.top:U.bottom-wn;V=nh(j,D,re,le,Ee,le,U.left,me,U.right,ge);break}case"bottom":{const W=$?wn/2:wn*4,re=$||z?o+W:o-W,Ee=$?o-W:z?o+W:o-W,le=l-wn,me=z||$?U.top+wn:U.bottom,ge=z?$?U.top+wn:U.bottom:U.top+wn;V=nh(j,D,re,le,Ee,le,U.left,me,U.right,ge);break}case"left":{const W=K?wn/2:wn*4,re=K||Q?l+W:l-W,Ee=K?l-W:Q?l+W:l-W,le=o+wn+1,me=Q||K?U.right-wn:U.left,ge=Q?K?U.right-wn:U.left:U.right-wn;V=nh(j,D,me,U.top,ge,U.bottom,le,re,le,Ee);break}case"right":{const W=K?wn/2:wn*4,re=K||Q?l+W:l-W,Ee=K?l-W:Q?l+W:l-W,le=o-wn,me=Q||K?U.left+wn:U.right,ge=Q?K?U.left+wn:U.right:U.left+wn;V=nh(j,D,le,re,le,Ee,me,U.top,ge,U.bottom);break}}V?x||i.start(40,B):B()}};return s.__options={...e,blockPointerEvents:t},s}function Vw(e,t,i){let{reference:s,floating:o}=e;const l=ji(t),u=Iv(t),d=jv(u),f=mi(t),g=l==="y",m=s.x+s.width/2-o.width/2,h=s.y+s.height/2-o.height/2,x=s[d]/2-o[d]/2;let S;switch(f){case"top":S={x:m,y:s.y-o.height};break;case"bottom":S={x:m,y:s.y+s.height};break;case"right":S={x:s.x+s.width,y:h};break;case"left":S={x:s.x-o.width,y:h};break;default:S={x:s.x,y:s.y}}const w=vs(t);return w&&(S[u]+=x*(w==="end"?1:-1)*(i&&g?-1:1)),S}async function NI(e,t){var i;t===void 0&&(t={});const{x:s,y:o,platform:l,rects:u,elements:d,strategy:f}=e,{boundary:g="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:x=!1,padding:S=0}=Va(t,e),w=sR(S),E=d[x?h==="floating"?"reference":"floating":h],C=Uu(await l.getClippingRect({element:(i=await(l.isElement==null?void 0:l.isElement(E)))==null||i?E:E.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:g,rootBoundary:m,strategy:f})),O=h==="floating"?{x:s,y:o,width:u.floating.width,height:u.floating.height}:u.reference,k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),A=await(l.isElement==null?void 0:l.isElement(k))&&await(l.getScale==null?void 0:l.getScale(k))||{x:1,y:1},N=Uu(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:k,strategy:f}):O);return{top:(C.top-N.top+w.top)/A.y,bottom:(N.bottom-C.bottom+w.bottom)/A.y,left:(C.left-N.left+w.left)/A.x,right:(N.right-C.right+w.right)/A.x}}const DI=50,jI=async(e,t,i)=>{const{placement:s="bottom",strategy:o="absolute",middleware:l=[],platform:u}=i,d=u.detectOverflow?u:{...u,detectOverflow:NI},f=await(u.isRTL==null?void 0:u.isRTL(t));let g=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:h}=Vw(g,s,f),x=s,S=0;const w={};for(let R=0;R<l.length;R++){const E=l[R];if(!E)continue;const{name:C,fn:O}=E,{x:k,y:A,data:N,reset:j}=await O({x:m,y:h,initialPlacement:s,placement:x,strategy:o,middlewareData:w,rects:g,platform:d,elements:{reference:e,floating:t}});m=k??m,h=A??h,w[C]={...w[C],...N},j&&S<DI&&(S++,typeof j=="object"&&(j.placement&&(x=j.placement),j.rects&&(g=j.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):j.rects),{x:m,y:h}=Vw(g,x,f)),R=-1)}return{x:m,y:h,placement:x,strategy:o,middlewareData:w}},II=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var i,s;const{placement:o,middlewareData:l,rects:u,initialPlacement:d,platform:f,elements:g}=t,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:x,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:R=!0,...E}=Va(e,t);if((i=l.arrow)!=null&&i.alignmentOffset)return{};const C=mi(o),O=ji(d),k=mi(d)===d,A=await(f.isRTL==null?void 0:f.isRTL(g.floating)),N=x||(k||!R?[Bh(d)]:R4(d)),j=w!=="none";!x&&j&&N.push(...A4(d,R,w,A));const D=[d,...N],M=await f.detectOverflow(t,E),_=[];let L=((s=l.flip)==null?void 0:s.overflows)||[];if(m&&_.push(M[C]),h){const H=C4(o,u,A);_.push(M[H[0]],M[H[1]])}if(L=[...L,{placement:o,overflows:_}],!_.every(H=>H<=0)){var q,X;const H=(((q=l.flip)==null?void 0:q.index)||0)+1,U=D[H];if(U&&(!(h==="alignment"?O!==ji(U):!1)||L.every($=>ji($.placement)===O?$.overflows[0]>0:!0)))return{data:{index:H,overflows:L},reset:{placement:U}};let z=(X=L.filter(Q=>Q.overflows[0]<=0).sort((Q,$)=>Q.overflows[1]-$.overflows[1])[0])==null?void 0:X.placement;if(!z)switch(S){case"bestFit":{var B;const Q=(B=L.filter($=>{if(j){const K=ji($.placement);return K===O||K==="y"}return!0}).map($=>[$.placement,$.overflows.filter(K=>K>0).reduce((K,Y)=>K+Y,0)]).sort(($,K)=>$[1]-K[1])[0])==null?void 0:B[0];Q&&(z=Q);break}case"initialPlacement":z=d;break}if(o!==z)return{reset:{placement:z}}}return{}}}},YR=new Set(["left","top"]);async function PI(e,t){const{placement:i,platform:s,elements:o}=e,l=await(s.isRTL==null?void 0:s.isRTL(o.floating)),u=mi(i),d=vs(i),f=ji(i)==="y",g=YR.has(u)?-1:1,m=l&&f?-1:1,h=Va(t,e);let{mainAxis:x,crossAxis:S,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"&&(S=d==="end"?w*-1:w),f?{x:S*m,y:x*g}:{x:x*g,y:S*m}}const LI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var i,s;const{x:o,y:l,placement:u,middlewareData:d}=t,f=await PI(t,e);return u===((i=d.offset)==null?void 0:i.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:o+f.x,y:l+f.y,data:{...f,placement:u}}}}},zI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:s,placement:o,platform:l}=t,{mainAxis:u=!0,crossAxis:d=!1,limiter:f={fn:O=>{let{x:k,y:A}=O;return{x:k,y:A}}},...g}=Va(e,t),m={x:i,y:s},h=await l.detectOverflow(t,g),x=ji(o),S=Dv(x);let w=m[S],R=m[x];const E=(O,k)=>iR(k+h[O==="y"?"top":"left"],k,k-h[O==="y"?"bottom":"right"]);u&&(w=E(S,w)),d&&(R=E(x,R));const C=f.fn({...t,[S]:w,[x]:R});return{...C,data:{x:C.x-i,y:C.y-s,enabled:{[S]:u,[x]:d}}}}}},_I=function(e){return e===void 0&&(e={}),{options:e,fn(t){var i,s;const{x:o,y:l,placement:u,rects:d,middlewareData:f}=t,{offset:g=0,mainAxis:m=!0,crossAxis:h=!0}=Va(e,t),x={x:o,y:l},S=ji(u),w=Dv(S);let R=x[w],E=x[S];const C=Va(g,t),O=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:(i=C.mainAxis)!=null?i:0,crossAxis:(s=C.crossAxis)!=null?s:0};if(m){const N=w==="y"?"height":"width",j=d.reference[w]-d.floating[N]+O.mainAxis,D=d.reference[w]+d.reference[N]-O.mainAxis;R<j?R=j:R>D&&(R=D)}if(h){var k,A;const N=w==="y"?"width":"height",j=YR.has(mi(u)),D=d.reference[S]-d.floating[N]+(j&&((k=f.offset)==null?void 0:k[S])||0)+(j?0:O.crossAxis),M=d.reference[S]+d.reference[N]+(j?0:((A=f.offset)==null?void 0:A[S])||0)-(j?O.crossAxis:0);E<D?E=D:E>M&&(E=M)}return{[w]:R,[S]:E}}}},UI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:i,rects:s,platform:o,elements:l}=t,{apply:u=()=>{},...d}=Va(e,t),f=await o.detectOverflow(t,d),g=mi(i),m=vs(i),h=ji(i)==="y",{width:x,height:S}=s.floating;let w,R;g==="top"||g==="bottom"?(w=g,R=m===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(R=g,w=m==="end"?"top":"bottom");const E=S-f.top-f.bottom,C=x-f.left-f.right,O=nc(S-f[w],E),k=nc(x-f[R],C),A=t.middlewareData.shift,N=!A;let j=O,D=k;A!=null&&A.enabled.x&&(D=C),A!=null&&A.enabled.y&&(j=E),N&&!m&&(h?D=x-2*Qs(f.left,f.right):j=S-2*Qs(f.top,f.bottom)),await u({...t,availableWidth:D,availableHeight:j});const M=await o.getDimensions(l.floating);return x!==M.width||S!==M.height?{reset:{rects:!0}}:{}}}};function GR(e){const t=yi(e);let i=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const o=bn(e),l=o?e.offsetWidth:i,u=o?e.offsetHeight:s,d=Fh(i)!==l||Fh(s)!==u;return d&&(i=l,s=u),{width:i,height:s,$:d}}function Xv(e){return ln(e)?e:e.contextElement}function $l(e){const t=Xv(e);if(!bn(t))return Xs(1);const i=t.getBoundingClientRect(),{width:s,height:o,$:l}=GR(t);let u=(l?Fh(i.width):i.width)/s,d=(l?Fh(i.height):i.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const HI=Xs(0);function $R(e){const t=Cn(e);return!kv()||!t.visualViewport?HI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FI(e,t,i){return t===void 0&&(t=!1),!!i&&t&&i===Cn(e)}function Lo(e,t,i,s){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),l=Xv(e);let u=Xs(1);t&&(s?ln(s)&&(u=$l(s)):u=$l(e));const d=FI(l,i,s)?$R(l):Xs(0);let f=(o.left+d.x)/u.x,g=(o.top+d.y)/u.y,m=o.width/u.x,h=o.height/u.y;if(l&&s){const x=Cn(l),S=ln(s)?Cn(s):s;let w=x,R=Ny(w);for(;R&&S!==w;){const E=$l(R),C=R.getBoundingClientRect(),O=yi(R),k=C.left+(R.clientLeft+parseFloat(O.paddingLeft))*E.x,A=C.top+(R.clientTop+parseFloat(O.paddingTop))*E.y;f*=E.x,g*=E.y,m*=E.x,h*=E.y,f+=k,g+=A,w=Cn(R),R=Ny(w)}}return Uu({width:m,height:h,x:f,y:g})}function qp(e,t){const i=xp(e).scrollLeft;return t?t.left+i:Lo(ea(e)).left+i}function QR(e,t){const i=e.getBoundingClientRect(),s=i.left+t.scrollLeft-qp(e,i),o=i.top+t.scrollTop;return{x:s,y:o}}function BI(e){let{elements:t,rect:i,offsetParent:s,strategy:o}=e;const l=o==="fixed",u=ea(s),d=t?bp(t.floating):!1;if(s===u||d&&l)return i;let f={scrollLeft:0,scrollTop:0},g=Xs(1);const m=Xs(0),h=bn(s);if((h||!l)&&((Cr(s)!=="body"||Ju(u))&&(f=xp(s)),h)){const S=Lo(s);g=$l(s),m.x=S.x+s.clientLeft,m.y=S.y+s.clientTop}const x=u&&!h&&!l?QR(u,f):Xs(0);return{width:i.width*g.x,height:i.height*g.y,x:i.x*g.x-f.scrollLeft*g.x+m.x+x.x,y:i.y*g.y-f.scrollTop*g.y+m.y+x.y}}function VI(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function KI(e){const t=xp(e),i=e.ownerDocument.body,s=Qs(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=Qs(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let l=-t.scrollLeft+qp(e);const u=-t.scrollTop;return yi(i).direction==="rtl"&&(l+=Qs(e.clientWidth,i.clientWidth)-s),{width:s,height:o,x:l,y:u}}const qI=25;function YI(e,t,i){i===void 0&&(i="viewport");const s=i==="layoutViewport",o=Cn(e),l=ea(e),u=o.visualViewport;let d=l.clientWidth,f=l.clientHeight,g=0,m=0;if(u){const x=!kv()||t==="fixed";s?x||(g=-u.offsetLeft,m=-u.offsetTop):(d=u.width,f=u.height,x&&(g=u.offsetLeft,m=u.offsetTop))}if(qp(l)<=0){const x=l.ownerDocument,S=x.body,w=getComputedStyle(S),R=x.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,E=Math.abs(l.clientWidth-S.clientWidth-R),C=getComputedStyle(l).scrollbarGutter==="stable both-edges"?E/2:E;C<=qI&&(d-=C)}return{width:d,height:f,x:g,y:m}}function GI(e,t){const i=Lo(e,!0,t==="fixed"),s=i.top+e.clientTop,o=i.left+e.clientLeft,l=$l(e),u=e.clientWidth*l.x,d=e.clientHeight*l.y,f=o*l.x,g=s*l.y;return{width:u,height:d,x:f,y:g}}function Kw(e,t,i){let s;if(t==="viewport"||t==="layoutViewport")s=YI(e,i,t);else if(t==="document")s=KI(ea(e));else if(ln(t))s=GI(t,i);else{const o=$R(e);s={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Uu(s)}function $I(e,t){const i=t.get(e);if(i)return i;let s=Lu(e,[],!1).filter(d=>ln(d)&&Cr(d)!=="body"),o=null;const l=yi(e).position==="fixed";let u=l?Zs(e):e;for(;ln(u)&&!$s(u);){const d=yi(u),f=Tv(u),g=o?o.position:l?"fixed":"";!f&&(g==="fixed"||g==="absolute"&&d.position==="static")?s=s.filter(h=>h!==u):o=d,u=Zs(u)}return t.set(e,s),s}function QI(e){let{element:t,boundary:i,rootBoundary:s,strategy:o}=e;const u=[...i==="clippingAncestors"?bp(t)?[]:$I(t,this._c):[].concat(i),s],d=Kw(t,u[0],o);let f=d.top,g=d.right,m=d.bottom,h=d.left;for(let x=1;x<u.length;x++){const S=Kw(t,u[x],o);f=Qs(S.top,f),g=nc(S.right,g),m=nc(S.bottom,m),h=Qs(S.left,h)}return{width:g-h,height:m-f,x:h,y:f}}function XI(e){const{width:t,height:i}=GR(e);return{width:t,height:i}}function ZI(e,t,i){const s=bn(t),o=ea(t),l=i==="fixed",u=Lo(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=Xs(0);if((s||!l)&&((Cr(t)!=="body"||Ju(o))&&(d=xp(t)),s)){const x=Lo(t,!0,l,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}!s&&o&&(f.x=qp(o));const g=o&&!s&&!l?QR(o,d):Xs(0),m=u.left+d.scrollLeft-f.x-g.x,h=u.top+d.scrollTop-f.y-g.y;return{x:m,y:h,width:u.width,height:u.height}}function ay(e){return yi(e).position==="static"}function qw(e,t){if(!bn(e)||yi(e).position==="fixed")return null;if(t)return t(e);let i=e.offsetParent;return ea(e)===i&&(i=i.ownerDocument.body),i}function XR(e,t){const i=Cn(e);if(bp(e))return i;if(!bn(e)){let o=Zs(e);for(;o&&!$s(o);){if(ln(o)&&!ay(o))return o;o=Zs(o)}return i}let s=qw(e,t);for(;s&&Fj(s)&&ay(s);)s=qw(s,t);return s&&$s(s)&&ay(s)&&!Tv(s)?i:s||Kj(e)||i}const JI=async function(e){const t=this.getOffsetParent||XR,i=this.getDimensions,s=await i(e.floating);return{reference:ZI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function WI(e){return yi(e).direction==="rtl"}const ZR={convertOffsetParentRelativeRectToViewportRelativeRect:BI,getDocumentElement:ea,getClippingRect:QI,getOffsetParent:XR,getElementRects:JI,getClientRects:VI,getDimensions:XI,getScale:$l,isElement:ln,isRTL:WI};function JR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function e3(e,t,i){let s=null,o;const l=ea(e);function u(){var m;clearTimeout(o),(m=s)==null||m.disconnect(),s=null}function d(m,h){m===void 0&&(m=!1),h===void 0&&(h=1),u();const x=e.getBoundingClientRect(),{left:S,top:w,width:R,height:E}=x;if(m||t(),!R||!E)return;const C=Xf(w),O=Xf(l.clientWidth-(S+R)),k=Xf(l.clientHeight-(w+E)),A=Xf(S),j={rootMargin:-C+"px "+-O+"px "+-k+"px "+-A+"px",threshold:Qs(0,nc(1,h))||1};let D=!0;function M(_){const L=_[0].intersectionRatio;if(!JR(x,e.getBoundingClientRect()))return d();if(L!==h){if(!D)return d();L?d(!1,L):o=setTimeout(()=>{d(!1,1e-7)},1e3)}D=!1}try{s=new IntersectionObserver(M,{...j,root:l.ownerDocument})}catch{s=new IntersectionObserver(M,j)}s.observe(e)}const f=Cn(e),g=()=>d(i);return f.addEventListener("resize",g),d(!0),()=>{f.removeEventListener("resize",g),u()}}function Yw(e,t,i,s){s===void 0&&(s={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=s,g=Xv(e),m=o||l?[...g?Lu(g):[],...t?Lu(t):[]]:[];m.forEach(C=>{o&&C.addEventListener("scroll",i),l&&C.addEventListener("resize",i)});const h=g&&d?e3(g,i,l):null;let x=-1,S=null;u&&(S=new ResizeObserver(C=>{let[O]=C;O&&O.target===g&&S&&t&&(S.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var k;(k=S)==null||k.observe(t)})),i()}),g&&!f&&S.observe(g),t&&S.observe(t));let w,R=f?Lo(e):null;f&&E();function E(){const C=Lo(e);R&&!JR(R,C)&&i(),R=C,w=requestAnimationFrame(E)}return i(),()=>{var C;m.forEach(O=>{o&&O.removeEventListener("scroll",i),l&&O.removeEventListener("resize",i)}),h?.(),(C=S)==null||C.disconnect(),S=null,f&&cancelAnimationFrame(w)}}const t3=LI,n3=zI,r3=II,i3=UI,s3=_I,a3=(e,t,i)=>{const s=new Map,o=i??{},l={...ZR,...o.platform,_c:s};return jI(e,t,{...o,platform:l})};var o3=typeof document<"u",l3=function(){},Ch=o3?b.useLayoutEffect:l3;function $h(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let i,s,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(i=e.length,i!==t.length)return!1;for(s=i;s--!==0;)if(!$h(e[s],t[s]))return!1;return!0}if(o=Object.keys(e),i=o.length,i!==Object.keys(t).length)return!1;for(s=i;s--!==0;)if(!{}.hasOwnProperty.call(t,o[s]))return!1;for(s=i;s--!==0;){const l=o[s];if(!(l==="_owner"&&e.$$typeof)&&!$h(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function WR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gw(e,t){const i=WR(e);return Math.round(t*i)/i}function oy(e){const t=b.useRef(e);return Ch(()=>{t.current=e}),t}function c3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:i="absolute",middleware:s=[],platform:o,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:f,open:g}=e,[m,h]=b.useState({x:0,y:0,strategy:i,placement:t,middlewareData:{},isPositioned:!1}),[x,S]=b.useState(s);$h(x,s)||S(s);const[w,R]=b.useState(null),[E,C]=b.useState(null),O=b.useCallback($=>{$!==j.current&&(j.current=$,R($))},[]),k=b.useCallback($=>{$!==D.current&&(D.current=$,C($))},[]),A=l||w,N=u||E,j=b.useRef(null),D=b.useRef(null),M=b.useRef(m),_=f!=null,L=oy(f),q=oy(o),X=oy(g),B=b.useCallback(()=>{if(!j.current||!D.current)return;const $={placement:t,strategy:i,middleware:x};q.current&&($.platform=q.current),a3(j.current,D.current,$).then(K=>{const Y={...K,isPositioned:X.current!==!1};H.current&&!$h(M.current,Y)&&(M.current=Y,hr.flushSync(()=>{h(Y)}))})},[x,t,i,q,X]);Ch(()=>{g===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,h($=>({...$,isPositioned:!1})))},[g]);const H=b.useRef(!1);Ch(()=>(H.current=!0,()=>{H.current=!1}),[]),Ch(()=>{if(A&&(j.current=A),N&&(D.current=N),A&&N){if(L.current)return L.current(A,N,B);B()}},[A,N,B,L,_]);const U=b.useMemo(()=>({reference:j,floating:D,setReference:O,setFloating:k}),[O,k]),z=b.useMemo(()=>({reference:A,floating:N}),[A,N]),Q=b.useMemo(()=>{const $={position:i,left:0,top:0};if(!z.floating)return $;const K=Gw(z.floating,m.x),Y=Gw(z.floating,m.y);return d?{...$,transform:"translate("+K+"px, "+Y+"px)",...WR(z.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:K,top:Y}},[i,d,z.floating,m.x,m.y]);return b.useMemo(()=>({...m,update:B,refs:U,elements:z,floatingStyles:Q}),[m,B,U,z,Q])}const u3=(e,t)=>{const i=t3(e);return{name:i.name,fn:i.fn,options:[e,t]}},d3=(e,t)=>{const i=n3(e);return{name:i.name,fn:i.fn,options:[e,t]}},f3=(e,t)=>({fn:s3(e).fn,options:[e,t]}),h3=(e,t)=>{const i=r3(e);return{name:i.name,fn:i.fn,options:[e,t]}},p3=(e,t)=>{const i=i3(e);return{name:i.name,fn:i.fn,options:[e,t]}},g3={...Ys,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,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class m3 extends oc{constructor(t,i,s){const o=new ad;super(y3(t,o,i,s),v3(o),g3)}setOpen=(t,i)=>{fI(this,t,i,{extraState:{openChangeReason:i.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,ut(Qi,t))}}function y3(e,t,i,s=!1){return{...Bp(t,i,s),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function v3(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const b3=Xu(function(t){const{disabled:i=!1,defaultOpen:s=!1,open:o,disableHoverablePopup:l=!1,trackCursorAxis:u="none",actionsRef:d,onOpenChange:f,onOpenChangeComplete:g,handle:m,triggerId:h,defaultTriggerId:x=null,children:S}=t,w=Kv((q,X)=>new m3({open:s,openProp:o,activeTriggerId:x,triggerIdProp:h},q,X));w.useControlledProp("openProp",o),w.useControlledProp("triggerIdProp",h),w.useContextCallback("onOpenChange",f),w.useContextCallback("onOpenChangeComplete",g);const R=w.useState("open"),E=!i&&R,C=w.useState("activeTriggerId"),O=w.useState("mounted"),k=w.useState("payload");w.useSyncedValues({trackCursorAxis:u,disableHoverablePopup:l,disabled:i}),_p(w,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:A,transitionStatus:N}=Up(E,w),j=w.useState("isInstantPhase"),D=w.useState("instantType"),M=w.useState("lastOpenChangeReason"),_=b.useRef(null);_e(()=>{R&&i&&w.setOpen(!1,ut(u4))},[R,i,w]),_e(()=>{N==="ending"&&M===Dr||N!=="ending"&&j?(D!=="delay"&&(_.current=D),w.set("instantType","delay")):_.current!==null&&(w.set("instantType",_.current),_.current=null)},[N,j,M,D,w]),_e(()=>{E&&C==null&&w.set("payload",void 0)},[w,C,E]),b.useImperativeHandle(d,()=>({unmount:A,close:()=>w.setOpen(!1,ut(nd))}),[A,w]);const L=E||O||!i&&u!=="none";return v.jsxs(YC.Provider,{value:w,children:[m&&v.jsx(Ip,{handle:m,store:w}),L&&v.jsx(x3,{store:w,disabled:i,trackCursorAxis:u}),typeof S=="function"?S({payload:k}):S]})});function x3({store:e,disabled:t,trackCursorAxis:i}){const s=e.useState("floatingRootContext"),o=id(s,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),l=oI(s,{enabled:!t&&i!=="none",axis:i==="none"?void 0:i}),u=b.useMemo(()=>Mr(l.reference,o.reference),[l.reference,o.reference]);return Hp(e,{activeTriggerProps:u,inactiveTriggerProps:u,popupProps:o.floating??Xt}),null}function ar(e){return ac(e,"base-ui")}const eT=b.createContext(void 0);function S3(){return b.useContext(eT)}const w3=600,$w="data-base-ui-tooltip-trigger";function Qw(e){const t=nr(e);return ln(t)?t:null}const E3=gp(function(t,i){const{render:s,className:o,style:l,handle:u,payload:d,disabled:f,delay:g,closeOnClick:m=!0,closeDelay:h,id:x,...S}=t,w=Zu(!0),E=Vp(u)??w;if(!E)throw new Error(gn(82));const C=ar(x),O=E.useState("isTriggerActive",C),k=E.useState("isOpenedByTrigger",C),A=E.useState("floatingRootContext"),N=b.useRef(null),j=h??0,{registerTrigger:D,isMountedByThisTrigger:M}=zp(C,N,E,{payload:d,closeOnClick:m,closeDelay:j}),_=S3(),{activeIdRef:L,delayRef:q,isInstantPhase:X,hasProvider:B}=p4(A,{open:k}),H=Yv(A);E.useSyncedValue("isInstantPhase",X);const U=E.useState("disabled"),z=f??U,Q=Ln(z),$=E.useState("trackCursorAxis"),K=E.useState("disableHoverablePopup"),Y=b.useRef(!1),ee=Un(),G=b.useRef(void 0);function oe(){return B&&L.current!=null?0:g??_??w3}function I(ue){const Te=N.current;if(!Te||!ue)return!1;const ve=zu(ue,`[${$w}]`);return ve!==null&&ve!==Te&&st(Te,ve)}function V(ue){const Te=I(ue);return Y.current=Te,Te&&(H.openChangeTimeout.clear(),H.restTimeout.clear(),H.restTimeoutPending=!1,ee.clear()),Te}const W=$v(A,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!K&&$!=="both"?Qv():null,restMs:oe,delay(){return h==null&&B?{close:Po(q.current,"close")}:{close:j}},triggerElementRef:N,isActiveTrigger:O,isClosing:()=>E.select("transitionStatus")==="ending",shouldOpen(){return!Y.current}}),re=BR(A,{enabled:!z}).reference,Ee=ue=>{const Te=Y.current,ve=Qw(ue),Pe=V(ve),Oe=N.current,Le=Oe&&ve&&st(Oe,ve);if(Pe&&E.select("open")&&E.select("lastOpenChangeReason")===Kn){E.setOpen(!1,ut(Kn,ue));return}if(Te&&!Pe&&Le&&!Q.current&&!E.select("open")&&Oe&&Ua(G.current)){const Ve=()=>{!Y.current&&!Q.current&&!E.select("open")&&E.setOpen(!0,ut(Kn,ue,Oe))},ke=oe();ke===0?(ee.clear(),Ve()):ee.start(ke,Ve)}},le=E.useState("appliedTriggerProps",M||$!=="none");return kt("button",t,{state:{open:k},ref:[i,D,N],props:[W,re,le,{onMouseOver(ue){Ee(ue.nativeEvent)},onFocus(ue){I(Qw(ue.nativeEvent))&&ue.preventBaseUIHandler()},onMouseLeave(){Y.current=!1,ee.clear(),G.current=void 0},onPointerEnter(ue){G.current=ue.pointerType},onPointerDown(ue){G.current=ue.pointerType,E.set("closeOnClick",m),m&&!E.select("open")&&E.cancelPendingOpen(ue.nativeEvent)},onClick(ue){m&&!E.select("open")&&E.cancelPendingOpen(ue.nativeEvent)},id:C,[jy]:z?"":void 0,[$w]:z?void 0:""},S],stateAttributesMapping:Ep})}),tT=b.createContext(void 0);function C3(){const e=b.useContext(tT);if(e===void 0)throw new Error(gn(70));return e}const R3=b.forwardRef(function(t,i){const{children:s,container:o,className:l,render:u,style:d,...f}=t,{node:g,subtree:m}=OR({container:o,ref:i,componentProps:t,elementProps:f});return!m&&!g?null:v.jsxs(b.Fragment,{children:[m,g&&hr.createPortal(s,g)]})}),T3=b.forwardRef(function(t,i){const{keepMounted:s=!1,...o}=t;return Zu().useState("mounted")||s?v.jsx(tT.Provider,{value:s,children:v.jsx(R3,{ref:i,...o})}):null}),nT=b.createContext(void 0);function rT(){const e=b.useContext(nT);if(e===void 0)throw new Error(gn(71));return e}function k3(e){const{nodeId:t,externalTree:i,rootContext:s}=e,o=s.useState("referenceElement"),l=s.useState("floatingElement"),u=s.useState("domReferenceElement"),d=s.useState("open"),f=s.useState("floatingId"),[g,m]=b.useState(null),h=b.useRef(null),x=Qa(i),S=b.useMemo(()=>({reference:o,floating:l,domReference:u}),[o,l,u]),w=c3({...e,elements:{...S,...g&&{reference:g}}}),R=b.useCallback(k=>{const A=ln(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;m(A),w.refs.setReference(A)},[w.refs]),E=b.useMemo(()=>({...w.refs,setPositionReference:R,domReference:h}),[w.refs,R]),C=b.useMemo(()=>({...w.elements,domReference:u}),[w.elements,u]),O=b.useMemo(()=>({...w,dataRef:s.context.dataRef,open:d,onOpenChange:s.setOpen,events:s.context.events,floatingId:f,refs:E,elements:C,nodeId:t,rootStore:s}),[w,E,C,t,s,d,f]);return _e(()=>{u&&(h.current=u)},[u]),_e(()=>{s.context.dataRef.current.floatingContext=O;const k=x?.nodesRef.current.find(A=>A.id===t);k&&(k.context=O)}),b.useMemo(()=>({...w,context:O,refs:E,elements:C,rootStore:s}),[w,E,C,O,s])}const O3=b.createContext(void 0);function Yp(){return b.useContext(O3)?.direction??"ltr"}const A3=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:s,placement:o,rects:l,platform:u,elements:d,middlewareData:f}=t,{element:g,padding:m=0}=Va(e,t)||{};if(g==null)return{};const h=sR(m),x={x:i,y:s},S=Iv(o),w=jv(S),R=await u.getDimensions(g),E=S==="y",C=E?"top":"left",O=E?"bottom":"right",k=E?"clientHeight":"clientWidth",A=l.reference[w]+l.reference[S]-x[S]-l.floating[w],N=x[S]-l.reference[S],j=d.floating[k]||l.floating[w],D=A/2-N/2,M=j/2-R[w]/2-1,_=Math.min(h[C],M),L=Math.min(h[O],M),q=_,X=j-R[w]-L,B=j/2-R[w]/2+D,H=iR(q,B,X),U=!f.arrow&&vs(o)!=null&&B!==H&&l.reference[w]/2-(B<q?_:L)-R[w]/2<0,z=U?B<q?B-q:B-X:0;return{[S]:x[S]+z,data:{[S]:H,centerOffset:B-H-z,...U&&{alignmentOffset:z}},reset:U}}}),M3=(e,t)=>{const{name:i,fn:s}=A3(e);return{name:i,fn:s,options:[e,t]}},N3={name:"hide",async fn(e){const{width:t,height:i,x:s,y:o}=e.rects.reference,l=t===0&&i===0&&s===0&&o===0,u=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:u.top-i>=0||u.right-t>=0||u.bottom-i>=0||u.left-t>=0||l}}}},D3={sideX:"left",sideY:"top"},j3="--available-width",I3="--available-height",P3="--anchor-width",L3="--anchor-height",z3="--transform-origin",Xw=j3,Zw=I3;function iT(e,t,i){const s=e==="inline-start"||e==="inline-end";return{top:"top",right:s?i?"inline-start":"inline-end":"right",bottom:"bottom",left:s?i?"inline-end":"inline-start":"left"}[t]}function Jw(e,t,i){const{rects:s,placement:o}=e;return{side:iT(t,mi(o),i),align:vs(o)||"center",anchor:{width:s.reference.width,height:s.reference.height},positioner:{width:s.floating.width,height:s.floating.height}}}function Gp(e){return _3(e,k3)}function _3(e,t){const{anchor:i,positionMethod:s="absolute",side:o="bottom",sideOffset:l=0,align:u="center",alignOffset:d=0,collisionBoundary:f,collisionPadding:g=5,sticky:m=!1,arrowPadding:h=5,disableAnchorTracking:x=!1,inline:S,keepMounted:w=!1,floatingRootContext:R,mounted:E,collisionAvoidance:C,shift:O,nodeId:k,adaptiveOrigin:A,lazyFlip:N=!1,externalTree:j}=e,D=C.side||"flip",M=C.align||"flip",_=C.fallbackAxisSide||"end",L=O?.crossAxis??!1,q=O?.rootBoundary,X=typeof i=="function"?i:void 0,B=Be(X),H=X?B:i,U=Ln(i),z=Ln(E),$=Yp()==="rtl",[K,Y]=b.useState(null);!E&&K!==null&&Y(null);const ee=N==="placement",G=K?mi(K):null,oe=K&&ee?vs(K)||"center":null,I=G||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":$?"left":"right","inline-start":$?"right":"left"}[o],V=oe||u,W=V==="center"?I:`${I}-${V}`;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 Ee=1,le=o==="bottom"?Ee:0,me=o==="top"?Ee:0,ge=o==="right"?Ee:0,ue=o==="left"?Ee:0,Te={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:re},ve=b.useRef(null),Pe=Ln(l),Oe=Ln(d),Le=typeof l!="function"?l:0,Ve=typeof d!="function"?d:0,ke=[];S&&ke.push(S),ke.push(u3(je=>{const at=Jw(je,o,$),Ie=typeof Pe.current=="function"?Pe.current(at):Pe.current,ze=typeof Oe.current=="function"?Oe.current(at):Oe.current;return{mainAxis:Ie,crossAxis:ze,alignmentAxis:ze}},[Le,Ve,$,o]));const Ue=M==="none"&&D!=="shift",be=!Ue&&(m||L||D==="shift"),He=D==="none"?null:h3({...Te,padding:{top:re.top+Ee+le,right:re.right+Ee+ue,bottom:re.bottom+Ee+me,left:re.left+Ee+ge},mainAxis:!L&&D==="flip",crossAxis:M==="flip"?"alignment":!1,fallbackAxisSideDirection:_}),Ze=Ue?null:d3({...Te,rootBoundary:q,mainAxis:M!=="none",crossAxis:be,limiter:m||L?void 0:f3(je=>{if(!ve.current)return{};const{width:at,height:Ie}=ve.current.getBoundingClientRect(),ze=ji(mi(je.placement)),$e=ze==="y"?at:Ie,et=ze==="y"?re.left+re.right:re.top+re.bottom;return{offset:$e/2+et/2}})},[Te,m,L,q,re,M]);D==="shift"||M==="shift"||V==="center"?ke.push(Ze,He):ke.push(He,Ze),ke.push(p3({...Te,apply({elements:{floating:je},availableWidth:at,availableHeight:Ie,rects:ze}){if(!z.current)return;const $e=je.style;$e.setProperty(Xw,`${at}px`),$e.setProperty(Zw,`${Ie}px`);const et=Cn(je).devicePixelRatio||1,{x:Tt,y:F,width:J,height:ne}=ze.reference,ye=(Math.round((Tt+J)*et)-Math.round(Tt*et))/et,xe=(Math.round((F+ne)*et)-Math.round(F*et))/et;$e.setProperty(P3,`${ye}px`),$e.setProperty(L3,`${xe}px`)}}),M3(je=>({element:ve.current||Qt(je.elements.floating).createElement("div"),padding:ve.current?h:0}),[h]),{name:"transformOrigin",fn(je){const{elements:{floating:at},middlewareData:Ie,placement:ze,platform:$e,rects:et,y:Tt}=je,F=mi(ze),J=vs(ze),ne=ji(F)==="y",ye=ve.current,xe=typeof l=="function"?l(Jw(je,o,$)):l;let qe;if(!ye&&J&&Math.abs(ne?Ie.shift?.x||0:Ie.shift?.y||0)<=1)qe=J==="start"===(ne&&$e.isRTL?.(at)===!0)?"100%":"0%";else{const Xe=ne?Ie.arrow?.x||0:Ie.arrow?.y||0,Qe=ne?ye?.clientWidth||0:ye?.clientHeight||0;qe=`${Xe+Qe/2}px`}let Ke=F==="top"||F==="left"?`calc(100% + ${xe}px)`:`${-xe}px`;return be&&ne&&Math.abs(Ie.shift?.y||0)>xe&&(Ke=`${et.reference.y+et.reference.height/2-Tt}px`),at.style.setProperty(z3,ne?`${qe} ${Ke}`:`${Ke} ${qe}`),{}}},N3,A),_e(()=>{!E&&R&&R.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[E,R]);const ot=b.useMemo(()=>({ancestorScroll:!x,elementResize:!x&&typeof ResizeObserver<"u",layoutShift:!x&&typeof IntersectionObserver<"u"}),[x]),{refs:de,elements:we,x:Ge,y:Me,middlewareData:De,update:bt,placement:dt,context:gt,isPositioned:Nt,floatingStyles:jt}=t({rootContext:R,open:w?E:void 0,placement:W,middleware:ke,strategy:s,whileElementsMounted:w?void 0:(...je)=>Yw(...je,ot),nodeId:k,externalTree:j}),{sideX:tn,sideY:an}=De.adaptiveOrigin||D3,nn=Nt?s:"fixed",We=b.useMemo(()=>{let je;return Nt?A?je={position:nn,[tn]:Ge,[an]:Me}:je={...jt,position:nn}:je={position:nn,top:0,left:0},je[Xw]="100vw",je[Zw]="100vh",Nt||(je.opacity=0),je},[A,nn,tn,Ge,an,Me,jt,Nt]),wt=b.useRef(null);_e(()=>{if(!E)return;const je=U.current,at=typeof je=="function"?je():je,ze=(Ww(at)?at.current:at)||null||null;ze!==wt.current&&(de.setPositionReference(ze),wt.current=ze)},[E,de,H,U]),b.useEffect(()=>{if(!E)return;const je=U.current;typeof je!="function"&&Ww(je)&&je.current!==wt.current&&(de.setPositionReference(je.current),wt.current=je.current)},[E,de,H,U]),b.useEffect(()=>{if(w&&E&&we.reference&&we.floating)return Yw(we.reference,we.floating,bt,ot)},[w,E,we,bt,ot]);const Zt=mi(dt),ht=iT(o,Zt,$),xt=vs(dt)||"center",yt=!!De.hide?.referenceHidden;_e(()=>{N&&E&&Nt&&(Zt!==I||ee&&xt!==V)&&Y(dt)},[N,ee,E,Nt,dt,Zt,xt,I,V]);const Ut=b.useMemo(()=>({position:"absolute",top:De.arrow?.y,left:De.arrow?.x}),[De.arrow]),un=De.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:We,arrowStyles:Ut,arrowRef:ve,arrowUncentered:un,side:ht,align:xt,physicalSide:Zt,anchorHidden:yt,refs:de,context:gt,isPositioned:Nt,update:bt}),[We,Ut,ve,un,ht,xt,Zt,yt,de,gt,Nt,bt])}function Ww(e){return e!=null&&"current"in e}function od(e){return e==="starting"?tI:Xt}function $p(e,t,{styles:i,transitionStatus:s,props:o,refs:l,hidden:u,inert:d=!1}){const f={...i};return d&&(f.pointerEvents="none"),kt("div",e,{state:t,ref:l,props:[{role:"presentation",hidden:u,style:f},od(s),o],stateAttributesMapping:Wu})}const U3=b.forwardRef(function(t,i){const{render:s,className:o,anchor:l,positionMethod:u="absolute",side:d="top",align:f="center",sideOffset:g=0,alignOffset:m=0,collisionBoundary:h="clipping-ancestors",collisionPadding:x=5,arrowPadding:S=5,sticky:w=!1,disableAnchorTracking:R=!1,collisionAvoidance:E=Hv,style:C,...O}=t,k=Zu(),A=C3(),N=k.useState("open"),j=k.useState("mounted"),D=k.useState("trackCursorAxis"),M=k.useState("disableHoverablePopup"),_=k.useState("floatingRootContext"),L=k.useState("instantType"),q=k.useState("transitionStatus"),X=k.useState("adaptiveOrigin"),B=Gp({anchor:l,positionMethod:u,floatingRootContext:_,mounted:j,side:d,sideOffset:g,align:f,alignOffset:m,collisionBoundary:h,collisionPadding:x,sticky:w,arrowPadding:S,disableAnchorTracking:R,keepMounted:A,collisionAvoidance:E,adaptiveOrigin:X}),H=b.useMemo(()=>({open:N,side:B.side,align:B.align,anchorHidden:B.anchorHidden,instant:D!=="none"?"tracking-cursor":L}),[N,B.side,B.align,B.anchorHidden,D,L]),U=$p(t,H,{styles:B.positionerStyles,transitionStatus:q,props:O,refs:[i,k.useStateSetter("positionerElement")],hidden:!j,inert:!N||D==="both"||M});return v.jsx(nT.Provider,{value:B,children:U})}),H3=b.forwardRef(function(t,i){const{render:s,className:o,style:l,...u}=t,d=Zu(),{side:f,align:g}=rT(),m=d.useState("open"),h=d.useState("instantType"),x=d.useState("transitionStatus"),S=d.useState("popupProps"),w=d.useState("floatingRootContext"),R=d.useState("disabled"),E=d.useState("closeDelay");Li({open:m,ref:d.context.popupRef,onComplete(){m&&d.context.onOpenChangeComplete?.(!0)}}),Gv(w,{enabled:!R,closeDelay:E});const C=d.useStateSetter("popupElement");return kt("div",t,{state:{open:m,side:f,align:g,instant:h,transitionStatus:x},ref:[i,d.context.popupRef,C],props:[sd,S,od(x),u],stateAttributesMapping:Cp})}),F3=b.forwardRef(function(t,i){const{render:s,className:o,style:l,...u}=t,d=Zu(),{arrowRef:f,side:g,align:m,arrowUncentered:h,arrowStyles:x}=rT(),S=d.useState("open"),w=d.useState("instantType");return kt("div",t,{state:{open:S,side:g,align:m,uncentered:h,instant:w},ref:[i,f],props:[{style:x,"aria-hidden":!0},u],stateAttributesMapping:Wu})}),B3=function(t){const{delay:i,closeDelay:s,timeout:o=400}=t,l=b.useMemo(()=>({open:i,close:s}),[i,s]);return v.jsx(eT.Provider,{value:i,children:v.jsx(h4,{delay:l,timeoutMs:o,children:t.children})})};function Qp(e){return zv(19)?e:e?"true":void 0}function V3(e){const[t,i]=b.useState({current:e,previous:null});return Object.is(e,t.current)||i({current:e,previous:t.current}),t.previous}const sT=48,Es=(e,t=0)=>{const i=new Int32Array(e.length);for(let s=0;s<e.length;s++)i[s]=e.charCodeAt(s)-sT-t;return i},Xp=e=>{const t=new Int32Array(e.length+1);for(let i=0;i<e.length;i++)t[i+1]=t[i]+e[i];return t},qa=e=>{const t=new Int32Array(e.length);let i=0;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s)-sT;i+=o>>>1^-(o&1),t[s]=i}return t},K3=384,q3=[],To=Xp(Es("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),Y3=Xp(Es(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),G3="@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",$3=(()=>{const e=To.length-1,t=new Int32Array(e);for(let o=e-1;o>=0;o--){let l=1,u=o+1;for(let d=To[o];d<To[o+1];d++)l+=t[u],u+=t[u];t[o]=l}const i=new Int32Array(To[e]);let s=0;for(let o=0;o<e;o++){let l=o+1;for(let u=To[o];u<To[o+1];u++)i[s++]=l,l+=t[l]}return i})(),Q3=Es("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),X3=Xp(Es("123333359346463635126536711576")),Z3=Es("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),J3=Es("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),W3=qa("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),eP=(()=>{const e=new Int32Array(319).fill(-1),t=qa("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),i=qa("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let s=0;s<t.length;s++)e[t[s]]=i[s];return e})(),tP="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 t=e.split(" "),i=t.shift();for(let s=0;s<t.length;s++)t[s]=i+t[s];return t}),eE=qa("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),nP=qa("ɠ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"),rP=qa("02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}22
:22z22222222222G000qOVI00000{2<40000@00000G¦§000ª00000000000000021K¬«00®000000000000000000000222HGH_1¸222½2¾2222ÇÊ000°2±"),aT=new Int32Array(987),oT=new Int32Array(987),lT=new Int32Array(987);let Uy="";const Hy=new Int32Array(1022);{const e=new Map;let t=0,i=0;for(let s=0;s<eE.length;s++)for(const o of tP[rP[s]]){let l=e.get(o);l===void 0&&(l=t++,e.set(o,l),Hy[l*2]=Uy.length,Hy[l*2+1]=o.length,Uy+=o),aT[i]=eE[s],oT[i]=nP[s],lT[i]=l,i++}}const iP=qa("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),sP=Xp(Es("1::24444432:442:44:44>222222:44:4421322511111311111114")),aP=qa("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"),oP=Es("ij"),lP=Es(""),cP=Es("1"),uP="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var dP={GROUP_COUNT:K3,customValidatorNames:q3,edgeStart:To,labelStart:Y3,labelText:G3,edgeTarget:$3,nodeGroup:Q3,nodeVlist:eP,vlistPat:X3,vlistOps:Z3,vlistRef:J3,vlistGroup:W3,litAnchor:aT,litGroup:oT,litPool:lT,poolOffsets:Hy,poolText:Uy,adjGid:iP,adjStart:sP,adjTgt:aP,patGid:oP,patTgt:lP,postfixLookupGroups:cP,orderSensitiveModifiers:uP};const fP="line"in new Error,ds=-1,Ro=-1,ly=(e,t,i)=>{let s=2166136261;for(let o=t;o<i;o++)s=Math.imul(s^e.charCodeAt(o),16777619);return s},Rh=(e,t,i)=>{const s=i-t;let o=Math.imul(s,2654435761)^e.charCodeAt(t);if(s>3){const l=s>>2,u=s>>1;o=Math.imul(o^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+l),2246822507),o=Math.imul(o^e.charCodeAt(t+u)<<8^e.charCodeAt(t+u+l)<<16^e.charCodeAt(i-3),3266489909),o^=e.charCodeAt(i-2)<<8^e.charCodeAt(i-1)<<16;for(let d=t+3,f=i-4;d<t+8&&d<f;d++,f--)o=Math.imul(o^e.charCodeAt(d)^e.charCodeAt(f)<<8,16777619)}return o^o>>>15|0},hP=(e,t,i={})=>{const{GROUP_COUNT:s,edgeStart:o,labelStart:l,labelText:u,edgeTarget:d,nodeGroup:f,nodeVlist:g,vlistPat:m,vlistOps:h,vlistRef:x,vlistGroup:S,litAnchor:w,litGroup:R,litPool:E,poolOffsets:C,poolText:O,adjGid:k,adjStart:A,adjTgt:N,patGid:j,patTgt:D,postfixLookupGroups:M,customValidatorNames:_,orderSensitiveModifiers:L}=e,q=new Int32Array(s).fill(-1);for(let he=0;he<k.length;he++)q[k[he]]=he;let X=0;for(let he=0;he+1<A.length;he++){const Ae=A[he+1]-A[he];Ae>X&&(X=Ae)}let B=32;for(;B<2*(1+X+j.length);)B<<=1;const H=new Int32Array(x.length+1);for(let he=0;he<x.length;he++)H[he+1]=H[he]+m[x[he]+1]-m[x[he]];const U=new Uint8Array(s);for(let he=0;he<M.length;he++)U[M[he]]=1;const z=o.length-1,Q=new Uint8Array(z);let $=0,K=!0;for(let he=0;he<w.length;he++){Q[w[he]]=1;const Ae=C[E[he]*2+1];Ae>$&&($=Ae);const Se=O.charCodeAt(C[E[he]*2]);(Se===91||Se===40)&&(K=!1)}let Y=1;for(;Y<w.length*2;)Y<<=1;const ee=new Int32Array(Y).fill(-1);for(let he=0;he<w.length;he++){const Ae=C[E[he]*2];let Se=(ly(O,Ae,Ae+C[E[he]*2+1])^Math.imul(w[he],2654435761)|0)&Y-1;for(;ee[Se]!==-1;)Se=Se+1&Y-1;ee[Se]=he}const G=(he,Ae,Se,rt)=>{let Ot=(ly(Ae,Se,rt)^Math.imul(he,2654435761)|0)&Y-1;const Ct=rt-Se;for(;;){const Ht=ee[Ot];if(Ht===-1)return-1;if(w[Ht]===he&&C[E[Ht]*2+1]===Ct){const xn=C[E[Ht]*2];let hn=!0;for(let vt=0;vt<Ct;vt++)if(O.charCodeAt(xn+vt)!==Ae.charCodeAt(Se+vt)){hn=!1;break}if(hn)return R[Ht]}Ot=Ot+1&Y-1}},oe=i.cacheSize??8192,I=i.prefix??e.prefix??"",V=I===""?"":I+":",W=V.length,re=(_??[]).map(he=>{throw new Error("cn: missing validator "+he)}),Ee=/\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 ue=0,Te=-1,ve=-1,Pe=-1,Oe=-1;const Le=he=>he>=97&&he<=122||he>=65&&he<=90||he>=48&&he<=57||he===95,Ve=he=>/\s/.test(String.fromCharCode(he)),ke=(he,Ae,Se)=>{if(ue=0,Te=-1,Se-Ae<3)return;const rt=he.charCodeAt(Ae),Ot=he.charCodeAt(Se-1);if(rt===91&&Ot===93)ue=1;else if(rt===40&&Ot===41)ue=2;else return;Pe=Ae+1,Oe=Se-1;let Ct=Ae+1;if(Le(he.charCodeAt(Ct))){for(Ct++;Ct<Se-1;){const Ht=he.charCodeAt(Ct);if(!Le(Ht)&&Ht!==45)break;Ct++}Ct<Se-2&&he.charCodeAt(Ct)===58&&(Te=Ae+1,ve=Ct,Pe=Ct+1)}},Ue=(he,Ae,Se,rt)=>{if(Se-Ae!==rt.length)return!1;for(let Ot=0;Ot<rt.length;Ot++)if(he.charCodeAt(Ae+Ot)!==rt.charCodeAt(Ot))return!1;return!0},be=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,He=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ze=he=>!!he&&!Number.isNaN(Number(he)),ot=(he,Ae,Se)=>{if(Se-Ae<11||!Ue(he,Ae,Ae+10,"@container"))return!1;if(he.charCodeAt(Ae+10)===47)return Se-Ae>=12;const rt=he.charCodeAt(Ae+11);return rt===115&&Se-Ae>=17&&Ue(he,Ae+10,Ae+16,"-size/")||rt===110&&Se-Ae>=19&&Ue(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(" ")),Ge=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Me=(he,Ae,Se,rt)=>{if(he>=10){if(he>=25)return re[he-25](Ae.slice(Se,rt));const Ot=he-10;if(ue!==de[Ot])return!1;if(Te>=0){for(const Ct of we[Ot])if(Ue(Ae,Te,ve,Ct))return!0;return!1}switch(Ge[Ot]){case 0:return!1;case 1:return!0;case 2:{const Ct=Ae.slice(Pe,Oe);return Ee.test(Ct)&&!le.test(Ct)}case 3:return Ze(Ae.slice(Pe,Oe));case 4:return ge.test(Ae.slice(Pe,Oe));default:return me.test(Ae.slice(Pe,Oe))}}switch(he){case 0:return!0;case 1:return ue===0;case 2:return ue===1;case 3:return ue===2;case 4:return be.test(Ae.slice(Se,rt));case 5:return Ze(Ae.slice(Se,rt));case 6:{const Ot=Ae.slice(Se,rt);return!!Ot&&Number.isInteger(Number(Ot))}case 7:return rt>Se&&Ae.charCodeAt(rt-1)===37&&Ze(Ae.slice(Se,rt-1));case 8:return He.test(Ae.slice(Se,rt));default:return ot(Ae,Se,rt)}},De=new Set(typeof L=="string"?L.split(" "):L),bt=(he,Ae,Se,rt,Ot,Ct)=>{const Ht=ly(Ae,Se,rt)^(Ot?2654435769:0)|0;let xn=he.get(Ht);if(xn!==void 0)e:for(let Dt=0;Dt<xn.length;Dt++){const on=xn[Dt];if(!(on.imp!==Ot||on.k.length!==rt-Se)){for(let mt=0;mt<on.k.length;mt++)if(on.k.charCodeAt(mt)!==Ae.charCodeAt(Se+mt))continue e;return on.id}}else he.set(Ht,xn=[]);const hn=Ae.slice(Se,rt),vt=Ct(hn);return xn.push({k:hn,imp:Ot,id:vt}),vt};let dt=new Map,gt=new Map,Nt=2;const jt=4096,tn=(he,Ae)=>{const Se=[];let rt=0,Ot=0,Ct=0;for(let vt=0;vt<he.length;vt++){const Dt=he.charCodeAt(vt);rt===0&&Ot===0&&Dt===58?(Se.push(he.slice(Ct,vt)),Ct=vt+1):Dt===91?rt++:Dt===93?rt--:Dt===40?Ot++:Dt===41&&Ot--}Se.push(he.slice(Ct));let Ht=Se[0];if(Se.length>1){const vt=[];let Dt=[];for(const on of Se)on.charCodeAt(0)===91||De.has(on)?(Dt.length&&(vt.push(...Dt.sort()),Dt=[]),vt.push(on)):Dt.push(on);Dt.length&&vt.push(...Dt.sort()),Ht=vt.join(":")}const xn=Ae?Ht+" !":Ht;let hn=gt.get(xn);return hn===void 0&>.set(xn,hn=Nt++),hn};let an=new Map,nn=s;const We=s+4096,wt=()=>nn++,Zt=2097152,ht=8192,xt=new Int32Array(ht),yt=new Array(ht).fill(null),Ut=new Int32Array(ht),un=new Int32Array(ht),je=new Uint8Array(ht);let at=0;const Ie=(he,Ae,Se,rt,Ot,Ct,Ht,xn)=>{let hn=he;if(yt[he]!==null)if(yt[he|1]===null)hn=he|1;else if((at++&3)===0)hn=he|at>>2&1;else return;yt[hn]=Ae.slice(Se,rt),xt[hn]=Ot,Ut[hn]=Ct,un[hn]=Ht,je[hn]=xn},ze=()=>yt.fill(null);let $e=256,et=[new Int32Array($e),new Int32Array($e),new Int32Array($e),new Int32Array($e)],[Tt,F,J,ne]=et,ye=new Uint8Array($e),xe=new Uint8Array($e);const qe=()=>{$e*=2,et=et.map(Ae=>{const Se=new Int32Array($e);return Se.set(Ae),Se}),[Tt,F,J,ne]=et;const he=new Uint8Array($e);he.set(ye),ye=he,xe=new Uint8Array($e)};let Ke=64,Xe=new Int32Array(Ke),Qe=new Int32Array(Ke);const lt=new Int32Array(s);let tt=2048,Et=21,ft=new Float64Array(tt),qt=new Int32Array(tt),Bt=0;const On=(he,Ae)=>{if(he===0&&Ae<s)return lt[Ae]===Bt?1:(lt[Ae]=Bt,0);const Se=he*2097152+Ae+1;let rt=Math.imul(Se,2654435761)>>>Et;for(;qt[rt]===Bt;){if(ft[rt]===Se)return 1;rt=rt+1&tt-1}return ft[rt]=Se,qt[rt]=Bt,0},Yt=(he,Ae,Se,rt,Ot)=>{if(Se-Ae>=2&&he.charCodeAt(Ae)===91&&he.charCodeAt(Se-1)===93){let Ct=-1;for(let Ht=Ae+1;Ht<Se-1;Ht++)if(he.charCodeAt(Ht)===58){Ct=Ht;break}return Ct===-1||Ct===Ae+1?ds:bt(an,he,Ae+1,Ct,0,wt)}if(rt>=0&&f[rt]>=0)return f[rt];for(let Ct=Ot-1;Ct>=0;Ct--){const Ht=Qe[Ct];if(Ht>Se)continue;const xn=Xe[Ct],hn=Se-Ht;if(Q[xn]===1&&hn>0&&hn<=$){const zn=he.charCodeAt(Ht);if(K===!1||zn!==91&&zn!==40){const ii=G(xn,he,Ht,Se);if(ii>=0)return ii}}const vt=g[xn];if(vt<0)continue;const Dt=x[vt],on=m[Dt],mt=m[Dt+1];if(on===mt)continue;ke(he,Ht,Se);const rr=H[vt]-on;for(let zn=on;zn<mt;zn++)if(Me(h[zn],he,Ht,Se))return S[rr+zn]}return ds},Vt=he=>{const Ae=he.length;let Se=0,rt=0,Ot=!1;(Nt>jt||dt.size>jt)&&(dt=new Map,gt=new Map,Nt=2,ze()),nn>We&&(an=new Map,nn=s,ze());let Ct=0;for(;Ct<Ae;){let vt=he.charCodeAt(Ct);if(vt===32||vt>=9&&vt<=13||vt>=160&&Ve(vt)){vt!==32&&(Ot=!0),Ct++;continue}const Dt=Ct;let on=0;for(;Ct<Ae;){if(vt=he.charCodeAt(Ct),vt<=32){if(vt===32)break;if(vt>=9&&vt<=13){Ot=!0;break}}else if(vt>=160&&Ve(vt)){Ot=!0;break}on=Math.imul(on^vt,16777619),Ct++}const mt=Ct,rr=mt-Dt;Se===$e&&qe();const zn=Se++;Tt[zn]=Dt,F[zn]=mt,rt+=rr,on^=Math.imul(rr,2654435761);const ii=on^on>>>15|0,Gn=ii&8190;{let rn=-1;if(xt[Gn]===ii&&yt[Gn]!==null&&yt[Gn].length===rr?rn=Gn:xt[Gn|1]===ii&&yt[Gn|1]!==null&&yt[Gn|1].length===rr&&(rn=Gn|1),rn>=0){const or=yt[rn];let Si=!0;for(let oi=0;oi<rr;oi++)if(or.charCodeAt(oi)!==he.charCodeAt(Dt+oi)){Si=!1;break}if(Si){J[zn]=Ut[rn],ne[zn]=un[rn],ye[zn]=je[rn];continue}}}let $n=Dt;if(W!==0){if(mt-Dt<=W||!he.startsWith(V,Dt)){J[zn]=ds,Ie(Gn,he,Dt,mt,ii,ds,0,0);continue}$n=Dt+W}let $o=0,bc=0,As=-1,Qo=-1;for(let rn=$n;rn<mt;rn++){const or=he.charCodeAt(rn);if($o===0&&bc===0){if(or===58){As=rn;continue}if(or===47){Qo=rn;continue}}or===91?$o++:or===93?$o--:or===40?bc++:or===41&&bc--}const Ad=As>=$n?As+1:$n;let Dn=Ad,Tr=mt,sa=!1,Xo=0;Tr>Dn&&he.charCodeAt(Tr-1)===33?(sa=!0,Tr--):Tr>Dn&&he.charCodeAt(Dn)===33&&(sa=!0,Dn++,Xo=1);let qr=-1;Qo>Ad&&(qr=Qo+Xo,qr>=Tr&&(qr=-1));let Zo=Dn;Tr-Dn>1&&he.charCodeAt(Dn)===45&&(Zo=Dn+1);let si=0,Pr=0,aa=0,xc=-1,ai=0;(g[0]>=0||Q[0]===1)&&(Xe[0]=0,Qe[0]=Zo,ai=1);let Ja=Ro,Sc=0;for(let rn=Zo;rn<Tr;rn++)if(rn===qr&&(Ja=Pr<aa?Ro:si,Sc=ai),si!==Ro){const or=he.charCodeAt(rn);let Si=-1;if(Pr<aa)u.charCodeAt(Pr)===or?(Pr++,Pr===aa&&(Si=si=xc)):si=Ro;else{const oi=o[si],to=o[si+1];let Ms=Ro;for(let yr=oi;yr<to;yr++){const no=l[yr];if(u.charCodeAt(no)===or){l[yr+1]-no===1?Si=Ms=d[yr]:(Pr=no+1,aa=l[yr+1],xc=d[yr],Ms=si);break}}si=Ms}if(Si>=0&&(g[Si]>=0||Q[Si]===1)&&rn+1<Tr&&he.charCodeAt(rn+1)===45){if(ai===Ke){Ke*=2;const oi=new Int32Array(Ke);oi.set(Xe),Xe=oi;const to=new Int32Array(Ke);to.set(Qe),Qe=to}Xe[ai]=Si,Qe[ai]=rn+2,ai++}}qr===Tr&&(Ja=Pr<aa?Ro:si,Sc=ai);const wc=Pr<aa?Ro:si;let mr,Lr=!1;if(qr>=0)if(Lr=!0,mr=Yt(he,Dn,qr,Ja,Sc),mr!==ds&&mr<s&&U[mr]){const rn=Yt(he,Dn,Tr,wc,ai);rn!==ds&&rn!==mr&&(mr=rn,Lr=!1)}else mr===ds&&(mr=Yt(he,Dn,Tr,wc,ai),Lr=!1);else mr=Yt(he,Dn,Tr,wc,ai);let Wa=0,eo=0;mr===ds?J[zn]=ds:(eo=Lr?1:0,Wa=$n>=As?sa?1:0:bt(dt,he,$n,As,sa?1:0,rn=>tn(rn,sa)),J[zn]=mr,ye[zn]=eo,ne[zn]=Wa),Ie(Gn,he,Dt,mt,ii,mr,Wa,eo)}if(Se===0)return"";if(Se===1)return Tt[0]===0&&F[0]===Ae?he:he.slice(Tt[0],F[0]);if(Se*B>tt){for(;Se*B>tt;)tt<<=1,Et--;ft=new Float64Array(tt),qt=new Int32Array(tt)}if(Nt>=Zt||nn>=Zt)throw new Error("cn: too many distinct classes in one merge");Bt=Bt+1|0,Bt===0&&(lt.fill(0),qt.fill(0),Bt=1);let Ht=!1;for(let vt=Se-1;vt>=0;vt--){const Dt=J[vt];if(Dt===ds){xe[vt]=1;continue}const on=ne[vt];if(On(on,Dt)===1){xe[vt]=0,Ht=!0;continue}if(xe[vt]=1,Dt<s){const mt=q[Dt];if(mt>=0)for(let rr=A[mt];rr<A[mt+1];rr++)On(on,N[rr]);if(ye[vt]&1)for(let rr=0;rr<j.length;rr++)j[rr]===Dt&&On(on,D[rr])}}if(!Ht&&!Ot&&Ae===rt+Se-1)return he;let xn="",hn=0;for(;hn<Se;){if(!xe[hn]){hn++;continue}const vt=Tt[hn];let Dt=F[hn],on=hn+1;for(;on<Se&&xe[on]&&Tt[on]===Dt+1&&he.charCodeAt(Dt)===32;)Dt=F[on],on++;xn.length>0&&(xn+=" "),xn+=he.slice(vt,Dt),hn=on}return xn},Rn=16384,Tn=new Int32Array(Rn*2);let ni=0,dn=1,fn=Object.create(null),An=Object.create(null),jn=new Map,Os=new Map,Ir=0,_i=0;const ri=()=>{ni^=Rn,dn=dn+1|0,_i=0},xi=he=>{let Ae=fn[he];if(Ae!==void 0)return Ae;const Se=Rh(he,0,he.length),rt=(Se&16383)+ni,Ot=Tn[rt]===(Se^dn)||Tn[rt^Rn]===(Se^dn-1);return Ot&&(Ae=An[he],Ae!==void 0)?(fn[he]=Ae,Ae):(Ae=Vt(he),Ot?(fn[he]=Ae,++Ir>oe&&(Ir=0,An=fn,fn=Object.create(null),ri())):(Tn[rt]=Se^dn,++_i>Rn&&ri()),Ae)},zt=he=>{let Ae=jn.get(he);if(Ae!==void 0)return Ae;const Se=Rh(he,0,he.length),rt=(Se&16383)+ni,Ot=Tn[rt]===(Se^dn)||Tn[rt^Rn]===(Se^dn-1);return Ot&&(Ae=Os.get(he),Ae!==void 0)?(jn.set(he,Ae),Ae):(Ae=Vt(he),Ot?(jn.set(he,Ae),++Ir>oe&&(Ir=0,Os=jn,jn=new Map,ri())):(Tn[rt]=Se^dn,++_i>Rn&&ri()),Ae)},qn=he=>{const Ae=Rh(he,0,he.length),Se=(Ae&16383)+ni;return Tn[Se]===(Ae^dn)||Tn[Se^Rn]===(Ae^dn-1)?!0:(Tn[Se]=Ae^dn,++_i>Rn&&ri(),!1)},Fn=oe===0?Vt:fP?he=>{const Ae=jn.get(he);return Ae!==void 0?Ae:zt(he)}:xi;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?Fn(arguments[0]):Fn(gP.apply(null,arguments))},mergeString:Fn,seenBefore:oe===0?()=>!1:qn,mergeUncached:Vt}},Qh=(e,t)=>{if(!e)return"";if(typeof e=="string")return e;let i="";if(typeof e.length=="number"&&(!t||Array.isArray(e))){const s=e;for(let o=0;o<s.length;o++){const l=s[o];if(!l)continue;const u=typeof l=="string"?l:Qh(l,t);u&&(i&&(i+=" "),i+=u)}return i}if(t){if(typeof e=="number")return""+e;if(typeof e=="object")for(const s in e)e[s]&&(i&&(i+=" "),i+=s)}return i},pP=(e,t)=>{let i="";for(let s=0;s<e.length;s++){const o=e[s];if(!o)continue;const l=typeof o=="string"?o:Qh(o,t);l&&(i&&(i+=" "),i+=l)}return i},gP=function(){return pP(arguments,!1)},mP=256,tE=16,yP=1024,cy=4096,vP=(e,t)=>{const i=t===void 0?()=>!0:t.seenBefore,s=t===void 0?e:t.mergeUncached;let o=new Map,l=new Map,u=0,d=null,f=null,g=[],m=[],h=0;const x=(C,O,k)=>{f===null&&(f=new Array(cy).fill(""),g=new Array(cy).fill(""),m=new Array(cy).fill(""));const A=Rh(C,0,C.length)&4094;if(f[A]===C&&g[A]===O)return m[A];if(f[A|1]===C&&g[A|1]===O)return m[A|1];const N=e(k?O+" "+C:C),j=f[A]===""?A:A|(f[A|1]===""?1:h++&1);return f[j]=C,g[j]=O,m[j]=N,N},S=(C,O,k,A)=>{let N=0;if(O){if(O!==C.a0)return!1;N=1}if(k){if(k!==(N===0?C.a0:C.a1))return!1;N++}if(A){if(A!==(N===0?C.a0:N===1?C.a1:C.a2))return!1;N++}return N===C.t},w=(C,O)=>{const k=C.a;let A=0;for(let N=0;N<O.length;N++){const j=O[N];if(j){if(j!==k[A])return!1;A++}}return A===C.t},R=(C,O)=>{const k=C.length,A=d===null?null:d.n;if(!O){if(A!==null&&w(A,C))return d=A,A.r;if(d!==null&&d!==A&&w(d,C))return d.r}let N="",j=-1,D=0,M=!1;for(let q=0;q<k;q++){let X=C[q];if(X){if(typeof X!="string"){if(X=C[q]=Qh(X,!0),!X)continue;M=!0}j<0&&(N=X,j=q),D++}}if(D===0)return"";if(D===1)return e(N);if(M){if(A!==null&&w(A,C))return d=A,A.r;if(d!==null&&d!==A&&w(d,C))return d.r}let _=o.get(N);_===void 0&&(_=l.get(N),_!==void 0&&o.set(N,_));let L=null;if(_!==void 0){if(_.skip>0){_.skip--,d=null;let X=N;for(let B=j+1;B<k;B++){const H=C[B];H&&(X+=" "+H)}return x(X,"",!1)}const q=_.e;e:for(let X=0;X<q.length;X++){const B=q[X];if(B.t!==D)continue;const H=B.a;let U=1;for(let z=j+1;z<k;z++){const Q=C[z];if(Q&&Q!==H[U++])continue e}L=B;break}L!==null&&(_.miss=0)}if(L===null){let q=N;const X=[N];for(let H=j+1;H<k;H++){const U=C[H];U&&(q+=" "+U,X.push(U))}if(!i(q))return s(q);L={r:e(q),t:X.length,a0:X[0],a1:X[1],a2:X[2]??"",a:X,n:null},_===void 0?o.set(N,_={e:[],miss:0,skip:0,at:0}):++_.miss>tE&&(_.miss=tE,_.skip=yP,_.e.length=0,_.at=0);const B=_.e;B.length<mP?B.push(L):(B[_.at]=L,_.at=_.at+1&255),++u>1e3&&(u=0,l=o,o=new Map)}return d!==null&&d!==L&&(d.n=L),d=L,L.r},E=C=>Array.isArray(C)?R(C.slice(),!1):e(Qh(C,!0));return function(C,O,k){const A=arguments.length;if((A|1)===3){const D=d;if(D!==null){const M=D.n;if(M!==null&&S(M,C,O,k))return d=M,M.r;if(D!==M&&S(D,C,O,k))return D.r}if(A===2&&typeof O=="string"&&O!==""){const M=o.get(C);if(M!==void 0&&M.skip>0)return M.skip--,d=null,x(O,C,!0)}return R([C,O,k],!0)}if(A===1)return typeof C=="string"?e(C):E(C);const N=d;if(N!==null){const D=N.n;if(D!==null){const M=D.a;let _=0,L=!0;for(let q=0;q<A;q++){const X=arguments[q];if(X){if(X!==M[_]){L=!1;break}_++}}if(L&&_===D.t)return d=D,D.r}if(N!==D){const M=N.a;let _=0,L=!0;for(let q=0;q<A;q++){const X=arguments[q];if(X){if(X!==M[_]){L=!1;break}_++}}if(L&&_===N.t)return N.r}}const j=[];for(let D=0;D<A;D++)j.push(arguments[D]);return R(j,!0)}},nE=hP(dP),Fe=vP(nE.mergeString,nE);function bP({delay:e=0,...t}){return v.jsx(B3,{"data-slot":"tooltip-provider",delay:e,...t})}function Xh({...e}){return v.jsx(b3,{"data-slot":"tooltip",...e})}function Zh({...e}){return v.jsx(E3,{"data-slot":"tooltip-trigger",...e})}function Jh({className:e,side:t="top",sideOffset:i=4,align:s="center",alignOffset:o=0,children:l,...u}){return v.jsx(T3,{children:v.jsx(U3,{align:s,alignOffset:o,side:t,sideOffset:i,className:"isolate z-50",children:v.jsxs(H3,{"data-slot":"tooltip-content",className:Fe("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),...u,children:[l,v.jsx(F3,{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 xP=(e,t,i,s,o,l,u,d)=>{let f=document.documentElement,g=["light","dark"];function m(S){(Array.isArray(e)?e:[e]).forEach(w=>{let R=w==="class",E=R&&l?o.map(C=>l[C]||C):o;R?(f.classList.remove(...E),f.classList.add(l&&l[S]?l[S]:S)):f.setAttribute(w,S)}),h(S)}function h(S){d&&g.includes(S)&&(f.style.colorScheme=S)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)m(s);else try{let S=localStorage.getItem(t)||i,w=u&&S==="system"?x():S;m(w)}catch{}},SP=b.createContext(void 0),wP={setTheme:e=>{},themes:[]},EP=()=>{var e;return(e=b.useContext(SP))!=null?e:wP};b.memo(({forcedTheme:e,storageKey:t,attribute:i,enableSystem:s,enableColorScheme:o,defaultTheme:l,value:u,themes:d,nonce:f,scriptProps:g})=>{let m=JSON.stringify([i,t,l,e,d,u,s,o]).slice(1,-1);return b.createElement("script",{...g,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${xP.toString()})(${m})`}})});function CP(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",t.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}const RP=e=>{switch(e){case"success":return OP;case"info":return MP;case"warning":return AP;case"error":return NP;default:return null}},TP=Array(12).fill(0),kP=({visible:e,className:t})=>Ne.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},Ne.createElement("div",{className:"sonner-spinner"},TP.map((i,s)=>Ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),OP=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"})),AP=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"})),MP=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"})),NP=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"})),DP=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"})),jP=()=>{const[e,t]=Ne.useState(document.hidden);return Ne.useEffect(()=>{const i=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",i),()=>document.removeEventListener("visibilitychange",i)},[]),e};let IP=1;const PP=100,rE=e=>{var t;return typeof e?.id=="number"||(e==null||(t=e.id)==null?void 0:t.length)>0?e.id:IP++};class LP{constructor(){this.subscribe=t=>(this.subscribers.push(t),this.getActiveToasts().forEach(i=>t(i)),()=>{const i=this.subscribers.indexOf(t);this.subscribers.splice(i,1)}),this.publish=t=>{this.subscribers.forEach(i=>i(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t],this.trimHistory()},this.trimHistory=()=>{let t=this.toasts.length-PP;t<=0||(this.toasts=this.toasts.filter(i=>t>0&&this.dismissedToasts.has(i.id)?(this.dismissedToasts.delete(i.id),t--,!1):!0))},this.create=t=>{const{message:i,...s}=t,o=rE(t),l=this.pendingDismissals.get(o);l!==void 0&&(cancelAnimationFrame(l),this.pendingDismissals.delete(o),this.dismissedToasts.delete(o));const u=this.dismissedToasts.has(o),d=t.dismissible===void 0?!0:t.dismissible;return u&&(this.dismissedToasts.delete(o),this.toasts=this.toasts.filter(g=>g.id!==o)),(u?void 0:this.toasts.find(g=>g.id===o))?this.toasts=this.toasts.map(g=>g.id===o?(this.publish({...g,...t,id:o,title:i}),{...g,...t,id:o,dismissible:d,title:i}):g):this.addToast({title:i,...s,dismissible:d,id:o}),o},this.dismiss=t=>{if(t==null)return this.getActiveToasts().forEach(s=>{this.dismissedToasts.add(s.id),this.subscribers.forEach(o=>o({id:s.id,dismiss:!0}))}),t;this.dismissedToasts.add(t);const i=this.pendingDismissals.get(t);return i!==void 0&&cancelAnimationFrame(i),this.pendingDismissals.set(t,requestAnimationFrame(()=>{this.pendingDismissals.delete(t),this.subscribers.forEach(s=>s({id:t,dismiss:!0}))})),t},this.message=(t,i)=>this.create({...i,message:t,type:void 0}),this.error=(t,i)=>this.create({...i,message:t,type:"error"}),this.success=(t,i)=>this.create({...i,type:"success",message:t}),this.info=(t,i)=>this.create({...i,type:"info",message:t}),this.warning=(t,i)=>this.create({...i,type:"warning",message:t}),this.loading=(t,i)=>this.create({...i,type:"loading",message:t}),this.promise=(t,i)=>{if(!i)return;let s;i.loading!==void 0&&(s=this.create({...i,promise:t,type:"loading",message:i.loading,description:typeof i.description!="function"?i.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=s!==void 0,u;const d=o.then(async g=>{if(u=["resolve",g],Ne.isValidElement(g))l=!1,this.create({id:s,type:"default",message:g});else if(_P(g)&&!g.ok){l=!1;const h=typeof i.error=="function"?await i.error(`HTTP error! status: ${g.status}`):i.error,x=typeof i.description=="function"?await i.description(`HTTP error! status: ${g.status}`):i.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:s,type:"error",description:x,...w})}else if(g instanceof Error){l=!1;const h=typeof i.error=="function"?await i.error(g):i.error,x=typeof i.description=="function"?await i.description(g):i.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:s,type:"error",description:x,...w})}else if(i.success!==void 0){l=!1;const h=typeof i.success=="function"?await i.success(g):i.success,x=typeof i.description=="function"?await i.description(g):i.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:s,type:"success",description:x,...w})}}).catch(async g=>{if(u=["reject",g],i.error!==void 0){l=!1;const m=typeof i.error=="function"?await i.error(g):i.error,h=typeof i.description=="function"?await i.description(g):i.description,S=typeof m=="object"&&!Ne.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:h,...S})}}).finally(()=>{l&&(this.dismiss(s),s=void 0),i.finally==null||i.finally.call(i)}),f=()=>new Promise((g,m)=>d.then(()=>u[0]==="reject"?m(u[1]):g(u[1])).catch(m));return typeof s!="string"&&typeof s!="number"?{unwrap:f}:Object.assign(s,{unwrap:f})},this.custom=(t,i)=>{const s=rE(i);return this.create({...i,jsx:t(s),id:s,type:void 0}),s},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Zr=new LP,zP=(e,t)=>Zr.message(e,t),_P=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",UP=zP,HP=()=>Zr.toasts,FP=()=>Zr.getActiveToasts(),Ft=Object.assign(UP,{success:Zr.success,info:Zr.info,warning:Zr.warning,error:Zr.error,custom:Zr.custom,message:Zr.message,promise:Zr.promise,dismiss:Zr.dismiss,loading:Zr.loading},{getHistory:HP,getToasts:FP});CP("[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 ih(e){return e.label!==void 0}const BP=3,VP="24px",KP="16px",iE=4e3,qP=356,YP=14,GP=45,$P=200;function fs(...e){return e.filter(Boolean).join(" ")}function QP(e){const[t,i]=e.split("-"),s=[];return t&&s.push(t),i&&s.push(i),s}const XP=e=>{var t,i,s,o,l,u,d,f,g;const{invert:m,toast:h,unstyled:x,interacting:S,setHeights:w,visibleToasts:R,heights:E,index:C,toasts:O,expanded:k,removeToast:A,defaultRichColors:N,closeButton:j,style:D,cancelButtonStyle:M,actionButtonStyle:_,className:L="",descriptionClassName:q="",duration:X,position:B,gap:H,expandByDefault:U,classNames:z,icons:Q,closeButtonAriaLabel:$="Close toast"}=e,[K,Y]=Ne.useState(null),[ee,G]=Ne.useState(null),[oe,I]=Ne.useState(!1),[V,W]=Ne.useState(!1),[re,Ee]=Ne.useState(!1),[le,me]=Ne.useState(!1),[ge,ue]=Ne.useState(!1),[Te,ve]=Ne.useState(0),[Pe,Oe]=Ne.useState(0),Le=Ne.useRef(h.duration||X||iE),Ve=Ne.useRef(null),ke=Ne.useRef(null),Ue=C===0,be=C+1<=R,He=h.type,Ze=He??"default",ot=h.dismissible!==!1,de=h.className||"",we=h.descriptionClassName||"",Ge=Ne.useMemo(()=>E.findIndex(je=>je.toastId===h.id)||0,[E,h.id]),Me=Ne.useMemo(()=>{var je;return(je=h.closeButton)!=null?je:j},[h.closeButton,j]),De=Ne.useMemo(()=>h.duration||X||iE,[h.duration,X]),bt=Ne.useRef(0),dt=Ne.useRef(0),gt=Ne.useRef(0),Nt=Ne.useRef(null),[jt,tn]=B.split("-"),an=Ne.useMemo(()=>E.reduce((je,at,Ie)=>Ie>=Ge?je:je+at.height,0),[E,Ge]),nn=jP(),We=Ne.useMemo(()=>{var je;return(je=e.swipeDirections)!=null?je:QP(B)},[e.swipeDirections,B]),wt=h.invert||m,Zt=He==="loading";dt.current=Ne.useMemo(()=>Ge*H+an,[Ge,an]),Ne.useEffect(()=>{Le.current=De},[De]),Ne.useEffect(()=>{I(!0)},[]),Ne.useEffect(()=>{const je=ke.current;if(je){const at=je.getBoundingClientRect().height;return Oe(at),w(Ie=>[{toastId:h.id,height:at,position:h.position},...Ie]),()=>w(Ie=>Ie.filter(ze=>ze.toastId!==h.id))}},[w,h.id]),Ne.useLayoutEffect(()=>{if(!oe)return;const je=ke.current,at=je.style.height;je.style.height="auto";const Ie=je.getBoundingClientRect().height;je.style.height=at,Oe(Ie),w(ze=>ze.find(et=>et.toastId===h.id)?ze.map(et=>et.toastId===h.id?{...et,height:Ie}:et):[{toastId:h.id,height:Ie,position:h.position},...ze])},[oe,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ht=Ne.useCallback(()=>{W(!0),ve(dt.current),w(je=>je.filter(at=>at.toastId!==h.id)),setTimeout(()=>{A(h)},$P)},[h,A,w,dt]);Ne.useEffect(()=>{if(h.promise&&He==="loading"||h.duration===1/0||h.type==="loading")return;let je;return k||S||nn?(()=>{if(gt.current<bt.current){const ze=new Date().getTime()-bt.current;Le.current=Le.current-ze}gt.current=new Date().getTime()})():Le.current!==1/0&&(bt.current=new Date().getTime(),je=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ht()},Le.current)),()=>clearTimeout(je)},[k,S,h,He,nn,ht]),Ne.useEffect(()=>{h.delete&&(ht(),h.onDismiss==null||h.onDismiss.call(h,h))},[ht,h.delete]);function xt(){var je;if(Q?.loading){var at;return Ne.createElement("div",{className:fs(z?.loader,h==null||(at=h.classNames)==null?void 0:at.loader,"sonner-loader"),"data-visible":He==="loading"},Q.loading)}return Ne.createElement(kP,{className:fs(z?.loader,h==null||(je=h.classNames)==null?void 0:je.loader),visible:He==="loading"})}const yt=h.icon||Q?.[He]||RP(He);var Ut,un;return Ne.createElement("li",{tabIndex:0,ref:ke,className:fs(L,de,z?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,z?.[Ze],h==null||(i=h.classNames)==null?void 0:i[Ze]),"data-sonner-toast":"","data-rich-colors":(Ut=h.richColors)!=null?Ut:N,"data-styled":!(h.jsx||h.unstyled||x),"data-mounted":oe,"data-promise":!!h.promise,"data-swiped":ge,"data-removed":V,"data-visible":be,"data-y-position":jt,"data-x-position":tn,"data-index":C,"data-front":Ue,"data-swiping":re,"data-dismissible":ot,"data-type":He,"data-invert":wt,"data-swipe-out":le,"data-swipe-direction":ee,"data-expanded":!!(k||U&&oe),"data-testid":h.testId,style:{"--index":C,"--toasts-before":C,"--z-index":O.length-C,"--offset":`${V?Te:dt.current}px`,"--initial-height":U?"auto":`${Pe}px`,...D,...h.style},onDragEnd:()=>{Ee(!1),Y(null),Nt.current=null},onPointerDown:je=>{je.button!==2&&(Zt||!ot||(Ve.current=new Date,ve(dt.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(Ee(!0),Nt.current={x:je.clientX,y:je.clientY})))},onPointerUp:()=>{var je,at,Ie;if(le||!ot)return;Nt.current=null;const ze=Number(((je=ke.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$e=Number(((at=ke.current)==null?void 0:at.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((Ie=Ve.current)==null?void 0:Ie.getTime()),Tt=K==="x"?ze:$e,F=Math.abs(Tt)/et;if((K==="x"?We.includes(ze>0?"right":"left"):We.includes($e>0?"bottom":"top"))&&(Math.abs(Tt)>=GP||F>.11)){ve(dt.current),h.onDismiss==null||h.onDismiss.call(h,h),G(K==="x"?ze>0?"right":"left":$e>0?"down":"up"),ht(),me(!0);return}else{var ne,ye;(ne=ke.current)==null||ne.style.setProperty("--swipe-amount-x","0px"),(ye=ke.current)==null||ye.style.setProperty("--swipe-amount-y","0px")}ue(!1),Ee(!1),Y(null)},onPointerMove:je=>{var at,Ie,ze;if(!Nt.current||!ot||((at=window.getSelection())==null?void 0:at.toString().length)>0)return;const et=je.clientY-Nt.current.y,Tt=je.clientX-Nt.current.x;!K&&(Math.abs(Tt)>1||Math.abs(et)>1)&&Y(Math.abs(Tt)>Math.abs(et)?"x":"y");let F={x:0,y:0};const J=ne=>1/(1.5+Math.abs(ne)/20);if(K==="y"){if(We.includes("top")||We.includes("bottom"))if(We.includes("top")&&et<0||We.includes("bottom")&&et>0)F.y=et;else{const ne=et*J(et);F.y=Math.abs(ne)<Math.abs(et)?ne:et}}else if(K==="x"&&(We.includes("left")||We.includes("right")))if(We.includes("left")&&Tt<0||We.includes("right")&&Tt>0)F.x=Tt;else{const ne=Tt*J(Tt);F.x=Math.abs(ne)<Math.abs(Tt)?ne:Tt}(Math.abs(F.x)>0||Math.abs(F.y)>0)&&ue(!0),(Ie=ke.current)==null||Ie.style.setProperty("--swipe-amount-x",`${F.x}px`),(ze=ke.current)==null||ze.style.setProperty("--swipe-amount-y",`${F.y}px`)}},Me&&!h.jsx&&He!=="loading"?Ne.createElement("button",{"aria-label":$,"data-disabled":Zt,"data-close-button":!0,onClick:Zt||!ot?()=>{}:()=>{ht(),h.onDismiss==null||h.onDismiss.call(h,h)},className:fs(z?.closeButton,h==null||(s=h.classNames)==null?void 0:s.closeButton)},(un=Q?.close)!=null?un:DP):null,(He||h.icon||h.promise)&&h.icon!==null&&(Q?.[He]!==null||h.icon)?Ne.createElement("div",{"data-icon":"",className:fs(z?.icon,h==null||(o=h.classNames)==null?void 0:o.icon)},He==="loading"?h.icon||xt():h.promise?xt():null,He!=="loading"?yt:null):null,Ne.createElement("div",{"data-content":"",className:fs(z?.content,h==null||(l=h.classNames)==null?void 0:l.content)},Ne.createElement("div",{"data-title":"",className:fs(z?.title,h==null||(u=h.classNames)==null?void 0:u.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?Ne.createElement("div",{"data-description":"",className:fs(q,we,z?.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&&ih(h.cancel)?Ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||M,onClick:je=>{ih(h.cancel)&&ot&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,je),ht())},className:fs(z?.cancelButton,h==null||(f=h.classNames)==null?void 0:f.cancelButton)},h.cancel.label):null,Ne.isValidElement(h.action)?h.action:h.action&&ih(h.action)?Ne.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||_,onClick:je=>{ih(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,je),!je.defaultPrevented&&ht())},className:fs(z?.actionButton,h==null||(g=h.classNames)==null?void 0:g.actionButton)},h.action.label):null)};function sE(){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 ZP(e,t){const i={};return[e,t].forEach((s,o)=>{const l=o===1,u=l?"--mobile-offset":"--offset",d=l?KP:VP;function f(g){["top","right","bottom","left"].forEach(m=>{i[`${u}-${m}`]=typeof g=="number"?`${g}px`:g})}typeof s=="number"||typeof s=="string"?f(s):typeof s=="object"?["top","right","bottom","left"].forEach(g=>{s[g]===void 0?i[`${u}-${g}`]=d:i[`${u}-${g}`]=typeof s[g]=="number"?`${s[g]}px`:s[g]}):f(d)}),i}const JP=Ne.forwardRef(function(t,i){const{id:s,invert:o,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:g,offset:m,mobileOffset:h,theme:x="light",richColors:S,duration:w,style:R,visibleToasts:E=BP,toastOptions:C,dir:O=sE(),gap:k=YP,icons:A,customAriaLabel:N,containerAriaLabel:j="Notifications"}=t,[D,M]=Ne.useState([]),_=Ne.useMemo(()=>s?D.filter(I=>I.toasterId===s):D.filter(I=>!I.toasterId),[D,s]),L=Ne.useMemo(()=>Array.from(new Set([l].concat(_.filter(I=>I.position).map(I=>I.position)))),[_,l]),[q,X]=Ne.useState([]),[B,H]=Ne.useState(!1),[U,z]=Ne.useState(!1),[Q,$]=Ne.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),K=Ne.useRef(null),Y=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=Ne.useRef(null),G=Ne.useRef(!1),oe=Ne.useCallback(I=>{M(V=>{var W;return(W=V.find(re=>re.id===I.id))!=null&&W.delete||Zr.dismiss(I.id),V.filter(({id:re})=>re!==I.id)})},[]);return Ne.useEffect(()=>Zr.subscribe(I=>{if(I.dismiss){requestAnimationFrame(()=>{M(V=>V.map(W=>W.id===I.id?{...W,delete:!0}:W))});return}setTimeout(()=>{H4.flushSync(()=>{M(V=>{const W=V.findIndex(re=>re.id===I.id);return W!==-1?[...V.slice(0,W),{...V[W],...I},...V.slice(W+1)]:[I,...V]})})})}),[]),Ne.useEffect(()=>{if(x!=="system"){$(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const I=window.matchMedia("(prefers-color-scheme: dark)");try{I.addEventListener("change",({matches:V})=>{$(V?"dark":"light")})}catch{I.addListener(({matches:W})=>{try{$(W?"dark":"light")}catch(re){console.error(re)}})}},[x]),Ne.useEffect(()=>{D.length<=1&&H(!1)},[D]),Ne.useEffect(()=>{const I=V=>{var W;if(u.length>0&&u.every(le=>V[le]||V.code===le)){var Ee;H(!0),(Ee=K.current)==null||Ee.focus()}V.code==="Escape"&&(document.activeElement===K.current||(W=K.current)!=null&&W.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[u]),Ne.useEffect(()=>{if(K.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,G.current=!1)}},[K.current]),Ne.createElement("section",{ref:i,"aria-label":N??`${j} ${Y}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},L.map((I,V)=>{var W;const[re,Ee]=I.split("-");return _.length?Ne.createElement("ol",{key:I,dir:O==="auto"?sE():O,tabIndex:-1,ref:K,className:g,"data-sonner-toaster":!0,"data-sonner-theme":Q,"data-y-position":re,"data-x-position":Ee,style:{"--front-toast-height":`${((W=q[0])==null?void 0:W.height)||0}px`,"--width":`${qP}px`,"--gap":`${k}px`,...R,...ZP(m,h)},onBlur:le=>{G.current&&!le.currentTarget.contains(le.relatedTarget)&&(G.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||G.current||(G.current=!0,ee.current=le.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{U||H(!1)},onDragEnd:()=>H(!1),onPointerDown:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},_.filter(le=>!le.position&&V===0||le.position===I).map((le,me)=>{var ge,ue;return Ne.createElement(XP,{key:le.id,icons:A,index:me,toast:le,defaultRichColors:S,duration:(ge=C?.duration)!=null?ge:w,className:C?.className,descriptionClassName:C?.descriptionClassName,invert:o,visibleToasts:E,closeButton:(ue=C?.closeButton)!=null?ue:f,interacting:U,position:I,style:C?.style,unstyled:C?.unstyled,classNames:C?.classNames,cancelButtonStyle:C?.cancelButtonStyle,actionButtonStyle:C?.actionButtonStyle,closeButtonAriaLabel:C?.closeButtonAriaLabel,removeToast:oe,toasts:_.filter(Te=>Te.position==le.position),heights:q.filter(Te=>Te.position==le.position),setHeights:X,expandByDefault:d,gap:k,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),WP=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join("-").toLowerCase();function eL(e,t,i=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:WP(e),size:24,node:t,...i.length>0?{aliases:i}:{}}}const tL=e=>{let t="",i=!1;for(const s of e){if(s==="-"||s==="_"||s<=" "){i=t.length>0;continue}t.length===0?t+=s.toLowerCase():t+=i?s.toUpperCase():s,i=!1}return t},nL=e=>{const t=tL(e);return t.charAt(0).toUpperCase()+t.slice(1)},Fy=(...e)=>{const t=new Set;for(const i of e)if(typeof i=="string")for(const s of i.split(/\s+/))s&&t.add(s);return[...t].join(" ")},jl={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 uy(e){return e!=null}function rL(e,t={}){const i=t.attributeNames??{},s=x=>i[x]??x,o=e.size??e.width??jl.width,l=e.size??e.height??jl.height,u=e.aliases?.filter(x=>typeof x=="string"&&x.trim()!=="").map(x=>`lucide-${x}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...u],f=t.className?.split(" ").filter(Boolean)??[],g=t.includeDefaultClasses===!1?Fy(...f):Fy("lucide",...d,...f);let m=t.strokeWidth??jl["stroke-width"];if(t.absoluteStrokeWidth){const x=Number(m)*Number(e.size??e.width??jl.width)/Number(t.size??t.width??jl.width);Number.isFinite(x)&&(m=x)}return["svg",{...Object.entries(jl).reduce((x,[S,w])=>(x[s(S)]=w,x),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&uy(t.size)&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&uy(t.width)&&{[s("width")]:t.width},..."height"in t&&uy(t.height)&&{[s("height")]:t.height},[s("stroke-width")]:m,...g&&{[s("class")]:g},[s("viewBox")]:`0 0 ${o} ${l}`,...t.hasA11yProp===!1?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(x=>{const[S,w,R]=x,E=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...w}:w;return R?[S,E,R]:[S,E]})]}function iL(e,t={}){return rL(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const sL=e=>{if(e==null||typeof e!="object")return!1;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(t.startsWith("aria-")||t==="role"||t==="title")&&e[t]!=null)return!0;return!1},aL=b.createContext({}),oL=()=>b.useContext(aL),lL=b.forwardRef(({color:e,size:t,width:i,height:s,strokeWidth:o,absoluteStrokeWidth:l,nonScalingStroke:u,className:d="",children:f,iconNode:g=[],icon:m={node:g,aliases:[],size:24},...h},x)=>{const{size:S=24,strokeWidth:w=2,absoluteStrokeWidth:R=!1,nonScalingStroke:E=!1,color:C="currentColor",className:O=""}=oL()??{},k=!!f||sL(h),[A,N,j=[]]=iL(m,{color:e??C,width:i??t??S,height:s??t??S,strokeWidth:o??w,absoluteStrokeWidth:l??R,nonScalingStroke:u??E,className:Fy(O,d),hasA11yProp:k,attributes:h});return b.createElement(A,{ref:x,...N},[...j.map(([D,M])=>b.createElement(D,M)),...Array.isArray(f)?f:[f]])});function At(e,t=[],i=[]){const s=typeof e=="string"?eL(e,t,i):e,o=b.forwardRef(({className:l,...u},d)=>b.createElement(lL,{ref:d,icon:s,className:l,...u}));return s.name&&(o.displayName=nL(s.name)),o}const cT={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};cT.node;const cL=At(cT),uT={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"}]]};uT.node;const dT=At(uT),fT={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};fT.node;const ld=At(fT),hT={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};hT.node;const Zv=At(hT),pT={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};pT.node;const Jv=At(pT),gT={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};gT.node;const uL=At(gT),mT={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"]};mT.node;const yT=At(mT),vT={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"]};vT.node;const dL=At(vT),bT={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};bT.node;const fL=At(bT),xT={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"}]]};xT.node;const ST=At(xT),wT={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"}]]};wT.node;const Zp=At(wT),ET={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};ET.node;const Wv=At(ET),CT={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"}]]};CT.node;const hL=At(CT),RT={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"}]]};RT.node;const pL=At(RT),TT={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"}]]};TT.node;const kT=At(TT),OT={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"}]]};OT.node;const AT=At(OT),MT={name:"file-plus",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:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]};MT.node;const gL=At(MT),NT={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"}]]};NT.node;const eb=At(NT),DT={name:"files",size:24,node:[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]};DT.node;const mL=At(DT),jT={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"}]]};jT.node;const IT=At(jT),PT={name:"folder-plus",size:24,node:[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};PT.node;const yL=At(PT),LT={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};LT.node;const zT=At(LT),_T={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"}]]};_T.node;const tb=At(_T),UT={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"}]]};UT.node;const vL=At(UT),HT={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"}]]};HT.node;const bL=At(HT),FT={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"}]]};FT.node;const xL=At(FT),BT={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"}]]};BT.node;const SL=At(BT),VT={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};VT.node;const wL=At(VT),KT={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};KT.node;const Vr=At(KT),qT={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"}]]};qT.node;const EL=At(qT),YT={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};YT.node;const CL=At(YT),GT={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"]};GT.node;const RL=At(GT),$T={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"}]]};$T.node;const TL=At($T),QT={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"]};QT.node;const kL=At(QT),XT={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"}]]};XT.node;const ZT=At(XT),JT={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};JT.node;const lc=At(JT),WT={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"}]]};WT.node;const OL=At(WT),ek={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"}]]};ek.node;const tk=At(ek),nk={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"}]]};nk.node;const nb=At(nk),rk={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"}]]};rk.node;const AL=At(rk),ik={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"}]]};ik.node;const sk=At(ik),ak={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};ak.node;const ML=At(ak),ok={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"]};ok.node;const rb=At(ok),lk={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"]};lk.node;const ib=At(lk),ck={name:"user-round-plus",size:24,node:[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M22 19h-6",key:"vcuq98"}]],aliases:["user-plus-2"]};ck.node;const uk=At(ck),dk={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};dk.node;const By=At(dk),fk={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};fk.node;const ta=At(fk),NL=({...e})=>{const{theme:t="system"}=EP();return v.jsx(JP,{theme:t,className:"toaster group",icons:{success:v.jsx(yT,{className:"size-4"}),info:v.jsx(vL,{className:"size-4"}),warning:v.jsx(ib,{className:"size-4"}),error:v.jsx(RL,{className:"size-4"}),loading:v.jsx(Vr,{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})},Rt=e=>typeof e=="string",gu=()=>{let e,t;const i=new Promise((s,o)=>{e=s,t=o});return i.resolve=e,i.reject=t,i},sh=e=>e==null?"":String(e),DL=(e,t,i)=>{e.forEach(s=>{t[s]&&(i[s]=t[s])})},jL=/###/g,aE=e=>e&&e.includes("###")?e.replace(jL,"."):e,oE=e=>!e||Rt(e),ku=(e,t,i)=>{const s=Rt(t)?t.split("."):t;let o=0;for(;o<s.length-1;){if(oE(e))return{};const l=aE(s[o]);!e[l]&&i&&(e[l]=new i),Object.prototype.hasOwnProperty.call(e,l)?e=e[l]:e={},++o}return oE(e)?{}:{obj:e,k:aE(s[o])}},lE=(e,t,i)=>{const{obj:s,k:o}=ku(e,t,Object);if(s!==void 0||t.length===1){s[o]=i;return}let l=t[t.length-1],u=t.slice(0,t.length-1),d=ku(e,u,Object);for(;d.obj===void 0&&u.length;)l=`${u[u.length-1]}.${l}`,u=u.slice(0,u.length-1),d=ku(e,u,Object),d?.obj&&typeof d.obj[`${d.k}.${l}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${l}`]=i},IL=(e,t,i,s)=>{const{obj:o,k:l}=ku(e,t,Object);o[l]=o[l]||[],o[l].push(i)},Wh=(e,t)=>{const{obj:i,k:s}=ku(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s]},PL=(e,t,i)=>{const s=Wh(e,i);return s!==void 0?s:Wh(t,i)},hk=(e,t,i)=>{for(const s in t)s!=="__proto__"&&s!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,s)?Rt(e[s])||e[s]instanceof String||Rt(t[s])||t[s]instanceof String?i&&(e[s]=t[s]):hk(e[s],t[s],i):e[s]=t[s]);return e},Vs=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),LL={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},zL=e=>Rt(e)?e.replace(/[&<>"'\/]/g,t=>LL[t]):e;class _L{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const i=this.regExpMap.get(t);if(i!==void 0)return i;const s=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,s),this.regExpQueue.push(t),s}}const UL=[" ",",","?","!",";"],HL=new _L(20),FL=(e,t,i)=>{t=t||"",i=i||"";const s=UL.filter(u=>!t.includes(u)&&!i.includes(u));if(s.length===0)return!0;const o=HL.getRegExp(`(${s.map(u=>u==="?"?"\\?":u).join("|")})`);let l=!o.test(e);if(!l){const u=e.indexOf(i);u>0&&!o.test(e.substring(0,u))&&(l=!0)}return l},Vy=(e,t,i=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const s=t.split(i);let o=e;for(let l=0;l<s.length;){if(!o||typeof o!="object")return;let u,d="";for(let f=l;f<s.length;++f)if(f!==l&&(d+=i),d+=s[f],u=o[d],(typeof u=="function"||d==="__proto__")&&!Object.prototype.hasOwnProperty.call(o,d)&&(u=void 0),u!==void 0){if(["string","number","boolean"].includes(typeof u)&&f<s.length-1)continue;l+=f-l+1;break}o=u}return o},rc=e=>e?.replace(/_/g,"-"),BL={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class ep{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||BL,this.options=i,this.debug=i.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,i,s,o){return o&&!this.debug?null:(t=t.map(l=>Rt(l)?l.replace(/[\r\n\x00-\x1F\x7F]/g," "):l),Rt(t[0])&&(t[0]=`${s}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new ep(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ep(this.logger,t)}}var ms=new ep;class Jp{constructor(){this.observers={}}on(t,i){return t.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const o=this.observers[s].get(i)||0;this.observers[s].set(i,o+1)}),this}off(t,i){if(this.observers[t]){if(!i){delete this.observers[t];return}this.observers[t].delete(i)}}once(t,i){const s=(...o)=>{i(...o),this.off(t,s)};return this.on(t,s),this}emit(t,...i){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([o,l])=>{for(let u=0;u<l;u++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,l])=>{for(let u=0;u<l;u++)o(t,...i)})}}const cE=new WeakSet;class uE extends Jp{constructor(t,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const i=this.options.ns.indexOf(t);i>-1&&this.options.ns.splice(i,1)}getResource(t,i,s,o={}){const l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;t.includes(".")?d=t.split("."):(d=[t,i],s&&(Array.isArray(s)?d.push(...s):Rt(s)&&l?d.push(...s.split(l)):d.push(s)));const f=Wh(this.data,d);return f==null&&!i&&!s&&t.includes(".")&&(t=d[0],i=d[1],s=d.slice(2).join(".")),f!=null||!u||!Rt(s)?f:Vy(this.data?.[t]?.[i],s,l)}addResource(t,i,s,o,l={silent:!1}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let d=[t,i];s&&(d=d.concat(u?s.split(u):s)),t.includes(".")&&(d=t.split("."),o=i,i=d[1]),this.addNamespaces(i),lE(this.data,d,o),l.silent||this.emit("added",t,i,s,o)}addResources(t,i,s,o={silent:!1}){for(const l in s)(Rt(s[l])||Array.isArray(s[l]))&&this.addResource(t,i,l,s[l],{silent:!0});o.silent||this.emit("added",t,i,s)}addResourceBundle(t,i,s,o,l,u={silent:!1,skipCopy:!1}){let d=[t,i];t.includes(".")&&(d=t.split("."),o=s,s=i,i=d[1]),this.addNamespaces(i);let f=Wh(this.data,d)||{};u.skipCopy||(s=JSON.parse(JSON.stringify(s))),o?hk(f,s,l):f={...f,...s},lE(this.data,d,f),u.silent||this.emit("added",t,i,s)}removeResourceBundle(t,i){this.hasResourceBundle(t,i)&&delete this.data[t][i],this.removeNamespaces(i),this.emit("removed",t,i)}hasResourceBundle(t,i){return this.getResource(t,i)!==void 0}getResourceBundle(t,i){return i||(i=this.options.defaultNS),this.getResource(t,i)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const i=this.getDataByLanguage(t);return!!(i&&Object.keys(i)||[]).find(o=>{const l=i[o];return cE.has(l)?!0:!l||Object.keys(l).length===0?!1:(typeof l=="object"&&cE.add(l),!0)})}toJSON(){return this.data}}var pk={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,s,o){return e.forEach(l=>{t=this.processors[l]?.process(t,i,s,o)??t}),t}};const gk=Symbol("i18next/PATH_KEY");function VL(){const e=[],t=Object.create(null);let i;return t.get=(s,o)=>(i?.revoke?.(),o===gk?e:(e.push(o),i=Proxy.revocable(s,t),i.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ha(e,t){const{[gk]:i}=e(VL()),s=t?.keySeparator??".",o=t?.nsSeparator??":",l=t?.enableSelector==="strict";if(i.length>1&&o){const u=t?.ns,d=l?Array.isArray(u)?u:u?[u]:null:Array.isArray(u)?u:null;if(d&&(l?d:d.length>1?d.slice(1):[]).includes(i[0]))return`${i[0]}${o}${i.slice(1).join(s)}`}return i.join(s)}const dy=e=>!Rt(e)&&typeof e!="boolean"&&typeof e!="number";class tp extends Jp{constructor(t,i={}){super(),DL(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ms.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const s={...i};if(t==null)return!1;const o=this.resolve(t,s);if(o?.res===void 0)return!1;const l=dy(o.res);return!(s.returnObjects===!1&&l)}extractFromKey(t,i){let s=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let l=i.ns||this.options.defaultNS||[];const u=s&&t.includes(s),d=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!FL(t,s,o);if(u&&!d){const f=t.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:t,namespaces:Rt(l)?[l]:l};const g=t.split(s);(s!==o||s===o&&this.options.ns.includes(g[0]))&&(l=g.shift()),t=g.join(o)}return{key:t,namespaces:Rt(l)?[l]:l}}translate(t,i,s){let o=typeof i=="object"?{...i}:i;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),t==null)return"";typeof t=="function"&&(t=Ha(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(B=>typeof B=="function"?Ha(B,{...this.options,...o}):String(B));const l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:d,namespaces:f}=this.extractFromKey(t[t.length-1],o),g=f[f.length-1];let m=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;m===void 0&&(m=":");const h=o.lng||this.language,x=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return x?l?{res:`${g}${m}${d}`,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(o)}:`${g}${m}${d}`:l?{res:d,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(o)}:d;const S=this.resolve(t,o);let w=S?.res;const R=S?.usedKey||d,E=S?.exactUsedKey||d,C=["[object Number]","[object Function]","[object RegExp]"],O=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,A=o.count!==void 0&&!Rt(o.count),N=tp.hasDefaultValue(o),j=A?this.pluralResolver.getSuffix(h,o.count,o):"",D=o.ordinal&&A?this.pluralResolver.getSuffix(h,o.count,{ordinal:!1}):"",M=A&&!o.ordinal&&o.count===0,_=M&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${j}`]||o[`defaultValue${D}`]||o.defaultValue;let L=w;k&&!w&&N&&(L=_);const q=dy(L),X=Object.prototype.toString.apply(L);if(k&&L&&q&&!C.includes(X)&&!(Rt(O)&&Array.isArray(L))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(R,L,{...o,ns:f}):`key '${d} (${this.language})' returned an object instead of string.`;return l?(S.res=B,S.usedParams=this.getUsedParamsDetails(o),S):B}if(u){const B=Array.isArray(L),H=B?[]:{},U=B?E:R;for(const z in L)if(Object.prototype.hasOwnProperty.call(L,z)){const Q=`${U}${u}${z}`;N&&!w?H[z]=this.translate(Q,{...o,defaultValue:dy(_)?_[z]:void 0,joinArrays:!1,ns:f}):H[z]=this.translate(Q,{...o,joinArrays:!1,ns:f}),H[z]===Q&&(H[z]=L[z])}w=H}}else if(k&&Rt(O)&&Array.isArray(w))w=w.join(O),w&&(w=this.extendTranslation(w,t,o,S,s));else{let B=!1,H=!1;!this.isValidLookup(w)&&N&&(B=!0,w=_),this.isValidLookup(w)||(H=!0,w=d);const z=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:w,Q=N&&_!==w&&this.options.updateMissing;if(H||B||Q){if(this.logger.log(Q?"updateKey":"missingKey",h,g,A&&!Q?`${d}${this.pluralResolver.getSuffix(h,o.count,o)}`:d,Q?_:w),u){const ee=this.resolve(d,{...o,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 $=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let ee=0;ee<K.length;ee++)$.push(K[ee]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(o.lng||this.language):$.push(o.lng||this.language);const Y=(ee,G,oe)=>{const I=N&&oe!==w?oe:z;this.options.missingKeyHandler?this.options.missingKeyHandler(ee,g,G,I,Q,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ee,g,G,I,Q,o),this.emit("missingKey",ee,g,G,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?$.forEach(ee=>{const G=this.pluralResolver.getSuffixes(ee,o);M&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!G.includes(`${this.options.pluralSeparator}zero`)&&G.push(`${this.options.pluralSeparator}zero`),G.forEach(oe=>{Y([ee],d+oe,o[`defaultValue${oe}`]||_)})}):Y($,d,_))}w=this.extendTranslation(w,t,o,S,s),H&&w===d&&this.options.appendNamespaceToMissingKey&&(w=`${g}${m}${d}`),(H||B)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${m}${d}`:d,B?w:void 0,o))}return l?(S.res=w,S.usedParams=this.getUsedParamsDetails(o),S):w}extendTranslation(t,i,s,o,l){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const f=Rt(t)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(f){const h=t.match(this.interpolator.nestingRegexp);g=h&&h.length}let m=s.replace&&!Rt(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),t=this.interpolator.interpolate(t,m,s.lng||this.language||o.usedLng,s),f){const h=t.match(this.interpolator.nestingRegexp),x=h&&h.length;g<x&&(s.nest=!1)}!s.lng&&o&&o.res&&(s.lng=this.language||o.usedLng),s.nest!==!1&&(t=this.interpolator.nest(t,(...h)=>l?.[0]===h[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${i[0]}`),null):this.translate(...h,i),s)),s.interpolation&&this.interpolator.reset()}const u=s.postProcess||this.options.postProcess,d=Rt(u)?[u]:u;return t!=null&&d?.length&&s.applyPostProcessor!==!1&&(t=pk.handle(d,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),t}resolve(t,i={}){let s,o,l,u,d;return Rt(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(f=>typeof f=="function"?Ha(f,{...this.options,...i}):f)),t.forEach(f=>{if(this.isValidLookup(s))return;const g=this.extractFromKey(f,i),m=g.key;o=m;let h=g.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const x=i.count!==void 0&&!Rt(i.count),S=x&&!i.ordinal&&i.count===0,w=i.context!==void 0&&(Rt(i.context)||typeof i.context=="number")&&i.context!=="",R=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);h.forEach(E=>{this.isValidLookup(s)||(d=E,!this.checkedLoadedFor[`${R[0]}-${E}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(this.checkedLoadedFor[`${R[0]}-${E}`]=!0,this.logger.warn(`key "${o}" for languages "${R.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!!!")),R.forEach(C=>{if(this.isValidLookup(s))return;u=C;const O=[m];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(O,m,C,E,i);else{let A;x&&(A=this.pluralResolver.getSuffix(C,i.count,i));const N=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(i.ordinal&&A.startsWith(j)&&O.push(m+A.replace(j,this.options.pluralSeparator)),O.push(m+A),S&&O.push(m+N)),w){const D=`${m}${this.options.contextSeparator||"_"}${i.context}`;O.push(D),x&&(i.ordinal&&A.startsWith(j)&&O.push(D+A.replace(j,this.options.pluralSeparator)),O.push(D+A),S&&O.push(D+N))}}let k;for(;k=O.pop();)this.isValidLookup(s)||(l=k,s=this.getResource(C,E,k,i))}))})}),{res:s,usedKey:o,exactUsedKey:l,usedLng:u,usedNS:d}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,i,s,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,i,s,o):this.resourceStore.getResource(t,i,s,o)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=t.replace&&!Rt(t.replace);let o=s?t.replace:t;if(s&&typeof t.count<"u"&&(o={...o,count:t.count}),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!s){o={...o};for(const l of i)delete o[l]}return o}static hasDefaultValue(t){const i="defaultValue";for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&s.startsWith(i)&&t[s]!==void 0)return!0;return!1}}class dE{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ms.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(t){if(t=rc(t),!t||!t.includes("-"))return null;const i=t.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(t){if(t=rc(t),!t||!t.includes("-"))return t;const i=t.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(t){if(Rt(t)&&t.includes("-")){let i;try{i=Intl.getCanonicalLocales(t)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let i;return t.forEach(s=>{if(i)return;const o=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(o))&&(i=o)}),!i&&this.options.supportedLngs&&t.forEach(s=>{if(i)return;const o=this.getScriptPartFromCode(s);if(this.isSupportedCode(o))return i=o;const l=this.getLanguagePartFromCode(s);if(this.isSupportedCode(l))return i=l;i=this.options.supportedLngs.find(u=>u===l?!0:!u.includes("-")&&!l.includes("-")?!1:!!(u.includes("-")&&!l.includes("-")&&u.slice(0,u.indexOf("-"))===l))}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(t,i){if(!t)return[];if(typeof t=="function"&&(t=t(i)),Rt(t)&&(t=[t]),Array.isArray(t))return t;if(!i)return t.default||[];let s=t[i];return s||(s=t[this.getScriptPartFromCode(i)]),s||(s=t[this.formatLanguageCode(i)]),s||(s=t[this.getLanguagePartFromCode(i)]),s||(s=t.default),s||[]}toResolveHierarchy(t,i){const s=this.options.fallbackLng,o=Array.isArray(s)?s.join("|"):s;o!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=o);const l=i===void 0||i===!1||Rt(i),u=i===void 0&&typeof this.options.fallbackLng=="function",d=Rt(t)&&l&&!u;let f=null;if(d){let x;i===void 0?x="undefined":i===!1?x="boolean:false":x=`string:${i}`,f=`${t.length}:${t}|${x}`}if(f!==null){const x=this.resolveHierarchyCache[f];if(x!==void 0)return x.slice()}const g=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],t),m=[],h=x=>{x&&(this.isSupportedCode(x)?m.push(x):this.logger.warn(`rejecting language code not found in supportedLngs: ${x}`))};return Rt(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(t))):Rt(t)&&h(this.formatLanguageCode(t)),g.forEach(x=>{const S=this.formatLanguageCode(x);m.includes(S)||h(S)}),f!==null?(this.resolveHierarchyCache[f]=m,m.slice()):m}}const fE={zero:0,one:1,two:2,few:3,many:4,other:5},hE={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class KL{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=ms.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const s=rc(t==="dev"?"en":t),o=i.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:s,type:o});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let u;try{u=new Intl.PluralRules(s,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),hE;if(!t.match(/-|_/))return hE;const f=this.languageUtils.getLanguagePartFromCode(t);u=this.getRule(f,i)}return this.pluralRulesCache[l]=u,u}needsPlural(t,i={}){let s=this.getRule(t,i);return s||(s=this.getRule("dev",i)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,i,s={}){return this.getSuffixes(t,s).map(o=>`${i}${o}`)}getSuffixes(t,i={}){let s=this.getRule(t,i);return s||(s=this.getRule("dev",i)),s?s.resolvedOptions().pluralCategories.sort((o,l)=>fE[o]-fE[l]).map(o=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,i,s={}){const o=this.getRule(t,s);return o?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${o.select(i)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",i,s))}}const pE=(e,t,i,s=".",o=!0)=>{let l=PL(e,t,i);return!l&&o&&Rt(i)&&(l=Vy(e,i,s),l===void 0&&(l=Vy(t,i,s))),l};class gE{constructor(t={}){this.logger=ms.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(i=>i),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:i,escapeValue:s,useRawValueToEscape:o,prefix:l,prefixEscaped:u,suffix:d,suffixEscaped:f,formatSeparator:g,unescapeSuffix:m,unescapePrefix:h,nestingPrefix:x,nestingPrefixEscaped:S,nestingSuffix:w,nestingSuffixEscaped:R,nestingOptionsSeparator:E,maxReplaces:C,alwaysFormat:O}=t.interpolation;this.escape=i!==void 0?i:zL,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=l?Vs(l):u||"{{",this.suffix=d?Vs(d):f||"}}",this.formatSeparator=g||",",this.unescapePrefix=m?"":h?Vs(h):"-",this.unescapeSuffix=this.unescapePrefix?"":m?Vs(m):"",this.nestingPrefix=x?Vs(x):S||Vs("$t("),this.nestingSuffix=w?Vs(w):R||Vs(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=C||1e3,this.alwaysFormat=O!==void 0?O:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(i,s)=>i?.source===s?(i.lastIndex=0,i):new RegExp(s,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,i,s,o){let l,u,d;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=R=>{if(!R.includes(this.formatSeparator)){const k=pE(i,f,R,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,s,{...o,...i,interpolationkey:R}):k}const E=R.split(this.formatSeparator),C=E.shift().trim(),O=E.join(this.formatSeparator).trim();return this.format(pE(i,f,C,this.options.keySeparator,this.options.ignoreJSONStructure),O,s,{...o,...i,interpolationkey:C})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&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 m=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,x=[{regex:this.regexpUnescape,safeValue:R=>R},{regex:this.regexp,safeValue:R=>this.escapeValue?this.escape(R):R}],S=[];let w=0;return x.forEach(R=>{for(d=0;l=R.regex.exec(t);){const E=l.index-w,C=S.find(([A,N])=>E>=A&&E<N);if(C){R.regex.lastIndex=C[1]+w;continue}const O=l[1].trim();if(u=g(O),u===void 0)if(typeof m=="function"){const A=m(t,l,o);u=Rt(A)?A:""}else if(o&&Object.prototype.hasOwnProperty.call(o,O))u="";else if(h){u=l[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${t}`),u="";else!Rt(u)&&!this.useRawValueToEscape&&(u=sh(u));const k=sh(R.safeValue(u));if(t=t.slice(0,l.index)+k+t.slice(l.index+l[0].length),h?(R.regex===this.regexpUnescape?S.push([l.index,l.index+k.length]):w+=k.length-l[0].length,R.regex.lastIndex+=k.length,R.regex.lastIndex-=l[0].length):R.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),t}nest(t,i,s={}){let o,l,u;const d=(h,x)=>{const S=this.nestingOptionsSeparator;if(!h.includes(S))return h;const w=h.split(new RegExp(`${Vs(S)}[ ]*{`));let R=`{${w[1]}`;h=w[0],R=this.interpolate(R,u);const E=R.match(/'/g),C=R.match(/"/g);((E?.length??0)%2===0&&!C||(C?.length??0)%2!==0)&&(R=R.replace(/'/g,'"'));try{u=JSON.parse(R),x&&(u={...x,...u})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,O),`${h}${S}${R}`}return u.defaultValue&&u.defaultValue.includes(this.prefix)&&delete u.defaultValue,h},f=new RegExp(this.nestingRegexp);let g="",m=0;for(;o=f.exec(t);){let h=[];u={...s},u=u.replace&&!Rt(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const x=/{.*}/s.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(x!==-1&&(h=o[1].slice(x).split(this.formatSeparator).map(S=>S.trim()).filter(Boolean),o[1]=o[1].slice(0,x)),l=i(d.call(this,o[1].trim(),u),u),l&&o[0]===t&&!Rt(l))return l;Rt(l)||(l=sh(l)),l||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),l=""),h.length&&(l=h.reduce((S,w)=>this.format(S,w,s.lng,{...s,interpolationkey:o[1].trim()}),l.trim())),g+=t.slice(m,o.index)+sh(l),m=f.lastIndex,this.regexp.lastIndex=0}return m?g+t.slice(m):t}}const qL=e=>{let t=e.toLowerCase().trim();const i={};if(e.includes("(")){const s=e.split("(");t=s[0].toLowerCase().trim();const o=s[1].slice(0,-1);t==="currency"&&!o.includes(":")?i.currency||(i.currency=o.trim()):t==="relativetime"&&!o.includes(":")?i.range||(i.range=o.trim()):o.split(";").forEach(u=>{if(u){const[d,...f]=u.split(":"),g=f.join(":").trim().replace(/^'+|'+$/g,""),m=d.trim();i[m]||(i[m]=g),g==="false"&&(i[m]=!1),g==="true"&&(i[m]=!0),isNaN(g)||(i[m]=parseInt(g,10))}})}return{formatName:t,formatOptions:i}},mE=e=>{const t={};return(i,s,o)=>{let l=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(l={...l,[o.interpolationkey]:void 0});let u;try{u=s+JSON.stringify(l)}catch{return e(rc(s),o)(i)}let d=t[u];return d||(d=e(rc(s),o),t[u]=d),d(i)}},YL=e=>(t,i,s)=>e(rc(i),s)(t);class GL{constructor(t={}){this.logger=ms.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const s=i.cacheInBuiltFormats?mE:YL;this.formats={number:s((o,l)=>{const u=new Intl.NumberFormat(o,{...l});return d=>u.format(d)}),currency:s((o,l)=>{const u=new Intl.NumberFormat(o,{...l,style:"currency"});return d=>u.format(d)}),datetime:s((o,l)=>{const u=new Intl.DateTimeFormat(o,{...l});return d=>u.format(d)}),relativetime:s((o,l)=>{const u=new Intl.RelativeTimeFormat(o,{...l});return d=>u.format(d,l.range||"day")}),list:s((o,l)=>{const u=new Intl.ListFormat(o,{...l});return d=>u.format(d)})}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=mE(i)}format(t,i,s,o={}){if(!i||t==null)return t;const l=i.split(this.formatSeparator),u=[];for(let f=0;f<l.length;f++){let g=l[f];for(;g.indexOf("(")>-1&&!g.includes(")")&&f+1<l.length;)g=`${g}${this.formatSeparator}${l[++f]}`;u.push(g)}return u.reduce((f,g)=>{const{formatName:m,formatOptions:h}=qL(g);if(this.formats[m]){let x=f;try{const S=o?.formatParams?.[o.interpolationkey]||{},w=S.locale||S.lng||o.locale||o.lng||s;x=this.formats[m](f,w,{...h,...o,...S})}catch(S){this.logger.warn(S)}return x}else this.logger.warn(`there was no format function for ${m}`);return f},t)}}const $L=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class QL extends Jp{constructor(t,i,s,o={}){super(),this.backend=t,this.store=i,this.services=s,this.languageUtils=s.languageUtils,this.options=o,this.logger=ms.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,o.backend,o)}queueLoad(t,i,s,o){const l={},u={},d={},f={};return t.forEach(g=>{let m=!0;i.forEach(h=>{const x=`${g}|${h}`;!s.reload&&this.store.hasResourceBundle(g,h)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?u[x]===void 0&&(u[x]=!0):(this.state[x]=1,m=!1,u[x]===void 0&&(u[x]=!0),l[x]===void 0&&(l[x]=!0),f[h]===void 0&&(f[h]=!0)))}),m||(d[g]=!0)}),(Object.keys(l).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(l),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}loaded(t,i,s){const o=t.split("|"),l=o[0],u=o[1];i&&this.emit("failedLoading",l,u,i),!i&&s&&this.store.addResourceBundle(l,u,s,void 0,void 0,{skipCopy:!0}),this.state[t]=i?-1:2,i&&s&&(this.state[t]=0);const d={};this.queue.forEach(f=>{IL(f.loaded,[l],u),$L(f,t),i&&f.errors.push(i),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(g=>{d[g]||(d[g]={});const m=f.loaded[g];m.length&&m.forEach(h=>{d[g][h]===void 0&&(d[g][h]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(f=>!f.done)}read(t,i,s,o=0,l=this.retryTimeout,u){if(!t.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:i,fcName:s,tried:o,wait:l,callback:u});return}this.readingCalls++;const d=(g,m)=>{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&&m&&o<this.maxRetries){setTimeout(()=>{this.read(t,i,s,o+1,l*2,u)},l);return}u(g,m)},f=this.backend[s].bind(this.backend);if(f.length===2){try{const g=f(t,i);g&&typeof g.then=="function"?g.then(m=>d(null,m)).catch(d):d(null,g)}catch(g){d(g)}return}return f(t,i,d)}prepareLoading(t,i,s={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Rt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Rt(i)&&(i=[i]);const l=this.queueLoad(t,i,s,o);if(!l.toLoad.length)return l.pending.length||o(),null;l.toLoad.forEach(u=>{this.loadOne(u)})}load(t,i,s){this.prepareLoading(t,i,{},s)}reload(t,i,s){this.prepareLoading(t,i,{reload:!0},s)}loadOne(t,i=""){const s=t.split("|"),o=s[0],l=s[1];this.read(o,l,"read",void 0,void 0,(u,d)=>{u&&this.logger.warn(`${i}loading namespace ${l} for language ${o} failed`,u),!u&&d&&this.logger.log(`${i}loaded namespace ${l} for language ${o}`,d),this.loaded(t,u,d)})}saveMissing(t,i,s,o,l,u={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(i)){this.logger.warn(`did not save key "${s}" as the namespace "${i}" 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(!(s==null||s==="")){if(this.backend?.create){const f={...u,isUpdate:l},g=this.backend.create.bind(this.backend);if(g.length<6)try{let m;g.length===5?m=g(t,i,s,o,f):m=g(t,i,s,o),m&&typeof m.then=="function"?m.then(h=>d(null,h)).catch(d):d(null,m)}catch(m){d(m)}else g(t,i,s,o,d,f)}!t||!t[0]||this.store.addResource(t[0],i,s,o)}}}const fy=()=>({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 t={};if(typeof e[1]=="object"&&(t=e[1]),Rt(e[1])&&(t.defaultValue=e[1]),Rt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(s=>{t[s]=i[s]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),yE=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),ah=()=>{},XL=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(i=>{typeof e[i]=="function"&&(e[i]=e[i].bind(e))})};class Ou extends Jp{constructor(t={},i){if(super(),this.options=yE(t),this.services={},this.logger=ms,this.modules={external:[]},XL(this),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout(()=>{this.init(t,i)},0)}}init(t={},i){this.isInitializing=!0,typeof t=="function"&&(i=t,t={}),t.defaultNS==null&&t.ns&&(Rt(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const s=fy();this.options={...s,...this.options,...yE(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler);const o=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?ms.init(o(this.modules.logger),this.options):ms.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=GL;const m=new dE(this.options);this.store=new uE(this.options.resources,this.options);const h=this.services;h.logger=ms,h.resourceStore=this.store,h.languageUtils=m,h.pluralResolver=new KL(m,{prepend:this.options.pluralSeparator}),g&&(h.formatter=o(g),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new gE(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new QL(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(x,...S)=>{this.emit(x,...S)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new tp(this.services,this.options),this.translator.on("*",(x,...S)=>{this.emit(x,...S)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,i||(i=ah),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]=(...m)=>this.store[g](...m)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...m)=>(this.store[g](...m),this)});const d=gu(),f=()=>{const g=(m,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),i(m,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?f():setTimeout(f,0),d}loadResources(t,i=ah){let s=i;const o=Rt(t)?t:this.language;if(typeof t=="function"&&(s=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const l=[],u=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(g=>{g!=="cimode"&&(l.includes(g)||l.push(g))})};o?u(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),this.options.preload?.forEach?.(d=>u(d)),this.services.backendConnector.load(l,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(d)})}else s(null)}reloadResources(t,i,s){const o=gu();return typeof t=="function"&&(s=t,t=void 0),typeof i=="function"&&(s=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),s||(s=ah),this.services.backendConnector.reload(t,i,l=>{o.resolve(),s(l)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&pk.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let i=0;i<this.languages.length;i++){const s=this.languages[i];if(!["cimode","dev"].includes(s)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const s=gu();this.emit("languageChanging",t);const o=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},l=(d,f)=>{f?this.isLanguageChangingTo===t&&(o(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,s.resolve((...g)=>this.t(...g)),i&&i(d,(...g)=>this.t(...g))},u=d=>{!t&&!d&&this.services.languageDetector&&(d=[]);const f=Rt(d)?d:d&&d[0],g=this.store.hasLanguageSomeTranslations(f)?f:this.services.languageUtils.getBestMatchFromCodes(Rt(d)?[d]:d);g&&(this.language||o(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,m=>{l(m,g)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),s}getFixedT(t,i,s,o){const l=o?.scopeNs,u=(d,f,...g)=>{let m;typeof f!="object"?m=this.options.overloadTranslationOptionHandler([d,f].concat(g)):m={...f},m.lng=m.lng||u.lng,m.lngs=m.lngs||u.lngs;const h=m.ns!==void 0&&m.ns!==null;m.ns=m.ns||u.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||s||u.keyPrefix);const x={...this.options,...m};Array.isArray(l)&&!h&&(x.ns=l),typeof m.keyPrefix=="function"&&(m.keyPrefix=Ha(m.keyPrefix,x));const S=this.options.keySeparator||".";let w;return m.keyPrefix&&Array.isArray(d)?w=d.map(R=>(typeof R=="function"&&(R=Ha(R,x)),`${m.keyPrefix}${S}${R}`)):(typeof d=="function"&&(d=Ha(d,x)),w=m.keyPrefix?`${m.keyPrefix}${S}${d}`:d),this.t(w,m)};return Rt(t)?u.lng=t:u.lngs=t,u.ns=i,u.keyPrefix=s,u}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){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 s=i.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const u=(g,m)=>{const h=this.services.backendConnector.state[`${g}|${m}`];return h===-1||h===0||h===2};if(i.precheck){const g=i.precheck(this,u);if(g!==void 0)return g}if(this.hasResourceBundle(s,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return!0;const{languageUtils:d}=this.services,f=i.lng?d.isSupportedCode(s)&&d.toResolveHierarchy(s,!1)[0]:s;return!!((!f||u(f,t))&&(!o||u(l,t)))}loadNamespaces(t,i){const s=gu();return this.options.ns?(Rt(t)&&(t=[t]),t.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{s.resolve(),i&&i(o)}),s):(i&&i(),Promise.resolve())}loadLanguages(t,i){const s=gu();Rt(t)&&(t=[t]);const o=this.options.preload||[],l=t.filter(u=>!o.includes(u)&&this.services.languageUtils.isSupportedCode(u));return l.length?(this.options.preload=o.concat(l),this.loadResources(u=>{s.resolve(),i&&i(u)}),s):(i&&i(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const l=o.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const i=["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"],s=this.services?.languageUtils||new dE(fy());return t.toLowerCase().indexOf("-latn")>1?"ltr":i.includes(s.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){const s=new Ou(t,i);return s.createInstance=Ou.createInstance,s}cloneInstance(t={},i=ah){const s=t.forkResourceStore;s&&delete t.forkResourceStore;const o={...this.options,preload:!1,...t,isClone:!0},l=new Ou(o);if((t.debug!==void 0||t.prefix!==void 0)&&(l.logger=l.logger.clone(t)),["store","services","language"].forEach(d=>{l[d]=this[d]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},s){const d=g=>{const m=Array.isArray(g)?[...g]:{...g};return Object.keys(m).forEach(h=>{m[h]&&typeof m[h]=="object"&&(m[h]=d(m[h]))}),m},f=d(this.store.data);l.store=new uE(f,o),l.services.resourceStore=l.store}if(t.interpolation){const f={...fy().interpolation,...this.options.interpolation,...t.interpolation},g={...o,interpolation:f};l.services.interpolator=new gE(g)}return l.translator=new tp(l.services,o),l.translator.on("*",(d,...f)=>{l.emit(d,...f)}),l.init(o,i),l.translator.options=o,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const pr=Ou.createInstance();pr.createInstance;pr.dir;pr.init;pr.loadResources;pr.reloadResources;pr.use;pr.changeLanguage;pr.getFixedT;pr.t;pr.exists;pr.setDefaultNamespace;pr.hasLoadedNamespace;pr.loadNamespaces;pr.loadLanguages;const ZL={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,"!doctype":!0,"!DOCTYPE":!0},JL=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function vE(e){const t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=e.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(t.name=i[1],(ZL[i[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){const l=e.indexOf("-->");return{type:"comment",comment:l!==-1?e.slice(4,l):""}}const s=new RegExp(JL);let o=null;for(;o=s.exec(e),o!==null;)if(o[0].trim())if(o[1]){const l=o[1].trim();let u=[l,null];const d=l.indexOf("=");d>-1&&(u=[l.slice(0,d),l.slice(d+1)]),t.attrs[u[0]]=u[1],s.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}const oh=/<!--[\s\S]*?-->|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,WL=/<\/?([^\s]+?)[/\s>]/,e5=/^\s*$/,t5=/^(script|style)$/i,xu="\0",n5=Object.create(null);function mk(e){e.forEach(function(t){if(t.type==="text"){t.content=t.content.split(xu).join("<");return}if(t.type==="comment"){t.comment=t.comment.split(xu).join("<");return}for(const i in t.attrs){const s=t.attrs[i];typeof s=="string"&&s.indexOf(xu)>-1&&(t.attrs[i]=s.split(xu).join("<"))}t.children.length&&mk(t.children)})}function r5(e,t){const i=t&&t.components||n5,s=t&&t.allowedTags;let o=!1;if(s){const w=typeof s=="function"?s:function(O){return s.indexOf(O)>-1};let R="",E=0;oh.lastIndex=0;let C;for(;C=oh.exec(e);){const O=C[0];R+=e.slice(E,C.index);const k=O.match(WL);O.startsWith("<!--")||k&&w(k[1])?(R+=O,E=C.index+O.length):(o=!0,R+=xu,E=C.index+1,oh.lastIndex=E)}e=R+e.slice(E)}const l=[],u=[];let d,f=-1,g=!1,m=0,h;if(e.indexOf("<")!==0){const w=e.indexOf("<");l.push({type:"text",content:w===-1?e:e.substring(0,w)})}const x=[];let S;for(;S=oh.exec(e);)x.push(S);return x.forEach(function(w,R){const E=w[0];if(!E||E.startsWith("<!--"))return;let C=0,O=0,k=-1,A=null;for(let j=0;j<E.length;j++){const D=E.charAt(j);A?D===A&&(A=null):D==='"'||D==="'"?A=D:D==="<"?(C++,C===2&&(k=j)):D===">"&&O++}const N=k>-1&&/[a-zA-Z0-9\-!/]/.test(E.charAt(k+1));if(C>O&&N){const j=E.substring(0,k),D=E.substring(j.length);x[R][0]=D,x[R].index+=j.length}}),x.forEach(function(w,R){const E=w[0];if(!E)return;const C=w.index;if(C<m)return;if(g){if(E!=="</"+d.name+">")return;g=!1}const O=E.charAt(1)!=="/",k=E.startsWith("<!--"),A=C+E.length,N=e.charAt(A),j=x[R+1];let D;if(N==="<"&&j){const _=e.substring(A,j.index);D=_.split("<").length>_.split(">").length}let M;if(k){const _=vE(E);if(f<0)return l.push(_),l;M=u[f],M.children.push(_);const L=e.slice(A,j?j.index:void 0);return L.length>0&&M.children.push({type:"text",content:L}),l}if(O){f++,d=vE(E),d.type==="tag"&&i[d.name]&&(d.type="component",g=!0);let _=!1;if(!g&&!d.voidElement&&t5.test(d.name)){_=!0,h||(h=e.toLowerCase());const L=h.indexOf("</"+d.name.toLowerCase()+">",A),q=L===-1?e.length:L,X=e.slice(A,q);X&&d.children.push({type:"text",content:X}),m=q}!d.voidElement&&!g&&!_&&N&&N!=="<"&&d.children.push({type:"text",content:e.slice(A,j?j.index:void 0)}),f===0&&l.push(d),M=u[f-1],M&&M.children.push(d),u[f]=d}if((!O||d.voidElement)&&(f>-1&&(d.voidElement||d.name===E.slice(2,-1))&&(f--,d=f===-1?l:u[f]),!g&&(N!=="<"||D)&&N)){M=f===-1?l:u[f].children;const _=j?j.index:-1;let L=e.slice(A,_===-1?void 0:_);e5.test(L)&&(L=" "),(_>-1&&f+M.length>=0||L!==" ")&&M.push({type:"text",content:L})}}),o&&mk(l),l}function i5(e){const t=[];for(const i in e)e[i]===null?t.push(i):t.push(i+'="'+String(e[i]).replace(/"/g,""")+'"');return t.length?" "+t.join(" "):""}function yk(e,t){switch(t.type){case"text":return e+t.content;case"tag":{const i=t.voidElement&&t.name.toLowerCase()!=="!doctype"?"/>":">";return e+="<"+t.name+(t.attrs?i5(t.attrs):"")+i,t.voidElement?e:e+t.children.reduce(yk,"")+"</"+t.name+">"}case"comment":return e+="<!--"+t.comment+"-->",e}}function s5(e){return e.reduce(function(t,i){return t+yk("",i)},"")}var a5={parse:r5,stringify:s5};const Th=(e,t,i,s)=>{const o=[i,{code:t,...s||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);Wr(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console?.warn&&console.warn(...o)},bE={},Ql=(e,t,i,s)=>{Wr(i)&&bE[i]||(Wr(i)&&(bE[i]=new Date),Th(e,t,i,s))},vk=(e,t)=>()=>{if(e.isInitialized)t();else{const i=()=>{setTimeout(()=>{e.off("initialized",i)},0),t()};e.on("initialized",i)}},Ky=(e,t,i)=>{e.loadNamespaces(t,vk(e,i))},xE=(e,t,i,s)=>{if(Wr(i)&&(i=[i]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Ky(e,i,s);i.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,vk(e,s))},o5=(e,t,i={})=>!t.languages||!t.languages.length?(Ql(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:i.lng,precheck:(s,o)=>{if(i.bindI18n&&i.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!o(s.isLanguageChangingTo,e))return!1}}),Wr=e=>typeof e=="string",gs=e=>typeof e=="object"&&e!==null,l5=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,c5={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},u5=e=>c5[e],bk=e=>e.replace(l5,u5);let qy={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:bk,transDefaultProps:void 0};const d5=(e={})=>{qy={...qy,...e}},sb=()=>qy;let xk;const f5=e=>{xk=e},ab=()=>xk,kh=(e,t)=>{if(!e)return!1;const i=e.props?.children??e.children;return t?i.length>0:!!i},Su=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?qs(t):t},h5=e=>qs(e).every(b.isValidElement),qs=e=>Array.isArray(e)?e:[e],p5=(e,t)=>{const i={...t};return i.props={...t.props,...e.props},i},g5=e=>{const t={};if(!e)return t;const i=s=>{qs(s).forEach(l=>{Wr(l)||(kh(l)?i(Su(l)):gs(l)&&!b.isValidElement(l)&&Object.assign(t,l))})};return i(e),t},Yy=(e,t,i,s)=>{if(!e)return"";let o="";const l=qs(e),u=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return l.forEach((d,f)=>{if(Wr(d)){o+=`${d}`;return}if(b.isValidElement(d)){const{props:g,type:m}=d,h=Object.keys(g).length,x=u.indexOf(m)>-1,S=g.children;if(!S&&x&&!h){o+=`<${m}/>`;return}if(!S&&(!x||h)||g.i18nIsDynamicList){o+=`<${f}></${f}>`;return}if(x&&h<=1){const R=Wr(S)?S:Yy(S,t,i,s);o+=`<${m}>${R}</${m}>`;return}const w=Yy(S,t,i,s);o+=`<${f}>${w}</${f}>`;return}if(d===null){Th(i,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:s});return}if(gs(d)){const{format:g,...m}=d,h=Object.keys(m);if(h.length===1){const x=g?`${h[0]}, ${g}`:h[0];o+=`{{${x}}}`;return}if(!h.length&&Object.keys(d).length===1&&"format"in d){o+="{{format}}";return}Th(i,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:s,child:d});return}Th(i,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:s,child:d})}),o},m5=(e,t,i,s,o,l,u)=>{if(i==="")return[];const d=o.transKeepBasicHtmlNodesFor||[],f=i&&new RegExp(d.map(k=>`<${k}`).join("|")).test(i);if(!e&&!t&&!f&&!u)return[i];const g=t??{},m=k=>{qs(k).forEach(N=>{Wr(N)||(kh(N)?m(Su(N)):gs(N)&&!b.isValidElement(N)&&Object.assign(g,N))})};m(e);const h=Object.keys(g),x=k=>/^\d+$/.test(k)||d.indexOf(k)>-1||h.indexOf(k)>-1,S=a5.parse(`<0>${i}</0>`,{allowedTags:x}),w={...g,...l},R=(k,A,N)=>{const j=Su(k),D=C(j,A.children,N);return h5(j)&&D.length===0||k.props?.i18nIsDynamicList?j:D},E=(k,A,N,j,D)=>{k.dummy?(k.children=A,N.push(b.cloneElement(k,{key:j},D?void 0:A))):N.push(...b.Children.map([k],M=>{if(M.type===b.Fragment||M.props?.i18nIsDynamicList!==void 0){const L={key:j};return M&&M.props&&Object.keys(M.props).forEach(q=>{q==="children"||q==="i18nIsDynamicList"||(L[q]=M.props[q])}),b.createElement(M.type,L,D?null:A)}const _={key:j};return M&&M.props&&Object.keys(M.props).forEach(L=>{L==="ref"||L==="children"||(_[L]=M.props[L])}),b.cloneElement(M,_,D?null:A)}))},C=(k,A,N)=>{const j=qs(k),D=qs(A),M={};return D.reduce((_,L,q)=>{const X=L.children?.[0]?.content&&s.services.interpolator.interpolate(L.children[0].content,w,s.language);if(L.type==="tag"){let B=j[parseInt(L.name,10)];!B&&t&&(B=t[L.name]),N.length===1&&!B&&gs(N[0])&&(B=N[0][L.name]),B||(B={});const H={...L.attrs};u&&Object.keys(H).forEach(Y=>{const ee=H[Y];Wr(ee)&&(H[Y]=bk(ee))});const U=Object.keys(H).length!==0?p5({props:H},B):B,z=b.isValidElement(U),Q=z&&kh(L,!0)&&!L.voidElement,$=f&&gs(U)&&U.dummy&&!z,K=gs(t)&&Object.hasOwnProperty.call(t,L.name);if(Wr(U)){const Y=s.services.interpolator.interpolate(U,w,s.language);_.push(Y)}else if(kh(U)||Q){const Y=R(U,L,N);E(U,Y,_,q)}else if($){const Y=C(j,L.children,N);E(U,Y,_,q)}else if(Number.isNaN(parseFloat(L.name)))if(K){const Y=R(U,L,N);E(U,Y,_,q,L.voidElement)}else if(o.transSupportBasicHtmlNodes&&d.indexOf(L.name)>-1)if(L.voidElement)_.push(b.createElement(L.name,{key:`${L.name}-${q}`}));else{const Y=M[L.name]||0;M[L.name]=Y+1;let ee,G=0;for(let V=0;V<j.length;V+=1){const W=j[V];if(b.isValidElement(W)&&W.type===L.name){if(G===Y){ee=W;break}G+=1}}const oe=ee?qs(Su(ee)):j,I=C(oe,L.children,N);_.push(b.createElement(L.name,{key:`${L.name}-${q}`},I))}else if(L.voidElement)_.push(`<${L.name} />`);else{const Y=C(j,L.children,N);_.push(`<${L.name}>${Y}</${L.name}>`)}else if(gs(U)&&!z){const Y=L.children[0]?X:null;Y&&_.push(Y)}else E(U,X,_,q,L.children.length!==1||!X)}else if(L.type==="text"){const B=o.transWrapTextNodes,H=typeof o.unescape=="function"?o.unescape:sb().unescape,U=u?H(s.services.interpolator.interpolate(L.content,w,s.language)):s.services.interpolator.interpolate(L.content,w,s.language);B?_.push(b.createElement(B,{key:`${L.name}-${q}`},U)):_.push(U)}return _},[])},O=C([{dummy:!0,children:e||[]}],S,qs(e||[]));return Su(O[0])},Sk=(e,t,i)=>{const s=e.key||t,o=b.cloneElement(e,{key:s});if(!o.props||!o.props.children||i.indexOf(`${t}/>`)<0&&i.indexOf(`${t} />`)<0)return o;function l(){return b.createElement(b.Fragment,null,o)}return b.createElement(l,{key:s})},y5=(e,t)=>e.map((i,s)=>Sk(i,s,t)),v5=(e,t)=>{const i={};return Object.keys(e).forEach(s=>{Object.assign(i,{[s]:Sk(e[s],s,t)})}),i},b5=(e,t,i,s)=>e?Array.isArray(e)?y5(e,t):gs(e)?v5(e,t):(Ql(i,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:s}),null):null,x5=e=>!gs(e)||Array.isArray(e)?!1:Object.keys(e).reduce((t,i)=>t&&Number.isNaN(Number.parseFloat(i)),!0);function S5({children:e,count:t,parent:i,i18nKey:s,context:o,tOptions:l={},values:u,defaults:d,components:f,ns:g,i18n:m,t:h,shouldUnescape:x,...S}){const w=m||ab();if(!w)return Ql(w,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.",{i18nKey:s}),e;const R=h||w.t.bind(w)||(ee=>ee),E={...sb(),...w.options?.react};let C=g||(R.ns?void 0:w.options?.defaultNS||"translation");Wr(C)&&(C=[C]);const{transDefaultProps:O}=E,k=O?.tOptions?{...O.tOptions,...l}:l,A=x??O?.shouldUnescape,N=O?.values?{...O.values,...u}:u,j=O?.components?{...O.components,...f}:f,D=Yy(e,E,w,s),M=Array.isArray(s)?s[s.length-1]:s,_=d||k?.defaultValue||D||E.transEmptyNodeValue||(typeof M=="function"?Ha(M):M),{hashTransKey:L}=E,q=s||(L?L(D||_):D||_);w.options?.interpolation?.defaultVariables?u={...w.options.interpolation.defaultVariables,...N}:u=N;const X=g5(e);X&&typeof X.count=="number"&&t===void 0&&(t=X.count),t===void 0&&(t=k?.count);const B=u||t!==void 0&&!w.options?.interpolation?.alwaysFormat||!e?k.interpolation:{interpolation:{...k.interpolation,prefix:"#$?",suffix:"?$#"}},H={...k,context:o||k.context,count:t,...u,...B,defaultValue:_,ns:C};let U=q?R(q,H):_;U===q&&_&&(U=_);const z=b5(j,U,w,s);let Q=z||e,$=null;x5(z)?($=z,Q=e):z&&!Array.isArray(z)&&($=z,Q=void 0);const K=m5(Q,$,U,w,E,H,A),Y=i??E.defaultTransParent;return Y?b.createElement(Y,S,K):K}const w5={type:"3rdParty",init(e){d5(e.options.react),f5(e)}},wk=b.createContext();class E5{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(i=>{this.usedNamespaces[i]||(this.usedNamespaces[i]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function Wp({children:e,count:t,parent:i,i18nKey:s,context:o,tOptions:l={},values:u,defaults:d,components:f,ns:g,i18n:m,t:h,shouldUnescape:x,...S}){const{i18n:w,defaultNS:R}=b.useContext(wk)||{},E=m||w||ab(),C=h||E?.t.bind(E);return S5({children:e,count:t,parent:i,i18nKey:s,context:o,tOptions:l,values:u,defaults:d,components:f,ns:g||(C?.ns?void 0:R||E?.options?.defaultNS),i18n:E,t:h,shouldUnescape:x,...S})}const C5=(e,t)=>{if(Wr(t))return t;if(gs(t)&&Wr(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const i=e[e.length-1];return typeof i=="function"?"":i}return e},R5={t:C5,ready:!1},T5=()=>()=>{},pt=(e,t={})=>{const{i18n:i}=t,{i18n:s,defaultNS:o}=b.useContext(wk)||{},l=i||s||ab();l&&!l.reportNamespaces&&(l.reportNamespaces=new E5),l||Ql(l,"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 u=b.useMemo(()=>({...sb(),...l?.options?.react,...t}),[l,t]),{useSuspense:d,keyPrefix:f,bindI18n:g,bindI18nStore:m}=u,h=o||l?.options?.defaultNS,x=Wr(h)?[h]:h||["translation"],S=JSON.stringify(x),w=b.useMemo(()=>x,[S]);l?.reportNamespaces?.addUsedNamespaces?.(w);const R=b.useRef(0),E=b.useCallback(H=>{if(!l)return T5;const U=()=>{R.current+=1,H()};return g&&l.on(g,U),m&&l.store.on(m,U),()=>{g&&g.split(" ").forEach(z=>l.off(z,U)),m&&m.split(" ").forEach(z=>l.store.off(z,U))}},[l,g,m]),C=b.useRef(),O=b.useCallback(()=>{if(!l)return R5;const H=!!(l.isInitialized||l.initializedStoreOnce)&&w.every(ee=>o5(ee,l,u)),U=t.lng||l.language,z=R.current,Q=typeof f=="function"?Ha(f,{...l.options,ns:w}):f,$=C.current;if($&&$.i18n===l&&$.ready===H&&$.lng===U&&$.namespaces===w&&$.keyPrefix===Q&&$.revision===z)return $;const Y={t:l.getFixedT(U,u.nsMode==="fallback"?w:w[0],f,{scopeNs:w}),i18n:l,ready:H,lng:U,namespaces:w,keyPrefix:Q,revision:z};return C.current=Y,Y},[l,w,f,u,t.lng]),[k,A]=b.useState(0);let{t:N,ready:j}=Fp.useSyncExternalStore(E,O,O),D;l&&d&&!j&&(D=new Promise(H=>{const U=()=>H();t.lng?xE(l,t.lng,w,U):Ky(l,w,U)}),{t:N,ready:j}=O()),b.useEffect(()=>{if(l&&!j&&!d){const H=()=>A(U=>U+1);t.lng?xE(l,t.lng,w,H):Ky(l,w,H)}},[l,t.lng,w,j,d,k]);const M=l||{},_=b.useRef(null),L=b.useRef(),q=H=>`${H.language}|${H.resolvedLanguage}|${H.languages?.join(",")}`,X=H=>{const U=Object.getOwnPropertyDescriptors(H);U.__original&&delete U.__original;const z=Object.create(Object.getPrototypeOf(H),U);if(!Object.prototype.hasOwnProperty.call(z,"__original"))try{Object.defineProperty(z,"__original",{value:H,writable:!1,enumerable:!1,configurable:!1})}catch{}return z},B=b.useMemo(()=>{const H=M,U=H&&q(H);let z=H;H&&(_.current&&_.current.__original===H?L.current!==U?(z=X(H),_.current=z,L.current=U):z=_.current:(z=X(H),_.current=z,L.current=U));const Q=!j&&!d?(...K)=>(Ql(l,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),N(...K)):N,$=[Q,z,j];return $.t=Q,$.i18n=z,$.ready=j,$},[N,M,j,M.resolvedLanguage,M.language,M.languages]);if(l&&d&&!j){let H=!1;try{H=!1}catch{}throw H&&Ql(l,"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"),D}return B};function Ek(e){var t,i,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(i=Ek(e[t]))&&(s&&(s+=" "),s+=i)}else for(i in e)e[i]&&(s&&(s+=" "),s+=i);return s}function k5(){for(var e,t,i=0,s="",o=arguments.length;i<o;i++)(e=arguments[i])&&(t=Ek(e))&&(s&&(s+=" "),s+=t);return s}const SE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wE=k5,Ho=(e,t)=>i=>{var s;if(t?.variants==null)return wE(e,i?.class,i?.className);const{variants:o,defaultVariants:l}=t,u=Object.keys(o).map(g=>{const m=i?.[g],h=l?.[g];if(m===null)return null;const x=SE(m)||SE(h);return o[g][x]}),d=i&&Object.entries(i).reduce((g,m)=>{let[h,x]=m;return x===void 0||(g[h]=x),g},{}),f=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((g,m)=>{let{class:h,className:x,...S}=m;return Object.entries(S).every(w=>{let[R,E]=w;return Array.isArray(E)?E.includes({...l,...d}[R]):{...l,...d}[R]===E})?[...g,h,x]:g},[]);return wE(e,u,f,i?.class,i?.className)},Ck=b.createContext(void 0);function ob(e=!1){const t=b.useContext(Ck);if(t===void 0&&!e)throw new Error(gn(16));return t}function O5(e){const{focusableWhenDisabled:t,disabled:i,composite:s=!1,tabIndex:o=0,isNativeButton:l}=e,u=s&&t!==!1,d=s&&t===!1;return{props:b.useMemo(()=>{const g={onKeyDown(m){i&&t&&m.key!=="Tab"&&m.preventDefault()}};return s||(g.tabIndex=o,!l&&i&&(g.tabIndex=t?o:-1)),(l&&(t||u)||!l&&i)&&(g["aria-disabled"]=i),l&&(!t||d)&&(g.disabled=i),g},[s,i,t,u,d,l,o])}}function Do(e,t,{detail:i=0,pointerType:s=""}={}){e.dispatchEvent(new(Cn(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:i,pointerType:s,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function vi(e={}){const{disabled:t=!1,focusableWhenDisabled:i,tabIndex:s=0,native:o=!0,composite:l}=e,u=b.useRef(null),d=ob(!0),f=l??d!==void 0,{props:g}=O5({focusableWhenDisabled:i,disabled:t,composite:f,tabIndex:s,isNativeButton:o}),m=b.useCallback(()=>{const S=u.current;hy(S)&&f&&t&&g.disabled===void 0&&S.disabled&&(S.disabled=!1)},[t,g.disabled,f]);_e(m,[m]);const h=b.useCallback((S={})=>{const{onClick:w,onMouseDown:R,onKeyUp:E,onKeyDown:C,onPointerDown:O,...k}=S;return Mr({onClick(A){if(t){A.preventDefault();return}w?.(A)},onMouseDown(A){t||R?.(A)},onKeyDown(A){if(t||(Kh(A),C?.(A),A.baseUIHandlerPrevented))return;const N=A.target===A.currentTarget,j=A.currentTarget,D=hy(j),M=!o&&A5(j),_=N&&(o?D:!M),L=A.key==="Enter",q=A.key===" ",X=j.getAttribute("role"),B=X?.startsWith("menuitem")||X==="option"||X==="gridcell";if(N&&f&&q){if(A.defaultPrevented&&B)return;A.preventDefault(),(!o||D)&&(A.preventBaseUIHandler(),Do(j,A));return}if(!_||o||!q&&!L){N&&M&&q&&A.preventDefault();return}A.defaultPrevented||(A.preventDefault(),L&&(A.preventBaseUIHandler(),Do(j,A)))},onKeyUp(A){if(!t){if(Kh(A),E?.(A),A.target===A.currentTarget&&o&&f&&hy(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!o&&!f&&!A.defaultPrevented&&A.key===" "&&(A.preventBaseUIHandler(),Do(A.currentTarget,A))}},onPointerDown(A){if(t){A.preventDefault();return}O?.(A)}},o?{type:"button"}:{role:"button"},g,k)},[t,g,f,o]),x=Be(S=>{u.current=S,m()});return{getButtonProps:h,buttonRef:x}}function hy(e){return bn(e)&&e.tagName==="BUTTON"}function A5(e){return bn(e)&&e.tagName==="A"&&!!e.href}const M5=b.forwardRef(function(t,i){const{render:s,className:o,disabled:l=!1,focusableWhenDisabled:u=!1,nativeButton:d=!0,style:f,...g}=t,{getButtonProps:m,buttonRef:h}=vi({disabled:l,focusableWhenDisabled:u,native:d});return kt("button",t,{state:{disabled:l},ref:[i,h],props:[g,m]})}),Rk=Ho("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 nt({className:e,variant:t="default",size:i="default",...s}){return v.jsx(M5,{"data-slot":"button",className:Fe(Rk({variant:t,size:i,className:e})),...s})}const N5=Ho("group/code-block relative flex w-full min-w-0 flex-col overflow-hidden rounded-md text-sm has-[>[data-slot=code-block-content]:focus-visible]:ring-2 has-[>[data-slot=code-block-content]:focus-visible]:ring-ring/30 data-[size=sm]:text-xs",{variants:{variant:{default:"border border-input text-foreground has-[>[data-slot=code-block-content]:focus-visible]:border-ring dark:bg-input/30",destructive:"border border-destructive/30 text-destructive dark:border-destructive/40"}},defaultVariants:{variant:"default"}});function D5({className:e,variant:t="default",size:i="default",...s}){return v.jsx("div",{"data-slot":"code-block","data-variant":t,"data-size":i,className:Fe(N5({variant:t}),e),...s})}function j5({className:e,...t}){return v.jsx("div",{"data-slot":"code-block-header",className:Fe("flex min-w-0 shrink-0 items-center gap-2 px-3 pt-3 text-muted-foreground group-data-[size=sm]/code-block:px-2 group-data-[size=sm]/code-block:pt-2 group-data-[variant=destructive]/code-block:text-destructive *:has-[>[data-slot=code-block-title]]:min-w-0",e),...t})}function I5({className:e,...t}){return v.jsx("div",{"data-slot":"code-block-title",className:Fe("min-w-0 truncate font-sans text-xs font-medium text-foreground group-data-[variant=destructive]/code-block:text-destructive [&_svg]:pointer-events-none [&_svg]:inline-block [&_svg]:align-middle [&_svg:not([class*='size-'])]:size-3.5 *:[svg]:me-1.5",e),...t})}function P5({className:e,...t}){return v.jsx("div",{"data-slot":"code-block-actions",className:Fe("-my-1 ms-auto -me-1.5 flex shrink-0 items-center gap-1 [[data-slot=code-block]>&]:absolute [[data-slot=code-block]>&]:end-2 [[data-slot=code-block]>&]:top-2 [[data-slot=code-block]>&]:z-10 [[data-slot=code-block]>&]:m-0 [[data-slot=code-block]>&]:opacity-0 [[data-slot=code-block]>&]:transition-opacity [[data-slot=code-block]>&]:group-focus-within/code-block:opacity-100 [[data-slot=code-block]>&]:group-hover/code-block:opacity-100 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:end-1.5 group-data-[size=sm]/code-block:[[data-slot=code-block]>&]:top-1.5 [[data-slot=code-block]>&]:pointer-coarse:opacity-100 [[data-slot=code-block]>&]:*:[button]:bg-background [[data-slot=code-block]>&]:*:[button]:ring-1 [[data-slot=code-block]>&]:*:[button]:ring-foreground/10",e),...t})}function L5({value:e,variant:t="ghost",size:i="icon-xs",className:s,onClick:o,...l}){const[u,d]=b.useState(!1);return b.useEffect(()=>{if(!u)return;const f=setTimeout(()=>d(!1),2e3);return()=>clearTimeout(f)},[u]),v.jsxs(v.Fragment,{children:[v.jsx(nt,{"data-slot":"code-block-copy-button","data-copied":u||void 0,variant:t,size:i,"aria-label":u?"Copied":"Copy",className:Fe(s),onClick:f=>{o?.(f),navigator.clipboard.writeText(e).then(()=>d(!0)).catch(()=>{})},...l,children:u?v.jsx(ld,{}):v.jsx(ST,{})}),v.jsx("span",{"aria-live":"polite",className:"sr-only",children:u?"Copied":""})]})}function z5({className:e,children:t,style:i,wrap:s=!1,lineNumbers:o=!1,startLine:l=1,...u}){return v.jsx("pre",{"data-slot":"code-block-content","data-wrap":s||void 0,"data-numbered":o||void 0,dir:"ltr",tabIndex:0,style:{counterReset:`line ${l-1}`,...i},className:Fe("min-h-0 min-w-0 scroll-fade-x scrollbar-thin overflow-auto px-3 py-3 text-start font-mono leading-relaxed outline-none group-has-data-[slot=code-block-footer]/code-block:pb-2 group-has-data-[slot=code-block-header]/code-block:pt-2 group-data-[size=sm]/code-block:px-2 group-data-[size=sm]/code-block:py-2 group-data-[size=sm]/code-block:group-has-data-[slot=code-block-header]/code-block:pt-1.5 data-wrap:scroll-fade-y data-wrap:wrap-break-word data-wrap:whitespace-pre-wrap",e),...u,children:v.jsx("code",{"data-slot":"code-block-code",className:"grid min-h-lh min-w-max content-start in-data-numbered:grid-cols-[auto_1fr] in-data-wrap:min-w-0",children:o&&typeof t=="string"?t.replace(/\n$/,"").split(`
|
|
11
|
-
`).map((d,f)=>v.jsx(U5,{children:d},f)):t})})}const _5=Ho("relative -mx-3 block min-h-lh px-3 group-data-[size=sm]/code-block:-mx-2 group-data-[size=sm]/code-block:px-2 before:min-w-6 before:text-end before:text-muted-foreground after:absolute after:start-1 after:top-0 after:text-muted-foreground after:select-none in-data-numbered:col-span-2 in-data-numbered:grid in-data-numbered:grid-cols-subgrid in-data-numbered:gap-x-3 in-data-numbered:[counter-increment:line] in-data-numbered:before:content-[counter(line)] in-data-numbered:before:select-none in-data-numbered:supports-[content:counter(line)_/_'']:before:content-[counter(line)_/_'']",{variants:{variant:{default:"",added:"bg-muted after:content-['+']",removed:"bg-destructive/10 after:text-destructive after:content-['−']",highlighted:"bg-muted"}},defaultVariants:{variant:"default"}});function U5({className:e,variant:t="default",children:i,...s}){const o=i==null||i===""||Array.isArray(i)&&i.length===0;return v.jsx("span",{"data-slot":"code-block-line","data-variant":t,className:Fe(_5({variant:t}),e),...s,children:v.jsx("span",{"data-slot":"code-block-line-content",className:"min-w-0",children:o?`
|
|
12
|
-
`:i})})}const Tk=b.createContext(void 0);function cd(e){const t=b.useContext(Tk);if(t===void 0&&!e)throw new Error(gn(47));return t}const H5={...Ys,disabled:e=>e.disabled,instantType:e=>e.instantType==="trigger-change"&&!Ys.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===Qi&&Ys.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod==="touch"&&e.openChangeReason===Qi,hasTriggerFocusGuards:(e,t)=>Ys.isOpenedByTrigger(e,t)&&!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 F5 extends oc{constructor(t,i,s){const o=new ad;super(B5(t,o,i,s),V5(o),H5)}setOpen=(t,i)=>{const s=i.reason===Kn,o=i.reason===Qi&&i.event.detail===0,l=!t&&(i.reason===td||i.reason==null),u=Lp(i),d=this.select("activeTriggerId");if(!t&&i.reason===JC&&i.trigger==null&&d!=null&&(i.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(t,i),i.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,i);const f=()=>{const m=Pp(this.state,t,i.trigger,u());m.openChangeReason=i.reason,this.update(m)};s?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(CR,()=>{this.context.stickIfOpen=!1}),hr.flushSync(f)):f();let g;o?g="click":l?g="dismiss":i.reason===Fa&&(g="focus"),this.set("instantType",g)}}function B5(e,t,i,s=!1){const o={...Bp(t,i,s),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 o.open&&e?.mounted===void 0&&(o.mounted=!0),o}function V5(e){return{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:b.createRef(),beforeTriggerFocusGuardRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),stickIfOpenTimeout:new Pi,stickIfOpen:!0,triggerElements:e}}const EE=Xu(function({props:t}){const{children:i,open:s,defaultOpen:o=!1,onOpenChange:l,onOpenChangeComplete:u,modal:d=!1,handle:f,triggerId:g,defaultTriggerId:m=null}=t,h=q5(f,{modal:d,open:o,openProp:s,activeTriggerId:m,triggerIdProp:g});h.useControlledProp("openProp",s),h.useControlledProp("triggerIdProp",g);const x=h.useState("open"),S=h.useState("mounted"),w=h.useState("payload");h.useContextCallback("onOpenChange",l),h.useContextCallback("onOpenChangeComplete",u),zR(h,x),_p(h);const{forceUnmount:R}=Up(x,h,()=>{h.context.stickIfOpen=!0,h.set("openChangeReason",null)});h.useSyncedValues({modal:d}),b.useEffect(()=>{x||h.context.stickIfOpenTimeout.clear()},[h,x]),b.useImperativeHandle(t.actionsRef,()=>({unmount:R,close:()=>h.setOpen(!1,ut(nd))}),[R,h]);const E=x||S||f!=null;return v.jsxs(Tk.Provider,{value:h,children:[f&&v.jsx(Ip,{handle:f,store:h}),E&&v.jsx(Y5,{store:h,modal:d}),typeof i=="function"?i({payload:w}):i]})});function K5(e){return cd(!0)?v.jsx(EE,{props:e}):v.jsx(jR,{children:v.jsx(EE,{props:e})})}function q5(e,t){const i=Kv((s,o)=>new F5(t,s,o));return b.useEffect(()=>i.context.stickIfOpenTimeout.disposeEffect(),[i]),i}function Y5({store:e,modal:t}){const i=e.useState("floatingRootContext"),s=id(i,{outsidePressEvent:{mouse:t==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),o=s.reference,l=s.floating;return Hp(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:l}),null}const G5=300;function kk(e,t){function i(l,u,d){const f=l.currentTarget;hr.flushSync(()=>{e.setOpen(!1,ut(Fa,l.nativeEvent,f))}),z4(f.isConnected?f:t.current,u,d)?.focus()}function s(l){i(l,-1,e.select("positionerElement"))}function o(l){const u=e.select("positionerElement");u&&Yl(l,u)?e.context.beforeContentFocusGuardRef.current?.focus():i(l,1,u)}return{handlePreFocusGuardFocus:s,handleFocusTargetFocus:o}}function $5(e){const t=b.useRef(""),i=b.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:b.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:i}}function cc(e,t){const i=b.useRef(e),s=Be(t);_e(()=>{i.current!==e&&s(i.current),i.current=e},[e,s])}function lb(e,t){const i=Be((l,u)=>{(typeof e=="function"?e():e)||t(u||(yp?"touch":""))}),{onClick:s,onPointerDown:o}=$5(i);return b.useMemo(()=>({onClick:s,onPointerDown:o}),[s,o])}function Ok(e){const[t,i]=b.useState(null),s=lb(e,i);return cc(e,o=>{o&&!e&&i(null)}),b.useMemo(()=>({openMethod:t,triggerProps:s}),[t,s])}const Q5=gp(function(t,i){const{render:s,className:o,style:l,disabled:u=!1,nativeButton:d=!0,handle:f,payload:g,openOnHover:m=!1,delay:h=G5,closeDelay:x=0,id:S,...w}=t,R=cd(!0),C=Vp(f)??R;if(!C)throw new Error(gn(74));const O=ar(S),k=C.useState("isTriggerActive",O),A=C.useState("floatingRootContext"),N=C.useState("isOpenedByTrigger",O),j=C.useState("triggerPopupId",O),D=b.useRef(null),{registerTrigger:M,isMountedByThisTrigger:_}=zp(O,D,C,{payload:g,disabled:u,openOnHover:m,closeDelay:x}),L=C.useState("isPressOpenedByTrigger",O),q=C.useState("isTouchPressOpen",m),X=C.useState("hasTriggerFocusGuards",O),B=$v(A,{enabled:!u&&m&&!q,mouseOnly:!0,move:!1,handleClose:Qv(),restMs:h,delay:{close:x},triggerElementRef:D,isActiveTrigger:k,isClosing:()=>C.select("transitionStatus")==="ending"}),H=Be(()=>C.context.stickIfOpen),U=Dp(A,{stickIfOpen:H}),z=lb(()=>C.select("open"),W=>{C.set("openMethod",W)}),Q=C.useState("triggerProps",_),{getButtonProps:$,buttonRef:K}=vi({disabled:u,native:d}),Y={open(W){return L?_u.open(W):Ep.open(W)}},{handlePreFocusGuardFocus:ee,handleFocusTargetFocus:G}=kk(C,D),I=kt("button",t,{state:{disabled:u,open:N},ref:[K,i,M,D],props:[U.reference,B,Q,z,{[Uv]:"",id:O,"aria-haspopup":"dialog","aria-expanded":N,"aria-controls":j},w,$],stateAttributesMapping:Y}),V=v.jsx(b.Fragment,{children:I},O);return X?v.jsxs(b.Fragment,{children:[v.jsx(Ba,{ref:C.context.beforeTriggerFocusGuardRef,onFocus:ee}),V,v.jsx(Ba,{ref:C.context.triggerFocusTargetRef,onFocus:G})]}):V}),Ak=b.createContext(void 0);function X5(){const e=b.useContext(Ak);if(e===void 0)throw new Error(gn(45));return e}const Z5=b.forwardRef(function(t,i){const{keepMounted:s=!1,...o}=t;return cd().useState("mounted")||s?v.jsx(Ak.Provider,{value:s,children:v.jsx(Mp,{ref:i,...o})}):null}),Mk=b.createContext(void 0);function J5(){const e=b.useContext(Mk);if(!e)throw new Error(gn(46));return e}const eg=b.forwardRef(function(t,i){const{cutout:s,...o}=t;let l;if(s){const u=s.getBoundingClientRect();l=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${u.left}px ${u.top}px,${u.left}px ${u.bottom}px,${u.right}px ${u.bottom}px,${u.right}px ${u.top}px,${u.left}px ${u.top}px)`}return v.jsx("div",{ref:i,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:l}})});function Nk(e){const{store:t,domReference:i,positionerElement:s,open:o}=e,l=b.useRef(null),u=b.useRef(null),d=jp(s);_e(()=>{o||(u.current?.abort(),u.current=null,t.state.instantType==="trigger-change"&&t.set("instantType",void 0))},[o,t]),_e(()=>{const f=i,g=l.current;if(f&&(l.current=f),!g||!f||f===g||!t.select("open"))return;t.set("instantType",void 0);const m=new AbortController;return u.current=m,d(()=>{t.select("open")&&t.set("instantType","trigger-change")},m.signal),()=>{m.abort()}},[i,d,t])}let CE={},RE={},TE="";function tg(e,t){return Ju(e)?e:t}function kE(e,t,i){return/hidden|clip/.test(e.getComputedStyle(tg(t,i)).overflowY)}function W5(e){if(typeof document>"u")return!1;const t=Qt(e);return Cn(t).innerWidth-t.documentElement.clientWidth>0}function ez(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const i=Qt(e),s=i.documentElement,o=i.body,l=tg(s,o),u=l.style.overflowY,d=s.style.scrollbarGutter;s.style.scrollbarGutter="stable",l.style.overflowY="scroll";const f=l.offsetWidth;l.style.overflowY="hidden";const g=l.offsetWidth;return l.style.overflowY=u,s.style.scrollbarGutter=d,f===g}function tz(e){const t=Qt(e),i=t.documentElement,s=t.body,o=tg(i,s),l={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,l)}}function nz(e){const t=Qt(e),i=t.documentElement,s=t.body,o=Cn(i);let l=0,u=0,d=!1;const f=Ar.create();if(Ss&&(o.visualViewport?.scale??1)!==1)return()=>{};function g(){const S=o.getComputedStyle(i),w=o.getComputedStyle(s),C=(S.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";l=i.scrollTop,u=i.scrollLeft,CE={scrollbarGutter:i.style.scrollbarGutter,overflowY:i.style.overflowY,overflowX:i.style.overflowX},TE=i.style.scrollBehavior,RE={position:s.style.position,height:s.style.height,width:s.style.width,boxSizing:s.style.boxSizing,overflowY:s.style.overflowY,overflowX:s.style.overflowX,scrollBehavior:s.style.scrollBehavior};const O=i.scrollHeight>i.clientHeight,k=i.scrollWidth>i.clientWidth,A=S.overflowY==="scroll"||w.overflowY==="scroll",N=S.overflowX==="scroll"||w.overflowX==="scroll",j=Math.max(0,o.innerWidth-s.clientWidth),D=Math.max(0,o.innerHeight-s.clientHeight),M=parseFloat(w.marginTop)+parseFloat(w.marginBottom),_=parseFloat(w.marginLeft)+parseFloat(w.marginRight),L=tg(i,s);if(d=ez(e),d){i.style.scrollbarGutter=C,L.style.overflowY="hidden",L.style.overflowX="hidden";return}Object.assign(i.style,{scrollbarGutter:C,overflowY:"hidden",overflowX:"hidden"}),(O||A)&&(i.style.overflowY="scroll"),(k||N)&&(i.style.overflowX="scroll"),Object.assign(s.style,{position:"relative",height:M||D?`calc(100dvh - ${M+D}px)`:"100dvh",width:_||j?`calc(100vw - ${_+j}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),s.scrollTop=l,s.scrollLeft=u,i.setAttribute("data-base-ui-scroll-locked",""),i.style.scrollBehavior="unset"}function m(){Object.assign(i.style,CE),Object.assign(s.style,RE),d||(i.scrollTop=l,i.scrollLeft=u,i.removeAttribute("data-base-ui-scroll-locked"),i.style.scrollBehavior=TE)}function h(){m(),f.request(g)}g();const x=Lt(o,"resize",h);return()=>{f.cancel(),m(),typeof o.removeEventListener=="function"&&x()}}class rz{lockCount=0;restore=null;timeoutLock=Pi.create();timeoutUnlock=Pi.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),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(t){if(this.lockCount===0||this.restore!==null)return;const i=Qt(t),s=i.documentElement,o=i.body,l=Cn(s);if(kE(l,s,o)){const d=new l.MutationObserver(()=>{kE(l,s,o)||(d.disconnect(),this.restore=null,this.lock(t))}),f={attributes:!0};d.observe(s,f),d.observe(o,f),this.restore=()=>d.disconnect();return}const u=yp||!W5(t);this.restore=u?tz(t):nz(t)}}const iz=new rz;function Dk(e=!0,t=null){_e(()=>{if(e)return iz.acquire(t)},[e,t])}const sz=20;function cb(e,t,i,s){const[o,l]=b.useState(!1);_e(()=>{if(!e||!t||i==null){l(!1);return}const u=Qt(i).documentElement.clientWidth,d=i.offsetWidth;l(u>0&&d>0&&d>=u-sz)},[e,t,i]),Dk(e&&(!t||o),s)}const az=b.forwardRef(function(t,i){const{render:s,className:o,style:l,anchor:u,positionMethod:d,side:f,align:g,sideOffset:m,alignOffset:h,collisionBoundary:x="clipping-ancestors",collisionPadding:S,arrowPadding:w,sticky:R,disableAnchorTracking:E=!1,collisionAvoidance:C=Hv,...O}=t,k=cd(),A=X5(),N=Bv(),j=k.useState("floatingRootContext"),D=k.useState("mounted"),M=k.useState("open"),_=k.useState("openChangeReason"),L=k.useState("activeTriggerElement"),q=k.useState("modal"),X=k.useState("openMethod"),B=k.useState("positionerElement"),H=k.useState("instantType"),U=k.useState("transitionStatus"),z=k.useState("adaptiveOrigin"),Q=Gp({anchor:u,floatingRootContext:j,positionMethod:d,mounted:D,side:f,sideOffset:m,align:g,alignOffset:h,arrowPadding:w,collisionBoundary:x,collisionPadding:S,sticky:R,disableAnchorTracking:E,keepMounted:A,nodeId:N,collisionAvoidance:C,adaptiveOrigin:z}),$=j.useState("domReferenceElement");Nk({store:k,domReference:$,positionerElement:B,open:M});const K=q===!0&&_!==Kn;cb(M&&K,X==="touch",B,L);const Y=k.useStateSetter("positionerElement"),ee={open:M,side:Q.side,align:Q.align,anchorHidden:Q.anchorHidden,instant:H},G=$p(t,ee,{styles:Q.positionerStyles,transitionStatus:U,props:O,refs:[i,Y],hidden:!D,inert:!M});return v.jsxs(Mk.Provider,{value:Q,children:[D&&K&&v.jsx(eg,{inert:Qp(!M),cutout:L}),v.jsx(DR,{id:N,children:G})]})}),Gy="ArrowUp",$y="ArrowDown",Qy="ArrowLeft",Xy="ArrowRight",Zy="Home",Jy="End",ud=new Set([Gy,$y,Qy,Xy,Zy,Jy]),jk="Shift",oz=[jk,"Control","Alt","Meta"];function lz(e){return bn(e)&&e.tagName==="INPUT"}function OE(e){return!!(lz(e)&&e.selectionStart!=null||bn(e)&&e.tagName==="TEXTAREA")}function AE(e,t,i,s){if(!e||!t||!t.scrollTo)return;let o=e.scrollLeft,l=e.scrollTop;const u=e.clientWidth<e.scrollWidth,d=e.clientHeight<e.scrollHeight;if(u&&s!=="vertical"){const f=ME(e,t,"left"),g=lh(e),m=lh(t);i==="ltr"&&(f+t.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight?o=f+t.offsetWidth+m.scrollMarginRight-e.clientWidth+g.scrollPaddingRight:f-m.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft&&(o=f-m.scrollMarginLeft-g.scrollPaddingLeft)),i==="rtl"&&(f-m.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft?o=f-m.scrollMarginLeft-g.scrollPaddingLeft:f+t.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight&&(o=f+t.offsetWidth+m.scrollMarginRight-e.clientWidth+g.scrollPaddingRight))}if(d&&s!=="horizontal"){const f=ME(e,t,"top"),g=lh(e),m=lh(t);f-m.scrollMarginTop<e.scrollTop+g.scrollPaddingTop?l=f-m.scrollMarginTop-g.scrollPaddingTop:f+t.offsetHeight+m.scrollMarginBottom>e.scrollTop+e.clientHeight-g.scrollPaddingBottom&&(l=f+t.offsetHeight+m.scrollMarginBottom-e.clientHeight+g.scrollPaddingBottom)}e.scrollTo({left:o,top:l,behavior:"auto"})}function ME(e,t,i){const s=i==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[s],t.offsetParent!==e);)t=t.offsetParent;return o}function lh(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const cz=b.createContext(void 0);function ng(e){return b.useContext(cz)}const uz=b.createContext(void 0);function dz(){const[e,t]=b.useState(0),i=Be(()=>(t(o=>o+1),()=>{t(o=>Math.max(0,o-1))}));return{context:b.useMemo(()=>({register:i}),[i]),hasClosePart:e>0}}const fz=b.forwardRef(function(t,i){const{render:s,className:o,style:l,initialFocus:u,finalFocus:d,...f}=t,g=cd(),m=J5(),h=ng()!=null,{context:x,hasClosePart:S}=dz(),w=g.useState("open"),R=g.useState("openMethod"),E=g.useState("instantType"),C=g.useState("transitionStatus"),O=g.useState("popupProps"),k=g.useState("titleElementId"),A=g.useState("descriptionElementId"),N=g.useState("modal"),j=g.useState("mounted"),D=g.useState("openChangeReason"),M=g.useState("activeTriggerElement"),_=g.useState("floatingRootContext"),L=_.useState("floatingId"),q=g.useState("disabled"),X=g.useState("openOnHover"),B=g.useState("closeDelay");Li({open:w,ref:g.context.popupRef,onComplete(){w&&g.context.onOpenChangeComplete?.(!0)}}),Gv(_,{enabled:X&&!q,closeDelay:B});const H=u===void 0?LR(g.context.popupRef):u,U=N!==!1&&S;g.useSyncedValue("focusManagerModal",U);const z=g.useStateSetter("popupElement"),Q={open:w,side:m.side,align:m.align,instant:E,transitionStatus:C},$=kt("div",t,{state:Q,ref:[i,g.context.popupRef,z],props:[O,{id:L,role:"dialog",...sd,"aria-labelledby":k,"aria-describedby":A,onKeyDown(K){h&&ud.has(K.key)&&K.stopPropagation()}},od(C),f],stateAttributesMapping:Cp});return v.jsx(Np,{context:_,openInteractionType:R,modal:U,disabled:!j||D===Kn,initialFocus:H,returnFocus:d,restoreFocus:"popup",getInsideElements:()=>[g.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:bn(M)?M:void 0,nextFocusableElement:g.context.triggerFocusTargetRef,beforeContentFocusGuardRef:g.context.beforeContentFocusGuardRef,children:v.jsx(uz.Provider,{value:x,children:$})})});function ub({...e}){return v.jsx(K5,{"data-slot":"popover",...e})}function Ik({...e}){return v.jsx(Q5,{"data-slot":"popover-trigger",...e})}function db({anchor:e,align:t="center",alignOffset:i=0,side:s="bottom",sideOffset:o=4,className:l,...u}){return v.jsx(Z5,{children:v.jsx(az,{anchor:e,className:"isolate z-50 outline-none",align:t,alignOffset:i,side:s,sideOffset:o,children:v.jsx(fz,{"data-slot":"popover-content",className:Fe("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",l),...u})})})}const Pk=b.createContext(void 0),jr=e=>{const t=b.useContext(Pk);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hz=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(Pk.Provider,{value:e,children:t})),pz={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var gz=class{#e=pz;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};const Ao=new gz;function mz(e){setTimeout(e,0)}const yz=typeof window>"u"||"Deno"in globalThis;function Br(){}function vz(e,t){return typeof e=="function"?e(t):e}function Lk(e){return typeof e=="number"&&e>=0&&e!==1/0}function zk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pn(e,t){return typeof e=="function"?e(t):e}function NE(e,t){const{type:i="all",exact:s,fetchStatus:o,predicate:l,queryKey:u,stale:d}=e;if(u){if(s){if(t.queryHash!==fb(u,t.options))return!1}else if(!ic(t.queryKey,u))return!1}if(i!=="all"){const f=t.isActive();if(i==="active"&&!f||i==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||l&&!l(t))}function DE(e,t){const{exact:i,status:s,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(i){if(zo(t.options.mutationKey)!==zo(l))return!1}else if(!ic(t.options.mutationKey,l))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function fb(e,t){return(t?.queryKeyHashFn||zo)(e)}function zo(e){return JSON.stringify(e,(t,i)=>Wy(i)?Object.keys(i).sort().reduce((s,o)=>(s[o]=i[o],s),{}):i)}function ic(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let s=0;s<t.length;s++)if(!ic(e[s],t[s]))return!1;return!0}const i=Object.keys(t);for(const s of i)if(!ic(e[s],t[s]))return!1;return!0}return!1}const bz=Object.prototype.hasOwnProperty;function hb(e,t,i=0){if(e===t)return e;if(i>500)return t;const s=jE(e)&&jE(t);if(!s&&!(Wy(e)&&Wy(t)))return t;const o=(s?e:Object.keys(e)).length,l=s?t:Object.keys(t),u=l.length,d=s?new Array(u):{};let f=0;for(let g=0;g<u;g++){const m=s?g:l[g],h=e[m],x=t[m];if(h===x){d[m]=h,(s?g<o:bz.call(e,m))&&f++;continue}if(h===null||x===null||typeof h!="object"||typeof x!="object"){d[m]=x;continue}const S=hb(h,x,i+1);d[m]=S,S===h&&f++}return o===u&&f===o?e:d}function Oh(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}function jE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Wy(e){if(!IE(e))return!1;const t=Object.getPrototypeOf(e),i=t?.constructor;if(i===void 0)return!0;if(typeof i!="function")return!1;const s=i.prototype;return!(!IE(s)||!s.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function IE(e){return Object.prototype.toString.call(e)==="[object Object]"}function xz(e){return new Promise(t=>{Ao.setTimeout(t,e)})}function ev(e,t,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,t):i.structuralSharing!==!1?hb(e,t):t}function Sz(e,t,i=0){const s=[...e,t];return i&&s.length>i?s.slice(1):s}function wz(e,t,i=0){const s=[t,...e];return i&&s.length>i?s.slice(0,-1):s}const pb=Symbol();function _k(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===pb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gb(e,t){return typeof e=="function"?e(...t):!!e}function Ez(e,t,i){let s=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),s||(s=!0,o.aborted?i():o.addEventListener("abort",i,{once:!0})),o)}),e}let Cz=()=>yz;const mb=()=>Cz();var uc=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(){}},Rz=class extends uc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}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(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const yb=new Rz,Tz=mz;function kz(){let e=[],t=0,i=d=>{d()},s=d=>{d()},o=Tz;const l=d=>{t?e.push(d):o(()=>{i(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{s(()=>{d.forEach(f=>{i(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{i=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}const Wn=kz();var Oz=class extends uc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",i)}}}}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(t=>{t(e)}))}isOnline(){return this.#e}};const np=new Oz;function Az(e){return Math.min(1e3*2**e,3e4)}function Uk(e){return(e??"online")==="online"?np.isOnline():!0}var tv=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Hk(e){let t=!1,i=0,s,o="pending",l,u;const d=new Promise((O,k)=>{l=O,u=k});d.catch(Br);const f=()=>o!=="pending",g=O=>{if(!f()){const k=new tv(O);R(k),e.onCancel?.(k)}},m=()=>{t=!0},h=()=>{t=!1},x=()=>yb.isFocused()&&(e.networkMode==="always"||np.isOnline())&&e.canRun(),S=()=>Uk(e.networkMode)&&e.canRun(),w=O=>{f()||(s?.(),o="resolved",l(O))},R=O=>{f()||(s?.(),o="rejected",u(O))},E=O=>new Promise(k=>{s=A=>{(f()||O())&&k(A)},e.onPause?.()}).then(()=>{s=void 0,f()||e.onContinue?.()}),C=()=>{if(f())return;let O;const k=i===0?e.initialPromise:void 0;try{O=k??e.fn()}catch(A){O=Promise.reject(A)}Promise.resolve(O).then(w).catch(A=>{if(f())return;const N=e.retry??(mb()?0:3),j=e.retryDelay??Az,D=typeof j=="function"?j(i,A):j,M=N===!0||typeof N=="number"&&i<N||typeof N=="function"&&N(i,A);if(t||!M){R(A);return}i++,e.onFail?.(i,A),xz(D).then(()=>x()?void 0:E(x)).then(()=>{t?R(A):C()})})};return{promise:d,status:()=>o,cancel:g,continue:()=>(s?.(),d),cancelRetry:m,continueRetry:h,canStart:S,start:()=>(S()?C():E(S).then(C),d)}}var Fk=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Lk(this.gcTime)&&(this.#e=Ao.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mb()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Ao.clearTimeout(this.#e),this.#e=void 0)}};function Mz(e){return{onFetch:(t,i)=>{const s=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const g=async()=>{let m=!1;const h=w=>{Ez(w,()=>t.signal,()=>m=!0)},x=_k(t.options,t.fetchOptions),S=async(w,R,E)=>{if(m)return Promise.reject(t.signal.reason);if(R==null&&w.pages.length)return Promise.resolve(w);const O=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:R,direction:E?"backward":"forward",meta:t.options.meta};return h(j),j})(),k=await x(O),{maxPages:A}=t.options,N=E?wz:Sz;return{pages:N(w.pages,k,A),pageParams:N(w.pageParams,R,A)}};if(o&&l.length){const w=o==="backward",R=w?Nz:PE,E={pages:l,pageParams:u};d=await S(E,R(s,E),w)}else{const w=e??l.length;do{const R=f===0?u[0]===void 0?s.initialPageParam:u[0]:PE(s,d);if(f>0&&R==null)break;d=await S(d,R),f++}while(f<w)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},i):t.fetchFn=g}}}function PE(e,{pages:t,pageParams:i}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,i[s],i):void 0}function Nz(e,{pages:t,pageParams:i}){return t.length>0?e.getPreviousPageParam?.(t[0],t,i[0],i):void 0}var Dz=class extends Fk{#e;#t;#n;#r;#s;#i;#a;#l;constructor(e){super(),this.#l=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#r=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=zE(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.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=zE(this.options);t.data!==void 0&&(this.setState(LE(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const i=ev(this.state.data,e,this.options);return this.#o({data:i,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),i}setState(e){this.#o({type:"setState",state:e})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(Br).catch(Br):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=>Pn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pb||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pn(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:!zk(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.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 t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#i&&(this.#l||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(g=>g.options.queryFn);f&&this.setOptions(f.options)}const i=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#l=!0,i.signal)})},o=()=>{const f=_k(this.options,t),m=(()=>{const h={client:this.#s,queryKey:this.queryKey,meta:this.meta};return s(h),h})();return this.#l=!1,this.options.persister?this.options.persister(f,m,this):f(m)},u=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return s(f),f})();(this.#e==="infinite"?Mz(this.options.pages):this.options.behavior)?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta});const d=this.#i=Hk({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:f=>{f instanceof tv&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),i.abort()},onFail:(f,g)=>{this.#o({type:"failed",failureCount:f,error:g})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const f=await d.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#r.config.onSuccess?.(f,this),this.#r.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof tv){if(f.silent)return this.#i.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#r.config.onError?.(f,this),this.#r.config.onSettled?.(this.state.data,f,this),f}finally{this.#i===d&&(this.#i=void 0),this.scheduleGc()}}#o(e){const t=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Bk(i.data,this.options),fetchMeta:e.meta??null};case"success":const s={...i,...LE(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?s:void 0,s;case"error":const o=e.error;return{...i,error:o,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=t(this.state),Wn.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Bk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Uk(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function LE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function zE(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,i=t!==void 0,s=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var jz=class extends uc{#e;#t=void 0;#n=void 0;#r=void 0;#s;#i;#a;#l;#o;#h;#u;#d;#c;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),_E(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return nv(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return nv(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,i=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 Pn(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),t._defaulted&&!Oh(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&UE(this.#t,i,this.options,t)&&this.#f(),this.updateResult(),s&&(this.#t!==i||Pn(this.options.enabled,this.#t)!==Pn(t.enabled,this.#t)||Pn(this.options.staleTime,this.#t)!==Pn(t.staleTime,this.#t))&&this.#m();const o=this.#y();s&&(this.#t!==i||Pn(this.options.enabled,this.#t)!==Pn(t.enabled,this.#t)||o!==this.#c)&&this.#v(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(t,e);return Oh(this.getCurrentResult(),i)||(this.#r=i,this.#i=this.options,this.#s=this.#t.state),i}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(i,s)=>(this.trackProp(s),t?.(s),Reflect.get(i,s))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),i=this.#e.getQueryCache().build(this.#e,t);let s=()=>{},o;const l=new Promise(u=>{o=u,s=this.#e.getQueryCache().subscribe(d=>{d.type==="updated"&&d.query.queryHash===i.queryHash&&i.state.data!==void 0&&(s(),u(this.createResult(i,t)))})});return Promise.race([i.fetch(t).then(()=>{const u=this.createResult(i,t);return o?.(u),u}).finally(()=>{s()}),l])}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Br)),t}#g(e){return!mb()&&Pn(this.options.enabled,this.#t)!==!1&&Lk(e)}#m(){this.#x();const e=Pn(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#g(e))return;const t=zk(this.#r.dataUpdatedAt,e)+1;this.#u=Ao.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#y(){return Pn(this.options.refetchInterval,this.#t)??!1}#v(e){this.#S(),this.#c=e,!(this.#c===0||!this.#g(this.#c))&&(this.#d=Ao.setInterval(()=>{(this.options.refetchIntervalInBackground||yb.isFocused())&&this.#f()},this.#c))}#b(){this.#m(),this.#v(this.#y())}#x(){this.#u!==void 0&&(Ao.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#d!==void 0&&(Ao.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const i=this.#t,s=this.options,o=this.#r,l=this.#s,u=this.#i,d=e!==i?e.state:this.#n,{state:f}=e;let g={...f},m=!1,h;if(t._optimisticResults){const N=this.hasListeners(),j=!N&&_E(e,t),D=N&&UE(e,i,t,s);(j||D)&&(g={...g,...Bk(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:w}=g;h=g.data;let R=!1;if(t.placeholderData!==void 0&&h===void 0&&w==="pending"){let N;o?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(N=o.data,R=!0):N=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,N!==void 0&&(w="success",h=ev(o?.data,N,t),m=!0)}if(t.select&&h!==void 0&&!R)if(o&&h===l?.data&&t.select===this.#l)h=this.#o;else try{this.#l=t.select,h=t.select(h),h=ev(o?.data,h,t),this.#o=h,this.#a=null}catch(N){this.#a=N}else h===void 0&&(this.#a=null);this.#a&&(x=this.#a,h=this.#o,S=Date.now(),w="error",m=!1);const E=g.fetchStatus==="fetching",C=w==="pending",O=w==="error",k=C&&E,A=h!==void 0;return{status:w,fetchStatus:g.fetchStatus,isPending:C,isSuccess:w==="success",isError:O,isInitialLoading:k,isLoading:k,data:h,dataUpdatedAt:g.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:E,isRefetching:E&&!C,isLoadingError:O&&!A,isPaused:g.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:O&&A,isStale:vb(e,t),refetch:this.refetch,isEnabled:Pn(t.enabled,e)!==!1}}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#i=this.options,this.#s.data!==void 0&&(this.#h=this.#t),Oh(t,e))return;this.#r=t;const s=(()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!this.#p.size)return!0;const u=new Set(l??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#r).some(d=>{const f=d;return this.#r[f]!==e[f]&&u.has(f)})})();Wn.batch(()=>{s&&this.listeners.forEach(o=>{o(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 t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function Iz(e,t){return Pn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Pn(t.retryOnMount,e)===!1)}function _E(e,t){return Iz(e,t)||e.state.data!==void 0&&nv(e,t,t.refetchOnMount)}function nv(e,t,i){if(Pn(t.enabled,e)!==!1&&Pn(t.staleTime,e)!=="static"){const s=Pn(i,e);return s==="always"||s!==!1&&vb(e,t)}return!1}function UE(e,t,i,s){return(e!==t||Pn(s.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&vb(e,i)}function vb(e,t){return Pn(t.enabled,e)!==!1&&e.isStaleByTime(Pn(t.staleTime,e))}var Pz=class extends Fk{#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||Vk(),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(t=>t!==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 t=()=>{this.#s({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},s=this.#r=Hk({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(u,d)=>{this.#s({type:"failed",failureCount:u,error:d})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),o=this.state.status==="pending",l=!s.canStart();try{if(o)t();else{this.#s({type:"pending",variables:e,isPaused:l}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,i);const d=await this.options.onMutate?.(e,i);d!==this.state.context&&this.#s({type:"pending",context:d,variables:e,isPaused:l})}const u=await s.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,i),await this.options.onSuccess?.(u,e,this.state.context,i),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(u,null,e,this.state.context,i),this.#s({type:"success",data:u}),u}catch(u){try{await this.#n.config.onError?.(u,e,this.state.context,this,i)}catch(d){Promise.reject(d)}try{await this.options.onError?.(u,e,this.state.context,i)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,i)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,i)}catch(d){Promise.reject(d)}throw this.#s({type:"error",error:u}),u}finally{this.#r===s&&(this.#r=void 0),this.#n.runNext(this)}}#s(e){const t=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,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{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Wn.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Vk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Lz=class extends uc{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,i){const s=new Pz({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:i});return this.add(s),s}add(e){this.#e.add(e);const t=ch(e);if(typeof t=="string"){const i=this.#t.get(t);i?i.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ch(e);if(typeof t=="string"){const i=this.#t.get(t);if(i)if(i.length>1){const s=i.indexOf(e);s!==-1&&i.splice(s,1)}else i[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ch(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=ch(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Wn.batch(()=>{const e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(t=>{this.notify({type:"removed",mutation:t})})})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(i=>DE(t,i))}findAll(e={}){return this.getAll().filter(t=>DE(e,t))}notify(e){Wn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Wn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Br))))}};function ch(e){return e.options.scope?.id}var zz=class extends uc{#e;#t=void 0;#n;#r;constructor(t,i){super(),this.#e=t,this.setOptions(i),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const i=this.options;this.options=this.#e.defaultMutationOptions(t),Oh(this.options,i)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&zo(i.mutationKey)!==zo(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.#s())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#s(),this.#i(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#s(),this.#i()}mutate(t,i){return this.#r=i,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#s(){const t=this.#n?.state??Vk();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#i(t){Wn.batch(()=>{const i=this.#r;if(i&&this.hasListeners()){const s=this.#t.variables,o=this.#t.context,l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{i.onSuccess?.(t.data,s,o,l)}catch(u){Promise.reject(u)}try{i.onSettled?.(t.data,null,s,o,l)}catch(u){Promise.reject(u)}}else if(t?.type==="error"){try{i.onError?.(t.error,s,o,l)}catch(u){Promise.reject(u)}try{i.onSettled?.(void 0,t.error,s,o,l)}catch(u){Promise.reject(u)}}}this.listeners.forEach(s=>{s(this.#t)})})}},Kk=class extends uc{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,i){const s=t.queryKey,o=t.queryHash??fb(s,t);let l=this.get(o);return l||(l=new Dz({client:e,queryKey:s,queryHash:o,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(s)}),this.add(l)),l}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 t={exact:!0,...e};return this.getAll().find(i=>NE(t,i))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(i=>NE(e,i)):t}notify(e){Wn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},_z=class{#e;#t;#n;#r;#s;#i;#a;#l;constructor(e={}){this.#e=e.queryCache||new Kk,this.#t=e.mutationCache||new Lz,this.#n=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=yb.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=np.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=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 t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),i=this.#e.build(this,t),s=i.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(Pn(t.staleTime,i))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:i})=>[t,i.data])}setQueryData(e,t,i){const s=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(s.queryHash)?.state.data,l=vz(t,o);if(l!==void 0)return this.#e.build(this,s).setData(l,{...i,manual:!0})}setQueriesData(e,t,i){return Wn.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,i)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Wn.batch(()=>{t.findAll(e).forEach(i=>{t.remove(i)})})}resetQueries(e,t){const i=this.#e;return Wn.batch(()=>{const s=i.findAll(e),o=new Set(s);return s.forEach(l=>{l.reset()}),this.refetchQueries({type:"active",predicate:l=>o.has(l)},t)})}cancelQueries(e,t={}){const i={revert:!0,...t},s=Wn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(i)));return Promise.all(s).then(Br).catch(Br)}invalidateQueries(e,t={}){return Wn.batch(()=>(this.#e.findAll(e).forEach(i=>{i.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const i={...t,cancelRefetch:t.cancelRefetch??!0},s=Wn.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,i);return i.throwOnError||(l=l.catch(Br)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(Br)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const i=this.#e.build(this,t),s=i.isStaleByTime(Pn(t.staleTime,i))?await i.fetch(t):i.state.data,o=t.select;return o?o(s):s}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const i=this.#e.build(this,t);return i.isStaleByTime(Pn(t.staleTime,i))?i.fetch(t):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Br).catch(Br)}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(Br).catch(Br)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return np.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,t){this.#r.set(zo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],i={};return t.forEach(s=>{ic(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,t){this.#s.set(zo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],i={};return t.forEach(s=>{ic(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===pb&&(t.enabled=!1),t}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 qk=b.createContext(!1),Uz=()=>b.useContext(qk);qk.Provider;function Hz(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Fz=b.createContext(Hz()),Bz=()=>b.useContext(Fz),Vz=(e,t,i)=>{const s=i?.state.status==="error"&&typeof e.throwOnError=="function"?gb(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||s)&&(t.isReset()||(e.retryOnMount=!1))},Kz=e=>{b.useEffect(()=>{e.clearReset()},[e])},qz=({result:e,errorResetBoundary:t,throwOnError:i,query:s,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(o&&e.data===void 0||gb(i,[e.error,s])),Yz=e=>{if(e.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...o)=>i(s(...o)):i(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Gz=(e,t)=>e?.suspense&&t.isPending,$z=(e,t,i)=>t.fetchOptimistic(e).catch(()=>{i.clearReset()});function Qz(e,t,i){const s=Uz(),o=Bz(),l=jr(i),u=l.defaultQueryOptions(e),d=l.getQueryCache().get(u.queryHash),f=e.subscribed!==!1;u._optimisticResults=s?"isRestoring":f?"optimistic":void 0,Yz(u),Vz(u,o,d),Kz(o);const[g]=b.useState(()=>new t(l,u)),m=g.getOptimisticResult(u),h=!s&&f;if(b.useSyncExternalStore(b.useCallback(x=>{const S=h?g.subscribe(Wn.batchCalls(x)):Br;return g.updateResult(),S},[g,h]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),b.useEffect(()=>{g.setOptions(u)},[u,g]),Gz(u,m))throw $z(u,g,o);if(qz({result:m,errorResetBoundary:o,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw m.error;return u.notifyOnChangeProps?m:g.trackResult(m)}function na(e,t){return Qz(e,jz,t)}function rg(e,t){const i=jr(t);return Zz({filters:{...e,status:"pending"}},i).length}function Xz(){let e;return(t,i)=>{let s=[],o;return()=>{const l=t.findAll(i.filters),u=l.flatMap(d=>[d,d.state]);return(!o||u.length!==s.length||u.some((d,f)=>!Object.is(d,s[f])))&&(s=u,o=hb(e,l.map(d=>i.select?i.select(d):d.state)),e=o),o}}}function Zz(e={},t){const i=jr(t).getMutationCache(),[s]=b.useState(()=>Xz()),o=s(i,e);return b.useSyncExternalStore(b.useCallback(l=>i.subscribe(Wn.batchCalls(l)),[i]),o,o)}function er(e,t){const i=jr(t),[s]=b.useState(()=>new zz(i,e));b.useEffect(()=>{s.setOptions(e)},[s,e]);const o=b.useSyncExternalStore(b.useCallback(u=>s.subscribe(Wn.batchCalls(u)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),l=b.useCallback((...u)=>{s.mutate(u[0],u[1]).catch(Br)},[s]);if(o.error&&gb(s.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:l,mutateAsync:o.mutate}}const dd="/api/settings";function Jz(e){return dc({signal:e})}function Wz(e){return dc({method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function e_(){return dc({method:"POST"},`${dd}/config-folder/open`)}function t_(e){return dc({signal:e},`${dd}/skill-copy`)}function n_(e){return dc({method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)},`${dd}/skill-copy`)}function r_(e){return dc({signal:e},`${dd}/skill-status`)}async function dc(e,t=dd){const i=await fetch(t,e);if(!i.ok)throw new Error(await i_(i));return i.json()}async function i_(e){try{return(await e.json()).error?.message??`Request failed with status ${e.status}`}catch{return`Request failed with status ${e.status}`}}const Yk=["skill-status"];function s_(){return na({queryKey:Yk,queryFn:({signal:e})=>r_(e),retry:!1})}const py=768;function bb(){const[e,t]=b.useState(void 0);return b.useEffect(()=>{const i=window.matchMedia(`(max-width: ${py-1}px)`),s=()=>{t(window.innerWidth<py)};return i.addEventListener("change",s),t(window.innerWidth<py),()=>i.removeEventListener("change",s)},[]),!!e}const a_={agents:"statusBar.targetAgents",claude:"statusBar.targetClaude"},o_={missing:"statusBar.statusMissing",outdated:"statusBar.statusOutdated",current:"statusBar.statusCurrent"},rv={missing:"text-red-600 dark:text-red-400",outdated:"text-amber-600 dark:text-amber-400",current:"text-emerald-600 dark:text-emerald-400"},Gk={missing:fL,outdated:ib,current:yT};function l_(){const{t:e}=pt(),t=bb(),i=b.useRef(null),[s,o]=b.useState(!1),l=s_(),u=l.data?.targets??[],d=u.length>0?u_(u):void 0,f=d?Gk[d]:void 0,g=u.filter(({status:h})=>h!=="current"),m=`foundry settings download-skill --target ${g.map(({target:h})=>h==="agents"?".agents":".claude").join(",")}`;return v.jsxs("div",{ref:i,"data-slot":"skill-status-bar",className:`
|
|
13
|
-
fixed inset-x-0 bottom-0 z-20 flex h-6 items-center justify-between
|
|
14
|
-
gap-3 border-t bg-background/95 px-3 text-[11px] text-muted-foreground
|
|
15
|
-
backdrop-blur-sm
|
|
16
|
-
`,children:[v.jsx("span",{"data-slot":"skill-status-version",className:"min-w-0 truncate",children:l.data?e("statusBar.foundryVersion",{version:l.data.version}):e("statusBar.foundry")}),v.jsxs(ub,{open:s,onOpenChange:o,children:[v.jsxs(Ik,{openOnHover:!t,delay:120,"aria-label":e("statusBar.skillStatus"),className:`
|
|
17
|
-
flex h-5 cursor-pointer items-center gap-1.5 rounded-sm px-1.5
|
|
18
|
-
outline-none
|
|
19
|
-
hover:bg-muted hover:text-foreground
|
|
20
|
-
focus-visible:ring-2 focus-visible:ring-ring/50
|
|
21
|
-
`,children:[v.jsx("span",{children:e("statusBar.skill")}),l.isPending&&v.jsx("span",{className:`
|
|
22
|
-
size-1.5 animate-pulse rounded-full bg-muted-foreground
|
|
23
|
-
`}),l.isError&&v.jsx(ib,{className:`
|
|
24
|
-
size-3 text-amber-600
|
|
25
|
-
dark:text-amber-400
|
|
26
|
-
`}),f&&d&&v.jsx(f,{className:`
|
|
27
|
-
size-3
|
|
28
|
-
${rv[d]}
|
|
29
|
-
`})]}),v.jsx(db,{anchor:t?i:void 0,side:"top",align:t?"center":"end",sideOffset:8,className:`
|
|
30
|
-
w-[calc(100vw-2rem)] max-w-[calc(100vw-2rem)]
|
|
31
|
-
md:w-116
|
|
32
|
-
`,children:v.jsxs("div",{className:"flex flex-col gap-3",children:[l.isPending&&v.jsx("p",{className:"text-xs text-muted-foreground",children:e("statusBar.skillChecking")}),l.isError&&v.jsx("p",{className:`
|
|
33
|
-
text-xs text-amber-600
|
|
34
|
-
dark:text-amber-400
|
|
35
|
-
`,children:e("statusBar.skillUnavailable")}),u.length>0&&v.jsx("div",{className:"flex flex-col gap-3",children:u.map(h=>v.jsx(c_,{...h},h.target))}),g.length>0&&v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx("p",{className:"text-[11px] text-muted-foreground",children:v.jsx(Wp,{i18nKey:"statusBar.skillRefreshHint",components:{settings:v.jsx("a",{href:"#/settings?panel=advanced",onClick:()=>o(!1),className:`
|
|
36
|
-
font-medium text-foreground underline
|
|
37
|
-
underline-offset-2
|
|
38
|
-
`})}})}),v.jsxs(D5,{size:"sm",children:[v.jsxs(j5,{children:[v.jsxs(I5,{children:[v.jsx(ML,{}),e("statusBar.terminal")]}),v.jsx(P5,{children:v.jsx(L5,{value:m,"aria-label":e("statusBar.copyCommand")})})]}),v.jsx(z5,{wrap:!0,children:m})]})]})]})})]})]})}function c_({target:e,status:t,destination:i}){const{t:s}=pt(),o=Gk[t];return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("div",{className:"flex items-center justify-between gap-2",children:[v.jsxs("span",{className:`
|
|
39
|
-
flex items-center gap-1.5 text-xs font-medium text-foreground
|
|
40
|
-
`,children:[v.jsx(o,{className:`
|
|
41
|
-
size-3
|
|
42
|
-
${rv[t]}
|
|
43
|
-
`}),s(a_[e])]}),v.jsx("span",{className:`
|
|
44
|
-
text-[11px]
|
|
45
|
-
${rv[t]}
|
|
46
|
-
`,children:s(o_[t])})]}),v.jsx("code",{className:"font-mono text-[11px] break-all text-muted-foreground",children:i})]})}function u_(e){return e.some(({status:t})=>t==="missing")?"missing":e.some(({status:t})=>t==="outdated")?"outdated":"current"}var $k=e=>{throw TypeError(e)},Qk=(e,t,i)=>t.has(e)||$k("Cannot "+i),Mi=(e,t,i)=>(Qk(e,t,"read from private field"),i?i.call(e):t.get(e)),wu=(e,t,i)=>t.has(e)?$k("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),hs=(e,t,i,s)=>(Qk(e,t,"write to private field"),t.set(e,i),i),ig=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,sg=/^[\\/]{2}/;function Xk(e,t){return t+e.replace(/\\/g,"/")}var HE="popstate";function FE(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function d_(e={}){function t(o,l){let{pathname:u="/",search:d="",hash:f=""}=es(o.location.hash.substring(1));return!u.startsWith("/")&&!u.startsWith(".")&&(u="/"+u),Hu("",{pathname:u,search:d,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function i(o,l){let u=o.document.querySelector("base"),d="";if(u&&u.getAttribute("href")){let f=o.location.href,g=f.indexOf("#");d=g===-1?f:f.slice(0,g)}return d+"#"+(typeof l=="string"?l:Nr(l))}function s(o,l){Hn(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(l)})`)}return h_(t,i,s,e)}function _t(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Hn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function f_(){return Math.random().toString(36).substring(2,10)}function BE(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Hu(e,t,i=null,s,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?es(t):t,state:i,key:t&&t.key||s||f_(),mask:o}}function Nr({pathname:e="/",search:t="",hash:i=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function es(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substring(i),e=e.substring(0,i));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function h_(e,t,i,s={}){let{window:o=document.defaultView,v5Compat:l=!1}=s,u=o.history,d="POP",f=null,g=m();g==null&&(g=0,u.replaceState({...u.state,idx:g},""));function m(){return(u.state||{idx:null}).idx}function h(){d="POP";let E=m(),C=E==null?null:E-g;g=E,f&&f({action:d,location:R.location,delta:C})}function x(E,C){d="PUSH";let O=FE(E)?E:Hu(R.location,E,C);i&&i(O,E),g=m()+1;let k=BE(O,g),A=R.createHref(O.mask||O);try{u.pushState(k,"",A)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;o.location.assign(A)}l&&f&&f({action:d,location:R.location,delta:1})}function S(E,C){d="REPLACE";let O=FE(E)?E:Hu(R.location,E,C);i&&i(O,E),g=m();let k=BE(O,g),A=R.createHref(O.mask||O);u.replaceState(k,"",A),l&&f&&f({action:d,location:R.location,delta:0})}function w(E){return Zk(o,E)}let R={get action(){return d},get location(){return e(o,u)},listen(E){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(HE,h),f=E,()=>{o.removeEventListener(HE,h),f=null}},createHref(E){return t(o,E)},createURL:w,encodeLocation(E){let C=w(E);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:x,replace:S,go(E){return u.go(E)}};return R}function Zk(e,t,i=!1){let s="http://localhost";e&&(s=e.location.origin!=="null"?e.location.origin:e.location.href),_t(s,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Nr(t);return o=o.replace(/ $/,"%20"),!i&&sg.test(o)&&(o=s+o),new URL(o,s)}var Eu,VE=class{constructor(e){if(wu(this,Eu,new Map),e)for(let[t,i]of e)this.set(t,i)}get(e){if(Mi(this,Eu).has(e))return Mi(this,Eu).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Mi(this,Eu).set(e,t)}};Eu=new WeakMap;var p_=new Set(["lazy","caseSensitive","path","id","index","children"]);function g_(e){return p_.has(e)}var m_=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function y_(e){return m_.has(e)}function v_(e){return e.index===!0}function Fu(e,t,i=[],s={},o=!1){return e.map((l,u)=>{let d=[...i,String(u)],f=typeof l.id=="string"?l.id:d.join("-");if(_t(l.index!==!0||!l.children,"Cannot specify children on an index route"),_t(o||!s[f],`Found a route id collision on id "${f}". Route id's must be globally unique within Data Router usages`),v_(l)){let g={...l,id:f};return s[f]=KE(g,t(g)),g}else{let g={...l,id:f,children:void 0};return s[f]=KE(g,t(g)),l.children&&(g.children=Fu(l.children,t,d,s,o)),g}})}function KE(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Jk(e,t,i="/"){return qi(e,t,i,!1)}function qi(e,t,i,s,o){let l=typeof t=="string"?es(t):t,u=ti(l.pathname||"/",i);if(u==null)return null;let d=o??Ah(e),f=null,g=rO(u);for(let m=0;f==null&&m<d.length;++m)f=A_(d[m],g,s);return f}function b_(e,t){let{route:i,pathname:s,params:o}=e;return{id:i.id,pathname:s,params:o,data:t[i.id],loaderData:t[i.id],handle:i.handle}}function Ah(e){let t=Wk(e);return x_(t),t}function Wk(e,t=[],i=[],s="",o=!1){let l=(u,d,f=o,g)=>{let m={relativePath:g===void 0?u.path||"":g,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(s)&&f)return;_t(m.relativePath.startsWith(s),`Absolute route path "${m.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(s.length)}let h=Ii([s,m.relativePath]),x=i.concat(m);u.children&&u.children.length>0&&(_t(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Wk(u.children,t,x,h,f)),!(u.path==null&&!u.index)&&t.push({path:h,score:k_(h,u.index),routesMeta:x.map((S,w)=>{let[R,E]=nO(S.relativePath,S.caseSensitive,w===x.length-1);return{...S,matcher:R,compiledParams:E}})})};return e.forEach((u,d)=>{if(u.path===""||!u.path?.includes("?"))l(u,d);else for(let f of eO(u.path))l(u,d,!0,f)}),t}function eO(e){let t=e.split("/");if(t.length===0)return[];let[i,...s]=t,o=i.endsWith("?"),l=i.replace(/\?$/,"");if(s.length===0)return o?[l,""]:[l];let u=eO(s.join("/")),d=[];return d.push(...u.map(f=>f===""?l:[l,f].join("/"))),o&&d.push(...u),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function x_(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:O_(t.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var S_=/^:[\w-]+$/,w_=3,E_=2,C_=1,R_=10,T_=-2,qE=e=>e==="*";function k_(e,t){let i=e.split("/"),s=i.length;return i.some(qE)&&(s+=T_),t&&(s+=E_),i.filter(o=>!qE(o)).reduce((o,l)=>o+(S_.test(l)?w_:l===""?C_:R_),s)}function O_(e,t){return e.length===t.length&&e.slice(0,-1).every((s,o)=>s===t[o])?e[e.length-1]-t[t.length-1]:0}function A_(e,t,i=!1){let{routesMeta:s}=e,o={},l="/",u=[];for(let d=0;d<s.length;++d){let f=s[d],g=d===s.length-1,m=l==="/"?t:t.slice(l.length)||"/",h={path:f.relativePath,caseSensitive:f.caseSensitive,end:g},x=f.matcher&&f.compiledParams?tO(h,m,f.matcher,f.compiledParams):Bu(h,m),S=f.route;if(!x&&g&&i&&!s[s.length-1].route.index&&(x=Bu({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!x)return null;Object.assign(o,x.params),u.push({params:o,pathname:Ii([l,x.pathname]),pathnameBase:D_(Ii([l,x.pathnameBase])),route:S}),x.pathnameBase!=="/"&&(l=Ii([l,x.pathnameBase]))}return u}function Bu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,s]=nO(e.path,e.caseSensitive,e.end);return tO(e,t,i,s)}function tO(e,t,i,s){let o=t.match(i);if(!o)return null;let l=o[0],u=sc(l,1),d=o.slice(1);return{params:s.reduce((g,{paramName:m,isOptional:h},x)=>{if(m==="*"){let w=d[x]||"";u=sc(l.slice(0,l.length-w.length),1)}const S=d[x];return h&&!S?g[m]=void 0:g[m]=(S||"").replace(/%2F/g,"/"),g},{}),pathname:l,pathnameBase:u,pattern:e}}function nO(e,t=!1,i=!0){Hn(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 s=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,f,g,m)=>{if(s.push({paramName:d,isOptional:f!=null}),f){let h=m.charAt(g+u.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),s]}function rO(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Hn(!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 (${t}).`),e}}function ti(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,s=e.charAt(i);return s&&s!=="/"?null:e.slice(i)||"/"}function M_({basename:e,pathname:t}){return t==="/"?e:Ii([e,t])}var xb=e=>ig.test(e);function N_(e,t="/"){let{pathname:i,search:s="",hash:o=""}=typeof e=="string"?es(e):e,l;return i?(i=Sb(i),i.startsWith("/")||i.startsWith("\\")?l=YE(i.substring(1),"/"):l=YE(i,t)):l=t,{pathname:l,search:j_(s),hash:I_(o)}}function YE(e,t){let i=sc(t).split("/");return e.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function gy(e,t,i,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function iO(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function ag(e){let t=iO(e);return t.map((i,s)=>s===t.length-1?i.pathname:i.pathnameBase)}function fd(e,t,i,s=!1){let o;typeof e=="string"?o=es(e):(o={...e},_t(!o.pathname||!o.pathname.includes("?"),gy("?","pathname","search",o)),_t(!o.pathname||!o.pathname.includes("#"),gy("#","pathname","hash",o)),_t(!o.search||!o.search.includes("#"),gy("#","search","hash",o)));let l=e===""||o.pathname==="",u=l?"/":o.pathname,d;if(u==null)d=i;else{let h=t.length-1;if(!s&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),h-=1;o.pathname=x.join("/")}d=h>=0?t[h]:"/"}let f=N_(o,d),g=u&&u!=="/"&&u.endsWith("/"),m=(l||u===".")&&i.endsWith("/");return!f.pathname.endsWith("/")&&(g||m)&&(f.pathname+="/"),f}var Sb=e=>e.replace(/[\\/]{2,}/g,"/"),Ii=e=>Sb(e.join("/"));function sc(e,t=0){let i=e.length;for(;i>t&&e.charCodeAt(i-1)===47;)i--;return i===e.length?e:e.slice(0,i)}var D_=e=>sc(e).replace(/^\/*/,"/"),j_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,I_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,P_=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],hd=class{constructor(e,t,i,s=!1){this.status=e,this.statusText=t||"",this.internal=s,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Vu(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function pd(e){let t=e.map(i=>i.route.path).filter(Boolean);return Ii(t)||"/"}var sO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function aO(e,t){let i=e;if(typeof i!="string"||!ig.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let s=i,o=!1;if(sO)try{let l=new URL(window.location.href),u=sg.test(i)?new URL(Xk(i,l.protocol)):new URL(i),d=ti(u.pathname,t);u.origin===l.origin&&d!=null?i=d+u.search+u.hash:o=!0}catch{Hn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:o,to:i}}var _a=Symbol("Uninstrumented");function L_(e,t){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:t.id,index:t.index,path:t.path,instrument(l){let u=Object.keys(i);for(let d of u)l[d]&&i[d].push(l[d])}}));let s={};if(typeof t.lazy=="function"&&i.lazy.length>0){let o=Fl(i.lazy,t.lazy,()=>{});o&&(s.lazy=o)}if(typeof t.lazy=="object"){let o=t.lazy;["middleware","loader","action"].forEach(l=>{let u=o[l],d=i[`lazy.${l}`];if(typeof u=="function"&&d.length>0){let f=Fl(d,u,()=>{});f&&(s.lazy=Object.assign(s.lazy||{},{[l]:f}))}})}return["loader","action"].forEach(o=>{let l=t[o];if(typeof l=="function"&&i[o].length>0){let u=l[_a]??l,d=Fl(i[o],u,(...f)=>GE(f[0]));d&&(o==="loader"&&u.hydrate===!0&&(d.hydrate=!0),d[_a]=u,s[o]=d)}}),t.middleware&&t.middleware.length>0&&i.middleware.length>0&&(s.middleware=t.middleware.map(o=>{let l=o[_a]??o,u=Fl(i.middleware,l,(...d)=>GE(d[0]));return u?(u[_a]=l,u):o})),s}function z_(e,t){let i={navigate:[],fetch:[]};if(t.forEach(s=>s({instrument(o){let l=Object.keys(o);for(let u of l)o[u]&&i[u].push(o[u])}})),i.navigate.length>0){let s=e.navigate[_a]??e.navigate,o=Fl(i.navigate,s,(...l)=>{let[u,d]=l;return{to:typeof u=="number"||typeof u=="string"?u:u?Nr(u):".",...$E(e,d??{})}});o&&(o[_a]=s,e.navigate=o)}if(i.fetch.length>0){let s=e.fetch[_a]??e.fetch,o=Fl(i.fetch,s,(...l)=>{let[u,,d,f]=l;return{href:d??".",fetcherKey:u,...$E(e,f??{})}});o&&(o[_a]=s,e.fetch=o)}return e}function Fl(e,t,i){return e.length===0?null:async(...s)=>{let o=await oO(e,i(...s),()=>t(...s),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function oO(e,t,i,s){let o=e[s],l;if(o){let u,d=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=oO(e,t,i,s-1),l=await u,_t(l,"Expected a result"),l.type==="error"&&l.value instanceof Error?{status:"error",error:l.value}:{status:"success",error:void 0});try{await o(d,t)}catch(f){console.error("An instrumentation function threw an error:",f)}u||await d(),await u}else try{l={type:"success",value:await i()}}catch(u){l={type:"error",value:u}}return l||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function GE(e){let{request:t,context:i,params:s,pattern:o}=e;return{request:__(t),params:{...s},pattern:o,context:U_(i)}}function $E(e,t){return{currentUrl:Nr(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function __(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function U_(e){if(F_(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var H_=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function F_(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===H_}var QE=new URL("http://localhost");function wb(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),QE)}catch{return QE}}function my(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function B_(e,t){if(e.startsWith("//"))return!0;let i=t.protocol.toLowerCase();return e.toLowerCase().startsWith(i)?t.host===""||e.slice(i.length).startsWith("//"):!1}function Xl(e,t,i,s){let o=null;try{o=e==null?null:new URL(e,i)}catch{}let l=new URL(t,i),u=o!=null&&!my(o,i),d=!my(l,i);if(s==="reject"){if(u||d)throw new Error("External navigation is not allowed")}else if(d&&(o==null||!B_(e,o)||!my(o,l)))throw new Error("External navigation is not allowed")}var lO=["POST","PUT","PATCH","DELETE"],V_=new Set(lO),K_=["GET",...lO],q_=new Set(K_),cO=new Set([301,302,303,307,308]),Y_=new Set([307,308]),yy={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},G_={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ll={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},$_=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),uO="remix-router-transitions",dO=Symbol("ResetLoaderData"),ko,zl,ja,_l,Q_=class{constructor(e){wu(this,ko),wu(this,zl),wu(this,ja),wu(this,_l),hs(this,ko,e),hs(this,zl,Ah(e))}get stableRoutes(){return Mi(this,ko)}get activeRoutes(){return Mi(this,ja)??Mi(this,ko)}get branches(){return Mi(this,_l)??Mi(this,zl)}get hasHMRRoutes(){return Mi(this,ja)!=null}setRoutes(e){hs(this,ko,e),hs(this,zl,Ah(e))}setHmrRoutes(e){hs(this,ja,e),hs(this,_l,Ah(e))}commitHmrRoutes(){Mi(this,ja)&&(hs(this,ko,Mi(this,ja)),hs(this,zl,Mi(this,_l)),hs(this,ja,void 0),hs(this,_l,void 0))}};ko=new WeakMap;zl=new WeakMap;ja=new WeakMap;_l=new WeakMap;function X_(e){const t=e.window?e.window:typeof window<"u"?window:void 0,i=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";_t(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=e.hydrationRouteProperties||[],o=e.mapRouteProperties||$_,l=o;if(e.instrumentations){let F=e.instrumentations;l=J=>({...o(J),...L_(F.map(ne=>ne.route).filter(Boolean),J)})}let u={},d=new Q_(Fu(e.routes,l,void 0,u)),f=e.basename||"/";f.startsWith("/")||(f=`/${f}`);let g=e.dataStrategy||t6,m={...e.future},h=null,x=new Set,S=null,w=null,R=null,E=null,C=e.hydrationData!=null,O=qi(d.activeRoutes,e.history.location,f,!1,d.branches),k=!1,A=null,N,j;if(O==null&&!e.patchRoutesOnNavigation){let F=Ni(404,{pathname:e.history.location.pathname}),{matches:J,route:ne}=uh(d.activeRoutes);N=!0,j=!N,O=J,A={[ne.id]:F}}else if(O&&!e.hydrationData&&Ie(O,d.activeRoutes,e.history.location.pathname).active&&(O=null),O)if(O.some(F=>F.route.lazy))N=!1,j=!N;else if(!O.some(F=>Eb(F.route)))N=!0,j=!N;else{let F=e.hydrationData?e.hydrationData.loaderData:null,J=e.hydrationData?e.hydrationData.errors:null,ne=O;if(J){let ye=O.findIndex(xe=>J[xe.route.id]!==void 0);ne=ne.slice(0,ye+1)}j=!1,N=!0,ne.forEach(ye=>{let xe=fO(ye.route,F,J);j=j||xe.renderFallback,N=N&&!xe.shouldLoad})}else{N=!1,j=!N,O=[];let F=Ie(null,d.activeRoutes,e.history.location.pathname);F.active&&F.matches&&(k=!0,O=F.matches)}let D,M={historyAction:e.history.action,location:e.history.location,matches:O,initialized:N,renderFallback:j,navigation:yy,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},_="POP",L=null,q=!1,X,B=!1,H=new Map,U=null,z=!1,Q=!1,$=new Set,K=new Map,Y=0,ee=-1,G=new Map,oe=new Set,I=new Map,V=new Map,W=new Set,re=new Map,Ee,le=null;function me(){if(h=e.history.listen(({action:F,location:J,delta:ne})=>{if(Ee){Ee(),Ee=void 0;return}Hn(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=xt({currentLocation:M.location,nextLocation:J,historyAction:F});if(ye&&ne!=null){let xe=new Promise(qe=>{Ee=qe});e.history.go(ne*-1),ht(ye,{state:"blocked",location:J,proceed(){ht(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:J}),xe.then(()=>e.history.go(ne))},reset(){let qe=new Map(M.blockers);qe.set(ye,Ll),Te({blockers:qe})}}),L?.resolve(),L=null;return}return Le(F,J)}),i){x6(t,H);let F=()=>S6(t,H);t.addEventListener("pagehide",F),U=()=>t.removeEventListener("pagehide",F)}return M.initialized||Le("POP",M.location,{initialHydration:!0}),D}function ge(){h&&h(),U&&U(),x.clear(),X&&X.abort(),M.fetchers.forEach((F,J)=>Nt(M.fetchers,J)),M.blockers.forEach((F,J)=>Zt(J))}function ue(F){if(x.add(F),S){let{newErrors:J}=S;S=null,F(M,{deletedFetchers:[],newErrors:J,viewTransitionOpts:void 0,flushSync:!1})}return()=>x.delete(F)}function Te(F,J={}){F.matches&&(F.matches=F.matches.map(xe=>{let qe=u[xe.route.id],Ke=xe.route;return Ke.element!==qe.element||Ke.errorElement!==qe.errorElement||Ke.hydrateFallbackElement!==qe.hydrateFallbackElement?{...xe,route:qe}:xe})),M={...M,...F};let ne=[],ye=[];M.fetchers.forEach((xe,qe)=>{xe.state==="idle"&&(W.has(qe)?ne.push(qe):ye.push(qe))}),W.forEach(xe=>{!M.fetchers.has(xe)&&!K.has(xe)&&ne.push(xe)}),x.size===0&&(S={newErrors:F.errors??null}),[...x].forEach(xe=>xe(M,{deletedFetchers:ne,newErrors:F.errors??null,viewTransitionOpts:J.viewTransitionOpts,flushSync:J.flushSync===!0})),ne.forEach(xe=>Nt(M.fetchers,xe)),ye.forEach(xe=>M.fetchers.delete(xe))}function ve(F,J,{flushSync:ne}={}){let ye=M.actionData!=null&&M.navigation.formMethod!=null&&Or(M.navigation.formMethod)&&M.navigation.state==="loading"&&F.state?._isRedirect!==!0,xe;J.actionData?Object.keys(J.actionData).length>0?xe=J.actionData:xe=null:ye?xe=M.actionData:xe=null;let qe=J.loaderData?sC(M.loaderData,J.loaderData,J.matches||[],J.errors):M.loaderData,Ke=M.blockers;Ke.size>0&&(Ke=new Map(Ke),Ke.forEach((tt,Et)=>Ke.set(Et,Ll)));let Xe=z?!1:at(F,J.matches||M.matches),Qe=q===!0||M.navigation.formMethod!=null&&Or(M.navigation.formMethod)&&F.state?._isRedirect!==!0;d.commitHmrRoutes(),z||_==="POP"||(_==="PUSH"?e.history.push(F,F.state):_==="REPLACE"&&e.history.replace(F,F.state));let lt;if(_==="POP"&&!z&&F!==M.location){let tt=H.get(M.location.pathname);tt&&tt.has(F.pathname)?lt={currentLocation:M.location,nextLocation:F}:H.has(F.pathname)&&(lt={currentLocation:F,nextLocation:M.location})}else if(B){let tt=H.get(M.location.pathname);tt?tt.add(F.pathname):(tt=new Set([F.pathname]),H.set(M.location.pathname,tt)),lt={currentLocation:M.location,nextLocation:F}}Te({...J,actionData:xe,loaderData:qe,historyAction:_,location:F,initialized:!0,renderFallback:!1,navigation:yy,revalidation:"idle",restoreScrollPosition:Xe,preventScrollReset:Qe,blockers:Ke},{viewTransitionOpts:lt,flushSync:ne===!0}),_="POP",q=!1,B=!1,z=!1,Q=!1,L?.resolve(),L=null,le?.resolve(),le=null}async function Pe(F,J){if(L?.resolve(),L=null,typeof F=="number"){L||(L=cC());let Bt=L.promise;return e.history.go(F),Bt}let ne=iv(M.location,M.matches,f,F,J?.fromRouteId,J?.relative),{path:ye,submission:xe,error:qe}=XE(!1,ne,J),Ke;if(J?.mask){let Bt=typeof J.mask=="string"?es(J.mask):{...M.location.mask,...J.mask};if(Ke={pathname:Bt.pathname??"",search:Bt.search??"",hash:Bt.hash??""},sg.test(Ke.pathname))throw new Error("External navigation is not allowed");Ke.pathname.startsWith("\\")&&(Ke.pathname=Ke.pathname.replace(/^\\+/,"/")),Xl(typeof J.mask=="string"?J.mask:Nr(J.mask),Nr(Ke),e.history.createURL("/"),"reject")}let Xe=M.location,Qe=Hu(Xe,ye,J&&J.state,void 0,Ke);Qe={...Qe,...e.history.encodeLocation(Qe)},Xl(F==null?e.history.createHref(M.location):typeof F=="string"?F:Nr(F),e.history.createHref(Qe.mask||Qe),e.history.createURL("/"),"reject");let lt=J&&J.replace!=null?J.replace:void 0,tt="PUSH";lt===!0?tt="REPLACE":lt===!1||xe!=null&&Or(xe.formMethod)&&xe.formAction===M.location.pathname+M.location.search&&(tt="REPLACE");let Et=J&&"preventScrollReset"in J?J.preventScrollReset===!0:void 0,ft=(J&&J.flushSync)===!0,qt=xt({currentLocation:Xe,nextLocation:Qe,historyAction:tt});if(qt){ht(qt,{state:"blocked",location:Qe,proceed(){ht(qt,{state:"proceeding",proceed:void 0,reset:void 0,location:Qe}),Pe(F,J)},reset(){let Bt=new Map(M.blockers);Bt.set(qt,Ll),Te({blockers:Bt})}});return}await Le(tt,Qe,{submission:xe,pendingError:qe,preventScrollReset:Et,replace:J&&J.replace,enableViewTransition:J&&J.viewTransition,flushSync:ft,callSiteDefaultShouldRevalidate:J&&J.defaultShouldRevalidate})}function Oe(){le||(le=cC()),Me(),Te({revalidation:"loading"});let F=le.promise;return M.navigation.state==="submitting"?F:M.navigation.state==="idle"?(Le(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),F):(Le(_||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:B===!0}),F)}async function Le(F,J,ne){X&&X.abort(),X=null,_=F,z=(ne&&ne.startUninterruptedRevalidation)===!0,je(M.location,M.matches),q=(ne&&ne.preventScrollReset)===!0,B=(ne&&ne.enableViewTransition)===!0;let ye=d.activeRoutes,xe=ne?.initialHydration&&M.matches&&M.matches.length>0&&!k?M.matches:qi(ye,J,f,!1,d.branches),qe=(ne&&ne.flushSync)===!0;if(xe&&M.initialized&&!Q&&u6(M.location,J)&&!(ne&&ne.submission&&Or(ne.submission.formMethod))){ve(J,{matches:xe},{flushSync:qe});return}let Ke=Ie(xe,ye,J.pathname);if(Ke.active&&Ke.matches&&(xe=Ke.matches),!xe){let{error:Yt,notFoundMatches:Vt,route:Rn}=yt(J.pathname);ve(J,{matches:Vt,loaderData:{},errors:{[Rn.id]:Yt}},{flushSync:qe});return}let Xe=ne&&ne.overrideNavigation?{...ne.overrideNavigation,matches:xe,historyAction:F}:void 0;X=new AbortController;let Qe=Ul(e.history,J,X.signal,ne&&ne.submission),lt=e.getContext?await e.getContext():new VE,tt;if(ne&&ne.pendingError)tt=[La(xe).route.id,{type:"error",error:ne.pendingError}];else if(ne&&ne.submission&&Or(ne.submission.formMethod)){let Yt=await Ve(Qe,J,ne.submission,xe,F,lt,Ke.active,ne&&ne.initialHydration===!0,{replace:ne.replace,flushSync:qe});if(Yt.shortCircuited)return;if(Yt.pendingActionResult){let[Vt,Rn]=Yt.pendingActionResult;if(gi(Rn)&&Vu(Rn.error)&&Rn.error.status===404){X=null,ve(J,{matches:Yt.matches,loaderData:{},errors:{[Vt]:Rn.error}});return}}xe=Yt.matches||xe,tt=Yt.pendingActionResult,Xe=vy(J,xe,F,ne.submission),qe=!1,Ke.active=!1,Qe=Ul(e.history,Qe.url,Qe.signal)}let{shortCircuited:Et,matches:ft,loaderData:qt,errors:Bt,workingFetchers:On}=await ke(Qe,J,xe,F,lt,Ke.active,Xe,ne&&ne.submission,ne&&ne.fetcherSubmission,ne&&ne.replace,ne&&ne.initialHydration===!0,qe,tt,ne&&ne.callSiteDefaultShouldRevalidate);Et||(X=null,ve(J,{matches:ft||xe,...aC(tt),loaderData:qt,errors:Bt,...On?{fetchers:On}:{}}))}async function Ve(F,J,ne,ye,xe,qe,Ke,Xe,Qe={}){Me();let lt=v6(J,ye,xe,ne);if(Te({navigation:lt},{flushSync:Qe.flushSync===!0}),Ke){let ft=await ze(ye,J.pathname,F.signal);if(ft.type==="aborted")return{shortCircuited:!0};if(ft.type==="error"){if(ft.partialMatches.length===0){let{matches:Bt,route:On}=uh(d.activeRoutes);return{matches:Bt,pendingActionResult:[On.id,{type:"error",error:ft.error}]}}let qt=La(ft.partialMatches).route.id;return{matches:ft.partialMatches,pendingActionResult:[qt,{type:"error",error:ft.error}]}}else if(ft.matches)ye=ft.matches;else{let{notFoundMatches:qt,error:Bt,route:On}=yt(J.pathname);return{matches:qt,pendingActionResult:[On.id,{type:"error",error:Bt}]}}}let tt,Et=Mh(ye,J);if(!Et.route.action&&!Et.route.lazy)tt={type:"error",error:Ni(405,{method:F.method,pathname:J.pathname,routeId:Et.route.id})};else{let ft=Zl(l,u,F,J,ye,Et,Xe?[]:s,qe),qt=await we(F,J,ft,qe,null);if(tt=qt[Et.route.id],!tt){for(let Bt of ye)if(qt[Bt.route.id]){tt=qt[Bt.route.id];break}}if(F.signal.aborted)return{shortCircuited:!0}}if(Mo(tt)){let ft;return Qe&&Qe.replace!=null?ft=Qe.replace:ft=nC(tt.response.headers.get("Location"),new URL(F.url),f,e.history)===M.location.pathname+M.location.search,await de(F,tt,!0,{submission:ne,replace:ft}),{shortCircuited:!0}}if(gi(tt)){let ft=La(ye,Et.route.id);return(Qe&&Qe.replace)!==!0&&(_="PUSH"),{matches:ye,pendingActionResult:[ft.route.id,tt,Et.route.id]}}return{matches:ye,pendingActionResult:[Et.route.id,tt]}}async function ke(F,J,ne,ye,xe,qe,Ke,Xe,Qe,lt,tt,Et,ft,qt){let Bt=Ke||vy(J,ne,ye,Xe),On=Xe||Qe||lC(Bt),Yt=!z&&!tt;if(qe){if(Yt){let qn=Ue(ft);Te({navigation:Bt,...qn!==void 0?{actionData:qn}:{}},{flushSync:Et})}let zt=await ze(ne,J.pathname,F.signal);if(zt.type==="aborted")return{shortCircuited:!0};if(zt.type==="error"){if(zt.partialMatches.length===0){let{matches:Fn,route:gr}=uh(d.activeRoutes);return{matches:Fn,loaderData:{},errors:{[gr.id]:zt.error}}}let qn=La(zt.partialMatches).route.id;return{matches:zt.partialMatches,loaderData:{},errors:{[qn]:zt.error}}}else if(zt.matches)ne=zt.matches;else{let{error:qn,notFoundMatches:Fn,route:gr}=yt(J.pathname);return{matches:Fn,loaderData:{},errors:{[gr.id]:qn}}}}let Vt=d.activeRoutes,{dsMatches:Rn,revalidatingFetchers:Tn}=ZE(F,xe,l,u,e.history,M,ne,On,J,tt?[]:s,tt===!0,Q,$,W,I,oe,Vt,f,e.patchRoutesOnNavigation!=null,d.branches,ft,qt);if(ee=++Y,!e.dataStrategy&&!Rn.some(zt=>zt.shouldLoad)&&!Rn.some(zt=>zt.route.middleware&&zt.route.middleware.length>0)&&Tn.length===0){let zt=new Map(M.fetchers),qn=nn(zt);return ve(J,{matches:ne,loaderData:{},errors:ft&&gi(ft[1])?{[ft[0]]:ft[1].error}:null,...aC(ft),...qn?{fetchers:zt}:{}},{flushSync:Et}),{shortCircuited:!0}}if(Yt){let zt={};if(!qe){zt.navigation=Bt;let qn=Ue(ft);qn!==void 0&&(zt.actionData=qn)}Tn.length>0&&(zt.fetchers=be(Tn)),Te(zt,{flushSync:Et})}Tn.forEach(zt=>{tn(zt.key),zt.controller&&K.set(zt.key,zt.controller)});let ni=()=>Tn.forEach(zt=>tn(zt.key));X&&X.signal.addEventListener("abort",ni);let{loaderResults:dn,fetcherResults:fn}=await Ge(Rn,Tn,F,J,xe);if(F.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",ni),Tn.forEach(zt=>K.delete(zt.key));let An=dh(dn);if(An)return await de(F,An.result,!0,{replace:lt}),{shortCircuited:!0};if(An=dh(fn),An)return oe.add(An.key),await de(F,An.result,!0,{replace:lt}),{shortCircuited:!0};let jn=new Map(M.fetchers),{loaderData:Os,errors:Ir}=iC(M,ne,dn,ft,Tn,fn,jn);tt&&M.errors&&(Ir={...M.errors,...Ir});let _i=nn(jn),ri=We(ee,jn),xi=_i||ri||Tn.length>0;return{matches:ne,loaderData:Os,errors:Ir,...xi?{workingFetchers:jn}:{}}}function Ue(F){if(F&&!gi(F[1]))return{[F[0]]:F[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function be(F){let J=new Map(M.fetchers);return F.forEach(ne=>{let ye=J.get(ne.key),xe=mu(void 0,ye?ye.data:void 0);J.set(ne.key,xe)}),J}async function He(F,J,ne,ye){tn(F);let xe=(ye&&ye.flushSync)===!0,qe=d.activeRoutes,Ke=iv(M.location,M.matches,f,ne,J,ye?.relative),Xe=qi(qe,Ke,f,!1,d.branches),Qe=Ie(Xe,qe,Ke);if(Qe.active&&Qe.matches&&(Xe=Qe.matches),!Xe){bt(F,J,Ni(404,{pathname:Ke}),{flushSync:xe});return}let{path:lt,submission:tt,error:Et}=XE(!0,Ke,ye);if(Et){bt(F,J,Et,{flushSync:xe});return}let ft=e.getContext?await e.getContext():new VE,qt=(ye&&ye.preventScrollReset)===!0;if(tt&&Or(tt.formMethod)){await Ze(F,J,lt,Xe,ft,Qe.active,xe,qt,tt,ye&&ye.defaultShouldRevalidate);return}I.set(F,{routeId:J,path:lt}),await ot(F,J,lt,Xe,ft,Qe.active,xe,qt,tt)}async function Ze(F,J,ne,ye,xe,qe,Ke,Xe,Qe,lt){Me(),I.delete(F);let tt=M.fetchers.get(F);De(F,b6(Qe,tt),{flushSync:Ke});let Et=new AbortController,ft=Ul(e.history,ne,Et.signal,Qe);if(qe){let Se=await ze(ye,new URL(ft.url).pathname,ft.signal,F);if(Se.type==="aborted")return;if(Se.type==="error"){bt(F,J,Se.error,{flushSync:Ke});return}else if(Se.matches)ye=Se.matches;else{bt(F,J,Ni(404,{pathname:ne}),{flushSync:Ke});return}}let qt=Mh(ye,ne);if(!qt.route.action&&!qt.route.lazy){let Se=Ni(405,{method:Qe.formMethod,pathname:ne,routeId:J});bt(F,J,Se,{flushSync:Ke});return}K.set(F,Et);let Bt=Y,On=Zl(l,u,ft,ne,ye,qt,s,xe),Yt=await we(ft,ne,On,xe,F),Vt=Yt[qt.route.id];if(!Vt){for(let Se of On)if(Yt[Se.route.id]){Vt=Yt[Se.route.id];break}}if(ft.signal.aborted){K.get(F)===Et&&K.delete(F);return}if(W.has(F)){if(Mo(Vt)||gi(Vt)){De(F,ps(void 0));return}}else{if(Mo(Vt))if(K.delete(F),ee>Bt){De(F,ps(void 0));return}else return oe.add(F),De(F,mu(Qe)),de(ft,Vt,!1,{fetcherSubmission:Qe,preventScrollReset:Xe});if(gi(Vt)){bt(F,J,Vt.error);return}}let Rn=M.navigation.location||M.location,Tn=Ul(e.history,Rn,Et.signal),ni=d.activeRoutes,dn=M.navigation.state!=="idle"?qi(ni,M.navigation.location,f,!1,d.branches):M.matches;_t(dn,"Didn't find any matches after fetcher action");let fn=++Y;G.set(F,fn);let{dsMatches:An,revalidatingFetchers:jn}=ZE(Tn,xe,l,u,e.history,M,dn,Qe,Rn,s,!1,Q,$,W,I,oe,ni,f,e.patchRoutesOnNavigation!=null,d.branches,[qt.route.id,Vt],lt),Os=mu(Qe,Vt.data),Ir=new Map(M.fetchers);Ir.set(F,Os),jn.filter(Se=>Se.key!==F).forEach(Se=>{let rt=Se.key,Ot=Ir.get(rt),Ct=mu(void 0,Ot?Ot.data:void 0);Ir.set(rt,Ct),tn(rt),Se.controller&&K.set(rt,Se.controller)}),Te({fetchers:Ir});let _i=()=>jn.forEach(Se=>tn(Se.key));Et.signal.addEventListener("abort",_i);let{loaderResults:ri,fetcherResults:xi}=await Ge(An,jn,Tn,Rn,xe);if(Et.signal.aborted)return;Et.signal.removeEventListener("abort",_i),G.delete(F),K.delete(F),jn.forEach(Se=>K.delete(Se.key));let zt=M.fetchers.has(F),qn=Se=>{if(!zt)return Se;let rt=new Map(Se.fetchers);return rt.set(F,ps(Vt.data)),{...Se,fetchers:rt}},Fn=dh(ri);if(Fn)return M=qn(M),de(Tn,Fn.result,!1,{preventScrollReset:Xe});if(Fn=dh(xi),Fn)return oe.add(Fn.key),M=qn(M),de(Tn,Fn.result,!1,{preventScrollReset:Xe});let gr=new Map(M.fetchers);zt&&gr.set(F,ps(Vt.data));let{loaderData:he,errors:Ae}=iC(M,dn,ri,void 0,jn,xi,gr);We(fn,gr),M.navigation.state==="loading"&&fn>ee?(_t(_,"Expected pending action"),X&&X.abort(),ve(M.navigation.location,{matches:dn,loaderData:he,errors:Ae,fetchers:gr})):(Te({errors:Ae,loaderData:sC(M.loaderData,he,dn,Ae),fetchers:gr}),Q=!1)}async function ot(F,J,ne,ye,xe,qe,Ke,Xe,Qe){let lt=M.fetchers.get(F);De(F,mu(Qe,lt?lt.data:void 0),{flushSync:Ke});let tt=new AbortController,Et=Ul(e.history,ne,tt.signal);if(qe){let Vt=await ze(ye,new URL(Et.url).pathname,Et.signal,F);if(Vt.type==="aborted")return;if(Vt.type==="error"){bt(F,J,Vt.error,{flushSync:Ke});return}else if(Vt.matches)ye=Vt.matches;else{bt(F,J,Ni(404,{pathname:ne}),{flushSync:Ke});return}}let ft=Mh(ye,ne);K.set(F,tt);let qt=Y,Bt=Zl(l,u,Et,ne,ye,ft,s,xe),On=await we(Et,ne,Bt,xe,F),Yt=On[ft.route.id];if(!Yt){for(let Vt of ye)if(On[Vt.route.id]){Yt=On[Vt.route.id];break}}if(K.get(F)===tt&&K.delete(F),!Et.signal.aborted){if(W.has(F)){De(F,ps(void 0));return}if(Mo(Yt))if(ee>qt){De(F,ps(void 0));return}else{oe.add(F),await de(Et,Yt,!1,{preventScrollReset:Xe});return}if(gi(Yt)){bt(F,J,Yt.error);return}De(F,ps(Yt.data))}}async function de(F,J,ne,{submission:ye,fetcherSubmission:xe,preventScrollReset:qe,replace:Ke}={}){ne||(L?.resolve(),L=null),J.response.headers.has("X-Remix-Revalidate")&&(Q=!0);let Xe=J.response.headers.get("Location");_t(Xe,"Expected a Location header on the redirect Response");let Qe=Xe,lt=new URL(F.url);Xe=nC(Xe,lt,f,e.history),Xl(Qe,Xe,lt,"allow-explicit");let tt=Hu(M.location,Xe,{_isRedirect:!0});if(i){let Yt=!1;if(J.response.headers.has("X-Remix-Reload-Document"))Yt=!0;else if(xb(Xe)){const Vt=Zk(t,Xe,!0);Yt=Vt.origin!==t.location.origin||ti(Vt.pathname,f)==null}if(Yt){Ke?t.location.replace(Xe):t.location.assign(Xe);return}}X=null;let Et=Ke===!0||J.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ft,formAction:qt,formEncType:Bt}=M.navigation;!ye&&!xe&&ft&&qt&&Bt&&(ye=lC(M.navigation));let On=ye||xe;if(Y_.has(J.response.status)&&On&&Or(On.formMethod))await Le(Et,tt,{submission:{...On,formAction:Xe},preventScrollReset:qe||q,enableViewTransition:ne?B:void 0});else{let Yt=vy(tt,[],Et,ye);await Le(Et,tt,{overrideNavigation:Yt,fetcherSubmission:xe,preventScrollReset:qe||q,enableViewTransition:ne?B:void 0})}}async function we(F,J,ne,ye,xe){let qe,Ke={};try{qe=await r6(g,F,J,ne,xe,ye,!1)}catch(Xe){return ne.filter(Qe=>Qe.shouldLoad).forEach(Qe=>{Ke[Qe.route.id]={type:"error",error:Xe}}),Ke}if(F.signal.aborted)return Ke;if(!Or(F.method))for(let Xe of ne){if(qe[Xe.route.id]?.type==="error")break;!qe.hasOwnProperty(Xe.route.id)&&!M.loaderData.hasOwnProperty(Xe.route.id)&&(!M.errors||!M.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,Qe]of Object.entries(qe))if(p6(Qe)){let lt=Qe.result;Ke[Xe]={type:"redirect",response:o6(lt,F,Xe,ne,f)}}else Ke[Xe]=await a6(Qe);return Ke}async function Ge(F,J,ne,ye,xe){let qe=we(ne,ye,F,xe,null),Ke=Promise.all(J.map(async lt=>{if(lt.matches&<.match&<.request&<.controller){let Et=(await we(lt.request,lt.path,lt.matches,xe,lt.key))[lt.match.route.id];return{[lt.key]:Et}}else return Promise.resolve({[lt.key]:{type:"error",error:Ni(404,{pathname:lt.path})}})})),Xe=await qe,Qe=(await Ke).reduce((lt,tt)=>Object.assign(lt,tt),{});return{loaderResults:Xe,fetcherResults:Qe}}function Me(){Q=!0,I.forEach((F,J)=>{K.has(J)&&$.add(J),tn(J)})}function De(F,J,ne={}){let ye=new Map(M.fetchers);ye.set(F,J),Te({fetchers:ye},{flushSync:(ne&&ne.flushSync)===!0})}function bt(F,J,ne,ye={}){let xe=La(M.matches,J),qe=new Map(M.fetchers);Nt(qe,F),Te({errors:{[xe.route.id]:ne},fetchers:qe},{flushSync:(ye&&ye.flushSync)===!0})}function dt(F){return V.set(F,(V.get(F)||0)+1),W.has(F)&&W.delete(F),M.fetchers.get(F)||G_}function gt(F,J){tn(F,J?.reason),De(F,ps(null))}function Nt(F,J){let ne=M.fetchers.get(J);K.has(J)&&!(ne&&ne.state==="loading"&&G.has(J))&&tn(J),I.delete(J),G.delete(J),oe.delete(J),W.delete(J),$.delete(J),F.delete(J)}function jt(F){let J=(V.get(F)||0)-1;J<=0?(V.delete(F),W.add(F)):V.set(F,J),Te({fetchers:new Map(M.fetchers)})}function tn(F,J){let ne=K.get(F);ne&&(ne.abort(J),K.delete(F))}function an(F,J){for(let ne of F){let ye=J.get(ne);_t(ye,`Expected fetcher: ${ne}`);let xe=ps(ye.data);J.set(ne,xe)}}function nn(F){let J=[],ne=!1;for(let ye of oe){let xe=F.get(ye);_t(xe,`Expected fetcher: ${ye}`),xe.state==="loading"&&(oe.delete(ye),J.push(ye),ne=!0)}return an(J,F),ne}function We(F,J){let ne=[];for(let[ye,xe]of G)if(xe<F){let qe=J.get(ye);_t(qe,`Expected fetcher: ${ye}`),qe.state==="loading"&&(tn(ye),G.delete(ye),ne.push(ye))}return an(ne,J),ne.length>0}function wt(F,J){let ne=M.blockers.get(F)||Ll;return re.get(F)!==J&&re.set(F,J),ne}function Zt(F){M.blockers.delete(F),re.delete(F)}function ht(F,J){let ne=M.blockers.get(F)||Ll;_t(ne.state==="unblocked"&&J.state==="blocked"||ne.state==="blocked"&&J.state==="blocked"||ne.state==="blocked"&&J.state==="proceeding"||ne.state==="blocked"&&J.state==="unblocked"||ne.state==="proceeding"&&J.state==="unblocked",`Invalid blocker state transition: ${ne.state} -> ${J.state}`);let ye=new Map(M.blockers);ye.set(F,J),Te({blockers:ye})}function xt({currentLocation:F,nextLocation:J,historyAction:ne}){if(re.size===0)return;re.size>1&&Hn(!1,"A router only supports one blocker at a time");let ye=Array.from(re.entries()),[xe,qe]=ye[ye.length-1],Ke=M.blockers.get(xe);if(!(Ke&&Ke.state==="proceeding")&&qe({currentLocation:F,nextLocation:J,historyAction:ne}))return xe}function yt(F){let J=Ni(404,{pathname:F}),ne=d.activeRoutes,{matches:ye,route:xe}=uh(ne);return{notFoundMatches:ye,route:xe,error:J}}function Ut(F,J,ne){if(w=F,E=J,R=ne||null,!C&&M.navigation===yy){C=!0;let ye=at(M.location,M.matches);ye!=null&&Te({restoreScrollPosition:ye})}return()=>{w=null,E=null,R=null}}function un(F,J){return R&&R(F,J.map(ye=>b_(ye,M.loaderData)))||F.key}function je(F,J){if(w&&E){let ne=un(F,J);w[ne]=E()}}function at(F,J){if(w){let ne=un(F,J),ye=w[ne];if(typeof ye=="number")return ye}return null}function Ie(F,J,ne){if(e.patchRoutesOnNavigation){let ye=d.branches;if(F){if(Object.keys(F[0].params).length>0)return{active:!0,matches:qi(J,ne,f,!0,ye)}}else return{active:!0,matches:qi(J,ne,f,!0,ye)||[]}}return{active:!1,matches:null}}async function ze(F,J,ne,ye){if(!e.patchRoutesOnNavigation)return{type:"success",matches:F};let xe=F;for(;;){let qe=u;try{await e.patchRoutesOnNavigation({signal:ne,path:J,matches:xe,fetcherKey:ye,patch:(lt,tt)=>{ne.aborted||JE(lt,tt,d,qe,l,!1)}})}catch(lt){return{type:"error",error:lt,partialMatches:xe}}if(ne.aborted)return{type:"aborted"};let Ke=d.branches,Xe=qi(d.activeRoutes,J,f,!1,Ke),Qe=null;if(Xe){if(Object.keys(Xe[0].params).length===0)return{type:"success",matches:Xe};if(Qe=qi(d.activeRoutes,J,f,!0,Ke),!(Qe&&xe.length<Qe.length&&$e(xe,Qe.slice(0,xe.length))))return{type:"success",matches:Xe}}if(Qe||(Qe=qi(d.activeRoutes,J,f,!0,Ke)),!Qe||$e(xe,Qe))return{type:"success",matches:null};xe=Qe}}function $e(F,J){return F.length===J.length&&F.every((ne,ye)=>ne.route.id===J[ye].route.id)}function et(F){u={},d.setHmrRoutes(Fu(F,l,void 0,u))}function Tt(F,J,ne=!1){JE(F,J,d,u,l,ne),d.hasHMRRoutes||Te({})}return D={get basename(){return f},get future(){return m},get state(){return M},get routes(){return d.stableRoutes},get branches(){return d.branches},get manifest(){return u},get window(){return t},initialize:me,subscribe:ue,enableScrollRestoration:Ut,navigate:Pe,fetch:He,revalidate:Oe,createHref:F=>e.history.createHref(F),createURL:F=>e.history.createURL(F),encodeLocation:F=>e.history.encodeLocation(F),getFetcher:dt,resetFetcher:gt,deleteFetcher:jt,dispose:ge,getBlocker:wt,deleteBlocker:Zt,patchRoutes:Tt,_internalFetchControllers:K,_internalSetRoutes:et,_internalSetStateDoNotUseOrYouWillBreakYourApp(F){Te(F)}},e.instrumentations&&(D=z_(D,e.instrumentations.map(F=>F.router).filter(Boolean))),D}function Z_(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function iv(e,t,i,s,o,l){let u,d;if(o){u=[];for(let g of t)if(u.push(g),g.route.id===o){d=g;break}}else u=t,d=t[t.length-1];let f=fd(s||".",ag(u),ti(e.pathname,i)||e.pathname,l==="path");if(s==null&&(f.search=e.search,f.hash=e.hash),(s==null||s===""||s===".")&&d){let g=Rb(f.search);if(d.route.index&&!g)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&g){let m=new URLSearchParams(f.search),h=m.getAll("index");m.delete("index"),h.filter(S=>S).forEach(S=>m.append("index",S));let x=m.toString();f.search=x?`?${x}`:""}}return i!=="/"&&(f.pathname=M_({basename:i,pathname:f.pathname})),Nr(f)}function XE(e,t,i){if(!i||!Z_(i))return{path:t};if(i.formMethod&&!y6(i.formMethod))return{path:t,error:Ni(405,{method:i.formMethod})};let s=()=>({path:t,error:Ni(400,{type:"invalid-body"})}),l=(i.formMethod||"get").toUpperCase(),u=bO(t);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!Or(l))return s();let h=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((x,[S,w])=>`${x}${S}=${w}
|
|
47
|
-
`,""):String(i.body);return{path:t,submission:{formMethod:l,formAction:u,formEncType:i.formEncType,formData:void 0,json:void 0,text:h}}}else if(i.formEncType==="application/json"){if(!Or(l))return s();try{let h=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:t,submission:{formMethod:l,formAction:u,formEncType:i.formEncType,formData:void 0,json:h,text:void 0}}}catch{return s()}}}_t(typeof FormData=="function","FormData is not available in this environment");let d,f;if(i.formData)d=ov(i.formData),f=i.formData;else if(i.body instanceof FormData)d=ov(i.body),f=i.body;else if(i.body instanceof URLSearchParams)d=i.body,f=rC(d);else if(i.body==null)d=new URLSearchParams,f=new FormData;else try{d=new URLSearchParams(i.body),f=rC(d)}catch{return s()}let g={formMethod:l,formAction:u,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(Or(g.formMethod))return{path:t,submission:g};let m=es(t);return e&&m.search&&Rb(m.search)&&d.append("index",""),m.search=`?${d}`,{path:Nr(m),submission:g}}function ZE(e,t,i,s,o,l,u,d,f,g,m,h,x,S,w,R,E,C,O,k,A,N){let j=A?gi(A[1])?A[1].error:A[1].data:void 0,D=o.createURL(l.location),M=o.createURL(f),_;if(m&&l.errors){let z=Object.keys(l.errors)[0];_=u.findIndex(Q=>Q.route.id===z)}else if(A&&gi(A[1])){let z=A[0];_=u.findIndex(Q=>Q.route.id===z)-1}let L=A?A[1].statusCode:void 0,q=L&&L>=400,X={currentUrl:D,currentParams:l.matches[0]?.params||{},nextUrl:M,nextParams:u[0].params,...d,actionResult:j,actionStatus:L},B=pd(u),H=u.map((z,Q)=>{let{route:$}=z,K=null;if(_!=null&&Q>_)K=!1;else if($.lazy)K=!0;else if(!Eb($))K=!1;else if(m){let{shouldLoad:oe}=fO($,l.loaderData,l.errors);K=oe}else J_(l.loaderData,l.matches[Q],z)&&(K=!0);if(K!==null)return sv(i,s,e,f,B,z,g,t,K);let Y=!1;typeof N=="boolean"?Y=N:q?Y=!1:(h||D.pathname+D.search===M.pathname+M.search||D.search!==M.search||W_(l.matches[Q],z))&&(Y=!0);let ee={...X,defaultShouldRevalidate:Y},G=Au(z,ee);return sv(i,s,e,f,B,z,g,t,G,ee,N)}),U=[];return w.forEach((z,Q)=>{if(m||!u.some(V=>V.route.id===z.routeId)||S.has(Q))return;let $=l.fetchers.get(Q),K=$&&$.state!=="idle"&&$.data===void 0,Y=qi(E,z.path,C??"/",!1,k);if(!Y){if(O&&K)return;U.push({key:Q,routeId:z.routeId,path:z.path,matches:null,match:null,request:null,controller:null});return}if(R.has(Q))return;let ee=Mh(Y,z.path),G=new AbortController,oe=Ul(o,z.path,G.signal),I=null;if(x.has(Q))x.delete(Q),I=Zl(i,s,oe,z.path,Y,ee,g,t);else if(K)h&&(I=Zl(i,s,oe,z.path,Y,ee,g,t));else{let V;typeof N=="boolean"?V=N:q?V=!1:V=h;let W={...X,defaultShouldRevalidate:V};Au(ee,W)&&(I=Zl(i,s,oe,z.path,Y,ee,g,t,W))}I&&U.push({key:Q,routeId:z.routeId,path:z.path,matches:I,match:ee,request:oe,controller:G})}),{dsMatches:H,revalidatingFetchers:U}}function Eb(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function fO(e,t,i){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Eb(e))return{shouldLoad:!1,renderFallback:!1};let s=t!=null&&e.id in t,o=i!=null&&i[e.id]!==void 0;if(!s&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!s};let l=!s&&!o;return{shouldLoad:l,renderFallback:l}}function J_(e,t,i){let s=!t||i.route.id!==t.route.id,o=!e.hasOwnProperty(i.route.id);return s||o}function W_(e,t){let i=e.route.path;return e.pathname!==t.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==t.params["*"]}function Au(e,t){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(t);if(typeof i=="boolean")return i}return t.defaultShouldRevalidate}function JE(e,t,i,s,o,l){let u;if(e){let g=s[e];_t(g,`No route found to patch children into: routeId = ${e}`),g.children||(g.children=[]),u=g.children}else u=i.activeRoutes;let d=[],f=[];if(t.forEach(g=>{let m=u.find(h=>hO(g,h));m?f.push({existingRoute:m,newRoute:g}):d.push(g)}),d.length>0){let g=Fu(d,o,[e||"_","patch",String(u?.length||"0")],s);u.push(...g)}if(l&&f.length>0)for(let g=0;g<f.length;g++){let{existingRoute:m,newRoute:h}=f[g],x=m,[S]=Fu([h],o,[],{},!0);Object.assign(x,{element:S.element?S.element:x.element,errorElement:S.errorElement?S.errorElement:x.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:x.hydrateFallbackElement})}i.hasHMRRoutes||i.setRoutes([...i.activeRoutes])}function hO(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((i,s)=>t.children?.some(o=>hO(i,o)))??!1:!1}var WE=new WeakMap,pO=({key:e,route:t,manifest:i,mapRouteProperties:s})=>{let o=i[t.id];if(_t(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let l=o.lazy[e];if(!l)return;let u=WE.get(o);u||(u={},WE.set(o,u));let d=u[e];if(d)return d;let f=(async()=>{let g=g_(e),h=o[e]!==void 0&&e!=="hasErrorBoundary";if(g)Hn(!g,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(h)Hn(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let x=await l();x!=null&&(Object.assign(o,{[e]:x}),Object.assign(o,s(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(x=>x===void 0)&&(o.lazy=void 0))})();return u[e]=f,f},eC=new WeakMap;function e6(e,t,i,s,o){let l=i[e.id];if(_t(l,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let m=eC.get(l);if(m)return{lazyRoutePromise:m,lazyHandlerPromise:m};let h=(async()=>{_t(typeof e.lazy=="function","No lazy route function found");let x=await e.lazy(),S={};for(let w in x){let R=x[w];if(R===void 0)continue;let E=y_(w),O=l[w]!==void 0&&w!=="hasErrorBoundary";E?Hn(!E,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?Hn(!O,`Route "${l.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.`):S[w]=R}Object.assign(l,S),Object.assign(l,{...s(l),lazy:void 0})})();return eC.set(l,h),h.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:h}}let u=Object.keys(e.lazy),d=[],f;for(let m of u){if(o&&o.includes(m))continue;let h=pO({key:m,route:e,manifest:i,mapRouteProperties:s});h&&(d.push(h),m===t&&(f=h))}let g=d.length>0?Promise.all(d).then(()=>{}):void 0;return g?.catch(()=>{}),f?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:f}}async function tC(e){let t=e.matches.filter(o=>o.shouldLoad),i={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,l)=>{i[t[l].route.id]=o}),i}async function t6(e){return e.matches.some(t=>t.route.middleware)?gO(e,()=>tC(e)):tC(e)}function gO(e,t){return n6(e,t,s=>{if(m6(s))throw s;return s},f6,i);function i(s,o,l){if(l)return Promise.resolve(Object.assign(l.value,{[o]:{type:"error",result:s}}));{let{matches:u}=e,d=Math.min(Math.max(u.findIndex(g=>g.route.id===o),0),Math.max(u.findIndex(g=>g.shouldCallHandler()),0)),f=La(u,u[d].route.id).route.id;return Promise.resolve({[f]:{type:"error",result:s}})}}}async function n6(e,t,i,s,o){let{matches:l,...u}=e,d=l.flatMap(g=>g.route.middleware?g.route.middleware.map(m=>[g.route.id,m]):[]);return await mO(u,d,t,i,s,o)}async function mO(e,t,i,s,o,l,u=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let f=t[u];if(!f)return await i();let[g,m]=f,h,x=async()=>{if(h)throw new Error("You may only call `next()` once per middleware");try{return h={value:await mO(e,t,i,s,o,l,u+1)},h.value}catch(S){return h={value:await l(S,g,h)},h.value}};try{let S=await m(e,x),w=S!=null?s(S):void 0;return o(w)?w:h?w??h.value:(h={value:await x()},h.value)}catch(S){return await l(S,g,h)}}function yO(e,t,i,s,o){let l=pO({key:"middleware",route:s.route,manifest:t,mapRouteProperties:e}),u=e6(s.route,Or(i.method)?"action":"loader",t,e,o);return{middleware:l,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function sv(e,t,i,s,o,l,u,d,f,g=null,m){let h=!1,x=yO(e,t,i,l,u);return{...l,_lazyPromises:x,shouldLoad:f,shouldRevalidateArgs:g,shouldCallHandler(S){return h=!0,g?typeof m=="boolean"?Au(l,{...g,defaultShouldRevalidate:m}):typeof S=="boolean"?Au(l,{...g,defaultShouldRevalidate:S}):Au(l,g):f},resolve(S){let{lazy:w,loader:R,middleware:E}=l.route,C=h||f||S&&!Or(i.method)&&(w||R),O=E&&E.length>0&&!R&&!w;return C&&(Or(i.method)||!O)?i6({request:i,path:s,pattern:o,match:l,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:S,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Zl(e,t,i,s,o,l,u,d,f=null){return o.map(g=>g.route.id!==l.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:f,shouldCallHandler:()=>!1,_lazyPromises:yO(e,t,i,g,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:sv(e,t,i,s,pd(o),g,u,d,!0,f))}async function r6(e,t,i,s,o,l,u){s.some(m=>m._lazyPromises?.middleware)&&await Promise.all(s.map(m=>m._lazyPromises?.middleware));let d={request:t,url:vO(t,i),pattern:pd(s),params:s[0].params,context:l,matches:s},g=await e({...d,fetcherKey:o,runClientMiddleware:m=>{let h=d;return gO(h,()=>m({...h,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(s.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return g}async function i6({request:e,path:t,pattern:i,match:s,lazyHandlerPromise:o,lazyRoutePromise:l,handlerOverride:u,scopedContext:d}){let f,g,m=Or(e.method),h=m?"action":"loader",x=S=>{let w,R=new Promise((O,k)=>w=k);g=()=>w(),e.signal.addEventListener("abort",g);let E=O=>typeof S!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${s.route.id}]`)):S({request:e,url:vO(e,t),pattern:i,params:s.params,context:d},...O!==void 0?[O]:[]),C=(async()=>{try{return{type:"data",result:await(u?u(k=>E(k)):E())}}catch(O){return{type:"error",result:O}}})();return Promise.race([C,R])};try{let S=m?s.route.action:s.route.loader;if(o||l)if(S){let w,[R]=await Promise.all([x(S).catch(E=>{w=E}),o,l]);if(w!==void 0)throw w;f=R}else{await o;let w=m?s.route.action:s.route.loader;if(w)[f]=await Promise.all([x(w),l]);else if(h==="action"){let R=new URL(e.url),E=R.pathname+R.search;throw Ni(405,{method:e.method,pathname:E,routeId:s.route.id})}else return{type:"data",result:void 0}}else if(S)f=await x(S);else{let w=new URL(e.url),R=w.pathname+w.search;throw Ni(404,{pathname:R})}}catch(S){return{type:"error",result:S}}finally{g&&e.signal.removeEventListener("abort",g)}return f}async function s6(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function a6(e){let{result:t,type:i}=e;if(Cb(t)){let s;try{s=await s6(t)}catch(o){return{type:"error",error:o}}return i==="error"?{type:"error",error:new hd(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:"data",data:s,statusCode:t.status,headers:t.headers}}return i==="error"?oC(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:d6(t),statusCode:Vu(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Vu(t)?t.status:void 0}:oC(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function o6(e,t,i,s,o){let l=e.headers.get("Location");if(_t(l,"Redirects returned/thrown from loaders/actions must have a Location header"),!xb(l)){let u=s.slice(0,s.findIndex(d=>d.route.id===i)+1);l=iv(new URL(t.url),u,o,l),e.headers.set("Location",l)}return e}var l6=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function av(e){try{return l6.includes(new URL(e).protocol)}catch{return!1}}function nC(e,t,i,s){if(xb(e)){let o=e,l=sg.test(o)?new URL(Xk(o,t.protocol)):new URL(o);if(av(l.toString()))throw new Error("Invalid redirect location");let u=ti(l.pathname,i)!=null;if(l.origin===t.origin&&u)return Sb(l.pathname)+l.search+l.hash}try{let o=s.createURL(e);if(av(o.toString()))throw new Error("Invalid redirect location")}catch{}return e}function Ul(e,t,i,s){let o=e.createURL(bO(t)).toString(),l={signal:i};if(s&&Or(s.formMethod)){let{formMethod:u,formEncType:d}=s;l.method=u.toUpperCase(),d==="application/json"?(l.headers=new Headers({"Content-Type":d}),l.body=JSON.stringify(s.json)):d==="text/plain"?l.body=s.text:d==="application/x-www-form-urlencoded"&&s.formData?l.body=ov(s.formData):l.body=s.formData}return new Request(o,l)}function vO(e,t){let i=new URL(e.url),s=typeof t=="string"?es(t):t;if(i.pathname=s.pathname||"/",s.search){let o=new URLSearchParams(s.search),l=o.getAll("index");o.delete("index");for(let u of l.filter(Boolean))o.append("index",u);i.search=o.size?`?${o.toString()}`:""}else i.search="";return i.hash=s.hash||"",i}function ov(e){let t=new URLSearchParams;for(let[i,s]of e.entries())t.append(i,typeof s=="string"?s:s.name);return t}function rC(e){let t=new FormData;for(let[i,s]of e.entries())t.append(i,s);return t}function c6(e,t,i,s=!1,o=!1){let l={},u=null,d,f=!1,g={},m=i&&gi(i[1])?i[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in t))return;let x=h.route.id,S=t[x];if(_t(!Mo(S),"Cannot handle redirect results in processLoaderData"),gi(S)){let w=S.error;if(m!==void 0&&(w=m,m=void 0),u=u||{},o)u[x]=w;else{let R=La(e,x);u[R.route.id]==null&&(u[R.route.id]=w)}s||(l[x]=dO),f||(f=!0,d=Vu(S.error)?S.error.status:500),S.headers&&(g[x]=S.headers)}else l[x]=S.data,S.statusCode&&S.statusCode!==200&&!f&&(d=S.statusCode),S.headers&&(g[x]=S.headers)}),m!==void 0&&i&&(u={[i[0]]:m},i[2]&&(l[i[2]]=void 0)),{loaderData:l,errors:u,statusCode:d||200,loaderHeaders:g}}function iC(e,t,i,s,o,l,u){let{loaderData:d,errors:f}=c6(t,i,s);return o.filter(g=>!g.matches||g.matches.some(m=>m.shouldLoad)).forEach(g=>{let{key:m,match:h,controller:x}=g;if(x&&x.signal.aborted)return;let S=l[m];if(_t(S,"Did not find corresponding fetcher result"),gi(S)){let w=La(e.matches,h?.route.id);f&&f[w.route.id]||(f={...f,[w.route.id]:S.error}),u.delete(m)}else if(Mo(S))_t(!1,"Unhandled fetcher revalidation redirect");else{let w=ps(S.data);u.set(m,w)}}),{loaderData:d,errors:f}}function sC(e,t,i,s){let o=Object.entries(t).filter(([,l])=>l!==dO).reduce((l,[u,d])=>(l[u]=d,l),{});for(let l of i){let u=l.route.id;if(!t.hasOwnProperty(u)&&e.hasOwnProperty(u)&&l.route.loader&&(o[u]=e[u]),s&&s.hasOwnProperty(u))break}return o}function aC(e){return e?gi(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function La(e,t){return(t?e.slice(0,e.findIndex(s=>s.route.id===t)+1):[...e]).reverse().find(s=>s.route.hasErrorBoundary===!0)||e[0]}function uh(e){let t=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ni(e,{pathname:t,routeId:i,method:s,type:o,message:l}={}){let u="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(u="Bad Request",s&&t&&i?d=`You made a ${s} request to "${t}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:o==="invalid-body"&&(d="Unable to encode submission body")):e===403?(u="Forbidden",d=`Route "${i}" does not match URL "${t}"`):e===404?(u="Not Found",d=`No route matches URL "${t}"`):e===405&&(u="Method Not Allowed",s&&t&&i?d=`You made a ${s.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:s&&(d=`Invalid request method "${s.toUpperCase()}"`)),new hd(e||500,u,new Error(d),!0)}function dh(e){let t=Object.entries(e);for(let i=t.length-1;i>=0;i--){let[s,o]=t[i];if(Mo(o))return{key:s,result:o}}}function bO(e){let t=typeof e=="string"?es(e):e;return Nr({...t,hash:""})}function u6(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function d6(e){return new hd(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function f6(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,i])=>typeof t=="string"&&h6(i))}function h6(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function p6(e){return Cb(e.result)&&cO.has(e.result.status)}function gi(e){return e.type==="error"}function Mo(e){return(e&&e.type)==="redirect"}function oC(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Cb(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function g6(e){return cO.has(e)}function m6(e){return Cb(e)&&g6(e.status)&&e.headers.has("Location")}function y6(e){return q_.has(e.toUpperCase())}function Or(e){return V_.has(e.toUpperCase())}function Rb(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Mh(e,t){let i=typeof t=="string"?es(t).search:t.search;if(e[e.length-1].route.index&&Rb(i||""))return e[e.length-1];let s=iO(e);return s[s.length-1]}function lC(e){let{formMethod:t,formAction:i,formEncType:s,text:o,formData:l,json:u}=e;if(!(!t||!i||!s)){if(o!=null)return{formMethod:t,formAction:i,formEncType:s,formData:void 0,json:void 0,text:o};if(l!=null)return{formMethod:t,formAction:i,formEncType:s,formData:l,json:void 0,text:void 0};if(u!==void 0)return{formMethod:t,formAction:i,formEncType:s,formData:void 0,json:u,text:void 0}}}function vy(e,t,i,s){return s?{state:"loading",location:e,matches:t,historyAction:i,formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text}:{state:"loading",location:e,matches:t,historyAction:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function v6(e,t,i,s){return{state:"submitting",location:e,matches:t,historyAction:i,formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text}}function mu(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function b6(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ps(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 x6(e,t){try{let i=e.sessionStorage.getItem(uO);if(i){let s=JSON.parse(i);for(let[o,l]of Object.entries(s||{}))l&&Array.isArray(l)&&t.set(o,new Set(l||[]))}}catch{}}function S6(e,t){if(t.size>0){let i={};for(let[s,o]of t)i[s]=[...o];try{e.sessionStorage.setItem(uO,JSON.stringify(i))}catch(s){Hn(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function cC(){let e,t,i=new Promise((s,o)=>{e=async l=>{s(l);try{await i}catch{}},t=async l=>{o(l);try{await i}catch{}}});return{promise:i,resolve:e,reject:t}}var Fo=b.createContext(null);Fo.displayName="DataRouter";var gd=b.createContext(null);gd.displayName="DataRouterState";var xO=b.createContext(!1);function SO(){return b.useContext(xO)}var Tb=b.createContext({isTransitioning:!1});Tb.displayName="ViewTransition";var wO=b.createContext(new Map);wO.displayName="Fetchers";var w6=b.createContext(null);w6.displayName="Await";var bi=b.createContext(null);bi.displayName="Navigation";var og=b.createContext(null);og.displayName="Location";var zi=b.createContext({outlet:null,matches:[],isDataRoute:!1});zi.displayName="Route";var kb=b.createContext(null);kb.displayName="RouteError";var EO="REACT_ROUTER_ERROR",E6="REDIRECT",C6="ROUTE_ERROR_RESPONSE";function R6(e){if(e.startsWith(`${EO}:${E6}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function T6(e){if(e.startsWith(`${EO}:${C6}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new hd(t.status,t.statusText,t.data)}catch{}}function k6(e,{relative:t}={}){_t(Bo(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:s}=b.useContext(bi),{hash:o,pathname:l,search:u}=md(e,{relative:t}),d=l;return i!=="/"&&(d=l==="/"?i:Ii([i,l])),s.createHref({pathname:d,search:u,hash:o})}function Bo(){return b.useContext(og)!=null}function Rr(){return _t(Bo(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(og).location}function O6(e){_t(Bo(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Rr();return b.useMemo(()=>Bu(e,rO(t)),[t,e])}var CO="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function RO(e){b.useContext(bi).static||b.useLayoutEffect(e)}function Vo(){let{isDataRoute:e}=b.useContext(zi);return e?K6():A6()}function A6(){_t(Bo(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(Fo),{basename:t,navigator:i}=b.useContext(bi),{matches:s}=b.useContext(zi),{pathname:o}=Rr(),l=JSON.stringify(ag(s)),u=b.useRef(!1);return RO(()=>{u.current=!0}),b.useCallback((f,g={})=>{if(Hn(u.current,CO),!u.current)return;if(typeof f=="number"){i.go(f);return}let m=fd(f,JSON.parse(l),o,g.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Ii([t,m.pathname])),Xl(typeof f=="string"?f:Nr(f),i.createHref(m),wb(i),"reject"),(g.replace?i.replace:i.push)(m,g.state,g)},[t,i,l,o,e])}var M6=b.createContext(null);function N6(e){let t=b.useContext(zi).outlet;return b.useMemo(()=>t&&b.createElement(M6.Provider,{value:e},t),[t,e])}function D6(){let{matches:e}=b.useContext(zi);return e[e.length-1]?.params??{}}function md(e,{relative:t}={}){let{matches:i}=b.useContext(zi),{pathname:s}=Rr(),o=JSON.stringify(ag(i));return b.useMemo(()=>fd(e,JSON.parse(o),s,t==="path"),[e,o,s,t])}function j6(e,t,i){_t(Bo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=b.useContext(bi),{matches:o}=b.useContext(zi),l=o[o.length-1],u=l?l.params:{},d=l?l.pathname:"/",f=l?l.pathnameBase:"/",g=l&&l.route;{let E=g&&g.path||"";AO(d,!g||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${E}">) 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.
|
|
48
|
-
|
|
49
|
-
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let m=Rr(),h;h=m;let x=h.pathname||"/",S=x;if(f!=="/"){let E=f.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=i&&i.state.matches.length?i.state.matches.map(E=>Object.assign(E,{route:i.manifest[E.route.id]||E.route})):Jk(e,{pathname:S});return Hn(g||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Hn(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.`),_6(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:Ii([f,s.encodeLocation?s.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:Ii([f,s.encodeLocation?s.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),o,i)}function I6(){let e=F6(),t=Vu(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:s},l={padding:"2px 4px",backgroundColor:s},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:l},"ErrorBoundary")," or"," ",b.createElement("code",{style:l},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),i?b.createElement("pre",{style:o},i):null,u)}var P6=b.createElement(I6,null),TO=class extends b.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,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):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 i=T6(e.digest);i&&(e=i)}let t=e!==void 0?b.createElement(zi.Provider,{value:this.props.routeContext},b.createElement(kb.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(L6,{error:e},t):t}};TO.contextType=xO;var by=new WeakMap;function L6({children:e,error:t}){let{basename:i,navigator:s}=b.useContext(bi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=R6(t.digest);if(o){let l=by.get(t);if(l)throw l;let u=aO(o.location,i),d=u.absoluteURL||u.to;if(Xl(o.location,d,wb(s),"allow-explicit"),av(d))throw new Error("Invalid redirect location");if(sO&&!by.get(t))if(u.isExternal||o.reloadDocument)window.location.href=d;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw by.set(t,f),f}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function z6({routeContext:e,match:t,children:i}){let s=b.useContext(Fo);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(zi.Provider,{value:e},i)}function _6(e,t=[],i){let s=i?.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let o=e,l=s?.errors;if(l!=null){let m=o.findIndex(h=>h.route.id&&l?.[h.route.id]!==void 0);_t(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let u=!1,d=-1;if(i&&s){u=s.renderFallback;for(let m=0;m<o.length;m++){let h=o[m];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=m),h.route.id){let{loaderData:x,errors:S}=s,w=h.route.loader&&!x.hasOwnProperty(h.route.id)&&(!S||S[h.route.id]===void 0);if(h.route.lazy||w){i.isStatic&&(u=!0),d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}}let f=i?.onError,g=s&&f?(m,h)=>{f(m,{location:s.location,params:s.matches?.[0]?.params??{},pattern:pd(s.matches),errorInfo:h})}:void 0;return o.reduceRight((m,h,x)=>{let S,w=!1,R=null,E=null;s&&(S=l&&h.route.id?l[h.route.id]:void 0,R=h.route.errorElement||P6,u&&(d<0&&x===0?(AO("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,E=null):d===x&&(w=!0,E=h.route.hydrateFallbackElement||null)));let C=t.concat(o.slice(0,x+1)),O=()=>{let k;return S?k=R:w?k=E:h.route.Component?k=b.createElement(h.route.Component,null):h.route.element?k=h.route.element:k=m,b.createElement(z6,{match:h,routeContext:{outlet:m,matches:C,isDataRoute:s!=null},children:k})};return s&&(h.route.ErrorBoundary||h.route.errorElement||x===0)?b.createElement(TO,{location:s.location,revalidation:s.revalidation,component:R,error:S,children:O(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:g}):O()},null)}function Ob(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function kO(e){let t=b.useContext(Fo);return _t(t,Ob(e)),t}function OO(e){let t=b.useContext(gd);return _t(t,Ob(e)),t}function U6(e){let t=b.useContext(zi);return _t(t,Ob(e)),t}function Ab(e){let t=U6(e),i=t.matches[t.matches.length-1];return _t(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function H6(){return Ab("useRouteId")}function F6(){let e=b.useContext(kb),t=OO("useRouteError"),i=Ab("useRouteError");return e!==void 0?e:t.errors?.[i]}var B6=0;function V6(e){let{router:t,basename:i}=kO("useBlocker"),s=OO("useBlocker"),[o,l]=b.useState(""),u=b.useCallback(d=>{if(typeof e!="function")return!!e;if(i==="/")return e(d);let{currentLocation:f,nextLocation:g,historyAction:m}=d;return e({currentLocation:{...f,pathname:ti(f.pathname,i)||f.pathname},nextLocation:{...g,pathname:ti(g.pathname,i)||g.pathname},historyAction:m})},[i,e]);return b.useEffect(()=>{let d=String(++B6);return l(d),()=>t.deleteBlocker(d)},[t]),b.useEffect(()=>{o!==""&&t.getBlocker(o,u)},[t,o,u]),o&&s.blockers.has(o)?s.blockers.get(o):Ll}function K6(){let{router:e}=kO("useNavigate"),t=Ab("useNavigate"),i=b.useRef(!1);return RO(()=>{i.current=!0}),b.useCallback(async(o,l={})=>{Hn(i.current,CO),i.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...l}))},[e,t])}var uC={};function AO(e,t,i){!t&&!uC[e]&&(uC[e]=!0,Hn(!1,i))}var dC={};function fC(e,t){!e&&!dC[t]&&(dC[t]=!0,console.warn(t))}var q6="useOptimistic",hC=KC[q6],Y6=()=>{};function G6(e){return hC?hC(e):[e,Y6]}function $6(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Hn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:b.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Hn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Hn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Q6=["HydrateFallback","hydrateFallbackElement"],X6=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",e(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",t(i))}})}};function Z6({router:e,flushSync:t,onError:i,useTransitions:s}){s=SO()||s;let[l,u]=b.useState(e.state),[d,f]=G6(l),[g,m]=b.useState(),[h,x]=b.useState({isTransitioning:!1}),[S,w]=b.useState(),[R,E]=b.useState(),[C,O]=b.useState(),k=b.useRef(new Map),A=b.useCallback((M,{deletedFetchers:_,newErrors:L,flushSync:q,viewTransitionOpts:X})=>{L&&i&&Object.values(L).forEach(H=>i(H,{location:M.location,params:M.matches[0]?.params??{},pattern:pd(M.matches)})),M.fetchers.forEach((H,U)=>{H.data!==void 0&&k.current.set(U,H.data)}),_.forEach(H=>k.current.delete(H)),fC(q===!1||t!=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 B=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(fC(X==null||B,"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."),!X||!B){t&&q?t(()=>u(M)):s===!1?u(M):b.startTransition(()=>{s===!0&&f(H=>pC(H,M)),u(M)});return}if(t&&q){t(()=>{R&&(S?.resolve(),R.skipTransition()),x({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let H=e.window.document.startViewTransition(()=>{t(()=>u(M))});H.finished.finally(()=>{t(()=>{w(void 0),E(void 0),m(void 0),x({isTransitioning:!1})})}),t(()=>E(H));return}R?(S?.resolve(),R.skipTransition(),O({state:M,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(m(M),x({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[e.window,t,R,S,s,f,i]);b.useLayoutEffect(()=>e.subscribe(A),[e,A]),b.useEffect(()=>{h.isTransitioning&&!h.flushSync&&w(new X6)},[h]),b.useEffect(()=>{if(S&&g&&e.window){let M=g,_=S.promise,L=e.window.document.startViewTransition(async()=>{s===!1?u(M):b.startTransition(()=>{s===!0&&f(q=>pC(q,M)),u(M)}),await _});L.finished.finally(()=>{w(void 0),E(void 0),m(void 0),x({isTransitioning:!1})}),E(L)}},[g,S,e.window,s,f]),b.useEffect(()=>{S&&g&&d.location.key===g.location.key&&S.resolve()},[S,R,d.location,g]),b.useEffect(()=>{!h.isTransitioning&&C&&(m(C.state),x({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),O(void 0))},[h.isTransitioning,C]);let N=b.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:M=>e.navigate(M),push:(M,_,L)=>e.navigate(M,{state:_,preventScrollReset:L?.preventScrollReset}),replace:(M,_,L)=>e.navigate(M,{replace:!0,state:_,preventScrollReset:L?.preventScrollReset})}),[e]),j=e.basename||"/",D=b.useMemo(()=>({router:e,navigator:N,static:!1,basename:j,onError:i}),[e,N,j,i]);return b.createElement(b.Fragment,null,b.createElement(Fo.Provider,{value:D},b.createElement(gd.Provider,{value:d},b.createElement(wO.Provider,{value:k.current},b.createElement(Tb.Provider,{value:h},b.createElement(t8,{basename:j,location:d.location,navigationType:d.historyAction,navigator:N,useTransitions:s},b.createElement(J6,{routes:e.routes,manifest:e.manifest,future:e.future,state:d,isStatic:!1,onError:i})))))),null)}function pC(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var J6=b.memo(W6);function W6({routes:e,manifest:t,future:i,state:s,isStatic:o,onError:l}){return j6(e,void 0,{manifest:t,state:s,isStatic:o,onError:l})}function e8({to:e,replace:t,state:i,relative:s}){_t(Bo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:l}=b.useContext(bi);Hn(!o,"<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:u}=b.useContext(zi),{pathname:d}=Rr(),f=Vo(),g=fd(e,ag(u),d,s==="path");Xl(typeof e=="string"?e:Nr(e),l.createHref(g),wb(l),"reject");let m=JSON.stringify(g);return b.useEffect(()=>{f(JSON.parse(m),{replace:t,state:i,relative:s})},[f,m,s,t,i]),null}function MO(e){return N6(e.context)}function t8({basename:e="/",children:t=null,location:i,navigationType:s="POP",navigator:o,static:l=!1,useTransitions:u}){_t(!Bo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=b.useMemo(()=>({basename:d,navigator:o,static:l,useTransitions:u,future:{}}),[d,o,l,u]);typeof i=="string"&&(i=es(i));let{pathname:g="/",search:m="",hash:h="",state:x=null,key:S="default",mask:w}=i,R=b.useMemo(()=>{let E=ti(g,d);return E==null?null:{location:{pathname:E,search:m,hash:h,state:x,key:S,mask:w},navigationType:s}},[d,g,m,h,x,S,s,w]);return Hn(R!=null,`<Router basename="${d}"> is not able to match the URL "${g}${m}${h}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:b.createElement(bi.Provider,{value:f},b.createElement(og.Provider,{children:t,value:R}))}var Nh="get",Dh="application/x-www-form-urlencoded";function lg(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function n8(e){return lg(e)&&e.tagName.toLowerCase()==="button"}function r8(e){return lg(e)&&e.tagName.toLowerCase()==="form"}function i8(e){return lg(e)&&e.tagName.toLowerCase()==="input"}function s8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function a8(e,t){return e.button===0&&(!t||t==="_self")&&!s8(e)}function lv(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,i)=>{let s=e[i];return t.concat(Array.isArray(s)?s.map(o=>[i,o]):[[i,s]])},[]))}function o8(e,t){let i=lv(e);return t&&t.forEach((s,o)=>{i.has(o)||t.getAll(o).forEach(l=>{i.append(o,l)})}),i}var fh=null;function l8(){if(fh===null)try{new FormData(document.createElement("form"),0),fh=!1}catch{fh=!0}return fh}var c8=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xy(e){return e!=null&&!c8.has(e)?(Hn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Dh}"`),null):e}function u8(e,t){let i,s,o,l,u;if(r8(e)){let d=e.getAttribute("action");s=d?ti(d,t):null,i=e.getAttribute("method")||Nh,o=xy(e.getAttribute("enctype"))||Dh,l=new FormData(e)}else if(n8(e)||i8(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 f=e.getAttribute("formaction")||d.getAttribute("action");if(s=f?ti(f,t):null,i=e.getAttribute("formmethod")||d.getAttribute("method")||Nh,o=xy(e.getAttribute("formenctype"))||xy(d.getAttribute("enctype"))||Dh,l=new FormData(d,e),!l8()){let{name:g,type:m,value:h}=e;if(m==="image"){let x=g?`${g}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else g&&l.append(g,h)}}else{if(lg(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Nh,s=null,o=Dh,u=e}return l&&o==="text/plain"&&(u=l,l=void 0),{action:s,method:i.toLowerCase(),encType:o,formData:l,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Mb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function NO(e,t,i,s){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${s}`:o.pathname=`${o.pathname}.${s}`:o.pathname==="/"?o.pathname=`_root.${s}`:t&&ti(o.pathname,t)==="/"?o.pathname=`${sc(t)}/_root.${s}`:o.pathname=`${sc(o.pathname)}.${s}`,o}async function d8(e,t){if(e.id in t)return t[e.id];try{let i=await import(e.module);return t[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function f8(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 h8(e,t,i){let s=await Promise.all(e.map(async o=>{let l=t.routes[o.route.id];if(l){let u=await d8(l,i);return u.links?u.links():[]}return[]}));return y8(s.flat(1).filter(f8).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function gC(e,t,i,s,o,l){let u=(f,g)=>i[g]?f.route.id!==i[g].route.id:!0,d=(f,g)=>i[g].pathname!==f.pathname||i[g].route.path?.endsWith("*")&&i[g].params["*"]!==f.params["*"];return l==="assets"?t.filter((f,g)=>u(f,g)||d(f,g)):l==="data"?t.filter((f,g)=>{let m=s.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(u(f,g)||d(f,g))return!0;if(f.route.shouldRevalidate){let h=f.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function p8(e,t,{includeHydrateFallback:i}={}){return g8(e.map(s=>{let o=t.routes[s.route.id];if(!o)return[];let l=[o.module];return o.clientActionModule&&(l=l.concat(o.clientActionModule)),o.clientLoaderModule&&(l=l.concat(o.clientLoaderModule)),i&&o.hydrateFallbackModule&&(l=l.concat(o.hydrateFallbackModule)),o.imports&&(l=l.concat(o.imports)),l}).flat(1))}function g8(e){return[...new Set(e)]}function m8(e){let t={},i=Object.keys(e).sort();for(let s of i)t[s]=e[s];return t}function y8(e,t){let i=new Set;return new Set(t),e.reduce((s,o)=>{let l=JSON.stringify(m8(o));return i.has(l)||(i.add(l),s.push({key:l,link:o})),s},[])}function Nb(){let e=b.useContext(Fo);return Mb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function v8(){let e=b.useContext(gd);return Mb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Db=b.createContext(void 0);Db.displayName="FrameworkContext";function cg(){let e=b.useContext(Db);return Mb(e,"You must render this element inside a <HydratedRouter> element"),e}function b8(e,t){let i=b.useContext(Db),[s,o]=b.useState(!1),[l,u]=b.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:g,onMouseLeave:m,onTouchStart:h}=t,x=b.useRef(null);b.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let R=C=>{C.forEach(O=>{u(O.isIntersecting)})},E=new IntersectionObserver(R,{threshold:.5});return x.current&&E.observe(x.current),()=>{E.disconnect()}}},[e]),b.useEffect(()=>{if(s){let R=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(R)}}},[s]);let S=()=>{o(!0)},w=()=>{o(!1),u(!1)};return i?e!=="intent"?[l,x,{}]:[l,x,{onFocus:yu(d,S),onBlur:yu(f,w),onMouseEnter:yu(g,S),onMouseLeave:yu(m,w),onTouchStart:yu(h,S)}]:[!1,x,{}]}function yu(e,t){return i=>{e&&e(i),i.defaultPrevented||t(i)}}function x8({page:e,...t}){let i=SO(),{nonce:s}=cg(),{router:o}=Nb(),l=b.useMemo(()=>Jk(o.routes,e,o.basename),[o.routes,e,o.basename]);return l?(t.nonce==null&&s&&(t={...t,nonce:s}),i?b.createElement(w8,{page:e,matches:l,...t}):b.createElement(E8,{page:e,matches:l,...t})):null}function S8(e){let{manifest:t,routeModules:i}=cg(),[s,o]=b.useState([]);return b.useEffect(()=>{let l=!1;return h8(e,t,i).then(u=>{l||o(u)}),()=>{l=!0}},[e,t,i]),s}function w8({page:e,matches:t,...i}){let s=Rr(),{future:o}=cg(),{basename:l}=Nb(),u=b.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let d=NO(e,l,o.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,g=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?f=!0:g.push(m.route.id);return f&&g.length>0&&d.searchParams.set("_routes",g.join(",")),[d.pathname+d.search]},[l,o.v8_trailingSlashAwareDataRequests,e,s,t]);return b.createElement(b.Fragment,null,u.map(d=>b.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...i})))}function E8({page:e,matches:t,...i}){let s=Rr(),{future:o,manifest:l,routeModules:u}=cg(),{basename:d}=Nb(),{loaderData:f,matches:g}=v8(),m=b.useMemo(()=>gC(e,t,g,l,s,"data"),[e,t,g,l,s]),h=b.useMemo(()=>gC(e,t,g,l,s,"assets"),[e,t,g,l,s]),x=b.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let R=new Set,E=!1;if(t.forEach(O=>{let k=l.routes[O.route.id];!k||!k.hasLoader||(!m.some(A=>A.route.id===O.route.id)&&O.route.id in f&&u[O.route.id]?.shouldRevalidate||k.hasClientLoader?E=!0:R.add(O.route.id))}),R.size===0)return[];let C=NO(e,d,o.v8_trailingSlashAwareDataRequests,"data");return E&&R.size>0&&C.searchParams.set("_routes",t.filter(O=>R.has(O.route.id)).map(O=>O.route.id).join(",")),[C.pathname+C.search]},[d,o.v8_trailingSlashAwareDataRequests,f,s,l,m,t,e,u]),S=b.useMemo(()=>p8(h,l),[h,l]),w=S8(h);return b.createElement(b.Fragment,null,x.map(R=>b.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...i})),S.map(R=>b.createElement("link",{key:R,rel:"modulepreload",href:R,...i})),w.map(({key:R,link:E})=>b.createElement("link",{key:R,nonce:i.nonce,...E,crossOrigin:E.crossOrigin??i.crossOrigin})))}function C8(...e){return t=>{e.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})}}var R8=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{R8&&(window.__reactRouterVersion="7.18.5")}catch{}function T8(e,t){return X_({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:d_({window:t?.window}),hydrationData:k8(),routes:e,mapRouteProperties:$6,hydrationRouteProperties:Q6,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function k8(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:O8(e.errors)}),e}function O8(e){if(!e)return null;let t=Object.entries(e),i={};for(let[s,o]of t)if(o&&o.__type==="RouteErrorResponse")i[s]=new hd(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(typeof o.__subType=="string"&&P_.includes(o.__subType)){let l=window[o.__subType];if(typeof l=="function")try{let u=new l(o.message);u.stack="",i[s]=u}catch{}}if(i[s]==null){let l=new Error(o.message);l.stack="",i[s]=l}}else i[s]=o;return i}var yd=b.forwardRef(function({onClick:t,discover:i="render",prefetch:s="none",relative:o,reloadDocument:l,replace:u,mask:d,state:f,target:g,to:m,preventScrollReset:h,viewTransition:x,defaultShouldRevalidate:S,...w},R){let{basename:E,navigator:C,useTransitions:O}=b.useContext(bi),k=typeof m=="string"&&ig.test(m),A=aO(m,E);m=A.to;let N=k6(m,{relative:o}),j=Rr(),D=null;if(d){let U=fd(d,[],j.mask?j.mask.pathname:"/",!0);E!=="/"&&(U.pathname=U.pathname==="/"?E:Ii([E,U.pathname])),D=C.createHref(U)}let[M,_,L]=b8(s,w),q=N8(m,{replace:u,mask:d,state:f,target:g,preventScrollReset:h,relative:o,viewTransition:x,defaultShouldRevalidate:S,useTransitions:O});function X(U){t&&t(U),U.defaultPrevented||q(U)}let B=!(A.isExternal||l),H=b.createElement("a",{...w,...L,href:(B?D:void 0)||A.absoluteURL||N,onClick:B?X:t,ref:C8(R,_),target:g,"data-discover":!k&&i==="render"?"true":void 0});return M&&!k?b.createElement(b.Fragment,null,H,b.createElement(x8,{page:N})):H});yd.displayName="Link";var Mu=b.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:s="",end:o=!1,style:l,to:u,viewTransition:d,children:f,...g},m){let h=md(u,{relative:g.relative}),x=Rr(),S=b.useContext(gd),{navigator:w,basename:R}=b.useContext(bi),E=S!=null&&_8(h)&&d===!0,C=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,O=x.pathname,k=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;i||(O=O.toLowerCase(),k=k?k.toLowerCase():null,C=C.toLowerCase()),k&&R&&(k=ti(k,R)||k);const A=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let N=O===C||!o&&O.startsWith(C)&&O.charAt(A)==="/",j=k!=null&&(k===C||!o&&k.startsWith(C)&&k.charAt(C.length)==="/"),D={isActive:N,isPending:j,isTransitioning:E},M=N?t:void 0,_;typeof s=="function"?_=s(D):_=[s,N?"active":null,j?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let L=typeof l=="function"?l(D):l;return b.createElement(yd,{...g,"aria-current":M,className:_,ref:m,style:L,to:u,viewTransition:d},typeof f=="function"?f(D):f)});Mu.displayName="NavLink";var A8=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:i,reloadDocument:s,replace:o,state:l,method:u=Nh,action:d,onSubmit:f,relative:g,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:x,...S},w)=>{let{useTransitions:R}=b.useContext(bi),E=P8(),C=L8(d,{relative:g}),O=u.toLowerCase()==="get"?"get":"post",k=typeof d=="string"&&ig.test(d),A=N=>{if(f&&f(N),N.defaultPrevented)return;N.preventDefault();let j=N.nativeEvent.submitter,D=j?.getAttribute("formmethod")||u,M=()=>E(j||N.currentTarget,{fetcherKey:t,method:D,navigate:i,replace:o,state:l,relative:g,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:x});R&&i!==!1?b.startTransition(()=>M()):M()};return b.createElement("form",{ref:w,method:O,action:C,onSubmit:s?f:A,...S,"data-discover":!k&&e==="render"?"true":void 0})});A8.displayName="Form";function M8(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function DO(e){let t=b.useContext(Fo);return _t(t,M8(e)),t}function N8(e,{target:t,replace:i,mask:s,state:o,preventScrollReset:l,relative:u,viewTransition:d,defaultShouldRevalidate:f,useTransitions:g}={}){let m=Vo(),h=Rr(),x=md(e,{relative:u});return b.useCallback(S=>{if(a8(S,t)){S.preventDefault();let w=i!==void 0?i:Nr(h)===Nr(x),R=()=>m(e,{replace:w,mask:s,state:o,preventScrollReset:l,relative:u,viewTransition:d,defaultShouldRevalidate:f});g?b.startTransition(()=>R()):R()}},[h,m,x,i,s,o,t,e,l,u,d,f,g])}function D8(e){Hn(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 t=b.useRef(lv(e)),i=b.useRef(!1),s=Rr(),o=b.useMemo(()=>o8(s.search,i.current?null:t.current),[s.search]),l=Vo(),u=b.useCallback((d,f)=>{const g=lv(typeof d=="function"?d(new URLSearchParams(o)):d);i.current=!0,l("?"+g,f)},[l,o]);return[o,u]}var j8=0,I8=()=>`__${String(++j8)}__`;function P8(){let{router:e}=DO("useSubmit"),{basename:t}=b.useContext(bi),i=H6(),s=e.fetch,o=e.navigate;return b.useCallback(async(l,u={})=>{let{action:d,method:f,encType:g,formData:m,body:h}=u8(l,t);if(u.navigate===!1){let x=u.fetcherKey||I8();await s(x,i,u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:h,formMethod:u.method||f,formEncType:u.encType||g,flushSync:u.flushSync})}else await o(u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:m,body:h,formMethod:u.method||f,formEncType:u.encType||g,replace:u.replace,state:u.state,fromRouteId:i,flushSync:u.flushSync,viewTransition:u.viewTransition})},[s,o,t,i])}function L8(e,{relative:t}={}){let{basename:i}=b.useContext(bi),s=b.useContext(zi);_t(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),l={...md(e||".",{relative:t})},u=Rr();if(e==null){l.search=u.search;let d=new URLSearchParams(l.search),f=d.getAll("index");if(f.some(m=>m==="")){d.delete("index"),f.filter(h=>h).forEach(h=>d.append("index",h));let m=d.toString();l.search=m?`?${m}`:""}}return(!e||e===".")&&o.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(l.pathname=l.pathname==="/"?i:Ii([i,l.pathname])),Nr(l)}function z8(e,t){let{capture:i}={};b.useEffect(()=>{let s=i!=null?{capture:i}:void 0;return window.addEventListener("beforeunload",e,s),()=>{window.removeEventListener("beforeunload",e,s)}},[e,i])}function _8(e,{relative:t}={}){let i=b.useContext(Tb);_t(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=DO("useViewTransitionState"),o=md(e,{relative:t});if(!i.isTransitioning)return!1;let l=ti(i.currentLocation.pathname,s)||i.currentLocation.pathname,u=ti(i.nextLocation.pathname,s)||i.nextLocation.pathname;return Bu(o.pathname,u)!=null||Bu(o.pathname,l)!=null}function U8(e){return b.createElement(Z6,{flushSync:hr.flushSync,...e})}function Js({controlled:e,default:t,name:i,state:s="value"}){const{current:o}=b.useRef(e!==void 0),[l,u]=b.useState(()=>t),d=o&&e!==void 0?e:l,f=b.useCallback(g=>{o||u(g)},[]);return[d,f]}function H8(e){const{open:t,defaultOpen:i=!1,onOpenChange:s,disabled:o}=e,[l,u]=Js({controlled:t,default:i,name:"Collapsible",state:"open"}),{mounted:d,setMounted:f,transitionStatus:g}=Uo(l,!0,!0),m=ar(),[h,x]=b.useState(),S=h===null?void 0:h??m,w=Be(R=>{const E=!l,C=ut(Qi,R.nativeEvent);s(E,C),!C.isCanceled&&u(E)});return b.useMemo(()=>({defaultPanelId:m,disabled:o,handleTrigger:w,mounted:d,open:l,panelId:S,setMounted:f,setOpen:u,setPanelIdState:x,transitionStatus:g}),[m,o,w,d,l,S,f,u,x,g])}const jO=b.createContext(void 0);function IO(){const e=b.useContext(jO);if(e===void 0)throw new Error(gn(15));return e}const F8="data-open",B8="data-closed",hh=Av,V8="data-panel-open",K8={[F8]:""},q8={[B8]:""},Y8={open(e){return e?{[V8]:""}:null}},G8={open(e){return e?K8:q8}},PO={...G8,...ws},$8=b.forwardRef(function(t,i){const{render:s,className:o,defaultOpen:l=!1,disabled:u=!1,onOpenChange:d,open:f,style:g,...m}=t,h=Be(d),x=H8({open:f,defaultOpen:l,onOpenChange:h,disabled:u}),S=b.useMemo(()=>({open:x.open,disabled:x.disabled,transitionStatus:x.transitionStatus}),[x.open,x.disabled,x.transitionStatus]),w=b.useMemo(()=>({...x,onOpenChange:h,state:S}),[x,h,S]),R=kt("div",t,{state:S,ref:i,props:m,stateAttributesMapping:PO});return v.jsx(jO.Provider,{value:w,children:R})}),Q8={...Y8,...ws},X8=b.forwardRef(function(t,i){const{panelId:s,open:o,handleTrigger:l,state:u,disabled:d}=IO(),{className:f,disabled:g=d,render:m,nativeButton:h=!0,style:x,...S}=t,{getButtonProps:w,buttonRef:R}=vi({disabled:g,native:h});return kt("button",t,{state:u,ref:[i,R],props:[{"aria-controls":o?s:void 0,"aria-expanded":o,onClick:l},S,w],stateAttributesMapping:Q8})}),Il={height:void 0,width:void 0};function Z8(e){const{externalRef:t,hiddenUntilFound:i,id:s,keepMounted:o,mounted:l,onOpenChange:u,open:d,setMounted:f,setOpen:g,transitionStatus:m}=e,h=b.useRef(null),x=b.useRef(null),[S,w]=b.useState(Il),R=b.useRef(Il),E=b.useRef(!1),C=b.useRef(d),O=b.useRef(!1),[k,A]=b.useState(!1),N=b.useRef(null),j=ei(t,h),D=Ln(d),M=jp(h),_=!d&&!l,L=k?"idle":m,q=d&&(C.current||O.current),X=!d&&l&&x.current==="css-animation"&&S.height===void 0&&S.width===void 0?R.current:S,B=i&&_&&x.current!=="css-animation",H=Be((K,Y=!0)=>{Y&&(R.current=K),w(K)}),U=Be(()=>{N.current?.(),N.current=null}),z=Be(K=>{U(),N.current=()=>{N.current=null,K()}}),Q=Be(()=>{d&&l&&x.current==="css-animation"&&(O.current=!0)});_e(()=>{!k||m==="starting"||A(!1)},[k,m]),b.useEffect(()=>()=>{Q(),U()},[Q,U]),_e(()=>{d||(C.current=!1,O.current=!1);const K=h.current;if(!K)return;!d&&N.current&&U();const Y=J8(K,q);if(x.current=Y,d&&m==="idle"&&C.current&&Y==="css-animation"){R.current=Pl(K);return}if(d&&m==="starting"){const oe=E.current;if(E.current=!1,Y==="none"){H(Pl(K)),A(!0);return}if(Y==="css-transition"){const W=W8(K);if(H(Pl(K)),!oe)return W;const re=ph(K,"transition-duration","0s");return z(re),A(!0),W}H(Pl(K));const I=ph(K,"animation-name","none");if(!oe){I();return}const V=ph(K,"animation-duration","0s");I(),z(V),A(!0);return}if(!d&&l&&(m==="idle"||m==="starting")){if(Y==="none"){H(Il,!1),f(!1);return}H(Pl(K));return}if(m!=="ending")return;if(Y==="none"){f(!1);return}const ee=Pl(K);if(!(ee.height>0||ee.width>0)){f(!1);return}H(ee),Y==="css-animation"&&ph(K,"animation-name","none")()},[l,d,U,H,f,z,q,m]),Li({enabled:d&&l&&L==="idle",open:!0,ref:h,onComplete(){d&&H(Il,!1)}}),b.useEffect(()=>{if(d||!l||L!=="ending")return;if(!h.current){f(!1),H(Il,!1);return}const Y=new AbortController;let ee=-1;function G(){D.current||(f(!1),H(Il,!1))}return ee=Ar.request(()=>{M(G,Y.signal)}),()=>{Ar.cancel(ee),Y.abort()}},[D,l,d,L,M,H,f]),_e(()=>{const K=h.current;!K||!i||!_||K.setAttribute("hidden","until-found")},[_,i]),b.useEffect(function(){const Y=h.current;if(!Y)return;const ee=Pi.create();let G=-1;const oe=(W,re)=>{ee.start(0,()=>{D.current||(G=Ar.request(()=>{D.current||(W&&(E.current=!1),re&&Y.setAttribute(hh,""),Y.setAttribute("hidden","until-found"))}))})},V=Lt(Y,"beforematch",W=>{const re=ut(Dr,W);if(u(!0,re),re.isCanceled){oe(!1,!1);return}E.current=!0;const Ee=Y.hasAttribute(hh);Y.removeAttribute(hh),g(!0),oe(!0,Ee)});return()=>{ee.clear(),Ar.cancel(G),V()}},[D,u,g]);const $=o||i||l||d;return{height:X.height,props:{...B?{[hh]:""}:void 0,hidden:_,id:s},ref:j,shouldPreventOpenAnimation:q,shouldRender:$,transitionStatus:L,width:X.width}}function Pl(e){return{height:e.scrollHeight,width:e.scrollWidth}}function J8(e,t){const i=Cn(e).getComputedStyle(e),s=(i.animationName.split(",").map(l=>l.trim()).some(l=>l!==""&&l!=="none")||t)&&mC(i.animationDuration),o=mC(i.transitionDuration);return s&&o||o?"css-transition":s?"css-animation":"none"}function mC(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function ph(e,t,i){const s=e.style.getPropertyValue(t),o=e.style.getPropertyPriority(t);return e.style.setProperty(t,i),()=>{if(s===""){e.style.removeProperty(t);return}e.style.setProperty(t,s,o)}}function W8(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(o=>{e.style.setProperty(o,"initial","important")});function i(){Object.entries(t).forEach(([o,l])=>{if(l===""){e.style.removeProperty(o);return}e.style.setProperty(o,l)})}const s=Ar.request(i);return()=>{Ar.cancel(s),i()}}const eU="--collapsible-panel-height",tU="--collapsible-panel-width",nU=b.forwardRef(function(t,i){const{className:s,hiddenUntilFound:o,keepMounted:l,render:u,id:d,style:f,...g}=t,{defaultPanelId:m,mounted:h,onOpenChange:x,open:S,setMounted:w,setPanelIdState:R,setOpen:E,state:C,transitionStatus:O}=IO(),k=o??!1,A=l??!1,N=d||void 0,j=N??m;_e(()=>(R(Q=>N??(Q===null?void 0:Q)),()=>{R(Q=>Q===N?null:Q)}),[N,R]);const{height:D,props:M,ref:_,shouldPreventOpenAnimation:L,shouldRender:q,transitionStatus:X,width:B}=Z8({externalRef:i,hiddenUntilFound:k,id:j,keepMounted:A,mounted:h,onOpenChange:x,open:S,setMounted:w,setOpen:E,transitionStatus:O}),H={...C,transitionStatus:X},U=yR(f,H),z=kt("div",{...t,style:void 0},{state:H,ref:_,props:[M,{style:{[eU]:D===void 0?"auto":`${D}px`,[tU]:B===void 0?"auto":`${B}px`}},g,U?{style:U}:void 0,L?{style:{animationName:"none"}}:void 0],stateAttributesMapping:PO});return q?z:null});function rU({...e}){return v.jsx($8,{"data-slot":"collapsible",...e})}function iU({...e}){return v.jsx(X8,{"data-slot":"collapsible-trigger",...e})}function sU({...e}){return v.jsx(nU,{"data-slot":"collapsible-content",...e})}const LO=b.createContext(void 0);function aU(e){const t=b.useContext(LO);if(t===void 0)throw new Error(gn(33));return t}const ug=b.createContext(void 0);function ra(e){const t=b.useContext(ug);if(t===void 0&&!e)throw new Error(gn(36));return t}const zO=b.createContext(void 0);function dg(e=!0){const t=b.useContext(zO);if(t===void 0&&!e)throw new Error(gn(25));return t}const _O=b.createContext(null);function fg(e="root"){const t=b.useContext(_O),i=b.useContext(ug);return t===null||i===void 0?null:(e==="submenu-trigger"?i.virtualFocus||i.parentVirtualFocus:i.virtualFocus)?t:null}const oU={visible:!0,ref:null};function lU(){return oU}function UO(e,t,i="root"){const s=fg(i),l=((i==="submenu-trigger"?s?.useSubmenuTrigger:s?.useItem)??lU)({label:e.label,children:e.children,render:e.render}),u=ei(t,l.ref);return{visible:l.visible,ref:u,props:l.props}}function cU(e){e.preventDefault()}function uU(e){const{closeOnClick:t,highlighted:i,id:s,nodeId:o,store:l,typingRef:u,itemRef:d,itemMetadata:f}=e,g=ra(),m=dg(!0),h=f.type==="submenu-trigger",x=h?g.parentVirtualFocus:g.virtualFocus,w=(h&&g.parent.type==="menu"?g.parent.store:g.store).useState("webkitAriaSelected",i),{events:R}=l.useState("floatingTreeRoot"),E=l.useState("open"),C=m!==void 0,O=!x&&E&&i?0:-1;return b.useMemo(()=>({id:s,role:"menuitem",tabIndex:O,"aria-selected":w,onMouseDown:x?cU:void 0,onKeyDown(k){k.key===" "&&u?.current&&k.preventDefault()},onMouseMove(k){o&&R.emit("itemhover",{nodeId:o,target:k.currentTarget})},onClick(k){t&&R.emit("close",{domEvent:k.nativeEvent,reason:No})},onMouseUp(k){if(m){const A=m.initialCursorPointRef.current;if(m.initialCursorPointRef.current=null,C&&A&&Math.abs(k.clientX-A.x)<=1&&Math.abs(k.clientY-A.y)<=1||C&&!wv&&k.button===2)return}d.current&&l.context.allowMouseUpTriggerRef.current&&(!C||k.button===2)&&f.type==="regular-item"&&Do(d.current,k,{detail:1,pointerType:"mouse"})}}),[t,O,s,R,o,l.context.allowMouseUpTriggerRef,u,d,m,C,f.type,w,x])}const HO={type:"regular-item"};function FO(e){const{closeOnClick:t,disabled:i,highlighted:s,id:o,store:l,typingRef:u=l.context.typingRef,nativeButton:d,itemMetadata:f,nodeId:g}=e,m=b.useRef(null),{getButtonProps:h,buttonRef:x}=vi({disabled:i,focusableWhenDisabled:!0,native:d,composite:!0}),S=uU({closeOnClick:t,highlighted:s,id:o,nodeId:g,store:l,typingRef:u,itemRef:m,itemMetadata:f}),w=b.useCallback(E=>Mr(S,{onMouseEnter(C){f.type==="submenu-trigger"&&f.setActive(C.nativeEvent)}},E,h),[S,h,f]),R=ei(m,x);return b.useMemo(()=>({getItemProps:w,itemRef:R}),[w,R])}const BO=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function dU(){return b.useContext(BO)}function hg(e={}){const{guess:t,label:i,metadata:s,textRef:o,index:l}=e,{register:u,unregister:d,subscribeMapChange:f,nextIndexRef:g}=dU(),m=b.useRef(-1),[h,x]=b.useState(l==null&&t?()=>{if(m.current===-1){const E=g.current;g.current+=1,m.current=E}return m.current}:-1),S=l??h,w=b.useRef(null),R=b.useCallback(E=>{const C=w.current;C&&d(C),w.current=E,E&&u(E,{metadata:s??null,index:l??null,label:i,textRef:o})},[l,u,d,s,i,o]);return _e(()=>{if(l==null)return f(E=>{const C=w.current?E.get(w.current)?.index:null;C!=null&&x(C)})},[l,f]),{ref:R,index:S}}const fU="data-checked",hU="data-unchecked",VO={checked(e){return e?{[fU]:""}:{[hU]:""}},...ws},jb=b.createContext(void 0);function pU(){const e=b.useContext(jb);if(e===void 0)throw new Error(gn(31));return e}const gU=b.forwardRef(function(t,i){const{render:s,className:o,style:l,...u}=t,[d,f]=b.useState(void 0),g=kt("div",t,{ref:i,props:{role:"group","aria-labelledby":d,...u}});return v.jsx(jb.Provider,{value:f,children:g})}),mU=b.forwardRef(function(t,i){const s=fg()?.Group??gU;return v.jsx(s,{...t,ref:i})}),yU=b.forwardRef(function(t,i){const{render:s,className:o,style:l,id:u,...d}=t,f=ar(u),g=pU();return _e(()=>(g(f),()=>{g(m=>m===f?void 0:m)}),[g,f]),kt("div",t,{ref:i,props:{id:f,"aria-hidden":!0,...d}})}),vU=b.forwardRef(function(t,i){const{render:s,className:o,id:l,label:u,nativeButton:d=!1,disabled:f=!1,closeOnClick:g=!0,style:m,...h}=t,{store:x}=ra(),S=hg({guess:!0,label:u}),w=ar(l),R=x.useState("disabled"),E=x.useState("isActive",S.index),C=x.useState("floatingNodeId"),O=x.useState("itemProps"),k=f||R,{getItemProps:A,itemRef:N}=FO({closeOnClick:g,disabled:k,highlighted:E,id:w,store:x,nativeButton:d,nodeId:C,itemMetadata:HO});return kt("div",t,{state:{disabled:k,highlighted:E},props:[O,h,A],ref:[N,i,S.ref]})}),KO=b.forwardRef(function(t,i){const s=UO(t,i);return s.visible?v.jsx(vU,{...t,ref:s.ref}):null}),bU=b.createContext(void 0);function xU(){return b.useContext(bU)}function SU(e,t){const i=_v(e.render);if(b.isValidElement(i)){const s=i.props;if(Object.hasOwn(s,"id"))return s.id??""}return e.id??t}function wU(e,t,i){const s=SU(e,t),o=s===t?void 0:s,l=b.useCallback(u=>i?.(u?o:void 0),[o,i]);return[s,l]}function EU(e,t,i){const s=_v(e.render),o=b.isValidElement(s)?s.props:void 0,l=e["aria-label"]??o?.["aria-label"];let u=e["aria-labelledby"]??o?.["aria-labelledby"];return u==null&&!l&&(u=t?t.id||void 0:i||void 0),u}const CU=b.forwardRef(function(t,i){const{render:s,className:o,style:l,finalFocus:u,id:d,initialFocus:f,...g}=t,{store:m,defaultFloatingId:h,setRenderedFloatingId:x,virtualFocus:S,orientation:w}=ra(),R=xU(),{side:E,align:C}=aU(),O=ng()!=null,k=m.useState("open"),A=m.useState("transitionStatus"),N=m.useState("popupProps"),j=m.useState("mounted"),D=m.useState("instantType"),M=m.useState("activeTriggerElement"),_=m.useState("parent"),L=m.useState("lastOpenChangeReason"),q=m.useState("rootId"),X=m.useState("floatingRootContext"),B=m.useState("floatingTreeRoot"),H=m.useState("closeDelay"),U=m.useState("hoverEnabled"),z=m.useState("disabled"),Q=m.useState("openMethod"),$=m.useState("activeTriggerId"),K=m.useState("listElement"),[Y,ee]=wU(t,h,x),G=EU(t,M,$),oe=_.type==="menu"?R:void 0,I=_.type==="context-menu";let V=f??_.type!=="menu";f===void 0&&K&&_.type!=="menu"&&(V=()=>m.state.activeIndex!==null?!1:K),Li({open:k,ref:m.context.popupRef,onComplete(){k&&m.context.onOpenChangeComplete?.(!0)}}),b.useEffect(()=>{function ve(Pe){m.setOpen(!1,ut(Pe.reason,Pe.domEvent))}return B.events.on("close",ve),()=>{B.events.off("close",ve)}},[B.events,m]),Gv(X,{enabled:U&&!z&&!I&&_.type!=="menubar",closeDelay:H});const W=m.useStateSetter("popupElement"),re=b.useContext(_O)?.useParentHandoff??TU,{parentVirtualFocusRef:Ee,handleFocus:le}=re(m,_,k,S),me={transitionStatus:A,side:E,align:C,open:k,nested:_.type==="menu",instant:D},ge=kt("div",t,{state:me,ref:[i,m.context.popupRef,W,ee],stateAttributesMapping:Cp,props:[N,{id:Y,...K?{role:"presentation"}:{role:"menu","aria-orientation":w==="horizontal"?"horizontal":void 0,"aria-labelledby":G},onKeyDown(ve){oe?.onPopupKeyDown?.(ve),O&&ud.has(ve.key)&&ve.stopPropagation()},onFocus:le},od(A),g,{"data-rootownerid":q}]});let ue=_.type===void 0||I;(M||_.type==="menubar"&&L!==Rp)&&(ue=!0);const Te=oe?.getReturnElement??Ee;return v.jsx(Np,{context:X,openInteractionType:Q,modal:I,disabled:!j,returnFocus:u??Te??ue,explicitReturnFocus:u===void 0&&Te?!1:void 0,initialFocus:V,restoreFocus:!0,getInsideElements:_.type===void 0?()=>[m.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:_.type!=="menubar"?B:void 0,previousFocusableElement:M,nextFocusableElement:_.type===void 0?m.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:m.context.beforeContentFocusGuardRef,children:ge})}),RU={parentVirtualFocusRef:void 0,handleFocus:void 0};function TU(){return RU}const qO=b.forwardRef(function(t,i){const s=fg()?.Popup??CU;return v.jsx(s,{...t,ref:i})}),YO=b.createContext(void 0);function kU(){const e=b.useContext(YO);if(e===void 0)throw new Error(gn(32));return e}const GO=b.forwardRef(function(t,i){const{keepMounted:s=!1,...o}=t,{store:l,parent:u}=ra();if(!(l.useState("mounted")||s))return null;const g=u.type==="menu"||u.type==="menubar"?"group":void 0;return v.jsx(YO.Provider,{value:s,children:v.jsx(Mp,{ref:i,...o,portalOwnerRole:g})})});function Ib(e){const{children:t,elementsRef:i,labelsRef:s,onMapChange:o}=e,l=Be(o),[,u]=b.useState(0),d=tr(AU).current,f=tr(OU).current,g=b.useRef(0),m=b.useRef(!0),h=b.useRef(null),x=b.useRef(null),S=Be(()=>{m.current||(m.current=!0,u(N=>N+1))}),w=Be((N,j)=>{f.set(N,j),S()}),R=Be(N=>{f.delete(N),S()}),E=Be(N=>{const j=new Map;return i.current.length=0,s&&(s.current.length=0),N.forEach(D=>{j.set(D.element,{...D.registration.metadata??{},index:D.index}),i.current[D.index]=D.element,s&&(s.current[D.index]=D.registration.label!==void 0?D.registration.label:D.registration.textRef?.current?.textContent??D.element.textContent)}),g.current=i.current.length,j});function C(N){if(x.current?.disconnect(),x.current=null,typeof MutationObserver!="function"||N.length<2)return;const j=new MutationObserver(M=>{if(!DU(M))return;let _=null;for(const L of N)if(L.isConnected){if(_&&$O(_,L)>0){j.disconnect(),S();return}_=L}});x.current=j;const D=new Set;for(let M=1;M<N.length;M+=1){const _=NU(N[M-1],N[M]);_&&D.add(_)}D.forEach(M=>j.observe(M,{childList:!0}))}const O=Be(()=>{const[N,j]=MU(f),D=E(N),M=h.current,_=!M||M.length!==N.length||N.some((L,q)=>{const X=M[q];return L.index!==X.index||L.element!==X.element||L.registration.index!==X.registration.index||L.registration.metadata!==X.registration.metadata});C(j),h.current=N,m.current=!1,_&&(d.forEach(L=>L(D)),l(D))});_e(()=>(!m.current&&h.current&&E(h.current),()=>{i.current=[],s&&(s.current=[])}),[i,s,E]),_e(()=>{m.current&&O()}),_e(()=>()=>{x.current?.disconnect(),m.current=!0},[]);const k=Be(N=>(d.add(N),()=>{d.delete(N)})),A=b.useMemo(()=>({register:w,unregister:R,subscribeMapChange:k,nextIndexRef:g}),[w,R,k,g]);return v.jsx(BO.Provider,{value:A,children:t})}function OU(){return new Map}function AU(){return new Set}function MU(e){const t=new Set,i=[],s=[];e.forEach((l,u)=>{if(!u.isConnected)return;const d=l.index,f={index:d??-1,element:u,registration:l};d===null?s.push(f):d>=0&&(t.add(d),i.push(f))});let o=0;return s.sort((l,u)=>$O(l.element,u.element)),s.forEach(l=>{for(;t.has(o);)o+=1;l.index=o,i.push(l),o+=1}),t.size>0&&i.sort((l,u)=>l.index-u.index),[i,s.map(l=>l.element)]}function NU(e,t){let i=e.parentElement;for(;i&&!i.contains(t);)i=i.parentElement;return i}function DU(e){for(const t of e)for(let i=0;i<t.removedNodes.length;i+=1)if(t.removedNodes[i].isConnected)return!0;return!1}function $O(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const QO=b.forwardRef(function(t,i){const{anchor:s,positionMethod:o="absolute",className:l,render:u,side:d,align:f,sideOffset:g=0,alignOffset:m=0,collisionBoundary:h="clipping-ancestors",collisionPadding:x=5,arrowPadding:S=5,sticky:w=!1,disableAnchorTracking:R=!1,collisionAvoidance:E=RR,style:C,...O}=t,{store:k,virtualFocus:A,syncHighlightedItem:N}=ra(),j=kU(),D=dg(!0),M=k.useState("parent"),_=k.useState("floatingRootContext"),L=k.useState("floatingTreeRoot"),q=k.useState("mounted"),X=k.useState("open"),B=k.useState("modal"),H=k.useState("openMethod"),U=k.useState("activeTriggerElement"),z=k.useState("transitionStatus"),Q=k.useState("positionerElement"),$=k.useState("instantType"),K=k.useState("adaptiveOrigin"),Y=k.useState("lastOpenChangeReason"),ee=k.useState("floatingNodeId"),G=k.useState("floatingParentNodeId"),oe=_.useState("domReferenceElement");let I=s,V=g,W=m,re=f,Ee=E;M.type==="context-menu"&&(I=s??M.context?.anchor,re=re??"start",!d&&re!=="center"&&(W=t.alignOffset??2,V=t.sideOffset??-5));let le=d,me=re;M.type==="menu"?(le=le??"inline-end",me=me??"start",Ee=t.collisionAvoidance??Hv):M.type==="menubar"&&(le=le??(M.context.orientation==="vertical"?"inline-end":"bottom"),me=me??"start");const ge=M.type==="context-menu",ue=Gp({anchor:I,floatingRootContext:_,positionMethod:D?"fixed":o,mounted:q,side:le,sideOffset:V,align:me,alignOffset:W,arrowPadding:ge?0:S,collisionBoundary:h,collisionPadding:x,sticky:w,nodeId:ee,keepMounted:j,disableAnchorTracking:R,collisionAvoidance:Ee,shift:ge?{crossAxis:!("side"in Ee&&Ee.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:L,adaptiveOrigin:K,lazyFlip:A?"placement":!1});b.useEffect(()=>{function Ue(be){be.open&&(be.parentNodeId===ee&&k.set("hoverEnabled",!1),be.nodeId!==ee&&be.parentNodeId===k.select("floatingParentNodeId")&&k.setOpen(!1,ut(vu)))}return L.events.on("menuopenchange",Ue),()=>{L.events.off("menuopenchange",Ue)}},[k,L.events,ee]),b.useEffect(()=>{if(k.select("floatingParentNodeId")==null)return;function Ue(be){if(be.open||be.nodeId!==k.select("floatingParentNodeId"))return;const He=be.reason??vu;k.setOpen(!1,ut(He))}return L.events.on("menuopenchange",Ue),()=>{L.events.off("menuopenchange",Ue)}},[L.events,k]);const Te=Un();b.useEffect(()=>{X||Te.clear()},[X,Te]),b.useEffect(()=>{function Ue(be){if(!(!X||be.nodeId!==k.select("floatingParentNodeId")))if(be.target&&U&&U!==be.target){const He=k.select("closeDelay");He>0?Te.isStarted()||Te.start(He,()=>{k.setOpen(!1,ut(vu))}):k.setOpen(!1,ut(vu))}else Te.clear()}return L.events.on("itemhover",Ue),()=>{L.events.off("itemhover",Ue)}},[L.events,X,U,k,Te]),b.useEffect(()=>{const Ue={open:X,nodeId:ee,parentNodeId:G,reason:k.select("lastOpenChangeReason")};L.events.emit("menuopenchange",Ue)},[L.events,X,k,ee,G]),Nk({store:k,domReference:oe,positionerElement:Q,open:X});const ve={open:X,side:ue.side,align:ue.align,anchorHidden:ue.anchorHidden,nested:M.type==="menu",instant:$},Pe=M.type==="menubar"&&M.context.modal;cb(X&&(Pe||B&&Y!==Kn),H==="touch",Q,U);const Le=$p(t,ve,{styles:ue.positionerStyles,transitionStatus:z,props:O,refs:[i,k.useStateSetter("positionerElement")],hidden:!q,inert:!X}),Ve=q&&M.type!=="menu"&&(M.type!=="menubar"&&B&&Y!==Kn||M.type==="menubar"&&M.context.modal);let ke=null;return M.type==="menubar"?ke=M.context.contentElement:M.type===void 0&&(ke=U),v.jsxs(LO.Provider,{value:ue,children:[Ve&&v.jsx(eg,{ref:M.type==="context-menu"||M.type==="nested-context-menu"?M.context.internalBackdropRef:null,inert:Qp(!X),cutout:ke}),v.jsx(DR,{id:ee,children:v.jsx(Ib,{elementsRef:k.context.itemDomElements,labelsRef:k.context.itemLabels,onMapChange:N,children:Le})})]})}),XO=b.createContext(void 0);function jU(){const e=b.useContext(XO);if(e===void 0)throw new Error(gn(34));return e}const IU=b.forwardRef(function(t,i){const{render:s,className:o,value:l,defaultValue:u,onValueChange:d,disabled:f=!1,style:g,"aria-labelledby":m,...h}=t,[x,S]=b.useState(void 0),[w,R]=Js({controlled:l,default:u,name:"MenuRadioGroup"}),E=Be((A,N)=>{d?.(A,N),!N.isCanceled&&R(A)}),O=kt("div",t,{state:{disabled:f},ref:i,props:{role:"group","aria-labelledby":m??x,"aria-disabled":f||void 0,...h}}),k=b.useMemo(()=>({value:w,setValue:E,disabled:f}),[w,E,f]);return v.jsx(jb.Provider,{value:S,children:v.jsx(XO.Provider,{value:k,children:O})})}),PU=b.memo(b.forwardRef(function(t,i){const s=fg()?.RadioGroup??IU;return v.jsx(s,{...t,ref:i})})),ZO=b.createContext(void 0);function LU(){const e=b.useContext(ZO);if(e===void 0)throw new Error(gn(35));return e}const zU=b.forwardRef(function(t,i){const{render:s,className:o,id:l,label:u,nativeButton:d=!1,disabled:f=!1,closeOnClick:g=!1,value:m,style:h,...x}=t,{store:S}=ra(),{value:w,setValue:R,disabled:E}=jU(),C=hg({guess:!0,label:u}),O=ar(l),k=S.useState("isActive",C.index),A=S.useState("floatingNodeId"),N=S.useState("itemProps"),j=S.useState("disabled"),D=f||E||j,M=w===m,{getItemProps:_,itemRef:L}=FO({closeOnClick:g,disabled:D,highlighted:k,id:O,store:S,nativeButton:d,nodeId:A,itemMetadata:HO}),q=b.useMemo(()=>({disabled:D,highlighted:k,checked:M}),[D,k,M]);function X(H){const U=ut(No,H.nativeEvent,void 0,{preventUnmountOnClose:En});R(m,U)}const B=kt("div",t,{state:q,stateAttributesMapping:VO,props:[N,{role:"menuitemradio","aria-checked":M,onClick:X},x,_],ref:[L,i,C.ref]});return v.jsx(ZO.Provider,{value:q,children:B})}),_U=b.forwardRef(function(t,i){const s=UO(t,i);return s.visible?v.jsx(zU,{...t,ref:s.ref}):null}),UU=b.forwardRef(function(t,i){const{render:s,className:o,style:l,keepMounted:u=!1,...d}=t,f=LU(),g=b.useRef(null),{transitionStatus:m,mounted:h,setMounted:x}=Uo(f.checked);Li({batch:!0,enabled:!f.checked,open:f.checked,ref:g,onComplete(){f.checked||x(!1)}});const S={checked:f.checked,disabled:f.disabled,highlighted:f.highlighted,transitionStatus:m};return kt("span",t,{state:S,stateAttributesMapping:VO,ref:[i,g],props:{"aria-hidden":!0,...d},enabled:u||h})}),HU=b.createContext(null);function JO(e){return b.useContext(HU)}function FU(e){return e==null?Dr:e.type.startsWith("key")?WC:e.type.startsWith("mouse")||e.type.startsWith("pointer")?c4:Dr}const BU={...Ys,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,t)=>{const i=Ys.triggerPopupId(e,t);return i?e.listElement?.id||i:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>Ss&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType==="trigger-change"&&!Ys.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 VU extends oc{constructor(t,i,s=!1){const o=new ad,l=qU(o,i,s,t);super(l,KU(o),BU),this.observe("parent",u=>{u.type==="menu"?this.context.allowMouseUpTriggerRef=u.store.context.allowMouseUpTriggerRef:u.type!==void 0&&(this.context.allowMouseUpTriggerRef=u.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){const t=this.state.parent;if(t.type!=="menu")return;let i=t.store.select("rootId"),s=t.store.select("floatingTreeRoot"),o=t.store.select("keyboardEventRelay");return t.store.subscribe(()=>{const l=t.store.select("rootId"),u=t.store.select("floatingTreeRoot"),d=t.store.select("keyboardEventRelay");i===l&&s===u&&o===d||(i=l,s=u,o=d,this.notifyAll())})}setOpen(t,i){this.state.floatingRootContext.context.events.emit("setOpen",{open:t,eventDetails:i})}setActiveIndex(t,i,s){if(this.state.activeIndex!==t){const l=(t===null?void 0:this.context.itemDomElements.current[t])===this.context.reportedItem;this.context.highlightReason=l?"none":i,this.context.highlightEvent=l?void 0:s}this.set("activeIndex",t)}highlightItem(t,i,s){const o=this.context.itemDomElements.current.indexOf(t);o>-1&&this.setActiveIndex(o,i,s)}}function KU(e){return{positionerRef:b.createRef(),popupRef:b.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:"none",highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:b.createRef(),beforeTriggerFocusGuardRef:b.createRef(),beforeContentFocusGuardRef:b.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function qU(e,t,i=!1,s){return{...Bp(e,t,i),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:Xt,inputProps:Xt,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Fv,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Xt,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...s}}const yC=b.createContext(null);function WO(e,t){return(e===Qi||e===No)&&t?.detail===0}function YU(e,t){return e===Hh||WO(e,t)}const GU=Xu(function(t){const{children:i,open:s,onOpenChange:o,onOpenChangeComplete:l,onItemHighlighted:u,defaultOpen:d=!1,disabled:f=!1,modal:g,loopFocus:m=!0,orientation:h="vertical",actionsRef:x,closeParentOnEsc:S=!1,handle:w,triggerId:R,defaultTriggerId:E=null,highlightItemOnHover:C=!0,isSubmenu:O=!1,virtualFocus:k=!1,virtualFocusRef:A,allowEscape:N=!0,resetOnPointerLeave:j=!0}=t,D=dg(!0),M=ra(!0),_=JO(!0),L=M?.store,q=M?.virtualFocus??!1,X=b.useMemo(()=>O&&L?{type:"menu",store:L}:_?{type:"menubar",context:_}:D&&!L?{type:"context-menu",context:D}:{type:void 0},[D,L,_,O]),B=ar(),H=ar(),[U,z]=b.useState(void 0),Q=(U??H)||void 0,$=$a(),K=X.type==="menu"?X.store:void 0,Y=(s??d)&&K?.state.transitionStatus==="starting",ee=tr(()=>Y?K?.state.instantType:void 0).current,G=tr(()=>{const Ie=new VU({open:d,openProp:s,activeTriggerId:E,triggerIdProp:R,parent:X,disabled:f,highlightItemOnHover:C,modal:X.type===void 0?g:void 0,rootId:B,instantType:ee},Q,$!=null);return Ie.context.virtualFocusRef=A,Ie}).current;G.useControlledProp("openProp",s),G.useControlledProp("triggerIdProp",R),G.useContextCallback("onOpenChangeComplete",l);const oe=G.useState("floatingTreeRoot"),I=Bv(oe),V=G.useState("open"),W=G.useState("activeTriggerElement"),re=G.useState("positionerElement"),Ee=G.useState("hoverEnabled"),le=G.useState("disabled"),me=G.useState("lastOpenChangeReason"),ge=G.useState("parent"),ue=G.useState("activeIndex"),Te=G.useState("keyboardOpen"),ve=G.useState("payload"),Pe=G.useState("floatingParentNodeId"),Oe=b.useRef(null),Le=b.useRef(ge.type!=="context-menu"),Ve=Un(),ke=b.useRef(!0),Ue=Un(),be=Pe!=null,{openMethod:He,triggerProps:Ze}=Ok(V);G.useSyncedValues({disabled:f,highlightItemOnHover:C,modal:ge.type===void 0?g:void 0,openMethod:He,rootId:B}),_p(G);const{forceUnmount:ot,transitionStatus:de}=Up(V,G,()=>{G.set("allowMouseEnter",!1)},Y),we=jp(G.context.popupRef);b.useEffect(()=>{if(ee===void 0)return;const Ie=()=>{G.state.instantType===ee&&G.set("instantType",void 0)};if(!V){Ie();return}if(de!==void 0)return;if(G.context.popupRef.current==null){Ie();return}const ze=new AbortController;return we(Ie,ze.signal),()=>{ze.abort()}},[ee,V,de,we,G]),_e(()=>{D&&!M?G.update({parent:{type:"context-menu",context:D},floatingNodeId:I,floatingParentNodeId:$}):(M||!G.select("activeTriggerElement"))&&G.update({floatingNodeId:I,floatingParentNodeId:$})},[D,M,I,$,W,G]),b.useEffect(()=>{if(V||(Oe.current=null),ge.type==="context-menu"){if(!V){Ve.clear(),Le.current=!1;return}Ve.start(500,()=>{Le.current=!0})}},[Ve,V,ge.type]),_e(()=>{!V&&!Ee&&G.set("hoverEnabled",!0)},[V,Ee,G]);const Ge=Be((Ie,ze)=>{const $e=ze.reason;if(!Ie&&!G.select("open")||V===Ie&&ze.trigger===W&&me===$e)return;const et=Lp(ze);if(!Ie&&ze.trigger==null&&(ze.trigger=W??void 0),o?.(Ie,ze),ze.isCanceled)return;G.state.floatingRootContext.dispatchOpenChange(Ie,ze);const Tt=ze.event;if(Ie===!1&&$e!==No&&Tt?.type==="click"&&Tt.pointerType==="touch"&&!ke.current)return;Ie&&$e===Bl?(ke.current=!1,Ue.start(300,()=>{ke.current=!0})):(ke.current=!0,Ue.clear());const F=!Ie&&($e===td||$e==null);Oe.current=ze.event;const J=Pp(G.state,Ie,ze.trigger,et());J.openChangeReason=$e,J.keyboardOpen=Ie&&YU($e,Tt),ge.type==="menubar"&&($e===Bl||$e===Fa||$e===Kn||$e===Hh||$e===vu)?J.instantType="group":WO($e,Tt)?J.instantType="click":F?J.instantType="dismiss":J.instantType=void 0,G.update(J)}),Me=IR({popupStore:G,floatingRootContext:G.state.floatingRootContext,floatingId:Q,nested:$!=null,onOpenChange:Ge}),De=Me.context.events;_e(()=>{const Ie=({open:ze,eventDetails:$e})=>Ge(ze,$e);return De.on("setOpen",Ie),()=>{De?.off("setOpen",Ie)}},[De,Ge]),_e(()=>G.subscribeToParentMenu(),[G]);const bt=b.useCallback(()=>{G.setOpen(!1,ut(nd))},[G]);b.useImperativeHandle(x,()=>({unmount:ot,close:bt}),[ot,bt]);let dt;ge.type==="context-menu"&&(dt=ge.context),b.useImperativeHandle(dt?.positionerRef,()=>re,[re]),b.useImperativeHandle(dt?.actionsRef,()=>({setOpen:Ge}),[Ge]);const gt=id(Me,{enabled:!le,bubbles:{escapeKey:S&&ge.type==="menu"},outsidePress(){return ge.type!=="context-menu"||Oe.current?.type==="contextmenu"?!0:Le.current},externalTree:be?oe:void 0}),Nt=Yp(),jt=KR(Me,{enabled:!le,listRef:G.context.itemDomElements,activeIndex:ue,virtual:k,nested:ge.type==="menubar"||!k&&ge.type!==void 0,parentOrientation:ge.type==="menubar"?ge.context.orientation:void 0,loopFocus:m,focusItemOnOpen:k?Te:void 0,allowEscape:k&&m&&N,orientation:h,triggerOrientation:k?"vertical":h,rtl:Nt==="rtl",disabledIndices:$i,onNavigate(Ie,ze){G.setActiveIndex(Ie,FU(ze),ze?.nativeEvent)},openOnArrowKeyDown:ge.type!=="context-menu"&&!(k&&O),externalTree:!k&&be?oe:void 0,nestedReturnFocusRef:K?.context.virtualFocusRef,focusItemOnHover:C,resetOnPointerLeave:j}),tn=b.useCallback(Ie=>{G.context.typingRef.current=Ie},[G]),an=qR(Me,{enabled:!le&&!k,listRef:G.context.itemLabels,elementsRef:G.context.itemDomElements,activeIndex:ue,resetMs:eI,onMatch:(Ie,ze)=>{V&&Ie!==ue&&G.setActiveIndex(Ie,WC,ze.nativeEvent)},onTyping:tn}),nn=Be(u),We=b.useRef(-1),wt=Be(()=>{const Ie=G.state.activeIndex,ze=Ie===null?void 0:G.context.itemDomElements.current[Ie]??void 0;if(ze?.isConnected===!1)return;const $e=ze===void 0?-1:Ie;if(We.current===$e&&G.context.reportedItem===ze)return;We.current=$e,G.context.reportedItem=ze,k&&G.set("highlightedItem",ze);const{highlightReason:et,highlightEvent:Tt}=G.context;G.context.highlightReason=Dr,G.context.highlightEvent=void 0,u&&nn(ze,l4(et,Tt,{label:ze===void 0?void 0:G.context.itemLabels.current[$e]??void 0}))});_e(()=>{wt()},[ue,wt]);const Zt=b.useMemo(()=>{if(!k)return jt.reference;if(!jt.trigger)return Xt;const{onFocus:Ie,...ze}=jt.trigger;return ze},[k,jt.reference,jt.trigger]);G.useSyncedValue("inputProps",k?jt.reference??Xt:Xt);const ht=b.useMemo(()=>{const Ie=Mr(an.reference,Zt,gt.reference,{onMouseMove(){G.set("allowMouseEnter",!0)}},Ze);return Ie["aria-haspopup"]="menu",Ie["aria-expanded"]=V,Ie},[G,an.reference,Zt,gt.reference,Ze,V]),xt=b.useMemo(()=>{const Ie=Mr(jt.trigger,gt.trigger,Ze);return Ie["aria-haspopup"]="menu",Ie["aria-expanded"]=!1,Ie},[jt.trigger,gt.trigger,Ze]);tr(()=>(G.update({inactiveTriggerProps:xt}),null));const yt=b.useMemo(()=>Mr(sd,{onMouseMove(){G.set("allowMouseEnter",!0),ge.type==="menu"&&G.set("hoverEnabled",!1)},onClick(){G.select("hoverEnabled")&&G.set("hoverEnabled",!1)},onKeyDown(Ie){const ze=G.select("keyboardEventRelay");ze&&!Ie.isPropagationStopped()&&ze(Ie)}},an.floating,jt.floating,gt.floating),[ge.type,G,an.floating,jt.floating,gt.floating]),Ut=jt.item??Xt;Hp(G,{floatingRootContext:Me,activeTriggerProps:ht,inactiveTriggerProps:xt,popupProps:yt,itemProps:Ut});const un=b.useMemo(()=>({store:G,parent:X,orientation:h,loopFocus:m,allowEscape:N,defaultFloatingId:H,setRenderedFloatingId:z,virtualFocus:k,parentVirtualFocus:q,syncHighlightedItem:wt}),[G,X,h,m,N,H,k,q,wt]),je=typeof i=="function"?i({payload:ve}):i;let at=v.jsxs(ug.Provider,{value:un,children:[w&&v.jsx(Ip,{handle:w,store:G}),je]});return(ge.type===void 0||ge.type==="context-menu")&&(at=v.jsx(jR,{externalTree:oe,children:at})),at});function eA(e){const t=b.useContext(yC);if(t===null)return v.jsx(GU,{...e});const i=t.Root;return v.jsx(yC.Provider,{value:null,children:v.jsx(i,{...t.options,...e})})}const gh=5;function tA(e,t){const i=$U(t);return e.clientX>=i.left-gh&&e.clientX<=i.right+gh&&e.clientY>=i.top-gh&&e.clientY<=i.bottom+gh}function $U(e){const t=e.getBoundingClientRect(),i=Cn(e);if(Ev)return t;const s=i.getComputedStyle(e,"::before"),o=i.getComputedStyle(e,"::after");if(!(s.content!=="none"||o.content!=="none"))return t;const u=parseFloat(s.width)||0,d=parseFloat(s.height)||0,f=parseFloat(o.width)||0,g=parseFloat(o.height)||0,m=Math.max(t.width,u,f),h=Math.max(t.height,d,g),x=m-t.width,S=h-t.height;return{left:t.left-x/2,right:t.right+x/2,top:t.top-S/2,bottom:t.bottom+S/2}}function QU(e={}){const{highlightItemOnHover:t,highlightedIndex:i,onHighlightedIndexChange:s}=ob(),{ref:o,index:l}=hg(e),u=i===l,d=b.useRef(null),f=ei(o,d);return{compositeProps:{tabIndex:u?0:-1,onFocus(){s(l)},onMouseMove(){const m=d.current;if(!t||!m)return;const h=m.hasAttribute("disabled")||m.ariaDisabled==="true";!u&&!h&&m.focus()}},compositeRef:f,index:l}}function Pb(e){const{render:t,className:i,style:s,state:o=Xt,props:l=$i,refs:u=$i,metadata:d,stateAttributesMapping:f,tag:g="div",...m}=e,{compositeProps:h,compositeRef:x}=QU({metadata:d});return kt(g,e,{state:o,ref:[x,...u],props:[h,...l,m],stateAttributesMapping:f})}function Lb(e){if(bn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!$s(e))return Lb(Zs(e))}function XU(e){const{enabled:t=!0,mouseDownAction:i,open:s}=e,o=b.useRef(!1);return b.useMemo(()=>t?{onMouseDown:l=>{(i==="open"&&!s||i==="close"&&s)&&(o.current=!0,Qt(l.currentTarget).addEventListener("click",()=>{o.current=!1},{once:!0}))},onClick:l=>{o.current&&(o.current=!1,l.preventBaseUIHandler())}}:Xt,[t,i,s])}const ZU=gp(function(t,i){const{render:s,className:o,style:l,disabled:u=!1,nativeButton:d=!0,id:f,openOnHover:g,delay:m=100,closeDelay:h=0,handle:x,payload:S,...w}=t,R=ra(!0),C=Vp(x)??R?.store;if(!C)throw new Error(gn(85));const O=ar(f),k=C.useState("isTriggerActive",O),A=C.useState("floatingRootContext"),N=C.useState("isOpenedByTrigger",O),j=C.useState("triggerControlsId",O),D=b.useRef(null),M=WU(),_=ob(!0),L=Qa(),q=b.useMemo(()=>L??new Fv,[L]),X=Bv(q),B=$a(),{registerTrigger:H,isMountedByThisTrigger:U}=zp(O,D,C,{payload:S,closeDelay:h,parent:M,floatingTreeRoot:q,floatingNodeId:X,floatingParentNodeId:B,keyboardEventRelay:_?.relayKeyboardEvent}),z=M.type==="menubar",Q=C.useState("disabled"),$=u||Q||z&&M.context.disabled,{getButtonProps:K,buttonRef:Y}=vi({disabled:$,native:d});b.useEffect(()=>{!N&&M.type===void 0&&(C.context.allowMouseUpTriggerRef.current=!1)},[C,N,M.type]);const ee=b.useRef(null),G=Un(),oe=Be(Ue=>{if(!ee.current)return;G.clear(),C.context.allowMouseUpTriggerRef.current=!1;const be=Ue.target;st(ee.current,be)||st(C.select("positionerElement"),be)||be===ee.current||be!=null&&Lb(be)===C.select("rootId")||tA(Ue,ee.current)||q.events.emit("close",{domEvent:Ue,reason:Mv})});b.useEffect(()=>{const Ue=Qt(ee.current);if(N&&C.select("lastOpenChangeReason")===Kn)return Ue.addEventListener("mouseup",oe,{once:!0}),()=>{Ue.removeEventListener("mouseup",oe)}},[N,oe,C]);const I=z&&M.context.hasSubmenuOpen,W=$v(A,{enabled:(g??I)&&!$&&(!z||I&&!U),handleClose:Qv({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:M.type===void 0?m:void 0,delay:{close:h},triggerElementRef:D,externalTree:q,isActiveTrigger:k,isClosing:()=>C.select("transitionStatus")==="ending"}),re=JU(N,C.select("lastOpenChangeReason")),Ee=Dp(A,{enabled:!$,event:N&&z?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:M.type===void 0?re:!1}),le=BR(A,{enabled:!$&&I}),me=XU({open:N,enabled:z,mouseDownAction:"open"}),ge=b.useMemo(()=>Mr(le.reference,Ee.reference),[le.reference,Ee.reference]),ue=C.useState("triggerProps",U),Te=C.useState("filterTriggerProps"),{handlePreFocusGuardFocus:ve,handleFocusTargetFocus:Pe}=kk(C,D),Oe={disabled:$,open:N},Le=[ee,i,Y,H,D],Ve=[ge,W??Xt,ue,{"aria-haspopup":"menu","aria-controls":j,id:O,onMouseDown:Ue=>{if(C.select("open"))return;G.start(200,()=>{C.context.allowMouseUpTriggerRef.current=!0}),Qt(Ue.currentTarget).addEventListener("mouseup",oe,{once:!0})}},Te,z?{role:"menuitem"}:{},me,w,K],ke=kt("button",t,{enabled:!z,stateAttributesMapping:_u,state:Oe,ref:Le,props:Ve});return z?v.jsx(Pb,{tag:"button",render:s,className:o,style:l,state:Oe,refs:Le,props:Ve,stateAttributesMapping:_u}):N?v.jsxs(b.Fragment,{children:[v.jsx(Ba,{ref:C.context.beforeTriggerFocusGuardRef,onFocus:ve},`${O}-pre-focus-guard`),v.jsx(b.Fragment,{children:ke},O),v.jsx(Ba,{ref:C.context.triggerFocusTargetRef,onFocus:Pe},`${O}-post-focus-guard`)]}):v.jsx(b.Fragment,{children:ke},O)});function JU(e,t){const i=Un(),[s,o]=b.useState(!1);return _e(()=>{e&&t===Kn?(o(!0),i.start(CR,()=>{o(!1)})):e||(i.clear(),o(!1))},[e,t,i]),s}function WU(){const e=JO();return b.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}const eH=b.forwardRef(function(t,i){const{className:s,render:o,orientation:l="horizontal",style:u,...d}=t;return kt("div",t,{state:{orientation:l},ref:i,props:[{role:"separator","aria-orientation":l},d]})});function nA(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function rp(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function tH(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function rA(e){return tH(e?.[0])}function nH(e){return rA(e)?e.flatMap(t=>t.items):e}function rH(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(rA(t)){for(const i of t)for(const s of i.items)if(s&&s.value==null&&s.label!=null)return!0;return!1}for(const i of t)if(i&&i.value==null&&i.label!=null)return!0;return!1}function iA(e,t){if(t&&e!=null)return t(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 rp(e)}function Hl(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?rp(e.value):rp(e)}function sA(e,t,i){function s(){return iA(e,i)}if(i&&e!=null)return i(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??s();if(Array.isArray(t)){const l=nH(t);if(e==null||typeof e!="object"){const u=l.find(d=>d.value===e);return u&&u.label!=null?u.label:s()}if("value"in e){const u=l.find(d=>d&&d.value===e.value);if(u&&u.label!=null)return u.label}}return s()}function iH(e,t,i){return e.reduce((s,o,l)=>(l>0&&s.push(", "),s.push(v.jsx(b.Fragment,{children:sA(o,t,i)},l)),s),[])}function Ko({...e}){return v.jsx(eA,{"data-slot":"dropdown-menu",...e})}function qo({...e}){return v.jsx(ZU,{"data-slot":"dropdown-menu-trigger",...e})}function Yo({align:e="start",alignOffset:t=0,side:i="bottom",sideOffset:s=4,className:o,...l}){return v.jsx(GO,{children:v.jsx(QO,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:i,sideOffset:s,children:v.jsx(qO,{"data-slot":"dropdown-menu-content",className:Fe("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",o),...l})})})}function aA({...e}){return v.jsx(mU,{"data-slot":"dropdown-menu-group",...e})}function oA({className:e,inset:t,...i}){return v.jsx(yU,{"data-slot":"dropdown-menu-label","data-inset":t,className:Fe("px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5",e),...i})}function fc({className:e,inset:t,variant:i="default",...s}){return v.jsx(KO,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":i,className:Fe("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),...s})}function sH({...e}){return v.jsx(PU,{"data-slot":"dropdown-menu-radio-group",...e})}function aH({className:e,children:t,inset:i,...s}){return v.jsxs(_U,{"data-slot":"dropdown-menu-radio-item","data-inset":i,className:Fe("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),...s,children:[v.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:v.jsx(UU,{children:v.jsx(ld,{})})}),t]})}function zb(e){return kt(e.defaultTagName??"div",e,e)}const oH="data-valid",lH="data-invalid",cH={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},uH={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},dH={disabled:!1,...uH},hc={valid(e){return e===null?null:e?{[oH]:""}:{[lH]:""}}},fH={invalid:void 0,name:void 0,validityData:{state:cH,errors:[],error:"",value:"",initialValue:null},setValidityData:En,disabled:void 0,setTouched:En,setDirty:En,setFilled:En,setFocused:En,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:dH,registerFieldControl:En,validation:{getValidationProps:(e,t=Xt)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:En,getInputControl:()=>null,commit:async()=>{},change:En}},hH=b.createContext(fH);function ia(e=!0){const t=b.useContext(hH);if(t.setValidityData===En&&!e)throw new Error(gn(28));return t}const pH=b.createContext(void 0);function gH(e=!1){const t=b.useContext(pH);if(!t&&!e)throw new Error(gn(86));return t}const mH=b.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:En,validationMode:"onSubmit",submitCountRef:{current:0}});function vd(){return b.useContext(mH)}const yH=b.createContext({controlId:void 0,registerControlId:En,resetControlId:En,labelId:void 0,setLabelId:En,messageIds:[],setMessageIds:En,getDescriptionProps:e=>e});function Go(){return b.useContext(yH)}function _b(e,t,i,s=!0,o,l){const[u,d]=b.useState(),f=ar(o?`${o}-label`:void 0),g=!!l?.trim(),h=e??(g?void 0:t)??u;return _e(()=>{const x=e||t||g||!s?void 0:vH(i.current,f);u!==x&&d(x)}),h}function vH(e,t){const i=bH(e);if(i)return!i.id&&t&&(i.id=t),i.id||void 0}function bH(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const i=e.id;if(i){const o=e.nextElementSibling;if(o&&o.htmlFor===i)return o}const s=e.labels;return s&&s[0]}function pc(e={}){const{id:t,enabled:i=!0}=e,{controlId:s,registerControlId:o,resetControlId:l}=Go(),u=ar(),d=tr(()=>Symbol()),f=b.useRef(!1),g=b.useRef(!1),m=Be(()=>{!f.current||o===En||(f.current=!1,o(d.current,void 0))});return _e(()=>{if(!i||o===En){m();return}let h;if(t!==void 0)g.current=!0,h=t;else if(g.current)h=u;else{l();return}if(h===void 0){m();return}f.current=!0,o(d.current,h)},[t,i,o,l,u,d,m]),_e(()=>m,[m]),(i?s:void 0)??t??u}function xH(e,t){return e.matches(":disabled")?!1:!t||e.form===t?!0:e.form===null&&!e.hasAttribute("form")}const SH=b.createContext({disabled:!1});function lA(){return b.useContext(SH)}function bd(e,t,i){const{setFocused:s,focusOwnerRef:o}=ia(),l=Be(u=>{(u?!e:o.current===l)&&(o.current=u&&l,s(u))});return _e(()=>{const u=t.current;return u?.getRootNode()?.activeElement===u&&l(!0),()=>l(!1)},[e,t,l]),l}function xd(e,t,i,s,o=!0,l){const{registerFieldControl:u}=ia(),d=tr(()=>Symbol());_e(()=>{const f=d.current;if(!o){u(f,void 0);return}u(f,{controlRef:e,getValue:s,id:t,name:l,value:i})},[e,o,s,t,l,u,d,i]),_e(()=>{const f=d.current;return()=>{u(f,void 0)}},[u,d])}const wH=b.forwardRef(function(t,i){const{render:s,className:o,id:l,name:u,value:d,disabled:f=!1,onValueChange:g,defaultValue:m,autoFocus:h=!1,style:x,...S}=t,{state:w,name:R,disabled:E,setTouched:C,setDirty:O,validityData:k,setFilled:A,validationMode:N,validation:j}=ia(),{clearErrors:D,elementRef:M,submitCountRef:_}=vd(),L=E||f,q=R??u,X={...w,disabled:L},{labelId:B}=Go(),H=pc({id:l}),U=d!==void 0,z=d==null?void 0:String(d),Q=Be(()=>j.inputRef.current?.value);xd(j.inputRef,H,z,Q,!L,u),_e(()=>{const G=z??j.inputRef.current?.value;G!==void 0&&A(G!=="")},[z,m,j.inputRef,A]),cc(z,()=>{z!==void 0&&(D(q),O(z!==(k.initialValue??"")),j.change(z))});const $=b.useRef(null),K=bd(L,$),Y=Un();return kt("input",t,{ref:[i,$],state:X,props:[{id:H,disabled:L,name:q,ref:j.inputRef,"aria-labelledby":B,autoFocus:h,...U?{value:d}:{defaultValue:m},onChange(G){const oe=G.currentTarget.value,I=ut(Dr,G.nativeEvent);g?.(oe,I),!U&&(O(oe!==(k.initialValue??"")),A(oe!==""),!G.nativeEvent.defaultPrevented&&!I.isCanceled&&(D(q),j.change(oe)))},onFocus(){K(!0)},onBlur(G){if(C(!0),K(!1),N==="onBlur"){const oe=G.currentTarget.value;j.commit(oe),U&&queueMicrotask(()=>{const I=j.inputRef.current?.value;I!==void 0&&I!==oe&&I!==(k.initialValue??"")&&j.commit(I)})}},onKeyDown(G){if(G.currentTarget.tagName==="INPUT"&&G.key==="Enter"){C(!0);const oe=G.currentTarget.value,I=G.currentTarget.form;if(I&&I===M.current&&!G.defaultPrevented){const V=G.currentTarget,W=_.current;Y.start(0,()=>{_.current===W&&j.commit(V.value)})}else j.commit(oe)}}},S,G=>j.getValidationProps(L,G)],stateAttributesMapping:hc})}),EH=b.forwardRef(function(t,i){return v.jsx(wH,{ref:i,...t})});function Sd({className:e,type:t,...i}){return v.jsx(EH,{type:t,"data-slot":"input",className:Fe("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),...i})}function cA({className:e,orientation:t="horizontal",...i}){return v.jsx(eH,{"data-slot":"separator",orientation:t,className:Fe("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...i})}const uA=b.createContext(void 0);function Xa(e){const t=b.useContext(uA);if(!e&&t===void 0)throw new Error(gn(27));return t}const dA=b.forwardRef(function(t,i){const{render:s,className:o,style:l,forceRender:u=!1,...d}=t,f=Xa(),g=f.useState("open"),m=f.useState("nested"),h=f.useState("mounted"),x=f.useState("transitionStatus");return kt("div",t,{state:{open:g,transitionStatus:x},ref:[f.context.backdropRef,i],stateAttributesMapping:Cp,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:u||!m})}),pg=b.forwardRef(function(t,i){const{render:s,className:o,style:l,disabled:u=!1,nativeButton:d=!0,...f}=t,g=Xa(),m=g.useState("open"),{getButtonProps:h,buttonRef:x}=vi({disabled:u,native:d}),S={disabled:u};function w(R){m&&g.setOpen(!1,ut(JC,R.nativeEvent))}return kt("button",t,{state:S,ref:[i,x],props:[{onClick:w},f,h]})}),fA=b.forwardRef(function(t,i){const{render:s,className:o,style:l,id:u,...d}=t,f=Xa(),g=ar(u);return f.useSyncedValueWithCleanup("descriptionElementId",g),kt("p",t,{ref:i,props:[{id:g},d]})}),hA=b.createContext(void 0);function CH(){const e=b.useContext(hA);if(e===void 0)throw new Error(gn(26));return e}const RH="--nested-dialogs",TH="data-nested-dialog-open",kH={...Wu,...ws,nestedDialogOpen(e){return e?{[TH]:""}:null}},pA=b.forwardRef(function(t,i){const{render:s,className:o,style:l,finalFocus:u,initialFocus:d,...f}=t,g=Xa(),m=g.useState("descriptionElementId"),h=g.useState("disablePointerDismissal"),x=g.useState("floatingRootContext"),S=g.useState("popupProps"),w=g.useState("modal"),R=g.useState("mounted"),E=g.useState("nested"),C=g.useState("nestedOpenDialogCount"),O=g.useState("open"),k=g.useState("openMethod"),A=g.useState("titleElementId"),N=g.useState("transitionStatus"),j=g.useState("role"),D=x.useState("floatingId");CH(),Li({open:O,ref:g.context.popupRef,onComplete(){O&&g.context.onOpenChangeComplete?.(!0)}});const M=d===void 0?LR(g.context.popupRef):d,_=C>0,L=g.useStateSetter("popupElement"),X=kt("div",t,{state:{open:O,nested:E,transitionStatus:N,nestedDialogOpen:_},props:[S,{id:D,"aria-labelledby":A,"aria-describedby":m,role:j,...sd,hidden:!R,onKeyDown(B){ud.has(B.key)&&B.stopPropagation()},style:{[RH]:C}},f],ref:[i,g.context.popupRef,L],stateAttributesMapping:kH});return v.jsx(Np,{context:x,openInteractionType:k,disabled:!R,closeOnFocusOut:!h,initialFocus:M,returnFocus:u,modal:w!==!1,restoreFocus:"popup",children:X})}),gA=b.forwardRef(function(t,i){const{keepMounted:s=!1,...o}=t,l=Xa(),u=l.useState("mounted"),d=l.useState("modal"),f=l.useState("open");return u||s?v.jsx(hA.Provider,{value:s,children:v.jsxs(Mp,{ref:i,...o,children:[u&&d===!0&&v.jsx(eg,{ref:l.context.internalBackdropRef,inert:Qp(!f)}),t.children]})}):null});function OH({store:e,parentContext:t,isDrawer:i}){const s=e.useState("open"),o=e.useState("mounted"),l=e.useState("disablePointerDismissal"),u=e.useState("modal"),d=e.useState("popupElement"),f=e.useState("floatingRootContext"),[g,m]=b.useState(0),[h,x]=b.useState(0),S=g===0,w=id(f,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:u==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(R){if(!e.context.outsidePressEnabledRef.current||"button"in R&&R.button!==0)return!1;if("touches"in R){if(R.type==="touchend"){if(R.changedTouches.length!==1||R.touches.length!==0)return!1}else if(R.touches.length!==1)return!1}const E=nr(R);if(S&&!l){if(u){const C=e.context.internalBackdropRef.current,O=e.context.backdropRef.current;return C||O?C===E||O===E||st(E,d)&&!E?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return Dk(s&&u===!0,d),e.useContextCallback("onNestedDialogOpen",(R,E)=>{!e.select("open")&&!e.select("mounted")||(m(R),x(E))}),_e(()=>{!s&&!o&&(m(0),x(0))},[s,o]),_e(()=>(t?.onNestedDialogOpen&&s&&t.onNestedDialogOpen(g+1,h+(i?1:0)),()=>{t?.onNestedDialogOpen&&s&&t.onNestedDialogOpen(0,0)}),[i,s,g,h,t]),Hp(e,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:g,nestedOpenDrawerCount:h}),null}const AH={...Ys,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 MH extends oc{constructor(t,i,s){const o=new ad,l=NH(t,o,i,s);super(l,DH(o),AH)}setOpen=(t,i)=>{i.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&i.trigger==null&&this.state.activeTriggerId!=null&&(i.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,i),!i.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(t,i),this.update(Pp(this.state,t,i.trigger)))}}function NH(e,t,i,s=!1){return{...Bp(t,i,s),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function DH(e){return{popupRef:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function jH(e,t){const{children:i,open:s,defaultOpen:o=!1,onOpenChange:l,onOpenChangeComplete:u,disablePointerDismissal:d=!1,modal:f=!0,actionsRef:g,handle:m,triggerId:h,defaultTriggerId:x=null}=t,S=e==="drawer",w=f,R=d,E="dialog",C=Xa(!0),O=C!=null,k={modal:w,disablePointerDismissal:R,nested:O,role:E},A=Kv((L,q)=>new MH({open:o,openProp:s,activeTriggerId:x,triggerIdProp:h,...k},L,q),!0);A.useControlledProp("openProp",s),A.useControlledProp("triggerIdProp",h),A.useSyncedValues(k),A.useContextCallback("onOpenChange",l),A.useContextCallback("onOpenChangeComplete",u);const N=A.useState("open"),j=A.useState("mounted"),D=A.useState("payload");zR(A,N),_p(A);const{forceUnmount:M}=Up(N,A);b.useImperativeHandle(g,()=>({unmount:M,close:()=>A.setOpen(!1,ut(nd))}),[M,A]);const _=N||j||m!=null;return v.jsxs(uA.Provider,{value:A,children:[m&&v.jsx(Ip,{handle:m,store:A}),_&&v.jsx(OH,{store:A,parentContext:C?.context,isDrawer:S}),typeof i=="function"?i({payload:D}):i]})}const mA=Xu(function(t){return jH("dialog",t)}),yA=b.forwardRef(function(t,i){const{render:s,className:o,style:l,id:u,...d}=t,f=Xa(),g=ar(u);return f.useSyncedValueWithCleanup("titleElementId",g),kt("h2",t,{ref:i,props:[{id:g},d]})}),IH=gp(function(t,i){const{render:s,className:o,style:l,disabled:u=!1,nativeButton:d=!0,id:f,payload:g,handle:m,...h}=t,x=Xa(!0),w=Vp(m)??x;if(!w)throw new Error(gn(79));const R=ar(f),E=w.useState("floatingRootContext"),C=w.useState("isOpenedByTrigger",R),O=w.useState("triggerPopupId",R),k=b.useRef(null),{registerTrigger:A,isMountedByThisTrigger:N}=zp(R,k,w,{payload:g}),{getButtonProps:j,buttonRef:D}=vi({disabled:u,native:d}),M=Dp(E),_=lb(()=>w.select("open"),X=>{w.set("openMethod",X)}),L={disabled:u,open:C},q=w.useState("triggerProps",N);return kt("button",t,{state:L,ref:[D,i,A,k],props:[M.reference,q,_,{[Uv]:"",id:R,"aria-haspopup":"dialog","aria-expanded":C,"aria-controls":O},h,j],stateAttributesMapping:Ep})});function vA({...e}){return v.jsx(mA,{"data-slot":"sheet",...e})}function PH({...e}){return v.jsx(IH,{"data-slot":"sheet-trigger",...e})}function LH({...e}){return v.jsx(gA,{"data-slot":"sheet-portal",...e})}function zH({className:e,...t}){return v.jsx(dA,{"data-slot":"sheet-overlay",className:Fe("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),...t})}function bA({className:e,children:t,side:i="right",showCloseButton:s=!0,...o}){const{t:l}=pt();return v.jsxs(LH,{children:[v.jsx(zH,{}),v.jsxs(pA,{"data-slot":"sheet-content","data-side":i,className:Fe("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),...o,children:[t,s&&v.jsxs(pg,{"data-slot":"sheet-close",render:v.jsx(nt,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[v.jsx(ta,{}),v.jsx("span",{className:"sr-only",children:l("a11y.close")})]})]})]})}function _H({className:e,...t}){return v.jsx("div",{"data-slot":"sheet-header",className:Fe("flex flex-col gap-1.5 p-6",e),...t})}function xA({className:e,...t}){return v.jsx(yA,{"data-slot":"sheet-title",className:Fe("font-heading text-sm font-medium text-foreground",e),...t})}function UH({className:e,...t}){return v.jsx(fA,{"data-slot":"sheet-description",className:Fe("text-xs/relaxed text-muted-foreground",e),...t})}function fr({className:e,...t}){return v.jsx("div",{"data-slot":"skeleton",className:Fe("animate-pulse rounded-md bg-muted",e),...t})}const HH="sidebar_state",FH=3600*24*7,BH="16rem",VH="18rem",KH="3rem",qH="b",SA=b.createContext(null);function gc(){const e=b.useContext(SA);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function YH({defaultOpen:e=!0,open:t,onOpenChange:i,className:s,style:o,children:l,...u}){const d=bb(),[f,g]=b.useState(!1),[m,h]=b.useState(e),x=t??m,S=b.useCallback(C=>{const O=typeof C=="function"?C(x):C;i?i(O):h(O),document.cookie=`${HH}=${O}; path=/; max-age=${FH}`},[i,x]),w=b.useCallback(()=>d?g(C=>!C):S(C=>!C),[d,S,g]);b.useEffect(()=>{const C=O=>{O.key===qH&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),w())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[w]);const R=x?"expanded":"collapsed",E=b.useMemo(()=>({state:R,open:x,setOpen:S,isMobile:d,openMobile:f,setOpenMobile:g,toggleSidebar:w}),[R,x,S,d,f,g,w]);return v.jsx(SA.Provider,{value:E,children:v.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":BH,"--sidebar-width-icon":KH,...o},className:Fe("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),...u,children:l})})}function GH({side:e="left",variant:t="sidebar",collapsible:i="offcanvas",className:s,children:o,dir:l,...u}){const{t:d}=pt(),{isMobile:f,state:g,openMobile:m,setOpenMobile:h}=gc();return i==="none"?v.jsx("div",{"data-slot":"sidebar",className:Fe("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",s),...u,children:o}):f?v.jsx(vA,{open:m,onOpenChange:h,...u,children:v.jsxs(bA,{dir:l,"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":VH},side:e,children:[v.jsxs(_H,{className:"sr-only",children:[v.jsx(xA,{children:d("a11y.sidebar")}),v.jsx(UH,{children:d("a11y.sidebarDescription")})]}),v.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):v.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":g,"data-collapsible":g==="collapsed"?i:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[v.jsx("div",{"data-slot":"sidebar-gap",className:Fe("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),v.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:Fe("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",t==="floating"||t==="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",s),...u,children:v.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:o})})]})}function $H({className:e,onClick:t,...i}){const{t:s}=pt(),{toggleSidebar:o}=gc();return v.jsxs(nt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:Fe(e),onClick:l=>{t?.(l),o()},...i,children:[v.jsx(kL,{}),v.jsx("span",{className:"sr-only",children:s("a11y.toggleSidebar")})]})}function QH({className:e,...t}){const{t:i}=pt(),{toggleSidebar:s}=gc();return v.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":i("a11y.toggleSidebar"),tabIndex:-1,onClick:s,title:i("a11y.toggleSidebar"),className:Fe("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),...t})}function XH({className:e,...t}){return v.jsx("main",{"data-slot":"sidebar-inset",className:Fe("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),...t})}function ZH({className:e,...t}){return v.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Fe("flex flex-col gap-2 p-2",e),...t})}function JH({className:e,...t}){return v.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Fe("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function WH({className:e,...t}){return v.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Fe("relative flex w-full min-w-0 flex-col px-2 py-1",e),...t})}function wA({className:e,...t}){return v.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Fe("flex w-full min-w-0 flex-col gap-px",e),...t})}function jh({className:e,...t}){return v.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Fe("group/menu-item relative",e),...t})}const eF=Ho("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 Ih({render:e,isActive:t=!1,variant:i="default",size:s="default",tooltip:o,className:l,...u}){const{isMobile:d,state:f}=gc(),g=zb({defaultTagName:"button",props:Mr({className:Fe(eF({variant:i,size:s}),l)},u),render:o?v.jsx(Zh,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:s,active:t}});return o?(typeof o=="string"&&(o={children:o}),v.jsxs(Xh,{children:[g,v.jsx(Jh,{side:"right",align:"center",hidden:f!=="collapsed"||d,...o})]})):g}function tF({className:e,...t}){return v.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:Fe("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),...t})}function nF({className:e,...t}){return v.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:Fe("group/menu-sub-item relative",e),...t})}function rF({render:e,size:t="md",isActive:i=!1,className:s,...o}){return zb({defaultTagName:"a",props:Mr({className:Fe("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",s)},o),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:t,active:i}})}function iF({items:e}){const{t}=pt(),{pathname:i}=Rr(),{isMobile:s,state:o}=gc(),l=o==="collapsed"&&!s,u=d=>i===d||i.startsWith(`${d}/`);return v.jsx(WH,{children:v.jsx(wA,{children:e.map(d=>{const f=d.icon,g=d.items?.some(m=>u(m.url))??!1;return d.items?l?v.jsx(jh,{children:v.jsxs(Ko,{children:[v.jsxs(qo,{render:v.jsx(Ih,{tooltip:t(d.titleKey),isActive:g}),children:[v.jsx(f,{}),v.jsx("span",{children:t(d.titleKey)})]}),v.jsx(Yo,{className:"w-40",side:"right",align:"start",sideOffset:4,children:v.jsxs(aA,{children:[v.jsx(oA,{children:t(d.titleKey)}),d.items.map(m=>v.jsx(fc,{className:"cursor-pointer",render:v.jsx(Mu,{to:m.url}),children:v.jsx("span",{children:t(m.titleKey)})},m.titleKey))]})})]})},d.titleKey):v.jsxs(rU,{defaultOpen:g,className:"group/collapsible",render:v.jsx(jh,{}),children:[v.jsxs(iU,{render:v.jsx(Ih,{tooltip:t(d.titleKey),isActive:g}),children:[v.jsx(f,{}),v.jsx("span",{children:t(d.titleKey)}),v.jsx(Jv,{className:`
|
|
50
|
-
ml-auto transition-transform duration-200
|
|
51
|
-
group-data-open/collapsible:rotate-90
|
|
52
|
-
`})]}),v.jsx(sU,{children:v.jsx(tF,{children:d.items.map(m=>v.jsx(nF,{children:v.jsx(rF,{isActive:u(m.url),render:v.jsx(Mu,{to:m.url}),children:v.jsx("span",{children:t(m.titleKey)})})},m.titleKey))})})]},`${d.titleKey}-${g?"active":"inactive"}`):v.jsx(jh,{children:v.jsxs(Ih,{tooltip:t(d.titleKey),isActive:i===d.url,render:v.jsx(Mu,{to:d.url??"/dashboard"}),children:[v.jsx(f,{}),v.jsx("span",{children:t(d.titleKey)})]})},d.titleKey)})})})}const Ub=[{titleKey:"nav.dashboard",url:"/dashboard",icon:xL},{titleKey:"nav.library",icon:SL,items:[{titleKey:"nav.instructions",url:"/library/instructions"},{titleKey:"nav.skills",url:"/library/skills"}]},{titleKey:"nav.models",icon:dT,items:[{titleKey:"nav.genesis",url:"/models/genesis"},{titleKey:"nav.explorer",url:"/models/explorer"},{titleKey:"nav.quantum",url:"/models/quantum"}]}],sF=new Map([["/settings","nav.settings"],...Ub.flatMap(e=>[...e.url?[[e.url,e.titleKey]]:[],...e.items?.map(t=>[t.url,t.titleKey])??[]])]);function EA(e){return e.startsWith("/library/skills/")?"nav.skills":sF.get(e)??"nav.dashboard"}const aF=Ub.flatMap(e=>[...e.url?[e.url]:[],...e.items?.map(t=>t.url)??[]]),oF=aF;function lF({...e}){const{t}=pt(),i=Rr(),{pathname:s}=i,{isMobile:o,setOpenMobile:l}=gc();return b.useEffect(()=>{o&&l(!1)},[o,s,l]),v.jsxs(GH,{collapsible:"icon",...e,children:[v.jsx(JH,{children:v.jsx(iF,{items:Ub})}),v.jsx(ZH,{children:v.jsx(wA,{children:v.jsx(jh,{children:v.jsxs(Ih,{tooltip:t("nav.settings"),render:v.jsx(Mu,{to:"/settings",state:{backTo:Nr(i)}}),children:[v.jsx(AL,{}),v.jsx("span",{children:t("nav.settings")})]})})})}),v.jsx(QH,{})]})}function cF({className:e,...t}){return v.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:Fe(e),...t})}function uF({className:e,...t}){return v.jsx("ol",{"data-slot":"breadcrumb-list",className:Fe("flex flex-wrap items-center gap-1.5 text-xs/relaxed wrap-break-word text-muted-foreground",e),...t})}function dF({className:e,...t}){return v.jsx("li",{"data-slot":"breadcrumb-item",className:Fe("inline-flex items-center gap-1",e),...t})}function fF({className:e,render:t,...i}){return zb({defaultTagName:"a",props:Mr({className:Fe("transition-colors hover:text-foreground",e)},i),render:t,state:{slot:"breadcrumb-link"}})}function hF({className:e,...t}){return v.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Fe("font-normal text-foreground",e),...t})}function pF({children:e,className:t,...i}){return v.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Fe("[&>svg]:size-3.5",t),...i,children:e??v.jsx(Jv,{})})}function gF({items:e}){const{t}=pt();return v.jsx(cF,{"aria-label":t("a11y.breadcrumb"),className:"min-w-0",children:v.jsx(uF,{className:"flex-nowrap text-sm font-medium text-foreground",children:e.map((i,s)=>v.jsxs(b.Fragment,{children:[s>0&&v.jsx(pF,{}),v.jsx(dF,{className:i.to?"shrink-0":"min-w-0",children:i.to?v.jsx(fF,{render:v.jsx(yd,{to:i.to}),className:"truncate",title:i.label,children:i.label}):v.jsx(hF,{className:"truncate font-medium",title:i.label,children:i.label})})]},i.to??i.label))})})}const gg=b.createContext(null);gg.displayName="PageHeaderActionsContext";function mF({children:e}){const[t,i]=b.useState(null);return v.jsx(gg,{value:{container:t,setContainer:i},children:e})}function yF(){const e=b.use(gg);if(!e)throw new Error("PageHeaderActionsSlot must be used within PageHeaderActionsProvider");const t=e.setContainer,i=b.useCallback(s=>{t(s)},[t]);return v.jsx("div",{ref:i,className:"ml-auto flex shrink-0 items-center gap-2 px-4"})}function CA({children:e}){const t=b.use(gg);return t?.container?hr.createPortal(e,t.container):null}function vF(){const{t:e}=pt(),{pathname:t}=Rr(),i=O6("/library/skills/:name");return v.jsx(mF,{children:v.jsxs(YH,{className:"h-svh pb-6",children:[v.jsx(lF,{className:"pb-6"}),v.jsxs(XH,{className:i?"h-full min-w-0 overflow-hidden":"min-w-0",children:[v.jsxs("header",{className:`
|
|
53
|
-
flex h-16 shrink-0 items-center gap-2 transition-[width,height]
|
|
54
|
-
ease-linear
|
|
55
|
-
group-has-data-[collapsible=icon]/sidebar-wrapper:h-12
|
|
56
|
-
`,children:[v.jsxs("div",{className:"flex min-w-0 items-center gap-2 px-4",children:[v.jsx($H,{size:"icon",className:"-ml-1"}),v.jsx(cA,{orientation:"vertical",className:`
|
|
57
|
-
mr-2
|
|
58
|
-
data-vertical:h-4 data-vertical:self-auto
|
|
59
|
-
`}),v.jsx(gF,{items:i?[{label:e("nav.skills"),to:"/library/skills"},{label:i.params.name??""}]:[{label:e(EA(t))}]})]}),v.jsx(yF,{})]}),v.jsx(MO,{})]})]})})}function bF(){const{t:e}=pt(),{pathname:t,state:i}=Rr(),s=Vo(),o=xF(i)?i.backTo:"/dashboard",l=()=>{s(o)};return v.jsxs("div",{"data-slot":"full-screen-layout",className:"flex h-dvh flex-col overflow-hidden bg-background pb-6",children:[v.jsx("header",{className:`
|
|
60
|
-
flex h-16 shrink-0 items-center gap-2 transition-[width,height]
|
|
61
|
-
ease-linear
|
|
62
|
-
`,children:v.jsxs("div",{className:"flex items-center gap-2 px-4",children:[v.jsxs(nt,{variant:"ghost",size:"icon",className:"-ml-1",onClick:l,children:[v.jsx(cL,{}),v.jsx("span",{className:"sr-only",children:e("a11y.goBack")})]}),v.jsx(cA,{orientation:"vertical",className:`
|
|
63
|
-
mr-2
|
|
64
|
-
data-vertical:h-4 data-vertical:self-auto
|
|
65
|
-
`}),v.jsx("span",{className:"text-sm font-medium",children:e(EA(t))})]})}),v.jsx("main",{className:"min-h-0 flex-1 overflow-hidden",children:v.jsx(MO,{})})]})}function xF(e){return typeof e=="object"&&e!==null&&"backTo"in e&&typeof e.backTo=="string"&&e.backTo.length>0}function SF(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return b.useMemo(()=>s=>{t.forEach(o=>o(s))},t)}const mg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function mc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Hb(e){return"nodeType"in e}function Kr(e){var t,i;return e?mc(e)?e:Hb(e)&&(t=(i=e.ownerDocument)==null?void 0:i.defaultView)!=null?t:window:window}function Fb(e){const{Document:t}=Kr(e);return e instanceof t}function wd(e){return mc(e)?!1:e instanceof Kr(e).HTMLElement}function RA(e){return e instanceof Kr(e).SVGElement}function yc(e){return e?mc(e)?e.document:Hb(e)?Fb(e)?e:wd(e)||RA(e)?e.ownerDocument:document:document:document}const Xi=mg?b.useLayoutEffect:b.useEffect;function yg(e){const t=b.useRef(e);return Xi(()=>{t.current=e}),b.useCallback(function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return t.current==null?void 0:t.current(...s)},[])}function wF(){const e=b.useRef(null),t=b.useCallback((s,o)=>{e.current=setInterval(s,o)},[]),i=b.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,i]}function Ku(e,t){t===void 0&&(t=[e]);const i=b.useRef(e);return Xi(()=>{i.current!==e&&(i.current=e)},t),i}function Ed(e,t){const i=b.useRef();return b.useMemo(()=>{const s=e(i.current);return i.current=s,s},[...t])}function ip(e){const t=yg(e),i=b.useRef(null),s=b.useCallback(o=>{o!==i.current&&t?.(o,i.current),i.current=o},[]);return[i,s]}function sp(e){const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current}let Sy={};function Cd(e,t){return b.useMemo(()=>{if(t)return t;const i=Sy[e]==null?0:Sy[e]+1;return Sy[e]=i,e+"-"+i},[e,t])}function TA(e){return function(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return s.reduce((l,u)=>{const d=Object.entries(u);for(const[f,g]of d){const m=l[f];m!=null&&(l[f]=m+e*g)}return l},{...t})}}const Jl=TA(1),qu=TA(-1);function EF(e){return"clientX"in e&&"clientY"in e}function vg(e){if(!e)return!1;const{KeyboardEvent:t}=Kr(e.target);return t&&e instanceof t}function CF(e){if(!e)return!1;const{TouchEvent:t}=Kr(e.target);return t&&e instanceof t}function ap(e){if(CF(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:i}=e.touches[0];return{x:t,y:i}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:i}=e.changedTouches[0];return{x:t,y:i}}}return EF(e)?{x:e.clientX,y:e.clientY}:null}const Ya=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:i}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(i?Math.round(i):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:i}=e;return"scaleX("+t+") scaleY("+i+")"}},Transform:{toString(e){if(e)return[Ya.Translate.toString(e),Ya.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:i,easing:s}=e;return t+" "+i+"ms "+s}}}),vC="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function RF(e){return e.matches(vC)?e:e.querySelector(vC)}const TF={display:"none"};function kF(e){let{id:t,value:i}=e;return Ne.createElement("div",{id:t,style:TF},i)}function OF(e){let{id:t,announcement:i,ariaLiveType:s="assertive"}=e;const o={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:t,style:o,role:"status","aria-live":s,"aria-atomic":!0},i)}function AF(){const[e,t]=b.useState("");return{announce:b.useCallback(s=>{s!=null&&t(s)},[]),announcement:e}}const kA=b.createContext(null);function MF(e){const t=b.useContext(kA);b.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function NF(){const[e]=b.useState(()=>new Set),t=b.useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[b.useCallback(s=>{let{type:o,event:l}=s;e.forEach(u=>{var d;return(d=u[o])==null?void 0:d.call(u,l)})},[e]),t]}const DF={draggable:`
|
|
66
|
-
To pick up a draggable item, press the space bar.
|
|
67
|
-
While dragging, use the arrow keys to move the item.
|
|
68
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
69
|
-
`},jF={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:i}=e;return i?"Draggable item "+t.id+" was moved over droppable area "+i.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:i}=e;return i?"Draggable item "+t.id+" was dropped over droppable area "+i.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function IF(e){let{announcements:t=jF,container:i,hiddenTextDescribedById:s,screenReaderInstructions:o=DF}=e;const{announce:l,announcement:u}=AF(),d=Cd("DndLiveRegion"),[f,g]=b.useState(!1);if(b.useEffect(()=>{g(!0)},[]),MF(b.useMemo(()=>({onDragStart(h){let{active:x}=h;l(t.onDragStart({active:x}))},onDragMove(h){let{active:x,over:S}=h;t.onDragMove&&l(t.onDragMove({active:x,over:S}))},onDragOver(h){let{active:x,over:S}=h;l(t.onDragOver({active:x,over:S}))},onDragEnd(h){let{active:x,over:S}=h;l(t.onDragEnd({active:x,over:S}))},onDragCancel(h){let{active:x,over:S}=h;l(t.onDragCancel({active:x,over:S}))}}),[l,t])),!f)return null;const m=Ne.createElement(Ne.Fragment,null,Ne.createElement(kF,{id:s,value:o.draggable}),Ne.createElement(OF,{id:d,announcement:u}));return i?hr.createPortal(m,i):m}var sr;(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"})(sr||(sr={}));function op(){}function wy(e,t){return b.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function PF(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return b.useMemo(()=>[...t].filter(s=>s!=null),[...t])}const Zi=Object.freeze({x:0,y:0});function Bb(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function LF(e,t){const i=ap(e);if(!i)return"0 0";const s={x:(i.x-t.left)/t.width*100,y:(i.y-t.top)/t.height*100};return s.x+"% "+s.y+"%"}function Vb(e,t){let{data:{value:i}}=e,{data:{value:s}}=t;return i-s}function zF(e,t){let{data:{value:i}}=e,{data:{value:s}}=t;return s-i}function cv(e){let{left:t,top:i,height:s,width:o}=e;return[{x:t,y:i},{x:t+o,y:i},{x:t,y:i+s},{x:t+o,y:i+s}]}function OA(e,t){if(!e||e.length===0)return null;const[i]=e;return i[t]}function bC(e,t,i){return t===void 0&&(t=e.left),i===void 0&&(i=e.top),{x:t+e.width*.5,y:i+e.height*.5}}const _F=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:s}=e;const o=bC(t,t.left,t.top),l=[];for(const u of s){const{id:d}=u,f=i.get(d);if(f){const g=Bb(bC(f),o);l.push({id:d,data:{droppableContainer:u,value:g}})}}return l.sort(Vb)},UF=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:s}=e;const o=cv(t),l=[];for(const u of s){const{id:d}=u,f=i.get(d);if(f){const g=cv(f),m=o.reduce((x,S,w)=>x+Bb(g[w],S),0),h=Number((m/4).toFixed(4));l.push({id:d,data:{droppableContainer:u,value:h}})}}return l.sort(Vb)};function HF(e,t){const i=Math.max(t.top,e.top),s=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),u=o-s,d=l-i;if(s<o&&i<l){const f=t.width*t.height,g=e.width*e.height,m=u*d,h=m/(f+g-m);return Number(h.toFixed(4))}return 0}const FF=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:s}=e;const o=[];for(const l of s){const{id:u}=l,d=i.get(u);if(d){const f=HF(d,t);f>0&&o.push({id:u,data:{droppableContainer:l,value:f}})}}return o.sort(zF)};function BF(e,t){const{top:i,left:s,bottom:o,right:l}=t;return i<=e.y&&e.y<=o&&s<=e.x&&e.x<=l}const VF=e=>{let{droppableContainers:t,droppableRects:i,pointerCoordinates:s}=e;if(!s)return[];const o=[];for(const l of t){const{id:u}=l,d=i.get(u);if(d&&BF(s,d)){const g=cv(d).reduce((h,x)=>h+Bb(s,x),0),m=Number((g/4).toFixed(4));o.push({id:u,data:{droppableContainer:l,value:m}})}}return o.sort(Vb)};function KF(e,t,i){return{...e,scaleX:t&&i?t.width/i.width:1,scaleY:t&&i?t.height/i.height:1}}function AA(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Zi}function qF(e){return function(i){for(var s=arguments.length,o=new Array(s>1?s-1:0),l=1;l<s;l++)o[l-1]=arguments[l];return o.reduce((u,d)=>({...u,top:u.top+e*d.y,bottom:u.bottom+e*d.y,left:u.left+e*d.x,right:u.right+e*d.x}),{...i})}}const YF=qF(1);function MA(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function GF(e,t,i){const s=MA(t);if(!s)return e;const{scaleX:o,scaleY:l,x:u,y:d}=s,f=e.left-u-(1-o)*parseFloat(i),g=e.top-d-(1-l)*parseFloat(i.slice(i.indexOf(" ")+1)),m=o?e.width/o:e.width,h=l?e.height/l:e.height;return{width:m,height:h,top:g,right:f+m,bottom:g+h,left:f}}const $F={ignoreTransform:!1};function vc(e,t){t===void 0&&(t=$F);let i=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:m}=Kr(e).getComputedStyle(e);g&&(i=GF(i,g,m))}const{top:s,left:o,width:l,height:u,bottom:d,right:f}=i;return{top:s,left:o,width:l,height:u,bottom:d,right:f}}function xC(e){return vc(e,{ignoreTransform:!0})}function QF(e){const t=e.innerWidth,i=e.innerHeight;return{top:0,left:0,right:t,bottom:i,width:t,height:i}}function XF(e,t){return t===void 0&&(t=Kr(e).getComputedStyle(e)),t.position==="fixed"}function ZF(e,t){t===void 0&&(t=Kr(e).getComputedStyle(e));const i=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const l=t[o];return typeof l=="string"?i.test(l):!1})}function bg(e,t){const i=[];function s(o){if(t!=null&&i.length>=t||!o)return i;if(Fb(o)&&o.scrollingElement!=null&&!i.includes(o.scrollingElement))return i.push(o.scrollingElement),i;if(!wd(o)||RA(o)||i.includes(o))return i;const l=Kr(e).getComputedStyle(o);return o!==e&&ZF(o,l)&&i.push(o),XF(o,l)?i:s(o.parentNode)}return e?s(e):i}function NA(e){const[t]=bg(e,1);return t??null}function Ey(e){return!mg||!e?null:mc(e)?e:Hb(e)?Fb(e)||e===yc(e).scrollingElement?window:wd(e)?e:null:null}function DA(e){return mc(e)?e.scrollX:e.scrollLeft}function jA(e){return mc(e)?e.scrollY:e.scrollTop}function uv(e){return{x:DA(e),y:jA(e)}}var dr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(dr||(dr={}));function IA(e){return!mg||!e?!1:e===document.scrollingElement}function PA(e){const t={x:0,y:0},i=IA(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={x:e.scrollWidth-i.width,y:e.scrollHeight-i.height},o=e.scrollTop<=t.y,l=e.scrollLeft<=t.x,u=e.scrollTop>=s.y,d=e.scrollLeft>=s.x;return{isTop:o,isLeft:l,isBottom:u,isRight:d,maxScroll:s,minScroll:t}}const JF={x:.2,y:.2};function WF(e,t,i,s,o){let{top:l,left:u,right:d,bottom:f}=i;s===void 0&&(s=10),o===void 0&&(o=JF);const{isTop:g,isBottom:m,isLeft:h,isRight:x}=PA(e),S={x:0,y:0},w={x:0,y:0},R={height:t.height*o.y,width:t.width*o.x};return!g&&l<=t.top+R.height?(S.y=dr.Backward,w.y=s*Math.abs((t.top+R.height-l)/R.height)):!m&&f>=t.bottom-R.height&&(S.y=dr.Forward,w.y=s*Math.abs((t.bottom-R.height-f)/R.height)),!x&&d>=t.right-R.width?(S.x=dr.Forward,w.x=s*Math.abs((t.right-R.width-d)/R.width)):!h&&u<=t.left+R.width&&(S.x=dr.Backward,w.x=s*Math.abs((t.left+R.width-u)/R.width)),{direction:S,speed:w}}function e7(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:u}=window;return{top:0,left:0,right:l,bottom:u,width:l,height:u}}const{top:t,left:i,right:s,bottom:o}=e.getBoundingClientRect();return{top:t,left:i,right:s,bottom:o,width:e.clientWidth,height:e.clientHeight}}function LA(e){return e.reduce((t,i)=>Jl(t,uv(i)),Zi)}function t7(e){return e.reduce((t,i)=>t+DA(i),0)}function n7(e){return e.reduce((t,i)=>t+jA(i),0)}function zA(e,t){if(t===void 0&&(t=vc),!e)return;const{top:i,left:s,bottom:o,right:l}=t(e);NA(e)&&(o<=0||l<=0||i>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const r7=[["x",["left","right"],t7],["y",["top","bottom"],n7]];class Kb{constructor(t,i){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 s=bg(i),o=LA(s);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,u,d]of r7)for(const f of u)Object.defineProperty(this,f,{get:()=>{const g=d(s),m=o[l]-g;return this.rect[f]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Nu{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(i=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...i)})},this.target=t}add(t,i,s){var o;(o=this.target)==null||o.addEventListener(t,i,s),this.listeners.push([t,i,s])}}function i7(e){const{EventTarget:t}=Kr(e);return e instanceof t?e:yc(e)}function Cy(e,t){const i=Math.abs(e.x),s=Math.abs(e.y);return typeof t=="number"?Math.sqrt(i**2+s**2)>t:"x"in t&&"y"in t?i>t.x&&s>t.y:"x"in t?i>t.x:"y"in t?s>t.y:!1}var Di;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Di||(Di={}));function SC(e){e.preventDefault()}function s7(e){e.stopPropagation()}var en;(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"})(en||(en={}));const _A={start:[en.Space,en.Enter],cancel:[en.Esc],end:[en.Space,en.Enter,en.Tab]},a7=(e,t)=>{let{currentCoordinates:i}=t;switch(e.code){case en.Right:return{...i,x:i.x+25};case en.Left:return{...i,x:i.x-25};case en.Down:return{...i,y:i.y+25};case en.Up:return{...i,y:i.y-25}}};class qb{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:i}}=t;this.props=t,this.listeners=new Nu(yc(i)),this.windowListeners=new Nu(Kr(i)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Di.Resize,this.handleCancel),this.windowListeners.add(Di.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Di.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:i}=this.props,s=t.node.current;s&&zA(s),i(Zi)}handleKeyDown(t){if(vg(t)){const{active:i,context:s,options:o}=this.props,{keyboardCodes:l=_A,coordinateGetter:u=a7,scrollBehavior:d="smooth"}=o,{code:f}=t;if(l.end.includes(f)){this.handleEnd(t);return}if(l.cancel.includes(f)){this.handleCancel(t);return}const{collisionRect:g}=s.current,m=g?{x:g.left,y:g.top}:Zi;this.referenceCoordinates||(this.referenceCoordinates=m);const h=u(t,{active:i,context:s.current,currentCoordinates:m});if(h){const x=qu(h,m),S={x:0,y:0},{scrollableAncestors:w}=s.current;for(const R of w){const E=t.code,{isTop:C,isRight:O,isLeft:k,isBottom:A,maxScroll:N,minScroll:j}=PA(R),D=e7(R),M={x:Math.min(E===en.Right?D.right-D.width/2:D.right,Math.max(E===en.Right?D.left:D.left+D.width/2,h.x)),y:Math.min(E===en.Down?D.bottom-D.height/2:D.bottom,Math.max(E===en.Down?D.top:D.top+D.height/2,h.y))},_=E===en.Right&&!O||E===en.Left&&!k,L=E===en.Down&&!A||E===en.Up&&!C;if(_&&M.x!==h.x){const q=R.scrollLeft+x.x,X=E===en.Right&&q<=N.x||E===en.Left&&q>=j.x;if(X&&!x.y){R.scrollTo({left:q,behavior:d});return}X?S.x=R.scrollLeft-q:S.x=E===en.Right?R.scrollLeft-N.x:R.scrollLeft-j.x,S.x&&R.scrollBy({left:-S.x,behavior:d});break}else if(L&&M.y!==h.y){const q=R.scrollTop+x.y,X=E===en.Down&&q<=N.y||E===en.Up&&q>=j.y;if(X&&!x.x){R.scrollTo({top:q,behavior:d});return}X?S.y=R.scrollTop-q:S.y=E===en.Down?R.scrollTop-N.y:R.scrollTop-j.y,S.y&&R.scrollBy({top:-S.y,behavior:d});break}}this.handleMove(t,Jl(qu(h,this.referenceCoordinates),S))}}}handleMove(t,i){const{onMove:s}=this.props;t.preventDefault(),s(i)}handleEnd(t){const{onEnd:i}=this.props;t.preventDefault(),this.detach(),i()}handleCancel(t){const{onCancel:i}=this.props;t.preventDefault(),this.detach(),i()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}qb.activators=[{eventName:"onKeyDown",handler:(e,t,i)=>{let{keyboardCodes:s=_A,onActivation:o}=t,{active:l}=i;const{code:u}=e.nativeEvent;if(s.start.includes(u)){const d=l.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function wC(e){return!!(e&&"distance"in e)}function EC(e){return!!(e&&"delay"in e)}class Yb{constructor(t,i,s){var o;s===void 0&&(s=i7(t.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=t,this.events=i;const{event:l}=t,{target:u}=l;this.props=t,this.events=i,this.document=yc(u),this.documentListeners=new Nu(this.document),this.listeners=new Nu(s),this.windowListeners=new Nu(Kr(u)),this.initialCoordinates=(o=ap(l))!=null?o:Zi,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:t,props:{options:{activationConstraint:i,bypassActivationConstraint:s}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Di.Resize,this.handleCancel),this.windowListeners.add(Di.DragStart,SC),this.windowListeners.add(Di.VisibilityChange,this.handleCancel),this.windowListeners.add(Di.ContextMenu,SC),this.documentListeners.add(Di.Keydown,this.handleKeydown),i){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(EC(i)){this.timeoutId=setTimeout(this.handleStart,i.delay),this.handlePending(i);return}if(wC(i)){this.handlePending(i);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(t,i){const{active:s,onPending:o}=this.props;o(s,t,this.initialCoordinates,i)}handleStart(){const{initialCoordinates:t}=this,{onStart:i}=this.props;t&&(this.activated=!0,this.documentListeners.add(Di.Click,s7,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Di.SelectionChange,this.removeTextSelection),i(t))}handleMove(t){var i;const{activated:s,initialCoordinates:o,props:l}=this,{onMove:u,options:{activationConstraint:d}}=l;if(!o)return;const f=(i=ap(t))!=null?i:Zi,g=qu(o,f);if(!s&&d){if(wC(d)){if(d.tolerance!=null&&Cy(g,d.tolerance))return this.handleCancel();if(Cy(g,d.distance))return this.handleStart()}if(EC(d)&&Cy(g,d.tolerance))return this.handleCancel();this.handlePending(d,g);return}t.cancelable&&t.preventDefault(),u(f)}handleEnd(){const{onAbort:t,onEnd:i}=this.props;this.detach(),this.activated||t(this.props.active),i()}handleCancel(){const{onAbort:t,onCancel:i}=this.props;this.detach(),this.activated||t(this.props.active),i()}handleKeydown(t){t.code===en.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const o7={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class UA extends Yb{constructor(t){const{event:i}=t,s=yc(i.target);super(t,o7,s)}}UA.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:i}=e,{onActivation:s}=t;return!i.isPrimary||i.button!==0?!1:(s?.({event:i}),!0)}}];const l7={move:{name:"mousemove"},end:{name:"mouseup"}};var dv;(function(e){e[e.RightClick=2]="RightClick"})(dv||(dv={}));class HA extends Yb{constructor(t){super(t,l7,yc(t.event.target))}}HA.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:i}=e,{onActivation:s}=t;return i.button===dv.RightClick?!1:(s?.({event:i}),!0)}}];const Ry={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class FA extends Yb{constructor(t){super(t,Ry)}static setup(){return window.addEventListener(Ry.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Ry.move.name,t)};function t(){}}}FA.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:i}=e,{onActivation:s}=t;const{touches:o}=i;return o.length>1?!1:(s?.({event:i}),!0)}}];var Du;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Du||(Du={}));var lp;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(lp||(lp={}));function c7(e){let{acceleration:t,activator:i=Du.Pointer,canScroll:s,draggingRect:o,enabled:l,interval:u=5,order:d=lp.TreeOrder,pointerCoordinates:f,scrollableAncestors:g,scrollableAncestorRects:m,delta:h,threshold:x}=e;const S=d7({delta:h,disabled:!l}),[w,R]=wF(),E=b.useRef({x:0,y:0}),C=b.useRef({x:0,y:0}),O=b.useMemo(()=>{switch(i){case Du.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case Du.DraggableRect:return o}},[i,o,f]),k=b.useRef(null),A=b.useCallback(()=>{const j=k.current;if(!j)return;const D=E.current.x*C.current.x,M=E.current.y*C.current.y;j.scrollBy(D,M)},[]),N=b.useMemo(()=>d===lp.TreeOrder?[...g].reverse():g,[d,g]);b.useEffect(()=>{if(!l||!g.length||!O){R();return}for(const j of N){if(s?.(j)===!1)continue;const D=g.indexOf(j),M=m[D];if(!M)continue;const{direction:_,speed:L}=WF(j,M,O,t,x);for(const q of["x","y"])S[q][_[q]]||(L[q]=0,_[q]=0);if(L.x>0||L.y>0){R(),k.current=j,w(A,u),E.current=L,C.current=_;return}}E.current={x:0,y:0},C.current={x:0,y:0},R()},[t,A,s,R,l,u,JSON.stringify(O),JSON.stringify(S),w,g,N,m,JSON.stringify(x)])}const u7={x:{[dr.Backward]:!1,[dr.Forward]:!1},y:{[dr.Backward]:!1,[dr.Forward]:!1}};function d7(e){let{delta:t,disabled:i}=e;const s=sp(t);return Ed(o=>{if(i||!s||!o)return u7;const l={x:Math.sign(t.x-s.x),y:Math.sign(t.y-s.y)};return{x:{[dr.Backward]:o.x[dr.Backward]||l.x===-1,[dr.Forward]:o.x[dr.Forward]||l.x===1},y:{[dr.Backward]:o.y[dr.Backward]||l.y===-1,[dr.Forward]:o.y[dr.Forward]||l.y===1}}},[i,t,s])}function f7(e,t){const i=t!=null?e.get(t):void 0,s=i?i.node.current:null;return Ed(o=>{var l;return t==null?null:(l=s??o)!=null?l:null},[s,t])}function h7(e,t){return b.useMemo(()=>e.reduce((i,s)=>{const{sensor:o}=s,l=o.activators.map(u=>({eventName:u.eventName,handler:t(u.handler,s)}));return[...i,...l]},[]),[e,t])}var Yu;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Yu||(Yu={}));var fv;(function(e){e.Optimized="optimized"})(fv||(fv={}));const CC=new Map;function p7(e,t){let{dragging:i,dependencies:s,config:o}=t;const[l,u]=b.useState(null),{frequency:d,measure:f,strategy:g}=o,m=b.useRef(e),h=E(),x=Ku(h),S=b.useCallback(function(C){C===void 0&&(C=[]),!x.current&&u(O=>O===null?C:O.concat(C.filter(k=>!O.includes(k))))},[x]),w=b.useRef(null),R=Ed(C=>{if(h&&!i)return CC;if(!C||C===CC||m.current!==e||l!=null){const O=new Map;for(let k of e){if(!k)continue;if(l&&l.length>0&&!l.includes(k.id)&&k.rect.current){O.set(k.id,k.rect.current);continue}const A=k.node.current,N=A?new Kb(f(A),A):null;k.rect.current=N,N&&O.set(k.id,N)}return O}return C},[e,l,i,h,f]);return b.useEffect(()=>{m.current=e},[e]),b.useEffect(()=>{h||S()},[i,h]),b.useEffect(()=>{l&&l.length>0&&u(null)},[JSON.stringify(l)]),b.useEffect(()=>{h||typeof d!="number"||w.current!==null||(w.current=setTimeout(()=>{S(),w.current=null},d))},[d,h,S,...s]),{droppableRects:R,measureDroppableContainers:S,measuringScheduled:l!=null};function E(){switch(g){case Yu.Always:return!1;case Yu.BeforeDragging:return i;default:return!i}}}function Gb(e,t){return Ed(i=>e?i||(typeof t=="function"?t(e):e):null,[t,e])}function g7(e,t){return Gb(e,t)}function m7(e){let{callback:t,disabled:i}=e;const s=yg(t),o=b.useMemo(()=>{if(i||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(s)},[s,i]);return b.useEffect(()=>()=>o?.disconnect(),[o]),o}function xg(e){let{callback:t,disabled:i}=e;const s=yg(t),o=b.useMemo(()=>{if(i||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(s)},[i]);return b.useEffect(()=>()=>o?.disconnect(),[o]),o}function y7(e){return new Kb(vc(e),e)}function RC(e,t,i){t===void 0&&(t=y7);const[s,o]=b.useState(null);function l(){o(f=>{if(!e)return null;if(e.isConnected===!1){var g;return(g=f??i)!=null?g:null}const m=t(e);return JSON.stringify(f)===JSON.stringify(m)?f:m})}const u=m7({callback(f){if(e)for(const g of f){const{type:m,target:h}=g;if(m==="childList"&&h instanceof HTMLElement&&h.contains(e)){l();break}}}}),d=xg({callback:l});return Xi(()=>{l(),e?(d?.observe(e),u?.observe(document.body,{childList:!0,subtree:!0})):(d?.disconnect(),u?.disconnect())},[e]),s}function v7(e){const t=Gb(e);return AA(e,t)}const TC=[];function b7(e){const t=b.useRef(e),i=Ed(s=>e?s&&s!==TC&&e&&t.current&&e.parentNode===t.current.parentNode?s:bg(e):TC,[e]);return b.useEffect(()=>{t.current=e},[e]),i}function x7(e){const[t,i]=b.useState(null),s=b.useRef(e),o=b.useCallback(l=>{const u=Ey(l.target);u&&i(d=>d?(d.set(u,uv(u)),new Map(d)):null)},[]);return b.useEffect(()=>{const l=s.current;if(e!==l){u(l);const d=e.map(f=>{const g=Ey(f);return g?(g.addEventListener("scroll",o,{passive:!0}),[g,uv(g)]):null}).filter(f=>f!=null);i(d.length?new Map(d):null),s.current=e}return()=>{u(e),u(l)};function u(d){d.forEach(f=>{const g=Ey(f);g?.removeEventListener("scroll",o)})}},[o,e]),b.useMemo(()=>e.length?t?Array.from(t.values()).reduce((l,u)=>Jl(l,u),Zi):LA(e):Zi,[e,t])}function kC(e,t){t===void 0&&(t=[]);const i=b.useRef(null);return b.useEffect(()=>{i.current=null},t),b.useEffect(()=>{const s=e!==Zi;s&&!i.current&&(i.current=e),!s&&i.current&&(i.current=null)},[e]),i.current?qu(e,i.current):Zi}function S7(e){b.useEffect(()=>{if(!mg)return;const t=e.map(i=>{let{sensor:s}=i;return s.setup==null?void 0:s.setup()});return()=>{for(const i of t)i?.()}},e.map(t=>{let{sensor:i}=t;return i}))}function w7(e,t){return b.useMemo(()=>e.reduce((i,s)=>{let{eventName:o,handler:l}=s;return i[o]=u=>{l(u,t)},i},{}),[e,t])}function BA(e){return b.useMemo(()=>e?QF(e):null,[e])}const OC=[];function E7(e,t){t===void 0&&(t=vc);const[i]=e,s=BA(i?Kr(i):null),[o,l]=b.useState(OC);function u(){l(()=>e.length?e.map(f=>IA(f)?s:new Kb(t(f),f)):OC)}const d=xg({callback:u});return Xi(()=>{d?.disconnect(),u(),e.forEach(f=>d?.observe(f))},[e]),o}function VA(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return wd(t)?t:e}function C7(e){let{measure:t}=e;const[i,s]=b.useState(null),o=b.useCallback(g=>{for(const{target:m}of g)if(wd(m)){s(h=>{const x=t(m);return h?{...h,width:x.width,height:x.height}:x});break}},[t]),l=xg({callback:o}),u=b.useCallback(g=>{const m=VA(g);l?.disconnect(),m&&l?.observe(m),s(m?t(m):null)},[t,l]),[d,f]=ip(u);return b.useMemo(()=>({nodeRef:d,rect:i,setRef:f}),[i,d,f])}const R7=[{sensor:UA,options:{}},{sensor:qb,options:{}}],T7={current:{}},Ph={draggable:{measure:xC},droppable:{measure:xC,strategy:Yu.WhileDragging,frequency:fv.Optimized},dragOverlay:{measure:vc}};class ju extends Map{get(t){var i;return t!=null&&(i=super.get(t))!=null?i:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:i}=t;return!i})}getNodeFor(t){var i,s;return(i=(s=this.get(t))==null?void 0:s.node.current)!=null?i:void 0}}const k7={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ju,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:op},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ph,measureDroppableContainers:op,windowRect:null,measuringScheduled:!1},KA={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:op,draggableNodes:new Map,over:null,measureDroppableContainers:op},Rd=b.createContext(KA),qA=b.createContext(k7);function O7(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ju}}}function A7(e,t){switch(t.type){case sr.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case sr.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case sr.DragEnd:case sr.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case sr.RegisterDroppable:{const{element:i}=t,{id:s}=i,o=new ju(e.droppable.containers);return o.set(s,i),{...e,droppable:{...e.droppable,containers:o}}}case sr.SetDroppableDisabled:{const{id:i,key:s,disabled:o}=t,l=e.droppable.containers.get(i);if(!l||s!==l.key)return e;const u=new ju(e.droppable.containers);return u.set(i,{...l,disabled:o}),{...e,droppable:{...e.droppable,containers:u}}}case sr.UnregisterDroppable:{const{id:i,key:s}=t,o=e.droppable.containers.get(i);if(!o||s!==o.key)return e;const l=new ju(e.droppable.containers);return l.delete(i),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function M7(e){let{disabled:t}=e;const{active:i,activatorEvent:s,draggableNodes:o}=b.useContext(Rd),l=sp(s),u=sp(i?.id);return b.useEffect(()=>{if(!t&&!s&&l&&u!=null){if(!vg(l)||document.activeElement===l.target)return;const d=o.get(u);if(!d)return;const{activatorNode:f,node:g}=d;if(!f.current&&!g.current)return;requestAnimationFrame(()=>{for(const m of[f.current,g.current]){if(!m)continue;const h=RF(m);if(h){h.focus();break}}})}},[s,t,o,u,l]),null}function YA(e,t){let{transform:i,...s}=t;return e!=null&&e.length?e.reduce((o,l)=>l({transform:o,...s}),i):i}function N7(e){return b.useMemo(()=>({draggable:{...Ph.draggable,...e?.draggable},droppable:{...Ph.droppable,...e?.droppable},dragOverlay:{...Ph.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function D7(e){let{activeNode:t,measure:i,initialRect:s,config:o=!0}=e;const l=b.useRef(!1),{x:u,y:d}=typeof o=="boolean"?{x:o,y:o}:o;Xi(()=>{if(!u&&!d||!t){l.current=!1;return}if(l.current||!s)return;const g=t?.node.current;if(!g||g.isConnected===!1)return;const m=i(g),h=AA(m,s);if(u||(h.x=0),d||(h.y=0),l.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const x=NA(g);x&&x.scrollBy({top:h.y,left:h.x})}},[t,u,d,s,i])}const Sg=b.createContext({...Zi,scaleX:1,scaleY:1});var Pa;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Pa||(Pa={}));const j7=b.memo(function(t){var i,s,o,l;let{id:u,accessibility:d,autoScroll:f=!0,children:g,sensors:m=R7,collisionDetection:h=FF,measuring:x,modifiers:S,...w}=t;const R=b.useReducer(A7,void 0,O7),[E,C]=R,[O,k]=NF(),[A,N]=b.useState(Pa.Uninitialized),j=A===Pa.Initialized,{draggable:{active:D,nodes:M,translate:_},droppable:{containers:L}}=E,q=D!=null?M.get(D):null,X=b.useRef({initial:null,translated:null}),B=b.useMemo(()=>{var xt;return D!=null?{id:D,data:(xt=q?.data)!=null?xt:T7,rect:X}:null},[D,q]),H=b.useRef(null),[U,z]=b.useState(null),[Q,$]=b.useState(null),K=Ku(w,Object.values(w)),Y=Cd("DndDescribedBy",u),ee=b.useMemo(()=>L.getEnabled(),[L]),G=N7(x),{droppableRects:oe,measureDroppableContainers:I,measuringScheduled:V}=p7(ee,{dragging:j,dependencies:[_.x,_.y],config:G.droppable}),W=f7(M,D),re=b.useMemo(()=>Q?ap(Q):null,[Q]),Ee=ht(),le=g7(W,G.draggable.measure);D7({activeNode:D!=null?M.get(D):null,config:Ee.layoutShiftCompensation,initialRect:le,measure:G.draggable.measure});const me=RC(W,G.draggable.measure,le),ge=RC(W?W.parentElement:null),ue=b.useRef({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:oe,draggableNodes:M,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Te=L.getNodeFor((i=ue.current.over)==null?void 0:i.id),ve=C7({measure:G.dragOverlay.measure}),Pe=(s=ve.nodeRef.current)!=null?s:W,Oe=j?(o=ve.rect)!=null?o:me:null,Le=!!(ve.nodeRef.current&&ve.rect),Ve=v7(Le?null:me),ke=BA(Pe?Kr(Pe):null),Ue=b7(j?Te??W:null),be=E7(Ue),He=YA(S,{transform:{x:_.x-Ve.x,y:_.y-Ve.y,scaleX:1,scaleY:1},activatorEvent:Q,active:B,activeNodeRect:me,containerNodeRect:ge,draggingNodeRect:Oe,over:ue.current.over,overlayNodeRect:ve.rect,scrollableAncestors:Ue,scrollableAncestorRects:be,windowRect:ke}),Ze=re?Jl(re,_):null,ot=x7(Ue),de=kC(ot),we=kC(ot,[me]),Ge=Jl(He,de),Me=Oe?YF(Oe,He):null,De=B&&Me?h({active:B,collisionRect:Me,droppableRects:oe,droppableContainers:ee,pointerCoordinates:Ze}):null,bt=OA(De,"id"),[dt,gt]=b.useState(null),Nt=Le?He:Jl(He,we),jt=KF(Nt,(l=dt?.rect)!=null?l:null,me),tn=b.useRef(null),an=b.useCallback((xt,yt)=>{let{sensor:Ut,options:un}=yt;if(H.current==null)return;const je=M.get(H.current);if(!je)return;const at=xt.nativeEvent,Ie=new Ut({active:H.current,activeNode:je,event:at,options:un,context:ue,onAbort($e){if(!M.get($e))return;const{onDragAbort:Tt}=K.current,F={id:$e};Tt?.(F),O({type:"onDragAbort",event:F})},onPending($e,et,Tt,F){if(!M.get($e))return;const{onDragPending:ne}=K.current,ye={id:$e,constraint:et,initialCoordinates:Tt,offset:F};ne?.(ye),O({type:"onDragPending",event:ye})},onStart($e){const et=H.current;if(et==null)return;const Tt=M.get(et);if(!Tt)return;const{onDragStart:F}=K.current,J={activatorEvent:at,active:{id:et,data:Tt.data,rect:X}};hr.unstable_batchedUpdates(()=>{F?.(J),N(Pa.Initializing),C({type:sr.DragStart,initialCoordinates:$e,active:et}),O({type:"onDragStart",event:J}),z(tn.current),$(at)})},onMove($e){C({type:sr.DragMove,coordinates:$e})},onEnd:ze(sr.DragEnd),onCancel:ze(sr.DragCancel)});tn.current=Ie;function ze($e){return async function(){const{active:Tt,collisions:F,over:J,scrollAdjustedTranslate:ne}=ue.current;let ye=null;if(Tt&&ne){const{cancelDrop:xe}=K.current;ye={activatorEvent:at,active:Tt,collisions:F,delta:ne,over:J},$e===sr.DragEnd&&typeof xe=="function"&&await Promise.resolve(xe(ye))&&($e=sr.DragCancel)}H.current=null,hr.unstable_batchedUpdates(()=>{C({type:$e}),N(Pa.Uninitialized),gt(null),z(null),$(null),tn.current=null;const xe=$e===sr.DragEnd?"onDragEnd":"onDragCancel";if(ye){const qe=K.current[xe];qe?.(ye),O({type:xe,event:ye})}})}}},[M]),nn=b.useCallback((xt,yt)=>(Ut,un)=>{const je=Ut.nativeEvent,at=M.get(un);if(H.current!==null||!at||je.dndKit||je.defaultPrevented)return;const Ie={active:at};xt(Ut,yt.options,Ie)===!0&&(je.dndKit={capturedBy:yt.sensor},H.current=un,an(Ut,yt))},[M,an]),We=h7(m,nn);S7(m),Xi(()=>{me&&A===Pa.Initializing&&N(Pa.Initialized)},[me,A]),b.useEffect(()=>{const{onDragMove:xt}=K.current,{active:yt,activatorEvent:Ut,collisions:un,over:je}=ue.current;if(!yt||!Ut)return;const at={active:yt,activatorEvent:Ut,collisions:un,delta:{x:Ge.x,y:Ge.y},over:je};hr.unstable_batchedUpdates(()=>{xt?.(at),O({type:"onDragMove",event:at})})},[Ge.x,Ge.y]),b.useEffect(()=>{const{active:xt,activatorEvent:yt,collisions:Ut,droppableContainers:un,scrollAdjustedTranslate:je}=ue.current;if(!xt||H.current==null||!yt||!je)return;const{onDragOver:at}=K.current,Ie=un.get(bt),ze=Ie&&Ie.rect.current?{id:Ie.id,rect:Ie.rect.current,data:Ie.data,disabled:Ie.disabled}:null,$e={active:xt,activatorEvent:yt,collisions:Ut,delta:{x:je.x,y:je.y},over:ze};hr.unstable_batchedUpdates(()=>{gt(ze),at?.($e),O({type:"onDragOver",event:$e})})},[bt]),Xi(()=>{ue.current={activatorEvent:Q,active:B,activeNode:W,collisionRect:Me,collisions:De,droppableRects:oe,draggableNodes:M,draggingNode:Pe,draggingNodeRect:Oe,droppableContainers:L,over:dt,scrollableAncestors:Ue,scrollAdjustedTranslate:Ge},X.current={initial:Oe,translated:Me}},[B,W,De,Me,M,Pe,Oe,oe,L,dt,Ue,Ge]),c7({...Ee,delta:_,draggingRect:Me,pointerCoordinates:Ze,scrollableAncestors:Ue,scrollableAncestorRects:be});const wt=b.useMemo(()=>({active:B,activeNode:W,activeNodeRect:me,activatorEvent:Q,collisions:De,containerNodeRect:ge,dragOverlay:ve,draggableNodes:M,droppableContainers:L,droppableRects:oe,over:dt,measureDroppableContainers:I,scrollableAncestors:Ue,scrollableAncestorRects:be,measuringConfiguration:G,measuringScheduled:V,windowRect:ke}),[B,W,me,Q,De,ge,ve,M,L,oe,dt,I,Ue,be,G,V,ke]),Zt=b.useMemo(()=>({activatorEvent:Q,activators:We,active:B,activeNodeRect:me,ariaDescribedById:{draggable:Y},dispatch:C,draggableNodes:M,over:dt,measureDroppableContainers:I}),[Q,We,B,me,C,Y,M,dt,I]);return Ne.createElement(kA.Provider,{value:k},Ne.createElement(Rd.Provider,{value:Zt},Ne.createElement(qA.Provider,{value:wt},Ne.createElement(Sg.Provider,{value:jt},g)),Ne.createElement(M7,{disabled:d?.restoreFocus===!1})),Ne.createElement(IF,{...d,hiddenTextDescribedById:Y}));function ht(){const xt=U?.autoScrollEnabled===!1,yt=typeof f=="object"?f.enabled===!1:f===!1,Ut=j&&!xt&&!yt;return typeof f=="object"?{...f,enabled:Ut}:{enabled:Ut}}}),I7=b.createContext(null),AC="button",P7="Draggable";function GA(e){let{id:t,data:i,disabled:s=!1,attributes:o}=e;const l=Cd(P7),{activators:u,activatorEvent:d,active:f,activeNodeRect:g,ariaDescribedById:m,draggableNodes:h,over:x}=b.useContext(Rd),{role:S=AC,roleDescription:w="draggable",tabIndex:R=0}=o??{},E=f?.id===t,C=b.useContext(E?Sg:I7),[O,k]=ip(),[A,N]=ip(),j=w7(u,t),D=Ku(i);Xi(()=>(h.set(t,{id:t,key:l,node:O,activatorNode:A,data:D}),()=>{const _=h.get(t);_&&_.key===l&&h.delete(t)}),[h,t]);const M=b.useMemo(()=>({role:S,tabIndex:R,"aria-disabled":s,"aria-pressed":E&&S===AC?!0:void 0,"aria-roledescription":w,"aria-describedby":m.draggable}),[s,S,R,E,w,m.draggable]);return{active:f,activatorEvent:d,activeNodeRect:g,attributes:M,isDragging:E,listeners:s?void 0:j,node:O,over:x,setNodeRef:k,setActivatorNodeRef:N,transform:C}}function $A(){return b.useContext(qA)}const L7="Droppable",z7={timeout:25};function QA(e){let{data:t,disabled:i=!1,id:s,resizeObserverConfig:o}=e;const l=Cd(L7),{active:u,dispatch:d,over:f,measureDroppableContainers:g}=b.useContext(Rd),m=b.useRef({disabled:i}),h=b.useRef(!1),x=b.useRef(null),S=b.useRef(null),{disabled:w,updateMeasurementsFor:R,timeout:E}={...z7,...o},C=Ku(R??s),O=b.useCallback(()=>{if(!h.current){h.current=!0;return}S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{g(Array.isArray(C.current)?C.current:[C.current]),S.current=null},E)},[E]),k=xg({callback:O,disabled:w||!u}),A=b.useCallback((M,_)=>{k&&(_&&(k.unobserve(_),h.current=!1),M&&k.observe(M))},[k]),[N,j]=ip(A),D=Ku(t);return b.useEffect(()=>{!k||!N.current||(k.disconnect(),h.current=!1,k.observe(N.current))},[N,k]),b.useEffect(()=>(d({type:sr.RegisterDroppable,element:{id:s,key:l,disabled:i,node:N,rect:x,data:D}}),()=>d({type:sr.UnregisterDroppable,key:l,id:s})),[s]),b.useEffect(()=>{i!==m.current.disabled&&(d({type:sr.SetDroppableDisabled,id:s,key:l,disabled:i}),m.current.disabled=i)},[s,l,i,d]),{active:u,rect:x,isOver:f?.id===s,node:N,over:f,setNodeRef:j}}function _7(e){let{animation:t,children:i}=e;const[s,o]=b.useState(null),[l,u]=b.useState(null),d=sp(i);return!i&&!s&&d&&o(d),Xi(()=>{if(!l)return;const f=s?.key,g=s?.props.id;if(f==null||g==null){o(null);return}Promise.resolve(t(g,l)).then(()=>{o(null)})},[t,s,l]),Ne.createElement(Ne.Fragment,null,i,s?b.cloneElement(s,{ref:u}):null)}const U7={x:0,y:0,scaleX:1,scaleY:1};function H7(e){let{children:t}=e;return Ne.createElement(Rd.Provider,{value:KA},Ne.createElement(Sg.Provider,{value:U7},t))}const F7={position:"fixed",touchAction:"none"},B7=e=>vg(e)?"transform 250ms ease":void 0,V7=b.forwardRef((e,t)=>{let{as:i,activatorEvent:s,adjustScale:o,children:l,className:u,rect:d,style:f,transform:g,transition:m=B7}=e;if(!d)return null;const h=o?g:{...g,scaleX:1,scaleY:1},x={...F7,width:d.width,height:d.height,top:d.top,left:d.left,transform:Ya.Transform.toString(h),transformOrigin:o&&s?LF(s,d):void 0,transition:typeof m=="function"?m(s):m,...f};return Ne.createElement(i,{className:u,style:x,ref:t},l)}),K7=e=>t=>{let{active:i,dragOverlay:s}=t;const o={},{styles:l,className:u}=e;if(l!=null&&l.active)for(const[d,f]of Object.entries(l.active))f!==void 0&&(o[d]=i.node.style.getPropertyValue(d),i.node.style.setProperty(d,f));if(l!=null&&l.dragOverlay)for(const[d,f]of Object.entries(l.dragOverlay))f!==void 0&&s.node.style.setProperty(d,f);return u!=null&&u.active&&i.node.classList.add(u.active),u!=null&&u.dragOverlay&&s.node.classList.add(u.dragOverlay),function(){for(const[f,g]of Object.entries(o))i.node.style.setProperty(f,g);u!=null&&u.active&&i.node.classList.remove(u.active)}},q7=e=>{let{transform:{initial:t,final:i}}=e;return[{transform:Ya.Transform.toString(t)},{transform:Ya.Transform.toString(i)}]},Y7={duration:250,easing:"ease",keyframes:q7,sideEffects:K7({styles:{active:{opacity:"0"}}})};function G7(e){let{config:t,draggableNodes:i,droppableContainers:s,measuringConfiguration:o}=e;return yg((l,u)=>{if(t===null)return;const d=i.get(l);if(!d)return;const f=d.node.current;if(!f)return;const g=VA(u);if(!g)return;const{transform:m}=Kr(u).getComputedStyle(u),h=MA(m);if(!h)return;const x=typeof t=="function"?t:$7(t);return zA(f,o.draggable.measure),x({active:{id:l,data:d.data,node:f,rect:o.draggable.measure(f)},draggableNodes:i,dragOverlay:{node:u,rect:o.dragOverlay.measure(g)},droppableContainers:s,measuringConfiguration:o,transform:h})})}function $7(e){const{duration:t,easing:i,sideEffects:s,keyframes:o}={...Y7,...e};return l=>{let{active:u,dragOverlay:d,transform:f,...g}=l;if(!t)return;const m={x:d.rect.left-u.rect.left,y:d.rect.top-u.rect.top},h={scaleX:f.scaleX!==1?u.rect.width*f.scaleX/d.rect.width:1,scaleY:f.scaleY!==1?u.rect.height*f.scaleY/d.rect.height:1},x={x:f.x-m.x,y:f.y-m.y,...h},S=o({...g,active:u,dragOverlay:d,transform:{initial:f,final:x}}),[w]=S,R=S[S.length-1];if(JSON.stringify(w)===JSON.stringify(R))return;const E=s?.({active:u,dragOverlay:d,...g}),C=d.node.animate(S,{duration:t,easing:i,fill:"forwards"});return new Promise(O=>{C.onfinish=()=>{E?.(),O()}})}}let MC=0;function Q7(e){return b.useMemo(()=>{if(e!=null)return MC++,MC},[e])}const X7=Ne.memo(e=>{let{adjustScale:t=!1,children:i,dropAnimation:s,style:o,transition:l,modifiers:u,wrapperElement:d="div",className:f,zIndex:g=999}=e;const{activatorEvent:m,active:h,activeNodeRect:x,containerNodeRect:S,draggableNodes:w,droppableContainers:R,dragOverlay:E,over:C,measuringConfiguration:O,scrollableAncestors:k,scrollableAncestorRects:A,windowRect:N}=$A(),j=b.useContext(Sg),D=Q7(h?.id),M=YA(u,{activatorEvent:m,active:h,activeNodeRect:x,containerNodeRect:S,draggingNodeRect:E.rect,over:C,overlayNodeRect:E.rect,scrollableAncestors:k,scrollableAncestorRects:A,transform:j,windowRect:N}),_=Gb(x),L=G7({config:s,draggableNodes:w,droppableContainers:R,measuringConfiguration:O}),q=_?E.setRef:void 0;return Ne.createElement(H7,null,Ne.createElement(_7,{animation:L},h&&D?Ne.createElement(V7,{key:D,id:h.id,ref:q,as:d,activatorEvent:m,adjustScale:t,className:f,transition:l,rect:_,style:{zIndex:g,...o},transform:M},i):null))});function $b(e,t,i){const s=e.slice();return s.splice(i<0?s.length+i:i,0,s.splice(t,1)[0]),s}function Z7(e,t){return e.reduce((i,s,o)=>{const l=t.get(s);return l&&(i[o]=l),i},Array(e.length))}function mh(e){return e!==null&&e>=0}function J7(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function W7(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const XA=e=>{let{rects:t,activeIndex:i,overIndex:s,index:o}=e;const l=$b(t,s,i),u=t[o],d=l[o];return!d||!u?null:{x:d.left-u.left,y:d.top-u.top,scaleX:d.width/u.width,scaleY:d.height/u.height}},yh={scaleX:1,scaleY:1},e9=e=>{var t;let{activeIndex:i,activeNodeRect:s,index:o,rects:l,overIndex:u}=e;const d=(t=l[i])!=null?t:s;if(!d)return null;if(o===i){const g=l[u];return g?{x:0,y:i<u?g.top+g.height-(d.top+d.height):g.top-d.top,...yh}:null}const f=t9(l,o,i);return o>i&&o<=u?{x:0,y:-d.height-f,...yh}:o<i&&o>=u?{x:0,y:d.height+f,...yh}:{x:0,y:0,...yh}};function t9(e,t,i){const s=e[t],o=e[t-1],l=e[t+1];return s?i<t?o?s.top-(o.top+o.height):l?l.top-(s.top+s.height):0:l?l.top-(s.top+s.height):o?s.top-(o.top+o.height):0:0}const ZA="Sortable",JA=Ne.createContext({activeIndex:-1,containerId:ZA,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:XA,disabled:{draggable:!1,droppable:!1}});function n9(e){let{children:t,id:i,items:s,strategy:o=XA,disabled:l=!1}=e;const{active:u,dragOverlay:d,droppableRects:f,over:g,measureDroppableContainers:m}=$A(),h=Cd(ZA,i),x=d.rect!==null,S=b.useMemo(()=>s.map(j=>typeof j=="object"&&"id"in j?j.id:j),[s]),w=u!=null,R=u?S.indexOf(u.id):-1,E=g?S.indexOf(g.id):-1,C=b.useRef(S),O=!J7(S,C.current),k=E!==-1&&R===-1||O,A=W7(l);Xi(()=>{O&&w&&m(S)},[O,S,w,m]),b.useEffect(()=>{C.current=S},[S]);const N=b.useMemo(()=>({activeIndex:R,containerId:h,disabled:A,disableTransforms:k,items:S,overIndex:E,useDragOverlay:x,sortedRects:Z7(S,f),strategy:o}),[R,h,A.draggable,A.droppable,k,S,E,f,x,o]);return Ne.createElement(JA.Provider,{value:N},t)}const r9=e=>{let{id:t,items:i,activeIndex:s,overIndex:o}=e;return $b(i,s,o).indexOf(t)},i9=e=>{let{containerId:t,isSorting:i,wasDragging:s,index:o,items:l,newIndex:u,previousItems:d,previousContainerId:f,transition:g}=e;return!g||!s||d!==l&&o===u?!1:i?!0:u!==o&&t===f},s9={duration:200,easing:"ease"},WA="transform",a9=Ya.Transition.toString({property:WA,duration:0,easing:"linear"}),o9={roleDescription:"sortable"};function l9(e){let{disabled:t,index:i,node:s,rect:o}=e;const[l,u]=b.useState(null),d=b.useRef(i);return Xi(()=>{if(!t&&i!==d.current&&s.current){const f=o.current;if(f){const g=vc(s.current,{ignoreTransform:!0}),m={x:f.left-g.left,y:f.top-g.top,scaleX:f.width/g.width,scaleY:f.height/g.height};(m.x||m.y)&&u(m)}}i!==d.current&&(d.current=i)},[t,i,s,o]),b.useEffect(()=>{l&&u(null)},[l]),l}function c9(e){let{animateLayoutChanges:t=i9,attributes:i,disabled:s,data:o,getNewIndex:l=r9,id:u,strategy:d,resizeObserverConfig:f,transition:g=s9}=e;const{items:m,containerId:h,activeIndex:x,disabled:S,disableTransforms:w,sortedRects:R,overIndex:E,useDragOverlay:C,strategy:O}=b.useContext(JA),k=u9(s,S),A=m.indexOf(u),N=b.useMemo(()=>({sortable:{containerId:h,index:A,items:m},...o}),[h,o,A,m]),j=b.useMemo(()=>m.slice(m.indexOf(u)),[m,u]),{rect:D,node:M,isOver:_,setNodeRef:L}=QA({id:u,data:N,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...f}}),{active:q,activatorEvent:X,activeNodeRect:B,attributes:H,setNodeRef:U,listeners:z,isDragging:Q,over:$,setActivatorNodeRef:K,transform:Y}=GA({id:u,data:N,attributes:{...o9,...i},disabled:k.draggable}),ee=SF(L,U),G=!!q,oe=G&&!w&&mh(x)&&mh(E),I=!C&&Q,V=I&&oe?Y:null,re=oe?V??(d??O)({rects:R,activeNodeRect:B,activeIndex:x,overIndex:E,index:A}):null,Ee=mh(x)&&mh(E)?l({id:u,items:m,activeIndex:x,overIndex:E}):A,le=q?.id,me=b.useRef({activeId:le,items:m,newIndex:Ee,containerId:h}),ge=m!==me.current.items,ue=t({active:q,containerId:h,isDragging:Q,isSorting:G,id:u,index:A,items:m,newIndex:me.current.newIndex,previousItems:me.current.items,previousContainerId:me.current.containerId,transition:g,wasDragging:me.current.activeId!=null}),Te=l9({disabled:!ue,index:A,node:M,rect:D});return b.useEffect(()=>{G&&me.current.newIndex!==Ee&&(me.current.newIndex=Ee),h!==me.current.containerId&&(me.current.containerId=h),m!==me.current.items&&(me.current.items=m)},[G,Ee,h,m]),b.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:q,activeIndex:x,attributes:H,data:N,rect:D,index:A,newIndex:Ee,items:m,isOver:_,isSorting:G,isDragging:Q,listeners:z,node:M,overIndex:E,over:$,setNodeRef:ee,setActivatorNodeRef:K,setDroppableNodeRef:L,setDraggableNodeRef:U,transform:Te??re,transition:ve()};function ve(){if(Te||ge&&me.current.newIndex===A)return a9;if(!(I&&!vg(X)||!g)&&(G||ue))return Ya.Transition.toString({...g,property:WA})}}function u9(e,t){var i,s;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(i=e?.draggable)!=null?i:t.draggable,droppable:(s=e?.droppable)!=null?s:t.droppable}}function cp(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const d9=[en.Down,en.Right,en.Up,en.Left],f9=(e,t)=>{let{context:{active:i,collisionRect:s,droppableRects:o,droppableContainers:l,over:u,scrollableAncestors:d}}=t;if(d9.includes(e.code)){if(e.preventDefault(),!i||!s)return;const f=[];l.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const x=o.get(h.id);if(x)switch(e.code){case en.Down:s.top<x.top&&f.push(h);break;case en.Up:s.top>x.top&&f.push(h);break;case en.Left:s.left>x.left&&f.push(h);break;case en.Right:s.left<x.left&&f.push(h);break}});const g=UF({collisionRect:s,droppableRects:o,droppableContainers:f});let m=OA(g,"id");if(m===u?.id&&g.length>1&&(m=g[1].id),m!=null){const h=l.get(i.id),x=l.get(m),S=x?o.get(x.id):null,w=x?.node.current;if(w&&S&&h&&x){const E=bg(w).some((j,D)=>d[D]!==j),C=eM(h,x),O=h9(h,x),k=E||!C?{x:0,y:0}:{x:O?s.width-S.width:0,y:O?s.height-S.height:0},A={x:S.left,y:S.top};return k.x&&k.y?A:qu(A,k)}}}};function eM(e,t){return!cp(e)||!cp(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function h9(e,t){return!cp(e)||!cp(t)||!eM(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function Gs({className:e,size:t="default",...i}){return v.jsx("div",{"data-slot":"card","data-size":t,className:Fe("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),...i})}function p9({className:e,...t}){return v.jsx("div",{"data-slot":"card-header",className:Fe("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),...t})}function g9({className:e,...t}){return v.jsx("div",{"data-slot":"card-content",className:Fe("px-(--card-spacing)",e),...t})}const tM=b.createContext(void 0);function m9(){const e=b.useContext(tM);if(e===void 0)throw new Error(gn(63));return e}const y9="data-checked",v9="data-unchecked",nM={...hc,checked(e){return e?{[y9]:""}:{[v9]:""}}},b9=b.forwardRef(function(t,i){const{checked:s,className:o,defaultChecked:l,"aria-labelledby":u,form:d,id:f,inputRef:g,name:m,nativeButton:h=!1,onCheckedChange:x,readOnly:S=!1,required:w=!1,disabled:R=!1,render:E,uncheckedValue:C,value:O,style:k,...A}=t,{clearErrors:N}=vd(),{state:j,setTouched:D,setDirty:M,validityData:_,setFilled:L,validationMode:q,disabled:X,name:B,validation:H}=ia(),{labelId:U}=Go(),z=X||R,Q=B??m,$=b.useRef(null),K=ei($,g,H.inputRef),Y=b.useRef(null),ee=bd(z,Y),G=ar(),oe=pc({id:f}),I=h?void 0:oe,[V,W]=Js({controlled:s,default:!!l,name:"Switch",state:"checked"});xd(Y,G,V,void 0,!z,m),_e(()=>{L(V)},[V,L]),cc(V,()=>{N(Q),M(V!==_.initialValue),H.change(V)});const{getButtonProps:re,buttonRef:Ee}=vi({disabled:z,native:h}),le=_b(u,U,$,!h,I,A["aria-label"]),me={id:h?oe:G,role:"switch","aria-checked":V,"aria-readonly":S||void 0,"aria-required":w||void 0,"aria-labelledby":le,onFocus(){ee(!0)},onBlur(){const ve=$.current;!ve||z||(D(!0),ee(!1),q==="onBlur"&&H.commit(ve.checked))},onClick(ve){if(S||z)return;ve.preventDefault();const Pe=$.current;Pe&&Do(Pe,ve)}},ge={...H.getValidationProps(z),checked:V,disabled:z,form:d,id:I,name:Q,required:w,style:Q?Tp:rd,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:K,onChange(ve){if(ve.nativeEvent.defaultPrevented)return;if(S){ve.preventDefault();return}const Pe=ve.currentTarget.checked,Oe=ut(Dr,ve.nativeEvent);x?.(Pe,Oe),!Oe.isCanceled&&W(Pe)},onClick(ve){ve.stopPropagation()},onFocus(){Y.current?.focus()},...O!==void 0?{value:O}:Xt},ue=b.useMemo(()=>({...j,checked:V,disabled:z,readOnly:S,required:w}),[j,V,z,S,w]),Te=kt("span",t,{state:ue,ref:[i,Y,Ee],props:[me,A,re,ve=>H.getValidationProps(z,ve)],stateAttributesMapping:nM});return v.jsxs(tM.Provider,{value:ue,children:[Te,!V&&Q&&C!==void 0&&v.jsx("input",{type:"hidden",form:d,name:Q,value:C,disabled:z}),v.jsx("input",{...ge,suppressHydrationWarning:!0})]})}),x9=b.forwardRef(function(t,i){const{render:s,className:o,style:l,...u}=t,d=m9();return kt("span",t,{state:d,ref:i,stateAttributesMapping:nM,props:u})});function S9({className:e,...t}){return v.jsx(b9,{"data-slot":"switch",className:Fe(`
|
|
70
|
-
peer relative inline-flex h-4 w-7 shrink-0 items-center rounded-full
|
|
71
|
-
border border-transparent bg-input p-0.5 transition-colors outline-none
|
|
72
|
-
focus-visible:border-ring focus-visible:ring-2
|
|
73
|
-
focus-visible:ring-ring/30 disabled:cursor-not-allowed
|
|
74
|
-
disabled:opacity-50 data-checked:bg-primary
|
|
75
|
-
`,e),...t,children:v.jsx(x9,{"data-slot":"switch-thumb",className:`
|
|
76
|
-
pointer-events-none block size-3 rounded-full bg-background shadow-sm
|
|
77
|
-
transition-transform data-checked:translate-x-3
|
|
78
|
-
`})})}function w9(e){return`library:${e}`}function rM(e,t){return`assigned:${e}:${t}`}function iM(e){return`agent:${e}`}function E9(e){return String(e).startsWith("assigned:")}function hv(e){return Qb(e)&&e.type==="library-instruction"&&typeof e.instructionId=="string"}function Wl(e){return Qb(e)&&e.type==="assigned-instruction"&&typeof e.agentId=="string"&&typeof e.instructionId=="string"}function NC(e){return Qb(e)&&e.type==="agent"&&typeof e.agentId=="string"}function Qb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const C9="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",R9='<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenAI</title><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path></svg>',T9="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",k9='<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Claude Code</title><path clip-rule="evenodd" d="M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z"></path></svg>',O9={openai:{src:C9,monochromeSvg:R9,invertInDark:!0},claudecode:{src:T9,monochromeSvg:k9,invertInDark:!1}};function sM({icon:e,monochrome:t=!1,className:i}){const s=O9[e];return v.jsx("div",{"aria-hidden":"true",className:Fe(`
|
|
79
|
-
flex size-8 shrink-0 items-center justify-center rounded-md bg-muted
|
|
80
|
-
text-foreground
|
|
81
|
-
`,t&&"text-muted-foreground",i),children:s?v.jsxs(v.Fragment,{children:[v.jsx("span",{hidden:!t,className:`
|
|
82
|
-
size-4
|
|
83
|
-
[&_svg]:size-full
|
|
84
|
-
`,dangerouslySetInnerHTML:{__html:s.monochromeSvg}}),v.jsx("img",{hidden:t,src:s.src,alt:"",draggable:!1,className:Fe("size-4",s.invertInDark&&"dark:invert")})]}):v.jsx(dT,{className:"size-4"})})}function A9({agent:e,instructionsById:t,isInstructionsLoading:i,isPending:s,isReapplying:o,onRemoveInstruction:l,onToggle:u,onReapply:d,onOpenFile:f}){const{t:g}=pt(),{isOver:m,setNodeRef:h}=QA({id:iM(e.id),data:{type:"agent",agentId:e.id},disabled:s}),x=e.enabled||e.instructionIds.length>0,S=e.enabled?g("agents.reapplyHint"):g("agents.reapplyDisabledHint"),w=g(x?e.enabled?"agents.toggleOnHint":"agents.toggleOffHint":"agents.enableRequiresInstruction");return v.jsxs(Gs,{"data-agent-id":e.id,ref:h,className:Fe("gap-0 py-0 transition-shadow",m&&"ring-2 ring-ring/40"),children:[v.jsxs("div",{className:"flex items-center gap-3 p-3",children:[v.jsx(sM,{icon:e.icon}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("div",{className:"truncate text-sm font-medium",children:e.name}),v.jsx("button",{type:"button",className:`
|
|
85
|
-
block max-w-full truncate font-mono text-[11px]
|
|
86
|
-
text-muted-foreground
|
|
87
|
-
hover:text-foreground hover:underline
|
|
88
|
-
`,"aria-label":g("agents.openFileAria",{name:e.name}),onClick:()=>{f(e.id)},children:e.instructionFile})]}),v.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[v.jsxs(Xh,{children:[v.jsx(Zh,{render:v.jsx("span",{className:"inline-flex"}),children:v.jsx(nt,{type:"button",variant:"ghost",size:"icon","aria-label":g("agents.reapplyAria",{name:e.name}),disabled:s||!e.enabled,onClick:()=>{d(e.id)},children:v.jsx(OL,{className:Fe(o&&"animate-spin")})})}),v.jsx(Jh,{children:S})]}),v.jsxs(Xh,{children:[v.jsx(Zh,{render:v.jsx("span",{className:"inline-flex"}),children:v.jsx(S9,{checked:e.enabled,disabled:s||!x,"aria-label":g("agents.toggleAria",{name:e.name}),onCheckedChange:R=>{u(e.id,R)}})}),v.jsx(Jh,{children:w})]})]})]}),v.jsx("div",{className:"border-t border-border/60 p-3",children:e.instructionIds.length===0?v.jsx("div",{className:`
|
|
89
|
-
flex min-h-20 items-center justify-center rounded-md border
|
|
90
|
-
border-dashed border-border px-4 text-center text-xs
|
|
91
|
-
text-muted-foreground
|
|
92
|
-
`,children:g("agents.emptyAssigned")}):v.jsx(n9,{items:e.instructionIds.map(R=>rM(e.id,R)),strategy:e9,children:v.jsx("ol",{className:"flex flex-col gap-1",children:e.instructionIds.map((R,E)=>{const C=t.get(R),O=C?.name??R;return v.jsx(M9,{agentId:e.id,index:E,instructionId:R,instructionName:i&&!C?g("agents.loadingInstruction"):O,isPending:s,onRemove:l},R)})})})})]})}function M9({agentId:e,index:t,instructionId:i,instructionName:s,isPending:o,onRemove:l}){const{t:u}=pt(),{attributes:d,isDragging:f,isOver:g,listeners:m,setNodeRef:h,transform:x,transition:S}=c9({id:rM(e,i),animateLayoutChanges:()=>!1,data:{type:"assigned-instruction",agentId:e,instructionId:i},disabled:o});return v.jsxs("li",{...d,...m,ref:h,"data-instruction-id":i,style:{transform:Ya.Transform.toString(x),transition:S},className:Fe(`
|
|
93
|
-
group flex items-center gap-2 rounded-md border border-transparent
|
|
94
|
-
bg-muted/40 px-2 py-1.5
|
|
95
|
-
`,g&&"border-ring bg-muted",f&&"z-10",o?"cursor-default":`
|
|
96
|
-
cursor-grab
|
|
97
|
-
active:cursor-grabbing
|
|
98
|
-
`),children:[v.jsx(tb,{"aria-hidden":"true",className:`
|
|
99
|
-
size-3.5 shrink-0 text-muted-foreground
|
|
100
|
-
group-active:cursor-grabbing
|
|
101
|
-
`}),v.jsx("span",{className:`
|
|
102
|
-
w-4 shrink-0 text-center font-mono text-[10px] text-muted-foreground
|
|
103
|
-
`,children:t+1}),v.jsx("span",{className:"min-w-0 flex-1 truncate text-xs",children:s}),v.jsx(nt,{type:"button",variant:"ghost",size:"icon","aria-label":u("agents.removeInstructionAria",{name:s}),disabled:o,onClick:()=>{l(e,i)},onKeyDown:w=>{w.stopPropagation()},onPointerDown:w=>{w.stopPropagation()},children:v.jsx(ta,{})})]})}const aM="/api/agents";class oM extends Error{constructor(t,i){super(i),this.code=t,this.name="AgentApiError"}code}function N9(e){return Td(aM,{signal:e})}function D9(e,t){return Td(wg(e,"instructions"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({instructionIds:t})})}function j9(e,t){return Td(wg(e,"enabled"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:t})})}function I9(e){return Td(wg(e,"reapply"),{method:"POST"})}function P9(e){return Td(wg(e,"open-file"),{method:"POST"})}function wg(e,t){return`${aM}/${encodeURIComponent(e)}/${t}`}async function Td(e,t){const i=await fetch(e,t);if(!i.ok){const s=await L9(i);throw new oM(s.code,s.message)}return i.json()}async function L9(e){try{const t=await e.json();return{code:t.error?.code??"AGENT_REQUEST_FAILED",message:t.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"AGENT_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}const Fr=["agents"],vh=["agents","update"];function z9(){const{t:e}=pt(),t=jr(),i=na({queryKey:Fr,queryFn:({signal:h})=>N9(h),retry:!1});function s(h){t.setQueryData(Fr,x=>x?.map(S=>S.id===h.id?h:S))}const o=er({mutationKey:vh,mutationFn:({agentId:h,instructionIds:x})=>D9(h,x),onMutate:async({previous:h})=>(await t.cancelQueries({queryKey:Fr}),{previous:h}),onError:(h,x,S)=>{S?.previous&&t.setQueryData(Fr,S.previous),Ft.error(e("agents.updateError"))},onSuccess:s,onSettled:()=>t.invalidateQueries({queryKey:Fr})}),l=er({mutationKey:vh,mutationFn:({agentId:h,enabled:x})=>j9(h,x),onMutate:async({agentId:h,enabled:x})=>{await t.cancelQueries({queryKey:Fr});const S=t.getQueryData(Fr);return t.setQueryData(Fr,w=>w?.map(R=>R.id===h?{...R,enabled:x}:R)),{previous:S}},onError:(h,x,S)=>{S?.previous&&t.setQueryData(Fr,S.previous),Ft.error(e("agents.enableError"))},onSuccess:h=>{s(h),Ft.success(e(h.enabled?"agents.applied":"agents.removed"))},onSettled:()=>t.invalidateQueries({queryKey:Fr})}),u=er({mutationKey:vh,mutationFn:h=>I9(h),onSuccess:h=>{s(h),Ft.success(e("agents.reapplied"))},onError:()=>{Ft.error(e("agents.reapplyError"))},onSettled:()=>t.invalidateQueries({queryKey:Fr})}),d=er({mutationKey:vh,mutationFn:h=>P9(h),onError:h=>{Ft.error(e(h instanceof oM&&h.code==="AGENT_FILE_NOT_FOUND"?"agents.fileMissing":"agents.openFileError"))}}),f=[o,l,u,d],g=new Set;for(const h of f){if(!h.isPending)continue;const x=_9(h.variables);x&&g.add(x)}const m=new Set(u.isPending&&typeof u.variables=="string"?[u.variables]:[]);return{agents:i.data??[],isLoading:i.isPending,isError:i.isError&&i.data===void 0,retry:i.refetch,pendingAgentIds:g,reapplyingAgentIds:m,updateInstructions:(h,x)=>{const S=t.getQueryData(Fr);t.setQueryData(Fr,w=>w?.map(R=>R.id===h?{...R,instructionIds:x,enabled:x.length>0&&R.enabled}:R)),o.mutate({agentId:h,instructionIds:x,previous:S})},setEnabled:(h,x)=>{l.mutate({agentId:h,enabled:x})},reapply:h=>{u.mutate(h)},openFile:h=>{d.mutate(h)}}}function _9(e){if(typeof e=="string")return e;if(e&&typeof e=="object"&&"agentId"in e){const t=e.agentId;return typeof t=="string"?t:void 0}}function Gu({className:e,description:t,icon:i,title:s}){let o=null;return t!=null&&(o=v.jsx("p",{className:"max-w-64 text-xs/relaxed text-muted-foreground",children:t})),v.jsxs("div",{"data-slot":"empty",className:Fe(`
|
|
104
|
-
flex w-full flex-1 flex-col items-center justify-center gap-2 px-4
|
|
105
|
-
py-10 text-center
|
|
106
|
-
`,e),children:[i&&v.jsx("div",{className:`
|
|
107
|
-
flex size-8 items-center justify-center rounded-md bg-muted
|
|
108
|
-
text-muted-foreground
|
|
109
|
-
`,children:v.jsx(i,{"aria-hidden":"true",className:"size-4"})}),v.jsx("div",{className:"text-sm font-medium",children:s}),o]})}function U9(e){const[t,i]=b.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),s=b.useRef(null),o=b.useRef(null),l=b.useRef(null),u=b.useRef(null),d=b.useRef(!0),f=b.useRef(null),g=ac(),m=b.useMemo(()=>({anchor:t,setAnchor:i,actionsRef:l,backdropRef:s,internalBackdropRef:o,positionerRef:u,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:g}),[t,g]);return v.jsx(zO.Provider,{value:m,children:v.jsx(ug.Provider,{value:void 0,children:v.jsx(eA,{...e})})})}const DC=500,H9=b.forwardRef(function(t,i){const{render:s,className:o,style:l,...u}=t,{setAnchor:d,actionsRef:f,internalBackdropRef:g,backdropRef:m,positionerRef:h,allowMouseUpTriggerRef:x,initialCursorPointRef:S,rootId:w}=dg(!1),{store:R}=ra(!1),E=R.useState("open"),C=R.useState("disabled"),O=b.useRef(null),k=b.useRef(null),A=Un(),N=Un(),j=b.useRef(!1),D=b.useRef(null);function M(U,z,Q){const $=Q.type.startsWith("touch");S.current={x:U,y:z},d({getBoundingClientRect(){return DOMRect.fromRect({width:$?10:0,height:$?10:0,x:U,y:z})}}),j.current=!1,f.current?.setOpen(!0,ut(Qi,Q)),N.start(DC,()=>{j.current=!0})}function _(U){if(C)return;x.current=!0,Yi(U),M(U.clientX,U.clientY,U.nativeEvent);const z=Qt(O.current);D.current?.abort();const Q=new AbortController;D.current=Q,z.addEventListener("mouseup",$=>{if(x.current=!1,!j.current)return;N.clear(),j.current=!1;const K=nr($);st(h.current,K)||w&&K&&Lb(K)===w||f.current?.setOpen(!1,ut(Mv,$))},{once:!0,signal:Q.signal})}function L(){A.clear(),k.current=null}function q(U){if(C){L();return}if(x.current=!1,U.touches.length!==1){L();return}U.stopPropagation();const z=U.touches[0],Q={x:z.clientX,y:z.clientY};k.current=Q,A.start(DC,()=>{M(Q.x,Q.y,U.nativeEvent)})}function X(U){if(U.touches.length!==1){L();return}if(A.isStarted()&&k.current){const z=U.touches[0],Q=10,$=Math.abs(z.clientX-k.current.x),K=Math.abs(z.clientY-k.current.y);($>Q||K>Q)&&L()}}return b.useEffect(()=>()=>{D.current?.abort()},[]),b.useEffect(()=>{function U(Q){if(C)return;const K=nr(Q);(st(O.current,K)||st(g.current,K)||st(m.current,K))&&Q.preventDefault()}const z=Qt(O.current);return Lt(z,"contextmenu",U)},[m,C,g]),kt("div",t,{state:{open:E},ref:[O,i],props:[{onContextMenu:_,onTouchStart:q,onTouchMove:X,onTouchEnd:L,onTouchCancel:L,style:{WebkitTouchCallout:"none"}},u],stateAttributesMapping:_u})}),F9=QO;function Eg({...e}){return v.jsx(U9,{"data-slot":"context-menu",...e})}function Cg({className:e,...t}){return v.jsx(H9,{"data-slot":"context-menu-trigger",className:Fe("select-none",e),...t})}function Rg({className:e,align:t="start",alignOffset:i=4,side:s="right",sideOffset:o=0,...l}){return v.jsx(GO,{children:v.jsx(F9,{className:"isolate z-50 outline-none",align:t,alignOffset:i,side:s,sideOffset:o,children:v.jsx(qO,{"data-slot":"context-menu-content",className:Fe("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),...l})})})}function Tg({className:e,inset:t,variant:i="default",...s}){return v.jsx(KO,{"data-slot":"context-menu-item","data-inset":t,"data-variant":i,className:Fe("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),...s})}function B9({instructions:e,isLoading:t,isError:i,onRetry:s,onEdit:o,onDelete:l,onPreload:u}){const{t:d}=pt();return t?v.jsx(Gs,{className:"gap-0 py-0",children:v.jsx("div",{className:"divide-y",children:[0,1,2].map(f=>v.jsxs("div",{className:"flex items-center gap-2 p-3",children:[v.jsx(fr,{className:"size-3.5 rounded-sm"}),v.jsx(fr,{className:"h-4 w-2/3"})]},f))})}):i?v.jsxs(Gs,{className:"items-start gap-3 p-4",children:[v.jsx("p",{className:"text-xs text-muted-foreground",children:d("instructions.loadError")}),v.jsxs(nt,{type:"button",variant:"outline",onClick:s,children:[v.jsx(tk,{}),v.jsx("span",{children:d("common.retry")})]})]}):e.length===0?v.jsx(Gs,{className:"gap-0 py-0",children:v.jsx(Gu,{icon:eb,title:d("instructions.emptyTitle"),description:d("instructions.emptyDescription")})}):v.jsx(Gs,{className:"gap-0 py-0",children:v.jsx("ul",{"aria-label":d("instructions.listAria"),className:"divide-y",children:e.map(f=>v.jsx(V9,{instruction:f,onRequestDelete:()=>l(f),onEdit:()=>{o(f)},onPreload:u},f.id))})})}function V9({instruction:e,onEdit:t,onPreload:i,onRequestDelete:s}){const{t:o}=pt(),{attributes:l,isDragging:u,listeners:d,setNodeRef:f}=GA({id:w9(e.id),data:{type:"library-instruction",instructionId:e.id}});return v.jsxs(Eg,{children:[v.jsxs(Cg,{ref:f,render:v.jsx("li",{...d,"data-instruction-id":e.id,className:Fe(`
|
|
110
|
-
group flex cursor-grab items-center gap-2 py-2.5 pr-1 pl-3
|
|
111
|
-
hover:bg-muted/40
|
|
112
|
-
active:cursor-grabbing
|
|
113
|
-
`,u&&"opacity-40")}),children:[v.jsx(tb,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground"}),v.jsx("button",{...l,type:"button",className:`
|
|
114
|
-
flex min-w-0 flex-1 cursor-grab items-center gap-2 text-left text-xs
|
|
115
|
-
outline-none
|
|
116
|
-
focus-visible:underline focus-visible:underline-offset-3
|
|
117
|
-
active:cursor-grabbing
|
|
118
|
-
`,onClick:t,onFocus:i,onPointerEnter:i,children:v.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.name})}),v.jsxs(Ko,{children:[v.jsx(qo,{render:v.jsx(nt,{type:"button",variant:"ghost",size:"icon","aria-label":o("instructions.actionsAria",{name:e.name}),className:`
|
|
119
|
-
-my-1.5 shrink-0 text-muted-foreground opacity-0
|
|
120
|
-
transition-opacity
|
|
121
|
-
group-hover:opacity-100
|
|
122
|
-
focus-visible:opacity-100
|
|
123
|
-
data-popup-open:opacity-100
|
|
124
|
-
[@media(hover:none)]:opacity-100
|
|
125
|
-
`,onKeyDown:g=>{g.stopPropagation()},onMouseDown:g=>{g.stopPropagation()},onPointerDown:g=>{g.stopPropagation()},onTouchStart:g=>{g.stopPropagation()}}),children:v.jsx(Wv,{})}),v.jsx(Yo,{align:"end",className:"w-40",children:v.jsx(jC,{Item:fc,onDelete:s,onEdit:t})})]})]}),v.jsx(Rg,{children:v.jsx(jC,{Item:Tg,onDelete:s,onEdit:t})})]})}function jC({Item:e,onEdit:t,onDelete:i}){const{t:s}=pt();return v.jsxs(v.Fragment,{children:[v.jsxs(e,{onClick:t,children:[v.jsx(ZT,{}),v.jsx("span",{children:s("instructions.edit")})]}),v.jsxs(e,{variant:"destructive",onClick:i,children:[v.jsx(rb,{}),v.jsx("span",{children:s("instructions.delete")})]})]})}const K9=["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"],q9=["America/Los_Angeles","America/New_York","Asia/Shanghai","Asia/Taipei","Asia/Tokyo","UTC"],Y9=1,G9="settings.changed",$9=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function Q9(e,t){return $9.compare(e,t)}const X9=64,Z9=1024,J9=/^[\p{L}\p{N}]+(?:-[\p{L}\p{N}]+)*$/u;function lM(e){return e.trim().normalize("NFKC")}function W9(e){const t=lM(e);return[...t].length<=X9&&t===t.toLowerCase()&&J9.test(t)}function eB(e){return e.length>0&&e.length<=1024&&e.split("/").every(t=>t.length>0&&t.length<=255&&t!=="."&&t!==".."&&!/[\\<>:"|?*]/u.test(t)&&!new RegExp("\\p{Cc}","u").test(t)&&!/[. ]$/u.test(t)&&!/^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/iu.test(t))}function cM({className:e,...t}){return v.jsx("label",{"data-slot":"label",className:Fe("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),...t})}function Ws({children:e,className:t,...i}){return v.jsxs(cM,{className:Fe("gap-1",t),...i,children:[e,v.jsx("span",{"aria-hidden":"true",className:"text-destructive",children:"*"})]})}function Cs({...e}){return v.jsx(mA,{"data-slot":"dialog",...e})}function tB({...e}){return v.jsx(gA,{"data-slot":"dialog-portal",...e})}function kd({...e}){return v.jsx(pg,{"data-slot":"dialog-close",...e})}function nB({className:e,...t}){return v.jsx(dA,{"data-slot":"dialog-overlay",className:Fe("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),...t})}function Rs({className:e,children:t,showCloseButton:i=!0,...s}){return v.jsxs(tB,{children:[v.jsx(nB,{}),v.jsxs(pA,{"data-slot":"dialog-content",className:Fe("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),...s,children:[t,i&&v.jsxs(pg,{"data-slot":"dialog-close",render:v.jsx(nt,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[v.jsx(ta,{}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Ji({className:e,...t}){return v.jsx("div",{"data-slot":"dialog-header",className:Fe("flex flex-col gap-1",e),...t})}function bs({className:e,showCloseButton:t=!1,children:i,...s}){return v.jsxs("div",{"data-slot":"dialog-footer",className:Fe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...s,children:[i,t&&v.jsx(pg,{render:v.jsx(nt,{variant:"outline"}),children:"Close"})]})}function Wi({className:e,...t}){return v.jsx(yA,{"data-slot":"dialog-title",className:Fe("font-heading text-sm font-medium",e),...t})}function xs({className:e,...t}){return v.jsx(fA,{"data-slot":"dialog-description",className:Fe("text-xs/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}const Xb="/api/instructions";class uM extends Error{constructor(t,i){super(i),this.code=t,this.name="InstructionApiError"}code}function rB(e){return Zb(Xb,{signal:e})}function iB(e){return Zb(Xb,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function sB(e,t){return Zb(dM(e),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}async function aB(e){const t=await fetch(dM(e),{method:"DELETE"});if(t.ok)return;const i=await fM(t);throw new uM(i.code,i.message)}async function Zb(e,t){const i=await fetch(e,t);if(!i.ok){const s=await fM(i);throw new uM(s.code,s.message)}return i.json()}function dM(e){return`${Xb}/${encodeURIComponent(e)}`}async function fM(e){try{const t=await e.json();return{code:t.error?.code??"INSTRUCTION_REQUEST_FAILED",message:t.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"INSTRUCTION_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}const $u=["instructions"];function oB(){const e=na({queryKey:$u,queryFn:({signal:t})=>rB(t),retry:!1});return{instructions:e.data??[],isLoading:e.isPending,isError:e.isError&&e.data===void 0,retry:e.refetch}}const lB="modulepreload",cB=function(e){return"/"+e},IC={},uB=function(t,i,s){let o=Promise.resolve();if(i&&i.length>0){let f=function(g){return Promise.all(g.map(m=>Promise.resolve(m).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");o=f(i.map(g=>{if(g=cB(g),g in IC)return;IC[g]=!0;const m=g.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${h}`))return;const x=document.createElement("link");if(x.rel=m?"stylesheet":lB,m||(x.as="script"),x.crossOrigin="",x.href=g,d&&x.setAttribute("nonce",d),document.head.appendChild(x),m)return new Promise((S,w)=>{x.addEventListener("load",S),x.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function l(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})},hM=()=>uB(()=>import("./code-editor-BLV7kBvd.js").then(e=>e.j2),__vite__mapDeps([0,1]));function Ty(){hM()}const dB=b.lazy(async()=>({default:(await hM()).CodeEditor}));function pM(e){const{t}=pt();return v.jsx(b.Suspense,{fallback:v.jsx("div",{style:{height:e.height??"16rem"},className:`
|
|
126
|
-
flex items-center justify-center text-xs text-muted-foreground
|
|
127
|
-
`,children:t("editor.loading")}),children:v.jsx(dB,{...e})})}const fB="16rem";function PC({instruction:e,onClose:t}){const{t:i}=pt(),s=jr(),o=b.useId(),l=b.useId(),u=e!==void 0,[d,f]=b.useState(e?.name??""),[g,m]=b.useState(e?.content??""),h=er({mutationFn:k=>e?sB(e.id,k):iB(k),onSuccess:k=>{s.setQueryData($u,A=>[...(A??[]).filter(N=>N.id!==k.id),k].toSorted((N,j)=>Q9(N.name,j.name))),s.invalidateQueries({queryKey:$u}),Ft.success(i(u?"instructions.updated":"instructions.created")),t()},onError:()=>{Ft.error(i(u?"instructions.updateError":"instructions.error"))}}),x=h.isPending,S=!!(d.trim()&&g.trim())&&!x,w=u?"instructions.editTitle":"instructions.createTitle",R=u?"instructions.updating":"instructions.creating",E=u?"instructions.updateSave":"instructions.save",C=u?nb:lc;function O(){x||t()}return v.jsx(Cs,{open:!0,onOpenChange:k=>{k||O()},children:v.jsxs(Rs,{showCloseButton:!1,className:`
|
|
128
|
-
grid max-h-[calc(100vh-2rem)] grid-rows-[auto_minmax(0,1fr)_auto]
|
|
129
|
-
overflow-hidden
|
|
130
|
-
sm:max-w-3xl
|
|
131
|
-
`,children:[v.jsxs("form",{className:"contents","aria-busy":x,onSubmit:k=>{k.preventDefault(),S&&h.mutate({name:d.trim(),content:g})},children:[v.jsx(Ji,{className:"pr-8",children:v.jsx(Wi,{children:i(w)})}),v.jsxs("div",{className:"flex min-h-0 flex-col gap-3 overflow-y-auto pr-1",children:[v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Ws,{htmlFor:o,children:i("instructions.name")}),v.jsx(Sd,{id:o,autoFocus:!0,required:!0,maxLength:200,value:d,disabled:x,placeholder:i("instructions.namePlaceholder"),onChange:k=>{f(k.target.value)}})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Ws,{id:l,children:i("instructions.content")}),v.jsx("div",{role:"group","aria-labelledby":l,"aria-required":"true",className:`
|
|
132
|
-
overflow-hidden rounded-md border border-input bg-input/20
|
|
133
|
-
focus-within:border-ring focus-within:ring-2
|
|
134
|
-
focus-within:ring-ring/30
|
|
135
|
-
`,children:v.jsx(pM,{height:fB,value:g,ariaLabel:i("instructions.content"),placeholder:i("instructions.contentPlaceholder"),readOnly:x,onChange:m})})]})]}),v.jsxs(bs,{children:[v.jsx(nt,{type:"button",variant:"ghost",disabled:x,onClick:O,children:i("common.cancel")}),v.jsxs(nt,{type:"submit",disabled:!S,children:[x?v.jsx(Vr,{className:"animate-spin"}):v.jsx(C,{}),v.jsx("span",{children:i(x?R:E)})]})]})]}),v.jsxs(kd,{disabled:x,render:v.jsx(nt,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[v.jsx(ta,{}),v.jsx("span",{className:"sr-only",children:i("a11y.close")})]})]})})}function hB({instruction:e,onClose:t}){const{t:i}=pt(),s=jr(),o=er({mutationFn:()=>aB(e.id),onSuccess:()=>{s.setQueryData($u,u=>u?.filter(({id:d})=>d!==e.id)),s.setQueryData(Fr,u=>u?.map(d=>{const f=d.instructionIds.filter(g=>g!==e.id);return{...d,instructionIds:f,enabled:f.length>0&&d.enabled}})),s.invalidateQueries({queryKey:$u}),s.invalidateQueries({queryKey:Fr}),Ft.success(i("instructions.deleted")),t()},onError:()=>Ft.error(i("instructions.deleteError"))}),l=()=>{o.isPending||t()};return v.jsx(Cs,{open:!0,onOpenChange:u=>{u||l()},children:v.jsxs(Rs,{showCloseButton:!1,children:[v.jsxs(Ji,{children:[v.jsx(Wi,{children:i("instructions.deleteConfirmTitle")}),v.jsx(xs,{children:i("instructions.deleteConfirmDescription",{name:e.name})})]}),v.jsxs(bs,{children:[v.jsx(nt,{type:"button",variant:"ghost",disabled:o.isPending,onClick:l,children:i("common.cancel")}),v.jsxs(nt,{type:"button",variant:"destructive",disabled:o.isPending,onClick:()=>o.mutate(),children:[o.isPending&&v.jsx(Vr,{className:"animate-spin"}),v.jsx("span",{children:i("instructions.delete")})]})]})]})})}const pB=e=>{const t=e.active.data.current;if(Wl(t))return gB(e,t.agentId);const i=e.pointerCoordinates?VF(e):_F(e),s=i.filter(({id:o})=>E9(o));return s.length>0?s:i};function gB(e,t){const i=e.collisionRect.left+e.collisionRect.width/2,s=e.collisionRect.top+e.collisionRect.height/2,o=e.droppableRects.get(iM(t));if(o&&(i<o.left||i>o.left+o.width||s<o.top||s>o.top+o.height))return[];let l;for(const u of e.droppableContainers){const d=u.data.current;if(!Wl(d)||d.agentId!==t)continue;const f=e.droppableRects.get(u.id);if(!f)continue;const g=(f.left+f.width/2-i)**2+(f.top+f.height/2-s)**2;(!l||g<l.distance)&&(l={id:u.id,distance:g})}return l?[{id:l.id}]:[]}function mB(){const{t:e}=pt(),[t,i]=b.useState(null),[s,o]=b.useState(!1),[l,u]=b.useState(null),[d,f]=b.useState(null),g=oB(),m=z9(),h=PF(wy(HA,{activationConstraint:{distance:4}}),wy(FA,{activationConstraint:{delay:200,tolerance:8}}),wy(qb,{coordinateGetter:f9})),x=b.useMemo(()=>new Map(g.instructions.map(N=>[N.id,N])),[g.instructions]),S=d?g.instructions.find(({id:N})=>N===d):void 0,w=t?.data.current,R=yB(w),E=R?x.get(R)?.name??R:"",C=t?.rect.current.initial?.width;function O(N,j,D){const M=m.agents.find(({id:q})=>q===N);if(!M||m.pendingAgentIds.has(N))return;if(M.instructionIds.includes(j)){Ft.error(e("agents.duplicateError"));return}const _=[...M.instructionIds],L=D?_.indexOf(D):-1;_.splice(L<0?_.length:L,0,j),m.updateInstructions(N,_)}function k(N,j){const D=m.agents.find(({id:M})=>M===N);!D||m.pendingAgentIds.has(N)||m.updateInstructions(N,D.instructionIds.filter(M=>M!==j))}function A({active:N,over:j}){if(i(null),!j)return;const D=N.data.current,M=j.data.current;if(hv(D)){if(NC(M)){O(M.agentId,D.instructionId);return}Wl(M)&&O(M.agentId,D.instructionId,M.instructionId);return}if(!Wl(D))return;const _=m.agents.find(({id:H})=>H===D.agentId);if(!_||m.pendingAgentIds.has(_.id))return;const L=_.instructionIds,q=L.indexOf(D.instructionId),X=Wl(M)&&M.agentId===D.agentId?L.indexOf(M.instructionId):NC(M)&&M.agentId===D.agentId?L.length-1:-1;if(q===X||q===-1||X===-1)return;const B=$b([...L],q,X);B.length===L.length&&B.every((H,U)=>H===L[U])||m.updateInstructions(_.id,B)}return v.jsxs(j7,{sensors:h,collisionDetection:pB,onDragStart:({active:N})=>{i(N)},onDragCancel:()=>{i(null)},onDragEnd:A,children:[v.jsxs("div",{className:`
|
|
136
|
-
grid min-h-0 flex-1 gap-4 overflow-hidden p-4
|
|
137
|
-
max-md:overflow-y-auto
|
|
138
|
-
md:grid-cols-2
|
|
139
|
-
`,children:[v.jsx(CA,{children:v.jsxs(nt,{type:"button",onFocus:Ty,onPointerEnter:Ty,onClick:()=>{o(!0)},children:[v.jsx(lc,{}),v.jsx("span",{children:e("instructions.create")})]})}),v.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[v.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[v.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("nav.instructions")}),v.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("instructions.dragHint")})]}),v.jsx("div",{className:`
|
|
140
|
-
min-h-0 flex-1 overflow-y-auto p-1
|
|
141
|
-
max-md:max-h-64
|
|
142
|
-
`,children:v.jsx(B9,{instructions:g.instructions,isLoading:g.isLoading,isError:g.isError,onRetry:()=>{g.retry()},onEdit:N=>{f(N.id)},onDelete:N=>{u(N)},onPreload:Ty})})]}),v.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[v.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[v.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("agents.title")}),v.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("agents.orderHint")})]}),v.jsxs("div",{className:`
|
|
143
|
-
flex min-h-0 flex-1 flex-col gap-3 p-1
|
|
144
|
-
max-md:pb-2
|
|
145
|
-
md:overflow-y-auto
|
|
146
|
-
`,children:[m.isLoading&&v.jsx(vB,{}),!m.isLoading&&m.isError&&v.jsxs(Gs,{className:"items-start gap-3 p-4",children:[v.jsx("p",{className:"text-xs text-muted-foreground",children:e("agents.loadError")}),v.jsxs(nt,{type:"button",variant:"outline",onClick:()=>{m.retry()},children:[v.jsx(tk,{}),v.jsx("span",{children:e("common.retry")})]})]}),!m.isLoading&&!m.isError&&m.agents.map(N=>v.jsx(A9,{agent:N,instructionsById:x,isInstructionsLoading:g.isLoading,isPending:m.pendingAgentIds.has(N.id),isReapplying:m.reapplyingAgentIds.has(N.id),onRemoveInstruction:k,onToggle:(j,D)=>{m.setEnabled(j,D)},onReapply:j=>{m.reapply(j)},onOpenFile:j=>{m.openFile(j)}},N.id))]})]}),l&&v.jsx(hB,{instruction:l,onClose:()=>u(null)}),s&&v.jsx(PC,{onClose:()=>{o(!1)}}),S&&v.jsx(PC,{instruction:S,onClose:()=>{f(null)}})]}),hv(w)&&v.jsx(X7,{dropAnimation:null,children:E&&v.jsxs("div",{style:{width:C},className:"flex items-center gap-2 bg-card px-3 py-2.5 text-xs",children:[v.jsx(tb,{className:"size-3.5 text-muted-foreground"}),v.jsx("span",{className:"truncate",children:E})]})})]})}function yB(e){if(hv(e)||Wl(e))return e.instructionId}function vB(){return v.jsx(v.Fragment,{children:[0,1].map(e=>v.jsxs(Gs,{className:"gap-0 py-0",children:[v.jsxs("div",{className:"flex items-center gap-3 p-3",children:[v.jsx(fr,{className:"size-8 rounded-md"}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx(fr,{className:"h-4 w-24"}),v.jsx(fr,{className:"mt-2 h-3 w-40"})]}),v.jsx(fr,{className:"h-4 w-7 rounded-full"})]}),v.jsx("div",{className:"border-t border-border/60 p-3",children:v.jsx(fr,{className:"h-20 w-full"})})]},e))})}class Ga extends Error{constructor(t,i){super(i),this.code=t,this.name="SkillApiError"}code}async function Ts(e,t){const i=await fetch(e,t);if(!i.ok){const s=await i.json();throw new Ga(s.error?.code??"SKILL_REQUEST_FAILED",s.error?.message??`Request failed with status ${i.status}`)}return i.status===204?void 0:i.json()}function bB(e){return Ts("/api/skills",{signal:e})}function gM(e,t){return Ts(`/api/skills/${encodeURIComponent(e)}`,{signal:t})}function xB(e){return Ts("/api/skills",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function SB(e){return Ts("/api/skills/import/local",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function wB(e){return Ts("/api/skills/import/url",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function EB(e,t){return Ts(`/api/skills/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}function CB(e){return Ts(`/api/skills/${encodeURIComponent(e)}`,{method:"DELETE"})}function mM(e){return Ts("/api/skills/agents/assignments",{signal:e})}function yM(e,t,i){return Ts(`/api/skills/${encodeURIComponent(e)}/agents/${encodeURIComponent(t)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({assigned:i})})}const Od=["skills"],jo=e=>["skills",e],Iu=["skills","agents","assignments"];function RB(e,t){return Ts(`/api/skills/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({files:t})})}const vM=["skill-batch-assignment"];function TB({className:e,...t}){return v.jsx("textarea",{"data-slot":"textarea",className:Fe("flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground 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 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...t})}function pv({skill:e,onClose:t,onSaved:i}){const{t:s}=pt(),o=Vo(),l=jr(),u=b.useId(),d=b.useId(),f=e!==void 0,[g,m]=b.useState(e?.name??""),[h,x]=b.useState(e?.description??""),S=er({mutationFn:C=>e?EB(e.name,C):xB(C),onSuccess:C=>{const O=e?l.getQueryData(jo(e.name)):void 0;e&&e.name!==C.name&&l.removeQueries({queryKey:jo(e.name),exact:!0}),O?.files&&l.setQueryData(jo(C.name),{...O,...C}),l.invalidateQueries({queryKey:Od}),Ft.success(s(f?"skills.updated":"skills.created")),t(),i?.(C),f||o(`/library/skills/${encodeURIComponent(C.name)}`)},onError:C=>{C instanceof Ga&&C.code==="SKILL_LINK_CONFLICT"?Ft.error(s("skills.linkConflict")):C instanceof Ga&&C.code==="SKILL_NAME_CONFLICT"?Ft.error(s("skills.nameConflict")):Ft.error(s(f?"skills.updateError":"skills.createError"))}}),w=S.isPending,R=W9(g)&&!!h.trim()&&!w;function E(){w||t()}return v.jsx(Cs,{open:!0,onOpenChange:C=>{C||E()},children:v.jsxs(Rs,{showCloseButton:!1,className:`
|
|
147
|
-
max-h-[calc(100vh-2rem)] overflow-y-auto
|
|
148
|
-
sm:max-w-120
|
|
149
|
-
`,children:[v.jsxs("form",{className:"flex flex-col gap-4","aria-busy":w,onSubmit:C=>{C.preventDefault(),R&&S.mutate({name:lM(g),description:h.trim()})},children:[v.jsxs(Ji,{className:"pr-8",children:[v.jsx(Wi,{children:s(f?"skills.editTitle":"skills.createManually")}),v.jsx(xs,{children:s(f?"skills.editDescription":"skills.createManuallyDescription")})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Ws,{htmlFor:u,children:s("skills.name")}),v.jsx(Sd,{id:u,autoFocus:!0,required:!0,"aria-describedby":`${u}-hint`,placeholder:s("skills.namePlaceholder"),value:g,disabled:w,onChange:C=>{m(C.target.value)}}),v.jsx("p",{id:`${u}-hint`,className:"text-xs text-muted-foreground",children:s("skills.nameHint")})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Ws,{htmlFor:d,children:s("skills.description")}),v.jsx(TB,{id:d,required:!0,rows:3,maxLength:Z9,placeholder:s("skills.descriptionPlaceholder"),value:h,disabled:w,onChange:C=>{x(C.target.value)}})]}),v.jsxs(bs,{children:[v.jsx(nt,{type:"button",variant:"ghost",disabled:w,onClick:E,children:s("common.cancel")}),v.jsxs(nt,{type:"submit",disabled:!R,children:[w?v.jsx(Vr,{className:"animate-spin"}):f?v.jsx(nb,{}):v.jsx(lc,{}),v.jsx("span",{children:s(w?f?"skills.updating":"skills.creating":f?"skills.saveChanges":"skills.create")})]})]})]}),v.jsxs(kd,{disabled:w,render:v.jsx(nt,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[v.jsx(ta,{}),v.jsx("span",{className:"sr-only",children:s("a11y.close")})]})]})})}class gv extends Error{constructor(t,i){super(i),this.code=t}code}async function kB(e){const t=await fetch("/api/file-picker",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const i=await t.json();throw new gv(i.error?.code??"FILE_PICKER_FAILED",i.error?.message??"Unable to open file picker")}return(await t.json()).path}function OB({isPending:e,onClose:t,onImport:i}){const{t:s}=pt(),o=b.useId(),[l,u]=b.useState("");let d=!1;try{const g=new URL(l.trim());d=["http:","https:"].includes(g.protocol)&&!g.username&&!g.password}catch{}function f(){e||t()}return v.jsx(Cs,{open:!0,onOpenChange:g=>{g||f()},children:v.jsxs(Rs,{showCloseButton:!1,className:`
|
|
150
|
-
max-h-[calc(100vh-2rem)] overflow-y-auto
|
|
151
|
-
sm:max-w-120
|
|
152
|
-
`,children:[v.jsxs("form",{className:"flex flex-col gap-4","aria-busy":e,onSubmit:g=>{g.preventDefault(),d&&!e&&i(l.trim())},children:[v.jsxs(Ji,{className:"pr-8",children:[v.jsx(Wi,{children:s("skills.importUrl")}),v.jsx(xs,{children:s("skills.importUrlDescription")})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Ws,{htmlFor:o,children:s("skills.url")}),v.jsx(Sd,{id:o,autoFocus:!0,required:!0,type:"url",placeholder:s("skills.importUrlHint"),autoComplete:"off",spellCheck:!1,value:l,disabled:e,onChange:g=>u(g.target.value)})]}),v.jsxs(bs,{children:[v.jsx(nt,{type:"button",variant:"ghost",disabled:e,onClick:f,children:s("common.cancel")}),v.jsxs(nt,{type:"submit",disabled:!d||e,children:[e?v.jsx(Vr,{className:"animate-spin"}):v.jsx(Zp,{}),v.jsx("span",{children:s(e?"skills.importing":"skills.importSubmit")})]})]})]}),v.jsxs(kd,{disabled:e,render:v.jsx(nt,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[v.jsx(ta,{}),v.jsx("span",{className:"sr-only",children:s("a11y.close")})]})]})})}const AB=[{titleKey:"skills.createManually",descriptionKey:"skills.createManuallyDescription",icon:lc},{titleKey:"skills.importLocal",descriptionKey:"skills.importLocalDescription",icon:IT},{titleKey:"skills.importUrl",descriptionKey:"skills.importUrlDescription",icon:Zp}],LC={SKILL_IMPORT_INVALID_URL:"skills.importInvalidUrl",SKILL_IMPORT_UNSUPPORTED_URL_FILE:"skills.importUnsupportedUrlFile",SKILL_IMPORT_DOWNLOAD_FAILED:"skills.importDownloadFailed",SKILL_IMPORT_DOWNLOAD_TIMEOUT:"skills.importDownloadTimeout",SKILL_NAME_CONFLICT:"skills.importNameConflict",SKILL_IMPORT_TOO_LARGE:"skills.importTooLarge",SKILL_IMPORT_READ_FAILED:"skills.importReadError",SKILL_IMPORT_INVALID_SOURCE:"skills.importInvalidSource",SKILL_IMPORT_SYMLINK_SOURCE:"skills.importSymlinkSource",SKILL_IMPORT_MISSING_SKILL_MD:"skills.importMissingSkillMd",SKILL_IMPORT_INVALID_METADATA:"skills.importInvalidMetadata",SKILL_IMPORT_INVALID_PATH:"skills.importInvalidPath",SKILL_IMPORT_DUPLICATE_PATH:"skills.importDuplicatePath",SKILL_IMPORT_INVALID_ENCODING:"skills.importInvalidEncoding",SKILL_IMPORT_UNSUPPORTED_ENTRIES:"skills.importUnsupportedEntries",SKILL_IMPORT_TOO_MANY_ENTRIES:"skills.importTooManyEntries",SKILL_IMPORT_SKILL_MD_TOO_LARGE:"skills.importSkillMdTooLarge",SKILL_IMPORT_INVALID_ARCHIVE:"skills.importInvalidArchive",SKILL_IMPORT_NO_SKILLS:"skills.importNoSkills",INVALID_SKILL_INPUT:"skills.importInvalid"};function MB({onCreateManually:e}){const{t}=pt(),i=jr(),s=Vo(),[o,l]=b.useState(!1),u=er({mutationFn:m=>"url"in m?wB(m):SB(m),onSuccess:m=>{l(!1),i.invalidateQueries({queryKey:Od});const h=t("skills.importSummary",{imported:m.imported.length,skipped:m.skipped.length});m.skipped.length>0?Ft.warning(h,{description:v.jsx("ul",{className:"max-h-40 overflow-y-auto",children:m.skipped.map(x=>v.jsxs("li",{className:"wrap-break-word",children:[x.source,":",t(x.code==="SKILL_NAME_CONFLICT"?"skills.importSkippedConflict":LC[x.code]??"skills.importSkippedInvalid")]},x.source))})}):Ft.success(h),m.imported.length===1&&m.skipped.length===0&&s(`/library/skills/${encodeURIComponent(m.imported[0].name)}`)},onError:m=>{const h=m instanceof Ga?LC[m.code]:void 0;Ft.error(t(h??"skills.importError"))}}),d=er({mutationFn:()=>kB({kind:"file-or-directory",title:t("skills.importLocal"),extensions:["skill","zip"]}),onSuccess:m=>{m!==null&&u.mutate({path:m})},onError:m=>{let h="filePicker.error";m instanceof gv&&m.code==="FILE_PICKER_UNAVAILABLE"?h="filePicker.unavailable":m instanceof gv&&m.code==="FILE_PICKER_BUSY"&&(h="filePicker.busy"),Ft.error(t(h))}}),f=d.isPending||u.isPending;let g="skills.new";return d.isPending?g="filePicker.selecting":u.isPending&&(g="skills.importing"),v.jsxs(v.Fragment,{children:[v.jsxs(Ko,{children:[v.jsxs(qo,{render:v.jsx(nt,{type:"button",disabled:f}),children:[f?v.jsx(Vr,{className:"animate-spin"}):v.jsx(lc,{}),v.jsx("span",{children:t(g)}),v.jsx(Zv,{})]}),v.jsx(Yo,{align:"end",className:"w-max max-w-[min(20rem,calc(100vw-2rem))]",children:AB.map(({titleKey:m,descriptionKey:h,icon:x})=>v.jsxs(fc,{className:"items-start gap-2 p-2",onClick:()=>{m==="skills.createManually"?e():m==="skills.importLocal"?d.mutate():l(!0)},children:[v.jsx(x,{"aria-hidden":"true",className:"mt-0.5 size-4"}),v.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5 whitespace-normal",children:[v.jsx("span",{className:"text-sm",children:t(m)}),v.jsx("span",{className:"text-xs text-muted-foreground",children:t(h)})]})]},m))})]}),o&&v.jsx(OB,{isPending:u.isPending,onClose:()=>l(!1),onImport:m=>u.mutate({url:m})})]})}function NB(e){if(!e)return null;for(const t of e.elements){const i=t.tagName;if(i==="BUTTON"||i==="INPUT"){const s=t;if(s.type==="submit")return s}}return null}const DB="data-checked",jB="data-unchecked";function bM(e){return{checked(t){return e.indeterminate?{}:t?{[DB]:""}:{[jB]:""}},...hc}}const IB=b.createContext(void 0);function PB(){return b.useContext(IB)}const xM=b.createContext(void 0);function LB(){const e=b.useContext(xM);if(e===void 0)throw new Error(gn(14));return e}const zB="data-parent",_B=b.forwardRef(function(t,i){const{checked:s,className:o,defaultChecked:l=!1,"aria-labelledby":u,disabled:d=!1,form:f,id:g,indeterminate:m=!1,inputRef:h,name:x,onCheckedChange:S,parent:w=!1,readOnly:R=!1,render:E,required:C=!1,uncheckedValue:O,value:k,nativeButton:A=!1,style:N,...j}=t,{clearErrors:D}=vd(),{disabled:M,name:_,setDirty:L,setFilled:q,setTouched:X,state:B,validationMode:H,validityData:U,validation:z}=ia(),Q=lA(),{labelId:$,registerControlId:K,getDescriptionProps:Y}=Go(),ee=PB(),G=ee?.allValues===void 0?void 0:ee.parent,oe=G!==void 0,I=M||Q.disabled||ee?.disabled||d,V=_??x,W=k??V,re=ar(),Ee=ee?.registerControlId!==K,le=pc({id:g||void 0,enabled:Ee}),me=A?le:re;let ge={};oe&&(w?ge=G.getParentProps():W!==void 0&&(ge=G.getChildProps(W)));const{checked:ue=s,indeterminate:Te=m,onCheckedChange:ve,...Pe}=ge,Oe=ee?.value,Le=b.useRef(null),Ve=bd(I,Le),{getButtonProps:ke,buttonRef:Ue}=vi({disabled:I,native:A}),be=ee?.validation??z,[He,Ze]=Js({controlled:W!==void 0&&Oe!==void 0&&!w?Oe.includes(W):ue,default:l,name:"Checkbox",state:"checked"}),ot=oe?!!ue:He,de=oe&&Te||m;xd(Le,re,He,void 0,!ee&&!I,x);const we=G?.registerChildId,Ge=b.useRef(null),Me=be.registerInput,De=ee?W:void 0,bt=b.useCallback(We=>Me(We,{controlRef:Le,value:De}),[Me,De]),dt=ei(h,Ge,w?void 0:bt),gt=_b(u,$,Ge,!A,le,j["aria-label"]);_e(()=>{Ge.current&&(Ge.current.indeterminate=de),ee||q(He)},[He,de,ee,q]),cc(He,()=>{ee||(D(V),L(He!==U.initialValue),be.change(He))});const Nt=Mr({checked:He,disabled:I,form:f,name:w?void 0:V,id:A?void 0:le,required:C,ref:dt,style:V?Tp:rd,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(We){if(We.nativeEvent.defaultPrevented)return;if(R){We.preventDefault();return}const wt=We.currentTarget.checked,Zt=ut(Dr,We.nativeEvent);if(S?.(wt,Zt),!Zt.isCanceled&&(ve?.(wt,Zt),!Zt.isCanceled&&(Ze(wt),W!==void 0&&ee!==void 0&&!w&&!oe))){const ht=wt?[...ee.value,W]:ee.value.filter(xt=>xt!==W);ee.setValue(ht,Zt)}},onClick(We){We.stopPropagation()},onFocus(){Le.current?.focus()}},k!==void 0?{value:(ee?He&&k:k)||""}:Xt,Y,We=>be.getValidationProps(I,We));b.useEffect(()=>{if(!G||W===void 0)return;const We=G.disabledStatesRef.current;return We.set(W,I),()=>{We.delete(W)}},[G,I,W]);const jt=b.useMemo(()=>({...B,checked:ot,disabled:I,readOnly:R,required:C,indeterminate:de}),[B,ot,I,R,C,de]),tn=bM(jt),an=kt("span",t,{state:jt,ref:[Ue,Le,i],props:[{id:me,role:"checkbox","aria-checked":de?"mixed":ot,"aria-readonly":R||void 0,"aria-required":C||void 0,"aria-labelledby":gt,[zB]:w?"":void 0,onFocus(){Ve(!0)},onBlur(){const We=Ge.current;We&&(X(!0),Ve(!1),H==="onBlur"&&be.commit(ee?Oe:We.checked))},onKeyDown(We){if(We.key!=="Enter"||(We.preventBaseUIHandler(),We.defaultPrevented))return;const wt=Ge.current?.form??null,Zt=We.currentTarget,ht=We.nativeEvent,xt=We.preventDefault,yt=ht.preventDefault;let Ut=!1;We.preventDefault=()=>{Ut=!0,xt.call(We)},ht.preventDefault=()=>{Ut=!0,yt.call(ht)},yt.call(ht),Cn(Zt).queueMicrotask(()=>{We.preventDefault=xt,ht.preventDefault=yt,Ut||NB(wt)?.click()})},onClick(We){if(R||I)return;We.preventDefault();const wt=Ge.current;wt&&Do(wt,We)}},j,Pe,ke,Y,We=>be.getValidationProps(I,We)],stateAttributesMapping:tn}),nn=an.props.id;return _e(()=>{if(!(!we||w||W===void 0||nn===void 0))return we(W,nn)},[we,w,W,nn]),v.jsxs(xM.Provider,{value:jt,children:[an,!He&&!ee&&V&&!w&&O!==void 0&&v.jsx("input",{type:"hidden",form:f,name:V,value:O,disabled:I}),v.jsx("input",{...Nt,suppressHydrationWarning:!0})]})}),UB=b.forwardRef(function(t,i){const{render:s,className:o,style:l,keepMounted:u=!1,...d}=t,f=LB(),g=f.checked||f.indeterminate,{mounted:m,transitionStatus:h,setMounted:x}=Uo(g),S=b.useRef(null),w={...f,transitionStatus:h};Li({batch:!0,enabled:!g,open:g,ref:S,onComplete(){g||x(!1)}});const E={...bM(f),...ws},C=u||m,O=kt("span",t,{ref:[i,S],state:w,stateAttributesMapping:E,props:d});return C?O:null});function SM({className:e,...t}){return v.jsx(_B,{"data-slot":"checkbox",className:Fe("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),...t,children:v.jsx(UB,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:v.jsx(ld,{})})})}const wM=b.createContext(void 0);function HB(){return b.useContext(wM)}const FB=b.forwardRef(function(t,i){const{className:s,defaultPressed:o=!1,disabled:l=!1,form:u,onPressedChange:d,pressed:f,render:g,type:m,value:h,nativeButton:x=!0,style:S,...w}=t,R=ar(h||void 0),E=HB(),C=E?.value??[],O=(l||E?.disabled)??!1,[k,A]=Js({controlled:E?R!==void 0&&C.indexOf(R)>-1:f,default:o,name:"Toggle",state:"pressed"}),{getButtonProps:N,buttonRef:j}=vi({disabled:O,native:x}),D={disabled:O,pressed:k},M=[j,i],_=[{"aria-pressed":k,onClick(X){const B=!k,H=ut(Dr,X.nativeEvent);d?.(B,H),!H.isCanceled&&(R&&E?.setGroupValue?.(R,B,H),!H.isCanceled&&A(B))}},w,N],L=kt("button",t,{enabled:!E,state:D,ref:M,props:_}),q=b.useMemo(()=>({disabled:O,focusableWhenDisabled:!1}),[O]);return E?v.jsx(Pb,{tag:"button",render:g,className:s,style:S,metadata:q,state:D,refs:M,props:_}):L}),Jb="data-composite-item-active";function BB(e){const{loopFocus:t=!0,orientation:i="both",grid:s,onLoop:o,direction:l,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:f,enableHomeAndEndKeys:g=!1,stopEventPropagation:m,disabledIndices:h,modifierKeys:x=$i}=e,[S,w]=b.useState(0),R=s!=null,E=b.useRef(null),C=ei(E,f),O=b.useRef([]),k=b.useRef(!1),A=b.useRef(null),N=u??S,j=Be((q,X=!1)=>{if(A.current=O.current[q]??null,(d??w)(q),X){const B=O.current[q];AE(E.current,B,l,i)}}),D=Be(q=>{if(q.size===0)return;if(k.current){const U=O.current,z=U.indexOf(A.current);if(z===-1){const Q=U[N];!Q||ql(U,N,h)?j(VB(U,h)):A.current=Q}else z!==N&&j(z);return}k.current=!0;const X=Array.from(q.keys()),B=X.find(U=>U?.hasAttribute(Jb))??null,H=B?q.get(B)?.index??-1:-1;if(H!==-1)j(H);else if(ql(X,N,h)){const U=Kl(X,{disabledIndices:h});Vl(X,U)||j(U)}AE(E.current,B,l,i)});_e(()=>{if(h==null||u!=null||!k.current)return;const q=O.current;if(ql(q,N,h)){const X=Kl(q,{disabledIndices:h});Vl(q,X)||j(X)}},[h,u,N,O,j]);const M=Be((q,X,B)=>o?o(q,X,B,O):B),_=Be(q=>{const X=q.key===Zy||q.key===Jy;if(!ud.has(q.key)||!g&&X||KB(q,x)||!E.current)return;const H=l==="rtl",U=H?Qy:Xy,z=H?Xy:Qy,Q=i==="vertical"?$y:U,$=i==="vertical"?Gy:z,K=nr(q.nativeEvent);if(K!=null&&OE(K)&&!nA(K)){const V=K.selectionStart,W=K.selectionEnd,re=K.value;if(V==null||q.shiftKey||V!==W||q.key!==$&&V<re.length||q.key!==Q&&V>0)return}let Y=N;const ee=wh(O,h),G=Ly(O,h);s!=null&&(Y=s({disabledIndices:h,elementsRef:O,event:q,highlightedIndex:N,loopFocus:t,maxIndex:G,minIndex:ee,onLoop:M,orientation:i,rtl:H}));const oe=i!=="vertical"&&q.key===U||i!=="horizontal"&&q.key===$y,I=i!=="vertical"&&q.key===z||i!=="horizontal"&&q.key===Gy;g&&(q.key===Zy?Y=ee:q.key===Jy&&(Y=G)),Y===N&&(oe||I)&&(t&&Y===G&&oe?(Y=ee,o&&(Y=o(q,N,Y,O))):t&&Y===ee&&I?(Y=G,o&&(Y=o(q,N,Y,O))):Y=Kl(O.current,{startingIndex:Y,decrement:I,disabledIndices:h})),Y!==N&&!Vl(O.current,Y)&&(m&&q.stopPropagation(),(R||X||oe||I)&&q.preventDefault(),j(Y,!0),queueMicrotask(()=>{O.current[Y]?.focus()}))});return{props:{ref:C,onFocus(q){const X=E.current,B=nr(q.nativeEvent);!X||B==null||!OE(B)||B.setSelectionRange(0,B.value.length)},onKeyDown:_},highlightedIndex:N,onHighlightedIndexChange:j,elementsRef:O,onMapChange:D,relayKeyboardEvent:_}}function VB(e,t){let i=-1;for(let s=0;s<e.length;s+=1){const o=e[s];if(!(!o||ql(e,s,t))){if(o.hasAttribute(Jb))return s;i===-1&&(i=s)}}return Math.max(i,0)}function KB(e,t){for(const i of oz)if(!t.includes(i)&&e.getModifierState(i))return!0;return!1}function EM(e){const{render:t,className:i,style:s,refs:o=$i,props:l=$i,state:u=Xt,stateAttributesMapping:d,highlightedIndex:f,onHighlightedIndexChange:g,orientation:m,grid:h,loopFocus:x,onLoop:S,enableHomeAndEndKeys:w,onMapChange:R,stopEventPropagation:E=!0,rootRef:C,disabledIndices:O,modifierKeys:k,highlightItemOnHover:A=!1,tag:N="div",...j}=e,D=Yp(),{props:M,highlightedIndex:_,onHighlightedIndexChange:L,elementsRef:q,onMapChange:X,relayKeyboardEvent:B}=BB({grid:h,loopFocus:x,onLoop:S,orientation:m,highlightedIndex:f,onHighlightedIndexChange:g,rootRef:C,stopEventPropagation:E,enableHomeAndEndKeys:w,direction:D,disabledIndices:O,modifierKeys:k}),H=kt(N,e,{state:u,ref:o,props:[M,...l,j],stateAttributesMapping:d}),U=b.useMemo(()=>({highlightedIndex:_,onHighlightedIndexChange:L,highlightItemOnHover:A,relayKeyboardEvent:B}),[_,L,A,B]);return v.jsx(Ck.Provider,{value:U,children:v.jsx(Ib,{elementsRef:q,onMapChange:z=>{R?.(z),X(z)},children:H})})}const qB=b.createContext(void 0);function YB(){return b.useContext(qB)}const GB=b.forwardRef(function(t,i){const{defaultValue:s,disabled:o=!1,loopFocus:l=!0,onValueChange:u,orientation:d="horizontal",multiple:f=!1,value:g,className:m,render:h,style:x,...S}=t,w=ng(),R=YB(),E=s??$i,C=g!==void 0||s!==void 0,O=(w?.disabled??!1)||(R?.disabled??!1)||o,[k,A]=Js({controlled:g,default:E,name:"ToggleGroup",state:"value"}),N=Be((L,q,X)=>{let B;f?(B=k.slice(),q?B.push(L):B.splice(k.indexOf(L),1)):B=q?[L]:[],u?.(B,X),!X.isCanceled&&A(B)}),j={disabled:O,multiple:f,orientation:d},D=b.useMemo(()=>({disabled:O,setGroupValue:N,value:k,isValueInitialized:C}),[O,N,k,C]),M={role:"group"},_=kt("div",t,{enabled:!!w,state:j,ref:i,props:[M,S]});return v.jsx(wM.Provider,{value:D,children:w?_:v.jsx(EM,{render:h,className:m,style:x,state:j,refs:[i],props:[M,S],loopFocus:l,enableHomeAndEndKeys:!0,orientation:d})})}),$B=Ho("group/toggle inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-7 min-w-7 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",sm:"h-6 min-w-6 rounded-[min(var(--radius-md),8px)] 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-3",lg:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}}),CM=b.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function QB({className:e,variant:t,size:i,spacing:s=2,orientation:o="horizontal",children:l,...u}){return v.jsx(GB,{"data-slot":"toggle-group","data-variant":t,"data-size":i,"data-spacing":s,"data-orientation":o,style:{"--gap":s},className:Fe("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch",e),...u,children:v.jsx(CM.Provider,{value:{variant:t,size:i,spacing:s,orientation:o},children:l})})}function XB({className:e,children:t,variant:i="default",size:s="default",...o}){const l=b.useContext(CM);return v.jsx(FB,{"data-slot":"toggle-group-item","data-variant":l.variant||i,"data-size":l.size||s,"data-spacing":l.spacing,className:Fe("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",$B({variant:l.variant||i,size:l.size||s}),e),...o,children:t})}function RM({agents:e,value:t,onValueChange:i,label:s,disabled:o=!1,shouldShowNames:l=!1}){return v.jsx(QB,{multiple:!0,value:t,onValueChange:i,disabled:o,"aria-label":s,className:"max-w-full flex-wrap",children:e.map(u=>v.jsxs(XB,{value:u.id,"aria-label":u.name,title:u.name,className:Fe("disabled:opacity-100",!l&&"size-7 p-0"),children:[v.jsx(sM,{icon:u.icon,monochrome:!t.includes(u.id),className:"size-4 rounded-none bg-transparent"}),l&&v.jsx("span",{children:u.name})]},u.id))})}function TM({name:e}){const{t}=pt(),i=jr(),s=na({queryKey:Iu,queryFn:({signal:f})=>mM(f)}),o=["skill-assignment",e],l=rg({mutationKey:o})>0,u=er({mutationKey:o,mutationFn:({id:f,assigned:g})=>yM(e,f,g),onSuccess:f=>{i.setQueryData(Iu,g=>g&&{...g,skills:g.skills.map(m=>m.name===f.name?f:m)})},onError:f=>{Ft.error(t(f instanceof Ga&&f.code==="SKILL_LINK_CONFLICT"?"skills.linkConflict":"skills.assignmentError"))},onSettled:()=>i.invalidateQueries({queryKey:Iu})});if(s.isPending)return v.jsx(fr,{className:"h-7 w-16"});if(s.isError)return v.jsx(nt,{variant:"ghost",onClick:()=>{s.refetch()},children:t("common.retry")});if(s.data.agents.length===0)return v.jsx("span",{className:"text-xs text-muted-foreground",children:t("skills.noAgents")});const d=s.data.skills.find(f=>f.name===e)?.agentIds??[];return v.jsx("div",{"aria-busy":l,children:v.jsx(RM,{agents:s.data.agents,value:d,disabled:l,label:t("skills.assignTitle",{name:e}),onValueChange:f=>{const g=s.data.agents.find(m=>f.includes(m.id)!==d.includes(m.id))?.id;g&&!l&&u.mutate({id:g,assigned:f.includes(g)})}})})}function ZB({skill:e,isSelected:t,selectionDisabled:i,onSelectedChange:s,onEdit:o,onDelete:l,onAssign:u}){const{t:d}=pt();return v.jsxs(Eg,{children:[v.jsxs(Cg,{render:v.jsx("div",{role:"listitem","data-selected":t||void 0,className:`
|
|
153
|
-
group flex h-9 items-center rounded-md px-2 transition-colors
|
|
154
|
-
hover:bg-muted/50
|
|
155
|
-
has-aria-expanded:bg-muted/50
|
|
156
|
-
data-selected:bg-muted/50
|
|
157
|
-
`}),children:[v.jsx("div",{className:"flex w-8 shrink-0 items-center",children:v.jsx(SM,{checked:t,disabled:i,onCheckedChange:s,"aria-label":d("skills.selectAria",{name:e.name}),className:`
|
|
158
|
-
opacity-0
|
|
159
|
-
group-focus-within:opacity-100
|
|
160
|
-
group-hover:opacity-100
|
|
161
|
-
focus-visible:opacity-100
|
|
162
|
-
data-checked:opacity-100
|
|
163
|
-
[@media(hover:none)]:opacity-100
|
|
164
|
-
`})}),v.jsxs(yd,{to:`/library/skills/${encodeURIComponent(e.name)}`,className:`
|
|
165
|
-
flex min-w-0 flex-1 items-center gap-2 rounded-sm text-sm
|
|
166
|
-
focus-visible:outline-2 focus-visible:outline-ring
|
|
167
|
-
`,children:[v.jsx("span",{className:"min-w-0 truncate font-medium",children:e.name}),v.jsx("span",{className:"min-w-0 flex-1 basis-0 truncate text-muted-foreground",children:e.description})]}),!t&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:`
|
|
168
|
-
ml-2 hidden shrink-0
|
|
169
|
-
md:block
|
|
170
|
-
`,children:v.jsx(TM,{name:e.name})}),v.jsx("div",{className:`
|
|
171
|
-
flex w-9 shrink-0 justify-end overflow-hidden
|
|
172
|
-
md:w-0
|
|
173
|
-
md:group-focus-within:w-9
|
|
174
|
-
md:group-hover:w-9
|
|
175
|
-
md:group-has-aria-expanded:w-9
|
|
176
|
-
[@media(hover:none)]:w-9
|
|
177
|
-
`,children:v.jsxs(Ko,{children:[v.jsx(qo,{render:v.jsx(nt,{type:"button",variant:"ghost",size:"icon","aria-label":d("skills.actionsAria",{name:e.name}),className:"shrink-0 text-muted-foreground"}),children:v.jsx(Wv,{})}),v.jsx(Yo,{align:"end",className:"w-40",children:v.jsx(zC,{Item:fc,onEdit:o,onDelete:l,onAssign:u})})]})})]})]}),!t&&v.jsx(Rg,{children:v.jsx(zC,{Item:Tg,onEdit:o,onDelete:l,onAssign:u})})]})}function zC({Item:e,onEdit:t,onDelete:i,onAssign:s}){const{t:o}=pt();return v.jsxs(v.Fragment,{children:[v.jsxs(e,{onClick:s,children:[v.jsx(uk,{}),v.jsx("span",{children:o("skills.assign")})]}),v.jsxs(e,{onClick:t,children:[v.jsx(ZT,{}),v.jsx("span",{children:o("skills.edit")})]}),v.jsxs(e,{variant:"destructive",onClick:i,children:[v.jsx(rb,{}),v.jsx("span",{children:o("skills.delete")})]})]})}function JB({skill:e,onClose:t}){const{t:i}=pt(),s=jr(),o=er({mutationFn:()=>CB(e.name),onSuccess:()=>{s.removeQueries({queryKey:jo(e.name),exact:!0}),s.invalidateQueries({queryKey:Od}),Ft.success(i("skills.deleted")),t()},onError:()=>Ft.error(i("skills.deleteError"))}),l=()=>{o.isPending||t()};return v.jsx(Cs,{open:!0,onOpenChange:u=>{u||l()},children:v.jsxs(Rs,{showCloseButton:!1,children:[v.jsxs(Ji,{children:[v.jsx(Wi,{children:i("skills.deleteConfirmTitle")}),v.jsx(xs,{children:v.jsx(Wp,{i18nKey:"skills.deleteConfirmDescription",values:{name:e.name},components:{skillName:v.jsx("code",{className:`
|
|
178
|
-
rounded-sm bg-muted px-1 py-0.5 font-mono wrap-anywhere
|
|
179
|
-
`})}})})]}),v.jsxs(bs,{children:[v.jsx(nt,{type:"button",variant:"ghost",disabled:o.isPending,onClick:l,children:i("common.cancel")}),v.jsxs(nt,{type:"button",variant:"destructive",disabled:o.isPending,onClick:()=>o.mutate(),children:[o.isPending&&v.jsx(Vr,{className:"animate-spin"}),v.jsx("span",{children:i("skills.delete")})]})]})]})})}function WB({skill:e,onClose:t}){const{t:i}=pt();return v.jsx(Cs,{open:!0,onOpenChange:s=>{s||t()},children:v.jsxs(Rs,{children:[v.jsxs(Ji,{children:[v.jsx(Wi,{className:"pr-6 leading-relaxed",children:v.jsx(Wp,{i18nKey:"skills.assignDialogTitle",values:{name:e.name},components:{skillName:v.jsx("code",{className:`
|
|
180
|
-
rounded-sm bg-muted px-1 py-0.5 font-mono text-sm
|
|
181
|
-
wrap-anywhere
|
|
182
|
-
`})}})}),v.jsx(xs,{children:i("skills.assignDescription")})]}),v.jsx(TM,{name:e.name})]})})}function eV(e,t,i,s){return i.flatMap(o=>t.filter(l=>(e.find(u=>u.name===l)?.agentIds.includes(o)??!1)!==s).map(l=>({name:l,agentId:o,isAssigned:s})))}function tV({names:e,onAssigned:t}){const{t:i}=pt(),s=jr(),[o,l]=b.useState(!1),[u,d]=b.useState([]),f=rg({mutationKey:["skill-assignment"]})>0,g=na({queryKey:Iu,queryFn:({signal:S})=>mM(S),enabled:o}),m=er({mutationKey:vM,mutationFn:async S=>{let w=0;const R=[];for(const{name:E,agentId:C,isAssigned:O}of S)try{await yM(E,C,O),w+=1}catch(k){R.push(k)}return{completed:w,errors:R}},onSuccess:async({completed:S,errors:w})=>{if(await s.invalidateQueries({queryKey:Iu}),w.length>0){Ft.error(i("skills.batchAssignPartial",{completed:S,failed:w.length}),{description:i(w.some(R=>R instanceof Ga&&R.code==="SKILL_LINK_CONFLICT")?"skills.linkConflict":"skills.assignmentError")});return}Ft.success(i("skills.batchAssigned")),l(!1),t()}}),h=!g.isSuccess||u.length===0||m.isPending||f;function x(S){h||m.mutate(eV(g.data.skills,e,u,S))}return v.jsxs(ub,{open:o,onOpenChange:S=>{m.isPending||(l(S),S||d([]))},children:[v.jsxs(Ik,{render:v.jsx(nt,{variant:"outline",disabled:f||m.isPending}),children:[v.jsx(uk,{}),v.jsx("span",{children:i("skills.batch")}),v.jsx("span",{className:"text-muted-foreground tabular-nums",children:e.length})]}),v.jsx(db,{align:"end","aria-label":i("skills.batch"),children:v.jsxs("div",{className:"flex flex-col gap-4","aria-busy":m.isPending,children:[v.jsxs("div",{className:"flex flex-col gap-2",children:[g.isPending&&v.jsx(fr,{className:"h-16 w-full"}),g.isError&&v.jsxs("div",{role:"alert",className:"space-y-2",children:[v.jsx("p",{className:"text-xs text-muted-foreground",children:i("skills.assignmentError")}),v.jsx(nt,{type:"button",variant:"outline",disabled:g.isFetching,onClick:()=>{g.refetch()},children:i("common.retry")})]}),g.isSuccess&&g.data.agents.length===0&&v.jsx("p",{className:"text-xs text-muted-foreground",children:i("skills.noAgents")}),g.isSuccess&&v.jsx(RM,{agents:g.data.agents,value:u,onValueChange:d,label:i("skills.batch"),disabled:m.isPending,shouldShowNames:!0})]}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsxs(nt,{type:"button",variant:"outline",disabled:h,onClick:()=>x(!1),children:[m.isPending&&!m.variables[0]?.isAssigned&&v.jsx(Vr,{className:"animate-spin"}),v.jsx("span",{children:i("skills.unassign")})]}),v.jsxs(nt,{type:"button",disabled:h,onClick:()=>x(!0),children:[m.isPending&&m.variables[0]?.isAssigned&&v.jsx(Vr,{className:"animate-spin"}),v.jsx("span",{children:i("skills.assign")})]})]})]})})]})}function nV(){const{t:e}=pt(),[t,i]=b.useState(!1),[s,o]=b.useState(null),[l,u]=b.useState(null),[d,f]=b.useState(null),[g,m]=b.useState([]),h=rg({mutationKey:vM})>0,x=na({queryKey:Od,queryFn:({signal:E})=>bB(E)}),S=x.isSuccess?x.data.filter(E=>g.includes(E.name)):[],w=x.isSuccess&&x.data.length>0&&S.length===x.data.length,R=e(w?"skills.deselectAll":"skills.selectAll");return v.jsxs(v.Fragment,{children:[v.jsxs(CA,{children:[S.length>0&&v.jsx(tV,{names:S.map(E=>E.name),onAssigned:()=>m([])}),v.jsxs(nt,{type:"button",variant:"outline",className:"max-sm:size-7 max-sm:p-0",title:R,"aria-pressed":w,disabled:h||!x.isSuccess||x.data.length===0,onClick:()=>{x.isSuccess&&m(w?[]:x.data.map(E=>E.name))},children:[v.jsx(wL,{}),v.jsx("span",{className:`
|
|
183
|
-
sr-only
|
|
184
|
-
sm:not-sr-only
|
|
185
|
-
`,children:R})]}),v.jsx(MB,{onCreateManually:()=>{i(!0)}})]}),v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto p-4",children:[x.isPending&&v.jsx(fr,{className:"h-16 w-full"}),x.isError&&v.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center",children:[v.jsx(Gu,{icon:By,title:e("skills.loadError"),className:"flex-none"}),v.jsx(nt,{variant:"outline",onClick:()=>{x.refetch()},children:e("common.retry")})]}),x.isSuccess&&x.data.length===0&&v.jsx(Gu,{icon:By,title:e("skills.emptyTitle"),description:e("skills.emptyDescription")}),x.isSuccess&&x.data.length>0&&v.jsx("div",{role:"list",children:x.data.map(E=>v.jsx(ZB,{skill:E,isSelected:g.includes(E.name),selectionDisabled:h,onSelectedChange:C=>{m(O=>C?[...O,E.name]:O.filter(k=>k!==E.name))},onEdit:()=>o(E),onDelete:()=>u(E),onAssign:()=>f(E)},E.name))})]}),t&&v.jsx(pv,{onClose:()=>{i(!1)}}),s&&v.jsx(pv,{skill:s,onClose:()=>o(null)}),l&&v.jsx(JB,{skill:l,onClose:()=>u(null)}),d&&v.jsx(WB,{skill:d,onClose:()=>f(null)})]})}function up(e,t){for(const i of e){if(i.path===t)return i;if(!i.children)continue;const s=up(i.children,t);if(s)return s}}function dp(e,t,i){return e.flatMap(s=>{if(s.path===t){const o=i(s);return o?[o]:[]}return s.children?[{...s,children:dp(s.children,t,i)}]:[s]})}function rV(e,t,i){return t?dp(e,t,s=>s.children?{...s,children:[...s.children,i]}:s):[...e,i]}function iV({files:e,parent:t,kind:i,onCreate:s,onCancel:o}){const{t:l}=pt(),[u,d]=b.useState(""),[f,g]=b.useState(!1),m=b.useRef(null),h=b.useRef(!1),x=b.useId(),S=u.trim(),w=t?`${t}/${S}`:S,R=eB(S)&&!S.includes("/"),E=S!==""&&up(e,w)!==void 0,C=E?l("skills.fileConflict"):f&&!R?l("skills.invalidEntryName"):null;b.useEffect(()=>{const k=requestAnimationFrame(()=>m.current?.focus());return()=>cancelAnimationFrame(k)},[]);const O=()=>{h.current||(g(!0),!(!R||E)&&(h.current=!0,s(i==="directory"?{path:w,children:[]}:{path:w,content:""})))};return v.jsxs("form",{onSubmit:k=>{k.preventDefault(),O()},onKeyDown:k=>{k.key==="Escape"&&(k.preventDefault(),k.stopPropagation(),h.current=!0,o())},children:[v.jsxs("div",{className:`
|
|
186
|
-
flex h-7 min-w-0 items-center gap-1.5 border-x border-transparent pl-2
|
|
187
|
-
`,children:[v.jsx("span",{className:"size-3 shrink-0"}),i==="directory"?v.jsx(zT,{className:"size-3.5 shrink-0"}):v.jsx(eb,{className:"size-3.5 shrink-0"}),v.jsx(Sd,{ref:m,required:!0,"aria-label":l(i==="directory"?"skills.newFolder":"skills.newFile"),"aria-invalid":!!C,"aria-describedby":C?x:void 0,maxLength:255,value:u,className:"min-w-0 flex-1",onKeyDown:k=>{k.key==="Enter"&&k.nativeEvent.isComposing&&k.preventDefault()},onChange:k=>d(k.target.value),onBlur:()=>{S===""&&!h.current?(h.current=!0,o()):O()}})]}),C&&v.jsx("p",{id:x,role:"alert",className:"mt-1 px-2 text-xs text-destructive",children:C})]})}function sV({entry:e,anchor:t,isOpen:i,onOpenChange:s,onConfirm:o}){const{t:l}=pt(),u=b.useId(),d=b.useId();return v.jsx(ub,{open:i,onOpenChange:s,children:v.jsx(db,{anchor:t,align:"start","aria-labelledby":u,"aria-describedby":d,finalFocus:()=>t.current?.querySelector("button")??!1,className:"max-w-[calc(100vw-1.5rem)]",children:v.jsxs("div",{className:"flex flex-col gap-3",children:[v.jsx("h2",{id:u,className:"text-sm font-medium",children:l("skills.delete")}),v.jsx("p",{id:d,className:"text-xs wrap-anywhere text-muted-foreground",children:v.jsx(Wp,{i18nKey:"skills.deleteEntryDescription",values:{path:e.path},components:{entryPath:v.jsx("code",{className:`
|
|
188
|
-
rounded-sm bg-muted px-1 py-0.5 font-mono wrap-anywhere
|
|
189
|
-
`})}})}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx(nt,{variant:"ghost",onClick:()=>s(!1),children:l("common.cancel")}),v.jsx(nt,{variant:"destructive",onClick:o,children:l("skills.delete")})]})]})})})}function fp({entry:e,Item:t,onAction:i}){const{t:s}=pt(),o=e?.path??"";return v.jsxs(v.Fragment,{children:[(!e||e.children)&&v.jsxs(v.Fragment,{children:[v.jsxs(t,{onClick:()=>i({type:"create",parent:o,kind:"file"}),children:[v.jsx(gL,{}),s("skills.newFile")]}),v.jsxs(t,{onClick:()=>i({type:"create",parent:o,kind:"directory"}),children:[v.jsx(yL,{}),s("skills.newFolder")]})]}),e&&e.path!=="SKILL.md"&&v.jsxs(t,{variant:"destructive",onClick:()=>i({type:"delete",entry:e}),children:[v.jsx(rb,{}),s("skills.delete")]})]})}function aV({entry:e,onAction:t,children:i,isActive:s=!1}){const{t:o}=pt(),l=b.useRef(null),[u,d]=b.useState(!1),f=m=>{m.type==="delete"?d(!0):t(m)},g=Fe(Rk({variant:"ghost"}),`
|
|
190
|
-
group/file relative flex w-full min-w-0 justify-start p-0
|
|
191
|
-
data-active:bg-muted data-active:text-foreground
|
|
192
|
-
`);return e?.path==="SKILL.md"?v.jsx("div",{className:g,"data-active":s||void 0,children:i}):v.jsxs(v.Fragment,{children:[v.jsxs(Eg,{children:[v.jsxs(Cg,{render:v.jsx("div",{ref:l,className:g,"data-active":s||void 0}),children:[i,v.jsxs(Ko,{children:[v.jsx(qo,{render:v.jsx(nt,{variant:"link",size:"icon","aria-label":o("skills.fileActions",{path:e?.path??o("skills.files")}),className:`
|
|
193
|
-
absolute right-0 shrink-0 text-inherit
|
|
194
|
-
data-popup-open:opacity-100
|
|
195
|
-
md:opacity-0
|
|
196
|
-
md:group-focus-within/file:opacity-100
|
|
197
|
-
md:group-hover/file:opacity-100
|
|
198
|
-
[@media(hover:none)]:opacity-100
|
|
199
|
-
`}),children:v.jsx(Wv,{})}),v.jsx(Yo,{align:"end",children:v.jsx(fp,{Item:fc,entry:e,onAction:f})})]})]}),v.jsx(Rg,{children:v.jsx(fp,{Item:Tg,entry:e,onAction:f})})]}),e&&v.jsx(sV,{entry:e,anchor:l,isOpen:u,onOpenChange:d,onConfirm:()=>{d(!1),t({type:"delete",entry:e})}})]})}const Wb=b.createContext({creation:null,render:()=>null});Wb.displayName="InlineEntryContext";function oV({files:e,selectedPath:t,onSelect:i,onOverview:s,onAction:o,onCreate:l,overviewDisabled:u=!1}){const{t:d}=pt(),[f,g]=b.useState(!1),[m,h]=b.useState(null),x=bb(),S=C=>{u||(C.type==="create"?h(C):(h(null),o(C)))},w=v.jsxs(nt,{variant:"ghost",className:`
|
|
200
|
-
shrink-0 justify-start
|
|
201
|
-
md:gap-1.5 md:pl-6.5
|
|
202
|
-
`,"aria-haspopup":"dialog",disabled:u,onClick:()=>{g(!1),s()},children:[v.jsx(sk,{}),v.jsx("span",{children:d("skills.overview")})]}),R=()=>m&&v.jsx(iV,{files:e,parent:m.parent,kind:m.kind,onCancel:()=>h(null),onCreate:C=>{l(C,m.parent),h(null),C.children||g(!1)}},`${m.parent}/${m.kind}`),E=v.jsxs(v.Fragment,{children:[v.jsx(Wb,{value:{creation:m,render:R},children:v.jsx(kM,{parent:"",entries:e,selectedPath:t,onSelect:C=>{g(!1),i(C)},onAction:S})}),v.jsxs(Eg,{children:[v.jsx(Cg,{render:v.jsx("div",{className:"min-h-16 flex-1"})}),v.jsx(Rg,{children:v.jsx(fp,{Item:Tg,onAction:S})})]})]});return v.jsxs(v.Fragment,{children:[v.jsxs("nav",{"aria-label":d("skills.fileNavigation"),className:`
|
|
203
|
-
hidden w-56 shrink-0 flex-col gap-2 overflow-y-auto border-r p-3
|
|
204
|
-
md:flex
|
|
205
|
-
`,children:[w,!x&&E]}),v.jsxs("div",{className:`
|
|
206
|
-
flex shrink-0 items-center gap-2 border-b p-2
|
|
207
|
-
md:hidden
|
|
208
|
-
`,children:[w,v.jsxs(vA,{open:f,onOpenChange:C=>{g(C),C||h(null)},children:[v.jsxs(PH,{render:v.jsx(nt,{variant:"outline"}),children:[v.jsx(mL,{}),v.jsx("span",{children:d("skills.files")})]}),v.jsxs(bA,{side:"left","aria-describedby":void 0,children:[v.jsx(xA,{className:"sr-only",children:d("skills.fileNavigation")}),v.jsxs("nav",{"aria-label":d("skills.fileNavigation"),className:`
|
|
209
|
-
flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-3 pt-14
|
|
210
|
-
pb-3
|
|
211
|
-
`,children:[v.jsxs(Ko,{children:[v.jsxs(qo,{render:v.jsx(nt,{variant:"outline",className:"w-full shrink-0 justify-start"}),children:[v.jsx(lc,{}),v.jsx("span",{children:d("skills.newEntry")})]}),v.jsx(Yo,{align:"start",children:v.jsx(fp,{Item:fc,onAction:S})})]}),E]})]})]})]})]})}function kM({entries:e,parent:t,selectedPath:i,onSelect:s,onAction:o}){const l=b.use(Wb),u=e.toSorted((d,f)=>!!d.children==!!f.children?d.path.localeCompare(f.path):d.children?-1:1);return v.jsxs("ul",{className:"min-w-0 shrink-0",children:[l.creation?.parent===t&&v.jsx("li",{children:l.render()}),u.map(d=>v.jsx(lV,{entry:d,selectedPath:i,onSelect:s,onAction:o},d.path))]})}function lV({entry:e,selectedPath:t,onSelect:i,onAction:s}){const[o,l]=b.useState(!0),u=e.children!==void 0;return v.jsxs("li",{className:"min-w-0",children:[v.jsx(aV,{entry:e,isActive:t===e.path,onAction:d=>{d.type==="create"&&l(!0),s(d)},children:v.jsxs("button",{type:"button","aria-current":!u&&t===e.path?"page":void 0,"aria-expanded":u?o:void 0,className:`
|
|
212
|
-
flex h-7 w-full min-w-0 flex-1 items-center gap-1.5 rounded-md pr-9
|
|
213
|
-
pl-2 text-left text-xs font-normal outline-none
|
|
214
|
-
focus-visible:ring-2 focus-visible:ring-ring
|
|
215
|
-
`,onClick:()=>{u?l(!o):i(e.path)},children:[v.jsx("span",{className:"flex size-3 shrink-0 items-center justify-center",children:u&&v.jsx(Jv,{className:Fe("size-3 transition-transform",o&&`
|
|
216
|
-
rotate-90
|
|
217
|
-
`)})}),u?v.jsx(zT,{className:"size-3.5 shrink-0"}):v.jsx(eb,{className:"size-3.5 shrink-0"}),v.jsx("span",{className:"truncate",title:e.path,children:e.path.split("/").at(-1)})]})}),u&&o&&v.jsx("div",{className:"ml-3 border-l pl-1",children:v.jsx(kM,{parent:e.path,entries:e.children,selectedPath:t,onSelect:i,onAction:s})})]})}function cV({skill:e}){const{t}=pt(),i=Vo(),s=jr(),[o,l]=b.useState(!1),[u,d]=b.useState("SKILL.md"),[f,g]=b.useState(e.files),[m,h]=b.useState(e.files),[x,S]=b.useState(!1),w=up(f,u),R=w?.content??"",E=JSON.stringify(f)!==JSON.stringify(m),C=er({mutationFn:()=>RB(e.name,f),onSuccess:A=>{g(A.files),h(A.files),s.setQueryData(jo(e.name),A),s.invalidateQueries({queryKey:Od}),Ft.success(t("skills.contentSaved"))},onError:()=>Ft.error(t("skills.contentSaveError"))}),O=V6(E||C.isPending);z8(b.useCallback(A=>{(E||C.isPending)&&A.preventDefault()},[E,C.isPending]));const k=()=>{E&&!C.isPending&&C.mutate()};return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:`
|
|
218
|
-
flex min-h-0 flex-1 flex-col border-t
|
|
219
|
-
md:flex-row
|
|
220
|
-
`,children:[v.jsx(oV,{files:f,overviewDisabled:C.isPending,selectedPath:u,onSelect:d,onCreate:(A,N)=>{C.isPending||(g(j=>rV(j,N,A)),A.children||d(A.path))},onAction:A=>{if(C.isPending||A.type!=="delete")return;const N=A.entry.path;g(j=>dp(j,N,()=>null)),(u===N||u.startsWith(`${N}/`))&&d("SKILL.md")},onOverview:()=>{E?S(!0):l(!0)}}),v.jsxs("section",{className:"flex min-h-0 min-w-0 flex-1 flex-col","aria-labelledby":"skill-file-title",children:[v.jsxs("header",{className:`
|
|
221
|
-
flex h-10 shrink-0 items-center justify-between gap-2 border-b
|
|
222
|
-
px-4
|
|
223
|
-
`,children:[v.jsx("h1",{id:"skill-file-title",className:"min-w-0 truncate font-mono text-xs font-medium",title:u,children:u}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{role:"status",className:"text-xs text-muted-foreground",children:t(C.isPending?"skills.contentSaving":E?"skills.unsavedChanges":"skills.allChangesSaved")}),v.jsxs(nt,{disabled:!E||C.isPending,onClick:k,children:[C.isPending?v.jsx(Vr,{className:"animate-spin"}):v.jsx(nb,{}),v.jsx("span",{children:t("skills.saveContent")})]})]})]}),v.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:w?.content===null?v.jsx(Gu,{title:t("skills.fileNotEditable")}):v.jsx(pM,{height:"100%",path:`foundry://skills/${encodeURIComponent(e.name)}/${u.split("/").map(A=>encodeURIComponent(A)).join("/")}`,value:R,ariaLabel:t("skills.fileEditor",{file:u}),placeholder:u==="SKILL.md"?t("skills.contentPlaceholder"):"",readOnly:C.isPending,showLineNumbers:!0,onChange:A=>g(N=>dp(N,u,j=>({path:j.path,content:A}))),onSave:k},u)})]})]}),o&&v.jsx(pv,{skill:e,onClose:()=>l(!1),onSaved:A=>{A.name===e.name?s.query({queryKey:jo(e.name),queryFn:({signal:N})=>gM(e.name,N)}).then(N=>{g(N.files),h(N.files)}).catch(()=>Ft.error(t("skills.loadError"))):i(`/library/skills/${encodeURIComponent(A.name)}`,{replace:!0})}}),v.jsx(Cs,{open:O.state==="blocked"||x,onOpenChange:A=>{A||(O.reset?.(),S(!1))},children:v.jsxs(Rs,{showCloseButton:!1,children:[v.jsxs(Ji,{children:[v.jsx(Wi,{children:t("skills.leaveTitle")}),v.jsx(xs,{children:t("skills.leaveDescription")})]}),v.jsxs(bs,{children:[v.jsx(nt,{variant:"ghost",onClick:()=>{O.reset?.(),S(!1)},children:t("skills.keepEditing")}),v.jsx(nt,{variant:"destructive",disabled:C.isPending,onClick:()=>{g(m),up(m,u)||d("SKILL.md"),x?(l(!0),S(!1)):O.proceed?.()},children:t("skills.discardChanges")})]})]})})]})}function uV(){const{t:e}=pt(),{name:t=""}=D6(),i=na({queryKey:jo(t),queryFn:({signal:s})=>gM(t,s),retry:(s,o)=>!(o instanceof Ga&&o.code==="SKILL_NOT_FOUND")&&s<2});if(i.isPending)return v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-4","aria-busy":"true",children:[v.jsx(fr,{className:"h-7 w-48"}),v.jsx(fr,{className:"min-h-24 flex-1"})]});if(i.isError&&i.data===void 0){const s=i.error instanceof Ga&&i.error.code==="SKILL_NOT_FOUND";return v.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center p-4",children:[v.jsx(Gu,{icon:By,title:e(s?"skills.notFound":"skills.loadError"),className:"flex-none"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(nt,{variant:"outline",render:v.jsx(yd,{to:"/library/skills"}),children:e("skills.backToSkills")}),!s&&v.jsx(nt,{onClick:()=>{i.refetch()},children:e("common.retry")})]})]})}return v.jsx(cV,{skill:i.data},i.data.name)}function Za({label:e,description:t,children:i,className:s,controlClassName:o}){return v.jsxs("div",{className:Fe(`
|
|
224
|
-
flex flex-col items-start gap-3 p-4
|
|
225
|
-
min-[680px]:min-h-16 min-[680px]:flex-row min-[680px]:items-center
|
|
226
|
-
min-[680px]:justify-between min-[680px]:gap-8
|
|
227
|
-
`,s),children:[v.jsxs("div",{className:"min-w-0",children:[v.jsx("div",{className:"text-sm font-medium",children:e}),t&&v.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:t})]}),v.jsx("div",{className:Fe(`
|
|
228
|
-
min-w-0
|
|
229
|
-
max-[680px]:w-full
|
|
230
|
-
min-[680px]:shrink-0
|
|
231
|
-
`,o),children:i})]})}function dV({configFolder:e}){const{t}=pt(),i=b.useRef(null),s=er({mutationFn:async f=>{await navigator.clipboard.writeText(f)},onSuccess:()=>{Ft.success(t("settings.configFolderCopied"))},onError:()=>{Ft.error(t("settings.errors.copyConfigFolder"))}}),o=er({mutationFn:e_,onError:()=>{Ft.error(t("settings.errors.openConfigFolder"))}}),l=s.isSuccess&&s.variables===e,u=!e||s.isPending||o.isPending,d=t(l?"settings.configFolderCopied":"settings.copyConfigFolder");return v.jsx(Za,{label:t("settings.configFolder"),controlClassName:"min-[680px]:shrink",children:v.jsxs("div",{className:`
|
|
232
|
-
flex min-w-0 items-center justify-end gap-2
|
|
233
|
-
max-[680px]:justify-start
|
|
234
|
-
`,children:[e&&v.jsx("span",{className:`
|
|
235
|
-
min-w-0 font-mono text-xs break-all text-muted-foreground
|
|
236
|
-
select-text
|
|
237
|
-
`,children:e}),v.jsx(nt,{type:"button",variant:"ghost",size:"icon","aria-label":d,title:d,disabled:u,"aria-busy":s.isPending,onClick:()=>{!e||u||(i.current&&clearTimeout(i.current),s.mutate(e,{onSuccess:()=>{i.current=setTimeout(()=>s.reset(),2e3)}}))},children:l?v.jsx(ld,{}):v.jsx(ST,{})}),v.jsxs(nt,{type:"button",variant:"outline",disabled:u,"aria-busy":o.isPending,onClick:()=>{u||o.mutate()},children:[o.isPending?v.jsx(Vr,{className:"animate-spin"}):v.jsx(IT,{}),v.jsx("span",{children:t("settings.openFolder")})]})]})})}function fV({onClose:e}){const{t}=pt(),i=jr(),s=b.useId(),[o,l]=b.useState(["agents"]),u=na({queryKey:["skill-targets"],queryFn:({signal:f})=>t_(f),retry:!1}),d=er({mutationFn:n_,onSuccess:()=>{i.invalidateQueries({queryKey:Yk}),Ft.success(t("settings.skillDownloaded")),e()},onError:()=>Ft.error(t("settings.errors.downloadSkill"))});return v.jsx(Cs,{open:!0,onOpenChange:f=>{!f&&!d.isPending&&e()},children:v.jsxs(Rs,{showCloseButton:!1,children:[v.jsxs("form",{className:"flex flex-col gap-4","aria-busy":d.isPending,onSubmit:f=>{f.preventDefault(),o.length>0&&u.isSuccess&&!d.isPending&&d.mutate({targets:o})},children:[v.jsxs(Ji,{children:[v.jsx(Wi,{children:t("settings.downloadSkill")}),v.jsx(xs,{children:t("settings.downloadSkillDescription")})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Ws,{id:s,children:t("settings.skillTargets")}),u.isPending&&v.jsxs("div",{className:"space-y-2",children:[v.jsx(fr,{className:"h-12 w-full"}),v.jsx(fr,{className:"h-12 w-full"})]}),u.isError&&v.jsx(nt,{type:"button",variant:"outline",disabled:u.isFetching,onClick:()=>{u.refetch()},children:t("common.retry")}),u.data&&v.jsx("div",{role:"group","aria-labelledby":s,"aria-required":"true",className:"flex flex-col gap-2",children:u.data.targets.map(({target:f,destination:g})=>v.jsxs(cM,{className:"flex items-start gap-3 rounded-lg border p-3",children:[v.jsx(SM,{checked:o.includes(f),disabled:d.isPending,onCheckedChange:m=>{l(h=>m?[...h,f]:h.filter(x=>x!==f))}}),v.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[v.jsx("span",{children:f==="agents"?".agents":".claude"}),v.jsx("span",{className:`
|
|
238
|
-
font-mono text-xs font-normal break-all
|
|
239
|
-
text-muted-foreground
|
|
240
|
-
`,children:g})]})]},f))})]}),v.jsxs(bs,{children:[v.jsx(nt,{type:"button",variant:"ghost",disabled:d.isPending,onClick:e,children:t("common.cancel")}),v.jsxs(nt,{type:"submit",disabled:o.length===0||!u.isSuccess||d.isPending,children:[d.isPending?v.jsx(Vr,{className:"animate-spin"}):v.jsx(Zp,{}),v.jsx("span",{children:t(d.isPending?"settings.downloadingSkill":"settings.downloadSkill")})]})]})]}),v.jsxs(kd,{disabled:d.isPending,render:v.jsx(nt,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[v.jsx(ta,{}),v.jsx("span",{className:"sr-only",children:t("a11y.close")})]})]})})}function hV({disabled:e=!1}){const{t}=pt(),[i,s]=b.useState(!1);return v.jsxs(Za,{label:v.jsxs("span",{className:"flex items-center gap-1",children:[t("settings.downloadSkill"),v.jsxs(Xh,{children:[v.jsx(Zh,{render:v.jsx(nt,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground","aria-label":t("settings.aboutFoundrySkill")}),children:v.jsx(dL,{})}),v.jsx(Jh,{children:t("settings.foundrySkillHint")})]})]}),children:[v.jsxs(nt,{type:"button",variant:"outline",disabled:e,onClick:()=>s(!0),children:[v.jsx(Zp,{}),t("settings.downloadSkill")]}),i&&v.jsx(fV,{onClose:()=>s(!1)})]})}function pV({className:e,...t}){return v.jsx("div",{"data-slot":"input-group",role:"group",className:Fe("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),...t})}const gV=Ho("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 mV({className:e,align:t="inline-start",...i}){return v.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:Fe(gV({align:t}),e),onClick:s=>{s.target.closest("button")||s.currentTarget.parentElement?.querySelector("input")?.focus()},...i})}const yV=Ho("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 vV({className:e,type:t="button",variant:i="ghost",size:s="xs",...o}){return v.jsx(nt,{type:t,"data-size":s,variant:i,className:Fe(yV({size:s}),e),...o})}function bV({className:e,...t}){return v.jsx(Sd,{"data-slot":"input-group-control",className:Fe("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...t})}function mv({id:e,disabled:t,...i}){const{t:s}=pt(),o=b.useId(),l=e??o,[u,d]=b.useState(!1),f=s(u?"a11y.hidePassword":"a11y.showPassword");return v.jsxs(pV,{"data-disabled":t,children:[v.jsx(bV,{...i,id:l,type:u?"text":"password",disabled:t}),v.jsx(mV,{align:"inline-end",children:v.jsx(vV,{type:"button",size:"icon-xs","aria-label":f,"aria-controls":l,title:f,disabled:t,onClick:()=>d(g=>!g),children:u?v.jsx(hL,{}):v.jsx(pL,{})})})]})}function xV(e,t){const i=URL.createObjectURL(e),s=document.createElement("a");s.href=i,s.download=t,document.body.append(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(i),1e3)}async function SV(e){const t=await fetch("/api/data-export",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Unable to export data");const i=t.headers.get("content-disposition")??"",s=/filename="([^"]+)"/u.exec(i)?.[1]??"foundry.foundry-backup";xV(await t.blob(),s)}function wV({onClose:e}){const{t}=pt(),i=b.useId(),s=b.useId(),[o,l]=b.useState(""),[u,d]=b.useState(""),f=er({mutationFn:SV,onSuccess:()=>{Ft.success(t("dataExport.exported")),e()},onError:()=>{Ft.error(t("dataExport.error"))}});return v.jsx(Cs,{open:!0,onOpenChange:g=>{!g&&!f.isPending&&e()},children:v.jsxs(Rs,{showCloseButton:!1,children:[v.jsxs("form",{className:"flex flex-col gap-4","aria-busy":f.isPending,onSubmit:g=>{if(g.preventDefault(),!(!o||!u||f.isPending)){if(o!==u){Ft.error(t("dataExport.passphraseMismatch"));return}f.mutate({passphrase:o})}},children:[v.jsxs(Ji,{children:[v.jsx(Wi,{children:t("dataExport.title")}),v.jsx(xs,{children:t("dataExport.description")})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Ws,{htmlFor:i,children:t("dataExport.passphrase")}),v.jsx(mv,{id:i,autoComplete:"new-password",required:!0,value:o,disabled:f.isPending,onChange:g=>l(g.target.value)})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Ws,{htmlFor:s,children:t("dataExport.confirmPassphrase")}),v.jsx(mv,{id:s,autoComplete:"new-password",required:!0,value:u,disabled:f.isPending,"aria-invalid":u.length>0&&o!==u,onChange:g=>d(g.target.value)})]}),v.jsxs("p",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[v.jsx(EL,{className:"size-4 shrink-0"}),v.jsx("span",{children:t("dataExport.passphraseHint")})]}),v.jsxs(bs,{children:[v.jsx(nt,{type:"button",variant:"ghost",disabled:f.isPending,onClick:e,children:t("common.cancel")}),v.jsxs(nt,{type:"submit",disabled:!o||!u||f.isPending,children:[f.isPending?v.jsx(Vr,{className:"animate-spin"}):v.jsx(AT,{}),v.jsx("span",{children:t(f.isPending?"dataExport.exporting":"dataExport.action")})]})]})]}),v.jsxs(kd,{disabled:f.isPending,render:v.jsx(nt,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[v.jsx(ta,{}),v.jsx("span",{className:"sr-only",children:t("a11y.close")})]})]})})}function EV({disabled:e=!1}){const{t}=pt(),[i,s]=b.useState(!1);return v.jsxs(Za,{label:t("settings.export"),children:[v.jsxs(nt,{type:"button",variant:"outline",disabled:e,onClick:()=>s(!0),children:[v.jsx(AT,{}),t("settings.export")]}),i&&v.jsx(wV,{onClose:()=>s(!1)})]})}class ex extends Error{constructor(t){super(t),this.code=t}code}async function CV(e,t){const i=await fetch("/api/data-import",{method:"POST",headers:{"content-type":"application/octet-stream","x-foundry-passphrase":encodeURIComponent(t)},body:e});return await OM(i),i.json()}async function RV(e){const t=await fetch("/api/data-import/agents",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});await OM(t)}async function OM(e){if(e.ok)return;let t="IMPORT_FAILED";try{const s=(await e.json()).error?.code;(s==="INVALID_BACKUP"||s==="INVALID_PASSPHRASE"||s==="IMPORT_CHANGED"||s==="AGENT_APPLY_FAILED")&&(t=s)}catch{}throw new ex(t)}function TV({file:e,onClose:t}){const{t:i}=pt(),s=b.useId(),[o,l]=b.useState(""),u=er({mutationFn:()=>CV(e,o),onSuccess:()=>l(""),onError:h=>Ft.error(i(ky(h)))}),d=er({mutationFn:h=>RV({apply:h,agentRevision:u.data.agentRevision}),onSuccess:()=>location.replace(`${location.pathname}${location.search}`),onError:h=>Ft.error(i(ky(h)))}),f=u.isPending||d.isPending||d.isSuccess,g=d.error instanceof ex&&d.error.code==="IMPORT_CHANGED",m=()=>{f||(g?location.replace(`${location.pathname}${location.search}`):u.isSuccess?d.mutate(!1):t())};return v.jsx(Cs,{open:!0,onOpenChange:h=>{h||m()},children:v.jsxs(Rs,{showCloseButton:!1,children:[u.isSuccess?v.jsxs("div",{className:"flex flex-col gap-4","aria-busy":f,children:[v.jsxs(Ji,{children:[v.jsx(Wi,{children:i("dataImport.applyTitle")}),v.jsx(xs,{children:i("dataImport.applyDescription")})]}),d.isError&&v.jsx("p",{role:"alert",className:"text-sm text-destructive",children:i(ky(d.error))}),v.jsxs(bs,{children:[v.jsx(nt,{type:"button",variant:"ghost",disabled:f,onClick:m,children:i("dataImport.skipAgents")}),v.jsxs(nt,{type:"button",disabled:f||g,onClick:()=>d.mutate(!0),children:[d.isPending&&v.jsx(Vr,{className:"animate-spin"}),v.jsx("span",{children:i("dataImport.applyAgents")})]})]})]}):v.jsxs("form",{className:"flex flex-col gap-4","aria-busy":f,onSubmit:h=>{h.preventDefault(),!f&&o&&u.mutate()},children:[v.jsxs(Ji,{children:[v.jsx(Wi,{children:i("dataImport.title")}),v.jsx(xs,{className:"break-all",children:e.name})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Ws,{htmlFor:s,children:i("dataImport.passphrase")}),v.jsx(mv,{id:s,autoComplete:"current-password",required:!0,value:o,disabled:f,onChange:h=>l(h.target.value)})]}),v.jsx("p",{className:"text-xs text-muted-foreground",children:i("dataImport.replaceWarning")}),v.jsxs(bs,{children:[v.jsx(nt,{type:"button",variant:"ghost",disabled:f,onClick:m,children:i("common.cancel")}),v.jsxs(nt,{type:"submit",variant:"destructive",disabled:f||!o,children:[f?v.jsx(Vr,{className:"animate-spin"}):v.jsx(kT,{}),v.jsx("span",{children:i("dataImport.replaceAction")})]})]})]}),v.jsxs(nt,{type:"button",disabled:f,onClick:m,variant:"ghost",size:"icon",className:"absolute top-2 right-2",children:[v.jsx(ta,{}),v.jsx("span",{className:"sr-only",children:i("a11y.close")})]})]})})}function ky(e){if(e instanceof ex)switch(e.code){case"IMPORT_CHANGED":return"dataImport.changed";case"AGENT_APPLY_FAILED":return"dataImport.applyError";case"INVALID_BACKUP":return"dataImport.invalidBackup";case"INVALID_PASSPHRASE":return"dataImport.invalidPassphrase"}return"dataImport.error"}function kV({disabled:e=!1}){const{t}=pt(),i=b.useRef(null),[s,o]=b.useState(null);return v.jsxs(Za,{label:t("settings.import"),children:[v.jsx("input",{ref:i,type:"file",accept:".foundry-backup,application/octet-stream",hidden:!0,onChange:l=>{o(l.target.files?.[0]??null),l.target.value=""}}),v.jsxs(nt,{type:"button",variant:"outline",disabled:e,onClick:()=>i.current?.click(),children:[v.jsx(kT,{}),t("settings.import")]}),s&&v.jsx(TV,{file:s,onClose:()=>o(null)})]})}const OV="data-checked",AV="data-unchecked",yv={checked(e){return e?{[OV]:""}:{[AV]:""}},...ws,...hc},AM=b.createContext(void 0);function MV(){return b.useContext(AM)}const MM=b.createContext(void 0);function NV(){const e=b.useContext(MM);if(e===void 0)throw new Error(gn(52));return e}const DV=b.forwardRef(function(t,i){const{render:s,className:o,disabled:l=!1,readOnly:u=!1,required:d=!1,"aria-labelledby":f,value:g,inputRef:m,nativeButton:h=!1,id:x,style:S,...w}=t,R=MV(),{disabled:E,readOnly:C,required:O,form:k,checkedValue:A,touched:N=!1,validation:j,name:D,setCheckedValue:M=En,setTouched:_=En,registerInputRef:L=En}=R??{},{setTouched:q,setFilled:X,state:B,disabled:H}=ia(),U=lA(),{labelId:z,getDescriptionProps:Q}=Go(),$=H||U.disabled||E||l,K=C||u,Y=O||d,ee=k,G=R?A===g:g==="",oe=b.useRef(null),I=bd($,oe),V=b.useRef(null),W=j?.registerInput,re=b.useCallback(Ze=>W?.(Ze,{controlRef:oe,value:void 0}),[W]),Ee=ei(m,V,L,re);_e(()=>{V.current?.checked&&X(!0)},[X]),_e(()=>{if(V.current){if($&&G){L(null);return}L(V.current)}},[G,$,L]);const le=ar(),me=pc({id:x}),ge=h?void 0:me,ue=_b(f,z,V,!h,ge,w["aria-label"]),Te={role:"radio","aria-checked":G,"aria-labelledby":ue,[Jb]:G?"":void 0,id:h?me:le,onKeyDown(Ze){Ze.key==="Enter"&&Ze.preventDefault()},onClick(Ze){if(Ze.defaultPrevented||$||K)return;Ze.preventDefault();const ot=V.current;ot&&Do(ot,Ze)},onFocus(Ze){I(!0),!(Ze.defaultPrevented||$||K||!N)&&(V.current?.click(),_(!1))},onBlur(){R||I(!1)}},{getButtonProps:ve,buttonRef:Pe}=vi({disabled:$,native:h,composite:!1}),Oe={type:"radio",ref:Ee,form:ee,id:ge,name:D,tabIndex:-1,style:D?Tp:rd,"aria-hidden":!0,...g!==void 0?{value:rp(g)}:Xt,disabled:$,checked:G,required:Y,readOnly:K,onChange(Ze){if(Ze.nativeEvent.defaultPrevented||$||K||g===void 0)return;const ot=ut(Dr,Ze.nativeEvent);M(g,ot),!ot.isCanceled&&q(!0)},onClick(Ze){Ze.stopPropagation()},onFocus(){oe.current?.focus()}},Le=b.useMemo(()=>({...B,required:Y,disabled:$,readOnly:K,checked:G}),[B,$,K,G,Y]),Ve=Le,ke=R!==void 0,Ue=[i,oe,Pe],be=[Te,w,ve,Q,j?Ze=>j.getValidationProps($,Ze):Xt],He=kt("span",t,{enabled:!ke,state:Le,ref:Ue,props:be,stateAttributesMapping:yv});return v.jsxs(MM.Provider,{value:Ve,children:[ke?v.jsx(Pb,{tag:"span",render:s,className:o,style:S,state:Le,refs:Ue,props:be,stateAttributesMapping:yv}):He,v.jsx("input",{...Oe,suppressHydrationWarning:!0})]})}),jV=b.forwardRef(function(t,i){const{render:s,className:o,style:l,keepMounted:u=!1,...d}=t,f=NV(),g=f.checked,{mounted:m,transitionStatus:h,setMounted:x}=Uo(g),S={...f,transitionStatus:h},w=b.useRef(null),R=u||m,E=kt("span",t,{ref:[i,w],state:S,props:d,stateAttributesMapping:yv});return Li({batch:!0,enabled:!g,open:g,ref:w,onComplete(){g||x(!1)}}),R?E:null}),IV=[jk],PV=b.forwardRef(function(t,i){const{render:s,className:o,disabled:l,readOnly:u,required:d,onValueChange:f,value:g,defaultValue:m,form:h,name:x,inputRef:S,id:w,style:R,...E}=t,{setTouched:C,setFocused:O,validationMode:k,name:A,disabled:N,state:j,validation:D,setDirty:M,setFilled:_,validityData:L}=ia(),{labelId:q}=Go(),{clearErrors:X,elementRef:B}=vd(),H=gH(!0),U=N||l,z=A??x,Q=ar(w),[$,K]=Js({controlled:g,default:m,name:"RadioGroup",state:"value"}),[Y,ee]=b.useState(!1),G=Be((Oe,Le)=>{f?.(Oe,Le),!Le.isCanceled&&K(Oe)}),oe=D.getInputControl,I=b.useMemo(()=>({get current(){return oe()}}),[oe]),V=b.useRef(null),W=b.useRef(null),re=ei(V,S),Ee=b.useRef(re),le=Be(Oe=>{V.current===Oe&&Ee.current===re||(Ee.current=re,re?.(Oe))});_e(()=>{le(V.current)},[re,le]);const me=Be(Oe=>{if(Oe){if(!Oe.disabled){W.current||(W.current=Oe);const Le=V.current;(Oe.checked||Le==null||Le.disabled)&&le(Oe)}return()=>{W.current===Oe&&(W.current=null),V.current===Oe&&le(null)}}}),ge=Be(()=>{const Oe=B.current;if(!Oe)return $??null;for(const Le of D.registeredInputs.keys())if(Le.checked&&xH(Le,Oe))return $??null;return null});xd(I,Q,$??null,ge,!U,x),cc($,()=>{X(z),M($!==L.initialValue),_($!=null),D.change($);const Oe=W.current;$==null&&Oe&&!Oe.disabled&&le(Oe)});const ue=q??H?.legendId,Te={...j,disabled:U??!1,required:d??!1,readOnly:u??!1},ve=b.useMemo(()=>({checkedValue:$,disabled:U,form:h,validation:D,name:z,readOnly:u,registerInputRef:me,required:d,setCheckedValue:G,setTouched:ee,touched:Y}),[$,U,h,D,z,u,me,d,G,ee,Y]),Pe={id:w,role:"radiogroup","aria-required":d||void 0,"aria-disabled":U||void 0,"aria-readonly":u||void 0,"aria-labelledby":ue,onBlur(Oe){st(Oe.currentTarget,Oe.relatedTarget)||(ee(!1),C(!0),O(!1),k==="onBlur"&&D.commit($))},onKeyDownCapture(Oe){Oe.key.startsWith("Arrow")&&ee(!0)}};return v.jsx(AM.Provider,{value:ve,children:v.jsx(EM,{render:s,className:o,style:R,state:Te,props:[Pe,E,Oe=>D.getValidationProps(U??!1,Oe)],refs:[i],stateAttributesMapping:hc,enableHomeAndEndKeys:!1,modifierKeys:IV})})});function LV({className:e,...t}){return v.jsx(PV,{"data-slot":"radio-group",className:Fe("grid w-full gap-3",e),...t})}function zV({className:e,...t}){return v.jsx(DV,{"data-slot":"radio-group-item",className:Fe("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),...t,children:v.jsx(jV,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:v.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 _V=[{value:"system",labelKey:"common.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function UV({value:e,onValueChange:t,disabled:i=!1}){const{t:s}=pt();return v.jsx(Za,{label:s("settings.colorTheme"),children:v.jsx(LV,{"aria-label":s("settings.colorTheme"),value:e,onValueChange:t,disabled:i,"aria-busy":i,className:"flex w-auto flex-row flex-wrap items-center gap-x-6 gap-y-2",children:_V.map(o=>v.jsxs("label",{className:Fe("flex items-center gap-2 text-sm select-none",o.value===e?"font-medium text-foreground":"text-muted-foreground",i?"cursor-not-allowed opacity-60":"cursor-pointer"),children:[v.jsx(zV,{value:o.value,disabled:i}),v.jsx("span",{children:s(o.labelKey)})]},o.value))})})}function HV(e){const t=b.useRef(!0);t.current&&(t.current=!1,e())}const NM=b.createContext(void 0),DM=b.createContext(void 0);function ks(){const e=b.useContext(NM);if(e===void 0)throw new Error(gn(60));return e}function jM(){const e=b.useContext(DM);if(e===void 0)throw new Error(gn(61));return e}function FV(e,t,i=Object.is){const{length:s}=e;if(s!==t.length)return!1;for(let o=0;o<s;o+=1)if(!i(e[o],t[o]))return!1;return!0}const IM=(e,t)=>Object.is(e,t);function _o(e,t,i){return e==null||t==null?Object.is(e,t):i(e,t)}function BV(e,t,i){return Array.isArray(e)&&Array.isArray(t)?!FV(e,t,(s,o)=>_o(s,o,i)):e!==t}function vv(e,t,i){return e?e.some(s=>s===void 0?!1:_o(t,s,i)):!1}function Lh(e,t,i){return e?e.findIndex(s=>s===void 0?!1:_o(s,t,i)):-1}function VV(e,t){if(t!==IM)return s=>vv(e,s,t);const i=new Set(e);return i.delete(void 0),s=>i.has(s)&&(s!==0||e.some(o=>Object.is(s,o)))}function PM(e,t,i,s){const o=s&&Array.isArray(t)?e.findIndex(VV(t,i)):Lh(e,t,i);return o===-1?null:o}function KV(e,t,i,s,o,l){return vv(s,t,o)?l!=null&&e>l&&vv(s,i[l],o)?l:e:e===l?PM(i,s,o,!0):l}function qV(e,t,i){return e.filter(s=>!_o(t,s,i))}const YV={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:t,multiple:i,itemToStringValue:s}=e;return t==null?!1:i&&Array.isArray(t)?t.length>0:Hl(t,s)!==""},hasNullItemLabel:(e,t)=>t?rH(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,t)=>e.activeIndex===t,isSelected:(e,t)=>{const i=e.isItemEqualToValue,s=e.value;return e.multiple?Array.isArray(s)&&s.some(o=>_o(t,o,i)):_o(t,s,i)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,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 Cu(e,t=Number.MIN_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,i))}const Gi=1;function tx(e,t){return Math.max(0,e-t)}function hp(e,t){if(t<=0)return 0;const i=Cu(e,0,t),s=i,o=t-i,l=s<=Gi,u=o<=Gi;return l&&u?s<=o?0:t:l?0:u?t:i}function GV(e){const{id:t,value:i,defaultValue:s=null,onValueChange:o,open:l,defaultOpen:u=!1,onOpenChange:d,name:f,form:g,autoComplete:m,disabled:h=!1,readOnly:x=!1,required:S=!1,modal:w=!0,actionsRef:R,inputRef:E,onOpenChangeComplete:C,items:O,multiple:k=!1,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:j=IM,highlightItemOnHover:D=!0,children:M}=e,{clearErrors:_}=vd(),{setDirty:L,setTouched:q,setFocused:X,validityData:B,setFilled:H,name:U,disabled:z,validation:Q,validationMode:$}=ia(),K=pc({id:t}),Y=z||h,ee=U??f,[G,oe]=Js({controlled:i,default:k?s??$i:s,name:"Select",state:"value"}),[I,V]=Js({controlled:l,default:u,name:"Select",state:"open"}),W=b.useRef([]),re=b.useRef([]),Ee=b.useRef(null),le=b.useRef(null),me=b.useRef(0),ge=b.useRef(null),ue=b.useRef([]),Te=b.useRef(!1),ve=b.useRef(null),Pe=b.useRef(null),Oe=b.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Le=b.useRef(!1),Ve=b.useRef(G),{openMethod:ke,triggerProps:Ue}=Ok(I),be=tr(()=>new oc({id:K,labelId:void 0,modal:w,multiple:k,disabled:Y,readOnly:x,required:S,highlightItemOnHover:D,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:j,value:G,open:I,mounted:I,transitionStatus:void 0,items:O,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Xt,triggerProps:Xt,itemRoot:{props:Xt,multiple:k,disabled:Y,readOnly:x,isItemEqualToValue:j},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:En,setOpen:En,handleScrollArrowVisibility:En,onOpenChangeComplete:En,listRef:W,popupRef:Ee,scrollHandlerRef:le,scrollArrowsMountedCountRef:me,valueRef:ge,valuesRef:ue,labelsRef:re,typingRef:Te,selectionRef:Oe,firstItemTextRef:ve,selectedItemTextRef:Pe,alignItemWithTriggerActiveRef:Le,initialValueRef:Ve},YV)).current,[He,Ze]=b.useState(!1),{mounted:ot,transitionStatus:de,forceUnmount:we}=PR({open:I,ref:Ee,preventUnmountOnClose:He,setPreventUnmountOnClose:Ze,onUnmount(){be.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),C?.(!1)}}),Ge=be.useState("activeIndex"),Me=be.useState("selectedIndex"),De=be.useState("triggerElement"),bt=be.useState("positionerElement"),dt=V3(ke),gt=ke??dt,Nt=b.useMemo(()=>k?"":Hl(G,N),[k,G,N]),jt=b.useMemo(()=>k&&Array.isArray(G)?G.map(F=>Hl(F,N)):Hl(G,N),[k,G,N]),tn=Ln(De),an=Be(()=>jt);xd(tn,K,G,an,!Y,f);const nn=k?Array.isArray(G)&&G.length>0:G!=null&&Nt!=="";_e(()=>{H(nn)},[nn,H]),_e(function(){const J=PM(ue.current,G,j,k);J===null&&(Pe.current=null),!I&&be.set("selectedIndex",J)},[k,I,G,j,be]),cc(G,()=>{_(ee),L(BV(G,B.initialValue,j)),Q.change(G)});const We=Be((F,J)=>{const ne=J,ye=Lp(ne);d?.(F,ne),!J.isCanceled&&(F||Ze(ye()),V(F),!F&&(J.reason===Fa||J.reason===Rp)&&(q(!0),X(!1),$==="onBlur"&&Q.commit(G)))});b.useImperativeHandle(R,()=>({unmount:we,close:()=>{be.state.open&&We(!1,ut(nd))}}),[we,We,be]);const wt=Be((F,J)=>{o?.(F,J),!J.isCanceled&&oe(F)}),Zt=Be(F=>{const J=tx(F.scrollHeight,F.clientHeight),ne=hp(F.scrollTop,J),ye=ne>0,xe=ne<J;be.set("scrollUpArrowVisible",ye),be.set("scrollDownArrowVisible",xe)}),ht=RI({open:I,onOpenChange:We,elements:{reference:De,floating:bt}}),xt=Dp(ht,{enabled:!Y,event:"mousedown"}),yt=id(ht),Ut=KR(ht,{enabled:!Y,listRef:W,activeIndex:Ge,selectedIndex:Me,disabledIndices:$i,onNavigate(F){F===null&&!I||be.set("activeIndex",F)},focusItemOnHover:D}),un=qR(ht,{enabled:!Y&&(I||!x&&!k),listRef:re,activeIndex:Ge,selectedIndex:Me,disabledIndices:F=>nA(W.current[F]),onMatch(F){I?be.set("activeIndex",F):wt(ue.current[F],ut(Dr))},onTyping(F){Te.current=F}}),je=b.useMemo(()=>Mr(un.reference,Ut.reference,yt.reference,xt.reference,Ue),[xt.reference,un.reference,Ut.reference,yt.reference,Ue]),at=b.useMemo(()=>Mr(sd,un.floating,Ut.floating,yt.floating),[un.floating,Ut.floating,yt.floating]),Ie=Ut.item??Xt,ze=b.useMemo(()=>({props:Ie,multiple:k,disabled:Y,readOnly:x,isItemEqualToValue:j}),[Ie,k,Y,x,j]);be.useContextCallback("setValue",wt),be.useContextCallback("setOpen",We),be.useContextCallback("handleScrollArrowVisibility",Zt),be.useContextCallback("onOpenChangeComplete",C),HV(()=>{be.update({popupProps:at,triggerProps:je,itemRoot:ze})}),be.useSyncedValues({id:K,modal:w,multiple:k,disabled:Y,readOnly:x,required:S,highlightItemOnHover:D,value:G,open:I,mounted:ot,transitionStatus:de,popupProps:at,triggerProps:je,itemRoot:ze,items:O,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:j,openMethod:gt});const $e=ei(E,Q.inputRef),et=k?void 0:ee,Tt=b.useMemo(()=>!k||!Array.isArray(G)||!ee?null:G.map(F=>{const J=Hl(F,N);return v.jsx("input",{type:"hidden",form:g,name:ee,value:J,disabled:Y},J)}),[k,G,g,ee,N,Y]);return v.jsxs(NM.Provider,{value:be,children:[v.jsx(DM.Provider,{value:ht,children:M}),v.jsx("input",{...Q.getValidationProps(Y,{onFocus(){be.state.triggerElement?.focus({focusVisible:!0})},onChange(F){if(F.nativeEvent.defaultPrevented||Y||x)return;const J=F.currentTarget.value,ne=ut(Dr,F.nativeEvent);function ye(){if(k)return;const xe=J.toLowerCase();let qe=ue.current.findIndex(Xe=>Hl(Xe,N).toLowerCase()===xe||iA(Xe,A).toLowerCase()===xe);qe===-1&&(qe=ue.current.findIndex((Xe,Qe)=>{const lt=re.current[Qe];return lt!=null&<.toLowerCase()===xe}));const Ke=ue.current[qe];Ke!=null&&wt(Ke,ne)}be.set("forceMount",!0),queueMicrotask(ye)}}),id:K&&et==null?`${K}-hidden-input`:void 0,form:g,name:et,autoComplete:m,value:Nt,disabled:Y,required:S&&!(k&&nn),readOnly:x,ref:$e,style:ee?Tp:rd,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Tt]})}function $V(e,t){return e??t}const QV="data-popup-side",XV=400,ZV={..._u,...hc,popupSide:e=>e?{[QV]:e}:null,value:()=>null},JV=b.forwardRef(function(t,i){const{render:s,className:o,id:l,disabled:u=!1,nativeButton:d=!0,style:f,...g}=t,{setTouched:m,validationMode:h,validation:x,state:S,disabled:w}=ia(),{labelId:R}=Go(),E=ks(),C=E.useState("readOnly"),O=E.useState("required"),k=E.useState("disabled"),A=w||k||u,N=E.useState("open"),j=E.useState("mounted"),D=E.useState("value"),M=E.useState("triggerProps"),_=E.useState("positionerElement"),L=E.useState("listElement"),q=E.useState("popupSide"),X=E.useState("id"),B=E.useState("labelId"),H=E.useState("hasSelectedValue"),U=j&&_?q:null,z=l??X,Q=$V(R,B);pc({id:l});const $=Ln(_),K=b.useRef(null),Y=bd(A,K),{getButtonProps:ee,buttonRef:G}=vi({disabled:A,native:d}),oe=E.useStateSetter("triggerElement"),I=Un(),V=Un(),W=Un();b.useEffect(()=>{if(N)return W.start(XV,()=>{E.context.selectionRef.current.allowUnselectedMouseUp=!0,E.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{W.clear()};E.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},V.clear()},[N,E,V,W]);const re=Mr(M,{id:z,role:"combobox","aria-expanded":N,"aria-haspopup":"listbox","aria-controls":N?L?.id??Uh(_)?.id:void 0,"aria-labelledby":Q,"aria-readonly":C||void 0,"aria-required":O||void 0,tabIndex:A?-1:0,onFocus(me){Y(!0),N&&E.context.alignItemWithTriggerActiveRef.current&&E.context.setOpen(!1,ut(Dr,me.nativeEvent)),I.start(0,()=>{E.set("forceMount",!0)})},onBlur(me){st(_,me.relatedTarget)||(m(!0),Y(!1),h==="onBlur"&&x.commit(D))},onMouseDown(me){if(N)return;const ge=Qt(me.currentTarget);function ue(Te){if(!K.current)return;const ve=Te.target;st(K.current,ve)||st($.current,ve)||tA(Te,K.current)||E.context.setOpen(!1,ut(Mv,Te))}V.start(0,()=>{ge.addEventListener("mouseup",ue,{once:!0})})}},g,ee),Ee=x.getValidationProps(A,re);Ee.role="combobox";const le={...S,open:N,disabled:A,value:D,readOnly:C,popupSide:U,placeholder:!H};return kt("button",t,{ref:[i,K,G,oe],state:le,stateAttributesMapping:ZV,props:Ee})}),WV={value:()=>null},eK=b.forwardRef(function(t,i){const{className:s,render:o,children:l,placeholder:u,style:d,...f}=t,g=ks(),m=g.useState("value"),h=g.useState("items"),x=g.useState("itemToStringLabel"),S=g.useState("hasSelectedValue"),w=!S&&u!=null&&l==null,R=g.useState("hasNullItemLabel",w),E={value:m,placeholder:!S};let C=null;return typeof l=="function"?C=l(m):l!=null?C=l:w&&!R?C=u:Array.isArray(m)?C=iH(m,h,x):C=sA(m,h,x),kt("span",t,{state:E,ref:[i,g.context.valueRef],props:[{children:C},f],stateAttributesMapping:WV})}),tK=b.forwardRef(function(t,i){const{render:s,className:o,style:l,...u}=t,g={open:ks().useState("open")};return kt("span",t,{state:g,ref:i,props:[{"aria-hidden":!0,children:"▼"},u],stateAttributesMapping:Ep})}),nK=b.forwardRef(function(t,i){const s=ks(),o=s.useState("mounted"),l=s.useState("forceMount");return o||l?v.jsx(Mp,{ref:i,...t}):null}),LM=b.createContext(void 0);function nx(){const e=b.useContext(LM);if(!e)throw new Error(gn(59));return e}function pp(e,t){e&&Object.assign(e.style,t)}const zM={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},rK={position:"fixed"},iK=b.forwardRef(function(t,i){const{anchor:s,className:o,render:l,positionMethod:u,side:d,align:f,sideOffset:g,alignOffset:m,collisionBoundary:h="clipping-ancestors",collisionPadding:x,arrowPadding:S,sticky:w,disableAnchorTracking:R,alignItemWithTrigger:E=!0,collisionAvoidance:C=RR,style:O,...k}=t,A=ks(),N=jM(),j=A.useState("open"),D=A.useState("mounted"),M=A.useState("modal"),_=A.useState("value"),L=A.useState("openMethod"),q=A.useState("positionerElement"),X=A.useState("triggerElement"),B=A.useState("isItemEqualToValue"),H=A.useState("transitionStatus"),U=b.useRef(null),z=b.useRef(null),[Q,$]=b.useState(E),K=D&&Q&&L!=="touch";!D&&Q!==E&&$(E),b.useImperativeHandle(A.context.alignItemWithTriggerActiveRef,()=>K),cb((K||M)&&j,L==="touch",q,X);const Y=Gp({anchor:s,floatingRootContext:N,positionMethod:u,mounted:D,side:d,sideOffset:g,align:f,alignOffset:m,arrowPadding:S,collisionBoundary:h,collisionPadding:x,sticky:w,disableAnchorTracking:R??K,collisionAvoidance:C,keepMounted:!0}),ee=K?"none":Y.side,G=K?rK:Y.positionerStyles,oe={open:j,side:ee,align:Y.align,anchorHidden:Y.anchorHidden};_e(()=>{A.set("popupSide",Y.side)},[A,Y.side]);const I=A.useStateSetter("positionerElement"),V=$p(t,oe,{styles:G,transitionStatus:H,props:k,refs:[i,I],hidden:!D,inert:!j}),W=b.useRef(0),re=Be(le=>{if(A.context.valuesRef.current.length===0)return;const me=W.current;W.current=le.size;const ge=ut(Dr);if(me!==0&&!A.state.multiple&&_!==null&&Lh(A.context.valuesRef.current,_,B)===-1){const Te=A.context.initialValueRef.current,Pe=Te!=null&&Lh(A.context.valuesRef.current,Te,B)!==-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(_)){const ue=_.filter(Te=>Lh(A.context.valuesRef.current,Te,B)!==-1);ue.length!==_.length&&(A.context.setValue(ue,ge),ue.length===0&&(A.set("selectedIndex",null),A.context.selectedItemTextRef.current=null))}if(j&&K){A.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ue={height:""};pp(q,ue),pp(A.context.popupRef.current,ue)}}),Ee=b.useMemo(()=>({...Y,side:ee,alignItemWithTriggerActive:K,setControlledAlignItemWithTrigger:$,scrollUpArrowRef:U,scrollDownArrowRef:z}),[Y,ee,K,$]);return v.jsx(Ib,{elementsRef:A.context.listRef,labelsRef:A.context.labelsRef,onMapChange:re,children:v.jsxs(LM.Provider,{value:Ee,children:[D&&M&&v.jsx(eg,{inert:Qp(!j),cutout:X}),V]})})}),bh="base-ui-disable-scrollbar",bv={className:bh,getElement(e){return v.jsx("style",{nonce:e,href:bh,precedence:"base-ui:low",children:`.${bh}{scrollbar-width:none}.${bh}::-webkit-scrollbar{display:none}`})}},sK=b.createContext(void 0),aK={disableStyleElements:!1};function oK(){return b.useContext(sK)??aK}const _C="--transform-origin",lK={...Wu,...ws},cK=b.forwardRef(function(t,i){const{render:s,className:o,style:l,finalFocus:u,...d}=t,f=ks(),g=f.useState("multiple"),m=f.useState("readOnly"),h=f.useState("highlightItemOnHover"),x=jM(),{side:S,align:w,alignItemWithTriggerActive:R,isPositioned:E,setControlledAlignItemWithTrigger:C}=nx(),O=ng()!=null,k=Yp(),{nonce:A,disableStyleElements:N}=oK(),j=f.useState("id"),D=f.useState("open"),M=f.useState("openMethod"),_=f.useState("mounted"),L=f.useState("popupProps"),q=f.useState("transitionStatus"),X=f.useState("triggerElement"),B=f.useState("positionerElement"),H=f.useState("listElement"),U=b.useRef(!1),z=b.useRef(!1),Q=b.useRef({}),$=tc(),K=Be(oe=>{if(!B||!f.context.popupRef.current||!z.current)return;const I=B.style.top==="0px",V=B.style.bottom==="0px";if(U.current||!R||!I&&!V){f.context.handleScrollArrowVisibility(oe);return}const W=HC(B),re=Ru(B.getBoundingClientRect().height,"y",W),Ee=Qt(B),le=Cn(B),me=le.getComputedStyle(B),ge=parseFloat(me.marginTop),ue=parseFloat(me.marginBottom),Te=UC(le.getComputedStyle(f.context.popupRef.current)),ve=Math.min(Ee.documentElement.clientHeight-ge-ue,Te),Pe=oe.scrollTop,Oe=xh(oe);let Le=null;const Ve=He=>{B.style.height=`${He}px`},ke=I?Oe-Pe:Pe,Ue=Math.min(re+ke,ve);if(ke<=Gi){const He=Cu(ke,0,ve-re);He>0&&Ve(re+He),oe.scrollTop=I?Oe:0,ve-(re+He)<=Gi&&(U.current=!0),f.context.handleScrollArrowVisibility(oe);return}if(ve-Ue>Gi)Le=I?1/0:0;else if(V&&Pe<Oe){const He=re+ke-ve;Le=Pe-(ke-He)}const be=Math.ceil(Ue);if(be!==0&&Ve(be),Le!=null){const He=Cu(Le,0,xh(oe));Math.abs(oe.scrollTop-He)>Gi&&(oe.scrollTop=He)}be>=ve-Gi&&(U.current=!0),f.context.handleScrollArrowVisibility(oe)});b.useImperativeHandle(f.context.scrollHandlerRef,()=>K,[K]),Li({open:D,ref:f.context.popupRef,onComplete(){D&&f.context.onOpenChangeComplete(!0)}});const Y={open:D,transitionStatus:q,side:S,align:w};_e(()=>{!B||!f.context.popupRef.current||Object.keys(Q.current).length||(Q.current={top:B.style.top||"0",left:B.style.left||"0",right:B.style.right,height:B.style.height,bottom:B.style.bottom,minHeight:B.style.minHeight,maxHeight:B.style.maxHeight,marginTop:B.style.marginTop,marginBottom:B.style.marginBottom})},[f,B]),_e(()=>{D||R||(z.current=!1,U.current=!1,pp(B,Q.current))},[D,R,B]),_e(()=>{const oe=f.context.popupRef.current;if(!D||!X||!B||!oe||R&&!E||f.state.transitionStatus==="ending")return;if(z.current=!0,oe.style.removeProperty(_C),!R){$.request(()=>f.context.handleScrollArrowVisibility(H||oe));return}const I=uK(oe);try{let V=f.context.selectedItemTextRef.current;V?.isConnected||(V=!f.select("hasSelectedValue")&&f.context.firstItemTextRef.current?.isConnected?f.context.firstItemTextRef.current:null);const W=f.context.valueRef.current,re=Cn(B),Ee=re.getComputedStyle(B),le=re.getComputedStyle(oe),me=Qt(X),ge=HC(X),ue=Sh(X.getBoundingClientRect(),ge),Te=Sh(B.getBoundingClientRect(),ge),ve=ue.height,Pe=H||oe,Oe=Pe.scrollHeight,Le=parseFloat(le.borderBottomWidth),Ve=parseFloat(Ee.marginTop)||10,ke=parseFloat(Ee.marginBottom)||10,Ue=parseFloat(Ee.minHeight)||100,be=UC(le),He=5,Ze=5,ot=20,de=me.documentElement.clientHeight-Ve-ke,we=me.documentElement.clientWidth,Ge=de-ue.bottom+ve;let Me,De=k==="rtl"?ue.right-Te.width:ue.left,bt=0;if(V&&W){const ht=Sh(W.getBoundingClientRect(),ge);Me=Sh(V.getBoundingClientRect(),ge),De=Te.left+(k==="rtl"?ht.right-Me.right:ht.left-Me.left);const xt=ht.top-ue.top+ht.height/2;bt=Me.top-Te.top+Me.height/2-xt}const dt=Ge+bt+ke+Le;let gt=Math.min(de,dt);const Nt=de-Ve-ke,jt=dt-gt,tn=we-Ze;B.style.left=`${Cu(De,He,tn-Te.width)}px`,B.style.height=`${gt}px`,B.style.maxHeight="none",B.style.marginTop=`${Ve}px`,B.style.marginBottom=`${ke}px`,oe.style.height="100%";const an=xh(Pe),nn=jt>=an-Gi;nn&&(gt=Math.min(de,Te.height)-(jt-an));const We=ue.top<ot||ue.bottom>de-ot||Math.ceil(gt)+Gi<Math.min(Oe,Ue),wt=(re.visualViewport?.scale??1)!==1&&Ss;if(We||wt){pp(B,Q.current),C(!1);return}const Zt=Math.max(Ue,gt);if(nn){const ht=Math.max(0,de-dt);B.style.top=Te.height>=Nt?"0":`${ht}px`,B.style.height=`${gt}px`,Pe.scrollTop=xh(Pe)}else B.style.bottom="0",Pe.scrollTop=jt;if(Me){const ht=Te.top,xt=Te.height,yt=Me.top+Me.height/2,Ut=Cu(xt>0?(yt-ht)/xt*100:50,0,100);oe.style.setProperty(_C,`50% ${Ut}%`)}(Zt===de||gt>=be)&&(U.current=!0),f.context.handleScrollArrowVisibility(Pe),h&&f.state.selectedIndex===null&&f.state.activeIndex===null&&f.context.listRef.current[0]!=null&&f.set("activeIndex",0)}finally{I()}},[f,D,B,X,R,C,$,H,h,k,E]),b.useEffect(()=>{if(!R||!B||!D)return;const oe=Cn(B);function I(V){f.context.setOpen(!1,ut(d4,V))}return Lt(oe,"resize",I)},[f,R,B,D]);const ee={...H?{role:"presentation"}:{role:"listbox","aria-multiselectable":g||void 0,"aria-readonly":m||void 0,id:`${j}-list`},onKeyDown(oe){O&&ud.has(oe.key)&&oe.stopPropagation()},onScroll(oe){H||K(oe.currentTarget)},...R&&{style:H?{height:"100%"}:zM},className:!H&&R?bv.className:void 0},G=kt("div",t,{ref:[i,f.context.popupRef],state:Y,stateAttributesMapping:lK,props:[L,ee,od(q),d]});return v.jsxs(b.Fragment,{children:[!N&&bv.getElement(A),v.jsx(Np,{context:x,modal:!1,disabled:!_,openInteractionType:M,returnFocus:u,restoreFocus:!0,children:G})]})});function UC(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function xh(e){return tx(e.scrollHeight,e.clientHeight)}function HC(e){return ZR.getScale(e)}function Ru(e,t,i){return e/i[t]}function Sh(e,t){return Uu({x:Ru(e.x,"x",t),y:Ru(e.y,"y",t),width:Ru(e.width,"x",t),height:Ru(e.height,"y",t)})}const FC=[["transform","none"],["scale","1"],["translate","0 0"]];function uK(e){const{style:t}=e,i={};for(const[s,o]of FC)i[s]=t.getPropertyValue(s),t.setProperty(s,o,"important");return()=>{for(const[s]of FC){const o=i[s];o?t.setProperty(s,o):t.removeProperty(s)}}}const dK=b.forwardRef(function(t,i){const{render:s,className:o,style:l,...u}=t,d=ks(),f=d.useState("multiple"),g=d.useState("readOnly"),{alignItemWithTriggerActive:m}=nx(),h=d.useState("hasScrollArrows"),x=d.useState("openMethod"),w={id:`${d.useState("id")}-list`,role:"listbox","aria-multiselectable":f||void 0,"aria-readonly":g||void 0,onScroll(E){d.context.scrollHandlerRef.current?.(E.currentTarget)},...m&&{style:zM},className:h&&x!=="touch"?bv.className:void 0},R=d.useStateSetter("listElement");return kt("div",t,{ref:[i,R],props:[w,u]})}),_M=b.createContext(void 0);function UM(){const e=b.useContext(_M);if(!e)throw new Error(gn(57));return e}const fK=b.memo(b.forwardRef(function(t,i){const{render:s,className:o,style:l,value:u=null,label:d,disabled:f=!1,nativeButton:g=!1,...m}=t,h=b.useRef(null),x=hg({guess:!0,label:d,textRef:h}),S=ks(),{props:w,multiple:R,disabled:E,readOnly:C,isItemEqualToValue:O}=S.useState("itemRoot"),k=E||f,A=S.useState("isActive",x.index),N=S.useState("open"),j=S.useState("isSelected",u),D=S.useState("isSelectedByFocus",x.index),M=x.index,_=b.useRef(null);_e(()=>{const Y=S.context.valuesRef.current;return Y[M]=u,()=>{delete Y[M]}},[M,u,S]),_e(()=>{const Y=S.state.value,ee=S.state.selectedIndex;let G=ee,oe;R&&Array.isArray(Y)?(G=KV(M,u,S.context.valuesRef.current,Y,O,ee),oe=G===M,M===ee&&!oe&&(S.context.selectedItemTextRef.current=null)):(oe=Y!==void 0&&_o(u,Y,O),oe&&(G=M)),S.set("selectedIndex",G),oe&&h.current&&(S.context.selectedItemTextRef.current=h.current)},[M,R,O,S,u]);const L=b.useRef("mouse"),q=b.useRef(!1),{getButtonProps:X,buttonRef:B}=vi({disabled:k,focusableWhenDisabled:!0,native:g,composite:!0}),H={disabled:k,selected:j,highlighted:A};function U(Y){if(E||C)return;const ee=S.state.value;if(R){const G=Array.isArray(ee)?ee:[],oe=j?qV(G,u,O):[...G,u];S.context.setValue(oe,ut(No,Y))}else S.context.setValue(u,ut(No,Y)),S.context.setOpen(!1,ut(No,Y))}function z(){S.context.selectionRef.current.dragY=0}const Q={role:"option","aria-selected":j,tabIndex:N&&A?0:-1,onKeyDown(Y){S.set("activeIndex",M),Y.key===" "&&S.context.typingRef.current&&Y.preventDefault()},onClick(Y){const ee=L.current!=="touch",G=Y.nativeEvent.pointerType,oe=ee&&ec(Y.nativeEvent)&&(G!==void 0||A),I=ee&&!oe&&!q.current;q.current=!1,!(k||I)&&U(Y.nativeEvent)},onPointerEnter(Y){L.current=Y.pointerType},onPointerMove(Y){if(Y.pointerType==="mouse"&&Y.buttons===1){const ee=S.context.selectionRef.current;ee.dragY+=Y.movementY,ee.dragY**2>=64&&(ee.allowUnselectedMouseUp=!0)}},onPointerDown(Y){L.current=Y.pointerType,q.current=!0,z()},onMouseUp(){if(z(),k||L.current==="touch"||q.current)return;const Y=!S.context.selectionRef.current.allowSelectedMouseUp&&j,ee=!S.context.selectionRef.current.allowUnselectedMouseUp&&!j;Y||ee||(q.current=!0,_.current?.click(),q.current=!1)}},$=kt("div",t,{ref:[B,i,x.ref,_],state:H,props:[w,Q,m,X]}),K=b.useMemo(()=>({selected:j,index:M,textRef:h,selectedByFocus:D}),[j,M,h,D]);return v.jsx(_M.Provider,{value:K,children:$})})),hK=b.memo(b.forwardRef(function(t,i){const{render:s,className:o,style:l,keepMounted:u,selected:d,...f}=t,g=b.useRef(null),{transitionStatus:m,setMounted:h}=Uo(d),S=kt("span",t,{ref:[i,g],state:{selected:d,transitionStatus:m},props:[{"aria-hidden":!0,children:"✔️"},f],stateAttributesMapping:ws});return Li({batch:!0,enabled:!d,open:d,ref:g,onComplete(){d||h(!1)}}),S})),pK=b.forwardRef(function(t,i){const{selected:s}=UM();return t.keepMounted||s?v.jsx(hK,{...t,selected:s,ref:i}):null}),gK=b.memo(b.forwardRef(function(t,i){const{index:s,textRef:o,selectedByFocus:l}=UM(),u=ks(),{render:d,className:f,style:g,...m}=t,h=b.useCallback(S=>{S&&(s===0&&(u.context.firstItemTextRef.current=S),l&&(u.context.selectedItemTextRef.current=S))},[u,s,l]);return kt("div",t,{ref:[h,i,o],props:m})})),HM=b.forwardRef(function(t,i){const{render:s,className:o,style:l,direction:u,keepMounted:d,...f}=t,g=u==="up",m=ks(),{side:h,scrollDownArrowRef:x,scrollUpArrowRef:S}=nx(),w=g?"scrollUpArrowVisible":"scrollDownArrowVisible",R=m.useState(w),E=m.useState("openMethod"),C=R&&E!=="touch",O=Un(),k=g?S:x,{mounted:A,transitionStatus:N,setMounted:j}=Uo(C);_e(()=>(m.context.scrollArrowsMountedCountRef.current+=1,m.set("hasScrollArrows",!0),()=>{m.context.scrollArrowsMountedCountRef.current=Math.max(0,m.context.scrollArrowsMountedCountRef.current-1),m.context.scrollArrowsMountedCountRef.current===0&&m.set("hasScrollArrows",!1)}),[m]),Li({open:C,ref:k,onComplete(){C||j(!1)}});const _=kt("div",t,{ref:[i,k],state:{direction:u,visible:C,side:h,transitionStatus:N},props:[{"aria-hidden":!0,children:g?"▲":"▼",style:{position:"absolute"},onMouseMove(q){if(q.movementX===0&&q.movementY===0||O.isStarted())return;m.set("activeIndex",null);function X(){const B=m.state.listElement??m.context.popupRef.current;if(!B)return;m.set("activeIndex",null),m.context.handleScrollArrowVisibility(B);const H=tx(B.scrollHeight,B.clientHeight),U=hp(B.scrollTop,H),z=U===(g?0:H),Q=m.context.listRef.current;if(U!==B.scrollTop&&(B.scrollTop=U),z){O.clear();return}if(Q.length>0){const $=k.current?.offsetHeight||0;B.scrollTop=mK(Q,g,U,B.clientHeight,$,H)}O.start(40,X)}O.start(40,X)},onMouseLeave(){O.clear()}},f],stateAttributesMapping:ws});return A||d?_:null});function mK(e,t,i,s,o,l){if(t){let m=0;const h=i+o-Gi;for(let w=0;w<e.length;w+=1){const R=e[w];if(R&&R.offsetTop>=h){m=w;break}}const x=Math.max(0,m-1),S=e[x];return x<m&&S?hp(S.offsetTop-o,l):0}let u=e.length-1;const d=i+s-o+Gi;for(let m=0;m<e.length;m+=1){const h=e[m];if(h&&h.offsetTop+h.offsetHeight>d){u=Math.max(0,m-1);break}}const f=Math.min(e.length-1,u+1),g=e[f];return f>u&&g?hp(g.offsetTop+g.offsetHeight-s+o,l):l}const yK=b.forwardRef(function(t,i){return v.jsx(HM,{...t,ref:i,direction:"down"})}),vK=b.forwardRef(function(t,i){return v.jsx(HM,{...t,ref:i,direction:"up"})}),rx=GV;function ix({className:e,...t}){return v.jsx(eK,{"data-slot":"select-value",className:Fe("flex flex-1 text-left",e),...t})}function sx({className:e,size:t="default",children:i,...s}){return v.jsxs(JV,{"data-slot":"select-trigger","data-size":t,className:Fe("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),...s,children:[i,v.jsx(tK,{render:v.jsx(Zv,{className:"pointer-events-none size-3.5 text-muted-foreground"})})]})}function ax({className:e,children:t,side:i="bottom",sideOffset:s=4,align:o="center",alignOffset:l=0,alignItemWithTrigger:u=!0,...d}){return v.jsx(nK,{children:v.jsx(iK,{side:i,sideOffset:s,align:o,alignOffset:l,alignItemWithTrigger:u,className:"isolate z-50",children:v.jsxs(cK,{"data-slot":"select-content","data-align-trigger":u,className:Fe("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:[v.jsx(bK,{}),v.jsx(dK,{children:t}),v.jsx(xK,{})]})})})}function ox({className:e,children:t,...i}){return v.jsxs(fK,{"data-slot":"select-item",className:Fe("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),...i,children:[v.jsx(gK,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),v.jsx(pK,{render:v.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:v.jsx(ld,{className:"pointer-events-none"})})]})}function bK({className:e,...t}){return v.jsx(vK,{"data-slot":"select-scroll-up-button",className:Fe("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),...t,children:v.jsx(uL,{})})}function xK({className:e,...t}){return v.jsx(yK,{"data-slot":"select-scroll-down-button",className:Fe("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),...t,children:v.jsx(Zv,{})})}const FM=["en-US","zh-CN","zh-TW","ja-JP"],SK={"en-US":"English","zh-CN":"简体中文","zh-TW":"繁體中文","ja-JP":"日本語"},wK={"skills.invalidEntryName":"Enter a valid file or folder name without slashes.","skills.newEntry":"New","skills.newFile":"New file","skills.newFolder":"New folder","skills.fileActions":"Actions for {{path}}","skills.fileConflict":"A file or folder with this name already exists.","skills.fileOperationError":"Unable to update skill files. Please try again.","skills.deleteEntryDescription":"Remove <entryPath>{{path}}</entryPath> and its contents. Deletion takes effect when you save the skill.","skills.createEntryDescription":"Create in {{path}}. Enter a single file or folder name.","skills.entryName":"Name","skills.fileWorking":"Working…","skills.createEntry":"Create","skills.fileNotEditable":"This file is binary or exceeds the 2 MiB editing limit.","skills.fileLoadError":"Unable to load this file.","editor.loading":"Loading editor…","skills.saveContent":"Save","skills.contentSaving":"Saving…","skills.contentSaved":"Content saved.","skills.contentSaveError":"Unable to save content. Please try again.","skills.unsavedChanges":"Unsaved changes","skills.allChangesSaved":"All changes saved","skills.contentPlaceholder":"Write skill instructions in Markdown.","skills.fileEditor":"Edit {{file}}","skills.leaveTitle":"Discard unsaved changes?","skills.leaveDescription":"Your changes have not been saved. Save them before leaving, or discard them to continue.","skills.keepEditing":"Keep editing","skills.discardChanges":"Discard changes","skills.overview":"Overview","skills.files":"Files","skills.fileNavigation":"Skill files","skills.selectAria":"Select {{name}}","skills.selectAll":"Select all","skills.deselectAll":"Deselect all","skills.batch":"Batch","skills.batchAssigned":"Skill assignments updated.","skills.batchAssignPartial":"{{completed}} changes saved; {{failed}} failed. Retry to finish.","skills.unassign":"Unassign","skills.assign":"Assign","skills.assignTitle":"Assign {{name}}","skills.assignDialogTitle":"Assign <skillName>{{name}}</skillName>","skills.assignDescription":"Select agents to create skill links. Deselect an agent to remove its link. Changes apply immediately.","skills.assignAgentAria":"Assign {{name}} to {{agent}}","skills.assignmentError":"Unable to update skill assignment. Please try again.","skills.noAgents":"No agents available.","skills.linkConflict":"An unrelated skill entry exists in an agent folder. Resolve the conflict and retry.","skills.edit":"Edit","skills.editTitle":"Edit skill","skills.editDescription":"Update the name and description. Changes also sync to agents this skill is assigned to.","skills.saveChanges":"Save changes","skills.updating":"Saving…","skills.updated":"Skill updated.","skills.updateError":"Unable to update the skill. Please try again.","skills.delete":"Delete","skills.deleted":"Skill deleted.","skills.deleteError":"Unable to delete the skill. Please try again.","skills.deleteConfirmTitle":"Delete skill","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> and all files in its folder will be permanently deleted. The skill will also be removed from assigned agents.","skills.actionsAria":"Actions for {{name}}","nav.dashboard":"Dashboard","nav.library":"Library","nav.skills":"Skills","skills.name":"Name","skills.namePlaceholder":"e.g. knowledge-wiki","skills.nameHint":"Unique in your skill library. Use 1–64 Unicode letters or digits, lowercase where applicable, with single hyphens between words.","skills.description":"Description","skills.descriptionPlaceholder":"Describe when an agent should use this skill.","skills.create":"Create skill","skills.creating":"Creating…","skills.created":"Skill created.","skills.createError":"Unable to create the skill. Please try again.","skills.nameConflict":"A skill with this name already exists. Choose a different name.","skills.loadError":"Unable to load skills. Please try again.","skills.emptyTitle":"No skills yet","skills.emptyDescription":"Create a skill to start building your library.","skills.notFound":"Skill not found","skills.backToSkills":"Back to Skills","skills.content":"Content","skills.noContent":"No content yet","skills.new":"New skill","skills.createManually":"Create manually","skills.createManuallyDescription":"Start from a blank SKILL.md.","skills.importLocal":"Import from local","skills.importLocalDescription":"Pick one skill folder or one .skill / .zip archive.","skills.importing":"Importing…","skills.importSummary":"Imported {{imported}} skills; skipped {{skipped}}.","skills.importSkippedInvalid":"Invalid skill folder.","skills.importSkippedConflict":"Name already exists.","filePicker.selecting":"Selecting…","filePicker.error":"Unable to open the file picker. Please try again.","filePicker.unavailable":"Native file selection is unavailable on this computer.","filePicker.busy":"A file picker is already open.","skills.importReadError":"Unable to read the selected path. Check that it exists and is accessible.","skills.importInvalid":"Invalid skill.","skills.importInvalidSource":"Select one skill folder or one .skill / .zip archive.","skills.importSymlinkSource":"Symbolic-link skill sources are not supported. Select the original skill folder or archive.","skills.importMissingSkillMd":"The selected skill must contain SKILL.md at its root.","skills.importInvalidMetadata":"SKILL.md must be UTF-8 Markdown with a valid name and description in YAML frontmatter.","skills.importInvalidPath":"The skill contains an unsafe or conflicting file path.","skills.importDuplicatePath":"The skill contains duplicate file paths.","skills.importInvalidEncoding":"The skill contains a file with invalid encoding.","skills.importUnsupportedEntries":"The skill contains symbolic links or unsupported entries.","skills.importTooManyEntries":"A skill can contain at most 5,000 entries.","skills.importSkillMdTooLarge":"SKILL.md must be at most 2 MiB.","skills.importInvalidArchive":"The selected .skill or .zip archive is invalid.","skills.importNoSkills":"The source contains no skill folders.","skills.importTooLarge":"Skills must be at most 32 MiB.","skills.importNameConflict":"A skill with this name already exists. The existing skill was not overwritten.","skills.importError":"Unable to import the skill. Please try again.","skills.importUrl":"Import from URL","skills.importUrlDescription":"Fetch a published skill by URL.","skills.url":"URL","skills.importSubmit":"Import","skills.importUrlHint":"Enter a direct .skill, .zip, or SKILL.md file URL.","skills.importInvalidUrl":"Enter an HTTP or HTTPS URL without embedded credentials.","skills.importUnsupportedUrlFile":"Use a direct .skill, .zip, or SKILL.md file link. Folder and HTML pages are not supported.","skills.importDownloadFailed":"Unable to download the file. Check the URL and try again.","skills.importDownloadTimeout":"The download timed out. Try again or import the file locally.","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.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. Enabled agent files were synchronized.","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.deleteConfirmTitle":"Delete instruction?","instructions.deleteConfirmDescription":'"{{name}}" will be removed from the library and every agent. This cannot be undone.',"instructions.dragHint":"Drag an instruction to an agent","instructions.listAria":"Instructions","instructions.actionsAria":"Actions for {{name}}","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","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 replaces local settings, Instructions, Skills, and Agent configuration with this backup. Existing data will not be merged. Agent files and links are updated only if you choose Apply after import.","dataImport.applyTitle":"Import complete. Apply Agent configuration?","dataImport.applyDescription":"Apply the imported configuration to this machine’s Agent instructions and Skill links. Choosing not to apply clears Agent configuration in Foundry and leaves existing Agent files and links in place.","dataImport.skipAgents":"Do not apply","dataImport.applyAgents":"Apply configuration","dataImport.changed":"Agent configuration has changed since this import. Close this dialog to reload the current data.","dataImport.applyError":"Data was imported, but Agent configuration could not be applied. Check file access and Skill destination conflicts, then retry.","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","statusBar.foundry":"Foundry","statusBar.foundryVersion":"Foundry v{{version}}","statusBar.skill":"Skill","statusBar.skillStatus":"Foundry skill status","statusBar.skillChecking":"Checking skill…","statusBar.skillUnavailable":"Skill status unavailable","statusBar.skillRefreshHint":"Copy the command below into your terminal, or open <settings>Advanced settings</settings> to download the Skill again.","statusBar.copyCommand":"Copy command","statusBar.terminal":"Terminal","statusBar.targetAgents":"ChatGPT","statusBar.targetClaude":"Claude Code","statusBar.statusMissing":"Not installed","statusBar.statusOutdated":"Differs from the bundled skill","statusBar.statusCurrent":"Up to date","a11y.breadcrumb":"Breadcrumb","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"},EK={"skills.invalidEntryName":"请输入有效的文件或文件夹名称,不包含斜杠。","skills.newEntry":"新建","skills.newFile":"新增文件","skills.newFolder":"新增文件夹","skills.fileActions":"{{path}} 的操作","skills.fileConflict":"已存在同名文件或文件夹。","skills.fileOperationError":"无法修改技能文件,请重试。","skills.deleteEntryDescription":"移除 <entryPath>{{path}}</entryPath> 及其中的所有内容,保存技能后才会删除并同步到 Agent。","skills.createEntryDescription":"在 {{path}} 中创建,请输入单个文件或文件夹名称。","skills.entryName":"名称","skills.fileWorking":"处理中…","skills.createEntry":"创建","skills.fileNotEditable":"此文件为二进制文件,或超过 2 MiB 编辑上限。","skills.fileLoadError":"无法加载此文件。","editor.loading":"正在加载编辑器…","skills.saveContent":"保存","skills.contentSaving":"保存中…","skills.contentSaved":"内容已保存。","skills.contentSaveError":"无法保存内容,请重试。","skills.unsavedChanges":"未保存的修改","skills.allChangesSaved":"已全部保存","skills.contentPlaceholder":"使用 Markdown 编写技能指令。","skills.fileEditor":"编辑 {{file}}","skills.leaveTitle":"放弃未保存的修改?","skills.leaveDescription":"当前修改尚未保存。请先保存,或放弃修改后继续。","skills.keepEditing":"继续编辑","skills.discardChanges":"放弃修改","skills.overview":"概览","skills.files":"文件","skills.fileNavigation":"技能文件","skills.selectAria":"选择 {{name}}","skills.selectAll":"全选","skills.deselectAll":"取消全选","skills.batch":"批量操作","skills.batchAssigned":"技能分配已更新。","skills.batchAssignPartial":"{{completed}} 项更改已保存,{{failed}} 项失败,请重试以完成更改。","skills.unassign":"取消分配","skills.assign":"分配","skills.assignTitle":"分配 {{name}}","skills.assignDialogTitle":"分配 <skillName>{{name}}</skillName>","skills.assignDescription":"选择 Agent 创建技能链接,取消选择则解除链接。更改立即生效。","skills.assignAgentAria":"将 {{name}} 分配给 {{agent}}","skills.assignmentError":"无法更新技能分配,请重试。","skills.noAgents":"暂无可用的 Agent。","skills.linkConflict":"Agent 技能目录中存在同名的其他内容,请处理冲突后重试。","skills.edit":"修改","skills.editTitle":"修改技能","skills.editDescription":"更新名称和描述,已分配给 Agent 的技能也会同步更新。","skills.saveChanges":"保存修改","skills.updating":"保存中…","skills.updated":"技能已更新。","skills.updateError":"无法修改技能,请重试。","skills.delete":"删除","skills.deleted":"技能已删除。","skills.deleteError":"无法删除技能,请重试。","skills.deleteConfirmTitle":"删除技能","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> 及其文件夹中的所有文件将被永久删除。已分配给 Agent 的技能也会同步移除。","skills.actionsAria":"{{name}} 的操作","nav.dashboard":"仪表盘","nav.library":"资料库","nav.skills":"技能","skills.name":"名称","skills.namePlaceholder":"例如:knowledge-wiki","skills.nameHint":"名称在技能库中必须唯一。使用 1–64 个 Unicode 字母或数字,字母有大小写时使用小写,单个连字符可用于分隔单词。","skills.description":"描述","skills.descriptionPlaceholder":"描述 Agent 应在什么情况下使用此技能。","skills.create":"创建技能","skills.creating":"创建中…","skills.created":"技能已创建。","skills.createError":"无法创建技能,请重试。","skills.nameConflict":"已存在同名技能,请使用其他名称。","skills.loadError":"无法加载技能,请重试。","skills.emptyTitle":"暂无技能","skills.emptyDescription":"创建一个技能,开始构建你的技能库。","skills.notFound":"未找到技能","skills.backToSkills":"返回技能库","skills.content":"内容","skills.noContent":"暂无内容","skills.new":"新建技能","skills.createManually":"手动创建","skills.createManuallyDescription":"从空白的 SKILL.md 开始。","skills.importLocal":"从本地导入","skills.importLocalDescription":"选择一个技能文件夹或一个 .skill / .zip 压缩包。","skills.importing":"正在导入…","skills.importSummary":"已导入 {{imported}} 个技能,跳过 {{skipped}} 项。","skills.importSkippedInvalid":"技能文件夹不符合规范。","skills.importSkippedConflict":"技能名称已存在。","filePicker.selecting":"正在选择…","filePicker.error":"无法打开文件选择器,请重试。","filePicker.unavailable":"当前电脑无法使用原生文件选择器。","filePicker.busy":"已有文件选择器打开,请先完成选择。","skills.importReadError":"无法读取所选路径,请确认文件存在且具有访问权限。","skills.importInvalid":"技能格式无效。","skills.importInvalidSource":"请选择一个技能文件夹或一个 .skill / .zip 压缩包。","skills.importSymlinkSource":"不支持导入符号链接形式的技能来源,请选择原始技能文件夹或压缩包。","skills.importMissingSkillMd":"所选技能必须在根目录包含 SKILL.md。","skills.importInvalidMetadata":"SKILL.md 必须是 UTF-8 Markdown,并在 YAML 元数据中包含有效的 name 和 description。","skills.importInvalidPath":"技能包含不安全或冲突的文件路径。","skills.importDuplicatePath":"技能包含重复的文件路径。","skills.importInvalidEncoding":"技能包含编码无效的文件。","skills.importUnsupportedEntries":"技能包含符号链接或不支持的条目。","skills.importTooManyEntries":"技能最多包含 5,000 个条目。","skills.importSkillMdTooLarge":"SKILL.md 不能超过 2 MiB。","skills.importInvalidArchive":"所选 .skill 或 .zip 压缩包无效。","skills.importNoSkills":"所选来源中没有技能文件夹。","skills.importTooLarge":"技能总大小不能超过 32 MiB。","skills.importNameConflict":"已存在同名技能,现有技能不会被覆盖。","skills.importError":"无法导入技能,请重试。","skills.importUrl":"从 URL 导入","skills.importUrlDescription":"通过 URL 获取已发布的技能。","skills.url":"URL","skills.importSubmit":"导入","skills.importUrlHint":"请输入 .skill、.zip 或 SKILL.md 文件直链。","skills.importInvalidUrl":"请输入不含账号密码的 HTTP 或 HTTPS URL。","skills.importUnsupportedUrlFile":"请使用 .skill、.zip 或 SKILL.md 文件直链,不支持文件夹和 HTML 网页。","skills.importDownloadFailed":"文件下载失败,请检查链接后重试。","skills.importDownloadTimeout":"下载超时,请重试或下载后从本地导入。","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.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.deleteConfirmTitle":"删除指令?","instructions.deleteConfirmDescription":"“{{name}}”将从指令库和所有 Agent 中移除,此操作无法撤销。","instructions.dragHint":"将指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.actionsAria":"{{name}} 的操作","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}}","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":"导入会用备份替换本地设置、Instructions、Skills 和 Agent 配置,不会合并现有数据。导入后选择应用配置,才会更新本机 Agent 文件和链接。","dataImport.applyTitle":"导入完成,是否应用 Agent 配置?","dataImport.applyDescription":"应用后,将根据导入的配置更新本机 Agent 的 Instructions 和 Skill 链接。选择不应用将清空 Foundry 中的 Agent 配置,保留本机现有 Agent 文件和链接。","dataImport.skipAgents":"不应用","dataImport.applyAgents":"应用配置","dataImport.changed":"Agent 配置在本次导入后已发生变化。请关闭弹窗,重新加载当前数据。","dataImport.applyError":"数据已导入,但 Agent 配置未能应用。请检查文件访问权限和 Skill 目标位置冲突后重试。","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":"深色","statusBar.foundry":"Foundry","statusBar.foundryVersion":"Foundry v{{version}}","statusBar.skill":"Skill","statusBar.skillStatus":"Foundry Skill 状态","statusBar.skillChecking":"正在检查 Skill…","statusBar.skillUnavailable":"无法获取 Skill 状态","statusBar.skillRefreshHint":"复制下面的命令到终端执行,或前往 <settings>高级设置</settings> 重新下载 Skill。","statusBar.copyCommand":"复制命令","statusBar.terminal":"终端","statusBar.targetAgents":"ChatGPT","statusBar.targetClaude":"Claude Code","statusBar.statusMissing":"未安装","statusBar.statusOutdated":"与当前 Foundry 版本不一致","statusBar.statusCurrent":"已是最新","a11y.breadcrumb":"面包屑导航","a11y.goBack":"返回","a11y.close":"关闭","a11y.showPassword":"显示密码","a11y.hidePassword":"隐藏密码","a11y.sidebar":"侧边栏","a11y.sidebarDescription":"显示移动端侧边栏。","a11y.toggleSidebar":"切换侧边栏"},CK={"skills.invalidEntryName":"請輸入有效的檔案或資料夾名稱,不包含斜線。","skills.newEntry":"新增","skills.newFile":"新增檔案","skills.newFolder":"新增資料夾","skills.fileActions":"{{path}} 的操作","skills.fileConflict":"已存在同名檔案或資料夾。","skills.fileOperationError":"無法修改技能檔案,請重試。","skills.deleteEntryDescription":"移除 <entryPath>{{path}}</entryPath> 及其中的所有內容,儲存技能後才會刪除並同步至 Agent。","skills.createEntryDescription":"在 {{path}} 中建立,請輸入單一檔案或資料夾名稱。","skills.entryName":"名稱","skills.fileWorking":"處理中…","skills.createEntry":"建立","skills.fileNotEditable":"此檔案為二進位檔案,或超過 2 MiB 編輯上限。","skills.fileLoadError":"無法載入此檔案。","editor.loading":"正在載入編輯器…","skills.saveContent":"儲存","skills.contentSaving":"儲存中…","skills.contentSaved":"內容已儲存。","skills.contentSaveError":"無法儲存內容,請重試。","skills.unsavedChanges":"未儲存的修改","skills.allChangesSaved":"已全部儲存","skills.contentPlaceholder":"使用 Markdown 編寫技能指令。","skills.fileEditor":"編輯 {{file}}","skills.leaveTitle":"放棄未儲存的修改?","skills.leaveDescription":"目前修改尚未儲存。請先儲存,或放棄修改後繼續。","skills.keepEditing":"繼續編輯","skills.discardChanges":"放棄修改","skills.overview":"概覽","skills.files":"檔案","skills.fileNavigation":"技能檔案","skills.selectAria":"選擇 {{name}}","skills.selectAll":"全選","skills.deselectAll":"取消全選","skills.batch":"批次操作","skills.batchAssigned":"技能分配已更新。","skills.batchAssignPartial":"{{completed}} 項變更已儲存,{{failed}} 項失敗,請重試以完成變更。","skills.unassign":"取消分配","skills.assign":"分配","skills.assignTitle":"分配 {{name}}","skills.assignDialogTitle":"分配 <skillName>{{name}}</skillName>","skills.assignDescription":"選擇 Agent 建立技能連結,取消選擇則解除連結。變更立即生效。","skills.assignAgentAria":"將 {{name}} 分配給 {{agent}}","skills.assignmentError":"無法更新技能分配,請重試。","skills.noAgents":"暫無可用的 Agent。","skills.linkConflict":"Agent 技能目錄中存在同名的其他內容,請處理衝突後重試。","skills.edit":"修改","skills.editTitle":"修改技能","skills.editDescription":"更新名稱和描述,已分配給 Agent 的技能也會同步更新。","skills.saveChanges":"儲存修改","skills.updating":"儲存中…","skills.updated":"技能已更新。","skills.updateError":"無法修改技能,請重試。","skills.delete":"刪除","skills.deleted":"技能已刪除。","skills.deleteError":"無法刪除技能,請重試。","skills.deleteConfirmTitle":"刪除技能","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> 及其資料夾中的所有檔案將被永久刪除。已分配給 Agent 的技能也會同步移除。","skills.actionsAria":"{{name}} 的操作","nav.dashboard":"儀表板","nav.library":"資料庫","nav.skills":"技能","skills.name":"名稱","skills.namePlaceholder":"例如:knowledge-wiki","skills.nameHint":"名稱在技能庫中必須唯一。使用 1–64 個 Unicode 字母或數字,字母有大小寫時使用小寫,單一連字號可用於分隔單字。","skills.description":"描述","skills.descriptionPlaceholder":"描述 Agent 應在什麼情況下使用此技能。","skills.create":"建立技能","skills.creating":"建立中…","skills.created":"技能已建立。","skills.createError":"無法建立技能,請重試。","skills.nameConflict":"已存在同名技能,請使用其他名稱。","skills.loadError":"無法載入技能,請重試。","skills.emptyTitle":"尚無技能","skills.emptyDescription":"建立一個技能,開始建構你的技能庫。","skills.notFound":"找不到技能","skills.backToSkills":"返回技能庫","skills.content":"內容","skills.noContent":"尚無內容","skills.new":"新增技能","skills.createManually":"手動建立","skills.createManuallyDescription":"從空白的 SKILL.md 開始。","skills.importLocal":"從本機匯入","skills.importLocalDescription":"選擇一個技能資料夾或一個 .skill / .zip 壓縮檔。","skills.importing":"正在匯入…","skills.importSummary":"已匯入 {{imported}} 個技能,略過 {{skipped}} 項。","skills.importSkippedInvalid":"技能資料夾不符合規範。","skills.importSkippedConflict":"技能名稱已存在。","filePicker.selecting":"正在選擇…","filePicker.error":"無法開啟檔案選擇器,請重試。","filePicker.unavailable":"目前電腦無法使用原生檔案選擇器。","filePicker.busy":"已有檔案選擇器開啟,請先完成選擇。","skills.importReadError":"無法讀取所選路徑,請確認檔案存在且具有存取權限。","skills.importInvalid":"技能格式無效。","skills.importInvalidSource":"請選擇一個技能資料夾或一個 .skill / .zip 壓縮檔。","skills.importSymlinkSource":"不支援匯入符號連結形式的技能來源,請選擇原始技能資料夾或壓縮檔。","skills.importMissingSkillMd":"所選技能必須在根目錄包含 SKILL.md。","skills.importInvalidMetadata":"SKILL.md 必須是 UTF-8 Markdown,並在 YAML 中繼資料中包含有效的 name 與 description。","skills.importInvalidPath":"技能包含不安全或衝突的檔案路徑。","skills.importDuplicatePath":"技能包含重複的檔案路徑。","skills.importInvalidEncoding":"技能包含編碼無效的檔案。","skills.importUnsupportedEntries":"技能包含符號連結或不支援的項目。","skills.importTooManyEntries":"技能最多包含 5,000 個項目。","skills.importSkillMdTooLarge":"SKILL.md 不能超過 2 MiB。","skills.importInvalidArchive":"所選 .skill 或 .zip 壓縮檔無效。","skills.importNoSkills":"所選來源中沒有技能資料夾。","skills.importTooLarge":"技能總大小不能超過 32 MiB。","skills.importNameConflict":"已存在同名技能,現有技能不會被覆蓋。","skills.importError":"無法匯入技能,請重試。","skills.importUrl":"從 URL 匯入","skills.importUrlDescription":"透過 URL 取得已發布的技能。","skills.url":"URL","skills.importSubmit":"匯入","skills.importUrlHint":"請輸入 .skill、.zip 或 SKILL.md 檔案直連。","skills.importInvalidUrl":"請輸入不含帳號密碼的 HTTP 或 HTTPS URL。","skills.importUnsupportedUrlFile":"請使用 .skill、.zip 或 SKILL.md 檔案直連,不支援資料夾和 HTML 網頁。","skills.importDownloadFailed":"檔案下載失敗,請檢查連結後重試。","skills.importDownloadTimeout":"下載逾時,請重試或下載後從本機匯入。","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.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.deleteConfirmTitle":"刪除指令?","instructions.deleteConfirmDescription":"「{{name}}」將從指令庫和所有 Agent 中移除,此操作無法復原。","instructions.dragHint":"將指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.actionsAria":"{{name}} 的操作","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}}","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":"匯入會以備份替換本機設定、Instructions、Skills 和 Agent 設定,不會合併現有資料。匯入後選擇套用設定,才會更新本機 Agent 檔案和連結。","dataImport.applyTitle":"匯入完成,是否套用 Agent 設定?","dataImport.applyDescription":"套用後,將依匯入的設定更新本機 Agent 的 Instructions 和 Skill 連結。選擇不套用將清空 Foundry 中的 Agent 設定,保留本機現有 Agent 檔案和連結。","dataImport.skipAgents":"不套用","dataImport.applyAgents":"套用設定","dataImport.changed":"Agent 設定在本次匯入後已變更。請關閉對話框,重新載入目前資料。","dataImport.applyError":"資料已匯入,但無法套用 Agent 設定。請檢查檔案存取權限與 Skill 目標位置衝突後重試。","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":"深色","statusBar.foundry":"Foundry","statusBar.foundryVersion":"Foundry v{{version}}","statusBar.skill":"Skill","statusBar.skillStatus":"Foundry Skill 狀態","statusBar.skillChecking":"正在檢查 Skill…","statusBar.skillUnavailable":"無法取得 Skill 狀態","statusBar.skillRefreshHint":"複製下方指令到終端機執行,或前往 <settings>進階設定</settings> 重新下載 Skill。","statusBar.copyCommand":"複製指令","statusBar.terminal":"終端機","statusBar.targetAgents":"ChatGPT","statusBar.targetClaude":"Claude Code","statusBar.statusMissing":"未安裝","statusBar.statusOutdated":"與目前 Foundry 版本不一致","statusBar.statusCurrent":"已是最新","a11y.breadcrumb":"麵包屑導覽","a11y.goBack":"返回","a11y.close":"關閉","a11y.showPassword":"顯示密碼","a11y.hidePassword":"隱藏密碼","a11y.sidebar":"側邊欄","a11y.sidebarDescription":"顯示行動版側邊欄。","a11y.toggleSidebar":"切換側邊欄"},RK={"skills.invalidEntryName":"スラッシュを含まない有効なファイル名またはフォルダー名を入力してください。","skills.newEntry":"新規","skills.newFile":"新規ファイル","skills.newFolder":"新規フォルダー","skills.fileActions":"{{path}} の操作","skills.fileConflict":"同じ名前のファイルまたはフォルダーが存在します。","skills.fileOperationError":"スキルファイルを更新できませんでした。もう一度お試しください。","skills.deleteEntryDescription":"<entryPath>{{path}}</entryPath> とその内容を削除します。スキルを保存すると削除が反映されます。","skills.createEntryDescription":"{{path}} に作成します。ファイルまたはフォルダーの名前を入力してください。","skills.entryName":"名前","skills.fileWorking":"処理中…","skills.createEntry":"作成","skills.fileNotEditable":"バイナリファイル、または編集上限の 2 MiB を超えています。","skills.fileLoadError":"ファイルを読み込めませんでした。","editor.loading":"エディターを読み込み中…","skills.saveContent":"保存","skills.contentSaving":"保存中…","skills.contentSaved":"内容を保存しました。","skills.contentSaveError":"内容を保存できませんでした。もう一度お試しください。","skills.unsavedChanges":"未保存の変更","skills.allChangesSaved":"すべて保存済み","skills.contentPlaceholder":"Markdown でスキルの指示を記述します。","skills.fileEditor":"{{file}} を編集","skills.leaveTitle":"未保存の変更を破棄しますか?","skills.leaveDescription":"変更はまだ保存されていません。保存するか、変更を破棄して続行してください。","skills.keepEditing":"編集を続ける","skills.discardChanges":"変更を破棄","skills.overview":"概要","skills.files":"ファイル","skills.fileNavigation":"スキルファイル","skills.selectAria":"{{name}} を選択","skills.selectAll":"すべて選択","skills.deselectAll":"すべての選択を解除","skills.batch":"一括操作","skills.batchAssigned":"スキルの割り当てを更新しました。","skills.batchAssignPartial":"{{completed}} 件成功、{{failed}} 件失敗しました。再試行して完了してください。","skills.unassign":"割り当て解除","skills.assign":"割り当て","skills.assignTitle":"{{name}} の割り当て","skills.assignDialogTitle":"<skillName>{{name}}</skillName> の割り当て","skills.assignDescription":"エージェントを選択するとスキルへのリンクを作成し、選択を解除するとリンクを削除します。変更はすぐに反映されます。","skills.assignAgentAria":"{{name}} を {{agent}} に割り当て","skills.assignmentError":"スキルの割り当てを更新できませんでした。もう一度お試しください。","skills.noAgents":"利用可能なエージェントがありません。","skills.linkConflict":"エージェントのスキルフォルダーに別の同名項目があります。競合を解消して再試行してください。","skills.edit":"編集","skills.editTitle":"スキルを編集","skills.editDescription":"名前と説明を更新します。このスキルが割り当てられているエージェントにも変更が反映されます。","skills.saveChanges":"変更を保存","skills.updating":"保存中…","skills.updated":"スキルを更新しました。","skills.updateError":"スキルを更新できません。再試行してください。","skills.delete":"削除","skills.deleted":"スキルを削除しました。","skills.deleteError":"スキルを削除できません。再試行してください。","skills.deleteConfirmTitle":"スキルを削除","skills.deleteConfirmDescription":"<skillName>{{name}}</skillName> とフォルダー内のすべてのファイルが完全に削除されます。割り当て済みのエージェントからもスキルが削除されます。","skills.actionsAria":"{{name}} の操作","nav.dashboard":"ダッシュボード","nav.library":"ライブラリ","nav.skills":"スキル","skills.name":"名前","skills.namePlaceholder":"例:knowledge-wiki","skills.nameHint":"スキルライブラリ内で一意の名前にしてください。1〜64 文字の Unicode 文字または数字を使用し、大文字・小文字がある場合は小文字にしてください。単語は単一のハイフンで区切れます。","skills.description":"説明","skills.descriptionPlaceholder":"エージェントがこのスキルを使う場面を説明してください。","skills.create":"スキルを作成","skills.creating":"作成中…","skills.created":"スキルを作成しました。","skills.createError":"スキルを作成できませんでした。もう一度お試しください。","skills.nameConflict":"同じ名前のスキルが存在します。別の名前を指定してください。","skills.loadError":"スキルを読み込めませんでした。もう一度お試しください。","skills.emptyTitle":"スキルはまだありません","skills.emptyDescription":"スキルを作成してライブラリを構築しましょう。","skills.notFound":"スキルが見つかりません","skills.backToSkills":"スキル一覧に戻る","skills.content":"内容","skills.noContent":"内容はまだありません","skills.new":"新規スキル","skills.createManually":"手動で作成","skills.createManuallyDescription":"空の SKILL.md から始めます。","skills.importLocal":"ローカルからインポート","skills.importLocalDescription":"スキルフォルダーまたは .skill / .zip アーカイブを1つ選択します。","skills.importing":"インポート中…","skills.importSummary":"{{imported}} 個のスキルをインポートし、{{skipped}} 件をスキップしました。","skills.importSkippedInvalid":"無効なスキルフォルダーです。","skills.importSkippedConflict":"同名のスキルが存在します。","filePicker.selecting":"選択中…","filePicker.error":"ファイル選択ダイアログを開けませんでした。もう一度お試しください。","filePicker.unavailable":"このコンピューターではネイティブファイル選択を利用できません。","filePicker.busy":"ファイル選択ダイアログが既に開いています。","skills.importReadError":"選択したパスを読み取れません。存在とアクセス権を確認してください。","skills.importInvalid":"スキルの形式が無効です。","skills.importInvalidSource":"スキルフォルダーまたは .skill / .zip アーカイブを1つ選択してください。","skills.importSymlinkSource":"シンボリックリンクのスキルソースはインポートできません。元のスキルフォルダーまたはアーカイブを選択してください。","skills.importMissingSkillMd":"選択したスキルのルートに SKILL.md が必要です。","skills.importInvalidMetadata":"SKILL.md は UTF-8 の Markdown で、YAML に有効な name と description が必要です。","skills.importInvalidPath":"スキルに安全でない、または競合するファイルパスがあります。","skills.importDuplicatePath":"スキルに重複したファイルパスがあります。","skills.importInvalidEncoding":"スキルにエンコーディングが無効なファイルがあります。","skills.importUnsupportedEntries":"スキルにシンボリックリンクまたは未対応の項目があります。","skills.importTooManyEntries":"スキルに含められる項目は最大 5,000 件です。","skills.importSkillMdTooLarge":"SKILL.md は 2 MiB 以下にしてください。","skills.importInvalidArchive":"選択した .skill または .zip アーカイブが無効です。","skills.importNoSkills":"選択したソースにスキルフォルダーがありません。","skills.importTooLarge":"スキルの合計サイズは 32 MiB 以下にしてください。","skills.importNameConflict":"同じ名前のスキルが既に存在します。既存のスキルは上書きされません。","skills.importError":"スキルをインポートできませんでした。もう一度お試しください。","skills.importUrl":"URL からインポート","skills.importUrlDescription":"URL から公開済みのスキルを取得します。","skills.url":"URL","skills.importSubmit":"インポート","skills.importUrlHint":".skill、.zip、または SKILL.md の直接リンクを入力してください。","skills.importInvalidUrl":"認証情報を含まない HTTP または HTTPS URL を入力してください。","skills.importUnsupportedUrlFile":".skill、.zip、または SKILL.md の直接リンクを使用してください。フォルダーや HTML ページには対応していません。","skills.importDownloadFailed":"ダウンロードできませんでした。URL を確認して再試行してください。","skills.importDownloadTimeout":"ダウンロードがタイムアウトしました。再試行するか、ローカルからインポートしてください。","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.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.deleteConfirmTitle":"指示を削除しますか?","instructions.deleteConfirmDescription":"「{{name}}」はライブラリとすべての Agent から削除されます。この操作は取り消せません。","instructions.dragHint":"指示を Agent にドラッグ","instructions.listAria":"指示一覧","instructions.actionsAria":"{{name}} の操作","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}} を削除","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":"バックアップでローカルの設定、Instructions、Skills、Agent 設定を置き換えます。既存データとの結合は行われません。Agent のファイルとリンクは、インポート後に適用を選んだ場合にのみ更新されます。","dataImport.applyTitle":"インポート完了。Agent 設定を適用しますか?","dataImport.applyDescription":"インポートした設定で、このマシンの Agent の Instructions と Skill リンクを更新します。適用しない場合は Foundry の Agent 設定を空にし、既存の Agent ファイルとリンクを保持します。","dataImport.skipAgents":"適用しない","dataImport.applyAgents":"設定を適用","dataImport.changed":"インポート後に Agent 設定が変更されました。このダイアログを閉じて現在のデータを再読み込みしてください。","dataImport.applyError":"データはインポートされましたが、Agent 設定を適用できませんでした。ファイルへのアクセス権限と Skill の配置先の競合を確認して再試行してください。","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":"ダーク","statusBar.foundry":"Foundry","statusBar.foundryVersion":"Foundry v{{version}}","statusBar.skill":"Skill","statusBar.skillStatus":"Foundry Skill の状態","statusBar.skillChecking":"Skill を確認中…","statusBar.skillUnavailable":"Skill の状態を取得できません","statusBar.skillRefreshHint":"下のコマンドをターミナルで実行するか、<settings>詳細設定</settings> に移動して Skill を再ダウンロードしてください。","statusBar.copyCommand":"コマンドをコピー","statusBar.terminal":"ターミナル","statusBar.targetAgents":"ChatGPT","statusBar.targetClaude":"Claude Code","statusBar.statusMissing":"未インストール","statusBar.statusOutdated":"同梱の Skill と一致しません","statusBar.statusCurrent":"最新です","a11y.breadcrumb":"パンくずリスト","a11y.goBack":"戻る","a11y.close":"閉じる","a11y.showPassword":"パスワードを表示","a11y.hidePassword":"パスワードを非表示","a11y.sidebar":"サイドバー","a11y.sidebarDescription":"モバイル用サイドバーを表示します。","a11y.toggleSidebar":"サイドバーを切り替える"},TK={"en-US":{translation:wK},"zh-CN":{translation:EK},"zh-TW":{translation:CK},"ja-JP":{translation:RK}};function kK({value:e,onValueChange:t,disabled:i=!1}){const{t:s}=pt(),o=[{value:"system",label:s("common.system")},...FM.map(l=>({value:l,label:SK[l]}))];return v.jsx(Za,{label:s("settings.language"),children:v.jsxs(rx,{items:o,value:e,onValueChange:l=>{l&&t(l)},disabled:i,children:[v.jsx(sx,{"aria-label":s("settings.language"),className:"w-52",children:v.jsx(ix,{})}),v.jsx(ax,{children:o.map(l=>v.jsx(ox,{value:l.value,children:l.label},l.value))})]})})}const BC=K9.map(e=>({value:e,label:e}));function OK({value:e,onValueChange:t,disabled:i=!1}){const{t:s}=pt();return v.jsx(Za,{label:s("settings.timeFormat"),children:v.jsxs(rx,{items:BC,value:e,onValueChange:o=>{o&&t(o)},disabled:i,children:[v.jsx(sx,{"aria-label":s("settings.timeFormat"),className:"w-52",children:v.jsx(ix,{})}),v.jsx(ax,{children:BC.map(o=>v.jsx(ox,{value:o.value,children:o.label},o.value))})]})})}const AK={"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 MK({value:e,onValueChange:t,disabled:i=!1}){const{t:s}=pt(),o=q9.map(l=>({value:l,label:s(AK[l])}));return v.jsx(Za,{label:s("settings.timeZone"),children:v.jsxs(rx,{items:o,value:e,onValueChange:l=>{l&&t(l)},disabled:i,children:[v.jsx(sx,{"aria-label":s("settings.timeZone"),className:"w-52",children:v.jsx(ix,{})}),v.jsx(ax,{children:o.map(l=>v.jsx(ox,{value:l.value,children:l.label},l.value))})]})})}const Ia=["settings"],zh=["settings","update"];function lx(){const{t:e}=pt(),t=jr(),i=rg({mutationKey:zh})>0,s=na({queryKey:Ia,queryFn:({signal:h})=>Jz(h),staleTime:1/0,retry:!1}),o=er({mutationKey:zh,mutationFn:Wz,onMutate:async h=>{await t.cancelQueries({queryKey:Ia});const x=t.getQueryData(Ia);return x&&t.setQueryData(Ia,NK(x,h)),{previous:x}},onSuccess:h=>{t.setQueryData(Ia,h)},onError:(h,x,S)=>{S?.previous&&t.setQueryData(Ia,S.previous),Ft.error(e(DK(x)))},onSettled:()=>t.invalidateQueries({queryKey:Ia})}),l=s.data??null,u=l?.workspace.appearance["color-theme"]??"system",d=l?.workspace["language-region"].language??"system",f=l?.workspace["language-region"]["time-format"]??"YYYY-MM-DD HH:mm:ss",g=l?.workspace["language-region"]["time-zone"]??"America/Los_Angeles";function m(h){!l||t.isMutating({mutationKey:zh})>0||o.mutate(h)}return{settings:l,theme:u,language:d,timeFormat:f,timeZone:g,isLoading:s.isPending,isUpdating:i,setTheme:h=>{h!==u&&m({theme:h})},setLanguage:h=>{h!==d&&m({language:h})},setTimeFormat:h=>{h!==f&&m({timeFormat:h})},setTimeZone:h=>{h!==g&&m({timezone:h})}}}function NK(e,t){const i=e.workspace,s=i["language-region"];return{...e,workspace:{appearance:{"color-theme":t.theme??i.appearance["color-theme"]},"language-region":{language:t.language??s.language,"time-format":t.timeFormat??s["time-format"],"time-zone":t.timezone??s["time-zone"]}}}}function DK(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 Oo=[{id:"appearance",labelKey:"settings.appearance",ariaKey:"settings.appearanceAria",icon:TL},{id:"language-region",labelKey:"settings.languageRegion",ariaKey:"settings.languageRegionAria",icon:bL},{id:"advanced",labelKey:"settings.advanced",ariaKey:"settings.advancedAria",icon:sk}];function jK(){const{t:e}=pt(),{state:t}=Rr(),[i,s]=D8(),o=Oo.find(({id:k})=>k===i.get("panel"))?.id??Oo[0].id,l=k=>{s(A=>{const N=new URLSearchParams(A);return N.set("panel",k),N},{state:t})},{settings:u,theme:d,language:f,timeFormat:g,timeZone:m,isLoading:h,isUpdating:x,setTheme:S,setLanguage:w,setTimeFormat:R,setTimeZone:E}=lx(),C=Oo.find(k=>k.id===o)?.ariaKey??"settings.appearanceAria",O=Oo.find(k=>k.id===o)?.labelKey??"settings.appearance";return v.jsxs("div",{className:`
|
|
241
|
-
grid h-full min-h-0 grid-cols-[260px_minmax(0,1fr)]
|
|
242
|
-
max-[680px]:grid-cols-1
|
|
243
|
-
`,children:[v.jsx("aside",{className:`
|
|
244
|
-
hidden min-h-0 overflow-y-auto p-4
|
|
245
|
-
min-[680px]:block
|
|
246
|
-
`,children:v.jsx(IK,{activeSection:o,onSectionChange:l})}),v.jsxs("section",{"aria-label":e(C),className:"min-h-0 overflow-y-auto p-4",children:[v.jsxs("div",{className:`
|
|
247
|
-
mb-3 flex items-center gap-3
|
|
248
|
-
min-[680px]:hidden
|
|
249
|
-
`,children:[v.jsxs(Ko,{children:[v.jsx(qo,{render:v.jsx(nt,{type:"button",variant:"outline",size:"icon","aria-label":e("settings.openNavigation")}),children:v.jsx(CL,{})}),v.jsx(Yo,{side:"bottom",align:"start",sideOffset:8,"aria-label":e("settings.navigation"),className:"w-56",children:v.jsxs(aA,{children:[v.jsx(oA,{children:e("settings.workspace")}),v.jsx(sH,{value:o,onValueChange:k=>{const A=Oo.find(({id:N})=>N===k);A&&l(A.id)},children:Oo.map(({id:k,labelKey:A,icon:N})=>v.jsxs(aH,{value:k,closeOnClick:!0,children:[v.jsx(N,{}),e(A)]},k))})]})})]}),v.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:e(O)})]}),v.jsxs(Gs,{className:"gap-0 py-0",children:[h&&v.jsxs("div",{className:`
|
|
250
|
-
flex flex-col items-start gap-3 p-4
|
|
251
|
-
min-[680px]:min-h-16 min-[680px]:flex-row
|
|
252
|
-
min-[680px]:items-center min-[680px]:justify-between
|
|
253
|
-
min-[680px]:gap-8
|
|
254
|
-
`,children:[v.jsx(fr,{className:"h-4 w-24"}),v.jsxs("div",{className:"flex items-center gap-6",children:[v.jsx(fr,{className:"h-4 w-16"}),v.jsx(fr,{className:"h-4 w-10"}),v.jsx(fr,{className:"h-4 w-10"})]})]}),!h&&o==="appearance"&&v.jsx(UV,{value:d,onValueChange:k=>{S(k)},disabled:x||!u}),!h&&o==="language-region"&&v.jsxs("div",{className:"divide-y",children:[v.jsx(kK,{value:f,onValueChange:k=>{w(k)},disabled:x||!u}),v.jsx(MK,{value:m,onValueChange:k=>{E(k)},disabled:x||!u}),v.jsx(OK,{value:g,onValueChange:k=>{R(k)},disabled:x||!u})]}),!h&&o==="advanced"&&v.jsxs("div",{className:"divide-y",children:[v.jsx(EV,{disabled:x||!u}),v.jsx(kV,{disabled:x||!u}),v.jsx(dV,{configFolder:u?.configFolder}),v.jsx(hV,{disabled:x||!u})]})]})]})]})}function IK({activeSection:e,onSectionChange:t}){const{t:i}=pt();return v.jsx("nav",{"aria-label":i("settings.navigation"),children:v.jsxs(Gs,{size:"sm",children:[v.jsx(p9,{children:v.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:i("settings.workspace")})}),v.jsx(g9,{className:"flex flex-col gap-1",children:Oo.map(({id:s,labelKey:o,icon:l})=>{const u=s===e;return v.jsxs(nt,{type:"button",variant:u?"secondary":"ghost","aria-current":u?"page":void 0,onClick:()=>{t(s)},className:"w-full justify-start gap-2",children:[v.jsx(l,{className:u?void 0:"text-muted-foreground"}),v.jsx("span",{children:i(o)})]},s)})})]})})}pr.use(w5).init({resources:TK,lng:BM(),fallbackLng:"en-US",supportedLngs:[...FM],keySeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});function BM(){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 PK(){const e=jr();b.useEffect(()=>{const t=new EventSource("/api/events"),i=()=>{e.invalidateQueries({queryKey:Ia,refetchType:e.isMutating({mutationKey:zh})>0?"none":"active"})},s=o=>{try{const l=JSON.parse(o.data);typeof l=="object"&&l!==null&&"version"in l&&l.version===Y9&&"type"in l&&l.type===G9&&i()}catch{}};return t.addEventListener("open",i),t.addEventListener("foundry",s),()=>{t.removeEventListener("open",i),t.removeEventListener("foundry",s),t.close()}},[e])}const xv=matchMedia("(prefers-color-scheme: dark)");function LK(e){return xv.addEventListener("change",e),()=>xv.removeEventListener("change",e)}function zK(){return xv.matches?"dark":"light"}function _K({children:e}){PK();const{theme:t,language:i}=lx(),s=b.useSyncExternalStore(LK,zK),o=t==="system"?s:t,l=i==="system"?BM():i;return b.useLayoutEffect(()=>{const u=document.documentElement;u.classList.toggle("dark",o==="dark"),u.style.colorScheme=o},[o]),b.useLayoutEffect(()=>{pr.changeLanguage(l),document.documentElement.lang=l},[l]),e}const UK=new _z({queryCache:new Kk({onError:(e,t)=>{t.queryKey[0]==="skill-targets"?Ft.error(pr.t("settings.errors.skillTargets")):t.queryKey[0]==="settings"&&Ft.error(pr.t("settings.errors.load"))}})});function HK(){return null}function FK(e){switch(e){case"/library/instructions":return v.jsx(mB,{});case"/library/skills":return v.jsx(nV,{});default:return v.jsx(HK,{})}}const BK=T8([{element:v.jsx(vF,{}),children:[...oF.map(e=>({path:e,element:FK(e)})),{path:"/library/skills/:name",element:v.jsx(uV,{})}]},{element:v.jsx(bF,{}),children:[{path:"/settings",element:v.jsx(jK,{})}]},{path:"*",element:v.jsx(e8,{to:"/dashboard",replace:!0})}]);function VK(){return v.jsx(hz,{client:UK,children:v.jsx(bP,{children:v.jsx(_K,{children:v.jsx(KK,{})})})})}function KK(){const{theme:e}=lx();return v.jsxs(v.Fragment,{children:[v.jsx(U8,{router:BK}),v.jsx(l_,{}),v.jsx(NL,{theme:e,position:"top-center"})]})}kj.createRoot(document.getElementById("root")).render(v.jsx(b.StrictMode,{children:v.jsx(VK,{})}));export{Ne as W,uB as _,v as j,b as r,pt as u};
|