@dhzh/foundry 7.5.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/README.md +7 -5
  2. package/dist/index.mjs +6 -6
  3. package/dist/skills/foundry/SKILL.md +2 -1
  4. package/dist/skills/foundry/references/backups.md +31 -28
  5. package/dist/skills/foundry/references/instructions.md +2 -1
  6. package/dist/skills/foundry/references/skills.md +4 -1
  7. package/dist/web/assets/{code-editor-D9YqPRu9.js → code-editor-LITaffq7.js} +3 -3
  8. package/dist/web/assets/{freemarker2-Cqc6DC0X.js → freemarker2-CnoNAUv6.js} +1 -1
  9. package/dist/web/assets/{handlebars-vhUCOYp2.js → handlebars-DUxhpkjP.js} +1 -1
  10. package/dist/web/assets/{html-B9OWsMTw.js → html-BG3mLIV3.js} +1 -1
  11. package/dist/web/assets/index-DcnVokj7.js +201 -0
  12. package/dist/web/assets/{index-BLI6_UFc.css → index-Z4Mw08LY.css} +1 -1
  13. package/dist/web/assets/{javascript-VVG9ORob.js → javascript-BUXOllvL.js} +1 -1
  14. package/dist/web/assets/{jsonMode-83eKggsx.js → jsonMode-D5RylzZ2.js} +1 -1
  15. package/dist/web/assets/{liquid-iK6GMLcM.js → liquid-BeZnVjtp.js} +1 -1
  16. package/dist/web/assets/{mdx-C9wUAJkS.js → mdx-CUPokOtG.js} +1 -1
  17. package/dist/web/assets/{python-C12wwW7S.js → python-Ce6KXmfY.js} +1 -1
  18. package/dist/web/assets/{razor-BRAlXnRe.js → razor-at-_pj8L.js} +1 -1
  19. package/dist/web/assets/{typescript-Bx_6s3Vf.js → typescript-t-PYMj1J.js} +1 -1
  20. package/dist/web/assets/{xml-CA6ArVkO.js → xml-LqDDuqzV.js} +1 -1
  21. package/dist/web/assets/{yaml-BfVk-7Da.js → yaml-DE0XDSVN.js} +1 -1
  22. package/dist/web/index.html +2 -2
  23. package/package.json +1 -1
  24. package/dist/web/assets/index-ZHZEjBKE.js +0 -198
@@ -1,198 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-editor-D9YqPRu9.js","assets/code-editor-DMeNDIaI.css"])))=>i.map(i=>d[i]);
2
- function QD(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 u=Object.getOwnPropertyDescriptor(s,o);u&&Object.defineProperty(e,o,u.get?u:{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 u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(o){if(o.ep)return;o.ep=!0;const u=i(o);fetch(o.href,u)}})();function kR(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I0={exports:{}},lc={};var YS;function XD(){if(YS)return lc;YS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(s,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var d in o)d!=="key"&&(u[d]=o[d])}else u=o;return o=u.ref,{$$typeof:e,type:s,key:c,ref:o!==void 0?o:null,props:u}}return lc.Fragment=t,lc.jsx=i,lc.jsxs=i,lc}var GS;function ZD(){return GS||(GS=1,I0.exports=XD()),I0.exports}var b=ZD(),P0={exports:{}},Mt={};var $S;function WD(){if($S)return Mt;$S=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"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),p=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 C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,R={};function O(I,V,J){this.props=I,this.context=V,this.refs=R,this.updater=J||C}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 A(){}A.prototype=O.prototype;function M(I,V,J){this.props=I,this.context=V,this.refs=R,this.updater=J||C}var N=M.prototype=new A;N.constructor=M,E(N,O.prototype),N.isPureReactComponent=!0;var j=Array.isArray;function D(){}var k={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function L(I,V,J){var re=J.ref;return{$$typeof:e,type:I,key:V,ref:re!==void 0?re:null,props:J}}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(J){return V[J]})}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,J,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 y:return me=I._init,Q(me(I._payload),V,J,re,Ee)}}if(me)return Ee=Ee(I),me=re===""?"."+U(I,0):re,j(Ee)?(J="",me!=null&&(J=me.replace(H,"$&/")+"/"),Q(Ee,V,J,"",function(Te){return Te})):Ee!=null&&(X(Ee)&&(Ee=q(Ee,J+(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 ce=0;ce<I.length;ce++)re=I[ce],le=ge+U(re,ce),me+=Q(re,V,J,le,Ee);else if(ce=w(I),typeof ce=="function")for(I=ce.call(I),ce=0;!(re=I.next()).done;)re=re.value,le=ge+U(re,ce++),me+=Q(re,V,J,le,Ee);else if(le==="object"){if(typeof I.then=="function")return Q(z(I),V,J,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,J){if(I==null)return I;var re=[],Ee=0;return Q(I,re,"","",function(le){return V.call(J,le,Ee++)}),re}function K(I){if(I._status===-1){var V=I._result,J=V();J.then(function(re){(I._status===0||I._status===-1)&&(I._status=1,I._result=re,J.status===void 0&&(J.status="fulfilled",J.value=re))},function(re){(I._status===0||I._status===-1)&&(I._status=2,I._result=re,J.status===void 0&&(J.status="rejected",J.reason=re))}),I._status===-1&&(I._status=0,I._result=J)}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=k.T,J={};J.types=V!==null?V.types:null,k.T=J;try{var re=I(),Ee=k.S;Ee!==null&&Ee(J,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(D,Y)}catch(le){Y(le)}finally{V!==null&&J.types!==null&&(V.types=J.types),k.T=V}}function G(I){var V=k.T;if(V!==null){var J=V.types;J===null?V.types=[I]:J.indexOf(I)===-1&&J.push(I)}else ee(G.bind(null,I))}var oe={map:$,forEach:function(I,V,J){$(I,function(){V.apply(this,arguments)},J)},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=p,Mt.Children=oe,Mt.Component=O,Mt.Fragment=i,Mt.Profiler=o,Mt.PureComponent=M,Mt.StrictMode=s,Mt.Suspense=f,Mt.ViewTransition=x,Mt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,Mt.__COMPILER_RUNTIME={__proto__:null,c:function(I){return k.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,J){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=J;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:c,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:u,_context:I},I},Mt.createElement=function(I,V,J){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=J;else if(1<me){for(var ge=Array(me),ce=0;ce<me;ce++)ge[ce]=arguments[ce+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:y,_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 k.H.useCacheRefresh()},Mt.use=function(I){return k.H.use(I)},Mt.useActionState=function(I,V,J){return k.H.useActionState(I,V,J)},Mt.useCallback=function(I,V){return k.H.useCallback(I,V)},Mt.useContext=function(I){return k.H.useContext(I)},Mt.useDebugValue=function(){},Mt.useDeferredValue=function(I,V){return k.H.useDeferredValue(I,V)},Mt.useEffect=function(I,V){return k.H.useEffect(I,V)},Mt.useEffectEvent=function(I){return k.H.useEffectEvent(I)},Mt.useId=function(){return k.H.useId()},Mt.useImperativeHandle=function(I,V,J){return k.H.useImperativeHandle(I,V,J)},Mt.useInsertionEffect=function(I,V){return k.H.useInsertionEffect(I,V)},Mt.useLayoutEffect=function(I,V){return k.H.useLayoutEffect(I,V)},Mt.useMemo=function(I,V){return k.H.useMemo(I,V)},Mt.useOptimistic=function(I,V){return k.H.useOptimistic(I,V)},Mt.useReducer=function(I,V,J){return k.H.useReducer(I,V,J)},Mt.useRef=function(I){return k.H.useRef(I)},Mt.useState=function(I){return k.H.useState(I)},Mt.useSyncExternalStore=function(I,V,J){return k.H.useSyncExternalStore(I,V,J)},Mt.useTransition=function(){return k.H.useTransition()},Mt.version="19.3.1",Mt}var QS;function qc(){return QS||(QS=1,P0.exports=WD()),P0.exports}var v=qc();const Ne=kR(v),NR=QD({__proto__:null,default:Ne},[v]);var L0={exports:{}},uc={},z0={exports:{}},_0={};var XS;function JD(){return XS||(XS=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 u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],g=[],y=1,p=null,x=3,S=!1,w=!1,C=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function M(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(C=!1,M(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,k=5,_=-1;function L(){return E?!0:!(e.unstable_now()-_<k)}function q(){if(E=!1,j){var z=e.unstable_now();_=z;var Q=!0;try{e:{w=!1,C&&(C=!1,O(D),D=-1),S=!0;var $=x;try{t:{for(M(z),p=i(f);p!==null&&!(p.expirationTime>z&&L());){var K=p.callback;if(typeof K=="function"){p.callback=null,x=p.priorityLevel;var Y=K(p.expirationTime<=z);if(z=e.unstable_now(),typeof Y=="function"){p.callback=Y,M(z),Q=!0;break t}p===i(f)&&s(f),M(z)}else s(f);p=i(f)}if(p!==null)Q=!0;else{var ee=i(g);ee!==null&&U(N,ee.startTime-z),Q=!1}}break e}finally{p=null,x=$,S=!1}Q=void 0}}finally{Q?X():j=!1}}}var X;if(typeof A=="function")X=function(){A(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(){R(q,0)};function U(z,Q){D=R(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"):k=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:y++,callback:Q,priorityLevel:z,startTime:$,expirationTime:Y,sortIndex:-1},$>K?(z.sortIndex=$,t(g,z),i(f)===null&&z===i(g)&&(C?(O(D),D=-1):C=!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=$}}}})(_0)),_0}var ZS;function ej(){return ZS||(ZS=1,z0.exports=JD()),z0.exports}var U0={exports:{}},Sr={};var WS;function tj(){if(WS)return Sr;WS=1;var e=qc();function t(y){var p="https://react.dev/errors/"+y;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+y+"; visit "+p+" 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"),u=Symbol.for("react.recoverable"),c=Symbol.for("react.optimistic_key");function d(y,p,x){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:S==null?null:S===c?c:""+S,children:y,containerInfo:p,implementation:x}}var f=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,p){if(y==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Sr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Sr.browser=function(y){return{$$typeof:u,_reason:y}},Sr.createPortal=function(y,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return d(y,p,null,x)},Sr.flushSync=function(y){var p=f.T,x=s.p;try{if(f.T=null,s.p=2,y)return y()}finally{f.T=p,s.p=x,s.d.f()}},Sr.preconnect=function(y,p){typeof y=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(y,p))},Sr.prefetchDNS=function(y){typeof y=="string"&&s.d.D(y)},Sr.preinit=function(y,p){if(typeof y=="string"&&p&&typeof p.as=="string"){var x=p.as,S=g(x,p.crossOrigin),w=typeof p.integrity=="string"?p.integrity:void 0,C=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?s.d.S(y,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:S,integrity:w,fetchPriority:C}):x==="script"&&s.d.X(y,{crossOrigin:S,integrity:w,fetchPriority:C,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Sr.preinitModule=function(y,p){if(typeof y=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=g(p.as,p.crossOrigin);s.d.M(y,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}}else p==null&&s.d.M(y)},Sr.preload=function(y,p){if(typeof y=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,S=g(x,p.crossOrigin);s.d.L(y,x,{crossOrigin:S,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Sr.preloadModule=function(y,p){if(typeof y=="string")if(p){var x=g(p.as,p.crossOrigin);s.d.m(y,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}else s.d.m(y)},Sr.requestFormReset=function(y){s.d.r(y)},Sr.unstable_batchedUpdates=function(y,p){return y(p)},Sr.useFormState=function(y,p,x){return f.H.useFormState(y,p,x)},Sr.useFormStatus=function(){return f.H.useHostTransitionStatus()},Sr.version="19.3.1",Sr}var JS;function DR(){if(JS)return U0.exports;JS=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(),U0.exports=tj(),U0.exports}var ew;function nj(){if(ew)return uc;ew=1;var e=ej(),t=qc(),i=DR();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 u(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 c(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(u(n)!==n)throw Error(s(188))}function g(n){var r=n.alternate;if(!r){if(r=u(n),r===null)throw Error(s(188));return r!==n?null:n}for(var a=n,l=r;;){var h=a.return;if(h===null)break;var m=h.alternate;if(m===null){if(l=h.return,l!==null){a=l;continue}break}if(h.child===m.child){for(m=h.child;m;){if(m===a)return f(h),n;if(m===l)return f(h),r;m=m.sibling}throw Error(s(188))}if(a.return!==l.return)a=h,l=m;else{for(var T=!1,P=h.child;P;){if(P===a){T=!0,a=h,l=m;break}if(P===l){T=!0,l=h,a=m;break}P=P.sibling}if(!T){for(P=m.child;P;){if(P===a){T=!0,a=m,l=h;break}if(P===l){T=!0,l=m,a=h;break}P=P.sibling}if(!T)throw Error(s(189))}}if(a.alternate!==l)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}function p(n,r,a,l,h,m){for(;n!==null;){if((n.tag===5||n.tag===27||n.tag===6)&&a(n,l,h,m)||(n.tag!==22||n.memoizedState===null)&&(r||n.tag!==5&&n.tag!==27)&&p(n.child,r,a,l,h,m))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||C(r,n,a.child,{foundSelf:!1}),r}function C(n,r,a,l){for(;a!==null;){if(a===r)l.foundSelf=!0;else if(a.tag===5||a.tag===27||a.tag===6){if(l.foundSelf)return n[1]=a,!0;n[0]=a}else if((a.tag!==22||a.memoizedState===null)&&C(n,r,a.child,l))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 R=null,O=null;function A(n,r,a){return n===a?!0:n===r?(R=n,!0):!1}function M(n,r,a){return n===a?(O=n,!1):n===r?(O!==null&&(R=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 l=0,h=n;h;h=a(h))l++;h=0;for(var m=r;m;m=a(m))h++;for(;0<l-h;)n=a(n),l--;for(;0<h-l;)r=a(r),h--;for(;l--;){if(n===r||r!==null&&n===r.alternate)return n;n=a(n),r=a(r)}return null}var D=Object.assign,k=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"),J=Symbol.iterator;function re(n){return n===null||typeof n!="object"?null:(n=J&&n[J]||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,ce=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 Ae(n){return{current:n}}function Le(n){0>Pe||(n.current=ve[Pe],ve[Pe]=null,Pe--)}function Be(n,r){Pe++,ve[Pe]=n.current,n.current=r}var Oe=Ae(null),Ue=Ae(null),be=Ae(null),He=Ae(null);function Ze(n,r){switch(Be(be,r),Be(Ue,n),Be(Oe,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?tS(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=tS(r),n=nS(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Le(Oe),Be(Oe,n)}function at(){Le(Oe),Le(Ue),Le(be)}function de(n){var r=n.memoizedState;r!==null&&(Cl._currentValue=r.memoizedState,Be(He,n)),r=Oe.current;var a=nS(r,n.type);r!==a&&(Be(Ue,n),Be(Oe,a))}function we(n){Ue.current===n&&(Le(Oe),Le(Ue)),He.current===n&&(Le(He),Cl._currentValue=Te)}var Ge,ke;function De(n){if(Ge===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);Ge=r&&r[1]||"",ke=-1<a.stack.indexOf(`
3
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
4
- `+Ge+n+ke}var vt=!1;function ct(n,r){if(!n||vt)return"";vt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(r){var Ce=function(){throw Error()};if(Object.defineProperty(Ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ce,[])}catch(qe){var ie=qe}Reflect.construct(n,[],Ce)}else{try{Ce.call()}catch(qe){ie=qe}Ce=!1;try{var fe=Object.getOwnPropertyDescriptor(n.prototype,"props");Object.defineProperty(n.prototype,"props",{configurable:!0,set:function(){throw Error()}}),Ce=!0,new n}finally{Ce&&(fe!==void 0?Object.defineProperty(n.prototype,"props",fe):delete n.prototype.props)}}}else{try{throw Error()}catch(qe){ie=qe}(Ce=n())&&typeof Ce.catch=="function"&&Ce.catch(function(){})}}catch(qe){if(qe&&ie&&typeof qe.stack=="string")return[qe.stack,ie.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),T=m[0],P=m[1];if(T&&P){var Z=T.split(`
5
- `),ae=P.split(`
6
- `);for(h=l=0;l<Z.length&&!Z[l].includes("DetermineComponentFrameRoot");)l++;for(;h<ae.length&&!ae[h].includes("DetermineComponentFrameRoot");)h++;if(l===Z.length||h===ae.length)for(l=Z.length-1,h=ae.length-1;1<=l&&0<=h&&Z[l]!==ae[h];)h--;for(;1<=l&&0<=h;l--,h--)if(Z[l]!==ae[h]){if(l!==1||h!==1)do if(l--,h--,0>h||Z[l]!==ae[h]){var pe=`
7
- `+Z[l].replace(" at new "," at ");return n.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",n.displayName)),pe}while(1<=l&&0<=h);break}}}finally{vt=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?De(a):""}function pt(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 ct(n.type,!1);case 11:return ct(n.type.render,!1);case 1:return ct(n.type,!0);case 31:return De("Activity");case 30:return De("ViewTransition");default:return""}}function kt(n){try{var r="",a=null;do r+=pt(n,a),a=n,n=n.return;while(n);return r}catch(l){return`
8
- Error generating stack: `+l.message+`
9
- `+l.stack}}var jt=Object.prototype.hasOwnProperty,en=e.unstable_scheduleCallback,sn=e.unstable_cancelCallback,tn=e.unstable_shouldYield,Je=e.unstable_requestPaint,St=e.unstable_now,Xt=e.unstable_getCurrentPriorityLevel,ft=e.unstable_ImmediatePriority,bt=e.unstable_UserBlockingPriority,mt=e.unstable_NormalPriority,Ut=e.unstable_LowPriority,cn=e.unstable_IdlePriority,je=e.log,st=e.unstable_setDisableYieldValue,Ie=null,ze=null;function $e(n){if(typeof je=="function"&&st(n),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(Ie,n)}catch{}}var et=Math.clz32?Math.clz32:W,Tt=Math.log,F=Math.LN2;function W(n){return n>>>=0,n===0?32:31-(Tt(n)/F|0)|0}var ne=256,ye=262144,xe=4194304;function Ke(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 Ve(n,r,a){var l=n.pendingLanes;if(l===0)return 0;var h=0,m=n.suspendedLanes,T=n.pingedLanes;n=n.warmLanes;var P=l&134217727;return P!==0?(l=P&~m,l!==0?h=Ke(l):(T&=P,T!==0?h=Ke(T):a||(a=P&~n,a!==0&&(h=Ke(a))))):(P=l&~m,P!==0?h=Ke(P):T!==0?h=Ke(T):a||(a=l&~n,a!==0&&(h=Ke(a)))),h===0?0:r!==0&&r!==h&&(r&m)===0&&(m=h&-h,a=r&-r,m>=a||m===32&&(a&4194048)!==0)?r:h}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 l=31-et(a),h=1<<l;r|=n[l],a&=~h}return r}function ot(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 wt(n){for(var r=[],a=0;31>a;a++)r.push(n);return r}function dt(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Kt(n,r,a,l,h,m){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),Ce=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&=~Ce}l!==0&&Ft(n,l,0),m!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=m&~(T&~r))}function Ft(n,r,a){n.pendingLanes|=r,n.suspendedLanes&=~r;var l=31-et(r);n.entangledLanes|=r,n.entanglements[l]=n.entanglements[l]|1073741824|a&261930}function An(n,r){var a=n.entangledLanes|=r;for(n=n.entanglements;a;){var l=31-et(a),h=1<<l;h&r|n[l]&r&&(n[l]|=r),a&=~h}}function qt(n,r){var a=r&-r;return a=(a&42)!==0?1:Bt(a),(a&(n.suspendedLanes|r))!==0?0:a}function Bt(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 Cn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Tn(){var n=ce.p;return n!==0?n:(n=window.event,n===void 0?32:US(n.type))}function ei(n,r){var a=ce.p;try{return ce.p=n,r()}finally{ce.p=a}}var dn=Math.random().toString(36).slice(2),fn="__reactFiber$"+dn,Mn="__reactProps$"+dn,jn="__reactContainer$"+dn,Ss="__reactEvents$"+dn,Dr="__reactListeners$"+dn,zi="__reactHandles$"+dn,ti="__reactResources$"+dn,vi="__reactMarker$"+dn,zt="__reactLoad$"+dn;function qn(n){delete n[fn],delete n[Mn],delete n[Dr],delete n[zi]}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=bS(n);n!==null;){if(a=n[fn])return a;n=bS(n)}return r}n=a,a=n.parentNode}return null}function hr(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 Me(n){var r=n[ti];return r||(r=n[ti]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Se(n){n[vi]=!0}function nt(n){n[zt]=void 0}var Ot=new Set,Et={};function Ht(n,r){xn(n,r),xn(n+"Capture",r)}function xn(n,r){for(Et[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]*$"),yt={},Dt={};function an(n){return jt.call(Dt,n)?!0:jt.call(yt,n)?!1:hn.test(n)?Dt[n]=!0:(yt[n]=!0,!1)}var gt=!1;function nr(){var n=gt;return gt=!1,n}function zn(n,r,a){if(an(r))if(a===null)n.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,a)}}function ni(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,l){if(l===null)n.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(r,a,l)}}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 Vo(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function yu(n,r,a){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var h=l.get,m=l.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.call(this)},set:function(T){a=""+T,m.call(this,T)}}),Object.defineProperty(n,r,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(T){a=""+T},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function ws(n){if(!n._valueTracker){var r=Vo(n)?"checked":"value";n._valueTracker=yu(n,r,""+n[r])}}function Ko(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var a=r.getValue(),l="";return n&&(l=Vo(n)?n.checked?"true":"false":n.value),n=l,n!==a?(r.setValue(n),!0):!1}var Sd=/[\n"\\]/g;function Dn(n){return n.replace(Sd,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Rr(n,r,a,l,h,m,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?qo(n,$n(n.value)):qo(n,$n(r)):a!=null?qo(n,$n(a)):l!=null&&n.removeAttribute("value"),h==null&&m!=null&&(n.defaultChecked=!!m),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?n.name=""+$n(P):n.removeAttribute("name")}function Js(n,r,a,l,h,m,T,P){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(n.type=m),r!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){ws(n);return}a=a!=null?""+$n(a):"",r=r!=null?""+$n(r):a,P||r===n.value||(n.value=r),n.defaultValue=r}l=l??h,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=P?n.checked:!!l,n.defaultChecked=!!l,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(n.name=T),ws(n)}function qo(n,r){n.defaultValue!==""+r&&(n.defaultValue=""+r)}function Vr(n,r,a,l){if(n=n.options,r){r={};for(var h=0;h<a.length;h++)r["$"+a[h]]=!0;for(a=0;a<n.length;a++)h=r.hasOwnProperty("$"+n[a].value),n[a].selected!==h&&(n[a].selected=h),h&&l&&(n[a].defaultSelected=!0)}else{for(a=""+$n(a),r=null,h=0;h<n.length;h++){if(n[h].value===a){n[h].selected=!0,l&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function Yo(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 ri(n,r,a,l){if(r==null){if(l!=null){if(a!=null)throw Error(s(92));if(me(l)){if(1<l.length)throw Error(s(93));l=l[0]}a=l}a==null&&(a=""),r=a}a=$n(r),n.defaultValue=a,l=n.textContent,l===a&&l!==""&&l!==null&&(n.value=l),ws(n)}function jr(n,r){if(r){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=r;return}}n.textContent=r}var ea=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 vu(n,r,a){var l=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":l?n.setProperty(r,a):typeof a!="number"||a===0||ea.has(r)?r==="float"?n.cssFloat=a:n[r]=(""+a).trim():n[r]=a+"px"}function ii(n,r,a){if(r!=null&&typeof r!="object")throw Error(s(62));if(n=n.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="",gt=!0);for(var h in r)l=r[h],r.hasOwnProperty(h)&&a[h]!==l&&(vu(n,h,l),gt=!0)}else for(var m in r)r.hasOwnProperty(m)&&vu(n,m,r[m])}function Qa(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 bu=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"]]),xu=/^[\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 pr(n){return xu.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Ir(){}var Xa=null;function Za(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var nn=null,sr=null;function bi(n){var r=hr(n);if(r&&(n=r.stateNode)){var a=n[Mn]||null;e:switch(n=r.stateNode,r.type){case"input":if(Rr(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 l=a[r];if(l!==n&&l.form===n.form){var h=l[Mn]||null;if(!h)throw Error(s(90));Rr(l,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<a.length;r++)l=a[r],l.form===n.form&&Ko(l)}break e;case"textarea":Yo(n,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&Vr(n,!!a.multiple,r,!1)}}}var si=!1;function Wa(n,r,a){if(si)return n(r,a);si=!0;try{var l=n(r);return l}finally{if(si=!1,(nn!==null||sr!==null)&&(wf(),nn&&(r=nn,n=sr,sr=nn=null,bi(r),n)))for(r=0;r<n.length;r++)bi(n[r])}}function Es(n,r){var a=n.stateNode;if(a===null)return null;var l=a[Mn]||null;if(l===null)return null;a=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(s(231,r,typeof a));return a}var gr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ja=!1;if(gr)try{var Su={};Object.defineProperty(Su,"passive",{get:function(){Ja=!0}}),window.addEventListener("test",Su,Su),window.removeEventListener("test",Su,Su)}catch{Ja=!1}var ta=null,vg=null,wd=null;function Zb(){if(wd)return wd;var n,r=vg,a=r.length,l,h="value"in ta?ta.value:ta.textContent,m=h.length;for(n=0;n<a&&r[n]===h[n];n++);var T=a-n;for(l=1;l<=T&&r[a-l]===h[m-l];l++);return wd=h.slice(n,1<l?1-l:void 0)}function Ed(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 Rd(){return!0}function Wb(){return!1}function Pr(n){function r(a,l,h,m,T){this._reactName=a,this._targetInst=h,this.type=l,this.nativeEvent=m,this.target=T,this.currentTarget=null;for(var P in n)n.hasOwnProperty(P)&&(a=n[P],this[P]=a?a(m):m[P]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Rd:Wb,this.isPropagationStopped=Wb,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=Rd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Rd)},persist:function(){},isPersistent:Rd}),r}var na={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cd=Pr(na),wu=D({},na,{view:0,detail:0}),xk=Pr(wu),bg,xg,Eu,Td=D({},wu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wg,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!==Eu&&(Eu&&n.type==="mousemove"?(bg=n.screenX-Eu.screenX,xg=n.screenY-Eu.screenY):xg=bg=0,Eu=n),bg)},movementY:function(n){return"movementY"in n?n.movementY:xg}}),Jb=Pr(Td),Sk=D({},Td,{dataTransfer:0}),wk=Pr(Sk),Ek=D({},wu,{relatedTarget:0}),Sg=Pr(Ek),Rk=D({},na,{animationName:0,elapsedTime:0,pseudoElement:0}),Ck=Pr(Rk),Tk=D({},na,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Ok=Pr(Tk),Ak=D({},na,{data:0}),ex=Pr(Ak),Mk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kk={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"},Nk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dk(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=Nk[n])?!!r[n]:!1}function wg(){return Dk}var jk=D({},wu,{key:function(n){if(n.key){var r=Mk[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Ed(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?kk[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wg,charCode:function(n){return n.type==="keypress"?Ed(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ed(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Ik=Pr(jk),Pk=D({},Td,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tx=Pr(Pk),Lk=D({},na,{submitter:0}),zk=Pr(Lk),_k=D({},wu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wg}),Uk=Pr(_k),Hk=D({},na,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fk=Pr(Hk),Bk=D({},Td,{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}),Vk=Pr(Bk),Kk=D({},na,{newState:0,oldState:0,source:0}),qk=Pr(Kk),Yk=[9,13,27,32],Eg=gr&&"CompositionEvent"in window,Ru=null;gr&&"documentMode"in document&&(Ru=document.documentMode);var Gk=gr&&"TextEvent"in window&&!Ru,nx=gr&&(!Eg||Ru&&8<Ru&&11>=Ru),rx=" ",ix=!1;function sx(n,r){switch(n){case"keyup":return Yk.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ax(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Go=!1;function $k(n,r){switch(n){case"compositionend":return ax(r);case"keypress":return r.which!==32?null:(ix=!0,rx);case"textInput":return n=r.data,n===rx&&ix?null:n;default:return null}}function Qk(n,r){if(Go)return n==="compositionend"||!Eg&&sx(n,r)?(n=Zb(),wd=vg=ta=null,Go=!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 nx&&r.locale!=="ko"?null:r.data;default:return null}}var Xk={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 ox(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!Xk[n.type]:r==="textarea"}function lx(n,r,a,l){nn?sr?sr.push(l):sr=[l]:nn=l,r=Af(r,"onChange"),0<r.length&&(a=new Cd("onChange","change",null,a,l),n.push({event:a,listeners:r}))}var Cu=null,Tu=null;function Zk(n){Q1(n,0)}function Od(n){var r=he(n);if(Ko(r))return n}function ux(n,r){if(n==="change")return r}var cx=!1;if(gr){var Rg;if(gr){var Cg="oninput"in document;if(!Cg){var dx=document.createElement("div");dx.setAttribute("oninput","return;"),Cg=typeof dx.oninput=="function"}Rg=Cg}else Rg=!1;cx=Rg&&(!document.documentMode||9<document.documentMode)}function fx(){Cu&&(Cu.detachEvent("onpropertychange",hx),Tu=Cu=null)}function hx(n){if(n.propertyName==="value"&&Od(Tu)){var r=[];lx(r,Tu,n,Za(n)),Wa(Zk,r)}}function Wk(n,r,a){n==="focusin"?(fx(),Cu=r,Tu=a,Cu.attachEvent("onpropertychange",hx)):n==="focusout"&&fx()}function Jk(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Od(Tu)}function eN(n,r){if(n==="click")return Od(r)}function tN(n,r){if(n==="input"||n==="change")return Od(r)}function nN(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var ai=typeof Object.is=="function"?Object.is:nN;function Ou(n,r){if(ai(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var a=Object.keys(n),l=Object.keys(r);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var h=a[l];if(!jt.call(r,h)||!ai(n[h],r[h]))return!1}return!0}function Tg(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 px(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function gx(n,r){var a=px(n);n=0;for(var l;a;){if(a.nodeType===3){if(l=n+a.textContent.length,n<=r&&l>=r)return{node:a,offset:r-n};n=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=px(a)}}function mx(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?mx(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function yx(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Tg(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=Tg(n.document)}return r}function Og(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 rN=gr&&"documentMode"in document&&11>=document.documentMode,$o=null,Ag=null,Au=null,Mg=!1;function vx(n,r,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Mg||$o==null||$o!==Tg(l)||(l=$o,"selectionStart"in l&&Og(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Au&&Ou(Au,l)||(Au=l,l=Af(Ag,"onSelect"),0<l.length&&(r=new Cd("onSelect","select",null,r,a),n.push({event:r,listeners:l}),r.target=$o)))}function eo(n,r){var a={};return a[n.toLowerCase()]=r.toLowerCase(),a["Webkit"+n]="webkit"+r,a["Moz"+n]="moz"+r,a}var Qo={animationend:eo("Animation","AnimationEnd"),animationiteration:eo("Animation","AnimationIteration"),animationstart:eo("Animation","AnimationStart"),transitionrun:eo("Transition","TransitionRun"),transitionstart:eo("Transition","TransitionStart"),transitioncancel:eo("Transition","TransitionCancel"),transitionend:eo("Transition","TransitionEnd")},kg={},bx={};gr&&(bx=document.createElement("div").style,"AnimationEvent"in window||(delete Qo.animationend.animation,delete Qo.animationiteration.animation,delete Qo.animationstart.animation),"TransitionEvent"in window||delete Qo.transitionend.transition);function to(n){if(kg[n])return kg[n];if(!Qo[n])return n;var r=Qo[n],a;for(a in r)if(r.hasOwnProperty(a)&&a in bx)return kg[n]=r[a];return n}var xx=to("animationend"),Sx=to("animationiteration"),wx=to("animationstart"),iN=to("transitionrun"),sN=to("transitionstart"),aN=to("transitioncancel"),Ex=to("transitionend"),Rx=new Map,Ng="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(" ");Ng.push("scrollEnd");function _i(n,r){Rx.set(n,r),Ht(r,[n])}var oN=0;function Rs(n,r){if(n.name!=null&&n.name!=="auto")return n.name;if(r.autoName!==null)return r.autoName;n=Bi.identifierPrefix;var a=oN++;return n="_"+n+"t_"+a.toString(32)+"_",r.autoName=n}function Cx(n){if(n==null||typeof n=="string")return n;var r=null,a=gl;if(a!==null)for(var l=0;l<a.length;l++){var h=n[a[l]];if(h!=null){if(h==="none")return"none";r=r==null?h:r+(" "+h)}}return r??n.default}function Cs(n,r){return n=Cx(n),r=Cx(r),r==null?n==="auto"?null:n:r==="auto"?null:r}var Ad=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)},xi=[],Xo=0,Dg=0;function Md(){for(var n=Xo,r=Dg=Xo=0;r<n;){var a=xi[r];xi[r++]=null;var l=xi[r];xi[r++]=null;var h=xi[r];xi[r++]=null;var m=xi[r];if(xi[r++]=null,l!==null&&h!==null){var T=l.pending;T===null?h.next=h:(h.next=T.next,T.next=h),l.pending=h}m!==0&&Tx(a,h,m)}}function kd(n,r,a,l){xi[Xo++]=n,xi[Xo++]=r,xi[Xo++]=a,xi[Xo++]=l,Dg|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function jg(n,r,a,l){return kd(n,r,a,l),Nd(n)}function no(n,r){return kd(n,null,null,r),Nd(n)}function Tx(n,r,a){n.lanes|=a;var l=n.alternate;l!==null&&(l.lanes|=a);for(var h=!1,m=n.return;m!==null;)m.childLanes|=a,l=m.alternate,l!==null&&(l.childLanes|=a),m.tag===22&&(n=m.stateNode,n===null||n._visibility&1||(h=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,h&&r!==null&&(h=31-et(a),n=m.hiddenUpdates,l=n[h],l===null?n[h]=[r]:l.push(r),r.lane=a|536870912),m):null}function Nd(n){if(50<Xu)throw Xu=0,Sf=null,Error(s(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Zo={};function lN(n,r,a,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kr(n,r,a,l){return new lN(n,r,a,l)}function Ig(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Ts(n,r){var a=n.alternate;return a===null?(a=Kr(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 Ox(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 Dd(n,r,a,l,h,m){var T=0;if(l=n,typeof l=="function")Ig(l)&&(T=1);else if(typeof l=="string")T=LD(n,a,Oe.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(l){case ee:return n=Kr(31,a,r,h),n.elementType=ee,n.lanes=m,n;case q:return ro(a.children,h,m,r);case X:T=8,h|=24;break;case B:return n=Kr(12,a,r,h|2),n.elementType=B,n.lanes=m,n;case Q:return n=Kr(13,a,r,h),n.elementType=Q,n.lanes=m,n;case $:return n=Kr(19,a,r,h),n.elementType=$,n.lanes=m,n;case G:case I:return n=h|32,n=Kr(30,a,r,n),n.elementType=I,n.lanes=m,n.stateNode={autoName:null,paired:null,clones:null,ref:null},n;default:if(typeof l=="object"&&l!==null)switch(l.$$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,l=null;break e}T=29,a=Error(s(130,n===null?"null":typeof n,"")),l=null}return r=Kr(T,a,r,h),r.elementType=n,r.type=l,r.lanes=m,r}function ro(n,r,a,l){return n=Kr(7,n,l,r),n.lanes=a,n}function Pg(n,r,a){return n=Kr(6,n,null,r),n.lanes=a,n}function Ax(n){var r=Kr(18,null,null,0);return r.stateNode=n,r}function Lg(n,r,a){return r=Kr(4,n.children!==null?n.children:[],n.key,r),r.lanes=a,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var Mx=new WeakMap;function Si(n,r){if(typeof n=="object"&&n!==null){var a=Mx.get(n);return a!==void 0?a:(r={value:n,source:r,stack:kt(r)},Mx.set(n,r),r)}return{value:n,source:r,stack:kt(r)}}var Wo=[],Jo=0,jd=null,Mu=0,wi=[],Ei=0,ra=null,Wi=1,Ji="";function Os(n,r){Wo[Jo++]=Mu,Wo[Jo++]=jd,jd=n,Mu=r}function kx(n,r,a){wi[Ei++]=Wi,wi[Ei++]=Ji,wi[Ei++]=ra,ra=n;var l=Wi;n=Ji;var h=32-et(l)-1;l&=~(1<<h),a+=1;var m=32-et(r)+h;if(30<m){var T=h-h%5;m=(l&(1<<T)-1).toString(32),l>>=T,h-=T,Wi=1<<32-et(r)+h|a<<h|l,Ji=m+n}else Wi=1<<m|a<<h|l,Ji=n}function Id(n){n.return!==null&&(Os(n,1),kx(n,1,0))}function zg(n){for(;n===jd;)jd=Wo[--Jo],Wo[Jo]=null,Mu=Wo[--Jo],Wo[Jo]=null;for(;n===ra;)ra=wi[--Ei],wi[Ei]=null,Ji=wi[--Ei],wi[Ei]=null,Wi=wi[--Ei],wi[Ei]=null}function Nx(n,r){wi[Ei++]=Wi,wi[Ei++]=Ji,wi[Ei++]=ra,Wi=r.id,Ji=r.overflow,ra=n}var ar=null,kn=null,Vt=!1,ia=null,Ri=!1,_g=Error(s(519));function sa(n){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ku(Si(r,n)),_g}function Dx(n){var r=n.stateNode,a=n.type,l=n.memoizedProps;switch(r[fn]=n,r[Mn]=l,a){case"dialog":Gt("cancel",r),Gt("close",r);break;case"iframe":case"object":case"embed":Gt("load",r);break;case"video":case"audio":for(a=0;a<Wu.length;a++)Gt(Wu[a],r);break;case"source":Gt("error",r);break;case"img":case"image":case"link":Gt("error",r),Gt("load",r);break;case"details":Gt("toggle",r);break;case"input":Gt("invalid",r),Js(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Gt("invalid",r);break;case"textarea":Gt("invalid",r),ri(r,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||l.suppressHydrationWarning===!0||J1(r.textContent,a)?(l.popover!=null&&(Gt("beforetoggle",r),Gt("toggle",r)),l.onScroll!=null&&Gt("scroll",r),l.onScrollEnd!=null&&Gt("scrollend",r),l.onClick!=null&&(r.onclick=Ir),r=!0):r=!1,r||sa(n,!0)}function Pd(n){for(ar=n.return;ar;)switch(ar.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:ar=ar.return}}function el(n){if(n!==ar)return!1;if(!Vt)return Pd(n),Vt=!0,!1;var r=n.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||p0(n.type,n.memoizedProps)),a=!a),a&&kn&&sa(n),Pd(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));kn=vS(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));kn=vS(n)}else r===27?(r=kn,Sa(n.type)?(n=E0,E0=null,kn=n):kn=r):kn=ar?Ti(n.stateNode.nextSibling):null;return!0}function io(){kn=ar=null,Vt=!1}function Ug(){var n=ia;return n!==null&&(Gr===null?Gr=n:Gr.push.apply(Gr,n),ia=null),n}function ku(n){ia===null?ia=[n]:ia.push(n)}var Hg=Ae(null),so=null,As=null;function aa(n,r,a){Be(Hg,r._currentValue),r._currentValue=a}function Ms(n){n._currentValue=Hg.current,Le(Hg)}function Ld(n,r,a){for(;n!==null;){var l=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),n===a)break;n=n.return}}function Fg(n,r,a,l){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var m=h.dependencies;if(m!==null){var T=h.child;m=m.firstContext;e:for(;m!==null;){var P=m;m=h;for(var Z=0;Z<r.length;Z++)if(P.context===r[Z]){m.lanes|=a,P=m.alternate,P!==null&&(P.lanes|=a),Ld(m.return,a,n),l||(T=null);break e}m=P.next}}else if(h.tag===18){if(T=h.return,T===null)throw Error(s(341));T.lanes|=a,m=T.alternate,m!==null&&(m.lanes|=a),Ld(T,a,n),T=null}else h.tag===13&&h.memoizedState!==null&&h.memoizedState.dehydrated===null?(h.lanes|=a,T=h.alternate,T!==null&&(T.lanes|=a),Ld(h.return,a,n),T=h.child,T=T!==null?T.sibling:null):T=h.child;if(T!==null)T.return=h;else for(T=h;T!==null;){if(T===n){T=null;break}if(h=T.sibling,h!==null){h.return=T.return,T=h;break}T=T.return}h=T}}function ao(n,r,a,l){n=null;for(var h=r,m=!1;h!==null;){if(!m){if((h.flags&524288)!==0)m=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var T=h.alternate;if(T===null)throw Error(s(387));if(T=T.memoizedProps,T!==null){var P=h.type;ai(h.pendingProps.value,T.value)||(n!==null?n.push(P):n=[P])}}else if(h===He.current){if(T=h.alternate,T===null)throw Error(s(387));T.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(Cl):n=[Cl])}h=h.return}return n!==null&&Fg(r,n,a,l),r.flags|=262144,n!==null}function zd(n){for(n=n.firstContext;n!==null;){if(!ai(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function oo(n){so=n,As=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function mr(n){return jx(so,n)}function _d(n,r){return so===null&&oo(n),jx(n,r)}function jx(n,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},As===null){if(n===null)throw Error(s(308));As=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else As=As.next=r;return a}var uN=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(a,l){n.push(l)}};this.abort=function(){r.aborted=!0,n.forEach(function(a){return a()})}},cN=e.unstable_scheduleCallback,dN=e.unstable_NormalPriority,Qn={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bg(){return{controller:new uN,data:new Map,refCount:0}}function Nu(n){n.refCount--,n.refCount===0&&cN(dN,function(){n.controller.abort()})}function Ix(n,r){if((n.pendingLanes&4194048)!==0){var a=n.transitionTypes;for(a===null&&(a=n.transitionTypes=[]),n=0;n<r.length;n++){var l=r[n];a.indexOf(l)===-1&&a.push(l)}}}var Du=null;function fN(n){var r=n.transitionTypes;return n.transitionTypes=null,r}var ju=null,Vg=0,lo=0,tl=null;function hN(n,r){if(ju===null){var a=ju=[];Vg=0,lo=s0(),tl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Vg++,r.then(Px,Px),r}function Px(){if(--Vg===0&&(Du=null,ju!==null)){tl!==null&&(tl.status="fulfilled");var n=ju;ju=null,lo=0,tl=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function pN(n,r){var a=[],l={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return n.then(function(){l.status="fulfilled",l.value=r;for(var h=0;h<a.length;h++)(0,a[h])(r)},function(h){for(l.status="rejected",l.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),l}var Lx=ge.S;ge.S=function(n,r){if(A1=St(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&hN(n,r),Du!==null)for(var a=bl;a!==null;)Ix(a,Du),a=a.next;if(a=n.types,a!==null){for(var l=bl;l!==null;)Ix(l,a),l=l.next;if(lo!==0){l=Du,l===null&&(l=Du=[]);for(var h=0;h<a.length;h++){var m=a[h];l.indexOf(m)===-1&&l.push(m)}}}Lx!==null&&Lx(n,r)};var uo=Ae(null);function Kg(){var n=uo.current;return n!==null?n:On.pooledCache}function Ud(n,r){r===null?Be(uo,uo.current):Be(uo,r.pool)}function zx(){var n=Kg();return n===null?null:{parent:Qn._currentValue,pool:n}}var nl=Error(s(460)),qg=Error(s(474)),Hd=Error(s(542)),Fd={then:function(){}};function _x(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Ux(n,r,a){switch(a=n[a],a===void 0?n.push(r):a!==r&&(r.then(Ir,Ir),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Fx(n),n===void 0&&!("reason"in r)?Error(s(600)):n;default:if(typeof r.status=="string")r.then(Ir,Ir);else{if(n=On,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=r,n.status="pending",n.then(function(l){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=l}},function(l){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Fx(n),n}throw fo=r,nl}}function co(n){try{var r=n._init;return r(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(fo=a,nl):a}}var fo=null;function Hx(){if(fo===null)throw Error(s(459));var n=fo;return fo=null,n}function Fx(n){if(n===nl||n===Hd)throw Error(s(483))}var rl=null,Iu=0;function Bd(n){var r=Iu;return Iu+=1,rl===null&&(rl=[]),Ux(rl,n,r)}function oa(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function Vd(n,r){throw r.$$typeof===k?Error(s(525)):(n=Object.prototype.toString.call(r),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function Bx(n){function r(se,te){if(n){var ue=se.deletions;ue===null?(se.deletions=[te],se.flags|=16):ue.push(te)}}function a(se,te){if(!n)return null;for(;te!==null;)r(se,te),te=te.sibling;return null}function l(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 h(se,te){return se=Ts(se,te),se.index=0,se.sibling=null,se}function m(se,te,ue){return se.index=ue,n?(ue=se.alternate,ue!==null?(ue=ue.index,ue<te?(se.flags|=2,te):ue):(se.flags|=134217730,te)):(se.flags|=1048576,te)}function T(se){return n&&se.alternate===null&&(se.flags|=134217730),se}function P(se,te,ue,Re){return te===null||te.tag!==6?(te=Pg(ue,se.mode,Re),te.return=se,te):(te=h(te,ue),te.return=se,te)}function Z(se,te,ue,Re){var We=ue.type;return We===q?(se=pe(se,te,ue.props.children,Re,ue.key),oa(se,ue),se):te!==null&&(te.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===Y&&co(We)===te.type)?(te=h(te,ue.props),oa(te,ue),te.return=se,te):(te=Dd(ue.type,ue.key,ue.props,null,se.mode,Re),oa(te,ue),te.return=se,te)}function ae(se,te,ue,Re){return te===null||te.tag!==4||te.stateNode.containerInfo!==ue.containerInfo||te.stateNode.implementation!==ue.implementation?(te=Lg(ue,se.mode,Re),te.return=se,te):(te=h(te,ue.children||[]),te.return=se,te)}function pe(se,te,ue,Re,We){return te===null||te.tag!==7?(te=ro(ue,se.mode,Re,We),te.return=se,te):(te=h(te,ue),te.return=se,te)}function Ce(se,te,ue){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Pg(""+te,se.mode,ue),te.return=se,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case _:return ue=Dd(te.type,te.key,te.props,null,se.mode,ue),oa(ue,te),ue.return=se,ue;case L:return te=Lg(te,se.mode,ue),te.return=se,te;case Y:return te=co(te),Ce(se,te,ue)}if(me(te)||re(te))return te=ro(te,se.mode,ue,null),te.return=se,te;if(typeof te.then=="function")return Ce(se,Bd(te),ue);if(te.$$typeof===U)return Ce(se,_d(se,te),ue);Vd(se,te)}return null}function ie(se,te,ue,Re){var We=te!==null?te.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return We!==null?null:P(se,te,""+ue,Re);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case _:return ue.key===We?Z(se,te,ue,Re):null;case L:return ue.key===We?ae(se,te,ue,Re):null;case Y:return ue=co(ue),ie(se,te,ue,Re)}if(me(ue)||re(ue))return We!==null?null:pe(se,te,ue,Re,null);if(typeof ue.then=="function")return ie(se,te,Bd(ue),Re);if(ue.$$typeof===U)return ie(se,te,_d(se,ue),Re);Vd(se,ue)}return null}function fe(se,te,ue,Re,We){if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return se=se.get(ue)||null,P(te,se,""+Re,We);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case _:return se=se.get(Re.key===null?ue:Re.key)||null,Z(te,se,Re,We);case L:return se=se.get(Re.key===null?ue:Re.key)||null,ae(te,se,Re,We);case Y:return Re=co(Re),fe(se,te,ue,Re,We)}if(me(Re)||re(Re))return se=se.get(ue)||null,pe(te,se,Re,We,null);if(typeof Re.then=="function")return fe(se,te,ue,Bd(Re),We);if(Re.$$typeof===U)return fe(se,te,ue,_d(te,Re),We);Vd(te,Re)}return null}function qe(se,te,ue,Re){for(var We=null,Wt=null,lt=te,xt=te=0,Wn=null;lt!==null&&xt<ue.length;xt++){lt.index>xt?(Wn=lt,lt=null):Wn=lt.sibling;var rn=ie(se,lt,ue[xt],Re);if(rn===null){lt===null&&(lt=Wn);break}n&&lt&&rn.alternate===null&&r(se,lt),te=m(rn,te,xt),Wt===null?We=rn:Wt.sibling=rn,Wt=rn,lt=Wn}if(xt===ue.length)return a(se,lt),Vt&&Os(se,xt),We;if(lt===null){for(;xt<ue.length;xt++)lt=Ce(se,ue[xt],Re),lt!==null&&(te=m(lt,te,xt),Wt===null?We=lt:Wt.sibling=lt,Wt=lt);return Vt&&Os(se,xt),We}for(lt=l(lt);xt<ue.length;xt++)Wn=fe(lt,se,xt,ue[xt],Re),Wn!==null&&(n&&(rn=Wn.alternate,rn!==null&&lt.delete(rn.key===null?xt:rn.key)),te=m(Wn,te,xt),Wt===null?We=Wn:Wt.sibling=Wn,Wt=Wn);return n&&lt.forEach(function(Ta){return r(se,Ta)}),Vt&&Os(se,xt),We}function rt(se,te,ue,Re){if(ue==null)throw Error(s(151));for(var We=null,Wt=null,lt=te,xt=te=0,Wn=null,rn=ue.next();lt!==null&&!rn.done;xt++,rn=ue.next()){lt.index>xt?(Wn=lt,lt=null):Wn=lt.sibling;var Ta=ie(se,lt,rn.value,Re);if(Ta===null){lt===null&&(lt=Wn);break}n&&lt&&Ta.alternate===null&&r(se,lt),te=m(Ta,te,xt),Wt===null?We=Ta:Wt.sibling=Ta,Wt=Ta,lt=Wn}if(rn.done)return a(se,lt),Vt&&Os(se,xt),We;if(lt===null){for(;!rn.done;xt++,rn=ue.next())rn=Ce(se,rn.value,Re),rn!==null&&(te=m(rn,te,xt),Wt===null?We=rn:Wt.sibling=rn,Wt=rn);return Vt&&Os(se,xt),We}for(lt=l(lt);!rn.done;xt++,rn=ue.next())rn=fe(lt,se,xt,rn.value,Re),rn!==null&&(n&&(Wn=rn.alternate,Wn!==null&&lt.delete(Wn.key===null?xt:Wn.key)),te=m(rn,te,xt),Wt===null?We=rn:Wt.sibling=rn,Wt=rn);return n&&lt.forEach(function($D){return r(se,$D)}),Vt&&Os(se,xt),We}function Pt(se,te,ue,Re){if(typeof ue=="object"&&ue!==null&&ue.type===q&&ue.key===null&&ue.props.ref===void 0&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case _:e:{for(var We=ue.key;te!==null;){if(te.key===We){if(We=ue.type,We===q){if(te.tag===7){a(se,te.sibling),Re=h(te,ue.props.children),oa(Re,ue),Re.return=se,se=Re;break e}}else if(te.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===Y&&co(We)===te.type){a(se,te.sibling),Re=h(te,ue.props),oa(Re,ue),Re.return=se,se=Re;break e}a(se,te);break}else r(se,te);te=te.sibling}ue.type===q?(Re=ro(ue.props.children,se.mode,Re,ue.key),oa(Re,ue),Re.return=se,se=Re):(Re=Dd(ue.type,ue.key,ue.props,null,se.mode,Re),oa(Re,ue),Re.return=se,se=Re)}return T(se);case L:e:{for(We=ue.key;te!==null;){if(te.key===We)if(te.tag===4&&te.stateNode.containerInfo===ue.containerInfo&&te.stateNode.implementation===ue.implementation){a(se,te.sibling),Re=h(te,ue.children||[]),Re.return=se,se=Re;break e}else{a(se,te);break}else r(se,te);te=te.sibling}Re=Lg(ue,se.mode,Re),Re.return=se,se=Re}return T(se);case Y:return ue=co(ue),Pt(se,te,ue,Re)}if(me(ue))return qe(se,te,ue,Re);if(re(ue)){if(We=re(ue),typeof We!="function")throw Error(s(150));return ue=We.call(ue),rt(se,te,ue,Re)}if(typeof ue.then=="function")return Pt(se,te,Bd(ue),Re);if(ue.$$typeof===U)return Pt(se,te,_d(se,ue),Re);Vd(se,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,te!==null&&te.tag===6?(a(se,te.sibling),Re=h(te,ue),Re.return=se,se=Re):(a(se,te),Re=Pg(ue,se.mode,Re),Re.return=se,se=Re),T(se)):a(se,te)}return function(se,te,ue,Re){try{Iu=0;var We=Pt(se,te,ue,Re);return rl=null,We}catch(lt){if(lt===nl||lt===Hd)throw lt;var Wt=Kr(29,lt,null,se.mode);return Wt.lanes=Re,Wt.return=se,Wt}}}var ho=Bx(!0),Vx=Bx(!1),la=!1;function Yg(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gg(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 ua(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function ca(n,r,a){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(un&2)!==0){var h=l.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),l.pending=r,r=Nd(n),Tx(n,null,a),r}return kd(n,l,r,a),Nd(n)}function Pu(n,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var l=r.lanes;l&=n.pendingLanes,a|=l,r.lanes=a,An(n,a)}}function $g(n,r){var a=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var h=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var T={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?h=m=T:m=m.next=T,a=a.next}while(a!==null);m===null?h=m=r:m=m.next=r}else h=m=r;a={baseState:l.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=r:n.next=r,a.lastBaseUpdate=r}var Qg=!1;function Lu(){if(Qg){var n=tl;if(n!==null)throw n}}function zu(n,r,a,l){Qg=!1;var h=n.updateQueue;la=!1;var m=h.firstBaseUpdate,T=h.lastBaseUpdate,P=h.shared.pending;if(P!==null){h.shared.pending=null;var Z=P,ae=Z.next;Z.next=null,T===null?m=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(m!==null){var Ce=h.baseState;T=0,pe=ae=Z=null,P=m;do{var ie=P.lane&-536870913,fe=ie!==P.lane;if(fe?(Zt&ie)===ie:(l&ie)===ie){ie!==0&&ie===lo&&(Qg=!0),pe!==null&&(pe=pe.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var qe=n,rt=P;ie=r;var Pt=a;switch(rt.tag){case 1:if(qe=rt.payload,typeof qe=="function"){Ce=qe.call(Pt,Ce,ie);break e}Ce=qe;break e;case 3:qe.flags=qe.flags&-65537|128;case 0:if(qe=rt.payload,ie=typeof qe=="function"?qe.call(Pt,Ce,ie):qe,ie==null)break e;Ce=D({},Ce,ie);break e;case 2:la=!0}}ie=P.callback,ie!==null&&(n.flags|=64,fe&&(n.flags|=8192),fe=h.callbacks,fe===null?h.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=Ce):pe=pe.next=fe,T|=ie;if(P=P.next,P===null){if(P=h.shared.pending,P===null)break;fe=P,P=fe.next,fe.next=null,h.lastBaseUpdate=fe,h.shared.pending=null}}while(!0);pe===null&&(Z=Ce),h.baseState=Z,h.firstBaseUpdate=ae,h.lastBaseUpdate=pe,m===null&&(h.shared.lanes=0),ya|=T,n.lanes=T,n.memoizedState=Ce}}function Kx(n,r){if(typeof n!="function")throw Error(s(191,n));n.call(r)}function qx(n,r){var a=n.callbacks;if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)Kx(a[n],r)}var da=Ae(null),Kd=Ae(0);function Yx(n,r){n=Is,Be(Kd,n),Be(da,r),Is=n|r.baseLanes}function Xg(){Be(Kd,Is),Be(da,da.current)}function Zg(){Is=Kd.current,Le(da),Le(Kd)}var yr=Ae(null),Cr=null;function fa(n){var r=n.alternate;Be(vr,vr.current&1),Be(yr,n),Cr===null&&(r===null||da.current!==null||r.memoizedState!==null)&&(Cr=n)}function Wg(n){Be(vr,vr.current),Be(yr,n),Cr===null&&(Cr=n)}function Gx(n){n.tag===22?(Be(vr,vr.current),Be(yr,n),Cr===null&&(Cr=n)):ha()}function ha(){Be(vr,vr.current),Be(yr,yr.current)}function oi(n){Le(yr),Cr===n&&(Cr=null),Le(vr)}var vr=Ae(0);function _u(n,r){Be(yr,yr.current),Be(vr,r)}function Jg(n){Le(vr),Le(yr),Cr===n&&(Cr=null)}function qd(n){for(var r=n;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||S0(a)||w0(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 ks=0,It=null,Sn=null,Xn=null,Yd=!1,il=!1,po=!1,Gd=0,Uu=0,sl=null,gN=0;function Bn(){throw Error(s(321))}function em(n,r){if(r===null)return!1;for(var a=0;a<r.length&&a<n.length;a++)if(!ai(n[a],r[a]))return!1;return!0}function tm(n,r,a,l,h,m){return ks=m,It=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,ge.H=n===null||n.memoizedState===null?k2:N2,po=!1,m=a(l,h),po=!1,il&&(m=Qx(r,a,l,h)),$x(n),m}function $x(n){ge.H=ef;var r=Sn!==null&&Sn.next!==null;if(ks=0,Xn=Sn=It=null,Yd=!1,Uu=0,sl=null,r)throw Error(s(300));n===null||Zn||(n=n.dependencies,n!==null&&zd(n)&&(Zn=!0))}function Qx(n,r,a,l){It=n;var h=0;do{if(il&&(sl=null),Uu=0,il=!1,25<=h)throw Error(s(301));if(h+=1,Xn=Sn=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}ge.H=EN,m=r(a,l)}while(il);return m}function mN(){var n=ge.H,r=n.useState()[0];return r=typeof r.then=="function"?Hu(r):r,n=n.useState()[0],(Sn!==null?Sn.memoizedState:null)!==n&&(It.flags|=1024),r}function nm(){var n=Gd!==0;return Gd=0,n}function rm(n,r,a){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~a}function im(n){if(Yd){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Yd=!1}ks=0,Xn=Sn=It=null,il=!1,Uu=Gd=0,sl=null}function Lr(){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 $d(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hu(n){var r=Uu;return Uu+=1,sl===null&&(sl=[]),n=Ux(sl,n,r),r=It,(Xn===null?r.memoizedState:Xn.next)===null&&(r=r.alternate,ge.H=r===null||r.memoizedState===null?k2:N2),n}function Qd(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Hu(n);if(n.$$typeof===V)return;if(n.$$typeof===U)return mr(n)}throw Error(s(438,String(n)))}function sm(n){var r=null,a=It.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var l=It.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=$d(),It.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(n),l=0;l<n;l++)a[l]=oe;return r.index++,a}function Ns(n,r){return typeof r=="function"?r(n):r}function Xd(n){var r=Yn();return am(r,Sn,n)}function am(n,r,a){var l=n.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=a;var h=n.baseQueue,m=l.pending;if(m!==null){if(h!==null){var T=h.next;h.next=m.next,m.next=T}r.baseQueue=h=m,l.pending=null}if(m=n.baseState,h===null)n.memoizedState=m;else{r=h.next;var P=T=null,Z=null,ae=r,pe=!1;do{var Ce=ae.lane&-536870913;if(Ce!==ae.lane?(Zt&Ce)===Ce:(ks&Ce)===Ce){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}),Ce===lo&&(pe=!0);else if((ks&ie)===ie){ae=ae.next,ie===lo&&(pe=!0);continue}else Ce={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Z===null?(P=Z=Ce,T=m):Z=Z.next=Ce,It.lanes|=ie,ya|=ie;Ce=ae.action,po&&a(m,Ce),m=ae.hasEagerState?ae.eagerState:a(m,Ce)}else ie={lane:Ce,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},Z===null?(P=Z=ie,T=m):Z=Z.next=ie,It.lanes|=Ce,ya|=Ce;ae=ae.next}while(ae!==null&&ae!==r);if(Z===null?T=m:Z.next=P,!ai(m,n.memoizedState)&&(Zn=!0,pe&&(a=tl,a!==null)))throw a;n.memoizedState=m,n.baseState=T,n.baseQueue=Z,l.lastRenderedState=m}return h===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function om(n){var r=Yn(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var l=a.dispatch,h=a.pending,m=r.memoizedState;if(h!==null){a.pending=null;var T=h=h.next;do m=n(m,T.action),T=T.next;while(T!==h);ai(m,r.memoizedState)||(Zn=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),a.lastRenderedState=m}return[m,l]}function Xx(n,r,a){var l=It,h=Yn(),m=Vt;if(m){if(a===void 0)throw Error(s(407));a=a()}else a=r();var T=!ai((Sn||h).memoizedState,a);if(T&&(h.memoizedState=a,Zn=!0),h=h.queue,cm(Jx.bind(null,l,h,n),[n]),n=h.getSnapshot!==r||T||Xn!==null&&(Xn.memoizedState.tag&1)!==0,al(n?9:8,{destroy:void 0},Wx.bind(null,l,h,a,r),null),n){if(l.flags|=2048,On===null)throw Error(s(349));m||(ks&127)!==0||Zx(l,r,a)}return a}function Zx(n,r,a){n.flags|=16384,n={getSnapshot:r,value:a},r=It.updateQueue,r===null?(r=$d(),It.updateQueue=r,r.stores=[n]):(a=r.stores,a===null?r.stores=[n]:a.push(n))}function Wx(n,r,a,l){r.value=a,r.getSnapshot=l,e2(r)&&t2(n)}function Jx(n,r,a){return a(function(){e2(r)&&t2(n)})}function e2(n){var r=n.getSnapshot;n=n.value;try{var a=r();return!ai(n,a)}catch{return!0}}function t2(n){var r=no(n,2);r!==null&&$r(r,n,2)}function lm(n){var r=Lr();if(typeof n=="function"){var a=n;if(n=a(),po){$e(!0);try{a()}finally{$e(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:n},r}function n2(n,r,a,l){return n.baseState=a,am(n,Sn,typeof l=="function"?l:Ns)}function yN(n,r,a,l,h){if(Jd(n))throw Error(s(485));if(n=r.action,n!==null){var m={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){m.listeners.push(T)}};ge.T!==null?a(!0):m.isTransition=!1,l(m),a=r.pending,a===null?(m.next=r.pending=m,r2(r,m)):(m.next=a.next,r.pending=a.next=m)}}function r2(n,r){var a=r.action,l=r.payload,h=n.state;if(r.isTransition){var m=ge.T,T={};T.types=m!==null?m.types:null,ge.T=T;try{var P=a(h,l),Z=ge.S;Z!==null&&Z(T,P),i2(n,r,P)}catch(ae){um(n,r,ae)}finally{m!==null&&T.types!==null&&(m.types=T.types),ge.T=m}}else try{m=a(h,l),i2(n,r,m)}catch(ae){um(n,r,ae)}}function i2(n,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){s2(n,r,l)},function(l){return um(n,r,l)}):s2(n,r,a)}function s2(n,r,a){r.status="fulfilled",r.value=a,a2(r),n.state=a,r=n.pending,r!==null&&(a=r.next,a===r?n.pending=null:(a=a.next,r.next=a,r2(n,a)))}function um(n,r,a){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=a,a2(r),r=r.next;while(r!==l)}n.action=null}function a2(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function o2(n,r){return r}function l2(n,r){if(Vt){var a=On.formState;if(a!==null){e:{var l=It;if(Vt){if(kn){t:{for(var h=kn,m=Ri;h.nodeType!==8;){if(!m){h=null;break t}if(h=Ti(h.nextSibling),h===null){h=null;break t}}m=h.data,h=m==="F!"||m==="F"?h:null}if(h){kn=Ti(h.nextSibling),l=h.data==="F!";break e}}sa(l)}l=!1}l&&(r=a[0])}}return a=Lr(),a.memoizedState=a.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o2,lastRenderedState:r},a.queue=l,a=O2.bind(null,It,l),l.dispatch=a,l=lm(!1),m=gm.bind(null,It,!1,l.queue),l=Lr(),h={state:r,dispatch:null,action:n,pending:null},l.queue=h,a=yN.bind(null,It,h,m,a),h.dispatch=a,l.memoizedState=n,[r,a,!1]}function u2(n){var r=Yn();return c2(r,Sn,n)}function c2(n,r,a){if(r=am(n,r,o2)[0],n=Xd(Ns)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var l=Hu(r)}catch(T){throw T===nl?Hd:T}else l=r;r=Yn();var h=r.queue,m=h.dispatch;return a!==r.memoizedState&&(It.flags|=2048,al(9,{destroy:void 0},vN.bind(null,h,a),null)),[l,m,n]}function vN(n,r){n.action=r}function d2(n){var r=Yn(),a=Sn;if(a!==null)return c2(r,a,n);Yn(),r=r.memoizedState,a=Yn();var l=a.queue.dispatch;return a.memoizedState=n,[r,l,!1]}function al(n,r,a,l){return n={tag:n,create:a,deps:l,inst:r,next:null},r=It.updateQueue,r===null&&(r=$d(),It.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=n.next=n:(l=a.next,a.next=n,n.next=l,r.lastEffect=n),n}function f2(){return Yn().memoizedState}function Zd(n,r,a,l){var h=Lr();It.flags|=n,h.memoizedState=al(1|r,{destroy:void 0},a,l===void 0?null:l)}function Wd(n,r,a,l){var h=Yn();l=l===void 0?null:l;var m=h.memoizedState.inst;Sn!==null&&l!==null&&em(l,Sn.memoizedState.deps)?h.memoizedState=al(r,m,a,l):(It.flags|=n,h.memoizedState=al(1|r,m,a,l))}function h2(n,r){Zd(8390656,8,n,r)}function cm(n,r){Wd(2048,8,n,r)}function bN(n){It.flags|=4;var r=It.updateQueue;if(r===null)r=$d(),It.updateQueue=r,r.events=[n];else{var a=r.events;a===null?r.events=[n]:a.push(n)}}function p2(n){var r=Yn().memoizedState;return bN({ref:r,nextImpl:n}),function(){if((un&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function g2(n,r){return Wd(4,2,n,r)}function m2(n,r){return Wd(4,4,n,r)}function y2(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 v2(n,r,a){a=a!=null?a.concat([n]):null,Wd(4,4,y2.bind(null,r,n),a)}function dm(){}function b2(n,r){var a=Yn();r=r===void 0?null:r;var l=a.memoizedState;return r!==null&&em(r,l[1])?l[0]:(a.memoizedState=[n,r],n)}function x2(n,r){var a=Yn();r=r===void 0?null:r;var l=a.memoizedState;if(r!==null&&em(r,l[1]))return l[0];if(l=n(),po){$e(!0);try{n()}finally{$e(!1)}}return a.memoizedState=[l,r],l}function fm(n,r,a){return a===void 0||(ks&1073741824)!==0&&(Zt&261930)===0?n.memoizedState=r:(n.memoizedState=a,n=k1(),It.lanes|=n,ya|=n,a)}function S2(n,r,a,l){return ai(a,r)?a:da.current!==null?(n=fm(n,a,l),ai(n,r)||(Zn=!0),n):(ks&106)===0||(ks&1073741824)!==0&&(Zt&261930)===0?(Zn=!0,n.memoizedState=a):(n=k1(),It.lanes|=n,ya|=n,r)}function w2(n,r,a,l,h){var m=ce.p;ce.p=m!==0&&8>m?m:8;var T=ge.T,P={};P.types=T!==null?T.types:null,ge.T=P,gm(n,!1,r,a);try{var Z=h(),ae=ge.S;if(ae!==null&&ae(P,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var pe=pN(Z,l);Fu(n,r,pe,di(n))}else Fu(n,r,l,di(n))}catch(Ce){Fu(n,r,{then:function(){},status:"rejected",reason:Ce},di())}finally{ce.p=m,T!==null&&P.types!==null&&(T.types=P.types),ge.T=T}}function xN(){}function hm(n,r,a,l){if(n.tag!==5)throw Error(s(476));var h=E2(n).queue;w2(n,h,r,Te,a===null?xN:function(){return R2(n),a(l)})}function E2(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:Ns,lastRenderedState:Te},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ns,lastRenderedState:a},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function R2(n){var r=E2(n);r.next===null&&(r=n.alternate.memoizedState),Fu(n,r.next.queue,{},di())}function pm(){return mr(Cl)}function C2(){return Yn().memoizedState}function T2(){return Yn().memoizedState}function SN(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var a=di();n=ua(a);var l=ca(r,n,a);l!==null&&($r(l,r,a),Pu(l,r,a)),r={cache:Bg()},n.payload=r;return}r=r.return}}function wN(n,r,a){var l=di();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Jd(n)?A2(r,a):(a=jg(n,r,a,l),a!==null&&($r(a,n,l),M2(a,r,l)))}function O2(n,r,a){var l=di();Fu(n,r,a,l)}function Fu(n,r,a,l){var h={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Jd(n))A2(r,h);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var T=r.lastRenderedState,P=m(T,a);if(h.hasEagerState=!0,h.eagerState=P,ai(P,T))return kd(n,r,h,0),On===null&&Md(),!1}catch{}if(a=jg(n,r,h,l),a!==null)return $r(a,n,l),M2(a,r,l),!0}return!1}function gm(n,r,a,l){if(l={lane:2,revertLane:s0(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Jd(n)){if(r)throw Error(s(479))}else r=jg(n,a,l,2),r!==null&&$r(r,n,2)}function Jd(n){var r=n.alternate;return n===It||r!==null&&r===It}function A2(n,r){il=Yd=!0;var a=n.pending;a===null?r.next=r:(r.next=a.next,a.next=r),n.pending=r}function M2(n,r,a){if((a&4194048)!==0){var l=r.lanes;l&=n.pendingLanes,a|=l,r.lanes=a,An(n,a)}}var ef={readContext:mr,use:Qd,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},k2={readContext:mr,use:Qd,useCallback:function(n,r){return Lr().memoizedState=[n,r===void 0?null:r],n},useContext:mr,useEffect:h2,useImperativeHandle:function(n,r,a){a=a!=null?a.concat([n]):null,Zd(4194308,4,y2.bind(null,r,n),a)},useLayoutEffect:function(n,r){return Zd(4194308,4,n,r)},useInsertionEffect:function(n,r){Zd(4,2,n,r)},useMemo:function(n,r){var a=Lr();r=r===void 0?null:r;var l=n();if(po){$e(!0);try{n()}finally{$e(!1)}}return a.memoizedState=[l,r],l},useReducer:function(n,r,a){var l=Lr();if(a!==void 0){var h=a(r);if(po){$e(!0);try{a(r)}finally{$e(!1)}}}else h=r;return l.memoizedState=l.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},l.queue=n,n=n.dispatch=wN.bind(null,It,n),[l.memoizedState,n]},useRef:function(n){var r=Lr();return n={current:n},r.memoizedState=n},useState:function(n){n=lm(n);var r=n.queue,a=O2.bind(null,It,r);return r.dispatch=a,[n.memoizedState,a]},useDebugValue:dm,useDeferredValue:function(n,r){var a=Lr();return fm(a,n,r)},useTransition:function(){var n=lm(!1);return n=w2.bind(null,It,n.queue,!0,!1),Lr().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,a){var l=It,h=Lr();if(Vt){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),On===null)throw Error(s(349));(Zt&127)!==0||Zx(l,r,a)}h.memoizedState=a;var m={value:a,getSnapshot:r};return h.queue=m,h2(Jx.bind(null,l,m,n),[n]),l.flags|=2048,al(9,{destroy:void 0},Wx.bind(null,l,m,a,r),null),a},useId:function(){var n=Lr(),r=On.identifierPrefix;if(Vt){var a=Ji,l=Wi;a=(l&~(1<<32-et(l)-1)).toString(32)+a,r="_"+r+"R_"+a,a=Gd++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=gN++,r="_"+r+"r_"+a.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:pm,useFormState:l2,useActionState:l2,useOptimistic:function(n){var r=Lr();r.memoizedState=r.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=gm.bind(null,It,!0,a),a.dispatch=r,[n,r]},useMemoCache:sm,useCacheRefresh:function(){return Lr().memoizedState=SN.bind(null,It)},useEffectEvent:function(n){var r=Lr(),a={impl:n};return r.memoizedState=a,function(){if((un&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},N2={readContext:mr,use:Qd,useCallback:b2,useContext:mr,useEffect:cm,useImperativeHandle:v2,useInsertionEffect:g2,useLayoutEffect:m2,useMemo:x2,useReducer:Xd,useRef:f2,useState:function(){return Xd(Ns)},useDebugValue:dm,useDeferredValue:function(n,r){var a=Yn();return S2(a,Sn.memoizedState,n,r)},useTransition:function(){var n=Xd(Ns)[0],r=Yn().memoizedState;return[typeof n=="boolean"?n:Hu(n),r]},useSyncExternalStore:Xx,useId:C2,useHostTransitionStatus:pm,useFormState:u2,useActionState:u2,useOptimistic:function(n,r){var a=Yn();return n2(a,Sn,n,r)},useMemoCache:sm,useCacheRefresh:T2,useEffectEvent:p2},EN={readContext:mr,use:Qd,useCallback:b2,useContext:mr,useEffect:cm,useImperativeHandle:v2,useInsertionEffect:g2,useLayoutEffect:m2,useMemo:x2,useReducer:om,useRef:f2,useState:function(){return om(Ns)},useDebugValue:dm,useDeferredValue:function(n,r){var a=Yn();return Sn===null?fm(a,n,r):S2(a,Sn.memoizedState,n,r)},useTransition:function(){var n=om(Ns)[0],r=Yn().memoizedState;return[typeof n=="boolean"?n:Hu(n),r]},useSyncExternalStore:Xx,useId:C2,useHostTransitionStatus:pm,useFormState:d2,useActionState:d2,useOptimistic:function(n,r){var a=Yn();return Sn!==null?n2(a,Sn,n,r):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:sm,useCacheRefresh:T2,useEffectEvent:p2};function mm(n,r,a,l){r=n.memoizedState,a=a(l,r),a=a==null?r:D({},r,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var ym={enqueueSetState:function(n,r,a){n=n._reactInternals;var l=di(),h=ua(l);h.payload=r,a!=null&&(h.callback=a),r=ca(n,h,l),r!==null&&($r(r,n,l),Pu(r,n,l))},enqueueReplaceState:function(n,r,a){n=n._reactInternals;var l=di(),h=ua(l);h.tag=1,h.payload=r,a!=null&&(h.callback=a),r=ca(n,h,l),r!==null&&($r(r,n,l),Pu(r,n,l))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var a=di(),l=ua(a);l.tag=2,r!=null&&(l.callback=r),r=ca(n,l,a),r!==null&&($r(r,n,a),Pu(r,n,a))}};function D2(n,r,a,l,h,m,T){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,m,T):r.prototype&&r.prototype.isPureReactComponent?!Ou(a,l)||!Ou(h,m):!0}function j2(n,r,a,l){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,l),r.state!==n&&ym.enqueueReplaceState(r,r.state,null)}function go(n,r){var a=r;if("ref"in r){a={};for(var l in r)l!=="ref"&&(a[l]=r[l])}if(n=n.defaultProps){a===r&&(a=D({},a));for(var h in n)a[h]===void 0&&(a[h]=n[h])}return a}function I2(n){Ad(n)}function P2(n){console.error(n)}function L2(n){Ad(n)}function tf(n,r){try{var a=n.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function z2(n,r,a){try{var l=n.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function vm(n,r,a){return a=ua(a),a.tag=3,a.payload={element:null},a.callback=function(){tf(n,r)},a}function _2(n){return n=ua(n),n.tag=3,n}function U2(n,r,a,l){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var m=l.value;n.payload=function(){return h(m)},n.callback=function(){z2(r,a,l)}}var T=a.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(n.callback=function(){z2(r,a,l),typeof h!="function"&&(va===null?va=new Set([this]):va.add(this));var P=l.stack;this.componentDidCatch(l.value,{componentStack:P!==null?P:""})})}function RN(n,r,a,l,h){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(r=a.alternate,r!==null&&ao(r,a,h,!0),a=yr.current,a!==null){switch(a.tag){case 31:case 13:case 19:return Cr===null?Ef():a.alternate===null&&Vn===0&&(Vn=3),a.flags&=-257,a.flags|=65536,a.lanes=h,l===Fd?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([l]):r.add(l),n0(n,l,h)),!1;case 22:return a.flags|=65536,l===Fd?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([l]):a.add(l)),n0(n,l,h)),!1}throw Error(s(435,a.tag))}return n0(n,l,h),Ef(),!1}if(Vt)return r=yr.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,l!==_g&&(n=Error(s(422),{cause:l}),ku(Si(n,a)))):(l!==_g&&(r=Error(s(423),{cause:l}),ku(Si(r,a))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,l=Si(l,a),h=vm(n.stateNode,l,h),$g(n,h),Vn!==4&&(Vn=2)),!1;var m=Error(s(520),{cause:l});if(m=Si(m,a),Qu===null?Qu=[m]:Qu.push(m),Vn!==4&&(Vn=2),r===null)return!0;l=Si(l,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,n=h&-h,a.lanes|=n,n=vm(a.stateNode,l,n),$g(a,n),!1;case 1:if(r=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(va===null||!va.has(m))))return a.flags|=65536,h&=-h,a.lanes|=h,h=_2(h),U2(h,n,a,l),$g(a,h),!1;break;case 22:if(a.memoizedState!==null)return a.flags|=65536,!1}a=a.return}while(a!==null);return!1}var bm=Error(s(461)),Zn=!1;function rr(n,r,a,l){r.child=n===null?Vx(r,null,a,l):ho(r,n.child,a,l)}function H2(n,r,a,l,h){a=a.render;var m=r.ref;if("ref"in l){var T={};for(var P in l)P!=="ref"&&(T[P]=l[P])}else T=l;return oo(r),l=tm(n,r,a,T,m,h),P=nm(),n!==null&&!Zn?(rm(n,r,h),Ds(n,r,h)):(Vt&&P&&Id(r),r.flags|=1,rr(n,r,l,h),r.child)}function F2(n,r,a,l,h){if(n===null){var m=a.type;return typeof m=="function"&&!Ig(m)&&m.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=m,B2(n,r,m,l,h)):(n=Dd(a.type,null,l,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(m=n.child,!Om(n,h)){var T=m.memoizedProps;if(a=a.compare,a=a!==null?a:Ou,a(T,l)&&n.ref===r.ref)return Ds(n,r,h)}return r.flags|=1,n=Ts(m,l),n.ref=r.ref,n.return=r,r.child=n}function B2(n,r,a,l,h){if(n!==null){var m=n.memoizedProps;if(Ou(m,l)&&n.ref===r.ref)if(Zn=!1,r.pendingProps=l=m,Om(n,h))(n.flags&131072)!==0&&(Zn=!0);else return r.lanes=n.lanes,Ds(n,r,h)}return xm(n,r,a,l,h)}function V2(n,r,a,l){var h=l.children,m=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|a:a,n!==null){for(l=r.child=n.child,h=0;l!==null;)h=h|l.lanes|l.childLanes,l=l.sibling;l=h&~m}else l=0,r.child=null;return K2(n,r,m,a,l)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ud(r,m!==null?m.cachePool:null),m!==null?Yx(r,m):Xg(),Gx(r);else return l=r.lanes=536870912,K2(n,r,m!==null?m.baseLanes|a:a,a,l)}else m!==null?(Ud(r,m.cachePool),Yx(r,m),ha(),r.memoizedState=null):(n!==null&&Ud(r,null),Xg(),ha());return rr(n,r,h,a),r.child}function Bu(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function K2(n,r,a,l,h){var m=Kg();return m=m===null?null:{parent:Qn._currentValue,pool:m},r.memoizedState={baseLanes:a,cachePool:m},n!==null&&Ud(r,null),Xg(),Gx(r),n!==null&&ao(n,r,l,!0),r.childLanes=h,null}function nf(n,r){return r=rf({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function q2(n,r,a){return ho(r,n.child,null,a),n=nf(r,r.pendingProps),n.flags|=2,oi(r),r.memoizedState=null,n}function CN(n,r,a){var l=r.pendingProps,h=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Vt){if(l.mode==="hidden")return n=nf(r,l),r.lanes=536870912,n.memoizedState={baseLanes:0,cachePool:null},Bu(null,n);if(Wg(r),(n=kn)?(n=yS(n,Ri),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ra!==null?{id:Wi,overflow:Ji}:null,retryLane:536870912,hydrationErrors:null},a=Ax(n),a.return=r,r.child=a,ar=r,kn=null)):n=null,n===null)throw sa(r);return r.lanes=536870912,null}return nf(r,l)}var m=n.memoizedState;if(m!==null){var T=m.dehydrated;if(Wg(r),h)if(r.flags&256)r.flags&=-257,r=q2(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||ao(n,r,a,!1),h=(a&n.childLanes)!==0,Zn||h){if(da.current===null){if(l=On,l!==null&&(T=qt(l,a),T!==0&&T!==m.retryLane))throw m.retryLane=T,no(n,T),$r(l,n,T),bm;Ef()}r=q2(n,r,a)}else n=m.treeContext,kn=Ti(T.nextSibling),ar=r,Vt=!0,ia=null,Ri=!1,n!==null&&Nx(r,n),r=nf(r,l),r.flags|=134221824;return r}return n=Ts(n.child,{mode:l.mode,children:l.children}),n.ref=r.ref,r.child=n,n.return=r,n}function ol(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 xm(n,r,a,l,h){return oo(r),a=tm(n,r,a,l,void 0,h),l=nm(),n!==null&&!Zn?(rm(n,r,h),Ds(n,r,h)):(Vt&&l&&Id(r),r.flags|=1,rr(n,r,a,h),r.child)}function Y2(n,r,a,l,h,m){return oo(r),r.updateQueue=null,a=Qx(r,l,a,h),$x(n),l=nm(),n!==null&&!Zn?(rm(n,r,m),Ds(n,r,m)):(Vt&&l&&Id(r),r.flags|=1,rr(n,r,a,m),r.child)}function G2(n,r,a,l,h){if(oo(r),r.stateNode===null){var m=Zo,T=a.contextType;typeof T=="object"&&T!==null&&(m=mr(T)),m=new a(l,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=ym,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=l,m.state=r.memoizedState,m.refs={},Yg(r),T=a.contextType,m.context=typeof T=="object"&&T!==null?mr(T):Zo,m.state=r.memoizedState,T=a.getDerivedStateFromProps,typeof T=="function"&&(mm(r,a,T,l),m.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(T=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),T!==m.state&&ym.enqueueReplaceState(m,m.state,null),zu(r,l,m,h),Lu(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(n===null){m=r.stateNode;var P=r.memoizedProps,Z=go(a,P);m.props=Z;var ae=m.context,pe=a.contextType;T=Zo,typeof pe=="object"&&pe!==null&&(T=mr(pe));var Ce=a.getDerivedStateFromProps;pe=typeof Ce=="function"||typeof m.getSnapshotBeforeUpdate=="function",P=r.pendingProps!==P,pe||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(P||ae!==T)&&j2(r,m,l,T),la=!1;var ie=r.memoizedState;m.state=ie,zu(r,l,m,h),Lu(),ae=r.memoizedState,P||ie!==ae||la?(typeof Ce=="function"&&(mm(r,a,Ce,l),ae=r.memoizedState),(Z=la||D2(r,a,Z,l,ie,ae,T))?(pe||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=ae),m.props=l,m.state=ae,m.context=T,l=Z):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{m=r.stateNode,Gg(n,r),T=r.memoizedProps,pe=go(a,T),m.props=pe,Ce=r.pendingProps,ie=m.context,ae=a.contextType,Z=Zo,typeof ae=="object"&&ae!==null&&(Z=mr(ae)),P=a.getDerivedStateFromProps,(ae=typeof P=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(T!==Ce||ie!==Z)&&j2(r,m,l,Z),la=!1,ie=r.memoizedState,m.state=ie,zu(r,l,m,h),Lu();var fe=r.memoizedState;T!==Ce||ie!==fe||la||n!==null&&n.dependencies!==null&&zd(n.dependencies)?(typeof P=="function"&&(mm(r,a,P,l),fe=r.memoizedState),(pe=la||D2(r,a,pe,l,ie,fe,Z)||n!==null&&n.dependencies!==null&&zd(n.dependencies))?(ae||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,fe,Z),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,fe,Z)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=fe),m.props=l,m.state=fe,m.context=Z,l=pe):(typeof m.componentDidUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||T===n.memoizedProps&&ie===n.memoizedState||(r.flags|=1024),l=!1)}return m=l,ol(n,r),l=(r.flags&128)!==0,m||l?(m=r.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,n!==null&&l?(r.child=ho(r,n.child,null,h),r.child=ho(r,null,a,h)):rr(n,r,a,h),r.memoizedState=m.state,n=r.child):n=Ds(n,r,h),n}function $2(n,r,a,l){return io(),r.flags|=256,rr(n,r,a,l),r.child}var Sm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wm(n){return{baseLanes:n,cachePool:zx()}}function Em(n,r,a){return n=n!==null?n.childLanes&~a:0,r&&(n|=ci),n}function Q2(n,r,a){var l=r.pendingProps,h=!1,m=(r.flags&128)!==0,T;if((T=m)||(T=n!==null&&n.memoizedState===null?!1:(vr.current&2)!==0),T&&(h=!0,r.flags&=-129),T=(r.flags&32)!==0,r.flags&=-33,n===null){if(Vt){if(h?fa(r):ha(),(n=kn)?(n=yS(n,Ri),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:ra!==null?{id:Wi,overflow:Ji}:null,retryLane:536870912,hydrationErrors:null},a=Ax(n),a.return=r,r.child=a,ar=r,kn=null)):n=null,n===null)throw sa(r);return w0(n)?r.lanes=32:r.lanes=536870912,null}return m=l.children,l=l.fallback,h?(ha(),h=r.mode,m=rf({mode:"hidden",children:m},h),l=ro(l,h,a,null),m.return=r,l.return=r,m.sibling=l,r.child=m,l=r.child,l.memoizedState=wm(a),l.childLanes=Em(n,T,a),r.memoizedState=Sm,Bu(null,l)):(fa(r),Rm(r,m))}var P=n.memoizedState;if(P!==null){var Z=P.dehydrated;if(Z!==null)return TN(n,r,m,T,l,Z,P,a)}return h?(ha(),h=l.fallback,m=r.mode,P=n.child,Z=P.sibling,l=Ts(P,{mode:"hidden",children:l.children}),l.subtreeFlags=P.subtreeFlags&1206910976,Z!==null?h=Ts(Z,h):(h=ro(h,m,a,null),h.flags|=2),h.return=r,l.return=r,l.sibling=h,r.child=l,Bu(null,l),l=r.child,h=n.child.memoizedState,h===null?h=wm(a):(m=h.cachePool,m!==null?(P=Qn._currentValue,m=m.parent!==P?{parent:P,pool:P}:m):m=zx(),h={baseLanes:h.baseLanes|a,cachePool:m}),l.memoizedState=h,l.childLanes=Em(n,T,a),r.memoizedState=Sm,Bu(n.child,l)):(fa(r),a=n.child,n=a.sibling,a=Ts(a,{mode:"visible",children:l.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 Rm(n,r){return r=rf({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function rf(n,r){return n=Kr(22,n,null,r),n.lanes=0,n}function sf(n,r,a){return ho(r,n.child,null,a),n=Rm(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function TN(n,r,a,l,h,m,T,P){if(a)return r.flags&256?(fa(r),r.flags&=-257,sf(n,r,P)):r.memoizedState!==null?(ha(),r.child=n.child,r.flags|=128,null):(ha(),m=h.fallback,T=r.mode,h=rf({mode:"visible",children:h.children},T),m=ro(m,T,P,null),m.flags|=2,h.return=r,m.return=r,h.sibling=m,r.child=h,ho(r,n.child,null,P),h=r.child,h.memoizedState=wm(P),h.childLanes=Em(n,l,P),r.memoizedState=Sm,Bu(null,h));if(fa(r),w0(m)){if(l=m.nextSibling&&m.nextSibling.dataset,l)var Z=l.dgst;return l=Z,l!==""&&(h=Error(s(419)),h.stack="",h.digest=l,ku({value:h,source:null,stack:null})),sf(n,r,P)}if(Zn||ao(n,r,P,!1),l=(P&n.childLanes)!==0,Zn||l){if(da.current!==null)return sf(n,r,P);if(l=On,l!==null&&(h=qt(l,P),h!==0&&h!==T.retryLane))throw T.retryLane=h,no(n,h),$r(l,n,h),bm;return S0(m)||Ef(),sf(n,r,P)}return S0(m)?(r.flags|=192,r.child=n.child,null):(n=T.treeContext,kn=Ti(m.nextSibling),ar=r,Vt=!0,ia=null,Ri=!1,n!==null&&Nx(r,n),r=Rm(r,h.children),r.flags|=134221824,r)}function X2(n,r,a){n.lanes|=r;var l=n.alternate;l!==null&&(l.lanes|=r),Ld(n.return,r,a)}function Z2(n){for(var r=null;n!==null;){var a=n.alternate;a!==null&&qd(a)===null&&(r=n),n=n.sibling}return r}function af(n,r,a,l,h,m){var T=n.memoizedState;T===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:h,treeForkCount:m}:(T.isBackwards=r,T.rendering=null,T.renderingStartTime=0,T.last=l,T.tail=a,T.tailMode=h,T.treeForkCount=m)}function Cm(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 Tm(n,r,a){var l=r.pendingProps,h=l.revealOrder,m=l.tail;l=l.children;var T=vr.current;if(r.flags&128)return _u(r,T),null;var P=(T&2)!==0;if(P?(T=T&1|2,r.flags|=128):T&=1,_u(r,T),h==="backwards"&&n!==null?(Cm(n),rr(n,r,l,a),Cm(n)):rr(n,r,l,a),l=Vt?Mu:0,!P&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&X2(n,a,r);else if(n.tag===19)X2(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(h){case"backwards":a=Z2(r.child),a===null?(h=r.child,r.child=null):(h=a.sibling,a.sibling=null,Cm(r)),af(r,!0,h,null,m,l);break;case"unstable_legacy-backwards":for(a=null,h=r.child,r.child=null;h!==null;){if(n=h.alternate,n!==null&&qd(n)===null){r.child=h;break}n=h.sibling,h.sibling=a,a=h,h=n}af(r,!0,a,null,m,l);break;case"together":af(r,!1,null,null,void 0,l);break;case"independent":r.memoizedState=null;break;default:a=Z2(r.child),a===null?(h=r.child,r.child=null):(h=a.sibling,a.sibling=null),af(r,!1,h,a,m,l)}return r.child}function W2(n,r,a){var l=r.pendingProps;return aa(r,r.type,l.value),rr(n,r,l.children,a),r.child}function Ds(n,r,a){if(n!==null&&(r.dependencies=n.dependencies),ya|=r.lanes,(a&r.childLanes)===0)if(n!==null){if(ao(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=Ts(n,n.pendingProps),r.child=a,a.return=r;n.sibling!==null;)n=n.sibling,a=a.sibling=Ts(n,n.pendingProps),a.return=r;a.sibling=null}return r.child}function Om(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&zd(n)))}function ON(n,r,a){switch(r.tag){case 3:Ze(r,r.stateNode.containerInfo),aa(r,Qn,n.memoizedState.cache),io();break;case 27:case 5:de(r);break;case 4:Ze(r,r.stateNode.containerInfo);break;case 10:aa(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Wg(r),null;break;case 13:var l=r.memoizedState;if(l!==null){if(l.dehydrated!==null)return fa(r),r.flags|=128,null;l=ao(n,r,a,!1);var h=r.child.childLanes;return l||(a&h)!==0?Q2(n,r,a):(fa(r),n=Ds(n,r,a),n!==null?n.sibling:null)}fa(r);break;case 19:if(r.flags&128)return Tm(n,r,a);if(h=(n.flags&128)!==0,l=(a&r.childLanes)!==0,l||(ao(n,r,a,!1),l=(a&r.childLanes)!==0),h){if(l)return Tm(n,r,a);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),_u(r,vr.current),l)break;return null;case 22:return r.lanes=0,V2(n,r,a,r.pendingProps);case 24:aa(r,Qn,n.memoizedState.cache)}return Ds(n,r,a)}function J2(n,r,a){if(n!==null)if(n.memoizedProps!==r.pendingProps)Zn=!0;else{if(!Om(n,a)&&(r.flags&128)===0)return Zn=!1,ON(n,r,a);Zn=(n.flags&131072)!==0}else Zn=!1,Vt&&(r.flags&1048576)!==0&&kx(r,Mu,r.index);switch(r.lanes=0,r.tag){case 16:e:{var l=r.pendingProps;if(n=co(r.elementType),r.type=n,typeof n=="function")Ig(n)?(l=go(n,l),r.tag=1,r=G2(null,r,n,l,a)):(r.tag=0,r=xm(null,r,n,l,a));else{if(n!=null){var h=n.$$typeof;if(h===z){r.tag=11,r=H2(null,r,n,l,a);break e}else if(h===K){r.tag=14,r=F2(null,r,n,l,a);break e}else if(h===U){r.tag=10,r.type=n,r=W2(null,r,a);break e}}throw r=le(n)||n,Error(s(306,r,""))}}return r;case 0:return xm(n,r,r.type,r.pendingProps,a);case 1:return l=r.type,h=go(l,r.pendingProps),G2(n,r,l,h,a);case 3:e:{if(Ze(r,r.stateNode.containerInfo),n===null)throw Error(s(387));l=r.pendingProps;var m=r.memoizedState;h=m.element,Gg(n,r),zu(r,l,null,a);var T=r.memoizedState;if(l=T.cache,aa(r,Qn,l),l!==m.cache&&Fg(r,[Qn],a,!0),Lu(),l=T.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:T.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=$2(n,r,l,a);break e}else if(l!==h){h=Si(Error(s(424)),r),ku(h),r=$2(n,r,l,a);break e}else for(n=r.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,kn=Ti(n.firstChild),ar=r,Vt=!0,ia=null,Ri=!0,a=Vx(r,null,l,a),r.child=a;a;)a.flags=a.flags&-3|134221824,a=a.sibling;else{if(io(),l===h){r=Ds(n,r,a);break e}rr(n,r,l,a)}r=r.child}return r;case 26:return ol(n,r),n===null?(a=RS(r.type,null,r.pendingProps,null))?r.memoizedState=a:Vt||(r.stateNode=rS(r.type,r.pendingProps,be.current,r)):r.memoizedState=RS(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return de(r),n===null&&Vt&&(l=r.stateNode=xS(r.type,r.pendingProps,be.current),ar=r,Ri=!0,h=kn,Sa(r.type)?(E0=h,kn=Ti(l.firstChild)):kn=h),rr(n,r,r.pendingProps.children,a),ol(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Vt&&((h=l=kn)&&(l=SD(l,r.type,r.pendingProps,Ri),l!==null?(r.stateNode=l,ar=r,kn=Ti(l.firstChild),Ri=!1,h=!0):h=!1),h||sa(r)),de(r),h=r.type,m=r.pendingProps,T=n!==null?n.memoizedProps:null,l=m.children,p0(h,m)?l=null:T!==null&&p0(h,T)&&(r.flags|=32),r.memoizedState!==null&&(h=tm(n,r,mN,null,null,a),Cl._currentValue=h),ol(n,r),rr(n,r,l,a),r.child;case 6:return n===null&&Vt&&((n=a=kn)&&(a=wD(a,r.pendingProps,Ri),a!==null?(r.stateNode=a,ar=r,kn=null,n=!0):n=!1),n||sa(r)),null;case 13:return Q2(n,r,a);case 4:return Ze(r,r.stateNode.containerInfo),l=r.pendingProps,n===null?r.child=ho(r,null,l,a):rr(n,r,l,a),r.child;case 11:return H2(n,r,r.type,r.pendingProps,a);case 7:return l=r.pendingProps,ol(n,r),rr(n,r,l,a),r.child;case 8:return rr(n,r,r.pendingProps.children,a),r.child;case 12:return rr(n,r,r.pendingProps.children,a),r.child;case 10:return W2(n,r,a);case 9:return h=r.type._context,l=r.pendingProps.children,oo(r),h=mr(h),l=l(h),r.flags|=1,rr(n,r,l,a),r.child;case 14:return F2(n,r,r.type,r.pendingProps,a);case 15:return B2(n,r,r.type,r.pendingProps,a);case 19:return Tm(n,r,a);case 31:return CN(n,r,a);case 22:return V2(n,r,a,r.pendingProps);case 24:return oo(r),l=mr(Qn),n===null?(h=Kg(),h===null&&(h=On,m=Bg(),h.pooledCache=m,m.refCount++,m!==null&&(h.pooledCacheLanes|=a),h=m),r.memoizedState={parent:l,cache:h},Yg(r),aa(r,Qn,h)):((n.lanes&a)!==0&&(Gg(n,r),zu(r,null,null,a),Lu()),h=n.memoizedState,m=r.memoizedState,h.parent!==l?(h={parent:l,cache:l},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),aa(r,Qn,l)):(l=m.cache,aa(r,Qn,l),l!==h.cache&&Fg(r,[Qn],a,!0))),rr(n,r,r.pendingProps.children,a),r.child;case 30:return r.stateNode===null&&(r.stateNode={autoName:null,paired:null,clones:null,ref:null}),l=r.pendingProps,l.name!=null&&l.name!=="auto"?r.flags|=n===null?18882560:18874368:Vt&&Id(r),n!==null&&n.memoizedProps.name!==l.name?r.flags|=4194816:ol(n,r),rr(n,r,l.children,a),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function js(n){n.flags|=4}function Am(n,r,a,l,h){var m;if((m=(n.mode&32)!==0)&&(m=a===null?AS(r,l):AS(r,l)&&(l.src!==a.src||l.srcSet!==a.srcSet)),m){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(I1())n.flags|=8192;else throw fo=Fd,qg}else n.flags&=-16777217}function e1(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!MS(r))if(I1())n.flags|=8192;else throw fo=Fd,qg}function of(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?tt():536870912,n.lanes|=r,fl|=r)}function Vu(n,r){if(!Vt)switch(n.tailMode){case"visible":break;case"collapsed":for(var a=n.tail,l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:l.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,l=0;if(r)for(var h=n.child;h!==null;)a|=h.lanes|h.childLanes,l|=h.subtreeFlags&1206910976,l|=h.flags&1206910976,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)a|=h.lanes|h.childLanes,l|=h.subtreeFlags,l|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=l,n.childLanes=a,r}function AN(n,r,a){var l=r.pendingProps;switch(zg(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,l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Ms(Qn),at(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&(el(r)?js(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Ug())),Nn(r),null;case 26:var h=r.type,m=r.memoizedState;return n===null?(js(r),m!==null?(Nn(r),e1(r,m)):(Nn(r),Am(r,h,null,l,a))):m?m!==n.memoizedState?(js(r),Nn(r),e1(r,m)):(Nn(r),r.flags&=-16777217):(n=n.memoizedProps,n!==l&&js(r),Nn(r),Am(r,h,n,l,a)),null;case 27:if(we(r),a=be.current,h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==l&&js(r);else{if(!l){if(r.stateNode===null)throw Error(s(166));return Nn(r),r.subtreeFlags&=-33554433,null}n=Oe.current,el(r)?Dx(r):(n=xS(h,l,a),r.stateNode=n,js(r))}return Nn(r),r.subtreeFlags&=-33554433,null;case 5:if(we(r),h=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==l&&js(r);else{if(!l){if(r.stateNode===null)throw Error(s(166));return Nn(r),r.subtreeFlags&=-33554433,null}if(m=Oe.current,el(r))Dx(r);else{var T=ec(be.current);switch(m){case 1:m=T.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:m=T.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":m=T.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":m=T.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":m=T.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof l.is=="string"?T.createElement("select",{is:l.is}):T.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?T.createElement(h,{is:l.is}):T.createElement(h)}}m[fn]=r,m[Mn]=l;e:for(T=r.child;T!==null;){if(T.tag===5||T.tag===6)m.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=m;e:switch(xr(m,h,l),h){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&js(r)}}return Nn(r),r.subtreeFlags&=-33554433,Am(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,a),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==l&&js(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(s(166));if(n=be.current,el(r)){if(n=r.stateNode,a=r.memoizedProps,l=null,h=ar,h!==null)switch(h.tag){case 27:case 5:l=h.memoizedProps}n[fn]=r,n=!!(n.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||J1(n.nodeValue,a)),n||sa(r,!0)}else n=ec(n).createTextNode(l),n[fn]=r,r.stateNode=n}return Nn(r),null;case 31:if(a=r.memoizedState,n===null||n.memoizedState!==null){if(l=el(r),a!==null){if(n===null){if(!l)throw Error(s(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[fn]=r}else io(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Nn(r),n=!1}else a=Ug(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return r.flags&256?(oi(r),r):(oi(r),null);if((r.flags&128)!==0)throw Error(s(558))}return Nn(r),null;case 13:if(l=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=el(r),l!==null&&l.dehydrated!==null){if(n===null){if(!h)throw Error(s(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(s(317));h[fn]=r}else io(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Nn(r),h=!1}else h=Ug(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(oi(r),r):(oi(r),null)}return oi(r),(r.flags&128)!==0?(r.lanes=a,r):(a=l!==null,n=n!==null&&n.memoizedState!==null,a&&(l=r.child,h=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(h=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==h&&(l.flags|=2048)),a!==n&&a&&(r.child.flags|=8192),of(r,r.updateQueue),Nn(r),null);case 4:return at(),n===null&&u0(r.stateNode.containerInfo),r.flags|=67108864,Nn(r),null;case 10:return Ms(r.type),Nn(r),null;case 19:if(Jg(r),l=r.memoizedState,l===null)return Nn(r),null;if(h=(r.flags&128)!==0,m=l.rendering,m===null)if(h)Vu(l,!1);else{if(Vn!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(m=qd(n),m!==null){for(r.flags|=128,Vu(l,!1),n=m.updateQueue,r.updateQueue=n,of(r,n),r.subtreeFlags=0,n=a,a=r.child;a!==null;)Ox(a,n),a=a.sibling;return _u(r,vr.current&1|2),Vt&&Os(r,l.treeForkCount),r.child}n=n.sibling}l.tail!==null&&St()>bf&&(r.flags|=128,h=!0,Vu(l,!1),r.lanes=4194304)}else{if(!h)if(n=qd(m),n!==null){if(r.flags|=128,h=!0,n=n.updateQueue,r.updateQueue=n,of(r,n),Vu(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!m.alternate&&!Vt)return Nn(r),null}else 2*St()-l.renderingStartTime>bf&&a!==536870912&&(r.flags|=128,h=!0,Vu(l,!1),r.lanes=4194304);l.isBackwards?(m.sibling=r.child,r.child=m):(n=l.last,n!==null?n.sibling=m:r.child=m,l.last=m)}if(l.tail!==null){n=l.tail;e:{for(a=n;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return l.rendering=n,l.tail=n.sibling,l.renderingStartTime=St(),n.sibling=null,m=vr.current,m=h?m&1|2:m&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!a||Vt?_u(r,m):(a=m,Be(yr,r),Be(vr,a),Cr===null&&(Cr=r)),Vt&&Os(r,l.treeForkCount),n}return Nn(r),null;case 22:case 23:return oi(r),Zg(),l=r.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(a&536870912)!==0&&(r.flags&128)===0&&(Nn(r),r.subtreeFlags&6&&(r.flags|=8192)):Nn(r),a=r.updateQueue,a!==null&&of(r,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==a&&(r.flags|=2048),n!==null&&Le(uo),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),Ms(Qn),Nn(r),null;case 25:return null;case 30:return r.flags|=33554432,Nn(r),null}throw Error(s(156,r.tag))}function MN(n,r){switch(zg(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Ms(Qn),at(),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(oi(r),r.alternate===null)throw Error(s(340));io()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(oi(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(s(340));io()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return Jg(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 at(),null;case 10:return Ms(r.type),null;case 22:case 23:return oi(r),Zg(),n!==null&&Le(uo),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return Ms(Qn),null;case 25:return null;default:return null}}function t1(n,r){switch(zg(r),r.tag){case 3:Ms(Qn),at();break;case 26:case 27:case 5:we(r);break;case 4:at();break;case 31:r.memoizedState!==null&&oi(r);break;case 13:oi(r);break;case 19:Jg(r);break;case 10:Ms(r.type);break;case 22:case 23:oi(r),Zg(),n!==null&&Le(uo);break;case 24:Ms(Qn)}}function Ku(n,r){try{var a=r.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var h=l.next;a=h;do{if((a.tag&n)===n){l=void 0;var m=a.create,T=a.inst;l=m(),T.destroy=l}a=a.next}while(a!==h)}}catch(P){mn(r,r.return,P)}}function pa(n,r,a){try{var l=r.updateQueue,h=l!==null?l.lastEffect:null;if(h!==null){var m=h.next;l=m;do{if((l.tag&n)===n){var T=l.inst,P=T.destroy;if(P!==void 0){T.destroy=void 0,h=r;var Z=a,ae=P;try{ae()}catch(pe){mn(h,Z,pe)}}}l=l.next}while(l!==m)}}catch(pe){mn(r,r.return,pe)}}function n1(n){var r=n.updateQueue;if(r!==null){var a=n.stateNode;try{qx(r,a)}catch(l){mn(n,n.return,l)}}}function r1(n,r,a){a.props=go(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(l){mn(n,r,l)}}function es(n,r){try{var a=n.ref;if(a!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:var h=n.stateNode,m=Rs(n.memoizedProps,h);(h.ref===null||h.ref.name!==m)&&(h.ref=cS(m)),l=h.ref;break;case 7:if(n.stateNode===null){var T=new fi(n);p(n.child,!1,bD,T,void 0,void 0),n.stateNode=T}l=n.stateNode;break;default:l=n.stateNode}typeof a=="function"?n.refCleanup=a(l):a.current=l}}catch(P){mn(n,r,P)}}function br(n,r){var a=n.ref,l=n.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(h){mn(n,r,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){mn(n,r,h)}else a.current=null}function lf(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++)mS(n.stateNode,r[a])}function i1(n){for(var r=n.return;r!==null&&(km(r)&&mS(n.stateNode,r.stateNode),!Mm(r));)r=r.return}function qu(n){for(var r=n.return;r!==null&&(km(r)&&xD(n.stateNode,r.stateNode),!Mm(r));)r=r.return}function Mm(n){return n.tag===5||n.tag===3||n.tag===27}function km(n){return n&&n.tag===7&&n.stateNode!==null}function Nm(n){var r=n.type,a=n.memoizedProps,l=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(h){mn(n,n.return,h)}}function Dm(n,r,a){try{var l=n.stateNode;tD(l,n.type,a,r),l[Mn]=r}catch(h){mn(n,n.return,h)}}function s1(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Sa(n.type)||n.tag===4}function jm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||s1(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&&Sa(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 Im(n,r,a,l){var h=n.tag;if(h===5||h===6)h=n.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(h,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(h),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Ir)),lf(n,l),gt=!0;else if(h!==4&&(h===27&&(lf(n,l),l=null,Sa(n.type)&&(a=n.stateNode,r=null)),n=n.child,n!==null))for(Im(n,r,a,l),n=n.sibling;n!==null;)Im(n,r,a,l),n=n.sibling}function uf(n,r,a,l){var h=n.tag;if(h===5||h===6)h=n.stateNode,r?a.insertBefore(h,r):a.appendChild(h),lf(n,l),gt=!0;else if(h!==4&&(h===27&&(lf(n,l),l=null,Sa(n.type)&&(a=n.stateNode)),n=n.child,n!==null))for(uf(n,r,a,l),n=n.sibling;n!==null;)uf(n,r,a,l),n=n.sibling}function a1(n){var r=n.stateNode,a=n.memoizedProps;try{for(var l=n.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);xr(r,l,a),r[fn]=n,r[Mn]=a}catch(m){mn(n,n.return,m)}}var cf=!1,li=null;function o1(n){(n.tag===30||(n.subtreeFlags&33554432)!==0)&&(cf=!0)}var ts=null;function l1(){var n=ts;return ts=null,n}var qr=0;function ll(n,r,a,l,h){return qr=0,u1(n.child,r,a,l,h)}function u1(n,r,a,l,h){for(var m=!1;n!==null;){if(n.tag===5){var T=n.stateNode;if(l!==null){var P=y0(T);l.push(P),P.view&&(m=!0)}else m||y0(T).view&&(m=!0);cf=!0,lS(T,qr===0?r:r+"_"+qr,a),qr++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&h||u1(n.child,r,a,l,h)&&(m=!0));n=n.sibling}return m}function ns(n,r){for(;n!==null;)n.tag===5?uS(n.stateNode,n.memoizedProps):(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&r||ns(n.child,r)),n=n.sibling}function df(n){if((n.subtreeFlags&18874368)!==0)for(n=n.child;n!==null;){if((n.tag!==22||n.memoizedState===null)&&(df(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=Cs(r.default,r.share),r!=="none"&&(ll(n,a,r,null,!1)||ns(n.child,!1))}n=n.sibling}}function Pm(n,r){if(n.tag===30){var a=n.stateNode,l=n.memoizedProps,h=Rs(l,a),m=Cs(l.default,a.paired?l.share:l.enter);m!=="none"?ll(n,h,m,null,!1)?(df(n),a.paired||r||ml(n,l.onEnter)):ns(n.child,!1):df(n)}else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)Pm(n,r),n=n.sibling;else df(n)}function Lm(n){if(li!==null&&li.size!==0){var r=li;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,l=a.name;if(l!=null&&l!=="auto"){var h=r.get(l);if(h!==void 0){var m=Cs(a.default,a.share);if(m!=="none"&&(ll(n,l,m,null,!1)?(m=n.stateNode,h.paired=m,m.paired=h,ml(n,a.onShare)):ns(n.child,!1)),r.delete(l),r.size===0)break}}}Lm(n)}n=n.sibling}}}function zm(n){if(n.tag===30){var r=n.memoizedProps,a=Rs(r,n.stateNode),l=li!==null?li.get(a):void 0,h=Cs(r.default,l!==void 0?r.share:r.exit);h!=="none"&&(ll(n,a,h,null,!1)?l!==void 0?(h=n.stateNode,l.paired=h,h.paired=l,li.delete(a),ml(n,r.onShare)):ml(n,r.onExit):ns(n.child,!1)),li!==null&&Lm(n)}else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)zm(n),n=n.sibling;else li!==null&&Lm(n)}function c1(n){for(n=n.child;n!==null;){if(n.tag===30){var r=n.memoizedProps,a=Rs(r,n.stateNode);r=Cs(r.default,r.update),n.flags&=-5,r!=="none"&&ll(n,a,r,n.memoizedState=[],!1)}else(n.subtreeFlags&33554432)!==0&&c1(n);n=n.sibling}}function _m(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,ns(n.child,!1))}_m(n)}n=n.sibling}}function ff(n){if(n.tag===30)n.stateNode.paired=null,ns(n.child,!1),_m(n);else if((n.subtreeFlags&33554432)!==0)for(n=n.child;n!==null;)ff(n),n=n.sibling;else _m(n)}function d1(n){for(n=n.child;n!==null;)n.tag===30?ns(n.child,!1):(n.subtreeFlags&33554432)!==0&&d1(n),n=n.sibling}function Um(n,r,a,l,h,m,T){for(var P=!1;r!==null;){if(r.tag===5){var Z=r.stateNode;if(m!==null&&qr<m.length){var ae=m[qr],pe=y0(Z);(ae.view||pe.view)&&(P=!0);var Ce;if(Ce=(n.flags&4)===0)if(pe.clip)Ce=!0;else{Ce=ae.rect;var ie=pe.rect;Ce=Ce.y!==ie.y||Ce.x!==ie.x||Ce.height!==ie.height||Ce.width!==ie.width}Ce&&(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&&lS(Z,qr===0?a:a+"_"+qr,h),P&&(n.flags&4)!==0||(ts===null&&(ts=[]),ts.push(Z,qr===0?l:l+"_"+qr,r.memoizedProps)),qr++}else(r.tag!==22||r.memoizedState===null)&&(r.tag===30&&T?n.flags|=r.flags&32:Um(n,r.child,a,l,h,m,T)&&(P=!0));r=r.sibling}return P}function f1(n,r){for(n=n.child;n!==null;){if(n.tag===30){var a=n.memoizedProps,l=n.stateNode,h=Rs(a,l),m=Cs(a.default,a.update),T;T=n.memoizedState,n.memoizedState=null,l=n;var P=n.child;qr=0,h=Um(l,P,h,h,m,T,!1),(n.flags&4)!==0&&h&&ml(n,a.onUpdate)}else(n.subtreeFlags&33554432)!==0&&f1(n);n=n.sibling}}var or=!1,pn=!1,rs=!1,Hm=!1,h1=typeof WeakSet=="function"?WeakSet:Set,lr=null,is=!1,Yu=!1,hf=!1,Fm=!1;function kN(n,r,a){if(n=n.containerInfo,f0=Tl,n=yx(n),Og(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var m=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{l.nodeType,T.nodeType}catch{l=null;break e}var P=0,Z=-1,ae=-1,pe=0,Ce=0,ie=n,fe=null;t:for(;;){for(var qe;ie!==l||m!==0&&ie.nodeType!==3||(Z=P+m),ie!==T||h!==0&&ie.nodeType!==3||(ae=P+h),ie.nodeType===3&&(P+=ie.nodeValue.length),(qe=ie.firstChild)!==null;)fe=ie,ie=qe;for(;;){if(ie===n)break t;if(fe===l&&++pe===m&&(Z=P),fe===T&&++Ce===h&&(ae=P),(qe=ie.nextSibling)!==null)break;ie=fe,fe=ie.parentNode}ie=qe}l=Z===-1||ae===-1?null:{start:Z,end:ae}}else l=null}l=l||{start:0,end:0}}else l=null;for(h0={focusedElem:n,selectionRange:l},Tl=!1,a=(a&335544064)===a,lr=r,r=a?9270:1024;lr!==null;){if(n=lr,a&&(l=n.deletions,l!==null))for(m=0;m<l.length;m++)a&&zm(l[m]);if(n.alternate===null&&(n.flags&2)!==0)a&&o1(n),pf(a);else{if(n.tag===22){if(l=n.alternate,n.memoizedState!==null){l!==null&&l.memoizedState===null&&a&&zm(l),pf(a);continue}else if(l!==null&&l.memoizedState!==null){a&&o1(n),pf(a);continue}}l=n.child,(n.subtreeFlags&r)!==0&&l!==null?(l.return=n,lr=l):(a&&c1(n),pf(a))}}li=null}function pf(n){for(;lr!==null;){var r=lr,a=n,l=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 15:break;case 1:if((h&1024)!==0&&l!==null){a=void 0,h=l.memoizedProps,l=l.memoizedState;var m=r.stateNode;try{var T=go(r.type,h);a=m.getSnapshotBeforeUpdate(T,l),m.__reactInternalSnapshotBeforeUpdate=a}catch(P){mn(r,r.return,P)}}break;case 3:if((h&1024)!==0){if(l=r.stateNode.containerInfo,a=l.nodeType,a===9)x0(l);else if(a===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":x0(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:a&&l!==null&&(a=Rs(l.memoizedProps,l.stateNode),h=r.memoizedProps,h=Cs(h.default,h.update),h!=="none"&&ll(l,a,h,l.memoizedState=[],!0));break;default:if((h&1024)!==0)throw Error(s(163))}if(l=r.sibling,l!==null){l.return=r.return,lr=l;break}lr=r.return}}function p1(n,r,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:ss(n,a),l&4&&Ku(5,a);break;case 1:if(ss(n,a),l&4)if(n=a.stateNode,r===null)try{n.componentDidMount()}catch(T){mn(a,a.return,T)}else{var h=go(a.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(h,r,n.__reactInternalSnapshotBeforeUpdate)}catch(T){mn(a,a.return,T)}}l&64&&n1(a),l&512&&es(a,a.return);break;case 3:if(ss(n,a),l&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{qx(n,r)}catch(T){mn(a,a.return,T)}}break;case 27:r===null&&l&4&&a1(a);case 26:case 5:ss(n,a),r===null&&l&4&&Nm(a),l&512&&es(a,a.return);break;case 12:ss(n,a);break;case 31:ss(n,a),l&4&&v1(n,a);break;case 13:ss(n,a),l&4&&b1(n,a),l&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=BN.bind(null,a),ED(n,a))));break;case 22:if(l=a.memoizedState!==null||or,!l){var m=r!==null&&r.memoizedState!==null||pn;r=or,h=pn,or=l,(pn=m)&&!h?(l=2,(a.subtreeFlags&8772)!==0&&(l|=1),Fi(n,a,l)):ss(n,a),or=r,pn=h}break;case 30:ss(n,a),l&512&&es(a,a.return);break;case 7:l&512&&es(a,a.return);default:ss(n,a)}}function Bm(n,r){for(n=n.child;n!==null;)g1(n,r),n=n.sibling}function g1(n,r){switch(n.tag){case 5:case 26:try{var a=n.stateNode;if(r){var l=a.style;typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"}else{var h=n.stateNode,m=n.memoizedProps.style,T=m!=null&&m.hasOwnProperty("display")?m.display:null;h.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(Z){mn(n,n.return,Z)}Vm(n,r);break;case 6:try{n.stateNode.nodeValue=r?"":n.memoizedProps,gt=!0}catch(Z){mn(n,n.return,Z)}break;case 18:try{var P=n.stateNode;r?oS(P,!0):oS(n.stateNode,!1)}catch(Z){mn(n,n.return,Z)}break;case 22:case 23:n.memoizedState===null&&Bm(n,r);break;default:Bm(n,r)}}function Vm(n,r){if(n.subtreeFlags&67108864)for(n=n.child;n!==null;){e:{var a=n,l=r;switch(a.tag){case 4:g1(a,l);break e;case 22:a.memoizedState===null&&Vm(a,l);break e;default:Vm(a,l)}}n=n.sibling}}function m1(n){var r=n.alternate;r!==null&&(n.alternate=null,m1(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,Yr=!1;function Ui(n,r,a){for(a=a.child;a!==null;)y1(n,r,a),a=a.sibling}function y1(n,r,a){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(Ie,a)}catch{}switch(a.tag){case 26:pn||br(a,r),Ui(n,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&!pn&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:pn||br(a,r),qu(a);var l=In,h=Yr;Sa(a.type)&&(In=a.stateNode,Yr=!1),Ui(n,r,a),SS(a.stateNode,a.type,a.memoizedProps),In=l,Yr=h;break;case 5:pn||br(a,r),qu(a);case 6:if(a.tag===6&&qu(a),l=In,h=Yr,In=null,Ui(n,r,a),In=l,Yr=h,In!==null)if(Yr)try{(In.nodeType===9?In.body:In.nodeName==="HTML"?In.ownerDocument.body:In).removeChild(a.stateNode),gt=!0}catch(m){mn(a,r,m)}else try{In.removeChild(a.stateNode),gt=!0}catch(m){mn(a,r,m)}break;case 18:In!==null&&(Yr?(n=In,aS(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),Ol(n)):aS(In,a.stateNode));break;case 4:l=In,h=Yr,In=a.stateNode.containerInfo,Yr=!0,Ui(n,r,a),In=l,Yr=h;break;case 0:case 11:case 14:case 15:pa(2,a,r),pn||pa(4,a,r),Ui(n,r,a);break;case 1:pn||(br(a,r),l=a.stateNode,typeof l.componentWillUnmount=="function"&&r1(a,r,l)),Ui(n,r,a);break;case 21:Ui(n,r,a);break;case 22:pn=(l=pn)||a.memoizedState!==null,Ui(n,r,a),pn=l;break;case 30:br(a,r),Ui(n,r,a);break;case 7:pn||br(a,r),Ui(n,r,a);break;default:Ui(n,r,a)}}function v1(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Ol(n)}catch(a){mn(r,r.return,a)}}}function b1(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Ol(n)}catch(a){mn(r,r.return,a)}}function NN(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new h1),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new h1),r;default:throw Error(s(435,n.tag))}}function gf(n,r){var a=NN(n);r.forEach(function(l){if(!a.has(l)){a.add(l);var h=VN.bind(null,n,l);l.then(h,h)}})}function zr(n,r,a){var l=r.deletions;if(l!==null)for(var h=0;h<l.length;h++){var m=l[h],T=n,P=r,Z=P;e:for(;Z!==null;){switch(Z.tag){case 27:if(Sa(Z.type)){In=Z.stateNode,Yr=!1;break e}break;case 5:In=Z.stateNode,Yr=!1;break e;case 3:case 4:In=Z.stateNode.containerInfo,Yr=!0;break e}Z=Z.return}if(In===null)throw Error(s(160));y1(T,P,m),In=null,Yr=!1,T=m.alternate,T!==null&&(T.return=null),m.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)x1(r,n,a),r=r.sibling}var Hi=null;function x1(n,r,a){var l=n.alternate,h=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(h&4&&(l=n.updateQueue,l=l!==null?l.events:null,l!==null))for(var m=0;m<l.length;m++){var T=l[m];T.ref.impl=T.nextImpl}zr(r,n,a),_r(n),h&4&&(pa(3,n,n.return),Ku(3,n),pa(5,n,n.return));break;case 1:zr(r,n,a),_r(n),h&512&&(pn||l===null||br(l,l.return)),h&64&&or&&(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(m=Hi,zr(r,n,a),_r(n),h&512&&(pn||l===null||br(l,l.return)),h&4)if(h=l!==null?l.memoizedState:null,a=n.memoizedState,l===null)if(a===null)if(n.stateNode===null)if(or)n.stateNode=rS(n.type,n.memoizedProps,r.containerInfo,n);else{e:{r=n.type,a=n.memoizedProps,h=m.ownerDocument||m;t:switch(r){case"title":l=h.getElementsByTagName("title")[0],(!l||l[vi]||l[fn]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=h.createElement(r),h.head.insertBefore(l,h.querySelector("head > title"))),xr(l,r,a),l[fn]=n,Se(l),r=l;break e;case"link":if(m=OS("link","href",h).get(r+(a.href||""))){for(T=0;T<m.length;T++)if(l=m[T],l.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&l.getAttribute("rel")===(a.rel==null?null:a.rel)&&l.getAttribute("title")===(a.title==null?null:a.title)&&l.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){m.splice(T,1);break t}}l=h.createElement(r),xr(l,r,a),h.head.appendChild(l);break;case"meta":if(m=OS("meta","content",h).get(r+(a.content||""))){for(T=0;T<m.length;T++)if(l=m[T],l.getAttribute("content")===(a.content==null?null:""+a.content)&&l.getAttribute("name")===(a.name==null?null:a.name)&&l.getAttribute("property")===(a.property==null?null:a.property)&&l.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&l.getAttribute("charset")===(a.charSet==null?null:a.charSet)){m.splice(T,1);break t}}l=h.createElement(r),xr(l,r,a),h.head.appendChild(l);break;default:throw Error(s(468,r))}l[fn]=n,Se(l),r=l}n.stateNode=r}else or||O0(m,n.type,n.stateNode);else n.stateNode=TS(m,a,n.memoizedProps);else h!==a?(h===null?(r=l.stateNode,r===null||pn||r.parentNode.removeChild(r)):h.count--,a===null?or||O0(m,n.type,n.stateNode):TS(m,a,n.memoizedProps)):a===null&&n.stateNode!==null&&Dm(n,n.memoizedProps,l.memoizedProps);break;case 27:zr(r,n,a),_r(n),h&512&&(pn||l===null||br(l,l.return)),l!==null&&h&4&&Dm(n,n.memoizedProps,l.memoizedProps);break;case 5:if(m=rs,rs=!1,zr(r,n,a),rs=m,_r(n),h&512&&(pn||l===null||br(l,l.return)),n.flags&32){r=n.stateNode;try{jr(r,""),gt=!0}catch(pe){mn(n,n.return,pe)}}h&4&&n.stateNode!=null&&(r=n.memoizedProps,Dm(n,r,l!==null?l.memoizedProps:r)),h&1024&&(Hm=!0);break;case 6:if(zr(r,n,a),_r(n),h&4){if(n.stateNode===null)throw Error(s(162));r=n.memoizedProps,a=n.stateNode;try{a.nodeValue=r,gt=!0}catch(pe){mn(n,n.return,pe)}}break;case 3:if(gt=!1,kf=null,m=Hi,Hi=tc(r.containerInfo),zr(r,n,a),Hi=m,_r(n),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Ol(r.containerInfo)}catch(pe){mn(n,n.return,pe)}Hm&&(Hm=!1,S1(n)),gt=!1;break;case 4:h=rs,rs=or,l=nr(),m=Hi,Hi=tc(n.stateNode.containerInfo),zr(r,n,a),_r(n),Hi=m,gt&&Yu&&(hf=!0),gt=l,rs=h;break;case 12:zr(r,n,a),_r(n);break;case 31:zr(r,n,a),_r(n),h&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,gf(n,r)));break;case 13:zr(r,n,a),_r(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(vf=St()),h&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,gf(n,r)));break;case 22:m=n.memoizedState!==null,T=l!==null&&l.memoizedState!==null;var P=or,Z=pn,ae=rs;or=P||m,rs=ae||m,pn=Z||T,zr(r,n,a),pn=Z,rs=ae,or=P,_r(n),h&8192&&(r=n.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,!m||l===null||T||or||pn||(r=T||pn,a=or,l=pn,or=m||or,pn=r,ga(n,2),or=a,pn=l),!m&&rs||Bm(n,m)),h&4&&(r=n.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,gf(n,a))));break;case 19:zr(r,n,a),_r(n),h&4&&(r=n.updateQueue,r!==null&&(n.updateQueue=null,gf(n,r)));break;case 30:h&512&&(pn||l===null||br(l,l.return)),h=nr(),m=Yu,T=(a&335544064)===a,P=n.memoizedProps,Yu=T&&Cs(P.default,P.update)!=="none",zr(r,n,a),_r(n),T&&l!==null&&gt&&(n.flags|=4),Yu=m,gt=h;break;case 21:break;case 7:h&512&&(pn||l===null||br(l,l.return)),l&&l.stateNode!==null&&(l.stateNode._fragmentFiber=n);default:zr(r,n,a),_r(n)}}function _r(n){var r=n.flags;if(r&2){try{for(var a,l=n.return;l!==null;){if(s1(l)){a=l;break}l=l.return}l=null;for(var h=n.return;h!==null;){if(km(h)){var m=h.stateNode;l===null?l=[m]:l.push(m)}if(Mm(h))break;h=h.return}var T=l;if(a==null)throw Error(s(160));switch(a.tag){case 27:var P=a.stateNode,Z=jm(n);uf(n,Z,P,T);break;case 5:var ae=a.stateNode;a.flags&32&&(jr(ae,""),a.flags&=-33);var pe=jm(n);uf(n,pe,ae,T);break;case 3:case 4:var Ce=a.stateNode.containerInfo,ie=jm(n);Im(n,ie,Ce,T);break;default:throw Error(s(161))}}catch(fe){mn(n,n.return,fe)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function S1(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;S1(r),r.tag===5&&r.flags&1024&&(r=r.stateNode,Tl=!0,r.reset(),Tl=!1),n=n.sibling}}function ul(n,r){if(r.subtreeFlags&9270)for(r=r.child;r!==null;)w1(r,n),r=r.sibling;else f1(r)}function w1(n,r){var a=n.alternate;if(a===null)Pm(n,!1);else switch(n.tag){case 3:if(Fm=is=!1,l1(),ul(r,n),!is&&!hf){if(n=ts,n!==null)for(var l=0;l<n.length;l+=3){a=n[l];var h=n[l+1];uS(a,n[l+2]),a=a.ownerDocument.documentElement,a!==null&&a.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+h+")"})}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"})),Fm=!0}ts=null;break;case 5:ul(r,n);break;case 4:l=is,is=!1,ul(r,n),is&&(hf=!0),is=l;break;case 22:n.memoizedState===null&&(a.memoizedState!==null?Pm(n,!1):ul(r,n));break;case 30:l=is,h=l1(),is=!1,ul(r,n),is&&(n.flags|=4);var m=n.memoizedProps,T=n.stateNode;r=Rs(m,T),T=Rs(a.memoizedProps,T);var P=Cs(m.default,m.update);P==="none"?r=!1:(m=a.memoizedState,a.memoizedState=null,a=n.child,qr=0,r=Um(n,a,r,T,P,m,!0),qr!==(m===null?0:m.length)&&(n.flags|=32)),(n.flags&4)!==0&&r?(ml(n,n.memoizedProps.onUpdate),ts=h):h!==null&&(h.push.apply(h,ts),ts=h),is=(n.flags&32)!==0?!0:l;break;default:ul(r,n)}}function ss(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)p1(n,r.alternate,r),r=r.sibling}function ga(n,r){for(n=n.child;n!==null;){var a=n,l=r;switch(a.tag){case 0:case 11:case 14:case 15:pa(4,a,a.return),ga(a,l);break;case 1:br(a,a.return);var h=a.stateNode;typeof h.componentWillUnmount=="function"&&r1(a,a.return,h),ga(a,l);break;case 27:(l&2)!==0&&SS(a.stateNode,a.type,a.memoizedProps);case 5:br(a,a.return),a.tag!==5&&a.tag!==27||qu(a),ga(a,l);break;case 6:qu(a);break;case 26:br(a,a.return),h=a.stateNode,a.memoizedState!==null||h===null||pn||h.parentNode.removeChild(h),ga(a,l);break;case 22:a.memoizedState===null&&ga(a,l);break;case 30:br(a,a.return),ga(a,l);break;case 7:br(a,a.return);default:ga(a,l)}n=n.sibling}}function Fi(n,r,a){for(a=(r.subtreeFlags&8772)!==0?a:a&-2,r=r.child;r!==null;){var l=r.alternate,h=n,m=r,T=m.flags,P=(a&1)!==0;switch(m.tag){case 0:case 11:case 15:Fi(h,m,a),Ku(4,m);break;case 1:if(Fi(h,m,a),l=m,h=l.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(pe){mn(l,l.return,pe)}if(l=m,h=l.updateQueue,h!==null){var Z=l.stateNode;try{var ae=h.shared.hiddenCallbacks;if(ae!==null)for(h.shared.hiddenCallbacks=null,h=0;h<ae.length;h++)Kx(ae[h],Z)}catch(pe){mn(l,l.return,pe)}}P&&T&64&&n1(m),es(m,m.return);break;case 27:(a&2)!==0&&a1(m);case 5:m.tag!==5&&m.tag!==27||i1(m),Fi(h,m,a),P&&l===null&&T&4&&Nm(m),es(m,m.return);break;case 6:i1(m);break;case 26:Z=m.stateNode,m.memoizedState!==null||Z===null||or||O0(tc(Z.ownerDocument),m.type,Z),Fi(h,m,a),P&&l===null&&T&4&&Nm(m),es(m,m.return);break;case 12:Fi(h,m,a);break;case 31:Fi(h,m,a),P&&T&4&&v1(h,m);break;case 13:Fi(h,m,a),P&&T&4&&b1(h,m);break;case 22:m.memoizedState===null&&Fi(h,m,a),es(m,m.return);break;case 30:Fi(h,m,a),es(m,m.return);break;case 7:es(m,m.return);default:Fi(h,m,a)}r=r.sibling}}function Km(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&&Nu(a))}function qm(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Nu(n))}function Ci(n,r,a,l){var h=(a&335544064)===a;if(r.subtreeFlags&(h?10262:10256))for(r=r.child;r!==null;)E1(n,r,a,l),r=r.sibling;else h&&d1(r)}function E1(n,r,a,l){var h=(a&335544064)===a;h&&r.alternate===null&&r.return!==null&&r.return.alternate!==null&&ff(r);var m=r.flags;switch(r.tag){case 0:case 11:case 15:Ci(n,r,a,l),m&2048&&Ku(9,r);break;case 1:Ci(n,r,a,l);break;case 3:Ci(n,r,a,l),h&&Fm&&(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="")),m&2048&&(m=null,r.alternate!==null&&(m=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==m&&(r.refCount++,m!=null&&Nu(m)));break;case 12:if(m&2048){Ci(n,r,a,l),m=r.stateNode;try{var T=r.memoizedProps,P=T.id,Z=T.onPostCommit;typeof Z=="function"&&Z(P,r.alternate===null?"mount":"update",m.passiveEffectDuration,-0)}catch(ae){mn(r,r.return,ae)}}else Ci(n,r,a,l);break;case 31:Ci(n,r,a,l);break;case 13:Ci(n,r,a,l);break;case 23:break;case 22:T=r.stateNode,P=r.alternate,r.memoizedState!==null?(h&&P!==null&&P.memoizedState===null&&ff(P),T._visibility&2?Ci(n,r,a,l):Gu(n,r)):(h&&P!==null&&P.memoizedState!==null&&ff(r),T._visibility&2?Ci(n,r,a,l):(T._visibility|=2,cl(n,r,a,l,(r.subtreeFlags&10256)!==0||!1))),m&2048&&Km(P,r);break;case 24:Ci(n,r,a,l),m&2048&&qm(r.alternate,r);break;case 30:h&&(m=r.alternate,m!==null&&(ns(m.child,!0),ns(r.child,!0))),Ci(n,r,a,l);break;default:Ci(n,r,a,l)}}function cl(n,r,a,l,h){for(h=h&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=n,T=r,P=a,Z=l,ae=T.flags;switch(T.tag){case 0:case 11:case 15:cl(m,T,P,Z,h),Ku(8,T);break;case 23:break;case 22:var pe=T.stateNode;T.memoizedState!==null?pe._visibility&2?cl(m,T,P,Z,h):Gu(m,T):(pe._visibility|=2,cl(m,T,P,Z,h)),h&&ae&2048&&Km(T.alternate,T);break;case 24:cl(m,T,P,Z,h),h&&ae&2048&&qm(T.alternate,T);break;default:cl(m,T,P,Z,h)}r=r.sibling}}function Gu(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=n,l=r,h=l.flags;switch(l.tag){case 22:Gu(a,l),h&2048&&Km(l.alternate,l);break;case 24:Gu(a,l),h&2048&&qm(l.alternate,l);break;default:Gu(a,l)}r=r.sibling}}var mo=8192;function yo(n,r,a){if(n.subtreeFlags&mo)for(n=n.child;n!==null;)R1(n,r,a),n=n.sibling}function R1(n,r,a){switch(n.tag){case 26:yo(n,r,a),n.flags&mo&&(n.memoizedState!==null?zD(a,Hi,n.memoizedState,n.memoizedProps):(n=n.stateNode,(r&335544128)===r&&NS(a,n)));break;case 5:yo(n,r,a),n.flags&mo&&(n=n.stateNode,(r&335544128)===r&&NS(a,n));break;case 3:case 4:var l=Hi;Hi=tc(n.stateNode.containerInfo),yo(n,r,a),Hi=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=mo,mo=16777216,yo(n,r,a),mo=l):yo(n,r,a));break;case 30:if((n.flags&mo)!==0&&(l=n.memoizedProps.name,l!=null&&l!=="auto")){var h=n.stateNode;h.paired=null,li===null&&(li=new Map),li.set(l,h)}yo(n,r,a);break;default:yo(n,r,a)}}function C1(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 $u(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var l=r[a];lr=l,O1(l,n)}C1(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)T1(n),n=n.sibling}function T1(n){switch(n.tag){case 0:case 11:case 15:$u(n),n.flags&2048&&pa(9,n,n.return);break;case 3:$u(n);break;case 12:$u(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,mf(n)):$u(n);break;default:$u(n)}}function mf(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var l=r[a];lr=l,O1(l,n)}C1(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:pa(8,r,r.return),mf(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,mf(r));break;default:mf(r)}n=n.sibling}}function O1(n,r){for(;lr!==null;){var a=lr;switch(a.tag){case 0:case 11:case 15:pa(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Nu(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,lr=l;else e:for(a=n;lr!==null;){l=lr;var h=l.sibling,m=l.return;if(m1(l),l===a){lr=null;break e}if(h!==null){h.return=m,lr=h;break e}lr=m}}}var DN={getCacheForType:function(n){var r=mr(Qn),a=r.data.get(n);return a===void 0&&(a=n(),r.data.set(n,a)),a},cacheSignal:function(){return mr(Qn).controller.signal}},jN=typeof WeakMap=="function"?WeakMap:Map,un=0,On=null,Yt=null,Zt=0,gn=0,ui=null,ma=!1,dl=!1,Ym=!1,Is=0,Vn=0,ya=0,vo=0,yf=0,ci=0,fl=0,Qu=null,Gr=null,Gm=!1,vf=0,A1=0,bf=1/0,xf=null,va=null,_n=0,Bi=null,bo=null,as=0,$m=0,Qm=null,M1=null,hl=null,pl=null,gl=null,Xu=0,Sf=null;function di(){return(un&2)!==0&&Zt!==0?Zt&-Zt:ge.T!==null?s0():Tn()}function k1(){if(ci===0)if((Zt&536870912)===0||Vt){var n=ye;ye<<=1,(ye&3932160)===0&&(ye=262144),ci=n}else ci=536870912;return n=yr.current,n!==null&&(n.flags|=32),ci}function ml(n,r){if(r!=null){var a=n.stateNode,l=a.ref;l===null&&(l=a.ref=cS(Rs(n.memoizedProps,a))),pl===null&&(pl=[]),pl.push(r.bind(null,l))}}function $r(n,r,a){(n===On&&(gn===2||gn===9)||n.cancelPendingCommit!==null)&&(yl(n,0),ba(n,Zt,ci,!1)),dt(n,a),((un&2)===0||n!==On)&&(n===On&&((un&2)===0&&(vo|=a),Vn===4&&ba(n,Zt,ci,!1)),os(n))}function N1(n,r,a){if((un&6)!==0)throw Error(s(327));var l=!a&&(r&127)===0&&(r&n.expiredLanes)===0||Xe(n,r),h=l?LN(n,r):Zm(n,r,!0),m=l;do{if(h===0){dl&&!l&&ba(n,r,0,!1);break}else{if(a=n.current.alternate,m&&!IN(a)){h=Zm(n,r,!1),m=!1;continue}if(h===2){if(m=r,n.errorRecoveryDisabledLanes&m)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;h=Qu;var Z=P.current.memoizedState.isDehydrated;if(Z&&(yl(P,T).flags|=256),T=Zm(P,T,!1),T!==2&&T!==6){if(Ym&&!Z){P.errorRecoveryDisabledLanes|=m,vo|=m,h=4;break e}m=Gr,Gr=h,m!==null&&(Gr===null?Gr=m:Gr.push.apply(Gr,m))}h=T}if(m=!1,h!==2)continue}}if(h===1){yl(n,0),ba(n,r,0,!0);break}e:{switch(l=n,m=h,m){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r&&(r&62914560)!==r)break;case 6:ba(l,r,ci,!ma);break e;case 2:Gr=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(h=vf+300-St(),10<h)){if(ba(l,r,ci,!ma),Ve(l,0,!0)!==0)break e;as=r,l.timeoutHandle=m0(D1.bind(null,l,a,Gr,xf,Gm,r,ci,vo,fl,ma,m,"Throttled",-0,0),h);break e}D1(l,a,Gr,xf,Gm,r,ci,vo,fl,ma,m,null,-0,0)}}break}while(!0);os(n)}function D1(n,r,a,l,h,m,T,P,Z,ae,pe,Ce,ie,fe){n.timeoutHandle=-1;var qe=r.subtreeFlags,rt=(m&335544064)===m;if(Ce=null,(rt||qe&8192||(qe&16785408)===16785408)&&(Ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ir},li=null,R1(r,m,Ce),rt&&(qe=Ce,rt=n.containerInfo,rt=(rt.nodeType===9?rt:rt.ownerDocument).__reactViewTransition,rt!=null&&(qe.count++,qe.waitingForViewTransition=!0,qe=ic.bind(qe),rt.finished.then(qe,qe))),qe=(m&62914560)===m?vf-St():(m&4194048)===m?A1-St():0,qe=_D(Ce,qe),qe!==null)){as=m,n.cancelPendingCommit=qe(H1.bind(null,n,r,m,a,l,h,T,P,Z,ae,pe,Ce,null,ie,fe)),ba(n,m,T,!ae);return}H1(n,r,m,a,l,h,T,P,Z,ae,pe,Ce)}function IN(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 l=0;l<a.length;l++){var h=a[l],m=h.getSnapshot;h=h.value;try{if(!ai(m(),h))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 ba(n,r,a,l){r=Qe(n,r),r&=~yf,r&=~vo,n.suspendedLanes|=r,n.pingedLanes&=~r,l&&(n.warmLanes|=r),l=n.expirationTimes;for(var h=r;0<h;){var m=31-et(h),T=1<<m;l[m]=-1,h&=~T}a!==0&&Ft(n,a,r)}function wf(){return(un&6)===0?(Zu(0),!1):!0}function Xm(){if(Yt!==null){if(gn===0)var n=Yt.return;else n=Yt,As=so=null,im(n),rl=null,Iu=0,n=Yt;for(;n!==null;)t1(n.alternate,n),n=n.return;Yt=null}}function yl(n,r){var a=n.timeoutHandle;return a!==-1&&(n.timeoutHandle=-1,iD(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),as=0,Xm(),On=n,Yt=a=Ts(n.current,null),Zt=r,gn=0,ui=null,ma=!1,dl=Xe(n,r),Ym=!1,fl=ci=yf=vo=ya=Vn=0,Gr=Qu=null,Gm=!1,Is=Qe(n,r),Md(),a}function j1(n,r){It=null,ge.H=ef,r===nl||r===Hd?(r=Hx(),gn=3):r===qg?(r=Hx(),gn=4):gn=r===bm?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ui=r,Yt===null&&(Vn=1,tf(n,Si(r,n.current)))}function I1(){var n=yr.current;return n===null?!0:(Zt&4194048)===Zt?Cr===null:(Zt&62914560)===Zt||(Zt&536870912)!==0?n===Cr:!1}function P1(){var n=ge.H;return ge.H=ef,n===null?ef:n}function L1(){var n=ge.A;return ge.A=DN,n}function Ef(){Vn=4,ma||(Zt&4194048)!==Zt&&yr.current!==null||(dl=!0),(ya&134217727)===0&&(vo&134217727)===0||On===null||ba(On,Zt,ci,!1)}function Zm(n,r,a){var l=un;un|=2;var h=P1(),m=L1();(On!==n||Zt!==r)&&(xf=null,yl(n,r)),r=!1;var T=Vn;e:do try{if(gn!==0&&Yt!==null){var P=Yt,Z=ui;switch(gn){case 8:Xm(),T=6;break e;case 3:case 2:case 9:case 6:yr.current===null&&(r=!0);var ae=gn;if(gn=0,ui=null,vl(n,P,Z,ae),a&&dl){T=0;break e}break;default:ae=gn,gn=0,ui=null,vl(n,P,Z,ae)}}PN(),T=Vn;break}catch(pe){j1(n,pe)}while(!0);return r&&n.shellSuspendCounter++,As=so=null,un=l,ge.H=h,ge.A=m,Yt===null&&(On=null,Zt=0,Md()),T}function PN(){for(;Yt!==null;)z1(Yt)}function LN(n,r){var a=un;un|=2;var l=P1(),h=L1();On!==n||Zt!==r?(xf=null,bf=St()+500,yl(n,r)):dl=Xe(n,r);e:do try{if(gn!==0&&Yt!==null){r=Yt;var m=ui;t:switch(gn){case 1:gn=0,ui=null,vl(n,r,m,1);break;case 2:case 9:if(_x(m)){gn=0,ui=null,_1(r);break}r=function(){gn!==2&&gn!==9||On!==n||(gn=7),os(n)},m.then(r,r);break e;case 3:gn=7;break e;case 4:gn=5;break e;case 7:_x(m)?(gn=0,ui=null,_1(r)):(gn=0,ui=null,vl(n,r,m,7));break;case 5:var T=null;switch(Yt.tag){case 26:T=Yt.memoizedState;case 5:case 27:var P=Yt;if(T?MS(T):P.stateNode.complete){gn=0,ui=null;var Z=P.sibling;if(Z!==null)Yt=Z;else{var ae=P.return;ae!==null?(Yt=ae,Rf(ae)):Yt=null}break t}}gn=0,ui=null,vl(n,r,m,5);break;case 6:gn=0,ui=null,vl(n,r,m,6);break;case 8:Xm(),Vn=6;break e;default:throw Error(s(462))}}zN();break}catch(pe){j1(n,pe)}while(!0);return As=so=null,ge.H=l,ge.A=h,un=a,Yt!==null?0:(On=null,Zt=0,Md(),Vn)}function zN(){for(;Yt!==null&&!tn();)z1(Yt)}function z1(n){var r=J2(n.alternate,n,Is);n.memoizedProps=n.pendingProps,r===null?Rf(n):Yt=r}function _1(n){var r=n,a=r.alternate;switch(r.tag){case 15:case 0:r=Y2(a,r,r.pendingProps,r.type,void 0,Zt);break;case 11:r=Y2(a,r,r.pendingProps,r.type.render,r.ref,Zt);break;case 5:im(r);var l=r;l===ar&&(Vt?(Pd(l),l.tag===5&&l.stateNode!=null&&(kn=l.stateNode)):(Pd(l),Vt=!0));default:t1(a,r),r=Yt=Ox(r,Is),r=J2(a,r,Is)}n.memoizedProps=n.pendingProps,r===null?Rf(n):Yt=r}function vl(n,r,a,l){As=so=null,im(r),rl=null,Iu=0;var h=r.return;try{if(RN(n,h,r,a,Zt)){Vn=1,tf(n,Si(a,n.current)),Yt=null;return}}catch(m){if(h!==null)throw Yt=h,m;Vn=1,tf(n,Si(a,n.current)),Yt=null;return}r.flags&32768?(Vt||l===1?n=!0:dl||(Zt&536870912)!==0?n=!1:(ma=n=!0,(l===2||l===9||l===3||l===6)&&(l=yr.current,l!==null&&l.tag===13&&(l.flags|=16384))),U1(r,n)):Rf(r)}function Rf(n){var r=n;do{if((r.flags&32768)!==0){U1(r,ma);return}n=r.return;var a=AN(r.alternate,r,Is);if(a!==null){Yt=a;return}if(r=r.sibling,r!==null){Yt=r;return}Yt=r=n}while(r!==null);Vn===0&&(Vn=5)}function U1(n,r){do{var a=MN(n.alternate,n);if(a!==null){a.flags&=32767,Yt=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(n=n.sibling,n!==null)){Yt=n;return}Yt=n=a}while(n!==null);Vn=6,Yt=null}function H1(n,r,a,l,h,m,T,P,Z,ae,pe,Ce){n.cancelPendingCommit=null;do Cf();while(_n!==0);if((un&6)!==0)throw Error(s(327));if(r!==null){if(r===n.current)throw Error(s(177));n===On&&(Yt=On=null,Zt=0),bo=r,Bi=n,as=a,Qm=h,M1=l,_N(n,r,a,T,P,Z,Ce)}}function _N(n,r,a,l,h,m,T){var P=r.lanes|r.childLanes;if($m=P,P|=Dg,Kt(n,a,P,l,h,m),pl=null,(a&335544064)===a?(gl=fN(n),l=10262):(gl=null,l=10256),(r.subtreeFlags&l)!==0||(r.flags&l)!==0?(n.callbackNode=null,n.callbackPriority=0,KN(mt,function(){return t0(),null})):(n.callbackNode=null,n.callbackPriority=0),cf=!1,l=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null,h=ce.p,ce.p=2,m=un,un|=4;try{kN(n,r,a)}finally{un=m,ce.p=h,ge.T=l}}_n=1,cf?hl=cD(T,n.containerInfo,gl,Wm,Jm,HN,e0,t0,UN):(Wm(),Jm(),e0())}function UN(n){if(_n!==0){var r=Bi.onRecoverableError;r(n,{componentStack:null})}}function HN(){_n===3&&(_n=0,w1(bo,Bi),_n=4)}function Wm(){if(_n===1){_n=0;var n=Bi,r=bo,a=as,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null;var h=ce.p;ce.p=2;var m=un;un|=4;try{Yu=hf=!1,x1(r,n,a),a=h0;var T=yx(n.containerInfo),P=a.focusedElem,Z=a.selectionRange;if(T!==P&&P&&P.ownerDocument&&mx(P.ownerDocument.documentElement,P)){if(Z!==null&&Og(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 Ce=P.ownerDocument||document,ie=Ce&&Ce.defaultView||window;if(ie.getSelection){var fe=ie.getSelection(),qe=P.textContent.length,rt=Math.min(Z.start,qe),Pt=Z.end===void 0?rt:Math.min(Z.end,qe);!fe.extend&&rt>Pt&&(T=Pt,Pt=rt,rt=T);var se=gx(P,rt),te=gx(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 ue=Ce.createRange();ue.setStart(se.node,se.offset),fe.removeAllRanges(),rt>Pt?(fe.addRange(ue),fe.extend(te.node,te.offset)):(ue.setEnd(te.node,te.offset),fe.addRange(ue))}}}}for(Ce=[],fe=P;fe=fe.parentNode;)fe.nodeType===1&&Ce.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<Ce.length;P++){var Re=Ce[P];Re.element.scrollLeft=Re.left,Re.element.scrollTop=Re.top}}Tl=!!f0,h0=f0=null}finally{un=m,ce.p=h,ge.T=l}}n.current=r,_n=2}}function Jm(){if(_n===2){_n=0;var n=Bi,r=bo,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=ge.T,ge.T=null;var l=ce.p;ce.p=2;var h=un;un|=4;try{p1(n,r.alternate,r)}finally{un=h,ce.p=l,ge.T=a}}_n=3}}function e0(){if(_n===4||_n===3){_n=0;var n=hl;hl=null,Je();var r=Bi,a=bo,l=as,h=M1,m=(l&335544064)===l?10262:10256;if((a.subtreeFlags&m)!==0||(a.flags&m)!==0?_n=5:(_n=0,bo=Bi=null,F1(r,r.pendingLanes)),m=r.pendingLanes,m===0&&(va=null),Cn(l),a=a.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(Ie,a,void 0,(a.current.flags&128)===128)}catch{}if(h!==null){a=ge.T,m=ce.p,ce.p=2,ge.T=null;try{for(var T=r.onRecoverableError,P=0;P<h.length;P++){var Z=h[P];T(Z.value,{componentStack:Z.stack})}}finally{ge.T=a,ce.p=m}}if(h=pl,T=gl,gl=null,h!==null&&(pl=null,T===null&&(T=[]),n!==null))for(Z=0;Z<h.length;Z++)a=(0,h[Z])(T),a!==void 0&&n.finished.finally(a);(as&3)!==0&&Cf(),os(r),m=r.pendingLanes,(l&261930)!==0&&(m&42)!==0?r===Sf?Xu++:(Xu=0,Sf=r):(Xu=0,Sf=null),Zu(0)}}function F1(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,Nu(r)))}function Cf(){return hl!==null&&(hl.skipTransition(),hl=null),Wm(),Jm(),e0(),t0()}function t0(){if(_n!==5)return!1;var n=Bi,r=$m;$m=0;var a=Cn(as),l=ge.T,h=ce.p;try{ce.p=32>a?32:a,ge.T=null,a=Qm,Qm=null;var m=Bi,T=as;if(_n=0,bo=Bi=null,as=0,(un&6)!==0)throw Error(s(331));var P=un;if(un|=4,T1(m.current),E1(m,m.current,T,a),un=P,Zu(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(Ie,m)}catch{}return!0}finally{ce.p=h,ge.T=l,F1(n,r)}}function B1(n,r,a){r=Si(a,r),r=vm(n.stateNode,r,2),n=ca(n,r,2),n!==null&&(dt(n,2),os(n))}function mn(n,r,a){if(n.tag===3)B1(n,n,a);else for(;r!==null;){if(r.tag===3){B1(r,n,a);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(va===null||!va.has(l))){n=Si(a,n),a=_2(2),l=ca(r,a,2),l!==null&&(U2(a,l,r,n),dt(l,2),os(l));break}}r=r.return}}function n0(n,r,a){var l=n.pingCache;if(l===null){l=n.pingCache=new jN;var h=new Set;l.set(r,h)}else h=l.get(r),h===void 0&&(h=new Set,l.set(r,h));h.has(a)||(Ym=!0,h.add(a),n=FN.bind(null,n,r,a),r.then(n,n))}function FN(n,r,a){var l=n.pingCache;l!==null&&l.delete(r),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,On===n&&(Zt&a)===a&&((Vn===4||Vn===3&&(Zt&62914560)===Zt&&300>St()-vf)&&(un&2)===0?yl(n,0):yf|=a,fl===Zt&&(fl=0)),os(n)}function V1(n,r){r===0&&(r=tt()),n=no(n,r),n!==null&&(dt(n,r),os(n))}function BN(n){var r=n.memoizedState,a=0;r!==null&&(a=r.retryLane),V1(n,a)}function VN(n,r){var a=0;switch(n.tag){case 31:case 13:var l=n.stateNode,h=n.memoizedState;h!==null&&(a=h.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(r),V1(n,a)}function KN(n,r){return en(n,r)}var bl=null,xl=null,r0=!1,Tf=!1,i0=!1,xa=0;function os(n){n!==xl&&n.next===null&&(xl===null?bl=xl=n:xl=xl.next=n),Tf=!0,r0||(r0=!0,YN())}function Zu(n,r){if(!i0&&Tf){i0=!0;do for(var a=!1,l=bl;l!==null;){if(n!==0){var h=l.pendingLanes;if(h===0)var m=0;else{var T=l.suspendedLanes,P=l.pingedLanes;m=(1<<31-et(42|n)+1)-1,m&=h&~(T&~P),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,G1(l,m))}else m=Zt,m=Ve(l,l===On?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||Xe(l,m)||(a=!0,G1(l,m));l=l.next}while(a);i0=!1}}function qN(){K1()}function K1(){Tf=r0=!1;var n=0;xa!==0&&rD()&&(n=xa);for(var r=St(),a=null,l=bl;l!==null;){var h=l.next,m=q1(l,r);m===0?(l.next=null,a===null?bl=h:a.next=h,h===null&&(xl=a)):(a=l,(n!==0||(m&3)!==0)&&(Tf=!0)),l=h}_n!==0&&_n!==5||Zu(n),xa!==0&&(xa=0)}function q1(n,r){for(var a=n.suspendedLanes,l=n.pingedLanes,h=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var T=31-et(m),P=1<<T,Z=h[T];Z===-1?((P&a)===0||(P&l)!==0)&&(h[T]=ot(P,r)):Z<=r&&(n.expiredLanes|=P),m&=~P}if(r=On,a=Zt,a=Ve(n,n===r?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,a===0||n===r&&(gn===2||gn===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&sn(l),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||Xe(n,a)){if(r=a&-a,r===n.callbackPriority)return r;switch(l!==null&&sn(l),Cn(a)){case 2:case 8:a=bt;break;case 32:a=mt;break;case 268435456:a=cn;break;default:a=mt}return l=Y1.bind(null,n),a=en(a,l),n.callbackPriority=r,n.callbackNode=a,r}return l!==null&&l!==null&&sn(l),n.callbackPriority=2,n.callbackNode=null,2}function Y1(n,r){if(_n!==0&&_n!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(Cf()&&n.callbackNode!==a)return null;var l=Zt;return l=Ve(n,n===On?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(N1(n,l,r),q1(n,St()),n.callbackNode!=null&&n.callbackNode===a?Y1.bind(null,n):null)}function G1(n,r){if(Cf())return null;N1(n,r,!0)}function YN(){sD(function(){(un&6)!==0?en(ft,qN):K1()})}function s0(){if(xa===0){var n=lo;n===0&&(n=ne,ne<<=1,(ne&261888)===0&&(ne=256)),xa=n}return xa}function $1(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:pr(n)}function GN(n,r,a,l,h){if(r==="submit"&&a&&a.stateNode===h){var m=$1((h[Mn]||null).action),T=l.submitter;T&&(r=(r=T[Mn]||null)?$1(r.formAction):T.getAttribute("formAction"),r!==null&&(m=r,T=null));var P=new Cd("action","action",null,l,h);n.push({event:P,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(xa!==0){var Z=new FormData(h,T);hm(a,{pending:!0,data:Z,method:h.method,action:m},null,Z)}}else typeof m=="function"&&(P.preventDefault(),Z=new FormData(h,T),hm(a,{pending:!0,data:Z,method:h.method,action:m},m,Z))},currentTarget:h}]})}}for(var a0=0;a0<Ng.length;a0++){var o0=Ng[a0],$N=o0.toLowerCase(),QN=o0[0].toUpperCase()+o0.slice(1);_i($N,"on"+QN)}_i(xx,"onAnimationEnd"),_i(Sx,"onAnimationIteration"),_i(wx,"onAnimationStart"),_i("dblclick","onDoubleClick"),_i("focusin","onFocus"),_i("focusout","onBlur"),_i(iN,"onTransitionRun"),_i(sN,"onTransitionStart"),_i(aN,"onTransitionCancel"),_i(Ex,"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 Wu="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(" "),XN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wu));function Q1(n,r){r=(r&4)!==0;for(var a=0;a<n.length;a++){var l=n[a],h=l.event;l=l.listeners;e:{var m=void 0;if(r)for(var T=l.length-1;0<=T;T--){var P=l[T],Z=P.instance,ae=P.currentTarget;if(P=P.listener,Z!==m&&h.isPropagationStopped())break e;m=P,h.currentTarget=ae;try{m(h)}catch(pe){Ad(pe)}h.currentTarget=null,m=Z}else for(T=0;T<l.length;T++){if(P=l[T],Z=P.instance,ae=P.currentTarget,P=P.listener,Z!==m&&h.isPropagationStopped())break e;m=P,h.currentTarget=ae;try{m(h)}catch(pe){Ad(pe)}h.currentTarget=null,m=Z}}}}function Gt(n,r){var a=r[Ss];a===void 0&&(a=r[Ss]=new Set);var l=n+"__bubble";a.has(l)||(X1(r,n,2,!1),a.add(l))}function l0(n,r,a){var l=0;r&&(l|=4),X1(a,n,l,r)}var Of="_reactListening"+Math.random().toString(36).slice(2);function u0(n){if(!n[Of]){n[Of]=!0,Ot.forEach(function(a){a!=="selectionchange"&&(XN.has(a)||l0(a,!1,n),l0(a,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Of]||(r[Of]=!0,l0("selectionchange",!1,r))}}function X1(n,r,a,l){switch(US(r)){case 2:var h=BD;break;case 8:h=VD;break;default:h=M0}a=h.bind(null,r,a,n),h=void 0,!Ja||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),l?h!==void 0?n.addEventListener(r,a,{capture:!0,passive:h}):n.addEventListener(r,a,!0):h!==void 0?n.addEventListener(r,a,{passive:h}):n.addEventListener(r,a,!1)}function c0(n,r,a,l,h){var m=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var T=l.tag;if(T===3||T===4){var P=l.stateNode.containerInfo;if(P===h)break;if(T===4)for(T=l.return;T!==null;){var Z=T.tag;if((Z===3||Z===4)&&T.stateNode.containerInfo===h)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){l=m=T;continue e}P=P.parentNode}}l=l.return}Wa(function(){var ae=m,pe=Za(a),Ce=[];e:{var ie=Rx.get(n);if(ie!==void 0){var fe=Cd,qe=n;switch(n){case"keypress":if(Ed(a)===0)break e;case"keydown":case"keyup":fe=Ik;break;case"focusin":qe="focus",fe=Sg;break;case"focusout":qe="blur",fe=Sg;break;case"beforeblur":case"afterblur":fe=Sg;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=Jb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=wk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=Uk;break;case xx:case Sx:case wx:fe=Ck;break;case Ex:fe=Fk;break;case"scroll":case"scrollend":fe=xk;break;case"wheel":fe=Vk;break;case"copy":case"cut":case"paste":fe=Ok;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=tx;break;case"submit":fe=zk;break;case"toggle":case"beforetoggle":fe=qk}var rt=(r&4)!==0,Pt=!rt&&(n==="scroll"||n==="scrollend"),se=rt?ie!==null?ie+"Capture":null:ie;rt=[];for(var te=ae,ue;te!==null;){var Re=te;if(ue=Re.stateNode,Re=Re.tag,Re!==5&&Re!==26&&Re!==27||ue===null||se===null||(Re=Es(te,se),Re!=null&&rt.push(Ju(te,Re,ue))),Pt)break;te=te.return}0<rt.length&&(ie=new fe(ie,qe,null,a,pe),Ce.push({event:ie,listeners:rt}))}}if((r&7)===0){e:{if(fe=n==="mouseover"||n==="pointerover",ie=n==="mouseout"||n==="pointerout",fe&&a!==Xa&&(qe=a.relatedTarget||a.fromElement)&&(Fn(qe)||qe[jn]))break e;(ie||fe)&&(qe=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=u(fe),rt=fe.tag,fe!==Pt||rt!==5&&rt!==27&&rt!==6)&&(fe=null)):(ie=null,fe=ae),ie!==fe&&(rt=Jb,Re="onMouseLeave",se="onMouseEnter",te="mouse",(n==="pointerout"||n==="pointerover")&&(rt=tx,Re="onPointerLeave",se="onPointerEnter",te="pointer"),Pt=ie==null?qe:he(ie),ue=fe==null?qe:he(fe),qe=new rt(Re,te+"leave",ie,a,pe),qe.target=Pt,qe.relatedTarget=ue,Re=null,Fn(pe)===ae&&(rt=new rt(se,te+"enter",fe,a,pe),rt.target=ue,rt.relatedTarget=Pt,Re=rt),Pt=Re,rt=ie&&fe?j(ie,fe,ZN):null,ie!==null&&Z1(Ce,qe,ie,rt,!1),fe!==null&&Pt!==null&&Z1(Ce,Pt,fe,rt,!0)))}e:{if(ie=ae?he(ae):window,fe=ie.nodeName&&ie.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ie.type==="file")var We=ux;else if(ox(ie))if(cx)We=tN;else{We=Jk;var Wt=Wk}else fe=ie.nodeName,!fe||fe.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?ae&&Qa(ae.elementType)&&(We=ux):We=eN;if(We&&(We=We(n,ae))){lx(Ce,We,a,pe);break e}Wt&&Wt(n,ie,ae)}switch(Wt=ae?he(ae):window,n){case"focusin":(ox(Wt)||Wt.contentEditable==="true")&&($o=Wt,Ag=ae,Au=null);break;case"focusout":Au=Ag=$o=null;break;case"mousedown":Mg=!0;break;case"contextmenu":case"mouseup":case"dragend":Mg=!1,vx(Ce,a,pe);break;case"selectionchange":if(rN)break;case"keydown":case"keyup":vx(Ce,a,pe)}var lt;if(Eg)e:{switch(n){case"compositionstart":var xt="onCompositionStart";break e;case"compositionend":xt="onCompositionEnd";break e;case"compositionupdate":xt="onCompositionUpdate";break e}xt=void 0}else Go?sx(n,a)&&(xt="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(xt="onCompositionStart");xt&&(nx&&a.locale!=="ko"&&(Go||xt!=="onCompositionStart"?xt==="onCompositionEnd"&&Go&&(lt=Zb()):(ta=pe,vg="value"in ta?ta.value:ta.textContent,Go=!0)),Wt=Af(ae,xt),0<Wt.length&&(xt=new ex(xt,n,null,a,pe),Ce.push({event:xt,listeners:Wt}),lt?xt.data=lt:(lt=ax(a),lt!==null&&(xt.data=lt)))),(lt=Gk?$k(n,a):Qk(n,a))&&(xt=Af(ae,"onBeforeInput"),0<xt.length&&(Wt=new ex("onBeforeInput","beforeinput",null,a,pe),Ce.push({event:Wt,listeners:xt}),Wt.data=lt)),GN(Ce,n,ae,a,pe)}Q1(Ce,r)})}function Ju(n,r,a){return{instance:n,listener:r,currentTarget:a}}function Af(n,r){for(var a=r+"Capture",l=[];n!==null;){var h=n,m=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||m===null||(h=Es(n,a),h!=null&&l.unshift(Ju(n,h,m)),h=Es(n,r),h!=null&&l.push(Ju(n,h,m))),n.tag===3)return l;n=n.return}return[]}function ZN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Z1(n,r,a,l,h){for(var m=r._reactName,T=[];a!==null&&a!==l;){var P=a,Z=P.alternate,ae=P.stateNode;if(P=P.tag,Z!==null&&Z===l)break;P!==5&&P!==26&&P!==27||ae===null||(Z=ae,h?(ae=Es(a,m),ae!=null&&T.unshift(Ju(a,ae,Z))):h||(ae=Es(a,m),ae!=null&&T.push(Ju(a,ae,Z)))),a=a.return}T.length!==0&&n.push({event:r,listeners:T})}var WN=/\r\n?/g,JN=/\u0000|\uFFFD/g;function W1(n){return(typeof n=="string"?n:""+n).replace(WN,`
10
- `).replace(JN,"")}function J1(n,r){return r=W1(r),W1(n)===r}function yn(n,r,a,l,h,m){switch(a){case"children":if(typeof l=="string")r==="body"||r==="textarea"&&l===""||jr(n,l);else if(typeof l=="number"||typeof l=="bigint")r!=="body"&&jr(n,""+l);else return;break;case"className":ni(n,"class",l);break;case"tabIndex":ni(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ni(n,a,l);break;case"style":ii(n,l,m);return;case"data":if(r!=="object"){ni(n,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||a!=="href")){n.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(a);break}l=pr(l),n.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="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 m=="function"&&(a==="formAction"?(r!=="input"&&yn(n,r,"name",h.name,h,null),yn(n,r,"formEncType",h.formEncType,h,null),yn(n,r,"formMethod",h.formMethod,h,null),yn(n,r,"formTarget",h.formTarget,h,null)):(yn(n,r,"encType",h.encType,h,null),yn(n,r,"method",h.method,h,null),yn(n,r,"target",h.target,h,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(a);break}l=pr(l),n.setAttribute(a,l);break;case"onClick":l!=null&&(n.onclick=Ir);return;case"onScroll":l!=null&&Gt("scroll",n);return;case"onScrollEnd":l!=null&&Gt("scrollend",n);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(h.children!=null)throw Error(s(60));m?.__html!==a&&(n.innerHTML=a)}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}a=pr(l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,l):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":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":l===!0?n.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,l):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(a,l):n.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(a):n.setAttribute(a,l);break;case"popover":Gt("beforetoggle",n),Gt("toggle",n),zn(n,"popover",l);break;case"xlinkActuate":Gn(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gn(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gn(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gn(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gn(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gn(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":zn(n,"is",l);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=bu.get(a)||a,zn(n,a,l);else return}gt=!0}function d0(n,r,a,l,h,m){switch(a){case"style":ii(n,l,m);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(h.children!=null)throw Error(s(60));m?.__html!==a&&(n.innerHTML=a)}}break;case"children":if(typeof l=="string")jr(n,l);else if(typeof l=="number"||typeof l=="bigint")jr(n,""+l);else return;break;case"onScroll":l!=null&&Gt("scroll",n);return;case"onScrollEnd":l!=null&&Gt("scrollend",n);return;case"onClick":l!=null&&(n.onclick=Ir);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Et.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),m=a.slice(2,h?a.length-7:void 0),r=n[Mn]||null,r=r!=null?r[a]:null,typeof r=="function"&&n.removeEventListener(m,r,h),typeof l=="function")){typeof r!="function"&&r!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(m,l,h);break e}gt=!0,a in n?n[a]=l:l===!0?n.setAttribute(a,""):zn(n,a,l)}return}gt=!0}function xr(n,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Gt("error",n),Gt("load",n);var l=!1,h=!1,m;for(m in a)if(a.hasOwnProperty(m)){var T=a[m];if(T!=null)switch(m){case"src":l=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:yn(n,r,m,T,a,null)}}h&&yn(n,r,"srcSet",a.srcSet,a,null),l&&yn(n,r,"src",a.src,a,null);return;case"input":Gt("invalid",n);var P=m=T=h=null,Z=null,ae=null;for(l in a)if(a.hasOwnProperty(l)){var pe=a[l];if(pe!=null)switch(l){case"name":h=pe;break;case"type":T=pe;break;case"checked":Z=pe;break;case"defaultChecked":ae=pe;break;case"value":m=pe;break;case"defaultValue":P=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(s(137,r));break;default:yn(n,r,l,pe,a,null)}}Js(n,m,P,Z,ae,T,h,!1);return;case"select":Gt("invalid",n),l=T=m=null;for(h in a)if(a.hasOwnProperty(h)&&(P=a[h],P!=null))switch(h){case"value":m=P;break;case"defaultValue":T=P;break;case"multiple":l=P;default:yn(n,r,h,P,a,null)}r=m,a=T,n.multiple=!!l,r!=null?Vr(n,!!l,r,!1):a!=null&&Vr(n,!!l,a,!0);return;case"textarea":Gt("invalid",n),m=h=l=null;for(T in a)if(a.hasOwnProperty(T)&&(P=a[T],P!=null))switch(T){case"value":l=P;break;case"defaultValue":h=P;break;case"children":m=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(s(91));break;default:yn(n,r,T,P,a,null)}ri(n,l,h,m);return;case"option":for(Z in a)a.hasOwnProperty(Z)&&(l=a[Z],l!=null)&&(Z==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":yn(n,r,Z,l,a,null));return;case"dialog":Gt("beforetoggle",n),Gt("toggle",n),Gt("cancel",n),Gt("close",n);break;case"iframe":case"object":Gt("load",n);break;case"video":case"audio":for(l=0;l<Wu.length;l++)Gt(Wu[l],n);break;case"image":Gt("error",n),Gt("load",n);break;case"details":Gt("toggle",n);break;case"embed":case"source":case"link":Gt("error",n),Gt("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)&&(l=a[ae],l!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:yn(n,r,ae,l,a,null)}return;default:if(Qa(r)){for(pe in a)a.hasOwnProperty(pe)&&(l=a[pe],l!==void 0&&d0(n,r,pe,l,a,void 0));return}}for(P in a)a.hasOwnProperty(P)&&(l=a[P],l!=null&&yn(n,r,P,l,a,null))}var eD={};function tD(n,r,a,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,m=null,T=null,P=null,Z=null,ae=null,pe=null;for(fe in a){var Ce=a[fe];if(a.hasOwnProperty(fe)&&Ce!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":Z=Ce;default:l.hasOwnProperty(fe)||yn(n,r,fe,null,l,Ce)}}for(var ie in l){var fe=l[ie];if(Ce=a[ie],l.hasOwnProperty(ie)&&(fe!=null||Ce!=null))switch(ie){case"type":fe!==Ce&&(gt=!0),m=fe;break;case"name":fe!==Ce&&(gt=!0),h=fe;break;case"checked":fe!==Ce&&(gt=!0),ae=fe;break;case"defaultChecked":fe!==Ce&&(gt=!0),pe=fe;break;case"value":fe!==Ce&&(gt=!0),T=fe;break;case"defaultValue":fe!==Ce&&(gt=!0),P=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(s(137,r));break;default:fe!==Ce&&yn(n,r,ie,fe,l,Ce)}}Rr(n,T,P,Z,ae,pe,m,h);return;case"select":fe=T=P=ie=null;for(m in a)if(Z=a[m],a.hasOwnProperty(m)&&Z!=null)switch(m){case"value":break;case"multiple":fe=Z;default:l.hasOwnProperty(m)||yn(n,r,m,null,l,Z)}for(h in l)if(m=l[h],Z=a[h],l.hasOwnProperty(h)&&(m!=null||Z!=null))switch(h){case"value":m!==Z&&(gt=!0),ie=m;break;case"defaultValue":m!==Z&&(gt=!0),P=m;break;case"multiple":m!==Z&&(gt=!0),T=m;default:m!==Z&&yn(n,r,h,m,l,Z)}r=P,a=T,l=fe,ie!=null?Vr(n,!!a,ie,!1):!!l!=!!a&&(r!=null?Vr(n,!!a,r,!0):Vr(n,!!a,a?[]:"",!1));return;case"textarea":fe=ie=null;for(P in a)if(h=a[P],a.hasOwnProperty(P)&&h!=null&&!l.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:yn(n,r,P,null,l,h)}for(T in l)if(h=l[T],m=a[T],l.hasOwnProperty(T)&&(h!=null||m!=null))switch(T){case"value":h!==m&&(gt=!0),ie=h;break;case"defaultValue":h!==m&&(gt=!0),fe=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==m&&yn(n,r,T,h,l,m)}Yo(n,ie,fe);return;case"option":for(var qe in a)ie=a[qe],a.hasOwnProperty(qe)&&ie!=null&&!l.hasOwnProperty(qe)&&(qe==="selected"?n.selected=!1:yn(n,r,qe,null,l,ie));for(Z in l)ie=l[Z],fe=a[Z],l.hasOwnProperty(Z)&&ie!==fe&&(ie!=null||fe!=null)&&(Z==="selected"?(ie!==fe&&(gt=!0),n.selected=ie&&typeof ie!="function"&&typeof ie!="symbol"):yn(n,r,Z,ie,l,fe));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var rt in a)ie=a[rt],a.hasOwnProperty(rt)&&ie!=null&&!l.hasOwnProperty(rt)&&yn(n,r,rt,null,l,ie);for(ae in l)if(ie=l[ae],fe=a[ae],l.hasOwnProperty(ae)&&ie!==fe&&(ie!=null||fe!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(s(137,r));break;default:yn(n,r,ae,ie,l,fe)}return;default:if(Qa(r)){for(var Pt in a)ie=a[Pt],a.hasOwnProperty(Pt)&&ie!==void 0&&!l.hasOwnProperty(Pt)&&d0(n,r,Pt,void 0,l,ie);for(pe in l)ie=l[pe],fe=a[pe],!l.hasOwnProperty(pe)||ie===fe||ie===void 0&&fe===void 0||d0(n,r,pe,ie,l,fe);return}}for(var se in a)ie=a[se],a.hasOwnProperty(se)&&ie!=null&&!l.hasOwnProperty(se)&&yn(n,r,se,null,l,ie);for(Ce in l)ie=l[Ce],fe=a[Ce],!l.hasOwnProperty(Ce)||ie===fe||ie==null&&fe==null||yn(n,r,Ce,ie,l,fe)}function eS(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nD(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var h=a[l],m=h.transferSize,T=h.initiatorType,P=h.duration;if(m&&P&&eS(T)){for(T=0,P=h.responseEnd,l+=1;l<a.length;l++){var Z=a[l],ae=Z.startTime;if(ae>P)break;var pe=Z.transferSize,Ce=Z.initiatorType;pe&&eS(Ce)&&(Z=Z.responseEnd,T+=pe*(Z<P?1:(P-ae)/(Z-ae)))}if(--l,r+=8*(m+T)/(h.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 f0=null,h0=null;function ec(n){return n.nodeType===9?n:n.ownerDocument}function tS(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 nS(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 rS(n,r,a,l){return a=ec(a).createElement(n),a[fn]=l,a[Mn]=r,xr(a,n,r),Se(a),a}function p0(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 g0=null;function rD(){var n=window.event;return n&&n.type==="popstate"?n===g0?!1:(g0=n,!0):(g0=null,!1)}var m0=typeof setTimeout=="function"?setTimeout:void 0,iD=typeof clearTimeout=="function"?clearTimeout:void 0,iS=typeof Promise=="function"?Promise:void 0,sS=typeof requestAnimationFrame=="function"?requestAnimationFrame:m0,sD=typeof queueMicrotask=="function"?queueMicrotask:typeof iS<"u"?function(n){return iS.resolve(null).then(n).catch(aD)}:m0;function aD(n){setTimeout(function(){throw n})}function Sa(n){return n==="head"}function aS(n,r){var a=r,l=0;do{var h=a.nextSibling;if(n.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"||a==="/&"){if(l===0){n.removeChild(h),Ol(r);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")R0(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,R0(a);for(var m=a.firstChild;m;){var T=m.nextSibling,P=m.nodeName;m[vi]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&m.rel.toLowerCase()==="stylesheet"||a.removeChild(m),m=T}}else a==="body"&&R0(n.ownerDocument.body);a=h}while(a);Ol(r)}function oS(n,r){var a=n;n=0;do{var l=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||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=l}while(a)}function lS(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 l=1;else for(var h=l=0;h<r.length;h++){var m=r[h];0<m.width&&0<m.height&&l++}l===1&&(n=n.style,n.display=r.length===1?"inline-block":"block",n.marginTop="-"+a.paddingTop,n.marginBottom="-"+a.paddingBottom)}}function uS(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 oD(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 y0(n){var r=n.getBoundingClientRect(),a=getComputedStyle(n);return oD(r,a,n)}function lD(n){return n.documentElement.clientHeight}function uD(n){this.addEventListener("load",n),this.addEventListener("error",n)}function cD(n,r,a,l,h,m,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,qe=ae.fonts.status;l();var rt=[];if(qe==="loaded"&&(lD(ae),ae.fonts.status==="loading"&&rt.push(ae.fonts.ready)),qe=rt.length,n!==null)for(var Pt=n.suspenseyImages,se=0,te=0;te<Pt.length;te++){var ue=Pt[te];if(!ue.complete){var Re=ue.getBoundingClientRect();if(0<Re.bottom&&0<Re.right&&Re.top<ie.innerHeight&&Re.left<ie.innerWidth){if(se+=kS(ue),se>Nf){rt.length=qe;break}ue=new Promise(uD.bind(ue)),rt.push(ue)}}}if(0<rt.length)return ie=Promise.race([Promise.all(rt),new Promise(function(We){return setTimeout(We,500)})]).then(h,h),(fe?Promise.allSettled([fe.finished,ie]):ie).then(m,m);if(h(),fe)return fe.finished.then(m,m);m()},types:a});ae.__reactViewTransition=pe;var Ce=[];return pe.ready.then(function(){for(var ie=ae.documentElement.getAnimations({subtree:!0}),fe=0;fe<ie.length;fe++){var qe=ie[fe],rt=qe.effect,Pt=rt.pseudoElement;if(Pt!=null&&Pt.startsWith("::view-transition")){Ce.push(qe),qe=rt.getKeyframes();for(var se=Pt=void 0,te=!0,ue=0;ue<qe.length;ue++){var Re=qe[ue],We=Re.width;if(Pt===void 0)Pt=We;else if(Pt!==We){te=!1;break}if(We=Re.height,se===void 0)se=We;else if(se!==We){te=!1;break}delete Re.width,delete Re.height,Re.transform==="none"&&delete Re.transform}te&&Pt!==void 0&&se!==void 0&&(rt.setKeyframes(qe),te=getComputedStyle(rt.target,rt.pseudoElement),te.width!==Pt||te.height!==se)&&(te=qe[0],te.width=Pt,te.height=se,te=qe[qe.length-1],te.width=Pt,te.height=se,rt.setKeyframes(qe))}}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{l(),h(),T()}}),pe.finished.finally(function(){for(var ie=0;ie<Ce.length;ie++)Ce[ie].cancel();ae.__reactViewTransition===pe&&(ae.__reactViewTransition=null),P()}),pe}catch{return l(),h(),T(),null}}function xo(n,r){this._scope=document.documentElement,this._selector="::view-transition-"+n+"("+r+")"}xo.prototype.animate=function(n,r){return r=typeof r=="number"?{duration:r}:D({},r),r.pseudoElement=this._selector,this._scope.animate(n,r)},xo.prototype.getAnimations=function(){for(var n=this._scope,r=this._selector,a=n.getAnimations({subtree:!0}),l=[],h=0;h<a.length;h++){var m=a[h].effect;m!==null&&m.target===n&&m.pseudoElement===r&&l.push(a[h])}return l},xo.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function cS(n){return{name:n,group:new xo("group",n),imagePair:new xo("image-pair",n),old:new xo("old",n),new:new xo("new",n)}}function fi(n){this._fragmentFiber=n,this._observers=this._eventListeners=null}fi.prototype.addEventListener=function(n,r,a){var l=null,h=null;if(!(a!=null&&typeof a!="boolean"&&(l=a.signal||null,l!==null&&l.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var m=this._eventListeners;if(fS(m,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)}),l!==null&&(h=T.removeEventListener.bind(T,n,r,a),l.addEventListener("abort",h,{once:!0}),h=l.removeEventListener.bind(l,"abort",h)),l=Sl(a),m.push({type:n,listener:r,optionsOrUseCapture:a,attachedListener:P,cleanup:h}),p(this._fragmentFiber.child,!1,dD,n,P,l)}this._eventListeners=m}};function dD(n,r,a,l){return E(n).addEventListener(r,a,l),!1}fi.prototype.removeEventListener=function(n,r,a){var l=this._eventListeners;if(l!==null&&(r=fS(l,n,r,a),r!==-1)){var h=l[r];a=h.attachedListener;var m=h.cleanup;h=Sl(h.optionsOrUseCapture),p(this._fragmentFiber.child,!1,fD,n,a,h),l.splice(r,1),m!==null&&m()}};function fD(n,r,a,l){return E(n).removeEventListener(r,a,l),!1}function Sl(n){return n!=null&&typeof n!="boolean"&&(n.once===!0||n.signal instanceof AbortSignal)?{capture:n.capture,passive:n.passive}:n}function dS(n){return n==null?"c=0":typeof n=="boolean"?"c="+(n?"1":"0"):"c="+(n.capture?"1":"0")}function fS(n,r,a,l){if(n.length===0)return-1;l=dS(l);for(var h=0;h<n.length;h++){var m=n[h];if(m.type===r&&m.listener===a&&dS(m.optionsOrUseCapture)===l)return h}return-1}fi.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 l=r.nodeType===9?r.createComment(""):document.createTextNode("");if(a)for(var h=0;h<a.length;h++){var m=a[h];l.addEventListener(m.type,m.attachedListener,Sl(m.optionsOrUseCapture))}if(r.appendChild(l),n=l.dispatchEvent(n),a)for(h=0;h<a.length;h++)m=a[h],l.removeEventListener(m.type,m.attachedListener,Sl(m.optionsOrUseCapture));return r.removeChild(l),n}return r.dispatchEvent(n)},fi.prototype.focus=function(n){p(this._fragmentFiber.child,!0,hS,n,void 0,void 0)};function hS(n,r){return n.tag===6?!1:(n=E(n),RD(n,r))}fi.prototype.focusLast=function(n){var r=[];p(this._fragmentFiber.child,!0,v0,r,void 0,void 0);for(var a=r.length-1;0<=a&&!hS(r[a],n);a--);};function v0(n,r){return r.push(n),!1}fi.prototype.blur=function(){var n=x(this._fragmentFiber);n!==null&&(n=E(n),n=ec(n).activeElement,n!==null&&p(this._fragmentFiber.child,!1,hD,n,void 0,void 0))};function hD(n,r){return n.tag===6?!1:(n=E(n),n===r||n.contains(r)?(r.blur(),!0):!1)}fi.prototype.observeUsing=function(n){this._observers===null&&(this._observers=new Set),this._observers.add(n),p(this._fragmentFiber.child,!1,pD,n,void 0,void 0)};function pD(n,r){return n.tag===6||(n=E(n),r.observe(n)),!1}fi.prototype.unobserveUsing=function(n){var r=this._observers;if(r!==null&&r.has(n)){r.delete(n),p(this._fragmentFiber.child,!1,gD,n,void 0,void 0);for(var a=r=0;a<Vi.length;a++){var l=Vi[a];l.fragmentInstance===this&&l.observer===n?n.unobserve(l.instance):Vi[r++]=l}Vi.length=r}};function gD(n,r){return n.tag===6||(n=E(n),r.unobserve(n)),!1}var Vi=[],b0=!1;function mD(n,r,a){Vi.push({fragmentInstance:n,observer:r,instance:a}),b0||(b0=!0,CD(function(){b0=!1;var l=Vi;Vi=[];for(var h=0;h<l.length;h++){var m=l[h];m.observer.unobserve(m.instance)}}))}fi.prototype.getClientRects=function(){var n=[];return p(this._fragmentFiber.child,!1,yD,n,void 0,void 0),n};function yD(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}fi.prototype.getRootNode=function(n){var r=x(this._fragmentFiber);return r===null?this:E(r).getRootNode(n)},fi.prototype.compareDocumentPosition=function(n){var r=x(this._fragmentFiber);if(r===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];p(this._fragmentFiber.child,!1,v0,a,void 0,void 0);var l=E(r);if(a.length===0){if(a=l,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 h=l=a.compareDocumentPosition(n);return a===n?h=Node.DOCUMENT_POSITION_CONTAINS:l&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=w(r)[1],a===null?h=Node.DOCUMENT_POSITION_PRECEDING:(n=E(a).compareDocumentPosition(n),h=n===0||n&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),h|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}r=E(a[0]),h=E(a[a.length-1]);var m=S(this._fragmentFiber)?r.parentElement:l;if(m==null)return Node.DOCUMENT_POSITION_DISCONNECTED;l=m.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY,m=m.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY;var T=r.compareDocumentPosition(n),P=h.compareDocumentPosition(n),Z=T&Node.DOCUMENT_POSITION_CONTAINED_BY||P&Node.DOCUMENT_POSITION_CONTAINED_BY;return P=l&&m&&T&Node.DOCUMENT_POSITION_FOLLOWING&&P&Node.DOCUMENT_POSITION_PRECEDING,r=l&&r===n||m&&h===n||Z||P?Node.DOCUMENT_POSITION_CONTAINED_BY:!l&&r===n||!m&&h===n?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:T,r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||vD(r,this._fragmentFiber,a[0],a[a.length-1],n)?r:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function vD(n,r,a,l,h){var m=Fn(h);if(n&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!m)e:{for(;m!==null;){if(m.tag===7&&(m===r||m.alternate===r)){a=!0;break e}m=m.return}a=!1}return a}if(n&Node.DOCUMENT_POSITION_CONTAINS){if(m===null)return m=h.ownerDocument,h===m||h===m.documentElement||h===m.body;e:{for(m=r,r=x(r);m!==null;){if(!(m.tag!==5&&m.tag!==3&&m.tag!==27||m!==r&&m.alternate!==r)){m=!0;break e}m=m.return}m=!1}return m}return n&Node.DOCUMENT_POSITION_PRECEDING?((r=!!m)&&!(r=m===a)&&(r=j(a,m,N),r===null?r=!1:(p(r,!0,A,m,a),m=R,R=null,r=m!==null)),r):n&Node.DOCUMENT_POSITION_FOLLOWING?((r=!!m)&&!(r=m===l)&&(r=j(l,m,N),r===null?r=!1:(p(r,!0,M,m,l),m=R,O=R=null,r=m!==null)),r):!1}function pS(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)}fi.prototype.scrollIntoView=function(n){if(typeof n=="object")throw Error(s(566));var r=[];p(this._fragmentFiber.child,!1,v0,r,void 0,void 0);var a=n!==!1;if(r.length===0){var l=w(this._fragmentFiber);if(l=a?l[1]||l[0]||x(this._fragmentFiber):l[0]||l[1],l===null)return;if(l.tag===6){n=E(l),pS(n,a);return}if(l=E(l),l.nodeType!==9){if(l.nodeType===11){a="host"in l?l.host:null,a!==null&&a.scrollIntoView(n);return}l.scrollIntoView(n)}}for(l=a?r.length-1:0;l!==(a?-1:r.length);){var h=r[l];h.tag===6?(h=E(h),pS(h,a)):E(h).scrollIntoView(n),l+=a?-1:1}};function bD(n,r){return n=E(n),gS(n,r),!1}function gS(n,r){n.reactFragments==null&&(n.reactFragments=new Set),n.reactFragments.add(r)}function mS(n,r){var a=r._eventListeners;if(a!==null)for(var l=0;l<a.length;l++){var h=a[l];n.addEventListener(h.type,h.attachedListener,Sl(h.optionsOrUseCapture))}n.nodeType!==3&&(a=r._observers,a!==null&&a.forEach(function(m){for(var T=0,P=0;P<Vi.length;P++){var Z=Vi[P];(Z.fragmentInstance!==r||Z.observer!==m||Z.instance!==n)&&(Vi[T++]=Z)}Vi.length=T,m.observe(n)}),gS(n,r))}function xD(n,r){var a=r._eventListeners;if(a!==null)for(var l=0;l<a.length;l++){var h=a[l];n.removeEventListener(h.type,h.attachedListener,Sl(h.optionsOrUseCapture))}n.nodeType!==3&&(a=r._observers,a!==null&&a.forEach(function(m){typeof m.rootMargin=="string"?mD(r,m,n):m.unobserve(n)}),n.reactFragments!=null&&n.reactFragments.delete(r))}function x0(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":x0(a),qn(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function SD(n,r,a,l){for(;n.nodeType===1;){var h=a;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[vi])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(m!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var m=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=Ti(n.nextSibling),n===null)break}return null}function wD(n,r,a){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Ti(n.nextSibling),n===null))return null;return n}function yS(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=Ti(n.nextSibling),n===null))return null;return n}function S0(n){return n.data==="$?"||n.data==="$~"}function w0(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function ED(n,r){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||a.readyState!=="loading")r();else{var l=function(){r(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function Ti(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 E0=null;function vS(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(r===0)return Ti(n.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}n=n.nextSibling}return null}function bS(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 RD(n,r){function a(){l=!0}if(n.ownerDocument.activeElement===n)return!0;var l=!1;try{n.ownerDocument.addEventListener("focus",a,!0),(n.focus||HTMLElement.prototype.focus).call(n,r)}finally{n.ownerDocument.removeEventListener("focus",a,!0)}return l}function CD(n){sS(function(){sS(function(r){return n(r)})})}function xS(n,r,a){switch(r=ec(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 SS(n,r,a){for(var l in a){var h=a[l];a.hasOwnProperty(l)&&h!=null&&yn(n,r,l,null,eD,h)}a.dangerouslySetInnerHTML!=null&&(n.textContent=""),n.onclick===Ir&&(n.onclick=null),qn(n)}function R0(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);qn(n)}var Oi=new Map,wS=new Set;function tc(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 Ps=ce.d;ce.d={f:TD,r:OD,D:AD,C:MD,L:kD,m:ND,X:jD,S:DD,M:ID};function TD(){var n=Ps.f(),r=wf();return n||r}function OD(n){var r=hr(n);r!==null&&r.tag===5&&r.type==="form"?R2(r):Ps.r(n)}var wl=typeof document>"u"?null:document;function ES(n,r,a){var l=wl;if(l&&typeof r=="string"&&r){var h=Dn(r);h='link[rel="'+n+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),wS.has(h)||(wS.add(h),n={rel:n,crossOrigin:a,href:r},l.querySelector(h)===null&&(r=l.createElement("link"),xr(r,"link",n),Se(r),l.head.appendChild(r)))}}function AD(n){Ps.D(n),ES("dns-prefetch",n,null)}function MD(n,r){Ps.C(n,r),ES("preconnect",n,r)}function kD(n,r,a){Ps.L(n,r,a);var l=wl;if(l&&n&&r){var h='link[rel="preload"][as="'+Dn(r)+'"]';r==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Dn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Dn(a.imageSizes)+'"]')):h+='[href="'+Dn(n)+'"]';var m=h;switch(r){case"style":m=El(n);break;case"script":m=Rl(n)}if(!(Oi.has(m)||(n=D({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:n,as:r},a),Oi.set(m,n),l.querySelector(h)!==null||r==="style"&&l.querySelector(nc(m))||r==="script"&&l.querySelector(rc(m))))){var T=l.createElement("link");xr(T,"link",n),r==="style"&&(T[zt]=!0,T.onload=T.onerror=function(){nt(T)}),Se(T),l.head.appendChild(T)}}}function ND(n,r){Ps.m(n,r);var a=wl;if(a&&n){var l=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Dn(l)+'"][href="'+Dn(n)+'"]',m=h;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Rl(n)}if(!Oi.has(m)&&(n=D({rel:"modulepreload",href:n},r),Oi.set(m,n),a.querySelector(h)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(rc(m)))return}l=a.createElement("link"),xr(l,"link",n),Se(l),a.head.appendChild(l)}}}function DD(n,r,a){Ps.S(n,r,a);var l=wl;if(l&&n){var h=Me(l).hoistableStyles,m=El(n);r=r||"default";var T=h.get(m);if(!T){var P={loading:0,preload:null};if(T=l.querySelector(nc(m)))P.loading=5;else{n=D({rel:"stylesheet",href:n,"data-precedence":r},a),(a=Oi.get(m))&&C0(n,a);var Z=T=l.createElement("link");Se(Z),xr(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,Mf(T,r,l)}T={type:"stylesheet",instance:T,count:1,state:P},h.set(m,T)}}}function jD(n,r){Ps.X(n,r);var a=wl;if(a&&n){var l=Me(a).hoistableScripts,h=Rl(n),m=l.get(h);m||(m=a.querySelector(rc(h)),m||(n=D({src:n,async:!0},r),(r=Oi.get(h))&&T0(n,r),m=a.createElement("script"),Se(m),xr(m,"link",n),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(h,m))}}function ID(n,r){Ps.M(n,r);var a=wl;if(a&&n){var l=Me(a).hoistableScripts,h=Rl(n),m=l.get(h);m||(m=a.querySelector(rc(h)),m||(n=D({src:n,async:!0,type:"module"},r),(r=Oi.get(h))&&T0(n,r),m=a.createElement("script"),Se(m),xr(m,"link",n),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(h,m))}}function RS(n,r,a,l){var h=(h=be.current)?tc(h):null;if(!h)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=El(a.href),r=Me(h).hoistableStyles,l=r.get(a),l||(l={type:"style",instance:null,count:0,state:null},r.set(a,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=El(a.href);var m=Me(h).hoistableStyles,T=m.get(n);if(T||(h=h.ownerDocument||h,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,T),(m=h.querySelector(nc(n)))?m._p||(T.instance=m,T.state.loading=5):(m=Oi.get(n),m||(m={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Oi.set(n,m)),PD(h,n,m,T.state))),r&&l===null)throw Error(s(528,""));return T}if(r&&l!==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=Rl(a),r=Me(h).hoistableScripts,l=r.get(a),l||(l={type:"script",instance:null,count:0,state:null},r.set(a,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function El(n){return'href="'+Dn(n)+'"'}function nc(n){return'link[rel="stylesheet"]['+n+"]"}function CS(n){return D({},n,{"data-precedence":n.precedence,precedence:null})}function PD(n,r,a,l){if(r=n.querySelector('link[rel="preload"][as="style"]['+r+"]")){if(r[zt]!==!0){l.loading=1;return}}else r=n.createElement("link"),r[zt]=!0,r.onload=r.onerror=nt.bind(null,r),xr(r,"link",a),Se(r),n.head.appendChild(r);l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2})}function Rl(n){return'[src="'+Dn(n)+'"]'}function rc(n){return"script[async]"+n}function TS(n,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var l=n.querySelector('style[data-href~="'+Dn(a.href)+'"]');if(l)return r.instance=l,Se(l),l;var h=D({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),Se(l),xr(l,"style",h),Mf(l,a.precedence,n),r.instance=l;case"stylesheet":h=El(a.href);var m=n.querySelector(nc(h));if(m)return r.state.loading|=4,r.instance=m,Se(m),m;l=CS(a),(h=Oi.get(h))&&C0(l,h),m=(n.ownerDocument||n).createElement("link"),Se(m);var T=m;return T._p=new Promise(function(P,Z){T.onload=P,T.onerror=Z}),xr(m,"link",l),r.state.loading|=4,Mf(m,a.precedence,n),r.instance=m;case"script":return m=Rl(a.src),(h=n.querySelector(rc(m)))?(r.instance=h,Se(h),h):(l=a,(h=Oi.get(m))&&(l=D({},a),T0(l,h)),n=n.ownerDocument||n,h=n.createElement("script"),Se(h),xr(h,"link",l),n.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,Mf(l,a.precedence,n));return r.instance}function Mf(n,r,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=l.length?l[l.length-1]:null,m=h,T=0;T<l.length;T++){var P=l[T];if(P.dataset.precedence===r)m=P;else if(m!==h)break}m?m.parentNode.insertBefore(n,m.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(n,r.firstChild))}function C0(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function T0(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var kf=null;function OS(n,r,a){if(kf===null){var l=new Map,h=kf=new Map;h.set(a,l)}else h=kf,l=h.get(a),l||(l=new Map,h.set(a,l));if(l.has(n))return l;for(l.set(n,null),a=a.getElementsByTagName(n),h=0;h<a.length;h++){var m=a[h];if(!(m[vi]||m[fn]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var T=m.getAttribute(r)||"";T=n+T;var P=l.get(T);P?P.push(m):l.set(T,[m])}}return l}function O0(n,r,a){n=n.ownerDocument||n,n.head.insertBefore(a,r==="title"?n.querySelector("head > title"):null)}function LD(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 AS(n,r){return n==="img"&&r.src!=null&&r.src!==""&&r.onLoad==null&&r.loading!=="lazy"}function MS(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function kS(n){return(n.width||100)*(n.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function NS(n,r){typeof r.decode=="function"&&(n.imgCount++,r.complete||(n.imgBytes+=kS(r),n.suspenseyImages.push(r)),n=UD.bind(n),r.decode().then(n,n))}function zD(n,r,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=El(l.href),m=r.querySelector(nc(h));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=ic.bind(n),r.then(n,n)),a.state.loading|=4,a.instance=m,Se(m);return}m=r.ownerDocument||r,l=CS(l),(h=Oi.get(h))&&C0(l,h),m=m.createElement("link"),Se(m);var T=m;T._p=new Promise(function(P,Z){T.onload=P,T.onerror=Z}),xr(m,"link",l),a.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,r),(r=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=ic.bind(n),r.addEventListener("load",a),r.addEventListener("error",a))}}var Nf=0;function _D(n,r){return n.stylesheets&&n.count===0&&jf(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var l=setTimeout(function(){if(n.stylesheets&&jf(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+r);0<n.imgBytes&&Nf===0&&(Nf=62500*nD());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&jf(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>Nf?50:800)+r);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(h)}}:null}function DS(n){if(n.count===0&&(n.imgCount===0||!n.waitingForImages)){if(n.stylesheets)jf(n,n.stylesheets);else if(n.unsuspend){var r=n.unsuspend;n.unsuspend=null,r()}}}function ic(){this.count--,DS(this)}function UD(){this.imgCount--,DS(this)}var Df=null;function jf(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Df=new Map,r.forEach(HD,n),Df=null,ic.call(n))}function HD(n,r){if(!(r.state.loading&4)){var a=Df.get(n);if(a)var l=a.get(null);else{a=new Map,Df.set(n,a);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<h.length;m++){var T=h[m];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(a.set(T.dataset.precedence,T),l=T)}l&&a.set(null,l)}h=r.instance,T=h.getAttribute("data-precedence"),m=a.get(T)||l,m===l&&a.set(null,h),a.set(T,h),this.count++,l=ic.bind(this),h.addEventListener("load",l),h.addEventListener("error",l),m?m.parentNode.insertBefore(h,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),r.state.loading|=4}}var Cl={$$typeof:U,Provider:null,Consumer:null,_currentValue:Te,_currentValue2:Te,_threadCount:0};function FD(n,r,a,l,h,m,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=wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wt(0),this.hiddenUpdates=wt(null),this.identifierPrefix=l,this.onUncaughtError=h,this.onCaughtError=m,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.transitionTypes=null,this.incompleteTransitions=new Map}function jS(n,r,a,l,h,m,T,P,Z,ae,pe,Ce){return n=new FD(n,r,a,T,Z,ae,pe,Ce,P),r=1,m===!0&&(r|=24),m=Kr(3,null,null,r),n.current=m,m.stateNode=n,r=Bg(),r.refCount++,n.pooledCache=r,r.refCount++,m.memoizedState={element:l,isDehydrated:a,cache:r},Yg(m),n}function IS(n){return n?(n=Zo,n):Zo}function PS(n,r,a,l,h,m){h=IS(h),l.context===null?l.context=h:l.pendingContext=h,l=ua(r),l.payload={element:a},m=m===void 0?null:m,m!==null&&(l.callback=m),a=ca(n,l,r),a!==null&&($r(a,n,r),Pu(a,n,r))}function LS(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<r?a:r}}function A0(n,r){LS(n,r),(n=n.alternate)&&LS(n,r)}function zS(n){if(n.tag===13||n.tag===31){var r=no(n,67108864);r!==null&&$r(r,n,67108864),A0(n,67108864)}}function _S(n){if(n.tag===13||n.tag===31){var r=di();r=Bt(r);var a=no(n,r);a!==null&&$r(a,n,r),A0(n,r)}}var Tl=!0;function BD(n,r,a,l){var h=ge.T;ge.T=null;var m=ce.p;try{ce.p=2,M0(n,r,a,l)}finally{ce.p=m,ge.T=h}}function VD(n,r,a,l){var h=ge.T;ge.T=null;var m=ce.p;try{ce.p=8,M0(n,r,a,l)}finally{ce.p=m,ge.T=h}}function M0(n,r,a,l){if(Tl){var h=k0(l);if(h===null)c0(n,r,l,If,a),HS(n,l);else if(qD(h,n,r,a,l))l.stopPropagation();else if(HS(n,l),r&4&&-1<KD.indexOf(n)){for(;h!==null;){var m=hr(h);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var T=Ke(m.pendingLanes);if(T!==0){var P=m;for(P.pendingLanes|=2,P.entangledLanes|=2;T;){var Z=1<<31-et(T);P.entanglements[1]|=Z,T&=~Z}os(m),(un&6)===0&&(bf=St()+500,Zu(0))}}break;case 31:case 13:P=no(m,2),P!==null&&$r(P,m,2),wf(),A0(m,2)}if(m=k0(l),m===null&&c0(n,r,l,If,a),m===h)break;h=m}h!==null&&l.stopPropagation()}else c0(n,r,l,null,a)}}function k0(n){return n=Za(n),N0(n)}var If=null;function N0(n){if(If=null,n=Fn(n),n!==null){var r=u(n);if(r===null)n=null;else{var a=r.tag;if(a===13){if(n=c(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 If=n,null}function US(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(Xt()){case ft:return 2;case bt:return 8;case mt:case Ut:return 32;case cn:return 268435456;default:return 32}default:return 32}}var D0=!1,wa=null,Ea=null,Ra=null,sc=new Map,ac=new Map,Ca=[],KD="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 HS(n,r){switch(n){case"focusin":case"focusout":wa=null;break;case"dragenter":case"dragleave":Ea=null;break;case"mouseover":case"mouseout":Ra=null;break;case"pointerover":case"pointerout":sc.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ac.delete(r.pointerId)}}function oc(n,r,a,l,h,m){return n===null||n.nativeEvent!==m?(n={blockedOn:r,domEventName:a,eventSystemFlags:l,nativeEvent:m,targetContainers:[h]},r!==null&&(r=hr(r),r!==null&&zS(r)),n):(n.eventSystemFlags|=l,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function qD(n,r,a,l,h){switch(r){case"focusin":return wa=oc(wa,n,r,a,l,h),!0;case"dragenter":return Ea=oc(Ea,n,r,a,l,h),!0;case"mouseover":return Ra=oc(Ra,n,r,a,l,h),!0;case"pointerover":var m=h.pointerId;return sc.set(m,oc(sc.get(m)||null,n,r,a,l,h)),!0;case"gotpointercapture":return m=h.pointerId,ac.set(m,oc(ac.get(m)||null,n,r,a,l,h)),!0}return!1}function FS(n){var r=Fn(n.target);if(r!==null){var a=u(r);if(a!==null){if(r=a.tag,r===13){if(r=c(a),r!==null){n.blockedOn=r,ei(n.priority,function(){_S(a)});return}}else if(r===31){if(r=d(a),r!==null){n.blockedOn=r,ei(n.priority,function(){_S(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 Pf(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var a=k0(n.nativeEvent);if(a===null){a=n.nativeEvent;var l=new a.constructor(a.type,a);Xa=l,a.target.dispatchEvent(l),Xa=null}else return r=hr(a),r!==null&&zS(r),n.blockedOn=a,!1;r.shift()}return!0}function BS(n,r,a){Pf(n)&&a.delete(r)}function YD(){D0=!1,wa!==null&&Pf(wa)&&(wa=null),Ea!==null&&Pf(Ea)&&(Ea=null),Ra!==null&&Pf(Ra)&&(Ra=null),sc.forEach(BS),ac.forEach(BS)}function Lf(n,r){n.blockedOn===r&&(n.blockedOn=null,D0||(D0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,YD)))}var zf=null;function VS(n){zf!==n&&(zf=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){zf===n&&(zf=null);for(var r=0;r<n.length;r+=3){var a=n[r],l=n[r+1],h=n[r+2];if(typeof l!="function"){if(N0(l||a)===null)continue;break}var m=hr(a);m!==null&&(n.splice(r,3),r-=3,hm(m,{pending:!0,data:h,method:a.method,action:l},l,h))}}))}function Ol(n){function r(Z){return Lf(Z,n)}wa!==null&&Lf(wa,n),Ea!==null&&Lf(Ea,n),Ra!==null&&Lf(Ra,n),sc.forEach(r),ac.forEach(r);for(var a=0;a<Ca.length;a++){var l=Ca[a];l.blockedOn===n&&(l.blockedOn=null)}for(;0<Ca.length&&(a=Ca[0],a.blockedOn===null);)FS(a),a.blockedOn===null&&Ca.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var h=a[l],m=a[l+1],T=h[Mn]||null;if(typeof m=="function")T||VS(a);else if(T){var P=null;if(m&&m.hasAttribute("formAction")){if(h=m,T=m[Mn]||null)P=T.formAction;else if(N0(h)!==null)continue}else P=T.action;typeof P=="function"?a[l+1]=P:(a.splice(l,3),l-=3),VS(a)}}}function KS(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(T){return h=T})},focusReset:"manual",scroll:"manual"})}function r(){h!==null&&(h(),h=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),h!==null&&(h(),h=null)}}}function j0(n){this._internalRoot=n}_f.prototype.render=j0.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(s(409));var a=r.current,l=di();PS(a,l,n,r,null,null)},_f.prototype.unmount=j0.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;PS(n.current,2,null,n,null,null),wf(),r[jn]=null}};function _f(n){this._internalRoot=n}_f.prototype.unstable_scheduleHydration=function(n){if(n){var r=Tn();n={blockedOn:null,target:n,priority:r};for(var a=0;a<Ca.length&&r!==0&&r<Ca[a].priority;a++);Ca.splice(a,0,n),a===0&&FS(n)}};var qS=t.version;if(qS!=="19.3.1")throw Error(s(527,qS,"19.3.1"));ce.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?y(n):null,n=n===null?null:n.stateNode,n};var GD={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ge,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Uf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uf.isDisabled&&Uf.supportsFiber)try{Ie=Uf.inject(GD),ze=Uf}catch{}}return uc.createRoot=function(n,r){if(!o(n))throw Error(s(299));var a=!1,l="",h=I2,m=P2,T=L2;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(T=r.onRecoverableError)),r=jS(n,1,!1,null,null,a,l,null,h,m,T,KS),n[jn]=r.current,u0(n),new j0(r)},uc.hydrateRoot=function(n,r,a){if(!o(n))throw Error(s(299));var l=!1,h="",m=I2,T=P2,P=L2,Z=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(T=a.onCaughtError),a.onRecoverableError!==void 0&&(P=a.onRecoverableError),a.formState!==void 0&&(Z=a.formState)),r=jS(n,1,!0,r,a??null,l,h,Z,m,T,P,KS),r.context=IS(null),a=r.current,l=di(),l=Bt(l),h=ua(l),h.callback=null,ca(a,h,l),a=l,r.current.lanes=a,dt(r,a),os(r),n[jn]=r.current,u0(n),new _f(r)},uc.version="19.3.1",uc}var tw;function rj(){if(tw)return L0.exports;tw=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(),L0.exports=nj(),L0.exports}var ij=rj();const nw={};function er(e,t){const i=v.useRef(nw);return i.current===nw&&(i.current=e(t)),i}const by=[];let xy;function sj(){return xy}function aj(e){by.push(e)}function Yc(e){const t=(i,s)=>{const o=er(oj).current;let u;try{xy=o;for(const c of by)c.before(o);u=e(i,s);for(const c of by)c.after(o);o.didInitialize=!0}finally{xy=void 0}return u};return t.displayName=e.displayName||e.name,t}function cv(e){return v.forwardRef(Yc(e))}function oj(){return{didInitialize:!1}}function En(){}const Gi=Object.freeze([]),Qt=Object.freeze({}),lj=()=>{},_e=typeof document<"u"?v.useLayoutEffect:lj;function uj(e,t){return function(s,...o){const u=new URL(e);return u.searchParams.set("code",s.toString()),o.forEach(c=>u.searchParams.append("args[]",c)),`${t} error #${s}; visit ${u} for the full message.`}}const bn=uj("https://base-ui.com/production-error","Base UI"),jR=v.createContext(void 0);function Gc(e){const t=v.useContext(jR);if(t===void 0&&!e)throw new Error(bn(72));return t}function dv(e){v.useEffect(e,Gi)}const cc=0;class ji{static create(){return new ji}currentId=cc;start(t,i){this.clear(),this.currentId=setTimeout(()=>{this.currentId=cc,i()},t)}isStarted(){return this.currentId!==cc}clear=()=>{this.currentId!==cc&&(clearTimeout(this.currentId),this.currentId=cc)};disposeEffect=()=>this.clear}function Un(){const e=er(ji.create).current;return dv(e.disposeEffect),e}function cj(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:dj,platform:fj,maxTouchPoints:hj}=cj(),lp=dj.toLowerCase(),Dc=fj.toLowerCase(),up=/^i(os$|p)/.test(Dc)||Dc==="macintel"&&hj>1,rw="android",Sy=Dc===rw||lp.includes(rw),fv=!up&&Dc.startsWith("mac");Dc.startsWith("win");const pj=fv||up,ms=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!ms&&lp.includes("firefox");!ms&&lp.includes("chrom");const gj=pj,hv=/jsdom|happydom/.test(lp);function qi(e){e.preventDefault(),e.stopPropagation()}function mj(e){return"nativeEvent"in e}function Xl(e){return e.pointerType===""&&e.isTrusted?!0:Sy&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function pv(e){return hv?!1:!Sy&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(Sy||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function ja(e,t){const i=["mouse","pen"];return t||i.push("",void 0),i.includes(e)}function yj(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function cp(){return typeof window<"u"}function Er(e){return gv(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ys(e){var t;return(t=(gv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gv(e){return cp()?e instanceof Node||e instanceof Rn(e).Node:!1}function on(e){return cp()?e instanceof Element||e instanceof Rn(e).Element:!1}function vn(e){return cp()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function ko(e){return!cp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function $c(e){const{overflow:t,overflowX:i,overflowY:s,display:o}=gi(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+i)&&o!=="inline"&&o!=="contents"}function vj(e){return/^(table|td|th)$/.test(Er(e))}function dp(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/,xj=/paint|layout|strict|content/,So=e=>!!e&&e!=="none";let H0;function mv(e){const t=on(e)?gi(e):e;return So(t.transform)||So(t.translate)||So(t.scale)||So(t.rotate)||So(t.perspective)||!yv()&&(So(t.backdropFilter)||So(t.filter))||bj.test(t.willChange||"")||xj.test(t.contain||"")}function Sj(e){let t=Ks(e);for(;vn(t)&&!Fs(t);){if(mv(t))return t;if(dp(t))return null;t=Ks(t)}return null}function yv(){return H0==null&&(H0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),H0}function Fs(e){return/^(html|body|#document)$/.test(Er(e))}function gi(e){return Rn(e).getComputedStyle(e)}function fp(e){return on(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ks(e){if(Er(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ko(e)&&e.host||Ys(e);return ko(t)?t.host:t}function IR(e){const t=Ks(e);return Fs(t)?(e.ownerDocument||e).body:vn(t)&&$c(t)?t:IR(t)}function jc(e,t,i){var s;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=IR(e),u=o===((s=e.ownerDocument)==null?void 0:s.body),c=Rn(o);if(u){const d=wy(c);return t.concat(c,c.visualViewport||[],$c(o)?o:[],d&&i?jc(d):[])}else return t.concat(o,jc(o,[],i))}function wy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function it(e,t){if(!e||!t)return!1;const i=t.getRootNode?.();if(e.contains(t))return!0;if(i&&ko(i)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Ic(e,t){let i=e;for(;i;){if(on(i)&&i.matches(t))return i;i=i.assignedSlot??i.parentNode??(ko(i)?i.host:null)}return null}function tr(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const Ey="data-base-ui-focusable",PR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",hp="ArrowLeft",pp="ArrowRight",LR="ArrowUp",vv="ArrowDown",bv="data-starting-style",wj="data-ending-style",Ej={[bv]:""},Rj={[wj]:""},ys={transitionStatus(e){return e==="starting"?Ej:e==="ending"?Rj:null}},Cj="data-open",Tj="data-closed",Oj="data-anchor-hidden",zR="data-popup-open",Aj="data-pressed",Mj={[zR]:""},kj={[zR]:"",[Aj]:""},Nj={[Cj]:""},Dj={[Tj]:""},jj={[Oj]:""},xv={open(e){return e?Mj:null}},kh={open(e){return e?kj:null}},Qc={open(e){return e?Nj:Dj},anchorHidden(e){return e?jj:null}},gp={...Qc,...ys},Ry="data-trigger-disabled";function Nh(e,t){if(!on(e))return!1;const i=e;if(t.hasElement(i))return!i.hasAttribute(Ry);for(const[,s]of t.entries())if(it(s,i))return!s.hasAttribute(Ry);return!1}function F0(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 Ij(e){return e.matches("html,body")}function Xc(e){return vn(e)&&e.matches(PR)}function Pj(e){return Ic(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${PR}`)!=null}function Cy(e){return e?e.getAttribute("role")==="combobox"&&Xc(e):!1}function Lj(e){if(!e||hv)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Dh(e){return e?e.hasAttribute(Ey)?e:e.querySelector(`[${Ey}]`)||e:null}function zj(e,t){return t!=null&&!ja(t)?0:typeof e=="function"?e():e}function No(e,t,i){const s=zj(e,i);return typeof s=="number"?s:s?.[t]}function iw(e){return typeof e=="function"?e():e}function _R(e,t){return t||e==="click"||e==="mousedown"}function _j(e){return e?.includes("mouse")&&e!=="mousedown"}function ut(e,t,i,s){let o=!1,u=!1;const c=s??Qt;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){u=!0},get isCanceled(){return o},get isPropagationAllowed(){return u},trigger:i,...c}}function Uj(e,t,i){const s=i??Qt;return{reason:e,event:t??new Event("base-ui"),...s}}const kr="none",$i="trigger-press",Kn="trigger-hover",zl="trigger-focus",mp="outside-press",Ao="item-press",UR="close-press",Pa="focus-out",Zc="escape-key",jh="list-navigation",HR="keyboard",Hj="pointer",Sv="cancel-open",mc="sibling-open",Fj="disabled",Wc="imperative-action",Bj="window-resize",FR=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new ji,currentIdRef:{current:null},currentContextRef:{current:null}});function Vj(e,t){e.current=t.current}function Kj(e){const{children:t,delay:i,timeoutMs:s=0}=e,o=v.useRef(i),u=v.useRef(i),c=v.useRef(null),d=v.useRef(null),f=Un();return _e(()=>{if(u.current=i,!c.current){o.current=i;return}o.current={open:No(o.current,"open"),close:No(i,"close")}},[i,c,o,u]),b.jsx(FR.Provider,{value:v.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:u,currentIdRef:c,timeoutMs:s,currentContextRef:d,timeout:f}),[s,f]),children:t})}function qj(e,t={open:!1}){const{open:i}=t,s=e.useState("floatingId"),o=v.useContext(FR),{currentIdRef:u,delayRef:c,timeoutMs:d,initialDelayRef:f,currentContextRef:g,hasProvider:y,timeout:p}=o,[x,S]=v.useState(!1),w=v.useRef(i);return _e(()=>{w.current=i},[i]),_e(()=>{function C(){g.current?.setIsInstantPhase(!1),u.current=null,g.current=null,c.current=f.current,p.clear()}if(u.current&&!i&&u.current===s){if(S(!1),d){const E=s;return p.start(d,()=>{e.select("open")||u.current&&u.current!==E||C()}),()=>{(w.current||u.current!==E)&&p.clear()}}C()}},[i,s,u,c,d,f,g,p,e]),_e(()=>{if(!i)return;const C=g.current,E=u.current;p.clear(),g.current={onOpenChange:e.setOpen,setIsInstantPhase:S},u.current=s,c.current={open:0,close:No(f.current,"close")},E!==null&&E!==s?(S(!0),C?.setIsInstantPhase(!0),C?.onOpenChange(!1,ut(kr))):(S(!1),C?.setIsInstantPhase(!1))},[i,s,e,u,c,f,g,p]),_e(()=>()=>{if(u.current===s){if(g.current=null,!w.current)return;u.current=null,Vj(c,f),p.clear()}},[g,u,c,s,f,p]),v.useMemo(()=>({activeIdRef:u,hasProvider:y,delayRef:c,isInstantPhase:x}),[u,y,c,x])}function Lt(e,t,i,s){return e.addEventListener(t,i,s),()=>{e.removeEventListener(t,i,s)}}function ps(...e){return()=>{for(let t=0;t<e.length;t+=1){const i=e[t];i&&i()}}}function Wr(e,t,i,s){const o=er(BR).current;return Gj(o,e,t,i,s)&&VR(o,[e,t,i,s]),o.callback}function Yj(e){const t=er(BR).current;return $j(t,e)&&VR(t,e),t.callback}function BR(){return{callback:null,cleanup:null,refs:[]}}function Gj(e,t,i,s,o){return e.refs[0]!==t||e.refs[1]!==i||e.refs[2]!==s||e.refs[3]!==o}function $j(e,t){return e.refs.length!==t.length||e.refs.some((i,s)=>i!==t[s])}function VR(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 u=t[o];if(u!=null)switch(typeof u){case"function":{const c=u(i);typeof c=="function"&&(s[o]=c);break}case"object":{u.current=i;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const u=t[o];if(u!=null)switch(typeof u){case"function":{const c=s[o];typeof c=="function"?c():u(null);break}case"object":{u.current=null;break}}}}}}}function Ln(e){const t=er(Qj,e).current;return t.next=e,_e(t.effect),t}function Qj(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const wv={...NR},B0=wv.useInsertionEffect,Xj=B0&&B0!==wv.useLayoutEffect?B0:e=>e();function Fe(e){const t=er(Zj).current;return t.next=e,Xj(t.effect),t.trampoline}function Zj(){const e={next:void 0,callback:Wj,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Wj(){}const Hf=null;class Jj{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 Ff=new Jj;class Or{static create(){return new Or}static request(t){return Ff.request(t)}static cancel(t){return Ff.cancel(t)}currentId=Hf;request(t){this.cancel(),this.currentId=Ff.request(()=>{this.currentId=Hf,t()})}cancel=()=>{this.currentId!==Hf&&(Ff.cancel(this.currentId),this.currentId=Hf)};disposeEffect=()=>this.cancel}function Zl(){const e=er(Or.create).current;return dv(e.disposeEffect),e}function $t(e){return e?.ownerDocument||document}const KR={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Jc={...KR,position:"fixed",margin:0,top:0,left:0},yp={...KR,position:"absolute"},Wl=v.forwardRef(function(t,i){const[s,o]=v.useState();_e(()=>{gj&&ms&&o("button")},[]);const u={tabIndex:0,role:s};return b.jsx("span",{...t,ref:i,style:Jc,"aria-hidden":s?void 0:!0,...u,"data-base-ui-focus-guard":""})}),Jl=Math.min,Bs=Math.max,Ih=Math.round,Bf=Math.floor,Vs=e=>({x:e,y:e}),e4={left:"right",right:"left",bottom:"top",top:"bottom"};function qR(e,t,i){return Bs(e,Jl(t,i))}function La(e,t){return typeof e=="function"?e(t):e}function pi(e){return e.split("-")[0]}function gs(e){return e.split("-")[1]}function Ev(e){return e==="x"?"y":"x"}function Rv(e){return e==="y"?"height":"width"}function Ni(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Cv(e){return Ev(Ni(e))}function t4(e,t,i){i===void 0&&(i=!1);const s=gs(e),o=Cv(e),u=Rv(o);let c=o==="x"?s===(i?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[u]>t.floating[u]&&(c=Ph(c)),[c,Ph(c)]}function n4(e){const t=Ph(e);return[Ty(e),t,Ty(t)]}function Ty(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const sw=["left","right"],aw=["right","left"],r4=["top","bottom"],i4=["bottom","top"];function s4(e,t,i){switch(e){case"top":case"bottom":return i?t?aw:sw:t?sw:aw;case"left":case"right":return t?r4:i4;default:return[]}}function a4(e,t,i,s){const o=gs(e);let u=s4(pi(e),i==="start",s);return o&&(u=u.map(c=>c+"-"+o),t&&(u=u.concat(u.map(Ty)))),u}function Ph(e){const t=pi(e);return e4[t]+e.slice(t.length)}function o4(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 YR(e){return typeof e!="number"?o4(e):{top:e,right:e,bottom:e,left:e}}function Pc(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 _l(e,t){return t<0||t>=e.length}function ph(e,t){return Ul(e.current,{disabledIndices:t})}function Oy(e,t){return Ul(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function l4(e,t,i){const{decrement:s,loopFocus:o,allowEscape:u,disabledIndices:c,minIndex:d,maxIndex:f}=i,g=()=>Ul(e,{startingIndex:t,decrement:s,disabledIndices:c});let y,p=!1;if(!o)y=s?Math.max(d,g()):Math.min(f,g());else if(s?t<=d:t>=f){const x=s?-1:e.length;u&&t!==x?y=-1:(y=s?f:d,p=!0)}else y=g();return{index:_l(e,y)?-1:y,wrapped:p}}function Ul(e,{startingIndex:t=-1,decrement:i=!1,disabledIndices:s,amount:o=1}={}){let u=t;do u+=i?-o:o;while(u>=0&&u<=e.length-1&&Hl(e,u,s));return u}function Hl(e,t,i){if(typeof i=="function"?i(t):i?.includes(t)??!1)return!0;const o=e[t];return o?!vp(o)||o.matches(":disabled")?!0:!i&&(o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"):!1}function u4(e){return e.visibility==="hidden"||e.visibility==="collapse"}function vp(e,t=e?gi(e):null){return!e||!e.isConnected||!t||u4(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const c4='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function d4(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const i=e.getRootNode();return ko(i)?i.host:null}function Ay(e){for(const t of Array.from(e.children))if(Er(t)==="summary")return t;return null}function f4(e,t){const i=Ay(t);return!!i&&(e===i||it(i,e))}function GR(e){const t=e?Er(e):"";return e!=null&&e.matches(c4)&&(t!=="summary"||e.parentElement!=null&&Er(e.parentElement)==="details"&&Ay(e.parentElement)===e)&&(t!=="details"||Ay(e)==null)&&(t!=="input"||e.type!=="hidden")}function Tv(e){if(!GR(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=d4(t)){const i=t!==e,s=Er(t)==="slot";if(t.hasAttribute("inert")||i&&Er(t)==="details"&&!t.open&&!f4(e,t)||t.hasAttribute("hidden")||!s&&!h4(t,i))return!1}return!0}function h4(e,t){const i=gi(e);return t?i.display!=="none":vp(e,i)}function $R(e){const t=e.tabIndex;if(t<0){const i=Er(e);if(i==="details"||i==="audio"||i==="video"||vn(e)&&e.isContentEditable)return 0}return t}function V0(e){if(Er(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function QR(e,t){const i=V0(e);if(!i)return!0;const s=t.find(o=>{const u=V0(o);return u?.name===i.name&&u.form===i.form&&u.checked});return s?s===i:t.find(o=>{const u=V0(o);return u?.name===i.name&&u.form===i.form})===i}function XR(e){if(vn(e)&&Er(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return vn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ov(e,t){XR(e).forEach(i=>{GR(i)&&t.push(i),Ov(i,t)})}function ZR(e,t,i){XR(e).forEach(s=>{vn(s)&&s.matches(t)&&i.push(s),ZR(s,t,i)})}function bp(e){return Tv(e)&&$R(e)>=0}function WR(e){const t=[];return Ov(e,t),t.filter(Tv)}function xp(e){const t=WR(e);return t.filter(i=>$R(i)>=0&&QR(i,t))}function JR(e,t){const i=xp(e),s=i.length;if(s===0)return;const o=Xr($t(e)),u=i.indexOf(o),c=u===-1?t===1?0:s-1:u+t;return i[c]}function eC(e){return JR($t(e).body,1)||e}function tC(e){return JR($t(e).body,-1)||e}function p4(e,t,i){if(!e)return null;const s=[];Ov($t(e).body,s);const o=s.indexOf(e);if(o===-1)return null;const u=s.filter(Tv);for(let c=1;c<s.length;c+=1){const d=s[(o+t*c+s.length)%s.length];if(!it(i,d)&&bp(d)&&QR(d,u))return d}return s[o]}function Fl(e,t){const i=t||e.currentTarget,s=e.relatedTarget;return!s||!it(i,s)}function g4(e){xp(e).forEach(i=>{i.dataset.tabindex=i.getAttribute("tabindex")||"",i.setAttribute("tabindex","-1")})}function ow(e){const t=[];ZR(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 za(e,t,i=!0){return e.filter(o=>o.parentId===t).flatMap(o=>[...!i||o.context?.open?[o]:[],...za(e,o.id,i)])}function lw(e,t){let i=[],s=e.find(o=>o.id===t)?.parentId;for(;s;){const o=e.find(u=>u.id===s);s=o?.parentId,o&&(i=i.concat(o))}return i}function Bl(e){return`data-base-ui-${e}`}let Vf=0;function gh(e,t={}){const{preventScroll:i=!1,sync:s=!1,shouldFocus:o}=t;cancelAnimationFrame(Vf);function u(){o&&!o()||e?.focus({preventScroll:i})}if(s)return u(),En;const c=requestAnimationFrame(u);return Vf=c,()=>{Vf===c&&(cancelAnimationFrame(c),Vf=0)}}const uw="data-base-ui-inert";let dc=new WeakMap,Kf=new WeakSet,fc=new WeakMap,K0=0;function nC(e){return e?ko(e)?e.host:nC(e.parentNode):null}const cw=(e,t)=>t.map(i=>{if(e.contains(i))return i;const s=nC(i);return e.contains(s)?s:null}).filter(i=>i!=null),dw=e=>{const t=new Set;return e.forEach(i=>{let s=i;for(;s&&!t.has(s);)t.add(s),s=s.parentNode}),t},fw=(e,t,i)=>{const s=[],o=u=>{!u||i.has(u)||Array.from(u.children).forEach(c=>{Er(c)!=="script"&&(t.has(c)?o(c):s.push(c))})};return o(e),s};function m4(e,t,i,{mark:s=!0}){const o=cw(t,e),u=s?fw(t,dw(o),new Set(o)):[],c=[],d=[];if(i){const f=cw(t,Array.from(t.querySelectorAll("[aria-live]"))),g=o.concat(f);fw(t,dw(g),new Set(g)).forEach(p=>{const x=p.getAttribute("aria-hidden"),S=x!==null&&x!=="false",w=(dc.get(p)||0)+1;dc.set(p,w),c.push(p),w===1&&S&&Kf.add(p),S||p.setAttribute("aria-hidden","true")})}return s&&u.forEach(f=>{const g=(fc.get(f)||0)+1;fc.set(f,g),d.push(f),g===1&&f.setAttribute(uw,"")}),K0+=1,()=>{c.forEach(f=>{const g=(dc.get(f)||0)-1;dc.set(f,g),g||(Kf.has(f)||f.removeAttribute("aria-hidden"),Kf.delete(f))}),s&&d.forEach(f=>{const g=(fc.get(f)||0)-1;fc.set(f,g),g||f.removeAttribute(uw)}),K0-=1,K0||(dc=new WeakMap,Kf=new WeakSet,fc=new WeakMap)}}function hw(e,t={}){const{ariaHidden:i=!1,mark:s=!0}=t,o=$t(e[0]).body;return m4(e,o,i,{mark:s})}var cr=DR();const y4=kR(cr);function rC(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}let pw=0;function v4(e,t="mui"){const i=v.useRef(void 0),s=rC(),o=e??i.current;return v.useEffect(()=>{i.current==null&&(pw+=1,i.current=`${t}-${pw}`,e==null&&s())},[e,t,s]),o}const gw=wv.useId;function iu(e,t){if(gw!==void 0){const i=gw();return e??(t?`${t}-${i}`:i)}return v4(e,t)}const b4=parseInt(v.version,10);function Av(e){return b4>=e}function mw(e){if(!v.isValidElement(e))return null;const t=e,i=t.props;return(Av(19)?i?.ref:t.ref)??null}function My(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function x4(e,t){const i={};for(const s in e){const o=e[s];if(t?.hasOwnProperty(s)){const u=t[s](o);u!=null&&Object.assign(i,u);continue}o===!0?i[`data-${s.toLowerCase()}`]="":o&&(i[`data-${s.toLowerCase()}`]=o.toString())}return i}function S4(e,t){return typeof e=="function"?e(t):e}function iC(e,t){return typeof e=="function"?e(t):e}const sC={};function Mr(e,t,i,s,o){if(!i&&!s&&!o&&!e)return Lh(t);let u=Lh(e);return t&&(u=yc(u,t)),i&&(u=yc(u,i)),s&&(u=yc(u,s)),o&&(u=yc(u,o)),u}function w4(e){if(e.length===0)return sC;if(e.length===1)return Lh(e[0]);let t=Lh(e[0]);for(let i=1;i<e.length;i+=1)t=yc(t,e[i]);return t}function Lh(e){return oC(e)?{...e(sC)}:E4(e)}function yc(e,t){return oC(t)?t(e):R4(e,t)}function E4(e){const t={...e};for(const i in t){const s=t[i];aC(i,s)&&(t[i]=lC(s))}return t}function R4(e,t){if(!t)return e;for(const i in t){const s=t[i];switch(i){case"style":{e[i]=My(e.style,s);break}case"className":{e[i]=uC(e.className,s);break}default:aC(i,s)?e[i]=C4(e[i],s):e[i]=s}}return e}function aC(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 oC(e){return typeof e=="function"}function C4(e,t){return t?e?(...i)=>{const s=i[0];if(cC(s)){const u=s;zh(u);const c=t(...i);return u.baseUIHandlerPrevented||e?.(...i),c}const o=t(...i);return e?.(...i),o}:lC(t):e}function lC(e){return e&&((...t)=>{const i=t[0];return cC(i)&&zh(i),e(...t)})}function zh(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function uC(e,t){return t?e?t+" "+e:t:e}function cC(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function At(e,t,i={}){let s=t.render;i.enabled!==!1&&(s=Mv(s));const o=T4(t,i,s);if(i.enabled===!1)return null;const u=i.state??Qt;return M4(e,s,o,u)}function T4(e,t,i){const{className:s,style:o}=e,{state:u=Qt,ref:c,props:d,stateAttributesMapping:f,enabled:g=!0}=t,y=g?S4(s,u):void 0,p=g?iC(o,u):void 0,x=g?x4(u,f):Qt,S=g&&d?O4(d):void 0,w=g?My(x,S)??{}:Qt;return typeof document<"u"&&(g?Array.isArray(c)?w.ref=Yj([w.ref,mw(i),...c]):w.ref=Wr(w.ref,mw(i),c):Wr(null,null)),g?(y!==void 0&&(w.className=uC(w.className,y)),p!==void 0&&(w.style=My(w.style,p)),w):Qt}function O4(e){return Array.isArray(e)?w4(e):Mr(void 0,e)}const A4=Symbol.for("react.lazy");function Mv(e){if(e?.$$typeof!==A4)return e;const t=v.Children.toArray(e)[0];return v.isValidElement(t)?t:e}function M4(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,v.cloneElement(t,o)}return k4(e,i)}function k4(e,t){return e==="button"?v.createElement("button",{type:"button",...t,key:t.key}):e==="img"?v.createElement("img",{alt:"",...t,key:t.key}):v.createElement(e,t)}const N4=500,dC=500,D4={style:{transition:"none"}},fC="data-base-ui-click-trigger",hC={fallbackAxisSide:"none"},kv={fallbackAxisSide:"end"},j4={clipPath:"inset(50%)",position:"fixed",top:0,left:0},pC=v.createContext(null),gC=()=>v.useContext(pC),I4=Bl("portal");function mC(e={}){const{ref:t,container:i,componentProps:s=Qt,elementProps:o}=e,u=iu(),d=gC()?.portalNode,[f,g]=v.useState(null),[y,p]=v.useState(null),x=Fe(E=>{E!==null&&p(E)}),S=v.useRef(null);_e(()=>{if(i===null){S.current&&(S.current=null,p(null),g(null));return}const E=(i&&(gv(i)?i:i.current))??d??document.body;if(E==null){S.current&&(S.current=null,p(null),g(null));return}S.current!==E&&(S.current=E,p(null),g(E))},[i,d]);const w=At("div",s,{ref:[t,x],props:[{id:u,[I4]:""},o]}),C=f&&w?cr.createPortal(w,f):null;return{node:y,nodeId:v.isValidElement(w)?w.props.id:void 0,subtree:C}}const Sp=v.forwardRef(function(t,i){const{render:s,className:o,style:u,children:c,container:d,portalOwnerRole:f,...g}=t,{node:y,nodeId:p,subtree:x}=mC({container:d,ref:i,componentProps:t,elementProps:g}),S=v.useRef(null),w=v.useRef(null),C=v.useRef(null),E=v.useRef(null),[R,O]=v.useState(null),A=v.useRef(!1),M=R?.modal,N=R?.open,j=!!R&&!R.modal&&R.open&&!!y;v.useEffect(()=>{if(!y||M)return;function k(_){y&&_.relatedTarget&&Fl(_)&&(_.type==="focusin"?A.current&&(ow(y),A.current=!1):(g4(y),A.current=!0))}return ps(Lt(y,"focusin",k,!0),Lt(y,"focusout",k,!0))},[y,M]),_e(()=>{!y||N!==!0||!A.current||(ow(y),A.current=!1)},[N,y]);const D=v.useMemo(()=>({beforeOutsideRef:S,afterOutsideRef:w,beforeInsideRef:C,afterInsideRef:E,portalNode:y,setFocusManagerState:O}),[y]);return b.jsxs(v.Fragment,{children:[x,b.jsxs(pC.Provider,{value:D,children:[j&&y&&b.jsx(Wl,{"data-type":"outside",ref:S,onFocus:k=>{if(Fl(k,y))C.current?.focus();else{const _=R?R.domReference:null;tC(_)?.focus()}}}),j&&y&&b.jsx("span",{role:f,"aria-owns":p,style:j4}),y&&cr.createPortal(c,y),j&&y&&b.jsx(Wl,{"data-type":"outside",ref:w,onFocus:k=>{if(Fl(k,y))E.current?.focus();else{const _=R?R.domReference:null;eC(_)?.focus(),R?.closeOnFocusOut&&R?.onOpenChange(!1,ut(Pa,k.nativeEvent))}}})]})]})});function yC(){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 Nv{nodesRef={current:[]};events=yC();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 vC=v.createContext(null),bC=v.createContext(null),Fa=()=>v.useContext(vC)?.id||null,Ba=e=>{const t=v.useContext(bC);return e??t};function Dv(e){const t=iu(),i=Ba(e),s=Fa();return _e(()=>{if(!t)return;const o={id:t,parentId:s};return i?.addNode(o),()=>{i?.removeNode(o)}},[i,t,s]),t}function xC(e){const{children:t,id:i}=e,s=Fa();return b.jsx(vC.Provider,{value:v.useMemo(()=>({id:i,parentId:s}),[i,s]),children:t})}function SC(e){const{children:t,externalTree:i}=e,s=er(()=>i??new Nv).current;return b.jsx(bC.Provider,{value:s,children:t})}function zs(e){return e==null?e:"current"in e?e.current:e}function P4(e,t){const i=Rn(tr(e));return e instanceof i.KeyboardEvent?"keyboard":e instanceof i.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||(Xl(e)?"keyboard":t||"mouse"):"touches"in e?"touch":e instanceof i.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const yw=20;let Na=[];function jv(){Na=Na.filter(e=>e.deref()?.isConnected)}function vw(e){jv(),e&&Er(e)!=="body"&&(Na.push(new WeakRef(e)),Na.length>yw&&(Na=Na.slice(-yw)))}function bw(){return jv(),Na[Na.length-1]?.deref()}function L4(e){return e?bp(e)?e:xp(e)[0]||e:null}function xw(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const i=WR(e).filter(o=>{const u=o.getAttribute("data-tabindex")||"";return bp(o)||o.hasAttribute("data-tabindex")&&!u.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 wp(e){const{context:t,children:i,disabled:s=!1,initialFocus:o=!0,returnFocus:u=!0,explicitReturnFocus:c,restoreFocus:d=!1,modal:f=!0,closeOnFocusOut:g=!0,openInteractionType:y="",nextFocusableElement:p,previousFocusableElement:x,beforeContentFocusGuardRef:S,externalTree:w,getInsideElements:C}=e,E=t.useState("open"),R=t.useState("domReferenceElement"),O=t.useState("floatingElement"),{events:A,dataRef:M}=t.context,N=Fe(()=>M.current.floatingContext?.nodeId),j=o===!1,D=Cy(R)&&j,k=Ln(o),_=Ln(u),L=Ln(c),q=Ln(y),X=Ln(E),B=Ba(w),H=gC(),U=v.useRef(!1),z=v.useRef(!1),Q=v.useRef(!1),$=v.useRef(null),K=v.useRef(""),Y=v.useRef(""),ee=v.useRef(null),G=v.useRef(null),oe=Wr(ee,S,H?.beforeInsideRef),I=Wr(G,H?.afterInsideRef),V=Un(),J=Un(),re=Zl(),Ee=H!=null,le=Dh(O),me=Fe((ve=le)=>ve?xp(ve):[]),ge=Fe(()=>C?.().filter(ve=>ve!=null)??[]);v.useEffect(()=>{if(s||!f)return;function ve(Ae){Ae.key==="Tab"&&it(le,Xr($t(le)))&&me().length===0&&!D&&qi(Ae)}const Pe=$t(le);return Lt(Pe,"keydown",ve)},[s,le,f,D,me]),v.useEffect(()=>{if(s||!E)return;const ve=$t(le);function Pe(){Q.current=!1}function Ae(Be){const Oe=tr(Be),Ue=ge(),be=it(O,Oe)||it(R,Oe)||it(H?.portalNode,Oe)||Ue.some(He=>He===Oe||it(He,Oe));Q.current=!be,Y.current=Be.pointerType||"keyboard",Ic(Oe,`[${fC}]`)&&(z.current=!0,J.start(0,()=>{z.current=!1}))}function Le(){Y.current="keyboard"}return ps(Lt(ve,"pointerdown",Ae,!0),Lt(ve,"pointerup",Pe,!0),Lt(ve,"pointercancel",Pe,!0),Lt(ve,"keydown",Le,!0),Pe)},[s,O,R,le,E,H,J,ge]),v.useEffect(()=>{if(s||!g)return;const ve=$t(le);function Pe(){z.current=!0,J.start(0,()=>{z.current=!1})}function Ae(Ue){const be=tr(Ue);bp(be)&&($.current=be)}function Le(Ue){const be=Ue.relatedTarget,He=Ue.currentTarget,Ze=tr(Ue);f&&be==null&&Ze!=null&&it(O,Ze)&&vw(Ze),queueMicrotask(()=>{const at=N(),de=t.context.triggerElements,we=ge(),Ge=be?.hasAttribute(Bl("focus-guard"))&&[ee.current,G.current,H?.beforeInsideRef.current,H?.afterInsideRef.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,zs(x),zs(p)].includes(be),ke=!(it(R,be)||it(O,be)||it(be,O)||it(H?.portalNode,be)||we.some(De=>De===be||it(De,be))||de.hasMatchingElement(De=>it(De,be))||Ge||B&&(za(B.nodesRef.current,at).find(De=>it(De.context?.elements.floating,be)||it(De.context?.elements.domReference,be))||lw(B.nodesRef.current,at).find(De=>[De.context?.elements.floating,Dh(De.context?.elements.floating)].includes(be)||De.context?.elements.domReference===be)));if(He===R&&le&&xw(le),d&&He!==R&&!vp(Ze)&&Xr(ve)===ve.body){if(vn(le)&&(le.focus(),d==="popup")){re.request(()=>{le.focus()});return}const De=me(),vt=$.current,ct=(vt&&De.includes(vt)?vt:null)||De[De.length-1]||le;vn(ct)&&ct.focus()}if(M.current.insideReactTree){M.current.insideReactTree=!1;return}(D||!f)&&be&&ke&&!z.current&&(D||be!==bw())&&(U.current=!0,t.setOpen(!1,ut(Pa,Ue)))})}function Be(){Q.current||(M.current.insideReactTree=!0,V.start(0,()=>{M.current.insideReactTree=!1}))}const Oe=vn(R)?R:null;if(!(!O&&!Oe))return ps(Oe&&Lt(Oe,"focusout",Le),Oe&&Lt(Oe,"pointerdown",Pe),O&&Lt(O,"focusin",Ae),O&&Lt(O,"focusout",Le),O&&H&&Lt(O,"focusout",Be,!0))},[s,R,O,le,f,B,H,t,g,d,me,D,N,M,V,J,re,p,x,ge]),v.useEffect(()=>{if(s||!O||!E)return;const ve=Array.from(H?.portalNode?.querySelectorAll(`[${Bl("portal")}]`)||[]),Ae=(B?lw(B.nodesRef.current,N()):[]).find(He=>Cy(He.context?.elements.domReference||null))?.context?.elements.domReference,Be=[...[O,...ve,ee.current,G.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,...ge()],Ae,zs(x),zs(p),D?R:null].filter(He=>He!=null),Oe=hw(Be,{ariaHidden:f||D,mark:!1}),Ue=[O,...ve].filter(He=>He!=null),be=hw(Ue);return()=>{be(),Oe()}},[E,s,R,O,f,H,D,B,N,p,x,ge]),_e(()=>{if(!E||s||!vn(le))return;K.current="",Y.current="";const ve=$t(le),Pe=Xr(ve);queueMicrotask(()=>{const Ae=k.current,Le=typeof Ae=="function"?Ae(q.current||""):Ae;if(Le===void 0||Le===!1||it(le,Pe))return;let Oe=null;const Ue=()=>(Oe==null&&(Oe=me(le)),Oe[0]||le);let be;Le===!0||Le===null?be=Ue():be=zs(Le),be=be||Ue();const He=it(le,Xr(ve)),Ze=M.current.openEvent,at=Ze?.type==="mousedown"&&Xl(Ze);gh(be,{sync:at,preventScroll:be===le,shouldFocus(){if(!X.current)return!1;if(He)return!0;const de=Xr(ve);return!(de!==be&&it(le,de))}})})},[s,E,le,me,k,q,X,M]);const ce=v.useRef(null);_e(()=>{if(s||!le){ce.current=null;return}ce.current&&(ce.current.cancelled=!0,ce.current=null);const ve=$t(le),Pe=Xr(ve),Ae=q.current==null;vw(Pe);function Le(Oe){if(Oe.open||(K.current=P4(Oe.nativeEvent,Y.current)),(Oe.reason===Pa&&Oe.triggerElement?.hasAttribute(Bl("focus-guard"))||Oe.reason===Kn&&Oe.nativeEvent.type==="mouseleave")&&(U.current=!0),Oe.reason===mp)if(Oe.nested)U.current=!1;else if(Xl(Oe.nativeEvent)||pv(Oe.nativeEvent))U.current=!1;else{let Ue=!1;$t(le).createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?U.current=!1:U.current=!0}}A.on("openchange",Le);function Be(Oe){const Ue=_.current;let be=typeof Ue=="function"?Ue(Oe):Ue;if(be===void 0||be===!1)return null;be===null&&(be=!0);const He=R?.isConnected?R:null,Ze=Pe?.isConnected&&Er(Pe)!=="body"?Pe:null;let at=Ae?Ze||He:He||Ze;return at||(at=bw()||null),typeof be=="boolean"?at:zs(be)||at||null}return()=>{A.off("openchange",Le);const Oe=Xr(ve),Ue=ge(),be=it(O,Oe)||Ue.some(we=>we===Oe||it(we,Oe))||B&&za(B.nodesRef.current,N(),!1).some(we=>it(we.context?.elements.floating,Oe)),He=_.current,Ze=K.current,at=Be(Ze),de={cancelled:!1};ce.current=de,queueMicrotask(()=>{ce.current===de&&(ce.current=null);const we=L4(at),Ge=L.current??typeof He!="boolean";if(!de.cancelled&&He&&!U.current&&vn(we)&&(!(!Ge&&we!==Oe&&Oe!==ve.body)||be)){const ke={preventScroll:!0};Ze==="keyboard"&&(ke.focusVisible=!0),we.focus(ke)}U.current=!1})}},[s,O,le,_,L,q,A,B,R,N,ge]),_e(()=>{if(!ms||E||!O)return;const ve=Xr($t(O));!vn(ve)||!Xc(ve)||it(O,ve)&&ve.blur()},[E,O]),_e(()=>{if(!(s||!H))return H.setFocusManagerState({modal:f,closeOnFocusOut:g,open:E,onOpenChange:t.setOpen,domReference:R}),()=>{H.setFocusManagerState(null)}},[s,H,f,E,t,g,R]),_e(()=>{if(!(s||!le))return xw(le),()=>{queueMicrotask(jv)}},[s,le]);const Te=!s&&(f?!D:!0)&&(Ee||f);return b.jsxs(v.Fragment,{children:[Te&&b.jsx(Wl,{"data-type":"inside",ref:oe,onFocus:ve=>{if(f){const Pe=me();gh(Pe[Pe.length-1])}else H?.portalNode&&(U.current=!1,Fl(ve,H.portalNode)?eC(R)?.focus():zs(x??H.beforeOutsideRef)?.focus())}}),i,Te&&b.jsx(Wl,{"data-type":"inside",ref:I,onFocus:ve=>{f?gh(me()[0]):H?.portalNode&&(g&&(U.current=!0),Fl(ve,H.portalNode)?tC(R)?.focus():zs(p??H.afterOutsideRef)?.focus())}})]})}function Iv(e,t={}){const{enabled:i=!0,event:s="click",toggle:o=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:d=0,reason:f=$i}=t,g=e.context.dataRef,y=v.useRef(void 0),p=Zl(),x=Un(),S=v.useMemo(()=>{function w(E,R,O,A){const M=ut(f,R,O);E&&A==="touch"&&d>0?x.start(d,()=>{e.setOpen(!0,M)}):e.setOpen(E,M)}function C(E,R,O){const A=g.current.openEvent,M=e.select("domReferenceElement")!==R;return E&&M||!E||!o?!0:A&&(typeof c=="function"?c():c)?!O(A.type):!1}return{onPointerDown(E){y.current=ja(E.pointerType,!0)&&pv(E.nativeEvent)?"virtual":E.pointerType},onMouseDown(E){const R=y.current,O=E.nativeEvent,A=e.select("open");if(E.button!==0||s==="click"||ja(R,!0)&&u)return;const M=C(A,E.currentTarget,k=>k==="click"||k==="mousedown"),N=tr(O),j=Xc(N);if(j||R==="virtual"){w(M,O,j?N:E.currentTarget,R);return}const D=E.currentTarget;p.request(()=>{w(M,O,D,R)})},onClick(E){if(s==="mousedown-only")return;const R=y.current;if(s==="mousedown"&&R){y.current=void 0;return}if(ja(R,!0)&&u)return;const O=e.select("open"),A=C(O,E.currentTarget,M=>M==="click"||M==="mousedown"||M==="keydown"||M==="keyup");w(A,E.nativeEvent,E.currentTarget,R)},onKeyDown(){y.current=void 0}}},[g,s,u,f,e,c,o,p,x,d]);return v.useMemo(()=>i?{reference:S}:Qt,[i,S])}function z4(e,t){let i=null,s=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){const u=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},c=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"?u.width:0,y=t.axis==="x"?u.height:0;let p=u.x,x=u.y;return i==null&&t.x&&c&&(i=u.x-t.x),s==null&&t.y&&d&&(s=u.y-t.y),p-=i||0,x-=s||0,(!o||f)&&(p=c&&t.x!=null?t.x:p,x=d&&t.y!=null?t.y:x),o=!0,{width:g,height:y,x:p,y:x,top:x,right:p+g,bottom:x+y,left:p}}}}function Sw(e){return e!=null&&e.clientX!=null}function _4(e,t={}){const{enabled:i=!0,axis:s="both"}=t,o=e.useState("open"),u=e.useState("floatingElement"),c=e.useState("domReferenceElement"),d=e.context.dataRef,f=v.useRef(!1),g=v.useRef(null),[y,p]=v.useState(),[x,S]=v.useState([]),w=Fe(A=>{e.set("positionReference",A)}),C=Fe((A,M,N)=>{f.current||d.current.openEvent&&!Sw(d.current.openEvent)||e.set("positionReference",z4(N??c,{x:A,y:M,axis:s,dataRef:d,pointerType:y}))}),E=Fe(A=>{o?g.current||(C(A.clientX,A.clientY,A.currentTarget),S([])):C(A.clientX,A.clientY,A.currentTarget)}),R=ja(y)?u:o;v.useEffect(()=>{if(!i){w(c);return}if(!R)return;function A(){g.current?.(),g.current=null}const M=Rn(u);function N(j){const D=tr(j);it(u,D)?A():C(j.clientX,j.clientY)}return!d.current.openEvent||Sw(d.current.openEvent)?g.current=Lt(M,"mousemove",N):w(c),A},[R,i,u,d,c,e,C,w,x]),v.useEffect(()=>()=>{e.set("positionReference",null)},[e]),v.useEffect(()=>{i&&!u&&(f.current=!1)},[i,u]),v.useEffect(()=>{!i&&o&&(f.current=!0)},[i,o]);const O=v.useMemo(()=>{function A(M){p(M.pointerType)}return{onPointerDown:A,onPointerEnter:A,onMouseMove:E,onMouseEnter:E}},[E]);return v.useMemo(()=>i?{reference:O,trigger:O}:{},[i,O])}function U4(){return!1}function H4(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function ed(e,t={}){const{enabled:i=!0,escapeKey:s=!0,outsidePress:o=!0,outsidePressEvent:u="sloppy",referencePress:c=U4,bubbles:d,externalTree:f}=t,g=e.useState("open"),y=e.useState("floatingElement"),{dataRef:p,events:x}=e.context,S=Ba(f),w=Fe(typeof o=="function"?o:()=>!1),C=typeof o=="function"?w:o,E=C!==!1,R=Fe(()=>u),{escapeKey:O,outsidePress:A}=H4(d),M=v.useRef(!1),N=v.useRef(!1),j=v.useRef(!1),D=v.useRef(!1),k=v.useRef(!1),_=v.useRef(""),L=v.useRef(null),q=Un(),X=Un(),B=Un(),H=Fe(()=>{X.clear(),p.current.insideReactTree=!1}),U=Fe(I=>{const V=p.current.floatingContext?.nodeId;return(S?za(S.nodesRef.current,V):[]).some(re=>re.context?.open&&!re.context.dataRef.current[I])}),z=Fe(I=>F0(I,e.select("floatingElement"))||F0(I,e.select("domReferenceElement"))),Q=Fe(I=>{c()&&e.setOpen(!1,ut($i,I.nativeEvent))}),$=Fe(I=>{if(!g||!i||!s||I.key!=="Escape")return;const V=mj(I)?I.nativeEvent:I;if(k.current||V.isComposing||!O&&U("__escapeKeyBubbles"))return;const J=ut(Zc,V);e.setOpen(!1,J),J.isCanceled||I.preventDefault(),!O&&!J.isPropagationAllowed&&I.stopPropagation()}),K=Fe(()=>{p.current.insideReactTree=!0,X.start(0,H)}),Y=Fe(I=>{if(!g||!i||I.button!==0)return;const V=tr(I.nativeEvent);it(e.select("floatingElement"),V)&&(M.current||(M.current=!0,N.current=!1))}),ee=Fe(I=>{!g||!i||(I.defaultPrevented||I.nativeEvent.defaultPrevented)&&M.current&&(N.current=!0)});v.useEffect(()=>{function I(V){V.open||(D.current=!1)}return x.on("openchange",I),()=>{x.off("openchange",I)}},[x]),v.useEffect(()=>H,[H]),v.useEffect(()=>{if(!g||!i)return g||(D.current=!1,k.current=!1,_.current="",L.current=null),H;p.current.__escapeKeyBubbles=O,p.current.__outsidePressBubbles=A;const I=new ji,V=$t(y);function J(){B.clear(),k.current=!0}function re(){k.current=!0,B.start(ms?5:0,()=>{k.current=!1})}function Ee(){j.current=!0,I.start(0,()=>{j.current=!1})}function le(){M.current=!1,N.current=!1}function me(){const de=_.current,we=de==="pen"||!de?"mouse":de,Ge=R(),ke=typeof Ge=="function"?Ge():Ge;return typeof ke=="string"?ke:ke[we]}function ge(de){const we=me();return we==="intentional"&&de.type!=="click"||we==="sloppy"&&de.type==="click"}function ce(de){const we=p.current.floatingContext?.nodeId,Ge=S&&za(S.nodesRef.current,we).some(ke=>F0(de,ke.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(p.current.insideReactTree){H();return}const we=tr(de),Ge=`[${Bl("inert")}]`,ke=on(we)?we.getRootNode():null,De=Array.from((ko(ke)?ke:$t(e.select("floatingElement"))).querySelectorAll(Ge)),vt=e.context.triggerElements;if(we&&(vt.hasElement(we)||vt.hasMatchingElement(pt=>it(pt,we))))return;let ct=on(we)?we:null;for(;ct&&!Fs(ct);){const pt=Ks(ct);if(Fs(pt)||!on(pt))break;ct=pt}if(!(De.length&&on(we)&&!Ij(we)&&!it(we,e.select("floatingElement"))&&De.every(pt=>!it(ct,pt)))){if(vn(we)&&!("touches"in de)){const pt=Fs(we),kt=gi(we),jt=/auto|scroll/,en=pt||jt.test(kt.overflowX),sn=pt||jt.test(kt.overflowY),tn=en&&we.clientWidth>0&&we.scrollWidth>we.clientWidth,Je=sn&&we.clientHeight>0&&we.scrollHeight>we.clientHeight,St=kt.direction==="rtl",Xt=Je&&(St?de.offsetX<=we.offsetWidth-we.clientWidth:de.offsetX>we.clientWidth),ft=tn&&de.offsetY>we.clientHeight;if(Xt||ft)return}if(!ce(de)){if(me()==="intentional"){if(de.detail!==0&&!Xl(de)&&!D.current)return;if(j.current){I.clear(),j.current=!1;return}}typeof C=="function"&&!C(de)||U("__outsidePressBubbles")||(e.setOpen(!1,ut(mp,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 Ae(de,we){const Ge=tr(de);if(!Ge)return;const ke=Lt(Ge,de.type,()=>{we(de),ke()})}function Le(de){_.current="touch",Ae(de,Pe)}function Be(de){q.clear(),de.type==="pointerdown"&&(de.button===0&&(D.current=!0),_.current=de.pointerType),!(de.type==="mousedown"&&L.current&&!L.current.dismissOnMouseDown)&&Ae(de,we=>{we.type==="pointerdown"?ve(we):Te(we)})}function Oe(de){if(de.type==="pointercancel"&&(D.current=!1),!M.current)return;const we=N.current;if(le(),me()==="intentional"){if(de.type==="pointercancel"){we&&Ee();return}if(!ce(de)){if(we){Ee();return}typeof C=="function"&&!C(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),ke=Math.abs(we.clientY-L.current.startY),De=Math.sqrt(Ge*Ge+ke*ke);De>5&&(L.current.dismissOnTouchEnd=!0),De>10&&(Te(de),q.clear(),L.current=null)}function be(de){Ae(de,Ue)}function He(de){me()!=="sloppy"||!L.current||z(de)||(L.current.dismissOnTouchEnd&&Te(de),q.clear(),L.current=null)}function Ze(de){Ae(de,He)}const at=ps(s&&ps(Lt(V,"keydown",$),Lt(V,"compositionstart",J),Lt(V,"compositionend",re)),E&&ps(Lt(V,"click",Be,!0),Lt(V,"pointerdown",Be,!0),Lt(V,"pointerup",Oe,!0),Lt(V,"pointercancel",Oe,!0),Lt(V,"mousedown",Be,!0),Lt(V,"mouseup",Oe,!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()=>{at(),I.clear(),le(),j.current=!1}},[p,y,s,E,C,g,i,O,A,$,H,R,U,z,S,e,q,B]);const G=v.useMemo(()=>({onKeyDown:$,onPointerDown:Q,onClick:Q}),[$,Q]),oe=v.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 v.useMemo(()=>i?{reference:G,floating:oe,trigger:G}:{},[i,G,oe])}function wC(e){const{popupStore:t,treatPopupAsFloatingElement:i=!1,floatingRootContext:s,floatingId:o,nested:u,onOpenChange:c}=e,d=t.useState("open"),f=t.useState("activeTriggerElement"),g=t.useState(i?"popupElement":"positionerElement"),y=c;return t.useSyncedValue("floatingId",o),_e(()=>{const p={open:d,floatingId:o,referenceElement:f,floatingElement:g};on(f)&&(p.domReferenceElement=f),s.state.positionReference===s.state.referenceElement&&(p.positionReference=f),s.update(p)},[d,o,f,g,s]),s.context.onOpenChange=y,s.context.nested=u,s}function Po(e,t=!1,i=!1,s=!1){const[o,u]=v.useState(e&&t?"idle":void 0),[c,d]=v.useState(e&&!s);return e&&!c&&(d(!0),u("starting")),!e&&c&&o!=="ending"&&!i&&u("ending"),!e&&!c&&o==="ending"&&u(void 0),_e(()=>{if(!e&&c&&o!=="ending"&&i){const f=Or.request(()=>{u("ending")});return()=>{Or.cancel(f)}}},[e,c,o,i]),_e(()=>{if(!e||t||o===void 0)return;const f=Or.request(()=>{u(void 0)});return()=>{Or.cancel(f)}},[t,e,o]),_e(()=>{if(!e||!t)return;e&&c&&o!=="idle"&&u("starting");const f=Or.request(()=>{u("idle")});return()=>{Or.cancel(f)}},[t,e,c,o]),{mounted:c,setMounted:d,transitionStatus:o}}function ww(e,t){return e.getAnimations(t).filter(i=>{const s=i.effect?.getTiming();return s?.duration!==1/0&&s?.iterations!==1/0})}let qf=null;function F4(e){if(!qf){const t=[];qf=t,queueMicrotask(()=>{qf=null,cr.flushSync(()=>{for(const i of t)i()})})}qf.push(e)}function Ep(e,t=!1,i=!1){const s=Zl();return Fe((o,u=null)=>{s.cancel();const c=zs(e);if(c==null)return;const d=c,f=()=>{if(!i){cr.flushSync(o);return}F4(()=>{u?.aborted||o()})};if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){o();return}function g(){Promise.all(ww(d).map(y=>y.finished.then(En))).then(()=>{u?.aborted||f()},()=>{if(u?.aborted)return;if(ww(d).some(p=>p.pending||p.playState!=="finished")){g();return}f()})}if(t){const y=bv;if(!d.hasAttribute(y)){s.request(g);return}const p=new MutationObserver(()=>{d.hasAttribute(y)||(p.disconnect(),g())});p.observe(d,{attributes:!0,attributeFilter:[y]}),u?.addEventListener("abort",()=>p.disconnect(),{once:!0});return}s.request(g)})}function Ii(e){const{enabled:t=!0,open:i,ref:s,batch:o=!1,onComplete:u}=e,c=Fe(u),d=Ep(s,i,o);v.useEffect(()=>{if(!t)return;const f=new AbortController;return d(c,f.signal),()=>{f.abort()}},[t,i,c,d])}function EC(e){const{open:t,ref:i,preventUnmountOnClose:s,setPreventUnmountOnClose:o,onUnmount:u,animateInitialOpen:c}=e,d=Fe(o),{mounted:f,setMounted:g,transitionStatus:y}=Po(t,!1,!1,c),p=t?!1:s;_e(()=>{t&&d(!1)},[t,d]);const x=v.useRef(f),S=v.useRef(!1),w=rC(),C=()=>{x.current=!1,g(!1),u()};_e(()=>{x.current=f,S.current&&(S.current=!1,!t&&f&&C())});const E=Fe(()=>{if(x.current){if(t){S.current=!0,w();return}C()}});return Ii({enabled:f&&!t&&!p,open:t,ref:i,onComplete(){t||E()}}),{mounted:f,transitionStatus:y,preventUnmountingOnClose:p,forceUnmount:E}}const td={tabIndex:-1,[Ey]:""};function RC(e){return t=>t==="touch"?e.current:!0}function Pv(e,t=!1){const i=iu(),s=Fa()!=null,o=er(()=>e(i,s)).current;return wC({popupStore:o,treatPopupAsFloatingElement:t,floatingRootContext:o.state.floatingRootContext,floatingId:i,nested:s,onOpenChange:o.setOpen}),o}function Rp({handle:e,store:t}){return _e(()=>e.attachStore(t),[e,t]),null}function Ew(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function B4(e,t){const i=v.useRef(null);return Fe(s=>{const o=i.current;if(o!==null){if(o.element===s&&o.store===t&&o.id===e)return;i.current=null;const u=o.store;u.context.triggerElements.getById(o.id)===o.element&&(u.context.triggerElements.delete(o.id),Ew(u))}s!==null&&e!==void 0&&(i.current={store:t,id:e,element:s},t.context.triggerElements.add(e,s),Ew(t))})}function Cp(e,t,i,s=!1){let o=e.preventUnmountingOnClose;t?o=!1:s&&(o=!0);const u=i?.id??null;let c=e.activeTriggerId,d=e.activeTriggerElement;return(u||t)&&(c=u,d=i??null),{open:t,preventUnmountingOnClose:o,activeTriggerId:c,activeTriggerElement:d,openedWithoutTrigger:t?i==null:e.openedWithoutTrigger}}function Tp(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function V4(e,t,i,s={}){const o=i.reason,u=o===Kn,c=t&&o===zl,d=!t&&(o===$i||o===Zc),f=Tp(i);if(e.context.onOpenChange?.(t,i),i.isCanceled)return;s.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,i);const g=()=>{const y=Cp(e.state,t,i.trigger,f()),p={...s.extraState,...y};c?p.instantType="focus":d?p.instantType="dismiss":u&&(p.instantType=void 0),e.update(p)};u?cr.flushSync(g):g()}function Lv(e,t,i,s){const o=i.useState("isMountedByTrigger",e),u=B4(e,i),c=Fe(f=>{const g=i.select("open"),y=i.select("activeTriggerId");if(y===e){const p={activeTriggerElement:f,...g?s:null};i.update(p);return}if(y==null&&g&&!i.state.openedWithoutTrigger){const p={activeTriggerId:e??null,activeTriggerElement:f,...s};i.update(p)}}),d=Fe(f=>{u(f),f&&c(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 Op(e,t={}){const{closeOnActiveTriggerUnmount:i=!1}=t,s=v.useRef(null),o=e.useState("open"),u=e.useState("triggerCount"),c=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 y=e.select("activeTriggerId");let p=null;if(y){const x=e.context.triggerElements.getById(y);if(x)s.current=y,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===y?p=y:s.current=null)}}else s.current=null;if(!p&&!y&&!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),p&&i&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===p&&!e.context.triggerElements.getById(p)){const x=ut(kr);e.setOpen(!1,x),x.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,u,c,d,i])}function Ap(e,t,i,s){const{mounted:o,transitionStatus:u,forceUnmount:c}=EC({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 er(()=>(t.set("mounted",o),null)),t.useSyncedValues({mounted:o,transitionStatus:u}),{forceUnmount:c,transitionStatus:u}}function Mp(e,t){e.useSyncedValues(t),_e(()=>()=>{e.update({activeTriggerProps:Qt,inactiveTriggerProps:Qt,popupProps:Qt})},[e])}function CC(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 nd{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 q0={exports:{}},Y0={};var Rw;function K4(){if(Rw)return Y0;Rw=1;var e=qc();function t(p,x){return p===x&&(p!==0||1/p===1/x)||p!==p&&x!==x}var i=typeof Object.is=="function"?Object.is:t,s=e.useState,o=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function d(p,x){var S=x(),w=s({inst:{value:S,getSnapshot:x}}),C=w[0].inst,E=w[1];return u(function(){C.value=S,C.getSnapshot=x,f(C)&&E({inst:C})},[p,S,x]),o(function(){return f(C)&&E({inst:C}),p(function(){f(C)&&E({inst:C})})},[p]),c(S),S}function f(p){var x=p.getSnapshot;p=p.value;try{var S=x();return!i(p,S)}catch{return!0}}function g(p,x){return x()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return Y0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Y0}var Cw;function TC(){return Cw||(Cw=1,q0.exports=K4()),q0.exports}var kp=TC(),G0={exports:{}},$0={};var Tw;function q4(){if(Tw)return $0;Tw=1;var e=qc(),t=TC();function i(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var s=typeof Object.is=="function"?Object.is:i,o=t.useSyncExternalStore,u=e.useRef,c=e.useEffect,d=e.useMemo,f=e.useDebugValue;return $0.useSyncExternalStoreWithSelector=function(g,y,p,x,S){var w=u(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=d(function(){function R(j){if(!O){if(O=!0,A=j,j=x(j),S!==void 0&&C.hasValue){var D=C.value;if(S(D,j))return M=D}return M=j}if(D=M,s(A,j))return D;var k=x(j);return S!==void 0&&S(D,k)?(A=j,D):(A=j,M=k)}var O=!1,A,M,N=p===void 0?null:p;return[function(){return R(y())},N===null?void 0:function(){return R(N())}]},[y,p,x,S]);var E=o(g,w[0],w[1]);return c(function(){C.hasValue=!0,C.value=E},[E]),f(E),E},$0}var Ow;function Y4(){return Ow||(Ow=1,G0.exports=q4()),G0.exports}var G4=Y4();const $4=Av(19),Q4=$4?Z4:W4;function OC(e,t,i,s,o){return Q4(e,t,i,s,o)}function X4(e,t,i,s,o){const u=v.useCallback(()=>t(e.getSnapshot(),i,s,o),[e,t,i,s,o]);return kp.useSyncExternalStore(e.subscribe,u,u)}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()}}),kp.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Z4(e,t,i,s,o){const u=sj();if(!u)return X4(e,t,i,s,o);const c=u.syncIndex;u.syncIndex+=1;let d;return u.didInitialize?(d=u.syncHooks[c],(d.store!==e||d.selector!==t||!Object.is(d.a1,i)||!Object.is(d.a2,s)||!Object.is(d.a3,o))&&(d.store!==e&&(u.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)},u.syncHooks.push(d)),d.value}function W4(e,t,i,s,o){return G4.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,u=>t(u,i,s,o))}class J4{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 OC(this,t,i,s,o)}}class su extends J4{constructor(t,i={},s){super(t),this.context=i,this.selectors=s}useSyncedValue(t,i){v.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){v.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 u=this.selectors[t];return u(this.state,i,s,o)}useState(t,i,s,o){return v.useDebugValue(t),OC(this,this.selectors[t],i,s,o)}useContextCallback(t,i){v.useDebugValue(t);const s=Fe(i??En);this.context[t]=s}useStateSetter(t){const i=v.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(u=>{const c=s(u);if(!Object.is(o,c)){const d=o;o=c,i(c,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 AC extends su{constructor(t){const{syncOnly:i,nested:s,onOpenChange:o,triggerElements:u,...c}=t;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:yC(),nested:s,triggerElements:u},eI),this.syncOnly=i}syncOpenEvent=(t,i)=>{(!t||!this.state.open||i!=null&&yj(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 Np(e,t,i=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new AC({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:Qt,inactiveTriggerProps:Qt,popupProps:Qt}}const Rc=e=>e.triggerIdProp??e.activeTriggerId,_h=e=>e.openProp??e.open,Aw=e=>(e.popupElement?.id??e.floatingId)||void 0;function MC(e,t){return t!==void 0&&_h(e)&&Rc(e)===t}function tI(e,t){return MC(e,t)?!0:t!==void 0&&_h(e)&&Rc(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const Us={open:_h,mounted:e=>e.mounted,transitionStatus:e=>_h(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Rc,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Aw,isTriggerActive:(e,t)=>t!==void 0&&Rc(e)===t,isOpenedByTrigger:(e,t)=>MC(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Rc(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>tI(e,t)?Aw(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function zv(e){const t=v.useCallback(s=>e===void 0?En:e.subscribeStore(s),[e]),i=v.useCallback(()=>e===void 0?void 0:e.store,[e]);return kp.useSyncExternalStore(t,i,()=>e?.serverStore)}function nI(e){const{open:t=!1,onOpenChange:i,elements:s={}}=e,o=iu(),u=Fa()!=null,c=er(()=>new AC({open:t,transitionStatus:void 0,onOpenChange:i,referenceElement:s.reference??null,floatingElement:s.floating??null,triggerElements:new nd,floatingId:o,syncOnly:!1,nested:u})).current;return _e(()=>{const d={open:t,floatingId:o};s.reference!==void 0&&(d.referenceElement=s.reference,d.domReferenceElement=on(s.reference)?s.reference:null),s.floating!==void 0&&(d.floatingElement=s.floating),c.update(d)},[t,o,s.reference,s.floating,c]),c.context.onOpenChange=i,c.context.nested=u,c}const Q0=fv&&ms;function kC(e,t={}){const{enabled:i=!0,delay:s}=t,{events:o,dataRef:u}=e.context,c=v.useRef(!1),d=v.useRef(null),f=v.useRef(!0),g=Un();v.useEffect(()=>{const p=e.select("domReferenceElement");if(!i)return;const x=Rn(p);function S(){const E=e.select("domReferenceElement");!e.select("open")&&vn(E)&&E===Xr($t(E))&&(c.current=!0,d.current=E)}function w(){f.current=!0}function C(){f.current=!1}return ps(Lt(x,"blur",S),Q0&&Lt(x,"keydown",w,!0),Q0&&Lt(x,"pointerdown",C,!0))},[e,i]),v.useEffect(()=>{if(!i)return;function p(x){if(x.reason===$i||x.reason===Zc){const S=e.select("domReferenceElement");on(S)&&(d.current=S,c.current=!0)}}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,i,e]);const y=v.useMemo(()=>{function p(){c.current=!1,d.current=null}return{onMouseLeave(){p()},onFocus(x){const S=x.currentTarget;if(c.current){if(d.current===S)return;p()}const w=tr(x.nativeEvent);if(on(w)){if(Q0&&!x.relatedTarget){if(!f.current&&!Xc(w))return}else if(!Lj(w))return}const C=Nh(x.relatedTarget,e.context.triggerElements),{nativeEvent:E,currentTarget:R}=x;if(e.select("open")&&C||!s){e.setOpen(!0,ut(zl,E,R));return}g.start(s,()=>{c.current||e.setOpen(!0,ut(zl,E,R))})},onBlur(x){p();const S=x.relatedTarget,w=x.nativeEvent,C=on(S)&&S.hasAttribute(Bl("focus-guard"))&&S.getAttribute("data-type")==="outside";g.start(0,()=>{const E=e.select("domReferenceElement"),R=Xr($t(E));!S&&R===E||it(u.current.floatingContext?.refs.floating.current,R)||it(E,R)||C||Nh(S??R,e.context.triggerElements)||e.setOpen(!1,ut(zl,w))})}}},[u,s,e,g]);return v.useMemo(()=>i?{reference:y,trigger:y}:{},[i,y])}class _v{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new ji;restTimeout=new ji;handleCloseOptions=void 0;static create(){return new _v}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Uh=new WeakMap;function Hh(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Uh.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Uh.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function NC(e,t){const{scopeElement:i,referenceElement:s,floatingElement:o}=t,u=Uh.get(i);u&&u!==e&&Hh(u),Hh(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=i,e.pointerEventsReferenceElement=s,e.pointerEventsFloatingElement=o,Uh.set(i,e),i.style.pointerEvents="none",s.style.pointerEvents="auto",o.style.pointerEvents="auto"}function Uv(e){const t=e.context.dataRef.current,i=er(()=>t.hoverInteractionState??_v.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=i),dv(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Hv(e,t={}){const{enabled:i=!0,closeDelay:s=0,nodeId:o}=t,u=e.useState("open"),c=e.useState("floatingElement"),d=e.useState("domReferenceElement"),{dataRef:f}=e.context,g=Ba(),y=Fa(),p=Uv(e),x=Un(),S=Fe(()=>_R(f.current.openEvent?.type,p.interactedInside)),w=Fe(()=>_j(f.current.openEvent?.type)),C=Fe(()=>{Hh(p)});_e(()=>{u||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,C())},[u,p,C]),v.useEffect(()=>C,[C]),_e(()=>{if(i&&u&&p.handleCloseOptions?.blockPointerEvents&&w()&&on(d)&&c){const E=d,R=c,O=$t(c),A=g?.nodesRef.current.find(D=>D.id===y)?.context?.elements.floating;A&&(A.style.pointerEvents="");const M=p.pointerEventsScopeElement!==R?p.pointerEventsScopeElement:null,N=A!==R?A:null,j=p.handleCloseOptions?.getScope?.()??M??N??Ic(E,"[data-rootownerid]")??O.body;return NC(p,{scopeElement:j,referenceElement:E,floatingElement:R}),()=>{C()}}},[i,u,d,c,p,w,g,y,C]),v.useEffect(()=>{if(!i)return;function E(){return!!(g&&y&&za(g.nodesRef.current,y).length>0)}function R(D){const k=No(s,"close",p.pointerType),_=()=>{e.setOpen(!1,ut(Kn,D)),g?.events.emit("floating.closed",D)};k?p.openChangeTimeout.start(k,_):(p.openChangeTimeout.clear(),_())}function O(D){const k=tr(D);if(!Pj(k)){p.interactedInside=!1;return}p.interactedInside=Ic(k,"[aria-haspopup]")!=null}function A(){p.openChangeTimeout.clear(),x.clear(),g?.events.off("floating.closed",N),C()}function M(D){if(E()&&g){g.events.on("floating.closed",N);return}if(Nh(D.relatedTarget,e.context.triggerElements))return;const k=f.current.floatingContext?.nodeId??o,_=D.relatedTarget;if(!(g&&k&&on(_)&&za(g.nodesRef.current,k,!1).some(q=>it(q.context?.elements.floating,_)))){if(p.handler){p.handler(D);return}C(),w()&&!S()&&R(D)}}function N(D){!g||!y||E()||x.start(0,()=>{g.events.off("floating.closed",N),e.setOpen(!1,ut(Kn,D)),g.events.emit("floating.closed",D)})}const j=c;return ps(j&&Lt(j,"mouseenter",A),j&&Lt(j,"mouseleave",M),j&&Lt(j,"pointerdown",O,!0),()=>{g?.events.off("floating.closed",N)})},[i,c,e,f,s,o,w,S,C,p,g,y,x])}const rI={current:null};function DC(e,t={}){const{enabled:i=!0,delay:s=0,handleClose:o=null,mouseOnly:u=!1,restMs:c=0,move:d=!0,triggerElementRef:f=rI,externalTree:g,isActiveTrigger:y=!0,getHandleCloseContext:p,isClosing:x,shouldOpen:S,guardStaleOpen:w=!1}=t,{dataRef:C,events:E}=e.context,R=Ba(g),O=Uv(e),A=v.useRef(!1),M=Ln(o),N=Ln(s),j=Ln(c),D=Ln(i),k=Ln(S),_=Ln(x),L=Fe(()=>_R(C.current.openEvent?.type,O.interactedInside)),q=Fe(()=>k.current?.()!==!1),X=Fe((U,z,Q)=>{const $=e.context.triggerElements;if($.hasElement(z))return!U||!it(U,z);if(!on(Q))return!1;const K=Q;return $.hasMatchingElement(Y=>it(Y,K))&&(!U||!it(U,K))}),B=Fe(()=>{if(!O.handler)return;$t(e.select("domReferenceElement")).removeEventListener("mousemove",O.handler),O.handler=void 0}),H=Fe(()=>{Hh(O)});return y&&(O.handleCloseOptions=o?.__options),v.useEffect(()=>B,[B]),v.useEffect(()=>{if(!i)return;function U(z){z.open?A.current=!1:(A.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]),v.useEffect(()=>{if(!i)return;function U(ee,G=!0){const oe=No(N.current,"close",O.pointerType);oe?O.openChangeTimeout.start(oe,()=>{e.setOpen(!1,ut(Kn,ee)),R?.events.emit("floating.closed",ee)}):G&&(O.openChangeTimeout.clear(),e.setOpen(!1,ut(Kn,ee)),R?.events.emit("floating.closed",ee))}const z=f.current??(y?e.select("domReferenceElement"):null);if(!on(z))return;function Q(ee){if(O.openChangeTimeout.clear(),O.blockMouseMove=!1,u&&!ja(O.pointerType))return;const G=iw(j.current),oe=No(N.current,"open",O.pointerType),I=tr(ee),V=ee.currentTarget??null,J=e.select("domReferenceElement");let re=V;if(on(I)&&!e.context.triggerElements.hasElement(I)){for(const Ae of e.context.triggerElements.elements())if(it(Ae,I)){re=Ae;break}}on(V)&&on(J)&&!e.context.triggerElements.hasElement(V)&&it(V,J)&&(re=J);const Ee=re==null?!1:X(J,re,I),le=e.select("open"),me=_.current?.()??e.select("transitionStatus")==="ending",ge=!le&&me&&A.current,ce=!Ee&&on(re)&&on(J)&&it(J,re)&&ge,Te=G>0&&!oe,ve=Ee&&(le||ge)||ce,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=$t(G);O.restTimeout.clear(),O.restTimeoutPending=!1;const I=C.current.floatingContext??p?.();if(Nh(ee.relatedTarget,e.context.triggerElements))return;if(M.current&&I){e.select("open")||O.openChangeTimeout.clear();const J=f.current;O.handler=M.current({...I,tree:R,x:ee.clientX,y:ee.clientY,onClose(){H(),B(),D.current&&!L()&&J===e.select("domReferenceElement")&&U(ee,!0)}}),oe.addEventListener("mousemove",O.handler),O.handler(ee);return}(O.pointerType!=="touch"||!it(e.select("floatingElement"),ee.relatedTarget))&&U(ee)}function K(ee){it(z,ee.relatedTarget)||(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1)}const Y=w?Lt(z,"mouseout",K):void 0;return d?ps(Lt(z,"mousemove",Q,{once:!0}),Lt(z,"mouseenter",Q),Lt(z,"mouseleave",$),Y):ps(Lt(z,"mouseenter",Q),Lt(z,"mouseleave",$),Y)},[B,H,C,N,e,i,M,O,y,X,L,u,d,j,f,R,D,p,_,q,w]),v.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(u&&!ja(O.pointerType))return;if(Y&&ee&&O.handleCloseOptions?.blockPointerEvents){const I=e.select("floatingElement");if(I){const V=O.handleCloseOptions?.getScope?.()??$.ownerDocument.body;NC(O,{scopeElement:V,referenceElement:$,floatingElement:I})}}const G=iw(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"?cr.flushSync(()=>{oe()}):ee&&Y?oe():(O.restTimeoutPending=!0,O.restTimeout.start(G,oe))}}},[i,O,L,X,u,e,j,q])}function Mw(e){return ms&&e.movementX===0&&e.movementY===0}function Dp(e,t,i){switch(e){case"vertical":return t;case"horizontal":return i;default:return t||i}}function Yf(e,t){return Dp(t,e===LR||e===vv,e===hp||e===pp)}function X0(e,t,i){return Dp(t,e===vv,i?e===hp:e===pp)||e==="Enter"||e===" "||e===""}function iI(e,t,i){return Dp(t,i?e===hp:e===pp,e===vv)}function sI(e,t,i,s){const o=i?e===pp:e===hp,u=e===LR;return t==="both"||t==="horizontal"&&s?e==="Escape":Dp(t,o,u)}function jC(e,t){const{listRef:i,activeIndex:s,onNavigate:o=()=>{},enabled:u=!0,selectedIndex:c=null,allowEscape:d=!1,loopFocus:f=!1,nested:g=!1,rtl:y=!1,virtual:p=!1,focusItemOnOpen:x="auto",focusItemOnHover:S=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:E="vertical",triggerOrientation:R=E,parentOrientation:O,id:A,resetOnPointerLeave:M=!0,externalTree:N,nestedReturnFocusRef:j,grid:D}=t,k=D!=null,_=e.useState("open"),L=e.useState("floatingElement"),q=e.useState("domReferenceElement"),X=e.context.dataRef,B=Dh(L),H=Cy(q),U=Ln(B),z=Fa(),Q=Ba(N),$=v.useRef(x),K=v.useRef(c??-1),Y=v.useRef(null),ee=v.useRef(!0),G=Fe(de=>{o(K.current===-1?null:K.current,de)}),oe=v.useRef(!!L),I=v.useRef(_),V=v.useRef(!1),J=v.useRef(!1),re=v.useRef(null),Ee=Ln(C),le=Ln(_),me=Ln(c),ge=Ln(M),ce=Zl(),Te=Zl(),ve=Fe(()=>{ce.cancel();function de(De){p||(re.current=gh(De,{sync:V.current,preventScroll:!0}))}const we=i.current[K.current],Ge=J.current;we&&de(we),(V.current?De=>De():De=>ce.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(()=>{u&&(_&&L?(K.current=c??-1,$.current&&c!=null&&(J.current=!0,G())):oe.current&&(K.current=-1,G()))},[u,_,L,c,G]),_e(()=>{if(u){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?ke=>Te.request(ke):queueMicrotask)(we),de+=1):(K.current=Y.current==null||X0(Y.current,R,y)||g?ph(i):Oy(i),Y.current=null,G())};we()}}else _l(i.current,s)||(K.current=s,ve(),J.current=!1)}},[u,_,L,s,me,g,i,R,y,G,ve,Te]),_e(()=>{if(!u||L||!Q||p||!oe.current)return;const de=Q.nodesRef.current,we=de.find(De=>De.id===z)?.context?.elements.floating,Ge=Xr($t(q??we??null)),ke=de.some(De=>De.context&&it(De.context.elements.floating,Ge));we&&!ke&&ee.current&&we.focus({preventScroll:!0})},[u,L,q,Q,z,p]),_e(()=>{I.current=_,oe.current=!!L});const Pe=s!=null,Ae=Fe(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=Fe(()=>O??Q?.nodesRef.current.find(de=>de.id===z)?.context?.dataRef?.current.orientation),Be=Fe(()=>ph(i,Ee.current)),Oe=Fe(de=>{if(ee.current=!1,V.current=!0,de.which===229||!le.current&&de.currentTarget===U.current)return;if(g&&sI(de.key,E,y,k)){Yf(de.key,Le())||qi(de),e.setOpen(!1,ut(jh,de.nativeEvent));const De=j?.current??q;vn(De)&&De.focus();return}s!=null&&s!==K.current&&!_l(i.current,s)&&(K.current=s);const we=K.current,Ge=ph(i,C),ke=Oy(i,C);if(H||(de.key==="Home"&&(qi(de),K.current=Ge,G(de)),de.key==="End"&&(qi(de),K.current=ke,G(de))),D!=null){const De=D(de,K.current,i,E,f,y,C,Ge,ke);if(De!=null&&De!==K.current&&(K.current=De,G(de)),E==="both")return}if(Yf(de.key,E)){qi(de);const De=Xr(de.currentTarget.ownerDocument);if(_&&!p&&it(de.currentTarget,De)&&!i.current.some(pt=>pt!=null&&it(pt,De))){K.current=X0(de.key,E,y)?Ge:ke,G(de),s===K.current&&ve();return}const{index:vt,wrapped:ct}=l4(i.current,we,{decrement:!X0(de.key,E,y),loopFocus:f,allowEscape:d,disabledIndices:C,minIndex:Ge,maxIndex:ke});ct&&(V.current=!1),K.current=vt,G(de)}}),Ue=v.useMemo(()=>({onFocus(we){V.current=!0,Ae(we)},onClick({currentTarget:we}){p||we.focus({preventScroll:!0})},onMouseMove(we){Mw(we)||(V.current=!0,J.current=!1,S&&Ae(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),!p)){const ke=U.current,De=Xr($t(ke));ke&&it(ke,De)&&ke.focus({preventScroll:!0})}}}),[Ae,le,U,S,i,G,ge,p]),be=v.useMemo(()=>p&&_&&Pe&&{"aria-activedescendant":`${A}-${s}`},[p,_,Pe,A,s]),He=v.useMemo(()=>({...H?{}:be,onKeyDown(de){if(de.key==="Tab"&&de.shiftKey&&_&&!p){const we=tr(de.nativeEvent);if(we&&!it(U.current,we))return;qi(de);const Ge=ut(Pa,de.nativeEvent);e.setOpen(!1,Ge);const ke=j?.current??q;!Ge.isCanceled&&vn(ke)&&ke.focus();return}Oe(de)},onPointerMove(de){Mw(de)||(ee.current=!0)}}),[be,Oe,U,H,e,_,p,q,j]),Ze=v.useMemo(()=>{function de(ke){e.setOpen(!0,ut(jh,ke.nativeEvent,ke.currentTarget))}function we(ke){x==="auto"&&Xl(ke.nativeEvent)&&($.current=!p)}function Ge(ke){$.current=x,x==="auto"&&pv(ke.nativeEvent)&&($.current=!0)}return{onKeyDown(ke){const De=e.select("open");ee.current=!1;const vt=ke.key.startsWith("Arrow"),ct=iI(ke.key,Le(),y),pt=Yf(ke.key,De?E:R),kt=(g?ct:pt)||ke.key==="Enter"||ke.key.trim()==="";if(p&&De&&(!g||Xc(ke.currentTarget)))return Oe(ke);if(!(!De&&!w&&vt)){if(kt){const jt=Yf(ke.key,Le());Y.current=g&&jt?null:ke.key}if(g){ct&&(qi(ke),De?(K.current=Be(),G(ke),p&&U.current?.focus()):de(ke));return}pt&&(me.current!=null&&(K.current=me.current),qi(ke),!De&&w?de(ke):Oe(ke),De&&G(ke))}},onFocus(ke){ke.target===ke.currentTarget&&e.select("open")&&!p&&(K.current=-1,G(ke))},onPointerDown:Ge,onPointerEnter:Ge,onMouseDown:we,onClick:we}},[Oe,x,Be,g,G,e,w,E,R,Le,y,me,p,U]),at=v.useMemo(()=>({...be,...Ze}),[be,Ze]);return v.useMemo(()=>u?{reference:at,floating:He,item:Ue,trigger:Ze}:{},[u,at,He,Ze,Ue])}function IC(e,t){const{listRef:i,elementsRef:s,activeIndex:o,onMatch:u,disabledIndices:c,onTyping:d,enabled:f=!0,resetMs:g=750,selectedIndex:y=null}=t,p=Fe(d),x=e.useState("open"),S=Un(),w=v.useRef(""),C=v.useRef(y??o??-1),E=v.useRef(null),R=Fe(M=>{function N(H){return s?.current[H]}function j(H){const U=N(H);return U&&!vp(U)||U?.matches(":disabled")?!1:c==null||!Hl(Gi,H,c)}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 k=i.current;if(w.current.length>0&&M.key===" "&&(qi(M),p?.(!0)),w.current.length>0&&w.current[0]!==" "&&D(k,w.current)===-1&&M.key!==" "&&p?.(!1),k==null||M.key.length!==1||M.ctrlKey||M.metaKey||M.altKey)return;x&&M.key!==" "&&(qi(M),p?.(!0));const _=w.current==="";_&&(C.current=y??o??-1),k.every((H,U)=>H&&j(U)?H[0]?.toLowerCase()!==H[1]?.toLowerCase():!0)&&w.current===M.key&&(w.current="",C.current=E.current),w.current+=M.key,S.start(g,()=>{w.current="",C.current=E.current,p?.(!1)});const X=((_?y??o??-1:C.current)??0)+1,B=D(k,w.current,X);B!==-1?(u?.(B,M),E.current=B):M.key!==" "&&(w.current="",p?.(!1))}),O=Fe(M=>{const N=M.relatedTarget,j=e.select("domReferenceElement"),D=e.select("floatingElement");it(j,N)||it(D,N)||(S.clear(),w.current="",C.current=E.current,p?.(!1))});_e(()=>{!x&&y!==null||(S.clear(),E.current=null,w.current!==""&&(w.current="",p?.(!1)))},[x,y,S,p]);const A=v.useMemo(()=>({onKeyDown:R,onBlur:O}),[R,O]);return v.useMemo(()=>f?{reference:A,floating:A}:{},[f,A])}const kw=.1,aI=kw*kw,wn=.5;function Gf(e,t,i,s,o,u){return s>=t!=u>=t&&e<=(o-i)*(t-s)/(u-s)+i}function $f(e,t,i,s,o,u,c,d,f,g){let y=!1;return Gf(e,t,i,s,o,u)&&(y=!y),Gf(e,t,o,u,c,d)&&(y=!y),Gf(e,t,c,d,f,g)&&(y=!y),Gf(e,t,f,g,i,s)&&(y=!y),y}function oI(e,t,i){return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height}function Qf(e,t,i,s,o,u){const c=Math.min(i,o),d=Math.max(i,o),f=Math.min(s,u),g=Math.max(s,u);return e>=c&&e<=d&&t>=f&&t<=g}function PC(e={}){const{blockPointerEvents:t=!1}=e,i=new ji,s=({x:o,y:u,placement:c,elements:d,onClose:f,nodeId:g,tree:y})=>{const p=c?.split("-")[0];let x=!1,S=null,w=null,C=typeof performance<"u"?performance.now():0;function E(O,A){const M=performance.now(),N=M-C;if(S===null||w===null||N===0)return S=O,w=A,C=M,!1;const j=O-S,D=A-w,k=j*j+D*D,_=N*N*aI;return S=O,w=A,C=M,k<_}function R(){i.clear(),f()}return function(A){i.clear();const M=d.domReference,N=d.floating;if(!M||!N||p==null||o==null||u==null)return;const{clientX:j,clientY:D}=A,k=tr(A),_=A.type==="mouseleave",L=it(N,k),q=it(M,k);if(L&&(x=!0,!_))return;if(q&&(x=!1,!_)){x=!0;return}if(_&&on(A.relatedTarget)&&it(N,A.relatedTarget))return;function X(){return!!(y&&za(y.nodesRef.current,g).length>0)}function B(){X()||R()}if(X())return;const H=M.getBoundingClientRect(),U=N.getBoundingClientRect(),z=o>U.right-U.width/2,Q=u>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(p==="top"&&u>=H.bottom-1||p==="bottom"&&u<=H.top+1||p==="left"&&o>=H.right-1||p==="right"&&o<=H.left+1){B();return}let I=!1;switch(p){case"top":I=Qf(j,D,Y,H.top+1,ee,U.bottom-1);break;case"bottom":I=Qf(j,D,Y,U.top+1,ee,H.bottom-1);break;case"left":I=Qf(j,D,U.right-1,oe,H.left+1,G);break;case"right":I=Qf(j,D,H.right-1,oe,U.left+1,G);break}if(I)return;if(x&&!oI(j,D,H)){B();return}if(!_&&E(j,D)){B();return}let V=!1;switch(p){case"top":{const J=$?wn/2:wn*4,re=$||z?o+J:o-J,Ee=$?o-J:z?o+J:o-J,le=u+wn+1,me=z||$?U.bottom-wn:U.top,ge=z?$?U.bottom-wn:U.top:U.bottom-wn;V=$f(j,D,re,le,Ee,le,U.left,me,U.right,ge);break}case"bottom":{const J=$?wn/2:wn*4,re=$||z?o+J:o-J,Ee=$?o-J:z?o+J:o-J,le=u-wn,me=z||$?U.top+wn:U.bottom,ge=z?$?U.top+wn:U.bottom:U.top+wn;V=$f(j,D,re,le,Ee,le,U.left,me,U.right,ge);break}case"left":{const J=K?wn/2:wn*4,re=K||Q?u+J:u-J,Ee=K?u-J:Q?u+J:u-J,le=o+wn+1,me=Q||K?U.right-wn:U.left,ge=Q?K?U.right-wn:U.left:U.right-wn;V=$f(j,D,me,U.top,ge,U.bottom,le,re,le,Ee);break}case"right":{const J=K?wn/2:wn*4,re=K||Q?u+J:u-J,Ee=K?u-J:Q?u+J:u-J,le=o-wn,me=Q||K?U.left+wn:U.right,ge=Q?K?U.left+wn:U.right:U.left+wn;V=$f(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 Nw(e,t,i){let{reference:s,floating:o}=e;const u=Ni(t),c=Cv(t),d=Rv(c),f=pi(t),g=u==="y",y=s.x+s.width/2-o.width/2,p=s.y+s.height/2-o.height/2,x=s[d]/2-o[d]/2;let S;switch(f){case"top":S={x:y,y:s.y-o.height};break;case"bottom":S={x:y,y:s.y+s.height};break;case"right":S={x:s.x+s.width,y:p};break;case"left":S={x:s.x-o.width,y:p};break;default:S={x:s.x,y:s.y}}const w=gs(t);return w&&(S[c]+=x*(w==="end"?1:-1)*(i&&g?-1:1)),S}async function lI(e,t){var i;t===void 0&&(t={});const{x:s,y:o,platform:u,rects:c,elements:d,strategy:f}=e,{boundary:g="clippingAncestors",rootBoundary:y="viewport",elementContext:p="floating",altBoundary:x=!1,padding:S=0}=La(t,e),w=YR(S),E=d[x?p==="floating"?"reference":"floating":p],R=Pc(await u.getClippingRect({element:(i=await(u.isElement==null?void 0:u.isElement(E)))==null||i?E:E.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:g,rootBoundary:y,strategy:f})),O=p==="floating"?{x:s,y:o,width:c.floating.width,height:c.floating.height}:c.reference,A=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),M=await(u.isElement==null?void 0:u.isElement(A))&&await(u.getScale==null?void 0:u.getScale(A))||{x:1,y:1},N=Pc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:A,strategy:f}):O);return{top:(R.top-N.top+w.top)/M.y,bottom:(N.bottom-R.bottom+w.bottom)/M.y,left:(R.left-N.left+w.left)/M.x,right:(N.right-R.right+w.right)/M.x}}const uI=50,cI=async(e,t,i)=>{const{placement:s="bottom",strategy:o="absolute",middleware:u=[],platform:c}=i,d=c.detectOverflow?c:{...c,detectOverflow:lI},f=await(c.isRTL==null?void 0:c.isRTL(t));let g=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:y,y:p}=Nw(g,s,f),x=s,S=0;const w={};for(let C=0;C<u.length;C++){const E=u[C];if(!E)continue;const{name:R,fn:O}=E,{x:A,y:M,data:N,reset:j}=await O({x:y,y:p,initialPlacement:s,placement:x,strategy:o,middlewareData:w,rects:g,platform:d,elements:{reference:e,floating:t}});y=A??y,p=M??p,w[R]={...w[R],...N},j&&S<uI&&(S++,typeof j=="object"&&(j.placement&&(x=j.placement),j.rects&&(g=j.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):j.rects),{x:y,y:p}=Nw(g,x,f)),C=-1)}return{x:y,y:p,placement:x,strategy:o,middlewareData:w}},dI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var i,s;const{placement:o,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:g}=t,{mainAxis:y=!0,crossAxis:p=!0,fallbackPlacements:x,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...E}=La(e,t);if((i=u.arrow)!=null&&i.alignmentOffset)return{};const R=pi(o),O=Ni(d),A=pi(d)===d,M=await(f.isRTL==null?void 0:f.isRTL(g.floating)),N=x||(A||!C?[Ph(d)]:n4(d)),j=w!=="none";!x&&j&&N.push(...a4(d,C,w,M));const D=[d,...N],k=await f.detectOverflow(t,E),_=[];let L=((s=u.flip)==null?void 0:s.overflows)||[];if(y&&_.push(k[R]),p){const H=t4(o,c,M);_.push(k[H[0]],k[H[1]])}if(L=[...L,{placement:o,overflows:_}],!_.every(H=>H<=0)){var q,X;const H=(((q=u.flip)==null?void 0:q.index)||0)+1,U=D[H];if(U&&(!(p==="alignment"?O!==Ni(U):!1)||L.every($=>Ni($.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=Ni($.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{}}}},LC=new Set(["left","top"]);async function fI(e,t){const{placement:i,platform:s,elements:o}=e,u=await(s.isRTL==null?void 0:s.isRTL(o.floating)),c=pi(i),d=gs(i),f=Ni(i)==="y",g=LC.has(c)?-1:1,y=u&&f?-1:1,p=La(t,e);let{mainAxis:x,crossAxis:S,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return d&&typeof w=="number"&&(S=d==="end"?w*-1:w),f?{x:S*y,y:x*g}:{x:x*g,y:S*y}}const hI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var i,s;const{x:o,y:u,placement:c,middlewareData:d}=t,f=await fI(t,e);return c===((i=d.offset)==null?void 0:i.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:o+f.x,y:u+f.y,data:{...f,placement:c}}}}},pI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:s,placement:o,platform:u}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:O=>{let{x:A,y:M}=O;return{x:A,y:M}}},...g}=La(e,t),y={x:i,y:s},p=await u.detectOverflow(t,g),x=Ni(o),S=Ev(x);let w=y[S],C=y[x];const E=(O,A)=>qR(A+p[O==="y"?"top":"left"],A,A-p[O==="y"?"bottom":"right"]);c&&(w=E(S,w)),d&&(C=E(x,C));const R=f.fn({...t,[S]:w,[x]:C});return{...R,data:{x:R.x-i,y:R.y-s,enabled:{[S]:c,[x]:d}}}}}},gI=function(e){return e===void 0&&(e={}),{options:e,fn(t){var i,s;const{x:o,y:u,placement:c,rects:d,middlewareData:f}=t,{offset:g=0,mainAxis:y=!0,crossAxis:p=!0}=La(e,t),x={x:o,y:u},S=Ni(c),w=Ev(S);let C=x[w],E=x[S];const R=La(g,t),O=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:(i=R.mainAxis)!=null?i:0,crossAxis:(s=R.crossAxis)!=null?s:0};if(y){const N=w==="y"?"height":"width",j=d.reference[w]-d.floating[N]+O.mainAxis,D=d.reference[w]+d.reference[N]-O.mainAxis;C<j?C=j:C>D&&(C=D)}if(p){var A,M;const N=w==="y"?"width":"height",j=LC.has(pi(c)),D=d.reference[S]-d.floating[N]+(j&&((A=f.offset)==null?void 0:A[S])||0)+(j?0:O.crossAxis),k=d.reference[S]+d.reference[N]+(j?0:((M=f.offset)==null?void 0:M[S])||0)-(j?O.crossAxis:0);E<D?E=D:E>k&&(E=k)}return{[w]:C,[S]:E}}}},mI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:i,rects:s,platform:o,elements:u}=t,{apply:c=()=>{},...d}=La(e,t),f=await o.detectOverflow(t,d),g=pi(i),y=gs(i),p=Ni(i)==="y",{width:x,height:S}=s.floating;let w,C;g==="top"||g==="bottom"?(w=g,C=y===(await(o.isRTL==null?void 0:o.isRTL(u.floating))?"start":"end")?"left":"right"):(C=g,w=y==="end"?"top":"bottom");const E=S-f.top-f.bottom,R=x-f.left-f.right,O=Jl(S-f[w],E),A=Jl(x-f[C],R),M=t.middlewareData.shift,N=!M;let j=O,D=A;M!=null&&M.enabled.x&&(D=R),M!=null&&M.enabled.y&&(j=E),N&&!y&&(p?D=x-2*Bs(f.left,f.right):j=S-2*Bs(f.top,f.bottom)),await c({...t,availableWidth:D,availableHeight:j});const k=await o.getDimensions(u.floating);return x!==k.width||S!==k.height?{reset:{rects:!0}}:{}}}};function zC(e){const t=gi(e);let i=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const o=vn(e),u=o?e.offsetWidth:i,c=o?e.offsetHeight:s,d=Ih(i)!==u||Ih(s)!==c;return d&&(i=u,s=c),{width:i,height:s,$:d}}function Fv(e){return on(e)?e:e.contextElement}function Vl(e){const t=Fv(e);if(!vn(t))return Vs(1);const i=t.getBoundingClientRect(),{width:s,height:o,$:u}=zC(t);let c=(u?Ih(i.width):i.width)/s,d=(u?Ih(i.height):i.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const yI=Vs(0);function _C(e){const t=Rn(e);return!yv()||!t.visualViewport?yI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vI(e,t,i){return t===void 0&&(t=!1),!!i&&t&&i===Rn(e)}function Do(e,t,i,s){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),u=Fv(e);let c=Vs(1);t&&(s?on(s)&&(c=Vl(s)):c=Vl(e));const d=vI(u,i,s)?_C(u):Vs(0);let f=(o.left+d.x)/c.x,g=(o.top+d.y)/c.y,y=o.width/c.x,p=o.height/c.y;if(u&&s){const x=Rn(u),S=on(s)?Rn(s):s;let w=x,C=wy(w);for(;C&&S!==w;){const E=Vl(C),R=C.getBoundingClientRect(),O=gi(C),A=R.left+(C.clientLeft+parseFloat(O.paddingLeft))*E.x,M=R.top+(C.clientTop+parseFloat(O.paddingTop))*E.y;f*=E.x,g*=E.y,y*=E.x,p*=E.y,f+=A,g+=M,w=Rn(C),C=wy(w)}}return Pc({width:y,height:p,x:f,y:g})}function jp(e,t){const i=fp(e).scrollLeft;return t?t.left+i:Do(Ys(e)).left+i}function UC(e,t){const i=e.getBoundingClientRect(),s=i.left+t.scrollLeft-jp(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 u=o==="fixed",c=Ys(s),d=t?dp(t.floating):!1;if(s===c||d&&u)return i;let f={scrollLeft:0,scrollTop:0},g=Vs(1);const y=Vs(0),p=vn(s);if((p||!u)&&((Er(s)!=="body"||$c(c))&&(f=fp(s)),p)){const S=Do(s);g=Vl(s),y.x=S.x+s.clientLeft,y.y=S.y+s.clientTop}const x=c&&!p&&!u?UC(c,f):Vs(0);return{width:i.width*g.x,height:i.height*g.y,x:i.x*g.x-f.scrollLeft*g.x+y.x+x.x,y:i.y*g.y-f.scrollTop*g.y+y.y+x.y}}function xI(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function SI(e){const t=fp(e),i=e.ownerDocument.body,s=Bs(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=Bs(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let u=-t.scrollLeft+jp(e);const c=-t.scrollTop;return gi(i).direction==="rtl"&&(u+=Bs(e.clientWidth,i.clientWidth)-s),{width:s,height:o,x:u,y:c}}const wI=25;function EI(e,t,i){i===void 0&&(i="viewport");const s=i==="layoutViewport",o=Rn(e),u=Ys(e),c=o.visualViewport;let d=u.clientWidth,f=u.clientHeight,g=0,y=0;if(c){const x=!yv()||t==="fixed";s?x||(g=-c.offsetLeft,y=-c.offsetTop):(d=c.width,f=c.height,x&&(g=c.offsetLeft,y=c.offsetTop))}if(jp(u)<=0){const x=u.ownerDocument,S=x.body,w=getComputedStyle(S),C=x.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,E=Math.abs(u.clientWidth-S.clientWidth-C),R=getComputedStyle(u).scrollbarGutter==="stable both-edges"?E/2:E;R<=wI&&(d-=R)}return{width:d,height:f,x:g,y}}function RI(e,t){const i=Do(e,!0,t==="fixed"),s=i.top+e.clientTop,o=i.left+e.clientLeft,u=Vl(e),c=e.clientWidth*u.x,d=e.clientHeight*u.y,f=o*u.x,g=s*u.y;return{width:c,height:d,x:f,y:g}}function Dw(e,t,i){let s;if(t==="viewport"||t==="layoutViewport")s=EI(e,i,t);else if(t==="document")s=SI(Ys(e));else if(on(t))s=RI(t,i);else{const o=_C(e);s={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Pc(s)}function CI(e,t){const i=t.get(e);if(i)return i;let s=jc(e,[],!1).filter(d=>on(d)&&Er(d)!=="body"),o=null;const u=gi(e).position==="fixed";let c=u?Ks(e):e;for(;on(c)&&!Fs(c);){const d=gi(c),f=mv(c),g=o?o.position:u?"fixed":"";!f&&(g==="fixed"||g==="absolute"&&d.position==="static")?s=s.filter(p=>p!==c):o=d,c=Ks(c)}return t.set(e,s),s}function TI(e){let{element:t,boundary:i,rootBoundary:s,strategy:o}=e;const c=[...i==="clippingAncestors"?dp(t)?[]:CI(t,this._c):[].concat(i),s],d=Dw(t,c[0],o);let f=d.top,g=d.right,y=d.bottom,p=d.left;for(let x=1;x<c.length;x++){const S=Dw(t,c[x],o);f=Bs(S.top,f),g=Jl(S.right,g),y=Jl(S.bottom,y),p=Bs(S.left,p)}return{width:g-p,height:y-f,x:p,y:f}}function OI(e){const{width:t,height:i}=zC(e);return{width:t,height:i}}function AI(e,t,i){const s=vn(t),o=Ys(t),u=i==="fixed",c=Do(e,!0,u,t);let d={scrollLeft:0,scrollTop:0};const f=Vs(0);if((s||!u)&&((Er(t)!=="body"||$c(o))&&(d=fp(t)),s)){const x=Do(t,!0,u,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}!s&&o&&(f.x=jp(o));const g=o&&!s&&!u?UC(o,d):Vs(0),y=c.left+d.scrollLeft-f.x-g.x,p=c.top+d.scrollTop-f.y-g.y;return{x:y,y:p,width:c.width,height:c.height}}function Z0(e){return gi(e).position==="static"}function jw(e,t){if(!vn(e)||gi(e).position==="fixed")return null;if(t)return t(e);let i=e.offsetParent;return Ys(e)===i&&(i=i.ownerDocument.body),i}function HC(e,t){const i=Rn(e);if(dp(e))return i;if(!vn(e)){let o=Ks(e);for(;o&&!Fs(o);){if(on(o)&&!Z0(o))return o;o=Ks(o)}return i}let s=jw(e,t);for(;s&&vj(s)&&Z0(s);)s=jw(s,t);return s&&Fs(s)&&Z0(s)&&!mv(s)?i:s||Sj(e)||i}const MI=async function(e){const t=this.getOffsetParent||HC,i=this.getDimensions,s=await i(e.floating);return{reference:AI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function kI(e){return gi(e).direction==="rtl"}const FC={convertOffsetParentRelativeRectToViewportRelativeRect:bI,getDocumentElement:Ys,getClippingRect:TI,getOffsetParent:HC,getElementRects:MI,getClientRects:xI,getDimensions:OI,getScale:Vl,isElement:on,isRTL:kI};function BC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function NI(e,t,i){let s=null,o;const u=Ys(e);function c(){var y;clearTimeout(o),(y=s)==null||y.disconnect(),s=null}function d(y,p){y===void 0&&(y=!1),p===void 0&&(p=1),c();const x=e.getBoundingClientRect(),{left:S,top:w,width:C,height:E}=x;if(y||t(),!C||!E)return;const R=Bf(w),O=Bf(u.clientWidth-(S+C)),A=Bf(u.clientHeight-(w+E)),M=Bf(S),j={rootMargin:-R+"px "+-O+"px "+-A+"px "+-M+"px",threshold:Bs(0,Jl(1,p))||1};let D=!0;function k(_){const L=_[0].intersectionRatio;if(!BC(x,e.getBoundingClientRect()))return d();if(L!==p){if(!D)return d();L?d(!1,L):o=setTimeout(()=>{d(!1,1e-7)},1e3)}D=!1}try{s=new IntersectionObserver(k,{...j,root:u.ownerDocument})}catch{s=new IntersectionObserver(k,j)}s.observe(e)}const f=Rn(e),g=()=>d(i);return f.addEventListener("resize",g),d(!0),()=>{f.removeEventListener("resize",g),c()}}function Iw(e,t,i,s){s===void 0&&(s={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=s,g=Fv(e),y=o||u?[...g?jc(g):[],...t?jc(t):[]]:[];y.forEach(R=>{o&&R.addEventListener("scroll",i),u&&R.addEventListener("resize",i)});const p=g&&d?NI(g,i,u):null;let x=-1,S=null;c&&(S=new ResizeObserver(R=>{let[O]=R;O&&O.target===g&&S&&t&&(S.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var A;(A=S)==null||A.observe(t)})),i()}),g&&!f&&S.observe(g),t&&S.observe(t));let w,C=f?Do(e):null;f&&E();function E(){const R=Do(e);C&&!BC(C,R)&&i(),C=R,w=requestAnimationFrame(E)}return i(),()=>{var R;y.forEach(O=>{o&&O.removeEventListener("scroll",i),u&&O.removeEventListener("resize",i)}),p?.(),(R=S)==null||R.disconnect(),S=null,f&&cancelAnimationFrame(w)}}const DI=hI,jI=pI,II=dI,PI=mI,LI=gI,zI=(e,t,i)=>{const s=new Map,o=i??{},u={...FC,...o.platform,_c:s};return cI(e,t,{...o,platform:u})};var _I=typeof document<"u",UI=function(){},mh=_I?v.useLayoutEffect:UI;function Fh(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(!Fh(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 u=o[s];if(!(u==="_owner"&&e.$$typeof)&&!Fh(e[u],t[u]))return!1}return!0}return e!==e&&t!==t}function VC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pw(e,t){const i=VC(e);return Math.round(t*i)/i}function W0(e){const t=v.useRef(e);return mh(()=>{t.current=e}),t}function HI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:i="absolute",middleware:s=[],platform:o,elements:{reference:u,floating:c}={},transform:d=!0,whileElementsMounted:f,open:g}=e,[y,p]=v.useState({x:0,y:0,strategy:i,placement:t,middlewareData:{},isPositioned:!1}),[x,S]=v.useState(s);Fh(x,s)||S(s);const[w,C]=v.useState(null),[E,R]=v.useState(null),O=v.useCallback($=>{$!==j.current&&(j.current=$,C($))},[]),A=v.useCallback($=>{$!==D.current&&(D.current=$,R($))},[]),M=u||w,N=c||E,j=v.useRef(null),D=v.useRef(null),k=v.useRef(y),_=f!=null,L=W0(f),q=W0(o),X=W0(g),B=v.useCallback(()=>{if(!j.current||!D.current)return;const $={placement:t,strategy:i,middleware:x};q.current&&($.platform=q.current),zI(j.current,D.current,$).then(K=>{const Y={...K,isPositioned:X.current!==!1};H.current&&!Fh(k.current,Y)&&(k.current=Y,cr.flushSync(()=>{p(Y)}))})},[x,t,i,q,X]);mh(()=>{g===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[g]);const H=v.useRef(!1);mh(()=>(H.current=!0,()=>{H.current=!1}),[]),mh(()=>{if(M&&(j.current=M),N&&(D.current=N),M&&N){if(L.current)return L.current(M,N,B);B()}},[M,N,B,L,_]);const U=v.useMemo(()=>({reference:j,floating:D,setReference:O,setFloating:A}),[O,A]),z=v.useMemo(()=>({reference:M,floating:N}),[M,N]),Q=v.useMemo(()=>{const $={position:i,left:0,top:0};if(!z.floating)return $;const K=Pw(z.floating,y.x),Y=Pw(z.floating,y.y);return d?{...$,transform:"translate("+K+"px, "+Y+"px)",...VC(z.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:K,top:Y}},[i,d,z.floating,y.x,y.y]);return v.useMemo(()=>({...y,update:B,refs:U,elements:z,floatingStyles:Q}),[y,B,U,z,Q])}const FI=(e,t)=>{const i=DI(e);return{name:i.name,fn:i.fn,options:[e,t]}},BI=(e,t)=>{const i=jI(e);return{name:i.name,fn:i.fn,options:[e,t]}},VI=(e,t)=>({fn:LI(e).fn,options:[e,t]}),KI=(e,t)=>{const i=II(e);return{name:i.name,fn:i.fn,options:[e,t]}},qI=(e,t)=>{const i=PI(e);return{name:i.name,fn:i.fn,options:[e,t]}},YI={...Us,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 GI extends su{constructor(t,i,s){const o=new nd;super($I(t,o,i,s),QI(o),YI)}setOpen=(t,i)=>{V4(this,t,i,{extraState:{openChangeReason:i.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,ut($i,t))}}function $I(e,t,i,s=!1){return{...Np(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 QI(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const XI=Yc(function(t){const{disabled:i=!1,defaultOpen:s=!1,open:o,disableHoverablePopup:u=!1,trackCursorAxis:c="none",actionsRef:d,onOpenChange:f,onOpenChangeComplete:g,handle:y,triggerId:p,defaultTriggerId:x=null,children:S}=t,w=Pv((q,X)=>new GI({open:s,openProp:o,activeTriggerId:x,triggerIdProp:p},q,X));w.useControlledProp("openProp",o),w.useControlledProp("triggerIdProp",p),w.useContextCallback("onOpenChange",f),w.useContextCallback("onOpenChangeComplete",g);const C=w.useState("open"),E=!i&&C,R=w.useState("activeTriggerId"),O=w.useState("mounted"),A=w.useState("payload");w.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:u,disabled:i}),Op(w,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:M,transitionStatus:N}=Ap(E,w),j=w.useState("isInstantPhase"),D=w.useState("instantType"),k=w.useState("lastOpenChangeReason"),_=v.useRef(null);_e(()=>{C&&i&&w.setOpen(!1,ut(Fj))},[C,i,w]),_e(()=>{N==="ending"&&k===kr||N!=="ending"&&j?(D!=="delay"&&(_.current=D),w.set("instantType","delay")):_.current!==null&&(w.set("instantType",_.current),_.current=null)},[N,j,k,D,w]),_e(()=>{E&&R==null&&w.set("payload",void 0)},[w,R,E]),v.useImperativeHandle(d,()=>({unmount:M,close:()=>w.setOpen(!1,ut(Wc))}),[M,w]);const L=E||O||!i&&c!=="none";return b.jsxs(jR.Provider,{value:w,children:[y&&b.jsx(Rp,{handle:y,store:w}),L&&b.jsx(ZI,{store:w,disabled:i,trackCursorAxis:c}),typeof S=="function"?S({payload:A}):S]})});function ZI({store:e,disabled:t,trackCursorAxis:i}){const s=e.useState("floatingRootContext"),o=ed(s,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),u=_4(s,{enabled:!t&&i!=="none",axis:i==="none"?void 0:i}),c=v.useMemo(()=>Mr(u.reference,o.reference),[u.reference,o.reference]);return Mp(e,{activeTriggerProps:c,inactiveTriggerProps:c,popupProps:o.floating??Qt}),null}function dr(e){return iu(e,"base-ui")}const KC=v.createContext(void 0);function WI(){return v.useContext(KC)}const JI=600,Lw="data-base-ui-tooltip-trigger";function zw(e){const t=tr(e);return on(t)?t:null}const e3=cv(function(t,i){const{render:s,className:o,style:u,handle:c,payload:d,disabled:f,delay:g,closeOnClick:y=!0,closeDelay:p,id:x,...S}=t,w=Gc(!0),E=zv(c)??w;if(!E)throw new Error(bn(82));const R=dr(x),O=E.useState("isTriggerActive",R),A=E.useState("isOpenedByTrigger",R),M=E.useState("floatingRootContext"),N=v.useRef(null),j=p??0,{registerTrigger:D,isMountedByThisTrigger:k}=Lv(R,N,E,{payload:d,closeOnClick:y,closeDelay:j}),_=WI(),{activeIdRef:L,delayRef:q,isInstantPhase:X,hasProvider:B}=qj(M,{open:A}),H=Uv(M);E.useSyncedValue("isInstantPhase",X);const U=E.useState("disabled"),z=f??U,Q=Ln(z),$=E.useState("trackCursorAxis"),K=E.useState("disableHoverablePopup"),Y=v.useRef(!1),ee=Un(),G=v.useRef(void 0);function oe(){return B&&L.current!=null?0:g??_??JI}function I(ce){const Te=N.current;if(!Te||!ce)return!1;const ve=Ic(ce,`[${Lw}]`);return ve!==null&&ve!==Te&&it(Te,ve)}function V(ce){const Te=I(ce);return Y.current=Te,Te&&(H.openChangeTimeout.clear(),H.restTimeout.clear(),H.restTimeoutPending=!1,ee.clear()),Te}const J=DC(M,{enabled:!z,mouseOnly:!0,move:!1,handleClose:!K&&$!=="both"?PC():null,restMs:oe,delay(){return p==null&&B?{close:No(q.current,"close")}:{close:j}},triggerElementRef:N,isActiveTrigger:O,isClosing:()=>E.select("transitionStatus")==="ending",shouldOpen(){return!Y.current}}),re=kC(M,{enabled:!z}).reference,Ee=ce=>{const Te=Y.current,ve=zw(ce),Pe=V(ve),Ae=N.current,Le=Ae&&ve&&it(Ae,ve);if(Pe&&E.select("open")&&E.select("lastOpenChangeReason")===Kn){E.setOpen(!1,ut(Kn,ce));return}if(Te&&!Pe&&Le&&!Q.current&&!E.select("open")&&Ae&&ja(G.current)){const Be=()=>{!Y.current&&!Q.current&&!E.select("open")&&E.setOpen(!0,ut(Kn,ce,Ae))},Oe=oe();Oe===0?(ee.clear(),Be()):ee.start(Oe,Be)}},le=E.useState("appliedTriggerProps",k||$!=="none");return At("button",t,{state:{open:A},ref:[i,D,N],props:[J,re,le,{onMouseOver(ce){Ee(ce.nativeEvent)},onFocus(ce){I(zw(ce.nativeEvent))&&ce.preventBaseUIHandler()},onMouseLeave(){Y.current=!1,ee.clear(),G.current=void 0},onPointerEnter(ce){G.current=ce.pointerType},onPointerDown(ce){G.current=ce.pointerType,E.set("closeOnClick",y),y&&!E.select("open")&&E.cancelPendingOpen(ce.nativeEvent)},onClick(ce){y&&!E.select("open")&&E.cancelPendingOpen(ce.nativeEvent)},id:R,[Ry]:z?"":void 0,[Lw]:z?void 0:""},S],stateAttributesMapping:xv})}),qC=v.createContext(void 0);function t3(){const e=v.useContext(qC);if(e===void 0)throw new Error(bn(70));return e}const n3=v.forwardRef(function(t,i){const{children:s,container:o,className:u,render:c,style:d,...f}=t,{node:g,subtree:y}=mC({container:o,ref:i,componentProps:t,elementProps:f});return!y&&!g?null:b.jsxs(v.Fragment,{children:[y,g&&cr.createPortal(s,g)]})}),r3=v.forwardRef(function(t,i){const{keepMounted:s=!1,...o}=t;return Gc().useState("mounted")||s?b.jsx(qC.Provider,{value:s,children:b.jsx(n3,{ref:i,...o})}):null}),YC=v.createContext(void 0);function GC(){const e=v.useContext(YC);if(e===void 0)throw new Error(bn(71));return e}function i3(e){const{nodeId:t,externalTree:i,rootContext:s}=e,o=s.useState("referenceElement"),u=s.useState("floatingElement"),c=s.useState("domReferenceElement"),d=s.useState("open"),f=s.useState("floatingId"),[g,y]=v.useState(null),p=v.useRef(null),x=Ba(i),S=v.useMemo(()=>({reference:o,floating:u,domReference:c}),[o,u,c]),w=HI({...e,elements:{...S,...g&&{reference:g}}}),C=v.useCallback(A=>{const M=on(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;y(M),w.refs.setReference(M)},[w.refs]),E=v.useMemo(()=>({...w.refs,setPositionReference:C,domReference:p}),[w.refs,C]),R=v.useMemo(()=>({...w.elements,domReference:c}),[w.elements,c]),O=v.useMemo(()=>({...w,dataRef:s.context.dataRef,open:d,onOpenChange:s.setOpen,events:s.context.events,floatingId:f,refs:E,elements:R,nodeId:t,rootStore:s}),[w,E,R,t,s,d,f]);return _e(()=>{c&&(p.current=c)},[c]),_e(()=>{s.context.dataRef.current.floatingContext=O;const A=x?.nodesRef.current.find(M=>M.id===t);A&&(A.context=O)}),v.useMemo(()=>({...w,context:O,refs:E,elements:R,rootStore:s}),[w,E,R,O,s])}const s3=v.createContext(void 0);function Ip(){return v.useContext(s3)?.direction??"ltr"}const a3=e=>({name:"arrow",options:e,async fn(t){const{x:i,y:s,placement:o,rects:u,platform:c,elements:d,middlewareData:f}=t,{element:g,padding:y=0}=La(e,t)||{};if(g==null)return{};const p=YR(y),x={x:i,y:s},S=Cv(o),w=Rv(S),C=await c.getDimensions(g),E=S==="y",R=E?"top":"left",O=E?"bottom":"right",A=E?"clientHeight":"clientWidth",M=u.reference[w]+u.reference[S]-x[S]-u.floating[w],N=x[S]-u.reference[S],j=d.floating[A]||u.floating[w],D=M/2-N/2,k=j/2-C[w]/2-1,_=Math.min(p[R],k),L=Math.min(p[O],k),q=_,X=j-C[w]-L,B=j/2-C[w]/2+D,H=qR(q,B,X),U=!f.arrow&&gs(o)!=null&&B!==H&&u.reference[w]/2-(B<q?_:L)-C[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}}}),o3=(e,t)=>{const{name:i,fn:s}=a3(e);return{name:i,fn:s,options:[e,t]}},l3={name:"hide",async fn(e){const{width:t,height:i,x:s,y:o}=e.rects.reference,u=t===0&&i===0&&s===0&&o===0,c=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:c.top-i>=0||c.right-t>=0||c.bottom-i>=0||c.left-t>=0||u}}}},u3={sideX:"left",sideY:"top"},c3="--available-width",d3="--available-height",f3="--anchor-width",h3="--anchor-height",p3="--transform-origin",_w=c3,Uw=d3;function $C(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 Hw(e,t,i){const{rects:s,placement:o}=e;return{side:$C(t,pi(o),i),align:gs(o)||"center",anchor:{width:s.reference.width,height:s.reference.height},positioner:{width:s.floating.width,height:s.floating.height}}}function Pp(e){return g3(e,i3)}function g3(e,t){const{anchor:i,positionMethod:s="absolute",side:o="bottom",sideOffset:u=0,align:c="center",alignOffset:d=0,collisionBoundary:f,collisionPadding:g=5,sticky:y=!1,arrowPadding:p=5,disableAnchorTracking:x=!1,inline:S,keepMounted:w=!1,floatingRootContext:C,mounted:E,collisionAvoidance:R,shift:O,nodeId:A,adaptiveOrigin:M,lazyFlip:N=!1,externalTree:j}=e,D=R.side||"flip",k=R.align||"flip",_=R.fallbackAxisSide||"end",L=O?.crossAxis??!1,q=O?.rootBoundary,X=typeof i=="function"?i:void 0,B=Fe(X),H=X?B:i,U=Ln(i),z=Ln(E),$=Ip()==="rtl",[K,Y]=v.useState(null);!E&&K!==null&&Y(null);const ee=N==="placement",G=K?pi(K):null,oe=K&&ee?gs(K)||"center":null,I=G||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":$?"left":"right","inline-start":$?"right":"left"}[o],V=oe||c,J=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,ce=o==="left"?Ee:0,Te={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:re},ve=v.useRef(null),Pe=Ln(u),Ae=Ln(d),Le=typeof u!="function"?u:0,Be=typeof d!="function"?d:0,Oe=[];S&&Oe.push(S),Oe.push(FI(je=>{const st=Hw(je,o,$),Ie=typeof Pe.current=="function"?Pe.current(st):Pe.current,ze=typeof Ae.current=="function"?Ae.current(st):Ae.current;return{mainAxis:Ie,crossAxis:ze,alignmentAxis:ze}},[Le,Be,$,o]));const Ue=k==="none"&&D!=="shift",be=!Ue&&(y||L||D==="shift"),He=D==="none"?null:KI({...Te,padding:{top:re.top+Ee+le,right:re.right+Ee+ce,bottom:re.bottom+Ee+me,left:re.left+Ee+ge},mainAxis:!L&&D==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:_}),Ze=Ue?null:BI({...Te,rootBoundary:q,mainAxis:k!=="none",crossAxis:be,limiter:y||L?void 0:VI(je=>{if(!ve.current)return{};const{width:st,height:Ie}=ve.current.getBoundingClientRect(),ze=Ni(pi(je.placement)),$e=ze==="y"?st:Ie,et=ze==="y"?re.left+re.right:re.top+re.bottom;return{offset:$e/2+et/2}})},[Te,y,L,q,re,k]);D==="shift"||k==="shift"||V==="center"?Oe.push(Ze,He):Oe.push(He,Ze),Oe.push(qI({...Te,apply({elements:{floating:je},availableWidth:st,availableHeight:Ie,rects:ze}){if(!z.current)return;const $e=je.style;$e.setProperty(_w,`${st}px`),$e.setProperty(Uw,`${Ie}px`);const et=Rn(je).devicePixelRatio||1,{x:Tt,y:F,width:W,height:ne}=ze.reference,ye=(Math.round((Tt+W)*et)-Math.round(Tt*et))/et,xe=(Math.round((F+ne)*et)-Math.round(F*et))/et;$e.setProperty(f3,`${ye}px`),$e.setProperty(h3,`${xe}px`)}}),o3(je=>({element:ve.current||$t(je.elements.floating).createElement("div"),padding:ve.current?p:0}),[p]),{name:"transformOrigin",fn(je){const{elements:{floating:st},middlewareData:Ie,placement:ze,platform:$e,rects:et,y:Tt}=je,F=pi(ze),W=gs(ze),ne=Ni(F)==="y",ye=ve.current,xe=typeof u=="function"?u(Hw(je,o,$)):u;let Ke;if(!ye&&W&&Math.abs(ne?Ie.shift?.x||0:Ie.shift?.y||0)<=1)Ke=W==="start"===(ne&&$e.isRTL?.(st)===!0)?"100%":"0%";else{const Xe=ne?Ie.arrow?.x||0:Ie.arrow?.y||0,Qe=ne?ye?.clientWidth||0:ye?.clientHeight||0;Ke=`${Xe+Qe/2}px`}let Ve=F==="top"||F==="left"?`calc(100% + ${xe}px)`:`${-xe}px`;return be&&ne&&Math.abs(Ie.shift?.y||0)>xe&&(Ve=`${et.reference.y+et.reference.height/2-Tt}px`),st.style.setProperty(p3,ne?`${Ke} ${Ve}`:`${Ve} ${Ke}`),{}}},l3,M),_e(()=>{!E&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[E,C]);const at=v.useMemo(()=>({ancestorScroll:!x,elementResize:!x&&typeof ResizeObserver<"u",layoutShift:!x&&typeof IntersectionObserver<"u"}),[x]),{refs:de,elements:we,x:Ge,y:ke,middlewareData:De,update:vt,placement:ct,context:pt,isPositioned:kt,floatingStyles:jt}=t({rootContext:C,open:w?E:void 0,placement:J,middleware:Oe,strategy:s,whileElementsMounted:w?void 0:(...je)=>Iw(...je,at),nodeId:A,externalTree:j}),{sideX:en,sideY:sn}=De.adaptiveOrigin||u3,tn=kt?s:"fixed",Je=v.useMemo(()=>{let je;return kt?M?je={position:tn,[en]:Ge,[sn]:ke}:je={...jt,position:tn}:je={position:tn,top:0,left:0},je[_w]="100vw",je[Uw]="100vh",kt||(je.opacity=0),je},[M,tn,en,Ge,sn,ke,jt,kt]),St=v.useRef(null);_e(()=>{if(!E)return;const je=U.current,st=typeof je=="function"?je():je,ze=(Fw(st)?st.current:st)||null||null;ze!==St.current&&(de.setPositionReference(ze),St.current=ze)},[E,de,H,U]),v.useEffect(()=>{if(!E)return;const je=U.current;typeof je!="function"&&Fw(je)&&je.current!==St.current&&(de.setPositionReference(je.current),St.current=je.current)},[E,de,H,U]),v.useEffect(()=>{if(w&&E&&we.reference&&we.floating)return Iw(we.reference,we.floating,vt,at)},[w,E,we,vt,at]);const Xt=pi(ct),ft=$C(o,Xt,$),bt=gs(ct)||"center",mt=!!De.hide?.referenceHidden;_e(()=>{N&&E&&kt&&(Xt!==I||ee&&bt!==V)&&Y(ct)},[N,ee,E,kt,ct,Xt,bt,I,V]);const Ut=v.useMemo(()=>({position:"absolute",top:De.arrow?.y,left:De.arrow?.x}),[De.arrow]),cn=De.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:Je,arrowStyles:Ut,arrowRef:ve,arrowUncentered:cn,side:ft,align:bt,physicalSide:Xt,anchorHidden:mt,refs:de,context:pt,isPositioned:kt,update:vt}),[Je,Ut,ve,cn,ft,bt,Xt,mt,de,pt,kt,vt])}function Fw(e){return e!=null&&"current"in e}function rd(e){return e==="starting"?D4:Qt}function Lp(e,t,{styles:i,transitionStatus:s,props:o,refs:u,hidden:c,inert:d=!1}){const f={...i};return d&&(f.pointerEvents="none"),At("div",e,{state:t,ref:u,props:[{role:"presentation",hidden:c,style:f},rd(s),o],stateAttributesMapping:Qc})}const m3=v.forwardRef(function(t,i){const{render:s,className:o,anchor:u,positionMethod:c="absolute",side:d="top",align:f="center",sideOffset:g=0,alignOffset:y=0,collisionBoundary:p="clipping-ancestors",collisionPadding:x=5,arrowPadding:S=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:E=kv,style:R,...O}=t,A=Gc(),M=t3(),N=A.useState("open"),j=A.useState("mounted"),D=A.useState("trackCursorAxis"),k=A.useState("disableHoverablePopup"),_=A.useState("floatingRootContext"),L=A.useState("instantType"),q=A.useState("transitionStatus"),X=A.useState("adaptiveOrigin"),B=Pp({anchor:u,positionMethod:c,floatingRootContext:_,mounted:j,side:d,sideOffset:g,align:f,alignOffset:y,collisionBoundary:p,collisionPadding:x,sticky:w,arrowPadding:S,disableAnchorTracking:C,keepMounted:M,collisionAvoidance:E,adaptiveOrigin:X}),H=v.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=Lp(t,H,{styles:B.positionerStyles,transitionStatus:q,props:O,refs:[i,A.useStateSetter("positionerElement")],hidden:!j,inert:!N||D==="both"||k});return b.jsx(YC.Provider,{value:B,children:U})}),y3=v.forwardRef(function(t,i){const{render:s,className:o,style:u,...c}=t,d=Gc(),{side:f,align:g}=GC(),y=d.useState("open"),p=d.useState("instantType"),x=d.useState("transitionStatus"),S=d.useState("popupProps"),w=d.useState("floatingRootContext"),C=d.useState("disabled"),E=d.useState("closeDelay");Ii({open:y,ref:d.context.popupRef,onComplete(){y&&d.context.onOpenChangeComplete?.(!0)}}),Hv(w,{enabled:!C,closeDelay:E});const R=d.useStateSetter("popupElement");return At("div",t,{state:{open:y,side:f,align:g,instant:p,transitionStatus:x},ref:[i,d.context.popupRef,R],props:[td,S,rd(x),c],stateAttributesMapping:gp})}),v3=v.forwardRef(function(t,i){const{render:s,className:o,style:u,...c}=t,d=Gc(),{arrowRef:f,side:g,align:y,arrowUncentered:p,arrowStyles:x}=GC(),S=d.useState("open"),w=d.useState("instantType");return At("div",t,{state:{open:S,side:g,align:y,uncentered:p,instant:w},ref:[i,f],props:[{style:x,"aria-hidden":!0},c],stateAttributesMapping:Qc})}),b3=function(t){const{delay:i,closeDelay:s,timeout:o=400}=t,u=v.useMemo(()=>({open:i,close:s}),[i,s]);return b.jsx(KC.Provider,{value:i,children:b.jsx(Kj,{delay:u,timeoutMs:o,children:t.children})})};function zp(e){return Av(19)?e:e?"true":void 0}function x3(e){const[t,i]=v.useState({current:e,previous:null});return Object.is(e,t.current)||i({current:e,previous:t.current}),t.previous}const QC=48,vs=(e,t=0)=>{const i=new Int32Array(e.length);for(let s=0;s<e.length;s++)i[s]=e.charCodeAt(s)-QC-t;return i},_p=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},_a=e=>{const t=new Int32Array(e.length);let i=0;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s)-QC;i+=o>>>1^-(o&1),t[s]=i}return t},S3=384,w3=[],Eo=_p(vs("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),E3=_p(vs(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),R3="@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",C3=(()=>{const e=Eo.length-1,t=new Int32Array(e);for(let o=e-1;o>=0;o--){let u=1,c=o+1;for(let d=Eo[o];d<Eo[o+1];d++)u+=t[c],c+=t[c];t[o]=u}const i=new Int32Array(Eo[e]);let s=0;for(let o=0;o<e;o++){let u=o+1;for(let c=Eo[o];c<Eo[o+1];c++)i[s++]=u,u+=t[u]}return i})(),T3=vs("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),O3=_p(vs("123333359346463635126536711576")),A3=vs("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),M3=vs("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),k3=_a("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),N3=(()=>{const e=new Int32Array(319).fill(-1),t=_a("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),i=_a("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let s=0;s<t.length;s++)e[t[s]]=i[s];return e})(),D3="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}),Bw=_a("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),j3=_a("ɠ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"),I3=_a("02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}€22ƒ†…:22z22222222222G000q†OVI00000{˜2™<40000Œ›@00000G¦§000ª00000000000000021K¬«00®“000000000000000000000–222›HGH_1¸222½2¾2222ÇÊ000­°2±"),XC=new Int32Array(987),ZC=new Int32Array(987),WC=new Int32Array(987);let ky="";const Ny=new Int32Array(1022);{const e=new Map;let t=0,i=0;for(let s=0;s<Bw.length;s++)for(const o of D3[I3[s]]){let u=e.get(o);u===void 0&&(u=t++,e.set(o,u),Ny[u*2]=ky.length,Ny[u*2+1]=o.length,ky+=o),XC[i]=Bw[s],ZC[i]=j3[s],WC[i]=u,i++}}const P3=_a("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),L3=_p(vs("1::24444432:442:44:44>222222:44:4421322511111311111114")),z3=_a("2Š4A;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"),_3=vs("ij"),U3=vs("—"),H3=vs("1"),F3="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var B3={GROUP_COUNT:S3,customValidatorNames:w3,edgeStart:Eo,labelStart:E3,labelText:R3,edgeTarget:C3,nodeGroup:T3,nodeVlist:N3,vlistPat:O3,vlistOps:A3,vlistRef:M3,vlistGroup:k3,litAnchor:XC,litGroup:ZC,litPool:WC,poolOffsets:Ny,poolText:ky,adjGid:P3,adjStart:L3,adjTgt:z3,patGid:_3,patTgt:U3,postfixLookupGroups:H3,orderSensitiveModifiers:F3};const V3="line"in new Error,ls=-1,wo=-1,J0=(e,t,i)=>{let s=2166136261;for(let o=t;o<i;o++)s=Math.imul(s^e.charCodeAt(o),16777619);return s},yh=(e,t,i)=>{const s=i-t;let o=Math.imul(s,2654435761)^e.charCodeAt(t);if(s>3){const u=s>>2,c=s>>1;o=Math.imul(o^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+u),2246822507),o=Math.imul(o^e.charCodeAt(t+c)<<8^e.charCodeAt(t+c+u)<<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},K3=(e,t,i={})=>{const{GROUP_COUNT:s,edgeStart:o,labelStart:u,labelText:c,edgeTarget:d,nodeGroup:f,nodeVlist:g,vlistPat:y,vlistOps:p,vlistRef:x,vlistGroup:S,litAnchor:w,litGroup:C,litPool:E,poolOffsets:R,poolText:O,adjGid:A,adjStart:M,adjTgt:N,patGid:j,patTgt:D,postfixLookupGroups:k,customValidatorNames:_,orderSensitiveModifiers:L}=e,q=new Int32Array(s).fill(-1);for(let he=0;he<A.length;he++)q[A[he]]=he;let X=0;for(let he=0;he+1<M.length;he++){const Me=M[he+1]-M[he];Me>X&&(X=Me)}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]+y[x[he]+1]-y[x[he]];const U=new Uint8Array(s);for(let he=0;he<k.length;he++)U[k[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 Me=R[E[he]*2+1];Me>$&&($=Me);const Se=O.charCodeAt(R[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 Me=R[E[he]*2];let Se=(J0(O,Me,Me+R[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,Me,Se,nt)=>{let Ot=(J0(Me,Se,nt)^Math.imul(he,2654435761)|0)&Y-1;const Et=nt-Se;for(;;){const Ht=ee[Ot];if(Ht===-1)return-1;if(w[Ht]===he&&R[E[Ht]*2+1]===Et){const xn=R[E[Ht]*2];let hn=!0;for(let yt=0;yt<Et;yt++)if(O.charCodeAt(xn+yt)!==Me.charCodeAt(Se+yt)){hn=!1;break}if(hn)return C[Ht]}Ot=Ot+1&Y-1}},oe=i.cacheSize??8192,I=i.prefix??e.prefix??"",V=I===""?"":I+":",J=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 ce=0,Te=-1,ve=-1,Pe=-1,Ae=-1;const Le=he=>he>=97&&he<=122||he>=65&&he<=90||he>=48&&he<=57||he===95,Be=he=>/\s/.test(String.fromCharCode(he)),Oe=(he,Me,Se)=>{if(ce=0,Te=-1,Se-Me<3)return;const nt=he.charCodeAt(Me),Ot=he.charCodeAt(Se-1);if(nt===91&&Ot===93)ce=1;else if(nt===40&&Ot===41)ce=2;else return;Pe=Me+1,Ae=Se-1;let Et=Me+1;if(Le(he.charCodeAt(Et))){for(Et++;Et<Se-1;){const Ht=he.charCodeAt(Et);if(!Le(Ht)&&Ht!==45)break;Et++}Et<Se-2&&he.charCodeAt(Et)===58&&(Te=Me+1,ve=Et,Pe=Et+1)}},Ue=(he,Me,Se,nt)=>{if(Se-Me!==nt.length)return!1;for(let Ot=0;Ot<nt.length;Ot++)if(he.charCodeAt(Me+Ot)!==nt.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)),at=(he,Me,Se)=>{if(Se-Me<11||!Ue(he,Me,Me+10,"@container"))return!1;if(he.charCodeAt(Me+10)===47)return Se-Me>=12;const nt=he.charCodeAt(Me+11);return nt===115&&Se-Me>=17&&Ue(he,Me+10,Me+16,"-size/")||nt===110&&Se-Me>=19&&Ue(he,Me+10,Me+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],ke=(he,Me,Se,nt)=>{if(he>=10){if(he>=25)return re[he-25](Me.slice(Se,nt));const Ot=he-10;if(ce!==de[Ot])return!1;if(Te>=0){for(const Et of we[Ot])if(Ue(Me,Te,ve,Et))return!0;return!1}switch(Ge[Ot]){case 0:return!1;case 1:return!0;case 2:{const Et=Me.slice(Pe,Ae);return Ee.test(Et)&&!le.test(Et)}case 3:return Ze(Me.slice(Pe,Ae));case 4:return ge.test(Me.slice(Pe,Ae));default:return me.test(Me.slice(Pe,Ae))}}switch(he){case 0:return!0;case 1:return ce===0;case 2:return ce===1;case 3:return ce===2;case 4:return be.test(Me.slice(Se,nt));case 5:return Ze(Me.slice(Se,nt));case 6:{const Ot=Me.slice(Se,nt);return!!Ot&&Number.isInteger(Number(Ot))}case 7:return nt>Se&&Me.charCodeAt(nt-1)===37&&Ze(Me.slice(Se,nt-1));case 8:return He.test(Me.slice(Se,nt));default:return at(Me,Se,nt)}},De=new Set(typeof L=="string"?L.split(" "):L),vt=(he,Me,Se,nt,Ot,Et)=>{const Ht=J0(Me,Se,nt)^(Ot?2654435769:0)|0;let xn=he.get(Ht);if(xn!==void 0)e:for(let Dt=0;Dt<xn.length;Dt++){const an=xn[Dt];if(!(an.imp!==Ot||an.k.length!==nt-Se)){for(let gt=0;gt<an.k.length;gt++)if(an.k.charCodeAt(gt)!==Me.charCodeAt(Se+gt))continue e;return an.id}}else he.set(Ht,xn=[]);const hn=Me.slice(Se,nt),yt=Et(hn);return xn.push({k:hn,imp:Ot,id:yt}),yt};let ct=new Map,pt=new Map,kt=2;const jt=4096,en=(he,Me)=>{const Se=[];let nt=0,Ot=0,Et=0;for(let yt=0;yt<he.length;yt++){const Dt=he.charCodeAt(yt);nt===0&&Ot===0&&Dt===58?(Se.push(he.slice(Et,yt)),Et=yt+1):Dt===91?nt++:Dt===93?nt--:Dt===40?Ot++:Dt===41&&Ot--}Se.push(he.slice(Et));let Ht=Se[0];if(Se.length>1){const yt=[];let Dt=[];for(const an of Se)an.charCodeAt(0)===91||De.has(an)?(Dt.length&&(yt.push(...Dt.sort()),Dt=[]),yt.push(an)):Dt.push(an);Dt.length&&yt.push(...Dt.sort()),Ht=yt.join(":")}const xn=Me?Ht+" !":Ht;let hn=pt.get(xn);return hn===void 0&&pt.set(xn,hn=kt++),hn};let sn=new Map,tn=s;const Je=s+4096,St=()=>tn++,Xt=2097152,ft=8192,bt=new Int32Array(ft),mt=new Array(ft).fill(null),Ut=new Int32Array(ft),cn=new Int32Array(ft),je=new Uint8Array(ft);let st=0;const Ie=(he,Me,Se,nt,Ot,Et,Ht,xn)=>{let hn=he;if(mt[he]!==null)if(mt[he|1]===null)hn=he|1;else if((st++&3)===0)hn=he|st>>2&1;else return;mt[hn]=Me.slice(Se,nt),bt[hn]=Ot,Ut[hn]=Et,cn[hn]=Ht,je[hn]=xn},ze=()=>mt.fill(null);let $e=256,et=[new Int32Array($e),new Int32Array($e),new Int32Array($e),new Int32Array($e)],[Tt,F,W,ne]=et,ye=new Uint8Array($e),xe=new Uint8Array($e);const Ke=()=>{$e*=2,et=et.map(Me=>{const Se=new Int32Array($e);return Se.set(Me),Se}),[Tt,F,W,ne]=et;const he=new Uint8Array($e);he.set(ye),ye=he,xe=new Uint8Array($e)};let Ve=64,Xe=new Int32Array(Ve),Qe=new Int32Array(Ve);const ot=new Int32Array(s);let tt=2048,wt=21,dt=new Float64Array(tt),Kt=new Int32Array(tt),Ft=0;const An=(he,Me)=>{if(he===0&&Me<s)return ot[Me]===Ft?1:(ot[Me]=Ft,0);const Se=he*2097152+Me+1;let nt=Math.imul(Se,2654435761)>>>wt;for(;Kt[nt]===Ft;){if(dt[nt]===Se)return 1;nt=nt+1&tt-1}return dt[nt]=Se,Kt[nt]=Ft,0},qt=(he,Me,Se,nt,Ot)=>{if(Se-Me>=2&&he.charCodeAt(Me)===91&&he.charCodeAt(Se-1)===93){let Et=-1;for(let Ht=Me+1;Ht<Se-1;Ht++)if(he.charCodeAt(Ht)===58){Et=Ht;break}return Et===-1||Et===Me+1?ls:vt(sn,he,Me+1,Et,0,St)}if(nt>=0&&f[nt]>=0)return f[nt];for(let Et=Ot-1;Et>=0;Et--){const Ht=Qe[Et];if(Ht>Se)continue;const xn=Xe[Et],hn=Se-Ht;if(Q[xn]===1&&hn>0&&hn<=$){const zn=he.charCodeAt(Ht);if(K===!1||zn!==91&&zn!==40){const ni=G(xn,he,Ht,Se);if(ni>=0)return ni}}const yt=g[xn];if(yt<0)continue;const Dt=x[yt],an=y[Dt],gt=y[Dt+1];if(an===gt)continue;Oe(he,Ht,Se);const nr=H[yt]-an;for(let zn=an;zn<gt;zn++)if(ke(p[zn],he,Ht,Se))return S[nr+zn]}return ls},Bt=he=>{const Me=he.length;let Se=0,nt=0,Ot=!1;(kt>jt||ct.size>jt)&&(ct=new Map,pt=new Map,kt=2,ze()),tn>Je&&(sn=new Map,tn=s,ze());let Et=0;for(;Et<Me;){let yt=he.charCodeAt(Et);if(yt===32||yt>=9&&yt<=13||yt>=160&&Be(yt)){yt!==32&&(Ot=!0),Et++;continue}const Dt=Et;let an=0;for(;Et<Me;){if(yt=he.charCodeAt(Et),yt<=32){if(yt===32)break;if(yt>=9&&yt<=13){Ot=!0;break}}else if(yt>=160&&Be(yt)){Ot=!0;break}an=Math.imul(an^yt,16777619),Et++}const gt=Et,nr=gt-Dt;Se===$e&&Ke();const zn=Se++;Tt[zn]=Dt,F[zn]=gt,nt+=nr,an^=Math.imul(nr,2654435761);const ni=an^an>>>15|0,Gn=ni&8190;{let nn=-1;if(bt[Gn]===ni&&mt[Gn]!==null&&mt[Gn].length===nr?nn=Gn:bt[Gn|1]===ni&&mt[Gn|1]!==null&&mt[Gn|1].length===nr&&(nn=Gn|1),nn>=0){const sr=mt[nn];let bi=!0;for(let si=0;si<nr;si++)if(sr.charCodeAt(si)!==he.charCodeAt(Dt+si)){bi=!1;break}if(bi){W[zn]=Ut[nn],ne[zn]=cn[nn],ye[zn]=je[nn];continue}}}let $n=Dt;if(J!==0){if(gt-Dt<=J||!he.startsWith(V,Dt)){W[zn]=ls,Ie(Gn,he,Dt,gt,ni,ls,0,0);continue}$n=Dt+J}let Vo=0,yu=0,ws=-1,Ko=-1;for(let nn=$n;nn<gt;nn++){const sr=he.charCodeAt(nn);if(Vo===0&&yu===0){if(sr===58){ws=nn;continue}if(sr===47){Ko=nn;continue}}sr===91?Vo++:sr===93?Vo--:sr===40?yu++:sr===41&&yu--}const Sd=ws>=$n?ws+1:$n;let Dn=Sd,Rr=gt,Js=!1,qo=0;Rr>Dn&&he.charCodeAt(Rr-1)===33?(Js=!0,Rr--):Rr>Dn&&he.charCodeAt(Dn)===33&&(Js=!0,Dn++,qo=1);let Vr=-1;Ko>Sd&&(Vr=Ko+qo,Vr>=Rr&&(Vr=-1));let Yo=Dn;Rr-Dn>1&&he.charCodeAt(Dn)===45&&(Yo=Dn+1);let ri=0,jr=0,ea=0,vu=-1,ii=0;(g[0]>=0||Q[0]===1)&&(Xe[0]=0,Qe[0]=Yo,ii=1);let Qa=wo,bu=0;for(let nn=Yo;nn<Rr;nn++)if(nn===Vr&&(Qa=jr<ea?wo:ri,bu=ii),ri!==wo){const sr=he.charCodeAt(nn);let bi=-1;if(jr<ea)c.charCodeAt(jr)===sr?(jr++,jr===ea&&(bi=ri=vu)):ri=wo;else{const si=o[ri],Wa=o[ri+1];let Es=wo;for(let gr=si;gr<Wa;gr++){const Ja=u[gr];if(c.charCodeAt(Ja)===sr){u[gr+1]-Ja===1?bi=Es=d[gr]:(jr=Ja+1,ea=u[gr+1],vu=d[gr],Es=ri);break}}ri=Es}if(bi>=0&&(g[bi]>=0||Q[bi]===1)&&nn+1<Rr&&he.charCodeAt(nn+1)===45){if(ii===Ve){Ve*=2;const si=new Int32Array(Ve);si.set(Xe),Xe=si;const Wa=new Int32Array(Ve);Wa.set(Qe),Qe=Wa}Xe[ii]=bi,Qe[ii]=nn+2,ii++}}Vr===Rr&&(Qa=jr<ea?wo:ri,bu=ii);const xu=jr<ea?wo:ri;let pr,Ir=!1;if(Vr>=0)if(Ir=!0,pr=qt(he,Dn,Vr,Qa,bu),pr!==ls&&pr<s&&U[pr]){const nn=qt(he,Dn,Rr,xu,ii);nn!==ls&&nn!==pr&&(pr=nn,Ir=!1)}else pr===ls&&(pr=qt(he,Dn,Rr,xu,ii),Ir=!1);else pr=qt(he,Dn,Rr,xu,ii);let Xa=0,Za=0;pr===ls?W[zn]=ls:(Za=Ir?1:0,Xa=$n>=ws?Js?1:0:vt(ct,he,$n,ws,Js?1:0,nn=>en(nn,Js)),W[zn]=pr,ye[zn]=Za,ne[zn]=Xa),Ie(Gn,he,Dt,gt,ni,pr,Xa,Za)}if(Se===0)return"";if(Se===1)return Tt[0]===0&&F[0]===Me?he:he.slice(Tt[0],F[0]);if(Se*B>tt){for(;Se*B>tt;)tt<<=1,wt--;dt=new Float64Array(tt),Kt=new Int32Array(tt)}if(kt>=Xt||tn>=Xt)throw new Error("cn: too many distinct classes in one merge");Ft=Ft+1|0,Ft===0&&(ot.fill(0),Kt.fill(0),Ft=1);let Ht=!1;for(let yt=Se-1;yt>=0;yt--){const Dt=W[yt];if(Dt===ls){xe[yt]=1;continue}const an=ne[yt];if(An(an,Dt)===1){xe[yt]=0,Ht=!0;continue}if(xe[yt]=1,Dt<s){const gt=q[Dt];if(gt>=0)for(let nr=M[gt];nr<M[gt+1];nr++)An(an,N[nr]);if(ye[yt]&1)for(let nr=0;nr<j.length;nr++)j[nr]===Dt&&An(an,D[nr])}}if(!Ht&&!Ot&&Me===nt+Se-1)return he;let xn="",hn=0;for(;hn<Se;){if(!xe[hn]){hn++;continue}const yt=Tt[hn];let Dt=F[hn],an=hn+1;for(;an<Se&&xe[an]&&Tt[an]===Dt+1&&he.charCodeAt(Dt)===32;)Dt=F[an],an++;xn.length>0&&(xn+=" "),xn+=he.slice(yt,Dt),hn=an}return xn},Cn=16384,Tn=new Int32Array(Cn*2);let ei=0,dn=1,fn=Object.create(null),Mn=Object.create(null),jn=new Map,Ss=new Map,Dr=0,zi=0;const ti=()=>{ei^=Cn,dn=dn+1|0,zi=0},vi=he=>{let Me=fn[he];if(Me!==void 0)return Me;const Se=yh(he,0,he.length),nt=(Se&16383)+ei,Ot=Tn[nt]===(Se^dn)||Tn[nt^Cn]===(Se^dn-1);return Ot&&(Me=Mn[he],Me!==void 0)?(fn[he]=Me,Me):(Me=Bt(he),Ot?(fn[he]=Me,++Dr>oe&&(Dr=0,Mn=fn,fn=Object.create(null),ti())):(Tn[nt]=Se^dn,++zi>Cn&&ti()),Me)},zt=he=>{let Me=jn.get(he);if(Me!==void 0)return Me;const Se=yh(he,0,he.length),nt=(Se&16383)+ei,Ot=Tn[nt]===(Se^dn)||Tn[nt^Cn]===(Se^dn-1);return Ot&&(Me=Ss.get(he),Me!==void 0)?(jn.set(he,Me),Me):(Me=Bt(he),Ot?(jn.set(he,Me),++Dr>oe&&(Dr=0,Ss=jn,jn=new Map,ti())):(Tn[nt]=Se^dn,++zi>Cn&&ti()),Me)},qn=he=>{const Me=yh(he,0,he.length),Se=(Me&16383)+ei;return Tn[Se]===(Me^dn)||Tn[Se^Cn]===(Me^dn-1)?!0:(Tn[Se]=Me^dn,++zi>Cn&&ti(),!1)},Fn=oe===0?Bt:V3?he=>{const Me=jn.get(he);return Me!==void 0?Me:zt(he)}:vi;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?Fn(arguments[0]):Fn(Y3.apply(null,arguments))},mergeString:Fn,seenBefore:oe===0?()=>!1:qn,mergeUncached:Bt}},Bh=(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 u=s[o];if(!u)continue;const c=typeof u=="string"?u:Bh(u,t);c&&(i&&(i+=" "),i+=c)}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},q3=(e,t)=>{let i="";for(let s=0;s<e.length;s++){const o=e[s];if(!o)continue;const u=typeof o=="string"?o:Bh(o,t);u&&(i&&(i+=" "),i+=u)}return i},Y3=function(){return q3(arguments,!1)},G3=256,Vw=16,$3=1024,ey=4096,Q3=(e,t)=>{const i=t===void 0?()=>!0:t.seenBefore,s=t===void 0?e:t.mergeUncached;let o=new Map,u=new Map,c=0,d=null,f=null,g=[],y=[],p=0;const x=(R,O,A)=>{f===null&&(f=new Array(ey).fill(""),g=new Array(ey).fill(""),y=new Array(ey).fill(""));const M=yh(R,0,R.length)&4094;if(f[M]===R&&g[M]===O)return y[M];if(f[M|1]===R&&g[M|1]===O)return y[M|1];const N=e(A?O+" "+R:R),j=f[M]===""?M:M|(f[M|1]===""?1:p++&1);return f[j]=R,g[j]=O,y[j]=N,N},S=(R,O,A,M)=>{let N=0;if(O){if(O!==R.a0)return!1;N=1}if(A){if(A!==(N===0?R.a0:R.a1))return!1;N++}if(M){if(M!==(N===0?R.a0:N===1?R.a1:R.a2))return!1;N++}return N===R.t},w=(R,O)=>{const A=R.a;let M=0;for(let N=0;N<O.length;N++){const j=O[N];if(j){if(j!==A[M])return!1;M++}}return M===R.t},C=(R,O)=>{const A=R.length,M=d===null?null:d.n;if(!O){if(M!==null&&w(M,R))return d=M,M.r;if(d!==null&&d!==M&&w(d,R))return d.r}let N="",j=-1,D=0,k=!1;for(let q=0;q<A;q++){let X=R[q];if(X){if(typeof X!="string"){if(X=R[q]=Bh(X,!0),!X)continue;k=!0}j<0&&(N=X,j=q),D++}}if(D===0)return"";if(D===1)return e(N);if(k){if(M!==null&&w(M,R))return d=M,M.r;if(d!==null&&d!==M&&w(d,R))return d.r}let _=o.get(N);_===void 0&&(_=u.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<A;B++){const H=R[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<A;z++){const Q=R[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<A;H++){const U=R[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>Vw&&(_.miss=Vw,_.skip=$3,_.e.length=0,_.at=0);const B=_.e;B.length<G3?B.push(L):(B[_.at]=L,_.at=_.at+1&255),++c>1e3&&(c=0,u=o,o=new Map)}return d!==null&&d!==L&&(d.n=L),d=L,L.r},E=R=>Array.isArray(R)?C(R.slice(),!1):e(Bh(R,!0));return function(R,O,A){const M=arguments.length;if((M|1)===3){const D=d;if(D!==null){const k=D.n;if(k!==null&&S(k,R,O,A))return d=k,k.r;if(D!==k&&S(D,R,O,A))return D.r}if(M===2&&typeof O=="string"&&O!==""){const k=o.get(R);if(k!==void 0&&k.skip>0)return k.skip--,d=null,x(O,R,!0)}return C([R,O,A],!0)}if(M===1)return typeof R=="string"?e(R):E(R);const N=d;if(N!==null){const D=N.n;if(D!==null){const k=D.a;let _=0,L=!0;for(let q=0;q<M;q++){const X=arguments[q];if(X){if(X!==k[_]){L=!1;break}_++}}if(L&&_===D.t)return d=D,D.r}if(N!==D){const k=N.a;let _=0,L=!0;for(let q=0;q<M;q++){const X=arguments[q];if(X){if(X!==k[_]){L=!1;break}_++}}if(L&&_===N.t)return N.r}}const j=[];for(let D=0;D<M;D++)j.push(arguments[D]);return C(j,!0)}},Kw=K3(B3),Ye=Q3(Kw.mergeString,Kw);function X3({delay:e=0,...t}){return b.jsx(b3,{"data-slot":"tooltip-provider",delay:e,...t})}function Vh({...e}){return b.jsx(XI,{"data-slot":"tooltip",...e})}function Kh({...e}){return b.jsx(e3,{"data-slot":"tooltip-trigger",...e})}function qh({className:e,side:t="top",sideOffset:i=4,align:s="center",alignOffset:o=0,children:u,...c}){return b.jsx(r3,{children:b.jsx(m3,{align:s,alignOffset:o,side:t,sideOffset:i,className:"isolate z-50",children:b.jsxs(y3,{"data-slot":"tooltip-content",className:Ye("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c,children:[u,b.jsx(v3,{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 Z3=(e,t,i,s,o,u,c,d)=>{let f=document.documentElement,g=["light","dark"];function y(S){(Array.isArray(e)?e:[e]).forEach(w=>{let C=w==="class",E=C&&u?o.map(R=>u[R]||R):o;C?(f.classList.remove(...E),f.classList.add(u&&u[S]?u[S]:S)):f.setAttribute(w,S)}),p(S)}function p(S){d&&g.includes(S)&&(f.style.colorScheme=S)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)y(s);else try{let S=localStorage.getItem(t)||i,w=c&&S==="system"?x():S;y(w)}catch{}},W3=v.createContext(void 0),J3={setTheme:e=>{},themes:[]},eP=()=>{var e;return(e=v.useContext(W3))!=null?e:J3};v.memo(({forcedTheme:e,storageKey:t,attribute:i,enableSystem:s,enableColorScheme:o,defaultTheme:u,value:c,themes:d,nonce:f,scriptProps:g})=>{let y=JSON.stringify([i,t,u,e,d,c,s,o]).slice(1,-1);return v.createElement("script",{...g,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${Z3.toString()})(${y})`}})});function tP(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 nP=e=>{switch(e){case"success":return sP;case"info":return oP;case"warning":return aP;case"error":return lP;default:return null}},rP=Array(12).fill(0),iP=({visible:e,className:t})=>Ne.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},Ne.createElement("div",{className:"sonner-spinner"},rP.map((i,s)=>Ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),sP=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"})),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:"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"})),lP=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"})),uP=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"})),cP=()=>{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 dP=1;const fP=100,qw=e=>{var t;return typeof e?.id=="number"||(e==null||(t=e.id)==null?void 0:t.length)>0?e.id:dP++};class hP{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-fP;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=qw(t),u=this.pendingDismissals.get(o);u!==void 0&&(cancelAnimationFrame(u),this.pendingDismissals.delete(o),this.dismissedToasts.delete(o));const c=this.dismissedToasts.has(o),d=t.dismissible===void 0?!0:t.dismissible;return c&&(this.dismissedToasts.delete(o),this.toasts=this.toasts.filter(g=>g.id!==o)),(c?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 u=s!==void 0,c;const d=o.then(async g=>{if(c=["resolve",g],Ne.isValidElement(g))u=!1,this.create({id:s,type:"default",message:g});else if(gP(g)&&!g.ok){u=!1;const p=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 p=="object"&&!Ne.isValidElement(p)?p:{message:p};this.create({id:s,type:"error",description:x,...w})}else if(g instanceof Error){u=!1;const p=typeof i.error=="function"?await i.error(g):i.error,x=typeof i.description=="function"?await i.description(g):i.description,w=typeof p=="object"&&!Ne.isValidElement(p)?p:{message:p};this.create({id:s,type:"error",description:x,...w})}else if(i.success!==void 0){u=!1;const p=typeof i.success=="function"?await i.success(g):i.success,x=typeof i.description=="function"?await i.description(g):i.description,w=typeof p=="object"&&!Ne.isValidElement(p)?p:{message:p};this.create({id:s,type:"success",description:x,...w})}}).catch(async g=>{if(c=["reject",g],i.error!==void 0){u=!1;const y=typeof i.error=="function"?await i.error(g):i.error,p=typeof i.description=="function"?await i.description(g):i.description,S=typeof y=="object"&&!Ne.isValidElement(y)?y:{message:y};this.create({id:s,type:"error",description:p,...S})}}).finally(()=>{u&&(this.dismiss(s),s=void 0),i.finally==null||i.finally.call(i)}),f=()=>new Promise((g,y)=>d.then(()=>c[0]==="reject"?y(c[1]):g(c[1])).catch(y));return typeof s!="string"&&typeof s!="number"?{unwrap:f}:Object.assign(s,{unwrap:f})},this.custom=(t,i)=>{const s=qw(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 Qr=new hP,pP=(e,t)=>Qr.message(e,t),gP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",mP=pP,yP=()=>Qr.toasts,vP=()=>Qr.getActiveToasts(),ln=Object.assign(mP,{success:Qr.success,info:Qr.info,warning:Qr.warning,error:Qr.error,custom:Qr.custom,message:Qr.message,promise:Qr.promise,dismiss:Qr.dismiss,loading:Qr.loading},{getHistory:yP,getToasts:vP});tP("[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 Xf(e){return e.label!==void 0}const bP=3,xP="24px",SP="16px",Yw=4e3,wP=356,EP=14,RP=45,CP=200;function us(...e){return e.filter(Boolean).join(" ")}function TP(e){const[t,i]=e.split("-"),s=[];return t&&s.push(t),i&&s.push(i),s}const OP=e=>{var t,i,s,o,u,c,d,f,g;const{invert:y,toast:p,unstyled:x,interacting:S,setHeights:w,visibleToasts:C,heights:E,index:R,toasts:O,expanded:A,removeToast:M,defaultRichColors:N,closeButton:j,style:D,cancelButtonStyle:k,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,J]=Ne.useState(!1),[re,Ee]=Ne.useState(!1),[le,me]=Ne.useState(!1),[ge,ce]=Ne.useState(!1),[Te,ve]=Ne.useState(0),[Pe,Ae]=Ne.useState(0),Le=Ne.useRef(p.duration||X||Yw),Be=Ne.useRef(null),Oe=Ne.useRef(null),Ue=R===0,be=R+1<=C,He=p.type,Ze=He??"default",at=p.dismissible!==!1,de=p.className||"",we=p.descriptionClassName||"",Ge=Ne.useMemo(()=>E.findIndex(je=>je.toastId===p.id)||0,[E,p.id]),ke=Ne.useMemo(()=>{var je;return(je=p.closeButton)!=null?je:j},[p.closeButton,j]),De=Ne.useMemo(()=>p.duration||X||Yw,[p.duration,X]),vt=Ne.useRef(0),ct=Ne.useRef(0),pt=Ne.useRef(0),kt=Ne.useRef(null),[jt,en]=B.split("-"),sn=Ne.useMemo(()=>E.reduce((je,st,Ie)=>Ie>=Ge?je:je+st.height,0),[E,Ge]),tn=cP(),Je=Ne.useMemo(()=>{var je;return(je=e.swipeDirections)!=null?je:TP(B)},[e.swipeDirections,B]),St=p.invert||y,Xt=He==="loading";ct.current=Ne.useMemo(()=>Ge*H+sn,[Ge,sn]),Ne.useEffect(()=>{Le.current=De},[De]),Ne.useEffect(()=>{I(!0)},[]),Ne.useEffect(()=>{const je=Oe.current;if(je){const st=je.getBoundingClientRect().height;return Ae(st),w(Ie=>[{toastId:p.id,height:st,position:p.position},...Ie]),()=>w(Ie=>Ie.filter(ze=>ze.toastId!==p.id))}},[w,p.id]),Ne.useLayoutEffect(()=>{if(!oe)return;const je=Oe.current,st=je.style.height;je.style.height="auto";const Ie=je.getBoundingClientRect().height;je.style.height=st,Ae(Ie),w(ze=>ze.find(et=>et.toastId===p.id)?ze.map(et=>et.toastId===p.id?{...et,height:Ie}:et):[{toastId:p.id,height:Ie,position:p.position},...ze])},[oe,p.title,p.description,w,p.id,p.jsx,p.action,p.cancel]);const ft=Ne.useCallback(()=>{J(!0),ve(ct.current),w(je=>je.filter(st=>st.toastId!==p.id)),setTimeout(()=>{M(p)},CP)},[p,M,w,ct]);Ne.useEffect(()=>{if(p.promise&&He==="loading"||p.duration===1/0||p.type==="loading")return;let je;return A||S||tn?(()=>{if(pt.current<vt.current){const ze=new Date().getTime()-vt.current;Le.current=Le.current-ze}pt.current=new Date().getTime()})():Le.current!==1/0&&(vt.current=new Date().getTime(),je=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),ft()},Le.current)),()=>clearTimeout(je)},[A,S,p,He,tn,ft]),Ne.useEffect(()=>{p.delete&&(ft(),p.onDismiss==null||p.onDismiss.call(p,p))},[ft,p.delete]);function bt(){var je;if(Q?.loading){var st;return Ne.createElement("div",{className:us(z?.loader,p==null||(st=p.classNames)==null?void 0:st.loader,"sonner-loader"),"data-visible":He==="loading"},Q.loading)}return Ne.createElement(iP,{className:us(z?.loader,p==null||(je=p.classNames)==null?void 0:je.loader),visible:He==="loading"})}const mt=p.icon||Q?.[He]||nP(He);var Ut,cn;return Ne.createElement("li",{tabIndex:0,ref:Oe,className:us(L,de,z?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,z?.[Ze],p==null||(i=p.classNames)==null?void 0:i[Ze]),"data-sonner-toast":"","data-rich-colors":(Ut=p.richColors)!=null?Ut:N,"data-styled":!(p.jsx||p.unstyled||x),"data-mounted":oe,"data-promise":!!p.promise,"data-swiped":ge,"data-removed":V,"data-visible":be,"data-y-position":jt,"data-x-position":en,"data-index":R,"data-front":Ue,"data-swiping":re,"data-dismissible":at,"data-type":He,"data-invert":St,"data-swipe-out":le,"data-swipe-direction":ee,"data-expanded":!!(A||U&&oe),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":O.length-R,"--offset":`${V?Te:ct.current}px`,"--initial-height":U?"auto":`${Pe}px`,...D,...p.style},onDragEnd:()=>{Ee(!1),Y(null),kt.current=null},onPointerDown:je=>{je.button!==2&&(Xt||!at||(Be.current=new Date,ve(ct.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(Ee(!0),kt.current={x:je.clientX,y:je.clientY})))},onPointerUp:()=>{var je,st,Ie;if(le||!at)return;kt.current=null;const ze=Number(((je=Oe.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$e=Number(((st=Oe.current)==null?void 0:st.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((Ie=Be.current)==null?void 0:Ie.getTime()),Tt=K==="x"?ze:$e,F=Math.abs(Tt)/et;if((K==="x"?Je.includes(ze>0?"right":"left"):Je.includes($e>0?"bottom":"top"))&&(Math.abs(Tt)>=RP||F>.11)){ve(ct.current),p.onDismiss==null||p.onDismiss.call(p,p),G(K==="x"?ze>0?"right":"left":$e>0?"down":"up"),ft(),me(!0);return}else{var ne,ye;(ne=Oe.current)==null||ne.style.setProperty("--swipe-amount-x","0px"),(ye=Oe.current)==null||ye.style.setProperty("--swipe-amount-y","0px")}ce(!1),Ee(!1),Y(null)},onPointerMove:je=>{var st,Ie,ze;if(!kt.current||!at||((st=window.getSelection())==null?void 0:st.toString().length)>0)return;const et=je.clientY-kt.current.y,Tt=je.clientX-kt.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 W=ne=>1/(1.5+Math.abs(ne)/20);if(K==="y"){if(Je.includes("top")||Je.includes("bottom"))if(Je.includes("top")&&et<0||Je.includes("bottom")&&et>0)F.y=et;else{const ne=et*W(et);F.y=Math.abs(ne)<Math.abs(et)?ne:et}}else if(K==="x"&&(Je.includes("left")||Je.includes("right")))if(Je.includes("left")&&Tt<0||Je.includes("right")&&Tt>0)F.x=Tt;else{const ne=Tt*W(Tt);F.x=Math.abs(ne)<Math.abs(Tt)?ne:Tt}(Math.abs(F.x)>0||Math.abs(F.y)>0)&&ce(!0),(Ie=Oe.current)==null||Ie.style.setProperty("--swipe-amount-x",`${F.x}px`),(ze=Oe.current)==null||ze.style.setProperty("--swipe-amount-y",`${F.y}px`)}},ke&&!p.jsx&&He!=="loading"?Ne.createElement("button",{"aria-label":$,"data-disabled":Xt,"data-close-button":!0,onClick:Xt||!at?()=>{}:()=>{ft(),p.onDismiss==null||p.onDismiss.call(p,p)},className:us(z?.closeButton,p==null||(s=p.classNames)==null?void 0:s.closeButton)},(cn=Q?.close)!=null?cn:uP):null,(He||p.icon||p.promise)&&p.icon!==null&&(Q?.[He]!==null||p.icon)?Ne.createElement("div",{"data-icon":"",className:us(z?.icon,p==null||(o=p.classNames)==null?void 0:o.icon)},He==="loading"?p.icon||bt():p.promise?bt():null,He!=="loading"?mt:null):null,Ne.createElement("div",{"data-content":"",className:us(z?.content,p==null||(u=p.classNames)==null?void 0:u.content)},Ne.createElement("div",{"data-title":"",className:us(z?.title,p==null||(c=p.classNames)==null?void 0:c.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?Ne.createElement("div",{"data-description":"",className:us(q,we,z?.description,p==null||(d=p.classNames)==null?void 0:d.description)},typeof p.description=="function"?p.description():p.description):null),Ne.isValidElement(p.cancel)?p.cancel:p.cancel&&Xf(p.cancel)?Ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||k,onClick:je=>{Xf(p.cancel)&&at&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,je),ft())},className:us(z?.cancelButton,p==null||(f=p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,Ne.isValidElement(p.action)?p.action:p.action&&Xf(p.action)?Ne.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||_,onClick:je=>{Xf(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,je),!je.defaultPrevented&&ft())},className:us(z?.actionButton,p==null||(g=p.classNames)==null?void 0:g.actionButton)},p.action.label):null)};function Gw(){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 AP(e,t){const i={};return[e,t].forEach((s,o)=>{const u=o===1,c=u?"--mobile-offset":"--offset",d=u?SP:xP;function f(g){["top","right","bottom","left"].forEach(y=>{i[`${c}-${y}`]=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[`${c}-${g}`]=d:i[`${c}-${g}`]=typeof s[g]=="number"?`${s[g]}px`:s[g]}):f(d)}),i}const MP=Ne.forwardRef(function(t,i){const{id:s,invert:o,position:u="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:f,className:g,offset:y,mobileOffset:p,theme:x="light",richColors:S,duration:w,style:C,visibleToasts:E=bP,toastOptions:R,dir:O=Gw(),gap:A=EP,icons:M,customAriaLabel:N,containerAriaLabel:j="Notifications"}=t,[D,k]=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([u].concat(_.filter(I=>I.position).map(I=>I.position)))),[_,u]),[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=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=Ne.useRef(null),G=Ne.useRef(!1),oe=Ne.useCallback(I=>{k(V=>{var J;return(J=V.find(re=>re.id===I.id))!=null&&J.delete||Qr.dismiss(I.id),V.filter(({id:re})=>re!==I.id)})},[]);return Ne.useEffect(()=>Qr.subscribe(I=>{if(I.dismiss){requestAnimationFrame(()=>{k(V=>V.map(J=>J.id===I.id?{...J,delete:!0}:J))});return}setTimeout(()=>{y4.flushSync(()=>{k(V=>{const J=V.findIndex(re=>re.id===I.id);return J!==-1?[...V.slice(0,J),{...V[J],...I},...V.slice(J+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:J})=>{try{$(J?"dark":"light")}catch(re){console.error(re)}})}},[x]),Ne.useEffect(()=>{D.length<=1&&H(!1)},[D]),Ne.useEffect(()=>{const I=V=>{var J;if(c.length>0&&c.every(le=>V[le]||V.code===le)){var Ee;H(!0),(Ee=K.current)==null||Ee.focus()}V.code==="Escape"&&(document.activeElement===K.current||(J=K.current)!=null&&J.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[c]),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 J;const[re,Ee]=I.split("-");return _.length?Ne.createElement("ol",{key:I,dir:O==="auto"?Gw():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":`${((J=q[0])==null?void 0:J.height)||0}px`,"--width":`${wP}px`,"--gap":`${A}px`,...C,...AP(y,p)},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,ce;return Ne.createElement(OP,{key:le.id,icons:M,index:me,toast:le,defaultRichColors:S,duration:(ge=R?.duration)!=null?ge:w,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:o,visibleToasts:E,closeButton:(ce=R?.closeButton)!=null?ce:f,interacting:U,position:I,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:oe,toasts:_.filter(Te=>Te.position==le.position),heights:q.filter(Te=>Te.position==le.position),setHeights:X,expandByDefault:d,gap:A,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),kP=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join("-").toLowerCase();function NP(e,t,i=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:kP(e),size:24,node:t,...i.length>0?{aliases:i}:{}}}const DP=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},jP=e=>{const t=DP(e);return t.charAt(0).toUpperCase()+t.slice(1)},Dy=(...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(" ")},Al={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 ty(e){return e!=null}function IP(e,t={}){const i=t.attributeNames??{},s=x=>i[x]??x,o=e.size??e.width??Al.width,u=e.size??e.height??Al.height,c=e.aliases?.filter(x=>typeof x=="string"&&x.trim()!=="").map(x=>`lucide-${x}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...c],f=t.className?.split(" ").filter(Boolean)??[],g=t.includeDefaultClasses===!1?Dy(...f):Dy("lucide",...d,...f);let y=t.strokeWidth??Al["stroke-width"];if(t.absoluteStrokeWidth){const x=Number(y)*Number(e.size??e.width??Al.width)/Number(t.size??t.width??Al.width);Number.isFinite(x)&&(y=x)}return["svg",{...Object.entries(Al).reduce((x,[S,w])=>(x[s(S)]=w,x),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&ty(t.size)&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&ty(t.width)&&{[s("width")]:t.width},..."height"in t&&ty(t.height)&&{[s("height")]:t.height},[s("stroke-width")]:y,...g&&{[s("class")]:g},[s("viewBox")]:`0 0 ${o} ${u}`,...t.hasA11yProp===!1?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(x=>{const[S,w,C]=x,E=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...w}:w;return C?[S,E,C]:[S,E]})]}function PP(e,t={}){return IP(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const LP=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},zP=v.createContext({}),_P=()=>v.useContext(zP),UP=v.forwardRef(({color:e,size:t,width:i,height:s,strokeWidth:o,absoluteStrokeWidth:u,nonScalingStroke:c,className:d="",children:f,iconNode:g=[],icon:y={node:g,aliases:[],size:24},...p},x)=>{const{size:S=24,strokeWidth:w=2,absoluteStrokeWidth:C=!1,nonScalingStroke:E=!1,color:R="currentColor",className:O=""}=_P()??{},A=!!f||LP(p),[M,N,j=[]]=PP(y,{color:e??R,width:i??t??S,height:s??t??S,strokeWidth:o??w,absoluteStrokeWidth:u??C,nonScalingStroke:c??E,className:Dy(O,d),hasA11yProp:A,attributes:p});return v.createElement(M,{ref:x,...N},[...j.map(([D,k])=>v.createElement(D,k)),...Array.isArray(f)?f:[f]])});function Nt(e,t=[],i=[]){const s=typeof e=="string"?NP(e,t,i):e,o=v.forwardRef(({className:u,...c},d)=>v.createElement(UP,{ref:d,icon:s,className:u,...c}));return s.name&&(o.displayName=jP(s.name)),o}const JC={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};JC.node;const HP=Nt(JC),eT={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"}]]};eT.node;const tT=Nt(eT),nT={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};nT.node;const Up=Nt(nT),rT={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};rT.node;const Bv=Nt(rT),iT={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};iT.node;const Vv=Nt(iT),sT={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};sT.node;const FP=Nt(sT),aT={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"]};aT.node;const BP=Nt(aT),oT={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"]};oT.node;const VP=Nt(oT),lT={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"}]]};lT.node;const KP=Nt(lT),uT={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"}]]};uT.node;const Kv=Nt(uT),cT={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"]};cT.node;const qv=Nt(cT),dT={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"}]]};dT.node;const qP=Nt(dT),fT={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"}]]};fT.node;const YP=Nt(fT),hT={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"}]]};hT.node;const pT=Nt(hT),gT={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"}]]};gT.node;const mT=Nt(gT),yT={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"}]]};yT.node;const GP=Nt(yT),vT={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"}]]};vT.node;const Yv=Nt(vT),bT={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"}]]};bT.node;const $P=Nt(bT),xT={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"}]]};xT.node;const ST=Nt(xT),wT={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"}]]};wT.node;const QP=Nt(wT),ET={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"}]]};ET.node;const RT=Nt(ET),CT={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"}]]};CT.node;const Gv=Nt(CT),TT={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"}]]};TT.node;const XP=Nt(TT),OT={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"}]]};OT.node;const ZP=Nt(OT),AT={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"}]]};AT.node;const WP=Nt(AT),MT={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"}]]};MT.node;const JP=Nt(MT),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 bs=Nt(kT),NT={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"}]]};NT.node;const eL=Nt(NT),DT={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};DT.node;const tL=Nt(DT),jT={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"]};jT.node;const nL=Nt(jT),IT={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"}]]};IT.node;const rL=Nt(IT),PT={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"]};PT.node;const iL=Nt(PT),LT={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"}]]};LT.node;const zT=Nt(LT),_T={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};_T.node;const au=Nt(_T),UT={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"}]]};UT.node;const sL=Nt(UT),HT={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"}]]};HT.node;const FT=Nt(HT),BT={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"}]]};BT.node;const $v=Nt(BT),VT={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"}]]};VT.node;const aL=Nt(VT),KT={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"}]]};KT.node;const qT=Nt(KT),YT={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"]};YT.node;const Qv=Nt(YT),GT={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"]};GT.node;const oL=Nt(GT),$T={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"]};$T.node;const lL=Nt($T),QT={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"}]]};QT.node;const jy=Nt(QT),XT={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};XT.node;const Va=Nt(XT),uL=({...e})=>{const{theme:t="system"}=eP();return b.jsx(MP,{theme:t,className:"toaster group",icons:{success:b.jsx(BP,{className:"size-4"}),info:b.jsx(XP,{className:"size-4"}),warning:b.jsx(oL,{className:"size-4"}),error:b.jsx(nL,{className:"size-4"}),loading:b.jsx(bs,{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})},ZT=v.createContext(void 0),mi=e=>{const t=v.useContext(ZT);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},cL=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(ZT.Provider,{value:e,children:t})),dL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var fL=class{#e=dL;#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 To=new fL;function hL(e){setTimeout(e,0)}const pL=typeof window>"u"||"Deno"in globalThis;function Hr(){}function gL(e,t){return typeof e=="function"?e(t):e}function WT(e){return typeof e=="number"&&e>=0&&e!==1/0}function JT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pn(e,t){return typeof e=="function"?e(t):e}function $w(e,t){const{type:i="all",exact:s,fetchStatus:o,predicate:u,queryKey:c,stale:d}=e;if(c){if(s){if(t.queryHash!==Xv(c,t.options))return!1}else if(!eu(t.queryKey,c))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||u&&!u(t))}function Qw(e,t){const{exact:i,status:s,predicate:o,mutationKey:u}=e;if(u){if(!t.options.mutationKey)return!1;if(i){if(jo(t.options.mutationKey)!==jo(u))return!1}else if(!eu(t.options.mutationKey,u))return!1}return!(s&&t.state.status!==s||o&&!o(t))}function Xv(e,t){return(t?.queryKeyHashFn||jo)(e)}function jo(e){return JSON.stringify(e,(t,i)=>Iy(i)?Object.keys(i).sort().reduce((s,o)=>(s[o]=i[o],s),{}):i)}function eu(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(!eu(e[s],t[s]))return!1;return!0}const i=Object.keys(t);for(const s of i)if(!eu(e[s],t[s]))return!1;return!0}return!1}const mL=Object.prototype.hasOwnProperty;function Zv(e,t,i=0){if(e===t)return e;if(i>500)return t;const s=Xw(e)&&Xw(t);if(!s&&!(Iy(e)&&Iy(t)))return t;const o=(s?e:Object.keys(e)).length,u=s?t:Object.keys(t),c=u.length,d=s?new Array(c):{};let f=0;for(let g=0;g<c;g++){const y=s?g:u[g],p=e[y],x=t[y];if(p===x){d[y]=p,(s?g<o:mL.call(e,y))&&f++;continue}if(p===null||x===null||typeof p!="object"||typeof x!="object"){d[y]=x;continue}const S=Zv(p,x,i+1);d[y]=S,S===p&&f++}return o===c&&f===o?e:d}function vh(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 Xw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Iy(e){if(!Zw(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!(!Zw(s)||!s.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function Zw(e){return Object.prototype.toString.call(e)==="[object Object]"}function yL(e){return new Promise(t=>{To.setTimeout(t,e)})}function Py(e,t,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,t):i.structuralSharing!==!1?Zv(e,t):t}function vL(e,t,i=0){const s=[...e,t];return i&&s.length>i?s.slice(1):s}function bL(e,t,i=0){const s=[t,...e];return i&&s.length>i?s.slice(0,-1):s}const Wv=Symbol();function eO(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Wv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Jv(e,t){return typeof e=="function"?e(...t):!!e}function xL(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 SL=()=>pL;const eb=()=>SL();var ou=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(){}},wL=class extends ou{#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 tb=new wL,EL=hL;function RL(){let e=[],t=0,i=d=>{d()},s=d=>{d()},o=EL;const u=d=>{t?e.push(d):o(()=>{i(d)})},c=()=>{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||c()}return f},batchCalls:d=>(...f)=>{u(()=>{d(...f)})},schedule:u,setNotifyFunction:d=>{i=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}const Jn=RL();var CL=class extends ou{#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 Yh=new CL;function TL(e){return Math.min(1e3*2**e,3e4)}function tO(e){return(e??"online")==="online"?Yh.isOnline():!0}var Ly=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function nO(e){let t=!1,i=0,s,o="pending",u,c;const d=new Promise((O,A)=>{u=O,c=A});d.catch(Hr);const f=()=>o!=="pending",g=O=>{if(!f()){const A=new Ly(O);C(A),e.onCancel?.(A)}},y=()=>{t=!0},p=()=>{t=!1},x=()=>tb.isFocused()&&(e.networkMode==="always"||Yh.isOnline())&&e.canRun(),S=()=>tO(e.networkMode)&&e.canRun(),w=O=>{f()||(s?.(),o="resolved",u(O))},C=O=>{f()||(s?.(),o="rejected",c(O))},E=O=>new Promise(A=>{s=M=>{(f()||O())&&A(M)},e.onPause?.()}).then(()=>{s=void 0,f()||e.onContinue?.()}),R=()=>{if(f())return;let O;const A=i===0?e.initialPromise:void 0;try{O=A??e.fn()}catch(M){O=Promise.reject(M)}Promise.resolve(O).then(w).catch(M=>{if(f())return;const N=e.retry??(eb()?0:3),j=e.retryDelay??TL,D=typeof j=="function"?j(i,M):j,k=N===!0||typeof N=="number"&&i<N||typeof N=="function"&&N(i,M);if(t||!k){C(M);return}i++,e.onFail?.(i,M),yL(D).then(()=>x()?void 0:E(x)).then(()=>{t?C(M):R()})})};return{promise:d,status:()=>o,cancel:g,continue:()=>(s?.(),d),cancelRetry:y,continueRetry:p,canStart:S,start:()=>(S()?R():E(S).then(R),d)}}var rO=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),WT(this.gcTime)&&(this.#e=To.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(eb()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(To.clearTimeout(this.#e),this.#e=void 0)}};function OL(e){return{onFetch:(t,i)=>{const s=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,u=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const g=async()=>{let y=!1;const p=w=>{xL(w,()=>t.signal,()=>y=!0)},x=eO(t.options,t.fetchOptions),S=async(w,C,E)=>{if(y)return Promise.reject(t.signal.reason);if(C==null&&w.pages.length)return Promise.resolve(w);const O=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:C,direction:E?"backward":"forward",meta:t.options.meta};return p(j),j})(),A=await x(O),{maxPages:M}=t.options,N=E?bL:vL;return{pages:N(w.pages,A,M),pageParams:N(w.pageParams,C,M)}};if(o&&u.length){const w=o==="backward",C=w?AL:Ww,E={pages:u,pageParams:c};d=await S(E,C(s,E),w)}else{const w=e??u.length;do{const C=f===0?c[0]===void 0?s.initialPageParam:c[0]:Ww(s,d);if(f>0&&C==null)break;d=await S(d,C),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 Ww(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 AL(e,{pages:t,pageParams:i}){return t.length>0?e.getPreviousPageParam?.(t[0],t,i[0],i):void 0}var ML=class extends rO{#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=eE(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=eE(this.options);t.data!==void 0&&(this.setState(Jw(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const i=Py(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(Hr).catch(Hr):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===Wv||!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:!JT(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=eO(this.options,t),y=(()=>{const p={client:this.#s,queryKey:this.queryKey,meta:this.meta};return s(p),p})();return this.#l=!1,this.options.persister?this.options.persister(f,y,this):f(y)},c=(()=>{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"?OL(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#o({type:"fetch",meta:c.fetchOptions?.meta});const d=this.#i=nO({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof Ly&&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:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.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 Ly){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,...iO(i.data,this.options),fetchMeta:e.meta??null};case"success":const s={...i,...Jw(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),Jn.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function iO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Jw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function eE(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 kL=class extends ou{#e;#t=void 0;#n=void 0;#r=void 0;#s;#i;#a;#l;#o;#h;#c;#d;#u;#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),tE(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zy(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zy(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&&!vh(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&nE(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.#u)&&this.#v(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(t,e);return vh(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 u=new Promise(c=>{o=c,s=this.#e.getQueryCache().subscribe(d=>{d.type==="updated"&&d.query.queryHash===i.queryHash&&i.state.data!==void 0&&(s(),c(this.createResult(i,t)))})});return Promise.race([i.fetch(t).then(()=>{const c=this.createResult(i,t);return o?.(c),c}).finally(()=>{s()}),u])}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(Hr)),t}#g(e){return!eb()&&Pn(this.options.enabled,this.#t)!==!1&&WT(e)}#m(){this.#x();const e=Pn(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#g(e))return;const t=JT(this.#r.dataUpdatedAt,e)+1;this.#c=To.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#y(){return Pn(this.options.refetchInterval,this.#t)??!1}#v(e){this.#S(),this.#u=e,!(this.#u===0||!this.#g(this.#u))&&(this.#d=To.setInterval(()=>{(this.options.refetchIntervalInBackground||tb.isFocused())&&this.#f()},this.#u))}#b(){this.#m(),this.#v(this.#y())}#x(){this.#c!==void 0&&(To.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#d!==void 0&&(To.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const i=this.#t,s=this.options,o=this.#r,u=this.#s,c=this.#i,d=e!==i?e.state:this.#n,{state:f}=e;let g={...f},y=!1,p;if(t._optimisticResults){const N=this.hasListeners(),j=!N&&tE(e,t),D=N&&nE(e,i,t,s);(j||D)&&(g={...g,...iO(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:w}=g;p=g.data;let C=!1;if(t.placeholderData!==void 0&&p===void 0&&w==="pending"){let N;o?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(N=o.data,C=!0):N=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,N!==void 0&&(w="success",p=Py(o?.data,N,t),y=!0)}if(t.select&&p!==void 0&&!C)if(o&&p===u?.data&&t.select===this.#l)p=this.#o;else try{this.#l=t.select,p=t.select(p),p=Py(o?.data,p,t),this.#o=p,this.#a=null}catch(N){this.#a=N}else p===void 0&&(this.#a=null);this.#a&&(x=this.#a,p=this.#o,S=Date.now(),w="error",y=!1);const E=g.fetchStatus==="fetching",R=w==="pending",O=w==="error",A=R&&E,M=p!==void 0;return{status:w,fetchStatus:g.fetchStatus,isPending:R,isSuccess:w==="success",isError:O,isInitialLoading:A,isLoading:A,data:p,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&&!R,isLoadingError:O&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:O&&M,isStale:nb(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),vh(t,e))return;this.#r=t;const s=(()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,u=typeof o=="function"?o():o;if(u==="all"||!u&&!this.#p.size)return!0;const c=new Set(u??this.#p);return this.options.throwOnError&&c.add("error"),Object.keys(this.#r).some(d=>{const f=d;return this.#r[f]!==e[f]&&c.has(f)})})();Jn.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 NL(e,t){return Pn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Pn(t.retryOnMount,e)===!1)}function tE(e,t){return NL(e,t)||e.state.data!==void 0&&zy(e,t,t.refetchOnMount)}function zy(e,t,i){if(Pn(t.enabled,e)!==!1&&Pn(t.staleTime,e)!=="static"){const s=Pn(i,e);return s==="always"||s!==!1&&nb(e,t)}return!1}function nE(e,t,i,s){return(e!==t||Pn(s.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&nb(e,i)}function nb(e,t){return Pn(t.enabled,e)!==!1&&e.isStaleByTime(Pn(t.staleTime,e))}var DL=class extends rO{#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||sO(),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=nO({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(c,d)=>{this.#s({type:"failed",failureCount:c,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",u=!s.canStart();try{if(o)t();else{this.#s({type:"pending",variables:e,isPaused:u}),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:u})}const c=await s.start();return await this.#n.config.onSuccess?.(c,e,this.state.context,this,i),await this.options.onSuccess?.(c,e,this.state.context,i),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(c,null,e,this.state.context,i),this.#s({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,e,this.state.context,this,i)}catch(d){Promise.reject(d)}try{await this.options.onError?.(c,e,this.state.context,i)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,i)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,i)}catch(d){Promise.reject(d)}throw this.#s({type:"error",error:c}),c}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),Jn.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function sO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jL=class extends ou{#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 DL({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=Zf(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=Zf(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=Zf(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=Zf(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Jn.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=>Qw(t,i))}findAll(e={}){return this.getAll().filter(t=>Qw(e,t))}notify(e){Jn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Jn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Hr))))}};function Zf(e){return e.options.scope?.id}var IL=class extends ou{#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),vh(this.options,i)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&jo(i.mutationKey)!==jo(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??sO();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){Jn.batch(()=>{const i=this.#r;if(i&&this.hasListeners()){const s=this.#t.variables,o=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{i.onSuccess?.(t.data,s,o,u)}catch(c){Promise.reject(c)}try{i.onSettled?.(t.data,null,s,o,u)}catch(c){Promise.reject(c)}}else if(t?.type==="error"){try{i.onError?.(t.error,s,o,u)}catch(c){Promise.reject(c)}try{i.onSettled?.(void 0,t.error,s,o,u)}catch(c){Promise.reject(c)}}}this.listeners.forEach(s=>{s(this.#t)})})}},aO=class extends ou{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,i){const s=t.queryKey,o=t.queryHash??Xv(s,t);let u=this.get(o);return u||(u=new ML({client:e,queryKey:s,queryHash:o,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(s)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Jn.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=>$w(t,i))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(i=>$w(e,i)):t}notify(e){Jn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Jn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Jn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},PL=class{#e;#t;#n;#r;#s;#i;#a;#l;constructor(e={}){this.#e=e.queryCache||new aO,this.#t=e.mutationCache||new jL,this.#n=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=tb.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Yh.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,u=gL(t,o);if(u!==void 0)return this.#e.build(this,s).setData(u,{...i,manual:!0})}setQueriesData(e,t,i){return Jn.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;Jn.batch(()=>{t.findAll(e).forEach(i=>{t.remove(i)})})}resetQueries(e,t){const i=this.#e;return Jn.batch(()=>{const s=i.findAll(e),o=new Set(s);return s.forEach(u=>{u.reset()}),this.refetchQueries({type:"active",predicate:u=>o.has(u)},t)})}cancelQueries(e,t={}){const i={revert:!0,...t},s=Jn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(i)));return Promise.all(s).then(Hr).catch(Hr)}invalidateQueries(e,t={}){return Jn.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=Jn.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let u=o.fetch(void 0,i);return i.throwOnError||(u=u.catch(Hr)),o.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(s).then(Hr)}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(Hr).catch(Hr)}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(Hr).catch(Hr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Yh.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(jo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],i={};return t.forEach(s=>{eu(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,t){this.#s.set(jo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],i={};return t.forEach(s=>{eu(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=Xv(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===Wv&&(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 oO=v.createContext(!1),LL=()=>v.useContext(oO);oO.Provider;function zL(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const _L=v.createContext(zL()),UL=()=>v.useContext(_L),HL=(e,t,i)=>{const s=i?.state.status==="error"&&typeof e.throwOnError=="function"?Jv(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||s)&&(t.isReset()||(e.retryOnMount=!1))},FL=e=>{v.useEffect(()=>{e.clearReset()},[e])},BL=({result:e,errorResetBoundary:t,throwOnError:i,query:s,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(o&&e.data===void 0||Jv(i,[e.error,s])),VL=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))}},KL=(e,t)=>e?.suspense&&t.isPending,qL=(e,t,i)=>t.fetchOptimistic(e).catch(()=>{i.clearReset()});function YL(e,t,i){const s=LL(),o=UL(),u=mi(i),c=u.defaultQueryOptions(e),d=u.getQueryCache().get(c.queryHash),f=e.subscribed!==!1;c._optimisticResults=s?"isRestoring":f?"optimistic":void 0,VL(c),HL(c,o,d),FL(o);const[g]=v.useState(()=>new t(u,c)),y=g.getOptimisticResult(c),p=!s&&f;if(v.useSyncExternalStore(v.useCallback(x=>{const S=p?g.subscribe(Jn.batchCalls(x)):Hr;return g.updateResult(),S},[g,p]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),v.useEffect(()=>{g.setOptions(c)},[c,g]),KL(c,y))throw qL(c,g,o);if(BL({result:y,errorResetBoundary:o,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw y.error;return c.notifyOnChangeProps?y:g.trackResult(y)}function Lo(e,t){return YL(e,kL,t)}function lO(e,t){const i=mi(t);return $L({filters:{...e,status:"pending"}},i).length}function GL(){let e;return(t,i)=>{let s=[],o;return()=>{const u=t.findAll(i.filters),c=u.flatMap(d=>[d,d.state]);return(!o||c.length!==s.length||c.some((d,f)=>!Object.is(d,s[f])))&&(s=c,o=Zv(e,u.map(d=>i.select?i.select(d):d.state)),e=o),o}}}function $L(e={},t){const i=mi(t).getMutationCache(),[s]=v.useState(()=>GL()),o=s(i,e);return v.useSyncExternalStore(v.useCallback(u=>i.subscribe(Jn.batchCalls(u)),[i]),o,o)}function Ar(e,t){const i=mi(t),[s]=v.useState(()=>new IL(i,e));v.useEffect(()=>{s.setOptions(e)},[s,e]);const o=v.useSyncExternalStore(v.useCallback(c=>s.subscribe(Jn.batchCalls(c)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),u=v.useCallback((...c)=>{s.mutate(c[0],c[1]).catch(Hr)},[s]);if(o.error&&Jv(s.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:u,mutateAsync:o.mutate}}var uO=e=>{throw TypeError(e)},cO=(e,t,i)=>t.has(e)||uO("Cannot "+i),Ai=(e,t,i)=>(cO(e,t,"read from private field"),i?i.call(e):t.get(e)),vc=(e,t,i)=>t.has(e)?uO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),cs=(e,t,i,s)=>(cO(e,t,"write to private field"),t.set(e,i),i),Hp=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Fp=/^[\\/]{2}/;function dO(e,t){return t+e.replace(/\\/g,"/")}var rE="popstate";function iE(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function QL(e={}){function t(o,u){let{pathname:c="/",search:d="",hash:f=""}=Zi(o.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),Lc("",{pathname:c,search:d,hash:f},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function i(o,u){let c=o.document.querySelector("base"),d="";if(c&&c.getAttribute("href")){let f=o.location.href,g=f.indexOf("#");d=g===-1?f:f.slice(0,g)}return d+"#"+(typeof u=="string"?u:Fr(u))}function s(o,u){Hn(o.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(u)})`)}return ZL(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 XL(){return Math.random().toString(36).substring(2,10)}function sE(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 Lc(e,t,i=null,s,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Zi(t):t,state:i,key:t&&t.key||s||XL(),mask:o}}function Fr({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 Zi(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 ZL(e,t,i,s={}){let{window:o=document.defaultView,v5Compat:u=!1}=s,c=o.history,d="POP",f=null,g=y();g==null&&(g=0,c.replaceState({...c.state,idx:g},""));function y(){return(c.state||{idx:null}).idx}function p(){d="POP";let E=y(),R=E==null?null:E-g;g=E,f&&f({action:d,location:C.location,delta:R})}function x(E,R){d="PUSH";let O=iE(E)?E:Lc(C.location,E,R);i&&i(O,E),g=y()+1;let A=sE(O,g),M=C.createHref(O.mask||O);try{c.pushState(A,"",M)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;o.location.assign(M)}u&&f&&f({action:d,location:C.location,delta:1})}function S(E,R){d="REPLACE";let O=iE(E)?E:Lc(C.location,E,R);i&&i(O,E),g=y();let A=sE(O,g),M=C.createHref(O.mask||O);c.replaceState(A,"",M),u&&f&&f({action:d,location:C.location,delta:0})}function w(E){return fO(o,E)}let C={get action(){return d},get location(){return e(o,c)},listen(E){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(rE,p),f=E,()=>{o.removeEventListener(rE,p),f=null}},createHref(E){return t(o,E)},createURL:w,encodeLocation(E){let R=w(E);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:x,replace:S,go(E){return c.go(E)}};return C}function fO(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:Fr(t);return o=o.replace(/ $/,"%20"),!i&&Fp.test(o)&&(o=s+o),new URL(o,s)}var bc,aE=class{constructor(e){if(vc(this,bc,new Map),e)for(let[t,i]of e)this.set(t,i)}get(e){if(Ai(this,bc).has(e))return Ai(this,bc).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Ai(this,bc).set(e,t)}};bc=new WeakMap;var WL=new Set(["lazy","caseSensitive","path","id","index","children"]);function JL(e){return WL.has(e)}var e5=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function t5(e){return e5.has(e)}function n5(e){return e.index===!0}function zc(e,t,i=[],s={},o=!1){return e.map((u,c)=>{let d=[...i,String(c)],f=typeof u.id=="string"?u.id:d.join("-");if(_t(u.index!==!0||!u.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`),n5(u)){let g={...u,id:f};return s[f]=oE(g,t(g)),g}else{let g={...u,id:f,children:void 0};return s[f]=oE(g,t(g)),u.children&&(g.children=zc(u.children,t,d,s,o)),g}})}function oE(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function hO(e,t,i="/"){return Ki(e,t,i,!1)}function Ki(e,t,i,s,o){let u=typeof t=="string"?Zi(t):t,c=Jr(u.pathname||"/",i);if(c==null)return null;let d=o??bh(e),f=null,g=bO(c);for(let y=0;f==null&&y<d.length;++y)f=f5(d[y],g,s);return f}function pO(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 bh(e){let t=gO(e);return r5(t),t}function gO(e,t=[],i=[],s="",o=!1){let u=(c,d,f=o,g)=>{let y={relativePath:g===void 0?c.path||"":g,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(s)&&f)return;_t(y.relativePath.startsWith(s),`Absolute route path "${y.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(s.length)}let p=Di([s,y.relativePath]),x=i.concat(y);c.children&&c.children.length>0&&(_t(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),gO(c.children,t,x,p,f)),!(c.path==null&&!c.index)&&t.push({path:p,score:c5(p,c.index),routesMeta:x.map((S,w)=>{let[C,E]=vO(S.relativePath,S.caseSensitive,w===x.length-1);return{...S,matcher:C,compiledParams:E}})})};return e.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))u(c,d);else for(let f of mO(c.path))u(c,d,!0,f)}),t}function mO(e){let t=e.split("/");if(t.length===0)return[];let[i,...s]=t,o=i.endsWith("?"),u=i.replace(/\?$/,"");if(s.length===0)return o?[u,""]:[u];let c=mO(s.join("/")),d=[];return d.push(...c.map(f=>f===""?u:[u,f].join("/"))),o&&d.push(...c),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function r5(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:d5(t.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var i5=/^:[\w-]+$/,s5=3,a5=2,o5=1,l5=10,u5=-2,lE=e=>e==="*";function c5(e,t){let i=e.split("/"),s=i.length;return i.some(lE)&&(s+=u5),t&&(s+=a5),i.filter(o=>!lE(o)).reduce((o,u)=>o+(i5.test(u)?s5:u===""?o5:l5),s)}function d5(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 f5(e,t,i=!1){let{routesMeta:s}=e,o={},u="/",c=[];for(let d=0;d<s.length;++d){let f=s[d],g=d===s.length-1,y=u==="/"?t:t.slice(u.length)||"/",p={path:f.relativePath,caseSensitive:f.caseSensitive,end:g},x=f.matcher&&f.compiledParams?yO(p,y,f.matcher,f.compiledParams):_c(p,y),S=f.route;if(!x&&g&&i&&!s[s.length-1].route.index&&(x=_c({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},y)),!x)return null;Object.assign(o,x.params),c.push({params:o,pathname:Di([u,x.pathname]),pathnameBase:g5(Di([u,x.pathnameBase])),route:S}),x.pathnameBase!=="/"&&(u=Di([u,x.pathnameBase]))}return c}function _c(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,s]=vO(e.path,e.caseSensitive,e.end);return yO(e,t,i,s)}function yO(e,t,i,s){let o=t.match(i);if(!o)return null;let u=o[0],c=tu(u,1),d=o.slice(1);return{params:s.reduce((g,{paramName:y,isOptional:p},x)=>{if(y==="*"){let w=d[x]||"";c=tu(u.slice(0,u.length-w.length),1)}const S=d[x];return p&&!S?g[y]=void 0:g[y]=(S||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:c,pattern:e}}function vO(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,(c,d,f,g,y)=>{if(s.push({paramName:d,isOptional:f!=null}),f){let p=y.charAt(g+c.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}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 bO(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 Jr(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 h5({basename:e,pathname:t}){return t==="/"?e:Di([e,t])}var rb=e=>Hp.test(e);function p5(e,t="/"){let{pathname:i,search:s="",hash:o=""}=typeof e=="string"?Zi(e):e,u;return i?(i=ib(i),i.startsWith("/")||i.startsWith("\\")?u=uE(i.substring(1),"/"):u=uE(i,t)):u=t,{pathname:u,search:m5(s),hash:y5(o)}}function uE(e,t){let i=tu(t).split("/");return e.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function ny(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 xO(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function Bp(e){let t=xO(e);return t.map((i,s)=>s===t.length-1?i.pathname:i.pathnameBase)}function id(e,t,i,s=!1){let o;typeof e=="string"?o=Zi(e):(o={...e},_t(!o.pathname||!o.pathname.includes("?"),ny("?","pathname","search",o)),_t(!o.pathname||!o.pathname.includes("#"),ny("#","pathname","hash",o)),_t(!o.search||!o.search.includes("#"),ny("#","search","hash",o)));let u=e===""||o.pathname==="",c=u?"/":o.pathname,d;if(c==null)d=i;else{let p=t.length-1;if(!s&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),p-=1;o.pathname=x.join("/")}d=p>=0?t[p]:"/"}let f=p5(o,d),g=c&&c!=="/"&&c.endsWith("/"),y=(u||c===".")&&i.endsWith("/");return!f.pathname.endsWith("/")&&(g||y)&&(f.pathname+="/"),f}var ib=e=>e.replace(/[\\/]{2,}/g,"/"),Di=e=>ib(e.join("/"));function tu(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 g5=e=>tu(e).replace(/^\/*/,"/"),m5=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,y5=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,v5=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],sd=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 Uc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ad(e){let t=e.map(i=>i.route.path).filter(Boolean);return Di(t)||"/"}var SO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wO(e,t){let i=e;if(typeof i!="string"||!Hp.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let s=i,o=!1;if(SO)try{let u=new URL(window.location.href),c=Fp.test(i)?new URL(dO(i,u.protocol)):new URL(i),d=Jr(c.pathname,t);c.origin===u.origin&&d!=null?i=d+c.search+c.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 Da=Symbol("Uninstrumented");function b5(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(u){let c=Object.keys(i);for(let d of c)u[d]&&i[d].push(u[d])}}));let s={};if(typeof t.lazy=="function"&&i.lazy.length>0){let o=Ll(i.lazy,t.lazy,()=>{});o&&(s.lazy=o)}if(typeof t.lazy=="object"){let o=t.lazy;["middleware","loader","action"].forEach(u=>{let c=o[u],d=i[`lazy.${u}`];if(typeof c=="function"&&d.length>0){let f=Ll(d,c,()=>{});f&&(s.lazy=Object.assign(s.lazy||{},{[u]:f}))}})}return["loader","action"].forEach(o=>{let u=t[o];if(typeof u=="function"&&i[o].length>0){let c=u[Da]??u,d=Ll(i[o],c,(...f)=>cE(f[0]));d&&(o==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[Da]=c,s[o]=d)}}),t.middleware&&t.middleware.length>0&&i.middleware.length>0&&(s.middleware=t.middleware.map(o=>{let u=o[Da]??o,c=Ll(i.middleware,u,(...d)=>cE(d[0]));return c?(c[Da]=u,c):o})),s}function x5(e,t){let i={navigate:[],fetch:[]};if(t.forEach(s=>s({instrument(o){let u=Object.keys(o);for(let c of u)o[c]&&i[c].push(o[c])}})),i.navigate.length>0){let s=e.navigate[Da]??e.navigate,o=Ll(i.navigate,s,(...u)=>{let[c,d]=u;return{to:typeof c=="number"||typeof c=="string"?c:c?Fr(c):".",...dE(e,d??{})}});o&&(o[Da]=s,e.navigate=o)}if(i.fetch.length>0){let s=e.fetch[Da]??e.fetch,o=Ll(i.fetch,s,(...u)=>{let[c,,d,f]=u;return{href:d??".",fetcherKey:c,...dE(e,f??{})}});o&&(o[Da]=s,e.fetch=o)}return e}function Ll(e,t,i){return e.length===0?null:async(...s)=>{let o=await EO(e,i(...s),()=>t(...s),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function EO(e,t,i,s){let o=e[s],u;if(o){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=EO(e,t,i,s-1),u=await c,_t(u,"Expected a result"),u.type==="error"&&u.value instanceof Error?{status:"error",error:u.value}:{status:"success",error:void 0});try{await o(d,t)}catch(f){console.error("An instrumentation function threw an error:",f)}c||await d(),await c}else try{u={type:"success",value:await i()}}catch(c){u={type:"error",value:c}}return u||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function cE(e){let{request:t,context:i,params:s,pattern:o}=e;return{request:S5(t),params:{...s},pattern:o,context:w5(i)}}function dE(e,t){return{currentUrl:Fr(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 S5(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function w5(e){if(R5(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var E5=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function R5(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")===E5}var fE=new URL("http://localhost");function sb(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),fE)}catch{return fE}}function ry(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function C5(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 Kl(e,t,i,s){let o=null;try{o=e==null?null:new URL(e,i)}catch{}let u=new URL(t,i),c=o!=null&&!ry(o,i),d=!ry(u,i);if(s==="reject"){if(c||d)throw new Error("External navigation is not allowed")}else if(d&&(o==null||!C5(e,o)||!ry(o,u)))throw new Error("External navigation is not allowed")}var RO=["POST","PUT","PATCH","DELETE"],T5=new Set(RO),O5=["GET",...RO],A5=new Set(O5),CO=new Set([301,302,303,307,308]),M5=new Set([307,308]),iy={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},k5={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Nl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},N5=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),TO="remix-router-transitions",OO=Symbol("ResetLoaderData"),Ro,Dl,Oa,jl,D5=class{constructor(e){vc(this,Ro),vc(this,Dl),vc(this,Oa),vc(this,jl),cs(this,Ro,e),cs(this,Dl,bh(e))}get stableRoutes(){return Ai(this,Ro)}get activeRoutes(){return Ai(this,Oa)??Ai(this,Ro)}get branches(){return Ai(this,jl)??Ai(this,Dl)}get hasHMRRoutes(){return Ai(this,Oa)!=null}setRoutes(e){cs(this,Ro,e),cs(this,Dl,bh(e))}setHmrRoutes(e){cs(this,Oa,e),cs(this,jl,bh(e))}commitHmrRoutes(){Ai(this,Oa)&&(cs(this,Ro,Ai(this,Oa)),cs(this,Dl,Ai(this,jl)),cs(this,Oa,void 0),cs(this,jl,void 0))}};Ro=new WeakMap;Dl=new WeakMap;Oa=new WeakMap;jl=new WeakMap;function j5(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||N5,u=o;if(e.instrumentations){let F=e.instrumentations;u=W=>({...o(W),...b5(F.map(ne=>ne.route).filter(Boolean),W)})}let c={},d=new D5(zc(e.routes,u,void 0,c)),f=e.basename||"/";f.startsWith("/")||(f=`/${f}`);let g=e.dataStrategy||_5,y={...e.future},p=null,x=new Set,S=null,w=null,C=null,E=null,R=e.hydrationData!=null,O=Ki(d.activeRoutes,e.history.location,f,!1,d.branches),A=!1,M=null,N,j;if(O==null&&!e.patchRoutesOnNavigation){let F=Mi(404,{pathname:e.history.location.pathname}),{matches:W,route:ne}=Wf(d.activeRoutes);N=!0,j=!N,O=W,M={[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=>ab(F.route)))N=!0,j=!N;else{let F=e.hydrationData?e.hydrationData.loaderData:null,W=e.hydrationData?e.hydrationData.errors:null,ne=O;if(W){let ye=O.findIndex(xe=>W[xe.route.id]!==void 0);ne=ne.slice(0,ye+1)}j=!1,N=!0,ne.forEach(ye=>{let xe=AO(ye.route,F,W);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&&(A=!0,O=F.matches)}let D,k={historyAction:e.history.action,location:e.history.location,matches:O,initialized:N,renderFallback:j,navigation:iy,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||M,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,J=new Set,re=new Map,Ee,le=null;function me(){if(p=e.history.listen(({action:F,location:W,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=bt({currentLocation:k.location,nextLocation:W,historyAction:F});if(ye&&ne!=null){let xe=new Promise(Ke=>{Ee=Ke});e.history.go(ne*-1),ft(ye,{state:"blocked",location:W,proceed(){ft(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:W}),xe.then(()=>e.history.go(ne))},reset(){let Ke=new Map(k.blockers);Ke.set(ye,Nl),Te({blockers:Ke})}}),L?.resolve(),L=null;return}return Le(F,W)}),i){rz(t,H);let F=()=>iz(t,H);t.addEventListener("pagehide",F),U=()=>t.removeEventListener("pagehide",F)}return k.initialized||Le("POP",k.location,{initialHydration:!0}),D}function ge(){p&&p(),U&&U(),x.clear(),X&&X.abort(),k.fetchers.forEach((F,W)=>kt(k.fetchers,W)),k.blockers.forEach((F,W)=>Xt(W))}function ce(F){if(x.add(F),S){let{newErrors:W}=S;S=null,F(k,{deletedFetchers:[],newErrors:W,viewTransitionOpts:void 0,flushSync:!1})}return()=>x.delete(F)}function Te(F,W={}){F.matches&&(F.matches=F.matches.map(xe=>{let Ke=c[xe.route.id],Ve=xe.route;return Ve.element!==Ke.element||Ve.errorElement!==Ke.errorElement||Ve.hydrateFallbackElement!==Ke.hydrateFallbackElement?{...xe,route:Ke}:xe})),k={...k,...F};let ne=[],ye=[];k.fetchers.forEach((xe,Ke)=>{xe.state==="idle"&&(J.has(Ke)?ne.push(Ke):ye.push(Ke))}),J.forEach(xe=>{!k.fetchers.has(xe)&&!K.has(xe)&&ne.push(xe)}),x.size===0&&(S={newErrors:F.errors??null}),[...x].forEach(xe=>xe(k,{deletedFetchers:ne,newErrors:F.errors??null,viewTransitionOpts:W.viewTransitionOpts,flushSync:W.flushSync===!0})),ne.forEach(xe=>kt(k.fetchers,xe)),ye.forEach(xe=>k.fetchers.delete(xe))}function ve(F,W,{flushSync:ne}={}){let ye=k.actionData!=null&&k.navigation.formMethod!=null&&Tr(k.navigation.formMethod)&&k.navigation.state==="loading"&&F.state?._isRedirect!==!0,xe;W.actionData?Object.keys(W.actionData).length>0?xe=W.actionData:xe=null:ye?xe=k.actionData:xe=null;let Ke=W.loaderData?wE(k.loaderData,W.loaderData,W.matches||[],W.errors):k.loaderData,Ve=k.blockers;Ve.size>0&&(Ve=new Map(Ve),Ve.forEach((tt,wt)=>Ve.set(wt,Nl)));let Xe=z?!1:st(F,W.matches||k.matches),Qe=q===!0||k.navigation.formMethod!=null&&Tr(k.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 ot;if(_==="POP"&&!z&&F!==k.location){let tt=H.get(k.location.pathname);tt&&tt.has(F.pathname)?ot={currentLocation:k.location,nextLocation:F}:H.has(F.pathname)&&(ot={currentLocation:F,nextLocation:k.location})}else if(B){let tt=H.get(k.location.pathname);tt?tt.add(F.pathname):(tt=new Set([F.pathname]),H.set(k.location.pathname,tt)),ot={currentLocation:k.location,nextLocation:F}}Te({...W,actionData:xe,loaderData:Ke,historyAction:_,location:F,initialized:!0,renderFallback:!1,navigation:iy,revalidation:"idle",restoreScrollPosition:Xe,preventScrollReset:Qe,blockers:Ve},{viewTransitionOpts:ot,flushSync:ne===!0}),_="POP",q=!1,B=!1,z=!1,Q=!1,L?.resolve(),L=null,le?.resolve(),le=null}async function Pe(F,W){if(L?.resolve(),L=null,typeof F=="number"){L||(L=TE());let Ft=L.promise;return e.history.go(F),Ft}let ne=_y(k.location,k.matches,f,F,W?.fromRouteId,W?.relative),{path:ye,submission:xe,error:Ke}=hE(!1,ne,W),Ve;if(W?.mask){let Ft=typeof W.mask=="string"?Zi(W.mask):{...k.location.mask,...W.mask};if(Ve={pathname:Ft.pathname??"",search:Ft.search??"",hash:Ft.hash??""},Fp.test(Ve.pathname))throw new Error("External navigation is not allowed");Ve.pathname.startsWith("\\")&&(Ve.pathname=Ve.pathname.replace(/^\\+/,"/")),Kl(typeof W.mask=="string"?W.mask:Fr(W.mask),Fr(Ve),e.history.createURL("/"),"reject")}let Xe=k.location,Qe=Lc(Xe,ye,W&&W.state,void 0,Ve);Qe={...Qe,...e.history.encodeLocation(Qe)},Kl(F==null?e.history.createHref(k.location):typeof F=="string"?F:Fr(F),e.history.createHref(Qe.mask||Qe),e.history.createURL("/"),"reject");let ot=W&&W.replace!=null?W.replace:void 0,tt="PUSH";ot===!0?tt="REPLACE":ot===!1||xe!=null&&Tr(xe.formMethod)&&xe.formAction===k.location.pathname+k.location.search&&(tt="REPLACE");let wt=W&&"preventScrollReset"in W?W.preventScrollReset===!0:void 0,dt=(W&&W.flushSync)===!0,Kt=bt({currentLocation:Xe,nextLocation:Qe,historyAction:tt});if(Kt){ft(Kt,{state:"blocked",location:Qe,proceed(){ft(Kt,{state:"proceeding",proceed:void 0,reset:void 0,location:Qe}),Pe(F,W)},reset(){let Ft=new Map(k.blockers);Ft.set(Kt,Nl),Te({blockers:Ft})}});return}await Le(tt,Qe,{submission:xe,pendingError:Ke,preventScrollReset:wt,replace:W&&W.replace,enableViewTransition:W&&W.viewTransition,flushSync:dt,callSiteDefaultShouldRevalidate:W&&W.defaultShouldRevalidate})}function Ae(){le||(le=TE()),ke(),Te({revalidation:"loading"});let F=le.promise;return k.navigation.state==="submitting"?F:k.navigation.state==="idle"?(Le(k.historyAction,k.location,{startUninterruptedRevalidation:!0}),F):(Le(_||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation,enableViewTransition:B===!0}),F)}async function Le(F,W,ne){X&&X.abort(),X=null,_=F,z=(ne&&ne.startUninterruptedRevalidation)===!0,je(k.location,k.matches),q=(ne&&ne.preventScrollReset)===!0,B=(ne&&ne.enableViewTransition)===!0;let ye=d.activeRoutes,xe=ne?.initialHydration&&k.matches&&k.matches.length>0&&!A?k.matches:Ki(ye,W,f,!1,d.branches),Ke=(ne&&ne.flushSync)===!0;if(xe&&k.initialized&&!Q&&G5(k.location,W)&&!(ne&&ne.submission&&Tr(ne.submission.formMethod))){ve(W,{matches:xe},{flushSync:Ke});return}let Ve=Ie(xe,ye,W.pathname);if(Ve.active&&Ve.matches&&(xe=Ve.matches),!xe){let{error:qt,notFoundMatches:Bt,route:Cn}=mt(W.pathname);ve(W,{matches:Bt,loaderData:{},errors:{[Cn.id]:qt}},{flushSync:Ke});return}let Xe=ne&&ne.overrideNavigation?{...ne.overrideNavigation,matches:xe,historyAction:F}:void 0;X=new AbortController;let Qe=Il(e.history,W,X.signal,ne&&ne.submission),ot=e.getContext?await e.getContext():new aE,tt;if(ne&&ne.pendingError)tt=[ka(xe).route.id,{type:"error",error:ne.pendingError}];else if(ne&&ne.submission&&Tr(ne.submission.formMethod)){let qt=await Be(Qe,W,ne.submission,xe,F,ot,Ve.active,ne&&ne.initialHydration===!0,{replace:ne.replace,flushSync:Ke});if(qt.shortCircuited)return;if(qt.pendingActionResult){let[Bt,Cn]=qt.pendingActionResult;if(hi(Cn)&&Uc(Cn.error)&&Cn.error.status===404){X=null,ve(W,{matches:qt.matches,loaderData:{},errors:{[Bt]:Cn.error}});return}}xe=qt.matches||xe,tt=qt.pendingActionResult,Xe=sy(W,xe,F,ne.submission),Ke=!1,Ve.active=!1,Qe=Il(e.history,Qe.url,Qe.signal)}let{shortCircuited:wt,matches:dt,loaderData:Kt,errors:Ft,workingFetchers:An}=await Oe(Qe,W,xe,F,ot,Ve.active,Xe,ne&&ne.submission,ne&&ne.fetcherSubmission,ne&&ne.replace,ne&&ne.initialHydration===!0,Ke,tt,ne&&ne.callSiteDefaultShouldRevalidate);wt||(X=null,ve(W,{matches:dt||xe,...EE(tt),loaderData:Kt,errors:Ft,...An?{fetchers:An}:{}}))}async function Be(F,W,ne,ye,xe,Ke,Ve,Xe,Qe={}){ke();let ot=tz(W,ye,xe,ne);if(Te({navigation:ot},{flushSync:Qe.flushSync===!0}),Ve){let dt=await ze(ye,W.pathname,F.signal);if(dt.type==="aborted")return{shortCircuited:!0};if(dt.type==="error"){if(dt.partialMatches.length===0){let{matches:Ft,route:An}=Wf(d.activeRoutes);return{matches:Ft,pendingActionResult:[An.id,{type:"error",error:dt.error}]}}let Kt=ka(dt.partialMatches).route.id;return{matches:dt.partialMatches,pendingActionResult:[Kt,{type:"error",error:dt.error}]}}else if(dt.matches)ye=dt.matches;else{let{notFoundMatches:Kt,error:Ft,route:An}=mt(W.pathname);return{matches:Kt,pendingActionResult:[An.id,{type:"error",error:Ft}]}}}let tt,wt=xh(ye,W);if(!wt.route.action&&!wt.route.lazy)tt={type:"error",error:Mi(405,{method:F.method,pathname:W.pathname,routeId:wt.route.id})};else{let dt=ql(u,c,F,W,ye,wt,Xe?[]:s,Ke),Kt=await we(F,W,dt,Ke,null);if(tt=Kt[wt.route.id],!tt){for(let Ft of ye)if(Kt[Ft.route.id]){tt=Kt[Ft.route.id];break}}if(F.signal.aborted)return{shortCircuited:!0}}if(Oo(tt)){let dt;return Qe&&Qe.replace!=null?dt=Qe.replace:dt=bE(tt.response.headers.get("Location"),new URL(F.url),f,e.history)===k.location.pathname+k.location.search,await de(F,tt,!0,{submission:ne,replace:dt}),{shortCircuited:!0}}if(hi(tt)){let dt=ka(ye,wt.route.id);return(Qe&&Qe.replace)!==!0&&(_="PUSH"),{matches:ye,pendingActionResult:[dt.route.id,tt,wt.route.id]}}return{matches:ye,pendingActionResult:[wt.route.id,tt]}}async function Oe(F,W,ne,ye,xe,Ke,Ve,Xe,Qe,ot,tt,wt,dt,Kt){let Ft=Ve||sy(W,ne,ye,Xe),An=Xe||Qe||CE(Ft),qt=!z&&!tt;if(Ke){if(qt){let qn=Ue(dt);Te({navigation:Ft,...qn!==void 0?{actionData:qn}:{}},{flushSync:wt})}let zt=await ze(ne,W.pathname,F.signal);if(zt.type==="aborted")return{shortCircuited:!0};if(zt.type==="error"){if(zt.partialMatches.length===0){let{matches:Fn,route:hr}=Wf(d.activeRoutes);return{matches:Fn,loaderData:{},errors:{[hr.id]:zt.error}}}let qn=ka(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:hr}=mt(W.pathname);return{matches:Fn,loaderData:{},errors:{[hr.id]:qn}}}}let Bt=d.activeRoutes,{dsMatches:Cn,revalidatingFetchers:Tn}=pE(F,xe,u,c,e.history,k,ne,An,W,tt?[]:s,tt===!0,Q,$,J,I,oe,Bt,f,e.patchRoutesOnNavigation!=null,d.branches,dt,Kt);if(ee=++Y,!e.dataStrategy&&!Cn.some(zt=>zt.shouldLoad)&&!Cn.some(zt=>zt.route.middleware&&zt.route.middleware.length>0)&&Tn.length===0){let zt=new Map(k.fetchers),qn=tn(zt);return ve(W,{matches:ne,loaderData:{},errors:dt&&hi(dt[1])?{[dt[0]]:dt[1].error}:null,...EE(dt),...qn?{fetchers:zt}:{}},{flushSync:wt}),{shortCircuited:!0}}if(qt){let zt={};if(!Ke){zt.navigation=Ft;let qn=Ue(dt);qn!==void 0&&(zt.actionData=qn)}Tn.length>0&&(zt.fetchers=be(Tn)),Te(zt,{flushSync:wt})}Tn.forEach(zt=>{en(zt.key),zt.controller&&K.set(zt.key,zt.controller)});let ei=()=>Tn.forEach(zt=>en(zt.key));X&&X.signal.addEventListener("abort",ei);let{loaderResults:dn,fetcherResults:fn}=await Ge(Cn,Tn,F,W,xe);if(F.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",ei),Tn.forEach(zt=>K.delete(zt.key));let Mn=Jf(dn);if(Mn)return await de(F,Mn.result,!0,{replace:ot}),{shortCircuited:!0};if(Mn=Jf(fn),Mn)return oe.add(Mn.key),await de(F,Mn.result,!0,{replace:ot}),{shortCircuited:!0};let jn=new Map(k.fetchers),{loaderData:Ss,errors:Dr}=SE(k,ne,dn,dt,Tn,fn,jn);tt&&k.errors&&(Dr={...k.errors,...Dr});let zi=tn(jn),ti=Je(ee,jn),vi=zi||ti||Tn.length>0;return{matches:ne,loaderData:Ss,errors:Dr,...vi?{workingFetchers:jn}:{}}}function Ue(F){if(F&&!hi(F[1]))return{[F[0]]:F[1].data};if(k.actionData)return Object.keys(k.actionData).length===0?null:k.actionData}function be(F){let W=new Map(k.fetchers);return F.forEach(ne=>{let ye=W.get(ne.key),xe=hc(void 0,ye?ye.data:void 0);W.set(ne.key,xe)}),W}async function He(F,W,ne,ye){en(F);let xe=(ye&&ye.flushSync)===!0,Ke=d.activeRoutes,Ve=_y(k.location,k.matches,f,ne,W,ye?.relative),Xe=Ki(Ke,Ve,f,!1,d.branches),Qe=Ie(Xe,Ke,Ve);if(Qe.active&&Qe.matches&&(Xe=Qe.matches),!Xe){vt(F,W,Mi(404,{pathname:Ve}),{flushSync:xe});return}let{path:ot,submission:tt,error:wt}=hE(!0,Ve,ye);if(wt){vt(F,W,wt,{flushSync:xe});return}let dt=e.getContext?await e.getContext():new aE,Kt=(ye&&ye.preventScrollReset)===!0;if(tt&&Tr(tt.formMethod)){await Ze(F,W,ot,Xe,dt,Qe.active,xe,Kt,tt,ye&&ye.defaultShouldRevalidate);return}I.set(F,{routeId:W,path:ot}),await at(F,W,ot,Xe,dt,Qe.active,xe,Kt,tt)}async function Ze(F,W,ne,ye,xe,Ke,Ve,Xe,Qe,ot){ke(),I.delete(F);let tt=k.fetchers.get(F);De(F,nz(Qe,tt),{flushSync:Ve});let wt=new AbortController,dt=Il(e.history,ne,wt.signal,Qe);if(Ke){let Se=await ze(ye,new URL(dt.url).pathname,dt.signal,F);if(Se.type==="aborted")return;if(Se.type==="error"){vt(F,W,Se.error,{flushSync:Ve});return}else if(Se.matches)ye=Se.matches;else{vt(F,W,Mi(404,{pathname:ne}),{flushSync:Ve});return}}let Kt=xh(ye,ne);if(!Kt.route.action&&!Kt.route.lazy){let Se=Mi(405,{method:Qe.formMethod,pathname:ne,routeId:W});vt(F,W,Se,{flushSync:Ve});return}K.set(F,wt);let Ft=Y,An=ql(u,c,dt,ne,ye,Kt,s,xe),qt=await we(dt,ne,An,xe,F),Bt=qt[Kt.route.id];if(!Bt){for(let Se of An)if(qt[Se.route.id]){Bt=qt[Se.route.id];break}}if(dt.signal.aborted){K.get(F)===wt&&K.delete(F);return}if(J.has(F)){if(Oo(Bt)||hi(Bt)){De(F,ds(void 0));return}}else{if(Oo(Bt))if(K.delete(F),ee>Ft){De(F,ds(void 0));return}else return oe.add(F),De(F,hc(Qe)),de(dt,Bt,!1,{fetcherSubmission:Qe,preventScrollReset:Xe});if(hi(Bt)){vt(F,W,Bt.error);return}}let Cn=k.navigation.location||k.location,Tn=Il(e.history,Cn,wt.signal),ei=d.activeRoutes,dn=k.navigation.state!=="idle"?Ki(ei,k.navigation.location,f,!1,d.branches):k.matches;_t(dn,"Didn't find any matches after fetcher action");let fn=++Y;G.set(F,fn);let{dsMatches:Mn,revalidatingFetchers:jn}=pE(Tn,xe,u,c,e.history,k,dn,Qe,Cn,s,!1,Q,$,J,I,oe,ei,f,e.patchRoutesOnNavigation!=null,d.branches,[Kt.route.id,Bt],ot),Ss=hc(Qe,Bt.data),Dr=new Map(k.fetchers);Dr.set(F,Ss),jn.filter(Se=>Se.key!==F).forEach(Se=>{let nt=Se.key,Ot=Dr.get(nt),Et=hc(void 0,Ot?Ot.data:void 0);Dr.set(nt,Et),en(nt),Se.controller&&K.set(nt,Se.controller)}),Te({fetchers:Dr});let zi=()=>jn.forEach(Se=>en(Se.key));wt.signal.addEventListener("abort",zi);let{loaderResults:ti,fetcherResults:vi}=await Ge(Mn,jn,Tn,Cn,xe);if(wt.signal.aborted)return;wt.signal.removeEventListener("abort",zi),G.delete(F),K.delete(F),jn.forEach(Se=>K.delete(Se.key));let zt=k.fetchers.has(F),qn=Se=>{if(!zt)return Se;let nt=new Map(Se.fetchers);return nt.set(F,ds(Bt.data)),{...Se,fetchers:nt}},Fn=Jf(ti);if(Fn)return k=qn(k),de(Tn,Fn.result,!1,{preventScrollReset:Xe});if(Fn=Jf(vi),Fn)return oe.add(Fn.key),k=qn(k),de(Tn,Fn.result,!1,{preventScrollReset:Xe});let hr=new Map(k.fetchers);zt&&hr.set(F,ds(Bt.data));let{loaderData:he,errors:Me}=SE(k,dn,ti,void 0,jn,vi,hr);Je(fn,hr),k.navigation.state==="loading"&&fn>ee?(_t(_,"Expected pending action"),X&&X.abort(),ve(k.navigation.location,{matches:dn,loaderData:he,errors:Me,fetchers:hr})):(Te({errors:Me,loaderData:wE(k.loaderData,he,dn,Me),fetchers:hr}),Q=!1)}async function at(F,W,ne,ye,xe,Ke,Ve,Xe,Qe){let ot=k.fetchers.get(F);De(F,hc(Qe,ot?ot.data:void 0),{flushSync:Ve});let tt=new AbortController,wt=Il(e.history,ne,tt.signal);if(Ke){let Bt=await ze(ye,new URL(wt.url).pathname,wt.signal,F);if(Bt.type==="aborted")return;if(Bt.type==="error"){vt(F,W,Bt.error,{flushSync:Ve});return}else if(Bt.matches)ye=Bt.matches;else{vt(F,W,Mi(404,{pathname:ne}),{flushSync:Ve});return}}let dt=xh(ye,ne);K.set(F,tt);let Kt=Y,Ft=ql(u,c,wt,ne,ye,dt,s,xe),An=await we(wt,ne,Ft,xe,F),qt=An[dt.route.id];if(!qt){for(let Bt of ye)if(An[Bt.route.id]){qt=An[Bt.route.id];break}}if(K.get(F)===tt&&K.delete(F),!wt.signal.aborted){if(J.has(F)){De(F,ds(void 0));return}if(Oo(qt))if(ee>Kt){De(F,ds(void 0));return}else{oe.add(F),await de(wt,qt,!1,{preventScrollReset:Xe});return}if(hi(qt)){vt(F,W,qt.error);return}De(F,ds(qt.data))}}async function de(F,W,ne,{submission:ye,fetcherSubmission:xe,preventScrollReset:Ke,replace:Ve}={}){ne||(L?.resolve(),L=null),W.response.headers.has("X-Remix-Revalidate")&&(Q=!0);let Xe=W.response.headers.get("Location");_t(Xe,"Expected a Location header on the redirect Response");let Qe=Xe,ot=new URL(F.url);Xe=bE(Xe,ot,f,e.history),Kl(Qe,Xe,ot,"allow-explicit");let tt=Lc(k.location,Xe,{_isRedirect:!0});if(i){let qt=!1;if(W.response.headers.has("X-Remix-Reload-Document"))qt=!0;else if(rb(Xe)){const Bt=fO(t,Xe,!0);qt=Bt.origin!==t.location.origin||Jr(Bt.pathname,f)==null}if(qt){Ve?t.location.replace(Xe):t.location.assign(Xe);return}}X=null;let wt=Ve===!0||W.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:dt,formAction:Kt,formEncType:Ft}=k.navigation;!ye&&!xe&&dt&&Kt&&Ft&&(ye=CE(k.navigation));let An=ye||xe;if(M5.has(W.response.status)&&An&&Tr(An.formMethod))await Le(wt,tt,{submission:{...An,formAction:Xe},preventScrollReset:Ke||q,enableViewTransition:ne?B:void 0});else{let qt=sy(tt,[],wt,ye);await Le(wt,tt,{overrideNavigation:qt,fetcherSubmission:xe,preventScrollReset:Ke||q,enableViewTransition:ne?B:void 0})}}async function we(F,W,ne,ye,xe){let Ke,Ve={};try{Ke=await H5(g,F,W,ne,xe,ye,!1)}catch(Xe){return ne.filter(Qe=>Qe.shouldLoad).forEach(Qe=>{Ve[Qe.route.id]={type:"error",error:Xe}}),Ve}if(F.signal.aborted)return Ve;if(!Tr(F.method))for(let Xe of ne){if(Ke[Xe.route.id]?.type==="error")break;!Ke.hasOwnProperty(Xe.route.id)&&!k.loaderData.hasOwnProperty(Xe.route.id)&&(!k.errors||!k.errors.hasOwnProperty(Xe.route.id))&&Xe.shouldCallHandler()&&(Ke[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(Ke))if(Z5(Qe)){let ot=Qe.result;Ve[Xe]={type:"redirect",response:K5(ot,F,Xe,ne,f)}}else Ve[Xe]=await V5(Qe);return Ve}async function Ge(F,W,ne,ye,xe){let Ke=we(ne,ye,F,xe,null),Ve=Promise.all(W.map(async ot=>{if(ot.matches&&ot.match&&ot.request&&ot.controller){let wt=(await we(ot.request,ot.path,ot.matches,xe,ot.key))[ot.match.route.id];return{[ot.key]:wt}}else return Promise.resolve({[ot.key]:{type:"error",error:Mi(404,{pathname:ot.path})}})})),Xe=await Ke,Qe=(await Ve).reduce((ot,tt)=>Object.assign(ot,tt),{});return{loaderResults:Xe,fetcherResults:Qe}}function ke(){Q=!0,I.forEach((F,W)=>{K.has(W)&&$.add(W),en(W)})}function De(F,W,ne={}){let ye=new Map(k.fetchers);ye.set(F,W),Te({fetchers:ye},{flushSync:(ne&&ne.flushSync)===!0})}function vt(F,W,ne,ye={}){let xe=ka(k.matches,W),Ke=new Map(k.fetchers);kt(Ke,F),Te({errors:{[xe.route.id]:ne},fetchers:Ke},{flushSync:(ye&&ye.flushSync)===!0})}function ct(F){return V.set(F,(V.get(F)||0)+1),J.has(F)&&J.delete(F),k.fetchers.get(F)||k5}function pt(F,W){en(F,W?.reason),De(F,ds(null))}function kt(F,W){let ne=k.fetchers.get(W);K.has(W)&&!(ne&&ne.state==="loading"&&G.has(W))&&en(W),I.delete(W),G.delete(W),oe.delete(W),J.delete(W),$.delete(W),F.delete(W)}function jt(F){let W=(V.get(F)||0)-1;W<=0?(V.delete(F),J.add(F)):V.set(F,W),Te({fetchers:new Map(k.fetchers)})}function en(F,W){let ne=K.get(F);ne&&(ne.abort(W),K.delete(F))}function sn(F,W){for(let ne of F){let ye=W.get(ne);_t(ye,`Expected fetcher: ${ne}`);let xe=ds(ye.data);W.set(ne,xe)}}function tn(F){let W=[],ne=!1;for(let ye of oe){let xe=F.get(ye);_t(xe,`Expected fetcher: ${ye}`),xe.state==="loading"&&(oe.delete(ye),W.push(ye),ne=!0)}return sn(W,F),ne}function Je(F,W){let ne=[];for(let[ye,xe]of G)if(xe<F){let Ke=W.get(ye);_t(Ke,`Expected fetcher: ${ye}`),Ke.state==="loading"&&(en(ye),G.delete(ye),ne.push(ye))}return sn(ne,W),ne.length>0}function St(F,W){let ne=k.blockers.get(F)||Nl;return re.get(F)!==W&&re.set(F,W),ne}function Xt(F){k.blockers.delete(F),re.delete(F)}function ft(F,W){let ne=k.blockers.get(F)||Nl;_t(ne.state==="unblocked"&&W.state==="blocked"||ne.state==="blocked"&&W.state==="blocked"||ne.state==="blocked"&&W.state==="proceeding"||ne.state==="blocked"&&W.state==="unblocked"||ne.state==="proceeding"&&W.state==="unblocked",`Invalid blocker state transition: ${ne.state} -> ${W.state}`);let ye=new Map(k.blockers);ye.set(F,W),Te({blockers:ye})}function bt({currentLocation:F,nextLocation:W,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,Ke]=ye[ye.length-1],Ve=k.blockers.get(xe);if(!(Ve&&Ve.state==="proceeding")&&Ke({currentLocation:F,nextLocation:W,historyAction:ne}))return xe}function mt(F){let W=Mi(404,{pathname:F}),ne=d.activeRoutes,{matches:ye,route:xe}=Wf(ne);return{notFoundMatches:ye,route:xe,error:W}}function Ut(F,W,ne){if(w=F,E=W,C=ne||null,!R&&k.navigation===iy){R=!0;let ye=st(k.location,k.matches);ye!=null&&Te({restoreScrollPosition:ye})}return()=>{w=null,E=null,C=null}}function cn(F,W){return C&&C(F,W.map(ye=>pO(ye,k.loaderData)))||F.key}function je(F,W){if(w&&E){let ne=cn(F,W);w[ne]=E()}}function st(F,W){if(w){let ne=cn(F,W),ye=w[ne];if(typeof ye=="number")return ye}return null}function Ie(F,W,ne){if(e.patchRoutesOnNavigation){let ye=d.branches;if(F){if(Object.keys(F[0].params).length>0)return{active:!0,matches:Ki(W,ne,f,!0,ye)}}else return{active:!0,matches:Ki(W,ne,f,!0,ye)||[]}}return{active:!1,matches:null}}async function ze(F,W,ne,ye){if(!e.patchRoutesOnNavigation)return{type:"success",matches:F};let xe=F;for(;;){let Ke=c;try{await e.patchRoutesOnNavigation({signal:ne,path:W,matches:xe,fetcherKey:ye,patch:(ot,tt)=>{ne.aborted||gE(ot,tt,d,Ke,u,!1)}})}catch(ot){return{type:"error",error:ot,partialMatches:xe}}if(ne.aborted)return{type:"aborted"};let Ve=d.branches,Xe=Ki(d.activeRoutes,W,f,!1,Ve),Qe=null;if(Xe){if(Object.keys(Xe[0].params).length===0)return{type:"success",matches:Xe};if(Qe=Ki(d.activeRoutes,W,f,!0,Ve),!(Qe&&xe.length<Qe.length&&$e(xe,Qe.slice(0,xe.length))))return{type:"success",matches:Xe}}if(Qe||(Qe=Ki(d.activeRoutes,W,f,!0,Ve)),!Qe||$e(xe,Qe))return{type:"success",matches:null};xe=Qe}}function $e(F,W){return F.length===W.length&&F.every((ne,ye)=>ne.route.id===W[ye].route.id)}function et(F){c={},d.setHmrRoutes(zc(F,u,void 0,c))}function Tt(F,W,ne=!1){gE(F,W,d,c,u,ne),d.hasHMRRoutes||Te({})}return D={get basename(){return f},get future(){return y},get state(){return k},get routes(){return d.stableRoutes},get branches(){return d.branches},get manifest(){return c},get window(){return t},initialize:me,subscribe:ce,enableScrollRestoration:Ut,navigate:Pe,fetch:He,revalidate:Ae,createHref:F=>e.history.createHref(F),createURL:F=>e.history.createURL(F),encodeLocation:F=>e.history.encodeLocation(F),getFetcher:ct,resetFetcher:pt,deleteFetcher:jt,dispose:ge,getBlocker:St,deleteBlocker:Xt,patchRoutes:Tt,_internalFetchControllers:K,_internalSetRoutes:et,_internalSetStateDoNotUseOrYouWillBreakYourApp(F){Te(F)}},e.instrumentations&&(D=x5(D,e.instrumentations.map(F=>F.router).filter(Boolean))),D}function I5(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function _y(e,t,i,s,o,u){let c,d;if(o){c=[];for(let g of t)if(c.push(g),g.route.id===o){d=g;break}}else c=t,d=t[t.length-1];let f=id(s||".",Bp(c),Jr(e.pathname,i)||e.pathname,u==="path");if(s==null&&(f.search=e.search,f.hash=e.hash),(s==null||s===""||s===".")&&d){let g=lb(f.search);if(d.route.index&&!g)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&g){let y=new URLSearchParams(f.search),p=y.getAll("index");y.delete("index"),p.filter(S=>S).forEach(S=>y.append("index",S));let x=y.toString();f.search=x?`?${x}`:""}}return i!=="/"&&(f.pathname=h5({basename:i,pathname:f.pathname})),Fr(f)}function hE(e,t,i){if(!i||!I5(i))return{path:t};if(i.formMethod&&!ez(i.formMethod))return{path:t,error:Mi(405,{method:i.formMethod})};let s=()=>({path:t,error:Mi(400,{type:"invalid-body"})}),u=(i.formMethod||"get").toUpperCase(),c=PO(t);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!Tr(u))return s();let p=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}
11
- `,""):String(i.body);return{path:t,submission:{formMethod:u,formAction:c,formEncType:i.formEncType,formData:void 0,json:void 0,text:p}}}else if(i.formEncType==="application/json"){if(!Tr(u))return s();try{let p=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:t,submission:{formMethod:u,formAction:c,formEncType:i.formEncType,formData:void 0,json:p,text:void 0}}}catch{return s()}}}_t(typeof FormData=="function","FormData is not available in this environment");let d,f;if(i.formData)d=Fy(i.formData),f=i.formData;else if(i.body instanceof FormData)d=Fy(i.body),f=i.body;else if(i.body instanceof URLSearchParams)d=i.body,f=xE(d);else if(i.body==null)d=new URLSearchParams,f=new FormData;else try{d=new URLSearchParams(i.body),f=xE(d)}catch{return s()}let g={formMethod:u,formAction:c,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(Tr(g.formMethod))return{path:t,submission:g};let y=Zi(t);return e&&y.search&&lb(y.search)&&d.append("index",""),y.search=`?${d}`,{path:Fr(y),submission:g}}function pE(e,t,i,s,o,u,c,d,f,g,y,p,x,S,w,C,E,R,O,A,M,N){let j=M?hi(M[1])?M[1].error:M[1].data:void 0,D=o.createURL(u.location),k=o.createURL(f),_;if(y&&u.errors){let z=Object.keys(u.errors)[0];_=c.findIndex(Q=>Q.route.id===z)}else if(M&&hi(M[1])){let z=M[0];_=c.findIndex(Q=>Q.route.id===z)-1}let L=M?M[1].statusCode:void 0,q=L&&L>=400,X={currentUrl:D,currentParams:u.matches[0]?.params||{},nextUrl:k,nextParams:c[0].params,...d,actionResult:j,actionStatus:L},B=ad(c),H=c.map((z,Q)=>{let{route:$}=z,K=null;if(_!=null&&Q>_)K=!1;else if($.lazy)K=!0;else if(!ab($))K=!1;else if(y){let{shouldLoad:oe}=AO($,u.loaderData,u.errors);K=oe}else P5(u.loaderData,u.matches[Q],z)&&(K=!0);if(K!==null)return Uy(i,s,e,f,B,z,g,t,K);let Y=!1;typeof N=="boolean"?Y=N:q?Y=!1:(p||D.pathname+D.search===k.pathname+k.search||D.search!==k.search||L5(u.matches[Q],z))&&(Y=!0);let ee={...X,defaultShouldRevalidate:Y},G=Cc(z,ee);return Uy(i,s,e,f,B,z,g,t,G,ee,N)}),U=[];return w.forEach((z,Q)=>{if(y||!c.some(V=>V.route.id===z.routeId)||S.has(Q))return;let $=u.fetchers.get(Q),K=$&&$.state!=="idle"&&$.data===void 0,Y=Ki(E,z.path,R??"/",!1,A);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(C.has(Q))return;let ee=xh(Y,z.path),G=new AbortController,oe=Il(o,z.path,G.signal),I=null;if(x.has(Q))x.delete(Q),I=ql(i,s,oe,z.path,Y,ee,g,t);else if(K)p&&(I=ql(i,s,oe,z.path,Y,ee,g,t));else{let V;typeof N=="boolean"?V=N:q?V=!1:V=p;let J={...X,defaultShouldRevalidate:V};Cc(ee,J)&&(I=ql(i,s,oe,z.path,Y,ee,g,t,J))}I&&U.push({key:Q,routeId:z.routeId,path:z.path,matches:I,match:ee,request:oe,controller:G})}),{dsMatches:H,revalidatingFetchers:U}}function ab(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function AO(e,t,i){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!ab(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 u=!s&&!o;return{shouldLoad:u,renderFallback:u}}function P5(e,t,i){let s=!t||i.route.id!==t.route.id,o=!e.hasOwnProperty(i.route.id);return s||o}function L5(e,t){let i=e.route.path;return e.pathname!==t.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==t.params["*"]}function Cc(e,t){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(t);if(typeof i=="boolean")return i}return t.defaultShouldRevalidate}function gE(e,t,i,s,o,u){let c;if(e){let g=s[e];_t(g,`No route found to patch children into: routeId = ${e}`),g.children||(g.children=[]),c=g.children}else c=i.activeRoutes;let d=[],f=[];if(t.forEach(g=>{let y=c.find(p=>MO(g,p));y?f.push({existingRoute:y,newRoute:g}):d.push(g)}),d.length>0){let g=zc(d,o,[e||"_","patch",String(c?.length||"0")],s);c.push(...g)}if(u&&f.length>0)for(let g=0;g<f.length;g++){let{existingRoute:y,newRoute:p}=f[g],x=y,[S]=zc([p],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 MO(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=>MO(i,o)))??!1:!1}var mE=new WeakMap,kO=({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 u=o.lazy[e];if(!u)return;let c=mE.get(o);c||(c={},mE.set(o,c));let d=c[e];if(d)return d;let f=(async()=>{let g=JL(e),p=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."),c[e]=Promise.resolve();else if(p)Hn(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let x=await u();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 c[e]=f,f},yE=new WeakMap;function z5(e,t,i,s,o){let u=i[e.id];if(_t(u,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let y=yE.get(u);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let p=(async()=>{_t(typeof e.lazy=="function","No lazy route function found");let x=await e.lazy(),S={};for(let w in x){let C=x[w];if(C===void 0)continue;let E=t5(w),O=u[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 "${u.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):S[w]=C}Object.assign(u,S),Object.assign(u,{...s(u),lazy:void 0})})();return yE.set(u,p),p.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:p}}let c=Object.keys(e.lazy),d=[],f;for(let y of c){if(o&&o.includes(y))continue;let p=kO({key:y,route:e,manifest:i,mapRouteProperties:s});p&&(d.push(p),y===t&&(f=p))}let g=d.length>0?Promise.all(d).then(()=>{}):void 0;return g?.catch(()=>{}),f?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:f}}async function vE(e){let t=e.matches.filter(o=>o.shouldLoad),i={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,u)=>{i[t[u].route.id]=o}),i}async function _5(e){return e.matches.some(t=>t.route.middleware)?NO(e,()=>vE(e)):vE(e)}function NO(e,t){return U5(e,t,s=>{if(J5(s))throw s;return s},Q5,i);function i(s,o,u){if(u)return Promise.resolve(Object.assign(u.value,{[o]:{type:"error",result:s}}));{let{matches:c}=e,d=Math.min(Math.max(c.findIndex(g=>g.route.id===o),0),Math.max(c.findIndex(g=>g.shouldCallHandler()),0)),f=ka(c,c[d].route.id).route.id;return Promise.resolve({[f]:{type:"error",result:s}})}}}async function U5(e,t,i,s,o){let{matches:u,...c}=e,d=u.flatMap(g=>g.route.middleware?g.route.middleware.map(y=>[g.route.id,y]):[]);return await DO(c,d,t,i,s,o)}async function DO(e,t,i,s,o,u,c=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let f=t[c];if(!f)return await i();let[g,y]=f,p,x=async()=>{if(p)throw new Error("You may only call `next()` once per middleware");try{return p={value:await DO(e,t,i,s,o,u,c+1)},p.value}catch(S){return p={value:await u(S,g,p)},p.value}};try{let S=await y(e,x),w=S!=null?s(S):void 0;return o(w)?w:p?w??p.value:(p={value:await x()},p.value)}catch(S){return await u(S,g,p)}}function jO(e,t,i,s,o){let u=kO({key:"middleware",route:s.route,manifest:t,mapRouteProperties:e}),c=z5(s.route,Tr(i.method)?"action":"loader",t,e,o);return{middleware:u,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function Uy(e,t,i,s,o,u,c,d,f,g=null,y){let p=!1,x=jO(e,t,i,u,c);return{...u,_lazyPromises:x,shouldLoad:f,shouldRevalidateArgs:g,shouldCallHandler(S){return p=!0,g?typeof y=="boolean"?Cc(u,{...g,defaultShouldRevalidate:y}):typeof S=="boolean"?Cc(u,{...g,defaultShouldRevalidate:S}):Cc(u,g):f},resolve(S){let{lazy:w,loader:C,middleware:E}=u.route,R=p||f||S&&!Tr(i.method)&&(w||C),O=E&&E.length>0&&!C&&!w;return R&&(Tr(i.method)||!O)?F5({request:i,path:s,pattern:o,match:u,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:S,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function ql(e,t,i,s,o,u,c,d,f=null){return o.map(g=>g.route.id!==u.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:f,shouldCallHandler:()=>!1,_lazyPromises:jO(e,t,i,g,c),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Uy(e,t,i,s,ad(o),g,c,d,!0,f))}async function H5(e,t,i,s,o,u,c){s.some(y=>y._lazyPromises?.middleware)&&await Promise.all(s.map(y=>y._lazyPromises?.middleware));let d={request:t,url:IO(t,i),pattern:ad(s),params:s[0].params,context:u,matches:s},g=await e({...d,fetcherKey:o,runClientMiddleware:y=>{let p=d;return NO(p,()=>y({...p,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(s.flatMap(y=>[y._lazyPromises?.handler,y._lazyPromises?.route]))}catch{}return g}async function F5({request:e,path:t,pattern:i,match:s,lazyHandlerPromise:o,lazyRoutePromise:u,handlerOverride:c,scopedContext:d}){let f,g,y=Tr(e.method),p=y?"action":"loader",x=S=>{let w,C=new Promise((O,A)=>w=A);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 "${p}" [routeId: ${s.route.id}]`)):S({request:e,url:IO(e,t),pattern:i,params:s.params,context:d},...O!==void 0?[O]:[]),R=(async()=>{try{return{type:"data",result:await(c?c(A=>E(A)):E())}}catch(O){return{type:"error",result:O}}})();return Promise.race([R,C])};try{let S=y?s.route.action:s.route.loader;if(o||u)if(S){let w,[C]=await Promise.all([x(S).catch(E=>{w=E}),o,u]);if(w!==void 0)throw w;f=C}else{await o;let w=y?s.route.action:s.route.loader;if(w)[f]=await Promise.all([x(w),u]);else if(p==="action"){let C=new URL(e.url),E=C.pathname+C.search;throw Mi(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),C=w.pathname+w.search;throw Mi(404,{pathname:C})}}catch(S){return{type:"error",result:S}}finally{g&&e.signal.removeEventListener("abort",g)}return f}async function B5(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 V5(e){let{result:t,type:i}=e;if(ob(t)){let s;try{s=await B5(t)}catch(o){return{type:"error",error:o}}return i==="error"?{type:"error",error:new sd(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:"data",data:s,statusCode:t.status,headers:t.headers}}return i==="error"?RE(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:$5(t),statusCode:Uc(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Uc(t)?t.status:void 0}:RE(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 K5(e,t,i,s,o){let u=e.headers.get("Location");if(_t(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!rb(u)){let c=s.slice(0,s.findIndex(d=>d.route.id===i)+1);u=_y(new URL(t.url),c,o,u),e.headers.set("Location",u)}return e}var q5=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Hy(e){try{return q5.includes(new URL(e).protocol)}catch{return!1}}function bE(e,t,i,s){if(rb(e)){let o=e,u=Fp.test(o)?new URL(dO(o,t.protocol)):new URL(o);if(Hy(u.toString()))throw new Error("Invalid redirect location");let c=Jr(u.pathname,i)!=null;if(u.origin===t.origin&&c)return ib(u.pathname)+u.search+u.hash}try{let o=s.createURL(e);if(Hy(o.toString()))throw new Error("Invalid redirect location")}catch{}return e}function Il(e,t,i,s){let o=e.createURL(PO(t)).toString(),u={signal:i};if(s&&Tr(s.formMethod)){let{formMethod:c,formEncType:d}=s;u.method=c.toUpperCase(),d==="application/json"?(u.headers=new Headers({"Content-Type":d}),u.body=JSON.stringify(s.json)):d==="text/plain"?u.body=s.text:d==="application/x-www-form-urlencoded"&&s.formData?u.body=Fy(s.formData):u.body=s.formData}return new Request(o,u)}function IO(e,t){let i=new URL(e.url),s=typeof t=="string"?Zi(t):t;if(i.pathname=s.pathname||"/",s.search){let o=new URLSearchParams(s.search),u=o.getAll("index");o.delete("index");for(let c of u.filter(Boolean))o.append("index",c);i.search=o.size?`?${o.toString()}`:""}else i.search="";return i.hash=s.hash||"",i}function Fy(e){let t=new URLSearchParams;for(let[i,s]of e.entries())t.append(i,typeof s=="string"?s:s.name);return t}function xE(e){let t=new FormData;for(let[i,s]of e.entries())t.append(i,s);return t}function Y5(e,t,i,s=!1,o=!1){let u={},c=null,d,f=!1,g={},y=i&&hi(i[1])?i[1].error:void 0;return e.forEach(p=>{if(!(p.route.id in t))return;let x=p.route.id,S=t[x];if(_t(!Oo(S),"Cannot handle redirect results in processLoaderData"),hi(S)){let w=S.error;if(y!==void 0&&(w=y,y=void 0),c=c||{},o)c[x]=w;else{let C=ka(e,x);c[C.route.id]==null&&(c[C.route.id]=w)}s||(u[x]=OO),f||(f=!0,d=Uc(S.error)?S.error.status:500),S.headers&&(g[x]=S.headers)}else u[x]=S.data,S.statusCode&&S.statusCode!==200&&!f&&(d=S.statusCode),S.headers&&(g[x]=S.headers)}),y!==void 0&&i&&(c={[i[0]]:y},i[2]&&(u[i[2]]=void 0)),{loaderData:u,errors:c,statusCode:d||200,loaderHeaders:g}}function SE(e,t,i,s,o,u,c){let{loaderData:d,errors:f}=Y5(t,i,s);return o.filter(g=>!g.matches||g.matches.some(y=>y.shouldLoad)).forEach(g=>{let{key:y,match:p,controller:x}=g;if(x&&x.signal.aborted)return;let S=u[y];if(_t(S,"Did not find corresponding fetcher result"),hi(S)){let w=ka(e.matches,p?.route.id);f&&f[w.route.id]||(f={...f,[w.route.id]:S.error}),c.delete(y)}else if(Oo(S))_t(!1,"Unhandled fetcher revalidation redirect");else{let w=ds(S.data);c.set(y,w)}}),{loaderData:d,errors:f}}function wE(e,t,i,s){let o=Object.entries(t).filter(([,u])=>u!==OO).reduce((u,[c,d])=>(u[c]=d,u),{});for(let u of i){let c=u.route.id;if(!t.hasOwnProperty(c)&&e.hasOwnProperty(c)&&u.route.loader&&(o[c]=e[c]),s&&s.hasOwnProperty(c))break}return o}function EE(e){return e?hi(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ka(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 Wf(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 Mi(e,{pathname:t,routeId:i,method:s,type:o,message:u}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(c="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?(c="Forbidden",d=`Route "${i}" does not match URL "${t}"`):e===404?(c="Not Found",d=`No route matches URL "${t}"`):e===405&&(c="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 sd(e||500,c,new Error(d),!0)}function Jf(e){let t=Object.entries(e);for(let i=t.length-1;i>=0;i--){let[s,o]=t[i];if(Oo(o))return{key:s,result:o}}}function PO(e){let t=typeof e=="string"?Zi(e):e;return Fr({...t,hash:""})}function G5(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function $5(e){return new sd(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Q5(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,i])=>typeof t=="string"&&X5(i))}function X5(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Z5(e){return ob(e.result)&&CO.has(e.result.status)}function hi(e){return e.type==="error"}function Oo(e){return(e&&e.type)==="redirect"}function RE(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ob(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function W5(e){return CO.has(e)}function J5(e){return ob(e)&&W5(e.status)&&e.headers.has("Location")}function ez(e){return A5.has(e.toUpperCase())}function Tr(e){return T5.has(e.toUpperCase())}function lb(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function xh(e,t){let i=typeof t=="string"?Zi(t).search:t.search;if(e[e.length-1].route.index&&lb(i||""))return e[e.length-1];let s=xO(e);return s[s.length-1]}function CE(e){let{formMethod:t,formAction:i,formEncType:s,text:o,formData:u,json:c}=e;if(!(!t||!i||!s)){if(o!=null)return{formMethod:t,formAction:i,formEncType:s,formData:void 0,json:void 0,text:o};if(u!=null)return{formMethod:t,formAction:i,formEncType:s,formData:u,json:void 0,text:void 0};if(c!==void 0)return{formMethod:t,formAction:i,formEncType:s,formData:void 0,json:c,text:void 0}}}function sy(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 tz(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 hc(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 nz(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 ds(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 rz(e,t){try{let i=e.sessionStorage.getItem(TO);if(i){let s=JSON.parse(i);for(let[o,u]of Object.entries(s||{}))u&&Array.isArray(u)&&t.set(o,new Set(u||[]))}}catch{}}function iz(e,t){if(t.size>0){let i={};for(let[s,o]of t)i[s]=[...o];try{e.sessionStorage.setItem(TO,JSON.stringify(i))}catch(s){Hn(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function TE(){let e,t,i=new Promise((s,o)=>{e=async u=>{s(u);try{await i}catch{}},t=async u=>{o(u);try{await i}catch{}}});return{promise:i,resolve:e,reject:t}}var zo=v.createContext(null);zo.displayName="DataRouter";var od=v.createContext(null);od.displayName="DataRouterState";var LO=v.createContext(!1);function zO(){return v.useContext(LO)}var ub=v.createContext({isTransitioning:!1});ub.displayName="ViewTransition";var _O=v.createContext(new Map);_O.displayName="Fetchers";var sz=v.createContext(null);sz.displayName="Await";var yi=v.createContext(null);yi.displayName="Navigation";var Vp=v.createContext(null);Vp.displayName="Location";var Pi=v.createContext({outlet:null,matches:[],isDataRoute:!1});Pi.displayName="Route";var cb=v.createContext(null);cb.displayName="RouteError";var UO="REACT_ROUTER_ERROR",az="REDIRECT",oz="ROUTE_ERROR_RESPONSE";function lz(e){if(e.startsWith(`${UO}:${az}:{`))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 uz(e){if(e.startsWith(`${UO}:${oz}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new sd(t.status,t.statusText,t.data)}catch{}}function cz(e,{relative:t}={}){_t(_o(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:s}=v.useContext(yi),{hash:o,pathname:u,search:c}=ld(e,{relative:t}),d=u;return i!=="/"&&(d=u==="/"?i:Di([i,u])),s.createHref({pathname:d,search:c,hash:o})}function _o(){return v.useContext(Vp)!=null}function Nr(){return _t(_o(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Vp).location}function dz(e){_t(_o(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Nr();return v.useMemo(()=>_c(e,bO(t)),[t,e])}var HO="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function FO(e){v.useContext(yi).static||v.useLayoutEffect(e)}function lu(){let{isDataRoute:e}=v.useContext(Pi);return e?Az():fz()}function fz(){_t(_o(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(zo),{basename:t,navigator:i}=v.useContext(yi),{matches:s}=v.useContext(Pi),{pathname:o}=Nr(),u=JSON.stringify(Bp(s)),c=v.useRef(!1);return FO(()=>{c.current=!0}),v.useCallback((f,g={})=>{if(Hn(c.current,HO),!c.current)return;if(typeof f=="number"){i.go(f);return}let y=id(f,JSON.parse(u),o,g.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Di([t,y.pathname])),Kl(typeof f=="string"?f:Fr(f),i.createHref(y),sb(i),"reject"),(g.replace?i.replace:i.push)(y,g.state,g)},[t,i,u,o,e])}var hz=v.createContext(null);function pz(e){let t=v.useContext(Pi).outlet;return v.useMemo(()=>t&&v.createElement(hz.Provider,{value:e},t),[t,e])}function gz(){let{matches:e}=v.useContext(Pi);return e[e.length-1]?.params??{}}function ld(e,{relative:t}={}){let{matches:i}=v.useContext(Pi),{pathname:s}=Nr(),o=JSON.stringify(Bp(i));return v.useMemo(()=>id(e,JSON.parse(o),s,t==="path"),[e,o,s,t])}function mz(e,t,i){_t(_o(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(yi),{matches:o}=v.useContext(Pi),u=o[o.length-1],c=u?u.params:{},d=u?u.pathname:"/",f=u?u.pathnameBase:"/",g=u&&u.route;{let E=g&&g.path||"";KO(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.
12
-
13
- Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let y=Nr(),p;p=y;let x=p.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})):hO(e,{pathname:S});return Hn(g||w!=null,`No routes matched location "${p.pathname}${p.search}${p.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 "${p.pathname}${p.search}${p.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.`),Sz(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},c,E.params),pathname:Di([f,s.encodeLocation?s.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:Di([f,s.encodeLocation?s.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),o,i)}function yz(){let e=Cz(),t=Uc(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},u={padding:"2px 4px",backgroundColor:s},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:u},"ErrorBoundary")," or"," ",v.createElement("code",{style:u},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),i?v.createElement("pre",{style:o},i):null,c)}var vz=v.createElement(yz,null),BO=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,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=uz(e.digest);i&&(e=i)}let t=e!==void 0?v.createElement(Pi.Provider,{value:this.props.routeContext},v.createElement(cb.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(bz,{error:e},t):t}};BO.contextType=LO;var ay=new WeakMap;function bz({children:e,error:t}){let{basename:i,navigator:s}=v.useContext(yi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=lz(t.digest);if(o){let u=ay.get(t);if(u)throw u;let c=wO(o.location,i),d=c.absoluteURL||c.to;if(Kl(o.location,d,sb(s),"allow-explicit"),Hy(d))throw new Error("Invalid redirect location");if(SO&&!ay.get(t))if(c.isExternal||o.reloadDocument)window.location.href=d;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:o.replace}));throw ay.set(t,f),f}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function xz({routeContext:e,match:t,children:i}){let s=v.useContext(zo);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(Pi.Provider,{value:e},i)}function Sz(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,u=s?.errors;if(u!=null){let y=o.findIndex(p=>p.route.id&&u?.[p.route.id]!==void 0);_t(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let c=!1,d=-1;if(i&&s){c=s.renderFallback;for(let y=0;y<o.length;y++){let p=o[y];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=y),p.route.id){let{loaderData:x,errors:S}=s,w=p.route.loader&&!x.hasOwnProperty(p.route.id)&&(!S||S[p.route.id]===void 0);if(p.route.lazy||w){i.isStatic&&(c=!0),d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}}let f=i?.onError,g=s&&f?(y,p)=>{f(y,{location:s.location,params:s.matches?.[0]?.params??{},pattern:ad(s.matches),errorInfo:p})}:void 0;return o.reduceRight((y,p,x)=>{let S,w=!1,C=null,E=null;s&&(S=u&&p.route.id?u[p.route.id]:void 0,C=p.route.errorElement||vz,c&&(d<0&&x===0?(KO("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,E=null):d===x&&(w=!0,E=p.route.hydrateFallbackElement||null)));let R=t.concat(o.slice(0,x+1)),O=()=>{let A;return S?A=C:w?A=E:p.route.Component?A=v.createElement(p.route.Component,null):p.route.element?A=p.route.element:A=y,v.createElement(xz,{match:p,routeContext:{outlet:y,matches:R,isDataRoute:s!=null},children:A})};return s&&(p.route.ErrorBoundary||p.route.errorElement||x===0)?v.createElement(BO,{location:s.location,revalidation:s.revalidation,component:C,error:S,children:O(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:g}):O()},null)}function db(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function VO(e){let t=v.useContext(zo);return _t(t,db(e)),t}function fb(e){let t=v.useContext(od);return _t(t,db(e)),t}function wz(e){let t=v.useContext(Pi);return _t(t,db(e)),t}function hb(e){let t=wz(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 Ez(){return hb("useRouteId")}function Rz(){let{matches:e,loaderData:t}=fb("useMatches");return v.useMemo(()=>e.map(i=>pO(i,t)),[e,t])}function Cz(){let e=v.useContext(cb),t=fb("useRouteError"),i=hb("useRouteError");return e!==void 0?e:t.errors?.[i]}var Tz=0;function Oz(e){let{router:t,basename:i}=VO("useBlocker"),s=fb("useBlocker"),[o,u]=v.useState(""),c=v.useCallback(d=>{if(typeof e!="function")return!!e;if(i==="/")return e(d);let{currentLocation:f,nextLocation:g,historyAction:y}=d;return e({currentLocation:{...f,pathname:Jr(f.pathname,i)||f.pathname},nextLocation:{...g,pathname:Jr(g.pathname,i)||g.pathname},historyAction:y})},[i,e]);return v.useEffect(()=>{let d=String(++Tz);return u(d),()=>t.deleteBlocker(d)},[t]),v.useEffect(()=>{o!==""&&t.getBlocker(o,c)},[t,o,c]),o&&s.blockers.has(o)?s.blockers.get(o):Nl}function Az(){let{router:e}=VO("useNavigate"),t=hb("useNavigate"),i=v.useRef(!1);return FO(()=>{i.current=!0}),v.useCallback(async(o,u={})=>{Hn(i.current,HO),i.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...u}))},[e,t])}var OE={};function KO(e,t,i){!t&&!OE[e]&&(OE[e]=!0,Hn(!1,i))}var AE={};function ME(e,t){!e&&!AE[t]&&(AE[t]=!0,console.warn(t))}var Mz="useOptimistic",kE=NR[Mz],kz=()=>{};function Nz(e){return kE?kE(e):[e,kz]}function Dz(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:v.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:v.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:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var jz=["HydrateFallback","hydrateFallbackElement"],Iz=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 Pz({router:e,flushSync:t,onError:i,useTransitions:s}){s=zO()||s;let[u,c]=v.useState(e.state),[d,f]=Nz(u),[g,y]=v.useState(),[p,x]=v.useState({isTransitioning:!1}),[S,w]=v.useState(),[C,E]=v.useState(),[R,O]=v.useState(),A=v.useRef(new Map),M=v.useCallback((k,{deletedFetchers:_,newErrors:L,flushSync:q,viewTransitionOpts:X})=>{L&&i&&Object.values(L).forEach(H=>i(H,{location:k.location,params:k.matches[0]?.params??{},pattern:ad(k.matches)})),k.fetchers.forEach((H,U)=>{H.data!==void 0&&A.current.set(U,H.data)}),_.forEach(H=>A.current.delete(H)),ME(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(ME(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(()=>c(k)):s===!1?c(k):v.startTransition(()=>{s===!0&&f(H=>NE(H,k)),c(k)});return}if(t&&q){t(()=>{C&&(S?.resolve(),C.skipTransition()),x({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let H=e.window.document.startViewTransition(()=>{t(()=>c(k))});H.finished.finally(()=>{t(()=>{w(void 0),E(void 0),y(void 0),x({isTransitioning:!1})})}),t(()=>E(H));return}C?(S?.resolve(),C.skipTransition(),O({state:k,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(y(k),x({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[e.window,t,C,S,s,f,i]);v.useLayoutEffect(()=>e.subscribe(M),[e,M]),v.useEffect(()=>{p.isTransitioning&&!p.flushSync&&w(new Iz)},[p]),v.useEffect(()=>{if(S&&g&&e.window){let k=g,_=S.promise,L=e.window.document.startViewTransition(async()=>{s===!1?c(k):v.startTransition(()=>{s===!0&&f(q=>NE(q,k)),c(k)}),await _});L.finished.finally(()=>{w(void 0),E(void 0),y(void 0),x({isTransitioning:!1})}),E(L)}},[g,S,e.window,s,f]),v.useEffect(()=>{S&&g&&d.location.key===g.location.key&&S.resolve()},[S,C,d.location,g]),v.useEffect(()=>{!p.isTransitioning&&R&&(y(R.state),x({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}),O(void 0))},[p.isTransitioning,R]);let N=v.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:k=>e.navigate(k),push:(k,_,L)=>e.navigate(k,{state:_,preventScrollReset:L?.preventScrollReset}),replace:(k,_,L)=>e.navigate(k,{replace:!0,state:_,preventScrollReset:L?.preventScrollReset})}),[e]),j=e.basename||"/",D=v.useMemo(()=>({router:e,navigator:N,static:!1,basename:j,onError:i}),[e,N,j,i]);return v.createElement(v.Fragment,null,v.createElement(zo.Provider,{value:D},v.createElement(od.Provider,{value:d},v.createElement(_O.Provider,{value:A.current},v.createElement(ub.Provider,{value:p},v.createElement(Uz,{basename:j,location:d.location,navigationType:d.historyAction,navigator:N,useTransitions:s},v.createElement(Lz,{routes:e.routes,manifest:e.manifest,future:e.future,state:d,isStatic:!1,onError:i})))))),null)}function NE(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 Lz=v.memo(zz);function zz({routes:e,manifest:t,future:i,state:s,isStatic:o,onError:u}){return mz(e,void 0,{manifest:t,state:s,isStatic:o,onError:u})}function _z({to:e,replace:t,state:i,relative:s}){_t(_o(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:u}=v.useContext(yi);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:c}=v.useContext(Pi),{pathname:d}=Nr(),f=lu(),g=id(e,Bp(c),d,s==="path");Kl(typeof e=="string"?e:Fr(e),u.createHref(g),sb(u),"reject");let y=JSON.stringify(g);return v.useEffect(()=>{f(JSON.parse(y),{replace:t,state:i,relative:s})},[f,y,s,t,i]),null}function qO(e){return pz(e.context)}function Uz({basename:e="/",children:t=null,location:i,navigationType:s="POP",navigator:o,static:u=!1,useTransitions:c}){_t(!_o(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=v.useMemo(()=>({basename:d,navigator:o,static:u,useTransitions:c,future:{}}),[d,o,u,c]);typeof i=="string"&&(i=Zi(i));let{pathname:g="/",search:y="",hash:p="",state:x=null,key:S="default",mask:w}=i,C=v.useMemo(()=>{let E=Jr(g,d);return E==null?null:{location:{pathname:E,search:y,hash:p,state:x,key:S,mask:w},navigationType:s}},[d,g,y,p,x,S,s,w]);return Hn(C!=null,`<Router basename="${d}"> is not able to match the URL "${g}${y}${p}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:v.createElement(yi.Provider,{value:f},v.createElement(Vp.Provider,{children:t,value:C}))}var Sh="get",wh="application/x-www-form-urlencoded";function Kp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Hz(e){return Kp(e)&&e.tagName.toLowerCase()==="button"}function Fz(e){return Kp(e)&&e.tagName.toLowerCase()==="form"}function Bz(e){return Kp(e)&&e.tagName.toLowerCase()==="input"}function Vz(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Kz(e,t){return e.button===0&&(!t||t==="_self")&&!Vz(e)}function By(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 qz(e,t){let i=By(e);return t&&t.forEach((s,o)=>{i.has(o)||t.getAll(o).forEach(u=>{i.append(o,u)})}),i}var eh=null;function Yz(){if(eh===null)try{new FormData(document.createElement("form"),0),eh=!1}catch{eh=!0}return eh}var Gz=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function oy(e){return e!=null&&!Gz.has(e)?(Hn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wh}"`),null):e}function $z(e,t){let i,s,o,u,c;if(Fz(e)){let d=e.getAttribute("action");s=d?Jr(d,t):null,i=e.getAttribute("method")||Sh,o=oy(e.getAttribute("enctype"))||wh,u=new FormData(e)}else if(Hz(e)||Bz(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?Jr(f,t):null,i=e.getAttribute("formmethod")||d.getAttribute("method")||Sh,o=oy(e.getAttribute("formenctype"))||oy(d.getAttribute("enctype"))||wh,u=new FormData(d,e),!Yz()){let{name:g,type:y,value:p}=e;if(y==="image"){let x=g?`${g}.`:"";u.append(`${x}x`,"0"),u.append(`${x}y`,"0")}else g&&u.append(g,p)}}else{if(Kp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Sh,s=null,o=wh,c=e}return u&&o==="text/plain"&&(c=u,u=void 0),{action:s,method:i.toLowerCase(),encType:o,formData:u,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function pb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function YO(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&&Jr(o.pathname,t)==="/"?o.pathname=`${tu(t)}/_root.${s}`:o.pathname=`${tu(o.pathname)}.${s}`,o}async function Qz(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 Xz(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 Zz(e,t,i){let s=await Promise.all(e.map(async o=>{let u=t.routes[o.route.id];if(u){let c=await Qz(u,i);return c.links?c.links():[]}return[]}));return t_(s.flat(1).filter(Xz).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function DE(e,t,i,s,o,u){let c=(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 u==="assets"?t.filter((f,g)=>c(f,g)||d(f,g)):u==="data"?t.filter((f,g)=>{let y=s.routes[f.route.id];if(!y||!y.hasLoader)return!1;if(c(f,g)||d(f,g))return!0;if(f.route.shouldRevalidate){let p=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 p=="boolean")return p}return!0}):[]}function Wz(e,t,{includeHydrateFallback:i}={}){return Jz(e.map(s=>{let o=t.routes[s.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),i&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function Jz(e){return[...new Set(e)]}function e_(e){let t={},i=Object.keys(e).sort();for(let s of i)t[s]=e[s];return t}function t_(e,t){let i=new Set;return new Set(t),e.reduce((s,o)=>{let u=JSON.stringify(e_(o));return i.has(u)||(i.add(u),s.push({key:u,link:o})),s},[])}function gb(){let e=v.useContext(zo);return pb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function n_(){let e=v.useContext(od);return pb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var mb=v.createContext(void 0);mb.displayName="FrameworkContext";function qp(){let e=v.useContext(mb);return pb(e,"You must render this element inside a <HydratedRouter> element"),e}function r_(e,t){let i=v.useContext(mb),[s,o]=v.useState(!1),[u,c]=v.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:g,onMouseLeave:y,onTouchStart:p}=t,x=v.useRef(null);v.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=R=>{R.forEach(O=>{c(O.isIntersecting)})},E=new IntersectionObserver(C,{threshold:.5});return x.current&&E.observe(x.current),()=>{E.disconnect()}}},[e]),v.useEffect(()=>{if(s){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[s]);let S=()=>{o(!0)},w=()=>{o(!1),c(!1)};return i?e!=="intent"?[u,x,{}]:[u,x,{onFocus:pc(d,S),onBlur:pc(f,w),onMouseEnter:pc(g,S),onMouseLeave:pc(y,w),onTouchStart:pc(p,S)}]:[!1,x,{}]}function pc(e,t){return i=>{e&&e(i),i.defaultPrevented||t(i)}}function i_({page:e,...t}){let i=zO(),{nonce:s}=qp(),{router:o}=gb(),u=v.useMemo(()=>hO(o.routes,e,o.basename),[o.routes,e,o.basename]);return u?(t.nonce==null&&s&&(t={...t,nonce:s}),i?v.createElement(a_,{page:e,matches:u,...t}):v.createElement(o_,{page:e,matches:u,...t})):null}function s_(e){let{manifest:t,routeModules:i}=qp(),[s,o]=v.useState([]);return v.useEffect(()=>{let u=!1;return Zz(e,t,i).then(c=>{u||o(c)}),()=>{u=!0}},[e,t,i]),s}function a_({page:e,matches:t,...i}){let s=Nr(),{future:o}=qp(),{basename:u}=gb(),c=v.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let d=YO(e,u,o.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,g=[];for(let y of t)typeof y.route.shouldRevalidate=="function"?f=!0:g.push(y.route.id);return f&&g.length>0&&d.searchParams.set("_routes",g.join(",")),[d.pathname+d.search]},[u,o.v8_trailingSlashAwareDataRequests,e,s,t]);return v.createElement(v.Fragment,null,c.map(d=>v.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...i})))}function o_({page:e,matches:t,...i}){let s=Nr(),{future:o,manifest:u,routeModules:c}=qp(),{basename:d}=gb(),{loaderData:f,matches:g}=n_(),y=v.useMemo(()=>DE(e,t,g,u,s,"data"),[e,t,g,u,s]),p=v.useMemo(()=>DE(e,t,g,u,s,"assets"),[e,t,g,u,s]),x=v.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let C=new Set,E=!1;if(t.forEach(O=>{let A=u.routes[O.route.id];!A||!A.hasLoader||(!y.some(M=>M.route.id===O.route.id)&&O.route.id in f&&c[O.route.id]?.shouldRevalidate||A.hasClientLoader?E=!0:C.add(O.route.id))}),C.size===0)return[];let R=YO(e,d,o.v8_trailingSlashAwareDataRequests,"data");return E&&C.size>0&&R.searchParams.set("_routes",t.filter(O=>C.has(O.route.id)).map(O=>O.route.id).join(",")),[R.pathname+R.search]},[d,o.v8_trailingSlashAwareDataRequests,f,s,u,y,t,e,c]),S=v.useMemo(()=>Wz(p,u),[p,u]),w=s_(p);return v.createElement(v.Fragment,null,x.map(C=>v.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...i})),S.map(C=>v.createElement("link",{key:C,rel:"modulepreload",href:C,...i})),w.map(({key:C,link:E})=>v.createElement("link",{key:C,nonce:i.nonce,...E,crossOrigin:E.crossOrigin??i.crossOrigin})))}function l_(...e){return t=>{e.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})}}var u_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{u_&&(window.__reactRouterVersion="7.18.5")}catch{}function c_(e,t){return j5({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:QL({window:t?.window}),hydrationData:d_(),routes:e,mapRouteProperties:Dz,hydrationRouteProperties:jz,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function d_(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:f_(e.errors)}),e}function f_(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 sd(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(typeof o.__subType=="string"&&v5.includes(o.__subType)){let u=window[o.__subType];if(typeof u=="function")try{let c=new u(o.message);c.stack="",i[s]=c}catch{}}if(i[s]==null){let u=new Error(o.message);u.stack="",i[s]=u}}else i[s]=o;return i}var ud=v.forwardRef(function({onClick:t,discover:i="render",prefetch:s="none",relative:o,reloadDocument:u,replace:c,mask:d,state:f,target:g,to:y,preventScrollReset:p,viewTransition:x,defaultShouldRevalidate:S,...w},C){let{basename:E,navigator:R,useTransitions:O}=v.useContext(yi),A=typeof y=="string"&&Hp.test(y),M=wO(y,E);y=M.to;let N=cz(y,{relative:o}),j=Nr(),D=null;if(d){let U=id(d,[],j.mask?j.mask.pathname:"/",!0);E!=="/"&&(U.pathname=U.pathname==="/"?E:Di([E,U.pathname])),D=R.createHref(U)}let[k,_,L]=r_(s,w),q=g_(y,{replace:c,mask:d,state:f,target:g,preventScrollReset:p,relative:o,viewTransition:x,defaultShouldRevalidate:S,useTransitions:O});function X(U){t&&t(U),U.defaultPrevented||q(U)}let B=!(M.isExternal||u),H=v.createElement("a",{...w,...L,href:(B?D:void 0)||M.absoluteURL||N,onClick:B?X:t,ref:l_(C,_),target:g,"data-discover":!A&&i==="render"?"true":void 0});return k&&!A?v.createElement(v.Fragment,null,H,v.createElement(i_,{page:N})):H});ud.displayName="Link";var Tc=v.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:s="",end:o=!1,style:u,to:c,viewTransition:d,children:f,...g},y){let p=ld(c,{relative:g.relative}),x=Nr(),S=v.useContext(od),{navigator:w,basename:C}=v.useContext(yi),E=S!=null&&w_(p)&&d===!0,R=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,O=x.pathname,A=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;i||(O=O.toLowerCase(),A=A?A.toLowerCase():null,R=R.toLowerCase()),A&&C&&(A=Jr(A,C)||A);const M=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let N=O===R||!o&&O.startsWith(R)&&O.charAt(M)==="/",j=A!=null&&(A===R||!o&&A.startsWith(R)&&A.charAt(R.length)==="/"),D={isActive:N,isPending:j,isTransitioning:E},k=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 u=="function"?u(D):u;return v.createElement(ud,{...g,"aria-current":k,className:_,ref:y,style:L,to:c,viewTransition:d},typeof f=="function"?f(D):f)});Tc.displayName="NavLink";var h_=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:i,reloadDocument:s,replace:o,state:u,method:c=Sh,action:d,onSubmit:f,relative:g,preventScrollReset:y,viewTransition:p,defaultShouldRevalidate:x,...S},w)=>{let{useTransitions:C}=v.useContext(yi),E=b_(),R=x_(d,{relative:g}),O=c.toLowerCase()==="get"?"get":"post",A=typeof d=="string"&&Hp.test(d),M=N=>{if(f&&f(N),N.defaultPrevented)return;N.preventDefault();let j=N.nativeEvent.submitter,D=j?.getAttribute("formmethod")||c,k=()=>E(j||N.currentTarget,{fetcherKey:t,method:D,navigate:i,replace:o,state:u,relative:g,preventScrollReset:y,viewTransition:p,defaultShouldRevalidate:x});C&&i!==!1?v.startTransition(()=>k()):k()};return v.createElement("form",{ref:w,method:O,action:R,onSubmit:s?f:M,...S,"data-discover":!A&&e==="render"?"true":void 0})});h_.displayName="Form";function p_(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function GO(e){let t=v.useContext(zo);return _t(t,p_(e)),t}function g_(e,{target:t,replace:i,mask:s,state:o,preventScrollReset:u,relative:c,viewTransition:d,defaultShouldRevalidate:f,useTransitions:g}={}){let y=lu(),p=Nr(),x=ld(e,{relative:c});return v.useCallback(S=>{if(Kz(S,t)){S.preventDefault();let w=i!==void 0?i:Fr(p)===Fr(x),C=()=>y(e,{replace:w,mask:s,state:o,preventScrollReset:u,relative:c,viewTransition:d,defaultShouldRevalidate:f});g?v.startTransition(()=>C()):C()}},[p,y,x,i,s,o,t,e,u,c,d,f,g])}function m_(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=v.useRef(By(e)),i=v.useRef(!1),s=Nr(),o=v.useMemo(()=>qz(s.search,i.current?null:t.current),[s.search]),u=lu(),c=v.useCallback((d,f)=>{const g=By(typeof d=="function"?d(new URLSearchParams(o)):d);i.current=!0,u("?"+g,f)},[u,o]);return[o,c]}var y_=0,v_=()=>`__${String(++y_)}__`;function b_(){let{router:e}=GO("useSubmit"),{basename:t}=v.useContext(yi),i=Ez(),s=e.fetch,o=e.navigate;return v.useCallback(async(u,c={})=>{let{action:d,method:f,encType:g,formData:y,body:p}=$z(u,t);if(c.navigate===!1){let x=c.fetcherKey||v_();await s(x,i,c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:p,formMethod:c.method||f,formEncType:c.encType||g,flushSync:c.flushSync})}else await o(c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:p,formMethod:c.method||f,formEncType:c.encType||g,replace:c.replace,state:c.state,fromRouteId:i,flushSync:c.flushSync,viewTransition:c.viewTransition})},[s,o,t,i])}function x_(e,{relative:t}={}){let{basename:i}=v.useContext(yi),s=v.useContext(Pi);_t(s,"useFormAction must be used inside a RouteContext");let[o]=s.matches.slice(-1),u={...ld(e||".",{relative:t})},c=Nr();if(e==null){u.search=c.search;let d=new URLSearchParams(u.search),f=d.getAll("index");if(f.some(y=>y==="")){d.delete("index"),f.filter(p=>p).forEach(p=>d.append("index",p));let y=d.toString();u.search=y?`?${y}`:""}}return(!e||e===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(u.pathname=u.pathname==="/"?i:Di([i,u.pathname])),Fr(u)}function S_(e,t){let{capture:i}={};v.useEffect(()=>{let s=i!=null?{capture:i}:void 0;return window.addEventListener("beforeunload",e,s),()=>{window.removeEventListener("beforeunload",e,s)}},[e,i])}function w_(e,{relative:t}={}){let i=v.useContext(ub);_t(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=GO("useViewTransitionState"),o=ld(e,{relative:t});if(!i.isTransitioning)return!1;let u=Jr(i.currentLocation.pathname,s)||i.currentLocation.pathname,c=Jr(i.nextLocation.pathname,s)||i.nextLocation.pathname;return _c(o.pathname,c)!=null||_c(o.pathname,u)!=null}function E_(e){return v.createElement(Pz,{flushSync:cr.flushSync,...e})}function qs({controlled:e,default:t,name:i,state:s="value"}){const{current:o}=v.useRef(e!==void 0),[u,c]=v.useState(()=>t),d=o&&e!==void 0?e:u,f=v.useCallback(g=>{o||c(g)},[]);return[d,f]}function R_(e){const{open:t,defaultOpen:i=!1,onOpenChange:s,disabled:o}=e,[u,c]=qs({controlled:t,default:i,name:"Collapsible",state:"open"}),{mounted:d,setMounted:f,transitionStatus:g}=Po(u,!0,!0),y=dr(),[p,x]=v.useState(),S=p===null?void 0:p??y,w=Fe(C=>{const E=!u,R=ut($i,C.nativeEvent);s(E,R),!R.isCanceled&&c(E)});return v.useMemo(()=>({defaultPanelId:y,disabled:o,handleTrigger:w,mounted:d,open:u,panelId:S,setMounted:f,setOpen:c,setPanelIdState:x,transitionStatus:g}),[y,o,w,d,u,S,f,c,x,g])}const $O=v.createContext(void 0);function QO(){const e=v.useContext($O);if(e===void 0)throw new Error(bn(15));return e}const C_="data-open",T_="data-closed",th=bv,O_="data-panel-open",A_={[C_]:""},M_={[T_]:""},k_={open(e){return e?{[O_]:""}:null}},N_={open(e){return e?A_:M_}},XO={...N_,...ys},D_=v.forwardRef(function(t,i){const{render:s,className:o,defaultOpen:u=!1,disabled:c=!1,onOpenChange:d,open:f,style:g,...y}=t,p=Fe(d),x=R_({open:f,defaultOpen:u,onOpenChange:p,disabled:c}),S=v.useMemo(()=>({open:x.open,disabled:x.disabled,transitionStatus:x.transitionStatus}),[x.open,x.disabled,x.transitionStatus]),w=v.useMemo(()=>({...x,onOpenChange:p,state:S}),[x,p,S]),C=At("div",t,{state:S,ref:i,props:y,stateAttributesMapping:XO});return b.jsx($O.Provider,{value:w,children:C})}),ZO=v.createContext(void 0);function yb(e=!1){const t=v.useContext(ZO);if(t===void 0&&!e)throw new Error(bn(16));return t}function j_(e){const{focusableWhenDisabled:t,disabled:i,composite:s=!1,tabIndex:o=0,isNativeButton:u}=e,c=s&&t!==!1,d=s&&t===!1;return{props:v.useMemo(()=>{const g={onKeyDown(y){i&&t&&y.key!=="Tab"&&y.preventDefault()}};return s||(g.tabIndex=o,!u&&i&&(g.tabIndex=t?o:-1)),(u&&(t||c)||!u&&i)&&(g["aria-disabled"]=i),u&&(!t||d)&&(g.disabled=i),g},[s,i,t,c,d,u,o])}}function Mo(e,t,{detail:i=0,pointerType:s=""}={}){e.dispatchEvent(new(Rn(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 Li(e={}){const{disabled:t=!1,focusableWhenDisabled:i,tabIndex:s=0,native:o=!0,composite:u}=e,c=v.useRef(null),d=yb(!0),f=u??d!==void 0,{props:g}=j_({focusableWhenDisabled:i,disabled:t,composite:f,tabIndex:s,isNativeButton:o}),y=v.useCallback(()=>{const S=c.current;ly(S)&&f&&t&&g.disabled===void 0&&S.disabled&&(S.disabled=!1)},[t,g.disabled,f]);_e(y,[y]);const p=v.useCallback((S={})=>{const{onClick:w,onMouseDown:C,onKeyUp:E,onKeyDown:R,onPointerDown:O,...A}=S;return Mr({onClick(M){if(t){M.preventDefault();return}w?.(M)},onMouseDown(M){t||C?.(M)},onKeyDown(M){if(t||(zh(M),R?.(M),M.baseUIHandlerPrevented))return;const N=M.target===M.currentTarget,j=M.currentTarget,D=ly(j),k=!o&&I_(j),_=N&&(o?D:!k),L=M.key==="Enter",q=M.key===" ",X=j.getAttribute("role"),B=X?.startsWith("menuitem")||X==="option"||X==="gridcell";if(N&&f&&q){if(M.defaultPrevented&&B)return;M.preventDefault(),(!o||D)&&(M.preventBaseUIHandler(),Mo(j,M));return}if(!_||o||!q&&!L){N&&k&&q&&M.preventDefault();return}M.defaultPrevented||(M.preventDefault(),L&&(M.preventBaseUIHandler(),Mo(j,M)))},onKeyUp(M){if(!t){if(zh(M),E?.(M),M.target===M.currentTarget&&o&&f&&ly(M.currentTarget)&&M.key===" "){M.preventDefault();return}M.baseUIHandlerPrevented||M.target===M.currentTarget&&!o&&!f&&!M.defaultPrevented&&M.key===" "&&(M.preventBaseUIHandler(),Mo(M.currentTarget,M))}},onPointerDown(M){if(t){M.preventDefault();return}O?.(M)}},o?{type:"button"}:{role:"button"},g,A)},[t,g,f,o]),x=Fe(S=>{c.current=S,y()});return{getButtonProps:p,buttonRef:x}}function ly(e){return vn(e)&&e.tagName==="BUTTON"}function I_(e){return vn(e)&&e.tagName==="A"&&!!e.href}const P_={...k_,...ys},L_=v.forwardRef(function(t,i){const{panelId:s,open:o,handleTrigger:u,state:c,disabled:d}=QO(),{className:f,disabled:g=d,render:y,nativeButton:p=!0,style:x,...S}=t,{getButtonProps:w,buttonRef:C}=Li({disabled:g,native:p});return At("button",t,{state:c,ref:[i,C],props:[{"aria-controls":o?s:void 0,"aria-expanded":o,onClick:u},S,w],stateAttributesMapping:P_})}),Ml={height:void 0,width:void 0};function z_(e){const{externalRef:t,hiddenUntilFound:i,id:s,keepMounted:o,mounted:u,onOpenChange:c,open:d,setMounted:f,setOpen:g,transitionStatus:y}=e,p=v.useRef(null),x=v.useRef(null),[S,w]=v.useState(Ml),C=v.useRef(Ml),E=v.useRef(!1),R=v.useRef(d),O=v.useRef(!1),[A,M]=v.useState(!1),N=v.useRef(null),j=Wr(t,p),D=Ln(d),k=Ep(p),_=!d&&!u,L=A?"idle":y,q=d&&(R.current||O.current),X=!d&&u&&x.current==="css-animation"&&S.height===void 0&&S.width===void 0?C.current:S,B=i&&_&&x.current!=="css-animation",H=Fe((K,Y=!0)=>{Y&&(C.current=K),w(K)}),U=Fe(()=>{N.current?.(),N.current=null}),z=Fe(K=>{U(),N.current=()=>{N.current=null,K()}}),Q=Fe(()=>{d&&u&&x.current==="css-animation"&&(O.current=!0)});_e(()=>{!A||y==="starting"||M(!1)},[A,y]),v.useEffect(()=>()=>{Q(),U()},[Q,U]),_e(()=>{d||(R.current=!1,O.current=!1);const K=p.current;if(!K)return;!d&&N.current&&U();const Y=__(K,q);if(x.current=Y,d&&y==="idle"&&R.current&&Y==="css-animation"){C.current=kl(K);return}if(d&&y==="starting"){const oe=E.current;if(E.current=!1,Y==="none"){H(kl(K)),M(!0);return}if(Y==="css-transition"){const J=U_(K);if(H(kl(K)),!oe)return J;const re=nh(K,"transition-duration","0s");return z(re),M(!0),J}H(kl(K));const I=nh(K,"animation-name","none");if(!oe){I();return}const V=nh(K,"animation-duration","0s");I(),z(V),M(!0);return}if(!d&&u&&(y==="idle"||y==="starting")){if(Y==="none"){H(Ml,!1),f(!1);return}H(kl(K));return}if(y!=="ending")return;if(Y==="none"){f(!1);return}const ee=kl(K);if(!(ee.height>0||ee.width>0)){f(!1);return}H(ee),Y==="css-animation"&&nh(K,"animation-name","none")()},[u,d,U,H,f,z,q,y]),Ii({enabled:d&&u&&L==="idle",open:!0,ref:p,onComplete(){d&&H(Ml,!1)}}),v.useEffect(()=>{if(d||!u||L!=="ending")return;if(!p.current){f(!1),H(Ml,!1);return}const Y=new AbortController;let ee=-1;function G(){D.current||(f(!1),H(Ml,!1))}return ee=Or.request(()=>{k(G,Y.signal)}),()=>{Or.cancel(ee),Y.abort()}},[D,u,d,L,k,H,f]),_e(()=>{const K=p.current;!K||!i||!_||K.setAttribute("hidden","until-found")},[_,i]),v.useEffect(function(){const Y=p.current;if(!Y)return;const ee=ji.create();let G=-1;const oe=(J,re)=>{ee.start(0,()=>{D.current||(G=Or.request(()=>{D.current||(J&&(E.current=!1),re&&Y.setAttribute(th,""),Y.setAttribute("hidden","until-found"))}))})},V=Lt(Y,"beforematch",J=>{const re=ut(kr,J);if(c(!0,re),re.isCanceled){oe(!1,!1);return}E.current=!0;const Ee=Y.hasAttribute(th);Y.removeAttribute(th),g(!0),oe(!0,Ee)});return()=>{ee.clear(),Or.cancel(G),V()}},[D,c,g]);const $=o||i||u||d;return{height:X.height,props:{...B?{[th]:""}:void 0,hidden:_,id:s},ref:j,shouldPreventOpenAnimation:q,shouldRender:$,transitionStatus:L,width:X.width}}function kl(e){return{height:e.scrollHeight,width:e.scrollWidth}}function __(e,t){const i=Rn(e).getComputedStyle(e),s=(i.animationName.split(",").map(u=>u.trim()).some(u=>u!==""&&u!=="none")||t)&&jE(i.animationDuration),o=jE(i.transitionDuration);return s&&o||o?"css-transition":s?"css-animation":"none"}function jE(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function nh(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 U_(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,u])=>{if(u===""){e.style.removeProperty(o);return}e.style.setProperty(o,u)})}const s=Or.request(i);return()=>{Or.cancel(s),i()}}const H_="--collapsible-panel-height",F_="--collapsible-panel-width",B_=v.forwardRef(function(t,i){const{className:s,hiddenUntilFound:o,keepMounted:u,render:c,id:d,style:f,...g}=t,{defaultPanelId:y,mounted:p,onOpenChange:x,open:S,setMounted:w,setPanelIdState:C,setOpen:E,state:R,transitionStatus:O}=QO(),A=o??!1,M=u??!1,N=d||void 0,j=N??y;_e(()=>(C(Q=>N??(Q===null?void 0:Q)),()=>{C(Q=>Q===N?null:Q)}),[N,C]);const{height:D,props:k,ref:_,shouldPreventOpenAnimation:L,shouldRender:q,transitionStatus:X,width:B}=z_({externalRef:i,hiddenUntilFound:A,id:j,keepMounted:M,mounted:p,onOpenChange:x,open:S,setMounted:w,setOpen:E,transitionStatus:O}),H={...R,transitionStatus:X},U=iC(f,H),z=At("div",{...t,style:void 0},{state:H,ref:_,props:[k,{style:{[H_]:D===void 0?"auto":`${D}px`,[F_]:B===void 0?"auto":`${B}px`}},g,U?{style:U}:void 0,L?{style:{animationName:"none"}}:void 0],stateAttributesMapping:XO});return q?z:null});function V_({...e}){return b.jsx(D_,{"data-slot":"collapsible",...e})}function K_({...e}){return b.jsx(L_,{"data-slot":"collapsible-trigger",...e})}function q_({...e}){return b.jsx(B_,{"data-slot":"collapsible-content",...e})}const WO=v.createContext(void 0);function Y_(e){const t=v.useContext(WO);if(t===void 0)throw new Error(bn(33));return t}const Yp=v.createContext(void 0);function Gs(e){const t=v.useContext(Yp);if(t===void 0&&!e)throw new Error(bn(36));return t}const JO=v.createContext(void 0);function Gp(e=!0){const t=v.useContext(JO);if(t===void 0&&!e)throw new Error(bn(25));return t}const eA=v.createContext(null);function $p(e="root"){const t=v.useContext(eA),i=v.useContext(Yp);return t===null||i===void 0?null:(e==="submenu-trigger"?i.virtualFocus||i.parentVirtualFocus:i.virtualFocus)?t:null}const G_={visible:!0,ref:null};function $_(){return G_}function tA(e,t,i="root"){const s=$p(i),u=((i==="submenu-trigger"?s?.useSubmenuTrigger:s?.useItem)??$_)({label:e.label,children:e.children,render:e.render}),c=Wr(t,u.ref);return{visible:u.visible,ref:c,props:u.props}}function Q_(e){e.preventDefault()}function X_(e){const{closeOnClick:t,highlighted:i,id:s,nodeId:o,store:u,typingRef:c,itemRef:d,itemMetadata:f}=e,g=Gs(),y=Gp(!0),p=f.type==="submenu-trigger",x=p?g.parentVirtualFocus:g.virtualFocus,w=(p&&g.parent.type==="menu"?g.parent.store:g.store).useState("webkitAriaSelected",i),{events:C}=u.useState("floatingTreeRoot"),E=u.useState("open"),R=y!==void 0,O=!x&&E&&i?0:-1;return v.useMemo(()=>({id:s,role:"menuitem",tabIndex:O,"aria-selected":w,onMouseDown:x?Q_:void 0,onKeyDown(A){A.key===" "&&c?.current&&A.preventDefault()},onMouseMove(A){o&&C.emit("itemhover",{nodeId:o,target:A.currentTarget})},onClick(A){t&&C.emit("close",{domEvent:A.nativeEvent,reason:Ao})},onMouseUp(A){if(y){const M=y.initialCursorPointRef.current;if(y.initialCursorPointRef.current=null,R&&M&&Math.abs(A.clientX-M.x)<=1&&Math.abs(A.clientY-M.y)<=1||R&&!fv&&A.button===2)return}d.current&&u.context.allowMouseUpTriggerRef.current&&(!R||A.button===2)&&f.type==="regular-item"&&Mo(d.current,A,{detail:1,pointerType:"mouse"})}}),[t,O,s,C,o,u.context.allowMouseUpTriggerRef,c,d,y,R,f.type,w,x])}const nA={type:"regular-item"};function rA(e){const{closeOnClick:t,disabled:i,highlighted:s,id:o,store:u,typingRef:c=u.context.typingRef,nativeButton:d,itemMetadata:f,nodeId:g}=e,y=v.useRef(null),{getButtonProps:p,buttonRef:x}=Li({disabled:i,focusableWhenDisabled:!0,native:d,composite:!0}),S=X_({closeOnClick:t,highlighted:s,id:o,nodeId:g,store:u,typingRef:c,itemRef:y,itemMetadata:f}),w=v.useCallback(E=>Mr(S,{onMouseEnter(R){f.type==="submenu-trigger"&&f.setActive(R.nativeEvent)}},E,p),[S,p,f]),C=Wr(y,x);return v.useMemo(()=>({getItemProps:w,itemRef:C}),[w,C])}const iA=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Z_(){return v.useContext(iA)}function Qp(e={}){const{guess:t,label:i,metadata:s,textRef:o,index:u}=e,{register:c,unregister:d,subscribeMapChange:f,nextIndexRef:g}=Z_(),y=v.useRef(-1),[p,x]=v.useState(u==null&&t?()=>{if(y.current===-1){const E=g.current;g.current+=1,y.current=E}return y.current}:-1),S=u??p,w=v.useRef(null),C=v.useCallback(E=>{const R=w.current;R&&d(R),w.current=E,E&&c(E,{metadata:s??null,index:u??null,label:i,textRef:o})},[u,c,d,s,i,o]);return _e(()=>{if(u==null)return f(E=>{const R=w.current?E.get(w.current)?.index:null;R!=null&&x(R)})},[u,f]),{ref:C,index:S}}const W_="data-checked",J_="data-unchecked",sA={checked(e){return e?{[W_]:""}:{[J_]:""}},...ys},vb=v.createContext(void 0);function e6(){const e=v.useContext(vb);if(e===void 0)throw new Error(bn(31));return e}const t6=v.forwardRef(function(t,i){const{render:s,className:o,style:u,...c}=t,[d,f]=v.useState(void 0),g=At("div",t,{ref:i,props:{role:"group","aria-labelledby":d,...c}});return b.jsx(vb.Provider,{value:f,children:g})}),n6=v.forwardRef(function(t,i){const s=$p()?.Group??t6;return b.jsx(s,{...t,ref:i})}),r6=v.forwardRef(function(t,i){const{render:s,className:o,style:u,id:c,...d}=t,f=dr(c),g=e6();return _e(()=>(g(f),()=>{g(y=>y===f?void 0:y)}),[g,f]),At("div",t,{ref:i,props:{id:f,"aria-hidden":!0,...d}})}),i6=v.forwardRef(function(t,i){const{render:s,className:o,id:u,label:c,nativeButton:d=!1,disabled:f=!1,closeOnClick:g=!0,style:y,...p}=t,{store:x}=Gs(),S=Qp({guess:!0,label:c}),w=dr(u),C=x.useState("disabled"),E=x.useState("isActive",S.index),R=x.useState("floatingNodeId"),O=x.useState("itemProps"),A=f||C,{getItemProps:M,itemRef:N}=rA({closeOnClick:g,disabled:A,highlighted:E,id:w,store:x,nativeButton:d,nodeId:R,itemMetadata:nA});return At("div",t,{state:{disabled:A,highlighted:E},props:[O,p,M],ref:[N,i,S.ref]})}),aA=v.forwardRef(function(t,i){const s=tA(t,i);return s.visible?b.jsx(i6,{...t,ref:s.ref}):null}),s6=v.createContext(void 0);function Xp(e){return v.useContext(s6)}const Vy="ArrowUp",Ky="ArrowDown",qy="ArrowLeft",Yy="ArrowRight",Gy="Home",$y="End",cd=new Set([Vy,Ky,qy,Yy,Gy,$y]),oA="Shift",a6=[oA,"Control","Alt","Meta"];function o6(e){return vn(e)&&e.tagName==="INPUT"}function IE(e){return!!(o6(e)&&e.selectionStart!=null||vn(e)&&e.tagName==="TEXTAREA")}function PE(e,t,i,s){if(!e||!t||!t.scrollTo)return;let o=e.scrollLeft,u=e.scrollTop;const c=e.clientWidth<e.scrollWidth,d=e.clientHeight<e.scrollHeight;if(c&&s!=="vertical"){const f=LE(e,t,"left"),g=rh(e),y=rh(t);i==="ltr"&&(f+t.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight?o=f+t.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight:f-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft&&(o=f-y.scrollMarginLeft-g.scrollPaddingLeft)),i==="rtl"&&(f-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft?o=f-y.scrollMarginLeft-g.scrollPaddingLeft:f+t.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight&&(o=f+t.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight))}if(d&&s!=="horizontal"){const f=LE(e,t,"top"),g=rh(e),y=rh(t);f-y.scrollMarginTop<e.scrollTop+g.scrollPaddingTop?u=f-y.scrollMarginTop-g.scrollPaddingTop:f+t.offsetHeight+y.scrollMarginBottom>e.scrollTop+e.clientHeight-g.scrollPaddingBottom&&(u=f+t.offsetHeight+y.scrollMarginBottom-e.clientHeight+g.scrollPaddingBottom)}e.scrollTo({left:o,top:u,behavior:"auto"})}function LE(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 rh(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 l6=v.createContext(void 0);function u6(){return v.useContext(l6)}function c6(e,t){const i=Mv(e.render);if(v.isValidElement(i)){const s=i.props;if(Object.hasOwn(s,"id"))return s.id??""}return e.id??t}function d6(e,t,i){const s=c6(e,t),o=s===t?void 0:s,u=v.useCallback(c=>i?.(c?o:void 0),[o,i]);return[s,u]}function f6(e,t,i){const s=Mv(e.render),o=v.isValidElement(s)?s.props:void 0,u=e["aria-label"]??o?.["aria-label"];let c=e["aria-labelledby"]??o?.["aria-labelledby"];return c==null&&!u&&(c=t?t.id||void 0:i||void 0),c}const h6=v.forwardRef(function(t,i){const{render:s,className:o,style:u,finalFocus:c,id:d,initialFocus:f,...g}=t,{store:y,defaultFloatingId:p,setRenderedFloatingId:x,virtualFocus:S,orientation:w}=Gs(),C=u6(),{side:E,align:R}=Y_(),O=Xp()!=null,A=y.useState("open"),M=y.useState("transitionStatus"),N=y.useState("popupProps"),j=y.useState("mounted"),D=y.useState("instantType"),k=y.useState("activeTriggerElement"),_=y.useState("parent"),L=y.useState("lastOpenChangeReason"),q=y.useState("rootId"),X=y.useState("floatingRootContext"),B=y.useState("floatingTreeRoot"),H=y.useState("closeDelay"),U=y.useState("hoverEnabled"),z=y.useState("disabled"),Q=y.useState("openMethod"),$=y.useState("activeTriggerId"),K=y.useState("listElement"),[Y,ee]=d6(t,p,x),G=f6(t,k,$),oe=_.type==="menu"?C:void 0,I=_.type==="context-menu";let V=f??_.type!=="menu";f===void 0&&K&&_.type!=="menu"&&(V=()=>y.state.activeIndex!==null?!1:K),Ii({open:A,ref:y.context.popupRef,onComplete(){A&&y.context.onOpenChangeComplete?.(!0)}}),v.useEffect(()=>{function ve(Pe){y.setOpen(!1,ut(Pe.reason,Pe.domEvent))}return B.events.on("close",ve),()=>{B.events.off("close",ve)}},[B.events,y]),Hv(X,{enabled:U&&!z&&!I&&_.type!=="menubar",closeDelay:H});const J=y.useStateSetter("popupElement"),re=v.useContext(eA)?.useParentHandoff??g6,{parentVirtualFocusRef:Ee,handleFocus:le}=re(y,_,A,S),me={transitionStatus:M,side:E,align:R,open:A,nested:_.type==="menu",instant:D},ge=At("div",t,{state:me,ref:[i,y.context.popupRef,J,ee],stateAttributesMapping:gp,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&&cd.has(ve.key)&&ve.stopPropagation()},onFocus:le},rd(M),g,{"data-rootownerid":q}]});let ce=_.type===void 0||I;(k||_.type==="menubar"&&L!==mp)&&(ce=!0);const Te=oe?.getReturnElement??Ee;return b.jsx(wp,{context:X,openInteractionType:Q,modal:I,disabled:!j,returnFocus:c??Te??ce,explicitReturnFocus:c===void 0&&Te?!1:void 0,initialFocus:V,restoreFocus:!0,getInsideElements:_.type===void 0?()=>[y.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:_.type!=="menubar"?B:void 0,previousFocusableElement:k,nextFocusableElement:_.type===void 0?y.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:y.context.beforeContentFocusGuardRef,children:ge})}),p6={parentVirtualFocusRef:void 0,handleFocus:void 0};function g6(){return p6}const lA=v.forwardRef(function(t,i){const s=$p()?.Popup??h6;return b.jsx(s,{...t,ref:i})}),uA=v.createContext(void 0);function m6(){const e=v.useContext(uA);if(e===void 0)throw new Error(bn(32));return e}const cA=v.forwardRef(function(t,i){const{keepMounted:s=!1,...o}=t,{store:u,parent:c}=Gs();if(!(u.useState("mounted")||s))return null;const g=c.type==="menu"||c.type==="menubar"?"group":void 0;return b.jsx(uA.Provider,{value:s,children:b.jsx(Sp,{ref:i,...o,portalOwnerRole:g})})});function bb(e){const{children:t,elementsRef:i,labelsRef:s,onMapChange:o}=e,u=Fe(o),[,c]=v.useState(0),d=er(v6).current,f=er(y6).current,g=v.useRef(0),y=v.useRef(!0),p=v.useRef(null),x=v.useRef(null),S=Fe(()=>{y.current||(y.current=!0,c(N=>N+1))}),w=Fe((N,j)=>{f.set(N,j),S()}),C=Fe(N=>{f.delete(N),S()}),E=Fe(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 R(N){if(x.current?.disconnect(),x.current=null,typeof MutationObserver!="function"||N.length<2)return;const j=new MutationObserver(k=>{if(!S6(k))return;let _=null;for(const L of N)if(L.isConnected){if(_&&dA(_,L)>0){j.disconnect(),S();return}_=L}});x.current=j;const D=new Set;for(let k=1;k<N.length;k+=1){const _=x6(N[k-1],N[k]);_&&D.add(_)}D.forEach(k=>j.observe(k,{childList:!0}))}const O=Fe(()=>{const[N,j]=b6(f),D=E(N),k=p.current,_=!k||k.length!==N.length||N.some((L,q)=>{const X=k[q];return L.index!==X.index||L.element!==X.element||L.registration.index!==X.registration.index||L.registration.metadata!==X.registration.metadata});R(j),p.current=N,y.current=!1,_&&(d.forEach(L=>L(D)),u(D))});_e(()=>(!y.current&&p.current&&E(p.current),()=>{i.current=[],s&&(s.current=[])}),[i,s,E]),_e(()=>{y.current&&O()}),_e(()=>()=>{x.current?.disconnect(),y.current=!0},[]);const A=Fe(N=>(d.add(N),()=>{d.delete(N)})),M=v.useMemo(()=>({register:w,unregister:C,subscribeMapChange:A,nextIndexRef:g}),[w,C,A,g]);return b.jsx(iA.Provider,{value:M,children:t})}function y6(){return new Map}function v6(){return new Set}function b6(e){const t=new Set,i=[],s=[];e.forEach((u,c)=>{if(!c.isConnected)return;const d=u.index,f={index:d??-1,element:c,registration:u};d===null?s.push(f):d>=0&&(t.add(d),i.push(f))});let o=0;return s.sort((u,c)=>dA(u.element,c.element)),s.forEach(u=>{for(;t.has(o);)o+=1;u.index=o,i.push(u),o+=1}),t.size>0&&i.sort((u,c)=>u.index-c.index),[i,s.map(u=>u.element)]}function x6(e,t){let i=e.parentElement;for(;i&&!i.contains(t);)i=i.parentElement;return i}function S6(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 dA(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const Zp=v.forwardRef(function(t,i){const{cutout:s,...o}=t;let u;if(s){const c=s.getBoundingClientRect();u=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${c.left}px ${c.top}px,${c.left}px ${c.bottom}px,${c.right}px ${c.bottom}px,${c.right}px ${c.top}px,${c.left}px ${c.top}px)`}return b.jsx("div",{ref:i,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:u}})});function fA(e){const{store:t,domReference:i,positionerElement:s,open:o}=e,u=v.useRef(null),c=v.useRef(null),d=Ep(s);_e(()=>{o||(c.current?.abort(),c.current=null,t.state.instantType==="trigger-change"&&t.set("instantType",void 0))},[o,t]),_e(()=>{const f=i,g=u.current;if(f&&(u.current=f),!g||!f||f===g||!t.select("open"))return;t.set("instantType",void 0);const y=new AbortController;return c.current=y,d(()=>{t.select("open")&&t.set("instantType","trigger-change")},y.signal),()=>{y.abort()}},[i,d,t])}let zE={},_E={},UE="";function Wp(e,t){return $c(e)?e:t}function HE(e,t,i){return/hidden|clip/.test(e.getComputedStyle(Wp(t,i)).overflowY)}function w6(e){if(typeof document>"u")return!1;const t=$t(e);return Rn(t).innerWidth-t.documentElement.clientWidth>0}function E6(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const i=$t(e),s=i.documentElement,o=i.body,u=Wp(s,o),c=u.style.overflowY,d=s.style.scrollbarGutter;s.style.scrollbarGutter="stable",u.style.overflowY="scroll";const f=u.offsetWidth;u.style.overflowY="hidden";const g=u.offsetWidth;return u.style.overflowY=c,s.style.scrollbarGutter=d,f===g}function R6(e){const t=$t(e),i=t.documentElement,s=t.body,o=Wp(i,s),u={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,u)}}function C6(e){const t=$t(e),i=t.documentElement,s=t.body,o=Rn(i);let u=0,c=0,d=!1;const f=Or.create();if(ms&&(o.visualViewport?.scale??1)!==1)return()=>{};function g(){const S=o.getComputedStyle(i),w=o.getComputedStyle(s),R=(S.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";u=i.scrollTop,c=i.scrollLeft,zE={scrollbarGutter:i.style.scrollbarGutter,overflowY:i.style.overflowY,overflowX:i.style.overflowX},UE=i.style.scrollBehavior,_E={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,A=i.scrollWidth>i.clientWidth,M=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),k=parseFloat(w.marginTop)+parseFloat(w.marginBottom),_=parseFloat(w.marginLeft)+parseFloat(w.marginRight),L=Wp(i,s);if(d=E6(e),d){i.style.scrollbarGutter=R,L.style.overflowY="hidden",L.style.overflowX="hidden";return}Object.assign(i.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(O||M)&&(i.style.overflowY="scroll"),(A||N)&&(i.style.overflowX="scroll"),Object.assign(s.style,{position:"relative",height:k||D?`calc(100dvh - ${k+D}px)`:"100dvh",width:_||j?`calc(100vw - ${_+j}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),s.scrollTop=u,s.scrollLeft=c,i.setAttribute("data-base-ui-scroll-locked",""),i.style.scrollBehavior="unset"}function y(){Object.assign(i.style,zE),Object.assign(s.style,_E),d||(i.scrollTop=u,i.scrollLeft=c,i.removeAttribute("data-base-ui-scroll-locked"),i.style.scrollBehavior=UE)}function p(){y(),f.request(g)}g();const x=Lt(o,"resize",p);return()=>{f.cancel(),y(),typeof o.removeEventListener=="function"&&x()}}class T6{lockCount=0;restore=null;timeoutLock=ji.create();timeoutUnlock=ji.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=$t(t),s=i.documentElement,o=i.body,u=Rn(s);if(HE(u,s,o)){const d=new u.MutationObserver(()=>{HE(u,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 c=up||!w6(t);this.restore=c?R6(t):C6(t)}}const O6=new T6;function hA(e=!0,t=null){_e(()=>{if(e)return O6.acquire(t)},[e,t])}const A6=20;function xb(e,t,i,s){const[o,u]=v.useState(!1);_e(()=>{if(!e||!t||i==null){u(!1);return}const c=$t(i).documentElement.clientWidth,d=i.offsetWidth;u(c>0&&d>0&&d>=c-A6)},[e,t,i]),hA(e&&(!t||o),s)}const pA=v.forwardRef(function(t,i){const{anchor:s,positionMethod:o="absolute",className:u,render:c,side:d,align:f,sideOffset:g=0,alignOffset:y=0,collisionBoundary:p="clipping-ancestors",collisionPadding:x=5,arrowPadding:S=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:E=hC,style:R,...O}=t,{store:A,virtualFocus:M,syncHighlightedItem:N}=Gs(),j=m6(),D=Gp(!0),k=A.useState("parent"),_=A.useState("floatingRootContext"),L=A.useState("floatingTreeRoot"),q=A.useState("mounted"),X=A.useState("open"),B=A.useState("modal"),H=A.useState("openMethod"),U=A.useState("activeTriggerElement"),z=A.useState("transitionStatus"),Q=A.useState("positionerElement"),$=A.useState("instantType"),K=A.useState("adaptiveOrigin"),Y=A.useState("lastOpenChangeReason"),ee=A.useState("floatingNodeId"),G=A.useState("floatingParentNodeId"),oe=_.useState("domReferenceElement");let I=s,V=g,J=y,re=f,Ee=E;k.type==="context-menu"&&(I=s??k.context?.anchor,re=re??"start",!d&&re!=="center"&&(J=t.alignOffset??2,V=t.sideOffset??-5));let le=d,me=re;k.type==="menu"?(le=le??"inline-end",me=me??"start",Ee=t.collisionAvoidance??kv):k.type==="menubar"&&(le=le??(k.context.orientation==="vertical"?"inline-end":"bottom"),me=me??"start");const ge=k.type==="context-menu",ce=Pp({anchor:I,floatingRootContext:_,positionMethod:D?"fixed":o,mounted:q,side:le,sideOffset:V,align:me,alignOffset:J,arrowPadding:ge?0:S,collisionBoundary:p,collisionPadding:x,sticky:w,nodeId:ee,keepMounted:j,disableAnchorTracking:C,collisionAvoidance:Ee,shift:ge?{crossAxis:!("side"in Ee&&Ee.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:L,adaptiveOrigin:K,lazyFlip:M?"placement":!1});v.useEffect(()=>{function Ue(be){be.open&&(be.parentNodeId===ee&&A.set("hoverEnabled",!1),be.nodeId!==ee&&be.parentNodeId===A.select("floatingParentNodeId")&&A.setOpen(!1,ut(mc)))}return L.events.on("menuopenchange",Ue),()=>{L.events.off("menuopenchange",Ue)}},[A,L.events,ee]),v.useEffect(()=>{if(A.select("floatingParentNodeId")==null)return;function Ue(be){if(be.open||be.nodeId!==A.select("floatingParentNodeId"))return;const He=be.reason??mc;A.setOpen(!1,ut(He))}return L.events.on("menuopenchange",Ue),()=>{L.events.off("menuopenchange",Ue)}},[L.events,A]);const Te=Un();v.useEffect(()=>{X||Te.clear()},[X,Te]),v.useEffect(()=>{function Ue(be){if(!(!X||be.nodeId!==A.select("floatingParentNodeId")))if(be.target&&U&&U!==be.target){const He=A.select("closeDelay");He>0?Te.isStarted()||Te.start(He,()=>{A.setOpen(!1,ut(mc))}):A.setOpen(!1,ut(mc))}else Te.clear()}return L.events.on("itemhover",Ue),()=>{L.events.off("itemhover",Ue)}},[L.events,X,U,A,Te]),v.useEffect(()=>{const Ue={open:X,nodeId:ee,parentNodeId:G,reason:A.select("lastOpenChangeReason")};L.events.emit("menuopenchange",Ue)},[L.events,X,A,ee,G]),fA({store:A,domReference:oe,positionerElement:Q,open:X});const ve={open:X,side:ce.side,align:ce.align,anchorHidden:ce.anchorHidden,nested:k.type==="menu",instant:$},Pe=k.type==="menubar"&&k.context.modal;xb(X&&(Pe||B&&Y!==Kn),H==="touch",Q,U);const Le=Lp(t,ve,{styles:ce.positionerStyles,transitionStatus:z,props:O,refs:[i,A.useStateSetter("positionerElement")],hidden:!q,inert:!X}),Be=q&&k.type!=="menu"&&(k.type!=="menubar"&&B&&Y!==Kn||k.type==="menubar"&&k.context.modal);let Oe=null;return k.type==="menubar"?Oe=k.context.contentElement:k.type===void 0&&(Oe=U),b.jsxs(WO.Provider,{value:ce,children:[Be&&b.jsx(Zp,{ref:k.type==="context-menu"||k.type==="nested-context-menu"?k.context.internalBackdropRef:null,inert:zp(!X),cutout:Oe}),b.jsx(xC,{id:ee,children:b.jsx(bb,{elementsRef:A.context.itemDomElements,labelsRef:A.context.itemLabels,onMapChange:N,children:Le})})]})}),gA=v.createContext(void 0);function M6(){const e=v.useContext(gA);if(e===void 0)throw new Error(bn(34));return e}const k6=v.forwardRef(function(t,i){const{render:s,className:o,value:u,defaultValue:c,onValueChange:d,disabled:f=!1,style:g,"aria-labelledby":y,...p}=t,[x,S]=v.useState(void 0),[w,C]=qs({controlled:u,default:c,name:"MenuRadioGroup"}),E=Fe((M,N)=>{d?.(M,N),!N.isCanceled&&C(M)}),O=At("div",t,{state:{disabled:f},ref:i,props:{role:"group","aria-labelledby":y??x,"aria-disabled":f||void 0,...p}}),A=v.useMemo(()=>({value:w,setValue:E,disabled:f}),[w,E,f]);return b.jsx(vb.Provider,{value:S,children:b.jsx(gA.Provider,{value:A,children:O})})}),N6=v.memo(v.forwardRef(function(t,i){const s=$p()?.RadioGroup??k6;return b.jsx(s,{...t,ref:i})})),mA=v.createContext(void 0);function D6(){const e=v.useContext(mA);if(e===void 0)throw new Error(bn(35));return e}const j6=v.forwardRef(function(t,i){const{render:s,className:o,id:u,label:c,nativeButton:d=!1,disabled:f=!1,closeOnClick:g=!1,value:y,style:p,...x}=t,{store:S}=Gs(),{value:w,setValue:C,disabled:E}=M6(),R=Qp({guess:!0,label:c}),O=dr(u),A=S.useState("isActive",R.index),M=S.useState("floatingNodeId"),N=S.useState("itemProps"),j=S.useState("disabled"),D=f||E||j,k=w===y,{getItemProps:_,itemRef:L}=rA({closeOnClick:g,disabled:D,highlighted:A,id:O,store:S,nativeButton:d,nodeId:M,itemMetadata:nA}),q=v.useMemo(()=>({disabled:D,highlighted:A,checked:k}),[D,A,k]);function X(H){const U=ut(Ao,H.nativeEvent,void 0,{preventUnmountOnClose:En});C(y,U)}const B=At("div",t,{state:q,stateAttributesMapping:sA,props:[N,{role:"menuitemradio","aria-checked":k,onClick:X},x,_],ref:[L,i,R.ref]});return b.jsx(mA.Provider,{value:q,children:B})}),I6=v.forwardRef(function(t,i){const s=tA(t,i);return s.visible?b.jsx(j6,{...t,ref:s.ref}):null}),P6=v.forwardRef(function(t,i){const{render:s,className:o,style:u,keepMounted:c=!1,...d}=t,f=D6(),g=v.useRef(null),{transitionStatus:y,mounted:p,setMounted:x}=Po(f.checked);Ii({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:y};return At("span",t,{state:S,stateAttributesMapping:sA,ref:[i,g],props:{"aria-hidden":!0,...d},enabled:c||p})}),L6=v.createContext(null);function yA(e){return v.useContext(L6)}function z6(e){const t=v.useRef(""),i=v.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:v.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 uu(e,t){const i=v.useRef(e),s=Fe(t);_e(()=>{i.current!==e&&s(i.current),i.current=e},[e,s])}function vA(e,t){const i=Fe((u,c)=>{(typeof e=="function"?e():e)||t(c||(up?"touch":""))}),{onClick:s,onPointerDown:o}=z6(i);return v.useMemo(()=>({onClick:s,onPointerDown:o}),[s,o])}function bA(e){const[t,i]=v.useState(null),s=vA(e,i);return uu(e,o=>{o&&!e&&i(null)}),v.useMemo(()=>({openMethod:t,triggerProps:s}),[t,s])}function _6(e){return e==null?kr:e.type.startsWith("key")?HR:e.type.startsWith("mouse")||e.type.startsWith("pointer")?Hj:kr}const U6={...Us,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=Us.triggerPopupId(e,t);return i?e.listElement?.id||i:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>ms&&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"&&!Us.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 H6 extends su{constructor(t,i,s=!1){const o=new nd,u=B6(o,i,s,t);super(u,F6(o),U6),this.observe("parent",c=>{c.type==="menu"?this.context.allowMouseUpTriggerRef=c.store.context.allowMouseUpTriggerRef:c.type!==void 0&&(this.context.allowMouseUpTriggerRef=c.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){const 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 u=t.store.select("rootId"),c=t.store.select("floatingTreeRoot"),d=t.store.select("keyboardEventRelay");i===u&&s===c&&o===d||(i=u,s=c,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 u=(t===null?void 0:this.context.itemDomElements.current[t])===this.context.reportedItem;this.context.highlightReason=u?"none":i,this.context.highlightEvent=u?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 F6(e){return{positionerRef:v.createRef(),popupRef:v.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:"none",highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function B6(e,t,i=!1,s){return{...Np(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:Qt,inputProps:Qt,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Nv,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Qt,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...s}}const FE=v.createContext(null);function xA(e,t){return(e===$i||e===Ao)&&t?.detail===0}function V6(e,t){return e===jh||xA(e,t)}const K6=Yc(function(t){const{children:i,open:s,onOpenChange:o,onOpenChangeComplete:u,onItemHighlighted:c,defaultOpen:d=!1,disabled:f=!1,modal:g,loopFocus:y=!0,orientation:p="vertical",actionsRef:x,closeParentOnEsc:S=!1,handle:w,triggerId:C,defaultTriggerId:E=null,highlightItemOnHover:R=!0,isSubmenu:O=!1,virtualFocus:A=!1,virtualFocusRef:M,allowEscape:N=!0,resetOnPointerLeave:j=!0}=t,D=Gp(!0),k=Gs(!0),_=yA(!0),L=k?.store,q=k?.virtualFocus??!1,X=v.useMemo(()=>O&&L?{type:"menu",store:L}:_?{type:"menubar",context:_}:D&&!L?{type:"context-menu",context:D}:{type:void 0},[D,L,_,O]),B=dr(),H=dr(),[U,z]=v.useState(void 0),Q=(U??H)||void 0,$=Fa(),K=X.type==="menu"?X.store:void 0,Y=(s??d)&&K?.state.transitionStatus==="starting",ee=er(()=>Y?K?.state.instantType:void 0).current,G=er(()=>{const Ie=new H6({open:d,openProp:s,activeTriggerId:E,triggerIdProp:C,parent:X,disabled:f,highlightItemOnHover:R,modal:X.type===void 0?g:void 0,rootId:B,instantType:ee},Q,$!=null);return Ie.context.virtualFocusRef=M,Ie}).current;G.useControlledProp("openProp",s),G.useControlledProp("triggerIdProp",C),G.useContextCallback("onOpenChangeComplete",u);const oe=G.useState("floatingTreeRoot"),I=Dv(oe),V=G.useState("open"),J=G.useState("activeTriggerElement"),re=G.useState("positionerElement"),Ee=G.useState("hoverEnabled"),le=G.useState("disabled"),me=G.useState("lastOpenChangeReason"),ge=G.useState("parent"),ce=G.useState("activeIndex"),Te=G.useState("keyboardOpen"),ve=G.useState("payload"),Pe=G.useState("floatingParentNodeId"),Ae=v.useRef(null),Le=v.useRef(ge.type!=="context-menu"),Be=Un(),Oe=v.useRef(!0),Ue=Un(),be=Pe!=null,{openMethod:He,triggerProps:Ze}=bA(V);G.useSyncedValues({disabled:f,highlightItemOnHover:R,modal:ge.type===void 0?g:void 0,openMethod:He,rootId:B}),Op(G);const{forceUnmount:at,transitionStatus:de}=Ap(V,G,()=>{G.set("allowMouseEnter",!1)},Y),we=Ep(G.context.popupRef);v.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&&!k?G.update({parent:{type:"context-menu",context:D},floatingNodeId:I,floatingParentNodeId:$}):(k||!G.select("activeTriggerElement"))&&G.update({floatingNodeId:I,floatingParentNodeId:$})},[D,k,I,$,J,G]),v.useEffect(()=>{if(V||(Ae.current=null),ge.type==="context-menu"){if(!V){Be.clear(),Le.current=!1;return}Be.start(500,()=>{Le.current=!0})}},[Be,V,ge.type]),_e(()=>{!V&&!Ee&&G.set("hoverEnabled",!0)},[V,Ee,G]);const Ge=Fe((Ie,ze)=>{const $e=ze.reason;if(!Ie&&!G.select("open")||V===Ie&&ze.trigger===J&&me===$e)return;const et=Tp(ze);if(!Ie&&ze.trigger==null&&(ze.trigger=J??void 0),o?.(Ie,ze),ze.isCanceled)return;G.state.floatingRootContext.dispatchOpenChange(Ie,ze);const Tt=ze.event;if(Ie===!1&&$e!==Ao&&Tt?.type==="click"&&Tt.pointerType==="touch"&&!Oe.current)return;Ie&&$e===zl?(Oe.current=!1,Ue.start(300,()=>{Oe.current=!0})):(Oe.current=!0,Ue.clear());const F=!Ie&&($e===Zc||$e==null);Ae.current=ze.event;const W=Cp(G.state,Ie,ze.trigger,et());W.openChangeReason=$e,W.keyboardOpen=Ie&&V6($e,Tt),ge.type==="menubar"&&($e===zl||$e===Pa||$e===Kn||$e===jh||$e===mc)?W.instantType="group":xA($e,Tt)?W.instantType="click":F?W.instantType="dismiss":W.instantType=void 0,G.update(W)}),ke=wC({popupStore:G,floatingRootContext:G.state.floatingRootContext,floatingId:Q,nested:$!=null,onOpenChange:Ge}),De=ke.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 vt=v.useCallback(()=>{G.setOpen(!1,ut(Wc))},[G]);v.useImperativeHandle(x,()=>({unmount:at,close:vt}),[at,vt]);let ct;ge.type==="context-menu"&&(ct=ge.context),v.useImperativeHandle(ct?.positionerRef,()=>re,[re]),v.useImperativeHandle(ct?.actionsRef,()=>({setOpen:Ge}),[Ge]);const pt=ed(ke,{enabled:!le,bubbles:{escapeKey:S&&ge.type==="menu"},outsidePress(){return ge.type!=="context-menu"||Ae.current?.type==="contextmenu"?!0:Le.current},externalTree:be?oe:void 0}),kt=Ip(),jt=jC(ke,{enabled:!le,listRef:G.context.itemDomElements,activeIndex:ce,virtual:A,nested:ge.type==="menubar"||!A&&ge.type!==void 0,parentOrientation:ge.type==="menubar"?ge.context.orientation:void 0,loopFocus:y,focusItemOnOpen:A?Te:void 0,allowEscape:A&&y&&N,orientation:p,triggerOrientation:A?"vertical":p,rtl:kt==="rtl",disabledIndices:Gi,onNavigate(Ie,ze){G.setActiveIndex(Ie,_6(ze),ze?.nativeEvent)},openOnArrowKeyDown:ge.type!=="context-menu"&&!(A&&O),externalTree:!A&&be?oe:void 0,nestedReturnFocusRef:K?.context.virtualFocusRef,focusItemOnHover:R,resetOnPointerLeave:j}),en=v.useCallback(Ie=>{G.context.typingRef.current=Ie},[G]),sn=IC(ke,{enabled:!le&&!A,listRef:G.context.itemLabels,elementsRef:G.context.itemDomElements,activeIndex:ce,resetMs:N4,onMatch:(Ie,ze)=>{V&&Ie!==ce&&G.setActiveIndex(Ie,HR,ze.nativeEvent)},onTyping:en}),tn=Fe(c),Je=v.useRef(-1),St=Fe(()=>{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(Je.current===$e&&G.context.reportedItem===ze)return;Je.current=$e,G.context.reportedItem=ze,A&&G.set("highlightedItem",ze);const{highlightReason:et,highlightEvent:Tt}=G.context;G.context.highlightReason=kr,G.context.highlightEvent=void 0,c&&tn(ze,Uj(et,Tt,{label:ze===void 0?void 0:G.context.itemLabels.current[$e]??void 0}))});_e(()=>{St()},[ce,St]);const Xt=v.useMemo(()=>{if(!A)return jt.reference;if(!jt.trigger)return Qt;const{onFocus:Ie,...ze}=jt.trigger;return ze},[A,jt.reference,jt.trigger]);G.useSyncedValue("inputProps",A?jt.reference??Qt:Qt);const ft=v.useMemo(()=>{const Ie=Mr(sn.reference,Xt,pt.reference,{onMouseMove(){G.set("allowMouseEnter",!0)}},Ze);return Ie["aria-haspopup"]="menu",Ie["aria-expanded"]=V,Ie},[G,sn.reference,Xt,pt.reference,Ze,V]),bt=v.useMemo(()=>{const Ie=Mr(jt.trigger,pt.trigger,Ze);return Ie["aria-haspopup"]="menu",Ie["aria-expanded"]=!1,Ie},[jt.trigger,pt.trigger,Ze]);er(()=>(G.update({inactiveTriggerProps:bt}),null));const mt=v.useMemo(()=>Mr(td,{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)}},sn.floating,jt.floating,pt.floating),[ge.type,G,sn.floating,jt.floating,pt.floating]),Ut=jt.item??Qt;Mp(G,{floatingRootContext:ke,activeTriggerProps:ft,inactiveTriggerProps:bt,popupProps:mt,itemProps:Ut});const cn=v.useMemo(()=>({store:G,parent:X,orientation:p,loopFocus:y,allowEscape:N,defaultFloatingId:H,setRenderedFloatingId:z,virtualFocus:A,parentVirtualFocus:q,syncHighlightedItem:St}),[G,X,p,y,N,H,A,q,St]),je=typeof i=="function"?i({payload:ve}):i;let st=b.jsxs(Yp.Provider,{value:cn,children:[w&&b.jsx(Rp,{handle:w,store:G}),je]});return(ge.type===void 0||ge.type==="context-menu")&&(st=b.jsx(SC,{externalTree:oe,children:st})),st});function SA(e){const t=v.useContext(FE);if(t===null)return b.jsx(K6,{...e});const i=t.Root;return b.jsx(FE.Provider,{value:null,children:b.jsx(i,{...t.options,...e})})}const ih=5;function wA(e,t){const i=q6(t);return e.clientX>=i.left-ih&&e.clientX<=i.right+ih&&e.clientY>=i.top-ih&&e.clientY<=i.bottom+ih}function q6(e){const t=e.getBoundingClientRect(),i=Rn(e);if(hv)return t;const s=i.getComputedStyle(e,"::before"),o=i.getComputedStyle(e,"::after");if(!(s.content!=="none"||o.content!=="none"))return t;const c=parseFloat(s.width)||0,d=parseFloat(s.height)||0,f=parseFloat(o.width)||0,g=parseFloat(o.height)||0,y=Math.max(t.width,c,f),p=Math.max(t.height,d,g),x=y-t.width,S=p-t.height;return{left:t.left-x/2,right:t.right+x/2,top:t.top-S/2,bottom:t.bottom+S/2}}function Y6(e={}){const{highlightItemOnHover:t,highlightedIndex:i,onHighlightedIndexChange:s}=yb(),{ref:o,index:u}=Qp(e),c=i===u,d=v.useRef(null),f=Wr(o,d);return{compositeProps:{tabIndex:c?0:-1,onFocus(){s(u)},onMouseMove(){const y=d.current;if(!t||!y)return;const p=y.hasAttribute("disabled")||y.ariaDisabled==="true";!c&&!p&&y.focus()}},compositeRef:f,index:u}}function Sb(e){const{render:t,className:i,style:s,state:o=Qt,props:u=Gi,refs:c=Gi,metadata:d,stateAttributesMapping:f,tag:g="div",...y}=e,{compositeProps:p,compositeRef:x}=Y6({metadata:d});return At(g,e,{state:o,ref:[x,...c],props:[p,...u,y],stateAttributesMapping:f})}function wb(e){if(vn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!Fs(e))return wb(Ks(e))}function G6(e,t){function i(u,c,d){const f=u.currentTarget;cr.flushSync(()=>{e.setOpen(!1,ut(Pa,u.nativeEvent,f))}),p4(f.isConnected?f:t.current,c,d)?.focus()}function s(u){i(u,-1,e.select("positionerElement"))}function o(u){const c=e.select("positionerElement");c&&Fl(u,c)?e.context.beforeContentFocusGuardRef.current?.focus():i(u,1,c)}return{handlePreFocusGuardFocus:s,handleFocusTargetFocus:o}}function $6(e){const{enabled:t=!0,mouseDownAction:i,open:s}=e,o=v.useRef(!1);return v.useMemo(()=>t?{onMouseDown:u=>{(i==="open"&&!s||i==="close"&&s)&&(o.current=!0,$t(u.currentTarget).addEventListener("click",()=>{o.current=!1},{once:!0}))},onClick:u=>{o.current&&(o.current=!1,u.preventBaseUIHandler())}}:Qt,[t,i,s])}const Q6=cv(function(t,i){const{render:s,className:o,style:u,disabled:c=!1,nativeButton:d=!0,id:f,openOnHover:g,delay:y=100,closeDelay:p=0,handle:x,payload:S,...w}=t,C=Gs(!0),R=zv(x)??C?.store;if(!R)throw new Error(bn(85));const O=dr(f),A=R.useState("isTriggerActive",O),M=R.useState("floatingRootContext"),N=R.useState("isOpenedByTrigger",O),j=R.useState("triggerControlsId",O),D=v.useRef(null),k=Z6(),_=yb(!0),L=Ba(),q=v.useMemo(()=>L??new Nv,[L]),X=Dv(q),B=Fa(),{registerTrigger:H,isMountedByThisTrigger:U}=Lv(O,D,R,{payload:S,closeDelay:p,parent:k,floatingTreeRoot:q,floatingNodeId:X,floatingParentNodeId:B,keyboardEventRelay:_?.relayKeyboardEvent}),z=k.type==="menubar",Q=R.useState("disabled"),$=c||Q||z&&k.context.disabled,{getButtonProps:K,buttonRef:Y}=Li({disabled:$,native:d});v.useEffect(()=>{!N&&k.type===void 0&&(R.context.allowMouseUpTriggerRef.current=!1)},[R,N,k.type]);const ee=v.useRef(null),G=Un(),oe=Fe(Ue=>{if(!ee.current)return;G.clear(),R.context.allowMouseUpTriggerRef.current=!1;const be=Ue.target;it(ee.current,be)||it(R.select("positionerElement"),be)||be===ee.current||be!=null&&wb(be)===R.select("rootId")||wA(Ue,ee.current)||q.events.emit("close",{domEvent:Ue,reason:Sv})});v.useEffect(()=>{const Ue=$t(ee.current);if(N&&R.select("lastOpenChangeReason")===Kn)return Ue.addEventListener("mouseup",oe,{once:!0}),()=>{Ue.removeEventListener("mouseup",oe)}},[N,oe,R]);const I=z&&k.context.hasSubmenuOpen,J=DC(M,{enabled:(g??I)&&!$&&(!z||I&&!U),handleClose:PC({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:k.type===void 0?y:void 0,delay:{close:p},triggerElementRef:D,externalTree:q,isActiveTrigger:A,isClosing:()=>R.select("transitionStatus")==="ending"}),re=X6(N,R.select("lastOpenChangeReason")),Ee=Iv(M,{enabled:!$,event:N&&z?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:k.type===void 0?re:!1}),le=kC(M,{enabled:!$&&I}),me=$6({open:N,enabled:z,mouseDownAction:"open"}),ge=v.useMemo(()=>Mr(le.reference,Ee.reference),[le.reference,Ee.reference]),ce=R.useState("triggerProps",U),Te=R.useState("filterTriggerProps"),{handlePreFocusGuardFocus:ve,handleFocusTargetFocus:Pe}=G6(R,D),Ae={disabled:$,open:N},Le=[ee,i,Y,H,D],Be=[ge,J??Qt,ce,{"aria-haspopup":"menu","aria-controls":j,id:O,onMouseDown:Ue=>{if(R.select("open"))return;G.start(200,()=>{R.context.allowMouseUpTriggerRef.current=!0}),$t(Ue.currentTarget).addEventListener("mouseup",oe,{once:!0})}},Te,z?{role:"menuitem"}:{},me,w,K],Oe=At("button",t,{enabled:!z,stateAttributesMapping:kh,state:Ae,ref:Le,props:Be});return z?b.jsx(Sb,{tag:"button",render:s,className:o,style:u,state:Ae,refs:Le,props:Be,stateAttributesMapping:kh}):N?b.jsxs(v.Fragment,{children:[b.jsx(Wl,{ref:R.context.beforeTriggerFocusGuardRef,onFocus:ve},`${O}-pre-focus-guard`),b.jsx(v.Fragment,{children:Oe},O),b.jsx(Wl,{ref:R.context.triggerFocusTargetRef,onFocus:Pe},`${O}-post-focus-guard`)]}):b.jsx(v.Fragment,{children:Oe},O)});function X6(e,t){const i=Un(),[s,o]=v.useState(!1);return _e(()=>{e&&t===Kn?(o(!0),i.start(dC,()=>{o(!1)})):e||(i.clear(),o(!1))},[e,t,i]),s}function Z6(){const e=yA();return v.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}const W6=v.forwardRef(function(t,i){const{className:s,render:o,orientation:u="horizontal",style:c,...d}=t;return At("div",t,{state:{orientation:u},ref:i,props:[{role:"separator","aria-orientation":u},d]})});function EA(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Gh(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function J6(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function RA(e){return J6(e?.[0])}function eU(e){return RA(e)?e.flatMap(t=>t.items):e}function tU(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 CA(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 Gh(e)}function Pl(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Gh(e.value):Gh(e)}function TA(e,t,i){function s(){return CA(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 u=eU(t);if(e==null||typeof e!="object"){const c=u.find(d=>d.value===e);return c&&c.label!=null?c.label:s()}if("value"in e){const c=u.find(d=>d&&d.value===e.value);if(c&&c.label!=null)return c.label}}return s()}function nU(e,t,i){return e.reduce((s,o,u)=>(u>0&&s.push(", "),s.push(b.jsx(v.Fragment,{children:TA(o,t,i)},u)),s),[])}function Uo({...e}){return b.jsx(SA,{"data-slot":"dropdown-menu",...e})}function Ho({...e}){return b.jsx(Q6,{"data-slot":"dropdown-menu-trigger",...e})}function Fo({align:e="start",alignOffset:t=0,side:i="bottom",sideOffset:s=4,className:o,...u}){return b.jsx(cA,{children:b.jsx(pA,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:i,sideOffset:s,children:b.jsx(lA,{"data-slot":"dropdown-menu-content",className:Ye("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),...u})})})}function OA({...e}){return b.jsx(n6,{"data-slot":"dropdown-menu-group",...e})}function AA({className:e,inset:t,...i}){return b.jsx(r6,{"data-slot":"dropdown-menu-label","data-inset":t,className:Ye("px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5",e),...i})}function cu({className:e,inset:t,variant:i="default",...s}){return b.jsx(aA,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":i,className:Ye("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 rU({...e}){return b.jsx(N6,{"data-slot":"dropdown-menu-radio-group",...e})}function iU({className:e,children:t,inset:i,...s}){return b.jsxs(I6,{"data-slot":"dropdown-menu-radio-item","data-inset":i,className:Ye("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:[b.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:b.jsx(P6,{children:b.jsx(Up,{})})}),t]})}function Eb(e){return At(e.defaultTagName??"div",e,e)}function MA(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=MA(e[t]))&&(s&&(s+=" "),s+=i)}else for(i in e)e[i]&&(s&&(s+=" "),s+=i);return s}function sU(){for(var e,t,i=0,s="",o=arguments.length;i<o;i++)(e=arguments[i])&&(t=MA(e))&&(s&&(s+=" "),s+=t);return s}const BE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,VE=sU,dd=(e,t)=>i=>{var s;if(t?.variants==null)return VE(e,i?.class,i?.className);const{variants:o,defaultVariants:u}=t,c=Object.keys(o).map(g=>{const y=i?.[g],p=u?.[g];if(y===null)return null;const x=BE(y)||BE(p);return o[g][x]}),d=i&&Object.entries(i).reduce((g,y)=>{let[p,x]=y;return x===void 0||(g[p]=x),g},{}),f=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((g,y)=>{let{class:p,className:x,...S}=y;return Object.entries(S).every(w=>{let[C,E]=w;return Array.isArray(E)?E.includes({...u,...d}[C]):{...u,...d}[C]===E})?[...g,p,x]:g},[]);return VE(e,c,f,i?.class,i?.className)},uy=768;function kA(){const[e,t]=v.useState(void 0);return v.useEffect(()=>{const i=window.matchMedia(`(max-width: ${uy-1}px)`),s=()=>{t(window.innerWidth<uy)};return i.addEventListener("change",s),t(window.innerWidth<uy),()=>i.removeEventListener("change",s)},[]),!!e}const aU=v.forwardRef(function(t,i){const{render:s,className:o,disabled:u=!1,focusableWhenDisabled:c=!1,nativeButton:d=!0,style:f,...g}=t,{getButtonProps:y,buttonRef:p}=Li({disabled:u,focusableWhenDisabled:c,native:d});return At("button",t,{state:{disabled:u},ref:[i,p],props:[g,y]})}),NA=dd("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 ht({className:e,variant:t="default",size:i="default",...s}){return b.jsx(aU,{"data-slot":"button",className:Ye(NA({variant:t,size:i,className:e})),...s})}const oU="data-valid",lU="data-invalid",uU={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},cU={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},dU={disabled:!1,...cU},du={valid(e){return e===null?null:e?{[oU]:""}:{[lU]:""}}},fU={invalid:void 0,name:void 0,validityData:{state:uU,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:dU,registerFieldControl:En,validation:{getValidationProps:(e,t=Qt)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:En,getInputControl:()=>null,commit:async()=>{},change:En}},hU=v.createContext(fU);function $s(e=!0){const t=v.useContext(hU);if(t.setValidityData===En&&!e)throw new Error(bn(28));return t}const pU=v.createContext(void 0);function gU(e=!1){const t=v.useContext(pU);if(!t&&!e)throw new Error(bn(86));return t}const mU=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:En,validationMode:"onSubmit",submitCountRef:{current:0}});function fd(){return v.useContext(mU)}const yU=v.createContext({controlId:void 0,registerControlId:En,resetControlId:En,labelId:void 0,setLabelId:En,messageIds:[],setMessageIds:En,getDescriptionProps:e=>e});function Bo(){return v.useContext(yU)}function Rb(e,t,i,s=!0,o,u){const[c,d]=v.useState(),f=dr(o?`${o}-label`:void 0),g=!!u?.trim(),p=e??(g?void 0:t)??c;return _e(()=>{const x=e||t||g||!s?void 0:vU(i.current,f);c!==x&&d(x)}),p}function vU(e,t){const i=bU(e);if(i)return!i.id&&t&&(i.id=t),i.id||void 0}function bU(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 fu(e={}){const{id:t,enabled:i=!0}=e,{controlId:s,registerControlId:o,resetControlId:u}=Bo(),c=dr(),d=er(()=>Symbol()),f=v.useRef(!1),g=v.useRef(!1),y=Fe(()=>{!f.current||o===En||(f.current=!1,o(d.current,void 0))});return _e(()=>{if(!i||o===En){y();return}let p;if(t!==void 0)g.current=!0,p=t;else if(g.current)p=c;else{u();return}if(p===void 0){y();return}f.current=!0,o(d.current,p)},[t,i,o,u,c,d,y]),_e(()=>y,[y]),(i?s:void 0)??t??c}function xU(e,t){return e.matches(":disabled")?!1:!t||e.form===t?!0:e.form===null&&!e.hasAttribute("form")}const SU=v.createContext({disabled:!1});function DA(){return v.useContext(SU)}function hd(e,t,i){const{setFocused:s,focusOwnerRef:o}=$s(),u=Fe(c=>{(c?!e:o.current===u)&&(o.current=c&&u,s(c))});return _e(()=>{const c=t.current;return c?.getRootNode()?.activeElement===c&&u(!0),()=>u(!1)},[e,t,u]),u}function pd(e,t,i,s,o=!0,u){const{registerFieldControl:c}=$s(),d=er(()=>Symbol());_e(()=>{const f=d.current;if(!o){c(f,void 0);return}c(f,{controlRef:e,getValue:s,id:t,name:u,value:i})},[e,o,s,t,u,c,d,i]),_e(()=>{const f=d.current;return()=>{c(f,void 0)}},[c,d])}const wU=v.forwardRef(function(t,i){const{render:s,className:o,id:u,name:c,value:d,disabled:f=!1,onValueChange:g,defaultValue:y,autoFocus:p=!1,style:x,...S}=t,{state:w,name:C,disabled:E,setTouched:R,setDirty:O,validityData:A,setFilled:M,validationMode:N,validation:j}=$s(),{clearErrors:D,elementRef:k,submitCountRef:_}=fd(),L=E||f,q=C??c,X={...w,disabled:L},{labelId:B}=Bo(),H=fu({id:u}),U=d!==void 0,z=d==null?void 0:String(d),Q=Fe(()=>j.inputRef.current?.value);pd(j.inputRef,H,z,Q,!L,c),_e(()=>{const G=z??j.inputRef.current?.value;G!==void 0&&M(G!=="")},[z,y,j.inputRef,M]),uu(z,()=>{z!==void 0&&(D(q),O(z!==(A.initialValue??"")),j.change(z))});const $=v.useRef(null),K=hd(L,$),Y=Un();return At("input",t,{ref:[i,$],state:X,props:[{id:H,disabled:L,name:q,ref:j.inputRef,"aria-labelledby":B,autoFocus:p,...U?{value:d}:{defaultValue:y},onChange(G){const oe=G.currentTarget.value,I=ut(kr,G.nativeEvent);g?.(oe,I),!U&&(O(oe!==(A.initialValue??"")),M(oe!==""),!G.nativeEvent.defaultPrevented&&!I.isCanceled&&(D(q),j.change(oe)))},onFocus(){K(!0)},onBlur(G){if(R(!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!==(A.initialValue??"")&&j.commit(I)})}},onKeyDown(G){if(G.currentTarget.tagName==="INPUT"&&G.key==="Enter"){R(!0);const oe=G.currentTarget.value,I=G.currentTarget.form;if(I&&I===k.current&&!G.defaultPrevented){const V=G.currentTarget,J=_.current;Y.start(0,()=>{_.current===J&&j.commit(V.value)})}else j.commit(oe)}}},S,G=>j.getValidationProps(L,G)],stateAttributesMapping:du})}),EU=v.forwardRef(function(t,i){return b.jsx(wU,{ref:i,...t})});function Jp({className:e,type:t,...i}){return b.jsx(EU,{type:t,"data-slot":"input",className:Ye("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 jA({className:e,orientation:t="horizontal",...i}){return b.jsx(W6,{"data-slot":"separator",orientation:t,className:Ye("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...i})}const IA=v.createContext(void 0);function Ka(e){const t=v.useContext(IA);if(!e&&t===void 0)throw new Error(bn(27));return t}const PA=v.forwardRef(function(t,i){const{render:s,className:o,style:u,forceRender:c=!1,...d}=t,f=Ka(),g=f.useState("open"),y=f.useState("nested"),p=f.useState("mounted"),x=f.useState("transitionStatus");return At("div",t,{state:{open:g,transitionStatus:x},ref:[f.context.backdropRef,i],stateAttributesMapping:gp,props:[{role:"presentation",hidden:!p,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:c||!y})}),eg=v.forwardRef(function(t,i){const{render:s,className:o,style:u,disabled:c=!1,nativeButton:d=!0,...f}=t,g=Ka(),y=g.useState("open"),{getButtonProps:p,buttonRef:x}=Li({disabled:c,native:d}),S={disabled:c};function w(C){y&&g.setOpen(!1,ut(UR,C.nativeEvent))}return At("button",t,{state:S,ref:[i,x],props:[{onClick:w},f,p]})}),LA=v.forwardRef(function(t,i){const{render:s,className:o,style:u,id:c,...d}=t,f=Ka(),g=dr(c);return f.useSyncedValueWithCleanup("descriptionElementId",g),At("p",t,{ref:i,props:[{id:g},d]})}),zA=v.createContext(void 0);function RU(){const e=v.useContext(zA);if(e===void 0)throw new Error(bn(26));return e}const CU="--nested-dialogs",TU="data-nested-dialog-open",OU={...Qc,...ys,nestedDialogOpen(e){return e?{[TU]:""}:null}},_A=v.forwardRef(function(t,i){const{render:s,className:o,style:u,finalFocus:c,initialFocus:d,...f}=t,g=Ka(),y=g.useState("descriptionElementId"),p=g.useState("disablePointerDismissal"),x=g.useState("floatingRootContext"),S=g.useState("popupProps"),w=g.useState("modal"),C=g.useState("mounted"),E=g.useState("nested"),R=g.useState("nestedOpenDialogCount"),O=g.useState("open"),A=g.useState("openMethod"),M=g.useState("titleElementId"),N=g.useState("transitionStatus"),j=g.useState("role"),D=x.useState("floatingId");RU(),Ii({open:O,ref:g.context.popupRef,onComplete(){O&&g.context.onOpenChangeComplete?.(!0)}});const k=d===void 0?RC(g.context.popupRef):d,_=R>0,L=g.useStateSetter("popupElement"),X=At("div",t,{state:{open:O,nested:E,transitionStatus:N,nestedDialogOpen:_},props:[S,{id:D,"aria-labelledby":M,"aria-describedby":y,role:j,...td,hidden:!C,onKeyDown(B){cd.has(B.key)&&B.stopPropagation()},style:{[CU]:R}},f],ref:[i,g.context.popupRef,L],stateAttributesMapping:OU});return b.jsx(wp,{context:x,openInteractionType:A,disabled:!C,closeOnFocusOut:!p,initialFocus:k,returnFocus:c,modal:w!==!1,restoreFocus:"popup",children:X})}),UA=v.forwardRef(function(t,i){const{keepMounted:s=!1,...o}=t,u=Ka(),c=u.useState("mounted"),d=u.useState("modal"),f=u.useState("open");return c||s?b.jsx(zA.Provider,{value:s,children:b.jsxs(Sp,{ref:i,...o,children:[c&&d===!0&&b.jsx(Zp,{ref:u.context.internalBackdropRef,inert:zp(!f)}),t.children]})}):null});function AU({store:e,parentContext:t,isDrawer:i}){const s=e.useState("open"),o=e.useState("mounted"),u=e.useState("disablePointerDismissal"),c=e.useState("modal"),d=e.useState("popupElement"),f=e.useState("floatingRootContext"),[g,y]=v.useState(0),[p,x]=v.useState(0),S=g===0,w=ed(f,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(C){if(!e.context.outsidePressEnabledRef.current||"button"in C&&C.button!==0)return!1;if("touches"in C){if(C.type==="touchend"){if(C.changedTouches.length!==1||C.touches.length!==0)return!1}else if(C.touches.length!==1)return!1}const E=tr(C);if(S&&!u){if(c){const R=e.context.internalBackdropRef.current,O=e.context.backdropRef.current;return R||O?R===E||O===E||it(E,d)&&!E?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return hA(s&&c===!0,d),e.useContextCallback("onNestedDialogOpen",(C,E)=>{!e.select("open")&&!e.select("mounted")||(y(C),x(E))}),_e(()=>{!s&&!o&&(y(0),x(0))},[s,o]),_e(()=>(t?.onNestedDialogOpen&&s&&t.onNestedDialogOpen(g+1,p+(i?1:0)),()=>{t?.onNestedDialogOpen&&s&&t.onNestedDialogOpen(0,0)}),[i,s,g,p,t]),Mp(e,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:g,nestedOpenDrawerCount:p}),null}const MU={...Us,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 kU extends su{constructor(t,i,s){const o=new nd,u=NU(t,o,i,s);super(u,DU(o),MU)}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(Cp(this.state,t,i.trigger)))}}function NU(e,t,i,s=!1){return{...Np(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 DU(e){return{popupRef:v.createRef(),backdropRef:v.createRef(),internalBackdropRef:v.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function jU(e,t){const{children:i,open:s,defaultOpen:o=!1,onOpenChange:u,onOpenChangeComplete:c,disablePointerDismissal:d=!1,modal:f=!0,actionsRef:g,handle:y,triggerId:p,defaultTriggerId:x=null}=t,S=e==="drawer",w=f,C=d,E="dialog",R=Ka(!0),O=R!=null,A={modal:w,disablePointerDismissal:C,nested:O,role:E},M=Pv((L,q)=>new kU({open:o,openProp:s,activeTriggerId:x,triggerIdProp:p,...A},L,q),!0);M.useControlledProp("openProp",s),M.useControlledProp("triggerIdProp",p),M.useSyncedValues(A),M.useContextCallback("onOpenChange",u),M.useContextCallback("onOpenChangeComplete",c);const N=M.useState("open"),j=M.useState("mounted"),D=M.useState("payload");CC(M,N),Op(M);const{forceUnmount:k}=Ap(N,M);v.useImperativeHandle(g,()=>({unmount:k,close:()=>M.setOpen(!1,ut(Wc))}),[k,M]);const _=N||j||y!=null;return b.jsxs(IA.Provider,{value:M,children:[y&&b.jsx(Rp,{handle:y,store:M}),_&&b.jsx(AU,{store:M,parentContext:R?.context,isDrawer:S}),typeof i=="function"?i({payload:D}):i]})}const HA=Yc(function(t){return jU("dialog",t)}),FA=v.forwardRef(function(t,i){const{render:s,className:o,style:u,id:c,...d}=t,f=Ka(),g=dr(c);return f.useSyncedValueWithCleanup("titleElementId",g),At("h2",t,{ref:i,props:[{id:g},d]})}),IU=cv(function(t,i){const{render:s,className:o,style:u,disabled:c=!1,nativeButton:d=!0,id:f,payload:g,handle:y,...p}=t,x=Ka(!0),w=zv(y)??x;if(!w)throw new Error(bn(79));const C=dr(f),E=w.useState("floatingRootContext"),R=w.useState("isOpenedByTrigger",C),O=w.useState("triggerPopupId",C),A=v.useRef(null),{registerTrigger:M,isMountedByThisTrigger:N}=Lv(C,A,w,{payload:g}),{getButtonProps:j,buttonRef:D}=Li({disabled:c,native:d}),k=Iv(E),_=vA(()=>w.select("open"),X=>{w.set("openMethod",X)}),L={disabled:c,open:R},q=w.useState("triggerProps",N);return At("button",t,{state:L,ref:[D,i,M,A],props:[k.reference,q,_,{[fC]:"",id:C,"aria-haspopup":"dialog","aria-expanded":R,"aria-controls":O},p,j],stateAttributesMapping:xv})}),Rt=e=>typeof e=="string",gc=()=>{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),PU=(e,t,i)=>{e.forEach(s=>{t[s]&&(i[s]=t[s])})},LU=/###/g,KE=e=>e&&e.includes("###")?e.replace(LU,"."):e,qE=e=>!e||Rt(e),Oc=(e,t,i)=>{const s=Rt(t)?t.split("."):t;let o=0;for(;o<s.length-1;){if(qE(e))return{};const u=KE(s[o]);!e[u]&&i&&(e[u]=new i),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++o}return qE(e)?{}:{obj:e,k:KE(s[o])}},YE=(e,t,i)=>{const{obj:s,k:o}=Oc(e,t,Object);if(s!==void 0||t.length===1){s[o]=i;return}let u=t[t.length-1],c=t.slice(0,t.length-1),d=Oc(e,c,Object);for(;d.obj===void 0&&c.length;)u=`${c[c.length-1]}.${u}`,c=c.slice(0,c.length-1),d=Oc(e,c,Object),d?.obj&&typeof d.obj[`${d.k}.${u}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${u}`]=i},zU=(e,t,i,s)=>{const{obj:o,k:u}=Oc(e,t,Object);o[u]=o[u]||[],o[u].push(i)},$h=(e,t)=>{const{obj:i,k:s}=Oc(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s]},_U=(e,t,i)=>{const s=$h(e,i);return s!==void 0?s:$h(t,i)},BA=(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]):BA(e[s],t[s],i):e[s]=t[s]);return e},Ls=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),UU={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},HU=e=>Rt(e)?e.replace(/[&<>"'\/]/g,t=>UU[t]):e;class FU{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 BU=[" ",",","?","!",";"],VU=new FU(20),KU=(e,t,i)=>{t=t||"",i=i||"";const s=BU.filter(c=>!t.includes(c)&&!i.includes(c));if(s.length===0)return!0;const o=VU.getRegExp(`(${s.map(c=>c==="?"?"\\?":c).join("|")})`);let u=!o.test(e);if(!u){const c=e.indexOf(i);c>0&&!o.test(e.substring(0,c))&&(u=!0)}return u},Qy=(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 u=0;u<s.length;){if(!o||typeof o!="object")return;let c,d="";for(let f=u;f<s.length;++f)if(f!==u&&(d+=i),d+=s[f],c=o[d],(typeof c=="function"||d==="__proto__")&&!Object.prototype.hasOwnProperty.call(o,d)&&(c=void 0),c!==void 0){if(["string","number","boolean"].includes(typeof c)&&f<s.length-1)continue;u+=f-u+1;break}o=c}return o},nu=e=>e?.replace(/_/g,"-"),qU={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 Qh{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||qU,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(u=>Rt(u)?u.replace(/[\r\n\x00-\x1F\x7F]/g," "):u),Rt(t[0])&&(t[0]=`${s}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new Qh(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Qh(this.logger,t)}}var hs=new Qh;class tg{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,u])=>{for(let c=0;c<u;c++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,u])=>{for(let c=0;c<u;c++)o(t,...i)})}}const GE=new WeakSet;class $E extends tg{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 u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=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)&&u?d.push(...s.split(u)):d.push(s)));const f=$h(this.data,d);return f==null&&!i&&!s&&t.includes(".")&&(t=d[0],i=d[1],s=d.slice(2).join(".")),f!=null||!c||!Rt(s)?f:Qy(this.data?.[t]?.[i],s,u)}addResource(t,i,s,o,u={silent:!1}){const c=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let d=[t,i];s&&(d=d.concat(c?s.split(c):s)),t.includes(".")&&(d=t.split("."),o=i,i=d[1]),this.addNamespaces(i),YE(this.data,d,o),u.silent||this.emit("added",t,i,s,o)}addResources(t,i,s,o={silent:!1}){for(const u in s)(Rt(s[u])||Array.isArray(s[u]))&&this.addResource(t,i,u,s[u],{silent:!0});o.silent||this.emit("added",t,i,s)}addResourceBundle(t,i,s,o,u,c={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=$h(this.data,d)||{};c.skipCopy||(s=JSON.parse(JSON.stringify(s))),o?BA(f,s,u):f={...f,...s},YE(this.data,d,f),c.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 u=i[o];return GE.has(u)?!0:!u||Object.keys(u).length===0?!1:(typeof u=="object"&&GE.add(u),!0)})}toJSON(){return this.data}}var VA={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,s,o){return e.forEach(u=>{t=this.processors[u]?.process(t,i,s,o)??t}),t}};const KA=Symbol("i18next/PATH_KEY");function YU(){const e=[],t=Object.create(null);let i;return t.get=(s,o)=>(i?.revoke?.(),o===KA?e:(e.push(o),i=Proxy.revocable(s,t),i.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ia(e,t){const{[KA]:i}=e(YU()),s=t?.keySeparator??".",o=t?.nsSeparator??":",u=t?.enableSelector==="strict";if(i.length>1&&o){const c=t?.ns,d=u?Array.isArray(c)?c:c?[c]:null:Array.isArray(c)?c:null;if(d&&(u?d:d.length>1?d.slice(1):[]).includes(i[0]))return`${i[0]}${o}${i.slice(1).join(s)}`}return i.join(s)}const cy=e=>!Rt(e)&&typeof e!="boolean"&&typeof e!="number";class Xh extends tg{constructor(t,i={}){super(),PU(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=hs.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 u=cy(o.res);return!(s.returnObjects===!1&&u)}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 u=i.ns||this.options.defaultNS||[];const c=s&&t.includes(s),d=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!KU(t,s,o);if(c&&!d){const f=t.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:t,namespaces:Rt(u)?[u]:u};const g=t.split(s);(s!==o||s===o&&this.options.ns.includes(g[0]))&&(u=g.shift()),t=g.join(o)}return{key:t,namespaces:Rt(u)?[u]:u}}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=Ia(t,{...this.options,...o})),Array.isArray(t)||(t=[String(t)]),t=t.map(B=>typeof B=="function"?Ia(B,{...this.options,...o}):String(B));const u=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,c=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 y=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const p=o.lng||this.language,x=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p?.toLowerCase()==="cimode")return x?u?{res:`${g}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:p,usedNS:g,usedParams:this.getUsedParamsDetails(o)}:`${g}${y}${d}`:u?{res:d,usedKey:d,exactUsedKey:d,usedLng:p,usedNS:g,usedParams:this.getUsedParamsDetails(o)}:d;const S=this.resolve(t,o);let w=S?.res;const C=S?.usedKey||d,E=S?.exactUsedKey||d,R=["[object Number]","[object Function]","[object RegExp]"],O=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,M=o.count!==void 0&&!Rt(o.count),N=Xh.hasDefaultValue(o),j=M?this.pluralResolver.getSuffix(p,o.count,o):"",D=o.ordinal&&M?this.pluralResolver.getSuffix(p,o.count,{ordinal:!1}):"",k=M&&!o.ordinal&&o.count===0,_=k&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${j}`]||o[`defaultValue${D}`]||o.defaultValue;let L=w;A&&!w&&N&&(L=_);const q=cy(L),X=Object.prototype.toString.apply(L);if(A&&L&&q&&!R.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(C,L,{...o,ns:f}):`key '${d} (${this.language})' returned an object instead of string.`;return u?(S.res=B,S.usedParams=this.getUsedParamsDetails(o),S):B}if(c){const B=Array.isArray(L),H=B?[]:{},U=B?E:C;for(const z in L)if(Object.prototype.hasOwnProperty.call(L,z)){const Q=`${U}${c}${z}`;N&&!w?H[z]=this.translate(Q,{...o,defaultValue:cy(_)?_[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(A&&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",p,g,M&&!Q?`${d}${this.pluralResolver.getSuffix(p,o.count,o)}`:d,Q?_:w),c){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&&M?$.forEach(ee=>{const G=this.pluralResolver.getSuffixes(ee,o);k&&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}${y}${d}`),(H||B)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${y}${d}`:d,B?w:void 0,o))}return u?(S.res=w,S.usedParams=this.getUsedParamsDetails(o),S):w}extendTranslation(t,i,s,o,u){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 p=t.match(this.interpolator.nestingRegexp);g=p&&p.length}let y=s.replace&&!Rt(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),t=this.interpolator.interpolate(t,y,s.lng||this.language||o.usedLng,s),f){const p=t.match(this.interpolator.nestingRegexp),x=p&&p.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,(...p)=>u?.[0]===p[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${i[0]}`),null):this.translate(...p,i),s)),s.interpolation&&this.interpolator.reset()}const c=s.postProcess||this.options.postProcess,d=Rt(c)?[c]:c;return t!=null&&d?.length&&s.applyPostProcessor!==!1&&(t=VA.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,u,c,d;return Rt(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(f=>typeof f=="function"?Ia(f,{...this.options,...i}):f)),t.forEach(f=>{if(this.isValidLookup(s))return;const g=this.extractFromKey(f,i),y=g.key;o=y;let p=g.namespaces;this.options.fallbackNS&&(p=p.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!=="",C=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);p.forEach(E=>{this.isValidLookup(s)||(d=E,!this.checkedLoadedFor[`${C[0]}-${E}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(this.checkedLoadedFor[`${C[0]}-${E}`]=!0,this.logger.warn(`key "${o}" for languages "${C.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(R=>{if(this.isValidLookup(s))return;c=R;const O=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(O,y,R,E,i);else{let M;x&&(M=this.pluralResolver.getSuffix(R,i.count,i));const N=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(i.ordinal&&M.startsWith(j)&&O.push(y+M.replace(j,this.options.pluralSeparator)),O.push(y+M),S&&O.push(y+N)),w){const D=`${y}${this.options.contextSeparator||"_"}${i.context}`;O.push(D),x&&(i.ordinal&&M.startsWith(j)&&O.push(D+M.replace(j,this.options.pluralSeparator)),O.push(D+M),S&&O.push(D+N))}}let A;for(;A=O.pop();)this.isValidLookup(s)||(u=A,s=this.getResource(R,E,A,i))}))})}),{res:s,usedKey:o,exactUsedKey:u,usedLng:c,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 u of i)delete o[u]}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 QE{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hs.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(t){if(t=nu(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=nu(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 u=this.getLanguagePartFromCode(s);if(this.isSupportedCode(u))return i=u;i=this.options.supportedLngs.find(c=>c===u?!0:!c.includes("-")&&!u.includes("-")?!1:!!(c.includes("-")&&!u.includes("-")&&c.slice(0,c.indexOf("-"))===u))}),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 u=i===void 0||i===!1||Rt(i),c=i===void 0&&typeof this.options.fallbackLng=="function",d=Rt(t)&&u&&!c;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),y=[],p=x=>{x&&(this.isSupportedCode(x)?y.push(x):this.logger.warn(`rejecting language code not found in supportedLngs: ${x}`))};return Rt(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&p(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&p(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&p(this.getLanguagePartFromCode(t))):Rt(t)&&p(this.formatLanguageCode(t)),g.forEach(x=>{const S=this.formatLanguageCode(x);y.includes(S)||p(S)}),f!==null?(this.resolveHierarchyCache[f]=y,y.slice()):y}}const XE={zero:0,one:1,two:2,few:3,many:4,other:5},ZE={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class GU{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=hs.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const s=nu(t==="dev"?"en":t),o=i.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:s,type:o});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let c;try{c=new Intl.PluralRules(s,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),ZE;if(!t.match(/-|_/))return ZE;const f=this.languageUtils.getLanguagePartFromCode(t);c=this.getRule(f,i)}return this.pluralRulesCache[u]=c,c}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,u)=>XE[o]-XE[u]).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 WE=(e,t,i,s=".",o=!0)=>{let u=_U(e,t,i);return!u&&o&&Rt(i)&&(u=Qy(e,i,s),u===void 0&&(u=Qy(t,i,s))),u};class JE{constructor(t={}){this.logger=hs.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:u,prefixEscaped:c,suffix:d,suffixEscaped:f,formatSeparator:g,unescapeSuffix:y,unescapePrefix:p,nestingPrefix:x,nestingPrefixEscaped:S,nestingSuffix:w,nestingSuffixEscaped:C,nestingOptionsSeparator:E,maxReplaces:R,alwaysFormat:O}=t.interpolation;this.escape=i!==void 0?i:HU,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=u?Ls(u):c||"{{",this.suffix=d?Ls(d):f||"}}",this.formatSeparator=g||",",this.unescapePrefix=y?"":p?Ls(p):"-",this.unescapeSuffix=this.unescapePrefix?"":y?Ls(y):"",this.nestingPrefix=x?Ls(x):S||Ls("$t("),this.nestingSuffix=w?Ls(w):C||Ls(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=R||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 u,c,d;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=C=>{if(!C.includes(this.formatSeparator)){const A=WE(i,f,C,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(A,void 0,s,{...o,...i,interpolationkey:C}):A}const E=C.split(this.formatSeparator),R=E.shift().trim(),O=E.join(this.formatSeparator).trim();return this.format(WE(i,f,R,this.options.keySeparator,this.options.ignoreJSONStructure),O,s,{...o,...i,interpolationkey:R})};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 y=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,x=[{regex:this.regexpUnescape,safeValue:C=>C},{regex:this.regexp,safeValue:C=>this.escapeValue?this.escape(C):C}],S=[];let w=0;return x.forEach(C=>{for(d=0;u=C.regex.exec(t);){const E=u.index-w,R=S.find(([M,N])=>E>=M&&E<N);if(R){C.regex.lastIndex=R[1]+w;continue}const O=u[1].trim();if(c=g(O),c===void 0)if(typeof y=="function"){const M=y(t,u,o);c=Rt(M)?M:""}else if(o&&Object.prototype.hasOwnProperty.call(o,O))c="";else if(p){c=u[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${t}`),c="";else!Rt(c)&&!this.useRawValueToEscape&&(c=sh(c));const A=sh(C.safeValue(c));if(t=t.slice(0,u.index)+A+t.slice(u.index+u[0].length),p?(C.regex===this.regexpUnescape?S.push([u.index,u.index+A.length]):w+=A.length-u[0].length,C.regex.lastIndex+=A.length,C.regex.lastIndex-=u[0].length):C.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),t}nest(t,i,s={}){let o,u,c;const d=(p,x)=>{const S=this.nestingOptionsSeparator;if(!p.includes(S))return p;const w=p.split(new RegExp(`${Ls(S)}[ ]*{`));let C=`{${w[1]}`;p=w[0],C=this.interpolate(C,c);const E=C.match(/'/g),R=C.match(/"/g);((E?.length??0)%2===0&&!R||(R?.length??0)%2!==0)&&(C=C.replace(/'/g,'"'));try{c=JSON.parse(C),x&&(c={...x,...c})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,O),`${p}${S}${C}`}return c.defaultValue&&c.defaultValue.includes(this.prefix)&&delete c.defaultValue,p},f=new RegExp(this.nestingRegexp);let g="",y=0;for(;o=f.exec(t);){let p=[];c={...s},c=c.replace&&!Rt(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const x=/{.*}/s.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(x!==-1&&(p=o[1].slice(x).split(this.formatSeparator).map(S=>S.trim()).filter(Boolean),o[1]=o[1].slice(0,x)),u=i(d.call(this,o[1].trim(),c),c),u&&o[0]===t&&!Rt(u))return u;Rt(u)||(u=sh(u)),u||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),u=""),p.length&&(u=p.reduce((S,w)=>this.format(S,w,s.lng,{...s,interpolationkey:o[1].trim()}),u.trim())),g+=t.slice(y,o.index)+sh(u),y=f.lastIndex,this.regexp.lastIndex=0}return y?g+t.slice(y):t}}const $U=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(c=>{if(c){const[d,...f]=c.split(":"),g=f.join(":").trim().replace(/^'+|'+$/g,""),y=d.trim();i[y]||(i[y]=g),g==="false"&&(i[y]=!1),g==="true"&&(i[y]=!0),isNaN(g)||(i[y]=parseInt(g,10))}})}return{formatName:t,formatOptions:i}},eR=e=>{const t={};return(i,s,o)=>{let u=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(u={...u,[o.interpolationkey]:void 0});let c;try{c=s+JSON.stringify(u)}catch{return e(nu(s),o)(i)}let d=t[c];return d||(d=e(nu(s),o),t[c]=d),d(i)}},QU=e=>(t,i,s)=>e(nu(i),s)(t);class XU{constructor(t={}){this.logger=hs.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const s=i.cacheInBuiltFormats?eR:QU;this.formats={number:s((o,u)=>{const c=new Intl.NumberFormat(o,{...u});return d=>c.format(d)}),currency:s((o,u)=>{const c=new Intl.NumberFormat(o,{...u,style:"currency"});return d=>c.format(d)}),datetime:s((o,u)=>{const c=new Intl.DateTimeFormat(o,{...u});return d=>c.format(d)}),relativetime:s((o,u)=>{const c=new Intl.RelativeTimeFormat(o,{...u});return d=>c.format(d,u.range||"day")}),list:s((o,u)=>{const c=new Intl.ListFormat(o,{...u});return d=>c.format(d)})}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=eR(i)}format(t,i,s,o={}){if(!i||t==null)return t;const u=i.split(this.formatSeparator),c=[];for(let f=0;f<u.length;f++){let g=u[f];for(;g.indexOf("(")>-1&&!g.includes(")")&&f+1<u.length;)g=`${g}${this.formatSeparator}${u[++f]}`;c.push(g)}return c.reduce((f,g)=>{const{formatName:y,formatOptions:p}=$U(g);if(this.formats[y]){let x=f;try{const S=o?.formatParams?.[o.interpolationkey]||{},w=S.locale||S.lng||o.locale||o.lng||s;x=this.formats[y](f,w,{...p,...o,...S})}catch(S){this.logger.warn(S)}return x}else this.logger.warn(`there was no format function for ${y}`);return f},t)}}const ZU=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class WU extends tg{constructor(t,i,s,o={}){super(),this.backend=t,this.store=i,this.services=s,this.languageUtils=s.languageUtils,this.options=o,this.logger=hs.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 u={},c={},d={},f={};return t.forEach(g=>{let y=!0;i.forEach(p=>{const x=`${g}|${p}`;!s.reload&&this.store.hasResourceBundle(g,p)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?c[x]===void 0&&(c[x]=!0):(this.state[x]=1,y=!1,c[x]===void 0&&(c[x]=!0),u[x]===void 0&&(u[x]=!0),f[p]===void 0&&(f[p]=!0)))}),y||(d[g]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}loaded(t,i,s){const o=t.split("|"),u=o[0],c=o[1];i&&this.emit("failedLoading",u,c,i),!i&&s&&this.store.addResourceBundle(u,c,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=>{zU(f.loaded,[u],c),ZU(f,t),i&&f.errors.push(i),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(g=>{d[g]||(d[g]={});const y=f.loaded[g];y.length&&y.forEach(p=>{d[g][p]===void 0&&(d[g][p]=!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,u=this.retryTimeout,c){if(!t.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:i,fcName:s,tried:o,wait:u,callback:c});return}this.readingCalls++;const d=(g,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(g&&y&&o<this.maxRetries){setTimeout(()=>{this.read(t,i,s,o+1,u*2,c)},u);return}c(g,y)},f=this.backend[s].bind(this.backend);if(f.length===2){try{const g=f(t,i);g&&typeof g.then=="function"?g.then(y=>d(null,y)).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 u=this.queueLoad(t,i,s,o);if(!u.toLoad.length)return u.pending.length||o(),null;u.toLoad.forEach(c=>{this.loadOne(c)})}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],u=s[1];this.read(o,u,"read",void 0,void 0,(c,d)=>{c&&this.logger.warn(`${i}loading namespace ${u} for language ${o} failed`,c),!c&&d&&this.logger.log(`${i}loaded namespace ${u} for language ${o}`,d),this.loaded(t,c,d)})}saveMissing(t,i,s,o,u,c={},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={...c,isUpdate:u},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(t,i,s,o,f):y=g(t,i,s,o),y&&typeof y.then=="function"?y.then(p=>d(null,p)).catch(d):d(null,y)}catch(y){d(y)}else g(t,i,s,o,d,f)}!t||!t[0]||this.store.addResource(t[0],i,s,o)}}}const dy=()=>({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}),tR=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=()=>{},JU=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(i=>{typeof e[i]=="function"&&(e[i]=e[i].bind(e))})};class Ac extends tg{constructor(t={},i){if(super(),this.options=tR(t),this.services={},this.logger=hs,this.modules={external:[]},JU(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=dy();this.options={...s,...this.options,...tR(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?hs.init(o(this.modules.logger),this.options):hs.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=XU;const y=new QE(this.options);this.store=new $E(this.options.resources,this.options);const p=this.services;p.logger=hs,p.resourceStore=this.store,p.languageUtils=y,p.pluralResolver=new GU(y,{prepend:this.options.pluralSeparator}),g&&(p.formatter=o(g),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new JE(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new WU(o(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(x,...S)=>{this.emit(x,...S)}),this.modules.languageDetector&&(p.languageDetector=o(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=o(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new Xh(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]=(...y)=>this.store[g](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...y)=>(this.store[g](...y),this)});const d=gc(),f=()=>{const g=(y,p)=>{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(p),i(y,p)};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 u=[],c=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(g=>{g!=="cimode"&&(u.includes(g)||u.push(g))})};o?c(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>c(f)),this.options.preload?.forEach?.(d=>c(d)),this.services.backendConnector.load(u,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(d)})}else s(null)}reloadResources(t,i,s){const o=gc();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,u=>{o.resolve(),s(u)}),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"&&VA.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=gc();this.emit("languageChanging",t);const o=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},u=(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))},c=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,y=>{u(y,g)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),s}getFixedT(t,i,s,o){const u=o?.scopeNs,c=(d,f,...g)=>{let y;typeof f!="object"?y=this.options.overloadTranslationOptionHandler([d,f].concat(g)):y={...f},y.lng=y.lng||c.lng,y.lngs=y.lngs||c.lngs;const p=y.ns!==void 0&&y.ns!==null;y.ns=y.ns||c.ns,y.keyPrefix!==""&&(y.keyPrefix=y.keyPrefix||s||c.keyPrefix);const x={...this.options,...y};Array.isArray(u)&&!p&&(x.ns=u),typeof y.keyPrefix=="function"&&(y.keyPrefix=Ia(y.keyPrefix,x));const S=this.options.keySeparator||".";let w;return y.keyPrefix&&Array.isArray(d)?w=d.map(C=>(typeof C=="function"&&(C=Ia(C,x)),`${y.keyPrefix}${S}${C}`)):(typeof d=="function"&&(d=Ia(d,x)),w=y.keyPrefix?`${y.keyPrefix}${S}${d}`:d),this.t(w,y)};return Rt(t)?c.lng=t:c.lngs=t,c.ns=i,c.keyPrefix=s,c}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,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const c=(g,y)=>{const p=this.services.backendConnector.state[`${g}|${y}`];return p===-1||p===0||p===2};if(i.precheck){const g=i.precheck(this,c);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||c(f,t))&&(!o||c(u,t)))}loadNamespaces(t,i){const s=gc();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=gc();Rt(t)&&(t=[t]);const o=this.options.preload||[],u=t.filter(c=>!o.includes(c)&&this.services.languageUtils.isSupportedCode(c));return u.length?(this.options.preload=o.concat(u),this.loadResources(c=>{s.resolve(),i&&i(c)}),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 u=o.getTextInfo();if(u&&u.direction)return u.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 QE(dy());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 Ac(t,i);return s.createInstance=Ac.createInstance,s}cloneInstance(t={},i=ah){const s=t.forkResourceStore;s&&delete t.forkResourceStore;const o={...this.options,preload:!1,...t,isClone:!0},u=new Ac(o);if((t.debug!==void 0||t.prefix!==void 0)&&(u.logger=u.logger.clone(t)),["store","services","language"].forEach(d=>{u[d]=this[d]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},s){const d=g=>{const y=Array.isArray(g)?[...g]:{...g};return Object.keys(y).forEach(p=>{y[p]&&typeof y[p]=="object"&&(y[p]=d(y[p]))}),y},f=d(this.store.data);u.store=new $E(f,o),u.services.resourceStore=u.store}if(t.interpolation){const f={...dy().interpolation,...this.options.interpolation,...t.interpolation},g={...o,interpolation:f};u.services.interpolator=new JE(g)}return u.translator=new Xh(u.services,o),u.translator.on("*",(d,...f)=>{u.emit(d,...f)}),u.init(o,i),u.translator.options=o,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const fr=Ac.createInstance();fr.createInstance;fr.dir;fr.init;fr.loadResources;fr.reloadResources;fr.use;fr.changeLanguage;fr.getFixedT;fr.t;fr.exists;fr.setDefaultNamespace;fr.hasLoadedNamespace;fr.loadNamespaces;fr.loadLanguages;const e8={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},t8=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function nR(e){const t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=e.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(t.name=i[1],(e8[i[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){const u=e.indexOf("-->");return{type:"comment",comment:u!==-1?e.slice(4,u):""}}const s=new RegExp(t8);let o=null;for(;o=s.exec(e),o!==null;)if(o[0].trim())if(o[1]){const u=o[1].trim();let c=[u,null];const d=u.indexOf("=");d>-1&&(c=[u.slice(0,d),u.slice(d+1)]),t.attrs[c[0]]=c[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,n8=/<\/?([^\s]+?)[/\s>]/,r8=/^\s*$/,i8=/^(script|style)$/i,xc="\0",s8=Object.create(null);function qA(e){e.forEach(function(t){if(t.type==="text"){t.content=t.content.split(xc).join("<");return}if(t.type==="comment"){t.comment=t.comment.split(xc).join("<");return}for(const i in t.attrs){const s=t.attrs[i];typeof s=="string"&&s.indexOf(xc)>-1&&(t.attrs[i]=s.split(xc).join("<"))}t.children.length&&qA(t.children)})}function a8(e,t){const i=t&&t.components||s8,s=t&&t.allowedTags;let o=!1;if(s){const w=typeof s=="function"?s:function(O){return s.indexOf(O)>-1};let C="",E=0;oh.lastIndex=0;let R;for(;R=oh.exec(e);){const O=R[0];C+=e.slice(E,R.index);const A=O.match(n8);O.startsWith("<!--")||A&&w(A[1])?(C+=O,E=R.index+O.length):(o=!0,C+=xc,E=R.index+1,oh.lastIndex=E)}e=C+e.slice(E)}const u=[],c=[];let d,f=-1,g=!1,y=0,p;if(e.indexOf("<")!==0){const w=e.indexOf("<");u.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,C){const E=w[0];if(!E||E.startsWith("<!--"))return;let R=0,O=0,A=-1,M=null;for(let j=0;j<E.length;j++){const D=E.charAt(j);M?D===M&&(M=null):D==='"'||D==="'"?M=D:D==="<"?(R++,R===2&&(A=j)):D===">"&&O++}const N=A>-1&&/[a-zA-Z0-9\-!/]/.test(E.charAt(A+1));if(R>O&&N){const j=E.substring(0,A),D=E.substring(j.length);x[C][0]=D,x[C].index+=j.length}}),x.forEach(function(w,C){const E=w[0];if(!E)return;const R=w.index;if(R<y)return;if(g){if(E!=="</"+d.name+">")return;g=!1}const O=E.charAt(1)!=="/",A=E.startsWith("<!--"),M=R+E.length,N=e.charAt(M),j=x[C+1];let D;if(N==="<"&&j){const _=e.substring(M,j.index);D=_.split("<").length>_.split(">").length}let k;if(A){const _=nR(E);if(f<0)return u.push(_),u;k=c[f],k.children.push(_);const L=e.slice(M,j?j.index:void 0);return L.length>0&&k.children.push({type:"text",content:L}),u}if(O){f++,d=nR(E),d.type==="tag"&&i[d.name]&&(d.type="component",g=!0);let _=!1;if(!g&&!d.voidElement&&i8.test(d.name)){_=!0,p||(p=e.toLowerCase());const L=p.indexOf("</"+d.name.toLowerCase()+">",M),q=L===-1?e.length:L,X=e.slice(M,q);X&&d.children.push({type:"text",content:X}),y=q}!d.voidElement&&!g&&!_&&N&&N!=="<"&&d.children.push({type:"text",content:e.slice(M,j?j.index:void 0)}),f===0&&u.push(d),k=c[f-1],k&&k.children.push(d),c[f]=d}if((!O||d.voidElement)&&(f>-1&&(d.voidElement||d.name===E.slice(2,-1))&&(f--,d=f===-1?u:c[f]),!g&&(N!=="<"||D)&&N)){k=f===-1?u:c[f].children;const _=j?j.index:-1;let L=e.slice(M,_===-1?void 0:_);r8.test(L)&&(L=" "),(_>-1&&f+k.length>=0||L!==" ")&&k.push({type:"text",content:L})}}),o&&qA(u),u}function o8(e){const t=[];for(const i in e)e[i]===null?t.push(i):t.push(i+'="'+String(e[i]).replace(/"/g,"&quot;")+'"');return t.length?" "+t.join(" "):""}function YA(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?o8(t.attrs):"")+i,t.voidElement?e:e+t.children.reduce(YA,"")+"</"+t.name+">"}case"comment":return e+="<!--"+t.comment+"-->",e}}function l8(e){return e.reduce(function(t,i){return t+YA("",i)},"")}var u8={parse:a8,stringify:l8};const Eh=(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);Zr(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console?.warn&&console.warn(...o)},rR={},Yl=(e,t,i,s)=>{Zr(i)&&rR[i]||(Zr(i)&&(rR[i]=new Date),Eh(e,t,i,s))},GA=(e,t)=>()=>{if(e.isInitialized)t();else{const i=()=>{setTimeout(()=>{e.off("initialized",i)},0),t()};e.on("initialized",i)}},Xy=(e,t,i)=>{e.loadNamespaces(t,GA(e,i))},iR=(e,t,i,s)=>{if(Zr(i)&&(i=[i]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Xy(e,i,s);i.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,GA(e,s))},c8=(e,t,i={})=>!t.languages||!t.languages.length?(Yl(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}}),Zr=e=>typeof e=="string",fs=e=>typeof e=="object"&&e!==null,d8=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,f8={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},h8=e=>f8[e],$A=e=>e.replace(d8,h8);let Zy={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:$A,transDefaultProps:void 0};const p8=(e={})=>{Zy={...Zy,...e}},Cb=()=>Zy;let QA;const g8=e=>{QA=e},Tb=()=>QA,Rh=(e,t)=>{if(!e)return!1;const i=e.props?.children??e.children;return t?i.length>0:!!i},Sc=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?_s(t):t},m8=e=>_s(e).every(v.isValidElement),_s=e=>Array.isArray(e)?e:[e],y8=(e,t)=>{const i={...t};return i.props={...t.props,...e.props},i},v8=e=>{const t={};if(!e)return t;const i=s=>{_s(s).forEach(u=>{Zr(u)||(Rh(u)?i(Sc(u)):fs(u)&&!v.isValidElement(u)&&Object.assign(t,u))})};return i(e),t},Wy=(e,t,i,s)=>{if(!e)return"";let o="";const u=_s(e),c=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return u.forEach((d,f)=>{if(Zr(d)){o+=`${d}`;return}if(v.isValidElement(d)){const{props:g,type:y}=d,p=Object.keys(g).length,x=c.indexOf(y)>-1,S=g.children;if(!S&&x&&!p){o+=`<${y}/>`;return}if(!S&&(!x||p)||g.i18nIsDynamicList){o+=`<${f}></${f}>`;return}if(x&&p<=1){const C=Zr(S)?S:Wy(S,t,i,s);o+=`<${y}>${C}</${y}>`;return}const w=Wy(S,t,i,s);o+=`<${f}>${w}</${f}>`;return}if(d===null){Eh(i,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:s});return}if(fs(d)){const{format:g,...y}=d,p=Object.keys(y);if(p.length===1){const x=g?`${p[0]}, ${g}`:p[0];o+=`{{${x}}}`;return}if(!p.length&&Object.keys(d).length===1&&"format"in d){o+="{{format}}";return}Eh(i,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:s,child:d});return}Eh(i,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:s,child:d})}),o},b8=(e,t,i,s,o,u,c)=>{if(i==="")return[];const d=o.transKeepBasicHtmlNodesFor||[],f=i&&new RegExp(d.map(A=>`<${A}`).join("|")).test(i);if(!e&&!t&&!f&&!c)return[i];const g=t??{},y=A=>{_s(A).forEach(N=>{Zr(N)||(Rh(N)?y(Sc(N)):fs(N)&&!v.isValidElement(N)&&Object.assign(g,N))})};y(e);const p=Object.keys(g),x=A=>/^\d+$/.test(A)||d.indexOf(A)>-1||p.indexOf(A)>-1,S=u8.parse(`<0>${i}</0>`,{allowedTags:x}),w={...g,...u},C=(A,M,N)=>{const j=Sc(A),D=R(j,M.children,N);return m8(j)&&D.length===0||A.props?.i18nIsDynamicList?j:D},E=(A,M,N,j,D)=>{A.dummy?(A.children=M,N.push(v.cloneElement(A,{key:j},D?void 0:M))):N.push(...v.Children.map([A],k=>{if(k.type===v.Fragment||k.props?.i18nIsDynamicList!==void 0){const L={key:j};return k&&k.props&&Object.keys(k.props).forEach(q=>{q==="children"||q==="i18nIsDynamicList"||(L[q]=k.props[q])}),v.createElement(k.type,L,D?null:M)}const _={key:j};return k&&k.props&&Object.keys(k.props).forEach(L=>{L==="ref"||L==="children"||(_[L]=k.props[L])}),v.cloneElement(k,_,D?null:M)}))},R=(A,M,N)=>{const j=_s(A),D=_s(M),k={};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&&fs(N[0])&&(B=N[0][L.name]),B||(B={});const H={...L.attrs};c&&Object.keys(H).forEach(Y=>{const ee=H[Y];Zr(ee)&&(H[Y]=$A(ee))});const U=Object.keys(H).length!==0?y8({props:H},B):B,z=v.isValidElement(U),Q=z&&Rh(L,!0)&&!L.voidElement,$=f&&fs(U)&&U.dummy&&!z,K=fs(t)&&Object.hasOwnProperty.call(t,L.name);if(Zr(U)){const Y=s.services.interpolator.interpolate(U,w,s.language);_.push(Y)}else if(Rh(U)||Q){const Y=C(U,L,N);E(U,Y,_,q)}else if($){const Y=R(j,L.children,N);E(U,Y,_,q)}else if(Number.isNaN(parseFloat(L.name)))if(K){const Y=C(U,L,N);E(U,Y,_,q,L.voidElement)}else if(o.transSupportBasicHtmlNodes&&d.indexOf(L.name)>-1)if(L.voidElement)_.push(v.createElement(L.name,{key:`${L.name}-${q}`}));else{const Y=k[L.name]||0;k[L.name]=Y+1;let ee,G=0;for(let V=0;V<j.length;V+=1){const J=j[V];if(v.isValidElement(J)&&J.type===L.name){if(G===Y){ee=J;break}G+=1}}const oe=ee?_s(Sc(ee)):j,I=R(oe,L.children,N);_.push(v.createElement(L.name,{key:`${L.name}-${q}`},I))}else if(L.voidElement)_.push(`<${L.name} />`);else{const Y=R(j,L.children,N);_.push(`<${L.name}>${Y}</${L.name}>`)}else if(fs(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:Cb().unescape,U=c?H(s.services.interpolator.interpolate(L.content,w,s.language)):s.services.interpolator.interpolate(L.content,w,s.language);B?_.push(v.createElement(B,{key:`${L.name}-${q}`},U)):_.push(U)}return _},[])},O=R([{dummy:!0,children:e||[]}],S,_s(e||[]));return Sc(O[0])},XA=(e,t,i)=>{const s=e.key||t,o=v.cloneElement(e,{key:s});if(!o.props||!o.props.children||i.indexOf(`${t}/>`)<0&&i.indexOf(`${t} />`)<0)return o;function u(){return v.createElement(v.Fragment,null,o)}return v.createElement(u,{key:s})},x8=(e,t)=>e.map((i,s)=>XA(i,s,t)),S8=(e,t)=>{const i={};return Object.keys(e).forEach(s=>{Object.assign(i,{[s]:XA(e[s],s,t)})}),i},w8=(e,t,i,s)=>e?Array.isArray(e)?x8(e,t):fs(e)?S8(e,t):(Yl(i,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:s}),null):null,E8=e=>!fs(e)||Array.isArray(e)?!1:Object.keys(e).reduce((t,i)=>t&&Number.isNaN(Number.parseFloat(i)),!0);function R8({children:e,count:t,parent:i,i18nKey:s,context:o,tOptions:u={},values:c,defaults:d,components:f,ns:g,i18n:y,t:p,shouldUnescape:x,...S}){const w=y||Tb();if(!w)return Yl(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 C=p||w.t.bind(w)||(ee=>ee),E={...Cb(),...w.options?.react};let R=g||(C.ns?void 0:w.options?.defaultNS||"translation");Zr(R)&&(R=[R]);const{transDefaultProps:O}=E,A=O?.tOptions?{...O.tOptions,...u}:u,M=x??O?.shouldUnescape,N=O?.values?{...O.values,...c}:c,j=O?.components?{...O.components,...f}:f,D=Wy(e,E,w,s),k=Array.isArray(s)?s[s.length-1]:s,_=d||A?.defaultValue||D||E.transEmptyNodeValue||(typeof k=="function"?Ia(k):k),{hashTransKey:L}=E,q=s||(L?L(D||_):D||_);w.options?.interpolation?.defaultVariables?c={...w.options.interpolation.defaultVariables,...N}:c=N;const X=v8(e);X&&typeof X.count=="number"&&t===void 0&&(t=X.count),t===void 0&&(t=A?.count);const B=c||t!==void 0&&!w.options?.interpolation?.alwaysFormat||!e?A.interpolation:{interpolation:{...A.interpolation,prefix:"#$?",suffix:"?$#"}},H={...A,context:o||A.context,count:t,...c,...B,defaultValue:_,ns:R};let U=q?C(q,H):_;U===q&&_&&(U=_);const z=w8(j,U,w,s);let Q=z||e,$=null;E8(z)?($=z,Q=e):z&&!Array.isArray(z)&&($=z,Q=void 0);const K=b8(Q,$,U,w,E,H,M),Y=i??E.defaultTransParent;return Y?v.createElement(Y,S,K):K}const C8={type:"3rdParty",init(e){p8(e.options.react),g8(e)}},ZA=v.createContext();class T8{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(i=>{this.usedNamespaces[i]||(this.usedNamespaces[i]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function Ob({children:e,count:t,parent:i,i18nKey:s,context:o,tOptions:u={},values:c,defaults:d,components:f,ns:g,i18n:y,t:p,shouldUnescape:x,...S}){const{i18n:w,defaultNS:C}=v.useContext(ZA)||{},E=y||w||Tb(),R=p||E?.t.bind(E);return R8({children:e,count:t,parent:i,i18nKey:s,context:o,tOptions:u,values:c,defaults:d,components:f,ns:g||(R?.ns?void 0:C||E?.options?.defaultNS),i18n:E,t:p,shouldUnescape:x,...S})}const O8=(e,t)=>{if(Zr(t))return t;if(fs(t)&&Zr(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},A8={t:O8,ready:!1},M8=()=>()=>{},Ct=(e,t={})=>{const{i18n:i}=t,{i18n:s,defaultNS:o}=v.useContext(ZA)||{},u=i||s||Tb();u&&!u.reportNamespaces&&(u.reportNamespaces=new T8),u||Yl(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const c=v.useMemo(()=>({...Cb(),...u?.options?.react,...t}),[u,t]),{useSuspense:d,keyPrefix:f,bindI18n:g,bindI18nStore:y}=c,p=o||u?.options?.defaultNS,x=Zr(p)?[p]:p||["translation"],S=JSON.stringify(x),w=v.useMemo(()=>x,[S]);u?.reportNamespaces?.addUsedNamespaces?.(w);const C=v.useRef(0),E=v.useCallback(H=>{if(!u)return M8;const U=()=>{C.current+=1,H()};return g&&u.on(g,U),y&&u.store.on(y,U),()=>{g&&g.split(" ").forEach(z=>u.off(z,U)),y&&y.split(" ").forEach(z=>u.store.off(z,U))}},[u,g,y]),R=v.useRef(),O=v.useCallback(()=>{if(!u)return A8;const H=!!(u.isInitialized||u.initializedStoreOnce)&&w.every(ee=>c8(ee,u,c)),U=t.lng||u.language,z=C.current,Q=typeof f=="function"?Ia(f,{...u.options,ns:w}):f,$=R.current;if($&&$.i18n===u&&$.ready===H&&$.lng===U&&$.namespaces===w&&$.keyPrefix===Q&&$.revision===z)return $;const Y={t:u.getFixedT(U,c.nsMode==="fallback"?w:w[0],f,{scopeNs:w}),i18n:u,ready:H,lng:U,namespaces:w,keyPrefix:Q,revision:z};return R.current=Y,Y},[u,w,f,c,t.lng]),[A,M]=v.useState(0);let{t:N,ready:j}=kp.useSyncExternalStore(E,O,O),D;u&&d&&!j&&(D=new Promise(H=>{const U=()=>H();t.lng?iR(u,t.lng,w,U):Xy(u,w,U)}),{t:N,ready:j}=O()),v.useEffect(()=>{if(u&&!j&&!d){const H=()=>M(U=>U+1);t.lng?iR(u,t.lng,w,H):Xy(u,w,H)}},[u,t.lng,w,j,d,A]);const k=u||{},_=v.useRef(null),L=v.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=v.useMemo(()=>{const H=k,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)=>(Yl(u,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),N(...K)):N,$=[Q,z,j];return $.t=Q,$.i18n=z,$.ready=j,$},[N,k,j,k.resolvedLanguage,k.language,k.languages]);if(u&&d&&!j){let H=!1;try{H=!1}catch{}throw H&&Yl(u,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),D}return B};function WA({...e}){return b.jsx(HA,{"data-slot":"sheet",...e})}function k8({...e}){return b.jsx(IU,{"data-slot":"sheet-trigger",...e})}function N8({...e}){return b.jsx(UA,{"data-slot":"sheet-portal",...e})}function D8({className:e,...t}){return b.jsx(PA,{"data-slot":"sheet-overlay",className:Ye("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 JA({className:e,children:t,side:i="right",showCloseButton:s=!0,...o}){const{t:u}=Ct();return b.jsxs(N8,{children:[b.jsx(D8,{}),b.jsxs(_A,{"data-slot":"sheet-content","data-side":i,className:Ye("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&&b.jsxs(eg,{"data-slot":"sheet-close",render:b.jsx(ht,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[b.jsx(Va,{}),b.jsx("span",{className:"sr-only",children:u("a11y.close")})]})]})]})}function j8({className:e,...t}){return b.jsx("div",{"data-slot":"sheet-header",className:Ye("flex flex-col gap-1.5 p-6",e),...t})}function eM({className:e,...t}){return b.jsx(FA,{"data-slot":"sheet-title",className:Ye("font-heading text-sm font-medium text-foreground",e),...t})}function I8({className:e,...t}){return b.jsx(LA,{"data-slot":"sheet-description",className:Ye("text-xs/relaxed text-muted-foreground",e),...t})}function wr({className:e,...t}){return b.jsx("div",{"data-slot":"skeleton",className:Ye("animate-pulse rounded-md bg-muted",e),...t})}const P8="sidebar_state",L8=3600*24*7,z8="16rem",_8="18rem",U8="3rem",H8="b",tM=v.createContext(null);function hu(){const e=v.useContext(tM);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function F8({defaultOpen:e=!0,open:t,onOpenChange:i,className:s,style:o,children:u,...c}){const d=kA(),[f,g]=v.useState(!1),[y,p]=v.useState(e),x=t??y,S=v.useCallback(R=>{const O=typeof R=="function"?R(x):R;i?i(O):p(O),document.cookie=`${P8}=${O}; path=/; max-age=${L8}`},[i,x]),w=v.useCallback(()=>d?g(R=>!R):S(R=>!R),[d,S,g]);v.useEffect(()=>{const R=O=>{O.key===H8&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),w())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[w]);const C=x?"expanded":"collapsed",E=v.useMemo(()=>({state:C,open:x,setOpen:S,isMobile:d,openMobile:f,setOpenMobile:g,toggleSidebar:w}),[C,x,S,d,f,g,w]);return b.jsx(tM.Provider,{value:E,children:b.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":z8,"--sidebar-width-icon":U8,...o},className:Ye("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),...c,children:u})})}function B8({side:e="left",variant:t="sidebar",collapsible:i="offcanvas",className:s,children:o,dir:u,...c}){const{t:d}=Ct(),{isMobile:f,state:g,openMobile:y,setOpenMobile:p}=hu();return i==="none"?b.jsx("div",{"data-slot":"sidebar",className:Ye("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",s),...c,children:o}):f?b.jsx(WA,{open:y,onOpenChange:p,...c,children:b.jsxs(JA,{dir:u,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":_8},side:e,children:[b.jsxs(j8,{className:"sr-only",children:[b.jsx(eM,{children:d("a11y.sidebar")}),b.jsx(I8,{children:d("a11y.sidebarDescription")})]}),b.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):b.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:[b.jsx("div",{"data-slot":"sidebar-gap",className:Ye("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)")}),b.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:Ye("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),...c,children:b.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 V8({className:e,onClick:t,...i}){const{t:s}=Ct(),{toggleSidebar:o}=hu();return b.jsxs(ht,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:Ye(e),onClick:u=>{t?.(u),o()},...i,children:[b.jsx(iL,{}),b.jsx("span",{className:"sr-only",children:s("a11y.toggleSidebar")})]})}function K8({className:e,...t}){const{t:i}=Ct(),{toggleSidebar:s}=hu();return b.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":i("a11y.toggleSidebar"),tabIndex:-1,onClick:s,title:i("a11y.toggleSidebar"),className:Ye("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 q8({className:e,...t}){return b.jsx("main",{"data-slot":"sidebar-inset",className:Ye("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 Y8({className:e,...t}){return b.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Ye("flex flex-col gap-2 p-2",e),...t})}function G8({className:e,...t}){return b.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Ye("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function $8({className:e,...t}){return b.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Ye("relative flex w-full min-w-0 flex-col px-2 py-1",e),...t})}function nM({className:e,...t}){return b.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Ye("flex w-full min-w-0 flex-col gap-px",e),...t})}function Ch({className:e,...t}){return b.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Ye("group/menu-item relative",e),...t})}const Q8=dd("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 Th({render:e,isActive:t=!1,variant:i="default",size:s="default",tooltip:o,className:u,...c}){const{isMobile:d,state:f}=hu(),g=Eb({defaultTagName:"button",props:Mr({className:Ye(Q8({variant:i,size:s}),u)},c),render:o?b.jsx(Kh,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:s,active:t}});return o?(typeof o=="string"&&(o={children:o}),b.jsxs(Vh,{children:[g,b.jsx(qh,{side:"right",align:"center",hidden:f!=="collapsed"||d,...o})]})):g}function X8({className:e,...t}){return b.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:Ye("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 Z8({className:e,...t}){return b.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:Ye("group/menu-sub-item relative",e),...t})}function W8({render:e,size:t="md",isActive:i=!1,className:s,...o}){return Eb({defaultTagName:"a",props:Mr({className:Ye("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 J8({items:e}){const{t}=Ct(),{pathname:i}=Nr(),{isMobile:s,state:o}=hu(),u=o==="collapsed"&&!s,c=d=>i===d||i.startsWith(`${d}/`);return b.jsx($8,{children:b.jsx(nM,{children:e.map(d=>{const f=d.icon,g=d.items?.some(y=>c(y.url))??!1;return d.items?u?b.jsx(Ch,{children:b.jsxs(Uo,{children:[b.jsxs(Ho,{render:b.jsx(Th,{tooltip:t(d.titleKey),isActive:g}),children:[b.jsx(f,{}),b.jsx("span",{children:t(d.titleKey)})]}),b.jsx(Fo,{className:"w-40",side:"right",align:"start",sideOffset:4,children:b.jsxs(OA,{children:[b.jsx(AA,{children:t(d.titleKey)}),d.items.map(y=>b.jsx(cu,{className:"cursor-pointer",render:b.jsx(Tc,{to:y.url}),children:b.jsx("span",{children:t(y.titleKey)})},y.titleKey))]})})]})},d.titleKey):b.jsxs(V_,{defaultOpen:g,className:"group/collapsible",render:b.jsx(Ch,{}),children:[b.jsxs(K_,{render:b.jsx(Th,{tooltip:t(d.titleKey),isActive:g}),children:[b.jsx(f,{}),b.jsx("span",{children:t(d.titleKey)}),b.jsx(Vv,{className:`
14
- ml-auto transition-transform duration-200
15
- group-data-open/collapsible:rotate-90
16
- `})]}),b.jsx(q_,{children:b.jsx(X8,{children:d.items.map(y=>b.jsx(Z8,{children:b.jsx(W8,{isActive:c(y.url),render:b.jsx(Tc,{to:y.url}),children:b.jsx("span",{children:t(y.titleKey)})})},y.titleKey))})})]},`${d.titleKey}-${g?"active":"inactive"}`):b.jsx(Ch,{children:b.jsxs(Th,{tooltip:t(d.titleKey),isActive:i===d.url,render:b.jsx(Tc,{to:d.url??"/dashboard"}),children:[b.jsx(f,{}),b.jsx("span",{children:t(d.titleKey)})]})},d.titleKey)})})})}const Ab=[{titleKey:"nav.dashboard",url:"/dashboard",icon:WP},{titleKey:"nav.library",icon:JP,items:[{titleKey:"nav.instructions",url:"/library/instructions"},{titleKey:"nav.skills",url:"/library/skills"}]},{titleKey:"nav.models",icon:tT,items:[{titleKey:"nav.genesis",url:"/models/genesis"},{titleKey:"nav.explorer",url:"/models/explorer"},{titleKey:"nav.quantum",url:"/models/quantum"}]}],eH=new Map([["/settings","nav.settings"],...Ab.flatMap(e=>[...e.url?[[e.url,e.titleKey]]:[],...e.items?.map(t=>[t.url,t.titleKey])??[]])]);function rM(e){return e.startsWith("/library/skills/")?"nav.skills":eH.get(e)??"nav.dashboard"}const tH=Ab.flatMap(e=>[...e.url?[e.url]:[],...e.items?.map(t=>t.url)??[]]),nH=tH;function rH({...e}){const{t}=Ct(),{pathname:i}=Nr(),{isMobile:s,setOpenMobile:o}=hu();return v.useEffect(()=>{s&&o(!1)},[s,i,o]),b.jsxs(B8,{collapsible:"icon",...e,children:[b.jsx(G8,{children:b.jsx(J8,{items:Ab})}),b.jsx(Y8,{children:b.jsx(nM,{children:b.jsx(Ch,{children:b.jsxs(Th,{tooltip:t("nav.settings"),render:b.jsx(Tc,{to:"/settings"}),children:[b.jsx(aL,{}),b.jsx("span",{children:t("nav.settings")})]})})})}),b.jsx(K8,{})]})}function iH({className:e,...t}){return b.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:Ye(e),...t})}function sH({className:e,...t}){return b.jsx("ol",{"data-slot":"breadcrumb-list",className:Ye("flex flex-wrap items-center gap-1.5 text-xs/relaxed wrap-break-word text-muted-foreground",e),...t})}function aH({className:e,...t}){return b.jsx("li",{"data-slot":"breadcrumb-item",className:Ye("inline-flex items-center gap-1",e),...t})}function oH({className:e,render:t,...i}){return Eb({defaultTagName:"a",props:Mr({className:Ye("transition-colors hover:text-foreground",e)},i),render:t,state:{slot:"breadcrumb-link"}})}function lH({className:e,...t}){return b.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Ye("font-normal text-foreground",e),...t})}function uH({children:e,className:t,...i}){return b.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Ye("[&>svg]:size-3.5",t),...i,children:e??b.jsx(Vv,{})})}function cH({items:e}){const{t}=Ct();return b.jsx(iH,{"aria-label":t("a11y.breadcrumb"),className:"min-w-0",children:b.jsx(sH,{className:"flex-nowrap text-sm font-medium text-foreground",children:e.map((i,s)=>b.jsxs(v.Fragment,{children:[s>0&&b.jsx(uH,{}),b.jsx(aH,{className:i.to?"shrink-0":"min-w-0",children:i.to?b.jsx(oH,{render:b.jsx(ud,{to:i.to}),className:"truncate",title:i.label,children:i.label}):b.jsx(lH,{className:"truncate font-medium",title:i.label,children:i.label})})]},i.to??i.label))})})}const ng=v.createContext(null);ng.displayName="PageHeaderActionsContext";function dH({children:e}){const[t,i]=v.useState(null);return b.jsx(ng,{value:{container:t,setContainer:i},children:e})}function fH(){const e=v.use(ng);if(!e)throw new Error("PageHeaderActionsSlot must be used within PageHeaderActionsProvider");const t=e.setContainer,i=v.useCallback(s=>{t(s)},[t]);return b.jsx("div",{ref:i,className:"ml-auto flex shrink-0 items-center gap-2 px-4"})}function iM({children:e}){const t=v.use(ng);return t?.container?cr.createPortal(e,t.container):null}function hH(){const{t:e}=Ct(),{pathname:t}=Nr(),i=dz("/library/skills/:name");return b.jsx(dH,{children:b.jsxs(F8,{children:[b.jsx(rH,{}),b.jsxs(q8,{className:i?"h-svh min-w-0 overflow-hidden":"min-w-0",children:[b.jsxs("header",{className:`
17
- flex h-16 shrink-0 items-center gap-2 transition-[width,height]
18
- ease-linear
19
- group-has-data-[collapsible=icon]/sidebar-wrapper:h-12
20
- `,children:[b.jsxs("div",{className:"flex min-w-0 items-center gap-2 px-4",children:[b.jsx(V8,{size:"icon",className:"-ml-1"}),b.jsx(jA,{orientation:"vertical",className:`
21
- mr-2
22
- data-vertical:h-4 data-vertical:self-auto
23
- `}),b.jsx(cH,{items:i?[{label:e("nav.skills"),to:"/library/skills"},{label:i.params.name??""}]:[{label:e(rM(t))}]})]}),b.jsx(fH,{})]}),b.jsx(qO,{})]})]})})}function pH(){const{t:e}=Ct(),{pathname:t}=Nr(),i=Rz(),s=lu();let o;for(const c of i.toReversed())if(gH(c.handle)){o=c.handle.backTo;break}const u=()=>{if(o===void 0){s(-1);return}s(o)};return b.jsxs("div",{className:"flex h-dvh flex-col overflow-hidden bg-background",children:[b.jsx("header",{className:`
24
- flex h-16 shrink-0 items-center gap-2 transition-[width,height]
25
- ease-linear
26
- `,children:b.jsxs("div",{className:"flex items-center gap-2 px-4",children:[b.jsxs(ht,{variant:"ghost",size:"icon",className:"-ml-1",onClick:u,children:[b.jsx(HP,{}),b.jsx("span",{className:"sr-only",children:e("a11y.goBack")})]}),b.jsx(jA,{orientation:"vertical",className:`
27
- mr-2
28
- data-vertical:h-4 data-vertical:self-auto
29
- `}),b.jsx("span",{className:"text-sm font-medium",children:e(rM(t))})]})}),b.jsx("main",{className:"min-h-0 flex-1 overflow-hidden",children:b.jsx(qO,{})})]})}function gH(e){return typeof e=="object"&&e!==null&&"backTo"in e&&typeof e.backTo=="string"}function mH(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return v.useMemo(()=>s=>{t.forEach(o=>o(s))},t)}const rg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function pu(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Mb(e){return"nodeType"in e}function Br(e){var t,i;return e?pu(e)?e:Mb(e)&&(t=(i=e.ownerDocument)==null?void 0:i.defaultView)!=null?t:window:window}function kb(e){const{Document:t}=Br(e);return e instanceof t}function gd(e){return pu(e)?!1:e instanceof Br(e).HTMLElement}function sM(e){return e instanceof Br(e).SVGElement}function gu(e){return e?pu(e)?e.document:Mb(e)?kb(e)?e:gd(e)||sM(e)?e.ownerDocument:document:document:document}const Qi=rg?v.useLayoutEffect:v.useEffect;function ig(e){const t=v.useRef(e);return Qi(()=>{t.current=e}),v.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 yH(){const e=v.useRef(null),t=v.useCallback((s,o)=>{e.current=setInterval(s,o)},[]),i=v.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,i]}function Hc(e,t){t===void 0&&(t=[e]);const i=v.useRef(e);return Qi(()=>{i.current!==e&&(i.current=e)},t),i}function md(e,t){const i=v.useRef();return v.useMemo(()=>{const s=e(i.current);return i.current=s,s},[...t])}function Zh(e){const t=ig(e),i=v.useRef(null),s=v.useCallback(o=>{o!==i.current&&t?.(o,i.current),i.current=o},[]);return[i,s]}function Wh(e){const t=v.useRef();return v.useEffect(()=>{t.current=e},[e]),t.current}let fy={};function yd(e,t){return v.useMemo(()=>{if(t)return t;const i=fy[e]==null?0:fy[e]+1;return fy[e]=i,e+"-"+i},[e,t])}function aM(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((u,c)=>{const d=Object.entries(c);for(const[f,g]of d){const y=u[f];y!=null&&(u[f]=y+e*g)}return u},{...t})}}const Gl=aM(1),Fc=aM(-1);function vH(e){return"clientX"in e&&"clientY"in e}function sg(e){if(!e)return!1;const{KeyboardEvent:t}=Br(e.target);return t&&e instanceof t}function bH(e){if(!e)return!1;const{TouchEvent:t}=Br(e.target);return t&&e instanceof t}function Jh(e){if(bH(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 vH(e)?{x:e.clientX,y:e.clientY}:null}const Ua=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[Ua.Translate.toString(e),Ua.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:i,easing:s}=e;return t+" "+i+"ms "+s}}}),sR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function xH(e){return e.matches(sR)?e:e.querySelector(sR)}const SH={display:"none"};function wH(e){let{id:t,value:i}=e;return Ne.createElement("div",{id:t,style:SH},i)}function EH(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 RH(){const[e,t]=v.useState("");return{announce:v.useCallback(s=>{s!=null&&t(s)},[]),announcement:e}}const oM=v.createContext(null);function CH(e){const t=v.useContext(oM);v.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function TH(){const[e]=v.useState(()=>new Set),t=v.useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[v.useCallback(s=>{let{type:o,event:u}=s;e.forEach(c=>{var d;return(d=c[o])==null?void 0:d.call(c,u)})},[e]),t]}const OH={draggable:`
30
- To pick up a draggable item, press the space bar.
31
- While dragging, use the arrow keys to move the item.
32
- Press space again to drop the item in its new position, or press escape to cancel.
33
- `},AH={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 MH(e){let{announcements:t=AH,container:i,hiddenTextDescribedById:s,screenReaderInstructions:o=OH}=e;const{announce:u,announcement:c}=RH(),d=yd("DndLiveRegion"),[f,g]=v.useState(!1);if(v.useEffect(()=>{g(!0)},[]),CH(v.useMemo(()=>({onDragStart(p){let{active:x}=p;u(t.onDragStart({active:x}))},onDragMove(p){let{active:x,over:S}=p;t.onDragMove&&u(t.onDragMove({active:x,over:S}))},onDragOver(p){let{active:x,over:S}=p;u(t.onDragOver({active:x,over:S}))},onDragEnd(p){let{active:x,over:S}=p;u(t.onDragEnd({active:x,over:S}))},onDragCancel(p){let{active:x,over:S}=p;u(t.onDragCancel({active:x,over:S}))}}),[u,t])),!f)return null;const y=Ne.createElement(Ne.Fragment,null,Ne.createElement(wH,{id:s,value:o.draggable}),Ne.createElement(EH,{id:d,announcement:c}));return i?cr.createPortal(y,i):y}var ir;(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"})(ir||(ir={}));function ep(){}function hy(e,t){return v.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function kH(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return v.useMemo(()=>[...t].filter(s=>s!=null),[...t])}const Xi=Object.freeze({x:0,y:0});function Nb(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function NH(e,t){const i=Jh(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 Db(e,t){let{data:{value:i}}=e,{data:{value:s}}=t;return i-s}function DH(e,t){let{data:{value:i}}=e,{data:{value:s}}=t;return s-i}function Jy(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 lM(e,t){if(!e||e.length===0)return null;const[i]=e;return i[t]}function aR(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 jH=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:s}=e;const o=aR(t,t.left,t.top),u=[];for(const c of s){const{id:d}=c,f=i.get(d);if(f){const g=Nb(aR(f),o);u.push({id:d,data:{droppableContainer:c,value:g}})}}return u.sort(Db)},IH=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:s}=e;const o=Jy(t),u=[];for(const c of s){const{id:d}=c,f=i.get(d);if(f){const g=Jy(f),y=o.reduce((x,S,w)=>x+Nb(g[w],S),0),p=Number((y/4).toFixed(4));u.push({id:d,data:{droppableContainer:c,value:p}})}}return u.sort(Db)};function PH(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),u=Math.min(t.top+t.height,e.top+e.height),c=o-s,d=u-i;if(s<o&&i<u){const f=t.width*t.height,g=e.width*e.height,y=c*d,p=y/(f+g-y);return Number(p.toFixed(4))}return 0}const LH=e=>{let{collisionRect:t,droppableRects:i,droppableContainers:s}=e;const o=[];for(const u of s){const{id:c}=u,d=i.get(c);if(d){const f=PH(d,t);f>0&&o.push({id:c,data:{droppableContainer:u,value:f}})}}return o.sort(DH)};function zH(e,t){const{top:i,left:s,bottom:o,right:u}=t;return i<=e.y&&e.y<=o&&s<=e.x&&e.x<=u}const _H=e=>{let{droppableContainers:t,droppableRects:i,pointerCoordinates:s}=e;if(!s)return[];const o=[];for(const u of t){const{id:c}=u,d=i.get(c);if(d&&zH(s,d)){const g=Jy(d).reduce((p,x)=>p+Nb(s,x),0),y=Number((g/4).toFixed(4));o.push({id:c,data:{droppableContainer:u,value:y}})}}return o.sort(Db)};function UH(e,t,i){return{...e,scaleX:t&&i?t.width/i.width:1,scaleY:t&&i?t.height/i.height:1}}function uM(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Xi}function HH(e){return function(i){for(var s=arguments.length,o=new Array(s>1?s-1:0),u=1;u<s;u++)o[u-1]=arguments[u];return o.reduce((c,d)=>({...c,top:c.top+e*d.y,bottom:c.bottom+e*d.y,left:c.left+e*d.x,right:c.right+e*d.x}),{...i})}}const FH=HH(1);function cM(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 BH(e,t,i){const s=cM(t);if(!s)return e;const{scaleX:o,scaleY:u,x:c,y:d}=s,f=e.left-c-(1-o)*parseFloat(i),g=e.top-d-(1-u)*parseFloat(i.slice(i.indexOf(" ")+1)),y=o?e.width/o:e.width,p=u?e.height/u:e.height;return{width:y,height:p,top:g,right:f+y,bottom:g+p,left:f}}const VH={ignoreTransform:!1};function mu(e,t){t===void 0&&(t=VH);let i=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:y}=Br(e).getComputedStyle(e);g&&(i=BH(i,g,y))}const{top:s,left:o,width:u,height:c,bottom:d,right:f}=i;return{top:s,left:o,width:u,height:c,bottom:d,right:f}}function oR(e){return mu(e,{ignoreTransform:!0})}function KH(e){const t=e.innerWidth,i=e.innerHeight;return{top:0,left:0,right:t,bottom:i,width:t,height:i}}function qH(e,t){return t===void 0&&(t=Br(e).getComputedStyle(e)),t.position==="fixed"}function YH(e,t){t===void 0&&(t=Br(e).getComputedStyle(e));const i=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const u=t[o];return typeof u=="string"?i.test(u):!1})}function ag(e,t){const i=[];function s(o){if(t!=null&&i.length>=t||!o)return i;if(kb(o)&&o.scrollingElement!=null&&!i.includes(o.scrollingElement))return i.push(o.scrollingElement),i;if(!gd(o)||sM(o)||i.includes(o))return i;const u=Br(e).getComputedStyle(o);return o!==e&&YH(o,u)&&i.push(o),qH(o,u)?i:s(o.parentNode)}return e?s(e):i}function dM(e){const[t]=ag(e,1);return t??null}function py(e){return!rg||!e?null:pu(e)?e:Mb(e)?kb(e)||e===gu(e).scrollingElement?window:gd(e)?e:null:null}function fM(e){return pu(e)?e.scrollX:e.scrollLeft}function hM(e){return pu(e)?e.scrollY:e.scrollTop}function ev(e){return{x:fM(e),y:hM(e)}}var ur;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ur||(ur={}));function pM(e){return!rg||!e?!1:e===document.scrollingElement}function gM(e){const t={x:0,y:0},i=pM(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,u=e.scrollLeft<=t.x,c=e.scrollTop>=s.y,d=e.scrollLeft>=s.x;return{isTop:o,isLeft:u,isBottom:c,isRight:d,maxScroll:s,minScroll:t}}const GH={x:.2,y:.2};function $H(e,t,i,s,o){let{top:u,left:c,right:d,bottom:f}=i;s===void 0&&(s=10),o===void 0&&(o=GH);const{isTop:g,isBottom:y,isLeft:p,isRight:x}=gM(e),S={x:0,y:0},w={x:0,y:0},C={height:t.height*o.y,width:t.width*o.x};return!g&&u<=t.top+C.height?(S.y=ur.Backward,w.y=s*Math.abs((t.top+C.height-u)/C.height)):!y&&f>=t.bottom-C.height&&(S.y=ur.Forward,w.y=s*Math.abs((t.bottom-C.height-f)/C.height)),!x&&d>=t.right-C.width?(S.x=ur.Forward,w.x=s*Math.abs((t.right-C.width-d)/C.width)):!p&&c<=t.left+C.width&&(S.x=ur.Backward,w.x=s*Math.abs((t.left+C.width-c)/C.width)),{direction:S,speed:w}}function QH(e){if(e===document.scrollingElement){const{innerWidth:u,innerHeight:c}=window;return{top:0,left:0,right:u,bottom:c,width:u,height:c}}const{top: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 mM(e){return e.reduce((t,i)=>Gl(t,ev(i)),Xi)}function XH(e){return e.reduce((t,i)=>t+fM(i),0)}function ZH(e){return e.reduce((t,i)=>t+hM(i),0)}function yM(e,t){if(t===void 0&&(t=mu),!e)return;const{top:i,left:s,bottom:o,right:u}=t(e);dM(e)&&(o<=0||u<=0||i>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const WH=[["x",["left","right"],XH],["y",["top","bottom"],ZH]];class jb{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=ag(i),o=mM(s);this.rect={...t},this.width=t.width,this.height=t.height;for(const[u,c,d]of WH)for(const f of c)Object.defineProperty(this,f,{get:()=>{const g=d(s),y=o[u]-g;return this.rect[f]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Mc{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 JH(e){const{EventTarget:t}=Br(e);return e instanceof t?e:gu(e)}function gy(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 ki;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ki||(ki={}));function lR(e){e.preventDefault()}function eF(e){e.stopPropagation()}var Jt;(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"})(Jt||(Jt={}));const vM={start:[Jt.Space,Jt.Enter],cancel:[Jt.Esc],end:[Jt.Space,Jt.Enter,Jt.Tab]},tF=(e,t)=>{let{currentCoordinates:i}=t;switch(e.code){case Jt.Right:return{...i,x:i.x+25};case Jt.Left:return{...i,x:i.x-25};case Jt.Down:return{...i,y:i.y+25};case Jt.Up:return{...i,y:i.y-25}}};class Ib{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 Mc(gu(i)),this.windowListeners=new Mc(Br(i)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ki.Resize,this.handleCancel),this.windowListeners.add(ki.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ki.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:i}=this.props,s=t.node.current;s&&yM(s),i(Xi)}handleKeyDown(t){if(sg(t)){const{active:i,context:s,options:o}=this.props,{keyboardCodes:u=vM,coordinateGetter:c=tF,scrollBehavior:d="smooth"}=o,{code:f}=t;if(u.end.includes(f)){this.handleEnd(t);return}if(u.cancel.includes(f)){this.handleCancel(t);return}const{collisionRect:g}=s.current,y=g?{x:g.left,y:g.top}:Xi;this.referenceCoordinates||(this.referenceCoordinates=y);const p=c(t,{active:i,context:s.current,currentCoordinates:y});if(p){const x=Fc(p,y),S={x:0,y:0},{scrollableAncestors:w}=s.current;for(const C of w){const E=t.code,{isTop:R,isRight:O,isLeft:A,isBottom:M,maxScroll:N,minScroll:j}=gM(C),D=QH(C),k={x:Math.min(E===Jt.Right?D.right-D.width/2:D.right,Math.max(E===Jt.Right?D.left:D.left+D.width/2,p.x)),y:Math.min(E===Jt.Down?D.bottom-D.height/2:D.bottom,Math.max(E===Jt.Down?D.top:D.top+D.height/2,p.y))},_=E===Jt.Right&&!O||E===Jt.Left&&!A,L=E===Jt.Down&&!M||E===Jt.Up&&!R;if(_&&k.x!==p.x){const q=C.scrollLeft+x.x,X=E===Jt.Right&&q<=N.x||E===Jt.Left&&q>=j.x;if(X&&!x.y){C.scrollTo({left:q,behavior:d});return}X?S.x=C.scrollLeft-q:S.x=E===Jt.Right?C.scrollLeft-N.x:C.scrollLeft-j.x,S.x&&C.scrollBy({left:-S.x,behavior:d});break}else if(L&&k.y!==p.y){const q=C.scrollTop+x.y,X=E===Jt.Down&&q<=N.y||E===Jt.Up&&q>=j.y;if(X&&!x.x){C.scrollTo({top:q,behavior:d});return}X?S.y=C.scrollTop-q:S.y=E===Jt.Down?C.scrollTop-N.y:C.scrollTop-j.y,S.y&&C.scrollBy({top:-S.y,behavior:d});break}}this.handleMove(t,Gl(Fc(p,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()}}Ib.activators=[{eventName:"onKeyDown",handler:(e,t,i)=>{let{keyboardCodes:s=vM,onActivation:o}=t,{active:u}=i;const{code:c}=e.nativeEvent;if(s.start.includes(c)){const d=u.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function uR(e){return!!(e&&"distance"in e)}function cR(e){return!!(e&&"delay"in e)}class Pb{constructor(t,i,s){var o;s===void 0&&(s=JH(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:u}=t,{target:c}=u;this.props=t,this.events=i,this.document=gu(c),this.documentListeners=new Mc(this.document),this.listeners=new Mc(s),this.windowListeners=new Mc(Br(c)),this.initialCoordinates=(o=Jh(u))!=null?o:Xi,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(ki.Resize,this.handleCancel),this.windowListeners.add(ki.DragStart,lR),this.windowListeners.add(ki.VisibilityChange,this.handleCancel),this.windowListeners.add(ki.ContextMenu,lR),this.documentListeners.add(ki.Keydown,this.handleKeydown),i){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(cR(i)){this.timeoutId=setTimeout(this.handleStart,i.delay),this.handlePending(i);return}if(uR(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(ki.Click,eF,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ki.SelectionChange,this.removeTextSelection),i(t))}handleMove(t){var i;const{activated:s,initialCoordinates:o,props:u}=this,{onMove:c,options:{activationConstraint:d}}=u;if(!o)return;const f=(i=Jh(t))!=null?i:Xi,g=Fc(o,f);if(!s&&d){if(uR(d)){if(d.tolerance!=null&&gy(g,d.tolerance))return this.handleCancel();if(gy(g,d.distance))return this.handleStart()}if(cR(d)&&gy(g,d.tolerance))return this.handleCancel();this.handlePending(d,g);return}t.cancelable&&t.preventDefault(),c(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===Jt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const nF={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class bM extends Pb{constructor(t){const{event:i}=t,s=gu(i.target);super(t,nF,s)}}bM.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 rF={move:{name:"mousemove"},end:{name:"mouseup"}};var tv;(function(e){e[e.RightClick=2]="RightClick"})(tv||(tv={}));class xM extends Pb{constructor(t){super(t,rF,gu(t.event.target))}}xM.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:i}=e,{onActivation:s}=t;return i.button===tv.RightClick?!1:(s?.({event:i}),!0)}}];const my={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class SM extends Pb{constructor(t){super(t,my)}static setup(){return window.addEventListener(my.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(my.move.name,t)};function t(){}}}SM.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 kc;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(kc||(kc={}));var tp;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(tp||(tp={}));function iF(e){let{acceleration:t,activator:i=kc.Pointer,canScroll:s,draggingRect:o,enabled:u,interval:c=5,order:d=tp.TreeOrder,pointerCoordinates:f,scrollableAncestors:g,scrollableAncestorRects:y,delta:p,threshold:x}=e;const S=aF({delta:p,disabled:!u}),[w,C]=yH(),E=v.useRef({x:0,y:0}),R=v.useRef({x:0,y:0}),O=v.useMemo(()=>{switch(i){case kc.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case kc.DraggableRect:return o}},[i,o,f]),A=v.useRef(null),M=v.useCallback(()=>{const j=A.current;if(!j)return;const D=E.current.x*R.current.x,k=E.current.y*R.current.y;j.scrollBy(D,k)},[]),N=v.useMemo(()=>d===tp.TreeOrder?[...g].reverse():g,[d,g]);v.useEffect(()=>{if(!u||!g.length||!O){C();return}for(const j of N){if(s?.(j)===!1)continue;const D=g.indexOf(j),k=y[D];if(!k)continue;const{direction:_,speed:L}=$H(j,k,O,t,x);for(const q of["x","y"])S[q][_[q]]||(L[q]=0,_[q]=0);if(L.x>0||L.y>0){C(),A.current=j,w(M,c),E.current=L,R.current=_;return}}E.current={x:0,y:0},R.current={x:0,y:0},C()},[t,M,s,C,u,c,JSON.stringify(O),JSON.stringify(S),w,g,N,y,JSON.stringify(x)])}const sF={x:{[ur.Backward]:!1,[ur.Forward]:!1},y:{[ur.Backward]:!1,[ur.Forward]:!1}};function aF(e){let{delta:t,disabled:i}=e;const s=Wh(t);return md(o=>{if(i||!s||!o)return sF;const u={x:Math.sign(t.x-s.x),y:Math.sign(t.y-s.y)};return{x:{[ur.Backward]:o.x[ur.Backward]||u.x===-1,[ur.Forward]:o.x[ur.Forward]||u.x===1},y:{[ur.Backward]:o.y[ur.Backward]||u.y===-1,[ur.Forward]:o.y[ur.Forward]||u.y===1}}},[i,t,s])}function oF(e,t){const i=t!=null?e.get(t):void 0,s=i?i.node.current:null;return md(o=>{var u;return t==null?null:(u=s??o)!=null?u:null},[s,t])}function lF(e,t){return v.useMemo(()=>e.reduce((i,s)=>{const{sensor:o}=s,u=o.activators.map(c=>({eventName:c.eventName,handler:t(c.handler,s)}));return[...i,...u]},[]),[e,t])}var Bc;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Bc||(Bc={}));var nv;(function(e){e.Optimized="optimized"})(nv||(nv={}));const dR=new Map;function uF(e,t){let{dragging:i,dependencies:s,config:o}=t;const[u,c]=v.useState(null),{frequency:d,measure:f,strategy:g}=o,y=v.useRef(e),p=E(),x=Hc(p),S=v.useCallback(function(R){R===void 0&&(R=[]),!x.current&&c(O=>O===null?R:O.concat(R.filter(A=>!O.includes(A))))},[x]),w=v.useRef(null),C=md(R=>{if(p&&!i)return dR;if(!R||R===dR||y.current!==e||u!=null){const O=new Map;for(let A of e){if(!A)continue;if(u&&u.length>0&&!u.includes(A.id)&&A.rect.current){O.set(A.id,A.rect.current);continue}const M=A.node.current,N=M?new jb(f(M),M):null;A.rect.current=N,N&&O.set(A.id,N)}return O}return R},[e,u,i,p,f]);return v.useEffect(()=>{y.current=e},[e]),v.useEffect(()=>{p||S()},[i,p]),v.useEffect(()=>{u&&u.length>0&&c(null)},[JSON.stringify(u)]),v.useEffect(()=>{p||typeof d!="number"||w.current!==null||(w.current=setTimeout(()=>{S(),w.current=null},d))},[d,p,S,...s]),{droppableRects:C,measureDroppableContainers:S,measuringScheduled:u!=null};function E(){switch(g){case Bc.Always:return!1;case Bc.BeforeDragging:return i;default:return!i}}}function Lb(e,t){return md(i=>e?i||(typeof t=="function"?t(e):e):null,[t,e])}function cF(e,t){return Lb(e,t)}function dF(e){let{callback:t,disabled:i}=e;const s=ig(t),o=v.useMemo(()=>{if(i||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:u}=window;return new u(s)},[s,i]);return v.useEffect(()=>()=>o?.disconnect(),[o]),o}function og(e){let{callback:t,disabled:i}=e;const s=ig(t),o=v.useMemo(()=>{if(i||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:u}=window;return new u(s)},[i]);return v.useEffect(()=>()=>o?.disconnect(),[o]),o}function fF(e){return new jb(mu(e),e)}function fR(e,t,i){t===void 0&&(t=fF);const[s,o]=v.useState(null);function u(){o(f=>{if(!e)return null;if(e.isConnected===!1){var g;return(g=f??i)!=null?g:null}const y=t(e);return JSON.stringify(f)===JSON.stringify(y)?f:y})}const c=dF({callback(f){if(e)for(const g of f){const{type:y,target:p}=g;if(y==="childList"&&p instanceof HTMLElement&&p.contains(e)){u();break}}}}),d=og({callback:u});return Qi(()=>{u(),e?(d?.observe(e),c?.observe(document.body,{childList:!0,subtree:!0})):(d?.disconnect(),c?.disconnect())},[e]),s}function hF(e){const t=Lb(e);return uM(e,t)}const hR=[];function pF(e){const t=v.useRef(e),i=md(s=>e?s&&s!==hR&&e&&t.current&&e.parentNode===t.current.parentNode?s:ag(e):hR,[e]);return v.useEffect(()=>{t.current=e},[e]),i}function gF(e){const[t,i]=v.useState(null),s=v.useRef(e),o=v.useCallback(u=>{const c=py(u.target);c&&i(d=>d?(d.set(c,ev(c)),new Map(d)):null)},[]);return v.useEffect(()=>{const u=s.current;if(e!==u){c(u);const d=e.map(f=>{const g=py(f);return g?(g.addEventListener("scroll",o,{passive:!0}),[g,ev(g)]):null}).filter(f=>f!=null);i(d.length?new Map(d):null),s.current=e}return()=>{c(e),c(u)};function c(d){d.forEach(f=>{const g=py(f);g?.removeEventListener("scroll",o)})}},[o,e]),v.useMemo(()=>e.length?t?Array.from(t.values()).reduce((u,c)=>Gl(u,c),Xi):mM(e):Xi,[e,t])}function pR(e,t){t===void 0&&(t=[]);const i=v.useRef(null);return v.useEffect(()=>{i.current=null},t),v.useEffect(()=>{const s=e!==Xi;s&&!i.current&&(i.current=e),!s&&i.current&&(i.current=null)},[e]),i.current?Fc(e,i.current):Xi}function mF(e){v.useEffect(()=>{if(!rg)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 yF(e,t){return v.useMemo(()=>e.reduce((i,s)=>{let{eventName:o,handler:u}=s;return i[o]=c=>{u(c,t)},i},{}),[e,t])}function wM(e){return v.useMemo(()=>e?KH(e):null,[e])}const gR=[];function vF(e,t){t===void 0&&(t=mu);const[i]=e,s=wM(i?Br(i):null),[o,u]=v.useState(gR);function c(){u(()=>e.length?e.map(f=>pM(f)?s:new jb(t(f),f)):gR)}const d=og({callback:c});return Qi(()=>{d?.disconnect(),c(),e.forEach(f=>d?.observe(f))},[e]),o}function EM(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return gd(t)?t:e}function bF(e){let{measure:t}=e;const[i,s]=v.useState(null),o=v.useCallback(g=>{for(const{target:y}of g)if(gd(y)){s(p=>{const x=t(y);return p?{...p,width:x.width,height:x.height}:x});break}},[t]),u=og({callback:o}),c=v.useCallback(g=>{const y=EM(g);u?.disconnect(),y&&u?.observe(y),s(y?t(y):null)},[t,u]),[d,f]=Zh(c);return v.useMemo(()=>({nodeRef:d,rect:i,setRef:f}),[i,d,f])}const xF=[{sensor:bM,options:{}},{sensor:Ib,options:{}}],SF={current:{}},Oh={draggable:{measure:oR},droppable:{measure:oR,strategy:Bc.WhileDragging,frequency:nv.Optimized},dragOverlay:{measure:mu}};class Nc 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 wF={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Nc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ep},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Oh,measureDroppableContainers:ep,windowRect:null,measuringScheduled:!1},RM={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ep,draggableNodes:new Map,over:null,measureDroppableContainers:ep},vd=v.createContext(RM),CM=v.createContext(wF);function EF(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Nc}}}function RF(e,t){switch(t.type){case ir.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ir.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 ir.DragEnd:case ir.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ir.RegisterDroppable:{const{element:i}=t,{id:s}=i,o=new Nc(e.droppable.containers);return o.set(s,i),{...e,droppable:{...e.droppable,containers:o}}}case ir.SetDroppableDisabled:{const{id:i,key:s,disabled:o}=t,u=e.droppable.containers.get(i);if(!u||s!==u.key)return e;const c=new Nc(e.droppable.containers);return c.set(i,{...u,disabled:o}),{...e,droppable:{...e.droppable,containers:c}}}case ir.UnregisterDroppable:{const{id:i,key:s}=t,o=e.droppable.containers.get(i);if(!o||s!==o.key)return e;const u=new Nc(e.droppable.containers);return u.delete(i),{...e,droppable:{...e.droppable,containers:u}}}default:return e}}function CF(e){let{disabled:t}=e;const{active:i,activatorEvent:s,draggableNodes:o}=v.useContext(vd),u=Wh(s),c=Wh(i?.id);return v.useEffect(()=>{if(!t&&!s&&u&&c!=null){if(!sg(u)||document.activeElement===u.target)return;const d=o.get(c);if(!d)return;const{activatorNode:f,node:g}=d;if(!f.current&&!g.current)return;requestAnimationFrame(()=>{for(const y of[f.current,g.current]){if(!y)continue;const p=xH(y);if(p){p.focus();break}}})}},[s,t,o,c,u]),null}function TM(e,t){let{transform:i,...s}=t;return e!=null&&e.length?e.reduce((o,u)=>u({transform:o,...s}),i):i}function TF(e){return v.useMemo(()=>({draggable:{...Oh.draggable,...e?.draggable},droppable:{...Oh.droppable,...e?.droppable},dragOverlay:{...Oh.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function OF(e){let{activeNode:t,measure:i,initialRect:s,config:o=!0}=e;const u=v.useRef(!1),{x:c,y:d}=typeof o=="boolean"?{x:o,y:o}:o;Qi(()=>{if(!c&&!d||!t){u.current=!1;return}if(u.current||!s)return;const g=t?.node.current;if(!g||g.isConnected===!1)return;const y=i(g),p=uM(y,s);if(c||(p.x=0),d||(p.y=0),u.current=!0,Math.abs(p.x)>0||Math.abs(p.y)>0){const x=dM(g);x&&x.scrollBy({top:p.y,left:p.x})}},[t,c,d,s,i])}const lg=v.createContext({...Xi,scaleX:1,scaleY:1});var Ma;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ma||(Ma={}));const AF=v.memo(function(t){var i,s,o,u;let{id:c,accessibility:d,autoScroll:f=!0,children:g,sensors:y=xF,collisionDetection:p=LH,measuring:x,modifiers:S,...w}=t;const C=v.useReducer(RF,void 0,EF),[E,R]=C,[O,A]=TH(),[M,N]=v.useState(Ma.Uninitialized),j=M===Ma.Initialized,{draggable:{active:D,nodes:k,translate:_},droppable:{containers:L}}=E,q=D!=null?k.get(D):null,X=v.useRef({initial:null,translated:null}),B=v.useMemo(()=>{var bt;return D!=null?{id:D,data:(bt=q?.data)!=null?bt:SF,rect:X}:null},[D,q]),H=v.useRef(null),[U,z]=v.useState(null),[Q,$]=v.useState(null),K=Hc(w,Object.values(w)),Y=yd("DndDescribedBy",c),ee=v.useMemo(()=>L.getEnabled(),[L]),G=TF(x),{droppableRects:oe,measureDroppableContainers:I,measuringScheduled:V}=uF(ee,{dragging:j,dependencies:[_.x,_.y],config:G.droppable}),J=oF(k,D),re=v.useMemo(()=>Q?Jh(Q):null,[Q]),Ee=ft(),le=cF(J,G.draggable.measure);OF({activeNode:D!=null?k.get(D):null,config:Ee.layoutShiftCompensation,initialRect:le,measure:G.draggable.measure});const me=fR(J,G.draggable.measure,le),ge=fR(J?J.parentElement:null),ce=v.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:oe,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Te=L.getNodeFor((i=ce.current.over)==null?void 0:i.id),ve=bF({measure:G.dragOverlay.measure}),Pe=(s=ve.nodeRef.current)!=null?s:J,Ae=j?(o=ve.rect)!=null?o:me:null,Le=!!(ve.nodeRef.current&&ve.rect),Be=hF(Le?null:me),Oe=wM(Pe?Br(Pe):null),Ue=pF(j?Te??J:null),be=vF(Ue),He=TM(S,{transform:{x:_.x-Be.x,y:_.y-Be.y,scaleX:1,scaleY:1},activatorEvent:Q,active:B,activeNodeRect:me,containerNodeRect:ge,draggingNodeRect:Ae,over:ce.current.over,overlayNodeRect:ve.rect,scrollableAncestors:Ue,scrollableAncestorRects:be,windowRect:Oe}),Ze=re?Gl(re,_):null,at=gF(Ue),de=pR(at),we=pR(at,[me]),Ge=Gl(He,de),ke=Ae?FH(Ae,He):null,De=B&&ke?p({active:B,collisionRect:ke,droppableRects:oe,droppableContainers:ee,pointerCoordinates:Ze}):null,vt=lM(De,"id"),[ct,pt]=v.useState(null),kt=Le?He:Gl(He,we),jt=UH(kt,(u=ct?.rect)!=null?u:null,me),en=v.useRef(null),sn=v.useCallback((bt,mt)=>{let{sensor:Ut,options:cn}=mt;if(H.current==null)return;const je=k.get(H.current);if(!je)return;const st=bt.nativeEvent,Ie=new Ut({active:H.current,activeNode:je,event:st,options:cn,context:ce,onAbort($e){if(!k.get($e))return;const{onDragAbort:Tt}=K.current,F={id:$e};Tt?.(F),O({type:"onDragAbort",event:F})},onPending($e,et,Tt,F){if(!k.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=k.get(et);if(!Tt)return;const{onDragStart:F}=K.current,W={activatorEvent:st,active:{id:et,data:Tt.data,rect:X}};cr.unstable_batchedUpdates(()=>{F?.(W),N(Ma.Initializing),R({type:ir.DragStart,initialCoordinates:$e,active:et}),O({type:"onDragStart",event:W}),z(en.current),$(st)})},onMove($e){R({type:ir.DragMove,coordinates:$e})},onEnd:ze(ir.DragEnd),onCancel:ze(ir.DragCancel)});en.current=Ie;function ze($e){return async function(){const{active:Tt,collisions:F,over:W,scrollAdjustedTranslate:ne}=ce.current;let ye=null;if(Tt&&ne){const{cancelDrop:xe}=K.current;ye={activatorEvent:st,active:Tt,collisions:F,delta:ne,over:W},$e===ir.DragEnd&&typeof xe=="function"&&await Promise.resolve(xe(ye))&&($e=ir.DragCancel)}H.current=null,cr.unstable_batchedUpdates(()=>{R({type:$e}),N(Ma.Uninitialized),pt(null),z(null),$(null),en.current=null;const xe=$e===ir.DragEnd?"onDragEnd":"onDragCancel";if(ye){const Ke=K.current[xe];Ke?.(ye),O({type:xe,event:ye})}})}}},[k]),tn=v.useCallback((bt,mt)=>(Ut,cn)=>{const je=Ut.nativeEvent,st=k.get(cn);if(H.current!==null||!st||je.dndKit||je.defaultPrevented)return;const Ie={active:st};bt(Ut,mt.options,Ie)===!0&&(je.dndKit={capturedBy:mt.sensor},H.current=cn,sn(Ut,mt))},[k,sn]),Je=lF(y,tn);mF(y),Qi(()=>{me&&M===Ma.Initializing&&N(Ma.Initialized)},[me,M]),v.useEffect(()=>{const{onDragMove:bt}=K.current,{active:mt,activatorEvent:Ut,collisions:cn,over:je}=ce.current;if(!mt||!Ut)return;const st={active:mt,activatorEvent:Ut,collisions:cn,delta:{x:Ge.x,y:Ge.y},over:je};cr.unstable_batchedUpdates(()=>{bt?.(st),O({type:"onDragMove",event:st})})},[Ge.x,Ge.y]),v.useEffect(()=>{const{active:bt,activatorEvent:mt,collisions:Ut,droppableContainers:cn,scrollAdjustedTranslate:je}=ce.current;if(!bt||H.current==null||!mt||!je)return;const{onDragOver:st}=K.current,Ie=cn.get(vt),ze=Ie&&Ie.rect.current?{id:Ie.id,rect:Ie.rect.current,data:Ie.data,disabled:Ie.disabled}:null,$e={active:bt,activatorEvent:mt,collisions:Ut,delta:{x:je.x,y:je.y},over:ze};cr.unstable_batchedUpdates(()=>{pt(ze),st?.($e),O({type:"onDragOver",event:$e})})},[vt]),Qi(()=>{ce.current={activatorEvent:Q,active:B,activeNode:J,collisionRect:ke,collisions:De,droppableRects:oe,draggableNodes:k,draggingNode:Pe,draggingNodeRect:Ae,droppableContainers:L,over:ct,scrollableAncestors:Ue,scrollAdjustedTranslate:Ge},X.current={initial:Ae,translated:ke}},[B,J,De,ke,k,Pe,Ae,oe,L,ct,Ue,Ge]),iF({...Ee,delta:_,draggingRect:ke,pointerCoordinates:Ze,scrollableAncestors:Ue,scrollableAncestorRects:be});const St=v.useMemo(()=>({active:B,activeNode:J,activeNodeRect:me,activatorEvent:Q,collisions:De,containerNodeRect:ge,dragOverlay:ve,draggableNodes:k,droppableContainers:L,droppableRects:oe,over:ct,measureDroppableContainers:I,scrollableAncestors:Ue,scrollableAncestorRects:be,measuringConfiguration:G,measuringScheduled:V,windowRect:Oe}),[B,J,me,Q,De,ge,ve,k,L,oe,ct,I,Ue,be,G,V,Oe]),Xt=v.useMemo(()=>({activatorEvent:Q,activators:Je,active:B,activeNodeRect:me,ariaDescribedById:{draggable:Y},dispatch:R,draggableNodes:k,over:ct,measureDroppableContainers:I}),[Q,Je,B,me,R,Y,k,ct,I]);return Ne.createElement(oM.Provider,{value:A},Ne.createElement(vd.Provider,{value:Xt},Ne.createElement(CM.Provider,{value:St},Ne.createElement(lg.Provider,{value:jt},g)),Ne.createElement(CF,{disabled:d?.restoreFocus===!1})),Ne.createElement(MH,{...d,hiddenTextDescribedById:Y}));function ft(){const bt=U?.autoScrollEnabled===!1,mt=typeof f=="object"?f.enabled===!1:f===!1,Ut=j&&!bt&&!mt;return typeof f=="object"?{...f,enabled:Ut}:{enabled:Ut}}}),MF=v.createContext(null),mR="button",kF="Draggable";function OM(e){let{id:t,data:i,disabled:s=!1,attributes:o}=e;const u=yd(kF),{activators:c,activatorEvent:d,active:f,activeNodeRect:g,ariaDescribedById:y,draggableNodes:p,over:x}=v.useContext(vd),{role:S=mR,roleDescription:w="draggable",tabIndex:C=0}=o??{},E=f?.id===t,R=v.useContext(E?lg:MF),[O,A]=Zh(),[M,N]=Zh(),j=yF(c,t),D=Hc(i);Qi(()=>(p.set(t,{id:t,key:u,node:O,activatorNode:M,data:D}),()=>{const _=p.get(t);_&&_.key===u&&p.delete(t)}),[p,t]);const k=v.useMemo(()=>({role:S,tabIndex:C,"aria-disabled":s,"aria-pressed":E&&S===mR?!0:void 0,"aria-roledescription":w,"aria-describedby":y.draggable}),[s,S,C,E,w,y.draggable]);return{active:f,activatorEvent:d,activeNodeRect:g,attributes:k,isDragging:E,listeners:s?void 0:j,node:O,over:x,setNodeRef:A,setActivatorNodeRef:N,transform:R}}function AM(){return v.useContext(CM)}const NF="Droppable",DF={timeout:25};function MM(e){let{data:t,disabled:i=!1,id:s,resizeObserverConfig:o}=e;const u=yd(NF),{active:c,dispatch:d,over:f,measureDroppableContainers:g}=v.useContext(vd),y=v.useRef({disabled:i}),p=v.useRef(!1),x=v.useRef(null),S=v.useRef(null),{disabled:w,updateMeasurementsFor:C,timeout:E}={...DF,...o},R=Hc(C??s),O=v.useCallback(()=>{if(!p.current){p.current=!0;return}S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{g(Array.isArray(R.current)?R.current:[R.current]),S.current=null},E)},[E]),A=og({callback:O,disabled:w||!c}),M=v.useCallback((k,_)=>{A&&(_&&(A.unobserve(_),p.current=!1),k&&A.observe(k))},[A]),[N,j]=Zh(M),D=Hc(t);return v.useEffect(()=>{!A||!N.current||(A.disconnect(),p.current=!1,A.observe(N.current))},[N,A]),v.useEffect(()=>(d({type:ir.RegisterDroppable,element:{id:s,key:u,disabled:i,node:N,rect:x,data:D}}),()=>d({type:ir.UnregisterDroppable,key:u,id:s})),[s]),v.useEffect(()=>{i!==y.current.disabled&&(d({type:ir.SetDroppableDisabled,id:s,key:u,disabled:i}),y.current.disabled=i)},[s,u,i,d]),{active:c,rect:x,isOver:f?.id===s,node:N,over:f,setNodeRef:j}}function jF(e){let{animation:t,children:i}=e;const[s,o]=v.useState(null),[u,c]=v.useState(null),d=Wh(i);return!i&&!s&&d&&o(d),Qi(()=>{if(!u)return;const f=s?.key,g=s?.props.id;if(f==null||g==null){o(null);return}Promise.resolve(t(g,u)).then(()=>{o(null)})},[t,s,u]),Ne.createElement(Ne.Fragment,null,i,s?v.cloneElement(s,{ref:c}):null)}const IF={x:0,y:0,scaleX:1,scaleY:1};function PF(e){let{children:t}=e;return Ne.createElement(vd.Provider,{value:RM},Ne.createElement(lg.Provider,{value:IF},t))}const LF={position:"fixed",touchAction:"none"},zF=e=>sg(e)?"transform 250ms ease":void 0,_F=v.forwardRef((e,t)=>{let{as:i,activatorEvent:s,adjustScale:o,children:u,className:c,rect:d,style:f,transform:g,transition:y=zF}=e;if(!d)return null;const p=o?g:{...g,scaleX:1,scaleY:1},x={...LF,width:d.width,height:d.height,top:d.top,left:d.left,transform:Ua.Transform.toString(p),transformOrigin:o&&s?NH(s,d):void 0,transition:typeof y=="function"?y(s):y,...f};return Ne.createElement(i,{className:c,style:x,ref:t},u)}),UF=e=>t=>{let{active:i,dragOverlay:s}=t;const o={},{styles:u,className:c}=e;if(u!=null&&u.active)for(const[d,f]of Object.entries(u.active))f!==void 0&&(o[d]=i.node.style.getPropertyValue(d),i.node.style.setProperty(d,f));if(u!=null&&u.dragOverlay)for(const[d,f]of Object.entries(u.dragOverlay))f!==void 0&&s.node.style.setProperty(d,f);return c!=null&&c.active&&i.node.classList.add(c.active),c!=null&&c.dragOverlay&&s.node.classList.add(c.dragOverlay),function(){for(const[f,g]of Object.entries(o))i.node.style.setProperty(f,g);c!=null&&c.active&&i.node.classList.remove(c.active)}},HF=e=>{let{transform:{initial:t,final:i}}=e;return[{transform:Ua.Transform.toString(t)},{transform:Ua.Transform.toString(i)}]},FF={duration:250,easing:"ease",keyframes:HF,sideEffects:UF({styles:{active:{opacity:"0"}}})};function BF(e){let{config:t,draggableNodes:i,droppableContainers:s,measuringConfiguration:o}=e;return ig((u,c)=>{if(t===null)return;const d=i.get(u);if(!d)return;const f=d.node.current;if(!f)return;const g=EM(c);if(!g)return;const{transform:y}=Br(c).getComputedStyle(c),p=cM(y);if(!p)return;const x=typeof t=="function"?t:VF(t);return yM(f,o.draggable.measure),x({active:{id:u,data:d.data,node:f,rect:o.draggable.measure(f)},draggableNodes:i,dragOverlay:{node:c,rect:o.dragOverlay.measure(g)},droppableContainers:s,measuringConfiguration:o,transform:p})})}function VF(e){const{duration:t,easing:i,sideEffects:s,keyframes:o}={...FF,...e};return u=>{let{active:c,dragOverlay:d,transform:f,...g}=u;if(!t)return;const y={x:d.rect.left-c.rect.left,y:d.rect.top-c.rect.top},p={scaleX:f.scaleX!==1?c.rect.width*f.scaleX/d.rect.width:1,scaleY:f.scaleY!==1?c.rect.height*f.scaleY/d.rect.height:1},x={x:f.x-y.x,y:f.y-y.y,...p},S=o({...g,active:c,dragOverlay:d,transform:{initial:f,final:x}}),[w]=S,C=S[S.length-1];if(JSON.stringify(w)===JSON.stringify(C))return;const E=s?.({active:c,dragOverlay:d,...g}),R=d.node.animate(S,{duration:t,easing:i,fill:"forwards"});return new Promise(O=>{R.onfinish=()=>{E?.(),O()}})}}let yR=0;function KF(e){return v.useMemo(()=>{if(e!=null)return yR++,yR},[e])}const qF=Ne.memo(e=>{let{adjustScale:t=!1,children:i,dropAnimation:s,style:o,transition:u,modifiers:c,wrapperElement:d="div",className:f,zIndex:g=999}=e;const{activatorEvent:y,active:p,activeNodeRect:x,containerNodeRect:S,draggableNodes:w,droppableContainers:C,dragOverlay:E,over:R,measuringConfiguration:O,scrollableAncestors:A,scrollableAncestorRects:M,windowRect:N}=AM(),j=v.useContext(lg),D=KF(p?.id),k=TM(c,{activatorEvent:y,active:p,activeNodeRect:x,containerNodeRect:S,draggingNodeRect:E.rect,over:R,overlayNodeRect:E.rect,scrollableAncestors:A,scrollableAncestorRects:M,transform:j,windowRect:N}),_=Lb(x),L=BF({config:s,draggableNodes:w,droppableContainers:C,measuringConfiguration:O}),q=_?E.setRef:void 0;return Ne.createElement(PF,null,Ne.createElement(jF,{animation:L},p&&D?Ne.createElement(_F,{key:D,id:p.id,ref:q,as:d,activatorEvent:y,adjustScale:t,className:f,transition:u,rect:_,style:{zIndex:g,...o},transform:k},i):null))});function zb(e,t,i){const s=e.slice();return s.splice(i<0?s.length+i:i,0,s.splice(t,1)[0]),s}function YF(e,t){return e.reduce((i,s,o)=>{const u=t.get(s);return u&&(i[o]=u),i},Array(e.length))}function lh(e){return e!==null&&e>=0}function GF(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 $F(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const kM=e=>{let{rects:t,activeIndex:i,overIndex:s,index:o}=e;const u=zb(t,s,i),c=t[o],d=u[o];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},uh={scaleX:1,scaleY:1},QF=e=>{var t;let{activeIndex:i,activeNodeRect:s,index:o,rects:u,overIndex:c}=e;const d=(t=u[i])!=null?t:s;if(!d)return null;if(o===i){const g=u[c];return g?{x:0,y:i<c?g.top+g.height-(d.top+d.height):g.top-d.top,...uh}:null}const f=XF(u,o,i);return o>i&&o<=c?{x:0,y:-d.height-f,...uh}:o<i&&o>=c?{x:0,y:d.height+f,...uh}:{x:0,y:0,...uh}};function XF(e,t,i){const s=e[t],o=e[t-1],u=e[t+1];return s?i<t?o?s.top-(o.top+o.height):u?u.top-(s.top+s.height):0:u?u.top-(s.top+s.height):o?s.top-(o.top+o.height):0:0}const NM="Sortable",DM=Ne.createContext({activeIndex:-1,containerId:NM,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:kM,disabled:{draggable:!1,droppable:!1}});function ZF(e){let{children:t,id:i,items:s,strategy:o=kM,disabled:u=!1}=e;const{active:c,dragOverlay:d,droppableRects:f,over:g,measureDroppableContainers:y}=AM(),p=yd(NM,i),x=d.rect!==null,S=v.useMemo(()=>s.map(j=>typeof j=="object"&&"id"in j?j.id:j),[s]),w=c!=null,C=c?S.indexOf(c.id):-1,E=g?S.indexOf(g.id):-1,R=v.useRef(S),O=!GF(S,R.current),A=E!==-1&&C===-1||O,M=$F(u);Qi(()=>{O&&w&&y(S)},[O,S,w,y]),v.useEffect(()=>{R.current=S},[S]);const N=v.useMemo(()=>({activeIndex:C,containerId:p,disabled:M,disableTransforms:A,items:S,overIndex:E,useDragOverlay:x,sortedRects:YF(S,f),strategy:o}),[C,p,M.draggable,M.droppable,A,S,E,f,x,o]);return Ne.createElement(DM.Provider,{value:N},t)}const WF=e=>{let{id:t,items:i,activeIndex:s,overIndex:o}=e;return zb(i,s,o).indexOf(t)},JF=e=>{let{containerId:t,isSorting:i,wasDragging:s,index:o,items:u,newIndex:c,previousItems:d,previousContainerId:f,transition:g}=e;return!g||!s||d!==u&&o===c?!1:i?!0:c!==o&&t===f},e7={duration:200,easing:"ease"},jM="transform",t7=Ua.Transition.toString({property:jM,duration:0,easing:"linear"}),n7={roleDescription:"sortable"};function r7(e){let{disabled:t,index:i,node:s,rect:o}=e;const[u,c]=v.useState(null),d=v.useRef(i);return Qi(()=>{if(!t&&i!==d.current&&s.current){const f=o.current;if(f){const g=mu(s.current,{ignoreTransform:!0}),y={x:f.left-g.left,y:f.top-g.top,scaleX:f.width/g.width,scaleY:f.height/g.height};(y.x||y.y)&&c(y)}}i!==d.current&&(d.current=i)},[t,i,s,o]),v.useEffect(()=>{u&&c(null)},[u]),u}function i7(e){let{animateLayoutChanges:t=JF,attributes:i,disabled:s,data:o,getNewIndex:u=WF,id:c,strategy:d,resizeObserverConfig:f,transition:g=e7}=e;const{items:y,containerId:p,activeIndex:x,disabled:S,disableTransforms:w,sortedRects:C,overIndex:E,useDragOverlay:R,strategy:O}=v.useContext(DM),A=s7(s,S),M=y.indexOf(c),N=v.useMemo(()=>({sortable:{containerId:p,index:M,items:y},...o}),[p,o,M,y]),j=v.useMemo(()=>y.slice(y.indexOf(c)),[y,c]),{rect:D,node:k,isOver:_,setNodeRef:L}=MM({id:c,data:N,disabled:A.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...f}}),{active:q,activatorEvent:X,activeNodeRect:B,attributes:H,setNodeRef:U,listeners:z,isDragging:Q,over:$,setActivatorNodeRef:K,transform:Y}=OM({id:c,data:N,attributes:{...n7,...i},disabled:A.draggable}),ee=mH(L,U),G=!!q,oe=G&&!w&&lh(x)&&lh(E),I=!R&&Q,V=I&&oe?Y:null,re=oe?V??(d??O)({rects:C,activeNodeRect:B,activeIndex:x,overIndex:E,index:M}):null,Ee=lh(x)&&lh(E)?u({id:c,items:y,activeIndex:x,overIndex:E}):M,le=q?.id,me=v.useRef({activeId:le,items:y,newIndex:Ee,containerId:p}),ge=y!==me.current.items,ce=t({active:q,containerId:p,isDragging:Q,isSorting:G,id:c,index:M,items:y,newIndex:me.current.newIndex,previousItems:me.current.items,previousContainerId:me.current.containerId,transition:g,wasDragging:me.current.activeId!=null}),Te=r7({disabled:!ce,index:M,node:k,rect:D});return v.useEffect(()=>{G&&me.current.newIndex!==Ee&&(me.current.newIndex=Ee),p!==me.current.containerId&&(me.current.containerId=p),y!==me.current.items&&(me.current.items=y)},[G,Ee,p,y]),v.useEffect(()=>{if(le===me.current.activeId)return;if(le!=null&&me.current.activeId==null){me.current.activeId=le;return}const Pe=setTimeout(()=>{me.current.activeId=le},50);return()=>clearTimeout(Pe)},[le]),{active:q,activeIndex:x,attributes:H,data:N,rect:D,index:M,newIndex:Ee,items:y,isOver:_,isSorting:G,isDragging:Q,listeners:z,node:k,overIndex:E,over:$,setNodeRef:ee,setActivatorNodeRef:K,setDroppableNodeRef:L,setDraggableNodeRef:U,transform:Te??re,transition:ve()};function ve(){if(Te||ge&&me.current.newIndex===M)return t7;if(!(I&&!sg(X)||!g)&&(G||ce))return Ua.Transition.toString({...g,property:jM})}}function s7(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 np(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 a7=[Jt.Down,Jt.Right,Jt.Up,Jt.Left],o7=(e,t)=>{let{context:{active:i,collisionRect:s,droppableRects:o,droppableContainers:u,over:c,scrollableAncestors:d}}=t;if(a7.includes(e.code)){if(e.preventDefault(),!i||!s)return;const f=[];u.getEnabled().forEach(p=>{if(!p||p!=null&&p.disabled)return;const x=o.get(p.id);if(x)switch(e.code){case Jt.Down:s.top<x.top&&f.push(p);break;case Jt.Up:s.top>x.top&&f.push(p);break;case Jt.Left:s.left>x.left&&f.push(p);break;case Jt.Right:s.left<x.left&&f.push(p);break}});const g=IH({collisionRect:s,droppableRects:o,droppableContainers:f});let y=lM(g,"id");if(y===c?.id&&g.length>1&&(y=g[1].id),y!=null){const p=u.get(i.id),x=u.get(y),S=x?o.get(x.id):null,w=x?.node.current;if(w&&S&&p&&x){const E=ag(w).some((j,D)=>d[D]!==j),R=IM(p,x),O=l7(p,x),A=E||!R?{x:0,y:0}:{x:O?s.width-S.width:0,y:O?s.height-S.height:0},M={x:S.left,y:S.top};return A.x&&A.y?M:Fc(M,A)}}}};function IM(e,t){return!np(e)||!np(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function l7(e,t){return!np(e)||!np(t)||!IM(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function Hs({className:e,size:t="default",...i}){return b.jsx("div",{"data-slot":"card","data-size":t,className:Ye("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 u7({className:e,...t}){return b.jsx("div",{"data-slot":"card-header",className:Ye("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 c7({className:e,...t}){return b.jsx("div",{"data-slot":"card-content",className:Ye("px-(--card-spacing)",e),...t})}const PM=v.createContext(void 0);function d7(){const e=v.useContext(PM);if(e===void 0)throw new Error(bn(63));return e}const f7="data-checked",h7="data-unchecked",LM={...du,checked(e){return e?{[f7]:""}:{[h7]:""}}},p7=v.forwardRef(function(t,i){const{checked:s,className:o,defaultChecked:u,"aria-labelledby":c,form:d,id:f,inputRef:g,name:y,nativeButton:p=!1,onCheckedChange:x,readOnly:S=!1,required:w=!1,disabled:C=!1,render:E,uncheckedValue:R,value:O,style:A,...M}=t,{clearErrors:N}=fd(),{state:j,setTouched:D,setDirty:k,validityData:_,setFilled:L,validationMode:q,disabled:X,name:B,validation:H}=$s(),{labelId:U}=Bo(),z=X||C,Q=B??y,$=v.useRef(null),K=Wr($,g,H.inputRef),Y=v.useRef(null),ee=hd(z,Y),G=dr(),oe=fu({id:f}),I=p?void 0:oe,[V,J]=qs({controlled:s,default:!!u,name:"Switch",state:"checked"});pd(Y,G,V,void 0,!z,y),_e(()=>{L(V)},[V,L]),uu(V,()=>{N(Q),k(V!==_.initialValue),H.change(V)});const{getButtonProps:re,buttonRef:Ee}=Li({disabled:z,native:p}),le=Rb(c,U,$,!p,I,M["aria-label"]),me={id:p?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&&Mo(Pe,ve)}},ge={...H.getValidationProps(z),checked:V,disabled:z,form:d,id:I,name:Q,required:w,style:Q?yp:Jc,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,Ae=ut(kr,ve.nativeEvent);x?.(Pe,Ae),!Ae.isCanceled&&J(Pe)},onClick(ve){ve.stopPropagation()},onFocus(){Y.current?.focus()},...O!==void 0?{value:O}:Qt},ce=v.useMemo(()=>({...j,checked:V,disabled:z,readOnly:S,required:w}),[j,V,z,S,w]),Te=At("span",t,{state:ce,ref:[i,Y,Ee],props:[me,M,re,ve=>H.getValidationProps(z,ve)],stateAttributesMapping:LM});return b.jsxs(PM.Provider,{value:ce,children:[Te,!V&&Q&&R!==void 0&&b.jsx("input",{type:"hidden",form:d,name:Q,value:R,disabled:z}),b.jsx("input",{...ge,suppressHydrationWarning:!0})]})}),g7=v.forwardRef(function(t,i){const{render:s,className:o,style:u,...c}=t,d=d7();return At("span",t,{state:d,ref:i,stateAttributesMapping:LM,props:c})});function m7({className:e,...t}){return b.jsx(p7,{"data-slot":"switch",className:Ye(`
34
- peer relative inline-flex h-4 w-7 shrink-0 items-center rounded-full
35
- border border-transparent bg-input p-0.5 transition-colors outline-none
36
- focus-visible:border-ring focus-visible:ring-2
37
- focus-visible:ring-ring/30 disabled:cursor-not-allowed
38
- disabled:opacity-50 data-checked:bg-primary
39
- `,e),...t,children:b.jsx(g7,{"data-slot":"switch-thumb",className:`
40
- pointer-events-none block size-3 rounded-full bg-background shadow-sm
41
- transition-transform data-checked:translate-x-3
42
- `})})}function y7(e){return`library:${e}`}function zM(e,t){return`assigned:${e}:${t}`}function _M(e){return`agent:${e}`}function v7(e){return String(e).startsWith("assigned:")}function rv(e){return _b(e)&&e.type==="library-instruction"&&typeof e.instructionId=="string"}function $l(e){return _b(e)&&e.type==="assigned-instruction"&&typeof e.agentId=="string"&&typeof e.instructionId=="string"}function vR(e){return _b(e)&&e.type==="agent"&&typeof e.agentId=="string"}function _b(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const b7="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",x7="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",S7={openai:{src:b7,invertInDark:!0},claudecode:{src:x7,invertInDark:!1}};function UM({icon:e,className:t}){const i=S7[e];return b.jsx("div",{"aria-hidden":"true",className:Ye(`
43
- flex size-8 shrink-0 items-center justify-center rounded-md bg-muted
44
- text-foreground
45
- `,t),children:i?b.jsx("img",{src:i.src,alt:"",draggable:!1,className:Ye("size-4",i.invertInDark&&"dark:invert")}):b.jsx(tT,{className:"size-4"})})}function w7({agent:e,instructionsById:t,isInstructionsLoading:i,isPending:s,isReapplying:o,onRemoveInstruction:u,onToggle:c,onReapply:d,onOpenFile:f}){const{t:g}=Ct(),{isOver:y,setNodeRef:p}=MM({id:_M(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 b.jsxs(Hs,{"data-agent-id":e.id,ref:p,className:Ye("gap-0 py-0 transition-shadow",y&&"ring-2 ring-ring/40"),children:[b.jsxs("div",{className:"flex items-center gap-3 p-3",children:[b.jsx(UM,{icon:e.icon}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("div",{className:"truncate text-sm font-medium",children:e.name}),b.jsx("button",{type:"button",className:`
46
- block max-w-full truncate font-mono text-[11px]
47
- text-muted-foreground
48
- hover:text-foreground hover:underline
49
- `,"aria-label":g("agents.openFileAria",{name:e.name}),onClick:()=>{f(e.id)},children:e.instructionFile})]}),b.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[b.jsxs(Vh,{children:[b.jsx(Kh,{render:b.jsx("span",{className:"inline-flex"}),children:b.jsx(ht,{type:"button",variant:"ghost",size:"icon","aria-label":g("agents.reapplyAria",{name:e.name}),disabled:s||!e.enabled,onClick:()=>{d(e.id)},children:b.jsx(sL,{className:Ye(o&&"animate-spin")})})}),b.jsx(qh,{children:S})]}),b.jsxs(Vh,{children:[b.jsx(Kh,{render:b.jsx("span",{className:"inline-flex"}),children:b.jsx(m7,{checked:e.enabled,disabled:s||!x,"aria-label":g("agents.toggleAria",{name:e.name}),onCheckedChange:C=>{c(e.id,C)}})}),b.jsx(qh,{children:w})]})]})]}),b.jsx("div",{className:"border-t border-border/60 p-3",children:e.instructionIds.length===0?b.jsx("div",{className:`
50
- flex min-h-20 items-center justify-center rounded-md border
51
- border-dashed border-border px-4 text-center text-xs
52
- text-muted-foreground
53
- `,children:g("agents.emptyAssigned")}):b.jsx(ZF,{items:e.instructionIds.map(C=>zM(e.id,C)),strategy:QF,children:b.jsx("ol",{className:"flex flex-col gap-1",children:e.instructionIds.map((C,E)=>{const R=t.get(C),O=R?.name??C;return b.jsx(E7,{agentId:e.id,index:E,instructionId:C,instructionName:i&&!R?g("agents.loadingInstruction"):O,isPending:s,onRemove:u},C)})})})})]})}function E7({agentId:e,index:t,instructionId:i,instructionName:s,isPending:o,onRemove:u}){const{t:c}=Ct(),{attributes:d,isDragging:f,isOver:g,listeners:y,setNodeRef:p,transform:x,transition:S}=i7({id:zM(e,i),animateLayoutChanges:()=>!1,data:{type:"assigned-instruction",agentId:e,instructionId:i},disabled:o});return b.jsxs("li",{...d,...y,ref:p,"data-instruction-id":i,style:{transform:Ua.Transform.toString(x),transition:S},className:Ye(`
54
- group flex items-center gap-2 rounded-md border border-transparent
55
- bg-muted/40 px-2 py-1.5
56
- `,g&&"border-ring bg-muted",f&&"z-10",o?"cursor-default":`
57
- cursor-grab
58
- active:cursor-grabbing
59
- `),children:[b.jsx(Gv,{"aria-hidden":"true",className:`
60
- size-3.5 shrink-0 text-muted-foreground
61
- group-active:cursor-grabbing
62
- `}),b.jsx("span",{className:`
63
- w-4 shrink-0 text-center font-mono text-[10px] text-muted-foreground
64
- `,children:t+1}),b.jsx("span",{className:"min-w-0 flex-1 truncate text-xs",children:s}),b.jsx(ht,{type:"button",variant:"ghost",size:"icon","aria-label":c("agents.removeInstructionAria",{name:s}),disabled:o,onClick:()=>{u(e,i)},onKeyDown:w=>{w.stopPropagation()},onPointerDown:w=>{w.stopPropagation()},children:b.jsx(Va,{})})]})}const HM="/api/agents";class FM extends Error{constructor(t,i){super(i),this.code=t,this.name="AgentApiError"}code}function R7(e){return bd(HM,{signal:e})}function C7(e,t){return bd(ug(e,"instructions"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({instructionIds:t})})}function T7(e,t){return bd(ug(e,"enabled"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:t})})}function O7(e){return bd(ug(e,"reapply"),{method:"POST"})}function A7(e){return bd(ug(e,"open-file"),{method:"POST"})}function ug(e,t){return`${HM}/${encodeURIComponent(e)}/${t}`}async function bd(e,t){const i=await fetch(e,t);if(!i.ok){const s=await M7(i);throw new FM(s.code,s.message)}return i.json()}async function M7(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 Ur=["agents"],ch=["agents","update"];function k7(){const{t:e}=Ct(),t=mi(),i=Lo({queryKey:Ur,queryFn:({signal:p})=>R7(p),retry:!1});function s(p){t.setQueryData(Ur,x=>x?.map(S=>S.id===p.id?p:S))}const o=Ar({mutationKey:ch,mutationFn:({agentId:p,instructionIds:x})=>C7(p,x),onMutate:async({previous:p})=>(await t.cancelQueries({queryKey:Ur}),{previous:p}),onError:(p,x,S)=>{S?.previous&&t.setQueryData(Ur,S.previous),ln.error(e("agents.updateError"))},onSuccess:s,onSettled:()=>t.invalidateQueries({queryKey:Ur})}),u=Ar({mutationKey:ch,mutationFn:({agentId:p,enabled:x})=>T7(p,x),onMutate:async({agentId:p,enabled:x})=>{await t.cancelQueries({queryKey:Ur});const S=t.getQueryData(Ur);return t.setQueryData(Ur,w=>w?.map(C=>C.id===p?{...C,enabled:x}:C)),{previous:S}},onError:(p,x,S)=>{S?.previous&&t.setQueryData(Ur,S.previous),ln.error(e("agents.enableError"))},onSuccess:p=>{s(p),ln.success(e(p.enabled?"agents.applied":"agents.removed"))},onSettled:()=>t.invalidateQueries({queryKey:Ur})}),c=Ar({mutationKey:ch,mutationFn:p=>O7(p),onSuccess:p=>{s(p),ln.success(e("agents.reapplied"))},onError:()=>{ln.error(e("agents.reapplyError"))},onSettled:()=>t.invalidateQueries({queryKey:Ur})}),d=Ar({mutationKey:ch,mutationFn:p=>A7(p),onError:p=>{ln.error(e(p instanceof FM&&p.code==="AGENT_FILE_NOT_FOUND"?"agents.fileMissing":"agents.openFileError"))}}),f=[o,u,c,d],g=new Set;for(const p of f){if(!p.isPending)continue;const x=N7(p.variables);x&&g.add(x)}const y=new Set(c.isPending&&typeof c.variables=="string"?[c.variables]:[]);return{agents:i.data??[],isLoading:i.isPending,isError:i.isError&&i.data===void 0,retry:i.refetch,pendingAgentIds:g,reapplyingAgentIds:y,updateInstructions:(p,x)=>{const S=t.getQueryData(Ur);t.setQueryData(Ur,w=>w?.map(C=>C.id===p?{...C,instructionIds:x,enabled:x.length>0&&C.enabled}:C)),o.mutate({agentId:p,instructionIds:x,previous:S})},setEnabled:(p,x)=>{u.mutate({agentId:p,enabled:x})},reapply:p=>{c.mutate(p)},openFile:p=>{d.mutate(p)}}}function N7(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 Vc({className:e,description:t,icon:i,title:s}){let o=null;return t!=null&&(o=b.jsx("p",{className:"max-w-64 text-xs/relaxed text-muted-foreground",children:t})),b.jsxs("div",{"data-slot":"empty",className:Ye(`
65
- flex w-full flex-1 flex-col items-center justify-center gap-2 px-4
66
- py-10 text-center
67
- `,e),children:[i&&b.jsx("div",{className:`
68
- flex size-8 items-center justify-center rounded-md bg-muted
69
- text-muted-foreground
70
- `,children:b.jsx(i,{"aria-hidden":"true",className:"size-4"})}),b.jsx("div",{className:"text-sm font-medium",children:s}),o]})}function D7(e){const[t,i]=v.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),s=v.useRef(null),o=v.useRef(null),u=v.useRef(null),c=v.useRef(null),d=v.useRef(!0),f=v.useRef(null),g=iu(),y=v.useMemo(()=>({anchor:t,setAnchor:i,actionsRef:u,backdropRef:s,internalBackdropRef:o,positionerRef:c,allowMouseUpTriggerRef:d,initialCursorPointRef:f,rootId:g}),[t,g]);return b.jsx(JO.Provider,{value:y,children:b.jsx(Yp.Provider,{value:void 0,children:b.jsx(SA,{...e})})})}const bR=500,j7=v.forwardRef(function(t,i){const{render:s,className:o,style:u,...c}=t,{setAnchor:d,actionsRef:f,internalBackdropRef:g,backdropRef:y,positionerRef:p,allowMouseUpTriggerRef:x,initialCursorPointRef:S,rootId:w}=Gp(!1),{store:C}=Gs(!1),E=C.useState("open"),R=C.useState("disabled"),O=v.useRef(null),A=v.useRef(null),M=Un(),N=Un(),j=v.useRef(!1),D=v.useRef(null);function k(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($i,Q)),N.start(bR,()=>{j.current=!0})}function _(U){if(R)return;x.current=!0,qi(U),k(U.clientX,U.clientY,U.nativeEvent);const z=$t(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=tr($);it(p.current,K)||w&&K&&wb(K)===w||f.current?.setOpen(!1,ut(Sv,$))},{once:!0,signal:Q.signal})}function L(){M.clear(),A.current=null}function q(U){if(R){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};A.current=Q,M.start(bR,()=>{k(Q.x,Q.y,U.nativeEvent)})}function X(U){if(U.touches.length!==1){L();return}if(M.isStarted()&&A.current){const z=U.touches[0],Q=10,$=Math.abs(z.clientX-A.current.x),K=Math.abs(z.clientY-A.current.y);($>Q||K>Q)&&L()}}return v.useEffect(()=>()=>{D.current?.abort()},[]),v.useEffect(()=>{function U(Q){if(R)return;const K=tr(Q);(it(O.current,K)||it(g.current,K)||it(y.current,K))&&Q.preventDefault()}const z=$t(O.current);return Lt(z,"contextmenu",U)},[y,R,g]),At("div",t,{state:{open:E},ref:[O,i],props:[{onContextMenu:_,onTouchStart:q,onTouchMove:X,onTouchEnd:L,onTouchCancel:L,style:{WebkitTouchCallout:"none"}},c],stateAttributesMapping:kh})}),I7=pA;function cg({...e}){return b.jsx(D7,{"data-slot":"context-menu",...e})}function dg({className:e,...t}){return b.jsx(j7,{"data-slot":"context-menu-trigger",className:Ye("select-none",e),...t})}function fg({className:e,align:t="start",alignOffset:i=4,side:s="right",sideOffset:o=0,...u}){return b.jsx(cA,{children:b.jsx(I7,{className:"isolate z-50 outline-none",align:t,alignOffset:i,side:s,sideOffset:o,children:b.jsx(lA,{"data-slot":"context-menu-content",className:Ye("z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...u})})})}function hg({className:e,inset:t,variant:i="default",...s}){return b.jsx(aA,{"data-slot":"context-menu-item","data-inset":t,"data-variant":i,className:Ye("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 P7({instructions:e,isLoading:t,isError:i,onRetry:s,onEdit:o,onDelete:u,onPreload:c}){const{t:d}=Ct();return t?b.jsx(Hs,{className:"gap-0 py-0",children:b.jsx("div",{className:"divide-y",children:[0,1,2].map(f=>b.jsxs("div",{className:"flex items-center gap-2 p-3",children:[b.jsx(wr,{className:"size-3.5 rounded-sm"}),b.jsx(wr,{className:"h-4 w-2/3"})]},f))})}):i?b.jsxs(Hs,{className:"items-start gap-3 p-4",children:[b.jsx("p",{className:"text-xs text-muted-foreground",children:d("instructions.loadError")}),b.jsxs(ht,{type:"button",variant:"outline",onClick:s,children:[b.jsx(FT,{}),b.jsx("span",{children:d("common.retry")})]})]}):e.length===0?b.jsx(Hs,{className:"gap-0 py-0",children:b.jsx(Vc,{icon:Yv,title:d("instructions.emptyTitle"),description:d("instructions.emptyDescription")})}):b.jsx(Hs,{className:"gap-0 py-0",children:b.jsx("ul",{"aria-label":d("instructions.listAria"),className:"divide-y",children:e.map(f=>b.jsx(L7,{instruction:f,onRequestDelete:()=>u(f),onEdit:()=>{o(f)},onPreload:c},f.id))})})}function L7({instruction:e,onEdit:t,onPreload:i,onRequestDelete:s}){const{t:o}=Ct(),{attributes:u,isDragging:c,listeners:d,setNodeRef:f}=OM({id:y7(e.id),data:{type:"library-instruction",instructionId:e.id}});return b.jsxs(cg,{children:[b.jsxs(dg,{ref:f,render:b.jsx("li",{...d,"data-instruction-id":e.id,className:Ye(`
71
- group flex cursor-grab items-center gap-2 py-2.5 pr-1 pl-3
72
- hover:bg-muted/40
73
- active:cursor-grabbing
74
- `,c&&"opacity-40")}),children:[b.jsx(Gv,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground"}),b.jsx("button",{...u,type:"button",className:`
75
- flex min-w-0 flex-1 cursor-grab items-center gap-2 text-left text-xs
76
- outline-none
77
- focus-visible:underline focus-visible:underline-offset-3
78
- active:cursor-grabbing
79
- `,onClick:t,onFocus:i,onPointerEnter:i,children:b.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.name})}),b.jsxs(Uo,{children:[b.jsx(Ho,{render:b.jsx(ht,{type:"button",variant:"ghost",size:"icon","aria-label":o("instructions.actionsAria",{name:e.name}),className:`
80
- -my-1.5 shrink-0 text-muted-foreground opacity-0
81
- transition-opacity
82
- group-hover:opacity-100
83
- focus-visible:opacity-100
84
- data-popup-open:opacity-100
85
- [@media(hover:none)]:opacity-100
86
- `,onKeyDown:g=>{g.stopPropagation()},onMouseDown:g=>{g.stopPropagation()},onPointerDown:g=>{g.stopPropagation()},onTouchStart:g=>{g.stopPropagation()}}),children:b.jsx(qv,{})}),b.jsx(Fo,{align:"end",className:"w-40",children:b.jsx(xR,{Item:cu,onDelete:s,onEdit:t})})]})]}),b.jsx(fg,{children:b.jsx(xR,{Item:hg,onDelete:s,onEdit:t})})]})}function xR({Item:e,onEdit:t,onDelete:i}){const{t:s}=Ct();return b.jsxs(b.Fragment,{children:[b.jsxs(e,{onClick:t,children:[b.jsx(zT,{}),b.jsx("span",{children:s("instructions.edit")})]}),b.jsxs(e,{variant:"destructive",onClick:i,children:[b.jsx(Qv,{}),b.jsx("span",{children:s("instructions.delete")})]})]})}function BM({className:e,...t}){return b.jsx("label",{"data-slot":"label",className:Ye("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 Ha({children:e,className:t,...i}){return b.jsxs(BM,{className:Ye("gap-1",t),...i,children:[e,b.jsx("span",{"aria-hidden":"true",className:"text-destructive",children:"*"})]})}function Qs({...e}){return b.jsx(HA,{"data-slot":"dialog",...e})}function z7({...e}){return b.jsx(UA,{"data-slot":"dialog-portal",...e})}function pg({...e}){return b.jsx(eg,{"data-slot":"dialog-close",...e})}function _7({className:e,...t}){return b.jsx(PA,{"data-slot":"dialog-overlay",className:Ye("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 Xs({className:e,children:t,showCloseButton:i=!0,...s}){return b.jsxs(z7,{children:[b.jsx(_7,{}),b.jsxs(_A,{"data-slot":"dialog-content",className:Ye("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&&b.jsxs(eg,{"data-slot":"dialog-close",render:b.jsx(ht,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[b.jsx(Va,{}),b.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Zs({className:e,...t}){return b.jsx("div",{"data-slot":"dialog-header",className:Ye("flex flex-col gap-1",e),...t})}function qa({className:e,showCloseButton:t=!1,children:i,...s}){return b.jsxs("div",{"data-slot":"dialog-footer",className:Ye("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...s,children:[i,t&&b.jsx(eg,{render:b.jsx(ht,{variant:"outline"}),children:"Close"})]})}function Ws({className:e,...t}){return b.jsx(FA,{"data-slot":"dialog-title",className:Ye("font-heading text-sm font-medium",e),...t})}function Ya({className:e,...t}){return b.jsx(LA,{"data-slot":"dialog-description",className:Ye("text-xs/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}const Ub="/api/instructions";class VM extends Error{constructor(t,i){super(i),this.code=t,this.name="InstructionApiError"}code}function U7(e){return Hb(Ub,{signal:e})}function H7(e){return Hb(Ub,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function F7(e,t){return Hb(KM(e),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}async function B7(e){const t=await fetch(KM(e),{method:"DELETE"});if(t.ok)return;const i=await qM(t);throw new VM(i.code,i.message)}async function Hb(e,t){const i=await fetch(e,t);if(!i.ok){const s=await qM(i);throw new VM(s.code,s.message)}return i.json()}function KM(e){return`${Ub}/${encodeURIComponent(e)}`}async function qM(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 Kc=["instructions"];function V7(){const e=Lo({queryKey:Kc,queryFn:({signal:t})=>U7(t),retry:!1});return{instructions:e.data??[],isLoading:e.isPending,isError:e.isError&&e.data===void 0,retry:e.refetch}}const K7="modulepreload",q7=function(e){return"/"+e},SR={},Y7=function(t,i,s){let o=Promise.resolve();if(i&&i.length>0){let f=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");o=f(i.map(g=>{if(g=q7(g),g in SR)return;SR[g]=!0;const y=g.endsWith(".css"),p=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${p}`))return;const x=document.createElement("link");if(x.rel=y?"stylesheet":K7,y||(x.as="script"),x.crossOrigin="",x.href=g,d&&x.setAttribute("nonce",d),document.head.appendChild(x),y)return new Promise((S,w)=>{x.addEventListener("load",S),x.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return o.then(c=>{for(const d of c||[])d.status==="rejected"&&u(d.reason);return t().catch(u)})},YM=()=>Y7(()=>import("./code-editor-D9YqPRu9.js").then(e=>e.j2),__vite__mapDeps([0,1]));function yy(){YM()}const G7=v.lazy(async()=>({default:(await YM()).CodeEditor}));function GM(e){const{t}=Ct();return b.jsx(v.Suspense,{fallback:b.jsx("div",{style:{height:e.height??"16rem"},className:`
87
- flex items-center justify-center text-xs text-muted-foreground
88
- `,children:t("editor.loading")}),children:b.jsx(G7,{...e})})}const $7="16rem";function wR({instruction:e,onClose:t}){const{t:i}=Ct(),s=mi(),o=v.useId(),u=v.useId(),c=e!==void 0,[d,f]=v.useState(e?.name??""),[g,y]=v.useState(e?.content??""),p=Ar({mutationFn:A=>e?F7(e.id,A):H7(A),onSuccess:A=>{s.setQueryData(Kc,M=>[...(M??[]).filter(N=>N.id!==A.id),A].toSorted((N,j)=>j.updatedAt-N.updatedAt)),s.invalidateQueries({queryKey:Kc}),ln.success(i(c?"instructions.updated":"instructions.created")),t()},onError:()=>{ln.error(i(c?"instructions.updateError":"instructions.error"))}}),x=p.isPending,S=!!(d.trim()&&g.trim())&&!x,w=c?"instructions.editTitle":"instructions.createTitle",C=c?"instructions.updating":"instructions.creating",E=c?"instructions.updateSave":"instructions.save",R=c?$v:au;function O(){x||t()}return b.jsx(Qs,{open:!0,onOpenChange:A=>{A||O()},children:b.jsxs(Xs,{showCloseButton:!1,className:`
89
- grid max-h-[calc(100vh-2rem)] grid-rows-[auto_minmax(0,1fr)_auto]
90
- overflow-hidden
91
- sm:max-w-3xl
92
- `,children:[b.jsxs("form",{className:"contents","aria-busy":x,onSubmit:A=>{A.preventDefault(),S&&p.mutate({name:d.trim(),content:g})},children:[b.jsx(Zs,{className:"pr-8",children:b.jsx(Ws,{children:i(w)})}),b.jsxs("div",{className:"flex min-h-0 flex-col gap-3 overflow-y-auto pr-1",children:[b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Ha,{htmlFor:o,children:i("instructions.name")}),b.jsx(Jp,{id:o,autoFocus:!0,required:!0,maxLength:200,value:d,disabled:x,placeholder:i("instructions.namePlaceholder"),onChange:A=>{f(A.target.value)}})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Ha,{id:u,children:i("instructions.content")}),b.jsx("div",{role:"group","aria-labelledby":u,"aria-required":"true",className:`
93
- overflow-hidden rounded-md border border-input bg-input/20
94
- focus-within:border-ring focus-within:ring-2
95
- focus-within:ring-ring/30
96
- `,children:b.jsx(GM,{height:$7,value:g,ariaLabel:i("instructions.content"),placeholder:i("instructions.contentPlaceholder"),readOnly:x,onChange:y})})]})]}),b.jsxs(qa,{children:[b.jsx(ht,{type:"button",variant:"ghost",disabled:x,onClick:O,children:i("common.cancel")}),b.jsxs(ht,{type:"submit",disabled:!S,children:[x?b.jsx(bs,{className:"animate-spin"}):b.jsx(R,{}),b.jsx("span",{children:i(x?C:E)})]})]})]}),b.jsxs(pg,{disabled:x,render:b.jsx(ht,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[b.jsx(Va,{}),b.jsx("span",{className:"sr-only",children:i("a11y.close")})]})]})})}function Q7({instruction:e,onClose:t}){const{t:i}=Ct(),s=mi(),o=Ar({mutationFn:()=>B7(e.id),onSuccess:()=>{s.setQueryData(Kc,c=>c?.filter(({id:d})=>d!==e.id)),s.setQueryData(Ur,c=>c?.map(d=>{const f=d.instructionIds.filter(g=>g!==e.id);return{...d,instructionIds:f,enabled:f.length>0&&d.enabled}})),s.invalidateQueries({queryKey:Kc}),s.invalidateQueries({queryKey:Ur}),ln.success(i("instructions.deleted")),t()},onError:()=>ln.error(i("instructions.deleteError"))}),u=()=>{o.isPending||t()};return b.jsx(Qs,{open:!0,onOpenChange:c=>{c||u()},children:b.jsxs(Xs,{showCloseButton:!1,children:[b.jsxs(Zs,{children:[b.jsx(Ws,{children:i("instructions.deleteConfirmTitle")}),b.jsx(Ya,{children:i("instructions.deleteConfirmDescription",{name:e.name})})]}),b.jsxs(qa,{children:[b.jsx(ht,{type:"button",variant:"ghost",disabled:o.isPending,onClick:u,children:i("common.cancel")}),b.jsxs(ht,{type:"button",variant:"destructive",disabled:o.isPending,onClick:()=>o.mutate(),children:[o.isPending&&b.jsx(bs,{className:"animate-spin"}),b.jsx("span",{children:i("instructions.delete")})]})]})]})})}const X7=e=>{const t=e.active.data.current;if($l(t))return Z7(e,t.agentId);const i=e.pointerCoordinates?_H(e):jH(e),s=i.filter(({id:o})=>v7(o));return s.length>0?s:i};function Z7(e,t){const i=e.collisionRect.left+e.collisionRect.width/2,s=e.collisionRect.top+e.collisionRect.height/2,o=e.droppableRects.get(_M(t));if(o&&(i<o.left||i>o.left+o.width||s<o.top||s>o.top+o.height))return[];let u;for(const c of e.droppableContainers){const d=c.data.current;if(!$l(d)||d.agentId!==t)continue;const f=e.droppableRects.get(c.id);if(!f)continue;const g=(f.left+f.width/2-i)**2+(f.top+f.height/2-s)**2;(!u||g<u.distance)&&(u={id:c.id,distance:g})}return u?[{id:u.id}]:[]}function W7(){const{t:e}=Ct(),[t,i]=v.useState(null),[s,o]=v.useState(!1),[u,c]=v.useState(null),[d,f]=v.useState(null),g=V7(),y=k7(),p=kH(hy(xM,{activationConstraint:{distance:4}}),hy(SM,{activationConstraint:{delay:200,tolerance:8}}),hy(Ib,{coordinateGetter:o7})),x=v.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,C=J7(w),E=C?x.get(C)?.name??C:"",R=t?.rect.current.initial?.width;function O(N,j,D){const k=y.agents.find(({id:q})=>q===N);if(!k||y.pendingAgentIds.has(N))return;if(k.instructionIds.includes(j)){ln.error(e("agents.duplicateError"));return}const _=[...k.instructionIds],L=D?_.indexOf(D):-1;_.splice(L<0?_.length:L,0,j),y.updateInstructions(N,_)}function A(N,j){const D=y.agents.find(({id:k})=>k===N);!D||y.pendingAgentIds.has(N)||y.updateInstructions(N,D.instructionIds.filter(k=>k!==j))}function M({active:N,over:j}){if(i(null),!j)return;const D=N.data.current,k=j.data.current;if(rv(D)){if(vR(k)){O(k.agentId,D.instructionId);return}$l(k)&&O(k.agentId,D.instructionId,k.instructionId);return}if(!$l(D))return;const _=y.agents.find(({id:H})=>H===D.agentId);if(!_||y.pendingAgentIds.has(_.id))return;const L=_.instructionIds,q=L.indexOf(D.instructionId),X=$l(k)&&k.agentId===D.agentId?L.indexOf(k.instructionId):vR(k)&&k.agentId===D.agentId?L.length-1:-1;if(q===X||q===-1||X===-1)return;const B=zb([...L],q,X);B.length===L.length&&B.every((H,U)=>H===L[U])||y.updateInstructions(_.id,B)}return b.jsxs(AF,{sensors:p,collisionDetection:X7,onDragStart:({active:N})=>{i(N)},onDragCancel:()=>{i(null)},onDragEnd:M,children:[b.jsxs("div",{className:`
97
- grid min-h-0 flex-1 gap-4 overflow-hidden p-4
98
- max-md:overflow-y-auto
99
- md:grid-cols-2
100
- `,children:[b.jsx(iM,{children:b.jsxs(ht,{type:"button",onFocus:yy,onPointerEnter:yy,onClick:()=>{o(!0)},children:[b.jsx(au,{}),b.jsx("span",{children:e("instructions.create")})]})}),b.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[b.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[b.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("nav.instructions")}),b.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("instructions.dragHint")})]}),b.jsx("div",{className:`
101
- min-h-0 flex-1 overflow-y-auto p-1
102
- max-md:max-h-64
103
- `,children:b.jsx(P7,{instructions:g.instructions,isLoading:g.isLoading,isError:g.isError,onRetry:()=>{g.retry()},onEdit:N=>{f(N.id)},onDelete:N=>{c(N)},onPreload:yy})})]}),b.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[b.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[b.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("agents.title")}),b.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("agents.orderHint")})]}),b.jsxs("div",{className:`
104
- flex min-h-0 flex-1 flex-col gap-3 p-1
105
- max-md:pb-2
106
- md:overflow-y-auto
107
- `,children:[y.isLoading&&b.jsx(eB,{}),!y.isLoading&&y.isError&&b.jsxs(Hs,{className:"items-start gap-3 p-4",children:[b.jsx("p",{className:"text-xs text-muted-foreground",children:e("agents.loadError")}),b.jsxs(ht,{type:"button",variant:"outline",onClick:()=>{y.retry()},children:[b.jsx(FT,{}),b.jsx("span",{children:e("common.retry")})]})]}),!y.isLoading&&!y.isError&&y.agents.map(N=>b.jsx(w7,{agent:N,instructionsById:x,isInstructionsLoading:g.isLoading,isPending:y.pendingAgentIds.has(N.id),isReapplying:y.reapplyingAgentIds.has(N.id),onRemoveInstruction:A,onToggle:(j,D)=>{y.setEnabled(j,D)},onReapply:j=>{y.reapply(j)},onOpenFile:j=>{y.openFile(j)}},N.id))]})]}),u&&b.jsx(Q7,{instruction:u,onClose:()=>c(null)}),s&&b.jsx(wR,{onClose:()=>{o(!1)}}),S&&b.jsx(wR,{instruction:S,onClose:()=>{f(null)}})]}),rv(w)&&b.jsx(qF,{dropAnimation:null,children:E&&b.jsxs("div",{style:{width:R},className:"flex items-center gap-2 bg-card px-3 py-2.5 text-xs",children:[b.jsx(Gv,{className:"size-3.5 text-muted-foreground"}),b.jsx("span",{className:"truncate",children:E})]})})]})}function J7(e){if(rv(e)||$l(e))return e.instructionId}function eB(){return b.jsx(b.Fragment,{children:[0,1].map(e=>b.jsxs(Hs,{className:"gap-0 py-0",children:[b.jsxs("div",{className:"flex items-center gap-3 p-3",children:[b.jsx(wr,{className:"size-8 rounded-md"}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx(wr,{className:"h-4 w-24"}),b.jsx(wr,{className:"mt-2 h-3 w-40"})]}),b.jsx(wr,{className:"h-4 w-7 rounded-full"})]}),b.jsx("div",{className:"border-t border-border/60 p-3",children:b.jsx(wr,{className:"h-20 w-full"})})]},e))})}class ru extends Error{constructor(t,i){super(i),this.code=t,this.name="SkillApiError"}code}async function Ga(e,t){const i=await fetch(e,t);if(!i.ok){const s=await i.json();throw new ru(s.error?.code??"SKILL_REQUEST_FAILED",s.error?.message??`Request failed with status ${i.status}`)}return i.status===204?void 0:i.json()}function tB(e){return Ga("/api/skills",{signal:e})}function nB(e,t){return Ga(`/api/skills/${encodeURIComponent(e)}`,{signal:t})}function rB(e){return Ga("/api/skills",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function iB(e,t){return Ga(`/api/skills/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}function sB(e){return Ga(`/api/skills/${encodeURIComponent(e)}`,{method:"DELETE"})}function aB(e){return Ga("/api/skills/agents/assignments",{signal:e})}function oB(e,t,i){return Ga(`/api/skills/${encodeURIComponent(e)}/agents/${encodeURIComponent(t)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({assigned:i})})}const gg=["skills"],Ql=e=>["skills",e],vy=["skills","agents","assignments"];function lB(e,t){return Ga(`/api/skills/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({files:t})})}const uB=["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"],cB=["America/Los_Angeles","America/New_York","Asia/Shanghai","Asia/Taipei","Asia/Tokyo","UTC"],dB=1,fB="settings.changed",hB=64,pB=1024,gB=/^[\p{L}\p{N}]+(?:-[\p{L}\p{N}]+)*$/u;function $M(e){return e.trim().normalize("NFKC")}function mB(e){const t=$M(e);return[...t].length<=hB&&t===t.toLowerCase()&&gB.test(t)}function yB(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 vB({className:e,...t}){return b.jsx("textarea",{"data-slot":"textarea",className:Ye("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 iv({skill:e,onClose:t,onSaved:i}){const{t:s}=Ct(),o=lu(),u=mi(),c=v.useId(),d=v.useId(),f=e!==void 0,[g,y]=v.useState(e?.name??""),[p,x]=v.useState(e?.description??""),S=Ar({mutationFn:R=>e?iB(e.name,R):rB(R),onSuccess:R=>{const O=e?u.getQueryData(Ql(e.name)):void 0;e&&e.name!==R.name&&u.removeQueries({queryKey:Ql(e.name),exact:!0}),O?.files&&u.setQueryData(Ql(R.name),{...O,...R}),u.invalidateQueries({queryKey:gg}),ln.success(s(f?"skills.updated":"skills.created")),t(),i?.(R),f||o(`/library/skills/${encodeURIComponent(R.name)}`)},onError:R=>{R instanceof ru&&R.code==="SKILL_LINK_CONFLICT"?ln.error(s("skills.linkConflict")):R instanceof ru&&R.code==="SKILL_NAME_CONFLICT"?ln.error(s("skills.nameConflict")):ln.error(s(f?"skills.updateError":"skills.createError"))}}),w=S.isPending,C=mB(g)&&!!p.trim()&&!w;function E(){w||t()}return b.jsx(Qs,{open:!0,onOpenChange:R=>{R||E()},children:b.jsxs(Xs,{showCloseButton:!1,className:`
108
- max-h-[calc(100vh-2rem)] overflow-y-auto
109
- sm:max-w-120
110
- `,children:[b.jsxs("form",{className:"flex flex-col gap-4","aria-busy":w,onSubmit:R=>{R.preventDefault(),C&&S.mutate({name:$M(g),description:p.trim()})},children:[b.jsxs(Zs,{className:"pr-8",children:[b.jsx(Ws,{children:s(f?"skills.editTitle":"skills.createManually")}),b.jsx(Ya,{children:s(f?"skills.editDescription":"skills.createManuallyDescription")})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Ha,{htmlFor:c,children:s("skills.name")}),b.jsx(Jp,{id:c,autoFocus:!0,required:!0,"aria-describedby":`${c}-hint`,placeholder:s("skills.namePlaceholder"),value:g,disabled:w,onChange:R=>{y(R.target.value)}}),b.jsx("p",{id:`${c}-hint`,className:"text-xs text-muted-foreground",children:s("skills.nameHint")})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Ha,{htmlFor:d,children:s("skills.description")}),b.jsx(vB,{id:d,required:!0,rows:3,maxLength:pB,placeholder:s("skills.descriptionPlaceholder"),value:p,disabled:w,onChange:R=>{x(R.target.value)}})]}),b.jsxs(qa,{children:[b.jsx(ht,{type:"button",variant:"ghost",disabled:w,onClick:E,children:s("common.cancel")}),b.jsxs(ht,{type:"submit",disabled:!C,children:[w?b.jsx(bs,{className:"animate-spin"}):f?b.jsx($v,{}):b.jsx(au,{}),b.jsx("span",{children:s(w?f?"skills.updating":"skills.creating":f?"skills.saveChanges":"skills.create")})]})]})]}),b.jsxs(pg,{disabled:w,render:b.jsx(ht,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[b.jsx(Va,{}),b.jsx("span",{className:"sr-only",children:s("a11y.close")})]})]})})}const bB=[{titleKey:"skills.createManually",descriptionKey:"skills.createManuallyDescription",icon:au},{titleKey:"skills.importLocal",descriptionKey:"skills.importLocalDescription",icon:ST},{titleKey:"skills.importUrl",descriptionKey:"skills.importUrlDescription",icon:Kv}];function xB({onCreateManually:e}){const{t}=Ct();return b.jsxs(Uo,{children:[b.jsxs(Ho,{render:b.jsx(ht,{type:"button"}),children:[b.jsx(au,{}),b.jsx("span",{children:t("skills.new")}),b.jsx(Bv,{})]}),b.jsx(Fo,{align:"end",className:"w-max max-w-[min(20rem,calc(100vw-2rem))]",children:bB.map(({titleKey:i,descriptionKey:s,icon:o})=>b.jsxs(cu,{className:"items-start gap-2 p-2",onClick:i==="skills.createManually"?e:void 0,children:[b.jsx(o,{"aria-hidden":"true",className:"mt-0.5 size-4"}),b.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5 whitespace-normal",children:[b.jsx("span",{className:"text-sm",children:t(i)}),b.jsx("span",{className:"text-xs text-muted-foreground",children:t(s)})]})]},i))})]})}const QM=v.createContext(void 0);function SB(){return v.useContext(QM)}const wB=v.forwardRef(function(t,i){const{className:s,defaultPressed:o=!1,disabled:u=!1,form:c,onPressedChange:d,pressed:f,render:g,type:y,value:p,nativeButton:x=!0,style:S,...w}=t,C=dr(p||void 0),E=SB(),R=E?.value??[],O=(u||E?.disabled)??!1,[A,M]=qs({controlled:E?C!==void 0&&R.indexOf(C)>-1:f,default:o,name:"Toggle",state:"pressed"}),{getButtonProps:N,buttonRef:j}=Li({disabled:O,native:x}),D={disabled:O,pressed:A},k=[j,i],_=[{"aria-pressed":A,onClick(X){const B=!A,H=ut(kr,X.nativeEvent);d?.(B,H),!H.isCanceled&&(C&&E?.setGroupValue?.(C,B,H),!H.isCanceled&&M(B))}},w,N],L=At("button",t,{enabled:!E,state:D,ref:k,props:_}),q=v.useMemo(()=>({disabled:O,focusableWhenDisabled:!1}),[O]);return E?b.jsx(Sb,{tag:"button",render:g,className:s,style:S,metadata:q,state:D,refs:k,props:_}):L}),Fb="data-composite-item-active";function EB(e){const{loopFocus:t=!0,orientation:i="both",grid:s,onLoop:o,direction:u,highlightedIndex:c,onHighlightedIndexChange:d,rootRef:f,enableHomeAndEndKeys:g=!1,stopEventPropagation:y,disabledIndices:p,modifierKeys:x=Gi}=e,[S,w]=v.useState(0),C=s!=null,E=v.useRef(null),R=Wr(E,f),O=v.useRef([]),A=v.useRef(!1),M=v.useRef(null),N=c??S,j=Fe((q,X=!1)=>{if(M.current=O.current[q]??null,(d??w)(q),X){const B=O.current[q];PE(E.current,B,u,i)}}),D=Fe(q=>{if(q.size===0)return;if(A.current){const U=O.current,z=U.indexOf(M.current);if(z===-1){const Q=U[N];!Q||Hl(U,N,p)?j(RB(U,p)):M.current=Q}else z!==N&&j(z);return}A.current=!0;const X=Array.from(q.keys()),B=X.find(U=>U?.hasAttribute(Fb))??null,H=B?q.get(B)?.index??-1:-1;if(H!==-1)j(H);else if(Hl(X,N,p)){const U=Ul(X,{disabledIndices:p});_l(X,U)||j(U)}PE(E.current,B,u,i)});_e(()=>{if(p==null||c!=null||!A.current)return;const q=O.current;if(Hl(q,N,p)){const X=Ul(q,{disabledIndices:p});_l(q,X)||j(X)}},[p,c,N,O,j]);const k=Fe((q,X,B)=>o?o(q,X,B,O):B),_=Fe(q=>{const X=q.key===Gy||q.key===$y;if(!cd.has(q.key)||!g&&X||CB(q,x)||!E.current)return;const H=u==="rtl",U=H?qy:Yy,z=H?Yy:qy,Q=i==="vertical"?Ky:U,$=i==="vertical"?Vy:z,K=tr(q.nativeEvent);if(K!=null&&IE(K)&&!EA(K)){const V=K.selectionStart,J=K.selectionEnd,re=K.value;if(V==null||q.shiftKey||V!==J||q.key!==$&&V<re.length||q.key!==Q&&V>0)return}let Y=N;const ee=ph(O,p),G=Oy(O,p);s!=null&&(Y=s({disabledIndices:p,elementsRef:O,event:q,highlightedIndex:N,loopFocus:t,maxIndex:G,minIndex:ee,onLoop:k,orientation:i,rtl:H}));const oe=i!=="vertical"&&q.key===U||i!=="horizontal"&&q.key===Ky,I=i!=="vertical"&&q.key===z||i!=="horizontal"&&q.key===Vy;g&&(q.key===Gy?Y=ee:q.key===$y&&(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=Ul(O.current,{startingIndex:Y,decrement:I,disabledIndices:p})),Y!==N&&!_l(O.current,Y)&&(y&&q.stopPropagation(),(C||X||oe||I)&&q.preventDefault(),j(Y,!0),queueMicrotask(()=>{O.current[Y]?.focus()}))});return{props:{ref:R,onFocus(q){const X=E.current,B=tr(q.nativeEvent);!X||B==null||!IE(B)||B.setSelectionRange(0,B.value.length)},onKeyDown:_},highlightedIndex:N,onHighlightedIndexChange:j,elementsRef:O,onMapChange:D,relayKeyboardEvent:_}}function RB(e,t){let i=-1;for(let s=0;s<e.length;s+=1){const o=e[s];if(!(!o||Hl(e,s,t))){if(o.hasAttribute(Fb))return s;i===-1&&(i=s)}}return Math.max(i,0)}function CB(e,t){for(const i of a6)if(!t.includes(i)&&e.getModifierState(i))return!0;return!1}function XM(e){const{render:t,className:i,style:s,refs:o=Gi,props:u=Gi,state:c=Qt,stateAttributesMapping:d,highlightedIndex:f,onHighlightedIndexChange:g,orientation:y,grid:p,loopFocus:x,onLoop:S,enableHomeAndEndKeys:w,onMapChange:C,stopEventPropagation:E=!0,rootRef:R,disabledIndices:O,modifierKeys:A,highlightItemOnHover:M=!1,tag:N="div",...j}=e,D=Ip(),{props:k,highlightedIndex:_,onHighlightedIndexChange:L,elementsRef:q,onMapChange:X,relayKeyboardEvent:B}=EB({grid:p,loopFocus:x,onLoop:S,orientation:y,highlightedIndex:f,onHighlightedIndexChange:g,rootRef:R,stopEventPropagation:E,enableHomeAndEndKeys:w,direction:D,disabledIndices:O,modifierKeys:A}),H=At(N,e,{state:c,ref:o,props:[k,...u,j],stateAttributesMapping:d}),U=v.useMemo(()=>({highlightedIndex:_,onHighlightedIndexChange:L,highlightItemOnHover:M,relayKeyboardEvent:B}),[_,L,M,B]);return b.jsx(ZO.Provider,{value:U,children:b.jsx(bb,{elementsRef:q,onMapChange:z=>{C?.(z),X(z)},children:H})})}const TB=v.createContext(void 0);function OB(){return v.useContext(TB)}const AB=v.forwardRef(function(t,i){const{defaultValue:s,disabled:o=!1,loopFocus:u=!0,onValueChange:c,orientation:d="horizontal",multiple:f=!1,value:g,className:y,render:p,style:x,...S}=t,w=Xp(),C=OB(),E=s??Gi,R=g!==void 0||s!==void 0,O=(w?.disabled??!1)||(C?.disabled??!1)||o,[A,M]=qs({controlled:g,default:E,name:"ToggleGroup",state:"value"}),N=Fe((L,q,X)=>{let B;f?(B=A.slice(),q?B.push(L):B.splice(A.indexOf(L),1)):B=q?[L]:[],c?.(B,X),!X.isCanceled&&M(B)}),j={disabled:O,multiple:f,orientation:d},D=v.useMemo(()=>({disabled:O,setGroupValue:N,value:A,isValueInitialized:R}),[O,N,A,R]),k={role:"group"},_=At("div",t,{enabled:!!w,state:j,ref:i,props:[k,S]});return b.jsx(QM.Provider,{value:D,children:w?_:b.jsx(XM,{render:p,className:y,style:x,state:j,refs:[i],props:[k,S],loopFocus:u,enableHomeAndEndKeys:!0,orientation:d})})}),MB=dd("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"}}),ZM=v.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function kB({className:e,variant:t,size:i,spacing:s=2,orientation:o="horizontal",children:u,...c}){return b.jsx(AB,{"data-slot":"toggle-group","data-variant":t,"data-size":i,"data-spacing":s,"data-orientation":o,style:{"--gap":s},className:Ye("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),...c,children:b.jsx(ZM.Provider,{value:{variant:t,size:i,spacing:s,orientation:o},children:u})})}function NB({className:e,children:t,variant:i="default",size:s="default",...o}){const u=v.useContext(ZM);return b.jsx(wB,{"data-slot":"toggle-group-item","data-variant":u.variant||i,"data-size":u.size||s,"data-spacing":u.spacing,className:Ye("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",MB({variant:u.variant||i,size:u.size||s}),e),...o,children:t})}function WM({name:e}){const{t}=Ct(),i=mi(),s=Lo({queryKey:vy,queryFn:({signal:f})=>aB(f)}),o=["skill-assignment",e],u=lO({mutationKey:o})>0,c=Ar({mutationKey:o,mutationFn:({id:f,assigned:g})=>oB(e,f,g),onSuccess:f=>{i.setQueryData(vy,g=>g&&{...g,skills:g.skills.map(y=>y.name===f.name?f:y)})},onError:f=>{ln.error(t(f instanceof ru&&f.code==="SKILL_LINK_CONFLICT"?"skills.linkConflict":"skills.assignmentError"))},onSettled:()=>i.invalidateQueries({queryKey:vy})});if(s.isPending)return b.jsx(wr,{className:"h-7 w-16"});if(s.isError)return b.jsx(ht,{variant:"ghost",onClick:()=>{s.refetch()},children:t("common.retry")});if(s.data.agents.length===0)return b.jsx("span",{className:"text-xs text-muted-foreground",children:t("skills.noAgents")});const d=s.data.skills.find(f=>f.name===e)?.agentIds??[];return b.jsx(kB,{multiple:!0,value:d,disabled:u,"aria-label":t("skills.assignTitle",{name:e}),onValueChange:f=>{const g=s.data.agents.find(y=>f.includes(y.id)!==d.includes(y.id))?.id;g&&!u&&c.mutate({id:g,assigned:f.includes(g)})},children:s.data.agents.map(f=>b.jsx(NB,{value:f.id,"aria-label":t("skills.assignAgentAria",{agent:f.name,name:e}),className:"size-7 p-0",children:b.jsx(UM,{icon:f.icon,className:"size-4 rounded-none bg-transparent"})},f.id))})}function DB({skill:e,onEdit:t,onDelete:i,onAssign:s}){const{t:o}=Ct();return b.jsxs(cg,{children:[b.jsxs(dg,{render:b.jsx("div",{role:"listitem",className:`
111
- group flex h-9 items-center rounded-md px-2 transition-colors
112
- hover:bg-muted/50
113
- has-aria-expanded:bg-muted/50
114
- `}),children:[b.jsxs(ud,{to:`/library/skills/${encodeURIComponent(e.name)}`,className:`
115
- flex min-w-0 flex-1 items-center gap-2 rounded-sm text-sm
116
- focus-visible:outline-2 focus-visible:outline-ring
117
- `,children:[b.jsx("span",{className:"min-w-0 truncate font-medium",children:e.name}),b.jsx("span",{className:"min-w-0 flex-1 basis-0 truncate text-muted-foreground",children:e.description})]}),b.jsx("div",{className:`
118
- ml-2 hidden shrink-0
119
- md:block
120
- `,children:b.jsx(WM,{name:e.name})}),b.jsx("div",{className:`
121
- flex w-9 shrink-0 justify-end overflow-hidden
122
- md:w-0
123
- md:group-focus-within:w-9
124
- md:group-hover:w-9
125
- md:group-has-aria-expanded:w-9
126
- [@media(hover:none)]:w-9
127
- `,children:b.jsxs(Uo,{children:[b.jsx(Ho,{render:b.jsx(ht,{type:"button",variant:"ghost",size:"icon","aria-label":o("skills.actionsAria",{name:e.name}),className:"shrink-0 text-muted-foreground"}),children:b.jsx(qv,{})}),b.jsx(Fo,{align:"end",className:"w-40",children:b.jsx(ER,{Item:cu,onEdit:t,onDelete:i,onAssign:s})})]})})]}),b.jsx(fg,{children:b.jsx(ER,{Item:hg,onEdit:t,onDelete:i,onAssign:s})})]})}function ER({Item:e,onEdit:t,onDelete:i,onAssign:s}){const{t:o}=Ct();return b.jsxs(b.Fragment,{children:[b.jsxs(e,{onClick:s,children:[b.jsx(lL,{}),b.jsx("span",{children:o("skills.assign")})]}),b.jsxs(e,{onClick:t,children:[b.jsx(zT,{}),b.jsx("span",{children:o("skills.edit")})]}),b.jsxs(e,{variant:"destructive",onClick:i,children:[b.jsx(Qv,{}),b.jsx("span",{children:o("skills.delete")})]})]})}function jB({skill:e,onClose:t}){const{t:i}=Ct(),s=mi(),o=Ar({mutationFn:()=>sB(e.name),onSuccess:()=>{s.removeQueries({queryKey:Ql(e.name),exact:!0}),s.invalidateQueries({queryKey:gg}),ln.success(i("skills.deleted")),t()},onError:()=>ln.error(i("skills.deleteError"))}),u=()=>{o.isPending||t()};return b.jsx(Qs,{open:!0,onOpenChange:c=>{c||u()},children:b.jsxs(Xs,{showCloseButton:!1,children:[b.jsxs(Zs,{children:[b.jsx(Ws,{children:i("skills.deleteConfirmTitle")}),b.jsx(Ya,{children:b.jsx(Ob,{i18nKey:"skills.deleteConfirmDescription",values:{name:e.name},components:{skillName:b.jsx("code",{className:`
128
- rounded-sm bg-muted px-1 py-0.5 font-mono wrap-anywhere
129
- `})}})})]}),b.jsxs(qa,{children:[b.jsx(ht,{type:"button",variant:"ghost",disabled:o.isPending,onClick:u,children:i("common.cancel")}),b.jsxs(ht,{type:"button",variant:"destructive",disabled:o.isPending,onClick:()=>o.mutate(),children:[o.isPending&&b.jsx(bs,{className:"animate-spin"}),b.jsx("span",{children:i("skills.delete")})]})]})]})})}function IB({skill:e,onClose:t}){const{t:i}=Ct();return b.jsx(Qs,{open:!0,onOpenChange:s=>{s||t()},children:b.jsxs(Xs,{children:[b.jsxs(Zs,{children:[b.jsx(Ws,{className:"pr-6 leading-relaxed",children:b.jsx(Ob,{i18nKey:"skills.assignDialogTitle",values:{name:e.name},components:{skillName:b.jsx("code",{className:`
130
- rounded-sm bg-muted px-1 py-0.5 font-mono text-sm
131
- wrap-anywhere
132
- `})}})}),b.jsx(Ya,{children:i("skills.assignDescription")})]}),b.jsx(WM,{name:e.name})]})})}function PB(){const{t:e}=Ct(),[t,i]=v.useState(!1),[s,o]=v.useState(null),[u,c]=v.useState(null),[d,f]=v.useState(null),g=Lo({queryKey:gg,queryFn:({signal:y})=>tB(y)});return b.jsxs(b.Fragment,{children:[b.jsx(iM,{children:b.jsx(xB,{onCreateManually:()=>{i(!0)}})}),b.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto p-4",children:[g.isPending&&b.jsx(wr,{className:"h-16 w-full"}),g.isError&&b.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center",children:[b.jsx(Vc,{icon:jy,title:e("skills.loadError"),className:"flex-none"}),b.jsx(ht,{variant:"outline",onClick:()=>{g.refetch()},children:e("common.retry")})]}),g.isSuccess&&g.data.length===0&&b.jsx(Vc,{icon:jy,title:e("skills.emptyTitle"),description:e("skills.emptyDescription")}),g.isSuccess&&g.data.length>0&&b.jsx("div",{role:"list",children:g.data.map(y=>b.jsx(DB,{skill:y,onEdit:()=>o(y),onDelete:()=>c(y),onAssign:()=>f(y)},y.name))})]}),t&&b.jsx(iv,{onClose:()=>{i(!1)}}),s&&b.jsx(iv,{skill:s,onClose:()=>o(null)}),u&&b.jsx(jB,{skill:u,onClose:()=>c(null)}),d&&b.jsx(IB,{skill:d,onClose:()=>f(null)})]})}function rp(e,t){for(const i of e){if(i.path===t)return i;if(!i.children)continue;const s=rp(i.children,t);if(s)return s}}function ip(e,t,i){return e.flatMap(s=>{if(s.path===t){const o=i(s);return o?[o]:[]}return s.children?[{...s,children:ip(s.children,t,i)}]:[s]})}function LB(e,t,i){return t?ip(e,t,s=>s.children?{...s,children:[...s.children,i]}:s):[...e,i]}function zB({files:e,parent:t,kind:i,onCreate:s,onCancel:o}){const{t:u}=Ct(),[c,d]=v.useState(""),[f,g]=v.useState(!1),y=v.useRef(null),p=v.useRef(!1),x=v.useId(),S=c.trim(),w=t?`${t}/${S}`:S,C=yB(S)&&!S.includes("/"),E=S!==""&&rp(e,w)!==void 0,R=E?u("skills.fileConflict"):f&&!C?u("skills.invalidEntryName"):null;v.useEffect(()=>{const A=requestAnimationFrame(()=>y.current?.focus());return()=>cancelAnimationFrame(A)},[]);const O=()=>{p.current||(g(!0),!(!C||E)&&(p.current=!0,s(i==="directory"?{path:w,children:[]}:{path:w,content:""})))};return b.jsxs("form",{onSubmit:A=>{A.preventDefault(),O()},onKeyDown:A=>{A.key==="Escape"&&(A.preventDefault(),A.stopPropagation(),p.current=!0,o())},children:[b.jsxs("div",{className:`
133
- flex h-7 min-w-0 items-center gap-1.5 border-x border-transparent pl-2
134
- `,children:[b.jsx("span",{className:"size-3 shrink-0"}),i==="directory"?b.jsx(RT,{className:"size-3.5 shrink-0"}):b.jsx(Yv,{className:"size-3.5 shrink-0"}),b.jsx(Jp,{ref:y,required:!0,"aria-label":u(i==="directory"?"skills.newFolder":"skills.newFile"),"aria-invalid":!!R,"aria-describedby":R?x:void 0,maxLength:255,value:c,className:"min-w-0 flex-1",onKeyDown:A=>{A.key==="Enter"&&A.nativeEvent.isComposing&&A.preventDefault()},onChange:A=>d(A.target.value),onBlur:()=>{S===""&&!p.current?(p.current=!0,o()):O()}})]}),R&&b.jsx("p",{id:x,role:"alert",className:"mt-1 px-2 text-xs text-destructive",children:R})]})}const JM=v.createContext(void 0);function mg(e){const t=v.useContext(JM);if(t===void 0&&!e)throw new Error(bn(47));return t}const _B={...Us,disabled:e=>e.disabled,instantType:e=>e.instantType==="trigger-change"&&!Us.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===$i&&Us.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod==="touch"&&e.openChangeReason===$i,hasTriggerFocusGuards:(e,t)=>Us.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 UB extends su{constructor(t,i,s){const o=new nd;super(HB(t,o,i,s),FB(o),_B)}setOpen=(t,i)=>{const s=i.reason===Kn,o=i.reason===$i&&i.event.detail===0,u=!t&&(i.reason===Zc||i.reason==null),c=Tp(i),d=this.select("activeTriggerId");if(!t&&i.reason===UR&&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 y=Cp(this.state,t,i.trigger,c());y.openChangeReason=i.reason,this.update(y)};s?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(dC,()=>{this.context.stickIfOpen=!1}),cr.flushSync(f)):f();let g;o?g="click":u?g="dismiss":i.reason===Pa&&(g="focus"),this.set("instantType",g)}}function HB(e,t,i,s=!1){const o={...Np(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 FB(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),stickIfOpenTimeout:new ji,stickIfOpen:!0,triggerElements:e}}const RR=Yc(function({props:t}){const{children:i,open:s,defaultOpen:o=!1,onOpenChange:u,onOpenChangeComplete:c,modal:d=!1,handle:f,triggerId:g,defaultTriggerId:y=null}=t,p=VB(f,{modal:d,open:o,openProp:s,activeTriggerId:y,triggerIdProp:g});p.useControlledProp("openProp",s),p.useControlledProp("triggerIdProp",g);const x=p.useState("open"),S=p.useState("mounted"),w=p.useState("payload");p.useContextCallback("onOpenChange",u),p.useContextCallback("onOpenChangeComplete",c),CC(p,x),Op(p);const{forceUnmount:C}=Ap(x,p,()=>{p.context.stickIfOpen=!0,p.set("openChangeReason",null)});p.useSyncedValues({modal:d}),v.useEffect(()=>{x||p.context.stickIfOpenTimeout.clear()},[p,x]),v.useImperativeHandle(t.actionsRef,()=>({unmount:C,close:()=>p.setOpen(!1,ut(Wc))}),[C,p]);const E=x||S||f!=null;return b.jsxs(JM.Provider,{value:p,children:[f&&b.jsx(Rp,{handle:f,store:p}),E&&b.jsx(KB,{store:p,modal:d}),typeof i=="function"?i({payload:w}):i]})});function BB(e){return mg(!0)?b.jsx(RR,{props:e}):b.jsx(SC,{children:b.jsx(RR,{props:e})})}function VB(e,t){const i=Pv((s,o)=>new UB(t,s,o));return v.useEffect(()=>i.context.stickIfOpenTimeout.disposeEffect(),[i]),i}function KB({store:e,modal:t}){const i=e.useState("floatingRootContext"),s=ed(i,{outsidePressEvent:{mouse:t==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),o=s.reference,u=s.floating;return Mp(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:u}),null}const ek=v.createContext(void 0);function qB(){const e=v.useContext(ek);if(e===void 0)throw new Error(bn(45));return e}const YB=v.forwardRef(function(t,i){const{keepMounted:s=!1,...o}=t;return mg().useState("mounted")||s?b.jsx(ek.Provider,{value:s,children:b.jsx(Sp,{ref:i,...o})}):null}),tk=v.createContext(void 0);function GB(){const e=v.useContext(tk);if(!e)throw new Error(bn(46));return e}const $B=v.forwardRef(function(t,i){const{render:s,className:o,style:u,anchor:c,positionMethod:d,side:f,align:g,sideOffset:y,alignOffset:p,collisionBoundary:x="clipping-ancestors",collisionPadding:S,arrowPadding:w,sticky:C,disableAnchorTracking:E=!1,collisionAvoidance:R=kv,...O}=t,A=mg(),M=qB(),N=Dv(),j=A.useState("floatingRootContext"),D=A.useState("mounted"),k=A.useState("open"),_=A.useState("openChangeReason"),L=A.useState("activeTriggerElement"),q=A.useState("modal"),X=A.useState("openMethod"),B=A.useState("positionerElement"),H=A.useState("instantType"),U=A.useState("transitionStatus"),z=A.useState("adaptiveOrigin"),Q=Pp({anchor:c,floatingRootContext:j,positionMethod:d,mounted:D,side:f,sideOffset:y,align:g,alignOffset:p,arrowPadding:w,collisionBoundary:x,collisionPadding:S,sticky:C,disableAnchorTracking:E,keepMounted:M,nodeId:N,collisionAvoidance:R,adaptiveOrigin:z}),$=j.useState("domReferenceElement");fA({store:A,domReference:$,positionerElement:B,open:k});const K=q===!0&&_!==Kn;xb(k&&K,X==="touch",B,L);const Y=A.useStateSetter("positionerElement"),ee={open:k,side:Q.side,align:Q.align,anchorHidden:Q.anchorHidden,instant:H},G=Lp(t,ee,{styles:Q.positionerStyles,transitionStatus:U,props:O,refs:[i,Y],hidden:!D,inert:!k});return b.jsxs(tk.Provider,{value:Q,children:[D&&K&&b.jsx(Zp,{inert:zp(!k),cutout:L}),b.jsx(xC,{id:N,children:G})]})}),QB=v.createContext(void 0);function XB(){const[e,t]=v.useState(0),i=Fe(()=>(t(o=>o+1),()=>{t(o=>Math.max(0,o-1))}));return{context:v.useMemo(()=>({register:i}),[i]),hasClosePart:e>0}}const ZB=v.forwardRef(function(t,i){const{render:s,className:o,style:u,initialFocus:c,finalFocus:d,...f}=t,g=mg(),y=GB(),p=Xp()!=null,{context:x,hasClosePart:S}=XB(),w=g.useState("open"),C=g.useState("openMethod"),E=g.useState("instantType"),R=g.useState("transitionStatus"),O=g.useState("popupProps"),A=g.useState("titleElementId"),M=g.useState("descriptionElementId"),N=g.useState("modal"),j=g.useState("mounted"),D=g.useState("openChangeReason"),k=g.useState("activeTriggerElement"),_=g.useState("floatingRootContext"),L=_.useState("floatingId"),q=g.useState("disabled"),X=g.useState("openOnHover"),B=g.useState("closeDelay");Ii({open:w,ref:g.context.popupRef,onComplete(){w&&g.context.onOpenChangeComplete?.(!0)}}),Hv(_,{enabled:X&&!q,closeDelay:B});const H=c===void 0?RC(g.context.popupRef):c,U=N!==!1&&S;g.useSyncedValue("focusManagerModal",U);const z=g.useStateSetter("popupElement"),Q={open:w,side:y.side,align:y.align,instant:E,transitionStatus:R},$=At("div",t,{state:Q,ref:[i,g.context.popupRef,z],props:[O,{id:L,role:"dialog",...td,"aria-labelledby":A,"aria-describedby":M,onKeyDown(K){p&&cd.has(K.key)&&K.stopPropagation()}},rd(R),f],stateAttributesMapping:gp});return b.jsx(wp,{context:_,openInteractionType:C,modal:U,disabled:!j||D===Kn,initialFocus:H,returnFocus:d,restoreFocus:"popup",getInsideElements:()=>[g.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:vn(k)?k:void 0,nextFocusableElement:g.context.triggerFocusTargetRef,beforeContentFocusGuardRef:g.context.beforeContentFocusGuardRef,children:b.jsx(QB.Provider,{value:x,children:$})})});function WB({...e}){return b.jsx(BB,{"data-slot":"popover",...e})}function JB({anchor:e,align:t="center",alignOffset:i=0,side:s="bottom",sideOffset:o=4,className:u,...c}){return b.jsx(YB,{children:b.jsx($B,{anchor:e,className:"isolate z-50 outline-none",align:t,alignOffset:i,side:s,sideOffset:o,children:b.jsx(ZB,{"data-slot":"popover-content",className:Ye("z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-4 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",u),...c})})})}function e9({entry:e,anchor:t,isOpen:i,onOpenChange:s,onConfirm:o}){const{t:u}=Ct(),c=v.useId(),d=v.useId();return b.jsx(WB,{open:i,onOpenChange:s,children:b.jsx(JB,{anchor:t,align:"start","aria-labelledby":c,"aria-describedby":d,finalFocus:()=>t.current?.querySelector("button")??!1,className:"max-w-[calc(100vw-1.5rem)]",children:b.jsxs("div",{className:"flex flex-col gap-3",children:[b.jsx("h2",{id:c,className:"text-sm font-medium",children:u("skills.delete")}),b.jsx("p",{id:d,className:"text-xs wrap-anywhere text-muted-foreground",children:b.jsx(Ob,{i18nKey:"skills.deleteEntryDescription",values:{path:e.path},components:{entryPath:b.jsx("code",{className:`
135
- rounded-sm bg-muted px-1 py-0.5 font-mono wrap-anywhere
136
- `})}})}),b.jsxs("div",{className:"flex justify-end gap-2",children:[b.jsx(ht,{variant:"ghost",onClick:()=>s(!1),children:u("common.cancel")}),b.jsx(ht,{variant:"destructive",onClick:o,children:u("skills.delete")})]})]})})})}function sp({entry:e,Item:t,onAction:i}){const{t:s}=Ct(),o=e?.path??"";return b.jsxs(b.Fragment,{children:[(!e||e.children)&&b.jsxs(b.Fragment,{children:[b.jsxs(t,{onClick:()=>i({type:"create",parent:o,kind:"file"}),children:[b.jsx(GP,{}),s("skills.newFile")]}),b.jsxs(t,{onClick:()=>i({type:"create",parent:o,kind:"directory"}),children:[b.jsx(QP,{}),s("skills.newFolder")]})]}),e&&e.path!=="SKILL.md"&&b.jsxs(t,{variant:"destructive",onClick:()=>i({type:"delete",entry:e}),children:[b.jsx(Qv,{}),s("skills.delete")]})]})}function t9({entry:e,onAction:t,children:i,isActive:s=!1}){const{t:o}=Ct(),u=v.useRef(null),[c,d]=v.useState(!1),f=y=>{y.type==="delete"?d(!0):t(y)},g=Ye(NA({variant:"ghost"}),`
137
- group/file relative flex w-full min-w-0 justify-start p-0
138
- data-active:bg-muted data-active:text-foreground
139
- `);return e?.path==="SKILL.md"?b.jsx("div",{className:g,"data-active":s||void 0,children:i}):b.jsxs(b.Fragment,{children:[b.jsxs(cg,{children:[b.jsxs(dg,{render:b.jsx("div",{ref:u,className:g,"data-active":s||void 0}),children:[i,b.jsxs(Uo,{children:[b.jsx(Ho,{render:b.jsx(ht,{variant:"link",size:"icon","aria-label":o("skills.fileActions",{path:e?.path??o("skills.files")}),className:`
140
- absolute right-0 shrink-0 text-inherit
141
- data-popup-open:opacity-100
142
- md:opacity-0
143
- md:group-focus-within/file:opacity-100
144
- md:group-hover/file:opacity-100
145
- [@media(hover:none)]:opacity-100
146
- `}),children:b.jsx(qv,{})}),b.jsx(Fo,{align:"end",children:b.jsx(sp,{Item:cu,entry:e,onAction:f})})]})]}),b.jsx(fg,{children:b.jsx(sp,{Item:hg,entry:e,onAction:f})})]}),e&&b.jsx(e9,{entry:e,anchor:u,isOpen:c,onOpenChange:d,onConfirm:()=>{d(!1),t({type:"delete",entry:e})}})]})}const Bb=v.createContext({creation:null,render:()=>null});Bb.displayName="InlineEntryContext";function n9({files:e,selectedPath:t,onSelect:i,onOverview:s,onAction:o,onCreate:u,overviewDisabled:c=!1}){const{t:d}=Ct(),[f,g]=v.useState(!1),[y,p]=v.useState(null),x=kA(),S=R=>{c||(R.type==="create"?p(R):(p(null),o(R)))},w=b.jsxs(ht,{variant:"ghost",className:"shrink-0 justify-start","aria-haspopup":"dialog",disabled:c,onClick:()=>{g(!1),s()},children:[b.jsx(qT,{}),b.jsx("span",{children:d("skills.overview")})]}),C=()=>y&&b.jsx(zB,{files:e,parent:y.parent,kind:y.kind,onCancel:()=>p(null),onCreate:R=>{u(R,y.parent),p(null),R.children||g(!1)}},`${y.parent}/${y.kind}`),E=b.jsxs(b.Fragment,{children:[b.jsx(Bb,{value:{creation:y,render:C},children:b.jsx(nk,{parent:"",entries:e,selectedPath:t,onSelect:R=>{g(!1),i(R)},onAction:S})}),b.jsxs(cg,{children:[b.jsx(dg,{render:b.jsx("div",{className:"min-h-16 flex-1"})}),b.jsx(fg,{children:b.jsx(sp,{Item:hg,onAction:S})})]})]});return b.jsxs(b.Fragment,{children:[b.jsxs("nav",{"aria-label":d("skills.fileNavigation"),className:`
147
- hidden w-56 shrink-0 flex-col gap-2 overflow-y-auto border-r p-3
148
- md:flex
149
- `,children:[w,!x&&E]}),b.jsxs("div",{className:`
150
- flex shrink-0 items-center gap-2 border-b p-2
151
- md:hidden
152
- `,children:[w,b.jsxs(WA,{open:f,onOpenChange:R=>{g(R),R||p(null)},children:[b.jsxs(k8,{render:b.jsx(ht,{variant:"outline"}),children:[b.jsx($P,{}),b.jsx("span",{children:d("skills.files")})]}),b.jsxs(JA,{side:"left","aria-describedby":void 0,children:[b.jsx(eM,{className:"sr-only",children:d("skills.fileNavigation")}),b.jsxs("nav",{"aria-label":d("skills.fileNavigation"),className:`
153
- flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-3 pt-14
154
- pb-3
155
- `,children:[b.jsxs(Uo,{children:[b.jsxs(Ho,{render:b.jsx(ht,{variant:"outline",className:"w-full shrink-0 justify-start"}),children:[b.jsx(au,{}),b.jsx("span",{children:d("skills.newEntry")})]}),b.jsx(Fo,{align:"start",children:b.jsx(sp,{Item:cu,onAction:S})})]}),E]})]})]})]})]})}function nk({entries:e,parent:t,selectedPath:i,onSelect:s,onAction:o}){const u=v.use(Bb),c=e.toSorted((d,f)=>!!d.children==!!f.children?d.path.localeCompare(f.path):d.children?-1:1);return b.jsxs("ul",{className:"min-w-0 shrink-0",children:[u.creation?.parent===t&&b.jsx("li",{children:u.render()}),c.map(d=>b.jsx(r9,{entry:d,selectedPath:i,onSelect:s,onAction:o},d.path))]})}function r9({entry:e,selectedPath:t,onSelect:i,onAction:s}){const[o,u]=v.useState(!0),c=e.children!==void 0;return b.jsxs("li",{className:"min-w-0",children:[b.jsx(t9,{entry:e,isActive:t===e.path,onAction:d=>{d.type==="create"&&u(!0),s(d)},children:b.jsxs("button",{type:"button","aria-current":!c&&t===e.path?"page":void 0,"aria-expanded":c?o:void 0,className:`
156
- flex h-7 w-full min-w-0 flex-1 items-center gap-1.5 rounded-md pr-9
157
- pl-2 text-left text-xs font-normal outline-none
158
- focus-visible:ring-2 focus-visible:ring-ring
159
- `,onClick:()=>{c?u(!o):i(e.path)},children:[b.jsx("span",{className:"flex size-3 shrink-0 items-center justify-center",children:c&&b.jsx(Vv,{className:Ye("size-3 transition-transform",o&&`
160
- rotate-90
161
- `)})}),c?b.jsx(RT,{className:"size-3.5 shrink-0"}):b.jsx(Yv,{className:"size-3.5 shrink-0"}),b.jsx("span",{className:"truncate",title:e.path,children:e.path.split("/").at(-1)})]})}),c&&o&&b.jsx("div",{className:"ml-3 border-l pl-1",children:b.jsx(nk,{parent:e.path,entries:e.children,selectedPath:t,onSelect:i,onAction:s})})]})}function i9({skill:e}){const{t}=Ct(),i=lu(),s=mi(),[o,u]=v.useState(!1),[c,d]=v.useState("SKILL.md"),[f,g]=v.useState(e.files),[y,p]=v.useState(e.files),[x,S]=v.useState(!1),w=rp(f,c),C=w?.content??"",E=JSON.stringify(f)!==JSON.stringify(y),R=Ar({mutationFn:()=>lB(e.name,f),onSuccess:M=>{g(M.files),p(M.files),s.setQueryData(Ql(e.name),M),s.invalidateQueries({queryKey:gg}),ln.success(t("skills.contentSaved"))},onError:()=>ln.error(t("skills.contentSaveError"))}),O=Oz(E||R.isPending);S_(v.useCallback(M=>{(E||R.isPending)&&M.preventDefault()},[E,R.isPending]));const A=()=>{E&&!R.isPending&&R.mutate()};return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:`
162
- flex min-h-0 flex-1 flex-col border-t
163
- md:flex-row
164
- `,children:[b.jsx(n9,{files:f,overviewDisabled:R.isPending,selectedPath:c,onSelect:d,onCreate:(M,N)=>{R.isPending||(g(j=>LB(j,N,M)),M.children||d(M.path))},onAction:M=>{if(R.isPending||M.type!=="delete")return;const N=M.entry.path;g(j=>ip(j,N,()=>null)),(c===N||c.startsWith(`${N}/`))&&d("SKILL.md")},onOverview:()=>{E?S(!0):u(!0)}}),b.jsxs("section",{className:"flex min-h-0 min-w-0 flex-1 flex-col","aria-labelledby":"skill-file-title",children:[b.jsxs("header",{className:`
165
- flex h-10 shrink-0 items-center justify-between gap-2 border-b
166
- px-4
167
- `,children:[b.jsx("h1",{id:"skill-file-title",className:"min-w-0 truncate font-mono text-xs font-medium",title:c,children:c}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{role:"status",className:"text-xs text-muted-foreground",children:t(R.isPending?"skills.contentSaving":E?"skills.unsavedChanges":"skills.allChangesSaved")}),b.jsxs(ht,{disabled:!E||R.isPending,onClick:A,children:[R.isPending?b.jsx(bs,{className:"animate-spin"}):b.jsx($v,{}),b.jsx("span",{children:t("skills.saveContent")})]})]})]}),b.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:w?.content===null?b.jsx(Vc,{title:t("skills.fileNotEditable")}):b.jsx(GM,{height:"100%",path:`foundry://skills/${encodeURIComponent(e.name)}/${c.split("/").map(M=>encodeURIComponent(M)).join("/")}`,value:C,ariaLabel:t("skills.fileEditor",{file:c}),placeholder:c==="SKILL.md"?t("skills.contentPlaceholder"):"",readOnly:R.isPending,showLineNumbers:!0,onChange:M=>g(N=>ip(N,c,j=>({path:j.path,content:M}))),onSave:A},c)})]})]}),o&&b.jsx(iv,{skill:e,onClose:()=>u(!1),onSaved:M=>{M.name!==e.name&&i(`/library/skills/${encodeURIComponent(M.name)}`,{replace:!0})}}),b.jsx(Qs,{open:O.state==="blocked"||x,onOpenChange:M=>{M||(O.reset?.(),S(!1))},children:b.jsxs(Xs,{showCloseButton:!1,children:[b.jsxs(Zs,{children:[b.jsx(Ws,{children:t("skills.leaveTitle")}),b.jsx(Ya,{children:t("skills.leaveDescription")})]}),b.jsxs(qa,{children:[b.jsx(ht,{variant:"ghost",onClick:()=>{O.reset?.(),S(!1)},children:t("skills.keepEditing")}),b.jsx(ht,{variant:"destructive",disabled:R.isPending,onClick:()=>{g(y),rp(y,c)||d("SKILL.md"),x?(u(!0),S(!1)):O.proceed?.()},children:t("skills.discardChanges")})]})]})})]})}function s9(){const{t:e}=Ct(),{name:t=""}=gz(),i=Lo({queryKey:Ql(t),queryFn:({signal:s})=>nB(t,s),retry:(s,o)=>!(o instanceof ru&&o.code==="SKILL_NOT_FOUND")&&s<2});if(i.isPending)return b.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-4","aria-busy":"true",children:[b.jsx(wr,{className:"h-7 w-48"}),b.jsx(wr,{className:"min-h-24 flex-1"})]});if(i.isError&&i.data===void 0){const s=i.error instanceof ru&&i.error.code==="SKILL_NOT_FOUND";return b.jsxs("div",{role:"alert",className:"flex flex-1 flex-col items-center justify-center p-4",children:[b.jsx(Vc,{icon:jy,title:e(s?"skills.notFound":"skills.loadError"),className:"flex-none"}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx(ht,{variant:"outline",render:b.jsx(ud,{to:"/library/skills"}),children:e("skills.backToSkills")}),!s&&b.jsx(ht,{onClick:()=>{i.refetch()},children:e("common.retry")})]})]})}return b.jsx(i9,{skill:i.data},i.data.name)}const yg="/api/settings";function a9(e){return xd({signal:e})}function o9(e){return xd({method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function l9(){return xd({method:"POST"},`${yg}/config-folder/open`)}function u9(e){return xd({signal:e},`${yg}/skill-copy`)}function c9(e){return xd({method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)},`${yg}/skill-copy`)}async function xd(e,t=yg){const i=await fetch(t,e);if(!i.ok)throw new Error(await d9(i));return i.json()}async function d9(e){try{return(await e.json()).error?.message??`Request failed with status ${e.status}`}catch{return`Request failed with status ${e.status}`}}function $a({label:e,description:t,children:i,className:s,controlClassName:o}){return b.jsxs("div",{className:Ye(`
168
- flex flex-col items-start gap-3 p-4
169
- min-[680px]:min-h-16 min-[680px]:flex-row min-[680px]:items-center
170
- min-[680px]:justify-between min-[680px]:gap-8
171
- `,s),children:[b.jsxs("div",{className:"min-w-0",children:[b.jsx("div",{className:"text-sm font-medium",children:e}),t&&b.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:t})]}),b.jsx("div",{className:Ye(`
172
- min-w-0
173
- max-[680px]:w-full
174
- min-[680px]:shrink-0
175
- `,o),children:i})]})}function f9({configFolder:e}){const{t}=Ct(),i=v.useRef(null),s=Ar({mutationFn:async f=>{await navigator.clipboard.writeText(f)},onSuccess:()=>{ln.success(t("settings.configFolderCopied"))},onError:()=>{ln.error(t("settings.errors.copyConfigFolder"))}}),o=Ar({mutationFn:l9,onError:()=>{ln.error(t("settings.errors.openConfigFolder"))}}),u=s.isSuccess&&s.variables===e,c=!e||s.isPending||o.isPending,d=t(u?"settings.configFolderCopied":"settings.copyConfigFolder");return b.jsx($a,{label:t("settings.configFolder"),controlClassName:"min-[680px]:shrink",children:b.jsxs("div",{className:`
176
- flex min-w-0 items-center justify-end gap-2
177
- max-[680px]:justify-start
178
- `,children:[e&&b.jsx("span",{className:`
179
- min-w-0 font-mono text-xs break-all text-muted-foreground
180
- select-text
181
- `,children:e}),b.jsx(ht,{type:"button",variant:"ghost",size:"icon","aria-label":d,title:d,disabled:c,"aria-busy":s.isPending,onClick:()=>{!e||c||(i.current&&clearTimeout(i.current),s.mutate(e,{onSuccess:()=>{i.current=setTimeout(()=>s.reset(),2e3)}}))},children:u?b.jsx(Up,{}):b.jsx(KP,{})}),b.jsxs(ht,{type:"button",variant:"outline",disabled:c,"aria-busy":o.isPending,onClick:()=>{c||o.mutate()},children:[o.isPending?b.jsx(bs,{className:"animate-spin"}):b.jsx(ST,{}),b.jsx("span",{children:t("settings.openFolder")})]})]})})}function h9(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 p9="data-checked",g9="data-unchecked";function rk(e){return{checked(t){return e.indeterminate?{}:t?{[p9]:""}:{[g9]:""}},...du}}const m9=v.createContext(void 0);function y9(){return v.useContext(m9)}const ik=v.createContext(void 0);function v9(){const e=v.useContext(ik);if(e===void 0)throw new Error(bn(14));return e}const b9="data-parent",x9=v.forwardRef(function(t,i){const{checked:s,className:o,defaultChecked:u=!1,"aria-labelledby":c,disabled:d=!1,form:f,id:g,indeterminate:y=!1,inputRef:p,name:x,onCheckedChange:S,parent:w=!1,readOnly:C=!1,render:E,required:R=!1,uncheckedValue:O,value:A,nativeButton:M=!1,style:N,...j}=t,{clearErrors:D}=fd(),{disabled:k,name:_,setDirty:L,setFilled:q,setTouched:X,state:B,validationMode:H,validityData:U,validation:z}=$s(),Q=DA(),{labelId:$,registerControlId:K,getDescriptionProps:Y}=Bo(),ee=y9(),G=ee?.allValues===void 0?void 0:ee.parent,oe=G!==void 0,I=k||Q.disabled||ee?.disabled||d,V=_??x,J=A??V,re=dr(),Ee=ee?.registerControlId!==K,le=fu({id:g||void 0,enabled:Ee}),me=M?le:re;let ge={};oe&&(w?ge=G.getParentProps():J!==void 0&&(ge=G.getChildProps(J)));const{checked:ce=s,indeterminate:Te=y,onCheckedChange:ve,...Pe}=ge,Ae=ee?.value,Le=v.useRef(null),Be=hd(I,Le),{getButtonProps:Oe,buttonRef:Ue}=Li({disabled:I,native:M}),be=ee?.validation??z,[He,Ze]=qs({controlled:J!==void 0&&Ae!==void 0&&!w?Ae.includes(J):ce,default:u,name:"Checkbox",state:"checked"}),at=oe?!!ce:He,de=oe&&Te||y;pd(Le,re,He,void 0,!ee&&!I,x);const we=G?.registerChildId,Ge=v.useRef(null),ke=be.registerInput,De=ee?J:void 0,vt=v.useCallback(Je=>ke(Je,{controlRef:Le,value:De}),[ke,De]),ct=Wr(p,Ge,w?void 0:vt),pt=Rb(c,$,Ge,!M,le,j["aria-label"]);_e(()=>{Ge.current&&(Ge.current.indeterminate=de),ee||q(He)},[He,de,ee,q]),uu(He,()=>{ee||(D(V),L(He!==U.initialValue),be.change(He))});const kt=Mr({checked:He,disabled:I,form:f,name:w?void 0:V,id:M?void 0:le,required:R,ref:ct,style:V?yp:Jc,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Je){if(Je.nativeEvent.defaultPrevented)return;if(C){Je.preventDefault();return}const St=Je.currentTarget.checked,Xt=ut(kr,Je.nativeEvent);if(S?.(St,Xt),!Xt.isCanceled&&(ve?.(St,Xt),!Xt.isCanceled&&(Ze(St),J!==void 0&&ee!==void 0&&!w&&!oe))){const ft=St?[...ee.value,J]:ee.value.filter(bt=>bt!==J);ee.setValue(ft,Xt)}},onClick(Je){Je.stopPropagation()},onFocus(){Le.current?.focus()}},A!==void 0?{value:(ee?He&&A:A)||""}:Qt,Y,Je=>be.getValidationProps(I,Je));v.useEffect(()=>{if(!G||J===void 0)return;const Je=G.disabledStatesRef.current;return Je.set(J,I),()=>{Je.delete(J)}},[G,I,J]);const jt=v.useMemo(()=>({...B,checked:at,disabled:I,readOnly:C,required:R,indeterminate:de}),[B,at,I,C,R,de]),en=rk(jt),sn=At("span",t,{state:jt,ref:[Ue,Le,i],props:[{id:me,role:"checkbox","aria-checked":de?"mixed":at,"aria-readonly":C||void 0,"aria-required":R||void 0,"aria-labelledby":pt,[b9]:w?"":void 0,onFocus(){Be(!0)},onBlur(){const Je=Ge.current;Je&&(X(!0),Be(!1),H==="onBlur"&&be.commit(ee?Ae:Je.checked))},onKeyDown(Je){if(Je.key!=="Enter"||(Je.preventBaseUIHandler(),Je.defaultPrevented))return;const St=Ge.current?.form??null,Xt=Je.currentTarget,ft=Je.nativeEvent,bt=Je.preventDefault,mt=ft.preventDefault;let Ut=!1;Je.preventDefault=()=>{Ut=!0,bt.call(Je)},ft.preventDefault=()=>{Ut=!0,mt.call(ft)},mt.call(ft),Rn(Xt).queueMicrotask(()=>{Je.preventDefault=bt,ft.preventDefault=mt,Ut||h9(St)?.click()})},onClick(Je){if(C||I)return;Je.preventDefault();const St=Ge.current;St&&Mo(St,Je)}},j,Pe,Oe,Y,Je=>be.getValidationProps(I,Je)],stateAttributesMapping:en}),tn=sn.props.id;return _e(()=>{if(!(!we||w||J===void 0||tn===void 0))return we(J,tn)},[we,w,J,tn]),b.jsxs(ik.Provider,{value:jt,children:[sn,!He&&!ee&&V&&!w&&O!==void 0&&b.jsx("input",{type:"hidden",form:f,name:V,value:O,disabled:I}),b.jsx("input",{...kt,suppressHydrationWarning:!0})]})}),S9=v.forwardRef(function(t,i){const{render:s,className:o,style:u,keepMounted:c=!1,...d}=t,f=v9(),g=f.checked||f.indeterminate,{mounted:y,transitionStatus:p,setMounted:x}=Po(g),S=v.useRef(null),w={...f,transitionStatus:p};Ii({batch:!0,enabled:!g,open:g,ref:S,onComplete(){g||x(!1)}});const E={...rk(f),...ys},R=c||y,O=At("span",t,{ref:[i,S],state:w,stateAttributesMapping:E,props:d});return R?O:null});function w9({className:e,...t}){return b.jsx(x9,{"data-slot":"checkbox",className:Ye("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:b.jsx(S9,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:b.jsx(Up,{})})})}function E9({onClose:e}){const{t}=Ct(),i=v.useId(),[s,o]=v.useState(["agents"]),u=Lo({queryKey:["skill-targets"],queryFn:({signal:d})=>u9(d),retry:!1}),c=Ar({mutationFn:c9,onSuccess:()=>{ln.success(t("settings.skillDownloaded")),e()},onError:()=>ln.error(t("settings.errors.downloadSkill"))});return b.jsx(Qs,{open:!0,onOpenChange:d=>{!d&&!c.isPending&&e()},children:b.jsxs(Xs,{showCloseButton:!1,children:[b.jsxs("form",{className:"flex flex-col gap-4","aria-busy":c.isPending,onSubmit:d=>{d.preventDefault(),s.length>0&&u.isSuccess&&!c.isPending&&c.mutate({targets:s})},children:[b.jsxs(Zs,{children:[b.jsx(Ws,{children:t("settings.downloadSkill")}),b.jsx(Ya,{children:t("settings.downloadSkillDescription")})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Ha,{id:i,children:t("settings.skillTargets")}),u.isPending&&b.jsxs("div",{className:"space-y-2",children:[b.jsx(wr,{className:"h-12 w-full"}),b.jsx(wr,{className:"h-12 w-full"})]}),u.isError&&b.jsx(ht,{type:"button",variant:"outline",disabled:u.isFetching,onClick:()=>{u.refetch()},children:t("common.retry")}),u.data&&b.jsx("div",{role:"group","aria-labelledby":i,"aria-required":"true",className:"flex flex-col gap-2",children:u.data.targets.map(({target:d,destination:f})=>b.jsxs(BM,{className:"flex items-start gap-3 rounded-lg border p-3",children:[b.jsx(w9,{checked:s.includes(d),disabled:c.isPending,onCheckedChange:g=>{o(y=>g?[...y,d]:y.filter(p=>p!==d))}}),b.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[b.jsx("span",{children:d==="agents"?".agents":".claude"}),b.jsx("span",{className:`
182
- font-mono text-xs font-normal break-all
183
- text-muted-foreground
184
- `,children:f})]})]},d))})]}),b.jsxs(qa,{children:[b.jsx(ht,{type:"button",variant:"ghost",disabled:c.isPending,onClick:e,children:t("common.cancel")}),b.jsxs(ht,{type:"submit",disabled:s.length===0||!u.isSuccess||c.isPending,children:[c.isPending?b.jsx(bs,{className:"animate-spin"}):b.jsx(Kv,{}),b.jsx("span",{children:t(c.isPending?"settings.downloadingSkill":"settings.downloadSkill")})]})]})]}),b.jsxs(pg,{disabled:c.isPending,render:b.jsx(ht,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[b.jsx(Va,{}),b.jsx("span",{className:"sr-only",children:t("a11y.close")})]})]})})}function R9({disabled:e=!1}){const{t}=Ct(),[i,s]=v.useState(!1);return b.jsxs($a,{label:b.jsxs("span",{className:"flex items-center gap-1",children:[t("settings.downloadSkill"),b.jsxs(Vh,{children:[b.jsx(Kh,{render:b.jsx(ht,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground","aria-label":t("settings.aboutFoundrySkill")}),children:b.jsx(VP,{})}),b.jsx(qh,{children:t("settings.foundrySkillHint")})]})]}),children:[b.jsxs(ht,{type:"button",variant:"outline",disabled:e,onClick:()=>s(!0),children:[b.jsx(Kv,{}),t("settings.downloadSkill")]}),i&&b.jsx(E9,{onClose:()=>s(!1)})]})}function C9({className:e,...t}){return b.jsx("div",{"data-slot":"input-group",role:"group",className:Ye("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 T9=dd("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 O9({className:e,align:t="inline-start",...i}){return b.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:Ye(T9({align:t}),e),onClick:s=>{s.target.closest("button")||s.currentTarget.parentElement?.querySelector("input")?.focus()},...i})}const A9=dd("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 M9({className:e,type:t="button",variant:i="ghost",size:s="xs",...o}){return b.jsx(ht,{type:t,"data-size":s,variant:i,className:Ye(A9({size:s}),e),...o})}function k9({className:e,...t}){return b.jsx(Jp,{"data-slot":"input-group-control",className:Ye("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 sv({id:e,disabled:t,...i}){const{t:s}=Ct(),o=v.useId(),u=e??o,[c,d]=v.useState(!1),f=s(c?"a11y.hidePassword":"a11y.showPassword");return b.jsxs(C9,{"data-disabled":t,children:[b.jsx(k9,{...i,id:u,type:c?"text":"password",disabled:t}),b.jsx(O9,{align:"inline-end",children:b.jsx(M9,{type:"button",size:"icon-xs","aria-label":f,"aria-controls":u,title:f,disabled:t,onClick:()=>d(g=>!g),children:c?b.jsx(qP,{}):b.jsx(YP,{})})})]})}function N9(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 D9(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";N9(await t.blob(),s)}function j9({onClose:e}){const{t}=Ct(),i=v.useId(),s=v.useId(),[o,u]=v.useState(""),[c,d]=v.useState(""),f=Ar({mutationFn:D9,onSuccess:()=>{ln.success(t("dataExport.exported")),e()},onError:()=>{ln.error(t("dataExport.error"))}});return b.jsx(Qs,{open:!0,onOpenChange:g=>{!g&&!f.isPending&&e()},children:b.jsxs(Xs,{showCloseButton:!1,children:[b.jsxs("form",{className:"flex flex-col gap-4","aria-busy":f.isPending,onSubmit:g=>{if(g.preventDefault(),!(!o||!c||f.isPending)){if(o!==c){ln.error(t("dataExport.passphraseMismatch"));return}f.mutate({passphrase:o})}},children:[b.jsxs(Zs,{children:[b.jsx(Ws,{children:t("dataExport.title")}),b.jsx(Ya,{children:t("dataExport.description")})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Ha,{htmlFor:i,children:t("dataExport.passphrase")}),b.jsx(sv,{id:i,autoComplete:"new-password",required:!0,value:o,disabled:f.isPending,onChange:g=>u(g.target.value)})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Ha,{htmlFor:s,children:t("dataExport.confirmPassphrase")}),b.jsx(sv,{id:s,autoComplete:"new-password",required:!0,value:c,disabled:f.isPending,"aria-invalid":c.length>0&&o!==c,onChange:g=>d(g.target.value)})]}),b.jsxs("p",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[b.jsx(eL,{className:"size-4 shrink-0"}),b.jsx("span",{children:t("dataExport.passphraseHint")})]}),b.jsxs(qa,{children:[b.jsx(ht,{type:"button",variant:"ghost",disabled:f.isPending,onClick:e,children:t("common.cancel")}),b.jsxs(ht,{type:"submit",disabled:!o||!c||f.isPending,children:[f.isPending?b.jsx(bs,{className:"animate-spin"}):b.jsx(mT,{}),b.jsx("span",{children:t(f.isPending?"dataExport.exporting":"dataExport.action")})]})]})]}),b.jsxs(pg,{disabled:f.isPending,render:b.jsx(ht,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[b.jsx(Va,{}),b.jsx("span",{className:"sr-only",children:t("a11y.close")})]})]})})}function I9({disabled:e=!1}){const{t}=Ct(),[i,s]=v.useState(!1);return b.jsxs($a,{label:t("settings.export"),children:[b.jsxs(ht,{type:"button",variant:"outline",disabled:e,onClick:()=>s(!0),children:[b.jsx(mT,{}),t("settings.export")]}),i&&b.jsx(j9,{onClose:()=>s(!1)})]})}class sk extends Error{constructor(t){super(t),this.code=t}code}async function P9(e,t){const i=await fetch("/api/data-import",{method:"POST",headers:{"content-type":"application/octet-stream","x-foundry-passphrase":encodeURIComponent(t)},body:e});await L9(i)}async function L9(e){if(e.ok)return;let t="IMPORT_FAILED";try{const s=(await e.json()).error?.code;(s==="INVALID_BACKUP"||s==="INVALID_PASSPHRASE")&&(t=s)}catch{}throw new sk(t)}function z9({file:e,onClose:t}){const{t:i}=Ct(),s=v.useId(),[o,u]=v.useState(""),c=Ar({mutationFn:()=>P9(e,o),onSuccess:()=>{location.replace(`${location.pathname}${location.search}`)},onError:g=>ln.error(i(_9(g)))}),d=c.isPending||c.isSuccess,f=()=>{d||t()};return b.jsx(Qs,{open:!0,onOpenChange:g=>{g||f()},children:b.jsxs(Xs,{showCloseButton:!1,children:[b.jsxs("form",{className:"flex flex-col gap-4","aria-busy":d,onSubmit:g=>{g.preventDefault(),!d&&o&&c.mutate()},children:[b.jsxs(Zs,{children:[b.jsx(Ws,{children:i("dataImport.title")}),b.jsx(Ya,{className:"break-all",children:e.name})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsx(Ha,{htmlFor:s,children:i("dataImport.passphrase")}),b.jsx(sv,{id:s,autoComplete:"current-password",required:!0,value:o,disabled:d,onChange:g=>u(g.target.value)})]}),b.jsx("p",{className:"text-xs text-muted-foreground",children:i("dataImport.replaceWarning")}),b.jsxs(qa,{children:[b.jsx(ht,{type:"button",variant:"ghost",disabled:d,onClick:f,children:i("common.cancel")}),b.jsxs(ht,{type:"submit",variant:"destructive",disabled:d||!o,children:[d?b.jsx(bs,{className:"animate-spin"}):b.jsx(pT,{}),b.jsx("span",{children:i("dataImport.replaceAction")})]})]})]}),b.jsxs(ht,{type:"button",disabled:d,onClick:f,variant:"ghost",size:"icon",className:"absolute top-2 right-2",children:[b.jsx(Va,{}),b.jsx("span",{className:"sr-only",children:i("a11y.close")})]})]})})}function _9(e){if(e instanceof sk)switch(e.code){case"INVALID_BACKUP":return"dataImport.invalidBackup";case"INVALID_PASSPHRASE":return"dataImport.invalidPassphrase"}return"dataImport.error"}function U9({disabled:e=!1}){const{t}=Ct(),i=v.useRef(null),[s,o]=v.useState(null);return b.jsxs($a,{label:t("settings.import"),children:[b.jsx("input",{ref:i,type:"file",accept:".foundry-backup,application/octet-stream",hidden:!0,onChange:u=>{o(u.target.files?.[0]??null),u.target.value=""}}),b.jsxs(ht,{type:"button",variant:"outline",disabled:e,onClick:()=>i.current?.click(),children:[b.jsx(pT,{}),t("settings.import")]}),s&&b.jsx(z9,{file:s,onClose:()=>o(null)})]})}const H9="data-checked",F9="data-unchecked",av={checked(e){return e?{[H9]:""}:{[F9]:""}},...ys,...du},ak=v.createContext(void 0);function B9(){return v.useContext(ak)}const ok=v.createContext(void 0);function V9(){const e=v.useContext(ok);if(e===void 0)throw new Error(bn(52));return e}const K9=v.forwardRef(function(t,i){const{render:s,className:o,disabled:u=!1,readOnly:c=!1,required:d=!1,"aria-labelledby":f,value:g,inputRef:y,nativeButton:p=!1,id:x,style:S,...w}=t,C=B9(),{disabled:E,readOnly:R,required:O,form:A,checkedValue:M,touched:N=!1,validation:j,name:D,setCheckedValue:k=En,setTouched:_=En,registerInputRef:L=En}=C??{},{setTouched:q,setFilled:X,state:B,disabled:H}=$s(),U=DA(),{labelId:z,getDescriptionProps:Q}=Bo(),$=H||U.disabled||E||u,K=R||c,Y=O||d,ee=A,G=C?M===g:g==="",oe=v.useRef(null),I=hd($,oe),V=v.useRef(null),J=j?.registerInput,re=v.useCallback(Ze=>J?.(Ze,{controlRef:oe,value:void 0}),[J]),Ee=Wr(y,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=dr(),me=fu({id:x}),ge=p?void 0:me,ce=Rb(f,z,V,!p,ge,w["aria-label"]),Te={role:"radio","aria-checked":G,"aria-labelledby":ce,[Fb]:G?"":void 0,id:p?me:le,onKeyDown(Ze){Ze.key==="Enter"&&Ze.preventDefault()},onClick(Ze){if(Ze.defaultPrevented||$||K)return;Ze.preventDefault();const at=V.current;at&&Mo(at,Ze)},onFocus(Ze){I(!0),!(Ze.defaultPrevented||$||K||!N)&&(V.current?.click(),_(!1))},onBlur(){C||I(!1)}},{getButtonProps:ve,buttonRef:Pe}=Li({disabled:$,native:p,composite:!1}),Ae={type:"radio",ref:Ee,form:ee,id:ge,name:D,tabIndex:-1,style:D?yp:Jc,"aria-hidden":!0,...g!==void 0?{value:Gh(g)}:Qt,disabled:$,checked:G,required:Y,readOnly:K,onChange(Ze){if(Ze.nativeEvent.defaultPrevented||$||K||g===void 0)return;const at=ut(kr,Ze.nativeEvent);k(g,at),!at.isCanceled&&q(!0)},onClick(Ze){Ze.stopPropagation()},onFocus(){oe.current?.focus()}},Le=v.useMemo(()=>({...B,required:Y,disabled:$,readOnly:K,checked:G}),[B,$,K,G,Y]),Be=Le,Oe=C!==void 0,Ue=[i,oe,Pe],be=[Te,w,ve,Q,j?Ze=>j.getValidationProps($,Ze):Qt],He=At("span",t,{enabled:!Oe,state:Le,ref:Ue,props:be,stateAttributesMapping:av});return b.jsxs(ok.Provider,{value:Be,children:[Oe?b.jsx(Sb,{tag:"span",render:s,className:o,style:S,state:Le,refs:Ue,props:be,stateAttributesMapping:av}):He,b.jsx("input",{...Ae,suppressHydrationWarning:!0})]})}),q9=v.forwardRef(function(t,i){const{render:s,className:o,style:u,keepMounted:c=!1,...d}=t,f=V9(),g=f.checked,{mounted:y,transitionStatus:p,setMounted:x}=Po(g),S={...f,transitionStatus:p},w=v.useRef(null),C=c||y,E=At("span",t,{ref:[i,w],state:S,props:d,stateAttributesMapping:av});return Ii({batch:!0,enabled:!g,open:g,ref:w,onComplete(){g||x(!1)}}),C?E:null}),Y9=[oA],G9=v.forwardRef(function(t,i){const{render:s,className:o,disabled:u,readOnly:c,required:d,onValueChange:f,value:g,defaultValue:y,form:p,name:x,inputRef:S,id:w,style:C,...E}=t,{setTouched:R,setFocused:O,validationMode:A,name:M,disabled:N,state:j,validation:D,setDirty:k,setFilled:_,validityData:L}=$s(),{labelId:q}=Bo(),{clearErrors:X,elementRef:B}=fd(),H=gU(!0),U=N||u,z=M??x,Q=dr(w),[$,K]=qs({controlled:g,default:y,name:"RadioGroup",state:"value"}),[Y,ee]=v.useState(!1),G=Fe((Ae,Le)=>{f?.(Ae,Le),!Le.isCanceled&&K(Ae)}),oe=D.getInputControl,I=v.useMemo(()=>({get current(){return oe()}}),[oe]),V=v.useRef(null),J=v.useRef(null),re=Wr(V,S),Ee=v.useRef(re),le=Fe(Ae=>{V.current===Ae&&Ee.current===re||(Ee.current=re,re?.(Ae))});_e(()=>{le(V.current)},[re,le]);const me=Fe(Ae=>{if(Ae){if(!Ae.disabled){J.current||(J.current=Ae);const Le=V.current;(Ae.checked||Le==null||Le.disabled)&&le(Ae)}return()=>{J.current===Ae&&(J.current=null),V.current===Ae&&le(null)}}}),ge=Fe(()=>{const Ae=B.current;if(!Ae)return $??null;for(const Le of D.registeredInputs.keys())if(Le.checked&&xU(Le,Ae))return $??null;return null});pd(I,Q,$??null,ge,!U,x),uu($,()=>{X(z),k($!==L.initialValue),_($!=null),D.change($);const Ae=J.current;$==null&&Ae&&!Ae.disabled&&le(Ae)});const ce=q??H?.legendId,Te={...j,disabled:U??!1,required:d??!1,readOnly:c??!1},ve=v.useMemo(()=>({checkedValue:$,disabled:U,form:p,validation:D,name:z,readOnly:c,registerInputRef:me,required:d,setCheckedValue:G,setTouched:ee,touched:Y}),[$,U,p,D,z,c,me,d,G,ee,Y]),Pe={id:w,role:"radiogroup","aria-required":d||void 0,"aria-disabled":U||void 0,"aria-readonly":c||void 0,"aria-labelledby":ce,onBlur(Ae){it(Ae.currentTarget,Ae.relatedTarget)||(ee(!1),R(!0),O(!1),A==="onBlur"&&D.commit($))},onKeyDownCapture(Ae){Ae.key.startsWith("Arrow")&&ee(!0)}};return b.jsx(ak.Provider,{value:ve,children:b.jsx(XM,{render:s,className:o,style:C,state:Te,props:[Pe,E,Ae=>D.getValidationProps(U??!1,Ae)],refs:[i],stateAttributesMapping:du,enableHomeAndEndKeys:!1,modifierKeys:Y9})})});function $9({className:e,...t}){return b.jsx(G9,{"data-slot":"radio-group",className:Ye("grid w-full gap-3",e),...t})}function Q9({className:e,...t}){return b.jsx(K9,{"data-slot":"radio-group-item",className:Ye("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:b.jsx(q9,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:b.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 X9=[{value:"system",labelKey:"common.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function Z9({value:e,onValueChange:t,disabled:i=!1}){const{t:s}=Ct();return b.jsx($a,{label:s("settings.colorTheme"),children:b.jsx($9,{"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:X9.map(o=>b.jsxs("label",{className:Ye("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:[b.jsx(Q9,{value:o.value,disabled:i}),b.jsx("span",{children:s(o.labelKey)})]},o.value))})})}function W9(e){const t=v.useRef(!0);t.current&&(t.current=!1,e())}const lk=v.createContext(void 0),uk=v.createContext(void 0);function xs(){const e=v.useContext(lk);if(e===void 0)throw new Error(bn(60));return e}function ck(){const e=v.useContext(uk);if(e===void 0)throw new Error(bn(61));return e}function J9(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 dk=(e,t)=>Object.is(e,t);function Io(e,t,i){return e==null||t==null?Object.is(e,t):i(e,t)}function eV(e,t,i){return Array.isArray(e)&&Array.isArray(t)?!J9(e,t,(s,o)=>Io(s,o,i)):e!==t}function ov(e,t,i){return e?e.some(s=>s===void 0?!1:Io(t,s,i)):!1}function Ah(e,t,i){return e?e.findIndex(s=>s===void 0?!1:Io(s,t,i)):-1}function tV(e,t){if(t!==dk)return s=>ov(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 fk(e,t,i,s){const o=s&&Array.isArray(t)?e.findIndex(tV(t,i)):Ah(e,t,i);return o===-1?null:o}function nV(e,t,i,s,o,u){return ov(s,t,o)?u!=null&&e>u&&ov(s,i[u],o)?u:e:e===u?fk(i,s,o,!0):u}function rV(e,t,i){return e.filter(s=>!Io(t,s,i))}const iV={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:Pl(t,s)!==""},hasNullItemLabel:(e,t)=>t?tU(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=>Io(t,o,i)):Io(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 wc(e,t=Number.MIN_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,i))}const Yi=1;function Vb(e,t){return Math.max(0,e-t)}function ap(e,t){if(t<=0)return 0;const i=wc(e,0,t),s=i,o=t-i,u=s<=Yi,c=o<=Yi;return u&&c?s<=o?0:t:u?0:c?t:i}function sV(e){const{id:t,value:i,defaultValue:s=null,onValueChange:o,open:u,defaultOpen:c=!1,onOpenChange:d,name:f,form:g,autoComplete:y,disabled:p=!1,readOnly:x=!1,required:S=!1,modal:w=!0,actionsRef:C,inputRef:E,onOpenChangeComplete:R,items:O,multiple:A=!1,itemToStringLabel:M,itemToStringValue:N,isItemEqualToValue:j=dk,highlightItemOnHover:D=!0,children:k}=e,{clearErrors:_}=fd(),{setDirty:L,setTouched:q,setFocused:X,validityData:B,setFilled:H,name:U,disabled:z,validation:Q,validationMode:$}=$s(),K=fu({id:t}),Y=z||p,ee=U??f,[G,oe]=qs({controlled:i,default:A?s??Gi:s,name:"Select",state:"value"}),[I,V]=qs({controlled:u,default:c,name:"Select",state:"open"}),J=v.useRef([]),re=v.useRef([]),Ee=v.useRef(null),le=v.useRef(null),me=v.useRef(0),ge=v.useRef(null),ce=v.useRef([]),Te=v.useRef(!1),ve=v.useRef(null),Pe=v.useRef(null),Ae=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Le=v.useRef(!1),Be=v.useRef(G),{openMethod:Oe,triggerProps:Ue}=bA(I),be=er(()=>new su({id:K,labelId:void 0,modal:w,multiple:A,disabled:Y,readOnly:x,required:S,highlightItemOnHover:D,itemToStringLabel:M,itemToStringValue:N,isItemEqualToValue:j,value:G,open:I,mounted:I,transitionStatus:void 0,items:O,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Qt,triggerProps:Qt,itemRoot:{props:Qt,multiple:A,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:J,popupRef:Ee,scrollHandlerRef:le,scrollArrowsMountedCountRef:me,valueRef:ge,valuesRef:ce,labelsRef:re,typingRef:Te,selectionRef:Ae,firstItemTextRef:ve,selectedItemTextRef:Pe,alignItemWithTriggerActiveRef:Le,initialValueRef:Be},iV)).current,[He,Ze]=v.useState(!1),{mounted:at,transitionStatus:de,forceUnmount:we}=EC({open:I,ref:Ee,preventUnmountOnClose:He,setPreventUnmountOnClose:Ze,onUnmount(){be.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),R?.(!1)}}),Ge=be.useState("activeIndex"),ke=be.useState("selectedIndex"),De=be.useState("triggerElement"),vt=be.useState("positionerElement"),ct=x3(Oe),pt=Oe??ct,kt=v.useMemo(()=>A?"":Pl(G,N),[A,G,N]),jt=v.useMemo(()=>A&&Array.isArray(G)?G.map(F=>Pl(F,N)):Pl(G,N),[A,G,N]),en=Ln(De),sn=Fe(()=>jt);pd(en,K,G,sn,!Y,f);const tn=A?Array.isArray(G)&&G.length>0:G!=null&&kt!=="";_e(()=>{H(tn)},[tn,H]),_e(function(){const W=fk(ce.current,G,j,A);W===null&&(Pe.current=null),!I&&be.set("selectedIndex",W)},[A,I,G,j,be]),uu(G,()=>{_(ee),L(eV(G,B.initialValue,j)),Q.change(G)});const Je=Fe((F,W)=>{const ne=W,ye=Tp(ne);d?.(F,ne),!W.isCanceled&&(F||Ze(ye()),V(F),!F&&(W.reason===Pa||W.reason===mp)&&(q(!0),X(!1),$==="onBlur"&&Q.commit(G)))});v.useImperativeHandle(C,()=>({unmount:we,close:()=>{be.state.open&&Je(!1,ut(Wc))}}),[we,Je,be]);const St=Fe((F,W)=>{o?.(F,W),!W.isCanceled&&oe(F)}),Xt=Fe(F=>{const W=Vb(F.scrollHeight,F.clientHeight),ne=ap(F.scrollTop,W),ye=ne>0,xe=ne<W;be.set("scrollUpArrowVisible",ye),be.set("scrollDownArrowVisible",xe)}),ft=nI({open:I,onOpenChange:Je,elements:{reference:De,floating:vt}}),bt=Iv(ft,{enabled:!Y,event:"mousedown"}),mt=ed(ft),Ut=jC(ft,{enabled:!Y,listRef:J,activeIndex:Ge,selectedIndex:ke,disabledIndices:Gi,onNavigate(F){F===null&&!I||be.set("activeIndex",F)},focusItemOnHover:D}),cn=IC(ft,{enabled:!Y&&(I||!x&&!A),listRef:re,activeIndex:Ge,selectedIndex:ke,disabledIndices:F=>EA(J.current[F]),onMatch(F){I?be.set("activeIndex",F):St(ce.current[F],ut(kr))},onTyping(F){Te.current=F}}),je=v.useMemo(()=>Mr(cn.reference,Ut.reference,mt.reference,bt.reference,Ue),[bt.reference,cn.reference,Ut.reference,mt.reference,Ue]),st=v.useMemo(()=>Mr(td,cn.floating,Ut.floating,mt.floating),[cn.floating,Ut.floating,mt.floating]),Ie=Ut.item??Qt,ze=v.useMemo(()=>({props:Ie,multiple:A,disabled:Y,readOnly:x,isItemEqualToValue:j}),[Ie,A,Y,x,j]);be.useContextCallback("setValue",St),be.useContextCallback("setOpen",Je),be.useContextCallback("handleScrollArrowVisibility",Xt),be.useContextCallback("onOpenChangeComplete",R),W9(()=>{be.update({popupProps:st,triggerProps:je,itemRoot:ze})}),be.useSyncedValues({id:K,modal:w,multiple:A,disabled:Y,readOnly:x,required:S,highlightItemOnHover:D,value:G,open:I,mounted:at,transitionStatus:de,popupProps:st,triggerProps:je,itemRoot:ze,items:O,itemToStringLabel:M,itemToStringValue:N,isItemEqualToValue:j,openMethod:pt});const $e=Wr(E,Q.inputRef),et=A?void 0:ee,Tt=v.useMemo(()=>!A||!Array.isArray(G)||!ee?null:G.map(F=>{const W=Pl(F,N);return b.jsx("input",{type:"hidden",form:g,name:ee,value:W,disabled:Y},W)}),[A,G,g,ee,N,Y]);return b.jsxs(lk.Provider,{value:be,children:[b.jsx(uk.Provider,{value:ft,children:k}),b.jsx("input",{...Q.getValidationProps(Y,{onFocus(){be.state.triggerElement?.focus({focusVisible:!0})},onChange(F){if(F.nativeEvent.defaultPrevented||Y||x)return;const W=F.currentTarget.value,ne=ut(kr,F.nativeEvent);function ye(){if(A)return;const xe=W.toLowerCase();let Ke=ce.current.findIndex(Xe=>Pl(Xe,N).toLowerCase()===xe||CA(Xe,M).toLowerCase()===xe);Ke===-1&&(Ke=ce.current.findIndex((Xe,Qe)=>{const ot=re.current[Qe];return ot!=null&&ot.toLowerCase()===xe}));const Ve=ce.current[Ke];Ve!=null&&St(Ve,ne)}be.set("forceMount",!0),queueMicrotask(ye)}}),id:K&&et==null?`${K}-hidden-input`:void 0,form:g,name:et,autoComplete:y,value:kt,disabled:Y,required:S&&!(A&&tn),readOnly:x,ref:$e,style:ee?yp:Jc,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Tt]})}function aV(e,t){return e??t}const oV="data-popup-side",lV=400,uV={...kh,...du,popupSide:e=>e?{[oV]:e}:null,value:()=>null},cV=v.forwardRef(function(t,i){const{render:s,className:o,id:u,disabled:c=!1,nativeButton:d=!0,style:f,...g}=t,{setTouched:y,validationMode:p,validation:x,state:S,disabled:w}=$s(),{labelId:C}=Bo(),E=xs(),R=E.useState("readOnly"),O=E.useState("required"),A=E.useState("disabled"),M=w||A||c,N=E.useState("open"),j=E.useState("mounted"),D=E.useState("value"),k=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=u??X,Q=aV(C,B);fu({id:u});const $=Ln(_),K=v.useRef(null),Y=hd(M,K),{getButtonProps:ee,buttonRef:G}=Li({disabled:M,native:d}),oe=E.useStateSetter("triggerElement"),I=Un(),V=Un(),J=Un();v.useEffect(()=>{if(N)return J.start(lV,()=>{E.context.selectionRef.current.allowUnselectedMouseUp=!0,E.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{J.clear()};E.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},V.clear()},[N,E,V,J]);const re=Mr(k,{id:z,role:"combobox","aria-expanded":N,"aria-haspopup":"listbox","aria-controls":N?L?.id??Dh(_)?.id:void 0,"aria-labelledby":Q,"aria-readonly":R||void 0,"aria-required":O||void 0,tabIndex:M?-1:0,onFocus(me){Y(!0),N&&E.context.alignItemWithTriggerActiveRef.current&&E.context.setOpen(!1,ut(kr,me.nativeEvent)),I.start(0,()=>{E.set("forceMount",!0)})},onBlur(me){it(_,me.relatedTarget)||(y(!0),Y(!1),p==="onBlur"&&x.commit(D))},onMouseDown(me){if(N)return;const ge=$t(me.currentTarget);function ce(Te){if(!K.current)return;const ve=Te.target;it(K.current,ve)||it($.current,ve)||wA(Te,K.current)||E.context.setOpen(!1,ut(Sv,Te))}V.start(0,()=>{ge.addEventListener("mouseup",ce,{once:!0})})}},g,ee),Ee=x.getValidationProps(M,re);Ee.role="combobox";const le={...S,open:N,disabled:M,value:D,readOnly:R,popupSide:U,placeholder:!H};return At("button",t,{ref:[i,K,G,oe],state:le,stateAttributesMapping:uV,props:Ee})}),dV={value:()=>null},fV=v.forwardRef(function(t,i){const{className:s,render:o,children:u,placeholder:c,style:d,...f}=t,g=xs(),y=g.useState("value"),p=g.useState("items"),x=g.useState("itemToStringLabel"),S=g.useState("hasSelectedValue"),w=!S&&c!=null&&u==null,C=g.useState("hasNullItemLabel",w),E={value:y,placeholder:!S};let R=null;return typeof u=="function"?R=u(y):u!=null?R=u:w&&!C?R=c:Array.isArray(y)?R=nU(y,p,x):R=TA(y,p,x),At("span",t,{state:E,ref:[i,g.context.valueRef],props:[{children:R},f],stateAttributesMapping:dV})}),hV=v.forwardRef(function(t,i){const{render:s,className:o,style:u,...c}=t,g={open:xs().useState("open")};return At("span",t,{state:g,ref:i,props:[{"aria-hidden":!0,children:"▼"},c],stateAttributesMapping:xv})}),pV=v.forwardRef(function(t,i){const s=xs(),o=s.useState("mounted"),u=s.useState("forceMount");return o||u?b.jsx(Sp,{ref:i,...t}):null}),hk=v.createContext(void 0);function Kb(){const e=v.useContext(hk);if(!e)throw new Error(bn(59));return e}function op(e,t){e&&Object.assign(e.style,t)}const pk={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},gV={position:"fixed"},mV=v.forwardRef(function(t,i){const{anchor:s,className:o,render:u,positionMethod:c,side:d,align:f,sideOffset:g,alignOffset:y,collisionBoundary:p="clipping-ancestors",collisionPadding:x,arrowPadding:S,sticky:w,disableAnchorTracking:C,alignItemWithTrigger:E=!0,collisionAvoidance:R=hC,style:O,...A}=t,M=xs(),N=ck(),j=M.useState("open"),D=M.useState("mounted"),k=M.useState("modal"),_=M.useState("value"),L=M.useState("openMethod"),q=M.useState("positionerElement"),X=M.useState("triggerElement"),B=M.useState("isItemEqualToValue"),H=M.useState("transitionStatus"),U=v.useRef(null),z=v.useRef(null),[Q,$]=v.useState(E),K=D&&Q&&L!=="touch";!D&&Q!==E&&$(E),v.useImperativeHandle(M.context.alignItemWithTriggerActiveRef,()=>K),xb((K||k)&&j,L==="touch",q,X);const Y=Pp({anchor:s,floatingRootContext:N,positionMethod:c,mounted:D,side:d,sideOffset:g,align:f,alignOffset:y,arrowPadding:S,collisionBoundary:p,collisionPadding:x,sticky:w,disableAnchorTracking:C??K,collisionAvoidance:R,keepMounted:!0}),ee=K?"none":Y.side,G=K?gV:Y.positionerStyles,oe={open:j,side:ee,align:Y.align,anchorHidden:Y.anchorHidden};_e(()=>{M.set("popupSide",Y.side)},[M,Y.side]);const I=M.useStateSetter("positionerElement"),V=Lp(t,oe,{styles:G,transitionStatus:H,props:A,refs:[i,I],hidden:!D,inert:!j}),J=v.useRef(0),re=Fe(le=>{if(M.context.valuesRef.current.length===0)return;const me=J.current;J.current=le.size;const ge=ut(kr);if(me!==0&&!M.state.multiple&&_!==null&&Ah(M.context.valuesRef.current,_,B)===-1){const Te=M.context.initialValueRef.current,Pe=Te!=null&&Ah(M.context.valuesRef.current,Te,B)!==-1?Te:null;M.context.setValue(Pe,ge),Pe===null&&(M.set("selectedIndex",null),M.context.selectedItemTextRef.current=null)}if(me!==0&&M.state.multiple&&Array.isArray(_)){const ce=_.filter(Te=>Ah(M.context.valuesRef.current,Te,B)!==-1);ce.length!==_.length&&(M.context.setValue(ce,ge),ce.length===0&&(M.set("selectedIndex",null),M.context.selectedItemTextRef.current=null))}if(j&&K){M.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ce={height:""};op(q,ce),op(M.context.popupRef.current,ce)}}),Ee=v.useMemo(()=>({...Y,side:ee,alignItemWithTriggerActive:K,setControlledAlignItemWithTrigger:$,scrollUpArrowRef:U,scrollDownArrowRef:z}),[Y,ee,K,$]);return b.jsx(bb,{elementsRef:M.context.listRef,labelsRef:M.context.labelsRef,onMapChange:re,children:b.jsxs(hk.Provider,{value:Ee,children:[D&&k&&b.jsx(Zp,{inert:zp(!j),cutout:X}),V]})})}),dh="base-ui-disable-scrollbar",lv={className:dh,getElement(e){return b.jsx("style",{nonce:e,href:dh,precedence:"base-ui:low",children:`.${dh}{scrollbar-width:none}.${dh}::-webkit-scrollbar{display:none}`})}},yV=v.createContext(void 0),vV={disableStyleElements:!1};function bV(){return v.useContext(yV)??vV}const CR="--transform-origin",xV={...Qc,...ys},SV=v.forwardRef(function(t,i){const{render:s,className:o,style:u,finalFocus:c,...d}=t,f=xs(),g=f.useState("multiple"),y=f.useState("readOnly"),p=f.useState("highlightItemOnHover"),x=ck(),{side:S,align:w,alignItemWithTriggerActive:C,isPositioned:E,setControlledAlignItemWithTrigger:R}=Kb(),O=Xp()!=null,A=Ip(),{nonce:M,disableStyleElements:N}=bV(),j=f.useState("id"),D=f.useState("open"),k=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=v.useRef(!1),z=v.useRef(!1),Q=v.useRef({}),$=Zl(),K=Fe(oe=>{if(!B||!f.context.popupRef.current||!z.current)return;const I=B.style.top==="0px",V=B.style.bottom==="0px";if(U.current||!C||!I&&!V){f.context.handleScrollArrowVisibility(oe);return}const J=OR(B),re=Ec(B.getBoundingClientRect().height,"y",J),Ee=$t(B),le=Rn(B),me=le.getComputedStyle(B),ge=parseFloat(me.marginTop),ce=parseFloat(me.marginBottom),Te=TR(le.getComputedStyle(f.context.popupRef.current)),ve=Math.min(Ee.documentElement.clientHeight-ge-ce,Te),Pe=oe.scrollTop,Ae=fh(oe);let Le=null;const Be=He=>{B.style.height=`${He}px`},Oe=I?Ae-Pe:Pe,Ue=Math.min(re+Oe,ve);if(Oe<=Yi){const He=wc(Oe,0,ve-re);He>0&&Be(re+He),oe.scrollTop=I?Ae:0,ve-(re+He)<=Yi&&(U.current=!0),f.context.handleScrollArrowVisibility(oe);return}if(ve-Ue>Yi)Le=I?1/0:0;else if(V&&Pe<Ae){const He=re+Oe-ve;Le=Pe-(Oe-He)}const be=Math.ceil(Ue);if(be!==0&&Be(be),Le!=null){const He=wc(Le,0,fh(oe));Math.abs(oe.scrollTop-He)>Yi&&(oe.scrollTop=He)}be>=ve-Yi&&(U.current=!0),f.context.handleScrollArrowVisibility(oe)});v.useImperativeHandle(f.context.scrollHandlerRef,()=>K,[K]),Ii({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||C||(z.current=!1,U.current=!1,op(B,Q.current))},[D,C,B]),_e(()=>{const oe=f.context.popupRef.current;if(!D||!X||!B||!oe||C&&!E||f.state.transitionStatus==="ending")return;if(z.current=!0,oe.style.removeProperty(CR),!C){$.request(()=>f.context.handleScrollArrowVisibility(H||oe));return}const I=wV(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 J=f.context.valueRef.current,re=Rn(B),Ee=re.getComputedStyle(B),le=re.getComputedStyle(oe),me=$t(X),ge=OR(X),ce=hh(X.getBoundingClientRect(),ge),Te=hh(B.getBoundingClientRect(),ge),ve=ce.height,Pe=H||oe,Ae=Pe.scrollHeight,Le=parseFloat(le.borderBottomWidth),Be=parseFloat(Ee.marginTop)||10,Oe=parseFloat(Ee.marginBottom)||10,Ue=parseFloat(Ee.minHeight)||100,be=TR(le),He=5,Ze=5,at=20,de=me.documentElement.clientHeight-Be-Oe,we=me.documentElement.clientWidth,Ge=de-ce.bottom+ve;let ke,De=A==="rtl"?ce.right-Te.width:ce.left,vt=0;if(V&&J){const ft=hh(J.getBoundingClientRect(),ge);ke=hh(V.getBoundingClientRect(),ge),De=Te.left+(A==="rtl"?ft.right-ke.right:ft.left-ke.left);const bt=ft.top-ce.top+ft.height/2;vt=ke.top-Te.top+ke.height/2-bt}const ct=Ge+vt+Oe+Le;let pt=Math.min(de,ct);const kt=de-Be-Oe,jt=ct-pt,en=we-Ze;B.style.left=`${wc(De,He,en-Te.width)}px`,B.style.height=`${pt}px`,B.style.maxHeight="none",B.style.marginTop=`${Be}px`,B.style.marginBottom=`${Oe}px`,oe.style.height="100%";const sn=fh(Pe),tn=jt>=sn-Yi;tn&&(pt=Math.min(de,Te.height)-(jt-sn));const Je=ce.top<at||ce.bottom>de-at||Math.ceil(pt)+Yi<Math.min(Ae,Ue),St=(re.visualViewport?.scale??1)!==1&&ms;if(Je||St){op(B,Q.current),R(!1);return}const Xt=Math.max(Ue,pt);if(tn){const ft=Math.max(0,de-ct);B.style.top=Te.height>=kt?"0":`${ft}px`,B.style.height=`${pt}px`,Pe.scrollTop=fh(Pe)}else B.style.bottom="0",Pe.scrollTop=jt;if(ke){const ft=Te.top,bt=Te.height,mt=ke.top+ke.height/2,Ut=wc(bt>0?(mt-ft)/bt*100:50,0,100);oe.style.setProperty(CR,`50% ${Ut}%`)}(Xt===de||pt>=be)&&(U.current=!0),f.context.handleScrollArrowVisibility(Pe),p&&f.state.selectedIndex===null&&f.state.activeIndex===null&&f.context.listRef.current[0]!=null&&f.set("activeIndex",0)}finally{I()}},[f,D,B,X,C,R,$,H,p,A,E]),v.useEffect(()=>{if(!C||!B||!D)return;const oe=Rn(B);function I(V){f.context.setOpen(!1,ut(Bj,V))}return Lt(oe,"resize",I)},[f,C,B,D]);const ee={...H?{role:"presentation"}:{role:"listbox","aria-multiselectable":g||void 0,"aria-readonly":y||void 0,id:`${j}-list`},onKeyDown(oe){O&&cd.has(oe.key)&&oe.stopPropagation()},onScroll(oe){H||K(oe.currentTarget)},...C&&{style:H?{height:"100%"}:pk},className:!H&&C?lv.className:void 0},G=At("div",t,{ref:[i,f.context.popupRef],state:Y,stateAttributesMapping:xV,props:[L,ee,rd(q),d]});return b.jsxs(v.Fragment,{children:[!N&&lv.getElement(M),b.jsx(wp,{context:x,modal:!1,disabled:!_,openInteractionType:k,returnFocus:c,restoreFocus:!0,children:G})]})});function TR(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function fh(e){return Vb(e.scrollHeight,e.clientHeight)}function OR(e){return FC.getScale(e)}function Ec(e,t,i){return e/i[t]}function hh(e,t){return Pc({x:Ec(e.x,"x",t),y:Ec(e.y,"y",t),width:Ec(e.width,"x",t),height:Ec(e.height,"y",t)})}const AR=[["transform","none"],["scale","1"],["translate","0 0"]];function wV(e){const{style:t}=e,i={};for(const[s,o]of AR)i[s]=t.getPropertyValue(s),t.setProperty(s,o,"important");return()=>{for(const[s]of AR){const o=i[s];o?t.setProperty(s,o):t.removeProperty(s)}}}const EV=v.forwardRef(function(t,i){const{render:s,className:o,style:u,...c}=t,d=xs(),f=d.useState("multiple"),g=d.useState("readOnly"),{alignItemWithTriggerActive:y}=Kb(),p=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)},...y&&{style:pk},className:p&&x!=="touch"?lv.className:void 0},C=d.useStateSetter("listElement");return At("div",t,{ref:[i,C],props:[w,c]})}),gk=v.createContext(void 0);function mk(){const e=v.useContext(gk);if(!e)throw new Error(bn(57));return e}const RV=v.memo(v.forwardRef(function(t,i){const{render:s,className:o,style:u,value:c=null,label:d,disabled:f=!1,nativeButton:g=!1,...y}=t,p=v.useRef(null),x=Qp({guess:!0,label:d,textRef:p}),S=xs(),{props:w,multiple:C,disabled:E,readOnly:R,isItemEqualToValue:O}=S.useState("itemRoot"),A=E||f,M=S.useState("isActive",x.index),N=S.useState("open"),j=S.useState("isSelected",c),D=S.useState("isSelectedByFocus",x.index),k=x.index,_=v.useRef(null);_e(()=>{const Y=S.context.valuesRef.current;return Y[k]=c,()=>{delete Y[k]}},[k,c,S]),_e(()=>{const Y=S.state.value,ee=S.state.selectedIndex;let G=ee,oe;C&&Array.isArray(Y)?(G=nV(k,c,S.context.valuesRef.current,Y,O,ee),oe=G===k,k===ee&&!oe&&(S.context.selectedItemTextRef.current=null)):(oe=Y!==void 0&&Io(c,Y,O),oe&&(G=k)),S.set("selectedIndex",G),oe&&p.current&&(S.context.selectedItemTextRef.current=p.current)},[k,C,O,S,c]);const L=v.useRef("mouse"),q=v.useRef(!1),{getButtonProps:X,buttonRef:B}=Li({disabled:A,focusableWhenDisabled:!0,native:g,composite:!0}),H={disabled:A,selected:j,highlighted:M};function U(Y){if(E||R)return;const ee=S.state.value;if(C){const G=Array.isArray(ee)?ee:[],oe=j?rV(G,c,O):[...G,c];S.context.setValue(oe,ut(Ao,Y))}else S.context.setValue(c,ut(Ao,Y)),S.context.setOpen(!1,ut(Ao,Y))}function z(){S.context.selectionRef.current.dragY=0}const Q={role:"option","aria-selected":j,tabIndex:N&&M?0:-1,onKeyDown(Y){S.set("activeIndex",k),Y.key===" "&&S.context.typingRef.current&&Y.preventDefault()},onClick(Y){const ee=L.current!=="touch",G=Y.nativeEvent.pointerType,oe=ee&&Xl(Y.nativeEvent)&&(G!==void 0||M),I=ee&&!oe&&!q.current;q.current=!1,!(A||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(),A||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)}},$=At("div",t,{ref:[B,i,x.ref,_],state:H,props:[w,Q,y,X]}),K=v.useMemo(()=>({selected:j,index:k,textRef:p,selectedByFocus:D}),[j,k,p,D]);return b.jsx(gk.Provider,{value:K,children:$})})),CV=v.memo(v.forwardRef(function(t,i){const{render:s,className:o,style:u,keepMounted:c,selected:d,...f}=t,g=v.useRef(null),{transitionStatus:y,setMounted:p}=Po(d),S=At("span",t,{ref:[i,g],state:{selected:d,transitionStatus:y},props:[{"aria-hidden":!0,children:"✔️"},f],stateAttributesMapping:ys});return Ii({batch:!0,enabled:!d,open:d,ref:g,onComplete(){d||p(!1)}}),S})),TV=v.forwardRef(function(t,i){const{selected:s}=mk();return t.keepMounted||s?b.jsx(CV,{...t,selected:s,ref:i}):null}),OV=v.memo(v.forwardRef(function(t,i){const{index:s,textRef:o,selectedByFocus:u}=mk(),c=xs(),{render:d,className:f,style:g,...y}=t,p=v.useCallback(S=>{S&&(s===0&&(c.context.firstItemTextRef.current=S),u&&(c.context.selectedItemTextRef.current=S))},[c,s,u]);return At("div",t,{ref:[p,i,o],props:y})})),yk=v.forwardRef(function(t,i){const{render:s,className:o,style:u,direction:c,keepMounted:d,...f}=t,g=c==="up",y=xs(),{side:p,scrollDownArrowRef:x,scrollUpArrowRef:S}=Kb(),w=g?"scrollUpArrowVisible":"scrollDownArrowVisible",C=y.useState(w),E=y.useState("openMethod"),R=C&&E!=="touch",O=Un(),A=g?S:x,{mounted:M,transitionStatus:N,setMounted:j}=Po(R);_e(()=>(y.context.scrollArrowsMountedCountRef.current+=1,y.set("hasScrollArrows",!0),()=>{y.context.scrollArrowsMountedCountRef.current=Math.max(0,y.context.scrollArrowsMountedCountRef.current-1),y.context.scrollArrowsMountedCountRef.current===0&&y.set("hasScrollArrows",!1)}),[y]),Ii({open:R,ref:A,onComplete(){R||j(!1)}});const _=At("div",t,{ref:[i,A],state:{direction:c,visible:R,side:p,transitionStatus:N},props:[{"aria-hidden":!0,children:g?"▲":"▼",style:{position:"absolute"},onMouseMove(q){if(q.movementX===0&&q.movementY===0||O.isStarted())return;y.set("activeIndex",null);function X(){const B=y.state.listElement??y.context.popupRef.current;if(!B)return;y.set("activeIndex",null),y.context.handleScrollArrowVisibility(B);const H=Vb(B.scrollHeight,B.clientHeight),U=ap(B.scrollTop,H),z=U===(g?0:H),Q=y.context.listRef.current;if(U!==B.scrollTop&&(B.scrollTop=U),z){O.clear();return}if(Q.length>0){const $=A.current?.offsetHeight||0;B.scrollTop=AV(Q,g,U,B.clientHeight,$,H)}O.start(40,X)}O.start(40,X)},onMouseLeave(){O.clear()}},f],stateAttributesMapping:ys});return M||d?_:null});function AV(e,t,i,s,o,u){if(t){let y=0;const p=i+o-Yi;for(let w=0;w<e.length;w+=1){const C=e[w];if(C&&C.offsetTop>=p){y=w;break}}const x=Math.max(0,y-1),S=e[x];return x<y&&S?ap(S.offsetTop-o,u):0}let c=e.length-1;const d=i+s-o+Yi;for(let y=0;y<e.length;y+=1){const p=e[y];if(p&&p.offsetTop+p.offsetHeight>d){c=Math.max(0,y-1);break}}const f=Math.min(e.length-1,c+1),g=e[f];return f>c&&g?ap(g.offsetTop+g.offsetHeight-s+o,u):u}const MV=v.forwardRef(function(t,i){return b.jsx(yk,{...t,ref:i,direction:"down"})}),kV=v.forwardRef(function(t,i){return b.jsx(yk,{...t,ref:i,direction:"up"})}),qb=sV;function Yb({className:e,...t}){return b.jsx(fV,{"data-slot":"select-value",className:Ye("flex flex-1 text-left",e),...t})}function Gb({className:e,size:t="default",children:i,...s}){return b.jsxs(cV,{"data-slot":"select-trigger","data-size":t,className:Ye("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,b.jsx(hV,{render:b.jsx(Bv,{className:"pointer-events-none size-3.5 text-muted-foreground"})})]})}function $b({className:e,children:t,side:i="bottom",sideOffset:s=4,align:o="center",alignOffset:u=0,alignItemWithTrigger:c=!0,...d}){return b.jsx(pV,{children:b.jsx(mV,{side:i,sideOffset:s,align:o,alignOffset:u,alignItemWithTrigger:c,className:"isolate z-50",children:b.jsxs(SV,{"data-slot":"select-content","data-align-trigger":c,className:Ye("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:[b.jsx(NV,{}),b.jsx(EV,{children:t}),b.jsx(DV,{})]})})})}function Qb({className:e,children:t,...i}){return b.jsxs(RV,{"data-slot":"select-item",className:Ye("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:[b.jsx(OV,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),b.jsx(TV,{render:b.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:b.jsx(Up,{className:"pointer-events-none"})})]})}function NV({className:e,...t}){return b.jsx(kV,{"data-slot":"select-scroll-up-button",className:Ye("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:b.jsx(FP,{})})}function DV({className:e,...t}){return b.jsx(MV,{"data-slot":"select-scroll-down-button",className:Ye("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:b.jsx(Bv,{})})}const vk=["en-US","zh-CN","zh-TW","ja-JP"],jV={"en-US":"English","zh-CN":"简体中文","zh-TW":"繁體中文","ja-JP":"日本語"},IV={"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.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 a folder with SKILL.md, or a .skill / .zip archive.","skills.importUrl":"Import from URL","skills.importUrlDescription":"Fetch a published skill by URL.","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. Reapply enabled agents to write the new content.","instructions.updateError":"Unable to update the instruction. Please try again.","instructions.edit":"Edit","instructions.delete":"Delete","instructions.deleted":"Instruction deleted.","instructions.deleteError":"Unable to delete the instruction. Please try again.","instructions.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 completely replaces current Foundry data with this backup. Existing data will not be merged. This cannot be undone.","dataImport.error":"Unable to import data. Please try again.","dataImport.invalidBackup":"This backup is invalid or unsupported.","dataImport.invalidPassphrase":"The passphrase is incorrect or the backup is corrupted.","nav.settings":"Settings","settings.workspace":"Workspace","settings.appearance":"Appearance","settings.appearanceAria":"Appearance settings","settings.languageRegion":"Language & Region","settings.languageRegionAria":"Language & Region settings","settings.advanced":"Advanced","settings.advancedAria":"Advanced settings","settings.export":"Export","dataExport.title":"Export data","dataExport.action":"Export","dataExport.description":"Download an encrypted backup of your Foundry data.","dataExport.passphrase":"Passphrase","dataExport.confirmPassphrase":"Confirm passphrase","dataExport.passphraseHint":"Keep this passphrase. You will need it to import the backup; it cannot be recovered.","dataExport.passphraseMismatch":"The passphrases do not match.","dataExport.exporting":"Exporting…","dataExport.exported":"Backup download started.","dataExport.error":"Unable to export data. Please try again.","common.cancel":"Cancel","settings.import":"Import","settings.configFolder":"Config Folder","settings.openFolder":"Open","settings.copyConfigFolder":"Copy config folder path","settings.configFolderCopied":"Config folder path copied","settings.errors.copyConfigFolder":"Unable to copy the config folder path.","settings.errors.openConfigFolder":"Unable to open the config folder.","settings.language":"Language","settings.timeFormat":"Time format","settings.timeZone":"Time zone","settings.colorTheme":"Color theme","settings.navigation":"Settings navigation","settings.openNavigation":"Open settings navigation","settings.errors.load":"Unable to load settings.","settings.errors.theme":"Unable to update the color theme.","settings.errors.language":"Unable to update the language.","settings.errors.timeFormat":"Unable to update the time format.","settings.errors.timeZone":"Unable to update the time zone.","common.system":"System","theme.light":"Light","theme.dark":"Dark","a11y.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"},PV={"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.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.md 的文件夹,或 .skill / .zip 压缩包。","skills.importUrl":"从 URL 导入","skills.importUrlDescription":"通过 URL 获取已发布的技能。","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":"导入会用备份完全覆盖当前 Foundry 数据,不会合并现有数据。此操作无法撤销。","dataImport.error":"无法导入数据,请重试。","dataImport.invalidBackup":"备份无效或不受支持。","dataImport.invalidPassphrase":"密码不正确或备份已损坏。","nav.settings":"设置","settings.workspace":"工作区","settings.appearance":"外观","settings.appearanceAria":"外观设置","settings.languageRegion":"语言和地区","settings.languageRegionAria":"语言和地区设置","settings.advanced":"高级","settings.advancedAria":"高级设置","settings.export":"导出","dataExport.title":"导出数据","dataExport.action":"导出","dataExport.description":"下载当前 Foundry 数据的加密备份。","dataExport.passphrase":"密码","dataExport.confirmPassphrase":"确认密码","dataExport.passphraseHint":"请保存此密码,导入备份时需要使用。密码无法找回。","dataExport.passphraseMismatch":"两次输入的密码不一致。","dataExport.exporting":"导出中…","dataExport.exported":"已开始下载数据备份。","dataExport.error":"无法导出数据,请重试。","common.cancel":"取消","settings.import":"导入","settings.configFolder":"配置文件夹","settings.openFolder":"打开","settings.copyConfigFolder":"复制配置文件夹路径","settings.configFolderCopied":"已复制配置文件夹路径","settings.errors.copyConfigFolder":"无法复制配置文件夹路径。","settings.errors.openConfigFolder":"无法打开配置文件夹。","settings.language":"语言","settings.timeFormat":"时间格式","settings.timeZone":"时区","settings.colorTheme":"颜色主题","settings.navigation":"设置导航","settings.openNavigation":"打开设置导航","settings.errors.load":"无法加载设置。","settings.errors.theme":"无法更新颜色主题。","settings.errors.language":"无法更新语言。","settings.errors.timeFormat":"无法更新时间格式。","settings.errors.timeZone":"无法更新时区。","common.system":"跟随系统","theme.light":"浅色","theme.dark":"深色","a11y.breadcrumb":"面包屑导航","a11y.goBack":"返回","a11y.close":"关闭","a11y.showPassword":"显示密码","a11y.hidePassword":"隐藏密码","a11y.sidebar":"侧边栏","a11y.sidebarDescription":"显示移动端侧边栏。","a11y.toggleSidebar":"切换侧边栏"},LV={"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.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.md 的資料夾,或 .skill / .zip 壓縮檔。","skills.importUrl":"從 URL 匯入","skills.importUrlDescription":"透過 URL 取得已發布的技能。","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":"匯入會以備份完全覆蓋目前的 Foundry 資料,不會合併現有資料。此操作無法復原。","dataImport.error":"無法匯入資料,請重試。","dataImport.invalidBackup":"備份無效或不受支援。","dataImport.invalidPassphrase":"密碼不正確或備份已損壞。","nav.settings":"設定","settings.workspace":"工作區","settings.appearance":"外觀","settings.appearanceAria":"外觀設定","settings.languageRegion":"語言與地區","settings.languageRegionAria":"語言與地區設定","settings.advanced":"進階","settings.advancedAria":"進階設定","settings.export":"匯出","dataExport.title":"匯出資料","dataExport.action":"匯出","dataExport.description":"下載目前 Foundry 資料的加密備份。","dataExport.passphrase":"密碼","dataExport.confirmPassphrase":"確認密碼","dataExport.passphraseHint":"請保留此密碼,匯入備份時需要使用。密碼無法復原。","dataExport.passphraseMismatch":"兩次輸入的密碼不一致。","dataExport.exporting":"匯出中…","dataExport.exported":"已開始下載資料備份。","dataExport.error":"無法匯出資料,請重試。","common.cancel":"取消","settings.import":"匯入","settings.configFolder":"設定資料夾","settings.openFolder":"開啟","settings.copyConfigFolder":"複製設定資料夾路徑","settings.configFolderCopied":"已複製設定資料夾路徑","settings.errors.copyConfigFolder":"無法複製設定資料夾路徑。","settings.errors.openConfigFolder":"無法開啟設定資料夾。","settings.language":"語言","settings.timeFormat":"時間格式","settings.timeZone":"時區","settings.colorTheme":"色彩主題","settings.navigation":"設定導覽","settings.openNavigation":"開啟設定導覽","settings.errors.load":"無法載入設定。","settings.errors.theme":"無法更新色彩主題。","settings.errors.language":"無法更新語言。","settings.errors.timeFormat":"無法更新時間格式。","settings.errors.timeZone":"無法更新時區。","common.system":"跟隨系統","theme.light":"淺色","theme.dark":"深色","a11y.breadcrumb":"麵包屑導覽","a11y.goBack":"返回","a11y.close":"關閉","a11y.showPassword":"顯示密碼","a11y.hidePassword":"隱藏密碼","a11y.sidebar":"側邊欄","a11y.sidebarDescription":"顯示行動版側邊欄。","a11y.toggleSidebar":"切換側邊欄"},zV={"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.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.md を含むフォルダー、または .skill / .zip アーカイブを選択します。","skills.importUrl":"URL からインポート","skills.importUrlDescription":"URL から公開済みのスキルを取得します。","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":"現在の Foundry データはバックアップの内容で完全に置き換えられます。既存データとの結合は行われません。この操作は取り消せません。","dataImport.error":"データをインポートできませんでした。もう一度お試しください。","dataImport.invalidBackup":"バックアップが無効または未対応です。","dataImport.invalidPassphrase":"パスフレーズが違うか、バックアップが破損しています。","nav.settings":"設定","settings.workspace":"ワークスペース","settings.appearance":"外観","settings.appearanceAria":"外観設定","settings.languageRegion":"言語と地域","settings.languageRegionAria":"言語と地域の設定","settings.advanced":"詳細設定","settings.advancedAria":"詳細設定","settings.export":"エクスポート","dataExport.title":"データをエクスポート","dataExport.action":"エクスポート","dataExport.description":"Foundry のデータを暗号化したバックアップとしてダウンロードします。","dataExport.passphrase":"パスフレーズ","dataExport.confirmPassphrase":"パスフレーズの確認","dataExport.passphraseHint":"インポート時に必要なため、このパスフレーズを保管してください。復元はできません。","dataExport.passphraseMismatch":"パスフレーズが一致しません。","dataExport.exporting":"エクスポート中…","dataExport.exported":"バックアップのダウンロードを開始しました。","dataExport.error":"データをエクスポートできませんでした。もう一度お試しください。","common.cancel":"キャンセル","settings.import":"インポート","settings.configFolder":"設定フォルダー","settings.openFolder":"開く","settings.copyConfigFolder":"設定フォルダーのパスをコピー","settings.configFolderCopied":"設定フォルダーのパスをコピーしました","settings.errors.copyConfigFolder":"設定フォルダーのパスをコピーできませんでした。","settings.errors.openConfigFolder":"設定フォルダーを開けませんでした。","settings.language":"言語","settings.timeFormat":"時刻形式","settings.timeZone":"タイムゾーン","settings.colorTheme":"カラーテーマ","settings.navigation":"設定ナビゲーション","settings.openNavigation":"設定ナビゲーションを開く","settings.errors.load":"設定を読み込めませんでした。","settings.errors.theme":"カラーテーマを更新できませんでした。","settings.errors.language":"言語を更新できませんでした。","settings.errors.timeFormat":"時刻形式を更新できませんでした。","settings.errors.timeZone":"タイムゾーンを更新できませんでした。","common.system":"システム","theme.light":"ライト","theme.dark":"ダーク","a11y.breadcrumb":"パンくずリスト","a11y.goBack":"戻る","a11y.close":"閉じる","a11y.showPassword":"パスワードを表示","a11y.hidePassword":"パスワードを非表示","a11y.sidebar":"サイドバー","a11y.sidebarDescription":"モバイル用サイドバーを表示します。","a11y.toggleSidebar":"サイドバーを切り替える"},_V={"en-US":{translation:IV},"zh-CN":{translation:PV},"zh-TW":{translation:LV},"ja-JP":{translation:zV}};function UV({value:e,onValueChange:t,disabled:i=!1}){const{t:s}=Ct(),o=[{value:"system",label:s("common.system")},...vk.map(u=>({value:u,label:jV[u]}))];return b.jsx($a,{label:s("settings.language"),children:b.jsxs(qb,{items:o,value:e,onValueChange:u=>{u&&t(u)},disabled:i,children:[b.jsx(Gb,{"aria-label":s("settings.language"),className:"w-52",children:b.jsx(Yb,{})}),b.jsx($b,{children:o.map(u=>b.jsx(Qb,{value:u.value,children:u.label},u.value))})]})})}const MR=uB.map(e=>({value:e,label:e}));function HV({value:e,onValueChange:t,disabled:i=!1}){const{t:s}=Ct();return b.jsx($a,{label:s("settings.timeFormat"),children:b.jsxs(qb,{items:MR,value:e,onValueChange:o=>{o&&t(o)},disabled:i,children:[b.jsx(Gb,{"aria-label":s("settings.timeFormat"),className:"w-52",children:b.jsx(Yb,{})}),b.jsx($b,{children:MR.map(o=>b.jsx(Qb,{value:o.value,children:o.label},o.value))})]})})}const FV={"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 BV({value:e,onValueChange:t,disabled:i=!1}){const{t:s}=Ct(),o=cB.map(u=>({value:u,label:s(FV[u])}));return b.jsx($a,{label:s("settings.timeZone"),children:b.jsxs(qb,{items:o,value:e,onValueChange:u=>{u&&t(u)},disabled:i,children:[b.jsx(Gb,{"aria-label":s("settings.timeZone"),className:"w-52",children:b.jsx(Yb,{})}),b.jsx($b,{children:o.map(u=>b.jsx(Qb,{value:u.value,children:u.label},u.value))})]})})}const Aa=["settings"],Mh=["settings","update"];function Xb(){const{t:e}=Ct(),t=mi(),i=lO({mutationKey:Mh})>0,s=Lo({queryKey:Aa,queryFn:({signal:p})=>a9(p),staleTime:1/0,retry:!1}),o=Ar({mutationKey:Mh,mutationFn:o9,onMutate:async p=>{await t.cancelQueries({queryKey:Aa});const x=t.getQueryData(Aa);return x&&t.setQueryData(Aa,VV(x,p)),{previous:x}},onSuccess:p=>{t.setQueryData(Aa,p)},onError:(p,x,S)=>{S?.previous&&t.setQueryData(Aa,S.previous),ln.error(e(KV(x)))},onSettled:()=>t.invalidateQueries({queryKey:Aa})}),u=s.data??null,c=u?.workspace.appearance["color-theme"]??"system",d=u?.workspace["language-region"].language??"system",f=u?.workspace["language-region"]["time-format"]??"YYYY-MM-DD HH:mm:ss",g=u?.workspace["language-region"]["time-zone"]??"America/Los_Angeles";function y(p){!u||t.isMutating({mutationKey:Mh})>0||o.mutate(p)}return{settings:u,theme:c,language:d,timeFormat:f,timeZone:g,isLoading:s.isPending,isUpdating:i,setTheme:p=>{p!==c&&y({theme:p})},setLanguage:p=>{p!==d&&y({language:p})},setTimeFormat:p=>{p!==f&&y({timeFormat:p})},setTimeZone:p=>{p!==g&&y({timezone:p})}}}function VV(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 KV(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 Co=[{id:"appearance",labelKey:"settings.appearance",ariaKey:"settings.appearanceAria",icon:rL},{id:"language-region",labelKey:"settings.languageRegion",ariaKey:"settings.languageRegionAria",icon:ZP},{id:"advanced",labelKey:"settings.advanced",ariaKey:"settings.advancedAria",icon:qT}];function qV(){const{t:e}=Ct(),[t,i]=m_(),s=Co.find(({id:O})=>O===t.get("panel"))?.id??Co[0].id,o=O=>{i(A=>{const M=new URLSearchParams(A);return M.set("panel",O),M})},{settings:u,theme:c,language:d,timeFormat:f,timeZone:g,isLoading:y,isUpdating:p,setTheme:x,setLanguage:S,setTimeFormat:w,setTimeZone:C}=Xb(),E=Co.find(O=>O.id===s)?.ariaKey??"settings.appearanceAria",R=Co.find(O=>O.id===s)?.labelKey??"settings.appearance";return b.jsxs("div",{className:`
185
- grid h-full min-h-0 grid-cols-[260px_minmax(0,1fr)]
186
- max-[680px]:grid-cols-1
187
- `,children:[b.jsx("aside",{className:`
188
- hidden min-h-0 overflow-y-auto p-4
189
- min-[680px]:block
190
- `,children:b.jsx(YV,{activeSection:s,onSectionChange:o})}),b.jsxs("section",{"aria-label":e(E),className:"min-h-0 overflow-y-auto p-4",children:[b.jsxs("div",{className:`
191
- mb-3 flex items-center gap-3
192
- min-[680px]:hidden
193
- `,children:[b.jsxs(Uo,{children:[b.jsx(Ho,{render:b.jsx(ht,{type:"button",variant:"outline",size:"icon","aria-label":e("settings.openNavigation")}),children:b.jsx(tL,{})}),b.jsx(Fo,{side:"bottom",align:"start",sideOffset:8,"aria-label":e("settings.navigation"),className:"w-56",children:b.jsxs(OA,{children:[b.jsx(AA,{children:e("settings.workspace")}),b.jsx(rU,{value:s,onValueChange:O=>{const A=Co.find(({id:M})=>M===O);A&&o(A.id)},children:Co.map(({id:O,labelKey:A,icon:M})=>b.jsxs(iU,{value:O,closeOnClick:!0,children:[b.jsx(M,{}),e(A)]},O))})]})})]}),b.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:e(R)})]}),b.jsxs(Hs,{className:"gap-0 py-0",children:[y&&b.jsxs("div",{className:`
194
- flex flex-col items-start gap-3 p-4
195
- min-[680px]:min-h-16 min-[680px]:flex-row
196
- min-[680px]:items-center min-[680px]:justify-between
197
- min-[680px]:gap-8
198
- `,children:[b.jsx(wr,{className:"h-4 w-24"}),b.jsxs("div",{className:"flex items-center gap-6",children:[b.jsx(wr,{className:"h-4 w-16"}),b.jsx(wr,{className:"h-4 w-10"}),b.jsx(wr,{className:"h-4 w-10"})]})]}),!y&&s==="appearance"&&b.jsx(Z9,{value:c,onValueChange:O=>{x(O)},disabled:p||!u}),!y&&s==="language-region"&&b.jsxs("div",{className:"divide-y",children:[b.jsx(UV,{value:d,onValueChange:O=>{S(O)},disabled:p||!u}),b.jsx(BV,{value:g,onValueChange:O=>{C(O)},disabled:p||!u}),b.jsx(HV,{value:f,onValueChange:O=>{w(O)},disabled:p||!u})]}),!y&&s==="advanced"&&b.jsxs("div",{className:"divide-y",children:[b.jsx(I9,{disabled:p||!u}),b.jsx(U9,{disabled:p||!u}),b.jsx(f9,{configFolder:u?.configFolder}),b.jsx(R9,{disabled:p||!u})]})]})]})]})}function YV({activeSection:e,onSectionChange:t}){const{t:i}=Ct();return b.jsx("nav",{"aria-label":i("settings.navigation"),children:b.jsxs(Hs,{size:"sm",children:[b.jsx(u7,{children:b.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:i("settings.workspace")})}),b.jsx(c7,{className:"flex flex-col gap-1",children:Co.map(({id:s,labelKey:o,icon:u})=>{const c=s===e;return b.jsxs(ht,{type:"button",variant:c?"secondary":"ghost","aria-current":c?"page":void 0,onClick:()=>{t(s)},className:"w-full justify-start gap-2",children:[b.jsx(u,{className:c?void 0:"text-muted-foreground"}),b.jsx("span",{children:i(o)})]},s)})})]})})}fr.use(C8).init({resources:_V,lng:bk(),fallbackLng:"en-US",supportedLngs:[...vk],keySeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});function bk(){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 GV(){const e=mi();v.useEffect(()=>{const t=new EventSource("/api/events"),i=()=>{e.invalidateQueries({queryKey:Aa,refetchType:e.isMutating({mutationKey:Mh})>0?"none":"active"})},s=o=>{try{const u=JSON.parse(o.data);typeof u=="object"&&u!==null&&"version"in u&&u.version===dB&&"type"in u&&u.type===fB&&i()}catch{}};return t.addEventListener("open",i),t.addEventListener("foundry",s),()=>{t.removeEventListener("open",i),t.removeEventListener("foundry",s),t.close()}},[e])}const uv=matchMedia("(prefers-color-scheme: dark)");function $V(e){return uv.addEventListener("change",e),()=>uv.removeEventListener("change",e)}function QV(){return uv.matches?"dark":"light"}function XV({children:e}){GV();const{theme:t,language:i}=Xb(),s=v.useSyncExternalStore($V,QV),o=t==="system"?s:t,u=i==="system"?bk():i;return v.useLayoutEffect(()=>{const c=document.documentElement;c.classList.toggle("dark",o==="dark"),c.style.colorScheme=o},[o]),v.useLayoutEffect(()=>{fr.changeLanguage(u),document.documentElement.lang=u},[u]),e}const ZV=new PL({queryCache:new aO({onError:(e,t)=>{t.queryKey[0]==="skill-targets"?ln.error(fr.t("settings.errors.skillTargets")):t.queryKey[0]==="settings"&&ln.error(fr.t("settings.errors.load"))}})});function WV(){return null}function JV(e){switch(e){case"/library/instructions":return b.jsx(W7,{});case"/library/skills":return b.jsx(PB,{});default:return b.jsx(WV,{})}}const eK=c_([{element:b.jsx(hH,{}),children:[...nH.map(e=>({path:e,element:JV(e)})),{path:"/library/skills/:name",element:b.jsx(s9,{})}]},{element:b.jsx(pH,{}),children:[{path:"/settings",element:b.jsx(qV,{}),handle:{backTo:"/dashboard"}}]},{path:"*",element:b.jsx(_z,{to:"/dashboard",replace:!0})}]);function tK(){return b.jsx(cL,{client:ZV,children:b.jsx(X3,{children:b.jsx(XV,{children:b.jsx(nK,{})})})})}function nK(){const{theme:e}=Xb();return b.jsxs(b.Fragment,{children:[b.jsx(E_,{router:eK}),b.jsx(uL,{theme:e})]})}ij.createRoot(document.getElementById("root")).render(b.jsx(v.StrictMode,{children:b.jsx(tK,{})}));export{Ne as W,Y7 as _,b as j,v as r,Ct as u};