@nick3/copilot-api 1.4.5 → 1.4.9
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 +14 -6
- package/dist/{account-DhQb2A6q.js → account-CipKmikF.js} +2 -2
- package/dist/{account-DhQb2A6q.js.map → account-CipKmikF.js.map} +1 -1
- package/dist/{accounts-manager-BsGuQhKM.js → accounts-manager-Cjrd_el_.js} +249 -83
- package/dist/accounts-manager-Cjrd_el_.js.map +1 -0
- package/dist/{accounts-registry-c7rs5Ed9.js → accounts-registry-CQYvRe65.js} +3 -3
- package/dist/{accounts-registry-c7rs5Ed9.js.map → accounts-registry-CQYvRe65.js.map} +1 -1
- package/dist/admin/assets/index-BFvCJZIK.js +57 -0
- package/dist/admin/assets/index-CsAeel_7.css +1 -0
- package/dist/admin/index.html +2 -2
- package/dist/{auth-BAEHgP-a.js → auth-1gAffrpI.js} +6 -6
- package/dist/{auth-BAEHgP-a.js.map → auth-1gAffrpI.js.map} +1 -1
- package/dist/{check-usage-Dbthad7V.js → check-usage-CsRu467P.js} +5 -5
- package/dist/{check-usage-Dbthad7V.js.map → check-usage-CsRu467P.js.map} +1 -1
- package/dist/{debug-hQJWwXtC.js → debug-BzR5ZQUk.js} +3 -3
- package/dist/{debug-hQJWwXtC.js.map → debug-BzR5ZQUk.js.map} +1 -1
- package/dist/{get-copilot-token-BySQCue6.js → get-copilot-token-BbpphnmV.js} +3 -3
- package/dist/{get-copilot-token-BySQCue6.js.map → get-copilot-token-BbpphnmV.js.map} +1 -1
- package/dist/main.js +6 -7
- package/dist/main.js.map +1 -1
- package/dist/{paths-DoT4SZ8f.js → paths-Cvzy-eLX.js} +2 -2
- package/dist/{paths-DoT4SZ8f.js.map → paths-Cvzy-eLX.js.map} +1 -1
- package/dist/{poll-access-token-CKc0_m42.js → poll-access-token-CGfLFzMq.js} +3 -3
- package/dist/{poll-access-token-CKc0_m42.js.map → poll-access-token-CGfLFzMq.js.map} +1 -1
- package/dist/{server-D_7gI9hx.js → server-DqwhClJ-.js} +187 -152
- package/dist/server-DqwhClJ-.js.map +1 -0
- package/dist/{start-DItwCYda.js → start-B1_Ols5Z.js} +16 -18
- package/dist/start-B1_Ols5Z.js.map +1 -0
- package/dist/{utils-BIK3ym34.js → utils-DY-jLXwO.js} +34 -10
- package/dist/utils-DY-jLXwO.js.map +1 -0
- package/package.json +3 -1
- package/dist/accounts-manager-BsGuQhKM.js.map +0 -1
- package/dist/admin/assets/index-Y2SvOXge.js +0 -57
- package/dist/admin/assets/index-geiCIixE.css +0 -1
- package/dist/server-D_7gI9hx.js.map +0 -1
- package/dist/start-DItwCYda.js.map +0 -1
- package/dist/utils-BIK3ym34.js.map +0 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function PN(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 Sp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rh={exports:{}},Jr={};var jb;function kN(){if(jb)return Jr;jb=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 d in r)d!=="key"&&(l[d]=r[d])}else l=r;return r=l.ref,{$$typeof:e,type:i,key:u,ref:r!==void 0?r:null,props:l}}return Jr.Fragment=t,Jr.jsx=s,Jr.jsxs=s,Jr}var Nb;function LN(){return Nb||(Nb=1,Rh.exports=kN()),Rh.exports}var h=LN(),Mh={exports:{}},je={};var Rb;function zN(){if(Rb)return je;Rb=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"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function S(P){return P===null||typeof P!="object"?null:(P=b&&P[b]||P["@@iterator"],typeof P=="function"?P:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,A={};function E(P,X,G){this.props=P,this.context=X,this.refs=A,this.updater=G||C}E.prototype.isReactComponent={},E.prototype.setState=function(P,X){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,X,"setState")},E.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function j(){}j.prototype=E.prototype;function R(P,X,G){this.props=P,this.context=X,this.refs=A,this.updater=G||C}var _=R.prototype=new j;_.constructor=R,T(_,E.prototype),_.isPureReactComponent=!0;var M=Array.isArray;function B(){}var L={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function K(P,X,G){var te=G.ref;return{$$typeof:e,type:P,key:X,ref:te!==void 0?te:null,props:G}}function Z(P,X){return K(P.type,X,P.props)}function W(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function se(P){var X={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(G){return X[G]})}var I=/\/+/g;function ne(P,X){return typeof P=="object"&&P!==null&&P.key!=null?se(""+P.key):X.toString(36)}function le(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(B,B):(P.status="pending",P.then(function(X){P.status==="pending"&&(P.status="fulfilled",P.value=X)},function(X){P.status==="pending"&&(P.status="rejected",P.reason=X)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function D(P,X,G,te,ce){var he=typeof P;(he==="undefined"||he==="boolean")&&(P=null);var ae=!1;if(P===null)ae=!0;else switch(he){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(P.$$typeof){case e:case t:ae=!0;break;case y:return ae=P._init,D(ae(P._payload),X,G,te,ce)}}if(ae)return ce=ce(P),ae=te===""?"."+ne(P,0):te,M(ce)?(G="",ae!=null&&(G=ae.replace(I,"$&/")+"/"),D(ce,X,G,"",function(Ee){return Ee})):ce!=null&&(W(ce)&&(ce=Z(ce,G+(ce.key==null||P&&P.key===ce.key?"":(""+ce.key).replace(I,"$&/")+"/")+ae)),X.push(ce)),1;ae=0;var de=te===""?".":te+":";if(M(P))for(var Se=0;Se<P.length;Se++)te=P[Se],he=de+ne(te,Se),ae+=D(te,X,G,he,ce);else if(Se=S(P),typeof Se=="function")for(P=Se.call(P),Se=0;!(te=P.next()).done;)te=te.value,he=de+ne(te,Se++),ae+=D(te,X,G,he,ce);else if(he==="object"){if(typeof P.then=="function")return D(le(P),X,G,te,ce);throw X=String(P),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return ae}function H(P,X,G){if(P==null)return P;var te=[],ce=0;return D(P,te,"","",function(he){return X.call(G,he,ce++)}),te}function V(P){if(P._status===-1){var X=P._result;X=X(),X.then(function(G){(P._status===0||P._status===-1)&&(P._status=1,P._result=G)},function(G){(P._status===0||P._status===-1)&&(P._status=2,P._result=G)}),P._status===-1&&(P._status=0,P._result=X)}if(P._status===1)return P._result.default;throw P._result}var oe=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},ue={map:H,forEach:function(P,X,G){H(P,function(){X.apply(this,arguments)},G)},count:function(P){var X=0;return H(P,function(){X++}),X},toArray:function(P){return H(P,function(X){return X})||[]},only:function(P){if(!W(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return je.Activity=g,je.Children=ue,je.Component=E,je.Fragment=s,je.Profiler=r,je.PureComponent=R,je.StrictMode=i,je.Suspense=f,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,je.__COMPILER_RUNTIME={__proto__:null,c:function(P){return L.H.useMemoCache(P)}},je.cache=function(P){return function(){return P.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(P,X,G){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var te=T({},P.props),ce=P.key;if(X!=null)for(he in X.key!==void 0&&(ce=""+X.key),X)!O.call(X,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&X.ref===void 0||(te[he]=X[he]);var he=arguments.length-2;if(he===1)te.children=G;else if(1<he){for(var ae=Array(he),de=0;de<he;de++)ae[de]=arguments[de+2];te.children=ae}return K(P.type,ce,te)},je.createContext=function(P){return P={$$typeof:u,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:l,_context:P},P},je.createElement=function(P,X,G){var te,ce={},he=null;if(X!=null)for(te in X.key!==void 0&&(he=""+X.key),X)O.call(X,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ce[te]=X[te]);var ae=arguments.length-2;if(ae===1)ce.children=G;else if(1<ae){for(var de=Array(ae),Se=0;Se<ae;Se++)de[Se]=arguments[Se+2];ce.children=de}if(P&&P.defaultProps)for(te in ae=P.defaultProps,ae)ce[te]===void 0&&(ce[te]=ae[te]);return K(P,he,ce)},je.createRef=function(){return{current:null}},je.forwardRef=function(P){return{$$typeof:d,render:P}},je.isValidElement=W,je.lazy=function(P){return{$$typeof:y,_payload:{_status:-1,_result:P},_init:V}},je.memo=function(P,X){return{$$typeof:m,type:P,compare:X===void 0?null:X}},je.startTransition=function(P){var X=L.T,G={};L.T=G;try{var te=P(),ce=L.S;ce!==null&&ce(G,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(B,oe)}catch(he){oe(he)}finally{X!==null&&G.types!==null&&(X.types=G.types),L.T=X}},je.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},je.use=function(P){return L.H.use(P)},je.useActionState=function(P,X,G){return L.H.useActionState(P,X,G)},je.useCallback=function(P,X){return L.H.useCallback(P,X)},je.useContext=function(P){return L.H.useContext(P)},je.useDebugValue=function(){},je.useDeferredValue=function(P,X){return L.H.useDeferredValue(P,X)},je.useEffect=function(P,X){return L.H.useEffect(P,X)},je.useEffectEvent=function(P){return L.H.useEffectEvent(P)},je.useId=function(){return L.H.useId()},je.useImperativeHandle=function(P,X,G){return L.H.useImperativeHandle(P,X,G)},je.useInsertionEffect=function(P,X){return L.H.useInsertionEffect(P,X)},je.useLayoutEffect=function(P,X){return L.H.useLayoutEffect(P,X)},je.useMemo=function(P,X){return L.H.useMemo(P,X)},je.useOptimistic=function(P,X){return L.H.useOptimistic(P,X)},je.useReducer=function(P,X,G){return L.H.useReducer(P,X,G)},je.useRef=function(P){return L.H.useRef(P)},je.useState=function(P){return L.H.useState(P)},je.useSyncExternalStore=function(P,X,G){return L.H.useSyncExternalStore(P,X,G)},je.useTransition=function(){return L.H.useTransition()},je.version="19.2.3",je}var Mb;function Yu(){return Mb||(Mb=1,Mh.exports=zN()),Mh.exports}var x=Yu();const ie=Sp(x),wp=PN({__proto__:null,default:ie},[x]);var _h={exports:{}},el={},Oh={exports:{}},Dh={};var _b;function VN(){return _b||(_b=1,(function(e){function t(D,H){var V=D.length;D.push(H);e:for(;0<V;){var oe=V-1>>>1,ue=D[oe];if(0<r(ue,H))D[oe]=H,D[V]=ue,V=oe;else break e}}function s(D){return D.length===0?null:D[0]}function i(D){if(D.length===0)return null;var H=D[0],V=D.pop();if(V!==H){D[0]=V;e:for(var oe=0,ue=D.length,P=ue>>>1;oe<P;){var X=2*(oe+1)-1,G=D[X],te=X+1,ce=D[te];if(0>r(G,V))te<ue&&0>r(ce,G)?(D[oe]=ce,D[te]=V,oe=te):(D[oe]=G,D[X]=V,oe=X);else if(te<ue&&0>r(ce,V))D[oe]=ce,D[te]=V,oe=te;else break e}}return H}function r(D,H){var V=D.sortIndex-H.sortIndex;return V!==0?V:D.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,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],m=[],y=1,g=null,b=3,S=!1,C=!1,T=!1,A=!1,E=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function _(D){for(var H=s(m);H!==null;){if(H.callback===null)i(m);else if(H.startTime<=D)i(m),H.sortIndex=H.expirationTime,t(f,H);else break;H=s(m)}}function M(D){if(T=!1,_(D),!C)if(s(f)!==null)C=!0,B||(B=!0,se());else{var H=s(m);H!==null&&le(M,H.startTime-D)}}var B=!1,L=-1,O=5,K=-1;function Z(){return A?!0:!(e.unstable_now()-K<O)}function W(){if(A=!1,B){var D=e.unstable_now();K=D;var H=!0;try{e:{C=!1,T&&(T=!1,j(L),L=-1),S=!0;var V=b;try{t:{for(_(D),g=s(f);g!==null&&!(g.expirationTime>D&&Z());){var oe=g.callback;if(typeof oe=="function"){g.callback=null,b=g.priorityLevel;var ue=oe(g.expirationTime<=D);if(D=e.unstable_now(),typeof ue=="function"){g.callback=ue,_(D),H=!0;break t}g===s(f)&&i(f),_(D)}else i(f);g=s(f)}if(g!==null)H=!0;else{var P=s(m);P!==null&&le(M,P.startTime-D),H=!1}}break e}finally{g=null,b=V,S=!1}H=void 0}}finally{H?se():B=!1}}}var se;if(typeof R=="function")se=function(){R(W)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,ne=I.port2;I.port1.onmessage=W,se=function(){ne.postMessage(null)}}else se=function(){E(W,0)};function le(D,H){L=E(function(){D(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(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(D){switch(b){case 1:case 2:case 3:var H=3;break;default:H=b}var V=b;b=H;try{return D()}finally{b=V}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(D,H){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var V=b;b=D;try{return H()}finally{b=V}},e.unstable_scheduleCallback=function(D,H,V){var oe=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?oe+V:oe):V=oe,D){case 1:var ue=-1;break;case 2:ue=250;break;case 5:ue=1073741823;break;case 4:ue=1e4;break;default:ue=5e3}return ue=V+ue,D={id:y++,callback:H,priorityLevel:D,startTime:V,expirationTime:ue,sortIndex:-1},V>oe?(D.sortIndex=V,t(m,D),s(f)===null&&D===s(m)&&(T?(j(L),L=-1):T=!0,le(M,V-oe))):(D.sortIndex=ue,t(f,D),C||S||(C=!0,B||(B=!0,se()))),D},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(D){var H=b;return function(){var V=b;b=H;try{return D.apply(this,arguments)}finally{b=V}}}})(Dh)),Dh}var Ob;function BN(){return Ob||(Ob=1,Oh.exports=VN()),Oh.exports}var Ph={exports:{}},en={};var Db;function UN(){if(Db)return en;Db=1;var e=Yu();function t(f){var m="https://react.dev/errors/"+f;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 #"+f+"; 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(f,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:g==null?null:""+g,children:f,containerInfo:m,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,m){if(f==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return en.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,en.createPortal=function(f,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(f,m,null,y)},en.flushSync=function(f){var m=u.T,y=i.p;try{if(u.T=null,i.p=2,f)return f()}finally{u.T=m,i.p=y,i.d.f()}},en.preconnect=function(f,m){typeof f=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(f,m))},en.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},en.preinit=function(f,m){if(typeof f=="string"&&m&&typeof m.as=="string"){var y=m.as,g=d(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(f,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:S}):y==="script"&&i.d.X(f,{crossOrigin:g,integrity:b,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},en.preinitModule=function(f,m){if(typeof f=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=d(m.as,m.crossOrigin);i.d.M(f,{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(f)},en.preload=function(f,m){if(typeof f=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin);i.d.L(f,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})}},en.preloadModule=function(f,m){if(typeof f=="string")if(m){var y=d(m.as,m.crossOrigin);i.d.m(f,{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(f)},en.requestFormReset=function(f){i.d.r(f)},en.unstable_batchedUpdates=function(f,m){return f(m)},en.useFormState=function(f,m,y){return u.H.useFormState(f,m,y)},en.useFormStatus=function(){return u.H.useHostTransitionStatus()},en.version="19.2.3",en}var Pb;function A1(){if(Pb)return Ph.exports;Pb=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(),Ph.exports=UN(),Ph.exports}var kb;function HN(){if(kb)return el;kb=1;var e=BN(),t=Yu(),s=A1();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 d(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 f(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 f(p),n;if(v===c)return f(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"),A=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),R=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function se(n){return n===null||typeof n!="object"?null:(n=W&&n[W]||n["@@iterator"],typeof n=="function"?n:null)}var I=Symbol.for("react.client.reference");function ne(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===I?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case T:return"Fragment";case E:return"Profiler";case A:return"StrictMode";case M:return"Suspense";case B:return"SuspenseList";case K:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case C:return"Portal";case R:return n.displayName||"Context";case j: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 L:return a=n.displayName||null,a!==null?a:ne(n.type)||"Memo";case O:a=n._payload,n=n._init;try{return ne(n(a))}catch{}}return null}var le=Array.isArray,D=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,V={pending:!1,data:null,method:null,action:null},oe=[],ue=-1;function P(n){return{current:n}}function X(n){0>ue||(n.current=oe[ue],oe[ue]=null,ue--)}function G(n,a){ue++,oe[ue]=n.current,n.current=a}var te=P(null),ce=P(null),he=P(null),ae=P(null);function de(n,a){switch(G(he,a),G(ce,n),G(te,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?Zx(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=Zx(a),n=Qx(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}X(te),G(te,n)}function Se(){X(te),X(ce),X(he)}function Ee(n){n.memoizedState!==null&&G(ae,n);var a=te.current,o=Qx(a,n.type);a!==o&&(G(ce,n),G(te,o))}function Ne(n){ce.current===n&&(X(te),X(ce)),ae.current===n&&(X(ae),Xr._currentValue=V)}var _e,gt;function rt(n){if(_e===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);_e=a&&a[1]||"",gt=-1<o.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+_e+n+gt}var jn=!1;function Gt(n,a){if(!n||jn)return"";jn=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch(Y){var $=Y}Reflect.construct(n,[],ee)}else{try{ee.call()}catch(Y){$=Y}n.call(ee.prototype)}}else{try{throw Error()}catch(Y){$=Y}(ee=n())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(Y){if(Y&&$&&typeof Y.stack=="string")return[Y.stack,$.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 k=w.split(`
|
|
4
|
+
`),q=N.split(`
|
|
5
|
+
`);for(p=c=0;c<k.length&&!k[c].includes("DetermineComponentFrameRoot");)c++;for(;p<q.length&&!q[p].includes("DetermineComponentFrameRoot");)p++;if(c===k.length||p===q.length)for(c=k.length-1,p=q.length-1;1<=c&&0<=p&&k[c]!==q[p];)p--;for(;1<=c&&0<=p;c--,p--)if(k[c]!==q[p]){if(c!==1||p!==1)do if(c--,p--,0>p||k[c]!==q[p]){var Q=`
|
|
6
|
+
`+k[c].replace(" at new "," at ");return n.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",n.displayName)),Q}while(1<=c&&0<=p);break}}}finally{jn=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?rt(o):""}function on(n,a){switch(n.tag){case 26:case 27:case 5:return rt(n.type);case 16:return rt("Lazy");case 13:return n.child!==a&&a!==null?rt("Suspense Fallback"):rt("Suspense");case 19:return rt("SuspenseList");case 0:case 15:return Gt(n.type,!1);case 11:return Gt(n.type.render,!1);case 1:return Gt(n.type,!0);case 31:return rt("Activity");default:return""}}function wa(n){try{var a="",o=null;do a+=on(n,o),o=n,n=n.return;while(n);return a}catch(c){return`
|
|
7
|
+
Error generating stack: `+c.message+`
|
|
8
|
+
`+c.stack}}var Ht=Object.prototype.hasOwnProperty,Ua=e.unstable_scheduleCallback,Ha=e.unstable_cancelCallback,Nt=e.unstable_shouldYield,Hn=e.unstable_requestPaint,Rt=e.unstable_now,Cs=e.unstable_getCurrentPriorityLevel,fn=e.unstable_ImmediatePriority,la=e.unstable_UserBlockingPriority,In=e.unstable_NormalPriority,Ia=e.unstable_LowPriority,Nn=e.unstable_IdlePriority,Ts=e.log,Fn=e.unstable_setDisableYieldValue,ca=null,Mt=null;function rn(n){if(typeof Ts=="function"&&Fn(n),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(ca,n)}catch{}}var xt=Math.clz32?Math.clz32:hn,ui=Math.log,Fa=Math.LN2;function hn(n){return n>>>=0,n===0?32:31-(ui(n)/Fa|0)|0}var lt=256,Ca=262144,Xt=4194304;function Lt(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 Te(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=Lt(c):(w&=N,w!==0?p=Lt(w):o||(o=N&~n,o!==0&&(p=Lt(o))))):(N=c&~v,N!==0?p=Lt(N):w!==0?p=Lt(w):o||(o=c&~n,o!==0&&(p=Lt(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 ke(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function bt(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 zt(){var n=Xt;return Xt<<=1,(Xt&62914560)===0&&(Xt=4194304),n}function Ta(n){for(var a=[],o=0;31>o;o++)a.push(n);return a}function et(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Zt(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,k=n.expirationTimes,q=n.hiddenUpdates;for(o=w&~o;0<o;){var Q=31-xt(o),ee=1<<Q;N[Q]=0,k[Q]=-1;var $=q[Q];if($!==null)for(q[Q]=null,Q=0;Q<$.length;Q++){var Y=$[Q];Y!==null&&(Y.lane&=-536870913)}o&=~ee}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-xt(a);n.entangledLanes|=a,n.entanglements[c]=n.entanglements[c]|1073741824|o&261930}function Qt(n,a){var o=n.entangledLanes|=a;for(n=n.entanglements;o;){var c=31-xt(o),p=1<<c;p&a|n[c]&a&&(n[c]|=a),o&=~p}}function Wt(n,a){var o=a&-a;return o=(o&42)!==0?1:Es(o),(o&(n.suspendedLanes|a))!==0?0:o}function Es(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Rn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function cr(){var n=H.p;return n!==0?n:(n=window.event,n===void 0?32:bb(n.type))}function Vl(n,a){var o=H.p;try{return H.p=n,a()}finally{H.p=o}}var Ea=Math.random().toString(36).slice(2),_t="__reactFiber$"+Ea,Jt="__reactProps$"+Ea,As="__reactContainer$"+Ea,xe="__reactEvents$"+Ea,we="__reactListeners$"+Ea,Vt="__reactHandles$"+Ea,js="__reactResources$"+Ea,Ns="__reactMarker$"+Ea;function ur(n){delete n[_t],delete n[Jt],delete n[xe],delete n[we],delete n[Vt]}function $a(n){var a=n[_t];if(a)return a;for(var o=n.parentNode;o;){if(a=o[As]||o[_t]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(n=sb(n);n!==null;){if(o=n[_t])return o;n=sb(n)}return a}n=o,o=n.parentNode}return null}function Xi(n){if(n=n[_t]||n[As]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function dr(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function Zi(n){var a=n[js];return a||(a=n[js]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Bt(n){n[Ns]=!0}var Vg=new Set,Bg={};function di(n,a){Qi(n,a),Qi(n+"Capture",a)}function Qi(n,a){for(Bg[n]=a,n=0;n<a.length;n++)Vg.add(a[n])}var EA=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]*$"),Ug={},Hg={};function AA(n){return Ht.call(Hg,n)?!0:Ht.call(Ug,n)?!1:EA.test(n)?Hg[n]=!0:(Ug[n]=!0,!1)}function Bl(n,a,o){if(AA(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 Ul(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 Ka(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 qn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Ig(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function jA(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 Sd(n){if(!n._valueTracker){var a=Ig(n)?"checked":"value";n._valueTracker=jA(n,a,""+n[a])}}function Fg(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var o=a.getValue(),c="";return n&&(c=Ig(n)?n.checked?"true":"false":n.value),n=c,n!==o?(a.setValue(n),!0):!1}function Hl(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 NA=/[\n"\\]/g;function $n(n){return n.replace(NA,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function wd(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=""+qn(a)):n.value!==""+qn(a)&&(n.value=""+qn(a)):w!=="submit"&&w!=="reset"||n.removeAttribute("value"),a!=null?Cd(n,w,qn(a)):o!=null?Cd(n,w,qn(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=""+qn(N):n.removeAttribute("name")}function qg(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)){Sd(n);return}o=o!=null?""+qn(o):"",a=a!=null?""+qn(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),Sd(n)}function Cd(n,a,o){a==="number"&&Hl(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function Wi(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=""+qn(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 $g(n,a,o){if(a!=null&&(a=""+qn(a),a!==n.value&&(n.value=a),o==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=o!=null?""+qn(o):""}function Kg(n,a,o,c){if(a==null){if(c!=null){if(o!=null)throw Error(i(92));if(le(c)){if(1<c.length)throw Error(i(93));c=c[0]}o=c}o==null&&(o=""),a=o}o=qn(a),n.defaultValue=o,c=n.textContent,c===o&&c!==""&&c!==null&&(n.value=c),Sd(n)}function Ji(n,a){if(a){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=a;return}}n.textContent=a}var RA=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 Yg(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||RA.has(a)?a==="float"?n.cssFloat=o:n[a]=(""+o).trim():n[a]=o+"px"}function Gg(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&&Yg(n,p,c)}else for(var v in a)a.hasOwnProperty(v)&&Yg(n,v,a[v])}function Td(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 MA=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"]]),_A=/^[\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 Il(n){return _A.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Ya(){}var Ed=null;function Ad(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var eo=null,to=null;function Xg(n){var a=Xi(n);if(a&&(n=a.stateNode)){var o=n[Jt]||null;e:switch(n=a.stateNode,a.type){case"input":if(wd(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="'+$n(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var c=o[a];if(c!==n&&c.form===n.form){var p=c[Jt]||null;if(!p)throw Error(i(90));wd(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&&Fg(c)}break e;case"textarea":$g(n,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Wi(n,!!o.multiple,a,!1)}}}var jd=!1;function Zg(n,a,o){if(jd)return n(a,o);jd=!0;try{var c=n(a);return c}finally{if(jd=!1,(eo!==null||to!==null)&&(Rc(),eo&&(a=eo,n=to,to=eo=null,Xg(a),n)))for(a=0;a<n.length;a++)Xg(n[a])}}function fr(n,a){var o=n.stateNode;if(o===null)return null;var c=o[Jt]||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 Ga=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nd=!1;if(Ga)try{var hr={};Object.defineProperty(hr,"passive",{get:function(){Nd=!0}}),window.addEventListener("test",hr,hr),window.removeEventListener("test",hr,hr)}catch{Nd=!1}var Rs=null,Rd=null,Fl=null;function Qg(){if(Fl)return Fl;var n,a=Rd,o=a.length,c,p="value"in Rs?Rs.value:Rs.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 Fl=p.slice(n,1<c?1-c:void 0)}function ql(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 $l(){return!0}function Wg(){return!1}function mn(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)?$l:Wg,this.isPropagationStopped=Wg,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=$l)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=$l)},persist:function(){},isPersistent:$l}),a}var fi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kl=mn(fi),mr=g({},fi,{view:0,detail:0}),OA=mn(mr),Md,_d,pr,Yl=g({},mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dd,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!==pr&&(pr&&n.type==="mousemove"?(Md=n.screenX-pr.screenX,_d=n.screenY-pr.screenY):_d=Md=0,pr=n),Md)},movementY:function(n){return"movementY"in n?n.movementY:_d}}),Jg=mn(Yl),DA=g({},Yl,{dataTransfer:0}),PA=mn(DA),kA=g({},mr,{relatedTarget:0}),Od=mn(kA),LA=g({},fi,{animationName:0,elapsedTime:0,pseudoElement:0}),zA=mn(LA),VA=g({},fi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),BA=mn(VA),UA=g({},fi,{data:0}),ev=mn(UA),HA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},IA={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"},FA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qA(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=FA[n])?!!a[n]:!1}function Dd(){return qA}var $A=g({},mr,{key:function(n){if(n.key){var a=HA[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=ql(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?IA[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dd,charCode:function(n){return n.type==="keypress"?ql(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?ql(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),KA=mn($A),YA=g({},Yl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tv=mn(YA),GA=g({},mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dd}),XA=mn(GA),ZA=g({},fi,{propertyName:0,elapsedTime:0,pseudoElement:0}),QA=mn(ZA),WA=g({},Yl,{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}),JA=mn(WA),ej=g({},fi,{newState:0,oldState:0}),tj=mn(ej),nj=[9,13,27,32],Pd=Ga&&"CompositionEvent"in window,gr=null;Ga&&"documentMode"in document&&(gr=document.documentMode);var aj=Ga&&"TextEvent"in window&&!gr,nv=Ga&&(!Pd||gr&&8<gr&&11>=gr),av=" ",sv=!1;function iv(n,a){switch(n){case"keyup":return nj.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ov(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var no=!1;function sj(n,a){switch(n){case"compositionend":return ov(a);case"keypress":return a.which!==32?null:(sv=!0,av);case"textInput":return n=a.data,n===av&&sv?null:n;default:return null}}function ij(n,a){if(no)return n==="compositionend"||!Pd&&iv(n,a)?(n=Qg(),Fl=Rd=Rs=null,no=!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 nv&&a.locale!=="ko"?null:a.data;default:return null}}var oj={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 rv(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!oj[n.type]:a==="textarea"}function lv(n,a,o,c){eo?to?to.push(c):to=[c]:eo=c,a=Lc(a,"onChange"),0<a.length&&(o=new Kl("onChange","change",null,o,c),n.push({event:o,listeners:a}))}var vr=null,yr=null;function rj(n){qx(n,0)}function Gl(n){var a=dr(n);if(Fg(a))return n}function cv(n,a){if(n==="change")return a}var uv=!1;if(Ga){var kd;if(Ga){var Ld="oninput"in document;if(!Ld){var dv=document.createElement("div");dv.setAttribute("oninput","return;"),Ld=typeof dv.oninput=="function"}kd=Ld}else kd=!1;uv=kd&&(!document.documentMode||9<document.documentMode)}function fv(){vr&&(vr.detachEvent("onpropertychange",hv),yr=vr=null)}function hv(n){if(n.propertyName==="value"&&Gl(yr)){var a=[];lv(a,yr,n,Ad(n)),Zg(rj,a)}}function lj(n,a,o){n==="focusin"?(fv(),vr=a,yr=o,vr.attachEvent("onpropertychange",hv)):n==="focusout"&&fv()}function cj(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Gl(yr)}function uj(n,a){if(n==="click")return Gl(a)}function dj(n,a){if(n==="input"||n==="change")return Gl(a)}function fj(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var Mn=typeof Object.is=="function"?Object.is:fj;function xr(n,a){if(Mn(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(!Ht.call(a,p)||!Mn(n[p],a[p]))return!1}return!0}function mv(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function pv(n,a){var o=mv(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=mv(o)}}function gv(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?gv(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function vv(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=Hl(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=Hl(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 hj=Ga&&"documentMode"in document&&11>=document.documentMode,ao=null,Vd=null,br=null,Bd=!1;function yv(n,a,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Bd||ao==null||ao!==Hl(c)||(c=ao,"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}),br&&xr(br,c)||(br=c,c=Lc(Vd,"onSelect"),0<c.length&&(a=new Kl("onSelect","select",null,a,o),n.push({event:a,listeners:c}),a.target=ao)))}function hi(n,a){var o={};return o[n.toLowerCase()]=a.toLowerCase(),o["Webkit"+n]="webkit"+a,o["Moz"+n]="moz"+a,o}var so={animationend:hi("Animation","AnimationEnd"),animationiteration:hi("Animation","AnimationIteration"),animationstart:hi("Animation","AnimationStart"),transitionrun:hi("Transition","TransitionRun"),transitionstart:hi("Transition","TransitionStart"),transitioncancel:hi("Transition","TransitionCancel"),transitionend:hi("Transition","TransitionEnd")},Ud={},xv={};Ga&&(xv=document.createElement("div").style,"AnimationEvent"in window||(delete so.animationend.animation,delete so.animationiteration.animation,delete so.animationstart.animation),"TransitionEvent"in window||delete so.transitionend.transition);function mi(n){if(Ud[n])return Ud[n];if(!so[n])return n;var a=so[n],o;for(o in a)if(a.hasOwnProperty(o)&&o in xv)return Ud[n]=a[o];return n}var bv=mi("animationend"),Sv=mi("animationiteration"),wv=mi("animationstart"),mj=mi("transitionrun"),pj=mi("transitionstart"),gj=mi("transitioncancel"),Cv=mi("transitionend"),Tv=new Map,Hd="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(" ");Hd.push("scrollEnd");function ua(n,a){Tv.set(n,a),di(a,[n])}var Xl=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)},Kn=[],io=0,Id=0;function Zl(){for(var n=io,a=Id=io=0;a<n;){var o=Kn[a];Kn[a++]=null;var c=Kn[a];Kn[a++]=null;var p=Kn[a];Kn[a++]=null;var v=Kn[a];if(Kn[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&&Ev(o,p,v)}}function Ql(n,a,o,c){Kn[io++]=n,Kn[io++]=a,Kn[io++]=o,Kn[io++]=c,Id|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function Fd(n,a,o,c){return Ql(n,a,o,c),Wl(n)}function pi(n,a){return Ql(n,null,null,a),Wl(n)}function Ev(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-xt(o),n=v.hiddenUpdates,c=n[p],c===null?n[p]=[a]:c.push(a),a.lane=o|536870912),v):null}function Wl(n){if(50<Ir)throw Ir=0,Jf=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var oo={};function vj(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 _n(n,a,o,c){return new vj(n,a,o,c)}function qd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Xa(n,a){var o=n.alternate;return o===null?(o=_n(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 Av(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 Jl(n,a,o,c,p,v){var w=0;if(c=n,typeof n=="function")qd(n)&&(w=1);else if(typeof n=="string")w=wN(n,o,te.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case K:return n=_n(31,o,a,p),n.elementType=K,n.lanes=v,n;case T:return gi(o.children,p,v,a);case A:w=8,p|=24;break;case E:return n=_n(12,o,a,p|2),n.elementType=E,n.lanes=v,n;case M:return n=_n(13,o,a,p),n.elementType=M,n.lanes=v,n;case B:return n=_n(19,o,a,p),n.elementType=B,n.lanes=v,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case R:w=10;break e;case j:w=9;break e;case _:w=11;break e;case L:w=14;break e;case O:w=16,c=null;break e}w=29,o=Error(i(130,n===null?"null":typeof n,"")),c=null}return a=_n(w,o,a,p),a.elementType=n,a.type=c,a.lanes=v,a}function gi(n,a,o,c){return n=_n(7,n,c,a),n.lanes=o,n}function $d(n,a,o){return n=_n(6,n,null,a),n.lanes=o,n}function jv(n){var a=_n(18,null,null,0);return a.stateNode=n,a}function Kd(n,a,o){return a=_n(4,n.children!==null?n.children:[],n.key,a),a.lanes=o,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var Nv=new WeakMap;function Yn(n,a){if(typeof n=="object"&&n!==null){var o=Nv.get(n);return o!==void 0?o:(a={value:n,source:a,stack:wa(a)},Nv.set(n,a),a)}return{value:n,source:a,stack:wa(a)}}var ro=[],lo=0,ec=null,Sr=0,Gn=[],Xn=0,Ms=null,Aa=1,ja="";function Za(n,a){ro[lo++]=Sr,ro[lo++]=ec,ec=n,Sr=a}function Rv(n,a,o){Gn[Xn++]=Aa,Gn[Xn++]=ja,Gn[Xn++]=Ms,Ms=n;var c=Aa;n=ja;var p=32-xt(c)-1;c&=~(1<<p),o+=1;var v=32-xt(a)+p;if(30<v){var w=p-p%5;v=(c&(1<<w)-1).toString(32),c>>=w,p-=w,Aa=1<<32-xt(a)+p|o<<p|c,ja=v+n}else Aa=1<<v|o<<p|c,ja=n}function Yd(n){n.return!==null&&(Za(n,1),Rv(n,1,0))}function Gd(n){for(;n===ec;)ec=ro[--lo],ro[lo]=null,Sr=ro[--lo],ro[lo]=null;for(;n===Ms;)Ms=Gn[--Xn],Gn[Xn]=null,ja=Gn[--Xn],Gn[Xn]=null,Aa=Gn[--Xn],Gn[Xn]=null}function Mv(n,a){Gn[Xn++]=Aa,Gn[Xn++]=ja,Gn[Xn++]=Ms,Aa=a.id,ja=a.overflow,Ms=n}var It=null,tt=null,Ue=!1,_s=null,Zn=!1,Xd=Error(i(519));function Os(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wr(Yn(a,n)),Xd}function _v(n){var a=n.stateNode,o=n.type,c=n.memoizedProps;switch(a[_t]=n,a[Jt]=c,o){case"dialog":ze("cancel",a),ze("close",a);break;case"iframe":case"object":case"embed":ze("load",a);break;case"video":case"audio":for(o=0;o<qr.length;o++)ze(qr[o],a);break;case"source":ze("error",a);break;case"img":case"image":case"link":ze("error",a),ze("load",a);break;case"details":ze("toggle",a);break;case"input":ze("invalid",a),qg(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":ze("invalid",a);break;case"textarea":ze("invalid",a),Kg(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||Gx(a.textContent,o)?(c.popover!=null&&(ze("beforetoggle",a),ze("toggle",a)),c.onScroll!=null&&ze("scroll",a),c.onScrollEnd!=null&&ze("scrollend",a),c.onClick!=null&&(a.onclick=Ya),a=!0):a=!1,a||Os(n,!0)}function Ov(n){for(It=n.return;It;)switch(It.tag){case 5:case 31:case 13:Zn=!1;return;case 27:case 3:Zn=!0;return;default:It=It.return}}function co(n){if(n!==It)return!1;if(!Ue)return Ov(n),Ue=!0,!1;var a=n.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||mh(n.type,n.memoizedProps)),o=!o),o&&tt&&Os(n),Ov(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));tt=ab(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));tt=ab(n)}else a===27?(a=tt,Ks(n.type)?(n=xh,xh=null,tt=n):tt=a):tt=It?Wn(n.stateNode.nextSibling):null;return!0}function vi(){tt=It=null,Ue=!1}function Zd(){var n=_s;return n!==null&&(yn===null?yn=n:yn.push.apply(yn,n),_s=null),n}function wr(n){_s===null?_s=[n]:_s.push(n)}var Qd=P(null),yi=null,Qa=null;function Ds(n,a,o){G(Qd,a._currentValue),a._currentValue=o}function Wa(n){n._currentValue=Qd.current,X(Qd)}function Wd(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 Jd(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 k=0;k<a.length;k++)if(N.context===a[k]){v.lanes|=o,N=v.alternate,N!==null&&(N.lanes|=o),Wd(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),Wd(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 uo(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;Mn(p.pendingProps.value,w.value)||(n!==null?n.push(N):n=[N])}}else if(p===ae.current){if(w=p.alternate,w===null)throw Error(i(387));w.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Xr):n=[Xr])}p=p.return}n!==null&&Jd(a,n,o,c),a.flags|=262144}function tc(n){for(n=n.firstContext;n!==null;){if(!Mn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function xi(n){yi=n,Qa=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Ft(n){return Dv(yi,n)}function nc(n,a){return yi===null&&xi(n),Dv(n,a)}function Dv(n,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},Qa===null){if(n===null)throw Error(i(308));Qa=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else Qa=Qa.next=a;return o}var yj=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()})}},xj=e.unstable_scheduleCallback,bj=e.unstable_NormalPriority,St={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ef(){return{controller:new yj,data:new Map,refCount:0}}function Cr(n){n.refCount--,n.refCount===0&&xj(bj,function(){n.controller.abort()})}var Tr=null,tf=0,fo=0,ho=null;function Sj(n,a){if(Tr===null){var o=Tr=[];tf=0,fo=ih(),ho={status:"pending",value:void 0,then:function(c){o.push(c)}}}return tf++,a.then(Pv,Pv),a}function Pv(){if(--tf===0&&Tr!==null){ho!==null&&(ho.status="fulfilled");var n=Tr;Tr=null,fo=0,ho=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function wj(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 kv=D.S;D.S=function(n,a){yx=Rt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&Sj(n,a),kv!==null&&kv(n,a)};var bi=P(null);function nf(){var n=bi.current;return n!==null?n:Qe.pooledCache}function ac(n,a){a===null?G(bi,bi.current):G(bi,a.pool)}function Lv(){var n=nf();return n===null?null:{parent:St._currentValue,pool:n}}var mo=Error(i(460)),af=Error(i(474)),sc=Error(i(542)),ic={then:function(){}};function zv(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Vv(n,a,o){switch(o=n[o],o===void 0?n.push(a):o!==a&&(a.then(Ya,Ya),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Uv(n),n;default:if(typeof a.status=="string")a.then(Ya,Ya);else{if(n=Qe,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,Uv(n),n}throw wi=a,mo}}function Si(n){try{var a=n._init;return a(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(wi=o,mo):o}}var wi=null;function Bv(){if(wi===null)throw Error(i(459));var n=wi;return wi=null,n}function Uv(n){if(n===mo||n===sc)throw Error(i(483))}var po=null,Er=0;function oc(n){var a=Er;return Er+=1,po===null&&(po=[]),Vv(po,n,a)}function Ar(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function rc(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 Hv(n){function a(U,z){if(n){var F=U.deletions;F===null?(U.deletions=[z],U.flags|=16):F.push(z)}}function o(U,z){if(!n)return null;for(;z!==null;)a(U,z),z=z.sibling;return null}function c(U){for(var z=new Map;U!==null;)U.key!==null?z.set(U.key,U):z.set(U.index,U),U=U.sibling;return z}function p(U,z){return U=Xa(U,z),U.index=0,U.sibling=null,U}function v(U,z,F){return U.index=F,n?(F=U.alternate,F!==null?(F=F.index,F<z?(U.flags|=67108866,z):F):(U.flags|=67108866,z)):(U.flags|=1048576,z)}function w(U){return n&&U.alternate===null&&(U.flags|=67108866),U}function N(U,z,F,J){return z===null||z.tag!==6?(z=$d(F,U.mode,J),z.return=U,z):(z=p(z,F),z.return=U,z)}function k(U,z,F,J){var be=F.type;return be===T?Q(U,z,F.props.children,J,F.key):z!==null&&(z.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===O&&Si(be)===z.type)?(z=p(z,F.props),Ar(z,F),z.return=U,z):(z=Jl(F.type,F.key,F.props,null,U.mode,J),Ar(z,F),z.return=U,z)}function q(U,z,F,J){return z===null||z.tag!==4||z.stateNode.containerInfo!==F.containerInfo||z.stateNode.implementation!==F.implementation?(z=Kd(F,U.mode,J),z.return=U,z):(z=p(z,F.children||[]),z.return=U,z)}function Q(U,z,F,J,be){return z===null||z.tag!==7?(z=gi(F,U.mode,J,be),z.return=U,z):(z=p(z,F),z.return=U,z)}function ee(U,z,F){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=$d(""+z,U.mode,F),z.return=U,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case S:return F=Jl(z.type,z.key,z.props,null,U.mode,F),Ar(F,z),F.return=U,F;case C:return z=Kd(z,U.mode,F),z.return=U,z;case O:return z=Si(z),ee(U,z,F)}if(le(z)||se(z))return z=gi(z,U.mode,F,null),z.return=U,z;if(typeof z.then=="function")return ee(U,oc(z),F);if(z.$$typeof===R)return ee(U,nc(U,z),F);rc(U,z)}return null}function $(U,z,F,J){var be=z!==null?z.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return be!==null?null:N(U,z,""+F,J);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case S:return F.key===be?k(U,z,F,J):null;case C:return F.key===be?q(U,z,F,J):null;case O:return F=Si(F),$(U,z,F,J)}if(le(F)||se(F))return be!==null?null:Q(U,z,F,J,null);if(typeof F.then=="function")return $(U,z,oc(F),J);if(F.$$typeof===R)return $(U,z,nc(U,F),J);rc(U,F)}return null}function Y(U,z,F,J,be){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return U=U.get(F)||null,N(z,U,""+J,be);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case S:return U=U.get(J.key===null?F:J.key)||null,k(z,U,J,be);case C:return U=U.get(J.key===null?F:J.key)||null,q(z,U,J,be);case O:return J=Si(J),Y(U,z,F,J,be)}if(le(J)||se(J))return U=U.get(F)||null,Q(z,U,J,be,null);if(typeof J.then=="function")return Y(U,z,F,oc(J),be);if(J.$$typeof===R)return Y(U,z,F,nc(z,J),be);rc(z,J)}return null}function me(U,z,F,J){for(var be=null,Ie=null,ve=z,Me=z=0,Be=null;ve!==null&&Me<F.length;Me++){ve.index>Me?(Be=ve,ve=null):Be=ve.sibling;var Fe=$(U,ve,F[Me],J);if(Fe===null){ve===null&&(ve=Be);break}n&&ve&&Fe.alternate===null&&a(U,ve),z=v(Fe,z,Me),Ie===null?be=Fe:Ie.sibling=Fe,Ie=Fe,ve=Be}if(Me===F.length)return o(U,ve),Ue&&Za(U,Me),be;if(ve===null){for(;Me<F.length;Me++)ve=ee(U,F[Me],J),ve!==null&&(z=v(ve,z,Me),Ie===null?be=ve:Ie.sibling=ve,Ie=ve);return Ue&&Za(U,Me),be}for(ve=c(ve);Me<F.length;Me++)Be=Y(ve,U,Me,F[Me],J),Be!==null&&(n&&Be.alternate!==null&&ve.delete(Be.key===null?Me:Be.key),z=v(Be,z,Me),Ie===null?be=Be:Ie.sibling=Be,Ie=Be);return n&&ve.forEach(function(Qs){return a(U,Qs)}),Ue&&Za(U,Me),be}function Ce(U,z,F,J){if(F==null)throw Error(i(151));for(var be=null,Ie=null,ve=z,Me=z=0,Be=null,Fe=F.next();ve!==null&&!Fe.done;Me++,Fe=F.next()){ve.index>Me?(Be=ve,ve=null):Be=ve.sibling;var Qs=$(U,ve,Fe.value,J);if(Qs===null){ve===null&&(ve=Be);break}n&&ve&&Qs.alternate===null&&a(U,ve),z=v(Qs,z,Me),Ie===null?be=Qs:Ie.sibling=Qs,Ie=Qs,ve=Be}if(Fe.done)return o(U,ve),Ue&&Za(U,Me),be;if(ve===null){for(;!Fe.done;Me++,Fe=F.next())Fe=ee(U,Fe.value,J),Fe!==null&&(z=v(Fe,z,Me),Ie===null?be=Fe:Ie.sibling=Fe,Ie=Fe);return Ue&&Za(U,Me),be}for(ve=c(ve);!Fe.done;Me++,Fe=F.next())Fe=Y(ve,U,Me,Fe.value,J),Fe!==null&&(n&&Fe.alternate!==null&&ve.delete(Fe.key===null?Me:Fe.key),z=v(Fe,z,Me),Ie===null?be=Fe:Ie.sibling=Fe,Ie=Fe);return n&&ve.forEach(function(DN){return a(U,DN)}),Ue&&Za(U,Me),be}function Ze(U,z,F,J){if(typeof F=="object"&&F!==null&&F.type===T&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case S:e:{for(var be=F.key;z!==null;){if(z.key===be){if(be=F.type,be===T){if(z.tag===7){o(U,z.sibling),J=p(z,F.props.children),J.return=U,U=J;break e}}else if(z.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===O&&Si(be)===z.type){o(U,z.sibling),J=p(z,F.props),Ar(J,F),J.return=U,U=J;break e}o(U,z);break}else a(U,z);z=z.sibling}F.type===T?(J=gi(F.props.children,U.mode,J,F.key),J.return=U,U=J):(J=Jl(F.type,F.key,F.props,null,U.mode,J),Ar(J,F),J.return=U,U=J)}return w(U);case C:e:{for(be=F.key;z!==null;){if(z.key===be)if(z.tag===4&&z.stateNode.containerInfo===F.containerInfo&&z.stateNode.implementation===F.implementation){o(U,z.sibling),J=p(z,F.children||[]),J.return=U,U=J;break e}else{o(U,z);break}else a(U,z);z=z.sibling}J=Kd(F,U.mode,J),J.return=U,U=J}return w(U);case O:return F=Si(F),Ze(U,z,F,J)}if(le(F))return me(U,z,F,J);if(se(F)){if(be=se(F),typeof be!="function")throw Error(i(150));return F=be.call(F),Ce(U,z,F,J)}if(typeof F.then=="function")return Ze(U,z,oc(F),J);if(F.$$typeof===R)return Ze(U,z,nc(U,F),J);rc(U,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,z!==null&&z.tag===6?(o(U,z.sibling),J=p(z,F),J.return=U,U=J):(o(U,z),J=$d(F,U.mode,J),J.return=U,U=J),w(U)):o(U,z)}return function(U,z,F,J){try{Er=0;var be=Ze(U,z,F,J);return po=null,be}catch(ve){if(ve===mo||ve===sc)throw ve;var Ie=_n(29,ve,null,U.mode);return Ie.lanes=J,Ie.return=U,Ie}}}var Ci=Hv(!0),Iv=Hv(!1),Ps=!1;function sf(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function of(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 ks(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ls(n,a,o){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(qe&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=Wl(n),Ev(n,null,o),a}return Ql(n,c,a,o),Wl(n)}function jr(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,Qt(n,o)}}function rf(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 lf=!1;function Nr(){if(lf){var n=ho;if(n!==null)throw n}}function Rr(n,a,o,c){lf=!1;var p=n.updateQueue;Ps=!1;var v=p.firstBaseUpdate,w=p.lastBaseUpdate,N=p.shared.pending;if(N!==null){p.shared.pending=null;var k=N,q=k.next;k.next=null,w===null?v=q:w.next=q,w=k;var Q=n.alternate;Q!==null&&(Q=Q.updateQueue,N=Q.lastBaseUpdate,N!==w&&(N===null?Q.firstBaseUpdate=q:N.next=q,Q.lastBaseUpdate=k))}if(v!==null){var ee=p.baseState;w=0,Q=q=k=null,N=v;do{var $=N.lane&-536870913,Y=$!==N.lane;if(Y?(Ve&$)===$:(c&$)===$){$!==0&&$===fo&&(lf=!0),Q!==null&&(Q=Q.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var me=n,Ce=N;$=a;var Ze=o;switch(Ce.tag){case 1:if(me=Ce.payload,typeof me=="function"){ee=me.call(Ze,ee,$);break e}ee=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=Ce.payload,$=typeof me=="function"?me.call(Ze,ee,$):me,$==null)break e;ee=g({},ee,$);break e;case 2:Ps=!0}}$=N.callback,$!==null&&(n.flags|=64,Y&&(n.flags|=8192),Y=p.callbacks,Y===null?p.callbacks=[$]:Y.push($))}else Y={lane:$,tag:N.tag,payload:N.payload,callback:N.callback,next:null},Q===null?(q=Q=Y,k=ee):Q=Q.next=Y,w|=$;if(N=N.next,N===null){if(N=p.shared.pending,N===null)break;Y=N,N=Y.next,Y.next=null,p.lastBaseUpdate=Y,p.shared.pending=null}}while(!0);Q===null&&(k=ee),p.baseState=k,p.firstBaseUpdate=q,p.lastBaseUpdate=Q,v===null&&(p.shared.lanes=0),Hs|=w,n.lanes=w,n.memoizedState=ee}}function Fv(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function qv(n,a){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)Fv(o[n],a)}var go=P(null),lc=P(0);function $v(n,a){n=rs,G(lc,n),G(go,a),rs=n|a.baseLanes}function cf(){G(lc,rs),G(go,go.current)}function uf(){rs=lc.current,X(go),X(lc)}var On=P(null),Qn=null;function zs(n){var a=n.alternate;G(vt,vt.current&1),G(On,n),Qn===null&&(a===null||go.current!==null||a.memoizedState!==null)&&(Qn=n)}function df(n){G(vt,vt.current),G(On,n),Qn===null&&(Qn=n)}function Kv(n){n.tag===22?(G(vt,vt.current),G(On,n),Qn===null&&(Qn=n)):Vs()}function Vs(){G(vt,vt.current),G(On,On.current)}function Dn(n){X(On),Qn===n&&(Qn=null),X(vt)}var vt=P(0);function cc(n){for(var a=n;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||vh(o)||yh(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 Ja=0,Re=null,Ge=null,wt=null,uc=!1,vo=!1,Ti=!1,dc=0,Mr=0,yo=null,Cj=0;function ut(){throw Error(i(321))}function ff(n,a){if(a===null)return!1;for(var o=0;o<a.length&&o<n.length;o++)if(!Mn(n[o],a[o]))return!1;return!0}function hf(n,a,o,c,p,v){return Ja=v,Re=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,D.H=n===null||n.memoizedState===null?Ry:Nf,Ti=!1,v=o(c,p),Ti=!1,vo&&(v=Gv(a,o,c,p)),Yv(n),v}function Yv(n){D.H=Dr;var a=Ge!==null&&Ge.next!==null;if(Ja=0,wt=Ge=Re=null,uc=!1,Mr=0,yo=null,a)throw Error(i(300));n===null||Ct||(n=n.dependencies,n!==null&&tc(n)&&(Ct=!0))}function Gv(n,a,o,c){Re=n;var p=0;do{if(vo&&(yo=null),Mr=0,vo=!1,25<=p)throw Error(i(301));if(p+=1,wt=Ge=null,n.updateQueue!=null){var v=n.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}D.H=My,v=a(o,c)}while(vo);return v}function Tj(){var n=D.H,a=n.useState()[0];return a=typeof a.then=="function"?_r(a):a,n=n.useState()[0],(Ge!==null?Ge.memoizedState:null)!==n&&(Re.flags|=1024),a}function mf(){var n=dc!==0;return dc=0,n}function pf(n,a,o){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~o}function gf(n){if(uc){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}uc=!1}Ja=0,wt=Ge=Re=null,vo=!1,Mr=dc=0,yo=null}function ln(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Re.memoizedState=wt=n:wt=wt.next=n,wt}function yt(){if(Ge===null){var n=Re.alternate;n=n!==null?n.memoizedState:null}else n=Ge.next;var a=wt===null?Re.memoizedState:wt.next;if(a!==null)wt=a,Ge=n;else{if(n===null)throw Re.alternate===null?Error(i(467)):Error(i(310));Ge=n,n={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},wt===null?Re.memoizedState=wt=n:wt=wt.next=n}return wt}function fc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _r(n){var a=Mr;return Mr+=1,yo===null&&(yo=[]),n=Vv(yo,n,a),a=Re,(wt===null?a.memoizedState:wt.next)===null&&(a=a.alternate,D.H=a===null||a.memoizedState===null?Ry:Nf),n}function hc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return _r(n);if(n.$$typeof===R)return Ft(n)}throw Error(i(438,String(n)))}function vf(n){var a=null,o=Re.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var c=Re.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=fc(),Re.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]=Z;return a.index++,o}function es(n,a){return typeof a=="function"?a(n):a}function mc(n){var a=yt();return yf(a,Ge,n)}function yf(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,k=null,q=a,Q=!1;do{var ee=q.lane&-536870913;if(ee!==q.lane?(Ve&ee)===ee:(Ja&ee)===ee){var $=q.revertLane;if($===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),ee===fo&&(Q=!0);else if((Ja&$)===$){q=q.next,$===fo&&(Q=!0);continue}else ee={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},k===null?(N=k=ee,w=v):k=k.next=ee,Re.lanes|=$,Hs|=$;ee=q.action,Ti&&o(v,ee),v=q.hasEagerState?q.eagerState:o(v,ee)}else $={lane:ee,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},k===null?(N=k=$,w=v):k=k.next=$,Re.lanes|=ee,Hs|=ee;q=q.next}while(q!==null&&q!==a);if(k===null?w=v:k.next=N,!Mn(v,n.memoizedState)&&(Ct=!0,Q&&(o=ho,o!==null)))throw o;n.memoizedState=v,n.baseState=w,n.baseQueue=k,c.lastRenderedState=v}return p===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function xf(n){var a=yt(),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);Mn(v,a.memoizedState)||(Ct=!0),a.memoizedState=v,a.baseQueue===null&&(a.baseState=v),o.lastRenderedState=v}return[v,c]}function Xv(n,a,o){var c=Re,p=yt(),v=Ue;if(v){if(o===void 0)throw Error(i(407));o=o()}else o=a();var w=!Mn((Ge||p).memoizedState,o);if(w&&(p.memoizedState=o,Ct=!0),p=p.queue,wf(Wv.bind(null,c,p,n),[n]),p.getSnapshot!==a||w||wt!==null&&wt.memoizedState.tag&1){if(c.flags|=2048,xo(9,{destroy:void 0},Qv.bind(null,c,p,o,a),null),Qe===null)throw Error(i(349));v||(Ja&127)!==0||Zv(c,a,o)}return o}function Zv(n,a,o){n.flags|=16384,n={getSnapshot:a,value:o},a=Re.updateQueue,a===null?(a=fc(),Re.updateQueue=a,a.stores=[n]):(o=a.stores,o===null?a.stores=[n]:o.push(n))}function Qv(n,a,o,c){a.value=o,a.getSnapshot=c,Jv(a)&&ey(n)}function Wv(n,a,o){return o(function(){Jv(a)&&ey(n)})}function Jv(n){var a=n.getSnapshot;n=n.value;try{var o=a();return!Mn(n,o)}catch{return!0}}function ey(n){var a=pi(n,2);a!==null&&xn(a,n,2)}function bf(n){var a=ln();if(typeof n=="function"){var o=n;if(n=o(),Ti){rn(!0);try{o()}finally{rn(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:n},a}function ty(n,a,o,c){return n.baseState=o,yf(n,Ge,typeof c=="function"?c:es)}function Ej(n,a,o,c,p){if(vc(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)}};D.T!==null?o(!0):v.isTransition=!1,c(v),o=a.pending,o===null?(v.next=a.pending=v,ny(a,v)):(v.next=o.next,a.pending=o.next=v)}}function ny(n,a){var o=a.action,c=a.payload,p=n.state;if(a.isTransition){var v=D.T,w={};D.T=w;try{var N=o(p,c),k=D.S;k!==null&&k(w,N),ay(n,a,N)}catch(q){Sf(n,a,q)}finally{v!==null&&w.types!==null&&(v.types=w.types),D.T=v}}else try{v=o(p,c),ay(n,a,v)}catch(q){Sf(n,a,q)}}function ay(n,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(c){sy(n,a,c)},function(c){return Sf(n,a,c)}):sy(n,a,o)}function sy(n,a,o){a.status="fulfilled",a.value=o,iy(a),n.state=o,a=n.pending,a!==null&&(o=a.next,o===a?n.pending=null:(o=o.next,a.next=o,ny(n,o)))}function Sf(n,a,o){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=o,iy(a),a=a.next;while(a!==c)}n.action=null}function iy(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function oy(n,a){return a}function ry(n,a){if(Ue){var o=Qe.formState;if(o!==null){e:{var c=Re;if(Ue){if(tt){t:{for(var p=tt,v=Zn;p.nodeType!==8;){if(!v){p=null;break t}if(p=Wn(p.nextSibling),p===null){p=null;break t}}v=p.data,p=v==="F!"||v==="F"?p:null}if(p){tt=Wn(p.nextSibling),c=p.data==="F!";break e}}Os(c)}c=!1}c&&(a=o[0])}}return o=ln(),o.memoizedState=o.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oy,lastRenderedState:a},o.queue=c,o=Ay.bind(null,Re,c),c.dispatch=o,c=bf(!1),v=jf.bind(null,Re,!1,c.queue),c=ln(),p={state:a,dispatch:null,action:n,pending:null},c.queue=p,o=Ej.bind(null,Re,p,v,o),p.dispatch=o,c.memoizedState=n,[a,o,!1]}function ly(n){var a=yt();return cy(a,Ge,n)}function cy(n,a,o){if(a=yf(n,a,oy)[0],n=mc(es)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=_r(a)}catch(w){throw w===mo?sc:w}else c=a;a=yt();var p=a.queue,v=p.dispatch;return o!==a.memoizedState&&(Re.flags|=2048,xo(9,{destroy:void 0},Aj.bind(null,p,o),null)),[c,v,n]}function Aj(n,a){n.action=a}function uy(n){var a=yt(),o=Ge;if(o!==null)return cy(a,o,n);yt(),a=a.memoizedState,o=yt();var c=o.queue.dispatch;return o.memoizedState=n,[a,c,!1]}function xo(n,a,o,c){return n={tag:n,create:o,deps:c,inst:a,next:null},a=Re.updateQueue,a===null&&(a=fc(),Re.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 dy(){return yt().memoizedState}function pc(n,a,o,c){var p=ln();Re.flags|=n,p.memoizedState=xo(1|a,{destroy:void 0},o,c===void 0?null:c)}function gc(n,a,o,c){var p=yt();c=c===void 0?null:c;var v=p.memoizedState.inst;Ge!==null&&c!==null&&ff(c,Ge.memoizedState.deps)?p.memoizedState=xo(a,v,o,c):(Re.flags|=n,p.memoizedState=xo(1|a,v,o,c))}function fy(n,a){pc(8390656,8,n,a)}function wf(n,a){gc(2048,8,n,a)}function jj(n){Re.flags|=4;var a=Re.updateQueue;if(a===null)a=fc(),Re.updateQueue=a,a.events=[n];else{var o=a.events;o===null?a.events=[n]:o.push(n)}}function hy(n){var a=yt().memoizedState;return jj({ref:a,nextImpl:n}),function(){if((qe&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function my(n,a){return gc(4,2,n,a)}function py(n,a){return gc(4,4,n,a)}function gy(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 vy(n,a,o){o=o!=null?o.concat([n]):null,gc(4,4,gy.bind(null,a,n),o)}function Cf(){}function yy(n,a){var o=yt();a=a===void 0?null:a;var c=o.memoizedState;return a!==null&&ff(a,c[1])?c[0]:(o.memoizedState=[n,a],n)}function xy(n,a){var o=yt();a=a===void 0?null:a;var c=o.memoizedState;if(a!==null&&ff(a,c[1]))return c[0];if(c=n(),Ti){rn(!0);try{n()}finally{rn(!1)}}return o.memoizedState=[c,a],c}function Tf(n,a,o){return o===void 0||(Ja&1073741824)!==0&&(Ve&261930)===0?n.memoizedState=a:(n.memoizedState=o,n=bx(),Re.lanes|=n,Hs|=n,o)}function by(n,a,o,c){return Mn(o,a)?o:go.current!==null?(n=Tf(n,o,c),Mn(n,a)||(Ct=!0),n):(Ja&42)===0||(Ja&1073741824)!==0&&(Ve&261930)===0?(Ct=!0,n.memoizedState=o):(n=bx(),Re.lanes|=n,Hs|=n,a)}function Sy(n,a,o,c,p){var v=H.p;H.p=v!==0&&8>v?v:8;var w=D.T,N={};D.T=N,jf(n,!1,a,o);try{var k=p(),q=D.S;if(q!==null&&q(N,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var Q=wj(k,c);Or(n,a,Q,Ln(n))}else Or(n,a,c,Ln(n))}catch(ee){Or(n,a,{then:function(){},status:"rejected",reason:ee},Ln())}finally{H.p=v,w!==null&&N.types!==null&&(w.types=N.types),D.T=w}}function Nj(){}function Ef(n,a,o,c){if(n.tag!==5)throw Error(i(476));var p=wy(n).queue;Sy(n,p,a,V,o===null?Nj:function(){return Cy(n),o(c)})}function wy(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:V},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:o},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function Cy(n){var a=wy(n);a.next===null&&(a=n.alternate.memoizedState),Or(n,a.next.queue,{},Ln())}function Af(){return Ft(Xr)}function Ty(){return yt().memoizedState}function Ey(){return yt().memoizedState}function Rj(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var o=Ln();n=ks(o);var c=Ls(a,n,o);c!==null&&(xn(c,a,o),jr(c,a,o)),a={cache:ef()},n.payload=a;return}a=a.return}}function Mj(n,a,o){var c=Ln();o={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},vc(n)?jy(a,o):(o=Fd(n,a,o,c),o!==null&&(xn(o,n,c),Ny(o,a,c)))}function Ay(n,a,o){var c=Ln();Or(n,a,o,c)}function Or(n,a,o,c){var p={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(vc(n))jy(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,Mn(N,w))return Ql(n,a,p,0),Qe===null&&Zl(),!1}catch{}if(o=Fd(n,a,p,c),o!==null)return xn(o,n,c),Ny(o,a,c),!0}return!1}function jf(n,a,o,c){if(c={lane:2,revertLane:ih(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},vc(n)){if(a)throw Error(i(479))}else a=Fd(n,o,c,2),a!==null&&xn(a,n,2)}function vc(n){var a=n.alternate;return n===Re||a!==null&&a===Re}function jy(n,a){vo=uc=!0;var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}function Ny(n,a,o){if((o&4194048)!==0){var c=a.lanes;c&=n.pendingLanes,o|=c,a.lanes=o,Qt(n,o)}}var Dr={readContext:Ft,use:hc,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};Dr.useEffectEvent=ut;var Ry={readContext:Ft,use:hc,useCallback:function(n,a){return ln().memoizedState=[n,a===void 0?null:a],n},useContext:Ft,useEffect:fy,useImperativeHandle:function(n,a,o){o=o!=null?o.concat([n]):null,pc(4194308,4,gy.bind(null,a,n),o)},useLayoutEffect:function(n,a){return pc(4194308,4,n,a)},useInsertionEffect:function(n,a){pc(4,2,n,a)},useMemo:function(n,a){var o=ln();a=a===void 0?null:a;var c=n();if(Ti){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(Ti){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=Mj.bind(null,Re,n),[c.memoizedState,n]},useRef:function(n){var a=ln();return n={current:n},a.memoizedState=n},useState:function(n){n=bf(n);var a=n.queue,o=Ay.bind(null,Re,a);return a.dispatch=o,[n.memoizedState,o]},useDebugValue:Cf,useDeferredValue:function(n,a){var o=ln();return Tf(o,n,a)},useTransition:function(){var n=bf(!1);return n=Sy.bind(null,Re,n.queue,!0,!1),ln().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,o){var c=Re,p=ln();if(Ue){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),Qe===null)throw Error(i(349));(Ve&127)!==0||Zv(c,a,o)}p.memoizedState=o;var v={value:o,getSnapshot:a};return p.queue=v,fy(Wv.bind(null,c,v,n),[n]),c.flags|=2048,xo(9,{destroy:void 0},Qv.bind(null,c,v,o,a),null),o},useId:function(){var n=ln(),a=Qe.identifierPrefix;if(Ue){var o=ja,c=Aa;o=(c&~(1<<32-xt(c)-1)).toString(32)+o,a="_"+a+"R_"+o,o=dc++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=Cj++,a="_"+a+"r_"+o.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:Af,useFormState:ry,useActionState:ry,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=jf.bind(null,Re,!0,o),o.dispatch=a,[n,a]},useMemoCache:vf,useCacheRefresh:function(){return ln().memoizedState=Rj.bind(null,Re)},useEffectEvent:function(n){var a=ln(),o={impl:n};return a.memoizedState=o,function(){if((qe&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},Nf={readContext:Ft,use:hc,useCallback:yy,useContext:Ft,useEffect:wf,useImperativeHandle:vy,useInsertionEffect:my,useLayoutEffect:py,useMemo:xy,useReducer:mc,useRef:dy,useState:function(){return mc(es)},useDebugValue:Cf,useDeferredValue:function(n,a){var o=yt();return by(o,Ge.memoizedState,n,a)},useTransition:function(){var n=mc(es)[0],a=yt().memoizedState;return[typeof n=="boolean"?n:_r(n),a]},useSyncExternalStore:Xv,useId:Ty,useHostTransitionStatus:Af,useFormState:ly,useActionState:ly,useOptimistic:function(n,a){var o=yt();return ty(o,Ge,n,a)},useMemoCache:vf,useCacheRefresh:Ey};Nf.useEffectEvent=hy;var My={readContext:Ft,use:hc,useCallback:yy,useContext:Ft,useEffect:wf,useImperativeHandle:vy,useInsertionEffect:my,useLayoutEffect:py,useMemo:xy,useReducer:xf,useRef:dy,useState:function(){return xf(es)},useDebugValue:Cf,useDeferredValue:function(n,a){var o=yt();return Ge===null?Tf(o,n,a):by(o,Ge.memoizedState,n,a)},useTransition:function(){var n=xf(es)[0],a=yt().memoizedState;return[typeof n=="boolean"?n:_r(n),a]},useSyncExternalStore:Xv,useId:Ty,useHostTransitionStatus:Af,useFormState:uy,useActionState:uy,useOptimistic:function(n,a){var o=yt();return Ge!==null?ty(o,Ge,n,a):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:vf,useCacheRefresh:Ey};My.useEffectEvent=hy;function Rf(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 Mf={enqueueSetState:function(n,a,o){n=n._reactInternals;var c=Ln(),p=ks(c);p.payload=a,o!=null&&(p.callback=o),a=Ls(n,p,c),a!==null&&(xn(a,n,c),jr(a,n,c))},enqueueReplaceState:function(n,a,o){n=n._reactInternals;var c=Ln(),p=ks(c);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Ls(n,p,c),a!==null&&(xn(a,n,c),jr(a,n,c))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var o=Ln(),c=ks(o);c.tag=2,a!=null&&(c.callback=a),a=Ls(n,c,o),a!==null&&(xn(a,n,o),jr(a,n,o))}};function _y(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?!xr(o,c)||!xr(p,v):!0}function Oy(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&&Mf.enqueueReplaceState(a,a.state,null)}function Ei(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 Dy(n){Xl(n)}function Py(n){console.error(n)}function ky(n){Xl(n)}function yc(n,a){try{var o=n.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function Ly(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 _f(n,a,o){return o=ks(o),o.tag=3,o.payload={element:null},o.callback=function(){yc(n,a)},o}function zy(n){return n=ks(n),n.tag=3,n}function Vy(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(){Ly(a,o,c)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(n.callback=function(){Ly(a,o,c),typeof p!="function"&&(Is===null?Is=new Set([this]):Is.add(this));var N=c.stack;this.componentDidCatch(c.value,{componentStack:N!==null?N:""})})}function _j(n,a,o,c,p){if(o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=o.alternate,a!==null&&uo(a,o,p,!0),o=On.current,o!==null){switch(o.tag){case 31:case 13:return Qn===null?Mc():o.alternate===null&&dt===0&&(dt=3),o.flags&=-257,o.flags|=65536,o.lanes=p,c===ic?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([c]):a.add(c),nh(n,c,p)),!1;case 22:return o.flags|=65536,c===ic?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)),nh(n,c,p)),!1}throw Error(i(435,o.tag))}return nh(n,c,p),Mc(),!1}if(Ue)return a=On.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==Xd&&(n=Error(i(422),{cause:c}),wr(Yn(n,o)))):(c!==Xd&&(a=Error(i(423),{cause:c}),wr(Yn(a,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,c=Yn(c,o),p=_f(n.stateNode,c,p),rf(n,p),dt!==4&&(dt=2)),!1;var v=Error(i(520),{cause:c});if(v=Yn(v,o),Hr===null?Hr=[v]:Hr.push(v),dt!==4&&(dt=2),a===null)return!0;c=Yn(c,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=_f(o.stateNode,c,n),rf(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"&&(Is===null||!Is.has(v))))return o.flags|=65536,p&=-p,o.lanes|=p,p=zy(p),Vy(p,n,o,c),rf(o,p),!1}o=o.return}while(o!==null);return!1}var Of=Error(i(461)),Ct=!1;function qt(n,a,o,c){a.child=n===null?Iv(a,null,o,c):Ci(a,n.child,o,c)}function By(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 xi(a),c=hf(n,a,o,w,v,p),N=mf(),n!==null&&!Ct?(pf(n,a,p),ts(n,a,p)):(Ue&&N&&Yd(a),a.flags|=1,qt(n,a,c,p),a.child)}function Uy(n,a,o,c,p){if(n===null){var v=o.type;return typeof v=="function"&&!qd(v)&&v.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=v,Hy(n,a,v,c,p)):(n=Jl(o.type,null,c,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(v=n.child,!Uf(n,p)){var w=v.memoizedProps;if(o=o.compare,o=o!==null?o:xr,o(w,c)&&n.ref===a.ref)return ts(n,a,p)}return a.flags|=1,n=Xa(v,c),n.ref=a.ref,n.return=a,a.child=n}function Hy(n,a,o,c,p){if(n!==null){var v=n.memoizedProps;if(xr(v,c)&&n.ref===a.ref)if(Ct=!1,a.pendingProps=c=v,Uf(n,p))(n.flags&131072)!==0&&(Ct=!0);else return a.lanes=n.lanes,ts(n,a,p)}return Df(n,a,o,c,p)}function Iy(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 Fy(n,a,v,o,c)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&ac(a,v!==null?v.cachePool:null),v!==null?$v(a,v):cf(),Kv(a);else return c=a.lanes=536870912,Fy(n,a,v!==null?v.baseLanes|o:o,o,c)}else v!==null?(ac(a,v.cachePool),$v(a,v),Vs(),a.memoizedState=null):(n!==null&&ac(a,null),cf(),Vs());return qt(n,a,p,o),a.child}function Pr(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Fy(n,a,o,c,p){var v=nf();return v=v===null?null:{parent:St._currentValue,pool:v},a.memoizedState={baseLanes:o,cachePool:v},n!==null&&ac(a,null),cf(),Kv(a),n!==null&&uo(n,a,c,!0),a.childLanes=p,null}function xc(n,a){return a=Sc({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function qy(n,a,o){return Ci(a,n.child,null,o),n=xc(a,a.pendingProps),n.flags|=2,Dn(a),a.memoizedState=null,n}function Oj(n,a,o){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(Ue){if(c.mode==="hidden")return n=xc(a,c),a.lanes=536870912,Pr(null,n);if(df(a),(n=tt)?(n=nb(n,Zn),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ms!==null?{id:Aa,overflow:ja}:null,retryLane:536870912,hydrationErrors:null},o=jv(n),o.return=a,a.child=o,It=a,tt=null)):n=null,n===null)throw Os(a);return a.lanes=536870912,null}return xc(a,c)}var v=n.memoizedState;if(v!==null){var w=v.dehydrated;if(df(a),p)if(a.flags&256)a.flags&=-257,a=qy(n,a,o);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(Ct||uo(n,a,o,!1),p=(o&n.childLanes)!==0,Ct||p){if(c=Qe,c!==null&&(w=Wt(c,o),w!==0&&w!==v.retryLane))throw v.retryLane=w,pi(n,w),xn(c,n,w),Of;Mc(),a=qy(n,a,o)}else n=v.treeContext,tt=Wn(w.nextSibling),It=a,Ue=!0,_s=null,Zn=!1,n!==null&&Mv(a,n),a=xc(a,c),a.flags|=4096;return a}return n=Xa(n.child,{mode:c.mode,children:c.children}),n.ref=a.ref,a.child=n,n.return=a,n}function bc(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 Df(n,a,o,c,p){return xi(a),o=hf(n,a,o,c,void 0,p),c=mf(),n!==null&&!Ct?(pf(n,a,p),ts(n,a,p)):(Ue&&c&&Yd(a),a.flags|=1,qt(n,a,o,p),a.child)}function $y(n,a,o,c,p,v){return xi(a),a.updateQueue=null,o=Gv(a,c,o,p),Yv(n),c=mf(),n!==null&&!Ct?(pf(n,a,v),ts(n,a,v)):(Ue&&c&&Yd(a),a.flags|=1,qt(n,a,o,v),a.child)}function Ky(n,a,o,c,p){if(xi(a),a.stateNode===null){var v=oo,w=o.contextType;typeof w=="object"&&w!==null&&(v=Ft(w)),v=new o(c,v),a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Mf,a.stateNode=v,v._reactInternals=a,v=a.stateNode,v.props=c,v.state=a.memoizedState,v.refs={},sf(a),w=o.contextType,v.context=typeof w=="object"&&w!==null?Ft(w):oo,v.state=a.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(Rf(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&&Mf.enqueueReplaceState(v,v.state,null),Rr(a,c,v,p),Nr(),v.state=a.memoizedState),typeof v.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(n===null){v=a.stateNode;var N=a.memoizedProps,k=Ei(o,N);v.props=k;var q=v.context,Q=o.contextType;w=oo,typeof Q=="object"&&Q!==null&&(w=Ft(Q));var ee=o.getDerivedStateFromProps;Q=typeof ee=="function"||typeof v.getSnapshotBeforeUpdate=="function",N=a.pendingProps!==N,Q||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(N||q!==w)&&Oy(a,v,c,w),Ps=!1;var $=a.memoizedState;v.state=$,Rr(a,c,v,p),Nr(),q=a.memoizedState,N||$!==q||Ps?(typeof ee=="function"&&(Rf(a,o,ee,c),q=a.memoizedState),(k=Ps||_y(a,o,k,c,$,q,w))?(Q||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=q),v.props=c,v.state=q,v.context=w,c=k):(typeof v.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{v=a.stateNode,of(n,a),w=a.memoizedProps,Q=Ei(o,w),v.props=Q,ee=a.pendingProps,$=v.context,q=o.contextType,k=oo,typeof q=="object"&&q!==null&&(k=Ft(q)),N=o.getDerivedStateFromProps,(q=typeof N=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(w!==ee||$!==k)&&Oy(a,v,c,k),Ps=!1,$=a.memoizedState,v.state=$,Rr(a,c,v,p),Nr();var Y=a.memoizedState;w!==ee||$!==Y||Ps||n!==null&&n.dependencies!==null&&tc(n.dependencies)?(typeof N=="function"&&(Rf(a,o,N,c),Y=a.memoizedState),(Q=Ps||_y(a,o,Q,c,$,Y,k)||n!==null&&n.dependencies!==null&&tc(n.dependencies))?(q||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(c,Y,k),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(c,Y,k)),typeof v.componentDidUpdate=="function"&&(a.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof v.componentDidUpdate!="function"||w===n.memoizedProps&&$===n.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&$===n.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=Y),v.props=c,v.state=Y,v.context=k,c=Q):(typeof v.componentDidUpdate!="function"||w===n.memoizedProps&&$===n.memoizedState||(a.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&$===n.memoizedState||(a.flags|=1024),c=!1)}return v=c,bc(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=Ci(a,n.child,null,p),a.child=Ci(a,null,o,p)):qt(n,a,o,p),a.memoizedState=v.state,n=a.child):n=ts(n,a,p),n}function Yy(n,a,o,c){return vi(),a.flags|=256,qt(n,a,o,c),a.child}var Pf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kf(n){return{baseLanes:n,cachePool:Lv()}}function Lf(n,a,o){return n=n!==null?n.childLanes&~o:0,a&&(n|=kn),n}function Gy(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:(vt.current&2)!==0),w&&(p=!0,a.flags&=-129),w=(a.flags&32)!==0,a.flags&=-33,n===null){if(Ue){if(p?zs(a):Vs(),(n=tt)?(n=nb(n,Zn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ms!==null?{id:Aa,overflow:ja}:null,retryLane:536870912,hydrationErrors:null},o=jv(n),o.return=a,a.child=o,It=a,tt=null)):n=null,n===null)throw Os(a);return yh(n)?a.lanes=32:a.lanes=536870912,null}var N=c.children;return c=c.fallback,p?(Vs(),p=a.mode,N=Sc({mode:"hidden",children:N},p),c=gi(c,p,o,null),N.return=a,c.return=a,N.sibling=c,a.child=N,c=a.child,c.memoizedState=kf(o),c.childLanes=Lf(n,w,o),a.memoizedState=Pf,Pr(null,c)):(zs(a),zf(a,N))}var k=n.memoizedState;if(k!==null&&(N=k.dehydrated,N!==null)){if(v)a.flags&256?(zs(a),a.flags&=-257,a=Vf(n,a,o)):a.memoizedState!==null?(Vs(),a.child=n.child,a.flags|=128,a=null):(Vs(),N=c.fallback,p=a.mode,c=Sc({mode:"visible",children:c.children},p),N=gi(N,p,o,null),N.flags|=2,c.return=a,N.return=a,c.sibling=N,a.child=c,Ci(a,n.child,null,o),c=a.child,c.memoizedState=kf(o),c.childLanes=Lf(n,w,o),a.memoizedState=Pf,a=Pr(null,c));else if(zs(a),yh(N)){if(w=N.nextSibling&&N.nextSibling.dataset,w)var q=w.dgst;w=q,c=Error(i(419)),c.stack="",c.digest=w,wr({value:c,source:null,stack:null}),a=Vf(n,a,o)}else if(Ct||uo(n,a,o,!1),w=(o&n.childLanes)!==0,Ct||w){if(w=Qe,w!==null&&(c=Wt(w,o),c!==0&&c!==k.retryLane))throw k.retryLane=c,pi(n,c),xn(w,n,c),Of;vh(N)||Mc(),a=Vf(n,a,o)}else vh(N)?(a.flags|=192,a.child=n.child,a=null):(n=k.treeContext,tt=Wn(N.nextSibling),It=a,Ue=!0,_s=null,Zn=!1,n!==null&&Mv(a,n),a=zf(a,c.children),a.flags|=4096);return a}return p?(Vs(),N=c.fallback,p=a.mode,k=n.child,q=k.sibling,c=Xa(k,{mode:"hidden",children:c.children}),c.subtreeFlags=k.subtreeFlags&65011712,q!==null?N=Xa(q,N):(N=gi(N,p,o,null),N.flags|=2),N.return=a,c.return=a,c.sibling=N,a.child=c,Pr(null,c),c=a.child,N=n.child.memoizedState,N===null?N=kf(o):(p=N.cachePool,p!==null?(k=St._currentValue,p=p.parent!==k?{parent:k,pool:k}:p):p=Lv(),N={baseLanes:N.baseLanes|o,cachePool:p}),c.memoizedState=N,c.childLanes=Lf(n,w,o),a.memoizedState=Pf,Pr(n.child,c)):(zs(a),o=n.child,n=o.sibling,o=Xa(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=Sc({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function Sc(n,a){return n=_n(22,n,null,a),n.lanes=0,n}function Vf(n,a,o){return Ci(a,n.child,null,o),n=zf(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function Xy(n,a,o){n.lanes|=a;var c=n.alternate;c!==null&&(c.lanes|=a),Wd(n.return,a,o)}function Bf(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 Zy(n,a,o){var c=a.pendingProps,p=c.revealOrder,v=c.tail;c=c.children;var w=vt.current,N=(w&2)!==0;if(N?(w=w&1|2,a.flags|=128):w&=1,G(vt,w),qt(n,a,c,o),c=Ue?Sr:0,!N&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Xy(n,o,a);else if(n.tag===19)Xy(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&&cc(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),Bf(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&&cc(n)===null){a.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}Bf(a,!0,o,null,v,c);break;case"together":Bf(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function ts(n,a,o){if(n!==null&&(a.dependencies=n.dependencies),Hs|=a.lanes,(o&a.childLanes)===0)if(n!==null){if(uo(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=Xa(n,n.pendingProps),a.child=o,o.return=a;n.sibling!==null;)n=n.sibling,o=o.sibling=Xa(n,n.pendingProps),o.return=a;o.sibling=null}return a.child}function Uf(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&tc(n)))}function Dj(n,a,o){switch(a.tag){case 3:de(a,a.stateNode.containerInfo),Ds(a,St,n.memoizedState.cache),vi();break;case 27:case 5:Ee(a);break;case 4:de(a,a.stateNode.containerInfo);break;case 10:Ds(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,df(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(zs(a),a.flags|=128,null):(o&a.child.childLanes)!==0?Gy(n,a,o):(zs(a),n=ts(n,a,o),n!==null?n.sibling:null);zs(a);break;case 19:var p=(n.flags&128)!==0;if(c=(o&a.childLanes)!==0,c||(uo(n,a,o,!1),c=(o&a.childLanes)!==0),p){if(c)return Zy(n,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),G(vt,vt.current),c)break;return null;case 22:return a.lanes=0,Iy(n,a,o,a.pendingProps);case 24:Ds(a,St,n.memoizedState.cache)}return ts(n,a,o)}function Qy(n,a,o){if(n!==null)if(n.memoizedProps!==a.pendingProps)Ct=!0;else{if(!Uf(n,o)&&(a.flags&128)===0)return Ct=!1,Dj(n,a,o);Ct=(n.flags&131072)!==0}else Ct=!1,Ue&&(a.flags&1048576)!==0&&Rv(a,Sr,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(n=Si(a.elementType),a.type=n,typeof n=="function")qd(n)?(c=Ei(n,c),a.tag=1,a=Ky(null,a,n,c,o)):(a.tag=0,a=Df(null,a,n,c,o));else{if(n!=null){var p=n.$$typeof;if(p===_){a.tag=11,a=By(null,a,n,c,o);break e}else if(p===L){a.tag=14,a=Uy(null,a,n,c,o);break e}}throw a=ne(n)||n,Error(i(306,a,""))}}return a;case 0:return Df(n,a,a.type,a.pendingProps,o);case 1:return c=a.type,p=Ei(c,a.pendingProps),Ky(n,a,c,p,o);case 3:e:{if(de(a,a.stateNode.containerInfo),n===null)throw Error(i(387));c=a.pendingProps;var v=a.memoizedState;p=v.element,of(n,a),Rr(a,c,null,o);var w=a.memoizedState;if(c=w.cache,Ds(a,St,c),c!==v.cache&&Jd(a,[St],o,!0),Nr(),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=Yy(n,a,c,o);break e}else if(c!==p){p=Yn(Error(i(424)),a),wr(p),a=Yy(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,tt=Wn(n.firstChild),It=a,Ue=!0,_s=null,Zn=!0,o=Iv(a,null,c,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(vi(),c===p){a=ts(n,a,o);break e}qt(n,a,c,o)}a=a.child}return a;case 26:return bc(n,a),n===null?(o=lb(a.type,null,a.pendingProps,null))?a.memoizedState=o:Ue||(o=a.type,n=a.pendingProps,c=zc(he.current).createElement(o),c[_t]=a,c[Jt]=n,$t(c,o,n),Bt(c),a.stateNode=c):a.memoizedState=lb(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return Ee(a),n===null&&Ue&&(c=a.stateNode=ib(a.type,a.pendingProps,he.current),It=a,Zn=!0,p=tt,Ks(a.type)?(xh=p,tt=Wn(c.firstChild)):tt=p),qt(n,a,a.pendingProps.children,o),bc(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&Ue&&((p=c=tt)&&(c=cN(c,a.type,a.pendingProps,Zn),c!==null?(a.stateNode=c,It=a,tt=Wn(c.firstChild),Zn=!1,p=!0):p=!1),p||Os(a)),Ee(a),p=a.type,v=a.pendingProps,w=n!==null?n.memoizedProps:null,c=v.children,mh(p,v)?c=null:w!==null&&mh(p,w)&&(a.flags|=32),a.memoizedState!==null&&(p=hf(n,a,Tj,null,null,o),Xr._currentValue=p),bc(n,a),qt(n,a,c,o),a.child;case 6:return n===null&&Ue&&((n=o=tt)&&(o=uN(o,a.pendingProps,Zn),o!==null?(a.stateNode=o,It=a,tt=null,n=!0):n=!1),n||Os(a)),null;case 13:return Gy(n,a,o);case 4:return de(a,a.stateNode.containerInfo),c=a.pendingProps,n===null?a.child=Ci(a,null,c,o):qt(n,a,c,o),a.child;case 11:return By(n,a,a.type,a.pendingProps,o);case 7:return qt(n,a,a.pendingProps,o),a.child;case 8:return qt(n,a,a.pendingProps.children,o),a.child;case 12:return qt(n,a,a.pendingProps.children,o),a.child;case 10:return c=a.pendingProps,Ds(a,a.type,c.value),qt(n,a,c.children,o),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,xi(a),p=Ft(p),c=c(p),a.flags|=1,qt(n,a,c,o),a.child;case 14:return Uy(n,a,a.type,a.pendingProps,o);case 15:return Hy(n,a,a.type,a.pendingProps,o);case 19:return Zy(n,a,o);case 31:return Oj(n,a,o);case 22:return Iy(n,a,o,a.pendingProps);case 24:return xi(a),c=Ft(St),n===null?(p=nf(),p===null&&(p=Qe,v=ef(),p.pooledCache=v,v.refCount++,v!==null&&(p.pooledCacheLanes|=o),p=v),a.memoizedState={parent:c,cache:p},sf(a),Ds(a,St,p)):((n.lanes&o)!==0&&(of(n,a),Rr(a,null,null,o),Nr()),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),Ds(a,St,c)):(c=v.cache,Ds(a,St,c),c!==p.cache&&Jd(a,[St],o,!0))),qt(n,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function ns(n){n.flags|=4}function Hf(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(Tx())n.flags|=8192;else throw wi=ic,af}else n.flags&=-16777217}function Wy(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!hb(a))if(Tx())n.flags|=8192;else throw wi=ic,af}function wc(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?zt():536870912,n.lanes|=a,Co|=a)}function kr(n,a){if(!Ue)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 nt(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 Pj(n,a,o){var c=a.pendingProps;switch(Gd(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(a),null;case 1:return nt(a),null;case 3:return o=a.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Wa(St),Se(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(co(a)?ns(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Zd())),nt(a),null;case 26:var p=a.type,v=a.memoizedState;return n===null?(ns(a),v!==null?(nt(a),Wy(a,v)):(nt(a),Hf(a,p,null,c,o))):v?v!==n.memoizedState?(ns(a),nt(a),Wy(a,v)):(nt(a),a.flags&=-16777217):(n=n.memoizedProps,n!==c&&ns(a),nt(a),Hf(a,p,n,c,o)),null;case 27:if(Ne(a),o=he.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==c&&ns(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return nt(a),null}n=te.current,co(a)?_v(a):(n=ib(p,c,o),a.stateNode=n,ns(a))}return nt(a),null;case 5:if(Ne(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==c&&ns(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return nt(a),null}if(v=te.current,co(a))_v(a);else{var w=zc(he.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[_t]=a,v[Jt]=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($t(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&&ns(a)}}return nt(a),Hf(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,o),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==c&&ns(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(i(166));if(n=he.current,co(a)){if(n=a.stateNode,o=a.memoizedProps,c=null,p=It,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}n[_t]=a,n=!!(n.nodeValue===o||c!==null&&c.suppressHydrationWarning===!0||Gx(n.nodeValue,o)),n||Os(a,!0)}else n=zc(n).createTextNode(c),n[_t]=a,a.stateNode=n}return nt(a),null;case 31:if(o=a.memoizedState,n===null||n.memoizedState!==null){if(c=co(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[_t]=a}else vi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;nt(a),n=!1}else o=Zd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return a.flags&256?(Dn(a),a):(Dn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return nt(a),null;case 13:if(c=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=co(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[_t]=a}else vi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;nt(a),p=!1}else p=Zd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Dn(a),a):(Dn(a),null)}return Dn(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),wc(a,a.updateQueue),nt(a),null);case 4:return Se(),n===null&&ch(a.stateNode.containerInfo),nt(a),null;case 10:return Wa(a.type),nt(a),null;case 19:if(X(vt),c=a.memoizedState,c===null)return nt(a),null;if(p=(a.flags&128)!==0,v=c.rendering,v===null)if(p)kr(c,!1);else{if(dt!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(v=cc(n),v!==null){for(a.flags|=128,kr(c,!1),n=v.updateQueue,a.updateQueue=n,wc(a,n),a.subtreeFlags=0,n=o,o=a.child;o!==null;)Av(o,n),o=o.sibling;return G(vt,vt.current&1|2),Ue&&Za(a,c.treeForkCount),a.child}n=n.sibling}c.tail!==null&&Rt()>jc&&(a.flags|=128,p=!0,kr(c,!1),a.lanes=4194304)}else{if(!p)if(n=cc(v),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,wc(a,n),kr(c,!0),c.tail===null&&c.tailMode==="hidden"&&!v.alternate&&!Ue)return nt(a),null}else 2*Rt()-c.renderingStartTime>jc&&o!==536870912&&(a.flags|=128,p=!0,kr(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=Rt(),n.sibling=null,o=vt.current,G(vt,p?o&1|2:o&1),Ue&&Za(a,c.treeForkCount),n):(nt(a),null);case 22:case 23:return Dn(a),uf(),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&&(nt(a),a.subtreeFlags&6&&(a.flags|=8192)):nt(a),o=a.updateQueue,o!==null&&wc(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&&X(bi),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),Wa(St),nt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function kj(n,a){switch(Gd(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return Wa(St),Se(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return Ne(a),null;case 31:if(a.memoizedState!==null){if(Dn(a),a.alternate===null)throw Error(i(340));vi()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(Dn(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));vi()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return X(vt),null;case 4:return Se(),null;case 10:return Wa(a.type),null;case 22:case 23:return Dn(a),uf(),n!==null&&X(bi),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return Wa(St),null;case 25:return null;default:return null}}function Jy(n,a){switch(Gd(a),a.tag){case 3:Wa(St),Se();break;case 26:case 27:case 5:Ne(a);break;case 4:Se();break;case 31:a.memoizedState!==null&&Dn(a);break;case 13:Dn(a);break;case 19:X(vt);break;case 10:Wa(a.type);break;case 22:case 23:Dn(a),uf(),n!==null&&X(bi);break;case 24:Wa(St)}}function Lr(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){Ye(a,a.return,N)}}function Bs(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 k=o,q=N;try{q()}catch(Q){Ye(p,k,Q)}}}c=c.next}while(c!==v)}}catch(Q){Ye(a,a.return,Q)}}function ex(n){var a=n.updateQueue;if(a!==null){var o=n.stateNode;try{qv(a,o)}catch(c){Ye(n,n.return,c)}}}function tx(n,a,o){o.props=Ei(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(c){Ye(n,a,c)}}function zr(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){Ye(n,a,p)}}function Na(n,a){var o=n.ref,c=n.refCleanup;if(o!==null)if(typeof c=="function")try{c()}catch(p){Ye(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){Ye(n,a,p)}else o.current=null}function nx(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){Ye(n,n.return,p)}}function If(n,a,o){try{var c=n.stateNode;aN(c,n.type,o,a),c[Jt]=a}catch(p){Ye(n,n.return,p)}}function ax(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ks(n.type)||n.tag===4}function Ff(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||ax(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&&Ks(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 qf(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=Ya));else if(c!==4&&(c===27&&Ks(n.type)&&(o=n.stateNode,a=null),n=n.child,n!==null))for(qf(n,a,o),n=n.sibling;n!==null;)qf(n,a,o),n=n.sibling}function Cc(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&&Ks(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(Cc(n,a,o),n=n.sibling;n!==null;)Cc(n,a,o),n=n.sibling}function sx(n){var a=n.stateNode,o=n.memoizedProps;try{for(var c=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);$t(a,c,o),a[_t]=n,a[Jt]=o}catch(v){Ye(n,n.return,v)}}var as=!1,Tt=!1,$f=!1,ix=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function Lj(n,a){if(n=n.containerInfo,fh=qc,n=vv(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,k=-1,q=0,Q=0,ee=n,$=null;t:for(;;){for(var Y;ee!==o||p!==0&&ee.nodeType!==3||(N=w+p),ee!==v||c!==0&&ee.nodeType!==3||(k=w+c),ee.nodeType===3&&(w+=ee.nodeValue.length),(Y=ee.firstChild)!==null;)$=ee,ee=Y;for(;;){if(ee===n)break t;if($===o&&++q===p&&(N=w),$===v&&++Q===c&&(k=w),(Y=ee.nextSibling)!==null)break;ee=$,$=ee.parentNode}ee=Y}o=N===-1||k===-1?null:{start:N,end:k}}else o=null}o=o||{start:0,end:0}}else o=null;for(hh={focusedElem:n,selectionRange:o},qc=!1,Ut=a;Ut!==null;)if(a=Ut,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,Ut=n;else for(;Ut!==null;){switch(a=Ut,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 me=Ei(o.type,p);n=c.getSnapshotBeforeUpdate(me,v),c.__reactInternalSnapshotBeforeUpdate=n}catch(Ce){Ye(o,o.return,Ce)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,o=n.nodeType,o===9)gh(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":gh(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,Ut=n;break}Ut=a.return}}function ox(n,a,o){var c=o.flags;switch(o.tag){case 0:case 11:case 15:is(n,o),c&4&&Lr(5,o);break;case 1:if(is(n,o),c&4)if(n=o.stateNode,a===null)try{n.componentDidMount()}catch(w){Ye(o,o.return,w)}else{var p=Ei(o.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(w){Ye(o,o.return,w)}}c&64&&ex(o),c&512&&zr(o,o.return);break;case 3:if(is(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{qv(n,a)}catch(w){Ye(o,o.return,w)}}break;case 27:a===null&&c&4&&sx(o);case 26:case 5:is(n,o),a===null&&c&4&&nx(o),c&512&&zr(o,o.return);break;case 12:is(n,o);break;case 31:is(n,o),c&4&&cx(n,o);break;case 13:is(n,o),c&4&&ux(n,o),c&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=$j.bind(null,o),dN(n,o))));break;case 22:if(c=o.memoizedState!==null||as,!c){a=a!==null&&a.memoizedState!==null||Tt,p=as;var v=Tt;as=c,(Tt=a)&&!v?os(n,o,(o.subtreeFlags&8772)!==0):is(n,o),as=p,Tt=v}break;case 30:break;default:is(n,o)}}function rx(n){var a=n.alternate;a!==null&&(n.alternate=null,rx(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&ur(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 at=null,pn=!1;function ss(n,a,o){for(o=o.child;o!==null;)lx(n,a,o),o=o.sibling}function lx(n,a,o){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(ca,o)}catch{}switch(o.tag){case 26:Tt||Na(o,a),ss(n,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Tt||Na(o,a);var c=at,p=pn;Ks(o.type)&&(at=o.stateNode,pn=!1),ss(n,a,o),Kr(o.stateNode),at=c,pn=p;break;case 5:Tt||Na(o,a);case 6:if(c=at,p=pn,at=null,ss(n,a,o),at=c,pn=p,at!==null)if(pn)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(o.stateNode)}catch(v){Ye(o,a,v)}else try{at.removeChild(o.stateNode)}catch(v){Ye(o,a,v)}break;case 18:at!==null&&(pn?(n=at,eb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),_o(n)):eb(at,o.stateNode));break;case 4:c=at,p=pn,at=o.stateNode.containerInfo,pn=!0,ss(n,a,o),at=c,pn=p;break;case 0:case 11:case 14:case 15:Bs(2,o,a),Tt||Bs(4,o,a),ss(n,a,o);break;case 1:Tt||(Na(o,a),c=o.stateNode,typeof c.componentWillUnmount=="function"&&tx(o,a,c)),ss(n,a,o);break;case 21:ss(n,a,o);break;case 22:Tt=(c=Tt)||o.memoizedState!==null,ss(n,a,o),Tt=c;break;default:ss(n,a,o)}}function cx(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{_o(n)}catch(o){Ye(a,a.return,o)}}}function ux(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{_o(n)}catch(o){Ye(a,a.return,o)}}function zj(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new ix),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new ix),a;default:throw Error(i(435,n.tag))}}function Tc(n,a){var o=zj(n);a.forEach(function(c){if(!o.has(c)){o.add(c);var p=Kj.bind(null,n,c);c.then(p,p)}})}function gn(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(Ks(N.type)){at=N.stateNode,pn=!1;break e}break;case 5:at=N.stateNode,pn=!1;break e;case 3:case 4:at=N.stateNode.containerInfo,pn=!0;break e}N=N.return}if(at===null)throw Error(i(160));lx(v,w,p),at=null,pn=!1,v=p.alternate,v!==null&&(v.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)dx(a,n),a=a.sibling}var da=null;function dx(n,a){var o=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:gn(a,n),vn(n),c&4&&(Bs(3,n,n.return),Lr(3,n),Bs(5,n,n.return));break;case 1:gn(a,n),vn(n),c&512&&(Tt||o===null||Na(o,o.return)),c&64&&as&&(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=da;if(gn(a,n),vn(n),c&512&&(Tt||o===null||Na(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[Ns]||v[_t]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=p.createElement(c),p.head.insertBefore(v,p.querySelector("head > title"))),$t(v,c,o),v[_t]=n,Bt(v),c=v;break e;case"link":var w=db("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),$t(v,c,o),p.head.appendChild(v);break;case"meta":if(w=db("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),$t(v,c,o),p.head.appendChild(v);break;default:throw Error(i(468,c))}v[_t]=n,Bt(v),c=v}n.stateNode=c}else fb(p,n.type,n.stateNode);else n.stateNode=ub(p,c,n.memoizedProps);else v!==c?(v===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):v.count--,c===null?fb(p,n.type,n.stateNode):ub(p,c,n.memoizedProps)):c===null&&n.stateNode!==null&&If(n,n.memoizedProps,o.memoizedProps)}break;case 27:gn(a,n),vn(n),c&512&&(Tt||o===null||Na(o,o.return)),o!==null&&c&4&&If(n,n.memoizedProps,o.memoizedProps);break;case 5:if(gn(a,n),vn(n),c&512&&(Tt||o===null||Na(o,o.return)),n.flags&32){p=n.stateNode;try{Ji(p,"")}catch(me){Ye(n,n.return,me)}}c&4&&n.stateNode!=null&&(p=n.memoizedProps,If(n,p,o!==null?o.memoizedProps:p)),c&1024&&($f=!0);break;case 6:if(gn(a,n),vn(n),c&4){if(n.stateNode===null)throw Error(i(162));c=n.memoizedProps,o=n.stateNode;try{o.nodeValue=c}catch(me){Ye(n,n.return,me)}}break;case 3:if(Uc=null,p=da,da=Vc(a.containerInfo),gn(a,n),da=p,vn(n),c&4&&o!==null&&o.memoizedState.isDehydrated)try{_o(a.containerInfo)}catch(me){Ye(n,n.return,me)}$f&&($f=!1,fx(n));break;case 4:c=da,da=Vc(n.stateNode.containerInfo),gn(a,n),vn(n),da=c;break;case 12:gn(a,n),vn(n);break;case 31:gn(a,n),vn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Tc(n,c)));break;case 13:gn(a,n),vn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Ac=Rt()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Tc(n,c)));break;case 22:p=n.memoizedState!==null;var k=o!==null&&o.memoizedState!==null,q=as,Q=Tt;if(as=q||p,Tt=Q||k,gn(a,n),Tt=Q,as=q,vn(n),c&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||k||as||Tt||Ai(n)),o=null,a=n;;){if(a.tag===5||a.tag===26){if(o===null){k=o=a;try{if(v=k.stateNode,p)w=v.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{N=k.stateNode;var ee=k.memoizedProps.style,$=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;N.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(me){Ye(k,k.return,me)}}}else if(a.tag===6){if(o===null){k=a;try{k.stateNode.nodeValue=p?"":k.memoizedProps}catch(me){Ye(k,k.return,me)}}}else if(a.tag===18){if(o===null){k=a;try{var Y=k.stateNode;p?tb(Y,!0):tb(k.stateNode,!1)}catch(me){Ye(k,k.return,me)}}}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,Tc(n,o))));break;case 19:gn(a,n),vn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Tc(n,c)));break;case 30:break;case 21:break;default:gn(a,n),vn(n)}}function vn(n){var a=n.flags;if(a&2){try{for(var o,c=n.return;c!==null;){if(ax(c)){o=c;break}c=c.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,v=Ff(n);Cc(n,v,p);break;case 5:var w=o.stateNode;o.flags&32&&(Ji(w,""),o.flags&=-33);var N=Ff(n);Cc(n,N,w);break;case 3:case 4:var k=o.stateNode.containerInfo,q=Ff(n);qf(n,q,k);break;default:throw Error(i(161))}}catch(Q){Ye(n,n.return,Q)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function fx(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;fx(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function is(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)ox(n,a.alternate,a),a=a.sibling}function Ai(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:Bs(4,a,a.return),Ai(a);break;case 1:Na(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&tx(a,a.return,o),Ai(a);break;case 27:Kr(a.stateNode);case 26:case 5:Na(a,a.return),Ai(a);break;case 22:a.memoizedState===null&&Ai(a);break;case 30:Ai(a);break;default:Ai(a)}n=n.sibling}}function os(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:os(p,v,o),Lr(4,v);break;case 1:if(os(p,v,o),c=v,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(q){Ye(c,c.return,q)}if(c=v,p=c.updateQueue,p!==null){var N=c.stateNode;try{var k=p.shared.hiddenCallbacks;if(k!==null)for(p.shared.hiddenCallbacks=null,p=0;p<k.length;p++)Fv(k[p],N)}catch(q){Ye(c,c.return,q)}}o&&w&64&&ex(v),zr(v,v.return);break;case 27:sx(v);case 26:case 5:os(p,v,o),o&&c===null&&w&4&&nx(v),zr(v,v.return);break;case 12:os(p,v,o);break;case 31:os(p,v,o),o&&w&4&&cx(p,v);break;case 13:os(p,v,o),o&&w&4&&ux(p,v);break;case 22:v.memoizedState===null&&os(p,v,o),zr(v,v.return);break;case 30:break;default:os(p,v,o)}a=a.sibling}}function Kf(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&&Cr(o))}function Yf(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&Cr(n))}function fa(n,a,o,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)hx(n,a,o,c),a=a.sibling}function hx(n,a,o,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:fa(n,a,o,c),p&2048&&Lr(9,a);break;case 1:fa(n,a,o,c);break;case 3:fa(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&&Cr(n)));break;case 12:if(p&2048){fa(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(k){Ye(a,a.return,k)}}else fa(n,a,o,c);break;case 31:fa(n,a,o,c);break;case 13:fa(n,a,o,c);break;case 23:break;case 22:v=a.stateNode,w=a.alternate,a.memoizedState!==null?v._visibility&2?fa(n,a,o,c):Vr(n,a):v._visibility&2?fa(n,a,o,c):(v._visibility|=2,bo(n,a,o,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&Kf(w,a);break;case 24:fa(n,a,o,c),p&2048&&Yf(a.alternate,a);break;default:fa(n,a,o,c)}}function bo(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,k=c,q=w.flags;switch(w.tag){case 0:case 11:case 15:bo(v,w,N,k,p),Lr(8,w);break;case 23:break;case 22:var Q=w.stateNode;w.memoizedState!==null?Q._visibility&2?bo(v,w,N,k,p):Vr(v,w):(Q._visibility|=2,bo(v,w,N,k,p)),p&&q&2048&&Kf(w.alternate,w);break;case 24:bo(v,w,N,k,p),p&&q&2048&&Yf(w.alternate,w);break;default:bo(v,w,N,k,p)}a=a.sibling}}function Vr(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:Vr(o,c),p&2048&&Kf(c.alternate,c);break;case 24:Vr(o,c),p&2048&&Yf(c.alternate,c);break;default:Vr(o,c)}a=a.sibling}}var Br=8192;function So(n,a,o){if(n.subtreeFlags&Br)for(n=n.child;n!==null;)mx(n,a,o),n=n.sibling}function mx(n,a,o){switch(n.tag){case 26:So(n,a,o),n.flags&Br&&n.memoizedState!==null&&CN(o,da,n.memoizedState,n.memoizedProps);break;case 5:So(n,a,o);break;case 3:case 4:var c=da;da=Vc(n.stateNode.containerInfo),So(n,a,o),da=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=Br,Br=16777216,So(n,a,o),Br=c):So(n,a,o));break;default:So(n,a,o)}}function px(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 Ur(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];Ut=c,vx(c,n)}px(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)gx(n),n=n.sibling}function gx(n){switch(n.tag){case 0:case 11:case 15:Ur(n),n.flags&2048&&Bs(9,n,n.return);break;case 3:Ur(n);break;case 12:Ur(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Ec(n)):Ur(n);break;default:Ur(n)}}function Ec(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];Ut=c,vx(c,n)}px(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:Bs(8,a,a.return),Ec(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Ec(a));break;default:Ec(a)}n=n.sibling}}function vx(n,a){for(;Ut!==null;){var o=Ut;switch(o.tag){case 0:case 11:case 15:Bs(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:Cr(o.memoizedState.cache)}if(c=o.child,c!==null)c.return=o,Ut=c;else e:for(o=n;Ut!==null;){c=Ut;var p=c.sibling,v=c.return;if(rx(c),c===o){Ut=null;break e}if(p!==null){p.return=v,Ut=p;break e}Ut=v}}}var Vj={getCacheForType:function(n){var a=Ft(St),o=a.data.get(n);return o===void 0&&(o=n(),a.data.set(n,o)),o},cacheSignal:function(){return Ft(St).controller.signal}},Bj=typeof WeakMap=="function"?WeakMap:Map,qe=0,Qe=null,Le=null,Ve=0,Ke=0,Pn=null,Us=!1,wo=!1,Gf=!1,rs=0,dt=0,Hs=0,ji=0,Xf=0,kn=0,Co=0,Hr=null,yn=null,Zf=!1,Ac=0,yx=0,jc=1/0,Nc=null,Is=null,Ot=0,Fs=null,To=null,ls=0,Qf=0,Wf=null,xx=null,Ir=0,Jf=null;function Ln(){return(qe&2)!==0&&Ve!==0?Ve&-Ve:D.T!==null?ih():cr()}function bx(){if(kn===0)if((Ve&536870912)===0||Ue){var n=Ca;Ca<<=1,(Ca&3932160)===0&&(Ca=262144),kn=n}else kn=536870912;return n=On.current,n!==null&&(n.flags|=32),kn}function xn(n,a,o){(n===Qe&&(Ke===2||Ke===9)||n.cancelPendingCommit!==null)&&(Eo(n,0),qs(n,Ve,kn,!1)),et(n,o),((qe&2)===0||n!==Qe)&&(n===Qe&&((qe&2)===0&&(ji|=o),dt===4&&qs(n,Ve,kn,!1)),Ra(n))}function Sx(n,a,o){if((qe&6)!==0)throw Error(i(327));var c=!o&&(a&127)===0&&(a&n.expiredLanes)===0||ke(n,a),p=c?Ij(n,a):th(n,a,!0),v=c;do{if(p===0){wo&&!c&&qs(n,a,0,!1);break}else{if(o=n.current.alternate,v&&!Uj(o)){p=th(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=Hr;var k=N.current.memoizedState.isDehydrated;if(k&&(Eo(N,w).flags|=256),w=th(N,w,!1),w!==2){if(Gf&&!k){N.errorRecoveryDisabledLanes|=v,ji|=v,p=4;break e}v=yn,yn=p,v!==null&&(yn===null?yn=v:yn.push.apply(yn,v))}p=w}if(v=!1,p!==2)continue}}if(p===1){Eo(n,0),qs(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:qs(c,a,kn,!Us);break e;case 2:yn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Ac+300-Rt(),10<p)){if(qs(c,a,kn,!Us),Te(c,0,!0)!==0)break e;ls=a,c.timeoutHandle=Wx(wx.bind(null,c,o,yn,Nc,Zf,a,kn,ji,Co,Us,v,"Throttled",-0,0),p);break e}wx(c,o,yn,Nc,Zf,a,kn,ji,Co,Us,v,null,-0,0)}}break}while(!0);Ra(n)}function wx(n,a,o,c,p,v,w,N,k,q,Q,ee,$,Y){if(n.timeoutHandle=-1,ee=a.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ya},mx(a,v,ee);var me=(v&62914560)===v?Ac-Rt():(v&4194048)===v?yx-Rt():0;if(me=TN(ee,me),me!==null){ls=v,n.cancelPendingCommit=me(Mx.bind(null,n,a,v,o,c,p,w,N,k,Q,ee,null,$,Y)),qs(n,v,w,!q);return}}Mx(n,a,v,o,c,p,w,N,k)}function Uj(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(!Mn(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 qs(n,a,o,c){a&=~Xf,a&=~ji,n.suspendedLanes|=a,n.pingedLanes&=~a,c&&(n.warmLanes|=a),c=n.expirationTimes;for(var p=a;0<p;){var v=31-xt(p),w=1<<v;c[v]=-1,p&=~w}o!==0&&qa(n,o,a)}function Rc(){return(qe&6)===0?(Fr(0),!1):!0}function eh(){if(Le!==null){if(Ke===0)var n=Le.return;else n=Le,Qa=yi=null,gf(n),po=null,Er=0,n=Le;for(;n!==null;)Jy(n.alternate,n),n=n.return;Le=null}}function Eo(n,a){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,oN(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),ls=0,eh(),Qe=n,Le=o=Xa(n.current,null),Ve=a,Ke=0,Pn=null,Us=!1,wo=ke(n,a),Gf=!1,Co=kn=Xf=ji=Hs=dt=0,yn=Hr=null,Zf=!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-xt(c),v=1<<p;a|=n[p],c&=~v}return rs=a,Zl(),o}function Cx(n,a){Re=null,D.H=Dr,a===mo||a===sc?(a=Bv(),Ke=3):a===af?(a=Bv(),Ke=4):Ke=a===Of?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Pn=a,Le===null&&(dt=1,yc(n,Yn(a,n.current)))}function Tx(){var n=On.current;return n===null?!0:(Ve&4194048)===Ve?Qn===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?n===Qn:!1}function Ex(){var n=D.H;return D.H=Dr,n===null?Dr:n}function Ax(){var n=D.A;return D.A=Vj,n}function Mc(){dt=4,Us||(Ve&4194048)!==Ve&&On.current!==null||(wo=!0),(Hs&134217727)===0&&(ji&134217727)===0||Qe===null||qs(Qe,Ve,kn,!1)}function th(n,a,o){var c=qe;qe|=2;var p=Ex(),v=Ax();(Qe!==n||Ve!==a)&&(Nc=null,Eo(n,a)),a=!1;var w=dt;e:do try{if(Ke!==0&&Le!==null){var N=Le,k=Pn;switch(Ke){case 8:eh(),w=6;break e;case 3:case 2:case 9:case 6:On.current===null&&(a=!0);var q=Ke;if(Ke=0,Pn=null,Ao(n,N,k,q),o&&wo){w=0;break e}break;default:q=Ke,Ke=0,Pn=null,Ao(n,N,k,q)}}Hj(),w=dt;break}catch(Q){Cx(n,Q)}while(!0);return a&&n.shellSuspendCounter++,Qa=yi=null,qe=c,D.H=p,D.A=v,Le===null&&(Qe=null,Ve=0,Zl()),w}function Hj(){for(;Le!==null;)jx(Le)}function Ij(n,a){var o=qe;qe|=2;var c=Ex(),p=Ax();Qe!==n||Ve!==a?(Nc=null,jc=Rt()+500,Eo(n,a)):wo=ke(n,a);e:do try{if(Ke!==0&&Le!==null){a=Le;var v=Pn;t:switch(Ke){case 1:Ke=0,Pn=null,Ao(n,a,v,1);break;case 2:case 9:if(zv(v)){Ke=0,Pn=null,Nx(a);break}a=function(){Ke!==2&&Ke!==9||Qe!==n||(Ke=7),Ra(n)},v.then(a,a);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:zv(v)?(Ke=0,Pn=null,Nx(a)):(Ke=0,Pn=null,Ao(n,a,v,7));break;case 5:var w=null;switch(Le.tag){case 26:w=Le.memoizedState;case 5:case 27:var N=Le;if(w?hb(w):N.stateNode.complete){Ke=0,Pn=null;var k=N.sibling;if(k!==null)Le=k;else{var q=N.return;q!==null?(Le=q,_c(q)):Le=null}break t}}Ke=0,Pn=null,Ao(n,a,v,5);break;case 6:Ke=0,Pn=null,Ao(n,a,v,6);break;case 8:eh(),dt=6;break e;default:throw Error(i(462))}}Fj();break}catch(Q){Cx(n,Q)}while(!0);return Qa=yi=null,D.H=c,D.A=p,qe=o,Le!==null?0:(Qe=null,Ve=0,Zl(),dt)}function Fj(){for(;Le!==null&&!Nt();)jx(Le)}function jx(n){var a=Qy(n.alternate,n,rs);n.memoizedProps=n.pendingProps,a===null?_c(n):Le=a}function Nx(n){var a=n,o=a.alternate;switch(a.tag){case 15:case 0:a=$y(o,a,a.pendingProps,a.type,void 0,Ve);break;case 11:a=$y(o,a,a.pendingProps,a.type.render,a.ref,Ve);break;case 5:gf(a);default:Jy(o,a),a=Le=Av(a,rs),a=Qy(o,a,rs)}n.memoizedProps=n.pendingProps,a===null?_c(n):Le=a}function Ao(n,a,o,c){Qa=yi=null,gf(a),po=null,Er=0;var p=a.return;try{if(_j(n,p,a,o,Ve)){dt=1,yc(n,Yn(o,n.current)),Le=null;return}}catch(v){if(p!==null)throw Le=p,v;dt=1,yc(n,Yn(o,n.current)),Le=null;return}a.flags&32768?(Ue||c===1?n=!0:wo||(Ve&536870912)!==0?n=!1:(Us=n=!0,(c===2||c===9||c===3||c===6)&&(c=On.current,c!==null&&c.tag===13&&(c.flags|=16384))),Rx(a,n)):_c(a)}function _c(n){var a=n;do{if((a.flags&32768)!==0){Rx(a,Us);return}n=a.return;var o=Pj(a.alternate,a,rs);if(o!==null){Le=o;return}if(a=a.sibling,a!==null){Le=a;return}Le=a=n}while(a!==null);dt===0&&(dt=5)}function Rx(n,a){do{var o=kj(n.alternate,n);if(o!==null){o.flags&=32767,Le=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(n=n.sibling,n!==null)){Le=n;return}Le=n=o}while(n!==null);dt=6,Le=null}function Mx(n,a,o,c,p,v,w,N,k){n.cancelPendingCommit=null;do Oc();while(Ot!==0);if((qe&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(v=a.lanes|a.childLanes,v|=Id,Zt(n,o,v,w,N,k),n===Qe&&(Le=Qe=null,Ve=0),To=a,Fs=n,ls=o,Qf=v,Wf=p,xx=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,Yj(In,function(){return kx(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=D.T,D.T=null,p=H.p,H.p=2,w=qe,qe|=4;try{Lj(n,a,o)}finally{qe=w,H.p=p,D.T=c}}Ot=1,_x(),Ox(),Dx()}}function _x(){if(Ot===1){Ot=0;var n=Fs,a=To,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=D.T,D.T=null;var c=H.p;H.p=2;var p=qe;qe|=4;try{dx(a,n);var v=hh,w=vv(n.containerInfo),N=v.focusedElem,k=v.selectionRange;if(w!==N&&N&&N.ownerDocument&&gv(N.ownerDocument.documentElement,N)){if(k!==null&&zd(N)){var q=k.start,Q=k.end;if(Q===void 0&&(Q=q),"selectionStart"in N)N.selectionStart=q,N.selectionEnd=Math.min(Q,N.value.length);else{var ee=N.ownerDocument||document,$=ee&&ee.defaultView||window;if($.getSelection){var Y=$.getSelection(),me=N.textContent.length,Ce=Math.min(k.start,me),Ze=k.end===void 0?Ce:Math.min(k.end,me);!Y.extend&&Ce>Ze&&(w=Ze,Ze=Ce,Ce=w);var U=pv(N,Ce),z=pv(N,Ze);if(U&&z&&(Y.rangeCount!==1||Y.anchorNode!==U.node||Y.anchorOffset!==U.offset||Y.focusNode!==z.node||Y.focusOffset!==z.offset)){var F=ee.createRange();F.setStart(U.node,U.offset),Y.removeAllRanges(),Ce>Ze?(Y.addRange(F),Y.extend(z.node,z.offset)):(F.setEnd(z.node,z.offset),Y.addRange(F))}}}}for(ee=[],Y=N;Y=Y.parentNode;)Y.nodeType===1&&ee.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ee.length;N++){var J=ee[N];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}qc=!!fh,hh=fh=null}finally{qe=p,H.p=c,D.T=o}}n.current=a,Ot=2}}function Ox(){if(Ot===2){Ot=0;var n=Fs,a=To,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=D.T,D.T=null;var c=H.p;H.p=2;var p=qe;qe|=4;try{ox(n,a.alternate,a)}finally{qe=p,H.p=c,D.T=o}}Ot=3}}function Dx(){if(Ot===4||Ot===3){Ot=0,Hn();var n=Fs,a=To,o=ls,c=xx;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Ot=5:(Ot=0,To=Fs=null,Px(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Is=null),Rn(o),a=a.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(ca,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=D.T,p=H.p,H.p=2,D.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{D.T=a,H.p=p}}(ls&3)!==0&&Oc(),Ra(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===Jf?Ir++:(Ir=0,Jf=n):Ir=0,Fr(0)}}function Px(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,Cr(a)))}function Oc(){return _x(),Ox(),Dx(),kx()}function kx(){if(Ot!==5)return!1;var n=Fs,a=Qf;Qf=0;var o=Rn(ls),c=D.T,p=H.p;try{H.p=32>o?32:o,D.T=null,o=Wf,Wf=null;var v=Fs,w=ls;if(Ot=0,To=Fs=null,ls=0,(qe&6)!==0)throw Error(i(331));var N=qe;if(qe|=4,gx(v.current),hx(v,v.current,w,o),qe=N,Fr(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(ca,v)}catch{}return!0}finally{H.p=p,D.T=c,Px(n,a)}}function Lx(n,a,o){a=Yn(o,a),a=_f(n.stateNode,a,2),n=Ls(n,a,2),n!==null&&(et(n,2),Ra(n))}function Ye(n,a,o){if(n.tag===3)Lx(n,n,o);else for(;a!==null;){if(a.tag===3){Lx(a,n,o);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Is===null||!Is.has(c))){n=Yn(o,n),o=zy(2),c=Ls(a,o,2),c!==null&&(Vy(o,c,a,n),et(c,2),Ra(c));break}}a=a.return}}function nh(n,a,o){var c=n.pingCache;if(c===null){c=n.pingCache=new Bj;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)||(Gf=!0,p.add(o),n=qj.bind(null,n,a,o),a.then(n,n))}function qj(n,a,o){var c=n.pingCache;c!==null&&c.delete(a),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,Qe===n&&(Ve&o)===o&&(dt===4||dt===3&&(Ve&62914560)===Ve&&300>Rt()-Ac?(qe&2)===0&&Eo(n,0):Xf|=o,Co===Ve&&(Co=0)),Ra(n)}function zx(n,a){a===0&&(a=zt()),n=pi(n,a),n!==null&&(et(n,a),Ra(n))}function $j(n){var a=n.memoizedState,o=0;a!==null&&(o=a.retryLane),zx(n,o)}function Kj(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),zx(n,o)}function Yj(n,a){return Ua(n,a)}var Dc=null,jo=null,ah=!1,Pc=!1,sh=!1,$s=0;function Ra(n){n!==jo&&n.next===null&&(jo===null?Dc=jo=n:jo=jo.next=n),Pc=!0,ah||(ah=!0,Xj())}function Fr(n,a){if(!sh&&Pc){sh=!0;do for(var o=!1,c=Dc;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-xt(42|n)+1)-1,v&=p&~(w&~N),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(o=!0,Hx(c,v))}else v=Ve,v=Te(c,c===Qe?v:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(v&3)===0||ke(c,v)||(o=!0,Hx(c,v));c=c.next}while(o);sh=!1}}function Gj(){Vx()}function Vx(){Pc=ah=!1;var n=0;$s!==0&&iN()&&(n=$s);for(var a=Rt(),o=null,c=Dc;c!==null;){var p=c.next,v=Bx(c,a);v===0?(c.next=null,o===null?Dc=p:o.next=p,p===null&&(jo=o)):(o=c,(n!==0||(v&3)!==0)&&(Pc=!0)),c=p}Ot!==0&&Ot!==5||Fr(n),$s!==0&&($s=0)}function Bx(n,a){for(var o=n.suspendedLanes,c=n.pingedLanes,p=n.expirationTimes,v=n.pendingLanes&-62914561;0<v;){var w=31-xt(v),N=1<<w,k=p[w];k===-1?((N&o)===0||(N&c)!==0)&&(p[w]=bt(N,a)):k<=a&&(n.expiredLanes|=N),v&=~N}if(a=Qe,o=Ve,o=Te(n,n===a?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,o===0||n===a&&(Ke===2||Ke===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Ha(c),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||ke(n,o)){if(a=o&-o,a===n.callbackPriority)return a;switch(c!==null&&Ha(c),Rn(o)){case 2:case 8:o=la;break;case 32:o=In;break;case 268435456:o=Nn;break;default:o=In}return c=Ux.bind(null,n),o=Ua(o,c),n.callbackPriority=a,n.callbackNode=o,a}return c!==null&&c!==null&&Ha(c),n.callbackPriority=2,n.callbackNode=null,2}function Ux(n,a){if(Ot!==0&&Ot!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(Oc()&&n.callbackNode!==o)return null;var c=Ve;return c=Te(n,n===Qe?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(Sx(n,c,a),Bx(n,Rt()),n.callbackNode!=null&&n.callbackNode===o?Ux.bind(null,n):null)}function Hx(n,a){if(Oc())return null;Sx(n,a,!0)}function Xj(){rN(function(){(qe&6)!==0?Ua(fn,Gj):Vx()})}function ih(){if($s===0){var n=fo;n===0&&(n=lt,lt<<=1,(lt&261888)===0&&(lt=256)),$s=n}return $s}function Ix(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Il(""+n)}function Fx(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 Zj(n,a,o,c,p){if(a==="submit"&&o&&o.stateNode===p){var v=Ix((p[Jt]||null).action),w=c.submitter;w&&(a=(a=w[Jt]||null)?Ix(a.formAction):w.getAttribute("formAction"),a!==null&&(v=a,w=null));var N=new Kl("action","action",null,c,p);n.push({event:N,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if($s!==0){var k=w?Fx(p,w):new FormData(p);Ef(o,{pending:!0,data:k,method:p.method,action:v},null,k)}}else typeof v=="function"&&(N.preventDefault(),k=w?Fx(p,w):new FormData(p),Ef(o,{pending:!0,data:k,method:p.method,action:v},v,k))},currentTarget:p}]})}}for(var oh=0;oh<Hd.length;oh++){var rh=Hd[oh],Qj=rh.toLowerCase(),Wj=rh[0].toUpperCase()+rh.slice(1);ua(Qj,"on"+Wj)}ua(bv,"onAnimationEnd"),ua(Sv,"onAnimationIteration"),ua(wv,"onAnimationStart"),ua("dblclick","onDoubleClick"),ua("focusin","onFocus"),ua("focusout","onBlur"),ua(mj,"onTransitionRun"),ua(pj,"onTransitionStart"),ua(gj,"onTransitionCancel"),ua(Cv,"onTransitionEnd"),Qi("onMouseEnter",["mouseout","mouseover"]),Qi("onMouseLeave",["mouseout","mouseover"]),Qi("onPointerEnter",["pointerout","pointerover"]),Qi("onPointerLeave",["pointerout","pointerover"]),di("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),di("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),di("onBeforeInput",["compositionend","keypress","textInput","paste"]),di("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),di("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),di("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="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(" "),Jj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qr));function qx(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],k=N.instance,q=N.currentTarget;if(N=N.listener,k!==v&&p.isPropagationStopped())break e;v=N,p.currentTarget=q;try{v(p)}catch(Q){Xl(Q)}p.currentTarget=null,v=k}else for(w=0;w<c.length;w++){if(N=c[w],k=N.instance,q=N.currentTarget,N=N.listener,k!==v&&p.isPropagationStopped())break e;v=N,p.currentTarget=q;try{v(p)}catch(Q){Xl(Q)}p.currentTarget=null,v=k}}}}function ze(n,a){var o=a[xe];o===void 0&&(o=a[xe]=new Set);var c=n+"__bubble";o.has(c)||($x(a,n,2,!1),o.add(c))}function lh(n,a,o){var c=0;a&&(c|=4),$x(o,n,c,a)}var kc="_reactListening"+Math.random().toString(36).slice(2);function ch(n){if(!n[kc]){n[kc]=!0,Vg.forEach(function(o){o!=="selectionchange"&&(Jj.has(o)||lh(o,!1,n),lh(o,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[kc]||(a[kc]=!0,lh("selectionchange",!1,a))}}function $x(n,a,o,c){switch(bb(a)){case 2:var p=jN;break;case 8:p=NN;break;default:p=Th}o=p.bind(null,a,o,n),p=void 0,!Nd||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 uh(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 k=w.tag;if((k===3||k===4)&&w.stateNode.containerInfo===p)return;w=w.return}for(;N!==null;){if(w=$a(N),w===null)return;if(k=w.tag,k===5||k===6||k===26||k===27){c=v=w;continue e}N=N.parentNode}}c=c.return}Zg(function(){var q=v,Q=Ad(o),ee=[];e:{var $=Tv.get(n);if($!==void 0){var Y=Kl,me=n;switch(n){case"keypress":if(ql(o)===0)break e;case"keydown":case"keyup":Y=KA;break;case"focusin":me="focus",Y=Od;break;case"focusout":me="blur",Y=Od;break;case"beforeblur":case"afterblur":Y=Od;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":Y=Jg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=PA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=XA;break;case bv:case Sv:case wv:Y=zA;break;case Cv:Y=QA;break;case"scroll":case"scrollend":Y=OA;break;case"wheel":Y=JA;break;case"copy":case"cut":case"paste":Y=BA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=tv;break;case"toggle":case"beforetoggle":Y=tj}var Ce=(a&4)!==0,Ze=!Ce&&(n==="scroll"||n==="scrollend"),U=Ce?$!==null?$+"Capture":null:$;Ce=[];for(var z=q,F;z!==null;){var J=z;if(F=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||F===null||U===null||(J=fr(z,U),J!=null&&Ce.push($r(z,J,F))),Ze)break;z=z.return}0<Ce.length&&($=new Y($,me,null,o,Q),ee.push({event:$,listeners:Ce}))}}if((a&7)===0){e:{if($=n==="mouseover"||n==="pointerover",Y=n==="mouseout"||n==="pointerout",$&&o!==Ed&&(me=o.relatedTarget||o.fromElement)&&($a(me)||me[As]))break e;if((Y||$)&&($=Q.window===Q?Q:($=Q.ownerDocument)?$.defaultView||$.parentWindow:window,Y?(me=o.relatedTarget||o.toElement,Y=q,me=me?$a(me):null,me!==null&&(Ze=l(me),Ce=me.tag,me!==Ze||Ce!==5&&Ce!==27&&Ce!==6)&&(me=null)):(Y=null,me=q),Y!==me)){if(Ce=Jg,J="onMouseLeave",U="onMouseEnter",z="mouse",(n==="pointerout"||n==="pointerover")&&(Ce=tv,J="onPointerLeave",U="onPointerEnter",z="pointer"),Ze=Y==null?$:dr(Y),F=me==null?$:dr(me),$=new Ce(J,z+"leave",Y,o,Q),$.target=Ze,$.relatedTarget=F,J=null,$a(Q)===q&&(Ce=new Ce(U,z+"enter",me,o,Q),Ce.target=F,Ce.relatedTarget=Ze,J=Ce),Ze=J,Y&&me)t:{for(Ce=eN,U=Y,z=me,F=0,J=U;J;J=Ce(J))F++;J=0;for(var be=z;be;be=Ce(be))J++;for(;0<F-J;)U=Ce(U),F--;for(;0<J-F;)z=Ce(z),J--;for(;F--;){if(U===z||z!==null&&U===z.alternate){Ce=U;break t}U=Ce(U),z=Ce(z)}Ce=null}else Ce=null;Y!==null&&Kx(ee,$,Y,Ce,!1),me!==null&&Ze!==null&&Kx(ee,Ze,me,Ce,!0)}}e:{if($=q?dr(q):window,Y=$.nodeName&&$.nodeName.toLowerCase(),Y==="select"||Y==="input"&&$.type==="file")var Ie=cv;else if(rv($))if(uv)Ie=dj;else{Ie=cj;var ve=lj}else Y=$.nodeName,!Y||Y.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?q&&Td(q.elementType)&&(Ie=cv):Ie=uj;if(Ie&&(Ie=Ie(n,q))){lv(ee,Ie,o,Q);break e}ve&&ve(n,$,q),n==="focusout"&&q&&$.type==="number"&&q.memoizedProps.value!=null&&Cd($,"number",$.value)}switch(ve=q?dr(q):window,n){case"focusin":(rv(ve)||ve.contentEditable==="true")&&(ao=ve,Vd=q,br=null);break;case"focusout":br=Vd=ao=null;break;case"mousedown":Bd=!0;break;case"contextmenu":case"mouseup":case"dragend":Bd=!1,yv(ee,o,Q);break;case"selectionchange":if(hj)break;case"keydown":case"keyup":yv(ee,o,Q)}var Me;if(Pd)e:{switch(n){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else no?iv(n,o)&&(Be="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(Be="onCompositionStart");Be&&(nv&&o.locale!=="ko"&&(no||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&no&&(Me=Qg()):(Rs=Q,Rd="value"in Rs?Rs.value:Rs.textContent,no=!0)),ve=Lc(q,Be),0<ve.length&&(Be=new ev(Be,n,null,o,Q),ee.push({event:Be,listeners:ve}),Me?Be.data=Me:(Me=ov(o),Me!==null&&(Be.data=Me)))),(Me=aj?sj(n,o):ij(n,o))&&(Be=Lc(q,"onBeforeInput"),0<Be.length&&(ve=new ev("onBeforeInput","beforeinput",null,o,Q),ee.push({event:ve,listeners:Be}),ve.data=Me)),Zj(ee,n,q,o,Q)}qx(ee,a)})}function $r(n,a,o){return{instance:n,listener:a,currentTarget:o}}function Lc(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=fr(n,o),p!=null&&c.unshift($r(n,p,v)),p=fr(n,a),p!=null&&c.push($r(n,p,v))),n.tag===3)return c;n=n.return}return[]}function eN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Kx(n,a,o,c,p){for(var v=a._reactName,w=[];o!==null&&o!==c;){var N=o,k=N.alternate,q=N.stateNode;if(N=N.tag,k!==null&&k===c)break;N!==5&&N!==26&&N!==27||q===null||(k=q,p?(q=fr(o,v),q!=null&&w.unshift($r(o,q,k))):p||(q=fr(o,v),q!=null&&w.push($r(o,q,k)))),o=o.return}w.length!==0&&n.push({event:a,listeners:w})}var tN=/\r\n?/g,nN=/\u0000|\uFFFD/g;function Yx(n){return(typeof n=="string"?n:""+n).replace(tN,`
|
|
9
|
+
`).replace(nN,"")}function Gx(n,a){return a=Yx(a),Yx(n)===a}function Xe(n,a,o,c,p,v){switch(o){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||Ji(n,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&Ji(n,""+c);break;case"className":Ul(n,"class",c);break;case"tabIndex":Ul(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Ul(n,o,c);break;case"style":Gg(n,c,v);break;case"data":if(a!=="object"){Ul(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=Il(""+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"&&Xe(n,a,"name",p.name,p,null),Xe(n,a,"formEncType",p.formEncType,p,null),Xe(n,a,"formMethod",p.formMethod,p,null),Xe(n,a,"formTarget",p.formTarget,p,null)):(Xe(n,a,"encType",p.encType,p,null),Xe(n,a,"method",p.method,p,null),Xe(n,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(o);break}c=Il(""+c),n.setAttribute(o,c);break;case"onClick":c!=null&&(n.onclick=Ya);break;case"onScroll":c!=null&&ze("scroll",n);break;case"onScrollEnd":c!=null&&ze("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=Il(""+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":ze("beforetoggle",n),ze("toggle",n),Bl(n,"popover",c);break;case"xlinkActuate":Ka(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Ka(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Ka(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Ka(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Ka(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Ka(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Ka(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Ka(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Ka(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Bl(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=MA.get(o)||o,Bl(n,o,c))}}function dh(n,a,o,c,p,v){switch(o){case"style":Gg(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"?Ji(n,c):(typeof c=="number"||typeof c=="bigint")&&Ji(n,""+c);break;case"onScroll":c!=null&&ze("scroll",n);break;case"onScrollEnd":c!=null&&ze("scrollend",n);break;case"onClick":c!=null&&(n.onclick=Ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Bg.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[Jt]||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,""):Bl(n,o,c)}}}function $t(n,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",n),ze("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:Xe(n,a,v,w,o,null)}}p&&Xe(n,a,"srcSet",o.srcSet,o,null),c&&Xe(n,a,"src",o.src,o,null);return;case"input":ze("invalid",n);var N=v=w=p=null,k=null,q=null;for(c in o)if(o.hasOwnProperty(c)){var Q=o[c];if(Q!=null)switch(c){case"name":p=Q;break;case"type":w=Q;break;case"checked":k=Q;break;case"defaultChecked":q=Q;break;case"value":v=Q;break;case"defaultValue":N=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(i(137,a));break;default:Xe(n,a,c,Q,o,null)}}qg(n,v,N,k,q,w,p,!1);return;case"select":ze("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:Xe(n,a,p,N,o,null)}a=v,o=w,n.multiple=!!c,a!=null?Wi(n,!!c,a,!1):o!=null&&Wi(n,!!c,o,!0);return;case"textarea":ze("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:Xe(n,a,w,N,o,null)}Kg(n,c,p,v);return;case"option":for(k in o)o.hasOwnProperty(k)&&(c=o[k],c!=null)&&(k==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":Xe(n,a,k,c,o,null));return;case"dialog":ze("beforetoggle",n),ze("toggle",n),ze("cancel",n),ze("close",n);break;case"iframe":case"object":ze("load",n);break;case"video":case"audio":for(c=0;c<qr.length;c++)ze(qr[c],n);break;case"image":ze("error",n),ze("load",n);break;case"details":ze("toggle",n);break;case"embed":case"source":case"link":ze("error",n),ze("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(q in o)if(o.hasOwnProperty(q)&&(c=o[q],c!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Xe(n,a,q,c,o,null)}return;default:if(Td(a)){for(Q in o)o.hasOwnProperty(Q)&&(c=o[Q],c!==void 0&&dh(n,a,Q,c,o,void 0));return}}for(N in o)o.hasOwnProperty(N)&&(c=o[N],c!=null&&Xe(n,a,N,c,o,null))}function aN(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,k=null,q=null,Q=null;for(Y in o){var ee=o[Y];if(o.hasOwnProperty(Y)&&ee!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":k=ee;default:c.hasOwnProperty(Y)||Xe(n,a,Y,null,c,ee)}}for(var $ in c){var Y=c[$];if(ee=o[$],c.hasOwnProperty($)&&(Y!=null||ee!=null))switch($){case"type":v=Y;break;case"name":p=Y;break;case"checked":q=Y;break;case"defaultChecked":Q=Y;break;case"value":w=Y;break;case"defaultValue":N=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,a));break;default:Y!==ee&&Xe(n,a,$,Y,c,ee)}}wd(n,w,N,k,q,Q,v,p);return;case"select":Y=w=N=$=null;for(v in o)if(k=o[v],o.hasOwnProperty(v)&&k!=null)switch(v){case"value":break;case"multiple":Y=k;default:c.hasOwnProperty(v)||Xe(n,a,v,null,c,k)}for(p in c)if(v=c[p],k=o[p],c.hasOwnProperty(p)&&(v!=null||k!=null))switch(p){case"value":$=v;break;case"defaultValue":N=v;break;case"multiple":w=v;default:v!==k&&Xe(n,a,p,v,c,k)}a=N,o=w,c=Y,$!=null?Wi(n,!!o,$,!1):!!c!=!!o&&(a!=null?Wi(n,!!o,a,!0):Wi(n,!!o,o?[]:"",!1));return;case"textarea":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:Xe(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":$=p;break;case"defaultValue":Y=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==v&&Xe(n,a,w,p,c,v)}$g(n,$,Y);return;case"option":for(var me in o)$=o[me],o.hasOwnProperty(me)&&$!=null&&!c.hasOwnProperty(me)&&(me==="selected"?n.selected=!1:Xe(n,a,me,null,c,$));for(k in c)$=c[k],Y=o[k],c.hasOwnProperty(k)&&$!==Y&&($!=null||Y!=null)&&(k==="selected"?n.selected=$&&typeof $!="function"&&typeof $!="symbol":Xe(n,a,k,$,c,Y));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 Ce in o)$=o[Ce],o.hasOwnProperty(Ce)&&$!=null&&!c.hasOwnProperty(Ce)&&Xe(n,a,Ce,null,c,$);for(q in c)if($=c[q],Y=o[q],c.hasOwnProperty(q)&&$!==Y&&($!=null||Y!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(i(137,a));break;default:Xe(n,a,q,$,c,Y)}return;default:if(Td(a)){for(var Ze in o)$=o[Ze],o.hasOwnProperty(Ze)&&$!==void 0&&!c.hasOwnProperty(Ze)&&dh(n,a,Ze,void 0,c,$);for(Q in c)$=c[Q],Y=o[Q],!c.hasOwnProperty(Q)||$===Y||$===void 0&&Y===void 0||dh(n,a,Q,$,c,Y);return}}for(var U in o)$=o[U],o.hasOwnProperty(U)&&$!=null&&!c.hasOwnProperty(U)&&Xe(n,a,U,null,c,$);for(ee in c)$=c[ee],Y=o[ee],!c.hasOwnProperty(ee)||$===Y||$==null&&Y==null||Xe(n,a,ee,$,c,Y)}function Xx(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sN(){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&&Xx(w)){for(w=0,N=p.responseEnd,c+=1;c<o.length;c++){var k=o[c],q=k.startTime;if(q>N)break;var Q=k.transferSize,ee=k.initiatorType;Q&&Xx(ee)&&(k=k.responseEnd,w+=Q*(k<N?1:(N-q)/(k-q)))}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 fh=null,hh=null;function zc(n){return n.nodeType===9?n:n.ownerDocument}function Zx(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 Qx(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 mh(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 ph=null;function iN(){var n=window.event;return n&&n.type==="popstate"?n===ph?!1:(ph=n,!0):(ph=null,!1)}var Wx=typeof setTimeout=="function"?setTimeout:void 0,oN=typeof clearTimeout=="function"?clearTimeout:void 0,Jx=typeof Promise=="function"?Promise:void 0,rN=typeof queueMicrotask=="function"?queueMicrotask:typeof Jx<"u"?function(n){return Jx.resolve(null).then(n).catch(lN)}:Wx;function lN(n){setTimeout(function(){throw n})}function Ks(n){return n==="head"}function eb(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),_o(a);return}c--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")c++;else if(o==="html")Kr(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,Kr(o);for(var v=o.firstChild;v;){var w=v.nextSibling,N=v.nodeName;v[Ns]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&v.rel.toLowerCase()==="stylesheet"||o.removeChild(v),v=w}}else o==="body"&&Kr(n.ownerDocument.body);o=p}while(o);_o(a)}function tb(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 gh(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":gh(o),ur(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function cN(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[Ns])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=Wn(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=Wn(n.nextSibling),n===null))return null;return n}function nb(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Wn(n.nextSibling),n===null))return null;return n}function vh(n){return n.data==="$?"||n.data==="$~"}function yh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function dN(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 Wn(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 xh=null;function ab(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(a===0)return Wn(n.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}n=n.nextSibling}return null}function sb(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 ib(n,a,o){switch(a=zc(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 Kr(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);ur(n)}var Jn=new Map,ob=new Set;function Vc(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var cs=H.d;H.d={f:fN,r:hN,D:mN,C:pN,L:gN,m:vN,X:xN,S:yN,M:bN};function fN(){var n=cs.f(),a=Rc();return n||a}function hN(n){var a=Xi(n);a!==null&&a.tag===5&&a.type==="form"?Cy(a):cs.r(n)}var No=typeof document>"u"?null:document;function rb(n,a,o){var c=No;if(c&&typeof a=="string"&&a){var p=$n(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),ob.has(p)||(ob.add(p),n={rel:n,crossOrigin:o,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),$t(a,"link",n),Bt(a),c.head.appendChild(a)))}}function mN(n){cs.D(n),rb("dns-prefetch",n,null)}function pN(n,a){cs.C(n,a),rb("preconnect",n,a)}function gN(n,a,o){cs.L(n,a,o);var c=No;if(c&&n&&a){var p='link[rel="preload"][as="'+$n(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+$n(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+$n(o.imageSizes)+'"]')):p+='[href="'+$n(n)+'"]';var v=p;switch(a){case"style":v=Ro(n);break;case"script":v=Mo(n)}Jn.has(v)||(n=g({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:n,as:a},o),Jn.set(v,n),c.querySelector(p)!==null||a==="style"&&c.querySelector(Yr(v))||a==="script"&&c.querySelector(Gr(v))||(a=c.createElement("link"),$t(a,"link",n),Bt(a),c.head.appendChild(a)))}}function vN(n,a){cs.m(n,a);var o=No;if(o&&n){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+$n(c)+'"][href="'+$n(n)+'"]',v=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Mo(n)}if(!Jn.has(v)&&(n=g({rel:"modulepreload",href:n},a),Jn.set(v,n),o.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Gr(v)))return}c=o.createElement("link"),$t(c,"link",n),Bt(c),o.head.appendChild(c)}}}function yN(n,a,o){cs.S(n,a,o);var c=No;if(c&&n){var p=Zi(c).hoistableStyles,v=Ro(n);a=a||"default";var w=p.get(v);if(!w){var N={loading:0,preload:null};if(w=c.querySelector(Yr(v)))N.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":a},o),(o=Jn.get(v))&&bh(n,o);var k=w=c.createElement("link");Bt(k),$t(k,"link",n),k._p=new Promise(function(q,Q){k.onload=q,k.onerror=Q}),k.addEventListener("load",function(){N.loading|=1}),k.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Bc(w,a,c)}w={type:"stylesheet",instance:w,count:1,state:N},p.set(v,w)}}}function xN(n,a){cs.X(n,a);var o=No;if(o&&n){var c=Zi(o).hoistableScripts,p=Mo(n),v=c.get(p);v||(v=o.querySelector(Gr(p)),v||(n=g({src:n,async:!0},a),(a=Jn.get(p))&&Sh(n,a),v=o.createElement("script"),Bt(v),$t(v,"link",n),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(p,v))}}function bN(n,a){cs.M(n,a);var o=No;if(o&&n){var c=Zi(o).hoistableScripts,p=Mo(n),v=c.get(p);v||(v=o.querySelector(Gr(p)),v||(n=g({src:n,async:!0,type:"module"},a),(a=Jn.get(p))&&Sh(n,a),v=o.createElement("script"),Bt(v),$t(v,"link",n),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(p,v))}}function lb(n,a,o,c){var p=(p=he.current)?Vc(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=Ro(o.href),o=Zi(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=Ro(o.href);var v=Zi(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(Yr(n)))&&!v._p&&(w.instance=v,w.state.loading=5),Jn.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},Jn.set(n,o),v||SN(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=Mo(o),o=Zi(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 Ro(n){return'href="'+$n(n)+'"'}function Yr(n){return'link[rel="stylesheet"]['+n+"]"}function cb(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function SN(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}),$t(a,"link",o),Bt(a),n.head.appendChild(a))}function Mo(n){return'[src="'+$n(n)+'"]'}function Gr(n){return"script[async]"+n}function ub(n,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var c=n.querySelector('style[data-href~="'+$n(o.href)+'"]');if(c)return a.instance=c,Bt(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"),Bt(c),$t(c,"style",p),Bc(c,o.precedence,n),a.instance=c;case"stylesheet":p=Ro(o.href);var v=n.querySelector(Yr(p));if(v)return a.state.loading|=4,a.instance=v,Bt(v),v;c=cb(o),(p=Jn.get(p))&&bh(c,p),v=(n.ownerDocument||n).createElement("link"),Bt(v);var w=v;return w._p=new Promise(function(N,k){w.onload=N,w.onerror=k}),$t(v,"link",c),a.state.loading|=4,Bc(v,o.precedence,n),a.instance=v;case"script":return v=Mo(o.src),(p=n.querySelector(Gr(v)))?(a.instance=p,Bt(p),p):(c=o,(p=Jn.get(v))&&(c=g({},o),Sh(c,p)),n=n.ownerDocument||n,p=n.createElement("script"),Bt(p),$t(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,Bc(c,o.precedence,n));return a.instance}function Bc(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 bh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function Sh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var Uc=null;function db(n,a,o){if(Uc===null){var c=new Map,p=Uc=new Map;p.set(o,c)}else p=Uc,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[Ns]||v[_t]||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 fb(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 hb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function CN(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=Ro(c.href),v=a.querySelector(Yr(p));if(v){a=v._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=Hc.bind(n),a.then(n,n)),o.state.loading|=4,o.instance=v,Bt(v);return}v=a.ownerDocument||a,c=cb(c),(p=Jn.get(p))&&bh(c,p),v=v.createElement("link"),Bt(v);var w=v;w._p=new Promise(function(N,k){w.onload=N,w.onerror=k}),$t(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=Hc.bind(n),a.addEventListener("load",o),a.addEventListener("error",o))}}var wh=0;function TN(n,a){return n.stylesheets&&n.count===0&&Fc(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var c=setTimeout(function(){if(n.stylesheets&&Fc(n,n.stylesheets),n.unsuspend){var v=n.unsuspend;n.unsuspend=null,v()}},6e4+a);0<n.imgBytes&&wh===0&&(wh=62500*sN());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Fc(n,n.stylesheets),n.unsuspend)){var v=n.unsuspend;n.unsuspend=null,v()}},(n.imgBytes>wh?50:800)+a);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function Hc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Ic=null;function Fc(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Ic=new Map,a.forEach(EN,n),Ic=null,Hc.call(n))}function EN(n,a){if(!(a.state.loading&4)){var o=Ic.get(n);if(o)var c=o.get(null);else{o=new Map,Ic.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=Hc.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 Xr={$$typeof:R,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function AN(n,a,o,c,p,v,w,N,k){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=Ta(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ta(0),this.hiddenUpdates=Ta(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=v,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function mb(n,a,o,c,p,v,w,N,k,q,Q,ee){return n=new AN(n,a,o,w,k,q,Q,ee,N),a=1,v===!0&&(a|=24),v=_n(3,null,null,a),n.current=v,v.stateNode=n,a=ef(),a.refCount++,n.pooledCache=a,a.refCount++,v.memoizedState={element:c,isDehydrated:o,cache:a},sf(v),n}function pb(n){return n?(n=oo,n):oo}function gb(n,a,o,c,p,v){p=pb(p),c.context===null?c.context=p:c.pendingContext=p,c=ks(a),c.payload={element:o},v=v===void 0?null:v,v!==null&&(c.callback=v),o=Ls(n,c,a),o!==null&&(xn(o,n,a),jr(o,n,a))}function vb(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<a?o:a}}function Ch(n,a){vb(n,a),(n=n.alternate)&&vb(n,a)}function yb(n){if(n.tag===13||n.tag===31){var a=pi(n,67108864);a!==null&&xn(a,n,67108864),Ch(n,67108864)}}function xb(n){if(n.tag===13||n.tag===31){var a=Ln();a=Es(a);var o=pi(n,a);o!==null&&xn(o,n,a),Ch(n,a)}}var qc=!0;function jN(n,a,o,c){var p=D.T;D.T=null;var v=H.p;try{H.p=2,Th(n,a,o,c)}finally{H.p=v,D.T=p}}function NN(n,a,o,c){var p=D.T;D.T=null;var v=H.p;try{H.p=8,Th(n,a,o,c)}finally{H.p=v,D.T=p}}function Th(n,a,o,c){if(qc){var p=Eh(c);if(p===null)uh(n,a,c,$c,o),Sb(n,c);else if(MN(p,n,a,o,c))c.stopPropagation();else if(Sb(n,c),a&4&&-1<RN.indexOf(n)){for(;p!==null;){var v=Xi(p);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var w=Lt(v.pendingLanes);if(w!==0){var N=v;for(N.pendingLanes|=2,N.entangledLanes|=2;w;){var k=1<<31-xt(w);N.entanglements[1]|=k,w&=~k}Ra(v),(qe&6)===0&&(jc=Rt()+500,Fr(0))}}break;case 31:case 13:N=pi(v,2),N!==null&&xn(N,v,2),Rc(),Ch(v,2)}if(v=Eh(c),v===null&&uh(n,a,c,$c,o),v===p)break;p=v}p!==null&&c.stopPropagation()}else uh(n,a,c,null,o)}}function Eh(n){return n=Ad(n),Ah(n)}var $c=null;function Ah(n){if($c=null,n=$a(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=d(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 $c=n,null}function bb(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(Cs()){case fn:return 2;case la:return 8;case In:case Ia:return 32;case Nn:return 268435456;default:return 32}default:return 32}}var jh=!1,Ys=null,Gs=null,Xs=null,Zr=new Map,Qr=new Map,Zs=[],RN="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 Sb(n,a){switch(n){case"focusin":case"focusout":Ys=null;break;case"dragenter":case"dragleave":Gs=null;break;case"mouseover":case"mouseout":Xs=null;break;case"pointerover":case"pointerout":Zr.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qr.delete(a.pointerId)}}function Wr(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=Xi(a),a!==null&&yb(a)),n):(n.eventSystemFlags|=c,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function MN(n,a,o,c,p){switch(a){case"focusin":return Ys=Wr(Ys,n,a,o,c,p),!0;case"dragenter":return Gs=Wr(Gs,n,a,o,c,p),!0;case"mouseover":return Xs=Wr(Xs,n,a,o,c,p),!0;case"pointerover":var v=p.pointerId;return Zr.set(v,Wr(Zr.get(v)||null,n,a,o,c,p)),!0;case"gotpointercapture":return v=p.pointerId,Qr.set(v,Wr(Qr.get(v)||null,n,a,o,c,p)),!0}return!1}function wb(n){var a=$a(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,Vl(n.priority,function(){xb(o)});return}}else if(a===31){if(a=d(o),a!==null){n.blockedOn=a,Vl(n.priority,function(){xb(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 Kc(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var o=Eh(n.nativeEvent);if(o===null){o=n.nativeEvent;var c=new o.constructor(o.type,o);Ed=c,o.target.dispatchEvent(c),Ed=null}else return a=Xi(o),a!==null&&yb(a),n.blockedOn=o,!1;a.shift()}return!0}function Cb(n,a,o){Kc(n)&&o.delete(a)}function _N(){jh=!1,Ys!==null&&Kc(Ys)&&(Ys=null),Gs!==null&&Kc(Gs)&&(Gs=null),Xs!==null&&Kc(Xs)&&(Xs=null),Zr.forEach(Cb),Qr.forEach(Cb)}function Yc(n,a){n.blockedOn===a&&(n.blockedOn=null,jh||(jh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,_N)))}var Gc=null;function Tb(n){Gc!==n&&(Gc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Gc===n&&(Gc=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(Ah(c||o)===null)continue;break}var v=Xi(o);v!==null&&(n.splice(a,3),a-=3,Ef(v,{pending:!0,data:p,method:o.method,action:c},c,p))}}))}function _o(n){function a(k){return Yc(k,n)}Ys!==null&&Yc(Ys,n),Gs!==null&&Yc(Gs,n),Xs!==null&&Yc(Xs,n),Zr.forEach(a),Qr.forEach(a);for(var o=0;o<Zs.length;o++){var c=Zs[o];c.blockedOn===n&&(c.blockedOn=null)}for(;0<Zs.length&&(o=Zs[0],o.blockedOn===null);)wb(o),o.blockedOn===null&&Zs.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[Jt]||null;if(typeof v=="function")w||Tb(o);else if(w){var N=null;if(v&&v.hasAttribute("formAction")){if(p=v,w=v[Jt]||null)N=w.formAction;else if(Ah(p)!==null)continue}else N=w.action;typeof N=="function"?o[c+1]=N:(o.splice(c,3),c-=3),Tb(o)}}}function Eb(){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 Nh(n){this._internalRoot=n}Xc.prototype.render=Nh.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,c=Ln();gb(o,c,n,a,null,null)},Xc.prototype.unmount=Nh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;gb(n.current,2,null,n,null,null),Rc(),a[As]=null}};function Xc(n){this._internalRoot=n}Xc.prototype.unstable_scheduleHydration=function(n){if(n){var a=cr();n={blockedOn:null,target:n,priority:a};for(var o=0;o<Zs.length&&a!==0&&a<Zs[o].priority;o++);Zs.splice(o,0,n),o===0&&wb(n)}};var Ab=t.version;if(Ab!=="19.2.3")throw Error(i(527,Ab,"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 ON={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zc.isDisabled&&Zc.supportsFiber)try{ca=Zc.inject(ON),Mt=Zc}catch{}}return el.createRoot=function(n,a){if(!r(n))throw Error(i(299));var o=!1,c="",p=Dy,v=Py,w=ky;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=mb(n,1,!1,null,null,o,c,null,p,v,w,Eb),n[As]=a.current,ch(n),new Nh(a)},el.hydrateRoot=function(n,a,o){if(!r(n))throw Error(i(299));var c=!1,p="",v=Dy,w=Py,N=ky,k=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&&(k=o.formState)),a=mb(n,1,!0,a,o??null,c,p,k,v,w,N,Eb),a.context=pb(null),o=a.current,c=Ln(),c=Es(c),p=ks(c),p.callback=null,Ls(o,p,c),o=c,a.current.lanes=o,et(a,o),Ra(a),n[As]=a.current,ch(n),new Xc(a)},el.version="19.2.3",el}var Lb;function IN(){if(Lb)return _h.exports;Lb=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(),_h.exports=HN(),_h.exports}var FN=IN();var zb="popstate";function qN(e={}){function t(r,l){let{pathname:u="/",search:d="",hash:f=""}=Ki(r.location.hash.substring(1));return!u.startsWith("/")&&!u.startsWith(".")&&(u="/"+u),wm("",{pathname:u,search:d,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function s(r,l){let u=r.document.querySelector("base"),d="";if(u&&u.getAttribute("href")){let f=r.location.href,m=f.indexOf("#");d=m===-1?f:f.slice(0,m)}return d+"#"+(typeof l=="string"?l:pl(l))}function i(r,l){An(r.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(l)})`)}return KN(t,s,i,e)}function it(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function An(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $N(){return Math.random().toString(36).substring(2,10)}function Vb(e,t){return{usr:e.state,key:e.key,idx:t}}function wm(e,t,s=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ki(t):t,state:s,key:t&&t.key||i||$N()}}function pl({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 Ki(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 KN(e,t,s,i={}){let{window:r=document.defaultView,v5Compat:l=!1}=i,u=r.history,d="POP",f=null,m=y();m==null&&(m=0,u.replaceState({...u.state,idx:m},""));function y(){return(u.state||{idx:null}).idx}function g(){d="POP";let A=y(),E=A==null?null:A-m;m=A,f&&f({action:d,location:T.location,delta:E})}function b(A,E){d="PUSH";let j=wm(T.location,A,E);s&&s(j,A),m=y()+1;let R=Vb(j,m),_=T.createHref(j);try{u.pushState(R,"",_)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;r.location.assign(_)}l&&f&&f({action:d,location:T.location,delta:1})}function S(A,E){d="REPLACE";let j=wm(T.location,A,E);s&&s(j,A),m=y();let R=Vb(j,m),_=T.createHref(j);u.replaceState(R,"",_),l&&f&&f({action:d,location:T.location,delta:0})}function C(A){return YN(A)}let T={get action(){return d},get location(){return e(r,u)},listen(A){if(f)throw new Error("A history only accepts one active listener");return r.addEventListener(zb,g),f=A,()=>{r.removeEventListener(zb,g),f=null}},createHref(A){return t(r,A)},createURL:C,encodeLocation(A){let E=C(A);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:b,replace:S,go(A){return u.go(A)}};return T}function YN(e,t=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),it(s,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:pl(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=s+i),new URL(i,s)}function j1(e,t,s="/"){return GN(e,t,s,!1)}function GN(e,t,s,i){let r=typeof t=="string"?Ki(t):t,l=gs(r.pathname||"/",s);if(l==null)return null;let u=N1(e);XN(u);let d=null;for(let f=0;d==null&&f<u.length;++f){let m=oR(l);d=sR(u[f],m,i)}return d}function N1(e,t=[],s=[],i="",r=!1){let l=(u,d,f=r,m)=>{let y={relativePath:m===void 0?u.path||"":m,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(i)&&f)return;it(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=ms([i,y.relativePath]),b=s.concat(y);u.children&&u.children.length>0&&(it(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),N1(u.children,t,b,g,f)),!(u.path==null&&!u.index)&&t.push({path:g,score:nR(g,u.index),routesMeta:b})};return e.forEach((u,d)=>{if(u.path===""||!u.path?.includes("?"))l(u,d);else for(let f of R1(u.path))l(u,d,!0,f)}),t}function R1(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=R1(i.join("/")),d=[];return d.push(...u.map(f=>f===""?l:[l,f].join("/"))),r&&d.push(...u),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function XN(e){e.sort((t,s)=>t.score!==s.score?s.score-t.score:aR(t.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var ZN=/^:[\w-]+$/,QN=3,WN=2,JN=1,eR=10,tR=-2,Bb=e=>e==="*";function nR(e,t){let s=e.split("/"),i=s.length;return s.some(Bb)&&(i+=tR),t&&(i+=WN),s.filter(r=>!Bb(r)).reduce((r,l)=>r+(ZN.test(l)?QN:l===""?JN:eR),i)}function aR(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 sR(e,t,s=!1){let{routesMeta:i}=e,r={},l="/",u=[];for(let d=0;d<i.length;++d){let f=i[d],m=d===i.length-1,y=l==="/"?t:t.slice(l.length)||"/",g=Au({path:f.relativePath,caseSensitive:f.caseSensitive,end:m},y),b=f.route;if(!g&&m&&s&&!i[i.length-1].route.index&&(g=Au({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},y)),!g)return null;Object.assign(r,g.params),u.push({params:r,pathname:ms([l,g.pathname]),pathnameBase:uR(ms([l,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(l=ms([l,g.pathnameBase]))}return u}function Au(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,i]=iR(e.path,e.caseSensitive,e.end),r=t.match(s);if(!r)return null;let l=r[0],u=l.replace(/(.)\/+$/,"$1"),d=r.slice(1);return{params:i.reduce((m,{paramName:y,isOptional:g},b)=>{if(y==="*"){let C=d[b]||"";u=l.slice(0,l.length-C.length).replace(/(.)\/+$/,"$1")}const S=d[b];return g&&!S?m[y]=void 0:m[y]=(S||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:u,pattern:e}}function iR(e,t=!1,s=!0){An(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,d,f)=>(i.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).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 oR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return An(!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 gs(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 M1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rR=e=>M1.test(e);function lR(e,t="/"){let{pathname:s,search:i="",hash:r=""}=typeof e=="string"?Ki(e):e,l;if(s)if(rR(s))l=s;else{if(s.includes("//")){let u=s;s=s.replace(/\/\/+/g,"/"),An(!1,`Pathnames cannot have embedded double slashes - normalizing ${u} -> ${s}`)}s.startsWith("/")?l=Ub(s.substring(1),"/"):l=Ub(s,t)}else l=t;return{pathname:l,search:dR(i),hash:fR(r)}}function Ub(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 kh(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 cR(e){return e.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function Cp(e){let t=cR(e);return t.map((s,i)=>i===t.length-1?s.pathname:s.pathnameBase)}function Tp(e,t,s,i=!1){let r;typeof e=="string"?r=Ki(e):(r={...e},it(!r.pathname||!r.pathname.includes("?"),kh("?","pathname","search",r)),it(!r.pathname||!r.pathname.includes("#"),kh("#","pathname","hash",r)),it(!r.search||!r.search.includes("#"),kh("#","search","hash",r)));let l=e===""||r.pathname==="",u=l?"/":r.pathname,d;if(u==null)d=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("/")}d=g>=0?t[g]:"/"}let f=lR(r,d),m=u&&u!=="/"&&u.endsWith("/"),y=(l||u===".")&&s.endsWith("/");return!f.pathname.endsWith("/")&&(m||y)&&(f.pathname+="/"),f}var ms=e=>e.join("/").replace(/\/\/+/g,"/"),uR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),dR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,hR=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 mR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function pR(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var _1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function O1(e,t){let s=e;if(typeof s!="string"||!M1.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,r=!1;if(_1)try{let l=new URL(window.location.href),u=s.startsWith("//")?new URL(l.protocol+s):new URL(s),d=gs(u.pathname,t);u.origin===l.origin&&d!=null?s=d+u.search+u.hash:r=!0}catch{An(!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 D1=["POST","PUT","PATCH","DELETE"];new Set(D1);var gR=["GET",...D1];new Set(gR);var Wo=x.createContext(null);Wo.displayName="DataRouter";var Gu=x.createContext(null);Gu.displayName="DataRouterState";var vR=x.createContext(!1),P1=x.createContext({isTransitioning:!1});P1.displayName="ViewTransition";var yR=x.createContext(new Map);yR.displayName="Fetchers";var xR=x.createContext(null);xR.displayName="Await";var Un=x.createContext(null);Un.displayName="Navigation";var Nl=x.createContext(null);Nl.displayName="Location";var ra=x.createContext({outlet:null,matches:[],isDataRoute:!1});ra.displayName="Route";var Ep=x.createContext(null);Ep.displayName="RouteError";var k1="REACT_ROUTER_ERROR",bR="REDIRECT",SR="ROUTE_ERROR_RESPONSE";function wR(e){if(e.startsWith(`${k1}:${bR}:{`))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 CR(e){if(e.startsWith(`${k1}:${SR}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new hR(t.status,t.statusText,t.data)}catch{}}function TR(e,{relative:t}={}){it(Jo(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=x.useContext(Un),{hash:r,pathname:l,search:u}=Rl(e,{relative:t}),d=l;return s!=="/"&&(d=l==="/"?s:ms([s,l])),i.createHref({pathname:d,search:u,hash:r})}function Jo(){return x.useContext(Nl)!=null}function Va(){return it(Jo(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(Nl).location}var L1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function z1(e){x.useContext(Un).static||x.useLayoutEffect(e)}function Ap(){let{isDataRoute:e}=x.useContext(ra);return e?UR():ER()}function ER(){it(Jo(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(Wo),{basename:t,navigator:s}=x.useContext(Un),{matches:i}=x.useContext(ra),{pathname:r}=Va(),l=JSON.stringify(Cp(i)),u=x.useRef(!1);return z1(()=>{u.current=!0}),x.useCallback((f,m={})=>{if(An(u.current,L1),!u.current)return;if(typeof f=="number"){s.go(f);return}let y=Tp(f,JSON.parse(l),r,m.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:ms([t,y.pathname])),(m.replace?s.replace:s.push)(y,m.state,m)},[t,s,l,r,e])}var AR=x.createContext(null);function jR(e){let t=x.useContext(ra).outlet;return x.useMemo(()=>t&&x.createElement(AR.Provider,{value:e},t),[t,e])}function NR(){let{matches:e}=x.useContext(ra),t=e[e.length-1];return t?t.params:{}}function Rl(e,{relative:t}={}){let{matches:s}=x.useContext(ra),{pathname:i}=Va(),r=JSON.stringify(Cp(s));return x.useMemo(()=>Tp(e,JSON.parse(r),i,t==="path"),[e,r,i,t])}function RR(e,t){return V1(e,t)}function V1(e,t,s,i,r){it(Jo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=x.useContext(Un),{matches:u}=x.useContext(ra),d=u[u.length-1],f=d?d.params:{},m=d?d.pathname:"/",y=d?d.pathnameBase:"/",g=d&&d.route;{let j=g&&g.path||"";U1(m,!g||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${j}">) 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="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let b=Va(),S;if(t){let j=typeof t=="string"?Ki(t):t;it(y==="/"||j.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 "${j.pathname}" was given in the \`location\` prop.`),S=j}else S=b;let C=S.pathname||"/",T=C;if(y!=="/"){let j=y.replace(/^\//,"").split("/");T="/"+C.replace(/^\//,"").split("/").slice(j.length).join("/")}let A=j1(e,{pathname:T});An(g||A!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),An(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.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=PR(A&&A.map(j=>Object.assign({},j,{params:Object.assign({},f,j.params),pathname:ms([y,l.encodeLocation?l.encodeLocation(j.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?y:ms([y,l.encodeLocation?l.encodeLocation(j.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),u,s,i,r);return t&&E?x.createElement(Nl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...S},navigationType:"POP"}},E):E}function MR(){let e=BR(),t=mR(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 _R=x.createElement(MR,null),B1=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=CR(e.digest);s&&(e=s)}let t=e!==void 0?x.createElement(ra.Provider,{value:this.props.routeContext},x.createElement(Ep.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?x.createElement(OR,{error:e},t):t}};B1.contextType=vR;var Lh=new WeakMap;function OR({children:e,error:t}){let{basename:s}=x.useContext(Un);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=wR(t.digest);if(i){let r=Lh.get(t);if(r)throw r;let l=O1(i.location,s);if(_1&&!Lh.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 Lh.set(t,u),u}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function DR({routeContext:e,match:t,children:s}){let i=x.useContext(Wo);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(ra.Provider,{value:e},s)}function PR(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);it(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 d=!1,f=-1;if(s)for(let y=0;y<l.length;y++){let g=l[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=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){d=!0,f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}let m=s&&i?(y,g)=>{i(y,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:pR(s.matches),errorInfo:g})}:void 0;return l.reduceRight((y,g,b)=>{let S,C=!1,T=null,A=null;s&&(S=u&&g.route.id?u[g.route.id]:void 0,T=g.route.errorElement||_R,d&&(f<0&&b===0?(U1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,A=null):f===b&&(C=!0,A=g.route.hydrateFallbackElement||null)));let E=t.concat(l.slice(0,b+1)),j=()=>{let R;return S?R=T:C?R=A:g.route.Component?R=x.createElement(g.route.Component,null):g.route.element?R=g.route.element:R=y,x.createElement(DR,{match:g,routeContext:{outlet:y,matches:E,isDataRoute:s!=null},children:R})};return s&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?x.createElement(B1,{location:s.location,revalidation:s.revalidation,component:T,error:S,children:j(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:m}):j()},null)}function jp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function kR(e){let t=x.useContext(Wo);return it(t,jp(e)),t}function LR(e){let t=x.useContext(Gu);return it(t,jp(e)),t}function zR(e){let t=x.useContext(ra);return it(t,jp(e)),t}function Np(e){let t=zR(e),s=t.matches[t.matches.length-1];return it(s.route.id,`${e} can only be used on routes that contain a unique "id"`),s.route.id}function VR(){return Np("useRouteId")}function BR(){let e=x.useContext(Ep),t=LR("useRouteError"),s=Np("useRouteError");return e!==void 0?e:t.errors?.[s]}function UR(){let{router:e}=kR("useNavigate"),t=Np("useNavigate"),s=x.useRef(!1);return z1(()=>{s.current=!0}),x.useCallback(async(r,l={})=>{An(s.current,L1),s.current&&(typeof r=="number"?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...l}))},[e,t])}var Hb={};function U1(e,t,s){!t&&!Hb[e]&&(Hb[e]=!0,An(!1,s))}x.memo(HR);function HR({routes:e,future:t,state:s,onError:i}){return V1(e,void 0,s,i,t)}function IR({to:e,replace:t,state:s,relative:i}){it(Jo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=x.useContext(Un);An(!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(ra),{pathname:u}=Va(),d=Ap(),f=Tp(e,Cp(l),u,i==="path"),m=JSON.stringify(f);return x.useEffect(()=>{d(JSON.parse(m),{replace:t,state:s,relative:i})},[d,m,i,t,s]),null}function FR(e){return jR(e.context)}function ds(e){it(!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 qR({basename:e="/",children:t=null,location:s,navigationType:i="POP",navigator:r,static:l=!1,unstable_useTransitions:u}){it(!Jo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=x.useMemo(()=>({basename:d,navigator:r,static:l,unstable_useTransitions:u,future:{}}),[d,r,l,u]);typeof s=="string"&&(s=Ki(s));let{pathname:m="/",search:y="",hash:g="",state:b=null,key:S="default"}=s,C=x.useMemo(()=>{let T=gs(m,d);return T==null?null:{location:{pathname:T,search:y,hash:g,state:b,key:S},navigationType:i}},[d,m,y,g,b,S,i]);return An(C!=null,`<Router basename="${d}"> 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(Un.Provider,{value:f},x.createElement(Nl.Provider,{children:t,value:C}))}function $R({children:e,location:t}){return RR(Cm(e),t)}function Cm(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,Cm(i.props.children,l));return}it(i.type===ds,`[${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>`),it(!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=Cm(i.props.children,l)),s.push(u)}),s}var hu="get",mu="application/x-www-form-urlencoded";function Xu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function KR(e){return Xu(e)&&e.tagName.toLowerCase()==="button"}function YR(e){return Xu(e)&&e.tagName.toLowerCase()==="form"}function GR(e){return Xu(e)&&e.tagName.toLowerCase()==="input"}function XR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ZR(e,t){return e.button===0&&(!t||t==="_self")&&!XR(e)}function Tm(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 QR(e,t){let s=Tm(e);return t&&t.forEach((i,r)=>{s.has(r)||t.getAll(r).forEach(l=>{s.append(r,l)})}),s}var Qc=null;function WR(){if(Qc===null)try{new FormData(document.createElement("form"),0),Qc=!1}catch{Qc=!0}return Qc}var JR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zh(e){return e!=null&&!JR.has(e)?(An(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${mu}"`),null):e}function eM(e,t){let s,i,r,l,u;if(YR(e)){let d=e.getAttribute("action");i=d?gs(d,t):null,s=e.getAttribute("method")||hu,r=zh(e.getAttribute("enctype"))||mu,l=new FormData(e)}else if(KR(e)||GR(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(i=f?gs(f,t):null,s=e.getAttribute("formmethod")||d.getAttribute("method")||hu,r=zh(e.getAttribute("formenctype"))||zh(d.getAttribute("enctype"))||mu,l=new FormData(d,e),!WR()){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(Xu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=hu,i=null,r=mu,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 Rp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function tM(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&&gs(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${s}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${s}`,i}async function nM(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 aM(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 sM(e,t,s){let i=await Promise.all(e.map(async r=>{let l=t.routes[r.route.id];if(l){let u=await nM(l,s);return u.links?u.links():[]}return[]}));return lM(i.flat(1).filter(aM).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function Ib(e,t,s,i,r,l){let u=(f,m)=>s[m]?f.route.id!==s[m].route.id:!0,d=(f,m)=>s[m].pathname!==f.pathname||s[m].route.path?.endsWith("*")&&s[m].params["*"]!==f.params["*"];return l==="assets"?t.filter((f,m)=>u(f,m)||d(f,m)):l==="data"?t.filter((f,m)=>{let y=i.routes[f.route.id];if(!y||!y.hasLoader)return!1;if(u(f,m)||d(f,m))return!0;if(f.route.shouldRevalidate){let g=f.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function iM(e,t,{includeHydrateFallback:s}={}){return oM(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 oM(e){return[...new Set(e)]}function rM(e){let t={},s=Object.keys(e).sort();for(let i of s)t[i]=e[i];return t}function lM(e,t){let s=new Set;return new Set(t),e.reduce((i,r)=>{let l=JSON.stringify(rM(r));return s.has(l)||(s.add(l),i.push({key:l,link:r})),i},[])}function H1(){let e=x.useContext(Wo);return Rp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function cM(){let e=x.useContext(Gu);return Rp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Mp=x.createContext(void 0);Mp.displayName="FrameworkContext";function I1(){let e=x.useContext(Mp);return Rp(e,"You must render this element inside a <HydratedRouter> element"),e}function uM(e,t){let s=x.useContext(Mp),[i,r]=x.useState(!1),[l,u]=x.useState(!1),{onFocus:d,onBlur:f,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(j=>{u(j.isIntersecting)})},A=new IntersectionObserver(T,{threshold:.5});return b.current&&A.observe(b.current),()=>{A.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:tl(d,S),onBlur:tl(f,C),onMouseEnter:tl(m,S),onMouseLeave:tl(y,C),onTouchStart:tl(g,S)}]:[!1,b,{}]}function tl(e,t){return s=>{e&&e(s),s.defaultPrevented||t(s)}}function dM({page:e,...t}){let{router:s}=H1(),i=x.useMemo(()=>j1(s.routes,e,s.basename),[s.routes,e,s.basename]);return i?x.createElement(hM,{page:e,matches:i,...t}):null}function fM(e){let{manifest:t,routeModules:s}=I1(),[i,r]=x.useState([]);return x.useEffect(()=>{let l=!1;return sM(e,t,s).then(u=>{l||r(u)}),()=>{l=!0}},[e,t,s]),i}function hM({page:e,matches:t,...s}){let i=Va(),{manifest:r,routeModules:l}=I1(),{basename:u}=H1(),{loaderData:d,matches:f}=cM(),m=x.useMemo(()=>Ib(e,t,f,r,i,"data"),[e,t,f,r,i]),y=x.useMemo(()=>Ib(e,t,f,r,i,"assets"),[e,t,f,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 j=r.routes[E.route.id];!j||!j.hasLoader||(!m.some(R=>R.route.id===E.route.id)&&E.route.id in d&&l[E.route.id]?.shouldRevalidate||j.hasClientLoader?T=!0:C.add(E.route.id))}),C.size===0)return[];let A=tM(e,u,"data");return T&&C.size>0&&A.searchParams.set("_routes",t.filter(E=>C.has(E.route.id)).map(E=>E.route.id).join(",")),[A.pathname+A.search]},[u,d,i,r,m,t,e,l]),b=x.useMemo(()=>iM(y,r),[y,r]),S=fM(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 mM(...e){return t=>{e.forEach(s=>{typeof s=="function"?s(t):s!=null&&(s.current=t)})}}var pM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{pM&&(window.__reactRouterVersion="7.11.0")}catch{}function gM({basename:e,children:t,unstable_useTransitions:s,window:i}){let r=x.useRef();r.current==null&&(r.current=qN({window:i,v5Compat:!0}));let l=r.current,[u,d]=x.useState({action:l.action,location:l.location}),f=x.useCallback(m=>{s===!1?d(m):x.startTransition(()=>d(m))},[s]);return x.useLayoutEffect(()=>l.listen(f),[l,f]),x.createElement(qR,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:l,unstable_useTransitions:s})}var F1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zi=x.forwardRef(function({onClick:t,discover:s="render",prefetch:i="none",relative:r,reloadDocument:l,replace:u,state:d,target:f,to:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},C){let{basename:T,unstable_useTransitions:A}=x.useContext(Un),E=typeof m=="string"&&F1.test(m),j=O1(m,T);m=j.to;let R=TR(m,{relative:r}),[_,M,B]=uM(i,S),L=xM(m,{replace:u,state:d,target:f,preventScrollReset:y,relative:r,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:A});function O(Z){t&&t(Z),Z.defaultPrevented||L(Z)}let K=x.createElement("a",{...S,...B,href:j.absoluteURL||R,onClick:j.isExternal||l?t:O,ref:mM(C,M),target:f,"data-discover":!E&&s==="render"?"true":void 0});return _&&!E?x.createElement(x.Fragment,null,K,x.createElement(dM,{page:R})):K});zi.displayName="Link";var q1=x.forwardRef(function({"aria-current":t="page",caseSensitive:s=!1,className:i="",end:r=!1,style:l,to:u,viewTransition:d,children:f,...m},y){let g=Rl(u,{relative:m.relative}),b=Va(),S=x.useContext(Gu),{navigator:C,basename:T}=x.useContext(Un),A=S!=null&&EM(g)&&d===!0,E=C.encodeLocation?C.encodeLocation(g).pathname:g.pathname,j=b.pathname,R=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;s||(j=j.toLowerCase(),R=R?R.toLowerCase():null,E=E.toLowerCase()),R&&T&&(R=gs(R,T)||R);const _=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let M=j===E||!r&&j.startsWith(E)&&j.charAt(_)==="/",B=R!=null&&(R===E||!r&&R.startsWith(E)&&R.charAt(E.length)==="/"),L={isActive:M,isPending:B,isTransitioning:A},O=M?t:void 0,K;typeof i=="function"?K=i(L):K=[i,M?"active":null,B?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let Z=typeof l=="function"?l(L):l;return x.createElement(zi,{...m,"aria-current":O,className:K,ref:y,style:Z,to:u,viewTransition:d},typeof f=="function"?f(L):f)});q1.displayName="NavLink";var vM=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:s,reloadDocument:i,replace:r,state:l,method:u=hu,action:d,onSubmit:f,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},C)=>{let{unstable_useTransitions:T}=x.useContext(Un),A=CM(),E=TM(d,{relative:m}),j=u.toLowerCase()==="get"?"get":"post",R=typeof d=="string"&&F1.test(d),_=M=>{if(f&&f(M),M.defaultPrevented)return;M.preventDefault();let B=M.nativeEvent.submitter,L=B?.getAttribute("formmethod")||u,O=()=>A(B||M.currentTarget,{fetcherKey:t,method:L,navigate:s,replace:r,state:l,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b});T&&s!==!1?x.startTransition(()=>O()):O()};return x.createElement("form",{ref:C,method:j,action:E,onSubmit:i?f:_,...S,"data-discover":!R&&e==="render"?"true":void 0})});vM.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 $1(e){let t=x.useContext(Wo);return it(t,yM(e)),t}function xM(e,{target:t,replace:s,state:i,preventScrollReset:r,relative:l,viewTransition:u,unstable_defaultShouldRevalidate:d,unstable_useTransitions:f}={}){let m=Ap(),y=Va(),g=Rl(e,{relative:l});return x.useCallback(b=>{if(ZR(b,t)){b.preventDefault();let S=s!==void 0?s:pl(y)===pl(g),C=()=>m(e,{replace:S,state:i,preventScrollReset:r,relative:l,viewTransition:u,unstable_defaultShouldRevalidate:d});f?x.startTransition(()=>C()):C()}},[y,m,g,s,i,t,e,r,l,u,d,f])}function bM(e){An(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(Tm(e)),s=x.useRef(!1),i=Va(),r=x.useMemo(()=>QR(i.search,s.current?null:t.current),[i.search]),l=Ap(),u=x.useCallback((d,f)=>{const m=Tm(typeof d=="function"?d(new URLSearchParams(r)):d);s.current=!0,l("?"+m,f)},[l,r]);return[r,u]}var SM=0,wM=()=>`__${String(++SM)}__`;function CM(){let{router:e}=$1("useSubmit"),{basename:t}=x.useContext(Un),s=VR(),i=e.fetch,r=e.navigate;return x.useCallback(async(l,u={})=>{let{action:d,method:f,encType:m,formData:y,body:g}=eM(l,t);if(u.navigate===!1){let b=u.fetcherKey||wM();await i(b,s,u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:g,formMethod:u.method||f,formEncType:u.encType||m,flushSync:u.flushSync})}else await r(u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:g,formMethod:u.method||f,formEncType:u.encType||m,replace:u.replace,state:u.state,fromRouteId:s,flushSync:u.flushSync,viewTransition:u.viewTransition})},[i,r,t,s])}function TM(e,{relative:t}={}){let{basename:s}=x.useContext(Un),i=x.useContext(ra);it(i,"useFormAction must be used inside a RouteContext");let[r]=i.matches.slice(-1),l={...Rl(e||".",{relative:t})},u=Va();if(e==null){l.search=u.search;let d=new URLSearchParams(l.search),f=d.getAll("index");if(f.some(y=>y==="")){d.delete("index"),f.filter(g=>g).forEach(g=>d.append("index",g));let y=d.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:ms([s,l.pathname])),pl(l)}function EM(e,{relative:t}={}){let s=x.useContext(P1);it(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=$1("useViewTransitionState"),r=Rl(e,{relative:t});if(!s.isTransitioning)return!1;let l=gs(s.currentLocation.pathname,i)||s.currentLocation.pathname,u=gs(s.nextLocation.pathname,i)||s.nextLocation.pathname;return Au(r.pathname,u)!=null||Au(r.pathname,l)!=null}var Ml=A1();const K1=Sp(Ml);var AM=(e,t,s,i,r,l,u,d)=>{let f=document.documentElement,m=["light","dark"];function y(S){(Array.isArray(e)?e:[e]).forEach(C=>{let T=C==="class",A=T&&l?r.map(E=>l[E]||E):r;T?(f.classList.remove(...A),f.classList.add(l&&l[S]?l[S]:S)):f.setAttribute(C,S)}),g(S)}function g(S){d&&m.includes(S)&&(f.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{}},Fb=["light","dark"],Y1="(prefers-color-scheme: dark)",jM=typeof window>"u",_p=x.createContext(void 0),NM={setTheme:e=>{},themes:[]},G1=()=>{var e;return(e=x.useContext(_p))!=null?e:NM},RM=e=>x.useContext(_p)?x.createElement(x.Fragment,null,e.children):x.createElement(_M,{...e}),MM=["light","dark"],_M=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:s=!0,enableColorScheme:i=!0,storageKey:r="theme",themes:l=MM,defaultTheme:u=s?"system":"light",attribute:d="data-theme",value:f,children:m,nonce:y,scriptProps:g})=>{let[b,S]=x.useState(()=>DM(r,u)),[C,T]=x.useState(()=>b==="system"?Vh():b),A=f?Object.values(f):l,E=x.useCallback(M=>{let B=M;if(!B)return;M==="system"&&s&&(B=Vh());let L=f?f[B]:B,O=t?PM(y):null,K=document.documentElement,Z=W=>{W==="class"?(K.classList.remove(...A),L&&K.classList.add(L)):W.startsWith("data-")&&(L?K.setAttribute(W,L):K.removeAttribute(W))};if(Array.isArray(d)?d.forEach(Z):Z(d),i){let W=Fb.includes(u)?u:null,se=Fb.includes(B)?B:W;K.style.colorScheme=se}O?.()},[y]),j=x.useCallback(M=>{let B=typeof M=="function"?M(b):M;S(B);try{localStorage.setItem(r,B)}catch{}},[b]),R=x.useCallback(M=>{let B=Vh(M);T(B),b==="system"&&s&&!e&&E("system")},[b,e]);x.useEffect(()=>{let M=window.matchMedia(Y1);return M.addListener(R),R(M),()=>M.removeListener(R)},[R]),x.useEffect(()=>{let M=B=>{B.key===r&&(B.newValue?S(B.newValue):j(u))};return window.addEventListener("storage",M),()=>window.removeEventListener("storage",M)},[j]),x.useEffect(()=>{E(e??b)},[e,b]);let _=x.useMemo(()=>({theme:b,setTheme:j,forcedTheme:e,resolvedTheme:b==="system"?C:b,themes:s?[...l,"system"]:l,systemTheme:s?C:void 0}),[b,j,e,C,s,l]);return x.createElement(_p.Provider,{value:_},x.createElement(OM,{forcedTheme:e,storageKey:r,attribute:d,enableSystem:s,enableColorScheme:i,defaultTheme:u,value:f,themes:l,nonce:y,scriptProps:g}),m)},OM=x.memo(({forcedTheme:e,storageKey:t,attribute:s,enableSystem:i,enableColorScheme:r,defaultTheme:l,value:u,themes:d,nonce:f,scriptProps:m})=>{let y=JSON.stringify([s,t,l,e,d,u,i,r]).slice(1,-1);return x.createElement("script",{...m,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${AM.toString()})(${y})`}})}),DM=(e,t)=>{if(jM)return;let s;try{s=localStorage.getItem(e)||void 0}catch{}return s||t},PM=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)}},Vh=e=>(e||(e=window.matchMedia(Y1)),e.matches?"dark":"light");const Ae=e=>typeof e=="string",nl=()=>{let e,t;const s=new Promise((i,r)=>{e=i,t=r});return s.resolve=e,s.reject=t,s},qb=e=>e==null?"":""+e,kM=(e,t,s)=>{e.forEach(i=>{t[i]&&(s[i]=t[i])})},LM=/###/g,$b=e=>e&&e.indexOf("###")>-1?e.replace(LM,"."):e,Kb=e=>!e||Ae(e),ll=(e,t,s)=>{const i=Ae(t)?t.split("."):t;let r=0;for(;r<i.length-1;){if(Kb(e))return{};const l=$b(i[r]);!e[l]&&s&&(e[l]=new s),Object.prototype.hasOwnProperty.call(e,l)?e=e[l]:e={},++r}return Kb(e)?{}:{obj:e,k:$b(i[r])}},Yb=(e,t,s)=>{const{obj:i,k:r}=ll(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),d=ll(e,u,Object);for(;d.obj===void 0&&u.length;)l=`${u[u.length-1]}.${l}`,u=u.slice(0,u.length-1),d=ll(e,u,Object),d?.obj&&typeof d.obj[`${d.k}.${l}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${l}`]=s},zM=(e,t,s,i)=>{const{obj:r,k:l}=ll(e,t,Object);r[l]=r[l]||[],r[l].push(s)},ju=(e,t)=>{const{obj:s,k:i}=ll(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},VM=(e,t,s)=>{const i=ju(e,s);return i!==void 0?i:ju(t,s)},X1=(e,t,s)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(i in e?Ae(e[i])||e[i]instanceof String||Ae(t[i])||t[i]instanceof String?s&&(e[i]=t[i]):X1(e[i],t[i],s):e[i]=t[i]);return e},Oo=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var BM={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const UM=e=>Ae(e)?e.replace(/[&<>"'\/]/g,t=>BM[t]):e;class HM{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 IM=[" ",",","?","!",";"],FM=new HM(20),qM=(e,t,s)=>{t=t||"",s=s||"";const i=IM.filter(u=>t.indexOf(u)<0&&s.indexOf(u)<0);if(i.length===0)return!0;const r=FM.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},Em=(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,d="";for(let f=l;f<i.length;++f)if(f!==l&&(d+=s),d+=i[f],u=r[d],u!==void 0){if(["string","number","boolean"].indexOf(typeof u)>-1&&f<i.length-1)continue;l+=f-l+1;break}r=u}return r},gl=e=>e?.replace("_","-"),$M={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 Nu{constructor(t,s={}){this.init(t,s)}init(t,s={}){this.prefix=s.prefix||"i18next:",this.logger=t||$M,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:(Ae(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[s](t))}create(t){return new Nu(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Nu(this.logger,t)}}var Oa=new Nu;class Zu{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 Gb extends Zu{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 d;t.indexOf(".")>-1?d=t.split("."):(d=[t,s],i&&(Array.isArray(i)?d.push(...i):Ae(i)&&l?d.push(...i.split(l)):d.push(i)));const f=ju(this.data,d);return!f&&!s&&!i&&t.indexOf(".")>-1&&(t=d[0],s=d[1],i=d.slice(2).join(".")),f||!u||!Ae(i)?f:Em(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 d=[t,s];i&&(d=d.concat(u?i.split(u):i)),t.indexOf(".")>-1&&(d=t.split("."),r=s,s=d[1]),this.addNamespaces(s),Yb(this.data,d,r),l.silent||this.emit("added",t,s,i,r)}addResources(t,s,i,r={silent:!1}){for(const l in i)(Ae(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 d=[t,s];t.indexOf(".")>-1&&(d=t.split("."),r=i,i=s,s=d[1]),this.addNamespaces(s);let f=ju(this.data,d)||{};u.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?X1(f,i,l):f={...f,...i},Yb(this.data,d,f),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 Z1={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 Q1=Symbol("i18next/PATH_KEY");function KM(){const e=[],t=Object.create(null);let s;return t.get=(i,r)=>(s?.revoke?.(),r===Q1?e:(e.push(r),s=Proxy.revocable(i,t),s.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ru(e,t){const{[Q1]:s}=e(KM());return s.join(t?.keySeparator??".")}const Xb={},Bh=e=>!Ae(e)&&typeof e!="boolean"&&typeof e!="number";class Mu extends Zu{constructor(t,s={}){super(),kM(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Oa.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=Bh(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,d=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!qM(t,i,r);if(u&&!d){const f=t.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:t,namespaces:Ae(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:Ae(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=Ru(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:d,namespaces:f}=this.extractFromKey(t[t.length-1],r),m=f[f.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}${d}`,usedKey:d,exactUsedKey:d,usedLng:g,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:`${m}${y}${d}`:l?{res:d,usedKey:d,exactUsedKey:d,usedLng:g,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:d;const S=this.resolve(t,r);let C=S?.res;const T=S?.usedKey||d,A=S?.exactUsedKey||d,E=["[object Number]","[object Function]","[object RegExp]"],j=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,_=r.count!==void 0&&!Ae(r.count),M=Mu.hasDefaultValue(r),B=_?this.pluralResolver.getSuffix(g,r.count,r):"",L=r.ordinal&&_?this.pluralResolver.getSuffix(g,r.count,{ordinal:!1}):"",O=_&&!r.ordinal&&r.count===0,K=O&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${B}`]||r[`defaultValue${L}`]||r.defaultValue;let Z=C;R&&!C&&M&&(Z=K);const W=Bh(Z),se=Object.prototype.toString.apply(Z);if(R&&Z&&W&&E.indexOf(se)<0&&!(Ae(j)&&Array.isArray(Z))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const I=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,Z,{...r,ns:f}):`key '${d} (${this.language})' returned an object instead of string.`;return l?(S.res=I,S.usedParams=this.getUsedParamsDetails(r),S):I}if(u){const I=Array.isArray(Z),ne=I?[]:{},le=I?A:T;for(const D in Z)if(Object.prototype.hasOwnProperty.call(Z,D)){const H=`${le}${u}${D}`;M&&!C?ne[D]=this.translate(H,{...r,defaultValue:Bh(K)?K[D]:void 0,joinArrays:!1,ns:f}):ne[D]=this.translate(H,{...r,joinArrays:!1,ns:f}),ne[D]===H&&(ne[D]=Z[D])}C=ne}}else if(R&&Ae(j)&&Array.isArray(C))C=C.join(j),C&&(C=this.extendTranslation(C,t,r,i));else{let I=!1,ne=!1;!this.isValidLookup(C)&&M&&(I=!0,C=K),this.isValidLookup(C)||(ne=!0,C=d);const D=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ne?void 0:C,H=M&&K!==C&&this.options.updateMissing;if(ne||I||H){if(this.logger.log(H?"updateKey":"missingKey",g,m,d,H?K:C),u){const P=this.resolve(d,{...r,keySeparator:!1});P&&P.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 V=[];const oe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&oe&&oe[0])for(let P=0;P<oe.length;P++)V.push(oe[P]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(r.lng||this.language):V.push(r.lng||this.language);const ue=(P,X,G)=>{const te=M&&G!==C?G:D;this.options.missingKeyHandler?this.options.missingKeyHandler(P,m,X,te,H,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(P,m,X,te,H,r),this.emit("missingKey",P,m,X,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?V.forEach(P=>{const X=this.pluralResolver.getSuffixes(P,r);O&&r[`defaultValue${this.options.pluralSeparator}zero`]&&X.indexOf(`${this.options.pluralSeparator}zero`)<0&&X.push(`${this.options.pluralSeparator}zero`),X.forEach(G=>{ue([P],d+G,r[`defaultValue${G}`]||K)})}):ue(V,d,K))}C=this.extendTranslation(C,t,r,S,i),ne&&C===d&&this.options.appendNamespaceToMissingKey&&(C=`${m}${y}${d}`),(ne||I)&&this.options.parseMissingKeyHandler&&(C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${y}${d}`:d,I?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 f=Ae(t)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(f){const g=t.match(this.interpolator.nestingRegexp);m=g&&g.length}let y=i.replace&&!Ae(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),f){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,d=Ae(u)?[u]:u;return t!=null&&d?.length&&i.applyPostProcessor!==!1&&(t=Z1.handle(d,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,d;return Ae(t)&&(t=[t]),t.forEach(f=>{if(this.isValidLookup(i))return;const m=this.extractFromKey(f,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&&!Ae(s.count),S=b&&!s.ordinal&&s.count===0,C=s.context!==void 0&&(Ae(s.context)||typeof s.context=="number")&&s.context!=="",T=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);g.forEach(A=>{this.isValidLookup(i)||(d=A,!Xb[`${T[0]}-${A}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(Xb[`${T[0]}-${A}`]=!0,this.logger.warn(`key "${r}" for languages "${T.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),T.forEach(E=>{if(this.isValidLookup(i))return;u=E;const j=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(j,y,E,A,s);else{let _;b&&(_=this.pluralResolver.getSuffix(E,s.count,s));const M=`${this.options.pluralSeparator}zero`,B=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(s.ordinal&&_.indexOf(B)===0&&j.push(y+_.replace(B,this.options.pluralSeparator)),j.push(y+_),S&&j.push(y+M)),C){const L=`${y}${this.options.contextSeparator||"_"}${s.context}`;j.push(L),b&&(s.ordinal&&_.indexOf(B)===0&&j.push(L+_.replace(B,this.options.pluralSeparator)),j.push(L+_),S&&j.push(L+M))}}let R;for(;R=j.pop();)this.isValidLookup(i)||(l=R,i=this.getResource(E,A,R,s))}))})}),{res:i,usedKey:r,exactUsedKey:l,usedLng:u,usedNS:d}}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&&!Ae(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 Zb{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Oa.create("languageUtils")}getScriptPartFromCode(t){if(t=gl(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=gl(t),!t||t.indexOf("-")<0)return t;const s=t.split("-");return this.formatLanguageCode(s[0])}formatLanguageCode(t){if(Ae(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)),Ae(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 Ae(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))):Ae(t)&&l(this.formatLanguageCode(t)),i.forEach(u=>{r.indexOf(u)<0&&l(this.formatLanguageCode(u))}),r}}const Qb={zero:0,one:1,two:2,few:3,many:4,other:5},Wb={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class YM{constructor(t,s={}){this.languageUtils=t,this.options=s,this.logger=Oa.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,s={}){const i=gl(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!"),Wb;if(!t.match(/-|_/))return Wb;const f=this.languageUtils.getLanguagePartFromCode(t);u=this.getRule(f,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)=>Qb[r]-Qb[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 Jb=(e,t,s,i=".",r=!0)=>{let l=VM(e,t,s);return!l&&r&&Ae(s)&&(l=Em(e,s,i),l===void 0&&(l=Em(t,s,i))),l},Uh=e=>e.replace(/\$/g,"$$$$");class e0{constructor(t={}){this.logger=Oa.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:d,suffixEscaped:f,formatSeparator:m,unescapeSuffix:y,unescapePrefix:g,nestingPrefix:b,nestingPrefixEscaped:S,nestingSuffix:C,nestingSuffixEscaped:T,nestingOptionsSeparator:A,maxReplaces:E,alwaysFormat:j}=t.interpolation;this.escape=s!==void 0?s:UM,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=l?Oo(l):u||"{{",this.suffix=d?Oo(d):f||"}}",this.formatSeparator=m||",",this.unescapePrefix=y?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=b?Oo(b):S||Oo("$t("),this.nestingSuffix=C?Oo(C):T||Oo(")"),this.nestingOptionsSeparator=A||",",this.maxReplaces=E||1e3,this.alwaysFormat=j!==void 0?j:!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,d;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=S=>{if(S.indexOf(this.formatSeparator)<0){const E=Jb(s,f,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(),A=C.join(this.formatSeparator).trim();return this.format(Jb(s,f,T,this.options.keySeparator,this.options.ignoreJSONStructure),A,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=>Uh(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?Uh(this.escape(S)):Uh(S)}].forEach(S=>{for(d=0;l=S.regex.exec(t);){const C=l[1].trim();if(u=m(C),u===void 0)if(typeof y=="function"){const A=y(t,l,r);u=Ae(A)?A:""}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!Ae(u)&&!this.useRawValueToEscape&&(u=qb(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,d++,d>=this.maxReplaces)break}}),t}nest(t,s,i={}){let r,l,u;const d=(f,m)=>{const y=this.nestingOptionsSeparator;if(f.indexOf(y)<0)return f;const g=f.split(new RegExp(`${y}[ ]*{`));let b=`{${g[1]}`;f=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 ${f}`,T),`${f}${y}${b}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,f};for(;r=this.nestingRegexp.exec(t);){let f=[];u={...i},u=u.replace&&!Ae(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&&(f=r[1].slice(m).split(this.formatSeparator).map(y=>y.trim()).filter(Boolean),r[1]=r[1].slice(0,m)),l=s(d.call(this,r[1].trim(),u),u),l&&r[0]===t&&!Ae(l))return l;Ae(l)||(l=qb(l)),l||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${t}`),l=""),f.length&&(l=f.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 GM=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[d,...f]=u.split(":"),m=f.join(":").trim().replace(/^'+|'+$/g,""),y=d.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}},t0=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 d=t[u];return d||(d=e(gl(i),r),t[u]=d),d(s)}},XM=e=>(t,s,i)=>e(gl(s),i)(t);class ZM{constructor(t={}){this.logger=Oa.create("formatter"),this.options=t,this.init(t)}init(t,s={interpolation:{}}){this.formatSeparator=s.interpolation.formatSeparator||",";const i=s.cacheInBuiltFormats?t0:XM;this.formats={number:i((r,l)=>{const u=new Intl.NumberFormat(r,{...l});return d=>u.format(d)}),currency:i((r,l)=>{const u=new Intl.NumberFormat(r,{...l,style:"currency"});return d=>u.format(d)}),datetime:i((r,l)=>{const u=new Intl.DateTimeFormat(r,{...l});return d=>u.format(d)}),relativetime:i((r,l)=>{const u=new Intl.RelativeTimeFormat(r,{...l});return d=>u.format(d,l.range||"day")}),list:i((r,l)=>{const u=new Intl.ListFormat(r,{...l});return d=>u.format(d)})}}add(t,s){this.formats[t.toLowerCase().trim()]=s}addCached(t,s){this.formats[t.toLowerCase().trim()]=t0(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(d=>d.indexOf(")")>-1)){const d=l.findIndex(f=>f.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,d)].join(this.formatSeparator)}return l.reduce((d,f)=>{const{formatName:m,formatOptions:y}=GM(f);if(this.formats[m]){let g=d;try{const b=r?.formatParams?.[r.interpolationkey]||{},S=b.locale||b.lng||r.locale||r.lng||i;g=this.formats[m](d,S,{...y,...r,...b})}catch(b){this.logger.warn(b)}return g}else this.logger.warn(`there was no format function for ${m}`);return d},t)}}const QM=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class WM extends Zu{constructor(t,s,i,r={}){super(),this.backend=t,this.store=s,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=Oa.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={},d={},f={};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),f[g]===void 0&&(f[g]=!0)))}),y||(d[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(d),toLoadNamespaces:Object.keys(f)}}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 d={};this.queue.forEach(f=>{zM(f.loaded,[l],u),QM(f,t),s&&f.errors.push(s),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(m=>{d[m]||(d[m]={});const y=f.loaded[m];y.length&&y.forEach(g=>{d[m][g]===void 0&&(d[m][g]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(f=>!f.done)}read(t,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 d=(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)},f=this.backend[i].bind(this.backend);if(f.length===2){try{const m=f(t,s);m&&typeof m.then=="function"?m.then(y=>d(null,y)).catch(d):d(null,m)}catch(m){d(m)}return}return f(t,s,d)}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();Ae(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ae(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,d)=>{u&&this.logger.warn(`${s}loading namespace ${l} for language ${r} failed`,u),!u&&d&&this.logger.log(`${s}loaded namespace ${l} for language ${r}`,d),this.loaded(t,u,d)})}saveMissing(t,s,i,r,l,u={},d=()=>{}){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 f={...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,f):y=m(t,s,i,r),y&&typeof y.then=="function"?y.then(g=>d(null,g)).catch(d):d(null,y)}catch(y){d(y)}else m(t,s,i,r,d,f)}!t||!t[0]||this.store.addResource(t[0],s,i,r)}}}const Hh=()=>({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]),Ae(e[1])&&(t.defaultValue=e[1]),Ae(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}),n0=e=>(Ae(e.ns)&&(e.ns=[e.ns]),Ae(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ae(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),Wc=()=>{},JM=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(s=>{typeof e[s]=="function"&&(e[s]=e[s].bind(e))})},e2=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 cl extends Zu{constructor(t={},s){if(super(),this.options=n0(t),this.services={},this.logger=Oa,this.modules={external:[]},JM(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&&(Ae(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=Hh();this.options={...i,...this.options,...n0(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&&!e2(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?Oa.init(r(this.modules.logger),this.options):Oa.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=ZM;const y=new Zb(this.options);this.store=new Gb(this.options.resources,this.options);const g=this.services;g.logger=Oa,g.resourceStore=this.store,g.languageUtils=y,g.pluralResolver=new YM(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 e0(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new WM(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 Mu(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=Wc),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 d=nl(),f=()=>{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),d.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?f():setTimeout(f,0),d}loadResources(t,s=Wc){let i=s;const r=Ae(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=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(m=>{m!=="cimode"&&l.indexOf(m)<0&&l.push(m)})};r?u(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),this.options.preload?.forEach?.(d=>u(d)),this.services.backendConnector.load(l,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(d)})}else i(null)}reloadResources(t,s,i){const r=nl();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=Wc),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"&&Z1.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=nl();this.emit("languageChanging",t);const r=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},l=(d,f)=>{f?this.isLanguageChangingTo===t&&(r(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,i.resolve((...m)=>this.t(...m)),s&&s(d,(...m)=>this.t(...m))},u=d=>{!t&&!d&&this.services.languageDetector&&(d=[]);const f=Ae(d)?d:d&&d[0],m=this.store.hasLanguageSomeTranslations(f)?f:this.services.languageUtils.getBestMatchFromCodes(Ae(d)?[d]:d);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,...d)=>{let f;typeof u!="object"?f=this.options.overloadTranslationOptionHandler([l,u].concat(d)):f={...u},f.lng=f.lng||r.lng,f.lngs=f.lngs||r.lngs,f.ns=f.ns||r.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||i||r.keyPrefix);const m=this.options.keySeparator||".";let y;return f.keyPrefix&&Array.isArray(l)?y=l.map(g=>(typeof g=="function"&&(g=Ru(g,{...this.options,...u})),`${f.keyPrefix}${m}${g}`)):(typeof l=="function"&&(l=Ru(l,{...this.options,...u})),y=f.keyPrefix?`${f.keyPrefix}${m}${l}`:l),this.t(y,f)};return Ae(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=(d,f)=>{const m=this.services.backendConnector.state[`${d}|${f}`];return m===-1||m===0||m===2};if(s.precheck){const d=s.precheck(this,u);if(d!==void 0)return d}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=nl();return this.options.ns?(Ae(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=nl();Ae(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 Zb(Hh());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 cl(t,s);return i.createInstance=cl.createInstance,i}cloneInstance(t={},s=Wc){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},l=new cl(r);if((t.debug!==void 0||t.prefix!==void 0)&&(l.logger=l.logger.clone(t)),["store","services","language"].forEach(d=>{l[d]=this[d]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},i){const d=Object.keys(this.store.data).reduce((f,m)=>(f[m]={...this.store.data[m]},f[m]=Object.keys(f[m]).reduce((y,g)=>(y[g]={...f[m][g]},y),f[m]),f),{});l.store=new Gb(d,r),l.services.resourceStore=l.store}if(t.interpolation){const f={...Hh().interpolation,...this.options.interpolation,...t.interpolation},m={...r,interpolation:f};l.services.interpolator=new e0(m)}return l.translator=new Mu(l.services,r),l.translator.on("*",(d,...f)=>{l.emit(d,...f)}),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 st=cl.createInstance();st.createInstance;st.dir;st.init;st.loadResources;st.reloadResources;st.use;st.changeLanguage;st.getFixedT;st.t;st.exists;st.setDefaultNamespace;st.hasLoadedNamespace;st.loadNamespaces;st.loadLanguages;var Ih,a0;function t2(){return a0||(a0=1,Ih={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}),Ih}var n2=t2();const a2=Sp(n2);var s2=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function s0(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},s=e.match(/<\/?([^\s]+?)[/\s>]/);if(s&&(t.name=s[1],(a2[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(s2),l=null;(l=r.exec(e))!==null;)if(l[0].trim())if(l[1]){var u=l[1].trim(),d=[u,""];u.indexOf("=")>-1&&(d=u.split("=")),t.attrs[d[0]]=d[1],r.lastIndex--}else l[2]&&(t.attrs[l[2]]=l[3].trim().substring(1,l[3].length-1));return t}var i2=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,o2=/^\s*$/,r2=Object.create(null);function W1(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(W1,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var l2={parse:function(e,t){t||(t={}),t.components||(t.components=r2);var s,i=[],r=[],l=-1,u=!1;if(e.indexOf("<")!==0){var d=e.indexOf("<");i.push({type:"text",content:d===-1?e:e.substring(0,d)})}return e.replace(i2,function(f,m){if(u){if(f!=="</"+s.name+">")return;u=!1}var y,g=f.charAt(1)!=="/",b=f.startsWith("<!--"),S=m+f.length,C=e.charAt(S);if(b){var T=s0(f);return l<0?(i.push(T),i):((y=r[l]).children.push(T),i)}if(g&&(l++,(s=s0(f)).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===f.slice(2,-1))&&(l--,s=l===-1?i:r[l]),!u&&C!=="<"&&C)){y=l===-1?i:r[l].children;var A=e.indexOf("<",S),E=e.slice(S,A===-1?void 0:A);o2.test(E)&&(E=" "),(A>-1&&l+y.length>=0||E!==" ")&&y.push({type:"text",content:E})}}),i},stringify:function(e){return e.reduce(function(t,s){return t+W1("",s)},"")}};const pu=(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);En(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...r):console?.warn&&console.warn(...r)},i0={},Qu=(e,t,s,i)=>{En(s)&&i0[s]||(En(s)&&(i0[s]=new Date),pu(e,t,s,i))},J1=(e,t)=>()=>{if(e.isInitialized)t();else{const s=()=>{setTimeout(()=>{e.off("initialized",s)},0),t()};e.on("initialized",s)}},Am=(e,t,s)=>{e.loadNamespaces(t,J1(e,s))},o0=(e,t,s,i)=>{if(En(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Am(e,s,i);s.forEach(r=>{e.options.ns.indexOf(r)<0&&e.options.ns.push(r)}),e.loadLanguages(t,J1(e,i))},c2=(e,t,s={})=>!t.languages||!t.languages.length?(Qu(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}}),En=e=>typeof e=="string",hs=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,d2={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},f2=e=>d2[e],ew=e=>e.replace(u2,f2);let jm={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ew,transDefaultProps:void 0};const h2=(e={})=>{jm={...jm,...e}},Op=()=>jm;let tw;const m2=e=>{tw=e},Dp=()=>tw,gu=(e,t)=>{if(!e)return!1;const s=e.props?.children??e.children;return t?s.length>0:!!s},vu=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?Oi(t):t},p2=e=>Array.isArray(e)&&e.every(x.isValidElement),Oi=e=>Array.isArray(e)?e:[e],g2=(e,t)=>{const s={...t};return s.props={...t.props,...e.props},s},v2=e=>{const t={};if(!e)return t;const s=i=>{Oi(i).forEach(l=>{En(l)||(gu(l)?s(vu(l)):hs(l)&&!x.isValidElement(l)&&Object.assign(t,l))})};return s(e),t},nw=(e,t,s,i)=>{if(!e)return"";let r="";const l=Oi(e),u=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return l.forEach((d,f)=>{if(En(d)){r+=`${d}`;return}if(x.isValidElement(d)){const{props:m,type:y}=d,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+=`<${f}></${f}>`;return}if(b&&g===1&&En(S)){r+=`<${y}>${S}</${y}>`;return}const C=nw(S,t,s,i);r+=`<${f}>${C}</${f}>`;return}if(d===null){pu(s,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:i});return}if(hs(d)){const{format:m,...y}=d,g=Object.keys(y);if(g.length===1){const b=m?`${g[0]}, ${m}`:g[0];r+=`{{${b}}}`;return}pu(s,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:i,child:d});return}pu(s,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:i,child:d})}),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 d=!1;const f=e.slice(u).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(f){const m=f[1];(/^\d+$/.test(m)||r.includes(m))&&(d=!0,l+=f[0],u+=f[0].length)}if(!d){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))&&(d=!0,l+=m[0],u+=m[0].length)}}d||(l+="<",u+=1)}else l+=e[u],u+=1;return l},x2=(e,t,s,i,r,l,u)=>{if(s==="")return[];const d=r.transKeepBasicHtmlNodesFor||[],f=s&&new RegExp(d.map(j=>`<${j}`).join("|")).test(s);if(!e&&!t&&!f&&!u)return[s];const m=t??{},y=j=>{Oi(j).forEach(_=>{En(_)||(gu(_)?y(vu(_)):hs(_)&&!x.isValidElement(_)&&Object.assign(m,_))})};y(e);const g=y2(s,d,m),b=l2.parse(`<0>${g}</0>`),S={...m,...l},C=(j,R,_)=>{const M=vu(j),B=A(M,R.children,_);return p2(M)&&B.length===0||j.props?.i18nIsDynamicList?M:B},T=(j,R,_,M,B)=>{j.dummy?(j.children=R,_.push(x.cloneElement(j,{key:M},B?void 0:R))):_.push(...x.Children.map([j],L=>{const O="data-i18n-is-dynamic-list",K={key:M,[O]:void 0};return L&&L.props&&Object.keys(L.props).forEach(Z=>{Z==="ref"||Z==="children"||Z==="i18nIsDynamicList"||Z===O||(K[Z]=L.props[Z])}),x.cloneElement(L,K,B?null:R)}))},A=(j,R,_)=>{const M=Oi(j);return Oi(R).reduce((L,O,K)=>{const Z=O.children?.[0]?.content&&i.services.interpolator.interpolate(O.children[0].content,S,i.language);if(O.type==="tag"){let W=M[parseInt(O.name,10)];!W&&t&&(W=t[O.name]),_.length===1&&!W&&(W=_[0][O.name]),W||(W={});const se={...O.attrs};u&&Object.keys(se).forEach(V=>{const oe=se[V];En(oe)&&(se[V]=ew(oe))});const I=Object.keys(se).length!==0?g2({props:se},W):W,ne=x.isValidElement(I),le=ne&&gu(O,!0)&&!O.voidElement,D=f&&hs(I)&&I.dummy&&!ne,H=hs(t)&&Object.hasOwnProperty.call(t,O.name);if(En(I)){const V=i.services.interpolator.interpolate(I,S,i.language);L.push(V)}else if(gu(I)||le){const V=C(I,O,_);T(I,V,L,K)}else if(D){const V=A(M,O.children,_);T(I,V,L,K)}else if(Number.isNaN(parseFloat(O.name)))if(H){const V=C(I,O,_);T(I,V,L,K,O.voidElement)}else if(r.transSupportBasicHtmlNodes&&d.indexOf(O.name)>-1)if(O.voidElement)L.push(x.createElement(O.name,{key:`${O.name}-${K}`}));else{const V=A(M,O.children,_);L.push(x.createElement(O.name,{key:`${O.name}-${K}`},V))}else if(O.voidElement)L.push(`<${O.name} />`);else{const V=A(M,O.children,_);L.push(`<${O.name}>${V}</${O.name}>`)}else if(hs(I)&&!ne){const V=O.children[0]?Z:null;V&&L.push(V)}else T(I,Z,L,K,O.children.length!==1||!Z)}else if(O.type==="text"){const W=r.transWrapTextNodes,se=typeof r.unescape=="function"?r.unescape:Op().unescape,I=u?se(i.services.interpolator.interpolate(O.content,S,i.language)):i.services.interpolator.interpolate(O.content,S,i.language);W?L.push(x.createElement(W,{key:`${O.name}-${K}`},I)):L.push(I)}return L},[])},E=A([{dummy:!0,children:e||[]}],b,Oi(e||[]));return vu(E[0])},aw=(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})},b2=(e,t)=>e.map((s,i)=>aw(s,i,t)),S2=(e,t)=>{const s={};return Object.keys(e).forEach(i=>{Object.assign(s,{[i]:aw(e[i],i,t)})}),s},w2=(e,t,s,i)=>e?Array.isArray(e)?b2(e,t):hs(e)?S2(e,t):(Qu(s,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:i}),null):null,C2=e=>!hs(e)||Array.isArray(e)?!1:Object.keys(e).reduce((t,s)=>t&&Number.isNaN(Number.parseFloat(s)),!0);function T2({children:e,count:t,parent:s,i18nKey:i,context:r,tOptions:l={},values:u,defaults:d,components:f,ns:m,i18n:y,t:g,shouldUnescape:b,...S}){const C=y||Dp();if(!C)return Qu(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)||(ue=>ue),A={...Op(),...C.options?.react};let E=m||T.ns||C.options?.defaultNS;E=En(E)?[E]:E||["translation"];const{transDefaultProps:j}=A,R=j?.tOptions?{...j.tOptions,...l}:l,_=b??j?.shouldUnescape,M=j?.values?{...j.values,...u}:u,B=j?.components?{...j.components,...f}:f,L=nw(e,A,C,i),O=d||R?.defaultValue||L||A.transEmptyNodeValue||(typeof i=="function"?Ru(i):i),{hashTransKey:K}=A,Z=i||(K?K(L||O):L||O);C.options?.interpolation?.defaultVariables?u=M&&Object.keys(M).length>0?{...M,...C.options.interpolation.defaultVariables}:{...C.options.interpolation.defaultVariables}:u=M;const W=v2(e);W&&typeof W.count=="number"&&t===void 0&&(t=W.count);const se=u||t!==void 0&&!C.options?.interpolation?.alwaysFormat||!e?R.interpolation:{interpolation:{...R.interpolation,prefix:"#$?",suffix:"?$#"}},I={...R,context:r||R.context,count:t,...u,...se,defaultValue:O,ns:E};let ne=Z?T(Z,I):O;ne===Z&&O&&(ne=O);const le=w2(B,ne,C,i);let D=le||e,H=null;C2(le)&&(H=le,D=e);const V=x2(D,H,ne,C,A,I,_),oe=s??A.defaultTransParent;return oe?x.createElement(oe,S,V):V}const E2={type:"3rdParty",init(e){h2(e.options.react),m2(e)}},sw=x.createContext();class A2{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function r0({children:e,count:t,parent:s,i18nKey:i,context:r,tOptions:l={},values:u,defaults:d,components:f,ns:m,i18n:y,t:g,shouldUnescape:b,...S}){const{i18n:C,defaultNS:T}=x.useContext(sw)||{},A=y||C||Dp(),E=g||A?.t.bind(A);return T2({children:e,count:t,parent:s,i18nKey:i,context:r,tOptions:l,values:u,defaults:d,components:f,ns:m||E?.ns||T||A?.options?.defaultNS,i18n:A,t:g,shouldUnescape:b,...S})}var Fh={exports:{}},qh={};var l0;function j2(){if(l0)return qh;l0=1;var e=Yu();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 d(g,b){var S=b(),C=i({inst:{value:S,getSnapshot:b}}),T=C[0].inst,A=C[1];return l(function(){T.value=S,T.getSnapshot=b,f(T)&&A({inst:T})},[g,S,b]),r(function(){return f(T)&&A({inst:T}),g(function(){f(T)&&A({inst:T})})},[g]),u(S),S}function f(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:d;return qh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,qh}var c0;function N2(){return c0||(c0=1,Fh.exports=j2()),Fh.exports}var R2=N2();const M2=(e,t)=>En(t)?t:hs(t)&&En(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,_2={t:M2,ready:!1},O2=()=>()=>{},$e=(e,t={})=>{const{i18n:s}=t,{i18n:i,defaultNS:r}=x.useContext(sw)||{},l=s||i||Dp();l&&!l.reportNamespaces&&(l.reportNamespaces=new A2),l||Qu(l,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const u=x.useMemo(()=>({...Op(),...l?.options?.react,...t}),[l,t]),{useSuspense:d,keyPrefix:f}=u,m=r||l?.options?.defaultNS,y=En(m)?[m]:m||["translation"],g=x.useMemo(()=>y,y);l?.reportNamespaces?.addUsedNamespaces?.(g);const b=x.useRef(0),S=x.useCallback(K=>{if(!l)return O2;const{bindI18n:Z,bindI18nStore:W}=u,se=()=>{b.current+=1,K()};return Z&&l.on(Z,se),W&&l.store.on(W,se),()=>{Z&&Z.split(" ").forEach(I=>l.off(I,se)),W&&W.split(" ").forEach(I=>l.store.off(I,se))}},[l,u]),C=x.useRef(),T=x.useCallback(()=>{if(!l)return _2;const K=!!(l.isInitialized||l.initializedStoreOnce)&&g.every(le=>c2(le,l,u)),Z=t.lng||l.language,W=b.current,se=C.current;if(se&&se.ready===K&&se.lng===Z&&se.keyPrefix===f&&se.revision===W)return se;const ne={t:l.getFixedT(Z,u.nsMode==="fallback"?g:g[0],f),ready:K,lng:Z,keyPrefix:f,revision:W};return C.current=ne,ne},[l,g,f,u,t.lng]),[A,E]=x.useState(0),{t:j,ready:R}=R2.useSyncExternalStore(S,T,T);x.useEffect(()=>{if(l&&!R&&!d){const K=()=>E(Z=>Z+1);t.lng?o0(l,t.lng,g,K):Am(l,g,K)}},[l,t.lng,g,R,d,A]);const _=l||{},M=x.useRef(null),B=x.useRef(),L=K=>{const Z=Object.getOwnPropertyDescriptors(K);Z.__original&&delete Z.__original;const W=Object.create(Object.getPrototypeOf(K),Z);if(!Object.prototype.hasOwnProperty.call(W,"__original"))try{Object.defineProperty(W,"__original",{value:K,writable:!1,enumerable:!1,configurable:!1})}catch{}return W},O=x.useMemo(()=>{const K=_,Z=K?.language;let W=K;K&&(M.current&&M.current.__original===K?B.current!==Z?(W=L(K),M.current=W,B.current=Z):W=M.current:(W=L(K),M.current=W,B.current=Z));const se=[j,W,R];return se.t=j,se.i18n=W,se.ready=R,se},[j,_,R,_.resolvedLanguage,_.language,_.languages]);if(l&&d&&!R)throw new Promise(K=>{const Z=()=>K();t.lng?o0(l,t.lng,g,Z):Am(l,g,Z)});return O},D2={title:"Copilot API Admin",language:"Language"},P2={enUS:"English",zhCN:"简体中文"},k2={accounts:"Accounts",requests:"Requests",models:"Models",settings:"Settings",openNavigation:"Open navigation"},L2={label:"Theme",system:"System",light:"Light",dark:"Dark"},z2={label:"Motion",magic:"Magic",subtle:"Subtle",off:"Off",reducedMotionEnabled:"Reduced motion is enabled in system settings"},V2={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",cost:"Cost",quota:"Quota",durationAbbrev:"Dur",loading:"Loading...",loadMore:"Load more",noMore:"No more",clearFilters:"Clear filters",back:"Back",download:"Download",copyJson:"Copy JSON"},B2={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"}},U2={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",premiumReq:"Premium req",empty:{noAccountsTitle:"No accounts",noMatchesTitle:"No matches",noAccountsDescription:"No accounts found.",noMatchesDescription:"No accounts match the current filter."},premiumQuotaUsedAria:"Premium interactions quota used"},H2={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:"from_ms must be a number (milliseconds)",toMsMustBeNumber:"to_ms must be a number (milliseconds)",fromMsMustBeLteToMs:"from_ms must be <= to_ms"},empty:{noRequestsTitle:"No requests",noResultsForFilters:"No results for the current filters.",noRequestsFound:"No requests found."},affinityHit:"Affinity cache hit"},I2={title:"Models",description:"View available models and their metadata.",totalCount:"{{count}} models",loadFailedTitle:"Failed to load models",toast:{loadFailed:"Failed to load models"},columns:{name:"Model",endpoints:"Endpoints",originalId:"Model ID",aliases:"Aliases",context:"Context",features:"Features",multiplier:"Multiplier"},contextTooltip:"↓ Max input tokens: {{input}} | ↑ Max output tokens: {{output}}",badges:{preview:"preview",premium:"premium"},features:{tools:"tools",vision:"vision",structuredOutputs:"structured",streaming:"streaming",parallelTools:"parallel tools"},empty:{title:"No models",description:"No models found."}},F2={loadFailedTitle:"Failed to load request",title:"Request",notFoundTitle:"Request not found",notFoundDescription:"Request not found.",summaryTitle:"Summary",rawTitle:"Raw",rawDescription:"Full record as JSON.",searchPlaceholder:"Search key/value",toast:{copiedJson:"Copied JSON",copyFailed:"Copy failed",downloadedJson:"Downloaded JSON",downloadFailed:"Download failed"},fields:{time:"time",path:"path",endpoint:"endpoint",account:"account",userId:"user_id",safetyIdentifier:"safety_identifier",promptCacheKey:"prompt_cache_key",initiator:"initiator",upstreamRequestId:"upstream_request_id",model:"model",client:"client",tokens:"tokens",quota:"quota",affinityHit:"affinity hit",affinityCacheKey:"affinity_cache_key"},badges:{durMs:"dur_ms",ttfbMs:"ttfb_ms"},tokens:{in:"in",out:"out",total:"total",cached:"cached"},quota:{before:"before",after:"after",diff:"diff"}},q2={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}}"},$2={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"},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.",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:"Use function apply_patch",useFunctionApplyPatchHint:"Enables function-level patches in responses routing.",forceAgentLabel:"Force agent header",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:"Compact uses small model",compactUseSmallModelHint:"When enabled, compact requests use the configured smallModel; otherwise they use the requested model.",messageStartInputTokensFallbackLabel:"Estimate input tokens at stream start",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:"Responses API context_management models",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"}},K2={title:"Not found",description:"The page you are looking for does not exist."},Y2={app:D2,locale:P2,nav:k2,theme:L2,motion:z2,common:V2,tokenDialog:B2,accountsPage:U2,requestsPage:H2,modelsPage:I2,requestDetailPage:F2,jsonViewer:q2,settingsPage:$2,notFound:K2},G2={title:"Copilot API 管理后台",language:"语言"},X2={enUS:"English",zhCN:"简体中文"},Z2={accounts:"账号",requests:"请求",models:"模型",settings:"设置",openNavigation:"打开导航"},Q2={label:"主题",system:"跟随系统",light:"浅色",dark:"深色"},W2={label:"动效",magic:"炫酷",subtle:"柔和",off:"关闭",reducedMotionEnabled:"系统设置已启用减少动态效果"},J2={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:"模型",cost:"成本",quota:"额度",durationAbbrev:"耗时",loading:"加载中…",loadMore:"加载更多",noMore:"没有更多",clearFilters:"清除筛选",back:"返回",download:"下载",copyJson:"复制 JSON"},e_={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 已清除"}},t_={loadFailedTitle:"加载账号失败",statsWindowLabel:"统计窗口",window:{last24h:"最近 24 小时",last7d:"最近 7 天",thisMonth:"本月"},dbInfo:"DB v{{version}} · {{path}}",tableDescription:"点击账号可筛选请求。",filterAccountPlaceholder:"筛选账号",premiumReq:"Premium 请求",empty:{noAccountsTitle:"无账号",noMatchesTitle:"无匹配结果",noAccountsDescription:"未找到账号。",noMatchesDescription:"没有账号匹配当前筛选条件。"},premiumQuotaUsedAria:"Premium 交互额度使用量"},n_={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:"from_ms 必须是数字(毫秒)",toMsMustBeNumber:"to_ms 必须是数字(毫秒)",fromMsMustBeLteToMs:"from_ms 必须 <= to_ms"},empty:{noRequestsTitle:"无请求",noResultsForFilters:"当前筛选条件下没有结果。",noRequestsFound:"未找到请求。"},affinityHit:"命中亲和性缓存"},a_={title:"模型",description:"查看当前可用模型及其元数据。",totalCount:"共 {{count}} 个模型",loadFailedTitle:"加载模型失败",toast:{loadFailed:"加载模型失败"},columns:{name:"模型",endpoints:"端点",originalId:"模型ID",aliases:"别名",context:"上下文大小",features:"功能",multiplier:"乘数"},contextTooltip:"↓ 最大输入令牌数:{{input}} | ↑ 最大输出令牌数:{{output}}",badges:{preview:"预览",premium:"高级"},features:{tools:"工具",vision:"视觉",structuredOutputs:"结构化",streaming:"流式",parallelTools:"并行工具"},empty:{title:"无模型",description:"未找到模型。"}},s_={loadFailedTitle:"加载请求详情失败",title:"请求",notFoundTitle:"请求不存在",notFoundDescription:"请求不存在。",summaryTitle:"摘要",rawTitle:"原始数据",rawDescription:"完整记录(JSON)。",searchPlaceholder:"搜索键/值",toast:{copiedJson:"已复制 JSON",copyFailed:"复制失败",downloadedJson:"已下载 JSON",downloadFailed:"下载失败"},fields:{time:"时间",path:"路径",endpoint:"端点",account:"账号",userId:"user_id",safetyIdentifier:"safety_identifier",promptCacheKey:"prompt_cache_key",initiator:"initiator",upstreamRequestId:"upstream_request_id",model:"模型",client:"客户端",tokens:"tokens",quota:"额度",affinityHit:"亲和性命中",affinityCacheKey:"affinity_cache_key"},badges:{durMs:"dur_ms",ttfbMs:"ttfb_ms"},tokens:{in:"输入",out:"输出",total:"总计",cached:"缓存"},quota:{before:"之前",after:"之后",diff:"变化"}},i_={expand:"展开",collapse:"折叠",root:"(根)",more:"… 还有 {{count}} 项",arrayLabel:"数组({{count}})",objectLabel:"对象({{count}})",expandAll:"全部展开",collapseAll:"全部折叠",statusCollapsed:"已折叠",statusExpanded:"已展开",statusDepth:"层级<{{depth}}"},o_={subtitle:"管理服务端配置和功能开关。",configPath:"配置路径:{{path}}",note:"更改在保存后生效。",errorTitle:"加载设置失败",sections:{general:"通用",accountAffinity:"账号亲和性",reasoning:"推理",aliases:"别名",prompts:"提示词",advanced:"高级"},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:"功能开关与实验选项。",modelRefreshIntervalLabel:"模型列表刷新间隔(小时)",modelRefreshIntervalHint:"设置为 0 表示关闭自动刷新。",modelRefreshIntervalError:"必须是非负数字。",allowOriginalModelNamesLabel:"允许原始模型名",allowOriginalModelNamesHint:"当别名未覆盖时的默认行为。",useFunctionApplyPatchLabel:"启用 function apply_patch",useFunctionApplyPatchHint:"在响应路由中启用函数级补丁。",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 context_management 模型列表",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"}},r_={title:"未找到页面",description:"你访问的页面不存在。"},l_={app:G2,locale:X2,nav:Z2,theme:Q2,motion:W2,common:J2,tokenDialog:e_,accountsPage:t_,requestsPage:n_,modelsPage:a_,requestDetailPage:s_,jsonViewer:i_,settingsPage:o_,notFound:r_},vl="en-US",c_=["en-US","zh-CN"],iw="locale";function Nm(e){if(!e)return vl;const t=e.toLowerCase().trim().replace(/_/g,"-");return t.startsWith("zh")?"zh-CN":t.startsWith("en")?"en-US":vl}function ow(){if(typeof window>"u")return vl;try{const e=globalThis.localStorage.getItem(iw);if(e)return Nm(e);const t=Array.isArray(navigator.languages)&&navigator.languages[0]||navigator.language;return Nm(t)}catch{return vl}}st.use(E2).init({resources:{"en-US":{translation:Y2},"zh-CN":{translation:l_}},lng:ow(),fallbackLng:vl,supportedLngs:[...c_],interpolation:{escapeValue:!1},react:{useSuspense:!1},initImmediate:!1});const u_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),d_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,s,i)=>i?i.toUpperCase():s.toLowerCase()),u0=e=>{const t=d_(e);return t.charAt(0).toUpperCase()+t.slice(1)},rw=(...e)=>e.filter((t,s,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===s).join(" ").trim(),f_=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var h_={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 m_=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:r="",children:l,iconNode:u,...d},f)=>x.createElement("svg",{ref:f,...h_,width:t,height:t,stroke:e,strokeWidth:i?Number(s)*24/Number(t):s,className:rw("lucide",r),...!l&&!f_(d)&&{"aria-hidden":"true"},...d},[...u.map(([m,y])=>x.createElement(m,y)),...Array.isArray(l)?l:[l]]));const jt=(e,t)=>{const s=x.forwardRef(({className:i,...r},l)=>x.createElement(m_,{ref:l,iconNode:t,className:rw(`lucide-${u_(u0(e))}`,`lucide-${e}`,i),...r}));return s.displayName=u0(e),s};const p_=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],g_=jt("arrow-left",p_);const v_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],y_=jt("check",v_);const x_=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Pp=jt("chevron-down",x_);const b_=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],S_=jt("chevron-right",b_);const w_=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],C_=jt("chevron-up",w_);const T_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],lw=jt("circle-check",T_);const E_=[["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"}]],A_=jt("download",E_);const j_=[["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"}]],N_=jt("eye-off",j_);const R_=[["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"}]],M_=jt("eye",R_);const __=[["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"}]],O_=jt("globe",__);const D_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],cw=jt("info",D_);const P_=[["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"}]],k_=jt("key-round",P_);const L_=[["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"}]],z_=jt("laptop",L_);const V_=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],B_=jt("loader-circle",V_);const U_=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],H_=jt("menu",U_);const I_=[["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"}]],F_=jt("moon",I_);const q_=[["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"}]],uw=jt("octagon-x",q_);const $_=[["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"}]],K_=jt("sun",$_);const Y_=[["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"}]],dw=jt("triangle-alert",Y_);const G_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fw=jt("x",G_),hw=x.createContext(null),Rm="magic",X_={preference:Rm,effective:Rm,reducedMotion:!1,setPreference:()=>{}};function Z_({children:e}){return x.useEffect(()=>{document.documentElement.dataset.motion=Rm},[]),h.jsx(hw.Provider,{value:X_,children:e})}function Wu(){const e=x.useContext(hw);if(!e)throw new Error("useMotionPreference must be used within MotionPreferenceProvider");return e}function mw(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=mw(e[t]))&&(i&&(i+=" "),i+=s)}else for(s in e)e[s]&&(i&&(i+=" "),i+=s);return i}function pw(){for(var e,t,s=0,i="",r=arguments.length;s<r;s++)(e=arguments[s])&&(t=mw(e))&&(i&&(i+=" "),i+=t);return i}const Q_=(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},W_=(e,t)=>({classGroupId:e,validator:t}),gw=(e=new Map,t=null,s)=>({nextPart:e,validators:t,classGroupId:s}),_u="-",d0=[],J_="arbitrary..",eO=e=>{const t=nO(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return tO(u);const d=u.split(_u),f=d[0]===""&&d.length>1?1:0;return vw(d,f,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=i[u],m=s[u];return f?m?Q_(m,f):f:m||d0}return s[u]||d0}}},vw=(e,t,s)=>{if(e.length-t===0)return s.classGroupId;const r=e[t],l=s.nextPart.get(r);if(l){const m=vw(e,t+1,l);if(m)return m}const u=s.validators;if(u===null)return;const d=t===0?e.join(_u):e.slice(t).join(_u),f=u.length;for(let m=0;m<f;m++){const y=u[m];if(y.validator(d))return y.classGroupId}},tO=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?J_+i:void 0})(),nO=e=>{const{theme:t,classGroups:s}=e;return aO(s,t)},aO=(e,t)=>{const s=gw();for(const i in e){const r=e[i];kp(r,s,i,t)}return s},kp=(e,t,s,i)=>{const r=e.length;for(let l=0;l<r;l++){const u=e[l];sO(u,t,s,i)}},sO=(e,t,s,i)=>{if(typeof e=="string"){iO(e,t,s);return}if(typeof e=="function"){oO(e,t,s,i);return}rO(e,t,s,i)},iO=(e,t,s)=>{const i=e===""?t:yw(t,e);i.classGroupId=s},oO=(e,t,s,i)=>{if(lO(e)){kp(e(i),t,s,i);return}t.validators===null&&(t.validators=[]),t.validators.push(W_(s,e))},rO=(e,t,s,i)=>{const r=Object.entries(e),l=r.length;for(let u=0;u<l;u++){const[d,f]=r[u];kp(f,yw(t,d),s,i)}},yw=(e,t)=>{let s=e;const i=t.split(_u),r=i.length;for(let l=0;l<r;l++){const u=i[l];let d=s.nextPart.get(u);d||(d=gw(),s.nextPart.set(u,d)),s=d}return s},lO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,cO=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)}}},Mm="!",f0=":",uO=[],h0=(e,t,s,i,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:i,isExternal:r}),dO=e=>{const{prefix:t,experimentalParseClassName:s}=e;let i=r=>{const l=[];let u=0,d=0,f=0,m;const y=r.length;for(let T=0;T<y;T++){const A=r[T];if(u===0&&d===0){if(A===f0){l.push(r.slice(f,T)),f=T+1;continue}if(A==="/"){m=T;continue}}A==="["?u++:A==="]"?u--:A==="("?d++:A===")"&&d--}const g=l.length===0?r:r.slice(f);let b=g,S=!1;g.endsWith(Mm)?(b=g.slice(0,-1),S=!0):g.startsWith(Mm)&&(b=g.slice(1),S=!0);const C=m&&m>f?m-f:void 0;return h0(l,S,b,C)};if(t){const r=t+f0,l=i;i=u=>u.startsWith(r)?l(u.slice(r.length)):h0(uO,!1,u,void 0,!0)}if(s){const r=i;i=l=>s({className:l,parseClassName:r})}return i},fO=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],d=u[0]==="[",f=t.has(u);d||f?(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}},hO=e=>({cache:cO(e.cacheSize),parseClassName:dO(e),sortModifiers:fO(e),...eO(e)}),mO=/\s+/,pO=(e,t)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:r,sortModifiers:l}=t,u=[],d=e.trim().split(mO);let f="";for(let m=d.length-1;m>=0;m-=1){const y=d[m],{isExternal:g,modifiers:b,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:T}=s(y);if(g){f=y+(f.length>0?" "+f:f);continue}let A=!!T,E=i(A?C.substring(0,T):C);if(!E){if(!A){f=y+(f.length>0?" "+f:f);continue}if(E=i(C),!E){f=y+(f.length>0?" "+f:f);continue}A=!1}const j=b.length===0?"":b.length===1?b[0]:l(b).join(":"),R=S?j+Mm:j,_=R+E;if(u.indexOf(_)>-1)continue;u.push(_);const M=r(E,A);for(let B=0;B<M.length;++B){const L=M[B];u.push(R+L)}f=y+(f.length>0?" "+f:f)}return f},gO=(...e)=>{let t=0,s,i,r="";for(;t<e.length;)(s=e[t++])&&(i=xw(s))&&(r&&(r+=" "),r+=i);return r},xw=e=>{if(typeof e=="string")return e;let t,s="";for(let i=0;i<e.length;i++)e[i]&&(t=xw(e[i]))&&(s&&(s+=" "),s+=t);return s},vO=(e,...t)=>{let s,i,r,l;const u=f=>{const m=t.reduce((y,g)=>g(y),e());return s=hO(m),i=s.cache.get,r=s.cache.set,l=d,d(f)},d=f=>{const m=i(f);if(m)return m;const y=pO(f,s);return r(f,y),y};return l=u,(...f)=>l(gO(...f))},yO=[],Dt=e=>{const t=s=>s[e]||yO;return t.isThemeGetter=!0,t},bw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Sw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xO=/^\d+\/\d+$/,bO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SO=/\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$/,wO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,CO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Do=e=>xO.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),Ws=e=>!!e&&Number.isInteger(Number(e)),$h=e=>e.endsWith("%")&&De(e.slice(0,-1)),us=e=>bO.test(e),EO=()=>!0,AO=e=>SO.test(e)&&!wO.test(e),ww=()=>!1,jO=e=>CO.test(e),NO=e=>TO.test(e),RO=e=>!pe(e)&&!ge(e),MO=e=>er(e,Ew,ww),pe=e=>bw.test(e),Ni=e=>er(e,Aw,AO),Kh=e=>er(e,kO,De),m0=e=>er(e,Cw,ww),_O=e=>er(e,Tw,NO),Jc=e=>er(e,jw,jO),ge=e=>Sw.test(e),al=e=>tr(e,Aw),OO=e=>tr(e,LO),p0=e=>tr(e,Cw),DO=e=>tr(e,Ew),PO=e=>tr(e,Tw),eu=e=>tr(e,jw,!0),er=(e,t,s)=>{const i=bw.exec(e);return i?i[1]?t(i[1]):s(i[2]):!1},tr=(e,t,s=!1)=>{const i=Sw.exec(e);return i?i[1]?t(i[1]):s:!1},Cw=e=>e==="position"||e==="percentage",Tw=e=>e==="image"||e==="url",Ew=e=>e==="length"||e==="size"||e==="bg-size",Aw=e=>e==="length",kO=e=>e==="number",LO=e=>e==="family-name",jw=e=>e==="shadow",zO=()=>{const e=Dt("color"),t=Dt("font"),s=Dt("text"),i=Dt("font-weight"),r=Dt("tracking"),l=Dt("leading"),u=Dt("breakpoint"),d=Dt("container"),f=Dt("spacing"),m=Dt("radius"),y=Dt("shadow"),g=Dt("inset-shadow"),b=Dt("text-shadow"),S=Dt("drop-shadow"),C=Dt("blur"),T=Dt("perspective"),A=Dt("aspect"),E=Dt("ease"),j=Dt("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=()=>[..._(),ge,pe],B=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],O=()=>[ge,pe,f],K=()=>[Do,"full","auto",...O()],Z=()=>[Ws,"none","subgrid",ge,pe],W=()=>["auto",{span:["full",Ws,ge,pe]},Ws,ge,pe],se=()=>[Ws,"auto",ge,pe],I=()=>["auto","min","max","fr",ge,pe],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...O()],H=()=>[Do,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],V=()=>[e,ge,pe],oe=()=>[..._(),p0,m0,{position:[ge,pe]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",DO,MO,{size:[ge,pe]}],X=()=>[$h,al,Ni],G=()=>["","none","full",m,ge,pe],te=()=>["",De,al,Ni],ce=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[De,$h,p0,m0],de=()=>["","none",C,ge,pe],Se=()=>["none",De,ge,pe],Ee=()=>["none",De,ge,pe],Ne=()=>[De,ge,pe],_e=()=>[Do,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[us],breakpoint:[us],color:[EO],container:[us],"drop-shadow":[us],ease:["in","out","in-out"],font:[RO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[us],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[us],shadow:[us],spacing:["px",De],text:[us],"text-shadow":[us],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Do,pe,ge,A]}],container:["container"],columns:[{columns:[De,pe,ge,d]}],"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:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{start:K()}],end:[{end:K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[Ws,"auto",ge,pe]}],basis:[{basis:[Do,"full","auto",d,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,Do,"auto","initial","none",pe]}],grow:[{grow:["",De,ge,pe]}],shrink:[{shrink:["",De,ge,pe]}],order:[{order:[Ws,"first","last","none",ge,pe]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[d,"screen",...H()]}],"min-w":[{"min-w":[d,"screen","none",...H()]}],"max-w":[{"max-w":[d,"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,al,Ni]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ge,Kh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$h,pe]}],"font-family":[{font:[OO,pe,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,ge,pe]}],"line-clamp":[{"line-clamp":[De,"none",ge,Kh]}],leading:[{leading:[l,...O()]}],"list-image":[{"list-image":["none",ge,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",ge,Ni]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[De,"auto",ge,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,pe]}],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",ge,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ws,ge,pe],radial:["",ge,pe],conic:[Ws,ge,pe]},PO,_O]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,ge,pe]}],"outline-w":[{outline:["",De,al,Ni]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",y,eu,Jc]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",g,eu,Jc]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[De,Ni]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",b,eu,Jc]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[De,ge,pe]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"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":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[ge,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,pe]}],filter:[{filter:["","none",ge,pe]}],blur:[{blur:de()}],brightness:[{brightness:[De,ge,pe]}],contrast:[{contrast:[De,ge,pe]}],"drop-shadow":[{"drop-shadow":["","none",S,eu,Jc]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",De,ge,pe]}],"hue-rotate":[{"hue-rotate":[De,ge,pe]}],invert:[{invert:["",De,ge,pe]}],saturate:[{saturate:[De,ge,pe]}],sepia:[{sepia:["",De,ge,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,pe]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[De,ge,pe]}],"backdrop-contrast":[{"backdrop-contrast":[De,ge,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,ge,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,ge,pe]}],"backdrop-invert":[{"backdrop-invert":["",De,ge,pe]}],"backdrop-opacity":[{"backdrop-opacity":[De,ge,pe]}],"backdrop-saturate":[{"backdrop-saturate":[De,ge,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",De,ge,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",ge,pe]}],ease:[{ease:["linear","initial",E,ge,pe]}],delay:[{delay:[De,ge,pe]}],animate:[{animate:["none",j,ge,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,ge,pe]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[ge,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",ge,pe]}],"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":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",ge,pe]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[De,al,Ni,Kh]}],stroke:[{stroke:["none",...V()]}],"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"]}},VO=vO(zO);function re(...e){return VO(pw(e))}function _m({children:e,className:t,speed:s=1,colorFrom:i="#ffaa40",colorTo:r="#9c40ff",...l}){const{effective:u}=Wu(),d=u!=="off";return h.jsx("span",{style:{"--bg-size":`${s*300}%`,"--color-from":i,"--color-to":r},className:re("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",d&&"animate-gradient",t),...l,children:e})}function g0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nr(...e){return t=>{let s=!1;const i=e.map(r=>{const l=g0(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():g0(e[r],null)}}}}function ot(...e){return x.useCallback(nr(...e),e)}var BO=Symbol.for("react.lazy"),Ou=wp[" use ".trim().toString()];function UO(e){return typeof e=="object"&&e!==null&&"then"in e}function Nw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===BO&&"_payload"in e&&UO(e._payload)}function Rw(e){const t=HO(e),s=x.forwardRef((i,r)=>{let{children:l,...u}=i;Nw(l)&&typeof Ou=="function"&&(l=Ou(l._payload));const d=x.Children.toArray(l),f=d.find(FO);if(f){const m=f.props.children,y=d.map(g=>g===f?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:g);return h.jsx(t,{...u,ref:r,children:x.isValidElement(m)?x.cloneElement(m,void 0,y):null})}return h.jsx(t,{...u,ref:r,children:l})});return s.displayName=`${e}.Slot`,s}var Lp=Rw("Slot");function HO(e){const t=x.forwardRef((s,i)=>{let{children:r,...l}=s;if(Nw(r)&&typeof Ou=="function"&&(r=Ou(r._payload)),x.isValidElement(r)){const u=$O(r),d=qO(l,r.props);return r.type!==x.Fragment&&(d.ref=i?nr(i,u):u),x.cloneElement(r,d)}return x.Children.count(r)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var IO=Symbol("radix.slottable");function FO(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===IO}function qO(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]=(...d)=>{const f=l(...d);return r(...d),f}:r&&(s[i]=r):i==="style"?s[i]={...r,...l}:i==="className"&&(s[i]=[r,l].filter(Boolean).join(" "))}return{...e,...s}}function $O(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 v0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,y0=pw,zp=(e,t)=>s=>{var i;if(t?.variants==null)return y0(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=v0(y)||v0(g);return r[m][b]}),d=s&&Object.entries(s).reduce((m,y)=>{let[g,b]=y;return b===void 0||(m[g]=b),m},{}),f=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,A]=C;return Array.isArray(A)?A.includes({...l,...d}[T]):{...l,...d}[T]===A})?[...m,g,b]:m},[]);return y0(e,u,f,s?.class,s?.className)},KO=zp("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 pt({className:e,variant:t="default",size:s="default",asChild:i=!1,...r}){const l=i?Lp:"button";return h.jsx(l,{"data-slot":"button","data-variant":t,"data-size":s,className:re(KO({variant:t,size:s,className:e})),...r})}function Oe(e,t,{checkForDefaultPrevented:s=!0}={}){return function(r){if(e?.(r),s===!1||!r.defaultPrevented)return t?.(r)}}function YO(e,t){const s=x.createContext(t),i=l=>{const{children:u,...d}=l,f=x.useMemo(()=>d,Object.values(d));return h.jsx(s.Provider,{value:f,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 Yi(e,t=[]){let s=[];function i(l,u){const d=x.createContext(u),f=s.length;s=[...s,u];const m=g=>{const{scope:b,children:S,...C}=g,T=b?.[e]?.[f]||d,A=x.useMemo(()=>C,Object.values(C));return h.jsx(T.Provider,{value:A,children:S})};m.displayName=l+"Provider";function y(g,b){const S=b?.[e]?.[f]||d,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(d){const f=d?.[e]||l;return x.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return r.scopeName=e,[i,GO(r,...t)]}function GO(...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((d,{useScope:f,scopeName:m})=>{const g=f(l)[`__scope${m}`];return{...d,...g}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return s.scopeName=t.scopeName,s}var sn=globalThis?.document?x.useLayoutEffect:()=>{},XO=wp[" useId ".trim().toString()]||(()=>{}),ZO=0;function ps(e){const[t,s]=x.useState(XO());return sn(()=>{s(i=>i??String(ZO++))},[e]),t?`radix-${t}`:""}var QO=wp[" useInsertionEffect ".trim().toString()]||sn;function Yo({prop:e,defaultProp:t,onChange:s=()=>{},caller:i}){const[r,l,u]=WO({defaultProp:t,onChange:s}),d=e!==void 0,f=d?e:r;{const y=x.useRef(e!==void 0);x.useEffect(()=>{const g=y.current;g!==d&&console.warn(`${i} is changing from ${g?"controlled":"uncontrolled"} to ${d?"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=d},[d,i])}const m=x.useCallback(y=>{if(d){const g=JO(y)?y(e):y;g!==e&&u.current?.(g)}else l(y)},[d,e,l,u]);return[f,m]}function WO({defaultProp:e,onChange:t}){const[s,i]=x.useState(e),r=x.useRef(s),l=x.useRef(t);return QO(()=>{l.current=t},[t]),x.useEffect(()=>{r.current!==s&&(l.current?.(s),r.current=s)},[s,r]),[s,i,l]}function JO(e){return typeof e=="function"}function eD(e){const t=tD(e),s=x.forwardRef((i,r)=>{const{children:l,...u}=i,d=x.Children.toArray(l),f=d.find(aD);if(f){const m=f.props.children,y=d.map(g=>g===f?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:g);return h.jsx(t,{...u,ref:r,children:x.isValidElement(m)?x.cloneElement(m,void 0,y):null})}return h.jsx(t,{...u,ref:r,children:l})});return s.displayName=`${e}.Slot`,s}function tD(e){const t=x.forwardRef((s,i)=>{const{children:r,...l}=s;if(x.isValidElement(r)){const u=iD(r),d=sD(l,r.props);return r.type!==x.Fragment&&(d.ref=i?nr(i,u):u),x.cloneElement(r,d)}return x.Children.count(r)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nD=Symbol("radix.slottable");function aD(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nD}function sD(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]=(...d)=>{const f=l(...d);return r(...d),f}:r&&(s[i]=r):i==="style"?s[i]={...r,...l}:i==="className"&&(s[i]=[r,l].filter(Boolean).join(" "))}return{...e,...s}}function iD(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 oD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=oD.reduce((e,t)=>{const s=eD(`Primitive.${t}`),i=x.forwardRef((r,l)=>{const{asChild:u,...d}=r,f=u?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(f,{...d,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function rD(e,t){e&&Ml.flushSync(()=>e.dispatchEvent(t))}function ni(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...s)=>t.current?.(...s),[])}function lD(e,t=globalThis?.document){const s=ni(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 cD="DismissableLayer",Om="dismissableLayer.update",uD="dismissableLayer.pointerDownOutside",dD="dismissableLayer.focusOutside",x0,Mw=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ju=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=e,m=x.useContext(Mw),[y,g]=x.useState(null),b=y?.ownerDocument??globalThis?.document,[,S]=x.useState({}),C=ot(t,L=>g(L)),T=Array.from(m.layers),[A]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=T.indexOf(A),j=y?T.indexOf(y):-1,R=m.layersWithOutsidePointerEventsDisabled.size>0,_=j>=E,M=mD(L=>{const O=L.target,K=[...m.branches].some(Z=>Z.contains(O));!_||K||(r?.(L),u?.(L),L.defaultPrevented||d?.())},b),B=pD(L=>{const O=L.target;[...m.branches].some(Z=>Z.contains(O))||(l?.(L),u?.(L),L.defaultPrevented||d?.())},b);return lD(L=>{j===m.layers.size-1&&(i?.(L),!L.defaultPrevented&&d&&(L.preventDefault(),d()))},b),x.useEffect(()=>{if(y)return s&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(x0=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),b0(),()=>{s&&m.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=x0)}},[y,b,s,m]),x.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),b0())},[y,m]),x.useEffect(()=>{const L=()=>S({});return document.addEventListener(Om,L),()=>document.removeEventListener(Om,L)},[]),h.jsx(He.div,{...f,ref:C,style:{pointerEvents:R?_?"auto":"none":void 0,...e.style},onFocusCapture:Oe(e.onFocusCapture,B.onFocusCapture),onBlurCapture:Oe(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:Oe(e.onPointerDownCapture,M.onPointerDownCapture)})});Ju.displayName=cD;var fD="DismissableLayerBranch",hD=x.forwardRef((e,t)=>{const s=x.useContext(Mw),i=x.useRef(null),r=ot(t,i);return x.useEffect(()=>{const l=i.current;if(l)return s.branches.add(l),()=>{s.branches.delete(l)}},[s.branches]),h.jsx(He.div,{...e,ref:r})});hD.displayName=fD;function mD(e,t=globalThis?.document){const s=ni(e),i=x.useRef(!1),r=x.useRef(()=>{});return x.useEffect(()=>{const l=d=>{if(d.target&&!i.current){let f=function(){_w(uD,s,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=f,t.addEventListener("click",r.current,{once:!0})):f()}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 pD(e,t=globalThis?.document){const s=ni(e),i=x.useRef(!1);return x.useEffect(()=>{const r=l=>{l.target&&!i.current&&_w(dD,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 b0(){const e=new CustomEvent(Om);document.dispatchEvent(e)}function _w(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?rD(r,l):r.dispatchEvent(l)}var Yh="focusScope.autoFocusOnMount",Gh="focusScope.autoFocusOnUnmount",S0={bubbles:!1,cancelable:!0},gD="FocusScope",Vp=x.forwardRef((e,t)=>{const{loop:s=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:l,...u}=e,[d,f]=x.useState(null),m=ni(r),y=ni(l),g=x.useRef(null),b=ot(t,T=>f(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||!d)return;const _=R.target;d.contains(_)?g.current=_:ei(g.current,{select:!0})},A=function(R){if(S.paused||!d)return;const _=R.relatedTarget;_!==null&&(d.contains(_)||ei(g.current,{select:!0}))},E=function(R){if(document.activeElement===document.body)for(const M of R)M.removedNodes.length>0&&ei(d)};document.addEventListener("focusin",T),document.addEventListener("focusout",A);const j=new MutationObserver(E);return d&&j.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",T),document.removeEventListener("focusout",A),j.disconnect()}}},[i,d,S.paused]),x.useEffect(()=>{if(d){C0.add(S);const T=document.activeElement;if(!d.contains(T)){const E=new CustomEvent(Yh,S0);d.addEventListener(Yh,m),d.dispatchEvent(E),E.defaultPrevented||(vD(wD(Ow(d)),{select:!0}),document.activeElement===T&&ei(d))}return()=>{d.removeEventListener(Yh,m),setTimeout(()=>{const E=new CustomEvent(Gh,S0);d.addEventListener(Gh,y),d.dispatchEvent(E),E.defaultPrevented||ei(T??document.body,{select:!0}),d.removeEventListener(Gh,y),C0.remove(S)},0)}}},[d,m,y,S]);const C=x.useCallback(T=>{if(!s&&!i||S.paused)return;const A=T.key==="Tab"&&!T.altKey&&!T.ctrlKey&&!T.metaKey,E=document.activeElement;if(A&&E){const j=T.currentTarget,[R,_]=yD(j);R&&_?!T.shiftKey&&E===_?(T.preventDefault(),s&&ei(R,{select:!0})):T.shiftKey&&E===R&&(T.preventDefault(),s&&ei(_,{select:!0})):E===j&&T.preventDefault()}},[s,i,S.paused]);return h.jsx(He.div,{tabIndex:-1,...u,ref:b,onKeyDown:C})});Vp.displayName=gD;function vD(e,{select:t=!1}={}){const s=document.activeElement;for(const i of e)if(ei(i,{select:t}),document.activeElement!==s)return}function yD(e){const t=Ow(e),s=w0(t,e),i=w0(t.reverse(),e);return[s,i]}function Ow(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 w0(e,t){for(const s of e)if(!xD(s,{upTo:t}))return s}function xD(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 bD(e){return e instanceof HTMLInputElement&&"select"in e}function ei(e,{select:t=!1}={}){if(e&&e.focus){const s=document.activeElement;e.focus({preventScroll:!0}),e!==s&&bD(e)&&t&&e.select()}}var C0=SD();function SD(){let e=[];return{add(t){const s=e[0];t!==s&&s?.pause(),e=T0(e,t),e.unshift(t)},remove(t){e=T0(e,t),e[0]?.resume()}}}function T0(e,t){const s=[...e],i=s.indexOf(t);return i!==-1&&s.splice(i,1),s}function wD(e){return e.filter(t=>t.tagName!=="A")}var CD="Portal",ed=x.forwardRef((e,t)=>{const{container:s,...i}=e,[r,l]=x.useState(!1);sn(()=>l(!0),[]);const u=s||r&&globalThis?.document?.body;return u?K1.createPortal(h.jsx(He.div,{...i,ref:t}),u):null});ed.displayName=CD;function TD(e,t){return x.useReducer((s,i)=>t[s][i]??s,e)}var Gi=e=>{const{present:t,children:s}=e,i=ED(t),r=typeof s=="function"?s({present:i.isPresent}):x.Children.only(s),l=ot(i.ref,AD(r));return typeof s=="function"||i.isPresent?x.cloneElement(r,{ref:l}):null};Gi.displayName="Presence";function ED(e){const[t,s]=x.useState(),i=x.useRef(null),r=x.useRef(e),l=x.useRef("none"),u=e?"mounted":"unmounted",[d,f]=TD(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const m=tu(i.current);l.current=d==="mounted"?m:"none"},[d]),sn(()=>{const m=i.current,y=r.current;if(y!==e){const b=l.current,S=tu(m);e?f("MOUNT"):S==="none"||m?.display==="none"?f("UNMOUNT"):f(y&&b!==S?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,f]),sn(()=>{if(t){let m;const y=t.ownerDocument.defaultView??window,g=S=>{const T=tu(i.current).includes(CSS.escape(S.animationName));if(S.target===t&&T&&(f("ANIMATION_END"),!r.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",m=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},b=S=>{S.target===t&&(l.current=tu(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 f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:x.useCallback(m=>{i.current=m?getComputedStyle(m):null,s(m)},[])}}function tu(e){return e?.animationName||"none"}function AD(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 Xh=0;function Dw(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??E0()),document.body.insertAdjacentElement("beforeend",e[1]??E0()),Xh++,()=>{Xh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xh--}},[])}function E0(){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 _a=function(){return _a=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},_a.apply(this,arguments)};function Pw(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 jD(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 yu="right-scroll-bar-position",xu="width-before-scroll-bar",ND="with-scroll-bars-hidden",RD="--removed-body-scroll-bar-size";function Zh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function MD(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 _D=typeof window<"u"?x.useLayoutEffect:x.useEffect,A0=new WeakMap;function OD(e,t){var s=MD(null,function(i){return e.forEach(function(r){return Zh(r,i)})});return _D(function(){var i=A0.get(s);if(i){var r=new Set(i),l=new Set(e),u=s.current;r.forEach(function(d){l.has(d)||Zh(d,null)}),l.forEach(function(d){r.has(d)||Zh(d,u)})}A0.set(s,e)},[e]),s}function DD(e){return e}function PD(e,t){t===void 0&&(t=DD);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(d){return d!==u})}},assignSyncMedium:function(l){for(i=!0;s.length;){var u=s;s=[],u.forEach(l)}s={push:function(d){return l(d)},filter:function(){return s}}},assignMedium:function(l){i=!0;var u=[];if(s.length){var d=s;s=[],d.forEach(l),u=s}var f=function(){var y=u;u=[],y.forEach(l)},m=function(){return Promise.resolve().then(f)};m(),s={push:function(y){u.push(y),m()},filter:function(y){return u=u.filter(y),s}}}};return r}function kD(e){e===void 0&&(e={});var t=PD(null);return t.options=_a({async:!0,ssr:!1},e),t}var kw=function(e){var t=e.sideCar,s=Pw(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,_a({},s))};kw.isSideCarExport=!0;function LD(e,t){return e.useMedium(t),kw}var Lw=kD(),Qh=function(){},td=x.forwardRef(function(e,t){var s=x.useRef(null),i=x.useState({onScrollCapture:Qh,onWheelCapture:Qh,onTouchMoveCapture:Qh}),r=i[0],l=i[1],u=e.forwardProps,d=e.children,f=e.className,m=e.removeScrollBar,y=e.enabled,g=e.shards,b=e.sideCar,S=e.noRelative,C=e.noIsolation,T=e.inert,A=e.allowPinchZoom,E=e.as,j=E===void 0?"div":E,R=e.gapMode,_=Pw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=b,B=OD([s,t]),L=_a(_a({},_),r);return x.createElement(x.Fragment,null,y&&x.createElement(M,{sideCar:Lw,removeScrollBar:m,shards:g,noRelative:S,noIsolation:C,inert:T,setCallbacks:l,allowPinchZoom:!!A,lockRef:s,gapMode:R}),u?x.cloneElement(x.Children.only(d),_a(_a({},L),{ref:B})):x.createElement(j,_a({},L,{className:f,ref:B}),d))});td.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};td.classNames={fullWidth:xu,zeroRight:yu};var zD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function VD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=zD();return t&&e.setAttribute("nonce",t),e}function BD(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function UD(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var HD=function(){var e=0,t=null;return{add:function(s){e==0&&(t=VD())&&(BD(t,s),UD(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ID=function(){var e=HD();return function(t,s){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&s])}},zw=function(){var e=ID(),t=function(s){var i=s.styles,r=s.dynamic;return e(i,r),null};return t},FD={left:0,top:0,right:0,gap:0},Wh=function(e){return parseInt(e||"",10)||0},qD=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[Wh(s),Wh(i),Wh(r)]},$D=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return FD;var t=qD(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])}},KD=zw(),qo="data-scroll-locked",YD=function(e,t,s,i){var r=e.left,l=e.top,u=e.right,d=e.gap;return s===void 0&&(s="margin"),`
|
|
12
|
+
.`.concat(ND,` {
|
|
13
|
+
overflow: hidden `).concat(i,`;
|
|
14
|
+
padding-right: `).concat(d,"px ").concat(i,`;
|
|
15
|
+
}
|
|
16
|
+
body[`).concat(qo,`] {
|
|
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(d,"px ").concat(i,`;
|
|
26
|
+
`),s==="padding"&&"padding-right: ".concat(d,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.`).concat(yu,` {
|
|
30
|
+
right: `).concat(d,"px ").concat(i,`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.`).concat(xu,` {
|
|
34
|
+
margin-right: `).concat(d,"px ").concat(i,`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.`).concat(yu," .").concat(yu,` {
|
|
38
|
+
right: 0 `).concat(i,`;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.`).concat(xu," .").concat(xu,` {
|
|
42
|
+
margin-right: 0 `).concat(i,`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
body[`).concat(qo,`] {
|
|
46
|
+
`).concat(RD,": ").concat(d,`px;
|
|
47
|
+
}
|
|
48
|
+
`)},j0=function(){var e=parseInt(document.body.getAttribute(qo)||"0",10);return isFinite(e)?e:0},GD=function(){x.useEffect(function(){return document.body.setAttribute(qo,(j0()+1).toString()),function(){var e=j0()-1;e<=0?document.body.removeAttribute(qo):document.body.setAttribute(qo,e.toString())}},[])},XD=function(e){var t=e.noRelative,s=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;GD();var l=x.useMemo(function(){return $D(r)},[r]);return x.createElement(KD,{styles:YD(l,!t,r,s?"":"!important")})},Dm=!1;if(typeof window<"u")try{var nu=Object.defineProperty({},"passive",{get:function(){return Dm=!0,!0}});window.addEventListener("test",nu,nu),window.removeEventListener("test",nu,nu)}catch{Dm=!1}var Po=Dm?{passive:!1}:!1,ZD=function(e){return e.tagName==="TEXTAREA"},Vw=function(e,t){if(!(e instanceof Element))return!1;var s=window.getComputedStyle(e);return s[t]!=="hidden"&&!(s.overflowY===s.overflowX&&!ZD(e)&&s[t]==="visible")},QD=function(e){return Vw(e,"overflowY")},WD=function(e){return Vw(e,"overflowX")},N0=function(e,t){var s=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=Bw(e,i);if(r){var l=Uw(e,i),u=l[1],d=l[2];if(u>d)return!0}i=i.parentNode}while(i&&i!==s.body);return!1},JD=function(e){var t=e.scrollTop,s=e.scrollHeight,i=e.clientHeight;return[t,s,i]},eP=function(e){var t=e.scrollLeft,s=e.scrollWidth,i=e.clientWidth;return[t,s,i]},Bw=function(e,t){return e==="v"?QD(t):WD(t)},Uw=function(e,t){return e==="v"?JD(t):eP(t)},tP=function(e,t){return e==="h"&&t==="rtl"?-1:1},nP=function(e,t,s,i,r){var l=tP(e,window.getComputedStyle(t).direction),u=l*i,d=s.target,f=t.contains(d),m=!1,y=u>0,g=0,b=0;do{if(!d)break;var S=Uw(e,d),C=S[0],T=S[1],A=S[2],E=T-A-l*C;(C||E)&&Bw(e,d)&&(g+=E,b+=C);var j=d.parentNode;d=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!f&&d!==document.body||f&&(t.contains(d)||t===d));return(y&&Math.abs(g)<1||!y&&Math.abs(b)<1)&&(m=!0),m},au=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},R0=function(e){return[e.deltaX,e.deltaY]},M0=function(e){return e&&"current"in e?e.current:e},aP=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sP=function(e){return`
|
|
49
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
50
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
51
|
+
`)},iP=0,ko=[];function oP(e){var t=x.useRef([]),s=x.useRef([0,0]),i=x.useRef(),r=x.useState(iP++)[0],l=x.useState(zw)[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=jD([e.lockRef.current],(e.shards||[]).map(M0),!0).filter(Boolean);return T.forEach(function(A){return A.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),T.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var d=x.useCallback(function(T,A){if("touches"in T&&T.touches.length===2||T.type==="wheel"&&T.ctrlKey)return!u.current.allowPinchZoom;var E=au(T),j=s.current,R="deltaX"in T?T.deltaX:j[0]-E[0],_="deltaY"in T?T.deltaY:j[1]-E[1],M,B=T.target,L=Math.abs(R)>Math.abs(_)?"h":"v";if("touches"in T&&L==="h"&&B.type==="range")return!1;var O=window.getSelection(),K=O&&O.anchorNode,Z=K?K===B||K.contains(B):!1;if(Z)return!1;var W=N0(L,B);if(!W)return!0;if(W?M=L:(M=L==="v"?"h":"v",W=N0(L,B)),!W)return!1;if(!i.current&&"changedTouches"in T&&(R||_)&&(i.current=M),!M)return!0;var se=i.current||M;return nP(se,A,T,se==="h"?R:_)},[]),f=x.useCallback(function(T){var A=T;if(!(!ko.length||ko[ko.length-1]!==l)){var E="deltaY"in A?R0(A):au(A),j=t.current.filter(function(M){return M.name===A.type&&(M.target===A.target||A.target===M.shadowParent)&&aP(M.delta,E)})[0];if(j&&j.should){A.cancelable&&A.preventDefault();return}if(!j){var R=(u.current.shards||[]).map(M0).filter(Boolean).filter(function(M){return M.contains(A.target)}),_=R.length>0?d(A,R[0]):!u.current.noIsolation;_&&A.cancelable&&A.preventDefault()}}},[]),m=x.useCallback(function(T,A,E,j){var R={name:T,delta:A,target:E,should:j,shadowParent:rP(E)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(_){return _!==R})},1)},[]),y=x.useCallback(function(T){s.current=au(T),i.current=void 0},[]),g=x.useCallback(function(T){m(T.type,R0(T),T.target,d(T,e.lockRef.current))},[]),b=x.useCallback(function(T){m(T.type,au(T),T.target,d(T,e.lockRef.current))},[]);x.useEffect(function(){return ko.push(l),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:b}),document.addEventListener("wheel",f,Po),document.addEventListener("touchmove",f,Po),document.addEventListener("touchstart",y,Po),function(){ko=ko.filter(function(T){return T!==l}),document.removeEventListener("wheel",f,Po),document.removeEventListener("touchmove",f,Po),document.removeEventListener("touchstart",y,Po)}},[]);var S=e.removeScrollBar,C=e.inert;return x.createElement(x.Fragment,null,C?x.createElement(l,{styles:sP(r)}):null,S?x.createElement(XD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function rP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const lP=LD(Lw,oP);var Bp=x.forwardRef(function(e,t){return x.createElement(td,_a({},e,{ref:t,sideCar:lP}))});Bp.classNames=td.classNames;var cP=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Lo=new WeakMap,su=new WeakMap,iu={},Jh=0,Hw=function(e){return e&&(e.host||Hw(e.parentNode))},uP=function(e,t){return t.map(function(s){if(e.contains(s))return s;var i=Hw(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})},dP=function(e,t,s,i){var r=uP(t,Array.isArray(e)?e:[e]);iu[s]||(iu[s]=new WeakMap);var l=iu[s],u=[],d=new Set,f=new Set(r),m=function(g){!g||d.has(g)||(d.add(g),m(g.parentNode))};r.forEach(m);var y=function(g){!g||f.has(g)||Array.prototype.forEach.call(g.children,function(b){if(d.has(b))y(b);else try{var S=b.getAttribute(i),C=S!==null&&S!=="false",T=(Lo.get(b)||0)+1,A=(l.get(b)||0)+1;Lo.set(b,T),l.set(b,A),u.push(b),T===1&&C&&su.set(b,!0),A===1&&b.setAttribute(s,"true"),C||b.setAttribute(i,"true")}catch(E){console.error("aria-hidden: cannot operate on ",b,E)}})};return y(t),d.clear(),Jh++,function(){u.forEach(function(g){var b=Lo.get(g)-1,S=l.get(g)-1;Lo.set(g,b),l.set(g,S),b||(su.has(g)||g.removeAttribute(i),su.delete(g)),S||g.removeAttribute(s)}),Jh--,Jh||(Lo=new WeakMap,Lo=new WeakMap,su=new WeakMap,iu={})}},Iw=function(e,t,s){s===void 0&&(s="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=cP(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),dP(i,r,s,"aria-hidden")):function(){return null}};function fP(e){const t=hP(e),s=x.forwardRef((i,r)=>{const{children:l,...u}=i,d=x.Children.toArray(l),f=d.find(pP);if(f){const m=f.props.children,y=d.map(g=>g===f?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:g);return h.jsx(t,{...u,ref:r,children:x.isValidElement(m)?x.cloneElement(m,void 0,y):null})}return h.jsx(t,{...u,ref:r,children:l})});return s.displayName=`${e}.Slot`,s}function hP(e){const t=x.forwardRef((s,i)=>{const{children:r,...l}=s;if(x.isValidElement(r)){const u=vP(r),d=gP(l,r.props);return r.type!==x.Fragment&&(d.ref=i?nr(i,u):u),x.cloneElement(r,d)}return x.Children.count(r)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mP=Symbol("radix.slottable");function pP(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mP}function gP(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]=(...d)=>{const f=l(...d);return r(...d),f}:r&&(s[i]=r):i==="style"?s[i]={...r,...l}:i==="className"&&(s[i]=[r,l].filter(Boolean).join(" "))}return{...e,...s}}function vP(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 nd="Dialog",[Fw]=Yi(nd),[yP,Sa]=Fw(nd),qw=e=>{const{__scopeDialog:t,children:s,open:i,defaultOpen:r,onOpenChange:l,modal:u=!0}=e,d=x.useRef(null),f=x.useRef(null),[m,y]=Yo({prop:i,defaultProp:r??!1,onChange:l,caller:nd});return h.jsx(yP,{scope:t,triggerRef:d,contentRef:f,contentId:ps(),titleId:ps(),descriptionId:ps(),open:m,onOpenChange:y,onOpenToggle:x.useCallback(()=>y(g=>!g),[y]),modal:u,children:s})};qw.displayName=nd;var $w="DialogTrigger",Kw=x.forwardRef((e,t)=>{const{__scopeDialog:s,...i}=e,r=Sa($w,s),l=ot(t,r.triggerRef);return h.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Ip(r.open),...i,ref:l,onClick:Oe(e.onClick,r.onOpenToggle)})});Kw.displayName=$w;var Up="DialogPortal",[xP,Yw]=Fw(Up,{forceMount:void 0}),Gw=e=>{const{__scopeDialog:t,forceMount:s,children:i,container:r}=e,l=Sa(Up,t);return h.jsx(xP,{scope:t,forceMount:s,children:x.Children.map(i,u=>h.jsx(Gi,{present:s||l.open,children:h.jsx(ed,{asChild:!0,container:r,children:u})}))})};Gw.displayName=Up;var Du="DialogOverlay",Xw=x.forwardRef((e,t)=>{const s=Yw(Du,e.__scopeDialog),{forceMount:i=s.forceMount,...r}=e,l=Sa(Du,e.__scopeDialog);return l.modal?h.jsx(Gi,{present:i||l.open,children:h.jsx(SP,{...r,ref:t})}):null});Xw.displayName=Du;var bP=fP("DialogOverlay.RemoveScroll"),SP=x.forwardRef((e,t)=>{const{__scopeDialog:s,...i}=e,r=Sa(Du,s);return h.jsx(Bp,{as:bP,allowPinchZoom:!0,shards:[r.contentRef],children:h.jsx(He.div,{"data-state":Ip(r.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),Ui="DialogContent",Zw=x.forwardRef((e,t)=>{const s=Yw(Ui,e.__scopeDialog),{forceMount:i=s.forceMount,...r}=e,l=Sa(Ui,e.__scopeDialog);return h.jsx(Gi,{present:i||l.open,children:l.modal?h.jsx(wP,{...r,ref:t}):h.jsx(CP,{...r,ref:t})})});Zw.displayName=Ui;var wP=x.forwardRef((e,t)=>{const s=Sa(Ui,e.__scopeDialog),i=x.useRef(null),r=ot(t,s.contentRef,i);return x.useEffect(()=>{const l=i.current;if(l)return Iw(l)},[]),h.jsx(Qw,{...e,ref:r,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,l=>{l.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0;(u.button===2||d)&&l.preventDefault()}),onFocusOutside:Oe(e.onFocusOutside,l=>l.preventDefault())})}),CP=x.forwardRef((e,t)=>{const s=Sa(Ui,e.__scopeDialog),i=x.useRef(!1),r=x.useRef(!1);return h.jsx(Qw,{...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()}})}),Qw=x.forwardRef((e,t)=>{const{__scopeDialog:s,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:l,...u}=e,d=Sa(Ui,s),f=x.useRef(null),m=ot(t,f);return Dw(),h.jsxs(h.Fragment,{children:[h.jsx(Vp,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:l,children:h.jsx(Ju,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Ip(d.open),...u,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(TP,{titleId:d.titleId}),h.jsx(AP,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Hp="DialogTitle",Ww=x.forwardRef((e,t)=>{const{__scopeDialog:s,...i}=e,r=Sa(Hp,s);return h.jsx(He.h2,{id:r.titleId,...i,ref:t})});Ww.displayName=Hp;var Jw="DialogDescription",eC=x.forwardRef((e,t)=>{const{__scopeDialog:s,...i}=e,r=Sa(Jw,s);return h.jsx(He.p,{id:r.descriptionId,...i,ref:t})});eC.displayName=Jw;var tC="DialogClose",nC=x.forwardRef((e,t)=>{const{__scopeDialog:s,...i}=e,r=Sa(tC,s);return h.jsx(He.button,{type:"button",...i,ref:t,onClick:Oe(e.onClick,()=>r.onOpenChange(!1))})});nC.displayName=tC;function Ip(e){return e?"open":"closed"}var aC="DialogTitleWarning",[UU,sC]=YO(aC,{contentName:Ui,titleName:Hp,docsSlug:"dialog"}),TP=({titleId:e})=>{const t=sC(aC),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},EP="DialogDescriptionWarning",AP=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sC(EP).contentName}}.`;return x.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},iC=qw,oC=Kw,rC=Gw,lC=Xw,cC=Zw,uC=Ww,jP=eC,dC=nC;function NP({...e}){return h.jsx(iC,{"data-slot":"sheet",...e})}function RP({...e}){return h.jsx(oC,{"data-slot":"sheet-trigger",...e})}function MP({...e}){return h.jsx(rC,{"data-slot":"sheet-portal",...e})}function _P({className:e,...t}){return h.jsx(lC,{"data-slot":"sheet-overlay",className:re("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 OP({className:e,children:t,side:s="right",...i}){return h.jsxs(MP,{children:[h.jsx(_P,{}),h.jsxs(cC,{"data-slot":"sheet-content",className:re("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,h.jsxs(dC,{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:[h.jsx(fw,{className:"size-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function DP({className:e,...t}){return h.jsx("div",{"data-slot":"sheet-header",className:re("flex flex-col gap-1.5 p-4",e),...t})}function PP({className:e,...t}){return h.jsx(uC,{"data-slot":"sheet-title",className:re("text-foreground font-semibold",e),...t})}function kP(e){try{globalThis.localStorage.setItem(iw,e)}catch{}}const fC=x.createContext(null);function LP({children:e}){const[t,s]=x.useState(()=>ow()),i=x.useCallback(l=>{s(l)},[]);x.useEffect(()=>{kP(t)},[t]),x.useEffect(()=>{document.documentElement.lang=t,st.changeLanguage(t)},[t]);const r=x.useMemo(()=>({locale:t,setLocale:i}),[t,i]);return h.jsx(fC.Provider,{value:r,children:e})}function zP(){const e=x.useContext(fC);if(!e)throw new Error("useLocalePreference must be used within LocalePreferenceProvider");return e}function _0(e,[t,s]){return Math.min(s,Math.max(t,e))}function O0(e){const t=VP(e),s=x.forwardRef((i,r)=>{const{children:l,...u}=i,d=x.Children.toArray(l),f=d.find(UP);if(f){const m=f.props.children,y=d.map(g=>g===f?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:g);return h.jsx(t,{...u,ref:r,children:x.isValidElement(m)?x.cloneElement(m,void 0,y):null})}return h.jsx(t,{...u,ref:r,children:l})});return s.displayName=`${e}.Slot`,s}function VP(e){const t=x.forwardRef((s,i)=>{const{children:r,...l}=s;if(x.isValidElement(r)){const u=IP(r),d=HP(l,r.props);return r.type!==x.Fragment&&(d.ref=i?nr(i,u):u),x.cloneElement(r,d)}return x.Children.count(r)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var BP=Symbol("radix.slottable");function UP(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===BP}function HP(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]=(...d)=>{const f=l(...d);return r(...d),f}:r&&(s[i]=r):i==="style"?s[i]={...r,...l}:i==="className"&&(s[i]=[r,l].filter(Boolean).join(" "))}return{...e,...s}}function IP(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 hC(e){const t=e+"CollectionProvider",[s,i]=Yi(t),[r,l]=s(t,{collectionRef:{current:null},itemMap:new Map}),u=T=>{const{scope:A,children:E}=T,j=ie.useRef(null),R=ie.useRef(new Map).current;return h.jsx(r,{scope:A,itemMap:R,collectionRef:j,children:E})};u.displayName=t;const d=e+"CollectionSlot",f=O0(d),m=ie.forwardRef((T,A)=>{const{scope:E,children:j}=T,R=l(d,E),_=ot(A,R.collectionRef);return h.jsx(f,{ref:_,children:j})});m.displayName=d;const y=e+"CollectionItemSlot",g="data-radix-collection-item",b=O0(y),S=ie.forwardRef((T,A)=>{const{scope:E,children:j,...R}=T,_=ie.useRef(null),M=ot(A,_),B=l(y,E);return ie.useEffect(()=>(B.itemMap.set(_,{ref:_,...R}),()=>{B.itemMap.delete(_)})),h.jsx(b,{[g]:"",ref:M,children:j})});S.displayName=y;function C(T){const A=l(e+"CollectionConsumer",T);return ie.useCallback(()=>{const j=A.collectionRef.current;if(!j)return[];const R=Array.from(j.querySelectorAll(`[${g}]`));return Array.from(A.itemMap.values()).sort((B,L)=>R.indexOf(B.ref.current)-R.indexOf(L.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:u,Slot:m,ItemSlot:S},C,i]}var FP=x.createContext(void 0);function Fp(e){const t=x.useContext(FP);return e||t||"ltr"}const qP=["top","right","bottom","left"],ai=Math.min,Vn=Math.max,Pu=Math.round,ou=Math.floor,Pa=e=>({x:e,y:e}),$P={left:"right",right:"left",bottom:"top",top:"bottom"},KP={start:"end",end:"start"};function Pm(e,t,s){return Vn(e,ai(t,s))}function vs(e,t){return typeof e=="function"?e(t):e}function ys(e){return e.split("-")[0]}function ar(e){return e.split("-")[1]}function qp(e){return e==="x"?"y":"x"}function $p(e){return e==="y"?"height":"width"}const YP=new Set(["top","bottom"]);function Da(e){return YP.has(ys(e))?"y":"x"}function Kp(e){return qp(Da(e))}function GP(e,t,s){s===void 0&&(s=!1);const i=ar(e),r=Kp(e),l=$p(r);let u=r==="x"?i===(s?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=ku(u)),[u,ku(u)]}function XP(e){const t=ku(e);return[km(e),t,km(t)]}function km(e){return e.replace(/start|end/g,t=>KP[t])}const D0=["left","right"],P0=["right","left"],ZP=["top","bottom"],QP=["bottom","top"];function WP(e,t,s){switch(e){case"top":case"bottom":return s?t?P0:D0:t?D0:P0;case"left":case"right":return t?ZP:QP;default:return[]}}function JP(e,t,s,i){const r=ar(e);let l=WP(ys(e),s==="start",i);return r&&(l=l.map(u=>u+"-"+r),t&&(l=l.concat(l.map(km)))),l}function ku(e){return e.replace(/left|right|bottom|top/g,t=>$P[t])}function ek(e){return{top:0,right:0,bottom:0,left:0,...e}}function mC(e){return typeof e!="number"?ek(e):{top:e,right:e,bottom:e,left:e}}function Lu(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 k0(e,t,s){let{reference:i,floating:r}=e;const l=Da(t),u=Kp(t),d=$p(u),f=ys(t),m=l==="y",y=i.x+i.width/2-r.width/2,g=i.y+i.height/2-r.height/2,b=i[d]/2-r[d]/2;let S;switch(f){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(ar(t)){case"start":S[u]-=b*(s&&m?-1:1);break;case"end":S[u]+=b*(s&&m?-1:1);break}return S}const tk=async(e,t,s)=>{const{placement:i="bottom",strategy:r="absolute",middleware:l=[],platform:u}=s,d=l.filter(Boolean),f=await(u.isRTL==null?void 0:u.isRTL(t));let m=await u.getElementRects({reference:e,floating:t,strategy:r}),{x:y,y:g}=k0(m,i,f),b=i,S={},C=0;for(let T=0;T<d.length;T++){const{name:A,fn:E}=d[T],{x:j,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=j??y,g=R??g,S={...S,[A]:{...S[A],..._}},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}=k0(m,b,f)),T=-1)}return{x:y,y:g,placement:b,strategy:r,middlewareData:S}};async function yl(e,t){var s;t===void 0&&(t={});const{x:i,y:r,platform:l,rects:u,elements:d,strategy:f}=e,{boundary:m="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:b=!1,padding:S=0}=vs(t,e),C=mC(S),A=d[b?g==="floating"?"reference":"floating":g],E=Lu(await l.getClippingRect({element:(s=await(l.isElement==null?void 0:l.isElement(A)))==null||s?A:A.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:m,rootBoundary:y,strategy:f})),j=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(d.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=Lu(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:j,offsetParent:R,strategy:f}):j);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 nk=e=>({name:"arrow",options:e,async fn(t){const{x:s,y:i,placement:r,rects:l,platform:u,elements:d,middlewareData:f}=t,{element:m,padding:y=0}=vs(e,t)||{};if(m==null)return{};const g=mC(y),b={x:s,y:i},S=Kp(r),C=$p(S),T=await u.getDimensions(m),A=S==="y",E=A?"top":"left",j=A?"bottom":"right",R=A?"clientHeight":"clientWidth",_=l.reference[C]+l.reference[S]-b[S]-l.floating[C],M=b[S]-l.reference[S],B=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let L=B?B[R]:0;(!L||!await(u.isElement==null?void 0:u.isElement(B)))&&(L=d.floating[R]||l.floating[C]);const O=_/2-M/2,K=L/2-T[C]/2-1,Z=ai(g[E],K),W=ai(g[j],K),se=Z,I=L-T[C]-W,ne=L/2-T[C]/2+O,le=Pm(se,ne,I),D=!f.arrow&&ar(r)!=null&&ne!==le&&l.reference[C]/2-(ne<se?Z:W)-T[C]/2<0,H=D?ne<se?ne-se:ne-I:0;return{[S]:b[S]+H,data:{[S]:le,centerOffset:ne-le-H,...D&&{alignmentOffset:H}},reset:D}}}),ak=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:d,platform:f,elements:m}=t,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:T=!0,...A}=vs(e,t);if((s=l.arrow)!=null&&s.alignmentOffset)return{};const E=ys(r),j=Da(d),R=ys(d)===d,_=await(f.isRTL==null?void 0:f.isRTL(m.floating)),M=b||(R||!T?[ku(d)]:XP(d)),B=C!=="none";!b&&B&&M.push(...JP(d,T,C,_));const L=[d,...M],O=await yl(t,A),K=[];let Z=((i=l.flip)==null?void 0:i.overflows)||[];if(y&&K.push(O[E]),g){const ne=GP(r,u,_);K.push(O[ne[0]],O[ne[1]])}if(Z=[...Z,{placement:r,overflows:K}],!K.every(ne=>ne<=0)){var W,se;const ne=(((W=l.flip)==null?void 0:W.index)||0)+1,le=L[ne];if(le&&(!(g==="alignment"?j!==Da(le):!1)||Z.every(V=>Da(V.placement)===j?V.overflows[0]>0:!0)))return{data:{index:ne,overflows:Z},reset:{placement:le}};let D=(se=Z.filter(H=>H.overflows[0]<=0).sort((H,V)=>H.overflows[1]-V.overflows[1])[0])==null?void 0:se.placement;if(!D)switch(S){case"bestFit":{var I;const H=(I=Z.filter(V=>{if(B){const oe=Da(V.placement);return oe===j||oe==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(oe=>oe>0).reduce((oe,ue)=>oe+ue,0)]).sort((V,oe)=>V[1]-oe[1])[0])==null?void 0:I[0];H&&(D=H);break}case"initialPlacement":D=d;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function L0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function z0(e){return qP.some(t=>e[t]>=0)}const sk=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s}=t,{strategy:i="referenceHidden",...r}=vs(e,t);switch(i){case"referenceHidden":{const l=await yl(t,{...r,elementContext:"reference"}),u=L0(l,s.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:z0(u)}}}case"escaped":{const l=await yl(t,{...r,altBoundary:!0}),u=L0(l,s.floating);return{data:{escapedOffsets:u,escaped:z0(u)}}}default:return{}}}}},pC=new Set(["left","top"]);async function ik(e,t){const{placement:s,platform:i,elements:r}=e,l=await(i.isRTL==null?void 0:i.isRTL(r.floating)),u=ys(s),d=ar(s),f=Da(s)==="y",m=pC.has(u)?-1:1,y=l&&f?-1:1,g=vs(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 d&&typeof C=="number"&&(S=d==="end"?C*-1:C),f?{x:S*y,y:b*m}:{x:b*m,y:S*y}}const ok=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:d}=t,f=await ik(t,e);return u===((s=d.offset)==null?void 0:s.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:r+f.x,y:l+f.y,data:{...f,placement:u}}}}},rk=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:d={fn:A=>{let{x:E,y:j}=A;return{x:E,y:j}}},...f}=vs(e,t),m={x:s,y:i},y=await yl(t,f),g=Da(ys(r)),b=qp(g);let S=m[b],C=m[g];if(l){const A=b==="y"?"top":"left",E=b==="y"?"bottom":"right",j=S+y[A],R=S-y[E];S=Pm(j,S,R)}if(u){const A=g==="y"?"top":"left",E=g==="y"?"bottom":"right",j=C+y[A],R=C-y[E];C=Pm(j,C,R)}const T=d.fn({...t,[b]:S,[g]:C});return{...T,data:{x:T.x-s,y:T.y-i,enabled:{[b]:l,[g]:u}}}}}},lk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:s,y:i,placement:r,rects:l,middlewareData:u}=t,{offset:d=0,mainAxis:f=!0,crossAxis:m=!0}=vs(e,t),y={x:s,y:i},g=Da(r),b=qp(g);let S=y[b],C=y[g];const T=vs(d,t),A=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:0,crossAxis:0,...T};if(f){const R=b==="y"?"height":"width",_=l.reference[b]-l.floating[R]+A.mainAxis,M=l.reference[b]+l.reference[R]-A.mainAxis;S<_?S=_:S>M&&(S=M)}if(m){var E,j;const R=b==="y"?"width":"height",_=pC.has(ys(r)),M=l.reference[g]-l.floating[R]+(_&&((E=u.offset)==null?void 0:E[g])||0)+(_?0:A.crossAxis),B=l.reference[g]+l.reference[R]+(_?0:((j=u.offset)==null?void 0:j[g])||0)-(_?A.crossAxis:0);C<M?C=M:C>B&&(C=B)}return{[b]:S,[g]:C}}}},ck=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:d}=t,{apply:f=()=>{},...m}=vs(e,t),y=await yl(t,m),g=ys(r),b=ar(r),S=Da(r)==="y",{width:C,height:T}=l.floating;let A,E;g==="top"||g==="bottom"?(A=g,E=b===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(E=g,A=b==="end"?"top":"bottom");const j=T-y.top-y.bottom,R=C-y.left-y.right,_=ai(T-y[A],j),M=ai(C-y[E],R),B=!t.middlewareData.shift;let L=_,O=M;if((s=t.middlewareData.shift)!=null&&s.enabled.x&&(O=R),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(L=j),B&&!b){const Z=Vn(y.left,0),W=Vn(y.right,0),se=Vn(y.top,0),I=Vn(y.bottom,0);S?O=C-2*(Z!==0||W!==0?Z+W:Vn(y.left,y.right)):L=T-2*(se!==0||I!==0?se+I:Vn(y.top,y.bottom))}await f({...t,availableWidth:O,availableHeight:L});const K=await u.getDimensions(d.floating);return C!==K.width||T!==K.height?{reset:{rects:!0}}:{}}}};function ad(){return typeof window<"u"}function sr(e){return gC(e)?(e.nodeName||"").toLowerCase():"#document"}function Bn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ba(e){var t;return(t=(gC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gC(e){return ad()?e instanceof Node||e instanceof Bn(e).Node:!1}function ya(e){return ad()?e instanceof Element||e instanceof Bn(e).Element:!1}function za(e){return ad()?e instanceof HTMLElement||e instanceof Bn(e).HTMLElement:!1}function V0(e){return!ad()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bn(e).ShadowRoot}const uk=new Set(["inline","contents"]);function _l(e){const{overflow:t,overflowX:s,overflowY:i,display:r}=xa(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+s)&&!uk.has(r)}const dk=new Set(["table","td","th"]);function fk(e){return dk.has(sr(e))}const hk=[":popover-open",":modal"];function sd(e){return hk.some(t=>{try{return e.matches(t)}catch{return!1}})}const mk=["transform","translate","scale","rotate","perspective"],pk=["transform","translate","scale","rotate","perspective","filter"],gk=["paint","layout","strict","content"];function Yp(e){const t=Gp(),s=ya(e)?xa(e):e;return mk.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)||pk.some(i=>(s.willChange||"").includes(i))||gk.some(i=>(s.contain||"").includes(i))}function vk(e){let t=si(e);for(;za(t)&&!Go(t);){if(Yp(t))return t;if(sd(t))return null;t=si(t)}return null}function Gp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yk=new Set(["html","body","#document"]);function Go(e){return yk.has(sr(e))}function xa(e){return Bn(e).getComputedStyle(e)}function id(e){return ya(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function si(e){if(sr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||V0(e)&&e.host||Ba(e);return V0(t)?t.host:t}function vC(e){const t=si(e);return Go(t)?e.ownerDocument?e.ownerDocument.body:e.body:za(t)&&_l(t)?t:vC(t)}function xl(e,t,s){var i;t===void 0&&(t=[]),s===void 0&&(s=!0);const r=vC(e),l=r===((i=e.ownerDocument)==null?void 0:i.body),u=Bn(r);if(l){const d=Lm(u);return t.concat(u,u.visualViewport||[],_l(r)?r:[],d&&s?xl(d):[])}return t.concat(r,xl(r,[],s))}function Lm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yC(e){const t=xa(e);let s=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=za(e),l=r?e.offsetWidth:s,u=r?e.offsetHeight:i,d=Pu(s)!==l||Pu(i)!==u;return d&&(s=l,i=u),{width:s,height:i,$:d}}function Xp(e){return ya(e)?e:e.contextElement}function $o(e){const t=Xp(e);if(!za(t))return Pa(1);const s=t.getBoundingClientRect(),{width:i,height:r,$:l}=yC(t);let u=(l?Pu(s.width):s.width)/i,d=(l?Pu(s.height):s.height)/r;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const xk=Pa(0);function xC(e){const t=Bn(e);return!Gp()||!t.visualViewport?xk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bk(e,t,s){return t===void 0&&(t=!1),!s||t&&s!==Bn(e)?!1:t}function Hi(e,t,s,i){t===void 0&&(t=!1),s===void 0&&(s=!1);const r=e.getBoundingClientRect(),l=Xp(e);let u=Pa(1);t&&(i?ya(i)&&(u=$o(i)):u=$o(e));const d=bk(l,s,i)?xC(l):Pa(0);let f=(r.left+d.x)/u.x,m=(r.top+d.y)/u.y,y=r.width/u.x,g=r.height/u.y;if(l){const b=Bn(l),S=i&&ya(i)?Bn(i):i;let C=b,T=Lm(C);for(;T&&i&&S!==C;){const A=$o(T),E=T.getBoundingClientRect(),j=xa(T),R=E.left+(T.clientLeft+parseFloat(j.paddingLeft))*A.x,_=E.top+(T.clientTop+parseFloat(j.paddingTop))*A.y;f*=A.x,m*=A.y,y*=A.x,g*=A.y,f+=R,m+=_,C=Bn(T),T=Lm(C)}}return Lu({width:y,height:g,x:f,y:m})}function od(e,t){const s=id(e).scrollLeft;return t?t.left+s:Hi(Ba(e)).left+s}function bC(e,t){const s=e.getBoundingClientRect(),i=s.left+t.scrollLeft-od(e,s),r=s.top+t.scrollTop;return{x:i,y:r}}function Sk(e){let{elements:t,rect:s,offsetParent:i,strategy:r}=e;const l=r==="fixed",u=Ba(i),d=t?sd(t.floating):!1;if(i===u||d&&l)return s;let f={scrollLeft:0,scrollTop:0},m=Pa(1);const y=Pa(0),g=za(i);if((g||!g&&!l)&&((sr(i)!=="body"||_l(u))&&(f=id(i)),za(i))){const S=Hi(i);m=$o(i),y.x=S.x+i.clientLeft,y.y=S.y+i.clientTop}const b=u&&!g&&!l?bC(u,f):Pa(0);return{width:s.width*m.x,height:s.height*m.y,x:s.x*m.x-f.scrollLeft*m.x+y.x+b.x,y:s.y*m.y-f.scrollTop*m.y+y.y+b.y}}function wk(e){return Array.from(e.getClientRects())}function Ck(e){const t=Ba(e),s=id(e),i=e.ownerDocument.body,r=Vn(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=Vn(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let u=-s.scrollLeft+od(e);const d=-s.scrollTop;return xa(i).direction==="rtl"&&(u+=Vn(t.clientWidth,i.clientWidth)-r),{width:r,height:l,x:u,y:d}}const B0=25;function Tk(e,t){const s=Bn(e),i=Ba(e),r=s.visualViewport;let l=i.clientWidth,u=i.clientHeight,d=0,f=0;if(r){l=r.width,u=r.height;const y=Gp();(!y||y&&t==="fixed")&&(d=r.offsetLeft,f=r.offsetTop)}const m=od(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<=B0&&(l-=C)}else m<=B0&&(l+=m);return{width:l,height:u,x:d,y:f}}const Ek=new Set(["absolute","fixed"]);function Ak(e,t){const s=Hi(e,!0,t==="fixed"),i=s.top+e.clientTop,r=s.left+e.clientLeft,l=za(e)?$o(e):Pa(1),u=e.clientWidth*l.x,d=e.clientHeight*l.y,f=r*l.x,m=i*l.y;return{width:u,height:d,x:f,y:m}}function U0(e,t,s){let i;if(t==="viewport")i=Tk(e,s);else if(t==="document")i=Ck(Ba(e));else if(ya(t))i=Ak(t,s);else{const r=xC(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Lu(i)}function SC(e,t){const s=si(e);return s===t||!ya(s)||Go(s)?!1:xa(s).position==="fixed"||SC(s,t)}function jk(e,t){const s=t.get(e);if(s)return s;let i=xl(e,[],!1).filter(d=>ya(d)&&sr(d)!=="body"),r=null;const l=xa(e).position==="fixed";let u=l?si(e):e;for(;ya(u)&&!Go(u);){const d=xa(u),f=Yp(u);!f&&d.position==="fixed"&&(r=null),(l?!f&&!r:!f&&d.position==="static"&&!!r&&Ek.has(r.position)||_l(u)&&!f&&SC(e,u))?i=i.filter(y=>y!==u):r=d,u=si(u)}return t.set(e,i),i}function Nk(e){let{element:t,boundary:s,rootBoundary:i,strategy:r}=e;const u=[...s==="clippingAncestors"?sd(t)?[]:jk(t,this._c):[].concat(s),i],d=u[0],f=u.reduce((m,y)=>{const g=U0(t,y,r);return m.top=Vn(g.top,m.top),m.right=ai(g.right,m.right),m.bottom=ai(g.bottom,m.bottom),m.left=Vn(g.left,m.left),m},U0(t,d,r));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Rk(e){const{width:t,height:s}=yC(e);return{width:t,height:s}}function Mk(e,t,s){const i=za(t),r=Ba(t),l=s==="fixed",u=Hi(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=Pa(0);function m(){f.x=od(r)}if(i||!i&&!l)if((sr(t)!=="body"||_l(r))&&(d=id(t)),i){const S=Hi(t,!0,l,t);f.x=S.x+t.clientLeft,f.y=S.y+t.clientTop}else r&&m();l&&!i&&r&&m();const y=r&&!i&&!l?bC(r,d):Pa(0),g=u.left+d.scrollLeft-f.x-y.x,b=u.top+d.scrollTop-f.y-y.y;return{x:g,y:b,width:u.width,height:u.height}}function em(e){return xa(e).position==="static"}function H0(e,t){if(!za(e)||xa(e).position==="fixed")return null;if(t)return t(e);let s=e.offsetParent;return Ba(e)===s&&(s=s.ownerDocument.body),s}function wC(e,t){const s=Bn(e);if(sd(e))return s;if(!za(e)){let r=si(e);for(;r&&!Go(r);){if(ya(r)&&!em(r))return r;r=si(r)}return s}let i=H0(e,t);for(;i&&fk(i)&&em(i);)i=H0(i,t);return i&&Go(i)&&em(i)&&!Yp(i)?s:i||vk(e)||s}const _k=async function(e){const t=this.getOffsetParent||wC,s=this.getDimensions,i=await s(e.floating);return{reference:Mk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Ok(e){return xa(e).direction==="rtl"}const Dk={convertOffsetParentRelativeRectToViewportRelativeRect:Sk,getDocumentElement:Ba,getClippingRect:Nk,getOffsetParent:wC,getElementRects:_k,getClientRects:wk,getDimensions:Rk,getScale:$o,isElement:ya,isRTL:Ok};function CC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pk(e,t){let s=null,i;const r=Ba(e);function l(){var d;clearTimeout(i),(d=s)==null||d.disconnect(),s=null}function u(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),l();const m=e.getBoundingClientRect(),{left:y,top:g,width:b,height:S}=m;if(d||t(),!b||!S)return;const C=ou(g),T=ou(r.clientWidth-(y+b)),A=ou(r.clientHeight-(g+S)),E=ou(y),R={rootMargin:-C+"px "+-T+"px "+-A+"px "+-E+"px",threshold:Vn(0,ai(1,f))||1};let _=!0;function M(B){const L=B[0].intersectionRatio;if(L!==f){if(!_)return u();L?u(!1,L):i=setTimeout(()=>{u(!1,1e-7)},1e3)}L===1&&!CC(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 kk(e,t,s,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,m=Xp(e),y=r||l?[...m?xl(m):[],...xl(t)]:[];y.forEach(E=>{r&&E.addEventListener("scroll",s,{passive:!0}),l&&E.addEventListener("resize",s)});const g=m&&d?Pk(m,s):null;let b=-1,S=null;u&&(S=new ResizeObserver(E=>{let[j]=E;j&&j.target===m&&S&&(S.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var R;(R=S)==null||R.observe(t)})),s()}),m&&!f&&S.observe(m),S.observe(t));let C,T=f?Hi(e):null;f&&A();function A(){const E=Hi(e);T&&!CC(T,E)&&s(),T=E,C=requestAnimationFrame(A)}return s(),()=>{var E;y.forEach(j=>{r&&j.removeEventListener("scroll",s),l&&j.removeEventListener("resize",s)}),g?.(),(E=S)==null||E.disconnect(),S=null,f&&cancelAnimationFrame(C)}}const Lk=ok,zk=rk,Vk=ak,Bk=ck,Uk=sk,I0=nk,Hk=lk,Ik=(e,t,s)=>{const i=new Map,r={platform:Dk,...s},l={...r.platform,_c:i};return tk(e,t,{...r,platform:l})};var Fk=typeof document<"u",qk=function(){},bu=Fk?x.useLayoutEffect:qk;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 TC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function F0(e,t){const s=TC(e);return Math.round(t*s)/s}function tm(e){const t=x.useRef(e);return bu(()=>{t.current=e}),t}function $k(e){e===void 0&&(e={});const{placement:t="bottom",strategy:s="absolute",middleware:i=[],platform:r,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:f,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),[A,E]=x.useState(null),j=x.useCallback(V=>{V!==B.current&&(B.current=V,T(V))},[]),R=x.useCallback(V=>{V!==L.current&&(L.current=V,E(V))},[]),_=l||C,M=u||A,B=x.useRef(null),L=x.useRef(null),O=x.useRef(y),K=f!=null,Z=tm(f),W=tm(r),se=tm(m),I=x.useCallback(()=>{if(!B.current||!L.current)return;const V={placement:t,strategy:s,middleware:b};W.current&&(V.platform=W.current),Ik(B.current,L.current,V).then(oe=>{const ue={...oe,isPositioned:se.current!==!1};ne.current&&!zu(O.current,ue)&&(O.current=ue,Ml.flushSync(()=>{g(ue)}))})},[b,t,s,W,se]);bu(()=>{m===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,g(V=>({...V,isPositioned:!1})))},[m]);const ne=x.useRef(!1);bu(()=>(ne.current=!0,()=>{ne.current=!1}),[]),bu(()=>{if(_&&(B.current=_),M&&(L.current=M),_&&M){if(Z.current)return Z.current(_,M,I);I()}},[_,M,I,Z,K]);const le=x.useMemo(()=>({reference:B,floating:L,setReference:j,setFloating:R}),[j,R]),D=x.useMemo(()=>({reference:_,floating:M}),[_,M]),H=x.useMemo(()=>{const V={position:s,left:0,top:0};if(!D.floating)return V;const oe=F0(D.floating,y.x),ue=F0(D.floating,y.y);return d?{...V,transform:"translate("+oe+"px, "+ue+"px)",...TC(D.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:oe,top:ue}},[s,d,D.floating,y.x,y.y]);return x.useMemo(()=>({...y,update:I,refs:le,elements:D,floatingStyles:H}),[y,I,le,D,H])}const Kk=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?I0({element:i.current,padding:r}).fn(s):{}:i?I0({element:i,padding:r}).fn(s):{}}}},Yk=(e,t)=>({...Lk(e),options:[e,t]}),Gk=(e,t)=>({...zk(e),options:[e,t]}),Xk=(e,t)=>({...Hk(e),options:[e,t]}),Zk=(e,t)=>({...Vk(e),options:[e,t]}),Qk=(e,t)=>({...Bk(e),options:[e,t]}),Wk=(e,t)=>({...Uk(e),options:[e,t]}),Jk=(e,t)=>({...Kk(e),options:[e,t]});var eL="Arrow",EC=x.forwardRef((e,t)=>{const{children:s,width:i=10,height:r=5,...l}=e;return h.jsx(He.svg,{...l,ref:t,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});EC.displayName=eL;var tL=EC;function nL(e){const[t,s]=x.useState(void 0);return sn(()=>{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,d;if("borderBoxSize"in l){const f=l.borderBoxSize,m=Array.isArray(f)?f[0]:f;u=m.inlineSize,d=m.blockSize}else u=e.offsetWidth,d=e.offsetHeight;s({width:u,height:d})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else s(void 0)},[e]),t}var Zp="Popper",[AC,rd]=Yi(Zp),[aL,jC]=AC(Zp),NC=e=>{const{__scopePopper:t,children:s}=e,[i,r]=x.useState(null);return h.jsx(aL,{scope:t,anchor:i,onAnchorChange:r,children:s})};NC.displayName=Zp;var RC="PopperAnchor",MC=x.forwardRef((e,t)=>{const{__scopePopper:s,virtualRef:i,...r}=e,l=jC(RC,s),u=x.useRef(null),d=ot(t,u),f=x.useRef(null);return x.useEffect(()=>{const m=f.current;f.current=i?.current||u.current,m!==f.current&&l.onAnchorChange(f.current)}),i?null:h.jsx(He.div,{...r,ref:d})});MC.displayName=RC;var Qp="PopperContent",[sL,iL]=AC(Qp),_C=x.forwardRef((e,t)=>{const{__scopePopper:s,side:i="bottom",sideOffset:r=0,align:l="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:m=[],collisionPadding:y=0,sticky:g="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:C,...T}=e,A=jC(Qp,s),[E,j]=x.useState(null),R=ot(t,ae=>j(ae)),[_,M]=x.useState(null),B=nL(_),L=B?.width??0,O=B?.height??0,K=i+(l!=="center"?"-"+l:""),Z=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},W=Array.isArray(m)?m:[m],se=W.length>0,I={padding:Z,boundary:W.filter(rL),altBoundary:se},{refs:ne,floatingStyles:le,placement:D,isPositioned:H,middlewareData:V}=$k({strategy:"fixed",placement:K,whileElementsMounted:(...ae)=>kk(...ae,{animationFrame:S==="always"}),elements:{reference:A.anchor},middleware:[Yk({mainAxis:r+O,alignmentAxis:u}),f&&Gk({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Xk():void 0,...I}),f&&Zk({...I}),Qk({...I,apply:({elements:ae,rects:de,availableWidth:Se,availableHeight:Ee})=>{const{width:Ne,height:_e}=de.reference,gt=ae.floating.style;gt.setProperty("--radix-popper-available-width",`${Se}px`),gt.setProperty("--radix-popper-available-height",`${Ee}px`),gt.setProperty("--radix-popper-anchor-width",`${Ne}px`),gt.setProperty("--radix-popper-anchor-height",`${_e}px`)}}),_&&Jk({element:_,padding:d}),lL({arrowWidth:L,arrowHeight:O}),b&&Wk({strategy:"referenceHidden",...I})]}),[oe,ue]=PC(D),P=ni(C);sn(()=>{H&&P?.()},[H,P]);const X=V.arrow?.x,G=V.arrow?.y,te=V.arrow?.centerOffset!==0,[ce,he]=x.useState();return sn(()=>{E&&he(window.getComputedStyle(E).zIndex)},[E]),h.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:H?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(sL,{scope:s,placedSide:oe,onArrowChange:M,arrowX:X,arrowY:G,shouldHideArrow:te,children:h.jsx(He.div,{"data-side":oe,"data-align":ue,...T,ref:R,style:{...T.style,animation:H?void 0:"none"}})})})});_C.displayName=Qp;var OC="PopperArrow",oL={top:"bottom",right:"left",bottom:"top",left:"right"},DC=x.forwardRef(function(t,s){const{__scopePopper:i,...r}=t,l=iL(OC,i),u=oL[l.placedSide];return h.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:h.jsx(tL,{...r,ref:s,style:{...r.style,display:"block"}})})});DC.displayName=OC;function rL(e){return e!==null}var lL=e=>({name:"transformOrigin",options:e,fn(t){const{placement:s,rects:i,middlewareData:r}=t,u=r.arrow?.centerOffset!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[m,y]=PC(s),g={start:"0%",center:"50%",end:"100%"}[y],b=(r.arrow?.x??0)+d/2,S=(r.arrow?.y??0)+f/2;let C="",T="";return m==="bottom"?(C=u?g:`${b}px`,T=`${-f}px`):m==="top"?(C=u?g:`${b}px`,T=`${i.floating.height+f}px`):m==="right"?(C=`${-f}px`,T=u?g:`${S}px`):m==="left"&&(C=`${i.floating.width+f}px`,T=u?g:`${S}px`),{data:{x:C,y:T}}}});function PC(e){const[t,s="center"]=e.split("-");return[t,s]}var kC=NC,LC=MC,zC=_C,VC=DC;function cL(e){const t=uL(e),s=x.forwardRef((i,r)=>{const{children:l,...u}=i,d=x.Children.toArray(l),f=d.find(fL);if(f){const m=f.props.children,y=d.map(g=>g===f?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:g);return h.jsx(t,{...u,ref:r,children:x.isValidElement(m)?x.cloneElement(m,void 0,y):null})}return h.jsx(t,{...u,ref:r,children:l})});return s.displayName=`${e}.Slot`,s}function uL(e){const t=x.forwardRef((s,i)=>{const{children:r,...l}=s;if(x.isValidElement(r)){const u=mL(r),d=hL(l,r.props);return r.type!==x.Fragment&&(d.ref=i?nr(i,u):u),x.cloneElement(r,d)}return x.Children.count(r)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dL=Symbol("radix.slottable");function fL(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dL}function hL(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]=(...d)=>{const f=l(...d);return r(...d),f}:r&&(s[i]=r):i==="style"?s[i]={...r,...l}:i==="className"&&(s[i]=[r,l].filter(Boolean).join(" "))}return{...e,...s}}function mL(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 pL(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 BC=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"}),gL="VisuallyHidden",UC=x.forwardRef((e,t)=>h.jsx(He.span,{...e,ref:t,style:{...BC,...e.style}}));UC.displayName=gL;var vL=UC,yL=[" ","Enter","ArrowUp","ArrowDown"],xL=[" ","Enter"],Ii="Select",[ld,cd,bL]=hC(Ii),[ir]=Yi(Ii,[bL,rd]),ud=rd(),[SL,oi]=ir(Ii),[wL,CL]=ir(Ii),HC=e=>{const{__scopeSelect:t,children:s,open:i,defaultOpen:r,onOpenChange:l,value:u,defaultValue:d,onValueChange:f,dir:m,name:y,autoComplete:g,disabled:b,required:S,form:C}=e,T=ud(t),[A,E]=x.useState(null),[j,R]=x.useState(null),[_,M]=x.useState(!1),B=Fp(m),[L,O]=Yo({prop:i,defaultProp:r??!1,onChange:l,caller:Ii}),[K,Z]=Yo({prop:u,defaultProp:d,onChange:f,caller:Ii}),W=x.useRef(null),se=A?C||!!A.closest("form"):!0,[I,ne]=x.useState(new Set),le=Array.from(I).map(D=>D.props.value).join(";");return h.jsx(kC,{...T,children:h.jsxs(SL,{required:S,scope:t,trigger:A,onTriggerChange:E,valueNode:j,onValueNodeChange:R,valueNodeHasChildren:_,onValueNodeHasChildrenChange:M,contentId:ps(),value:K,onValueChange:Z,open:L,onOpenChange:O,dir:B,triggerPointerDownPosRef:W,disabled:b,children:[h.jsx(ld.Provider,{scope:t,children:h.jsx(wL,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(D=>{ne(H=>new Set(H).add(D))},[]),onNativeOptionRemove:x.useCallback(D=>{ne(H=>{const V=new Set(H);return V.delete(D),V})},[]),children:s})}),se?h.jsxs(cT,{"aria-hidden":!0,required:S,tabIndex:-1,name:y,autoComplete:g,value:K,onChange:D=>Z(D.target.value),disabled:b,form:C,children:[K===void 0?h.jsx("option",{value:""}):null,Array.from(I)]},le):null]})})};HC.displayName=Ii;var IC="SelectTrigger",FC=x.forwardRef((e,t)=>{const{__scopeSelect:s,disabled:i=!1,...r}=e,l=ud(s),u=oi(IC,s),d=u.disabled||i,f=ot(t,u.onTriggerChange),m=cd(s),y=x.useRef("touch"),[g,b,S]=dT(T=>{const A=m().filter(R=>!R.disabled),E=A.find(R=>R.value===u.value),j=fT(A,T,E);j!==void 0&&u.onValueChange(j.value)}),C=T=>{d||(u.onOpenChange(!0),S()),T&&(u.triggerPointerDownPosRef.current={x:Math.round(T.pageX),y:Math.round(T.pageY)})};return h.jsx(LC,{asChild:!0,...l,children:h.jsx(He.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:d,"data-disabled":d?"":void 0,"data-placeholder":uT(u.value)?"":void 0,...r,ref:f,onClick:Oe(r.onClick,T=>{T.currentTarget.focus(),y.current!=="mouse"&&C(T)}),onPointerDown:Oe(r.onPointerDown,T=>{y.current=T.pointerType;const A=T.target;A.hasPointerCapture(T.pointerId)&&A.releasePointerCapture(T.pointerId),T.button===0&&T.ctrlKey===!1&&T.pointerType==="mouse"&&(C(T),T.preventDefault())}),onKeyDown:Oe(r.onKeyDown,T=>{const A=g.current!=="";!(T.ctrlKey||T.altKey||T.metaKey)&&T.key.length===1&&b(T.key),!(A&&T.key===" ")&&yL.includes(T.key)&&(C(),T.preventDefault())})})})});FC.displayName=IC;var qC="SelectValue",$C=x.forwardRef((e,t)=>{const{__scopeSelect:s,className:i,style:r,children:l,placeholder:u="",...d}=e,f=oi(qC,s),{onValueNodeHasChildrenChange:m}=f,y=l!==void 0,g=ot(t,f.onValueNodeChange);return sn(()=>{m(y)},[m,y]),h.jsx(He.span,{...d,ref:g,style:{pointerEvents:"none"},children:uT(f.value)?h.jsx(h.Fragment,{children:u}):l})});$C.displayName=qC;var TL="SelectIcon",KC=x.forwardRef((e,t)=>{const{__scopeSelect:s,children:i,...r}=e;return h.jsx(He.span,{"aria-hidden":!0,...r,ref:t,children:i||"▼"})});KC.displayName=TL;var EL="SelectPortal",YC=e=>h.jsx(ed,{asChild:!0,...e});YC.displayName=EL;var Fi="SelectContent",GC=x.forwardRef((e,t)=>{const s=oi(Fi,e.__scopeSelect),[i,r]=x.useState();if(sn(()=>{r(new DocumentFragment)},[]),!s.open){const l=i;return l?Ml.createPortal(h.jsx(XC,{scope:e.__scopeSelect,children:h.jsx(ld.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),l):null}return h.jsx(ZC,{...e,ref:t})});GC.displayName=Fi;var ma=10,[XC,ri]=ir(Fi),AL="SelectContentImpl",jL=cL("SelectContent.RemoveScroll"),ZC=x.forwardRef((e,t)=>{const{__scopeSelect:s,position:i="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:l,onPointerDownOutside:u,side:d,sideOffset:f,align:m,alignOffset:y,arrowPadding:g,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:T,avoidCollisions:A,...E}=e,j=oi(Fi,s),[R,_]=x.useState(null),[M,B]=x.useState(null),L=ot(t,ae=>_(ae)),[O,K]=x.useState(null),[Z,W]=x.useState(null),se=cd(s),[I,ne]=x.useState(!1),le=x.useRef(!1);x.useEffect(()=>{if(R)return Iw(R)},[R]),Dw();const D=x.useCallback(ae=>{const[de,...Se]=se().map(_e=>_e.ref.current),[Ee]=Se.slice(-1),Ne=document.activeElement;for(const _e of ae)if(_e===Ne||(_e?.scrollIntoView({block:"nearest"}),_e===de&&M&&(M.scrollTop=0),_e===Ee&&M&&(M.scrollTop=M.scrollHeight),_e?.focus(),document.activeElement!==Ne))return},[se,M]),H=x.useCallback(()=>D([O,R]),[D,O,R]);x.useEffect(()=>{I&&H()},[I,H]);const{onOpenChange:V,triggerPointerDownPosRef:oe}=j;x.useEffect(()=>{if(R){let ae={x:0,y:0};const de=Ee=>{ae={x:Math.abs(Math.round(Ee.pageX)-(oe.current?.x??0)),y:Math.abs(Math.round(Ee.pageY)-(oe.current?.y??0))}},Se=Ee=>{ae.x<=10&&ae.y<=10?Ee.preventDefault():R.contains(Ee.target)||V(!1),document.removeEventListener("pointermove",de),oe.current=null};return oe.current!==null&&(document.addEventListener("pointermove",de),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",de),document.removeEventListener("pointerup",Se,{capture:!0})}}},[R,V,oe]),x.useEffect(()=>{const ae=()=>V(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[V]);const[ue,P]=dT(ae=>{const de=se().filter(Ne=>!Ne.disabled),Se=de.find(Ne=>Ne.ref.current===document.activeElement),Ee=fT(de,ae,Se);Ee&&setTimeout(()=>Ee.ref.current.focus())}),X=x.useCallback((ae,de,Se)=>{const Ee=!le.current&&!Se;(j.value!==void 0&&j.value===de||Ee)&&(K(ae),Ee&&(le.current=!0))},[j.value]),G=x.useCallback(()=>R?.focus(),[R]),te=x.useCallback((ae,de,Se)=>{const Ee=!le.current&&!Se;(j.value!==void 0&&j.value===de||Ee)&&W(ae)},[j.value]),ce=i==="popper"?zm:QC,he=ce===zm?{side:d,sideOffset:f,align:m,alignOffset:y,arrowPadding:g,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:T,avoidCollisions:A}:{};return h.jsx(XC,{scope:s,content:R,viewport:M,onViewportChange:B,itemRefCallback:X,selectedItem:O,onItemLeave:G,itemTextRefCallback:te,focusSelectedItem:H,selectedItemText:Z,position:i,isPositioned:I,searchRef:ue,children:h.jsx(Bp,{as:jL,allowPinchZoom:!0,children:h.jsx(Vp,{asChild:!0,trapped:j.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Oe(r,ae=>{j.trigger?.focus({preventScroll:!0}),ae.preventDefault()}),children:h.jsx(Ju,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:h.jsx(ce,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:ae=>ae.preventDefault(),...E,...he,onPlaced:()=>ne(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Oe(E.onKeyDown,ae=>{const de=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!de&&ae.key.length===1&&P(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let Ee=se().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(Ee=Ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const Ne=ae.target,_e=Ee.indexOf(Ne);Ee=Ee.slice(_e+1)}setTimeout(()=>D(Ee)),ae.preventDefault()}})})})})})})});ZC.displayName=AL;var NL="SelectItemAlignedPosition",QC=x.forwardRef((e,t)=>{const{__scopeSelect:s,onPlaced:i,...r}=e,l=oi(Fi,s),u=ri(Fi,s),[d,f]=x.useState(null),[m,y]=x.useState(null),g=ot(t,L=>y(L)),b=cd(s),S=x.useRef(!1),C=x.useRef(!0),{viewport:T,selectedItem:A,selectedItemText:E,focusSelectedItem:j}=u,R=x.useCallback(()=>{if(l.trigger&&l.valueNode&&d&&m&&T&&A&&E){const L=l.trigger.getBoundingClientRect(),O=m.getBoundingClientRect(),K=l.valueNode.getBoundingClientRect(),Z=E.getBoundingClientRect();if(l.dir!=="rtl"){const Ne=Z.left-O.left,_e=K.left-Ne,gt=L.left-_e,rt=L.width+gt,jn=Math.max(rt,O.width),Gt=window.innerWidth-ma,on=_0(_e,[ma,Math.max(ma,Gt-jn)]);d.style.minWidth=rt+"px",d.style.left=on+"px"}else{const Ne=O.right-Z.right,_e=window.innerWidth-K.right-Ne,gt=window.innerWidth-L.right-_e,rt=L.width+gt,jn=Math.max(rt,O.width),Gt=window.innerWidth-ma,on=_0(_e,[ma,Math.max(ma,Gt-jn)]);d.style.minWidth=rt+"px",d.style.right=on+"px"}const W=b(),se=window.innerHeight-ma*2,I=T.scrollHeight,ne=window.getComputedStyle(m),le=parseInt(ne.borderTopWidth,10),D=parseInt(ne.paddingTop,10),H=parseInt(ne.borderBottomWidth,10),V=parseInt(ne.paddingBottom,10),oe=le+D+I+V+H,ue=Math.min(A.offsetHeight*5,oe),P=window.getComputedStyle(T),X=parseInt(P.paddingTop,10),G=parseInt(P.paddingBottom,10),te=L.top+L.height/2-ma,ce=se-te,he=A.offsetHeight/2,ae=A.offsetTop+he,de=le+D+ae,Se=oe-de;if(de<=te){const Ne=W.length>0&&A===W[W.length-1].ref.current;d.style.bottom="0px";const _e=m.clientHeight-T.offsetTop-T.offsetHeight,gt=Math.max(ce,he+(Ne?G:0)+_e+H),rt=de+gt;d.style.height=rt+"px"}else{const Ne=W.length>0&&A===W[0].ref.current;d.style.top="0px";const gt=Math.max(te,le+T.offsetTop+(Ne?X:0)+he)+Se;d.style.height=gt+"px",T.scrollTop=de-te+T.offsetTop}d.style.margin=`${ma}px 0`,d.style.minHeight=ue+"px",d.style.maxHeight=se+"px",i?.(),requestAnimationFrame(()=>S.current=!0)}},[b,l.trigger,l.valueNode,d,m,T,A,E,l.dir,i]);sn(()=>R(),[R]);const[_,M]=x.useState();sn(()=>{m&&M(window.getComputedStyle(m).zIndex)},[m]);const B=x.useCallback(L=>{L&&C.current===!0&&(R(),j?.(),C.current=!1)},[R,j]);return h.jsx(ML,{scope:s,contentWrapper:d,shouldExpandOnScrollRef:S,onScrollButtonChange:B,children:h.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:h.jsx(He.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});QC.displayName=NL;var RL="SelectPopperPosition",zm=x.forwardRef((e,t)=>{const{__scopeSelect:s,align:i="start",collisionPadding:r=ma,...l}=e,u=ud(s);return h.jsx(zC,{...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)"}})});zm.displayName=RL;var[ML,Wp]=ir(Fi,{}),Vm="SelectViewport",WC=x.forwardRef((e,t)=>{const{__scopeSelect:s,nonce:i,...r}=e,l=ri(Vm,s),u=Wp(Vm,s),d=ot(t,l.onViewportChange),f=x.useRef(0);return h.jsxs(h.Fragment,{children:[h.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}),h.jsx(ld.Slot,{scope:s,children:h.jsx(He.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:Oe(r.onScroll,m=>{const y=m.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=u;if(b?.current&&g){const S=Math.abs(f.current-y.scrollTop);if(S>0){const C=window.innerHeight-ma*2,T=parseFloat(g.style.minHeight),A=parseFloat(g.style.height),E=Math.max(T,A);if(E<C){const j=E+S,R=Math.min(C,j),_=j-R;g.style.height=R+"px",g.style.bottom==="0px"&&(y.scrollTop=_>0?_:0,g.style.justifyContent="flex-end")}}}f.current=y.scrollTop})})})]})});WC.displayName=Vm;var JC="SelectGroup",[_L,OL]=ir(JC),DL=x.forwardRef((e,t)=>{const{__scopeSelect:s,...i}=e,r=ps();return h.jsx(_L,{scope:s,id:r,children:h.jsx(He.div,{role:"group","aria-labelledby":r,...i,ref:t})})});DL.displayName=JC;var eT="SelectLabel",PL=x.forwardRef((e,t)=>{const{__scopeSelect:s,...i}=e,r=OL(eT,s);return h.jsx(He.div,{id:r.id,...i,ref:t})});PL.displayName=eT;var Vu="SelectItem",[kL,tT]=ir(Vu),nT=x.forwardRef((e,t)=>{const{__scopeSelect:s,value:i,disabled:r=!1,textValue:l,...u}=e,d=oi(Vu,s),f=ri(Vu,s),m=d.value===i,[y,g]=x.useState(l??""),[b,S]=x.useState(!1),C=ot(t,j=>f.itemRefCallback?.(j,i,r)),T=ps(),A=x.useRef("touch"),E=()=>{r||(d.onValueChange(i),d.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 h.jsx(kL,{scope:s,value:i,disabled:r,textId:T,isSelected:m,onItemTextChange:x.useCallback(j=>{g(R=>R||(j?.textContent??"").trim())},[]),children:h.jsx(ld.ItemSlot,{scope:s,value:i,disabled:r,textValue:y,children:h.jsx(He.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:Oe(u.onFocus,()=>S(!0)),onBlur:Oe(u.onBlur,()=>S(!1)),onClick:Oe(u.onClick,()=>{A.current!=="mouse"&&E()}),onPointerUp:Oe(u.onPointerUp,()=>{A.current==="mouse"&&E()}),onPointerDown:Oe(u.onPointerDown,j=>{A.current=j.pointerType}),onPointerMove:Oe(u.onPointerMove,j=>{A.current=j.pointerType,r?f.onItemLeave?.():A.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Oe(u.onPointerLeave,j=>{j.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:Oe(u.onKeyDown,j=>{f.searchRef?.current!==""&&j.key===" "||(xL.includes(j.key)&&E(),j.key===" "&&j.preventDefault())})})})})});nT.displayName=Vu;var ol="SelectItemText",aT=x.forwardRef((e,t)=>{const{__scopeSelect:s,className:i,style:r,...l}=e,u=oi(ol,s),d=ri(ol,s),f=tT(ol,s),m=CL(ol,s),[y,g]=x.useState(null),b=ot(t,E=>g(E),f.onItemTextChange,E=>d.itemTextRefCallback?.(E,f.value,f.disabled)),S=y?.textContent,C=x.useMemo(()=>h.jsx("option",{value:f.value,disabled:f.disabled,children:S},f.value),[f.disabled,f.value,S]),{onNativeOptionAdd:T,onNativeOptionRemove:A}=m;return sn(()=>(T(C),()=>A(C)),[T,A,C]),h.jsxs(h.Fragment,{children:[h.jsx(He.span,{id:f.textId,...l,ref:b}),f.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Ml.createPortal(l.children,u.valueNode):null]})});aT.displayName=ol;var sT="SelectItemIndicator",iT=x.forwardRef((e,t)=>{const{__scopeSelect:s,...i}=e;return tT(sT,s).isSelected?h.jsx(He.span,{"aria-hidden":!0,...i,ref:t}):null});iT.displayName=sT;var Bm="SelectScrollUpButton",oT=x.forwardRef((e,t)=>{const s=ri(Bm,e.__scopeSelect),i=Wp(Bm,e.__scopeSelect),[r,l]=x.useState(!1),u=ot(t,i.onScrollButtonChange);return sn(()=>{if(s.viewport&&s.isPositioned){let d=function(){const m=f.scrollTop>0;l(m)};const f=s.viewport;return d(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[s.viewport,s.isPositioned]),r?h.jsx(lT,{...e,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=s;d&&f&&(d.scrollTop=d.scrollTop-f.offsetHeight)}}):null});oT.displayName=Bm;var Um="SelectScrollDownButton",rT=x.forwardRef((e,t)=>{const s=ri(Um,e.__scopeSelect),i=Wp(Um,e.__scopeSelect),[r,l]=x.useState(!1),u=ot(t,i.onScrollButtonChange);return sn(()=>{if(s.viewport&&s.isPositioned){let d=function(){const m=f.scrollHeight-f.clientHeight,y=Math.ceil(f.scrollTop)<m;l(y)};const f=s.viewport;return d(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[s.viewport,s.isPositioned]),r?h.jsx(lT,{...e,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:f}=s;d&&f&&(d.scrollTop=d.scrollTop+f.offsetHeight)}}):null});rT.displayName=Um;var lT=x.forwardRef((e,t)=>{const{__scopeSelect:s,onAutoScroll:i,...r}=e,l=ri("SelectScrollButton",s),u=x.useRef(null),d=cd(s),f=x.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return x.useEffect(()=>()=>f(),[f]),sn(()=>{d().find(y=>y.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[d]),h.jsx(He.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:Oe(r.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(i,50))}),onPointerMove:Oe(r.onPointerMove,()=>{l.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(i,50))}),onPointerLeave:Oe(r.onPointerLeave,()=>{f()})})}),LL="SelectSeparator",zL=x.forwardRef((e,t)=>{const{__scopeSelect:s,...i}=e;return h.jsx(He.div,{"aria-hidden":!0,...i,ref:t})});zL.displayName=LL;var Hm="SelectArrow",VL=x.forwardRef((e,t)=>{const{__scopeSelect:s,...i}=e,r=ud(s),l=oi(Hm,s),u=ri(Hm,s);return l.open&&u.position==="popper"?h.jsx(VC,{...r,...i,ref:t}):null});VL.displayName=Hm;var BL="SelectBubbleInput",cT=x.forwardRef(({__scopeSelect:e,value:t,...s},i)=>{const r=x.useRef(null),l=ot(i,r),u=pL(t);return x.useEffect(()=>{const d=r.current;if(!d)return;const f=window.HTMLSelectElement.prototype,y=Object.getOwnPropertyDescriptor(f,"value").set;if(u!==t&&y){const g=new Event("change",{bubbles:!0});y.call(d,t),d.dispatchEvent(g)}},[u,t]),h.jsx(He.select,{...s,style:{...BC,...s.style},ref:l,defaultValue:t})});cT.displayName=BL;function uT(e){return e===""||e===void 0}function dT(e){const t=ni(e),s=x.useRef(""),i=x.useRef(0),r=x.useCallback(u=>{const d=s.current+u;t(d),(function f(m){s.current=m,window.clearTimeout(i.current),m!==""&&(i.current=window.setTimeout(()=>f(""),1e3))})(d)},[t]),l=x.useCallback(()=>{s.current="",window.clearTimeout(i.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),[s,r,l]}function fT(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=UL(e,Math.max(l,0));r.length===1&&(u=u.filter(m=>m!==s));const f=u.find(m=>m.textValue.toLowerCase().startsWith(r.toLowerCase()));return f!==s?f:void 0}function UL(e,t){return e.map((s,i)=>e[(t+i)%e.length])}var HL=HC,IL=FC,FL=$C,qL=KC,$L=YC,KL=GC,YL=WC,GL=nT,XL=aT,ZL=iT,QL=oT,WL=rT;function aa({...e}){return h.jsx(HL,{"data-slot":"select",...e})}function sa({...e}){return h.jsx(FL,{"data-slot":"select-value",...e})}function ia({className:e,size:t="default",children:s,...i}){return h.jsxs(IL,{"data-slot":"select-trigger","data-size":t,className:re("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,h.jsx(qL,{asChild:!0,children:h.jsx(Pp,{className:"size-4 opacity-50"})})]})}function oa({className:e,children:t,position:s="item-aligned",align:i="center",...r}){return h.jsx($L,{children:h.jsxs(KL,{"data-slot":"select-content",className:re("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:[h.jsx(JL,{}),h.jsx(YL,{className:re("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),h.jsx(e4,{})]})})}function Pe({className:e,children:t,...s}){return h.jsxs(GL,{"data-slot":"select-item",className:re("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:[h.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:h.jsx(ZL,{children:h.jsx(y_,{className:"size-4"})})}),h.jsx(XL,{children:t})]})}function JL({className:e,...t}){return h.jsx(QL,{"data-slot":"select-scroll-up-button",className:re("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(C_,{className:"size-4"})})}function e4({className:e,...t}){return h.jsx(WL,{"data-slot":"select-scroll-down-button",className:re("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(Pp,{className:"size-4"})})}function t4(){const{t:e}=$e(),{locale:t,setLocale:s}=zP();return h.jsxs(aa,{value:t,onValueChange:i=>s(Nm(i)),children:[h.jsxs(ia,{size:"sm",className:"w-[8.5rem]","aria-label":e("app.language"),children:[h.jsx(O_,{className:"size-4"}),h.jsx(sa,{})]}),h.jsxs(oa,{align:"end",children:[h.jsx(Pe,{value:"en-US",children:e("locale.enUS")}),h.jsx(Pe,{value:"zh-CN",children:e("locale.zhCN")})]})]})}function n4({theme:e}){return e==="light"?h.jsx(K_,{className:"size-4"}):e==="dark"?h.jsx(F_,{className:"size-4"}):h.jsx(z_,{className:"size-4"})}function a4(){const{t:e}=$e(),{theme:t,setTheme:s}=G1();return h.jsxs(aa,{value:t??"system",onValueChange:s,children:[h.jsxs(ia,{size:"sm",className:"w-[8.5rem]","aria-label":e("theme.label"),children:[h.jsx(n4,{theme:t}),h.jsx(sa,{})]}),h.jsxs(oa,{align:"end",children:[h.jsx(Pe,{value:"system",children:e("theme.system")}),h.jsx(Pe,{value:"light",children:e("theme.light")}),h.jsx(Pe,{value:"dark",children:e("theme.dark")})]})]})}function s4(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 i4=e=>{switch(e){case"success":return l4;case"info":return u4;case"warning":return c4;case"error":return d4;default:return null}},o4=Array(12).fill(0),r4=({visible:e,className:t})=>ie.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ie.createElement("div",{className:"sonner-spinner"},o4.map((s,i)=>ie.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),l4=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ie.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"})),c4=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ie.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"})),u4=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ie.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"})),d4=ie.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ie.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"})),f4=ie.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"},ie.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ie.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),h4=()=>{const[e,t]=ie.useState(document.hidden);return ie.useEffect(()=>{const s=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),e};let Im=1;class m4{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:Im++,u=this.toasts.find(f=>f.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:i}),{...f,...t,id:l,dismissible:d,title:i}):f):this.addToast({title:i,...r,dismissible:d,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 d=r.then(async m=>{if(u=["resolve",m],ie.isValidElement(m))l=!1,this.create({id:i,type:"default",message:m});else if(g4(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"&&!ie.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"&&!ie.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"&&!ie.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"&&!ie.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)}),f=()=>new Promise((m,y)=>d.then(()=>u[0]==="reject"?y(u[1]):m(u[1])).catch(y));return typeof i!="string"&&typeof i!="number"?{unwrap:f}:Object.assign(i,{unwrap:f})},this.custom=(t,s)=>{const i=s?.id||Im++;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 bn=new m4,p4=(e,t)=>{const s=t?.id||Im++;return bn.addToast({title:e,...t,id:s}),s},g4=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",v4=p4,y4=()=>bn.toasts,x4=()=>bn.getActiveToasts(),tn=Object.assign(v4,{success:bn.success,info:bn.info,warning:bn.warning,error:bn.error,custom:bn.custom,message:bn.message,promise:bn.promise,dismiss:bn.dismiss,loading:bn.loading},{getHistory:y4,getToasts:x4});s4("[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 ru(e){return e.label!==void 0}const b4=3,S4="24px",w4="16px",q0=4e3,C4=356,T4=14,E4=45,A4=200;function Ma(...e){return e.filter(Boolean).join(" ")}function j4(e){const[t,s]=e.split("-"),i=[];return t&&i.push(t),s&&i.push(s),i}const N4=e=>{var t,s,i,r,l,u,d,f,m;const{invert:y,toast:g,unstyled:b,interacting:S,setHeights:C,visibleToasts:T,heights:A,index:E,toasts:j,expanded:R,removeToast:_,defaultRichColors:M,closeButton:B,style:L,cancelButtonStyle:O,actionButtonStyle:K,className:Z="",descriptionClassName:W="",duration:se,position:I,gap:ne,expandByDefault:le,classNames:D,icons:H,closeButtonAriaLabel:V="Close toast"}=e,[oe,ue]=ie.useState(null),[P,X]=ie.useState(null),[G,te]=ie.useState(!1),[ce,he]=ie.useState(!1),[ae,de]=ie.useState(!1),[Se,Ee]=ie.useState(!1),[Ne,_e]=ie.useState(!1),[gt,rt]=ie.useState(0),[jn,Gt]=ie.useState(0),on=ie.useRef(g.duration||se||q0),wa=ie.useRef(null),Ht=ie.useRef(null),Ua=E===0,Ha=E+1<=T,Nt=g.type,Hn=g.dismissible!==!1,Rt=g.className||"",Cs=g.descriptionClassName||"",fn=ie.useMemo(()=>A.findIndex(Te=>Te.toastId===g.id)||0,[A,g.id]),la=ie.useMemo(()=>{var Te;return(Te=g.closeButton)!=null?Te:B},[g.closeButton,B]),In=ie.useMemo(()=>g.duration||se||q0,[g.duration,se]),Ia=ie.useRef(0),Nn=ie.useRef(0),Ts=ie.useRef(0),Fn=ie.useRef(null),[ca,Mt]=I.split("-"),rn=ie.useMemo(()=>A.reduce((Te,ke,bt)=>bt>=fn?Te:Te+ke.height,0),[A,fn]),xt=h4(),ui=g.invert||y,Fa=Nt==="loading";Nn.current=ie.useMemo(()=>fn*ne+rn,[fn,rn]),ie.useEffect(()=>{on.current=In},[In]),ie.useEffect(()=>{te(!0)},[]),ie.useEffect(()=>{const Te=Ht.current;if(Te){const ke=Te.getBoundingClientRect().height;return Gt(ke),C(bt=>[{toastId:g.id,height:ke,position:g.position},...bt]),()=>C(bt=>bt.filter(zt=>zt.toastId!==g.id))}},[C,g.id]),ie.useLayoutEffect(()=>{if(!G)return;const Te=Ht.current,ke=Te.style.height;Te.style.height="auto";const bt=Te.getBoundingClientRect().height;Te.style.height=ke,Gt(bt),C(zt=>zt.find(et=>et.toastId===g.id)?zt.map(et=>et.toastId===g.id?{...et,height:bt}:et):[{toastId:g.id,height:bt,position:g.position},...zt])},[G,g.title,g.description,C,g.id,g.jsx,g.action,g.cancel]);const hn=ie.useCallback(()=>{he(!0),rt(Nn.current),C(Te=>Te.filter(ke=>ke.toastId!==g.id)),setTimeout(()=>{_(g)},A4)},[g,_,C,Nn]);ie.useEffect(()=>{if(g.promise&&Nt==="loading"||g.duration===1/0||g.type==="loading")return;let Te;return R||S||xt?(()=>{if(Ts.current<Ia.current){const zt=new Date().getTime()-Ia.current;on.current=on.current-zt}Ts.current=new Date().getTime()})():on.current!==1/0&&(Ia.current=new Date().getTime(),Te=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),hn()},on.current)),()=>clearTimeout(Te)},[R,S,g,Nt,xt,hn]),ie.useEffect(()=>{g.delete&&(hn(),g.onDismiss==null||g.onDismiss.call(g,g))},[hn,g.delete]);function lt(){var Te;if(H?.loading){var ke;return ie.createElement("div",{className:Ma(D?.loader,g==null||(ke=g.classNames)==null?void 0:ke.loader,"sonner-loader"),"data-visible":Nt==="loading"},H.loading)}return ie.createElement(r4,{className:Ma(D?.loader,g==null||(Te=g.classNames)==null?void 0:Te.loader),visible:Nt==="loading"})}const Ca=g.icon||H?.[Nt]||i4(Nt);var Xt,Lt;return ie.createElement("li",{tabIndex:0,ref:Ht,className:Ma(Z,Rt,D?.toast,g==null||(t=g.classNames)==null?void 0:t.toast,D?.default,D?.[Nt],g==null||(s=g.classNames)==null?void 0:s[Nt]),"data-sonner-toast":"","data-rich-colors":(Xt=g.richColors)!=null?Xt:M,"data-styled":!(g.jsx||g.unstyled||b),"data-mounted":G,"data-promise":!!g.promise,"data-swiped":Ne,"data-removed":ce,"data-visible":Ha,"data-y-position":ca,"data-x-position":Mt,"data-index":E,"data-front":Ua,"data-swiping":ae,"data-dismissible":Hn,"data-type":Nt,"data-invert":ui,"data-swipe-out":Se,"data-swipe-direction":P,"data-expanded":!!(R||le&&G),"data-testid":g.testId,style:{"--index":E,"--toasts-before":E,"--z-index":j.length-E,"--offset":`${ce?gt:Nn.current}px`,"--initial-height":le?"auto":`${jn}px`,...L,...g.style},onDragEnd:()=>{de(!1),ue(null),Fn.current=null},onPointerDown:Te=>{Te.button!==2&&(Fa||!Hn||(wa.current=new Date,rt(Nn.current),Te.target.setPointerCapture(Te.pointerId),Te.target.tagName!=="BUTTON"&&(de(!0),Fn.current={x:Te.clientX,y:Te.clientY})))},onPointerUp:()=>{var Te,ke,bt;if(Se||!Hn)return;Fn.current=null;const zt=Number(((Te=Ht.current)==null?void 0:Te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ta=Number(((ke=Ht.current)==null?void 0:ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((bt=wa.current)==null?void 0:bt.getTime()),Zt=oe==="x"?zt:Ta,qa=Math.abs(Zt)/et;if(Math.abs(Zt)>=E4||qa>.11){rt(Nn.current),g.onDismiss==null||g.onDismiss.call(g,g),X(oe==="x"?zt>0?"right":"left":Ta>0?"down":"up"),hn(),Ee(!0);return}else{var Qt,Wt;(Qt=Ht.current)==null||Qt.style.setProperty("--swipe-amount-x","0px"),(Wt=Ht.current)==null||Wt.style.setProperty("--swipe-amount-y","0px")}_e(!1),de(!1),ue(null)},onPointerMove:Te=>{var ke,bt,zt;if(!Fn.current||!Hn||((ke=window.getSelection())==null?void 0:ke.toString().length)>0)return;const et=Te.clientY-Fn.current.y,Zt=Te.clientX-Fn.current.x;var qa;const Qt=(qa=e.swipeDirections)!=null?qa:j4(I);!oe&&(Math.abs(Zt)>1||Math.abs(et)>1)&&ue(Math.abs(Zt)>Math.abs(et)?"x":"y");let Wt={x:0,y:0};const Es=Rn=>1/(1.5+Math.abs(Rn)/20);if(oe==="y"){if(Qt.includes("top")||Qt.includes("bottom"))if(Qt.includes("top")&&et<0||Qt.includes("bottom")&&et>0)Wt.y=et;else{const Rn=et*Es(et);Wt.y=Math.abs(Rn)<Math.abs(et)?Rn:et}}else if(oe==="x"&&(Qt.includes("left")||Qt.includes("right")))if(Qt.includes("left")&&Zt<0||Qt.includes("right")&&Zt>0)Wt.x=Zt;else{const Rn=Zt*Es(Zt);Wt.x=Math.abs(Rn)<Math.abs(Zt)?Rn:Zt}(Math.abs(Wt.x)>0||Math.abs(Wt.y)>0)&&_e(!0),(bt=Ht.current)==null||bt.style.setProperty("--swipe-amount-x",`${Wt.x}px`),(zt=Ht.current)==null||zt.style.setProperty("--swipe-amount-y",`${Wt.y}px`)}},la&&!g.jsx&&Nt!=="loading"?ie.createElement("button",{"aria-label":V,"data-disabled":Fa,"data-close-button":!0,onClick:Fa||!Hn?()=>{}:()=>{hn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:Ma(D?.closeButton,g==null||(i=g.classNames)==null?void 0:i.closeButton)},(Lt=H?.close)!=null?Lt:f4):null,(Nt||g.icon||g.promise)&&g.icon!==null&&(H?.[Nt]!==null||g.icon)?ie.createElement("div",{"data-icon":"",className:Ma(D?.icon,g==null||(r=g.classNames)==null?void 0:r.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||lt():null,g.type!=="loading"?Ca:null):null,ie.createElement("div",{"data-content":"",className:Ma(D?.content,g==null||(l=g.classNames)==null?void 0:l.content)},ie.createElement("div",{"data-title":"",className:Ma(D?.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?ie.createElement("div",{"data-description":"",className:Ma(W,Cs,D?.description,g==null||(d=g.classNames)==null?void 0:d.description)},typeof g.description=="function"?g.description():g.description):null),ie.isValidElement(g.cancel)?g.cancel:g.cancel&&ru(g.cancel)?ie.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||O,onClick:Te=>{ru(g.cancel)&&Hn&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,Te),hn())},className:Ma(D?.cancelButton,g==null||(f=g.classNames)==null?void 0:f.cancelButton)},g.cancel.label):null,ie.isValidElement(g.action)?g.action:g.action&&ru(g.action)?ie.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||K,onClick:Te=>{ru(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,Te),!Te.defaultPrevented&&hn())},className:Ma(D?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function $0(){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 R4(e,t){const s={};return[e,t].forEach((i,r)=>{const l=r===1,u=l?"--mobile-offset":"--offset",d=l?w4:S4;function f(m){["top","right","bottom","left"].forEach(y=>{s[`${u}-${y}`]=typeof m=="number"?`${m}px`:m})}typeof i=="number"||typeof i=="string"?f(i):typeof i=="object"?["top","right","bottom","left"].forEach(m=>{i[m]===void 0?s[`${u}-${m}`]=d:s[`${u}-${m}`]=typeof i[m]=="number"?`${i[m]}px`:i[m]}):f(d)}),s}const M4=ie.forwardRef(function(t,s){const{id:i,invert:r,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:f,className:m,offset:y,mobileOffset:g,theme:b="light",richColors:S,duration:C,style:T,visibleToasts:A=b4,toastOptions:E,dir:j=$0(),gap:R=T4,icons:_,containerAriaLabel:M="Notifications"}=t,[B,L]=ie.useState([]),O=ie.useMemo(()=>i?B.filter(G=>G.toasterId===i):B.filter(G=>!G.toasterId),[B,i]),K=ie.useMemo(()=>Array.from(new Set([l].concat(O.filter(G=>G.position).map(G=>G.position)))),[O,l]),[Z,W]=ie.useState([]),[se,I]=ie.useState(!1),[ne,le]=ie.useState(!1),[D,H]=ie.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=ie.useRef(null),oe=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ue=ie.useRef(null),P=ie.useRef(!1),X=ie.useCallback(G=>{L(te=>{var ce;return(ce=te.find(he=>he.id===G.id))!=null&&ce.delete||bn.dismiss(G.id),te.filter(({id:he})=>he!==G.id)})},[]);return ie.useEffect(()=>bn.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{L(te=>te.map(ce=>ce.id===G.id?{...ce,delete:!0}:ce))});return}setTimeout(()=>{K1.flushSync(()=>{L(te=>{const ce=te.findIndex(he=>he.id===G.id);return ce!==-1?[...te.slice(0,ce),{...te[ce],...G},...te.slice(ce+1)]:[G,...te]})})})}),[B]),ie.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 G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:te})=>{H(te?"dark":"light")})}catch{G.addListener(({matches:ce})=>{try{H(ce?"dark":"light")}catch(he){console.error(he)}})}},[b]),ie.useEffect(()=>{B.length<=1&&I(!1)},[B]),ie.useEffect(()=>{const G=te=>{var ce;if(u.every(de=>te[de]||te.code===de)){var ae;I(!0),(ae=V.current)==null||ae.focus()}te.code==="Escape"&&(document.activeElement===V.current||(ce=V.current)!=null&&ce.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[u]),ie.useEffect(()=>{if(V.current)return()=>{ue.current&&(ue.current.focus({preventScroll:!0}),ue.current=null,P.current=!1)}},[V.current]),ie.createElement("section",{ref:s,"aria-label":`${M} ${oe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},K.map((G,te)=>{var ce;const[he,ae]=G.split("-");return O.length?ie.createElement("ol",{key:G,dir:j==="auto"?$0():j,tabIndex:-1,ref:V,className:m,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":he,"data-x-position":ae,style:{"--front-toast-height":`${((ce=Z[0])==null?void 0:ce.height)||0}px`,"--width":`${C4}px`,"--gap":`${R}px`,...T,...R4(y,g)},onBlur:de=>{P.current&&!de.currentTarget.contains(de.relatedTarget)&&(P.current=!1,ue.current&&(ue.current.focus({preventScroll:!0}),ue.current=null))},onFocus:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||P.current||(P.current=!0,ue.current=de.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{ne||I(!1)},onDragEnd:()=>I(!1),onPointerDown:de=>{de.target instanceof HTMLElement&&de.target.dataset.dismissible==="false"||le(!0)},onPointerUp:()=>le(!1)},O.filter(de=>!de.position&&te===0||de.position===G).map((de,Se)=>{var Ee,Ne;return ie.createElement(N4,{key:de.id,icons:_,index:Se,toast:de,defaultRichColors:S,duration:(Ee=E?.duration)!=null?Ee:C,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:r,visibleToasts:A,closeButton:(Ne=E?.closeButton)!=null?Ne:f,interacting:ne,position:G,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:X,toasts:O.filter(_e=>_e.position==de.position),heights:Z.filter(_e=>_e.position==de.position),setHeights:W,expandByDefault:d,gap:R,expanded:se,swipeDirections:t.swipeDirections})})):null}))}),Di="adminToken";function Fm(){if(typeof window>"u")return"";try{const e=window.localStorage.getItem(Di)||"";if(e)return e;const t=window.sessionStorage.getItem(Di)||"";if(t)return window.localStorage.setItem(Di,t),window.sessionStorage.removeItem(Di),t}catch{}return""}function K0(e){if(!(typeof window>"u"))try{const t=e.trim();t?window.localStorage.setItem(Di,t):window.localStorage.removeItem(Di),window.sessionStorage.removeItem(Di)}catch{}}const hT=x.createContext(null);function _4({children:e}){const[t,s]=x.useState(()=>Fm()),i=x.useMemo(()=>({token:t,setToken:r=>{K0(r),s(Fm())},clearToken:()=>{K0(""),s("")}}),[t]);return h.jsx(hT.Provider,{value:i,children:e})}function O4(){const e=x.useContext(hT);if(!e)throw new Error("useAdminToken must be used within <AdminTokenProvider />");return e}const qm="admin-ui:admin-token-required";class xs extends Error{status;responseText;constructor(t,s){super(`HTTP ${t}: ${s}`),this.name="AdminApiError",this.status=t,this.responseText=s}}function Y0(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}async function li(e,t,s){const i=s?.trim()??Fm(),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 d=u;try{const f=JSON.parse(u);if(Y0(f)&&"error"in f){const m=f.error;Y0(m)&&typeof m.message=="string"&&(d=m.message)}}catch{}throw(l.status===401||l.status===403)&&typeof window<"u"&&window.dispatchEvent(new Event(qm)),new xs(l.status,d)}return await l.json()}async function $m(e){return li("/api/admin/meta",void 0,e)}async function D4(e){const t=new URLSearchParams;return t.set("since_ms",String(e.sinceMs)),t.set("include_stats","1"),li(`/api/admin/accounts?${t.toString()}`)}async function P4(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)),li(`/api/admin/requests?${t.toString()}`)}async function k4(e){return li(`/api/admin/requests/${encodeURIComponent(e)}`)}async function L4(){return li("/api/admin/config")}async function z4(e){return li("/api/admin/config",{method:"POST",body:JSON.stringify(e)})}async function V4(){return li("/api/admin/models")}async function B4(){return li("/api/admin/models/details")}const U4=zp("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 an({className:e,variant:t,asChild:s=!1,...i}){const r=s?Lp:"span";return h.jsx(r,{"data-slot":"badge",className:re(U4({variant:t}),e),...i})}function H4({...e}){return h.jsx(iC,{"data-slot":"dialog",...e})}function I4({...e}){return h.jsx(oC,{"data-slot":"dialog-trigger",...e})}function F4({...e}){return h.jsx(rC,{"data-slot":"dialog-portal",...e})}function q4({className:e,...t}){return h.jsx(lC,{"data-slot":"dialog-overlay",className:re("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 $4({className:e,children:t,showCloseButton:s=!0,...i}){return h.jsxs(F4,{children:[h.jsx(q4,{}),h.jsxs(cC,{"data-slot":"dialog-content",className:re("bg-background 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 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 duration-200 outline-none sm:max-w-lg",e),...i,children:[t,s&&h.jsxs(dC,{"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:[h.jsx(fw,{}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function K4({className:e,...t}){return h.jsx("div",{"data-slot":"dialog-header",className:re("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Y4({className:e,...t}){return h.jsx("div",{"data-slot":"dialog-footer",className:re("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function G4({className:e,...t}){return h.jsx(uC,{"data-slot":"dialog-title",className:re("text-lg leading-none font-semibold",e),...t})}function X4({className:e,...t}){return h.jsx(jP,{"data-slot":"dialog-description",className:re("text-muted-foreground text-sm",e),...t})}function mt({className:e,type:t,...s}){return h.jsx("input",{type:t,"data-slot":"input",className:re("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 Z4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Q4=Z4.reduce((e,t)=>{const s=Rw(`Primitive.${t}`),i=x.forwardRef((r,l)=>{const{asChild:u,...d}=r,f=u?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(f,{...d,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),W4="Label",mT=x.forwardRef((e,t)=>h.jsx(Q4.label,{...e,ref:t,onMouseDown:s=>{s.target.closest("button, input, select, textarea")||(e.onMouseDown?.(s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));mT.displayName=W4;var J4=mT;function ft({className:e,...t}){return h.jsx(J4,{"data-slot":"label",className:re("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 e5=zp(re("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"}}),qi=ie.forwardRef(({className:e,variant:t,size:s,asChild:i=!1,...r},l)=>{const u=i?Lp:"button";return h.jsx(u,{"data-slot":"button",className:re(e5({variant:t,size:s,className:e})),ref:l,...r})});qi.displayName="RainbowButton";function t5(){const{t:e}=$e(),{token:t,setToken:s,clearToken:i}=O4(),[r,l]=x.useState(!1),[u,d]=x.useState(t),[f,m]=x.useState(!1),[y,g]=x.useState(!1),[b,S]=x.useState(null),[C,T]=x.useState(null),A=e(t?"common.set":"common.unset");x.useEffect(()=>{if(typeof window>"u")return;function _(){l(!0)}return window.addEventListener(qm,_),()=>{window.removeEventListener(qm,_)}},[]),x.useEffect(()=>{r&&d(t),r&&S(null)},[r,t]);async function E(){m(!0),T(null),S(null);try{const _=await $m(u);T(_),tn.success(e("tokenDialog.toast.adminApiOk"))}catch(_){const M=_ instanceof xs?_.message:String(_);tn.error(e("tokenDialog.toast.adminApiFailed"),{description:M})}finally{m(!1)}}async function j(){const _=u.trim();if(!_){S(e("tokenDialog.validation.empty"));return}g(!0),S(null),T(null);try{const M=await $m(_);T(M),s(_),l(!1),tn.success(e("tokenDialog.toast.tokenSaved"))}catch(M){const B=M instanceof xs?M.message:String(M);S(B)}finally{g(!1)}}function R(){i(),d(""),S(null),T(null),tn.success(e("tokenDialog.toast.tokenCleared"))}return h.jsxs(H4,{open:r,onOpenChange:l,children:[h.jsx(I4,{asChild:!0,children:h.jsxs(pt,{variant:"outline",className:"gap-2",children:[h.jsx(k_,{className:"size-4"}),e("tokenDialog.trigger"),h.jsx(an,{variant:t?"secondary":"outline",className:"ml-1 hidden sm:inline-flex",children:A})]})}),h.jsxs($4,{children:[h.jsxs(K4,{children:[h.jsx(G4,{children:e("tokenDialog.title")}),h.jsx(X4,{children:h.jsxs(r0,{i18nKey:"tokenDialog.description",children:["Used as ",h.jsx("code",{children:"x-admin-token"})," when calling ",h.jsx("code",{children:"/api/admin/*"}),". Stored in ",h.jsx("code",{children:"localStorage"}),"."]})})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsx(ft,{htmlFor:"admin-token",children:"x-admin-token"}),h.jsx(mt,{id:"admin-token",type:"password",placeholder:e("tokenDialog.inputPlaceholder"),value:u,onChange:_=>{d(_.target.value),b&&S(null)},autoComplete:"off"}),b?h.jsx("p",{className:"text-destructive text-xs",children:b}):null,h.jsx("p",{className:"text-muted-foreground text-xs",children:h.jsxs(r0,{i18nKey:"tokenDialog.remoteNote",children:["If the server is not running on localhost, you must set ",h.jsx("code",{children:"ADMIN_TOKEN"})," on the server to enable remote access."]})}),C?.dbPath&&h.jsx("p",{className:"text-muted-foreground text-xs",children:e("tokenDialog.connected",{version:C.userVersion??"?",path:C.dbPath})})]}),h.jsxs(Y4,{className:"gap-2 sm:gap-2",children:[h.jsx(pt,{variant:"secondary",onClick:E,disabled:f||y,children:e(f?"common.testing":"common.test")}),h.jsx(pt,{variant:"outline",onClick:R,disabled:!t&&!u.trim()||f||y,children:e("common.clear")}),h.jsx(qi,{onClick:j,className:"h-9 px-4",disabled:f||y,children:e(y?"common.saving":"common.save")})]})]})]})}function n5({to:e,label:t}){return h.jsx(q1,{to:e,className:({isActive:s})=>re("text-sm font-medium transition-colors hover:text-foreground",s?"text-foreground":"text-muted-foreground"),children:t})}const a5=[{to:"/accounts",labelKey:"nav.accounts"},{to:"/requests",labelKey:"nav.requests"},{to:"/models",labelKey:"nav.models"},{to:"/settings",labelKey:"nav.settings"}];function G0(){const{t:e}=$e();return h.jsx(h.Fragment,{children:a5.map(t=>h.jsx(n5,{to:t.to,label:e(t.labelKey)},t.to))})}function s5(){const{t:e}=$e();return h.jsxs("div",{className:"min-h-svh bg-background text-foreground",children:[h.jsx("header",{className:"bg-background/70 sticky top-0 z-50 border-b backdrop-blur",children:h.jsxs("div",{className:"flex w-full items-center gap-3 px-4 py-3 lg:px-6",children:[h.jsx("div",{className:"md:hidden",children:h.jsxs(NP,{children:[h.jsx(RP,{asChild:!0,children:h.jsx(pt,{variant:"outline",size:"icon","aria-label":e("nav.openNavigation"),children:h.jsx(H_,{className:"size-4"})})}),h.jsxs(OP,{side:"left",className:"w-72",children:[h.jsx(DP,{children:h.jsx(PP,{children:h.jsx(_m,{className:"text-base font-semibold",children:e("app.title")})})}),h.jsx("nav",{className:"mt-4 flex flex-col gap-3",children:h.jsx(G0,{})})]})]})}),h.jsx("div",{className:"min-w-0",children:h.jsx(_m,{className:"text-base font-semibold",children:e("app.title")})}),h.jsx("nav",{className:"hidden items-center gap-5 md:flex",children:h.jsx(G0,{})}),h.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[h.jsx(t4,{}),h.jsx(a4,{}),h.jsx(t5,{})]})]})}),h.jsx("main",{className:"w-full px-4 py-4 lg:px-6 lg:py-6",children:h.jsx(FR,{})})]})}function sl(e){return String(e).padStart(2,"0")}function bl(e){if(e==null)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const s=t.getFullYear(),i=sl(t.getMonth()+1),r=sl(t.getDate()),l=sl(t.getHours()),u=sl(t.getMinutes()),d=sl(t.getSeconds());return`${s}-${i}-${r} ${l}:${u}:${d}`}function va(e){return e==null||!Number.isFinite(e)?"":Intl.NumberFormat("en-US").format(e)}function i5(e){return e==="success"?h.jsx(lw,{className:"size-4"}):e==="warning"?h.jsx(dw,{className:"size-4"}):e==="error"?h.jsx(uw,{className:"size-4"}):h.jsx(cw,{className:"size-4"})}function o5(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 Sn({variant:e="info",title:t,description:s,actionLabel:i,onAction:r,className:l}){const u=i5(e);return h.jsxs("div",{role:e==="error"?"alert":"status",className:re("flex items-start gap-3 rounded-lg border p-3",o5(e),l),children:[h.jsx("div",{className:"mt-0.5 shrink-0 text-foreground",children:u}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("div",{className:"text-sm font-medium leading-5",children:t}),s?h.jsx("div",{className:"text-muted-foreground mt-1 text-sm leading-5",children:s}):null]}),i&&r?h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:r,className:"shrink-0",children:i}):null]})}function Pi({className:e,...t}){const{effective:s}=Wu();return h.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:re("bg-muted rounded-md",s==="off"?void 0:"animate-pulse",e),...t})}function nn({className:e,...t}){return h.jsx("div",{"data-slot":"card",className:re("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 h.jsx("div",{"data-slot":"card-header",className:re("@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 h.jsx("div",{"data-slot":"card-title",className:re("leading-none font-semibold",e),...t})}function wn({className:e,...t}){return h.jsx("div",{"data-slot":"card-description",className:re("text-muted-foreground text-sm",e),...t})}function r5({className:e,...t}){return h.jsx("div",{"data-slot":"card-action",className:re("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function Cn({className:e,...t}){return h.jsx("div",{"data-slot":"card-content",className:re("px-6",e),...t})}function dd({className:e,...t}){return h.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:h.jsx("table",{"data-slot":"table",className:re("w-full caption-bottom text-sm",e),...t})})}function Jp({className:e,...t}){return h.jsx("thead",{"data-slot":"table-header",className:re("[&_tr]:border-b",e),...t})}function fd({className:e,...t}){return h.jsx("tbody",{"data-slot":"table-body",className:re("[&_tr:last-child]:border-0",e),...t})}function We({className:e,...t}){return h.jsx("tr",{"data-slot":"table-row",className:re("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function kt({className:e,...t}){return h.jsx("th",{"data-slot":"table-head",className:re("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 ye({className:e,...t}){return h.jsx("td",{"data-slot":"table-cell",className:re("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function l5(e,t,s){return Math.min(s,Math.max(t,e))}function c5({value:e=0,className:t,indicatorClassName:s,style:i,...r}){const{effective:l}=Wu(),u=Number.isFinite(e)?l5(e,0,100):0,d=l!=="off",f=l==="magic",m=l==="subtle"?"4s":"2.2s";return h.jsx("div",{"data-slot":"progress",role:"progressbar","aria-valuenow":Math.round(u),"aria-valuemin":0,"aria-valuemax":100,className:re("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:h.jsx("div",{"data-slot":"progress-indicator",className:re("relative h-full rounded-full","[container-type:inline-size] overflow-hidden","transition-[width] duration-700 ease-out","bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%_100%]",d?"animate-rainbow":void 0,f?"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:`${u}%`}})})}const u5=({children:e,className:t,...s})=>h.jsx("div",{className:re("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",t),...s,children:e}),pT=x.createContext({});function eg(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const tg=typeof window<"u",gT=tg?x.useLayoutEffect:x.useEffect,ng=x.createContext(null);function ag(e,t){e.indexOf(t)===-1&&e.push(t)}function sg(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const bs=(e,t,s)=>s>t?t:s<e?e:s;let ig=()=>{};const Ss={},vT=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yT(e){return typeof e=="object"&&e!==null}const xT=e=>/^0[^.\s]+$/u.test(e);function og(e){let t;return()=>(t===void 0&&(t=e()),t)}const na=e=>e,d5=(e,t)=>s=>t(e(s)),Ol=(...e)=>e.reduce(d5),Sl=(e,t,s)=>{const i=t-e;return i===0?1:(s-e)/i};class rg{constructor(){this.subscriptions=[]}add(t){return ag(this.subscriptions,t),()=>sg(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 ka=e=>e*1e3,ta=e=>e/1e3;function bT(e,t){return t?e*(1e3/t):0}const ST=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,f5=1e-7,h5=12;function m5(e,t,s,i,r){let l,u,d=0;do u=t+(s-t)/2,l=ST(u,i,r)-e,l>0?s=u:t=u;while(Math.abs(l)>f5&&++d<h5);return u}function Dl(e,t,s,i){if(e===t&&s===i)return na;const r=l=>m5(l,0,1,e,s);return l=>l===0||l===1?l:ST(r(l),t,i)}const wT=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,CT=e=>t=>1-e(1-t),TT=Dl(.33,1.53,.69,.99),lg=CT(TT),ET=wT(lg),AT=e=>(e*=2)<1?.5*lg(e):.5*(2-Math.pow(2,-10*(e-1))),cg=e=>1-Math.sin(Math.acos(e)),jT=CT(cg),NT=wT(cg),p5=Dl(.42,0,1,1),g5=Dl(0,0,.58,1),RT=Dl(.42,0,.58,1),v5=e=>Array.isArray(e)&&typeof e[0]!="number",MT=e=>Array.isArray(e)&&typeof e[0]=="number",y5={linear:na,easeIn:p5,easeInOut:RT,easeOut:g5,circIn:cg,circInOut:NT,circOut:jT,backIn:lg,backInOut:ET,backOut:TT,anticipate:AT},x5=e=>typeof e=="string",X0=e=>{if(MT(e)){ig(e.length===4);const[t,s,i,r]=e;return Dl(t,s,i,r)}else if(x5(e))return y5[e];return e},lu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function b5(e,t){let s=new Set,i=new Set,r=!1,l=!1;const u=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function f(y){u.has(y)&&(m.schedule(y),e()),y(d)}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(d=y,r){l=!0;return}r=!0,[s,i]=[i,s],s.forEach(f),s.clear(),r=!1,l&&(l=!1,m.process(y))}};return m}const S5=40;function _T(e,t){let s=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},l=()=>s=!0,u=lu.reduce((R,_)=>(R[_]=b5(l),R),{}),{setup:d,read:f,resolveKeyframes:m,preUpdate:y,update:g,preRender:b,render:S,postRender:C}=u,T=()=>{const R=Ss.useManualTiming?r.timestamp:performance.now();s=!1,Ss.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(R-r.timestamp,S5),1)),r.timestamp=R,r.isProcessing=!0,d.process(r),f.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))},A=()=>{s=!0,i=!0,r.isProcessing||e(T)};return{schedule:lu.reduce((R,_)=>{const M=u[_];return R[_]=(B,L=!1,O=!1)=>(s||A(),M.schedule(B,L,O)),R},{}),cancel:R=>{for(let _=0;_<lu.length;_++)u[lu[_]].cancel(R)},state:r,steps:u}}const{schedule:Je,cancel:ws,state:Yt,steps:nm}=_T(typeof requestAnimationFrame<"u"?requestAnimationFrame:na,!0);let Su;function w5(){Su=void 0}const Tn={now:()=>(Su===void 0&&Tn.set(Yt.isProcessing||Ss.useManualTiming?Yt.timestamp:performance.now()),Su),set:e=>{Su=e,queueMicrotask(w5)}},OT=e=>t=>typeof t=="string"&&t.startsWith(e),DT=OT("--"),C5=OT("var(--"),ug=e=>C5(e)?T5.test(e.split("/*")[0].trim()):!1,T5=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,or={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},wl={...or,transform:e=>bs(0,1,e)},cu={...or,default:1},ul=e=>Math.round(e*1e5)/1e5,dg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function E5(e){return e==null}const A5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fg=(e,t)=>s=>!!(typeof s=="string"&&A5.test(s)&&s.startsWith(e)||t&&!E5(s)&&Object.prototype.hasOwnProperty.call(s,t)),PT=(e,t,s)=>i=>{if(typeof i!="string")return i;const[r,l,u,d]=i.match(dg);return{[e]:parseFloat(r),[t]:parseFloat(l),[s]:parseFloat(u),alpha:d!==void 0?parseFloat(d):1}},j5=e=>bs(0,255,e),am={...or,transform:e=>Math.round(j5(e))},ki={test:fg("rgb","red"),parse:PT("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:i=1})=>"rgba("+am.transform(e)+", "+am.transform(t)+", "+am.transform(s)+", "+ul(wl.transform(i))+")"};function N5(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 Km={test:fg("#"),parse:N5,transform:ki.transform},Pl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ti=Pl("deg"),La=Pl("%"),fe=Pl("px"),R5=Pl("vh"),M5=Pl("vw"),Z0={...La,parse:e=>La.parse(e)/100,transform:e=>La.transform(e*100)},Bo={test:fg("hsl","hue"),parse:PT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:i=1})=>"hsla("+Math.round(e)+", "+La.transform(ul(t))+", "+La.transform(ul(s))+", "+ul(wl.transform(i))+")"},Et={test:e=>ki.test(e)||Km.test(e)||Bo.test(e),parse:e=>ki.test(e)?ki.parse(e):Bo.test(e)?Bo.parse(e):Km.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ki.transform(e):Bo.transform(e),getAnimatableNone:e=>{const t=Et.parse(e);return t.alpha=0,Et.transform(t)}},_5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function O5(e){return isNaN(e)&&typeof e=="string"&&(e.match(dg)?.length||0)+(e.match(_5)?.length||0)>0}const kT="number",LT="color",D5="var",P5="var(",Q0="${}",k5=/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 Cl(e){const t=e.toString(),s=[],i={color:[],number:[],var:[]},r=[];let l=0;const d=t.replace(k5,f=>(Et.test(f)?(i.color.push(l),r.push(LT),s.push(Et.parse(f))):f.startsWith(P5)?(i.var.push(l),r.push(D5),s.push(f)):(i.number.push(l),r.push(kT),s.push(parseFloat(f))),++l,Q0)).split(Q0);return{values:s,split:d,indexes:i,types:r}}function zT(e){return Cl(e).values}function VT(e){const{split:t,types:s}=Cl(e),i=t.length;return r=>{let l="";for(let u=0;u<i;u++)if(l+=t[u],r[u]!==void 0){const d=s[u];d===kT?l+=ul(r[u]):d===LT?l+=Et.transform(r[u]):l+=r[u]}return l}}const L5=e=>typeof e=="number"?0:Et.test(e)?Et.getAnimatableNone(e):e;function z5(e){const t=zT(e);return VT(e)(t.map(L5))}const ii={test:O5,parse:zT,createTransformer:VT,getAnimatableNone:z5};function sm(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 V5({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 d=s<.5?s*(1+t):s+t-s*t,f=2*s-d;r=sm(f,d,e+1/3),l=sm(f,d,e),u=sm(f,d,e-1/3)}return{red:Math.round(r*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:i}}function Bu(e,t){return s=>s>0?t:e}const ct=(e,t,s)=>e+(t-e)*s,im=(e,t,s)=>{const i=e*e,r=s*(t*t-i)+i;return r<0?0:Math.sqrt(r)},B5=[Km,ki,Bo],U5=e=>B5.find(t=>t.test(e));function W0(e){const t=U5(e);if(!t)return!1;let s=t.parse(e);return t===Bo&&(s=V5(s)),s}const J0=(e,t)=>{const s=W0(e),i=W0(t);if(!s||!i)return Bu(e,t);const r={...s};return l=>(r.red=im(s.red,i.red,l),r.green=im(s.green,i.green,l),r.blue=im(s.blue,i.blue,l),r.alpha=ct(s.alpha,i.alpha,l),ki.transform(r))},Ym=new Set(["none","hidden"]);function H5(e,t){return Ym.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function I5(e,t){return s=>ct(e,t,s)}function hg(e){return typeof e=="number"?I5:typeof e=="string"?ug(e)?Bu:Et.test(e)?J0:$5:Array.isArray(e)?BT:typeof e=="object"?Et.test(e)?J0:F5:Bu}function BT(e,t){const s=[...e],i=s.length,r=e.map((l,u)=>hg(l)(l,t[u]));return l=>{for(let u=0;u<i;u++)s[u]=r[u](l);return s}}function F5(e,t){const s={...e,...t},i={};for(const r in s)e[r]!==void 0&&t[r]!==void 0&&(i[r]=hg(e[r])(e[r],t[r]));return r=>{for(const l in i)s[l]=i[l](r);return s}}function q5(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]],d=e.values[u]??0;s[r]=d,i[l]++}return s}const $5=(e,t)=>{const s=ii.createTransformer(t),i=Cl(e),r=Cl(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?Ym.has(e)&&!r.values.length||Ym.has(t)&&!i.values.length?H5(e,t):Ol(BT(q5(i,r),r.values),s):Bu(e,t)};function UT(e,t,s){return typeof e=="number"&&typeof t=="number"&&typeof s=="number"?ct(e,t,s):hg(e)(e,t)}const K5=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>Je.update(t,s),stop:()=>ws(t),now:()=>Yt.isProcessing?Yt.timestamp:Tn.now()}},HT=(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)})`},Uu=2e4;function mg(e){let t=0;const s=50;let i=e.next(t);for(;!i.done&&t<Uu;)t+=s,i=e.next(t);return t>=Uu?1/0:t}function Y5(e,t=100,s){const i=s({...e,keyframes:[0,t]}),r=Math.min(mg(i),Uu);return{type:"keyframes",ease:l=>i.next(r*l).value/t,duration:ta(r)}}const G5=5;function IT(e,t,s){const i=Math.max(t-G5,0);return bT(s-e(i),t-i)}const ht={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},om=.001;function X5({duration:e=ht.duration,bounce:t=ht.bounce,velocity:s=ht.velocity,mass:i=ht.mass}){let r,l,u=1-t;u=bs(ht.minDamping,ht.maxDamping,u),e=bs(ht.minDuration,ht.maxDuration,ta(e)),u<1?(r=m=>{const y=m*u,g=y*e,b=y-s,S=Gm(m,u),C=Math.exp(-g);return om-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=Gm(Math.pow(m,2),u);return(-r(m)+om>0?-1:1)*((b-S)*C)/T}):(r=m=>{const y=Math.exp(-m*e),g=(m-s)*e+1;return-om+y*g},l=m=>{const y=Math.exp(-m*e),g=(s-m)*(e*e);return y*g});const d=5/e,f=Q5(r,l,d);if(e=ka(e),isNaN(f))return{stiffness:ht.stiffness,damping:ht.damping,duration:e};{const m=Math.pow(f,2)*i;return{stiffness:m,damping:u*2*Math.sqrt(i*m),duration:e}}}const Z5=12;function Q5(e,t,s){let i=s;for(let r=1;r<Z5;r++)i=i-e(i)/t(i);return i}function Gm(e,t){return e*Math.sqrt(1-t*t)}const W5=["duration","bounce"],J5=["stiffness","damping","mass"];function eS(e,t){return t.some(s=>e[s]!==void 0)}function e3(e){let t={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...e};if(!eS(e,J5)&&eS(e,W5))if(e.visualDuration){const s=e.visualDuration,i=2*Math.PI/(s*1.2),r=i*i,l=2*bs(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:ht.mass,stiffness:r,damping:l}}else{const s=X5(e);t={...t,...s,mass:ht.mass},t.isResolvedFromDuration=!0}return t}function Hu(e=ht.visualDuration,t=ht.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],d={done:!1,value:l},{stiffness:f,damping:m,mass:y,duration:g,velocity:b,isResolvedFromDuration:S}=e3({...s,velocity:-ta(s.velocity||0)}),C=b||0,T=m/(2*Math.sqrt(f*y)),A=u-l,E=ta(Math.sqrt(f/y)),j=Math.abs(A)<5;i||(i=j?ht.restSpeed.granular:ht.restSpeed.default),r||(r=j?ht.restDelta.granular:ht.restDelta.default);let R;if(T<1){const M=Gm(E,T);R=B=>{const L=Math.exp(-T*E*B);return u-L*((C+T*E*A)/M*Math.sin(M*B)+A*Math.cos(M*B))}}else if(T===1)R=M=>u-Math.exp(-E*M)*(A+(C+E*A)*M);else{const M=E*Math.sqrt(T*T-1);R=B=>{const L=Math.exp(-T*E*B),O=Math.min(M*B,300);return u-L*((C+T*E*A)*Math.sinh(O)+M*A*Math.cosh(O))/M}}const _={calculatedDuration:S&&g||null,next:M=>{const B=R(M);if(S)d.done=M>=g;else{let L=M===0?C:0;T<1&&(L=M===0?ka(C):IT(R,M,B));const O=Math.abs(L)<=i,K=Math.abs(u-B)<=r;d.done=O&&K}return d.value=d.done?u:B,d},toString:()=>{const M=Math.min(mg(_),Uu),B=HT(L=>_.next(M*L).value,M,30);return M+"ms "+B},toTransition:()=>{}};return _}Hu.applyToOptions=e=>{const t=Y5(e,100,Hu);return e.ease=t.ease,e.duration=ka(t.duration),e.type="keyframes",e};function Xm({keyframes:e,velocity:t=0,power:s=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:l=500,modifyTarget:u,min:d,max:f,restDelta:m=.5,restSpeed:y}){const g=e[0],b={done:!1,value:g},S=O=>d!==void 0&&O<d||f!==void 0&&O>f,C=O=>d===void 0?f:f===void 0||Math.abs(d-O)<Math.abs(f-O)?d:f;let T=s*t;const A=g+T,E=u===void 0?A:u(A);E!==A&&(T=E-g);const j=O=>-T*Math.exp(-O/i),R=O=>E+j(O),_=O=>{const K=j(O),Z=R(O);b.done=Math.abs(K)<=m,b.value=b.done?E:Z};let M,B;const L=O=>{S(b.value)&&(M=O,B=Hu({keyframes:[b.value,C(b.value)],velocity:IT(R,O,b.value),damping:r,stiffness:l,restDelta:m,restSpeed:y}))};return L(0),{calculatedDuration:null,next:O=>{let K=!1;return!B&&M===void 0&&(K=!0,_(O),L(O)),M!==void 0&&O>=M?B.next(O-M):(!K&&_(O),b)}}}function t3(e,t,s){const i=[],r=s||Ss.mix||UT,l=e.length-1;for(let u=0;u<l;u++){let d=r(e[u],e[u+1]);if(t){const f=Array.isArray(t)?t[u]||na:t;d=Ol(f,d)}i.push(d)}return i}function FT(e,t,{clamp:s=!0,ease:i,mixer:r}={}){const l=e.length;if(ig(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 d=t3(t,i,r),f=d.length,m=y=>{if(u&&y<e[0])return t[0];let g=0;if(f>1)for(;g<e.length-2&&!(y<e[g+1]);g++);const b=Sl(e[g],e[g+1],y);return d[g](b)};return s?y=>m(bs(e[0],e[l-1],y)):m}function n3(e,t){const s=e[e.length-1];for(let i=1;i<=t;i++){const r=Sl(0,t,i);e.push(ct(s,1,r))}}function a3(e){const t=[0];return n3(t,e.length-1),t}function s3(e,t){return e.map(s=>s*t)}function i3(e,t){return e.map(()=>t||RT).splice(0,e.length-1)}function dl({duration:e=300,keyframes:t,times:s,ease:i="easeInOut"}){const r=v5(i)?i.map(X0):X0(i),l={done:!1,value:t[0]},u=s3(s&&s.length===t.length?s:a3(t),e),d=FT(u,t,{ease:Array.isArray(r)?r:i3(t,r)});return{calculatedDuration:e,next:f=>(l.value=d(f),l.done=f>=e,l)}}const o3=e=>e!==null;function pg(e,{repeat:t,repeatType:s="loop"},i,r=1){const l=e.filter(o3),d=r<0||t&&s!=="loop"&&t%2===1?0:l.length-1;return!d||i===void 0?l[d]:i}const r3={decay:Xm,inertia:Xm,tween:dl,keyframes:dl,spring:Hu};function qT(e){typeof e.type=="string"&&(e.type=r3[e.type])}class gg{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 l3=e=>e/100;class hd extends gg{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;qT(t);const{type:s=dl,repeat:i=0,repeatDelay:r=0,repeatType:l,velocity:u=0}=t;let{keyframes:d}=t;const f=s||dl;f!==dl&&typeof d[0]!="number"&&(this.mixKeyframes=Ol(l3,UT(d[0],d[1])),d=[0,100]);const m=f({...t,keyframes:d});l==="mirror"&&(this.mirroredGenerator=f({...t,keyframes:[...d].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:d,calculatedDuration:f}=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:A}=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),j=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 O=Math.min(this.currentTime,r)/d;let K=Math.floor(O),Z=O%1;!Z&&O>=1&&(Z=1),Z===1&&K--,K=Math.min(K,g+1),K%2&&(b==="reverse"?(Z=1-Z,S&&(Z-=S/d)):b==="mirror"&&(_=u)),R=bs(0,1,Z)*d}const M=j?{done:!1,value:y[0]}:_.next(R);l&&(M.value=l(M.value));let{done:B}=M;!j&&f!==null&&(B=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return L&&C!==Xm&&(M.value=pg(y,this.options,A,this.speed)),T&&T(M.value),L&&this.finish(),M}then(t,s){return this.finished.then(t,s)}get duration(){return ta(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ta(t)}get time(){return ta(this.currentTime)}set time(t){t=ka(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=ta(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=K5,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 c3(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Li=e=>e*180/Math.PI,Zm=e=>{const t=Li(Math.atan2(e[1],e[0]));return Qm(t)},u3={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Zm,rotateZ:Zm,skewX:e=>Li(Math.atan(e[1])),skewY:e=>Li(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Qm=e=>(e=e%360,e<0&&(e+=360),e),tS=Zm,nS=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),aS=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),d3={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nS,scaleY:aS,scale:e=>(nS(e)+aS(e))/2,rotateX:e=>Qm(Li(Math.atan2(e[6],e[5]))),rotateY:e=>Qm(Li(Math.atan2(-e[2],e[0]))),rotateZ:tS,rotate:tS,skewX:e=>Li(Math.atan(e[4])),skewY:e=>Li(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Wm(e){return e.includes("scale")?1:0}function Jm(e,t){if(!e||e==="none")return Wm(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(s)i=d3,r=s;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=u3,r=d}if(!r)return Wm(t);const l=i[t],u=r[1].split(",").map(h3);return typeof l=="function"?l(u):u[l]}const f3=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return Jm(s,t)};function h3(e){return parseFloat(e.trim())}const rr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lr=new Set(rr),sS=e=>e===or||e===fe,m3=new Set(["x","y","z"]),p3=rr.filter(e=>!m3.has(e));function g3(e){const t=[];return p3.forEach(s=>{const i=e.getValue(s);i!==void 0&&(t.push([s,i.get()]),i.set(s.startsWith("scale")?1:0))}),t}const Vi={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})=>Jm(t,"x"),y:(e,{transform:t})=>Jm(t,"y")};Vi.translateX=Vi.x;Vi.translateY=Vi.y;const Bi=new Set;let ep=!1,tp=!1,np=!1;function $T(){if(tp){const e=Array.from(Bi).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),s=new Map;t.forEach(i=>{const r=g3(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)})}tp=!1,ep=!1,Bi.forEach(e=>e.complete(np)),Bi.clear()}function KT(){Bi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tp=!0)})}function v3(){np=!0,KT(),$T(),np=!1}class vg{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?(Bi.add(this),ep||(ep=!0,Je.read(KT),Je.resolveKeyframes($T))):(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 d=i.readValue(s,u);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=u),r&&l===void 0&&r.set(t[0])}c3(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Bi.delete(this)}cancel(){this.state==="scheduled"&&(Bi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const y3=e=>e.startsWith("--");function x3(e,t,s){y3(t)?e.style.setProperty(t,s):e.style[t]=s}const b3=og(()=>window.ScrollTimeline!==void 0),S3={};function w3(e,t){const s=og(e);return()=>S3[t]??s()}const YT=w3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),rl=([e,t,s,i])=>`cubic-bezier(${e}, ${t}, ${s}, ${i})`,iS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:rl([0,.65,.55,1]),circOut:rl([.55,0,1,.45]),backIn:rl([.31,.01,.66,-.59]),backOut:rl([.33,1.53,.69,.99])};function GT(e,t){if(e)return typeof e=="function"?YT()?HT(e,t):"ease-out":MT(e)?rl(e):Array.isArray(e)?e.map(s=>GT(s,t)||iS.easeOut):iS[e]}function C3(e,t,s,{delay:i=0,duration:r=300,repeat:l=0,repeatType:u="loop",ease:d="easeOut",times:f}={},m=void 0){const y={[t]:s};f&&(y.offset=f);const g=GT(d,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 XT(e){return typeof e=="function"&&"applyToOptions"in e}function T3({type:e,...t}){return XT(e)&&YT()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class E3 extends gg{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:d,onComplete:f}=t;this.isPseudoElement=!!l,this.allowFlatten=u,this.options=t,ig(typeof t.type!="string");const m=T3(t);this.animation=C3(s,i,r,m,l),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const y=pg(r,this.options,d,this.speed);this.updateMotionValue?this.updateMotionValue(y):x3(s,i,y),this.animation.cancel()}f?.(),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 ta(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ta(t)}get time(){return ta(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ka(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&&b3()?(this.animation.timeline=t,na):s(this)}}const ZT={anticipate:AT,backInOut:ET,circInOut:NT};function A3(e){return e in ZT}function j3(e){typeof e.ease=="string"&&A3(e.ease)&&(e.ease=ZT[e.ease])}const oS=10;class N3 extends E3{constructor(t){j3(t),qT(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 d=new hd({...u,autoplay:!1}),f=ka(this.finishedTime??this.time);s.setWithVelocity(d.sample(f-oS).value,d.sample(f).value,oS),d.stop()}}const rS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ii.test(e)||e==="0")&&!e.startsWith("url("));function R3(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 M3(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),d=rS(l,t);return!u||!d?!1:R3(e)||(s==="spring"||XT(s))&&i}function ap(e){e.duration=0,e.type="keyframes"}const _3=new Set(["opacity","clipPath","filter","transform"]),O3=og(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function D3(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:f,transformTemplate:m}=t.owner.getProps();return O3()&&s&&_3.has(s)&&(s!=="transform"||!m)&&!f&&!i&&r!=="mirror"&&l!==0&&u!=="inertia"}const P3=40;class k3 extends gg{constructor({autoplay:t=!0,delay:s=0,type:i="keyframes",repeat:r=0,repeatDelay:l=0,repeatType:u="loop",keyframes:d,name:f,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:f,motionValue:m,element:y,...g},S=y?.KeyframeResolver||vg;this.keyframeResolver=new S(d,(C,T,A)=>this.onKeyframesResolved(C,T,b,!A),f,m,y),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,s,i,r){this.keyframeResolver=void 0;const{name:l,type:u,velocity:d,delay:f,isHandoff:m,onUpdate:y}=i;this.resolvedAt=Tn.now(),M3(t,l,u,d)||((Ss.instantAnimations||!f)&&y?.(pg(t,i,s)),t[0]=t[t.length-1],ap(i),i.repeat=0);const b={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>P3?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...i,keyframes:t},S=!m&&D3(b)?new N3({...b,element:b.motionValue.owner.current}):new hd(b);S.finished.then(()=>this.notifyFinished()).catch(na),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(),v3()),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 L3=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function z3(e){const t=L3.exec(e);if(!t)return[,];const[,s,i,r]=t;return[`--${s??i}`,r]}function QT(e,t,s=1){const[i,r]=z3(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const u=l.trim();return vT(u)?parseFloat(u):u}return ug(r)?QT(r,t,s+1):r}function yg(e,t){return e?.[t]??e?.default??e}const WT=new Set(["width","height","top","left","right","bottom",...rr]),V3={test:e=>e==="auto",parse:e=>e},JT=e=>t=>t.test(e),eE=[or,fe,La,ti,M5,R5,V3],lS=e=>eE.find(JT(e));function B3(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xT(e):!0}const U3=new Set(["brightness","contrast","saturate","opacity"]);function H3(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=s.match(dg)||[];if(!i)return e;const r=s.replace(i,"");let l=U3.has(t)?1:0;return i!==s&&(l*=100),t+"("+l+r+")"}const I3=/\b([a-z-]*)\(.*?\)/gu,sp={...ii,getAnimatableNone:e=>{const t=e.match(I3);return t?t.map(H3).join(" "):e}},cS={...or,transform:Math.round},F3={rotate:ti,rotateX:ti,rotateY:ti,rotateZ:ti,scale:cu,scaleX:cu,scaleY:cu,scaleZ:cu,skew:ti,skewX:ti,skewY:ti,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:wl,originX:Z0,originY:Z0,originZ:fe},xg={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,top:fe,right:fe,bottom:fe,left:fe,inset:fe,insetBlock:fe,insetBlockStart:fe,insetBlockEnd:fe,insetInline:fe,insetInlineStart:fe,insetInlineEnd:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,paddingBlock:fe,paddingBlockStart:fe,paddingBlockEnd:fe,paddingInline:fe,paddingInlineStart:fe,paddingInlineEnd:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,marginBlock:fe,marginBlockStart:fe,marginBlockEnd:fe,marginInline:fe,marginInlineStart:fe,marginInlineEnd:fe,backgroundPositionX:fe,backgroundPositionY:fe,...F3,zIndex:cS,fillOpacity:wl,strokeOpacity:wl,numOctaves:cS},q3={...xg,color:Et,backgroundColor:Et,outlineColor:Et,fill:Et,stroke:Et,borderColor:Et,borderTopColor:Et,borderRightColor:Et,borderBottomColor:Et,borderLeftColor:Et,filter:sp,WebkitFilter:sp},tE=e=>q3[e];function nE(e,t){let s=tE(e);return s!==sp&&(s=ii),s.getAnimatableNone?s.getAnimatableNone(t):void 0}const $3=new Set(["auto","none","0"]);function K3(e,t,s){let i=0,r;for(;i<e.length&&!r;){const l=e[i];typeof l=="string"&&!$3.has(l)&&Cl(l).values.length&&(r=e[i]),i++}if(r&&s)for(const l of t)e[l]=nE(s,r)}class Y3 extends vg{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 f=0;f<t.length;f++){let m=t[f];if(typeof m=="string"&&(m=m.trim(),ug(m))){const y=QT(m,s.current);y!==void 0&&(t[f]=y),f===t.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!WT.has(i)||t.length!==2)return;const[r,l]=t,u=lS(r),d=lS(l);if(u!==d)if(sS(u)&&sS(d))for(let f=0;f<t.length;f++){const m=t[f];typeof m=="string"&&(t[f]=parseFloat(m))}else Vi[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,i=[];for(let r=0;r<t.length;r++)(t[r]===null||B3(t[r]))&&i.push(r);i.length&&K3(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=Vi[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]=Vi[s](t.measureViewportBox(),window.getComputedStyle(t.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),this.removedTransforms?.length&&this.removedTransforms.forEach(([d,f])=>{t.getValue(d).set(f)}),this.resolveNoneKeyframes()}}function aE(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 sE=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function G3(e){return yT(e)&&"offsetHeight"in e}const uS=30,X3=e=>!isNaN(parseFloat(e)),fl={current:void 0};class Z3{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=X3(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 rg);const i=this.events[t].add(s);return t==="change"?()=>{i(),Je.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 fl.current&&fl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Tn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>uS)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,uS);return bT(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 $i(e,t){return new Z3(e,t)}const{schedule:bg}=_T(queueMicrotask,!1),pa={x:!1,y:!1};function iE(){return pa.x||pa.y}function Q3(e){return e==="x"||e==="y"?pa[e]?null:(pa[e]=!0,()=>{pa[e]=!1}):pa.x||pa.y?null:(pa.x=pa.y=!0,()=>{pa.x=pa.y=!1})}function oE(e,t){const s=aE(e),i=new AbortController,r={passive:!0,...t,signal:i.signal};return[s,r,()=>i.abort()]}function dS(e){return!(e.pointerType==="touch"||iE())}function W3(e,t,s={}){const[i,r,l]=oE(e,s),u=d=>{if(!dS(d))return;const{target:f}=d,m=t(f,d);if(typeof m!="function"||!f)return;const y=g=>{dS(g)&&(m(g),f.removeEventListener("pointerleave",y))};f.addEventListener("pointerleave",y,r)};return i.forEach(d=>{d.addEventListener("pointerenter",u,r)}),l}const rE=(e,t)=>t?e===t?!0:rE(e,t.parentElement):!1,Sg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,J3=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ez(e){return J3.has(e.tagName)||e.tabIndex!==-1}const wu=new WeakSet;function fS(e){return t=>{t.key==="Enter"&&e(t)}}function rm(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const tz=(e,t)=>{const s=e.currentTarget;if(!s)return;const i=fS(()=>{if(wu.has(s))return;rm(s,"down");const r=fS(()=>{rm(s,"up")}),l=()=>rm(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 hS(e){return Sg(e)&&!iE()}function nz(e,t,s={}){const[i,r,l]=oE(e,s),u=d=>{const f=d.currentTarget;if(!hS(d))return;wu.add(f);const m=t(f,d),y=(S,C)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",b),wu.has(f)&&wu.delete(f),hS(S)&&typeof m=="function"&&m(S,{success:C})},g=S=>{y(S,f===window||f===document||s.useGlobalTarget||rE(f,S.target))},b=S=>{y(S,!1)};window.addEventListener("pointerup",g,r),window.addEventListener("pointercancel",b,r)};return i.forEach(d=>{(s.useGlobalTarget?window:d).addEventListener("pointerdown",u,r),G3(d)&&(d.addEventListener("focus",m=>tz(m,r)),!ez(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),l}function lE(e){return yT(e)&&"ownerSVGElement"in e}function az(e){return lE(e)&&e.tagName==="svg"}function sz(...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],d=FT(r,l,u);return t?d(i):d}const At=e=>!!(e&&e.getVelocity);function iz(e,t,s){const i=e.get();let r=null,l=i,u;const d=typeof i=="string"?i.replace(/[\d.-]/g,""):void 0,f=()=>{r&&(r.stop(),r=null)},m=()=>{f(),r=new hd({keyframes:[pS(e.get()),pS(l)],velocity:e.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...s,onUpdate:u})};if(e.attach((y,g)=>{l=y,u=b=>g(mS(b,d)),Je.postRender(m)},f),At(t)){const y=t.on("change",b=>e.set(mS(b,d))),g=e.on("destroy",y);return()=>{y(),g()}}return f}function mS(e,t){return t?e+t:e}function pS(e){return typeof e=="number"?e:parseFloat(e)}const oz=[...eE,Et,ii],rz=e=>oz.find(JT(e)),md=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function lz(e=!0){const t=x.useContext(ng);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 cE=x.createContext({strict:!1}),gS={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"]},Xo={};for(const e in gS)Xo[e]={isEnabled:t=>gS[e].some(s=>!!t[s])};function cz(e){for(const t in e)Xo[t]={...Xo[t],...e[t]}}const uz=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 Iu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uz.has(e)}let uE=e=>!Iu(e);function dz(e){typeof e=="function"&&(uE=t=>t.startsWith("on")?!Iu(t):e(t))}try{dz(require("@emotion/is-prop-valid").default)}catch{}function fz(e,t,s){const i={};for(const r in e)r==="values"&&typeof e.values=="object"||(uE(r)||s===!0&&Iu(r)||!t&&!Iu(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}const pd=x.createContext({});function gd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Tl(e){return typeof e=="string"||Array.isArray(e)}const wg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cg=["initial",...wg];function vd(e){return gd(e.animate)||Cg.some(t=>Tl(e[t]))}function dE(e){return!!(vd(e)||e.variants)}function hz(e,t){if(vd(e)){const{initial:s,animate:i}=e;return{initial:s===!1||Tl(s)?s:void 0,animate:Tl(i)?i:void 0}}return e.inherit!==!1?t:{}}function mz(e){const{initial:t,animate:s}=hz(e,x.useContext(pd));return x.useMemo(()=>({initial:t,animate:s}),[vS(t),vS(s)])}function vS(e){return Array.isArray(e)?e.join(" "):e}function yS(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const il={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const s=yS(e,t.target.x),i=yS(e,t.target.y);return`${s}% ${i}%`}},pz={correct:(e,{treeScale:t,projectionDelta:s})=>{const i=e,r=ii.parse(e);if(r.length>5)return i;const l=ii.createTransformer(e),u=typeof r[0]!="number"?1:0,d=s.x.scale*t.x,f=s.y.scale*t.y;r[0+u]/=d,r[1+u]/=f;const m=ct(d,f,.5);return typeof r[2+u]=="number"&&(r[2+u]/=m),typeof r[3+u]=="number"&&(r[3+u]/=m),l(r)}},ip={borderRadius:{...il,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:il,borderTopRightRadius:il,borderBottomLeftRadius:il,borderBottomRightRadius:il,boxShadow:pz};function fE(e,{layout:t,layoutId:s}){return lr.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!ip[e]||e==="opacity")}const gz={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vz=rr.length;function yz(e,t,s){let i="",r=!0;for(let l=0;l<vz;l++){const u=rr[l],d=e[u];if(d===void 0)continue;let f=!0;if(typeof d=="number"?f=d===(u.startsWith("scale")?1:0):f=parseFloat(d)===0,!f||s){const m=sE(d,xg[u]);if(!f){r=!1;const y=gz[u]||u;i+=`${y}(${m}) `}s&&(t[u]=m)}}return i=i.trim(),s?i=s(t,r?"":i):r&&(i="none"),i}function Tg(e,t,s){const{style:i,vars:r,transformOrigin:l}=e;let u=!1,d=!1;for(const f in t){const m=t[f];if(lr.has(f)){u=!0;continue}else if(DT(f)){r[f]=m;continue}else{const y=sE(m,xg[f]);f.startsWith("origin")?(d=!0,l[f]=y):i[f]=y}}if(t.transform||(u||s?i.transform=yz(t,e.transform,s):i.transform&&(i.transform="none")),d){const{originX:f="50%",originY:m="50%",originZ:y=0}=l;i.transformOrigin=`${f} ${m} ${y}`}}const Eg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hE(e,t,s){for(const i in t)!At(t[i])&&!fE(i,s)&&(e[i]=t[i])}function xz({transformTemplate:e},t){return x.useMemo(()=>{const s=Eg();return Tg(s,t,e),Object.assign({},s.vars,s.style)},[t])}function bz(e,t){const s=e.style||{},i={};return hE(i,s,e),Object.assign(i,xz(e,t)),i}function Sz(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 wz={offset:"stroke-dashoffset",array:"stroke-dasharray"},Cz={offset:"strokeDashoffset",array:"strokeDasharray"};function Tz(e,t,s=1,i=0,r=!0){e.pathLength=1;const l=r?wz:Cz;e[l.offset]=fe.transform(-i);const u=fe.transform(t),d=fe.transform(s);e[l.array]=`${u} ${d}`}function mE(e,{attrX:t,attrY:s,attrScale:i,pathLength:r,pathSpacing:l=1,pathOffset:u=0,...d},f,m,y){if(Tg(e,d,m),f){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&&Tz(g,r,l,u,!1)}const pE=()=>({...Eg(),attrs:{}}),gE=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ez(e,t,s,i){const r=x.useMemo(()=>{const l=pE();return mE(l,t,gE(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};hE(l,e.style,e),r.style={...l,...r.style}}return r}const Az=["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 Ag(e){return typeof e!="string"||e.includes("-")?!1:!!(Az.indexOf(e)>-1||/[A-Z]/u.test(e))}function jz(e,t,s,{latestValues:i},r,l=!1,u){const f=(u??Ag(e)?Ez:Sz)(t,i,r,e),m=fz(t,typeof e=="string",l),y=e!==x.Fragment?{...m,...f,ref:s}:{},{children:g}=t,b=x.useMemo(()=>At(g)?g.get():g,[g]);return x.createElement(e,{...y,children:b})}function xS(e){const t=[{},{}];return e?.values.forEach((s,i)=>{t[0][i]=s.get(),t[1][i]=s.getVelocity()}),t}function jg(e,t,s,i){if(typeof t=="function"){const[r,l]=xS(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]=xS(i);t=t(s!==void 0?s:e.custom,r,l)}return t}function Cu(e){return At(e)?e.get():e}function Nz({scrapeMotionValuesFromProps:e,createRenderState:t},s,i,r){return{latestValues:Rz(s,i,r,e),renderState:t()}}function Rz(e,t,s,i){const r={},l=i(e,{});for(const b in l)r[b]=Cu(l[b]);let{initial:u,animate:d}=e;const f=vd(e),m=dE(e);t&&m&&!f&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let y=s?s.initial===!1:!1;y=y||u===!1;const g=y?d:u;if(g&&typeof g!="boolean"&&!gd(g)){const b=Array.isArray(g)?g:[g];for(let S=0;S<b.length;S++){const C=jg(e,b[S]);if(C){const{transitionEnd:T,transition:A,...E}=C;for(const j in E){let R=E[j];if(Array.isArray(R)){const _=y?R.length-1:0;R=R[_]}R!==null&&(r[j]=R)}for(const j in T)r[j]=T[j]}}}return r}const vE=e=>(t,s)=>{const i=x.useContext(pd),r=x.useContext(ng),l=()=>Nz(e,t,i,r);return s?l():eg(l)};function Ng(e,t,s){const{style:i}=e,r={};for(const l in i)(At(i[l])||t.style&&At(t.style[l])||fE(l,e)||s?.getValue(l)?.liveStyle!==void 0)&&(r[l]=i[l]);return r}const Mz=vE({scrapeMotionValuesFromProps:Ng,createRenderState:Eg});function yE(e,t,s){const i=Ng(e,t,s);for(const r in e)if(At(e[r])||At(t[r])){const l=rr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[l]=e[r]}return i}const _z=vE({scrapeMotionValuesFromProps:yE,createRenderState:pE}),Oz=Symbol.for("motionComponentSymbol");function Uo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Dz(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):Uo(s)&&(s.current=i))},[t])}const Rg=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Pz="framerAppearId",xE="data-"+Rg(Pz),bE=x.createContext({});function kz(e,t,s,i,r,l){const{visualElement:u}=x.useContext(pd),d=x.useContext(cE),f=x.useContext(ng),m=x.useContext(md).reducedMotion,y=x.useRef(null);i=i||d.renderer,!y.current&&i&&(y.current=i(e,{visualState:t,parent:u,props:s,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:m,isSVG:l}));const g=y.current,b=x.useContext(bE);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&Lz(y.current,s,r,b);const S=x.useRef(!1);x.useInsertionEffect(()=>{g&&S.current&&g.update(s,f)});const C=s[xE],T=x.useRef(!!C&&!window.MotionHandoffIsComplete?.(C)&&window.MotionHasOptimisedAnimation?.(C));return gT(()=>{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 Lz(e,t,s,i){const{layoutId:r,layout:l,drag:u,dragConstraints:d,layoutScroll:f,layoutRoot:m,layoutCrossfade:y}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:SE(e.parent)),e.projection.setOptions({layoutId:r,layout:l,alwaysMeasureLayout:!!u||d&&Uo(d),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:y,layoutScroll:f,layoutRoot:m})}function SE(e){if(e)return e.options.allowProjection!==!1?e.projection:SE(e.parent)}function lm(e,{forwardMotionProps:t=!1,type:s}={},i,r){i&&cz(i);const l=s?s==="svg":Ag(e),u=l?_z:Mz;function d(m,y){let g;const b={...x.useContext(md),...m,layoutId:zz(m)},{isStatic:S}=b,C=mz(m),T=u(m,S);if(!S&&tg){Vz();const A=Bz(b);g=A.MeasureLayout,C.visualElement=kz(e,T,b,r,A.ProjectionNode,l)}return h.jsxs(pd.Provider,{value:C,children:[g&&C.visualElement?h.jsx(g,{visualElement:C.visualElement,...b}):null,jz(e,m,Dz(T,C.visualElement,y),T,S,t,l)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=x.forwardRef(d);return f[Oz]=e,f}function zz({layoutId:e}){const t=x.useContext(pT).id;return t&&e!==void 0?t+"-"+e:e}function Vz(e,t){x.useContext(cE).strict}function Bz(e){const{drag:t,layout:s}=Xo;if(!t&&!s)return{};const i={...t,...s};return{MeasureLayout:t?.isEnabled(e)||s?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Uz(e,t){if(typeof Proxy>"u")return lm;const s=new Map,i=(l,u)=>lm(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,lm(u,void 0,e,t)),s.get(u))})}function wE({top:e,left:t,right:s,bottom:i}){return{x:{min:t,max:s},y:{min:e,max:i}}}function Hz({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Iz(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 cm(e){return e===void 0||e===1}function op({scale:e,scaleX:t,scaleY:s}){return!cm(e)||!cm(t)||!cm(s)}function Mi(e){return op(e)||CE(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function CE(e){return bS(e.x)||bS(e.y)}function bS(e){return e&&e!=="0%"}function Fu(e,t,s){const i=e-s,r=t*i;return s+r}function SS(e,t,s,i,r){return r!==void 0&&(e=Fu(e,r,i)),Fu(e,s,i)+t}function rp(e,t=0,s=1,i,r){e.min=SS(e.min,t,s,i,r),e.max=SS(e.max,t,s,i,r)}function TE(e,{x:t,y:s}){rp(e.x,t.translate,t.scale,t.originPoint),rp(e.y,s.translate,s.scale,s.originPoint)}const wS=.999999999999,CS=1.0000000000001;function Fz(e,t,s,i=!1){const r=s.length;if(!r)return;t.x=t.y=1;let l,u;for(let d=0;d<r;d++){l=s[d],u=l.projectionDelta;const{visualElement:f}=l.options;f&&f.props.style&&f.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&Io(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),u&&(t.x*=u.x.scale,t.y*=u.y.scale,TE(e,u)),i&&Mi(l.latestValues)&&Io(e,l.latestValues))}t.x<CS&&t.x>wS&&(t.x=1),t.y<CS&&t.y>wS&&(t.y=1)}function Ho(e,t){e.min=e.min+t,e.max=e.max+t}function TS(e,t,s,i,r=.5){const l=ct(e.min,e.max,r);rp(e,t,s,l,i)}function Io(e,t){TS(e.x,t.x,t.scaleX,t.scale,t.originX),TS(e.y,t.y,t.scaleY,t.scale,t.originY)}function EE(e,t){return wE(Iz(e.getBoundingClientRect(),t))}function qz(e,t,s){const i=EE(e,s),{scroll:r}=t;return r&&(Ho(i.x,r.offset.x),Ho(i.y,r.offset.y)),i}const ES=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fo=()=>({x:ES(),y:ES()}),AS=()=>({min:0,max:0}),Pt=()=>({x:AS(),y:AS()}),lp={current:null},AE={current:!1};function $z(){if(AE.current=!0,!!tg)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>lp.current=e.matches;e.addEventListener("change",t),t()}else lp.current=!1}const Kz=new WeakMap;function Yz(e,t,s){for(const i in t){const r=t[i],l=s[i];if(At(r))e.addValue(i,r);else if(At(l))e.addValue(i,$i(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,$i(u!==void 0?u:r,{owner:e}))}}for(const i in s)t[i]===void 0&&e.removeValue(i);return t}const jS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Gz{scrapeMotionValuesFromProps(t,s,i){return{}}constructor({parent:t,props:s,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:l,visualState:u},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=vg,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,Je.render(this.render,!1,!0))};const{latestValues:f,renderState:m}=u;this.latestValues=f,this.baseTarget={...f},this.initialValues=s.initial?{...f}:{},this.renderState=m,this.parent=t,this.props=s,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=d,this.blockInitialAnimation=!!l,this.isControllingVariants=vd(s),this.isVariantNode=dE(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];f[b]!==void 0&&At(S)&&S.set(f[b])}}mount(t){this.current=t,Kz.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)),AE.current||$z(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:lp.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ws(this.notifyUpdate),ws(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=lr.has(t);i&&this.onBindTransform&&this.onBindTransform();const r=s.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Je.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 Xo){const s=Xo[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):Pt()}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<jS.length;i++){const r=jS[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=Yz(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=$i(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"&&(vT(i)||xT(i))?i=parseFloat(i):!rz(i)&&ii.test(s)&&(i=nE(t,s)),this.setBaseTarget(t,At(i)?i.get():i)),At(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=jg(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&&!At(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 rg),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}scheduleRenderMicrotask(){bg.render(this.render)}}class jE extends Gz{constructor(){super(...arguments),this.KeyframeResolver=Y3}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;At(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function NE(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 Xz(e){return window.getComputedStyle(e)}class Zz extends jE{constructor(){super(...arguments),this.type="html",this.renderInstance=NE}readValueFromInstance(t,s){if(lr.has(s))return this.projection?.isProjecting?Wm(s):f3(t,s);{const i=Xz(t),r=(DT(s)?i.getPropertyValue(s):i[s])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:s}){return EE(t,s)}build(t,s,i){Tg(t,s,i.transformTemplate)}scrapeMotionValuesFromProps(t,s,i){return Ng(t,s,i)}}const RE=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 Qz(e,t,s,i){NE(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(RE.has(r)?r:Rg(r),t.attrs[r])}class Wz extends jE{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pt}getBaseTargetFromProps(t,s){return t[s]}readValueFromInstance(t,s){if(lr.has(s)){const i=tE(s);return i&&i.default||0}return s=RE.has(s)?s:Rg(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,i){return yE(t,s,i)}build(t,s,i){mE(t,s,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,s,i,r){Qz(t,s,i,r)}mount(t){this.isSVGTag=gE(t.tagName),super.mount(t)}}const Jz=(e,t)=>t.isSVG??Ag(e)?new Wz(t):new Zz(t,{allowProjection:e!==x.Fragment});function Ko(e,t,s){const i=e.getProps();return jg(i,t,s!==void 0?s:i.custom,e)}const cp=e=>Array.isArray(e);function eV(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,$i(s))}function tV(e){return cp(e)?e[e.length-1]||0:e}function nV(e,t){const s=Ko(e,t);let{transitionEnd:i={},transition:r={},...l}=s||{};l={...l,...i};for(const u in l){const d=tV(l[u]);eV(e,u,d)}}function aV(e){return!!(At(e)&&e.add)}function up(e,t){const s=e.getValue("willChange");if(aV(s))return s.add(t);if(!s&&Ss.WillChange){const i=new Ss.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function ME(e){return e.props[xE]}const sV=e=>e!==null;function iV(e,{repeat:t,repeatType:s="loop"},i){const r=e.filter(sV),l=t&&s!=="loop"&&t%2===1?0:r.length-1;return r[l]}const oV={type:"spring",stiffness:500,damping:25,restSpeed:10},rV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lV={type:"keyframes",duration:.8},cV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uV=(e,{keyframes:t})=>t.length>2?lV:lr.has(e)?e.startsWith("scale")?rV(t[1]):oV:cV;function dV({when:e,delay:t,delayChildren:s,staggerChildren:i,staggerDirection:r,repeat:l,repeatType:u,repeatDelay:d,from:f,elapsed:m,...y}){return!!Object.keys(y).length}const Mg=(e,t,s,i={},r,l)=>u=>{const d=yg(i,e)||{},f=d.delay||i.delay||0;let{elapsed:m=0}=i;m=m-ka(f);const y={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-m,onUpdate:b=>{t.set(b),d.onUpdate&&d.onUpdate(b)},onComplete:()=>{u(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:l?void 0:r};dV(d)||Object.assign(y,uV(e,y)),y.duration&&(y.duration=ka(y.duration)),y.repeatDelay&&(y.repeatDelay=ka(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let g=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(ap(y),y.delay===0&&(g=!0)),(Ss.instantAnimations||Ss.skipAnimations)&&(g=!0,ap(y),y.delay=0),y.allowFlatten=!d.type&&!d.ease,g&&!l&&t.get()!==void 0){const b=iV(y.keyframes,d);if(b!==void 0){Je.update(()=>{y.onUpdate(b),y.onComplete()});return}}return d.isSync?new hd(y):new k3(y)};function fV({protectedKeys:e,needsAnimating:t},s){const i=e.hasOwnProperty(s)&&t[s]!==!0;return t[s]=!1,i}function _E(e,t,{delay:s=0,transitionOverride:i,type:r}={}){let{transition:l=e.getDefaultTransition(),transitionEnd:u,...d}=t;i&&(l=i);const f=[],m=r&&e.animationState&&e.animationState.getState()[r];for(const y in d){const g=e.getValue(y,e.latestValues[y]??null),b=d[y];if(b===void 0||m&&fV(m,y))continue;const S={delay:s,...yg(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=ME(e);if(E){const j=window.MotionHandoffAnimation(E,y,Je);j!==null&&(S.startTime=j,T=!0)}}up(e,y),g.start(Mg(y,g,b,e.shouldReduceMotion&&WT.has(y)?{type:!1}:S,e,T));const A=g.animation;A&&f.push(A)}return u&&Promise.all(f).then(()=>{Je.update(()=>{u&&nV(e,u)})}),f}function OE(e,t,s,i=0,r=1){const l=Array.from(e).sort((m,y)=>m.sortNodePosition(y)).indexOf(t),u=e.size,d=(u-1)*i;return typeof s=="function"?s(l,u):r===1?l*i:d-l*i}function dp(e,t,s={}){const i=Ko(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(_E(e,i,s)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:m=0,staggerChildren:y,staggerDirection:g}=r;return hV(e,t,f,m,y,g,s)}:()=>Promise.resolve(),{when:d}=r;if(d){const[f,m]=d==="beforeChildren"?[l,u]:[u,l];return f().then(()=>m())}else return Promise.all([l(),u(s.delay)])}function hV(e,t,s=0,i=0,r=0,l=1,u){const d=[];for(const f of e.variantChildren)f.notify("AnimationStart",t),d.push(dp(f,t,{...u,delay:s+(typeof i=="function"?0:i)+OE(e.variantChildren,f,i,r,l)}).then(()=>f.notify("AnimationComplete",t)));return Promise.all(d)}function mV(e,t,s={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const r=t.map(l=>dp(e,l,s));i=Promise.all(r)}else if(typeof t=="string")i=dp(e,t,s);else{const r=typeof t=="function"?Ko(e,t,s.custom):t;i=Promise.all(_E(e,r,s))}return i.then(()=>{e.notify("AnimationComplete",t)})}function DE(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=Cg.length;function PE(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?PE(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=Cg[s],r=e.props[i];(Tl(r)||r===!1)&&(t[i]=r)}return t}const gV=[...wg].reverse(),vV=wg.length;function yV(e){return t=>Promise.all(t.map(({animation:s,options:i})=>mV(e,s,i)))}function xV(e){let t=yV(e),s=NS(),i=!0;const r=f=>(m,y)=>{const g=Ko(e,y,f==="exit"?e.presenceContext?.custom:void 0);if(g){const{transition:b,transitionEnd:S,...C}=g;m={...m,...C,...S}}return m};function l(f){t=f(e)}function u(f){const{props:m}=e,y=PE(e.parent)||{},g=[],b=new Set;let S={},C=1/0;for(let A=0;A<vV;A++){const E=gV[A],j=s[E],R=m[E]!==void 0?m[E]:y[E],_=Tl(R),M=E===f?j.isActive:null;M===!1&&(C=A);let B=R===y[E]&&R!==m[E]&&_;if(B&&i&&e.manuallyAnimateOnMount&&(B=!1),j.protectedKeys={...S},!j.isActive&&M===null||!R&&!j.prevProp||gd(R)||typeof R=="boolean")continue;const L=bV(j.prevProp,R);let O=L||E===f&&j.isActive&&!B&&_||A>C&&_,K=!1;const Z=Array.isArray(R)?R:[R];let W=Z.reduce(r(E),{});M===!1&&(W={});const{prevResolvedValues:se={}}=j,I={...se,...W},ne=H=>{O=!0,b.has(H)&&(K=!0,b.delete(H)),j.needsAnimating[H]=!0;const V=e.getValue(H);V&&(V.liveStyle=!1)};for(const H in I){const V=W[H],oe=se[H];if(S.hasOwnProperty(H))continue;let ue=!1;cp(V)&&cp(oe)?ue=!DE(V,oe):ue=V!==oe,ue?V!=null?ne(H):b.add(H):V!==void 0&&b.has(H)?ne(H):j.protectedKeys[H]=!0}j.prevProp=R,j.prevResolvedValues=W,j.isActive&&(S={...S,...W}),i&&e.blockInitialAnimation&&(O=!1);const le=B&&L;O&&(!le||K)&&g.push(...Z.map(H=>{const V={type:E};if(typeof H=="string"&&i&&!le&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,ue=Ko(oe,H);if(oe.enteringChildren&&ue){const{delayChildren:P}=ue.transition||{};V.delay=OE(oe.enteringChildren,e,P)}}return{animation:H,options:V}}))}if(b.size){const A={};if(typeof m.initial!="boolean"){const E=Ko(e,Array.isArray(m.initial)?m.initial[0]:m.initial);E&&E.transition&&(A.transition=E.transition)}b.forEach(E=>{const j=e.getBaseTarget(E),R=e.getValue(E);R&&(R.liveStyle=!0),A[E]=j??null}),g.push({animation:A})}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 d(f,m){if(s[f].isActive===m)return Promise.resolve();e.variantChildren?.forEach(g=>g.animationState?.setActive(f,m)),s[f].isActive=m;const y=u(f);for(const g in s)s[g].protectedKeys={};return y}return{animateChanges:u,setActive:d,setAnimateFunction:l,getState:()=>s,reset:()=>{s=NS()}}}function bV(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!DE(t,e):!1}function Ri(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function NS(){return{animate:Ri(!0),whileInView:Ri(),whileHover:Ri(),whileTap:Ri(),whileDrag:Ri(),whileFocus:Ri(),exit:Ri()}}class ci{constructor(t){this.isMounted=!1,this.node=t}update(){}}class SV extends ci{constructor(t){super(t),t.animationState||(t.animationState=xV(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gd(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 wV=0;class CV extends ci{constructor(){super(...arguments),this.id=wV++}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 TV={animation:{Feature:SV},exit:{Feature:CV}};function El(e,t,s,i={passive:!0}){return e.addEventListener(t,s,i),()=>e.removeEventListener(t,s)}function kl(e){return{point:{x:e.pageX,y:e.pageY}}}const EV=e=>t=>Sg(t)&&e(t,kl(t));function hl(e,t,s,i){return El(e,t,EV(s),i)}const kE=1e-4,AV=1-kE,jV=1+kE,LE=.01,NV=0-LE,RV=0+LE;function dn(e){return e.max-e.min}function MV(e,t,s){return Math.abs(e-t)<=s}function RS(e,t,s,i=.5){e.origin=i,e.originPoint=ct(t.min,t.max,e.origin),e.scale=dn(s)/dn(t),e.translate=ct(s.min,s.max,e.origin)-e.originPoint,(e.scale>=AV&&e.scale<=jV||isNaN(e.scale))&&(e.scale=1),(e.translate>=NV&&e.translate<=RV||isNaN(e.translate))&&(e.translate=0)}function ml(e,t,s,i){RS(e.x,t.x,s.x,i?i.originX:void 0),RS(e.y,t.y,s.y,i?i.originY:void 0)}function MS(e,t,s){e.min=s.min+t.min,e.max=e.min+dn(t)}function _V(e,t,s){MS(e.x,t.x,s.x),MS(e.y,t.y,s.y)}function _S(e,t,s){e.min=t.min-s.min,e.max=e.min+dn(t)}function qu(e,t,s){_S(e.x,t.x,s.x),_S(e.y,t.y,s.y)}function ea(e){return[e("x"),e("y")]}const zE=({current:e})=>e?e.ownerDocument.defaultView:null,OS=(e,t)=>Math.abs(e-t);function OV(e,t){const s=OS(e.x,t.x),i=OS(e.y,t.y);return Math.sqrt(s**2+i**2)}class VE{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=dm(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,C=OV(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!C)return;const{point:T}=b,{timestamp:A}=Yt;this.history.push({...T,timestamp:A});const{onStart:E,onMove:j}=this.handlers;S||(E&&E(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,b)},this.handlePointerMove=(b,S)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=um(S,this.transformPagePoint),Je.update(this.updatePoint,!0)},this.handlePointerUp=(b,S)=>{this.end();const{onEnd:C,onSessionEnd:T,resumeAnimation:A}=this.handlers;if(this.dragSnapToOrigin&&A&&A(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=dm(b.type==="pointercancel"?this.lastMoveEventInfo:um(S,this.transformPagePoint),this.history);this.startEvent&&C&&C(b,E),T&&T(b,E)},!Sg(t))return;this.dragSnapToOrigin=l,this.handlers=s,this.transformPagePoint=i,this.distanceThreshold=u,this.contextWindow=r||window;const d=kl(t),f=um(d,this.transformPagePoint),{point:m}=f,{timestamp:y}=Yt;this.history=[{...m,timestamp:y}];const{onSessionStart:g}=s;g&&g(t,dm(f,this.history)),this.removeListeners=Ol(hl(this.contextWindow,"pointermove",this.handlePointerMove),hl(this.contextWindow,"pointerup",this.handlePointerUp),hl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ws(this.updatePoint)}}function um(e,t){return t?{point:t(e.point)}:e}function DS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function dm({point:e},t){return{point:e,delta:DS(e,BE(t)),offset:DS(e,DV(t)),velocity:PV(t,.1)}}function DV(e){return e[0]}function BE(e){return e[e.length-1]}function PV(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,i=null;const r=BE(e);for(;s>=0&&(i=e[s],!(r.timestamp-i.timestamp>ka(t)));)s--;if(!i)return{x:0,y:0};const l=ta(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 kV(e,{min:t,max:s},i){return t!==void 0&&e<t?e=i?ct(t,e,i.min):Math.max(e,t):s!==void 0&&e>s&&(e=i?ct(s,e,i.max):Math.min(e,s)),e}function PS(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 LV(e,{top:t,left:s,bottom:i,right:r}){return{x:PS(e.x,s,r),y:PS(e.y,t,i)}}function kS(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 zV(e,t){return{x:kS(e.x,t.x),y:kS(e.y,t.y)}}function VV(e,t){let s=.5;const i=dn(e),r=dn(t);return r>i?s=Sl(t.min,t.max-i,e.min):i>r&&(s=Sl(e.min,e.max-r,t.min)),bs(0,1,s)}function BV(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 fp=.35;function UV(e=fp){return e===!1?e=0:e===!0&&(e=fp),{x:LS(e,"left","right"),y:LS(e,"top","bottom")}}function LS(e,t,s){return{min:zS(e,t),max:zS(e,s)}}function zS(e,t){return typeof e=="number"?e:e[t]||0}const HV=new WeakMap;class IV{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=Pt(),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(kl(g).point)},u=(g,b)=>{const{drag:S,dragPropagation:C,onDragStart:T}=this.getProps();if(S&&!C&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Q3(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),ea(E=>{let j=this.getAxisMotionValue(E).get()||0;if(La.test(j)){const{projection:R}=this.visualElement;if(R&&R.layout){const _=R.layout.layoutBox[E];_&&(j=dn(_)*(parseFloat(j)/100))}}this.originPoint[E]=j}),T&&Je.postRender(()=>T(g,b)),up(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},d=(g,b)=>{this.latestPointerEvent=g,this.latestPanInfo=b;const{dragPropagation:S,dragDirectionLock:C,onDirectionLock:T,onDrag:A}=this.getProps();if(!S&&!this.openDragLock)return;const{offset:E}=b;if(C&&this.currentDirection===null){this.currentDirection=FV(E),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",b.point,E),this.updateAxis("y",b.point,E),this.visualElement.render(),A&&A(g,b)},f=(g,b)=>{this.latestPointerEvent=g,this.latestPanInfo=b,this.stop(g,b),this.latestPointerEvent=null,this.latestPanInfo=null},m=()=>ea(g=>this.getAnimationState(g)==="paused"&&this.getAxisMotionValue(g).animation?.play()),{dragSnapToOrigin:y}=this.getProps();this.panSession=new VE(t,{onSessionStart:l,onStart:u,onMove:d,onSessionEnd:f,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:i,contextWindow:zE(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:d}=this.getProps();d&&Je.postRender(()=>d(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||!uu(t,r,this.currentDirection))return;const l=this.getAxisMotionValue(t);let u=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(u=kV(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&&Uo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=LV(i.layoutBox,t):this.constraints=!1,this.elastic=UV(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&ea(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=BV(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!Uo(t))return!1;const i=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const l=qz(i,r.root,this.visualElement.getTransformPagePoint());let u=zV(r.layout.layoutBox,l);if(s){const d=s(Hz(u));this.hasMutatedConstraints=!!d,d&&(u=wE(d))}return u}startAnimation(t){const{drag:s,dragMomentum:i,dragElastic:r,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},m=ea(y=>{if(!uu(y,s,this.currentDirection))return;let g=f&&f[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(d)}startAxisValueAnimation(t,s){const i=this.getAxisMotionValue(t);return up(this.visualElement,t),i.start(Mg(t,i,0,s,this.visualElement,!1))}stopAnimation(){ea(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ea(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){ea(s=>{const{drag:i}=this.getProps();if(!uu(s,i,this.currentDirection))return;const{projection:r}=this.visualElement,l=this.getAxisMotionValue(s);if(r&&r.layout){const{min:u,max:d}=r.layout.layoutBox[s];l.set(t[s]-ct(u,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:i}=this.visualElement;if(!Uo(s)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ea(u=>{const d=this.getAxisMotionValue(u);if(d&&this.constraints!==!1){const f=d.get();r[u]=VV({min:f,max:f},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(),ea(u=>{if(!uu(u,t,null))return;const d=this.getAxisMotionValue(u),{min:f,max:m}=this.constraints[u];d.set(ct(f,m,r[u]))})}addListeners(){if(!this.visualElement.current)return;HV.set(this.visualElement,this);const t=this.visualElement.current,s=hl(t,"pointerdown",f=>{const{drag:m,dragListener:y=!0}=this.getProps();m&&y&&this.start(f)}),i=()=>{const{dragConstraints:f}=this.getProps();Uo(f)&&f.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,l=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Je.read(i);const u=El(window,"resize",()=>this.scalePositionWithinConstraints()),d=r.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:m})=>{this.isDragging&&m&&(ea(y=>{const g=this.getAxisMotionValue(y);g&&(this.originPoint[y]+=f[y].translate,g.set(g.get()+f[y].translate))}),this.visualElement.render())}));return()=>{u(),s(),l(),d&&d()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:l=!1,dragElastic:u=fp,dragMomentum:d=!0}=t;return{...t,drag:s,dragDirectionLock:i,dragPropagation:r,dragConstraints:l,dragElastic:u,dragMomentum:d}}}function uu(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function FV(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class qV extends ci{constructor(t){super(t),this.removeGroupControls=na,this.removeListeners=na,this.controls=new IV(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||na}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 VS=e=>(t,s)=>{e&&Je.postRender(()=>e(t,s))};class $V extends ci{constructor(){super(...arguments),this.removePointerDownListener=na}onPointerDown(t){this.session=new VE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zE(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:VS(t),onStart:VS(s),onMove:i,onEnd:(l,u)=>{delete this.session,r&&Je.postRender(()=>r(l,u))}}}mount(){this.removePointerDownListener=hl(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 Tu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let fm=!1;class KV 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),fm&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),Tu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:i,drag:r,isPresent:l}=this.props,{projection:u}=i;return u&&(u.isPresent=l,fm=!0,r||t.layoutDependency!==s||s===void 0||t.isPresent!==l?u.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?u.promote():u.relegate()||Je.postRender(()=>{const d=u.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),bg.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:i}=this.props,{projection:r}=t;fm=!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 UE(e){const[t,s]=lz(),i=x.useContext(pT);return h.jsx(KV,{...e,layoutGroup:i,switchLayoutGroup:x.useContext(bE),isPresent:t,safeToRemove:s})}function YV(e,t,s){const i=At(e)?e:$i(e);return i.start(Mg("",i,t,s)),i.animation}const GV=(e,t)=>e.depth-t.depth;class XV{constructor(){this.children=[],this.isDirty=!1}add(t){ag(this.children,t),this.isDirty=!0}remove(t){sg(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(GV),this.isDirty=!1,this.children.forEach(t)}}function ZV(e,t){const s=Tn.now(),i=({timestamp:r})=>{const l=r-s;l>=t&&(ws(i),e(l-t))};return Je.setup(i,!0),()=>ws(i)}const HE=["TopLeft","TopRight","BottomLeft","BottomRight"],QV=HE.length,BS=e=>typeof e=="string"?parseFloat(e):e,US=e=>typeof e=="number"||fe.test(e);function WV(e,t,s,i,r,l){r?(e.opacity=ct(0,s.opacity??1,JV(i)),e.opacityExit=ct(t.opacity??1,0,eB(i))):l&&(e.opacity=ct(t.opacity??1,s.opacity??1,i));for(let u=0;u<QV;u++){const d=`border${HE[u]}Radius`;let f=HS(t,d),m=HS(s,d);if(f===void 0&&m===void 0)continue;f||(f=0),m||(m=0),f===0||m===0||US(f)===US(m)?(e[d]=Math.max(ct(BS(f),BS(m),i),0),(La.test(m)||La.test(f))&&(e[d]+="%")):e[d]=m}(t.rotate||s.rotate)&&(e.rotate=ct(t.rotate||0,s.rotate||0,i))}function HS(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const JV=IE(0,.5,jT),eB=IE(.5,.95,na);function IE(e,t,s){return i=>i<e?0:i>t?1:s(Sl(e,t,i))}function IS(e,t){e.min=t.min,e.max=t.max}function ha(e,t){IS(e.x,t.x),IS(e.y,t.y)}function FS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function qS(e,t,s,i,r){return e-=t,e=Fu(e,1/s,i),r!==void 0&&(e=Fu(e,1/r,i)),e}function tB(e,t=0,s=1,i=.5,r,l=e,u=e){if(La.test(t)&&(t=parseFloat(t),t=ct(u.min,u.max,t/100)-u.min),typeof t!="number")return;let d=ct(l.min,l.max,i);e===l&&(d-=t),e.min=qS(e.min,t,s,d,r),e.max=qS(e.max,t,s,d,r)}function $S(e,t,[s,i,r],l,u){tB(e,t[s],t[i],t[r],t.scale,l,u)}const nB=["x","scaleX","originX"],aB=["y","scaleY","originY"];function KS(e,t,s,i){$S(e.x,t,nB,s?s.x:void 0,i?i.x:void 0),$S(e.y,t,aB,s?s.y:void 0,i?i.y:void 0)}function YS(e){return e.translate===0&&e.scale===1}function FE(e){return YS(e.x)&&YS(e.y)}function GS(e,t){return e.min===t.min&&e.max===t.max}function sB(e,t){return GS(e.x,t.x)&&GS(e.y,t.y)}function XS(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qE(e,t){return XS(e.x,t.x)&&XS(e.y,t.y)}function ZS(e){return dn(e.x)/dn(e.y)}function QS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class iB{constructor(){this.members=[]}add(t){ag(this.members,t),t.scheduleRender()}remove(t){if(sg(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 oB(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 d=e.x.scale*t.x,f=e.y.scale*t.y;return(d!==1||f!==1)&&(i+=`scale(${d}, ${f})`),i||"none"}const hm=["","X","Y","Z"],rB=1e3;let lB=0;function mm(e,t,s,i){const{latestValues:r}=t;r[e]&&(s[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function $E(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=ME(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:r,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",Je,!(r||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&$E(i)}function KE({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(u={},d=t?.()){this.id=lB++,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(dB),this.nodes.forEach(pB),this.nodes.forEach(gB),this.nodes.forEach(fB)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new XV)}addEventListener(u,d){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new rg),this.eventHandlers.get(u).add(d)}notifyListeners(u,...d){const f=this.eventHandlers.get(u);f&&f.notify(...d)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=lE(u)&&!az(u),this.instance=u;const{layoutId:d,layout:f,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&&(f||d)&&(this.isLayoutDirty=!0),e){let y,g=0;const b=()=>this.root.updateBlockedByResize=!1;Je.read(()=>{g=window.innerWidth}),e(u,()=>{const S=window.innerWidth;S!==g&&(g=S,this.root.updateBlockedByResize=!0,y&&y(),y=ZV(b,250),Tu.hasAnimatedSinceResize&&(Tu.hasAnimatedSinceResize=!1,this.nodes.forEach(e1)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&m&&(d||f)&&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()||SB,{onLayoutAnimationStart:T,onLayoutAnimationComplete:A}=m.getProps(),E=!this.targetLayout||!qE(this.targetLayout,S),j=!g&&b;if(this.options.layoutRoot||this.resumeFrom||j||g&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const R={...yg(C,"layout"),onPlay:T,onComplete:A};(m.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R),this.setAnimationOrigin(y,j)}else g||e1(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(),ws(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(vB),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&&$E(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:d,layout:f}=this.options;if(d===void 0&&!f)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(WS);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(JS);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(mB),this.nodes.forEach(cB),this.nodes.forEach(uB)):this.nodes.forEach(JS),this.clearAllSnapshots();const d=Tn.now();Yt.delta=bs(0,1e3/60,d-Yt.timestamp),Yt.timestamp=d,Yt.isProcessing=!0,nm.update.process(Yt),nm.preRender.process(Yt),nm.render.process(Yt),Yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hB),this.sharedNodes.forEach(yB)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Je.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 f=0;f<this.path.length;f++)this.path[f].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Pt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(d=!1),d&&this.instance){const f=i(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:f,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!r)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!FE(this.projectionDelta),f=this.getTransformTemplate(),m=f?f(this.latestValues,""):void 0,y=m!==this.prevTransformTemplateValue;u&&this.instance&&(d||Mi(this.latestValues)||y)&&(r(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const d=this.measurePageBox();let f=this.removeElementScroll(d);return u&&(f=this.removeTransform(f)),wB(f),{animationId:this.root.animationId,measuredBox:d,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:u}=this.options;if(!u)return Pt();const d=u.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(CB))){const{scroll:m}=this.root;m&&(Ho(d.x,m.offset.x),Ho(d.y,m.offset.y))}return d}removeElementScroll(u){const d=Pt();if(ha(d,u),this.scroll?.wasRoot)return d;for(let f=0;f<this.path.length;f++){const m=this.path[f],{scroll:y,options:g}=m;m!==this.root&&y&&g.layoutScroll&&(y.wasRoot&&ha(d,u),Ho(d.x,y.offset.x),Ho(d.y,y.offset.y))}return d}applyTransform(u,d=!1){const f=Pt();ha(f,u);for(let m=0;m<this.path.length;m++){const y=this.path[m];!d&&y.options.layoutScroll&&y.scroll&&y!==y.root&&Io(f,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),Mi(y.latestValues)&&Io(f,y.latestValues)}return Mi(this.latestValues)&&Io(f,this.latestValues),f}removeTransform(u){const d=Pt();ha(d,u);for(let f=0;f<this.path.length;f++){const m=this.path[f];if(!m.instance||!Mi(m.latestValues))continue;op(m.latestValues)&&m.updateSnapshot();const y=Pt(),g=m.measurePageBox();ha(y,g),KS(d,m.latestValues,m.snapshot?m.snapshot.layoutBox:void 0,y)}return Mi(this.latestValues)&&KS(d,this.latestValues),d}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!==Yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==d;if(!(u||f&&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=Yt.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=Pt(),this.targetWithTransforms=Pt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_V(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ha(this.target,this.layout.layoutBox),TE(this.target,this.targetDelta)):ha(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||op(this.parent.latestValues)||CE(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,d,f){this.relativeParent=u,this.linkedParentVersion=u.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pt(),this.relativeTargetOrigin=Pt(),qu(this.relativeTargetOrigin,d,f),ha(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const u=this.getLead(),d=!!this.resumingFrom||this!==u;let f=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(f=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===Yt.timestamp&&(f=!1),f)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;ha(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,b=this.treeScale.y;Fz(this.layoutCorrected,this.treeScale,this.path,d),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=Pt());const{target:S}=u;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(FS(this.prevProjectionDelta.x,this.projectionDelta.x),FS(this.prevProjectionDelta.y,this.projectionDelta.y)),ml(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==b||!QS(this.projectionDelta.x,this.prevProjectionDelta.x)||!QS(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 d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Fo(),this.projectionDelta=Fo(),this.projectionDeltaWithTransform=Fo()}setAnimationOrigin(u,d=!1){const f=this.snapshot,m=f?f.latestValues:{},y={...this.latestValues},g=Fo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const b=Pt(),S=f?f.source:void 0,C=this.layout?this.layout.source:void 0,T=S!==C,A=this.getStack(),E=!A||A.members.length<=1,j=!!(T&&!E&&this.options.crossfade===!0&&!this.path.some(bB));this.animationProgress=0;let R;this.mixTargetDelta=_=>{const M=_/1e3;t1(g.x,u.x,M),t1(g.y,u.y,M),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qu(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),xB(this.relativeTarget,this.relativeTargetOrigin,b,M),R&&sB(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Pt()),ha(R,this.relativeTarget)),T&&(this.animationValues=y,WV(y,m,this.latestValues,M,j,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&&(ws(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Je.update(()=>{Tu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$i(0)),this.currentAnimation=YV(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),u.onUpdate&&u.onUpdate(d)},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(rB),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:d,target:f,layout:m,latestValues:y}=u;if(!(!d||!f||!m)){if(this!==u&&this.layout&&m&&YE(this.options.animationType,this.layout.layoutBox,m.layoutBox)){f=this.target||Pt();const g=dn(this.layout.layoutBox.x);f.x.min=u.target.x.min,f.x.max=f.x.min+g;const b=dn(this.layout.layoutBox.y);f.y.min=u.target.y.min,f.y.max=f.y.min+b}ha(d,f),Io(d,y),ml(this.projectionDeltaWithTransform,this.layoutCorrected,d,y)}}registerSharedNode(u,d){this.sharedNodes.has(u)||this.sharedNodes.set(u,new iB),this.sharedNodes.get(u).add(d);const m=d.options.initialPromotionConfig;d.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(d):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:d,preserveFollowOpacity:f}={}){const m=this.getStack();m&&m.promote(this,f),u&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let d=!1;const{latestValues:f}=u;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(d=!0),!d)return;const m={};f.z&&mm("z",u,m,this.animationValues);for(let y=0;y<hm.length;y++)mm(`rotate${hm[y]}`,u,m,this.animationValues),mm(`skew${hm[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,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const f=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=Cu(d?.pointerEvents)||"",u.transform=f?f(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=Cu(d?.pointerEvents)||""),this.hasProjected&&!Mi(this.latestValues)&&(u.transform=f?f({},""):"none",this.hasProjected=!1);return}u.visibility="";const y=m.animationValues||m.latestValues;this.applyTransformsToTarget();let g=oB(this.projectionDeltaWithTransform,this.treeScale,y);f&&(g=f(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 ip){if(y[C]===void 0)continue;const{correct:T,applyTo:A,isCSSVariable:E}=ip[C],j=g==="none"?y[C]:T(y[C],m);if(A){const R=A.length;for(let _=0;_<R;_++)u[A[_]]=j}else E?this.options.visualElement.renderState.vars[C]=j:u[C]=j}this.options.layoutId&&(u.pointerEvents=m===this?Cu(d?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>u.currentAnimation?.stop()),this.root.nodes.forEach(WS),this.root.sharedNodes.clear()}}}function cB(e){e.updateLayout()}function uB(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"?ea(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],b=dn(g);g.min=s[y].min,g.max=g.min+b}):YE(r,t.layoutBox,s)&&ea(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=Fo();ml(u,s,t.layoutBox);const d=Fo();l?ml(d,e.applyTransform(i,!0),t.measuredBox):ml(d,s,t.layoutBox);const f=!FE(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=Pt();qu(S,t.layoutBox,g.layoutBox);const C=Pt();qu(C,s,b.layoutBox),qE(S,C)||(m=!0),y.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=S,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:d,layoutDelta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function dB(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 fB(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hB(e){e.clearSnapshot()}function WS(e){e.clearMeasurements()}function JS(e){e.isLayoutDirty=!1}function mB(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function e1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pB(e){e.resolveTargetDelta()}function gB(e){e.calcProjection()}function vB(e){e.resetSkewAndRotation()}function yB(e){e.removeLeadSnapshot()}function t1(e,t,s){e.translate=ct(t.translate,0,s),e.scale=ct(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function n1(e,t,s,i){e.min=ct(t.min,s.min,i),e.max=ct(t.max,s.max,i)}function xB(e,t,s,i){n1(e.x,t.x,s.x,i),n1(e.y,t.y,s.y,i)}function bB(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const SB={duration:.45,ease:[.4,0,.1,1]},a1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),s1=a1("applewebkit/")&&!a1("chrome/")?Math.round:na;function i1(e){e.min=s1(e.min),e.max=s1(e.max)}function wB(e){i1(e.x),i1(e.y)}function YE(e,t,s){return e==="position"||e==="preserve-aspect"&&!MV(ZS(t),ZS(s),.2)}function CB(e){return e!==e.root&&e.scroll?.wasRoot}const TB=KE({attachResizeListener:(e,t)=>El(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),pm={current:void 0},GE=KE({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pm.current){const e=new TB({});e.mount(window),e.setOptions({layoutScroll:!0}),pm.current=e}return pm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),EB={pan:{Feature:$V},drag:{Feature:qV,ProjectionNode:GE,MeasureLayout:UE}};function o1(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&&Je.postRender(()=>l(t,kl(t)))}class AB extends ci{mount(){const{current:t}=this.node;t&&(this.unmount=W3(t,(s,i)=>(o1(this.node,i,"Start"),r=>o1(this.node,r,"End"))))}unmount(){}}class jB extends ci{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=Ol(El(this.node.current,"focus",()=>this.onFocus()),El(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function r1(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&&Je.postRender(()=>l(t,kl(t)))}class NB extends ci{mount(){const{current:t}=this.node;t&&(this.unmount=nz(t,(s,i)=>(r1(this.node,i,"Start"),(r,{success:l})=>r1(this.node,r,l?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const hp=new WeakMap,gm=new WeakMap,RB=e=>{const t=hp.get(e.target);t&&t(e)},MB=e=>{e.forEach(RB)};function _B({root:e,...t}){const s=e||document;gm.has(s)||gm.set(s,{});const i=gm.get(s),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(MB,{root:e,...t})),i[r]}function OB(e,t,s){const i=_B(t);return hp.set(e,s),i.observe(e),()=>{hp.delete(e),i.unobserve(e)}}const DB={some:0,all:1};class PB extends ci{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:DB[r]},d=f=>{const{isIntersecting:m}=f;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(f)};return OB(this.node.current,u,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(kB(t,s))&&this.startObserver()}unmount(){}}function kB({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const LB={inView:{Feature:PB},tap:{Feature:NB},focus:{Feature:jB},hover:{Feature:AB}},zB={layout:{ProjectionNode:GE,MeasureLayout:UE}},VB={...TV,...LB,...EB,...zB},mp=Uz(VB,Jz);function Al(e){const t=eg(()=>$i(e)),{isStatic:s}=x.useContext(md);if(s){const[,i]=x.useState(e);x.useEffect(()=>t.on("change",i),[])}return t}function _g(e,t){const s=Al(t()),i=()=>s.set(t());return i(),gT(()=>{const r=()=>Je.preRender(i,!1,!0),l=e.map(u=>u.on("change",r));return()=>{l.forEach(u=>u()),ws(i)}}),s}function l1(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+=At(u)?u.get():u)}return r}return _g(t.filter(At),i)}function BB(e){fl.current=[],e();const t=_g(fl.current,e);return fl.current=void 0,t}function UB(e,t,s,i){if(typeof e=="function")return BB(e);const r=sz(t,s,i);return Array.isArray(e)?c1(e,r):c1([e],([l])=>r(l))}function c1(e,t){const s=eg(()=>[]);return _g(e,()=>{s.length=0;const i=e.length;for(let r=0;r<i;r++)s[r]=e[r].get();return t(s)})}function HB(e,t={}){const{isStatic:s}=x.useContext(md),i=()=>At(e)?e.get():e;if(s)return UB(i);const r=Al(i());return x.useInsertionEffect(()=>iz(r,e,t),[r,JSON.stringify(t)]),r}const IB={some:0,all:1};function FB(e,t,{root:s,margin:i,amount:r="some"}={}){const l=aE(e),u=new WeakMap,d=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):f.unobserve(y.target)}else typeof g=="function"&&(g(y),u.delete(y.target))})},f=new IntersectionObserver(d,{root:s,rootMargin:i,threshold:typeof r=="number"?r:IB[r]});return l.forEach(m=>f.observe(m)),()=>f.disconnect()}function qB(e,{root:t,margin:s,amount:i,once:r=!1,initial:l=!1}={}){const[u,d]=x.useState(l);return x.useEffect(()=>{if(!e.current||r&&u)return;const f=()=>(d(!0),r?void 0:()=>d(!1)),m={root:t&&t.current||void 0,margin:s,amount:i};return FB(e.current,f,m)},[t,e,s,r,i]),u}function fs({children:e,className:t,gradientSize:s=200,gradientColor:i="#262626",gradientOpacity:r=.8,gradientFrom:l="#9E7AFF",gradientTo:u="#FE8BBB"}){const d=Al(-s),f=Al(-s),m=l1`radial-gradient(${s}px circle at ${d}px ${f}px, ${l}, ${u}, var(--border) 100%)`,y=l1`radial-gradient(${s}px circle at ${d}px ${f}px, ${i}, transparent 100%)`,g=x.useCallback(()=>{d.set(-s),f.set(-s)},[s,d,f]),b=x.useCallback(S=>{const C=S.currentTarget.getBoundingClientRect();d.set(S.clientX-C.left),f.set(S.clientY-C.top)},[d,f]);return x.useEffect(()=>{g()},[g]),x.useEffect(()=>{const S=T=>{T.relatedTarget||g()},C=()=>{document.visibilityState!=="visible"&&g()};return window.addEventListener("pointerout",S),window.addEventListener("blur",g),document.addEventListener("visibilitychange",C),()=>{window.removeEventListener("pointerout",S),window.removeEventListener("blur",g),document.removeEventListener("visibilitychange",C)}},[g]),h.jsxs("div",{className:re("group relative rounded-[inherit]",t),onPointerMove:b,onPointerLeave:g,onPointerEnter:g,children:[h.jsx(mp.div,{className:"bg-border pointer-events-none absolute inset-0 rounded-[inherit] duration-300 group-hover:opacity-100",style:{background:m}}),h.jsx("div",{className:"bg-background absolute inset-px rounded-[inherit]"}),h.jsx(mp.div,{className:"pointer-events-none absolute inset-px rounded-[inherit] opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:y,opacity:r}}),h.jsx("div",{className:"relative",children:e})]})}function $B({value:e,startValue:t=0,direction:s="up",delay:i=0,className:r,decimalPlaces:l=0,...u}){const d=x.useRef(null),f=Al(s==="down"?e:t),m=HB(f,{damping:60,stiffness:100}),y=qB(d,{once:!0,margin:"0px"});return x.useEffect(()=>{if(y){const g=setTimeout(()=>{f.set(s==="down"?t:e)},i*1e3);return()=>clearTimeout(g)}},[f,y,i,e,s,t]),x.useEffect(()=>m.on("change",g=>{d.current&&(d.current.textContent=Intl.NumberFormat("en-US",{minimumFractionDigits:l,maximumFractionDigits:l}).format(Number(g.toFixed(l))))}),[m,l]),h.jsx("span",{ref:d,className:re("inline-block tracking-wider text-black tabular-nums dark:text-white",r),...u,children:t})}function vm(e){return e.reduce((t,s)=>t+(s??0),0)}function u1(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 KB(e){return Math.min(100,Math.max(0,e))}function d1(e){return va(e)||"—"}function YB(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 Js({value:e,decimalPlaces:t=0}){return h.jsx($B,{value:e,decimalPlaces:t})}const ga=[null,null,"hidden lg:table-cell",null,null,"hidden xl:table-cell","hidden xl:table-cell","hidden lg:table-cell"];function GB({rows:e}){const t=ga.length;return h.jsx(h.Fragment,{children:Array.from({length:e}).map((s,i)=>h.jsx(We,{children:Array.from({length:t}).map((r,l)=>h.jsx(ye,{className:re("py-3",ga[l]),children:h.jsx(Pi,{className:l===0?"h-4 w-56":"h-4 w-24"})},l))},i))})}function XB(){const{t:e}=$e(),[t,s]=x.useState("this_month"),[i,r]=x.useState(!1),[l,u]=x.useState(null),[d,f]=x.useState(""),[m,y]=x.useState("requests"),[g,b]=x.useState([]),[S,C]=x.useState(null),T=x.useCallback(async()=>{r(!0),u(null);try{const M=Date.now(),{sinceMs:B}=u1(t,M),[L,O]=await Promise.all([D4({sinceMs:B,includeStats:!0}),$m()]);b(L.items),C(O)}catch(M){const B=M instanceof xs?M.message:String(M);u(B),tn.error(st.t("accountsPage.loadFailedTitle"),{description:B})}finally{r(!1)}},[t]);x.useEffect(()=>{T()},[T]);const A=x.useMemo(()=>{const M=g.length,B=g.filter(I=>I.runtime?.failed).length,L=vm(g.map(I=>I.stats?.request_count)),O=vm(g.map(I=>I.stats?.error_count)),K=vm(g.map(I=>I.stats?.tokens_total)),Z=YB(g),W=L>0?O/L*100:0,se=L>0?K/L:0;return{totalAccounts:M,failedAccounts:B,totalRequests:L,totalErrors:O,totalTokens:K,avgDurationMs:Z,errorRatePct:W,tokensPerRequest:se}},[g]),E=x.useMemo(()=>{const M=d.trim().toLowerCase(),L=[...M?g.filter(O=>O.account_id.toLowerCase().includes(M)):g];return L.sort((O,K)=>m==="account"?O.account_id.localeCompare(K.account_id):m==="last_req"?(K.stats?.last_request_at_ms??0)-(O.stats?.last_request_at_ms??0):m==="errors"?(K.stats?.error_count??0)-(O.stats?.error_count??0):m==="tokens"?(K.stats?.tokens_total??0)-(O.stats?.tokens_total??0):(K.stats?.request_count??0)-(O.stats?.request_count??0)),L},[g,d,m]),j=Date.now(),{fromMs:R,toMs:_}=u1(t,j);return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"text-muted-foreground text-sm",children:e("accountsPage.statsWindowLabel")}),h.jsxs(aa,{value:t,onValueChange:M=>s(M),children:[h.jsx(ia,{size:"sm",className:"w-40",children:h.jsx(sa,{})}),h.jsxs(oa,{children:[h.jsx(Pe,{value:"86400000",children:e("accountsPage.window.last24h")}),h.jsx(Pe,{value:"604800000",children:e("accountsPage.window.last7d")}),h.jsx(Pe,{value:"this_month",children:e("accountsPage.window.thisMonth")})]})]})]}),h.jsx(qi,{onClick:T,disabled:i,size:"sm",children:e(i?"common.refreshing":"common.refresh")}),h.jsx("div",{className:"text-muted-foreground ml-auto text-sm",children:S?.dbPath?e("accountsPage.dbInfo",{version:S.userVersion??"?",path:S.dbPath}):null})]}),l?h.jsx(Sn,{variant:"error",title:e("accountsPage.loadFailedTitle"),description:l,actionLabel:e("common.retry"),onAction:()=>{T()}}):null,h.jsxs(u5,{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:[h.jsx(fs,{className:"rounded-xl",children:h.jsxs("div",{className:"p-4",children:[h.jsx("div",{className:"text-muted-foreground text-xs",children:e("nav.accounts")}),h.jsx("div",{className:"mt-1 text-2xl font-semibold",children:h.jsx(Js,{value:A.totalAccounts})})]})}),h.jsx(fs,{className:"rounded-xl",children:h.jsxs("div",{className:"p-4",children:[h.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.failed")}),h.jsx("div",{className:"mt-1 text-2xl font-semibold",children:h.jsx(Js,{value:A.failedAccounts})})]})}),h.jsx(fs,{className:"rounded-xl",children:h.jsxs("div",{className:"p-4",children:[h.jsx("div",{className:"text-muted-foreground text-xs",children:e("nav.requests")}),h.jsx("div",{className:"mt-1 text-2xl font-semibold",children:h.jsx(Js,{value:A.totalRequests})})]})}),h.jsx(fs,{className:"rounded-xl",children:h.jsxs("div",{className:"p-4",children:[h.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.errors")}),h.jsx("div",{className:"mt-1 text-2xl font-semibold",children:h.jsx(Js,{value:A.totalErrors})})]})}),h.jsx(fs,{className:"rounded-xl",children:h.jsxs("div",{className:"p-4",children:[h.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.errorRate")}),h.jsxs("div",{className:"mt-1 flex items-baseline gap-1 text-2xl font-semibold",children:[h.jsx(Js,{value:A.errorRatePct,decimalPlaces:1}),h.jsx("span",{className:"text-muted-foreground text-sm",children:"%"})]})]})}),h.jsx(fs,{className:"rounded-xl",children:h.jsxs("div",{className:"p-4",children:[h.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.tokensPerRequest")}),h.jsx("div",{className:"mt-1 text-2xl font-semibold",children:h.jsx(Js,{value:A.tokensPerRequest,decimalPlaces:1})})]})}),h.jsx(fs,{className:"rounded-xl",children:h.jsxs("div",{className:"p-4",children:[h.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.tokens")}),h.jsx("div",{className:"mt-1 text-2xl font-semibold",children:h.jsx(Js,{value:A.totalTokens})})]})}),h.jsx(fs,{className:"rounded-xl",children:h.jsxs("div",{className:"p-4",children:[h.jsx("div",{className:"text-muted-foreground text-xs",children:e("common.avgDurationMs")}),h.jsx("div",{className:"mt-1 text-2xl font-semibold",children:h.jsx(Js,{value:A.avgDurationMs})})]})})]}),h.jsxs(nn,{className:"gap-4 py-4",children:[h.jsxs(cn,{className:"px-4",children:[h.jsx(un,{children:e("nav.accounts")}),h.jsx(wn,{className:"hidden sm:block",children:e("accountsPage.tableDescription")})]}),h.jsxs(Cn,{className:"space-y-3 px-4",children:[h.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[h.jsx(mt,{placeholder:e("accountsPage.filterAccountPlaceholder"),value:d,onChange:M=>f(M.target.value),className:"h-8 sm:max-w-xs"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(aa,{value:m,onValueChange:M=>y(M),children:[h.jsx(ia,{size:"sm",className:"w-40",children:h.jsx(sa,{})}),h.jsxs(oa,{align:"end",children:[h.jsx(Pe,{value:"requests",children:e("nav.requests")}),h.jsx(Pe,{value:"errors",children:e("common.errors")}),h.jsx(Pe,{value:"tokens",children:e("common.tokens")}),h.jsx(Pe,{value:"last_req",children:e("common.lastRequest")}),h.jsx(Pe,{value:"account",children:e("common.account")})]})]}),h.jsxs("div",{className:"text-muted-foreground text-sm tabular-nums",children:[E.length,"/",g.length]})]})]}),h.jsxs(dd,{className:"[&_th]:h-9 [&_td]:py-1.5",children:[h.jsx(Jp,{children:h.jsxs(We,{children:[h.jsx(kt,{children:e("common.account")}),h.jsx(kt,{children:e("common.status")}),h.jsx(kt,{className:re(ga[2]),children:e("accountsPage.premiumReq")}),h.jsx(kt,{children:e("nav.requests")}),h.jsx(kt,{children:e("common.errors")}),h.jsx(kt,{className:re(ga[5]),children:e("common.tokens")}),h.jsx(kt,{className:re(ga[6]),children:e("common.avgMs")}),h.jsx(kt,{className:re(ga[7]),children:e("common.lastRequest")})]})}),h.jsx(fd,{children:i&&g.length===0?h.jsx(GB,{rows:6}):E.length===0?h.jsx(We,{children:h.jsx(ye,{colSpan:ga.length,children:h.jsx(Sn,{variant:"info",title:g.length===0?e("accountsPage.empty.noAccountsTitle"):e("accountsPage.empty.noMatchesTitle"),description:g.length===0?e("accountsPage.empty.noAccountsDescription"):e("accountsPage.empty.noMatchesDescription"),actionLabel:d.trim()?e("common.clearFilter"):void 0,onAction:d.trim()?()=>f(""):void 0})})}):E.map(M=>{const B=M.runtime?.failed,L=B?h.jsx(an,{variant:"destructive",children:e("common.statusFailed")}):h.jsx(an,{variant:"secondary",children:e("common.statusOk")}),O=M.runtime?.entitlement,K=M.runtime?.remaining,Z=O!=null&&K!=null?O-K:void 0,W=O!=null&&O>0&&Z!=null?Z/O*100:void 0,se=W!=null&&Number.isFinite(W)?KB(W):void 0,I=M.runtime?.unlimited?h.jsx(an,{variant:"secondary",children:e("common.unlimited")}):h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-xs whitespace-nowrap",children:[h.jsxs("div",{className:"flex items-baseline gap-1",children:[h.jsx("span",{className:"text-muted-foreground",children:e("common.used")}),h.jsx("span",{className:"tabular-nums font-medium",children:d1(Z)})]}),h.jsxs("div",{className:"flex items-baseline gap-1",children:[h.jsx("span",{className:"text-muted-foreground",children:e("common.remaining")}),h.jsx("span",{className:"tabular-nums font-medium",children:d1(K)})]})]}),se!=null?h.jsx(c5,{value:se,className:"h-1.5","aria-label":e("accountsPage.premiumQuotaUsedAria")}):null]}),ne=M.stats?.last_request_at_ms?bl(M.stats.last_request_at_ms):"";return h.jsxs(We,{children:[h.jsx(ye,{className:"font-mono",children:h.jsx(zi,{to:`/requests?account_id=${encodeURIComponent(M.account_id)}&from_ms=${R}&to_ms=${_}`,className:"underline decoration-border hover:decoration-foreground",children:M.account_id})}),h.jsx(ye,{children:h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("div",{children:L}),B&&M.runtime?.failureReason?h.jsx("div",{className:"text-muted-foreground text-xs",children:M.runtime.failureReason}):null]})}),h.jsx(ye,{className:re(ga[2],"whitespace-normal"),children:I}),h.jsx(ye,{children:va(M.stats?.request_count)}),h.jsx(ye,{children:va(M.stats?.error_count)}),h.jsx(ye,{className:re(ga[5]),children:va(M.stats?.tokens_total)}),h.jsx(ye,{className:re(ga[6]),children:M.stats?.avg_duration_ms!=null?va(Math.round(M.stats.avg_duration_ms)):""}),h.jsx(ye,{className:re(ga[7],"font-mono text-xs"),children:ne})]},M.account_id)})})]})]})]})]})}const _i=[null,null,null,null,null,null];function f1(e){return e==null||!Number.isFinite(e)||e<=0?"":e>=1e3?`${Math.floor(e/1e3)}K`:String(Math.floor(e))}function h1(e){return e==null||!Number.isFinite(e)||e<=0?"—":String(Math.floor(e))}function du(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 ym(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 m1(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 p1(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 zo({columnKey:e,label:t,sortKey:s,sortDir:i,onSort:r,className:l}){const u=s===e;let d="none";return u&&(d=i==="asc"?"ascending":"descending"),h.jsx(kt,{"aria-sort":d,className:l,children:h.jsxs("button",{type:"button",onClick:()=>r(e),className:re("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:[h.jsx("span",{children:t}),u?h.jsx("span",{className:"text-muted-foreground",children:i==="asc"?"↑":"↓"}):null]})})}function ZB({rows:e}){const t=_i.length;return h.jsx(h.Fragment,{children:Array.from({length:e}).map((s,i)=>h.jsx(We,{children:Array.from({length:t}).map((r,l)=>h.jsx(ye,{className:re("py-3",_i[l]),children:h.jsx(Pi,{className:l===0?"h-4 w-48":"h-4 w-28"})},l))},i))})}function QB({supports:e}){const{t}=$e(),s=[];return e.tool_calls&&s.push({key:"tool_calls",label:t("modelsPage.features.tools")}),e.vision&&s.push({key:"vision",label:t("modelsPage.features.vision")}),e.structured_outputs&&s.push({key:"structured_outputs",label:t("modelsPage.features.structuredOutputs")}),e.streaming&&s.push({key:"streaming",label:t("modelsPage.features.streaming")}),e.parallel_tool_calls&&s.push({key:"parallel_tool_calls",label:t("modelsPage.features.parallelTools")}),s.length===0?h.jsx("span",{className:"text-muted-foreground",children:"—"}):h.jsx("div",{className:"flex flex-wrap gap-1 whitespace-normal",children:s.map(i=>h.jsx(an,{variant:"outline",className:"text-xs",children:i.label},i.key))})}function WB({endpoints:e}){return!e||e.length===0?h.jsx("span",{className:"text-muted-foreground",children:"—"}):h.jsx("div",{className:"flex flex-wrap gap-1 whitespace-normal",children:e.map(t=>h.jsx(an,{variant:"secondary",className:"font-mono text-xs",children:t},t))})}function JB({limits:e}){const{t}=$e(),s=f1(e.max_prompt_tokens),i=f1(e.max_output_tokens),r=t("modelsPage.contextTooltip",{input:h1(e.max_prompt_tokens),output:h1(e.max_output_tokens)});return h.jsxs("div",{title:r,"aria-label":r,className:"flex items-center gap-3 tabular-nums cursor-help",children:[h.jsx("span",{className:"text-muted-foreground",children:"↓"}),h.jsx("span",{children:s||"—"}),h.jsx("span",{className:"text-muted-foreground",children:"↑"}),h.jsx("span",{children:i||"—"})]})}function e6({billing:e}){const{t}=$e(),s=e?.multiplier;return s==null?h.jsx("span",{className:"text-muted-foreground",children:"—"}):h.jsxs("div",{className:"flex items-center gap-2 tabular-nums",children:[h.jsxs("span",{children:[s,"x"]}),e?.is_premium?h.jsx(an,{variant:"default",className:"text-xs",children:t("modelsPage.badges.premium")}):null]})}function t6(){const{t:e}=$e(),[t,s]=x.useState(!0),[i,r]=x.useState(null),[l,u]=x.useState([]),[d,f]=x.useState({key:null,dir:"asc"}),{key:m,dir:y}=d,g=x.useCallback(C=>{f(T=>T.key===C?{key:T.key,dir:T.dir==="asc"?"desc":"asc"}:{key:C,dir:"asc"})},[]),b=x.useMemo(()=>m?[...l].sort((C,T)=>{let A=0;switch(m){case"name":A=du(C.name,T.name,y);break;case"endpoints":A=du(m1(C.supported_endpoints),m1(T.supported_endpoints),y);break;case"originalId":A=du(C.id,T.id,y);break;case"context":A=ym(C.capabilities.limits.max_prompt_tokens,T.capabilities.limits.max_prompt_tokens,y),A===0&&(A=ym(C.capabilities.limits.max_output_tokens,T.capabilities.limits.max_output_tokens,y));break;case"features":A=du(p1(C.capabilities.supports),p1(T.capabilities.supports),y);break;case"multiplier":A=ym(C.billing?.multiplier,T.billing?.multiplier,y);break;default:A=0}return A!==0?A:C.id.localeCompare(T.id)}):l,[l,y,m]),S=x.useCallback(async()=>{s(!0),r(null);try{const C=await B4();u(C.items)}catch(C){const T=C instanceof xs?C.message:String(C);r(T),tn.error(st.t("modelsPage.toast.loadFailed"),{description:T})}finally{s(!1)}},[]);return x.useEffect(()=>{S()},[S]),h.jsxs("div",{className:"space-y-4",children:[i?h.jsx(Sn,{variant:"error",title:e("modelsPage.loadFailedTitle"),description:i,actionLabel:e("common.retry"),onAction:()=>{S()}}):null,h.jsxs(nn,{children:[h.jsxs(cn,{children:[h.jsx(un,{children:e("modelsPage.title")}),h.jsx(wn,{children:e("modelsPage.description")})]}),h.jsxs(Cn,{className:"space-y-3",children:[h.jsx("div",{className:"text-muted-foreground text-sm",children:e("modelsPage.totalCount",{count:l.length})}),h.jsxs(dd,{children:[h.jsx(Jp,{children:h.jsxs(We,{children:[h.jsx(zo,{columnKey:"name",label:e("modelsPage.columns.name"),sortKey:m,sortDir:y,onSort:g}),h.jsx(zo,{columnKey:"endpoints",label:e("modelsPage.columns.endpoints"),sortKey:m,sortDir:y,onSort:g,className:re(_i[1])}),h.jsx(zo,{columnKey:"originalId",label:e("modelsPage.columns.originalId"),sortKey:m,sortDir:y,onSort:g,className:re(_i[2])}),h.jsx(zo,{columnKey:"context",label:e("modelsPage.columns.context"),sortKey:m,sortDir:y,onSort:g}),h.jsx(zo,{columnKey:"features",label:e("modelsPage.columns.features"),sortKey:m,sortDir:y,onSort:g}),h.jsx(zo,{columnKey:"multiplier",label:e("modelsPage.columns.multiplier"),sortKey:m,sortDir:y,onSort:g})]})}),h.jsxs(fd,{children:[t&&l.length===0&&h.jsx(ZB,{rows:10}),!t&&l.length===0&&h.jsx(We,{children:h.jsx(ye,{colSpan:_i.length,children:h.jsx(Sn,{variant:"info",title:e("modelsPage.empty.title"),description:e("modelsPage.empty.description")})})}),l.length>0&&b.map(C=>h.jsxs(We,{children:[h.jsx(ye,{children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{children:C.name}),C.preview?h.jsx(an,{variant:"outline",className:"text-xs",children:e("modelsPage.badges.preview")}):null]})}),h.jsx(ye,{className:re(_i[1],"max-w-[26rem]"),children:h.jsx(WB,{endpoints:C.supported_endpoints})}),h.jsx(ye,{className:re(_i[2],"max-w-[26rem]"),children:h.jsxs("div",{className:"flex flex-wrap items-center gap-1 whitespace-normal",children:[h.jsx("span",{className:"font-mono text-xs",children:C.id}),C.aliases.map(T=>h.jsx(an,{variant:"outline",className:"font-mono text-xs",children:T},T))]})}),h.jsx(ye,{children:h.jsx(JB,{limits:C.capabilities.limits})}),h.jsx(ye,{children:h.jsx(QB,{supports:C.capabilities.supports})}),h.jsx(ye,{children:h.jsx(e6,{billing:C.billing})})]},C.id))]})]})]})]})]})}function n6(){const{t:e}=$e();return h.jsx(nn,{children:h.jsxs(cn,{children:[h.jsx(un,{children:e("notFound.title")}),h.jsx(wn,{children:e("notFound.description")})]})})}const fu=200;function a6(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function $u(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 d=i.indexOf(r,u);if(d===-1){l.push(e.slice(u));break}d>u&&l.push(e.slice(u,d)),l.push(h.jsx("mark",{className:"bg-accent/50 text-foreground rounded px-0.5",children:e.slice(d,d+r.length)},`${d}-${r}`)),u=d+r.length}return h.jsx(h.Fragment,{children:l})}function s6(e,t,s){if(e==null)return h.jsx("span",{className:"text-muted-foreground",children:"null"});if(typeof e=="string")return h.jsxs("span",{className:"text-foreground",children:['"',$u(e,t),'"']});if(typeof e=="number"){const i=String(e);if(!s||!/_at_ms$/.test(s))return h.jsx("span",{className:"text-foreground",children:i});if(e<9466848e5||e>41024448e5)return h.jsx("span",{className:"text-foreground",children:i});const u=bl(e);return u?h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-foreground",title:u,children:i}),h.jsxs("span",{className:"text-muted-foreground ml-1",children:["(",$u(u,t),")"]})]}):h.jsx("span",{className:"text-foreground",children:i})}return typeof e=="boolean"?h.jsx("span",{className:"text-foreground",children:e?"true":"false"}):h.jsx("span",{className:"text-foreground",children:String(e)})}function xm({depth:e,name:t,valuePreview:s,expanded:i,toggle:r,t:l}){return h.jsxs("div",{className:"flex items-start gap-2",style:{paddingLeft:e*12},children:[r?h.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?h.jsx(Pp,{className:"size-4"}):h.jsx(S_,{className:"size-4"})}):h.jsx("span",{className:"size-4"}),t?h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-muted-foreground",children:t}),h.jsx("span",{className:"text-muted-foreground",children:":"})]}):h.jsx("span",{className:"text-muted-foreground",children:l("jsonViewer.root")}),h.jsx("span",{className:"min-w-0 break-words",children:s})]})}function pp({value:e,name:t,path:s,depth:i,search:r,baseExpandDepth:l,expandedPaths:u,collapsedPaths:d,onToggle:f,t:m}){const y=a6(e),g=Array.isArray(e),b=y||g,S=b&&(d.has(s)?!1:u.has(s)?!0:i<l);if(!b)return h.jsx(xm,{depth:i,name:t?$u(t,r):void 0,valuePreview:s6(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 h.jsxs("div",{className:"space-y-1",children:[h.jsx(xm,{depth:i,name:t?$u(t,r):void 0,valuePreview:h.jsx("span",{className:"text-muted-foreground",children:T}),expanded:S,toggle:()=>f(s,!S),t:m}),S?h.jsxs("div",{className:"space-y-1",children:[g?e.slice(0,fu).map((A,E)=>h.jsx(pp,{value:A,name:`[${E}]`,path:`${s}[${E}]`,depth:i+1,search:r,baseExpandDepth:l,expandedPaths:u,collapsedPaths:d,onToggle:f,t:m},`${s}[${E}]`)):Object.entries(e).slice(0,fu).map(([A,E])=>h.jsx(pp,{value:E,name:A,path:`${s}.${A}`,depth:i+1,search:r,baseExpandDepth:l,expandedPaths:u,collapsedPaths:d,onToggle:f,t:m},`${s}.${A}`)),C>fu?h.jsx(xm,{depth:i+1,valuePreview:h.jsx("span",{className:"text-muted-foreground",children:m("jsonViewer.more",{count:C-fu})}),expanded:!1,t:m}):null]}):null]})}function i6({value:e,search:t,defaultExpandedDepth:s=2,className:i}){const[r,l]=x.useState(s),[u,d]=x.useState(()=>new Set),[f,m]=x.useState(()=>new Set),{t:y}=$e();function g(T,A){if(A){m(E=>{const j=new Set(E);return j.delete(T),j}),d(E=>{const j=new Set(E);return j.add(T),j});return}d(E=>{const j=new Set(E);return j.delete(T),j}),m(E=>{const j=new Set(E);return j.add(T),j})}function b(){l(99),m(new Set),d(new Set)}function S(){l(0),d(new Set),m(new Set)}function C(){return r===0?y("jsonViewer.statusCollapsed"):r>=99?y("jsonViewer.statusExpanded"):y("jsonViewer.statusDepth",{depth:r})}return h.jsxs("div",{className:re("space-y-3",i),children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:b,children:y("jsonViewer.expandAll")}),h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:S,children:y("jsonViewer.collapseAll")}),h.jsx("span",{className:"text-muted-foreground ml-auto text-xs",children:C()})]}),h.jsx("div",{className:"bg-muted/20 overflow-auto rounded-md border p-3 font-mono text-xs",children:h.jsx(pp,{value:e,path:"$",depth:0,search:t,baseExpandDepth:r,expandedPaths:u,collapsedPaths:f,onToggle:g,t:y})})]})}const Og=({className:e,size:t=50,delay:s=0,duration:i=6,colorFrom:r="#ffaa40",colorTo:l="#9c40ff",transition:u,style:d,reverse:f=!1,initialOffset:m=0,borderWidth:y=1})=>{const{effective:g}=Wu();if(g==="off")return null;const b=g==="subtle"?i*2:i;return h.jsx("div",{className:"pointer-events-none absolute inset-0 rounded-[inherit] border-(length:--border-beam-width) border-transparent [mask-image:linear-gradient(transparent,transparent),linear-gradient(#000,#000)] [mask-composite:intersect] [mask-clip:padding-box,border-box]",style:{"--border-beam-width":`${y}px`},children:h.jsx(mp.div,{className:re("absolute aspect-square","bg-gradient-to-l from-[var(--color-from)] via-[var(--color-to)] to-transparent",e),style:{width:t,offsetPath:`rect(0 auto auto 0 round ${t}px)`,"--color-from":r,"--color-to":l,...d},initial:{offsetDistance:`${m}%`},animate:{offsetDistance:f?[`${100-m}%`,`${-m}%`]:[`${m}%`,`${100+m}%`]},transition:{repeat:1/0,ease:"linear",duration:b,delay:-s,...u}})})};function o6({status:e}){return e>=400?h.jsx(an,{variant:"destructive",children:e}):h.jsx(an,{variant:"secondary",children:e})}function r6(){const{t:e}=$e(),{requestId:t=""}=NR(),i=Va().state?.fromSearch,r=i?`/requests?${i}`:"/requests",[l,u]=x.useState(!0),[d,f]=x.useState(null),[m,y]=x.useState("");x.useEffect(()=>{let C=!1;async function T(){u(!0);try{const A=await k4(t);if(C)return;f(A.item)}catch(A){const E=A instanceof xs?A.message:String(A);if(tn.error(st.t("requestDetailPage.loadFailedTitle"),{description:E}),C)return;f(null)}finally{C||u(!1)}}return t&&T(),()=>{C=!0}},[t]);async function g(){if(d)try{const C=JSON.stringify(d,null,2);await navigator.clipboard.writeText(C),tn.success(e("requestDetailPage.toast.copiedJson"))}catch(C){tn.error(e("requestDetailPage.toast.copyFailed"),{description:String(C)})}}function b(){if(d)try{const C=JSON.stringify(d,null,2),T=new Blob([C],{type:"application/json"}),A=URL.createObjectURL(T),E=document.createElement("a");E.href=A,E.download=`${d.request_id}.json`,E.click(),URL.revokeObjectURL(A),tn.success(e("requestDetailPage.toast.downloadedJson"))}catch(C){tn.error(e("requestDetailPage.toast.downloadFailed"),{description:String(C)})}}if(l)return h.jsxs(nn,{children:[h.jsxs(cn,{children:[h.jsx(un,{children:e("requestDetailPage.title")}),h.jsx(wn,{children:h.jsx(Pi,{className:"h-4 w-40"})})]}),h.jsx(Cn,{children:h.jsxs("div",{className:"space-y-2",children:[h.jsx(Pi,{className:"h-4 w-64"}),h.jsx(Pi,{className:"h-4 w-48"}),h.jsx(Pi,{className:"h-24 w-full"})]})})]});if(!d)return h.jsxs(nn,{children:[h.jsxs(cn,{children:[h.jsx(un,{children:e("requestDetailPage.title")}),h.jsx(wn,{children:e("requestDetailPage.notFoundDescription")})]}),h.jsx(Cn,{children:h.jsx(Sn,{variant:"warning",title:e("requestDetailPage.notFoundTitle"),description:`request_id: ${t}`})})]});const S=d.premium_unlimited_after?"∞":d.premium_remaining_after!=null?va(d.premium_remaining_after):"";return h.jsxs("div",{className:"space-y-4",children:[h.jsx("div",{className:"flex items-center gap-2",children:h.jsx(pt,{variant:"ghost",size:"sm",asChild:!0,children:h.jsxs(zi,{to:r,children:[h.jsx(g_,{className:"size-4"}),e("common.back")]})})}),h.jsxs("div",{className:"relative",children:[h.jsx(Og,{className:"opacity-40",borderWidth:1}),h.jsx(nn,{className:"relative",children:h.jsxs(cn,{children:[h.jsxs(un,{className:"flex flex-wrap items-center gap-2",children:[h.jsx("span",{className:"font-mono text-sm",children:d.request_id}),h.jsx(o6,{status:d.http_status}),typeof d.duration_ms=="number"?h.jsxs(an,{variant:"outline",children:[e("requestDetailPage.badges.durMs"),":"," ",va(d.duration_ms)]}):null,typeof d.ttfb_ms=="number"?h.jsxs(an,{variant:"outline",children:[e("requestDetailPage.badges.ttfbMs"),":"," ",va(d.ttfb_ms)]}):null]}),h.jsx(wn,{className:"font-mono text-xs",children:bl(d.started_at_ms)})]})})]}),h.jsxs("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2 xl:grid-cols-[1fr_2fr]",children:[h.jsxs(nn,{children:[h.jsx(cn,{children:h.jsx(un,{children:e("requestDetailPage.summaryTitle")})}),h.jsx(Cn,{children:h.jsx(dd,{children:h.jsxs(fd,{children:[h.jsxs(We,{children:[h.jsx(ye,{className:"w-36 text-muted-foreground",children:e("requestDetailPage.fields.time")}),h.jsx(ye,{className:"font-mono text-xs",children:bl(d.started_at_ms)})]}),h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.path")}),h.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:h.jsx(zi,{to:`/requests?path=${encodeURIComponent(d.path)}`,className:"underline decoration-border hover:decoration-foreground",children:d.path})})]}),h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.endpoint")}),h.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.upstream_endpoint||""})]}),h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.account")}),h.jsxs(ye,{className:"font-mono text-xs whitespace-normal break-words",children:[d.account_id?h.jsx(zi,{to:`/requests?account_id=${encodeURIComponent(d.account_id)}`,className:"underline decoration-border hover:decoration-foreground",children:d.account_id}):"",d.affinity_hit?h.jsx(an,{variant:"outline",className:"ml-2",children:e("requestDetailPage.fields.affinityHit")}):null]})]}),d.affinity_cache_key?h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.affinityCacheKey")}),h.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.affinity_cache_key})]}):null,h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.userId")}),h.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.user_id||""})]}),h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.safetyIdentifier")}),h.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.safety_identifier||""})]}),h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.promptCacheKey")}),h.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.prompt_cache_key||""})]}),h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.initiator")}),h.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.initiator||""})]}),h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.upstreamRequestId")}),h.jsx(ye,{className:"font-mono text-xs whitespace-normal break-words",children:d.upstream_request_id||""})]}),h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.model")}),h.jsx(ye,{className:"font-mono text-xs",children:d.upstream_model||""})]}),h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.client")}),h.jsxs(ye,{className:"font-mono text-xs whitespace-normal break-words",children:[d.client_ip||"",d.user_agent?` (${d.user_agent})`:""]})]}),h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.tokens")}),h.jsxs(ye,{className:"font-mono text-xs whitespace-normal break-words",children:[h.jsxs("span",{children:[e("requestDetailPage.tokens.in"),"=",d.tokens_input??""]})," ",h.jsxs("span",{children:[e("requestDetailPage.tokens.out"),"=",d.tokens_output??""]})," ",h.jsxs("span",{children:[e("requestDetailPage.tokens.total"),"=",d.tokens_total??""]})," ",h.jsxs("span",{children:[e("requestDetailPage.tokens.cached"),"=",d.tokens_cached_input??""]})]})]}),h.jsxs(We,{children:[h.jsx(ye,{className:"text-muted-foreground",children:e("requestDetailPage.fields.quota")}),h.jsxs(ye,{className:"font-mono text-xs whitespace-normal break-words",children:[h.jsxs("span",{children:[e("requestDetailPage.quota.before"),"=",d.premium_remaining_before??""]})," ",h.jsxs("span",{children:[e("requestDetailPage.quota.after"),"=",d.premium_remaining_after??""]})," ",h.jsxs("span",{children:[e("requestDetailPage.quota.diff"),"=",d.premium_remaining_diff??""," ","(",S,")"]})]})]})]})})})]}),h.jsxs(nn,{children:[h.jsxs(cn,{children:[h.jsx(un,{children:e("requestDetailPage.rawTitle")}),h.jsx(wn,{children:e("requestDetailPage.rawDescription")})]}),h.jsxs(Cn,{className:"space-y-3",children:[h.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[h.jsx(mt,{placeholder:e("requestDetailPage.searchPlaceholder"),value:m,onChange:C=>y(C.target.value),className:"h-8 sm:max-w-xs"}),h.jsxs("div",{className:"flex items-center gap-2 sm:ml-auto",children:[h.jsxs(pt,{type:"button",variant:"outline",size:"sm",onClick:b,children:[h.jsx(A_,{className:"size-4"}),e("common.download")]}),h.jsx(qi,{onClick:()=>{g()},size:"sm",children:e("common.copyJson")})]})]}),h.jsx(i6,{value:d,search:m})]})]})]})]})}var bm="rovingFocusGroup.onEntryFocus",l6={bubbles:!1,cancelable:!0},Ll="RovingFocusGroup",[gp,XE,c6]=hC(Ll),[u6,ZE]=Yi(Ll,[c6]),[d6,f6]=u6(Ll),QE=x.forwardRef((e,t)=>h.jsx(gp.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(gp.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(h6,{...e,ref:t})})}));QE.displayName=Ll;var h6=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:s,orientation:i,loop:r=!1,dir:l,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:m,preventScrollOnEntryFocus:y=!1,...g}=e,b=x.useRef(null),S=ot(t,b),C=Fp(l),[T,A]=Yo({prop:u,defaultProp:d??null,onChange:f,caller:Ll}),[E,j]=x.useState(!1),R=ni(m),_=XE(s),M=x.useRef(!1),[B,L]=x.useState(0);return x.useEffect(()=>{const O=b.current;if(O)return O.addEventListener(bm,R),()=>O.removeEventListener(bm,R)},[R]),h.jsx(d6,{scope:s,orientation:i,dir:C,loop:r,currentTabStopId:T,onItemFocus:x.useCallback(O=>A(O),[A]),onItemShiftTab:x.useCallback(()=>j(!0),[]),onFocusableItemAdd:x.useCallback(()=>L(O=>O+1),[]),onFocusableItemRemove:x.useCallback(()=>L(O=>O-1),[]),children:h.jsx(He.div,{tabIndex:E||B===0?-1:0,"data-orientation":i,...g,ref:S,style:{outline:"none",...e.style},onMouseDown:Oe(e.onMouseDown,()=>{M.current=!0}),onFocus:Oe(e.onFocus,O=>{const K=!M.current;if(O.target===O.currentTarget&&K&&!E){const Z=new CustomEvent(bm,l6);if(O.currentTarget.dispatchEvent(Z),!Z.defaultPrevented){const W=_().filter(D=>D.focusable),se=W.find(D=>D.active),I=W.find(D=>D.id===T),le=[se,I,...W].filter(Boolean).map(D=>D.ref.current);eA(le,y)}}M.current=!1}),onBlur:Oe(e.onBlur,()=>j(!1))})})}),WE="RovingFocusGroupItem",JE=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:s,focusable:i=!0,active:r=!1,tabStopId:l,children:u,...d}=e,f=ps(),m=l||f,y=f6(WE,s),g=y.currentTabStopId===m,b=XE(s),{onFocusableItemAdd:S,onFocusableItemRemove:C,currentTabStopId:T}=y;return x.useEffect(()=>{if(i)return S(),()=>C()},[i,S,C]),h.jsx(gp.ItemSlot,{scope:s,id:m,focusable:i,active:r,children:h.jsx(He.span,{tabIndex:g?0:-1,"data-orientation":y.orientation,...d,ref:t,onMouseDown:Oe(e.onMouseDown,A=>{i?y.onItemFocus(m):A.preventDefault()}),onFocus:Oe(e.onFocus,()=>y.onItemFocus(m)),onKeyDown:Oe(e.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){y.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const E=g6(A,y.orientation,y.dir);if(E!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.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(A.currentTarget);R=y.loop?v6(R,_+1):R.slice(_+1)}setTimeout(()=>eA(R))}}),children:typeof u=="function"?u({isCurrentTabStop:g,hasTabStop:T!=null}):u})})});JE.displayName=WE;var m6={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function p6(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function g6(e,t,s){const i=p6(e.key,s);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return m6[i]}function eA(e,t=!1){const s=document.activeElement;for(const i of e)if(i===s||(i.focus({preventScroll:t}),document.activeElement!==s))return}function v6(e,t){return e.map((s,i)=>e[(t+i)%e.length])}var y6=QE,x6=JE,yd="Tabs",[b6]=Yi(yd,[ZE]),tA=ZE(),[S6,Dg]=b6(yd),nA=x.forwardRef((e,t)=>{const{__scopeTabs:s,value:i,onValueChange:r,defaultValue:l,orientation:u="horizontal",dir:d,activationMode:f="automatic",...m}=e,y=Fp(d),[g,b]=Yo({prop:i,onChange:r,defaultProp:l??"",caller:yd});return h.jsx(S6,{scope:s,baseId:ps(),value:g,onValueChange:b,orientation:u,dir:y,activationMode:f,children:h.jsx(He.div,{dir:y,"data-orientation":u,...m,ref:t})})});nA.displayName=yd;var aA="TabsList",sA=x.forwardRef((e,t)=>{const{__scopeTabs:s,loop:i=!0,...r}=e,l=Dg(aA,s),u=tA(s);return h.jsx(y6,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:i,children:h.jsx(He.div,{role:"tablist","aria-orientation":l.orientation,...r,ref:t})})});sA.displayName=aA;var iA="TabsTrigger",oA=x.forwardRef((e,t)=>{const{__scopeTabs:s,value:i,disabled:r=!1,...l}=e,u=Dg(iA,s),d=tA(s),f=cA(u.baseId,i),m=uA(u.baseId,i),y=i===u.value;return h.jsx(x6,{asChild:!0,...d,focusable:!r,active:y,children:h.jsx(He.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":m,"data-state":y?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:f,...l,ref:t,onMouseDown:Oe(e.onMouseDown,g=>{!r&&g.button===0&&g.ctrlKey===!1?u.onValueChange(i):g.preventDefault()}),onKeyDown:Oe(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&u.onValueChange(i)}),onFocus:Oe(e.onFocus,()=>{const g=u.activationMode!=="manual";!y&&!r&&g&&u.onValueChange(i)})})})});oA.displayName=iA;var rA="TabsContent",lA=x.forwardRef((e,t)=>{const{__scopeTabs:s,value:i,forceMount:r,children:l,...u}=e,d=Dg(rA,s),f=cA(d.baseId,i),m=uA(d.baseId,i),y=i===d.value,g=x.useRef(y);return x.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),h.jsx(Gi,{present:r||y,children:({present:b})=>h.jsx(He.div,{"data-state":y?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":f,hidden:!b,id:m,tabIndex:0,...u,ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0},children:b&&l})})});lA.displayName=rA;function cA(e,t){return`${e}-trigger-${t}`}function uA(e,t){return`${e}-content-${t}`}var w6=nA,C6=sA,T6=oA,E6=lA;function A6({className:e,...t}){return h.jsx(w6,{"data-slot":"tabs",className:re("flex flex-col gap-2",e),...t})}function j6({className:e,...t}){return h.jsx(C6,{"data-slot":"tabs-list",className:re("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function g1({className:e,...t}){return h.jsx(T6,{"data-slot":"tabs-trigger",className:re("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 v1({className:e,...t}){return h.jsx(E6,{"data-slot":"tabs-content",className:re("flex-1 outline-none",e),...t})}var N6=Symbol("radix.slottable");function R6(e){const t=({children:s})=>h.jsx(h.Fragment,{children:s});return t.displayName=`${e}.Slottable`,t.__radixId=N6,t}var[xd]=Yi("Tooltip",[rd]),bd=rd(),dA="TooltipProvider",M6=700,vp="tooltip.open",[_6,Pg]=xd(dA),fA=e=>{const{__scopeTooltip:t,delayDuration:s=M6,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:l}=e,u=x.useRef(!0),d=x.useRef(!1),f=x.useRef(0);return x.useEffect(()=>{const m=f.current;return()=>window.clearTimeout(m)},[]),h.jsx(_6,{scope:t,isOpenDelayedRef:u,delayDuration:s,onOpen:x.useCallback(()=>{window.clearTimeout(f.current),u.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>u.current=!0,i)},[i]),isPointerInTransitRef:d,onPointerInTransitChange:x.useCallback(m=>{d.current=m},[]),disableHoverableContent:r,children:l})};fA.displayName=dA;var jl="Tooltip",[O6,zl]=xd(jl),hA=e=>{const{__scopeTooltip:t,children:s,open:i,defaultOpen:r,onOpenChange:l,disableHoverableContent:u,delayDuration:d}=e,f=Pg(jl,e.__scopeTooltip),m=bd(t),[y,g]=x.useState(null),b=ps(),S=x.useRef(0),C=u??f.disableHoverableContent,T=d??f.delayDuration,A=x.useRef(!1),[E,j]=Yo({prop:i,defaultProp:r??!1,onChange:L=>{L?(f.onOpen(),document.dispatchEvent(new CustomEvent(vp))):f.onClose(),l?.(L)},caller:jl}),R=x.useMemo(()=>E?A.current?"delayed-open":"instant-open":"closed",[E]),_=x.useCallback(()=>{window.clearTimeout(S.current),S.current=0,A.current=!1,j(!0)},[j]),M=x.useCallback(()=>{window.clearTimeout(S.current),S.current=0,j(!1)},[j]),B=x.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{A.current=!0,j(!0),S.current=0},T)},[T,j]);return x.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),h.jsx(kC,{...m,children:h.jsx(O6,{scope:t,contentId:b,open:E,stateAttribute:R,trigger:y,onTriggerChange:g,onTriggerEnter:x.useCallback(()=>{f.isOpenDelayedRef.current?B():_()},[f.isOpenDelayedRef,B,_]),onTriggerLeave:x.useCallback(()=>{C?M():(window.clearTimeout(S.current),S.current=0)},[M,C]),onOpen:_,onClose:M,disableHoverableContent:C,children:s})})};hA.displayName=jl;var yp="TooltipTrigger",mA=x.forwardRef((e,t)=>{const{__scopeTooltip:s,...i}=e,r=zl(yp,s),l=Pg(yp,s),u=bd(s),d=x.useRef(null),f=ot(t,d,r.onTriggerChange),m=x.useRef(!1),y=x.useRef(!1),g=x.useCallback(()=>m.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),h.jsx(LC,{asChild:!0,...u,children:h.jsx(He.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:f,onPointerMove:Oe(e.onPointerMove,b=>{b.pointerType!=="touch"&&!y.current&&!l.isPointerInTransitRef.current&&(r.onTriggerEnter(),y.current=!0)}),onPointerLeave:Oe(e.onPointerLeave,()=>{r.onTriggerLeave(),y.current=!1}),onPointerDown:Oe(e.onPointerDown,()=>{r.open&&r.onClose(),m.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:Oe(e.onFocus,()=>{m.current||r.onOpen()}),onBlur:Oe(e.onBlur,r.onClose),onClick:Oe(e.onClick,r.onClose)})})});mA.displayName=yp;var kg="TooltipPortal",[D6,P6]=xd(kg,{forceMount:void 0}),pA=e=>{const{__scopeTooltip:t,forceMount:s,children:i,container:r}=e,l=zl(kg,t);return h.jsx(D6,{scope:t,forceMount:s,children:h.jsx(Gi,{present:s||l.open,children:h.jsx(ed,{asChild:!0,container:r,children:i})})})};pA.displayName=kg;var Zo="TooltipContent",gA=x.forwardRef((e,t)=>{const s=P6(Zo,e.__scopeTooltip),{forceMount:i=s.forceMount,side:r="top",...l}=e,u=zl(Zo,e.__scopeTooltip);return h.jsx(Gi,{present:i||u.open,children:u.disableHoverableContent?h.jsx(vA,{side:r,...l,ref:t}):h.jsx(k6,{side:r,...l,ref:t})})}),k6=x.forwardRef((e,t)=>{const s=zl(Zo,e.__scopeTooltip),i=Pg(Zo,e.__scopeTooltip),r=x.useRef(null),l=ot(t,r),[u,d]=x.useState(null),{trigger:f,onClose:m}=s,y=r.current,{onPointerInTransitChange:g}=i,b=x.useCallback(()=>{d(null),g(!1)},[g]),S=x.useCallback((C,T)=>{const A=C.currentTarget,E={x:C.clientX,y:C.clientY},j=U6(E,A.getBoundingClientRect()),R=H6(E,j),_=I6(T.getBoundingClientRect()),M=q6([...R,..._]);d(M),g(!0)},[g]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(f&&y){const C=A=>S(A,y),T=A=>S(A,f);return f.addEventListener("pointerleave",C),y.addEventListener("pointerleave",T),()=>{f.removeEventListener("pointerleave",C),y.removeEventListener("pointerleave",T)}}},[f,y,S,b]),x.useEffect(()=>{if(u){const C=T=>{const A=T.target,E={x:T.clientX,y:T.clientY},j=f?.contains(A)||y?.contains(A),R=!F6(E,u);j?b():R&&(b(),m())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[f,y,u,m,b]),h.jsx(vA,{...e,ref:l})}),[L6,z6]=xd(jl,{isInside:!1}),V6=R6("TooltipContent"),vA=x.forwardRef((e,t)=>{const{__scopeTooltip:s,children:i,"aria-label":r,onEscapeKeyDown:l,onPointerDownOutside:u,...d}=e,f=zl(Zo,s),m=bd(s),{onClose:y}=f;return x.useEffect(()=>(document.addEventListener(vp,y),()=>document.removeEventListener(vp,y)),[y]),x.useEffect(()=>{if(f.trigger){const g=b=>{b.target?.contains(f.trigger)&&y()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[f.trigger,y]),h.jsx(Ju,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g=>g.preventDefault(),onDismiss:y,children:h.jsxs(zC,{"data-state":f.stateAttribute,...m,...d,ref:t,style:{...d.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:[h.jsx(V6,{children:i}),h.jsx(L6,{scope:s,isInside:!0,children:h.jsx(vL,{id:f.contentId,role:"tooltip",children:r||i})})]})})});gA.displayName=Zo;var yA="TooltipArrow",B6=x.forwardRef((e,t)=>{const{__scopeTooltip:s,...i}=e,r=bd(s);return z6(yA,s).isInside?null:h.jsx(VC,{...r,...i,ref:t})});B6.displayName=yA;function U6(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 H6(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 I6(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 F6(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 d=t[l],f=t[u],m=d.x,y=d.y,g=f.x,b=f.y;y>i!=b>i&&s<(g-m)*(i-y)/(b-y)+m&&(r=!r)}return r}function q6(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),$6(t)}function $6(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 K6=fA,Y6=hA,G6=mA,X6=pA,xA=gA;const Z6=K6,Q6=Y6,W6=G6,bA=x.forwardRef(({className:e,sideOffset:t=4,...s},i)=>h.jsx(X6,{children:h.jsx(xA,{ref:i,sideOffset:t,className:re("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})}));bA.displayName=xA.displayName;function Sm(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 J6(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 y1(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 eU(e,t){const s=y1(e),i=y1(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 x1(e){if(!e)return"";const t=Date.parse(e);return Number.isFinite(t)?String(t):""}function b1(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()),d=i(s.getHours()),f=i(s.getMinutes());return`${r}-${l}-${u}T${d}:${f}`}function tU(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 Kt=[null,null,"hidden md:table-cell","hidden md:table-cell","hidden lg:table-cell","hidden xl:table-cell","hidden xl:table-cell","hidden 2xl:table-cell","hidden lg:table-cell",null];function nU({rows:e}){const t=Kt.length;return h.jsx(h.Fragment,{children:Array.from({length:e}).map((s,i)=>h.jsx(We,{children:Array.from({length:t}).map((r,l)=>h.jsx(ye,{className:re("py-3",Kt[l]),children:h.jsx(Pi,{className:l===1?"h-4 w-56":"h-4 w-24"})},l))},i))})}function aU(){const{t:e}=$e(),[t,s]=bM(),[i,r]=x.useState(()=>Sm(t)),[l,u]=x.useState([]),[d,f]=x.useState(null),[m,y]=x.useState(!1),[g,b]=x.useState(!1),[S,C]=x.useState(null),T=x.useMemo(()=>Sm(t),[t]),[A,E]=x.useState(()=>{const I=Sm(t);return I.from_ms||I.to_ms?"custom":"__any__"});x.useEffect(()=>{r(T);const I=!!(T.from_ms||T.to_ms);E(ne=>I?ne==="__any__"?"custom":ne:"__any__")},[T]);const j=x.useMemo(()=>{const I=eU(i.from_ms,i.to_ms);return I?e(I):null},[i.from_ms,i.to_ms,e]),R=x.useCallback(async({reset:I,cursor:ne})=>{b(!0),C(null);try{const le=await P4({...T,limit:50,cursor_id:I?null:ne});u(D=>I?le.items:D.concat(le.items)),f(le.next_cursor_id??null),y(!!le.has_more)}catch(le){const D=le instanceof xs?le.message:String(le);C(D),tn.error(st.t("requestsPage.loadFailedTitle"),{description:D}),I&&u([]),y(!1),f(null)}finally{b(!1)}},[T]);x.useEffect(()=>{R({reset:!0,cursor:null})},[R]);function _(){j||s(J6(i))}function M(){s(new URLSearchParams)}function B(I){if(E(I),I==="__any__"){r(D=>({...D,from_ms:"",to_ms:""}));return}if(I==="custom")return;const{from_ms:ne,to_ms:le}=tU(I);r(D=>({...D,from_ms:ne,to_ms:le}))}const L=x.useMemo(()=>A==="custom"?b1(i.from_ms):"",[i.from_ms,A]),O=x.useMemo(()=>A==="custom"?b1(i.to_ms):"",[i.to_ms,A]),K=!g&&!j,Z=Kt.length,W=t.toString().length>0;let se=e("common.noMore");return m&&(se=e(g?"common.loading":"common.loadMore")),h.jsxs("div",{className:"space-y-4",children:[h.jsxs(nn,{className:"gap-4 py-4",children:[h.jsxs(cn,{className:"px-4",children:[h.jsx(un,{children:e("nav.requests")}),h.jsx(wn,{className:"hidden sm:block",children:e("requestsPage.description")}),h.jsxs(r5,{className:"flex items-center gap-2",children:[h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:M,disabled:!W||g,children:e("common.clear")}),h.jsx(qi,{onClick:_,disabled:!K,size:"sm",children:e("common.apply")})]})]}),h.jsxs(Cn,{className:"space-y-3 px-4",children:[h.jsxs(A6,{defaultValue:"quick",className:"gap-1.5",children:[h.jsxs(j6,{className:"h-8 p-[2px]",children:[h.jsx(g1,{value:"quick",children:e("requestsPage.tabs.quick")}),h.jsx(g1,{value:"advanced",children:e("requestsPage.tabs.advanced")})]}),h.jsx(v1,{value:"quick",children:h.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:[h.jsxs("div",{className:"grid gap-1.5",children:[h.jsx(ft,{htmlFor:"account_id",className:"text-muted-foreground lg:text-xs",children:e("common.account")}),h.jsx(mt,{id:"account_id",className:"h-8",placeholder:"octocat",value:i.account_id,onChange:I=>r(ne=>({...ne,account_id:I.target.value}))})]}),h.jsxs("div",{className:"grid gap-1.5",children:[h.jsx(ft,{className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.timeRange")}),h.jsxs(aa,{value:A,onValueChange:I=>B(I),children:[h.jsx(ia,{size:"sm",className:"w-full",children:h.jsx(sa,{})}),h.jsxs(oa,{children:[h.jsx(Pe,{value:"__any__",children:e("common.any")}),h.jsx(Pe,{value:"15m",children:e("requestsPage.timeRange.last15m")}),h.jsx(Pe,{value:"1h",children:e("requestsPage.timeRange.last1h")}),h.jsx(Pe,{value:"6h",children:e("requestsPage.timeRange.last6h")}),h.jsx(Pe,{value:"24h",children:e("requestsPage.timeRange.last24h")}),h.jsx(Pe,{value:"7d",children:e("requestsPage.timeRange.last7d")}),h.jsx(Pe,{value:"custom",children:e("requestsPage.timeRange.custom")})]})]})]}),h.jsxs("div",{className:"grid gap-1.5",children:[h.jsx(ft,{htmlFor:"status",className:"text-muted-foreground lg:text-xs",children:e("common.status")}),h.jsx(mt,{id:"status",className:"h-8",placeholder:"200",value:i.status,onChange:I=>r(ne=>({...ne,status:I.target.value}))})]}),h.jsxs("div",{className:"grid gap-1.5",children:[h.jsx(ft,{className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.hasError")}),h.jsxs(aa,{value:i.has_error||"__any__",onValueChange:I=>r(ne=>({...ne,has_error:I==="__any__"?"":I})),children:[h.jsx(ia,{size:"sm",className:"w-full",children:h.jsx(sa,{})}),h.jsxs(oa,{children:[h.jsx(Pe,{value:"__any__",children:e("common.any")}),h.jsx(Pe,{value:"1",children:e("common.yes")}),h.jsx(Pe,{value:"0",children:e("common.no")})]})]})]}),A==="custom"?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"grid gap-1.5",children:[h.jsx(ft,{htmlFor:"from_dt",className:"text-muted-foreground lg:text-xs",children:e("common.from")}),h.jsx(mt,{id:"from_dt",className:"h-8",type:"datetime-local",value:L,onChange:I=>{E("custom"),r(ne=>({...ne,from_ms:x1(I.target.value)}))}})]}),h.jsxs("div",{className:"grid gap-1.5",children:[h.jsx(ft,{htmlFor:"to_dt",className:"text-muted-foreground lg:text-xs",children:e("common.to")}),h.jsx(mt,{id:"to_dt",className:"h-8",type:"datetime-local",value:O,onChange:I=>{E("custom"),r(ne=>({...ne,to_ms:x1(I.target.value)}))}})]})]}):null]})}),h.jsx(v1,{value:"advanced",children:h.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:[h.jsxs("div",{className:"grid gap-1.5",children:[h.jsx(ft,{htmlFor:"upstream_model",className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.upstreamModel")}),h.jsx(mt,{id:"upstream_model",className:"h-8",placeholder:"gpt-5",value:i.upstream_model,onChange:I=>r(ne=>({...ne,upstream_model:I.target.value}))})]}),h.jsxs("div",{className:"grid gap-1.5",children:[h.jsx(ft,{htmlFor:"client_model",className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.clientModel")}),h.jsx(mt,{id:"client_model",className:"h-8",placeholder:"claude-sonnet-4",value:i.client_model,onChange:I=>r(ne=>({...ne,client_model:I.target.value}))})]}),h.jsxs("div",{className:"grid gap-1.5",children:[h.jsx(ft,{htmlFor:"upstream_endpoint",className:"text-muted-foreground lg:text-xs",children:e("common.endpoint")}),h.jsx(mt,{id:"upstream_endpoint",className:"h-8",placeholder:"/responses",value:i.upstream_endpoint,onChange:I=>r(ne=>({...ne,upstream_endpoint:I.target.value}))})]}),h.jsxs("div",{className:"grid gap-1.5",children:[h.jsx(ft,{htmlFor:"path",className:"text-muted-foreground lg:text-xs",children:e("common.path")}),h.jsx(mt,{id:"path",className:"h-8",placeholder:"/v1/messages",value:i.path,onChange:I=>r(ne=>({...ne,path:I.target.value}))})]})]})})]}),j?h.jsx(Sn,{variant:"warning",title:e("requestsPage.validation.title"),description:j}):null]})]}),h.jsxs("div",{className:"relative",children:[h.jsx(Og,{className:"opacity-30",borderWidth:1}),h.jsx(nn,{className:"relative gap-4 py-4",children:h.jsxs(Cn,{className:"space-y-4 px-4",children:[S&&l.length>0?h.jsx(Sn,{variant:"error",title:e("requestsPage.loadFailedTitle"),description:S,actionLabel:e("common.retry"),onAction:()=>{R({reset:!0,cursor:null})}}):null,h.jsxs(dd,{className:"[&_th]:h-9 [&_td]:py-1.5",children:[h.jsx(Jp,{children:h.jsxs(We,{children:[h.jsx(kt,{children:e("common.time")}),h.jsx(kt,{children:e("common.path")}),h.jsx(kt,{className:re(Kt[2]),children:e("common.endpoint")}),h.jsx(kt,{className:re(Kt[3]),children:e("common.account")}),h.jsx(kt,{className:re(Kt[4]),children:e("common.model")}),h.jsx(kt,{className:re(Kt[5]),children:e("common.tokens")}),h.jsx(kt,{className:re(Kt[6]),children:e("common.cost")}),h.jsx(kt,{className:re(Kt[7]),children:e("common.quota")}),h.jsx(kt,{className:re(Kt[8]),children:e("common.durationAbbrev")}),h.jsx(kt,{children:e("common.status")})]})}),h.jsx(fd,{children:S&&!g&&l.length===0?h.jsx(We,{children:h.jsx(ye,{colSpan:Z,children:h.jsx(Sn,{variant:"error",title:e("requestsPage.loadFailedTitle"),description:S,actionLabel:e("common.retry"),onAction:()=>{R({reset:!0,cursor:null})}})})}):g&&l.length===0?h.jsx(nU,{rows:6}):l.length===0?h.jsx(We,{children:h.jsx(ye,{colSpan:Z,children:h.jsx(Sn,{variant:"info",title:e("requestsPage.empty.noRequestsTitle"),description:e(W?"requestsPage.empty.noResultsForFilters":"requestsPage.empty.noRequestsFound"),actionLabel:W?e("common.clearFilters"):void 0,onAction:W?M:void 0})})}):l.map(I=>{const ne=I.premium_unlimited_after?"∞":I.premium_remaining_after!=null?va(I.premium_remaining_after):"",le=I.http_status>=400?h.jsx(an,{variant:"destructive",children:I.http_status}):h.jsx(an,{variant:"secondary",children:I.http_status});return h.jsxs(We,{children:[h.jsx(ye,{className:"font-mono text-xs",children:bl(I.started_at_ms)}),h.jsx(ye,{className:"font-mono whitespace-normal break-words",children:h.jsx(zi,{to:`/request/${encodeURIComponent(I.request_id)}`,state:{fromSearch:t.toString()},className:"underline decoration-border hover:decoration-foreground",children:I.path})}),h.jsx(ye,{className:re(Kt[2],"font-mono text-xs whitespace-normal break-words"),children:I.upstream_endpoint||""}),h.jsxs(ye,{className:re(Kt[3],"font-mono text-xs whitespace-normal break-words"),children:[I.account_id||"",I.affinity_hit?h.jsxs(Q6,{children:[h.jsx(W6,{asChild:!0,children:h.jsx("span",{className:"ml-1 inline-block cursor-default text-muted-foreground",children:"📌"})}),h.jsxs(bA,{children:[h.jsx("p",{children:e("requestsPage.affinityHit")}),I.affinity_cache_key&&h.jsx("p",{className:"font-mono text-xs opacity-80",children:I.affinity_cache_key})]})]}):null]}),h.jsx(ye,{className:re(Kt[4],"font-mono text-xs"),children:I.upstream_model||""}),h.jsx(ye,{className:re(Kt[5],"font-mono text-xs"),children:I.tokens_total!=null?va(I.tokens_total):""}),h.jsx(ye,{className:re(Kt[6],"font-mono text-xs"),children:I.cost_units??""}),h.jsx(ye,{className:re(Kt[7],"font-mono text-xs"),children:ne}),h.jsx(ye,{className:re(Kt[8],"font-mono text-xs"),children:I.duration_ms!=null?va(I.duration_ms):""}),h.jsx(ye,{children:le})]},I.request_id)})})]}),h.jsx("div",{className:"flex items-center justify-end gap-2",children:h.jsx(qi,{onClick:()=>{R({reset:!1,cursor:d})},disabled:g||!m,size:"sm",children:se})})]})})]})]})}function sU({saving:e,canSave:t,onSave:s,className:i}){const{t:r}=$e();return h.jsx("div",{className:re("fixed bottom-6 right-6 z-50","shadow-lg rounded-full",i),children:h.jsx(qi,{type:"button",size:"lg",onClick:s,disabled:!t,className:"shadow-2xl",children:r(e?"settingsPage.saveButton.saving":"settingsPage.saveButton.saveChanges")})})}function iU({sections:e,activeSection:t,onSectionClick:s,className:i}){const{t:r}=$e();return h.jsxs("nav",{className:re("sticky top-6 space-y-1 rounded-lg border bg-card p-2",i),"aria-label":r("settingsPage.navigation.ariaLabel"),children:[h.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 h.jsx("button",{type:"button",onClick:()=>s(l.id),className:re("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"),"aria-current":u?"page":void 0,"aria-controls":l.id,children:u?h.jsx(_m,{speed:1.5,colorFrom:"#9E7AFF",colorTo:"#FE8BBB",className:"font-medium",children:l.label}):h.jsx("span",{className:"text-muted-foreground",children:l.label})},l.id)})]})}const Vo=x.forwardRef(({id:e,isActive:t,children:s,className:i},r)=>h.jsx("div",{ref:r,id:e,"data-section-id":e,className:re("relative scroll-mt-6",i),children:h.jsxs(fs,{className:"rounded-xl overflow-hidden",gradientSize:200,gradientOpacity:.6,children:[t&&h.jsx(Og,{size:50,duration:6,colorFrom:"#9E7AFF",colorTo:"#FE8BBB",borderWidth:2,className:"opacity-70"}),h.jsx("div",{className:"relative",children:s})]})}));Vo.displayName="SettingsSectionCard";function oU({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),d=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)}},[]),f=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:d,scrollToSection:f}}function rU({className:e,checked:t,defaultChecked:s,onCheckedChange:i,disabled:r,onClick:l,type:u="button",...d},f){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 h.jsx("button",{ref:f,type:u,role:"switch","aria-checked":!!b,"data-state":b?"checked":"unchecked","data-disabled":r?"true":"false",className:re("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,...d,children:h.jsx("span",{"data-state":b?"checked":"unchecked",className:re("pointer-events-none inline-block size-4 rounded-full bg-background shadow-sm transition-transform",b?"translate-x-5":"translate-x-1")})})}const zn=x.forwardRef(rU);zn.displayName="Switch";function Qo({className:e,...t}){return h.jsx("textarea",{"data-slot":"textarea",className:re("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 lU=["general","reasoning","aliases","prompts","advanced"],xp=["none","minimal","low","medium","high","xhigh"];function Lg({next:e,record:t,setJson:s,setError:i,setMode:r}){e&&s(JSON.stringify(t??{},null,2)),i(null),r(e?"json":"form")}function zg({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 Ku(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ba(){return typeof globalThis.crypto?.randomUUID=="function"?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function cU(e){return Array.isArray(e)?[...new Set(e.filter(t=>typeof t=="string").map(t=>t.trim()).filter(t=>t.length>0))]:[]}function S1(e){const t=cU(e.auth?.apiKeys);if(t.length>0)return t;const s=e.apiKey?.trim();return s?[s]:[]}function uU(e){return SA(e)}function SA(e){return[...new Set(e.split(/\r?\n|,/).map(t=>t.trim()).filter(t=>t.length>0))]}function w1(e){return e?Object.entries(e).map(([t,s])=>({id:ba(),model:t,prompt:s})):[]}function C1(e){return e?Object.entries(e).map(([t,s])=>({id:ba(),model:t,effort:s})):[]}function bp(e){return e?Object.entries(e).map(([t,s])=>typeof s=="string"?{id:ba(),alias:t,target:s,allowOriginal:void 0}:{id:ba(),alias:t,target:s.target,allowOriginal:s.allowOriginal}):[]}function T1(e){const t={};for(const s of e){const i=s.model.trim();i&&(t[i]=s.prompt)}return t}function E1(e){const t={};for(const s of e){const i=s.model.trim();i&&(t[i]=s.effort)}return t}const wA=new Set(["__proto__","constructor","prototype"]);function Eu(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();wA.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 CA=new Set(["__proto__","constructor","prototype"]);function dU(e){return e?Object.entries(e).map(([t,s])=>({id:ba(),name:t,enabled:s.enabled??!0,baseUrl:s.baseUrl??"",apiKey:s.apiKey??"",models:Object.entries(s.models??{}).map(([i,r])=>({id:ba(),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 fU(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 hU(e,t,s){const i=e.model.trim(),r=e.temperature.trim(),l=e.topP.trim(),u=e.topK.trim(),d=!!(r||l||u);if(!i)return d?{error:`Provider '${t}': model id is required when setting overrides.`}:{record:null};const f=i.toLowerCase();if(CA.has(f))return{error:`Provider '${t}' model '${i}' is not allowed.`};if(s.has(f))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(f),{record:{modelId:i,config:m}})}function mU(e,t){const s=Object.create(null),i=new Set;for(const r of e){const l=hU(r,t,i);if("error"in l)return l;l.record&&(s[l.record.modelId]=l.record.config)}return{record:s}}function pU(e){const t=Object.create(null),s=new Set;for(const i of e){const r=i.name.trim();if(!r){if(fU(i))return{error:"Provider name is required."};continue}const l=r.toLowerCase();if(CA.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(),d=i.apiKey.trim(),f={type:"anthropic",enabled:i.enabled,baseUrl:u||void 0,apiKey:d||void 0},m=mU(i.models,r);if("error"in m)return m;Object.keys(m.record).length>0&&(f.models=m.record),t[r]=f}return{record:t}}function gU(e){const[t,s]=x.useState([]),[i,r]=x.useState(null),l=x.useCallback(S=>{s(dU(S)),r(null)},[]),u=x.useCallback(S=>{s(S);const C=pU(S);if("error"in C){r(C.error);return}r(null),e(C.record)},[e]),d=x.useCallback(()=>{u(t.concat({id:ba(),name:"",enabled:!0,baseUrl:"",apiKey:"",models:[]}))},[t,u]),f=x.useCallback(S=>{u(t.filter(C=>C.id!==S))},[t,u]),m=x.useCallback((S,C)=>{const T=t.map(A=>A.id===S?{...A,...C}:A);u(T)},[t,u]),y=x.useCallback(S=>{const C=t.map(T=>T.id!==S?T:{...T,models:T.models.concat({id:ba(),model:"",temperature:"",topP:"",topK:""})});u(C)},[t,u]),g=x.useCallback((S,C)=>{const T=t.map(A=>A.id!==S?A:{...A,models:A.models.filter(E=>E.id!==C)});u(T)},[t,u]),b=x.useCallback((S,C,T)=>{const A=t.map(E=>E.id!==S?E:{...E,models:E.models.map(j=>j.id===C?{...j,...T}:j)});u(A)},[t,u]);return{items:t,issue:i,onAddProvider:d,onRemoveProvider:f,onUpdateProvider:m,onAddModel:y,onRemoveModel:g,onUpdateModel:b,setFromRecord:l}}function vU(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!Ku(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 yU(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!Ku(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(!xp.includes(r))return{error:`modelReasoningEfforts.${i} must be one of ${xp.join(", ")}.`};s[i]=r}return{record:s}}catch{return{error:"modelReasoningEfforts JSON is not valid."}}}function xU(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!Ku(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 d=u.toLowerCase();if(wA.has(d))return{error:`modelAliases.${r} is not allowed.`};let f,m;if(typeof l=="string")f=l.trim();else if(Ku(l)){const y=l.target;if(typeof y!="string")return{error:`modelAliases.${r}.target must be a string.`};if(f=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(!f)return{error:`modelAliases.${r} must be a non-empty string.`};if(d===f.toLowerCase())return{error:`modelAliases.${r} cannot map to itself.`};if(i.has(d))return{error:`modelAliases.${r} conflicts with another alias.`};i.add(d),s[u]=m===void 0?{target:f}:{target:f,allowOriginal:m}}return{record:s}}catch{return{error:"modelAliases JSON is not valid."}}}function bU(e){const[t,s]=x.useState("form"),[i,r]=x.useState([]),[l,u]=x.useState(""),[d,f]=x.useState(null),m=x.useMemo(()=>d?`extraPrompts: ${d}`:null,[d]),y=x.useCallback(E=>{r(w1(E)),u(JSON.stringify(E??{},null,2)),f(null)},[]),g=x.useCallback(E=>{r(E),e(T1(E))},[e]),b=x.useCallback(E=>{zg({value:E,parse:vU,setJson:u,setError:f,onRecord:j=>g(w1(j))})},[g]),S=x.useCallback(E=>{Lg({next:E,record:T1(i),setJson:u,setError:f,setMode:s})},[i]),C=x.useCallback(()=>{g(i.concat({id:ba(),model:"",prompt:""}))},[i,g]),T=x.useCallback(E=>{g(i.filter(j=>j.id!==E))},[i,g]),A=x.useCallback((E,j)=>{const R=i.map(_=>_.id===E?{..._,...j}:_);g(R)},[i,g]);return{mode:t,items:i,json:l,jsonIssue:m,onToggleMode:S,onJsonChange:b,onAddItem:C,onRemoveItem:T,onUpdateItem:A,setFromRecord:y}}function SU(e){const[t,s]=x.useState("form"),[i,r]=x.useState([]),[l,u]=x.useState(""),[d,f]=x.useState(null),m=x.useMemo(()=>d?`modelReasoningEfforts: ${d}`:null,[d]),y=x.useCallback(E=>{r(C1(E)),u(JSON.stringify(E??{},null,2)),f(null)},[]),g=x.useCallback(E=>{r(E),e(E1(E))},[e]),b=x.useCallback(E=>{zg({value:E,parse:yU,setJson:u,setError:f,onRecord:j=>g(C1(j))})},[g]),S=x.useCallback(E=>{Lg({next:E,record:E1(i),setJson:u,setError:f,setMode:s})},[i]),C=x.useCallback(()=>{g(i.concat({id:ba(),model:"",effort:"high"}))},[i,g]),T=x.useCallback(E=>{g(i.filter(j=>j.id!==E))},[i,g]),A=x.useCallback((E,j)=>{const R=i.map(_=>_.id===E?{..._,...j}:_);g(R)},[i,g]);return{mode:t,items:i,json:l,jsonIssue:m,onToggleMode:S,onJsonChange:b,onAddItem:C,onRemoveItem:T,onUpdateItem:A,setFromRecord:y}}function wU(e){const[t,s]=x.useState("form"),[i,r]=x.useState([]),[l,u]=x.useState(""),[d,f]=x.useState(null),m=x.useMemo(()=>d?`modelAliases: ${d}`:null,[d]),y=x.useCallback(E=>{const j=bp(E),R=Eu(j);r(j),u(JSON.stringify(R,null,2)),f(null)},[]),g=x.useCallback(E=>{r(E),e(Eu(E))},[e]),b=x.useCallback(E=>{zg({value:E,parse:xU,setJson:u,setError:f,onRecord:j=>g(bp(j))})},[g]),S=x.useCallback(E=>{Lg({next:E,record:Eu(i),setJson:u,setError:f,setMode:s})},[i]),C=x.useCallback(()=>{g(i.concat({id:ba(),alias:"",target:"",allowOriginal:void 0}))},[i,g]),T=x.useCallback(E=>{g(i.filter(j=>j.id!==E))},[i,g]),A=x.useCallback((E,j)=>{const R=i.map(_=>_.id===E?{..._,...j}:_);g(R)},[i,g]);return{mode:t,items:i,json:l,jsonIssue:m,onToggleMode:S,onJsonChange:b,onAddItem:C,onRemoveItem:T,onUpdateItem:A,setFromRecord:y}}function CU({hasModels:e,smallModelLabel:t,smallModelValue:s,smallModelInputValue:i,models:r,authApiKeysValue:l,anthropicApiKeyValue:u,legacyAuthNote:d,anthropicApiKeyEnvNote:f,onSmallModelSelect:m,onSmallModelInput:y,onAuthApiKeysChange:g,onAnthropicApiKeyChange:b}){const{t:S}=$e(),[C,T]=x.useState(!1),A=e&&s!=="__default__"&&!r.includes(s);return h.jsxs(nn,{className:"gap-4 py-4",children:[h.jsxs(cn,{className:"px-4",children:[h.jsx(un,{children:S("settingsPage.general.title")}),h.jsx(wn,{className:"hidden sm:block",children:S("settingsPage.general.description")})]}),h.jsxs(Cn,{className:"space-y-4 px-4",children:[h.jsxs("div",{className:"grid gap-2",children:[h.jsx(ft,{className:"text-muted-foreground text-xs",children:t}),e?h.jsxs(aa,{value:s,onValueChange:m,children:[h.jsx(ia,{className:"w-full",children:h.jsx(sa,{placeholder:S("settingsPage.general.smallModelPlaceholder")})}),h.jsxs(oa,{children:[h.jsx(Pe,{value:"__default__",children:S("settingsPage.common.defaultOption")}),A?h.jsx(Pe,{value:s,children:S("settingsPage.common.customModel",{value:s})}):null,r.map(E=>h.jsx(Pe,{value:E,children:E},E))]})]}):h.jsx(mt,{placeholder:S("settingsPage.general.smallModelInputPlaceholder"),value:i,onChange:E=>y(E.target.value)}),h.jsx("div",{className:"text-muted-foreground text-xs",children:S("settingsPage.general.smallModelHint")})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsx(ft,{className:"text-muted-foreground text-xs",children:S("settingsPage.general.apiKeysLabel")}),h.jsx(Qo,{autoComplete:"off",placeholder:S("settingsPage.general.apiKeysPlaceholder"),value:l,onChange:E=>g(E.target.value),className:"min-h-[96px] font-mono text-xs"}),h.jsx("div",{className:"text-muted-foreground text-xs",children:S("settingsPage.general.apiKeysHint")}),h.jsx("div",{className:"text-muted-foreground text-xs",children:d})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsx(ft,{className:"text-muted-foreground text-xs",children:S("settingsPage.general.anthropicApiKeyLabel")}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(mt,{autoComplete:"off",type:C?"text":"password",placeholder:S("settingsPage.general.anthropicApiKeyPlaceholder"),value:u,onChange:E=>b(E.target.value),className:"font-mono text-xs"}),h.jsxs(pt,{type:"button",variant:"outline",className:"shrink-0",onClick:()=>T(E=>!E),"aria-label":S(C?"settingsPage.general.hideAnthropicApiKey":"settingsPage.general.showAnthropicApiKey"),children:[C?h.jsx(N_,{}):h.jsx(M_,{}),h.jsx("span",{className:"hidden sm:inline",children:S(C?"settingsPage.general.hideAnthropicApiKey":"settingsPage.general.showAnthropicApiKey")})]})]}),h.jsx("div",{className:"text-muted-foreground text-xs",children:S("settingsPage.general.anthropicApiKeyHint")}),h.jsx("div",{className:"text-muted-foreground text-xs",children:f})]})]})]})}function TU({mode:e,json:t,jsonIssue:s,items:i,models:r,onToggleMode:l,onJsonChange:u,onAddItem:d,onRemoveItem:f,onUpdateItem:m}){const y="__default__",g=r.length>0,{t:b}=$e();return h.jsxs(nn,{className:"gap-4 py-4",children:[h.jsxs(cn,{className:"px-4",children:[h.jsx(un,{children:b("settingsPage.reasoning.title")}),h.jsx(wn,{className:"hidden sm:block",children:b("settingsPage.reasoning.description")})]}),h.jsxs(Cn,{className:"space-y-3 px-4",children:[h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.reasoning.hint")}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(zn,{checked:e==="json",onCheckedChange:l}),h.jsx(ft,{className:"text-muted-foreground text-xs",children:b("settingsPage.common.jsonMode")})]})]}),e==="json"?h.jsxs("div",{className:"space-y-2",children:[h.jsx(Qo,{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?h.jsx(Sn,{variant:"warning",title:b("settingsPage.common.invalidJsonTitle"),description:s}):null]}):h.jsxs("div",{className:"space-y-2",children:[i.length===0?h.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),A=!g&&!T;return h.jsxs("div",{className:"grid gap-2 rounded-lg border p-3",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsxs(aa,{value:C,onValueChange:E=>m(S.id,{model:E===y?"":E}),disabled:A,children:[h.jsx(ia,{className:"min-w-[220px]",children:h.jsx(sa,{placeholder:b(g?"settingsPage.common.selectModelPlaceholder":"settingsPage.common.noModelsAvailable")})}),h.jsxs(oa,{children:[h.jsx(Pe,{value:y,children:b("settingsPage.common.defaultOption")}),T?h.jsx(Pe,{value:C,children:b("settingsPage.common.customModel",{value:C})}):null,r.map(E=>h.jsx(Pe,{value:E,children:E},E))]})]}),h.jsxs(aa,{value:S.effort,onValueChange:E=>m(S.id,{effort:E}),children:[h.jsx(ia,{className:"w-40",children:h.jsx(sa,{})}),h.jsx(oa,{children:xp.map(E=>h.jsx(Pe,{value:E,children:E},E))})]}),h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>f(S.id),children:b("settingsPage.common.remove")})]}),h.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.reasoning.itemHint")})]},S.id)}),h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:d,children:b("settingsPage.reasoning.addButton")})]})]})]})}function EU({mode:e,json:t,jsonIssue:s,items:i,models:r,onToggleMode:l,onJsonChange:u,onAddItem:d,onRemoveItem:f,onUpdateItem:m}){const y="__default__",g=r.length>0,{t:b}=$e();return h.jsxs(nn,{className:"gap-4 py-4",children:[h.jsxs(cn,{className:"px-4",children:[h.jsx(un,{children:b("settingsPage.prompts.title")}),h.jsx(wn,{className:"hidden sm:block",children:b("settingsPage.prompts.description")})]}),h.jsxs(Cn,{className:"space-y-3 px-4",children:[h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.prompts.hint")}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(zn,{checked:e==="json",onCheckedChange:l}),h.jsx(ft,{className:"text-muted-foreground text-xs",children:b("settingsPage.common.jsonMode")})]})]}),e==="json"?h.jsxs("div",{className:"space-y-2",children:[h.jsx(Qo,{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?h.jsx(Sn,{variant:"warning",title:b("settingsPage.common.invalidJsonTitle"),description:s}):null]}):h.jsxs("div",{className:"space-y-2",children:[i.length===0?h.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),A=!g&&!T;return h.jsxs("div",{className:"grid gap-2 rounded-lg border p-3",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsxs(aa,{value:C,onValueChange:E=>m(S.id,{model:E===y?"":E}),disabled:A,children:[h.jsx(ia,{className:"min-w-[220px]",children:h.jsx(sa,{placeholder:b(g?"settingsPage.common.selectModelPlaceholder":"settingsPage.common.noModelsAvailable")})}),h.jsxs(oa,{children:[h.jsx(Pe,{value:y,children:b("settingsPage.common.defaultOption")}),T?h.jsx(Pe,{value:C,children:b("settingsPage.common.customModel",{value:C})}):null,r.map(E=>h.jsx(Pe,{value:E,children:E},E))]})]}),h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>f(S.id),children:b("settingsPage.common.remove")})]}),h.jsx(Qo,{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")}),h.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.prompts.itemHint")})]},S.id)}),h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:d,children:b("settingsPage.prompts.addButton")})]})]})]})}function AU({allowOriginalModelNamesForAliases:e,mode:t,onToggleMode:s}){const{t:i}=$e(),r=i(e?"settingsPage.common.allow":"settingsPage.common.block");return h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsx("div",{className:"text-muted-foreground text-xs",children:i("settingsPage.aliases.defaultBehaviorHint",{behavior:r})}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(zn,{checked:t==="json",onCheckedChange:s}),h.jsx(ft,{className:"text-muted-foreground text-xs",children:i("settingsPage.common.jsonMode")})]})]})}function jU({json:e,jsonIssue:t,onJsonChange:s}){const{t:i}=$e();return h.jsxs("div",{className:"space-y-2",children:[h.jsx(Qo,{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?h.jsx(Sn,{variant:"warning",title:i("settingsPage.common.invalidJsonTitle"),description:t}):null]})}function NU({item:e,models:t,emptyTargetValue:s,allowOriginalDefaultValue:i,hasModels:r,onUpdateItem:l,onRemoveItem:u}){const{t:d}=$e(),f=e.target||s,m=f!==s&&!t.includes(f),y=!r&&!m,g=e.allowOriginal===void 0?i:e.allowOriginal?"allow":"block";return h.jsx("div",{className:"grid gap-2 rounded-lg border p-3",children:h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx(mt,{className:"min-w-[180px]",placeholder:d("settingsPage.aliases.aliasPlaceholder"),value:e.alias,onChange:b=>l(e.id,{alias:b.target.value})}),h.jsxs(aa,{value:f,onValueChange:b=>l(e.id,{target:b===s?"":b}),disabled:y,children:[h.jsx(ia,{className:"min-w-[220px]",children:h.jsx(sa,{placeholder:d(r?"settingsPage.aliases.selectTargetPlaceholder":"settingsPage.common.noModelsAvailable")})}),h.jsxs(oa,{children:[h.jsx(Pe,{value:s,children:d("settingsPage.aliases.selectOption")}),m?h.jsx(Pe,{value:f,children:d("settingsPage.common.customModel",{value:f})}):null,t.map(b=>h.jsx(Pe,{value:b,children:b},b))]})]}),h.jsxs(aa,{value:g,onValueChange:b=>l(e.id,{allowOriginal:b===i?void 0:b==="allow"}),children:[h.jsx(ia,{className:"min-w-[200px]",children:h.jsx(sa,{placeholder:d("settingsPage.aliases.originalModelPlaceholder")})}),h.jsxs(oa,{children:[h.jsx(Pe,{value:i,children:d("settingsPage.aliases.useDefault")}),h.jsx(Pe,{value:"allow",children:d("settingsPage.aliases.allowOriginal")}),h.jsx(Pe,{value:"block",children:d("settingsPage.aliases.blockOriginal")})]})]}),h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>u(e.id),children:d("settingsPage.common.remove")})]})})}function RU({items:e,models:t,emptyTargetValue:s,allowOriginalDefaultValue:i,hasModels:r,onAddItem:l,onRemoveItem:u,onUpdateItem:d}){const{t:f}=$e();return h.jsxs("div",{className:"space-y-2",children:[e.length===0?h.jsx("div",{className:"text-muted-foreground text-sm",children:f("settingsPage.aliases.emptyState")}):e.map(m=>h.jsx(NU,{item:m,models:t,emptyTargetValue:s,allowOriginalDefaultValue:i,hasModels:r,onUpdateItem:d,onRemoveItem:u},m.id)),h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:l,children:f("settingsPage.aliases.addButton")})]})}function MU({allowOriginalModelNamesForAliases:e,mode:t,json:s,jsonIssue:i,items:r,models:l,onToggleMode:u,onJsonChange:d,onAddItem:f,onRemoveItem:m,onUpdateItem:y}){const g="__target__",b="__allow_original_default__",S=l.length>0,{t:C}=$e();return h.jsxs(nn,{className:"gap-4 py-4",children:[h.jsxs(cn,{className:"px-4",children:[h.jsx(un,{children:C("settingsPage.aliases.title")}),h.jsx(wn,{className:"hidden sm:block",children:C("settingsPage.aliases.description")})]}),h.jsxs(Cn,{className:"space-y-3 px-4",children:[h.jsx(AU,{allowOriginalModelNamesForAliases:e,mode:t,onToggleMode:u}),t==="json"?h.jsx(jU,{json:s,jsonIssue:i,onJsonChange:d}):h.jsx(RU,{items:r,models:l,emptyTargetValue:g,allowOriginalDefaultValue:b,hasModels:S,onAddItem:f,onRemoveItem:m,onUpdateItem:y})]})]})}function _U({accountAffinityEnabled:e,modelRefreshIntervalInput:t,modelRefreshIntervalIssue:s,allowOriginalModelNamesForAliases:i,useFunctionApplyPatch:r,forceAgent:l,compactUseSmallModel:u,messageStartInputTokensFallback:d,useMessagesApi:f,useResponsesApiWebSearch:m,responsesApiContextManagementModelsValue:y,onToggleAccountAffinity:g,onModelRefreshIntervalChange:b,onToggleAllowOriginalModelNamesForAliases:S,onToggleUseFunctionApplyPatch:C,onToggleForceAgent:T,onToggleCompactUseSmallModel:A,onToggleMessageStartInputTokensFallback:E,onToggleUseMessagesApi:j,onToggleUseResponsesApiWebSearch:R,onResponsesApiContextManagementModelsChange:_}){const{t:M}=$e();return h.jsxs(nn,{className:"gap-4 py-4",children:[h.jsxs(cn,{className:"px-4",children:[h.jsx(un,{children:M("settingsPage.advanced.title")}),h.jsx(wn,{className:"hidden sm:block",children:M("settingsPage.advanced.description")})]}),h.jsxs(Cn,{className:"space-y-3 px-4",children:[h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.accountAffinity.label")}),h.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.accountAffinity.hint")})]}),h.jsx(zn,{checked:e,onCheckedChange:g})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsx(ft,{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.modelRefreshIntervalLabel")}),h.jsx(mt,{type:"number",min:"0",step:"0.5",value:t,onChange:B=>b(B.target.value)}),h.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.modelRefreshIntervalHint")}),s?h.jsx("div",{className:"text-destructive text-xs",children:s}):null]}),h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.allowOriginalModelNamesLabel")}),h.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.allowOriginalModelNamesHint")})]}),h.jsx(zn,{checked:i,onCheckedChange:S})]}),h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.useFunctionApplyPatchLabel")}),h.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.useFunctionApplyPatchHint")})]}),h.jsx(zn,{checked:r,onCheckedChange:C})]}),h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.forceAgentLabel")}),h.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.forceAgentHint")})]}),h.jsx(zn,{checked:l,onCheckedChange:T})]}),h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.compactUseSmallModelLabel")}),h.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.compactUseSmallModelHint")})]}),h.jsx(zn,{checked:u,onCheckedChange:A})]}),h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.messageStartInputTokensFallbackLabel")}),h.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.messageStartInputTokensFallbackHint")})]}),h.jsx(zn,{checked:d,onCheckedChange:E})]}),h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.useMessagesApiLabel")}),h.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.useMessagesApiHint")})]}),h.jsx(zn,{checked:f,onCheckedChange:j})]}),h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("div",{className:"text-sm font-medium",children:M("settingsPage.advanced.useResponsesApiWebSearchLabel")}),h.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.useResponsesApiWebSearchHint")})]}),h.jsx(zn,{checked:m,onCheckedChange:R})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsx(ft,{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.responsesApiContextManagementModelsLabel")}),h.jsx(Qo,{autoComplete:"off",placeholder:M("settingsPage.advanced.responsesApiContextManagementModelsPlaceholder"),value:y,onChange:B=>_(B.target.value),className:"min-h-[96px] font-mono text-xs"}),h.jsx("div",{className:"text-muted-foreground text-xs",children:M("settingsPage.advanced.responsesApiContextManagementModelsHint")})]})]})]})}function OU({providerId:e,item:t,onRemoveModel:s,onUpdateModel:i}){const{t:r}=$e();return h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx(mt,{className:"min-w-[180px]",placeholder:r("settingsPage.advanced.providersModelIdPlaceholder"),value:t.model,onChange:l=>i(e,t.id,{model:l.target.value})}),h.jsx(mt,{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})}),h.jsx(mt,{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})}),h.jsx(mt,{className:"w-28",type:"number",step:"1",min:"0",placeholder:"topK",value:t.topK,onChange:l=>i(e,t.id,{topK:l.target.value})}),h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>s(e,t.id),children:r("settingsPage.common.remove")})]})}function DU({item:e,onRemoveProvider:t,onUpdateProvider:s,onAddModel:i,onRemoveModel:r,onUpdateModel:l}){const{t:u}=$e();return h.jsxs("div",{className:"grid gap-3 rounded-lg border p-3",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx(mt,{className:"min-w-[200px]",placeholder:u("settingsPage.advanced.providersNamePlaceholder"),value:e.name,onChange:d=>s(e.id,{name:d.target.value})}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(zn,{checked:e.enabled,onCheckedChange:d=>s(e.id,{enabled:d})}),h.jsx(ft,{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersEnabledLabel")})]}),h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>t(e.id),children:u("settingsPage.common.remove")})]}),h.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[h.jsxs("div",{className:"grid gap-2",children:[h.jsx(ft,{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersBaseUrlLabel")}),h.jsx(mt,{autoComplete:"off",placeholder:u("settingsPage.advanced.providersBaseUrlPlaceholder"),value:e.baseUrl,onChange:d=>s(e.id,{baseUrl:d.target.value})})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsx(ft,{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersApiKeyLabel")}),h.jsx(mt,{type:"password",autoComplete:"off",placeholder:u("settingsPage.advanced.providersApiKeyPlaceholder"),value:e.apiKey,onChange:d=>s(e.id,{apiKey:d.target.value})})]})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[h.jsx("div",{className:"text-sm font-medium",children:u("settingsPage.advanced.providersModelsLabel")}),h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:()=>i(e.id),children:u("settingsPage.advanced.providersAddModel")})]}),e.models.length===0?h.jsx("div",{className:"text-muted-foreground text-xs",children:u("settingsPage.advanced.providersModelsEmptyState")}):e.models.map(d=>h.jsx(OU,{providerId:e.id,item:d,onUpdateModel:l,onRemoveModel:r},d.id))]})]})}function PU({items:e,issue:t,onAddProvider:s,onRemoveProvider:i,onUpdateProvider:r,onAddModel:l,onRemoveModel:u,onUpdateModel:d}){const{t:f}=$e();return h.jsxs(nn,{className:"gap-4 py-4",children:[h.jsxs(cn,{className:"px-4",children:[h.jsx(un,{children:f("settingsPage.advanced.providersTitle")}),h.jsx(wn,{className:"hidden sm:block",children:f("settingsPage.advanced.providersDescription")})]}),h.jsxs(Cn,{className:"space-y-3 px-4",children:[t?h.jsx(Sn,{variant:"warning",title:f("settingsPage.advanced.providersIssueTitle"),description:t}):null,e.length===0?h.jsx("div",{className:"text-muted-foreground text-sm",children:f("settingsPage.advanced.providersEmptyState")}):e.map(m=>h.jsx(DU,{item:m,onRemoveProvider:i,onUpdateProvider:r,onAddModel:l,onRemoveModel:u,onUpdateModel:d},m.id)),h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:s,children:f("settingsPage.advanced.providersAddProvider")})]})]})}function kU(){const{t:e}=$e(),[t,s]=x.useState(!1),[i,r]=x.useState(!1),[l,u]=x.useState(null),[d,f]=x.useState(null),[m,y]=x.useState([]),[g,b]=x.useState({}),[S,C]=x.useState(""),[T,A]=x.useState(null),[E,j]=x.useState(""),R=bU(xe=>b(we=>({...we,extraPrompts:xe}))),_=SU(xe=>b(we=>({...we,modelReasoningEfforts:xe}))),M=wU(xe=>b(we=>({...we,modelAliases:xe}))),B=gU(xe=>b(we=>({...we,providers:xe}))),{mode:L,items:O,json:K,jsonIssue:Z,onToggleMode:W,onJsonChange:se,onAddItem:I,onRemoveItem:ne,onUpdateItem:le,setFromRecord:D}=R,{mode:H,items:V,json:oe,jsonIssue:ue,onToggleMode:P,onJsonChange:X,onAddItem:G,onRemoveItem:te,onUpdateItem:ce,setFromRecord:he}=_,{mode:ae,items:de,json:Se,jsonIssue:Ee,onToggleMode:Ne,onJsonChange:_e,onAddItem:gt,onRemoveItem:rt,onUpdateItem:jn,setFromRecord:Gt}=M,{items:on,issue:wa,onAddProvider:Ht,onRemoveProvider:Ua,onUpdateProvider:Ha,onAddModel:Nt,onRemoveModel:Hn,onUpdateModel:Rt,setFromRecord:Cs}=B,fn=x.useCallback(xe=>{const{_configPath:we,...Vt}=xe,js=bp(Vt.modelAliases),Ns=Eu(js),ur=S1(Vt),$a=Vt.modelRefreshIntervalHours;f(we??null),b({...Vt,auth:{apiKeys:ur},modelAliases:Ns}),D(Vt.extraPrompts),he(Vt.modelReasoningEfforts),Gt(Ns),Cs(Vt.providers),C(typeof $a=="number"?String($a):""),A(null),j(Vt.responsesApiContextManagementModels?.join(`
|
|
56
|
+
`)??"")},[D,he,Gt,Cs,C,A,j]),la=x.useCallback(async()=>{s(!0),u(null);try{const[xe,we]=await Promise.allSettled([L4(),V4()]);if(xe.status==="fulfilled")fn(xe.value);else throw xe.reason;we.status==="fulfilled"?y(we.value.items??[]):(y([]),tn.error(st.t("settingsPage.toast.loadModelsFailed"),{description:we.reason instanceof Error?we.reason.message:String(we.reason)}))}catch(xe){const we=xe instanceof xs?xe.message:String(xe);u(we),tn.error(st.t("settingsPage.toast.loadConfigFailed"),{description:we})}finally{s(!1)}},[fn]);x.useEffect(()=>{la()},[la]);const In=x.useCallback(async()=>{r(!0),u(null);try{const xe=await z4(g);fn(xe),tn.success(st.t("settingsPage.toast.configSaved"))}catch(xe){const we=xe instanceof xs?xe.message:String(xe);u(we),tn.error(st.t("settingsPage.toast.saveConfigFailed"),{description:we})}finally{r(!1)}},[fn,g]),Ia=x.useCallback(()=>{la()},[la]),Nn=x.useCallback(()=>{In()},[In]),Ts=x.useCallback(xe=>{b(we=>({...we,smallModel:xe==="__default__"?"":xe}))},[b]),Fn=x.useCallback(xe=>{b(we=>({...we,smallModel:xe}))},[b]),ca=x.useCallback(xe=>{const we=uU(xe);b(Vt=>({...Vt,auth:{apiKeys:we},apiKey:void 0}))},[b]),Mt=x.useCallback(xe=>{b(we=>({...we,anthropicApiKey:xe}))},[b]),rn=x.useCallback(xe=>{b(we=>({...we,accountAffinity:xe}))},[b]),xt=x.useCallback(xe=>{C(xe);const we=xe.trim();if(!we){A(null),b(js=>({...js,modelRefreshIntervalHours:void 0}));return}const Vt=Number(we);if(!Number.isFinite(Vt)||Vt<0){A(e("settingsPage.advanced.modelRefreshIntervalError"));return}A(null),b(js=>({...js,modelRefreshIntervalHours:Vt}))},[b,C,A,e]),ui=x.useCallback(xe=>{b(we=>({...we,allowOriginalModelNamesForAliases:xe}))},[b]),Fa=x.useCallback(xe=>{b(we=>({...we,useFunctionApplyPatch:xe}))},[b]),hn=x.useCallback(xe=>{b(we=>({...we,forceAgent:xe}))},[b]),lt=x.useCallback(xe=>{b(we=>({...we,compactUseSmallModel:xe}))},[b]),Ca=x.useCallback(xe=>{b(we=>({...we,messageStartInputTokensFallback:xe}))},[b]),Xt=x.useCallback(xe=>{b(we=>({...we,useMessagesApi:xe}))},[b]),Lt=x.useCallback(xe=>{b(we=>({...we,useResponsesApiWebSearch:xe}))},[b]),Te=x.useCallback(xe=>{j(xe);const we=SA(xe);b(Vt=>({...Vt,responsesApiContextManagementModels:we}))},[b,j]),ke=m.length>0,bt=g.smallModel?g.smallModel:"__default__",zt=!i&&!t&&!(L==="json"&&Z)&&!(H==="json"&&ue)&&!(ae==="json"&&Ee)&&!T&&!wa,Ta=e("settingsPage.general.legacyAuthNote",{env:"COPILOT_API_KEY"}),et=e(ke?"settingsPage.general.smallModel":"settingsPage.general.smallModelManual"),Zt=g.smallModel??"",qa=S1(g).join(`
|
|
57
|
+
`),Qt=g.anthropicApiKey??"",Wt=e("settingsPage.general.anthropicApiKeyEnvNote",{env:"ANTHROPIC_API_KEY"}),Es=g.accountAffinity??!0,Rn=g.allowOriginalModelNamesForAliases??!1,cr=g.useFunctionApplyPatch??!0,Vl=g.forceAgent??!1,Ea=g.compactUseSmallModel??!0,_t=g.messageStartInputTokensFallback??!1,Jt=g.useMessagesApi??!0,As=g.useResponsesApiWebSearch??!0;return{loading:t,saving:i,error:l,configPath:d,canSave:zt,onReload:Ia,onSave:Nn,hasModels:ke,smallModelLabel:et,smallModelValue:bt,smallModelInputValue:Zt,models:m,authApiKeysValue:qa,anthropicApiKeyValue:Qt,legacyAuthNote:Ta,anthropicApiKeyEnvNote:Wt,onSmallModelSelect:Ts,onSmallModelInput:Fn,onAuthApiKeysChange:ca,onAnthropicApiKeyChange:Mt,accountAffinityEnabled:Es,onAccountAffinityToggle:rn,modelRefreshIntervalInput:S,modelRefreshIntervalIssue:T,onModelRefreshIntervalChange:xt,allowOriginalModelNamesForAliases:Rn,reasoningMode:H,reasoningJson:oe,reasoningJsonIssue:ue,reasoningItems:V,onReasoningToggleMode:P,onReasoningJsonChange:X,onReasoningAddItem:G,onReasoningRemoveItem:te,onReasoningUpdateItem:ce,extraMode:L,extraJson:K,extraJsonIssue:Z,extraItems:O,onExtraToggleMode:W,onExtraJsonChange:se,onExtraAddItem:I,onExtraRemoveItem:ne,onExtraUpdateItem:le,aliasMode:ae,aliasJson:Se,aliasJsonIssue:Ee,aliasItems:de,onAliasToggleMode:Ne,onAliasJsonChange:_e,onAliasAddItem:gt,onAliasRemoveItem:rt,onAliasUpdateItem:jn,useFunctionApplyPatch:cr,forceAgent:Vl,compactUseSmallModel:Ea,messageStartInputTokensFallback:_t,useMessagesApi:Jt,useResponsesApiWebSearch:As,responsesApiContextManagementModelsValue:E,onUseMessagesApiToggle:Xt,onUseResponsesApiWebSearchToggle:Lt,onResponsesApiContextManagementModelsChange:Te,providersItems:on,providersIssue:wa,onProvidersAddProvider:Ht,onProvidersRemoveProvider:Ua,onProvidersUpdateProvider:Ha,onProvidersAddModel:Nt,onProvidersRemoveModel:Hn,onProvidersUpdateModel:Rt,onAllowOriginalModelNamesForAliasesToggle:ui,onUseFunctionApplyPatchToggle:Fa,onForceAgentToggle:hn,onCompactUseSmallModelToggle:lt,onMessageStartInputTokensFallbackToggle:Ca}}function LU({loading:e,saving:t,error:s,configPath:i,canSave:r,onReload:l,onSave:u,hasModels:d,smallModelLabel:f,smallModelValue:m,smallModelInputValue:y,models:g,authApiKeysValue:b,anthropicApiKeyValue:S,legacyAuthNote:C,anthropicApiKeyEnvNote:T,onSmallModelSelect:A,onSmallModelInput:E,onAuthApiKeysChange:j,onAnthropicApiKeyChange:R,accountAffinityEnabled:_,onAccountAffinityToggle:M,modelRefreshIntervalInput:B,modelRefreshIntervalIssue:L,onModelRefreshIntervalChange:O,reasoningMode:K,reasoningJson:Z,reasoningJsonIssue:W,reasoningItems:se,onReasoningToggleMode:I,onReasoningJsonChange:ne,onReasoningAddItem:le,onReasoningRemoveItem:D,onReasoningUpdateItem:H,extraMode:V,extraJson:oe,extraJsonIssue:ue,extraItems:P,onExtraToggleMode:X,onExtraJsonChange:G,onExtraAddItem:te,onExtraRemoveItem:ce,onExtraUpdateItem:he,aliasMode:ae,aliasJson:de,aliasJsonIssue:Se,aliasItems:Ee,onAliasToggleMode:Ne,onAliasJsonChange:_e,onAliasAddItem:gt,onAliasRemoveItem:rt,onAliasUpdateItem:jn,allowOriginalModelNamesForAliases:Gt,useFunctionApplyPatch:on,forceAgent:wa,compactUseSmallModel:Ht,messageStartInputTokensFallback:Ua,useMessagesApi:Ha,useResponsesApiWebSearch:Nt,responsesApiContextManagementModelsValue:Hn,onUseMessagesApiToggle:Rt,onUseResponsesApiWebSearchToggle:Cs,onResponsesApiContextManagementModelsChange:fn,providersItems:la,providersIssue:In,onProvidersAddProvider:Ia,onProvidersRemoveProvider:Nn,onProvidersUpdateProvider:Ts,onProvidersAddModel:Fn,onProvidersRemoveModel:ca,onProvidersUpdateModel:Mt,onAllowOriginalModelNamesForAliasesToggle:rn,onUseFunctionApplyPatchToggle:xt,onForceAgentToggle:ui,onCompactUseSmallModelToggle:Fa,onMessageStartInputTokensFallbackToggle:hn}){const{t:lt}=$e(),Ca=x.useMemo(()=>[{id:"general",label:lt("settingsPage.sections.general")},{id:"reasoning",label:lt("settingsPage.sections.reasoning")},{id:"aliases",label:lt("settingsPage.sections.aliases")},{id:"prompts",label:lt("settingsPage.sections.prompts")},{id:"advanced",label:lt("settingsPage.sections.advanced")}],[lt]),{activeSection:Xt,registerSection:Lt,scrollToSection:Te}=oU({sectionIds:[...lU]});return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"text-lg font-semibold",children:lt("nav.settings")}),h.jsx("div",{className:"text-muted-foreground text-sm",children:lt("settingsPage.subtitle")})]}),h.jsxs("div",{className:"ml-auto flex flex-col items-end gap-1 text-right",children:[h.jsx("div",{className:"flex flex-wrap items-center gap-2",children:h.jsx(pt,{type:"button",variant:"outline",size:"sm",onClick:l,disabled:e||t,children:lt(e?"common.refreshing":"common.refresh")})}),i?h.jsx("div",{className:"text-muted-foreground text-xs leading-tight hidden sm:block",children:lt("settingsPage.configPath",{path:i})}):null,h.jsx("div",{className:"text-muted-foreground text-xs leading-tight hidden sm:block",children:lt("settingsPage.note")})]})]}),s?h.jsx(Sn,{variant:"error",title:lt("settingsPage.errorTitle"),description:s,actionLabel:lt("common.retry"),onAction:l}):null,h.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-12",children:[h.jsx("aside",{className:"hidden lg:block lg:col-span-2",children:h.jsx(iU,{sections:Ca,activeSection:Xt,onSectionClick:Te})}),h.jsxs("main",{className:"space-y-6 lg:col-span-10",children:[h.jsx(Vo,{id:"general",isActive:Xt==="general",ref:ke=>Lt("general",ke),children:h.jsx(CU,{hasModels:d,smallModelLabel:f,smallModelValue:m,smallModelInputValue:y,models:g,authApiKeysValue:b,anthropicApiKeyValue:S,legacyAuthNote:C,anthropicApiKeyEnvNote:T,onSmallModelSelect:A,onSmallModelInput:E,onAuthApiKeysChange:j,onAnthropicApiKeyChange:R})}),h.jsx(Vo,{id:"reasoning",isActive:Xt==="reasoning",ref:ke=>Lt("reasoning",ke),children:h.jsx(TU,{mode:K,json:Z,jsonIssue:W,items:se,models:g,onToggleMode:I,onJsonChange:ne,onAddItem:le,onRemoveItem:D,onUpdateItem:H})}),h.jsx(Vo,{id:"aliases",isActive:Xt==="aliases",ref:ke=>Lt("aliases",ke),children:h.jsx(MU,{allowOriginalModelNamesForAliases:Gt,mode:ae,json:de,jsonIssue:Se,items:Ee,models:g,onToggleMode:Ne,onJsonChange:_e,onAddItem:gt,onRemoveItem:rt,onUpdateItem:jn})}),h.jsx(Vo,{id:"prompts",isActive:Xt==="prompts",ref:ke=>Lt("prompts",ke),children:h.jsx(EU,{mode:V,json:oe,jsonIssue:ue,items:P,models:g,onToggleMode:X,onJsonChange:G,onAddItem:te,onRemoveItem:ce,onUpdateItem:he})}),h.jsx(Vo,{id:"advanced",isActive:Xt==="advanced",ref:ke=>Lt("advanced",ke),children:h.jsxs("div",{className:"space-y-6",children:[h.jsx(_U,{accountAffinityEnabled:_,modelRefreshIntervalInput:B,modelRefreshIntervalIssue:L,allowOriginalModelNamesForAliases:Gt,useFunctionApplyPatch:on,forceAgent:wa,compactUseSmallModel:Ht,messageStartInputTokensFallback:Ua,useMessagesApi:Ha,useResponsesApiWebSearch:Nt,responsesApiContextManagementModelsValue:Hn,onToggleAccountAffinity:M,onModelRefreshIntervalChange:O,onToggleAllowOriginalModelNamesForAliases:rn,onToggleUseFunctionApplyPatch:xt,onToggleForceAgent:ui,onToggleCompactUseSmallModel:Fa,onToggleMessageStartInputTokensFallback:hn,onToggleUseMessagesApi:Rt,onToggleUseResponsesApiWebSearch:Cs,onResponsesApiContextManagementModelsChange:fn}),h.jsx(PU,{items:la,issue:In,onAddProvider:Ia,onRemoveProvider:Nn,onUpdateProvider:Ts,onAddModel:Fn,onRemoveModel:ca,onUpdateModel:Mt})]})})]})]}),h.jsx(sU,{saving:t,canSave:r,onSave:u})]})}function zU(){const e=kU();return h.jsx(LU,{...e})}function VU(){return h.jsx($R,{children:h.jsxs(ds,{element:h.jsx(s5,{}),children:[h.jsx(ds,{path:"/",element:h.jsx(IR,{to:"/accounts",replace:!0})}),h.jsx(ds,{path:"/accounts",element:h.jsx(XB,{})}),h.jsx(ds,{path:"/requests",element:h.jsx(aU,{})}),h.jsx(ds,{path:"/models",element:h.jsx(t6,{})}),h.jsx(ds,{path:"/settings",element:h.jsx(zU,{})}),h.jsx(ds,{path:"/request/:requestId",element:h.jsx(r6,{})}),h.jsx(ds,{path:"*",element:h.jsx(n6,{})})]})})}const BU=({...e})=>{const{resolvedTheme:t}=G1(),s=t==="dark"?"dark":t==="light"?"light":"system";return h.jsx(M4,{theme:s,className:"toaster group",icons:{success:h.jsx(lw,{className:"size-4"}),info:h.jsx(cw,{className:"size-4"}),warning:h.jsx(dw,{className:"size-4"}),error:h.jsx(uw,{className:"size-4"}),loading:h.jsx(B_,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},TA=document.querySelector("#root");if(!TA)throw new Error("Root element not found");FN.createRoot(TA).render(h.jsx(x.StrictMode,{children:h.jsx(RM,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:h.jsx(LP,{children:h.jsx(_4,{children:h.jsxs(Z_,{children:[h.jsx(Z6,{children:h.jsx(gM,{children:h.jsx(VU,{})})}),h.jsx(BU,{})]})})})})}));
|