@nick3/copilot-api 1.5.2 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/account-AacnHem5.js +362 -0
- package/dist/account-AacnHem5.js.map +1 -0
- package/dist/{accounts-manager-DhwGrhHF.js → accounts-manager-BevCBoaF.js} +96 -7
- package/dist/accounts-manager-BevCBoaF.js.map +1 -0
- package/dist/admin/assets/index-519a65q_.js +66 -0
- package/dist/admin/assets/index-ChMaMig2.css +1 -0
- package/dist/admin/index.html +2 -2
- package/dist/{auth-BtUQnU2m.js → auth-B7x3wjry.js} +6 -12
- package/dist/auth-B7x3wjry.js.map +1 -0
- package/dist/{check-usage-DiomC9Dl.js → check-usage-B1cbDEOI.js} +4 -5
- package/dist/{check-usage-DiomC9Dl.js.map → check-usage-B1cbDEOI.js.map} +1 -1
- package/dist/{debug-BzR5ZQUk.js → debug-BJfZVBB7.js} +2 -2
- package/dist/{debug-BzR5ZQUk.js.map → debug-BJfZVBB7.js.map} +1 -1
- package/dist/{get-copilot-token-DN1P6qll.js → get-copilot-token-cha9rQwA.js} +2 -2
- package/dist/{get-copilot-token-DN1P6qll.js.map → get-copilot-token-cha9rQwA.js.map} +1 -1
- package/dist/main.js +4 -4
- package/dist/{paths-Cvzy-eLX.js → paths-DGlr310R.js} +2 -2
- package/dist/{paths-Cvzy-eLX.js.map → paths-DGlr310R.js.map} +1 -1
- package/dist/{utils-53JWve7i.js → poll-access-token-DFooFWhY.js} +339 -46
- package/dist/poll-access-token-DFooFWhY.js.map +1 -0
- package/dist/{server-D9M_wFyO.js → server-CuXJhEMC.js} +495 -140
- package/dist/server-CuXJhEMC.js.map +1 -0
- package/dist/{start-D3yEfZnW.js → start-D6O1XcfI.js} +26 -15
- package/dist/start-D6O1XcfI.js.map +1 -0
- package/package.json +1 -1
- package/dist/account-CipKmikF.js +0 -17
- package/dist/account-CipKmikF.js.map +0 -1
- package/dist/accounts-manager-DhwGrhHF.js.map +0 -1
- package/dist/accounts-registry-CQYvRe65.js +0 -180
- package/dist/accounts-registry-CQYvRe65.js.map +0 -1
- package/dist/admin/assets/index-B-G_GrPI.js +0 -57
- package/dist/admin/assets/index-CsAeel_7.css +0 -1
- package/dist/auth-BtUQnU2m.js.map +0 -1
- package/dist/poll-access-token-BrRUFB1F.js +0 -52
- package/dist/poll-access-token-BrRUFB1F.js.map +0 -1
- package/dist/server-D9M_wFyO.js.map +0 -1
- package/dist/start-D3yEfZnW.js.map +0 -1
- package/dist/utils-53JWve7i.js.map +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
function uR(e,t){for(var s=0;s<t.length;s++){const i=t[s];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in e)){const l=Object.getOwnPropertyDescriptor(i,r);l&&Object.defineProperty(e,r,l.get?l:{enumerable:!0,get:()=>i[r]})}}}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 r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function s(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(r){if(r.ep)return;r.ep=!0;const l=s(r);fetch(r.href,l)}})();function kp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hm={exports:{}},sl={};var Gb;function dR(){if(Gb)return sl;Gb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(i,r,l){var u=null;if(l!==void 0&&(u=""+l),r.key!==void 0&&(u=""+r.key),"key"in r){l={};for(var f in r)f!=="key"&&(l[f]=r[f])}else l=r;return r=l.ref,{$$typeof:e,type:i,key:u,ref:r!==void 0?r:null,props:l}}return sl.Fragment=t,sl.jsx=s,sl.jsxs=s,sl}var Yb;function fR(){return Yb||(Yb=1,Hm.exports=dR()),Hm.exports}var d=fR(),Fm={exports:{}},_e={};var Xb;function mR(){if(Xb)return _e;Xb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function S(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,j={};function E(O,V,I){this.props=O,this.context=V,this.refs=j,this.updater=I||C}E.prototype.isReactComponent={},E.prototype.setState=function(O,V){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,V,"setState")},E.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function A(){}A.prototype=E.prototype;function R(O,V,I){this.props=O,this.context=V,this.refs=j,this.updater=I||C}var _=R.prototype=new A;_.constructor=R,T(_,E.prototype),_.isPureReactComponent=!0;var M=Array.isArray;function z(){}var D={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function X(O,V,I){var W=I.ref;return{$$typeof:e,type:O,key:V,ref:W!==void 0?W:null,props:I}}function Q(O,V){return X(O.type,V,O.props)}function J(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function te(O){var V={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(I){return V[I]})}var ne=/\/+/g;function re(O,V){return typeof O=="object"&&O!==null&&O.key!=null?te(""+O.key):V.toString(36)}function de(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(z,z):(O.status="pending",O.then(function(V){O.status==="pending"&&(O.status="fulfilled",O.value=V)},function(V){O.status==="pending"&&(O.status="rejected",O.reason=V)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function k(O,V,I,W,oe){var fe=typeof O;(fe==="undefined"||fe==="boolean")&&(O=null);var K=!1;if(O===null)K=!0;else switch(fe){case"bigint":case"string":case"number":K=!0;break;case"object":switch(O.$$typeof){case e:case t:K=!0;break;case y:return K=O._init,k(K(O._payload),V,I,W,oe)}}if(K)return oe=oe(O),K=W===""?"."+re(O,0):W,M(oe)?(I="",K!=null&&(I=K.replace(ne,"$&/")+"/"),k(oe,V,I,"",function(be){return be})):oe!=null&&(J(oe)&&(oe=Q(oe,I+(oe.key==null||O&&O.key===oe.key?"":(""+oe.key).replace(ne,"$&/")+"/")+K)),V.push(oe)),1;K=0;var ie=W===""?".":W+":";if(M(O))for(var me=0;me<O.length;me++)W=O[me],fe=ie+re(W,me),K+=k(W,V,I,fe,oe);else if(me=S(O),typeof me=="function")for(O=me.call(O),me=0;!(W=O.next()).done;)W=W.value,fe=ie+re(W,me++),K+=k(W,V,I,fe,oe);else if(fe==="object"){if(typeof O.then=="function")return k(de(O),V,I,W,oe);throw V=String(O),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return K}function H(O,V,I){if(O==null)return O;var W=[],oe=0;return k(O,W,"","",function(fe){return V.call(I,fe,oe++)}),W}function B(O){if(O._status===-1){var V=O._result;V=V(),V.then(function(I){(O._status===0||O._status===-1)&&(O._status=1,O._result=I)},function(I){(O._status===0||O._status===-1)&&(O._status=2,O._result=I)}),O._status===-1&&(O._status=0,O._result=V)}if(O._status===1)return O._result.default;throw O._result}var le=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},G={map:H,forEach:function(O,V,I){H(O,function(){V.apply(this,arguments)},I)},count:function(O){var V=0;return H(O,function(){V++}),V},toArray:function(O){return H(O,function(V){return V})||[]},only:function(O){if(!J(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return _e.Activity=g,_e.Children=G,_e.Component=E,_e.Fragment=s,_e.Profiler=r,_e.PureComponent=R,_e.StrictMode=i,_e.Suspense=h,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,_e.__COMPILER_RUNTIME={__proto__:null,c:function(O){return D.H.useMemoCache(O)}},_e.cache=function(O){return function(){return O.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(O,V,I){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var W=T({},O.props),oe=O.key;if(V!=null)for(fe in V.key!==void 0&&(oe=""+V.key),V)!P.call(V,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&V.ref===void 0||(W[fe]=V[fe]);var fe=arguments.length-2;if(fe===1)W.children=I;else if(1<fe){for(var K=Array(fe),ie=0;ie<fe;ie++)K[ie]=arguments[ie+2];W.children=K}return X(O.type,oe,W)},_e.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:l,_context:O},O},_e.createElement=function(O,V,I){var W,oe={},fe=null;if(V!=null)for(W in V.key!==void 0&&(fe=""+V.key),V)P.call(V,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(oe[W]=V[W]);var K=arguments.length-2;if(K===1)oe.children=I;else if(1<K){for(var ie=Array(K),me=0;me<K;me++)ie[me]=arguments[me+2];oe.children=ie}if(O&&O.defaultProps)for(W in K=O.defaultProps,K)oe[W]===void 0&&(oe[W]=K[W]);return X(O,fe,oe)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(O){return{$$typeof:f,render:O}},_e.isValidElement=J,_e.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:B}},_e.memo=function(O,V){return{$$typeof:m,type:O,compare:V===void 0?null:V}},_e.startTransition=function(O){var V=D.T,I={};D.T=I;try{var W=O(),oe=D.S;oe!==null&&oe(I,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(z,le)}catch(fe){le(fe)}finally{V!==null&&I.types!==null&&(V.types=I.types),D.T=V}},_e.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},_e.use=function(O){return D.H.use(O)},_e.useActionState=function(O,V,I){return D.H.useActionState(O,V,I)},_e.useCallback=function(O,V){return D.H.useCallback(O,V)},_e.useContext=function(O){return D.H.useContext(O)},_e.useDebugValue=function(){},_e.useDeferredValue=function(O,V){return D.H.useDeferredValue(O,V)},_e.useEffect=function(O,V){return D.H.useEffect(O,V)},_e.useEffectEvent=function(O){return D.H.useEffectEvent(O)},_e.useId=function(){return D.H.useId()},_e.useImperativeHandle=function(O,V,I){return D.H.useImperativeHandle(O,V,I)},_e.useInsertionEffect=function(O,V){return D.H.useInsertionEffect(O,V)},_e.useLayoutEffect=function(O,V){return D.H.useLayoutEffect(O,V)},_e.useMemo=function(O,V){return D.H.useMemo(O,V)},_e.useOptimistic=function(O,V){return D.H.useOptimistic(O,V)},_e.useReducer=function(O,V,I){return D.H.useReducer(O,V,I)},_e.useRef=function(O){return D.H.useRef(O)},_e.useState=function(O){return D.H.useState(O)},_e.useSyncExternalStore=function(O,V,I){return D.H.useSyncExternalStore(O,V,I)},_e.useTransition=function(){return D.H.useTransition()},_e.version="19.2.3",_e}var Zb;function id(){return Zb||(Zb=1,Fm.exports=mR()),Fm.exports}var x=id();const ue=kp(x),Lp=uR({__proto__:null,default:ue},[x]);var qm={exports:{}},il={},$m={exports:{}},Km={};var Qb;function hR(){return Qb||(Qb=1,(function(e){function t(k,H){var B=k.length;k.push(H);e:for(;0<B;){var le=B-1>>>1,G=k[le];if(0<r(G,H))k[le]=H,k[B]=G,B=le;else break e}}function s(k){return k.length===0?null:k[0]}function i(k){if(k.length===0)return null;var H=k[0],B=k.pop();if(B!==H){k[0]=B;e:for(var le=0,G=k.length,O=G>>>1;le<O;){var V=2*(le+1)-1,I=k[V],W=V+1,oe=k[W];if(0>r(I,B))W<G&&0>r(oe,I)?(k[le]=oe,k[W]=B,le=W):(k[le]=I,k[V]=B,le=V);else if(W<G&&0>r(oe,B))k[le]=oe,k[W]=B,le=W;else break e}}return H}function r(k,H){var B=k.sortIndex-H.sortIndex;return B!==0?B:k.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],m=[],y=1,g=null,b=3,S=!1,C=!1,T=!1,j=!1,E=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function _(k){for(var H=s(m);H!==null;){if(H.callback===null)i(m);else if(H.startTime<=k)i(m),H.sortIndex=H.expirationTime,t(h,H);else break;H=s(m)}}function M(k){if(T=!1,_(k),!C)if(s(h)!==null)C=!0,z||(z=!0,te());else{var H=s(m);H!==null&&de(M,H.startTime-k)}}var z=!1,D=-1,P=5,X=-1;function Q(){return j?!0:!(e.unstable_now()-X<P)}function J(){if(j=!1,z){var k=e.unstable_now();X=k;var H=!0;try{e:{C=!1,T&&(T=!1,A(D),D=-1),S=!0;var B=b;try{t:{for(_(k),g=s(h);g!==null&&!(g.expirationTime>k&&Q());){var le=g.callback;if(typeof le=="function"){g.callback=null,b=g.priorityLevel;var G=le(g.expirationTime<=k);if(k=e.unstable_now(),typeof G=="function"){g.callback=G,_(k),H=!0;break t}g===s(h)&&i(h),_(k)}else i(h);g=s(h)}if(g!==null)H=!0;else{var O=s(m);O!==null&&de(M,O.startTime-k),H=!1}}break e}finally{g=null,b=B,S=!1}H=void 0}}finally{H?te():z=!1}}}var te;if(typeof R=="function")te=function(){R(J)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=J,te=function(){re.postMessage(null)}}else te=function(){E(J,0)};function de(k,H){D=E(function(){k(e.unstable_now())},H)}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(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(k){switch(b){case 1:case 2:case 3:var H=3;break;default:H=b}var B=b;b=H;try{return k()}finally{b=B}},e.unstable_requestPaint=function(){j=!0},e.unstable_runWithPriority=function(k,H){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var B=b;b=k;try{return H()}finally{b=B}},e.unstable_scheduleCallback=function(k,H,B){var le=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?le+B:le):B=le,k){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=B+G,k={id:y++,callback:H,priorityLevel:k,startTime:B,expirationTime:G,sortIndex:-1},B>le?(k.sortIndex=B,t(m,k),s(h)===null&&k===s(m)&&(T?(A(D),D=-1):T=!0,de(M,B-le))):(k.sortIndex=G,t(h,k),C||S||(C=!0,z||(z=!0,te()))),k},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(k){var H=b;return function(){var B=b;b=H;try{return k.apply(this,arguments)}finally{b=B}}}})(Km)),Km}var Wb;function pR(){return Wb||(Wb=1,$m.exports=hR()),$m.exports}var Gm={exports:{}},sn={};var Jb;function gR(){if(Jb)return sn;Jb=1;var e=id();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var i={d:{f:s,r:function(){throw Error(t(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},r=Symbol.for("react.portal");function l(h,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:g==null?null:""+g,children:h,containerInfo:m,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return sn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,sn.createPortal=function(h,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return l(h,m,null,y)},sn.flushSync=function(h){var m=u.T,y=i.p;try{if(u.T=null,i.p=2,h)return h()}finally{u.T=m,i.p=y,i.d.f()}},sn.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(h,m))},sn.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},sn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?i.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:S}):y==="script"&&i.d.X(h,{crossOrigin:g,integrity:b,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},sn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=f(m.as,m.crossOrigin);i.d.M(h,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(h)},sn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin);i.d.L(h,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},sn.preloadModule=function(h,m){if(typeof h=="string")if(m){var y=f(m.as,m.crossOrigin);i.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(h)},sn.requestFormReset=function(h){i.d.r(h)},sn.unstable_batchedUpdates=function(h,m){return h(m)},sn.useFormState=function(h,m,y){return u.H.useFormState(h,m,y)},sn.useFormStatus=function(){return u.H.useHostTransitionStatus()},sn.version="19.2.3",sn}var e0;function tw(){if(e0)return Gm.exports;e0=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(),Gm.exports=gR(),Gm.exports}var t0;function vR(){if(t0)return il;t0=1;var e=pR(),t=id(),s=tw();function i(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var a=n,o=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(o=a.return),n=a.return;while(n)}return a.tag===3?o:null}function u(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function f(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function h(n){if(l(n)!==n)throw Error(i(188))}function m(n){var a=n.alternate;if(!a){if(a=l(n),a===null)throw Error(i(188));return a!==n?null:n}for(var o=n,c=a;;){var p=o.return;if(p===null)break;var v=p.alternate;if(v===null){if(c=p.return,c!==null){o=c;continue}break}if(p.child===v.child){for(v=p.child;v;){if(v===o)return h(p),n;if(v===c)return h(p),a;v=v.sibling}throw Error(i(188))}if(o.return!==c.return)o=p,c=v;else{for(var w=!1,N=p.child;N;){if(N===o){w=!0,o=p,c=v;break}if(N===c){w=!0,c=p,o=v;break}N=N.sibling}if(!w){for(N=v.child;N;){if(N===o){w=!0,o=v,c=p;break}if(N===c){w=!0,c=v,o=p;break}N=N.sibling}if(!w)throw Error(i(189))}}if(o.alternate!==c)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?n:a}function y(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=y(n),a!==null)return a;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),R=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function te(n){return n===null||typeof n!="object"?null:(n=J&&n[J]||n["@@iterator"],typeof n=="function"?n:null)}var ne=Symbol.for("react.client.reference");function re(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ne?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case T:return"Fragment";case E:return"Profiler";case j:return"StrictMode";case M:return"Suspense";case z:return"SuspenseList";case X:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case C:return"Portal";case R:return n.displayName||"Context";case A:return(n._context.displayName||"Context")+".Consumer";case _:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case D:return a=n.displayName||null,a!==null?a:re(n.type)||"Memo";case P:a=n._payload,n=n._init;try{return re(n(a))}catch{}}return null}var de=Array.isArray,k=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},le=[],G=-1;function O(n){return{current:n}}function V(n){0>G||(n.current=le[G],le[G]=null,G--)}function I(n,a){G++,le[G]=n.current,n.current=a}var W=O(null),oe=O(null),fe=O(null),K=O(null);function ie(n,a){switch(I(fe,a),I(oe,n),I(W,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?gb(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=gb(a),n=vb(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}V(W),I(W,n)}function me(){V(W),V(oe),V(fe)}function be(n){n.memoizedState!==null&&I(K,n);var a=W.current,o=vb(a,n.type);a!==o&&(I(oe,n),I(W,o))}function je(n){oe.current===n&&(V(W),V(oe)),K.current===n&&(V(K),el._currentValue=B)}var Ae,xt;function mt(n){if(Ae===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);Ae=a&&a[1]||"",xt=-1<o.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Ae+n+xt}var Dn=!1;function mn(n,a){if(!n||Dn)return"";Dn=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(Z){var Y=Z}Reflect.construct(n,[],se)}else{try{se.call()}catch(Z){Y=Z}n.call(se.prototype)}}else{try{throw Error()}catch(Z){Y=Z}(se=n())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(Z){if(Z&&Y&&typeof Z.stack=="string")return[Z.stack,Y.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=c.DetermineComponentFrameRoot(),w=v[0],N=v[1];if(w&&N){var L=w.split(`
|
|
4
|
+
`),$=N.split(`
|
|
5
|
+
`);for(p=c=0;c<L.length&&!L[c].includes("DetermineComponentFrameRoot");)c++;for(;p<$.length&&!$[p].includes("DetermineComponentFrameRoot");)p++;if(c===L.length||p===$.length)for(c=L.length-1,p=$.length-1;1<=c&&0<=p&&L[c]!==$[p];)p--;for(;1<=c&&0<=p;c--,p--)if(L[c]!==$[p]){if(c!==1||p!==1)do if(c--,p--,0>p||L[c]!==$[p]){var ee=`
|
|
6
|
+
`+L[c].replace(" at new "," at ");return n.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",n.displayName)),ee}while(1<=c&&0<=p);break}}}finally{Dn=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?mt(o):""}function Jt(n,a){switch(n.tag){case 26:case 27:case 5:return mt(n.type);case 16:return mt("Lazy");case 13:return n.child!==a&&a!==null?mt("Suspense Fallback"):mt("Suspense");case 19:return mt("SuspenseList");case 0:case 15:return mn(n.type,!1);case 11:return mn(n.type.render,!1);case 1:return mn(n.type,!0);case 31:return mt("Activity");default:return""}}function Aa(n){try{var a="",o=null;do a+=Jt(n,o),o=n,n=n.return;while(n);return a}catch(c){return`
|
|
7
|
+
Error generating stack: `+c.message+`
|
|
8
|
+
`+c.stack}}var Kt=Object.prototype.hasOwnProperty,Na=e.unstable_scheduleCallback,Ya=e.unstable_cancelCallback,Dt=e.unstable_shouldYield,Gn=e.unstable_requestPaint,Pt=e.unstable_now,hi=e.unstable_getCurrentPriorityLevel,fa=e.unstable_ImmediatePriority,Xa=e.unstable_UserBlockingPriority,hn=e.unstable_NormalPriority,Yn=e.unstable_LowPriority,pn=e.unstable_IdlePriority,Ms=e.log,Xn=e.unstable_setDisableYieldValue,ma=null,kt=null;function rn(n){if(typeof Ms=="function"&&Xn(n),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(ma,n)}catch{}}var Et=Math.clz32?Math.clz32:gn,pi=Math.log,Za=Math.LN2;function gn(n){return n>>>=0,n===0?32:31-(pi(n)/Za|0)|0}var Ra=256,nt=262144,Zn=4194304;function bt(n){var a=n&42;if(a!==0)return a;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&261888;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 Ce(n,a,o){var c=n.pendingLanes;if(c===0)return 0;var p=0,v=n.suspendedLanes,w=n.pingedLanes;n=n.warmLanes;var N=c&134217727;return N!==0?(c=N&~v,c!==0?p=bt(c):(w&=N,w!==0?p=bt(w):o||(o=N&~n,o!==0&&(p=bt(o))))):(N=c&~v,N!==0?p=bt(N):w!==0?p=bt(w):o||(o=c&~n,o!==0&&(p=bt(o)))),p===0?0:a!==0&&a!==p&&(a&v)===0&&(v=p&-p,o=a&-a,v>=o||v===32&&(o&4194048)!==0)?a:p}function Ge(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function Le(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 ot(){var n=Zn;return Zn<<=1,(Zn&62914560)===0&&(Zn=4194304),n}function Ma(n){for(var a=[],o=0;31>o;o++)a.push(n);return a}function at(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function en(n,a,o,c,p,v){var w=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var N=n.entanglements,L=n.expirationTimes,$=n.hiddenUpdates;for(o=w&~o;0<o;){var ee=31-Et(o),se=1<<ee;N[ee]=0,L[ee]=-1;var Y=$[ee];if(Y!==null)for($[ee]=null,ee=0;ee<Y.length;ee++){var Z=Y[ee];Z!==null&&(Z.lane&=-536870913)}o&=~se}c!==0&&Qa(n,c,0),v!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=v&~(w&~a))}function Qa(n,a,o){n.pendingLanes|=a,n.suspendedLanes&=~a;var c=31-Et(a);n.entangledLanes|=a,n.entanglements[c]=n.entanglements[c]|1073741824|o&261930}function tn(n,a){var o=n.entangledLanes|=a;for(n=n.entanglements;o;){var c=31-Et(o),p=1<<c;p&a|n[c]&a&&(n[c]|=a),o&=~p}}function nn(n,a){var o=a&-a;return o=(o&42)!==0?1:_s(o),(o&(n.suspendedLanes|a))!==0?0:o}function _s(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 Pn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function pr(){var n=H.p;return n!==0?n:(n=window.event,n===void 0?32:Ub(n.type))}function Yl(n,a){var o=H.p;try{return H.p=n,a()}finally{H.p=o}}var _a=Math.random().toString(36).slice(2),Lt="__reactFiber$"+_a,an="__reactProps$"+_a,Os="__reactContainer$"+_a,gr="__reactEvents$"+_a,Od="__reactListeners$"+_a,Dd="__reactHandles$"+_a,Se="__reactResources$"+_a,we="__reactMarker$"+_a;function jt(n){delete n[Lt],delete n[an],delete n[gr],delete n[Od],delete n[Dd]}function Qn(n){var a=n[Lt];if(a)return a;for(var o=n.parentNode;o;){if(a=o[Os]||o[Lt]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(n=Tb(n);n!==null;){if(o=n[Lt])return o;n=Tb(n)}return a}n=o,o=n.parentNode}return null}function Wa(n){if(n=n[Lt]||n[Os]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function gi(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function Ja(n){var a=n[Se];return a||(a=n[Se]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function St(n){n[we]=!0}var sv=new Set,iv={};function vi(n,a){no(n,a),no(n+"Capture",a)}function no(n,a){for(iv[n]=a,n=0;n<a.length;n++)sv.add(a[n])}var tA=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]*$"),ov={},rv={};function nA(n){return Kt.call(rv,n)?!0:Kt.call(ov,n)?!1:tA.test(n)?rv[n]=!0:(ov[n]=!0,!1)}function Xl(n,a,o){if(nA(a))if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+o)}}function Zl(n,a,o){if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+o)}}function es(n,a,o,c){if(c===null)n.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(a,o,""+c)}}function Wn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function lv(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function aA(n,a,o){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,v=c.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return p.call(this)},set:function(w){o=""+w,v.call(this,w)}}),Object.defineProperty(n,a,{enumerable:c.enumerable}),{getValue:function(){return o},setValue:function(w){o=""+w},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function Pd(n){if(!n._valueTracker){var a=lv(n)?"checked":"value";n._valueTracker=aA(n,a,""+n[a])}}function cv(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var o=a.getValue(),c="";return n&&(c=lv(n)?n.checked?"true":"false":n.value),n=c,n!==o?(a.setValue(n),!0):!1}function Ql(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}}var sA=/[\n"\\]/g;function Jn(n){return n.replace(sA,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function kd(n,a,o,c,p,v,w,N){n.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.type=w:n.removeAttribute("type"),a!=null?w==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+Wn(a)):n.value!==""+Wn(a)&&(n.value=""+Wn(a)):w!=="submit"&&w!=="reset"||n.removeAttribute("value"),a!=null?Ld(n,w,Wn(a)):o!=null?Ld(n,w,Wn(o)):c!=null&&n.removeAttribute("value"),p==null&&v!=null&&(n.defaultChecked=!!v),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?n.name=""+Wn(N):n.removeAttribute("name")}function uv(n,a,o,c,p,v,w,N){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.type=v),a!=null||o!=null){if(!(v!=="submit"&&v!=="reset"||a!=null)){Pd(n);return}o=o!=null?""+Wn(o):"",a=a!=null?""+Wn(a):o,N||a===n.value||(n.value=a),n.defaultValue=a}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=N?n.checked:!!c,n.defaultChecked=!!c,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(n.name=w),Pd(n)}function Ld(n,a,o){a==="number"&&Ql(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function ao(n,a,o,c){if(n=n.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<n.length;o++)p=a.hasOwnProperty("$"+n[o].value),n[o].selected!==p&&(n[o].selected=p),p&&c&&(n[o].defaultSelected=!0)}else{for(o=""+Wn(o),a=null,p=0;p<n.length;p++){if(n[p].value===o){n[p].selected=!0,c&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}function dv(n,a,o){if(a!=null&&(a=""+Wn(a),a!==n.value&&(n.value=a),o==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=o!=null?""+Wn(o):""}function fv(n,a,o,c){if(a==null){if(c!=null){if(o!=null)throw Error(i(92));if(de(c)){if(1<c.length)throw Error(i(93));c=c[0]}o=c}o==null&&(o=""),a=o}o=Wn(a),n.defaultValue=o,c=n.textContent,c===o&&c!==""&&c!==null&&(n.value=c),Pd(n)}function so(n,a){if(a){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=a;return}}n.textContent=a}var iA=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 mv(n,a,o){var c=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?c?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":c?n.setProperty(a,o):typeof o!="number"||o===0||iA.has(a)?a==="float"?n.cssFloat=o:n[a]=(""+o).trim():n[a]=o+"px"}function hv(n,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(n=n.style,o!=null){for(var c in o)!o.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var p in a)c=a[p],a.hasOwnProperty(p)&&o[p]!==c&&mv(n,p,c)}else for(var v in a)a.hasOwnProperty(v)&&mv(n,v,a[v])}function zd(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 oA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),rA=/^[\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 Wl(n){return rA.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function ts(){}var Vd=null;function Bd(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var io=null,oo=null;function pv(n){var a=Wa(n);if(a&&(n=a.stateNode)){var o=n[an]||null;e:switch(n=a.stateNode,a.type){case"input":if(kd(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Jn(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var c=o[a];if(c!==n&&c.form===n.form){var p=c[an]||null;if(!p)throw Error(i(90));kd(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)c=o[a],c.form===n.form&&cv(c)}break e;case"textarea":dv(n,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&ao(n,!!o.multiple,a,!1)}}}var Ud=!1;function gv(n,a,o){if(Ud)return n(a,o);Ud=!0;try{var c=n(a);return c}finally{if(Ud=!1,(io!==null||oo!==null)&&(Bc(),io&&(a=io,n=oo,oo=io=null,pv(a),n)))for(a=0;a<n.length;a++)pv(n[a])}}function vr(n,a){var o=n.stateNode;if(o===null)return null;var c=o[an]||null;if(c===null)return null;o=c[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var ns=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Id=!1;if(ns)try{var yr={};Object.defineProperty(yr,"passive",{get:function(){Id=!0}}),window.addEventListener("test",yr,yr),window.removeEventListener("test",yr,yr)}catch{Id=!1}var Ds=null,Hd=null,Jl=null;function vv(){if(Jl)return Jl;var n,a=Hd,o=a.length,c,p="value"in Ds?Ds.value:Ds.textContent,v=p.length;for(n=0;n<o&&a[n]===p[n];n++);var w=o-n;for(c=1;c<=w&&a[o-c]===p[v-c];c++);return Jl=p.slice(n,1<c?1-c:void 0)}function ec(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function tc(){return!0}function yv(){return!1}function vn(n){function a(o,c,p,v,w){this._reactName=o,this._targetInst=p,this.type=c,this.nativeEvent=v,this.target=w,this.currentTarget=null;for(var N in n)n.hasOwnProperty(N)&&(o=n[N],this[N]=o?o(v):v[N]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?tc:yv,this.isPropagationStopped=yv,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=tc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=tc)},persist:function(){},isPersistent:tc}),a}var yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nc=vn(yi),xr=g({},yi,{view:0,detail:0}),lA=vn(xr),Fd,qd,br,ac=g({},xr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kd,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!==br&&(br&&n.type==="mousemove"?(Fd=n.screenX-br.screenX,qd=n.screenY-br.screenY):qd=Fd=0,br=n),Fd)},movementY:function(n){return"movementY"in n?n.movementY:qd}}),xv=vn(ac),cA=g({},ac,{dataTransfer:0}),uA=vn(cA),dA=g({},xr,{relatedTarget:0}),$d=vn(dA),fA=g({},yi,{animationName:0,elapsedTime:0,pseudoElement:0}),mA=vn(fA),hA=g({},yi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),pA=vn(hA),gA=g({},yi,{data:0}),bv=vn(gA),vA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yA={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"},xA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bA(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=xA[n])?!!a[n]:!1}function Kd(){return bA}var SA=g({},xr,{key:function(n){if(n.key){var a=vA[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=ec(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?yA[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kd,charCode:function(n){return n.type==="keypress"?ec(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?ec(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),wA=vn(SA),CA=g({},ac,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sv=vn(CA),TA=g({},xr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kd}),EA=vn(TA),jA=g({},yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),AA=vn(jA),NA=g({},ac,{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}),RA=vn(NA),MA=g({},yi,{newState:0,oldState:0}),_A=vn(MA),OA=[9,13,27,32],Gd=ns&&"CompositionEvent"in window,Sr=null;ns&&"documentMode"in document&&(Sr=document.documentMode);var DA=ns&&"TextEvent"in window&&!Sr,wv=ns&&(!Gd||Sr&&8<Sr&&11>=Sr),Cv=" ",Tv=!1;function Ev(n,a){switch(n){case"keyup":return OA.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jv(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ro=!1;function PA(n,a){switch(n){case"compositionend":return jv(a);case"keypress":return a.which!==32?null:(Tv=!0,Cv);case"textInput":return n=a.data,n===Cv&&Tv?null:n;default:return null}}function kA(n,a){if(ro)return n==="compositionend"||!Gd&&Ev(n,a)?(n=vv(),Jl=Hd=Ds=null,ro=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return wv&&a.locale!=="ko"?null:a.data;default:return null}}var LA={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 Av(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!LA[n.type]:a==="textarea"}function Nv(n,a,o,c){io?oo?oo.push(c):oo=[c]:io=c,a=Kc(a,"onChange"),0<a.length&&(o=new nc("onChange","change",null,o,c),n.push({event:o,listeners:a}))}var wr=null,Cr=null;function zA(n){ub(n,0)}function sc(n){var a=gi(n);if(cv(a))return n}function Rv(n,a){if(n==="change")return a}var Mv=!1;if(ns){var Yd;if(ns){var Xd="oninput"in document;if(!Xd){var _v=document.createElement("div");_v.setAttribute("oninput","return;"),Xd=typeof _v.oninput=="function"}Yd=Xd}else Yd=!1;Mv=Yd&&(!document.documentMode||9<document.documentMode)}function Ov(){wr&&(wr.detachEvent("onpropertychange",Dv),Cr=wr=null)}function Dv(n){if(n.propertyName==="value"&&sc(Cr)){var a=[];Nv(a,Cr,n,Bd(n)),gv(zA,a)}}function VA(n,a,o){n==="focusin"?(Ov(),wr=a,Cr=o,wr.attachEvent("onpropertychange",Dv)):n==="focusout"&&Ov()}function BA(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return sc(Cr)}function UA(n,a){if(n==="click")return sc(a)}function IA(n,a){if(n==="input"||n==="change")return sc(a)}function HA(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var kn=typeof Object.is=="function"?Object.is:HA;function Tr(n,a){if(kn(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var o=Object.keys(n),c=Object.keys(a);if(o.length!==c.length)return!1;for(c=0;c<o.length;c++){var p=o[c];if(!Kt.call(a,p)||!kn(n[p],a[p]))return!1}return!0}function Pv(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function kv(n,a){var o=Pv(n);n=0;for(var c;o;){if(o.nodeType===3){if(c=n+o.textContent.length,n<=a&&c>=a)return{node:o,offset:a-n};n=c}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Pv(o)}}function Lv(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?Lv(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function zv(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=Ql(n.document);a instanceof n.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)n=a.contentWindow;else break;a=Ql(n.document)}return a}function Zd(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var FA=ns&&"documentMode"in document&&11>=document.documentMode,lo=null,Qd=null,Er=null,Wd=!1;function Vv(n,a,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Wd||lo==null||lo!==Ql(c)||(c=lo,"selectionStart"in c&&Zd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Er&&Tr(Er,c)||(Er=c,c=Kc(Qd,"onSelect"),0<c.length&&(a=new nc("onSelect","select",null,a,o),n.push({event:a,listeners:c}),a.target=lo)))}function xi(n,a){var o={};return o[n.toLowerCase()]=a.toLowerCase(),o["Webkit"+n]="webkit"+a,o["Moz"+n]="moz"+a,o}var co={animationend:xi("Animation","AnimationEnd"),animationiteration:xi("Animation","AnimationIteration"),animationstart:xi("Animation","AnimationStart"),transitionrun:xi("Transition","TransitionRun"),transitionstart:xi("Transition","TransitionStart"),transitioncancel:xi("Transition","TransitionCancel"),transitionend:xi("Transition","TransitionEnd")},Jd={},Bv={};ns&&(Bv=document.createElement("div").style,"AnimationEvent"in window||(delete co.animationend.animation,delete co.animationiteration.animation,delete co.animationstart.animation),"TransitionEvent"in window||delete co.transitionend.transition);function bi(n){if(Jd[n])return Jd[n];if(!co[n])return n;var a=co[n],o;for(o in a)if(a.hasOwnProperty(o)&&o in Bv)return Jd[n]=a[o];return n}var Uv=bi("animationend"),Iv=bi("animationiteration"),Hv=bi("animationstart"),qA=bi("transitionrun"),$A=bi("transitionstart"),KA=bi("transitioncancel"),Fv=bi("transitionend"),qv=new Map,ef="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ef.push("scrollEnd");function ha(n,a){qv.set(n,a),vi(a,[n])}var ic=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},ea=[],uo=0,tf=0;function oc(){for(var n=uo,a=tf=uo=0;a<n;){var o=ea[a];ea[a++]=null;var c=ea[a];ea[a++]=null;var p=ea[a];ea[a++]=null;var v=ea[a];if(ea[a++]=null,c!==null&&p!==null){var w=c.pending;w===null?p.next=p:(p.next=w.next,w.next=p),c.pending=p}v!==0&&$v(o,p,v)}}function rc(n,a,o,c){ea[uo++]=n,ea[uo++]=a,ea[uo++]=o,ea[uo++]=c,tf|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function nf(n,a,o,c){return rc(n,a,o,c),lc(n)}function Si(n,a){return rc(n,null,null,a),lc(n)}function $v(n,a,o){n.lanes|=o;var c=n.alternate;c!==null&&(c.lanes|=o);for(var p=!1,v=n.return;v!==null;)v.childLanes|=o,c=v.alternate,c!==null&&(c.childLanes|=o),v.tag===22&&(n=v.stateNode,n===null||n._visibility&1||(p=!0)),n=v,v=v.return;return n.tag===3?(v=n.stateNode,p&&a!==null&&(p=31-Et(o),n=v.hiddenUpdates,c=n[p],c===null?n[p]=[a]:c.push(a),a.lane=o|536870912),v):null}function lc(n){if(50<Gr)throw Gr=0,fm=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var fo={};function GA(n,a,o,c){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ln(n,a,o,c){return new GA(n,a,o,c)}function af(n){return n=n.prototype,!(!n||!n.isReactComponent)}function as(n,a){var o=n.alternate;return o===null?(o=Ln(n.tag,a,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=a,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,a=n.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function Kv(n,a){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,a=o.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function cc(n,a,o,c,p,v){var w=0;if(c=n,typeof n=="function")af(n)&&(w=1);else if(typeof n=="string")w=WN(n,o,W.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case X:return n=Ln(31,o,a,p),n.elementType=X,n.lanes=v,n;case T:return wi(o.children,p,v,a);case j:w=8,p|=24;break;case E:return n=Ln(12,o,a,p|2),n.elementType=E,n.lanes=v,n;case M:return n=Ln(13,o,a,p),n.elementType=M,n.lanes=v,n;case z:return n=Ln(19,o,a,p),n.elementType=z,n.lanes=v,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case R:w=10;break e;case A:w=9;break e;case _:w=11;break e;case D:w=14;break e;case P:w=16,c=null;break e}w=29,o=Error(i(130,n===null?"null":typeof n,"")),c=null}return a=Ln(w,o,a,p),a.elementType=n,a.type=c,a.lanes=v,a}function wi(n,a,o,c){return n=Ln(7,n,c,a),n.lanes=o,n}function sf(n,a,o){return n=Ln(6,n,null,a),n.lanes=o,n}function Gv(n){var a=Ln(18,null,null,0);return a.stateNode=n,a}function of(n,a,o){return a=Ln(4,n.children!==null?n.children:[],n.key,a),a.lanes=o,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var Yv=new WeakMap;function ta(n,a){if(typeof n=="object"&&n!==null){var o=Yv.get(n);return o!==void 0?o:(a={value:n,source:a,stack:Aa(a)},Yv.set(n,a),a)}return{value:n,source:a,stack:Aa(a)}}var mo=[],ho=0,uc=null,jr=0,na=[],aa=0,Ps=null,Oa=1,Da="";function ss(n,a){mo[ho++]=jr,mo[ho++]=uc,uc=n,jr=a}function Xv(n,a,o){na[aa++]=Oa,na[aa++]=Da,na[aa++]=Ps,Ps=n;var c=Oa;n=Da;var p=32-Et(c)-1;c&=~(1<<p),o+=1;var v=32-Et(a)+p;if(30<v){var w=p-p%5;v=(c&(1<<w)-1).toString(32),c>>=w,p-=w,Oa=1<<32-Et(a)+p|o<<p|c,Da=v+n}else Oa=1<<v|o<<p|c,Da=n}function rf(n){n.return!==null&&(ss(n,1),Xv(n,1,0))}function lf(n){for(;n===uc;)uc=mo[--ho],mo[ho]=null,jr=mo[--ho],mo[ho]=null;for(;n===Ps;)Ps=na[--aa],na[aa]=null,Da=na[--aa],na[aa]=null,Oa=na[--aa],na[aa]=null}function Zv(n,a){na[aa++]=Oa,na[aa++]=Da,na[aa++]=Ps,Oa=a.id,Da=a.overflow,Ps=n}var Gt=null,st=null,Ie=!1,ks=null,sa=!1,cf=Error(i(519));function Ls(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ar(ta(a,n)),cf}function Qv(n){var a=n.stateNode,o=n.type,c=n.memoizedProps;switch(a[Lt]=n,a[an]=c,o){case"dialog":Ve("cancel",a),Ve("close",a);break;case"iframe":case"object":case"embed":Ve("load",a);break;case"video":case"audio":for(o=0;o<Xr.length;o++)Ve(Xr[o],a);break;case"source":Ve("error",a);break;case"img":case"image":case"link":Ve("error",a),Ve("load",a);break;case"details":Ve("toggle",a);break;case"input":Ve("invalid",a),uv(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ve("invalid",a);break;case"textarea":Ve("invalid",a),fv(a,c.value,c.defaultValue,c.children)}o=c.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||c.suppressHydrationWarning===!0||hb(a.textContent,o)?(c.popover!=null&&(Ve("beforetoggle",a),Ve("toggle",a)),c.onScroll!=null&&Ve("scroll",a),c.onScrollEnd!=null&&Ve("scrollend",a),c.onClick!=null&&(a.onclick=ts),a=!0):a=!1,a||Ls(n,!0)}function Wv(n){for(Gt=n.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:Gt=Gt.return}}function po(n){if(n!==Gt)return!1;if(!Ie)return Wv(n),Ie=!0,!1;var a=n.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||Am(n.type,n.memoizedProps)),o=!o),o&&st&&Ls(n),Wv(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));st=Cb(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));st=Cb(n)}else a===27?(a=st,Zs(n.type)?(n=Om,Om=null,st=n):st=a):st=Gt?oa(n.stateNode.nextSibling):null;return!0}function Ci(){st=Gt=null,Ie=!1}function uf(){var n=ks;return n!==null&&(Sn===null?Sn=n:Sn.push.apply(Sn,n),ks=null),n}function Ar(n){ks===null?ks=[n]:ks.push(n)}var df=O(null),Ti=null,is=null;function zs(n,a,o){I(df,a._currentValue),a._currentValue=o}function os(n){n._currentValue=df.current,V(df)}function ff(n,a,o){for(;n!==null;){var c=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),n===o)break;n=n.return}}function mf(n,a,o,c){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var v=p.dependencies;if(v!==null){var w=p.child;v=v.firstContext;e:for(;v!==null;){var N=v;v=p;for(var L=0;L<a.length;L++)if(N.context===a[L]){v.lanes|=o,N=v.alternate,N!==null&&(N.lanes|=o),ff(v.return,o,n),c||(w=null);break e}v=N.next}}else if(p.tag===18){if(w=p.return,w===null)throw Error(i(341));w.lanes|=o,v=w.alternate,v!==null&&(v.lanes|=o),ff(w,o,n),w=null}else w=p.child;if(w!==null)w.return=p;else for(w=p;w!==null;){if(w===n){w=null;break}if(p=w.sibling,p!==null){p.return=w.return,w=p;break}w=w.return}p=w}}function go(n,a,o,c){n=null;for(var p=a,v=!1;p!==null;){if(!v){if((p.flags&524288)!==0)v=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var w=p.alternate;if(w===null)throw Error(i(387));if(w=w.memoizedProps,w!==null){var N=p.type;kn(p.pendingProps.value,w.value)||(n!==null?n.push(N):n=[N])}}else if(p===K.current){if(w=p.alternate,w===null)throw Error(i(387));w.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(el):n=[el])}p=p.return}n!==null&&mf(a,n,o,c),a.flags|=262144}function dc(n){for(n=n.firstContext;n!==null;){if(!kn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ei(n){Ti=n,is=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Yt(n){return Jv(Ti,n)}function fc(n,a){return Ti===null&&Ei(n),Jv(n,a)}function Jv(n,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},is===null){if(n===null)throw Error(i(308));is=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else is=is.next=a;return o}var YA=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(o,c){n.push(c)}};this.abort=function(){a.aborted=!0,n.forEach(function(o){return o()})}},XA=e.unstable_scheduleCallback,ZA=e.unstable_NormalPriority,At={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hf(){return{controller:new YA,data:new Map,refCount:0}}function Nr(n){n.refCount--,n.refCount===0&&XA(ZA,function(){n.controller.abort()})}var Rr=null,pf=0,vo=0,yo=null;function QA(n,a){if(Rr===null){var o=Rr=[];pf=0,vo=ym(),yo={status:"pending",value:void 0,then:function(c){o.push(c)}}}return pf++,a.then(ey,ey),a}function ey(){if(--pf===0&&Rr!==null){yo!==null&&(yo.status="fulfilled");var n=Rr;Rr=null,vo=0,yo=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function WA(n,a){var o=[],c={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return n.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),c}var ty=k.S;k.S=function(n,a){Vx=Pt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&QA(n,a),ty!==null&&ty(n,a)};var ji=O(null);function gf(){var n=ji.current;return n!==null?n:et.pooledCache}function mc(n,a){a===null?I(ji,ji.current):I(ji,a.pool)}function ny(){var n=gf();return n===null?null:{parent:At._currentValue,pool:n}}var xo=Error(i(460)),vf=Error(i(474)),hc=Error(i(542)),pc={then:function(){}};function ay(n){return n=n.status,n==="fulfilled"||n==="rejected"}function sy(n,a,o){switch(o=n[o],o===void 0?n.push(a):o!==a&&(a.then(ts,ts),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,oy(n),n;default:if(typeof a.status=="string")a.then(ts,ts);else{if(n=et,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=a,n.status="pending",n.then(function(c){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=c}},function(c){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,oy(n),n}throw Ni=a,xo}}function Ai(n){try{var a=n._init;return a(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Ni=o,xo):o}}var Ni=null;function iy(){if(Ni===null)throw Error(i(459));var n=Ni;return Ni=null,n}function oy(n){if(n===xo||n===hc)throw Error(i(483))}var bo=null,Mr=0;function gc(n){var a=Mr;return Mr+=1,bo===null&&(bo=[]),sy(bo,n,a)}function _r(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function vc(n,a){throw a.$$typeof===b?Error(i(525)):(n=Object.prototype.toString.call(a),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function ry(n){function a(F,U){if(n){var q=F.deletions;q===null?(F.deletions=[U],F.flags|=16):q.push(U)}}function o(F,U){if(!n)return null;for(;U!==null;)a(F,U),U=U.sibling;return null}function c(F){for(var U=new Map;F!==null;)F.key!==null?U.set(F.key,F):U.set(F.index,F),F=F.sibling;return U}function p(F,U){return F=as(F,U),F.index=0,F.sibling=null,F}function v(F,U,q){return F.index=q,n?(q=F.alternate,q!==null?(q=q.index,q<U?(F.flags|=67108866,U):q):(F.flags|=67108866,U)):(F.flags|=1048576,U)}function w(F){return n&&F.alternate===null&&(F.flags|=67108866),F}function N(F,U,q,ae){return U===null||U.tag!==6?(U=sf(q,F.mode,ae),U.return=F,U):(U=p(U,q),U.return=F,U)}function L(F,U,q,ae){var Te=q.type;return Te===T?ee(F,U,q.props.children,ae,q.key):U!==null&&(U.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===P&&Ai(Te)===U.type)?(U=p(U,q.props),_r(U,q),U.return=F,U):(U=cc(q.type,q.key,q.props,null,F.mode,ae),_r(U,q),U.return=F,U)}function $(F,U,q,ae){return U===null||U.tag!==4||U.stateNode.containerInfo!==q.containerInfo||U.stateNode.implementation!==q.implementation?(U=of(q,F.mode,ae),U.return=F,U):(U=p(U,q.children||[]),U.return=F,U)}function ee(F,U,q,ae,Te){return U===null||U.tag!==7?(U=wi(q,F.mode,ae,Te),U.return=F,U):(U=p(U,q),U.return=F,U)}function se(F,U,q){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=sf(""+U,F.mode,q),U.return=F,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case S:return q=cc(U.type,U.key,U.props,null,F.mode,q),_r(q,U),q.return=F,q;case C:return U=of(U,F.mode,q),U.return=F,U;case P:return U=Ai(U),se(F,U,q)}if(de(U)||te(U))return U=wi(U,F.mode,q,null),U.return=F,U;if(typeof U.then=="function")return se(F,gc(U),q);if(U.$$typeof===R)return se(F,fc(F,U),q);vc(F,U)}return null}function Y(F,U,q,ae){var Te=U!==null?U.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return Te!==null?null:N(F,U,""+q,ae);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case S:return q.key===Te?L(F,U,q,ae):null;case C:return q.key===Te?$(F,U,q,ae):null;case P:return q=Ai(q),Y(F,U,q,ae)}if(de(q)||te(q))return Te!==null?null:ee(F,U,q,ae,null);if(typeof q.then=="function")return Y(F,U,gc(q),ae);if(q.$$typeof===R)return Y(F,U,fc(F,q),ae);vc(F,q)}return null}function Z(F,U,q,ae,Te){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return F=F.get(q)||null,N(U,F,""+ae,Te);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case S:return F=F.get(ae.key===null?q:ae.key)||null,L(U,F,ae,Te);case C:return F=F.get(ae.key===null?q:ae.key)||null,$(U,F,ae,Te);case P:return ae=Ai(ae),Z(F,U,q,ae,Te)}if(de(ae)||te(ae))return F=F.get(q)||null,ee(U,F,ae,Te,null);if(typeof ae.then=="function")return Z(F,U,q,gc(ae),Te);if(ae.$$typeof===R)return Z(F,U,q,fc(U,ae),Te);vc(U,ae)}return null}function ge(F,U,q,ae){for(var Te=null,qe=null,xe=U,De=U=0,Ue=null;xe!==null&&De<q.length;De++){xe.index>De?(Ue=xe,xe=null):Ue=xe.sibling;var $e=Y(F,xe,q[De],ae);if($e===null){xe===null&&(xe=Ue);break}n&&xe&&$e.alternate===null&&a(F,xe),U=v($e,U,De),qe===null?Te=$e:qe.sibling=$e,qe=$e,xe=Ue}if(De===q.length)return o(F,xe),Ie&&ss(F,De),Te;if(xe===null){for(;De<q.length;De++)xe=se(F,q[De],ae),xe!==null&&(U=v(xe,U,De),qe===null?Te=xe:qe.sibling=xe,qe=xe);return Ie&&ss(F,De),Te}for(xe=c(xe);De<q.length;De++)Ue=Z(xe,F,De,q[De],ae),Ue!==null&&(n&&Ue.alternate!==null&&xe.delete(Ue.key===null?De:Ue.key),U=v(Ue,U,De),qe===null?Te=Ue:qe.sibling=Ue,qe=Ue);return n&&xe.forEach(function(ti){return a(F,ti)}),Ie&&ss(F,De),Te}function Ee(F,U,q,ae){if(q==null)throw Error(i(151));for(var Te=null,qe=null,xe=U,De=U=0,Ue=null,$e=q.next();xe!==null&&!$e.done;De++,$e=q.next()){xe.index>De?(Ue=xe,xe=null):Ue=xe.sibling;var ti=Y(F,xe,$e.value,ae);if(ti===null){xe===null&&(xe=Ue);break}n&&xe&&ti.alternate===null&&a(F,xe),U=v(ti,U,De),qe===null?Te=ti:qe.sibling=ti,qe=ti,xe=Ue}if($e.done)return o(F,xe),Ie&&ss(F,De),Te;if(xe===null){for(;!$e.done;De++,$e=q.next())$e=se(F,$e.value,ae),$e!==null&&(U=v($e,U,De),qe===null?Te=$e:qe.sibling=$e,qe=$e);return Ie&&ss(F,De),Te}for(xe=c(xe);!$e.done;De++,$e=q.next())$e=Z(xe,F,De,$e.value,ae),$e!==null&&(n&&$e.alternate!==null&&xe.delete($e.key===null?De:$e.key),U=v($e,U,De),qe===null?Te=$e:qe.sibling=$e,qe=$e);return n&&xe.forEach(function(cR){return a(F,cR)}),Ie&&ss(F,De),Te}function We(F,U,q,ae){if(typeof q=="object"&&q!==null&&q.type===T&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case S:e:{for(var Te=q.key;U!==null;){if(U.key===Te){if(Te=q.type,Te===T){if(U.tag===7){o(F,U.sibling),ae=p(U,q.props.children),ae.return=F,F=ae;break e}}else if(U.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===P&&Ai(Te)===U.type){o(F,U.sibling),ae=p(U,q.props),_r(ae,q),ae.return=F,F=ae;break e}o(F,U);break}else a(F,U);U=U.sibling}q.type===T?(ae=wi(q.props.children,F.mode,ae,q.key),ae.return=F,F=ae):(ae=cc(q.type,q.key,q.props,null,F.mode,ae),_r(ae,q),ae.return=F,F=ae)}return w(F);case C:e:{for(Te=q.key;U!==null;){if(U.key===Te)if(U.tag===4&&U.stateNode.containerInfo===q.containerInfo&&U.stateNode.implementation===q.implementation){o(F,U.sibling),ae=p(U,q.children||[]),ae.return=F,F=ae;break e}else{o(F,U);break}else a(F,U);U=U.sibling}ae=of(q,F.mode,ae),ae.return=F,F=ae}return w(F);case P:return q=Ai(q),We(F,U,q,ae)}if(de(q))return ge(F,U,q,ae);if(te(q)){if(Te=te(q),typeof Te!="function")throw Error(i(150));return q=Te.call(q),Ee(F,U,q,ae)}if(typeof q.then=="function")return We(F,U,gc(q),ae);if(q.$$typeof===R)return We(F,U,fc(F,q),ae);vc(F,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,U!==null&&U.tag===6?(o(F,U.sibling),ae=p(U,q),ae.return=F,F=ae):(o(F,U),ae=sf(q,F.mode,ae),ae.return=F,F=ae),w(F)):o(F,U)}return function(F,U,q,ae){try{Mr=0;var Te=We(F,U,q,ae);return bo=null,Te}catch(xe){if(xe===xo||xe===hc)throw xe;var qe=Ln(29,xe,null,F.mode);return qe.lanes=ae,qe.return=F,qe}}}var Ri=ry(!0),ly=ry(!1),Vs=!1;function yf(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xf(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Bs(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Us(n,a,o){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Ke&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=lc(n),$v(n,null,o),a}return rc(n,c,a,o),lc(n)}function Or(n,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var c=a.lanes;c&=n.pendingLanes,o|=c,a.lanes=o,tn(n,o)}}function bf(n,a){var o=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,o===c)){var p=null,v=null;if(o=o.firstBaseUpdate,o!==null){do{var w={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};v===null?p=v=w:v=v.next=w,o=o.next}while(o!==null);v===null?p=v=a:v=v.next=a}else p=v=a;o={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:v,shared:c.shared,callbacks:c.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=a:n.next=a,o.lastBaseUpdate=a}var Sf=!1;function Dr(){if(Sf){var n=yo;if(n!==null)throw n}}function Pr(n,a,o,c){Sf=!1;var p=n.updateQueue;Vs=!1;var v=p.firstBaseUpdate,w=p.lastBaseUpdate,N=p.shared.pending;if(N!==null){p.shared.pending=null;var L=N,$=L.next;L.next=null,w===null?v=$:w.next=$,w=L;var ee=n.alternate;ee!==null&&(ee=ee.updateQueue,N=ee.lastBaseUpdate,N!==w&&(N===null?ee.firstBaseUpdate=$:N.next=$,ee.lastBaseUpdate=L))}if(v!==null){var se=p.baseState;w=0,ee=$=L=null,N=v;do{var Y=N.lane&-536870913,Z=Y!==N.lane;if(Z?(Be&Y)===Y:(c&Y)===Y){Y!==0&&Y===vo&&(Sf=!0),ee!==null&&(ee=ee.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var ge=n,Ee=N;Y=a;var We=o;switch(Ee.tag){case 1:if(ge=Ee.payload,typeof ge=="function"){se=ge.call(We,se,Y);break e}se=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Ee.payload,Y=typeof ge=="function"?ge.call(We,se,Y):ge,Y==null)break e;se=g({},se,Y);break e;case 2:Vs=!0}}Y=N.callback,Y!==null&&(n.flags|=64,Z&&(n.flags|=8192),Z=p.callbacks,Z===null?p.callbacks=[Y]:Z.push(Y))}else Z={lane:Y,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ee===null?($=ee=Z,L=se):ee=ee.next=Z,w|=Y;if(N=N.next,N===null){if(N=p.shared.pending,N===null)break;Z=N,N=Z.next,Z.next=null,p.lastBaseUpdate=Z,p.shared.pending=null}}while(!0);ee===null&&(L=se),p.baseState=L,p.firstBaseUpdate=$,p.lastBaseUpdate=ee,v===null&&(p.shared.lanes=0),$s|=w,n.lanes=w,n.memoizedState=se}}function cy(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function uy(n,a){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)cy(o[n],a)}var So=O(null),yc=O(0);function dy(n,a){n=ps,I(yc,n),I(So,a),ps=n|a.baseLanes}function wf(){I(yc,ps),I(So,So.current)}function Cf(){ps=yc.current,V(So),V(yc)}var zn=O(null),ia=null;function Is(n){var a=n.alternate;I(wt,wt.current&1),I(zn,n),ia===null&&(a===null||So.current!==null||a.memoizedState!==null)&&(ia=n)}function Tf(n){I(wt,wt.current),I(zn,n),ia===null&&(ia=n)}function fy(n){n.tag===22?(I(wt,wt.current),I(zn,n),ia===null&&(ia=n)):Hs()}function Hs(){I(wt,wt.current),I(zn,zn.current)}function Vn(n){V(zn),ia===n&&(ia=null),V(wt)}var wt=O(0);function xc(n){for(var a=n;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Mm(o)||_m(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var rs=0,Oe=null,Ze=null,Nt=null,bc=!1,wo=!1,Mi=!1,Sc=0,kr=0,Co=null,JA=0;function gt(){throw Error(i(321))}function Ef(n,a){if(a===null)return!1;for(var o=0;o<a.length&&o<n.length;o++)if(!kn(n[o],a[o]))return!1;return!0}function jf(n,a,o,c,p,v){return rs=v,Oe=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,k.H=n===null||n.memoizedState===null?Xy:If,Mi=!1,v=o(c,p),Mi=!1,wo&&(v=hy(a,o,c,p)),my(n),v}function my(n){k.H=Vr;var a=Ze!==null&&Ze.next!==null;if(rs=0,Nt=Ze=Oe=null,bc=!1,kr=0,Co=null,a)throw Error(i(300));n===null||Rt||(n=n.dependencies,n!==null&&dc(n)&&(Rt=!0))}function hy(n,a,o,c){Oe=n;var p=0;do{if(wo&&(Co=null),kr=0,wo=!1,25<=p)throw Error(i(301));if(p+=1,Nt=Ze=null,n.updateQueue!=null){var v=n.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}k.H=Zy,v=a(o,c)}while(wo);return v}function eN(){var n=k.H,a=n.useState()[0];return a=typeof a.then=="function"?Lr(a):a,n=n.useState()[0],(Ze!==null?Ze.memoizedState:null)!==n&&(Oe.flags|=1024),a}function Af(){var n=Sc!==0;return Sc=0,n}function Nf(n,a,o){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~o}function Rf(n){if(bc){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}bc=!1}rs=0,Nt=Ze=Oe=null,wo=!1,kr=Sc=0,Co=null}function ln(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?Oe.memoizedState=Nt=n:Nt=Nt.next=n,Nt}function Ct(){if(Ze===null){var n=Oe.alternate;n=n!==null?n.memoizedState:null}else n=Ze.next;var a=Nt===null?Oe.memoizedState:Nt.next;if(a!==null)Nt=a,Ze=n;else{if(n===null)throw Oe.alternate===null?Error(i(467)):Error(i(310));Ze=n,n={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},Nt===null?Oe.memoizedState=Nt=n:Nt=Nt.next=n}return Nt}function wc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lr(n){var a=kr;return kr+=1,Co===null&&(Co=[]),n=sy(Co,n,a),a=Oe,(Nt===null?a.memoizedState:Nt.next)===null&&(a=a.alternate,k.H=a===null||a.memoizedState===null?Xy:If),n}function Cc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Lr(n);if(n.$$typeof===R)return Yt(n)}throw Error(i(438,String(n)))}function Mf(n){var a=null,o=Oe.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var c=Oe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=wc(),Oe.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(n),c=0;c<n;c++)o[c]=Q;return a.index++,o}function ls(n,a){return typeof a=="function"?a(n):a}function Tc(n){var a=Ct();return _f(a,Ze,n)}function _f(n,a,o){var c=n.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=o;var p=n.baseQueue,v=c.pending;if(v!==null){if(p!==null){var w=p.next;p.next=v.next,v.next=w}a.baseQueue=p=v,c.pending=null}if(v=n.baseState,p===null)n.memoizedState=v;else{a=p.next;var N=w=null,L=null,$=a,ee=!1;do{var se=$.lane&-536870913;if(se!==$.lane?(Be&se)===se:(rs&se)===se){var Y=$.revertLane;if(Y===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),se===vo&&(ee=!0);else if((rs&Y)===Y){$=$.next,Y===vo&&(ee=!0);continue}else se={lane:0,revertLane:$.revertLane,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},L===null?(N=L=se,w=v):L=L.next=se,Oe.lanes|=Y,$s|=Y;se=$.action,Mi&&o(v,se),v=$.hasEagerState?$.eagerState:o(v,se)}else Y={lane:se,revertLane:$.revertLane,gesture:$.gesture,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},L===null?(N=L=Y,w=v):L=L.next=Y,Oe.lanes|=se,$s|=se;$=$.next}while($!==null&&$!==a);if(L===null?w=v:L.next=N,!kn(v,n.memoizedState)&&(Rt=!0,ee&&(o=yo,o!==null)))throw o;n.memoizedState=v,n.baseState=w,n.baseQueue=L,c.lastRenderedState=v}return p===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function Of(n){var a=Ct(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=n;var c=o.dispatch,p=o.pending,v=a.memoizedState;if(p!==null){o.pending=null;var w=p=p.next;do v=n(v,w.action),w=w.next;while(w!==p);kn(v,a.memoizedState)||(Rt=!0),a.memoizedState=v,a.baseQueue===null&&(a.baseState=v),o.lastRenderedState=v}return[v,c]}function py(n,a,o){var c=Oe,p=Ct(),v=Ie;if(v){if(o===void 0)throw Error(i(407));o=o()}else o=a();var w=!kn((Ze||p).memoizedState,o);if(w&&(p.memoizedState=o,Rt=!0),p=p.queue,kf(yy.bind(null,c,p,n),[n]),p.getSnapshot!==a||w||Nt!==null&&Nt.memoizedState.tag&1){if(c.flags|=2048,To(9,{destroy:void 0},vy.bind(null,c,p,o,a),null),et===null)throw Error(i(349));v||(rs&127)!==0||gy(c,a,o)}return o}function gy(n,a,o){n.flags|=16384,n={getSnapshot:a,value:o},a=Oe.updateQueue,a===null?(a=wc(),Oe.updateQueue=a,a.stores=[n]):(o=a.stores,o===null?a.stores=[n]:o.push(n))}function vy(n,a,o,c){a.value=o,a.getSnapshot=c,xy(a)&&by(n)}function yy(n,a,o){return o(function(){xy(a)&&by(n)})}function xy(n){var a=n.getSnapshot;n=n.value;try{var o=a();return!kn(n,o)}catch{return!0}}function by(n){var a=Si(n,2);a!==null&&wn(a,n,2)}function Df(n){var a=ln();if(typeof n=="function"){var o=n;if(n=o(),Mi){rn(!0);try{o()}finally{rn(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},a}function Sy(n,a,o,c){return n.baseState=o,_f(n,Ze,typeof c=="function"?c:ls)}function tN(n,a,o,c,p){if(Ac(n))throw Error(i(485));if(n=a.action,n!==null){var v={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){v.listeners.push(w)}};k.T!==null?o(!0):v.isTransition=!1,c(v),o=a.pending,o===null?(v.next=a.pending=v,wy(a,v)):(v.next=o.next,a.pending=o.next=v)}}function wy(n,a){var o=a.action,c=a.payload,p=n.state;if(a.isTransition){var v=k.T,w={};k.T=w;try{var N=o(p,c),L=k.S;L!==null&&L(w,N),Cy(n,a,N)}catch($){Pf(n,a,$)}finally{v!==null&&w.types!==null&&(v.types=w.types),k.T=v}}else try{v=o(p,c),Cy(n,a,v)}catch($){Pf(n,a,$)}}function Cy(n,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(c){Ty(n,a,c)},function(c){return Pf(n,a,c)}):Ty(n,a,o)}function Ty(n,a,o){a.status="fulfilled",a.value=o,Ey(a),n.state=o,a=n.pending,a!==null&&(o=a.next,o===a?n.pending=null:(o=o.next,a.next=o,wy(n,o)))}function Pf(n,a,o){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=o,Ey(a),a=a.next;while(a!==c)}n.action=null}function Ey(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function jy(n,a){return a}function Ay(n,a){if(Ie){var o=et.formState;if(o!==null){e:{var c=Oe;if(Ie){if(st){t:{for(var p=st,v=sa;p.nodeType!==8;){if(!v){p=null;break t}if(p=oa(p.nextSibling),p===null){p=null;break t}}v=p.data,p=v==="F!"||v==="F"?p:null}if(p){st=oa(p.nextSibling),c=p.data==="F!";break e}}Ls(c)}c=!1}c&&(a=o[0])}}return o=ln(),o.memoizedState=o.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jy,lastRenderedState:a},o.queue=c,o=Ky.bind(null,Oe,c),c.dispatch=o,c=Df(!1),v=Uf.bind(null,Oe,!1,c.queue),c=ln(),p={state:a,dispatch:null,action:n,pending:null},c.queue=p,o=tN.bind(null,Oe,p,v,o),p.dispatch=o,c.memoizedState=n,[a,o,!1]}function Ny(n){var a=Ct();return Ry(a,Ze,n)}function Ry(n,a,o){if(a=_f(n,a,jy)[0],n=Tc(ls)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Lr(a)}catch(w){throw w===xo?hc:w}else c=a;a=Ct();var p=a.queue,v=p.dispatch;return o!==a.memoizedState&&(Oe.flags|=2048,To(9,{destroy:void 0},nN.bind(null,p,o),null)),[c,v,n]}function nN(n,a){n.action=a}function My(n){var a=Ct(),o=Ze;if(o!==null)return Ry(a,o,n);Ct(),a=a.memoizedState,o=Ct();var c=o.queue.dispatch;return o.memoizedState=n,[a,c,!1]}function To(n,a,o,c){return n={tag:n,create:o,deps:c,inst:a,next:null},a=Oe.updateQueue,a===null&&(a=wc(),Oe.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=n.next=n:(c=o.next,o.next=n,n.next=c,a.lastEffect=n),n}function _y(){return Ct().memoizedState}function Ec(n,a,o,c){var p=ln();Oe.flags|=n,p.memoizedState=To(1|a,{destroy:void 0},o,c===void 0?null:c)}function jc(n,a,o,c){var p=Ct();c=c===void 0?null:c;var v=p.memoizedState.inst;Ze!==null&&c!==null&&Ef(c,Ze.memoizedState.deps)?p.memoizedState=To(a,v,o,c):(Oe.flags|=n,p.memoizedState=To(1|a,v,o,c))}function Oy(n,a){Ec(8390656,8,n,a)}function kf(n,a){jc(2048,8,n,a)}function aN(n){Oe.flags|=4;var a=Oe.updateQueue;if(a===null)a=wc(),Oe.updateQueue=a,a.events=[n];else{var o=a.events;o===null?a.events=[n]:o.push(n)}}function Dy(n){var a=Ct().memoizedState;return aN({ref:a,nextImpl:n}),function(){if((Ke&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function Py(n,a){return jc(4,2,n,a)}function ky(n,a){return jc(4,4,n,a)}function Ly(n,a){if(typeof a=="function"){n=n();var o=a(n);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function zy(n,a,o){o=o!=null?o.concat([n]):null,jc(4,4,Ly.bind(null,a,n),o)}function Lf(){}function Vy(n,a){var o=Ct();a=a===void 0?null:a;var c=o.memoizedState;return a!==null&&Ef(a,c[1])?c[0]:(o.memoizedState=[n,a],n)}function By(n,a){var o=Ct();a=a===void 0?null:a;var c=o.memoizedState;if(a!==null&&Ef(a,c[1]))return c[0];if(c=n(),Mi){rn(!0);try{n()}finally{rn(!1)}}return o.memoizedState=[c,a],c}function zf(n,a,o){return o===void 0||(rs&1073741824)!==0&&(Be&261930)===0?n.memoizedState=a:(n.memoizedState=o,n=Ux(),Oe.lanes|=n,$s|=n,o)}function Uy(n,a,o,c){return kn(o,a)?o:So.current!==null?(n=zf(n,o,c),kn(n,a)||(Rt=!0),n):(rs&42)===0||(rs&1073741824)!==0&&(Be&261930)===0?(Rt=!0,n.memoizedState=o):(n=Ux(),Oe.lanes|=n,$s|=n,a)}function Iy(n,a,o,c,p){var v=H.p;H.p=v!==0&&8>v?v:8;var w=k.T,N={};k.T=N,Uf(n,!1,a,o);try{var L=p(),$=k.S;if($!==null&&$(N,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var ee=WA(L,c);zr(n,a,ee,In(n))}else zr(n,a,c,In(n))}catch(se){zr(n,a,{then:function(){},status:"rejected",reason:se},In())}finally{H.p=v,w!==null&&N.types!==null&&(w.types=N.types),k.T=w}}function sN(){}function Vf(n,a,o,c){if(n.tag!==5)throw Error(i(476));var p=Hy(n).queue;Iy(n,p,a,B,o===null?sN:function(){return Fy(n),o(c)})}function Hy(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:B},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:o},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function Fy(n){var a=Hy(n);a.next===null&&(a=n.alternate.memoizedState),zr(n,a.next.queue,{},In())}function Bf(){return Yt(el)}function qy(){return Ct().memoizedState}function $y(){return Ct().memoizedState}function iN(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var o=In();n=Bs(o);var c=Us(a,n,o);c!==null&&(wn(c,a,o),Or(c,a,o)),a={cache:hf()},n.payload=a;return}a=a.return}}function oN(n,a,o){var c=In();o={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Ac(n)?Gy(a,o):(o=nf(n,a,o,c),o!==null&&(wn(o,n,c),Yy(o,a,c)))}function Ky(n,a,o){var c=In();zr(n,a,o,c)}function zr(n,a,o,c){var p={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Ac(n))Gy(a,p);else{var v=n.alternate;if(n.lanes===0&&(v===null||v.lanes===0)&&(v=a.lastRenderedReducer,v!==null))try{var w=a.lastRenderedState,N=v(w,o);if(p.hasEagerState=!0,p.eagerState=N,kn(N,w))return rc(n,a,p,0),et===null&&oc(),!1}catch{}if(o=nf(n,a,p,c),o!==null)return wn(o,n,c),Yy(o,a,c),!0}return!1}function Uf(n,a,o,c){if(c={lane:2,revertLane:ym(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Ac(n)){if(a)throw Error(i(479))}else a=nf(n,o,c,2),a!==null&&wn(a,n,2)}function Ac(n){var a=n.alternate;return n===Oe||a!==null&&a===Oe}function Gy(n,a){wo=bc=!0;var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}function Yy(n,a,o){if((o&4194048)!==0){var c=a.lanes;c&=n.pendingLanes,o|=c,a.lanes=o,tn(n,o)}}var Vr={readContext:Yt,use:Cc,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};Vr.useEffectEvent=gt;var Xy={readContext:Yt,use:Cc,useCallback:function(n,a){return ln().memoizedState=[n,a===void 0?null:a],n},useContext:Yt,useEffect:Oy,useImperativeHandle:function(n,a,o){o=o!=null?o.concat([n]):null,Ec(4194308,4,Ly.bind(null,a,n),o)},useLayoutEffect:function(n,a){return Ec(4194308,4,n,a)},useInsertionEffect:function(n,a){Ec(4,2,n,a)},useMemo:function(n,a){var o=ln();a=a===void 0?null:a;var c=n();if(Mi){rn(!0);try{n()}finally{rn(!1)}}return o.memoizedState=[c,a],c},useReducer:function(n,a,o){var c=ln();if(o!==void 0){var p=o(a);if(Mi){rn(!0);try{o(a)}finally{rn(!1)}}}else p=a;return c.memoizedState=c.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},c.queue=n,n=n.dispatch=oN.bind(null,Oe,n),[c.memoizedState,n]},useRef:function(n){var a=ln();return n={current:n},a.memoizedState=n},useState:function(n){n=Df(n);var a=n.queue,o=Ky.bind(null,Oe,a);return a.dispatch=o,[n.memoizedState,o]},useDebugValue:Lf,useDeferredValue:function(n,a){var o=ln();return zf(o,n,a)},useTransition:function(){var n=Df(!1);return n=Iy.bind(null,Oe,n.queue,!0,!1),ln().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,o){var c=Oe,p=ln();if(Ie){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),et===null)throw Error(i(349));(Be&127)!==0||gy(c,a,o)}p.memoizedState=o;var v={value:o,getSnapshot:a};return p.queue=v,Oy(yy.bind(null,c,v,n),[n]),c.flags|=2048,To(9,{destroy:void 0},vy.bind(null,c,v,o,a),null),o},useId:function(){var n=ln(),a=et.identifierPrefix;if(Ie){var o=Da,c=Oa;o=(c&~(1<<32-Et(c)-1)).toString(32)+o,a="_"+a+"R_"+o,o=Sc++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=JA++,a="_"+a+"r_"+o.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:Bf,useFormState:Ay,useActionState:Ay,useOptimistic:function(n){var a=ln();a.memoizedState=a.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=Uf.bind(null,Oe,!0,o),o.dispatch=a,[n,a]},useMemoCache:Mf,useCacheRefresh:function(){return ln().memoizedState=iN.bind(null,Oe)},useEffectEvent:function(n){var a=ln(),o={impl:n};return a.memoizedState=o,function(){if((Ke&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},If={readContext:Yt,use:Cc,useCallback:Vy,useContext:Yt,useEffect:kf,useImperativeHandle:zy,useInsertionEffect:Py,useLayoutEffect:ky,useMemo:By,useReducer:Tc,useRef:_y,useState:function(){return Tc(ls)},useDebugValue:Lf,useDeferredValue:function(n,a){var o=Ct();return Uy(o,Ze.memoizedState,n,a)},useTransition:function(){var n=Tc(ls)[0],a=Ct().memoizedState;return[typeof n=="boolean"?n:Lr(n),a]},useSyncExternalStore:py,useId:qy,useHostTransitionStatus:Bf,useFormState:Ny,useActionState:Ny,useOptimistic:function(n,a){var o=Ct();return Sy(o,Ze,n,a)},useMemoCache:Mf,useCacheRefresh:$y};If.useEffectEvent=Dy;var Zy={readContext:Yt,use:Cc,useCallback:Vy,useContext:Yt,useEffect:kf,useImperativeHandle:zy,useInsertionEffect:Py,useLayoutEffect:ky,useMemo:By,useReducer:Of,useRef:_y,useState:function(){return Of(ls)},useDebugValue:Lf,useDeferredValue:function(n,a){var o=Ct();return Ze===null?zf(o,n,a):Uy(o,Ze.memoizedState,n,a)},useTransition:function(){var n=Of(ls)[0],a=Ct().memoizedState;return[typeof n=="boolean"?n:Lr(n),a]},useSyncExternalStore:py,useId:qy,useHostTransitionStatus:Bf,useFormState:My,useActionState:My,useOptimistic:function(n,a){var o=Ct();return Ze!==null?Sy(o,Ze,n,a):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:Mf,useCacheRefresh:$y};Zy.useEffectEvent=Dy;function Hf(n,a,o,c){a=n.memoizedState,o=o(c,a),o=o==null?a:g({},a,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var Ff={enqueueSetState:function(n,a,o){n=n._reactInternals;var c=In(),p=Bs(c);p.payload=a,o!=null&&(p.callback=o),a=Us(n,p,c),a!==null&&(wn(a,n,c),Or(a,n,c))},enqueueReplaceState:function(n,a,o){n=n._reactInternals;var c=In(),p=Bs(c);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Us(n,p,c),a!==null&&(wn(a,n,c),Or(a,n,c))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var o=In(),c=Bs(o);c.tag=2,a!=null&&(c.callback=a),a=Us(n,c,o),a!==null&&(wn(a,n,o),Or(a,n,o))}};function Qy(n,a,o,c,p,v,w){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,v,w):a.prototype&&a.prototype.isPureReactComponent?!Tr(o,c)||!Tr(p,v):!0}function Wy(n,a,o,c){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,c),a.state!==n&&Ff.enqueueReplaceState(a,a.state,null)}function _i(n,a){var o=a;if("ref"in a){o={};for(var c in a)c!=="ref"&&(o[c]=a[c])}if(n=n.defaultProps){o===a&&(o=g({},o));for(var p in n)o[p]===void 0&&(o[p]=n[p])}return o}function Jy(n){ic(n)}function ex(n){console.error(n)}function tx(n){ic(n)}function Nc(n,a){try{var o=n.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function nx(n,a,o){try{var c=n.onCaughtError;c(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function qf(n,a,o){return o=Bs(o),o.tag=3,o.payload={element:null},o.callback=function(){Nc(n,a)},o}function ax(n){return n=Bs(n),n.tag=3,n}function sx(n,a,o,c){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var v=c.value;n.payload=function(){return p(v)},n.callback=function(){nx(a,o,c)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(n.callback=function(){nx(a,o,c),typeof p!="function"&&(Ks===null?Ks=new Set([this]):Ks.add(this));var N=c.stack;this.componentDidCatch(c.value,{componentStack:N!==null?N:""})})}function rN(n,a,o,c,p){if(o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=o.alternate,a!==null&&go(a,o,p,!0),o=zn.current,o!==null){switch(o.tag){case 31:case 13:return ia===null?Uc():o.alternate===null&&vt===0&&(vt=3),o.flags&=-257,o.flags|=65536,o.lanes=p,c===pc?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([c]):a.add(c),pm(n,c,p)),!1;case 22:return o.flags|=65536,c===pc?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([c]):o.add(c)),pm(n,c,p)),!1}throw Error(i(435,o.tag))}return pm(n,c,p),Uc(),!1}if(Ie)return a=zn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==cf&&(n=Error(i(422),{cause:c}),Ar(ta(n,o)))):(c!==cf&&(a=Error(i(423),{cause:c}),Ar(ta(a,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,c=ta(c,o),p=qf(n.stateNode,c,p),bf(n,p),vt!==4&&(vt=2)),!1;var v=Error(i(520),{cause:c});if(v=ta(v,o),Kr===null?Kr=[v]:Kr.push(v),vt!==4&&(vt=2),a===null)return!0;c=ta(c,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=qf(o.stateNode,c,n),bf(o,n),!1;case 1:if(a=o.type,v=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Ks===null||!Ks.has(v))))return o.flags|=65536,p&=-p,o.lanes|=p,p=ax(p),sx(p,n,o,c),bf(o,p),!1}o=o.return}while(o!==null);return!1}var $f=Error(i(461)),Rt=!1;function Xt(n,a,o,c){a.child=n===null?ly(a,null,o,c):Ri(a,n.child,o,c)}function ix(n,a,o,c,p){o=o.render;var v=a.ref;if("ref"in c){var w={};for(var N in c)N!=="ref"&&(w[N]=c[N])}else w=c;return Ei(a),c=jf(n,a,o,w,v,p),N=Af(),n!==null&&!Rt?(Nf(n,a,p),cs(n,a,p)):(Ie&&N&&rf(a),a.flags|=1,Xt(n,a,c,p),a.child)}function ox(n,a,o,c,p){if(n===null){var v=o.type;return typeof v=="function"&&!af(v)&&v.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=v,rx(n,a,v,c,p)):(n=cc(o.type,null,c,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(v=n.child,!Jf(n,p)){var w=v.memoizedProps;if(o=o.compare,o=o!==null?o:Tr,o(w,c)&&n.ref===a.ref)return cs(n,a,p)}return a.flags|=1,n=as(v,c),n.ref=a.ref,n.return=a,a.child=n}function rx(n,a,o,c,p){if(n!==null){var v=n.memoizedProps;if(Tr(v,c)&&n.ref===a.ref)if(Rt=!1,a.pendingProps=c=v,Jf(n,p))(n.flags&131072)!==0&&(Rt=!0);else return a.lanes=n.lanes,cs(n,a,p)}return Kf(n,a,o,c,p)}function lx(n,a,o,c){var p=c.children,v=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(v=v!==null?v.baseLanes|o:o,n!==null){for(c=a.child=n.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~v}else c=0,a.child=null;return cx(n,a,v,o,c)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&mc(a,v!==null?v.cachePool:null),v!==null?dy(a,v):wf(),fy(a);else return c=a.lanes=536870912,cx(n,a,v!==null?v.baseLanes|o:o,o,c)}else v!==null?(mc(a,v.cachePool),dy(a,v),Hs(),a.memoizedState=null):(n!==null&&mc(a,null),wf(),Hs());return Xt(n,a,p,o),a.child}function Br(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function cx(n,a,o,c,p){var v=gf();return v=v===null?null:{parent:At._currentValue,pool:v},a.memoizedState={baseLanes:o,cachePool:v},n!==null&&mc(a,null),wf(),fy(a),n!==null&&go(n,a,c,!0),a.childLanes=p,null}function Rc(n,a){return a=_c({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function ux(n,a,o){return Ri(a,n.child,null,o),n=Rc(a,a.pendingProps),n.flags|=2,Vn(a),a.memoizedState=null,n}function lN(n,a,o){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(Ie){if(c.mode==="hidden")return n=Rc(a,c),a.lanes=536870912,Br(null,n);if(Tf(a),(n=st)?(n=wb(n,sa),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ps!==null?{id:Oa,overflow:Da}:null,retryLane:536870912,hydrationErrors:null},o=Gv(n),o.return=a,a.child=o,Gt=a,st=null)):n=null,n===null)throw Ls(a);return a.lanes=536870912,null}return Rc(a,c)}var v=n.memoizedState;if(v!==null){var w=v.dehydrated;if(Tf(a),p)if(a.flags&256)a.flags&=-257,a=ux(n,a,o);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(Rt||go(n,a,o,!1),p=(o&n.childLanes)!==0,Rt||p){if(c=et,c!==null&&(w=nn(c,o),w!==0&&w!==v.retryLane))throw v.retryLane=w,Si(n,w),wn(c,n,w),$f;Uc(),a=ux(n,a,o)}else n=v.treeContext,st=oa(w.nextSibling),Gt=a,Ie=!0,ks=null,sa=!1,n!==null&&Zv(a,n),a=Rc(a,c),a.flags|=4096;return a}return n=as(n.child,{mode:c.mode,children:c.children}),n.ref=a.ref,a.child=n,n.return=a,n}function Mc(n,a){var o=a.ref;if(o===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(n===null||n.ref!==o)&&(a.flags|=4194816)}}function Kf(n,a,o,c,p){return Ei(a),o=jf(n,a,o,c,void 0,p),c=Af(),n!==null&&!Rt?(Nf(n,a,p),cs(n,a,p)):(Ie&&c&&rf(a),a.flags|=1,Xt(n,a,o,p),a.child)}function dx(n,a,o,c,p,v){return Ei(a),a.updateQueue=null,o=hy(a,c,o,p),my(n),c=Af(),n!==null&&!Rt?(Nf(n,a,v),cs(n,a,v)):(Ie&&c&&rf(a),a.flags|=1,Xt(n,a,o,v),a.child)}function fx(n,a,o,c,p){if(Ei(a),a.stateNode===null){var v=fo,w=o.contextType;typeof w=="object"&&w!==null&&(v=Yt(w)),v=new o(c,v),a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Ff,a.stateNode=v,v._reactInternals=a,v=a.stateNode,v.props=c,v.state=a.memoizedState,v.refs={},yf(a),w=o.contextType,v.context=typeof w=="object"&&w!==null?Yt(w):fo,v.state=a.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(Hf(a,o,w,c),v.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(w=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),w!==v.state&&Ff.enqueueReplaceState(v,v.state,null),Pr(a,c,v,p),Dr(),v.state=a.memoizedState),typeof v.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(n===null){v=a.stateNode;var N=a.memoizedProps,L=_i(o,N);v.props=L;var $=v.context,ee=o.contextType;w=fo,typeof ee=="object"&&ee!==null&&(w=Yt(ee));var se=o.getDerivedStateFromProps;ee=typeof se=="function"||typeof v.getSnapshotBeforeUpdate=="function",N=a.pendingProps!==N,ee||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(N||$!==w)&&Wy(a,v,c,w),Vs=!1;var Y=a.memoizedState;v.state=Y,Pr(a,c,v,p),Dr(),$=a.memoizedState,N||Y!==$||Vs?(typeof se=="function"&&(Hf(a,o,se,c),$=a.memoizedState),(L=Vs||Qy(a,o,L,c,Y,$,w))?(ee||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(a.flags|=4194308)):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=$),v.props=c,v.state=$,v.context=w,c=L):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{v=a.stateNode,xf(n,a),w=a.memoizedProps,ee=_i(o,w),v.props=ee,se=a.pendingProps,Y=v.context,$=o.contextType,L=fo,typeof $=="object"&&$!==null&&(L=Yt($)),N=o.getDerivedStateFromProps,($=typeof N=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(w!==se||Y!==L)&&Wy(a,v,c,L),Vs=!1,Y=a.memoizedState,v.state=Y,Pr(a,c,v,p),Dr();var Z=a.memoizedState;w!==se||Y!==Z||Vs||n!==null&&n.dependencies!==null&&dc(n.dependencies)?(typeof N=="function"&&(Hf(a,o,N,c),Z=a.memoizedState),(ee=Vs||Qy(a,o,ee,c,Y,Z,L)||n!==null&&n.dependencies!==null&&dc(n.dependencies))?($||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(c,Z,L),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(c,Z,L)),typeof v.componentDidUpdate=="function"&&(a.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof v.componentDidUpdate!="function"||w===n.memoizedProps&&Y===n.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&Y===n.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=Z),v.props=c,v.state=Z,v.context=L,c=ee):(typeof v.componentDidUpdate!="function"||w===n.memoizedProps&&Y===n.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&Y===n.memoizedState||(a.flags|=1024),c=!1)}return v=c,Mc(n,a),c=(a.flags&128)!==0,v||c?(v=a.stateNode,o=c&&typeof o.getDerivedStateFromError!="function"?null:v.render(),a.flags|=1,n!==null&&c?(a.child=Ri(a,n.child,null,p),a.child=Ri(a,null,o,p)):Xt(n,a,o,p),a.memoizedState=v.state,n=a.child):n=cs(n,a,p),n}function mx(n,a,o,c){return Ci(),a.flags|=256,Xt(n,a,o,c),a.child}var Gf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yf(n){return{baseLanes:n,cachePool:ny()}}function Xf(n,a,o){return n=n!==null?n.childLanes&~o:0,a&&(n|=Un),n}function hx(n,a,o){var c=a.pendingProps,p=!1,v=(a.flags&128)!==0,w;if((w=v)||(w=n!==null&&n.memoizedState===null?!1:(wt.current&2)!==0),w&&(p=!0,a.flags&=-129),w=(a.flags&32)!==0,a.flags&=-33,n===null){if(Ie){if(p?Is(a):Hs(),(n=st)?(n=wb(n,sa),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ps!==null?{id:Oa,overflow:Da}:null,retryLane:536870912,hydrationErrors:null},o=Gv(n),o.return=a,a.child=o,Gt=a,st=null)):n=null,n===null)throw Ls(a);return _m(n)?a.lanes=32:a.lanes=536870912,null}var N=c.children;return c=c.fallback,p?(Hs(),p=a.mode,N=_c({mode:"hidden",children:N},p),c=wi(c,p,o,null),N.return=a,c.return=a,N.sibling=c,a.child=N,c=a.child,c.memoizedState=Yf(o),c.childLanes=Xf(n,w,o),a.memoizedState=Gf,Br(null,c)):(Is(a),Zf(a,N))}var L=n.memoizedState;if(L!==null&&(N=L.dehydrated,N!==null)){if(v)a.flags&256?(Is(a),a.flags&=-257,a=Qf(n,a,o)):a.memoizedState!==null?(Hs(),a.child=n.child,a.flags|=128,a=null):(Hs(),N=c.fallback,p=a.mode,c=_c({mode:"visible",children:c.children},p),N=wi(N,p,o,null),N.flags|=2,c.return=a,N.return=a,c.sibling=N,a.child=c,Ri(a,n.child,null,o),c=a.child,c.memoizedState=Yf(o),c.childLanes=Xf(n,w,o),a.memoizedState=Gf,a=Br(null,c));else if(Is(a),_m(N)){if(w=N.nextSibling&&N.nextSibling.dataset,w)var $=w.dgst;w=$,c=Error(i(419)),c.stack="",c.digest=w,Ar({value:c,source:null,stack:null}),a=Qf(n,a,o)}else if(Rt||go(n,a,o,!1),w=(o&n.childLanes)!==0,Rt||w){if(w=et,w!==null&&(c=nn(w,o),c!==0&&c!==L.retryLane))throw L.retryLane=c,Si(n,c),wn(w,n,c),$f;Mm(N)||Uc(),a=Qf(n,a,o)}else Mm(N)?(a.flags|=192,a.child=n.child,a=null):(n=L.treeContext,st=oa(N.nextSibling),Gt=a,Ie=!0,ks=null,sa=!1,n!==null&&Zv(a,n),a=Zf(a,c.children),a.flags|=4096);return a}return p?(Hs(),N=c.fallback,p=a.mode,L=n.child,$=L.sibling,c=as(L,{mode:"hidden",children:c.children}),c.subtreeFlags=L.subtreeFlags&65011712,$!==null?N=as($,N):(N=wi(N,p,o,null),N.flags|=2),N.return=a,c.return=a,c.sibling=N,a.child=c,Br(null,c),c=a.child,N=n.child.memoizedState,N===null?N=Yf(o):(p=N.cachePool,p!==null?(L=At._currentValue,p=p.parent!==L?{parent:L,pool:L}:p):p=ny(),N={baseLanes:N.baseLanes|o,cachePool:p}),c.memoizedState=N,c.childLanes=Xf(n,w,o),a.memoizedState=Gf,Br(n.child,c)):(Is(a),o=n.child,n=o.sibling,o=as(o,{mode:"visible",children:c.children}),o.return=a,o.sibling=null,n!==null&&(w=a.deletions,w===null?(a.deletions=[n],a.flags|=16):w.push(n)),a.child=o,a.memoizedState=null,o)}function Zf(n,a){return a=_c({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function _c(n,a){return n=Ln(22,n,null,a),n.lanes=0,n}function Qf(n,a,o){return Ri(a,n.child,null,o),n=Zf(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function px(n,a,o){n.lanes|=a;var c=n.alternate;c!==null&&(c.lanes|=a),ff(n.return,a,o)}function Wf(n,a,o,c,p,v){var w=n.memoizedState;w===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:p,treeForkCount:v}:(w.isBackwards=a,w.rendering=null,w.renderingStartTime=0,w.last=c,w.tail=o,w.tailMode=p,w.treeForkCount=v)}function gx(n,a,o){var c=a.pendingProps,p=c.revealOrder,v=c.tail;c=c.children;var w=wt.current,N=(w&2)!==0;if(N?(w=w&1|2,a.flags|=128):w&=1,I(wt,w),Xt(n,a,c,o),c=Ie?jr:0,!N&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&px(n,o,a);else if(n.tag===19)px(n,o,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(o=a.child,p=null;o!==null;)n=o.alternate,n!==null&&xc(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),Wf(a,!1,p,o,v,c);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&xc(n)===null){a.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}Wf(a,!0,o,null,v,c);break;case"together":Wf(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function cs(n,a,o){if(n!==null&&(a.dependencies=n.dependencies),$s|=a.lanes,(o&a.childLanes)===0)if(n!==null){if(go(n,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(i(153));if(a.child!==null){for(n=a.child,o=as(n,n.pendingProps),a.child=o,o.return=a;n.sibling!==null;)n=n.sibling,o=o.sibling=as(n,n.pendingProps),o.return=a;o.sibling=null}return a.child}function Jf(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&dc(n)))}function cN(n,a,o){switch(a.tag){case 3:ie(a,a.stateNode.containerInfo),zs(a,At,n.memoizedState.cache),Ci();break;case 27:case 5:be(a);break;case 4:ie(a,a.stateNode.containerInfo);break;case 10:zs(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Tf(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(Is(a),a.flags|=128,null):(o&a.child.childLanes)!==0?hx(n,a,o):(Is(a),n=cs(n,a,o),n!==null?n.sibling:null);Is(a);break;case 19:var p=(n.flags&128)!==0;if(c=(o&a.childLanes)!==0,c||(go(n,a,o,!1),c=(o&a.childLanes)!==0),p){if(c)return gx(n,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),I(wt,wt.current),c)break;return null;case 22:return a.lanes=0,lx(n,a,o,a.pendingProps);case 24:zs(a,At,n.memoizedState.cache)}return cs(n,a,o)}function vx(n,a,o){if(n!==null)if(n.memoizedProps!==a.pendingProps)Rt=!0;else{if(!Jf(n,o)&&(a.flags&128)===0)return Rt=!1,cN(n,a,o);Rt=(n.flags&131072)!==0}else Rt=!1,Ie&&(a.flags&1048576)!==0&&Xv(a,jr,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(n=Ai(a.elementType),a.type=n,typeof n=="function")af(n)?(c=_i(n,c),a.tag=1,a=fx(null,a,n,c,o)):(a.tag=0,a=Kf(null,a,n,c,o));else{if(n!=null){var p=n.$$typeof;if(p===_){a.tag=11,a=ix(null,a,n,c,o);break e}else if(p===D){a.tag=14,a=ox(null,a,n,c,o);break e}}throw a=re(n)||n,Error(i(306,a,""))}}return a;case 0:return Kf(n,a,a.type,a.pendingProps,o);case 1:return c=a.type,p=_i(c,a.pendingProps),fx(n,a,c,p,o);case 3:e:{if(ie(a,a.stateNode.containerInfo),n===null)throw Error(i(387));c=a.pendingProps;var v=a.memoizedState;p=v.element,xf(n,a),Pr(a,c,null,o);var w=a.memoizedState;if(c=w.cache,zs(a,At,c),c!==v.cache&&mf(a,[At],o,!0),Dr(),c=w.element,v.isDehydrated)if(v={element:c,isDehydrated:!1,cache:w.cache},a.updateQueue.baseState=v,a.memoizedState=v,a.flags&256){a=mx(n,a,c,o);break e}else if(c!==p){p=ta(Error(i(424)),a),Ar(p),a=mx(n,a,c,o);break e}else for(n=a.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,st=oa(n.firstChild),Gt=a,Ie=!0,ks=null,sa=!0,o=ly(a,null,c,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ci(),c===p){a=cs(n,a,o);break e}Xt(n,a,c,o)}a=a.child}return a;case 26:return Mc(n,a),n===null?(o=Nb(a.type,null,a.pendingProps,null))?a.memoizedState=o:Ie||(o=a.type,n=a.pendingProps,c=Gc(fe.current).createElement(o),c[Lt]=a,c[an]=n,Zt(c,o,n),St(c),a.stateNode=c):a.memoizedState=Nb(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return be(a),n===null&&Ie&&(c=a.stateNode=Eb(a.type,a.pendingProps,fe.current),Gt=a,sa=!0,p=st,Zs(a.type)?(Om=p,st=oa(c.firstChild)):st=p),Xt(n,a,a.pendingProps.children,o),Mc(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&Ie&&((p=c=st)&&(c=BN(c,a.type,a.pendingProps,sa),c!==null?(a.stateNode=c,Gt=a,st=oa(c.firstChild),sa=!1,p=!0):p=!1),p||Ls(a)),be(a),p=a.type,v=a.pendingProps,w=n!==null?n.memoizedProps:null,c=v.children,Am(p,v)?c=null:w!==null&&Am(p,w)&&(a.flags|=32),a.memoizedState!==null&&(p=jf(n,a,eN,null,null,o),el._currentValue=p),Mc(n,a),Xt(n,a,c,o),a.child;case 6:return n===null&&Ie&&((n=o=st)&&(o=UN(o,a.pendingProps,sa),o!==null?(a.stateNode=o,Gt=a,st=null,n=!0):n=!1),n||Ls(a)),null;case 13:return hx(n,a,o);case 4:return ie(a,a.stateNode.containerInfo),c=a.pendingProps,n===null?a.child=Ri(a,null,c,o):Xt(n,a,c,o),a.child;case 11:return ix(n,a,a.type,a.pendingProps,o);case 7:return Xt(n,a,a.pendingProps,o),a.child;case 8:return Xt(n,a,a.pendingProps.children,o),a.child;case 12:return Xt(n,a,a.pendingProps.children,o),a.child;case 10:return c=a.pendingProps,zs(a,a.type,c.value),Xt(n,a,c.children,o),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,Ei(a),p=Yt(p),c=c(p),a.flags|=1,Xt(n,a,c,o),a.child;case 14:return ox(n,a,a.type,a.pendingProps,o);case 15:return rx(n,a,a.type,a.pendingProps,o);case 19:return gx(n,a,o);case 31:return lN(n,a,o);case 22:return lx(n,a,o,a.pendingProps);case 24:return Ei(a),c=Yt(At),n===null?(p=gf(),p===null&&(p=et,v=hf(),p.pooledCache=v,v.refCount++,v!==null&&(p.pooledCacheLanes|=o),p=v),a.memoizedState={parent:c,cache:p},yf(a),zs(a,At,p)):((n.lanes&o)!==0&&(xf(n,a),Pr(a,null,null,o),Dr()),p=n.memoizedState,v=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),zs(a,At,c)):(c=v.cache,zs(a,At,c),c!==p.cache&&mf(a,[At],o,!0))),Xt(n,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function us(n){n.flags|=4}function em(n,a,o,c,p){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(qx())n.flags|=8192;else throw Ni=pc,vf}else n.flags&=-16777217}function yx(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Db(a))if(qx())n.flags|=8192;else throw Ni=pc,vf}function Oc(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?ot():536870912,n.lanes|=a,No|=a)}function Ur(n,a){if(!Ie)switch(n.tailMode){case"hidden":a=n.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function it(n){var a=n.alternate!==null&&n.alternate.child===n.child,o=0,c=0;if(a)for(var p=n.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=c,n.childLanes=o,a}function uN(n,a,o){var c=a.pendingProps;switch(lf(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(a),null;case 1:return it(a),null;case 3:return o=a.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),os(At),me(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(po(a)?us(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,uf())),it(a),null;case 26:var p=a.type,v=a.memoizedState;return n===null?(us(a),v!==null?(it(a),yx(a,v)):(it(a),em(a,p,null,c,o))):v?v!==n.memoizedState?(us(a),it(a),yx(a,v)):(it(a),a.flags&=-16777217):(n=n.memoizedProps,n!==c&&us(a),it(a),em(a,p,n,c,o)),null;case 27:if(je(a),o=fe.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==c&&us(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return it(a),null}n=W.current,po(a)?Qv(a):(n=Eb(p,c,o),a.stateNode=n,us(a))}return it(a),null;case 5:if(je(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==c&&us(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return it(a),null}if(v=W.current,po(a))Qv(a);else{var w=Gc(fe.current);switch(v){case 1:v=w.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:v=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":v=w.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":v=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":v=w.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof c.is=="string"?w.createElement("select",{is:c.is}):w.createElement("select"),c.multiple?v.multiple=!0:c.size&&(v.size=c.size);break;default:v=typeof c.is=="string"?w.createElement(p,{is:c.is}):w.createElement(p)}}v[Lt]=a,v[an]=c;e:for(w=a.child;w!==null;){if(w.tag===5||w.tag===6)v.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===a)break e;for(;w.sibling===null;){if(w.return===null||w.return===a)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}a.stateNode=v;e:switch(Zt(v,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&us(a)}}return it(a),em(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,o),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==c&&us(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(i(166));if(n=fe.current,po(a)){if(n=a.stateNode,o=a.memoizedProps,c=null,p=Gt,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}n[Lt]=a,n=!!(n.nodeValue===o||c!==null&&c.suppressHydrationWarning===!0||hb(n.nodeValue,o)),n||Ls(a,!0)}else n=Gc(n).createTextNode(c),n[Lt]=a,a.stateNode=n}return it(a),null;case 31:if(o=a.memoizedState,n===null||n.memoizedState!==null){if(c=po(a),o!==null){if(n===null){if(!c)throw Error(i(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[Lt]=a}else Ci(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;it(a),n=!1}else o=uf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return a.flags&256?(Vn(a),a):(Vn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return it(a),null;case 13:if(c=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=po(a),c!==null&&c.dehydrated!==null){if(n===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[Lt]=a}else Ci(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;it(a),p=!1}else p=uf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Vn(a),a):(Vn(a),null)}return Vn(a),(a.flags&128)!==0?(a.lanes=o,a):(o=c!==null,n=n!==null&&n.memoizedState!==null,o&&(c=a.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==p&&(c.flags|=2048)),o!==n&&o&&(a.child.flags|=8192),Oc(a,a.updateQueue),it(a),null);case 4:return me(),n===null&&wm(a.stateNode.containerInfo),it(a),null;case 10:return os(a.type),it(a),null;case 19:if(V(wt),c=a.memoizedState,c===null)return it(a),null;if(p=(a.flags&128)!==0,v=c.rendering,v===null)if(p)Ur(c,!1);else{if(vt!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(v=xc(n),v!==null){for(a.flags|=128,Ur(c,!1),n=v.updateQueue,a.updateQueue=n,Oc(a,n),a.subtreeFlags=0,n=o,o=a.child;o!==null;)Kv(o,n),o=o.sibling;return I(wt,wt.current&1|2),Ie&&ss(a,c.treeForkCount),a.child}n=n.sibling}c.tail!==null&&Pt()>zc&&(a.flags|=128,p=!0,Ur(c,!1),a.lanes=4194304)}else{if(!p)if(n=xc(v),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,Oc(a,n),Ur(c,!0),c.tail===null&&c.tailMode==="hidden"&&!v.alternate&&!Ie)return it(a),null}else 2*Pt()-c.renderingStartTime>zc&&o!==536870912&&(a.flags|=128,p=!0,Ur(c,!1),a.lanes=4194304);c.isBackwards?(v.sibling=a.child,a.child=v):(n=c.last,n!==null?n.sibling=v:a.child=v,c.last=v)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=Pt(),n.sibling=null,o=wt.current,I(wt,p?o&1|2:o&1),Ie&&ss(a,c.treeForkCount),n):(it(a),null);case 22:case 23:return Vn(a),Cf(),c=a.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(o&536870912)!==0&&(a.flags&128)===0&&(it(a),a.subtreeFlags&6&&(a.flags|=8192)):it(a),o=a.updateQueue,o!==null&&Oc(a,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==o&&(a.flags|=2048),n!==null&&V(ji),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),os(At),it(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function dN(n,a){switch(lf(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return os(At),me(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return je(a),null;case 31:if(a.memoizedState!==null){if(Vn(a),a.alternate===null)throw Error(i(340));Ci()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(Vn(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Ci()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return V(wt),null;case 4:return me(),null;case 10:return os(a.type),null;case 22:case 23:return Vn(a),Cf(),n!==null&&V(ji),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return os(At),null;case 25:return null;default:return null}}function xx(n,a){switch(lf(a),a.tag){case 3:os(At),me();break;case 26:case 27:case 5:je(a);break;case 4:me();break;case 31:a.memoizedState!==null&&Vn(a);break;case 13:Vn(a);break;case 19:V(wt);break;case 10:os(a.type);break;case 22:case 23:Vn(a),Cf(),n!==null&&V(ji);break;case 24:os(At)}}function Ir(n,a){try{var o=a.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var p=c.next;o=p;do{if((o.tag&n)===n){c=void 0;var v=o.create,w=o.inst;c=v(),w.destroy=c}o=o.next}while(o!==p)}}catch(N){Xe(a,a.return,N)}}function Fs(n,a,o){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var v=p.next;c=v;do{if((c.tag&n)===n){var w=c.inst,N=w.destroy;if(N!==void 0){w.destroy=void 0,p=a;var L=o,$=N;try{$()}catch(ee){Xe(p,L,ee)}}}c=c.next}while(c!==v)}}catch(ee){Xe(a,a.return,ee)}}function bx(n){var a=n.updateQueue;if(a!==null){var o=n.stateNode;try{uy(a,o)}catch(c){Xe(n,n.return,c)}}}function Sx(n,a,o){o.props=_i(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(c){Xe(n,a,c)}}function Hr(n,a){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof o=="function"?n.refCleanup=o(c):o.current=c}}catch(p){Xe(n,a,p)}}function Pa(n,a){var o=n.ref,c=n.refCleanup;if(o!==null)if(typeof c=="function")try{c()}catch(p){Xe(n,a,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){Xe(n,a,p)}else o.current=null}function wx(n){var a=n.type,o=n.memoizedProps,c=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&c.focus();break e;case"img":o.src?c.src=o.src:o.srcSet&&(c.srcset=o.srcSet)}}catch(p){Xe(n,n.return,p)}}function tm(n,a,o){try{var c=n.stateNode;DN(c,n.type,o,a),c[an]=a}catch(p){Xe(n,n.return,p)}}function Cx(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Zs(n.type)||n.tag===4}function nm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Cx(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&&Zs(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 am(n,a,o){var c=n.tag;if(c===5||c===6)n=n.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(n),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=ts));else if(c!==4&&(c===27&&Zs(n.type)&&(o=n.stateNode,a=null),n=n.child,n!==null))for(am(n,a,o),n=n.sibling;n!==null;)am(n,a,o),n=n.sibling}function Dc(n,a,o){var c=n.tag;if(c===5||c===6)n=n.stateNode,a?o.insertBefore(n,a):o.appendChild(n);else if(c!==4&&(c===27&&Zs(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(Dc(n,a,o),n=n.sibling;n!==null;)Dc(n,a,o),n=n.sibling}function Tx(n){var a=n.stateNode,o=n.memoizedProps;try{for(var c=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Zt(a,c,o),a[Lt]=n,a[an]=o}catch(v){Xe(n,n.return,v)}}var ds=!1,Mt=!1,sm=!1,Ex=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function fN(n,a){if(n=n.containerInfo,Em=eu,n=zv(n),Zd(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var p=c.anchorOffset,v=c.focusNode;c=c.focusOffset;try{o.nodeType,v.nodeType}catch{o=null;break e}var w=0,N=-1,L=-1,$=0,ee=0,se=n,Y=null;t:for(;;){for(var Z;se!==o||p!==0&&se.nodeType!==3||(N=w+p),se!==v||c!==0&&se.nodeType!==3||(L=w+c),se.nodeType===3&&(w+=se.nodeValue.length),(Z=se.firstChild)!==null;)Y=se,se=Z;for(;;){if(se===n)break t;if(Y===o&&++$===p&&(N=w),Y===v&&++ee===c&&(L=w),(Z=se.nextSibling)!==null)break;se=Y,Y=se.parentNode}se=Z}o=N===-1||L===-1?null:{start:N,end:L}}else o=null}o=o||{start:0,end:0}}else o=null;for(jm={focusedElem:n,selectionRange:o},eu=!1,Ft=a;Ft!==null;)if(a=Ft,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,Ft=n;else for(;Ft!==null;){switch(a=Ft,v=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)p=n[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&v!==null){n=void 0,o=a,p=v.memoizedProps,v=v.memoizedState,c=o.stateNode;try{var ge=_i(o.type,p);n=c.getSnapshotBeforeUpdate(ge,v),c.__reactInternalSnapshotBeforeUpdate=n}catch(Ee){Xe(o,o.return,Ee)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,o=n.nodeType,o===9)Rm(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Rm(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=a.sibling,n!==null){n.return=a.return,Ft=n;break}Ft=a.return}}function jx(n,a,o){var c=o.flags;switch(o.tag){case 0:case 11:case 15:ms(n,o),c&4&&Ir(5,o);break;case 1:if(ms(n,o),c&4)if(n=o.stateNode,a===null)try{n.componentDidMount()}catch(w){Xe(o,o.return,w)}else{var p=_i(o.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(w){Xe(o,o.return,w)}}c&64&&bx(o),c&512&&Hr(o,o.return);break;case 3:if(ms(n,o),c&64&&(n=o.updateQueue,n!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{uy(n,a)}catch(w){Xe(o,o.return,w)}}break;case 27:a===null&&c&4&&Tx(o);case 26:case 5:ms(n,o),a===null&&c&4&&wx(o),c&512&&Hr(o,o.return);break;case 12:ms(n,o);break;case 31:ms(n,o),c&4&&Rx(n,o);break;case 13:ms(n,o),c&4&&Mx(n,o),c&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=SN.bind(null,o),IN(n,o))));break;case 22:if(c=o.memoizedState!==null||ds,!c){a=a!==null&&a.memoizedState!==null||Mt,p=ds;var v=Mt;ds=c,(Mt=a)&&!v?hs(n,o,(o.subtreeFlags&8772)!==0):ms(n,o),ds=p,Mt=v}break;case 30:break;default:ms(n,o)}}function Ax(n){var a=n.alternate;a!==null&&(n.alternate=null,Ax(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&jt(a)),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 rt=null,yn=!1;function fs(n,a,o){for(o=o.child;o!==null;)Nx(n,a,o),o=o.sibling}function Nx(n,a,o){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(ma,o)}catch{}switch(o.tag){case 26:Mt||Pa(o,a),fs(n,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Mt||Pa(o,a);var c=rt,p=yn;Zs(o.type)&&(rt=o.stateNode,yn=!1),fs(n,a,o),Qr(o.stateNode),rt=c,yn=p;break;case 5:Mt||Pa(o,a);case 6:if(c=rt,p=yn,rt=null,fs(n,a,o),rt=c,yn=p,rt!==null)if(yn)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(o.stateNode)}catch(v){Xe(o,a,v)}else try{rt.removeChild(o.stateNode)}catch(v){Xe(o,a,v)}break;case 18:rt!==null&&(yn?(n=rt,bb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Lo(n)):bb(rt,o.stateNode));break;case 4:c=rt,p=yn,rt=o.stateNode.containerInfo,yn=!0,fs(n,a,o),rt=c,yn=p;break;case 0:case 11:case 14:case 15:Fs(2,o,a),Mt||Fs(4,o,a),fs(n,a,o);break;case 1:Mt||(Pa(o,a),c=o.stateNode,typeof c.componentWillUnmount=="function"&&Sx(o,a,c)),fs(n,a,o);break;case 21:fs(n,a,o);break;case 22:Mt=(c=Mt)||o.memoizedState!==null,fs(n,a,o),Mt=c;break;default:fs(n,a,o)}}function Rx(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Lo(n)}catch(o){Xe(a,a.return,o)}}}function Mx(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Lo(n)}catch(o){Xe(a,a.return,o)}}function mN(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new Ex),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new Ex),a;default:throw Error(i(435,n.tag))}}function Pc(n,a){var o=mN(n);a.forEach(function(c){if(!o.has(c)){o.add(c);var p=wN.bind(null,n,c);c.then(p,p)}})}function xn(n,a){var o=a.deletions;if(o!==null)for(var c=0;c<o.length;c++){var p=o[c],v=n,w=a,N=w;e:for(;N!==null;){switch(N.tag){case 27:if(Zs(N.type)){rt=N.stateNode,yn=!1;break e}break;case 5:rt=N.stateNode,yn=!1;break e;case 3:case 4:rt=N.stateNode.containerInfo,yn=!0;break e}N=N.return}if(rt===null)throw Error(i(160));Nx(v,w,p),rt=null,yn=!1,v=p.alternate,v!==null&&(v.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)_x(a,n),a=a.sibling}var pa=null;function _x(n,a){var o=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:xn(a,n),bn(n),c&4&&(Fs(3,n,n.return),Ir(3,n),Fs(5,n,n.return));break;case 1:xn(a,n),bn(n),c&512&&(Mt||o===null||Pa(o,o.return)),c&64&&ds&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?c:o.concat(c))));break;case 26:var p=pa;if(xn(a,n),bn(n),c&512&&(Mt||o===null||Pa(o,o.return)),c&4){var v=o!==null?o.memoizedState:null;if(c=n.memoizedState,o===null)if(c===null)if(n.stateNode===null){e:{c=n.type,o=n.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":v=p.getElementsByTagName("title")[0],(!v||v[we]||v[Lt]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=p.createElement(c),p.head.insertBefore(v,p.querySelector("head > title"))),Zt(v,c,o),v[Lt]=n,St(v),c=v;break e;case"link":var w=_b("link","href",p).get(c+(o.href||""));if(w){for(var N=0;N<w.length;N++)if(v=w[N],v.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&v.getAttribute("rel")===(o.rel==null?null:o.rel)&&v.getAttribute("title")===(o.title==null?null:o.title)&&v.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){w.splice(N,1);break t}}v=p.createElement(c),Zt(v,c,o),p.head.appendChild(v);break;case"meta":if(w=_b("meta","content",p).get(c+(o.content||""))){for(N=0;N<w.length;N++)if(v=w[N],v.getAttribute("content")===(o.content==null?null:""+o.content)&&v.getAttribute("name")===(o.name==null?null:o.name)&&v.getAttribute("property")===(o.property==null?null:o.property)&&v.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&v.getAttribute("charset")===(o.charSet==null?null:o.charSet)){w.splice(N,1);break t}}v=p.createElement(c),Zt(v,c,o),p.head.appendChild(v);break;default:throw Error(i(468,c))}v[Lt]=n,St(v),c=v}n.stateNode=c}else Ob(p,n.type,n.stateNode);else n.stateNode=Mb(p,c,n.memoizedProps);else v!==c?(v===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):v.count--,c===null?Ob(p,n.type,n.stateNode):Mb(p,c,n.memoizedProps)):c===null&&n.stateNode!==null&&tm(n,n.memoizedProps,o.memoizedProps)}break;case 27:xn(a,n),bn(n),c&512&&(Mt||o===null||Pa(o,o.return)),o!==null&&c&4&&tm(n,n.memoizedProps,o.memoizedProps);break;case 5:if(xn(a,n),bn(n),c&512&&(Mt||o===null||Pa(o,o.return)),n.flags&32){p=n.stateNode;try{so(p,"")}catch(ge){Xe(n,n.return,ge)}}c&4&&n.stateNode!=null&&(p=n.memoizedProps,tm(n,p,o!==null?o.memoizedProps:p)),c&1024&&(sm=!0);break;case 6:if(xn(a,n),bn(n),c&4){if(n.stateNode===null)throw Error(i(162));c=n.memoizedProps,o=n.stateNode;try{o.nodeValue=c}catch(ge){Xe(n,n.return,ge)}}break;case 3:if(Zc=null,p=pa,pa=Yc(a.containerInfo),xn(a,n),pa=p,bn(n),c&4&&o!==null&&o.memoizedState.isDehydrated)try{Lo(a.containerInfo)}catch(ge){Xe(n,n.return,ge)}sm&&(sm=!1,Ox(n));break;case 4:c=pa,pa=Yc(n.stateNode.containerInfo),xn(a,n),bn(n),pa=c;break;case 12:xn(a,n),bn(n);break;case 31:xn(a,n),bn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Pc(n,c)));break;case 13:xn(a,n),bn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Lc=Pt()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Pc(n,c)));break;case 22:p=n.memoizedState!==null;var L=o!==null&&o.memoizedState!==null,$=ds,ee=Mt;if(ds=$||p,Mt=ee||L,xn(a,n),Mt=ee,ds=$,bn(n),c&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||L||ds||Mt||Oi(n)),o=null,a=n;;){if(a.tag===5||a.tag===26){if(o===null){L=o=a;try{if(v=L.stateNode,p)w=v.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{N=L.stateNode;var se=L.memoizedProps.style,Y=se!=null&&se.hasOwnProperty("display")?se.display:null;N.style.display=Y==null||typeof Y=="boolean"?"":(""+Y).trim()}}catch(ge){Xe(L,L.return,ge)}}}else if(a.tag===6){if(o===null){L=a;try{L.stateNode.nodeValue=p?"":L.memoizedProps}catch(ge){Xe(L,L.return,ge)}}}else if(a.tag===18){if(o===null){L=a;try{var Z=L.stateNode;p?Sb(Z,!0):Sb(L.stateNode,!1)}catch(ge){Xe(L,L.return,ge)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=n.updateQueue,c!==null&&(o=c.retryQueue,o!==null&&(c.retryQueue=null,Pc(n,o))));break;case 19:xn(a,n),bn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Pc(n,c)));break;case 30:break;case 21:break;default:xn(a,n),bn(n)}}function bn(n){var a=n.flags;if(a&2){try{for(var o,c=n.return;c!==null;){if(Cx(c)){o=c;break}c=c.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,v=nm(n);Dc(n,v,p);break;case 5:var w=o.stateNode;o.flags&32&&(so(w,""),o.flags&=-33);var N=nm(n);Dc(n,N,w);break;case 3:case 4:var L=o.stateNode.containerInfo,$=nm(n);am(n,$,L);break;default:throw Error(i(161))}}catch(ee){Xe(n,n.return,ee)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function Ox(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;Ox(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function ms(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)jx(n,a.alternate,a),a=a.sibling}function Oi(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:Fs(4,a,a.return),Oi(a);break;case 1:Pa(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&Sx(a,a.return,o),Oi(a);break;case 27:Qr(a.stateNode);case 26:case 5:Pa(a,a.return),Oi(a);break;case 22:a.memoizedState===null&&Oi(a);break;case 30:Oi(a);break;default:Oi(a)}n=n.sibling}}function hs(n,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=n,v=a,w=v.flags;switch(v.tag){case 0:case 11:case 15:hs(p,v,o),Ir(4,v);break;case 1:if(hs(p,v,o),c=v,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch($){Xe(c,c.return,$)}if(c=v,p=c.updateQueue,p!==null){var N=c.stateNode;try{var L=p.shared.hiddenCallbacks;if(L!==null)for(p.shared.hiddenCallbacks=null,p=0;p<L.length;p++)cy(L[p],N)}catch($){Xe(c,c.return,$)}}o&&w&64&&bx(v),Hr(v,v.return);break;case 27:Tx(v);case 26:case 5:hs(p,v,o),o&&c===null&&w&4&&wx(v),Hr(v,v.return);break;case 12:hs(p,v,o);break;case 31:hs(p,v,o),o&&w&4&&Rx(p,v);break;case 13:hs(p,v,o),o&&w&4&&Mx(p,v);break;case 22:v.memoizedState===null&&hs(p,v,o),Hr(v,v.return);break;case 30:break;default:hs(p,v,o)}a=a.sibling}}function im(n,a){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&Nr(o))}function om(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&Nr(n))}function ga(n,a,o,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Dx(n,a,o,c),a=a.sibling}function Dx(n,a,o,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:ga(n,a,o,c),p&2048&&Ir(9,a);break;case 1:ga(n,a,o,c);break;case 3:ga(n,a,o,c),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&Nr(n)));break;case 12:if(p&2048){ga(n,a,o,c),n=a.stateNode;try{var v=a.memoizedProps,w=v.id,N=v.onPostCommit;typeof N=="function"&&N(w,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(L){Xe(a,a.return,L)}}else ga(n,a,o,c);break;case 31:ga(n,a,o,c);break;case 13:ga(n,a,o,c);break;case 23:break;case 22:v=a.stateNode,w=a.alternate,a.memoizedState!==null?v._visibility&2?ga(n,a,o,c):Fr(n,a):v._visibility&2?ga(n,a,o,c):(v._visibility|=2,Eo(n,a,o,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&im(w,a);break;case 24:ga(n,a,o,c),p&2048&&om(a.alternate,a);break;default:ga(n,a,o,c)}}function Eo(n,a,o,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var v=n,w=a,N=o,L=c,$=w.flags;switch(w.tag){case 0:case 11:case 15:Eo(v,w,N,L,p),Ir(8,w);break;case 23:break;case 22:var ee=w.stateNode;w.memoizedState!==null?ee._visibility&2?Eo(v,w,N,L,p):Fr(v,w):(ee._visibility|=2,Eo(v,w,N,L,p)),p&&$&2048&&im(w.alternate,w);break;case 24:Eo(v,w,N,L,p),p&&$&2048&&om(w.alternate,w);break;default:Eo(v,w,N,L,p)}a=a.sibling}}function Fr(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=n,c=a,p=c.flags;switch(c.tag){case 22:Fr(o,c),p&2048&&im(c.alternate,c);break;case 24:Fr(o,c),p&2048&&om(c.alternate,c);break;default:Fr(o,c)}a=a.sibling}}var qr=8192;function jo(n,a,o){if(n.subtreeFlags&qr)for(n=n.child;n!==null;)Px(n,a,o),n=n.sibling}function Px(n,a,o){switch(n.tag){case 26:jo(n,a,o),n.flags&qr&&n.memoizedState!==null&&JN(o,pa,n.memoizedState,n.memoizedProps);break;case 5:jo(n,a,o);break;case 3:case 4:var c=pa;pa=Yc(n.stateNode.containerInfo),jo(n,a,o),pa=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=qr,qr=16777216,jo(n,a,o),qr=c):jo(n,a,o));break;default:jo(n,a,o)}}function kx(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function $r(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var c=a[o];Ft=c,zx(c,n)}kx(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Lx(n),n=n.sibling}function Lx(n){switch(n.tag){case 0:case 11:case 15:$r(n),n.flags&2048&&Fs(9,n,n.return);break;case 3:$r(n);break;case 12:$r(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,kc(n)):$r(n);break;default:$r(n)}}function kc(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var c=a[o];Ft=c,zx(c,n)}kx(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:Fs(8,a,a.return),kc(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,kc(a));break;default:kc(a)}n=n.sibling}}function zx(n,a){for(;Ft!==null;){var o=Ft;switch(o.tag){case 0:case 11:case 15:Fs(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var c=o.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Nr(o.memoizedState.cache)}if(c=o.child,c!==null)c.return=o,Ft=c;else e:for(o=n;Ft!==null;){c=Ft;var p=c.sibling,v=c.return;if(Ax(c),c===o){Ft=null;break e}if(p!==null){p.return=v,Ft=p;break e}Ft=v}}}var hN={getCacheForType:function(n){var a=Yt(At),o=a.data.get(n);return o===void 0&&(o=n(),a.data.set(n,o)),o},cacheSignal:function(){return Yt(At).controller.signal}},pN=typeof WeakMap=="function"?WeakMap:Map,Ke=0,et=null,ze=null,Be=0,Ye=0,Bn=null,qs=!1,Ao=!1,rm=!1,ps=0,vt=0,$s=0,Di=0,lm=0,Un=0,No=0,Kr=null,Sn=null,cm=!1,Lc=0,Vx=0,zc=1/0,Vc=null,Ks=null,zt=0,Gs=null,Ro=null,gs=0,um=0,dm=null,Bx=null,Gr=0,fm=null;function In(){return(Ke&2)!==0&&Be!==0?Be&-Be:k.T!==null?ym():pr()}function Ux(){if(Un===0)if((Be&536870912)===0||Ie){var n=nt;nt<<=1,(nt&3932160)===0&&(nt=262144),Un=n}else Un=536870912;return n=zn.current,n!==null&&(n.flags|=32),Un}function wn(n,a,o){(n===et&&(Ye===2||Ye===9)||n.cancelPendingCommit!==null)&&(Mo(n,0),Ys(n,Be,Un,!1)),at(n,o),((Ke&2)===0||n!==et)&&(n===et&&((Ke&2)===0&&(Di|=o),vt===4&&Ys(n,Be,Un,!1)),ka(n))}function Ix(n,a,o){if((Ke&6)!==0)throw Error(i(327));var c=!o&&(a&127)===0&&(a&n.expiredLanes)===0||Ge(n,a),p=c?yN(n,a):hm(n,a,!0),v=c;do{if(p===0){Ao&&!c&&Ys(n,a,0,!1);break}else{if(o=n.current.alternate,v&&!gN(o)){p=hm(n,a,!1),v=!1;continue}if(p===2){if(v=a,n.errorRecoveryDisabledLanes&v)var w=0;else w=n.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){a=w;e:{var N=n;p=Kr;var L=N.current.memoizedState.isDehydrated;if(L&&(Mo(N,w).flags|=256),w=hm(N,w,!1),w!==2){if(rm&&!L){N.errorRecoveryDisabledLanes|=v,Di|=v,p=4;break e}v=Sn,Sn=p,v!==null&&(Sn===null?Sn=v:Sn.push.apply(Sn,v))}p=w}if(v=!1,p!==2)continue}}if(p===1){Mo(n,0),Ys(n,a,0,!0);break}e:{switch(c=n,v=p,v){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:Ys(c,a,Un,!qs);break e;case 2:Sn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Lc+300-Pt(),10<p)){if(Ys(c,a,Un,!qs),Ce(c,0,!0)!==0)break e;gs=a,c.timeoutHandle=yb(Hx.bind(null,c,o,Sn,Vc,cm,a,Un,Di,No,qs,v,"Throttled",-0,0),p);break e}Hx(c,o,Sn,Vc,cm,a,Un,Di,No,qs,v,null,-0,0)}}break}while(!0);ka(n)}function Hx(n,a,o,c,p,v,w,N,L,$,ee,se,Y,Z){if(n.timeoutHandle=-1,se=a.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ts},Px(a,v,se);var ge=(v&62914560)===v?Lc-Pt():(v&4194048)===v?Vx-Pt():0;if(ge=eR(se,ge),ge!==null){gs=v,n.cancelPendingCommit=ge(Zx.bind(null,n,a,v,o,c,p,w,N,L,ee,se,null,Y,Z)),Ys(n,v,w,!$);return}}Zx(n,a,v,o,c,p,w,N,L)}function gN(n){for(var a=n;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var c=0;c<o.length;c++){var p=o[c],v=p.getSnapshot;p=p.value;try{if(!kn(v(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ys(n,a,o,c){a&=~lm,a&=~Di,n.suspendedLanes|=a,n.pingedLanes&=~a,c&&(n.warmLanes|=a),c=n.expirationTimes;for(var p=a;0<p;){var v=31-Et(p),w=1<<v;c[v]=-1,p&=~w}o!==0&&Qa(n,o,a)}function Bc(){return(Ke&6)===0?(Yr(0),!1):!0}function mm(){if(ze!==null){if(Ye===0)var n=ze.return;else n=ze,is=Ti=null,Rf(n),bo=null,Mr=0,n=ze;for(;n!==null;)xx(n.alternate,n),n=n.return;ze=null}}function Mo(n,a){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,LN(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),gs=0,mm(),et=n,ze=o=as(n.current,null),Be=a,Ye=0,Bn=null,qs=!1,Ao=Ge(n,a),rm=!1,No=Un=lm=Di=$s=vt=0,Sn=Kr=null,cm=!1,(a&8)!==0&&(a|=a&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=a;0<c;){var p=31-Et(c),v=1<<p;a|=n[p],c&=~v}return ps=a,oc(),o}function Fx(n,a){Oe=null,k.H=Vr,a===xo||a===hc?(a=iy(),Ye=3):a===vf?(a=iy(),Ye=4):Ye=a===$f?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Bn=a,ze===null&&(vt=1,Nc(n,ta(a,n.current)))}function qx(){var n=zn.current;return n===null?!0:(Be&4194048)===Be?ia===null:(Be&62914560)===Be||(Be&536870912)!==0?n===ia:!1}function $x(){var n=k.H;return k.H=Vr,n===null?Vr:n}function Kx(){var n=k.A;return k.A=hN,n}function Uc(){vt=4,qs||(Be&4194048)!==Be&&zn.current!==null||(Ao=!0),($s&134217727)===0&&(Di&134217727)===0||et===null||Ys(et,Be,Un,!1)}function hm(n,a,o){var c=Ke;Ke|=2;var p=$x(),v=Kx();(et!==n||Be!==a)&&(Vc=null,Mo(n,a)),a=!1;var w=vt;e:do try{if(Ye!==0&&ze!==null){var N=ze,L=Bn;switch(Ye){case 8:mm(),w=6;break e;case 3:case 2:case 9:case 6:zn.current===null&&(a=!0);var $=Ye;if(Ye=0,Bn=null,_o(n,N,L,$),o&&Ao){w=0;break e}break;default:$=Ye,Ye=0,Bn=null,_o(n,N,L,$)}}vN(),w=vt;break}catch(ee){Fx(n,ee)}while(!0);return a&&n.shellSuspendCounter++,is=Ti=null,Ke=c,k.H=p,k.A=v,ze===null&&(et=null,Be=0,oc()),w}function vN(){for(;ze!==null;)Gx(ze)}function yN(n,a){var o=Ke;Ke|=2;var c=$x(),p=Kx();et!==n||Be!==a?(Vc=null,zc=Pt()+500,Mo(n,a)):Ao=Ge(n,a);e:do try{if(Ye!==0&&ze!==null){a=ze;var v=Bn;t:switch(Ye){case 1:Ye=0,Bn=null,_o(n,a,v,1);break;case 2:case 9:if(ay(v)){Ye=0,Bn=null,Yx(a);break}a=function(){Ye!==2&&Ye!==9||et!==n||(Ye=7),ka(n)},v.then(a,a);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:ay(v)?(Ye=0,Bn=null,Yx(a)):(Ye=0,Bn=null,_o(n,a,v,7));break;case 5:var w=null;switch(ze.tag){case 26:w=ze.memoizedState;case 5:case 27:var N=ze;if(w?Db(w):N.stateNode.complete){Ye=0,Bn=null;var L=N.sibling;if(L!==null)ze=L;else{var $=N.return;$!==null?(ze=$,Ic($)):ze=null}break t}}Ye=0,Bn=null,_o(n,a,v,5);break;case 6:Ye=0,Bn=null,_o(n,a,v,6);break;case 8:mm(),vt=6;break e;default:throw Error(i(462))}}xN();break}catch(ee){Fx(n,ee)}while(!0);return is=Ti=null,k.H=c,k.A=p,Ke=o,ze!==null?0:(et=null,Be=0,oc(),vt)}function xN(){for(;ze!==null&&!Dt();)Gx(ze)}function Gx(n){var a=vx(n.alternate,n,ps);n.memoizedProps=n.pendingProps,a===null?Ic(n):ze=a}function Yx(n){var a=n,o=a.alternate;switch(a.tag){case 15:case 0:a=dx(o,a,a.pendingProps,a.type,void 0,Be);break;case 11:a=dx(o,a,a.pendingProps,a.type.render,a.ref,Be);break;case 5:Rf(a);default:xx(o,a),a=ze=Kv(a,ps),a=vx(o,a,ps)}n.memoizedProps=n.pendingProps,a===null?Ic(n):ze=a}function _o(n,a,o,c){is=Ti=null,Rf(a),bo=null,Mr=0;var p=a.return;try{if(rN(n,p,a,o,Be)){vt=1,Nc(n,ta(o,n.current)),ze=null;return}}catch(v){if(p!==null)throw ze=p,v;vt=1,Nc(n,ta(o,n.current)),ze=null;return}a.flags&32768?(Ie||c===1?n=!0:Ao||(Be&536870912)!==0?n=!1:(qs=n=!0,(c===2||c===9||c===3||c===6)&&(c=zn.current,c!==null&&c.tag===13&&(c.flags|=16384))),Xx(a,n)):Ic(a)}function Ic(n){var a=n;do{if((a.flags&32768)!==0){Xx(a,qs);return}n=a.return;var o=uN(a.alternate,a,ps);if(o!==null){ze=o;return}if(a=a.sibling,a!==null){ze=a;return}ze=a=n}while(a!==null);vt===0&&(vt=5)}function Xx(n,a){do{var o=dN(n.alternate,n);if(o!==null){o.flags&=32767,ze=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(n=n.sibling,n!==null)){ze=n;return}ze=n=o}while(n!==null);vt=6,ze=null}function Zx(n,a,o,c,p,v,w,N,L){n.cancelPendingCommit=null;do Hc();while(zt!==0);if((Ke&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(v=a.lanes|a.childLanes,v|=tf,en(n,o,v,w,N,L),n===et&&(ze=et=null,Be=0),Ro=a,Gs=n,gs=o,um=v,dm=p,Bx=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,CN(hn,function(){return tb(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=k.T,k.T=null,p=H.p,H.p=2,w=Ke,Ke|=4;try{fN(n,a,o)}finally{Ke=w,H.p=p,k.T=c}}zt=1,Qx(),Wx(),Jx()}}function Qx(){if(zt===1){zt=0;var n=Gs,a=Ro,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=k.T,k.T=null;var c=H.p;H.p=2;var p=Ke;Ke|=4;try{_x(a,n);var v=jm,w=zv(n.containerInfo),N=v.focusedElem,L=v.selectionRange;if(w!==N&&N&&N.ownerDocument&&Lv(N.ownerDocument.documentElement,N)){if(L!==null&&Zd(N)){var $=L.start,ee=L.end;if(ee===void 0&&(ee=$),"selectionStart"in N)N.selectionStart=$,N.selectionEnd=Math.min(ee,N.value.length);else{var se=N.ownerDocument||document,Y=se&&se.defaultView||window;if(Y.getSelection){var Z=Y.getSelection(),ge=N.textContent.length,Ee=Math.min(L.start,ge),We=L.end===void 0?Ee:Math.min(L.end,ge);!Z.extend&&Ee>We&&(w=We,We=Ee,Ee=w);var F=kv(N,Ee),U=kv(N,We);if(F&&U&&(Z.rangeCount!==1||Z.anchorNode!==F.node||Z.anchorOffset!==F.offset||Z.focusNode!==U.node||Z.focusOffset!==U.offset)){var q=se.createRange();q.setStart(F.node,F.offset),Z.removeAllRanges(),Ee>We?(Z.addRange(q),Z.extend(U.node,U.offset)):(q.setEnd(U.node,U.offset),Z.addRange(q))}}}}for(se=[],Z=N;Z=Z.parentNode;)Z.nodeType===1&&se.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<se.length;N++){var ae=se[N];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}eu=!!Em,jm=Em=null}finally{Ke=p,H.p=c,k.T=o}}n.current=a,zt=2}}function Wx(){if(zt===2){zt=0;var n=Gs,a=Ro,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=k.T,k.T=null;var c=H.p;H.p=2;var p=Ke;Ke|=4;try{jx(n,a.alternate,a)}finally{Ke=p,H.p=c,k.T=o}}zt=3}}function Jx(){if(zt===4||zt===3){zt=0,Gn();var n=Gs,a=Ro,o=gs,c=Bx;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?zt=5:(zt=0,Ro=Gs=null,eb(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Ks=null),Pn(o),a=a.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(ma,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=k.T,p=H.p,H.p=2,k.T=null;try{for(var v=n.onRecoverableError,w=0;w<c.length;w++){var N=c[w];v(N.value,{componentStack:N.stack})}}finally{k.T=a,H.p=p}}(gs&3)!==0&&Hc(),ka(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===fm?Gr++:(Gr=0,fm=n):Gr=0,Yr(0)}}function eb(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,Nr(a)))}function Hc(){return Qx(),Wx(),Jx(),tb()}function tb(){if(zt!==5)return!1;var n=Gs,a=um;um=0;var o=Pn(gs),c=k.T,p=H.p;try{H.p=32>o?32:o,k.T=null,o=dm,dm=null;var v=Gs,w=gs;if(zt=0,Ro=Gs=null,gs=0,(Ke&6)!==0)throw Error(i(331));var N=Ke;if(Ke|=4,Lx(v.current),Dx(v,v.current,w,o),Ke=N,Yr(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(ma,v)}catch{}return!0}finally{H.p=p,k.T=c,eb(n,a)}}function nb(n,a,o){a=ta(o,a),a=qf(n.stateNode,a,2),n=Us(n,a,2),n!==null&&(at(n,2),ka(n))}function Xe(n,a,o){if(n.tag===3)nb(n,n,o);else for(;a!==null;){if(a.tag===3){nb(a,n,o);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ks===null||!Ks.has(c))){n=ta(o,n),o=ax(2),c=Us(a,o,2),c!==null&&(sx(o,c,a,n),at(c,2),ka(c));break}}a=a.return}}function pm(n,a,o){var c=n.pingCache;if(c===null){c=n.pingCache=new pN;var p=new Set;c.set(a,p)}else p=c.get(a),p===void 0&&(p=new Set,c.set(a,p));p.has(o)||(rm=!0,p.add(o),n=bN.bind(null,n,a,o),a.then(n,n))}function bN(n,a,o){var c=n.pingCache;c!==null&&c.delete(a),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,et===n&&(Be&o)===o&&(vt===4||vt===3&&(Be&62914560)===Be&&300>Pt()-Lc?(Ke&2)===0&&Mo(n,0):lm|=o,No===Be&&(No=0)),ka(n)}function ab(n,a){a===0&&(a=ot()),n=Si(n,a),n!==null&&(at(n,a),ka(n))}function SN(n){var a=n.memoizedState,o=0;a!==null&&(o=a.retryLane),ab(n,o)}function wN(n,a){var o=0;switch(n.tag){case 31:case 13:var c=n.stateNode,p=n.memoizedState;p!==null&&(o=p.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(a),ab(n,o)}function CN(n,a){return Na(n,a)}var Fc=null,Oo=null,gm=!1,qc=!1,vm=!1,Xs=0;function ka(n){n!==Oo&&n.next===null&&(Oo===null?Fc=Oo=n:Oo=Oo.next=n),qc=!0,gm||(gm=!0,EN())}function Yr(n,a){if(!vm&&qc){vm=!0;do for(var o=!1,c=Fc;c!==null;){if(n!==0){var p=c.pendingLanes;if(p===0)var v=0;else{var w=c.suspendedLanes,N=c.pingedLanes;v=(1<<31-Et(42|n)+1)-1,v&=p&~(w&~N),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(o=!0,rb(c,v))}else v=Be,v=Ce(c,c===et?v:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(v&3)===0||Ge(c,v)||(o=!0,rb(c,v));c=c.next}while(o);vm=!1}}function TN(){sb()}function sb(){qc=gm=!1;var n=0;Xs!==0&&kN()&&(n=Xs);for(var a=Pt(),o=null,c=Fc;c!==null;){var p=c.next,v=ib(c,a);v===0?(c.next=null,o===null?Fc=p:o.next=p,p===null&&(Oo=o)):(o=c,(n!==0||(v&3)!==0)&&(qc=!0)),c=p}zt!==0&&zt!==5||Yr(n),Xs!==0&&(Xs=0)}function ib(n,a){for(var o=n.suspendedLanes,c=n.pingedLanes,p=n.expirationTimes,v=n.pendingLanes&-62914561;0<v;){var w=31-Et(v),N=1<<w,L=p[w];L===-1?((N&o)===0||(N&c)!==0)&&(p[w]=Le(N,a)):L<=a&&(n.expiredLanes|=N),v&=~N}if(a=et,o=Be,o=Ce(n,n===a?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,o===0||n===a&&(Ye===2||Ye===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Ya(c),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Ge(n,o)){if(a=o&-o,a===n.callbackPriority)return a;switch(c!==null&&Ya(c),Pn(o)){case 2:case 8:o=Xa;break;case 32:o=hn;break;case 268435456:o=pn;break;default:o=hn}return c=ob.bind(null,n),o=Na(o,c),n.callbackPriority=a,n.callbackNode=o,a}return c!==null&&c!==null&&Ya(c),n.callbackPriority=2,n.callbackNode=null,2}function ob(n,a){if(zt!==0&&zt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(Hc()&&n.callbackNode!==o)return null;var c=Be;return c=Ce(n,n===et?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(Ix(n,c,a),ib(n,Pt()),n.callbackNode!=null&&n.callbackNode===o?ob.bind(null,n):null)}function rb(n,a){if(Hc())return null;Ix(n,a,!0)}function EN(){zN(function(){(Ke&6)!==0?Na(fa,TN):sb()})}function ym(){if(Xs===0){var n=vo;n===0&&(n=Ra,Ra<<=1,(Ra&261888)===0&&(Ra=256)),Xs=n}return Xs}function lb(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Wl(""+n)}function cb(n,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,n.id&&o.setAttribute("form",n.id),a.parentNode.insertBefore(o,a),n=new FormData(n),o.parentNode.removeChild(o),n}function jN(n,a,o,c,p){if(a==="submit"&&o&&o.stateNode===p){var v=lb((p[an]||null).action),w=c.submitter;w&&(a=(a=w[an]||null)?lb(a.formAction):w.getAttribute("formAction"),a!==null&&(v=a,w=null));var N=new nc("action","action",null,c,p);n.push({event:N,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Xs!==0){var L=w?cb(p,w):new FormData(p);Vf(o,{pending:!0,data:L,method:p.method,action:v},null,L)}}else typeof v=="function"&&(N.preventDefault(),L=w?cb(p,w):new FormData(p),Vf(o,{pending:!0,data:L,method:p.method,action:v},v,L))},currentTarget:p}]})}}for(var xm=0;xm<ef.length;xm++){var bm=ef[xm],AN=bm.toLowerCase(),NN=bm[0].toUpperCase()+bm.slice(1);ha(AN,"on"+NN)}ha(Uv,"onAnimationEnd"),ha(Iv,"onAnimationIteration"),ha(Hv,"onAnimationStart"),ha("dblclick","onDoubleClick"),ha("focusin","onFocus"),ha("focusout","onBlur"),ha(qA,"onTransitionRun"),ha($A,"onTransitionStart"),ha(KA,"onTransitionCancel"),ha(Fv,"onTransitionEnd"),no("onMouseEnter",["mouseout","mouseover"]),no("onMouseLeave",["mouseout","mouseover"]),no("onPointerEnter",["pointerout","pointerover"]),no("onPointerLeave",["pointerout","pointerover"]),vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),vi("onBeforeInput",["compositionend","keypress","textInput","paste"]),vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xr="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(" "),RN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xr));function ub(n,a){a=(a&4)!==0;for(var o=0;o<n.length;o++){var c=n[o],p=c.event;c=c.listeners;e:{var v=void 0;if(a)for(var w=c.length-1;0<=w;w--){var N=c[w],L=N.instance,$=N.currentTarget;if(N=N.listener,L!==v&&p.isPropagationStopped())break e;v=N,p.currentTarget=$;try{v(p)}catch(ee){ic(ee)}p.currentTarget=null,v=L}else for(w=0;w<c.length;w++){if(N=c[w],L=N.instance,$=N.currentTarget,N=N.listener,L!==v&&p.isPropagationStopped())break e;v=N,p.currentTarget=$;try{v(p)}catch(ee){ic(ee)}p.currentTarget=null,v=L}}}}function Ve(n,a){var o=a[gr];o===void 0&&(o=a[gr]=new Set);var c=n+"__bubble";o.has(c)||(db(a,n,2,!1),o.add(c))}function Sm(n,a,o){var c=0;a&&(c|=4),db(o,n,c,a)}var $c="_reactListening"+Math.random().toString(36).slice(2);function wm(n){if(!n[$c]){n[$c]=!0,sv.forEach(function(o){o!=="selectionchange"&&(RN.has(o)||Sm(o,!1,n),Sm(o,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[$c]||(a[$c]=!0,Sm("selectionchange",!1,a))}}function db(n,a,o,c){switch(Ub(a)){case 2:var p=aR;break;case 8:p=sR;break;default:p=zm}o=p.bind(null,a,o,n),p=void 0,!Id||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?p!==void 0?n.addEventListener(a,o,{capture:!0,passive:p}):n.addEventListener(a,o,!0):p!==void 0?n.addEventListener(a,o,{passive:p}):n.addEventListener(a,o,!1)}function Cm(n,a,o,c,p){var v=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var N=c.stateNode.containerInfo;if(N===p)break;if(w===4)for(w=c.return;w!==null;){var L=w.tag;if((L===3||L===4)&&w.stateNode.containerInfo===p)return;w=w.return}for(;N!==null;){if(w=Qn(N),w===null)return;if(L=w.tag,L===5||L===6||L===26||L===27){c=v=w;continue e}N=N.parentNode}}c=c.return}gv(function(){var $=v,ee=Bd(o),se=[];e:{var Y=qv.get(n);if(Y!==void 0){var Z=nc,ge=n;switch(n){case"keypress":if(ec(o)===0)break e;case"keydown":case"keyup":Z=wA;break;case"focusin":ge="focus",Z=$d;break;case"focusout":ge="blur",Z=$d;break;case"beforeblur":case"afterblur":Z=$d;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=xv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=uA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=EA;break;case Uv:case Iv:case Hv:Z=mA;break;case Fv:Z=AA;break;case"scroll":case"scrollend":Z=lA;break;case"wheel":Z=RA;break;case"copy":case"cut":case"paste":Z=pA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=Sv;break;case"toggle":case"beforetoggle":Z=_A}var Ee=(a&4)!==0,We=!Ee&&(n==="scroll"||n==="scrollend"),F=Ee?Y!==null?Y+"Capture":null:Y;Ee=[];for(var U=$,q;U!==null;){var ae=U;if(q=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||q===null||F===null||(ae=vr(U,F),ae!=null&&Ee.push(Zr(U,ae,q))),We)break;U=U.return}0<Ee.length&&(Y=new Z(Y,ge,null,o,ee),se.push({event:Y,listeners:Ee}))}}if((a&7)===0){e:{if(Y=n==="mouseover"||n==="pointerover",Z=n==="mouseout"||n==="pointerout",Y&&o!==Vd&&(ge=o.relatedTarget||o.fromElement)&&(Qn(ge)||ge[Os]))break e;if((Z||Y)&&(Y=ee.window===ee?ee:(Y=ee.ownerDocument)?Y.defaultView||Y.parentWindow:window,Z?(ge=o.relatedTarget||o.toElement,Z=$,ge=ge?Qn(ge):null,ge!==null&&(We=l(ge),Ee=ge.tag,ge!==We||Ee!==5&&Ee!==27&&Ee!==6)&&(ge=null)):(Z=null,ge=$),Z!==ge)){if(Ee=xv,ae="onMouseLeave",F="onMouseEnter",U="mouse",(n==="pointerout"||n==="pointerover")&&(Ee=Sv,ae="onPointerLeave",F="onPointerEnter",U="pointer"),We=Z==null?Y:gi(Z),q=ge==null?Y:gi(ge),Y=new Ee(ae,U+"leave",Z,o,ee),Y.target=We,Y.relatedTarget=q,ae=null,Qn(ee)===$&&(Ee=new Ee(F,U+"enter",ge,o,ee),Ee.target=q,Ee.relatedTarget=We,ae=Ee),We=ae,Z&&ge)t:{for(Ee=MN,F=Z,U=ge,q=0,ae=F;ae;ae=Ee(ae))q++;ae=0;for(var Te=U;Te;Te=Ee(Te))ae++;for(;0<q-ae;)F=Ee(F),q--;for(;0<ae-q;)U=Ee(U),ae--;for(;q--;){if(F===U||U!==null&&F===U.alternate){Ee=F;break t}F=Ee(F),U=Ee(U)}Ee=null}else Ee=null;Z!==null&&fb(se,Y,Z,Ee,!1),ge!==null&&We!==null&&fb(se,We,ge,Ee,!0)}}e:{if(Y=$?gi($):window,Z=Y.nodeName&&Y.nodeName.toLowerCase(),Z==="select"||Z==="input"&&Y.type==="file")var qe=Rv;else if(Av(Y))if(Mv)qe=IA;else{qe=BA;var xe=VA}else Z=Y.nodeName,!Z||Z.toLowerCase()!=="input"||Y.type!=="checkbox"&&Y.type!=="radio"?$&&zd($.elementType)&&(qe=Rv):qe=UA;if(qe&&(qe=qe(n,$))){Nv(se,qe,o,ee);break e}xe&&xe(n,Y,$),n==="focusout"&&$&&Y.type==="number"&&$.memoizedProps.value!=null&&Ld(Y,"number",Y.value)}switch(xe=$?gi($):window,n){case"focusin":(Av(xe)||xe.contentEditable==="true")&&(lo=xe,Qd=$,Er=null);break;case"focusout":Er=Qd=lo=null;break;case"mousedown":Wd=!0;break;case"contextmenu":case"mouseup":case"dragend":Wd=!1,Vv(se,o,ee);break;case"selectionchange":if(FA)break;case"keydown":case"keyup":Vv(se,o,ee)}var De;if(Gd)e:{switch(n){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else ro?Ev(n,o)&&(Ue="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(Ue="onCompositionStart");Ue&&(wv&&o.locale!=="ko"&&(ro||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&ro&&(De=vv()):(Ds=ee,Hd="value"in Ds?Ds.value:Ds.textContent,ro=!0)),xe=Kc($,Ue),0<xe.length&&(Ue=new bv(Ue,n,null,o,ee),se.push({event:Ue,listeners:xe}),De?Ue.data=De:(De=jv(o),De!==null&&(Ue.data=De)))),(De=DA?PA(n,o):kA(n,o))&&(Ue=Kc($,"onBeforeInput"),0<Ue.length&&(xe=new bv("onBeforeInput","beforeinput",null,o,ee),se.push({event:xe,listeners:Ue}),xe.data=De)),jN(se,n,$,o,ee)}ub(se,a)})}function Zr(n,a,o){return{instance:n,listener:a,currentTarget:o}}function Kc(n,a){for(var o=a+"Capture",c=[];n!==null;){var p=n,v=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||v===null||(p=vr(n,o),p!=null&&c.unshift(Zr(n,p,v)),p=vr(n,a),p!=null&&c.push(Zr(n,p,v))),n.tag===3)return c;n=n.return}return[]}function MN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function fb(n,a,o,c,p){for(var v=a._reactName,w=[];o!==null&&o!==c;){var N=o,L=N.alternate,$=N.stateNode;if(N=N.tag,L!==null&&L===c)break;N!==5&&N!==26&&N!==27||$===null||(L=$,p?($=vr(o,v),$!=null&&w.unshift(Zr(o,$,L))):p||($=vr(o,v),$!=null&&w.push(Zr(o,$,L)))),o=o.return}w.length!==0&&n.push({event:a,listeners:w})}var _N=/\r\n?/g,ON=/\u0000|\uFFFD/g;function mb(n){return(typeof n=="string"?n:""+n).replace(_N,`
|
|
9
|
+
`).replace(ON,"")}function hb(n,a){return a=mb(a),mb(n)===a}function Qe(n,a,o,c,p,v){switch(o){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||so(n,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&so(n,""+c);break;case"className":Zl(n,"class",c);break;case"tabIndex":Zl(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Zl(n,o,c);break;case"style":hv(n,c,v);break;case"data":if(a!=="object"){Zl(n,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||o!=="href")){n.removeAttribute(o);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(o);break}c=Wl(""+c),n.setAttribute(o,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(o,"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 v=="function"&&(o==="formAction"?(a!=="input"&&Qe(n,a,"name",p.name,p,null),Qe(n,a,"formEncType",p.formEncType,p,null),Qe(n,a,"formMethod",p.formMethod,p,null),Qe(n,a,"formTarget",p.formTarget,p,null)):(Qe(n,a,"encType",p.encType,p,null),Qe(n,a,"method",p.method,p,null),Qe(n,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(o);break}c=Wl(""+c),n.setAttribute(o,c);break;case"onClick":c!=null&&(n.onclick=ts);break;case"onScroll":c!=null&&Ve("scroll",n);break;case"onScrollEnd":c!=null&&Ve("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}o=Wl(""+c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,""+c):n.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":c===!0?n.setAttribute(o,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(o,c):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(o,c):n.removeAttribute(o);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(o):n.setAttribute(o,c);break;case"popover":Ve("beforetoggle",n),Ve("toggle",n),Xl(n,"popover",c);break;case"xlinkActuate":es(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":es(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":es(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":es(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":es(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":es(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":es(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":es(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":es(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Xl(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=oA.get(o)||o,Xl(n,o,c))}}function Tm(n,a,o,c,p,v){switch(o){case"style":hv(n,c,v);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"children":typeof c=="string"?so(n,c):(typeof c=="number"||typeof c=="bigint")&&so(n,""+c);break;case"onScroll":c!=null&&Ve("scroll",n);break;case"onScrollEnd":c!=null&&Ve("scrollend",n);break;case"onClick":c!=null&&(n.onclick=ts);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!iv.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),v=n[an]||null,v=v!=null?v[o]:null,typeof v=="function"&&n.removeEventListener(a,v,p),typeof c=="function")){typeof v!="function"&&v!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(a,c,p);break e}o in n?n[o]=c:c===!0?n.setAttribute(o,""):Xl(n,o,c)}}}function Zt(n,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",n),Ve("load",n);var c=!1,p=!1,v;for(v in o)if(o.hasOwnProperty(v)){var w=o[v];if(w!=null)switch(v){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Qe(n,a,v,w,o,null)}}p&&Qe(n,a,"srcSet",o.srcSet,o,null),c&&Qe(n,a,"src",o.src,o,null);return;case"input":Ve("invalid",n);var N=v=w=p=null,L=null,$=null;for(c in o)if(o.hasOwnProperty(c)){var ee=o[c];if(ee!=null)switch(c){case"name":p=ee;break;case"type":w=ee;break;case"checked":L=ee;break;case"defaultChecked":$=ee;break;case"value":v=ee;break;case"defaultValue":N=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(i(137,a));break;default:Qe(n,a,c,ee,o,null)}}uv(n,v,N,L,$,w,p,!1);return;case"select":Ve("invalid",n),c=w=v=null;for(p in o)if(o.hasOwnProperty(p)&&(N=o[p],N!=null))switch(p){case"value":v=N;break;case"defaultValue":w=N;break;case"multiple":c=N;default:Qe(n,a,p,N,o,null)}a=v,o=w,n.multiple=!!c,a!=null?ao(n,!!c,a,!1):o!=null&&ao(n,!!c,o,!0);return;case"textarea":Ve("invalid",n),v=p=c=null;for(w in o)if(o.hasOwnProperty(w)&&(N=o[w],N!=null))switch(w){case"value":c=N;break;case"defaultValue":p=N;break;case"children":v=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(i(91));break;default:Qe(n,a,w,N,o,null)}fv(n,c,p,v);return;case"option":for(L in o)o.hasOwnProperty(L)&&(c=o[L],c!=null)&&(L==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":Qe(n,a,L,c,o,null));return;case"dialog":Ve("beforetoggle",n),Ve("toggle",n),Ve("cancel",n),Ve("close",n);break;case"iframe":case"object":Ve("load",n);break;case"video":case"audio":for(c=0;c<Xr.length;c++)Ve(Xr[c],n);break;case"image":Ve("error",n),Ve("load",n);break;case"details":Ve("toggle",n);break;case"embed":case"source":case"link":Ve("error",n),Ve("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($ in o)if(o.hasOwnProperty($)&&(c=o[$],c!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Qe(n,a,$,c,o,null)}return;default:if(zd(a)){for(ee in o)o.hasOwnProperty(ee)&&(c=o[ee],c!==void 0&&Tm(n,a,ee,c,o,void 0));return}}for(N in o)o.hasOwnProperty(N)&&(c=o[N],c!=null&&Qe(n,a,N,c,o,null))}function DN(n,a,o,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,v=null,w=null,N=null,L=null,$=null,ee=null;for(Z in o){var se=o[Z];if(o.hasOwnProperty(Z)&&se!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":L=se;default:c.hasOwnProperty(Z)||Qe(n,a,Z,null,c,se)}}for(var Y in c){var Z=c[Y];if(se=o[Y],c.hasOwnProperty(Y)&&(Z!=null||se!=null))switch(Y){case"type":v=Z;break;case"name":p=Z;break;case"checked":$=Z;break;case"defaultChecked":ee=Z;break;case"value":w=Z;break;case"defaultValue":N=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(i(137,a));break;default:Z!==se&&Qe(n,a,Y,Z,c,se)}}kd(n,w,N,L,$,ee,v,p);return;case"select":Z=w=N=Y=null;for(v in o)if(L=o[v],o.hasOwnProperty(v)&&L!=null)switch(v){case"value":break;case"multiple":Z=L;default:c.hasOwnProperty(v)||Qe(n,a,v,null,c,L)}for(p in c)if(v=c[p],L=o[p],c.hasOwnProperty(p)&&(v!=null||L!=null))switch(p){case"value":Y=v;break;case"defaultValue":N=v;break;case"multiple":w=v;default:v!==L&&Qe(n,a,p,v,c,L)}a=N,o=w,c=Z,Y!=null?ao(n,!!o,Y,!1):!!c!=!!o&&(a!=null?ao(n,!!o,a,!0):ao(n,!!o,o?[]:"",!1));return;case"textarea":Z=Y=null;for(N in o)if(p=o[N],o.hasOwnProperty(N)&&p!=null&&!c.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Qe(n,a,N,null,c,p)}for(w in c)if(p=c[w],v=o[w],c.hasOwnProperty(w)&&(p!=null||v!=null))switch(w){case"value":Y=p;break;case"defaultValue":Z=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==v&&Qe(n,a,w,p,c,v)}dv(n,Y,Z);return;case"option":for(var ge in o)Y=o[ge],o.hasOwnProperty(ge)&&Y!=null&&!c.hasOwnProperty(ge)&&(ge==="selected"?n.selected=!1:Qe(n,a,ge,null,c,Y));for(L in c)Y=c[L],Z=o[L],c.hasOwnProperty(L)&&Y!==Z&&(Y!=null||Z!=null)&&(L==="selected"?n.selected=Y&&typeof Y!="function"&&typeof Y!="symbol":Qe(n,a,L,Y,c,Z));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 Ee in o)Y=o[Ee],o.hasOwnProperty(Ee)&&Y!=null&&!c.hasOwnProperty(Ee)&&Qe(n,a,Ee,null,c,Y);for($ in c)if(Y=c[$],Z=o[$],c.hasOwnProperty($)&&Y!==Z&&(Y!=null||Z!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,a));break;default:Qe(n,a,$,Y,c,Z)}return;default:if(zd(a)){for(var We in o)Y=o[We],o.hasOwnProperty(We)&&Y!==void 0&&!c.hasOwnProperty(We)&&Tm(n,a,We,void 0,c,Y);for(ee in c)Y=c[ee],Z=o[ee],!c.hasOwnProperty(ee)||Y===Z||Y===void 0&&Z===void 0||Tm(n,a,ee,Y,c,Z);return}}for(var F in o)Y=o[F],o.hasOwnProperty(F)&&Y!=null&&!c.hasOwnProperty(F)&&Qe(n,a,F,null,c,Y);for(se in c)Y=c[se],Z=o[se],!c.hasOwnProperty(se)||Y===Z||Y==null&&Z==null||Qe(n,a,se,Y,c,Z)}function pb(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function PN(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,o=performance.getEntriesByType("resource"),c=0;c<o.length;c++){var p=o[c],v=p.transferSize,w=p.initiatorType,N=p.duration;if(v&&N&&pb(w)){for(w=0,N=p.responseEnd,c+=1;c<o.length;c++){var L=o[c],$=L.startTime;if($>N)break;var ee=L.transferSize,se=L.initiatorType;ee&&pb(se)&&(L=L.responseEnd,w+=ee*(L<N?1:(N-$)/(L-$)))}if(--c,a+=8*(v+w)/(p.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Em=null,jm=null;function Gc(n){return n.nodeType===9?n:n.ownerDocument}function gb(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 vb(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function Am(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Nm=null;function kN(){var n=window.event;return n&&n.type==="popstate"?n===Nm?!1:(Nm=n,!0):(Nm=null,!1)}var yb=typeof setTimeout=="function"?setTimeout:void 0,LN=typeof clearTimeout=="function"?clearTimeout:void 0,xb=typeof Promise=="function"?Promise:void 0,zN=typeof queueMicrotask=="function"?queueMicrotask:typeof xb<"u"?function(n){return xb.resolve(null).then(n).catch(VN)}:yb;function VN(n){setTimeout(function(){throw n})}function Zs(n){return n==="head"}function bb(n,a){var o=a,c=0;do{var p=o.nextSibling;if(n.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(c===0){n.removeChild(p),Lo(a);return}c--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")c++;else if(o==="html")Qr(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,Qr(o);for(var v=o.firstChild;v;){var w=v.nextSibling,N=v.nodeName;v[we]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&v.rel.toLowerCase()==="stylesheet"||o.removeChild(v),v=w}}else o==="body"&&Qr(n.ownerDocument.body);o=p}while(o);Lo(a)}function Sb(n,a){var o=n;n=0;do{var c=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=c}while(o)}function Rm(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Rm(o),jt(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function BN(n,a,o,c){for(;n.nodeType===1;){var p=o;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[we])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(v=n.getAttribute("rel"),v==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(v!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(v=n.getAttribute("src"),(v!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&v&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var v=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===v)return n}else return n;if(n=oa(n.nextSibling),n===null)break}return null}function UN(n,a,o){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=oa(n.nextSibling),n===null))return null;return n}function wb(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=oa(n.nextSibling),n===null))return null;return n}function Mm(n){return n.data==="$?"||n.data==="$~"}function _m(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function IN(n,a){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||o.readyState!=="loading")a();else{var c=function(){a(),o.removeEventListener("DOMContentLoaded",c)};o.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function oa(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var Om=null;function Cb(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(a===0)return oa(n.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}n=n.nextSibling}return null}function Tb(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return n;a--}else o!=="/$"&&o!=="/&"||a++}n=n.previousSibling}return null}function Eb(n,a,o){switch(a=Gc(o),n){case"html":if(n=a.documentElement,!n)throw Error(i(452));return n;case"head":if(n=a.head,!n)throw Error(i(453));return n;case"body":if(n=a.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function Qr(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);jt(n)}var ra=new Map,jb=new Set;function Yc(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var vs=H.d;H.d={f:HN,r:FN,D:qN,C:$N,L:KN,m:GN,X:XN,S:YN,M:ZN};function HN(){var n=vs.f(),a=Bc();return n||a}function FN(n){var a=Wa(n);a!==null&&a.tag===5&&a.type==="form"?Fy(a):vs.r(n)}var Do=typeof document>"u"?null:document;function Ab(n,a,o){var c=Do;if(c&&typeof a=="string"&&a){var p=Jn(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),jb.has(p)||(jb.add(p),n={rel:n,crossOrigin:o,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),Zt(a,"link",n),St(a),c.head.appendChild(a)))}}function qN(n){vs.D(n),Ab("dns-prefetch",n,null)}function $N(n,a){vs.C(n,a),Ab("preconnect",n,a)}function KN(n,a,o){vs.L(n,a,o);var c=Do;if(c&&n&&a){var p='link[rel="preload"][as="'+Jn(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+Jn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+Jn(o.imageSizes)+'"]')):p+='[href="'+Jn(n)+'"]';var v=p;switch(a){case"style":v=Po(n);break;case"script":v=ko(n)}ra.has(v)||(n=g({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:n,as:a},o),ra.set(v,n),c.querySelector(p)!==null||a==="style"&&c.querySelector(Wr(v))||a==="script"&&c.querySelector(Jr(v))||(a=c.createElement("link"),Zt(a,"link",n),St(a),c.head.appendChild(a)))}}function GN(n,a){vs.m(n,a);var o=Do;if(o&&n){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Jn(c)+'"][href="'+Jn(n)+'"]',v=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=ko(n)}if(!ra.has(v)&&(n=g({rel:"modulepreload",href:n},a),ra.set(v,n),o.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Jr(v)))return}c=o.createElement("link"),Zt(c,"link",n),St(c),o.head.appendChild(c)}}}function YN(n,a,o){vs.S(n,a,o);var c=Do;if(c&&n){var p=Ja(c).hoistableStyles,v=Po(n);a=a||"default";var w=p.get(v);if(!w){var N={loading:0,preload:null};if(w=c.querySelector(Wr(v)))N.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":a},o),(o=ra.get(v))&&Dm(n,o);var L=w=c.createElement("link");St(L),Zt(L,"link",n),L._p=new Promise(function($,ee){L.onload=$,L.onerror=ee}),L.addEventListener("load",function(){N.loading|=1}),L.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Xc(w,a,c)}w={type:"stylesheet",instance:w,count:1,state:N},p.set(v,w)}}}function XN(n,a){vs.X(n,a);var o=Do;if(o&&n){var c=Ja(o).hoistableScripts,p=ko(n),v=c.get(p);v||(v=o.querySelector(Jr(p)),v||(n=g({src:n,async:!0},a),(a=ra.get(p))&&Pm(n,a),v=o.createElement("script"),St(v),Zt(v,"link",n),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(p,v))}}function ZN(n,a){vs.M(n,a);var o=Do;if(o&&n){var c=Ja(o).hoistableScripts,p=ko(n),v=c.get(p);v||(v=o.querySelector(Jr(p)),v||(n=g({src:n,async:!0,type:"module"},a),(a=ra.get(p))&&Pm(n,a),v=o.createElement("script"),St(v),Zt(v,"link",n),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(p,v))}}function Nb(n,a,o,c){var p=(p=fe.current)?Yc(p):null;if(!p)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Po(o.href),o=Ja(p).hoistableStyles,c=o.get(a),c||(c={type:"style",instance:null,count:0,state:null},o.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Po(o.href);var v=Ja(p).hoistableStyles,w=v.get(n);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(n,w),(v=p.querySelector(Wr(n)))&&!v._p&&(w.instance=v,w.state.loading=5),ra.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},ra.set(n,o),v||QN(p,n,o,w.state))),a&&c===null)throw Error(i(528,""));return w}if(a&&c!==null)throw Error(i(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=ko(o),o=Ja(p).hoistableScripts,c=o.get(a),c||(c={type:"script",instance:null,count:0,state:null},o.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Po(n){return'href="'+Jn(n)+'"'}function Wr(n){return'link[rel="stylesheet"]['+n+"]"}function Rb(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function QN(n,a,o,c){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=n.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),Zt(a,"link",o),St(a),n.head.appendChild(a))}function ko(n){return'[src="'+Jn(n)+'"]'}function Jr(n){return"script[async]"+n}function Mb(n,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var c=n.querySelector('style[data-href~="'+Jn(o.href)+'"]');if(c)return a.instance=c,St(c),c;var p=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),St(c),Zt(c,"style",p),Xc(c,o.precedence,n),a.instance=c;case"stylesheet":p=Po(o.href);var v=n.querySelector(Wr(p));if(v)return a.state.loading|=4,a.instance=v,St(v),v;c=Rb(o),(p=ra.get(p))&&Dm(c,p),v=(n.ownerDocument||n).createElement("link"),St(v);var w=v;return w._p=new Promise(function(N,L){w.onload=N,w.onerror=L}),Zt(v,"link",c),a.state.loading|=4,Xc(v,o.precedence,n),a.instance=v;case"script":return v=ko(o.src),(p=n.querySelector(Jr(v)))?(a.instance=p,St(p),p):(c=o,(p=ra.get(v))&&(c=g({},o),Pm(c,p)),n=n.ownerDocument||n,p=n.createElement("script"),St(p),Zt(p,"link",c),n.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,Xc(c,o.precedence,n));return a.instance}function Xc(n,a,o){for(var c=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,v=p,w=0;w<c.length;w++){var N=c[w];if(N.dataset.precedence===a)v=N;else if(v!==p)break}v?v.parentNode.insertBefore(n,v.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(n,a.firstChild))}function Dm(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function Pm(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var Zc=null;function _b(n,a,o){if(Zc===null){var c=new Map,p=Zc=new Map;p.set(o,c)}else p=Zc,c=p.get(o),c||(c=new Map,p.set(o,c));if(c.has(n))return c;for(c.set(n,null),o=o.getElementsByTagName(n),p=0;p<o.length;p++){var v=o[p];if(!(v[we]||v[Lt]||n==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var w=v.getAttribute(a)||"";w=n+w;var N=c.get(w);N?N.push(v):c.set(w,[v])}}return c}function Ob(n,a,o){n=n.ownerDocument||n,n.head.insertBefore(o,a==="title"?n.querySelector("head > title"):null)}function WN(n,a,o){if(o===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(n=a.disabled,typeof a.precedence=="string"&&n==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Db(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function JN(n,a,o,c){if(o.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=Po(c.href),v=a.querySelector(Wr(p));if(v){a=v._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=Qc.bind(n),a.then(n,n)),o.state.loading|=4,o.instance=v,St(v);return}v=a.ownerDocument||a,c=Rb(c),(p=ra.get(p))&&Dm(c,p),v=v.createElement("link"),St(v);var w=v;w._p=new Promise(function(N,L){w.onload=N,w.onerror=L}),Zt(v,"link",c),o.instance=v}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=Qc.bind(n),a.addEventListener("load",o),a.addEventListener("error",o))}}var km=0;function eR(n,a){return n.stylesheets&&n.count===0&&Jc(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var c=setTimeout(function(){if(n.stylesheets&&Jc(n,n.stylesheets),n.unsuspend){var v=n.unsuspend;n.unsuspend=null,v()}},6e4+a);0<n.imgBytes&&km===0&&(km=62500*PN());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Jc(n,n.stylesheets),n.unsuspend)){var v=n.unsuspend;n.unsuspend=null,v()}},(n.imgBytes>km?50:800)+a);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function Qc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Wc=null;function Jc(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Wc=new Map,a.forEach(tR,n),Wc=null,Qc.call(n))}function tR(n,a){if(!(a.state.loading&4)){var o=Wc.get(n);if(o)var c=o.get(null);else{o=new Map,Wc.set(n,o);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<p.length;v++){var w=p[v];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(o.set(w.dataset.precedence,w),c=w)}c&&o.set(null,c)}p=a.instance,w=p.getAttribute("data-precedence"),v=o.get(w)||c,v===c&&o.set(null,p),o.set(w,p),this.count++,c=Qc.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),v?v.parentNode.insertBefore(p,v.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}var el={$$typeof:R,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function nR(n,a,o,c,p,v,w,N,L){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=Ma(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ma(0),this.hiddenUpdates=Ma(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=v,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function Pb(n,a,o,c,p,v,w,N,L,$,ee,se){return n=new nR(n,a,o,w,L,$,ee,se,N),a=1,v===!0&&(a|=24),v=Ln(3,null,null,a),n.current=v,v.stateNode=n,a=hf(),a.refCount++,n.pooledCache=a,a.refCount++,v.memoizedState={element:c,isDehydrated:o,cache:a},yf(v),n}function kb(n){return n?(n=fo,n):fo}function Lb(n,a,o,c,p,v){p=kb(p),c.context===null?c.context=p:c.pendingContext=p,c=Bs(a),c.payload={element:o},v=v===void 0?null:v,v!==null&&(c.callback=v),o=Us(n,c,a),o!==null&&(wn(o,n,a),Or(o,n,a))}function zb(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<a?o:a}}function Lm(n,a){zb(n,a),(n=n.alternate)&&zb(n,a)}function Vb(n){if(n.tag===13||n.tag===31){var a=Si(n,67108864);a!==null&&wn(a,n,67108864),Lm(n,67108864)}}function Bb(n){if(n.tag===13||n.tag===31){var a=In();a=_s(a);var o=Si(n,a);o!==null&&wn(o,n,a),Lm(n,a)}}var eu=!0;function aR(n,a,o,c){var p=k.T;k.T=null;var v=H.p;try{H.p=2,zm(n,a,o,c)}finally{H.p=v,k.T=p}}function sR(n,a,o,c){var p=k.T;k.T=null;var v=H.p;try{H.p=8,zm(n,a,o,c)}finally{H.p=v,k.T=p}}function zm(n,a,o,c){if(eu){var p=Vm(c);if(p===null)Cm(n,a,c,tu,o),Ib(n,c);else if(oR(p,n,a,o,c))c.stopPropagation();else if(Ib(n,c),a&4&&-1<iR.indexOf(n)){for(;p!==null;){var v=Wa(p);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var w=bt(v.pendingLanes);if(w!==0){var N=v;for(N.pendingLanes|=2,N.entangledLanes|=2;w;){var L=1<<31-Et(w);N.entanglements[1]|=L,w&=~L}ka(v),(Ke&6)===0&&(zc=Pt()+500,Yr(0))}}break;case 31:case 13:N=Si(v,2),N!==null&&wn(N,v,2),Bc(),Lm(v,2)}if(v=Vm(c),v===null&&Cm(n,a,c,tu,o),v===p)break;p=v}p!==null&&c.stopPropagation()}else Cm(n,a,c,null,o)}}function Vm(n){return n=Bd(n),Bm(n)}var tu=null;function Bm(n){if(tu=null,n=Qn(n),n!==null){var a=l(n);if(a===null)n=null;else{var o=a.tag;if(o===13){if(n=u(a),n!==null)return n;n=null}else if(o===31){if(n=f(a),n!==null)return n;n=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return tu=n,null}function Ub(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"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(hi()){case fa:return 2;case Xa:return 8;case hn:case Yn:return 32;case pn:return 268435456;default:return 32}default:return 32}}var Um=!1,Qs=null,Ws=null,Js=null,tl=new Map,nl=new Map,ei=[],iR="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 Ib(n,a){switch(n){case"focusin":case"focusout":Qs=null;break;case"dragenter":case"dragleave":Ws=null;break;case"mouseover":case"mouseout":Js=null;break;case"pointerover":case"pointerout":tl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":nl.delete(a.pointerId)}}function al(n,a,o,c,p,v){return n===null||n.nativeEvent!==v?(n={blockedOn:a,domEventName:o,eventSystemFlags:c,nativeEvent:v,targetContainers:[p]},a!==null&&(a=Wa(a),a!==null&&Vb(a)),n):(n.eventSystemFlags|=c,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function oR(n,a,o,c,p){switch(a){case"focusin":return Qs=al(Qs,n,a,o,c,p),!0;case"dragenter":return Ws=al(Ws,n,a,o,c,p),!0;case"mouseover":return Js=al(Js,n,a,o,c,p),!0;case"pointerover":var v=p.pointerId;return tl.set(v,al(tl.get(v)||null,n,a,o,c,p)),!0;case"gotpointercapture":return v=p.pointerId,nl.set(v,al(nl.get(v)||null,n,a,o,c,p)),!0}return!1}function Hb(n){var a=Qn(n.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=u(o),a!==null){n.blockedOn=a,Yl(n.priority,function(){Bb(o)});return}}else if(a===31){if(a=f(o),a!==null){n.blockedOn=a,Yl(n.priority,function(){Bb(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function nu(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var o=Vm(n.nativeEvent);if(o===null){o=n.nativeEvent;var c=new o.constructor(o.type,o);Vd=c,o.target.dispatchEvent(c),Vd=null}else return a=Wa(o),a!==null&&Vb(a),n.blockedOn=o,!1;a.shift()}return!0}function Fb(n,a,o){nu(n)&&o.delete(a)}function rR(){Um=!1,Qs!==null&&nu(Qs)&&(Qs=null),Ws!==null&&nu(Ws)&&(Ws=null),Js!==null&&nu(Js)&&(Js=null),tl.forEach(Fb),nl.forEach(Fb)}function au(n,a){n.blockedOn===a&&(n.blockedOn=null,Um||(Um=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,rR)))}var su=null;function qb(n){su!==n&&(su=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){su===n&&(su=null);for(var a=0;a<n.length;a+=3){var o=n[a],c=n[a+1],p=n[a+2];if(typeof c!="function"){if(Bm(c||o)===null)continue;break}var v=Wa(o);v!==null&&(n.splice(a,3),a-=3,Vf(v,{pending:!0,data:p,method:o.method,action:c},c,p))}}))}function Lo(n){function a(L){return au(L,n)}Qs!==null&&au(Qs,n),Ws!==null&&au(Ws,n),Js!==null&&au(Js,n),tl.forEach(a),nl.forEach(a);for(var o=0;o<ei.length;o++){var c=ei[o];c.blockedOn===n&&(c.blockedOn=null)}for(;0<ei.length&&(o=ei[0],o.blockedOn===null);)Hb(o),o.blockedOn===null&&ei.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(c=0;c<o.length;c+=3){var p=o[c],v=o[c+1],w=p[an]||null;if(typeof v=="function")w||qb(o);else if(w){var N=null;if(v&&v.hasAttribute("formAction")){if(p=v,w=v[an]||null)N=w.formAction;else if(Bm(p)!==null)continue}else N=w.action;typeof N=="function"?o[c+1]=N:(o.splice(c,3),c-=3),qb(o)}}}function $b(){function n(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(w){return p=w})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),c||setTimeout(o,20)}function o(){if(!c&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function Im(n){this._internalRoot=n}iu.prototype.render=Im.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,c=In();Lb(o,c,n,a,null,null)},iu.prototype.unmount=Im.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;Lb(n.current,2,null,n,null,null),Bc(),a[Os]=null}};function iu(n){this._internalRoot=n}iu.prototype.unstable_scheduleHydration=function(n){if(n){var a=pr();n={blockedOn:null,target:n,priority:a};for(var o=0;o<ei.length&&a!==0&&a<ei[o].priority;o++);ei.splice(o,0,n),o===0&&Hb(n)}};var Kb=t.version;if(Kb!=="19.2.3")throw Error(i(527,Kb,"19.2.3"));H.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=m(a),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var lR={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{ma=ou.inject(lR),kt=ou}catch{}}return il.createRoot=function(n,a){if(!r(n))throw Error(i(299));var o=!1,c="",p=Jy,v=ex,w=tx;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError)),a=Pb(n,1,!1,null,null,o,c,null,p,v,w,$b),n[Os]=a.current,wm(n),new Im(a)},il.hydrateRoot=function(n,a,o){if(!r(n))throw Error(i(299));var c=!1,p="",v=Jy,w=ex,N=tx,L=null;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(v=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(N=o.onRecoverableError),o.formState!==void 0&&(L=o.formState)),a=Pb(n,1,!0,a,o??null,c,p,L,v,w,N,$b),a.context=kb(null),o=a.current,c=In(),c=_s(c),p=Bs(c),p.callback=null,Us(o,p,c),o=c,a.current.lanes=o,at(a,o),ka(a),n[Os]=a.current,wm(n),new iu(a)},il.version="19.2.3",il}var n0;function yR(){if(n0)return qm.exports;n0=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(),qm.exports=vR(),qm.exports}var xR=yR();var a0="popstate";function bR(e={}){function t(r,l){let{pathname:u="/",search:f="",hash:h=""}=Ji(r.location.hash.substring(1));return!u.startsWith("/")&&!u.startsWith(".")&&(u="/"+u),zh("",{pathname:u,search:f,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function s(r,l){let u=r.document.querySelector("base"),f="";if(u&&u.getAttribute("href")){let h=r.location.href,m=h.indexOf("#");f=m===-1?h:h.slice(0,m)}return f+"#"+(typeof l=="string"?l:wl(l))}function i(r,l){On(r.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(l)})`)}return wR(t,s,i,e)}function ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function On(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function SR(){return Math.random().toString(36).substring(2,10)}function s0(e,t){return{usr:e.state,key:e.key,idx:t}}function zh(e,t,s=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ji(t):t,state:s,key:t&&t.key||i||SR()}}function wl({pathname:e="/",search:t="",hash:s=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function Ji(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substring(s),e=e.substring(0,s));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function wR(e,t,s,i={}){let{window:r=document.defaultView,v5Compat:l=!1}=i,u=r.history,f="POP",h=null,m=y();m==null&&(m=0,u.replaceState({...u.state,idx:m},""));function y(){return(u.state||{idx:null}).idx}function g(){f="POP";let j=y(),E=j==null?null:j-m;m=j,h&&h({action:f,location:T.location,delta:E})}function b(j,E){f="PUSH";let A=zh(T.location,j,E);s&&s(A,j),m=y()+1;let R=s0(A,m),_=T.createHref(A);try{u.pushState(R,"",_)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;r.location.assign(_)}l&&h&&h({action:f,location:T.location,delta:1})}function S(j,E){f="REPLACE";let A=zh(T.location,j,E);s&&s(A,j),m=y();let R=s0(A,m),_=T.createHref(A);u.replaceState(R,"",_),l&&h&&h({action:f,location:T.location,delta:0})}function C(j){return CR(j)}let T={get action(){return f},get location(){return e(r,u)},listen(j){if(h)throw new Error("A history only accepts one active listener");return r.addEventListener(a0,g),h=j,()=>{r.removeEventListener(a0,g),h=null}},createHref(j){return t(r,j)},createURL:C,encodeLocation(j){let E=C(j);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:b,replace:S,go(j){return u.go(j)}};return T}function CR(e,t=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),ut(s,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:wl(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=s+i),new URL(i,s)}function nw(e,t,s="/"){return TR(e,t,s,!1)}function TR(e,t,s,i){let r=typeof t=="string"?Ji(t):t,l=Ts(r.pathname||"/",s);if(l==null)return null;let u=aw(e);ER(u);let f=null;for(let h=0;f==null&&h<u.length;++h){let m=LR(l);f=PR(u[h],m,i)}return f}function aw(e,t=[],s=[],i="",r=!1){let l=(u,f,h=r,m)=>{let y={relativePath:m===void 0?u.path||"":m,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(i)&&h)return;ut(y.relativePath.startsWith(i),`Absolute route path "${y.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(i.length)}let g=ws([i,y.relativePath]),b=s.concat(y);u.children&&u.children.length>0&&(ut(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),aw(u.children,t,b,g,h)),!(u.path==null&&!u.index)&&t.push({path:g,score:OR(g,u.index),routesMeta:b})};return e.forEach((u,f)=>{if(u.path===""||!u.path?.includes("?"))l(u,f);else for(let h of sw(u.path))l(u,f,!0,h)}),t}function sw(e){let t=e.split("/");if(t.length===0)return[];let[s,...i]=t,r=s.endsWith("?"),l=s.replace(/\?$/,"");if(i.length===0)return r?[l,""]:[l];let u=sw(i.join("/")),f=[];return f.push(...u.map(h=>h===""?l:[l,h].join("/"))),r&&f.push(...u),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function ER(e){e.sort((t,s)=>t.score!==s.score?s.score-t.score:DR(t.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var jR=/^:[\w-]+$/,AR=3,NR=2,RR=1,MR=10,_R=-2,i0=e=>e==="*";function OR(e,t){let s=e.split("/"),i=s.length;return s.some(i0)&&(i+=_R),t&&(i+=NR),s.filter(r=>!i0(r)).reduce((r,l)=>r+(jR.test(l)?AR:l===""?RR:MR),i)}function DR(e,t){return e.length===t.length&&e.slice(0,-1).every((i,r)=>i===t[r])?e[e.length-1]-t[t.length-1]:0}function PR(e,t,s=!1){let{routesMeta:i}=e,r={},l="/",u=[];for(let f=0;f<i.length;++f){let h=i[f],m=f===i.length-1,y=l==="/"?t:t.slice(l.length)||"/",g=Vu({path:h.relativePath,caseSensitive:h.caseSensitive,end:m},y),b=h.route;if(!g&&m&&s&&!i[i.length-1].route.index&&(g=Vu({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},y)),!g)return null;Object.assign(r,g.params),u.push({params:r,pathname:ws([l,g.pathname]),pathnameBase:UR(ws([l,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(l=ws([l,g.pathnameBase]))}return u}function Vu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,i]=kR(e.path,e.caseSensitive,e.end),r=t.match(s);if(!r)return null;let l=r[0],u=l.replace(/(.)\/+$/,"$1"),f=r.slice(1);return{params:i.reduce((m,{paramName:y,isOptional:g},b)=>{if(y==="*"){let C=f[b]||"";u=l.slice(0,l.length-C.length).replace(/(.)\/+$/,"$1")}const S=f[b];return g&&!S?m[y]=void 0:m[y]=(S||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:u,pattern:e}}function kR(e,t=!1,s=!0){On(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 i=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,f,h)=>(i.push({paramName:f,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),i]}function LR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return On(!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 Ts(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,i=e.charAt(s);return i&&i!=="/"?null:e.slice(s)||"/"}var iw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zR=e=>iw.test(e);function VR(e,t="/"){let{pathname:s,search:i="",hash:r=""}=typeof e=="string"?Ji(e):e,l;if(s)if(zR(s))l=s;else{if(s.includes("//")){let u=s;s=s.replace(/\/\/+/g,"/"),On(!1,`Pathnames cannot have embedded double slashes - normalizing ${u} -> ${s}`)}s.startsWith("/")?l=o0(s.substring(1),"/"):l=o0(s,t)}else l=t;return{pathname:l,search:IR(i),hash:HR(r)}}function o0(e,t){let s=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?s.length>1&&s.pop():r!=="."&&s.push(r)}),s.length>1?s.join("/"):"/"}function Ym(e,t,s,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function BR(e){return e.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function zp(e){let t=BR(e);return t.map((s,i)=>i===t.length-1?s.pathname:s.pathnameBase)}function Vp(e,t,s,i=!1){let r;typeof e=="string"?r=Ji(e):(r={...e},ut(!r.pathname||!r.pathname.includes("?"),Ym("?","pathname","search",r)),ut(!r.pathname||!r.pathname.includes("#"),Ym("#","pathname","hash",r)),ut(!r.search||!r.search.includes("#"),Ym("#","search","hash",r)));let l=e===""||r.pathname==="",u=l?"/":r.pathname,f;if(u==null)f=s;else{let g=t.length-1;if(!i&&u.startsWith("..")){let b=u.split("/");for(;b[0]==="..";)b.shift(),g-=1;r.pathname=b.join("/")}f=g>=0?t[g]:"/"}let h=VR(r,f),m=u&&u!=="/"&&u.endsWith("/"),y=(l||u===".")&&s.endsWith("/");return!h.pathname.endsWith("/")&&(m||y)&&(h.pathname+="/"),h}var ws=e=>e.join("/").replace(/\/\/+/g,"/"),UR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),IR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,HR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,FR=class{constructor(e,t,s,i=!1){this.status=e,this.statusText=t||"",this.internal=i,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function qR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function $R(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ow=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function rw(e,t){let s=e;if(typeof s!="string"||!iw.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,r=!1;if(ow)try{let l=new URL(window.location.href),u=s.startsWith("//")?new URL(l.protocol+s):new URL(s),f=Ts(u.pathname,t);u.origin===l.origin&&f!=null?s=f+u.search+u.hash:r=!0}catch{On(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:r,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var lw=["POST","PUT","PATCH","DELETE"];new Set(lw);var KR=["GET",...lw];new Set(KR);var sr=x.createContext(null);sr.displayName="DataRouter";var od=x.createContext(null);od.displayName="DataRouterState";var GR=x.createContext(!1),cw=x.createContext({isTransitioning:!1});cw.displayName="ViewTransition";var YR=x.createContext(new Map);YR.displayName="Fetchers";var XR=x.createContext(null);XR.displayName="Await";var $n=x.createContext(null);$n.displayName="Navigation";var Ll=x.createContext(null);Ll.displayName="Location";var da=x.createContext({outlet:null,matches:[],isDataRoute:!1});da.displayName="Route";var Bp=x.createContext(null);Bp.displayName="RouteError";var uw="REACT_ROUTER_ERROR",ZR="REDIRECT",QR="ROUTE_ERROR_RESPONSE";function WR(e){if(e.startsWith(`${uw}:${ZR}:{`))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 JR(e){if(e.startsWith(`${uw}:${QR}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new FR(t.status,t.statusText,t.data)}catch{}}function eM(e,{relative:t}={}){ut(ir(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=x.useContext($n),{hash:r,pathname:l,search:u}=zl(e,{relative:t}),f=l;return s!=="/"&&(f=l==="/"?s:ws([s,l])),i.createHref({pathname:f,search:u,hash:r})}function ir(){return x.useContext(Ll)!=null}function Ka(){return ut(ir(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(Ll).location}var dw="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fw(e){x.useContext($n).static||x.useLayoutEffect(e)}function Up(){let{isDataRoute:e}=x.useContext(da);return e?gM():tM()}function tM(){ut(ir(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(sr),{basename:t,navigator:s}=x.useContext($n),{matches:i}=x.useContext(da),{pathname:r}=Ka(),l=JSON.stringify(zp(i)),u=x.useRef(!1);return fw(()=>{u.current=!0}),x.useCallback((h,m={})=>{if(On(u.current,dw),!u.current)return;if(typeof h=="number"){s.go(h);return}let y=Vp(h,JSON.parse(l),r,m.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:ws([t,y.pathname])),(m.replace?s.replace:s.push)(y,m.state,m)},[t,s,l,r,e])}var nM=x.createContext(null);function aM(e){let t=x.useContext(da).outlet;return x.useMemo(()=>t&&x.createElement(nM.Provider,{value:e},t),[t,e])}function sM(){let{matches:e}=x.useContext(da),t=e[e.length-1];return t?t.params:{}}function zl(e,{relative:t}={}){let{matches:s}=x.useContext(da),{pathname:i}=Ka(),r=JSON.stringify(zp(s));return x.useMemo(()=>Vp(e,JSON.parse(r),i,t==="path"),[e,r,i,t])}function iM(e,t){return mw(e,t)}function mw(e,t,s,i,r){ut(ir(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=x.useContext($n),{matches:u}=x.useContext(da),f=u[u.length-1],h=f?f.params:{},m=f?f.pathname:"/",y=f?f.pathnameBase:"/",g=f&&f.route;{let A=g&&g.path||"";pw(m,!g||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${A}">) 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.
|
|
10
|
+
|
|
11
|
+
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let b=Ka(),S;if(t){let A=typeof t=="string"?Ji(t):t;ut(y==="/"||A.pathname?.startsWith(y),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${y}" but pathname "${A.pathname}" was given in the \`location\` prop.`),S=A}else S=b;let C=S.pathname||"/",T=C;if(y!=="/"){let A=y.replace(/^\//,"").split("/");T="/"+C.replace(/^\//,"").split("/").slice(A.length).join("/")}let j=nw(e,{pathname:T});On(g||j!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),On(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.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.`);let E=uM(j&&j.map(A=>Object.assign({},A,{params:Object.assign({},h,A.params),pathname:ws([y,l.encodeLocation?l.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?y:ws([y,l.encodeLocation?l.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),u,s,i,r);return t&&E?x.createElement(Ll.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...S},navigationType:"POP"}},E):E}function oM(){let e=pM(),t=qR(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:i},l={padding:"2px 4px",backgroundColor:i},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:l},"ErrorBoundary")," or"," ",x.createElement("code",{style:l},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),s?x.createElement("pre",{style:r},s):null,u)}var rM=x.createElement(oM,null),hw=class extends x.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 s=JR(e.digest);s&&(e=s)}let t=e!==void 0?x.createElement(da.Provider,{value:this.props.routeContext},x.createElement(Bp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?x.createElement(lM,{error:e},t):t}};hw.contextType=GR;var Xm=new WeakMap;function lM({children:e,error:t}){let{basename:s}=x.useContext($n);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=WR(t.digest);if(i){let r=Xm.get(t);if(r)throw r;let l=rw(i.location,s);if(ow&&!Xm.get(t))if(l.isExternal||i.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:i.replace}));throw Xm.set(t,u),u}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function cM({routeContext:e,match:t,children:s}){let i=x.useContext(sr);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(da.Provider,{value:e},s)}function uM(e,t=[],s=null,i=null,r=null){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 l=e,u=s?.errors;if(u!=null){let y=l.findIndex(g=>g.route.id&&u?.[g.route.id]!==void 0);ut(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),l=l.slice(0,Math.min(l.length,y+1))}let f=!1,h=-1;if(s)for(let y=0;y<l.length;y++){let g=l[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(h=y),g.route.id){let{loaderData:b,errors:S}=s,C=g.route.loader&&!b.hasOwnProperty(g.route.id)&&(!S||S[g.route.id]===void 0);if(g.route.lazy||C){f=!0,h>=0?l=l.slice(0,h+1):l=[l[0]];break}}}let m=s&&i?(y,g)=>{i(y,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:$R(s.matches),errorInfo:g})}:void 0;return l.reduceRight((y,g,b)=>{let S,C=!1,T=null,j=null;s&&(S=u&&g.route.id?u[g.route.id]:void 0,T=g.route.errorElement||rM,f&&(h<0&&b===0?(pw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,j=null):h===b&&(C=!0,j=g.route.hydrateFallbackElement||null)));let E=t.concat(l.slice(0,b+1)),A=()=>{let R;return S?R=T:C?R=j:g.route.Component?R=x.createElement(g.route.Component,null):g.route.element?R=g.route.element:R=y,x.createElement(cM,{match:g,routeContext:{outlet:y,matches:E,isDataRoute:s!=null},children:R})};return s&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?x.createElement(hw,{location:s.location,revalidation:s.revalidation,component:T,error:S,children:A(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:m}):A()},null)}function Ip(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dM(e){let t=x.useContext(sr);return ut(t,Ip(e)),t}function fM(e){let t=x.useContext(od);return ut(t,Ip(e)),t}function mM(e){let t=x.useContext(da);return ut(t,Ip(e)),t}function Hp(e){let t=mM(e),s=t.matches[t.matches.length-1];return ut(s.route.id,`${e} can only be used on routes that contain a unique "id"`),s.route.id}function hM(){return Hp("useRouteId")}function pM(){let e=x.useContext(Bp),t=fM("useRouteError"),s=Hp("useRouteError");return e!==void 0?e:t.errors?.[s]}function gM(){let{router:e}=dM("useNavigate"),t=Hp("useNavigate"),s=x.useRef(!1);return fw(()=>{s.current=!0}),x.useCallback(async(r,l={})=>{On(s.current,dw),s.current&&(typeof r=="number"?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...l}))},[e,t])}var r0={};function pw(e,t,s){!t&&!r0[e]&&(r0[e]=!0,On(!1,s))}x.memo(vM);function vM({routes:e,future:t,state:s,onError:i}){return mw(e,void 0,s,i,t)}function yM({to:e,replace:t,state:s,relative:i}){ut(ir(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=x.useContext($n);On(!r,"<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:l}=x.useContext(da),{pathname:u}=Ka(),f=Up(),h=Vp(e,zp(l),u,i==="path"),m=JSON.stringify(h);return x.useEffect(()=>{f(JSON.parse(m),{replace:t,state:s,relative:i})},[f,m,i,t,s]),null}function xM(e){return aM(e.context)}function bs(e){ut(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function bM({basename:e="/",children:t=null,location:s,navigationType:i="POP",navigator:r,static:l=!1,unstable_useTransitions:u}){ut(!ir(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),h=x.useMemo(()=>({basename:f,navigator:r,static:l,unstable_useTransitions:u,future:{}}),[f,r,l,u]);typeof s=="string"&&(s=Ji(s));let{pathname:m="/",search:y="",hash:g="",state:b=null,key:S="default"}=s,C=x.useMemo(()=>{let T=Ts(m,f);return T==null?null:{location:{pathname:T,search:y,hash:g,state:b,key:S},navigationType:i}},[f,m,y,g,b,S,i]);return On(C!=null,`<Router basename="${f}"> is not able to match the URL "${m}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:x.createElement($n.Provider,{value:h},x.createElement(Ll.Provider,{children:t,value:C}))}function SM({children:e,location:t}){return iM(Vh(e),t)}function Vh(e,t=[]){let s=[];return x.Children.forEach(e,(i,r)=>{if(!x.isValidElement(i))return;let l=[...t,r];if(i.type===x.Fragment){s.push.apply(s,Vh(i.props.children,l));return}ut(i.type===bs,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ut(!i.props.index||!i.props.children,"An index route cannot have child routes.");let u={id:i.props.id||l.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=Vh(i.props.children,l)),s.push(u)}),s}var Eu="get",ju="application/x-www-form-urlencoded";function rd(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function wM(e){return rd(e)&&e.tagName.toLowerCase()==="button"}function CM(e){return rd(e)&&e.tagName.toLowerCase()==="form"}function TM(e){return rd(e)&&e.tagName.toLowerCase()==="input"}function EM(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jM(e,t){return e.button===0&&(!t||t==="_self")&&!EM(e)}function Bh(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,s)=>{let i=e[s];return t.concat(Array.isArray(i)?i.map(r=>[s,r]):[[s,i]])},[]))}function AM(e,t){let s=Bh(e);return t&&t.forEach((i,r)=>{s.has(r)||t.getAll(r).forEach(l=>{s.append(r,l)})}),s}var ru=null;function NM(){if(ru===null)try{new FormData(document.createElement("form"),0),ru=!1}catch{ru=!0}return ru}var RM=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zm(e){return e!=null&&!RM.has(e)?(On(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ju}"`),null):e}function MM(e,t){let s,i,r,l,u;if(CM(e)){let f=e.getAttribute("action");i=f?Ts(f,t):null,s=e.getAttribute("method")||Eu,r=Zm(e.getAttribute("enctype"))||ju,l=new FormData(e)}else if(wM(e)||TM(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(i=h?Ts(h,t):null,s=e.getAttribute("formmethod")||f.getAttribute("method")||Eu,r=Zm(e.getAttribute("formenctype"))||Zm(f.getAttribute("enctype"))||ju,l=new FormData(f,e),!NM()){let{name:m,type:y,value:g}=e;if(y==="image"){let b=m?`${m}.`:"";l.append(`${b}x`,"0"),l.append(`${b}y`,"0")}else m&&l.append(m,g)}}else{if(rd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Eu,i=null,r=ju,u=e}return l&&r==="text/plain"&&(u=l,l=void 0),{action:i,method:s.toLowerCase(),encType:r,formData:l,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Fp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _M(e,t,s){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i.pathname==="/"?i.pathname=`_root.${s}`:t&&Ts(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${s}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${s}`,i}async function OM(e,t){if(e.id in t)return t[e.id];try{let s=await import(e.module);return t[e.id]=s,s}catch(s){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function DM(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 PM(e,t,s){let i=await Promise.all(e.map(async r=>{let l=t.routes[r.route.id];if(l){let u=await OM(l,s);return u.links?u.links():[]}return[]}));return VM(i.flat(1).filter(DM).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function l0(e,t,s,i,r,l){let u=(h,m)=>s[m]?h.route.id!==s[m].route.id:!0,f=(h,m)=>s[m].pathname!==h.pathname||s[m].route.path?.endsWith("*")&&s[m].params["*"]!==h.params["*"];return l==="assets"?t.filter((h,m)=>u(h,m)||f(h,m)):l==="data"?t.filter((h,m)=>{let y=i.routes[h.route.id];if(!y||!y.hasLoader)return!1;if(u(h,m)||f(h,m))return!0;if(h.route.shouldRevalidate){let g=h.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function kM(e,t,{includeHydrateFallback:s}={}){return LM(e.map(i=>{let r=t.routes[i.route.id];if(!r)return[];let l=[r.module];return r.clientActionModule&&(l=l.concat(r.clientActionModule)),r.clientLoaderModule&&(l=l.concat(r.clientLoaderModule)),s&&r.hydrateFallbackModule&&(l=l.concat(r.hydrateFallbackModule)),r.imports&&(l=l.concat(r.imports)),l}).flat(1))}function LM(e){return[...new Set(e)]}function zM(e){let t={},s=Object.keys(e).sort();for(let i of s)t[i]=e[i];return t}function VM(e,t){let s=new Set;return new Set(t),e.reduce((i,r)=>{let l=JSON.stringify(zM(r));return s.has(l)||(s.add(l),i.push({key:l,link:r})),i},[])}function gw(){let e=x.useContext(sr);return Fp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function BM(){let e=x.useContext(od);return Fp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var qp=x.createContext(void 0);qp.displayName="FrameworkContext";function vw(){let e=x.useContext(qp);return Fp(e,"You must render this element inside a <HydratedRouter> element"),e}function UM(e,t){let s=x.useContext(qp),[i,r]=x.useState(!1),[l,u]=x.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:m,onMouseLeave:y,onTouchStart:g}=t,b=x.useRef(null);x.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let T=E=>{E.forEach(A=>{u(A.isIntersecting)})},j=new IntersectionObserver(T,{threshold:.5});return b.current&&j.observe(b.current),()=>{j.disconnect()}}},[e]),x.useEffect(()=>{if(i){let T=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(T)}}},[i]);let S=()=>{r(!0)},C=()=>{r(!1),u(!1)};return s?e!=="intent"?[l,b,{}]:[l,b,{onFocus:ol(f,S),onBlur:ol(h,C),onMouseEnter:ol(m,S),onMouseLeave:ol(y,C),onTouchStart:ol(g,S)}]:[!1,b,{}]}function ol(e,t){return s=>{e&&e(s),s.defaultPrevented||t(s)}}function IM({page:e,...t}){let{router:s}=gw(),i=x.useMemo(()=>nw(s.routes,e,s.basename),[s.routes,e,s.basename]);return i?x.createElement(FM,{page:e,matches:i,...t}):null}function HM(e){let{manifest:t,routeModules:s}=vw(),[i,r]=x.useState([]);return x.useEffect(()=>{let l=!1;return PM(e,t,s).then(u=>{l||r(u)}),()=>{l=!0}},[e,t,s]),i}function FM({page:e,matches:t,...s}){let i=Ka(),{manifest:r,routeModules:l}=vw(),{basename:u}=gw(),{loaderData:f,matches:h}=BM(),m=x.useMemo(()=>l0(e,t,h,r,i,"data"),[e,t,h,r,i]),y=x.useMemo(()=>l0(e,t,h,r,i,"assets"),[e,t,h,r,i]),g=x.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let C=new Set,T=!1;if(t.forEach(E=>{let A=r.routes[E.route.id];!A||!A.hasLoader||(!m.some(R=>R.route.id===E.route.id)&&E.route.id in f&&l[E.route.id]?.shouldRevalidate||A.hasClientLoader?T=!0:C.add(E.route.id))}),C.size===0)return[];let j=_M(e,u,"data");return T&&C.size>0&&j.searchParams.set("_routes",t.filter(E=>C.has(E.route.id)).map(E=>E.route.id).join(",")),[j.pathname+j.search]},[u,f,i,r,m,t,e,l]),b=x.useMemo(()=>kM(y,r),[y,r]),S=HM(y);return x.createElement(x.Fragment,null,g.map(C=>x.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...s})),b.map(C=>x.createElement("link",{key:C,rel:"modulepreload",href:C,...s})),S.map(({key:C,link:T})=>x.createElement("link",{key:C,nonce:s.nonce,...T})))}function qM(...e){return t=>{e.forEach(s=>{typeof s=="function"?s(t):s!=null&&(s.current=t)})}}var $M=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{$M&&(window.__reactRouterVersion="7.11.0")}catch{}function KM({basename:e,children:t,unstable_useTransitions:s,window:i}){let r=x.useRef();r.current==null&&(r.current=bR({window:i,v5Compat:!0}));let l=r.current,[u,f]=x.useState({action:l.action,location:l.location}),h=x.useCallback(m=>{s===!1?f(m):x.startTransition(()=>f(m))},[s]);return x.useLayoutEffect(()=>l.listen(h),[l,h]),x.createElement(bM,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:l,unstable_useTransitions:s})}var yw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ii=x.forwardRef(function({onClick:t,discover:s="render",prefetch:i="none",relative:r,reloadDocument:l,replace:u,state:f,target:h,to:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},C){let{basename:T,unstable_useTransitions:j}=x.useContext($n),E=typeof m=="string"&&yw.test(m),A=rw(m,T);m=A.to;let R=eM(m,{relative:r}),[_,M,z]=UM(i,S),D=XM(m,{replace:u,state:f,target:h,preventScrollReset:y,relative:r,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:j});function P(Q){t&&t(Q),Q.defaultPrevented||D(Q)}let X=x.createElement("a",{...S,...z,href:A.absoluteURL||R,onClick:A.isExternal||l?t:P,ref:qM(C,M),target:h,"data-discover":!E&&s==="render"?"true":void 0});return _&&!E?x.createElement(x.Fragment,null,X,x.createElement(IM,{page:R})):X});ii.displayName="Link";var xw=x.forwardRef(function({"aria-current":t="page",caseSensitive:s=!1,className:i="",end:r=!1,style:l,to:u,viewTransition:f,children:h,...m},y){let g=zl(u,{relative:m.relative}),b=Ka(),S=x.useContext(od),{navigator:C,basename:T}=x.useContext($n),j=S!=null&&t2(g)&&f===!0,E=C.encodeLocation?C.encodeLocation(g).pathname:g.pathname,A=b.pathname,R=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;s||(A=A.toLowerCase(),R=R?R.toLowerCase():null,E=E.toLowerCase()),R&&T&&(R=Ts(R,T)||R);const _=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let M=A===E||!r&&A.startsWith(E)&&A.charAt(_)==="/",z=R!=null&&(R===E||!r&&R.startsWith(E)&&R.charAt(E.length)==="/"),D={isActive:M,isPending:z,isTransitioning:j},P=M?t:void 0,X;typeof i=="function"?X=i(D):X=[i,M?"active":null,z?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let Q=typeof l=="function"?l(D):l;return x.createElement(ii,{...m,"aria-current":P,className:X,ref:y,style:Q,to:u,viewTransition:f},typeof h=="function"?h(D):h)});xw.displayName="NavLink";var GM=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:s,reloadDocument:i,replace:r,state:l,method:u=Eu,action:f,onSubmit:h,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},C)=>{let{unstable_useTransitions:T}=x.useContext($n),j=JM(),E=e2(f,{relative:m}),A=u.toLowerCase()==="get"?"get":"post",R=typeof f=="string"&&yw.test(f),_=M=>{if(h&&h(M),M.defaultPrevented)return;M.preventDefault();let z=M.nativeEvent.submitter,D=z?.getAttribute("formmethod")||u,P=()=>j(z||M.currentTarget,{fetcherKey:t,method:D,navigate:s,replace:r,state:l,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b});T&&s!==!1?x.startTransition(()=>P()):P()};return x.createElement("form",{ref:C,method:A,action:E,onSubmit:i?h:_,...S,"data-discover":!R&&e==="render"?"true":void 0})});GM.displayName="Form";function YM(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function bw(e){let t=x.useContext(sr);return ut(t,YM(e)),t}function XM(e,{target:t,replace:s,state:i,preventScrollReset:r,relative:l,viewTransition:u,unstable_defaultShouldRevalidate:f,unstable_useTransitions:h}={}){let m=Up(),y=Ka(),g=zl(e,{relative:l});return x.useCallback(b=>{if(jM(b,t)){b.preventDefault();let S=s!==void 0?s:wl(y)===wl(g),C=()=>m(e,{replace:S,state:i,preventScrollReset:r,relative:l,viewTransition:u,unstable_defaultShouldRevalidate:f});h?x.startTransition(()=>C()):C()}},[y,m,g,s,i,t,e,r,l,u,f,h])}function ZM(e){On(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=x.useRef(Bh(e)),s=x.useRef(!1),i=Ka(),r=x.useMemo(()=>AM(i.search,s.current?null:t.current),[i.search]),l=Up(),u=x.useCallback((f,h)=>{const m=Bh(typeof f=="function"?f(new URLSearchParams(r)):f);s.current=!0,l("?"+m,h)},[l,r]);return[r,u]}var QM=0,WM=()=>`__${String(++QM)}__`;function JM(){let{router:e}=bw("useSubmit"),{basename:t}=x.useContext($n),s=hM(),i=e.fetch,r=e.navigate;return x.useCallback(async(l,u={})=>{let{action:f,method:h,encType:m,formData:y,body:g}=MM(l,t);if(u.navigate===!1){let b=u.fetcherKey||WM();await i(b,s,u.action||f,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:g,formMethod:u.method||h,formEncType:u.encType||m,flushSync:u.flushSync})}else await r(u.action||f,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:g,formMethod:u.method||h,formEncType:u.encType||m,replace:u.replace,state:u.state,fromRouteId:s,flushSync:u.flushSync,viewTransition:u.viewTransition})},[i,r,t,s])}function e2(e,{relative:t}={}){let{basename:s}=x.useContext($n),i=x.useContext(da);ut(i,"useFormAction must be used inside a RouteContext");let[r]=i.matches.slice(-1),l={...zl(e||".",{relative:t})},u=Ka();if(e==null){l.search=u.search;let f=new URLSearchParams(l.search),h=f.getAll("index");if(h.some(y=>y==="")){f.delete("index"),h.filter(g=>g).forEach(g=>f.append("index",g));let y=f.toString();l.search=y?`?${y}`:""}}return(!e||e===".")&&r.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(l.pathname=l.pathname==="/"?s:ws([s,l.pathname])),wl(l)}function t2(e,{relative:t}={}){let s=x.useContext(cw);ut(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=bw("useViewTransitionState"),r=zl(e,{relative:t});if(!s.isTransitioning)return!1;let l=Ts(s.currentLocation.pathname,i)||s.currentLocation.pathname,u=Ts(s.nextLocation.pathname,i)||s.nextLocation.pathname;return Vu(r.pathname,u)!=null||Vu(r.pathname,l)!=null}var Vl=tw();const Sw=kp(Vl);var n2=(e,t,s,i,r,l,u,f)=>{let h=document.documentElement,m=["light","dark"];function y(S){(Array.isArray(e)?e:[e]).forEach(C=>{let T=C==="class",j=T&&l?r.map(E=>l[E]||E):r;T?(h.classList.remove(...j),h.classList.add(l&&l[S]?l[S]:S)):h.setAttribute(C,S)}),g(S)}function g(S){f&&m.includes(S)&&(h.style.colorScheme=S)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)y(i);else try{let S=localStorage.getItem(t)||s,C=u&&S==="system"?b():S;y(C)}catch{}},c0=["light","dark"],ww="(prefers-color-scheme: dark)",a2=typeof window>"u",$p=x.createContext(void 0),s2={setTheme:e=>{},themes:[]},Cw=()=>{var e;return(e=x.useContext($p))!=null?e:s2},i2=e=>x.useContext($p)?x.createElement(x.Fragment,null,e.children):x.createElement(r2,{...e}),o2=["light","dark"],r2=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:s=!0,enableColorScheme:i=!0,storageKey:r="theme",themes:l=o2,defaultTheme:u=s?"system":"light",attribute:f="data-theme",value:h,children:m,nonce:y,scriptProps:g})=>{let[b,S]=x.useState(()=>c2(r,u)),[C,T]=x.useState(()=>b==="system"?Qm():b),j=h?Object.values(h):l,E=x.useCallback(M=>{let z=M;if(!z)return;M==="system"&&s&&(z=Qm());let D=h?h[z]:z,P=t?u2(y):null,X=document.documentElement,Q=J=>{J==="class"?(X.classList.remove(...j),D&&X.classList.add(D)):J.startsWith("data-")&&(D?X.setAttribute(J,D):X.removeAttribute(J))};if(Array.isArray(f)?f.forEach(Q):Q(f),i){let J=c0.includes(u)?u:null,te=c0.includes(z)?z:J;X.style.colorScheme=te}P?.()},[y]),A=x.useCallback(M=>{let z=typeof M=="function"?M(b):M;S(z);try{localStorage.setItem(r,z)}catch{}},[b]),R=x.useCallback(M=>{let z=Qm(M);T(z),b==="system"&&s&&!e&&E("system")},[b,e]);x.useEffect(()=>{let M=window.matchMedia(ww);return M.addListener(R),R(M),()=>M.removeListener(R)},[R]),x.useEffect(()=>{let M=z=>{z.key===r&&(z.newValue?S(z.newValue):A(u))};return window.addEventListener("storage",M),()=>window.removeEventListener("storage",M)},[A]),x.useEffect(()=>{E(e??b)},[e,b]);let _=x.useMemo(()=>({theme:b,setTheme:A,forcedTheme:e,resolvedTheme:b==="system"?C:b,themes:s?[...l,"system"]:l,systemTheme:s?C:void 0}),[b,A,e,C,s,l]);return x.createElement($p.Provider,{value:_},x.createElement(l2,{forcedTheme:e,storageKey:r,attribute:f,enableSystem:s,enableColorScheme:i,defaultTheme:u,value:h,themes:l,nonce:y,scriptProps:g}),m)},l2=x.memo(({forcedTheme:e,storageKey:t,attribute:s,enableSystem:i,enableColorScheme:r,defaultTheme:l,value:u,themes:f,nonce:h,scriptProps:m})=>{let y=JSON.stringify([s,t,l,e,f,u,i,r]).slice(1,-1);return x.createElement("script",{...m,suppressHydrationWarning:!0,nonce:typeof window>"u"?h:"",dangerouslySetInnerHTML:{__html:`(${n2.toString()})(${y})`}})}),c2=(e,t)=>{if(a2)return;let s;try{s=localStorage.getItem(e)||void 0}catch{}return s||t},u2=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},Qm=e=>(e||(e=window.matchMedia(ww)),e.matches?"dark":"light");const Re=e=>typeof e=="string",rl=()=>{let e,t;const s=new Promise((i,r)=>{e=i,t=r});return s.resolve=e,s.reject=t,s},u0=e=>e==null?"":""+e,d2=(e,t,s)=>{e.forEach(i=>{t[i]&&(s[i]=t[i])})},f2=/###/g,d0=e=>e&&e.indexOf("###")>-1?e.replace(f2,"."):e,f0=e=>!e||Re(e),hl=(e,t,s)=>{const i=Re(t)?t.split("."):t;let r=0;for(;r<i.length-1;){if(f0(e))return{};const l=d0(i[r]);!e[l]&&s&&(e[l]=new s),Object.prototype.hasOwnProperty.call(e,l)?e=e[l]:e={},++r}return f0(e)?{}:{obj:e,k:d0(i[r])}},m0=(e,t,s)=>{const{obj:i,k:r}=hl(e,t,Object);if(i!==void 0||t.length===1){i[r]=s;return}let l=t[t.length-1],u=t.slice(0,t.length-1),f=hl(e,u,Object);for(;f.obj===void 0&&u.length;)l=`${u[u.length-1]}.${l}`,u=u.slice(0,u.length-1),f=hl(e,u,Object),f?.obj&&typeof f.obj[`${f.k}.${l}`]<"u"&&(f.obj=void 0);f.obj[`${f.k}.${l}`]=s},m2=(e,t,s,i)=>{const{obj:r,k:l}=hl(e,t,Object);r[l]=r[l]||[],r[l].push(s)},Bu=(e,t)=>{const{obj:s,k:i}=hl(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},h2=(e,t,s)=>{const i=Bu(e,s);return i!==void 0?i:Bu(t,s)},Tw=(e,t,s)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(i in e?Re(e[i])||e[i]instanceof String||Re(t[i])||t[i]instanceof String?s&&(e[i]=t[i]):Tw(e[i],t[i],s):e[i]=t[i]);return e},zo=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var p2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const g2=e=>Re(e)?e.replace(/[&<>"'\/]/g,t=>p2[t]):e;class v2{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const s=this.regExpMap.get(t);if(s!==void 0)return s;const i=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,i),this.regExpQueue.push(t),i}}const y2=[" ",",","?","!",";"],x2=new v2(20),b2=(e,t,s)=>{t=t||"",s=s||"";const i=y2.filter(u=>t.indexOf(u)<0&&s.indexOf(u)<0);if(i.length===0)return!0;const r=x2.getRegExp(`(${i.map(u=>u==="?"?"\\?":u).join("|")})`);let l=!r.test(e);if(!l){const u=e.indexOf(s);u>0&&!r.test(e.substring(0,u))&&(l=!0)}return l},Uh=(e,t,s=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const i=t.split(s);let r=e;for(let l=0;l<i.length;){if(!r||typeof r!="object")return;let u,f="";for(let h=l;h<i.length;++h)if(h!==l&&(f+=s),f+=i[h],u=r[f],u!==void 0){if(["string","number","boolean"].indexOf(typeof u)>-1&&h<i.length-1)continue;l+=h-l+1;break}r=u}return r},Cl=e=>e?.replace("_","-"),S2={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 Uu{constructor(t,s={}){this.init(t,s)}init(t,s={}){this.prefix=s.prefix||"i18next:",this.logger=t||S2,this.options=s,this.debug=s.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,s,i,r){return r&&!this.debug?null:(Re(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[s](t))}create(t){return new Uu(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Uu(this.logger,t)}}var Va=new Uu;class ld{constructor(){this.observers={}}on(t,s){return t.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(s)||0;this.observers[i].set(s,r+1)}),this}off(t,s){if(this.observers[t]){if(!s){delete this.observers[t];return}this.observers[t].delete(s)}}emit(t,...s){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([r,l])=>{for(let u=0;u<l;u++)r(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,l])=>{for(let u=0;u<l;u++)r.apply(r,[t,...s])})}}class h0 extends ld{constructor(t,s={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const s=this.options.ns.indexOf(t);s>-1&&this.options.ns.splice(s,1)}getResource(t,s,i,r={}){const l=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,u=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;t.indexOf(".")>-1?f=t.split("."):(f=[t,s],i&&(Array.isArray(i)?f.push(...i):Re(i)&&l?f.push(...i.split(l)):f.push(i)));const h=Bu(this.data,f);return!h&&!s&&!i&&t.indexOf(".")>-1&&(t=f[0],s=f[1],i=f.slice(2).join(".")),h||!u||!Re(i)?h:Uh(this.data?.[t]?.[s],i,l)}addResource(t,s,i,r,l={silent:!1}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let f=[t,s];i&&(f=f.concat(u?i.split(u):i)),t.indexOf(".")>-1&&(f=t.split("."),r=s,s=f[1]),this.addNamespaces(s),m0(this.data,f,r),l.silent||this.emit("added",t,s,i,r)}addResources(t,s,i,r={silent:!1}){for(const l in i)(Re(i[l])||Array.isArray(i[l]))&&this.addResource(t,s,l,i[l],{silent:!0});r.silent||this.emit("added",t,s,i)}addResourceBundle(t,s,i,r,l,u={silent:!1,skipCopy:!1}){let f=[t,s];t.indexOf(".")>-1&&(f=t.split("."),r=i,i=s,s=f[1]),this.addNamespaces(s);let h=Bu(this.data,f)||{};u.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?Tw(h,i,l):h={...h,...i},m0(this.data,f,h),u.silent||this.emit("added",t,s,i)}removeResourceBundle(t,s){this.hasResourceBundle(t,s)&&delete this.data[t][s],this.removeNamespaces(s),this.emit("removed",t,s)}hasResourceBundle(t,s){return this.getResource(t,s)!==void 0}getResourceBundle(t,s){return s||(s=this.options.defaultNS),this.getResource(t,s)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const s=this.getDataByLanguage(t);return!!(s&&Object.keys(s)||[]).find(r=>s[r]&&Object.keys(s[r]).length>0)}toJSON(){return this.data}}var Ew={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,r){return e.forEach(l=>{t=this.processors[l]?.process(t,s,i,r)??t}),t}};const jw=Symbol("i18next/PATH_KEY");function w2(){const e=[],t=Object.create(null);let s;return t.get=(i,r)=>(s?.revoke?.(),r===jw?e:(e.push(r),s=Proxy.revocable(i,t),s.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Iu(e,t){const{[jw]:s}=e(w2());return s.join(t?.keySeparator??".")}const p0={},Wm=e=>!Re(e)&&typeof e!="boolean"&&typeof e!="number";class Hu extends ld{constructor(t,s={}){super(),d2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Va.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,s={interpolation:{}}){const i={...s};if(t==null)return!1;const r=this.resolve(t,i);if(r?.res===void 0)return!1;const l=Wm(r.res);return!(i.returnObjects===!1&&l)}extractFromKey(t,s){let i=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=s.ns||this.options.defaultNS||[];const u=i&&t.indexOf(i)>-1,f=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!b2(t,i,r);if(u&&!f){const h=t.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:t,namespaces:Re(l)?[l]:l};const m=t.split(i);(i!==r||i===r&&this.options.ns.indexOf(m[0])>-1)&&(l=m.shift()),t=m.join(r)}return{key:t,namespaces:Re(l)?[l]:l}}translate(t,s,i){let r=typeof s=="object"?{...s}:s;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";typeof t=="function"&&(t=Iu(t,{...this.options,...r})),Array.isArray(t)||(t=[String(t)]);const l=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,u=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:f,namespaces:h}=this.extractFromKey(t[t.length-1],r),m=h[h.length-1];let y=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const g=r.lng||this.language,b=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g?.toLowerCase()==="cimode")return b?l?{res:`${m}${y}${f}`,usedKey:f,exactUsedKey:f,usedLng:g,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:`${m}${y}${f}`:l?{res:f,usedKey:f,exactUsedKey:f,usedLng:g,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:f;const S=this.resolve(t,r);let C=S?.res;const T=S?.usedKey||f,j=S?.exactUsedKey||f,E=["[object Number]","[object Function]","[object RegExp]"],A=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,_=r.count!==void 0&&!Re(r.count),M=Hu.hasDefaultValue(r),z=_?this.pluralResolver.getSuffix(g,r.count,r):"",D=r.ordinal&&_?this.pluralResolver.getSuffix(g,r.count,{ordinal:!1}):"",P=_&&!r.ordinal&&r.count===0,X=P&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${z}`]||r[`defaultValue${D}`]||r.defaultValue;let Q=C;R&&!C&&M&&(Q=X);const J=Wm(Q),te=Object.prototype.toString.apply(Q);if(R&&Q&&J&&E.indexOf(te)<0&&!(Re(A)&&Array.isArray(Q))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ne=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,Q,{...r,ns:h}):`key '${f} (${this.language})' returned an object instead of string.`;return l?(S.res=ne,S.usedParams=this.getUsedParamsDetails(r),S):ne}if(u){const ne=Array.isArray(Q),re=ne?[]:{},de=ne?j:T;for(const k in Q)if(Object.prototype.hasOwnProperty.call(Q,k)){const H=`${de}${u}${k}`;M&&!C?re[k]=this.translate(H,{...r,defaultValue:Wm(X)?X[k]:void 0,joinArrays:!1,ns:h}):re[k]=this.translate(H,{...r,joinArrays:!1,ns:h}),re[k]===H&&(re[k]=Q[k])}C=re}}else if(R&&Re(A)&&Array.isArray(C))C=C.join(A),C&&(C=this.extendTranslation(C,t,r,i));else{let ne=!1,re=!1;!this.isValidLookup(C)&&M&&(ne=!0,C=X),this.isValidLookup(C)||(re=!0,C=f);const k=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&re?void 0:C,H=M&&X!==C&&this.options.updateMissing;if(re||ne||H){if(this.logger.log(H?"updateKey":"missingKey",g,m,f,H?X:C),u){const O=this.resolve(f,{...r,keySeparator:!1});O&&O.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 B=[];const le=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&le&&le[0])for(let O=0;O<le.length;O++)B.push(le[O]);else this.options.saveMissingTo==="all"?B=this.languageUtils.toResolveHierarchy(r.lng||this.language):B.push(r.lng||this.language);const G=(O,V,I)=>{const W=M&&I!==C?I:k;this.options.missingKeyHandler?this.options.missingKeyHandler(O,m,V,W,H,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(O,m,V,W,H,r),this.emit("missingKey",O,m,V,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?B.forEach(O=>{const V=this.pluralResolver.getSuffixes(O,r);P&&r[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(I=>{G([O],f+I,r[`defaultValue${I}`]||X)})}):G(B,f,X))}C=this.extendTranslation(C,t,r,S,i),re&&C===f&&this.options.appendNamespaceToMissingKey&&(C=`${m}${y}${f}`),(re||ne)&&this.options.parseMissingKeyHandler&&(C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${y}${f}`:f,ne?C:void 0,r))}return l?(S.res=C,S.usedParams=this.getUsedParamsDetails(r),S):C}extendTranslation(t,s,i,r,l){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const h=Re(t)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(h){const g=t.match(this.interpolator.nestingRegexp);m=g&&g.length}let y=i.replace&&!Re(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),t=this.interpolator.interpolate(t,y,i.lng||this.language||r.usedLng,i),h){const g=t.match(this.interpolator.nestingRegexp),b=g&&g.length;m<b&&(i.nest=!1)}!i.lng&&r&&r.res&&(i.lng=this.language||r.usedLng),i.nest!==!1&&(t=this.interpolator.nest(t,(...g)=>l?.[0]===g[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${s[0]}`),null):this.translate(...g,s),i)),i.interpolation&&this.interpolator.reset()}const u=i.postProcess||this.options.postProcess,f=Re(u)?[u]:u;return t!=null&&f?.length&&i.applyPostProcessor!==!1&&(t=Ew.handle(f,t,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,s={}){let i,r,l,u,f;return Re(t)&&(t=[t]),t.forEach(h=>{if(this.isValidLookup(i))return;const m=this.extractFromKey(h,s),y=m.key;r=y;let g=m.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const b=s.count!==void 0&&!Re(s.count),S=b&&!s.ordinal&&s.count===0,C=s.context!==void 0&&(Re(s.context)||typeof s.context=="number")&&s.context!=="",T=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);g.forEach(j=>{this.isValidLookup(i)||(f=j,!p0[`${T[0]}-${j}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(f)&&(p0[`${T[0]}-${j}`]=!0,this.logger.warn(`key "${r}" for languages "${T.join(", ")}" won't get resolved as namespace "${f}" 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!!!")),T.forEach(E=>{if(this.isValidLookup(i))return;u=E;const A=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(A,y,E,j,s);else{let _;b&&(_=this.pluralResolver.getSuffix(E,s.count,s));const M=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(s.ordinal&&_.indexOf(z)===0&&A.push(y+_.replace(z,this.options.pluralSeparator)),A.push(y+_),S&&A.push(y+M)),C){const D=`${y}${this.options.contextSeparator||"_"}${s.context}`;A.push(D),b&&(s.ordinal&&_.indexOf(z)===0&&A.push(D+_.replace(z,this.options.pluralSeparator)),A.push(D+_),S&&A.push(D+M))}}let R;for(;R=A.pop();)this.isValidLookup(i)||(l=R,i=this.getResource(E,j,R,s))}))})}),{res:i,usedKey:r,exactUsedKey:l,usedLng:u,usedNS:f}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,s,i,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,s,i,r):this.resourceStore.getResource(t,s,i,r)}getUsedParamsDetails(t={}){const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!Re(t.replace);let r=i?t.replace:t;if(i&&typeof t.count<"u"&&(r.count=t.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const l of s)delete r[l]}return r}static hasDefaultValue(t){const s="defaultValue";for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&s===i.substring(0,s.length)&&t[i]!==void 0)return!0;return!1}}class g0{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Va.create("languageUtils")}getScriptPartFromCode(t){if(t=Cl(t),!t||t.indexOf("-")<0)return null;const s=t.split("-");return s.length===2||(s.pop(),s[s.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(s.join("-"))}getLanguagePartFromCode(t){if(t=Cl(t),!t||t.indexOf("-")<0)return t;const s=t.split("-");return this.formatLanguageCode(s[0])}formatLanguageCode(t){if(Re(t)&&t.indexOf("-")>-1){let s;try{s=Intl.getCanonicalLocales(t)[0]}catch{}return s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s||(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.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let s;return t.forEach(i=>{if(s)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(s=r)}),!s&&this.options.supportedLngs&&t.forEach(i=>{if(s)return;const r=this.getScriptPartFromCode(i);if(this.isSupportedCode(r))return s=r;const l=this.getLanguagePartFromCode(i);if(this.isSupportedCode(l))return s=l;s=this.options.supportedLngs.find(u=>{if(u===l)return u;if(!(u.indexOf("-")<0&&l.indexOf("-")<0)&&(u.indexOf("-")>0&&l.indexOf("-")<0&&u.substring(0,u.indexOf("-"))===l||u.indexOf(l)===0&&l.length>1))return u})}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}getFallbackCodes(t,s){if(!t)return[];if(typeof t=="function"&&(t=t(s)),Re(t)&&(t=[t]),Array.isArray(t))return t;if(!s)return t.default||[];let i=t[s];return i||(i=t[this.getScriptPartFromCode(s)]),i||(i=t[this.formatLanguageCode(s)]),i||(i=t[this.getLanguagePartFromCode(s)]),i||(i=t.default),i||[]}toResolveHierarchy(t,s){const i=this.getFallbackCodes((s===!1?[]:s)||this.options.fallbackLng||[],t),r=[],l=u=>{u&&(this.isSupportedCode(u)?r.push(u):this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`))};return Re(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(t))):Re(t)&&l(this.formatLanguageCode(t)),i.forEach(u=>{r.indexOf(u)<0&&l(this.formatLanguageCode(u))}),r}}const v0={zero:0,one:1,two:2,few:3,many:4,other:5},y0={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class C2{constructor(t,s={}){this.languageUtils=t,this.options=s,this.logger=Va.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,s={}){const i=Cl(t==="dev"?"en":t),r=s.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:i,type:r});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let u;try{u=new Intl.PluralRules(i,{type:r})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),y0;if(!t.match(/-|_/))return y0;const h=this.languageUtils.getLanguagePartFromCode(t);u=this.getRule(h,s)}return this.pluralRulesCache[l]=u,u}needsPlural(t,s={}){let i=this.getRule(t,s);return i||(i=this.getRule("dev",s)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,s,i={}){return this.getSuffixes(t,i).map(r=>`${s}${r}`)}getSuffixes(t,s={}){let i=this.getRule(t,s);return i||(i=this.getRule("dev",s)),i?i.resolvedOptions().pluralCategories.sort((r,l)=>v0[r]-v0[l]).map(r=>`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(t,s,i={}){const r=this.getRule(t,i);return r?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(s)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",s,i))}}const x0=(e,t,s,i=".",r=!0)=>{let l=h2(e,t,s);return!l&&r&&Re(s)&&(l=Uh(e,s,i),l===void 0&&(l=Uh(t,s,i))),l},Jm=e=>e.replace(/\$/g,"$$$$");class b0{constructor(t={}){this.logger=Va.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(s=>s),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:s,escapeValue:i,useRawValueToEscape:r,prefix:l,prefixEscaped:u,suffix:f,suffixEscaped:h,formatSeparator:m,unescapeSuffix:y,unescapePrefix:g,nestingPrefix:b,nestingPrefixEscaped:S,nestingSuffix:C,nestingSuffixEscaped:T,nestingOptionsSeparator:j,maxReplaces:E,alwaysFormat:A}=t.interpolation;this.escape=s!==void 0?s:g2,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=l?zo(l):u||"{{",this.suffix=f?zo(f):h||"}}",this.formatSeparator=m||",",this.unescapePrefix=y?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=b?zo(b):S||zo("$t("),this.nestingSuffix=C?zo(C):T||zo(")"),this.nestingOptionsSeparator=j||",",this.maxReplaces=E||1e3,this.alwaysFormat=A!==void 0?A:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(s,i)=>s?.source===i?(s.lastIndex=0,s):new RegExp(i,"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,s,i,r){let l,u,f;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=S=>{if(S.indexOf(this.formatSeparator)<0){const E=x0(s,h,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,i,{...r,...s,interpolationkey:S}):E}const C=S.split(this.formatSeparator),T=C.shift().trim(),j=C.join(this.formatSeparator).trim();return this.format(x0(s,h,T,this.options.keySeparator,this.options.ignoreJSONStructure),j,i,{...r,...s,interpolationkey:T})};this.resetRegExp();const y=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:S=>Jm(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?Jm(this.escape(S)):Jm(S)}].forEach(S=>{for(f=0;l=S.regex.exec(t);){const C=l[1].trim();if(u=m(C),u===void 0)if(typeof y=="function"){const j=y(t,l,r);u=Re(j)?j:""}else if(r&&Object.prototype.hasOwnProperty.call(r,C))u="";else if(g){u=l[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${t}`),u="";else!Re(u)&&!this.useRawValueToEscape&&(u=u0(u));const T=S.safeValue(u);if(t=t.replace(l[0],T),g?(S.regex.lastIndex+=u.length,S.regex.lastIndex-=l[0].length):S.regex.lastIndex=0,f++,f>=this.maxReplaces)break}}),t}nest(t,s,i={}){let r,l,u;const f=(h,m)=>{const y=this.nestingOptionsSeparator;if(h.indexOf(y)<0)return h;const g=h.split(new RegExp(`${y}[ ]*{`));let b=`{${g[1]}`;h=g[0],b=this.interpolate(b,u);const S=b.match(/'/g),C=b.match(/"/g);((S?.length??0)%2===0&&!C||C.length%2!==0)&&(b=b.replace(/'/g,'"'));try{u=JSON.parse(b),m&&(u={...m,...u})}catch(T){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,T),`${h}${y}${b}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,h};for(;r=this.nestingRegexp.exec(t);){let h=[];u={...i},u=u.replace&&!Re(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const m=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(m!==-1&&(h=r[1].slice(m).split(this.formatSeparator).map(y=>y.trim()).filter(Boolean),r[1]=r[1].slice(0,m)),l=s(f.call(this,r[1].trim(),u),u),l&&r[0]===t&&!Re(l))return l;Re(l)||(l=u0(l)),l||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${t}`),l=""),h.length&&(l=h.reduce((y,g)=>this.format(y,g,i.lng,{...i,interpolationkey:r[1].trim()}),l.trim())),t=t.replace(r[0],l),this.regexp.lastIndex=0}return t}}const T2=e=>{let t=e.toLowerCase().trim();const s={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);t==="currency"&&r.indexOf(":")<0?s.currency||(s.currency=r.trim()):t==="relativetime"&&r.indexOf(":")<0?s.range||(s.range=r.trim()):r.split(";").forEach(u=>{if(u){const[f,...h]=u.split(":"),m=h.join(":").trim().replace(/^'+|'+$/g,""),y=f.trim();s[y]||(s[y]=m),m==="false"&&(s[y]=!1),m==="true"&&(s[y]=!0),isNaN(m)||(s[y]=parseInt(m,10))}})}return{formatName:t,formatOptions:s}},S0=e=>{const t={};return(s,i,r)=>{let l=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(l={...l,[r.interpolationkey]:void 0});const u=i+JSON.stringify(l);let f=t[u];return f||(f=e(Cl(i),r),t[u]=f),f(s)}},E2=e=>(t,s,i)=>e(Cl(s),i)(t);class j2{constructor(t={}){this.logger=Va.create("formatter"),this.options=t,this.init(t)}init(t,s={interpolation:{}}){this.formatSeparator=s.interpolation.formatSeparator||",";const i=s.cacheInBuiltFormats?S0:E2;this.formats={number:i((r,l)=>{const u=new Intl.NumberFormat(r,{...l});return f=>u.format(f)}),currency:i((r,l)=>{const u=new Intl.NumberFormat(r,{...l,style:"currency"});return f=>u.format(f)}),datetime:i((r,l)=>{const u=new Intl.DateTimeFormat(r,{...l});return f=>u.format(f)}),relativetime:i((r,l)=>{const u=new Intl.RelativeTimeFormat(r,{...l});return f=>u.format(f,l.range||"day")}),list:i((r,l)=>{const u=new Intl.ListFormat(r,{...l});return f=>u.format(f)})}}add(t,s){this.formats[t.toLowerCase().trim()]=s}addCached(t,s){this.formats[t.toLowerCase().trim()]=S0(s)}format(t,s,i,r={}){const l=s.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(f=>f.indexOf(")")>-1)){const f=l.findIndex(h=>h.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,f)].join(this.formatSeparator)}return l.reduce((f,h)=>{const{formatName:m,formatOptions:y}=T2(h);if(this.formats[m]){let g=f;try{const b=r?.formatParams?.[r.interpolationkey]||{},S=b.locale||b.lng||r.locale||r.lng||i;g=this.formats[m](f,S,{...y,...r,...b})}catch(b){this.logger.warn(b)}return g}else this.logger.warn(`there was no format function for ${m}`);return f},t)}}const A2=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class N2 extends ld{constructor(t,s,i,r={}){super(),this.backend=t,this.store=s,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=Va.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,r.backend,r)}queueLoad(t,s,i,r){const l={},u={},f={},h={};return t.forEach(m=>{let y=!0;s.forEach(g=>{const b=`${m}|${g}`;!i.reload&&this.store.hasResourceBundle(m,g)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?u[b]===void 0&&(u[b]=!0):(this.state[b]=1,y=!1,u[b]===void 0&&(u[b]=!0),l[b]===void 0&&(l[b]=!0),h[g]===void 0&&(h[g]=!0)))}),y||(f[m]=!0)}),(Object.keys(l).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(l),pending:Object.keys(u),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(h)}}loaded(t,s,i){const r=t.split("|"),l=r[0],u=r[1];s&&this.emit("failedLoading",l,u,s),!s&&i&&this.store.addResourceBundle(l,u,i,void 0,void 0,{skipCopy:!0}),this.state[t]=s?-1:2,s&&i&&(this.state[t]=0);const f={};this.queue.forEach(h=>{m2(h.loaded,[l],u),A2(h,t),s&&h.errors.push(s),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(m=>{f[m]||(f[m]={});const y=h.loaded[m];y.length&&y.forEach(g=>{f[m][g]===void 0&&(f[m][g]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(h=>!h.done)}read(t,s,i,r=0,l=this.retryTimeout,u){if(!t.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:s,fcName:i,tried:r,wait:l,callback:u});return}this.readingCalls++;const f=(m,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(m&&y&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,t,s,i,r+1,l*2,u)},l);return}u(m,y)},h=this.backend[i].bind(this.backend);if(h.length===2){try{const m=h(t,s);m&&typeof m.then=="function"?m.then(y=>f(null,y)).catch(f):f(null,m)}catch(m){f(m)}return}return h(t,s,f)}prepareLoading(t,s,i={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Re(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Re(s)&&(s=[s]);const l=this.queueLoad(t,s,i,r);if(!l.toLoad.length)return l.pending.length||r(),null;l.toLoad.forEach(u=>{this.loadOne(u)})}load(t,s,i){this.prepareLoading(t,s,{},i)}reload(t,s,i){this.prepareLoading(t,s,{reload:!0},i)}loadOne(t,s=""){const i=t.split("|"),r=i[0],l=i[1];this.read(r,l,"read",void 0,void 0,(u,f)=>{u&&this.logger.warn(`${s}loading namespace ${l} for language ${r} failed`,u),!u&&f&&this.logger.log(`${s}loaded namespace ${l} for language ${r}`,f),this.loaded(t,u,f)})}saveMissing(t,s,i,r,l,u={},f=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(s)){this.logger.warn(`did not save key "${i}" as the namespace "${s}" 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(!(i==null||i==="")){if(this.backend?.create){const h={...u,isUpdate:l},m=this.backend.create.bind(this.backend);if(m.length<6)try{let y;m.length===5?y=m(t,s,i,r,h):y=m(t,s,i,r),y&&typeof y.then=="function"?y.then(g=>f(null,g)).catch(f):f(null,y)}catch(y){f(y)}else m(t,s,i,r,f,h)}!t||!t[0]||this.store.addResource(t[0],s,i,r)}}}const eh=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",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]),Re(e[1])&&(t.defaultValue=e[1]),Re(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const s=e[3]||e[2];Object.keys(s).forEach(i=>{t[i]=s[i]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),w0=e=>(Re(e.ns)&&(e.ns=[e.ns]),Re(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Re(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),lu=()=>{},R2=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(s=>{typeof e[s]=="function"&&(e[s]=e[s].bind(e))})},M2=e=>!!(e?.modules?.backend?.name?.indexOf("Locize")>0||e?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||e?.options?.backend?.backends&&e.options.backend.backends.some(t=>t?.name.indexOf("Locize")>0||t?.constructor?.name.indexOf("Locize")>0));class pl extends ld{constructor(t={},s){if(super(),this.options=w0(t),this.services={},this.logger=Va,this.modules={external:[]},R2(this),s&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,s),this;setTimeout(()=>{this.init(t,s)},0)}}init(t={},s){this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),t.defaultNS==null&&t.ns&&(Re(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=eh();this.options={...i,...this.options,...w0(t)},this.options.interpolation={...i.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=i.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!M2(this)&&typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");const r=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Va.init(r(this.modules.logger),this.options):Va.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=j2;const y=new g0(this.options);this.store=new h0(this.options.resources,this.options);const g=this.services;g.logger=Va,g.resourceStore=this.store,g.languageUtils=y,g.pluralResolver=new C2(y,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(g.formatter=r(m),g.formatter.init&&g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new b0(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new N2(r(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",(S,...C)=>{this.emit(S,...C)}),this.modules.languageDetector&&(g.languageDetector=r(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=r(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new Hu(this.services,this.options),this.translator.on("*",(S,...C)=>{this.emit(S,...C)}),this.modules.external.forEach(S=>{S.init&&S.init(this)})}if(this.format=this.options.interpolation.format,s||(s=lu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[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(m=>{this[m]=(...y)=>this.store[m](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...y)=>(this.store[m](...y),this)});const f=rl(),h=()=>{const m=(y,g)=>{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),f.resolve(g),s(y,g)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?h():setTimeout(h,0),f}loadResources(t,s=lu){let i=s;const r=Re(t)?t:this.language;if(typeof t=="function"&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const l=[],u=f=>{if(!f||f==="cimode")return;this.services.languageUtils.toResolveHierarchy(f).forEach(m=>{m!=="cimode"&&l.indexOf(m)<0&&l.push(m)})};r?u(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>u(h)),this.options.preload?.forEach?.(f=>u(f)),this.services.backendConnector.load(l,this.options.ns,f=>{!f&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(f)})}else i(null)}reloadResources(t,s,i){const r=rl();return typeof t=="function"&&(i=t,t=void 0),typeof s=="function"&&(i=s,s=void 0),t||(t=this.languages),s||(s=this.options.ns),i||(i=lu),this.services.backendConnector.reload(t,s,l=>{r.resolve(),i(l)}),r}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"&&Ew.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"].indexOf(t)>-1)){for(let s=0;s<this.languages.length;s++){const i=this.languages[s];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,s){this.isLanguageChangingTo=t;const i=rl();this.emit("languageChanging",t);const r=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},l=(f,h)=>{h?this.isLanguageChangingTo===t&&(r(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,i.resolve((...m)=>this.t(...m)),s&&s(f,(...m)=>this.t(...m))},u=f=>{!t&&!f&&this.services.languageDetector&&(f=[]);const h=Re(f)?f:f&&f[0],m=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(Re(f)?[f]:f);m&&(this.language||r(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,y=>{l(y,m)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),i}getFixedT(t,s,i){const r=(l,u,...f)=>{let h;typeof u!="object"?h=this.options.overloadTranslationOptionHandler([l,u].concat(f)):h={...u},h.lng=h.lng||r.lng,h.lngs=h.lngs||r.lngs,h.ns=h.ns||r.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||i||r.keyPrefix);const m=this.options.keySeparator||".";let y;return h.keyPrefix&&Array.isArray(l)?y=l.map(g=>(typeof g=="function"&&(g=Iu(g,{...this.options,...u})),`${h.keyPrefix}${m}${g}`)):(typeof l=="function"&&(l=Iu(l,{...this.options,...u})),y=h.keyPrefix?`${h.keyPrefix}${m}${l}`:l),this.t(y,h)};return Re(t)?r.lng=t:r.lngs=t,r.ns=s,r.keyPrefix=i,r}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,s={}){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 i=s.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const u=(f,h)=>{const m=this.services.backendConnector.state[`${f}|${h}`];return m===-1||m===0||m===2};if(s.precheck){const f=s.precheck(this,u);if(f!==void 0)return f}return!!(this.hasResourceBundle(i,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(i,t)&&(!r||u(l,t)))}loadNamespaces(t,s){const i=rl();return this.options.ns?(Re(t)&&(t=[t]),t.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),s&&s(r)}),i):(s&&s(),Promise.resolve())}loadLanguages(t,s){const i=rl();Re(t)&&(t=[t]);const r=this.options.preload||[],l=t.filter(u=>r.indexOf(u)<0&&this.services.languageUtils.isSupportedCode(u));return l.length?(this.options.preload=r.concat(l),this.loadResources(u=>{i.resolve(),s&&s(u)}),i):(s&&s(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const r=new Intl.Locale(t);if(r&&r.getTextInfo){const l=r.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const s=["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"],i=this.services?.languageUtils||new g0(eh());return t.toLowerCase().indexOf("-latn")>1?"ltr":s.indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},s){const i=new pl(t,s);return i.createInstance=pl.createInstance,i}cloneInstance(t={},s=lu){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},l=new pl(r);if((t.debug!==void 0||t.prefix!==void 0)&&(l.logger=l.logger.clone(t)),["store","services","language"].forEach(f=>{l[f]=this[f]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},i){const f=Object.keys(this.store.data).reduce((h,m)=>(h[m]={...this.store.data[m]},h[m]=Object.keys(h[m]).reduce((y,g)=>(y[g]={...h[m][g]},y),h[m]),h),{});l.store=new h0(f,r),l.services.resourceStore=l.store}if(t.interpolation){const h={...eh().interpolation,...this.options.interpolation,...t.interpolation},m={...r,interpolation:h};l.services.interpolator=new b0(m)}return l.translator=new Hu(l.services,r),l.translator.on("*",(f,...h)=>{l.emit(f,...h)}),l.init(r,s),l.translator.options=r,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ct=pl.createInstance();ct.createInstance;ct.dir;ct.init;ct.loadResources;ct.reloadResources;ct.use;ct.changeLanguage;ct.getFixedT;ct.t;ct.exists;ct.setDefaultNamespace;ct.hasLoadedNamespace;ct.loadNamespaces;ct.loadLanguages;var th,C0;function _2(){return C0||(C0=1,th={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}),th}var O2=_2();const D2=kp(O2);var P2=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function T0(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},s=e.match(/<\/?([^\s]+?)[/\s>]/);if(s&&(t.name=s[1],(D2[s[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var i=e.indexOf("-->");return{type:"comment",comment:i!==-1?e.slice(4,i):""}}for(var r=new RegExp(P2),l=null;(l=r.exec(e))!==null;)if(l[0].trim())if(l[1]){var u=l[1].trim(),f=[u,""];u.indexOf("=")>-1&&(f=u.split("=")),t.attrs[f[0]]=f[1],r.lastIndex--}else l[2]&&(t.attrs[l[2]]=l[3].trim().substring(1,l[3].length-1));return t}var k2=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,L2=/^\s*$/,z2=Object.create(null);function Aw(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?(function(s){var i=[];for(var r in s)i.push(r+'="'+s[r]+'"');return i.length?" "+i.join(" "):""})(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(Aw,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var V2={parse:function(e,t){t||(t={}),t.components||(t.components=z2);var s,i=[],r=[],l=-1,u=!1;if(e.indexOf("<")!==0){var f=e.indexOf("<");i.push({type:"text",content:f===-1?e:e.substring(0,f)})}return e.replace(k2,function(h,m){if(u){if(h!=="</"+s.name+">")return;u=!1}var y,g=h.charAt(1)!=="/",b=h.startsWith("<!--"),S=m+h.length,C=e.charAt(S);if(b){var T=T0(h);return l<0?(i.push(T),i):((y=r[l]).children.push(T),i)}if(g&&(l++,(s=T0(h)).type==="tag"&&t.components[s.name]&&(s.type="component",u=!0),s.voidElement||u||!C||C==="<"||s.children.push({type:"text",content:e.slice(S,e.indexOf("<",S))}),l===0&&i.push(s),(y=r[l-1])&&y.children.push(s),r[l]=s),(!g||s.voidElement)&&(l>-1&&(s.voidElement||s.name===h.slice(2,-1))&&(l--,s=l===-1?i:r[l]),!u&&C!=="<"&&C)){y=l===-1?i:r[l].children;var j=e.indexOf("<",S),E=e.slice(S,j===-1?void 0:j);L2.test(E)&&(E=" "),(j>-1&&l+y.length>=0||E!==" ")&&y.push({type:"text",content:E})}}),i},stringify:function(e){return e.reduce(function(t,s){return t+Aw("",s)},"")}};const Au=(e,t,s,i)=>{const r=[s,{code:t,...i||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);An(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...r):console?.warn&&console.warn(...r)},E0={},cd=(e,t,s,i)=>{An(s)&&E0[s]||(An(s)&&(E0[s]=new Date),Au(e,t,s,i))},Nw=(e,t)=>()=>{if(e.isInitialized)t();else{const s=()=>{setTimeout(()=>{e.off("initialized",s)},0),t()};e.on("initialized",s)}},Ih=(e,t,s)=>{e.loadNamespaces(t,Nw(e,s))},j0=(e,t,s,i)=>{if(An(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Ih(e,s,i);s.forEach(r=>{e.options.ns.indexOf(r)<0&&e.options.ns.push(r)}),e.loadLanguages(t,Nw(e,i))},B2=(e,t,s={})=>!t.languages||!t.languages.length?(cd(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:s.lng,precheck:(i,r)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!r(i.isLanguageChangingTo,e))return!1}}),An=e=>typeof e=="string",Ss=e=>typeof e=="object"&&e!==null,U2=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,I2={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},H2=e=>I2[e],Rw=e=>e.replace(U2,H2);let Hh={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Rw,transDefaultProps:void 0};const F2=(e={})=>{Hh={...Hh,...e}},Kp=()=>Hh;let Mw;const q2=e=>{Mw=e},Gp=()=>Mw,Nu=(e,t)=>{if(!e)return!1;const s=e.props?.children??e.children;return t?s.length>0:!!s},Ru=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?Ii(t):t},$2=e=>Array.isArray(e)&&e.every(x.isValidElement),Ii=e=>Array.isArray(e)?e:[e],K2=(e,t)=>{const s={...t};return s.props={...t.props,...e.props},s},G2=e=>{const t={};if(!e)return t;const s=i=>{Ii(i).forEach(l=>{An(l)||(Nu(l)?s(Ru(l)):Ss(l)&&!x.isValidElement(l)&&Object.assign(t,l))})};return s(e),t},_w=(e,t,s,i)=>{if(!e)return"";let r="";const l=Ii(e),u=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return l.forEach((f,h)=>{if(An(f)){r+=`${f}`;return}if(x.isValidElement(f)){const{props:m,type:y}=f,g=Object.keys(m).length,b=u.indexOf(y)>-1,S=m.children;if(!S&&b&&!g){r+=`<${y}/>`;return}if(!S&&(!b||g)||m.i18nIsDynamicList){r+=`<${h}></${h}>`;return}if(b&&g===1&&An(S)){r+=`<${y}>${S}</${y}>`;return}const C=_w(S,t,s,i);r+=`<${h}>${C}</${h}>`;return}if(f===null){Au(s,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:i});return}if(Ss(f)){const{format:m,...y}=f,g=Object.keys(y);if(g.length===1){const b=m?`${g[0]}, ${m}`:g[0];r+=`{{${b}}}`;return}Au(s,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:i,child:f});return}Au(s,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:i,child:f})}),r},Y2=(e,t=[],s={})=>{if(!e)return e;const i=Object.keys(s),r=[...t,...i];let l="",u=0;for(;u<e.length;)if(e[u]==="<"){let f=!1;const h=e.slice(u).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(h){const m=h[1];(/^\d+$/.test(m)||r.includes(m))&&(f=!0,l+=h[0],u+=h[0].length)}if(!f){const m=e.slice(u).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(m){const y=m[1];(/^\d+$/.test(y)||r.includes(y))&&(f=!0,l+=m[0],u+=m[0].length)}}f||(l+="<",u+=1)}else l+=e[u],u+=1;return l},X2=(e,t,s,i,r,l,u)=>{if(s==="")return[];const f=r.transKeepBasicHtmlNodesFor||[],h=s&&new RegExp(f.map(A=>`<${A}`).join("|")).test(s);if(!e&&!t&&!h&&!u)return[s];const m=t??{},y=A=>{Ii(A).forEach(_=>{An(_)||(Nu(_)?y(Ru(_)):Ss(_)&&!x.isValidElement(_)&&Object.assign(m,_))})};y(e);const g=Y2(s,f,m),b=V2.parse(`<0>${g}</0>`),S={...m,...l},C=(A,R,_)=>{const M=Ru(A),z=j(M,R.children,_);return $2(M)&&z.length===0||A.props?.i18nIsDynamicList?M:z},T=(A,R,_,M,z)=>{A.dummy?(A.children=R,_.push(x.cloneElement(A,{key:M},z?void 0:R))):_.push(...x.Children.map([A],D=>{const P="data-i18n-is-dynamic-list",X={key:M,[P]:void 0};return D&&D.props&&Object.keys(D.props).forEach(Q=>{Q==="ref"||Q==="children"||Q==="i18nIsDynamicList"||Q===P||(X[Q]=D.props[Q])}),x.cloneElement(D,X,z?null:R)}))},j=(A,R,_)=>{const M=Ii(A);return Ii(R).reduce((D,P,X)=>{const Q=P.children?.[0]?.content&&i.services.interpolator.interpolate(P.children[0].content,S,i.language);if(P.type==="tag"){let J=M[parseInt(P.name,10)];!J&&t&&(J=t[P.name]),_.length===1&&!J&&(J=_[0][P.name]),J||(J={});const te={...P.attrs};u&&Object.keys(te).forEach(B=>{const le=te[B];An(le)&&(te[B]=Rw(le))});const ne=Object.keys(te).length!==0?K2({props:te},J):J,re=x.isValidElement(ne),de=re&&Nu(P,!0)&&!P.voidElement,k=h&&Ss(ne)&&ne.dummy&&!re,H=Ss(t)&&Object.hasOwnProperty.call(t,P.name);if(An(ne)){const B=i.services.interpolator.interpolate(ne,S,i.language);D.push(B)}else if(Nu(ne)||de){const B=C(ne,P,_);T(ne,B,D,X)}else if(k){const B=j(M,P.children,_);T(ne,B,D,X)}else if(Number.isNaN(parseFloat(P.name)))if(H){const B=C(ne,P,_);T(ne,B,D,X,P.voidElement)}else if(r.transSupportBasicHtmlNodes&&f.indexOf(P.name)>-1)if(P.voidElement)D.push(x.createElement(P.name,{key:`${P.name}-${X}`}));else{const B=j(M,P.children,_);D.push(x.createElement(P.name,{key:`${P.name}-${X}`},B))}else if(P.voidElement)D.push(`<${P.name} />`);else{const B=j(M,P.children,_);D.push(`<${P.name}>${B}</${P.name}>`)}else if(Ss(ne)&&!re){const B=P.children[0]?Q:null;B&&D.push(B)}else T(ne,Q,D,X,P.children.length!==1||!Q)}else if(P.type==="text"){const J=r.transWrapTextNodes,te=typeof r.unescape=="function"?r.unescape:Kp().unescape,ne=u?te(i.services.interpolator.interpolate(P.content,S,i.language)):i.services.interpolator.interpolate(P.content,S,i.language);J?D.push(x.createElement(J,{key:`${P.name}-${X}`},ne)):D.push(ne)}return D},[])},E=j([{dummy:!0,children:e||[]}],b,Ii(e||[]));return Ru(E[0])},Ow=(e,t,s)=>{const i=e.key||t,r=x.cloneElement(e,{key:i});if(!r.props||!r.props.children||s.indexOf(`${t}/>`)<0&&s.indexOf(`${t} />`)<0)return r;function l(){return x.createElement(x.Fragment,null,r)}return x.createElement(l,{key:i})},Z2=(e,t)=>e.map((s,i)=>Ow(s,i,t)),Q2=(e,t)=>{const s={};return Object.keys(e).forEach(i=>{Object.assign(s,{[i]:Ow(e[i],i,t)})}),s},W2=(e,t,s,i)=>e?Array.isArray(e)?Z2(e,t):Ss(e)?Q2(e,t):(cd(s,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:i}),null):null,J2=e=>!Ss(e)||Array.isArray(e)?!1:Object.keys(e).reduce((t,s)=>t&&Number.isNaN(Number.parseFloat(s)),!0);function e_({children:e,count:t,parent:s,i18nKey:i,context:r,tOptions:l={},values:u,defaults:f,components:h,ns:m,i18n:y,t:g,shouldUnescape:b,...S}){const C=y||Gp();if(!C)return cd(C,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:i}),e;const T=g||C.t.bind(C)||(G=>G),j={...Kp(),...C.options?.react};let E=m||T.ns||C.options?.defaultNS;E=An(E)?[E]:E||["translation"];const{transDefaultProps:A}=j,R=A?.tOptions?{...A.tOptions,...l}:l,_=b??A?.shouldUnescape,M=A?.values?{...A.values,...u}:u,z=A?.components?{...A.components,...h}:h,D=_w(e,j,C,i),P=f||R?.defaultValue||D||j.transEmptyNodeValue||(typeof i=="function"?Iu(i):i),{hashTransKey:X}=j,Q=i||(X?X(D||P):D||P);C.options?.interpolation?.defaultVariables?u=M&&Object.keys(M).length>0?{...M,...C.options.interpolation.defaultVariables}:{...C.options.interpolation.defaultVariables}:u=M;const J=G2(e);J&&typeof J.count=="number"&&t===void 0&&(t=J.count);const te=u||t!==void 0&&!C.options?.interpolation?.alwaysFormat||!e?R.interpolation:{interpolation:{...R.interpolation,prefix:"#$?",suffix:"?$#"}},ne={...R,context:r||R.context,count:t,...u,...te,defaultValue:P,ns:E};let re=Q?T(Q,ne):P;re===Q&&P&&(re=P);const de=W2(z,re,C,i);let k=de||e,H=null;J2(de)&&(H=de,k=e);const B=X2(k,H,re,C,j,ne,_),le=s??j.defaultTransParent;return le?x.createElement(le,S,B):B}const t_={type:"3rdParty",init(e){F2(e.options.react),q2(e)}},Dw=x.createContext();class n_{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function A0({children:e,count:t,parent:s,i18nKey:i,context:r,tOptions:l={},values:u,defaults:f,components:h,ns:m,i18n:y,t:g,shouldUnescape:b,...S}){const{i18n:C,defaultNS:T}=x.useContext(Dw)||{},j=y||C||Gp(),E=g||j?.t.bind(j);return e_({children:e,count:t,parent:s,i18nKey:i,context:r,tOptions:l,values:u,defaults:f,components:h,ns:m||E?.ns||T||j?.options?.defaultNS,i18n:j,t:g,shouldUnescape:b,...S})}var nh={exports:{}},ah={};var N0;function a_(){if(N0)return ah;N0=1;var e=id();function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var s=typeof Object.is=="function"?Object.is:t,i=e.useState,r=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function f(g,b){var S=b(),C=i({inst:{value:S,getSnapshot:b}}),T=C[0].inst,j=C[1];return l(function(){T.value=S,T.getSnapshot=b,h(T)&&j({inst:T})},[g,S,b]),r(function(){return h(T)&&j({inst:T}),g(function(){h(T)&&j({inst:T})})},[g]),u(S),S}function h(g){var b=g.getSnapshot;g=g.value;try{var S=b();return!s(g,S)}catch{return!0}}function m(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return ah.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,ah}var R0;function s_(){return R0||(R0=1,nh.exports=a_()),nh.exports}var i_=s_();const o_=(e,t)=>An(t)?t:Ss(t)&&An(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,r_={t:o_,ready:!1},l_=()=>()=>{},He=(e,t={})=>{const{i18n:s}=t,{i18n:i,defaultNS:r}=x.useContext(Dw)||{},l=s||i||Gp();l&&!l.reportNamespaces&&(l.reportNamespaces=new n_),l||cd(l,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const u=x.useMemo(()=>({...Kp(),...l?.options?.react,...t}),[l,t]),{useSuspense:f,keyPrefix:h}=u,m=r||l?.options?.defaultNS,y=An(m)?[m]:m||["translation"],g=x.useMemo(()=>y,y);l?.reportNamespaces?.addUsedNamespaces?.(g);const b=x.useRef(0),S=x.useCallback(X=>{if(!l)return l_;const{bindI18n:Q,bindI18nStore:J}=u,te=()=>{b.current+=1,X()};return Q&&l.on(Q,te),J&&l.store.on(J,te),()=>{Q&&Q.split(" ").forEach(ne=>l.off(ne,te)),J&&J.split(" ").forEach(ne=>l.store.off(ne,te))}},[l,u]),C=x.useRef(),T=x.useCallback(()=>{if(!l)return r_;const X=!!(l.isInitialized||l.initializedStoreOnce)&&g.every(de=>B2(de,l,u)),Q=t.lng||l.language,J=b.current,te=C.current;if(te&&te.ready===X&&te.lng===Q&&te.keyPrefix===h&&te.revision===J)return te;const re={t:l.getFixedT(Q,u.nsMode==="fallback"?g:g[0],h),ready:X,lng:Q,keyPrefix:h,revision:J};return C.current=re,re},[l,g,h,u,t.lng]),[j,E]=x.useState(0),{t:A,ready:R}=i_.useSyncExternalStore(S,T,T);x.useEffect(()=>{if(l&&!R&&!f){const X=()=>E(Q=>Q+1);t.lng?j0(l,t.lng,g,X):Ih(l,g,X)}},[l,t.lng,g,R,f,j]);const _=l||{},M=x.useRef(null),z=x.useRef(),D=X=>{const Q=Object.getOwnPropertyDescriptors(X);Q.__original&&delete Q.__original;const J=Object.create(Object.getPrototypeOf(X),Q);if(!Object.prototype.hasOwnProperty.call(J,"__original"))try{Object.defineProperty(J,"__original",{value:X,writable:!1,enumerable:!1,configurable:!1})}catch{}return J},P=x.useMemo(()=>{const X=_,Q=X?.language;let J=X;X&&(M.current&&M.current.__original===X?z.current!==Q?(J=D(X),M.current=J,z.current=Q):J=M.current:(J=D(X),M.current=J,z.current=Q));const te=[A,J,R];return te.t=A,te.i18n=J,te.ready=R,te},[A,_,R,_.resolvedLanguage,_.language,_.languages]);if(l&&f&&!R)throw new Promise(X=>{const Q=()=>X();t.lng?j0(l,t.lng,g,Q):Ih(l,g,Q)});return P},c_={title:"Copilot API Admin",language:"Language"},u_={enUS:"English",zhCN:"简体中文"},d_={accounts:"Accounts",requests:"Requests",models:"Models",settings:"Settings",openNavigation:"Open navigation"},f_={label:"Theme",system:"System",light:"Light",dark:"Dark"},m_={label:"Motion",magic:"Magic",subtle:"Subtle",off:"Off",reducedMotionEnabled:"Reduced motion is enabled in system settings"},h_={set:"set",unset:"unset",test:"Test",testing:"Testing...",clear:"Clear",save:"Save",saving:"Saving...",refresh:"Refresh",refreshing:"Refreshing...",retry:"Retry",errors:"Errors",tokens:"Tokens",failed:"Failed",errorRate:"Error rate",tokensPerRequest:"Tokens / req",avgDurationMs:"Avg duration (ms)",lastRequest:"Last req",account:"Account",status:"Status",avgMs:"Avg ms",clearFilter:"Clear filter",statusFailed:"failed",statusOk:"ok",used:"Used",remaining:"Remaining",unlimited:"unlimited",apply:"Apply",any:"(any)",yes:"yes",no:"no",from:"From",to:"To",time:"Time",path:"Path",endpoint:"Endpoint",model:"Model",xInitiator:"Initiator",cost:"Cost",quota:"Quota",durationAbbrev:"Duration",loading:"Loading...",loadMore:"Load more",noMore:"All results loaded",clearFilters:"Clear filters",back:"Back",download:"Download",copyJson:"Copy JSON",actions:"Actions"},p_={trigger:"Token",title:"Admin token",description:"Used as <1>x-admin-token</1> when calling <3>/api/admin/*</3>. Stored in <5>localStorage</5>.",inputPlaceholder:"Enter token",remoteNote:"If the server is not running on localhost, you must set <1>ADMIN_TOKEN</1> on the server to enable remote access.",connected:"Connected: DB v{{version}} · {{path}}",validation:{empty:"Token cannot be empty."},toast:{adminApiOk:"Admin API access OK",adminApiFailed:"Admin API access failed",tokenSaved:"Token saved",tokenCleared:"Token cleared"}},g_={loadFailedTitle:"Failed to load accounts",statsWindowLabel:"Stats window",window:{last24h:"Last 24h",last7d:"Last 7d",thisMonth:"This month"},dbInfo:"DB v{{version}} · {{path}}",tableDescription:"Click an account to filter requests.",filterAccountPlaceholder:"Filter account",sortByLabel:"Sort by",autoRefreshLabel:"Auto",autoRefresh:{off:"Off","30s":"30s","60s":"60s","5m":"5m"},exportCsv:"Export CSV",exportCsvAria:"Export accounts as CSV",exportSuccess:"Accounts exported as CSV",premiumReq:"Premium req",empty:{noAccountsTitle:"No accounts yet",noAccountsDescription:"Add your first GitHub Copilot account to start proxying API requests.",noAccountsCta:"Add Your First Account",noMatchesTitle:"No matches",noMatchesDescription:"No accounts match the current filter."},premiumQuotaUsedAria:"Premium interactions quota used",kpiTooltip:{accounts:"Total number of registered GitHub Copilot accounts.",failed:"Accounts that failed authentication or token refresh.",requests:"Total API requests across all accounts in the selected time window.",errors:"Total failed requests (4xx/5xx responses) in the selected time window.",errorRate:"Percentage of requests that returned an error.",tokensPerRequest:"Average number of tokens (input + output) consumed per request.",tokens:"Total tokens consumed across all accounts in the selected time window.",avgDuration:"Weighted average response time across all accounts (in milliseconds)."},tableTooltip:{premiumReq:"Premium interactions quota: used vs remaining for the current billing cycle.",avgMs:"Average response time in milliseconds for this account."}},v_={loadFailedTitle:"Failed to load requests",description:"Filter and inspect recent requests.",tabs:{quick:"Quick",advanced:"Advanced"},filters:{timeRange:"Time range",hasError:"Has error",upstreamModel:"Upstream model",clientModel:"Client model"},timeRange:{last15m:"Last 15m",last1h:"Last 1h",last6h:"Last 6h",last24h:"Last 24h",last7d:"Last 7d",custom:"Custom..."},validation:{title:"Invalid time range",fromMsMustBeNumber:"Start time must be a valid date.",toMsMustBeNumber:"End time must be a valid date.",fromMsMustBeLteToMs:"Start time must be before end time."},empty:{noRequestsTitle:"No requests",noResultsForFilters:"No results for the current filters.",noRequestsFound:"No requests found."},affinityHit:"Affinity cache hit",resultCount:"{{count}} loaded",resultCountWithMore:"{{count}}+ loaded",activeFilters:"{{count}} active",autoRefreshLabel:"Auto",autoRefresh:{off:"Off","30s":"30s","60s":"60s","5m":"5m"},columnTooltip:{initiator:"Value of the x-initiator header sent by the client (e.g. IDE extension name).",cost:"Copilot cost units consumed by this request.",quota:"Premium interactions quota remaining after this request.",duration:"Total response time in milliseconds.",tokens:"Total tokens consumed (input + output)."}},y_={title:"Models",description:"View available models and their metadata.",totalCount:"{{count}} models",filteredCount:"{{filtered}} of {{total}} models",searchPlaceholder:"Search by name or ID",searchAriaLabel:"Search models by name or ID",aliasesMore:"+{{count}} more",loadFailedTitle:"Failed to load models",toast:{loadFailed:"Failed to load models"},columns:{name:"Model",endpoints:"Endpoints",originalId:"Model ID",aliases:"Aliases",context:"Token Limits",features:"Features",multiplier:"Cost"},columnTooltip:{name:"Display name of the model as exposed by the proxy.",endpoints:"API endpoints that support this model (e.g. chat-completions, messages).",originalId:"Original upstream model identifier and any configured aliases.",context:"Maximum token limits for input (prompt) and output (completion).",features:"Capabilities supported by this model.",multiplier:"Copilot billing cost multiplier — higher values consume more premium quota per request."},contextTooltip:"Max input: {{input}} tokens · Max output: {{output}} tokens",badges:{preview:"preview",premium:"premium"},features:{tools:"tools",vision:"vision",structuredOutputs:"structured",streaming:"streaming",parallelTools:"parallel tools"},featureTooltip:{tools:"Supports function/tool calling.",vision:"Can process image inputs.",structuredOutputs:"Supports JSON schema-constrained output.",streaming:"Supports streaming responses.",parallelTools:"Can execute multiple tool calls in parallel."},contextInputLabel:"in",contextOutputLabel:"out",empty:{title:"No models",description:"No models found.",noMatchesDescription:"No models match the current search or filters."}},x_={loadFailedTitle:"Failed to load request",title:"Request Detail",notFoundTitle:"Request not found",notFoundDescription:"The specified request could not be found.",summaryTitle:"Summary",rawTitle:"Raw JSON",rawDescription:"Full request record in JSON format.",searchPlaceholder:"Search key or value…",toast:{copiedJson:"Copied JSON",copyFailed:"Copy failed",downloadedJson:"Downloaded JSON",downloadFailed:"Download failed"},sections:{request:"Request",routing:"Routing",client:"Client",usage:"Usage"},fields:{time:"Time",path:"Path",endpoint:"Endpoint",account:"Account",userId:"User ID",safetyIdentifier:"Safety ID",promptCacheKey:"Prompt Cache Key",initiator:"Initiator",upstreamRequestId:"Upstream Request ID",model:"Model",client:"Client",tokens:"Tokens",quota:"Quota",affinityHit:"Affinity Hit",affinityCacheKey:"Affinity Key",duration:"Duration (ms)",ttfb:"TTFB (ms)"},fieldTooltip:{endpoint:"The upstream API endpoint this request was forwarded to",userId:"GitHub user ID associated with this request",safetyIdentifier:"Safety identifier used for content moderation",promptCacheKey:"Cache key for prompt deduplication",initiator:"The component or client that initiated this request",upstreamRequestId:"Request ID returned by the upstream provider",affinityCacheKey:"Cache key used for account affinity routing",duration:"Total request processing time in milliseconds",ttfb:"Time to first byte — latency before the first response chunk"},tokens:{in:"Input",out:"Output",total:"Total",cached:"Cached"},quota:{before:"Before",after:"After",diff:"Change"}},b_={expand:"Expand",collapse:"Collapse",root:"(root)",more:"… {{count}} more",arrayLabel:"Array({{count}})",objectLabel:"Object({{count}})",expandAll:"Expand all",collapseAll:"Collapse all",statusCollapsed:"collapsed",statusExpanded:"expanded",statusDepth:"depth<{{depth}}"},S_={subtitle:"Manage server configuration and feature flags.",configPath:"Config path: {{path}}",note:"Changes take effect after saving.",errorTitle:"Failed to load settings",sections:{general:"General",accountAffinity:"Account Affinity",reasoning:"Reasoning",aliases:"Aliases",prompts:"Prompts",advanced:"Advanced",providers:"Providers"},navigation:{ariaLabel:"Settings sections"},saveButton:{saving:"Saving...",saveChanges:"Save changes"},toast:{loadModelsFailed:"Failed to load models",loadConfigFailed:"Failed to load config",configSaved:"Config saved",saveConfigFailed:"Failed to save config"},common:{defaultOption:"(default)",customModel:"Custom: {{value}}",remove:"Remove",allow:"allow",block:"block",jsonMode:"JSON mode",invalidJsonTitle:"Invalid JSON",selectModelPlaceholder:"Select model",noModelsAvailable:"No models available"},general:{title:"General",description:"Basic configuration.",smallModel:"Small model",smallModelManual:"Small model (manual)",smallModelPlaceholder:"Select small model",smallModelInputPlaceholder:"gpt-5-mini",smallModelHint:"Controls which model receives lightweight/free requests when routing.",apiKeysLabel:"API keys",apiKeysPlaceholder:"one key per line",apiKeysHint:"One key per line (or comma-separated). Leave empty to disable request authentication.",legacyAuthNote:"Legacy fallback remains enabled for env {{env}} or config.apiKey when auth.apiKeys is empty.",anthropicApiKeyLabel:"Anthropic API key",anthropicApiKeyPlaceholder:"sk-ant-...",anthropicApiKeyHint:"Optional. Used for exact Claude /v1/messages/count_tokens calls; without it, the server falls back to local token estimation.",anthropicApiKeyEnvNote:"Runtime fallback remains available through env {{env}}. Leaving this field empty does not override a server-side environment variable.",showAnthropicApiKey:"Show",hideAnthropicApiKey:"Hide"},accountAffinity:{title:"Account Affinity",description:"Configure account affinity routing.",label:"Enable account affinity",hint:"Routes requests to the account that last successfully handled the same session. Applies to both free and premium models."},reasoning:{title:"Reasoning efforts",description:"Override model reasoning effort levels.",hint:"Define per-model reasoning effort (optional).",jsonPlaceholder:'{ "gpt-5-mini": "low" }',emptyState:"No reasoning overrides. Add a model below.",itemHint:"Overrides reasoning effort for this model.",addButton:"Add model override"},prompts:{title:"Extra prompts",description:"Inject extra system prompts per model.",hint:"Add or edit prompt snippets injected for specific models.",jsonPlaceholder:'{ "gpt-5-mini": "..." }',emptyState:"No extra prompts configured.",promptPlaceholder:"System prompt snippet...",itemHint:"Adds prompt content before model execution.",addButton:"Add prompt"},aliases:{title:"Model aliases",description:"Map friendly alias names to upstream model IDs.",defaultBehaviorHint:"Default behavior: {{behavior}} original model IDs. Each alias can override this setting.",jsonPlaceholder:'{ "fast": { "target": "gpt-5-mini", "allowOriginal": true } }',aliasPlaceholder:"Alias",selectTargetPlaceholder:"Select target model",selectOption:"(select)",originalModelPlaceholder:"Original model ID",useDefault:"Use default",allowOriginal:"Allow original model ID",blockOriginal:"Block original model ID",emptyState:"No model aliases configured.",addButton:"Add alias"},advanced:{title:"Advanced",description:"Feature flags and experimental toggles.",routingGroupTitle:"Routing",apiGroupTitle:"API endpoints",modelGroupTitle:"Model & tokens",modelRefreshIntervalLabel:"Model refresh interval (hours)",modelRefreshIntervalHint:"Set to 0 to disable automatic refresh.",modelRefreshIntervalError:"Must be a non-negative number.",allowOriginalModelNamesLabel:"Allow original model names",allowOriginalModelNamesHint:"Default behavior when aliases do not override original model IDs.",useFunctionApplyPatchLabel:"Responses API apply_patch",useFunctionApplyPatchHint:"Include the apply_patch function tool when forwarding requests through the Responses API.",forceAgentLabel:"Batch agent requests per session",forceAgentHint:"Affects Copilot Premium request consumption counting: when off, every agent conversation request counts as 1 (same as the VS Code extension); when on, multiple requests in the same session count only once per model.",compactUseSmallModelLabel:"Route compact requests to small model",compactUseSmallModelHint:"When enabled, compact requests use the configured smallModel; otherwise they use the requested model.",messageStartInputTokensFallbackLabel:"Estimate input tokens (fallback)",messageStartInputTokensFallbackHint:"When enabled, estimates message_start input tokens when upstream usage is unavailable.",useMessagesApiLabel:"Enable Messages API",useMessagesApiHint:"When enabled, Claude-family models may use Copilot's native /v1/messages endpoint.",useResponsesApiWebSearchLabel:"Enable Responses API WebSearch",useResponsesApiWebSearchHint:"When enabled, /v1/responses keeps web_search tools and forwards them upstream.",responsesApiContextManagementModelsLabel:"Context management models (Responses API)",responsesApiContextManagementModelsPlaceholder:"one model id per line",responsesApiContextManagementModelsHint:"List of model IDs that should receive Responses API context_management compaction instructions.",providersTitle:"Providers",providersDescription:"Configure upstream providers (currently anthropic only). Each provider key becomes a route prefix (/:provider/v1/messages).",providersIssueTitle:"Invalid providers",providersEmptyState:"No providers configured.",providersAddProvider:"Add provider",providersNamePlaceholder:"Provider key (route prefix)",providersEnabledLabel:"Enabled",providersBaseUrlLabel:"Base URL",providersBaseUrlPlaceholder:"https://api.anthropic.com",providersApiKeyLabel:"API key",providersApiKeyPlaceholder:"sk-...",providersModelsLabel:"Model defaults",providersModelsEmptyState:"No per-model defaults.",providersAddModel:"Add model",providersModelIdPlaceholder:"Model ID"}},w_={addAccount:"Add Account",addAccountDescription:"Add a new GitHub Copilot account",selectAccountType:"Select your GitHub Copilot subscription type",typeIndividual:"Individual",typeIndividualDescription:"Personal GitHub Copilot subscription",typeBusiness:"Business",typeBusinessDescription:"Organization-managed Copilot Business plan",typeEnterprise:"Enterprise",typeEnterpriseDescription:"GitHub Enterprise Server with custom domain",enterpriseDomain:"Enterprise Domain",enterpriseDomainPlaceholder:"github.example.com",enterpriseDomainHint:"Your GitHub Enterprise Server hostname",continue:"Continue",cancel:"Cancel",authorizeTitle:"Authorize with GitHub",reauthAuthorizeTitle:'Re-authorize "{{id}}"',reauthAuthorizeDescription:"Complete the authorization flow to refresh this account's credentials.",reauthConfirmDescription:"This will open GitHub in a new tab to re-authorize your account credentials.",reauthConfirmHint:"You will need to enter a device code on GitHub to complete the process. Your existing account data will be preserved.",enterCodePrompt:"Enter the code below at GitHub to authorize:",copy:"Copy",copied:"Copied!",autoOpenHint:"A new tab has been opened. If it didn't open automatically:",waitingForAuth:"Waiting for authorization...",expiresIn:"expires in {{time}}",expiresWarning:"Code expiring soon",errorRecoveryHint:"Check your network connection and try again. If the issue persists, make sure your GitHub account has an active Copilot subscription.",errorExpiredHint:"The authorization code has expired. Start over to get a new code.",successTitle:"Account Added!",successReauthTitle:'"{{id}}" Re-authenticated!',accountLabel:"Account",typeLabel:"Type",statusLabel:"Status",statusActive:"Active",done:"Done",expired:"Authorization expired",startOver:"Start Over",retry:"Retry",reauth:"Reauth",delete:"Delete",deleteTitle:"Delete Account",deleteConfirmation:'Are you sure you want to delete account "{{id}}"? This action cannot be undone.',deleteSuccess:'Account "{{id}}" deleted successfully.',authFailed:"Authentication failed",enterpriseDomainRequired:"Enterprise domain is required",deleting:"Deleting...",reauthAriaLabel:"Re-authenticate account {{id}}",deleteAriaLabel:"Delete account {{id}}"},C_={title:"Not found",description:"The page you are looking for does not exist."},T_={app:c_,locale:u_,nav:d_,theme:f_,motion:m_,common:h_,tokenDialog:p_,accountsPage:g_,requestsPage:v_,modelsPage:y_,requestDetailPage:x_,jsonViewer:b_,settingsPage:S_,accountManagement:w_,notFound:C_},E_={title:"Copilot API 管理后台",language:"语言"},j_={enUS:"English",zhCN:"简体中文"},A_={accounts:"账号",requests:"请求",models:"模型",settings:"设置",openNavigation:"打开导航"},N_={label:"主题",system:"跟随系统",light:"浅色",dark:"深色"},R_={label:"动效",magic:"炫酷",subtle:"柔和",off:"关闭",reducedMotionEnabled:"系统设置已启用减少动态效果"},M_={set:"已设置",unset:"未设置",test:"测试",testing:"测试中…",clear:"清除",save:"保存",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",retry:"重试",errors:"错误",tokens:"Tokens",failed:"失败",errorRate:"错误率",tokensPerRequest:"Tokens/请求",avgDurationMs:"平均耗时(ms)",lastRequest:"最近请求",account:"账号",status:"状态",avgMs:"平均 ms",clearFilter:"清除筛选",statusFailed:"失败",statusOk:"正常",used:"已用",remaining:"剩余",unlimited:"无限",apply:"应用",any:"(任意)",yes:"是",no:"否",from:"从",to:"到",time:"时间",path:"路径",endpoint:"端点",model:"模型",xInitiator:"发起方",cost:"成本",quota:"额度",durationAbbrev:"耗时",loading:"加载中…",loadMore:"加载更多",noMore:"已加载全部",clearFilters:"清除筛选",back:"返回",download:"下载",copyJson:"复制 JSON",actions:"操作"},__={trigger:"Token",title:"管理 Token",description:"调用 <3>/api/admin/*</3> 时会使用 <1>x-admin-token</1> 请求头。存储在 <5>localStorage</5> 中。",inputPlaceholder:"输入 Token",remoteNote:"如果服务端不在 localhost 运行,你必须在服务端设置 <1>ADMIN_TOKEN</1> 才能启用远程访问。",connected:"已连接:DB v{{version}} · {{path}}",validation:{empty:"Token 不能为空。"},toast:{adminApiOk:"Admin API 访问正常",adminApiFailed:"Admin API 访问失败",tokenSaved:"Token 已保存",tokenCleared:"Token 已清除"}},O_={loadFailedTitle:"加载账号失败",statsWindowLabel:"统计窗口",window:{last24h:"最近 24 小时",last7d:"最近 7 天",thisMonth:"本月"},dbInfo:"DB v{{version}} · {{path}}",tableDescription:"点击账号可筛选请求。",filterAccountPlaceholder:"筛选账号",sortByLabel:"排序",autoRefreshLabel:"自动",autoRefresh:{off:"关闭","30s":"30秒","60s":"60秒","5m":"5分钟"},exportCsv:"导出 CSV",exportCsvAria:"将账号导出为 CSV",exportSuccess:"账号已导出为 CSV",premiumReq:"Premium 请求",empty:{noAccountsTitle:"还没有账号",noAccountsDescription:"添加你的第一个 GitHub Copilot 账号,即可开始代理 API 请求。",noAccountsCta:"添加第一个账号",noMatchesTitle:"无匹配结果",noMatchesDescription:"没有账号匹配当前筛选条件。"},premiumQuotaUsedAria:"Premium 交互额度使用量",kpiTooltip:{accounts:"已注册的 GitHub Copilot 账号总数。",failed:"认证或 Token 刷新失败的账号。",requests:"在选定时间窗口内所有账号的 API 请求总数。",errors:"在选定时间窗口内返回错误(4xx/5xx)的请求总数。",errorRate:"返回错误的请求所占百分比。",tokensPerRequest:"每次请求平均消耗的 Token 数(输入+输出)。",tokens:"在选定时间窗口内所有账号消耗的 Token 总数。",avgDuration:"所有账号的加权平均响应时间(毫秒)。"},tableTooltip:{premiumReq:"Premium 交互额度:当前计费周期内的已用量与剩余量。",avgMs:"该账号的平均响应时间(毫秒)。"}},D_={loadFailedTitle:"加载请求失败",description:"筛选并查看最近的请求。",tabs:{quick:"快速",advanced:"高级"},filters:{timeRange:"时间范围",hasError:"有错误",upstreamModel:"上游模型",clientModel:"客户端模型"},timeRange:{last15m:"最近 15 分钟",last1h:"最近 1 小时",last6h:"最近 6 小时",last24h:"最近 24 小时",last7d:"最近 7 天",custom:"自定义…"},validation:{title:"时间范围无效",fromMsMustBeNumber:"开始时间必须是有效的日期。",toMsMustBeNumber:"结束时间必须是有效的日期。",fromMsMustBeLteToMs:"开始时间必须早于结束时间。"},empty:{noRequestsTitle:"无请求",noResultsForFilters:"当前筛选条件下没有结果。",noRequestsFound:"未找到请求。"},affinityHit:"命中亲和性缓存",resultCount:"已加载 {{count}} 条",resultCountWithMore:"已加载 {{count}}+ 条",activeFilters:"{{count}} 个筛选",autoRefreshLabel:"自动",autoRefresh:{off:"关闭","30s":"30秒","60s":"60秒","5m":"5分钟"},columnTooltip:{initiator:"客户端发送的 x-initiator 请求头值(如 IDE 扩展名称)。",cost:"此请求消耗的 Copilot 成本单位。",quota:"此请求完成后剩余的 Premium 交互额度。",duration:"总响应时间(毫秒)。",tokens:"消耗的总 token 数(输入 + 输出)。"}},P_={title:"模型",description:"查看当前可用模型及其元数据。",totalCount:"共 {{count}} 个模型",filteredCount:"显示 {{filtered}} / {{total}} 个模型",searchPlaceholder:"按名称或 ID 搜索",searchAriaLabel:"按名称或 ID 搜索模型",aliasesMore:"+{{count}} 个",loadFailedTitle:"加载模型失败",toast:{loadFailed:"加载模型失败"},columns:{name:"模型",endpoints:"端点",originalId:"模型ID",aliases:"别名",context:"Token 限制",features:"功能",multiplier:"成本"},columnTooltip:{name:"代理对外暴露的模型显示名称。",endpoints:"支持此模型的 API 端点(如 chat-completions、messages)。",originalId:"上游模型的原始标识符及已配置的别名。",context:"输入(prompt)和输出(completion)的最大 token 限制。",features:"该模型支持的功能。",multiplier:"Copilot 计费成本倍数——值越高,每次请求消耗的 Premium 额度越多。"},contextTooltip:"最大输入:{{input}} tokens · 最大输出:{{output}} tokens",badges:{preview:"预览",premium:"高级"},features:{tools:"工具",vision:"视觉",structuredOutputs:"结构化",streaming:"流式",parallelTools:"并行工具"},featureTooltip:{tools:"支持函数/工具调用。",vision:"可以处理图像输入。",structuredOutputs:"支持 JSON Schema 约束输出。",streaming:"支持流式响应。",parallelTools:"可以同时执行多个工具调用。"},contextInputLabel:"输入",contextOutputLabel:"输出",empty:{title:"无模型",description:"未找到模型。",noMatchesDescription:"没有模型匹配当前的搜索或筛选条件。"}},k_={loadFailedTitle:"加载请求详情失败",title:"请求详情",notFoundTitle:"请求不存在",notFoundDescription:"未找到指定的请求记录。",summaryTitle:"摘要",rawTitle:"原始 JSON",rawDescription:"完整请求记录(JSON 格式)。",searchPlaceholder:"搜索键或值…",toast:{copiedJson:"已复制 JSON",copyFailed:"复制失败",downloadedJson:"已下载 JSON",downloadFailed:"下载失败"},sections:{request:"请求",routing:"路由",client:"客户端",usage:"用量"},fields:{time:"时间",path:"路径",endpoint:"上游端点",account:"账号",userId:"用户 ID",safetyIdentifier:"安全标识",promptCacheKey:"提示词缓存键",initiator:"发起者",upstreamRequestId:"上游请求 ID",model:"模型",client:"客户端",tokens:"Token",quota:"额度",affinityHit:"亲和性命中",affinityCacheKey:"亲和性缓存键",duration:"耗时 (ms)",ttfb:"首字节 (ms)"},fieldTooltip:{endpoint:"此请求被转发到的上游 API 端点",userId:"与此请求关联的 GitHub 用户 ID",safetyIdentifier:"用于内容审核的安全标识符",promptCacheKey:"用于提示词去重的缓存键",initiator:"发起此请求的组件或客户端",upstreamRequestId:"上游提供商返回的请求 ID",affinityCacheKey:"用于账号亲和性路由的缓存键",duration:"请求总处理时间(毫秒)",ttfb:"首字节时间 — 收到第一个响应块前的延迟"},tokens:{in:"输入",out:"输出",total:"总计",cached:"缓存"},quota:{before:"之前",after:"之后",diff:"变化"}},L_={expand:"展开",collapse:"折叠",root:"(根)",more:"… 还有 {{count}} 项",arrayLabel:"数组({{count}})",objectLabel:"对象({{count}})",expandAll:"全部展开",collapseAll:"全部折叠",statusCollapsed:"已折叠",statusExpanded:"已展开",statusDepth:"层级<{{depth}}"},z_={subtitle:"管理服务端配置和功能开关。",configPath:"配置路径:{{path}}",note:"更改在保存后生效。",errorTitle:"加载设置失败",sections:{general:"通用",accountAffinity:"账号亲和性",reasoning:"推理",aliases:"别名",prompts:"提示词",advanced:"高级",providers:"上游提供方"},navigation:{ariaLabel:"设置分区"},saveButton:{saving:"保存中…",saveChanges:"保存更改"},toast:{loadModelsFailed:"加载模型失败",loadConfigFailed:"加载配置失败",configSaved:"配置已保存",saveConfigFailed:"保存配置失败"},common:{defaultOption:"(默认)",customModel:"自定义:{{value}}",remove:"移除",allow:"允许",block:"阻止",jsonMode:"JSON 模式",invalidJsonTitle:"无效的 JSON",selectModelPlaceholder:"选择模型",noModelsAvailable:"没有可用模型"},general:{title:"通用",description:"基础配置。",smallModel:"小模型",smallModelManual:"小模型(手动)",smallModelPlaceholder:"选择小模型",smallModelInputPlaceholder:"gpt-5-mini",smallModelHint:"控制路由时接收轻量/免费请求的模型。",apiKeysLabel:"API 密钥列表",apiKeysPlaceholder:"每行一个密钥",apiKeysHint:"支持每行一个或逗号分隔;留空表示关闭请求鉴权。",legacyAuthNote:"当 auth.apiKeys 为空时,仍会回退使用环境变量 {{env}} 或 config.apiKey(兼容旧配置)。",anthropicApiKeyLabel:"Anthropic API Key",anthropicApiKeyPlaceholder:"sk-ant-...",anthropicApiKeyHint:"可选。用于 Claude `/v1/messages/count_tokens` 的精确计数;未配置时,服务端会回退到本地 token 估算。",anthropicApiKeyEnvNote:"运行时仍可通过环境变量 {{env}} 回退提供。将此输入框留空并不会覆盖服务端已设置的环境变量。",showAnthropicApiKey:"显示",hideAnthropicApiKey:"隐藏"},accountAffinity:{title:"账号亲和性",description:"配置账号亲和性路由。",label:"启用账号亲和性",hint:"将请求路由到上次成功处理同一会话的账号。同时适用于免费和付费模型。"},reasoning:{title:"推理强度",description:"覆盖模型的推理强度等级。",hint:"定义每个模型的推理强度(可选)。",jsonPlaceholder:'{ \\"gpt-5-mini\\": \\"low\\" }',emptyState:"没有推理覆盖。请在下方添加模型。",itemHint:"覆盖该模型的推理强度。",addButton:"添加模型覆盖"},prompts:{title:"额外提示词",description:"为每个模型注入额外的 system prompt。",hint:"为指定模型添加或编辑注入的 prompt 片段。",jsonPlaceholder:'{ \\"gpt-5-mini\\": \\"...\\" }',emptyState:"未配置额外提示词。",promptPlaceholder:"System prompt 片段…",itemHint:"在模型执行前追加 prompt 内容。",addButton:"添加提示词"},aliases:{title:"模型别名",description:"将友好别名映射到上游模型 ID。",defaultBehaviorHint:"默认行为:{{behavior}} 原始模型 ID。每个别名可覆盖此设置。",jsonPlaceholder:'{ \\"fast\\": { \\"target\\": \\"gpt-5-mini\\", \\"allowOriginal\\": true } }',aliasPlaceholder:"别名",selectTargetPlaceholder:"选择目标模型",selectOption:"(选择)",originalModelPlaceholder:"原始模型 ID",useDefault:"使用默认值",allowOriginal:"允许原始模型 ID",blockOriginal:"阻止原始模型 ID",emptyState:"未配置模型别名。",addButton:"添加别名"},advanced:{title:"高级",description:"功能开关与实验选项。",routingGroupTitle:"路由",apiGroupTitle:"API 端点",modelGroupTitle:"模型与 Token",modelRefreshIntervalLabel:"模型列表刷新间隔(小时)",modelRefreshIntervalHint:"设置为 0 表示关闭自动刷新。",modelRefreshIntervalError:"必须是非负数字。",allowOriginalModelNamesLabel:"允许原始模型名",allowOriginalModelNamesHint:"当别名未覆盖时的默认行为。",useFunctionApplyPatchLabel:"Responses API apply_patch",useFunctionApplyPatchHint:"在 Responses API 转发请求时包含 apply_patch 函数工具。",forceAgentLabel:"按会话合并 Agent 请求计费",forceAgentHint:"影响 Copilot高级请求消耗的计次:关闭时,每次与 Agent 的对话请求都会计 1 次(与 VS Code 插件一致);开启时,同一会话内对同一模型的多次请求只计 1 次。",compactUseSmallModelLabel:"compact 请求路由到小模型",compactUseSmallModelHint:"启用后,compact 请求使用配置的小模型;否则使用请求的模型。",messageStartInputTokensFallbackLabel:"估算输入 tokens(回退)",messageStartInputTokensFallbackHint:"启用后,当上游 usage 不可用时,会估算 message_start 的 input tokens。",useMessagesApiLabel:"启用 Messages API",useMessagesApiHint:"启用后,支持 Copilot 原生 /v1/messages 的 Claude 系列模型将优先走 Messages API。",useResponsesApiWebSearchLabel:"启用 Responses API WebSearch",useResponsesApiWebSearchHint:"启用后,/v1/responses 会保留 web_search 工具并继续向上游转发。",responsesApiContextManagementModelsLabel:"上下文管理模型(Responses API)",responsesApiContextManagementModelsPlaceholder:"每行一个 model id",responsesApiContextManagementModelsHint:"这些模型将收到 Responses API 的 context_management 压缩指令。",providersTitle:"上游 Providers",providersDescription:"配置上游 provider(目前仅支持 anthropic)。每个 provider key 会作为路由前缀(/:provider/v1/messages)。",providersIssueTitle:"Providers 配置无效",providersEmptyState:"未配置 providers。",providersAddProvider:"添加 provider",providersNamePlaceholder:"Provider key(路由前缀)",providersEnabledLabel:"启用",providersBaseUrlLabel:"Base URL",providersBaseUrlPlaceholder:"https://api.anthropic.com",providersApiKeyLabel:"API Key",providersApiKeyPlaceholder:"sk-...",providersModelsLabel:"模型默认参数",providersModelsEmptyState:"未配置按模型的默认参数。",providersAddModel:"添加模型",providersModelIdPlaceholder:"Model ID"}},V_={addAccount:"添加账号",addAccountDescription:"添加新的 GitHub Copilot 账号",selectAccountType:"选择你的 GitHub Copilot 订阅类型",typeIndividual:"Individual(个人版)",typeIndividualDescription:"个人 GitHub Copilot 订阅",typeBusiness:"Business(商业版)",typeBusinessDescription:"组织管理的 Copilot Business 计划",typeEnterprise:"Enterprise(企业版)",typeEnterpriseDescription:"使用自定义域名的 GitHub Enterprise Server",enterpriseDomain:"Enterprise 域名",enterpriseDomainPlaceholder:"github.example.com",enterpriseDomainHint:"你的 GitHub Enterprise Server 主机名",continue:"继续",cancel:"取消",authorizeTitle:"GitHub 授权",reauthAuthorizeTitle:'重新授权 "{{id}}"',reauthAuthorizeDescription:"完成授权流程以刷新此账号的凭据。",reauthConfirmDescription:"这将在新标签页中打开 GitHub 以重新授权你的账号凭据。",reauthConfirmHint:"你需要在 GitHub 上输入设备码来完成流程。现有账号数据将保留不变。",enterCodePrompt:"请在 GitHub 输入以下代码以完成授权:",copy:"复制",copied:"已复制!",autoOpenHint:"已打开新标签页。如果未自动打开:",waitingForAuth:"等待授权中...",expiresIn:"{{time}} 后过期",expiresWarning:"授权码即将过期",errorRecoveryHint:"请检查网络连接后重试。如问题持续存在,请确认你的 GitHub 账号已订阅 Copilot。",errorExpiredHint:"授权码已过期,请重新开始以获取新的授权码。",successTitle:"账号添加成功!",successReauthTitle:'"{{id}}" 重新认证成功!',accountLabel:"账号",typeLabel:"类型",statusLabel:"状态",statusActive:"正常",done:"完成",expired:"授权已过期",startOver:"重新开始",retry:"重试",reauth:"重新认证",delete:"删除",deleteTitle:"删除账号",deleteConfirmation:'确定要删除账号 "{{id}}" 吗?此操作不可撤销。',deleteSuccess:'账号 "{{id}}" 已成功删除。',authFailed:"认证失败",enterpriseDomainRequired:"Enterprise 域名不能为空",deleting:"删除中...",reauthAriaLabel:"重新认证账号 {{id}}",deleteAriaLabel:"删除账号 {{id}}"},B_={title:"未找到页面",description:"你访问的页面不存在。"},U_={app:E_,locale:j_,nav:A_,theme:N_,motion:R_,common:M_,tokenDialog:__,accountsPage:O_,requestsPage:D_,modelsPage:P_,requestDetailPage:k_,jsonViewer:L_,settingsPage:z_,accountManagement:V_,notFound:B_},Tl="en-US",I_=["en-US","zh-CN"],Pw="locale";function Fh(e){if(!e)return Tl;const t=e.toLowerCase().trim().replace(/_/g,"-");return t.startsWith("zh")?"zh-CN":t.startsWith("en")?"en-US":Tl}function kw(){if(typeof window>"u")return Tl;try{const e=globalThis.localStorage.getItem(Pw);if(e)return Fh(e);const t=Array.isArray(navigator.languages)&&navigator.languages[0]||navigator.language;return Fh(t)}catch{return Tl}}ct.use(t_).init({resources:{"en-US":{translation:T_},"zh-CN":{translation:U_}},lng:kw(),fallbackLng:Tl,supportedLngs:[...I_],interpolation:{escapeValue:!1},react:{useSuspense:!1},initImmediate:!1});const H_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),F_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,s,i)=>i?i.toUpperCase():s.toLowerCase()),M0=e=>{const t=F_(e);return t.charAt(0).toUpperCase()+t.slice(1)},Lw=(...e)=>e.filter((t,s,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===s).join(" ").trim(),q_=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var $_={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const K_=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:r="",children:l,iconNode:u,...f},h)=>x.createElement("svg",{ref:h,...$_,width:t,height:t,stroke:e,strokeWidth:i?Number(s)*24/Number(t):s,className:Lw("lucide",r),...!l&&!q_(f)&&{"aria-hidden":"true"},...f},[...u.map(([m,y])=>x.createElement(m,y)),...Array.isArray(l)?l:[l]]));const ft=(e,t)=>{const s=x.forwardRef(({className:i,...r},l)=>x.createElement(K_,{ref:l,iconNode:t,className:Lw(`lucide-${H_(M0(e))}`,`lucide-${e}`,i),...r}));return s.displayName=M0(e),s};const G_=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],_0=ft("arrow-left",G_);const Y_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],X_=ft("check",Y_);const Z_=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Yp=ft("chevron-down",Z_);const Q_=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],W_=ft("chevron-right",Q_);const J_=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],eO=ft("chevron-up",J_);const tO=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Xp=ft("circle-check",tO);const nO=[["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"}]],zw=ft("download",nO);const aO=[["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"}]],sO=ft("eye-off",aO);const iO=[["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"}]],oO=ft("eye",iO);const rO=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],lO=ft("globe",rO);const cO=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Vw=ft("info",cO);const uO=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],dO=ft("key-round",uO);const fO=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],mO=ft("laptop",fO);const hO=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Wo=ft("loader-circle",hO);const pO=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],gO=ft("menu",pO);const vO=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],yO=ft("moon",vO);const xO=[["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"}]],Zp=ft("octagon-x",xO);const bO=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],O0=ft("plus",bO);const SO=[["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"}]],Fu=ft("refresh-cw",SO);const wO=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],CO=ft("search",wO);const TO=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],EO=ft("sun",TO);const jO=[["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"}]],Bw=ft("triangle-alert",jO);const AO=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],NO=ft("user-plus",AO);const RO=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Uw=ft("x",RO),Iw=x.createContext(null),qh="magic",MO={preference:qh,effective:qh,reducedMotion:!1,setPreference:()=>{}};function _O({children:e}){return x.useEffect(()=>{document.documentElement.dataset.motion=qh},[]),d.jsx(Iw.Provider,{value:MO,children:e})}function Qp(){const e=x.useContext(Iw);if(!e)throw new Error("useMotionPreference must be used within MotionPreferenceProvider");return e}function Hw(e){var t,s,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(s=Hw(e[t]))&&(i&&(i+=" "),i+=s)}else for(s in e)e[s]&&(i&&(i+=" "),i+=s);return i}function Fw(){for(var e,t,s=0,i="",r=arguments.length;s<r;s++)(e=arguments[s])&&(t=Hw(e))&&(i&&(i+=" "),i+=t);return i}const OO=(e,t)=>{const s=new Array(e.length+t.length);for(let i=0;i<e.length;i++)s[i]=e[i];for(let i=0;i<t.length;i++)s[e.length+i]=t[i];return s},DO=(e,t)=>({classGroupId:e,validator:t}),qw=(e=new Map,t=null,s)=>({nextPart:e,validators:t,classGroupId:s}),qu="-",D0=[],PO="arbitrary..",kO=e=>{const t=zO(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return LO(u);const f=u.split(qu),h=f[0]===""&&f.length>1?1:0;return $w(f,h,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const h=i[u],m=s[u];return h?m?OO(m,h):h:m||D0}return s[u]||D0}}},$w=(e,t,s)=>{if(e.length-t===0)return s.classGroupId;const r=e[t],l=s.nextPart.get(r);if(l){const m=$w(e,t+1,l);if(m)return m}const u=s.validators;if(u===null)return;const f=t===0?e.join(qu):e.slice(t).join(qu),h=u.length;for(let m=0;m<h;m++){const y=u[m];if(y.validator(f))return y.classGroupId}},LO=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),s=t.indexOf(":"),i=t.slice(0,s);return i?PO+i:void 0})(),zO=e=>{const{theme:t,classGroups:s}=e;return VO(s,t)},VO=(e,t)=>{const s=qw();for(const i in e){const r=e[i];Wp(r,s,i,t)}return s},Wp=(e,t,s,i)=>{const r=e.length;for(let l=0;l<r;l++){const u=e[l];BO(u,t,s,i)}},BO=(e,t,s,i)=>{if(typeof e=="string"){UO(e,t,s);return}if(typeof e=="function"){IO(e,t,s,i);return}HO(e,t,s,i)},UO=(e,t,s)=>{const i=e===""?t:Kw(t,e);i.classGroupId=s},IO=(e,t,s,i)=>{if(FO(e)){Wp(e(i),t,s,i);return}t.validators===null&&(t.validators=[]),t.validators.push(DO(s,e))},HO=(e,t,s,i)=>{const r=Object.entries(e),l=r.length;for(let u=0;u<l;u++){const[f,h]=r[u];Wp(h,Kw(t,f),s,i)}},Kw=(e,t)=>{let s=e;const i=t.split(qu),r=i.length;for(let l=0;l<r;l++){const u=i[l];let f=s.nextPart.get(u);f||(f=qw(),s.nextPart.set(u,f)),s=f}return s},FO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),i=Object.create(null);const r=(l,u)=>{s[l]=u,t++,t>e&&(t=0,i=s,s=Object.create(null))};return{get(l){let u=s[l];if(u!==void 0)return u;if((u=i[l])!==void 0)return r(l,u),u},set(l,u){l in s?s[l]=u:r(l,u)}}},$h="!",P0=":",$O=[],k0=(e,t,s,i,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:i,isExternal:r}),KO=e=>{const{prefix:t,experimentalParseClassName:s}=e;let i=r=>{const l=[];let u=0,f=0,h=0,m;const y=r.length;for(let T=0;T<y;T++){const j=r[T];if(u===0&&f===0){if(j===P0){l.push(r.slice(h,T)),h=T+1;continue}if(j==="/"){m=T;continue}}j==="["?u++:j==="]"?u--:j==="("?f++:j===")"&&f--}const g=l.length===0?r:r.slice(h);let b=g,S=!1;g.endsWith($h)?(b=g.slice(0,-1),S=!0):g.startsWith($h)&&(b=g.slice(1),S=!0);const C=m&&m>h?m-h:void 0;return k0(l,S,b,C)};if(t){const r=t+P0,l=i;i=u=>u.startsWith(r)?l(u.slice(r.length)):k0($O,!1,u,void 0,!0)}if(s){const r=i;i=l=>s({className:l,parseClassName:r})}return i},GO=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((s,i)=>{t.set(s,1e6+i)}),s=>{const i=[];let r=[];for(let l=0;l<s.length;l++){const u=s[l],f=u[0]==="[",h=t.has(u);f||h?(r.length>0&&(r.sort(),i.push(...r),r=[]),i.push(u)):r.push(u)}return r.length>0&&(r.sort(),i.push(...r)),i}},YO=e=>({cache:qO(e.cacheSize),parseClassName:KO(e),sortModifiers:GO(e),...kO(e)}),XO=/\s+/,ZO=(e,t)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:r,sortModifiers:l}=t,u=[],f=e.trim().split(XO);let h="";for(let m=f.length-1;m>=0;m-=1){const y=f[m],{isExternal:g,modifiers:b,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:T}=s(y);if(g){h=y+(h.length>0?" "+h:h);continue}let j=!!T,E=i(j?C.substring(0,T):C);if(!E){if(!j){h=y+(h.length>0?" "+h:h);continue}if(E=i(C),!E){h=y+(h.length>0?" "+h:h);continue}j=!1}const A=b.length===0?"":b.length===1?b[0]:l(b).join(":"),R=S?A+$h:A,_=R+E;if(u.indexOf(_)>-1)continue;u.push(_);const M=r(E,j);for(let z=0;z<M.length;++z){const D=M[z];u.push(R+D)}h=y+(h.length>0?" "+h:h)}return h},QO=(...e)=>{let t=0,s,i,r="";for(;t<e.length;)(s=e[t++])&&(i=Gw(s))&&(r&&(r+=" "),r+=i);return r},Gw=e=>{if(typeof e=="string")return e;let t,s="";for(let i=0;i<e.length;i++)e[i]&&(t=Gw(e[i]))&&(s&&(s+=" "),s+=t);return s},WO=(e,...t)=>{let s,i,r,l;const u=h=>{const m=t.reduce((y,g)=>g(y),e());return s=YO(m),i=s.cache.get,r=s.cache.set,l=f,f(h)},f=h=>{const m=i(h);if(m)return m;const y=ZO(h,s);return r(h,y),y};return l=u,(...h)=>l(QO(...h))},JO=[],Vt=e=>{const t=s=>s[e]||JO;return t.isThemeGetter=!0,t},Yw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eD=/^\d+\/\d+$/,tD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nD=/\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$/,aD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vo=e=>eD.test(e),ke=e=>!!e&&!Number.isNaN(Number(e)),ni=e=>!!e&&Number.isInteger(Number(e)),sh=e=>e.endsWith("%")&&ke(e.slice(0,-1)),ys=e=>tD.test(e),oD=()=>!0,rD=e=>nD.test(e)&&!aD.test(e),Zw=()=>!1,lD=e=>sD.test(e),cD=e=>iD.test(e),uD=e=>!ve(e)&&!ye(e),dD=e=>or(e,Jw,Zw),ve=e=>Yw.test(e),Pi=e=>or(e,eC,rD),ih=e=>or(e,gD,ke),L0=e=>or(e,Qw,Zw),fD=e=>or(e,Ww,cD),cu=e=>or(e,tC,lD),ye=e=>Xw.test(e),ll=e=>rr(e,eC),mD=e=>rr(e,vD),z0=e=>rr(e,Qw),hD=e=>rr(e,Jw),pD=e=>rr(e,Ww),uu=e=>rr(e,tC,!0),or=(e,t,s)=>{const i=Yw.exec(e);return i?i[1]?t(i[1]):s(i[2]):!1},rr=(e,t,s=!1)=>{const i=Xw.exec(e);return i?i[1]?t(i[1]):s:!1},Qw=e=>e==="position"||e==="percentage",Ww=e=>e==="image"||e==="url",Jw=e=>e==="length"||e==="size"||e==="bg-size",eC=e=>e==="length",gD=e=>e==="number",vD=e=>e==="family-name",tC=e=>e==="shadow",yD=()=>{const e=Vt("color"),t=Vt("font"),s=Vt("text"),i=Vt("font-weight"),r=Vt("tracking"),l=Vt("leading"),u=Vt("breakpoint"),f=Vt("container"),h=Vt("spacing"),m=Vt("radius"),y=Vt("shadow"),g=Vt("inset-shadow"),b=Vt("text-shadow"),S=Vt("drop-shadow"),C=Vt("blur"),T=Vt("perspective"),j=Vt("aspect"),E=Vt("ease"),A=Vt("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[..._(),ye,ve],z=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],P=()=>[ye,ve,h],X=()=>[Vo,"full","auto",...P()],Q=()=>[ni,"none","subgrid",ye,ve],J=()=>["auto",{span:["full",ni,ye,ve]},ni,ye,ve],te=()=>[ni,"auto",ye,ve],ne=()=>["auto","min","max","fr",ye,ve],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],de=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...P()],H=()=>[Vo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],B=()=>[e,ye,ve],le=()=>[..._(),z0,L0,{position:[ye,ve]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",hD,dD,{size:[ye,ve]}],V=()=>[sh,ll,Pi],I=()=>["","none","full",m,ye,ve],W=()=>["",ke,ll,Pi],oe=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[ke,sh,z0,L0],ie=()=>["","none",C,ye,ve],me=()=>["none",ke,ye,ve],be=()=>["none",ke,ye,ve],je=()=>[ke,ye,ve],Ae=()=>[Vo,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ys],breakpoint:[ys],color:[oD],container:[ys],"drop-shadow":[ys],ease:["in","out","in-out"],font:[uD],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ys],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ys],shadow:[ys],spacing:["px",ke],text:[ys],"text-shadow":[ys],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vo,ve,ye,j]}],container:["container"],columns:[{columns:[ke,ve,ye,f]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{start:X()}],end:[{end:X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[ni,"auto",ye,ve]}],basis:[{basis:[Vo,"full","auto",f,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,Vo,"auto","initial","none",ve]}],grow:[{grow:["",ke,ye,ve]}],shrink:[{shrink:["",ke,ye,ve]}],order:[{order:[ni,"first","last","none",ye,ve]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...de(),"normal"]}],"justify-self":[{"justify-self":["auto",...de()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...de(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...de(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...de(),"baseline"]}],"place-self":[{"place-self":["auto",...de()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[f,"screen",...H()]}],"min-w":[{"min-w":[f,"screen","none",...H()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",s,ll,Pi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ye,ih]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",sh,ve]}],"font-family":[{font:[mD,ve,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,ye,ve]}],"line-clamp":[{"line-clamp":[ke,"none",ye,ih]}],leading:[{leading:[l,...P()]}],"list-image":[{"list-image":["none",ye,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",ye,Pi]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[ke,"auto",ye,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ni,ye,ve],radial:["",ye,ve],conic:[ni,ye,ve]},pD,fD]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,ye,ve]}],"outline-w":[{outline:["",ke,ll,Pi]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",y,uu,cu]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",g,uu,cu]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[ke,Pi]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",b,uu,cu]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[ke,ye,ve]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[ye,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ve]}],filter:[{filter:["","none",ye,ve]}],blur:[{blur:ie()}],brightness:[{brightness:[ke,ye,ve]}],contrast:[{contrast:[ke,ye,ve]}],"drop-shadow":[{"drop-shadow":["","none",S,uu,cu]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",ke,ye,ve]}],"hue-rotate":[{"hue-rotate":[ke,ye,ve]}],invert:[{invert:["",ke,ye,ve]}],saturate:[{saturate:[ke,ye,ve]}],sepia:[{sepia:["",ke,ye,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ve]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[ke,ye,ve]}],"backdrop-contrast":[{"backdrop-contrast":[ke,ye,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,ye,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,ye,ve]}],"backdrop-invert":[{"backdrop-invert":["",ke,ye,ve]}],"backdrop-opacity":[{"backdrop-opacity":[ke,ye,ve]}],"backdrop-saturate":[{"backdrop-saturate":[ke,ye,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,ye,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",ye,ve]}],ease:[{ease:["linear","initial",E,ye,ve]}],delay:[{delay:[ke,ye,ve]}],animate:[{animate:["none",A,ye,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,ye,ve]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:je()}],"skew-x":[{"skew-x":je()}],"skew-y":[{"skew-y":je()}],transform:[{transform:[ye,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ae()}],"translate-x":[{"translate-x":Ae()}],"translate-y":[{"translate-y":Ae()}],"translate-z":[{"translate-z":Ae()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye,ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye,ve]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[ke,ll,Pi,ih]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},xD=WO(yD);function ce(...e){return xD(Fw(e))}function V0({children:e,className:t,speed:s=1,colorFrom:i="#ffaa40",colorTo:r="#9c40ff",...l}){const{effective:u}=Qp(),f=u!=="off";return d.jsx("span",{style:{"--bg-size":`${s*300}%`,"--color-from":i,"--color-to":r},className:ce("inline bg-gradient-to-r from-[var(--color-from)] via-[var(--color-to)] to-[var(--color-from)] bg-[length:var(--bg-size)_100%] bg-clip-text text-transparent",f&&"animate-gradient",t),...l,children:e})}function B0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lr(...e){return t=>{let s=!1;const i=e.map(r=>{const l=B0(r,t);return!s&&typeof l=="function"&&(s=!0),l});if(s)return()=>{for(let r=0;r<i.length;r++){const l=i[r];typeof l=="function"?l():B0(e[r],null)}}}}function dt(...e){return x.useCallback(lr(...e),e)}var bD=Symbol.for("react.lazy"),$u=Lp[" use ".trim().toString()];function SD(e){return typeof e=="object"&&e!==null&&"then"in e}function nC(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===bD&&"_payload"in e&&SD(e._payload)}function aC(e){const t=wD(e),s=x.forwardRef((i,r)=>{let{children:l,...u}=i;nC(l)&&typeof $u=="function"&&(l=$u(l._payload));const f=x.Children.toArray(l),h=f.find(TD);if(h){const m=h.props.children,y=f.map(g=>g===h?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:g);return d.jsx(t,{...u,ref:r,children:x.isValidElement(m)?x.cloneElement(m,void 0,y):null})}return d.jsx(t,{...u,ref:r,children:l})});return s.displayName=`${e}.Slot`,s}var Jp=aC("Slot");function wD(e){const t=x.forwardRef((s,i)=>{let{children:r,...l}=s;if(nC(r)&&typeof $u=="function"&&(r=$u(r._payload)),x.isValidElement(r)){const u=jD(r),f=ED(l,r.props);return r.type!==x.Fragment&&(f.ref=i?lr(i,u):u),x.cloneElement(r,f)}return x.Children.count(r)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var CD=Symbol("radix.slottable");function TD(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===CD}function ED(e,t){const s={...t};for(const i in t){const r=e[i],l=t[i];/^on[A-Z]/.test(i)?r&&l?s[i]=(...f)=>{const h=l(...f);return r(...f),h}:r&&(s[i]=r):i==="style"?s[i]={...r,...l}:i==="className"&&(s[i]=[r,l].filter(Boolean).join(" "))}return{...e,...s}}function jD(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}const U0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,I0=Fw,eg=(e,t)=>s=>{var i;if(t?.variants==null)return I0(e,s?.class,s?.className);const{variants:r,defaultVariants:l}=t,u=Object.keys(r).map(m=>{const y=s?.[m],g=l?.[m];if(y===null)return null;const b=U0(y)||U0(g);return r[m][b]}),f=s&&Object.entries(s).reduce((m,y)=>{let[g,b]=y;return b===void 0||(m[g]=b),m},{}),h=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((m,y)=>{let{class:g,className:b,...S}=y;return Object.entries(S).every(C=>{let[T,j]=C;return Array.isArray(j)?j.includes({...l,...f}[T]):{...l,...f}[T]===j})?[...m,g,b]:m},[]);return I0(e,u,h,s?.class,s?.className)},AD=eg("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Me({className:e,variant:t="default",size:s="default",asChild:i=!1,...r}){const l=i?Jp:"button";return d.jsx(l,{"data-slot":"button","data-variant":t,"data-size":s,className:ce(AD({variant:t,size:s,className:e})),...r})}function Pe(e,t,{checkForDefaultPrevented:s=!0}={}){return function(r){if(e?.(r),s===!1||!r.defaultPrevented)return t?.(r)}}function ND(e,t){const s=x.createContext(t),i=l=>{const{children:u,...f}=l,h=x.useMemo(()=>f,Object.values(f));return d.jsx(s.Provider,{value:h,children:u})};i.displayName=e+"Provider";function r(l){const u=x.useContext(s);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[i,r]}function eo(e,t=[]){let s=[];function i(l,u){const f=x.createContext(u),h=s.length;s=[...s,u];const m=g=>{const{scope:b,children:S,...C}=g,T=b?.[e]?.[h]||f,j=x.useMemo(()=>C,Object.values(C));return d.jsx(T.Provider,{value:j,children:S})};m.displayName=l+"Provider";function y(g,b){const S=b?.[e]?.[h]||f,C=x.useContext(S);if(C)return C;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${l}\``)}return[m,y]}const r=()=>{const l=s.map(u=>x.createContext(u));return function(f){const h=f?.[e]||l;return x.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return r.scopeName=e,[i,RD(r,...t)]}function RD(...e){const t=e[0];if(e.length===1)return t;const s=()=>{const i=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(l){const u=i.reduce((f,{useScope:h,scopeName:m})=>{const g=h(l)[`__scope${m}`];return{...f,...g}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return s.scopeName=t.scopeName,s}var on=globalThis?.document?x.useLayoutEffect:()=>{},MD=Lp[" useId ".trim().toString()]||(()=>{}),_D=0;function Cs(e){const[t,s]=x.useState(MD());return on(()=>{s(i=>i??String(_D++))},[e]),t?`radix-${t}`:""}var OD=Lp[" useInsertionEffect ".trim().toString()]||on;function Jo({prop:e,defaultProp:t,onChange:s=()=>{},caller:i}){const[r,l,u]=DD({defaultProp:t,onChange:s}),f=e!==void 0,h=f?e:r;{const y=x.useRef(e!==void 0);x.useEffect(()=>{const g=y.current;g!==f&&console.warn(`${i} is changing from ${g?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=f},[f,i])}const m=x.useCallback(y=>{if(f){const g=PD(y)?y(e):y;g!==e&&u.current?.(g)}else l(y)},[f,e,l,u]);return[h,m]}function DD({defaultProp:e,onChange:t}){const[s,i]=x.useState(e),r=x.useRef(s),l=x.useRef(t);return OD(()=>{l.current=t},[t]),x.useEffect(()=>{r.current!==s&&(l.current?.(s),r.current=s)},[s,r]),[s,i,l]}function PD(e){return typeof e=="function"}function kD(e){const t=LD(e),s=x.forwardRef((i,r)=>{const{children:l,...u}=i,f=x.Children.toArray(l),h=f.find(VD);if(h){const m=h.props.children,y=f.map(g=>g===h?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:g);return d.jsx(t,{...u,ref:r,children:x.isValidElement(m)?x.cloneElement(m,void 0,y):null})}return d.jsx(t,{...u,ref:r,children:l})});return s.displayName=`${e}.Slot`,s}function LD(e){const t=x.forwardRef((s,i)=>{const{children:r,...l}=s;if(x.isValidElement(r)){const u=UD(r),f=BD(l,r.props);return r.type!==x.Fragment&&(f.ref=i?lr(i,u):u),x.cloneElement(r,f)}return x.Children.count(r)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zD=Symbol("radix.slottable");function VD(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zD}function BD(e,t){const s={...t};for(const i in t){const r=e[i],l=t[i];/^on[A-Z]/.test(i)?r&&l?s[i]=(...f)=>{const h=l(...f);return r(...f),h}:r&&(s[i]=r):i==="style"?s[i]={...r,...l}:i==="className"&&(s[i]=[r,l].filter(Boolean).join(" "))}return{...e,...s}}function UD(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var ID=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fe=ID.reduce((e,t)=>{const s=kD(`Primitive.${t}`),i=x.forwardRef((r,l)=>{const{asChild:u,...f}=r,h=u?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(h,{...f,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function HD(e,t){e&&Vl.flushSync(()=>e.dispatchEvent(t))}function oi(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...s)=>t.current?.(...s),[])}function FD(e,t=globalThis?.document){const s=oi(e);x.useEffect(()=>{const i=r=>{r.key==="Escape"&&s(r)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[s,t])}var qD="DismissableLayer",Kh="dismissableLayer.update",$D="dismissableLayer.pointerDownOutside",KD="dismissableLayer.focusOutside",H0,sC=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ud=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:l,onInteractOutside:u,onDismiss:f,...h}=e,m=x.useContext(sC),[y,g]=x.useState(null),b=y?.ownerDocument??globalThis?.document,[,S]=x.useState({}),C=dt(t,D=>g(D)),T=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=T.indexOf(j),A=y?T.indexOf(y):-1,R=m.layersWithOutsidePointerEventsDisabled.size>0,_=A>=E,M=XD(D=>{const P=D.target,X=[...m.branches].some(Q=>Q.contains(P));!_||X||(r?.(D),u?.(D),D.defaultPrevented||f?.())},b),z=ZD(D=>{const P=D.target;[...m.branches].some(Q=>Q.contains(P))||(l?.(D),u?.(D),D.defaultPrevented||f?.())},b);return FD(D=>{A===m.layers.size-1&&(i?.(D),!D.defaultPrevented&&f&&(D.preventDefault(),f()))},b),x.useEffect(()=>{if(y)return s&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(H0=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),F0(),()=>{s&&m.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=H0)}},[y,b,s,m]),x.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),F0())},[y,m]),x.useEffect(()=>{const D=()=>S({});return document.addEventListener(Kh,D),()=>document.removeEventListener(Kh,D)},[]),d.jsx(Fe.div,{...h,ref:C,style:{pointerEvents:R?_?"auto":"none":void 0,...e.style},onFocusCapture:Pe(e.onFocusCapture,z.onFocusCapture),onBlurCapture:Pe(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:Pe(e.onPointerDownCapture,M.onPointerDownCapture)})});ud.displayName=qD;var GD="DismissableLayerBranch",YD=x.forwardRef((e,t)=>{const s=x.useContext(sC),i=x.useRef(null),r=dt(t,i);return x.useEffect(()=>{const l=i.current;if(l)return s.branches.add(l),()=>{s.branches.delete(l)}},[s.branches]),d.jsx(Fe.div,{...e,ref:r})});YD.displayName=GD;function XD(e,t=globalThis?.document){const s=oi(e),i=x.useRef(!1),r=x.useRef(()=>{});return x.useEffect(()=>{const l=f=>{if(f.target&&!i.current){let h=function(){iC($D,s,m,{discrete:!0})};const m={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=h,t.addEventListener("click",r.current,{once:!0})):h()}else t.removeEventListener("click",r.current);i.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",r.current)}},[t,s]),{onPointerDownCapture:()=>i.current=!0}}function ZD(e,t=globalThis?.document){const s=oi(e),i=x.useRef(!1);return x.useEffect(()=>{const r=l=>{l.target&&!i.current&&iC(KD,s,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,s]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function F0(){const e=new CustomEvent(Kh);document.dispatchEvent(e)}function iC(e,t,s,{discrete:i}){const r=s.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:s});t&&r.addEventListener(e,t,{once:!0}),i?HD(r,l):r.dispatchEvent(l)}var oh="focusScope.autoFocusOnMount",rh="focusScope.autoFocusOnUnmount",q0={bubbles:!1,cancelable:!0},QD="FocusScope",tg=x.forwardRef((e,t)=>{const{loop:s=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:l,...u}=e,[f,h]=x.useState(null),m=oi(r),y=oi(l),g=x.useRef(null),b=dt(t,T=>h(T)),S=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(i){let T=function(R){if(S.paused||!f)return;const _=R.target;f.contains(_)?g.current=_:ai(g.current,{select:!0})},j=function(R){if(S.paused||!f)return;const _=R.relatedTarget;_!==null&&(f.contains(_)||ai(g.current,{select:!0}))},E=function(R){if(document.activeElement===document.body)for(const M of R)M.removedNodes.length>0&&ai(f)};document.addEventListener("focusin",T),document.addEventListener("focusout",j);const A=new MutationObserver(E);return f&&A.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",T),document.removeEventListener("focusout",j),A.disconnect()}}},[i,f,S.paused]),x.useEffect(()=>{if(f){K0.add(S);const T=document.activeElement;if(!f.contains(T)){const E=new CustomEvent(oh,q0);f.addEventListener(oh,m),f.dispatchEvent(E),E.defaultPrevented||(WD(aP(oC(f)),{select:!0}),document.activeElement===T&&ai(f))}return()=>{f.removeEventListener(oh,m),setTimeout(()=>{const E=new CustomEvent(rh,q0);f.addEventListener(rh,y),f.dispatchEvent(E),E.defaultPrevented||ai(T??document.body,{select:!0}),f.removeEventListener(rh,y),K0.remove(S)},0)}}},[f,m,y,S]);const C=x.useCallback(T=>{if(!s&&!i||S.paused)return;const j=T.key==="Tab"&&!T.altKey&&!T.ctrlKey&&!T.metaKey,E=document.activeElement;if(j&&E){const A=T.currentTarget,[R,_]=JD(A);R&&_?!T.shiftKey&&E===_?(T.preventDefault(),s&&ai(R,{select:!0})):T.shiftKey&&E===R&&(T.preventDefault(),s&&ai(_,{select:!0})):E===A&&T.preventDefault()}},[s,i,S.paused]);return d.jsx(Fe.div,{tabIndex:-1,...u,ref:b,onKeyDown:C})});tg.displayName=QD;function WD(e,{select:t=!1}={}){const s=document.activeElement;for(const i of e)if(ai(i,{select:t}),document.activeElement!==s)return}function JD(e){const t=oC(e),s=$0(t,e),i=$0(t.reverse(),e);return[s,i]}function oC(e){const t=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function $0(e,t){for(const s of e)if(!eP(s,{upTo:t}))return s}function eP(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function tP(e){return e instanceof HTMLInputElement&&"select"in e}function ai(e,{select:t=!1}={}){if(e&&e.focus){const s=document.activeElement;e.focus({preventScroll:!0}),e!==s&&tP(e)&&t&&e.select()}}var K0=nP();function nP(){let e=[];return{add(t){const s=e[0];t!==s&&s?.pause(),e=G0(e,t),e.unshift(t)},remove(t){e=G0(e,t),e[0]?.resume()}}}function G0(e,t){const s=[...e],i=s.indexOf(t);return i!==-1&&s.splice(i,1),s}function aP(e){return e.filter(t=>t.tagName!=="A")}var sP="Portal",dd=x.forwardRef((e,t)=>{const{container:s,...i}=e,[r,l]=x.useState(!1);on(()=>l(!0),[]);const u=s||r&&globalThis?.document?.body;return u?Sw.createPortal(d.jsx(Fe.div,{...i,ref:t}),u):null});dd.displayName=sP;function iP(e,t){return x.useReducer((s,i)=>t[s][i]??s,e)}var to=e=>{const{present:t,children:s}=e,i=oP(t),r=typeof s=="function"?s({present:i.isPresent}):x.Children.only(s),l=dt(i.ref,rP(r));return typeof s=="function"||i.isPresent?x.cloneElement(r,{ref:l}):null};to.displayName="Presence";function oP(e){const[t,s]=x.useState(),i=x.useRef(null),r=x.useRef(e),l=x.useRef("none"),u=e?"mounted":"unmounted",[f,h]=iP(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const m=du(i.current);l.current=f==="mounted"?m:"none"},[f]),on(()=>{const m=i.current,y=r.current;if(y!==e){const b=l.current,S=du(m);e?h("MOUNT"):S==="none"||m?.display==="none"?h("UNMOUNT"):h(y&&b!==S?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,h]),on(()=>{if(t){let m;const y=t.ownerDocument.defaultView??window,g=S=>{const T=du(i.current).includes(CSS.escape(S.animationName));if(S.target===t&&T&&(h("ANIMATION_END"),!r.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",m=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},b=S=>{S.target===t&&(l.current=du(i.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{y.clearTimeout(m),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:x.useCallback(m=>{i.current=m?getComputedStyle(m):null,s(m)},[])}}function du(e){return e?.animationName||"none"}function rP(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var lh=0;function rC(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Y0()),document.body.insertAdjacentElement("beforeend",e[1]??Y0()),lh++,()=>{lh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),lh--}},[])}function Y0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var za=function(){return za=Object.assign||function(t){for(var s,i=1,r=arguments.length;i<r;i++){s=arguments[i];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(t[l]=s[l])}return t},za.apply(this,arguments)};function lC(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(s[i[r]]=e[i[r]]);return s}function lP(e,t,s){if(s||arguments.length===2)for(var i=0,r=t.length,l;i<r;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var Mu="right-scroll-bar-position",_u="width-before-scroll-bar",cP="with-scroll-bars-hidden",uP="--removed-body-scroll-bar-size";function ch(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function dP(e,t){var s=x.useState(function(){return{value:e,callback:t,facade:{get current(){return s.value},set current(i){var r=s.value;r!==i&&(s.value=i,s.callback(i,r))}}}})[0];return s.callback=t,s.facade}var fP=typeof window<"u"?x.useLayoutEffect:x.useEffect,X0=new WeakMap;function mP(e,t){var s=dP(null,function(i){return e.forEach(function(r){return ch(r,i)})});return fP(function(){var i=X0.get(s);if(i){var r=new Set(i),l=new Set(e),u=s.current;r.forEach(function(f){l.has(f)||ch(f,null)}),l.forEach(function(f){r.has(f)||ch(f,u)})}X0.set(s,e)},[e]),s}function hP(e){return e}function pP(e,t){t===void 0&&(t=hP);var s=[],i=!1,r={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:e},useMedium:function(l){var u=t(l,i);return s.push(u),function(){s=s.filter(function(f){return f!==u})}},assignSyncMedium:function(l){for(i=!0;s.length;){var u=s;s=[],u.forEach(l)}s={push:function(f){return l(f)},filter:function(){return s}}},assignMedium:function(l){i=!0;var u=[];if(s.length){var f=s;s=[],f.forEach(l),u=s}var h=function(){var y=u;u=[],y.forEach(l)},m=function(){return Promise.resolve().then(h)};m(),s={push:function(y){u.push(y),m()},filter:function(y){return u=u.filter(y),s}}}};return r}function gP(e){e===void 0&&(e={});var t=pP(null);return t.options=za({async:!0,ssr:!1},e),t}var cC=function(e){var t=e.sideCar,s=lC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return x.createElement(i,za({},s))};cC.isSideCarExport=!0;function vP(e,t){return e.useMedium(t),cC}var uC=gP(),uh=function(){},fd=x.forwardRef(function(e,t){var s=x.useRef(null),i=x.useState({onScrollCapture:uh,onWheelCapture:uh,onTouchMoveCapture:uh}),r=i[0],l=i[1],u=e.forwardProps,f=e.children,h=e.className,m=e.removeScrollBar,y=e.enabled,g=e.shards,b=e.sideCar,S=e.noRelative,C=e.noIsolation,T=e.inert,j=e.allowPinchZoom,E=e.as,A=E===void 0?"div":E,R=e.gapMode,_=lC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=b,z=mP([s,t]),D=za(za({},_),r);return x.createElement(x.Fragment,null,y&&x.createElement(M,{sideCar:uC,removeScrollBar:m,shards:g,noRelative:S,noIsolation:C,inert:T,setCallbacks:l,allowPinchZoom:!!j,lockRef:s,gapMode:R}),u?x.cloneElement(x.Children.only(f),za(za({},D),{ref:z})):x.createElement(A,za({},D,{className:h,ref:z}),f))});fd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fd.classNames={fullWidth:_u,zeroRight:Mu};var yP=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xP(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yP();return t&&e.setAttribute("nonce",t),e}function bP(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function SP(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var wP=function(){var e=0,t=null;return{add:function(s){e==0&&(t=xP())&&(bP(t,s),SP(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},CP=function(){var e=wP();return function(t,s){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&s])}},dC=function(){var e=CP(),t=function(s){var i=s.styles,r=s.dynamic;return e(i,r),null};return t},TP={left:0,top:0,right:0,gap:0},dh=function(e){return parseInt(e||"",10)||0},EP=function(e){var t=window.getComputedStyle(document.body),s=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[dh(s),dh(i),dh(r)]},jP=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return TP;var t=EP(e),s=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-s+t[2]-t[0])}},AP=dC(),Xo="data-scroll-locked",NP=function(e,t,s,i){var r=e.left,l=e.top,u=e.right,f=e.gap;return s===void 0&&(s="margin"),`
|
|
12
|
+
.`.concat(cP,` {
|
|
13
|
+
overflow: hidden `).concat(i,`;
|
|
14
|
+
padding-right: `).concat(f,"px ").concat(i,`;
|
|
15
|
+
}
|
|
16
|
+
body[`).concat(Xo,`] {
|
|
17
|
+
overflow: hidden `).concat(i,`;
|
|
18
|
+
overscroll-behavior: contain;
|
|
19
|
+
`).concat([t&&"position: relative ".concat(i,";"),s==="margin"&&`
|
|
20
|
+
padding-left: `.concat(r,`px;
|
|
21
|
+
padding-top: `).concat(l,`px;
|
|
22
|
+
padding-right: `).concat(u,`px;
|
|
23
|
+
margin-left:0;
|
|
24
|
+
margin-top:0;
|
|
25
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
26
|
+
`),s==="padding"&&"padding-right: ".concat(f,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.`).concat(Mu,` {
|
|
30
|
+
right: `).concat(f,"px ").concat(i,`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.`).concat(_u,` {
|
|
34
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.`).concat(Mu," .").concat(Mu,` {
|
|
38
|
+
right: 0 `).concat(i,`;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.`).concat(_u," .").concat(_u,` {
|
|
42
|
+
margin-right: 0 `).concat(i,`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
body[`).concat(Xo,`] {
|
|
46
|
+
`).concat(uP,": ").concat(f,`px;
|
|
47
|
+
}
|
|
48
|
+
`)},Z0=function(){var e=parseInt(document.body.getAttribute(Xo)||"0",10);return isFinite(e)?e:0},RP=function(){x.useEffect(function(){return document.body.setAttribute(Xo,(Z0()+1).toString()),function(){var e=Z0()-1;e<=0?document.body.removeAttribute(Xo):document.body.setAttribute(Xo,e.toString())}},[])},MP=function(e){var t=e.noRelative,s=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;RP();var l=x.useMemo(function(){return jP(r)},[r]);return x.createElement(AP,{styles:NP(l,!t,r,s?"":"!important")})},Gh=!1;if(typeof window<"u")try{var fu=Object.defineProperty({},"passive",{get:function(){return Gh=!0,!0}});window.addEventListener("test",fu,fu),window.removeEventListener("test",fu,fu)}catch{Gh=!1}var Bo=Gh?{passive:!1}:!1,_P=function(e){return e.tagName==="TEXTAREA"},fC=function(e,t){if(!(e instanceof Element))return!1;var s=window.getComputedStyle(e);return s[t]!=="hidden"&&!(s.overflowY===s.overflowX&&!_P(e)&&s[t]==="visible")},OP=function(e){return fC(e,"overflowY")},DP=function(e){return fC(e,"overflowX")},Q0=function(e,t){var s=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=mC(e,i);if(r){var l=hC(e,i),u=l[1],f=l[2];if(u>f)return!0}i=i.parentNode}while(i&&i!==s.body);return!1},PP=function(e){var t=e.scrollTop,s=e.scrollHeight,i=e.clientHeight;return[t,s,i]},kP=function(e){var t=e.scrollLeft,s=e.scrollWidth,i=e.clientWidth;return[t,s,i]},mC=function(e,t){return e==="v"?OP(t):DP(t)},hC=function(e,t){return e==="v"?PP(t):kP(t)},LP=function(e,t){return e==="h"&&t==="rtl"?-1:1},zP=function(e,t,s,i,r){var l=LP(e,window.getComputedStyle(t).direction),u=l*i,f=s.target,h=t.contains(f),m=!1,y=u>0,g=0,b=0;do{if(!f)break;var S=hC(e,f),C=S[0],T=S[1],j=S[2],E=T-j-l*C;(C||E)&&mC(e,f)&&(g+=E,b+=C);var A=f.parentNode;f=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!h&&f!==document.body||h&&(t.contains(f)||t===f));return(y&&Math.abs(g)<1||!y&&Math.abs(b)<1)&&(m=!0),m},mu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},W0=function(e){return[e.deltaX,e.deltaY]},J0=function(e){return e&&"current"in e?e.current:e},VP=function(e,t){return e[0]===t[0]&&e[1]===t[1]},BP=function(e){return`
|
|
49
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
50
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
51
|
+
`)},UP=0,Uo=[];function IP(e){var t=x.useRef([]),s=x.useRef([0,0]),i=x.useRef(),r=x.useState(UP++)[0],l=x.useState(dC)[0],u=x.useRef(e);x.useEffect(function(){u.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var T=lP([e.lockRef.current],(e.shards||[]).map(J0),!0).filter(Boolean);return T.forEach(function(j){return j.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),T.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var f=x.useCallback(function(T,j){if("touches"in T&&T.touches.length===2||T.type==="wheel"&&T.ctrlKey)return!u.current.allowPinchZoom;var E=mu(T),A=s.current,R="deltaX"in T?T.deltaX:A[0]-E[0],_="deltaY"in T?T.deltaY:A[1]-E[1],M,z=T.target,D=Math.abs(R)>Math.abs(_)?"h":"v";if("touches"in T&&D==="h"&&z.type==="range")return!1;var P=window.getSelection(),X=P&&P.anchorNode,Q=X?X===z||X.contains(z):!1;if(Q)return!1;var J=Q0(D,z);if(!J)return!0;if(J?M=D:(M=D==="v"?"h":"v",J=Q0(D,z)),!J)return!1;if(!i.current&&"changedTouches"in T&&(R||_)&&(i.current=M),!M)return!0;var te=i.current||M;return zP(te,j,T,te==="h"?R:_)},[]),h=x.useCallback(function(T){var j=T;if(!(!Uo.length||Uo[Uo.length-1]!==l)){var E="deltaY"in j?W0(j):mu(j),A=t.current.filter(function(M){return M.name===j.type&&(M.target===j.target||j.target===M.shadowParent)&&VP(M.delta,E)})[0];if(A&&A.should){j.cancelable&&j.preventDefault();return}if(!A){var R=(u.current.shards||[]).map(J0).filter(Boolean).filter(function(M){return M.contains(j.target)}),_=R.length>0?f(j,R[0]):!u.current.noIsolation;_&&j.cancelable&&j.preventDefault()}}},[]),m=x.useCallback(function(T,j,E,A){var R={name:T,delta:j,target:E,should:A,shadowParent:HP(E)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(_){return _!==R})},1)},[]),y=x.useCallback(function(T){s.current=mu(T),i.current=void 0},[]),g=x.useCallback(function(T){m(T.type,W0(T),T.target,f(T,e.lockRef.current))},[]),b=x.useCallback(function(T){m(T.type,mu(T),T.target,f(T,e.lockRef.current))},[]);x.useEffect(function(){return Uo.push(l),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:b}),document.addEventListener("wheel",h,Bo),document.addEventListener("touchmove",h,Bo),document.addEventListener("touchstart",y,Bo),function(){Uo=Uo.filter(function(T){return T!==l}),document.removeEventListener("wheel",h,Bo),document.removeEventListener("touchmove",h,Bo),document.removeEventListener("touchstart",y,Bo)}},[]);var S=e.removeScrollBar,C=e.inert;return x.createElement(x.Fragment,null,C?x.createElement(l,{styles:BP(r)}):null,S?x.createElement(MP,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function HP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const FP=vP(uC,IP);var ng=x.forwardRef(function(e,t){return x.createElement(fd,za({},e,{ref:t,sideCar:FP}))});ng.classNames=fd.classNames;var qP=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Io=new WeakMap,hu=new WeakMap,pu={},fh=0,pC=function(e){return e&&(e.host||pC(e.parentNode))},$P=function(e,t){return t.map(function(s){if(e.contains(s))return s;var i=pC(s);return i&&e.contains(i)?i:(console.error("aria-hidden",s,"in not contained inside",e,". Doing nothing"),null)}).filter(function(s){return!!s})},KP=function(e,t,s,i){var r=$P(t,Array.isArray(e)?e:[e]);pu[s]||(pu[s]=new WeakMap);var l=pu[s],u=[],f=new Set,h=new Set(r),m=function(g){!g||f.has(g)||(f.add(g),m(g.parentNode))};r.forEach(m);var y=function(g){!g||h.has(g)||Array.prototype.forEach.call(g.children,function(b){if(f.has(b))y(b);else try{var S=b.getAttribute(i),C=S!==null&&S!=="false",T=(Io.get(b)||0)+1,j=(l.get(b)||0)+1;Io.set(b,T),l.set(b,j),u.push(b),T===1&&C&&hu.set(b,!0),j===1&&b.setAttribute(s,"true"),C||b.setAttribute(i,"true")}catch(E){console.error("aria-hidden: cannot operate on ",b,E)}})};return y(t),f.clear(),fh++,function(){u.forEach(function(g){var b=Io.get(g)-1,S=l.get(g)-1;Io.set(g,b),l.set(g,S),b||(hu.has(g)||g.removeAttribute(i),hu.delete(g)),S||g.removeAttribute(s)}),fh--,fh||(Io=new WeakMap,Io=new WeakMap,hu=new WeakMap,pu={})}},gC=function(e,t,s){s===void 0&&(s="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=qP(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),KP(i,r,s,"aria-hidden")):function(){return null}};function GP(e){const t=YP(e),s=x.forwardRef((i,r)=>{const{children:l,...u}=i,f=x.Children.toArray(l),h=f.find(ZP);if(h){const m=h.props.children,y=f.map(g=>g===h?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:g);return d.jsx(t,{...u,ref:r,children:x.isValidElement(m)?x.cloneElement(m,void 0,y):null})}return d.jsx(t,{...u,ref:r,children:l})});return s.displayName=`${e}.Slot`,s}function YP(e){const t=x.forwardRef((s,i)=>{const{children:r,...l}=s;if(x.isValidElement(r)){const u=WP(r),f=QP(l,r.props);return r.type!==x.Fragment&&(f.ref=i?lr(i,u):u),x.cloneElement(r,f)}return x.Children.count(r)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var XP=Symbol("radix.slottable");function ZP(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===XP}function QP(e,t){const s={...t};for(const i in t){const r=e[i],l=t[i];/^on[A-Z]/.test(i)?r&&l?s[i]=(...f)=>{const h=l(...f);return r(...f),h}:r&&(s[i]=r):i==="style"?s[i]={...r,...l}:i==="className"&&(s[i]=[r,l].filter(Boolean).join(" "))}return{...e,...s}}function WP(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var md="Dialog",[vC]=eo(md),[JP,ja]=vC(md),yC=e=>{const{__scopeDialog:t,children:s,open:i,defaultOpen:r,onOpenChange:l,modal:u=!0}=e,f=x.useRef(null),h=x.useRef(null),[m,y]=Jo({prop:i,defaultProp:r??!1,onChange:l,caller:md});return d.jsx(JP,{scope:t,triggerRef:f,contentRef:h,contentId:Cs(),titleId:Cs(),descriptionId:Cs(),open:m,onOpenChange:y,onOpenToggle:x.useCallback(()=>y(g=>!g),[y]),modal:u,children:s})};yC.displayName=md;var xC="DialogTrigger",bC=x.forwardRef((e,t)=>{const{__scopeDialog:s,...i}=e,r=ja(xC,s),l=dt(t,r.triggerRef);return d.jsx(Fe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":ig(r.open),...i,ref:l,onClick:Pe(e.onClick,r.onOpenToggle)})});bC.displayName=xC;var ag="DialogPortal",[ek,SC]=vC(ag,{forceMount:void 0}),wC=e=>{const{__scopeDialog:t,forceMount:s,children:i,container:r}=e,l=ja(ag,t);return d.jsx(ek,{scope:t,forceMount:s,children:x.Children.map(i,u=>d.jsx(to,{present:s||l.open,children:d.jsx(dd,{asChild:!0,container:r,children:u})}))})};wC.displayName=ag;var Ku="DialogOverlay",CC=x.forwardRef((e,t)=>{const s=SC(Ku,e.__scopeDialog),{forceMount:i=s.forceMount,...r}=e,l=ja(Ku,e.__scopeDialog);return l.modal?d.jsx(to,{present:i||l.open,children:d.jsx(nk,{...r,ref:t})}):null});CC.displayName=Ku;var tk=GP("DialogOverlay.RemoveScroll"),nk=x.forwardRef((e,t)=>{const{__scopeDialog:s,...i}=e,r=ja(Ku,s);return d.jsx(ng,{as:tk,allowPinchZoom:!0,shards:[r.contentRef],children:d.jsx(Fe.div,{"data-state":ig(r.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),Yi="DialogContent",TC=x.forwardRef((e,t)=>{const s=SC(Yi,e.__scopeDialog),{forceMount:i=s.forceMount,...r}=e,l=ja(Yi,e.__scopeDialog);return d.jsx(to,{present:i||l.open,children:l.modal?d.jsx(ak,{...r,ref:t}):d.jsx(sk,{...r,ref:t})})});TC.displayName=Yi;var ak=x.forwardRef((e,t)=>{const s=ja(Yi,e.__scopeDialog),i=x.useRef(null),r=dt(t,s.contentRef,i);return x.useEffect(()=>{const l=i.current;if(l)return gC(l)},[]),d.jsx(EC,{...e,ref:r,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Pe(e.onCloseAutoFocus,l=>{l.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:Pe(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0;(u.button===2||f)&&l.preventDefault()}),onFocusOutside:Pe(e.onFocusOutside,l=>l.preventDefault())})}),sk=x.forwardRef((e,t)=>{const s=ja(Yi,e.__scopeDialog),i=x.useRef(!1),r=x.useRef(!1);return d.jsx(EC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(i.current||s.triggerRef.current?.focus(),l.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const u=l.target;s.triggerRef.current?.contains(u)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&r.current&&l.preventDefault()}})}),EC=x.forwardRef((e,t)=>{const{__scopeDialog:s,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:l,...u}=e,f=ja(Yi,s),h=x.useRef(null),m=dt(t,h);return rC(),d.jsxs(d.Fragment,{children:[d.jsx(tg,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:l,children:d.jsx(ud,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":ig(f.open),...u,ref:m,onDismiss:()=>f.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(ik,{titleId:f.titleId}),d.jsx(rk,{contentRef:h,descriptionId:f.descriptionId})]})]})}),sg="DialogTitle",jC=x.forwardRef((e,t)=>{const{__scopeDialog:s,...i}=e,r=ja(sg,s);return d.jsx(Fe.h2,{id:r.titleId,...i,ref:t})});jC.displayName=sg;var AC="DialogDescription",NC=x.forwardRef((e,t)=>{const{__scopeDialog:s,...i}=e,r=ja(AC,s);return d.jsx(Fe.p,{id:r.descriptionId,...i,ref:t})});NC.displayName=AC;var RC="DialogClose",MC=x.forwardRef((e,t)=>{const{__scopeDialog:s,...i}=e,r=ja(RC,s);return d.jsx(Fe.button,{type:"button",...i,ref:t,onClick:Pe(e.onClick,()=>r.onOpenChange(!1))})});MC.displayName=RC;function ig(e){return e?"open":"closed"}var _C="DialogTitleWarning",[j8,OC]=ND(_C,{contentName:Yi,titleName:sg,docsSlug:"dialog"}),ik=({titleId:e})=>{const t=OC(_C),s=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
52
|
+
|
|
53
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
54
|
+
|
|
55
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(s))},[s,e]),null},ok="DialogDescriptionWarning",rk=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${OC(ok).contentName}}.`;return x.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},DC=yC,PC=bC,kC=wC,LC=CC,zC=TC,VC=jC,lk=NC,BC=MC;function ck({...e}){return d.jsx(DC,{"data-slot":"sheet",...e})}function uk({...e}){return d.jsx(PC,{"data-slot":"sheet-trigger",...e})}function dk({...e}){return d.jsx(kC,{"data-slot":"sheet-portal",...e})}function fk({className:e,...t}){return d.jsx(LC,{"data-slot":"sheet-overlay",className:ce("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function mk({className:e,children:t,side:s="right",...i}){return d.jsxs(dk,{children:[d.jsx(fk,{}),d.jsxs(zC,{"data-slot":"sheet-content",className:ce("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",s==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",s==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",s==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",s==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...i,children:[t,d.jsxs(BC,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[d.jsx(Uw,{className:"size-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function hk({className:e,...t}){return d.jsx("div",{"data-slot":"sheet-header",className:ce("flex flex-col gap-1.5 p-4",e),...t})}function pk({className:e,...t}){return d.jsx(VC,{"data-slot":"sheet-title",className:ce("text-foreground font-semibold",e),...t})}function gk(e){try{globalThis.localStorage.setItem(Pw,e)}catch{}}const UC=x.createContext(null);function vk({children:e}){const[t,s]=x.useState(()=>kw()),i=x.useCallback(l=>{s(l)},[]);x.useEffect(()=>{gk(t)},[t]),x.useEffect(()=>{document.documentElement.lang=t,ct.changeLanguage(t)},[t]);const r=x.useMemo(()=>({locale:t,setLocale:i}),[t,i]);return d.jsx(UC.Provider,{value:r,children:e})}function yk(){const e=x.useContext(UC);if(!e)throw new Error("useLocalePreference must be used within LocalePreferenceProvider");return e}function eS(e,[t,s]){return Math.min(s,Math.max(t,e))}function tS(e){const t=xk(e),s=x.forwardRef((i,r)=>{const{children:l,...u}=i,f=x.Children.toArray(l),h=f.find(Sk);if(h){const m=h.props.children,y=f.map(g=>g===h?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:g);return d.jsx(t,{...u,ref:r,children:x.isValidElement(m)?x.cloneElement(m,void 0,y):null})}return d.jsx(t,{...u,ref:r,children:l})});return s.displayName=`${e}.Slot`,s}function xk(e){const t=x.forwardRef((s,i)=>{const{children:r,...l}=s;if(x.isValidElement(r)){const u=Ck(r),f=wk(l,r.props);return r.type!==x.Fragment&&(f.ref=i?lr(i,u):u),x.cloneElement(r,f)}return x.Children.count(r)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bk=Symbol("radix.slottable");function Sk(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bk}function wk(e,t){const s={...t};for(const i in t){const r=e[i],l=t[i];/^on[A-Z]/.test(i)?r&&l?s[i]=(...f)=>{const h=l(...f);return r(...f),h}:r&&(s[i]=r):i==="style"?s[i]={...r,...l}:i==="className"&&(s[i]=[r,l].filter(Boolean).join(" "))}return{...e,...s}}function Ck(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function IC(e){const t=e+"CollectionProvider",[s,i]=eo(t),[r,l]=s(t,{collectionRef:{current:null},itemMap:new Map}),u=T=>{const{scope:j,children:E}=T,A=ue.useRef(null),R=ue.useRef(new Map).current;return d.jsx(r,{scope:j,itemMap:R,collectionRef:A,children:E})};u.displayName=t;const f=e+"CollectionSlot",h=tS(f),m=ue.forwardRef((T,j)=>{const{scope:E,children:A}=T,R=l(f,E),_=dt(j,R.collectionRef);return d.jsx(h,{ref:_,children:A})});m.displayName=f;const y=e+"CollectionItemSlot",g="data-radix-collection-item",b=tS(y),S=ue.forwardRef((T,j)=>{const{scope:E,children:A,...R}=T,_=ue.useRef(null),M=dt(j,_),z=l(y,E);return ue.useEffect(()=>(z.itemMap.set(_,{ref:_,...R}),()=>{z.itemMap.delete(_)})),d.jsx(b,{[g]:"",ref:M,children:A})});S.displayName=y;function C(T){const j=l(e+"CollectionConsumer",T);return ue.useCallback(()=>{const A=j.collectionRef.current;if(!A)return[];const R=Array.from(A.querySelectorAll(`[${g}]`));return Array.from(j.itemMap.values()).sort((z,D)=>R.indexOf(z.ref.current)-R.indexOf(D.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:u,Slot:m,ItemSlot:S},C,i]}var Tk=x.createContext(void 0);function og(e){const t=x.useContext(Tk);return e||t||"ltr"}const Ek=["top","right","bottom","left"],ri=Math.min,Fn=Math.max,Gu=Math.round,gu=Math.floor,Ua=e=>({x:e,y:e}),jk={left:"right",right:"left",bottom:"top",top:"bottom"},Ak={start:"end",end:"start"};function Yh(e,t,s){return Fn(e,ri(t,s))}function Es(e,t){return typeof e=="function"?e(t):e}function js(e){return e.split("-")[0]}function cr(e){return e.split("-")[1]}function rg(e){return e==="x"?"y":"x"}function lg(e){return e==="y"?"height":"width"}const Nk=new Set(["top","bottom"]);function Ba(e){return Nk.has(js(e))?"y":"x"}function cg(e){return rg(Ba(e))}function Rk(e,t,s){s===void 0&&(s=!1);const i=cr(e),r=cg(e),l=lg(r);let u=r==="x"?i===(s?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=Yu(u)),[u,Yu(u)]}function Mk(e){const t=Yu(e);return[Xh(e),t,Xh(t)]}function Xh(e){return e.replace(/start|end/g,t=>Ak[t])}const nS=["left","right"],aS=["right","left"],_k=["top","bottom"],Ok=["bottom","top"];function Dk(e,t,s){switch(e){case"top":case"bottom":return s?t?aS:nS:t?nS:aS;case"left":case"right":return t?_k:Ok;default:return[]}}function Pk(e,t,s,i){const r=cr(e);let l=Dk(js(e),s==="start",i);return r&&(l=l.map(u=>u+"-"+r),t&&(l=l.concat(l.map(Xh)))),l}function Yu(e){return e.replace(/left|right|bottom|top/g,t=>jk[t])}function kk(e){return{top:0,right:0,bottom:0,left:0,...e}}function HC(e){return typeof e!="number"?kk(e):{top:e,right:e,bottom:e,left:e}}function Xu(e){const{x:t,y:s,width:i,height:r}=e;return{width:i,height:r,top:s,left:t,right:t+i,bottom:s+r,x:t,y:s}}function sS(e,t,s){let{reference:i,floating:r}=e;const l=Ba(t),u=cg(t),f=lg(u),h=js(t),m=l==="y",y=i.x+i.width/2-r.width/2,g=i.y+i.height/2-r.height/2,b=i[f]/2-r[f]/2;let S;switch(h){case"top":S={x:y,y:i.y-r.height};break;case"bottom":S={x:y,y:i.y+i.height};break;case"right":S={x:i.x+i.width,y:g};break;case"left":S={x:i.x-r.width,y:g};break;default:S={x:i.x,y:i.y}}switch(cr(t)){case"start":S[u]-=b*(s&&m?-1:1);break;case"end":S[u]+=b*(s&&m?-1:1);break}return S}const Lk=async(e,t,s)=>{const{placement:i="bottom",strategy:r="absolute",middleware:l=[],platform:u}=s,f=l.filter(Boolean),h=await(u.isRTL==null?void 0:u.isRTL(t));let m=await u.getElementRects({reference:e,floating:t,strategy:r}),{x:y,y:g}=sS(m,i,h),b=i,S={},C=0;for(let T=0;T<f.length;T++){const{name:j,fn:E}=f[T],{x:A,y:R,data:_,reset:M}=await E({x:y,y:g,initialPlacement:i,placement:b,strategy:r,middlewareData:S,rects:m,platform:u,elements:{reference:e,floating:t}});y=A??y,g=R??g,S={...S,[j]:{...S[j],..._}},M&&C<=50&&(C++,typeof M=="object"&&(M.placement&&(b=M.placement),M.rects&&(m=M.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:r}):M.rects),{x:y,y:g}=sS(m,b,h)),T=-1)}return{x:y,y:g,placement:b,strategy:r,middlewareData:S}};async function El(e,t){var s;t===void 0&&(t={});const{x:i,y:r,platform:l,rects:u,elements:f,strategy:h}=e,{boundary:m="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:b=!1,padding:S=0}=Es(t,e),C=HC(S),j=f[b?g==="floating"?"reference":"floating":g],E=Xu(await l.getClippingRect({element:(s=await(l.isElement==null?void 0:l.isElement(j)))==null||s?j:j.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:m,rootBoundary:y,strategy:h})),A=g==="floating"?{x:i,y:r,width:u.floating.width,height:u.floating.height}:u.reference,R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),_=await(l.isElement==null?void 0:l.isElement(R))?await(l.getScale==null?void 0:l.getScale(R))||{x:1,y:1}:{x:1,y:1},M=Xu(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:A,offsetParent:R,strategy:h}):A);return{top:(E.top-M.top+C.top)/_.y,bottom:(M.bottom-E.bottom+C.bottom)/_.y,left:(E.left-M.left+C.left)/_.x,right:(M.right-E.right+C.right)/_.x}}const zk=e=>({name:"arrow",options:e,async fn(t){const{x:s,y:i,placement:r,rects:l,platform:u,elements:f,middlewareData:h}=t,{element:m,padding:y=0}=Es(e,t)||{};if(m==null)return{};const g=HC(y),b={x:s,y:i},S=cg(r),C=lg(S),T=await u.getDimensions(m),j=S==="y",E=j?"top":"left",A=j?"bottom":"right",R=j?"clientHeight":"clientWidth",_=l.reference[C]+l.reference[S]-b[S]-l.floating[C],M=b[S]-l.reference[S],z=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let D=z?z[R]:0;(!D||!await(u.isElement==null?void 0:u.isElement(z)))&&(D=f.floating[R]||l.floating[C]);const P=_/2-M/2,X=D/2-T[C]/2-1,Q=ri(g[E],X),J=ri(g[A],X),te=Q,ne=D-T[C]-J,re=D/2-T[C]/2+P,de=Yh(te,re,ne),k=!h.arrow&&cr(r)!=null&&re!==de&&l.reference[C]/2-(re<te?Q:J)-T[C]/2<0,H=k?re<te?re-te:re-ne:0;return{[S]:b[S]+H,data:{[S]:de,centerOffset:re-de-H,...k&&{alignmentOffset:H}},reset:k}}}),Vk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var s,i;const{placement:r,middlewareData:l,rects:u,initialPlacement:f,platform:h,elements:m}=t,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:T=!0,...j}=Es(e,t);if((s=l.arrow)!=null&&s.alignmentOffset)return{};const E=js(r),A=Ba(f),R=js(f)===f,_=await(h.isRTL==null?void 0:h.isRTL(m.floating)),M=b||(R||!T?[Yu(f)]:Mk(f)),z=C!=="none";!b&&z&&M.push(...Pk(f,T,C,_));const D=[f,...M],P=await El(t,j),X=[];let Q=((i=l.flip)==null?void 0:i.overflows)||[];if(y&&X.push(P[E]),g){const re=Rk(r,u,_);X.push(P[re[0]],P[re[1]])}if(Q=[...Q,{placement:r,overflows:X}],!X.every(re=>re<=0)){var J,te;const re=(((J=l.flip)==null?void 0:J.index)||0)+1,de=D[re];if(de&&(!(g==="alignment"?A!==Ba(de):!1)||Q.every(B=>Ba(B.placement)===A?B.overflows[0]>0:!0)))return{data:{index:re,overflows:Q},reset:{placement:de}};let k=(te=Q.filter(H=>H.overflows[0]<=0).sort((H,B)=>H.overflows[1]-B.overflows[1])[0])==null?void 0:te.placement;if(!k)switch(S){case"bestFit":{var ne;const H=(ne=Q.filter(B=>{if(z){const le=Ba(B.placement);return le===A||le==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(le=>le>0).reduce((le,G)=>le+G,0)]).sort((B,le)=>B[1]-le[1])[0])==null?void 0:ne[0];H&&(k=H);break}case"initialPlacement":k=f;break}if(r!==k)return{reset:{placement:k}}}return{}}}};function iS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oS(e){return Ek.some(t=>e[t]>=0)}const Bk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s}=t,{strategy:i="referenceHidden",...r}=Es(e,t);switch(i){case"referenceHidden":{const l=await El(t,{...r,elementContext:"reference"}),u=iS(l,s.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:oS(u)}}}case"escaped":{const l=await El(t,{...r,altBoundary:!0}),u=iS(l,s.floating);return{data:{escapedOffsets:u,escaped:oS(u)}}}default:return{}}}}},FC=new Set(["left","top"]);async function Uk(e,t){const{placement:s,platform:i,elements:r}=e,l=await(i.isRTL==null?void 0:i.isRTL(r.floating)),u=js(s),f=cr(s),h=Ba(s)==="y",m=FC.has(u)?-1:1,y=l&&h?-1:1,g=Es(t,e);let{mainAxis:b,crossAxis:S,alignmentAxis:C}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof C=="number"&&(S=f==="end"?C*-1:C),h?{x:S*y,y:b*m}:{x:b*m,y:S*y}}const Ik=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var s,i;const{x:r,y:l,placement:u,middlewareData:f}=t,h=await Uk(t,e);return u===((s=f.offset)==null?void 0:s.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:r+h.x,y:l+h.y,data:{...h,placement:u}}}}},Hk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:s,y:i,placement:r}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:f={fn:j=>{let{x:E,y:A}=j;return{x:E,y:A}}},...h}=Es(e,t),m={x:s,y:i},y=await El(t,h),g=Ba(js(r)),b=rg(g);let S=m[b],C=m[g];if(l){const j=b==="y"?"top":"left",E=b==="y"?"bottom":"right",A=S+y[j],R=S-y[E];S=Yh(A,S,R)}if(u){const j=g==="y"?"top":"left",E=g==="y"?"bottom":"right",A=C+y[j],R=C-y[E];C=Yh(A,C,R)}const T=f.fn({...t,[b]:S,[g]:C});return{...T,data:{x:T.x-s,y:T.y-i,enabled:{[b]:l,[g]:u}}}}}},Fk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:s,y:i,placement:r,rects:l,middlewareData:u}=t,{offset:f=0,mainAxis:h=!0,crossAxis:m=!0}=Es(e,t),y={x:s,y:i},g=Ba(r),b=rg(g);let S=y[b],C=y[g];const T=Es(f,t),j=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:0,crossAxis:0,...T};if(h){const R=b==="y"?"height":"width",_=l.reference[b]-l.floating[R]+j.mainAxis,M=l.reference[b]+l.reference[R]-j.mainAxis;S<_?S=_:S>M&&(S=M)}if(m){var E,A;const R=b==="y"?"width":"height",_=FC.has(js(r)),M=l.reference[g]-l.floating[R]+(_&&((E=u.offset)==null?void 0:E[g])||0)+(_?0:j.crossAxis),z=l.reference[g]+l.reference[R]+(_?0:((A=u.offset)==null?void 0:A[g])||0)-(_?j.crossAxis:0);C<M?C=M:C>z&&(C=z)}return{[b]:S,[g]:C}}}},qk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var s,i;const{placement:r,rects:l,platform:u,elements:f}=t,{apply:h=()=>{},...m}=Es(e,t),y=await El(t,m),g=js(r),b=cr(r),S=Ba(r)==="y",{width:C,height:T}=l.floating;let j,E;g==="top"||g==="bottom"?(j=g,E=b===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(E=g,j=b==="end"?"top":"bottom");const A=T-y.top-y.bottom,R=C-y.left-y.right,_=ri(T-y[j],A),M=ri(C-y[E],R),z=!t.middlewareData.shift;let D=_,P=M;if((s=t.middlewareData.shift)!=null&&s.enabled.x&&(P=R),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(D=A),z&&!b){const Q=Fn(y.left,0),J=Fn(y.right,0),te=Fn(y.top,0),ne=Fn(y.bottom,0);S?P=C-2*(Q!==0||J!==0?Q+J:Fn(y.left,y.right)):D=T-2*(te!==0||ne!==0?te+ne:Fn(y.top,y.bottom))}await h({...t,availableWidth:P,availableHeight:D});const X=await u.getDimensions(f.floating);return C!==X.width||T!==X.height?{reset:{rects:!0}}:{}}}};function hd(){return typeof window<"u"}function ur(e){return qC(e)?(e.nodeName||"").toLowerCase():"#document"}function qn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ga(e){var t;return(t=(qC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qC(e){return hd()?e instanceof Node||e instanceof qn(e).Node:!1}function Ca(e){return hd()?e instanceof Element||e instanceof qn(e).Element:!1}function $a(e){return hd()?e instanceof HTMLElement||e instanceof qn(e).HTMLElement:!1}function rS(e){return!hd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qn(e).ShadowRoot}const $k=new Set(["inline","contents"]);function Bl(e){const{overflow:t,overflowX:s,overflowY:i,display:r}=Ta(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+s)&&!$k.has(r)}const Kk=new Set(["table","td","th"]);function Gk(e){return Kk.has(ur(e))}const Yk=[":popover-open",":modal"];function pd(e){return Yk.some(t=>{try{return e.matches(t)}catch{return!1}})}const Xk=["transform","translate","scale","rotate","perspective"],Zk=["transform","translate","scale","rotate","perspective","filter"],Qk=["paint","layout","strict","content"];function ug(e){const t=dg(),s=Ca(e)?Ta(e):e;return Xk.some(i=>s[i]?s[i]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!t&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!t&&(s.filter?s.filter!=="none":!1)||Zk.some(i=>(s.willChange||"").includes(i))||Qk.some(i=>(s.contain||"").includes(i))}function Wk(e){let t=li(e);for(;$a(t)&&!er(t);){if(ug(t))return t;if(pd(t))return null;t=li(t)}return null}function dg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Jk=new Set(["html","body","#document"]);function er(e){return Jk.has(ur(e))}function Ta(e){return qn(e).getComputedStyle(e)}function gd(e){return Ca(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function li(e){if(ur(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rS(e)&&e.host||Ga(e);return rS(t)?t.host:t}function $C(e){const t=li(e);return er(t)?e.ownerDocument?e.ownerDocument.body:e.body:$a(t)&&Bl(t)?t:$C(t)}function jl(e,t,s){var i;t===void 0&&(t=[]),s===void 0&&(s=!0);const r=$C(e),l=r===((i=e.ownerDocument)==null?void 0:i.body),u=qn(r);if(l){const f=Zh(u);return t.concat(u,u.visualViewport||[],Bl(r)?r:[],f&&s?jl(f):[])}return t.concat(r,jl(r,[],s))}function Zh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function KC(e){const t=Ta(e);let s=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=$a(e),l=r?e.offsetWidth:s,u=r?e.offsetHeight:i,f=Gu(s)!==l||Gu(i)!==u;return f&&(s=l,i=u),{width:s,height:i,$:f}}function fg(e){return Ca(e)?e:e.contextElement}function Zo(e){const t=fg(e);if(!$a(t))return Ua(1);const s=t.getBoundingClientRect(),{width:i,height:r,$:l}=KC(t);let u=(l?Gu(s.width):s.width)/i,f=(l?Gu(s.height):s.height)/r;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const eL=Ua(0);function GC(e){const t=qn(e);return!dg()||!t.visualViewport?eL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tL(e,t,s){return t===void 0&&(t=!1),!s||t&&s!==qn(e)?!1:t}function Xi(e,t,s,i){t===void 0&&(t=!1),s===void 0&&(s=!1);const r=e.getBoundingClientRect(),l=fg(e);let u=Ua(1);t&&(i?Ca(i)&&(u=Zo(i)):u=Zo(e));const f=tL(l,s,i)?GC(l):Ua(0);let h=(r.left+f.x)/u.x,m=(r.top+f.y)/u.y,y=r.width/u.x,g=r.height/u.y;if(l){const b=qn(l),S=i&&Ca(i)?qn(i):i;let C=b,T=Zh(C);for(;T&&i&&S!==C;){const j=Zo(T),E=T.getBoundingClientRect(),A=Ta(T),R=E.left+(T.clientLeft+parseFloat(A.paddingLeft))*j.x,_=E.top+(T.clientTop+parseFloat(A.paddingTop))*j.y;h*=j.x,m*=j.y,y*=j.x,g*=j.y,h+=R,m+=_,C=qn(T),T=Zh(C)}}return Xu({width:y,height:g,x:h,y:m})}function vd(e,t){const s=gd(e).scrollLeft;return t?t.left+s:Xi(Ga(e)).left+s}function YC(e,t){const s=e.getBoundingClientRect(),i=s.left+t.scrollLeft-vd(e,s),r=s.top+t.scrollTop;return{x:i,y:r}}function nL(e){let{elements:t,rect:s,offsetParent:i,strategy:r}=e;const l=r==="fixed",u=Ga(i),f=t?pd(t.floating):!1;if(i===u||f&&l)return s;let h={scrollLeft:0,scrollTop:0},m=Ua(1);const y=Ua(0),g=$a(i);if((g||!g&&!l)&&((ur(i)!=="body"||Bl(u))&&(h=gd(i)),$a(i))){const S=Xi(i);m=Zo(i),y.x=S.x+i.clientLeft,y.y=S.y+i.clientTop}const b=u&&!g&&!l?YC(u,h):Ua(0);return{width:s.width*m.x,height:s.height*m.y,x:s.x*m.x-h.scrollLeft*m.x+y.x+b.x,y:s.y*m.y-h.scrollTop*m.y+y.y+b.y}}function aL(e){return Array.from(e.getClientRects())}function sL(e){const t=Ga(e),s=gd(e),i=e.ownerDocument.body,r=Fn(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=Fn(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let u=-s.scrollLeft+vd(e);const f=-s.scrollTop;return Ta(i).direction==="rtl"&&(u+=Fn(t.clientWidth,i.clientWidth)-r),{width:r,height:l,x:u,y:f}}const lS=25;function iL(e,t){const s=qn(e),i=Ga(e),r=s.visualViewport;let l=i.clientWidth,u=i.clientHeight,f=0,h=0;if(r){l=r.width,u=r.height;const y=dg();(!y||y&&t==="fixed")&&(f=r.offsetLeft,h=r.offsetTop)}const m=vd(i);if(m<=0){const y=i.ownerDocument,g=y.body,b=getComputedStyle(g),S=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,C=Math.abs(i.clientWidth-g.clientWidth-S);C<=lS&&(l-=C)}else m<=lS&&(l+=m);return{width:l,height:u,x:f,y:h}}const oL=new Set(["absolute","fixed"]);function rL(e,t){const s=Xi(e,!0,t==="fixed"),i=s.top+e.clientTop,r=s.left+e.clientLeft,l=$a(e)?Zo(e):Ua(1),u=e.clientWidth*l.x,f=e.clientHeight*l.y,h=r*l.x,m=i*l.y;return{width:u,height:f,x:h,y:m}}function cS(e,t,s){let i;if(t==="viewport")i=iL(e,s);else if(t==="document")i=sL(Ga(e));else if(Ca(t))i=rL(t,s);else{const r=GC(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Xu(i)}function XC(e,t){const s=li(e);return s===t||!Ca(s)||er(s)?!1:Ta(s).position==="fixed"||XC(s,t)}function lL(e,t){const s=t.get(e);if(s)return s;let i=jl(e,[],!1).filter(f=>Ca(f)&&ur(f)!=="body"),r=null;const l=Ta(e).position==="fixed";let u=l?li(e):e;for(;Ca(u)&&!er(u);){const f=Ta(u),h=ug(u);!h&&f.position==="fixed"&&(r=null),(l?!h&&!r:!h&&f.position==="static"&&!!r&&oL.has(r.position)||Bl(u)&&!h&&XC(e,u))?i=i.filter(y=>y!==u):r=f,u=li(u)}return t.set(e,i),i}function cL(e){let{element:t,boundary:s,rootBoundary:i,strategy:r}=e;const u=[...s==="clippingAncestors"?pd(t)?[]:lL(t,this._c):[].concat(s),i],f=u[0],h=u.reduce((m,y)=>{const g=cS(t,y,r);return m.top=Fn(g.top,m.top),m.right=ri(g.right,m.right),m.bottom=ri(g.bottom,m.bottom),m.left=Fn(g.left,m.left),m},cS(t,f,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function uL(e){const{width:t,height:s}=KC(e);return{width:t,height:s}}function dL(e,t,s){const i=$a(t),r=Ga(t),l=s==="fixed",u=Xi(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const h=Ua(0);function m(){h.x=vd(r)}if(i||!i&&!l)if((ur(t)!=="body"||Bl(r))&&(f=gd(t)),i){const S=Xi(t,!0,l,t);h.x=S.x+t.clientLeft,h.y=S.y+t.clientTop}else r&&m();l&&!i&&r&&m();const y=r&&!i&&!l?YC(r,f):Ua(0),g=u.left+f.scrollLeft-h.x-y.x,b=u.top+f.scrollTop-h.y-y.y;return{x:g,y:b,width:u.width,height:u.height}}function mh(e){return Ta(e).position==="static"}function uS(e,t){if(!$a(e)||Ta(e).position==="fixed")return null;if(t)return t(e);let s=e.offsetParent;return Ga(e)===s&&(s=s.ownerDocument.body),s}function ZC(e,t){const s=qn(e);if(pd(e))return s;if(!$a(e)){let r=li(e);for(;r&&!er(r);){if(Ca(r)&&!mh(r))return r;r=li(r)}return s}let i=uS(e,t);for(;i&&Gk(i)&&mh(i);)i=uS(i,t);return i&&er(i)&&mh(i)&&!ug(i)?s:i||Wk(e)||s}const fL=async function(e){const t=this.getOffsetParent||ZC,s=this.getDimensions,i=await s(e.floating);return{reference:dL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function mL(e){return Ta(e).direction==="rtl"}const hL={convertOffsetParentRelativeRectToViewportRelativeRect:nL,getDocumentElement:Ga,getClippingRect:cL,getOffsetParent:ZC,getElementRects:fL,getClientRects:aL,getDimensions:uL,getScale:Zo,isElement:Ca,isRTL:mL};function QC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pL(e,t){let s=null,i;const r=Ga(e);function l(){var f;clearTimeout(i),(f=s)==null||f.disconnect(),s=null}function u(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),l();const m=e.getBoundingClientRect(),{left:y,top:g,width:b,height:S}=m;if(f||t(),!b||!S)return;const C=gu(g),T=gu(r.clientWidth-(y+b)),j=gu(r.clientHeight-(g+S)),E=gu(y),R={rootMargin:-C+"px "+-T+"px "+-j+"px "+-E+"px",threshold:Fn(0,ri(1,h))||1};let _=!0;function M(z){const D=z[0].intersectionRatio;if(D!==h){if(!_)return u();D?u(!1,D):i=setTimeout(()=>{u(!1,1e-7)},1e3)}D===1&&!QC(m,e.getBoundingClientRect())&&u(),_=!1}try{s=new IntersectionObserver(M,{...R,root:r.ownerDocument})}catch{s=new IntersectionObserver(M,R)}s.observe(e)}return u(!0),l}function gL(e,t,s,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,m=fg(e),y=r||l?[...m?jl(m):[],...jl(t)]:[];y.forEach(E=>{r&&E.addEventListener("scroll",s,{passive:!0}),l&&E.addEventListener("resize",s)});const g=m&&f?pL(m,s):null;let b=-1,S=null;u&&(S=new ResizeObserver(E=>{let[A]=E;A&&A.target===m&&S&&(S.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var R;(R=S)==null||R.observe(t)})),s()}),m&&!h&&S.observe(m),S.observe(t));let C,T=h?Xi(e):null;h&&j();function j(){const E=Xi(e);T&&!QC(T,E)&&s(),T=E,C=requestAnimationFrame(j)}return s(),()=>{var E;y.forEach(A=>{r&&A.removeEventListener("scroll",s),l&&A.removeEventListener("resize",s)}),g?.(),(E=S)==null||E.disconnect(),S=null,h&&cancelAnimationFrame(C)}}const vL=Ik,yL=Hk,xL=Vk,bL=qk,SL=Bk,dS=zk,wL=Fk,CL=(e,t,s)=>{const i=new Map,r={platform:hL,...s},l={...r.platform,_c:i};return Lk(e,t,{...r,platform:l})};var TL=typeof document<"u",EL=function(){},Ou=TL?x.useLayoutEffect:EL;function Zu(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 s,i,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(s=e.length,s!==t.length)return!1;for(i=s;i--!==0;)if(!Zu(e[i],t[i]))return!1;return!0}if(r=Object.keys(e),s=r.length,s!==Object.keys(t).length)return!1;for(i=s;i--!==0;)if(!{}.hasOwnProperty.call(t,r[i]))return!1;for(i=s;i--!==0;){const l=r[i];if(!(l==="_owner"&&e.$$typeof)&&!Zu(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function WC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fS(e,t){const s=WC(e);return Math.round(t*s)/s}function hh(e){const t=x.useRef(e);return Ou(()=>{t.current=e}),t}function jL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:s="absolute",middleware:i=[],platform:r,elements:{reference:l,floating:u}={},transform:f=!0,whileElementsMounted:h,open:m}=e,[y,g]=x.useState({x:0,y:0,strategy:s,placement:t,middlewareData:{},isPositioned:!1}),[b,S]=x.useState(i);Zu(b,i)||S(i);const[C,T]=x.useState(null),[j,E]=x.useState(null),A=x.useCallback(B=>{B!==z.current&&(z.current=B,T(B))},[]),R=x.useCallback(B=>{B!==D.current&&(D.current=B,E(B))},[]),_=l||C,M=u||j,z=x.useRef(null),D=x.useRef(null),P=x.useRef(y),X=h!=null,Q=hh(h),J=hh(r),te=hh(m),ne=x.useCallback(()=>{if(!z.current||!D.current)return;const B={placement:t,strategy:s,middleware:b};J.current&&(B.platform=J.current),CL(z.current,D.current,B).then(le=>{const G={...le,isPositioned:te.current!==!1};re.current&&!Zu(P.current,G)&&(P.current=G,Vl.flushSync(()=>{g(G)}))})},[b,t,s,J,te]);Ou(()=>{m===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,g(B=>({...B,isPositioned:!1})))},[m]);const re=x.useRef(!1);Ou(()=>(re.current=!0,()=>{re.current=!1}),[]),Ou(()=>{if(_&&(z.current=_),M&&(D.current=M),_&&M){if(Q.current)return Q.current(_,M,ne);ne()}},[_,M,ne,Q,X]);const de=x.useMemo(()=>({reference:z,floating:D,setReference:A,setFloating:R}),[A,R]),k=x.useMemo(()=>({reference:_,floating:M}),[_,M]),H=x.useMemo(()=>{const B={position:s,left:0,top:0};if(!k.floating)return B;const le=fS(k.floating,y.x),G=fS(k.floating,y.y);return f?{...B,transform:"translate("+le+"px, "+G+"px)",...WC(k.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:le,top:G}},[s,f,k.floating,y.x,y.y]);return x.useMemo(()=>({...y,update:ne,refs:de,elements:k,floatingStyles:H}),[y,ne,de,k,H])}const AL=e=>{function t(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:e,fn(s){const{element:i,padding:r}=typeof e=="function"?e(s):e;return i&&t(i)?i.current!=null?dS({element:i.current,padding:r}).fn(s):{}:i?dS({element:i,padding:r}).fn(s):{}}}},NL=(e,t)=>({...vL(e),options:[e,t]}),RL=(e,t)=>({...yL(e),options:[e,t]}),ML=(e,t)=>({...wL(e),options:[e,t]}),_L=(e,t)=>({...xL(e),options:[e,t]}),OL=(e,t)=>({...bL(e),options:[e,t]}),DL=(e,t)=>({...SL(e),options:[e,t]}),PL=(e,t)=>({...AL(e),options:[e,t]});var kL="Arrow",JC=x.forwardRef((e,t)=>{const{children:s,width:i=10,height:r=5,...l}=e;return d.jsx(Fe.svg,{...l,ref:t,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});JC.displayName=kL;var LL=JC;function zL(e){const[t,s]=x.useState(void 0);return on(()=>{if(e){s({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const l=r[0];let u,f;if("borderBoxSize"in l){const h=l.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,f=m.blockSize}else u=e.offsetWidth,f=e.offsetHeight;s({width:u,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else s(void 0)},[e]),t}var mg="Popper",[eT,yd]=eo(mg),[VL,tT]=eT(mg),nT=e=>{const{__scopePopper:t,children:s}=e,[i,r]=x.useState(null);return d.jsx(VL,{scope:t,anchor:i,onAnchorChange:r,children:s})};nT.displayName=mg;var aT="PopperAnchor",sT=x.forwardRef((e,t)=>{const{__scopePopper:s,virtualRef:i,...r}=e,l=tT(aT,s),u=x.useRef(null),f=dt(t,u),h=x.useRef(null);return x.useEffect(()=>{const m=h.current;h.current=i?.current||u.current,m!==h.current&&l.onAnchorChange(h.current)}),i?null:d.jsx(Fe.div,{...r,ref:f})});sT.displayName=aT;var hg="PopperContent",[BL,UL]=eT(hg),iT=x.forwardRef((e,t)=>{const{__scopePopper:s,side:i="bottom",sideOffset:r=0,align:l="center",alignOffset:u=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:y=0,sticky:g="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:C,...T}=e,j=tT(hg,s),[E,A]=x.useState(null),R=dt(t,K=>A(K)),[_,M]=x.useState(null),z=zL(_),D=z?.width??0,P=z?.height??0,X=i+(l!=="center"?"-"+l:""),Q=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},J=Array.isArray(m)?m:[m],te=J.length>0,ne={padding:Q,boundary:J.filter(HL),altBoundary:te},{refs:re,floatingStyles:de,placement:k,isPositioned:H,middlewareData:B}=jL({strategy:"fixed",placement:X,whileElementsMounted:(...K)=>gL(...K,{animationFrame:S==="always"}),elements:{reference:j.anchor},middleware:[NL({mainAxis:r+P,alignmentAxis:u}),h&&RL({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?ML():void 0,...ne}),h&&_L({...ne}),OL({...ne,apply:({elements:K,rects:ie,availableWidth:me,availableHeight:be})=>{const{width:je,height:Ae}=ie.reference,xt=K.floating.style;xt.setProperty("--radix-popper-available-width",`${me}px`),xt.setProperty("--radix-popper-available-height",`${be}px`),xt.setProperty("--radix-popper-anchor-width",`${je}px`),xt.setProperty("--radix-popper-anchor-height",`${Ae}px`)}}),_&&PL({element:_,padding:f}),FL({arrowWidth:D,arrowHeight:P}),b&&DL({strategy:"referenceHidden",...ne})]}),[le,G]=lT(k),O=oi(C);on(()=>{H&&O?.()},[H,O]);const V=B.arrow?.x,I=B.arrow?.y,W=B.arrow?.centerOffset!==0,[oe,fe]=x.useState();return on(()=>{E&&fe(window.getComputedStyle(E).zIndex)},[E]),d.jsx("div",{ref:re.setFloating,"data-radix-popper-content-wrapper":"",style:{...de,transform:H?de.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(BL,{scope:s,placedSide:le,onArrowChange:M,arrowX:V,arrowY:I,shouldHideArrow:W,children:d.jsx(Fe.div,{"data-side":le,"data-align":G,...T,ref:R,style:{...T.style,animation:H?void 0:"none"}})})})});iT.displayName=hg;var oT="PopperArrow",IL={top:"bottom",right:"left",bottom:"top",left:"right"},rT=x.forwardRef(function(t,s){const{__scopePopper:i,...r}=t,l=UL(oT,i),u=IL[l.placedSide];return d.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:d.jsx(LL,{...r,ref:s,style:{...r.style,display:"block"}})})});rT.displayName=oT;function HL(e){return e!==null}var FL=e=>({name:"transformOrigin",options:e,fn(t){const{placement:s,rects:i,middlewareData:r}=t,u=r.arrow?.centerOffset!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[m,y]=lT(s),g={start:"0%",center:"50%",end:"100%"}[y],b=(r.arrow?.x??0)+f/2,S=(r.arrow?.y??0)+h/2;let C="",T="";return m==="bottom"?(C=u?g:`${b}px`,T=`${-h}px`):m==="top"?(C=u?g:`${b}px`,T=`${i.floating.height+h}px`):m==="right"?(C=`${-h}px`,T=u?g:`${S}px`):m==="left"&&(C=`${i.floating.width+h}px`,T=u?g:`${S}px`),{data:{x:C,y:T}}}});function lT(e){const[t,s="center"]=e.split("-");return[t,s]}var cT=nT,uT=sT,dT=iT,fT=rT;function qL(e){const t=$L(e),s=x.forwardRef((i,r)=>{const{children:l,...u}=i,f=x.Children.toArray(l),h=f.find(GL);if(h){const m=h.props.children,y=f.map(g=>g===h?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:g);return d.jsx(t,{...u,ref:r,children:x.isValidElement(m)?x.cloneElement(m,void 0,y):null})}return d.jsx(t,{...u,ref:r,children:l})});return s.displayName=`${e}.Slot`,s}function $L(e){const t=x.forwardRef((s,i)=>{const{children:r,...l}=s;if(x.isValidElement(r)){const u=XL(r),f=YL(l,r.props);return r.type!==x.Fragment&&(f.ref=i?lr(i,u):u),x.cloneElement(r,f)}return x.Children.count(r)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var KL=Symbol("radix.slottable");function GL(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===KL}function YL(e,t){const s={...t};for(const i in t){const r=e[i],l=t[i];/^on[A-Z]/.test(i)?r&&l?s[i]=(...f)=>{const h=l(...f);return r(...f),h}:r&&(s[i]=r):i==="style"?s[i]={...r,...l}:i==="className"&&(s[i]=[r,l].filter(Boolean).join(" "))}return{...e,...s}}function XL(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function ZL(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var mT=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),QL="VisuallyHidden",hT=x.forwardRef((e,t)=>d.jsx(Fe.span,{...e,ref:t,style:{...mT,...e.style}}));hT.displayName=QL;var WL=hT,JL=[" ","Enter","ArrowUp","ArrowDown"],e4=[" ","Enter"],Zi="Select",[xd,bd,t4]=IC(Zi),[dr]=eo(Zi,[t4,yd]),Sd=yd(),[n4,di]=dr(Zi),[a4,s4]=dr(Zi),pT=e=>{const{__scopeSelect:t,children:s,open:i,defaultOpen:r,onOpenChange:l,value:u,defaultValue:f,onValueChange:h,dir:m,name:y,autoComplete:g,disabled:b,required:S,form:C}=e,T=Sd(t),[j,E]=x.useState(null),[A,R]=x.useState(null),[_,M]=x.useState(!1),z=og(m),[D,P]=Jo({prop:i,defaultProp:r??!1,onChange:l,caller:Zi}),[X,Q]=Jo({prop:u,defaultProp:f,onChange:h,caller:Zi}),J=x.useRef(null),te=j?C||!!j.closest("form"):!0,[ne,re]=x.useState(new Set),de=Array.from(ne).map(k=>k.props.value).join(";");return d.jsx(cT,{...T,children:d.jsxs(n4,{required:S,scope:t,trigger:j,onTriggerChange:E,valueNode:A,onValueNodeChange:R,valueNodeHasChildren:_,onValueNodeHasChildrenChange:M,contentId:Cs(),value:X,onValueChange:Q,open:D,onOpenChange:P,dir:z,triggerPointerDownPosRef:J,disabled:b,children:[d.jsx(xd.Provider,{scope:t,children:d.jsx(a4,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(k=>{re(H=>new Set(H).add(k))},[]),onNativeOptionRemove:x.useCallback(k=>{re(H=>{const B=new Set(H);return B.delete(k),B})},[]),children:s})}),te?d.jsxs(zT,{"aria-hidden":!0,required:S,tabIndex:-1,name:y,autoComplete:g,value:X,onChange:k=>Q(k.target.value),disabled:b,form:C,children:[X===void 0?d.jsx("option",{value:""}):null,Array.from(ne)]},de):null]})})};pT.displayName=Zi;var gT="SelectTrigger",vT=x.forwardRef((e,t)=>{const{__scopeSelect:s,disabled:i=!1,...r}=e,l=Sd(s),u=di(gT,s),f=u.disabled||i,h=dt(t,u.onTriggerChange),m=bd(s),y=x.useRef("touch"),[g,b,S]=BT(T=>{const j=m().filter(R=>!R.disabled),E=j.find(R=>R.value===u.value),A=UT(j,T,E);A!==void 0&&u.onValueChange(A.value)}),C=T=>{f||(u.onOpenChange(!0),S()),T&&(u.triggerPointerDownPosRef.current={x:Math.round(T.pageX),y:Math.round(T.pageY)})};return d.jsx(uT,{asChild:!0,...l,children:d.jsx(Fe.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":VT(u.value)?"":void 0,...r,ref:h,onClick:Pe(r.onClick,T=>{T.currentTarget.focus(),y.current!=="mouse"&&C(T)}),onPointerDown:Pe(r.onPointerDown,T=>{y.current=T.pointerType;const j=T.target;j.hasPointerCapture(T.pointerId)&&j.releasePointerCapture(T.pointerId),T.button===0&&T.ctrlKey===!1&&T.pointerType==="mouse"&&(C(T),T.preventDefault())}),onKeyDown:Pe(r.onKeyDown,T=>{const j=g.current!=="";!(T.ctrlKey||T.altKey||T.metaKey)&&T.key.length===1&&b(T.key),!(j&&T.key===" ")&&JL.includes(T.key)&&(C(),T.preventDefault())})})})});vT.displayName=gT;var yT="SelectValue",xT=x.forwardRef((e,t)=>{const{__scopeSelect:s,className:i,style:r,children:l,placeholder:u="",...f}=e,h=di(yT,s),{onValueNodeHasChildrenChange:m}=h,y=l!==void 0,g=dt(t,h.onValueNodeChange);return on(()=>{m(y)},[m,y]),d.jsx(Fe.span,{...f,ref:g,style:{pointerEvents:"none"},children:VT(h.value)?d.jsx(d.Fragment,{children:u}):l})});xT.displayName=yT;var i4="SelectIcon",bT=x.forwardRef((e,t)=>{const{__scopeSelect:s,children:i,...r}=e;return d.jsx(Fe.span,{"aria-hidden":!0,...r,ref:t,children:i||"▼"})});bT.displayName=i4;var o4="SelectPortal",ST=e=>d.jsx(dd,{asChild:!0,...e});ST.displayName=o4;var Qi="SelectContent",wT=x.forwardRef((e,t)=>{const s=di(Qi,e.__scopeSelect),[i,r]=x.useState();if(on(()=>{r(new DocumentFragment)},[]),!s.open){const l=i;return l?Vl.createPortal(d.jsx(CT,{scope:e.__scopeSelect,children:d.jsx(xd.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),l):null}return d.jsx(TT,{...e,ref:t})});wT.displayName=Qi;var ya=10,[CT,fi]=dr(Qi),r4="SelectContentImpl",l4=qL("SelectContent.RemoveScroll"),TT=x.forwardRef((e,t)=>{const{__scopeSelect:s,position:i="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:l,onPointerDownOutside:u,side:f,sideOffset:h,align:m,alignOffset:y,arrowPadding:g,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:T,avoidCollisions:j,...E}=e,A=di(Qi,s),[R,_]=x.useState(null),[M,z]=x.useState(null),D=dt(t,K=>_(K)),[P,X]=x.useState(null),[Q,J]=x.useState(null),te=bd(s),[ne,re]=x.useState(!1),de=x.useRef(!1);x.useEffect(()=>{if(R)return gC(R)},[R]),rC();const k=x.useCallback(K=>{const[ie,...me]=te().map(Ae=>Ae.ref.current),[be]=me.slice(-1),je=document.activeElement;for(const Ae of K)if(Ae===je||(Ae?.scrollIntoView({block:"nearest"}),Ae===ie&&M&&(M.scrollTop=0),Ae===be&&M&&(M.scrollTop=M.scrollHeight),Ae?.focus(),document.activeElement!==je))return},[te,M]),H=x.useCallback(()=>k([P,R]),[k,P,R]);x.useEffect(()=>{ne&&H()},[ne,H]);const{onOpenChange:B,triggerPointerDownPosRef:le}=A;x.useEffect(()=>{if(R){let K={x:0,y:0};const ie=be=>{K={x:Math.abs(Math.round(be.pageX)-(le.current?.x??0)),y:Math.abs(Math.round(be.pageY)-(le.current?.y??0))}},me=be=>{K.x<=10&&K.y<=10?be.preventDefault():R.contains(be.target)||B(!1),document.removeEventListener("pointermove",ie),le.current=null};return le.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",me,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",me,{capture:!0})}}},[R,B,le]),x.useEffect(()=>{const K=()=>B(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[B]);const[G,O]=BT(K=>{const ie=te().filter(je=>!je.disabled),me=ie.find(je=>je.ref.current===document.activeElement),be=UT(ie,K,me);be&&setTimeout(()=>be.ref.current.focus())}),V=x.useCallback((K,ie,me)=>{const be=!de.current&&!me;(A.value!==void 0&&A.value===ie||be)&&(X(K),be&&(de.current=!0))},[A.value]),I=x.useCallback(()=>R?.focus(),[R]),W=x.useCallback((K,ie,me)=>{const be=!de.current&&!me;(A.value!==void 0&&A.value===ie||be)&&J(K)},[A.value]),oe=i==="popper"?Qh:ET,fe=oe===Qh?{side:f,sideOffset:h,align:m,alignOffset:y,arrowPadding:g,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:T,avoidCollisions:j}:{};return d.jsx(CT,{scope:s,content:R,viewport:M,onViewportChange:z,itemRefCallback:V,selectedItem:P,onItemLeave:I,itemTextRefCallback:W,focusSelectedItem:H,selectedItemText:Q,position:i,isPositioned:ne,searchRef:G,children:d.jsx(ng,{as:l4,allowPinchZoom:!0,children:d.jsx(tg,{asChild:!0,trapped:A.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Pe(r,K=>{A.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:d.jsx(ud,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:d.jsx(oe,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:K=>K.preventDefault(),...E,...fe,onPlaced:()=>re(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Pe(E.onKeyDown,K=>{const ie=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!ie&&K.key.length===1&&O(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let be=te().filter(je=>!je.disabled).map(je=>je.ref.current);if(["ArrowUp","End"].includes(K.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const je=K.target,Ae=be.indexOf(je);be=be.slice(Ae+1)}setTimeout(()=>k(be)),K.preventDefault()}})})})})})})});TT.displayName=r4;var c4="SelectItemAlignedPosition",ET=x.forwardRef((e,t)=>{const{__scopeSelect:s,onPlaced:i,...r}=e,l=di(Qi,s),u=fi(Qi,s),[f,h]=x.useState(null),[m,y]=x.useState(null),g=dt(t,D=>y(D)),b=bd(s),S=x.useRef(!1),C=x.useRef(!0),{viewport:T,selectedItem:j,selectedItemText:E,focusSelectedItem:A}=u,R=x.useCallback(()=>{if(l.trigger&&l.valueNode&&f&&m&&T&&j&&E){const D=l.trigger.getBoundingClientRect(),P=m.getBoundingClientRect(),X=l.valueNode.getBoundingClientRect(),Q=E.getBoundingClientRect();if(l.dir!=="rtl"){const je=Q.left-P.left,Ae=X.left-je,xt=D.left-Ae,mt=D.width+xt,Dn=Math.max(mt,P.width),mn=window.innerWidth-ya,Jt=eS(Ae,[ya,Math.max(ya,mn-Dn)]);f.style.minWidth=mt+"px",f.style.left=Jt+"px"}else{const je=P.right-Q.right,Ae=window.innerWidth-X.right-je,xt=window.innerWidth-D.right-Ae,mt=D.width+xt,Dn=Math.max(mt,P.width),mn=window.innerWidth-ya,Jt=eS(Ae,[ya,Math.max(ya,mn-Dn)]);f.style.minWidth=mt+"px",f.style.right=Jt+"px"}const J=b(),te=window.innerHeight-ya*2,ne=T.scrollHeight,re=window.getComputedStyle(m),de=parseInt(re.borderTopWidth,10),k=parseInt(re.paddingTop,10),H=parseInt(re.borderBottomWidth,10),B=parseInt(re.paddingBottom,10),le=de+k+ne+B+H,G=Math.min(j.offsetHeight*5,le),O=window.getComputedStyle(T),V=parseInt(O.paddingTop,10),I=parseInt(O.paddingBottom,10),W=D.top+D.height/2-ya,oe=te-W,fe=j.offsetHeight/2,K=j.offsetTop+fe,ie=de+k+K,me=le-ie;if(ie<=W){const je=J.length>0&&j===J[J.length-1].ref.current;f.style.bottom="0px";const Ae=m.clientHeight-T.offsetTop-T.offsetHeight,xt=Math.max(oe,fe+(je?I:0)+Ae+H),mt=ie+xt;f.style.height=mt+"px"}else{const je=J.length>0&&j===J[0].ref.current;f.style.top="0px";const xt=Math.max(W,de+T.offsetTop+(je?V:0)+fe)+me;f.style.height=xt+"px",T.scrollTop=ie-W+T.offsetTop}f.style.margin=`${ya}px 0`,f.style.minHeight=G+"px",f.style.maxHeight=te+"px",i?.(),requestAnimationFrame(()=>S.current=!0)}},[b,l.trigger,l.valueNode,f,m,T,j,E,l.dir,i]);on(()=>R(),[R]);const[_,M]=x.useState();on(()=>{m&&M(window.getComputedStyle(m).zIndex)},[m]);const z=x.useCallback(D=>{D&&C.current===!0&&(R(),A?.(),C.current=!1)},[R,A]);return d.jsx(d4,{scope:s,contentWrapper:f,shouldExpandOnScrollRef:S,onScrollButtonChange:z,children:d.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:d.jsx(Fe.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ET.displayName=c4;var u4="SelectPopperPosition",Qh=x.forwardRef((e,t)=>{const{__scopeSelect:s,align:i="start",collisionPadding:r=ya,...l}=e,u=Sd(s);return d.jsx(dT,{...u,...l,ref:t,align:i,collisionPadding:r,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Qh.displayName=u4;var[d4,pg]=dr(Qi,{}),Wh="SelectViewport",jT=x.forwardRef((e,t)=>{const{__scopeSelect:s,nonce:i,...r}=e,l=fi(Wh,s),u=pg(Wh,s),f=dt(t,l.onViewportChange),h=x.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),d.jsx(xd.Slot,{scope:s,children:d.jsx(Fe.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:Pe(r.onScroll,m=>{const y=m.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=u;if(b?.current&&g){const S=Math.abs(h.current-y.scrollTop);if(S>0){const C=window.innerHeight-ya*2,T=parseFloat(g.style.minHeight),j=parseFloat(g.style.height),E=Math.max(T,j);if(E<C){const A=E+S,R=Math.min(C,A),_=A-R;g.style.height=R+"px",g.style.bottom==="0px"&&(y.scrollTop=_>0?_:0,g.style.justifyContent="flex-end")}}}h.current=y.scrollTop})})})]})});jT.displayName=Wh;var AT="SelectGroup",[f4,m4]=dr(AT),h4=x.forwardRef((e,t)=>{const{__scopeSelect:s,...i}=e,r=Cs();return d.jsx(f4,{scope:s,id:r,children:d.jsx(Fe.div,{role:"group","aria-labelledby":r,...i,ref:t})})});h4.displayName=AT;var NT="SelectLabel",p4=x.forwardRef((e,t)=>{const{__scopeSelect:s,...i}=e,r=m4(NT,s);return d.jsx(Fe.div,{id:r.id,...i,ref:t})});p4.displayName=NT;var Qu="SelectItem",[g4,RT]=dr(Qu),MT=x.forwardRef((e,t)=>{const{__scopeSelect:s,value:i,disabled:r=!1,textValue:l,...u}=e,f=di(Qu,s),h=fi(Qu,s),m=f.value===i,[y,g]=x.useState(l??""),[b,S]=x.useState(!1),C=dt(t,A=>h.itemRefCallback?.(A,i,r)),T=Cs(),j=x.useRef("touch"),E=()=>{r||(f.onValueChange(i),f.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(g4,{scope:s,value:i,disabled:r,textId:T,isSelected:m,onItemTextChange:x.useCallback(A=>{g(R=>R||(A?.textContent??"").trim())},[]),children:d.jsx(xd.ItemSlot,{scope:s,value:i,disabled:r,textValue:y,children:d.jsx(Fe.div,{role:"option","aria-labelledby":T,"data-highlighted":b?"":void 0,"aria-selected":m&&b,"data-state":m?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...u,ref:C,onFocus:Pe(u.onFocus,()=>S(!0)),onBlur:Pe(u.onBlur,()=>S(!1)),onClick:Pe(u.onClick,()=>{j.current!=="mouse"&&E()}),onPointerUp:Pe(u.onPointerUp,()=>{j.current==="mouse"&&E()}),onPointerDown:Pe(u.onPointerDown,A=>{j.current=A.pointerType}),onPointerMove:Pe(u.onPointerMove,A=>{j.current=A.pointerType,r?h.onItemLeave?.():j.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Pe(u.onPointerLeave,A=>{A.currentTarget===document.activeElement&&h.onItemLeave?.()}),onKeyDown:Pe(u.onKeyDown,A=>{h.searchRef?.current!==""&&A.key===" "||(e4.includes(A.key)&&E(),A.key===" "&&A.preventDefault())})})})})});MT.displayName=Qu;var fl="SelectItemText",_T=x.forwardRef((e,t)=>{const{__scopeSelect:s,className:i,style:r,...l}=e,u=di(fl,s),f=fi(fl,s),h=RT(fl,s),m=s4(fl,s),[y,g]=x.useState(null),b=dt(t,E=>g(E),h.onItemTextChange,E=>f.itemTextRefCallback?.(E,h.value,h.disabled)),S=y?.textContent,C=x.useMemo(()=>d.jsx("option",{value:h.value,disabled:h.disabled,children:S},h.value),[h.disabled,h.value,S]),{onNativeOptionAdd:T,onNativeOptionRemove:j}=m;return on(()=>(T(C),()=>j(C)),[T,j,C]),d.jsxs(d.Fragment,{children:[d.jsx(Fe.span,{id:h.textId,...l,ref:b}),h.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Vl.createPortal(l.children,u.valueNode):null]})});_T.displayName=fl;var OT="SelectItemIndicator",DT=x.forwardRef((e,t)=>{const{__scopeSelect:s,...i}=e;return RT(OT,s).isSelected?d.jsx(Fe.span,{"aria-hidden":!0,...i,ref:t}):null});DT.displayName=OT;var Jh="SelectScrollUpButton",PT=x.forwardRef((e,t)=>{const s=fi(Jh,e.__scopeSelect),i=pg(Jh,e.__scopeSelect),[r,l]=x.useState(!1),u=dt(t,i.onScrollButtonChange);return on(()=>{if(s.viewport&&s.isPositioned){let f=function(){const m=h.scrollTop>0;l(m)};const h=s.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[s.viewport,s.isPositioned]),r?d.jsx(LT,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=s;f&&h&&(f.scrollTop=f.scrollTop-h.offsetHeight)}}):null});PT.displayName=Jh;var ep="SelectScrollDownButton",kT=x.forwardRef((e,t)=>{const s=fi(ep,e.__scopeSelect),i=pg(ep,e.__scopeSelect),[r,l]=x.useState(!1),u=dt(t,i.onScrollButtonChange);return on(()=>{if(s.viewport&&s.isPositioned){let f=function(){const m=h.scrollHeight-h.clientHeight,y=Math.ceil(h.scrollTop)<m;l(y)};const h=s.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[s.viewport,s.isPositioned]),r?d.jsx(LT,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=s;f&&h&&(f.scrollTop=f.scrollTop+h.offsetHeight)}}):null});kT.displayName=ep;var LT=x.forwardRef((e,t)=>{const{__scopeSelect:s,onAutoScroll:i,...r}=e,l=fi("SelectScrollButton",s),u=x.useRef(null),f=bd(s),h=x.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return x.useEffect(()=>()=>h(),[h]),on(()=>{f().find(y=>y.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),d.jsx(Fe.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:Pe(r.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(i,50))}),onPointerMove:Pe(r.onPointerMove,()=>{l.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(i,50))}),onPointerLeave:Pe(r.onPointerLeave,()=>{h()})})}),v4="SelectSeparator",y4=x.forwardRef((e,t)=>{const{__scopeSelect:s,...i}=e;return d.jsx(Fe.div,{"aria-hidden":!0,...i,ref:t})});y4.displayName=v4;var tp="SelectArrow",x4=x.forwardRef((e,t)=>{const{__scopeSelect:s,...i}=e,r=Sd(s),l=di(tp,s),u=fi(tp,s);return l.open&&u.position==="popper"?d.jsx(fT,{...r,...i,ref:t}):null});x4.displayName=tp;var b4="SelectBubbleInput",zT=x.forwardRef(({__scopeSelect:e,value:t,...s},i)=>{const r=x.useRef(null),l=dt(i,r),u=ZL(t);return x.useEffect(()=>{const f=r.current;if(!f)return;const h=window.HTMLSelectElement.prototype,y=Object.getOwnPropertyDescriptor(h,"value").set;if(u!==t&&y){const g=new Event("change",{bubbles:!0});y.call(f,t),f.dispatchEvent(g)}},[u,t]),d.jsx(Fe.select,{...s,style:{...mT,...s.style},ref:l,defaultValue:t})});zT.displayName=b4;function VT(e){return e===""||e===void 0}function BT(e){const t=oi(e),s=x.useRef(""),i=x.useRef(0),r=x.useCallback(u=>{const f=s.current+u;t(f),(function h(m){s.current=m,window.clearTimeout(i.current),m!==""&&(i.current=window.setTimeout(()=>h(""),1e3))})(f)},[t]),l=x.useCallback(()=>{s.current="",window.clearTimeout(i.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),[s,r,l]}function UT(e,t,s){const r=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,l=s?e.indexOf(s):-1;let u=S4(e,Math.max(l,0));r.length===1&&(u=u.filter(m=>m!==s));const h=u.find(m=>m.textValue.toLowerCase().startsWith(r.toLowerCase()));return h!==s?h:void 0}function S4(e,t){return e.map((s,i)=>e[(t+i)%e.length])}var w4=pT,C4=vT,T4=xT,E4=bT,j4=ST,A4=wT,N4=jT,R4=MT,M4=_T,_4=DT,O4=PT,D4=kT;function Nn({...e}){return d.jsx(w4,{"data-slot":"select",...e})}function Rn({...e}){return d.jsx(T4,{"data-slot":"select-value",...e})}function Mn({className:e,size:t="default",children:s,...i}){return d.jsxs(C4,{"data-slot":"select-trigger","data-size":t,className:ce("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[s,d.jsx(E4,{asChild:!0,children:d.jsx(Yp,{className:"size-4 opacity-50"})})]})}function _n({className:e,children:t,position:s="item-aligned",align:i="center",...r}){return d.jsx(j4,{children:d.jsxs(A4,{"data-slot":"select-content",className:ce("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,align:i,...r,children:[d.jsx(P4,{}),d.jsx(N4,{className:ce("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(k4,{})]})})}function Ne({className:e,children:t,...s}){return d.jsxs(R4,{"data-slot":"select-item",className:ce("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_span:last-child]:flex [&_span:last-child]:items-center [&_span:last-child]:gap-2",e),...s,children:[d.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(_4,{children:d.jsx(X_,{className:"size-4"})})}),d.jsx(M4,{children:t})]})}function P4({className:e,...t}){return d.jsx(O4,{"data-slot":"select-scroll-up-button",className:ce("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(eO,{className:"size-4"})})}function k4({className:e,...t}){return d.jsx(D4,{"data-slot":"select-scroll-down-button",className:ce("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Yp,{className:"size-4"})})}function L4(){const{t:e}=He(),{locale:t,setLocale:s}=yk();return d.jsxs(Nn,{value:t,onValueChange:i=>s(Fh(i)),children:[d.jsxs(Mn,{size:"sm",className:"w-[8.5rem]","aria-label":e("app.language"),children:[d.jsx(lO,{className:"size-4"}),d.jsx(Rn,{})]}),d.jsxs(_n,{align:"end",children:[d.jsx(Ne,{value:"en-US",children:e("locale.enUS")}),d.jsx(Ne,{value:"zh-CN",children:e("locale.zhCN")})]})]})}function z4({theme:e}){return e==="light"?d.jsx(EO,{className:"size-4"}):e==="dark"?d.jsx(yO,{className:"size-4"}):d.jsx(mO,{className:"size-4"})}function V4(){const{t:e}=He(),{theme:t,setTheme:s}=Cw();return d.jsxs(Nn,{value:t??"system",onValueChange:s,children:[d.jsxs(Mn,{size:"sm",className:"w-[8.5rem]","aria-label":e("theme.label"),children:[d.jsx(z4,{theme:t}),d.jsx(Rn,{})]}),d.jsxs(_n,{align:"end",children:[d.jsx(Ne,{value:"system",children:e("theme.system")}),d.jsx(Ne,{value:"light",children:e("theme.light")}),d.jsx(Ne,{value:"dark",children:e("theme.dark")})]})]})}function B4(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",t.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}const U4=e=>{switch(e){case"success":return F4;case"info":return $4;case"warning":return q4;case"error":return K4;default:return null}},I4=Array(12).fill(0),H4=({visible:e,className:t})=>ue.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ue.createElement("div",{className:"sonner-spinner"},I4.map((s,i)=>ue.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),F4=ue.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ue.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"})),q4=ue.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ue.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"})),$4=ue.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ue.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"})),K4=ue.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ue.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"})),G4=ue.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"},ue.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ue.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Y4=()=>{const[e,t]=ue.useState(document.hidden);return ue.useEffect(()=>{const s=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),e};let np=1;class X4{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const s=this.subscribers.indexOf(t);this.subscribers.splice(s,1)}),this.publish=t=>{this.subscribers.forEach(s=>s(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var s;const{message:i,...r}=t,l=typeof t?.id=="number"||((s=t.id)==null?void 0:s.length)>0?t.id:np++,u=this.toasts.find(h=>h.id===l),f=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(h=>h.id===l?(this.publish({...h,...t,id:l,title:i}),{...h,...t,id:l,dismissible:f,title:i}):h):this.addToast({title:i,...r,dismissible:f,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:t,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(i=>i({id:s.id,dismiss:!0}))}),t),this.message=(t,s)=>this.create({...s,message:t}),this.error=(t,s)=>this.create({...s,message:t,type:"error"}),this.success=(t,s)=>this.create({...s,type:"success",message:t}),this.info=(t,s)=>this.create({...s,type:"info",message:t}),this.warning=(t,s)=>this.create({...s,type:"warning",message:t}),this.loading=(t,s)=>this.create({...s,type:"loading",message:t}),this.promise=(t,s)=>{if(!s)return;let i;s.loading!==void 0&&(i=this.create({...s,promise:t,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let l=i!==void 0,u;const f=r.then(async m=>{if(u=["resolve",m],ue.isValidElement(m))l=!1,this.create({id:i,type:"default",message:m});else if(Q4(m)&&!m.ok){l=!1;const g=typeof s.error=="function"?await s.error(`HTTP error! status: ${m.status}`):s.error,b=typeof s.description=="function"?await s.description(`HTTP error! status: ${m.status}`):s.description,C=typeof g=="object"&&!ue.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:b,...C})}else if(m instanceof Error){l=!1;const g=typeof s.error=="function"?await s.error(m):s.error,b=typeof s.description=="function"?await s.description(m):s.description,C=typeof g=="object"&&!ue.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:b,...C})}else if(s.success!==void 0){l=!1;const g=typeof s.success=="function"?await s.success(m):s.success,b=typeof s.description=="function"?await s.description(m):s.description,C=typeof g=="object"&&!ue.isValidElement(g)?g:{message:g};this.create({id:i,type:"success",description:b,...C})}}).catch(async m=>{if(u=["reject",m],s.error!==void 0){l=!1;const y=typeof s.error=="function"?await s.error(m):s.error,g=typeof s.description=="function"?await s.description(m):s.description,S=typeof y=="object"&&!ue.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:g,...S})}}).finally(()=>{l&&(this.dismiss(i),i=void 0),s.finally==null||s.finally.call(s)}),h=()=>new Promise((m,y)=>f.then(()=>u[0]==="reject"?y(u[1]):m(u[1])).catch(y));return typeof i!="string"&&typeof i!="number"?{unwrap:h}:Object.assign(i,{unwrap:h})},this.custom=(t,s)=>{const i=s?.id||np++;return this.create({jsx:t(i),id:i,...s}),i},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Cn=new X4,Z4=(e,t)=>{const s=t?.id||np++;return Cn.addToast({title:e,...t,id:s}),s},Q4=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",W4=Z4,J4=()=>Cn.toasts,e5=()=>Cn.getActiveToasts(),Ht=Object.assign(W4,{success:Cn.success,info:Cn.info,warning:Cn.warning,error:Cn.error,custom:Cn.custom,message:Cn.message,promise:Cn.promise,dismiss:Cn.dismiss,loading:Cn.loading},{getHistory:J4,getToasts:e5});B4("[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}[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(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);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]{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 vu(e){return e.label!==void 0}const t5=3,n5="24px",a5="16px",mS=4e3,s5=356,i5=14,o5=45,r5=200;function La(...e){return e.filter(Boolean).join(" ")}function l5(e){const[t,s]=e.split("-"),i=[];return t&&i.push(t),s&&i.push(s),i}const c5=e=>{var t,s,i,r,l,u,f,h,m;const{invert:y,toast:g,unstyled:b,interacting:S,setHeights:C,visibleToasts:T,heights:j,index:E,toasts:A,expanded:R,removeToast:_,defaultRichColors:M,closeButton:z,style:D,cancelButtonStyle:P,actionButtonStyle:X,className:Q="",descriptionClassName:J="",duration:te,position:ne,gap:re,expandByDefault:de,classNames:k,icons:H,closeButtonAriaLabel:B="Close toast"}=e,[le,G]=ue.useState(null),[O,V]=ue.useState(null),[I,W]=ue.useState(!1),[oe,fe]=ue.useState(!1),[K,ie]=ue.useState(!1),[me,be]=ue.useState(!1),[je,Ae]=ue.useState(!1),[xt,mt]=ue.useState(0),[Dn,mn]=ue.useState(0),Jt=ue.useRef(g.duration||te||mS),Aa=ue.useRef(null),Kt=ue.useRef(null),Na=E===0,Ya=E+1<=T,Dt=g.type,Gn=g.dismissible!==!1,Pt=g.className||"",hi=g.descriptionClassName||"",fa=ue.useMemo(()=>j.findIndex(Ce=>Ce.toastId===g.id)||0,[j,g.id]),Xa=ue.useMemo(()=>{var Ce;return(Ce=g.closeButton)!=null?Ce:z},[g.closeButton,z]),hn=ue.useMemo(()=>g.duration||te||mS,[g.duration,te]),Yn=ue.useRef(0),pn=ue.useRef(0),Ms=ue.useRef(0),Xn=ue.useRef(null),[ma,kt]=ne.split("-"),rn=ue.useMemo(()=>j.reduce((Ce,Ge,Le)=>Le>=fa?Ce:Ce+Ge.height,0),[j,fa]),Et=Y4(),pi=g.invert||y,Za=Dt==="loading";pn.current=ue.useMemo(()=>fa*re+rn,[fa,rn]),ue.useEffect(()=>{Jt.current=hn},[hn]),ue.useEffect(()=>{W(!0)},[]),ue.useEffect(()=>{const Ce=Kt.current;if(Ce){const Ge=Ce.getBoundingClientRect().height;return mn(Ge),C(Le=>[{toastId:g.id,height:Ge,position:g.position},...Le]),()=>C(Le=>Le.filter(ot=>ot.toastId!==g.id))}},[C,g.id]),ue.useLayoutEffect(()=>{if(!I)return;const Ce=Kt.current,Ge=Ce.style.height;Ce.style.height="auto";const Le=Ce.getBoundingClientRect().height;Ce.style.height=Ge,mn(Le),C(ot=>ot.find(at=>at.toastId===g.id)?ot.map(at=>at.toastId===g.id?{...at,height:Le}:at):[{toastId:g.id,height:Le,position:g.position},...ot])},[I,g.title,g.description,C,g.id,g.jsx,g.action,g.cancel]);const gn=ue.useCallback(()=>{fe(!0),mt(pn.current),C(Ce=>Ce.filter(Ge=>Ge.toastId!==g.id)),setTimeout(()=>{_(g)},r5)},[g,_,C,pn]);ue.useEffect(()=>{if(g.promise&&Dt==="loading"||g.duration===1/0||g.type==="loading")return;let Ce;return R||S||Et?(()=>{if(Ms.current<Yn.current){const ot=new Date().getTime()-Yn.current;Jt.current=Jt.current-ot}Ms.current=new Date().getTime()})():Jt.current!==1/0&&(Yn.current=new Date().getTime(),Ce=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),gn()},Jt.current)),()=>clearTimeout(Ce)},[R,S,g,Dt,Et,gn]),ue.useEffect(()=>{g.delete&&(gn(),g.onDismiss==null||g.onDismiss.call(g,g))},[gn,g.delete]);function Ra(){var Ce;if(H?.loading){var Ge;return ue.createElement("div",{className:La(k?.loader,g==null||(Ge=g.classNames)==null?void 0:Ge.loader,"sonner-loader"),"data-visible":Dt==="loading"},H.loading)}return ue.createElement(H4,{className:La(k?.loader,g==null||(Ce=g.classNames)==null?void 0:Ce.loader),visible:Dt==="loading"})}const nt=g.icon||H?.[Dt]||U4(Dt);var Zn,bt;return ue.createElement("li",{tabIndex:0,ref:Kt,className:La(Q,Pt,k?.toast,g==null||(t=g.classNames)==null?void 0:t.toast,k?.default,k?.[Dt],g==null||(s=g.classNames)==null?void 0:s[Dt]),"data-sonner-toast":"","data-rich-colors":(Zn=g.richColors)!=null?Zn:M,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":I,"data-promise":!!g.promise,"data-swiped":je,"data-removed":oe,"data-visible":Ya,"data-y-position":ma,"data-x-position":kt,"data-index":E,"data-front":Na,"data-swiping":K,"data-dismissible":Gn,"data-type":Dt,"data-invert":pi,"data-swipe-out":me,"data-swipe-direction":O,"data-expanded":!!(R||de&&I),"data-testid":g.testId,style:{"--index":E,"--toasts-before":E,"--z-index":A.length-E,"--offset":`${oe?xt:pn.current}px`,"--initial-height":de?"auto":`${Dn}px`,...D,...g.style},onDragEnd:()=>{ie(!1),G(null),Xn.current=null},onPointerDown:Ce=>{Ce.button!==2&&(Za||!Gn||(Aa.current=new Date,mt(pn.current),Ce.target.setPointerCapture(Ce.pointerId),Ce.target.tagName!=="BUTTON"&&(ie(!0),Xn.current={x:Ce.clientX,y:Ce.clientY})))},onPointerUp:()=>{var Ce,Ge,Le;if(me||!Gn)return;Xn.current=null;const ot=Number(((Ce=Kt.current)==null?void 0:Ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ma=Number(((Ge=Kt.current)==null?void 0:Ge.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),at=new Date().getTime()-((Le=Aa.current)==null?void 0:Le.getTime()),en=le==="x"?ot:Ma,Qa=Math.abs(en)/at;if(Math.abs(en)>=o5||Qa>.11){mt(pn.current),g.onDismiss==null||g.onDismiss.call(g,g),V(le==="x"?ot>0?"right":"left":Ma>0?"down":"up"),gn(),be(!0);return}else{var tn,nn;(tn=Kt.current)==null||tn.style.setProperty("--swipe-amount-x","0px"),(nn=Kt.current)==null||nn.style.setProperty("--swipe-amount-y","0px")}Ae(!1),ie(!1),G(null)},onPointerMove:Ce=>{var Ge,Le,ot;if(!Xn.current||!Gn||((Ge=window.getSelection())==null?void 0:Ge.toString().length)>0)return;const at=Ce.clientY-Xn.current.y,en=Ce.clientX-Xn.current.x;var Qa;const tn=(Qa=e.swipeDirections)!=null?Qa:l5(ne);!le&&(Math.abs(en)>1||Math.abs(at)>1)&&G(Math.abs(en)>Math.abs(at)?"x":"y");let nn={x:0,y:0};const _s=Pn=>1/(1.5+Math.abs(Pn)/20);if(le==="y"){if(tn.includes("top")||tn.includes("bottom"))if(tn.includes("top")&&at<0||tn.includes("bottom")&&at>0)nn.y=at;else{const Pn=at*_s(at);nn.y=Math.abs(Pn)<Math.abs(at)?Pn:at}}else if(le==="x"&&(tn.includes("left")||tn.includes("right")))if(tn.includes("left")&&en<0||tn.includes("right")&&en>0)nn.x=en;else{const Pn=en*_s(en);nn.x=Math.abs(Pn)<Math.abs(en)?Pn:en}(Math.abs(nn.x)>0||Math.abs(nn.y)>0)&&Ae(!0),(Le=Kt.current)==null||Le.style.setProperty("--swipe-amount-x",`${nn.x}px`),(ot=Kt.current)==null||ot.style.setProperty("--swipe-amount-y",`${nn.y}px`)}},Xa&&!g.jsx&&Dt!=="loading"?ue.createElement("button",{"aria-label":B,"data-disabled":Za,"data-close-button":!0,onClick:Za||!Gn?()=>{}:()=>{gn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:La(k?.closeButton,g==null||(i=g.classNames)==null?void 0:i.closeButton)},(bt=H?.close)!=null?bt:G4):null,(Dt||g.icon||g.promise)&&g.icon!==null&&(H?.[Dt]!==null||g.icon)?ue.createElement("div",{"data-icon":"",className:La(k?.icon,g==null||(r=g.classNames)==null?void 0:r.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Ra():null,g.type!=="loading"?nt:null):null,ue.createElement("div",{"data-content":"",className:La(k?.content,g==null||(l=g.classNames)==null?void 0:l.content)},ue.createElement("div",{"data-title":"",className:La(k?.title,g==null||(u=g.classNames)==null?void 0:u.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?ue.createElement("div",{"data-description":"",className:La(J,hi,k?.description,g==null||(f=g.classNames)==null?void 0:f.description)},typeof g.description=="function"?g.description():g.description):null),ue.isValidElement(g.cancel)?g.cancel:g.cancel&&vu(g.cancel)?ue.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||P,onClick:Ce=>{vu(g.cancel)&&Gn&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,Ce),gn())},className:La(k?.cancelButton,g==null||(h=g.classNames)==null?void 0:h.cancelButton)},g.cancel.label):null,ue.isValidElement(g.action)?g.action:g.action&&vu(g.action)?ue.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||X,onClick:Ce=>{vu(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,Ce),!Ce.defaultPrevented&&gn())},className:La(k?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function hS(){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 u5(e,t){const s={};return[e,t].forEach((i,r)=>{const l=r===1,u=l?"--mobile-offset":"--offset",f=l?a5:n5;function h(m){["top","right","bottom","left"].forEach(y=>{s[`${u}-${y}`]=typeof m=="number"?`${m}px`:m})}typeof i=="number"||typeof i=="string"?h(i):typeof i=="object"?["top","right","bottom","left"].forEach(m=>{i[m]===void 0?s[`${u}-${m}`]=f:s[`${u}-${m}`]=typeof i[m]=="number"?`${i[m]}px`:i[m]}):h(f)}),s}const d5=ue.forwardRef(function(t,s){const{id:i,invert:r,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:f,closeButton:h,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:S,duration:C,style:T,visibleToasts:j=t5,toastOptions:E,dir:A=hS(),gap:R=i5,icons:_,containerAriaLabel:M="Notifications"}=t,[z,D]=ue.useState([]),P=ue.useMemo(()=>i?z.filter(I=>I.toasterId===i):z.filter(I=>!I.toasterId),[z,i]),X=ue.useMemo(()=>Array.from(new Set([l].concat(P.filter(I=>I.position).map(I=>I.position)))),[P,l]),[Q,J]=ue.useState([]),[te,ne]=ue.useState(!1),[re,de]=ue.useState(!1),[k,H]=ue.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=ue.useRef(null),le=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),G=ue.useRef(null),O=ue.useRef(!1),V=ue.useCallback(I=>{D(W=>{var oe;return(oe=W.find(fe=>fe.id===I.id))!=null&&oe.delete||Cn.dismiss(I.id),W.filter(({id:fe})=>fe!==I.id)})},[]);return ue.useEffect(()=>Cn.subscribe(I=>{if(I.dismiss){requestAnimationFrame(()=>{D(W=>W.map(oe=>oe.id===I.id?{...oe,delete:!0}:oe))});return}setTimeout(()=>{Sw.flushSync(()=>{D(W=>{const oe=W.findIndex(fe=>fe.id===I.id);return oe!==-1?[...W.slice(0,oe),{...W[oe],...I},...W.slice(oe+1)]:[I,...W]})})})}),[z]),ue.useEffect(()=>{if(b!=="system"){H(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;const I=window.matchMedia("(prefers-color-scheme: dark)");try{I.addEventListener("change",({matches:W})=>{H(W?"dark":"light")})}catch{I.addListener(({matches:oe})=>{try{H(oe?"dark":"light")}catch(fe){console.error(fe)}})}},[b]),ue.useEffect(()=>{z.length<=1&&ne(!1)},[z]),ue.useEffect(()=>{const I=W=>{var oe;if(u.every(ie=>W[ie]||W.code===ie)){var K;ne(!0),(K=B.current)==null||K.focus()}W.code==="Escape"&&(document.activeElement===B.current||(oe=B.current)!=null&&oe.contains(document.activeElement))&&ne(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[u]),ue.useEffect(()=>{if(B.current)return()=>{G.current&&(G.current.focus({preventScroll:!0}),G.current=null,O.current=!1)}},[B.current]),ue.createElement("section",{ref:s,"aria-label":`${M} ${le}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},X.map((I,W)=>{var oe;const[fe,K]=I.split("-");return P.length?ue.createElement("ol",{key:I,dir:A==="auto"?hS():A,tabIndex:-1,ref:B,className:m,"data-sonner-toaster":!0,"data-sonner-theme":k,"data-y-position":fe,"data-x-position":K,style:{"--front-toast-height":`${((oe=Q[0])==null?void 0:oe.height)||0}px`,"--width":`${s5}px`,"--gap":`${R}px`,...T,...u5(y,g)},onBlur:ie=>{O.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(O.current=!1,G.current&&(G.current.focus({preventScroll:!0}),G.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||O.current||(O.current=!0,G.current=ie.relatedTarget)},onMouseEnter:()=>ne(!0),onMouseMove:()=>ne(!0),onMouseLeave:()=>{re||ne(!1)},onDragEnd:()=>ne(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||de(!0)},onPointerUp:()=>de(!1)},P.filter(ie=>!ie.position&&W===0||ie.position===I).map((ie,me)=>{var be,je;return ue.createElement(c5,{key:ie.id,icons:_,index:me,toast:ie,defaultRichColors:S,duration:(be=E?.duration)!=null?be:C,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:r,visibleToasts:j,closeButton:(je=E?.closeButton)!=null?je:h,interacting:re,position:I,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:V,toasts:P.filter(Ae=>Ae.position==ie.position),heights:Q.filter(Ae=>Ae.position==ie.position),setHeights:J,expandByDefault:f,gap:R,expanded:te,swipeDirections:t.swipeDirections})})):null}))}),Hi="adminToken";function ap(){if(typeof window>"u")return"";try{const e=window.localStorage.getItem(Hi)||"";if(e)return e;const t=window.sessionStorage.getItem(Hi)||"";if(t)return window.localStorage.setItem(Hi,t),window.sessionStorage.removeItem(Hi),t}catch{}return""}function pS(e){if(!(typeof window>"u"))try{const t=e.trim();t?window.localStorage.setItem(Hi,t):window.localStorage.removeItem(Hi),window.sessionStorage.removeItem(Hi)}catch{}}const IT=x.createContext(null);function f5({children:e}){const[t,s]=x.useState(()=>ap()),i=x.useMemo(()=>({token:t,setToken:r=>{pS(r),s(ap())},clearToken:()=>{pS(""),s("")}}),[t]);return d.jsx(IT.Provider,{value:i,children:e})}function m5(){const e=x.useContext(IT);if(!e)throw new Error("useAdminToken must be used within <AdminTokenProvider />");return e}const sp="admin-ui:admin-token-required";class Sa extends Error{status;responseText;constructor(t,s){super(`HTTP ${t}: ${s}`),this.name="AdminApiError",this.status=t,this.responseText=s}}function gS(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}async function Kn(e,t,s){const i=s?.trim()??ap(),r=new Headers(t?.headers??void 0);i&&r.set("x-admin-token",i),t?.body&&!r.has("content-type")&&r.set("content-type","application/json");const l=await fetch(e,{...t,headers:r});if(!l.ok){const u=await l.text().catch(()=>"");let f=u;try{const h=JSON.parse(u);if(gS(h)&&"error"in h){const m=h.error;gS(m)&&typeof m.message=="string"&&(f=m.message)}}catch{}throw(l.status===401||l.status===403)&&typeof window<"u"&&window.dispatchEvent(new Event(sp)),new Sa(l.status,f)}return await l.json()}async function ip(e){return Kn("/api/admin/meta",void 0,e)}async function h5(e){const t=new URLSearchParams;return t.set("since_ms",String(e.sinceMs)),t.set("include_stats","1"),Kn(`/api/admin/accounts?${t.toString()}`)}async function p5(e){const t=new URLSearchParams;return e.account_id&&t.set("account_id",e.account_id),e.upstream_model&&t.set("upstream_model",e.upstream_model),e.client_model&&t.set("client_model",e.client_model),e.upstream_endpoint&&t.set("upstream_endpoint",e.upstream_endpoint),e.path&&t.set("path",e.path),e.status&&t.set("status",e.status),e.has_error&&t.set("has_error",e.has_error),e.from_ms&&t.set("from_ms",e.from_ms),e.to_ms&&t.set("to_ms",e.to_ms),t.set("limit",String(e.limit??50)),e.cursor_id!=null&&t.set("cursor_id",String(e.cursor_id)),Kn(`/api/admin/requests?${t.toString()}`)}async function ph(e){return Kn(`/api/admin/requests/${encodeURIComponent(e)}`)}async function g5(){return Kn("/api/admin/config")}async function v5(e){return Kn("/api/admin/config",{method:"POST",body:JSON.stringify(e)})}async function y5(){return Kn("/api/admin/models")}async function x5(){return Kn("/api/admin/models/details")}async function b5(e){return Kn("/api/admin/accounts/auth/start",{method:"POST",body:JSON.stringify(e)})}async function S5(e){return Kn(`/api/admin/accounts/auth/status/${encodeURIComponent(e)}`)}async function w5(e){return Kn(`/api/admin/accounts/auth/cancel/${encodeURIComponent(e)}`,{method:"POST"})}async function C5(e){return Kn(`/api/admin/accounts/${encodeURIComponent(e)}`,{method:"DELETE"})}async function T5(e){return Kn(`/api/admin/accounts/${encodeURIComponent(e)}/reauth`,{method:"POST"})}const E5=eg("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function $t({className:e,variant:t,asChild:s=!1,...i}){const r=s?Jp:"span";return d.jsx(r,{"data-slot":"badge",className:ce(E5({variant:t}),e),...i})}const gg=x.createContext({});function Ul(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const vg=typeof window<"u",yg=vg?x.useLayoutEffect:x.useEffect,wd=x.createContext(null);function xg(e,t){e.indexOf(t)===-1&&e.push(t)}function bg(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const As=(e,t,s)=>s>t?t:s<e?e:s;let Sg=()=>{};const Ns={},HT=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function FT(e){return typeof e=="object"&&e!==null}const qT=e=>/^0[^.\s]+$/u.test(e);function wg(e){let t;return()=>(t===void 0&&(t=e()),t)}const ua=e=>e,j5=(e,t)=>s=>t(e(s)),Il=(...e)=>e.reduce(j5),Al=(e,t,s)=>{const i=t-e;return i===0?1:(s-e)/i};class Cg{constructor(){this.subscriptions=[]}add(t){return xg(this.subscriptions,t),()=>bg(this.subscriptions,t)}notify(t,s,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,s,i);else for(let l=0;l<r;l++){const u=this.subscriptions[l];u&&u(t,s,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ia=e=>e*1e3,ca=e=>e/1e3;function $T(e,t){return t?e*(1e3/t):0}const KT=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,A5=1e-7,N5=12;function R5(e,t,s,i,r){let l,u,f=0;do u=t+(s-t)/2,l=KT(u,i,r)-e,l>0?s=u:t=u;while(Math.abs(l)>A5&&++f<N5);return u}function Hl(e,t,s,i){if(e===t&&s===i)return ua;const r=l=>R5(l,0,1,e,s);return l=>l===0||l===1?l:KT(r(l),t,i)}const GT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,YT=e=>t=>1-e(1-t),XT=Hl(.33,1.53,.69,.99),Tg=YT(XT),ZT=GT(Tg),QT=e=>(e*=2)<1?.5*Tg(e):.5*(2-Math.pow(2,-10*(e-1))),Eg=e=>1-Math.sin(Math.acos(e)),WT=YT(Eg),JT=GT(Eg),M5=Hl(.42,0,1,1),_5=Hl(0,0,.58,1),eE=Hl(.42,0,.58,1),O5=e=>Array.isArray(e)&&typeof e[0]!="number",tE=e=>Array.isArray(e)&&typeof e[0]=="number",D5={linear:ua,easeIn:M5,easeInOut:eE,easeOut:_5,circIn:Eg,circInOut:JT,circOut:WT,backIn:Tg,backInOut:ZT,backOut:XT,anticipate:QT},P5=e=>typeof e=="string",vS=e=>{if(tE(e)){Sg(e.length===4);const[t,s,i,r]=e;return Hl(t,s,i,r)}else if(P5(e))return D5[e];return e},yu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function k5(e,t){let s=new Set,i=new Set,r=!1,l=!1;const u=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function h(y){u.has(y)&&(m.schedule(y),e()),y(f)}const m={schedule:(y,g=!1,b=!1)=>{const C=b&&r?s:i;return g&&u.add(y),C.has(y)||C.add(y),y},cancel:y=>{i.delete(y),u.delete(y)},process:y=>{if(f=y,r){l=!0;return}r=!0,[s,i]=[i,s],s.forEach(h),s.clear(),r=!1,l&&(l=!1,m.process(y))}};return m}const L5=40;function nE(e,t){let s=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},l=()=>s=!0,u=yu.reduce((R,_)=>(R[_]=k5(l),R),{}),{setup:f,read:h,resolveKeyframes:m,preUpdate:y,update:g,preRender:b,render:S,postRender:C}=u,T=()=>{const R=Ns.useManualTiming?r.timestamp:performance.now();s=!1,Ns.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(R-r.timestamp,L5),1)),r.timestamp=R,r.isProcessing=!0,f.process(r),h.process(r),m.process(r),y.process(r),g.process(r),b.process(r),S.process(r),C.process(r),r.isProcessing=!1,s&&t&&(i=!1,e(T))},j=()=>{s=!0,i=!0,r.isProcessing||e(T)};return{schedule:yu.reduce((R,_)=>{const M=u[_];return R[_]=(z,D=!1,P=!1)=>(s||j(),M.schedule(z,D,P)),R},{}),cancel:R=>{for(let _=0;_<yu.length;_++)u[yu[_]].cancel(R)},state:r,steps:u}}const{schedule:tt,cancel:Rs,state:Qt,steps:gh}=nE(typeof requestAnimationFrame<"u"?requestAnimationFrame:ua,!0);let Du;function z5(){Du=void 0}const Tn={now:()=>(Du===void 0&&Tn.set(Qt.isProcessing||Ns.useManualTiming?Qt.timestamp:performance.now()),Du),set:e=>{Du=e,queueMicrotask(z5)}},aE=e=>t=>typeof t=="string"&&t.startsWith(e),sE=aE("--"),V5=aE("var(--"),jg=e=>V5(e)?B5.test(e.split("/*")[0].trim()):!1,B5=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,fr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Nl={...fr,transform:e=>As(0,1,e)},xu={...fr,default:1},gl=e=>Math.round(e*1e5)/1e5,Ag=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function U5(e){return e==null}const I5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ng=(e,t)=>s=>!!(typeof s=="string"&&I5.test(s)&&s.startsWith(e)||t&&!U5(s)&&Object.prototype.hasOwnProperty.call(s,t)),iE=(e,t,s)=>i=>{if(typeof i!="string")return i;const[r,l,u,f]=i.match(Ag);return{[e]:parseFloat(r),[t]:parseFloat(l),[s]:parseFloat(u),alpha:f!==void 0?parseFloat(f):1}},H5=e=>As(0,255,e),vh={...fr,transform:e=>Math.round(H5(e))},Fi={test:Ng("rgb","red"),parse:iE("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:i=1})=>"rgba("+vh.transform(e)+", "+vh.transform(t)+", "+vh.transform(s)+", "+gl(Nl.transform(i))+")"};function F5(e){let t="",s="",i="",r="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,s+=s,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const op={test:Ng("#"),parse:F5,transform:Fi.transform},Fl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),si=Fl("deg"),Ha=Fl("%"),he=Fl("px"),q5=Fl("vh"),$5=Fl("vw"),yS={...Ha,parse:e=>Ha.parse(e)/100,transform:e=>Ha.transform(e*100)},Fo={test:Ng("hsl","hue"),parse:iE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:i=1})=>"hsla("+Math.round(e)+", "+Ha.transform(gl(t))+", "+Ha.transform(gl(s))+", "+gl(Nl.transform(i))+")"},_t={test:e=>Fi.test(e)||op.test(e)||Fo.test(e),parse:e=>Fi.test(e)?Fi.parse(e):Fo.test(e)?Fo.parse(e):op.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Fi.transform(e):Fo.transform(e),getAnimatableNone:e=>{const t=_t.parse(e);return t.alpha=0,_t.transform(t)}},K5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function G5(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ag)?.length||0)+(e.match(K5)?.length||0)>0}const oE="number",rE="color",Y5="var",X5="var(",xS="${}",Z5=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rl(e){const t=e.toString(),s=[],i={color:[],number:[],var:[]},r=[];let l=0;const f=t.replace(Z5,h=>(_t.test(h)?(i.color.push(l),r.push(rE),s.push(_t.parse(h))):h.startsWith(X5)?(i.var.push(l),r.push(Y5),s.push(h)):(i.number.push(l),r.push(oE),s.push(parseFloat(h))),++l,xS)).split(xS);return{values:s,split:f,indexes:i,types:r}}function lE(e){return Rl(e).values}function cE(e){const{split:t,types:s}=Rl(e),i=t.length;return r=>{let l="";for(let u=0;u<i;u++)if(l+=t[u],r[u]!==void 0){const f=s[u];f===oE?l+=gl(r[u]):f===rE?l+=_t.transform(r[u]):l+=r[u]}return l}}const Q5=e=>typeof e=="number"?0:_t.test(e)?_t.getAnimatableNone(e):e;function W5(e){const t=lE(e);return cE(e)(t.map(Q5))}const ci={test:G5,parse:lE,createTransformer:cE,getAnimatableNone:W5};function yh(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e}function J5({hue:e,saturation:t,lightness:s,alpha:i}){e/=360,t/=100,s/=100;let r=0,l=0,u=0;if(!t)r=l=u=s;else{const f=s<.5?s*(1+t):s+t-s*t,h=2*s-f;r=yh(h,f,e+1/3),l=yh(h,f,e),u=yh(h,f,e-1/3)}return{red:Math.round(r*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:i}}function Wu(e,t){return s=>s>0?t:e}const pt=(e,t,s)=>e+(t-e)*s,xh=(e,t,s)=>{const i=e*e,r=s*(t*t-i)+i;return r<0?0:Math.sqrt(r)},e3=[op,Fi,Fo],t3=e=>e3.find(t=>t.test(e));function bS(e){const t=t3(e);if(!t)return!1;let s=t.parse(e);return t===Fo&&(s=J5(s)),s}const SS=(e,t)=>{const s=bS(e),i=bS(t);if(!s||!i)return Wu(e,t);const r={...s};return l=>(r.red=xh(s.red,i.red,l),r.green=xh(s.green,i.green,l),r.blue=xh(s.blue,i.blue,l),r.alpha=pt(s.alpha,i.alpha,l),Fi.transform(r))},rp=new Set(["none","hidden"]);function n3(e,t){return rp.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function a3(e,t){return s=>pt(e,t,s)}function Rg(e){return typeof e=="number"?a3:typeof e=="string"?jg(e)?Wu:_t.test(e)?SS:o3:Array.isArray(e)?uE:typeof e=="object"?_t.test(e)?SS:s3:Wu}function uE(e,t){const s=[...e],i=s.length,r=e.map((l,u)=>Rg(l)(l,t[u]));return l=>{for(let u=0;u<i;u++)s[u]=r[u](l);return s}}function s3(e,t){const s={...e,...t},i={};for(const r in s)e[r]!==void 0&&t[r]!==void 0&&(i[r]=Rg(e[r])(e[r],t[r]));return r=>{for(const l in i)s[l]=i[l](r);return s}}function i3(e,t){const s=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const l=t.types[r],u=e.indexes[l][i[l]],f=e.values[u]??0;s[r]=f,i[l]++}return s}const o3=(e,t)=>{const s=ci.createTransformer(t),i=Rl(e),r=Rl(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?rp.has(e)&&!r.values.length||rp.has(t)&&!i.values.length?n3(e,t):Il(uE(i3(i,r),r.values),s):Wu(e,t)};function dE(e,t,s){return typeof e=="number"&&typeof t=="number"&&typeof s=="number"?pt(e,t,s):Rg(e)(e,t)}const r3=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>tt.update(t,s),stop:()=>Rs(t),now:()=>Qt.isProcessing?Qt.timestamp:Tn.now()}},fE=(e,t,s=10)=>{let i="";const r=Math.max(Math.round(t/s),2);for(let l=0;l<r;l++)i+=Math.round(e(l/(r-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Ju=2e4;function Mg(e){let t=0;const s=50;let i=e.next(t);for(;!i.done&&t<Ju;)t+=s,i=e.next(t);return t>=Ju?1/0:t}function l3(e,t=100,s){const i=s({...e,keyframes:[0,t]}),r=Math.min(Mg(i),Ju);return{type:"keyframes",ease:l=>i.next(r*l).value/t,duration:ca(r)}}const c3=5;function mE(e,t,s){const i=Math.max(t-c3,0);return $T(s-e(i),t-i)}const yt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},bh=.001;function u3({duration:e=yt.duration,bounce:t=yt.bounce,velocity:s=yt.velocity,mass:i=yt.mass}){let r,l,u=1-t;u=As(yt.minDamping,yt.maxDamping,u),e=As(yt.minDuration,yt.maxDuration,ca(e)),u<1?(r=m=>{const y=m*u,g=y*e,b=y-s,S=lp(m,u),C=Math.exp(-g);return bh-b/S*C},l=m=>{const g=m*u*e,b=g*s+s,S=Math.pow(u,2)*Math.pow(m,2)*e,C=Math.exp(-g),T=lp(Math.pow(m,2),u);return(-r(m)+bh>0?-1:1)*((b-S)*C)/T}):(r=m=>{const y=Math.exp(-m*e),g=(m-s)*e+1;return-bh+y*g},l=m=>{const y=Math.exp(-m*e),g=(s-m)*(e*e);return y*g});const f=5/e,h=f3(r,l,f);if(e=Ia(e),isNaN(h))return{stiffness:yt.stiffness,damping:yt.damping,duration:e};{const m=Math.pow(h,2)*i;return{stiffness:m,damping:u*2*Math.sqrt(i*m),duration:e}}}const d3=12;function f3(e,t,s){let i=s;for(let r=1;r<d3;r++)i=i-e(i)/t(i);return i}function lp(e,t){return e*Math.sqrt(1-t*t)}const m3=["duration","bounce"],h3=["stiffness","damping","mass"];function wS(e,t){return t.some(s=>e[s]!==void 0)}function p3(e){let t={velocity:yt.velocity,stiffness:yt.stiffness,damping:yt.damping,mass:yt.mass,isResolvedFromDuration:!1,...e};if(!wS(e,h3)&&wS(e,m3))if(e.visualDuration){const s=e.visualDuration,i=2*Math.PI/(s*1.2),r=i*i,l=2*As(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:yt.mass,stiffness:r,damping:l}}else{const s=u3(e);t={...t,...s,mass:yt.mass},t.isResolvedFromDuration=!0}return t}function ed(e=yt.visualDuration,t=yt.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:r}=s;const l=s.keyframes[0],u=s.keyframes[s.keyframes.length-1],f={done:!1,value:l},{stiffness:h,damping:m,mass:y,duration:g,velocity:b,isResolvedFromDuration:S}=p3({...s,velocity:-ca(s.velocity||0)}),C=b||0,T=m/(2*Math.sqrt(h*y)),j=u-l,E=ca(Math.sqrt(h/y)),A=Math.abs(j)<5;i||(i=A?yt.restSpeed.granular:yt.restSpeed.default),r||(r=A?yt.restDelta.granular:yt.restDelta.default);let R;if(T<1){const M=lp(E,T);R=z=>{const D=Math.exp(-T*E*z);return u-D*((C+T*E*j)/M*Math.sin(M*z)+j*Math.cos(M*z))}}else if(T===1)R=M=>u-Math.exp(-E*M)*(j+(C+E*j)*M);else{const M=E*Math.sqrt(T*T-1);R=z=>{const D=Math.exp(-T*E*z),P=Math.min(M*z,300);return u-D*((C+T*E*j)*Math.sinh(P)+M*j*Math.cosh(P))/M}}const _={calculatedDuration:S&&g||null,next:M=>{const z=R(M);if(S)f.done=M>=g;else{let D=M===0?C:0;T<1&&(D=M===0?Ia(C):mE(R,M,z));const P=Math.abs(D)<=i,X=Math.abs(u-z)<=r;f.done=P&&X}return f.value=f.done?u:z,f},toString:()=>{const M=Math.min(Mg(_),Ju),z=fE(D=>_.next(M*D).value,M,30);return M+"ms "+z},toTransition:()=>{}};return _}ed.applyToOptions=e=>{const t=l3(e,100,ed);return e.ease=t.ease,e.duration=Ia(t.duration),e.type="keyframes",e};function cp({keyframes:e,velocity:t=0,power:s=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:l=500,modifyTarget:u,min:f,max:h,restDelta:m=.5,restSpeed:y}){const g=e[0],b={done:!1,value:g},S=P=>f!==void 0&&P<f||h!==void 0&&P>h,C=P=>f===void 0?h:h===void 0||Math.abs(f-P)<Math.abs(h-P)?f:h;let T=s*t;const j=g+T,E=u===void 0?j:u(j);E!==j&&(T=E-g);const A=P=>-T*Math.exp(-P/i),R=P=>E+A(P),_=P=>{const X=A(P),Q=R(P);b.done=Math.abs(X)<=m,b.value=b.done?E:Q};let M,z;const D=P=>{S(b.value)&&(M=P,z=ed({keyframes:[b.value,C(b.value)],velocity:mE(R,P,b.value),damping:r,stiffness:l,restDelta:m,restSpeed:y}))};return D(0),{calculatedDuration:null,next:P=>{let X=!1;return!z&&M===void 0&&(X=!0,_(P),D(P)),M!==void 0&&P>=M?z.next(P-M):(!X&&_(P),b)}}}function g3(e,t,s){const i=[],r=s||Ns.mix||dE,l=e.length-1;for(let u=0;u<l;u++){let f=r(e[u],e[u+1]);if(t){const h=Array.isArray(t)?t[u]||ua:t;f=Il(h,f)}i.push(f)}return i}function hE(e,t,{clamp:s=!0,ease:i,mixer:r}={}){const l=e.length;if(Sg(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=g3(t,i,r),h=f.length,m=y=>{if(u&&y<e[0])return t[0];let g=0;if(h>1)for(;g<e.length-2&&!(y<e[g+1]);g++);const b=Al(e[g],e[g+1],y);return f[g](b)};return s?y=>m(As(e[0],e[l-1],y)):m}function v3(e,t){const s=e[e.length-1];for(let i=1;i<=t;i++){const r=Al(0,t,i);e.push(pt(s,1,r))}}function y3(e){const t=[0];return v3(t,e.length-1),t}function x3(e,t){return e.map(s=>s*t)}function b3(e,t){return e.map(()=>t||eE).splice(0,e.length-1)}function vl({duration:e=300,keyframes:t,times:s,ease:i="easeInOut"}){const r=O5(i)?i.map(vS):vS(i),l={done:!1,value:t[0]},u=x3(s&&s.length===t.length?s:y3(t),e),f=hE(u,t,{ease:Array.isArray(r)?r:b3(t,r)});return{calculatedDuration:e,next:h=>(l.value=f(h),l.done=h>=e,l)}}const S3=e=>e!==null;function _g(e,{repeat:t,repeatType:s="loop"},i,r=1){const l=e.filter(S3),f=r<0||t&&s!=="loop"&&t%2===1?0:l.length-1;return!f||i===void 0?l[f]:i}const w3={decay:cp,inertia:cp,tween:vl,keyframes:vl,spring:ed};function pE(e){typeof e.type=="string"&&(e.type=w3[e.type])}class Og{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,s){return this.finished.then(t,s)}}const C3=e=>e/100;class Cd extends Og{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==Tn.now()&&this.tick(Tn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;pE(t);const{type:s=vl,repeat:i=0,repeatDelay:r=0,repeatType:l,velocity:u=0}=t;let{keyframes:f}=t;const h=s||vl;h!==vl&&typeof f[0]!="number"&&(this.mixKeyframes=Il(C3,dE(f[0],f[1])),f=[0,100]);const m=h({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=h({...t,keyframes:[...f].reverse(),velocity:-u})),m.calculatedDuration===null&&(m.calculatedDuration=Mg(m));const{calculatedDuration:y}=m;this.calculatedDuration=y,this.resolvedDuration=y+r,this.totalDuration=this.resolvedDuration*(i+1)-r,this.generator=m}updateTime(t){const s=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(t,s=!1){const{generator:i,totalDuration:r,mixKeyframes:l,mirroredGenerator:u,resolvedDuration:f,calculatedDuration:h}=this;if(this.startTime===null)return i.next(0);const{delay:m=0,keyframes:y,repeat:g,repeatType:b,repeatDelay:S,type:C,onUpdate:T,finalKeyframe:j}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),s?this.currentTime=t:this.updateTime(t);const E=this.currentTime-m*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?E<0:E>r;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let R=this.currentTime,_=i;if(g){const P=Math.min(this.currentTime,r)/f;let X=Math.floor(P),Q=P%1;!Q&&P>=1&&(Q=1),Q===1&&X--,X=Math.min(X,g+1),X%2&&(b==="reverse"?(Q=1-Q,S&&(Q-=S/f)):b==="mirror"&&(_=u)),R=As(0,1,Q)*f}const M=A?{done:!1,value:y[0]}:_.next(R);l&&(M.value=l(M.value));let{done:z}=M;!A&&h!==null&&(z=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&z);return D&&C!==cp&&(M.value=_g(y,this.options,j,this.speed)),T&&T(M.value),D&&this.finish(),M}then(t,s){return this.finished.then(t,s)}get duration(){return ca(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ca(t)}get time(){return ca(this.currentTime)}set time(t){t=Ia(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Tn.now());const s=this.playbackSpeed!==t;this.playbackSpeed=t,s&&(this.time=ca(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=r3,startTime:s}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=s??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Tn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function T3(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const qi=e=>e*180/Math.PI,up=e=>{const t=qi(Math.atan2(e[1],e[0]));return dp(t)},E3={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:up,rotateZ:up,skewX:e=>qi(Math.atan(e[1])),skewY:e=>qi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},dp=e=>(e=e%360,e<0&&(e+=360),e),CS=up,TS=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ES=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),j3={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:TS,scaleY:ES,scale:e=>(TS(e)+ES(e))/2,rotateX:e=>dp(qi(Math.atan2(e[6],e[5]))),rotateY:e=>dp(qi(Math.atan2(-e[2],e[0]))),rotateZ:CS,rotate:CS,skewX:e=>qi(Math.atan(e[4])),skewY:e=>qi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fp(e){return e.includes("scale")?1:0}function mp(e,t){if(!e||e==="none")return fp(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(s)i=j3,r=s;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=E3,r=f}if(!r)return fp(t);const l=i[t],u=r[1].split(",").map(N3);return typeof l=="function"?l(u):u[l]}const A3=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return mp(s,t)};function N3(e){return parseFloat(e.trim())}const mr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hr=new Set(mr),jS=e=>e===fr||e===he,R3=new Set(["x","y","z"]),M3=mr.filter(e=>!R3.has(e));function _3(e){const t=[];return M3.forEach(s=>{const i=e.getValue(s);i!==void 0&&(t.push([s,i.get()]),i.set(s.startsWith("scale")?1:0))}),t}const Ki={width:({x:e},{paddingLeft:t="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),height:({y:e},{paddingTop:t="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>mp(t,"x"),y:(e,{transform:t})=>mp(t,"y")};Ki.translateX=Ki.x;Ki.translateY=Ki.y;const Gi=new Set;let hp=!1,pp=!1,gp=!1;function gE(){if(pp){const e=Array.from(Gi).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),s=new Map;t.forEach(i=>{const r=_3(i);r.length&&(s.set(i,r),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const r=s.get(i);r&&r.forEach(([l,u])=>{i.getValue(l)?.set(u)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}pp=!1,hp=!1,Gi.forEach(e=>e.complete(gp)),Gi.clear()}function vE(){Gi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pp=!0)})}function O3(){gp=!0,vE(),gE(),gp=!1}class Dg{constructor(t,s,i,r,l,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=s,this.name=i,this.motionValue=r,this.element=l,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(Gi.add(this),hp||(hp=!0,tt.read(vE),tt.resolveKeyframes(gE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:s,element:i,motionValue:r}=this;if(t[0]===null){const l=r?.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&s){const f=i.readValue(s,u);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=u),r&&l===void 0&&r.set(t[0])}T3(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Gi.delete(this)}cancel(){this.state==="scheduled"&&(Gi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const D3=e=>e.startsWith("--");function P3(e,t,s){D3(t)?e.style.setProperty(t,s):e.style[t]=s}const k3=wg(()=>window.ScrollTimeline!==void 0),L3={};function z3(e,t){const s=wg(e);return()=>L3[t]??s()}const yE=z3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ml=([e,t,s,i])=>`cubic-bezier(${e}, ${t}, ${s}, ${i})`,AS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ml([0,.65,.55,1]),circOut:ml([.55,0,1,.45]),backIn:ml([.31,.01,.66,-.59]),backOut:ml([.33,1.53,.69,.99])};function xE(e,t){if(e)return typeof e=="function"?yE()?fE(e,t):"ease-out":tE(e)?ml(e):Array.isArray(e)?e.map(s=>xE(s,t)||AS.easeOut):AS[e]}function V3(e,t,s,{delay:i=0,duration:r=300,repeat:l=0,repeatType:u="loop",ease:f="easeOut",times:h}={},m=void 0){const y={[t]:s};h&&(y.offset=h);const g=xE(f,r);Array.isArray(g)&&(y.easing=g);const b={delay:i,duration:r,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"};return m&&(b.pseudoElement=m),e.animate(y,b)}function bE(e){return typeof e=="function"&&"applyToOptions"in e}function B3({type:e,...t}){return bE(e)&&yE()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class U3 extends Og{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:s,name:i,keyframes:r,pseudoElement:l,allowFlatten:u=!1,finalKeyframe:f,onComplete:h}=t;this.isPseudoElement=!!l,this.allowFlatten=u,this.options=t,Sg(typeof t.type!="string");const m=B3(t);this.animation=V3(s,i,r,m,l),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const y=_g(r,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(y):P3(s,i,y),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ca(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ca(t)}get time(){return ca(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ia(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&k3()?(this.animation.timeline=t,ua):s(this)}}const SE={anticipate:QT,backInOut:ZT,circInOut:JT};function I3(e){return e in SE}function H3(e){typeof e.ease=="string"&&I3(e.ease)&&(e.ease=SE[e.ease])}const NS=10;class F3 extends U3{constructor(t){H3(t),pE(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:s,onUpdate:i,onComplete:r,element:l,...u}=this.options;if(!s)return;if(t!==void 0){s.set(t);return}const f=new Cd({...u,autoplay:!1}),h=Ia(this.finishedTime??this.time);s.setWithVelocity(f.sample(h-NS).value,f.sample(h).value,NS),f.stop()}}const RS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ci.test(e)||e==="0")&&!e.startsWith("url("));function q3(e){const t=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==t)return!0}function $3(e,t,s,i){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],u=RS(r,t),f=RS(l,t);return!u||!f?!1:q3(e)||(s==="spring"||bE(s))&&i}function vp(e){e.duration=0,e.type="keyframes"}const K3=new Set(["opacity","clipPath","filter","transform"]),G3=wg(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Y3(e){const{motionValue:t,name:s,repeatDelay:i,repeatType:r,damping:l,type:u}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:m}=t.owner.getProps();return G3()&&s&&K3.has(s)&&(s!=="transform"||!m)&&!h&&!i&&r!=="mirror"&&l!==0&&u!=="inertia"}const X3=40;class Z3 extends Og{constructor({autoplay:t=!0,delay:s=0,type:i="keyframes",repeat:r=0,repeatDelay:l=0,repeatType:u="loop",keyframes:f,name:h,motionValue:m,element:y,...g}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Tn.now();const b={autoplay:t,delay:s,type:i,repeat:r,repeatDelay:l,repeatType:u,name:h,motionValue:m,element:y,...g},S=y?.KeyframeResolver||Dg;this.keyframeResolver=new S(f,(C,T,j)=>this.onKeyframesResolved(C,T,b,!j),h,m,y),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,s,i,r){this.keyframeResolver=void 0;const{name:l,type:u,velocity:f,delay:h,isHandoff:m,onUpdate:y}=i;this.resolvedAt=Tn.now(),$3(t,l,u,f)||((Ns.instantAnimations||!h)&&y?.(_g(t,i,s)),t[0]=t[t.length-1],vp(i),i.repeat=0);const b={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>X3?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...i,keyframes:t},S=!m&&Y3(b)?new F3({...b,element:b.motionValue.owner.current}):new Cd(b);S.finished.then(()=>this.notifyFinished()).catch(ua),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}get finished(){return this._animation?this.animation.finished:this._finished}then(t,s){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),O3()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Q3=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function W3(e){const t=Q3.exec(e);if(!t)return[,];const[,s,i,r]=t;return[`--${s??i}`,r]}function wE(e,t,s=1){const[i,r]=W3(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const u=l.trim();return HT(u)?parseFloat(u):u}return jg(r)?wE(r,t,s+1):r}function Pg(e,t){return e?.[t]??e?.default??e}const CE=new Set(["width","height","top","left","right","bottom",...mr]),J3={test:e=>e==="auto",parse:e=>e},TE=e=>t=>t.test(e),EE=[fr,he,Ha,si,$5,q5,J3],MS=e=>EE.find(TE(e));function ez(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||qT(e):!0}const tz=new Set(["brightness","contrast","saturate","opacity"]);function nz(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=s.match(Ag)||[];if(!i)return e;const r=s.replace(i,"");let l=tz.has(t)?1:0;return i!==s&&(l*=100),t+"("+l+r+")"}const az=/\b([a-z-]*)\(.*?\)/gu,yp={...ci,getAnimatableNone:e=>{const t=e.match(az);return t?t.map(nz).join(" "):e}},_S={...fr,transform:Math.round},sz={rotate:si,rotateX:si,rotateY:si,rotateZ:si,scale:xu,scaleX:xu,scaleY:xu,scaleZ:xu,skew:si,skewX:si,skewY:si,distance:he,translateX:he,translateY:he,translateZ:he,x:he,y:he,z:he,perspective:he,transformPerspective:he,opacity:Nl,originX:yS,originY:yS,originZ:he},kg={borderWidth:he,borderTopWidth:he,borderRightWidth:he,borderBottomWidth:he,borderLeftWidth:he,borderRadius:he,radius:he,borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomRightRadius:he,borderBottomLeftRadius:he,width:he,maxWidth:he,height:he,maxHeight:he,top:he,right:he,bottom:he,left:he,inset:he,insetBlock:he,insetBlockStart:he,insetBlockEnd:he,insetInline:he,insetInlineStart:he,insetInlineEnd:he,padding:he,paddingTop:he,paddingRight:he,paddingBottom:he,paddingLeft:he,paddingBlock:he,paddingBlockStart:he,paddingBlockEnd:he,paddingInline:he,paddingInlineStart:he,paddingInlineEnd:he,margin:he,marginTop:he,marginRight:he,marginBottom:he,marginLeft:he,marginBlock:he,marginBlockStart:he,marginBlockEnd:he,marginInline:he,marginInlineStart:he,marginInlineEnd:he,backgroundPositionX:he,backgroundPositionY:he,...sz,zIndex:_S,fillOpacity:Nl,strokeOpacity:Nl,numOctaves:_S},iz={...kg,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:yp,WebkitFilter:yp},jE=e=>iz[e];function AE(e,t){let s=jE(e);return s!==yp&&(s=ci),s.getAnimatableNone?s.getAnimatableNone(t):void 0}const oz=new Set(["auto","none","0"]);function rz(e,t,s){let i=0,r;for(;i<e.length&&!r;){const l=e[i];typeof l=="string"&&!oz.has(l)&&Rl(l).values.length&&(r=e[i]),i++}if(r&&s)for(const l of t)e[l]=AE(s,r)}class lz extends Dg{constructor(t,s,i,r,l){super(t,s,i,r,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:s,name:i}=this;if(!s||!s.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let m=t[h];if(typeof m=="string"&&(m=m.trim(),jg(m))){const y=wE(m,s.current);y!==void 0&&(t[h]=y),h===t.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!CE.has(i)||t.length!==2)return;const[r,l]=t,u=MS(r),f=MS(l);if(u!==f)if(jS(u)&&jS(f))for(let h=0;h<t.length;h++){const m=t[h];typeof m=="string"&&(t[h]=parseFloat(m))}else Ki[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,i=[];for(let r=0;r<t.length;r++)(t[r]===null||ez(t[r]))&&i.push(r);i.length&&rz(t,i,s)}measureInitialState(){const{element:t,unresolvedKeyframes:s,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ki[i](t.measureViewportBox(),window.getComputedStyle(t.current)),s[0]=this.measuredOrigin;const r=s[s.length-1];r!==void 0&&t.getValue(i,r).jump(r,!1)}measureEndState(){const{element:t,name:s,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const r=t.getValue(s);r&&r.jump(this.measuredOrigin,!1);const l=i.length-1,u=i[l];i[l]=Ki[s](t.measureViewportBox(),window.getComputedStyle(t.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,h])=>{t.getValue(f).set(h)}),this.resolveNoneKeyframes()}}function NE(e,t,s){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const r=document.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const RE=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ME(e){return FT(e)&&"offsetHeight"in e}const OS=30,cz=e=>!isNaN(parseFloat(e)),yl={current:void 0};class uz{constructor(t,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const r=Tn.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=s.owner}setCurrent(t){this.current=t,this.updatedAt=Tn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=cz(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new Cg);const i=this.events[t].add(s);return t==="change"?()=>{i(),tt.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,s,i){this.set(s),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,s=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return yl.current&&yl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Tn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>OS)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,OS);return $T(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=t(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wi(e,t){return new uz(e,t)}const{schedule:Lg}=nE(queueMicrotask,!1),xa={x:!1,y:!1};function _E(){return xa.x||xa.y}function dz(e){return e==="x"||e==="y"?xa[e]?null:(xa[e]=!0,()=>{xa[e]=!1}):xa.x||xa.y?null:(xa.x=xa.y=!0,()=>{xa.x=xa.y=!1})}function OE(e,t){const s=NE(e),i=new AbortController,r={passive:!0,...t,signal:i.signal};return[s,r,()=>i.abort()]}function DS(e){return!(e.pointerType==="touch"||_E())}function fz(e,t,s={}){const[i,r,l]=OE(e,s),u=f=>{if(!DS(f))return;const{target:h}=f,m=t(h,f);if(typeof m!="function"||!h)return;const y=g=>{DS(g)&&(m(g),h.removeEventListener("pointerleave",y))};h.addEventListener("pointerleave",y,r)};return i.forEach(f=>{f.addEventListener("pointerenter",u,r)}),l}const DE=(e,t)=>t?e===t?!0:DE(e,t.parentElement):!1,zg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,mz=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function hz(e){return mz.has(e.tagName)||e.tabIndex!==-1}const Pu=new WeakSet;function PS(e){return t=>{t.key==="Enter"&&e(t)}}function Sh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const pz=(e,t)=>{const s=e.currentTarget;if(!s)return;const i=PS(()=>{if(Pu.has(s))return;Sh(s,"down");const r=PS(()=>{Sh(s,"up")}),l=()=>Sh(s,"cancel");s.addEventListener("keyup",r,t),s.addEventListener("blur",l,t)});s.addEventListener("keydown",i,t),s.addEventListener("blur",()=>s.removeEventListener("keydown",i),t)};function kS(e){return zg(e)&&!_E()}function gz(e,t,s={}){const[i,r,l]=OE(e,s),u=f=>{const h=f.currentTarget;if(!kS(f))return;Pu.add(h);const m=t(h,f),y=(S,C)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",b),Pu.has(h)&&Pu.delete(h),kS(S)&&typeof m=="function"&&m(S,{success:C})},g=S=>{y(S,h===window||h===document||s.useGlobalTarget||DE(h,S.target))},b=S=>{y(S,!1)};window.addEventListener("pointerup",g,r),window.addEventListener("pointercancel",b,r)};return i.forEach(f=>{(s.useGlobalTarget?window:f).addEventListener("pointerdown",u,r),ME(f)&&(f.addEventListener("focus",m=>pz(m,r)),!hz(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function PE(e){return FT(e)&&"ownerSVGElement"in e}function vz(e){return PE(e)&&e.tagName==="svg"}function yz(...e){const t=!Array.isArray(e[0]),s=t?0:-1,i=e[0+s],r=e[1+s],l=e[2+s],u=e[3+s],f=hE(r,l,u);return t?f(i):f}const Ot=e=>!!(e&&e.getVelocity);function xz(e,t,s){const i=e.get();let r=null,l=i,u;const f=typeof i=="string"?i.replace(/[\d.-]/g,""):void 0,h=()=>{r&&(r.stop(),r=null)},m=()=>{h(),r=new Cd({keyframes:[zS(e.get()),zS(l)],velocity:e.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...s,onUpdate:u})};if(e.attach((y,g)=>{l=y,u=b=>g(LS(b,f)),tt.postRender(m)},h),Ot(t)){const y=t.on("change",b=>e.set(LS(b,f))),g=e.on("destroy",y);return()=>{y(),g()}}return h}function LS(e,t){return t?e+t:e}function zS(e){return typeof e=="number"?e:parseFloat(e)}const bz=[...EE,_t,ci],Sz=e=>bz.find(TE(e)),ql=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function VS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wz(...e){return t=>{let s=!1;const i=e.map(r=>{const l=VS(r,t);return!s&&typeof l=="function"&&(s=!0),l});if(s)return()=>{for(let r=0;r<i.length;r++){const l=i[r];typeof l=="function"?l():VS(e[r],null)}}}}function Cz(...e){return x.useCallback(wz(...e),e)}class Tz extends x.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(s&&t.isPresent&&!this.props.isPresent){const i=s.offsetParent,r=ME(i)&&i.offsetWidth||0,l=this.props.sizeRef.current;l.height=s.offsetHeight||0,l.width=s.offsetWidth||0,l.top=s.offsetTop,l.left=s.offsetLeft,l.right=r-l.width-l.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Ez({children:e,isPresent:t,anchorX:s,root:i}){const r=x.useId(),l=x.useRef(null),u=x.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:f}=x.useContext(ql),h=Cz(l,e?.ref);return x.useInsertionEffect(()=>{const{width:m,height:y,top:g,left:b,right:S}=u.current;if(t||!l.current||!m||!y)return;const C=s==="left"?`left: ${b}`:`right: ${S}`;l.current.dataset.motionPopId=r;const T=document.createElement("style");f&&(T.nonce=f);const j=i??document.head;return j.appendChild(T),T.sheet&&T.sheet.insertRule(`
|
|
56
|
+
[data-motion-pop-id="${r}"] {
|
|
57
|
+
position: absolute !important;
|
|
58
|
+
width: ${m}px !important;
|
|
59
|
+
height: ${y}px !important;
|
|
60
|
+
${C}px !important;
|
|
61
|
+
top: ${g}px !important;
|
|
62
|
+
}
|
|
63
|
+
`),()=>{j.contains(T)&&j.removeChild(T)}},[t]),d.jsx(Tz,{isPresent:t,childRef:l,sizeRef:u,children:x.cloneElement(e,{ref:h})})}const jz=({children:e,initial:t,isPresent:s,onExitComplete:i,custom:r,presenceAffectsLayout:l,mode:u,anchorX:f,root:h})=>{const m=Ul(Az),y=x.useId();let g=!0,b=x.useMemo(()=>(g=!1,{id:y,initial:t,isPresent:s,custom:r,onExitComplete:S=>{m.set(S,!0);for(const C of m.values())if(!C)return;i&&i()},register:S=>(m.set(S,!1),()=>m.delete(S))}),[s,m,i]);return l&&g&&(b={...b}),x.useMemo(()=>{m.forEach((S,C)=>m.set(C,!1))},[s]),x.useEffect(()=>{!s&&!m.size&&i&&i()},[s]),u==="popLayout"&&(e=d.jsx(Ez,{isPresent:s,anchorX:f,root:h,children:e})),d.jsx(wd.Provider,{value:b,children:e})};function Az(){return new Map}function kE(e=!0){const t=x.useContext(wd);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:i,register:r}=t,l=x.useId();x.useEffect(()=>{if(e)return r(l)},[e]);const u=x.useCallback(()=>e&&i&&i(l),[l,i,e]);return!s&&i?[!1,u]:[!0]}const bu=e=>e.key||"";function BS(e){const t=[];return x.Children.forEach(e,s=>{x.isValidElement(s)&&t.push(s)}),t}const Vg=({children:e,custom:t,initial:s=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:l="sync",propagate:u=!1,anchorX:f="left",root:h})=>{const[m,y]=kE(u),g=x.useMemo(()=>BS(e),[e]),b=u&&!m?[]:g.map(bu),S=x.useRef(!0),C=x.useRef(g),T=Ul(()=>new Map),[j,E]=x.useState(g),[A,R]=x.useState(g);yg(()=>{S.current=!1,C.current=g;for(let z=0;z<A.length;z++){const D=bu(A[z]);b.includes(D)?T.delete(D):T.get(D)!==!0&&T.set(D,!1)}},[A,b.length,b.join("-")]);const _=[];if(g!==j){let z=[...g];for(let D=0;D<A.length;D++){const P=A[D],X=bu(P);b.includes(X)||(z.splice(D,0,P),_.push(P))}return l==="wait"&&_.length&&(z=_),R(BS(z)),E(g),null}const{forceRender:M}=x.useContext(gg);return d.jsx(d.Fragment,{children:A.map(z=>{const D=bu(z),P=u&&!m?!1:g===A||b.includes(D),X=()=>{if(T.has(D))T.set(D,!0);else return;let Q=!0;T.forEach(J=>{J||(Q=!1)}),Q&&(M?.(),R(C.current),u&&y?.(),i&&i())};return d.jsx(jz,{isPresent:P,initial:!S.current||s?void 0:!1,custom:t,presenceAffectsLayout:r,mode:l,root:h,onExitComplete:P?void 0:X,anchorX:f,children:z},D)})})},LE=x.createContext({strict:!1}),US={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},tr={};for(const e in US)tr[e]={isEnabled:t=>US[e].some(s=>!!t[s])};function Nz(e){for(const t in e)tr[t]={...tr[t],...e[t]}}const Rz=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function td(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Rz.has(e)}let zE=e=>!td(e);function Mz(e){typeof e=="function"&&(zE=t=>t.startsWith("on")?!td(t):e(t))}try{Mz(require("@emotion/is-prop-valid").default)}catch{}function _z(e,t,s){const i={};for(const r in e)r==="values"&&typeof e.values=="object"||(zE(r)||s===!0&&td(r)||!t&&!td(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}const Td=x.createContext({});function Ed(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ml(e){return typeof e=="string"||Array.isArray(e)}const Bg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ug=["initial",...Bg];function jd(e){return Ed(e.animate)||Ug.some(t=>Ml(e[t]))}function VE(e){return!!(jd(e)||e.variants)}function Oz(e,t){if(jd(e)){const{initial:s,animate:i}=e;return{initial:s===!1||Ml(s)?s:void 0,animate:Ml(i)?i:void 0}}return e.inherit!==!1?t:{}}function Dz(e){const{initial:t,animate:s}=Oz(e,x.useContext(Td));return x.useMemo(()=>({initial:t,animate:s}),[IS(t),IS(s)])}function IS(e){return Array.isArray(e)?e.join(" "):e}function HS(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(he.test(e))e=parseFloat(e);else return e;const s=HS(e,t.target.x),i=HS(e,t.target.y);return`${s}% ${i}%`}},Pz={correct:(e,{treeScale:t,projectionDelta:s})=>{const i=e,r=ci.parse(e);if(r.length>5)return i;const l=ci.createTransformer(e),u=typeof r[0]!="number"?1:0,f=s.x.scale*t.x,h=s.y.scale*t.y;r[0+u]/=f,r[1+u]/=h;const m=pt(f,h,.5);return typeof r[2+u]=="number"&&(r[2+u]/=m),typeof r[3+u]=="number"&&(r[3+u]/=m),l(r)}},xp={borderRadius:{...cl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cl,borderTopRightRadius:cl,borderBottomLeftRadius:cl,borderBottomRightRadius:cl,boxShadow:Pz};function BE(e,{layout:t,layoutId:s}){return hr.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!xp[e]||e==="opacity")}const kz={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Lz=mr.length;function zz(e,t,s){let i="",r=!0;for(let l=0;l<Lz;l++){const u=mr[l],f=e[u];if(f===void 0)continue;let h=!0;if(typeof f=="number"?h=f===(u.startsWith("scale")?1:0):h=parseFloat(f)===0,!h||s){const m=RE(f,kg[u]);if(!h){r=!1;const y=kz[u]||u;i+=`${y}(${m}) `}s&&(t[u]=m)}}return i=i.trim(),s?i=s(t,r?"":i):r&&(i="none"),i}function Ig(e,t,s){const{style:i,vars:r,transformOrigin:l}=e;let u=!1,f=!1;for(const h in t){const m=t[h];if(hr.has(h)){u=!0;continue}else if(sE(h)){r[h]=m;continue}else{const y=RE(m,kg[h]);h.startsWith("origin")?(f=!0,l[h]=y):i[h]=y}}if(t.transform||(u||s?i.transform=zz(t,e.transform,s):i.transform&&(i.transform="none")),f){const{originX:h="50%",originY:m="50%",originZ:y=0}=l;i.transformOrigin=`${h} ${m} ${y}`}}const Hg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function UE(e,t,s){for(const i in t)!Ot(t[i])&&!BE(i,s)&&(e[i]=t[i])}function Vz({transformTemplate:e},t){return x.useMemo(()=>{const s=Hg();return Ig(s,t,e),Object.assign({},s.vars,s.style)},[t])}function Bz(e,t){const s=e.style||{},i={};return UE(i,s,e),Object.assign(i,Vz(e,t)),i}function Uz(e,t){const s={},i=Bz(e,t);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=i,s}const Iz={offset:"stroke-dashoffset",array:"stroke-dasharray"},Hz={offset:"strokeDashoffset",array:"strokeDasharray"};function Fz(e,t,s=1,i=0,r=!0){e.pathLength=1;const l=r?Iz:Hz;e[l.offset]=he.transform(-i);const u=he.transform(t),f=he.transform(s);e[l.array]=`${u} ${f}`}function IE(e,{attrX:t,attrY:s,attrScale:i,pathLength:r,pathSpacing:l=1,pathOffset:u=0,...f},h,m,y){if(Ig(e,f,m),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:b}=e;g.transform&&(b.transform=g.transform,delete g.transform),(b.transform||g.transformOrigin)&&(b.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),b.transform&&(b.transformBox=y?.transformBox??"fill-box",delete g.transformBox),t!==void 0&&(g.x=t),s!==void 0&&(g.y=s),i!==void 0&&(g.scale=i),r!==void 0&&Fz(g,r,l,u,!1)}const HE=()=>({...Hg(),attrs:{}}),FE=e=>typeof e=="string"&&e.toLowerCase()==="svg";function qz(e,t,s,i){const r=x.useMemo(()=>{const l=HE();return IE(l,t,FE(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};UE(l,e.style,e),r.style={...l,...r.style}}return r}const $z=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Fg(e){return typeof e!="string"||e.includes("-")?!1:!!($z.indexOf(e)>-1||/[A-Z]/u.test(e))}function Kz(e,t,s,{latestValues:i},r,l=!1,u){const h=(u??Fg(e)?qz:Uz)(t,i,r,e),m=_z(t,typeof e=="string",l),y=e!==x.Fragment?{...m,...h,ref:s}:{},{children:g}=t,b=x.useMemo(()=>Ot(g)?g.get():g,[g]);return x.createElement(e,{...y,children:b})}function FS(e){const t=[{},{}];return e?.values.forEach((s,i)=>{t[0][i]=s.get(),t[1][i]=s.getVelocity()}),t}function qg(e,t,s,i){if(typeof t=="function"){const[r,l]=FS(i);t=t(s!==void 0?s:e.custom,r,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,l]=FS(i);t=t(s!==void 0?s:e.custom,r,l)}return t}function ku(e){return Ot(e)?e.get():e}function Gz({scrapeMotionValuesFromProps:e,createRenderState:t},s,i,r){return{latestValues:Yz(s,i,r,e),renderState:t()}}function Yz(e,t,s,i){const r={},l=i(e,{});for(const b in l)r[b]=ku(l[b]);let{initial:u,animate:f}=e;const h=jd(e),m=VE(e);t&&m&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let y=s?s.initial===!1:!1;y=y||u===!1;const g=y?f:u;if(g&&typeof g!="boolean"&&!Ed(g)){const b=Array.isArray(g)?g:[g];for(let S=0;S<b.length;S++){const C=qg(e,b[S]);if(C){const{transitionEnd:T,transition:j,...E}=C;for(const A in E){let R=E[A];if(Array.isArray(R)){const _=y?R.length-1:0;R=R[_]}R!==null&&(r[A]=R)}for(const A in T)r[A]=T[A]}}}return r}const qE=e=>(t,s)=>{const i=x.useContext(Td),r=x.useContext(wd),l=()=>Gz(e,t,i,r);return s?l():Ul(l)};function $g(e,t,s){const{style:i}=e,r={};for(const l in i)(Ot(i[l])||t.style&&Ot(t.style[l])||BE(l,e)||s?.getValue(l)?.liveStyle!==void 0)&&(r[l]=i[l]);return r}const Xz=qE({scrapeMotionValuesFromProps:$g,createRenderState:Hg});function $E(e,t,s){const i=$g(e,t,s);for(const r in e)if(Ot(e[r])||Ot(t[r])){const l=mr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[l]=e[r]}return i}const Zz=qE({scrapeMotionValuesFromProps:$E,createRenderState:HE}),Qz=Symbol.for("motionComponentSymbol");function qo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Wz(e,t,s){return x.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),s&&(typeof s=="function"?s(i):qo(s)&&(s.current=i))},[t])}const Kg=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Jz="framerAppearId",KE="data-"+Kg(Jz),GE=x.createContext({});function eV(e,t,s,i,r,l){const{visualElement:u}=x.useContext(Td),f=x.useContext(LE),h=x.useContext(wd),m=x.useContext(ql).reducedMotion,y=x.useRef(null);i=i||f.renderer,!y.current&&i&&(y.current=i(e,{visualState:t,parent:u,props:s,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:m,isSVG:l}));const g=y.current,b=x.useContext(GE);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&tV(y.current,s,r,b);const S=x.useRef(!1);x.useInsertionEffect(()=>{g&&S.current&&g.update(s,h)});const C=s[KE],T=x.useRef(!!C&&!window.MotionHandoffIsComplete?.(C)&&window.MotionHasOptimisedAnimation?.(C));return yg(()=>{g&&(S.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),T.current&&g.animationState&&g.animationState.animateChanges())}),x.useEffect(()=>{g&&(!T.current&&g.animationState&&g.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(C)}),T.current=!1),g.enteringChildren=void 0)}),g}function tV(e,t,s,i){const{layoutId:r,layout:l,drag:u,dragConstraints:f,layoutScroll:h,layoutRoot:m,layoutCrossfade:y}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:YE(e.parent)),e.projection.setOptions({layoutId:r,layout:l,alwaysMeasureLayout:!!u||f&&qo(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:y,layoutScroll:h,layoutRoot:m})}function YE(e){if(e)return e.options.allowProjection!==!1?e.projection:YE(e.parent)}function wh(e,{forwardMotionProps:t=!1,type:s}={},i,r){i&&Nz(i);const l=s?s==="svg":Fg(e),u=l?Zz:Xz;function f(m,y){let g;const b={...x.useContext(ql),...m,layoutId:nV(m)},{isStatic:S}=b,C=Dz(m),T=u(m,S);if(!S&&vg){aV();const j=sV(b);g=j.MeasureLayout,C.visualElement=eV(e,T,b,r,j.ProjectionNode,l)}return d.jsxs(Td.Provider,{value:C,children:[g&&C.visualElement?d.jsx(g,{visualElement:C.visualElement,...b}):null,Kz(e,m,Wz(T,C.visualElement,y),T,S,t,l)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=x.forwardRef(f);return h[Qz]=e,h}function nV({layoutId:e}){const t=x.useContext(gg).id;return t&&e!==void 0?t+"-"+e:e}function aV(e,t){x.useContext(LE).strict}function sV(e){const{drag:t,layout:s}=tr;if(!t&&!s)return{};const i={...t,...s};return{MeasureLayout:t?.isEnabled(e)||s?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function iV(e,t){if(typeof Proxy>"u")return wh;const s=new Map,i=(l,u)=>wh(l,u,e,t),r=(l,u)=>i(l,u);return new Proxy(r,{get:(l,u)=>u==="create"?i:(s.has(u)||s.set(u,wh(u,void 0,e,t)),s.get(u))})}function XE({top:e,left:t,right:s,bottom:i}){return{x:{min:t,max:s},y:{min:e,max:i}}}function oV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rV(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:i.y,right:i.x}}function Ch(e){return e===void 0||e===1}function bp({scale:e,scaleX:t,scaleY:s}){return!Ch(e)||!Ch(t)||!Ch(s)}function Li(e){return bp(e)||ZE(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ZE(e){return qS(e.x)||qS(e.y)}function qS(e){return e&&e!=="0%"}function nd(e,t,s){const i=e-s,r=t*i;return s+r}function $S(e,t,s,i,r){return r!==void 0&&(e=nd(e,r,i)),nd(e,s,i)+t}function Sp(e,t=0,s=1,i,r){e.min=$S(e.min,t,s,i,r),e.max=$S(e.max,t,s,i,r)}function QE(e,{x:t,y:s}){Sp(e.x,t.translate,t.scale,t.originPoint),Sp(e.y,s.translate,s.scale,s.originPoint)}const KS=.999999999999,GS=1.0000000000001;function lV(e,t,s,i=!1){const r=s.length;if(!r)return;t.x=t.y=1;let l,u;for(let f=0;f<r;f++){l=s[f],u=l.projectionDelta;const{visualElement:h}=l.options;h&&h.props.style&&h.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&Ko(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),u&&(t.x*=u.x.scale,t.y*=u.y.scale,QE(e,u)),i&&Li(l.latestValues)&&Ko(e,l.latestValues))}t.x<GS&&t.x>KS&&(t.x=1),t.y<GS&&t.y>KS&&(t.y=1)}function $o(e,t){e.min=e.min+t,e.max=e.max+t}function YS(e,t,s,i,r=.5){const l=pt(e.min,e.max,r);Sp(e,t,s,l,i)}function Ko(e,t){YS(e.x,t.x,t.scaleX,t.scale,t.originX),YS(e.y,t.y,t.scaleY,t.scale,t.originY)}function WE(e,t){return XE(rV(e.getBoundingClientRect(),t))}function cV(e,t,s){const i=WE(e,s),{scroll:r}=t;return r&&($o(i.x,r.offset.x),$o(i.y,r.offset.y)),i}const XS=()=>({translate:0,scale:1,origin:0,originPoint:0}),Go=()=>({x:XS(),y:XS()}),ZS=()=>({min:0,max:0}),It=()=>({x:ZS(),y:ZS()}),wp={current:null},JE={current:!1};function uV(){if(JE.current=!0,!!vg)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>wp.current=e.matches;e.addEventListener("change",t),t()}else wp.current=!1}const dV=new WeakMap;function fV(e,t,s){for(const i in t){const r=t[i],l=s[i];if(Ot(r))e.addValue(i,r);else if(Ot(l))e.addValue(i,Wi(r,{owner:e}));else if(l!==r)if(e.hasValue(i)){const u=e.getValue(i);u.liveStyle===!0?u.jump(r):u.hasAnimated||u.set(r)}else{const u=e.getStaticValue(i);e.addValue(i,Wi(u!==void 0?u:r,{owner:e}))}}for(const i in s)t[i]===void 0&&e.removeValue(i);return t}const QS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class mV{scrapeMotionValuesFromProps(t,s,i){return{}}constructor({parent:t,props:s,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:l,visualState:u},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Dg,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=Tn.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,tt.render(this.render,!1,!0))};const{latestValues:h,renderState:m}=u;this.latestValues=h,this.baseTarget={...h},this.initialValues=s.initial?{...h}:{},this.renderState=m,this.parent=t,this.props=s,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=f,this.blockInitialAnimation=!!l,this.isControllingVariants=jd(s),this.isVariantNode=VE(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:y,...g}=this.scrapeMotionValuesFromProps(s,{},this);for(const b in g){const S=g[b];h[b]!==void 0&&Ot(S)&&S.set(h[b])}}mount(t){this.current=t,dV.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),JE.current||uV(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:wp.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Rs(this.notifyUpdate),Rs(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const s=this.features[t];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,s){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=hr.has(t);i&&this.onBindTransform&&this.onBindTransform();const r=s.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&tt.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,s)),this.valueSubscriptions.set(t,()=>{r(),l&&l(),s.owner&&s.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in tr){const s=tr[t];if(!s)continue;const{isEnabled:i,Feature:r}=s;if(!this.features[t]&&r&&i(this.props)&&(this.features[t]=new r(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):It()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let i=0;i<QS.length;i++){const r=QS[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const l="on"+r,u=t[l];u&&(this.propEventSubscriptions[r]=this.on(r,u))}this.prevMotionValues=fV(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(t),()=>s.variantChildren.delete(t)}addValue(t,s){const i=this.values.get(t);s!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,s),this.values.set(t,s),this.latestValues[t]=s.get())}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&s!==void 0&&(i=Wi(s===null?void 0:s,{owner:this}),this.addValue(t,i)),i}readValue(t,s){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(HT(i)||qT(i))?i=parseFloat(i):!Sz(i)&&ci.test(s)&&(i=AE(t,s)),this.setBaseTarget(t,Ot(i)?i.get():i)),Ot(i)?i.get():i}setBaseTarget(t,s){this.baseTarget[t]=s}getBaseTarget(t){const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const l=qg(this.props,s,this.presenceContext?.custom);l&&(i=l[t])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!Ot(r)?r:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,s){return this.events[t]||(this.events[t]=new Cg),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}scheduleRenderMicrotask(){Lg.render(this.render)}}class ej extends mV{constructor(){super(...arguments),this.KeyframeResolver=lz}sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){return t.style?t.style[s]:void 0}removeValueFromRenderState(t,{vars:s,style:i}){delete s[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ot(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function tj(e,{style:t,vars:s},i,r){const l=e.style;let u;for(u in t)l[u]=t[u];r?.applyProjectionStyles(l,i);for(u in s)l.setProperty(u,s[u])}function hV(e){return window.getComputedStyle(e)}class pV extends ej{constructor(){super(...arguments),this.type="html",this.renderInstance=tj}readValueFromInstance(t,s){if(hr.has(s))return this.projection?.isProjecting?fp(s):A3(t,s);{const i=hV(t),r=(sE(s)?i.getPropertyValue(s):i[s])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:s}){return WE(t,s)}build(t,s,i){Ig(t,s,i.transformTemplate)}scrapeMotionValuesFromProps(t,s,i){return $g(t,s,i)}}const nj=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function gV(e,t,s,i){tj(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(nj.has(r)?r:Kg(r),t.attrs[r])}class vV extends ej{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=It}getBaseTargetFromProps(t,s){return t[s]}readValueFromInstance(t,s){if(hr.has(s)){const i=jE(s);return i&&i.default||0}return s=nj.has(s)?s:Kg(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,i){return $E(t,s,i)}build(t,s,i){IE(t,s,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,s,i,r){gV(t,s,i,r)}mount(t){this.isSVGTag=FE(t.tagName),super.mount(t)}}const yV=(e,t)=>t.isSVG??Fg(e)?new vV(t):new pV(t,{allowProjection:e!==x.Fragment});function Qo(e,t,s){const i=e.getProps();return qg(i,t,s!==void 0?s:i.custom,e)}const Cp=e=>Array.isArray(e);function xV(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,Wi(s))}function bV(e){return Cp(e)?e[e.length-1]||0:e}function SV(e,t){const s=Qo(e,t);let{transitionEnd:i={},transition:r={},...l}=s||{};l={...l,...i};for(const u in l){const f=bV(l[u]);xV(e,u,f)}}function wV(e){return!!(Ot(e)&&e.add)}function Tp(e,t){const s=e.getValue("willChange");if(wV(s))return s.add(t);if(!s&&Ns.WillChange){const i=new Ns.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function aj(e){return e.props[KE]}const CV=e=>e!==null;function TV(e,{repeat:t,repeatType:s="loop"},i){const r=e.filter(CV),l=t&&s!=="loop"&&t%2===1?0:r.length-1;return r[l]}const EV={type:"spring",stiffness:500,damping:25,restSpeed:10},jV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),AV={type:"keyframes",duration:.8},NV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},RV=(e,{keyframes:t})=>t.length>2?AV:hr.has(e)?e.startsWith("scale")?jV(t[1]):EV:NV;function MV({when:e,delay:t,delayChildren:s,staggerChildren:i,staggerDirection:r,repeat:l,repeatType:u,repeatDelay:f,from:h,elapsed:m,...y}){return!!Object.keys(y).length}const Gg=(e,t,s,i={},r,l)=>u=>{const f=Pg(i,e)||{},h=f.delay||i.delay||0;let{elapsed:m=0}=i;m=m-Ia(h);const y={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-m,onUpdate:b=>{t.set(b),f.onUpdate&&f.onUpdate(b)},onComplete:()=>{u(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:r};MV(f)||Object.assign(y,RV(e,y)),y.duration&&(y.duration=Ia(y.duration)),y.repeatDelay&&(y.repeatDelay=Ia(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let g=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(vp(y),y.delay===0&&(g=!0)),(Ns.instantAnimations||Ns.skipAnimations)&&(g=!0,vp(y),y.delay=0),y.allowFlatten=!f.type&&!f.ease,g&&!l&&t.get()!==void 0){const b=TV(y.keyframes,f);if(b!==void 0){tt.update(()=>{y.onUpdate(b),y.onComplete()});return}}return f.isSync?new Cd(y):new Z3(y)};function _V({protectedKeys:e,needsAnimating:t},s){const i=e.hasOwnProperty(s)&&t[s]!==!0;return t[s]=!1,i}function sj(e,t,{delay:s=0,transitionOverride:i,type:r}={}){let{transition:l=e.getDefaultTransition(),transitionEnd:u,...f}=t;i&&(l=i);const h=[],m=r&&e.animationState&&e.animationState.getState()[r];for(const y in f){const g=e.getValue(y,e.latestValues[y]??null),b=f[y];if(b===void 0||m&&_V(m,y))continue;const S={delay:s,...Pg(l||{},y)},C=g.get();if(C!==void 0&&!g.isAnimating&&!Array.isArray(b)&&b===C&&!S.velocity)continue;let T=!1;if(window.MotionHandoffAnimation){const E=aj(e);if(E){const A=window.MotionHandoffAnimation(E,y,tt);A!==null&&(S.startTime=A,T=!0)}}Tp(e,y),g.start(Gg(y,g,b,e.shouldReduceMotion&&CE.has(y)?{type:!1}:S,e,T));const j=g.animation;j&&h.push(j)}return u&&Promise.all(h).then(()=>{tt.update(()=>{u&&SV(e,u)})}),h}function ij(e,t,s,i=0,r=1){const l=Array.from(e).sort((m,y)=>m.sortNodePosition(y)).indexOf(t),u=e.size,f=(u-1)*i;return typeof s=="function"?s(l,u):r===1?l*i:f-l*i}function Ep(e,t,s={}){const i=Qo(e,t,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=i||{};s.transitionOverride&&(r=s.transitionOverride);const l=i?()=>Promise.all(sj(e,i,s)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:m=0,staggerChildren:y,staggerDirection:g}=r;return OV(e,t,h,m,y,g,s)}:()=>Promise.resolve(),{when:f}=r;if(f){const[h,m]=f==="beforeChildren"?[l,u]:[u,l];return h().then(()=>m())}else return Promise.all([l(),u(s.delay)])}function OV(e,t,s=0,i=0,r=0,l=1,u){const f=[];for(const h of e.variantChildren)h.notify("AnimationStart",t),f.push(Ep(h,t,{...u,delay:s+(typeof i=="function"?0:i)+ij(e.variantChildren,h,i,r,l)}).then(()=>h.notify("AnimationComplete",t)));return Promise.all(f)}function DV(e,t,s={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const r=t.map(l=>Ep(e,l,s));i=Promise.all(r)}else if(typeof t=="string")i=Ep(e,t,s);else{const r=typeof t=="function"?Qo(e,t,s.custom):t;i=Promise.all(sj(e,r,s))}return i.then(()=>{e.notify("AnimationComplete",t)})}function oj(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let i=0;i<s;i++)if(t[i]!==e[i])return!1;return!0}const PV=Ug.length;function rj(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?rj(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const t={};for(let s=0;s<PV;s++){const i=Ug[s],r=e.props[i];(Ml(r)||r===!1)&&(t[i]=r)}return t}const kV=[...Bg].reverse(),LV=Bg.length;function zV(e){return t=>Promise.all(t.map(({animation:s,options:i})=>DV(e,s,i)))}function VV(e){let t=zV(e),s=WS(),i=!0;const r=h=>(m,y)=>{const g=Qo(e,y,h==="exit"?e.presenceContext?.custom:void 0);if(g){const{transition:b,transitionEnd:S,...C}=g;m={...m,...C,...S}}return m};function l(h){t=h(e)}function u(h){const{props:m}=e,y=rj(e.parent)||{},g=[],b=new Set;let S={},C=1/0;for(let j=0;j<LV;j++){const E=kV[j],A=s[E],R=m[E]!==void 0?m[E]:y[E],_=Ml(R),M=E===h?A.isActive:null;M===!1&&(C=j);let z=R===y[E]&&R!==m[E]&&_;if(z&&i&&e.manuallyAnimateOnMount&&(z=!1),A.protectedKeys={...S},!A.isActive&&M===null||!R&&!A.prevProp||Ed(R)||typeof R=="boolean")continue;const D=BV(A.prevProp,R);let P=D||E===h&&A.isActive&&!z&&_||j>C&&_,X=!1;const Q=Array.isArray(R)?R:[R];let J=Q.reduce(r(E),{});M===!1&&(J={});const{prevResolvedValues:te={}}=A,ne={...te,...J},re=H=>{P=!0,b.has(H)&&(X=!0,b.delete(H)),A.needsAnimating[H]=!0;const B=e.getValue(H);B&&(B.liveStyle=!1)};for(const H in ne){const B=J[H],le=te[H];if(S.hasOwnProperty(H))continue;let G=!1;Cp(B)&&Cp(le)?G=!oj(B,le):G=B!==le,G?B!=null?re(H):b.add(H):B!==void 0&&b.has(H)?re(H):A.protectedKeys[H]=!0}A.prevProp=R,A.prevResolvedValues=J,A.isActive&&(S={...S,...J}),i&&e.blockInitialAnimation&&(P=!1);const de=z&&D;P&&(!de||X)&&g.push(...Q.map(H=>{const B={type:E};if(typeof H=="string"&&i&&!de&&e.manuallyAnimateOnMount&&e.parent){const{parent:le}=e,G=Qo(le,H);if(le.enteringChildren&&G){const{delayChildren:O}=G.transition||{};B.delay=ij(le.enteringChildren,e,O)}}return{animation:H,options:B}}))}if(b.size){const j={};if(typeof m.initial!="boolean"){const E=Qo(e,Array.isArray(m.initial)?m.initial[0]:m.initial);E&&E.transition&&(j.transition=E.transition)}b.forEach(E=>{const A=e.getBaseTarget(E),R=e.getValue(E);R&&(R.liveStyle=!0),j[E]=A??null}),g.push({animation:j})}let T=!!g.length;return i&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(T=!1),i=!1,T?t(g):Promise.resolve()}function f(h,m){if(s[h].isActive===m)return Promise.resolve();e.variantChildren?.forEach(g=>g.animationState?.setActive(h,m)),s[h].isActive=m;const y=u(h);for(const g in s)s[g].protectedKeys={};return y}return{animateChanges:u,setActive:f,setAnimateFunction:l,getState:()=>s,reset:()=>{s=WS()}}}function BV(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!oj(t,e):!1}function ki(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function WS(){return{animate:ki(!0),whileInView:ki(),whileHover:ki(),whileTap:ki(),whileDrag:ki(),whileFocus:ki(),exit:ki()}}class mi{constructor(t){this.isMounted=!1,this.node=t}update(){}}class UV extends mi{constructor(t){super(t),t.animationState||(t.animationState=VV(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ed(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let IV=0;class HV extends mi{constructor(){super(...arguments),this.id=IV++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const r=this.node.animationState.setActive("exit",!t);s&&!t&&r.then(()=>{s(this.id)})}mount(){const{register:t,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const FV={animation:{Feature:UV},exit:{Feature:HV}};function _l(e,t,s,i={passive:!0}){return e.addEventListener(t,s,i),()=>e.removeEventListener(t,s)}function $l(e){return{point:{x:e.pageX,y:e.pageY}}}const qV=e=>t=>zg(t)&&e(t,$l(t));function xl(e,t,s,i){return _l(e,t,qV(s),i)}const lj=1e-4,$V=1-lj,KV=1+lj,cj=.01,GV=0-cj,YV=0+cj;function dn(e){return e.max-e.min}function XV(e,t,s){return Math.abs(e-t)<=s}function JS(e,t,s,i=.5){e.origin=i,e.originPoint=pt(t.min,t.max,e.origin),e.scale=dn(s)/dn(t),e.translate=pt(s.min,s.max,e.origin)-e.originPoint,(e.scale>=$V&&e.scale<=KV||isNaN(e.scale))&&(e.scale=1),(e.translate>=GV&&e.translate<=YV||isNaN(e.translate))&&(e.translate=0)}function bl(e,t,s,i){JS(e.x,t.x,s.x,i?i.originX:void 0),JS(e.y,t.y,s.y,i?i.originY:void 0)}function e1(e,t,s){e.min=s.min+t.min,e.max=e.min+dn(t)}function ZV(e,t,s){e1(e.x,t.x,s.x),e1(e.y,t.y,s.y)}function t1(e,t,s){e.min=t.min-s.min,e.max=e.min+dn(t)}function ad(e,t,s){t1(e.x,t.x,s.x),t1(e.y,t.y,s.y)}function la(e){return[e("x"),e("y")]}const uj=({current:e})=>e?e.ownerDocument.defaultView:null,n1=(e,t)=>Math.abs(e-t);function QV(e,t){const s=n1(e.x,t.x),i=n1(e.y,t.y);return Math.sqrt(s**2+i**2)}class dj{constructor(t,s,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:l=!1,distanceThreshold:u=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Eh(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,C=QV(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!C)return;const{point:T}=b,{timestamp:j}=Qt;this.history.push({...T,timestamp:j});const{onStart:E,onMove:A}=this.handlers;S||(E&&E(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,b)},this.handlePointerMove=(b,S)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Th(S,this.transformPagePoint),tt.update(this.updatePoint,!0)},this.handlePointerUp=(b,S)=>{this.end();const{onEnd:C,onSessionEnd:T,resumeAnimation:j}=this.handlers;if(this.dragSnapToOrigin&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=Eh(b.type==="pointercancel"?this.lastMoveEventInfo:Th(S,this.transformPagePoint),this.history);this.startEvent&&C&&C(b,E),T&&T(b,E)},!zg(t))return;this.dragSnapToOrigin=l,this.handlers=s,this.transformPagePoint=i,this.distanceThreshold=u,this.contextWindow=r||window;const f=$l(t),h=Th(f,this.transformPagePoint),{point:m}=h,{timestamp:y}=Qt;this.history=[{...m,timestamp:y}];const{onSessionStart:g}=s;g&&g(t,Eh(h,this.history)),this.removeListeners=Il(xl(this.contextWindow,"pointermove",this.handlePointerMove),xl(this.contextWindow,"pointerup",this.handlePointerUp),xl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Rs(this.updatePoint)}}function Th(e,t){return t?{point:t(e.point)}:e}function a1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Eh({point:e},t){return{point:e,delta:a1(e,fj(t)),offset:a1(e,WV(t)),velocity:JV(t,.1)}}function WV(e){return e[0]}function fj(e){return e[e.length-1]}function JV(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,i=null;const r=fj(e);for(;s>=0&&(i=e[s],!(r.timestamp-i.timestamp>Ia(t)));)s--;if(!i)return{x:0,y:0};const l=ca(r.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const u={x:(r.x-i.x)/l,y:(r.y-i.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function e6(e,{min:t,max:s},i){return t!==void 0&&e<t?e=i?pt(t,e,i.min):Math.max(e,t):s!==void 0&&e>s&&(e=i?pt(s,e,i.max):Math.min(e,s)),e}function s1(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function t6(e,{top:t,left:s,bottom:i,right:r}){return{x:s1(e.x,s,r),y:s1(e.y,t,i)}}function i1(e,t){let s=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,i]=[i,s]),{min:s,max:i}}function n6(e,t){return{x:i1(e.x,t.x),y:i1(e.y,t.y)}}function a6(e,t){let s=.5;const i=dn(e),r=dn(t);return r>i?s=Al(t.min,t.max-i,e.min):i>r&&(s=Al(e.min,e.max-r,t.min)),As(0,1,s)}function s6(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const jp=.35;function i6(e=jp){return e===!1?e=0:e===!0&&(e=jp),{x:o1(e,"left","right"),y:o1(e,"top","bottom")}}function o1(e,t,s){return{min:r1(e,t),max:r1(e,s)}}function r1(e,t){return typeof e=="number"?e:e[t]||0}const o6=new WeakMap;class r6{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=It(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:s=!1,distanceThreshold:i}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const l=g=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor($l(g).point)},u=(g,b)=>{const{drag:S,dragPropagation:C,onDragStart:T}=this.getProps();if(S&&!C&&(this.openDragLock&&this.openDragLock(),this.openDragLock=dz(S),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),la(E=>{let A=this.getAxisMotionValue(E).get()||0;if(Ha.test(A)){const{projection:R}=this.visualElement;if(R&&R.layout){const _=R.layout.layoutBox[E];_&&(A=dn(_)*(parseFloat(A)/100))}}this.originPoint[E]=A}),T&&tt.postRender(()=>T(g,b)),Tp(this.visualElement,"transform");const{animationState:j}=this.visualElement;j&&j.setActive("whileDrag",!0)},f=(g,b)=>{this.latestPointerEvent=g,this.latestPanInfo=b;const{dragPropagation:S,dragDirectionLock:C,onDirectionLock:T,onDrag:j}=this.getProps();if(!S&&!this.openDragLock)return;const{offset:E}=b;if(C&&this.currentDirection===null){this.currentDirection=l6(E),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",b.point,E),this.updateAxis("y",b.point,E),this.visualElement.render(),j&&j(g,b)},h=(g,b)=>{this.latestPointerEvent=g,this.latestPanInfo=b,this.stop(g,b),this.latestPointerEvent=null,this.latestPanInfo=null},m=()=>la(g=>this.getAnimationState(g)==="paused"&&this.getAxisMotionValue(g).animation?.play()),{dragSnapToOrigin:y}=this.getProps();this.panSession=new dj(t,{onSessionStart:l,onStart:u,onMove:f,onSessionEnd:h,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:i,contextWindow:uj(this.visualElement)})}stop(t,s){const i=t||this.latestPointerEvent,r=s||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!r||!i)return;const{velocity:u}=r;this.startAnimation(u);const{onDragEnd:f}=this.getProps();f&&tt.postRender(()=>f(i,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(t,s,i){const{drag:r}=this.getProps();if(!i||!Su(t,r,this.currentDirection))return;const l=this.getAxisMotionValue(t);let u=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(u=e6(u,this.constraints[t],this.elastic[t])),l.set(u)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&qo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=t6(i.layoutBox,t):this.constraints=!1,this.elastic=i6(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&la(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=s6(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!qo(t))return!1;const i=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const l=cV(i,r.root,this.visualElement.getTransformPagePoint());let u=n6(r.layout.layoutBox,l);if(s){const f=s(oV(u));this.hasMutatedConstraints=!!f,f&&(u=XE(f))}return u}startAnimation(t){const{drag:s,dragMomentum:i,dragElastic:r,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:f}=this.getProps(),h=this.constraints||{},m=la(y=>{if(!Su(y,s,this.currentDirection))return;let g=h&&h[y]||{};u&&(g={min:0,max:0});const b=r?200:1e6,S=r?40:1e7,C={type:"inertia",velocity:i?t[y]:0,bounceStiffness:b,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...l,...g};return this.startAxisValueAnimation(y,C)});return Promise.all(m).then(f)}startAxisValueAnimation(t,s){const i=this.getAxisMotionValue(t);return Tp(this.visualElement,t),i.start(Gg(t,i,0,s,this.visualElement,!1))}stopAnimation(){la(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){la(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),r=i[s];return r||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){la(s=>{const{drag:i}=this.getProps();if(!Su(s,i,this.currentDirection))return;const{projection:r}=this.visualElement,l=this.getAxisMotionValue(s);if(r&&r.layout){const{min:u,max:f}=r.layout.layoutBox[s];l.set(t[s]-pt(u,f,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:i}=this.visualElement;if(!qo(s)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};la(u=>{const f=this.getAxisMotionValue(u);if(f&&this.constraints!==!1){const h=f.get();r[u]=a6({min:h,max:h},this.constraints[u])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),la(u=>{if(!Su(u,t,null))return;const f=this.getAxisMotionValue(u),{min:h,max:m}=this.constraints[u];f.set(pt(h,m,r[u]))})}addListeners(){if(!this.visualElement.current)return;o6.set(this.visualElement,this);const t=this.visualElement.current,s=xl(t,"pointerdown",h=>{const{drag:m,dragListener:y=!0}=this.getProps();m&&y&&this.start(h)}),i=()=>{const{dragConstraints:h}=this.getProps();qo(h)&&h.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,l=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),tt.read(i);const u=_l(window,"resize",()=>this.scalePositionWithinConstraints()),f=r.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(la(y=>{const g=this.getAxisMotionValue(y);g&&(this.originPoint[y]+=h[y].translate,g.set(g.get()+h[y].translate))}),this.visualElement.render())}));return()=>{u(),s(),l(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:l=!1,dragElastic:u=jp,dragMomentum:f=!0}=t;return{...t,drag:s,dragDirectionLock:i,dragPropagation:r,dragConstraints:l,dragElastic:u,dragMomentum:f}}}function Su(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function l6(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class c6 extends mi{constructor(t){super(t),this.removeGroupControls=ua,this.removeListeners=ua,this.controls=new r6(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ua}update(){const{dragControls:t}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};t!==s&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const l1=e=>(t,s)=>{e&&tt.postRender(()=>e(t,s))};class u6 extends mi{constructor(){super(...arguments),this.removePointerDownListener=ua}onPointerDown(t){this.session=new dj(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:uj(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:l1(t),onStart:l1(s),onMove:i,onEnd:(l,u)=>{delete this.session,r&&tt.postRender(()=>r(l,u))}}}mount(){this.removePointerDownListener=xl(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Lu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let jh=!1;class d6 extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:i,layoutId:r}=this.props,{projection:l}=t;l&&(s.group&&s.group.add(l),i&&i.register&&r&&i.register(l),jh&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),Lu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:i,drag:r,isPresent:l}=this.props,{projection:u}=i;return u&&(u.isPresent=l,jh=!0,r||t.layoutDependency!==s||s===void 0||t.isPresent!==l?u.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?u.promote():u.relegate()||tt.postRender(()=>{const f=u.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Lg.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:i}=this.props,{projection:r}=t;jh=!0,r&&(r.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function mj(e){const[t,s]=kE(),i=x.useContext(gg);return d.jsx(d6,{...e,layoutGroup:i,switchLayoutGroup:x.useContext(GE),isPresent:t,safeToRemove:s})}function f6(e,t,s){const i=Ot(e)?e:Wi(e);return i.start(Gg("",i,t,s)),i.animation}const m6=(e,t)=>e.depth-t.depth;class h6{constructor(){this.children=[],this.isDirty=!1}add(t){xg(this.children,t),this.isDirty=!0}remove(t){bg(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(m6),this.isDirty=!1,this.children.forEach(t)}}function p6(e,t){const s=Tn.now(),i=({timestamp:r})=>{const l=r-s;l>=t&&(Rs(i),e(l-t))};return tt.setup(i,!0),()=>Rs(i)}const hj=["TopLeft","TopRight","BottomLeft","BottomRight"],g6=hj.length,c1=e=>typeof e=="string"?parseFloat(e):e,u1=e=>typeof e=="number"||he.test(e);function v6(e,t,s,i,r,l){r?(e.opacity=pt(0,s.opacity??1,y6(i)),e.opacityExit=pt(t.opacity??1,0,x6(i))):l&&(e.opacity=pt(t.opacity??1,s.opacity??1,i));for(let u=0;u<g6;u++){const f=`border${hj[u]}Radius`;let h=d1(t,f),m=d1(s,f);if(h===void 0&&m===void 0)continue;h||(h=0),m||(m=0),h===0||m===0||u1(h)===u1(m)?(e[f]=Math.max(pt(c1(h),c1(m),i),0),(Ha.test(m)||Ha.test(h))&&(e[f]+="%")):e[f]=m}(t.rotate||s.rotate)&&(e.rotate=pt(t.rotate||0,s.rotate||0,i))}function d1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const y6=pj(0,.5,WT),x6=pj(.5,.95,ua);function pj(e,t,s){return i=>i<e?0:i>t?1:s(Al(e,t,i))}function f1(e,t){e.min=t.min,e.max=t.max}function va(e,t){f1(e.x,t.x),f1(e.y,t.y)}function m1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function h1(e,t,s,i,r){return e-=t,e=nd(e,1/s,i),r!==void 0&&(e=nd(e,1/r,i)),e}function b6(e,t=0,s=1,i=.5,r,l=e,u=e){if(Ha.test(t)&&(t=parseFloat(t),t=pt(u.min,u.max,t/100)-u.min),typeof t!="number")return;let f=pt(l.min,l.max,i);e===l&&(f-=t),e.min=h1(e.min,t,s,f,r),e.max=h1(e.max,t,s,f,r)}function p1(e,t,[s,i,r],l,u){b6(e,t[s],t[i],t[r],t.scale,l,u)}const S6=["x","scaleX","originX"],w6=["y","scaleY","originY"];function g1(e,t,s,i){p1(e.x,t,S6,s?s.x:void 0,i?i.x:void 0),p1(e.y,t,w6,s?s.y:void 0,i?i.y:void 0)}function v1(e){return e.translate===0&&e.scale===1}function gj(e){return v1(e.x)&&v1(e.y)}function y1(e,t){return e.min===t.min&&e.max===t.max}function C6(e,t){return y1(e.x,t.x)&&y1(e.y,t.y)}function x1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function vj(e,t){return x1(e.x,t.x)&&x1(e.y,t.y)}function b1(e){return dn(e.x)/dn(e.y)}function S1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class T6{constructor(){this.members=[]}add(t){xg(this.members,t),t.scheduleRender()}remove(t){if(bg(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){const s=this.members.findIndex(r=>t===r);if(s===0)return!1;let i;for(let r=s;r>=0;r--){const l=this.members[r];if(l.isPresent!==!1){i=l;break}}return i?(this.promote(i),!0):!1}promote(t,s){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,s&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:s,resumingFrom:i}=t;s.onExitComplete&&s.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function E6(e,t,s){let i="";const r=e.x.translate/t.x,l=e.y.translate/t.y,u=s?.z||0;if((r||l||u)&&(i=`translate3d(${r}px, ${l}px, ${u}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:m,rotate:y,rotateX:g,rotateY:b,skewX:S,skewY:C}=s;m&&(i=`perspective(${m}px) ${i}`),y&&(i+=`rotate(${y}deg) `),g&&(i+=`rotateX(${g}deg) `),b&&(i+=`rotateY(${b}deg) `),S&&(i+=`skewX(${S}deg) `),C&&(i+=`skewY(${C}deg) `)}const f=e.x.scale*t.x,h=e.y.scale*t.y;return(f!==1||h!==1)&&(i+=`scale(${f}, ${h})`),i||"none"}const Ah=["","X","Y","Z"],j6=1e3;let A6=0;function Nh(e,t,s,i){const{latestValues:r}=t;r[e]&&(s[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function yj(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=aj(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:r,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",tt,!(r||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&yj(i)}function xj({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(u={},f=t?.()){this.id=A6++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(M6),this.nodes.forEach(P6),this.nodes.forEach(k6),this.nodes.forEach(_6)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new h6)}addEventListener(u,f){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new Cg),this.eventHandlers.get(u).add(f)}notifyListeners(u,...f){const h=this.eventHandlers.get(u);h&&h.notify(...f)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=PE(u)&&!vz(u),this.instance=u;const{layoutId:f,layout:h,visualElement:m}=this.options;if(m&&!m.current&&m.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||f)&&(this.isLayoutDirty=!0),e){let y,g=0;const b=()=>this.root.updateBlockedByResize=!1;tt.read(()=>{g=window.innerWidth}),e(u,()=>{const S=window.innerWidth;S!==g&&(g=S,this.root.updateBlockedByResize=!0,y&&y(),y=p6(b,250),Lu.hasAnimatedSinceResize&&(Lu.hasAnimatedSinceResize=!1,this.nodes.forEach(T1)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&m&&(f||h)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:g,hasRelativeLayoutChanged:b,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const C=this.options.transition||m.getDefaultTransition()||U6,{onLayoutAnimationStart:T,onLayoutAnimationComplete:j}=m.getProps(),E=!this.targetLayout||!vj(this.targetLayout,S),A=!g&&b;if(this.options.layoutRoot||this.resumeFrom||A||g&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const R={...Pg(C,"layout"),onPlay:T,onComplete:j};(m.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R),this.setAnimationOrigin(y,A)}else g||T1(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Rs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(L6),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&yj(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const g=this.path[y];g.shouldResetTransform=!0,g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:f,layout:h}=this.options;if(f===void 0&&!h)return;const m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(w1);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(C1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(D6),this.nodes.forEach(N6),this.nodes.forEach(R6)):this.nodes.forEach(C1),this.clearAllSnapshots();const f=Tn.now();Qt.delta=As(0,1e3/60,f-Qt.timestamp),Qt.timestamp=f,Qt.isProcessing=!0,gh.update.process(Qt),gh.preRender.process(Qt),gh.render.process(Qt),Qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Lg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(O6),this.sharedNodes.forEach(z6)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!dn(this.snapshot.measuredBox.x)&&!dn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h<this.path.length;h++)this.path[h].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=It(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(f=!1),f&&this.instance){const h=i(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:h,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!r)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!gj(this.projectionDelta),h=this.getTransformTemplate(),m=h?h(this.latestValues,""):void 0,y=m!==this.prevTransformTemplateValue;u&&this.instance&&(f||Li(this.latestValues)||y)&&(r(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const f=this.measurePageBox();let h=this.removeElementScroll(f);return u&&(h=this.removeTransform(h)),I6(h),{animationId:this.root.animationId,measuredBox:f,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:u}=this.options;if(!u)return It();const f=u.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(H6))){const{scroll:m}=this.root;m&&($o(f.x,m.offset.x),$o(f.y,m.offset.y))}return f}removeElementScroll(u){const f=It();if(va(f,u),this.scroll?.wasRoot)return f;for(let h=0;h<this.path.length;h++){const m=this.path[h],{scroll:y,options:g}=m;m!==this.root&&y&&g.layoutScroll&&(y.wasRoot&&va(f,u),$o(f.x,y.offset.x),$o(f.y,y.offset.y))}return f}applyTransform(u,f=!1){const h=It();va(h,u);for(let m=0;m<this.path.length;m++){const y=this.path[m];!f&&y.options.layoutScroll&&y.scroll&&y!==y.root&&Ko(h,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),Li(y.latestValues)&&Ko(h,y.latestValues)}return Li(this.latestValues)&&Ko(h,this.latestValues),h}removeTransform(u){const f=It();va(f,u);for(let h=0;h<this.path.length;h++){const m=this.path[h];if(!m.instance||!Li(m.latestValues))continue;bp(m.latestValues)&&m.updateSnapshot();const y=It(),g=m.measurePageBox();va(y,g),g1(f,m.latestValues,m.snapshot?m.snapshot.layoutBox:void 0,y)}return Li(this.latestValues)&&g1(f,this.latestValues),f}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==f;if(!(u||h&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:g}=this.options;if(!this.layout||!(y||g))return;this.resolvedRelativeTargetAt=Qt.timestamp;const b=this.getClosestProjectingParent();b&&this.linkedParentVersion!==b.layoutVersion&&!b.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=It(),this.targetWithTransforms=It()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ZV(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):va(this.target,this.layout.layoutBox),QE(this.target,this.targetDelta)):va(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||bp(this.parent.latestValues)||ZE(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,f,h){this.relativeParent=u,this.linkedParentVersion=u.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=It(),this.relativeTargetOrigin=It(),ad(this.relativeTargetOrigin,f,h),va(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const u=this.getLead(),f=!!this.resumingFrom||this!==u;let h=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(h=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===Qt.timestamp&&(h=!1),h)return;const{layout:m,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||y))return;va(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,b=this.treeScale.y;lV(this.layoutCorrected,this.treeScale,this.path,f),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=It());const{target:S}=u;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(m1(this.prevProjectionDelta.x,this.projectionDelta.x),m1(this.prevProjectionDelta.y,this.projectionDelta.y)),bl(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==b||!S1(this.projectionDelta.x,this.prevProjectionDelta.x)||!S1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){if(this.options.visualElement?.scheduleRender(),u){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Go(),this.projectionDelta=Go(),this.projectionDeltaWithTransform=Go()}setAnimationOrigin(u,f=!1){const h=this.snapshot,m=h?h.latestValues:{},y={...this.latestValues},g=Go();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const b=It(),S=h?h.source:void 0,C=this.layout?this.layout.source:void 0,T=S!==C,j=this.getStack(),E=!j||j.members.length<=1,A=!!(T&&!E&&this.options.crossfade===!0&&!this.path.some(B6));this.animationProgress=0;let R;this.mixTargetDelta=_=>{const M=_/1e3;E1(g.x,u.x,M),E1(g.y,u.y,M),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ad(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),V6(this.relativeTarget,this.relativeTargetOrigin,b,M),R&&C6(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=It()),va(R,this.relativeTarget)),T&&(this.animationValues=y,v6(y,m,this.latestValues,M,A,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Rs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tt.update(()=>{Lu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Wi(0)),this.currentAnimation=f6(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),u.onUpdate&&u.onUpdate(f)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(j6),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:f,target:h,layout:m,latestValues:y}=u;if(!(!f||!h||!m)){if(this!==u&&this.layout&&m&&bj(this.options.animationType,this.layout.layoutBox,m.layoutBox)){h=this.target||It();const g=dn(this.layout.layoutBox.x);h.x.min=u.target.x.min,h.x.max=h.x.min+g;const b=dn(this.layout.layoutBox.y);h.y.min=u.target.y.min,h.y.max=h.y.min+b}va(f,h),Ko(f,y),bl(this.projectionDeltaWithTransform,this.layoutCorrected,f,y)}}registerSharedNode(u,f){this.sharedNodes.has(u)||this.sharedNodes.set(u,new T6),this.sharedNodes.get(u).add(f);const m=f.options.initialPromotionConfig;f.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(f):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){const{layoutId:u}=this.options;return u?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:u}=this.options;return u?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:f,preserveFollowOpacity:h}={}){const m=this.getStack();m&&m.promote(this,h),u&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let f=!1;const{latestValues:h}=u;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(f=!0),!f)return;const m={};h.z&&Nh("z",u,m,this.animationValues);for(let y=0;y<Ah.length;y++)Nh(`rotate${Ah[y]}`,u,m,this.animationValues),Nh(`skew${Ah[y]}`,u,m,this.animationValues);u.render();for(const y in m)u.setStaticValue(y,m[y]),this.animationValues&&(this.animationValues[y]=m[y]);u.scheduleRender()}applyProjectionStyles(u,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=ku(f?.pointerEvents)||"",u.transform=h?h(this.latestValues,""):"none";return}const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=ku(f?.pointerEvents)||""),this.hasProjected&&!Li(this.latestValues)&&(u.transform=h?h({},""):"none",this.hasProjected=!1);return}u.visibility="";const y=m.animationValues||m.latestValues;this.applyTransformsToTarget();let g=E6(this.projectionDeltaWithTransform,this.treeScale,y);h&&(g=h(y,g)),u.transform=g;const{x:b,y:S}=this.projectionDelta;u.transformOrigin=`${b.origin*100}% ${S.origin*100}% 0`,m.animationValues?u.opacity=m===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:u.opacity=m===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const C in xp){if(y[C]===void 0)continue;const{correct:T,applyTo:j,isCSSVariable:E}=xp[C],A=g==="none"?y[C]:T(y[C],m);if(j){const R=j.length;for(let _=0;_<R;_++)u[j[_]]=A}else E?this.options.visualElement.renderState.vars[C]=A:u[C]=A}this.options.layoutId&&(u.pointerEvents=m===this?ku(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>u.currentAnimation?.stop()),this.root.nodes.forEach(w1),this.root.sharedNodes.clear()}}}function N6(e){e.updateLayout()}function R6(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=e.layout,{animationType:r}=e.options,l=t.source!==e.layout.source;r==="size"?la(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],b=dn(g);g.min=s[y].min,g.max=g.min+b}):bj(r,t.layoutBox,s)&&la(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],b=dn(s[y]);g.max=g.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+b)});const u=Go();bl(u,s,t.layoutBox);const f=Go();l?bl(f,e.applyTransform(i,!0),t.measuredBox):bl(f,s,t.layoutBox);const h=!gj(u);let m=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:g,layout:b}=y;if(g&&b){const S=It();ad(S,t.layoutBox,g.layoutBox);const C=It();ad(C,s,b.layoutBox),vj(S,C)||(m=!0),y.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=S,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:f,layoutDelta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function M6(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _6(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function O6(e){e.clearSnapshot()}function w1(e){e.clearMeasurements()}function C1(e){e.isLayoutDirty=!1}function D6(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function T1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function P6(e){e.resolveTargetDelta()}function k6(e){e.calcProjection()}function L6(e){e.resetSkewAndRotation()}function z6(e){e.removeLeadSnapshot()}function E1(e,t,s){e.translate=pt(t.translate,0,s),e.scale=pt(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function j1(e,t,s,i){e.min=pt(t.min,s.min,i),e.max=pt(t.max,s.max,i)}function V6(e,t,s,i){j1(e.x,t.x,s.x,i),j1(e.y,t.y,s.y,i)}function B6(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const U6={duration:.45,ease:[.4,0,.1,1]},A1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),N1=A1("applewebkit/")&&!A1("chrome/")?Math.round:ua;function R1(e){e.min=N1(e.min),e.max=N1(e.max)}function I6(e){R1(e.x),R1(e.y)}function bj(e,t,s){return e==="position"||e==="preserve-aspect"&&!XV(b1(t),b1(s),.2)}function H6(e){return e!==e.root&&e.scroll?.wasRoot}const F6=xj({attachResizeListener:(e,t)=>_l(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rh={current:void 0},Sj=xj({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Rh.current){const e=new F6({});e.mount(window),e.setOptions({layoutScroll:!0}),Rh.current=e}return Rh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),q6={pan:{Feature:u6},drag:{Feature:c6,ProjectionNode:Sj,MeasureLayout:mj}};function M1(e,t,s){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",s==="Start");const r="onHover"+s,l=i[r];l&&tt.postRender(()=>l(t,$l(t)))}class $6 extends mi{mount(){const{current:t}=this.node;t&&(this.unmount=fz(t,(s,i)=>(M1(this.node,i,"Start"),r=>M1(this.node,r,"End"))))}unmount(){}}class K6 extends mi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Il(_l(this.node.current,"focus",()=>this.onFocus()),_l(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function _1(e,t,s){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",s==="Start");const r="onTap"+(s==="End"?"":s),l=i[r];l&&tt.postRender(()=>l(t,$l(t)))}class G6 extends mi{mount(){const{current:t}=this.node;t&&(this.unmount=gz(t,(s,i)=>(_1(this.node,i,"Start"),(r,{success:l})=>_1(this.node,r,l?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ap=new WeakMap,Mh=new WeakMap,Y6=e=>{const t=Ap.get(e.target);t&&t(e)},X6=e=>{e.forEach(Y6)};function Z6({root:e,...t}){const s=e||document;Mh.has(s)||Mh.set(s,{});const i=Mh.get(s),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(X6,{root:e,...t})),i[r]}function Q6(e,t,s){const i=Z6(t);return Ap.set(e,s),i.observe(e),()=>{Ap.delete(e),i.unobserve(e)}}const W6={some:0,all:1};class J6 extends mi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:s,margin:i,amount:r="some",once:l}=t,u={root:s?s.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:W6[r]},f=h=>{const{isIntersecting:m}=h;if(this.isInView===m||(this.isInView=m,l&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:y,onViewportLeave:g}=this.node.getProps(),b=m?y:g;b&&b(h)};return Q6(this.node.current,u,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(eB(t,s))&&this.startObserver()}unmount(){}}function eB({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const tB={inView:{Feature:J6},tap:{Feature:G6},focus:{Feature:K6},hover:{Feature:$6}},nB={layout:{ProjectionNode:Sj,MeasureLayout:mj}},aB={...FV,...tB,...q6,...nB},ui=iV(aB,yV);function Ol(e){const t=Ul(()=>Wi(e)),{isStatic:s}=x.useContext(ql);if(s){const[,i]=x.useState(e);x.useEffect(()=>t.on("change",i),[])}return t}function Yg(e,t){const s=Ol(t()),i=()=>s.set(t());return i(),yg(()=>{const r=()=>tt.preRender(i,!1,!0),l=e.map(u=>u.on("change",r));return()=>{l.forEach(u=>u()),Rs(i)}}),s}function O1(e,...t){const s=e.length;function i(){let r="";for(let l=0;l<s;l++){r+=e[l];const u=t[l];u&&(r+=Ot(u)?u.get():u)}return r}return Yg(t.filter(Ot),i)}function sB(e){yl.current=[],e();const t=Yg(yl.current,e);return yl.current=void 0,t}function wj(e,t,s,i){if(typeof e=="function")return sB(e);const r=typeof t=="function"?t:yz(t,s,i);return Array.isArray(e)?D1(e,r):D1([e],([l])=>r(l))}function D1(e,t){const s=Ul(()=>[]);return Yg(e,()=>{s.length=0;const i=e.length;for(let r=0;r<i;r++)s[r]=e[r].get();return t(s)})}function Cj(e,t={}){const{isStatic:s}=x.useContext(ql),i=()=>Ot(e)?e.get():e;if(s)return wj(i);const r=Ol(i());return x.useInsertionEffect(()=>xz(r,e,t),[r,JSON.stringify(t)]),r}const iB={some:0,all:1};function oB(e,t,{root:s,margin:i,amount:r="some"}={}){const l=NE(e),u=new WeakMap,f=m=>{m.forEach(y=>{const g=u.get(y.target);if(y.isIntersecting!==!!g)if(y.isIntersecting){const b=t(y.target,y);typeof b=="function"?u.set(y.target,b):h.unobserve(y.target)}else typeof g=="function"&&(g(y),u.delete(y.target))})},h=new IntersectionObserver(f,{root:s,rootMargin:i,threshold:typeof r=="number"?r:iB[r]});return l.forEach(m=>h.observe(m)),()=>h.disconnect()}function rB(e,{root:t,margin:s,amount:i,once:r=!1,initial:l=!1}={}){const[u,f]=x.useState(l);return x.useEffect(()=>{if(!e.current||r&&u)return;const h=()=>(f(!0),r?void 0:()=>f(!1)),m={root:t&&t.current||void 0,margin:s,amount:i};return oB(e.current,h,m)},[t,e,s,r,i]),u}function Xg({...e}){return d.jsx(DC,{"data-slot":"dialog",...e})}function lB({...e}){return d.jsx(PC,{"data-slot":"dialog-trigger",...e})}function cB({...e}){return d.jsx(kC,{"data-slot":"dialog-portal",...e})}function uB({className:e,...t}){return d.jsx(LC,{"data-slot":"dialog-overlay",className:ce("fixed inset-0 z-50",e),asChild:!0,...t,children:d.jsx(ui.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"bg-black/50",style:{position:"fixed",inset:0}})})}function Zg({className:e,children:t,showCloseButton:s=!0,...i}){const l=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?{duration:.01}:{type:"spring",damping:26,stiffness:300,mass:.8};return d.jsx(Vg,{children:d.jsxs(cB,{children:[d.jsx(uB,{}),d.jsx(zC,{"data-slot":"dialog-content",className:ce("bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg outline-none sm:max-w-lg",e),asChild:!0,...i,children:d.jsxs(ui.div,{initial:{opacity:0,scale:.95,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.97,y:4},transition:l,children:[t,s&&d.jsxs(BC,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx(Uw,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})})]})})}function Vi({className:e,...t}){return d.jsx("div",{"data-slot":"dialog-header",className:ce("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Bi({className:e,...t}){return d.jsx("div",{"data-slot":"dialog-footer",className:ce("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Ui({className:e,...t}){return d.jsx(VC,{"data-slot":"dialog-title",className:ce("text-lg leading-none font-semibold",e),...t})}function Sl({className:e,...t}){return d.jsx(lk,{"data-slot":"dialog-description",className:ce("text-muted-foreground text-sm",e),...t})}function lt({className:e,type:t,...s}){return d.jsx("input",{type:t,"data-slot":"input",className:ce("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}var dB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fB=dB.reduce((e,t)=>{const s=aC(`Primitive.${t}`),i=x.forwardRef((r,l)=>{const{asChild:u,...f}=r,h=u?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(h,{...f,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),mB="Label",Tj=x.forwardRef((e,t)=>d.jsx(fB.label,{...e,ref:t,onMouseDown:s=>{s.target.closest("button, input, select, textarea")||(e.onMouseDown?.(s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));Tj.displayName=mB;var hB=Tj;function ht({className:e,...t}){return d.jsx(hB,{"data-slot":"label",className:ce("flex items-center gap-2 text-sm 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})}const pB=eg(ce("relative cursor-pointer group transition-all animate-rainbow","inline-flex items-center justify-center gap-2 shrink-0","rounded-md outline-none focus-visible:ring-[3px] aria-invalid:border-destructive","text-sm font-medium whitespace-nowrap","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"),{variants:{variant:{default:"border-0 bg-[linear-gradient(#121213,#121213),linear-gradient(#121213_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%] text-primary-foreground [background-clip:padding-box,border-box,border-box] [background-origin:border-box] [border:calc(0.125rem)_solid_transparent] before:absolute before:bottom-[-20%] before:left-1/2 before:z-0 before:h-1/5 before:w-3/5 before:-translate-x-1/2 before:animate-rainbow before:bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] before:[filter:blur(0.75rem)] dark:bg-[linear-gradient(#fff,#fff),linear-gradient(#fff_50%,rgba(255,255,255,0.6)_80%,rgba(0,0,0,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))]",outline:"border border-input border-b-transparent bg-[linear-gradient(#ffffff,#ffffff),linear-gradient(#ffffff_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%] text-accent-foreground [background-clip:padding-box,border-box,border-box] [background-origin:border-box] before:absolute before:bottom-[-20%] before:left-1/2 before:z-0 before:h-1/5 before:w-3/5 before:-translate-x-1/2 before:animate-rainbow before:bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] before:[filter:blur(0.75rem)] dark:bg-[linear-gradient(#0a0a0a,#0a0a0a),linear-gradient(#0a0a0a_50%,rgba(255,255,255,0.6)_80%,rgba(0,0,0,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))]"},size:{default:"h-9 px-4 py-2",sm:"h-8 gap-1.5 px-3 text-xs",lg:"h-11 px-8",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Qg=ue.forwardRef(({className:e,variant:t,size:s,asChild:i=!1,...r},l)=>{const u=i?Jp:"button";return d.jsx(u,{"data-slot":"button",className:ce(pB({variant:t,size:s,className:e})),ref:l,...r})});Qg.displayName="RainbowButton";function gB(){const{t:e}=He(),{token:t,setToken:s,clearToken:i}=m5(),[r,l]=x.useState(!1),[u,f]=x.useState(t),[h,m]=x.useState(!1),[y,g]=x.useState(!1),[b,S]=x.useState(null),[C,T]=x.useState(null),j=e(t?"common.set":"common.unset");x.useEffect(()=>{if(typeof window>"u")return;function _(){l(!0)}return window.addEventListener(sp,_),()=>{window.removeEventListener(sp,_)}},[]),x.useEffect(()=>{r&&f(t),r&&S(null)},[r,t]);async function E(){m(!0),T(null),S(null);try{const _=await ip(u);T(_),Ht.success(e("tokenDialog.toast.adminApiOk"))}catch(_){const M=_ instanceof Sa?_.message:String(_);Ht.error(e("tokenDialog.toast.adminApiFailed"),{description:M})}finally{m(!1)}}async function A(){const _=u.trim();if(!_){S(e("tokenDialog.validation.empty"));return}g(!0),S(null),T(null);try{const M=await ip(_);T(M),s(_),l(!1),Ht.success(e("tokenDialog.toast.tokenSaved"))}catch(M){const z=M instanceof Sa?M.message:String(M);S(z)}finally{g(!1)}}function R(){i(),f(""),S(null),T(null),Ht.success(e("tokenDialog.toast.tokenCleared"))}return d.jsxs(Xg,{open:r,onOpenChange:l,children:[d.jsx(lB,{asChild:!0,children:d.jsxs(Me,{variant:"outline",className:"gap-2",children:[d.jsx(dO,{className:"size-4"}),e("tokenDialog.trigger"),d.jsx($t,{variant:t?"secondary":"outline",className:"ml-1 hidden sm:inline-flex",children:j})]})}),d.jsxs(Zg,{children:[d.jsxs(Vi,{children:[d.jsx(Ui,{children:e("tokenDialog.title")}),d.jsx(Sl,{children:d.jsxs(A0,{i18nKey:"tokenDialog.description",children:["Used as ",d.jsx("code",{children:"x-admin-token"})," when calling ",d.jsx("code",{children:"/api/admin/*"}),". Stored in ",d.jsx("code",{children:"localStorage"}),"."]})})]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{htmlFor:"admin-token",children:"x-admin-token"}),d.jsx(lt,{id:"admin-token",type:"password",placeholder:e("tokenDialog.inputPlaceholder"),value:u,onChange:_=>{f(_.target.value),b&&S(null)},autoComplete:"off"}),b?d.jsx("p",{className:"text-destructive text-xs",children:b}):null,d.jsx("p",{className:"text-muted-foreground text-xs",children:d.jsxs(A0,{i18nKey:"tokenDialog.remoteNote",children:["If the server is not running on localhost, you must set ",d.jsx("code",{children:"ADMIN_TOKEN"})," on the server to enable remote access."]})}),C?.dbPath&&d.jsx("p",{className:"text-muted-foreground text-xs",children:e("tokenDialog.connected",{version:C.userVersion??"?",path:C.dbPath})})]}),d.jsxs(Bi,{className:"gap-2 sm:gap-2",children:[d.jsx(Me,{variant:"secondary",onClick:E,disabled:h||y,children:e(h?"common.testing":"common.test")}),d.jsx(Me,{variant:"outline",onClick:R,disabled:!t&&!u.trim()||h||y,children:e("common.clear")}),d.jsx(Qg,{onClick:A,className:"h-9 px-4",disabled:h||y,children:e(y?"common.saving":"common.save")})]})]})]})}function vB({to:e,label:t}){return d.jsx(xw,{to:e,className:({isActive:s})=>ce("text-sm font-medium transition-colors hover:text-foreground",s?"text-foreground":"text-muted-foreground"),children:t})}const yB=[{to:"/accounts",labelKey:"nav.accounts"},{to:"/requests",labelKey:"nav.requests"},{to:"/models",labelKey:"nav.models"},{to:"/settings",labelKey:"nav.settings"}];function P1(){const{t:e}=He();return d.jsx(d.Fragment,{children:yB.map(t=>d.jsx(vB,{to:t.to,label:e(t.labelKey)},t.to))})}function xB(){const{t:e}=He();return d.jsxs("div",{className:"min-h-svh bg-background text-foreground",children:[d.jsx("header",{className:"bg-background/70 sticky top-0 z-50 border-b backdrop-blur",children:d.jsxs("div",{className:"flex w-full items-center gap-3 px-4 py-3 lg:px-6",children:[d.jsx("div",{className:"md:hidden",children:d.jsxs(ck,{children:[d.jsx(uk,{asChild:!0,children:d.jsx(Me,{variant:"outline",size:"icon","aria-label":e("nav.openNavigation"),children:d.jsx(gO,{className:"size-4"})})}),d.jsxs(mk,{side:"left",className:"w-72",children:[d.jsx(hk,{children:d.jsx(pk,{children:d.jsx(V0,{className:"text-base font-semibold",children:e("app.title")})})}),d.jsx("nav",{className:"mt-4 flex flex-col gap-3",children:d.jsx(P1,{})})]})]})}),d.jsx("div",{className:"min-w-0",children:d.jsx(V0,{className:"text-base font-semibold",children:e("app.title")})}),d.jsx("nav",{className:"hidden items-center gap-5 md:flex",children:d.jsx(P1,{})}),d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[d.jsx(L4,{}),d.jsx(V4,{}),d.jsx(gB,{})]})]})}),d.jsx("main",{className:"w-full px-4 py-4 lg:px-6 lg:py-6",style:{viewTransitionName:"page-content"},children:d.jsx(xM,{})})]})}function ul(e){return String(e).padStart(2,"0")}function Dl(e){if(e==null)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const s=t.getFullYear(),i=ul(t.getMonth()+1),r=ul(t.getDate()),l=ul(t.getHours()),u=ul(t.getMinutes()),f=ul(t.getSeconds());return`${s}-${i}-${r} ${l}:${u}:${f}`}function qt(e){return e==null||!Number.isFinite(e)?"":Intl.NumberFormat("en-US").format(e)}function bB(e){return e==="success"?d.jsx(Xp,{className:"size-4"}):e==="warning"?d.jsx(Bw,{className:"size-4"}):e==="error"?d.jsx(Zp,{className:"size-4"}):d.jsx(Vw,{className:"size-4"})}function SB(e){switch(e){case"success":return"border-emerald-500/20 bg-emerald-500/10";case"warning":return"border-amber-500/20 bg-amber-500/10";case"error":return"border-destructive/20 bg-destructive/10";default:return"border-border/60 bg-muted/30"}}function En({variant:e="info",title:t,description:s,actionLabel:i,onAction:r,className:l}){const u=bB(e);return d.jsxs("div",{role:e==="error"?"alert":"status",className:ce("flex items-start gap-3 rounded-lg border p-3",SB(e),l),children:[d.jsx("div",{className:"mt-0.5 shrink-0 text-foreground",children:u}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("div",{className:"text-sm font-medium leading-5",children:t}),s?d.jsx("div",{className:"text-muted-foreground mt-1 text-sm leading-5",children:s}):null]}),i&&r?d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:r,className:"shrink-0",children:i}):null]})}function $i({className:e,...t}){const{effective:s}=Qp();return d.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:ce("rounded-md",s==="off"?"bg-muted":"relative overflow-hidden bg-muted before:absolute before:inset-0 before:-translate-x-full before:bg-gradient-to-r before:from-transparent before:via-foreground/[0.07] before:to-transparent before:animate-[skeleton-shimmer_1.8s_ease-in-out_infinite] dark:before:via-foreground/[0.05]",e),...t})}var wB=Symbol("radix.slottable");function CB(e){const t=({children:s})=>d.jsx(d.Fragment,{children:s});return t.displayName=`${e}.Slottable`,t.__radixId=wB,t}var[Ad]=eo("Tooltip",[yd]),Nd=yd(),Ej="TooltipProvider",TB=700,Np="tooltip.open",[EB,Wg]=Ad(Ej),jj=e=>{const{__scopeTooltip:t,delayDuration:s=TB,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:l}=e,u=x.useRef(!0),f=x.useRef(!1),h=x.useRef(0);return x.useEffect(()=>{const m=h.current;return()=>window.clearTimeout(m)},[]),d.jsx(EB,{scope:t,isOpenDelayedRef:u,delayDuration:s,onOpen:x.useCallback(()=>{window.clearTimeout(h.current),u.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.current=!0,i)},[i]),isPointerInTransitRef:f,onPointerInTransitChange:x.useCallback(m=>{f.current=m},[]),disableHoverableContent:r,children:l})};jj.displayName=Ej;var Pl="Tooltip",[jB,Kl]=Ad(Pl),Aj=e=>{const{__scopeTooltip:t,children:s,open:i,defaultOpen:r,onOpenChange:l,disableHoverableContent:u,delayDuration:f}=e,h=Wg(Pl,e.__scopeTooltip),m=Nd(t),[y,g]=x.useState(null),b=Cs(),S=x.useRef(0),C=u??h.disableHoverableContent,T=f??h.delayDuration,j=x.useRef(!1),[E,A]=Jo({prop:i,defaultProp:r??!1,onChange:D=>{D?(h.onOpen(),document.dispatchEvent(new CustomEvent(Np))):h.onClose(),l?.(D)},caller:Pl}),R=x.useMemo(()=>E?j.current?"delayed-open":"instant-open":"closed",[E]),_=x.useCallback(()=>{window.clearTimeout(S.current),S.current=0,j.current=!1,A(!0)},[A]),M=x.useCallback(()=>{window.clearTimeout(S.current),S.current=0,A(!1)},[A]),z=x.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{j.current=!0,A(!0),S.current=0},T)},[T,A]);return x.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),d.jsx(cT,{...m,children:d.jsx(jB,{scope:t,contentId:b,open:E,stateAttribute:R,trigger:y,onTriggerChange:g,onTriggerEnter:x.useCallback(()=>{h.isOpenDelayedRef.current?z():_()},[h.isOpenDelayedRef,z,_]),onTriggerLeave:x.useCallback(()=>{C?M():(window.clearTimeout(S.current),S.current=0)},[M,C]),onOpen:_,onClose:M,disableHoverableContent:C,children:s})})};Aj.displayName=Pl;var Rp="TooltipTrigger",Nj=x.forwardRef((e,t)=>{const{__scopeTooltip:s,...i}=e,r=Kl(Rp,s),l=Wg(Rp,s),u=Nd(s),f=x.useRef(null),h=dt(t,f,r.onTriggerChange),m=x.useRef(!1),y=x.useRef(!1),g=x.useCallback(()=>m.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),d.jsx(uT,{asChild:!0,...u,children:d.jsx(Fe.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:h,onPointerMove:Pe(e.onPointerMove,b=>{b.pointerType!=="touch"&&!y.current&&!l.isPointerInTransitRef.current&&(r.onTriggerEnter(),y.current=!0)}),onPointerLeave:Pe(e.onPointerLeave,()=>{r.onTriggerLeave(),y.current=!1}),onPointerDown:Pe(e.onPointerDown,()=>{r.open&&r.onClose(),m.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:Pe(e.onFocus,()=>{m.current||r.onOpen()}),onBlur:Pe(e.onBlur,r.onClose),onClick:Pe(e.onClick,r.onClose)})})});Nj.displayName=Rp;var Jg="TooltipPortal",[AB,NB]=Ad(Jg,{forceMount:void 0}),Rj=e=>{const{__scopeTooltip:t,forceMount:s,children:i,container:r}=e,l=Kl(Jg,t);return d.jsx(AB,{scope:t,forceMount:s,children:d.jsx(to,{present:s||l.open,children:d.jsx(dd,{asChild:!0,container:r,children:i})})})};Rj.displayName=Jg;var nr="TooltipContent",Mj=x.forwardRef((e,t)=>{const s=NB(nr,e.__scopeTooltip),{forceMount:i=s.forceMount,side:r="top",...l}=e,u=Kl(nr,e.__scopeTooltip);return d.jsx(to,{present:i||u.open,children:u.disableHoverableContent?d.jsx(_j,{side:r,...l,ref:t}):d.jsx(RB,{side:r,...l,ref:t})})}),RB=x.forwardRef((e,t)=>{const s=Kl(nr,e.__scopeTooltip),i=Wg(nr,e.__scopeTooltip),r=x.useRef(null),l=dt(t,r),[u,f]=x.useState(null),{trigger:h,onClose:m}=s,y=r.current,{onPointerInTransitChange:g}=i,b=x.useCallback(()=>{f(null),g(!1)},[g]),S=x.useCallback((C,T)=>{const j=C.currentTarget,E={x:C.clientX,y:C.clientY},A=PB(E,j.getBoundingClientRect()),R=kB(E,A),_=LB(T.getBoundingClientRect()),M=VB([...R,..._]);f(M),g(!0)},[g]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(h&&y){const C=j=>S(j,y),T=j=>S(j,h);return h.addEventListener("pointerleave",C),y.addEventListener("pointerleave",T),()=>{h.removeEventListener("pointerleave",C),y.removeEventListener("pointerleave",T)}}},[h,y,S,b]),x.useEffect(()=>{if(u){const C=T=>{const j=T.target,E={x:T.clientX,y:T.clientY},A=h?.contains(j)||y?.contains(j),R=!zB(E,u);A?b():R&&(b(),m())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[h,y,u,m,b]),d.jsx(_j,{...e,ref:l})}),[MB,_B]=Ad(Pl,{isInside:!1}),OB=CB("TooltipContent"),_j=x.forwardRef((e,t)=>{const{__scopeTooltip:s,children:i,"aria-label":r,onEscapeKeyDown:l,onPointerDownOutside:u,...f}=e,h=Kl(nr,s),m=Nd(s),{onClose:y}=h;return x.useEffect(()=>(document.addEventListener(Np,y),()=>document.removeEventListener(Np,y)),[y]),x.useEffect(()=>{if(h.trigger){const g=b=>{b.target?.contains(h.trigger)&&y()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[h.trigger,y]),d.jsx(ud,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g=>g.preventDefault(),onDismiss:y,children:d.jsxs(dT,{"data-state":h.stateAttribute,...m,...f,ref:t,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(OB,{children:i}),d.jsx(MB,{scope:s,isInside:!0,children:d.jsx(WL,{id:h.contentId,role:"tooltip",children:r||i})})]})})});Mj.displayName=nr;var Oj="TooltipArrow",DB=x.forwardRef((e,t)=>{const{__scopeTooltip:s,...i}=e,r=Nd(s);return _B(Oj,s).isInside?null:d.jsx(fT,{...r,...i,ref:t})});DB.displayName=Oj;function PB(e,t){const s=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(s,i,r,l)){case l:return"left";case r:return"right";case s:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function kB(e,t,s=5){const i=[];switch(t){case"top":i.push({x:e.x-s,y:e.y+s},{x:e.x+s,y:e.y+s});break;case"bottom":i.push({x:e.x-s,y:e.y-s},{x:e.x+s,y:e.y-s});break;case"left":i.push({x:e.x+s,y:e.y-s},{x:e.x+s,y:e.y+s});break;case"right":i.push({x:e.x-s,y:e.y-s},{x:e.x-s,y:e.y+s});break}return i}function LB(e){const{top:t,right:s,bottom:i,left:r}=e;return[{x:r,y:t},{x:s,y:t},{x:s,y:i},{x:r,y:i}]}function zB(e,t){const{x:s,y:i}=e;let r=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const f=t[l],h=t[u],m=f.x,y=f.y,g=h.x,b=h.y;y>i!=b>i&&s<(g-m)*(i-y)/(b-y)+m&&(r=!r)}return r}function VB(e){const t=e.slice();return t.sort((s,i)=>s.x<i.x?-1:s.x>i.x?1:s.y<i.y?-1:s.y>i.y?1:0),BB(t)}function BB(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const r=e[i];for(;t.length>=2;){const l=t[t.length-1],u=t[t.length-2];if((l.x-u.x)*(r.y-u.y)>=(l.y-u.y)*(r.x-u.x))t.pop();else break}t.push(r)}t.pop();const s=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;s.length>=2;){const l=s[s.length-1],u=s[s.length-2];if((l.x-u.x)*(r.y-u.y)>=(l.y-u.y)*(r.x-u.x))s.pop();else break}s.push(r)}return s.pop(),t.length===1&&s.length===1&&t[0].x===s[0].x&&t[0].y===s[0].y?t:t.concat(s)}var UB=jj,IB=Aj,HB=Nj,FB=Rj,Dj=Mj;const qB=UB,Fa=IB,qa=HB,wa=x.forwardRef(({className:e,sideOffset:t=4,...s},i)=>d.jsx(FB,{children:d.jsx(Dj,{ref:i,sideOffset:t,className:ce("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));wa.displayName=Dj.displayName;function Wt({className:e,...t}){return d.jsx("div",{"data-slot":"card",className:ce("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function cn({className:e,...t}){return d.jsx("div",{"data-slot":"card-header",className:ce("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function un({className:e,...t}){return d.jsx("div",{"data-slot":"card-title",className:ce("leading-none font-semibold",e),...t})}function jn({className:e,...t}){return d.jsx("div",{"data-slot":"card-description",className:ce("text-muted-foreground text-sm",e),...t})}function $B({className:e,...t}){return d.jsx("div",{"data-slot":"card-action",className:ce("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function fn({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:ce("px-6",e),...t})}function Rd({className:e,glow:t,...s}){const i=x.useCallback(r=>{if(!t)return;const l=r.target.closest("tr");if(!l)return;const u=l.getBoundingClientRect();l.style.setProperty("--glow-x",`${r.clientX-u.left}px`),l.style.setProperty("--glow-y",`${r.clientY-u.top}px`)},[t]);return d.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:d.jsx("table",{"data-slot":"table","data-glow-table":t?"":void 0,className:ce("w-full caption-bottom text-sm",e),onMouseMove:t?i:void 0,...s})})}function ev({className:e,...t}){return d.jsx("thead",{"data-slot":"table-header",className:ce("[&_tr]:border-b",e),...t})}function Md({className:e,...t}){return d.jsx("tbody",{"data-slot":"table-body",className:ce("[&_tr:last-child]:border-0",e),...t})}function Je({className:e,...t}){return d.jsx("tr",{"data-slot":"table-row",className:ce("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function Tt({className:e,...t}){return d.jsx("th",{"data-slot":"table-head",className:ce("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function pe({className:e,...t}){return d.jsx("td",{"data-slot":"table-cell",className:ce("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function KB(e,t,s){return Math.min(s,Math.max(t,e))}function GB({value:e=0,className:t,indicatorClassName:s,style:i,...r}){const{effective:l}=Qp(),u=Number.isFinite(e)?KB(e,0,100):0,f=l!=="off",h=l==="magic",m=l==="subtle"?"4s":"2.2s",y=Cj(u,{damping:30,stiffness:120,mass:.8}),g=wj(y,b=>`${b}%`);return x.useEffect(()=>{y.set(u)},[u,y]),d.jsx("div",{"data-slot":"progress",role:"progressbar","aria-valuenow":Math.round(u),"aria-valuemin":0,"aria-valuemax":100,className:ce("bg-muted/60 relative h-1.5 w-full overflow-hidden rounded-full ring-1 ring-border/40",t),style:{...i,"--speed":m},...r,children:d.jsx(ui.div,{"data-slot":"progress-indicator",className:ce("relative h-full rounded-full","[container-type:inline-size] overflow-hidden","bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%_100%]",f?"animate-rainbow":void 0,h?"before:absolute before:inset-y-0 before:left-0 before:w-3/5 before:rounded-full before:bg-[linear-gradient(90deg,transparent,rgba(255,255,255,0.55),transparent)] before:opacity-50 before:animate-shimmer-slide before:content-['']":void 0,"dark:shadow-[0_0_12px_rgba(255,255,255,0.12)] shadow-[0_0_8px_rgba(0,0,0,0.06)]",s),style:{width:f?g:`${u}%`}})})}const YB=({children:e,className:t,...s})=>d.jsx("div",{className:ce("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",t),...s,children:e});function XB({children:e,className:t,style:s,gradientSize:i=200,gradientColor:r="#262626",gradientOpacity:l=.8,gradientFrom:u="#9E7AFF",gradientTo:f="#FE8BBB"}){const h=Ol(-i),m=Ol(-i),y=O1`radial-gradient(${i}px circle at ${h}px ${m}px, ${u}, ${f}, var(--border) 100%)`,g=O1`radial-gradient(${i}px circle at ${h}px ${m}px, ${r}, transparent 100%)`,b=x.useCallback(()=>{h.set(-i),m.set(-i)},[i,h,m]),S=x.useCallback(C=>{const T=C.currentTarget.getBoundingClientRect();h.set(C.clientX-T.left),m.set(C.clientY-T.top)},[h,m]);return x.useEffect(()=>{b()},[b]),x.useEffect(()=>{const C=j=>{j.relatedTarget||b()},T=()=>{document.visibilityState!=="visible"&&b()};return window.addEventListener("pointerout",C),window.addEventListener("blur",b),document.addEventListener("visibilitychange",T),()=>{window.removeEventListener("pointerout",C),window.removeEventListener("blur",b),document.removeEventListener("visibilitychange",T)}},[b]),d.jsxs("div",{className:ce("group relative rounded-[inherit]",t),style:s,onPointerMove:S,onPointerLeave:b,onPointerEnter:b,children:[d.jsx(ui.div,{className:"bg-border pointer-events-none absolute inset-0 rounded-[inherit] duration-300 group-hover:opacity-100",style:{background:y}}),d.jsx("div",{className:"bg-background absolute inset-px rounded-[inherit]"}),d.jsx(ui.div,{className:"pointer-events-none absolute inset-px rounded-[inherit] opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:g,opacity:l}}),d.jsx("div",{className:"relative",children:e})]})}function ZB({value:e,startValue:t=0,direction:s="up",delay:i=0,className:r,decimalPlaces:l=0,...u}){const f=x.useRef(null),h=Ol(s==="down"?e:t),m=Cj(h,{damping:60,stiffness:100}),y=rB(f,{once:!0,margin:"0px"}),g=x.useRef(!1);return x.useEffect(()=>{if(y&&!g.current){g.current=!0;const b=setTimeout(()=>{h.set(s==="down"?t:e)},i*1e3);return()=>clearTimeout(b)}},[h,y,i,e,s,t]),x.useEffect(()=>{g.current&&h.set(s==="down"?t:e)},[h,e,s,t]),x.useEffect(()=>m.on("change",b=>{f.current&&(f.current.textContent=Intl.NumberFormat("en-US",{minimumFractionDigits:l,maximumFractionDigits:l}).format(Number(b.toFixed(l))))}),[m,l]),d.jsx("span",{ref:f,className:ce("inline-block tracking-wider text-black tabular-nums dark:text-white",r),...u,children:t})}const QB=["individual","business","enterprise"],_h=120;function k1(e){return e.trim().replace(/^https?:\/\//i,"").replace(/\/+$/,"")}function WB(e){const t=Math.floor(e/60),s=e%60;return`${t}:${s.toString().padStart(2,"0")}`}function L1({open:e,onOpenChange:t,onSuccess:s,reauthAccountId:i}){const{t:r}=He(),[l,u]=x.useState(i?"confirm-reauth":"select-type"),[f,h]=x.useState("individual"),[m,y]=x.useState(""),[g,b]=x.useState(null),[S,C]=x.useState(null),[T,j]=x.useState(null),[E,A]=x.useState(!1),[R,_]=x.useState(null),[M,z]=x.useState(!1),D=x.useRef(null),P=x.useRef(null),X=x.useRef(0),Q=x.useRef(null),J=x.useRef(0),te=x.useRef(!1),ne=x.useCallback(()=>{J.current+=1,D.current&&(clearTimeout(D.current),D.current=null)},[]),re=x.useCallback(()=>{P.current&&(clearInterval(P.current),P.current=null),_(null)},[]),de=x.useCallback(K=>{re(),X.current=Date.now()+K*1e3,_(K),P.current=setInterval(()=>{const ie=Math.max(0,Math.ceil((X.current-Date.now())/1e3));_(ie),ie<=0&&(re(),ne(),j(r("accountManagement.expired")),u("error"))},1e3)},[re,ne,r]),k=x.useCallback((K,ie)=>{ne();const me=J.current,be=(ie+1)*1e3,je=async()=>{try{const Ae=await S5(K);if(J.current!==me)return;switch(C(Ae),Ae.status){case"completed":{if(J.current!==me)return;ne(),re(),u("success");return}case"failed":{if(J.current!==me)return;ne(),re(),j(Ae.error??r("accountManagement.authFailed")),u("error");return}case"expired":{if(J.current!==me)return;ne(),re(),j(r("accountManagement.expired")),u("error");return}case"pending":{if(J.current!==me)return;D.current=setTimeout(()=>{je()},be);return}default:return}}catch(Ae){if(console.warn("Failed to poll auth session status.",Ae),J.current!==me)return;D.current=setTimeout(()=>{je()},be)}};D.current=setTimeout(()=>{je()},be)},[r,re,ne]),H=x.useCallback(async()=>{!g||(S?.status??"pending")!=="pending"||Q.current!==g.sessionId&&(Q.current=g.sessionId,await w5(g.sessionId).catch(()=>{}))},[g,S?.status]),B=x.useCallback(async()=>{if(!(!i||te.current)){te.current=!0,z(!0);try{j(null),C(null);const K=await T5(i);b(K),u("authorize"),window.open(K.verificationUri,"_blank"),de(K.expiresIn),k(K.sessionId,K.interval)}catch(K){j(K instanceof Error?K.message:String(K)),u("error")}finally{te.current=!1,z(!1)}}},[i,k,de]);x.useEffect(()=>{if(!e){H(),ne(),P.current&&(clearInterval(P.current),P.current=null);const K=setTimeout(()=>{u(i?"confirm-reauth":"select-type"),h("individual"),y(""),b(null),C(null),j(null),A(!1),z(!1),_(null),te.current=!1},200);return()=>clearTimeout(K)}},[e,i,H,re,ne]);const le=x.useCallback(async()=>{if(te.current)return;const K=k1(m);if(f==="enterprise"&&!K){j(r("accountManagement.enterpriseDomainRequired"));return}te.current=!0,z(!0);try{j(null),C(null);const ie=await b5({accountType:f,enterpriseDomain:f==="enterprise"?K:void 0});b(ie),u("authorize"),window.open(ie.verificationUri,"_blank"),de(ie.expiresIn),k(ie.sessionId,ie.interval)}catch(ie){j(ie instanceof Error?ie.message:String(ie)),u("error")}finally{te.current=!1,z(!1)}},[f,m,r,k,de]),G=x.useCallback(async()=>{await H(),ne(),re(),t(!1)},[H,t,re,ne]),O=x.useCallback(async()=>{await G()},[G]),V=x.useCallback(()=>{ne(),re(),t(!1),s()},[re,ne,t,s]),I=x.useCallback(async()=>{g&&(await navigator.clipboard.writeText(g.userCode),A(!0),setTimeout(()=>A(!1),2e3))},[g]),W=x.useCallback(()=>{j(null),b(null),C(null),re(),u(i?"confirm-reauth":"select-type")},[i,re]),oe=x.useCallback(()=>{y(K=>k1(K))},[]),fe=T===r("accountManagement.expired");return d.jsx(Xg,{open:e,onOpenChange:K=>{if(!K){G();return}t(K)},children:d.jsxs(Zg,{className:"sm:max-w-md",children:[l==="select-type"&&d.jsxs(d.Fragment,{children:[d.jsxs(Vi,{children:[d.jsx(Ui,{children:r("accountManagement.addAccount")}),d.jsx(Sl,{children:r("accountManagement.selectAccountType")})]}),d.jsx("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-label":r("accountManagement.selectAccountType"),children:QB.map(K=>d.jsxs("button",{type:"button",role:"radio","aria-checked":f===K,onClick:()=>h(K),className:`flex items-center gap-3 rounded-lg border p-3 text-left transition-colors ${f===K?"border-primary bg-primary/5":"border-border hover:bg-accent/50"}`,children:[d.jsx("div",{className:`flex h-5 w-5 items-center justify-center rounded-full border-2 ${f===K?"border-primary":"border-muted-foreground"}`,children:f===K&&d.jsx("div",{className:"bg-primary h-2.5 w-2.5 rounded-full"})}),d.jsxs("div",{children:[d.jsx("div",{className:"font-medium",children:r(`accountManagement.type${K.charAt(0).toUpperCase()+K.slice(1)}`)}),d.jsx("div",{className:"text-muted-foreground text-sm",children:r(`accountManagement.type${K.charAt(0).toUpperCase()+K.slice(1)}Description`)})]})]},K))}),f==="enterprise"&&d.jsxs("div",{className:"space-y-2",children:[d.jsxs(ht,{htmlFor:"enterprise-domain",children:[r("accountManagement.enterpriseDomain")," ",d.jsx("span",{className:"text-destructive",children:"*"})]}),d.jsx(lt,{id:"enterprise-domain",placeholder:r("accountManagement.enterpriseDomainPlaceholder"),value:m,onChange:K=>y(K.target.value),onBlur:oe}),d.jsx("p",{className:"text-muted-foreground text-xs",children:r("accountManagement.enterpriseDomainHint")})]}),T&&d.jsx("p",{className:"text-destructive text-sm",role:"alert",children:T}),d.jsxs(Bi,{children:[d.jsx(Me,{variant:"outline",onClick:()=>{G()},children:r("accountManagement.cancel")}),d.jsx(Me,{onClick:le,disabled:M,children:r("accountManagement.continue")})]})]}),l==="confirm-reauth"&&i&&d.jsxs(d.Fragment,{children:[d.jsxs(Vi,{children:[d.jsx(Ui,{children:r("accountManagement.reauthAuthorizeTitle",{id:i})}),d.jsx(Sl,{children:r("accountManagement.reauthConfirmDescription")})]}),d.jsx("div",{className:"text-muted-foreground space-y-2 py-2 text-sm",children:d.jsx("p",{children:r("accountManagement.reauthConfirmHint")})}),d.jsxs(Bi,{children:[d.jsx(Me,{variant:"outline",onClick:()=>{G()},children:r("accountManagement.cancel")}),d.jsx(Me,{onClick:()=>{B()},disabled:M,children:r("accountManagement.continue")})]})]}),l==="authorize"&&g&&d.jsxs(d.Fragment,{children:[d.jsxs(Vi,{children:[d.jsx(Ui,{children:i?r("accountManagement.reauthAuthorizeTitle",{id:i}):r("accountManagement.authorizeTitle")}),i&&d.jsx(Sl,{children:r("accountManagement.reauthAuthorizeDescription")})]}),d.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",children:[d.jsx("p",{className:"text-muted-foreground text-sm",children:r("accountManagement.enterCodePrompt")}),d.jsxs("div",{className:"border-primary/50 bg-muted relative w-full rounded-lg border-2 border-dashed p-4 text-center",children:[d.jsx("code",{className:"text-2xl font-bold tracking-[0.3em]",children:g.userCode}),d.jsx(Me,{variant:"ghost",size:"sm",className:"absolute right-2 top-1/2 h-7 -translate-y-1/2 px-2 text-xs",onClick:I,children:r(E?"accountManagement.copied":"accountManagement.copy")})]}),d.jsx("p",{className:"text-muted-foreground text-xs",children:r("accountManagement.autoOpenHint")}),d.jsx("a",{href:g.verificationUri,target:"_blank",rel:"noopener noreferrer",className:"text-primary text-sm underline",children:g.verificationUri}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:ce("h-2 w-2 rounded-full motion-safe:animate-pulse",R!==null&&R<=_h?"bg-amber-500":"bg-primary")}),d.jsx("span",{className:ce("text-sm",R!==null&&R<=_h?"text-amber-500 font-medium":"text-muted-foreground"),children:R!==null&&R>0?r("accountManagement.expiresIn",{time:WB(R)}):r("accountManagement.waitingForAuth")})]}),R!==null&&R<=_h&&R>0&&d.jsx("p",{className:"text-amber-500 text-xs",children:r("accountManagement.expiresWarning")})]}),d.jsx(Bi,{children:d.jsx(Me,{variant:"outline",onClick:O,children:r("accountManagement.cancel")})})]}),l==="success"&&d.jsxs(d.Fragment,{children:[d.jsx(Vi,{children:d.jsx(Ui,{children:i?r("accountManagement.successReauthTitle",{id:i}):r("accountManagement.successTitle")})}),d.jsxs("div",{className:"flex flex-col items-center gap-4 py-4 motion-safe:animate-in motion-safe:fade-in-0 motion-safe:zoom-in-95 motion-safe:duration-300",children:[d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-green-500/10",children:d.jsx(Xp,{className:"size-6 text-green-500"})}),d.jsxs("div",{className:"bg-muted w-full rounded-lg p-4 text-sm",children:[d.jsxs("div",{className:"flex justify-between py-1",children:[d.jsx("span",{className:"text-muted-foreground",children:r("accountManagement.accountLabel")}),d.jsx("span",{className:"font-medium",children:S?.accountId??"—"})]}),!i&&d.jsxs("div",{className:"flex justify-between py-1",children:[d.jsx("span",{className:"text-muted-foreground",children:r("accountManagement.typeLabel")}),d.jsx("span",{children:r(`accountManagement.type${f.charAt(0).toUpperCase()+f.slice(1)}`)})]}),d.jsxs("div",{className:"flex justify-between py-1",children:[d.jsx("span",{className:"text-muted-foreground",children:r("accountManagement.statusLabel")}),d.jsx("span",{className:"text-green-500",children:r("accountManagement.statusActive")})]})]})]}),d.jsx(Bi,{children:d.jsx(Me,{onClick:V,children:r("accountManagement.done")})})]}),l==="error"&&d.jsxs(d.Fragment,{children:[d.jsx(Vi,{children:d.jsx(Ui,{children:r("accountManagement.authFailed")})}),d.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",role:"alert",children:[d.jsx("div",{className:"bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-full",children:d.jsx(Zp,{className:"text-destructive size-6"})}),d.jsx("div",{className:"bg-destructive/5 border-destructive/20 w-full rounded-lg border p-4",children:d.jsx("p",{className:"text-destructive text-sm font-medium",children:T})}),d.jsx("p",{className:"text-muted-foreground text-center text-xs",children:r(fe?"accountManagement.errorExpiredHint":"accountManagement.errorRecoveryHint")})]}),d.jsxs(Bi,{children:[d.jsx(Me,{variant:"outline",onClick:()=>t(!1),children:r("accountManagement.cancel")}),d.jsx(Me,{onClick:W,children:r("accountManagement.startOver")})]})]})]})})}function JB({open:e,onOpenChange:t,accountId:s,onDeleted:i}){const{t:r}=He(),[l,u]=x.useState(!1),f=x.useCallback(async()=>{u(!0);try{await C5(s),Ht.success(r("accountManagement.deleteSuccess",{id:s})),t(!1),i()}catch(h){Ht.error(h instanceof Error?h.message:String(h))}finally{u(!1)}},[s,i,t,r]);return d.jsx(Xg,{open:e,onOpenChange:t,children:d.jsxs(Zg,{className:"sm:max-w-md",children:[d.jsxs(Vi,{children:[d.jsx(Ui,{children:r("accountManagement.deleteTitle")}),d.jsx(Sl,{children:r("accountManagement.deleteConfirmation",{id:s})})]}),d.jsxs(Bi,{children:[d.jsx(Me,{variant:"outline",onClick:()=>t(!1),disabled:l,children:r("accountManagement.cancel")}),d.jsx(Me,{variant:"destructive",onClick:f,disabled:l,children:l?d.jsxs(d.Fragment,{children:[d.jsx(Wo,{className:"size-4 animate-spin"}),r("accountManagement.deleting")]}):r("accountManagement.delete")})]})]})})}function Oh(e){return e.reduce((t,s)=>t+(s??0),0)}function z1(e,t){if(e==="this_month"){const r=new Date(t),l=new Date(r.getFullYear(),r.getMonth(),1).getTime();return{sinceMs:l,fromMs:String(l),toMs:String(t)}}const s=Number(e),i=t-s;return{sinceMs:i,fromMs:String(i),toMs:String(t)}}function eU(e){return Math.min(100,Math.max(0,e))}function V1(e){return qt(e)||"—"}function tU(e){let t=0,s=0;for(const i of e){const r=i.stats?.request_count??0,l=i.stats?.avg_duration_ms??0;r>0&&l>0&&(t+=r,s+=r*l)}return t>0?Math.round(s/t):0}function nU({value:e,decimalPlaces:t=0}){return d.jsx(ZB,{value:e,decimalPlaces:t})}function aU({label:e,tooltip:t}){return t?d.jsxs(Fa,{children:[d.jsx(qa,{asChild:!0,children:d.jsx("div",{className:"text-muted-foreground cursor-help text-xs underline decoration-dashed decoration-current/30 underline-offset-2",children:e})}),d.jsx(wa,{side:"bottom",className:"max-w-60",children:d.jsx("p",{children:t})})]}):d.jsx("div",{className:"text-muted-foreground text-xs",children:e})}const ba=[null,null,"hidden lg:table-cell",null,null,"hidden xl:table-cell","hidden xl:table-cell","hidden lg:table-cell",null];function sU({rows:e}){const t=ba.length;return d.jsx(d.Fragment,{children:Array.from({length:e}).map((s,i)=>d.jsx(Je,{children:Array.from({length:t}).map((r,l)=>d.jsx(pe,{className:ce("py-3",ba[l]),children:d.jsx($i,{className:l===0?"h-4 w-56":"h-4 w-24"})},l))},i))})}function iU(){const{t:e}=He(),[t,s]=x.useState("this_month"),[i,r]=x.useState(!1),[l,u]=x.useState(null),[f,h]=x.useState(""),[m,y]=x.useState("requests"),[g,b]=x.useState([]),[S,C]=x.useState(null),[T,j]=x.useState(!1),[E,A]=x.useState(!1),[R,_]=x.useState(""),[M,z]=x.useState(!1),[D,P]=x.useState(""),X=x.useRef(null),Q=x.useRef(!1),J=x.useRef(!1),te=x.useCallback(async()=>{if(Q.current){J.current=!0;return}Q.current=!0,r(!0),u(null);try{const V=Date.now(),{sinceMs:I}=z1(t,V),[W,oe]=await Promise.all([h5({sinceMs:I,includeStats:!0}),ip()]);b(W.items),C(oe)}catch(V){const I=V instanceof Sa?V.message:String(V);u(I),Ht.error(ct.t("accountsPage.loadFailedTitle"),{description:I})}finally{Q.current=!1,r(!1),J.current&&(J.current=!1,te())}},[t]);x.useEffect(()=>{te()},[te]);const[ne,re]=x.useState(0);x.useEffect(()=>{let V=!1;if(X.current&&(clearTimeout(X.current),X.current=null),ne>0){const I=()=>{V||(X.current=setTimeout(async()=>{if(Q.current){I();return}try{await te()}finally{I()}},ne))};I()}return()=>{V=!0,X.current&&(clearTimeout(X.current),X.current=null)}},[ne,te]),x.useEffect(()=>{function V(I){const W=I.target?.tagName;W==="INPUT"||W==="TEXTAREA"||W==="SELECT"||I.target?.closest("[role=dialog]")||I.metaKey||I.ctrlKey||I.altKey||(I.key==="r"||I.key==="R"?(I.preventDefault(),te()):(I.key==="n"||I.key==="N")&&(I.preventDefault(),j(!0)))}return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[te]);function de(V){return`"${(/^[=+\-@]/u.test(V)?`'${V}`:V).replaceAll('"','""')}"`}const k=x.useCallback(()=>{if(g.length===0)return;const V=["account_id","status","requests","errors","tokens","avg_ms","last_request"],I=g.map(ie=>[ie.account_id,ie.runtime?.failed?"failed":"ok",String(ie.stats?.request_count??0),String(ie.stats?.error_count??0),String(ie.stats?.tokens_total??0),String(ie.stats?.avg_duration_ms!==null&&ie.stats?.avg_duration_ms!==void 0?Math.round(ie.stats.avg_duration_ms):""),ie.stats?.last_request_at_ms?new Date(ie.stats.last_request_at_ms).toISOString():""]),W=[V.join(","),...I.map(ie=>ie.map(me=>de(me)).join(","))].join(`
|
|
64
|
+
`),oe=new Blob([W],{type:"text/csv;charset=utf-8"}),fe=URL.createObjectURL(oe),K=document.createElement("a");K.href=fe,K.download=`accounts-${new Date().toISOString().slice(0,10)}.csv`,K.click(),URL.revokeObjectURL(fe),Ht.success(e("accountsPage.exportSuccess"))},[g,e]),H=x.useMemo(()=>{const V=g.length,I=g.filter(be=>be.runtime?.failed).length,W=Oh(g.map(be=>be.stats?.request_count)),oe=Oh(g.map(be=>be.stats?.error_count)),fe=Oh(g.map(be=>be.stats?.tokens_total)),K=tU(g),ie=W>0?oe/W*100:0,me=W>0?fe/W:0;return{totalAccounts:V,failedAccounts:I,totalRequests:W,totalErrors:oe,totalTokens:fe,avgDurationMs:K,errorRatePct:ie,tokensPerRequest:me}},[g]),B=x.useMemo(()=>{const V=f.trim().toLowerCase(),W=[...V?g.filter(oe=>oe.account_id.toLowerCase().includes(V)):g];return W.sort((oe,fe)=>m==="account"?oe.account_id.localeCompare(fe.account_id):m==="last_req"?(fe.stats?.last_request_at_ms??0)-(oe.stats?.last_request_at_ms??0):m==="errors"?(fe.stats?.error_count??0)-(oe.stats?.error_count??0):m==="tokens"?(fe.stats?.tokens_total??0)-(oe.stats?.tokens_total??0):(fe.stats?.request_count??0)-(oe.stats?.request_count??0)),W},[g,f,m]),le=Date.now(),{fromMs:G,toMs:O}=z1(t,le);return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-muted-foreground text-sm",children:e("accountsPage.statsWindowLabel")}),d.jsxs(Nn,{value:t,onValueChange:V=>s(V),children:[d.jsx(Mn,{size:"sm",className:"w-40",children:d.jsx(Rn,{})}),d.jsxs(_n,{children:[d.jsx(Ne,{value:"86400000",children:e("accountsPage.window.last24h")}),d.jsx(Ne,{value:"604800000",children:e("accountsPage.window.last7d")}),d.jsx(Ne,{value:"this_month",children:e("accountsPage.window.thisMonth")})]})]})]}),d.jsxs(Me,{variant:"outline",size:"sm",onClick:te,disabled:i,children:[d.jsx(Fu,{className:ce("size-4",i&&"animate-spin")}),e(i?"common.refreshing":"common.refresh")]}),d.jsxs("div",{className:"flex items-center gap-2",children:[ne>0&&d.jsxs("span",{className:"relative flex h-2 w-2",children:[d.jsx("span",{className:"bg-primary absolute inline-flex h-full w-full motion-safe:animate-ping rounded-full opacity-75"}),d.jsx("span",{className:"bg-primary relative inline-flex h-2 w-2 rounded-full"})]}),d.jsx("span",{className:"text-muted-foreground text-sm",children:e("accountsPage.autoRefreshLabel")}),d.jsxs(Nn,{value:String(ne),onValueChange:V=>re(Number(V)),children:[d.jsx(Mn,{size:"sm",className:"w-24",children:d.jsx(Rn,{})}),d.jsxs(_n,{children:[d.jsx(Ne,{value:"0",children:e("accountsPage.autoRefresh.off")}),d.jsx(Ne,{value:"30000",children:e("accountsPage.autoRefresh.30s")}),d.jsx(Ne,{value:"60000",children:e("accountsPage.autoRefresh.60s")}),d.jsx(Ne,{value:"300000",children:e("accountsPage.autoRefresh.5m")})]})]})]}),d.jsxs(Qg,{size:"sm",onClick:()=>j(!0),children:[d.jsx(O0,{className:"size-4"}),e("accountManagement.addAccount")]}),d.jsxs(Fa,{children:[d.jsx(qa,{asChild:!0,children:d.jsx(Me,{variant:"ghost",size:"sm",onClick:k,disabled:g.length===0,"aria-label":e("accountsPage.exportCsvAria"),children:d.jsx(zw,{className:"size-4"})})}),d.jsx(wa,{children:e("accountsPage.exportCsv")})]}),d.jsx("div",{className:"text-muted-foreground ml-auto text-xs opacity-60",children:S?.dbPath?e("accountsPage.dbInfo",{version:S.userVersion??"?",path:S.dbPath}):null})]}),l?d.jsx(En,{variant:"error",title:e("accountsPage.loadFailedTitle"),description:l,actionLabel:e("common.retry"),onAction:()=>{te()}}):null,d.jsx(YB,{className:"auto-rows-min grid-cols-1 gap-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 2xl:grid-cols-8",children:[{label:e("nav.accounts"),tooltip:e("accountsPage.kpiTooltip.accounts"),value:H.totalAccounts},{label:e("common.failed"),tooltip:e("accountsPage.kpiTooltip.failed"),value:H.failedAccounts},{label:e("nav.requests"),tooltip:e("accountsPage.kpiTooltip.requests"),value:H.totalRequests},{label:e("common.errors"),tooltip:e("accountsPage.kpiTooltip.errors"),value:H.totalErrors},{label:e("common.errorRate"),tooltip:e("accountsPage.kpiTooltip.errorRate"),value:H.errorRatePct,decimal:1,suffix:"%"},{label:e("common.tokensPerRequest"),tooltip:e("accountsPage.kpiTooltip.tokensPerRequest"),value:H.tokensPerRequest,decimal:1},{label:e("common.tokens"),tooltip:e("accountsPage.kpiTooltip.tokens"),value:H.totalTokens},{label:e("common.avgDurationMs"),tooltip:e("accountsPage.kpiTooltip.avgDuration"),value:H.avgDurationMs}].map((V,I)=>d.jsx(XB,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-2 rounded-xl fill-mode-backwards",style:{animationDelay:`${I*60}ms`,animationDuration:"400ms"},children:d.jsxs("div",{className:"p-4",children:[d.jsx(aU,{label:V.label,tooltip:V.tooltip}),d.jsxs("div",{className:"mt-1 flex items-baseline gap-1 text-2xl font-semibold",children:[d.jsx(nU,{value:V.value,decimalPlaces:V.decimal??0}),V.suffix?d.jsx("span",{className:"text-muted-foreground text-sm",children:V.suffix}):null]})]})},V.label))}),!i&&g.length===0?d.jsx(Wt,{className:"py-12",children:d.jsxs(fn,{className:"flex flex-col items-center gap-4 text-center",children:[d.jsx("div",{className:"bg-muted flex h-14 w-14 items-center justify-center rounded-full",children:d.jsx(NO,{className:"text-muted-foreground size-7"})}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("h3",{className:"text-lg font-semibold",children:e("accountsPage.empty.noAccountsTitle")}),d.jsx("p",{className:"text-muted-foreground mx-auto max-w-sm text-sm",children:e("accountsPage.empty.noAccountsDescription")})]}),d.jsxs(Me,{size:"lg",onClick:()=>j(!0),className:"mt-2",children:[d.jsx(O0,{className:"size-4"}),e("accountsPage.empty.noAccountsCta")]})]})}):d.jsxs(Wt,{className:"gap-4 py-4",children:[d.jsxs(cn,{className:"px-4",children:[d.jsx(un,{children:e("nav.accounts")}),d.jsx(jn,{className:"hidden sm:block",children:e("accountsPage.tableDescription")})]}),d.jsxs(fn,{className:"space-y-3 px-4",children:[d.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[d.jsx(lt,{placeholder:e("accountsPage.filterAccountPlaceholder"),value:f,onChange:V=>h(V.target.value),className:"h-8 sm:max-w-xs"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-muted-foreground text-sm",children:e("accountsPage.sortByLabel")}),d.jsxs(Nn,{value:m,onValueChange:V=>y(V),children:[d.jsx(Mn,{size:"sm",className:"w-40",children:d.jsx(Rn,{})}),d.jsxs(_n,{align:"end",children:[d.jsx(Ne,{value:"requests",children:e("nav.requests")}),d.jsx(Ne,{value:"errors",children:e("common.errors")}),d.jsx(Ne,{value:"tokens",children:e("common.tokens")}),d.jsx(Ne,{value:"last_req",children:e("common.lastRequest")}),d.jsx(Ne,{value:"account",children:e("common.account")})]})]}),d.jsxs("div",{className:"text-muted-foreground text-sm tabular-nums",children:[B.length,"/",g.length]})]})]}),d.jsxs(Rd,{glow:!0,className:"[&_th]:h-9 [&_td]:py-1.5",children:[d.jsx(ev,{children:d.jsxs(Je,{children:[d.jsx(Tt,{children:e("common.account")}),d.jsx(Tt,{children:e("common.status")}),d.jsx(Tt,{className:ce(ba[2]),children:d.jsxs(Fa,{children:[d.jsx(qa,{asChild:!0,children:d.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e("accountsPage.premiumReq")})}),d.jsx(wa,{side:"bottom",className:"max-w-60",children:d.jsx("p",{children:e("accountsPage.tableTooltip.premiumReq")})})]})}),d.jsx(Tt,{children:e("nav.requests")}),d.jsx(Tt,{children:e("common.errors")}),d.jsx(Tt,{className:ce(ba[5]),children:e("common.tokens")}),d.jsx(Tt,{className:ce(ba[6]),children:d.jsxs(Fa,{children:[d.jsx(qa,{asChild:!0,children:d.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e("common.avgMs")})}),d.jsx(wa,{side:"bottom",className:"max-w-60",children:d.jsx("p",{children:e("accountsPage.tableTooltip.avgMs")})})]})}),d.jsx(Tt,{className:ce(ba[7]),children:e("common.lastRequest")}),d.jsx(Tt,{className:"text-right",children:e("common.actions")})]})}),d.jsx(Md,{children:i&&g.length===0?d.jsx(sU,{rows:6}):B.length===0?d.jsx(Je,{children:d.jsx(pe,{colSpan:ba.length,children:d.jsx(En,{variant:"info",title:e("accountsPage.empty.noMatchesTitle"),description:e("accountsPage.empty.noMatchesDescription"),actionLabel:f.trim()?e("common.clearFilter"):void 0,onAction:f.trim()?()=>h(""):void 0})})}):d.jsx(Vg,{initial:!1,children:B.map(V=>{const I=V.runtime?.failed,W=I?d.jsx($t,{variant:"destructive",children:e("common.statusFailed")}):d.jsx($t,{variant:"secondary",children:e("common.statusOk")}),oe=V.runtime?.entitlement,fe=V.runtime?.remaining,K=oe!=null&&fe!=null?oe-fe:void 0,ie=oe!=null&&oe>0&&K!=null?K/oe*100:void 0,me=ie!=null&&Number.isFinite(ie)?eU(ie):void 0,be=V.runtime?.unlimited?d.jsx($t,{variant:"secondary",children:e("common.unlimited")}):d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-xs whitespace-nowrap",children:[d.jsxs("div",{className:"flex items-baseline gap-1",children:[d.jsx("span",{className:"text-muted-foreground",children:e("common.used")}),d.jsx("span",{className:"tabular-nums font-medium",children:V1(K)})]}),d.jsxs("div",{className:"flex items-baseline gap-1",children:[d.jsx("span",{className:"text-muted-foreground",children:e("common.remaining")}),d.jsx("span",{className:"tabular-nums font-medium",children:V1(fe)})]})]}),me!=null?d.jsx(GB,{value:me,className:"h-1.5","aria-label":e("accountsPage.premiumQuotaUsedAria")}):null]}),je=V.stats?.last_request_at_ms?Dl(V.stats.last_request_at_ms):"";return d.jsxs(ui.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeOut"},"data-slot":"table-row",className:"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",children:[d.jsx(pe,{className:"font-mono",children:d.jsx(ii,{to:`/requests?account_id=${encodeURIComponent(V.account_id)}&from_ms=${G}&to_ms=${O}`,className:"underline decoration-border hover:decoration-foreground",children:V.account_id})}),d.jsx(pe,{children:d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx("div",{children:W}),I&&V.runtime?.failureReason?d.jsx("div",{className:"text-muted-foreground text-xs",children:V.runtime.failureReason}):null]})}),d.jsx(pe,{className:ce(ba[2],"whitespace-normal"),children:be}),d.jsx(pe,{children:qt(V.stats?.request_count)}),d.jsx(pe,{children:qt(V.stats?.error_count)}),d.jsx(pe,{className:ce(ba[5]),children:qt(V.stats?.tokens_total)}),d.jsx(pe,{className:ce(ba[6]),children:V.stats?.avg_duration_ms!=null?qt(Math.round(V.stats.avg_duration_ms)):""}),d.jsx(pe,{className:ce(ba[7],"font-mono text-xs"),children:je}),d.jsx(pe,{className:"text-right",children:d.jsxs("div",{className:"flex items-center justify-end gap-1",children:[d.jsx(Me,{variant:I?"default":"ghost",size:"sm",className:"h-8 px-2.5 text-xs","aria-label":e("accountManagement.reauthAriaLabel",{id:V.account_id}),onClick:()=>{P(V.account_id),z(!0)},children:e("accountManagement.reauth")}),d.jsx(Me,{variant:"ghost",size:"sm",className:"text-destructive h-8 px-2.5 text-xs","aria-label":e("accountManagement.deleteAriaLabel",{id:V.account_id}),onClick:()=>{_(V.account_id),A(!0)},children:e("accountManagement.delete")})]})})]},V.account_id)})})})]})]})]}),d.jsx(L1,{open:T,onOpenChange:j,onSuccess:te}),d.jsx(L1,{open:M,onOpenChange:z,onSuccess:te,reauthAccountId:D}),d.jsx(JB,{open:E,onOpenChange:A,accountId:R,onDeleted:te})]})}const Yo=[null,"hidden lg:table-cell","hidden lg:table-cell",null,null,null],Pj=Yo.length;function B1(e){return e==null||!Number.isFinite(e)||e<=0?"":e>=1e3?`${Math.floor(e/1e3)}K`:String(Math.floor(e))}function U1(e){return e==null||!Number.isFinite(e)||e<=0?"—":String(Math.floor(e))}function wu(e,t,s){const i=e?.trim(),r=t?.trim();if(!i&&!r)return 0;if(!i)return 1;if(!r)return-1;const l=i.toLowerCase().localeCompare(r.toLowerCase());return s==="asc"?l:-l}function Dh(e,t,s){const i=typeof e=="number"&&Number.isFinite(e)?e:null,r=typeof t=="number"&&Number.isFinite(t)?t:null;if(i==null&&r==null)return 0;if(i==null)return 1;if(r==null)return-1;const l=i-r;return l===0?0:s==="asc"?l:-l}function I1(e){if(!e||e.length===0)return null;const t=e.map(s=>s.trim().toLowerCase()).filter(s=>s.length>0).sort();return t.length>0?t.join("|"):null}function H1(e){const t=[];return e.tool_calls&&t.push("tool_calls"),e.vision&&t.push("vision"),e.structured_outputs&&t.push("structured_outputs"),e.streaming&&t.push("streaming"),e.parallel_tool_calls&&t.push("parallel_tool_calls"),t.length>0?t.join("|"):null}function Ho({columnKey:e,label:t,tooltip:s,sortKey:i,sortDir:r,onSort:l,className:u}){const f=i===e;let h="none";return f&&(h=r==="asc"?"ascending":"descending"),d.jsx(Tt,{"aria-sort":h,className:u,children:s?d.jsxs(Fa,{children:[d.jsx(qa,{asChild:!0,children:d.jsxs("button",{type:"button",onClick:()=>l(e),className:ce("flex w-full cursor-pointer select-none items-center gap-1 text-left","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[d.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:t}),f?d.jsx("span",{className:"text-muted-foreground",children:r==="asc"?"↑":"↓"}):null]})}),d.jsx(wa,{side:"bottom",className:"max-w-60",children:d.jsx("p",{children:s})})]}):d.jsxs("button",{type:"button",onClick:()=>l(e),className:ce("flex w-full cursor-pointer select-none items-center gap-1 text-left","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[d.jsx("span",{children:t}),f?d.jsx("span",{className:"text-muted-foreground",children:r==="asc"?"↑":"↓"}):null]})})}function oU({rows:e}){return d.jsx(d.Fragment,{children:Array.from({length:e}).map((t,s)=>d.jsx(Je,{children:Array.from({length:Pj}).map((i,r)=>d.jsx(pe,{className:ce("py-3",Yo[r]),children:d.jsx($i,{className:r===0?"h-4 w-48":"h-4 w-28"})},r))},s))})}function rU({supports:e}){const{t}=He(),s=[];return e.tool_calls&&s.push({key:"tool_calls",label:t("modelsPage.features.tools"),tooltip:t("modelsPage.featureTooltip.tools")}),e.vision&&s.push({key:"vision",label:t("modelsPage.features.vision"),tooltip:t("modelsPage.featureTooltip.vision")}),e.structured_outputs&&s.push({key:"structured_outputs",label:t("modelsPage.features.structuredOutputs"),tooltip:t("modelsPage.featureTooltip.structuredOutputs")}),e.streaming&&s.push({key:"streaming",label:t("modelsPage.features.streaming"),tooltip:t("modelsPage.featureTooltip.streaming")}),e.parallel_tool_calls&&s.push({key:"parallel_tool_calls",label:t("modelsPage.features.parallelTools"),tooltip:t("modelsPage.featureTooltip.parallelTools")}),s.length===0?d.jsx("span",{className:"text-muted-foreground",children:"—"}):d.jsx("div",{className:"flex flex-wrap gap-1 whitespace-normal",children:s.map(i=>d.jsxs(Fa,{children:[d.jsx(qa,{asChild:!0,children:d.jsx("button",{type:"button",className:"focus-visible:outline-none",children:d.jsx($t,{variant:"outline",className:"cursor-help text-xs",children:i.label})})}),d.jsx(wa,{side:"bottom",className:"max-w-60",children:d.jsx("p",{children:i.tooltip})})]},i.key))})}function lU({endpoints:e}){return!e||e.length===0?d.jsx("span",{className:"text-muted-foreground",children:"—"}):d.jsx("div",{className:"flex flex-wrap gap-1 whitespace-normal",children:e.map(t=>d.jsx($t,{variant:"secondary",className:"font-mono text-xs",children:t},t))})}function cU({limits:e}){const{t}=He(),s=B1(e.max_prompt_tokens),i=B1(e.max_output_tokens),r=t("modelsPage.contextTooltip",{input:U1(e.max_prompt_tokens),output:U1(e.max_output_tokens)});return d.jsxs(Fa,{children:[d.jsx(qa,{asChild:!0,children:d.jsxs("button",{type:"button",className:"flex cursor-help items-center gap-3 tabular-nums focus-visible:outline-none",children:[d.jsx("span",{className:"text-muted-foreground text-xs",children:t("modelsPage.contextInputLabel")}),d.jsx("span",{children:s||"—"}),d.jsx("span",{className:"text-muted-foreground text-xs",children:t("modelsPage.contextOutputLabel")}),d.jsx("span",{children:i||"—"})]})}),d.jsx(wa,{side:"bottom",className:"max-w-72",children:d.jsx("p",{children:r})})]})}const F1=3;function uU({id:e,aliases:t}){const{t:s}=He(),[i,r]=x.useState(!1),l=i?t:t.slice(0,F1),u=t.length-F1;return d.jsxs("div",{className:"flex flex-wrap items-center gap-1 whitespace-normal",children:[d.jsx("span",{className:"max-w-[14rem] truncate font-mono text-xs",title:e,children:e}),l.map(f=>d.jsx($t,{variant:"outline",className:"max-w-[10rem] truncate font-mono text-xs",title:f,children:f},f)),!i&&u>0&&d.jsx("button",{type:"button",onClick:()=>r(!0),className:"text-muted-foreground hover:text-foreground cursor-pointer text-xs transition-colors",children:s("modelsPage.aliasesMore",{count:u})})]})}function dU({billing:e}){const{t}=He(),s=e?.multiplier;return s==null?d.jsx("span",{className:"text-muted-foreground",children:"—"}):d.jsxs("div",{className:"flex items-center gap-2 tabular-nums",children:[d.jsxs("span",{children:[s,"x"]}),e?.is_premium?d.jsx($t,{variant:"default",className:"text-xs",children:t("modelsPage.badges.premium")}):null]})}function fU(){const{t:e}=He(),[t,s]=x.useState(!0),[i,r]=x.useState(null),[l,u]=x.useState([]),[f,h]=x.useState(""),[m,y]=x.useState(new Set),[g,b]=x.useState({key:null,dir:"asc"}),{key:S,dir:C}=g,T=x.useCallback(M=>{b(z=>z.key===M?{key:z.key,dir:z.dir==="asc"?"desc":"asc"}:{key:M,dir:"asc"})},[]),j=x.useCallback(M=>{y(z=>{const D=new Set(z);return D.has(M)?D.delete(M):D.add(M),D})},[]),E=x.useMemo(()=>{let M=0,z=0;for(const D of l)D.billing?.is_premium&&M++,D.preview&&z++;return{total:l.length,premium:M,preview:z}},[l]),A=x.useMemo(()=>{let M=l;const z=f.trim().toLowerCase();return z&&(M=M.filter(D=>D.name.toLowerCase().includes(z)||D.id.toLowerCase().includes(z)||D.aliases.some(P=>P.toLowerCase().includes(z)))),m.has("premium")&&(M=M.filter(D=>D.billing?.is_premium)),m.has("preview")&&(M=M.filter(D=>D.preview)),M},[l,f,m]),R=x.useMemo(()=>S?[...A].sort((M,z)=>{let D=0;switch(S){case"name":D=wu(M.name,z.name,C);break;case"endpoints":D=wu(I1(M.supported_endpoints),I1(z.supported_endpoints),C);break;case"originalId":D=wu(M.id,z.id,C);break;case"context":D=Dh(M.capabilities.limits.max_prompt_tokens,z.capabilities.limits.max_prompt_tokens,C),D===0&&(D=Dh(M.capabilities.limits.max_output_tokens,z.capabilities.limits.max_output_tokens,C));break;case"features":D=wu(H1(M.capabilities.supports),H1(z.capabilities.supports),C);break;case"multiplier":D=Dh(M.billing?.multiplier,z.billing?.multiplier,C);break;default:D=0}return D!==0?D:M.id.localeCompare(z.id)}):A,[A,C,S]),_=x.useCallback(async()=>{s(!0),r(null);try{const M=await x5();u(M.items)}catch(M){const z=M instanceof Sa?M.message:String(M);r(z),Ht.error(ct.t("modelsPage.toast.loadFailed"),{description:z})}finally{s(!1)}},[]);return x.useEffect(()=>{_()},[_]),d.jsxs("div",{className:"space-y-4",children:[i?d.jsx(En,{variant:"error",title:e("modelsPage.loadFailedTitle"),description:i,actionLabel:e("common.retry"),onAction:()=>{_()}}):null,d.jsxs(Wt,{children:[d.jsx(cn,{children:d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx(un,{children:e("modelsPage.title")}),d.jsx(jn,{children:e("modelsPage.description")})]}),d.jsxs(Me,{variant:"outline",size:"sm",onClick:()=>{_()},disabled:t,children:[t?d.jsx(Wo,{className:"size-4 motion-safe:animate-spin"}):d.jsx(Fu,{className:"size-4"}),e("common.refresh")]})]})}),d.jsxs(fn,{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs("div",{className:"relative max-w-64 flex-1",children:[d.jsx(CO,{className:"text-muted-foreground pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2"}),d.jsx(lt,{value:f,onChange:M=>h(M.target.value),placeholder:e("modelsPage.searchPlaceholder"),"aria-label":e("modelsPage.searchAriaLabel"),className:"pl-8"})]}),d.jsx($t,{asChild:!0,variant:m.has("premium")?"default":"outline",children:d.jsxs("button",{type:"button","aria-pressed":m.has("premium"),className:"cursor-pointer select-none transition-colors",onClick:()=>j("premium"),children:[e("modelsPage.badges.premium"),E.premium>0?` (${E.premium})`:""]})}),d.jsx($t,{asChild:!0,variant:m.has("preview")?"default":"outline",children:d.jsxs("button",{type:"button","aria-pressed":m.has("preview"),className:"cursor-pointer select-none transition-colors",onClick:()=>j("preview"),children:[e("modelsPage.badges.preview"),E.preview>0?` (${E.preview})`:""]})}),d.jsx("span",{className:ce("text-muted-foreground ml-auto text-sm tabular-nums",!t&&l.length>0&&"motion-safe:animate-in motion-safe:fade-in-0"),children:A.length===E.total?e("modelsPage.totalCount",{count:E.total}):e("modelsPage.filteredCount",{filtered:A.length,total:E.total})})]}),d.jsxs(Rd,{glow:!0,children:[d.jsx(ev,{children:d.jsxs(Je,{children:[d.jsx(Ho,{columnKey:"name",label:e("modelsPage.columns.name"),tooltip:e("modelsPage.columnTooltip.name"),sortKey:S,sortDir:C,onSort:T}),d.jsx(Ho,{columnKey:"endpoints",label:e("modelsPage.columns.endpoints"),tooltip:e("modelsPage.columnTooltip.endpoints"),sortKey:S,sortDir:C,onSort:T,className:Yo[1]}),d.jsx(Ho,{columnKey:"originalId",label:e("modelsPage.columns.originalId"),tooltip:e("modelsPage.columnTooltip.originalId"),sortKey:S,sortDir:C,onSort:T,className:Yo[2]}),d.jsx(Ho,{columnKey:"context",label:e("modelsPage.columns.context"),tooltip:e("modelsPage.columnTooltip.context"),sortKey:S,sortDir:C,onSort:T}),d.jsx(Ho,{columnKey:"features",label:e("modelsPage.columns.features"),tooltip:e("modelsPage.columnTooltip.features"),sortKey:S,sortDir:C,onSort:T}),d.jsx(Ho,{columnKey:"multiplier",label:e("modelsPage.columns.multiplier"),tooltip:e("modelsPage.columnTooltip.multiplier"),sortKey:S,sortDir:C,onSort:T})]})}),d.jsxs(Md,{children:[t&&l.length===0&&d.jsx(oU,{rows:10}),!t&&A.length===0&&d.jsx(Je,{children:d.jsx(pe,{colSpan:Pj,children:d.jsx(En,{variant:"info",title:e("modelsPage.empty.title"),description:l.length>0?e("modelsPage.empty.noMatchesDescription"):e("modelsPage.empty.description")})})}),d.jsx(Vg,{initial:!1,children:A.length>0&&R.map(M=>d.jsxs(ui.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeOut"},"data-slot":"table-row",className:"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",children:[d.jsx(pe,{className:"max-w-[16rem]",children:d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"truncate",title:M.name,children:M.name}),M.preview?d.jsx($t,{variant:"outline",className:"shrink-0 text-xs",children:e("modelsPage.badges.preview")}):null]})}),d.jsx(pe,{className:ce("max-w-[26rem]",Yo[1]),children:d.jsx(lU,{endpoints:M.supported_endpoints})}),d.jsx(pe,{className:ce("max-w-[26rem]",Yo[2]),children:d.jsx(uU,{id:M.id,aliases:M.aliases})}),d.jsx(pe,{children:d.jsx(cU,{limits:M.capabilities.limits})}),d.jsx(pe,{children:d.jsx(rU,{supports:M.capabilities.supports})}),d.jsx(pe,{children:d.jsx(dU,{billing:M.billing})})]},M.id))})]})]})]})]})]})}function mU(){const{t:e}=He();return d.jsx(ui.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.25,ease:[.25,.1,.25,1]},children:d.jsx(Wt,{children:d.jsxs(cn,{children:[d.jsx(un,{children:e("notFound.title")}),d.jsx(jn,{children:e("notFound.description")})]})})})}const Cu=200;function hU(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function sd(e,t){const s=t?.trim();if(!s)return e;const i=e.toLowerCase(),r=s.toLowerCase(),l=[];let u=0;for(;u<e.length;){const f=i.indexOf(r,u);if(f===-1){l.push(e.slice(u));break}f>u&&l.push(e.slice(u,f)),l.push(d.jsx("mark",{className:"bg-accent/50 text-foreground rounded px-0.5",children:e.slice(f,f+r.length)},`${f}-${r}`)),u=f+r.length}return d.jsx(d.Fragment,{children:l})}function pU(e,t,s){if(e==null)return d.jsx("span",{className:"text-muted-foreground",children:"null"});if(typeof e=="string")return d.jsxs("span",{className:"text-foreground",children:['"',sd(e,t),'"']});if(typeof e=="number"){const i=String(e);if(!s||!/_at_ms$/.test(s))return d.jsx("span",{className:"text-foreground",children:i});if(e<9466848e5||e>41024448e5)return d.jsx("span",{className:"text-foreground",children:i});const u=Dl(e);return u?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-foreground",title:u,children:i}),d.jsxs("span",{className:"text-muted-foreground ml-1",children:["(",sd(u,t),")"]})]}):d.jsx("span",{className:"text-foreground",children:i})}return typeof e=="boolean"?d.jsx("span",{className:"text-foreground",children:e?"true":"false"}):d.jsx("span",{className:"text-foreground",children:String(e)})}function Ph({depth:e,name:t,valuePreview:s,expanded:i,toggle:r,t:l}){return d.jsxs("div",{className:"flex items-start gap-2",style:{paddingLeft:e*12},children:[r?d.jsx("button",{type:"button",onClick:r,className:"text-muted-foreground hover:text-foreground mt-0.5","aria-label":l(i?"jsonViewer.collapse":"jsonViewer.expand"),children:i?d.jsx(Yp,{className:"size-4"}):d.jsx(W_,{className:"size-4"})}):d.jsx("span",{className:"size-4"}),t?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-muted-foreground",children:t}),d.jsx("span",{className:"text-muted-foreground",children:":"})]}):d.jsx("span",{className:"text-muted-foreground",children:l("jsonViewer.root")}),d.jsx("span",{className:"min-w-0 break-words",children:s})]})}function Mp({value:e,name:t,path:s,depth:i,search:r,baseExpandDepth:l,expandedPaths:u,collapsedPaths:f,onToggle:h,t:m}){const y=hU(e),g=Array.isArray(e),b=y||g,S=b&&(f.has(s)?!1:u.has(s)?!0:i<l);if(!b)return d.jsx(Ph,{depth:i,name:t?sd(t,r):void 0,valuePreview:pU(e,r,t),expanded:!1,t:m});const C=g?e.length:Object.keys(e).length,T=g?m("jsonViewer.arrayLabel",{count:C}):m("jsonViewer.objectLabel",{count:C});return d.jsxs("div",{className:"space-y-1",children:[d.jsx(Ph,{depth:i,name:t?sd(t,r):void 0,valuePreview:d.jsx("span",{className:"text-muted-foreground",children:T}),expanded:S,toggle:()=>h(s,!S),t:m}),S?d.jsxs("div",{className:"space-y-1",children:[g?e.slice(0,Cu).map((j,E)=>d.jsx(Mp,{value:j,name:`[${E}]`,path:`${s}[${E}]`,depth:i+1,search:r,baseExpandDepth:l,expandedPaths:u,collapsedPaths:f,onToggle:h,t:m},`${s}[${E}]`)):Object.entries(e).slice(0,Cu).map(([j,E])=>d.jsx(Mp,{value:E,name:j,path:`${s}.${j}`,depth:i+1,search:r,baseExpandDepth:l,expandedPaths:u,collapsedPaths:f,onToggle:h,t:m},`${s}.${j}`)),C>Cu?d.jsx(Ph,{depth:i+1,valuePreview:d.jsx("span",{className:"text-muted-foreground",children:m("jsonViewer.more",{count:C-Cu})}),expanded:!1,t:m}):null]}):null]})}function gU({value:e,search:t,defaultExpandedDepth:s=2,className:i}){const[r,l]=x.useState(s),[u,f]=x.useState(()=>new Set),[h,m]=x.useState(()=>new Set),{t:y}=He();function g(T,j){if(j){m(E=>{const A=new Set(E);return A.delete(T),A}),f(E=>{const A=new Set(E);return A.add(T),A});return}f(E=>{const A=new Set(E);return A.delete(T),A}),m(E=>{const A=new Set(E);return A.add(T),A})}function b(){l(99),m(new Set),f(new Set)}function S(){l(0),f(new Set),m(new Set)}function C(){return r===0?y("jsonViewer.statusCollapsed"):r>=99?y("jsonViewer.statusExpanded"):y("jsonViewer.statusDepth",{depth:r})}return d.jsxs("div",{className:ce("space-y-3",i),children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:b,children:y("jsonViewer.expandAll")}),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:S,children:y("jsonViewer.collapseAll")}),d.jsx("span",{className:"text-muted-foreground ml-auto text-xs",children:C()})]}),d.jsx("div",{className:"bg-muted/20 overflow-auto rounded-md border p-3 font-mono text-xs",children:d.jsx(Mp,{value:e,path:"$",depth:0,search:t,baseExpandDepth:r,expandedPaths:u,collapsedPaths:h,onToggle:g,t:y})})]})}const Bt="—";function vU({status:e}){return e>=400?d.jsx($t,{variant:"destructive",children:e}):d.jsx($t,{variant:"secondary",children:e})}function Tu({label:e}){return d.jsx(Je,{className:"hover:bg-transparent",children:d.jsx(pe,{colSpan:2,className:"bg-muted/30 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:e})})}function xs({label:e,tooltip:t}){return t?d.jsxs(Fa,{children:[d.jsx(qa,{asChild:!0,children:d.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e})}),d.jsx(wa,{side:"right",className:"max-w-60",children:d.jsx("p",{children:t})})]}):d.jsx(d.Fragment,{children:e})}function yU(){const{t:e}=He(),{requestId:t=""}=sM(),i=Ka().state?.fromSearch,r=i?`/requests?${i}`:"/requests",[l,u]=x.useState(!0),[f,h]=x.useState(!1),[m,y]=x.useState(null),[g,b]=x.useState(null),[S,C]=x.useState("");x.useEffect(()=>{let _=!1;async function M(){u(!0),b(null);try{const z=await ph(t);if(_)return;y(z.item)}catch(z){if(_)return;const D=z instanceof Sa?z.message:String(z);b(D),y(null)}finally{_||u(!1)}}return t&&M(),()=>{_=!0}},[t]);function T(){h(!0),ph(t).then(_=>{y(_.item),b(null)}).catch(_=>{const M=_ instanceof Sa?_.message:String(_);Ht.error(ct.t("requestDetailPage.loadFailedTitle"),{description:M})}).finally(()=>h(!1))}function j(){u(!0),b(null),ph(t).then(_=>{y(_.item)}).catch(_=>{const M=_ instanceof Sa?_.message:String(_);b(M),y(null)}).finally(()=>u(!1))}async function E(){if(m)try{const _=JSON.stringify(m,null,2);await navigator.clipboard.writeText(_),Ht.success(e("requestDetailPage.toast.copiedJson"))}catch(_){Ht.error(e("requestDetailPage.toast.copyFailed"),{description:String(_)})}}function A(){if(m)try{const _=JSON.stringify(m,null,2),M=new Blob([_],{type:"application/json"}),z=URL.createObjectURL(M),D=document.createElement("a");D.href=z,D.download=`${m.request_id}.json`,D.click(),URL.revokeObjectURL(z),Ht.success(e("requestDetailPage.toast.downloadedJson"))}catch(_){Ht.error(e("requestDetailPage.toast.downloadFailed"),{description:String(_)})}}if(l)return d.jsxs(Wt,{children:[d.jsxs(cn,{children:[d.jsx(un,{children:e("requestDetailPage.title")}),d.jsx(jn,{children:d.jsx($i,{className:"h-4 w-40"})})]}),d.jsx(fn,{children:d.jsxs("div",{className:"space-y-2",children:[d.jsx($i,{className:"h-4 w-64"}),d.jsx($i,{className:"h-4 w-48"}),d.jsx($i,{className:"h-24 w-full"})]})})]});if(g||!m)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"flex items-center gap-2",children:d.jsx(Me,{variant:"ghost",size:"sm",asChild:!0,children:d.jsxs(ii,{to:r,children:[d.jsx(_0,{className:"size-4"}),e("common.back")]})})}),d.jsxs(Wt,{children:[d.jsxs(cn,{children:[d.jsx(un,{children:e("requestDetailPage.title")}),d.jsx(jn,{children:e("requestDetailPage.notFoundDescription")})]}),d.jsxs(fn,{className:"space-y-3",children:[d.jsx(En,{variant:"warning",title:e(g?"requestDetailPage.loadFailedTitle":"requestDetailPage.notFoundTitle"),description:g||`request_id: ${t}`}),d.jsxs(Me,{variant:"outline",size:"sm",onClick:j,children:[d.jsx(Fu,{className:"size-4"}),e("common.retry")]})]})]})]});const R=m.premium_unlimited_after?"∞":m.premium_remaining_after!=null?qt(m.premium_remaining_after):"";return d.jsxs("div",{className:"space-y-4 motion-safe:animate-in motion-safe:fade-in-0 motion-safe:duration-300",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Me,{variant:"ghost",size:"sm",asChild:!0,children:d.jsxs(ii,{to:r,children:[d.jsx(_0,{className:"size-4"}),e("common.back")]})}),d.jsxs(Me,{variant:"ghost",size:"sm",className:"ml-auto",disabled:f,onClick:T,children:[f?d.jsx(Wo,{className:"size-4 animate-spin"}):d.jsx(Fu,{className:"size-4"}),e("common.refresh")]})]}),d.jsx(Wt,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",style:{animationDelay:"50ms"},children:d.jsxs(cn,{children:[d.jsxs(un,{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:"font-mono text-sm",children:m.request_id}),d.jsx(vU,{status:m.http_status})]}),d.jsx(jn,{className:"font-mono text-xs",children:Dl(m.started_at_ms)})]})}),d.jsxs("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2 xl:grid-cols-[1fr_2fr]",children:[d.jsxs(Wt,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",style:{animationDelay:"100ms"},children:[d.jsx(cn,{children:d.jsx(un,{children:e("requestDetailPage.summaryTitle")})}),d.jsx(fn,{children:d.jsx(Rd,{children:d.jsxs(Md,{children:[d.jsx(Tu,{label:e("requestDetailPage.sections.request")}),d.jsxs(Je,{children:[d.jsx(pe,{className:"w-36 text-muted-foreground",children:e("requestDetailPage.fields.time")}),d.jsx(pe,{className:"font-mono text-xs",children:Dl(m.started_at_ms)||Bt})]}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.path")}),d.jsx(pe,{className:"font-mono text-xs whitespace-normal break-words",children:d.jsx(ii,{to:`/requests?path=${encodeURIComponent(m.path)}`,className:"underline decoration-border hover:decoration-foreground",children:m.path})})]}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:d.jsx(xs,{label:e("requestDetailPage.fields.endpoint"),tooltip:e("requestDetailPage.fieldTooltip.endpoint")})}),d.jsx(pe,{className:"font-mono text-xs whitespace-normal break-words",children:m.upstream_endpoint||Bt})]}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.model")}),d.jsx(pe,{className:"font-mono text-xs",children:m.upstream_model||Bt})]}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:d.jsx(xs,{label:e("requestDetailPage.fields.duration"),tooltip:e("requestDetailPage.fieldTooltip.duration")})}),d.jsx(pe,{className:"font-mono text-xs",children:typeof m.duration_ms=="number"?qt(m.duration_ms):Bt})]}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:d.jsx(xs,{label:e("requestDetailPage.fields.ttfb"),tooltip:e("requestDetailPage.fieldTooltip.ttfb")})}),d.jsx(pe,{className:"font-mono text-xs",children:typeof m.ttfb_ms=="number"?qt(m.ttfb_ms):Bt})]}),d.jsx(Tu,{label:e("requestDetailPage.sections.routing")}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.account")}),d.jsxs(pe,{className:"font-mono text-xs whitespace-normal break-words",children:[m.account_id?d.jsx(ii,{to:`/requests?account_id=${encodeURIComponent(m.account_id)}`,className:"underline decoration-border hover:decoration-foreground",children:m.account_id}):Bt,m.affinity_hit?d.jsx($t,{variant:"outline",className:"ml-2",children:e("requestDetailPage.fields.affinityHit")}):null]})]}),m.affinity_cache_key?d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:d.jsx(xs,{label:e("requestDetailPage.fields.affinityCacheKey"),tooltip:e("requestDetailPage.fieldTooltip.affinityCacheKey")})}),d.jsx(pe,{className:"font-mono text-xs whitespace-normal break-words",children:m.affinity_cache_key})]}):null,d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:d.jsx(xs,{label:e("requestDetailPage.fields.initiator"),tooltip:e("requestDetailPage.fieldTooltip.initiator")})}),d.jsx(pe,{className:"font-mono text-xs whitespace-normal break-words",children:m.initiator||Bt})]}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:d.jsx(xs,{label:e("requestDetailPage.fields.upstreamRequestId"),tooltip:e("requestDetailPage.fieldTooltip.upstreamRequestId")})}),d.jsx(pe,{className:"font-mono text-xs whitespace-normal break-words",children:m.upstream_request_id||Bt})]}),d.jsx(Tu,{label:e("requestDetailPage.sections.client")}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:d.jsx(xs,{label:e("requestDetailPage.fields.userId"),tooltip:e("requestDetailPage.fieldTooltip.userId")})}),d.jsx(pe,{className:"font-mono text-xs whitespace-normal break-words",children:m.user_id||Bt})]}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:d.jsx(xs,{label:e("requestDetailPage.fields.safetyIdentifier"),tooltip:e("requestDetailPage.fieldTooltip.safetyIdentifier")})}),d.jsx(pe,{className:"font-mono text-xs whitespace-normal break-words",children:m.safety_identifier||Bt})]}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:d.jsx(xs,{label:e("requestDetailPage.fields.promptCacheKey"),tooltip:e("requestDetailPage.fieldTooltip.promptCacheKey")})}),d.jsx(pe,{className:"font-mono text-xs whitespace-normal break-words",children:m.prompt_cache_key||Bt})]}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.client")}),d.jsxs(pe,{className:"font-mono text-xs whitespace-normal break-words",children:[m.client_ip||Bt,m.user_agent?` (${m.user_agent})`:""]})]}),d.jsx(Tu,{label:e("requestDetailPage.sections.usage")}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.tokens")}),d.jsx(pe,{className:"font-mono text-xs",children:d.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-0.5",children:[d.jsxs("span",{children:[d.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.in"),":"]})," ",m.tokens_input!=null?qt(m.tokens_input):Bt]}),d.jsxs("span",{children:[d.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.out"),":"]})," ",m.tokens_output!=null?qt(m.tokens_output):Bt]}),d.jsxs("span",{children:[d.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.total"),":"]})," ",m.tokens_total!=null?qt(m.tokens_total):Bt]}),d.jsxs("span",{children:[d.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.cached"),":"]})," ",m.tokens_cached_input!=null?qt(m.tokens_cached_input):Bt]})]})})]}),d.jsxs(Je,{children:[d.jsx(pe,{className:"text-muted-foreground",children:e("requestDetailPage.fields.quota")}),d.jsx(pe,{className:"font-mono text-xs",children:d.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-0.5",children:[d.jsxs("span",{children:[d.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.quota.before"),":"]})," ",m.premium_remaining_before!=null?qt(m.premium_remaining_before):Bt]}),d.jsxs("span",{children:[d.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.quota.after"),":"]})," ",m.premium_remaining_after!=null?qt(m.premium_remaining_after):Bt]}),d.jsxs("span",{children:[d.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.quota.diff"),":"]})," ",m.premium_remaining_diff!=null?qt(m.premium_remaining_diff):Bt,R?` (${R})`:""]})]})})]})]})})})]}),d.jsxs(Wt,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",style:{animationDelay:"150ms"},children:[d.jsxs(cn,{children:[d.jsx(un,{children:e("requestDetailPage.rawTitle")}),d.jsx(jn,{children:e("requestDetailPage.rawDescription")})]}),d.jsxs(fn,{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[d.jsx(lt,{placeholder:e("requestDetailPage.searchPlaceholder"),value:S,onChange:_=>C(_.target.value),className:"h-8 sm:max-w-xs"}),d.jsxs("div",{className:"flex items-center gap-2 sm:ml-auto",children:[d.jsxs(Me,{type:"button",variant:"outline",size:"sm",onClick:A,children:[d.jsx(zw,{className:"size-4"}),e("common.download")]}),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:()=>{E()},children:e("common.copyJson")})]})]}),d.jsx(gU,{value:m,search:S})]})]})]})]})}var kh="rovingFocusGroup.onEntryFocus",xU={bubbles:!1,cancelable:!0},Gl="RovingFocusGroup",[_p,kj,bU]=IC(Gl),[SU,Lj]=eo(Gl,[bU]),[wU,CU]=SU(Gl),zj=x.forwardRef((e,t)=>d.jsx(_p.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(_p.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(TU,{...e,ref:t})})}));zj.displayName=Gl;var TU=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:s,orientation:i,loop:r=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:h,onEntryFocus:m,preventScrollOnEntryFocus:y=!1,...g}=e,b=x.useRef(null),S=dt(t,b),C=og(l),[T,j]=Jo({prop:u,defaultProp:f??null,onChange:h,caller:Gl}),[E,A]=x.useState(!1),R=oi(m),_=kj(s),M=x.useRef(!1),[z,D]=x.useState(0);return x.useEffect(()=>{const P=b.current;if(P)return P.addEventListener(kh,R),()=>P.removeEventListener(kh,R)},[R]),d.jsx(wU,{scope:s,orientation:i,dir:C,loop:r,currentTabStopId:T,onItemFocus:x.useCallback(P=>j(P),[j]),onItemShiftTab:x.useCallback(()=>A(!0),[]),onFocusableItemAdd:x.useCallback(()=>D(P=>P+1),[]),onFocusableItemRemove:x.useCallback(()=>D(P=>P-1),[]),children:d.jsx(Fe.div,{tabIndex:E||z===0?-1:0,"data-orientation":i,...g,ref:S,style:{outline:"none",...e.style},onMouseDown:Pe(e.onMouseDown,()=>{M.current=!0}),onFocus:Pe(e.onFocus,P=>{const X=!M.current;if(P.target===P.currentTarget&&X&&!E){const Q=new CustomEvent(kh,xU);if(P.currentTarget.dispatchEvent(Q),!Q.defaultPrevented){const J=_().filter(k=>k.focusable),te=J.find(k=>k.active),ne=J.find(k=>k.id===T),de=[te,ne,...J].filter(Boolean).map(k=>k.ref.current);Uj(de,y)}}M.current=!1}),onBlur:Pe(e.onBlur,()=>A(!1))})})}),Vj="RovingFocusGroupItem",Bj=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:s,focusable:i=!0,active:r=!1,tabStopId:l,children:u,...f}=e,h=Cs(),m=l||h,y=CU(Vj,s),g=y.currentTabStopId===m,b=kj(s),{onFocusableItemAdd:S,onFocusableItemRemove:C,currentTabStopId:T}=y;return x.useEffect(()=>{if(i)return S(),()=>C()},[i,S,C]),d.jsx(_p.ItemSlot,{scope:s,id:m,focusable:i,active:r,children:d.jsx(Fe.span,{tabIndex:g?0:-1,"data-orientation":y.orientation,...f,ref:t,onMouseDown:Pe(e.onMouseDown,j=>{i?y.onItemFocus(m):j.preventDefault()}),onFocus:Pe(e.onFocus,()=>y.onItemFocus(m)),onKeyDown:Pe(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){y.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const E=AU(j,y.orientation,y.dir);if(E!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let R=b().filter(_=>_.focusable).map(_=>_.ref.current);if(E==="last")R.reverse();else if(E==="prev"||E==="next"){E==="prev"&&R.reverse();const _=R.indexOf(j.currentTarget);R=y.loop?NU(R,_+1):R.slice(_+1)}setTimeout(()=>Uj(R))}}),children:typeof u=="function"?u({isCurrentTabStop:g,hasTabStop:T!=null}):u})})});Bj.displayName=Vj;var EU={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jU(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function AU(e,t,s){const i=jU(e.key,s);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return EU[i]}function Uj(e,t=!1){const s=document.activeElement;for(const i of e)if(i===s||(i.focus({preventScroll:t}),document.activeElement!==s))return}function NU(e,t){return e.map((s,i)=>e[(t+i)%e.length])}var RU=zj,MU=Bj,_d="Tabs",[_U]=eo(_d,[Lj]),Ij=Lj(),[OU,tv]=_U(_d),Hj=x.forwardRef((e,t)=>{const{__scopeTabs:s,value:i,onValueChange:r,defaultValue:l,orientation:u="horizontal",dir:f,activationMode:h="automatic",...m}=e,y=og(f),[g,b]=Jo({prop:i,onChange:r,defaultProp:l??"",caller:_d});return d.jsx(OU,{scope:s,baseId:Cs(),value:g,onValueChange:b,orientation:u,dir:y,activationMode:h,children:d.jsx(Fe.div,{dir:y,"data-orientation":u,...m,ref:t})})});Hj.displayName=_d;var Fj="TabsList",qj=x.forwardRef((e,t)=>{const{__scopeTabs:s,loop:i=!0,...r}=e,l=tv(Fj,s),u=Ij(s);return d.jsx(RU,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:i,children:d.jsx(Fe.div,{role:"tablist","aria-orientation":l.orientation,...r,ref:t})})});qj.displayName=Fj;var $j="TabsTrigger",Kj=x.forwardRef((e,t)=>{const{__scopeTabs:s,value:i,disabled:r=!1,...l}=e,u=tv($j,s),f=Ij(s),h=Xj(u.baseId,i),m=Zj(u.baseId,i),y=i===u.value;return d.jsx(MU,{asChild:!0,...f,focusable:!r,active:y,children:d.jsx(Fe.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":m,"data-state":y?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:h,...l,ref:t,onMouseDown:Pe(e.onMouseDown,g=>{!r&&g.button===0&&g.ctrlKey===!1?u.onValueChange(i):g.preventDefault()}),onKeyDown:Pe(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&u.onValueChange(i)}),onFocus:Pe(e.onFocus,()=>{const g=u.activationMode!=="manual";!y&&!r&&g&&u.onValueChange(i)})})})});Kj.displayName=$j;var Gj="TabsContent",Yj=x.forwardRef((e,t)=>{const{__scopeTabs:s,value:i,forceMount:r,children:l,...u}=e,f=tv(Gj,s),h=Xj(f.baseId,i),m=Zj(f.baseId,i),y=i===f.value,g=x.useRef(y);return x.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(to,{present:r||y,children:({present:b})=>d.jsx(Fe.div,{"data-state":y?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":h,hidden:!b,id:m,tabIndex:0,...u,ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0},children:b&&l})})});Yj.displayName=Gj;function Xj(e,t){return`${e}-trigger-${t}`}function Zj(e,t){return`${e}-content-${t}`}var DU=Hj,PU=qj,kU=Kj,LU=Yj;function zU({className:e,...t}){return d.jsx(DU,{"data-slot":"tabs",className:ce("flex flex-col gap-2",e),...t})}function VU({className:e,...t}){return d.jsx(PU,{"data-slot":"tabs-list",className:ce("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function q1({className:e,...t}){return d.jsx(kU,{"data-slot":"tabs-trigger",className:ce("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function $1({className:e,...t}){return d.jsx(LU,{"data-slot":"tabs-content",className:ce("flex-1 outline-none",e),...t})}function Lh(e){return{account_id:e.get("account_id")||"",upstream_model:e.get("upstream_model")||"",client_model:e.get("client_model")||"",upstream_endpoint:e.get("upstream_endpoint")||"",path:e.get("path")||"",status:e.get("status")||"",has_error:e.get("has_error")||"",from_ms:e.get("from_ms")||"",to_ms:e.get("to_ms")||""}}function BU(e){const t=new URLSearchParams;return[["account_id",e.account_id],["upstream_model",e.upstream_model],["client_model",e.client_model],["upstream_endpoint",e.upstream_endpoint],["path",e.path],["status",e.status],["has_error",e.has_error],["from_ms",e.from_ms],["to_ms",e.to_ms]].forEach(([s,i])=>{const r=i.trim();r&&t.set(s,r)}),t}function K1(e){const t=e.trim();if(!t)return null;const s=Number(t);if(!Number.isFinite(s))return null;const i=Math.trunc(s);return i<0?null:i}function UU(e,t){const s=K1(e),i=K1(t);return e.trim()&&s===null?"requestsPage.validation.fromMsMustBeNumber":t.trim()&&i===null?"requestsPage.validation.toMsMustBeNumber":s!==null&&i!==null&&s>i?"requestsPage.validation.fromMsMustBeLteToMs":null}function G1(e){if(!e)return"";const t=Date.parse(e);return Number.isFinite(t)?String(t):""}function Y1(e){const t=Number(e);if(!Number.isFinite(t))return"";const s=new Date(t),i=m=>String(m).padStart(2,"0"),r=s.getFullYear(),l=i(s.getMonth()+1),u=i(s.getDate()),f=i(s.getHours()),h=i(s.getMinutes());return`${r}-${l}-${u}T${f}:${h}`}function IU(e){const t=Date.now(),i={"15m":900*1e3,"1h":3600*1e3,"6h":360*60*1e3,"24h":1440*60*1e3,"7d":10080*60*1e3}[e];return{from_ms:String(t-i),to_ms:String(t)}}const Ut=[null,null,"hidden md:table-cell","hidden md:table-cell","hidden lg:table-cell","hidden lg:table-cell","hidden xl:table-cell","hidden xl:table-cell","hidden 2xl:table-cell","hidden lg:table-cell",null];function dl({label:e,tooltip:t}){return t?d.jsxs(Fa,{children:[d.jsx(qa,{asChild:!0,children:d.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e})}),d.jsx(wa,{side:"bottom",className:"max-w-60",children:d.jsx("p",{children:t})})]}):d.jsx(d.Fragment,{children:e})}function HU({rows:e}){const t=Ut.length;return d.jsx(d.Fragment,{children:Array.from({length:e}).map((s,i)=>d.jsx(Je,{children:Array.from({length:t}).map((r,l)=>d.jsx(pe,{className:ce("py-3",Ut[l]),children:d.jsx($i,{className:l===1?"h-4 w-56":"h-4 w-24"})},l))},i))})}function FU(){const{t:e}=He(),[t,s]=ZM(),[i,r]=x.useState(()=>Lh(t)),[l,u]=x.useState([]),[f,h]=x.useState(null),[m,y]=x.useState(!1),[g,b]=x.useState(!1),[S,C]=x.useState(null),T=x.useMemo(()=>Lh(t),[t]),[j,E]=x.useState(()=>{const G=Lh(t);return G.from_ms||G.to_ms?"custom":"__any__"});x.useEffect(()=>{r(T);const G=!!(T.from_ms||T.to_ms);E(O=>G?O==="__any__"?"custom":O:"__any__")},[T]);const A=x.useMemo(()=>{const G=UU(i.from_ms,i.to_ms);return G?e(G):null},[i.from_ms,i.to_ms,e]),R=x.useCallback(async({reset:G,cursor:O})=>{k.current=!0,b(!0),C(null);try{const V=await p5({...T,limit:50,cursor_id:G?null:O});u(I=>G?V.items:I.concat(V.items)),h(V.next_cursor_id??null),y(!!V.has_more)}catch(V){const I=V instanceof Sa?V.message:String(V);C(I),Ht.error(ct.t("requestsPage.loadFailedTitle"),{description:I}),G&&u([]),y(!1),h(null)}finally{k.current=!1,b(!1)}},[T]);x.useEffect(()=>{R({reset:!0,cursor:null})},[R]);function _(){A||s(BU(i))}function M(){s(new URLSearchParams)}function z(G){if(E(G),G==="__any__"){r(I=>({...I,from_ms:"",to_ms:""}));return}if(G==="custom")return;const{from_ms:O,to_ms:V}=IU(G);r(I=>({...I,from_ms:O,to_ms:V}))}const D=x.useMemo(()=>j==="custom"?Y1(i.from_ms):"",[i.from_ms,j]),P=x.useMemo(()=>j==="custom"?Y1(i.to_ms):"",[i.to_ms,j]),X=!g&&!A,Q=Ut.length,J=t.toString().length>0,te=x.useMemo(()=>{let G=0;for(const[,O]of t)O.trim()&&G++;return G},[t]),[ne,re]=x.useState(0),de=x.useRef(null),k=x.useRef(!1);x.useEffect(()=>{let G=!1;if(de.current&&(clearTimeout(de.current),de.current=null),ne>0){const O=()=>{G||(de.current=setTimeout(async()=>{if(k.current){O();return}try{await R({reset:!0,cursor:null})}finally{O()}},ne))};O()}return()=>{G=!0,de.current&&(clearTimeout(de.current),de.current=null)}},[ne,R]);const H=x.useRef(_);H.current=_;const B=x.useRef(null);x.useEffect(()=>{function G(O){if(O.key!=="Enter")return;const V=O.target;if(!V||!B.current?.contains(V))return;const I=V.tagName;I==="TEXTAREA"||I==="BUTTON"||I==="A"||I==="SELECT"||V.isContentEditable||V.closest("[role=dialog]")||V.closest("[role=listbox]")||V.closest("[role=button]")||(O.preventDefault(),H.current())}return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[]);let le=e("common.noMore");return m&&(le=e(g?"common.loading":"common.loadMore")),d.jsxs("div",{className:"space-y-4",children:[d.jsxs(Wt,{className:"gap-4 py-4",children:[d.jsxs(cn,{className:"px-4",children:[d.jsx(un,{children:e("nav.requests")}),d.jsx(jn,{className:"hidden sm:block",children:e("requestsPage.description")}),d.jsxs($B,{className:"flex items-center gap-2",children:[te>0&&d.jsx($t,{variant:"secondary",className:"text-xs",children:e("requestsPage.activeFilters",{count:te})}),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:M,disabled:!J||g,children:e("common.clear")}),d.jsxs(Me,{onClick:_,disabled:!X,size:"sm",children:[g&&d.jsx(Wo,{className:"size-4 motion-safe:animate-spin"}),e("common.apply")]})]})]}),d.jsxs(fn,{ref:B,className:"space-y-3 px-4",children:[d.jsxs(zU,{defaultValue:"quick",className:"gap-1.5",children:[d.jsxs(VU,{className:"h-8 p-[2px]",children:[d.jsx(q1,{value:"quick",children:e("requestsPage.tabs.quick")}),d.jsx(q1,{value:"advanced",children:e("requestsPage.tabs.advanced")})]}),d.jsx($1,{value:"quick",children:d.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6",children:[d.jsxs("div",{className:"grid gap-1.5",children:[d.jsx(ht,{htmlFor:"account_id",className:"text-muted-foreground lg:text-xs",children:e("common.account")}),d.jsx(lt,{id:"account_id",className:"h-8",placeholder:"octocat",value:i.account_id,onChange:G=>r(O=>({...O,account_id:G.target.value}))})]}),d.jsxs("div",{className:"grid gap-1.5",children:[d.jsx(ht,{className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.timeRange")}),d.jsxs(Nn,{value:j,onValueChange:G=>z(G),children:[d.jsx(Mn,{size:"sm",className:"w-full",children:d.jsx(Rn,{})}),d.jsxs(_n,{children:[d.jsx(Ne,{value:"__any__",children:e("common.any")}),d.jsx(Ne,{value:"15m",children:e("requestsPage.timeRange.last15m")}),d.jsx(Ne,{value:"1h",children:e("requestsPage.timeRange.last1h")}),d.jsx(Ne,{value:"6h",children:e("requestsPage.timeRange.last6h")}),d.jsx(Ne,{value:"24h",children:e("requestsPage.timeRange.last24h")}),d.jsx(Ne,{value:"7d",children:e("requestsPage.timeRange.last7d")}),d.jsx(Ne,{value:"custom",children:e("requestsPage.timeRange.custom")})]})]})]}),d.jsxs("div",{className:"grid gap-1.5",children:[d.jsx(ht,{htmlFor:"status",className:"text-muted-foreground lg:text-xs",children:e("common.status")}),d.jsx(lt,{id:"status",className:"h-8",placeholder:"200",value:i.status,onChange:G=>r(O=>({...O,status:G.target.value}))})]}),d.jsxs("div",{className:"grid gap-1.5",children:[d.jsx(ht,{className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.hasError")}),d.jsxs(Nn,{value:i.has_error||"__any__",onValueChange:G=>r(O=>({...O,has_error:G==="__any__"?"":G})),children:[d.jsx(Mn,{size:"sm",className:"w-full",children:d.jsx(Rn,{})}),d.jsxs(_n,{children:[d.jsx(Ne,{value:"__any__",children:e("common.any")}),d.jsx(Ne,{value:"1",children:e("common.yes")}),d.jsx(Ne,{value:"0",children:e("common.no")})]})]})]}),j==="custom"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"grid gap-1.5",children:[d.jsx(ht,{htmlFor:"from_dt",className:"text-muted-foreground lg:text-xs",children:e("common.from")}),d.jsx(lt,{id:"from_dt",className:"h-8",type:"datetime-local",value:D,onChange:G=>{E("custom"),r(O=>({...O,from_ms:G1(G.target.value)}))}})]}),d.jsxs("div",{className:"grid gap-1.5",children:[d.jsx(ht,{htmlFor:"to_dt",className:"text-muted-foreground lg:text-xs",children:e("common.to")}),d.jsx(lt,{id:"to_dt",className:"h-8",type:"datetime-local",value:P,onChange:G=>{E("custom"),r(O=>({...O,to_ms:G1(G.target.value)}))}})]})]}):null]})}),d.jsx($1,{value:"advanced",children:d.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:[d.jsxs("div",{className:"grid gap-1.5",children:[d.jsx(ht,{htmlFor:"upstream_model",className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.upstreamModel")}),d.jsx(lt,{id:"upstream_model",className:"h-8",placeholder:"gpt-5",value:i.upstream_model,onChange:G=>r(O=>({...O,upstream_model:G.target.value}))})]}),d.jsxs("div",{className:"grid gap-1.5",children:[d.jsx(ht,{htmlFor:"client_model",className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.clientModel")}),d.jsx(lt,{id:"client_model",className:"h-8",placeholder:"claude-sonnet-4",value:i.client_model,onChange:G=>r(O=>({...O,client_model:G.target.value}))})]}),d.jsxs("div",{className:"grid gap-1.5",children:[d.jsx(ht,{htmlFor:"upstream_endpoint",className:"text-muted-foreground lg:text-xs",children:e("common.endpoint")}),d.jsx(lt,{id:"upstream_endpoint",className:"h-8",placeholder:"/responses",value:i.upstream_endpoint,onChange:G=>r(O=>({...O,upstream_endpoint:G.target.value}))})]}),d.jsxs("div",{className:"grid gap-1.5",children:[d.jsx(ht,{htmlFor:"path",className:"text-muted-foreground lg:text-xs",children:e("common.path")}),d.jsx(lt,{id:"path",className:"h-8",placeholder:"/v1/messages",value:i.path,onChange:G=>r(O=>({...O,path:G.target.value}))})]})]})})]}),A?d.jsx(En,{variant:"warning",title:e("requestsPage.validation.title"),description:A}):null]})]}),d.jsxs("div",{className:"flex items-center justify-between motion-safe:animate-in motion-safe:fade-in-0 motion-safe:duration-300",children:[d.jsx("span",{className:"text-muted-foreground text-sm",children:l.length>0?m?e("requestsPage.resultCountWithMore",{count:l.length}):e("requestsPage.resultCount",{count:l.length}):null}),d.jsxs("div",{className:"flex items-center gap-2",children:[ne>0&&d.jsxs("span",{className:"relative flex h-2 w-2",children:[d.jsx("span",{className:"bg-primary absolute inline-flex h-full w-full motion-safe:animate-ping rounded-full opacity-75"}),d.jsx("span",{className:"bg-primary relative inline-flex h-2 w-2 rounded-full"})]}),d.jsx("span",{className:"text-muted-foreground text-sm",children:e("requestsPage.autoRefreshLabel")}),d.jsxs(Nn,{value:String(ne),onValueChange:G=>re(Number(G)),children:[d.jsx(Mn,{size:"sm",className:"w-20",children:d.jsx(Rn,{})}),d.jsxs(_n,{align:"end",children:[d.jsx(Ne,{value:"0",children:e("requestsPage.autoRefresh.off")}),d.jsx(Ne,{value:"30000",children:e("requestsPage.autoRefresh.30s")}),d.jsx(Ne,{value:"60000",children:e("requestsPage.autoRefresh.60s")}),d.jsx(Ne,{value:"300000",children:e("requestsPage.autoRefresh.5m")})]})]})]})]}),d.jsx(Wt,{className:"gap-4 py-4",children:d.jsxs(fn,{className:"space-y-4 px-4",children:[S&&l.length>0?d.jsx(En,{variant:"error",title:e("requestsPage.loadFailedTitle"),description:S,actionLabel:e("common.retry"),onAction:()=>{R({reset:!0,cursor:null})}}):null,d.jsxs(Rd,{glow:!0,className:"[&_th]:h-9 [&_td]:py-1.5",children:[d.jsx(ev,{children:d.jsxs(Je,{children:[d.jsx(Tt,{children:e("common.time")}),d.jsx(Tt,{children:e("common.path")}),d.jsx(Tt,{className:ce(Ut[2]),children:e("common.endpoint")}),d.jsx(Tt,{className:ce(Ut[3]),children:e("common.account")}),d.jsx(Tt,{className:ce(Ut[4]),children:e("common.model")}),d.jsx(Tt,{className:ce(Ut[5]),children:d.jsx(dl,{label:e("common.xInitiator"),tooltip:e("requestsPage.columnTooltip.initiator")})}),d.jsx(Tt,{className:ce(Ut[6]),children:d.jsx(dl,{label:e("common.tokens"),tooltip:e("requestsPage.columnTooltip.tokens")})}),d.jsx(Tt,{className:ce(Ut[7]),children:d.jsx(dl,{label:e("common.cost"),tooltip:e("requestsPage.columnTooltip.cost")})}),d.jsx(Tt,{className:ce(Ut[8]),children:d.jsx(dl,{label:e("common.quota"),tooltip:e("requestsPage.columnTooltip.quota")})}),d.jsx(Tt,{className:ce(Ut[9]),children:d.jsx(dl,{label:e("common.durationAbbrev"),tooltip:e("requestsPage.columnTooltip.duration")})}),d.jsx(Tt,{children:e("common.status")})]})}),d.jsx(Md,{children:S&&!g&&l.length===0?d.jsx(Je,{children:d.jsx(pe,{colSpan:Q,children:d.jsx(En,{variant:"error",title:e("requestsPage.loadFailedTitle"),description:S,actionLabel:e("common.retry"),onAction:()=>{R({reset:!0,cursor:null})}})})}):g&&l.length===0?d.jsx(HU,{rows:6}):l.length===0?d.jsx(Je,{children:d.jsx(pe,{colSpan:Q,children:d.jsx(En,{variant:"info",title:e("requestsPage.empty.noRequestsTitle"),description:e(J?"requestsPage.empty.noResultsForFilters":"requestsPage.empty.noRequestsFound"),actionLabel:J?e("common.clearFilters"):void 0,onAction:J?M:void 0})})}):l.map(G=>{const O=G.premium_unlimited_after?"∞":G.premium_remaining_after!=null?qt(G.premium_remaining_after):"",V=G.http_status>=400?d.jsxs($t,{variant:"destructive","aria-label":`Error ${G.http_status}`,children:[d.jsx("span",{"aria-hidden":"true",className:"mr-0.5",children:"!"}),G.http_status]}):d.jsx($t,{variant:"secondary",children:G.http_status});return d.jsxs(Je,{children:[d.jsx(pe,{className:"font-mono text-xs",children:Dl(G.started_at_ms)}),d.jsx(pe,{className:"font-mono whitespace-normal break-words",children:d.jsx(ii,{to:`/request/${encodeURIComponent(G.request_id)}`,state:{fromSearch:t.toString()},className:"underline decoration-border hover:decoration-foreground",children:G.path})}),d.jsx(pe,{className:ce(Ut[2],"font-mono text-xs whitespace-normal break-words"),children:G.upstream_endpoint||""}),d.jsxs(pe,{className:ce(Ut[3],"font-mono text-xs whitespace-normal break-words"),children:[G.account_id||"",G.affinity_hit?d.jsxs(Fa,{children:[d.jsx(qa,{asChild:!0,children:d.jsx($t,{variant:"outline",className:"ml-1 px-1 py-0 text-[10px] leading-tight align-middle","aria-label":e("requestsPage.affinityHit"),children:"affinity"})}),d.jsxs(wa,{children:[d.jsx("p",{children:e("requestsPage.affinityHit")}),G.affinity_cache_key&&d.jsx("p",{className:"font-mono text-xs opacity-80",children:G.affinity_cache_key})]})]}):null]}),d.jsx(pe,{className:ce(Ut[4],"font-mono text-xs"),children:G.upstream_model||""}),d.jsx(pe,{className:ce(Ut[5],"font-mono text-xs"),children:G.initiator||""}),d.jsx(pe,{className:ce(Ut[6],"font-mono text-xs"),children:G.tokens_total!=null?qt(G.tokens_total):""}),d.jsx(pe,{className:ce(Ut[7],"font-mono text-xs"),children:G.cost_units??""}),d.jsx(pe,{className:ce(Ut[8],"font-mono text-xs"),children:O}),d.jsx(pe,{className:ce(Ut[9],"font-mono text-xs"),children:G.duration_ms!=null?qt(G.duration_ms):""}),d.jsx(pe,{children:V})]},G.request_id)})})]}),d.jsx("div",{className:"flex items-center justify-end gap-2",children:d.jsxs(Me,{variant:"outline",onClick:()=>{R({reset:!1,cursor:f})},disabled:g||!m,size:"sm",children:[g&&d.jsx(Wo,{className:"size-4 motion-safe:animate-spin"}),le]})})]})})]})}function qU({saving:e,canSave:t,onSave:s,className:i}){const{t:r}=He();return d.jsx("div",{className:ce("fixed bottom-6 right-6 z-50","motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-4 motion-safe:duration-300",i),children:d.jsx(Me,{type:"button",size:"lg",onClick:()=>{e||!t||s()},disabled:!t||e,className:"shadow-lg",children:r(e?"settingsPage.saveButton.saving":"settingsPage.saveButton.saveChanges")})})}function $U({sections:e,activeSection:t,onSectionClick:s,className:i}){const{t:r}=He();return d.jsxs("nav",{className:ce("sticky top-6 space-y-1 rounded-lg border bg-card p-2",i),"aria-label":r("settingsPage.navigation.ariaLabel"),children:[d.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground uppercase tracking-wider",children:r("nav.settings")}),e.map(l=>{const u=t===l.id;return d.jsx("button",{type:"button",onClick:()=>s(l.id),className:ce("w-full text-left px-3 py-2 rounded-md text-sm transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",u?"bg-accent/50 font-medium text-foreground":"text-muted-foreground"),"aria-current":u?"page":void 0,"aria-controls":l.id,children:l.label},l.id)})]})}const zi=x.forwardRef(({id:e,isActive:t,children:s,className:i,style:r},l)=>d.jsx("div",{ref:l,id:e,"data-section-id":e,className:ce("scroll-mt-6 rounded-xl transition-shadow","motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",t&&"ring-1 ring-primary/30",i),style:r,children:s}));zi.displayName="SettingsSectionCard";function KU({sectionIds:e,rootMargin:t="-20% 0px -60% 0px",threshold:s=0}){const[i,r]=x.useState(e[0]??""),l=x.useRef(new Map),u=x.useRef(null),f=x.useCallback((m,y)=>{if(y)l.current.set(m,y),u.current?.observe(y);else{const g=l.current.get(m);g&&u.current?.unobserve(g),l.current.delete(m)}},[]),h=x.useCallback(m=>{const y=l.current.get(m);y&&y.scrollIntoView({behavior:"smooth",block:"start"})},[]);return x.useEffect(()=>{const m=new IntersectionObserver(y=>{const g=y.filter(b=>b.isIntersecting);if(g.length>0){g.sort((C,T)=>C.boundingClientRect.top-T.boundingClientRect.top);const S=g[0].target.dataset.sectionId;S&&r(S)}},{rootMargin:t,threshold:s});u.current=m;for(const y of l.current.values())m.observe(y);return()=>{m.disconnect(),u.current=null}},[t,s]),{activeSection:i,registerSection:f,scrollToSection:h}}function GU({className:e,checked:t,defaultChecked:s,onCheckedChange:i,disabled:r,onClick:l,type:u="button",...f},h){const m=t!==void 0,[y,g]=x.useState(s??!1),b=m?t:y;function S(C){if(l?.(C),C.defaultPrevented||r)return;const T=!b;m||g(T),i?.(T)}return d.jsx("button",{ref:h,type:u,role:"switch","aria-checked":!!b,"data-state":b?"checked":"unchecked","data-disabled":r?"true":"false",className:ce("inline-flex h-6 w-11 shrink-0 items-center rounded-full border border-input bg-input/30 shadow-xs transition-[color,box-shadow] outline-none","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",b?"bg-primary border-primary":"bg-input/30",e),onClick:S,disabled:r,...f,children:d.jsx("span",{"data-state":b?"checked":"unchecked",className:ce("pointer-events-none inline-block size-4 rounded-full bg-background shadow-sm transition-transform",b?"translate-x-5":"translate-x-1")})})}const Hn=x.forwardRef(GU);Hn.displayName="Switch";function ar({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:ce("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input min-h-[96px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...t})}const YU=["general","reasoning","aliases","prompts","advanced","providers"],Op=["none","minimal","low","medium","high","xhigh"];function nv({next:e,record:t,setJson:s,setError:i,setMode:r}){e&&s(JSON.stringify(t??{},null,2)),i(null),r(e?"json":"form")}function av({value:e,parse:t,setJson:s,setError:i,onRecord:r}){s(e);const l=t(e);if("error"in l){i(l.error);return}i(null),r(l.record)}function kl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Dp(e){if(e===void 0)return;if(e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string")return e;if(Array.isArray(e)){const s=e.map(i=>Dp(i)).filter(i=>i!==void 0);return s.length===0?void 0:(s.every(i=>typeof i!="object"||i===null)&&s.sort((i,r)=>JSON.stringify(i).localeCompare(JSON.stringify(r))),s)}if(!kl(e))return;const t=Object.entries(e).map(([s,i])=>[s,Dp(i)]).filter(([,s])=>s!==void 0).sort(([s],[i])=>s.localeCompare(i));if(t.length!==0)return Object.fromEntries(t)}function X1(e){return JSON.stringify(Dp(e)??{})}function Ea(){return typeof globalThis.crypto?.randomUUID=="function"?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function XU(e){return Array.isArray(e)?[...new Set(e.filter(t=>typeof t=="string").map(t=>t.trim()).filter(t=>t.length>0))]:[]}function Z1(e){const t=XU(e.auth?.apiKeys);if(t.length>0)return t;const s=e.apiKey?.trim();return s?[s]:[]}function ZU(e){return Qj(e)}function Qj(e){return[...new Set(e.split(/\r?\n|,/).map(t=>t.trim()).filter(t=>t.length>0))]}function Q1(e){return e?Object.entries(e).map(([t,s])=>({id:Ea(),model:t,prompt:s})):[]}function W1(e){return e?Object.entries(e).map(([t,s])=>({id:Ea(),model:t,effort:s})):[]}function Pp(e){return e?Object.entries(e).map(([t,s])=>typeof s=="string"?{id:Ea(),alias:t,target:s,allowOriginal:void 0}:{id:Ea(),alias:t,target:s.target,allowOriginal:s.allowOriginal}):[]}function J1(e){const t={};for(const s of e){const i=s.model.trim();i&&(t[i]=s.prompt)}return t}function ew(e){const t={};for(const s of e){const i=s.model.trim();i&&(t[i]=s.effort)}return t}const Wj=new Set(["__proto__","constructor","prototype"]);function zu(e){const t=Object.create(null),s=new Set;for(const i of e){const r=i.alias.trim(),l=i.target.trim();if(!r||!l)continue;const u=r.toLowerCase();Wj.has(u)||u!==l.toLowerCase()&&(s.has(u)||(s.add(u),t[r]=i.allowOriginal===void 0?{target:l}:{target:l,allowOriginal:i.allowOriginal}))}return t}const Jj=new Set(["__proto__","constructor","prototype"]);function QU(e){return e?Object.entries(e).map(([t,s])=>({id:Ea(),name:t,type:s.type??"anthropic",enabled:s.enabled??!0,baseUrl:s.baseUrl??"",apiKey:s.apiKey??"",models:Object.entries(s.models??{}).map(([i,r])=>({id:Ea(),model:i,temperature:r.temperature===void 0?"":String(r.temperature),topP:r.topP===void 0?"":String(r.topP),topK:r.topK===void 0?"":String(r.topK)}))})):[]}function WU(e){return e.enabled===!1||e.baseUrl.trim()||e.apiKey.trim()?!0:e.models.some(t=>!!t.model.trim()||!!t.temperature.trim()||!!t.topP.trim()||!!t.topK.trim())}function JU(e,t,s){const i=e.model.trim(),r=e.temperature.trim(),l=e.topP.trim(),u=e.topK.trim(),f=!!(r||l||u);if(!i)return f?{error:`Provider '${t}': model id is required when setting overrides.`}:{record:null};const h=i.toLowerCase();if(Jj.has(h))return{error:`Provider '${t}' model '${i}' is not allowed.`};if(s.has(h))return{error:`Provider '${t}' model '${i}' is duplicated.`};const m={};if(r){const y=Number(r);if(!Number.isFinite(y)||y<0)return{error:`Provider '${t}' model '${i}': temperature must be a non-negative number.`};m.temperature=y}if(l){const y=Number(l);if(!Number.isFinite(y)||y<0)return{error:`Provider '${t}' model '${i}': topP must be a non-negative number.`};m.topP=y}if(u){const y=Number(u);if(!Number.isFinite(y)||y<0)return{error:`Provider '${t}' model '${i}': topK must be a non-negative number.`};m.topK=y}return Object.keys(m).length===0?{record:null}:(s.add(h),{record:{modelId:i,config:m}})}function e8(e,t){const s=Object.create(null),i=new Set;for(const r of e){const l=JU(r,t,i);if("error"in l)return l;l.record&&(s[l.record.modelId]=l.record.config)}return{record:s}}function t8(e){const t=Object.create(null),s=new Set;for(const i of e){const r=i.name.trim();if(!r){if(WU(i))return{error:"Provider name is required."};continue}const l=r.toLowerCase();if(Jj.has(l))return{error:`Provider '${r}' is not allowed.`};if(s.has(l))return{error:`Provider '${r}' is duplicated.`};s.add(l);const u=i.baseUrl.trim(),f=i.apiKey.trim(),h={type:i.type||"anthropic",enabled:i.enabled,baseUrl:u||void 0,apiKey:f||void 0},m=e8(i.models,r);if("error"in m)return m;Object.keys(m.record).length>0&&(h.models=m.record),t[r]=h}return{record:t}}function n8(e){const[t,s]=x.useState([]),[i,r]=x.useState(null),l=x.useCallback(S=>{s(QU(S)),r(null)},[]),u=x.useCallback(S=>{s(S);const C=t8(S);if("error"in C){r(C.error);return}r(null),e(C.record)},[e]),f=x.useCallback(()=>{u(t.concat({id:Ea(),name:"",type:"anthropic",enabled:!0,baseUrl:"",apiKey:"",models:[]}))},[t,u]),h=x.useCallback(S=>{u(t.filter(C=>C.id!==S))},[t,u]),m=x.useCallback((S,C)=>{const T=t.map(j=>j.id===S?{...j,...C}:j);u(T)},[t,u]),y=x.useCallback(S=>{const C=t.map(T=>T.id!==S?T:{...T,models:T.models.concat({id:Ea(),model:"",temperature:"",topP:"",topK:""})});u(C)},[t,u]),g=x.useCallback((S,C)=>{const T=t.map(j=>j.id!==S?j:{...j,models:j.models.filter(E=>E.id!==C)});u(T)},[t,u]),b=x.useCallback((S,C,T)=>{const j=t.map(E=>E.id!==S?E:{...E,models:E.models.map(A=>A.id===C?{...A,...T}:A)});u(j)},[t,u]);return{items:t,issue:i,onAddProvider:f,onRemoveProvider:h,onUpdateProvider:m,onAddModel:y,onRemoveModel:g,onUpdateModel:b,setFromRecord:l}}function a8(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!kl(t))return{error:"extraPrompts JSON must be an object of string values."};const s={};for(const[i,r]of Object.entries(t)){if(typeof r!="string")return{error:`extraPrompts.${i} must be a string.`};s[i]=r}return{record:s}}catch{return{error:"extraPrompts JSON is not valid."}}}function s8(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!kl(t))return{error:"modelReasoningEfforts JSON must be an object."};const s={};for(const[i,r]of Object.entries(t)){if(typeof r!="string")return{error:`modelReasoningEfforts.${i} must be a string.`};if(!Op.includes(r))return{error:`modelReasoningEfforts.${i} must be one of ${Op.join(", ")}.`};s[i]=r}return{record:s}}catch{return{error:"modelReasoningEfforts JSON is not valid."}}}function i8(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!kl(t))return{error:"modelAliases JSON must be an object."};const s=Object.create(null),i=new Set;for(const[r,l]of Object.entries(t)){const u=r.trim();if(!u)return{error:"modelAliases keys must be non-empty strings."};const f=u.toLowerCase();if(Wj.has(f))return{error:`modelAliases.${r} is not allowed.`};let h,m;if(typeof l=="string")h=l.trim();else if(kl(l)){const y=l.target;if(typeof y!="string")return{error:`modelAliases.${r}.target must be a string.`};if(h=y.trim(),"allowOriginal"in l){if(typeof l.allowOriginal!="boolean")return{error:`modelAliases.${r}.allowOriginal must be a boolean.`};m=l.allowOriginal}}else return{error:`modelAliases.${r} must be a string or object.`};if(!h)return{error:`modelAliases.${r} must be a non-empty string.`};if(f===h.toLowerCase())return{error:`modelAliases.${r} cannot map to itself.`};if(i.has(f))return{error:`modelAliases.${r} conflicts with another alias.`};i.add(f),s[u]=m===void 0?{target:h}:{target:h,allowOriginal:m}}return{record:s}}catch{return{error:"modelAliases JSON is not valid."}}}function o8(e){const[t,s]=x.useState("form"),[i,r]=x.useState([]),[l,u]=x.useState(""),[f,h]=x.useState(null),m=x.useMemo(()=>f?`extraPrompts: ${f}`:null,[f]),y=x.useCallback(E=>{r(Q1(E)),u(JSON.stringify(E??{},null,2)),h(null)},[]),g=x.useCallback(E=>{r(E),e(J1(E))},[e]),b=x.useCallback(E=>{av({value:E,parse:a8,setJson:u,setError:h,onRecord:A=>g(Q1(A))})},[g]),S=x.useCallback(E=>{nv({next:E,record:J1(i),setJson:u,setError:h,setMode:s})},[i]),C=x.useCallback(()=>{g(i.concat({id:Ea(),model:"",prompt:""}))},[i,g]),T=x.useCallback(E=>{g(i.filter(A=>A.id!==E))},[i,g]),j=x.useCallback((E,A)=>{const R=i.map(_=>_.id===E?{..._,...A}:_);g(R)},[i,g]);return{mode:t,items:i,json:l,jsonIssue:m,onToggleMode:S,onJsonChange:b,onAddItem:C,onRemoveItem:T,onUpdateItem:j,setFromRecord:y}}function r8(e){const[t,s]=x.useState("form"),[i,r]=x.useState([]),[l,u]=x.useState(""),[f,h]=x.useState(null),m=x.useMemo(()=>f?`modelReasoningEfforts: ${f}`:null,[f]),y=x.useCallback(E=>{r(W1(E)),u(JSON.stringify(E??{},null,2)),h(null)},[]),g=x.useCallback(E=>{r(E),e(ew(E))},[e]),b=x.useCallback(E=>{av({value:E,parse:s8,setJson:u,setError:h,onRecord:A=>g(W1(A))})},[g]),S=x.useCallback(E=>{nv({next:E,record:ew(i),setJson:u,setError:h,setMode:s})},[i]),C=x.useCallback(()=>{g(i.concat({id:Ea(),model:"",effort:"high"}))},[i,g]),T=x.useCallback(E=>{g(i.filter(A=>A.id!==E))},[i,g]),j=x.useCallback((E,A)=>{const R=i.map(_=>_.id===E?{..._,...A}:_);g(R)},[i,g]);return{mode:t,items:i,json:l,jsonIssue:m,onToggleMode:S,onJsonChange:b,onAddItem:C,onRemoveItem:T,onUpdateItem:j,setFromRecord:y}}function l8(e){const[t,s]=x.useState("form"),[i,r]=x.useState([]),[l,u]=x.useState(""),[f,h]=x.useState(null),m=x.useMemo(()=>f?`modelAliases: ${f}`:null,[f]),y=x.useCallback(E=>{const A=Pp(E),R=zu(A);r(A),u(JSON.stringify(R,null,2)),h(null)},[]),g=x.useCallback(E=>{r(E),e(zu(E))},[e]),b=x.useCallback(E=>{av({value:E,parse:i8,setJson:u,setError:h,onRecord:A=>g(Pp(A))})},[g]),S=x.useCallback(E=>{nv({next:E,record:zu(i),setJson:u,setError:h,setMode:s})},[i]),C=x.useCallback(()=>{g(i.concat({id:Ea(),alias:"",target:"",allowOriginal:void 0}))},[i,g]),T=x.useCallback(E=>{g(i.filter(A=>A.id!==E))},[i,g]),j=x.useCallback((E,A)=>{const R=i.map(_=>_.id===E?{..._,...A}:_);g(R)},[i,g]);return{mode:t,items:i,json:l,jsonIssue:m,onToggleMode:S,onJsonChange:b,onAddItem:C,onRemoveItem:T,onUpdateItem:j,setFromRecord:y}}function c8({hasModels:e,smallModelLabel:t,smallModelValue:s,smallModelInputValue:i,models:r,authApiKeysValue:l,anthropicApiKeyValue:u,legacyAuthNote:f,anthropicApiKeyEnvNote:h,onSmallModelSelect:m,onSmallModelInput:y,onAuthApiKeysChange:g,onAnthropicApiKeyChange:b}){const{t:S}=He(),[C,T]=x.useState(!1),j=e&&s!=="__default__"&&!r.includes(s);return d.jsxs(Wt,{className:"gap-4 py-4",children:[d.jsxs(cn,{className:"px-4",children:[d.jsx(un,{children:S("settingsPage.general.title")}),d.jsx(jn,{className:"hidden sm:block",children:S("settingsPage.general.description")})]}),d.jsxs(fn,{className:"space-y-4 px-4",children:[d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{className:"text-muted-foreground text-xs",children:t}),e?d.jsxs(Nn,{value:s,onValueChange:m,children:[d.jsx(Mn,{className:"w-full",children:d.jsx(Rn,{placeholder:S("settingsPage.general.smallModelPlaceholder")})}),d.jsxs(_n,{children:[d.jsx(Ne,{value:"__default__",children:S("settingsPage.common.defaultOption")}),j?d.jsx(Ne,{value:s,children:S("settingsPage.common.customModel",{value:s})}):null,r.map(E=>d.jsx(Ne,{value:E,children:E},E))]})]}):d.jsx(lt,{placeholder:S("settingsPage.general.smallModelInputPlaceholder"),value:i,onChange:E=>y(E.target.value)}),d.jsx("div",{className:"text-muted-foreground text-xs",children:S("settingsPage.general.smallModelHint")})]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{className:"text-muted-foreground text-xs",children:S("settingsPage.general.apiKeysLabel")}),d.jsx(ar,{autoComplete:"off",placeholder:S("settingsPage.general.apiKeysPlaceholder"),value:l,onChange:E=>g(E.target.value),className:"min-h-[96px] font-mono text-xs"}),d.jsx("div",{className:"text-muted-foreground text-xs",children:S("settingsPage.general.apiKeysHint")}),d.jsx("div",{className:"text-muted-foreground text-xs",children:f})]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{className:"text-muted-foreground text-xs",children:S("settingsPage.general.anthropicApiKeyLabel")}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(lt,{autoComplete:"off",type:C?"text":"password",placeholder:S("settingsPage.general.anthropicApiKeyPlaceholder"),value:u,onChange:E=>b(E.target.value),className:"font-mono text-xs"}),d.jsxs(Me,{type:"button",variant:"outline",className:"shrink-0",onClick:()=>T(E=>!E),"aria-label":S(C?"settingsPage.general.hideAnthropicApiKey":"settingsPage.general.showAnthropicApiKey"),children:[C?d.jsx(sO,{}):d.jsx(oO,{}),d.jsx("span",{className:"hidden sm:inline",children:S(C?"settingsPage.general.hideAnthropicApiKey":"settingsPage.general.showAnthropicApiKey")})]})]}),d.jsx("div",{className:"text-muted-foreground text-xs",children:S("settingsPage.general.anthropicApiKeyHint")}),d.jsx("div",{className:"text-muted-foreground text-xs",children:h})]})]})]})}function u8({mode:e,json:t,jsonIssue:s,items:i,models:r,onToggleMode:l,onJsonChange:u,onAddItem:f,onRemoveItem:h,onUpdateItem:m}){const y="__default__",g=r.length>0,{t:b}=He();return d.jsxs(Wt,{className:"gap-4 py-4",children:[d.jsxs(cn,{className:"px-4",children:[d.jsx(un,{children:b("settingsPage.reasoning.title")}),d.jsx(jn,{className:"hidden sm:block",children:b("settingsPage.reasoning.description")})]}),d.jsxs(fn,{className:"space-y-3 px-4",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.reasoning.hint")}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Hn,{checked:e==="json",onCheckedChange:l}),d.jsx(ht,{className:"text-muted-foreground text-xs",children:b("settingsPage.common.jsonMode")})]})]}),e==="json"?d.jsxs("div",{className:"space-y-2",children:[d.jsx(ar,{value:t,onChange:S=>u(S.target.value),className:"min-h-[160px] lg:min-h-[120px] max-h-[36vh] overflow-auto font-mono text-xs",placeholder:b("settingsPage.reasoning.jsonPlaceholder")}),s?d.jsx(En,{variant:"warning",title:b("settingsPage.common.invalidJsonTitle"),description:s}):null]}):d.jsxs("div",{className:"space-y-2",children:[i.length===0?d.jsx("div",{className:"text-muted-foreground text-sm",children:b("settingsPage.reasoning.emptyState")}):i.map(S=>{const C=S.model||y,T=C!==y&&!r.includes(C),j=!g&&!T;return d.jsxs("div",{className:"grid gap-2 rounded-lg border p-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs(Nn,{value:C,onValueChange:E=>m(S.id,{model:E===y?"":E}),disabled:j,children:[d.jsx(Mn,{className:"min-w-[220px]",children:d.jsx(Rn,{placeholder:b(g?"settingsPage.common.selectModelPlaceholder":"settingsPage.common.noModelsAvailable")})}),d.jsxs(_n,{children:[d.jsx(Ne,{value:y,children:b("settingsPage.common.defaultOption")}),T?d.jsx(Ne,{value:C,children:b("settingsPage.common.customModel",{value:C})}):null,r.map(E=>d.jsx(Ne,{value:E,children:E},E))]})]}),d.jsxs(Nn,{value:S.effort,onValueChange:E=>m(S.id,{effort:E}),children:[d.jsx(Mn,{className:"w-40",children:d.jsx(Rn,{})}),d.jsx(_n,{children:Op.map(E=>d.jsx(Ne,{value:E,children:E},E))})]}),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:()=>h(S.id),children:b("settingsPage.common.remove")})]}),d.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.reasoning.itemHint")})]},S.id)}),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:f,children:b("settingsPage.reasoning.addButton")})]})]})]})}function d8({mode:e,json:t,jsonIssue:s,items:i,models:r,onToggleMode:l,onJsonChange:u,onAddItem:f,onRemoveItem:h,onUpdateItem:m}){const y="__default__",g=r.length>0,{t:b}=He();return d.jsxs(Wt,{className:"gap-4 py-4",children:[d.jsxs(cn,{className:"px-4",children:[d.jsx(un,{children:b("settingsPage.prompts.title")}),d.jsx(jn,{className:"hidden sm:block",children:b("settingsPage.prompts.description")})]}),d.jsxs(fn,{className:"space-y-3 px-4",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.prompts.hint")}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Hn,{checked:e==="json",onCheckedChange:l}),d.jsx(ht,{className:"text-muted-foreground text-xs",children:b("settingsPage.common.jsonMode")})]})]}),e==="json"?d.jsxs("div",{className:"space-y-2",children:[d.jsx(ar,{value:t,onChange:S=>u(S.target.value),className:"min-h-[200px] lg:min-h-[140px] max-h-[40vh] overflow-auto font-mono text-xs",placeholder:b("settingsPage.prompts.jsonPlaceholder")}),s?d.jsx(En,{variant:"warning",title:b("settingsPage.common.invalidJsonTitle"),description:s}):null]}):d.jsxs("div",{className:"space-y-2",children:[i.length===0?d.jsx("div",{className:"text-muted-foreground text-sm",children:b("settingsPage.prompts.emptyState")}):i.map(S=>{const C=S.model||y,T=C!==y&&!r.includes(C),j=!g&&!T;return d.jsxs("div",{className:"grid gap-2 rounded-lg border p-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs(Nn,{value:C,onValueChange:E=>m(S.id,{model:E===y?"":E}),disabled:j,children:[d.jsx(Mn,{className:"min-w-[220px]",children:d.jsx(Rn,{placeholder:b(g?"settingsPage.common.selectModelPlaceholder":"settingsPage.common.noModelsAvailable")})}),d.jsxs(_n,{children:[d.jsx(Ne,{value:y,children:b("settingsPage.common.defaultOption")}),T?d.jsx(Ne,{value:C,children:b("settingsPage.common.customModel",{value:C})}):null,r.map(E=>d.jsx(Ne,{value:E,children:E},E))]})]}),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:()=>h(S.id),children:b("settingsPage.common.remove")})]}),d.jsx(ar,{value:S.prompt,onChange:E=>m(S.id,{prompt:E.target.value}),className:"min-h-[120px] lg:min-h-[96px] max-h-[30vh] overflow-auto font-mono text-xs",placeholder:b("settingsPage.prompts.promptPlaceholder")}),d.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.prompts.itemHint")})]},S.id)}),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:f,children:b("settingsPage.prompts.addButton")})]})]})]})}function f8({allowOriginalModelNamesForAliases:e,mode:t,onToggleMode:s}){const{t:i}=He(),r=i(e?"settingsPage.common.allow":"settingsPage.common.block");return d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsx("div",{className:"text-muted-foreground text-xs",children:i("settingsPage.aliases.defaultBehaviorHint",{behavior:r})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Hn,{checked:t==="json",onCheckedChange:s}),d.jsx(ht,{className:"text-muted-foreground text-xs",children:i("settingsPage.common.jsonMode")})]})]})}function m8({json:e,jsonIssue:t,onJsonChange:s}){const{t:i}=He();return d.jsxs("div",{className:"space-y-2",children:[d.jsx(ar,{value:e,onChange:r=>s(r.target.value),className:"min-h-[160px] lg:min-h-[120px] max-h-[36vh] overflow-auto font-mono text-xs",placeholder:i("settingsPage.aliases.jsonPlaceholder")}),t?d.jsx(En,{variant:"warning",title:i("settingsPage.common.invalidJsonTitle"),description:t}):null]})}function h8({item:e,models:t,emptyTargetValue:s,allowOriginalDefaultValue:i,hasModels:r,onUpdateItem:l,onRemoveItem:u}){const{t:f}=He(),h=e.target||s,m=h!==s&&!t.includes(h),y=!r&&!m,g=e.allowOriginal===void 0?i:e.allowOriginal?"allow":"block";return d.jsx("div",{className:"grid gap-2 rounded-lg border p-3",children:d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(lt,{className:"min-w-[180px]",placeholder:f("settingsPage.aliases.aliasPlaceholder"),value:e.alias,onChange:b=>l(e.id,{alias:b.target.value})}),d.jsxs(Nn,{value:h,onValueChange:b=>l(e.id,{target:b===s?"":b}),disabled:y,children:[d.jsx(Mn,{className:"min-w-[220px]",children:d.jsx(Rn,{placeholder:f(r?"settingsPage.aliases.selectTargetPlaceholder":"settingsPage.common.noModelsAvailable")})}),d.jsxs(_n,{children:[d.jsx(Ne,{value:s,children:f("settingsPage.aliases.selectOption")}),m?d.jsx(Ne,{value:h,children:f("settingsPage.common.customModel",{value:h})}):null,t.map(b=>d.jsx(Ne,{value:b,children:b},b))]})]}),d.jsxs(Nn,{value:g,onValueChange:b=>l(e.id,{allowOriginal:b===i?void 0:b==="allow"}),children:[d.jsx(Mn,{className:"min-w-[200px]",children:d.jsx(Rn,{placeholder:f("settingsPage.aliases.originalModelPlaceholder")})}),d.jsxs(_n,{children:[d.jsx(Ne,{value:i,children:f("settingsPage.aliases.useDefault")}),d.jsx(Ne,{value:"allow",children:f("settingsPage.aliases.allowOriginal")}),d.jsx(Ne,{value:"block",children:f("settingsPage.aliases.blockOriginal")})]})]}),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:()=>u(e.id),children:f("settingsPage.common.remove")})]})})}function p8({items:e,models:t,emptyTargetValue:s,allowOriginalDefaultValue:i,hasModels:r,onAddItem:l,onRemoveItem:u,onUpdateItem:f}){const{t:h}=He();return d.jsxs("div",{className:"space-y-2",children:[e.length===0?d.jsx("div",{className:"text-muted-foreground text-sm",children:h("settingsPage.aliases.emptyState")}):e.map(m=>d.jsx(h8,{item:m,models:t,emptyTargetValue:s,allowOriginalDefaultValue:i,hasModels:r,onUpdateItem:f,onRemoveItem:u},m.id)),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:l,children:h("settingsPage.aliases.addButton")})]})}function g8({allowOriginalModelNamesForAliases:e,mode:t,json:s,jsonIssue:i,items:r,models:l,onToggleMode:u,onJsonChange:f,onAddItem:h,onRemoveItem:m,onUpdateItem:y}){const g="__target__",b="__allow_original_default__",S=l.length>0,{t:C}=He();return d.jsxs(Wt,{className:"gap-4 py-4",children:[d.jsxs(cn,{className:"px-4",children:[d.jsx(un,{children:C("settingsPage.aliases.title")}),d.jsx(jn,{className:"hidden sm:block",children:C("settingsPage.aliases.description")})]}),d.jsxs(fn,{className:"space-y-3 px-4",children:[d.jsx(f8,{allowOriginalModelNamesForAliases:e,mode:t,onToggleMode:u}),t==="json"?d.jsx(m8,{json:s,jsonIssue:i,onJsonChange:f}):d.jsx(p8,{items:r,models:l,emptyTargetValue:g,allowOriginalDefaultValue:b,hasModels:S,onAddItem:h,onRemoveItem:m,onUpdateItem:y})]})]})}function v8({accountAffinityEnabled:e,modelRefreshIntervalInput:t,modelRefreshIntervalIssue:s,allowOriginalModelNamesForAliases:i,useFunctionApplyPatch:r,forceAgent:l,compactUseSmallModel:u,messageStartInputTokensFallback:f,useMessagesApi:h,useResponsesApiWebSearch:m,responsesApiContextManagementModelsValue:y,onToggleAccountAffinity:g,onModelRefreshIntervalChange:b,onToggleAllowOriginalModelNamesForAliases:S,onToggleUseFunctionApplyPatch:C,onToggleForceAgent:T,onToggleCompactUseSmallModel:j,onToggleMessageStartInputTokensFallback:E,onToggleUseMessagesApi:A,onToggleUseResponsesApiWebSearch:R,onResponsesApiContextManagementModelsChange:_}){const{t:M}=He();return d.jsxs(Wt,{className:"gap-4 py-4",children:[d.jsxs(cn,{className:"px-4",children:[d.jsx(un,{children:M("settingsPage.advanced.title")}),d.jsx(jn,{className:"hidden sm:block",children:M("settingsPage.advanced.description")})]}),d.jsxs(fn,{className:"space-y-3 px-4",children:[d.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:M("settingsPage.advanced.routingGroupTitle")}),d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.accountAffinity.label")}),d.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.accountAffinity.hint")})]}),d.jsx(Hn,{checked:e,onCheckedChange:g})]}),d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.allowOriginalModelNamesLabel")}),d.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.allowOriginalModelNamesHint")})]}),d.jsx(Hn,{checked:i,onCheckedChange:S})]}),d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.forceAgentLabel")}),d.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.forceAgentHint")})]}),d.jsx(Hn,{checked:l,onCheckedChange:T})]}),d.jsx("hr",{className:"border-t mt-1"}),d.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:M("settingsPage.advanced.apiGroupTitle")}),d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.useMessagesApiLabel")}),d.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.useMessagesApiHint")})]}),d.jsx(Hn,{checked:h,onCheckedChange:A})]}),d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.useFunctionApplyPatchLabel")}),d.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.useFunctionApplyPatchHint")})]}),d.jsx(Hn,{checked:r,onCheckedChange:C})]}),d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.useResponsesApiWebSearchLabel")}),d.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.useResponsesApiWebSearchHint")})]}),d.jsx(Hn,{checked:m,onCheckedChange:R})]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.responsesApiContextManagementModelsLabel")}),d.jsx(ar,{autoComplete:"off",placeholder:M("settingsPage.advanced.responsesApiContextManagementModelsPlaceholder"),value:y,onChange:z=>_(z.target.value),className:"min-h-[96px] font-mono text-xs"}),d.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.responsesApiContextManagementModelsHint")})]}),d.jsx("hr",{className:"border-t mt-1"}),d.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:M("settingsPage.advanced.modelGroupTitle")}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.modelRefreshIntervalLabel")}),d.jsx(lt,{type:"number",min:"0",step:"0.5",value:t,onChange:z=>b(z.target.value)}),d.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.modelRefreshIntervalHint")}),s?d.jsx("div",{className:"text-destructive text-xs",children:s}):null]}),d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.compactUseSmallModelLabel")}),d.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.compactUseSmallModelHint")})]}),d.jsx(Hn,{checked:u,onCheckedChange:j})]}),d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.messageStartInputTokensFallbackLabel")}),d.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.messageStartInputTokensFallbackHint")})]}),d.jsx(Hn,{checked:f,onCheckedChange:E})]})]})]})}function y8({providerId:e,item:t,onRemoveModel:s,onUpdateModel:i}){const{t:r}=He();return d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(lt,{className:"min-w-[180px]",placeholder:r("settingsPage.advanced.providersModelIdPlaceholder"),value:t.model,onChange:l=>i(e,t.id,{model:l.target.value})}),d.jsx(lt,{className:"w-28",type:"number",step:"0.1",min:"0",placeholder:"temperature",value:t.temperature,onChange:l=>i(e,t.id,{temperature:l.target.value})}),d.jsx(lt,{className:"w-28",type:"number",step:"0.01",min:"0",placeholder:"topP",value:t.topP,onChange:l=>i(e,t.id,{topP:l.target.value})}),d.jsx(lt,{className:"w-28",type:"number",step:"1",min:"0",placeholder:"topK",value:t.topK,onChange:l=>i(e,t.id,{topK:l.target.value})}),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:()=>s(e,t.id),children:r("settingsPage.common.remove")})]})}function x8({item:e,onRemoveProvider:t,onUpdateProvider:s,onAddModel:i,onRemoveModel:r,onUpdateModel:l}){const{t:u}=He();return d.jsxs("div",{className:"grid gap-3 rounded-lg border p-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(lt,{className:"min-w-[200px]",placeholder:u("settingsPage.advanced.providersNamePlaceholder"),value:e.name,onChange:f=>s(e.id,{name:f.target.value})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Hn,{checked:e.enabled,onCheckedChange:f=>s(e.id,{enabled:f})}),d.jsx(ht,{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersEnabledLabel")})]}),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:()=>t(e.id),children:u("settingsPage.common.remove")})]}),d.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersBaseUrlLabel")}),d.jsx(lt,{autoComplete:"off",placeholder:u("settingsPage.advanced.providersBaseUrlPlaceholder"),value:e.baseUrl,onChange:f=>s(e.id,{baseUrl:f.target.value})})]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersApiKeyLabel")}),d.jsx(lt,{type:"password",autoComplete:"off",placeholder:u("settingsPage.advanced.providersApiKeyPlaceholder"),value:e.apiKey,onChange:f=>s(e.id,{apiKey:f.target.value})})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsx("div",{className:"text-sm font-medium",children:u("settingsPage.advanced.providersModelsLabel")}),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:()=>i(e.id),children:u("settingsPage.advanced.providersAddModel")})]}),e.models.length===0?d.jsx("div",{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersModelsEmptyState")}):e.models.map(f=>d.jsx(y8,{providerId:e.id,item:f,onUpdateModel:l,onRemoveModel:r},f.id))]})]})}function b8({items:e,issue:t,onAddProvider:s,onRemoveProvider:i,onUpdateProvider:r,onAddModel:l,onRemoveModel:u,onUpdateModel:f}){const{t:h}=He();return d.jsxs(Wt,{className:"gap-4 py-4",children:[d.jsxs(cn,{className:"px-4",children:[d.jsx(un,{children:h("settingsPage.advanced.providersTitle")}),d.jsx(jn,{className:"hidden sm:block",children:h("settingsPage.advanced.providersDescription")})]}),d.jsxs(fn,{className:"space-y-3 px-4",children:[t?d.jsx(En,{variant:"warning",title:h("settingsPage.advanced.providersIssueTitle"),description:t}):null,e.length===0?d.jsx("div",{className:"text-muted-foreground text-sm",children:h("settingsPage.advanced.providersEmptyState")}):e.map(m=>d.jsx(x8,{item:m,onRemoveProvider:i,onUpdateProvider:r,onAddModel:l,onRemoveModel:u,onUpdateModel:f},m.id)),d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:s,children:h("settingsPage.advanced.providersAddProvider")})]})]})}function S8(){const{t:e}=He(),[t,s]=x.useState(!1),[i,r]=x.useState(!1),[l,u]=x.useState(null),[f,h]=x.useState(null),[m,y]=x.useState([]),[g,b]=x.useState({}),[S,C]=x.useState("{}"),[T,j]=x.useState(""),[E,A]=x.useState(null),[R,_]=x.useState(""),M=o8(Se=>b(we=>({...we,extraPrompts:Se}))),z=r8(Se=>b(we=>({...we,modelReasoningEfforts:Se}))),D=l8(Se=>b(we=>({...we,modelAliases:Se}))),P=n8(Se=>b(we=>({...we,providers:Se}))),{mode:X,items:Q,json:J,jsonIssue:te,onToggleMode:ne,onJsonChange:re,onAddItem:de,onRemoveItem:k,onUpdateItem:H,setFromRecord:B}=M,{mode:le,items:G,json:O,jsonIssue:V,onToggleMode:I,onJsonChange:W,onAddItem:oe,onRemoveItem:fe,onUpdateItem:K,setFromRecord:ie}=z,{mode:me,items:be,json:je,jsonIssue:Ae,onToggleMode:xt,onJsonChange:mt,onAddItem:Dn,onRemoveItem:mn,onUpdateItem:Jt,setFromRecord:Aa}=D,{items:Kt,issue:Na,onAddProvider:Ya,onRemoveProvider:Dt,onUpdateProvider:Gn,onAddModel:Pt,onRemoveModel:hi,onUpdateModel:fa,setFromRecord:Xa}=P,hn=x.useCallback(Se=>{const{_configPath:we,...jt}=Se,Qn=Pp(jt.modelAliases),Wa=zu(Qn),gi=Z1(jt),Ja=jt.modelRefreshIntervalHours;h(we??null);const St={...jt,auth:{apiKeys:gi},modelAliases:Wa};b(St),C(X1(St)),B(jt.extraPrompts),ie(jt.modelReasoningEfforts),Aa(Wa),Xa(jt.providers),j(typeof Ja=="number"?String(Ja):""),A(null),_(jt.responsesApiContextManagementModels?.join(`
|
|
65
|
+
`)??"")},[B,ie,Aa,Xa,j,A,_]),Yn=x.useCallback(async()=>{s(!0),u(null);try{const[Se,we]=await Promise.allSettled([g5(),y5()]);if(Se.status==="fulfilled")hn(Se.value);else throw Se.reason;we.status==="fulfilled"?y(we.value.items??[]):(y([]),Ht.error(ct.t("settingsPage.toast.loadModelsFailed"),{description:we.reason instanceof Error?we.reason.message:String(we.reason)}))}catch(Se){const we=Se instanceof Sa?Se.message:String(Se);u(we),Ht.error(ct.t("settingsPage.toast.loadConfigFailed"),{description:we})}finally{s(!1)}},[hn]);x.useEffect(()=>{Yn()},[Yn]);const pn=x.useCallback(async()=>{r(!0),u(null);try{const Se=await v5(g);hn(Se),Ht.success(ct.t("settingsPage.toast.configSaved"))}catch(Se){const we=Se instanceof Sa?Se.message:String(Se);u(we),Ht.error(ct.t("settingsPage.toast.saveConfigFailed"),{description:we})}finally{r(!1)}},[hn,g]),Ms=x.useCallback(()=>{Yn()},[Yn]),Xn=x.useCallback(()=>{pn()},[pn]),ma=x.useCallback(Se=>{b(we=>({...we,smallModel:Se==="__default__"?"":Se}))},[b]),kt=x.useCallback(Se=>{b(we=>({...we,smallModel:Se}))},[b]),rn=x.useCallback(Se=>{const we=ZU(Se);b(jt=>({...jt,auth:{apiKeys:we},apiKey:void 0}))},[b]),Et=x.useCallback(Se=>{b(we=>({...we,anthropicApiKey:Se}))},[b]),pi=x.useCallback(Se=>{b(we=>({...we,accountAffinity:Se}))},[b]),Za=x.useCallback(Se=>{j(Se);const we=Se.trim();if(!we){A(null),b(Qn=>({...Qn,modelRefreshIntervalHours:void 0}));return}const jt=Number(we);if(!Number.isFinite(jt)||jt<0){A(e("settingsPage.advanced.modelRefreshIntervalError"));return}A(null),b(Qn=>({...Qn,modelRefreshIntervalHours:jt}))},[b,j,A,e]),gn=x.useCallback(Se=>{b(we=>({...we,allowOriginalModelNamesForAliases:Se}))},[b]),Ra=x.useCallback(Se=>{b(we=>({...we,useFunctionApplyPatch:Se}))},[b]),nt=x.useCallback(Se=>{b(we=>({...we,forceAgent:Se}))},[b]),Zn=x.useCallback(Se=>{b(we=>({...we,compactUseSmallModel:Se}))},[b]),bt=x.useCallback(Se=>{b(we=>({...we,messageStartInputTokensFallback:Se}))},[b]),Ce=x.useCallback(Se=>{b(we=>({...we,useMessagesApi:Se}))},[b]),Ge=x.useCallback(Se=>{b(we=>({...we,useResponsesApiWebSearch:Se}))},[b]),Le=x.useCallback(Se=>{_(Se);const we=Qj(Se);b(jt=>({...jt,responsesApiContextManagementModels:we}))},[b,_]),ot=m.length>0,Ma=g.smallModel?g.smallModel:"__default__",at=!i&&!t&&!(X==="json"&&te)&&!(le==="json"&&V)&&!(me==="json"&&Ae)&&!E&&!Na,en=x.useMemo(()=>X1(g)!==S,[g,S]),Qa=e("settingsPage.general.legacyAuthNote",{env:"COPILOT_API_KEY"}),tn=e(ot?"settingsPage.general.smallModel":"settingsPage.general.smallModelManual"),nn=g.smallModel??"",_s=Z1(g).join(`
|
|
66
|
+
`),Pn=g.anthropicApiKey??"",pr=e("settingsPage.general.anthropicApiKeyEnvNote",{env:"ANTHROPIC_API_KEY"}),Yl=g.accountAffinity??!0,_a=g.allowOriginalModelNamesForAliases??!1,Lt=g.useFunctionApplyPatch??!0,an=g.forceAgent??!1,Os=g.compactUseSmallModel??!0,gr=g.messageStartInputTokensFallback??!1,Od=g.useMessagesApi??!0,Dd=g.useResponsesApiWebSearch??!0;return{loading:t,saving:i,error:l,configPath:f,canSave:at,isDirty:en,onReload:Ms,onSave:Xn,hasModels:ot,smallModelLabel:tn,smallModelValue:Ma,smallModelInputValue:nn,models:m,authApiKeysValue:_s,anthropicApiKeyValue:Pn,legacyAuthNote:Qa,anthropicApiKeyEnvNote:pr,onSmallModelSelect:ma,onSmallModelInput:kt,onAuthApiKeysChange:rn,onAnthropicApiKeyChange:Et,accountAffinityEnabled:Yl,onAccountAffinityToggle:pi,modelRefreshIntervalInput:T,modelRefreshIntervalIssue:E,onModelRefreshIntervalChange:Za,allowOriginalModelNamesForAliases:_a,reasoningMode:le,reasoningJson:O,reasoningJsonIssue:V,reasoningItems:G,onReasoningToggleMode:I,onReasoningJsonChange:W,onReasoningAddItem:oe,onReasoningRemoveItem:fe,onReasoningUpdateItem:K,extraMode:X,extraJson:J,extraJsonIssue:te,extraItems:Q,onExtraToggleMode:ne,onExtraJsonChange:re,onExtraAddItem:de,onExtraRemoveItem:k,onExtraUpdateItem:H,aliasMode:me,aliasJson:je,aliasJsonIssue:Ae,aliasItems:be,onAliasToggleMode:xt,onAliasJsonChange:mt,onAliasAddItem:Dn,onAliasRemoveItem:mn,onAliasUpdateItem:Jt,useFunctionApplyPatch:Lt,forceAgent:an,compactUseSmallModel:Os,messageStartInputTokensFallback:gr,useMessagesApi:Od,useResponsesApiWebSearch:Dd,responsesApiContextManagementModelsValue:R,onUseMessagesApiToggle:Ce,onUseResponsesApiWebSearchToggle:Ge,onResponsesApiContextManagementModelsChange:Le,providersItems:Kt,providersIssue:Na,onProvidersAddProvider:Ya,onProvidersRemoveProvider:Dt,onProvidersUpdateProvider:Gn,onProvidersAddModel:Pt,onProvidersRemoveModel:hi,onProvidersUpdateModel:fa,onAllowOriginalModelNamesForAliasesToggle:gn,onUseFunctionApplyPatchToggle:Ra,onForceAgentToggle:nt,onCompactUseSmallModelToggle:Zn,onMessageStartInputTokensFallbackToggle:bt}}function w8({loading:e,saving:t,error:s,configPath:i,canSave:r,isDirty:l,onReload:u,onSave:f,hasModels:h,smallModelLabel:m,smallModelValue:y,smallModelInputValue:g,models:b,authApiKeysValue:S,anthropicApiKeyValue:C,legacyAuthNote:T,anthropicApiKeyEnvNote:j,onSmallModelSelect:E,onSmallModelInput:A,onAuthApiKeysChange:R,onAnthropicApiKeyChange:_,accountAffinityEnabled:M,onAccountAffinityToggle:z,modelRefreshIntervalInput:D,modelRefreshIntervalIssue:P,onModelRefreshIntervalChange:X,reasoningMode:Q,reasoningJson:J,reasoningJsonIssue:te,reasoningItems:ne,onReasoningToggleMode:re,onReasoningJsonChange:de,onReasoningAddItem:k,onReasoningRemoveItem:H,onReasoningUpdateItem:B,extraMode:le,extraJson:G,extraJsonIssue:O,extraItems:V,onExtraToggleMode:I,onExtraJsonChange:W,onExtraAddItem:oe,onExtraRemoveItem:fe,onExtraUpdateItem:K,aliasMode:ie,aliasJson:me,aliasJsonIssue:be,aliasItems:je,onAliasToggleMode:Ae,onAliasJsonChange:xt,onAliasAddItem:mt,onAliasRemoveItem:Dn,onAliasUpdateItem:mn,allowOriginalModelNamesForAliases:Jt,useFunctionApplyPatch:Aa,forceAgent:Kt,compactUseSmallModel:Na,messageStartInputTokensFallback:Ya,useMessagesApi:Dt,useResponsesApiWebSearch:Gn,responsesApiContextManagementModelsValue:Pt,onUseMessagesApiToggle:hi,onUseResponsesApiWebSearchToggle:fa,onResponsesApiContextManagementModelsChange:Xa,providersItems:hn,providersIssue:Yn,onProvidersAddProvider:pn,onProvidersRemoveProvider:Ms,onProvidersUpdateProvider:Xn,onProvidersAddModel:ma,onProvidersRemoveModel:kt,onProvidersUpdateModel:rn,onAllowOriginalModelNamesForAliasesToggle:Et,onUseFunctionApplyPatchToggle:pi,onForceAgentToggle:Za,onCompactUseSmallModelToggle:gn,onMessageStartInputTokensFallbackToggle:Ra}){const{t:nt}=He(),Zn=x.useMemo(()=>[{id:"general",label:nt("settingsPage.sections.general")},{id:"reasoning",label:nt("settingsPage.sections.reasoning")},{id:"aliases",label:nt("settingsPage.sections.aliases")},{id:"prompts",label:nt("settingsPage.sections.prompts")},{id:"advanced",label:nt("settingsPage.sections.advanced")},{id:"providers",label:nt("settingsPage.sections.providers")}],[nt]),{activeSection:bt,registerSection:Ce,scrollToSection:Ge}=KU({sectionIds:[...YU]});return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("div",{className:"text-lg font-semibold",children:nt("nav.settings")}),d.jsx("div",{className:"text-muted-foreground text-sm",children:nt("settingsPage.subtitle")})]}),d.jsxs("div",{className:"ml-auto flex flex-col items-end gap-1 text-right",children:[d.jsx("div",{className:"flex flex-wrap items-center gap-2",children:d.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:u,disabled:e||t,children:nt(e?"common.refreshing":"common.refresh")})}),i?d.jsx("div",{className:"text-muted-foreground text-xs leading-tight hidden sm:block",children:nt("settingsPage.configPath",{path:i})}):null,d.jsx("div",{className:"text-muted-foreground text-xs leading-tight hidden sm:block",children:nt("settingsPage.note")})]})]}),s?d.jsx(En,{variant:"error",title:nt("settingsPage.errorTitle"),description:s,actionLabel:nt("common.retry"),onAction:u}):null,d.jsx("nav",{className:"flex gap-1 overflow-x-auto pb-2 lg:hidden","aria-label":nt("settingsPage.navigation.ariaLabel"),children:Zn.map(Le=>{const ot=bt===Le.id;return d.jsx("button",{type:"button","aria-current":ot?"true":void 0,onClick:()=>Ge(Le.id),className:ce("shrink-0 rounded-full px-3 py-1.5 text-xs font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",ot?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:Le.label},Le.id)})}),d.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-12",children:[d.jsx("aside",{className:"hidden lg:block lg:col-span-2",children:d.jsx($U,{sections:Zn,activeSection:bt,onSectionClick:Ge})}),e&&!s?d.jsx("div",{className:"space-y-6 lg:col-span-10","aria-busy":"true",children:Array.from({length:4},(Le,ot)=>d.jsxs("div",{className:"rounded-xl border bg-card p-4 space-y-3",children:[d.jsx("div",{className:"h-5 w-32 rounded bg-muted animate-pulse"}),d.jsx("div",{className:"h-3 w-48 rounded bg-muted animate-pulse"}),d.jsxs("div",{className:"space-y-2 pt-2",children:[d.jsx("div",{className:"h-9 rounded bg-muted animate-pulse"}),d.jsx("div",{className:"h-9 rounded bg-muted animate-pulse"})]})]},ot))}):null,d.jsxs("main",{className:ce("space-y-6 lg:col-span-10",e&&"hidden"),children:[d.jsx(zi,{id:"general",isActive:bt==="general",ref:Le=>Ce("general",Le),style:{animationDelay:"0ms"},children:d.jsx(c8,{hasModels:h,smallModelLabel:m,smallModelValue:y,smallModelInputValue:g,models:b,authApiKeysValue:S,anthropicApiKeyValue:C,legacyAuthNote:T,anthropicApiKeyEnvNote:j,onSmallModelSelect:E,onSmallModelInput:A,onAuthApiKeysChange:R,onAnthropicApiKeyChange:_})}),d.jsx(zi,{id:"reasoning",isActive:bt==="reasoning",ref:Le=>Ce("reasoning",Le),style:{animationDelay:"60ms"},children:d.jsx(u8,{mode:Q,json:J,jsonIssue:te,items:ne,models:b,onToggleMode:re,onJsonChange:de,onAddItem:k,onRemoveItem:H,onUpdateItem:B})}),d.jsx(zi,{id:"aliases",isActive:bt==="aliases",ref:Le=>Ce("aliases",Le),style:{animationDelay:"120ms"},children:d.jsx(g8,{allowOriginalModelNamesForAliases:Jt,mode:ie,json:me,jsonIssue:be,items:je,models:b,onToggleMode:Ae,onJsonChange:xt,onAddItem:mt,onRemoveItem:Dn,onUpdateItem:mn})}),d.jsx(zi,{id:"prompts",isActive:bt==="prompts",ref:Le=>Ce("prompts",Le),style:{animationDelay:"180ms"},children:d.jsx(d8,{mode:le,json:G,jsonIssue:O,items:V,models:b,onToggleMode:I,onJsonChange:W,onAddItem:oe,onRemoveItem:fe,onUpdateItem:K})}),d.jsx(zi,{id:"advanced",isActive:bt==="advanced",ref:Le=>Ce("advanced",Le),style:{animationDelay:"240ms"},children:d.jsx(v8,{accountAffinityEnabled:M,modelRefreshIntervalInput:D,modelRefreshIntervalIssue:P,allowOriginalModelNamesForAliases:Jt,useFunctionApplyPatch:Aa,forceAgent:Kt,compactUseSmallModel:Na,messageStartInputTokensFallback:Ya,useMessagesApi:Dt,useResponsesApiWebSearch:Gn,responsesApiContextManagementModelsValue:Pt,onToggleAccountAffinity:z,onModelRefreshIntervalChange:X,onToggleAllowOriginalModelNamesForAliases:Et,onToggleUseFunctionApplyPatch:pi,onToggleForceAgent:Za,onToggleCompactUseSmallModel:gn,onToggleMessageStartInputTokensFallback:Ra,onToggleUseMessagesApi:hi,onToggleUseResponsesApiWebSearch:fa,onResponsesApiContextManagementModelsChange:Xa})}),d.jsx(zi,{id:"providers",isActive:bt==="providers",ref:Le=>Ce("providers",Le),style:{animationDelay:"300ms"},children:d.jsx(b8,{items:hn,issue:Yn,onAddProvider:pn,onRemoveProvider:Ms,onUpdateProvider:Xn,onAddModel:ma,onRemoveModel:kt,onUpdateModel:rn})})]})]}),l||t?d.jsx(qU,{saving:t,canSave:r,onSave:f}):null]})}function C8(){const e=S8();return d.jsx(w8,{...e})}function T8(){return d.jsx(SM,{children:d.jsxs(bs,{element:d.jsx(xB,{}),children:[d.jsx(bs,{path:"/",element:d.jsx(yM,{to:"/accounts",replace:!0})}),d.jsx(bs,{path:"/accounts",element:d.jsx(iU,{})}),d.jsx(bs,{path:"/requests",element:d.jsx(FU,{})}),d.jsx(bs,{path:"/models",element:d.jsx(fU,{})}),d.jsx(bs,{path:"/settings",element:d.jsx(C8,{})}),d.jsx(bs,{path:"/request/:requestId",element:d.jsx(yU,{})}),d.jsx(bs,{path:"*",element:d.jsx(mU,{})})]})})}const E8=({...e})=>{const{resolvedTheme:t}=Cw(),s=t==="dark"?"dark":t==="light"?"light":"system";return d.jsx(d5,{theme:s,className:"toaster group",icons:{success:d.jsx(Xp,{className:"size-4"}),info:d.jsx(Vw,{className:"size-4"}),warning:d.jsx(Bw,{className:"size-4"}),error:d.jsx(Zp,{className:"size-4"}),loading:d.jsx(Wo,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},eA=document.querySelector("#root");if(!eA)throw new Error("Root element not found");xR.createRoot(eA).render(d.jsx(x.StrictMode,{children:d.jsx(i2,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:d.jsx(vk,{children:d.jsx(f5,{children:d.jsxs(_O,{children:[d.jsx(qB,{children:d.jsx(KM,{children:d.jsx(T8,{})})}),d.jsx(E8,{})]})})})})}));
|