gencow 0.1.176 → 0.1.178

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/bin/gencow.mjs +8 -2
  2. package/core/index.js +26 -4
  3. package/dashboard/assets/index-CFHaaHZs.js +408 -0
  4. package/dashboard/assets/index-DQfrJITv.css +1 -0
  5. package/dashboard/index.html +2 -2
  6. package/lib/app-command.mjs +43 -12
  7. package/lib/app-create-response.mjs +51 -0
  8. package/lib/auth-schema-provenance-guard.mjs +55 -0
  9. package/lib/backend-env-resolver.mjs +147 -0
  10. package/lib/cli-project-runtime.mjs +40 -26
  11. package/lib/cli-schema-paths.mjs +7 -1
  12. package/lib/codegen-command.mjs +14 -32
  13. package/lib/component-readme.mjs +33 -10
  14. package/lib/db-command.mjs +31 -34
  15. package/lib/db-migration-command-steps.mjs +234 -0
  16. package/lib/db-push-command.mjs +238 -200
  17. package/lib/deploy-command.mjs +1 -0
  18. package/lib/deploy-contract.mjs +154 -0
  19. package/lib/deploy-existing-bundle-candidate.mjs +48 -0
  20. package/lib/deploy-package-claim.mjs +119 -0
  21. package/lib/deploy-package-runtime.mjs +206 -62
  22. package/lib/deploy-receipt-store.mjs +169 -0
  23. package/lib/deploy-runtime.mjs +113 -17
  24. package/lib/deploy-static-fullstack-runtime.mjs +34 -8
  25. package/lib/dev-cloud-bundle.mjs +50 -7
  26. package/lib/dev-cloud-command.mjs +58 -20
  27. package/lib/dev-cloud-migrations.mjs +30 -5
  28. package/lib/doctor-command.mjs +31 -12
  29. package/lib/drizzle-generate.mjs +38 -1
  30. package/lib/env-command.mjs +75 -10
  31. package/lib/init-command.mjs +44 -10
  32. package/lib/install-features.mjs +24 -5
  33. package/lib/migration-bundle-manifest.mjs +58 -7
  34. package/lib/migration-bundle-staging.mjs +59 -0
  35. package/lib/migration-client-diagnostic.mjs +61 -1
  36. package/lib/migration-diagnostic-contract.mjs +6 -238
  37. package/lib/migration-diagnostic.mjs +35 -25
  38. package/lib/migration-operation-client.mjs +92 -0
  39. package/lib/project-migration-manifest.mjs +111 -0
  40. package/lib/project-schema-deployment-preview.mjs +86 -0
  41. package/lib/project-validator.mjs +20 -4
  42. package/lib/readme-codegen.mjs +5 -4
  43. package/lib/static-artifact-manifest.mjs +40 -0
  44. package/lib/static-command.mjs +27 -4
  45. package/lib/static-deploy-command.mjs +98 -11
  46. package/package.json +10 -6
  47. package/runtime/config.mjs +4 -0
  48. package/runtime/server.mjs +4675 -2721
  49. package/runtime/server.mjs.map +4 -4
  50. package/runtime/tooling.mjs +184 -2
  51. package/templateFeature/ai/ai-errors.ts +3 -2
  52. package/templateFeature/ai/ai-provider.ts +5 -4
  53. package/templateFeature/ai/ai.ts +1 -1
  54. package/templateFeature/ai/manifest.json +2 -1
  55. package/templateFeature/embedding-profile.ts +9 -0
  56. package/templateFeature/memory/embedding-profile.ts +1 -0
  57. package/templateFeature/memory/manifest.json +6 -5
  58. package/templateFeature/memory/memory.ts +141 -46
  59. package/templateFeature/memory/schema-memory.ts +11 -2
  60. package/templateFeature/rag/embedding-profile.ts +1 -0
  61. package/templateFeature/rag/manifest.json +9 -8
  62. package/templateFeature/rag/rag.ts +104 -35
  63. package/templateFeature/rag/schema-rag.ts +11 -2
  64. package/templateFeature/search/embedding-profile.ts +1 -0
  65. package/templateFeature/search/manifest.json +5 -3
  66. package/templateFeature/search/schema-search.ts +14 -1
  67. package/templates/SECURITY.md +1 -1
  68. package/dashboard/assets/index-DjLw1oMy.css +0 -1
  69. package/dashboard/assets/index-DnlR7gj_.js +0 -408
@@ -0,0 +1,408 @@
1
+ function Zx(n,r){for(var s=0;s<r.length;s++){const i=r[s];if(typeof i!="string"&&!Array.isArray(i)){for(const u in i)if(u!=="default"&&!(u in n)){const f=Object.getOwnPropertyDescriptor(i,u);f&&Object.defineProperty(n,u,f.get?f:{enumerable:!0,get:()=>i[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))i(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function s(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function i(u){if(u.ep)return;u.ep=!0;const f=s(u);fetch(u.href,f)}})();function yp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var jc={exports:{}},ls={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Sg;function Jx(){if(Sg)return ls;Sg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(i,u,f){var m=null;if(f!==void 0&&(m=""+f),u.key!==void 0&&(m=""+u.key),"key"in u){f={};for(var y in u)y!=="key"&&(f[y]=u[y])}else f=u;return u=f.ref,{$$typeof:n,type:i,key:m,ref:u!==void 0?u:null,props:f}}return ls.Fragment=r,ls.jsx=s,ls.jsxs=s,ls}var wg;function Ix(){return wg||(wg=1,jc.exports=Jx()),jc.exports}var c=Ix(),Cc={exports:{}},ze={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Ng;function Px(){if(Ng)return ze;Ng=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function j(R){return R===null||typeof R!="object"?null:(R=S&&R[S]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,M={};function E(R,U,G){this.props=R,this.context=U,this.refs=M,this.updater=G||C}E.prototype.isReactComponent={},E.prototype.setState=function(R,U){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,U,"setState")},E.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function L(){}L.prototype=E.prototype;function B(R,U,G){this.props=R,this.context=U,this.refs=M,this.updater=G||C}var ee=B.prototype=new L;ee.constructor=B,N(ee,E.prototype),ee.isPureReactComponent=!0;var le=Array.isArray;function I(){}var P={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function se(R,U,G){var Z=G.ref;return{$$typeof:n,type:R,key:U,ref:Z!==void 0?Z:null,props:G}}function re(R,U){return se(R.type,U,R.props)}function Q(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function oe(R){var U={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(G){return U[G]})}var pe=/\/+/g;function K(R,U){return typeof R=="object"&&R!==null&&R.key!=null?oe(""+R.key):U.toString(36)}function J(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(I,I):(R.status="pending",R.then(function(U){R.status==="pending"&&(R.status="fulfilled",R.value=U)},function(U){R.status==="pending"&&(R.status="rejected",R.reason=U)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function T(R,U,G,Z,te){var ie=typeof R;(ie==="undefined"||ie==="boolean")&&(R=null);var je=!1;if(R===null)je=!0;else switch(ie){case"bigint":case"string":case"number":je=!0;break;case"object":switch(R.$$typeof){case n:case r:je=!0;break;case v:return je=R._init,T(je(R._payload),U,G,Z,te)}}if(je)return te=te(R),je=Z===""?"."+K(R,0):Z,le(te)?(G="",je!=null&&(G=je.replace(pe,"$&/")+"/"),T(te,U,G,"",function(wt){return wt})):te!=null&&(Q(te)&&(te=re(te,G+(te.key==null||R&&R.key===te.key?"":(""+te.key).replace(pe,"$&/")+"/")+je)),U.push(te)),1;je=0;var _e=Z===""?".":Z+":";if(le(R))for(var be=0;be<R.length;be++)Z=R[be],ie=_e+K(Z,be),je+=T(Z,U,G,ie,te);else if(be=j(R),typeof be=="function")for(R=be.call(R),be=0;!(Z=R.next()).done;)Z=Z.value,ie=_e+K(Z,be++),je+=T(Z,U,G,ie,te);else if(ie==="object"){if(typeof R.then=="function")return T(J(R),U,G,Z,te);throw U=String(R),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return je}function $(R,U,G){if(R==null)return R;var Z=[],te=0;return T(R,Z,"","",function(ie){return U.call(G,ie,te++)}),Z}function W(R){if(R._status===-1){var U=R._result;U=U(),U.then(function(G){(R._status===0||R._status===-1)&&(R._status=1,R._result=G)},function(G){(R._status===0||R._status===-1)&&(R._status=2,R._result=G)}),R._status===-1&&(R._status=0,R._result=U)}if(R._status===1)return R._result.default;throw R._result}var de=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},X={map:$,forEach:function(R,U,G){$(R,function(){U.apply(this,arguments)},G)},count:function(R){var U=0;return $(R,function(){U++}),U},toArray:function(R){return $(R,function(U){return U})||[]},only:function(R){if(!Q(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return ze.Activity=x,ze.Children=X,ze.Component=E,ze.Fragment=s,ze.Profiler=u,ze.PureComponent=B,ze.StrictMode=i,ze.Suspense=g,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,ze.__COMPILER_RUNTIME={__proto__:null,c:function(R){return P.H.useMemoCache(R)}},ze.cache=function(R){return function(){return R.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(R,U,G){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var Z=N({},R.props),te=R.key;if(U!=null)for(ie in U.key!==void 0&&(te=""+U.key),U)!q.call(U,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&U.ref===void 0||(Z[ie]=U[ie]);var ie=arguments.length-2;if(ie===1)Z.children=G;else if(1<ie){for(var je=Array(ie),_e=0;_e<ie;_e++)je[_e]=arguments[_e+2];Z.children=je}return se(R.type,te,Z)},ze.createContext=function(R){return R={$$typeof:m,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:f,_context:R},R},ze.createElement=function(R,U,G){var Z,te={},ie=null;if(U!=null)for(Z in U.key!==void 0&&(ie=""+U.key),U)q.call(U,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(te[Z]=U[Z]);var je=arguments.length-2;if(je===1)te.children=G;else if(1<je){for(var _e=Array(je),be=0;be<je;be++)_e[be]=arguments[be+2];te.children=_e}if(R&&R.defaultProps)for(Z in je=R.defaultProps,je)te[Z]===void 0&&(te[Z]=je[Z]);return se(R,ie,te)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(R){return{$$typeof:y,render:R}},ze.isValidElement=Q,ze.lazy=function(R){return{$$typeof:v,_payload:{_status:-1,_result:R},_init:W}},ze.memo=function(R,U){return{$$typeof:h,type:R,compare:U===void 0?null:U}},ze.startTransition=function(R){var U=P.T,G={};P.T=G;try{var Z=R(),te=P.S;te!==null&&te(G,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(I,de)}catch(ie){de(ie)}finally{U!==null&&G.types!==null&&(U.types=G.types),P.T=U}},ze.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},ze.use=function(R){return P.H.use(R)},ze.useActionState=function(R,U,G){return P.H.useActionState(R,U,G)},ze.useCallback=function(R,U){return P.H.useCallback(R,U)},ze.useContext=function(R){return P.H.useContext(R)},ze.useDebugValue=function(){},ze.useDeferredValue=function(R,U){return P.H.useDeferredValue(R,U)},ze.useEffect=function(R,U){return P.H.useEffect(R,U)},ze.useEffectEvent=function(R){return P.H.useEffectEvent(R)},ze.useId=function(){return P.H.useId()},ze.useImperativeHandle=function(R,U,G){return P.H.useImperativeHandle(R,U,G)},ze.useInsertionEffect=function(R,U){return P.H.useInsertionEffect(R,U)},ze.useLayoutEffect=function(R,U){return P.H.useLayoutEffect(R,U)},ze.useMemo=function(R,U){return P.H.useMemo(R,U)},ze.useOptimistic=function(R,U){return P.H.useOptimistic(R,U)},ze.useReducer=function(R,U,G){return P.H.useReducer(R,U,G)},ze.useRef=function(R){return P.H.useRef(R)},ze.useState=function(R){return P.H.useState(R)},ze.useSyncExternalStore=function(R,U,G){return P.H.useSyncExternalStore(R,U,G)},ze.useTransition=function(){return P.H.useTransition()},ze.version="19.2.3",ze}var jg;function od(){return jg||(jg=1,Cc.exports=Px()),Cc.exports}var w=od();const ae=yp(w),Wx=Zx({__proto__:null,default:ae},[w]);var Rc={exports:{}},rs={},_c={exports:{}},Ec={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Cg;function ev(){return Cg||(Cg=1,(function(n){function r(T,$){var W=T.length;T.push($);e:for(;0<W;){var de=W-1>>>1,X=T[de];if(0<u(X,$))T[de]=$,T[W]=X,W=de;else break e}}function s(T){return T.length===0?null:T[0]}function i(T){if(T.length===0)return null;var $=T[0],W=T.pop();if(W!==$){T[0]=W;e:for(var de=0,X=T.length,R=X>>>1;de<R;){var U=2*(de+1)-1,G=T[U],Z=U+1,te=T[Z];if(0>u(G,W))Z<X&&0>u(te,G)?(T[de]=te,T[Z]=W,de=Z):(T[de]=G,T[U]=W,de=U);else if(Z<X&&0>u(te,W))T[de]=te,T[Z]=W,de=Z;else break e}}return $}function u(T,$){var W=T.sortIndex-$.sortIndex;return W!==0?W:T.id-$.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var m=Date,y=m.now();n.unstable_now=function(){return m.now()-y}}var g=[],h=[],v=1,x=null,S=3,j=!1,C=!1,N=!1,M=!1,E=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function ee(T){for(var $=s(h);$!==null;){if($.callback===null)i(h);else if($.startTime<=T)i(h),$.sortIndex=$.expirationTime,r(g,$);else break;$=s(h)}}function le(T){if(N=!1,ee(T),!C)if(s(g)!==null)C=!0,I||(I=!0,oe());else{var $=s(h);$!==null&&J(le,$.startTime-T)}}var I=!1,P=-1,q=5,se=-1;function re(){return M?!0:!(n.unstable_now()-se<q)}function Q(){if(M=!1,I){var T=n.unstable_now();se=T;var $=!0;try{e:{C=!1,N&&(N=!1,L(P),P=-1),j=!0;var W=S;try{t:{for(ee(T),x=s(g);x!==null&&!(x.expirationTime>T&&re());){var de=x.callback;if(typeof de=="function"){x.callback=null,S=x.priorityLevel;var X=de(x.expirationTime<=T);if(T=n.unstable_now(),typeof X=="function"){x.callback=X,ee(T),$=!0;break t}x===s(g)&&i(g),ee(T)}else i(g);x=s(g)}if(x!==null)$=!0;else{var R=s(h);R!==null&&J(le,R.startTime-T),$=!1}}break e}finally{x=null,S=W,j=!1}$=void 0}}finally{$?oe():I=!1}}}var oe;if(typeof B=="function")oe=function(){B(Q)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,K=pe.port2;pe.port1.onmessage=Q,oe=function(){K.postMessage(null)}}else oe=function(){E(Q,0)};function J(T,$){P=E(function(){T(n.unstable_now())},$)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(T){T.callback=null},n.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<T?Math.floor(1e3/T):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(T){switch(S){case 1:case 2:case 3:var $=3;break;default:$=S}var W=S;S=$;try{return T()}finally{S=W}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(T,$){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var W=S;S=T;try{return $()}finally{S=W}},n.unstable_scheduleCallback=function(T,$,W){var de=n.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?de+W:de):W=de,T){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=W+X,T={id:v++,callback:$,priorityLevel:T,startTime:W,expirationTime:X,sortIndex:-1},W>de?(T.sortIndex=W,r(h,T),s(g)===null&&T===s(h)&&(N?(L(P),P=-1):N=!0,J(le,W-de))):(T.sortIndex=X,r(g,T),C||j||(C=!0,I||(I=!0,oe()))),T},n.unstable_shouldYield=re,n.unstable_wrapCallback=function(T){var $=S;return function(){var W=S;S=$;try{return T.apply(this,arguments)}finally{S=W}}}})(Ec)),Ec}var Rg;function tv(){return Rg||(Rg=1,_c.exports=ev()),_c.exports}var Mc={exports:{}},kt={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var _g;function nv(){if(_g)return kt;_g=1;var n=od();function r(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+g+"; visit "+h+" 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(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(g,h,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:x==null?null:""+x,children:g,containerInfo:h,implementation:v}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,kt.createPortal=function(g,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return f(g,h,null,v)},kt.flushSync=function(g){var h=m.T,v=i.p;try{if(m.T=null,i.p=2,g)return g()}finally{m.T=h,i.p=v,i.d.f()}},kt.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(g,h))},kt.prefetchDNS=function(g){typeof g=="string"&&i.d.D(g)},kt.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var v=h.as,x=y(v,h.crossOrigin),S=typeof h.integrity=="string"?h.integrity:void 0,j=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?i.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:j}):v==="script"&&i.d.X(g,{crossOrigin:x,integrity:S,fetchPriority:j,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},kt.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=y(h.as,h.crossOrigin);i.d.M(g,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(g)},kt.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,x=y(v,h.crossOrigin);i.d.L(g,v,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},kt.preloadModule=function(g,h){if(typeof g=="string")if(h){var v=y(h.as,h.crossOrigin);i.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(g)},kt.requestFormReset=function(g){i.d.r(g)},kt.unstable_batchedUpdates=function(g,h){return g(h)},kt.useFormState=function(g,h,v){return m.H.useFormState(g,h,v)},kt.useFormStatus=function(){return m.H.useHostTransitionStatus()},kt.version="19.2.3",kt}var Eg;function xp(){if(Eg)return Mc.exports;Eg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Mc.exports=nv(),Mc.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Mg;function av(){if(Mg)return rs;Mg=1;var n=tv(),r=od(),s=xp();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(i(188))}function h(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var d=o.alternate;if(d===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===d.child){for(d=o.child;d;){if(d===a)return g(o),e;if(d===l)return g(o),t;d=d.sibling}throw Error(i(188))}if(a.return!==l.return)a=o,l=d;else{for(var p=!1,b=o.child;b;){if(b===a){p=!0,a=o,l=d;break}if(b===l){p=!0,l=o,a=d;break}b=b.sibling}if(!p){for(b=d.child;b;){if(b===a){p=!0,a=d,l=o;break}if(b===l){p=!0,l=d,a=o;break}b=b.sibling}if(!p)throw Error(i(189))}}if(a.alternate!==l)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,S=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),B=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Symbol.for("react.client.reference");function K(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case E:return"Profiler";case M:return"StrictMode";case le:return"Suspense";case I:return"SuspenseList";case se:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case B:return e.displayName||"Context";case L:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:K(e.type)||"Memo";case q:t=e._payload,e=e._init;try{return K(e(t))}catch{}}return null}var J=Array.isArray,T=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},de=[],X=-1;function R(e){return{current:e}}function U(e){0>X||(e.current=de[X],de[X]=null,X--)}function G(e,t){X++,de[X]=e.current,e.current=t}var Z=R(null),te=R(null),ie=R(null),je=R(null);function _e(e,t){switch(G(ie,t),G(te,e),G(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Fh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Fh(t),e=Yh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(Z),G(Z,e)}function be(){U(Z),U(te),U(ie)}function wt(e){e.memoizedState!==null&&G(je,e);var t=Z.current,a=Yh(t,e.type);t!==a&&(G(te,e),G(Z,a))}function xt(e){te.current===e&&(U(Z),U(te)),je.current===e&&(U(je),es._currentValue=W)}var gt,on;function st(e){if(gt===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);gt=t&&t[1]||"",on=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+gt+e+on}var Jt=!1;function un(e,t){if(!e||Jt)return"";Jt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(H){var O=H}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(H){O=H}e.call(Y.prototype)}}else{try{throw Error()}catch(H){O=H}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(H){if(H&&O&&typeof H.stack=="string")return[H.stack,O.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=l.DetermineComponentFrameRoot(),p=d[0],b=d[1];if(p&&b){var _=p.split(`
44
+ `),D=b.split(`
45
+ `);for(o=l=0;l<_.length&&!_[l].includes("DetermineComponentFrameRoot");)l++;for(;o<D.length&&!D[o].includes("DetermineComponentFrameRoot");)o++;if(l===_.length||o===D.length)for(l=_.length-1,o=D.length-1;1<=l&&0<=o&&_[l]!==D[o];)o--;for(;1<=l&&0<=o;l--,o--)if(_[l]!==D[o]){if(l!==1||o!==1)do if(l--,o--,0>o||_[l]!==D[o]){var V=`
46
+ `+_[l].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=l&&0<=o);break}}}finally{Jt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?st(a):""}function he(e,t){switch(e.tag){case 26:case 27:case 5:return st(e.type);case 16:return st("Lazy");case 13:return e.child!==t&&t!==null?st("Suspense Fallback"):st("Suspense");case 19:return st("SuspenseList");case 0:case 15:return un(e.type,!1);case 11:return un(e.type.render,!1);case 1:return un(e.type,!0);case 31:return st("Activity");default:return""}}function Te(e){try{var t="",a=null;do t+=he(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
47
+ Error generating stack: `+l.message+`
48
+ `+l.stack}}var Ne=Object.prototype.hasOwnProperty,ne=n.unstable_scheduleCallback,Se=n.unstable_cancelCallback,ue=n.unstable_shouldYield,Be=n.unstable_requestPaint,Le=n.unstable_now,Nt=n.unstable_getCurrentPriorityLevel,jt=n.unstable_ImmediatePriority,qn=n.unstable_UserBlockingPriority,Za=n.unstable_NormalPriority,mr=n.unstable_LowPriority,Fn=n.unstable_IdlePriority,js=n.log,ga=n.unstable_setDisableYieldValue,Ja=null,Ot=null;function Sn(e){if(typeof js=="function"&&ga(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(Ja,e)}catch{}}var Tt=Math.clz32?Math.clz32:zn,mo=Math.log,hr=Math.LN2;function zn(e){return e>>>=0,e===0?32:31-(mo(e)/hr|0)|0}var vl=256,bl=262144,Ia=4194304;function kn(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ee(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,d=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var b=l&134217727;return b!==0?(l=b&~d,l!==0?o=kn(l):(p&=b,p!==0?o=kn(p):a||(a=b&~e,a!==0&&(o=kn(a))))):(b=l&~d,b!==0?o=kn(b):p!==0?o=kn(p):a||(a=l&~e,a!==0&&(o=kn(a)))),o===0?0:t!==0&&t!==o&&(t&d)===0&&(d=o&-o,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:o}function nt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 e=Ia;return Ia<<=1,(Ia&62914560)===0&&(Ia=4194304),e}function pa(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function rt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Lt(e,t,a,l,o,d){var p=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var b=e.entanglements,_=e.expirationTimes,D=e.hiddenUpdates;for(a=p&~a;0<a;){var V=31-Tt(a),Y=1<<V;b[V]=0,_[V]=-1;var O=D[V];if(O!==null)for(D[V]=null,V=0;V<O.length;V++){var H=O[V];H!==null&&(H.lane&=-536870913)}a&=~Y}l!==0&&Pa(e,l,0),d!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=d&~(p&~t))}function Pa(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Tt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Ut(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Tt(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function $t(e,t){var a=t&-t;return a=(a&42)!==0?1:Sl(a),(a&(e.suspendedLanes|t))!==0?0:a}function Sl(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function wn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ho(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:hg(e.type))}function Md(e,t){var a=$.p;try{return $.p=e,t()}finally{$.p=a}}var ya=Math.random().toString(36).slice(2),Ct="__reactFiber$"+ya,Vt="__reactProps$"+ya,wl="__reactContainer$"+ya,go="__reactEvents$"+ya,L0="__reactListeners$"+ya,U0="__reactHandles$"+ya,Td="__reactResources$"+ya,gr="__reactMarker$"+ya;function po(e){delete e[Ct],delete e[Vt],delete e[go],delete e[L0],delete e[U0]}function Nl(e){var t=e[Ct];if(t)return t;for(var a=e.parentNode;a;){if(t=a[wl]||a[Ct]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Ph(e);e!==null;){if(a=e[Ct])return a;e=Ph(e)}return t}e=a,a=e.parentNode}return null}function jl(e){if(e=e[Ct]||e[wl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Cl(e){var t=e[Td];return t||(t=e[Td]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[gr]=!0}var zd=new Set,kd={};function Wa(e,t){Rl(e,t),Rl(e+"Capture",t)}function Rl(e,t){for(kd[e]=t,e=0;e<t.length;e++)zd.add(t[e])}var $0=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]*$"),Ad={},Dd={};function V0(e){return Ne.call(Dd,e)?!0:Ne.call(Ad,e)?!1:$0.test(e)?Dd[e]=!0:(Ad[e]=!0,!1)}function Cs(e,t,a){if(V0(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Rs(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Yn(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function cn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Od(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function G0(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,d=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){a=""+p,d.call(this,p)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(p){a=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yo(e){if(!e._valueTracker){var t=Od(e)?"checked":"value";e._valueTracker=G0(e,t,""+e[t])}}function Hd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Od(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function _s(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var q0=/[\n"\\]/g;function dn(e){return e.replace(q0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xo(e,t,a,l,o,d,p,b){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+cn(t)):e.value!==""+cn(t)&&(e.value=""+cn(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?vo(e,p,cn(t)):a!=null?vo(e,p,cn(a)):l!=null&&e.removeAttribute("value"),o==null&&d!=null&&(e.defaultChecked=!!d),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+cn(b):e.removeAttribute("name")}function Bd(e,t,a,l,o,d,p,b){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){yo(e);return}a=a!=null?""+cn(a):"",t=t!=null?""+cn(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=b?e.checked:!!l,e.defaultChecked=!!l,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),yo(e)}function vo(e,t,a){t==="number"&&_s(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function _l(e,t,a,l){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&l&&(e[a].defaultSelected=!0)}else{for(a=""+cn(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ld(e,t,a){if(t!=null&&(t=""+cn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+cn(a):""}function Ud(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(i(92));if(J(l)){if(1<l.length)throw Error(i(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=cn(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),yo(e)}function El(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var F0=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 $d(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||F0.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Vd(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&$d(e,o,l)}else for(var d in t)t.hasOwnProperty(d)&&$d(e,d,t[d])}function bo(e){if(e.indexOf("-")===-1)return!1;switch(e){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 Y0=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"]]),K0=/^[\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 Es(e){return K0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kn(){}var So=null;function wo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ml=null,Tl=null;function Gd(e){var t=jl(e);if(t&&(e=t.stateNode)){var a=e[Vt]||null;e:switch(e=t.stateNode,t.type){case"input":if(xo(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+dn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[Vt]||null;if(!o)throw Error(i(90));xo(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Hd(l)}break e;case"textarea":Ld(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&_l(e,!!a.multiple,t,!1)}}}var No=!1;function qd(e,t,a){if(No)return e(t,a);No=!0;try{var l=e(t);return l}finally{if(No=!1,(Ml!==null||Tl!==null)&&(gi(),Ml&&(t=Ml,e=Tl,Tl=Ml=null,Gd(t),e)))for(t=0;t<e.length;t++)Gd(e[t])}}function yr(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Vt]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jo=!1;if(Xn)try{var xr={};Object.defineProperty(xr,"passive",{get:function(){jo=!0}}),window.addEventListener("test",xr,xr),window.removeEventListener("test",xr,xr)}catch{jo=!1}var xa=null,Co=null,Ms=null;function Fd(){if(Ms)return Ms;var e,t=Co,a=t.length,l,o="value"in xa?xa.value:xa.textContent,d=o.length;for(e=0;e<a&&t[e]===o[e];e++);var p=a-e;for(l=1;l<=p&&t[a-l]===o[d-l];l++);return Ms=o.slice(e,1<l?1-l:void 0)}function Ts(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zs(){return!0}function Yd(){return!1}function Gt(e){function t(a,l,o,d,p){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=d,this.target=p,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(d):d[b]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?zs:Yd,this.isPropagationStopped=Yd,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=zs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=zs)},persist:function(){},isPersistent:zs}),t}var el={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ks=Gt(el),vr=x({},el,{view:0,detail:0}),X0=Gt(vr),Ro,_o,br,As=x({},vr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==br&&(br&&e.type==="mousemove"?(Ro=e.screenX-br.screenX,_o=e.screenY-br.screenY):_o=Ro=0,br=e),Ro)},movementY:function(e){return"movementY"in e?e.movementY:_o}}),Kd=Gt(As),Q0=x({},As,{dataTransfer:0}),Z0=Gt(Q0),J0=x({},vr,{relatedTarget:0}),Eo=Gt(J0),I0=x({},el,{animationName:0,elapsedTime:0,pseudoElement:0}),P0=Gt(I0),W0=x({},el,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ey=Gt(W0),ty=x({},el,{data:0}),Xd=Gt(ty),ny={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ay={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"},ly={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ry(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ly[e])?!!t[e]:!1}function Mo(){return ry}var sy=x({},vr,{key:function(e){if(e.key){var t=ny[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ts(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ay[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mo,charCode:function(e){return e.type==="keypress"?Ts(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ts(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iy=Gt(sy),oy=x({},As,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qd=Gt(oy),uy=x({},vr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mo}),cy=Gt(uy),dy=x({},el,{propertyName:0,elapsedTime:0,pseudoElement:0}),fy=Gt(dy),my=x({},As,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),hy=Gt(my),gy=x({},el,{newState:0,oldState:0}),py=Gt(gy),yy=[9,13,27,32],To=Xn&&"CompositionEvent"in window,Sr=null;Xn&&"documentMode"in document&&(Sr=document.documentMode);var xy=Xn&&"TextEvent"in window&&!Sr,Zd=Xn&&(!To||Sr&&8<Sr&&11>=Sr),Jd=" ",Id=!1;function Pd(e,t){switch(e){case"keyup":return yy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zl=!1;function vy(e,t){switch(e){case"compositionend":return Wd(t);case"keypress":return t.which!==32?null:(Id=!0,Jd);case"textInput":return e=t.data,e===Jd&&Id?null:e;default:return null}}function by(e,t){if(zl)return e==="compositionend"||!To&&Pd(e,t)?(e=Fd(),Ms=Co=xa=null,zl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zd&&t.locale!=="ko"?null:t.data;default:return null}}var Sy={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 ef(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Sy[e.type]:t==="textarea"}function tf(e,t,a,l){Ml?Tl?Tl.push(l):Tl=[l]:Ml=l,t=wi(t,"onChange"),0<t.length&&(a=new ks("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var wr=null,Nr=null;function wy(e){Lh(e,0)}function Ds(e){var t=pr(e);if(Hd(t))return e}function nf(e,t){if(e==="change")return t}var af=!1;if(Xn){var zo;if(Xn){var ko="oninput"in document;if(!ko){var lf=document.createElement("div");lf.setAttribute("oninput","return;"),ko=typeof lf.oninput=="function"}zo=ko}else zo=!1;af=zo&&(!document.documentMode||9<document.documentMode)}function rf(){wr&&(wr.detachEvent("onpropertychange",sf),Nr=wr=null)}function sf(e){if(e.propertyName==="value"&&Ds(Nr)){var t=[];tf(t,Nr,e,wo(e)),qd(wy,t)}}function Ny(e,t,a){e==="focusin"?(rf(),wr=t,Nr=a,wr.attachEvent("onpropertychange",sf)):e==="focusout"&&rf()}function jy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ds(Nr)}function Cy(e,t){if(e==="click")return Ds(t)}function Ry(e,t){if(e==="input"||e==="change")return Ds(t)}function _y(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var It=typeof Object.is=="function"?Object.is:_y;function jr(e,t){if(It(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!Ne.call(t,o)||!It(e[o],t[o]))return!1}return!0}function of(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uf(e,t){var a=of(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=of(a)}}function cf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function df(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=_s(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=_s(e.document)}return t}function Ao(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Ey=Xn&&"documentMode"in document&&11>=document.documentMode,kl=null,Do=null,Cr=null,Oo=!1;function ff(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Oo||kl==null||kl!==_s(l)||(l=kl,"selectionStart"in l&&Ao(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Cr&&jr(Cr,l)||(Cr=l,l=wi(Do,"onSelect"),0<l.length&&(t=new ks("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=kl)))}function tl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Al={animationend:tl("Animation","AnimationEnd"),animationiteration:tl("Animation","AnimationIteration"),animationstart:tl("Animation","AnimationStart"),transitionrun:tl("Transition","TransitionRun"),transitionstart:tl("Transition","TransitionStart"),transitioncancel:tl("Transition","TransitionCancel"),transitionend:tl("Transition","TransitionEnd")},Ho={},mf={};Xn&&(mf=document.createElement("div").style,"AnimationEvent"in window||(delete Al.animationend.animation,delete Al.animationiteration.animation,delete Al.animationstart.animation),"TransitionEvent"in window||delete Al.transitionend.transition);function nl(e){if(Ho[e])return Ho[e];if(!Al[e])return e;var t=Al[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in mf)return Ho[e]=t[a];return e}var hf=nl("animationend"),gf=nl("animationiteration"),pf=nl("animationstart"),My=nl("transitionrun"),Ty=nl("transitionstart"),zy=nl("transitioncancel"),yf=nl("transitionend"),xf=new Map,Bo="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(" ");Bo.push("scrollEnd");function Nn(e,t){xf.set(e,t),Wa(t,[e])}var Os=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},fn=[],Dl=0,Lo=0;function Hs(){for(var e=Dl,t=Lo=Dl=0;t<e;){var a=fn[t];fn[t++]=null;var l=fn[t];fn[t++]=null;var o=fn[t];fn[t++]=null;var d=fn[t];if(fn[t++]=null,l!==null&&o!==null){var p=l.pending;p===null?o.next=o:(o.next=p.next,p.next=o),l.pending=o}d!==0&&vf(a,o,d)}}function Bs(e,t,a,l){fn[Dl++]=e,fn[Dl++]=t,fn[Dl++]=a,fn[Dl++]=l,Lo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Uo(e,t,a,l){return Bs(e,t,a,l),Ls(e)}function al(e,t){return Bs(e,null,null,t),Ls(e)}function vf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,d=e.return;d!==null;)d.childLanes|=a,l=d.alternate,l!==null&&(l.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(o=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,o&&t!==null&&(o=31-Tt(a),e=d.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),d):null}function Ls(e){if(50<Xr)throw Xr=0,Qu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ol={};function ky(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(e,t,a,l){return new ky(e,t,a,l)}function $o(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qn(e,t){var a=e.alternate;return a===null?(a=Pt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function bf(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Us(e,t,a,l,o,d){var p=0;if(l=e,typeof e=="function")$o(e)&&(p=1);else if(typeof e=="string")p=Bx(e,a,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case se:return e=Pt(31,a,t,o),e.elementType=se,e.lanes=d,e;case N:return ll(a.children,o,d,t);case M:p=8,o|=24;break;case E:return e=Pt(12,a,t,o|2),e.elementType=E,e.lanes=d,e;case le:return e=Pt(13,a,t,o),e.elementType=le,e.lanes=d,e;case I:return e=Pt(19,a,t,o),e.elementType=I,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:p=10;break e;case L:p=9;break e;case ee:p=11;break e;case P:p=14;break e;case q:p=16,l=null;break e}p=29,a=Error(i(130,e===null?"null":typeof e,"")),l=null}return t=Pt(p,a,t,o),t.elementType=e,t.type=l,t.lanes=d,t}function ll(e,t,a,l){return e=Pt(7,e,l,t),e.lanes=a,e}function Vo(e,t,a){return e=Pt(6,e,null,t),e.lanes=a,e}function Sf(e){var t=Pt(18,null,null,0);return t.stateNode=e,t}function Go(e,t,a){return t=Pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wf=new WeakMap;function mn(e,t){if(typeof e=="object"&&e!==null){var a=wf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Te(t)},wf.set(e,t),t)}return{value:e,source:t,stack:Te(t)}}var Hl=[],Bl=0,$s=null,Rr=0,hn=[],gn=0,va=null,An=1,Dn="";function Zn(e,t){Hl[Bl++]=Rr,Hl[Bl++]=$s,$s=e,Rr=t}function Nf(e,t,a){hn[gn++]=An,hn[gn++]=Dn,hn[gn++]=va,va=e;var l=An;e=Dn;var o=32-Tt(l)-1;l&=~(1<<o),a+=1;var d=32-Tt(t)+o;if(30<d){var p=o-o%5;d=(l&(1<<p)-1).toString(32),l>>=p,o-=p,An=1<<32-Tt(t)+o|a<<o|l,Dn=d+e}else An=1<<d|a<<o|l,Dn=e}function qo(e){e.return!==null&&(Zn(e,1),Nf(e,1,0))}function Fo(e){for(;e===$s;)$s=Hl[--Bl],Hl[Bl]=null,Rr=Hl[--Bl],Hl[Bl]=null;for(;e===va;)va=hn[--gn],hn[gn]=null,Dn=hn[--gn],hn[gn]=null,An=hn[--gn],hn[gn]=null}function jf(e,t){hn[gn++]=An,hn[gn++]=Dn,hn[gn++]=va,An=t.id,Dn=t.overflow,va=e}var Rt=null,We=null,Ve=!1,ba=null,pn=!1,Yo=Error(i(519));function Sa(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _r(mn(t,e)),Yo}function Cf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Ct]=e,t[Vt]=l,a){case"dialog":He("cancel",t),He("close",t);break;case"iframe":case"object":case"embed":He("load",t);break;case"video":case"audio":for(a=0;a<Zr.length;a++)He(Zr[a],t);break;case"source":He("error",t);break;case"img":case"image":case"link":He("error",t),He("load",t);break;case"details":He("toggle",t);break;case"input":He("invalid",t),Bd(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":He("invalid",t);break;case"textarea":He("invalid",t),Ud(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Gh(t.textContent,a)?(l.popover!=null&&(He("beforetoggle",t),He("toggle",t)),l.onScroll!=null&&He("scroll",t),l.onScrollEnd!=null&&He("scrollend",t),l.onClick!=null&&(t.onclick=Kn),t=!0):t=!1,t||Sa(e,!0)}function Rf(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:pn=!1;return;case 27:case 3:pn=!0;return;default:Rt=Rt.return}}function Ll(e){if(e!==Rt)return!1;if(!Ve)return Rf(e),Ve=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||uc(e.type,e.memoizedProps)),a=!a),a&&We&&Sa(e),Rf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));We=Ih(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));We=Ih(e)}else t===27?(t=We,Oa(e.type)?(e=hc,hc=null,We=e):We=t):We=Rt?xn(e.stateNode.nextSibling):null;return!0}function rl(){We=Rt=null,Ve=!1}function Ko(){var e=ba;return e!==null&&(Kt===null?Kt=e:Kt.push.apply(Kt,e),ba=null),e}function _r(e){ba===null?ba=[e]:ba.push(e)}var Xo=R(null),sl=null,Jn=null;function wa(e,t,a){G(Xo,t._currentValue),t._currentValue=a}function In(e){e._currentValue=Xo.current,U(Xo)}function Qo(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Zo(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var d=o.dependencies;if(d!==null){var p=o.child;d=d.firstContext;e:for(;d!==null;){var b=d;d=o;for(var _=0;_<t.length;_++)if(b.context===t[_]){d.lanes|=a,b=d.alternate,b!==null&&(b.lanes|=a),Qo(d.return,a,e),l||(p=null);break e}d=b.next}}else if(o.tag===18){if(p=o.return,p===null)throw Error(i(341));p.lanes|=a,d=p.alternate,d!==null&&(d.lanes|=a),Qo(p,a,e),p=null}else p=o.child;if(p!==null)p.return=o;else for(p=o;p!==null;){if(p===e){p=null;break}if(o=p.sibling,o!==null){o.return=p.return,p=o;break}p=p.return}o=p}}function Ul(e,t,a,l){e=null;for(var o=t,d=!1;o!==null;){if(!d){if((o.flags&524288)!==0)d=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var p=o.alternate;if(p===null)throw Error(i(387));if(p=p.memoizedProps,p!==null){var b=o.type;It(o.pendingProps.value,p.value)||(e!==null?e.push(b):e=[b])}}else if(o===je.current){if(p=o.alternate,p===null)throw Error(i(387));p.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(es):e=[es])}o=o.return}e!==null&&Zo(t,e,a,l),t.flags|=262144}function Vs(e){for(e=e.firstContext;e!==null;){if(!It(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function il(e){sl=e,Jn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return _f(sl,e)}function Gs(e,t){return sl===null&&il(e),_f(e,t)}function _f(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Jn===null){if(e===null)throw Error(i(308));Jn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jn=Jn.next=t;return a}var Ay=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Dy=n.unstable_scheduleCallback,Oy=n.unstable_NormalPriority,dt={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jo(){return{controller:new Ay,data:new Map,refCount:0}}function Er(e){e.refCount--,e.refCount===0&&Dy(Oy,function(){e.controller.abort()})}var Mr=null,Io=0,$l=0,Vl=null;function Hy(e,t){if(Mr===null){var a=Mr=[];Io=0,$l=ec(),Vl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Io++,t.then(Ef,Ef),t}function Ef(){if(--Io===0&&Mr!==null){Vl!==null&&(Vl.status="fulfilled");var e=Mr;Mr=null,$l=0,Vl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function By(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var Mf=T.S;T.S=function(e,t){fh=Le(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Hy(e,t),Mf!==null&&Mf(e,t)};var ol=R(null);function Po(){var e=ol.current;return e!==null?e:Ie.pooledCache}function qs(e,t){t===null?G(ol,ol.current):G(ol,t.pool)}function Tf(){var e=Po();return e===null?null:{parent:dt._currentValue,pool:e}}var Gl=Error(i(460)),Wo=Error(i(474)),Fs=Error(i(542)),Ys={then:function(){}};function zf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function kf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Kn,Kn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Df(e),e;default:if(typeof t.status=="string")t.then(Kn,Kn);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Df(e),e}throw cl=t,Gl}}function ul(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(cl=a,Gl):a}}var cl=null;function Af(){if(cl===null)throw Error(i(459));var e=cl;return cl=null,e}function Df(e){if(e===Gl||e===Fs)throw Error(i(483))}var ql=null,Tr=0;function Ks(e){var t=Tr;return Tr+=1,ql===null&&(ql=[]),kf(ql,e,t)}function zr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xs(e,t){throw t.$$typeof===S?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Of(e){function t(k,z){if(e){var A=k.deletions;A===null?(k.deletions=[z],k.flags|=16):A.push(z)}}function a(k,z){if(!e)return null;for(;z!==null;)t(k,z),z=z.sibling;return null}function l(k){for(var z=new Map;k!==null;)k.key!==null?z.set(k.key,k):z.set(k.index,k),k=k.sibling;return z}function o(k,z){return k=Qn(k,z),k.index=0,k.sibling=null,k}function d(k,z,A){return k.index=A,e?(A=k.alternate,A!==null?(A=A.index,A<z?(k.flags|=67108866,z):A):(k.flags|=67108866,z)):(k.flags|=1048576,z)}function p(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function b(k,z,A,F){return z===null||z.tag!==6?(z=Vo(A,k.mode,F),z.return=k,z):(z=o(z,A),z.return=k,z)}function _(k,z,A,F){var ve=A.type;return ve===N?V(k,z,A.props.children,F,A.key):z!==null&&(z.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===q&&ul(ve)===z.type)?(z=o(z,A.props),zr(z,A),z.return=k,z):(z=Us(A.type,A.key,A.props,null,k.mode,F),zr(z,A),z.return=k,z)}function D(k,z,A,F){return z===null||z.tag!==4||z.stateNode.containerInfo!==A.containerInfo||z.stateNode.implementation!==A.implementation?(z=Go(A,k.mode,F),z.return=k,z):(z=o(z,A.children||[]),z.return=k,z)}function V(k,z,A,F,ve){return z===null||z.tag!==7?(z=ll(A,k.mode,F,ve),z.return=k,z):(z=o(z,A),z.return=k,z)}function Y(k,z,A){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Vo(""+z,k.mode,A),z.return=k,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case j:return A=Us(z.type,z.key,z.props,null,k.mode,A),zr(A,z),A.return=k,A;case C:return z=Go(z,k.mode,A),z.return=k,z;case q:return z=ul(z),Y(k,z,A)}if(J(z)||oe(z))return z=ll(z,k.mode,A,null),z.return=k,z;if(typeof z.then=="function")return Y(k,Ks(z),A);if(z.$$typeof===B)return Y(k,Gs(k,z),A);Xs(k,z)}return null}function O(k,z,A,F){var ve=z!==null?z.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ve!==null?null:b(k,z,""+A,F);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case j:return A.key===ve?_(k,z,A,F):null;case C:return A.key===ve?D(k,z,A,F):null;case q:return A=ul(A),O(k,z,A,F)}if(J(A)||oe(A))return ve!==null?null:V(k,z,A,F,null);if(typeof A.then=="function")return O(k,z,Ks(A),F);if(A.$$typeof===B)return O(k,z,Gs(k,A),F);Xs(k,A)}return null}function H(k,z,A,F,ve){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return k=k.get(A)||null,b(z,k,""+F,ve);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case j:return k=k.get(F.key===null?A:F.key)||null,_(z,k,F,ve);case C:return k=k.get(F.key===null?A:F.key)||null,D(z,k,F,ve);case q:return F=ul(F),H(k,z,A,F,ve)}if(J(F)||oe(F))return k=k.get(A)||null,V(z,k,F,ve,null);if(typeof F.then=="function")return H(k,z,A,Ks(F),ve);if(F.$$typeof===B)return H(k,z,A,Gs(z,F),ve);Xs(z,F)}return null}function me(k,z,A,F){for(var ve=null,Ge=null,ge=z,Ae=z=0,$e=null;ge!==null&&Ae<A.length;Ae++){ge.index>Ae?($e=ge,ge=null):$e=ge.sibling;var qe=O(k,ge,A[Ae],F);if(qe===null){ge===null&&(ge=$e);break}e&&ge&&qe.alternate===null&&t(k,ge),z=d(qe,z,Ae),Ge===null?ve=qe:Ge.sibling=qe,Ge=qe,ge=$e}if(Ae===A.length)return a(k,ge),Ve&&Zn(k,Ae),ve;if(ge===null){for(;Ae<A.length;Ae++)ge=Y(k,A[Ae],F),ge!==null&&(z=d(ge,z,Ae),Ge===null?ve=ge:Ge.sibling=ge,Ge=ge);return Ve&&Zn(k,Ae),ve}for(ge=l(ge);Ae<A.length;Ae++)$e=H(ge,k,Ae,A[Ae],F),$e!==null&&(e&&$e.alternate!==null&&ge.delete($e.key===null?Ae:$e.key),z=d($e,z,Ae),Ge===null?ve=$e:Ge.sibling=$e,Ge=$e);return e&&ge.forEach(function($a){return t(k,$a)}),Ve&&Zn(k,Ae),ve}function we(k,z,A,F){if(A==null)throw Error(i(151));for(var ve=null,Ge=null,ge=z,Ae=z=0,$e=null,qe=A.next();ge!==null&&!qe.done;Ae++,qe=A.next()){ge.index>Ae?($e=ge,ge=null):$e=ge.sibling;var $a=O(k,ge,qe.value,F);if($a===null){ge===null&&(ge=$e);break}e&&ge&&$a.alternate===null&&t(k,ge),z=d($a,z,Ae),Ge===null?ve=$a:Ge.sibling=$a,Ge=$a,ge=$e}if(qe.done)return a(k,ge),Ve&&Zn(k,Ae),ve;if(ge===null){for(;!qe.done;Ae++,qe=A.next())qe=Y(k,qe.value,F),qe!==null&&(z=d(qe,z,Ae),Ge===null?ve=qe:Ge.sibling=qe,Ge=qe);return Ve&&Zn(k,Ae),ve}for(ge=l(ge);!qe.done;Ae++,qe=A.next())qe=H(ge,k,Ae,qe.value,F),qe!==null&&(e&&qe.alternate!==null&&ge.delete(qe.key===null?Ae:qe.key),z=d(qe,z,Ae),Ge===null?ve=qe:Ge.sibling=qe,Ge=qe);return e&&ge.forEach(function(Qx){return t(k,Qx)}),Ve&&Zn(k,Ae),ve}function Ze(k,z,A,F){if(typeof A=="object"&&A!==null&&A.type===N&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case j:e:{for(var ve=A.key;z!==null;){if(z.key===ve){if(ve=A.type,ve===N){if(z.tag===7){a(k,z.sibling),F=o(z,A.props.children),F.return=k,k=F;break e}}else if(z.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===q&&ul(ve)===z.type){a(k,z.sibling),F=o(z,A.props),zr(F,A),F.return=k,k=F;break e}a(k,z);break}else t(k,z);z=z.sibling}A.type===N?(F=ll(A.props.children,k.mode,F,A.key),F.return=k,k=F):(F=Us(A.type,A.key,A.props,null,k.mode,F),zr(F,A),F.return=k,k=F)}return p(k);case C:e:{for(ve=A.key;z!==null;){if(z.key===ve)if(z.tag===4&&z.stateNode.containerInfo===A.containerInfo&&z.stateNode.implementation===A.implementation){a(k,z.sibling),F=o(z,A.children||[]),F.return=k,k=F;break e}else{a(k,z);break}else t(k,z);z=z.sibling}F=Go(A,k.mode,F),F.return=k,k=F}return p(k);case q:return A=ul(A),Ze(k,z,A,F)}if(J(A))return me(k,z,A,F);if(oe(A)){if(ve=oe(A),typeof ve!="function")throw Error(i(150));return A=ve.call(A),we(k,z,A,F)}if(typeof A.then=="function")return Ze(k,z,Ks(A),F);if(A.$$typeof===B)return Ze(k,z,Gs(k,A),F);Xs(k,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,z!==null&&z.tag===6?(a(k,z.sibling),F=o(z,A),F.return=k,k=F):(a(k,z),F=Vo(A,k.mode,F),F.return=k,k=F),p(k)):a(k,z)}return function(k,z,A,F){try{Tr=0;var ve=Ze(k,z,A,F);return ql=null,ve}catch(ge){if(ge===Gl||ge===Fs)throw ge;var Ge=Pt(29,ge,null,k.mode);return Ge.lanes=F,Ge.return=k,Ge}finally{}}}var dl=Of(!0),Hf=Of(!1),Na=!1;function eu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ca(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Fe&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=Ls(e),vf(e,null,a),t}return Bs(e,l,t,a),Ls(e)}function kr(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Ut(e,a)}}function nu(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?o=d=p:d=d.next=p,a=a.next}while(a!==null);d===null?o=d=t:d=d.next=t}else o=d=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:d,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var au=!1;function Ar(){if(au){var e=Vl;if(e!==null)throw e}}function Dr(e,t,a,l){au=!1;var o=e.updateQueue;Na=!1;var d=o.firstBaseUpdate,p=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var _=b,D=_.next;_.next=null,p===null?d=D:p.next=D,p=_;var V=e.alternate;V!==null&&(V=V.updateQueue,b=V.lastBaseUpdate,b!==p&&(b===null?V.firstBaseUpdate=D:b.next=D,V.lastBaseUpdate=_))}if(d!==null){var Y=o.baseState;p=0,V=D=_=null,b=d;do{var O=b.lane&-536870913,H=O!==b.lane;if(H?(Ue&O)===O:(l&O)===O){O!==0&&O===$l&&(au=!0),V!==null&&(V=V.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var me=e,we=b;O=t;var Ze=a;switch(we.tag){case 1:if(me=we.payload,typeof me=="function"){Y=me.call(Ze,Y,O);break e}Y=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=we.payload,O=typeof me=="function"?me.call(Ze,Y,O):me,O==null)break e;Y=x({},Y,O);break e;case 2:Na=!0}}O=b.callback,O!==null&&(e.flags|=64,H&&(e.flags|=8192),H=o.callbacks,H===null?o.callbacks=[O]:H.push(O))}else H={lane:O,tag:b.tag,payload:b.payload,callback:b.callback,next:null},V===null?(D=V=H,_=Y):V=V.next=H,p|=O;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;H=b,b=H.next,H.next=null,o.lastBaseUpdate=H,o.shared.pending=null}}while(!0);V===null&&(_=Y),o.baseState=_,o.firstBaseUpdate=D,o.lastBaseUpdate=V,d===null&&(o.shared.lanes=0),Ta|=p,e.lanes=p,e.memoizedState=Y}}function Bf(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function Lf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Bf(a[e],t)}var Fl=R(null),Qs=R(0);function Uf(e,t){e=sa,G(Qs,e),G(Fl,t),sa=e|t.baseLanes}function lu(){G(Qs,sa),G(Fl,Fl.current)}function ru(){sa=Qs.current,U(Fl),U(Qs)}var Wt=R(null),yn=null;function Ra(e){var t=e.alternate;G(ut,ut.current&1),G(Wt,e),yn===null&&(t===null||Fl.current!==null||t.memoizedState!==null)&&(yn=e)}function su(e){G(ut,ut.current),G(Wt,e),yn===null&&(yn=e)}function $f(e){e.tag===22?(G(ut,ut.current),G(Wt,e),yn===null&&(yn=e)):_a()}function _a(){G(ut,ut.current),G(Wt,Wt.current)}function en(e){U(Wt),yn===e&&(yn=null),U(ut)}var ut=R(0);function Zs(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||fc(a)||mc(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pn=0,ke=null,Xe=null,ft=null,Js=!1,Yl=!1,fl=!1,Is=0,Or=0,Kl=null,Ly=0;function it(){throw Error(i(321))}function iu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!It(e[a],t[a]))return!1;return!0}function ou(e,t,a,l,o,d){return Pn=d,ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?Nm:Nu,fl=!1,d=a(l,o),fl=!1,Yl&&(d=Gf(t,a,l,o)),Vf(e),d}function Vf(e){T.H=Lr;var t=Xe!==null&&Xe.next!==null;if(Pn=0,ft=Xe=ke=null,Js=!1,Or=0,Kl=null,t)throw Error(i(300));e===null||mt||(e=e.dependencies,e!==null&&Vs(e)&&(mt=!0))}function Gf(e,t,a,l){ke=e;var o=0;do{if(Yl&&(Kl=null),Or=0,Yl=!1,25<=o)throw Error(i(301));if(o+=1,ft=Xe=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}T.H=jm,d=t(a,l)}while(Yl);return d}function Uy(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?Hr(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(ke.flags|=1024),t}function uu(){var e=Is!==0;return Is=0,e}function cu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function du(e){if(Js){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Js=!1}Pn=0,ft=Xe=ke=null,Yl=!1,Or=Is=0,Kl=null}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?ke.memoizedState=ft=e:ft=ft.next=e,ft}function ct(){if(Xe===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ft===null?ke.memoizedState:ft.next;if(t!==null)ft=t,Xe=e;else{if(e===null)throw ke.alternate===null?Error(i(467)):Error(i(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ft===null?ke.memoizedState=ft=e:ft=ft.next=e}return ft}function Ps(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hr(e){var t=Or;return Or+=1,Kl===null&&(Kl=[]),e=kf(Kl,e,t),t=ke,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?Nm:Nu),e}function Ws(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Hr(e);if(e.$$typeof===B)return _t(e)}throw Error(i(438,String(e)))}function fu(e){var t=null,a=ke.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ke.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ps(),ke.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=re;return t.index++,a}function Wn(e,t){return typeof t=="function"?t(e):t}function ei(e){var t=ct();return mu(t,Xe,e)}function mu(e,t,a){var l=e.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=a;var o=e.baseQueue,d=l.pending;if(d!==null){if(o!==null){var p=o.next;o.next=d.next,d.next=p}t.baseQueue=o=d,l.pending=null}if(d=e.baseState,o===null)e.memoizedState=d;else{t=o.next;var b=p=null,_=null,D=t,V=!1;do{var Y=D.lane&-536870913;if(Y!==D.lane?(Ue&Y)===Y:(Pn&Y)===Y){var O=D.revertLane;if(O===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),Y===$l&&(V=!0);else if((Pn&O)===O){D=D.next,O===$l&&(V=!0);continue}else Y={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},_===null?(b=_=Y,p=d):_=_.next=Y,ke.lanes|=O,Ta|=O;Y=D.action,fl&&a(d,Y),d=D.hasEagerState?D.eagerState:a(d,Y)}else O={lane:Y,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},_===null?(b=_=O,p=d):_=_.next=O,ke.lanes|=Y,Ta|=Y;D=D.next}while(D!==null&&D!==t);if(_===null?p=d:_.next=b,!It(d,e.memoizedState)&&(mt=!0,V&&(a=Vl,a!==null)))throw a;e.memoizedState=d,e.baseState=p,e.baseQueue=_,l.lastRenderedState=d}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function hu(e){var t=ct(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,d=t.memoizedState;if(o!==null){a.pending=null;var p=o=o.next;do d=e(d,p.action),p=p.next;while(p!==o);It(d,t.memoizedState)||(mt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,l]}function qf(e,t,a){var l=ke,o=ct(),d=Ve;if(d){if(a===void 0)throw Error(i(407));a=a()}else a=t();var p=!It((Xe||o).memoizedState,a);if(p&&(o.memoizedState=a,mt=!0),o=o.queue,yu(Kf.bind(null,l,o,e),[e]),o.getSnapshot!==t||p||ft!==null&&ft.memoizedState.tag&1){if(l.flags|=2048,Xl(9,{destroy:void 0},Yf.bind(null,l,o,a,t),null),Ie===null)throw Error(i(349));d||(Pn&127)!==0||Ff(l,t,a)}return a}function Ff(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ke.updateQueue,t===null?(t=Ps(),ke.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Yf(e,t,a,l){t.value=a,t.getSnapshot=l,Xf(t)&&Qf(e)}function Kf(e,t,a){return a(function(){Xf(t)&&Qf(e)})}function Xf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!It(e,a)}catch{return!0}}function Qf(e){var t=al(e,2);t!==null&&Xt(t,e,2)}function gu(e){var t=Ht();if(typeof e=="function"){var a=e;if(e=a(),fl){Sn(!0);try{a()}finally{Sn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:e},t}function Zf(e,t,a,l){return e.baseState=a,mu(e,Xe,typeof l=="function"?l:Wn)}function $y(e,t,a,l,o){if(ai(e))throw Error(i(485));if(e=t.action,e!==null){var d={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){d.listeners.push(p)}};T.T!==null?a(!0):d.isTransition=!1,l(d),a=t.pending,a===null?(d.next=t.pending=d,Jf(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Jf(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var d=T.T,p={};T.T=p;try{var b=a(o,l),_=T.S;_!==null&&_(p,b),If(e,t,b)}catch(D){pu(e,t,D)}finally{d!==null&&p.types!==null&&(d.types=p.types),T.T=d}}else try{d=a(o,l),If(e,t,d)}catch(D){pu(e,t,D)}}function If(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Pf(e,t,l)},function(l){return pu(e,t,l)}):Pf(e,t,a)}function Pf(e,t,a){t.status="fulfilled",t.value=a,Wf(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Jf(e,a)))}function pu(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Wf(t),t=t.next;while(t!==l)}e.action=null}function Wf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function em(e,t){return t}function tm(e,t){if(Ve){var a=Ie.formState;if(a!==null){e:{var l=ke;if(Ve){if(We){t:{for(var o=We,d=pn;o.nodeType!==8;){if(!d){o=null;break t}if(o=xn(o.nextSibling),o===null){o=null;break t}}d=o.data,o=d==="F!"||d==="F"?o:null}if(o){We=xn(o.nextSibling),l=o.data==="F!";break e}}Sa(l)}l=!1}l&&(t=a[0])}}return a=Ht(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:em,lastRenderedState:t},a.queue=l,a=bm.bind(null,ke,l),l.dispatch=a,l=gu(!1),d=wu.bind(null,ke,!1,l.queue),l=Ht(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=$y.bind(null,ke,o,d,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function nm(e){var t=ct();return am(t,Xe,e)}function am(e,t,a){if(t=mu(e,t,em)[0],e=ei(Wn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Hr(t)}catch(p){throw p===Gl?Fs:p}else l=t;t=ct();var o=t.queue,d=o.dispatch;return a!==t.memoizedState&&(ke.flags|=2048,Xl(9,{destroy:void 0},Vy.bind(null,o,a),null)),[l,d,e]}function Vy(e,t){e.action=t}function lm(e){var t=ct(),a=Xe;if(a!==null)return am(t,a,e);ct(),t=t.memoizedState,a=ct();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Xl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ke.updateQueue,t===null&&(t=Ps(),ke.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function rm(){return ct().memoizedState}function ti(e,t,a,l){var o=Ht();ke.flags|=e,o.memoizedState=Xl(1|t,{destroy:void 0},a,l===void 0?null:l)}function ni(e,t,a,l){var o=ct();l=l===void 0?null:l;var d=o.memoizedState.inst;Xe!==null&&l!==null&&iu(l,Xe.memoizedState.deps)?o.memoizedState=Xl(t,d,a,l):(ke.flags|=e,o.memoizedState=Xl(1|t,d,a,l))}function sm(e,t){ti(8390656,8,e,t)}function yu(e,t){ni(2048,8,e,t)}function Gy(e){ke.flags|=4;var t=ke.updateQueue;if(t===null)t=Ps(),ke.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function im(e){var t=ct().memoizedState;return Gy({ref:t,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function om(e,t){return ni(4,2,e,t)}function um(e,t){return ni(4,4,e,t)}function cm(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dm(e,t,a){a=a!=null?a.concat([e]):null,ni(4,4,cm.bind(null,t,e),a)}function xu(){}function fm(e,t){var a=ct();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&iu(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function mm(e,t){var a=ct();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&iu(t,l[1]))return l[0];if(l=e(),fl){Sn(!0);try{e()}finally{Sn(!1)}}return a.memoizedState=[l,t],l}function vu(e,t,a){return a===void 0||(Pn&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=hh(),ke.lanes|=e,Ta|=e,a)}function hm(e,t,a,l){return It(a,t)?a:Fl.current!==null?(e=vu(e,a,l),It(e,t)||(mt=!0),e):(Pn&42)===0||(Pn&1073741824)!==0&&(Ue&261930)===0?(mt=!0,e.memoizedState=a):(e=hh(),ke.lanes|=e,Ta|=e,t)}function gm(e,t,a,l,o){var d=$.p;$.p=d!==0&&8>d?d:8;var p=T.T,b={};T.T=b,wu(e,!1,t,a);try{var _=o(),D=T.S;if(D!==null&&D(b,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var V=By(_,l);Br(e,t,V,an(e))}else Br(e,t,l,an(e))}catch(Y){Br(e,t,{then:function(){},status:"rejected",reason:Y},an())}finally{$.p=d,p!==null&&b.types!==null&&(p.types=b.types),T.T=p}}function qy(){}function bu(e,t,a,l){if(e.tag!==5)throw Error(i(476));var o=pm(e).queue;gm(e,o,t,W,a===null?qy:function(){return ym(e),a(l)})}function pm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:W},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ym(e){var t=pm(e);t.next===null&&(t=e.alternate.memoizedState),Br(e,t.next.queue,{},an())}function Su(){return _t(es)}function xm(){return ct().memoizedState}function vm(){return ct().memoizedState}function Fy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=an();e=ja(a);var l=Ca(t,e,a);l!==null&&(Xt(l,t,a),kr(l,t,a)),t={cache:Jo()},e.payload=t;return}t=t.return}}function Yy(e,t,a){var l=an();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ai(e)?Sm(t,a):(a=Uo(e,t,a,l),a!==null&&(Xt(a,e,l),wm(a,t,l)))}function bm(e,t,a){var l=an();Br(e,t,a,l)}function Br(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ai(e))Sm(t,o);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var p=t.lastRenderedState,b=d(p,a);if(o.hasEagerState=!0,o.eagerState=b,It(b,p))return Bs(e,t,o,0),Ie===null&&Hs(),!1}catch{}finally{}if(a=Uo(e,t,o,l),a!==null)return Xt(a,e,l),wm(a,t,l),!0}return!1}function wu(e,t,a,l){if(l={lane:2,revertLane:ec(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ai(e)){if(t)throw Error(i(479))}else t=Uo(e,a,l,2),t!==null&&Xt(t,e,2)}function ai(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function Sm(e,t){Yl=Js=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function wm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Ut(e,a)}}var Lr={readContext:_t,use:Ws,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};Lr.useEffectEvent=it;var Nm={readContext:_t,use:Ws,useCallback:function(e,t){return Ht().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:sm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ti(4194308,4,cm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ti(4194308,4,e,t)},useInsertionEffect:function(e,t){ti(4,2,e,t)},useMemo:function(e,t){var a=Ht();t=t===void 0?null:t;var l=e();if(fl){Sn(!0);try{e()}finally{Sn(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Ht();if(a!==void 0){var o=a(t);if(fl){Sn(!0);try{a(t)}finally{Sn(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=Yy.bind(null,ke,e),[l.memoizedState,e]},useRef:function(e){var t=Ht();return e={current:e},t.memoizedState=e},useState:function(e){e=gu(e);var t=e.queue,a=bm.bind(null,ke,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:xu,useDeferredValue:function(e,t){var a=Ht();return vu(a,e,t)},useTransition:function(){var e=gu(!1);return e=gm.bind(null,ke,e.queue,!0,!1),Ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ke,o=Ht();if(Ve){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),Ie===null)throw Error(i(349));(Ue&127)!==0||Ff(l,t,a)}o.memoizedState=a;var d={value:a,getSnapshot:t};return o.queue=d,sm(Kf.bind(null,l,d,e),[e]),l.flags|=2048,Xl(9,{destroy:void 0},Yf.bind(null,l,d,a,t),null),a},useId:function(){var e=Ht(),t=Ie.identifierPrefix;if(Ve){var a=Dn,l=An;a=(l&~(1<<32-Tt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Is++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ly++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Su,useFormState:tm,useActionState:tm,useOptimistic:function(e){var t=Ht();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=wu.bind(null,ke,!0,a),a.dispatch=t,[e,t]},useMemoCache:fu,useCacheRefresh:function(){return Ht().memoizedState=Fy.bind(null,ke)},useEffectEvent:function(e){var t=Ht(),a={impl:e};return t.memoizedState=a,function(){if((Fe&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Nu={readContext:_t,use:Ws,useCallback:fm,useContext:_t,useEffect:yu,useImperativeHandle:dm,useInsertionEffect:om,useLayoutEffect:um,useMemo:mm,useReducer:ei,useRef:rm,useState:function(){return ei(Wn)},useDebugValue:xu,useDeferredValue:function(e,t){var a=ct();return hm(a,Xe.memoizedState,e,t)},useTransition:function(){var e=ei(Wn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Hr(e),t]},useSyncExternalStore:qf,useId:xm,useHostTransitionStatus:Su,useFormState:nm,useActionState:nm,useOptimistic:function(e,t){var a=ct();return Zf(a,Xe,e,t)},useMemoCache:fu,useCacheRefresh:vm};Nu.useEffectEvent=im;var jm={readContext:_t,use:Ws,useCallback:fm,useContext:_t,useEffect:yu,useImperativeHandle:dm,useInsertionEffect:om,useLayoutEffect:um,useMemo:mm,useReducer:hu,useRef:rm,useState:function(){return hu(Wn)},useDebugValue:xu,useDeferredValue:function(e,t){var a=ct();return Xe===null?vu(a,e,t):hm(a,Xe.memoizedState,e,t)},useTransition:function(){var e=hu(Wn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Hr(e),t]},useSyncExternalStore:qf,useId:xm,useHostTransitionStatus:Su,useFormState:lm,useActionState:lm,useOptimistic:function(e,t){var a=ct();return Xe!==null?Zf(a,Xe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:fu,useCacheRefresh:vm};jm.useEffectEvent=im;function ju(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Cu={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=an(),o=ja(l);o.payload=t,a!=null&&(o.callback=a),t=Ca(e,o,l),t!==null&&(Xt(t,e,l),kr(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=an(),o=ja(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Ca(e,o,l),t!==null&&(Xt(t,e,l),kr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=an(),l=ja(a);l.tag=2,t!=null&&(l.callback=t),t=Ca(e,l,a),t!==null&&(Xt(t,e,a),kr(t,e,a))}};function Cm(e,t,a,l,o,d,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,d,p):t.prototype&&t.prototype.isPureReactComponent?!jr(a,l)||!jr(o,d):!0}function Rm(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Cu.enqueueReplaceState(t,t.state,null)}function ml(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function _m(e){Os(e)}function Em(e){console.error(e)}function Mm(e){Os(e)}function li(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Tm(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Ru(e,t,a){return a=ja(a),a.tag=3,a.payload={element:null},a.callback=function(){li(e,t)},a}function zm(e){return e=ja(e),e.tag=3,e}function km(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var d=l.value;e.payload=function(){return o(d)},e.callback=function(){Tm(t,a,l)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Tm(t,a,l),typeof o!="function"&&(za===null?za=new Set([this]):za.add(this));var b=l.stack;this.componentDidCatch(l.value,{componentStack:b!==null?b:""})})}function Ky(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Ul(t,a,o,!0),a=Wt.current,a!==null){switch(a.tag){case 31:case 13:return yn===null?pi():a.alternate===null&&ot===0&&(ot=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===Ys?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Iu(e,l,o)),!1;case 22:return a.flags|=65536,l===Ys?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Iu(e,l,o)),!1}throw Error(i(435,a.tag))}return Iu(e,l,o),pi(),!1}if(Ve)return t=Wt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Yo&&(e=Error(i(422),{cause:l}),_r(mn(e,a)))):(l!==Yo&&(t=Error(i(423),{cause:l}),_r(mn(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=mn(l,a),o=Ru(e.stateNode,l,o),nu(e,o),ot!==4&&(ot=2)),!1;var d=Error(i(520),{cause:l});if(d=mn(d,a),Kr===null?Kr=[d]:Kr.push(d),ot!==4&&(ot=2),t===null)return!0;l=mn(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Ru(a.stateNode,l,e),nu(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(za===null||!za.has(d))))return a.flags|=65536,o&=-o,a.lanes|=o,o=zm(o),km(o,e,a,l),nu(a,o),!1}a=a.return}while(a!==null);return!1}var _u=Error(i(461)),mt=!1;function Et(e,t,a,l){t.child=e===null?Hf(t,null,a,l):dl(t,e.child,a,l)}function Am(e,t,a,l,o){a=a.render;var d=t.ref;if("ref"in l){var p={};for(var b in l)b!=="ref"&&(p[b]=l[b])}else p=l;return il(t),l=ou(e,t,a,p,d,o),b=uu(),e!==null&&!mt?(cu(e,t,o),ea(e,t,o)):(Ve&&b&&qo(t),t.flags|=1,Et(e,t,l,o),t.child)}function Dm(e,t,a,l,o){if(e===null){var d=a.type;return typeof d=="function"&&!$o(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,Om(e,t,d,l,o)):(e=Us(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Ou(e,o)){var p=d.memoizedProps;if(a=a.compare,a=a!==null?a:jr,a(p,l)&&e.ref===t.ref)return ea(e,t,o)}return t.flags|=1,e=Qn(d,l),e.ref=t.ref,e.return=t,t.child=e}function Om(e,t,a,l,o){if(e!==null){var d=e.memoizedProps;if(jr(d,l)&&e.ref===t.ref)if(mt=!1,t.pendingProps=l=d,Ou(e,o))(e.flags&131072)!==0&&(mt=!0);else return t.lanes=e.lanes,ea(e,t,o)}return Eu(e,t,a,l,o)}function Hm(e,t,a,l){var o=l.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~d}else l=0,t.child=null;return Bm(e,t,d,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&qs(t,d!==null?d.cachePool:null),d!==null?Uf(t,d):lu(),$f(t);else return l=t.lanes=536870912,Bm(e,t,d!==null?d.baseLanes|a:a,a,l)}else d!==null?(qs(t,d.cachePool),Uf(t,d),_a(),t.memoizedState=null):(e!==null&&qs(t,null),lu(),_a());return Et(e,t,o,a),t.child}function Ur(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bm(e,t,a,l,o){var d=Po();return d=d===null?null:{parent:dt._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&qs(t,null),lu(),$f(t),e!==null&&Ul(e,t,l,!0),t.childLanes=o,null}function ri(e,t){return t=ii({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Lm(e,t,a){return dl(t,e.child,null,a),e=ri(t,t.pendingProps),e.flags|=2,en(t),t.memoizedState=null,e}function Xy(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ve){if(l.mode==="hidden")return e=ri(t,l),t.lanes=536870912,Ur(null,e);if(su(t),(e=We)?(e=Jh(e,pn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:va!==null?{id:An,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},a=Sf(e),a.return=t,t.child=a,Rt=t,We=null)):e=null,e===null)throw Sa(t);return t.lanes=536870912,null}return ri(t,l)}var d=e.memoizedState;if(d!==null){var p=d.dehydrated;if(su(t),o)if(t.flags&256)t.flags&=-257,t=Lm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(mt||Ul(e,t,a,!1),o=(a&e.childLanes)!==0,mt||o){if(l=Ie,l!==null&&(p=$t(l,a),p!==0&&p!==d.retryLane))throw d.retryLane=p,al(e,p),Xt(l,e,p),_u;pi(),t=Lm(e,t,a)}else e=d.treeContext,We=xn(p.nextSibling),Rt=t,Ve=!0,ba=null,pn=!1,e!==null&&jf(t,e),t=ri(t,l),t.flags|=4096;return t}return e=Qn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function si(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Eu(e,t,a,l,o){return il(t),a=ou(e,t,a,l,void 0,o),l=uu(),e!==null&&!mt?(cu(e,t,o),ea(e,t,o)):(Ve&&l&&qo(t),t.flags|=1,Et(e,t,a,o),t.child)}function Um(e,t,a,l,o,d){return il(t),t.updateQueue=null,a=Gf(t,l,a,o),Vf(e),l=uu(),e!==null&&!mt?(cu(e,t,d),ea(e,t,d)):(Ve&&l&&qo(t),t.flags|=1,Et(e,t,a,d),t.child)}function $m(e,t,a,l,o){if(il(t),t.stateNode===null){var d=Ol,p=a.contextType;typeof p=="object"&&p!==null&&(d=_t(p)),d=new a(l,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Cu,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=l,d.state=t.memoizedState,d.refs={},eu(t),p=a.contextType,d.context=typeof p=="object"&&p!==null?_t(p):Ol,d.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(ju(t,a,p,l),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(p=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),p!==d.state&&Cu.enqueueReplaceState(d,d.state,null),Dr(t,l,d,o),Ar(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){d=t.stateNode;var b=t.memoizedProps,_=ml(a,b);d.props=_;var D=d.context,V=a.contextType;p=Ol,typeof V=="object"&&V!==null&&(p=_t(V));var Y=a.getDerivedStateFromProps;V=typeof Y=="function"||typeof d.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,V||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b||D!==p)&&Rm(t,d,l,p),Na=!1;var O=t.memoizedState;d.state=O,Dr(t,l,d,o),Ar(),D=t.memoizedState,b||O!==D||Na?(typeof Y=="function"&&(ju(t,a,Y,l),D=t.memoizedState),(_=Na||Cm(t,a,_,l,O,D,p))?(V||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=D),d.props=l,d.state=D,d.context=p,l=_):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{d=t.stateNode,tu(e,t),p=t.memoizedProps,V=ml(a,p),d.props=V,Y=t.pendingProps,O=d.context,D=a.contextType,_=Ol,typeof D=="object"&&D!==null&&(_=_t(D)),b=a.getDerivedStateFromProps,(D=typeof b=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(p!==Y||O!==_)&&Rm(t,d,l,_),Na=!1,O=t.memoizedState,d.state=O,Dr(t,l,d,o),Ar();var H=t.memoizedState;p!==Y||O!==H||Na||e!==null&&e.dependencies!==null&&Vs(e.dependencies)?(typeof b=="function"&&(ju(t,a,b,l),H=t.memoizedState),(V=Na||Cm(t,a,V,l,O,H,_)||e!==null&&e.dependencies!==null&&Vs(e.dependencies))?(D||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,H,_),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,H,_)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=H),d.props=l,d.state=H,d.context=_,l=V):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),l=!1)}return d=l,si(e,t),l=(t.flags&128)!==0,d||l?(d=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&l?(t.child=dl(t,e.child,null,o),t.child=dl(t,null,a,o)):Et(e,t,a,o),t.memoizedState=d.state,e=t.child):e=ea(e,t,o),e}function Vm(e,t,a,l){return rl(),t.flags|=256,Et(e,t,a,l),t.child}var Mu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tu(e){return{baseLanes:e,cachePool:Tf()}}function zu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=nn),e}function Gm(e,t,a){var l=t.pendingProps,o=!1,d=(t.flags&128)!==0,p;if((p=d)||(p=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),p&&(o=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(o?Ra(t):_a(),(e=We)?(e=Jh(e,pn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:va!==null?{id:An,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},a=Sf(e),a.return=t,t.child=a,Rt=t,We=null)):e=null,e===null)throw Sa(t);return mc(e)?t.lanes=32:t.lanes=536870912,null}var b=l.children;return l=l.fallback,o?(_a(),o=t.mode,b=ii({mode:"hidden",children:b},o),l=ll(l,o,a,null),b.return=t,l.return=t,b.sibling=l,t.child=b,l=t.child,l.memoizedState=Tu(a),l.childLanes=zu(e,p,a),t.memoizedState=Mu,Ur(null,l)):(Ra(t),ku(t,b))}var _=e.memoizedState;if(_!==null&&(b=_.dehydrated,b!==null)){if(d)t.flags&256?(Ra(t),t.flags&=-257,t=Au(e,t,a)):t.memoizedState!==null?(_a(),t.child=e.child,t.flags|=128,t=null):(_a(),b=l.fallback,o=t.mode,l=ii({mode:"visible",children:l.children},o),b=ll(b,o,a,null),b.flags|=2,l.return=t,b.return=t,l.sibling=b,t.child=l,dl(t,e.child,null,a),l=t.child,l.memoizedState=Tu(a),l.childLanes=zu(e,p,a),t.memoizedState=Mu,t=Ur(null,l));else if(Ra(t),mc(b)){if(p=b.nextSibling&&b.nextSibling.dataset,p)var D=p.dgst;p=D,l=Error(i(419)),l.stack="",l.digest=p,_r({value:l,source:null,stack:null}),t=Au(e,t,a)}else if(mt||Ul(e,t,a,!1),p=(a&e.childLanes)!==0,mt||p){if(p=Ie,p!==null&&(l=$t(p,a),l!==0&&l!==_.retryLane))throw _.retryLane=l,al(e,l),Xt(p,e,l),_u;fc(b)||pi(),t=Au(e,t,a)}else fc(b)?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,We=xn(b.nextSibling),Rt=t,Ve=!0,ba=null,pn=!1,e!==null&&jf(t,e),t=ku(t,l.children),t.flags|=4096);return t}return o?(_a(),b=l.fallback,o=t.mode,_=e.child,D=_.sibling,l=Qn(_,{mode:"hidden",children:l.children}),l.subtreeFlags=_.subtreeFlags&65011712,D!==null?b=Qn(D,b):(b=ll(b,o,a,null),b.flags|=2),b.return=t,l.return=t,l.sibling=b,t.child=l,Ur(null,l),l=t.child,b=e.child.memoizedState,b===null?b=Tu(a):(o=b.cachePool,o!==null?(_=dt._currentValue,o=o.parent!==_?{parent:_,pool:_}:o):o=Tf(),b={baseLanes:b.baseLanes|a,cachePool:o}),l.memoizedState=b,l.childLanes=zu(e,p,a),t.memoizedState=Mu,Ur(e.child,l)):(Ra(t),a=e.child,e=a.sibling,a=Qn(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function ku(e,t){return t=ii({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ii(e,t){return e=Pt(22,e,null,t),e.lanes=0,e}function Au(e,t,a){return dl(t,e.child,null,a),e=ku(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function qm(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Qo(e.return,t,a)}function Du(e,t,a,l,o,d){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:d}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=a,p.tailMode=o,p.treeForkCount=d)}function Fm(e,t,a){var l=t.pendingProps,o=l.revealOrder,d=l.tail;l=l.children;var p=ut.current,b=(p&2)!==0;if(b?(p=p&1|2,t.flags|=128):p&=1,G(ut,p),Et(e,t,l,a),l=Ve?Rr:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qm(e,a,t);else if(e.tag===19)qm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Zs(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Du(t,!1,o,a,d,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Zs(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Du(t,!0,a,null,d,l);break;case"together":Du(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ea(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ta|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ul(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,a=Qn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Qn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Ou(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Vs(e)))}function Qy(e,t,a){switch(t.tag){case 3:_e(t,t.stateNode.containerInfo),wa(t,dt,e.memoizedState.cache),rl();break;case 27:case 5:wt(t);break;case 4:_e(t,t.stateNode.containerInfo);break;case 10:wa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,su(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ra(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Gm(e,t,a):(Ra(t),e=ea(e,t,a),e!==null?e.sibling:null);Ra(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Ul(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return Fm(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),G(ut,ut.current),l)break;return null;case 22:return t.lanes=0,Hm(e,t,a,t.pendingProps);case 24:wa(t,dt,e.memoizedState.cache)}return ea(e,t,a)}function Ym(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)mt=!0;else{if(!Ou(e,a)&&(t.flags&128)===0)return mt=!1,Qy(e,t,a);mt=(e.flags&131072)!==0}else mt=!1,Ve&&(t.flags&1048576)!==0&&Nf(t,Rr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ul(t.elementType),t.type=e,typeof e=="function")$o(e)?(l=ml(e,l),t.tag=1,t=$m(null,t,e,l,a)):(t.tag=0,t=Eu(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===ee){t.tag=11,t=Am(null,t,e,l,a);break e}else if(o===P){t.tag=14,t=Dm(null,t,e,l,a);break e}}throw t=K(e)||e,Error(i(306,t,""))}}return t;case 0:return Eu(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=ml(l,t.pendingProps),$m(e,t,l,o,a);case 3:e:{if(_e(t,t.stateNode.containerInfo),e===null)throw Error(i(387));l=t.pendingProps;var d=t.memoizedState;o=d.element,tu(e,t),Dr(t,l,null,a);var p=t.memoizedState;if(l=p.cache,wa(t,dt,l),l!==d.cache&&Zo(t,[dt],a,!0),Ar(),l=p.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Vm(e,t,l,a);break e}else if(l!==o){o=mn(Error(i(424)),t),_r(o),t=Vm(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(We=xn(e.firstChild),Rt=t,Ve=!0,ba=null,pn=!0,a=Hf(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(rl(),l===o){t=ea(e,t,a);break e}Et(e,t,l,a)}t=t.child}return t;case 26:return si(e,t),e===null?(a=ng(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ve||(a=t.type,e=t.pendingProps,l=Ni(ie.current).createElement(a),l[Ct]=t,l[Vt]=e,Mt(l,a,e),bt(l),t.stateNode=l):t.memoizedState=ng(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return wt(t),e===null&&Ve&&(l=t.stateNode=Wh(t.type,t.pendingProps,ie.current),Rt=t,pn=!0,o=We,Oa(t.type)?(hc=o,We=xn(l.firstChild)):We=o),Et(e,t,t.pendingProps.children,a),si(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((o=l=We)&&(l=jx(l,t.type,t.pendingProps,pn),l!==null?(t.stateNode=l,Rt=t,We=xn(l.firstChild),pn=!1,o=!0):o=!1),o||Sa(t)),wt(t),o=t.type,d=t.pendingProps,p=e!==null?e.memoizedProps:null,l=d.children,uc(o,d)?l=null:p!==null&&uc(o,p)&&(t.flags|=32),t.memoizedState!==null&&(o=ou(e,t,Uy,null,null,a),es._currentValue=o),si(e,t),Et(e,t,l,a),t.child;case 6:return e===null&&Ve&&((e=a=We)&&(a=Cx(a,t.pendingProps,pn),a!==null?(t.stateNode=a,Rt=t,We=null,e=!0):e=!1),e||Sa(t)),null;case 13:return Gm(e,t,a);case 4:return _e(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=dl(t,null,l,a):Et(e,t,l,a),t.child;case 11:return Am(e,t,t.type,t.pendingProps,a);case 7:return Et(e,t,t.pendingProps,a),t.child;case 8:return Et(e,t,t.pendingProps.children,a),t.child;case 12:return Et(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,wa(t,t.type,l.value),Et(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,il(t),o=_t(o),l=l(o),t.flags|=1,Et(e,t,l,a),t.child;case 14:return Dm(e,t,t.type,t.pendingProps,a);case 15:return Om(e,t,t.type,t.pendingProps,a);case 19:return Fm(e,t,a);case 31:return Xy(e,t,a);case 22:return Hm(e,t,a,t.pendingProps);case 24:return il(t),l=_t(dt),e===null?(o=Po(),o===null&&(o=Ie,d=Jo(),o.pooledCache=d,d.refCount++,d!==null&&(o.pooledCacheLanes|=a),o=d),t.memoizedState={parent:l,cache:o},eu(t),wa(t,dt,o)):((e.lanes&a)!==0&&(tu(e,t),Dr(t,null,null,a),Ar()),o=e.memoizedState,d=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),wa(t,dt,l)):(l=d.cache,wa(t,dt,l),l!==o.cache&&Zo(t,[dt],a,!0))),Et(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ta(e){e.flags|=4}function Hu(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(xh())e.flags|=8192;else throw cl=Ys,Wo}else e.flags&=-16777217}function Km(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ig(t))if(xh())e.flags|=8192;else throw cl=Ys,Wo}function oi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?zt():536870912,e.lanes|=t,Il|=t)}function $r(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Zy(e,t,a){var l=t.pendingProps;switch(Fo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return et(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),In(dt),be(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ll(t)?ta(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ko())),et(t),null;case 26:var o=t.type,d=t.memoizedState;return e===null?(ta(t),d!==null?(et(t),Km(t,d)):(et(t),Hu(t,o,null,l,a))):d?d!==e.memoizedState?(ta(t),et(t),Km(t,d)):(et(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ta(t),et(t),Hu(t,o,e,l,a)),null;case 27:if(xt(t),a=ie.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ta(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return et(t),null}e=Z.current,Ll(t)?Cf(t):(e=Wh(o,l,a),t.stateNode=e,ta(t))}return et(t),null;case 5:if(xt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ta(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return et(t),null}if(d=Z.current,Ll(t))Cf(t);else{var p=Ni(ie.current);switch(d){case 1:d=p.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:d=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":d=p.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":d=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":d=p.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof l.is=="string"?p.createElement("select",{is:l.is}):p.createElement("select"),l.multiple?d.multiple=!0:l.size&&(d.size=l.size);break;default:d=typeof l.is=="string"?p.createElement(o,{is:l.is}):p.createElement(o)}}d[Ct]=t,d[Vt]=l;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)d.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=d;e:switch(Mt(d,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ta(t)}}return et(t),Hu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ta(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(i(166));if(e=ie.current,Ll(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=Rt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Gh(e.nodeValue,a)),e||Sa(t,!0)}else e=Ni(e).createTextNode(l),e[Ct]=t,t.stateNode=e}return et(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ll(t),a!==null){if(e===null){if(!l)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[Ct]=t}else rl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),e=!1}else a=Ko(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(en(t),t):(en(t),null);if((t.flags&128)!==0)throw Error(i(558))}return et(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Ll(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(i(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));o[Ct]=t}else rl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),o=!1}else o=Ko(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(en(t),t):(en(t),null)}return en(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),d=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),oi(t,t.updateQueue),et(t),null);case 4:return be(),e===null&&lc(t.stateNode.containerInfo),et(t),null;case 10:return In(t.type),et(t),null;case 19:if(U(ut),l=t.memoizedState,l===null)return et(t),null;if(o=(t.flags&128)!==0,d=l.rendering,d===null)if(o)$r(l,!1);else{if(ot!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Zs(e),d!==null){for(t.flags|=128,$r(l,!1),e=d.updateQueue,t.updateQueue=e,oi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)bf(a,e),a=a.sibling;return G(ut,ut.current&1|2),Ve&&Zn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Le()>mi&&(t.flags|=128,o=!0,$r(l,!1),t.lanes=4194304)}else{if(!o)if(e=Zs(d),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,oi(t,e),$r(l,!0),l.tail===null&&l.tailMode==="hidden"&&!d.alternate&&!Ve)return et(t),null}else 2*Le()-l.renderingStartTime>mi&&a!==536870912&&(t.flags|=128,o=!0,$r(l,!1),t.lanes=4194304);l.isBackwards?(d.sibling=t.child,t.child=d):(e=l.last,e!==null?e.sibling=d:t.child=d,l.last=d)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Le(),e.sibling=null,a=ut.current,G(ut,o?a&1|2:a&1),Ve&&Zn(t,l.treeForkCount),e):(et(t),null);case 22:case 23:return en(t),ru(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),a=t.updateQueue,a!==null&&oi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&U(ol),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),In(dt),et(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Jy(e,t){switch(Fo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return In(dt),be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xt(t),null;case 31:if(t.memoizedState!==null){if(en(t),t.alternate===null)throw Error(i(340));rl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(en(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));rl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(ut),null;case 4:return be(),null;case 10:return In(t.type),null;case 22:case 23:return en(t),ru(),e!==null&&U(ol),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return In(dt),null;case 25:return null;default:return null}}function Xm(e,t){switch(Fo(t),t.tag){case 3:In(dt),be();break;case 26:case 27:case 5:xt(t);break;case 4:be();break;case 31:t.memoizedState!==null&&en(t);break;case 13:en(t);break;case 19:U(ut);break;case 10:In(t.type);break;case 22:case 23:en(t),ru(),e!==null&&U(ol);break;case 24:In(dt)}}function Vr(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var d=a.create,p=a.inst;l=d(),p.destroy=l}a=a.next}while(a!==o)}}catch(b){Ke(t,t.return,b)}}function Ea(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var d=o.next;l=d;do{if((l.tag&e)===e){var p=l.inst,b=p.destroy;if(b!==void 0){p.destroy=void 0,o=t;var _=a,D=b;try{D()}catch(V){Ke(o,_,V)}}}l=l.next}while(l!==d)}}catch(V){Ke(t,t.return,V)}}function Qm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Lf(t,a)}catch(l){Ke(e,e.return,l)}}}function Zm(e,t,a){a.props=ml(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ke(e,t,l)}}function Gr(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){Ke(e,t,o)}}function On(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){Ke(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Ke(e,t,o)}else a.current=null}function Jm(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){Ke(e,e.return,o)}}function Bu(e,t,a){try{var l=e.stateNode;xx(l,e.type,a,t),l[Vt]=t}catch(o){Ke(e,e.return,o)}}function Im(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Oa(e.type)||e.tag===4}function Lu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Im(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Oa(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uu(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Kn));else if(l!==4&&(l===27&&Oa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Uu(e,t,a),e=e.sibling;e!==null;)Uu(e,t,a),e=e.sibling}function ui(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Oa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ui(e,t,a),e=e.sibling;e!==null;)ui(e,t,a),e=e.sibling}function Pm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Mt(t,l,a),t[Ct]=e,t[Vt]=a}catch(d){Ke(e,e.return,d)}}var na=!1,ht=!1,$u=!1,Wm=typeof WeakSet=="function"?WeakSet:Set,St=null;function Iy(e,t){if(e=e.containerInfo,ic=Ti,e=df(e),Ao(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var p=0,b=-1,_=-1,D=0,V=0,Y=e,O=null;t:for(;;){for(var H;Y!==a||o!==0&&Y.nodeType!==3||(b=p+o),Y!==d||l!==0&&Y.nodeType!==3||(_=p+l),Y.nodeType===3&&(p+=Y.nodeValue.length),(H=Y.firstChild)!==null;)O=Y,Y=H;for(;;){if(Y===e)break t;if(O===a&&++D===o&&(b=p),O===d&&++V===l&&(_=p),(H=Y.nextSibling)!==null)break;Y=O,O=Y.parentNode}Y=H}a=b===-1||_===-1?null:{start:b,end:_}}else a=null}a=a||{start:0,end:0}}else a=null;for(oc={focusedElem:e,selectionRange:a},Ti=!1,St=t;St!==null;)if(t=St,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,St=e;else for(;St!==null;){switch(t=St,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,o=d.memoizedProps,d=d.memoizedState,l=a.stateNode;try{var me=ml(a.type,o);e=l.getSnapshotBeforeUpdate(me,d),l.__reactInternalSnapshotBeforeUpdate=e}catch(we){Ke(a,a.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)dc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":dc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,St=e;break}St=t.return}}function eh(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:la(e,a),l&4&&Vr(5,a);break;case 1:if(la(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){Ke(a,a.return,p)}else{var o=ml(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Ke(a,a.return,p)}}l&64&&Qm(a),l&512&&Gr(a,a.return);break;case 3:if(la(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Lf(e,t)}catch(p){Ke(a,a.return,p)}}break;case 27:t===null&&l&4&&Pm(a);case 26:case 5:la(e,a),t===null&&l&4&&Jm(a),l&512&&Gr(a,a.return);break;case 12:la(e,a);break;case 31:la(e,a),l&4&&ah(e,a);break;case 13:la(e,a),l&4&&lh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=sx.bind(null,a),Rx(e,a))));break;case 22:if(l=a.memoizedState!==null||na,!l){t=t!==null&&t.memoizedState!==null||ht,o=na;var d=ht;na=l,(ht=t)&&!d?ra(e,a,(a.subtreeFlags&8772)!==0):la(e,a),na=o,ht=d}break;case 30:break;default:la(e,a)}}function th(e){var t=e.alternate;t!==null&&(e.alternate=null,th(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&po(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var at=null,qt=!1;function aa(e,t,a){for(a=a.child;a!==null;)nh(e,t,a),a=a.sibling}function nh(e,t,a){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Ja,a)}catch{}switch(a.tag){case 26:ht||On(a,t),aa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ht||On(a,t);var l=at,o=qt;Oa(a.type)&&(at=a.stateNode,qt=!1),aa(e,t,a),Ir(a.stateNode),at=l,qt=o;break;case 5:ht||On(a,t);case 6:if(l=at,o=qt,at=null,aa(e,t,a),at=l,qt=o,at!==null)if(qt)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(a.stateNode)}catch(d){Ke(a,t,d)}else try{at.removeChild(a.stateNode)}catch(d){Ke(a,t,d)}break;case 18:at!==null&&(qt?(e=at,Qh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),rr(e)):Qh(at,a.stateNode));break;case 4:l=at,o=qt,at=a.stateNode.containerInfo,qt=!0,aa(e,t,a),at=l,qt=o;break;case 0:case 11:case 14:case 15:Ea(2,a,t),ht||Ea(4,a,t),aa(e,t,a);break;case 1:ht||(On(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Zm(a,t,l)),aa(e,t,a);break;case 21:aa(e,t,a);break;case 22:ht=(l=ht)||a.memoizedState!==null,aa(e,t,a),ht=l;break;default:aa(e,t,a)}}function ah(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{rr(e)}catch(a){Ke(t,t.return,a)}}}function lh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{rr(e)}catch(a){Ke(t,t.return,a)}}function Py(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Wm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Wm),t;default:throw Error(i(435,e.tag))}}function ci(e,t){var a=Py(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=ix.bind(null,e,l);l.then(o,o)}})}function Ft(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],d=e,p=t,b=p;e:for(;b!==null;){switch(b.tag){case 27:if(Oa(b.type)){at=b.stateNode,qt=!1;break e}break;case 5:at=b.stateNode,qt=!1;break e;case 3:case 4:at=b.stateNode.containerInfo,qt=!0;break e}b=b.return}if(at===null)throw Error(i(160));nh(d,p,o),at=null,qt=!1,d=o.alternate,d!==null&&(d.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)rh(t,e),t=t.sibling}var jn=null;function rh(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ft(t,e),Yt(e),l&4&&(Ea(3,e,e.return),Vr(3,e),Ea(5,e,e.return));break;case 1:Ft(t,e),Yt(e),l&512&&(ht||a===null||On(a,a.return)),l&64&&na&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=jn;if(Ft(t,e),Yt(e),l&512&&(ht||a===null||On(a,a.return)),l&4){var d=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":d=o.getElementsByTagName("title")[0],(!d||d[gr]||d[Ct]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=o.createElement(l),o.head.insertBefore(d,o.querySelector("head > title"))),Mt(d,l,a),d[Ct]=e,bt(d),l=d;break e;case"link":var p=rg("link","href",o).get(l+(a.href||""));if(p){for(var b=0;b<p.length;b++)if(d=p[b],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(b,1);break t}}d=o.createElement(l),Mt(d,l,a),o.head.appendChild(d);break;case"meta":if(p=rg("meta","content",o).get(l+(a.content||""))){for(b=0;b<p.length;b++)if(d=p[b],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(b,1);break t}}d=o.createElement(l),Mt(d,l,a),o.head.appendChild(d);break;default:throw Error(i(468,l))}d[Ct]=e,bt(d),l=d}e.stateNode=l}else sg(o,e.type,e.stateNode);else e.stateNode=lg(o,l,e.memoizedProps);else d!==l?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,l===null?sg(o,e.type,e.stateNode):lg(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Bu(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ft(t,e),Yt(e),l&512&&(ht||a===null||On(a,a.return)),a!==null&&l&4&&Bu(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ft(t,e),Yt(e),l&512&&(ht||a===null||On(a,a.return)),e.flags&32){o=e.stateNode;try{El(o,"")}catch(me){Ke(e,e.return,me)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Bu(e,o,a!==null?a.memoizedProps:o)),l&1024&&($u=!0);break;case 6:if(Ft(t,e),Yt(e),l&4){if(e.stateNode===null)throw Error(i(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(me){Ke(e,e.return,me)}}break;case 3:if(Ri=null,o=jn,jn=ji(t.containerInfo),Ft(t,e),jn=o,Yt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{rr(t.containerInfo)}catch(me){Ke(e,e.return,me)}$u&&($u=!1,sh(e));break;case 4:l=jn,jn=ji(e.stateNode.containerInfo),Ft(t,e),Yt(e),jn=l;break;case 12:Ft(t,e),Yt(e);break;case 31:Ft(t,e),Yt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ci(e,l)));break;case 13:Ft(t,e),Yt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(fi=Le()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ci(e,l)));break;case 22:o=e.memoizedState!==null;var _=a!==null&&a.memoizedState!==null,D=na,V=ht;if(na=D||o,ht=V||_,Ft(t,e),ht=V,na=D,Yt(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||_||na||ht||hl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){_=a=t;try{if(d=_.stateNode,o)p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{b=_.stateNode;var Y=_.memoizedProps.style,O=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;b.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(me){Ke(_,_.return,me)}}}else if(t.tag===6){if(a===null){_=t;try{_.stateNode.nodeValue=o?"":_.memoizedProps}catch(me){Ke(_,_.return,me)}}}else if(t.tag===18){if(a===null){_=t;try{var H=_.stateNode;o?Zh(H,!0):Zh(_.stateNode,!1)}catch(me){Ke(_,_.return,me)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,ci(e,a))));break;case 19:Ft(t,e),Yt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ci(e,l)));break;case 30:break;case 21:break;default:Ft(t,e),Yt(e)}}function Yt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Im(l)){a=l;break}l=l.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var o=a.stateNode,d=Lu(e);ui(e,d,o);break;case 5:var p=a.stateNode;a.flags&32&&(El(p,""),a.flags&=-33);var b=Lu(e);ui(e,b,p);break;case 3:case 4:var _=a.stateNode.containerInfo,D=Lu(e);Uu(e,D,_);break;default:throw Error(i(161))}}catch(V){Ke(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function la(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)eh(e,t.alternate,t),t=t.sibling}function hl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ea(4,t,t.return),hl(t);break;case 1:On(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Zm(t,t.return,a),hl(t);break;case 27:Ir(t.stateNode);case 26:case 5:On(t,t.return),hl(t);break;case 22:t.memoizedState===null&&hl(t);break;case 30:hl(t);break;default:hl(t)}e=e.sibling}}function ra(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,d=t,p=d.flags;switch(d.tag){case 0:case 11:case 15:ra(o,d,a),Vr(4,d);break;case 1:if(ra(o,d,a),l=d,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(D){Ke(l,l.return,D)}if(l=d,o=l.updateQueue,o!==null){var b=l.stateNode;try{var _=o.shared.hiddenCallbacks;if(_!==null)for(o.shared.hiddenCallbacks=null,o=0;o<_.length;o++)Bf(_[o],b)}catch(D){Ke(l,l.return,D)}}a&&p&64&&Qm(d),Gr(d,d.return);break;case 27:Pm(d);case 26:case 5:ra(o,d,a),a&&l===null&&p&4&&Jm(d),Gr(d,d.return);break;case 12:ra(o,d,a);break;case 31:ra(o,d,a),a&&p&4&&ah(o,d);break;case 13:ra(o,d,a),a&&p&4&&lh(o,d);break;case 22:d.memoizedState===null&&ra(o,d,a),Gr(d,d.return);break;case 30:break;default:ra(o,d,a)}t=t.sibling}}function Vu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Er(a))}function Gu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Er(e))}function Cn(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ih(e,t,a,l),t=t.sibling}function ih(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Cn(e,t,a,l),o&2048&&Vr(9,t);break;case 1:Cn(e,t,a,l);break;case 3:Cn(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Er(e)));break;case 12:if(o&2048){Cn(e,t,a,l),e=t.stateNode;try{var d=t.memoizedProps,p=d.id,b=d.onPostCommit;typeof b=="function"&&b(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){Ke(t,t.return,_)}}else Cn(e,t,a,l);break;case 31:Cn(e,t,a,l);break;case 13:Cn(e,t,a,l);break;case 23:break;case 22:d=t.stateNode,p=t.alternate,t.memoizedState!==null?d._visibility&2?Cn(e,t,a,l):qr(e,t):d._visibility&2?Cn(e,t,a,l):(d._visibility|=2,Ql(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Vu(p,t);break;case 24:Cn(e,t,a,l),o&2048&&Gu(t.alternate,t);break;default:Cn(e,t,a,l)}}function Ql(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,p=t,b=a,_=l,D=p.flags;switch(p.tag){case 0:case 11:case 15:Ql(d,p,b,_,o),Vr(8,p);break;case 23:break;case 22:var V=p.stateNode;p.memoizedState!==null?V._visibility&2?Ql(d,p,b,_,o):qr(d,p):(V._visibility|=2,Ql(d,p,b,_,o)),o&&D&2048&&Vu(p.alternate,p);break;case 24:Ql(d,p,b,_,o),o&&D&2048&&Gu(p.alternate,p);break;default:Ql(d,p,b,_,o)}t=t.sibling}}function qr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:qr(a,l),o&2048&&Vu(l.alternate,l);break;case 24:qr(a,l),o&2048&&Gu(l.alternate,l);break;default:qr(a,l)}t=t.sibling}}var Fr=8192;function Zl(e,t,a){if(e.subtreeFlags&Fr)for(e=e.child;e!==null;)oh(e,t,a),e=e.sibling}function oh(e,t,a){switch(e.tag){case 26:Zl(e,t,a),e.flags&Fr&&e.memoizedState!==null&&Lx(a,jn,e.memoizedState,e.memoizedProps);break;case 5:Zl(e,t,a);break;case 3:case 4:var l=jn;jn=ji(e.stateNode.containerInfo),Zl(e,t,a),jn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Fr,Fr=16777216,Zl(e,t,a),Fr=l):Zl(e,t,a));break;default:Zl(e,t,a)}}function uh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Yr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];St=l,dh(l,e)}uh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ch(e),e=e.sibling}function ch(e){switch(e.tag){case 0:case 11:case 15:Yr(e),e.flags&2048&&Ea(9,e,e.return);break;case 3:Yr(e);break;case 12:Yr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,di(e)):Yr(e);break;default:Yr(e)}}function di(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];St=l,dh(l,e)}uh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ea(8,t,t.return),di(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,di(t));break;default:di(t)}e=e.sibling}}function dh(e,t){for(;St!==null;){var a=St;switch(a.tag){case 0:case 11:case 15:Ea(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Er(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,St=l;else e:for(a=e;St!==null;){l=St;var o=l.sibling,d=l.return;if(th(l),l===a){St=null;break e}if(o!==null){o.return=d,St=o;break e}St=d}}}var Wy={getCacheForType:function(e){var t=_t(dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return _t(dt).controller.signal}},ex=typeof WeakMap=="function"?WeakMap:Map,Fe=0,Ie=null,Oe=null,Ue=0,Ye=0,tn=null,Ma=!1,Jl=!1,qu=!1,sa=0,ot=0,Ta=0,gl=0,Fu=0,nn=0,Il=0,Kr=null,Kt=null,Yu=!1,fi=0,fh=0,mi=1/0,hi=null,za=null,pt=0,ka=null,Pl=null,ia=0,Ku=0,Xu=null,mh=null,Xr=0,Qu=null;function an(){return(Fe&2)!==0&&Ue!==0?Ue&-Ue:T.T!==null?ec():ho()}function hh(){if(nn===0)if((Ue&536870912)===0||Ve){var e=bl;bl<<=1,(bl&3932160)===0&&(bl=262144),nn=e}else nn=536870912;return e=Wt.current,e!==null&&(e.flags|=32),nn}function Xt(e,t,a){(e===Ie&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)&&(Wl(e,0),Aa(e,Ue,nn,!1)),rt(e,a),((Fe&2)===0||e!==Ie)&&(e===Ie&&((Fe&2)===0&&(gl|=a),ot===4&&Aa(e,Ue,nn,!1)),Hn(e))}function gh(e,t,a){if((Fe&6)!==0)throw Error(i(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||nt(e,t),o=l?ax(e,t):Ju(e,t,!0),d=l;do{if(o===0){Jl&&!l&&Aa(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!tx(a)){o=Ju(e,t,!1),d=!1;continue}if(o===2){if(d=t,e.errorRecoveryDisabledLanes&d)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var b=e;o=Kr;var _=b.current.memoizedState.isDehydrated;if(_&&(Wl(b,p).flags|=256),p=Ju(b,p,!1),p!==2){if(qu&&!_){b.errorRecoveryDisabledLanes|=d,gl|=d,o=4;break e}d=Kt,Kt=o,d!==null&&(Kt===null?Kt=d:Kt.push.apply(Kt,d))}o=p}if(d=!1,o!==2)continue}}if(o===1){Wl(e,0),Aa(e,t,0,!0);break}e:{switch(l=e,d=o,d){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Aa(l,t,nn,!Ma);break e;case 2:Kt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(o=fi+300-Le(),10<o)){if(Aa(l,t,nn,!Ma),Ee(l,0,!0)!==0)break e;ia=t,l.timeoutHandle=Kh(ph.bind(null,l,a,Kt,hi,Yu,t,nn,gl,Il,Ma,d,"Throttled",-0,0),o);break e}ph(l,a,Kt,hi,Yu,t,nn,gl,Il,Ma,d,null,-0,0)}}break}while(!0);Hn(e)}function ph(e,t,a,l,o,d,p,b,_,D,V,Y,O,H){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kn},oh(t,d,Y);var me=(d&62914560)===d?fi-Le():(d&4194048)===d?fh-Le():0;if(me=Ux(Y,me),me!==null){ia=d,e.cancelPendingCommit=me(jh.bind(null,e,t,d,a,l,o,p,b,_,V,Y,null,O,H)),Aa(e,d,p,!D);return}}jh(e,t,d,a,l,o,p,b,_)}function tx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var o=a[l],d=o.getSnapshot;o=o.value;try{if(!It(d(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Aa(e,t,a,l){t&=~Fu,t&=~gl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var d=31-Tt(o),p=1<<d;l[d]=-1,o&=~p}a!==0&&Pa(e,a,t)}function gi(){return(Fe&6)===0?(Qr(0),!1):!0}function Zu(){if(Oe!==null){if(Ye===0)var e=Oe.return;else e=Oe,Jn=sl=null,du(e),ql=null,Tr=0,e=Oe;for(;e!==null;)Xm(e.alternate,e),e=e.return;Oe=null}}function Wl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Sx(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ia=0,Zu(),Ie=e,Oe=a=Qn(e.current,null),Ue=t,Ye=0,tn=null,Ma=!1,Jl=nt(e,t),qu=!1,Il=nn=Fu=gl=Ta=ot=0,Kt=Kr=null,Yu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-Tt(l),d=1<<o;t|=e[o],l&=~d}return sa=t,Hs(),a}function yh(e,t){ke=null,T.H=Lr,t===Gl||t===Fs?(t=Af(),Ye=3):t===Wo?(t=Af(),Ye=4):Ye=t===_u?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,tn=t,Oe===null&&(ot=1,li(e,mn(t,e.current)))}function xh(){var e=Wt.current;return e===null?!0:(Ue&4194048)===Ue?yn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===yn:!1}function vh(){var e=T.H;return T.H=Lr,e===null?Lr:e}function bh(){var e=T.A;return T.A=Wy,e}function pi(){ot=4,Ma||(Ue&4194048)!==Ue&&Wt.current!==null||(Jl=!0),(Ta&134217727)===0&&(gl&134217727)===0||Ie===null||Aa(Ie,Ue,nn,!1)}function Ju(e,t,a){var l=Fe;Fe|=2;var o=vh(),d=bh();(Ie!==e||Ue!==t)&&(hi=null,Wl(e,t)),t=!1;var p=ot;e:do try{if(Ye!==0&&Oe!==null){var b=Oe,_=tn;switch(Ye){case 8:Zu(),p=6;break e;case 3:case 2:case 9:case 6:Wt.current===null&&(t=!0);var D=Ye;if(Ye=0,tn=null,er(e,b,_,D),a&&Jl){p=0;break e}break;default:D=Ye,Ye=0,tn=null,er(e,b,_,D)}}nx(),p=ot;break}catch(V){yh(e,V)}while(!0);return t&&e.shellSuspendCounter++,Jn=sl=null,Fe=l,T.H=o,T.A=d,Oe===null&&(Ie=null,Ue=0,Hs()),p}function nx(){for(;Oe!==null;)Sh(Oe)}function ax(e,t){var a=Fe;Fe|=2;var l=vh(),o=bh();Ie!==e||Ue!==t?(hi=null,mi=Le()+500,Wl(e,t)):Jl=nt(e,t);e:do try{if(Ye!==0&&Oe!==null){t=Oe;var d=tn;t:switch(Ye){case 1:Ye=0,tn=null,er(e,t,d,1);break;case 2:case 9:if(zf(d)){Ye=0,tn=null,wh(t);break}t=function(){Ye!==2&&Ye!==9||Ie!==e||(Ye=7),Hn(e)},d.then(t,t);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:zf(d)?(Ye=0,tn=null,wh(t)):(Ye=0,tn=null,er(e,t,d,7));break;case 5:var p=null;switch(Oe.tag){case 26:p=Oe.memoizedState;case 5:case 27:var b=Oe;if(p?ig(p):b.stateNode.complete){Ye=0,tn=null;var _=b.sibling;if(_!==null)Oe=_;else{var D=b.return;D!==null?(Oe=D,yi(D)):Oe=null}break t}}Ye=0,tn=null,er(e,t,d,5);break;case 6:Ye=0,tn=null,er(e,t,d,6);break;case 8:Zu(),ot=6;break e;default:throw Error(i(462))}}lx();break}catch(V){yh(e,V)}while(!0);return Jn=sl=null,T.H=l,T.A=o,Fe=a,Oe!==null?0:(Ie=null,Ue=0,Hs(),ot)}function lx(){for(;Oe!==null&&!ue();)Sh(Oe)}function Sh(e){var t=Ym(e.alternate,e,sa);e.memoizedProps=e.pendingProps,t===null?yi(e):Oe=t}function wh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Um(a,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=Um(a,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:du(t);default:Xm(a,t),t=Oe=bf(t,sa),t=Ym(a,t,sa)}e.memoizedProps=e.pendingProps,t===null?yi(e):Oe=t}function er(e,t,a,l){Jn=sl=null,du(t),ql=null,Tr=0;var o=t.return;try{if(Ky(e,o,t,a,Ue)){ot=1,li(e,mn(a,e.current)),Oe=null;return}}catch(d){if(o!==null)throw Oe=o,d;ot=1,li(e,mn(a,e.current)),Oe=null;return}t.flags&32768?(Ve||l===1?e=!0:Jl||(Ue&536870912)!==0?e=!1:(Ma=e=!0,(l===2||l===9||l===3||l===6)&&(l=Wt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Nh(t,e)):yi(t)}function yi(e){var t=e;do{if((t.flags&32768)!==0){Nh(t,Ma);return}e=t.return;var a=Zy(t.alternate,t,sa);if(a!==null){Oe=a;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);ot===0&&(ot=5)}function Nh(e,t){do{var a=Jy(e.alternate,e);if(a!==null){a.flags&=32767,Oe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=a}while(e!==null);ot=6,Oe=null}function jh(e,t,a,l,o,d,p,b,_){e.cancelPendingCommit=null;do xi();while(pt!==0);if((Fe&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(d=t.lanes|t.childLanes,d|=Lo,Lt(e,a,d,p,b,_),e===Ie&&(Oe=Ie=null,Ue=0),Pl=t,ka=e,ia=a,Ku=d,Xu=o,mh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ox(Za,function(){return Mh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=T.T,T.T=null,o=$.p,$.p=2,p=Fe,Fe|=4;try{Iy(e,t,a)}finally{Fe=p,$.p=o,T.T=l}}pt=1,Ch(),Rh(),_h()}}function Ch(){if(pt===1){pt=0;var e=ka,t=Pl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=T.T,T.T=null;var l=$.p;$.p=2;var o=Fe;Fe|=4;try{rh(t,e);var d=oc,p=df(e.containerInfo),b=d.focusedElem,_=d.selectionRange;if(p!==b&&b&&b.ownerDocument&&cf(b.ownerDocument.documentElement,b)){if(_!==null&&Ao(b)){var D=_.start,V=_.end;if(V===void 0&&(V=D),"selectionStart"in b)b.selectionStart=D,b.selectionEnd=Math.min(V,b.value.length);else{var Y=b.ownerDocument||document,O=Y&&Y.defaultView||window;if(O.getSelection){var H=O.getSelection(),me=b.textContent.length,we=Math.min(_.start,me),Ze=_.end===void 0?we:Math.min(_.end,me);!H.extend&&we>Ze&&(p=Ze,Ze=we,we=p);var k=uf(b,we),z=uf(b,Ze);if(k&&z&&(H.rangeCount!==1||H.anchorNode!==k.node||H.anchorOffset!==k.offset||H.focusNode!==z.node||H.focusOffset!==z.offset)){var A=Y.createRange();A.setStart(k.node,k.offset),H.removeAllRanges(),we>Ze?(H.addRange(A),H.extend(z.node,z.offset)):(A.setEnd(z.node,z.offset),H.addRange(A))}}}}for(Y=[],H=b;H=H.parentNode;)H.nodeType===1&&Y.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<Y.length;b++){var F=Y[b];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}Ti=!!ic,oc=ic=null}finally{Fe=o,$.p=l,T.T=a}}e.current=t,pt=2}}function Rh(){if(pt===2){pt=0;var e=ka,t=Pl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=T.T,T.T=null;var l=$.p;$.p=2;var o=Fe;Fe|=4;try{eh(e,t.alternate,t)}finally{Fe=o,$.p=l,T.T=a}}pt=3}}function _h(){if(pt===4||pt===3){pt=0,Be();var e=ka,t=Pl,a=ia,l=mh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?pt=5:(pt=0,Pl=ka=null,Eh(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(za=null),wn(a),t=t.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(Ja,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=T.T,o=$.p,$.p=2,T.T=null;try{for(var d=e.onRecoverableError,p=0;p<l.length;p++){var b=l[p];d(b.value,{componentStack:b.stack})}}finally{T.T=t,$.p=o}}(ia&3)!==0&&xi(),Hn(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Qu?Xr++:(Xr=0,Qu=e):Xr=0,Qr(0)}}function Eh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Er(t)))}function xi(){return Ch(),Rh(),_h(),Mh()}function Mh(){if(pt!==5)return!1;var e=ka,t=Ku;Ku=0;var a=wn(ia),l=T.T,o=$.p;try{$.p=32>a?32:a,T.T=null,a=Xu,Xu=null;var d=ka,p=ia;if(pt=0,Pl=ka=null,ia=0,(Fe&6)!==0)throw Error(i(331));var b=Fe;if(Fe|=4,ch(d.current),ih(d,d.current,p,a),Fe=b,Qr(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Ja,d)}catch{}return!0}finally{$.p=o,T.T=l,Eh(e,t)}}function Th(e,t,a){t=mn(a,t),t=Ru(e.stateNode,t,2),e=Ca(e,t,2),e!==null&&(rt(e,2),Hn(e))}function Ke(e,t,a){if(e.tag===3)Th(e,e,a);else for(;t!==null;){if(t.tag===3){Th(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(za===null||!za.has(l))){e=mn(a,e),a=zm(2),l=Ca(t,a,2),l!==null&&(km(a,l,t,e),rt(l,2),Hn(l));break}}t=t.return}}function Iu(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new ex;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(qu=!0,o.add(a),e=rx.bind(null,e,t,a),t.then(e,e))}function rx(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ie===e&&(Ue&a)===a&&(ot===4||ot===3&&(Ue&62914560)===Ue&&300>Le()-fi?(Fe&2)===0&&Wl(e,0):Fu|=a,Il===Ue&&(Il=0)),Hn(e)}function zh(e,t){t===0&&(t=zt()),e=al(e,t),e!==null&&(rt(e,t),Hn(e))}function sx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),zh(e,a)}function ix(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(t),zh(e,a)}function ox(e,t){return ne(e,t)}var vi=null,tr=null,Pu=!1,bi=!1,Wu=!1,Da=0;function Hn(e){e!==tr&&e.next===null&&(tr===null?vi=tr=e:tr=tr.next=e),bi=!0,Pu||(Pu=!0,cx())}function Qr(e,t){if(!Wu&&bi){Wu=!0;do for(var a=!1,l=vi;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var d=0;else{var p=l.suspendedLanes,b=l.pingedLanes;d=(1<<31-Tt(42|e)+1)-1,d&=o&~(p&~b),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,Oh(l,d))}else d=Ue,d=Ee(l,l===Ie?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||nt(l,d)||(a=!0,Oh(l,d));l=l.next}while(a);Wu=!1}}function ux(){kh()}function kh(){bi=Pu=!1;var e=0;Da!==0&&bx()&&(e=Da);for(var t=Le(),a=null,l=vi;l!==null;){var o=l.next,d=Ah(l,t);d===0?(l.next=null,a===null?vi=o:a.next=o,o===null&&(tr=a)):(a=l,(e!==0||(d&3)!==0)&&(bi=!0)),l=o}pt!==0&&pt!==5||Qr(e),Da!==0&&(Da=0)}function Ah(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var p=31-Tt(d),b=1<<p,_=o[p];_===-1?((b&a)===0||(b&l)!==0)&&(o[p]=vt(b,t)):_<=t&&(e.expiredLanes|=b),d&=~b}if(t=Ie,a=Ue,a=Ee(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Se(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||nt(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Se(l),wn(a)){case 2:case 8:a=qn;break;case 32:a=Za;break;case 268435456:a=Fn;break;default:a=Za}return l=Dh.bind(null,e),a=ne(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Se(l),e.callbackPriority=2,e.callbackNode=null,2}function Dh(e,t){if(pt!==0&&pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(xi()&&e.callbackNode!==a)return null;var l=Ue;return l=Ee(e,e===Ie?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(gh(e,l,t),Ah(e,Le()),e.callbackNode!=null&&e.callbackNode===a?Dh.bind(null,e):null)}function Oh(e,t){if(xi())return null;gh(e,t,!0)}function cx(){wx(function(){(Fe&6)!==0?ne(jt,ux):kh()})}function ec(){if(Da===0){var e=$l;e===0&&(e=vl,vl<<=1,(vl&261888)===0&&(vl=256)),Da=e}return Da}function Hh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Es(""+e)}function Bh(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function dx(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var d=Hh((o[Vt]||null).action),p=l.submitter;p&&(t=(t=p[Vt]||null)?Hh(t.formAction):p.getAttribute("formAction"),t!==null&&(d=t,p=null));var b=new ks("action","action",null,l,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Da!==0){var _=p?Bh(o,p):new FormData(o);bu(a,{pending:!0,data:_,method:o.method,action:d},null,_)}}else typeof d=="function"&&(b.preventDefault(),_=p?Bh(o,p):new FormData(o),bu(a,{pending:!0,data:_,method:o.method,action:d},d,_))},currentTarget:o}]})}}for(var tc=0;tc<Bo.length;tc++){var nc=Bo[tc],fx=nc.toLowerCase(),mx=nc[0].toUpperCase()+nc.slice(1);Nn(fx,"on"+mx)}Nn(hf,"onAnimationEnd"),Nn(gf,"onAnimationIteration"),Nn(pf,"onAnimationStart"),Nn("dblclick","onDoubleClick"),Nn("focusin","onFocus"),Nn("focusout","onBlur"),Nn(My,"onTransitionRun"),Nn(Ty,"onTransitionStart"),Nn(zy,"onTransitionCancel"),Nn(yf,"onTransitionEnd"),Rl("onMouseEnter",["mouseout","mouseover"]),Rl("onMouseLeave",["mouseout","mouseover"]),Rl("onPointerEnter",["pointerout","pointerover"]),Rl("onPointerLeave",["pointerout","pointerover"]),Wa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Wa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Wa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Wa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Wa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Wa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zr="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(" "),hx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zr));function Lh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var d=void 0;if(t)for(var p=l.length-1;0<=p;p--){var b=l[p],_=b.instance,D=b.currentTarget;if(b=b.listener,_!==d&&o.isPropagationStopped())break e;d=b,o.currentTarget=D;try{d(o)}catch(V){Os(V)}o.currentTarget=null,d=_}else for(p=0;p<l.length;p++){if(b=l[p],_=b.instance,D=b.currentTarget,b=b.listener,_!==d&&o.isPropagationStopped())break e;d=b,o.currentTarget=D;try{d(o)}catch(V){Os(V)}o.currentTarget=null,d=_}}}}function He(e,t){var a=t[go];a===void 0&&(a=t[go]=new Set);var l=e+"__bubble";a.has(l)||(Uh(t,e,2,!1),a.add(l))}function ac(e,t,a){var l=0;t&&(l|=4),Uh(a,e,l,t)}var Si="_reactListening"+Math.random().toString(36).slice(2);function lc(e){if(!e[Si]){e[Si]=!0,zd.forEach(function(a){a!=="selectionchange"&&(hx.has(a)||ac(a,!1,e),ac(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Si]||(t[Si]=!0,ac("selectionchange",!1,t))}}function Uh(e,t,a,l){switch(hg(t)){case 2:var o=Gx;break;case 8:o=qx;break;default:o=vc}a=o.bind(null,t,a,e),o=void 0,!jo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function rc(e,t,a,l,o){var d=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var p=l.tag;if(p===3||p===4){var b=l.stateNode.containerInfo;if(b===o)break;if(p===4)for(p=l.return;p!==null;){var _=p.tag;if((_===3||_===4)&&p.stateNode.containerInfo===o)return;p=p.return}for(;b!==null;){if(p=Nl(b),p===null)return;if(_=p.tag,_===5||_===6||_===26||_===27){l=d=p;continue e}b=b.parentNode}}l=l.return}qd(function(){var D=d,V=wo(a),Y=[];e:{var O=xf.get(e);if(O!==void 0){var H=ks,me=e;switch(e){case"keypress":if(Ts(a)===0)break e;case"keydown":case"keyup":H=iy;break;case"focusin":me="focus",H=Eo;break;case"focusout":me="blur",H=Eo;break;case"beforeblur":case"afterblur":H=Eo;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Kd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=Z0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=cy;break;case hf:case gf:case pf:H=P0;break;case yf:H=fy;break;case"scroll":case"scrollend":H=X0;break;case"wheel":H=hy;break;case"copy":case"cut":case"paste":H=ey;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Qd;break;case"toggle":case"beforetoggle":H=py}var we=(t&4)!==0,Ze=!we&&(e==="scroll"||e==="scrollend"),k=we?O!==null?O+"Capture":null:O;we=[];for(var z=D,A;z!==null;){var F=z;if(A=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||A===null||k===null||(F=yr(z,k),F!=null&&we.push(Jr(z,F,A))),Ze)break;z=z.return}0<we.length&&(O=new H(O,me,null,a,V),Y.push({event:O,listeners:we}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",O&&a!==So&&(me=a.relatedTarget||a.fromElement)&&(Nl(me)||me[wl]))break e;if((H||O)&&(O=V.window===V?V:(O=V.ownerDocument)?O.defaultView||O.parentWindow:window,H?(me=a.relatedTarget||a.toElement,H=D,me=me?Nl(me):null,me!==null&&(Ze=f(me),we=me.tag,me!==Ze||we!==5&&we!==27&&we!==6)&&(me=null)):(H=null,me=D),H!==me)){if(we=Kd,F="onMouseLeave",k="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(we=Qd,F="onPointerLeave",k="onPointerEnter",z="pointer"),Ze=H==null?O:pr(H),A=me==null?O:pr(me),O=new we(F,z+"leave",H,a,V),O.target=Ze,O.relatedTarget=A,F=null,Nl(V)===D&&(we=new we(k,z+"enter",me,a,V),we.target=A,we.relatedTarget=Ze,F=we),Ze=F,H&&me)t:{for(we=gx,k=H,z=me,A=0,F=k;F;F=we(F))A++;F=0;for(var ve=z;ve;ve=we(ve))F++;for(;0<A-F;)k=we(k),A--;for(;0<F-A;)z=we(z),F--;for(;A--;){if(k===z||z!==null&&k===z.alternate){we=k;break t}k=we(k),z=we(z)}we=null}else we=null;H!==null&&$h(Y,O,H,we,!1),me!==null&&Ze!==null&&$h(Y,Ze,me,we,!0)}}e:{if(O=D?pr(D):window,H=O.nodeName&&O.nodeName.toLowerCase(),H==="select"||H==="input"&&O.type==="file")var Ge=nf;else if(ef(O))if(af)Ge=Ry;else{Ge=jy;var ge=Ny}else H=O.nodeName,!H||H.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?D&&bo(D.elementType)&&(Ge=nf):Ge=Cy;if(Ge&&(Ge=Ge(e,D))){tf(Y,Ge,a,V);break e}ge&&ge(e,O,D),e==="focusout"&&D&&O.type==="number"&&D.memoizedProps.value!=null&&vo(O,"number",O.value)}switch(ge=D?pr(D):window,e){case"focusin":(ef(ge)||ge.contentEditable==="true")&&(kl=ge,Do=D,Cr=null);break;case"focusout":Cr=Do=kl=null;break;case"mousedown":Oo=!0;break;case"contextmenu":case"mouseup":case"dragend":Oo=!1,ff(Y,a,V);break;case"selectionchange":if(Ey)break;case"keydown":case"keyup":ff(Y,a,V)}var Ae;if(To)e:{switch(e){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else zl?Pd(e,a)&&($e="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&($e="onCompositionStart");$e&&(Zd&&a.locale!=="ko"&&(zl||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&zl&&(Ae=Fd()):(xa=V,Co="value"in xa?xa.value:xa.textContent,zl=!0)),ge=wi(D,$e),0<ge.length&&($e=new Xd($e,e,null,a,V),Y.push({event:$e,listeners:ge}),Ae?$e.data=Ae:(Ae=Wd(a),Ae!==null&&($e.data=Ae)))),(Ae=xy?vy(e,a):by(e,a))&&($e=wi(D,"onBeforeInput"),0<$e.length&&(ge=new Xd("onBeforeInput","beforeinput",null,a,V),Y.push({event:ge,listeners:$e}),ge.data=Ae)),dx(Y,e,D,a,V)}Lh(Y,t)})}function Jr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function wi(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,d=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||d===null||(o=yr(e,a),o!=null&&l.unshift(Jr(e,o,d)),o=yr(e,t),o!=null&&l.push(Jr(e,o,d))),e.tag===3)return l;e=e.return}return[]}function gx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $h(e,t,a,l,o){for(var d=t._reactName,p=[];a!==null&&a!==l;){var b=a,_=b.alternate,D=b.stateNode;if(b=b.tag,_!==null&&_===l)break;b!==5&&b!==26&&b!==27||D===null||(_=D,o?(D=yr(a,d),D!=null&&p.unshift(Jr(a,D,_))):o||(D=yr(a,d),D!=null&&p.push(Jr(a,D,_)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var px=/\r\n?/g,yx=/\u0000|\uFFFD/g;function Vh(e){return(typeof e=="string"?e:""+e).replace(px,`
49
+ `).replace(yx,"")}function Gh(e,t){return t=Vh(t),Vh(e)===t}function Qe(e,t,a,l,o,d){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||El(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&El(e,""+l);break;case"className":Rs(e,"class",l);break;case"tabIndex":Rs(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Rs(e,a,l);break;case"style":Vd(e,l,d);break;case"data":if(t!=="object"){Rs(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Es(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&Qe(e,t,"name",o.name,o,null),Qe(e,t,"formEncType",o.formEncType,o,null),Qe(e,t,"formMethod",o.formMethod,o,null),Qe(e,t,"formTarget",o.formTarget,o,null)):(Qe(e,t,"encType",o.encType,o,null),Qe(e,t,"method",o.method,o,null),Qe(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Es(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Kn);break;case"onScroll":l!=null&&He("scroll",e);break;case"onScrollEnd":l!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Es(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":He("beforetoggle",e),He("toggle",e),Cs(e,"popover",l);break;case"xlinkActuate":Yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Yn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Yn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Yn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Yn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Cs(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Y0.get(a)||a,Cs(e,a,l))}}function sc(e,t,a,l,o,d){switch(a){case"style":Vd(e,l,d);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof l=="string"?El(e,l):(typeof l=="number"||typeof l=="bigint")&&El(e,""+l);break;case"onScroll":l!=null&&He("scroll",e);break;case"onScrollEnd":l!=null&&He("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Kn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),d=e[Vt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,o),typeof l=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Cs(e,a,l)}}}function Mt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var l=!1,o=!1,d;for(d in a)if(a.hasOwnProperty(d)){var p=a[d];if(p!=null)switch(d){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Qe(e,t,d,p,a,null)}}o&&Qe(e,t,"srcSet",a.srcSet,a,null),l&&Qe(e,t,"src",a.src,a,null);return;case"input":He("invalid",e);var b=d=p=o=null,_=null,D=null;for(l in a)if(a.hasOwnProperty(l)){var V=a[l];if(V!=null)switch(l){case"name":o=V;break;case"type":p=V;break;case"checked":_=V;break;case"defaultChecked":D=V;break;case"value":d=V;break;case"defaultValue":b=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(i(137,t));break;default:Qe(e,t,l,V,a,null)}}Bd(e,d,b,_,D,p,o,!1);return;case"select":He("invalid",e),l=p=d=null;for(o in a)if(a.hasOwnProperty(o)&&(b=a[o],b!=null))switch(o){case"value":d=b;break;case"defaultValue":p=b;break;case"multiple":l=b;default:Qe(e,t,o,b,a,null)}t=d,a=p,e.multiple=!!l,t!=null?_l(e,!!l,t,!1):a!=null&&_l(e,!!l,a,!0);return;case"textarea":He("invalid",e),d=o=l=null;for(p in a)if(a.hasOwnProperty(p)&&(b=a[p],b!=null))switch(p){case"value":l=b;break;case"defaultValue":o=b;break;case"children":d=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(i(91));break;default:Qe(e,t,p,b,a,null)}Ud(e,l,o,d);return;case"option":for(_ in a)if(a.hasOwnProperty(_)&&(l=a[_],l!=null))switch(_){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Qe(e,t,_,l,a,null)}return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(l=0;l<Zr.length;l++)He(Zr[l],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in a)if(a.hasOwnProperty(D)&&(l=a[D],l!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Qe(e,t,D,l,a,null)}return;default:if(bo(t)){for(V in a)a.hasOwnProperty(V)&&(l=a[V],l!==void 0&&sc(e,t,V,l,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(l=a[b],l!=null&&Qe(e,t,b,l,a,null))}function xx(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,d=null,p=null,b=null,_=null,D=null,V=null;for(H in a){var Y=a[H];if(a.hasOwnProperty(H)&&Y!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":_=Y;default:l.hasOwnProperty(H)||Qe(e,t,H,null,l,Y)}}for(var O in l){var H=l[O];if(Y=a[O],l.hasOwnProperty(O)&&(H!=null||Y!=null))switch(O){case"type":d=H;break;case"name":o=H;break;case"checked":D=H;break;case"defaultChecked":V=H;break;case"value":p=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(137,t));break;default:H!==Y&&Qe(e,t,O,H,l,Y)}}xo(e,p,b,_,D,V,d,o);return;case"select":H=p=b=O=null;for(d in a)if(_=a[d],a.hasOwnProperty(d)&&_!=null)switch(d){case"value":break;case"multiple":H=_;default:l.hasOwnProperty(d)||Qe(e,t,d,null,l,_)}for(o in l)if(d=l[o],_=a[o],l.hasOwnProperty(o)&&(d!=null||_!=null))switch(o){case"value":O=d;break;case"defaultValue":b=d;break;case"multiple":p=d;default:d!==_&&Qe(e,t,o,d,l,_)}t=b,a=p,l=H,O!=null?_l(e,!!a,O,!1):!!l!=!!a&&(t!=null?_l(e,!!a,t,!0):_l(e,!!a,a?[]:"",!1));return;case"textarea":H=O=null;for(b in a)if(o=a[b],a.hasOwnProperty(b)&&o!=null&&!l.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Qe(e,t,b,null,l,o)}for(p in l)if(o=l[p],d=a[p],l.hasOwnProperty(p)&&(o!=null||d!=null))switch(p){case"value":O=o;break;case"defaultValue":H=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(i(91));break;default:o!==d&&Qe(e,t,p,o,l,d)}Ld(e,O,H);return;case"option":for(var me in a)if(O=a[me],a.hasOwnProperty(me)&&O!=null&&!l.hasOwnProperty(me))switch(me){case"selected":e.selected=!1;break;default:Qe(e,t,me,null,l,O)}for(_ in l)if(O=l[_],H=a[_],l.hasOwnProperty(_)&&O!==H&&(O!=null||H!=null))switch(_){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:Qe(e,t,_,O,l,H)}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 we in a)O=a[we],a.hasOwnProperty(we)&&O!=null&&!l.hasOwnProperty(we)&&Qe(e,t,we,null,l,O);for(D in l)if(O=l[D],H=a[D],l.hasOwnProperty(D)&&O!==H&&(O!=null||H!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(i(137,t));break;default:Qe(e,t,D,O,l,H)}return;default:if(bo(t)){for(var Ze in a)O=a[Ze],a.hasOwnProperty(Ze)&&O!==void 0&&!l.hasOwnProperty(Ze)&&sc(e,t,Ze,void 0,l,O);for(V in l)O=l[V],H=a[V],!l.hasOwnProperty(V)||O===H||O===void 0&&H===void 0||sc(e,t,V,O,l,H);return}}for(var k in a)O=a[k],a.hasOwnProperty(k)&&O!=null&&!l.hasOwnProperty(k)&&Qe(e,t,k,null,l,O);for(Y in l)O=l[Y],H=a[Y],!l.hasOwnProperty(Y)||O===H||O==null&&H==null||Qe(e,t,Y,O,l,H)}function qh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function vx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],d=o.transferSize,p=o.initiatorType,b=o.duration;if(d&&b&&qh(p)){for(p=0,b=o.responseEnd,l+=1;l<a.length;l++){var _=a[l],D=_.startTime;if(D>b)break;var V=_.transferSize,Y=_.initiatorType;V&&qh(Y)&&(_=_.responseEnd,p+=V*(_<b?1:(b-D)/(_-D)))}if(--l,t+=8*(d+p)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ic=null,oc=null;function Ni(e){return e.nodeType===9?e:e.ownerDocument}function Fh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Yh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function uc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var cc=null;function bx(){var e=window.event;return e&&e.type==="popstate"?e===cc?!1:(cc=e,!0):(cc=null,!1)}var Kh=typeof setTimeout=="function"?setTimeout:void 0,Sx=typeof clearTimeout=="function"?clearTimeout:void 0,Xh=typeof Promise=="function"?Promise:void 0,wx=typeof queueMicrotask=="function"?queueMicrotask:typeof Xh<"u"?function(e){return Xh.resolve(null).then(e).catch(Nx)}:Kh;function Nx(e){setTimeout(function(){throw e})}function Oa(e){return e==="head"}function Qh(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),rr(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ir(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ir(a);for(var d=a.firstChild;d;){var p=d.nextSibling,b=d.nodeName;d[gr]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=p}}else a==="body"&&Ir(e.ownerDocument.body);a=o}while(a);rr(t)}function Zh(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function dc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":dc(a),po(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function jx(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[gr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=xn(e.nextSibling),e===null)break}return null}function Cx(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=xn(e.nextSibling),e===null))return null;return e}function Jh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=xn(e.nextSibling),e===null))return null;return e}function fc(e){return e.data==="$?"||e.data==="$~"}function mc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Rx(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function xn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var hc=null;function Ih(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return xn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Ph(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Wh(e,t,a){switch(t=Ni(a),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Ir(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);po(e)}var vn=new Map,eg=new Set;function ji(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var oa=$.d;$.d={f:_x,r:Ex,D:Mx,C:Tx,L:zx,m:kx,X:Dx,S:Ax,M:Ox};function _x(){var e=oa.f(),t=gi();return e||t}function Ex(e){var t=jl(e);t!==null&&t.tag===5&&t.type==="form"?ym(t):oa.r(e)}var nr=typeof document>"u"?null:document;function tg(e,t,a){var l=nr;if(l&&typeof t=="string"&&t){var o=dn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),eg.has(o)||(eg.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),Mt(t,"link",e),bt(t),l.head.appendChild(t)))}}function Mx(e){oa.D(e),tg("dns-prefetch",e,null)}function Tx(e,t){oa.C(e,t),tg("preconnect",e,t)}function zx(e,t,a){oa.L(e,t,a);var l=nr;if(l&&e&&t){var o='link[rel="preload"][as="'+dn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+dn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+dn(a.imageSizes)+'"]')):o+='[href="'+dn(e)+'"]';var d=o;switch(t){case"style":d=ar(e);break;case"script":d=lr(e)}vn.has(d)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),vn.set(d,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(Pr(d))||t==="script"&&l.querySelector(Wr(d))||(t=l.createElement("link"),Mt(t,"link",e),bt(t),l.head.appendChild(t)))}}function kx(e,t){oa.m(e,t);var a=nr;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+dn(l)+'"][href="'+dn(e)+'"]',d=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=lr(e)}if(!vn.has(d)&&(e=x({rel:"modulepreload",href:e},t),vn.set(d,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Wr(d)))return}l=a.createElement("link"),Mt(l,"link",e),bt(l),a.head.appendChild(l)}}}function Ax(e,t,a){oa.S(e,t,a);var l=nr;if(l&&e){var o=Cl(l).hoistableStyles,d=ar(e);t=t||"default";var p=o.get(d);if(!p){var b={loading:0,preload:null};if(p=l.querySelector(Pr(d)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=vn.get(d))&&gc(e,a);var _=p=l.createElement("link");bt(_),Mt(_,"link",e),_._p=new Promise(function(D,V){_.onload=D,_.onerror=V}),_.addEventListener("load",function(){b.loading|=1}),_.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Ci(p,t,l)}p={type:"stylesheet",instance:p,count:1,state:b},o.set(d,p)}}}function Dx(e,t){oa.X(e,t);var a=nr;if(a&&e){var l=Cl(a).hoistableScripts,o=lr(e),d=l.get(o);d||(d=a.querySelector(Wr(o)),d||(e=x({src:e,async:!0},t),(t=vn.get(o))&&pc(e,t),d=a.createElement("script"),bt(d),Mt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(o,d))}}function Ox(e,t){oa.M(e,t);var a=nr;if(a&&e){var l=Cl(a).hoistableScripts,o=lr(e),d=l.get(o);d||(d=a.querySelector(Wr(o)),d||(e=x({src:e,async:!0,type:"module"},t),(t=vn.get(o))&&pc(e,t),d=a.createElement("script"),bt(d),Mt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(o,d))}}function ng(e,t,a,l){var o=(o=ie.current)?ji(o):null;if(!o)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=ar(a.href),a=Cl(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ar(a.href);var d=Cl(o).hoistableStyles,p=d.get(e);if(p||(o=o.ownerDocument||o,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,p),(d=o.querySelector(Pr(e)))&&!d._p&&(p.instance=d,p.state.loading=5),vn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},vn.set(e,a),d||Hx(o,e,a,p.state))),t&&l===null)throw Error(i(528,""));return p}if(t&&l!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=lr(a),a=Cl(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function ar(e){return'href="'+dn(e)+'"'}function Pr(e){return'link[rel="stylesheet"]['+e+"]"}function ag(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Hx(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Mt(t,"link",a),bt(t),e.head.appendChild(t))}function lr(e){return'[src="'+dn(e)+'"]'}function Wr(e){return"script[async]"+e}function lg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+dn(a.href)+'"]');if(l)return t.instance=l,bt(l),l;var o=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),bt(l),Mt(l,"style",o),Ci(l,a.precedence,e),t.instance=l;case"stylesheet":o=ar(a.href);var d=e.querySelector(Pr(o));if(d)return t.state.loading|=4,t.instance=d,bt(d),d;l=ag(a),(o=vn.get(o))&&gc(l,o),d=(e.ownerDocument||e).createElement("link"),bt(d);var p=d;return p._p=new Promise(function(b,_){p.onload=b,p.onerror=_}),Mt(d,"link",l),t.state.loading|=4,Ci(d,a.precedence,e),t.instance=d;case"script":return d=lr(a.src),(o=e.querySelector(Wr(d)))?(t.instance=o,bt(o),o):(l=a,(o=vn.get(d))&&(l=x({},a),pc(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),bt(o),Mt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Ci(l,a.precedence,e));return t.instance}function Ci(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,d=o,p=0;p<l.length;p++){var b=l[p];if(b.dataset.precedence===t)d=b;else if(d!==o)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function gc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function pc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ri=null;function rg(e,t,a){if(Ri===null){var l=new Map,o=Ri=new Map;o.set(a,l)}else o=Ri,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var d=a[o];if(!(d[gr]||d[Ct]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var p=d.getAttribute(t)||"";p=e+p;var b=l.get(p);b?b.push(d):l.set(p,[d])}}return l}function sg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Bx(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ig(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Lx(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=ar(l.href),d=t.querySelector(Pr(o));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_i.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,bt(d);return}d=t.ownerDocument||t,l=ag(l),(o=vn.get(o))&&gc(l,o),d=d.createElement("link"),bt(d);var p=d;p._p=new Promise(function(b,_){p.onload=b,p.onerror=_}),Mt(d,"link",l),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=_i.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var yc=0;function Ux(e,t){return e.stylesheets&&e.count===0&&Mi(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Mi(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&yc===0&&(yc=62500*vx());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Mi(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>yc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function _i(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Mi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ei=null;function Mi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ei=new Map,t.forEach($x,e),Ei=null,_i.call(e))}function $x(e,t){if(!(t.state.loading&4)){var a=Ei.get(e);if(a)var l=a.get(null);else{a=new Map,Ei.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<o.length;d++){var p=o[d];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),l=p)}l&&a.set(null,l)}o=t.instance,p=o.getAttribute("data-precedence"),d=a.get(p)||l,d===l&&a.set(null,o),a.set(p,o),this.count++,l=_i.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),d?d.parentNode.insertBefore(o,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var es={$$typeof:B,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function Vx(e,t,a,l,o,d,p,b,_){this.tag=1,this.containerInfo=e,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=pa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pa(0),this.hiddenUpdates=pa(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=d,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function og(e,t,a,l,o,d,p,b,_,D,V,Y){return e=new Vx(e,t,a,p,_,D,V,Y,b),t=1,d===!0&&(t|=24),d=Pt(3,null,null,t),e.current=d,d.stateNode=e,t=Jo(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:l,isDehydrated:a,cache:t},eu(d),e}function ug(e){return e?(e=Ol,e):Ol}function cg(e,t,a,l,o,d){o=ug(o),l.context===null?l.context=o:l.pendingContext=o,l=ja(t),l.payload={element:a},d=d===void 0?null:d,d!==null&&(l.callback=d),a=Ca(e,l,t),a!==null&&(Xt(a,e,t),kr(a,e,t))}function dg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function xc(e,t){dg(e,t),(e=e.alternate)&&dg(e,t)}function fg(e){if(e.tag===13||e.tag===31){var t=al(e,67108864);t!==null&&Xt(t,e,67108864),xc(e,67108864)}}function mg(e){if(e.tag===13||e.tag===31){var t=an();t=Sl(t);var a=al(e,t);a!==null&&Xt(a,e,t),xc(e,t)}}var Ti=!0;function Gx(e,t,a,l){var o=T.T;T.T=null;var d=$.p;try{$.p=2,vc(e,t,a,l)}finally{$.p=d,T.T=o}}function qx(e,t,a,l){var o=T.T;T.T=null;var d=$.p;try{$.p=8,vc(e,t,a,l)}finally{$.p=d,T.T=o}}function vc(e,t,a,l){if(Ti){var o=bc(l);if(o===null)rc(e,t,l,zi,a),gg(e,l);else if(Yx(o,e,t,a,l))l.stopPropagation();else if(gg(e,l),t&4&&-1<Fx.indexOf(e)){for(;o!==null;){var d=jl(o);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var p=kn(d.pendingLanes);if(p!==0){var b=d;for(b.pendingLanes|=2,b.entangledLanes|=2;p;){var _=1<<31-Tt(p);b.entanglements[1]|=_,p&=~_}Hn(d),(Fe&6)===0&&(mi=Le()+500,Qr(0))}}break;case 31:case 13:b=al(d,2),b!==null&&Xt(b,d,2),gi(),xc(d,2)}if(d=bc(l),d===null&&rc(e,t,l,zi,a),d===o)break;o=d}o!==null&&l.stopPropagation()}else rc(e,t,l,null,a)}}function bc(e){return e=wo(e),Sc(e)}var zi=null;function Sc(e){if(zi=null,e=Nl(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=y(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return zi=e,null}function hg(e){switch(e){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(Nt()){case jt:return 2;case qn:return 8;case Za:case mr:return 32;case Fn:return 268435456;default:return 32}default:return 32}}var wc=!1,Ha=null,Ba=null,La=null,ts=new Map,ns=new Map,Ua=[],Fx="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 gg(e,t){switch(e){case"focusin":case"focusout":Ha=null;break;case"dragenter":case"dragleave":Ba=null;break;case"mouseover":case"mouseout":La=null;break;case"pointerover":case"pointerout":ts.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ns.delete(t.pointerId)}}function as(e,t,a,l,o,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:d,targetContainers:[o]},t!==null&&(t=jl(t),t!==null&&fg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Yx(e,t,a,l,o){switch(t){case"focusin":return Ha=as(Ha,e,t,a,l,o),!0;case"dragenter":return Ba=as(Ba,e,t,a,l,o),!0;case"mouseover":return La=as(La,e,t,a,l,o),!0;case"pointerover":var d=o.pointerId;return ts.set(d,as(ts.get(d)||null,e,t,a,l,o)),!0;case"gotpointercapture":return d=o.pointerId,ns.set(d,as(ns.get(d)||null,e,t,a,l,o)),!0}return!1}function pg(e){var t=Nl(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,Md(e.priority,function(){mg(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,Md(e.priority,function(){mg(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ki(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=bc(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);So=l,a.target.dispatchEvent(l),So=null}else return t=jl(a),t!==null&&fg(t),e.blockedOn=a,!1;t.shift()}return!0}function yg(e,t,a){ki(e)&&a.delete(t)}function Kx(){wc=!1,Ha!==null&&ki(Ha)&&(Ha=null),Ba!==null&&ki(Ba)&&(Ba=null),La!==null&&ki(La)&&(La=null),ts.forEach(yg),ns.forEach(yg)}function Ai(e,t){e.blockedOn===t&&(e.blockedOn=null,wc||(wc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Kx)))}var Di=null;function xg(e){Di!==e&&(Di=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Di===e&&(Di=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(Sc(l||a)===null)continue;break}var d=jl(a);d!==null&&(e.splice(t,3),t-=3,bu(d,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function rr(e){function t(_){return Ai(_,e)}Ha!==null&&Ai(Ha,e),Ba!==null&&Ai(Ba,e),La!==null&&Ai(La,e),ts.forEach(t),ns.forEach(t);for(var a=0;a<Ua.length;a++){var l=Ua[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ua.length&&(a=Ua[0],a.blockedOn===null);)pg(a),a.blockedOn===null&&Ua.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],d=a[l+1],p=o[Vt]||null;if(typeof d=="function")p||xg(a);else if(p){var b=null;if(d&&d.hasAttribute("formAction")){if(o=d,p=d[Vt]||null)b=p.formAction;else if(Sc(o)!==null)continue}else b=p.action;typeof b=="function"?a[l+1]=b:(a.splice(l,3),l-=3),xg(a)}}}function vg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(p){return o=p})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Nc(e){this._internalRoot=e}Oi.prototype.render=Nc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,l=an();cg(a,l,e,t,null,null)},Oi.prototype.unmount=Nc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cg(e.current,2,null,e,null,null),gi(),t[wl]=null}};function Oi(e){this._internalRoot=e}Oi.prototype.unstable_scheduleHydration=function(e){if(e){var t=ho();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ua.length&&t!==0&&t<Ua[a].priority;a++);Ua.splice(a,0,e),a===0&&pg(e)}};var bg=r.version;if(bg!=="19.2.3")throw Error(i(527,bg,"19.2.3"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=h(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var Xx={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hi.isDisabled&&Hi.supportsFiber)try{Ja=Hi.inject(Xx),Ot=Hi}catch{}}return rs.createRoot=function(e,t){if(!u(e))throw Error(i(299));var a=!1,l="",o=_m,d=Em,p=Mm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=og(e,1,!1,null,null,a,l,null,o,d,p,vg),e[wl]=t.current,lc(e),new Nc(t)},rs.hydrateRoot=function(e,t,a){if(!u(e))throw Error(i(299));var l=!1,o="",d=_m,p=Em,b=Mm,_=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(_=a.formState)),t=og(e,1,!0,t,a??null,l,o,_,d,p,b,vg),t.context=ug(null),a=t.current,l=an(),l=Sl(l),o=ja(l),o.callback=null,Ca(a,o,l),a=l,t.current.lanes=a,rt(t,a),Hn(t),e[wl]=t.current,lc(e),new Oi(t)},rs.version="19.2.3",rs}var Tg;function lv(){if(Tg)return Rc.exports;Tg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Rc.exports=av(),Rc.exports}var rv=lv();/**
50
+ * react-router v7.18.1
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var ud=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,vp=/^[\\/]{2}/;function sv(n,r){return r+n.replace(/\\/g,"/")}var zg="popstate";function kg(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function iv(n={}){function r(i,u){var h;let f=(h=u.state)==null?void 0:h.masked,{pathname:m,search:y,hash:g}=f||i.location;return Yc("",{pathname:m,search:y,hash:g},u.state&&u.state.usr||null,u.state&&u.state.key||"default",f?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function s(i,u){return typeof u=="string"?u:ps(u)}return uv(r,s,null,n)}function lt(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function bn(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function ov(){return Math.random().toString(36).substring(2,10)}function Ag(n,r){return{usr:n.state,key:n.key,idx:r,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Yc(n,r,s=null,i,u){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?ur(r):r,state:s,key:r&&r.key||i||ov(),mask:u}}function ps({pathname:n="/",search:r="",hash:s=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function ur(n){let r={};if(n){let s=n.indexOf("#");s>=0&&(r.hash=n.substring(s),n=n.substring(0,s));let i=n.indexOf("?");i>=0&&(r.search=n.substring(i),n=n.substring(0,i)),n&&(r.pathname=n)}return r}function uv(n,r,s,i={}){let{window:u=document.defaultView,v5Compat:f=!1}=i,m=u.history,y="POP",g=null,h=v();h==null&&(h=0,m.replaceState({...m.state,idx:h},""));function v(){return(m.state||{idx:null}).idx}function x(){y="POP";let M=v(),E=M==null?null:M-h;h=M,g&&g({action:y,location:N.location,delta:E})}function S(M,E){y="PUSH";let L=kg(M)?M:Yc(N.location,M,E);h=v()+1;let B=Ag(L,h),ee=N.createHref(L.mask||L);try{m.pushState(B,"",ee)}catch(le){if(le instanceof DOMException&&le.name==="DataCloneError")throw le;u.location.assign(ee)}f&&g&&g({action:y,location:N.location,delta:1})}function j(M,E){y="REPLACE";let L=kg(M)?M:Yc(N.location,M,E);h=v();let B=Ag(L,h),ee=N.createHref(L.mask||L);m.replaceState(B,"",ee),f&&g&&g({action:y,location:N.location,delta:0})}function C(M){return cv(u,M)}let N={get action(){return y},get location(){return n(u,m)},listen(M){if(g)throw new Error("A history only accepts one active listener");return u.addEventListener(zg,x),g=M,()=>{u.removeEventListener(zg,x),g=null}},createHref(M){return r(u,M)},createURL:C,encodeLocation(M){let E=C(M);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:S,replace:j,go(M){return m.go(M)}};return N}function cv(n,r,s=!1){let i="http://localhost";n&&(i=n.location.origin!=="null"?n.location.origin:n.location.href),lt(i,"No window.location.(origin|href) available to create URL");let u=typeof r=="string"?r:ps(r);return u=u.replace(/ $/,"%20"),!s&&vp.test(u)&&(u=i+u),new URL(u,i)}function bp(n,r,s="/"){return dv(n,r,s,!1)}function dv(n,r,s,i,u){let f=typeof r=="string"?ur(r):r,m=ma(f.pathname||"/",s);if(m==null)return null;let y=fv(n),g=null,h=Nv(m);for(let v=0;g==null&&v<y.length;++v)g=wv(y[v],h,i);return g}function fv(n){let r=Sp(n);return mv(r),r}function Sp(n,r=[],s=[],i="",u=!1){let f=(m,y,g=u,h)=>{let v={relativePath:h===void 0?m.path||"":h,caseSensitive:m.caseSensitive===!0,childrenIndex:y,route:m};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(i)&&g)return;lt(v.relativePath.startsWith(i),`Absolute route path "${v.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(i.length)}let x=En([i,v.relativePath]),S=s.concat(v);m.children&&m.children.length>0&&(lt(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Sp(m.children,r,S,x,g)),!(m.path==null&&!m.index)&&r.push({path:x,score:bv(x,m.index),routesMeta:S.map((j,C)=>{let[N,M]=jp(j.relativePath,j.caseSensitive,C===S.length-1);return{...j,matcher:N,compiledParams:M}})})};return n.forEach((m,y)=>{var g;if(m.path===""||!((g=m.path)!=null&&g.includes("?")))f(m,y);else for(let h of wp(m.path))f(m,y,!0,h)}),r}function wp(n){let r=n.split("/");if(r.length===0)return[];let[s,...i]=r,u=s.endsWith("?"),f=s.replace(/\?$/,"");if(i.length===0)return u?[f,""]:[f];let m=wp(i.join("/")),y=[];return y.push(...m.map(g=>g===""?f:[f,g].join("/"))),u&&y.push(...m),y.map(g=>n.startsWith("/")&&g===""?"/":g)}function mv(n){n.sort((r,s)=>r.score!==s.score?s.score-r.score:Sv(r.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var hv=/^:[\w-]+$/,gv=3,pv=2,yv=1,xv=10,vv=-2,Dg=n=>n==="*";function bv(n,r){let s=n.split("/"),i=s.length;return s.some(Dg)&&(i+=vv),r&&(i+=pv),s.filter(u=>!Dg(u)).reduce((u,f)=>u+(hv.test(f)?gv:f===""?yv:xv),i)}function Sv(n,r){return n.length===r.length&&n.slice(0,-1).every((i,u)=>i===r[u])?n[n.length-1]-r[r.length-1]:0}function wv(n,r,s=!1){let{routesMeta:i}=n,u={},f="/",m=[];for(let y=0;y<i.length;++y){let g=i[y],h=y===i.length-1,v=f==="/"?r:r.slice(f.length)||"/",x={path:g.relativePath,caseSensitive:g.caseSensitive,end:h},S=g.matcher&&g.compiledParams?Np(x,v,g.matcher,g.compiledParams):Ji(x,v),j=g.route;if(!S&&h&&s&&!i[i.length-1].route.index&&(S=Ji({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},v)),!S)return null;Object.assign(u,S.params),m.push({params:u,pathname:En([f,S.pathname]),pathnameBase:Rv(En([f,S.pathnameBase])),route:j}),S.pathnameBase!=="/"&&(f=En([f,S.pathnameBase]))}return m}function Ji(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,i]=jp(n.path,n.caseSensitive,n.end);return Np(n,r,s,i)}function Np(n,r,s,i){let u=r.match(s);if(!u)return null;let f=u[0],m=f.replace(/(.)\/+$/,"$1"),y=u.slice(1);return{params:i.reduce((h,{paramName:v,isOptional:x},S)=>{if(v==="*"){let C=y[S]||"";m=f.slice(0,f.length-C.length).replace(/(.)\/+$/,"$1")}const j=y[S];return x&&!j?h[v]=void 0:h[v]=(j||"").replace(/%2F/g,"/"),h},{}),pathname:f,pathnameBase:m,pattern:n}}function jp(n,r=!1,s=!0){bn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let i=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,y,g,h,v)=>{if(i.push({paramName:y,isOptional:g!=null}),g){let x=v.charAt(h+m.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(i.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,r?void 0:"i"),i]}function Nv(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return bn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function ma(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let s=r.endsWith("/")?r.length-1:r.length,i=n.charAt(s);return i&&i!=="/"?null:n.slice(s)||"/"}function jv(n,r="/"){let{pathname:s,search:i="",hash:u=""}=typeof n=="string"?ur(n):n,f;return s?(s=Cp(s),s.startsWith("/")?f=Og(s.substring(1),"/"):f=Og(s,r)):f=r,{pathname:f,search:_v(i),hash:Ev(u)}}function Og(n,r){let s=Ii(r).split("/");return n.split("/").forEach(u=>{u===".."?s.length>1&&s.pop():u!=="."&&s.push(u)}),s.length>1?s.join("/"):"/"}function Tc(n,r,s,i){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` 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 Cv(n){return n.filter((r,s)=>s===0||r.route.path&&r.route.path.length>0)}function cd(n){let r=Cv(n);return r.map((s,i)=>i===r.length-1?s.pathname:s.pathnameBase)}function ro(n,r,s,i=!1){let u;typeof n=="string"?u=ur(n):(u={...n},lt(!u.pathname||!u.pathname.includes("?"),Tc("?","pathname","search",u)),lt(!u.pathname||!u.pathname.includes("#"),Tc("#","pathname","hash",u)),lt(!u.search||!u.search.includes("#"),Tc("#","search","hash",u)));let f=n===""||u.pathname==="",m=f?"/":u.pathname,y;if(m==null)y=s;else{let x=r.length-1;if(!i&&m.startsWith("..")){let S=m.split("/");for(;S[0]==="..";)S.shift(),x-=1;u.pathname=S.join("/")}y=x>=0?r[x]:"/"}let g=jv(u,y),h=m&&m!=="/"&&m.endsWith("/"),v=(f||m===".")&&s.endsWith("/");return!g.pathname.endsWith("/")&&(h||v)&&(g.pathname+="/"),g}var Cp=n=>n.replace(/[\\/]{2,}/g,"/"),En=n=>Cp(n.join("/")),Ii=n=>n.replace(/\/+$/,""),Rv=n=>Ii(n).replace(/^\/*/,"/"),_v=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Ev=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Mv=class{constructor(n,r,s,i=!1){this.status=n,this.statusText=r||"",this.internal=i,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function Tv(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function zv(n){let r=n.map(s=>s.route.path).filter(Boolean);return En(r)||"/"}var Rp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function _p(n,r){let s=n;if(typeof s!="string"||!ud.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,u=!1;if(Rp)try{let f=new URL(window.location.href),m=vp.test(s)?new URL(sv(s,f.protocol)):new URL(s),y=ma(m.pathname,r);m.origin===f.origin&&y!=null?s=y+m.search+m.hash:u=!0}catch{bn(!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:u,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ep=["POST","PUT","PATCH","DELETE"];new Set(Ep);var kv=["GET",...Ep];new Set(kv);var Av=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Dv(n){try{return Av.includes(new URL(n).protocol)}catch{return!1}}var cr=w.createContext(null);cr.displayName="DataRouter";var so=w.createContext(null);so.displayName="DataRouterState";var Mp=w.createContext(!1);function Ov(){return w.useContext(Mp)}var Tp=w.createContext({isTransitioning:!1});Tp.displayName="ViewTransition";var Hv=w.createContext(new Map);Hv.displayName="Fetchers";var Bv=w.createContext(null);Bv.displayName="Await";var rn=w.createContext(null);rn.displayName="Navigation";var bs=w.createContext(null);bs.displayName="Location";var Tn=w.createContext({outlet:null,matches:[],isDataRoute:!1});Tn.displayName="Route";var dd=w.createContext(null);dd.displayName="RouteError";var zp="REACT_ROUTER_ERROR",Lv="REDIRECT",Uv="ROUTE_ERROR_RESPONSE";function $v(n){if(n.startsWith(`${zp}:${Lv}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function Vv(n){if(n.startsWith(`${zp}:${Uv}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Mv(r.status,r.statusText,r.data)}catch{}}function Gv(n,{relative:r}={}){lt(dr(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=w.useContext(rn),{hash:u,pathname:f,search:m}=ws(n,{relative:r}),y=f;return s!=="/"&&(y=f==="/"?s:En([s,f])),i.createHref({pathname:y,search:m,hash:u})}function dr(){return w.useContext(bs)!=null}function sn(){return lt(dr(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(bs).location}var kp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ap(n){w.useContext(rn).static||w.useLayoutEffect(n)}function Ss(){let{isDataRoute:n}=w.useContext(Tn);return n?ab():qv()}function qv(){lt(dr(),"useNavigate() may be used only in the context of a <Router> component.");let n=w.useContext(cr),{basename:r,navigator:s}=w.useContext(rn),{matches:i}=w.useContext(Tn),{pathname:u}=sn(),f=JSON.stringify(cd(i)),m=w.useRef(!1);return Ap(()=>{m.current=!0}),w.useCallback((g,h={})=>{if(bn(m.current,kp),!m.current)return;if(typeof g=="number"){s.go(g);return}let v=ro(g,JSON.parse(f),u,h.relative==="path");n==null&&r!=="/"&&(v.pathname=v.pathname==="/"?r:En([r,v.pathname])),(h.replace?s.replace:s.push)(v,h.state,h)},[r,s,f,u,n])}var Fv=w.createContext(null);function Yv(n){let r=w.useContext(Tn).outlet;return w.useMemo(()=>r&&w.createElement(Fv.Provider,{value:n},r),[r,n])}function ws(n,{relative:r}={}){let{matches:s}=w.useContext(Tn),{pathname:i}=sn(),u=JSON.stringify(cd(s));return w.useMemo(()=>ro(n,JSON.parse(u),i,r==="path"),[n,u,i,r])}function Kv(n,r){return Dp(n,r)}function Dp(n,r,s){var M;lt(dr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=w.useContext(rn),{matches:u}=w.useContext(Tn),f=u[u.length-1],m=f?f.params:{},y=f?f.pathname:"/",g=f?f.pathnameBase:"/",h=f&&f.route;{let E=h&&h.path||"";Hp(y,!h||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let v=sn(),x;if(r){let E=typeof r=="string"?ur(r):r;lt(g==="/"||((M=E.pathname)==null?void 0:M.startsWith(g)),`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 "${g}" but pathname "${E.pathname}" was given in the \`location\` prop.`),x=E}else x=v;let S=x.pathname||"/",j=S;if(g!=="/"){let E=g.replace(/^\//,"").split("/");j="/"+S.replace(/^\//,"").split("/").slice(E.length).join("/")}let C=s&&s.state.matches.length?s.state.matches.map(E=>Object.assign(E,{route:s.manifest[E.route.id]||E.route})):bp(n,{pathname:j});bn(h||C!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),bn(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.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 N=Iv(C&&C.map(E=>Object.assign({},E,{params:Object.assign({},m,E.params),pathname:En([g,i.encodeLocation?i.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?g:En([g,i.encodeLocation?i.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),u,s);return r&&N?w.createElement(bs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},N):N}function Xv(){let n=nb(),r=Tv(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:i},f={padding:"2px 4px",backgroundColor:i},m=null;return console.error("Error handled by React Router default ErrorBoundary:",n),m=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:f},"ErrorBoundary")," or"," ",w.createElement("code",{style:f},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},r),s?w.createElement("pre",{style:u},s):null,m)}var Qv=w.createElement(Xv,null),Op=class extends w.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=Vv(n.digest);s&&(n=s)}let r=n!==void 0?w.createElement(Tn.Provider,{value:this.props.routeContext},w.createElement(dd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?w.createElement(Zv,{error:n},r):r}};Op.contextType=Mp;var zc=new WeakMap;function Zv({children:n,error:r}){let{basename:s}=w.useContext(rn);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let i=$v(r.digest);if(i){let u=zc.get(r);if(u)throw u;let f=_p(i.location,s),m=f.absoluteURL||f.to;if(Dv(m))throw new Error("Invalid redirect location");if(Rp&&!zc.get(r))if(f.isExternal||i.reloadDocument)window.location.href=m;else{const y=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:i.replace}));throw zc.set(r,y),y}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m}`})}}return n}function Jv({routeContext:n,match:r,children:s}){let i=w.useContext(cr);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(Tn.Provider,{value:n},s)}function Iv(n,r=[],s){let i=s==null?void 0:s.state;if(n==null){if(!i)return null;if(i.errors)n=i.matches;else if(r.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let u=n,f=i==null?void 0:i.errors;if(f!=null){let v=u.findIndex(x=>x.route.id&&(f==null?void 0:f[x.route.id])!==void 0);lt(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),u=u.slice(0,Math.min(u.length,v+1))}let m=!1,y=-1;if(s&&i){m=i.renderFallback;for(let v=0;v<u.length;v++){let x=u[v];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(y=v),x.route.id){let{loaderData:S,errors:j}=i,C=x.route.loader&&!S.hasOwnProperty(x.route.id)&&(!j||j[x.route.id]===void 0);if(x.route.lazy||C){s.isStatic&&(m=!0),y>=0?u=u.slice(0,y+1):u=[u[0]];break}}}}let g=s==null?void 0:s.onError,h=i&&g?(v,x)=>{var S,j;g(v,{location:i.location,params:((j=(S=i.matches)==null?void 0:S[0])==null?void 0:j.params)??{},pattern:zv(i.matches),errorInfo:x})}:void 0;return u.reduceRight((v,x,S)=>{let j,C=!1,N=null,M=null;i&&(j=f&&x.route.id?f[x.route.id]:void 0,N=x.route.errorElement||Qv,m&&(y<0&&S===0?(Hp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,M=null):y===S&&(C=!0,M=x.route.hydrateFallbackElement||null)));let E=r.concat(u.slice(0,S+1)),L=()=>{let B;return j?B=N:C?B=M:x.route.Component?B=w.createElement(x.route.Component,null):x.route.element?B=x.route.element:B=v,w.createElement(Jv,{match:x,routeContext:{outlet:v,matches:E,isDataRoute:i!=null},children:B})};return i&&(x.route.ErrorBoundary||x.route.errorElement||S===0)?w.createElement(Op,{location:i.location,revalidation:i.revalidation,component:N,error:j,children:L(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:h}):L()},null)}function fd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pv(n){let r=w.useContext(cr);return lt(r,fd(n)),r}function Wv(n){let r=w.useContext(so);return lt(r,fd(n)),r}function eb(n){let r=w.useContext(Tn);return lt(r,fd(n)),r}function md(n){let r=eb(n),s=r.matches[r.matches.length-1];return lt(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function tb(){return md("useRouteId")}function nb(){var i;let n=w.useContext(dd),r=Wv("useRouteError"),s=md("useRouteError");return n!==void 0?n:(i=r.errors)==null?void 0:i[s]}function ab(){let{router:n}=Pv("useNavigate"),r=md("useNavigate"),s=w.useRef(!1);return Ap(()=>{s.current=!0}),w.useCallback(async(u,f={})=>{bn(s.current,kp),s.current&&(typeof u=="number"?await n.navigate(u):await n.navigate(u,{fromRouteId:r,...f}))},[n,r])}var Hg={};function Hp(n,r,s){!r&&!Hg[n]&&(Hg[n]=!0,bn(!1,s))}w.memo(lb);function lb({routes:n,manifest:r,future:s,state:i,isStatic:u,onError:f}){return Dp(n,void 0,{manifest:r,state:i,isStatic:u,onError:f})}function rb({to:n,replace:r,state:s,relative:i}){lt(dr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:u}=w.useContext(rn);bn(!u,"<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:f}=w.useContext(Tn),{pathname:m}=sn(),y=Ss(),g=ro(n,cd(f),m,i==="path"),h=JSON.stringify(g);return w.useEffect(()=>{y(JSON.parse(h),{replace:r,state:s,relative:i})},[y,h,i,r,s]),null}function sb(n){return Yv(n.context)}function Rn(n){lt(!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 ib({basename:n="/",children:r=null,location:s,navigationType:i="POP",navigator:u,static:f=!1,useTransitions:m}){lt(!dr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=n.replace(/^\/*/,"/"),g=w.useMemo(()=>({basename:y,navigator:u,static:f,useTransitions:m,future:{}}),[y,u,f,m]);typeof s=="string"&&(s=ur(s));let{pathname:h="/",search:v="",hash:x="",state:S=null,key:j="default",mask:C}=s,N=w.useMemo(()=>{let M=ma(h,y);return M==null?null:{location:{pathname:M,search:v,hash:x,state:S,key:j,mask:C},navigationType:i}},[y,h,v,x,S,j,i,C]);return bn(N!=null,`<Router basename="${y}"> is not able to match the URL "${h}${v}${x}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:w.createElement(rn.Provider,{value:g},w.createElement(bs.Provider,{children:r,value:N}))}function ob({children:n,location:r}){return Kv(Kc(n),r)}function Kc(n,r=[]){let s=[];return w.Children.forEach(n,(i,u)=>{if(!w.isValidElement(i))return;let f=[...r,u];if(i.type===w.Fragment){s.push.apply(s,Kc(i.props.children,f));return}lt(i.type===Rn,`[${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>`),lt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let m={id:i.props.id||f.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&&(m.children=Kc(i.props.children,f)),s.push(m)}),s}var Xi="get",Qi="application/x-www-form-urlencoded";function io(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function ub(n){return io(n)&&n.tagName.toLowerCase()==="button"}function cb(n){return io(n)&&n.tagName.toLowerCase()==="form"}function db(n){return io(n)&&n.tagName.toLowerCase()==="input"}function fb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function mb(n,r){return n.button===0&&(!r||r==="_self")&&!fb(n)}function Xc(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((r,s)=>{let i=n[s];return r.concat(Array.isArray(i)?i.map(u=>[s,u]):[[s,i]])},[]))}function hb(n,r){let s=Xc(n);return r&&r.forEach((i,u)=>{s.has(u)||r.getAll(u).forEach(f=>{s.append(u,f)})}),s}var Bi=null;function gb(){if(Bi===null)try{new FormData(document.createElement("form"),0),Bi=!1}catch{Bi=!0}return Bi}var pb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kc(n){return n!=null&&!pb.has(n)?(bn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Qi}"`),null):n}function yb(n,r){let s,i,u,f,m;if(cb(n)){let y=n.getAttribute("action");i=y?ma(y,r):null,s=n.getAttribute("method")||Xi,u=kc(n.getAttribute("enctype"))||Qi,f=new FormData(n)}else if(ub(n)||db(n)&&(n.type==="submit"||n.type==="image")){let y=n.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||y.getAttribute("action");if(i=g?ma(g,r):null,s=n.getAttribute("formmethod")||y.getAttribute("method")||Xi,u=kc(n.getAttribute("formenctype"))||kc(y.getAttribute("enctype"))||Qi,f=new FormData(y,n),!gb()){let{name:h,type:v,value:x}=n;if(v==="image"){let S=h?`${h}.`:"";f.append(`${S}x`,"0"),f.append(`${S}y`,"0")}else h&&f.append(h,x)}}else{if(io(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Xi,i=null,u=Qi,m=n}return f&&u==="text/plain"&&(m=f,f=void 0),{action:i,method:s.toLowerCase(),encType:u,formData:f,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function hd(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Bp(n,r,s,i){let u=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${i}`:u.pathname=`${u.pathname}.${i}`:u.pathname==="/"?u.pathname=`_root.${i}`:r&&ma(u.pathname,r)==="/"?u.pathname=`${Ii(r)}/_root.${i}`:u.pathname=`${Ii(u.pathname)}.${i}`,u}async function xb(n,r){if(n.id in r)return r[n.id];try{let s=await import(n.module);return r[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function vb(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function bb(n,r,s){let i=await Promise.all(n.map(async u=>{let f=r.routes[u.route.id];if(f){let m=await xb(f,s);return m.links?m.links():[]}return[]}));return jb(i.flat(1).filter(vb).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function Bg(n,r,s,i,u,f){let m=(g,h)=>s[h]?g.route.id!==s[h].route.id:!0,y=(g,h)=>{var v;return s[h].pathname!==g.pathname||((v=s[h].route.path)==null?void 0:v.endsWith("*"))&&s[h].params["*"]!==g.params["*"]};return f==="assets"?r.filter((g,h)=>m(g,h)||y(g,h)):f==="data"?r.filter((g,h)=>{var x;let v=i.routes[g.route.id];if(!v||!v.hasLoader)return!1;if(m(g,h)||y(g,h))return!0;if(g.route.shouldRevalidate){let S=g.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:((x=s[0])==null?void 0:x.params)||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function Sb(n,r,{includeHydrateFallback:s}={}){return wb(n.map(i=>{let u=r.routes[i.route.id];if(!u)return[];let f=[u.module];return u.clientActionModule&&(f=f.concat(u.clientActionModule)),u.clientLoaderModule&&(f=f.concat(u.clientLoaderModule)),s&&u.hydrateFallbackModule&&(f=f.concat(u.hydrateFallbackModule)),u.imports&&(f=f.concat(u.imports)),f}).flat(1))}function wb(n){return[...new Set(n)]}function Nb(n){let r={},s=Object.keys(n).sort();for(let i of s)r[i]=n[i];return r}function jb(n,r){let s=new Set;return new Set(r),n.reduce((i,u)=>{let f=JSON.stringify(Nb(u));return s.has(f)||(s.add(f),i.push({key:f,link:u})),i},[])}function gd(){let n=w.useContext(cr);return hd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Cb(){let n=w.useContext(so);return hd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var pd=w.createContext(void 0);pd.displayName="FrameworkContext";function oo(){let n=w.useContext(pd);return hd(n,"You must render this element inside a <HydratedRouter> element"),n}function Rb(n,r){let s=w.useContext(pd),[i,u]=w.useState(!1),[f,m]=w.useState(!1),{onFocus:y,onBlur:g,onMouseEnter:h,onMouseLeave:v,onTouchStart:x}=r,S=w.useRef(null);w.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let N=E=>{E.forEach(L=>{m(L.isIntersecting)})},M=new IntersectionObserver(N,{threshold:.5});return S.current&&M.observe(S.current),()=>{M.disconnect()}}},[n]),w.useEffect(()=>{if(i){let N=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(N)}}},[i]);let j=()=>{u(!0)},C=()=>{u(!1),m(!1)};return s?n!=="intent"?[f,S,{}]:[f,S,{onFocus:ss(y,j),onBlur:ss(g,C),onMouseEnter:ss(h,j),onMouseLeave:ss(v,C),onTouchStart:ss(x,j)}]:[!1,S,{}]}function ss(n,r){return s=>{n&&n(s),s.defaultPrevented||r(s)}}function _b({page:n,...r}){let s=Ov(),{nonce:i}=oo(),{router:u}=gd(),f=w.useMemo(()=>bp(u.routes,n,u.basename),[u.routes,n,u.basename]);return f?(r.nonce==null&&i&&(r={...r,nonce:i}),s?w.createElement(Mb,{page:n,matches:f,...r}):w.createElement(Tb,{page:n,matches:f,...r})):null}function Eb(n){let{manifest:r,routeModules:s}=oo(),[i,u]=w.useState([]);return w.useEffect(()=>{let f=!1;return bb(n,r,s).then(m=>{f||u(m)}),()=>{f=!0}},[n,r,s]),i}function Mb({page:n,matches:r,...s}){let i=sn(),{future:u}=oo(),{basename:f}=gd(),m=w.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let y=Bp(n,f,u.v8_trailingSlashAwareDataRequests,"rsc"),g=!1,h=[];for(let v of r)typeof v.route.shouldRevalidate=="function"?g=!0:h.push(v.route.id);return g&&h.length>0&&y.searchParams.set("_routes",h.join(",")),[y.pathname+y.search]},[f,u.v8_trailingSlashAwareDataRequests,n,i,r]);return w.createElement(w.Fragment,null,m.map(y=>w.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...s})))}function Tb({page:n,matches:r,...s}){let i=sn(),{future:u,manifest:f,routeModules:m}=oo(),{basename:y}=gd(),{loaderData:g,matches:h}=Cb(),v=w.useMemo(()=>Bg(n,r,h,f,i,"data"),[n,r,h,f,i]),x=w.useMemo(()=>Bg(n,r,h,f,i,"assets"),[n,r,h,f,i]),S=w.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let N=new Set,M=!1;if(r.forEach(L=>{var ee;let B=f.routes[L.route.id];!B||!B.hasLoader||(!v.some(le=>le.route.id===L.route.id)&&L.route.id in g&&((ee=m[L.route.id])!=null&&ee.shouldRevalidate)||B.hasClientLoader?M=!0:N.add(L.route.id))}),N.size===0)return[];let E=Bp(n,y,u.v8_trailingSlashAwareDataRequests,"data");return M&&N.size>0&&E.searchParams.set("_routes",r.filter(L=>N.has(L.route.id)).map(L=>L.route.id).join(",")),[E.pathname+E.search]},[y,u.v8_trailingSlashAwareDataRequests,g,i,f,v,r,n,m]),j=w.useMemo(()=>Sb(x,f),[x,f]),C=Eb(x);return w.createElement(w.Fragment,null,S.map(N=>w.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...s})),j.map(N=>w.createElement("link",{key:N,rel:"modulepreload",href:N,...s})),C.map(({key:N,link:M})=>w.createElement("link",{key:N,nonce:s.nonce,...M,crossOrigin:M.crossOrigin??s.crossOrigin})))}function zb(...n){return r=>{n.forEach(s=>{typeof s=="function"?s(r):s!=null&&(s.current=r)})}}var kb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{kb&&(window.__reactRouterVersion="7.18.1")}catch{}function Ab({basename:n,children:r,useTransitions:s,window:i}){let u=w.useRef();u.current==null&&(u.current=iv({window:i,v5Compat:!0}));let f=u.current,[m,y]=w.useState({action:f.action,location:f.location}),g=w.useCallback(h=>{s===!1?y(h):w.startTransition(()=>y(h))},[s]);return w.useLayoutEffect(()=>f.listen(g),[f,g]),w.createElement(ib,{basename:n,children:r,location:m.location,navigationType:m.action,navigator:f,useTransitions:s})}var yd=w.forwardRef(function({onClick:r,discover:s="render",prefetch:i="none",relative:u,reloadDocument:f,replace:m,mask:y,state:g,target:h,to:v,preventScrollReset:x,viewTransition:S,defaultShouldRevalidate:j,...C},N){let{basename:M,navigator:E,useTransitions:L}=w.useContext(rn),B=typeof v=="string"&&ud.test(v),ee=_p(v,M);v=ee.to;let le=Gv(v,{relative:u}),I=sn(),P=null;if(y){let J=ro(y,[],I.mask?I.mask.pathname:"/",!0);M!=="/"&&(J.pathname=J.pathname==="/"?M:En([M,J.pathname])),P=E.createHref(J)}let[q,se,re]=Rb(i,C),Q=Bb(v,{replace:m,mask:y,state:g,target:h,preventScrollReset:x,relative:u,viewTransition:S,defaultShouldRevalidate:j,useTransitions:L});function oe(J){r&&r(J),J.defaultPrevented||Q(J)}let pe=!(ee.isExternal||f),K=w.createElement("a",{...C,...re,href:(pe?P:void 0)||ee.absoluteURL||le,onClick:pe?oe:r,ref:zb(N,se),target:h,"data-discover":!B&&s==="render"?"true":void 0});return q&&!B?w.createElement(w.Fragment,null,K,w.createElement(_b,{page:le})):K});yd.displayName="Link";var Db=w.forwardRef(function({"aria-current":r="page",caseSensitive:s=!1,className:i="",end:u=!1,style:f,to:m,viewTransition:y,children:g,...h},v){let x=ws(m,{relative:h.relative}),S=sn(),j=w.useContext(so),{navigator:C,basename:N}=w.useContext(rn),M=j!=null&&qb(x)&&y===!0,E=C.encodeLocation?C.encodeLocation(x).pathname:x.pathname,L=S.pathname,B=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;s||(L=L.toLowerCase(),B=B?B.toLowerCase():null,E=E.toLowerCase()),B&&N&&(B=ma(B,N)||B);const ee=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let le=L===E||!u&&L.startsWith(E)&&L.charAt(ee)==="/",I=B!=null&&(B===E||!u&&B.startsWith(E)&&B.charAt(E.length)==="/"),P={isActive:le,isPending:I,isTransitioning:M},q=le?r:void 0,se;typeof i=="function"?se=i(P):se=[i,le?"active":null,I?"pending":null,M?"transitioning":null].filter(Boolean).join(" ");let re=typeof f=="function"?f(P):f;return w.createElement(yd,{...h,"aria-current":q,className:se,ref:v,style:re,to:m,viewTransition:y},typeof g=="function"?g(P):g)});Db.displayName="NavLink";var Ob=w.forwardRef(({discover:n="render",fetcherKey:r,navigate:s,reloadDocument:i,replace:u,state:f,method:m=Xi,action:y,onSubmit:g,relative:h,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:S,...j},C)=>{let{useTransitions:N}=w.useContext(rn),M=Vb(),E=Gb(y,{relative:h}),L=m.toLowerCase()==="get"?"get":"post",B=typeof y=="string"&&ud.test(y),ee=le=>{if(g&&g(le),le.defaultPrevented)return;le.preventDefault();let I=le.nativeEvent.submitter,P=(I==null?void 0:I.getAttribute("formmethod"))||m,q=()=>M(I||le.currentTarget,{fetcherKey:r,method:P,navigate:s,replace:u,state:f,relative:h,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:S});N&&s!==!1?w.startTransition(()=>q()):q()};return w.createElement("form",{ref:C,method:L,action:E,onSubmit:i?g:ee,...j,"data-discover":!B&&n==="render"?"true":void 0})});Ob.displayName="Form";function Hb(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Lp(n){let r=w.useContext(cr);return lt(r,Hb(n)),r}function Bb(n,{target:r,replace:s,mask:i,state:u,preventScrollReset:f,relative:m,viewTransition:y,defaultShouldRevalidate:g,useTransitions:h}={}){let v=Ss(),x=sn(),S=ws(n,{relative:m});return w.useCallback(j=>{if(mb(j,r)){j.preventDefault();let C=s!==void 0?s:ps(x)===ps(S),N=()=>v(n,{replace:C,mask:i,state:u,preventScrollReset:f,relative:m,viewTransition:y,defaultShouldRevalidate:g});h?w.startTransition(()=>N()):N()}},[x,v,S,s,i,u,r,n,f,m,y,g,h])}function Lb(n){bn(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 r=w.useRef(Xc(n)),s=w.useRef(!1),i=sn(),u=w.useMemo(()=>hb(i.search,s.current?null:r.current),[i.search]),f=Ss(),m=w.useCallback((y,g)=>{const h=Xc(typeof y=="function"?y(new URLSearchParams(u)):y);s.current=!0,f("?"+h,g)},[f,u]);return[u,m]}var Ub=0,$b=()=>`__${String(++Ub)}__`;function Vb(){let{router:n}=Lp("useSubmit"),{basename:r}=w.useContext(rn),s=tb(),i=n.fetch,u=n.navigate;return w.useCallback(async(f,m={})=>{let{action:y,method:g,encType:h,formData:v,body:x}=yb(f,r);if(m.navigate===!1){let S=m.fetcherKey||$b();await i(S,s,m.action||y,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:v,body:x,formMethod:m.method||g,formEncType:m.encType||h,flushSync:m.flushSync})}else await u(m.action||y,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:v,body:x,formMethod:m.method||g,formEncType:m.encType||h,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[i,u,r,s])}function Gb(n,{relative:r}={}){let{basename:s}=w.useContext(rn),i=w.useContext(Tn);lt(i,"useFormAction must be used inside a RouteContext");let[u]=i.matches.slice(-1),f={...ws(n||".",{relative:r})},m=sn();if(n==null){f.search=m.search;let y=new URLSearchParams(f.search),g=y.getAll("index");if(g.some(v=>v==="")){y.delete("index"),g.filter(x=>x).forEach(x=>y.append("index",x));let v=y.toString();f.search=v?`?${v}`:""}}return(!n||n===".")&&u.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(f.pathname=f.pathname==="/"?s:En([s,f.pathname])),ps(f)}function qb(n,{relative:r}={}){let s=w.useContext(Tp);lt(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Lp("useViewTransitionState"),u=ws(n,{relative:r});if(!s.isTransitioning)return!1;let f=ma(s.currentLocation.pathname,i)||s.currentLocation.pathname,m=ma(s.nextLocation.pathname,i)||s.nextLocation.pathname;return Ji(u.pathname,m)!=null||Ji(u.pathname,f)!=null}var Fb=xp();const Yb=yp(Fb),Lg=n=>{let r;const s=new Set,i=(h,v)=>{const x=typeof h=="function"?h(r):h;if(!Object.is(x,r)){const S=r;r=v??(typeof x!="object"||x===null)?x:Object.assign({},r,x),s.forEach(j=>j(r,S))}},u=()=>r,y={setState:i,getState:u,getInitialState:()=>g,subscribe:h=>(s.add(h),()=>s.delete(h))},g=r=n(i,u,y);return y},Kb=(n=>n?Lg(n):Lg),Xb=n=>n;function Qb(n,r=Xb){const s=ae.useSyncExternalStore(n.subscribe,ae.useCallback(()=>r(n.getState()),[n,r]),ae.useCallback(()=>r(n.getInitialState()),[n,r]));return ae.useDebugValue(s),s}const Ug=n=>{const r=Kb(n),s=i=>Qb(r,i);return Object.assign(s,r),s},Zb=(n=>n?Ug(n):Ug);class Qc extends Error{constructor(r,s){super(r),this.status=s,this.name="DashboardFetchError"}}function Jb(n){return Zb((r,s)=>({apiBase:n,tables:{},selectedTable:null,functions:{queries:[]},status:null,setApiBase:i=>r({apiBase:i}),setSelectedTable:i=>r({selectedTable:i}),fetchTables:async()=>{const i=await fetch(`${s().apiBase}/_admin/tables`);if(!i.ok)throw new Qc(`Failed to load tables (${i.status})`,i.status);const u=await i.json();r({tables:u})},fetchTableData:async(i,u=50,f=0)=>{const m=await fetch(`${s().apiBase}/_admin/data/${i}?limit=${u}&offset=${f}`);if(!m.ok)throw new Qc(`Failed to load rows (${m.status})`,m.status);return m.json()},fetchFunctions:async()=>{const i=await fetch(`${s().apiBase}/_admin/functions`);if(!i.ok)return;const u=await i.json();r({functions:u})},fetchStatus:async()=>{try{const i=await fetch(`${s().apiBase}/_admin/status`);if(!i.ok)return;const u=await i.json();r({status:u})}catch{}},insertRow:async(i,u)=>{await fetch(`${s().apiBase}/_admin/data/${i}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)})},deleteRow:async(i,u)=>{await fetch(`${s().apiBase}/_admin/data/${i}/${u}`,{method:"DELETE"})}}))}const Ib=typeof window<"u"?window.location.origin:"http://localhost:5456",Zt=Jb(Ib),Pb=w.createContext(null);function ha(){const n=w.useContext(Pb);return n||{apiBase:typeof window<"u"?window.location.origin:"http://localhost:5456",appStatus:"running",backendStatus:"running",hasStatic:!1}}/**
61
+ * table-core
62
+ *
63
+ * Copyright (c) TanStack
64
+ *
65
+ * This source code is licensed under the MIT license found in the
66
+ * LICENSE.md file in the root directory of this source tree.
67
+ *
68
+ * @license MIT
69
+ */function qa(n,r){return typeof n=="function"?n(r):n}function ln(n,r){return s=>{r.setState(i=>({...i,[n]:qa(s,i[n])}))}}function uo(n){return n instanceof Function}function Wb(n){return Array.isArray(n)&&n.every(r=>typeof r=="number")}function e1(n,r){const s=[],i=u=>{u.forEach(f=>{s.push(f);const m=r(f);m!=null&&m.length&&i(m)})};return i(n),s}function Ce(n,r,s){let i=[],u;return f=>{let m;s.key&&s.debug&&(m=Date.now());const y=n(f);if(!(y.length!==i.length||y.some((v,x)=>i[x]!==v)))return u;i=y;let h;if(s.key&&s.debug&&(h=Date.now()),u=r(...y),s==null||s.onChange==null||s.onChange(u),s.key&&s.debug&&s!=null&&s.debug()){const v=Math.round((Date.now()-m)*100)/100,x=Math.round((Date.now()-h)*100)/100,S=x/16,j=(C,N)=>{for(C=String(C);C.length<N;)C=" "+C;return C};console.info(`%c⏱ ${j(x,5)} /${j(v,5)} ms`,`
70
+ font-size: .6rem;
71
+ font-weight: bold;
72
+ color: hsl(${Math.max(0,Math.min(120-120*S,120))}deg 100% 31%);`,s==null?void 0:s.key)}return u}}function Re(n,r,s,i){return{debug:()=>{var u;return(u=n==null?void 0:n.debugAll)!=null?u:n[r]},key:!1,onChange:i}}function t1(n,r,s,i){const u=()=>{var m;return(m=f.getValue())!=null?m:n.options.renderFallbackValue},f={id:`${r.id}_${s.id}`,row:r,column:s,getValue:()=>r.getValue(i),renderValue:u,getContext:Ce(()=>[n,s,r,f],(m,y,g,h)=>({table:m,column:y,row:g,cell:h,getValue:h.getValue,renderValue:h.renderValue}),Re(n.options,"debugCells"))};return n._features.forEach(m=>{m.createCell==null||m.createCell(f,s,r,n)},{}),f}function n1(n,r,s,i){var u,f;const y={...n._getDefaultColumnDef(),...r},g=y.accessorKey;let h=(u=(f=y.id)!=null?f:g?typeof String.prototype.replaceAll=="function"?g.replaceAll(".","_"):g.replace(/\./g,"_"):void 0)!=null?u:typeof y.header=="string"?y.header:void 0,v;if(y.accessorFn?v=y.accessorFn:g&&(g.includes(".")?v=S=>{let j=S;for(const N of g.split(".")){var C;j=(C=j)==null?void 0:C[N]}return j}:v=S=>S[y.accessorKey]),!h)throw new Error;let x={id:`${String(h)}`,accessorFn:v,parent:i,depth:s,columnDef:y,columns:[],getFlatColumns:Ce(()=>[!0],()=>{var S;return[x,...(S=x.columns)==null?void 0:S.flatMap(j=>j.getFlatColumns())]},Re(n.options,"debugColumns")),getLeafColumns:Ce(()=>[n._getOrderColumnsFn()],S=>{var j;if((j=x.columns)!=null&&j.length){let C=x.columns.flatMap(N=>N.getLeafColumns());return S(C)}return[x]},Re(n.options,"debugColumns"))};for(const S of n._features)S.createColumn==null||S.createColumn(x,n);return x}const At="debugHeaders";function $g(n,r,s){var i;let f={id:(i=s.id)!=null?i:r.id,column:r,index:s.index,isPlaceholder:!!s.isPlaceholder,placeholderId:s.placeholderId,depth:s.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const m=[],y=g=>{g.subHeaders&&g.subHeaders.length&&g.subHeaders.map(y),m.push(g)};return y(f),m},getContext:()=>({table:n,header:f,column:r})};return n._features.forEach(m=>{m.createHeader==null||m.createHeader(f,n)}),f}const a1={createTable:n=>{n.getHeaderGroups=Ce(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(r,s,i,u)=>{var f,m;const y=(f=i==null?void 0:i.map(x=>s.find(S=>S.id===x)).filter(Boolean))!=null?f:[],g=(m=u==null?void 0:u.map(x=>s.find(S=>S.id===x)).filter(Boolean))!=null?m:[],h=s.filter(x=>!(i!=null&&i.includes(x.id))&&!(u!=null&&u.includes(x.id)));return Li(r,[...y,...h,...g],n)},Re(n.options,At)),n.getCenterHeaderGroups=Ce(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(r,s,i,u)=>(s=s.filter(f=>!(i!=null&&i.includes(f.id))&&!(u!=null&&u.includes(f.id))),Li(r,s,n,"center")),Re(n.options,At)),n.getLeftHeaderGroups=Ce(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(r,s,i)=>{var u;const f=(u=i==null?void 0:i.map(m=>s.find(y=>y.id===m)).filter(Boolean))!=null?u:[];return Li(r,f,n,"left")},Re(n.options,At)),n.getRightHeaderGroups=Ce(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(r,s,i)=>{var u;const f=(u=i==null?void 0:i.map(m=>s.find(y=>y.id===m)).filter(Boolean))!=null?u:[];return Li(r,f,n,"right")},Re(n.options,At)),n.getFooterGroups=Ce(()=>[n.getHeaderGroups()],r=>[...r].reverse(),Re(n.options,At)),n.getLeftFooterGroups=Ce(()=>[n.getLeftHeaderGroups()],r=>[...r].reverse(),Re(n.options,At)),n.getCenterFooterGroups=Ce(()=>[n.getCenterHeaderGroups()],r=>[...r].reverse(),Re(n.options,At)),n.getRightFooterGroups=Ce(()=>[n.getRightHeaderGroups()],r=>[...r].reverse(),Re(n.options,At)),n.getFlatHeaders=Ce(()=>[n.getHeaderGroups()],r=>r.map(s=>s.headers).flat(),Re(n.options,At)),n.getLeftFlatHeaders=Ce(()=>[n.getLeftHeaderGroups()],r=>r.map(s=>s.headers).flat(),Re(n.options,At)),n.getCenterFlatHeaders=Ce(()=>[n.getCenterHeaderGroups()],r=>r.map(s=>s.headers).flat(),Re(n.options,At)),n.getRightFlatHeaders=Ce(()=>[n.getRightHeaderGroups()],r=>r.map(s=>s.headers).flat(),Re(n.options,At)),n.getCenterLeafHeaders=Ce(()=>[n.getCenterFlatHeaders()],r=>r.filter(s=>{var i;return!((i=s.subHeaders)!=null&&i.length)}),Re(n.options,At)),n.getLeftLeafHeaders=Ce(()=>[n.getLeftFlatHeaders()],r=>r.filter(s=>{var i;return!((i=s.subHeaders)!=null&&i.length)}),Re(n.options,At)),n.getRightLeafHeaders=Ce(()=>[n.getRightFlatHeaders()],r=>r.filter(s=>{var i;return!((i=s.subHeaders)!=null&&i.length)}),Re(n.options,At)),n.getLeafHeaders=Ce(()=>[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()],(r,s,i)=>{var u,f,m,y,g,h;return[...(u=(f=r[0])==null?void 0:f.headers)!=null?u:[],...(m=(y=s[0])==null?void 0:y.headers)!=null?m:[],...(g=(h=i[0])==null?void 0:h.headers)!=null?g:[]].map(v=>v.getLeafHeaders()).flat()},Re(n.options,At))}};function Li(n,r,s,i){var u,f;let m=0;const y=function(S,j){j===void 0&&(j=1),m=Math.max(m,j),S.filter(C=>C.getIsVisible()).forEach(C=>{var N;(N=C.columns)!=null&&N.length&&y(C.columns,j+1)},0)};y(n);let g=[];const h=(S,j)=>{const C={depth:j,id:[i,`${j}`].filter(Boolean).join("_"),headers:[]},N=[];S.forEach(M=>{const E=[...N].reverse()[0],L=M.column.depth===C.depth;let B,ee=!1;if(L&&M.column.parent?B=M.column.parent:(B=M.column,ee=!0),E&&(E==null?void 0:E.column)===B)E.subHeaders.push(M);else{const le=$g(s,B,{id:[i,j,B.id,M==null?void 0:M.id].filter(Boolean).join("_"),isPlaceholder:ee,placeholderId:ee?`${N.filter(I=>I.column===B).length}`:void 0,depth:j,index:N.length});le.subHeaders.push(M),N.push(le)}C.headers.push(M),M.headerGroup=C}),g.push(C),j>0&&h(N,j-1)},v=r.map((S,j)=>$g(s,S,{depth:m,index:j}));h(v,m-1),g.reverse();const x=S=>S.filter(C=>C.column.getIsVisible()).map(C=>{let N=0,M=0,E=[0];C.subHeaders&&C.subHeaders.length?(E=[],x(C.subHeaders).forEach(B=>{let{colSpan:ee,rowSpan:le}=B;N+=ee,E.push(le)})):N=1;const L=Math.min(...E);return M=M+L,C.colSpan=N,C.rowSpan=M,{colSpan:N,rowSpan:M}});return x((u=(f=g[0])==null?void 0:f.headers)!=null?u:[]),g}const l1=(n,r,s,i,u,f,m)=>{let y={id:r,index:i,original:s,depth:u,parentId:m,_valuesCache:{},_uniqueValuesCache:{},getValue:g=>{if(y._valuesCache.hasOwnProperty(g))return y._valuesCache[g];const h=n.getColumn(g);if(h!=null&&h.accessorFn)return y._valuesCache[g]=h.accessorFn(y.original,i),y._valuesCache[g]},getUniqueValues:g=>{if(y._uniqueValuesCache.hasOwnProperty(g))return y._uniqueValuesCache[g];const h=n.getColumn(g);if(h!=null&&h.accessorFn)return h.columnDef.getUniqueValues?(y._uniqueValuesCache[g]=h.columnDef.getUniqueValues(y.original,i),y._uniqueValuesCache[g]):(y._uniqueValuesCache[g]=[y.getValue(g)],y._uniqueValuesCache[g])},renderValue:g=>{var h;return(h=y.getValue(g))!=null?h:n.options.renderFallbackValue},subRows:[],getLeafRows:()=>e1(y.subRows,g=>g.subRows),getParentRow:()=>y.parentId?n.getRow(y.parentId,!0):void 0,getParentRows:()=>{let g=[],h=y;for(;;){const v=h.getParentRow();if(!v)break;g.push(v),h=v}return g.reverse()},getAllCells:Ce(()=>[n.getAllLeafColumns()],g=>g.map(h=>t1(n,y,h,h.id)),Re(n.options,"debugRows")),_getAllCellsByColumnId:Ce(()=>[y.getAllCells()],g=>g.reduce((h,v)=>(h[v.column.id]=v,h),{}),Re(n.options,"debugRows"))};for(let g=0;g<n._features.length;g++){const h=n._features[g];h==null||h.createRow==null||h.createRow(y,n)}return y},r1={createColumn:(n,r)=>{n._getFacetedRowModel=r.options.getFacetedRowModel&&r.options.getFacetedRowModel(r,n.id),n.getFacetedRowModel=()=>n._getFacetedRowModel?n._getFacetedRowModel():r.getPreFilteredRowModel(),n._getFacetedUniqueValues=r.options.getFacetedUniqueValues&&r.options.getFacetedUniqueValues(r,n.id),n.getFacetedUniqueValues=()=>n._getFacetedUniqueValues?n._getFacetedUniqueValues():new Map,n._getFacetedMinMaxValues=r.options.getFacetedMinMaxValues&&r.options.getFacetedMinMaxValues(r,n.id),n.getFacetedMinMaxValues=()=>{if(n._getFacetedMinMaxValues)return n._getFacetedMinMaxValues()}}},Up=(n,r,s)=>{var i,u;const f=s==null||(i=s.toString())==null?void 0:i.toLowerCase();return!!(!((u=n.getValue(r))==null||(u=u.toString())==null||(u=u.toLowerCase())==null)&&u.includes(f))};Up.autoRemove=n=>Mn(n);const $p=(n,r,s)=>{var i;return!!(!((i=n.getValue(r))==null||(i=i.toString())==null)&&i.includes(s))};$p.autoRemove=n=>Mn(n);const Vp=(n,r,s)=>{var i;return((i=n.getValue(r))==null||(i=i.toString())==null?void 0:i.toLowerCase())===(s==null?void 0:s.toLowerCase())};Vp.autoRemove=n=>Mn(n);const Gp=(n,r,s)=>{var i;return(i=n.getValue(r))==null?void 0:i.includes(s)};Gp.autoRemove=n=>Mn(n);const qp=(n,r,s)=>!s.some(i=>{var u;return!((u=n.getValue(r))!=null&&u.includes(i))});qp.autoRemove=n=>Mn(n)||!(n!=null&&n.length);const Fp=(n,r,s)=>s.some(i=>{var u;return(u=n.getValue(r))==null?void 0:u.includes(i)});Fp.autoRemove=n=>Mn(n)||!(n!=null&&n.length);const Yp=(n,r,s)=>n.getValue(r)===s;Yp.autoRemove=n=>Mn(n);const Kp=(n,r,s)=>n.getValue(r)==s;Kp.autoRemove=n=>Mn(n);const xd=(n,r,s)=>{let[i,u]=s;const f=n.getValue(r);return f>=i&&f<=u};xd.resolveFilterValue=n=>{let[r,s]=n,i=typeof r!="number"?parseFloat(r):r,u=typeof s!="number"?parseFloat(s):s,f=r===null||Number.isNaN(i)?-1/0:i,m=s===null||Number.isNaN(u)?1/0:u;if(f>m){const y=f;f=m,m=y}return[f,m]};xd.autoRemove=n=>Mn(n)||Mn(n[0])&&Mn(n[1]);const ca={includesString:Up,includesStringSensitive:$p,equalsString:Vp,arrIncludes:Gp,arrIncludesAll:qp,arrIncludesSome:Fp,equals:Yp,weakEquals:Kp,inNumberRange:xd};function Mn(n){return n==null||n===""}const s1={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:n=>({columnFilters:[],...n}),getDefaultOptions:n=>({onColumnFiltersChange:ln("columnFilters",n),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(n,r)=>{n.getAutoFilterFn=()=>{const s=r.getCoreRowModel().flatRows[0],i=s==null?void 0:s.getValue(n.id);return typeof i=="string"?ca.includesString:typeof i=="number"?ca.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?ca.equals:Array.isArray(i)?ca.arrIncludes:ca.weakEquals},n.getFilterFn=()=>{var s,i;return uo(n.columnDef.filterFn)?n.columnDef.filterFn:n.columnDef.filterFn==="auto"?n.getAutoFilterFn():(s=(i=r.options.filterFns)==null?void 0:i[n.columnDef.filterFn])!=null?s:ca[n.columnDef.filterFn]},n.getCanFilter=()=>{var s,i,u;return((s=n.columnDef.enableColumnFilter)!=null?s:!0)&&((i=r.options.enableColumnFilters)!=null?i:!0)&&((u=r.options.enableFilters)!=null?u:!0)&&!!n.accessorFn},n.getIsFiltered=()=>n.getFilterIndex()>-1,n.getFilterValue=()=>{var s;return(s=r.getState().columnFilters)==null||(s=s.find(i=>i.id===n.id))==null?void 0:s.value},n.getFilterIndex=()=>{var s,i;return(s=(i=r.getState().columnFilters)==null?void 0:i.findIndex(u=>u.id===n.id))!=null?s:-1},n.setFilterValue=s=>{r.setColumnFilters(i=>{const u=n.getFilterFn(),f=i==null?void 0:i.find(v=>v.id===n.id),m=qa(s,f?f.value:void 0);if(Vg(u,m,n)){var y;return(y=i==null?void 0:i.filter(v=>v.id!==n.id))!=null?y:[]}const g={id:n.id,value:m};if(f){var h;return(h=i==null?void 0:i.map(v=>v.id===n.id?g:v))!=null?h:[]}return i!=null&&i.length?[...i,g]:[g]})}},createRow:(n,r)=>{n.columnFilters={},n.columnFiltersMeta={}},createTable:n=>{n.setColumnFilters=r=>{const s=n.getAllLeafColumns(),i=u=>{var f;return(f=qa(r,u))==null?void 0:f.filter(m=>{const y=s.find(g=>g.id===m.id);if(y){const g=y.getFilterFn();if(Vg(g,m.value,y))return!1}return!0})};n.options.onColumnFiltersChange==null||n.options.onColumnFiltersChange(i)},n.resetColumnFilters=r=>{var s,i;n.setColumnFilters(r?[]:(s=(i=n.initialState)==null?void 0:i.columnFilters)!=null?s:[])},n.getPreFilteredRowModel=()=>n.getCoreRowModel(),n.getFilteredRowModel=()=>(!n._getFilteredRowModel&&n.options.getFilteredRowModel&&(n._getFilteredRowModel=n.options.getFilteredRowModel(n)),n.options.manualFiltering||!n._getFilteredRowModel?n.getPreFilteredRowModel():n._getFilteredRowModel())}};function Vg(n,r,s){return(n&&n.autoRemove?n.autoRemove(r,s):!1)||typeof r>"u"||typeof r=="string"&&!r}const i1=(n,r,s)=>s.reduce((i,u)=>{const f=u.getValue(n);return i+(typeof f=="number"?f:0)},0),o1=(n,r,s)=>{let i;return s.forEach(u=>{const f=u.getValue(n);f!=null&&(i>f||i===void 0&&f>=f)&&(i=f)}),i},u1=(n,r,s)=>{let i;return s.forEach(u=>{const f=u.getValue(n);f!=null&&(i<f||i===void 0&&f>=f)&&(i=f)}),i},c1=(n,r,s)=>{let i,u;return s.forEach(f=>{const m=f.getValue(n);m!=null&&(i===void 0?m>=m&&(i=u=m):(i>m&&(i=m),u<m&&(u=m)))}),[i,u]},d1=(n,r)=>{let s=0,i=0;if(r.forEach(u=>{let f=u.getValue(n);f!=null&&(f=+f)>=f&&(++s,i+=f)}),s)return i/s},f1=(n,r)=>{if(!r.length)return;const s=r.map(f=>f.getValue(n));if(!Wb(s))return;if(s.length===1)return s[0];const i=Math.floor(s.length/2),u=s.sort((f,m)=>f-m);return s.length%2!==0?u[i]:(u[i-1]+u[i])/2},m1=(n,r)=>Array.from(new Set(r.map(s=>s.getValue(n))).values()),h1=(n,r)=>new Set(r.map(s=>s.getValue(n))).size,g1=(n,r)=>r.length,Ac={sum:i1,min:o1,max:u1,extent:c1,mean:d1,median:f1,unique:m1,uniqueCount:h1,count:g1},p1={getDefaultColumnDef:()=>({aggregatedCell:n=>{var r,s;return(r=(s=n.getValue())==null||s.toString==null?void 0:s.toString())!=null?r:null},aggregationFn:"auto"}),getInitialState:n=>({grouping:[],...n}),getDefaultOptions:n=>({onGroupingChange:ln("grouping",n),groupedColumnMode:"reorder"}),createColumn:(n,r)=>{n.toggleGrouping=()=>{r.setGrouping(s=>s!=null&&s.includes(n.id)?s.filter(i=>i!==n.id):[...s??[],n.id])},n.getCanGroup=()=>{var s,i;return((s=n.columnDef.enableGrouping)!=null?s:!0)&&((i=r.options.enableGrouping)!=null?i:!0)&&(!!n.accessorFn||!!n.columnDef.getGroupingValue)},n.getIsGrouped=()=>{var s;return(s=r.getState().grouping)==null?void 0:s.includes(n.id)},n.getGroupedIndex=()=>{var s;return(s=r.getState().grouping)==null?void 0:s.indexOf(n.id)},n.getToggleGroupingHandler=()=>{const s=n.getCanGroup();return()=>{s&&n.toggleGrouping()}},n.getAutoAggregationFn=()=>{const s=r.getCoreRowModel().flatRows[0],i=s==null?void 0:s.getValue(n.id);if(typeof i=="number")return Ac.sum;if(Object.prototype.toString.call(i)==="[object Date]")return Ac.extent},n.getAggregationFn=()=>{var s,i;if(!n)throw new Error;return uo(n.columnDef.aggregationFn)?n.columnDef.aggregationFn:n.columnDef.aggregationFn==="auto"?n.getAutoAggregationFn():(s=(i=r.options.aggregationFns)==null?void 0:i[n.columnDef.aggregationFn])!=null?s:Ac[n.columnDef.aggregationFn]}},createTable:n=>{n.setGrouping=r=>n.options.onGroupingChange==null?void 0:n.options.onGroupingChange(r),n.resetGrouping=r=>{var s,i;n.setGrouping(r?[]:(s=(i=n.initialState)==null?void 0:i.grouping)!=null?s:[])},n.getPreGroupedRowModel=()=>n.getFilteredRowModel(),n.getGroupedRowModel=()=>(!n._getGroupedRowModel&&n.options.getGroupedRowModel&&(n._getGroupedRowModel=n.options.getGroupedRowModel(n)),n.options.manualGrouping||!n._getGroupedRowModel?n.getPreGroupedRowModel():n._getGroupedRowModel())},createRow:(n,r)=>{n.getIsGrouped=()=>!!n.groupingColumnId,n.getGroupingValue=s=>{if(n._groupingValuesCache.hasOwnProperty(s))return n._groupingValuesCache[s];const i=r.getColumn(s);return i!=null&&i.columnDef.getGroupingValue?(n._groupingValuesCache[s]=i.columnDef.getGroupingValue(n.original),n._groupingValuesCache[s]):n.getValue(s)},n._groupingValuesCache={}},createCell:(n,r,s,i)=>{n.getIsGrouped=()=>r.getIsGrouped()&&r.id===s.groupingColumnId,n.getIsPlaceholder=()=>!n.getIsGrouped()&&r.getIsGrouped(),n.getIsAggregated=()=>{var u;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&!!((u=s.subRows)!=null&&u.length)}}};function y1(n,r,s){if(!(r!=null&&r.length)||!s)return n;const i=n.filter(f=>!r.includes(f.id));return s==="remove"?i:[...r.map(f=>n.find(m=>m.id===f)).filter(Boolean),...i]}const x1={getInitialState:n=>({columnOrder:[],...n}),getDefaultOptions:n=>({onColumnOrderChange:ln("columnOrder",n)}),createColumn:(n,r)=>{n.getIndex=Ce(s=>[ds(r,s)],s=>s.findIndex(i=>i.id===n.id),Re(r.options,"debugColumns")),n.getIsFirstColumn=s=>{var i;return((i=ds(r,s)[0])==null?void 0:i.id)===n.id},n.getIsLastColumn=s=>{var i;const u=ds(r,s);return((i=u[u.length-1])==null?void 0:i.id)===n.id}},createTable:n=>{n.setColumnOrder=r=>n.options.onColumnOrderChange==null?void 0:n.options.onColumnOrderChange(r),n.resetColumnOrder=r=>{var s;n.setColumnOrder(r?[]:(s=n.initialState.columnOrder)!=null?s:[])},n._getOrderColumnsFn=Ce(()=>[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode],(r,s,i)=>u=>{let f=[];if(!(r!=null&&r.length))f=u;else{const m=[...r],y=[...u];for(;y.length&&m.length;){const g=m.shift(),h=y.findIndex(v=>v.id===g);h>-1&&f.push(y.splice(h,1)[0])}f=[...f,...y]}return y1(f,s,i)},Re(n.options,"debugTable"))}},Dc=()=>({left:[],right:[]}),v1={getInitialState:n=>({columnPinning:Dc(),...n}),getDefaultOptions:n=>({onColumnPinningChange:ln("columnPinning",n)}),createColumn:(n,r)=>{n.pin=s=>{const i=n.getLeafColumns().map(u=>u.id).filter(Boolean);r.setColumnPinning(u=>{var f,m;if(s==="right"){var y,g;return{left:((y=u==null?void 0:u.left)!=null?y:[]).filter(x=>!(i!=null&&i.includes(x))),right:[...((g=u==null?void 0:u.right)!=null?g:[]).filter(x=>!(i!=null&&i.includes(x))),...i]}}if(s==="left"){var h,v;return{left:[...((h=u==null?void 0:u.left)!=null?h:[]).filter(x=>!(i!=null&&i.includes(x))),...i],right:((v=u==null?void 0:u.right)!=null?v:[]).filter(x=>!(i!=null&&i.includes(x)))}}return{left:((f=u==null?void 0:u.left)!=null?f:[]).filter(x=>!(i!=null&&i.includes(x))),right:((m=u==null?void 0:u.right)!=null?m:[]).filter(x=>!(i!=null&&i.includes(x)))}})},n.getCanPin=()=>n.getLeafColumns().some(i=>{var u,f,m;return((u=i.columnDef.enablePinning)!=null?u:!0)&&((f=(m=r.options.enableColumnPinning)!=null?m:r.options.enablePinning)!=null?f:!0)}),n.getIsPinned=()=>{const s=n.getLeafColumns().map(y=>y.id),{left:i,right:u}=r.getState().columnPinning,f=s.some(y=>i==null?void 0:i.includes(y)),m=s.some(y=>u==null?void 0:u.includes(y));return f?"left":m?"right":!1},n.getPinnedIndex=()=>{var s,i;const u=n.getIsPinned();return u?(s=(i=r.getState().columnPinning)==null||(i=i[u])==null?void 0:i.indexOf(n.id))!=null?s:-1:0}},createRow:(n,r)=>{n.getCenterVisibleCells=Ce(()=>[n._getAllVisibleCells(),r.getState().columnPinning.left,r.getState().columnPinning.right],(s,i,u)=>{const f=[...i??[],...u??[]];return s.filter(m=>!f.includes(m.column.id))},Re(r.options,"debugRows")),n.getLeftVisibleCells=Ce(()=>[n._getAllVisibleCells(),r.getState().columnPinning.left],(s,i)=>(i??[]).map(f=>s.find(m=>m.column.id===f)).filter(Boolean).map(f=>({...f,position:"left"})),Re(r.options,"debugRows")),n.getRightVisibleCells=Ce(()=>[n._getAllVisibleCells(),r.getState().columnPinning.right],(s,i)=>(i??[]).map(f=>s.find(m=>m.column.id===f)).filter(Boolean).map(f=>({...f,position:"right"})),Re(r.options,"debugRows"))},createTable:n=>{n.setColumnPinning=r=>n.options.onColumnPinningChange==null?void 0:n.options.onColumnPinningChange(r),n.resetColumnPinning=r=>{var s,i;return n.setColumnPinning(r?Dc():(s=(i=n.initialState)==null?void 0:i.columnPinning)!=null?s:Dc())},n.getIsSomeColumnsPinned=r=>{var s;const i=n.getState().columnPinning;if(!r){var u,f;return!!((u=i.left)!=null&&u.length||(f=i.right)!=null&&f.length)}return!!((s=i[r])!=null&&s.length)},n.getLeftLeafColumns=Ce(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left],(r,s)=>(s??[]).map(i=>r.find(u=>u.id===i)).filter(Boolean),Re(n.options,"debugColumns")),n.getRightLeafColumns=Ce(()=>[n.getAllLeafColumns(),n.getState().columnPinning.right],(r,s)=>(s??[]).map(i=>r.find(u=>u.id===i)).filter(Boolean),Re(n.options,"debugColumns")),n.getCenterLeafColumns=Ce(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(r,s,i)=>{const u=[...s??[],...i??[]];return r.filter(f=>!u.includes(f.id))},Re(n.options,"debugColumns"))}};function b1(n){return n||(typeof document<"u"?document:null)}const Ui={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Oc=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),S1={getDefaultColumnDef:()=>Ui,getInitialState:n=>({columnSizing:{},columnSizingInfo:Oc(),...n}),getDefaultOptions:n=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:ln("columnSizing",n),onColumnSizingInfoChange:ln("columnSizingInfo",n)}),createColumn:(n,r)=>{n.getSize=()=>{var s,i,u;const f=r.getState().columnSizing[n.id];return Math.min(Math.max((s=n.columnDef.minSize)!=null?s:Ui.minSize,(i=f??n.columnDef.size)!=null?i:Ui.size),(u=n.columnDef.maxSize)!=null?u:Ui.maxSize)},n.getStart=Ce(s=>[s,ds(r,s),r.getState().columnSizing],(s,i)=>i.slice(0,n.getIndex(s)).reduce((u,f)=>u+f.getSize(),0),Re(r.options,"debugColumns")),n.getAfter=Ce(s=>[s,ds(r,s),r.getState().columnSizing],(s,i)=>i.slice(n.getIndex(s)+1).reduce((u,f)=>u+f.getSize(),0),Re(r.options,"debugColumns")),n.resetSize=()=>{r.setColumnSizing(s=>{let{[n.id]:i,...u}=s;return u})},n.getCanResize=()=>{var s,i;return((s=n.columnDef.enableResizing)!=null?s:!0)&&((i=r.options.enableColumnResizing)!=null?i:!0)},n.getIsResizing=()=>r.getState().columnSizingInfo.isResizingColumn===n.id},createHeader:(n,r)=>{n.getSize=()=>{let s=0;const i=u=>{if(u.subHeaders.length)u.subHeaders.forEach(i);else{var f;s+=(f=u.column.getSize())!=null?f:0}};return i(n),s},n.getStart=()=>{if(n.index>0){const s=n.headerGroup.headers[n.index-1];return s.getStart()+s.getSize()}return 0},n.getResizeHandler=s=>{const i=r.getColumn(n.column.id),u=i==null?void 0:i.getCanResize();return f=>{if(!i||!u||(f.persist==null||f.persist(),Hc(f)&&f.touches&&f.touches.length>1))return;const m=n.getSize(),y=n?n.getLeafHeaders().map(E=>[E.column.id,E.column.getSize()]):[[i.id,i.getSize()]],g=Hc(f)?Math.round(f.touches[0].clientX):f.clientX,h={},v=(E,L)=>{typeof L=="number"&&(r.setColumnSizingInfo(B=>{var ee,le;const I=r.options.columnResizeDirection==="rtl"?-1:1,P=(L-((ee=B==null?void 0:B.startOffset)!=null?ee:0))*I,q=Math.max(P/((le=B==null?void 0:B.startSize)!=null?le:0),-.999999);return B.columnSizingStart.forEach(se=>{let[re,Q]=se;h[re]=Math.round(Math.max(Q+Q*q,0)*100)/100}),{...B,deltaOffset:P,deltaPercentage:q}}),(r.options.columnResizeMode==="onChange"||E==="end")&&r.setColumnSizing(B=>({...B,...h})))},x=E=>v("move",E),S=E=>{v("end",E),r.setColumnSizingInfo(L=>({...L,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},j=b1(s),C={moveHandler:E=>x(E.clientX),upHandler:E=>{j==null||j.removeEventListener("mousemove",C.moveHandler),j==null||j.removeEventListener("mouseup",C.upHandler),S(E.clientX)}},N={moveHandler:E=>(E.cancelable&&(E.preventDefault(),E.stopPropagation()),x(E.touches[0].clientX),!1),upHandler:E=>{var L;j==null||j.removeEventListener("touchmove",N.moveHandler),j==null||j.removeEventListener("touchend",N.upHandler),E.cancelable&&(E.preventDefault(),E.stopPropagation()),S((L=E.touches[0])==null?void 0:L.clientX)}},M=w1()?{passive:!1}:!1;Hc(f)?(j==null||j.addEventListener("touchmove",N.moveHandler,M),j==null||j.addEventListener("touchend",N.upHandler,M)):(j==null||j.addEventListener("mousemove",C.moveHandler,M),j==null||j.addEventListener("mouseup",C.upHandler,M)),r.setColumnSizingInfo(E=>({...E,startOffset:g,startSize:m,deltaOffset:0,deltaPercentage:0,columnSizingStart:y,isResizingColumn:i.id}))}}},createTable:n=>{n.setColumnSizing=r=>n.options.onColumnSizingChange==null?void 0:n.options.onColumnSizingChange(r),n.setColumnSizingInfo=r=>n.options.onColumnSizingInfoChange==null?void 0:n.options.onColumnSizingInfoChange(r),n.resetColumnSizing=r=>{var s;n.setColumnSizing(r?{}:(s=n.initialState.columnSizing)!=null?s:{})},n.resetHeaderSizeInfo=r=>{var s;n.setColumnSizingInfo(r?Oc():(s=n.initialState.columnSizingInfo)!=null?s:Oc())},n.getTotalSize=()=>{var r,s;return(r=(s=n.getHeaderGroups()[0])==null?void 0:s.headers.reduce((i,u)=>i+u.getSize(),0))!=null?r:0},n.getLeftTotalSize=()=>{var r,s;return(r=(s=n.getLeftHeaderGroups()[0])==null?void 0:s.headers.reduce((i,u)=>i+u.getSize(),0))!=null?r:0},n.getCenterTotalSize=()=>{var r,s;return(r=(s=n.getCenterHeaderGroups()[0])==null?void 0:s.headers.reduce((i,u)=>i+u.getSize(),0))!=null?r:0},n.getRightTotalSize=()=>{var r,s;return(r=(s=n.getRightHeaderGroups()[0])==null?void 0:s.headers.reduce((i,u)=>i+u.getSize(),0))!=null?r:0}}};let $i=null;function w1(){if(typeof $i=="boolean")return $i;let n=!1;try{const r={get passive(){return n=!0,!1}},s=()=>{};window.addEventListener("test",s,r),window.removeEventListener("test",s)}catch{n=!1}return $i=n,$i}function Hc(n){return n.type==="touchstart"}const N1={getInitialState:n=>({columnVisibility:{},...n}),getDefaultOptions:n=>({onColumnVisibilityChange:ln("columnVisibility",n)}),createColumn:(n,r)=>{n.toggleVisibility=s=>{n.getCanHide()&&r.setColumnVisibility(i=>({...i,[n.id]:s??!n.getIsVisible()}))},n.getIsVisible=()=>{var s,i;const u=n.columns;return(s=u.length?u.some(f=>f.getIsVisible()):(i=r.getState().columnVisibility)==null?void 0:i[n.id])!=null?s:!0},n.getCanHide=()=>{var s,i;return((s=n.columnDef.enableHiding)!=null?s:!0)&&((i=r.options.enableHiding)!=null?i:!0)},n.getToggleVisibilityHandler=()=>s=>{n.toggleVisibility==null||n.toggleVisibility(s.target.checked)}},createRow:(n,r)=>{n._getAllVisibleCells=Ce(()=>[n.getAllCells(),r.getState().columnVisibility],s=>s.filter(i=>i.column.getIsVisible()),Re(r.options,"debugRows")),n.getVisibleCells=Ce(()=>[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()],(s,i,u)=>[...s,...i,...u],Re(r.options,"debugRows"))},createTable:n=>{const r=(s,i)=>Ce(()=>[i(),i().filter(u=>u.getIsVisible()).map(u=>u.id).join("_")],u=>u.filter(f=>f.getIsVisible==null?void 0:f.getIsVisible()),Re(n.options,"debugColumns"));n.getVisibleFlatColumns=r("getVisibleFlatColumns",()=>n.getAllFlatColumns()),n.getVisibleLeafColumns=r("getVisibleLeafColumns",()=>n.getAllLeafColumns()),n.getLeftVisibleLeafColumns=r("getLeftVisibleLeafColumns",()=>n.getLeftLeafColumns()),n.getRightVisibleLeafColumns=r("getRightVisibleLeafColumns",()=>n.getRightLeafColumns()),n.getCenterVisibleLeafColumns=r("getCenterVisibleLeafColumns",()=>n.getCenterLeafColumns()),n.setColumnVisibility=s=>n.options.onColumnVisibilityChange==null?void 0:n.options.onColumnVisibilityChange(s),n.resetColumnVisibility=s=>{var i;n.setColumnVisibility(s?{}:(i=n.initialState.columnVisibility)!=null?i:{})},n.toggleAllColumnsVisible=s=>{var i;s=(i=s)!=null?i:!n.getIsAllColumnsVisible(),n.setColumnVisibility(n.getAllLeafColumns().reduce((u,f)=>({...u,[f.id]:s||!(f.getCanHide!=null&&f.getCanHide())}),{}))},n.getIsAllColumnsVisible=()=>!n.getAllLeafColumns().some(s=>!(s.getIsVisible!=null&&s.getIsVisible())),n.getIsSomeColumnsVisible=()=>n.getAllLeafColumns().some(s=>s.getIsVisible==null?void 0:s.getIsVisible()),n.getToggleAllColumnsVisibilityHandler=()=>s=>{var i;n.toggleAllColumnsVisible((i=s.target)==null?void 0:i.checked)}}};function ds(n,r){return r?r==="center"?n.getCenterVisibleLeafColumns():r==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns()}const j1={createTable:n=>{n._getGlobalFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,"__global__"),n.getGlobalFacetedRowModel=()=>n.options.manualFiltering||!n._getGlobalFacetedRowModel?n.getPreFilteredRowModel():n._getGlobalFacetedRowModel(),n._getGlobalFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,"__global__"),n.getGlobalFacetedUniqueValues=()=>n._getGlobalFacetedUniqueValues?n._getGlobalFacetedUniqueValues():new Map,n._getGlobalFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,"__global__"),n.getGlobalFacetedMinMaxValues=()=>{if(n._getGlobalFacetedMinMaxValues)return n._getGlobalFacetedMinMaxValues()}}},C1={getInitialState:n=>({globalFilter:void 0,...n}),getDefaultOptions:n=>({onGlobalFilterChange:ln("globalFilter",n),globalFilterFn:"auto",getColumnCanGlobalFilter:r=>{var s;const i=(s=n.getCoreRowModel().flatRows[0])==null||(s=s._getAllCellsByColumnId()[r.id])==null?void 0:s.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(n,r)=>{n.getCanGlobalFilter=()=>{var s,i,u,f;return((s=n.columnDef.enableGlobalFilter)!=null?s:!0)&&((i=r.options.enableGlobalFilter)!=null?i:!0)&&((u=r.options.enableFilters)!=null?u:!0)&&((f=r.options.getColumnCanGlobalFilter==null?void 0:r.options.getColumnCanGlobalFilter(n))!=null?f:!0)&&!!n.accessorFn}},createTable:n=>{n.getGlobalAutoFilterFn=()=>ca.includesString,n.getGlobalFilterFn=()=>{var r,s;const{globalFilterFn:i}=n.options;return uo(i)?i:i==="auto"?n.getGlobalAutoFilterFn():(r=(s=n.options.filterFns)==null?void 0:s[i])!=null?r:ca[i]},n.setGlobalFilter=r=>{n.options.onGlobalFilterChange==null||n.options.onGlobalFilterChange(r)},n.resetGlobalFilter=r=>{n.setGlobalFilter(r?void 0:n.initialState.globalFilter)}}},R1={getInitialState:n=>({expanded:{},...n}),getDefaultOptions:n=>({onExpandedChange:ln("expanded",n),paginateExpandedRows:!0}),createTable:n=>{let r=!1,s=!1;n._autoResetExpanded=()=>{var i,u;if(!r){n._queue(()=>{r=!0});return}if((i=(u=n.options.autoResetAll)!=null?u:n.options.autoResetExpanded)!=null?i:!n.options.manualExpanding){if(s)return;s=!0,n._queue(()=>{n.resetExpanded(),s=!1})}},n.setExpanded=i=>n.options.onExpandedChange==null?void 0:n.options.onExpandedChange(i),n.toggleAllRowsExpanded=i=>{i??!n.getIsAllRowsExpanded()?n.setExpanded(!0):n.setExpanded({})},n.resetExpanded=i=>{var u,f;n.setExpanded(i?{}:(u=(f=n.initialState)==null?void 0:f.expanded)!=null?u:{})},n.getCanSomeRowsExpand=()=>n.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),n.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),n.toggleAllRowsExpanded()},n.getIsSomeRowsExpanded=()=>{const i=n.getState().expanded;return i===!0||Object.values(i).some(Boolean)},n.getIsAllRowsExpanded=()=>{const i=n.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||n.getRowModel().flatRows.some(u=>!u.getIsExpanded()))},n.getExpandedDepth=()=>{let i=0;return(n.getState().expanded===!0?Object.keys(n.getRowModel().rowsById):Object.keys(n.getState().expanded)).forEach(f=>{const m=f.split(".");i=Math.max(i,m.length)}),i},n.getPreExpandedRowModel=()=>n.getSortedRowModel(),n.getExpandedRowModel=()=>(!n._getExpandedRowModel&&n.options.getExpandedRowModel&&(n._getExpandedRowModel=n.options.getExpandedRowModel(n)),n.options.manualExpanding||!n._getExpandedRowModel?n.getPreExpandedRowModel():n._getExpandedRowModel())},createRow:(n,r)=>{n.toggleExpanded=s=>{r.setExpanded(i=>{var u;const f=i===!0?!0:!!(i!=null&&i[n.id]);let m={};if(i===!0?Object.keys(r.getRowModel().rowsById).forEach(y=>{m[y]=!0}):m=i,s=(u=s)!=null?u:!f,!f&&s)return{...m,[n.id]:!0};if(f&&!s){const{[n.id]:y,...g}=m;return g}return i})},n.getIsExpanded=()=>{var s;const i=r.getState().expanded;return!!((s=r.options.getIsRowExpanded==null?void 0:r.options.getIsRowExpanded(n))!=null?s:i===!0||i!=null&&i[n.id])},n.getCanExpand=()=>{var s,i,u;return(s=r.options.getRowCanExpand==null?void 0:r.options.getRowCanExpand(n))!=null?s:((i=r.options.enableExpanding)!=null?i:!0)&&!!((u=n.subRows)!=null&&u.length)},n.getIsAllParentsExpanded=()=>{let s=!0,i=n;for(;s&&i.parentId;)i=r.getRow(i.parentId,!0),s=i.getIsExpanded();return s},n.getToggleExpandedHandler=()=>{const s=n.getCanExpand();return()=>{s&&n.toggleExpanded()}}}},Zc=0,Jc=10,Bc=()=>({pageIndex:Zc,pageSize:Jc}),_1={getInitialState:n=>({...n,pagination:{...Bc(),...n==null?void 0:n.pagination}}),getDefaultOptions:n=>({onPaginationChange:ln("pagination",n)}),createTable:n=>{let r=!1,s=!1;n._autoResetPageIndex=()=>{var i,u;if(!r){n._queue(()=>{r=!0});return}if((i=(u=n.options.autoResetAll)!=null?u:n.options.autoResetPageIndex)!=null?i:!n.options.manualPagination){if(s)return;s=!0,n._queue(()=>{n.resetPageIndex(),s=!1})}},n.setPagination=i=>{const u=f=>qa(i,f);return n.options.onPaginationChange==null?void 0:n.options.onPaginationChange(u)},n.resetPagination=i=>{var u;n.setPagination(i?Bc():(u=n.initialState.pagination)!=null?u:Bc())},n.setPageIndex=i=>{n.setPagination(u=>{let f=qa(i,u.pageIndex);const m=typeof n.options.pageCount>"u"||n.options.pageCount===-1?Number.MAX_SAFE_INTEGER:n.options.pageCount-1;return f=Math.max(0,Math.min(f,m)),{...u,pageIndex:f}})},n.resetPageIndex=i=>{var u,f;n.setPageIndex(i?Zc:(u=(f=n.initialState)==null||(f=f.pagination)==null?void 0:f.pageIndex)!=null?u:Zc)},n.resetPageSize=i=>{var u,f;n.setPageSize(i?Jc:(u=(f=n.initialState)==null||(f=f.pagination)==null?void 0:f.pageSize)!=null?u:Jc)},n.setPageSize=i=>{n.setPagination(u=>{const f=Math.max(1,qa(i,u.pageSize)),m=u.pageSize*u.pageIndex,y=Math.floor(m/f);return{...u,pageIndex:y,pageSize:f}})},n.setPageCount=i=>n.setPagination(u=>{var f;let m=qa(i,(f=n.options.pageCount)!=null?f:-1);return typeof m=="number"&&(m=Math.max(-1,m)),{...u,pageCount:m}}),n.getPageOptions=Ce(()=>[n.getPageCount()],i=>{let u=[];return i&&i>0&&(u=[...new Array(i)].fill(null).map((f,m)=>m)),u},Re(n.options,"debugTable")),n.getCanPreviousPage=()=>n.getState().pagination.pageIndex>0,n.getCanNextPage=()=>{const{pageIndex:i}=n.getState().pagination,u=n.getPageCount();return u===-1?!0:u===0?!1:i<u-1},n.previousPage=()=>n.setPageIndex(i=>i-1),n.nextPage=()=>n.setPageIndex(i=>i+1),n.firstPage=()=>n.setPageIndex(0),n.lastPage=()=>n.setPageIndex(n.getPageCount()-1),n.getPrePaginationRowModel=()=>n.getExpandedRowModel(),n.getPaginationRowModel=()=>(!n._getPaginationRowModel&&n.options.getPaginationRowModel&&(n._getPaginationRowModel=n.options.getPaginationRowModel(n)),n.options.manualPagination||!n._getPaginationRowModel?n.getPrePaginationRowModel():n._getPaginationRowModel()),n.getPageCount=()=>{var i;return(i=n.options.pageCount)!=null?i:Math.ceil(n.getRowCount()/n.getState().pagination.pageSize)},n.getRowCount=()=>{var i;return(i=n.options.rowCount)!=null?i:n.getPrePaginationRowModel().rows.length}}},Lc=()=>({top:[],bottom:[]}),E1={getInitialState:n=>({rowPinning:Lc(),...n}),getDefaultOptions:n=>({onRowPinningChange:ln("rowPinning",n)}),createRow:(n,r)=>{n.pin=(s,i,u)=>{const f=i?n.getLeafRows().map(g=>{let{id:h}=g;return h}):[],m=u?n.getParentRows().map(g=>{let{id:h}=g;return h}):[],y=new Set([...m,n.id,...f]);r.setRowPinning(g=>{var h,v;if(s==="bottom"){var x,S;return{top:((x=g==null?void 0:g.top)!=null?x:[]).filter(N=>!(y!=null&&y.has(N))),bottom:[...((S=g==null?void 0:g.bottom)!=null?S:[]).filter(N=>!(y!=null&&y.has(N))),...Array.from(y)]}}if(s==="top"){var j,C;return{top:[...((j=g==null?void 0:g.top)!=null?j:[]).filter(N=>!(y!=null&&y.has(N))),...Array.from(y)],bottom:((C=g==null?void 0:g.bottom)!=null?C:[]).filter(N=>!(y!=null&&y.has(N)))}}return{top:((h=g==null?void 0:g.top)!=null?h:[]).filter(N=>!(y!=null&&y.has(N))),bottom:((v=g==null?void 0:g.bottom)!=null?v:[]).filter(N=>!(y!=null&&y.has(N)))}})},n.getCanPin=()=>{var s;const{enableRowPinning:i,enablePinning:u}=r.options;return typeof i=="function"?i(n):(s=i??u)!=null?s:!0},n.getIsPinned=()=>{const s=[n.id],{top:i,bottom:u}=r.getState().rowPinning,f=s.some(y=>i==null?void 0:i.includes(y)),m=s.some(y=>u==null?void 0:u.includes(y));return f?"top":m?"bottom":!1},n.getPinnedIndex=()=>{var s,i;const u=n.getIsPinned();if(!u)return-1;const f=(s=u==="top"?r.getTopRows():r.getBottomRows())==null?void 0:s.map(m=>{let{id:y}=m;return y});return(i=f==null?void 0:f.indexOf(n.id))!=null?i:-1}},createTable:n=>{n.setRowPinning=r=>n.options.onRowPinningChange==null?void 0:n.options.onRowPinningChange(r),n.resetRowPinning=r=>{var s,i;return n.setRowPinning(r?Lc():(s=(i=n.initialState)==null?void 0:i.rowPinning)!=null?s:Lc())},n.getIsSomeRowsPinned=r=>{var s;const i=n.getState().rowPinning;if(!r){var u,f;return!!((u=i.top)!=null&&u.length||(f=i.bottom)!=null&&f.length)}return!!((s=i[r])!=null&&s.length)},n._getPinnedRows=(r,s,i)=>{var u;return((u=n.options.keepPinnedRows)==null||u?(s??[]).map(m=>{const y=n.getRow(m,!0);return y.getIsAllParentsExpanded()?y:null}):(s??[]).map(m=>r.find(y=>y.id===m))).filter(Boolean).map(m=>({...m,position:i}))},n.getTopRows=Ce(()=>[n.getRowModel().rows,n.getState().rowPinning.top],(r,s)=>n._getPinnedRows(r,s,"top"),Re(n.options,"debugRows")),n.getBottomRows=Ce(()=>[n.getRowModel().rows,n.getState().rowPinning.bottom],(r,s)=>n._getPinnedRows(r,s,"bottom"),Re(n.options,"debugRows")),n.getCenterRows=Ce(()=>[n.getRowModel().rows,n.getState().rowPinning.top,n.getState().rowPinning.bottom],(r,s,i)=>{const u=new Set([...s??[],...i??[]]);return r.filter(f=>!u.has(f.id))},Re(n.options,"debugRows"))}},M1={getInitialState:n=>({rowSelection:{},...n}),getDefaultOptions:n=>({onRowSelectionChange:ln("rowSelection",n),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:n=>{n.setRowSelection=r=>n.options.onRowSelectionChange==null?void 0:n.options.onRowSelectionChange(r),n.resetRowSelection=r=>{var s;return n.setRowSelection(r?{}:(s=n.initialState.rowSelection)!=null?s:{})},n.toggleAllRowsSelected=r=>{n.setRowSelection(s=>{r=typeof r<"u"?r:!n.getIsAllRowsSelected();const i={...s},u=n.getPreGroupedRowModel().flatRows;return r?u.forEach(f=>{f.getCanSelect()&&(i[f.id]=!0)}):u.forEach(f=>{delete i[f.id]}),i})},n.toggleAllPageRowsSelected=r=>n.setRowSelection(s=>{const i=typeof r<"u"?r:!n.getIsAllPageRowsSelected(),u={...s};return n.getRowModel().rows.forEach(f=>{Ic(u,f.id,i,!0,n)}),u}),n.getPreSelectedRowModel=()=>n.getCoreRowModel(),n.getSelectedRowModel=Ce(()=>[n.getState().rowSelection,n.getCoreRowModel()],(r,s)=>Object.keys(r).length?Uc(n,s):{rows:[],flatRows:[],rowsById:{}},Re(n.options,"debugTable")),n.getFilteredSelectedRowModel=Ce(()=>[n.getState().rowSelection,n.getFilteredRowModel()],(r,s)=>Object.keys(r).length?Uc(n,s):{rows:[],flatRows:[],rowsById:{}},Re(n.options,"debugTable")),n.getGroupedSelectedRowModel=Ce(()=>[n.getState().rowSelection,n.getSortedRowModel()],(r,s)=>Object.keys(r).length?Uc(n,s):{rows:[],flatRows:[],rowsById:{}},Re(n.options,"debugTable")),n.getIsAllRowsSelected=()=>{const r=n.getFilteredRowModel().flatRows,{rowSelection:s}=n.getState();let i=!!(r.length&&Object.keys(s).length);return i&&r.some(u=>u.getCanSelect()&&!s[u.id])&&(i=!1),i},n.getIsAllPageRowsSelected=()=>{const r=n.getPaginationRowModel().flatRows.filter(u=>u.getCanSelect()),{rowSelection:s}=n.getState();let i=!!r.length;return i&&r.some(u=>!s[u.id])&&(i=!1),i},n.getIsSomeRowsSelected=()=>{var r;const s=Object.keys((r=n.getState().rowSelection)!=null?r:{}).length;return s>0&&s<n.getFilteredRowModel().flatRows.length},n.getIsSomePageRowsSelected=()=>{const r=n.getPaginationRowModel().flatRows;return n.getIsAllPageRowsSelected()?!1:r.filter(s=>s.getCanSelect()).some(s=>s.getIsSelected()||s.getIsSomeSelected())},n.getToggleAllRowsSelectedHandler=()=>r=>{n.toggleAllRowsSelected(r.target.checked)},n.getToggleAllPageRowsSelectedHandler=()=>r=>{n.toggleAllPageRowsSelected(r.target.checked)}},createRow:(n,r)=>{n.toggleSelected=(s,i)=>{const u=n.getIsSelected();r.setRowSelection(f=>{var m;if(s=typeof s<"u"?s:!u,n.getCanSelect()&&u===s)return f;const y={...f};return Ic(y,n.id,s,(m=i==null?void 0:i.selectChildren)!=null?m:!0,r),y})},n.getIsSelected=()=>{const{rowSelection:s}=r.getState();return vd(n,s)},n.getIsSomeSelected=()=>{const{rowSelection:s}=r.getState();return Pc(n,s)==="some"},n.getIsAllSubRowsSelected=()=>{const{rowSelection:s}=r.getState();return Pc(n,s)==="all"},n.getCanSelect=()=>{var s;return typeof r.options.enableRowSelection=="function"?r.options.enableRowSelection(n):(s=r.options.enableRowSelection)!=null?s:!0},n.getCanSelectSubRows=()=>{var s;return typeof r.options.enableSubRowSelection=="function"?r.options.enableSubRowSelection(n):(s=r.options.enableSubRowSelection)!=null?s:!0},n.getCanMultiSelect=()=>{var s;return typeof r.options.enableMultiRowSelection=="function"?r.options.enableMultiRowSelection(n):(s=r.options.enableMultiRowSelection)!=null?s:!0},n.getToggleSelectedHandler=()=>{const s=n.getCanSelect();return i=>{var u;s&&n.toggleSelected((u=i.target)==null?void 0:u.checked)}}}},Ic=(n,r,s,i,u)=>{var f;const m=u.getRow(r,!0);s?(m.getCanMultiSelect()||Object.keys(n).forEach(y=>delete n[y]),m.getCanSelect()&&(n[r]=!0)):delete n[r],i&&(f=m.subRows)!=null&&f.length&&m.getCanSelectSubRows()&&m.subRows.forEach(y=>Ic(n,y.id,s,i,u))};function Uc(n,r){const s=n.getState().rowSelection,i=[],u={},f=function(m,y){return m.map(g=>{var h;const v=vd(g,s);if(v&&(i.push(g),u[g.id]=g),(h=g.subRows)!=null&&h.length&&(g={...g,subRows:f(g.subRows)}),v)return g}).filter(Boolean)};return{rows:f(r.rows),flatRows:i,rowsById:u}}function vd(n,r){var s;return(s=r[n.id])!=null?s:!1}function Pc(n,r,s){var i;if(!((i=n.subRows)!=null&&i.length))return!1;let u=!0,f=!1;return n.subRows.forEach(m=>{if(!(f&&!u)&&(m.getCanSelect()&&(vd(m,r)?f=!0:u=!1),m.subRows&&m.subRows.length)){const y=Pc(m,r);y==="all"?f=!0:(y==="some"&&(f=!0),u=!1)}}),u?"all":f?"some":!1}const Wc=/([0-9]+)/gm,T1=(n,r,s)=>Xp(Ka(n.getValue(s)).toLowerCase(),Ka(r.getValue(s)).toLowerCase()),z1=(n,r,s)=>Xp(Ka(n.getValue(s)),Ka(r.getValue(s))),k1=(n,r,s)=>bd(Ka(n.getValue(s)).toLowerCase(),Ka(r.getValue(s)).toLowerCase()),A1=(n,r,s)=>bd(Ka(n.getValue(s)),Ka(r.getValue(s))),D1=(n,r,s)=>{const i=n.getValue(s),u=r.getValue(s);return i>u?1:i<u?-1:0},O1=(n,r,s)=>bd(n.getValue(s),r.getValue(s));function bd(n,r){return n===r?0:n>r?1:-1}function Ka(n){return typeof n=="number"?isNaN(n)||n===1/0||n===-1/0?"":String(n):typeof n=="string"?n:""}function Xp(n,r){const s=n.split(Wc).filter(Boolean),i=r.split(Wc).filter(Boolean);for(;s.length&&i.length;){const u=s.shift(),f=i.shift(),m=parseInt(u,10),y=parseInt(f,10),g=[m,y].sort();if(isNaN(g[0])){if(u>f)return 1;if(f>u)return-1;continue}if(isNaN(g[1]))return isNaN(m)?-1:1;if(m>y)return 1;if(y>m)return-1}return s.length-i.length}const is={alphanumeric:T1,alphanumericCaseSensitive:z1,text:k1,textCaseSensitive:A1,datetime:D1,basic:O1},H1={getInitialState:n=>({sorting:[],...n}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:n=>({onSortingChange:ln("sorting",n),isMultiSortEvent:r=>r.shiftKey}),createColumn:(n,r)=>{n.getAutoSortingFn=()=>{const s=r.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const u of s){const f=u==null?void 0:u.getValue(n.id);if(Object.prototype.toString.call(f)==="[object Date]")return is.datetime;if(typeof f=="string"&&(i=!0,f.split(Wc).length>1))return is.alphanumeric}return i?is.text:is.basic},n.getAutoSortDir=()=>{const s=r.getFilteredRowModel().flatRows[0];return typeof(s==null?void 0:s.getValue(n.id))=="string"?"asc":"desc"},n.getSortingFn=()=>{var s,i;if(!n)throw new Error;return uo(n.columnDef.sortingFn)?n.columnDef.sortingFn:n.columnDef.sortingFn==="auto"?n.getAutoSortingFn():(s=(i=r.options.sortingFns)==null?void 0:i[n.columnDef.sortingFn])!=null?s:is[n.columnDef.sortingFn]},n.toggleSorting=(s,i)=>{const u=n.getNextSortingOrder(),f=typeof s<"u"&&s!==null;r.setSorting(m=>{const y=m==null?void 0:m.find(j=>j.id===n.id),g=m==null?void 0:m.findIndex(j=>j.id===n.id);let h=[],v,x=f?s:u==="desc";if(m!=null&&m.length&&n.getCanMultiSort()&&i?y?v="toggle":v="add":m!=null&&m.length&&g!==m.length-1?v="replace":y?v="toggle":v="replace",v==="toggle"&&(f||u||(v="remove")),v==="add"){var S;h=[...m,{id:n.id,desc:x}],h.splice(0,h.length-((S=r.options.maxMultiSortColCount)!=null?S:Number.MAX_SAFE_INTEGER))}else v==="toggle"?h=m.map(j=>j.id===n.id?{...j,desc:x}:j):v==="remove"?h=m.filter(j=>j.id!==n.id):h=[{id:n.id,desc:x}];return h})},n.getFirstSortDir=()=>{var s,i;return((s=(i=n.columnDef.sortDescFirst)!=null?i:r.options.sortDescFirst)!=null?s:n.getAutoSortDir()==="desc")?"desc":"asc"},n.getNextSortingOrder=s=>{var i,u;const f=n.getFirstSortDir(),m=n.getIsSorted();return m?m!==f&&((i=r.options.enableSortingRemoval)==null||i)&&(!(s&&(u=r.options.enableMultiRemove)!=null)||u)?!1:m==="desc"?"asc":"desc":f},n.getCanSort=()=>{var s,i;return((s=n.columnDef.enableSorting)!=null?s:!0)&&((i=r.options.enableSorting)!=null?i:!0)&&!!n.accessorFn},n.getCanMultiSort=()=>{var s,i;return(s=(i=n.columnDef.enableMultiSort)!=null?i:r.options.enableMultiSort)!=null?s:!!n.accessorFn},n.getIsSorted=()=>{var s;const i=(s=r.getState().sorting)==null?void 0:s.find(u=>u.id===n.id);return i?i.desc?"desc":"asc":!1},n.getSortIndex=()=>{var s,i;return(s=(i=r.getState().sorting)==null?void 0:i.findIndex(u=>u.id===n.id))!=null?s:-1},n.clearSorting=()=>{r.setSorting(s=>s!=null&&s.length?s.filter(i=>i.id!==n.id):[])},n.getToggleSortingHandler=()=>{const s=n.getCanSort();return i=>{s&&(i.persist==null||i.persist(),n.toggleSorting==null||n.toggleSorting(void 0,n.getCanMultiSort()?r.options.isMultiSortEvent==null?void 0:r.options.isMultiSortEvent(i):!1))}}},createTable:n=>{n.setSorting=r=>n.options.onSortingChange==null?void 0:n.options.onSortingChange(r),n.resetSorting=r=>{var s,i;n.setSorting(r?[]:(s=(i=n.initialState)==null?void 0:i.sorting)!=null?s:[])},n.getPreSortedRowModel=()=>n.getGroupedRowModel(),n.getSortedRowModel=()=>(!n._getSortedRowModel&&n.options.getSortedRowModel&&(n._getSortedRowModel=n.options.getSortedRowModel(n)),n.options.manualSorting||!n._getSortedRowModel?n.getPreSortedRowModel():n._getSortedRowModel())}},B1=[a1,N1,x1,v1,r1,s1,j1,C1,H1,p1,R1,_1,E1,M1,S1];function L1(n){var r,s;const i=[...B1,...(r=n._features)!=null?r:[]];let u={_features:i};const f=u._features.reduce((S,j)=>Object.assign(S,j.getDefaultOptions==null?void 0:j.getDefaultOptions(u)),{}),m=S=>u.options.mergeOptions?u.options.mergeOptions(f,S):{...f,...S};let g={...{},...(s=n.initialState)!=null?s:{}};u._features.forEach(S=>{var j;g=(j=S.getInitialState==null?void 0:S.getInitialState(g))!=null?j:g});const h=[];let v=!1;const x={_features:i,options:{...f,...n},initialState:g,_queue:S=>{h.push(S),v||(v=!0,Promise.resolve().then(()=>{for(;h.length;)h.shift()();v=!1}).catch(j=>setTimeout(()=>{throw j})))},reset:()=>{u.setState(u.initialState)},setOptions:S=>{const j=qa(S,u.options);u.options=m(j)},getState:()=>u.options.state,setState:S=>{u.options.onStateChange==null||u.options.onStateChange(S)},_getRowId:(S,j,C)=>{var N;return(N=u.options.getRowId==null?void 0:u.options.getRowId(S,j,C))!=null?N:`${C?[C.id,j].join("."):j}`},getCoreRowModel:()=>(u._getCoreRowModel||(u._getCoreRowModel=u.options.getCoreRowModel(u)),u._getCoreRowModel()),getRowModel:()=>u.getPaginationRowModel(),getRow:(S,j)=>{let C=(j?u.getPrePaginationRowModel():u.getRowModel()).rowsById[S];if(!C&&(C=u.getCoreRowModel().rowsById[S],!C))throw new Error;return C},_getDefaultColumnDef:Ce(()=>[u.options.defaultColumn],S=>{var j;return S=(j=S)!=null?j:{},{header:C=>{const N=C.header.column.columnDef;return N.accessorKey?N.accessorKey:N.accessorFn?N.id:null},cell:C=>{var N,M;return(N=(M=C.renderValue())==null||M.toString==null?void 0:M.toString())!=null?N:null},...u._features.reduce((C,N)=>Object.assign(C,N.getDefaultColumnDef==null?void 0:N.getDefaultColumnDef()),{}),...S}},Re(n,"debugColumns")),_getColumnDefs:()=>u.options.columns,getAllColumns:Ce(()=>[u._getColumnDefs()],S=>{const j=function(C,N,M){return M===void 0&&(M=0),C.map(E=>{const L=n1(u,E,M,N),B=E;return L.columns=B.columns?j(B.columns,L,M+1):[],L})};return j(S)},Re(n,"debugColumns")),getAllFlatColumns:Ce(()=>[u.getAllColumns()],S=>S.flatMap(j=>j.getFlatColumns()),Re(n,"debugColumns")),_getAllFlatColumnsById:Ce(()=>[u.getAllFlatColumns()],S=>S.reduce((j,C)=>(j[C.id]=C,j),{}),Re(n,"debugColumns")),getAllLeafColumns:Ce(()=>[u.getAllColumns(),u._getOrderColumnsFn()],(S,j)=>{let C=S.flatMap(N=>N.getLeafColumns());return j(C)},Re(n,"debugColumns")),getColumn:S=>u._getAllFlatColumnsById()[S]};Object.assign(u,x);for(let S=0;S<u._features.length;S++){const j=u._features[S];j==null||j.createTable==null||j.createTable(u)}return u}function U1(){return n=>Ce(()=>[n.options.data],r=>{const s={rows:[],flatRows:[],rowsById:{}},i=function(u,f,m){f===void 0&&(f=0);const y=[];for(let h=0;h<u.length;h++){const v=l1(n,n._getRowId(u[h],h,m),u[h],h,f,void 0,m==null?void 0:m.id);if(s.flatRows.push(v),s.rowsById[v.id]=v,y.push(v),n.options.getSubRows){var g;v.originalSubRows=n.options.getSubRows(u[h],h),(g=v.originalSubRows)!=null&&g.length&&(v.subRows=i(v.originalSubRows,f+1,v))}}return y};return s.rows=i(r),s},Re(n.options,"debugTable","getRowModel",()=>n._autoResetPageIndex()))}function $1(){return n=>Ce(()=>[n.getState().sorting,n.getPreSortedRowModel()],(r,s)=>{if(!s.rows.length||!(r!=null&&r.length))return s;const i=n.getState().sorting,u=[],f=i.filter(g=>{var h;return(h=n.getColumn(g.id))==null?void 0:h.getCanSort()}),m={};f.forEach(g=>{const h=n.getColumn(g.id);h&&(m[g.id]={sortUndefined:h.columnDef.sortUndefined,invertSorting:h.columnDef.invertSorting,sortingFn:h.getSortingFn()})});const y=g=>{const h=g.map(v=>({...v}));return h.sort((v,x)=>{for(let j=0;j<f.length;j+=1){var S;const C=f[j],N=m[C.id],M=N.sortUndefined,E=(S=C==null?void 0:C.desc)!=null?S:!1;let L=0;if(M){const B=v.getValue(C.id),ee=x.getValue(C.id),le=B===void 0,I=ee===void 0;if(le||I){if(M==="first")return le?-1:1;if(M==="last")return le?1:-1;L=le&&I?0:le?M:-M}}if(L===0&&(L=N.sortingFn(v,x,C.id)),L!==0)return E&&(L*=-1),N.invertSorting&&(L*=-1),L}return v.index-x.index}),h.forEach(v=>{var x;u.push(v),(x=v.subRows)!=null&&x.length&&(v.subRows=y(v.subRows))}),h};return{rows:y(s.rows),flatRows:u,rowsById:s.rowsById}},Re(n.options,"debugTable","getSortedRowModel",()=>n._autoResetPageIndex()))}/**
73
+ * react-table
74
+ *
75
+ * Copyright (c) TanStack
76
+ *
77
+ * This source code is licensed under the MIT license found in the
78
+ * LICENSE.md file in the root directory of this source tree.
79
+ *
80
+ * @license MIT
81
+ */function Gg(n,r){return n?V1(n)?w.createElement(n,r):n:null}function V1(n){return G1(n)||typeof n=="function"||q1(n)}function G1(n){return typeof n=="function"&&(()=>{const r=Object.getPrototypeOf(n);return r.prototype&&r.prototype.isReactComponent})()}function q1(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function F1(n){const r={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[s]=w.useState(()=>({current:L1(r)})),[i,u]=w.useState(()=>s.current.initialState);return s.current.setOptions(f=>({...f,...n,state:{...i,...n.state},onStateChange:m=>{u(m),n.onStateChange==null||n.onStateChange(m)}})),s.current}function Qp(n){var r,s,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(r=0;r<u;r++)n[r]&&(s=Qp(n[r]))&&(i&&(i+=" "),i+=s)}else for(s in n)n[s]&&(i&&(i+=" "),i+=s);return i}function Zp(){for(var n,r,s=0,i="",u=arguments.length;s<u;s++)(n=arguments[s])&&(r=Qp(n))&&(i&&(i+=" "),i+=r);return i}const Y1=(n,r)=>{const s=new Array(n.length+r.length);for(let i=0;i<n.length;i++)s[i]=n[i];for(let i=0;i<r.length;i++)s[n.length+i]=r[i];return s},K1=(n,r)=>({classGroupId:n,validator:r}),Jp=(n=new Map,r=null,s)=>({nextPart:n,validators:r,classGroupId:s}),Pi="-",qg=[],X1="arbitrary..",Q1=n=>{const r=J1(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return Z1(m);const y=m.split(Pi),g=y[0]===""&&y.length>1?1:0;return Ip(y,g,r)},getConflictingClassGroupIds:(m,y)=>{if(y){const g=i[m],h=s[m];return g?h?Y1(h,g):g:h||qg}return s[m]||qg}}},Ip=(n,r,s)=>{if(n.length-r===0)return s.classGroupId;const u=n[r],f=s.nextPart.get(u);if(f){const h=Ip(n,r+1,f);if(h)return h}const m=s.validators;if(m===null)return;const y=r===0?n.join(Pi):n.slice(r).join(Pi),g=m.length;for(let h=0;h<g;h++){const v=m[h];if(v.validator(y))return v.classGroupId}},Z1=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),s=r.indexOf(":"),i=r.slice(0,s);return i?X1+i:void 0})(),J1=n=>{const{theme:r,classGroups:s}=n;return I1(s,r)},I1=(n,r)=>{const s=Jp();for(const i in n){const u=n[i];Sd(u,s,i,r)}return s},Sd=(n,r,s,i)=>{const u=n.length;for(let f=0;f<u;f++){const m=n[f];P1(m,r,s,i)}},P1=(n,r,s,i)=>{if(typeof n=="string"){W1(n,r,s);return}if(typeof n=="function"){eS(n,r,s,i);return}tS(n,r,s,i)},W1=(n,r,s)=>{const i=n===""?r:Pp(r,n);i.classGroupId=s},eS=(n,r,s,i)=>{if(nS(n)){Sd(n(i),r,s,i);return}r.validators===null&&(r.validators=[]),r.validators.push(K1(s,n))},tS=(n,r,s,i)=>{const u=Object.entries(n),f=u.length;for(let m=0;m<f;m++){const[y,g]=u[m];Sd(g,Pp(r,y),s,i)}},Pp=(n,r)=>{let s=n;const i=r.split(Pi),u=i.length;for(let f=0;f<u;f++){const m=i[f];let y=s.nextPart.get(m);y||(y=Jp(),s.nextPart.set(m,y)),s=y}return s},nS=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,aS=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),i=Object.create(null);const u=(f,m)=>{s[f]=m,r++,r>n&&(r=0,i=s,s=Object.create(null))};return{get(f){let m=s[f];if(m!==void 0)return m;if((m=i[f])!==void 0)return u(f,m),m},set(f,m){f in s?s[f]=m:u(f,m)}}},ed="!",Fg=":",lS=[],Yg=(n,r,s,i,u)=>({modifiers:n,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:i,isExternal:u}),rS=n=>{const{prefix:r,experimentalParseClassName:s}=n;let i=u=>{const f=[];let m=0,y=0,g=0,h;const v=u.length;for(let N=0;N<v;N++){const M=u[N];if(m===0&&y===0){if(M===Fg){f.push(u.slice(g,N)),g=N+1;continue}if(M==="/"){h=N;continue}}M==="["?m++:M==="]"?m--:M==="("?y++:M===")"&&y--}const x=f.length===0?u:u.slice(g);let S=x,j=!1;x.endsWith(ed)?(S=x.slice(0,-1),j=!0):x.startsWith(ed)&&(S=x.slice(1),j=!0);const C=h&&h>g?h-g:void 0;return Yg(f,j,S,C)};if(r){const u=r+Fg,f=i;i=m=>m.startsWith(u)?f(m.slice(u.length)):Yg(lS,!1,m,void 0,!0)}if(s){const u=i;i=f=>s({className:f,parseClassName:u})}return i},sS=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((s,i)=>{r.set(s,1e6+i)}),s=>{const i=[];let u=[];for(let f=0;f<s.length;f++){const m=s[f],y=m[0]==="[",g=r.has(m);y||g?(u.length>0&&(u.sort(),i.push(...u),u=[]),i.push(m)):u.push(m)}return u.length>0&&(u.sort(),i.push(...u)),i}},iS=n=>({cache:aS(n.cacheSize),parseClassName:rS(n),sortModifiers:sS(n),postfixLookupClassGroupIds:oS(n),...Q1(n)}),oS=n=>{const r=Object.create(null),s=n.postfixLookupClassGroups;if(s)for(let i=0;i<s.length;i++)r[s[i]]=!0;return r},uS=/\s+/,cS=(n,r)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:u,sortModifiers:f,postfixLookupClassGroupIds:m}=r,y=[],g=n.trim().split(uS);let h="";for(let v=g.length-1;v>=0;v-=1){const x=g[v],{isExternal:S,modifiers:j,hasImportantModifier:C,baseClassName:N,maybePostfixModifierPosition:M}=s(x);if(S){h=x+(h.length>0?" "+h:h);continue}let E=!!M,L;if(E){const P=N.substring(0,M);L=i(P);const q=L&&m[L]?i(N):void 0;q&&q!==L&&(L=q,E=!1)}else L=i(N);if(!L){if(!E){h=x+(h.length>0?" "+h:h);continue}if(L=i(N),!L){h=x+(h.length>0?" "+h:h);continue}E=!1}const B=j.length===0?"":j.length===1?j[0]:f(j).join(":"),ee=C?B+ed:B,le=ee+L;if(y.indexOf(le)>-1)continue;y.push(le);const I=u(L,E);for(let P=0;P<I.length;++P){const q=I[P];y.push(ee+q)}h=x+(h.length>0?" "+h:h)}return h},dS=(...n)=>{let r=0,s,i,u="";for(;r<n.length;)(s=n[r++])&&(i=Wp(s))&&(u&&(u+=" "),u+=i);return u},Wp=n=>{if(typeof n=="string")return n;let r,s="";for(let i=0;i<n.length;i++)n[i]&&(r=Wp(n[i]))&&(s&&(s+=" "),s+=r);return s},fS=(n,...r)=>{let s,i,u,f;const m=g=>{const h=r.reduce((v,x)=>x(v),n());return s=iS(h),i=s.cache.get,u=s.cache.set,f=y,y(g)},y=g=>{const h=i(g);if(h)return h;const v=cS(g,s);return u(g,v),v};return f=m,(...g)=>f(dS(...g))},mS=[],yt=n=>{const r=s=>s[n]||mS;return r.isThemeGetter=!0,r},e0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,t0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hS=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,gS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pS=/\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$/,yS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,xS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Va=n=>hS.test(n),De=n=>!!n&&!Number.isNaN(Number(n)),Bn=n=>!!n&&Number.isInteger(Number(n)),$c=n=>n.endsWith("%")&&De(n.slice(0,-1)),ua=n=>gS.test(n),n0=()=>!0,bS=n=>pS.test(n)&&!yS.test(n),wd=()=>!1,SS=n=>xS.test(n),wS=n=>vS.test(n),NS=n=>!ce(n)&&!fe(n),jS=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),CS=n=>Qa(n,r0,wd),ce=n=>e0.test(n),pl=n=>Qa(n,s0,bS),Kg=n=>Qa(n,AS,De),RS=n=>Qa(n,o0,n0),_S=n=>Qa(n,i0,wd),Xg=n=>Qa(n,a0,wd),ES=n=>Qa(n,l0,wS),Vi=n=>Qa(n,u0,SS),fe=n=>t0.test(n),os=n=>yl(n,s0),MS=n=>yl(n,i0),Qg=n=>yl(n,a0),TS=n=>yl(n,r0),zS=n=>yl(n,l0),Gi=n=>yl(n,u0,!0),kS=n=>yl(n,o0,!0),Qa=(n,r,s)=>{const i=e0.exec(n);return i?i[1]?r(i[1]):s(i[2]):!1},yl=(n,r,s=!1)=>{const i=t0.exec(n);return i?i[1]?r(i[1]):s:!1},a0=n=>n==="position"||n==="percentage",l0=n=>n==="image"||n==="url",r0=n=>n==="length"||n==="size"||n==="bg-size",s0=n=>n==="length",AS=n=>n==="number",i0=n=>n==="family-name",o0=n=>n==="number"||n==="weight",u0=n=>n==="shadow",DS=()=>{const n=yt("color"),r=yt("font"),s=yt("text"),i=yt("font-weight"),u=yt("tracking"),f=yt("leading"),m=yt("breakpoint"),y=yt("container"),g=yt("spacing"),h=yt("radius"),v=yt("shadow"),x=yt("inset-shadow"),S=yt("text-shadow"),j=yt("drop-shadow"),C=yt("blur"),N=yt("perspective"),M=yt("aspect"),E=yt("ease"),L=yt("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ee=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],le=()=>[...ee(),fe,ce],I=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],q=()=>[fe,ce,g],se=()=>[Va,"full","auto",...q()],re=()=>[Bn,"none","subgrid",fe,ce],Q=()=>["auto",{span:["full",Bn,fe,ce]},Bn,fe,ce],oe=()=>[Bn,"auto",fe,ce],pe=()=>["auto","min","max","fr",fe,ce],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...q()],$=()=>[Va,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...q()],W=()=>[Va,"screen","full","dvw","lvw","svw","min","max","fit",...q()],de=()=>[Va,"screen","full","lh","dvh","lvh","svh","min","max","fit",...q()],X=()=>[n,fe,ce],R=()=>[...ee(),Qg,Xg,{position:[fe,ce]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",TS,CS,{size:[fe,ce]}],Z=()=>[$c,os,pl],te=()=>["","none","full",h,fe,ce],ie=()=>["",De,os,pl],je=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[De,$c,Qg,Xg],wt=()=>["","none",C,fe,ce],xt=()=>["none",De,fe,ce],gt=()=>["none",De,fe,ce],on=()=>[De,fe,ce],st=()=>[Va,"full",...q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ua],breakpoint:[ua],color:[n0],container:[ua],"drop-shadow":[ua],ease:["in","out","in-out"],font:[NS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ua],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ua],shadow:[ua],spacing:["px",De],text:[ua],"text-shadow":[ua],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Va,ce,fe,M]}],container:["container"],"container-type":[{"@container":["","normal","size",fe,ce]}],"container-named":[jS],columns:[{columns:[De,ce,fe,y]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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:le()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:se()}],"inset-x":[{"inset-x":se()}],"inset-y":[{"inset-y":se()}],start:[{"inset-s":se(),start:se()}],end:[{"inset-e":se(),end:se()}],"inset-bs":[{"inset-bs":se()}],"inset-be":[{"inset-be":se()}],top:[{top:se()}],right:[{right:se()}],bottom:[{bottom:se()}],left:[{left:se()}],visibility:["visible","invisible","collapse"],z:[{z:[Bn,"auto",fe,ce]}],basis:[{basis:[Va,"full","auto",y,...q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,Va,"auto","initial","none",ce]}],grow:[{grow:["",De,fe,ce]}],shrink:[{shrink:["",De,fe,ce]}],order:[{order:[Bn,"first","last","none",fe,ce]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":pe()}],"auto-rows":[{"auto-rows":pe()}],gap:[{gap:q()}],"gap-x":[{"gap-x":q()}],"gap-y":[{"gap-y":q()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:q()}],px:[{px:q()}],py:[{py:q()}],ps:[{ps:q()}],pe:[{pe:q()}],pbs:[{pbs:q()}],pbe:[{pbe:q()}],pt:[{pt:q()}],pr:[{pr:q()}],pb:[{pb:q()}],pl:[{pl:q()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mbs:[{mbs:T()}],mbe:[{mbe:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":q()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...de()]}],"min-block-size":[{"min-block":["auto",...de()]}],"max-block-size":[{"max-block":["none",...de()]}],w:[{w:[y,"screen",...$()]}],"min-w":[{"min-w":[y,"screen","none",...$()]}],"max-w":[{"max-w":[y,"screen","none","prose",{screen:[m]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",s,os,pl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,kS,RS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$c,ce]}],"font-family":[{font:[MS,_S,r]}],"font-features":[{"font-features":[ce]}],"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:[u,fe,ce]}],"line-clamp":[{"line-clamp":[De,"none",fe,Kg]}],leading:[{leading:[f,...q()]}],"list-image":[{"list-image":["none",fe,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",fe,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:X()}],"text-color":[{text:X()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",fe,pl]}],"text-decoration-color":[{decoration:X()}],"underline-offset":[{"underline-offset":[De,"auto",fe,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:q()}],"tab-size":[{tab:[Bn,fe,ce]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe,ce]}],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",fe,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Bn,fe,ce],radial:["",fe,ce],conic:[Bn,fe,ce]},zS,ES]}],"bg-color":[{bg:X()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:X()}],"gradient-via":[{via:X()}],"gradient-to":[{to:X()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...je(),"hidden","none"]}],"divide-style":[{divide:[...je(),"hidden","none"]}],"border-color":[{border:X()}],"border-color-x":[{"border-x":X()}],"border-color-y":[{"border-y":X()}],"border-color-s":[{"border-s":X()}],"border-color-e":[{"border-e":X()}],"border-color-bs":[{"border-bs":X()}],"border-color-be":[{"border-be":X()}],"border-color-t":[{"border-t":X()}],"border-color-r":[{"border-r":X()}],"border-color-b":[{"border-b":X()}],"border-color-l":[{"border-l":X()}],"divide-color":[{divide:X()}],"outline-style":[{outline:[...je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,fe,ce]}],"outline-w":[{outline:["",De,os,pl]}],"outline-color":[{outline:X()}],shadow:[{shadow:["","none",v,Gi,Vi]}],"shadow-color":[{shadow:X()}],"inset-shadow":[{"inset-shadow":["none",x,Gi,Vi]}],"inset-shadow-color":[{"inset-shadow":X()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:X()}],"ring-offset-w":[{"ring-offset":[De,pl]}],"ring-offset-color":[{"ring-offset":X()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":X()}],"text-shadow":[{"text-shadow":["none",S,Gi,Vi]}],"text-shadow-color":[{"text-shadow":X()}],opacity:[{opacity:[De,fe,ce]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"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":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":X()}],"mask-image-linear-to-color":[{"mask-linear-to":X()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":X()}],"mask-image-t-to-color":[{"mask-t-to":X()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":X()}],"mask-image-r-to-color":[{"mask-r-to":X()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":X()}],"mask-image-b-to-color":[{"mask-b-to":X()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":X()}],"mask-image-l-to-color":[{"mask-l-to":X()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":X()}],"mask-image-x-to-color":[{"mask-x-to":X()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":X()}],"mask-image-y-to-color":[{"mask-y-to":X()}],"mask-image-radial":[{"mask-radial":[fe,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":X()}],"mask-image-radial-to-color":[{"mask-radial-to":X()}],"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":ee()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":X()}],"mask-image-conic-to-color":[{"mask-conic-to":X()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",fe,ce]}],filter:[{filter:["","none",fe,ce]}],blur:[{blur:wt()}],brightness:[{brightness:[De,fe,ce]}],contrast:[{contrast:[De,fe,ce]}],"drop-shadow":[{"drop-shadow":["","none",j,Gi,Vi]}],"drop-shadow-color":[{"drop-shadow":X()}],grayscale:[{grayscale:["",De,fe,ce]}],"hue-rotate":[{"hue-rotate":[De,fe,ce]}],invert:[{invert:["",De,fe,ce]}],saturate:[{saturate:[De,fe,ce]}],sepia:[{sepia:["",De,fe,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",fe,ce]}],"backdrop-blur":[{"backdrop-blur":wt()}],"backdrop-brightness":[{"backdrop-brightness":[De,fe,ce]}],"backdrop-contrast":[{"backdrop-contrast":[De,fe,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,fe,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,fe,ce]}],"backdrop-invert":[{"backdrop-invert":["",De,fe,ce]}],"backdrop-opacity":[{"backdrop-opacity":[De,fe,ce]}],"backdrop-saturate":[{"backdrop-saturate":[De,fe,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",De,fe,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":q()}],"border-spacing-x":[{"border-spacing-x":q()}],"border-spacing-y":[{"border-spacing-y":q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",fe,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",fe,ce]}],ease:[{ease:["linear","initial",E,fe,ce]}],delay:[{delay:[De,fe,ce]}],animate:[{animate:["none",L,fe,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,fe,ce]}],"perspective-origin":[{"perspective-origin":le()}],rotate:[{rotate:xt()}],"rotate-x":[{"rotate-x":xt()}],"rotate-y":[{"rotate-y":xt()}],"rotate-z":[{"rotate-z":xt()}],scale:[{scale:gt()}],"scale-x":[{"scale-x":gt()}],"scale-y":[{"scale-y":gt()}],"scale-z":[{"scale-z":gt()}],"scale-3d":["scale-3d"],skew:[{skew:on()}],"skew-x":[{"skew-x":on()}],"skew-y":[{"skew-y":on()}],transform:[{transform:[fe,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:le()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:st()}],"translate-x":[{"translate-x":st()}],"translate-y":[{"translate-y":st()}],"translate-z":[{"translate-z":st()}],"translate-none":["translate-none"],zoom:[{zoom:[Bn,fe,ce]}],accent:[{accent:X()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:X()}],"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",fe,ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":X()}],"scrollbar-track-color":[{"scrollbar-track":X()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-me":[{"scroll-me":q()}],"scroll-mbs":[{"scroll-mbs":q()}],"scroll-mbe":[{"scroll-mbe":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-pe":[{"scroll-pe":q()}],"scroll-pbs":[{"scroll-pbs":q()}],"scroll-pbe":[{"scroll-pbe":q()}],"scroll-pt":[{"scroll-pt":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"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",fe,ce]}],fill:[{fill:["none",...X()]}],"stroke-w":[{stroke:[De,os,pl,Kg]}],stroke:[{stroke:["none",...X()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},OS=fS(DS);function Me(...n){return OS(Zp(n))}function c0({className:n,...r}){return c.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:c.jsx("table",{"data-slot":"table",className:Me("w-full caption-bottom text-sm",n),...r})})}function d0({className:n,...r}){return c.jsx("thead",{"data-slot":"table-header",className:Me("[&_tr]:border-b",n),...r})}function f0({className:n,...r}){return c.jsx("tbody",{"data-slot":"table-body",className:Me("[&_tr:last-child]:border-0",n),...r})}function fs({className:n,...r}){return c.jsx("tr",{"data-slot":"table-row",className:Me("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",n),...r})}function Un({className:n,...r}){return c.jsx("th",{"data-slot":"table-head",className:Me("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),...r})}function _n({className:n,...r}){return c.jsx("td",{"data-slot":"table-cell",className:Me("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),...r})}/**
82
+ * @license lucide-react v1.25.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const m0=(...n)=>n.filter((r,s,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===s).join(" ").trim();/**
87
+ * @license lucide-react v1.25.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const HS=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
92
+ * @license lucide-react v1.25.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const BS=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,i)=>i?i.toUpperCase():s.toLowerCase());/**
97
+ * @license lucide-react v1.25.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const Zg=n=>{const r=BS(n);return r.charAt(0).toUpperCase()+r.slice(1)};/**
102
+ * @license lucide-react v1.25.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */var Vc={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"};/**
107
+ * @license lucide-react v1.25.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const LS=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},US=w.createContext({}),$S=()=>w.useContext(US),VS=w.forwardRef(({color:n,size:r,strokeWidth:s,absoluteStrokeWidth:i,className:u="",children:f,iconNode:m,...y},g)=>{const{size:h=24,strokeWidth:v=2,absoluteStrokeWidth:x=!1,color:S="currentColor",className:j=""}=$S()??{},C=i??x?Number(s??v)*24/Number(r??h):s??v;return w.createElement("svg",{ref:g,...Vc,width:r??h??Vc.width,height:r??h??Vc.height,stroke:n??S,strokeWidth:C,className:m0("lucide",j,u),...!f&&!LS(y)&&{"aria-hidden":"true"},...y},[...m.map(([N,M])=>w.createElement(N,M)),...Array.isArray(f)?f:[f]])});/**
112
+ * @license lucide-react v1.25.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const ye=(n,r)=>{const s=w.forwardRef(({className:i,...u},f)=>w.createElement(VS,{ref:f,iconNode:r,className:m0(`lucide-${HS(Zg(n))}`,`lucide-${n}`,i),...u}));return s.displayName=Zg(n),s};/**
117
+ * @license lucide-react v1.25.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const GS=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],ys=ye("activity",GS);/**
122
+ * @license lucide-react v1.25.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const qS=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],h0=ye("arrow-down",qS);/**
127
+ * @license lucide-react v1.25.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const FS=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Wi=ye("arrow-left",FS);/**
132
+ * @license lucide-react v1.25.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const YS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Nd=ye("arrow-right",YS);/**
137
+ * @license lucide-react v1.25.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const KS=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Zi=ye("arrow-up-down",KS);/**
142
+ * @license lucide-react v1.25.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const XS=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],QS=ye("arrow-up",XS);/**
147
+ * @license lucide-react v1.25.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const ZS=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],JS=ye("bot",ZS);/**
152
+ * @license lucide-react v1.25.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const IS=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],ms=ye("brain",IS);/**
157
+ * @license lucide-react v1.25.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const PS=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],WS=ye("calendar-clock",PS);/**
162
+ * @license lucide-react v1.25.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const e2=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],eo=ye("chart-column",e2);/**
167
+ * @license lucide-react v1.25.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const t2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],n2=ye("check",t2);/**
172
+ * @license lucide-react v1.25.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const a2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],l2=ye("chevron-down",a2);/**
177
+ * @license lucide-react v1.25.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const r2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],jd=ye("chevron-left",r2);/**
182
+ * @license lucide-react v1.25.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const s2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],or=ye("chevron-right",s2);/**
187
+ * @license lucide-react v1.25.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const i2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],g0=ye("circle-alert",i2);/**
192
+ * @license lucide-react v1.25.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const o2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],u2=ye("circle-check",o2);/**
197
+ * @license lucide-react v1.25.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const c2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],fa=ye("clock",c2);/**
202
+ * @license lucide-react v1.25.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const d2=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Fa=ye("code-xml",d2);/**
207
+ * @license lucide-react v1.25.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const f2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],m2=ye("columns-3",f2);/**
212
+ * @license lucide-react v1.25.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const h2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],g2=ye("copy",h2);/**
217
+ * @license lucide-react v1.25.0 - ISC
218
+ *
219
+ * This source code is licensed under the ISC license.
220
+ * See the LICENSE file in the root directory of this source tree.
221
+ */const p2=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],$n=ye("database",p2);/**
222
+ * @license lucide-react v1.25.0 - ISC
223
+ *
224
+ * This source code is licensed under the ISC license.
225
+ * See the LICENSE file in the root directory of this source tree.
226
+ */const y2=[["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"}]],x2=ye("download",y2);/**
227
+ * @license lucide-react v1.25.0 - ISC
228
+ *
229
+ * This source code is licensed under the ISC license.
230
+ * See the LICENSE file in the root directory of this source tree.
231
+ */const v2=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],p0=ye("earth",v2);/**
232
+ * @license lucide-react v1.25.0 - ISC
233
+ *
234
+ * This source code is licensed under the ISC license.
235
+ * See the LICENSE file in the root directory of this source tree.
236
+ */const b2=[["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"}]],y0=ye("eye-off",b2);/**
237
+ * @license lucide-react v1.25.0 - ISC
238
+ *
239
+ * This source code is licensed under the ISC license.
240
+ * See the LICENSE file in the root directory of this source tree.
241
+ */const S2=[["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"}]],x0=ye("eye",S2);/**
242
+ * @license lucide-react v1.25.0 - ISC
243
+ *
244
+ * This source code is licensed under the ISC license.
245
+ * See the LICENSE file in the root directory of this source tree.
246
+ */const w2=[["path",{d:"M14 2v5a1 1 0 001 1h5",key:"9v5fu7"}],["path",{d:"M14.692 22H18a2 2 0 002-2V8a2.4 2.4 0 00-.706-1.706l-3.588-3.588A2.4 2.4 0 0014 2H6a2 2 0 00-2 2v3.804",key:"1ne0j7"}],["path",{d:"M2.264 13.752 7 16.5l4.737-2.748",key:"t73mg3"}],["path",{d:"M2.995 13.014A2 2 0 002 14.744v3.516a2 2 0 00.996 1.73l3 1.74a2 2 0 002.008 0l3-1.74A2 2 0 0012 18.26v-3.517a2 2 0 00-.995-1.73l-3-1.742a2 2 0 00-1.892-.064z",key:"h4qck"}],["path",{d:"M7 16.5V22",key:"1i1gou"}]],to=ye("file-box",w2);/**
247
+ * @license lucide-react v1.25.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ */const N2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],td=ye("file-text",N2);/**
252
+ * @license lucide-react v1.25.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const j2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],C2=ye("file",j2);/**
257
+ * @license lucide-react v1.25.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const R2=[["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"}]],fr=ye("globe",R2);/**
262
+ * @license lucide-react v1.25.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const _2=[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]],v0=ye("hard-drive",_2);/**
267
+ * @license lucide-react v1.25.0 - ISC
268
+ *
269
+ * This source code is licensed under the ISC license.
270
+ * See the LICENSE file in the root directory of this source tree.
271
+ */const E2=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],M2=ye("history",E2);/**
272
+ * @license lucide-react v1.25.0 - ISC
273
+ *
274
+ * This source code is licensed under the ISC license.
275
+ * See the LICENSE file in the root directory of this source tree.
276
+ */const T2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],z2=ye("info",T2);/**
277
+ * @license lucide-react v1.25.0 - ISC
278
+ *
279
+ * This source code is licensed under the ISC license.
280
+ * See the LICENSE file in the root directory of this source tree.
281
+ */const k2=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],A2=ye("layout-grid",k2);/**
282
+ * @license lucide-react v1.25.0 - ISC
283
+ *
284
+ * This source code is licensed under the ISC license.
285
+ * See the LICENSE file in the root directory of this source tree.
286
+ */const D2=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],O2=ye("link-2",D2);/**
287
+ * @license lucide-react v1.25.0 - ISC
288
+ *
289
+ * This source code is licensed under the ISC license.
290
+ * See the LICENSE file in the root directory of this source tree.
291
+ */const H2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Cd=ye("loader-circle",H2);/**
292
+ * @license lucide-react v1.25.0 - ISC
293
+ *
294
+ * This source code is licensed under the ISC license.
295
+ * See the LICENSE file in the root directory of this source tree.
296
+ */const B2=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],b0=ye("lock",B2);/**
297
+ * @license lucide-react v1.25.0 - ISC
298
+ *
299
+ * This source code is licensed under the ISC license.
300
+ * See the LICENSE file in the root directory of this source tree.
301
+ */const L2=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],U2=ye("message-square",L2);/**
302
+ * @license lucide-react v1.25.0 - ISC
303
+ *
304
+ * This source code is licensed under the ISC license.
305
+ * See the LICENSE file in the root directory of this source tree.
306
+ */const $2=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],V2=ye("monitor",$2);/**
307
+ * @license lucide-react v1.25.0 - ISC
308
+ *
309
+ * This source code is licensed under the ISC license.
310
+ * See the LICENSE file in the root directory of this source tree.
311
+ */const G2=[["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"}]],q2=ye("moon",G2);/**
312
+ * @license lucide-react v1.25.0 - ISC
313
+ *
314
+ * This source code is licensed under the ISC license.
315
+ * See the LICENSE file in the root directory of this source tree.
316
+ */const F2=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],S0=ye("play",F2);/**
317
+ * @license lucide-react v1.25.0 - ISC
318
+ *
319
+ * This source code is licensed under the ISC license.
320
+ * See the LICENSE file in the root directory of this source tree.
321
+ */const Y2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Vn=ye("refresh-cw",Y2);/**
322
+ * @license lucide-react v1.25.0 - ISC
323
+ *
324
+ * This source code is licensed under the ISC license.
325
+ * See the LICENSE file in the root directory of this source tree.
326
+ */const K2=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],Rd=ye("rocket",K2);/**
327
+ * @license lucide-react v1.25.0 - ISC
328
+ *
329
+ * This source code is licensed under the ISC license.
330
+ * See the LICENSE file in the root directory of this source tree.
331
+ */const X2=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Q2=ye("rotate-ccw",X2);/**
332
+ * @license lucide-react v1.25.0 - ISC
333
+ *
334
+ * This source code is licensed under the ISC license.
335
+ * See the LICENSE file in the root directory of this source tree.
336
+ */const Z2=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],xs=ye("scroll-text",Z2);/**
337
+ * @license lucide-react v1.25.0 - ISC
338
+ *
339
+ * This source code is licensed under the ISC license.
340
+ * See the LICENSE file in the root directory of this source tree.
341
+ */const J2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],co=ye("search",J2);/**
342
+ * @license lucide-react v1.25.0 - ISC
343
+ *
344
+ * This source code is licensed under the ISC license.
345
+ * See the LICENSE file in the root directory of this source tree.
346
+ */const I2=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_d=ye("settings",I2);/**
347
+ * @license lucide-react v1.25.0 - ISC
348
+ *
349
+ * This source code is licensed under the ISC license.
350
+ * See the LICENSE file in the root directory of this source tree.
351
+ */const P2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Jg=ye("shield",P2);/**
352
+ * @license lucide-react v1.25.0 - ISC
353
+ *
354
+ * This source code is licensed under the ISC license.
355
+ * See the LICENSE file in the root directory of this source tree.
356
+ */const W2=[["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"}]],ew=ye("sun",W2);/**
357
+ * @license lucide-react v1.25.0 - ISC
358
+ *
359
+ * This source code is licensed under the ISC license.
360
+ * See the LICENSE file in the root directory of this source tree.
361
+ */const tw=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],w0=ye("table-2",tw);/**
362
+ * @license lucide-react v1.25.0 - ISC
363
+ *
364
+ * This source code is licensed under the ISC license.
365
+ * See the LICENSE file in the root directory of this source tree.
366
+ */const nw=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],aw=ye("timer",nw);/**
367
+ * @license lucide-react v1.25.0 - ISC
368
+ *
369
+ * This source code is licensed under the ISC license.
370
+ * See the LICENSE file in the root directory of this source tree.
371
+ */const lw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],no=ye("trash-2",lw);/**
372
+ * @license lucide-react v1.25.0 - ISC
373
+ *
374
+ * This source code is licensed under the ISC license.
375
+ * See the LICENSE file in the root directory of this source tree.
376
+ */const rw=[["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"}]],nd=ye("triangle-alert",rw);/**
377
+ * @license lucide-react v1.25.0 - ISC
378
+ *
379
+ * This source code is licensed under the ISC license.
380
+ * See the LICENSE file in the root directory of this source tree.
381
+ */const sw=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],qi=ye("upload",sw);/**
382
+ * @license lucide-react v1.25.0 - ISC
383
+ *
384
+ * This source code is licensed under the ISC license.
385
+ * See the LICENSE file in the root directory of this source tree.
386
+ */const iw=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],ow=ye("user",iw);/**
387
+ * @license lucide-react v1.25.0 - ISC
388
+ *
389
+ * This source code is licensed under the ISC license.
390
+ * See the LICENSE file in the root directory of this source tree.
391
+ */const uw=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],N0=ye("users",uw);/**
392
+ * @license lucide-react v1.25.0 - ISC
393
+ *
394
+ * This source code is licensed under the ISC license.
395
+ * See the LICENSE file in the root directory of this source tree.
396
+ */const cw=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],dw=ye("workflow",cw);/**
397
+ * @license lucide-react v1.25.0 - ISC
398
+ *
399
+ * This source code is licensed under the ISC license.
400
+ * See the LICENSE file in the root directory of this source tree.
401
+ */const fw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fo=ye("x",fw);/**
402
+ * @license lucide-react v1.25.0 - ISC
403
+ *
404
+ * This source code is licensed under the ISC license.
405
+ * See the LICENSE file in the root directory of this source tree.
406
+ */const mw=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],xl=ye("zap",mw),hw={en:"en-US",ko:"ko-KR"};function Xa(n){return hw[n]}function Ya(n,r,s){return new Intl.NumberFormat(Xa(r),s).format(n)}function hs(n,r,s){return new Intl.DateTimeFormat(Xa(r),s).format(new Date(n))}function Ns(n,r,s){return hs(n,r,{dateStyle:"medium",timeStyle:"short",...s})}const gw=w.createContext(null);function Gn(){const n=w.useContext(gw);if(!n)throw new Error("useLocale must be used within LocaleProvider");return n}function Je(){return Gn().t}function j0({data:n,columns:r,loading:s=!1,emptyMessage:i,onRowClick:u,onCellClick:f,rowKeyField:m="id",className:y}){const g=Je(),[h,v]=w.useState([]),[x]=w.useState("onChange"),S=w.useMemo(()=>r.map(N=>({accessorKey:N.accessorKey,header:({column:M})=>{const E=M.getIsSorted();return c.jsxs("button",{className:Me("flex items-center gap-1 text-xs font-semibold select-none",N.enableSorting!==!1&&"cursor-pointer hover:text-foreground"),onClick:()=>{N.enableSorting!==!1&&M.toggleSorting()},title:N.headerTooltip,children:[N.header,N.enableSorting!==!1&&(E==="asc"?c.jsx(QS,{className:"h-3 w-3"}):E==="desc"?c.jsx(h0,{className:"h-3 w-3"}):c.jsx(Zi,{className:"h-3 w-3 opacity-30"}))]})},cell:N.cell?N.cell:M=>{const E=M.getValue();return E==null?c.jsx("span",{className:"text-muted-foreground italic",children:"null"}):typeof E=="boolean"?c.jsx("span",{className:E?"text-green-500":"text-red-500",children:E?"true":"false"}):c.jsx("span",{className:"block truncate",children:String(E)})},size:N.minWidth||150,minSize:N.minWidth||80,maxSize:N.maxWidth||400,enableSorting:N.enableSorting!==!1,enableResizing:!0,meta:{cellClassName:N.cellClassName}})),[r]),j=F1({data:n,columns:S,state:{sorting:h},onSortingChange:v,getCoreRowModel:U1(),getSortedRowModel:$1(),columnResizeMode:x,enableColumnResizing:!0}),C=w.useCallback((N,M)=>{const E=r.find(L=>L.accessorKey===N);return E!=null&&E.cellClassName?typeof E.cellClassName=="function"?E.cellClassName(M):E.cellClassName:""},[r]);return c.jsxs("div",{className:Me("relative h-full overflow-auto",y),children:[s&&c.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/60",children:c.jsx(Cd,{className:"h-5 w-5 animate-spin text-muted-foreground"})}),c.jsxs(c0,{className:"table-fixed",children:[c.jsx(d0,{className:"sticky top-0 z-[5] bg-muted/80 backdrop-blur-sm",children:j.getHeaderGroups().map(N=>c.jsx(fs,{className:"border-b border-border hover:bg-transparent",children:N.headers.map(M=>c.jsxs(Un,{className:"text-muted-foreground text-xs px-3 py-2.5 relative select-none",style:{width:M.getSize(),minWidth:M.column.columnDef.minSize,maxWidth:M.column.columnDef.maxSize},children:[M.isPlaceholder?null:Gg(M.column.columnDef.header,M.getContext()),c.jsx("div",{onMouseDown:M.getResizeHandler(),onTouchStart:M.getResizeHandler(),className:Me("absolute right-0 top-0 h-full w-1 cursor-col-resize select-none touch-none","hover:bg-primary/40 active:bg-primary/60",M.column.getIsResizing()&&"bg-primary/60")})]},M.id))},N.id))}),c.jsx(f0,{children:j.getRowModel().rows.length===0&&!s?c.jsx(fs,{children:c.jsx(_n,{colSpan:S.length,className:"h-24 text-center text-muted-foreground",children:i??g("data.noData")})}):j.getRowModel().rows.map((N,M)=>c.jsx(fs,{className:Me("border-b border-border transition-colors",M%2===1&&"bg-muted/30",u&&"cursor-pointer"),onClick:()=>u==null?void 0:u(N.original),children:N.getVisibleCells().map(E=>{const L=E.column.id,B=E.getValue(),ee=C(L,B);return c.jsx(_n,{className:Me("px-3 py-2.5 text-xs overflow-hidden text-ellipsis",ee),style:{width:E.column.getSize(),minWidth:E.column.columnDef.minSize,maxWidth:E.column.columnDef.maxSize},onClick:le=>{f==null||f(N.original,L,le)},children:Gg(E.column.columnDef.cell,E.getContext())},E.id)})},N.original[m]??M))})]})]})}function pw(n){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",r.appendChild(s),s.styleSheet?s.styleSheet.cssText=n:s.appendChild(document.createTextNode(n))}const yw=n=>{switch(n){case"success":return bw;case"info":return ww;case"warning":return Sw;case"error":return Nw;default:return null}},xw=Array(12).fill(0),vw=({visible:n,className:r})=>ae.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":n},ae.createElement("div",{className:"sonner-spinner"},xw.map((s,i)=>ae.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),bw=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),Sw=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ae.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"})),ww=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),Nw=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),jw=ae.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"},ae.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ae.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Cw=()=>{const[n,r]=ae.useState(document.hidden);return ae.useEffect(()=>{const s=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),n};let ad=1;class Rw{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const s=this.subscribers.indexOf(r);this.subscribers.splice(s,1)}),this.publish=r=>{this.subscribers.forEach(s=>s(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var s;const{message:i,...u}=r,f=typeof(r==null?void 0:r.id)=="number"||((s=r.id)==null?void 0:s.length)>0?r.id:ad++,m=this.toasts.find(g=>g.id===f),y=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),m?this.toasts=this.toasts.map(g=>g.id===f?(this.publish({...g,...r,id:f,title:i}),{...g,...r,id:f,dismissible:y,title:i}):g):this.addToast({title:i,...u,dismissible:y,id:f}),f},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:r,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(i=>i({id:s.id,dismiss:!0}))}),r),this.message=(r,s)=>this.create({...s,message:r}),this.error=(r,s)=>this.create({...s,message:r,type:"error"}),this.success=(r,s)=>this.create({...s,type:"success",message:r}),this.info=(r,s)=>this.create({...s,type:"info",message:r}),this.warning=(r,s)=>this.create({...s,type:"warning",message:r}),this.loading=(r,s)=>this.create({...s,type:"loading",message:r}),this.promise=(r,s)=>{if(!s)return;let i;s.loading!==void 0&&(i=this.create({...s,promise:r,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const u=Promise.resolve(r instanceof Function?r():r);let f=i!==void 0,m;const y=u.then(async h=>{if(m=["resolve",h],ae.isValidElement(h))f=!1,this.create({id:i,type:"default",message:h});else if(Ew(h)&&!h.ok){f=!1;const x=typeof s.error=="function"?await s.error(`HTTP error! status: ${h.status}`):s.error,S=typeof s.description=="function"?await s.description(`HTTP error! status: ${h.status}`):s.description,C=typeof x=="object"&&!ae.isValidElement(x)?x:{message:x};this.create({id:i,type:"error",description:S,...C})}else if(h instanceof Error){f=!1;const x=typeof s.error=="function"?await s.error(h):s.error,S=typeof s.description=="function"?await s.description(h):s.description,C=typeof x=="object"&&!ae.isValidElement(x)?x:{message:x};this.create({id:i,type:"error",description:S,...C})}else if(s.success!==void 0){f=!1;const x=typeof s.success=="function"?await s.success(h):s.success,S=typeof s.description=="function"?await s.description(h):s.description,C=typeof x=="object"&&!ae.isValidElement(x)?x:{message:x};this.create({id:i,type:"success",description:S,...C})}}).catch(async h=>{if(m=["reject",h],s.error!==void 0){f=!1;const v=typeof s.error=="function"?await s.error(h):s.error,x=typeof s.description=="function"?await s.description(h):s.description,j=typeof v=="object"&&!ae.isValidElement(v)?v:{message:v};this.create({id:i,type:"error",description:x,...j})}}).finally(()=>{f&&(this.dismiss(i),i=void 0),s.finally==null||s.finally.call(s)}),g=()=>new Promise((h,v)=>y.then(()=>m[0]==="reject"?v(m[1]):h(m[1])).catch(v));return typeof i!="string"&&typeof i!="number"?{unwrap:g}:Object.assign(i,{unwrap:g})},this.custom=(r,s)=>{const i=(s==null?void 0:s.id)||ad++;return this.create({jsx:r(i),id:i,...s}),i},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Qt=new Rw,_w=(n,r)=>{const s=(r==null?void 0:r.id)||ad++;return Qt.addToast({title:n,...r,id:s}),s},Ew=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",Mw=_w,Tw=()=>Qt.toasts,zw=()=>Qt.getActiveToasts(),tt=Object.assign(Mw,{success:Qt.success,info:Qt.info,warning:Qt.warning,error:Qt.error,custom:Qt.custom,message:Qt.message,promise:Qt.promise,dismiss:Qt.dismiss,loading:Qt.loading},{getHistory:Tw,getToasts:zw});pw("[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 Fi(n){return n.label!==void 0}const kw=3,Aw="24px",Dw="16px",Ig=4e3,Ow=356,Hw=14,Bw=45,Lw=200;function Ln(...n){return n.filter(Boolean).join(" ")}function Uw(n){const[r,s]=n.split("-"),i=[];return r&&i.push(r),s&&i.push(s),i}const $w=n=>{var r,s,i,u,f,m,y,g,h;const{invert:v,toast:x,unstyled:S,interacting:j,setHeights:C,visibleToasts:N,heights:M,index:E,toasts:L,expanded:B,removeToast:ee,defaultRichColors:le,closeButton:I,style:P,cancelButtonStyle:q,actionButtonStyle:se,className:re="",descriptionClassName:Q="",duration:oe,position:pe,gap:K,expandByDefault:J,classNames:T,icons:$,closeButtonAriaLabel:W="Close toast"}=n,[de,X]=ae.useState(null),[R,U]=ae.useState(null),[G,Z]=ae.useState(!1),[te,ie]=ae.useState(!1),[je,_e]=ae.useState(!1),[be,wt]=ae.useState(!1),[xt,gt]=ae.useState(!1),[on,st]=ae.useState(0),[Jt,un]=ae.useState(0),he=ae.useRef(x.duration||oe||Ig),Te=ae.useRef(null),Ne=ae.useRef(null),ne=E===0,Se=E+1<=N,ue=x.type,Be=x.dismissible!==!1,Le=x.className||"",Nt=x.descriptionClassName||"",jt=ae.useMemo(()=>M.findIndex(Ee=>Ee.toastId===x.id)||0,[M,x.id]),qn=ae.useMemo(()=>{var Ee;return(Ee=x.closeButton)!=null?Ee:I},[x.closeButton,I]),Za=ae.useMemo(()=>x.duration||oe||Ig,[x.duration,oe]),mr=ae.useRef(0),Fn=ae.useRef(0),js=ae.useRef(0),ga=ae.useRef(null),[Ja,Ot]=pe.split("-"),Sn=ae.useMemo(()=>M.reduce((Ee,nt,vt)=>vt>=jt?Ee:Ee+nt.height,0),[M,jt]),Tt=Cw(),mo=x.invert||v,hr=ue==="loading";Fn.current=ae.useMemo(()=>jt*K+Sn,[jt,Sn]),ae.useEffect(()=>{he.current=Za},[Za]),ae.useEffect(()=>{Z(!0)},[]),ae.useEffect(()=>{const Ee=Ne.current;if(Ee){const nt=Ee.getBoundingClientRect().height;return un(nt),C(vt=>[{toastId:x.id,height:nt,position:x.position},...vt]),()=>C(vt=>vt.filter(zt=>zt.toastId!==x.id))}},[C,x.id]),ae.useLayoutEffect(()=>{if(!G)return;const Ee=Ne.current,nt=Ee.style.height;Ee.style.height="auto";const vt=Ee.getBoundingClientRect().height;Ee.style.height=nt,un(vt),C(zt=>zt.find(rt=>rt.toastId===x.id)?zt.map(rt=>rt.toastId===x.id?{...rt,height:vt}:rt):[{toastId:x.id,height:vt,position:x.position},...zt])},[G,x.title,x.description,C,x.id,x.jsx,x.action,x.cancel]);const zn=ae.useCallback(()=>{ie(!0),st(Fn.current),C(Ee=>Ee.filter(nt=>nt.toastId!==x.id)),setTimeout(()=>{ee(x)},Lw)},[x,ee,C,Fn]);ae.useEffect(()=>{if(x.promise&&ue==="loading"||x.duration===1/0||x.type==="loading")return;let Ee;return B||j||Tt?(()=>{if(js.current<mr.current){const zt=new Date().getTime()-mr.current;he.current=he.current-zt}js.current=new Date().getTime()})():(()=>{he.current!==1/0&&(mr.current=new Date().getTime(),Ee=setTimeout(()=>{x.onAutoClose==null||x.onAutoClose.call(x,x),zn()},he.current))})(),()=>clearTimeout(Ee)},[B,j,x,ue,Tt,zn]),ae.useEffect(()=>{x.delete&&(zn(),x.onDismiss==null||x.onDismiss.call(x,x))},[zn,x.delete]);function vl(){var Ee;if($!=null&&$.loading){var nt;return ae.createElement("div",{className:Ln(T==null?void 0:T.loader,x==null||(nt=x.classNames)==null?void 0:nt.loader,"sonner-loader"),"data-visible":ue==="loading"},$.loading)}return ae.createElement(vw,{className:Ln(T==null?void 0:T.loader,x==null||(Ee=x.classNames)==null?void 0:Ee.loader),visible:ue==="loading"})}const bl=x.icon||($==null?void 0:$[ue])||yw(ue);var Ia,kn;return ae.createElement("li",{tabIndex:0,ref:Ne,className:Ln(re,Le,T==null?void 0:T.toast,x==null||(r=x.classNames)==null?void 0:r.toast,T==null?void 0:T.default,T==null?void 0:T[ue],x==null||(s=x.classNames)==null?void 0:s[ue]),"data-sonner-toast":"","data-rich-colors":(Ia=x.richColors)!=null?Ia:le,"data-styled":!(x.jsx||x.unstyled||S),"data-mounted":G,"data-promise":!!x.promise,"data-swiped":xt,"data-removed":te,"data-visible":Se,"data-y-position":Ja,"data-x-position":Ot,"data-index":E,"data-front":ne,"data-swiping":je,"data-dismissible":Be,"data-type":ue,"data-invert":mo,"data-swipe-out":be,"data-swipe-direction":R,"data-expanded":!!(B||J&&G),"data-testid":x.testId,style:{"--index":E,"--toasts-before":E,"--z-index":L.length-E,"--offset":`${te?on:Fn.current}px`,"--initial-height":J?"auto":`${Jt}px`,...P,...x.style},onDragEnd:()=>{_e(!1),X(null),ga.current=null},onPointerDown:Ee=>{Ee.button!==2&&(hr||!Be||(Te.current=new Date,st(Fn.current),Ee.target.setPointerCapture(Ee.pointerId),Ee.target.tagName!=="BUTTON"&&(_e(!0),ga.current={x:Ee.clientX,y:Ee.clientY})))},onPointerUp:()=>{var Ee,nt,vt;if(be||!Be)return;ga.current=null;const zt=Number(((Ee=Ne.current)==null?void 0:Ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),pa=Number(((nt=Ne.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),rt=new Date().getTime()-((vt=Te.current)==null?void 0:vt.getTime()),Lt=de==="x"?zt:pa,Pa=Math.abs(Lt)/rt;if(Math.abs(Lt)>=Bw||Pa>.11){st(Fn.current),x.onDismiss==null||x.onDismiss.call(x,x),U(de==="x"?zt>0?"right":"left":pa>0?"down":"up"),zn(),wt(!0);return}else{var Ut,$t;(Ut=Ne.current)==null||Ut.style.setProperty("--swipe-amount-x","0px"),($t=Ne.current)==null||$t.style.setProperty("--swipe-amount-y","0px")}gt(!1),_e(!1),X(null)},onPointerMove:Ee=>{var nt,vt,zt;if(!ga.current||!Be||((nt=window.getSelection())==null?void 0:nt.toString().length)>0)return;const rt=Ee.clientY-ga.current.y,Lt=Ee.clientX-ga.current.x;var Pa;const Ut=(Pa=n.swipeDirections)!=null?Pa:Uw(pe);!de&&(Math.abs(Lt)>1||Math.abs(rt)>1)&&X(Math.abs(Lt)>Math.abs(rt)?"x":"y");let $t={x:0,y:0};const Sl=wn=>1/(1.5+Math.abs(wn)/20);if(de==="y"){if(Ut.includes("top")||Ut.includes("bottom"))if(Ut.includes("top")&&rt<0||Ut.includes("bottom")&&rt>0)$t.y=rt;else{const wn=rt*Sl(rt);$t.y=Math.abs(wn)<Math.abs(rt)?wn:rt}}else if(de==="x"&&(Ut.includes("left")||Ut.includes("right")))if(Ut.includes("left")&&Lt<0||Ut.includes("right")&&Lt>0)$t.x=Lt;else{const wn=Lt*Sl(Lt);$t.x=Math.abs(wn)<Math.abs(Lt)?wn:Lt}(Math.abs($t.x)>0||Math.abs($t.y)>0)&&gt(!0),(vt=Ne.current)==null||vt.style.setProperty("--swipe-amount-x",`${$t.x}px`),(zt=Ne.current)==null||zt.style.setProperty("--swipe-amount-y",`${$t.y}px`)}},qn&&!x.jsx&&ue!=="loading"?ae.createElement("button",{"aria-label":W,"data-disabled":hr,"data-close-button":!0,onClick:hr||!Be?()=>{}:()=>{zn(),x.onDismiss==null||x.onDismiss.call(x,x)},className:Ln(T==null?void 0:T.closeButton,x==null||(i=x.classNames)==null?void 0:i.closeButton)},(kn=$==null?void 0:$.close)!=null?kn:jw):null,(ue||x.icon||x.promise)&&x.icon!==null&&(($==null?void 0:$[ue])!==null||x.icon)?ae.createElement("div",{"data-icon":"",className:Ln(T==null?void 0:T.icon,x==null||(u=x.classNames)==null?void 0:u.icon)},x.promise||x.type==="loading"&&!x.icon?x.icon||vl():null,x.type!=="loading"?bl:null):null,ae.createElement("div",{"data-content":"",className:Ln(T==null?void 0:T.content,x==null||(f=x.classNames)==null?void 0:f.content)},ae.createElement("div",{"data-title":"",className:Ln(T==null?void 0:T.title,x==null||(m=x.classNames)==null?void 0:m.title)},x.jsx?x.jsx:typeof x.title=="function"?x.title():x.title),x.description?ae.createElement("div",{"data-description":"",className:Ln(Q,Nt,T==null?void 0:T.description,x==null||(y=x.classNames)==null?void 0:y.description)},typeof x.description=="function"?x.description():x.description):null),ae.isValidElement(x.cancel)?x.cancel:x.cancel&&Fi(x.cancel)?ae.createElement("button",{"data-button":!0,"data-cancel":!0,style:x.cancelButtonStyle||q,onClick:Ee=>{Fi(x.cancel)&&Be&&(x.cancel.onClick==null||x.cancel.onClick.call(x.cancel,Ee),zn())},className:Ln(T==null?void 0:T.cancelButton,x==null||(g=x.classNames)==null?void 0:g.cancelButton)},x.cancel.label):null,ae.isValidElement(x.action)?x.action:x.action&&Fi(x.action)?ae.createElement("button",{"data-button":!0,"data-action":!0,style:x.actionButtonStyle||se,onClick:Ee=>{Fi(x.action)&&(x.action.onClick==null||x.action.onClick.call(x.action,Ee),!Ee.defaultPrevented&&zn())},className:Ln(T==null?void 0:T.actionButton,x==null||(h=x.classNames)==null?void 0:h.actionButton)},x.action.label):null)};function Pg(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function Vw(n,r){const s={};return[n,r].forEach((i,u)=>{const f=u===1,m=f?"--mobile-offset":"--offset",y=f?Dw:Aw;function g(h){["top","right","bottom","left"].forEach(v=>{s[`${m}-${v}`]=typeof h=="number"?`${h}px`:h})}typeof i=="number"||typeof i=="string"?g(i):typeof i=="object"?["top","right","bottom","left"].forEach(h=>{i[h]===void 0?s[`${m}-${h}`]=y:s[`${m}-${h}`]=typeof i[h]=="number"?`${i[h]}px`:i[h]}):g(y)}),s}const Gw=ae.forwardRef(function(r,s){const{id:i,invert:u,position:f="bottom-right",hotkey:m=["altKey","KeyT"],expand:y,closeButton:g,className:h,offset:v,mobileOffset:x,theme:S="light",richColors:j,duration:C,style:N,visibleToasts:M=kw,toastOptions:E,dir:L=Pg(),gap:B=Hw,icons:ee,containerAriaLabel:le="Notifications"}=r,[I,P]=ae.useState([]),q=ae.useMemo(()=>i?I.filter(G=>G.toasterId===i):I.filter(G=>!G.toasterId),[I,i]),se=ae.useMemo(()=>Array.from(new Set([f].concat(q.filter(G=>G.position).map(G=>G.position)))),[q,f]),[re,Q]=ae.useState([]),[oe,pe]=ae.useState(!1),[K,J]=ae.useState(!1),[T,$]=ae.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=ae.useRef(null),de=m.join("+").replace(/Key/g,"").replace(/Digit/g,""),X=ae.useRef(null),R=ae.useRef(!1),U=ae.useCallback(G=>{P(Z=>{var te;return(te=Z.find(ie=>ie.id===G.id))!=null&&te.delete||Qt.dismiss(G.id),Z.filter(({id:ie})=>ie!==G.id)})},[]);return ae.useEffect(()=>Qt.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{P(Z=>Z.map(te=>te.id===G.id?{...te,delete:!0}:te))});return}setTimeout(()=>{Yb.flushSync(()=>{P(Z=>{const te=Z.findIndex(ie=>ie.id===G.id);return te!==-1?[...Z.slice(0,te),{...Z[te],...G},...Z.slice(te+1)]:[G,...Z]})})})}),[I]),ae.useEffect(()=>{if(S!=="system"){$(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:Z})=>{$(Z?"dark":"light")})}catch{G.addListener(({matches:te})=>{try{$(te?"dark":"light")}catch(ie){console.error(ie)}})}},[S]),ae.useEffect(()=>{I.length<=1&&pe(!1)},[I]),ae.useEffect(()=>{const G=Z=>{var te;if(m.every(_e=>Z[_e]||Z.code===_e)){var je;pe(!0),(je=W.current)==null||je.focus()}Z.code==="Escape"&&(document.activeElement===W.current||(te=W.current)!=null&&te.contains(document.activeElement))&&pe(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[m]),ae.useEffect(()=>{if(W.current)return()=>{X.current&&(X.current.focus({preventScroll:!0}),X.current=null,R.current=!1)}},[W.current]),ae.createElement("section",{ref:s,"aria-label":`${le} ${de}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},se.map((G,Z)=>{var te;const[ie,je]=G.split("-");return q.length?ae.createElement("ol",{key:G,dir:L==="auto"?Pg():L,tabIndex:-1,ref:W,className:h,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":ie,"data-x-position":je,style:{"--front-toast-height":`${((te=re[0])==null?void 0:te.height)||0}px`,"--width":`${Ow}px`,"--gap":`${B}px`,...N,...Vw(v,x)},onBlur:_e=>{R.current&&!_e.currentTarget.contains(_e.relatedTarget)&&(R.current=!1,X.current&&(X.current.focus({preventScroll:!0}),X.current=null))},onFocus:_e=>{_e.target instanceof HTMLElement&&_e.target.dataset.dismissible==="false"||R.current||(R.current=!0,X.current=_e.relatedTarget)},onMouseEnter:()=>pe(!0),onMouseMove:()=>pe(!0),onMouseLeave:()=>{K||pe(!1)},onDragEnd:()=>pe(!1),onPointerDown:_e=>{_e.target instanceof HTMLElement&&_e.target.dataset.dismissible==="false"||J(!0)},onPointerUp:()=>J(!1)},q.filter(_e=>!_e.position&&Z===0||_e.position===G).map((_e,be)=>{var wt,xt;return ae.createElement($w,{key:_e.id,icons:ee,index:be,toast:_e,defaultRichColors:j,duration:(wt=E==null?void 0:E.duration)!=null?wt:C,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:u,visibleToasts:M,closeButton:(xt=E==null?void 0:E.closeButton)!=null?xt:g,interacting:K,position:G,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:U,toasts:q.filter(gt=>gt.position==_e.position),heights:re.filter(gt=>gt.position==_e.position),setHeights:Q,expandByDefault:y,gap:B,expanded:oe,swipeDirections:r.swipeDirections})})):null}))}),Wg=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,ep=Zp,C0=(n,r)=>s=>{var i;if((r==null?void 0:r.variants)==null)return ep(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:u,defaultVariants:f}=r,m=Object.keys(u).map(h=>{const v=s==null?void 0:s[h],x=f==null?void 0:f[h];if(v===null)return null;const S=Wg(v)||Wg(x);return u[h][S]}),y=s&&Object.entries(s).reduce((h,v)=>{let[x,S]=v;return S===void 0||(h[x]=S),h},{}),g=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((h,v)=>{let{class:x,className:S,...j}=v;return Object.entries(j).every(C=>{let[N,M]=C;return Array.isArray(M)?M.includes({...f,...y}[N]):{...f,...y}[N]===M})?[...h,x,S]:h},[]);return ep(n,m,g,s==null?void 0:s.class,s==null?void 0:s.className)};function tp(n,r){if(typeof n=="function")return n(r);n!=null&&(n.current=r)}function qw(...n){return r=>{let s=!1;const i=n.map(u=>{const f=tp(u,r);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let u=0;u<i.length;u++){const f=i[u];typeof f=="function"?f():tp(n[u],null)}}}}function Fw(...n){return w.useCallback(qw(...n),n)}function Yw(n){const r=w.forwardRef((s,i)=>{let{children:u,...f}=s,m=null,y=!1;const g=[];np(u)&&typeof Yi=="function"&&(u=Yi(u._payload)),w.Children.forEach(u,S=>{var j;if(Jw(S)){y=!0;const C=S;let N="child"in C.props?C.props.child:C.props.children;np(N)&&typeof Yi=="function"&&(N=Yi(N._payload)),m=Xw(C,N),g.push((j=m==null?void 0:m.props)==null?void 0:j.children)}else g.push(S)}),m?m=w.cloneElement(m,void 0,g):!y&&w.Children.count(u)===1&&w.isValidElement(u)&&(m=u);const h=m?Zw(m):void 0,v=Fw(i,h);if(!m){if(u||u===0)throw new Error(y?eN(n):Ww(n));return u}const x=Qw(f,m.props??{});return m.type!==w.Fragment&&(x.ref=i?v:h),w.cloneElement(m,x)});return r.displayName=`${n}.Slot`,r}var R0=Yw("Slot"),Kw=Symbol.for("radix.slottable"),Xw=(n,r)=>{if("child"in n.props){const s=n.props.child;return w.isValidElement(s)?w.cloneElement(s,void 0,n.props.children(s.props.children)):null}return w.isValidElement(r)?r:null};function Qw(n,r){const s={...r};for(const i in r){const u=n[i],f=r[i];/^on[A-Z]/.test(i)?u&&f?s[i]=(...y)=>{const g=f(...y);return u(...y),g}:u&&(s[i]=u):i==="style"?s[i]={...u,...f}:i==="className"&&(s[i]=[u,f].filter(Boolean).join(" "))}return{...n,...s}}function Zw(n){var i,u;let r=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?n.ref:(r=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function Jw(n){return w.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Kw}var Iw=Symbol.for("react.lazy");function np(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Iw&&"_payload"in n&&Pw(n._payload)}function Pw(n){return typeof n=="object"&&n!==null&&"then"in n}var Ww=n=>`${n} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,eN=n=>`${n} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Yi=Wx[" use ".trim().toString()];const tN=C0("inline-flex items-center justify-center rounded-full border border-transparent 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:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"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:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function Pe({className:n,variant:r="default",asChild:s=!1,...i}){const u=s?R0:"span";return c.jsx(u,{"data-slot":"badge","data-variant":r,className:Me(tN({variant:r}),n),...i})}const nN=C0("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",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-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-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function xe({className:n,variant:r="default",size:s="default",asChild:i=!1,...u}){const f=i?R0:"button";return c.jsx(f,{"data-slot":"button","data-variant":r,"data-size":s,className:Me(nN({variant:r,size:s,className:n})),...u})}function aN({rowId:n,onClose:r}){const s=Je(),i=n===void 0?s("row.readOnlyTable"):String(n).length>16?`${String(n).slice(0,16)}…`:String(n);return c.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-2 px-4 py-3 border-b border-border shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx("h3",{className:"font-semibold text-foreground text-sm shrink-0",children:s("row.detail")}),c.jsx(Pe,{variant:"outline",className:"min-w-0 max-w-[180px] truncate text-[10px] font-mono border-border text-muted-foreground shrink",children:i})]}),c.jsx(xe,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:r,children:c.jsx(fo,{className:"h-4 w-4"})})]})}function lN({readOnly:n,confirmDelete:r,onConfirmDelete:s,onCancelDelete:i,onRequestDelete:u}){const f=Je();return c.jsx("div",{className:"min-w-0 p-4 border-t border-border",children:n?c.jsx("p",{className:"text-center text-xs text-muted-foreground",children:f("row.readOnlyTableBody")}):r?c.jsxs("div",{className:"flex w-full min-w-0 max-w-full flex-wrap items-center gap-2 overflow-hidden",children:[c.jsxs(xe,{variant:"destructive",size:"sm",className:"min-w-0 max-w-full flex-1 basis-0 text-xs",onClick:s,children:[c.jsx(no,{className:"h-3 w-3 mr-1.5"}),f("row.confirmDelete")]}),c.jsxs(xe,{variant:"ghost",size:"sm",className:"shrink-0 text-xs text-muted-foreground",onClick:i,children:[c.jsx(Q2,{className:"h-3 w-3 mr-1"}),f("common.cancel")]})]}):c.jsxs(xe,{variant:"ghost",size:"sm",className:"w-full text-xs text-destructive hover:text-destructive hover:bg-destructive/10",onClick:u,children:[c.jsx(no,{className:"h-3 w-3 mr-1.5"}),f("row.deleteRow")]})})}const rN=new Set(["id","created_at","createdAt","updated_at","updatedAt"]);function sN(n){const r=n.toLowerCase();return r.includes("timestamp")||r.includes("date")?"datetime":r.includes("json")?"textarea":r.includes("bool")?"boolean":["int","float","numeric","decimal","real","double"].some(s=>r.includes(s))?"number":r.includes("text")&&!r.includes("varchar")?"textarea":"text"}function iN(n){if(!n)return"";const r=new Date(n);return Number.isNaN(r.getTime())?"":new Date(r.getTime()-r.getTimezoneOffset()*6e4).toISOString().slice(0,19)}function oN(n){const r=n.toLowerCase();return["int","float","numeric"].some(s=>r.includes(s))?"text-blue-400 bg-blue-500/10":r.includes("bool")?"text-amber-400 bg-amber-500/10":r.includes("timestamp")||r.includes("date")?"text-green-400 bg-green-500/10":r.includes("json")?"text-purple-400 bg-purple-500/10":"text-zinc-400 bg-zinc-500/10"}function uN(n,r){return n?Object.entries(n).flatMap(([s,i])=>s===r?[]:i.filter(u=>{var f;return((f=u.references)==null?void 0:f.table)===r}).map(u=>({table:s,column:u.column}))):[]}function cN(n,r,s){return n==null?"null":typeof n=="boolean"?n?"true":"false":r.toLowerCase().includes("timestamp")||r.toLowerCase().includes("date")?s(n):typeof n=="object"?JSON.stringify(n,null,2):String(n)}function _0({row:n,columns:r,tableName:s,allTables:i,onClose:u,onDataChanged:f,onNavigateToTable:m,readOnly:y=!1}){const{locale:g}=Gn(),h=Je(),{apiBase:v}=Zt(),[x,S]=w.useState(null),[j,C]=w.useState(""),[N,M]=w.useState(!1),[E,L]=w.useState(!1);if(!n)return null;const B=n.id,ee=w.useMemo(()=>uN(i,s),[i,s]),[le,I]=w.useState({});w.useEffect(()=>{if(ee.length===0||!B)return;let K=!1;async function J(){const T={};for(const $ of ee)try{const W=$.table.replace(/[^a-zA-Z0-9_]/g,""),de=await fetch(`${v}/_admin/data/${W}?limit=0&offset=0`);if(de.ok){const X=await de.json();T[`${$.table}.${$.column}`]=X.total||0}}catch{}K||I(T)}return J(),()=>{K=!0}},[ee,B,v]);const P=(K,J,T)=>{S(K),J==null?T&&(T.toLowerCase().includes("timestamp")||T.toLowerCase().includes("date"))?C(new Date().toISOString()):C(""):C(typeof J=="object"?JSON.stringify(J,null,2):String(J))},q=w.useCallback(async(K,J,T)=>{M(!0);try{let $=J;const W=T.toLowerCase();if(W.includes("timestamp")||W.includes("date"))if(J==="")$=null;else{const de=new Date(J);$=isNaN(de.getTime())?null:de.toISOString()}else if(W.includes("int")||W.includes("float")||W.includes("numeric")||W.includes("real")||W.includes("double")||W.includes("decimal"))$=J===""?null:Number(J);else if(W.includes("bool"))$=J==="true";else if(W.includes("json"))try{$=JSON.parse(J)}catch{tt.error(h("row.invalidJson")),M(!1);return}else J===""&&($=null);await fetch(`${v}/_admin/data/${s}/${B}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[K]:$})}),tt.success(h("row.updated",{field:K})),f()}catch($){console.error("Failed to update:",$),tt.error(h("row.updateFailed"))}M(!1),S(null)},[v,s,B,f,h]),se=w.useCallback(async K=>{M(!0);try{await fetch(`${v}/_admin/data/${s}/${B}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[K]:null})}),tt.success(h("row.setToNull",{field:K})),f()}catch{tt.error(h("row.setNullFailed"))}M(!1),S(null)},[v,s,B,f,h]),re=()=>{S(null),C("")},Q=w.useCallback(async(K,J)=>{const T=!J;M(!0);try{await fetch(`${v}/_admin/data/${s}/${B}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[K]:T})}),tt.success(`${K} = ${T}`),f()}catch{tt.error(h("row.toggleFailed"))}M(!1)},[v,s,B,f,h]),oe=w.useCallback(async()=>{if(B!==void 0)try{const{deleteRow:K}=Zt.getState();await K(s,B),tt.success(h("data.rowDeleted")),f(),u()}catch{tt.error(h("row.deleteFailed"))}},[s,B,f,u,h]),pe=(K,J,T)=>{K.key==="Enter"&&!K.shiftKey?(K.preventDefault(),q(J,j,T)):K.key==="Escape"&&re()};return c.jsxs("div",{"data-testid":"row-detail-drawer",className:"h-full w-full min-w-0 max-w-full box-border flex flex-col overflow-x-hidden border-l border-border bg-background",children:[c.jsx(aN,{rowId:B,onClose:u}),c.jsx("div",{className:"flex-1 min-h-0 min-w-0 overflow-y-auto overflow-x-hidden",children:c.jsxs("div",{className:"min-w-0 p-4 space-y-4",children:[r.map(K=>{const J=n[K.column],T=sN(K.type),$=y||rN.has(K.column)||!!K.references,W=x===K.column,de=J==null,X=K.nullable&&!$&&!de;return c.jsxs("div",{"data-testid":`row-detail-field-${K.column}`,className:"w-full min-w-0 max-w-full space-y-1.5 overflow-hidden",children:[c.jsxs("div",{className:"flex w-full min-w-0 max-w-full flex-wrap items-center gap-2 overflow-hidden",children:[c.jsx("span",{className:"min-w-0 max-w-full truncate text-xs font-medium text-muted-foreground",children:K.column}),c.jsx("span",{className:`shrink-0 text-[10px] px-1.5 py-0.5 rounded font-mono ${oN(K.type)}`,children:K.type.split("(")[0]}),K.nullable&&c.jsx("span",{className:"text-[10px] text-muted-foreground/50",children:h("data.nullable")}),K.references&&c.jsxs("span",{className:"inline-flex min-w-0 max-w-full items-center gap-0.5 rounded bg-violet-500/10 px-1.5 py-0.5 text-[10px] font-medium text-violet-400",children:[c.jsx(Nd,{className:"h-2.5 w-2.5 shrink-0"}),c.jsx("span",{className:"min-w-0 truncate",children:K.references.table})]})]}),W?c.jsxs("div",{className:"w-full min-w-0 max-w-full space-y-2 overflow-hidden",children:[T==="datetime"?c.jsx("input",{type:"datetime-local",step:"1",value:iN(j),onChange:R=>{R.target.value?C(new Date(R.target.value).toISOString()):C("")},onKeyDown:R=>pe(R,K.column,K.type),autoFocus:!0,className:"w-full min-w-0 max-w-full box-border rounded-md border border-primary/50 bg-background px-3 py-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary/50"}):T==="textarea"?c.jsx("textarea",{value:j,onChange:R=>C(R.target.value),onKeyDown:R=>pe(R,K.column,K.type),rows:6,autoFocus:!0,className:"w-full min-w-0 max-w-full box-border rounded-md border border-primary/50 bg-background px-3 py-2 text-xs text-foreground font-mono resize-y overflow-x-auto focus:outline-none focus:ring-1 focus:ring-primary/50"}):c.jsx("input",{type:T==="number"?"number":"text",value:j,onChange:R=>C(R.target.value),onKeyDown:R=>pe(R,K.column,K.type),autoFocus:!0,className:"w-full min-w-0 max-w-full box-border rounded-md border border-primary/50 bg-background px-3 py-2 text-xs text-foreground overflow-x-auto focus:outline-none focus:ring-1 focus:ring-primary/50"}),c.jsxs("div",{className:"flex w-full min-w-0 max-w-full flex-wrap items-center gap-1.5 overflow-hidden",children:[c.jsxs(xe,{variant:"default",size:"sm",className:"h-6 shrink-0 text-[11px] px-2",disabled:N,onClick:()=>q(K.column,j,K.type),children:[c.jsx(n2,{className:"h-3 w-3 mr-1"}),h("common.save")]}),K.nullable&&c.jsx(xe,{variant:"ghost",size:"sm",className:"h-6 shrink-0 text-[11px] px-2 text-amber-500 hover:text-amber-400 hover:bg-amber-500/10",disabled:N,onClick:()=>se(K.column),children:h("row.setNull")}),c.jsx(xe,{variant:"ghost",size:"sm",className:"h-6 shrink-0 text-[11px] px-2 text-muted-foreground",onClick:re,children:h("common.cancel")})]})]}):T==="boolean"&&!$?c.jsxs("div",{className:"flex w-full min-w-0 max-w-full flex-wrap items-center gap-2 overflow-hidden",children:[c.jsx("button",{onClick:()=>!de&&Q(K.column,J),disabled:N||de,className:Me("flex min-w-0 max-w-full flex-1 basis-0 items-center gap-2 rounded-md border border-border px-3 py-2 text-xs transition-colors text-left",de?"bg-muted/30 cursor-default":"hover:bg-accent/50"),children:de?c.jsx("span",{className:"text-muted-foreground italic",children:"null"}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:`w-8 h-4 rounded-full transition-colors relative ${J?"bg-green-500":"bg-zinc-600"}`,children:c.jsx("div",{className:`absolute top-0.5 w-3 h-3 rounded-full bg-white transition-transform ${J?"translate-x-4":"translate-x-0.5"}`})}),c.jsx("span",{className:J?"text-green-400":"text-muted-foreground",children:J?"true":"false"})]})}),K.nullable&&(de?c.jsx(xe,{variant:"ghost",size:"sm",className:"h-8 text-[10px] px-2 text-muted-foreground hover:text-foreground shrink-0",disabled:N,onClick:()=>Q(K.column,!0),children:h("row.setValue")}):c.jsx(xe,{variant:"ghost",size:"sm",className:"h-8 text-[10px] px-2 text-amber-500 hover:text-amber-400 hover:bg-amber-500/10 shrink-0",disabled:N,onClick:()=>se(K.column),children:h("row.setNull")}))]}):K.references&&J!==null&&J!==void 0?c.jsxs("div",{onClick:()=>m==null?void 0:m(K.references.table,String(J)),className:"flex w-full min-w-0 max-w-full box-border items-center gap-2 overflow-hidden rounded-md border border-violet-500/20 px-3 py-2 text-xs cursor-pointer hover:bg-violet-500/5 hover:border-violet-500/40 transition-colors group",children:[c.jsx(O2,{className:"h-3 w-3 text-violet-400 shrink-0"}),c.jsx("span",{className:"min-w-0 w-0 text-violet-400 truncate flex-1 basis-0 group-hover:underline",children:String(J)}),c.jsx(or,{className:"h-3 w-3 shrink-0 text-violet-400/50 group-hover:text-violet-400 transition-colors"})]}):c.jsxs("div",{className:"flex w-full min-w-0 max-w-full flex-wrap items-center gap-1.5 overflow-hidden",children:[c.jsx("div",{"data-testid":`row-detail-value-${K.column}`,onClick:()=>!$&&P(K.column,J,K.type),className:Me("min-w-0 w-0 max-w-full box-border rounded-md border border-border px-3 py-2 text-xs overflow-hidden flex-1 basis-0",$?"bg-muted/30 text-muted-foreground cursor-default":"hover:bg-accent/50 hover:border-primary/30 cursor-pointer transition-colors",de?"text-muted-foreground italic":typeof J=="object"?"font-mono text-foreground whitespace-pre-wrap break-all max-h-24 overflow-y-auto":"text-foreground truncate"),children:cN(J,K.type,R=>Ns(R,g))}),X&&c.jsx(xe,{variant:"ghost",size:"sm",className:"h-8 text-[10px] px-2 text-amber-500 hover:text-amber-400 hover:bg-amber-500/10 shrink-0",disabled:N,onClick:()=>se(K.column),children:h("row.setNull")})]})]},K.column)}),ee.length>0&&c.jsxs("div",{className:"w-full min-w-0 max-w-full overflow-hidden pt-3 mt-3 border-t border-border space-y-2",children:[c.jsxs("div",{className:"flex w-full min-w-0 max-w-full items-center gap-1.5 overflow-hidden text-xs font-medium text-muted-foreground",children:[c.jsx(Wi,{className:"h-3 w-3 shrink-0"}),h("row.referencedBy")]}),ee.map(K=>{const J=`${K.table}.${K.column}`,T=le[J];return c.jsxs("button",{onClick:()=>m==null?void 0:m(K.table),className:"flex w-full min-w-0 max-w-full box-border items-center gap-2 overflow-hidden rounded-md border border-emerald-500/20 px-3 py-2 text-xs hover:bg-emerald-500/5 hover:border-emerald-500/40 transition-colors group text-left",children:[c.jsx(Wi,{className:"h-3 w-3 text-emerald-400 shrink-0"}),c.jsxs("span",{className:"min-w-0 w-0 text-emerald-400 flex-1 basis-0 truncate group-hover:underline",children:[K.table,c.jsxs("span",{className:"text-emerald-400/50 ml-1",children:[".",K.column]})]}),T!==void 0&&c.jsx("span",{className:"text-[10px] text-muted-foreground bg-muted/50 rounded px-1.5 py-0.5 shrink-0",children:h("row.rowsCount",{count:T})}),c.jsx(or,{className:"h-3 w-3 text-emerald-400/50 group-hover:text-emerald-400 transition-colors shrink-0"})]},J)})]})]})}),c.jsx(lN,{readOnly:y,confirmDelete:E,onConfirmDelete:oe,onCancelDelete:()=>L(!1),onRequestDelete:()=>L(!0)})]})}const ap=560,dN="row-detail-drawer-shell",fN="absolute top-0 right-0 h-full z-10 box-border min-w-0 w-full max-w-full overflow-x-hidden shadow-2xl animate-in slide-in-from-right duration-200",mN={width:`min(${ap}px, 100%)`,maxWidth:`min(${ap}px, 100%)`,minWidth:0,maxInlineSize:"100%",boxSizing:"border-box",overflowX:"hidden"};function E0({children:n,className:r}){return c.jsx("div",{"data-testid":dN,className:Me(fN,r),style:mN,children:n})}const hN=180,gN=384,lp=16,pN=36;function yN(n,r){const s=Number.isFinite(r)?Math.max(0,r):0,i=Math.max(0,s-n.bottom-lp),u=Math.max(0,n.top-lp),f=i<hN&&u>i?"top":"bottom";return{placement:f,maxHeight:Math.round(Math.min(gN,Math.max(f==="top"?u:i,1)))}}function xN(n,r,s,i){if(r<=0)return n;const u=s+i,f=n+r;return s<n?s:u>f?Math.max(0,u-r):n}function vN({selectedTable:n,tables:r,formatColumnCount:s,onSelectTable:i}){const u=w.useMemo(()=>Object.keys(r),[r]),f=Math.max(0,u.indexOf(n)),[m,y]=w.useState(!1),[g,h]=w.useState(f),[v,x]=w.useState({placement:"bottom",maxHeight:300}),S=w.useRef(null),j=w.useRef(null),C=w.useRef(null),N=w.useRef([]),M=w.useId(),E=w.useCallback(()=>{const Q=j.current;!Q||typeof window>"u"||x(yN(Q.getBoundingClientRect(),window.innerHeight))},[]),L=w.useCallback(()=>{u.length!==0&&(h(f),E(),y(!0))},[f,u.length,E]),B=w.useCallback(()=>{y(!1)},[]),ee=w.useCallback(Q=>{var oe;i(Q),y(!1),(oe=j.current)==null||oe.focus()},[i]);w.useEffect(()=>{if(!m)return;const Q=pe=>{var K;(K=S.current)!=null&&K.contains(pe.target)||y(!1)},oe=()=>E();return document.addEventListener("mousedown",Q),window.addEventListener("resize",oe),()=>{document.removeEventListener("mousedown",Q),window.removeEventListener("resize",oe)}},[m,E]),w.useEffect(()=>{if(!m)return;const Q=C.current,oe=N.current[g];if(!Q||!oe)return;const pe=xN(Q.scrollTop,Q.clientHeight,oe.offsetTop,oe.offsetHeight);pe!==Q.scrollTop&&(Q.scrollTop=pe)},[g,m]);const le=w.useCallback(Q=>{h(Math.max(0,Math.min(u.length-1,Q)))},[u.length]),I=w.useCallback(Q=>{var pe;const oe=Math.max(1,Math.floor(v.maxHeight/pN)-1);if(!m){["ArrowDown","ArrowUp","Enter"," "].includes(Q.key)&&(Q.preventDefault(),L());return}if(Q.key==="ArrowDown")Q.preventDefault(),le(g+1);else if(Q.key==="ArrowUp")Q.preventDefault(),le(g-1);else if(Q.key==="Home")Q.preventDefault(),le(0);else if(Q.key==="End")Q.preventDefault(),le(u.length-1);else if(Q.key==="PageDown")Q.preventDefault(),le(g+oe);else if(Q.key==="PageUp")Q.preventDefault(),le(g-oe);else if(Q.key==="Enter"||Q.key===" "){Q.preventDefault();const K=u[g];K&&ee(K)}else Q.key==="Escape"&&(Q.preventDefault(),B(),(pe=j.current)==null||pe.focus())},[g,B,v.maxHeight,le,m,L,ee,u]),P={maxHeight:v.maxHeight,overscrollBehavior:"contain"},q={maxWidth:"min(60vw, 360px)"},se={left:0,maxWidth:"calc(100vw - 2rem)",minWidth:220,...v.placement==="top"?{bottom:"100%",marginBottom:4}:{marginTop:4,top:"100%"}},re=m&&u[g]?`${M}-option-${g}`:void 0;return c.jsxs("div",{className:"relative flex h-8 items-center",ref:S,onKeyDown:I,children:[c.jsxs("button",{ref:j,type:"button","aria-haspopup":"listbox","aria-expanded":m,"aria-controls":m?M:void 0,"aria-activedescendant":re,style:q,onClick:()=>{m?B():L()},className:Me("flex items-center gap-2 rounded-md px-2.5 py-1.5 text-sm font-semibold transition-colors","hover:bg-accent/50 text-foreground","focus:outline-none focus:ring-2 focus:ring-primary/50 focus:ring-offset-1 focus:ring-offset-background",m&&"bg-accent/50"),children:[c.jsx($n,{className:"h-3.5 w-3.5 shrink-0 text-primary"}),c.jsx("span",{className:"truncate",children:n}),c.jsx(l2,{className:Me("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform",m&&"rotate-180")})]}),m&&c.jsx("div",{className:"absolute z-50 rounded-lg border border-border bg-popover shadow-lg",style:se,children:c.jsx("div",{id:M,ref:C,role:"listbox","aria-activedescendant":re,tabIndex:-1,className:"overflow-y-auto p-1",style:P,children:u.map((Q,oe)=>{var J;const pe=Q===n,K=oe===g;return c.jsxs("button",{id:`${M}-option-${oe}`,ref:T=>{N.current[oe]=T},type:"button",role:"option","aria-selected":pe,onMouseEnter:()=>h(oe),onClick:()=>ee(Q),className:Me("flex min-h-9 w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors",pe?"bg-primary/10 font-medium text-primary":K?"bg-accent/60 text-foreground":"text-foreground hover:bg-accent/50"),children:[c.jsx($n,{className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{className:"min-w-0 flex-1 truncate",children:Q}),c.jsx(Pe,{variant:"secondary",className:"ml-auto shrink-0 text-[10px]",children:s(((J=r[Q])==null?void 0:J.length)||0)})]},Q)})})})]})}function bN({tables:n,tableLoading:r,staticOnly:s,isRuntimeWaking:i,tableUnavailable:u,tableError:f,showGridRuntimeBlocked:m,showTableCount:y,onRefresh:g,onSelectTable:h}){const v=Je(),x=Object.keys(n);return c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 h-12 bg-background",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx($n,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("h2",{className:"font-semibold text-foreground",children:v("app.nav.data")}),c.jsx(Pe,{variant:"outline",className:"text-xs border-border text-muted-foreground",children:v("data.tablesCount",{count:y})})]}),c.jsx(xe,{variant:"ghost",size:"sm",onClick:g,disabled:r,className:"text-muted-foreground hover:text-foreground",children:c.jsx(Vn,{className:Me("h-3.5 w-3.5",r&&"animate-spin")})})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:r?c.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[c.jsx(Cd,{className:"h-8 w-8 animate-spin text-muted-foreground mb-4"}),c.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:v("data.loadingTables")})]}):s?c.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[c.jsx(fr,{className:"h-12 w-12 text-cyan-500/30 mb-4"}),c.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:v("app.common.staticHosting")}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:v("data.staticOnlyBody")})]}):i||u||f?c.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[c.jsx($n,{className:"h-12 w-12 text-amber-500/30 mb-4"}),c.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:v(i?"data.backendWakingTitle":f?"data.backendErrorTitle":"data.backendUnavailableTitle")}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mb-4",children:v(i?"data.backendWakingBody":f?"data.backendErrorBody":"data.backendUnavailableBody")}),c.jsxs(xe,{variant:"outline",size:"sm",onClick:g,disabled:r,children:[c.jsx(Vn,{className:Me("h-3.5 w-3.5 mr-1.5",r&&"animate-spin")}),v("common.retry")]})]}):m?c.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[c.jsx($n,{className:"h-12 w-12 text-amber-500/30 mb-4"}),c.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:v("app.common.appNotRunning")}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:v("data.appNotRunningBody")})]}):x.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[c.jsx($n,{className:"h-12 w-12 text-muted-foreground/30 mb-4"}),c.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:v("data.noTablesTitle")}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:v("data.noTablesBody",{file:"gencow/schema.ts"})})]}):c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",children:x.map(S=>{const j=(n[S]||[]).filter(N=>N.references).map(N=>N.references.table).filter((N,M,E)=>E.indexOf(N)===M),C=Object.entries(n).filter(([N,M])=>N!==S&&M.some(E=>{var L;return((L=E.references)==null?void 0:L.table)===S})).map(([N])=>N);return c.jsxs("button",{onClick:()=>h(S),className:Me("group relative flex flex-col items-start gap-2.5 rounded-lg border border-border p-4","bg-card hover:bg-accent/50 hover:border-primary/30","transition-all duration-150 text-left","focus:outline-none focus:ring-2 focus:ring-primary/50 focus:ring-offset-1 focus:ring-offset-background"),children:[c.jsxs("div",{className:"flex items-center gap-2.5 w-full",children:[c.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary",children:c.jsx(w0,{className:"h-4 w-4"})}),c.jsx("span",{className:"font-medium text-sm text-foreground truncate flex-1",children:S})]}),c.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[c.jsx(m2,{className:"h-3 w-3"}),v("data.columnsCount",{count:n[S].length})]}),(j.length>0||C.length>0)&&c.jsxs("div",{className:"flex flex-wrap gap-1 w-full",children:[j.map(N=>c.jsxs("span",{onClick:M=>{M.stopPropagation(),h(N)},className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium bg-violet-500/10 text-violet-400 hover:bg-violet-500/20 cursor-pointer transition-colors",children:[c.jsx(Nd,{className:"h-2.5 w-2.5"}),N]},`out-${N}`)),C.map(N=>c.jsxs("span",{onClick:M=>{M.stopPropagation(),h(N)},className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20 cursor-pointer transition-colors",children:[c.jsx(Wi,{className:"h-2.5 w-2.5"}),N]},`in-${N}`))]})]},S)})})})]})}function SN(n){return n.backendStatus!==void 0?n.backendStatus==="none"&&!!n.hasStatic:!!n.staticOnly}function rp(n){return n instanceof Qc?n.status===void 0||[502,503,504].includes(n.status)?"unavailable":"error":n instanceof TypeError?"unavailable":"error"}function M0(n){if(n.showRowRuntimeBlocked)return n.t("data.rowsBlocked");if(n.isRuntimeWaking)return n.t("data.rowsWaitingForBackend");if(n.rowsError)return n.t("data.rowsError");if(n.rowsUnavailable)return n.t("data.rowsUnavailable")}function wN(n){if(n.rowLoading)return n.t("data.loadingRows");const r=M0(n);return r||(n.totalRows===0?n.t("data.noData"):n.t("data.rangeOf",{start:n.page*n.limit+1,end:Math.min((n.page+1)*n.limit,n.totalRows),total:n.totalRows}))}function Ki(n,r){const s=r.filter(u=>u.primaryKey).map(u=>u.column),i=s.length>0?s:r.some(u=>u.column==="id")?["id"]:[];return i.length===0?JSON.stringify(n):JSON.stringify(i.map(u=>[u,n[u]]))}function NN(n){return!n.some(r=>r.column==="id")}function jN(n,r){return r&&Object.prototype.hasOwnProperty.call(n,r)?r:""}function CN(){const{locale:n}=Gn(),r=Je(),{tables:s,selectedTable:i,setSelectedTable:u,fetchTables:f,fetchTableData:m,deleteRow:y}=Zt(),[g,h]=w.useState([]),[v,x]=w.useState(0),[S,j]=w.useState("idle"),[C,N]=w.useState("idle"),[M,E]=w.useState(0),[L,B]=w.useState(null),ee=50,le=ha(),{appStatus:I}=le,P=SN(le),q=I==="idle",se=!!I&&I!=="running"&&I!=="idle",re=!P&&!q&&!se,Q=Ss(),[oe]=Lb(),pe=oe.get("table"),K=re&&S==="success"?Object.keys(s).length:0,J=re&&C==="success"&&v>0,T=w.useCallback(async()=>{if(P){j("idle");return}if(q){j("unavailable");return}if(se){j("idle");return}j("loading");try{await f();const he=Zt.getState().tables;j(Object.keys(he).length>0?"success":"empty");const Te=jN(he,pe);if(u(Te),pe&&!Te){const Ne=new URLSearchParams(oe.toString());Ne.delete("table"),Ne.delete("fkHighlight"),Q(Ne.size>0?`?${Ne.toString()}`:"?",{replace:!0})}}catch(he){j(rp(he))}},[f,se,q,Q,oe,u,P,pe]);w.useEffect(()=>{T()},[T]);const $=w.useCallback(he=>{u(he);const Te=new URLSearchParams(oe.toString());Te.set("table",he),Q(`?${Te.toString()}`,{replace:!0}),E(0)},[Q,oe,u]),W=w.useCallback(()=>{u("");const he=new URLSearchParams(oe.toString());he.delete("table"),Q(`?${he.toString()}`,{replace:!0}),h([]),x(0)},[Q,oe,u]),de=w.useCallback(async()=>{if(!i){N("idle");return}if(!re){h([]),x(0),N(q?"unavailable":"idle");return}N("loading");try{const he=await m(i,ee,M*ee),Te=he.data||[],Ne=he.total||0;h(Te),x(Ne),N(Ne>0?"success":"empty")}catch(he){h([]),x(0),N(rp(he))}},[re,m,q,M,i]);w.useEffect(()=>{de()},[de]),w.useEffect(()=>{const Te=Zt.getState().apiBase.replace(/^http/,"ws")+"/ws";let Ne=null,ne=null,Se=!0;function ue(){Se&&(Ne=new WebSocket(Te),Ne.onmessage=Be=>{try{const Le=JSON.parse(Be.data),Nt=Le.type==="invalidate"&&Array.isArray(Le.queries)?Le.queries:Le.type==="query:updated"&&Le.query?[Le.query]:[],jt=Zt.getState().selectedTable;jt&&Nt.some(qn=>qn.includes(jt))&&de()}catch{}},Ne.onclose=()=>{Se&&(ne=setTimeout(ue,3e3))})}return ue(),()=>{Se=!1,ne&&clearTimeout(ne),Ne==null||Ne.close()}},[de]);const X=i?s[i]||[]:[],R=NN(X),U=S==="loading",G=C==="loading",Z=S==="unavailable",te=S==="error",ie=C==="unavailable",je=C==="error",_e=se&&!P,be=!!i&&se&&!P,wt=M0({t:r,isRuntimeWaking:q,showRowRuntimeBlocked:be,rowsUnavailable:ie,rowsError:je}),xt=wN({t:r,isRuntimeWaking:q,showRowRuntimeBlocked:be,rowsUnavailable:ie,rowsError:je,rowLoading:G,totalRows:v,page:M,limit:ee}),gt=w.useMemo(()=>X.map(he=>({accessorKey:he.column,header:he.column,minWidth:he.type.includes("timestamp")?200:100,maxWidth:he.type.includes("text")?300:250,headerTooltip:he.references?`${he.column} (${he.type}) → ${he.references.table}.${he.references.column}`:`${he.column} (${he.type})${he.nullable?` | ${r("data.nullable")}`:""}`,cellClassName:Te=>he.column==="id"?"text-indigo-400 font-mono text-[11px]":he.references&&Te!==null&&Te!==void 0?"text-violet-400 cursor-pointer underline decoration-violet-400/30":Te==null?"text-muted-foreground italic":typeof Te=="boolean"?Te?"text-green-500":"text-red-500":"",cell:he.type.includes("timestamp")?Te=>{const Ne=Te.getValue();return Ne==null?c.jsx("span",{className:"text-muted-foreground italic",children:"null"}):c.jsx("span",{children:Ns(Ne,n)})}:void 0})),[X,n,r]),on=w.useCallback(he=>{const Te=Ki(he,X);B(Ne=>Ne&&Ki(Ne,X)===Te?null:he)},[X]),st=w.useCallback((he,Te,Ne)=>{const ne=X.find(Se=>Se.column===Te);if(ne!=null&&ne.references&&he[Te]!==null&&he[Te]!==void 0){Ne.stopPropagation();const Se=ne.references.table,ue=String(he[Te]),Be=new URLSearchParams(oe.toString());Be.set("table",Se),Be.set("fkHighlight",ue),Q(`?${Be.toString()}`,{replace:!1}),u(Se),E(0)}},[X,Q,oe,u]),Jt=oe.get("fkHighlight");w.useEffect(()=>{if(Jt&&g.length>0){const he=g.find(Te=>String(Te.id)===Jt);if(he){B(he);const Te=new URLSearchParams(oe.toString());Te.delete("fkHighlight"),Q(`?${Te.toString()}`,{replace:!0})}}},[Jt,g]),w.useEffect(()=>{if(L&&g.length>0){const he=Ki(L,X),Te=g.find(Ne=>Ki(Ne,X)===he);B(Te||null)}},[g]);const un=Math.ceil(v/ee);return i?c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 h-12 bg-background",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs(xe,{variant:"ghost",size:"sm",onClick:W,className:"gap-1.5 text-muted-foreground hover:text-foreground",children:[c.jsx(Wi,{className:"h-3.5 w-3.5"}),r("data.allTables")]}),c.jsx("div",{className:"w-px h-5 bg-border"}),c.jsx(vN,{selectedTable:i,tables:s,formatColumnCount:he=>r("data.colsCount",{count:he}),onSelectTable:$}),J&&c.jsx(Pe,{variant:"outline",className:"text-xs border-border text-muted-foreground",children:r("data.rowsCount",{count:v})})]}),c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(xe,{variant:"ghost",size:"sm",onClick:de,disabled:G,className:"text-muted-foreground hover:text-foreground",children:c.jsx(Vn,{className:Me("h-3.5 w-3.5",G&&"animate-spin")})})})]}),c.jsxs("div",{className:"flex-1 min-h-0 relative overflow-hidden",children:[c.jsx(j0,{data:g,columns:gt,loading:G,emptyMessage:wt,onRowClick:on,onCellClick:st}),L&&c.jsx(E0,{children:c.jsx(_0,{row:L,columns:X,tableName:i,allTables:s,onClose:()=>B(null),onDataChanged:de,readOnly:R,onNavigateToTable:(he,Te)=>{B(null);const Ne=new URLSearchParams(oe.toString());Ne.set("table",he),Te&&Ne.set("fkHighlight",Te),Q(`?${Ne.toString()}`,{replace:!1}),u(he),E(0)}})})]}),c.jsxs("div",{className:"flex items-center justify-between border-t border-border px-4 py-2 bg-background",children:[c.jsx("span",{className:"text-xs text-muted-foreground",children:xt}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-xs text-muted-foreground",children:r("data.pageOf",{page:M+1,total:Math.max(un,1)})}),c.jsxs("div",{className:"flex gap-1",children:[c.jsx(xe,{variant:"outline",size:"icon",className:"h-7 w-7 border-border",disabled:M===0||G||!re,onClick:()=>E(he=>he-1),children:c.jsx(jd,{className:"h-3.5 w-3.5"})}),c.jsx(xe,{variant:"outline",size:"icon",className:"h-7 w-7 border-border",disabled:M+1>=un||G||!re,onClick:()=>E(he=>he+1),children:c.jsx(or,{className:"h-3.5 w-3.5"})})]})]})]})]}):c.jsx(bN,{tables:s,tableLoading:U,staticOnly:P,isRuntimeWaking:q,tableUnavailable:Z,tableError:te,showGridRuntimeBlocked:_e,showTableCount:K,onRefresh:T,onSelectTable:$})}var RN=function(n,r,s,i){if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?n!==r||!i:!r.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?i:s==="a"?i.call(n):i?i.value:r.get(n)},ld,T0;const ao=16,sp=2048,ip=64,rd="data",Dt={BIGINT:0,DATE:1,NAN:2,UNDEFINED:3,URL:4,REGEXP:5,SET:6,MAP:7};function vs(n,r){return Object.prototype.hasOwnProperty.call(n,r)}function Ed(n){return typeof n=="object"&&n!==null}function _N(n){return!Ed(n)||!vs(n,"json")?!1:vs(n,"meta")?n.meta===void 0||Array.isArray(n.meta):!0}function EN(n){const r={};for(const[s,i]of n.entries()){if(!vs(r,s)){r[s]=i;continue}const u=r[s];r[s]=Array.isArray(u)?[...u,i]:[u,i]}return r}class Bt extends Error{constructor(r){super(r),this.status=400,this.code="RPC_DECODE_ERROR",this.name="ProcedureRpcDecodeError"}}class MN{serialize(r,s=[],i=[],u=[],f=[]){if(typeof FormData<"u"&&r instanceof FormData)return this.serialize(EN(r),s,i,u,f);if(r instanceof Blob)return u.push(s),f.push(r),[null,i,u,f];if(typeof r=="bigint")return i.push([Dt.BIGINT,...s]),[r.toString(),i,u,f];if(r instanceof Date)return i.push([Dt.DATE,...s]),[Number.isNaN(r.getTime())?null:r.toISOString(),i,u,f];if(Number.isNaN(r))return i.push([Dt.NAN,...s]),[null,i,u,f];if(r instanceof URL)return i.push([Dt.URL,...s]),[r.toString(),i,u,f];if(r instanceof RegExp)return i.push([Dt.REGEXP,...s]),[r.toString(),i,u,f];if(r instanceof Set){const m=this.serialize(Array.from(r),s,i,u,f);return i.push([Dt.SET,...s]),m}if(r instanceof Map){const m=this.serialize(Array.from(r.entries()),s,i,u,f);return i.push([Dt.MAP,...s]),m}if(Array.isArray(r))return[r.map((y,g)=>y===void 0?(i.push([Dt.UNDEFINED,...s,g]),null):this.serialize(y,[...s,g],i,u,f)[0]),i,u,f];if(Ed(r)){const m={};for(const y in r)y==="toJSON"&&typeof r[y]=="function"||(m[y]=this.serialize(r[y],[...s,y],i,u,f)[0]);return[m,i,u,f]}return[r,i,u,f]}deserialize(r,s,i,u){if(s.length>sp)throw new Bt(`RPC payload meta exceeds maximum item count (${sp}).`);const f={data:r};if(i&&u){if(i.length>ao)throw new Bt(`RPC payload exceeds maximum blob count (${ao}).`);i.forEach((m,y)=>{let g=f,h="data";for(const v of m)if(g=g[h],h=v,!vs(g,h))throw new Bt(`Invalid RPC payload path during blob deserialization. Path segment: ${String(h)}`);g[h]=u(y)})}for(const m of s){if(m.length-1>ip)throw new Bt(`RPC payload meta path exceeds maximum depth (${ip}).`);const y=m[0];let g=f,h="data";for(let v=1;v<m.length;v++)if(g=g[h],h=m[v],!vs(g,h))throw new Bt(`Invalid RPC payload path during deserialization. Path segment: ${String(h)}`);switch(y){case Dt.BIGINT:g[h]=BigInt(g[h]);break;case Dt.DATE:g[h]=new Date(g[h]??"Invalid Date");break;case Dt.NAN:g[h]=Number.NaN;break;case Dt.UNDEFINED:g[h]=void 0;break;case Dt.URL:g[h]=new URL(g[h]);break;case Dt.REGEXP:{const v=g[h];if(typeof v!="string")throw new Bt("Invalid RPC payload for RegExp deserialization.");const x=v.match(/^\/(.*)\/([a-z]*)$/);if(!x)throw new Bt("Invalid RPC payload for RegExp deserialization.");const[,S,j]=x;g[h]=new RegExp(S,j);break}case Dt.SET:g[h]=new Set(g[h]);break;case Dt.MAP:g[h]=new Map(g[h]);break}}return f.data}}class TN{constructor(r={}){ld.add(this),this.serializer=new MN}decodeWirePayload(r){return r instanceof FormData?RN(this,ld,"m",T0).call(this,r):_N(r)?this.serializer.deserialize(r.json,r.meta??[]):r}encodeWirePayload(r){const[s,i,u,f]=this.serializer.serialize(r);return{json:s,meta:i.length>0?i:void 0}}encodeProcedureCall(r){const[s,i,u,f]=this.serializer.serialize(r);if(f.length===0)return{json:s,meta:i.length>0?i:void 0};if(f.length>ao)throw new Bt(`RPC payload exceeds maximum blob count (${ao}).`);const m=new FormData;return m.set(rd,JSON.stringify({json:s,meta:i.length>0?i:void 0,maps:u})),f.forEach((y,g)=>{m.set(String(g),y)}),m}decodeProcedureRpcBody(r){const s=this.decodeWirePayload(r);return Ed(s)?{name:s.name,args:s.args}:{name:void 0,args:void 0}}decodeProcedureMultipart(r){return this.decodeProcedureRpcBody(r)}}ld=new WeakSet,T0=function(r){const s=r.get(rd);if(s===null)throw r.has("_mutation")?new Bt('Legacy multipart layout is not supported for procedure RPC. Use the "data" field envelope.'):new Bt('Missing required multipart field "data".');if(typeof s!="string")throw new Bt('Multipart field "data" must be a JSON string.');let i;try{i=JSON.parse(s)}catch{throw new Bt('Invalid JSON in multipart field "data".')}const u=i.maps??[];if(!Array.isArray(u))throw new Bt('Multipart field "data" must include a "maps" array.');const f=new Set([rd]);for(let m=0;m<u.length;m++)f.add(String(m));for(const m of r.keys())if(!f.has(m))throw new Bt(`Unexpected multipart field "${m}".`);for(let m=0;m<u.length;m++){const y=r.get(String(m));if(y===null||!(y instanceof Blob))throw new Bt(`Missing blob part "${m}".`)}return this.serializer.deserialize(i.json,i.meta??[],u,m=>r.get(String(m)))};const sd=new TN;function z0(n){return n.includes("/_proxy/")}function zN(n,r){const s=r==null?void 0:r.trim();return s?z0(n)?{"X-Gencow-App-Authorization":`Bearer ${s}`}:{Authorization:`Bearer ${s}`}:{}}async function kN(n){const r=await n.text();if(!r)return null;try{return JSON.parse(r)}catch{return r}}function AN(n,r){if(n&&typeof n=="object"&&"error"in n){const s=n.error;if(typeof s=="string"&&s.length>0)return s}return r}function DN(n,r){if(n.kind==="query")return{headers:{"Content-Type":"application/json"},body:JSON.stringify(sd.encodeWirePayload({name:n.key,args:r}))};const s=sd.encodeProcedureCall({name:n.key,args:r});return s instanceof FormData?{headers:{},body:s}:{headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}}async function ON({operation:n,apiBase:r,sessionToken:s,inputValue:i,fetchImpl:u=fetch,now:f=()=>performance.now()}){const m=f(),y=n.kind==="query"?"/api/query":"/api/mutation",g=n.transport==="legacy"?{headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n.key,args:i})}:DN(n,i);try{const h=await u(`${r}${y}`,{method:"POST",headers:{...g.headers,...zN(r,s)},body:g.body,...z0(r)?{credentials:"include"}:{}}),v=await kN(h),x=Math.round(f()-m);return h.ok?{status:"success",data:n.transport==="procedure"?sd.decodeWirePayload(v):v,duration:x,httpStatus:h.status,payload:v}:{status:"error",error:AN(v,`HTTP ${h.status}`),duration:x,httpStatus:h.status,payload:v}}catch(h){return{status:"error",error:h instanceof Error?h.message:String(h),duration:Math.round(f()-m)}}}function HN(n){try{return{ok:!0,value:JSON.parse(n)}}catch{return{ok:!1,error:"Invalid JSON"}}}function gs(n){return Array.isArray(n)?n.filter(r=>typeof r=="string"):[]}function BN(n){if(typeof n=="string")return{name:n,invalidates:[],transport:"legacy"};if(!n||typeof n!="object")return null;const r=n;return typeof r.name!="string"?null:{name:r.name,invalidates:gs(r.invalidates),transport:"legacy",...r.isPublic===!0?{isPublic:!0}:{}}}function LN(n){const r=[...gs(n.queries).map(u=>({key:u,transport:"legacy"})),...gs(n.procedureQueries).map(u=>({key:u,transport:"procedure"}))],s=Array.isArray(n.mutations)?n.mutations.map(BN).filter(u=>u!==null):[],i=gs(n.procedureMutations).map(u=>({name:u,invalidates:[],transport:"procedure"}));return{queries:r,mutations:[...s,...i]}}function UN(n){if(!n||typeof n!="object")return null;const r=n;return typeof r.key!="string"||r.kind!=="query"&&r.kind!=="mutation"||r.transport!=="legacy"&&r.transport!=="procedure"?null:{key:r.key,kind:r.kind,transport:r.transport,allowAnonymous:r.allowAnonymous===!0,invalidates:gs(r.invalidates),argsType:typeof r.argsType=="string"?r.argsType:"Record<string, unknown>",outputType:typeof r.outputType=="string"?r.outputType:"unknown",hasInputSchema:r.hasInputSchema===!0,hasOutputSchema:r.hasOutputSchema===!0,...r.inputSchema!==void 0?{inputSchema:r.inputSchema}:{},...r.outputSchema!==void 0?{outputSchema:r.outputSchema}:{}}}function $N(n){return Array.isArray(n.operations)?n.operations.map(UN).filter(r=>r!==null):[]}function VN(n){const r=LN(n);return[...r.queries.map(s=>({key:s.key,kind:"query",transport:s.transport,allowAnonymous:!1,argsType:"Record<string, unknown>",outputType:"unknown",hasInputSchema:!1,hasOutputSchema:!1})),...r.mutations.map(s=>({key:s.name,kind:"mutation",transport:s.transport,allowAnonymous:s.isPublic===!0,invalidates:s.invalidates,argsType:"Record<string, unknown>",outputType:"unknown",hasInputSchema:!1,hasOutputSchema:!1}))]}function GN({jsonDraft:n,jsonError:r,onJsonDraftChange:s}){const i=Je();return c.jsxs("div",{className:"space-y-3",children:[c.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:i("functions.input")}),c.jsxs("div",{children:[c.jsx("textarea",{className:Me("h-40 w-full resize-none rounded-md border bg-background px-3 py-2 font-mono text-sm text-foreground outline-none focus:ring-2 focus:ring-primary/50",r?"border-red-500/50":"border-border"),value:n,onChange:u=>s(u.currentTarget.value),placeholder:'{ "key": "value" }',spellCheck:!1}),r&&c.jsx("div",{className:"mt-1 text-xs text-red-400",children:r})]})]})}function qN({result:n,outputType:r,hasOutputSchema:s}){const i=Je();if(n.status==="idle"||n.status==="loading")return null;const u=n.status==="success",f=u?JSON.stringify(n.data,null,2):n.error;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[u?c.jsx(u2,{className:"h-3.5 w-3.5 text-green-500"}):c.jsx(g0,{className:"h-3.5 w-3.5 text-red-500"}),c.jsx("span",{className:u?"text-green-500":"text-red-500",children:i(u?"functions.success":"functions.error")}),n.httpStatus!==void 0&&c.jsxs("span",{className:"text-muted-foreground",children:["HTTP ",n.httpStatus]}),n.duration!==void 0&&c.jsxs("span",{className:"text-muted-foreground",children:[n.duration,"ms"]})]}),c.jsxs("div",{className:"rounded-md border border-border bg-muted/20 p-3",children:[c.jsx("div",{className:"mb-1 text-[11px] font-medium uppercase text-muted-foreground",children:i(s?"functions.outputSchema":"functions.outputType")}),c.jsx("div",{className:"font-mono text-xs text-foreground break-all",children:r})]}),c.jsx("pre",{className:Me("max-h-80 overflow-auto rounded-md border p-3 font-mono text-xs",u?"border-green-500/20 bg-green-500/5 text-green-300":"border-red-500/20 bg-red-500/5 text-red-300"),children:f})]})}function k0({operation:n}){const r=n.kind==="query"?"bg-blue-500/10 text-blue-400 border-blue-500/20":"bg-orange-500/10 text-orange-400 border-orange-500/20",s=n.transport==="procedure"?"bg-cyan-500/10 text-cyan-300 border-cyan-500/20":"bg-slate-500/10 text-slate-300 border-slate-500/20",i=n.allowAnonymous?"bg-emerald-500/10 text-emerald-300 border-emerald-500/20":"bg-amber-500/10 text-amber-300 border-amber-500/20";return c.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[c.jsx(Pe,{className:Me("text-[10px]",r),children:n.kind}),c.jsx(Pe,{className:Me("text-[10px]",s),children:n.transport}),c.jsx(Pe,{className:Me("text-[10px]",i),children:n.allowAnonymous?"public":"auth required"})]})}function A0({className:n,type:r,...s}){return c.jsx("input",{type:r,"data-slot":"input",className:Me("border-border file:text-foreground placeholder:text-muted-foreground/50 selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-sm 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:opacity-50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",n),...s})}function FN({operation:n,jsonDraft:r,jsonError:s,sessionToken:i,showToken:u,result:f,onClose:m,onJsonDraftChange:y,onSessionTokenChange:g,onShowTokenChange:h,onExecute:v}){const x=Je(),S=!n.allowAnonymous&&i.trim().length===0;return c.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[c.jsxs("div",{className:"flex h-12 items-center justify-between border-b border-border bg-background px-4",children:[c.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[n.kind==="query"?c.jsx(Fa,{className:"h-4 w-4 shrink-0 text-blue-500"}):c.jsx(xl,{className:"h-4 w-4 shrink-0 text-orange-500"}),c.jsx("span",{className:"truncate font-mono text-sm font-medium",children:n.key}),c.jsx(k0,{operation:n})]}),c.jsx(xe,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:m,children:c.jsx(fo,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"flex-1 space-y-5 overflow-auto p-4",children:[c.jsxs("section",{className:"space-y-3",children:[c.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[c.jsxs("div",{className:"rounded-md border border-border bg-muted/20 p-3",children:[c.jsx("div",{className:"mb-1 text-[11px] font-medium uppercase text-muted-foreground",children:n.hasInputSchema?x("functions.inputSchema"):x("functions.inputType")}),c.jsx("div",{className:"break-all font-mono text-xs text-foreground",children:n.argsType})]}),c.jsxs("div",{className:"rounded-md border border-border bg-muted/20 p-3",children:[c.jsx("div",{className:"mb-1 text-[11px] font-medium uppercase text-muted-foreground",children:n.hasOutputSchema?x("functions.outputSchema"):x("functions.outputType")}),c.jsx("div",{className:"break-all font-mono text-xs text-foreground",children:n.outputType})]})]}),n.kind==="mutation"&&n.invalidates&&n.invalidates.length>0&&c.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[c.jsx("span",{children:x("functions.invalidates")}),n.invalidates.map(j=>c.jsx(Pe,{variant:"secondary",className:"font-mono text-[10px]",children:j},j))]})]}),c.jsxs("section",{className:"space-y-2",children:[c.jsx("label",{className:"block text-xs font-medium text-muted-foreground",children:x("functions.sessionToken")}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(A0,{type:u?"text":"password",value:i,onChange:j=>g(j.currentTarget.value),autoComplete:"off",spellCheck:!1}),c.jsx(xe,{type:"button",variant:"outline",size:"sm",className:"h-9 w-9 p-0",onClick:()=>h(!u),title:x(u?"functions.hideToken":"functions.showToken"),children:u?c.jsx(y0,{className:"h-4 w-4"}):c.jsx(x0,{className:"h-4 w-4"})}),i.length>0&&c.jsx(xe,{type:"button",variant:"ghost",size:"sm",onClick:()=>g(""),children:x("functions.clear")})]}),c.jsx("div",{className:Me("text-xs",S?"text-amber-300":"text-muted-foreground"),children:x(S?"functions.privateTokenRequired":"functions.publicTokenHint")})]}),c.jsx(GN,{jsonDraft:r,jsonError:s,onJsonDraftChange:y}),c.jsxs(xe,{onClick:v,disabled:f.status==="loading"||S,className:"gap-2",children:[f.status==="loading"?c.jsx(Cd,{className:"h-4 w-4 animate-spin"}):c.jsx(S0,{className:"h-4 w-4"}),n.kind==="query"?x("functions.runQuery"):x("functions.runMutation")]}),c.jsx(qN,{result:f,outputType:n.outputType,hasOutputSchema:n.hasOutputSchema})]})]})}function da({className:n}){return c.jsx("div",{className:Me("animate-pulse rounded-md bg-muted",n)})}function YN({cards:n=8}){return c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 p-4",children:Array.from({length:n}).map((r,s)=>c.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(da,{className:"h-4 w-4 rounded"}),c.jsx(da,{className:"h-4 w-24"})]}),c.jsx(da,{className:"h-3 w-full"}),c.jsx(da,{className:"h-3 w-2/3"}),c.jsxs("div",{className:"flex gap-2 pt-2",children:[c.jsx(da,{className:"h-5 w-14 rounded-full"}),c.jsx(da,{className:"h-5 w-14 rounded-full"})]})]},s))})}function KN({cards:n=4}){return c.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 p-4",children:Array.from({length:n}).map((r,s)=>c.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(da,{className:"h-4 w-4 rounded"}),c.jsx(da,{className:"h-3 w-16"})]}),c.jsx(da,{className:"h-8 w-20"})]},s))})}function op({title:n,icon:r,items:s,selectedKey:i,viewMode:u,onSelect:f,iconColor:m}){const y=Je();return s.length===0?null:c.jsxs("div",{children:[c.jsxs("h3",{className:"mb-3 flex items-center gap-2 text-sm font-medium text-muted-foreground",children:[r,n,c.jsx(Pe,{variant:"outline",className:"text-[10px]",children:s.length})]}),u==="card"?c.jsx("div",{className:"space-y-1",children:s.map(g=>c.jsxs("div",{className:Me("flex cursor-pointer items-center gap-2 rounded-md border border-border px-3 py-2 transition-colors hover:border-primary/50",i===g.key&&"border-primary bg-primary/5"),onClick:()=>f(g),children:[g.kind==="query"?c.jsx(Fa,{className:Me("h-3.5 w-3.5 shrink-0",m)}):c.jsx(xl,{className:Me("h-3.5 w-3.5 shrink-0",m)}),c.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-sm",children:g.key}),g.invalidates&&g.invalidates.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(Nd,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),g.invalidates.map(h=>c.jsx(Pe,{variant:"secondary",className:"hidden shrink-0 font-mono text-[10px] sm:inline-flex",children:h},h))]}),c.jsx(or,{className:"ml-auto h-3.5 w-3.5 shrink-0 text-muted-foreground"})]},`${g.kind}:${g.key}`))}):c.jsx("div",{className:"overflow-x-auto rounded-md border border-border",children:c.jsxs("table",{className:"w-full table-fixed text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-border bg-muted/30",children:[c.jsx("th",{className:"w-[42%] px-3 py-2 text-left text-xs font-medium text-muted-foreground",children:y("functions.name")}),c.jsx("th",{className:"w-[36%] px-3 py-2 text-left text-xs font-medium text-muted-foreground",children:y("functions.type")}),c.jsx("th",{className:"w-[22%] px-3 py-2 text-left text-xs font-medium text-muted-foreground",children:y("functions.invalidates")})]})}),c.jsx("tbody",{children:s.map(g=>{var h;return c.jsxs("tr",{className:Me("cursor-pointer border-b border-border transition-colors hover:bg-accent/50",i===g.key&&"bg-primary/5"),onClick:()=>f(g),children:[c.jsx("td",{className:"truncate px-3 py-2 font-mono text-xs",children:g.key}),c.jsx("td",{className:"px-3 py-2",children:c.jsx(k0,{operation:g})}),c.jsx("td",{className:"px-3 py-2",children:c.jsx("div",{className:"flex flex-wrap gap-1",children:(h=g.invalidates)==null?void 0:h.map(v=>c.jsx(Pe,{variant:"secondary",className:"font-mono text-[10px]",children:v},v))})})]},`${g.kind}:${g.key}`)})})]})})]})}function XN({operations:n,selectedKey:r,viewMode:s,loading:i,appDown:u,staticOnly:f,onSelect:m,onViewModeChange:y}){const g=Je(),h=n.filter(x=>x.kind==="query"),v=n.filter(x=>x.kind==="mutation");return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex h-12 items-center justify-between border-b border-border bg-background px-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Fa,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("h2",{className:"font-semibold text-foreground",children:g("app.nav.functions")}),c.jsx(Pe,{variant:"outline",className:"border-border text-xs text-muted-foreground",children:g("functions.totalCount",{count:n.length})})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(xe,{variant:s==="card"?"default":"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>y("card"),children:c.jsx(A2,{className:"h-3.5 w-3.5"})}),c.jsx(xe,{variant:s==="table"?"default":"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>y("table"),children:c.jsx(w0,{className:"h-3.5 w-3.5"})})]})]}),i?c.jsx(YN,{cards:6}):u?c.jsx("div",{className:"flex h-full flex-col items-center justify-center p-8 text-center",children:f?c.jsxs(c.Fragment,{children:[c.jsx(fr,{className:"mb-4 h-12 w-12 text-cyan-500/30"}),c.jsx("h3",{className:"mb-1 text-lg font-medium text-foreground",children:g("app.common.staticHosting")}),c.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g("functions.staticOnlyBody")})]}):c.jsxs(c.Fragment,{children:[c.jsx(Fa,{className:"mb-4 h-12 w-12 text-amber-500/30"}),c.jsx("h3",{className:"mb-1 text-lg font-medium text-foreground",children:g("app.common.appNotRunning")}),c.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g("functions.appNotRunningBody")})]})}):n.length===0?c.jsxs("div",{className:"flex h-full flex-col items-center justify-center p-8 text-center",children:[c.jsx(Fa,{className:"mb-4 h-12 w-12 text-muted-foreground/30"}),c.jsx("h3",{className:"mb-1 text-lg font-medium text-foreground",children:g("functions.emptyTitle")}),c.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g("functions.emptyBody",{dir:"gencow/"})})]}):c.jsxs("div",{className:"flex-1 space-y-6 overflow-auto p-4",children:[c.jsx(op,{title:g("functions.queries"),icon:c.jsx(Fa,{className:"h-3.5 w-3.5 text-blue-400"}),items:h,selectedKey:r,viewMode:s,onSelect:m,iconColor:"text-blue-500"}),c.jsx(op,{title:g("functions.mutations"),icon:c.jsx(xl,{className:"h-3.5 w-3.5 text-orange-400"}),items:v,selectedKey:r,viewMode:s,onSelect:m,iconColor:"text-orange-500"})]})]})}function QN(n){return n.backendStatus!==void 0?n.backendStatus==="none"&&!!n.hasStatic:!!n.staticOnly}async function up(n){return await n.json().catch(()=>({}))}function ZN(){const n=Je(),{apiBase:r}=Zt(),s=ha(),{appStatus:i}=s,u=QN(s),[f,m]=w.useState([]),[y,g]=w.useState(null),[h,v]=w.useState("{}"),[x,S]=w.useState(),[j,C]=w.useState(""),[N,M]=w.useState(!1),[E,L]=w.useState({status:"idle"}),[B,ee]=w.useState("card"),[le,I]=w.useState(!0),[P,q]=w.useState(!1),se=w.useCallback(async()=>{if(i&&i!=="running"){q(!0),I(!1);return}I(!0);try{const K=await fetch(`${r}/_admin/functions/details`);if(!K.ok&&(K.status===502||K.status===503)){q(!0),I(!1);return}if(K.ok){const T=$N(await up(K));m(T),q(!1),I(!1);return}const J=await fetch(`${r}/_admin/functions`);if(!J.ok&&(J.status===502||J.status===503)){q(!0),I(!1);return}if(!J.ok)throw new Error(`HTTP ${J.status}`);m(VN(await up(J))),q(!1)}catch(K){console.error("Failed to fetch functions:",K),q(!0)}I(!1)},[r,i]);w.useEffect(()=>{se()},[se]);function re(K){g(K),v("{}"),S(void 0),L({status:"idle"})}async function Q(){if(!y)return;if(!y.allowAnonymous&&j.trim().length===0){L({status:"error",error:n("functions.privateTokenRequired")});return}const K=HN(h);if(!K.ok){S(n("functions.invalidJson")),L({status:"error",error:n("functions.invalidJson")});return}const J=K.value;S(void 0),L({status:"loading"});const T=await ON({operation:y,apiBase:r,sessionToken:j,inputValue:J});L(T),T.status==="success"?tt.success(n("functions.completed",{name:y.key,duration:T.duration??0})):tt.error(n("functions.failed",{name:y.key,message:T.error??"Unknown error"}))}const oe=(y==null?void 0:y.key)??null,pe=w.useMemo(()=>Me("flex min-w-0 shrink-0 flex-col border-r border-border transition-all",y?"w-[320px]":"w-full"),[y]);return c.jsxs("div",{className:"flex h-full",children:[c.jsx("div",{className:pe,children:c.jsx(XN,{operations:f,selectedKey:oe,viewMode:B,loading:le,appDown:P,staticOnly:u,onSelect:re,onViewModeChange:ee})}),y&&c.jsx(FN,{operation:y,jsonDraft:h,jsonError:x,sessionToken:j,showToken:N,result:E,onClose:()=>g(null),onJsonDraftChange:K=>{v(K),S(void 0)},onSessionTokenChange:C,onShowTokenChange:M,onExecute:Q})]})}const JN={30:"#6B7280",31:"#EF4444",32:"#22C55E",33:"#EAB308",34:"#3B82F6",35:"#A855F7",36:"#06B6D4",37:"#E5E7EB",90:"#9CA3AF",91:"#FCA5A5",92:"#86EFAC",93:"#FDE047",94:"#93C5FD",95:"#D8B4FE",96:"#67E8F9",97:"#F9FAFB"};function IN(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function PN(n){return IN(n).replace(/\x1b\[([0-9;]*)m/g,(r,s)=>{if(!s||s==="0")return"</span>";const i=s.split(";");for(const u of i){const f=JN[u];if(f)return`<span style="color:${f}">`;if(u==="1")return'<span style="font-weight:bold">';if(u==="2")return'<span style="opacity:0.7">';if(u==="4")return'<span style="text-decoration:underline">'}return""})}function WN(n){return n.backendStatus!==void 0?n.backendStatus==="none"&&!!n.hasStatic:!!n.staticOnly}function ej(n){return n.replace(/\x1b\[[0-9;]*m/g,"")}const tj=["/_admin/status","/_admin/logs","/_admin/tables","/_admin/functions","/_admin/files","/_admin/scheduler","/_admin/env","GET /favicon.ico"];function nj(n){const r=ej(n);return tj.some(s=>r.includes(s))}const aj={info:"bg-blue-500/10 text-blue-400 border-blue-500/20",warn:"bg-yellow-500/10 text-yellow-400 border-yellow-500/20",error:"bg-red-500/10 text-red-400 border-red-500/20"},lj={info:"text-blue-400",warn:"text-yellow-400",error:"text-red-400"};function cp(n){return(Array.isArray(n)?n:n&&typeof n=="object"?Array.isArray(n.result)?n.result:Array.isArray(n.logs)?n.logs:[]:[]).filter(s=>s!=null&&String(s)).map(s=>String(s))}function rj(n){return(Array.isArray(n)?n:[]).slice().reverse()}function sj(n,r){const s=n.join(`
407
+ `);if(s.includes("Cannot find module")){const i=s.match(/Cannot find module '([^']+)'/),u=(i==null?void 0:i[1])||"unknown";return{summary:r("logs.crash.module",{module:u}),action:r("logs.crash.moduleAction")}}if(s.includes("EADDRINUSE"))return{summary:r("logs.crash.port"),action:r("logs.crash.portAction")};if(s.includes("EACCES")||s.includes("permission denied"))return{summary:r("logs.crash.permission"),action:r("logs.crash.permissionAction")};if(s.includes("SyntaxError")||s.includes("TypeError")){const i=s.match(/(SyntaxError|TypeError):\s*(.+)/);return{summary:i?`${i[1]}: ${i[2].slice(0,80)}`:r("logs.crash.code"),action:r("logs.crash.codeAction")}}return s.includes("out of memory")||s.includes("SIGKILL")?{summary:r("logs.crash.oom"),action:r("logs.crash.oomAction")}:null}function ij({apiBase:n}){const r=Je(),[s,i]=w.useState([]),[u,f]=w.useState(!1),m=ha();if(w.useEffect(()=>{const h=n.match(/\/_proxy\/([^/]+)/);if(!h){f(!0);return}const v=h[1],x=n.replace(/\/_proxy\/.*$/,""),S=localStorage.getItem("apiKey")||"",j=S?{Authorization:`Bearer ${S}`}:{};async function C(){const N=await fetch(`${x}/api/query`,{method:"POST",headers:{"Content-Type":"application/json",...j},credentials:"include",body:JSON.stringify({name:"apps.logs",args:{name:v,lines:100}})});if(N.ok){const L=await N.json();return cp(L)}const M=await fetch(`${x}/api/apps/${encodeURIComponent(v)}/logs?lines=100`,{headers:j,credentials:"include"});if(!M.ok)return[];const E=await M.json();return cp(E)}C().then(N=>{i(N),f(!0)}).catch(()=>f(!0))},[n]),!u)return null;const g=m.appStatus==="crashed"||m.appStatus==="failed"||m.appStatus==="error"?sj(s,r):null;return s.length>0?c.jsxs("div",{className:"flex flex-col gap-2 py-4 px-2",children:[g&&c.jsxs("div",{className:"rounded-lg border border-red-500/30 bg-red-500/5 p-4 space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 flex-shrink-0"}),c.jsx("span",{className:"text-sm font-semibold text-red-400",children:g.summary})]}),c.jsxs("p",{className:"text-xs text-muted-foreground pl-4",children:[r("logs.tip")," ",g.action]})]}),c.jsxs("div",{className:"flex items-center gap-2 px-2",children:[c.jsx(xs,{className:"h-4 w-4 text-amber-500"}),c.jsx("span",{className:"text-xs font-medium text-amber-500",children:r("logs.lastBeforeShutdown",{count:s.length})})]}),c.jsx("pre",{className:"p-3 rounded-lg bg-black/30 text-xs text-muted-foreground overflow-x-auto max-h-[60vh] overflow-y-auto font-mono leading-relaxed border border-amber-500/20",children:s.join(`
408
+ `)}),c.jsx("p",{className:"text-xs text-muted-foreground text-center",children:r("logs.restartHint")})]}):c.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center gap-3",children:[c.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-amber-500/10",children:c.jsx(xs,{className:"h-5 w-5 text-amber-500"})}),c.jsx("p",{className:"text-sm text-muted-foreground",children:r("logs.unavailable")}),c.jsx("p",{className:"text-xs text-muted-foreground",children:r("logs.restartHint")})]})}function oj(){const{locale:n}=Gn(),r=Je(),{apiBase:s}=Zt(),i=ha(),{appStatus:u}=i,f=WN(i),[m,y]=w.useState([]),[g,h]=w.useState("all"),[v,x]=w.useState(!0),[S,j]=w.useState(!1),[C,N]=w.useState(!0),[M,E]=w.useState(!1),[L,B]=w.useState(!0),[ee,le]=w.useState(!1),I=w.useRef(null),P=w.useRef(null);if(f)return c.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center gap-3",children:[c.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-cyan-500/10",children:c.jsx(fr,{className:"h-5 w-5 text-cyan-500"})}),c.jsx("p",{className:"text-sm font-medium text-foreground",children:r("app.common.staticHosting")}),c.jsx("p",{className:"text-xs text-muted-foreground max-w-xs",children:r("logs.staticOnlyBody")})]});const q=w.useCallback(async()=>{if(u&&u!=="running"){le(!0),B(!1);return}try{const re=new URLSearchParams({limit:"200",level:g});S&&re.set("verbose","1");const Q=await fetch(`${s}/_admin/logs?${re.toString()}`);if(!Q.ok&&(Q.status===502||Q.status===503)){le(!0),B(!1);return}const oe=await Q.json();y(rj(oe)),le(!1),B(!1)}catch(re){console.error("Failed to fetch logs:",re),le(!0),B(!1)}},[s,g,S,u]);w.useEffect(()=>{q()},[q]),w.useEffect(()=>{if(ee||u&&u!=="running")return;const re=s.replace(/^http/,"ws")+"/ws";let Q,oe;function pe(){Q=new WebSocket(re),P.current=Q,Q.onopen=()=>{E(!0),Q.send(JSON.stringify({type:"log:subscribe"}))},Q.onmessage=K=>{try{const J=JSON.parse(K.data),T=J.type==="log:entry"?J.data??J:null;T&&y($=>{const W=[...$,T];return W.length>500?W.slice(-500):W})}catch{}},Q.onclose=()=>{E(!1),P.current=null,oe=setTimeout(pe,3e3)},Q.onerror=()=>{Q.close()}}return pe(),()=>{clearTimeout(oe),P.current&&(P.current.close(),P.current=null)}},[s,ee,u]),w.useEffect(()=>{C&&I.current&&(I.current.scrollTop=I.current.scrollHeight)},[m,C]);const se=m.filter(re=>!(g!=="all"&&re.level!==g||!S&&re.verbose||v&&nj(re.message)));return c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 h-12 bg-background",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(xs,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("h2",{className:"font-semibold text-foreground",children:r("app.nav.logs")}),c.jsx(Pe,{variant:"outline",className:"text-xs border-border text-muted-foreground",children:se.length}),c.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground ml-2",children:[c.jsx("div",{className:Me("h-1.5 w-1.5 rounded-full",M?"bg-green-500":"bg-red-500")}),r(M?"logs.live":"logs.polling")]})]}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[["all","info","warn","error"].map(re=>c.jsx(xe,{variant:g===re?"default":"outline",size:"sm",className:"h-7 text-xs capitalize",onClick:()=>h(re),children:r(`logs.level.${re}`)},re)),c.jsx("div",{className:"w-px h-5 bg-border mx-0.5"}),c.jsxs(xe,{variant:v?"default":"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>x(re=>!re),title:r(v?"logs.systemHidden":"logs.systemShown"),children:[v?c.jsx(y0,{className:"h-3 w-3"}):c.jsx(x0,{className:"h-3 w-3"}),r("logs.system")]}),c.jsx(xe,{variant:S?"default":"outline",size:"sm",className:"h-7 text-xs",onClick:()=>j(re=>!re),title:r(S?"logs.verboseShown":"logs.verboseHidden"),children:r("logs.verbose")}),c.jsx(xe,{variant:C?"default":"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>N(re=>!re),children:c.jsx(h0,{className:"h-3 w-3"})}),c.jsx(xe,{variant:"ghost",size:"sm",onClick:q,className:"h-7",children:c.jsx(Vn,{className:"h-3.5 w-3.5"})})]})]}),c.jsx("div",{ref:I,className:"flex-1 overflow-y-auto",children:c.jsxs("div",{className:"p-2 space-y-px font-mono text-xs",children:[se.map(re=>c.jsxs("div",{className:Me("flex items-start gap-2 px-3 py-1.5 rounded hover:bg-accent/50 transition-colors",re.level==="error"&&"bg-red-500/5"),children:[c.jsx("span",{className:"text-muted-foreground whitespace-nowrap flex-shrink-0",children:hs(re.timestamp,n,{timeStyle:"medium"})}),c.jsx(Pe,{variant:"outline",className:Me("text-[10px] px-1.5 py-0 flex-shrink-0",aj[re.level]),children:re.level}),re.source&&c.jsx(Pe,{variant:"secondary",className:"text-[10px] px-1.5 py-0 flex-shrink-0",children:re.source}),re.verbose&&c.jsx(Pe,{variant:"outline",className:"text-[10px] px-1.5 py-0 flex-shrink-0 border-border",children:"verbose"}),c.jsx("span",{className:Me("break-all",lj[re.level]),dangerouslySetInnerHTML:{__html:PN(re.message)}})]},re.id)),ee&&!L&&c.jsx(ij,{apiBase:s}),!ee&&se.length===0&&!L&&c.jsx("div",{className:"text-center text-muted-foreground py-8",children:r(v&&!S?"logs.empty.systemVerboseHidden":v?"logs.empty.systemHidden":S?"logs.empty.default":"logs.empty.verboseHidden")})]})})]})}const uj=20,cj=[20,50,100];function dp(n){const r=n.filter(s=>s.storage_id&&s.name);return{files:r,invalidCount:n.length-r.length}}function dj(n){if(Array.isArray(n))return{...dp(n),nextCursor:null};if(!n||typeof n!="object"||!Array.isArray(n.files))throw new Error("invalid-files-response");const r=n,s={...dp(r.files),nextCursor:typeof r.nextCursor=="string"?r.nextCursor:null};return typeof r.total=="number"&&(s.total=r.total),typeof r.limit=="number"&&(s.limit=r.limit),(r.order==="asc"||r.order==="desc")&&(s.order=r.order),r.filters&&typeof r.filters=="object"&&(s.filters=r.filters),s}function fj(n){const r=(n||"application/octet-stream").trim().toLowerCase();return r.startsWith("image/")?"image":r.startsWith("audio/")?"audio":r.startsWith("video/")?"video":r.startsWith("text/")?"text":r==="application/pdf"||r==="application/json"||r.includes("officedocument")||r==="application/msword"||r==="application/vnd.ms-excel"||r==="application/vnd.ms-powerpoint"||r.includes("hwp")?"document":r==="application/zip"||r.includes("gzip")||r.includes("tar")||r.includes("rar")||r.includes("7z")?"archive":"other"}function id(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(1)} MB`}const mj=["private","public"],hj=["image","audio","video","document","archive","text","other"];function gj(n){return`files.type${n[0].toUpperCase()}${n.slice(1)}`}function fp(n,r){return n.length===0?c.jsx("span",{className:"text-xs text-muted-foreground",children:r}):c.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(s=>c.jsxs("span",{className:"rounded border border-border px-2 py-1 text-xs",children:[s.label,": ",s.count]},s.label))})}function pj({state:n,filters:r,bulkRunning:s,t:i,onClose:u,onConfirm:f}){var g,h,v;if(!n.open)return null;const m=n.preview?mj.map(x=>{var S;return{label:i(x==="public"?"files.public":"files.private"),count:((S=n.preview)==null?void 0:S.visibility[x])??0}}).filter(x=>x.count>0):[],y=n.preview?hj.map(x=>{var S;return{label:i(gj(x)),count:((S=n.preview)==null?void 0:S.typeFamily[x])??0}}).filter(x=>x.count>0):[];return c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/70 p-4 backdrop-blur-sm",children:c.jsxs("div",{className:"w-full max-w-lg rounded-md border border-border bg-background shadow-lg",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[c.jsx("h3",{className:"font-semibold text-foreground",children:i("files.bulkPreviewTitle")}),c.jsx(xe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:u,children:c.jsx(fo,{className:"h-4 w-4"})})]}),c.jsxs("div",{className:"space-y-3 px-4 py-4 text-sm",children:[n.loading&&c.jsx("p",{className:"text-muted-foreground",children:i("files.bulkPreviewLoading")}),n.error&&c.jsx("p",{className:"text-destructive",children:n.error}),n.preview&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.jsxs("div",{className:"rounded border border-border p-2",children:[c.jsx("p",{className:"text-xs text-muted-foreground",children:i("files.bulkPreviewCount")}),c.jsx("p",{className:"font-semibold",children:n.preview.count})]}),c.jsxs("div",{className:"rounded border border-border p-2",children:[c.jsx("p",{className:"text-xs text-muted-foreground",children:i("files.bulkPreviewBytes")}),c.jsx("p",{className:"font-semibold",children:id(n.preview.totalBytes)})]})]}),c.jsxs("div",{className:"space-y-2 rounded border border-border p-3",children:[c.jsxs("div",{children:[c.jsx("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:i("files.bulkPreviewVisibility")}),fp(m,i("files.bulkPreviewNoBreakdown"))]}),c.jsxs("div",{children:[c.jsx("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:i("files.bulkPreviewTypes")}),fp(y,i("files.bulkPreviewNoBreakdown"))]})]}),c.jsx("p",{className:"text-muted-foreground",children:((g=n.action)==null?void 0:g.type)==="delete"?i("files.bulkDeleteWarning"):((h=n.action)==null?void 0:h.visibility)==="public"?i("files.bulkPublicWarning"):i("files.bulkPrivateWarning")}),c.jsx("div",{className:"max-h-32 overflow-auto rounded border border-border",children:n.preview.samples.map(x=>c.jsxs("div",{className:"flex items-center justify-between border-b border-border px-3 py-2 last:border-b-0",children:[c.jsx("span",{className:"truncate",children:x.name}),c.jsx("span",{className:"ml-3 text-xs text-muted-foreground",children:id(x.size)})]},x.storageId))})]})]}),c.jsxs("div",{className:"flex justify-end gap-2 border-t border-border px-4 py-3",children:[c.jsx(xe,{variant:"ghost",size:"sm",onClick:u,children:i("common.cancel")}),c.jsx(xe,{variant:((v=n.action)==null?void 0:v.type)==="delete"?"destructive":"default",size:"sm",disabled:!n.preview||!n.action||s,onClick:()=>{!n.preview||!n.action||f({target:{mode:"filter",filter:n.filterSnapshot??r},action:n.action,expectedCount:n.preview.count})},children:i("common.confirm")})]})]})})}function yj(n){return!!n&&n.startsWith("image/")}function xj(n){const r=fj(n);return`files.type${r[0].toUpperCase()}${r.slice(1)}`}function vj({files:n,selectedStorageIds:r,setSelectedStorageIds:s,allPageSelected:i,locale:u,t:f,deleteConfirm:m,updatingVisibility:y,resolveAppUrl:g,onCopyPublicUrl:h,onDelete:v,onVisibilityChange:x}){return c.jsxs(c0,{children:[c.jsx(d0,{children:c.jsxs(fs,{children:[c.jsx(Un,{className:"w-10",children:c.jsx("input",{"aria-label":f("files.selectPage"),type:"checkbox",checked:i,onChange:S=>{s(S.target.checked?new Set(n.map(j=>j.storage_id)):new Set)}})}),c.jsx(Un,{className:"w-14",children:f("files.columnPreview")}),c.jsx(Un,{children:f("files.columnName")}),c.jsx(Un,{children:f("files.columnType")}),c.jsx(Un,{children:f("files.columnSize")}),c.jsx(Un,{children:f("files.columnVisibility")}),c.jsx(Un,{children:f("files.columnUploadedBy")}),c.jsx(Un,{children:f("files.columnCreated")}),c.jsx(Un,{className:"text-right",children:f("files.columnActions")})]})}),c.jsx(f0,{children:n.map(S=>c.jsxs(fs,{"data-state":r.has(S.storage_id)?"selected":void 0,children:[c.jsx(_n,{children:c.jsx("input",{"aria-label":f("files.selectFile",{name:S.name||S.storage_id}),type:"checkbox",checked:r.has(S.storage_id),onChange:j=>{s(C=>{const N=new Set(C);return j.target.checked?N.add(S.storage_id):N.delete(S.storage_id),N})}})}),c.jsx(_n,{children:yj(S.type)?c.jsx("div",{className:"h-9 w-9 overflow-hidden rounded bg-muted",children:c.jsx("img",{src:g(S.url||`/api/storage/${S.storage_id}`),alt:S.name,className:"h-full w-full object-cover",loading:"lazy"})}):c.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded bg-muted",children:c.jsx(C2,{className:"h-4 w-4 text-muted-foreground"})})}),c.jsxs(_n,{className:"min-w-56",children:[c.jsx("div",{className:"font-medium text-foreground",children:S.name||f("common.unnamed")}),c.jsxs("button",{className:"text-xs font-mono text-muted-foreground hover:text-foreground",onClick:()=>navigator.clipboard.writeText(S.storage_id),title:f("common.copy"),children:[S.storage_id.slice(0,8),"..."]})]}),c.jsx(_n,{children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Pe,{variant:"outline",className:"text-[10px]",children:f(xj(S.type))}),c.jsx("span",{className:"text-xs text-muted-foreground",children:S.type||f("common.unknown")})]})}),c.jsx(_n,{children:id(Number(S.size||0))}),c.jsx(_n,{children:c.jsx(Pe,{variant:S.visibility==="public"?"default":"outline",className:"text-[10px]",children:S.visibility==="public"?f("files.public"):f("files.private")})}),c.jsx(_n,{children:S.uploaded_by||"dashboard"}),c.jsx(_n,{children:Ns(S.created_at,u)}),c.jsx(_n,{children:c.jsxs("div",{className:"flex justify-end gap-1",children:[c.jsx(xe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>x(S),disabled:!S.storage_id||y===S.storage_id,title:S.visibility==="public"?f("files.makePrivate"):f("files.makePublic"),children:S.visibility==="public"?c.jsx(p0,{className:"h-3.5 w-3.5"}):c.jsx(b0,{className:"h-3.5 w-3.5"})}),S.visibility==="public"&&c.jsx(xe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>h(S),title:f("files.copyPublicUrl"),children:c.jsx(g2,{className:"h-3.5 w-3.5"})}),c.jsx(xe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{const j=document.createElement("a");j.href=g(S.download_url||S.url||`/api/storage/${S.storage_id}`),j.download=S.name,j.click()},title:f("common.download"),children:c.jsx(x2,{className:"h-3.5 w-3.5"})}),c.jsx(xe,{variant:"ghost",size:"icon",className:Me("h-7 w-7",m===S.id?"bg-red-500/10 text-red-400":"text-muted-foreground hover:text-red-400"),onClick:()=>v(S.id,S.storage_id),title:m===S.id?f("files.confirmDelete"):f("common.delete"),children:m===S.id?c.jsx(fo,{className:"h-3.5 w-3.5"}):c.jsx(no,{className:"h-3.5 w-3.5"})})]})})]},S.storage_id))})]})}const mp={visibility:"all",typeFamily:"all",q:"",uploadedBy:"all"},sr={cursor:null,page:1,history:[]};function bj(n,r){r.visibility!=="all"&&n.searchParams.set("visibility",r.visibility),r.typeFamily!=="all"&&n.searchParams.set("typeFamily",r.typeFamily),r.q.trim()&&n.searchParams.set("q",r.q.trim()),r.uploadedBy!=="all"&&n.searchParams.set("uploadedBy",r.uploadedBy)}function Sj(){const{locale:n}=Gn(),r=Je(),{apiBase:s,deleteRow:i}=Zt(),{appStatus:u}=ha(),[f,m]=w.useState([]),[y,g]=w.useState(null),[h,v]=w.useState(void 0),[x,S]=w.useState(uj),[j,C]=w.useState(sr),[N,M]=w.useState(mp),[E,L]=w.useState(new Set),[B,ee]=w.useState(!0),[le,I]=w.useState(null),[P,q]=w.useState(!1),[se,re]=w.useState(!1),[Q,oe]=w.useState(null),[pe,K]=w.useState(null),[J,T]=w.useState(!1),[$,W]=w.useState({open:!1,loading:!1,error:null,action:null,preview:null,filterSnapshot:null}),[de,X]=w.useState(!1),[R,U]=w.useState(null),G=w.useRef(null),Z=w.useCallback(async ne=>{if(u&&u!=="running"){m([]),g(null),v(void 0),L(new Set),X(!0),U(null),I(null),ee(!1),C(sr);return}const Se=ne.cursor===null&&ne.page===1;try{ee(!0),I(null),Se&&U(null);const ue=new URL(`${s.replace(/\/$/,"")}/_admin/files`);ue.searchParams.set("limit",String(x)),ue.searchParams.set("includeTotal","1"),ne.cursor&&ue.searchParams.set("cursor",ne.cursor),bj(ue,N);const Be=await fetch(ue.toString());if(!Be.ok&&(Be.status===502||Be.status===503)){m([]),g(null),v(void 0),L(new Set),X(!0),U(null),I(null),C(sr);return}if(!Be.ok){const Nt=await Be.json().catch(()=>null),jt=typeof(Nt==null?void 0:Nt.code)=="string"?Nt.code:`HTTP_${Be.status}`,qn=typeof(Nt==null?void 0:Nt.error)=="string"?Nt.error:r("files.loadFailedBody");Se?(m([]),g(null),v(void 0),U({title:r("files.loadFailedTitle"),detail:`${jt}: ${qn}`})):I(`${jt}: ${qn}`),X(!1);return}let Le;try{Le=dj(await Be.json())}catch{Se?(m([]),g(null),v(void 0),U({title:r("files.loadFailedTitle"),detail:r("files.invalidResponse")})):I(r("files.invalidResponse")),X(!1);return}Le.invalidCount>0&&console.warn(`[files] Filtered ${Le.invalidCount} invalid file catalog row(s)`),m(Le.files),g(Le.nextCursor),v(Le.total),L(new Set),C(ne),X(!1),U(null),I(null)}catch(ue){const Be=ue instanceof Error?ue.message:r("files.loadFailedBody");Se?(m([]),g(null),v(void 0),U({title:r("files.loadFailedTitle"),detail:Be})):I(Be),X(!1)}finally{ee(!1)}},[s,u,N,x,r]);w.useEffect(()=>{Z(sr)},[Z]);const te=w.useCallback(ne=>/^https?:\/\//i.test(ne)?ne:`${s.replace(/\/$/,"")}${ne.startsWith("/")?"":"/"}${ne}`,[s]);function ie(ne,Se){M(ue=>({...ue,[ne]:Se}))}async function je(ne){if(!ne||ne.length===0)return;q(!0);let Se=0,ue=0;for(const Be of Array.from(ne))try{const Le=new FormData;Le.append("file",Be),(await fetch(`${s}/_admin/files/upload`,{method:"POST",body:Le})).ok?Se++:ue++}catch{ue++}q(!1),ue===0?tt.success(r("files.uploadSuccess",{count:Se})):tt.error(r("files.uploadMixed",{success:Se,failed:ue})),await Z(sr)}function _e(ne){ne.preventDefault(),re(!0)}function be(ne){ne.preventDefault(),re(!1)}function wt(ne){ne.preventDefault(),re(!1),je(ne.dataTransfer.files)}async function xt(ne,Se){if(Q!==ne){oe(ne),setTimeout(()=>oe(null),3e3);return}try{if(Se){if(!(await fetch(`${s}/_admin/files/${Se}`,{method:"DELETE"})).ok)throw new Error("Delete failed")}else await i("_system_files",ne);tt.success(r("files.deleted")),await Z(j)}catch{tt.error(r("files.deleteFailed"))}oe(null)}async function gt(ne){const Se=ne.storage_id;if(!Se||pe===Se)return;const ue=ne.visibility==="public"?"private":"public";if(!(ue==="public"&&!window.confirm(r("files.publicConfirm")))){K(Se);try{const Be=await fetch(`${s}/_admin/files/${Se}/visibility`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({visibility:ue})});if(!Be.ok)throw new Error("Visibility update failed");const Le=await Be.json();m(Nt=>Nt.map(jt=>jt.storage_id===Se?{...jt,visibility:Le.visibility,url:Le.url,download_url:Le.download_url}:jt)),tt.success(r("files.visibilityUpdated"))}catch{tt.error(r("files.visibilityUpdateFailed"))}finally{K(null)}}}async function on(ne){try{await navigator.clipboard.writeText(te(ne.url||`/api/storage/${ne.storage_id}`)),tt.success(r("common.copy"))}catch{tt.error(r("files.visibilityUpdateFailed"))}}async function st(ne){const Se=Array.from(E);if(Se.length===0)return;const ue=ne.type==="delete"?"files.bulkDeleteConfirm":ne.visibility==="public"?"files.bulkPublicConfirm":"files.bulkPrivateConfirm";window.confirm(r(ue,{count:Se.length}))&&await un({target:{mode:"selected",storageIds:Se},action:ne})}async function Jt(ne){const Se={...N};W({open:!0,loading:!0,error:null,action:ne,preview:null,filterSnapshot:Se});try{const ue=await fetch(`${s}/_admin/files/bulk/preview`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:{mode:"filter",filter:Se},action:ne})}),Be=await ue.json().catch(()=>null);if(!ue.ok)throw new Error(typeof(Be==null?void 0:Be.error)=="string"?Be.error:"Preview failed");W({open:!0,loading:!1,error:null,action:ne,preview:Be,filterSnapshot:Se})}catch(ue){W({open:!0,loading:!1,error:ue instanceof Error?ue.message:r("files.bulkPreviewFailed"),action:ne,preview:null,filterSnapshot:Se})}}async function un(ne){T(!0);try{const Se=await fetch(`${s}/_admin/files/bulk`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ne)}),ue=await Se.json().catch(()=>null);if(!Se.ok)throw new Error(typeof(ue==null?void 0:ue.error)=="string"?ue.error:"Bulk action failed");(ue==null?void 0:ue.failed)>0||(ue==null?void 0:ue.success)===!1?tt.error(r("files.bulkPartial",{changed:(ue==null?void 0:ue.changed)??0,failed:(ue==null?void 0:ue.failed)??0})):tt.success(r("files.bulkComplete",{changed:(ue==null?void 0:ue.changed)??0})),W({open:!1,loading:!1,error:null,action:null,preview:null,filterSnapshot:null}),await Z(j)}catch(Se){tt.error(Se instanceof Error?Se.message:r("files.bulkFailed"))}finally{T(!1)}}function he(){W({open:!1,loading:!1,error:null,action:null,preview:null,filterSnapshot:null})}const Te=f.length>0&&f.every(ne=>E.has(ne.storage_id)),Ne=E.size;return c.jsxs("div",{className:"flex h-full flex-col",onDragOver:_e,onDragLeave:be,onDrop:wt,children:[c.jsxs("div",{className:"flex min-h-12 items-center justify-between border-b border-border bg-background px-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(to,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("h2",{className:"font-semibold text-foreground",children:r("app.nav.files")}),c.jsx(Pe,{variant:"outline",className:"text-xs border-border text-muted-foreground",children:h===void 0?r("files.loadedCount",{count:f.length}):r("files.filesCount",{count:h})}),Ne>0&&c.jsx(Pe,{variant:"secondary",className:"text-xs",children:r("files.selectedCount",{count:Ne})})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("input",{ref:G,type:"file",className:"hidden",multiple:!0,onChange:ne=>je(ne.target.files)}),c.jsxs(xe,{variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>{var ne;return(ne=G.current)==null?void 0:ne.click()},disabled:P,children:[c.jsx(qi,{className:"h-3.5 w-3.5"}),r("files.upload")]}),c.jsx(xe,{variant:"ghost",size:"sm",onClick:()=>Z(j),disabled:B,className:"text-muted-foreground",children:c.jsx(Vn,{className:Me("h-3.5 w-3.5",B&&"animate-spin")})})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border bg-muted/20 px-4 py-2",children:[c.jsxs("div",{className:"relative min-w-48 flex-1 max-w-sm",children:[c.jsx(co,{className:"pointer-events-none absolute left-2.5 top-2.5 h-3.5 w-3.5 text-muted-foreground"}),c.jsx(A0,{className:"pl-8",value:N.q,onChange:ne=>ie("q",ne.target.value),placeholder:r("files.searchPlaceholder")})]}),c.jsxs("select",{className:"h-9 rounded-md border border-border bg-background px-2 text-sm",value:N.visibility,onChange:ne=>ie("visibility",ne.target.value),children:[c.jsx("option",{value:"all",children:r("files.filterAllVisibility")}),c.jsx("option",{value:"private",children:r("files.private")}),c.jsx("option",{value:"public",children:r("files.public")})]}),c.jsxs("select",{className:"h-9 rounded-md border border-border bg-background px-2 text-sm",value:N.typeFamily,onChange:ne=>ie("typeFamily",ne.target.value),children:[c.jsx("option",{value:"all",children:r("files.filterAllTypes")}),c.jsx("option",{value:"image",children:r("files.typeImage")}),c.jsx("option",{value:"audio",children:r("files.typeAudio")}),c.jsx("option",{value:"video",children:r("files.typeVideo")}),c.jsx("option",{value:"document",children:r("files.typeDocument")}),c.jsx("option",{value:"archive",children:r("files.typeArchive")}),c.jsx("option",{value:"text",children:r("files.typeText")}),c.jsx("option",{value:"other",children:r("files.typeOther")})]}),c.jsxs("select",{className:"h-9 rounded-md border border-border bg-background px-2 text-sm",value:N.uploadedBy,onChange:ne=>ie("uploadedBy",ne.target.value),children:[c.jsx("option",{value:"all",children:r("files.filterAllUploaders")}),c.jsx("option",{value:"dashboard",children:"dashboard"}),c.jsx("option",{value:"cli",children:"cli"}),c.jsx("option",{value:"api",children:"api"})]}),c.jsx(xe,{variant:"ghost",size:"sm",onClick:()=>M(mp),children:r("common.reset")})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border px-4 py-2",children:[c.jsxs(xe,{variant:"outline",size:"sm",disabled:Ne===0||J,onClick:()=>st({type:"setVisibility",visibility:"public"}),children:[c.jsx(p0,{className:"mr-1.5 h-3.5 w-3.5"}),r("files.bulkMakePublic")]}),c.jsxs(xe,{variant:"outline",size:"sm",disabled:Ne===0||J,onClick:()=>st({type:"setVisibility",visibility:"private"}),children:[c.jsx(b0,{className:"mr-1.5 h-3.5 w-3.5"}),r("files.bulkMakePrivate")]}),c.jsxs(xe,{variant:"outline",size:"sm",disabled:Ne===0||J,onClick:()=>st({type:"delete"}),children:[c.jsx(no,{className:"mr-1.5 h-3.5 w-3.5"}),r("files.bulkDelete")]}),c.jsxs("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[c.jsx(xe,{variant:"ghost",size:"sm",disabled:J,onClick:()=>Jt({type:"setVisibility",visibility:"public"}),children:r("files.filterMakePublic")}),c.jsx(xe,{variant:"ghost",size:"sm",disabled:J,onClick:()=>Jt({type:"setVisibility",visibility:"private"}),children:r("files.filterMakePrivate")}),c.jsx(xe,{variant:"ghost",size:"sm",disabled:J,onClick:()=>Jt({type:"delete"}),children:r("files.filterDelete")})]})]}),se&&c.jsx("div",{className:"absolute inset-0 z-50 flex items-center justify-center border-2 border-dashed border-primary bg-primary/10 backdrop-blur-sm",children:c.jsxs("div",{className:"text-center",children:[c.jsx(qi,{className:"mx-auto mb-2 h-12 w-12 text-primary"}),c.jsx("p",{className:"text-lg font-medium text-primary",children:r("files.dropHere")})]})}),c.jsxs("div",{className:"flex-1 overflow-auto",children:[!R&&!de&&f.length>0&&c.jsx(vj,{files:f,selectedStorageIds:E,setSelectedStorageIds:L,allPageSelected:Te,locale:n,t:r,deleteConfirm:Q,updatingVisibility:pe,resolveAppUrl:te,onCopyPublicUrl:on,onDelete:xt,onVisibilityChange:gt}),de&&!B&&c.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-16 text-center",children:[c.jsx(to,{className:"h-12 w-12 text-amber-500/30"}),c.jsx("h3",{className:"text-lg font-medium text-foreground",children:r("app.common.appNotRunning")}),c.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:r("files.appNotRunningBody")})]}),R&&!de&&!B&&c.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-16 text-center",children:[c.jsx(g0,{className:"h-12 w-12 text-destructive/60"}),c.jsx("h3",{className:"text-lg font-medium text-foreground",children:R.title}),c.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:R.detail}),c.jsxs(xe,{variant:"outline",size:"sm",onClick:()=>Z(sr),children:[c.jsx(Vn,{className:"mr-1.5 h-3.5 w-3.5"}),r("common.refresh")]})]}),!R&&!de&&f.length===0&&!B&&c.jsxs("div",{className:"py-12 text-center text-muted-foreground",children:[c.jsx(qi,{className:"mx-auto mb-3 h-12 w-12 opacity-30"}),c.jsx("p",{className:"font-medium",children:r("files.emptyTitle")}),c.jsx("p",{className:"mt-1 text-xs",children:r("files.emptyBody")}),c.jsxs(xe,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>{var ne;return(ne=G.current)==null?void 0:ne.click()},children:[c.jsx(qi,{className:"mr-1.5 h-3.5 w-3.5"}),r("files.choose")]})]})]}),c.jsxs("div",{className:"flex min-h-12 items-center justify-between gap-3 border-t border-border px-4",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[le&&c.jsx("span",{className:"text-destructive",children:le}),c.jsx("span",{children:r("files.pageNumber",{page:j.page})})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("select",{className:"h-8 rounded-md border border-border bg-background px-2 text-sm",value:x,onChange:ne=>S(Number(ne.target.value)),children:cj.map(ne=>c.jsx("option",{value:ne,children:r("files.pageSize",{count:ne})},ne))}),c.jsxs(xe,{variant:"outline",size:"sm",disabled:j.history.length===0||B,onClick:()=>{const ne=[...j.history],Se=ne.pop()??null;Z({cursor:Se,page:Math.max(1,j.page-1),history:ne})},children:[c.jsx(jd,{className:"mr-1 h-3.5 w-3.5"}),r("common.previous")]}),c.jsxs(xe,{variant:"outline",size:"sm",disabled:!y||B,onClick:()=>{y&&Z({cursor:y,page:j.page+1,history:[...j.history,j.cursor]})},children:[r("common.next"),c.jsx(or,{className:"ml-1 h-3.5 w-3.5"})]})]})]}),c.jsx(pj,{state:$,filters:N,bulkRunning:J,t:r,onClose:he,onConfirm:un})]})}const wj=[{column:"id",type:"text",nullable:!1,default:null},{column:"name",type:"text",nullable:!0,default:null},{column:"email",type:"text",nullable:!1,default:null},{column:"email_verified",type:"boolean",nullable:!1,default:null},{column:"image",type:"text",nullable:!0,default:null},{column:"created_at",type:"timestamp",nullable:!1,default:null},{column:"updated_at",type:"timestamp",nullable:!1,default:null}];function Nj(n,r){return[{accessorKey:"id",header:"ID",minWidth:120,maxWidth:180,cellClassName:"font-mono text-[11px] text-indigo-400",cell:s=>{const i=s.getValue();return i?i.length>12?i.slice(0,12)+"…":i:""}},{accessorKey:"name",header:n("generic.name"),minWidth:150,maxWidth:250,cellClassName:s=>s?"":"text-muted-foreground italic",cell:s=>s.getValue()||n("auth.noName")},{accessorKey:"email",header:n("generic.email"),minWidth:200,maxWidth:300},{accessorKey:"email_verified",header:n("auth.verified"),minWidth:100,maxWidth:120,cellClassName:s=>s?"text-green-500 font-medium":"text-muted-foreground",cell:s=>s.getValue()?`✓ ${n("auth.yes")}`:n("common.no")},{accessorKey:"created_at",header:n("auth.created"),minWidth:170,maxWidth:220,cell:s=>{const i=s.getValue();return i?Ns(i,r):""}}]}function jj(){const{locale:n}=Gn(),r=Je(),{apiBase:s}=Zt(),[i,u]=w.useState([]),[f,m]=w.useState(0),[y,g]=w.useState(!0),[h,v]=w.useState(0),[x,S]=w.useState(""),[j,C]=w.useState(""),[N,M]=w.useState(null),E=50,{appStatus:L}=ha(),[B,ee]=w.useState(!1),le=w.useMemo(()=>Nj(r,n),[n,r]),I=w.useCallback(async()=>{if(L&&L!=="running"){ee(!0),g(!1);return}g(!0);try{const se=new URLSearchParams;se.set("page",String(h)),se.set("limit",String(E)),x&&se.set("search",x);const re=await fetch(`${s}/_admin/auth/users?${se}`);if(!re.ok&&(re.status===502||re.status===503)){ee(!0),g(!1);return}if(!re.ok){g(!1);return}const Q=await re.json(),oe=(Q.data||[]).map(pe=>({id:pe.id,name:pe.name,email:pe.email,email_verified:pe.emailVerified,image:pe.image,created_at:pe.createdAt,updated_at:pe.updatedAt}));u(oe),m(Q.total||0),ee(!1)}catch(se){console.error("Failed to fetch users:",se),u([]),m(0),ee(!0)}g(!1)},[s,h,x,L]);w.useEffect(()=>{I()},[I]),w.useEffect(()=>{const se=setTimeout(()=>{S(j),v(0)},300);return()=>clearTimeout(se)},[j]);const P=w.useCallback(se=>{M(re=>re&&re.id===se.id?null:se)},[]);w.useEffect(()=>{if(N&&i.length>0){const se=i.find(re=>re.id===N.id);M(se||null)}},[i]);const q=Math.ceil(f/E);return c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 h-12 bg-background",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Jg,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("h2",{className:"font-semibold text-foreground",children:r("app.nav.auth")}),c.jsx(Pe,{variant:"outline",className:"text-xs border-border text-muted-foreground",children:r("auth.usersCount",{count:f})})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx(co,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),c.jsx("input",{type:"text",placeholder:r("auth.searchPlaceholder"),value:j,onChange:se=>C(se.target.value),className:"h-8 w-48 rounded-md border border-border bg-background pl-8 pr-3 text-xs text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary/50"})]}),c.jsx(xe,{variant:"ghost",size:"sm",onClick:I,className:"text-muted-foreground hover:text-foreground",children:c.jsx(Vn,{className:"h-3.5 w-3.5"})})]})]}),c.jsxs("div",{className:"flex-1 min-h-0 relative overflow-hidden",children:[B&&!y?c.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[c.jsx(Jg,{className:"h-12 w-12 text-amber-500/30 mb-4"}),c.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:r("app.common.appNotRunning")}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:r("auth.appNotRunningBody")})]}):i.length===0&&!y?c.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[c.jsx(ow,{className:"h-12 w-12 text-muted-foreground/30 mb-4"}),c.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:r(x?"auth.noUsersFound":"auth.noUsersYet")}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:x?r("auth.noUsersMatch",{search:x}):r("auth.signupHint")})]}):c.jsx(j0,{data:i,columns:le,loading:y,onRowClick:P}),N&&c.jsx(E0,{children:c.jsx(_0,{row:N,columns:wj,tableName:"user",onClose:()=>M(null),onDataChanged:I})})]}),c.jsxs("div",{className:"flex items-center justify-between border-t border-border px-4 py-2 bg-background",children:[c.jsx("span",{className:"text-xs text-muted-foreground",children:f===0?r("auth.noUsers"):r("data.rangeOf",{start:h*E+1,end:Math.min((h+1)*E,f),total:f})}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-xs text-muted-foreground",children:r("data.pageOf",{page:h+1,total:Math.max(q,1)})}),c.jsxs("div",{className:"flex gap-1",children:[c.jsx(xe,{variant:"outline",size:"icon",className:"h-7 w-7 border-border",disabled:h===0,onClick:()=>v(se=>se-1),children:c.jsx(jd,{className:"h-3.5 w-3.5"})}),c.jsx(xe,{variant:"outline",size:"icon",className:"h-7 w-7 border-border",disabled:h+1>=q,onClick:()=>v(se=>se+1),children:c.jsx(or,{className:"h-3.5 w-3.5"})})]})]})]})]})}function Cj(n,r){const s=n.trim().split(/\s+/);if(s.length<5)return n;const[i,u,f,m,y]=s;if(i==="*"&&u==="*")return r("scheduler.everyMinute");if(u==="*"&&i.startsWith("*/"))return r("scheduler.everyMinutes",{count:i.slice(2)});if(i==="0"&&u==="*")return r("scheduler.everyHour");if(u.startsWith("*/"))return r("scheduler.everyHours",{count:u.slice(2)});if(i==="0"&&u==="0"&&f==="*"&&m==="*"&&y==="*")return r("scheduler.dailyMidnight");if(i==="0"&&f==="*"&&m==="*"&&y==="*")return r("scheduler.dailyAt",{time:`${u}:00`});if(i!=="*"&&u!=="*"&&f==="*"&&m==="*"&&y==="*")return r("scheduler.dailyAt",{time:`${u}:${i.padStart(2,"0")}`});if(y==="1-5"||y==="MON-FRI")return r("scheduler.weekdaysAt",{time:`${u}:${i.padStart(2,"0")}`});const h={0:r("scheduler.day.sunday"),1:r("scheduler.day.monday"),2:r("scheduler.day.tuesday"),3:r("scheduler.day.wednesday"),4:r("scheduler.day.thursday"),5:r("scheduler.day.friday"),6:r("scheduler.day.saturday"),7:r("scheduler.day.sunday"),SUN:r("scheduler.day.sunday"),MON:r("scheduler.day.monday"),TUE:r("scheduler.day.tuesday"),WED:r("scheduler.day.wednesday"),THU:r("scheduler.day.thursday"),FRI:r("scheduler.day.friday"),SAT:r("scheduler.day.saturday")}[y.toUpperCase()];return h&&f==="*"&&m==="*"?r("scheduler.everyDayAt",{day:h,time:`${u}:${i.padStart(2,"0")}`}):f==="1"&&m==="*"?r("scheduler.monthlyFirst",{time:`${u}:${i.padStart(2,"0")}`}):n}function Rj(){const{locale:n}=Gn(),r=Je(),{apiBase:s}=Zt(),[i,u]=w.useState(null),{appStatus:f}=ha(),[m,y]=w.useState(!1),g=w.useCallback(async()=>{if(f&&f!=="running"){y(!0);return}try{const h=await fetch(`${s}/_admin/scheduler`);if(!h.ok&&(h.status===502||h.status===503)){y(!0);return}if(!h.ok)return;u(await h.json()),y(!1)}catch(h){console.error("Failed to fetch scheduler:",h),y(!0)}},[s,f]);return w.useEffect(()=>{if(m||f&&f!=="running")return;g();const h=setInterval(g,5e3);return()=>clearInterval(h)},[g,m,f]),m||f&&f!=="running"?c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsx("div",{className:"flex items-center justify-between border-b border-border px-4 h-12 bg-background",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(fa,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("h2",{className:"font-semibold text-foreground",children:r("scheduler.title")})]})}),c.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-center p-8",children:[c.jsx(fa,{className:"h-12 w-12 text-amber-500/30 mb-4"}),c.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:r("app.common.appNotRunning")}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:r("scheduler.infoUnavailable")})]})]}):i?c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 h-12 bg-background",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(fa,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("h2",{className:"font-semibold text-foreground",children:r("scheduler.title")})]}),c.jsx(xe,{variant:"ghost",size:"sm",onClick:g,className:"text-muted-foreground",children:c.jsx(Vn,{className:"h-3.5 w-3.5"})})]}),c.jsxs("div",{className:"flex-1 overflow-auto p-4 space-y-6",children:[c.jsxs("div",{children:[c.jsxs("h3",{className:"text-sm font-medium text-muted-foreground mb-3 flex items-center gap-2",children:[c.jsx(aw,{className:"h-3.5 w-3.5"}),r("scheduler.cronJobs"),c.jsx(Pe,{variant:"outline",className:"text-[10px]",children:i.crons.length})]}),c.jsxs("div",{className:"space-y-1",children:[i.crons.map((h,v)=>c.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-md border border-border hover:bg-accent/50 transition-colors",children:[c.jsx(S0,{className:"h-3.5 w-3.5 text-green-500 shrink-0"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm font-mono font-medium truncate",children:h.name}),c.jsx("p",{className:"text-xs text-muted-foreground",children:Cj(h.pattern,r)})]}),c.jsx(Pe,{variant:"secondary",className:"font-mono text-[10px] shrink-0",children:h.pattern})]},`${h.name}-${v}`)),i.crons.length===0&&c.jsxs("div",{className:"text-center text-muted-foreground py-8",children:[c.jsx(WS,{className:"mx-auto h-10 w-10 mb-2 opacity-30"}),c.jsx("p",{className:"text-sm",children:r("scheduler.noCrons")}),c.jsx("p",{className:"text-xs mt-1",children:r("scheduler.defineCrons")})]})]})]}),c.jsxs("div",{children:[c.jsxs("h3",{className:"text-sm font-medium text-muted-foreground mb-3 flex items-center gap-2",children:[c.jsx(fa,{className:"h-3.5 w-3.5"}),r("scheduler.pendingJobs"),c.jsx(Pe,{variant:"outline",className:"text-[10px]",children:i.pendingJobs.length})]}),c.jsxs("div",{className:"space-y-1",children:[i.pendingJobs.map(h=>c.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-md border border-border hover:bg-accent/50 transition-colors",children:[c.jsx(fa,{className:"h-3.5 w-3.5 text-yellow-500 animate-pulse shrink-0"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm font-mono font-medium truncate",children:h.action}),c.jsx("p",{className:"text-xs text-muted-foreground",children:r("scheduler.scheduledFor",{date:Ns(h.scheduledAt,n)})})]}),c.jsx(Pe,{variant:"secondary",className:"text-[10px] shrink-0",children:(()=>{const v=new Date(h.scheduledAt).getTime()-Date.now();return v<0?r("scheduler.overdue"):v<6e4?`${Math.round(v/1e3)}s`:v<36e5?`${Math.round(v/6e4)}m`:`${Math.round(v/36e5)}h`})()})]},h.id)),i.pendingJobs.length===0&&c.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:r("scheduler.noPending")})]})]})]})]}):null}function _j(){const n=Je(),[r,s]=w.useState([]),[i,u]=w.useState(!0),f=Zt(g=>g.apiBase),m=w.useCallback(async()=>{try{const g=await fetch(`${f}/_admin/settings/env-vars`);g.ok&&s(await g.json())}catch{}u(!1)},[f]);if(w.useEffect(()=>{m()},[m]),i)return c.jsx(KN,{cards:2});const y=r.filter(g=>g.source==="env"||g.source==="both");return c.jsxs("div",{className:"rounded-lg border border-border bg-card p-5 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(td,{className:"h-4 w-4 text-primary"}),c.jsx("span",{className:"text-sm font-medium text-foreground",children:n("app.env.title")})]}),c.jsxs("div",{className:"flex items-start gap-2 text-xs bg-blue-500/10 border border-blue-500/20 rounded px-3 py-2 text-blue-600 dark:text-blue-400",children:[c.jsx(z2,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),c.jsxs("div",{children:[c.jsx("span",{className:"font-medium",children:n("settings.envReadonly")})," —"," ",n("settings.envReadonlyBody",{envFile:".env",command:"gencow env set KEY=VALUE"})]})]}),y.length>0?c.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[c.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-muted/50 border-b border-border",children:[c.jsx(td,{className:"h-3.5 w-3.5 text-muted-foreground"}),c.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:".env"})]}),c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"bg-muted/30 border-b border-border",children:[c.jsx("th",{className:"text-left px-3 py-2 font-medium text-muted-foreground text-xs",children:n("app.env.name")}),c.jsx("th",{className:"text-left px-3 py-2 font-medium text-muted-foreground text-xs",children:n("app.env.value")})]})}),c.jsx("tbody",{children:y.map(g=>c.jsxs("tr",{className:"border-b last:border-b-0 border-border",children:[c.jsx("td",{className:"px-3 py-2",children:c.jsx("code",{className:"text-xs font-mono bg-muted px-1.5 py-0.5 rounded",children:g.name})}),c.jsx("td",{className:"px-3 py-2",children:c.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:g.maskedValue})})]},g.name))})]})]}):c.jsx("div",{className:"text-xs text-muted-foreground text-center py-6 border border-dashed border-border rounded-lg",children:n("settings.noEnvVars")})]})}function Ej(n){if(!n||n==="unknown")return"Unknown";const r=n.match(/^(PostgreSQL|PGlite)\s*[\d.]+/i);return r?r[0]:n.split(" on ")[0]||n}const Mj={vector:"bg-purple-500/15 text-purple-600",pg_search:"bg-blue-500/15 text-blue-600",pgmq:"bg-amber-500/15 text-amber-600",plpgsql:"bg-muted text-muted-foreground"};function D0({appStatus:n}={}){const r=Je(),{status:s,fetchStatus:i}=Zt(),u=ha(),f=n||u.appStatus;if(w.useEffect(()=>{if(f&&f!=="running")return;i();const N=setInterval(i,5e3);return()=>clearInterval(N)},[i,f]),!s)return null;const m=s.memory,y=s.platform,g=Math.floor(s.uptime)||0,h=Math.floor(g/3600),v=Math.floor(g%3600/60),x=g%60,S=Ej((y==null?void 0:y.dbVersion)||""),j=(y==null?void 0:y.extensions)||[],C=[{label:r("server.status"),value:f==="crashed"?c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"}),c.jsx("span",{className:"text-red-500 font-medium",children:r("status.crashed")})]}):f==="error"?c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"}),c.jsx("span",{className:"text-red-500 font-medium",children:r("status.error")})]}):f==="memory_exceeded"?c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500"}),c.jsx("span",{className:"text-red-500 font-medium",children:"Memory exceeded"})]}):f==="stopped"?c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground"}),c.jsx("span",{className:"text-muted-foreground font-medium",children:r("status.stopped")})]}):f==="idle"?c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-blue-400"}),c.jsx("span",{className:"text-blue-400 font-medium",children:r("status.idle")})]}):f==="failed"?c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-orange-500"}),c.jsx("span",{className:"text-orange-500 font-medium",children:r("status.failed")})]}):c.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 animate-pulse"}),c.jsx("span",{className:"text-green-600 font-medium",children:r("status.running")})]})},{label:r("server.uptime"),value:c.jsxs("span",{className:"font-mono",children:[h,"h ",v,"m ",x,"s"]})},{label:r("server.memory"),value:c.jsxs("span",{children:[c.jsxs("span",{className:"font-mono",children:[Math.round(((m==null?void 0:m.rss)||0)/1024/1024)," MB"]}),c.jsxs("span",{className:"text-muted-foreground ml-2",children:["(",r("server.heap")," ",Math.round(((m==null?void 0:m.heapUsed)||0)/1024/1024)," MB)"]})]})},{label:r("server.runtime"),value:c.jsx(Pe,{variant:"secondary",children:y==null?void 0:y.runtime})},{label:r("server.framework"),value:c.jsxs("span",{children:[y==null?void 0:y.framework," + ",y==null?void 0:y.orm]})},{label:r("server.database"),value:c.jsx("span",{children:S})},{label:r("server.extensions"),value:j.length===0?c.jsx("span",{className:"text-muted-foreground",children:r("server.noExtensions")}):c.jsx("span",{className:"inline-flex flex-wrap gap-1",children:j.map(N=>c.jsxs(Pe,{variant:"secondary",className:Mj[N.name]||"",children:[N.name," ",N.version]},N.name))})}];return c.jsxs("div",{className:"rounded-lg border border-border bg-card p-5 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(V2,{className:"h-4 w-4 text-primary"}),c.jsx("span",{className:"text-sm font-medium text-foreground",children:r("server.title")})]}),c.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:c.jsx("table",{className:"w-full text-sm",children:c.jsx("tbody",{className:"divide-y divide-border",children:C.map(N=>c.jsxs("tr",{children:[c.jsx("td",{className:"px-4 py-2.5 text-muted-foreground w-28 whitespace-nowrap bg-muted/30",children:N.label}),c.jsx("td",{className:"px-4 py-2.5 text-foreground",children:N.value})]},N.label))})})})]})}function ir(n,r){const s=Math.abs(n);return s>0&&s<.01?n.toFixed(4).replace(/0+$/,"").replace(/\.$/,""):s>0&&s<100?n.toLocaleString(Xa(r),{maximumFractionDigits:2}):Math.round(n).toLocaleString(Xa(r))}function Tj(n){return typeof n!="number"||!Number.isFinite(n)?null:(n*100).toFixed(1)}function zj(n){return n.isCurrentPeriod&&n.reconciliationOk?n.currentBalance:n.periodRemaining}function kj({serviceCreditsPrimaryKpi:n,recentServiceCreditFailure:r}){const{locale:s}=Gn(),i=Je(),u=Tj(n.periodUsedRatio),f=zj(n);return c.jsxs("div",{className:"rounded-lg border border-border bg-card p-5 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(JS,{className:"h-4 w-4 text-primary"}),c.jsx("span",{className:"text-sm font-medium text-foreground",children:i("usage.serviceCredits")})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("div",{className:"h-2.5 w-full rounded-full bg-muted overflow-hidden",children:c.jsx("div",{className:"h-full rounded-full bg-violet-500 transition-all duration-500",style:{width:`${Math.min(100,Math.max(0,(n.periodUsedRatio??0)*100))}%`}})}),c.jsxs("div",{className:"flex items-center justify-between text-xs",children:[c.jsxs("span",{className:"text-muted-foreground",children:[ir(n.periodUsed,s)," /"," ",ir(n.periodAvailable,s)," cr"]}),c.jsx("span",{className:"font-medium text-foreground",children:u?i("usage.usedPercent",{percent:u}):"—"})]}),c.jsx("div",{className:"text-xs text-muted-foreground",children:i("usage.remaining",{credits:ir(f,s)})})]}),r&&c.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-muted-foreground",children:[c.jsxs("div",{className:"mb-1 flex items-center gap-2 text-foreground",children:[c.jsx(nd,{className:"h-3.5 w-3.5 text-amber-500"}),c.jsx("span",{className:"font-medium",children:i("usage.failure.title")})]}),c.jsx("p",{children:i(`usage.failure.${r.kind}`,{balance:ir(r.currentBalance,s),required:ir(r.requiredReservationCredits,s),shortfall:ir(r.shortfallCredits,s)})})]})]})}const Aj={rpc_query:"usage.route.category.rpc_query",rpc_mutation:"usage.route.category.rpc_mutation",hosted_storage:"usage.route.category.hosted_storage",platform_ai_proxy:"usage.route.category.platform_ai_proxy",custom_http_action:"usage.route.category.custom_http_action",app_route:"usage.route.category.app_route"};function Gc(n){return n<1e3?`${Math.max(0,Math.floor(n))} ms`:n<6e4?`${(n/1e3).toFixed(1)} sec`:`${(n/6e4).toFixed(1)} min`}function Dj(n,r){const s=Aj[n];return s?r(s):n.replace(/_/g," ")}function Oj(n,r,s,i=5){return[...n??[]].sort((u,f)=>f.billableMs-u.billableMs||f.observedMs-u.observedMs||f.requestCount-u.requestCount).slice(0,Math.max(0,i)).map(u=>({key:`${u.category}:${u.routePattern}:${u.statusClass}`,routePattern:u.routePattern,categoryLabel:Dj(u.category,s),statusClass:u.statusClass,requestCountLabel:s("usage.routes.requests",{count:Ya(u.requestCount,r)}),billableLabel:s("usage.routes.billable",{time:Gc(u.billableMs)}),observedLabel:s("usage.routes.observed",{time:Gc(u.observedMs)}),maxObservedLabel:s("usage.routes.max",{time:Gc(u.maxObservedMs)}),cappedLabel:u.cappedRequests>0?s("usage.routes.capped",{count:u.cappedRequests.toLocaleString(Xa(r))}):""}))}function Hj({routes:n,locale:r,t:s}){const i=Oj(n,r,s);return i.length===0?null:c.jsxs("div",{className:"rounded-lg border border-border bg-card p-5 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(ys,{className:"h-4 w-4 text-primary"}),c.jsx("span",{className:"text-sm font-medium text-foreground",children:s("usage.routes.title")})]}),c.jsx("div",{className:"space-y-3",children:i.map(u=>c.jsxs("div",{className:"border-b border-border pb-3 last:border-b-0 last:pb-0",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx("code",{className:"max-w-full truncate rounded bg-muted px-1.5 py-0.5 text-xs text-foreground",children:u.routePattern}),c.jsx("span",{className:"text-xs text-muted-foreground",children:u.categoryLabel}),c.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:u.statusClass})]}),c.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-x-3 gap-y-1 text-xs text-muted-foreground sm:grid-cols-4",children:[c.jsx("span",{children:u.requestCountLabel}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(fa,{className:"h-3 w-3"}),u.billableLabel]}),c.jsx("span",{children:u.observedLabel}),c.jsx("span",{children:u.maxObservedLabel}),u.cappedLabel&&c.jsx("span",{className:"text-primary",children:u.cappedLabel})]})]},u.key))})]})}function us(n){if(n===0)return"0 B";const r=1024,s=["B","KB","MB","GB"],i=Math.floor(Math.log(n)/Math.log(r));return`${(n/Math.pow(r,i)).toFixed(1)} ${s[i]}`}function Bj(n){return n<1e3?`${n.toFixed(0)} ms`:n<6e4?`${(n/1e3).toFixed(1)} sec`:`${(n/6e4).toFixed(1)} min`}function cs(n,r){const s=Math.abs(n);if(s>0&&s<.01)return n.toFixed(4).replace(/0+$/,"").replace(/\.$/,"");if(s>0&&s<100)return n.toLocaleString(Xa(r),{maximumFractionDigits:2});const i=Math.round(n);return s>=1e6?`${(n/1e6).toFixed(1)}M`:s>=1e4?`${(n/1e3).toFixed(1)}K`:i.toLocaleString(Xa(r))}function lo(n,r){const s=r==="ko"?"토큰":"tokens";return n<1e3?`${Ya(n,r)} ${s}`:n<1e6?`${(n/1e3).toFixed(1)}K ${s}`:`${(n/1e6).toFixed(2)}M ${s}`}function Lj(n,r){return Ya(n,r)}const Uj=[{key:"apiCalls",labelKey:"usage.metric.apiCalls",icon:fr,format:(n,r,s)=>s("usage.calls",{count:Ya(n,r)}),creditKeys:["apiCalls"]},{key:"functionMs",labelKey:"usage.metric.functionMs",icon:xl,format:Bj,creditKeys:["functionMs"]},{key:"realtimeMessages",labelKey:"usage.metric.realtimeMessages",icon:U2,format:Lj,creditKeys:["realtimeMessages"]},{key:"dbStorageBytes",labelKey:"usage.metric.dbStorageBytes",icon:$n,format:us,creditKeys:["dbStorage"]},{key:"fileStorageBytes",labelKey:"usage.metric.fileStorageBytes",icon:v0,format:us,creditKeys:["fileStorage"]},{key:"bandwidthBytes",labelKey:"usage.metric.bandwidthBytes",icon:Zi,format:us,creditKeys:["bandwidth"]},{key:"storageBandwidthBytes",labelKey:"usage.metric.storageBandwidthBytes",icon:Zi,format:us,creditKeys:["storageBandwidth"]},{key:"staticBandwidthBytes",labelKey:"usage.metric.staticBandwidthBytes",icon:Zi,format:us,creditKeys:["staticBandwidth"]},{key:"aiInputTokens",labelKey:"usage.metric.aiInputTokens",icon:ms,format:lo,creditKeys:["ai"]},{key:"aiOutputTokens",labelKey:"usage.metric.aiOutputTokens",icon:ms,format:lo,creditKeys:[]}];function hp(n,r){return r.reduce((s,i)=>s+((n==null?void 0:n[i])??0),0)}function Ga(n,r){return(n??[]).filter(s=>s.metricKey===r).reduce((s,i)=>({quantity:s.quantity+(i.quantity??0),chargedCredits:s.chargedCredits+(i.chargedCredits??0),unit:i.unit||s.unit}),{quantity:0,chargedCredits:0,unit:""})}function $j(n,r,s,i,u){const f=Ga(s,"ai_input_tokens"),m=Ga(s,"ai_output_tokens"),y=f.quantity>0?f.quantity:(n==null?void 0:n.aiInputTokens)??0,g=m.quantity>0?m.quantity:(n==null?void 0:n.aiOutputTokens)??0,h=Uj.map(I=>{const P=(n==null?void 0:n[I.key])??0;return{key:I.key,label:u(I.labelKey),icon:I.icon,value:I.key==="aiInputTokens"?lo(y,i):I.key==="aiOutputTokens"?lo(g,i):I.format(P,i,u),credits:I.key==="aiInputTokens"?f.chargedCredits:I.key==="aiOutputTokens"?m.chargedCredits:hp(r,I.creditKeys)}}),v=(n==null?void 0:n.imageTransformCount)??(n==null?void 0:n.imageTransforms)??0,x=(n==null?void 0:n.memoryRssMB)??0,S=Ga(s,"ai_image_count"),j=Ga(s,"ai_image_input_tokens"),C=Ga(s,"ai_image_output_tokens"),N=j.chargedCredits+C.chargedCredits,M=Ga(s,"ai_stt_audio_seconds"),E=Ga(s,"ai_tts_input_characters"),L=Ga(s,"document_convert_mb"),B=h.findIndex(I=>I.key==="aiInputTokens"),ee=B>=0?h.slice(0,B):h,le=B>=0?h.slice(B):[];return[...ee,{key:"imageTransformCount",label:u("usage.metric.imageTransformCount"),icon:Rd,value:u("usage.transforms",{count:Ya(v,i)}),credits:hp(r,["imageTransforms","imageSource","imageOutput"])},{key:"memoryRssMB",label:u("usage.metric.memoryRssMB"),icon:$n,value:`${x>0?x.toFixed(1):"0"} MB`,credits:(n==null?void 0:n.memoryCredits)??0},...le,{key:"aiImageGeneration",label:u("usage.metric.aiImageGeneration"),icon:ms,value:u("usage.images",{count:Ya(S.quantity,i)}),credits:N},{key:"aiSpeechToText",label:u("usage.metric.aiSpeechToText"),icon:ms,value:`${Ya(M.quantity,i)} ${u("usage.unit.seconds")}`,credits:M.chargedCredits},{key:"aiTextToSpeech",label:u("usage.metric.aiTextToSpeech"),icon:ms,value:`${Ya(E.quantity,i)} ${u("usage.unit.characters")}`,credits:E.chargedCredits},{key:"documentConvert",label:u("usage.metric.documentConvert"),icon:td,value:`${L.quantity.toLocaleString(Xa(i),{maximumFractionDigits:2})} ${L.unit||"MB"}`,credits:L.chargedCredits}]}function Vj({showCredits:n=!0}={}){const{locale:r}=Gn(),s=Je(),{apiBase:i}=ha(),[u,f]=w.useState(null),[m,y]=w.useState(!0),[g,h]=w.useState(null),v=w.useCallback(async()=>{y(!0);try{const S=await fetch(`${i}/_admin/usage`);if(!S.ok){let C;try{const N=await S.json();C=N.hint||N.error||s("usage.serverError",{status:S.status})}catch{C=S.status===502?s("usage.appConnectFailed"):S.status===503?s("usage.appPreparing"):s("usage.serverError",{status:S.status})}f({available:!1,error:C});return}const j=await S.json();f(j),h(new Date)}catch{f({available:!1,error:s("usage.connectFailed")})}finally{y(!1)}},[i,s]);w.useEffect(()=>{v()},[v]);const x=u!=null&&u.available?$j(u.usage,u.breakdown,u.serviceUsageMetrics,r,s):[];return c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 h-12 bg-background",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(eo,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("h2",{className:"font-semibold text-foreground",children:s("usage.title")})]}),c.jsx(xe,{variant:"ghost",size:"sm",onClick:v,disabled:m,className:"text-muted-foreground hover:text-foreground",children:c.jsx(Vn,{className:`h-3.5 w-3.5 ${m?"animate-spin":""}`})})]}),c.jsx("div",{className:"flex-1 overflow-y-auto",children:c.jsxs("div",{className:"p-6 space-y-6 max-w-4xl",children:[m&&!u&&c.jsx("div",{className:"flex items-center justify-center py-12",children:c.jsx(Vn,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),u&&!u.available&&c.jsx(qj,{message:u.message||u.error}),u&&u.available&&c.jsxs(c.Fragment,{children:[c.jsx(Gj,{appId:u.appId,apiBase:i,prodApp:u.prodApp}),c.jsx(D0,{}),n&&c.jsx(Fj,{credits:u.credits,plan:u.plan,breakdown:u.breakdown,spendCap:u.spendCap}),n&&u.serviceCreditsPrimaryKpi&&c.jsx(kj,{serviceCreditsPrimaryKpi:u.serviceCreditsPrimaryKpi,recentServiceCreditFailure:u.recentServiceCreditFailure}),c.jsxs("div",{className:"rounded-lg border border-border bg-card p-5 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(eo,{className:"h-4 w-4 text-primary"}),c.jsx("span",{className:"text-sm font-medium text-foreground",children:s("usage.metrics")})]}),c.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:x.map(S=>{const j=S.icon;return c.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 p-4 space-y-1",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[c.jsx(j,{className:"h-3.5 w-3.5"}),S.label]}),c.jsx("div",{className:"text-lg font-semibold text-foreground",children:S.value}),S.credits>0&&c.jsxs("div",{className:"text-xs font-mono text-primary",children:[cs(S.credits,r)," cr"]})]},S.key)})}),u.period&&c.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground border-t border-border pt-3",children:[c.jsx(fa,{className:"h-3 w-3"}),s("usage.currentPeriod",{start:hs(u.period.start,r),end:hs(u.period.end,r)})]})]}),c.jsx(Hj,{routes:u.backendRouteUsage,locale:r,t:s}),g&&c.jsxs("div",{className:"text-xs text-muted-foreground flex items-center gap-1.5",children:[c.jsx(fa,{className:"h-3 w-3"}),s("usage.lastUpdated",{time:hs(g,r,{timeStyle:"medium"})})]})]})]})})]})}function Gj({appId:n,apiBase:r,prodApp:s}){var j;const i=Je(),f=r.includes("/_proxy/")?(j=r.split("/_proxy/")[1])==null?void 0:j.split("/")[0]:n,m=(()=>{try{const N=new URL(r).hostname.split(".");if(N.length>=2)return N.slice(-2).join(".")}catch{}if(typeof window<"u"){const C=window.location.hostname.split(".");if(C.length>=2)return C.slice(-2).join(".")}return"gencow.app"})(),y=f?`https://${f}.${m}`:null,g=y?`${y}/api`:null,[h,v]=w.useState(null);function x(C,N){navigator.clipboard.writeText(C),v(N),setTimeout(()=>v(null),2e3)}const S=[{label:i("deploy.appUrl"),value:y,key:"url"},{label:i("deploy.apiEndpoint"),value:g,key:"api"},{label:i("deploy.appId"),value:n||f,key:"id"}].filter(C=>C.value);if(s){const C=typeof window<"u"?window.location.origin:"https://gencow.app";S.push({label:i("deploy.prodUrl"),value:s.url,key:"prod-url"},{label:i("deploy.prodDashboard"),value:`${C}/apps/${s.name}/status`,key:"prod-dashboard"},{label:i("deploy.prodStatus"),value:`${s.backendStatus||s.status}${s.running?" ● running":""}`,key:"prod-status"})}return S.length===0?null:c.jsxs("div",{className:"rounded-lg border border-border bg-card p-5 space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Rd,{className:"h-4 w-4 text-primary"}),c.jsx("span",{className:"text-sm font-medium text-foreground",children:i("deploy.info")}),c.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[c.jsx("div",{className:"h-2 w-2 rounded-full bg-emerald-500"}),c.jsx("span",{className:"text-xs text-emerald-500 font-medium",children:i("common.deployed")}),s&&c.jsx("span",{className:"text-xs text-violet-400 font-medium ml-2",children:"+ Prod"})]})]}),c.jsx("div",{className:"space-y-2",children:S.map(C=>c.jsxs("div",{className:`flex items-center justify-between rounded-md px-3 py-2 ${C.key.startsWith("prod-")?"bg-violet-500/5 border border-violet-500/20":"bg-muted/50"}`,children:[c.jsxs("div",{className:"space-y-0.5 min-w-0 flex-1",children:[c.jsx("div",{className:"text-xs text-muted-foreground",children:C.label}),c.jsx("div",{className:"text-sm font-mono text-foreground truncate",children:C.key==="url"||C.key==="api"||C.key==="prod-url"||C.key==="prod-dashboard"?c.jsx("a",{href:C.value,target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary transition-colors",children:C.value}):C.value})]}),c.jsx("button",{onClick:()=>x(C.value,C.key),className:"ml-2 shrink-0 rounded-md p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground transition-colors",title:i("common.copy"),children:h===C.key?c.jsx("span",{className:"text-xs text-emerald-500",children:"✓"}):c.jsx(fr,{className:"h-3.5 w-3.5"})})]},C.key))})]})}function qj({message:n}){const r=Je();return c.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center space-y-4",children:[c.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10",children:c.jsx(Rd,{className:"h-6 w-6 text-primary"})}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("h3",{className:"font-medium text-foreground",children:r("usage.meteringTitle")}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-xs",children:n||r("usage.meteringDefault")})]})]})}function Fj({credits:n,plan:r,breakdown:s,spendCap:i}){const{locale:u}=Gn(),f=Je();if(!n)return null;const m=!n.total||n.total<=0,y=s?Object.values(s).reduce((S,j)=>S+j,0):0,g=Math.max(y,n.used),h=m?0:g/n.total*100,v=Math.max(0,100-h);let x="bg-emerald-500";return m||(v<20?x="bg-red-500":v<50&&(x="bg-amber-500")),c.jsxs("div",{className:"rounded-lg border border-border bg-card p-5 space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(xl,{className:"h-4 w-4 text-primary"}),c.jsx("span",{className:"text-sm font-medium text-foreground",children:f("usage.credits")})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[i&&c.jsxs("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${i.enabled?"bg-amber-500/10 text-amber-600":"bg-emerald-500/10 text-emerald-600"}`,children:[f("usage.spendCap")," ",i.enabled?f("usage.on"):f("usage.off")]}),r&&c.jsx("span",{className:"rounded-full bg-primary/10 px-2.5 py-0.5 text-xs font-medium text-primary",children:r})]})]}),c.jsxs("div",{className:"space-y-1.5",children:[!m&&c.jsx("div",{className:"h-2.5 w-full rounded-full bg-muted overflow-hidden",children:c.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${x}`,style:{width:`${Math.min(h,100)}%`}})}),c.jsxs("div",{className:"flex items-center justify-between text-xs",children:[c.jsx("span",{className:"text-muted-foreground",children:m?f("usage.crUsed",{used:cs(g,u)}):f("usage.crUsedOf",{used:cs(g,u),total:cs(n.total,u)})}),c.jsx("span",{className:"font-medium text-foreground",children:m?f("usage.unlimited"):f("usage.crRemaining",{remaining:cs(Math.max(0,n.total-g),u)})})]})]})]})}function Yj({children:n,appStatus:r}={}){const s=Je();return c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsx("div",{className:"flex items-center justify-between border-b border-border px-4 h-12 bg-background",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(_d,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("h2",{className:"font-semibold text-foreground",children:s("app.nav.settings")})]})}),c.jsx("div",{className:"flex-1 overflow-y-auto",children:c.jsxs("div",{className:"p-6 space-y-6 max-w-4xl",children:[c.jsx(_j,{}),c.jsx(D0,{appStatus:r}),n,c.jsx(Kj,{})]})})]})}function Kj(){const n=Je(),[r,s]=w.useState(!1),[i,u]=w.useState(""),[f,m]=w.useState(!1),y=async()=>{m(!0);const g=Zt.getState().apiBase;try{const h=await fetch(`${g}/_admin/reset`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({confirm:"delete all data"})}),v=await h.json().catch(()=>({}));if(!h.ok){tt.error(v.error||n("settings.resetFailed"));return}const x=Array.isArray(v.truncated)?v.truncated.length:0,S=v.seeded?n("settings.resetSeedSuffix"):"";tt.success(n("settings.resetSuccess",{count:x,seed:S}))}catch{tt.error(n("settings.resetConnectFailed"))}finally{m(!1),s(!1),u("")}};return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"rounded-lg border border-destructive/30 bg-destructive/5",children:c.jsx("div",{className:"p-5",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-destructive/10 text-destructive",children:c.jsx(nd,{className:"h-4.5 w-4.5"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("h3",{className:"text-sm font-semibold text-destructive",children:n("settings.resetTitle")}),c.jsx("p",{className:"text-sm text-muted-foreground mt-1 leading-relaxed",children:n("settings.resetBody",{seed:"seed.ts"})})]}),c.jsx(xe,{variant:"destructive",size:"sm",onClick:()=>s(!0),className:"shrink-0",children:n("settings.resetButton")})]})})}),r&&c.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[c.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>{s(!1),u("")}}),c.jsx("div",{className:"relative z-10 w-full max-w-md mx-4 rounded-lg border border-border bg-background shadow-2xl animate-in fade-in zoom-in-95 duration-200",children:c.jsxs("div",{className:"p-6 space-y-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-destructive/10",children:c.jsx(nd,{className:"h-5 w-5 text-destructive"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-base font-semibold text-foreground",children:n("settings.resetConfirmTitle")}),c.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:n("settings.resetConfirmBody")})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{className:"text-sm text-muted-foreground",children:n("settings.resetType",{phrase:"delete all data"})}),c.jsx("input",{type:"text",value:i,onChange:g=>u(g.target.value),placeholder:"delete all data",className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-destructive/50 focus:border-destructive",autoFocus:!0,onKeyDown:g=>{g.key==="Enter"&&i==="delete all data"&&y(),g.key==="Escape"&&(s(!1),u(""))}})]}),c.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[c.jsx(xe,{variant:"ghost",size:"sm",onClick:()=>{s(!1),u("")},children:n("common.cancel")}),c.jsx(xe,{variant:"destructive",size:"sm",disabled:i!=="delete all data"||f,onClick:y,children:n(f?"settings.resetting":"settings.resetUnderstand")})]})]})})]})]})}const O0=w.createContext(void 0),gp="gencow-theme";function H0(){return typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function qc(n){return n==="system"?H0():n}function Fc(n){const r=document.documentElement;r.classList.remove("light","dark"),r.classList.add(n)}function Xj({children:n,defaultTheme:r="dark"}){const[s,i]=w.useState(()=>typeof window>"u"?r:localStorage.getItem(gp)||r),[u,f]=w.useState(()=>qc(s)),m=w.useCallback(y=>{i(y),localStorage.setItem(gp,y);const g=qc(y);f(g),Fc(g)},[]);return w.useEffect(()=>{const y=qc(s);if(f(y),Fc(y),s==="system"){const g=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{const v=H0();f(v),Fc(v)};return g.addEventListener("change",h),()=>g.removeEventListener("change",h)}},[s]),c.jsx(O0.Provider,{value:{theme:s,setTheme:m,resolvedTheme:u},children:n})}function B0(){const n=w.useContext(O0);if(!n)throw new Error("useTheme must be used within a ThemeProvider");return n}function Qj(){const{theme:n,setTheme:r}=B0();return c.jsx(xe,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>r(n==="dark"?"light":"dark"),title:n==="dark"?"Switch to light mode":"Switch to dark mode",children:n==="dark"?c.jsx(ew,{className:"h-4 w-4"}):c.jsx(q2,{className:"h-4 w-4"})})}const Zj=[{path:"/status",labelKey:"app.nav.status",icon:eo},{path:"/analytics",labelKey:"app.nav.analytics",icon:ys,cloudOnly:!0},{path:"/data",labelKey:"app.nav.data",icon:$n},{path:"/functions",labelKey:"app.nav.functions",icon:Fa},{path:"/logs",labelKey:"app.nav.logs",icon:xs},{path:"/files",labelKey:"app.nav.files",icon:to},{path:"/jobs",labelKey:"app.nav.jobs",icon:ys},{path:"/auth",labelKey:"app.nav.auth",icon:N0},{path:"/hosting",labelKey:"app.nav.hosting",icon:fr,cloudOnly:!0},{path:"/backups",labelKey:"app.nav.backups",icon:v0,cloudOnly:!0},{path:"/settings",labelKey:"app.nav.settings",icon:_d}];function Jj({basePath:n="",hideLogo:r=!1,isCloud:s}){const i=sn().pathname,u=Je(),f=s??r,m=Zj.filter(y=>!y.cloudOnly||f);return c.jsxs("aside",{className:Me("flex flex-col bg-card",r?"flex-1":"h-screen w-60 border-r border-border"),children:[!r&&c.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-4 h-12",children:[c.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-primary",children:c.jsx(xl,{className:"h-4 w-4 text-primary-foreground"})}),c.jsxs("div",{children:[c.jsx("h1",{className:"text-sm font-bold",children:"Gencow"}),c.jsx("p",{className:"text-xs text-muted-foreground",children:u("app.nav.dashboard")})]})]}),c.jsx("nav",{className:"flex flex-1 flex-col gap-1 p-2",children:m.map(y=>{const g=`${n}${y.path}`,h=i.startsWith(g),v=y.icon;return c.jsxs(yd,{to:g,className:Me("flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",h?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[c.jsx(v,{className:"h-4 w-4"}),u(y.labelKey)]},y.path)})}),c.jsxs("div",{className:"border-t border-border p-3 space-y-2",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[c.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500"}),u("app.nav.connected")]}),c.jsx(Qj,{})]}),c.jsxs("button",{onClick:()=>window.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0})),className:"flex w-full items-center gap-2 rounded-md border border-border px-2.5 py-1.5 text-xs text-muted-foreground hover:bg-accent hover:text-foreground transition-colors",children:[c.jsx(co,{className:"h-3 w-3"}),c.jsx("span",{className:"flex-1 text-left",children:u("app.nav.search")}),c.jsx("kbd",{className:"rounded border border-border bg-muted px-1 text-[10px]",children:"⌘K"})]})]})]})}const pp=[{id:"data",label:"Go to Data",labelKey:"command.goToData",icon:$n,href:"/data",group:"Navigation",groupKey:"command.group.navigation"},{id:"functions",label:"Go to Functions",labelKey:"command.goToFunctions",icon:Fa,href:"/functions",group:"Navigation",groupKey:"command.group.navigation"},{id:"logs",label:"Go to Logs",labelKey:"command.goToLogs",icon:xs,href:"/logs",group:"Navigation",groupKey:"command.group.navigation"},{id:"files",label:"Go to File Storage",labelKey:"command.goToFiles",icon:to,href:"/files",group:"Navigation",groupKey:"command.group.navigation"},{id:"jobs",label:"Go to Jobs",labelKey:"command.goToJobs",icon:ys,href:"/jobs",group:"Navigation",groupKey:"command.group.navigation"},{id:"auth",label:"Go to Auth",labelKey:"command.goToAuth",icon:N0,href:"/auth",group:"Navigation",groupKey:"command.group.navigation"},{id:"status",label:"Go to Status",labelKey:"command.goToStatus",icon:eo,href:"/status",group:"Navigation",groupKey:"command.group.navigation"},{id:"analytics",label:"Go to Analytics",labelKey:"command.goToAnalytics",icon:ys,href:"/analytics",group:"Navigation",groupKey:"command.group.navigation"},{id:"settings",label:"Go to Settings",labelKey:"command.goToSettings",icon:_d,href:"/settings",group:"Navigation",groupKey:"command.group.navigation"}],Ij=[{id:"jobs-cron",label:"Go to Cron Jobs",labelKey:"command.goToCronJobs",icon:fa,href:"/jobs/cron",group:"Jobs",groupKey:"command.group.jobs"},{id:"jobs-workflows",label:"Go to Workflows",labelKey:"command.goToWorkflows",icon:dw,href:"/jobs/workflows",group:"Jobs",groupKey:"command.group.jobs"},{id:"jobs-queue",label:"Go to Queue",labelKey:"command.goToQueue",icon:xl,href:"/jobs/queue",group:"Jobs",groupKey:"command.group.jobs"},{id:"jobs-history",label:"Go to Job History",labelKey:"command.goToJobHistory",icon:M2,href:"/jobs/history",group:"Jobs",groupKey:"command.group.jobs"}];function Pj(n){const r=n.split("/").filter(Boolean),s=r[0]==="apps"&&r[1]?r[1]:"";if(!s)return pp;const i=`/apps/${s}`,u=pp.map(m=>({...m,href:`${i}${m.href}`})),f=Ij.map(m=>({...m,href:`${i}${m.href}`}));return[...u,...f]}function Wj(){const n=Je(),[r,s]=w.useState(!1),[i,u]=w.useState(""),[f,m]=w.useState(0),y=w.useRef(null),g=Ss(),h=sn(),v=w.useMemo(()=>Pj(h.pathname),[h.pathname]);w.useEffect(()=>{function N(M){(M.metaKey||M.ctrlKey)&&M.key==="k"&&(M.preventDefault(),s(E=>!E)),M.key==="Escape"&&s(!1)}return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[]),w.useEffect(()=>{r&&(u(""),m(0),setTimeout(()=>{var N;return(N=y.current)==null?void 0:N.focus()},50))},[r]);const x=w.useMemo(()=>{if(!i.trim())return v;const N=i.toLowerCase();return v.filter(M=>n(M.labelKey).toLowerCase().includes(N)||M.id.toLowerCase().includes(N))},[v,i,n]);w.useEffect(()=>{m(0)},[x.length]);const S=w.useCallback(N=>{s(!1),N.href&&g(N.href)},[g]);function j(N){N.key==="ArrowDown"?(N.preventDefault(),m(M=>Math.min(M+1,x.length-1))):N.key==="ArrowUp"?(N.preventDefault(),m(M=>Math.max(M-1,0))):N.key==="Enter"&&x[f]&&(N.preventDefault(),S(x[f]))}if(!r)return null;const C=new Map;for(const N of x){const M=n(N.groupKey),E=C.get(M)||[];E.push(N),C.set(M,E)}return c.jsxs("div",{className:"fixed inset-0 z-[100] flex items-start justify-center pt-[20vh]",onClick:()=>s(!1),children:[c.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm"}),c.jsxs("div",{className:"relative w-full max-w-lg rounded-xl border border-border bg-card shadow-2xl overflow-hidden",onClick:N=>N.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-4 py-3",children:[c.jsx(co,{className:"h-4 w-4 text-muted-foreground shrink-0"}),c.jsx("input",{ref:y,value:i,onChange:N=>u(N.target.value),onKeyDown:j,placeholder:n("command.placeholder"),className:"flex-1 bg-transparent text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",spellCheck:!1}),c.jsx("kbd",{className:"hidden sm:inline-flex items-center gap-0.5 rounded border border-border bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:"ESC"})]}),c.jsxs("div",{className:"max-h-72 overflow-auto p-2",children:[x.length===0&&c.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:n("command.noResults")}),Array.from(C.entries()).map(([N,M])=>c.jsxs("div",{children:[c.jsx("div",{className:"px-2 py-1.5 text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:N}),M.map(E=>{const L=x.indexOf(E),B=E.icon;return c.jsxs("button",{className:Me("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",L===f?"bg-primary/10 text-primary":"text-foreground hover:bg-accent"),onClick:()=>S(E),onMouseEnter:()=>m(L),children:[c.jsx(B,{className:"h-4 w-4 shrink-0"}),c.jsx("span",{children:n(E.labelKey)})]},E.id)})]},N))]}),c.jsxs("div",{className:"flex items-center justify-between border-t border-border px-4 py-2 text-[10px] text-muted-foreground",children:[c.jsxs("span",{children:["↑↓ ",n("command.navigate")]}),c.jsxs("span",{children:["↵ ",n("command.select")]}),c.jsxs("span",{children:["ESC ",n("command.close")]})]})]})]})}function eC(){const{resolvedTheme:n}=B0();return c.jsxs("div",{className:"flex h-screen bg-background text-foreground",children:[c.jsx(Jj,{}),c.jsx("main",{className:"flex-1 overflow-hidden",children:c.jsx(sb,{})}),c.jsx(Wj,{}),c.jsx(Gw,{theme:n,position:"bottom-right",richColors:!0,closeButton:!0,style:{zIndex:50},toastOptions:{style:{background:"var(--card)",border:"1px solid var(--border)",color:"var(--foreground)",opacity:1}}})]})}function tC(){return c.jsx(ob,{children:c.jsxs(Rn,{element:c.jsx(eC,{}),children:[c.jsx(Rn,{index:!0,element:c.jsx(rb,{to:"/data",replace:!0})}),c.jsx(Rn,{path:"data",element:c.jsx(CN,{})}),c.jsx(Rn,{path:"functions",element:c.jsx(ZN,{})}),c.jsx(Rn,{path:"logs",element:c.jsx(oj,{})}),c.jsx(Rn,{path:"files",element:c.jsx(Sj,{})}),c.jsx(Rn,{path:"jobs",element:c.jsx(Rj,{})}),c.jsx(Rn,{path:"auth",element:c.jsx(jj,{})}),c.jsx(Rn,{path:"settings",element:c.jsx(Yj,{})}),c.jsx(Rn,{path:"usage",element:c.jsx(Vj,{})})]})})}rv.createRoot(document.getElementById("root")).render(c.jsx(w.StrictMode,{children:c.jsx(Ab,{basename:"/_dashboard",children:c.jsx(Xj,{defaultTheme:"dark",children:c.jsx(tC,{})})})}));