@software-dlc/cli 0.168.8 → 0.169.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cli-snapshot.d.ts +9 -9
- package/dist/local/app-contract-readers.d.ts +10 -4
- package/dist/local/app-contract-readers.d.ts.map +1 -1
- package/dist/local/app-contract-readers.js +29 -7
- package/dist/local/app-contract-readers.js.map +1 -1
- package/dist/local/app-shell-readers.js +1 -1
- package/dist/local/app-shell-readers.js.map +1 -1
- package/dist/local/app-task-sections.d.ts +222 -0
- package/dist/local/app-task-sections.d.ts.map +1 -0
- package/dist/local/app-task-sections.js +286 -0
- package/dist/local/app-task-sections.js.map +1 -0
- package/dist/local/document-commands.d.ts +2 -2
- package/dist/local/health-store.d.ts +2 -2
- package/dist/local/source-evidence/schema.d.ts +6 -6
- package/dist/local/task-context-observations.d.ts +28 -28
- package/dist/local/task-context-schema.d.ts +2 -2
- package/dist/local/workspace-resolution.d.ts +2 -2
- package/dist/local/workspace-scope.d.ts +2 -2
- package/package.json +2 -2
- package/viewer/assets/index-DLgA2hHT.css +1 -0
- package/viewer/assets/index-DdcGT7zT.js +337 -0
- package/viewer/index.html +2 -2
- package/viewer/assets/index-C_hcpQvV.js +0 -292
- package/viewer/assets/index-qH2RBxhz.css +0 -1
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
function z_(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in e)){const r=Object.getOwnPropertyDescriptor(a,s);r&&Object.defineProperty(e,s,r.get?r:{enumerable:!0,get:()=>a[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ox(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cx={exports:{}},bc={};/**
|
|
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 $_=Symbol.for("react.transitional.element"),L_=Symbol.for("react.fragment");function ux(e,t,n){var a=null;if(n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),"key"in t){n={};for(var s in t)s!=="key"&&(n[s]=t[s])}else n=t;return t=n.ref,{$$typeof:$_,type:e,key:a,ref:t!==void 0?t:null,props:n}}bc.Fragment=L_;bc.jsx=ux;bc.jsxs=ux;cx.exports=bc;var l=cx.exports,dx={exports:{}},xe={};/**
|
|
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 Hf=Symbol.for("react.transitional.element"),U_=Symbol.for("react.portal"),H_=Symbol.for("react.fragment"),B_=Symbol.for("react.strict_mode"),q_=Symbol.for("react.profiler"),G_=Symbol.for("react.consumer"),V_=Symbol.for("react.context"),Y_=Symbol.for("react.forward_ref"),I_=Symbol.for("react.suspense"),P_=Symbol.for("react.memo"),fx=Symbol.for("react.lazy"),Lm=Symbol.iterator;function X_(e){return e===null||typeof e!="object"?null:(e=Lm&&e[Lm]||e["@@iterator"],typeof e=="function"?e:null)}var hx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mx=Object.assign,px={};function Ul(e,t,n){this.props=e,this.context=t,this.refs=px,this.updater=n||hx}Ul.prototype.isReactComponent={};Ul.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Ul.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function gx(){}gx.prototype=Ul.prototype;function Bf(e,t,n){this.props=e,this.context=t,this.refs=px,this.updater=n||hx}var qf=Bf.prototype=new gx;qf.constructor=Bf;mx(qf,Ul.prototype);qf.isPureReactComponent=!0;var Um=Array.isArray,Ge={H:null,A:null,T:null,S:null,V:null},xx=Object.prototype.hasOwnProperty;function Gf(e,t,n,a,s,r){return n=r.ref,{$$typeof:Hf,type:e,key:t,ref:n!==void 0?n:null,props:r}}function K_(e,t){return Gf(e.type,t,void 0,void 0,void 0,e.props)}function Vf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Hf}function Q_(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Hm=/\/+/g;function gu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Q_(""+e.key):t.toString(36)}function Bm(){}function Z_(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Bm,Bm):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Js(e,t,n,a,s){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(r){case"bigint":case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Hf:case U_:i=!0;break;case fx:return i=e._init,Js(i(e._payload),t,n,a,s)}}if(i)return s=s(e),i=a===""?"."+gu(e,0):a,Um(s)?(n="",i!=null&&(n=i.replace(Hm,"$&/")+"/"),Js(s,t,n,"",function(d){return d})):s!=null&&(Vf(s)&&(s=K_(s,n+(s.key==null||e&&e.key===s.key?"":(""+s.key).replace(Hm,"$&/")+"/")+i)),t.push(s)),1;i=0;var o=a===""?".":a+":";if(Um(e))for(var c=0;c<e.length;c++)a=e[c],r=o+gu(a,c),i+=Js(a,t,n,r,s);else if(c=X_(e),typeof c=="function")for(e=c.call(e),c=0;!(a=e.next()).done;)a=a.value,r=o+gu(a,c++),i+=Js(a,t,n,r,s);else if(r==="object"){if(typeof e.then=="function")return Js(Z_(e),t,n,a,s);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return i}function Li(e,t,n){if(e==null)return e;var a=[],s=0;return Js(e,a,"","",function(r){return t.call(n,r,s++)}),a}function F_(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var qm=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)};function W_(){}xe.Children={map:Li,forEach:function(e,t,n){Li(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Li(e,function(){t++}),t},toArray:function(e){return Li(e,function(t){return t})||[]},only:function(e){if(!Vf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};xe.Component=Ul;xe.Fragment=H_;xe.Profiler=q_;xe.PureComponent=Bf;xe.StrictMode=B_;xe.Suspense=I_;xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ge;xe.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ge.H.useMemoCache(e)}};xe.cache=function(e){return function(){return e.apply(null,arguments)}};xe.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=mx({},e.props),s=e.key,r=void 0;if(t!=null)for(i in t.ref!==void 0&&(r=void 0),t.key!==void 0&&(s=""+t.key),t)!xx.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(a[i]=t[i]);var i=arguments.length-2;if(i===1)a.children=n;else if(1<i){for(var o=Array(i),c=0;c<i;c++)o[c]=arguments[c+2];a.children=o}return Gf(e.type,s,void 0,void 0,r,a)};xe.createContext=function(e){return e={$$typeof:V_,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:G_,_context:e},e};xe.createElement=function(e,t,n){var a,s={},r=null;if(t!=null)for(a in t.key!==void 0&&(r=""+t.key),t)xx.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(s[a]=t[a]);var i=arguments.length-2;if(i===1)s.children=n;else if(1<i){for(var o=Array(i),c=0;c<i;c++)o[c]=arguments[c+2];s.children=o}if(e&&e.defaultProps)for(a in i=e.defaultProps,i)s[a]===void 0&&(s[a]=i[a]);return Gf(e,r,void 0,void 0,null,s)};xe.createRef=function(){return{current:null}};xe.forwardRef=function(e){return{$$typeof:Y_,render:e}};xe.isValidElement=Vf;xe.lazy=function(e){return{$$typeof:fx,_payload:{_status:-1,_result:e},_init:F_}};xe.memo=function(e,t){return{$$typeof:P_,type:e,compare:t===void 0?null:t}};xe.startTransition=function(e){var t=Ge.T,n={};Ge.T=n;try{var a=e(),s=Ge.S;s!==null&&s(n,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(W_,qm)}catch(r){qm(r)}finally{Ge.T=t}};xe.unstable_useCacheRefresh=function(){return Ge.H.useCacheRefresh()};xe.use=function(e){return Ge.H.use(e)};xe.useActionState=function(e,t,n){return Ge.H.useActionState(e,t,n)};xe.useCallback=function(e,t){return Ge.H.useCallback(e,t)};xe.useContext=function(e){return Ge.H.useContext(e)};xe.useDebugValue=function(){};xe.useDeferredValue=function(e,t){return Ge.H.useDeferredValue(e,t)};xe.useEffect=function(e,t,n){var a=Ge.H;if(typeof n=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return a.useEffect(e,t)};xe.useId=function(){return Ge.H.useId()};xe.useImperativeHandle=function(e,t,n){return Ge.H.useImperativeHandle(e,t,n)};xe.useInsertionEffect=function(e,t){return Ge.H.useInsertionEffect(e,t)};xe.useLayoutEffect=function(e,t){return Ge.H.useLayoutEffect(e,t)};xe.useMemo=function(e,t){return Ge.H.useMemo(e,t)};xe.useOptimistic=function(e,t){return Ge.H.useOptimistic(e,t)};xe.useReducer=function(e,t,n){return Ge.H.useReducer(e,t,n)};xe.useRef=function(e){return Ge.H.useRef(e)};xe.useState=function(e){return Ge.H.useState(e)};xe.useSyncExternalStore=function(e,t,n){return Ge.H.useSyncExternalStore(e,t,n)};xe.useTransition=function(){return Ge.H.useTransition()};xe.version="19.1.0";dx.exports=xe;var u=dx.exports;const Ra=ox(u),vx=z_({__proto__:null,default:Ra},[u]);var yx={exports:{}},jc={},bx={exports:{}},jx={};/**
|
|
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
|
+
*/(function(e){function t(E,B){var C=E.length;E.push(B);e:for(;0<C;){var L=C-1>>>1,P=E[L];if(0<s(P,B))E[L]=B,E[C]=P,C=L;else break e}}function n(E){return E.length===0?null:E[0]}function a(E){if(E.length===0)return null;var B=E[0],C=E.pop();if(C!==B){E[0]=C;e:for(var L=0,P=E.length,D=P>>>1;L<D;){var V=2*(L+1)-1,ne=E[V],Y=V+1,ve=E[Y];if(0>s(ne,C))Y<P&&0>s(ve,ne)?(E[L]=ve,E[Y]=C,L=Y):(E[L]=ne,E[V]=C,L=V);else if(Y<P&&0>s(ve,C))E[L]=ve,E[Y]=C,L=Y;else break e}}return B}function s(E,B){var C=E.sortIndex-B.sortIndex;return C!==0?C:E.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var c=[],d=[],f=1,h=null,m=3,x=!1,w=!1,v=!1,b=!1,g=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function j(E){for(var B=n(d);B!==null;){if(B.callback===null)a(d);else if(B.startTime<=E)a(d),B.sortIndex=B.expirationTime,t(c,B);else break;B=n(d)}}function _(E){if(v=!1,j(E),!w)if(n(c)!==null)w=!0,k||(k=!0,q());else{var B=n(d);B!==null&&G(_,B.startTime-E)}}var k=!1,N=-1,S=5,R=-1;function A(){return b?!0:!(e.unstable_now()-R<S)}function z(){if(b=!1,k){var E=e.unstable_now();R=E;var B=!0;try{e:{w=!1,v&&(v=!1,p(N),N=-1),x=!0;var C=m;try{t:{for(j(E),h=n(c);h!==null&&!(h.expirationTime>E&&A());){var L=h.callback;if(typeof L=="function"){h.callback=null,m=h.priorityLevel;var P=L(h.expirationTime<=E);if(E=e.unstable_now(),typeof P=="function"){h.callback=P,j(E),B=!0;break t}h===n(c)&&a(c),j(E)}else a(c);h=n(c)}if(h!==null)B=!0;else{var D=n(d);D!==null&&G(_,D.startTime-E),B=!1}}break e}finally{h=null,m=C,x=!1}B=void 0}}finally{B?q():k=!1}}}var q;if(typeof y=="function")q=function(){y(z)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,$=O.port2;O.port1.onmessage=z,q=function(){$.postMessage(null)}}else q=function(){g(z,0)};function G(E,B){N=g(function(){E(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(E){E.callback=null},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(E){switch(m){case 1:case 2:case 3:var B=3;break;default:B=m}var C=m;m=B;try{return E()}finally{m=C}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(E,B){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var C=m;m=E;try{return B()}finally{m=C}},e.unstable_scheduleCallback=function(E,B,C){var L=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?L+C:L):C=L,E){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=C+P,E={id:f++,callback:B,priorityLevel:E,startTime:C,expirationTime:P,sortIndex:-1},C>L?(E.sortIndex=C,t(d,E),n(c)===null&&E===n(d)&&(v?(p(N),N=-1):v=!0,G(_,C-L))):(E.sortIndex=P,t(c,E),w||x||(w=!0,k||(k=!0,q()))),E},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(E){var B=m;return function(){var C=m;m=B;try{return E.apply(this,arguments)}finally{m=C}}}})(jx);bx.exports=jx;var J_=bx.exports,wx={exports:{}},Dt={};/**
|
|
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 e1=u;function _x(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 ka(){}var Mt={d:{f:ka,r:function(){throw Error(_x(522))},D:ka,C:ka,L:ka,m:ka,X:ka,S:ka,M:ka},p:0,findDOMNode:null},t1=Symbol.for("react.portal");function n1(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:t1,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}var wr=e1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function wc(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Mt;Dt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(_x(299));return n1(e,t,null,n)};Dt.flushSync=function(e){var t=wr.T,n=Mt.p;try{if(wr.T=null,Mt.p=2,e)return e()}finally{wr.T=t,Mt.p=n,Mt.d.f()}};Dt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Mt.d.C(e,t))};Dt.prefetchDNS=function(e){typeof e=="string"&&Mt.d.D(e)};Dt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=wc(n,t.crossOrigin),s=typeof t.integrity=="string"?t.integrity:void 0,r=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Mt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:s,fetchPriority:r}):n==="script"&&Mt.d.X(e,{crossOrigin:a,integrity:s,fetchPriority:r,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Dt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=wc(t.as,t.crossOrigin);Mt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Mt.d.M(e)};Dt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,a=wc(n,t.crossOrigin);Mt.d.L(e,n,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Dt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=wc(t.as,t.crossOrigin);Mt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Mt.d.m(e)};Dt.requestFormReset=function(e){Mt.d.r(e)};Dt.unstable_batchedUpdates=function(e,t){return e(t)};Dt.useFormState=function(e,t,n){return wr.H.useFormState(e,t,n)};Dt.useFormStatus=function(){return wr.H.useHostTransitionStatus()};Dt.version="19.1.0";function Nx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Nx)}catch(e){console.error(e)}}Nx(),wx.exports=Dt;var Hl=wx.exports;const a1=ox(Hl);/**
|
|
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 ut=J_,Sx=u,s1=Hl;function U(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 kx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ai(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Cx(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 Gm(e){if(ai(e)!==e)throw Error(U(188))}function l1(e){var t=e.alternate;if(!t){if(t=ai(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,a=t;;){var s=n.return;if(s===null)break;var r=s.alternate;if(r===null){if(a=s.return,a!==null){n=a;continue}break}if(s.child===r.child){for(r=s.child;r;){if(r===n)return Gm(s),e;if(r===a)return Gm(s),t;r=r.sibling}throw Error(U(188))}if(n.return!==a.return)n=s,a=r;else{for(var i=!1,o=s.child;o;){if(o===n){i=!0,n=s,a=r;break}if(o===a){i=!0,a=s,n=r;break}o=o.sibling}if(!i){for(o=r.child;o;){if(o===n){i=!0,n=r,a=s;break}if(o===a){i=!0,a=r,n=s;break}o=o.sibling}if(!i)throw Error(U(189))}}if(n.alternate!==a)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function Tx(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Tx(e),t!==null)return t;e=e.sibling}return null}var Be=Object.assign,r1=Symbol.for("react.element"),Ui=Symbol.for("react.transitional.element"),fr=Symbol.for("react.portal"),al=Symbol.for("react.fragment"),Ex=Symbol.for("react.strict_mode"),yd=Symbol.for("react.profiler"),i1=Symbol.for("react.provider"),Rx=Symbol.for("react.consumer"),Jn=Symbol.for("react.context"),Yf=Symbol.for("react.forward_ref"),bd=Symbol.for("react.suspense"),jd=Symbol.for("react.suspense_list"),If=Symbol.for("react.memo"),Oa=Symbol.for("react.lazy"),wd=Symbol.for("react.activity"),o1=Symbol.for("react.memo_cache_sentinel"),Vm=Symbol.iterator;function tr(e){return e===null||typeof e!="object"?null:(e=Vm&&e[Vm]||e["@@iterator"],typeof e=="function"?e:null)}var c1=Symbol.for("react.client.reference");function _d(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===c1?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case al:return"Fragment";case yd:return"Profiler";case Ex:return"StrictMode";case bd:return"Suspense";case jd:return"SuspenseList";case wd:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case fr:return"Portal";case Jn:return(e.displayName||"Context")+".Provider";case Rx:return(e._context.displayName||"Context")+".Consumer";case Yf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case If:return t=e.displayName||null,t!==null?t:_d(e.type)||"Memo";case Oa:t=e._payload,e=e._init;try{return _d(e(t))}catch{}}return null}var hr=Array.isArray,re=Sx.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=s1.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,gs={pending:!1,data:null,method:null,action:null},Nd=[],sl=-1;function qn(e){return{current:e}}function gt(e){0>sl||(e.current=Nd[sl],Nd[sl]=null,sl--)}function Ve(e,t){sl++,Nd[sl]=e.current,e.current=t}var An=qn(null),Ur=qn(null),Va=qn(null),Ro=qn(null);function Ao(e,t){switch(Ve(Va,t),Ve(Ur,e),Ve(An,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kp(t),e=Xy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}gt(An),Ve(An,e)}function kl(){gt(An),gt(Ur),gt(Va)}function Sd(e){e.memoizedState!==null&&Ve(Ro,e);var t=An.current,n=Xy(t,e.type);t!==n&&(Ve(Ur,e),Ve(An,n))}function Mo(e){Ur.current===e&&(gt(An),gt(Ur)),Ro.current===e&&(gt(Ro),Kr._currentValue=gs)}var kd=Object.prototype.hasOwnProperty,Pf=ut.unstable_scheduleCallback,xu=ut.unstable_cancelCallback,u1=ut.unstable_shouldYield,d1=ut.unstable_requestPaint,Mn=ut.unstable_now,f1=ut.unstable_getCurrentPriorityLevel,Ax=ut.unstable_ImmediatePriority,Mx=ut.unstable_UserBlockingPriority,Oo=ut.unstable_NormalPriority,h1=ut.unstable_LowPriority,Ox=ut.unstable_IdlePriority,m1=ut.log,p1=ut.unstable_setDisableYieldValue,si=null,Kt=null;function Ha(e){if(typeof m1=="function"&&p1(e),Kt&&typeof Kt.setStrictMode=="function")try{Kt.setStrictMode(si,e)}catch{}}var Qt=Math.clz32?Math.clz32:v1,g1=Math.log,x1=Math.LN2;function v1(e){return e>>>=0,e===0?32:31-(g1(e)/x1|0)|0}var Hi=256,Bi=4194304;function ds(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:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;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 _c(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var s=0,r=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var o=a&134217727;return o!==0?(a=o&~r,a!==0?s=ds(a):(i&=o,i!==0?s=ds(i):n||(n=o&~e,n!==0&&(s=ds(n))))):(o=a&~r,o!==0?s=ds(o):i!==0?s=ds(i):n||(n=a&~e,n!==0&&(s=ds(n)))),s===0?0:t!==0&&t!==s&&!(t&r)&&(r=s&-s,n=t&-t,r>=n||r===32&&(n&4194048)!==0)?t:s}function li(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function y1(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 Dx(){var e=Hi;return Hi<<=1,!(Hi&4194048)&&(Hi=256),e}function zx(){var e=Bi;return Bi<<=1,!(Bi&62914560)&&(Bi=4194304),e}function vu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ri(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function b1(e,t,n,a,s,r){var i=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,c=e.expirationTimes,d=e.hiddenUpdates;for(n=i&~n;0<n;){var f=31-Qt(n),h=1<<f;o[f]=0,c[f]=-1;var m=d[f];if(m!==null)for(d[f]=null,f=0;f<m.length;f++){var x=m[f];x!==null&&(x.lane&=-536870913)}n&=~h}a!==0&&$x(e,a,0),r!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=r&~(i&~t))}function $x(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Qt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&4194090}function Lx(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Qt(n),s=1<<a;s&t|e[a]&t&&(e[a]|=t),n&=~s}}function Xf(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 Kf(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ux(){var e=Ee.p;return e!==0?e:(e=window.event,e===void 0?32:ab(e.type))}function j1(e,t){var n=Ee.p;try{return Ee.p=e,t()}finally{Ee.p=n}}var as=Math.random().toString(36).slice(2),Nt="__reactFiber$"+as,Bt="__reactProps$"+as,Bl="__reactContainer$"+as,Cd="__reactEvents$"+as,w1="__reactListeners$"+as,_1="__reactHandles$"+as,Ym="__reactResources$"+as,ii="__reactMarker$"+as;function Qf(e){delete e[Nt],delete e[Bt],delete e[Cd],delete e[w1],delete e[_1]}function ll(e){var t=e[Nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Bl]||n[Nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Fp(e);e!==null;){if(n=e[Nt])return n;e=Fp(e)}return t}e=n,n=e.parentNode}return null}function ql(e){if(e=e[Nt]||e[Bl]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function mr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(U(33))}function pl(e){var t=e[Ym];return t||(t=e[Ym]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[ii]=!0}var Hx=new Set,Bx={};function Ds(e,t){Cl(e,t),Cl(e+"Capture",t)}function Cl(e,t){for(Bx[e]=t,e=0;e<t.length;e++)Hx.add(t[e])}var N1=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]*$"),Im={},Pm={};function S1(e){return kd.call(Pm,e)?!0:kd.call(Im,e)?!1:N1.test(e)?Pm[e]=!0:(Im[e]=!0,!1)}function fo(e,t,n){if(S1(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function qi(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Xn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}var yu,Xm;function el(e){if(yu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);yu=t&&t[1]||"",Xm=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+yu+e+Xm}var bu=!1;function ju(e,t){if(!e||bu)return"";bu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(x){var m=x}Reflect.construct(e,[],h)}else{try{h.call()}catch(x){m=x}e.call(h.prototype)}}else{try{throw Error()}catch(x){m=x}(h=e())&&typeof h.catch=="function"&&h.catch(function(){})}}catch(x){if(x&&m&&typeof x.stack=="string")return[x.stack,m.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=a.DetermineComponentFrameRoot(),i=r[0],o=r[1];if(i&&o){var c=i.split(`
|
|
44
|
+
`),d=o.split(`
|
|
45
|
+
`);for(s=a=0;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;for(;s<d.length&&!d[s].includes("DetermineComponentFrameRoot");)s++;if(a===c.length||s===d.length)for(a=c.length-1,s=d.length-1;1<=a&&0<=s&&c[a]!==d[s];)s--;for(;1<=a&&0<=s;a--,s--)if(c[a]!==d[s]){if(a!==1||s!==1)do if(a--,s--,0>s||c[a]!==d[s]){var f=`
|
|
46
|
+
`+c[a].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=a&&0<=s);break}}}finally{bu=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?el(n):""}function k1(e){switch(e.tag){case 26:case 27:case 5:return el(e.type);case 16:return el("Lazy");case 13:return el("Suspense");case 19:return el("SuspenseList");case 0:case 15:return ju(e.type,!1);case 11:return ju(e.type.render,!1);case 1:return ju(e.type,!0);case 31:return el("Activity");default:return""}}function Km(e){try{var t="";do t+=k1(e),e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}function ln(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function C1(e){var t=qx(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){a=""+i,r.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(i){a=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Do(e){e._valueTracker||(e._valueTracker=C1(e))}function Gx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=qx(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function zo(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 T1=/[\n"\\]/g;function cn(e){return e.replace(T1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Td(e,t,n,a,s,r,i,o){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),t!=null?i==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ln(t)):e.value!==""+ln(t)&&(e.value=""+ln(t)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),t!=null?Ed(e,i,ln(t)):n!=null?Ed(e,i,ln(n)):a!=null&&e.removeAttribute("value"),s==null&&r!=null&&(e.defaultChecked=!!r),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+ln(o):e.removeAttribute("name")}function Vx(e,t,n,a,s,r,i,o){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||t!=null))return;n=n!=null?""+ln(n):"",t=t!=null?""+ln(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=o?e.checked:!!a,e.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i)}function Ed(e,t,n){t==="number"&&zo(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function gl(e,t,n,a){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&a&&(e[n].defaultSelected=!0)}else{for(n=""+ln(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Yx(e,t,n){if(t!=null&&(t=""+ln(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+ln(n):""}function Ix(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(U(92));if(hr(a)){if(1<a.length)throw Error(U(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=ln(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a)}function Tl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var E1=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 Qm(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||E1.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Px(e,t,n){if(t!=null&&typeof t!="object")throw Error(U(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&n[s]!==a&&Qm(e,s,a)}else for(var r in t)t.hasOwnProperty(r)&&Qm(e,r,t[r])}function Zf(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 R1=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"]]),A1=/^[\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 ho(e){return A1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Rd=null;function Ff(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rl=null,xl=null;function Zm(e){var t=ql(e);if(t&&(e=t.stateNode)){var n=e[Bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Td(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+cn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var s=a[Bt]||null;if(!s)throw Error(U(90));Td(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Gx(a)}break e;case"textarea":Yx(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&gl(e,!!n.multiple,t,!1)}}}var wu=!1;function Xx(e,t,n){if(wu)return e(t,n);wu=!0;try{var a=e(t);return a}finally{if(wu=!1,(rl!==null||xl!==null)&&(Oc(),rl&&(t=rl,e=xl,xl=rl=null,Zm(t),e)))for(t=0;t<e.length;t++)Zm(e[t])}}function Hr(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Bt]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ad=!1;if(oa)try{var nr={};Object.defineProperty(nr,"passive",{get:function(){Ad=!0}}),window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{Ad=!1}var Ba=null,Wf=null,mo=null;function Kx(){if(mo)return mo;var e,t=Wf,n=t.length,a,s="value"in Ba?Ba.value:Ba.textContent,r=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(a=1;a<=i&&t[n-a]===s[r-a];a++);return mo=s.slice(e,1<a?1-a:void 0)}function po(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 Gi(){return!0}function Fm(){return!1}function qt(e){function t(n,a,s,r,i){this._reactName=n,this._targetInst=s,this.type=a,this.nativeEvent=r,this.target=i,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(r):r[o]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Gi:Fm,this.isPropagationStopped=Fm,this}return Be(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Gi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Gi)},persist:function(){},isPersistent:Gi}),t}var zs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nc=qt(zs),oi=Be({},zs,{view:0,detail:0}),M1=qt(oi),_u,Nu,ar,Sc=Be({},oi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jf,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!==ar&&(ar&&e.type==="mousemove"?(_u=e.screenX-ar.screenX,Nu=e.screenY-ar.screenY):Nu=_u=0,ar=e),_u)},movementY:function(e){return"movementY"in e?e.movementY:Nu}}),Wm=qt(Sc),O1=Be({},Sc,{dataTransfer:0}),D1=qt(O1),z1=Be({},oi,{relatedTarget:0}),Su=qt(z1),$1=Be({},zs,{animationName:0,elapsedTime:0,pseudoElement:0}),L1=qt($1),U1=Be({},zs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),H1=qt(U1),B1=Be({},zs,{data:0}),Jm=qt(B1),q1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},G1={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"},V1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=V1[e])?!!t[e]:!1}function Jf(){return Y1}var I1=Be({},oi,{key:function(e){if(e.key){var t=q1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=po(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?G1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jf,charCode:function(e){return e.type==="keypress"?po(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?po(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),P1=qt(I1),X1=Be({},Sc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ep=qt(X1),K1=Be({},oi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jf}),Q1=qt(K1),Z1=Be({},zs,{propertyName:0,elapsedTime:0,pseudoElement:0}),F1=qt(Z1),W1=Be({},Sc,{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}),J1=qt(W1),eN=Be({},zs,{newState:0,oldState:0}),tN=qt(eN),nN=[9,13,27,32],eh=oa&&"CompositionEvent"in window,_r=null;oa&&"documentMode"in document&&(_r=document.documentMode);var aN=oa&&"TextEvent"in window&&!_r,Qx=oa&&(!eh||_r&&8<_r&&11>=_r),tp=" ",np=!1;function Zx(e,t){switch(e){case"keyup":return nN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var il=!1;function sN(e,t){switch(e){case"compositionend":return Fx(t);case"keypress":return t.which!==32?null:(np=!0,tp);case"textInput":return e=t.data,e===tp&&np?null:e;default:return null}}function lN(e,t){if(il)return e==="compositionend"||!eh&&Zx(e,t)?(e=Kx(),mo=Wf=Ba=null,il=!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 Qx&&t.locale!=="ko"?null:t.data;default:return null}}var rN={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 ap(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rN[e.type]:t==="textarea"}function Wx(e,t,n,a){rl?xl?xl.push(a):xl=[a]:rl=a,t=Jo(t,"onChange"),0<t.length&&(n=new Nc("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Nr=null,Br=null;function iN(e){Yy(e,0)}function kc(e){var t=mr(e);if(Gx(t))return e}function sp(e,t){if(e==="change")return t}var Jx=!1;if(oa){var ku;if(oa){var Cu="oninput"in document;if(!Cu){var lp=document.createElement("div");lp.setAttribute("oninput","return;"),Cu=typeof lp.oninput=="function"}ku=Cu}else ku=!1;Jx=ku&&(!document.documentMode||9<document.documentMode)}function rp(){Nr&&(Nr.detachEvent("onpropertychange",ev),Br=Nr=null)}function ev(e){if(e.propertyName==="value"&&kc(Br)){var t=[];Wx(t,Br,e,Ff(e)),Xx(iN,t)}}function oN(e,t,n){e==="focusin"?(rp(),Nr=t,Br=n,Nr.attachEvent("onpropertychange",ev)):e==="focusout"&&rp()}function cN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return kc(Br)}function uN(e,t){if(e==="click")return kc(t)}function dN(e,t){if(e==="input"||e==="change")return kc(t)}function fN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tn=typeof Object.is=="function"?Object.is:fN;function qr(e,t){if(tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var s=n[a];if(!kd.call(t,s)||!tn(e[s],t[s]))return!1}return!0}function ip(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function op(e,t){var n=ip(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ip(n)}}function tv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zo(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=zo(e.document)}return t}function th(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 hN=oa&&"documentMode"in document&&11>=document.documentMode,ol=null,Md=null,Sr=null,Od=!1;function cp(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Od||ol==null||ol!==zo(a)||(a=ol,"selectionStart"in a&&th(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Sr&&qr(Sr,a)||(Sr=a,a=Jo(Md,"onSelect"),0<a.length&&(t=new Nc("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=ol)))}function cs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var cl={animationend:cs("Animation","AnimationEnd"),animationiteration:cs("Animation","AnimationIteration"),animationstart:cs("Animation","AnimationStart"),transitionrun:cs("Transition","TransitionRun"),transitionstart:cs("Transition","TransitionStart"),transitioncancel:cs("Transition","TransitionCancel"),transitionend:cs("Transition","TransitionEnd")},Tu={},av={};oa&&(av=document.createElement("div").style,"AnimationEvent"in window||(delete cl.animationend.animation,delete cl.animationiteration.animation,delete cl.animationstart.animation),"TransitionEvent"in window||delete cl.transitionend.transition);function $s(e){if(Tu[e])return Tu[e];if(!cl[e])return e;var t=cl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in av)return Tu[e]=t[n];return e}var sv=$s("animationend"),lv=$s("animationiteration"),rv=$s("animationstart"),mN=$s("transitionrun"),pN=$s("transitionstart"),gN=$s("transitioncancel"),iv=$s("transitionend"),ov=new Map,Dd="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(" ");Dd.push("scrollEnd");function Nn(e,t){ov.set(e,t),Ds(t,[e])}var up=new WeakMap;function un(e,t){if(typeof e=="object"&&e!==null){var n=up.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Km(t)},up.set(e,t),t)}return{value:e,source:t,stack:Km(t)}}var sn=[],ul=0,nh=0;function Cc(){for(var e=ul,t=nh=ul=0;t<e;){var n=sn[t];sn[t++]=null;var a=sn[t];sn[t++]=null;var s=sn[t];sn[t++]=null;var r=sn[t];if(sn[t++]=null,a!==null&&s!==null){var i=a.pending;i===null?s.next=s:(s.next=i.next,i.next=s),a.pending=s}r!==0&&cv(n,s,r)}}function Tc(e,t,n,a){sn[ul++]=e,sn[ul++]=t,sn[ul++]=n,sn[ul++]=a,nh|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ah(e,t,n,a){return Tc(e,t,n,a),$o(e)}function Gl(e,t){return Tc(e,null,null,t),$o(e)}function cv(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var s=!1,r=e.return;r!==null;)r.childLanes|=n,a=r.alternate,a!==null&&(a.childLanes|=n),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(s=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,s&&t!==null&&(s=31-Qt(n),e=r.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=n|536870912),r):null}function $o(e){if(50<zr)throw zr=0,tf=null,Error(U(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var dl={};function xN(e,t,n,a){this.tag=e,this.key=n,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,t,n,a){return new xN(e,t,n,a)}function sh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ra(e,t){var n=e.alternate;return n===null?(n=Xt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function uv(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function go(e,t,n,a,s,r){var i=0;if(a=e,typeof e=="function")sh(e)&&(i=1);else if(typeof e=="string")i=yS(e,n,An.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case wd:return e=Xt(31,n,t,s),e.elementType=wd,e.lanes=r,e;case al:return xs(n.children,s,r,t);case Ex:i=8,s|=24;break;case yd:return e=Xt(12,n,t,s|2),e.elementType=yd,e.lanes=r,e;case bd:return e=Xt(13,n,t,s),e.elementType=bd,e.lanes=r,e;case jd:return e=Xt(19,n,t,s),e.elementType=jd,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case i1:case Jn:i=10;break e;case Rx:i=9;break e;case Yf:i=11;break e;case If:i=14;break e;case Oa:i=16,a=null;break e}i=29,n=Error(U(130,e===null?"null":typeof e,"")),a=null}return t=Xt(i,n,t,s),t.elementType=e,t.type=a,t.lanes=r,t}function xs(e,t,n,a){return e=Xt(7,e,a,t),e.lanes=n,e}function Eu(e,t,n){return e=Xt(6,e,null,t),e.lanes=n,e}function Ru(e,t,n){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fl=[],hl=0,Lo=null,Uo=0,rn=[],on=0,vs=null,ea=1,ta="";function fs(e,t){fl[hl++]=Uo,fl[hl++]=Lo,Lo=e,Uo=t}function dv(e,t,n){rn[on++]=ea,rn[on++]=ta,rn[on++]=vs,vs=e;var a=ea;e=ta;var s=32-Qt(a)-1;a&=~(1<<s),n+=1;var r=32-Qt(t)+s;if(30<r){var i=s-s%5;r=(a&(1<<i)-1).toString(32),a>>=i,s-=i,ea=1<<32-Qt(t)+s|n<<s|a,ta=r+e}else ea=1<<r|n<<s|a,ta=e}function lh(e){e.return!==null&&(fs(e,1),dv(e,1,0))}function rh(e){for(;e===Lo;)Lo=fl[--hl],fl[hl]=null,Uo=fl[--hl],fl[hl]=null;for(;e===vs;)vs=rn[--on],rn[on]=null,ta=rn[--on],rn[on]=null,ea=rn[--on],rn[on]=null}var At=null,Ke=null,Te=!1,ys=null,Cn=!1,zd=Error(U(519));function _s(e){var t=Error(U(418,""));throw Gr(un(t,e)),zd}function dp(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Nt]=e,t[Bt]=a,n){case"dialog":we("cancel",t),we("close",t);break;case"iframe":case"object":case"embed":we("load",t);break;case"video":case"audio":for(n=0;n<Ir.length;n++)we(Ir[n],t);break;case"source":we("error",t);break;case"img":case"image":case"link":we("error",t),we("load",t);break;case"details":we("toggle",t);break;case"input":we("invalid",t),Vx(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),Do(t);break;case"select":we("invalid",t);break;case"textarea":we("invalid",t),Ix(t,a.value,a.defaultValue,a.children),Do(t)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Py(t.textContent,n)?(a.popover!=null&&(we("beforetoggle",t),we("toggle",t)),a.onScroll!=null&&we("scroll",t),a.onScrollEnd!=null&&we("scrollend",t),a.onClick!=null&&(t.onclick=$c),t=!0):t=!1,t||_s(e)}function fp(e){for(At=e.return;At;)switch(At.tag){case 5:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:At=At.return}}function sr(e){if(e!==At)return!1;if(!Te)return fp(e),Te=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||of(e.type,e.memoizedProps)),n=!n),n&&Ke&&_s(e),fp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){Ke=vn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Ke=null}}else t===27?(t=Ke,ss(e.type)?(e=df,df=null,Ke=e):Ke=t):Ke=At?vn(e.stateNode.nextSibling):null;return!0}function ci(){Ke=At=null,Te=!1}function hp(){var e=ys;return e!==null&&(Ht===null?Ht=e:Ht.push.apply(Ht,e),ys=null),e}function Gr(e){ys===null?ys=[e]:ys.push(e)}var $d=qn(null),Ls=null,na=null;function za(e,t,n){Ve($d,t._currentValue),t._currentValue=n}function ia(e){e._currentValue=$d.current,gt($d)}function Ld(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Ud(e,t,n,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var r=s.dependencies;if(r!==null){var i=s.child;r=r.firstContext;e:for(;r!==null;){var o=r;r=s;for(var c=0;c<t.length;c++)if(o.context===t[c]){r.lanes|=n,o=r.alternate,o!==null&&(o.lanes|=n),Ld(r.return,n,e),a||(i=null);break e}r=o.next}}else if(s.tag===18){if(i=s.return,i===null)throw Error(U(341));i.lanes|=n,r=i.alternate,r!==null&&(r.lanes|=n),Ld(i,n,e),i=null}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===e){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}}function ui(e,t,n,a){e=null;for(var s=t,r=!1;s!==null;){if(!r){if(s.flags&524288)r=!0;else if(s.flags&262144)break}if(s.tag===10){var i=s.alternate;if(i===null)throw Error(U(387));if(i=i.memoizedProps,i!==null){var o=s.type;tn(s.pendingProps.value,i.value)||(e!==null?e.push(o):e=[o])}}else if(s===Ro.current){if(i=s.alternate,i===null)throw Error(U(387));i.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Kr):e=[Kr])}s=s.return}e!==null&&Ud(t,e,n,a),t.flags|=262144}function Ho(e){for(e=e.firstContext;e!==null;){if(!tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ns(e){Ls=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return fv(Ls,e)}function Vi(e,t){return Ls===null&&Ns(e),fv(e,t)}function fv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},na===null){if(e===null)throw Error(U(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return n}var vN=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},yN=ut.unstable_scheduleCallback,bN=ut.unstable_NormalPriority,it={$$typeof:Jn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ih(){return{controller:new vN,data:new Map,refCount:0}}function di(e){e.refCount--,e.refCount===0&&yN(bN,function(){e.controller.abort()})}var kr=null,Hd=0,El=0,vl=null;function jN(e,t){if(kr===null){var n=kr=[];Hd=0,El=Rh(),vl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Hd++,t.then(mp,mp),t}function mp(){if(--Hd===0&&kr!==null){vl!==null&&(vl.status="fulfilled");var e=kr;kr=null,El=0,vl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function wN(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(s){n.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<n.length;s++)(0,n[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<n.length;s++)(0,n[s])(void 0)}),a}var pp=re.S;re.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&jN(e,t),pp!==null&&pp(e,t)};var bs=qn(null);function oh(){var e=bs.current;return e!==null?e:He.pooledCache}function xo(e,t){t===null?Ve(bs,bs.current):Ve(bs,t.pool)}function hv(){var e=oh();return e===null?null:{parent:it._currentValue,pool:e}}var fi=Error(U(460)),mv=Error(U(474)),Ec=Error(U(542)),Bd={then:function(){}};function gp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yi(){}function pv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Yi,Yi),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vp(e),e;default:if(typeof t.status=="string")t.then(Yi,Yi);else{if(e=He,e!==null&&100<e.shellSuspendCounter)throw Error(U(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vp(e),e}throw Cr=t,fi}}var Cr=null;function xp(){if(Cr===null)throw Error(U(459));var e=Cr;return Cr=null,e}function vp(e){if(e===fi||e===Ec)throw Error(U(483))}var Da=!1;function ch(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qd(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 Ya(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,Ae&2){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=$o(e),cv(e,null,n),t}return Tc(e,a,t,n),$o(e)}function Tr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Lx(e,n)}}function Au(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var s=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?s=r=i:r=r.next=i,n=n.next}while(n!==null);r===null?s=r=t:r=r.next=t}else s=r=t;n={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:r,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Gd=!1;function Er(){if(Gd){var e=vl;if(e!==null)throw e}}function Rr(e,t,n,a){Gd=!1;var s=e.updateQueue;Da=!1;var r=s.firstBaseUpdate,i=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var c=o,d=c.next;c.next=null,i===null?r=d:i.next=d,i=c;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==i&&(o===null?f.firstBaseUpdate=d:o.next=d,f.lastBaseUpdate=c))}if(r!==null){var h=s.baseState;i=0,f=d=c=null,o=r;do{var m=o.lane&-536870913,x=m!==o.lane;if(x?(ke&m)===m:(a&m)===m){m!==0&&m===El&&(Gd=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var w=e,v=o;m=t;var b=n;switch(v.tag){case 1:if(w=v.payload,typeof w=="function"){h=w.call(b,h,m);break e}h=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,m=typeof w=="function"?w.call(b,h,m):w,m==null)break e;h=Be({},h,m);break e;case 2:Da=!0}}m=o.callback,m!==null&&(e.flags|=64,x&&(e.flags|=8192),x=s.callbacks,x===null?s.callbacks=[m]:x.push(m))}else x={lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(d=f=x,c=h):f=f.next=x,i|=m;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;x=o,o=x.next,x.next=null,s.lastBaseUpdate=x,s.shared.pending=null}}while(!0);f===null&&(c=h),s.baseState=c,s.firstBaseUpdate=d,s.lastBaseUpdate=f,r===null&&(s.shared.lanes=0),es|=i,e.lanes=i,e.memoizedState=h}}function gv(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function xv(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)gv(n[e],t)}var Rl=qn(null),Bo=qn(0);function yp(e,t){e=da,Ve(Bo,e),Ve(Rl,t),da=e|t.baseLanes}function Vd(){Ve(Bo,da),Ve(Rl,Rl.current)}function uh(){da=Bo.current,gt(Rl),gt(Bo)}var Wa=0,be=null,$e=null,nt=null,qo=!1,yl=!1,Ss=!1,Go=0,Vr=0,bl=null,_N=0;function We(){throw Error(U(321))}function dh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!tn(e[n],t[n]))return!1;return!0}function fh(e,t,n,a,s,r){return Wa=r,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,re.H=e===null||e.memoizedState===null?Kv:Qv,Ss=!1,r=n(a,s),Ss=!1,yl&&(r=yv(t,n,a,s)),vv(e),r}function vv(e){re.H=Vo;var t=$e!==null&&$e.next!==null;if(Wa=0,nt=$e=be=null,qo=!1,Vr=0,bl=null,t)throw Error(U(300));e===null||pt||(e=e.dependencies,e!==null&&Ho(e)&&(pt=!0))}function yv(e,t,n,a){be=e;var s=0;do{if(yl&&(bl=null),Vr=0,yl=!1,25<=s)throw Error(U(301));if(s+=1,nt=$e=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}re.H=RN,r=t(n,a)}while(yl);return r}function NN(){var e=re.H,t=e.useState()[0];return t=typeof t.then=="function"?hi(t):t,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(be.flags|=1024),t}function hh(){var e=Go!==0;return Go=0,e}function mh(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ph(e){if(qo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}qo=!1}Wa=0,nt=$e=be=null,yl=!1,Vr=Go=0,bl=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?be.memoizedState=nt=e:nt=nt.next=e,nt}function at(){if($e===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=nt===null?be.memoizedState:nt.next;if(t!==null)nt=t,$e=e;else{if(e===null)throw be.alternate===null?Error(U(467)):Error(U(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},nt===null?be.memoizedState=nt=e:nt=nt.next=e}return nt}function gh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hi(e){var t=Vr;return Vr+=1,bl===null&&(bl=[]),e=pv(bl,e,t),t=be,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,re.H=t===null||t.memoizedState===null?Kv:Qv),e}function Rc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return hi(e);if(e.$$typeof===Jn)return St(e)}throw Error(U(438,String(e)))}function xh(e){var t=null,n=be.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=be.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=gh(),be.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=o1;return t.index++,n}function ca(e,t){return typeof t=="function"?t(e):t}function vo(e){var t=at();return vh(t,$e,e)}function vh(e,t,n){var a=e.queue;if(a===null)throw Error(U(311));a.lastRenderedReducer=n;var s=e.baseQueue,r=a.pending;if(r!==null){if(s!==null){var i=s.next;s.next=r.next,r.next=i}t.baseQueue=s=r,a.pending=null}if(r=e.baseState,s===null)e.memoizedState=r;else{t=s.next;var o=i=null,c=null,d=t,f=!1;do{var h=d.lane&-536870913;if(h!==d.lane?(ke&h)===h:(Wa&h)===h){var m=d.revertLane;if(m===0)c!==null&&(c=c.next={lane:0,revertLane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),h===El&&(f=!0);else if((Wa&m)===m){d=d.next,m===El&&(f=!0);continue}else h={lane:0,revertLane:d.revertLane,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},c===null?(o=c=h,i=r):c=c.next=h,be.lanes|=m,es|=m;h=d.action,Ss&&n(r,h),r=d.hasEagerState?d.eagerState:n(r,h)}else m={lane:h,revertLane:d.revertLane,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},c===null?(o=c=m,i=r):c=c.next=m,be.lanes|=h,es|=h;d=d.next}while(d!==null&&d!==t);if(c===null?i=r:c.next=o,!tn(r,e.memoizedState)&&(pt=!0,f&&(n=vl,n!==null)))throw n;e.memoizedState=r,e.baseState=i,e.baseQueue=c,a.lastRenderedState=r}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Mu(e){var t=at(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var a=n.dispatch,s=n.pending,r=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do r=e(r,i.action),i=i.next;while(i!==s);tn(r,t.memoizedState)||(pt=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,a]}function bv(e,t,n){var a=be,s=at(),r=Te;if(r){if(n===void 0)throw Error(U(407));n=n()}else n=t();var i=!tn(($e||s).memoizedState,n);i&&(s.memoizedState=n,pt=!0),s=s.queue;var o=_v.bind(null,a,s,e);if(mi(2048,8,o,[e]),s.getSnapshot!==t||i||nt!==null&&nt.memoizedState.tag&1){if(a.flags|=2048,Al(9,Ac(),wv.bind(null,a,s,n,t),null),He===null)throw Error(U(349));r||Wa&124||jv(a,t,n)}return n}function jv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=be.updateQueue,t===null?(t=gh(),be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function wv(e,t,n,a){t.value=n,t.getSnapshot=a,Nv(t)&&Sv(e)}function _v(e,t,n){return n(function(){Nv(t)&&Sv(e)})}function Nv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tn(e,n)}catch{return!0}}function Sv(e){var t=Gl(e,2);t!==null&&Ft(t,e,2)}function Yd(e){var t=Lt();if(typeof e=="function"){var n=e;if(e=n(),Ss){Ha(!0);try{n()}finally{Ha(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e},t}function kv(e,t,n,a){return e.baseState=n,vh(e,$e,typeof a=="function"?a:ca)}function SN(e,t,n,a,s){if(Mc(e))throw Error(U(485));if(e=t.action,e!==null){var r={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){r.listeners.push(i)}};re.T!==null?n(!0):r.isTransition=!1,a(r),n=t.pending,n===null?(r.next=t.pending=r,Cv(t,r)):(r.next=n.next,t.pending=n.next=r)}}function Cv(e,t){var n=t.action,a=t.payload,s=e.state;if(t.isTransition){var r=re.T,i={};re.T=i;try{var o=n(s,a),c=re.S;c!==null&&c(i,o),bp(e,t,o)}catch(d){Id(e,t,d)}finally{re.T=r}}else try{r=n(s,a),bp(e,t,r)}catch(d){Id(e,t,d)}}function bp(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){jp(e,t,a)},function(a){return Id(e,t,a)}):jp(e,t,n)}function jp(e,t,n){t.status="fulfilled",t.value=n,Tv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Cv(e,n)))}function Id(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Tv(t),t=t.next;while(t!==a)}e.action=null}function Tv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ev(e,t){return t}function wp(e,t){if(Te){var n=He.formState;if(n!==null){e:{var a=be;if(Te){if(Ke){t:{for(var s=Ke,r=Cn;s.nodeType!==8;){if(!r){s=null;break t}if(s=vn(s.nextSibling),s===null){s=null;break t}}r=s.data,s=r==="F!"||r==="F"?s:null}if(s){Ke=vn(s.nextSibling),a=s.data==="F!";break e}}_s(a)}a=!1}a&&(t=n[0])}}return n=Lt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ev,lastRenderedState:t},n.queue=a,n=Iv.bind(null,be,a),a.dispatch=n,a=Yd(!1),r=wh.bind(null,be,!1,a.queue),a=Lt(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,n=SN.bind(null,be,s,r,n),s.dispatch=n,a.memoizedState=e,[t,n,!1]}function _p(e){var t=at();return Rv(t,$e,e)}function Rv(e,t,n){if(t=vh(e,t,Ev)[0],e=vo(ca)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=hi(t)}catch(i){throw i===fi?Ec:i}else a=t;t=at();var s=t.queue,r=s.dispatch;return n!==t.memoizedState&&(be.flags|=2048,Al(9,Ac(),kN.bind(null,s,n),null)),[a,r,e]}function kN(e,t){e.action=t}function Np(e){var t=at(),n=$e;if(n!==null)return Rv(t,n,e);at(),t=t.memoizedState,n=at();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Al(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=be.updateQueue,t===null&&(t=gh(),be.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Ac(){return{destroy:void 0,resource:void 0}}function Av(){return at().memoizedState}function yo(e,t,n,a){var s=Lt();a=a===void 0?null:a,be.flags|=e,s.memoizedState=Al(1|t,Ac(),n,a)}function mi(e,t,n,a){var s=at();a=a===void 0?null:a;var r=s.memoizedState.inst;$e!==null&&a!==null&&dh(a,$e.memoizedState.deps)?s.memoizedState=Al(t,r,n,a):(be.flags|=e,s.memoizedState=Al(1|t,r,n,a))}function Sp(e,t){yo(8390656,8,e,t)}function Mv(e,t){mi(2048,8,e,t)}function Ov(e,t){return mi(4,2,e,t)}function Dv(e,t){return mi(4,4,e,t)}function zv(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function $v(e,t,n){n=n!=null?n.concat([e]):null,mi(4,4,zv.bind(null,t,e),n)}function yh(){}function Lv(e,t){var n=at();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&dh(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Uv(e,t){var n=at();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&dh(t,a[1]))return a[0];if(a=e(),Ss){Ha(!0);try{e()}finally{Ha(!1)}}return n.memoizedState=[a,t],a}function bh(e,t,n){return n===void 0||Wa&1073741824?e.memoizedState=t:(e.memoizedState=n,e=Ty(),be.lanes|=e,es|=e,n)}function Hv(e,t,n,a){return tn(n,t)?n:Rl.current!==null?(e=bh(e,n,a),tn(e,t)||(pt=!0),e):Wa&42?(e=Ty(),be.lanes|=e,es|=e,t):(pt=!0,e.memoizedState=n)}function Bv(e,t,n,a,s){var r=Ee.p;Ee.p=r!==0&&8>r?r:8;var i=re.T,o={};re.T=o,wh(e,!1,t,n);try{var c=s(),d=re.S;if(d!==null&&d(o,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=wN(c,a);Ar(e,t,f,Zt(e))}else Ar(e,t,a,Zt(e))}catch(h){Ar(e,t,{then:function(){},status:"rejected",reason:h},Zt())}finally{Ee.p=r,re.T=i}}function CN(){}function Pd(e,t,n,a){if(e.tag!==5)throw Error(U(476));var s=qv(e).queue;Bv(e,s,t,gs,n===null?CN:function(){return Gv(e),n(a)})}function qv(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:gs,baseState:gs,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:gs},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Gv(e){var t=qv(e).next.queue;Ar(e,t,{},Zt())}function jh(){return St(Kr)}function Vv(){return at().memoizedState}function Yv(){return at().memoizedState}function TN(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Zt();e=Ya(n);var a=Ia(t,e,n);a!==null&&(Ft(a,t,n),Tr(a,t,n)),t={cache:ih()},e.payload=t;return}t=t.return}}function EN(e,t,n){var a=Zt();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Mc(e)?Pv(t,n):(n=ah(e,t,n,a),n!==null&&(Ft(n,e,a),Xv(n,t,a)))}function Iv(e,t,n){var a=Zt();Ar(e,t,n,a)}function Ar(e,t,n,a){var s={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Mc(e))Pv(t,s);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var i=t.lastRenderedState,o=r(i,n);if(s.hasEagerState=!0,s.eagerState=o,tn(o,i))return Tc(e,t,s,0),He===null&&Cc(),!1}catch{}finally{}if(n=ah(e,t,s,a),n!==null)return Ft(n,e,a),Xv(n,t,a),!0}return!1}function wh(e,t,n,a){if(a={lane:2,revertLane:Rh(),action:a,hasEagerState:!1,eagerState:null,next:null},Mc(e)){if(t)throw Error(U(479))}else t=ah(e,n,a,2),t!==null&&Ft(t,e,2)}function Mc(e){var t=e.alternate;return e===be||t!==null&&t===be}function Pv(e,t){yl=qo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xv(e,t,n){if(n&4194048){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Lx(e,n)}}var Vo={readContext:St,use:Rc,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useInsertionEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useSyncExternalStore:We,useId:We,useHostTransitionStatus:We,useFormState:We,useActionState:We,useOptimistic:We,useMemoCache:We,useCacheRefresh:We},Kv={readContext:St,use:Rc,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:Sp,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,yo(4194308,4,zv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return yo(4194308,4,e,t)},useInsertionEffect:function(e,t){yo(4,2,e,t)},useMemo:function(e,t){var n=Lt();t=t===void 0?null:t;var a=e();if(Ss){Ha(!0);try{e()}finally{Ha(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Lt();if(n!==void 0){var s=n(t);if(Ss){Ha(!0);try{n(t)}finally{Ha(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=EN.bind(null,be,e),[a.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=Yd(e);var t=e.queue,n=Iv.bind(null,be,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:yh,useDeferredValue:function(e,t){var n=Lt();return bh(n,e,t)},useTransition:function(){var e=Yd(!1);return e=Bv.bind(null,be,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=be,s=Lt();if(Te){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),He===null)throw Error(U(349));ke&124||jv(a,t,n)}s.memoizedState=n;var r={value:n,getSnapshot:t};return s.queue=r,Sp(_v.bind(null,a,r,e),[e]),a.flags|=2048,Al(9,Ac(),wv.bind(null,a,r,n,t),null),n},useId:function(){var e=Lt(),t=He.identifierPrefix;if(Te){var n=ta,a=ea;n=(a&~(1<<32-Qt(a)-1)).toString(32)+n,t="«"+t+"R"+n,n=Go++,0<n&&(t+="H"+n.toString(32)),t+="»"}else n=_N++,t="«"+t+"r"+n.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:jh,useFormState:wp,useActionState:wp,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=wh.bind(null,be,!0,n),n.dispatch=t,[e,t]},useMemoCache:xh,useCacheRefresh:function(){return Lt().memoizedState=TN.bind(null,be)}},Qv={readContext:St,use:Rc,useCallback:Lv,useContext:St,useEffect:Mv,useImperativeHandle:$v,useInsertionEffect:Ov,useLayoutEffect:Dv,useMemo:Uv,useReducer:vo,useRef:Av,useState:function(){return vo(ca)},useDebugValue:yh,useDeferredValue:function(e,t){var n=at();return Hv(n,$e.memoizedState,e,t)},useTransition:function(){var e=vo(ca)[0],t=at().memoizedState;return[typeof e=="boolean"?e:hi(e),t]},useSyncExternalStore:bv,useId:Vv,useHostTransitionStatus:jh,useFormState:_p,useActionState:_p,useOptimistic:function(e,t){var n=at();return kv(n,$e,e,t)},useMemoCache:xh,useCacheRefresh:Yv},RN={readContext:St,use:Rc,useCallback:Lv,useContext:St,useEffect:Mv,useImperativeHandle:$v,useInsertionEffect:Ov,useLayoutEffect:Dv,useMemo:Uv,useReducer:Mu,useRef:Av,useState:function(){return Mu(ca)},useDebugValue:yh,useDeferredValue:function(e,t){var n=at();return $e===null?bh(n,e,t):Hv(n,$e.memoizedState,e,t)},useTransition:function(){var e=Mu(ca)[0],t=at().memoizedState;return[typeof e=="boolean"?e:hi(e),t]},useSyncExternalStore:bv,useId:Vv,useHostTransitionStatus:jh,useFormState:Np,useActionState:Np,useOptimistic:function(e,t){var n=at();return $e!==null?kv(n,$e,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:xh,useCacheRefresh:Yv},jl=null,Yr=0;function Ii(e){var t=Yr;return Yr+=1,jl===null&&(jl=[]),pv(jl,e,t)}function lr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Pi(e,t){throw t.$$typeof===r1?Error(U(525)):(e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function kp(e){var t=e._init;return t(e._payload)}function Zv(e){function t(g,p){if(e){var y=g.deletions;y===null?(g.deletions=[p],g.flags|=16):y.push(p)}}function n(g,p){if(!e)return null;for(;p!==null;)t(g,p),p=p.sibling;return null}function a(g){for(var p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function s(g,p){return g=ra(g,p),g.index=0,g.sibling=null,g}function r(g,p,y){return g.index=y,e?(y=g.alternate,y!==null?(y=y.index,y<p?(g.flags|=67108866,p):y):(g.flags|=67108866,p)):(g.flags|=1048576,p)}function i(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function o(g,p,y,j){return p===null||p.tag!==6?(p=Eu(y,g.mode,j),p.return=g,p):(p=s(p,y),p.return=g,p)}function c(g,p,y,j){var _=y.type;return _===al?f(g,p,y.props.children,j,y.key):p!==null&&(p.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Oa&&kp(_)===p.type)?(p=s(p,y.props),lr(p,y),p.return=g,p):(p=go(y.type,y.key,y.props,null,g.mode,j),lr(p,y),p.return=g,p)}function d(g,p,y,j){return p===null||p.tag!==4||p.stateNode.containerInfo!==y.containerInfo||p.stateNode.implementation!==y.implementation?(p=Ru(y,g.mode,j),p.return=g,p):(p=s(p,y.children||[]),p.return=g,p)}function f(g,p,y,j,_){return p===null||p.tag!==7?(p=xs(y,g.mode,j,_),p.return=g,p):(p=s(p,y),p.return=g,p)}function h(g,p,y){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return p=Eu(""+p,g.mode,y),p.return=g,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Ui:return y=go(p.type,p.key,p.props,null,g.mode,y),lr(y,p),y.return=g,y;case fr:return p=Ru(p,g.mode,y),p.return=g,p;case Oa:var j=p._init;return p=j(p._payload),h(g,p,y)}if(hr(p)||tr(p))return p=xs(p,g.mode,y,null),p.return=g,p;if(typeof p.then=="function")return h(g,Ii(p),y);if(p.$$typeof===Jn)return h(g,Vi(g,p),y);Pi(g,p)}return null}function m(g,p,y,j){var _=p!==null?p.key:null;if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return _!==null?null:o(g,p,""+y,j);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ui:return y.key===_?c(g,p,y,j):null;case fr:return y.key===_?d(g,p,y,j):null;case Oa:return _=y._init,y=_(y._payload),m(g,p,y,j)}if(hr(y)||tr(y))return _!==null?null:f(g,p,y,j,null);if(typeof y.then=="function")return m(g,p,Ii(y),j);if(y.$$typeof===Jn)return m(g,p,Vi(g,y),j);Pi(g,y)}return null}function x(g,p,y,j,_){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return g=g.get(y)||null,o(p,g,""+j,_);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Ui:return g=g.get(j.key===null?y:j.key)||null,c(p,g,j,_);case fr:return g=g.get(j.key===null?y:j.key)||null,d(p,g,j,_);case Oa:var k=j._init;return j=k(j._payload),x(g,p,y,j,_)}if(hr(j)||tr(j))return g=g.get(y)||null,f(p,g,j,_,null);if(typeof j.then=="function")return x(g,p,y,Ii(j),_);if(j.$$typeof===Jn)return x(g,p,y,Vi(p,j),_);Pi(p,j)}return null}function w(g,p,y,j){for(var _=null,k=null,N=p,S=p=0,R=null;N!==null&&S<y.length;S++){N.index>S?(R=N,N=null):R=N.sibling;var A=m(g,N,y[S],j);if(A===null){N===null&&(N=R);break}e&&N&&A.alternate===null&&t(g,N),p=r(A,p,S),k===null?_=A:k.sibling=A,k=A,N=R}if(S===y.length)return n(g,N),Te&&fs(g,S),_;if(N===null){for(;S<y.length;S++)N=h(g,y[S],j),N!==null&&(p=r(N,p,S),k===null?_=N:k.sibling=N,k=N);return Te&&fs(g,S),_}for(N=a(N);S<y.length;S++)R=x(N,g,S,y[S],j),R!==null&&(e&&R.alternate!==null&&N.delete(R.key===null?S:R.key),p=r(R,p,S),k===null?_=R:k.sibling=R,k=R);return e&&N.forEach(function(z){return t(g,z)}),Te&&fs(g,S),_}function v(g,p,y,j){if(y==null)throw Error(U(151));for(var _=null,k=null,N=p,S=p=0,R=null,A=y.next();N!==null&&!A.done;S++,A=y.next()){N.index>S?(R=N,N=null):R=N.sibling;var z=m(g,N,A.value,j);if(z===null){N===null&&(N=R);break}e&&N&&z.alternate===null&&t(g,N),p=r(z,p,S),k===null?_=z:k.sibling=z,k=z,N=R}if(A.done)return n(g,N),Te&&fs(g,S),_;if(N===null){for(;!A.done;S++,A=y.next())A=h(g,A.value,j),A!==null&&(p=r(A,p,S),k===null?_=A:k.sibling=A,k=A);return Te&&fs(g,S),_}for(N=a(N);!A.done;S++,A=y.next())A=x(N,g,S,A.value,j),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?S:A.key),p=r(A,p,S),k===null?_=A:k.sibling=A,k=A);return e&&N.forEach(function(q){return t(g,q)}),Te&&fs(g,S),_}function b(g,p,y,j){if(typeof y=="object"&&y!==null&&y.type===al&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ui:e:{for(var _=y.key;p!==null;){if(p.key===_){if(_=y.type,_===al){if(p.tag===7){n(g,p.sibling),j=s(p,y.props.children),j.return=g,g=j;break e}}else if(p.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Oa&&kp(_)===p.type){n(g,p.sibling),j=s(p,y.props),lr(j,y),j.return=g,g=j;break e}n(g,p);break}else t(g,p);p=p.sibling}y.type===al?(j=xs(y.props.children,g.mode,j,y.key),j.return=g,g=j):(j=go(y.type,y.key,y.props,null,g.mode,j),lr(j,y),j.return=g,g=j)}return i(g);case fr:e:{for(_=y.key;p!==null;){if(p.key===_)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(g,p.sibling),j=s(p,y.children||[]),j.return=g,g=j;break e}else{n(g,p);break}else t(g,p);p=p.sibling}j=Ru(y,g.mode,j),j.return=g,g=j}return i(g);case Oa:return _=y._init,y=_(y._payload),b(g,p,y,j)}if(hr(y))return w(g,p,y,j);if(tr(y)){if(_=tr(y),typeof _!="function")throw Error(U(150));return y=_.call(y),v(g,p,y,j)}if(typeof y.then=="function")return b(g,p,Ii(y),j);if(y.$$typeof===Jn)return b(g,p,Vi(g,y),j);Pi(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,p!==null&&p.tag===6?(n(g,p.sibling),j=s(p,y),j.return=g,g=j):(n(g,p),j=Eu(y,g.mode,j),j.return=g,g=j),i(g)):n(g,p)}return function(g,p,y,j){try{Yr=0;var _=b(g,p,y,j);return jl=null,_}catch(N){if(N===fi||N===Ec)throw N;var k=Xt(29,N,null,g.mode);return k.lanes=j,k.return=g,k}finally{}}}var Ml=Zv(!0),Fv=Zv(!1),hn=qn(null),On=null;function $a(e){var t=e.alternate;Ve(ot,ot.current&1),Ve(hn,e),On===null&&(t===null||Rl.current!==null||t.memoizedState!==null)&&(On=e)}function Wv(e){if(e.tag===22){if(Ve(ot,ot.current),Ve(hn,e),On===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(On=e)}}else La()}function La(){Ve(ot,ot.current),Ve(hn,hn.current)}function aa(e){gt(hn),On===e&&(On=null),gt(ot)}var ot=qn(0);function Yo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||uf(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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}function Ou(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Be({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Xd={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Zt(),s=Ya(a);s.payload=t,n!=null&&(s.callback=n),t=Ia(e,s,a),t!==null&&(Ft(t,e,a),Tr(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Zt(),s=Ya(a);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Ia(e,s,a),t!==null&&(Ft(t,e,a),Tr(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Zt(),a=Ya(n);a.tag=2,t!=null&&(a.callback=t),t=Ia(e,a,n),t!==null&&(Ft(t,e,n),Tr(t,e,n))}};function Cp(e,t,n,a,s,r,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,r,i):t.prototype&&t.prototype.isPureReactComponent?!qr(n,a)||!qr(s,r):!0}function Tp(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Xd.enqueueReplaceState(t,t.state,null)}function ks(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=Be({},n));for(var s in e)n[s]===void 0&&(n[s]=e[s])}return n}var Io=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)};function Jv(e){Io(e)}function ey(e){console.error(e)}function ty(e){Io(e)}function Po(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Ep(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Kd(e,t,n){return n=Ya(n),n.tag=3,n.payload={element:null},n.callback=function(){Po(e,t)},n}function ny(e){return e=Ya(e),e.tag=3,e}function ay(e,t,n,a){var s=n.type.getDerivedStateFromError;if(typeof s=="function"){var r=a.value;e.payload=function(){return s(r)},e.callback=function(){Ep(t,n,a)}}var i=n.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){Ep(t,n,a),typeof s!="function"&&(Pa===null?Pa=new Set([this]):Pa.add(this));var o=a.stack;this.componentDidCatch(a.value,{componentStack:o!==null?o:""})})}function AN(e,t,n,a,s){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&ui(t,n,s,!0),n=hn.current,n!==null){switch(n.tag){case 13:return On===null?nf():n.alternate===null&&Ze===0&&(Ze=3),n.flags&=-257,n.flags|=65536,n.lanes=s,a===Bd?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Yu(e,a,s)),!1;case 22:return n.flags|=65536,a===Bd?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Yu(e,a,s)),!1}throw Error(U(435,n.tag))}return Yu(e,a,s),nf(),!1}if(Te)return t=hn.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==zd&&(e=Error(U(422),{cause:a}),Gr(un(e,n)))):(a!==zd&&(t=Error(U(423),{cause:a}),Gr(un(t,n))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=un(a,n),s=Kd(e.stateNode,a,s),Au(e,s),Ze!==4&&(Ze=2)),!1;var r=Error(U(520),{cause:a});if(r=un(r,n),Dr===null?Dr=[r]:Dr.push(r),Ze!==4&&(Ze=2),t===null)return!0;a=un(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=s&-s,n.lanes|=e,e=Kd(n.stateNode,a,e),Au(n,e),!1;case 1:if(t=n.type,r=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Pa===null||!Pa.has(r))))return n.flags|=65536,s&=-s,n.lanes|=s,s=ny(s),ay(s,e,n,a),Au(n,s),!1}n=n.return}while(n!==null);return!1}var sy=Error(U(461)),pt=!1;function vt(e,t,n,a){t.child=e===null?Fv(t,null,n,a):Ml(t,e.child,n,a)}function Rp(e,t,n,a,s){n=n.render;var r=t.ref;if("ref"in a){var i={};for(var o in a)o!=="ref"&&(i[o]=a[o])}else i=a;return Ns(t),a=fh(e,t,n,i,r,s),o=hh(),e!==null&&!pt?(mh(e,t,s),ua(e,t,s)):(Te&&o&&lh(t),t.flags|=1,vt(e,t,a,s),t.child)}function Ap(e,t,n,a,s){if(e===null){var r=n.type;return typeof r=="function"&&!sh(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,ly(e,t,r,a,s)):(e=go(n.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!_h(e,s)){var i=r.memoizedProps;if(n=n.compare,n=n!==null?n:qr,n(i,a)&&e.ref===t.ref)return ua(e,t,s)}return t.flags|=1,e=ra(r,a),e.ref=t.ref,e.return=t,t.child=e}function ly(e,t,n,a,s){if(e!==null){var r=e.memoizedProps;if(qr(r,a)&&e.ref===t.ref)if(pt=!1,t.pendingProps=a=r,_h(e,s))e.flags&131072&&(pt=!0);else return t.lanes=e.lanes,ua(e,t,s)}return Qd(e,t,n,a,s)}function ry(e,t,n){var a=t.pendingProps,s=a.children,r=e!==null?e.memoizedState:null;if(a.mode==="hidden"){if(t.flags&128){if(a=r!==null?r.baseLanes|n:n,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;t.childLanes=r&~a}else t.childLanes=0,t.child=null;return Mp(e,t,a,n)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&xo(t,r!==null?r.cachePool:null),r!==null?yp(t,r):Vd(),Wv(t);else return t.lanes=t.childLanes=536870912,Mp(e,t,r!==null?r.baseLanes|n:n,n)}else r!==null?(xo(t,r.cachePool),yp(t,r),La(),t.memoizedState=null):(e!==null&&xo(t,null),Vd(),La());return vt(e,t,s,n),t.child}function Mp(e,t,n,a){var s=oh();return s=s===null?null:{parent:it._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&xo(t,null),Vd(),Wv(t),e!==null&&ui(e,t,a,!0),null}function bo(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(U(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Qd(e,t,n,a,s){return Ns(t),n=fh(e,t,n,a,void 0,s),a=hh(),e!==null&&!pt?(mh(e,t,s),ua(e,t,s)):(Te&&a&&lh(t),t.flags|=1,vt(e,t,n,s),t.child)}function Op(e,t,n,a,s,r){return Ns(t),t.updateQueue=null,n=yv(t,a,n,s),vv(e),a=hh(),e!==null&&!pt?(mh(e,t,r),ua(e,t,r)):(Te&&a&&lh(t),t.flags|=1,vt(e,t,n,r),t.child)}function Dp(e,t,n,a,s){if(Ns(t),t.stateNode===null){var r=dl,i=n.contextType;typeof i=="object"&&i!==null&&(r=St(i)),r=new n(a,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Xd,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=a,r.state=t.memoizedState,r.refs={},ch(t),i=n.contextType,r.context=typeof i=="object"&&i!==null?St(i):dl,r.state=t.memoizedState,i=n.getDerivedStateFromProps,typeof i=="function"&&(Ou(t,n,i,a),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(i=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),i!==r.state&&Xd.enqueueReplaceState(r,r.state,null),Rr(t,a,r,s),Er(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){r=t.stateNode;var o=t.memoizedProps,c=ks(n,o);r.props=c;var d=r.context,f=n.contextType;i=dl,typeof f=="object"&&f!==null&&(i=St(f));var h=n.getDerivedStateFromProps;f=typeof h=="function"||typeof r.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,f||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(o||d!==i)&&Tp(t,r,a,i),Da=!1;var m=t.memoizedState;r.state=m,Rr(t,a,r,s),Er(),d=t.memoizedState,o||m!==d||Da?(typeof h=="function"&&(Ou(t,n,h,a),d=t.memoizedState),(c=Da||Cp(t,n,c,a,m,d,i))?(f||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=d),r.props=a,r.state=d,r.context=i,a=c):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{r=t.stateNode,qd(e,t),i=t.memoizedProps,f=ks(n,i),r.props=f,h=t.pendingProps,m=r.context,d=n.contextType,c=dl,typeof d=="object"&&d!==null&&(c=St(d)),o=n.getDerivedStateFromProps,(d=typeof o=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(i!==h||m!==c)&&Tp(t,r,a,c),Da=!1,m=t.memoizedState,r.state=m,Rr(t,a,r,s),Er();var x=t.memoizedState;i!==h||m!==x||Da||e!==null&&e.dependencies!==null&&Ho(e.dependencies)?(typeof o=="function"&&(Ou(t,n,o,a),x=t.memoizedState),(f=Da||Cp(t,n,f,a,m,x,c)||e!==null&&e.dependencies!==null&&Ho(e.dependencies))?(d||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(a,x,c),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(a,x,c)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||i===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=x),r.props=a,r.state=x,r.context=c,a=f):(typeof r.componentDidUpdate!="function"||i===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),a=!1)}return r=a,bo(e,t),a=(t.flags&128)!==0,r||a?(r=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&a?(t.child=Ml(t,e.child,null,s),t.child=Ml(t,null,n,s)):vt(e,t,n,s),t.memoizedState=r.state,e=t.child):e=ua(e,t,s),e}function zp(e,t,n,a){return ci(),t.flags|=256,vt(e,t,n,a),t.child}var Du={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zu(e){return{baseLanes:e,cachePool:hv()}}function $u(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=dn),e}function iy(e,t,n){var a=t.pendingProps,s=!1,r=(t.flags&128)!==0,i;if((i=r)||(i=e!==null&&e.memoizedState===null?!1:(ot.current&2)!==0),i&&(s=!0,t.flags&=-129),i=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(s?$a(t):La(),Te){var o=Ke,c;if(c=o){e:{for(c=o,o=Cn;c.nodeType!==8;){if(!o){o=null;break e}if(c=vn(c.nextSibling),c===null){o=null;break e}}o=c}o!==null?(t.memoizedState={dehydrated:o,treeContext:vs!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},c=Xt(18,null,null,0),c.stateNode=o,c.return=t,t.child=c,At=t,Ke=null,c=!0):c=!1}c||_s(t)}if(o=t.memoizedState,o!==null&&(o=o.dehydrated,o!==null))return uf(o)?t.lanes=32:t.lanes=536870912,null;aa(t)}return o=a.children,a=a.fallback,s?(La(),s=t.mode,o=Xo({mode:"hidden",children:o},s),a=xs(a,s,n,null),o.return=t,a.return=t,o.sibling=a,t.child=o,s=t.child,s.memoizedState=zu(n),s.childLanes=$u(e,i,n),t.memoizedState=Du,a):($a(t),Zd(t,o))}if(c=e.memoizedState,c!==null&&(o=c.dehydrated,o!==null)){if(r)t.flags&256?($a(t),t.flags&=-257,t=Lu(e,t,n)):t.memoizedState!==null?(La(),t.child=e.child,t.flags|=128,t=null):(La(),s=a.fallback,o=t.mode,a=Xo({mode:"visible",children:a.children},o),s=xs(s,o,n,null),s.flags|=2,a.return=t,s.return=t,a.sibling=s,t.child=a,Ml(t,e.child,null,n),a=t.child,a.memoizedState=zu(n),a.childLanes=$u(e,i,n),t.memoizedState=Du,t=s);else if($a(t),uf(o)){if(i=o.nextSibling&&o.nextSibling.dataset,i)var d=i.dgst;i=d,a=Error(U(419)),a.stack="",a.digest=i,Gr({value:a,source:null,stack:null}),t=Lu(e,t,n)}else if(pt||ui(e,t,n,!1),i=(n&e.childLanes)!==0,pt||i){if(i=He,i!==null&&(a=n&-n,a=a&42?1:Xf(a),a=a&(i.suspendedLanes|n)?0:a,a!==0&&a!==c.retryLane))throw c.retryLane=a,Gl(e,a),Ft(i,e,a),sy;o.data==="$?"||nf(),t=Lu(e,t,n)}else o.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,Ke=vn(o.nextSibling),At=t,Te=!0,ys=null,Cn=!1,e!==null&&(rn[on++]=ea,rn[on++]=ta,rn[on++]=vs,ea=e.id,ta=e.overflow,vs=t),t=Zd(t,a.children),t.flags|=4096);return t}return s?(La(),s=a.fallback,o=t.mode,c=e.child,d=c.sibling,a=ra(c,{mode:"hidden",children:a.children}),a.subtreeFlags=c.subtreeFlags&65011712,d!==null?s=ra(d,s):(s=xs(s,o,n,null),s.flags|=2),s.return=t,a.return=t,a.sibling=s,t.child=a,a=s,s=t.child,o=e.child.memoizedState,o===null?o=zu(n):(c=o.cachePool,c!==null?(d=it._currentValue,c=c.parent!==d?{parent:d,pool:d}:c):c=hv(),o={baseLanes:o.baseLanes|n,cachePool:c}),s.memoizedState=o,s.childLanes=$u(e,i,n),t.memoizedState=Du,a):($a(t),n=e.child,e=n.sibling,n=ra(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=n,t.memoizedState=null,n)}function Zd(e,t){return t=Xo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Xo(e,t){return e=Xt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Lu(e,t,n){return Ml(t,e.child,null,n),e=Zd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $p(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Ld(e.return,t,n)}function Uu(e,t,n,a,s){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:s}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=a,r.tail=n,r.tailMode=s)}function oy(e,t,n){var a=t.pendingProps,s=a.revealOrder,r=a.tail;if(vt(e,t,a.children,n),a=ot.current,a&2)a=a&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$p(e,n,t);else if(e.tag===19)$p(e,n,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}a&=1}switch(Ve(ot,a),s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Yo(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Uu(t,!1,s,n,r);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Yo(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Uu(t,!0,n,null,r);break;case"together":Uu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ua(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),es|=t.lanes,!(n&t.childLanes))if(e!==null){if(ui(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=ra(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ra(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _h(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Ho(e)))}function MN(e,t,n){switch(t.tag){case 3:Ao(t,t.stateNode.containerInfo),za(t,it,e.memoizedState.cache),ci();break;case 27:case 5:Sd(t);break;case 4:Ao(t,t.stateNode.containerInfo);break;case 10:za(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?($a(t),t.flags|=128,null):n&t.child.childLanes?iy(e,t,n):($a(t),e=ua(e,t,n),e!==null?e.sibling:null);$a(t);break;case 19:var s=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(ui(e,t,n,!1),a=(n&t.childLanes)!==0),s){if(a)return oy(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ve(ot,ot.current),a)break;return null;case 22:case 23:return t.lanes=0,ry(e,t,n);case 24:za(t,it,e.memoizedState.cache)}return ua(e,t,n)}function cy(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)pt=!0;else{if(!_h(e,n)&&!(t.flags&128))return pt=!1,MN(e,t,n);pt=!!(e.flags&131072)}else pt=!1,Te&&t.flags&1048576&&dv(t,Uo,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,s=a._init;if(a=s(a._payload),t.type=a,typeof a=="function")sh(a)?(e=ks(a,e),t.tag=1,t=Dp(null,t,a,e,n)):(t.tag=0,t=Qd(null,t,a,e,n));else{if(a!=null){if(s=a.$$typeof,s===Yf){t.tag=11,t=Rp(null,t,a,e,n);break e}else if(s===If){t.tag=14,t=Ap(null,t,a,e,n);break e}}throw t=_d(a)||a,Error(U(306,t,""))}}return t;case 0:return Qd(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,s=ks(a,t.pendingProps),Dp(e,t,a,s,n);case 3:e:{if(Ao(t,t.stateNode.containerInfo),e===null)throw Error(U(387));a=t.pendingProps;var r=t.memoizedState;s=r.element,qd(e,t),Rr(t,a,null,n);var i=t.memoizedState;if(a=i.cache,za(t,it,a),a!==r.cache&&Ud(t,[it],n,!0),Er(),a=i.element,r.isDehydrated)if(r={element:a,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=zp(e,t,a,n);break e}else if(a!==s){s=un(Error(U(424)),t),Gr(s),t=zp(e,t,a,n);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(Ke=vn(e.firstChild),At=t,Te=!0,ys=null,Cn=!0,n=Fv(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ci(),a===s){t=ua(e,t,n);break e}vt(e,t,a,n)}t=t.child}return t;case 26:return bo(e,t),e===null?(n=Jp(t.type,null,t.pendingProps,null))?t.memoizedState=n:Te||(n=t.type,e=t.pendingProps,a=ec(Va.current).createElement(n),a[Nt]=t,a[Bt]=e,bt(a,n,e),mt(a),t.stateNode=a):t.memoizedState=Jp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Sd(t),e===null&&Te&&(a=t.stateNode=Qy(t.type,t.pendingProps,Va.current),At=t,Cn=!0,s=Ke,ss(t.type)?(df=s,Ke=vn(a.firstChild)):Ke=s),vt(e,t,t.pendingProps.children,n),bo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((s=a=Ke)&&(a=rS(a,t.type,t.pendingProps,Cn),a!==null?(t.stateNode=a,At=t,Ke=vn(a.firstChild),Cn=!1,s=!0):s=!1),s||_s(t)),Sd(t),s=t.type,r=t.pendingProps,i=e!==null?e.memoizedProps:null,a=r.children,of(s,r)?a=null:i!==null&&of(s,i)&&(t.flags|=32),t.memoizedState!==null&&(s=fh(e,t,NN,null,null,n),Kr._currentValue=s),bo(e,t),vt(e,t,a,n),t.child;case 6:return e===null&&Te&&((e=n=Ke)&&(n=iS(n,t.pendingProps,Cn),n!==null?(t.stateNode=n,At=t,Ke=null,e=!0):e=!1),e||_s(t)),null;case 13:return iy(e,t,n);case 4:return Ao(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ml(t,null,a,n):vt(e,t,a,n),t.child;case 11:return Rp(e,t,t.type,t.pendingProps,n);case 7:return vt(e,t,t.pendingProps,n),t.child;case 8:return vt(e,t,t.pendingProps.children,n),t.child;case 12:return vt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,za(t,t.type,a.value),vt(e,t,a.children,n),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,Ns(t),s=St(s),a=a(s),t.flags|=1,vt(e,t,a,n),t.child;case 14:return Ap(e,t,t.type,t.pendingProps,n);case 15:return ly(e,t,t.type,t.pendingProps,n);case 19:return oy(e,t,n);case 31:return a=t.pendingProps,n=t.mode,a={mode:a.mode,children:a.children},e===null?(n=Xo(a,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=ra(e.child,a),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return ry(e,t,n);case 24:return Ns(t),a=St(it),e===null?(s=oh(),s===null&&(s=He,r=ih(),s.pooledCache=r,r.refCount++,r!==null&&(s.pooledCacheLanes|=n),s=r),t.memoizedState={parent:a,cache:s},ch(t),za(t,it,s)):(e.lanes&n&&(qd(e,t),Rr(t,null,null,n),Er()),s=e.memoizedState,r=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),za(t,it,a)):(a=r.cache,za(t,it,a),a!==s.cache&&Ud(t,[it],n,!0))),vt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(U(156,t.tag))}function Kn(e){e.flags|=4}function Lp(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wy(t)){if(t=hn.current,t!==null&&((ke&4194048)===ke?On!==null:(ke&62914560)!==ke&&!(ke&536870912)||t!==On))throw Cr=Bd,mv;e.flags|=8192}}function Xi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?zx():536870912,e.lanes|=t,Ol|=t)}function rr(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function ON(e,t,n){var a=t.pendingProps;switch(rh(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Pe(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ia(it),kl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(sr(t)?Kn(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,hp())),Pe(t),null;case 26:return n=t.memoizedState,e===null?(Kn(t),n!==null?(Pe(t),Lp(t,n)):(Pe(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Kn(t),Pe(t),Lp(t,n)):(Pe(t),t.flags&=-16777217):(e.memoizedProps!==a&&Kn(t),Pe(t),t.flags&=-16777217),null;case 27:Mo(t),n=Va.current;var s=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Kn(t);else{if(!a){if(t.stateNode===null)throw Error(U(166));return Pe(t),null}e=An.current,sr(t)?dp(t):(e=Qy(s,a,n),t.stateNode=e,Kn(t))}return Pe(t),null;case 5:if(Mo(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Kn(t);else{if(!a){if(t.stateNode===null)throw Error(U(166));return Pe(t),null}if(e=An.current,sr(t))dp(t);else{switch(s=ec(Va.current),e){case 1:e=s.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=s.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?s.createElement(n,{is:a.is}):s.createElement(n)}}e[Nt]=t,e[Bt]=a;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=e;e:switch(bt(e,n,a),n){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Kn(t)}}return Pe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Kn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(U(166));if(e=Va.current,sr(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,s=At,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Py(e.nodeValue,n)),e||_s(t)}else e=ec(e).createTextNode(a),e[Nt]=t,t.stateNode=e}return Pe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=sr(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(U(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(U(317));s[Nt]=t}else ci(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pe(t),s=!1}else s=hp(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(aa(t),t):(aa(t),null)}if(aa(t),t.flags&128)return t.lanes=n,t;if(n=a!==null,e=e!==null&&e.memoizedState!==null,n){a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool);var r=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==s&&(a.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Xi(t,t.updateQueue),Pe(t),null;case 4:return kl(),e===null&&Ah(t.stateNode.containerInfo),Pe(t),null;case 10:return ia(t.type),Pe(t),null;case 19:if(gt(ot),s=t.memoizedState,s===null)return Pe(t),null;if(a=(t.flags&128)!==0,r=s.rendering,r===null)if(a)rr(s,!1);else{if(Ze!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(r=Yo(e),r!==null){for(t.flags|=128,rr(s,!1),e=r.updateQueue,t.updateQueue=e,Xi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)uv(n,e),n=n.sibling;return Ve(ot,ot.current&1|2),t.child}e=e.sibling}s.tail!==null&&Mn()>Qo&&(t.flags|=128,a=!0,rr(s,!1),t.lanes=4194304)}else{if(!a)if(e=Yo(r),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Xi(t,e),rr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!r.alternate&&!Te)return Pe(t),null}else 2*Mn()-s.renderingStartTime>Qo&&n!==536870912&&(t.flags|=128,a=!0,rr(s,!1),t.lanes=4194304);s.isBackwards?(r.sibling=t.child,t.child=r):(e=s.last,e!==null?e.sibling=r:t.child=r,s.last=r)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Mn(),t.sibling=null,e=ot.current,Ve(ot,a?e&1|2:e&1),t):(Pe(t),null);case 22:case 23:return aa(t),uh(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?n&536870912&&!(t.flags&128)&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),n=t.updateQueue,n!==null&&Xi(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&>(bs),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ia(it),Pe(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function DN(e,t){switch(rh(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ia(it),kl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Mo(t),null;case 13:if(aa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));ci()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return gt(ot),null;case 4:return kl(),null;case 10:return ia(t.type),null;case 22:case 23:return aa(t),uh(),e!==null&>(bs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ia(it),null;case 25:return null;default:return null}}function uy(e,t){switch(rh(t),t.tag){case 3:ia(it),kl();break;case 26:case 27:case 5:Mo(t);break;case 4:kl();break;case 13:aa(t);break;case 19:gt(ot);break;case 10:ia(t.type);break;case 22:case 23:aa(t),uh(),e!==null&>(bs);break;case 24:ia(it)}}function pi(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var s=a.next;n=s;do{if((n.tag&e)===e){a=void 0;var r=n.create,i=n.inst;a=r(),i.destroy=a}n=n.next}while(n!==s)}}catch(o){Le(t,t.return,o)}}function Ja(e,t,n){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var r=s.next;a=r;do{if((a.tag&e)===e){var i=a.inst,o=i.destroy;if(o!==void 0){i.destroy=void 0,s=t;var c=n,d=o;try{d()}catch(f){Le(s,c,f)}}}a=a.next}while(a!==r)}}catch(f){Le(t,t.return,f)}}function dy(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{xv(t,n)}catch(a){Le(e,e.return,a)}}}function fy(e,t,n){n.props=ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Le(e,t,a)}}function Mr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(s){Le(e,t,s)}}function En(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(s){Le(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(s){Le(e,t,s)}else n.current=null}function hy(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(s){Le(e,e.return,s)}}function Hu(e,t,n){try{var a=e.stateNode;tS(a,e.type,n,t),a[Bt]=t}catch(s){Le(e,e.return,s)}}function my(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ss(e.type)||e.tag===4}function Bu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||my(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&&ss(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 Fd(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=$c));else if(a!==4&&(a===27&&ss(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Fd(e,t,n),e=e.sibling;e!==null;)Fd(e,t,n),e=e.sibling}function Ko(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&ss(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ko(e,t,n),e=e.sibling;e!==null;)Ko(e,t,n),e=e.sibling}function py(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);bt(t,a,n),t[Nt]=e,t[Bt]=n}catch(r){Le(e,e.return,r)}}var Wn=!1,Je=!1,qu=!1,Up=typeof WeakSet=="function"?WeakSet:Set,ht=null;function zN(e,t){if(e=e.containerInfo,lf=sc,e=nv(e),th(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var s=a.anchorOffset,r=a.focusNode;a=a.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break e}var i=0,o=-1,c=-1,d=0,f=0,h=e,m=null;t:for(;;){for(var x;h!==n||s!==0&&h.nodeType!==3||(o=i+s),h!==r||a!==0&&h.nodeType!==3||(c=i+a),h.nodeType===3&&(i+=h.nodeValue.length),(x=h.firstChild)!==null;)m=h,h=x;for(;;){if(h===e)break t;if(m===n&&++d===s&&(o=i),m===r&&++f===a&&(c=i),(x=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=x}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(rf={focusedElem:e,selectionRange:n},sc=!1,ht=t;ht!==null;)if(t=ht,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,ht=e;else for(;ht!==null;){switch(t=ht,r=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if(e&1024&&r!==null){e=void 0,n=t,s=r.memoizedProps,r=r.memoizedState,a=n.stateNode;try{var w=ks(n.type,s,n.elementType===n.type);e=a.getSnapshotBeforeUpdate(w,r),a.__reactInternalSnapshotBeforeUpdate=e}catch(v){Le(n,n.return,v)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)cf(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(U(163))}if(e=t.sibling,e!==null){e.return=t.return,ht=e;break}ht=t.return}}function gy(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Ca(e,n),a&4&&pi(5,n);break;case 1:if(Ca(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(i){Le(n,n.return,i)}else{var s=ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){Le(n,n.return,i)}}a&64&&dy(n),a&512&&Mr(n,n.return);break;case 3:if(Ca(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{xv(e,t)}catch(i){Le(n,n.return,i)}}break;case 27:t===null&&a&4&&py(n);case 26:case 5:Ca(e,n),t===null&&a&4&&hy(n),a&512&&Mr(n,n.return);break;case 12:Ca(e,n);break;case 13:Ca(e,n),a&4&&yy(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=YN.bind(null,n),oS(e,n))));break;case 22:if(a=n.memoizedState!==null||Wn,!a){t=t!==null&&t.memoizedState!==null||Je,s=Wn;var r=Je;Wn=a,(Je=t)&&!r?Aa(e,n,(n.subtreeFlags&8772)!==0):Ca(e,n),Wn=s,Je=r}break;case 30:break;default:Ca(e,n)}}function xy(e){var t=e.alternate;t!==null&&(e.alternate=null,xy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Qf(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 qe=null,Ut=!1;function Qn(e,t,n){for(n=n.child;n!==null;)vy(e,t,n),n=n.sibling}function vy(e,t,n){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(si,n)}catch{}switch(n.tag){case 26:Je||En(n,t),Qn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Je||En(n,t);var a=qe,s=Ut;ss(n.type)&&(qe=n.stateNode,Ut=!1),Qn(e,t,n),$r(n.stateNode),qe=a,Ut=s;break;case 5:Je||En(n,t);case 6:if(a=qe,s=Ut,qe=null,Qn(e,t,n),qe=a,Ut=s,qe!==null)if(Ut)try{(qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe).removeChild(n.stateNode)}catch(r){Le(n,t,r)}else try{qe.removeChild(n.stateNode)}catch(r){Le(n,t,r)}break;case 18:qe!==null&&(Ut?(e=qe,Zp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Fr(e)):Zp(qe,n.stateNode));break;case 4:a=qe,s=Ut,qe=n.stateNode.containerInfo,Ut=!0,Qn(e,t,n),qe=a,Ut=s;break;case 0:case 11:case 14:case 15:Je||Ja(2,n,t),Je||Ja(4,n,t),Qn(e,t,n);break;case 1:Je||(En(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&fy(n,t,a)),Qn(e,t,n);break;case 21:Qn(e,t,n);break;case 22:Je=(a=Je)||n.memoizedState!==null,Qn(e,t,n),Je=a;break;default:Qn(e,t,n)}}function yy(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fr(e)}catch(n){Le(t,t.return,n)}}function $N(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Up),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Up),t;default:throw Error(U(435,e.tag))}}function Gu(e,t){var n=$N(e);t.forEach(function(a){var s=IN.bind(null,e,a);n.has(a)||(n.add(a),a.then(s,s))})}function Vt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var s=n[a],r=e,i=t,o=i;e:for(;o!==null;){switch(o.tag){case 27:if(ss(o.type)){qe=o.stateNode,Ut=!1;break e}break;case 5:qe=o.stateNode,Ut=!1;break e;case 3:case 4:qe=o.stateNode.containerInfo,Ut=!0;break e}o=o.return}if(qe===null)throw Error(U(160));vy(r,i,s),qe=null,Ut=!1,r=s.alternate,r!==null&&(r.return=null),s.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)by(t,e),t=t.sibling}var gn=null;function by(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Vt(t,e),Yt(e),a&4&&(Ja(3,e,e.return),pi(3,e),Ja(5,e,e.return));break;case 1:Vt(t,e),Yt(e),a&512&&(Je||n===null||En(n,n.return)),a&64&&Wn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var s=gn;if(Vt(t,e),Yt(e),a&512&&(Je||n===null||En(n,n.return)),a&4){var r=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":r=s.getElementsByTagName("title")[0],(!r||r[ii]||r[Nt]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=s.createElement(a),s.head.insertBefore(r,s.querySelector("head > title"))),bt(r,a,n),r[Nt]=e,mt(r),a=r;break e;case"link":var i=tg("link","href",s).get(a+(n.href||""));if(i){for(var o=0;o<i.length;o++)if(r=i[o],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){i.splice(o,1);break t}}r=s.createElement(a),bt(r,a,n),s.head.appendChild(r);break;case"meta":if(i=tg("meta","content",s).get(a+(n.content||""))){for(o=0;o<i.length;o++)if(r=i[o],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){i.splice(o,1);break t}}r=s.createElement(a),bt(r,a,n),s.head.appendChild(r);break;default:throw Error(U(468,a))}r[Nt]=e,mt(r),a=r}e.stateNode=a}else ng(s,e.type,e.stateNode);else e.stateNode=eg(s,a,e.memoizedProps);else r!==a?(r===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):r.count--,a===null?ng(s,e.type,e.stateNode):eg(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Hu(e,e.memoizedProps,n.memoizedProps)}break;case 27:Vt(t,e),Yt(e),a&512&&(Je||n===null||En(n,n.return)),n!==null&&a&4&&Hu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Vt(t,e),Yt(e),a&512&&(Je||n===null||En(n,n.return)),e.flags&32){s=e.stateNode;try{Tl(s,"")}catch(x){Le(e,e.return,x)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,Hu(e,s,n!==null?n.memoizedProps:s)),a&1024&&(qu=!0);break;case 6:if(Vt(t,e),Yt(e),a&4){if(e.stateNode===null)throw Error(U(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(x){Le(e,e.return,x)}}break;case 3:if(_o=null,s=gn,gn=tc(t.containerInfo),Vt(t,e),gn=s,Yt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Fr(t.containerInfo)}catch(x){Le(e,e.return,x)}qu&&(qu=!1,jy(e));break;case 4:a=gn,gn=tc(e.stateNode.containerInfo),Vt(t,e),Yt(e),gn=a;break;case 12:Vt(t,e),Yt(e);break;case 13:Vt(t,e),Yt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Th=Mn()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Gu(e,a)));break;case 22:s=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,d=Wn,f=Je;if(Wn=d||s,Je=f||c,Vt(t,e),Je=f,Wn=d,Yt(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(n===null||c||Wn||Je||hs(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(r=c.stateNode,s)i=r.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{o=c.stateNode;var h=c.memoizedProps.style,m=h!=null&&h.hasOwnProperty("display")?h.display:null;o.style.display=m==null||typeof m=="boolean"?"":(""+m).trim()}}catch(x){Le(c,c.return,x)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=s?"":c.memoizedProps}catch(x){Le(c,c.return,x)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Gu(e,n))));break;case 19:Vt(t,e),Yt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Gu(e,a)));break;case 30:break;case 21:break;default:Vt(t,e),Yt(e)}}function Yt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(my(a)){n=a;break}a=a.return}if(n==null)throw Error(U(160));switch(n.tag){case 27:var s=n.stateNode,r=Bu(e);Ko(e,r,s);break;case 5:var i=n.stateNode;n.flags&32&&(Tl(i,""),n.flags&=-33);var o=Bu(e);Ko(e,o,i);break;case 3:case 4:var c=n.stateNode.containerInfo,d=Bu(e);Fd(e,d,c);break;default:throw Error(U(161))}}catch(f){Le(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jy(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ca(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gy(e,t.alternate,t),t=t.sibling}function hs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ja(4,t,t.return),hs(t);break;case 1:En(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&fy(t,t.return,n),hs(t);break;case 27:$r(t.stateNode);case 26:case 5:En(t,t.return),hs(t);break;case 22:t.memoizedState===null&&hs(t);break;case 30:hs(t);break;default:hs(t)}e=e.sibling}}function Aa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,r=t,i=r.flags;switch(r.tag){case 0:case 11:case 15:Aa(s,r,n),pi(4,r);break;case 1:if(Aa(s,r,n),a=r,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(d){Le(a,a.return,d)}if(a=r,s=a.updateQueue,s!==null){var o=a.stateNode;try{var c=s.shared.hiddenCallbacks;if(c!==null)for(s.shared.hiddenCallbacks=null,s=0;s<c.length;s++)gv(c[s],o)}catch(d){Le(a,a.return,d)}}n&&i&64&&dy(r),Mr(r,r.return);break;case 27:py(r);case 26:case 5:Aa(s,r,n),n&&a===null&&i&4&&hy(r),Mr(r,r.return);break;case 12:Aa(s,r,n);break;case 13:Aa(s,r,n),n&&i&4&&yy(s,r);break;case 22:r.memoizedState===null&&Aa(s,r,n),Mr(r,r.return);break;case 30:break;default:Aa(s,r,n)}t=t.sibling}}function Nh(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&di(n))}function Sh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&di(e))}function kn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wy(e,t,n,a),t=t.sibling}function wy(e,t,n,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:kn(e,t,n,a),s&2048&&pi(9,t);break;case 1:kn(e,t,n,a);break;case 3:kn(e,t,n,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&di(e)));break;case 12:if(s&2048){kn(e,t,n,a),e=t.stateNode;try{var r=t.memoizedProps,i=r.id,o=r.onPostCommit;typeof o=="function"&&o(i,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){Le(t,t.return,c)}}else kn(e,t,n,a);break;case 13:kn(e,t,n,a);break;case 23:break;case 22:r=t.stateNode,i=t.alternate,t.memoizedState!==null?r._visibility&2?kn(e,t,n,a):Or(e,t):r._visibility&2?kn(e,t,n,a):(r._visibility|=2,tl(e,t,n,a,(t.subtreeFlags&10256)!==0)),s&2048&&Nh(i,t);break;case 24:kn(e,t,n,a),s&2048&&Sh(t.alternate,t);break;default:kn(e,t,n,a)}}function tl(e,t,n,a,s){for(s=s&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var r=e,i=t,o=n,c=a,d=i.flags;switch(i.tag){case 0:case 11:case 15:tl(r,i,o,c,s),pi(8,i);break;case 23:break;case 22:var f=i.stateNode;i.memoizedState!==null?f._visibility&2?tl(r,i,o,c,s):Or(r,i):(f._visibility|=2,tl(r,i,o,c,s)),s&&d&2048&&Nh(i.alternate,i);break;case 24:tl(r,i,o,c,s),s&&d&2048&&Sh(i.alternate,i);break;default:tl(r,i,o,c,s)}t=t.sibling}}function Or(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,s=a.flags;switch(a.tag){case 22:Or(n,a),s&2048&&Nh(a.alternate,a);break;case 24:Or(n,a),s&2048&&Sh(a.alternate,a);break;default:Or(n,a)}t=t.sibling}}var pr=8192;function Ys(e){if(e.subtreeFlags&pr)for(e=e.child;e!==null;)_y(e),e=e.sibling}function _y(e){switch(e.tag){case 26:Ys(e),e.flags&pr&&e.memoizedState!==null&&jS(gn,e.memoizedState,e.memoizedProps);break;case 5:Ys(e);break;case 3:case 4:var t=gn;gn=tc(e.stateNode.containerInfo),Ys(e),gn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=pr,pr=16777216,Ys(e),pr=t):Ys(e));break;default:Ys(e)}}function Ny(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 ir(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ht=a,ky(a,e)}Ny(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Sy(e),e=e.sibling}function Sy(e){switch(e.tag){case 0:case 11:case 15:ir(e),e.flags&2048&&Ja(9,e,e.return);break;case 3:ir(e);break;case 12:ir(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,jo(e)):ir(e);break;default:ir(e)}}function jo(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ht=a,ky(a,e)}Ny(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ja(8,t,t.return),jo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,jo(t));break;default:jo(t)}e=e.sibling}}function ky(e,t){for(;ht!==null;){var n=ht;switch(n.tag){case 0:case 11:case 15:Ja(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:di(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,ht=a;else e:for(n=e;ht!==null;){a=ht;var s=a.sibling,r=a.return;if(xy(a),a===n){ht=null;break e}if(s!==null){s.return=r,ht=s;break e}ht=r}}}var LN={getCacheForType:function(e){var t=St(it),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},UN=typeof WeakMap=="function"?WeakMap:Map,Ae=0,He=null,_e=null,ke=0,Re=0,It=null,qa=!1,Vl=!1,kh=!1,da=0,Ze=0,es=0,js=0,Ch=0,dn=0,Ol=0,Dr=null,Ht=null,Wd=!1,Th=0,Qo=1/0,Zo=null,Pa=null,yt=0,Xa=null,Dl=null,wl=0,Jd=0,ef=null,Cy=null,zr=0,tf=null;function Zt(){if(Ae&2&&ke!==0)return ke&-ke;if(re.T!==null){var e=El;return e!==0?e:Rh()}return Ux()}function Ty(){dn===0&&(dn=!(ke&536870912)||Te?Dx():536870912);var e=hn.current;return e!==null&&(e.flags|=32),dn}function Ft(e,t,n){(e===He&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(zl(e,0),Ga(e,ke,dn,!1)),ri(e,n),(!(Ae&2)||e!==He)&&(e===He&&(!(Ae&2)&&(js|=n),Ze===4&&Ga(e,ke,dn,!1)),Gn(e))}function Ey(e,t,n){if(Ae&6)throw Error(U(327));var a=!n&&(t&124)===0&&(t&e.expiredLanes)===0||li(e,t),s=a?qN(e,t):Vu(e,t,!0),r=a;do{if(s===0){Vl&&!a&&Ga(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!HN(n)){s=Vu(e,t,!1),r=!1;continue}if(s===2){if(r=t,e.errorRecoveryDisabledLanes&r)var i=0;else i=e.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){t=i;e:{var o=e;s=Dr;var c=o.current.memoizedState.isDehydrated;if(c&&(zl(o,i).flags|=256),i=Vu(o,i,!1),i!==2){if(kh&&!c){o.errorRecoveryDisabledLanes|=r,js|=r,s=4;break e}r=Ht,Ht=s,r!==null&&(Ht===null?Ht=r:Ht.push.apply(Ht,r))}s=i}if(r=!1,s!==2)continue}}if(s===1){zl(e,0),Ga(e,t,0,!0);break}e:{switch(a=e,r=s,r){case 0:case 1:throw Error(U(345));case 4:if((t&4194048)!==t)break;case 6:Ga(a,t,dn,!qa);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(U(329))}if((t&62914560)===t&&(s=Th+300-Mn(),10<s)){if(Ga(a,t,dn,!qa),_c(a,0,!0)!==0)break e;a.timeoutHandle=Ky(Hp.bind(null,a,n,Ht,Zo,Wd,t,dn,js,Ol,qa,r,2,-0,0),s);break e}Hp(a,n,Ht,Zo,Wd,t,dn,js,Ol,qa,r,0,-0,0)}}break}while(!0);Gn(e)}function Hp(e,t,n,a,s,r,i,o,c,d,f,h,m,x){if(e.timeoutHandle=-1,h=t.subtreeFlags,(h&8192||(h&16785408)===16785408)&&(Xr={stylesheets:null,count:0,unsuspend:bS},_y(t),h=wS(),h!==null)){e.cancelPendingCommit=h(qp.bind(null,e,t,r,n,a,s,i,o,c,f,1,m,x)),Ga(e,r,i,!d);return}qp(e,t,r,n,a,s,i,o,c)}function HN(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var s=n[a],r=s.getSnapshot;s=s.value;try{if(!tn(r(),s))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Ga(e,t,n,a){t&=~Ch,t&=~js,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var r=31-Qt(s),i=1<<r;a[r]=-1,s&=~i}n!==0&&$x(e,n,t)}function Oc(){return Ae&6?!0:(gi(0),!1)}function Eh(){if(_e!==null){if(Re===0)var e=_e.return;else e=_e,na=Ls=null,ph(e),jl=null,Yr=0,e=_e;for(;e!==null;)uy(e.alternate,e),e=e.return;_e=null}}function zl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,aS(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Eh(),He=e,_e=n=ra(e.current,null),ke=t,Re=0,It=null,qa=!1,Vl=li(e,t),kh=!1,Ol=dn=Ch=js=es=Ze=0,Ht=Dr=null,Wd=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-Qt(a),r=1<<s;t|=e[s],a&=~r}return da=t,Cc(),n}function Ry(e,t){be=null,re.H=Vo,t===fi||t===Ec?(t=xp(),Re=3):t===mv?(t=xp(),Re=4):Re=t===sy?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,It=t,_e===null&&(Ze=1,Po(e,un(t,e.current)))}function Ay(){var e=re.H;return re.H=Vo,e===null?Vo:e}function My(){var e=re.A;return re.A=LN,e}function nf(){Ze=4,qa||(ke&4194048)!==ke&&hn.current!==null||(Vl=!0),!(es&134217727)&&!(js&134217727)||He===null||Ga(He,ke,dn,!1)}function Vu(e,t,n){var a=Ae;Ae|=2;var s=Ay(),r=My();(He!==e||ke!==t)&&(Zo=null,zl(e,t)),t=!1;var i=Ze;e:do try{if(Re!==0&&_e!==null){var o=_e,c=It;switch(Re){case 8:Eh(),i=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(t=!0);var d=Re;if(Re=0,It=null,ml(e,o,c,d),n&&Vl){i=0;break e}break;default:d=Re,Re=0,It=null,ml(e,o,c,d)}}BN(),i=Ze;break}catch(f){Ry(e,f)}while(!0);return t&&e.shellSuspendCounter++,na=Ls=null,Ae=a,re.H=s,re.A=r,_e===null&&(He=null,ke=0,Cc()),i}function BN(){for(;_e!==null;)Oy(_e)}function qN(e,t){var n=Ae;Ae|=2;var a=Ay(),s=My();He!==e||ke!==t?(Zo=null,Qo=Mn()+500,zl(e,t)):Vl=li(e,t);e:do try{if(Re!==0&&_e!==null){t=_e;var r=It;t:switch(Re){case 1:Re=0,It=null,ml(e,t,r,1);break;case 2:case 9:if(gp(r)){Re=0,It=null,Bp(t);break}t=function(){Re!==2&&Re!==9||He!==e||(Re=7),Gn(e)},r.then(t,t);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:gp(r)?(Re=0,It=null,Bp(t)):(Re=0,It=null,ml(e,t,r,7));break;case 5:var i=null;switch(_e.tag){case 26:i=_e.memoizedState;case 5:case 27:var o=_e;if(!i||Wy(i)){Re=0,It=null;var c=o.sibling;if(c!==null)_e=c;else{var d=o.return;d!==null?(_e=d,Dc(d)):_e=null}break t}}Re=0,It=null,ml(e,t,r,5);break;case 6:Re=0,It=null,ml(e,t,r,6);break;case 8:Eh(),Ze=6;break e;default:throw Error(U(462))}}GN();break}catch(f){Ry(e,f)}while(!0);return na=Ls=null,re.H=a,re.A=s,Ae=n,_e!==null?0:(He=null,ke=0,Cc(),Ze)}function GN(){for(;_e!==null&&!u1();)Oy(_e)}function Oy(e){var t=cy(e.alternate,e,da);e.memoizedProps=e.pendingProps,t===null?Dc(e):_e=t}function Bp(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Op(n,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=Op(n,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:ph(t);default:uy(n,t),t=_e=uv(t,da),t=cy(n,t,da)}e.memoizedProps=e.pendingProps,t===null?Dc(e):_e=t}function ml(e,t,n,a){na=Ls=null,ph(t),jl=null,Yr=0;var s=t.return;try{if(AN(e,s,t,n,ke)){Ze=1,Po(e,un(n,e.current)),_e=null;return}}catch(r){if(s!==null)throw _e=s,r;Ze=1,Po(e,un(n,e.current)),_e=null;return}t.flags&32768?(Te||a===1?e=!0:Vl||ke&536870912?e=!1:(qa=e=!0,(a===2||a===9||a===3||a===6)&&(a=hn.current,a!==null&&a.tag===13&&(a.flags|=16384))),Dy(t,e)):Dc(t)}function Dc(e){var t=e;do{if(t.flags&32768){Dy(t,qa);return}e=t.return;var n=ON(t.alternate,t,da);if(n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);Ze===0&&(Ze=5)}function Dy(e,t){do{var n=DN(e.alternate,e);if(n!==null){n.flags&=32767,_e=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=n}while(e!==null);Ze=6,_e=null}function qp(e,t,n,a,s,r,i,o,c){e.cancelPendingCommit=null;do zc();while(yt!==0);if(Ae&6)throw Error(U(327));if(t!==null){if(t===e.current)throw Error(U(177));if(r=t.lanes|t.childLanes,r|=nh,b1(e,n,r,i,o,c),e===He&&(_e=He=null,ke=0),Dl=t,Xa=e,wl=n,Jd=r,ef=s,Cy=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,PN(Oo,function(){return Hy(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=re.T,re.T=null,s=Ee.p,Ee.p=2,i=Ae,Ae|=4;try{zN(e,t,n)}finally{Ae=i,Ee.p=s,re.T=a}}yt=1,zy(),$y(),Ly()}}function zy(){if(yt===1){yt=0;var e=Xa,t=Dl,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=re.T,re.T=null;var a=Ee.p;Ee.p=2;var s=Ae;Ae|=4;try{by(t,e);var r=rf,i=nv(e.containerInfo),o=r.focusedElem,c=r.selectionRange;if(i!==o&&o&&o.ownerDocument&&tv(o.ownerDocument.documentElement,o)){if(c!==null&&th(o)){var d=c.start,f=c.end;if(f===void 0&&(f=d),"selectionStart"in o)o.selectionStart=d,o.selectionEnd=Math.min(f,o.value.length);else{var h=o.ownerDocument||document,m=h&&h.defaultView||window;if(m.getSelection){var x=m.getSelection(),w=o.textContent.length,v=Math.min(c.start,w),b=c.end===void 0?v:Math.min(c.end,w);!x.extend&&v>b&&(i=b,b=v,v=i);var g=op(o,v),p=op(o,b);if(g&&p&&(x.rangeCount!==1||x.anchorNode!==g.node||x.anchorOffset!==g.offset||x.focusNode!==p.node||x.focusOffset!==p.offset)){var y=h.createRange();y.setStart(g.node,g.offset),x.removeAllRanges(),v>b?(x.addRange(y),x.extend(p.node,p.offset)):(y.setEnd(p.node,p.offset),x.addRange(y))}}}}for(h=[],x=o;x=x.parentNode;)x.nodeType===1&&h.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<h.length;o++){var j=h[o];j.element.scrollLeft=j.left,j.element.scrollTop=j.top}}sc=!!lf,rf=lf=null}finally{Ae=s,Ee.p=a,re.T=n}}e.current=t,yt=2}}function $y(){if(yt===2){yt=0;var e=Xa,t=Dl,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=re.T,re.T=null;var a=Ee.p;Ee.p=2;var s=Ae;Ae|=4;try{gy(e,t.alternate,t)}finally{Ae=s,Ee.p=a,re.T=n}}yt=3}}function Ly(){if(yt===4||yt===3){yt=0,d1();var e=Xa,t=Dl,n=wl,a=Cy;t.subtreeFlags&10256||t.flags&10256?yt=5:(yt=0,Dl=Xa=null,Uy(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Pa=null),Kf(n),t=t.stateNode,Kt&&typeof Kt.onCommitFiberRoot=="function")try{Kt.onCommitFiberRoot(si,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=re.T,s=Ee.p,Ee.p=2,re.T=null;try{for(var r=e.onRecoverableError,i=0;i<a.length;i++){var o=a[i];r(o.value,{componentStack:o.stack})}}finally{re.T=t,Ee.p=s}}wl&3&&zc(),Gn(e),s=e.pendingLanes,n&4194090&&s&42?e===tf?zr++:(zr=0,tf=e):zr=0,gi(0)}}function Uy(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,di(t)))}function zc(e){return zy(),$y(),Ly(),Hy()}function Hy(){if(yt!==5)return!1;var e=Xa,t=Jd;Jd=0;var n=Kf(wl),a=re.T,s=Ee.p;try{Ee.p=32>n?32:n,re.T=null,n=ef,ef=null;var r=Xa,i=wl;if(yt=0,Dl=Xa=null,wl=0,Ae&6)throw Error(U(331));var o=Ae;if(Ae|=4,Sy(r.current),wy(r,r.current,i,n),Ae=o,gi(0,!1),Kt&&typeof Kt.onPostCommitFiberRoot=="function")try{Kt.onPostCommitFiberRoot(si,r)}catch{}return!0}finally{Ee.p=s,re.T=a,Uy(e,t)}}function Gp(e,t,n){t=un(n,t),t=Kd(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(ri(e,2),Gn(e))}function Le(e,t,n){if(e.tag===3)Gp(e,e,n);else for(;t!==null;){if(t.tag===3){Gp(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Pa===null||!Pa.has(a))){e=un(n,e),n=ny(2),a=Ia(t,n,2),a!==null&&(ay(n,a,t,e),ri(a,2),Gn(a));break}}t=t.return}}function Yu(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new UN;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(n)||(kh=!0,s.add(n),e=VN.bind(null,e,t,n),t.then(e,e))}function VN(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,He===e&&(ke&n)===n&&(Ze===4||Ze===3&&(ke&62914560)===ke&&300>Mn()-Th?!(Ae&2)&&zl(e,0):Ch|=n,Ol===ke&&(Ol=0)),Gn(e)}function By(e,t){t===0&&(t=zx()),e=Gl(e,t),e!==null&&(ri(e,t),Gn(e))}function YN(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),By(e,n)}function IN(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(U(314))}a!==null&&a.delete(t),By(e,n)}function PN(e,t){return Pf(e,t)}var Fo=null,nl=null,af=!1,Wo=!1,Iu=!1,ws=0;function Gn(e){e!==nl&&e.next===null&&(nl===null?Fo=nl=e:nl=nl.next=e),Wo=!0,af||(af=!0,KN())}function gi(e,t){if(!Iu&&Wo){Iu=!0;do for(var n=!1,a=Fo;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var r=0;else{var i=a.suspendedLanes,o=a.pingedLanes;r=(1<<31-Qt(42|e)+1)-1,r&=s&~(i&~o),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Vp(a,r))}else r=ke,r=_c(a,a===He?r:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(r&3)||li(a,r)||(n=!0,Vp(a,r));a=a.next}while(n);Iu=!1}}function XN(){qy()}function qy(){Wo=af=!1;var e=0;ws!==0&&(nS()&&(e=ws),ws=0);for(var t=Mn(),n=null,a=Fo;a!==null;){var s=a.next,r=Gy(a,t);r===0?(a.next=null,n===null?Fo=s:n.next=s,s===null&&(nl=n)):(n=a,(e!==0||r&3)&&(Wo=!0)),a=s}gi(e)}function Gy(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var i=31-Qt(r),o=1<<i,c=s[i];c===-1?(!(o&n)||o&a)&&(s[i]=y1(o,t)):c<=t&&(e.expiredLanes|=o),r&=~o}if(t=He,n=ke,n=_c(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&xu(a),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||li(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&xu(a),Kf(n)){case 2:case 8:n=Mx;break;case 32:n=Oo;break;case 268435456:n=Ox;break;default:n=Oo}return a=Vy.bind(null,e),n=Pf(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&xu(a),e.callbackPriority=2,e.callbackNode=null,2}function Vy(e,t){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(zc()&&e.callbackNode!==n)return null;var a=ke;return a=_c(e,e===He?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Ey(e,a,t),Gy(e,Mn()),e.callbackNode!=null&&e.callbackNode===n?Vy.bind(null,e):null)}function Vp(e,t){if(zc())return null;Ey(e,t,!0)}function KN(){sS(function(){Ae&6?Pf(Ax,XN):qy()})}function Rh(){return ws===0&&(ws=Dx()),ws}function Yp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ho(""+e)}function Ip(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function QN(e,t,n,a,s){if(t==="submit"&&n&&n.stateNode===s){var r=Yp((s[Bt]||null).action),i=a.submitter;i&&(t=(t=i[Bt]||null)?Yp(t.formAction):i.getAttribute("formAction"),t!==null&&(r=t,i=null));var o=new Nc("action","action",null,a,s);e.push({event:o,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ws!==0){var c=i?Ip(s,i):new FormData(s);Pd(n,{pending:!0,data:c,method:s.method,action:r},null,c)}}else typeof r=="function"&&(o.preventDefault(),c=i?Ip(s,i):new FormData(s),Pd(n,{pending:!0,data:c,method:s.method,action:r},r,c))},currentTarget:s}]})}}for(var Pu=0;Pu<Dd.length;Pu++){var Xu=Dd[Pu],ZN=Xu.toLowerCase(),FN=Xu[0].toUpperCase()+Xu.slice(1);Nn(ZN,"on"+FN)}Nn(sv,"onAnimationEnd");Nn(lv,"onAnimationIteration");Nn(rv,"onAnimationStart");Nn("dblclick","onDoubleClick");Nn("focusin","onFocus");Nn("focusout","onBlur");Nn(mN,"onTransitionRun");Nn(pN,"onTransitionStart");Nn(gN,"onTransitionCancel");Nn(iv,"onTransitionEnd");Cl("onMouseEnter",["mouseout","mouseover"]);Cl("onMouseLeave",["mouseout","mouseover"]);Cl("onPointerEnter",["pointerout","pointerover"]);Cl("onPointerLeave",["pointerout","pointerover"]);Ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ds("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="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(" "),WN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ir));function Yy(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],s=a.event;a=a.listeners;e:{var r=void 0;if(t)for(var i=a.length-1;0<=i;i--){var o=a[i],c=o.instance,d=o.currentTarget;if(o=o.listener,c!==r&&s.isPropagationStopped())break e;r=o,s.currentTarget=d;try{r(s)}catch(f){Io(f)}s.currentTarget=null,r=c}else for(i=0;i<a.length;i++){if(o=a[i],c=o.instance,d=o.currentTarget,o=o.listener,c!==r&&s.isPropagationStopped())break e;r=o,s.currentTarget=d;try{r(s)}catch(f){Io(f)}s.currentTarget=null,r=c}}}}function we(e,t){var n=t[Cd];n===void 0&&(n=t[Cd]=new Set);var a=e+"__bubble";n.has(a)||(Iy(t,e,2,!1),n.add(a))}function Ku(e,t,n){var a=0;t&&(a|=4),Iy(n,e,a,t)}var Ki="_reactListening"+Math.random().toString(36).slice(2);function Ah(e){if(!e[Ki]){e[Ki]=!0,Hx.forEach(function(n){n!=="selectionchange"&&(WN.has(n)||Ku(n,!1,e),Ku(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ki]||(t[Ki]=!0,Ku("selectionchange",!1,t))}}function Iy(e,t,n,a){switch(ab(t)){case 2:var s=SS;break;case 8:s=kS;break;default:s=zh}n=s.bind(null,t,n,e),s=void 0,!Ad||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Qu(e,t,n,a,s){var r=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var i=a.tag;if(i===3||i===4){var o=a.stateNode.containerInfo;if(o===s)break;if(i===4)for(i=a.return;i!==null;){var c=i.tag;if((c===3||c===4)&&i.stateNode.containerInfo===s)return;i=i.return}for(;o!==null;){if(i=ll(o),i===null)return;if(c=i.tag,c===5||c===6||c===26||c===27){a=r=i;continue e}o=o.parentNode}}a=a.return}Xx(function(){var d=r,f=Ff(n),h=[];e:{var m=ov.get(e);if(m!==void 0){var x=Nc,w=e;switch(e){case"keypress":if(po(n)===0)break e;case"keydown":case"keyup":x=P1;break;case"focusin":w="focus",x=Su;break;case"focusout":w="blur",x=Su;break;case"beforeblur":case"afterblur":x=Su;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=Wm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=D1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=Q1;break;case sv:case lv:case rv:x=L1;break;case iv:x=F1;break;case"scroll":case"scrollend":x=M1;break;case"wheel":x=J1;break;case"copy":case"cut":case"paste":x=H1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=ep;break;case"toggle":case"beforetoggle":x=tN}var v=(t&4)!==0,b=!v&&(e==="scroll"||e==="scrollend"),g=v?m!==null?m+"Capture":null:m;v=[];for(var p=d,y;p!==null;){var j=p;if(y=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||y===null||g===null||(j=Hr(p,g),j!=null&&v.push(Pr(p,j,y))),b)break;p=p.return}0<v.length&&(m=new x(m,w,null,n,f),h.push({event:m,listeners:v}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",m&&n!==Rd&&(w=n.relatedTarget||n.fromElement)&&(ll(w)||w[Bl]))break e;if((x||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,x?(w=n.relatedTarget||n.toElement,x=d,w=w?ll(w):null,w!==null&&(b=ai(w),v=w.tag,w!==b||v!==5&&v!==27&&v!==6)&&(w=null)):(x=null,w=d),x!==w)){if(v=Wm,j="onMouseLeave",g="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(v=ep,j="onPointerLeave",g="onPointerEnter",p="pointer"),b=x==null?m:mr(x),y=w==null?m:mr(w),m=new v(j,p+"leave",x,n,f),m.target=b,m.relatedTarget=y,j=null,ll(f)===d&&(v=new v(g,p+"enter",w,n,f),v.target=y,v.relatedTarget=b,j=v),b=j,x&&w)t:{for(v=x,g=w,p=0,y=v;y;y=Is(y))p++;for(y=0,j=g;j;j=Is(j))y++;for(;0<p-y;)v=Is(v),p--;for(;0<y-p;)g=Is(g),y--;for(;p--;){if(v===g||g!==null&&v===g.alternate)break t;v=Is(v),g=Is(g)}v=null}else v=null;x!==null&&Pp(h,m,x,v,!1),w!==null&&b!==null&&Pp(h,b,w,v,!0)}}e:{if(m=d?mr(d):window,x=m.nodeName&&m.nodeName.toLowerCase(),x==="select"||x==="input"&&m.type==="file")var _=sp;else if(ap(m))if(Jx)_=dN;else{_=cN;var k=oN}else x=m.nodeName,!x||x.toLowerCase()!=="input"||m.type!=="checkbox"&&m.type!=="radio"?d&&Zf(d.elementType)&&(_=sp):_=uN;if(_&&(_=_(e,d))){Wx(h,_,n,f);break e}k&&k(e,m,d),e==="focusout"&&d&&m.type==="number"&&d.memoizedProps.value!=null&&Ed(m,"number",m.value)}switch(k=d?mr(d):window,e){case"focusin":(ap(k)||k.contentEditable==="true")&&(ol=k,Md=d,Sr=null);break;case"focusout":Sr=Md=ol=null;break;case"mousedown":Od=!0;break;case"contextmenu":case"mouseup":case"dragend":Od=!1,cp(h,n,f);break;case"selectionchange":if(hN)break;case"keydown":case"keyup":cp(h,n,f)}var N;if(eh)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else il?Zx(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(Qx&&n.locale!=="ko"&&(il||S!=="onCompositionStart"?S==="onCompositionEnd"&&il&&(N=Kx()):(Ba=f,Wf="value"in Ba?Ba.value:Ba.textContent,il=!0)),k=Jo(d,S),0<k.length&&(S=new Jm(S,e,null,n,f),h.push({event:S,listeners:k}),N?S.data=N:(N=Fx(n),N!==null&&(S.data=N)))),(N=aN?sN(e,n):lN(e,n))&&(S=Jo(d,"onBeforeInput"),0<S.length&&(k=new Jm("onBeforeInput","beforeinput",null,n,f),h.push({event:k,listeners:S}),k.data=N)),QN(h,e,d,n,f)}Yy(h,t)})}function Pr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jo(e,t){for(var n=t+"Capture",a=[];e!==null;){var s=e,r=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||r===null||(s=Hr(e,n),s!=null&&a.unshift(Pr(e,s,r)),s=Hr(e,t),s!=null&&a.push(Pr(e,s,r))),e.tag===3)return a;e=e.return}return[]}function Is(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Pp(e,t,n,a,s){for(var r=t._reactName,i=[];n!==null&&n!==a;){var o=n,c=o.alternate,d=o.stateNode;if(o=o.tag,c!==null&&c===a)break;o!==5&&o!==26&&o!==27||d===null||(c=d,s?(d=Hr(n,r),d!=null&&i.unshift(Pr(n,d,c))):s||(d=Hr(n,r),d!=null&&i.push(Pr(n,d,c)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var JN=/\r\n?/g,eS=/\u0000|\uFFFD/g;function Xp(e){return(typeof e=="string"?e:""+e).replace(JN,`
|
|
49
|
+
`).replace(eS,"")}function Py(e,t){return t=Xp(t),Xp(e)===t}function $c(){}function ze(e,t,n,a,s,r){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Tl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Tl(e,""+a);break;case"className":qi(e,"class",a);break;case"tabIndex":qi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":qi(e,n,a);break;case"style":Px(e,a,r);break;case"data":if(t!=="object"){qi(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ho(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"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 r=="function"&&(n==="formAction"?(t!=="input"&&ze(e,t,"name",s.name,s,null),ze(e,t,"formEncType",s.formEncType,s,null),ze(e,t,"formMethod",s.formMethod,s,null),ze(e,t,"formTarget",s.formTarget,s,null)):(ze(e,t,"encType",s.encType,s,null),ze(e,t,"method",s.method,s,null),ze(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ho(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=$c);break;case"onScroll":a!=null&&we("scroll",e);break;case"onScrollEnd":a!=null&&we("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(U(61));if(n=a.__html,n!=null){if(s.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=ho(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":we("beforetoggle",e),we("toggle",e),fo(e,"popover",a);break;case"xlinkActuate":Xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Xn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Xn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Xn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Xn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":fo(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=R1.get(n)||n,fo(e,n,a))}}function sf(e,t,n,a,s,r){switch(n){case"style":Px(e,a,r);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(U(61));if(n=a.__html,n!=null){if(s.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Tl(e,a):(typeof a=="number"||typeof a=="bigint")&&Tl(e,""+a);break;case"onScroll":a!=null&&we("scroll",e);break;case"onScrollEnd":a!=null&&we("scrollend",e);break;case"onClick":a!=null&&(e.onclick=$c);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Bx.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(s=n.endsWith("Capture"),t=n.slice(2,s?n.length-7:void 0),r=e[Bt]||null,r=r!=null?r[n]:null,typeof r=="function"&&e.removeEventListener(t,r,s),typeof a=="function")){typeof r!="function"&&r!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,s);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):fo(e,n,a)}}}function bt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":we("error",e),we("load",e);var a=!1,s=!1,r;for(r in n)if(n.hasOwnProperty(r)){var i=n[r];if(i!=null)switch(r){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:ze(e,t,r,i,n,null)}}s&&ze(e,t,"srcSet",n.srcSet,n,null),a&&ze(e,t,"src",n.src,n,null);return;case"input":we("invalid",e);var o=r=i=s=null,c=null,d=null;for(a in n)if(n.hasOwnProperty(a)){var f=n[a];if(f!=null)switch(a){case"name":s=f;break;case"type":i=f;break;case"checked":c=f;break;case"defaultChecked":d=f;break;case"value":r=f;break;case"defaultValue":o=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(U(137,t));break;default:ze(e,t,a,f,n,null)}}Vx(e,r,o,c,d,i,s,!1),Do(e);return;case"select":we("invalid",e),a=i=r=null;for(s in n)if(n.hasOwnProperty(s)&&(o=n[s],o!=null))switch(s){case"value":r=o;break;case"defaultValue":i=o;break;case"multiple":a=o;default:ze(e,t,s,o,n,null)}t=r,n=i,e.multiple=!!a,t!=null?gl(e,!!a,t,!1):n!=null&&gl(e,!!a,n,!0);return;case"textarea":we("invalid",e),r=s=a=null;for(i in n)if(n.hasOwnProperty(i)&&(o=n[i],o!=null))switch(i){case"value":a=o;break;case"defaultValue":s=o;break;case"children":r=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(U(91));break;default:ze(e,t,i,o,n,null)}Ix(e,a,s,r),Do(e);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(a=n[c],a!=null))switch(c){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:ze(e,t,c,a,n,null)}return;case"dialog":we("beforetoggle",e),we("toggle",e),we("cancel",e),we("close",e);break;case"iframe":case"object":we("load",e);break;case"video":case"audio":for(a=0;a<Ir.length;a++)we(Ir[a],e);break;case"image":we("error",e),we("load",e);break;case"details":we("toggle",e);break;case"embed":case"source":case"link":we("error",e),we("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 n)if(n.hasOwnProperty(d)&&(a=n[d],a!=null))switch(d){case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:ze(e,t,d,a,n,null)}return;default:if(Zf(t)){for(f in n)n.hasOwnProperty(f)&&(a=n[f],a!==void 0&&sf(e,t,f,a,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(a=n[o],a!=null&&ze(e,t,o,a,n,null))}function tS(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,r=null,i=null,o=null,c=null,d=null,f=null;for(x in n){var h=n[x];if(n.hasOwnProperty(x)&&h!=null)switch(x){case"checked":break;case"value":break;case"defaultValue":c=h;default:a.hasOwnProperty(x)||ze(e,t,x,null,a,h)}}for(var m in a){var x=a[m];if(h=n[m],a.hasOwnProperty(m)&&(x!=null||h!=null))switch(m){case"type":r=x;break;case"name":s=x;break;case"checked":d=x;break;case"defaultChecked":f=x;break;case"value":i=x;break;case"defaultValue":o=x;break;case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(U(137,t));break;default:x!==h&&ze(e,t,m,x,a,h)}}Td(e,i,o,c,d,f,r,s);return;case"select":x=i=o=m=null;for(r in n)if(c=n[r],n.hasOwnProperty(r)&&c!=null)switch(r){case"value":break;case"multiple":x=c;default:a.hasOwnProperty(r)||ze(e,t,r,null,a,c)}for(s in a)if(r=a[s],c=n[s],a.hasOwnProperty(s)&&(r!=null||c!=null))switch(s){case"value":m=r;break;case"defaultValue":o=r;break;case"multiple":i=r;default:r!==c&&ze(e,t,s,r,a,c)}t=o,n=i,a=x,m!=null?gl(e,!!n,m,!1):!!a!=!!n&&(t!=null?gl(e,!!n,t,!0):gl(e,!!n,n?[]:"",!1));return;case"textarea":x=m=null;for(o in n)if(s=n[o],n.hasOwnProperty(o)&&s!=null&&!a.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:ze(e,t,o,null,a,s)}for(i in a)if(s=a[i],r=n[i],a.hasOwnProperty(i)&&(s!=null||r!=null))switch(i){case"value":m=s;break;case"defaultValue":x=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(U(91));break;default:s!==r&&ze(e,t,i,s,a,r)}Yx(e,m,x);return;case"option":for(var w in n)if(m=n[w],n.hasOwnProperty(w)&&m!=null&&!a.hasOwnProperty(w))switch(w){case"selected":e.selected=!1;break;default:ze(e,t,w,null,a,m)}for(c in a)if(m=a[c],x=n[c],a.hasOwnProperty(c)&&m!==x&&(m!=null||x!=null))switch(c){case"selected":e.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:ze(e,t,c,m,a,x)}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 v in n)m=n[v],n.hasOwnProperty(v)&&m!=null&&!a.hasOwnProperty(v)&&ze(e,t,v,null,a,m);for(d in a)if(m=a[d],x=n[d],a.hasOwnProperty(d)&&m!==x&&(m!=null||x!=null))switch(d){case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(U(137,t));break;default:ze(e,t,d,m,a,x)}return;default:if(Zf(t)){for(var b in n)m=n[b],n.hasOwnProperty(b)&&m!==void 0&&!a.hasOwnProperty(b)&&sf(e,t,b,void 0,a,m);for(f in a)m=a[f],x=n[f],!a.hasOwnProperty(f)||m===x||m===void 0&&x===void 0||sf(e,t,f,m,a,x);return}}for(var g in n)m=n[g],n.hasOwnProperty(g)&&m!=null&&!a.hasOwnProperty(g)&&ze(e,t,g,null,a,m);for(h in a)m=a[h],x=n[h],!a.hasOwnProperty(h)||m===x||m==null&&x==null||ze(e,t,h,m,a,x)}var lf=null,rf=null;function ec(e){return e.nodeType===9?e:e.ownerDocument}function Kp(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 Xy(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 of(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 Zu=null;function nS(){var e=window.event;return e&&e.type==="popstate"?e===Zu?!1:(Zu=e,!0):(Zu=null,!1)}var Ky=typeof setTimeout=="function"?setTimeout:void 0,aS=typeof clearTimeout=="function"?clearTimeout:void 0,Qp=typeof Promise=="function"?Promise:void 0,sS=typeof queueMicrotask=="function"?queueMicrotask:typeof Qp<"u"?function(e){return Qp.resolve(null).then(e).catch(lS)}:Ky;function lS(e){setTimeout(function(){throw e})}function ss(e){return e==="head"}function Zp(e,t){var n=t,a=0,s=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(0<a&&8>a){n=a;var i=e.ownerDocument;if(n&1&&$r(i.documentElement),n&2&&$r(i.body),n&4)for(n=i.head,$r(n),i=n.firstChild;i;){var o=i.nextSibling,c=i.nodeName;i[ii]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=o}}if(s===0){e.removeChild(r),Fr(t);return}s--}else n==="$"||n==="$?"||n==="$!"?s++:a=n.charCodeAt(0)-48;else a=0;n=r}while(n);Fr(t)}function cf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cf(n),Qf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function rS(e,t,n,a){for(;e.nodeType===1;){var s=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[ii])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=vn(e.nextSibling),e===null)break}return null}function iS(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=vn(e.nextSibling),e===null))return null;return e}function uf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function oS(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function vn(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==="F!"||t==="F")break;if(t==="/$")return null}}return e}var df=null;function Fp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function Qy(e,t,n){switch(t=ec(n),e){case"html":if(e=t.documentElement,!e)throw Error(U(452));return e;case"head":if(e=t.head,!e)throw Error(U(453));return e;case"body":if(e=t.body,!e)throw Error(U(454));return e;default:throw Error(U(451))}}function $r(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Qf(e)}var mn=new Map,Wp=new Set;function tc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ga=Ee.d;Ee.d={f:cS,r:uS,D:dS,C:fS,L:hS,m:mS,X:gS,S:pS,M:xS};function cS(){var e=ga.f(),t=Oc();return e||t}function uS(e){var t=ql(e);t!==null&&t.tag===5&&t.type==="form"?Gv(t):ga.r(e)}var Yl=typeof document>"u"?null:document;function Zy(e,t,n){var a=Yl;if(a&&typeof t=="string"&&t){var s=cn(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof n=="string"&&(s+='[crossorigin="'+n+'"]'),Wp.has(s)||(Wp.add(s),e={rel:e,crossOrigin:n,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),bt(t,"link",e),mt(t),a.head.appendChild(t)))}}function dS(e){ga.D(e),Zy("dns-prefetch",e,null)}function fS(e,t){ga.C(e,t),Zy("preconnect",e,t)}function hS(e,t,n){ga.L(e,t,n);var a=Yl;if(a&&e&&t){var s='link[rel="preload"][as="'+cn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(s+='[imagesrcset="'+cn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(s+='[imagesizes="'+cn(n.imageSizes)+'"]')):s+='[href="'+cn(e)+'"]';var r=s;switch(t){case"style":r=$l(e);break;case"script":r=Il(e)}mn.has(r)||(e=Be({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),mn.set(r,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(xi(r))||t==="script"&&a.querySelector(vi(r))||(t=a.createElement("link"),bt(t,"link",e),mt(t),a.head.appendChild(t)))}}function mS(e,t){ga.m(e,t);var n=Yl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+cn(a)+'"][href="'+cn(e)+'"]',r=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Il(e)}if(!mn.has(r)&&(e=Be({rel:"modulepreload",href:e},t),mn.set(r,e),n.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(vi(r)))return}a=n.createElement("link"),bt(a,"link",e),mt(a),n.head.appendChild(a)}}}function pS(e,t,n){ga.S(e,t,n);var a=Yl;if(a&&e){var s=pl(a).hoistableStyles,r=$l(e);t=t||"default";var i=s.get(r);if(!i){var o={loading:0,preload:null};if(i=a.querySelector(xi(r)))o.loading=5;else{e=Be({rel:"stylesheet",href:e,"data-precedence":t},n),(n=mn.get(r))&&Mh(e,n);var c=i=a.createElement("link");mt(c),bt(c,"link",e),c._p=new Promise(function(d,f){c.onload=d,c.onerror=f}),c.addEventListener("load",function(){o.loading|=1}),c.addEventListener("error",function(){o.loading|=2}),o.loading|=4,wo(i,t,a)}i={type:"stylesheet",instance:i,count:1,state:o},s.set(r,i)}}}function gS(e,t){ga.X(e,t);var n=Yl;if(n&&e){var a=pl(n).hoistableScripts,s=Il(e),r=a.get(s);r||(r=n.querySelector(vi(s)),r||(e=Be({src:e,async:!0},t),(t=mn.get(s))&&Oh(e,t),r=n.createElement("script"),mt(r),bt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(s,r))}}function xS(e,t){ga.M(e,t);var n=Yl;if(n&&e){var a=pl(n).hoistableScripts,s=Il(e),r=a.get(s);r||(r=n.querySelector(vi(s)),r||(e=Be({src:e,async:!0,type:"module"},t),(t=mn.get(s))&&Oh(e,t),r=n.createElement("script"),mt(r),bt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(s,r))}}function Jp(e,t,n,a){var s=(s=Va.current)?tc(s):null;if(!s)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=$l(n.href),n=pl(s).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=$l(n.href);var r=pl(s).hoistableStyles,i=r.get(e);if(i||(s=s.ownerDocument||s,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,i),(r=s.querySelector(xi(e)))&&!r._p&&(i.instance=r,i.state.loading=5),mn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mn.set(e,n),r||vS(s,e,n,i.state))),t&&a===null)throw Error(U(528,""));return i}if(t&&a!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Il(n),n=pl(s).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function $l(e){return'href="'+cn(e)+'"'}function xi(e){return'link[rel="stylesheet"]['+e+"]"}function Fy(e){return Be({},e,{"data-precedence":e.precedence,precedence:null})}function vS(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),bt(t,"link",n),mt(t),e.head.appendChild(t))}function Il(e){return'[src="'+cn(e)+'"]'}function vi(e){return"script[async]"+e}function eg(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+cn(n.href)+'"]');if(a)return t.instance=a,mt(a),a;var s=Be({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),mt(a),bt(a,"style",s),wo(a,n.precedence,e),t.instance=a;case"stylesheet":s=$l(n.href);var r=e.querySelector(xi(s));if(r)return t.state.loading|=4,t.instance=r,mt(r),r;a=Fy(n),(s=mn.get(s))&&Mh(a,s),r=(e.ownerDocument||e).createElement("link"),mt(r);var i=r;return i._p=new Promise(function(o,c){i.onload=o,i.onerror=c}),bt(r,"link",a),t.state.loading|=4,wo(r,n.precedence,e),t.instance=r;case"script":return r=Il(n.src),(s=e.querySelector(vi(r)))?(t.instance=s,mt(s),s):(a=n,(s=mn.get(r))&&(a=Be({},n),Oh(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),mt(s),bt(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,wo(a,n.precedence,e));return t.instance}function wo(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,r=s,i=0;i<a.length;i++){var o=a[i];if(o.dataset.precedence===t)r=o;else if(r!==s)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Mh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Oh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _o=null;function tg(e,t,n){if(_o===null){var a=new Map,s=_o=new Map;s.set(n,a)}else s=_o,a=s.get(n),a||(a=new Map,s.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),s=0;s<n.length;s++){var r=n[s];if(!(r[ii]||r[Nt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var i=r.getAttribute(t)||"";i=e+i;var o=a.get(i);o?o.push(r):a.set(i,[r])}}return a}function ng(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function yS(e,t,n){if(n===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 Wy(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Xr=null;function bS(){}function jS(e,t,n){if(Xr===null)throw Error(U(475));var a=Xr;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var s=$l(n.href),r=e.querySelector(xi(s));if(r){e=r._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=nc.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=r,mt(r);return}r=e.ownerDocument||e,n=Fy(n),(s=mn.get(s))&&Mh(n,s),r=r.createElement("link"),mt(r);var i=r;i._p=new Promise(function(o,c){i.onload=o,i.onerror=c}),bt(r,"link",n),t.instance=r}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(a.count++,t=nc.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function wS(){if(Xr===null)throw Error(U(475));var e=Xr;return e.stylesheets&&e.count===0&&ff(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&ff(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function nc(){if(this.count--,this.count===0){if(this.stylesheets)ff(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ac=null;function ff(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ac=new Map,t.forEach(_S,e),ac=null,nc.call(e))}function _S(e,t){if(!(t.state.loading&4)){var n=ac.get(e);if(n)var a=n.get(null);else{n=new Map,ac.set(e,n);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<s.length;r++){var i=s[r];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(n.set(i.dataset.precedence,i),a=i)}a&&n.set(null,a)}s=t.instance,i=s.getAttribute("data-precedence"),r=n.get(i)||a,r===a&&n.set(null,s),n.set(i,s),this.count++,a=nc.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),r?r.parentNode.insertBefore(s,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Kr={$$typeof:Jn,Provider:null,Consumer:null,_currentValue:gs,_currentValue2:gs,_threadCount:0};function NS(e,t,n,a,s,r,i,o){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=vu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vu(0),this.hiddenUpdates=vu(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=r,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function Jy(e,t,n,a,s,r,i,o,c,d,f,h){return e=new NS(e,t,n,i,o,c,d,h),t=1,r===!0&&(t|=24),r=Xt(3,null,null,t),e.current=r,r.stateNode=e,t=ih(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:a,isDehydrated:n,cache:t},ch(r),e}function eb(e){return e?(e=dl,e):dl}function tb(e,t,n,a,s,r){s=eb(s),a.context===null?a.context=s:a.pendingContext=s,a=Ya(t),a.payload={element:n},r=r===void 0?null:r,r!==null&&(a.callback=r),n=Ia(e,a,t),n!==null&&(Ft(n,e,t),Tr(n,e,t))}function ag(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Dh(e,t){ag(e,t),(e=e.alternate)&&ag(e,t)}function nb(e){if(e.tag===13){var t=Gl(e,67108864);t!==null&&Ft(t,e,67108864),Dh(e,67108864)}}var sc=!0;function SS(e,t,n,a){var s=re.T;re.T=null;var r=Ee.p;try{Ee.p=2,zh(e,t,n,a)}finally{Ee.p=r,re.T=s}}function kS(e,t,n,a){var s=re.T;re.T=null;var r=Ee.p;try{Ee.p=8,zh(e,t,n,a)}finally{Ee.p=r,re.T=s}}function zh(e,t,n,a){if(sc){var s=hf(a);if(s===null)Qu(e,t,a,lc,n),sg(e,a);else if(TS(s,e,t,n,a))a.stopPropagation();else if(sg(e,a),t&4&&-1<CS.indexOf(e)){for(;s!==null;){var r=ql(s);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var i=ds(r.pendingLanes);if(i!==0){var o=r;for(o.pendingLanes|=2,o.entangledLanes|=2;i;){var c=1<<31-Qt(i);o.entanglements[1]|=c,i&=~c}Gn(r),!(Ae&6)&&(Qo=Mn()+500,gi(0))}}break;case 13:o=Gl(r,2),o!==null&&Ft(o,r,2),Oc(),Dh(r,2)}if(r=hf(a),r===null&&Qu(e,t,a,lc,n),r===s)break;s=r}s!==null&&a.stopPropagation()}else Qu(e,t,a,null,n)}}function hf(e){return e=Ff(e),$h(e)}var lc=null;function $h(e){if(lc=null,e=ll(e),e!==null){var t=ai(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Cx(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return lc=e,null}function ab(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(f1()){case Ax:return 2;case Mx:return 8;case Oo:case h1:return 32;case Ox:return 268435456;default:return 32}default:return 32}}var mf=!1,Ka=null,Qa=null,Za=null,Qr=new Map,Zr=new Map,Ua=[],CS="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 sg(e,t){switch(e){case"focusin":case"focusout":Ka=null;break;case"dragenter":case"dragleave":Qa=null;break;case"mouseover":case"mouseout":Za=null;break;case"pointerover":case"pointerout":Qr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zr.delete(t.pointerId)}}function or(e,t,n,a,s,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:r,targetContainers:[s]},t!==null&&(t=ql(t),t!==null&&nb(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function TS(e,t,n,a,s){switch(t){case"focusin":return Ka=or(Ka,e,t,n,a,s),!0;case"dragenter":return Qa=or(Qa,e,t,n,a,s),!0;case"mouseover":return Za=or(Za,e,t,n,a,s),!0;case"pointerover":var r=s.pointerId;return Qr.set(r,or(Qr.get(r)||null,e,t,n,a,s)),!0;case"gotpointercapture":return r=s.pointerId,Zr.set(r,or(Zr.get(r)||null,e,t,n,a,s)),!0}return!1}function sb(e){var t=ll(e.target);if(t!==null){var n=ai(t);if(n!==null){if(t=n.tag,t===13){if(t=Cx(n),t!==null){e.blockedOn=t,j1(e.priority,function(){if(n.tag===13){var a=Zt();a=Xf(a);var s=Gl(n,a);s!==null&&Ft(s,n,a),Dh(n,a)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function No(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hf(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Rd=a,n.target.dispatchEvent(a),Rd=null}else return t=ql(n),t!==null&&nb(t),e.blockedOn=n,!1;t.shift()}return!0}function lg(e,t,n){No(e)&&n.delete(t)}function ES(){mf=!1,Ka!==null&&No(Ka)&&(Ka=null),Qa!==null&&No(Qa)&&(Qa=null),Za!==null&&No(Za)&&(Za=null),Qr.forEach(lg),Zr.forEach(lg)}function Qi(e,t){e.blockedOn===t&&(e.blockedOn=null,mf||(mf=!0,ut.unstable_scheduleCallback(ut.unstable_NormalPriority,ES)))}var Zi=null;function rg(e){Zi!==e&&(Zi=e,ut.unstable_scheduleCallback(ut.unstable_NormalPriority,function(){Zi===e&&(Zi=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if($h(a||n)===null)continue;break}var r=ql(n);r!==null&&(e.splice(t,3),t-=3,Pd(r,{pending:!0,data:s,method:n.method,action:a},a,s))}}))}function Fr(e){function t(c){return Qi(c,e)}Ka!==null&&Qi(Ka,e),Qa!==null&&Qi(Qa,e),Za!==null&&Qi(Za,e),Qr.forEach(t),Zr.forEach(t);for(var n=0;n<Ua.length;n++){var a=Ua[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ua.length&&(n=Ua[0],n.blockedOn===null);)sb(n),n.blockedOn===null&&Ua.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var s=n[a],r=n[a+1],i=s[Bt]||null;if(typeof r=="function")i||rg(n);else if(i){var o=null;if(r&&r.hasAttribute("formAction")){if(s=r,i=r[Bt]||null)o=i.formAction;else if($h(s)!==null)continue}else o=i.action;typeof o=="function"?n[a+1]=o:(n.splice(a,3),a-=3),rg(n)}}}function Lh(e){this._internalRoot=e}Lc.prototype.render=Lh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));var n=t.current,a=Zt();tb(n,a,e,t,null,null)};Lc.prototype.unmount=Lh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;tb(e.current,2,null,e,null,null),Oc(),t[Bl]=null}};function Lc(e){this._internalRoot=e}Lc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ux();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ua.length&&t!==0&&t<Ua[n].priority;n++);Ua.splice(n,0,e),n===0&&sb(e)}};var ig=Sx.version;if(ig!=="19.1.0")throw Error(U(527,ig,"19.1.0"));Ee.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=l1(t),e=e!==null?Tx(e):null,e=e===null?null:e.stateNode,e};var RS={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fi.isDisabled&&Fi.supportsFiber)try{si=Fi.inject(RS),Kt=Fi}catch{}}jc.createRoot=function(e,t){if(!kx(e))throw Error(U(299));var n=!1,a="",s=Jv,r=ey,i=ty,o=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(i=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(o=t.unstable_transitionCallbacks)),t=Jy(e,1,!1,null,null,n,a,s,r,i,o,null),e[Bl]=t.current,Ah(e),new Lh(t)};jc.hydrateRoot=function(e,t,n){if(!kx(e))throw Error(U(299));var a=!1,s="",r=Jv,i=ey,o=ty,c=null,d=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(i=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(c=n.unstable_transitionCallbacks),n.formState!==void 0&&(d=n.formState)),t=Jy(e,1,!0,t,n??null,a,s,r,i,o,c,d),t.context=eb(null),n=t.current,a=Zt(),a=Xf(a),s=Ya(a),s.callback=null,Ia(n,s,a),n=a,t.current.lanes=n,ri(t,n),Gn(t),e[Bl]=t.current,Ah(e),new Lc(t)};jc.version="19.1.0";function lb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lb)}catch(e){console.error(e)}}lb(),yx.exports=jc;var AS=yx.exports;const rb=u.createContext(null);function ib({data:e,router:t,identity:n,notify:a,children:s}){return l.jsx(rb.Provider,{value:{data:e,router:t,identity:n,notify:a},children:s})}function Uc(){const e=u.useContext(rb);if(!e)throw new Error("A shared app page rendered outside AppUiProvider.");return e}const MS={success:()=>{},error:()=>{}},Us=()=>Uc().data,jt=()=>Uc().router,Hc=()=>Uc().identity,yi=()=>Uc().notify??MS;function OS(){const{probe:e}=Us(),{href:t,Link:n}=jt(),a=Hc(),[s,r]=u.useState(null),[i,o]=u.useState(!1);return u.useEffect(()=>{let c=!0;if(!e){o(!0);return}return e.source().then(d=>c&&r(d.label),()=>c&&o(!0)),()=>{c=!1}},[e]),l.jsxs("section",{"data-testid":"app-ui-probe",className:"m-6 flex max-w-xl flex-col gap-2 rounded-lg border border-border bg-card p-6 text-card-foreground",children:[l.jsx("h1",{className:"text-xl font-semibold",children:"Shared app UI"}),l.jsx("p",{"data-testid":"app-ui-probe-source",className:"text-sm text-muted-foreground",children:i?"Data source unavailable":s??"Loading…"}),l.jsxs("p",{"data-testid":"app-ui-probe-identity",className:"text-sm",children:[a.label," · ",a.can("tasks.write")?"can edit tasks":"read only"]}),l.jsx(n,{href:t("/tasks"),className:"rounded-sm text-sm text-primary underline outline-hidden focus-visible:ring-2 focus-visible:ring-ring",children:"Tasks"})]})}/**
|
|
50
|
+
* @license lucide-react v0.511.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const DS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zS=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),og=e=>{const t=zS(e);return t.charAt(0).toUpperCase()+t.slice(1)},ob=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),$S=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
55
|
+
* @license lucide-react v0.511.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/var LS={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"};/**
|
|
60
|
+
* @license lucide-react v0.511.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const US=u.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:r,iconNode:i,...o},c)=>u.createElement("svg",{ref:c,...LS,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:ob("lucide",s),...!r&&!$S(o)&&{"aria-hidden":"true"},...o},[...i.map(([d,f])=>u.createElement(d,f)),...Array.isArray(r)?r:[r]]));/**
|
|
65
|
+
* @license lucide-react v0.511.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const de=(e,t)=>{const n=u.forwardRef(({className:a,...s},r)=>u.createElement(US,{ref:r,iconNode:t,className:ob(`lucide-${DS(og(e))}`,`lucide-${e}`,a),...s}));return n.displayName=og(e),n};/**
|
|
70
|
+
* @license lucide-react v0.511.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const HS=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],BS=de("archive-restore",HS);/**
|
|
75
|
+
* @license lucide-react v0.511.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const qS=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],cg=de("archive",qS);/**
|
|
80
|
+
* @license lucide-react v0.511.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const GS=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],VS=de("arrow-down",GS);/**
|
|
85
|
+
* @license lucide-react v0.511.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const YS=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],IS=de("arrow-left",YS);/**
|
|
90
|
+
* @license lucide-react v0.511.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const PS=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],XS=de("arrow-up",PS);/**
|
|
95
|
+
* @license lucide-react v0.511.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const KS=[["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"}]],Uh=de("bot",KS);/**
|
|
100
|
+
* @license lucide-react v0.511.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const QS=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],ZS=de("briefcase",QS);/**
|
|
105
|
+
* @license lucide-react v0.511.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const FS=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],WS=de("building-2",FS);/**
|
|
110
|
+
* @license lucide-react v0.511.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const JS=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pl=de("check",JS);/**
|
|
115
|
+
* @license lucide-react v0.511.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const ek=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],tk=de("chevron-down",ek);/**
|
|
120
|
+
* @license lucide-react v0.511.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const nk=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],cb=de("chevron-right",nk);/**
|
|
125
|
+
* @license lucide-react v0.511.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const ak=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],sk=de("chevron-up",ak);/**
|
|
130
|
+
* @license lucide-react v0.511.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const lk=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],ub=de("chevrons-up-down",lk);/**
|
|
135
|
+
* @license lucide-react v0.511.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const rk=[["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"}]],st=de("circle-alert",rk);/**
|
|
140
|
+
* @license lucide-react v0.511.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const ik=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],db=de("circle-check",ik);/**
|
|
145
|
+
* @license lucide-react v0.511.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const ok=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ck=de("circle",ok);/**
|
|
150
|
+
* @license lucide-react v0.511.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const uk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],dk=de("clock",uk);/**
|
|
155
|
+
* @license lucide-react v0.511.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const fk=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Hh=de("ellipsis",fk);/**
|
|
160
|
+
* @license lucide-react v0.511.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const hk=[["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"}]],Bh=de("eye",hk);/**
|
|
165
|
+
* @license lucide-react v0.511.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const mk=[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],fb=de("folder-git-2",mk);/**
|
|
170
|
+
* @license lucide-react v0.511.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const pk=[["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M14 13h3",key:"1dgedf"}],["path",{d:"M7 13h3",key:"1pygq7"}]],gk=de("folder-git",pk);/**
|
|
175
|
+
* @license lucide-react v0.511.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const xk=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],vk=de("git-fork",xk);/**
|
|
180
|
+
* @license lucide-react v0.511.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const yk=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],bk=de("hard-drive",yk);/**
|
|
185
|
+
* @license lucide-react v0.511.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const jk=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],wk=de("house",jk);/**
|
|
190
|
+
* @license lucide-react v0.511.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const _k=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],fa=de("info",_k);/**
|
|
195
|
+
* @license lucide-react v0.511.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const Nk=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],Sk=de("laptop",Nk);/**
|
|
200
|
+
* @license lucide-react v0.511.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const kk=[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],hb=de("list-checks",kk);/**
|
|
205
|
+
* @license lucide-react v0.511.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const Ck=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],mb=de("list-ordered",Ck);/**
|
|
210
|
+
* @license lucide-react v0.511.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const Tk=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ek=de("loader-circle",Tk);/**
|
|
215
|
+
* @license lucide-react v0.511.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const Rk=[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]],Ak=de("messages-square",Rk);/**
|
|
220
|
+
* @license lucide-react v0.511.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const Mk=[["path",{d:"M5 12h14",key:"1ays0h"}]],Ok=de("minus",Mk);/**
|
|
225
|
+
* @license lucide-react v0.511.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const Dk=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],zk=de("network",Dk);/**
|
|
230
|
+
* @license lucide-react v0.511.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const $k=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Lk=de("panel-left",$k);/**
|
|
235
|
+
* @license lucide-react v0.511.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const Uk=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],pb=de("pause",Uk);/**
|
|
240
|
+
* @license lucide-react v0.511.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const Hk=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],gb=de("pencil",Hk);/**
|
|
245
|
+
* @license lucide-react v0.511.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const Bk=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],rc=de("plus",Bk);/**
|
|
250
|
+
* @license lucide-react v0.511.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const qk=[["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"}]],xb=de("refresh-cw",qk);/**
|
|
255
|
+
* @license lucide-react v0.511.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const Gk=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],vb=de("search-x",Gk);/**
|
|
260
|
+
* @license lucide-react v0.511.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const Vk=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],Yk=de("snowflake",Vk);/**
|
|
265
|
+
* @license lucide-react v0.511.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const Ik=[["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"}]],ug=de("triangle-alert",Ik);/**
|
|
270
|
+
* @license lucide-react v0.511.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const Pk=[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Xk=de("user-check",Pk);/**
|
|
275
|
+
* @license lucide-react v0.511.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const Kk=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Qk=de("user-cog",Kk);/**
|
|
280
|
+
* @license lucide-react v0.511.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const Zk=[["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"}]],qh=de("user",Zk);/**
|
|
285
|
+
* @license lucide-react v0.511.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const Fk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],yb=de("x",Fk);function bb(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=bb(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function jb(){for(var e,t,n=0,a="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=bb(e))&&(a&&(a+=" "),a+=t);return a}const dg=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fg=jb,bi=(e,t)=>n=>{var a;if((t==null?void 0:t.variants)==null)return fg(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:r}=t,i=Object.keys(s).map(d=>{const f=n==null?void 0:n[d],h=r==null?void 0:r[d];if(f===null)return null;const m=dg(f)||dg(h);return s[d][m]}),o=n&&Object.entries(n).reduce((d,f)=>{let[h,m]=f;return m===void 0||(d[h]=m),d},{}),c=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((d,f)=>{let{class:h,className:m,...x}=f;return Object.entries(x).every(w=>{let[v,b]=w;return Array.isArray(b)?b.includes({...r,...o}[v]):{...r,...o}[v]===b})?[...d,h,m]:d},[]);return fg(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Gh="-",Wk=e=>{const t=e2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:i=>{const o=i.split(Gh);return o[0]===""&&o.length!==1&&o.shift(),wb(o,t)||Jk(i)},getConflictingClassGroupIds:(i,o)=>{const c=n[i]||[];return o&&a[i]?[...c,...a[i]]:c}}},wb=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],a=t.nextPart.get(n),s=a?wb(e.slice(1),a):void 0;if(s)return s;if(t.validators.length===0)return;const r=e.join(Gh);return(i=t.validators.find(({validator:o})=>o(r)))==null?void 0:i.classGroupId},hg=/^\[(.+)\]$/,Jk=e=>{if(hg.test(e)){const t=hg.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},e2=e=>{const{theme:t,classGroups:n}=e,a={nextPart:new Map,validators:[]};for(const s in n)pf(n[s],a,s,t);return a},pf=(e,t,n,a)=>{e.forEach(s=>{if(typeof s=="string"){const r=s===""?t:mg(t,s);r.classGroupId=n;return}if(typeof s=="function"){if(t2(s)){pf(s(a),t,n,a);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([r,i])=>{pf(i,mg(t,r),n,a)})})},mg=(e,t)=>{let n=e;return t.split(Gh).forEach(a=>{n.nextPart.has(a)||n.nextPart.set(a,{nextPart:new Map,validators:[]}),n=n.nextPart.get(a)}),n},t2=e=>e.isThemeGetter,n2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,a=new Map;const s=(r,i)=>{n.set(r,i),t++,t>e&&(t=0,a=n,n=new Map)};return{get(r){let i=n.get(r);if(i!==void 0)return i;if((i=a.get(r))!==void 0)return s(r,i),i},set(r,i){n.has(r)?n.set(r,i):s(r,i)}}},gf="!",xf=":",a2=xf.length,s2=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=s=>{const r=[];let i=0,o=0,c=0,d;for(let w=0;w<s.length;w++){let v=s[w];if(i===0&&o===0){if(v===xf){r.push(s.slice(c,w)),c=w+a2;continue}if(v==="/"){d=w;continue}}v==="["?i++:v==="]"?i--:v==="("?o++:v===")"&&o--}const f=r.length===0?s:s.substring(c),h=l2(f),m=h!==f,x=d&&d>c?d-c:void 0;return{modifiers:r,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:x}};if(t){const s=t+xf,r=a;a=i=>i.startsWith(s)?r(i.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const s=a;a=r=>n({className:r,parseClassName:s})}return a},l2=e=>e.endsWith(gf)?e.substring(0,e.length-1):e.startsWith(gf)?e.substring(1):e,r2=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(a=>[a,!0]));return a=>{if(a.length<=1)return a;const s=[];let r=[];return a.forEach(i=>{i[0]==="["||t[i]?(s.push(...r.sort(),i),r=[]):r.push(i)}),s.push(...r.sort()),s}},i2=e=>({cache:n2(e.cacheSize),parseClassName:s2(e),sortModifiers:r2(e),...Wk(e)}),o2=/\s+/,c2=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:r}=t,i=[],o=e.trim().split(o2);let c="";for(let d=o.length-1;d>=0;d-=1){const f=o[d],{isExternal:h,modifiers:m,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:v}=n(f);if(h){c=f+(c.length>0?" "+c:c);continue}let b=!!v,g=a(b?w.substring(0,v):w);if(!g){if(!b){c=f+(c.length>0?" "+c:c);continue}if(g=a(w),!g){c=f+(c.length>0?" "+c:c);continue}b=!1}const p=r(m).join(":"),y=x?p+gf:p,j=y+g;if(i.includes(j))continue;i.push(j);const _=s(g,b);for(let k=0;k<_.length;++k){const N=_[k];i.push(y+N)}c=f+(c.length>0?" "+c:c)}return c};function u2(){let e=0,t,n,a="";for(;e<arguments.length;)(t=arguments[e++])&&(n=_b(t))&&(a&&(a+=" "),a+=n);return a}const _b=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=_b(e[a]))&&(n&&(n+=" "),n+=t);return n};function d2(e,...t){let n,a,s,r=i;function i(c){const d=t.reduce((f,h)=>h(f),e());return n=i2(d),a=n.cache.get,s=n.cache.set,r=o,o(c)}function o(c){const d=a(c);if(d)return d;const f=c2(c,n);return s(c,f),f}return function(){return r(u2.apply(null,arguments))}}const rt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Nb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Sb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,f2=/^\d+\/\d+$/,h2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,m2=/\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$/,p2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,g2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,x2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ps=e=>f2.test(e),ye=e=>!!e&&!Number.isNaN(Number(e)),Ta=e=>!!e&&Number.isInteger(Number(e)),Fu=e=>e.endsWith("%")&&ye(e.slice(0,-1)),Zn=e=>h2.test(e),v2=()=>!0,y2=e=>m2.test(e)&&!p2.test(e),kb=()=>!1,b2=e=>g2.test(e),j2=e=>x2.test(e),w2=e=>!Q(e)&&!Z(e),_2=e=>Xl(e,Eb,kb),Q=e=>Nb.test(e),us=e=>Xl(e,Rb,y2),Wu=e=>Xl(e,T2,ye),pg=e=>Xl(e,Cb,kb),N2=e=>Xl(e,Tb,j2),Wi=e=>Xl(e,Ab,b2),Z=e=>Sb.test(e),cr=e=>Kl(e,Rb),S2=e=>Kl(e,E2),gg=e=>Kl(e,Cb),k2=e=>Kl(e,Eb),C2=e=>Kl(e,Tb),Ji=e=>Kl(e,Ab,!0),Xl=(e,t,n)=>{const a=Nb.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Kl=(e,t,n=!1)=>{const a=Sb.exec(e);return a?a[1]?t(a[1]):n:!1},Cb=e=>e==="position"||e==="percentage",Tb=e=>e==="image"||e==="url",Eb=e=>e==="length"||e==="size"||e==="bg-size",Rb=e=>e==="length",T2=e=>e==="number",E2=e=>e==="family-name",Ab=e=>e==="shadow",R2=()=>{const e=rt("color"),t=rt("font"),n=rt("text"),a=rt("font-weight"),s=rt("tracking"),r=rt("leading"),i=rt("breakpoint"),o=rt("container"),c=rt("spacing"),d=rt("radius"),f=rt("shadow"),h=rt("inset-shadow"),m=rt("text-shadow"),x=rt("drop-shadow"),w=rt("blur"),v=rt("perspective"),b=rt("aspect"),g=rt("ease"),p=rt("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...j(),Z,Q],k=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],S=()=>[Z,Q,c],R=()=>[Ps,"full","auto",...S()],A=()=>[Ta,"none","subgrid",Z,Q],z=()=>["auto",{span:["full",Ta,Z,Q]},Ta,Z,Q],q=()=>[Ta,"auto",Z,Q],O=()=>["auto","min","max","fr",Z,Q],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...S()],B=()=>[Ps,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],C=()=>[e,Z,Q],L=()=>[...j(),gg,pg,{position:[Z,Q]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",k2,_2,{size:[Z,Q]}],V=()=>[Fu,cr,us],ne=()=>["","none","full",d,Z,Q],Y=()=>["",ye,cr,us],ve=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[ye,Fu,gg,pg],W=()=>["","none",w,Z,Q],oe=()=>["none",ye,Z,Q],fe=()=>["none",ye,Z,Q],he=()=>[ye,Z,Q],ue=()=>[Ps,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Zn],breakpoint:[Zn],color:[v2],container:[Zn],"drop-shadow":[Zn],ease:["in","out","in-out"],font:[w2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Zn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Zn],shadow:[Zn],spacing:["px",ye],text:[Zn],"text-shadow":[Zn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ps,Q,Z,b]}],container:["container"],columns:[{columns:[ye,Q,Z,o]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:_()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Ta,"auto",Z,Q]}],basis:[{basis:[Ps,"full","auto",o,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ye,Ps,"auto","initial","none",Q]}],grow:[{grow:["",ye,Z,Q]}],shrink:[{shrink:["",ye,Z,Q]}],order:[{order:[Ta,"first","last","none",Z,Q]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[o,"screen",...B()]}],"min-w":[{"min-w":[o,"screen","none",...B()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[i]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,cr,us]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Z,Wu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fu,Q]}],"font-family":[{font:[S2,Q,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Z,Q]}],"line-clamp":[{"line-clamp":[ye,"none",Z,Wu]}],leading:[{leading:[r,...S()]}],"list-image":[{"list-image":["none",Z,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[ye,"from-font","auto",Z,us]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[ye,"auto",Z,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z,Q]}],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",Z,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ta,Z,Q],radial:["",Z,Q],conic:[Ta,Z,Q]},C2,N2]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ye,Z,Q]}],"outline-w":[{outline:["",ye,cr,us]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",f,Ji,Wi]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",h,Ji,Wi]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[ye,us]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",m,Ji,Wi]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[ye,Z,Q]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"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":[ye]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Z,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"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":j()}],"mask-image-conic-pos":[{"mask-conic":[ye]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,Q]}],filter:[{filter:["","none",Z,Q]}],blur:[{blur:W()}],brightness:[{brightness:[ye,Z,Q]}],contrast:[{contrast:[ye,Z,Q]}],"drop-shadow":[{"drop-shadow":["","none",x,Ji,Wi]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",ye,Z,Q]}],"hue-rotate":[{"hue-rotate":[ye,Z,Q]}],invert:[{invert:["",ye,Z,Q]}],saturate:[{saturate:[ye,Z,Q]}],sepia:[{sepia:["",ye,Z,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,Q]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[ye,Z,Q]}],"backdrop-contrast":[{"backdrop-contrast":[ye,Z,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ye,Z,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ye,Z,Q]}],"backdrop-invert":[{"backdrop-invert":["",ye,Z,Q]}],"backdrop-opacity":[{"backdrop-opacity":[ye,Z,Q]}],"backdrop-saturate":[{"backdrop-saturate":[ye,Z,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",ye,Z,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ye,"initial",Z,Q]}],ease:[{ease:["linear","initial",g,Z,Q]}],delay:[{delay:[ye,Z,Q]}],animate:[{animate:["none",p,Z,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Z,Q]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":["scale-3d"],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[Z,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"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",Z,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",Z,Q]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[ye,cr,us,Wu]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},A2=d2(R2);function F(...e){return A2(jb(e))}const M2=bi("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground *:data-[slot=alert-description]:text-muted-foreground",info:"border-info/40 bg-info/10 text-info",success:"border-success/40 bg-success/10 text-success",warning:"border-warning/40 bg-warning/10 text-warning",destructive:"border-destructive/40 bg-destructive/10 text-destructive"}},defaultVariants:{variant:"default"}});function ge({className:e,variant:t,...n}){return l.jsx("div",{"data-slot":"alert",role:"alert",className:F(M2({variant:t}),e),...n})}function je({className:e,...t}){return l.jsx("div",{"data-slot":"alert-title",className:F("col-start-2 min-h-4 font-medium tracking-tight",e),...t})}function pe({className:e,...t}){return l.jsx("div",{"data-slot":"alert-description",className:F("col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function J(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function xg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Bc(...e){return t=>{let n=!1;const a=e.map(s=>{const r=xg(s,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<a.length;s++){const r=a[s];typeof r=="function"?r():xg(e[s],null)}}}}function Me(...e){return u.useCallback(Bc(...e),e)}function O2(e,t){const n=u.createContext(t),a=r=>{const{children:i,...o}=r,c=u.useMemo(()=>o,Object.values(o));return l.jsx(n.Provider,{value:c,children:i})};a.displayName=e+"Provider";function s(r){const i=u.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}return[a,s]}function xa(e,t=[]){let n=[];function a(r,i){const o=u.createContext(i),c=n.length;n=[...n,i];const d=h=>{var g;const{scope:m,children:x,...w}=h,v=((g=m==null?void 0:m[e])==null?void 0:g[c])||o,b=u.useMemo(()=>w,Object.values(w));return l.jsx(v.Provider,{value:b,children:x})};d.displayName=r+"Provider";function f(h,m){var v;const x=((v=m==null?void 0:m[e])==null?void 0:v[c])||o,w=u.useContext(x);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${r}\``)}return[d,f]}const s=()=>{const r=n.map(i=>u.createContext(i));return function(o){const c=(o==null?void 0:o[e])||r;return u.useMemo(()=>({[`__scope${e}`]:{...o,[e]:c}}),[o,c])}};return s.scopeName=e,[a,D2(s,...t)]}function D2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(r){const i=a.reduce((o,{useScope:c,scopeName:d})=>{const h=c(r)[`__scope${d}`];return{...o,...h}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Tt=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},z2=vx[" useId ".trim().toString()]||(()=>{}),$2=0;function Dn(e){const[t,n]=u.useState(z2());return Tt(()=>{n(a=>a??String($2++))},[e]),t?`radix-${t}`:""}var L2=vx[" useInsertionEffect ".trim().toString()]||Tt;function Cs({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[s,r,i]=U2({defaultProp:t,onChange:n}),o=e!==void 0,c=o?e:s;{const f=u.useRef(e!==void 0);u.useEffect(()=>{const h=f.current;h!==o&&console.warn(`${a} is changing from ${h?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=o},[o,a])}const d=u.useCallback(f=>{var h;if(o){const m=H2(f)?f(e):f;m!==e&&((h=i.current)==null||h.call(i,m))}else r(f)},[o,e,r,i]);return[c,d]}function U2({defaultProp:e,onChange:t}){const[n,a]=u.useState(e),s=u.useRef(n),r=u.useRef(t);return L2(()=>{r.current=t},[t]),u.useEffect(()=>{var i;s.current!==n&&((i=r.current)==null||i.call(r,n),s.current=n)},[n,s]),[n,a,r]}function H2(e){return typeof e=="function"}function Ts(e){const t=q2(e),n=u.forwardRef((a,s)=>{const{children:r,...i}=a,o=u.Children.toArray(r),c=o.find(V2);if(c){const d=c.props.children,f=o.map(h=>h===c?u.Children.count(d)>1?u.Children.only(null):u.isValidElement(d)?d.props.children:null:h);return l.jsx(t,{...i,ref:s,children:u.isValidElement(d)?u.cloneElement(d,void 0,f):null})}return l.jsx(t,{...i,ref:s,children:r})});return n.displayName=`${e}.Slot`,n}var B2=Ts("Slot");function q2(e){const t=u.forwardRef((n,a)=>{const{children:s,...r}=n;if(u.isValidElement(s)){const i=I2(s),o=Y2(r,s.props);return s.type!==u.Fragment&&(o.ref=a?Bc(a,i):i),u.cloneElement(s,o)}return u.Children.count(s)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var G2=Symbol("radix.slottable");function V2(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===G2}function Y2(e,t){const n={...t};for(const a in t){const s=e[a],r=t[a];/^on[A-Z]/.test(a)?s&&r?n[a]=(...o)=>{const c=r(...o);return s(...o),c}:s&&(n[a]=s):a==="style"?n[a]={...s,...r}:a==="className"&&(n[a]=[s,r].filter(Boolean).join(" "))}return{...e,...n}}function I2(e){var a,s;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var P2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],me=P2.reduce((e,t)=>{const n=Ts(`Primitive.${t}`),a=u.forwardRef((s,r)=>{const{asChild:i,...o}=s,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...o,ref:r})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function Mb(e,t){e&&Hl.flushSync(()=>e.dispatchEvent(t))}function Hn(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var a;return(a=t.current)==null?void 0:a.call(t,...n)},[])}function X2(e,t=globalThis==null?void 0:globalThis.document){const n=Hn(e);u.useEffect(()=>{const a=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var K2="DismissableLayer",vf="dismissableLayer.update",Q2="dismissableLayer.pointerDownOutside",Z2="dismissableLayer.focusOutside",vg,Ob=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qc=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:r,onInteractOutside:i,onDismiss:o,...c}=e,d=u.useContext(Ob),[f,h]=u.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=u.useState({}),w=Me(t,N=>h(N)),v=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(b),p=f?v.indexOf(f):-1,y=d.layersWithOutsidePointerEventsDisabled.size>0,j=p>=g,_=J2(N=>{const S=N.target,R=[...d.branches].some(A=>A.contains(S));!j||R||(s==null||s(N),i==null||i(N),N.defaultPrevented||o==null||o())},m),k=eC(N=>{const S=N.target;[...d.branches].some(A=>A.contains(S))||(r==null||r(N),i==null||i(N),N.defaultPrevented||o==null||o())},m);return X2(N=>{p===d.layers.size-1&&(a==null||a(N),!N.defaultPrevented&&o&&(N.preventDefault(),o()))},m),u.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(vg=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),yg(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=vg)}},[f,m,n,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),yg())},[f,d]),u.useEffect(()=>{const N=()=>x({});return document.addEventListener(vf,N),()=>document.removeEventListener(vf,N)},[]),l.jsx(me.div,{...c,ref:w,style:{pointerEvents:y?j?"auto":"none":void 0,...e.style},onFocusCapture:J(e.onFocusCapture,k.onFocusCapture),onBlurCapture:J(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,_.onPointerDownCapture)})});qc.displayName=K2;var F2="DismissableLayerBranch",W2=u.forwardRef((e,t)=>{const n=u.useContext(Ob),a=u.useRef(null),s=Me(t,a);return u.useEffect(()=>{const r=a.current;if(r)return n.branches.add(r),()=>{n.branches.delete(r)}},[n.branches]),l.jsx(me.div,{...e,ref:s})});W2.displayName=F2;function J2(e,t=globalThis==null?void 0:globalThis.document){const n=Hn(e),a=u.useRef(!1),s=u.useRef(()=>{});return u.useEffect(()=>{const r=o=>{if(o.target&&!a.current){let c=function(){Db(Q2,n,d,{discrete:!0})};const d={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);a.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",r),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function eC(e,t=globalThis==null?void 0:globalThis.document){const n=Hn(e),a=u.useRef(!1);return u.useEffect(()=>{const s=r=>{r.target&&!a.current&&Db(Z2,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function yg(){const e=new CustomEvent(vf);document.dispatchEvent(e)}function Db(e,t,n,{discrete:a}){const s=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),a?Mb(s,r):s.dispatchEvent(r)}var Ju="focusScope.autoFocusOnMount",ed="focusScope.autoFocusOnUnmount",bg={bubbles:!1,cancelable:!0},tC="FocusScope",Gc=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:s,onUnmountAutoFocus:r,...i}=e,[o,c]=u.useState(null),d=Hn(s),f=Hn(r),h=u.useRef(null),m=Me(t,v=>c(v)),x=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(a){let v=function(y){if(x.paused||!o)return;const j=y.target;o.contains(j)?h.current=j:Ma(h.current,{select:!0})},b=function(y){if(x.paused||!o)return;const j=y.relatedTarget;j!==null&&(o.contains(j)||Ma(h.current,{select:!0}))},g=function(y){if(document.activeElement===document.body)for(const _ of y)_.removedNodes.length>0&&Ma(o)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const p=new MutationObserver(g);return o&&p.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),p.disconnect()}}},[a,o,x.paused]),u.useEffect(()=>{if(o){wg.add(x);const v=document.activeElement;if(!o.contains(v)){const g=new CustomEvent(Ju,bg);o.addEventListener(Ju,d),o.dispatchEvent(g),g.defaultPrevented||(nC(iC(zb(o)),{select:!0}),document.activeElement===v&&Ma(o))}return()=>{o.removeEventListener(Ju,d),setTimeout(()=>{const g=new CustomEvent(ed,bg);o.addEventListener(ed,f),o.dispatchEvent(g),g.defaultPrevented||Ma(v??document.body,{select:!0}),o.removeEventListener(ed,f),wg.remove(x)},0)}}},[o,d,f,x]);const w=u.useCallback(v=>{if(!n&&!a||x.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,g=document.activeElement;if(b&&g){const p=v.currentTarget,[y,j]=aC(p);y&&j?!v.shiftKey&&g===j?(v.preventDefault(),n&&Ma(y,{select:!0})):v.shiftKey&&g===y&&(v.preventDefault(),n&&Ma(j,{select:!0})):g===p&&v.preventDefault()}},[n,a,x.paused]);return l.jsx(me.div,{tabIndex:-1,...i,ref:m,onKeyDown:w})});Gc.displayName=tC;function nC(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(Ma(a,{select:t}),document.activeElement!==n)return}function aC(e){const t=zb(e),n=jg(t,e),a=jg(t.reverse(),e);return[n,a]}function zb(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const s=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||s?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function jg(e,t){for(const n of e)if(!sC(n,{upTo:t}))return n}function sC(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function lC(e){return e instanceof HTMLInputElement&&"select"in e}function Ma(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&lC(e)&&t&&e.select()}}var wg=rC();function rC(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=_g(e,t),e.unshift(t)},remove(t){var n;e=_g(e,t),(n=e[0])==null||n.resume()}}}function _g(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function iC(e){return e.filter(t=>t.tagName!=="A")}var oC="Portal",Vc=u.forwardRef((e,t)=>{var o;const{container:n,...a}=e,[s,r]=u.useState(!1);Tt(()=>r(!0),[]);const i=n||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return i?a1.createPortal(l.jsx(me.div,{...a,ref:t}),i):null});Vc.displayName=oC;function cC(e,t){return u.useReducer((n,a)=>t[n][a]??n,e)}var Vn=e=>{const{present:t,children:n}=e,a=uC(t),s=typeof n=="function"?n({present:a.isPresent}):u.Children.only(n),r=Me(a.ref,dC(s));return typeof n=="function"||a.isPresent?u.cloneElement(s,{ref:r}):null};Vn.displayName="Presence";function uC(e){const[t,n]=u.useState(),a=u.useRef(null),s=u.useRef(e),r=u.useRef("none"),i=e?"mounted":"unmounted",[o,c]=cC(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const d=eo(a.current);r.current=o==="mounted"?d:"none"},[o]),Tt(()=>{const d=a.current,f=s.current;if(f!==e){const m=r.current,x=eo(d);e?c("MOUNT"):x==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&m!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Tt(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=x=>{const v=eo(a.current).includes(x.animationName);if(x.target===t&&v&&(c("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=x=>{x.target===t&&(r.current=eo(a.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:u.useCallback(d=>{a.current=d?getComputedStyle(d):null,n(d)},[])}}function eo(e){return(e==null?void 0:e.animationName)||"none"}function dC(e){var a,s;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var td=0;function Vh(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ng()),document.body.insertAdjacentElement("beforeend",e[1]??Ng()),td++,()=>{td===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),td--}},[])}function Ng(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Tn=function(){return Tn=Object.assign||function(t){for(var n,a=1,s=arguments.length;a<s;a++){n=arguments[a];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Tn.apply(this,arguments)};function $b(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(e);s<a.length;s++)t.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(n[a[s]]=e[a[s]]);return n}function fC(e,t,n){if(n||arguments.length===2)for(var a=0,s=t.length,r;a<s;a++)(r||!(a in t))&&(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}var So="right-scroll-bar-position",ko="width-before-scroll-bar",hC="with-scroll-bars-hidden",mC="--removed-body-scroll-bar-size";function nd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pC(e,t){var n=u.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(a){var s=n.value;s!==a&&(n.value=a,n.callback(a,s))}}}})[0];return n.callback=t,n.facade}var gC=typeof window<"u"?u.useLayoutEffect:u.useEffect,Sg=new WeakMap;function xC(e,t){var n=pC(null,function(a){return e.forEach(function(s){return nd(s,a)})});return gC(function(){var a=Sg.get(n);if(a){var s=new Set(a),r=new Set(e),i=n.current;s.forEach(function(o){r.has(o)||nd(o,null)}),r.forEach(function(o){s.has(o)||nd(o,i)})}Sg.set(n,e)},[e]),n}function vC(e){return e}function yC(e,t){t===void 0&&(t=vC);var n=[],a=!1,s={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(r){var i=t(r,a);return n.push(i),function(){n=n.filter(function(o){return o!==i})}},assignSyncMedium:function(r){for(a=!0;n.length;){var i=n;n=[],i.forEach(r)}n={push:function(o){return r(o)},filter:function(){return n}}},assignMedium:function(r){a=!0;var i=[];if(n.length){var o=n;n=[],o.forEach(r),i=n}var c=function(){var f=i;i=[],f.forEach(r)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),n}}}};return s}function bC(e){e===void 0&&(e={});var t=yC(null);return t.options=Tn({async:!0,ssr:!1},e),t}var Lb=function(e){var t=e.sideCar,n=$b(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return u.createElement(a,Tn({},n))};Lb.isSideCarExport=!0;function jC(e,t){return e.useMedium(t),Lb}var Ub=bC(),ad=function(){},Yc=u.forwardRef(function(e,t){var n=u.useRef(null),a=u.useState({onScrollCapture:ad,onWheelCapture:ad,onTouchMoveCapture:ad}),s=a[0],r=a[1],i=e.forwardProps,o=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,h=e.shards,m=e.sideCar,x=e.noRelative,w=e.noIsolation,v=e.inert,b=e.allowPinchZoom,g=e.as,p=g===void 0?"div":g,y=e.gapMode,j=$b(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=m,k=xC([n,t]),N=Tn(Tn({},j),s);return u.createElement(u.Fragment,null,f&&u.createElement(_,{sideCar:Ub,removeScrollBar:d,shards:h,noRelative:x,noIsolation:w,inert:v,setCallbacks:r,allowPinchZoom:!!b,lockRef:n,gapMode:y}),i?u.cloneElement(u.Children.only(o),Tn(Tn({},N),{ref:k})):u.createElement(p,Tn({},N,{className:c,ref:k}),o))});Yc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yc.classNames={fullWidth:ko,zeroRight:So};var wC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _C(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wC();return t&&e.setAttribute("nonce",t),e}function NC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function SC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kC=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_C())&&(NC(t,n),SC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},CC=function(){var e=kC();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Hb=function(){var e=CC(),t=function(n){var a=n.styles,s=n.dynamic;return e(a,s),null};return t},TC={left:0,top:0,right:0,gap:0},sd=function(e){return parseInt(e||"",10)||0},EC=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[sd(n),sd(a),sd(s)]},RC=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return TC;var t=EC(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},AC=Hb(),_l="data-scroll-locked",MC=function(e,t,n,a){var s=e.left,r=e.top,i=e.right,o=e.gap;return n===void 0&&(n="margin"),`
|
|
290
|
+
.`.concat(hC,` {
|
|
291
|
+
overflow: hidden `).concat(a,`;
|
|
292
|
+
padding-right: `).concat(o,"px ").concat(a,`;
|
|
293
|
+
}
|
|
294
|
+
body[`).concat(_l,`] {
|
|
295
|
+
overflow: hidden `).concat(a,`;
|
|
296
|
+
overscroll-behavior: contain;
|
|
297
|
+
`).concat([t&&"position: relative ".concat(a,";"),n==="margin"&&`
|
|
298
|
+
padding-left: `.concat(s,`px;
|
|
299
|
+
padding-top: `).concat(r,`px;
|
|
300
|
+
padding-right: `).concat(i,`px;
|
|
301
|
+
margin-left:0;
|
|
302
|
+
margin-top:0;
|
|
303
|
+
margin-right: `).concat(o,"px ").concat(a,`;
|
|
304
|
+
`),n==="padding"&&"padding-right: ".concat(o,"px ").concat(a,";")].filter(Boolean).join(""),`
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.`).concat(So,` {
|
|
308
|
+
right: `).concat(o,"px ").concat(a,`;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.`).concat(ko,` {
|
|
312
|
+
margin-right: `).concat(o,"px ").concat(a,`;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.`).concat(So," .").concat(So,` {
|
|
316
|
+
right: 0 `).concat(a,`;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.`).concat(ko," .").concat(ko,` {
|
|
320
|
+
margin-right: 0 `).concat(a,`;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
body[`).concat(_l,`] {
|
|
324
|
+
`).concat(mC,": ").concat(o,`px;
|
|
325
|
+
}
|
|
326
|
+
`)},kg=function(){var e=parseInt(document.body.getAttribute(_l)||"0",10);return isFinite(e)?e:0},OC=function(){u.useEffect(function(){return document.body.setAttribute(_l,(kg()+1).toString()),function(){var e=kg()-1;e<=0?document.body.removeAttribute(_l):document.body.setAttribute(_l,e.toString())}},[])},DC=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,s=a===void 0?"margin":a;OC();var r=u.useMemo(function(){return RC(s)},[s]);return u.createElement(AC,{styles:MC(r,!t,s,n?"":"!important")})},yf=!1;if(typeof window<"u")try{var to=Object.defineProperty({},"passive",{get:function(){return yf=!0,!0}});window.addEventListener("test",to,to),window.removeEventListener("test",to,to)}catch{yf=!1}var Xs=yf?{passive:!1}:!1,zC=function(e){return e.tagName==="TEXTAREA"},Bb=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!zC(e)&&n[t]==="visible")},$C=function(e){return Bb(e,"overflowY")},LC=function(e){return Bb(e,"overflowX")},Cg=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var s=qb(e,a);if(s){var r=Gb(e,a),i=r[1],o=r[2];if(i>o)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},UC=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},HC=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},qb=function(e,t){return e==="v"?$C(t):LC(t)},Gb=function(e,t){return e==="v"?UC(t):HC(t)},BC=function(e,t){return e==="h"&&t==="rtl"?-1:1},qC=function(e,t,n,a,s){var r=BC(e,window.getComputedStyle(t).direction),i=r*a,o=n.target,c=t.contains(o),d=!1,f=i>0,h=0,m=0;do{if(!o)break;var x=Gb(e,o),w=x[0],v=x[1],b=x[2],g=v-b-r*w;(w||g)&&qb(e,o)&&(h+=g,m+=w);var p=o.parentNode;o=p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE?p.host:p}while(!c&&o!==document.body||c&&(t.contains(o)||t===o));return(f&&Math.abs(h)<1||!f&&Math.abs(m)<1)&&(d=!0),d},no=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Tg=function(e){return[e.deltaX,e.deltaY]},Eg=function(e){return e&&"current"in e?e.current:e},GC=function(e,t){return e[0]===t[0]&&e[1]===t[1]},VC=function(e){return`
|
|
327
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
328
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
329
|
+
`)},YC=0,Ks=[];function IC(e){var t=u.useRef([]),n=u.useRef([0,0]),a=u.useRef(),s=u.useState(YC++)[0],r=u.useState(Hb)[0],i=u.useRef(e);u.useEffect(function(){i.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var v=fC([e.lockRef.current],(e.shards||[]).map(Eg),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var o=u.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var g=no(v),p=n.current,y="deltaX"in v?v.deltaX:p[0]-g[0],j="deltaY"in v?v.deltaY:p[1]-g[1],_,k=v.target,N=Math.abs(y)>Math.abs(j)?"h":"v";if("touches"in v&&N==="h"&&k.type==="range")return!1;var S=Cg(N,k);if(!S)return!0;if(S?_=N:(_=N==="v"?"h":"v",S=Cg(N,k)),!S)return!1;if(!a.current&&"changedTouches"in v&&(y||j)&&(a.current=_),!_)return!0;var R=a.current||_;return qC(R,b,v,R==="h"?y:j)},[]),c=u.useCallback(function(v){var b=v;if(!(!Ks.length||Ks[Ks.length-1]!==r)){var g="deltaY"in b?Tg(b):no(b),p=t.current.filter(function(_){return _.name===b.type&&(_.target===b.target||b.target===_.shadowParent)&&GC(_.delta,g)})[0];if(p&&p.should){b.cancelable&&b.preventDefault();return}if(!p){var y=(i.current.shards||[]).map(Eg).filter(Boolean).filter(function(_){return _.contains(b.target)}),j=y.length>0?o(b,y[0]):!i.current.noIsolation;j&&b.cancelable&&b.preventDefault()}}},[]),d=u.useCallback(function(v,b,g,p){var y={name:v,delta:b,target:g,should:p,shadowParent:PC(g)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(j){return j!==y})},1)},[]),f=u.useCallback(function(v){n.current=no(v),a.current=void 0},[]),h=u.useCallback(function(v){d(v.type,Tg(v),v.target,o(v,e.lockRef.current))},[]),m=u.useCallback(function(v){d(v.type,no(v),v.target,o(v,e.lockRef.current))},[]);u.useEffect(function(){return Ks.push(r),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Xs),document.addEventListener("touchmove",c,Xs),document.addEventListener("touchstart",f,Xs),function(){Ks=Ks.filter(function(v){return v!==r}),document.removeEventListener("wheel",c,Xs),document.removeEventListener("touchmove",c,Xs),document.removeEventListener("touchstart",f,Xs)}},[]);var x=e.removeScrollBar,w=e.inert;return u.createElement(u.Fragment,null,w?u.createElement(r,{styles:VC(s)}):null,x?u.createElement(DC,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function PC(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const XC=jC(Ub,IC);var Ic=u.forwardRef(function(e,t){return u.createElement(Yc,Tn({},e,{ref:t,sideCar:XC}))});Ic.classNames=Yc.classNames;var KC=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qs=new WeakMap,ao=new WeakMap,so={},ld=0,Vb=function(e){return e&&(e.host||Vb(e.parentNode))},QC=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=Vb(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ZC=function(e,t,n,a){var s=QC(t,Array.isArray(e)?e:[e]);so[n]||(so[n]=new WeakMap);var r=so[n],i=[],o=new Set,c=new Set(s),d=function(h){!h||o.has(h)||(o.add(h),d(h.parentNode))};s.forEach(d);var f=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(m){if(o.has(m))f(m);else try{var x=m.getAttribute(a),w=x!==null&&x!=="false",v=(Qs.get(m)||0)+1,b=(r.get(m)||0)+1;Qs.set(m,v),r.set(m,b),i.push(m),v===1&&w&&ao.set(m,!0),b===1&&m.setAttribute(n,"true"),w||m.setAttribute(a,"true")}catch(g){console.error("aria-hidden: cannot operate on ",m,g)}})};return f(t),o.clear(),ld++,function(){i.forEach(function(h){var m=Qs.get(h)-1,x=r.get(h)-1;Qs.set(h,m),r.set(h,x),m||(ao.has(h)||h.removeAttribute(a),ao.delete(h)),x||h.removeAttribute(n)}),ld--,ld||(Qs=new WeakMap,Qs=new WeakMap,ao=new WeakMap,so={})}},Yh=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),s=KC(e);return s?(a.push.apply(a,Array.from(s.querySelectorAll("[aria-live], script"))),ZC(a,s,n,"aria-hidden")):function(){return null}},Pc="Dialog",[Yb]=xa(Pc),[FC,Sn]=Yb(Pc),Ib=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:s,onOpenChange:r,modal:i=!0}=e,o=u.useRef(null),c=u.useRef(null),[d,f]=Cs({prop:a,defaultProp:s??!1,onChange:r,caller:Pc});return l.jsx(FC,{scope:t,triggerRef:o,contentRef:c,contentId:Dn(),titleId:Dn(),descriptionId:Dn(),open:d,onOpenChange:f,onOpenToggle:u.useCallback(()=>f(h=>!h),[f]),modal:i,children:n})};Ib.displayName=Pc;var Pb="DialogTrigger",WC=u.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Sn(Pb,n),r=Me(t,s.triggerRef);return l.jsx(me.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Xh(s.open),...a,ref:r,onClick:J(e.onClick,s.onOpenToggle)})});WC.displayName=Pb;var Ih="DialogPortal",[JC,Xb]=Yb(Ih,{forceMount:void 0}),Kb=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:s}=e,r=Sn(Ih,t);return l.jsx(JC,{scope:t,forceMount:n,children:u.Children.map(a,i=>l.jsx(Vn,{present:n||r.open,children:l.jsx(Vc,{asChild:!0,container:s,children:i})}))})};Kb.displayName=Ih;var ic="DialogOverlay",Qb=u.forwardRef((e,t)=>{const n=Xb(ic,e.__scopeDialog),{forceMount:a=n.forceMount,...s}=e,r=Sn(ic,e.__scopeDialog);return r.modal?l.jsx(Vn,{present:a||r.open,children:l.jsx(tT,{...s,ref:t})}):null});Qb.displayName=ic;var eT=Ts("DialogOverlay.RemoveScroll"),tT=u.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Sn(ic,n);return l.jsx(Ic,{as:eT,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(me.div,{"data-state":Xh(s.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),Es="DialogContent",Zb=u.forwardRef((e,t)=>{const n=Xb(Es,e.__scopeDialog),{forceMount:a=n.forceMount,...s}=e,r=Sn(Es,e.__scopeDialog);return l.jsx(Vn,{present:a||r.open,children:r.modal?l.jsx(nT,{...s,ref:t}):l.jsx(aT,{...s,ref:t})})});Zb.displayName=Es;var nT=u.forwardRef((e,t)=>{const n=Sn(Es,e.__scopeDialog),a=u.useRef(null),s=Me(t,n.contentRef,a);return u.useEffect(()=>{const r=a.current;if(r)return Yh(r)},[]),l.jsx(Fb,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(e.onCloseAutoFocus,r=>{var i;r.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,r=>{const i=r.detail.originalEvent,o=i.button===0&&i.ctrlKey===!0;(i.button===2||o)&&r.preventDefault()}),onFocusOutside:J(e.onFocusOutside,r=>r.preventDefault())})}),aT=u.forwardRef((e,t)=>{const n=Sn(Es,e.__scopeDialog),a=u.useRef(!1),s=u.useRef(!1);return l.jsx(Fb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var i,o;(i=e.onCloseAutoFocus)==null||i.call(e,r),r.defaultPrevented||(a.current||(o=n.triggerRef.current)==null||o.focus(),r.preventDefault()),a.current=!1,s.current=!1},onInteractOutside:r=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=r.target;((d=n.triggerRef.current)==null?void 0:d.contains(i))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&s.current&&r.preventDefault()}})}),Fb=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:r,...i}=e,o=Sn(Es,n),c=u.useRef(null),d=Me(t,c);return Vh(),l.jsxs(l.Fragment,{children:[l.jsx(Gc,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:s,onUnmountAutoFocus:r,children:l.jsx(qc,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":Xh(o.open),...i,ref:d,onDismiss:()=>o.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(sT,{titleId:o.titleId}),l.jsx(rT,{contentRef:c,descriptionId:o.descriptionId})]})]})}),Ph="DialogTitle",Wb=u.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Sn(Ph,n);return l.jsx(me.h2,{id:s.titleId,...a,ref:t})});Wb.displayName=Ph;var Jb="DialogDescription",e0=u.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Sn(Jb,n);return l.jsx(me.p,{id:s.descriptionId,...a,ref:t})});e0.displayName=Jb;var t0="DialogClose",n0=u.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Sn(t0,n);return l.jsx(me.button,{type:"button",...a,ref:t,onClick:J(e.onClick,()=>s.onOpenChange(!1))})});n0.displayName=t0;function Xh(e){return e?"open":"closed"}var a0="DialogTitleWarning",[l4,s0]=O2(a0,{contentName:Es,titleName:Ph,docsSlug:"dialog"}),sT=({titleId:e})=>{const t=s0(a0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
330
|
+
|
|
331
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
332
|
+
|
|
333
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},lT="DialogDescriptionWarning",rT=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${s0(lT).contentName}}.`;return u.useEffect(()=>{var r;const s=(r=e.current)==null?void 0:r.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},l0=Ib,r0=Kb,i0=Qb,o0=Zb,c0=Wb,u0=e0,Kh=n0;function d0({className:e,...t}){return l.jsx(Ek,{role:"status","aria-label":"Loading",className:F("size-4 animate-spin",e),...t})}const Co="aria-pressed:border aria-pressed:border-primary aria-pressed:bg-accent aria-pressed:text-accent-foreground",Qh=bi("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",success:"bg-success text-success-foreground hover:bg-success/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",text:"underline-offset-2 hover:underline"},size:{"inline-sm":"p-1 text-sm",inline:"p-1 text-base",default:"h-9 px-4 py-2 text-sm",sm:"h-8 px-3 text-sm",control:"h-7 px-2 text-xs",lg:"h-10 px-6 text-base",icon:"size-9 text-sm","sm-icon":"size-8 text-sm","control-icon":"size-7 text-xs","xs-icon":"size-6 text-xs"}},defaultVariants:{variant:"default",size:"default"}}),I=u.forwardRef(({className:e,disabled:t,variant:n,size:a,asChild:s=!1,loading:r,children:i,...o},c)=>{const d=s?B2:"button",f=a==="icon"||a==="sm-icon"||a==="control-icon"||a==="xs-icon",h=l.jsx(d0,{"aria-hidden":"true","aria-label":void 0,role:void 0,className:F(!f&&"mr-2")}),m=s?i:r&&f?h:l.jsxs(l.Fragment,{children:[r?h:null,i]});return l.jsx(d,{className:F(Qh({variant:n,size:a,className:e})),ref:c,disabled:t||r,...o,children:m})});I.displayName="Button";const f0=u.createContext(null);function iT({container:e,children:t}){return l.jsx(f0.Provider,{value:e,children:t})}function Xc(){return u.useContext(f0)??void 0}function oT(e){return l.jsx(l0,{"data-slot":"alert-dialog",...e})}function cT({className:e,...t}){return l.jsx(i0,{"data-slot":"alert-dialog-overlay",className:F("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function uT({className:e,onOpenAutoFocus:t,onPointerDownOutside:n,onInteractOutside:a,...s}){return l.jsxs(r0,{container:Xc(),children:[l.jsx(cT,{}),l.jsx(o0,{"data-slot":"alert-dialog-content",role:"alertdialog",className:F("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),onOpenAutoFocus:r=>{if(t==null||t(r),r.defaultPrevented)return;const i=r.currentTarget,o=i instanceof HTMLElement?i.querySelector('[data-slot="alert-dialog-cancel"]'):null;o&&(r.preventDefault(),o.focus())},onPointerDownOutside:r=>{n==null||n(r),r.preventDefault()},onInteractOutside:r=>{a==null||a(r),r.preventDefault()},...s})]})}function dT({className:e,...t}){return l.jsx("div",{"data-slot":"alert-dialog-header",className:F("flex flex-col gap-2 text-center sm:text-left",e),...t})}function fT({className:e,...t}){return l.jsx("div",{"data-slot":"alert-dialog-footer",className:F("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function hT({className:e,...t}){return l.jsx(c0,{"data-slot":"alert-dialog-title",className:F("text-lg font-semibold",e),...t})}function mT({className:e,...t}){return l.jsx(u0,{"data-slot":"alert-dialog-description",className:F("text-muted-foreground text-sm",e),...t})}function pT({className:e,variant:t,...n}){return l.jsx(Kh,{"data-slot":"alert-dialog-action",className:F(Qh({variant:t}),e),...n})}function gT({className:e,...t}){return l.jsx(Kh,{"data-slot":"alert-dialog-cancel",className:F(Qh({variant:"outline"}),e),...t})}function xT(){if(typeof document>"u")return null;const e=document.activeElement;if(!(e instanceof HTMLElement)||e===document.body)return null;const t=e.closest('[role="menu"]');if(t!=null&&t.id){const n=document.querySelector(`[aria-controls="${CSS.escape(t.id)}"]`);if(n)return n}return e}function vT(e,t){t!=null&&t.isConnected&&(e.preventDefault(),t.focus())}function ji(){const[e,t]=u.useState(null),n=u.useRef(null),a=u.useRef(null),s=u.useCallback(o=>{var c;(c=n.current)==null||c.resolve(o),n.current=null,t(null)},[]),r=u.useCallback(o=>new Promise(c=>{var f;(f=n.current)==null||f.resolve(!1),a.current=xT();const d={...o,resolve:c};n.current=d,t(d)}),[]);u.useEffect(()=>()=>{var o;return(o=n.current)==null?void 0:o.resolve(!1)},[]);const i=l.jsx(oT,{open:e!==null,onOpenChange:o=>{o||s(!1)},children:l.jsxs(uT,{onCloseAutoFocus:o=>vT(o,a.current),children:[l.jsxs(dT,{children:[l.jsx(hT,{children:e==null?void 0:e.title}),l.jsx(mT,{className:"whitespace-pre-line",children:e==null?void 0:e.description})]}),l.jsxs(fT,{children:[l.jsx(gT,{children:"Cancel"}),l.jsx(pT,{variant:e!=null&&e.destructive?"destructive":"default",onClick:()=>s(!0),children:e==null?void 0:e.action_label})]})]})});return{confirm:r,confirm_dialog:i}}const Fn="px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",yT=bi("inline-flex items-center rounded-md border transition-colors",{variants:{variant:{default:`${Fn} border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80`,secondary:`${Fn} border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80`,destructive:`${Fn} border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80`,outline:`${Fn} text-foreground`,success:`${Fn} border-success/40 bg-success/10 text-success`,warning:`${Fn} border-warning/40 bg-warning/10 text-warning`,info:`${Fn} border-info/40 bg-info/10 text-info`,error:`${Fn} border-destructive/40 bg-destructive/10 text-destructive`,neutral:`${Fn} border-border bg-muted text-muted-foreground`,count:"h-5 min-w-5 justify-center border-transparent bg-primary px-1 text-2xs font-medium tabular-nums text-primary-foreground"},size:{default:"",dense:"px-1.5 py-0.5 text-2xs font-medium"}},defaultVariants:{variant:"default",size:"default"}});function Fe({className:e,variant:t,size:n,...a}){return l.jsx("div",{className:F(yT({variant:t,size:n}),e),...a})}function h0(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function m0(e){const[t,n]=u.useState(void 0);return Tt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const r=s[0];let i,o;if("borderBoxSize"in r){const c=r.borderBoxSize,d=Array.isArray(c)?c[0]:c;i=d.inlineSize,o=d.blockSize}else i=e.offsetWidth,o=e.offsetHeight;n({width:i,height:o})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var Kc="Checkbox",[bT]=xa(Kc),[jT,Zh]=bT(Kc);function wT(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:s,disabled:r,form:i,name:o,onCheckedChange:c,required:d,value:f="on",internal_do_not_use_render:h}=e,[m,x]=Cs({prop:n,defaultProp:s??!1,onChange:c,caller:Kc}),[w,v]=u.useState(null),[b,g]=u.useState(null),p=u.useRef(!1),y=w?!!i||!!w.closest("form"):!0,j={checked:m,disabled:r,setChecked:x,control:w,setControl:v,name:o,form:i,value:f,hasConsumerStoppedPropagationRef:p,required:d,defaultChecked:Fa(s)?!1:s,isFormControl:y,bubbleInput:b,setBubbleInput:g};return l.jsx(jT,{scope:t,...j,children:_T(h)?h(j):a})}var p0="CheckboxTrigger",g0=u.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},s)=>{const{control:r,value:i,disabled:o,checked:c,required:d,setControl:f,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:x,bubbleInput:w}=Zh(p0,e),v=Me(s,f),b=u.useRef(c);return u.useEffect(()=>{const g=r==null?void 0:r.form;if(g){const p=()=>h(b.current);return g.addEventListener("reset",p),()=>g.removeEventListener("reset",p)}},[r,h]),l.jsx(me.button,{type:"button",role:"checkbox","aria-checked":Fa(c)?"mixed":c,"aria-required":d,"data-state":j0(c),"data-disabled":o?"":void 0,disabled:o,value:i,...a,ref:v,onKeyDown:J(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:J(n,g=>{h(p=>Fa(p)?!0:!p),w&&x&&(m.current=g.isPropagationStopped(),m.current||g.stopPropagation())})})});g0.displayName=p0;var Fh=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:s,defaultChecked:r,required:i,disabled:o,value:c,onCheckedChange:d,form:f,...h}=e;return l.jsx(wT,{__scopeCheckbox:n,checked:s,defaultChecked:r,disabled:o,required:i,onCheckedChange:d,name:a,form:f,value:c,internal_do_not_use_render:({isFormControl:m})=>l.jsxs(l.Fragment,{children:[l.jsx(g0,{...h,ref:t,__scopeCheckbox:n}),m&&l.jsx(b0,{__scopeCheckbox:n})]})})});Fh.displayName=Kc;var x0="CheckboxIndicator",v0=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...s}=e,r=Zh(x0,n);return l.jsx(Vn,{present:a||Fa(r.checked)||r.checked===!0,children:l.jsx(me.span,{"data-state":j0(r.checked),"data-disabled":r.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});v0.displayName=x0;var y0="CheckboxBubbleInput",b0=u.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:s,checked:r,defaultChecked:i,required:o,disabled:c,name:d,value:f,form:h,bubbleInput:m,setBubbleInput:x}=Zh(y0,e),w=Me(n,x),v=h0(r),b=m0(a);u.useEffect(()=>{const p=m;if(!p)return;const y=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(y,"checked").set,k=!s.current;if(v!==r&&_){const N=new Event("click",{bubbles:k});p.indeterminate=Fa(r),_.call(p,Fa(r)?!1:r),p.dispatchEvent(N)}},[m,v,r,s]);const g=u.useRef(Fa(r)?!1:r);return l.jsx(me.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??g.current,required:o,disabled:c,name:d,value:f,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});b0.displayName=y0;function _T(e){return typeof e=="function"}function Fa(e){return e==="indeterminate"}function j0(e){return Fa(e)?"indeterminate":e?"checked":"unchecked"}const Ql=u.forwardRef(({className:e,...t},n)=>l.jsx(Fh,{ref:n,className:F("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=indeterminate]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:text-primary-foreground",e),...t,children:l.jsx(v0,{className:F("flex items-center justify-center text-current"),children:t.checked==="indeterminate"?l.jsx(Ok,{className:"size-4","aria-hidden":"true"}):l.jsx(Pl,{className:"size-4","aria-hidden":"true"})})}));Ql.displayName=Fh.displayName;const NT=bi("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] overflow-y-auto translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",{variants:{size:{sm:"sm:max-w-sm",md:"sm:max-w-lg",lg:"sm:max-w-2xl",xl:"sm:max-w-4xl","2xl":"sm:max-w-6xl",full:"sm:max-w-[calc(100%-2rem)]"}},defaultVariants:{size:"md"}});function wi({...e}){return l.jsx(l0,{"data-slot":"dialog",...e})}function ST({...e}){const t=Xc();return l.jsx(r0,{"data-slot":"dialog-portal",container:t,...e})}function kT({className:e,...t}){return l.jsx(i0,{"data-slot":"dialog-overlay",className:F("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function _i({className:e,children:t,showCloseButton:n=!0,size:a,...s}){return l.jsxs(ST,{"data-slot":"dialog-portal",children:[l.jsx(kT,{}),l.jsxs(o0,{"data-slot":"dialog-content",className:F(NT({size:a}),e),...s,children:[t,n&&l.jsxs(Kh,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-muted-foreground hover:text-foreground absolute top-4 right-4 rounded-xs transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[l.jsx(yb,{}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Ni({className:e,...t}){return l.jsx("div",{"data-slot":"dialog-header",className:F("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Si({className:e,...t}){return l.jsx("div",{"data-slot":"dialog-footer",className:F("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function ki({className:e,...t}){return l.jsx(c0,{"data-slot":"dialog-title",className:F("text-lg leading-none font-semibold",e),...t})}function Ci({className:e,...t}){return l.jsx(u0,{"data-slot":"dialog-description",className:F("text-muted-foreground text-sm",e),...t})}function Wh(e){const t=e+"CollectionProvider",[n,a]=xa(t),[s,r]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:b,children:g}=v,p=Ra.useRef(null),y=Ra.useRef(new Map).current;return l.jsx(s,{scope:b,itemMap:y,collectionRef:p,children:g})};i.displayName=t;const o=e+"CollectionSlot",c=Ts(o),d=Ra.forwardRef((v,b)=>{const{scope:g,children:p}=v,y=r(o,g),j=Me(b,y.collectionRef);return l.jsx(c,{ref:j,children:p})});d.displayName=o;const f=e+"CollectionItemSlot",h="data-radix-collection-item",m=Ts(f),x=Ra.forwardRef((v,b)=>{const{scope:g,children:p,...y}=v,j=Ra.useRef(null),_=Me(b,j),k=r(f,g);return Ra.useEffect(()=>(k.itemMap.set(j,{ref:j,...y}),()=>void k.itemMap.delete(j))),l.jsx(m,{[h]:"",ref:_,children:p})});x.displayName=f;function w(v){const b=r(e+"CollectionConsumer",v);return Ra.useCallback(()=>{const p=b.collectionRef.current;if(!p)return[];const y=Array.from(p.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((k,N)=>y.indexOf(k.ref.current)-y.indexOf(N.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:d,ItemSlot:x},w,a]}var CT=u.createContext(void 0);function Qc(e){const t=u.useContext(CT);return e||t||"ltr"}const TT=["top","right","bottom","left"],ts=Math.min,Pt=Math.max,oc=Math.round,lo=Math.floor,zn=e=>({x:e,y:e}),ET={left:"right",right:"left",bottom:"top",top:"bottom"},RT={start:"end",end:"start"};function bf(e,t,n){return Pt(e,ts(t,n))}function ha(e,t){return typeof e=="function"?e(t):e}function ma(e){return e.split("-")[0]}function Zl(e){return e.split("-")[1]}function Jh(e){return e==="x"?"y":"x"}function em(e){return e==="y"?"height":"width"}function Rn(e){return["top","bottom"].includes(ma(e))?"y":"x"}function tm(e){return Jh(Rn(e))}function AT(e,t,n){n===void 0&&(n=!1);const a=Zl(e),s=tm(e),r=em(s);let i=s==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=cc(i)),[i,cc(i)]}function MT(e){const t=cc(e);return[jf(e),t,jf(t)]}function jf(e){return e.replace(/start|end/g,t=>RT[t])}function OT(e,t,n){const a=["left","right"],s=["right","left"],r=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:a:t?a:s;case"left":case"right":return t?r:i;default:return[]}}function DT(e,t,n,a){const s=Zl(e);let r=OT(ma(e),n==="start",a);return s&&(r=r.map(i=>i+"-"+s),t&&(r=r.concat(r.map(jf)))),r}function cc(e){return e.replace(/left|right|bottom|top/g,t=>ET[t])}function zT(e){return{top:0,right:0,bottom:0,left:0,...e}}function w0(e){return typeof e!="number"?zT(e):{top:e,right:e,bottom:e,left:e}}function uc(e){const{x:t,y:n,width:a,height:s}=e;return{width:a,height:s,top:n,left:t,right:t+a,bottom:n+s,x:t,y:n}}function Rg(e,t,n){let{reference:a,floating:s}=e;const r=Rn(t),i=tm(t),o=em(i),c=ma(t),d=r==="y",f=a.x+a.width/2-s.width/2,h=a.y+a.height/2-s.height/2,m=a[o]/2-s[o]/2;let x;switch(c){case"top":x={x:f,y:a.y-s.height};break;case"bottom":x={x:f,y:a.y+a.height};break;case"right":x={x:a.x+a.width,y:h};break;case"left":x={x:a.x-s.width,y:h};break;default:x={x:a.x,y:a.y}}switch(Zl(t)){case"start":x[i]-=m*(n&&d?-1:1);break;case"end":x[i]+=m*(n&&d?-1:1);break}return x}const $T=async(e,t,n)=>{const{placement:a="bottom",strategy:s="absolute",middleware:r=[],platform:i}=n,o=r.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:h}=Rg(d,a,c),m=a,x={},w=0;for(let v=0;v<o.length;v++){const{name:b,fn:g}=o[v],{x:p,y,data:j,reset:_}=await g({x:f,y:h,initialPlacement:a,placement:m,strategy:s,middlewareData:x,rects:d,platform:i,elements:{reference:e,floating:t}});f=p??f,h=y??h,x={...x,[b]:{...x[b],...j}},_&&w<=50&&(w++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(d=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:f,y:h}=Rg(d,m,c)),v=-1)}return{x:f,y:h,placement:m,strategy:s,middlewareData:x}};async function Wr(e,t){var n;t===void 0&&(t={});const{x:a,y:s,platform:r,rects:i,elements:o,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:x=0}=ha(t,e),w=w0(x),b=o[m?h==="floating"?"reference":"floating":h],g=uc(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(b)))==null||n?b:b.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(o.floating)),boundary:d,rootBoundary:f,strategy:c})),p=h==="floating"?{x:a,y:s,width:i.floating.width,height:i.floating.height}:i.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(o.floating)),j=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},_=uc(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:p,offsetParent:y,strategy:c}):p);return{top:(g.top-_.top+w.top)/j.y,bottom:(_.bottom-g.bottom+w.bottom)/j.y,left:(g.left-_.left+w.left)/j.x,right:(_.right-g.right+w.right)/j.x}}const LT=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:s,rects:r,platform:i,elements:o,middlewareData:c}=t,{element:d,padding:f=0}=ha(e,t)||{};if(d==null)return{};const h=w0(f),m={x:n,y:a},x=tm(s),w=em(x),v=await i.getDimensions(d),b=x==="y",g=b?"top":"left",p=b?"bottom":"right",y=b?"clientHeight":"clientWidth",j=r.reference[w]+r.reference[x]-m[x]-r.floating[w],_=m[x]-r.reference[x],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let N=k?k[y]:0;(!N||!await(i.isElement==null?void 0:i.isElement(k)))&&(N=o.floating[y]||r.floating[w]);const S=j/2-_/2,R=N/2-v[w]/2-1,A=ts(h[g],R),z=ts(h[p],R),q=A,O=N-v[w]-z,$=N/2-v[w]/2+S,G=bf(q,$,O),E=!c.arrow&&Zl(s)!=null&&$!==G&&r.reference[w]/2-($<q?A:z)-v[w]/2<0,B=E?$<q?$-q:$-O:0;return{[x]:m[x]+B,data:{[x]:G,centerOffset:$-G-B,...E&&{alignmentOffset:B}},reset:E}}}),UT=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:s,middlewareData:r,rects:i,initialPlacement:o,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:v=!0,...b}=ha(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const g=ma(s),p=Rn(o),y=ma(o)===o,j=await(c.isRTL==null?void 0:c.isRTL(d.floating)),_=m||(y||!v?[cc(o)]:MT(o)),k=w!=="none";!m&&k&&_.push(...DT(o,v,w,j));const N=[o,..._],S=await Wr(t,b),R=[];let A=((a=r.flip)==null?void 0:a.overflows)||[];if(f&&R.push(S[g]),h){const $=AT(s,i,j);R.push(S[$[0]],S[$[1]])}if(A=[...A,{placement:s,overflows:R}],!R.every($=>$<=0)){var z,q;const $=(((z=r.flip)==null?void 0:z.index)||0)+1,G=N[$];if(G&&(!(h==="alignment"?p!==Rn(G):!1)||A.every(C=>C.overflows[0]>0&&Rn(C.placement)===p)))return{data:{index:$,overflows:A},reset:{placement:G}};let E=(q=A.filter(B=>B.overflows[0]<=0).sort((B,C)=>B.overflows[1]-C.overflows[1])[0])==null?void 0:q.placement;if(!E)switch(x){case"bestFit":{var O;const B=(O=A.filter(C=>{if(k){const L=Rn(C.placement);return L===p||L==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(L=>L>0).reduce((L,P)=>L+P,0)]).sort((C,L)=>C[1]-L[1])[0])==null?void 0:O[0];B&&(E=B);break}case"initialPlacement":E=o;break}if(s!==E)return{reset:{placement:E}}}return{}}}};function Ag(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mg(e){return TT.some(t=>e[t]>=0)}const HT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...s}=ha(e,t);switch(a){case"referenceHidden":{const r=await Wr(t,{...s,elementContext:"reference"}),i=Ag(r,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Mg(i)}}}case"escaped":{const r=await Wr(t,{...s,altBoundary:!0}),i=Ag(r,n.floating);return{data:{escapedOffsets:i,escaped:Mg(i)}}}default:return{}}}}};async function BT(e,t){const{placement:n,platform:a,elements:s}=e,r=await(a.isRTL==null?void 0:a.isRTL(s.floating)),i=ma(n),o=Zl(n),c=Rn(n)==="y",d=["left","top"].includes(i)?-1:1,f=r&&c?-1:1,h=ha(t,e);let{mainAxis:m,crossAxis:x,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return o&&typeof w=="number"&&(x=o==="end"?w*-1:w),c?{x:x*f,y:m*d}:{x:m*d,y:x*f}}const qT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:s,y:r,placement:i,middlewareData:o}=t,c=await BT(t,e);return i===((n=o.offset)==null?void 0:n.placement)&&(a=o.arrow)!=null&&a.alignmentOffset?{}:{x:s+c.x,y:r+c.y,data:{...c,placement:i}}}}},GT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:s}=t,{mainAxis:r=!0,crossAxis:i=!1,limiter:o={fn:b=>{let{x:g,y:p}=b;return{x:g,y:p}}},...c}=ha(e,t),d={x:n,y:a},f=await Wr(t,c),h=Rn(ma(s)),m=Jh(h);let x=d[m],w=d[h];if(r){const b=m==="y"?"top":"left",g=m==="y"?"bottom":"right",p=x+f[b],y=x-f[g];x=bf(p,x,y)}if(i){const b=h==="y"?"top":"left",g=h==="y"?"bottom":"right",p=w+f[b],y=w-f[g];w=bf(p,w,y)}const v=o.fn({...t,[m]:x,[h]:w});return{...v,data:{x:v.x-n,y:v.y-a,enabled:{[m]:r,[h]:i}}}}}},VT=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:s,rects:r,middlewareData:i}=t,{offset:o=0,mainAxis:c=!0,crossAxis:d=!0}=ha(e,t),f={x:n,y:a},h=Rn(s),m=Jh(h);let x=f[m],w=f[h];const v=ha(o,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const y=m==="y"?"height":"width",j=r.reference[m]-r.floating[y]+b.mainAxis,_=r.reference[m]+r.reference[y]-b.mainAxis;x<j?x=j:x>_&&(x=_)}if(d){var g,p;const y=m==="y"?"width":"height",j=["top","left"].includes(ma(s)),_=r.reference[h]-r.floating[y]+(j&&((g=i.offset)==null?void 0:g[h])||0)+(j?0:b.crossAxis),k=r.reference[h]+r.reference[y]+(j?0:((p=i.offset)==null?void 0:p[h])||0)-(j?b.crossAxis:0);w<_?w=_:w>k&&(w=k)}return{[m]:x,[h]:w}}}},YT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:s,rects:r,platform:i,elements:o}=t,{apply:c=()=>{},...d}=ha(e,t),f=await Wr(t,d),h=ma(s),m=Zl(s),x=Rn(s)==="y",{width:w,height:v}=r.floating;let b,g;h==="top"||h==="bottom"?(b=h,g=m===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(g=h,b=m==="end"?"top":"bottom");const p=v-f.top-f.bottom,y=w-f.left-f.right,j=ts(v-f[b],p),_=ts(w-f[g],y),k=!t.middlewareData.shift;let N=j,S=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=y),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(N=p),k&&!m){const A=Pt(f.left,0),z=Pt(f.right,0),q=Pt(f.top,0),O=Pt(f.bottom,0);x?S=w-2*(A!==0||z!==0?A+z:Pt(f.left,f.right)):N=v-2*(q!==0||O!==0?q+O:Pt(f.top,f.bottom))}await c({...t,availableWidth:S,availableHeight:N});const R=await i.getDimensions(o.floating);return w!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function Zc(){return typeof window<"u"}function Fl(e){return _0(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yn(e){var t;return(t=(_0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _0(e){return Zc()?e instanceof Node||e instanceof Wt(e).Node:!1}function jn(e){return Zc()?e instanceof Element||e instanceof Wt(e).Element:!1}function Bn(e){return Zc()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function Og(e){return!Zc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}function Ti(e){const{overflow:t,overflowX:n,overflowY:a,display:s}=wn(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!["inline","contents"].includes(s)}function IT(e){return["table","td","th"].includes(Fl(e))}function Fc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function nm(e){const t=am(),n=jn(e)?wn(e):e;return["transform","translate","scale","rotate","perspective"].some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(a=>(n.willChange||"").includes(a))||["paint","layout","strict","content"].some(a=>(n.contain||"").includes(a))}function PT(e){let t=ns(e);for(;Bn(t)&&!Ll(t);){if(nm(t))return t;if(Fc(t))return null;t=ns(t)}return null}function am(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ll(e){return["html","body","#document"].includes(Fl(e))}function wn(e){return Wt(e).getComputedStyle(e)}function Wc(e){return jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ns(e){if(Fl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Og(e)&&e.host||Yn(e);return Og(t)?t.host:t}function N0(e){const t=ns(e);return Ll(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bn(t)&&Ti(t)?t:N0(t)}function Jr(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=N0(e),r=s===((a=e.ownerDocument)==null?void 0:a.body),i=Wt(s);if(r){const o=wf(i);return t.concat(i,i.visualViewport||[],Ti(s)?s:[],o&&n?Jr(o):[])}return t.concat(s,Jr(s,[],n))}function wf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function S0(e){const t=wn(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const s=Bn(e),r=s?e.offsetWidth:n,i=s?e.offsetHeight:a,o=oc(n)!==r||oc(a)!==i;return o&&(n=r,a=i),{width:n,height:a,$:o}}function sm(e){return jn(e)?e:e.contextElement}function Nl(e){const t=sm(e);if(!Bn(t))return zn(1);const n=t.getBoundingClientRect(),{width:a,height:s,$:r}=S0(t);let i=(r?oc(n.width):n.width)/a,o=(r?oc(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}const XT=zn(0);function k0(e){const t=Wt(e);return!am()||!t.visualViewport?XT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KT(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function Rs(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),r=sm(e);let i=zn(1);t&&(a?jn(a)&&(i=Nl(a)):i=Nl(e));const o=KT(r,n,a)?k0(r):zn(0);let c=(s.left+o.x)/i.x,d=(s.top+o.y)/i.y,f=s.width/i.x,h=s.height/i.y;if(r){const m=Wt(r),x=a&&jn(a)?Wt(a):a;let w=m,v=wf(w);for(;v&&a&&x!==w;){const b=Nl(v),g=v.getBoundingClientRect(),p=wn(v),y=g.left+(v.clientLeft+parseFloat(p.paddingLeft))*b.x,j=g.top+(v.clientTop+parseFloat(p.paddingTop))*b.y;c*=b.x,d*=b.y,f*=b.x,h*=b.y,c+=y,d+=j,w=Wt(v),v=wf(w)}}return uc({width:f,height:h,x:c,y:d})}function lm(e,t){const n=Wc(e).scrollLeft;return t?t.left+n:Rs(Yn(e)).left+n}function C0(e,t,n){n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=a.left+t.scrollLeft-(n?0:lm(e,a)),r=a.top+t.scrollTop;return{x:s,y:r}}function QT(e){let{elements:t,rect:n,offsetParent:a,strategy:s}=e;const r=s==="fixed",i=Yn(a),o=t?Fc(t.floating):!1;if(a===i||o&&r)return n;let c={scrollLeft:0,scrollTop:0},d=zn(1);const f=zn(0),h=Bn(a);if((h||!h&&!r)&&((Fl(a)!=="body"||Ti(i))&&(c=Wc(a)),Bn(a))){const x=Rs(a);d=Nl(a),f.x=x.x+a.clientLeft,f.y=x.y+a.clientTop}const m=i&&!h&&!r?C0(i,c,!0):zn(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+m.x,y:n.y*d.y-c.scrollTop*d.y+f.y+m.y}}function ZT(e){return Array.from(e.getClientRects())}function FT(e){const t=Yn(e),n=Wc(e),a=e.ownerDocument.body,s=Pt(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),r=Pt(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let i=-n.scrollLeft+lm(e);const o=-n.scrollTop;return wn(a).direction==="rtl"&&(i+=Pt(t.clientWidth,a.clientWidth)-s),{width:s,height:r,x:i,y:o}}function WT(e,t){const n=Wt(e),a=Yn(e),s=n.visualViewport;let r=a.clientWidth,i=a.clientHeight,o=0,c=0;if(s){r=s.width,i=s.height;const d=am();(!d||d&&t==="fixed")&&(o=s.offsetLeft,c=s.offsetTop)}return{width:r,height:i,x:o,y:c}}function JT(e,t){const n=Rs(e,!0,t==="fixed"),a=n.top+e.clientTop,s=n.left+e.clientLeft,r=Bn(e)?Nl(e):zn(1),i=e.clientWidth*r.x,o=e.clientHeight*r.y,c=s*r.x,d=a*r.y;return{width:i,height:o,x:c,y:d}}function Dg(e,t,n){let a;if(t==="viewport")a=WT(e,n);else if(t==="document")a=FT(Yn(e));else if(jn(t))a=JT(t,n);else{const s=k0(e);a={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return uc(a)}function T0(e,t){const n=ns(e);return n===t||!jn(n)||Ll(n)?!1:wn(n).position==="fixed"||T0(n,t)}function eE(e,t){const n=t.get(e);if(n)return n;let a=Jr(e,[],!1).filter(o=>jn(o)&&Fl(o)!=="body"),s=null;const r=wn(e).position==="fixed";let i=r?ns(e):e;for(;jn(i)&&!Ll(i);){const o=wn(i),c=nm(i);!c&&o.position==="fixed"&&(s=null),(r?!c&&!s:!c&&o.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Ti(i)&&!c&&T0(e,i))?a=a.filter(f=>f!==i):s=o,i=ns(i)}return t.set(e,a),a}function tE(e){let{element:t,boundary:n,rootBoundary:a,strategy:s}=e;const i=[...n==="clippingAncestors"?Fc(t)?[]:eE(t,this._c):[].concat(n),a],o=i[0],c=i.reduce((d,f)=>{const h=Dg(t,f,s);return d.top=Pt(h.top,d.top),d.right=ts(h.right,d.right),d.bottom=ts(h.bottom,d.bottom),d.left=Pt(h.left,d.left),d},Dg(t,o,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function nE(e){const{width:t,height:n}=S0(e);return{width:t,height:n}}function aE(e,t,n){const a=Bn(t),s=Yn(t),r=n==="fixed",i=Rs(e,!0,r,t);let o={scrollLeft:0,scrollTop:0};const c=zn(0);function d(){c.x=lm(s)}if(a||!a&&!r)if((Fl(t)!=="body"||Ti(s))&&(o=Wc(t)),a){const x=Rs(t,!0,r,t);c.x=x.x+t.clientLeft,c.y=x.y+t.clientTop}else s&&d();r&&!a&&s&&d();const f=s&&!a&&!r?C0(s,o):zn(0),h=i.left+o.scrollLeft-c.x-f.x,m=i.top+o.scrollTop-c.y-f.y;return{x:h,y:m,width:i.width,height:i.height}}function rd(e){return wn(e).position==="static"}function zg(e,t){if(!Bn(e)||wn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Yn(e)===n&&(n=n.ownerDocument.body),n}function E0(e,t){const n=Wt(e);if(Fc(e))return n;if(!Bn(e)){let s=ns(e);for(;s&&!Ll(s);){if(jn(s)&&!rd(s))return s;s=ns(s)}return n}let a=zg(e,t);for(;a&&IT(a)&&rd(a);)a=zg(a,t);return a&&Ll(a)&&rd(a)&&!nm(a)?n:a||PT(e)||n}const sE=async function(e){const t=this.getOffsetParent||E0,n=this.getDimensions,a=await n(e.floating);return{reference:aE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function lE(e){return wn(e).direction==="rtl"}const rE={convertOffsetParentRelativeRectToViewportRelativeRect:QT,getDocumentElement:Yn,getClippingRect:tE,getOffsetParent:E0,getElementRects:sE,getClientRects:ZT,getDimensions:nE,getScale:Nl,isElement:jn,isRTL:lE};function R0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iE(e,t){let n=null,a;const s=Yn(e);function r(){var o;clearTimeout(a),(o=n)==null||o.disconnect(),n=null}function i(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),r();const d=e.getBoundingClientRect(),{left:f,top:h,width:m,height:x}=d;if(o||t(),!m||!x)return;const w=lo(h),v=lo(s.clientWidth-(f+m)),b=lo(s.clientHeight-(h+x)),g=lo(f),y={rootMargin:-w+"px "+-v+"px "+-b+"px "+-g+"px",threshold:Pt(0,ts(1,c))||1};let j=!0;function _(k){const N=k[0].intersectionRatio;if(N!==c){if(!j)return i();N?i(!1,N):a=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!R0(d,e.getBoundingClientRect())&&i(),j=!1}try{n=new IntersectionObserver(_,{...y,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(e)}return i(!0),r}function oE(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=a,d=sm(e),f=s||r?[...d?Jr(d):[],...Jr(t)]:[];f.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),r&&g.addEventListener("resize",n)});const h=d&&o?iE(d,n):null;let m=-1,x=null;i&&(x=new ResizeObserver(g=>{let[p]=g;p&&p.target===d&&x&&(x.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=x)==null||y.observe(t)})),n()}),d&&!c&&x.observe(d),x.observe(t));let w,v=c?Rs(e):null;c&&b();function b(){const g=Rs(e);v&&!R0(v,g)&&n(),v=g,w=requestAnimationFrame(b)}return n(),()=>{var g;f.forEach(p=>{s&&p.removeEventListener("scroll",n),r&&p.removeEventListener("resize",n)}),h==null||h(),(g=x)==null||g.disconnect(),x=null,c&&cancelAnimationFrame(w)}}const cE=qT,uE=GT,dE=UT,fE=YT,hE=HT,$g=LT,mE=VT,pE=(e,t,n)=>{const a=new Map,s={platform:rE,...n},r={...s.platform,_c:a};return $T(e,t,{...s,platform:r})};var gE=typeof document<"u",xE=function(){},To=gE?u.useLayoutEffect:xE;function dc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!dc(e[a],t[a]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){const r=s[a];if(!(r==="_owner"&&e.$$typeof)&&!dc(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function A0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lg(e,t){const n=A0(e);return Math.round(t*n)/n}function id(e){const t=u.useRef(e);return To(()=>{t.current=e}),t}function vE(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:s,elements:{reference:r,floating:i}={},transform:o=!0,whileElementsMounted:c,open:d}=e,[f,h]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,x]=u.useState(a);dc(m,a)||x(a);const[w,v]=u.useState(null),[b,g]=u.useState(null),p=u.useCallback(C=>{C!==k.current&&(k.current=C,v(C))},[]),y=u.useCallback(C=>{C!==N.current&&(N.current=C,g(C))},[]),j=r||w,_=i||b,k=u.useRef(null),N=u.useRef(null),S=u.useRef(f),R=c!=null,A=id(c),z=id(s),q=id(d),O=u.useCallback(()=>{if(!k.current||!N.current)return;const C={placement:t,strategy:n,middleware:m};z.current&&(C.platform=z.current),pE(k.current,N.current,C).then(L=>{const P={...L,isPositioned:q.current!==!1};$.current&&!dc(S.current,P)&&(S.current=P,Hl.flushSync(()=>{h(P)}))})},[m,t,n,z,q]);To(()=>{d===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,h(C=>({...C,isPositioned:!1})))},[d]);const $=u.useRef(!1);To(()=>($.current=!0,()=>{$.current=!1}),[]),To(()=>{if(j&&(k.current=j),_&&(N.current=_),j&&_){if(A.current)return A.current(j,_,O);O()}},[j,_,O,A,R]);const G=u.useMemo(()=>({reference:k,floating:N,setReference:p,setFloating:y}),[p,y]),E=u.useMemo(()=>({reference:j,floating:_}),[j,_]),B=u.useMemo(()=>{const C={position:n,left:0,top:0};if(!E.floating)return C;const L=Lg(E.floating,f.x),P=Lg(E.floating,f.y);return o?{...C,transform:"translate("+L+"px, "+P+"px)",...A0(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:P}},[n,o,E.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:O,refs:G,elements:E,floatingStyles:B}),[f,O,G,E,B])}const yE=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:s}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?$g({element:a.current,padding:s}).fn(n):{}:a?$g({element:a,padding:s}).fn(n):{}}}},bE=(e,t)=>({...cE(e),options:[e,t]}),jE=(e,t)=>({...uE(e),options:[e,t]}),wE=(e,t)=>({...mE(e),options:[e,t]}),_E=(e,t)=>({...dE(e),options:[e,t]}),NE=(e,t)=>({...fE(e),options:[e,t]}),SE=(e,t)=>({...hE(e),options:[e,t]}),kE=(e,t)=>({...yE(e),options:[e,t]});var CE="Arrow",M0=u.forwardRef((e,t)=>{const{children:n,width:a=10,height:s=5,...r}=e;return l.jsx(me.svg,{...r,ref:t,width:a,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});M0.displayName=CE;var TE=M0,rm="Popper",[O0,Jc]=xa(rm),[EE,D0]=O0(rm),z0=e=>{const{__scopePopper:t,children:n}=e,[a,s]=u.useState(null);return l.jsx(EE,{scope:t,anchor:a,onAnchorChange:s,children:n})};z0.displayName=rm;var $0="PopperAnchor",L0=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...s}=e,r=D0($0,n),i=u.useRef(null),o=Me(t,i);return u.useEffect(()=>{r.onAnchorChange((a==null?void 0:a.current)||i.current)}),a?null:l.jsx(me.div,{...s,ref:o})});L0.displayName=$0;var im="PopperContent",[RE,AE]=O0(im),U0=u.forwardRef((e,t)=>{var H,W,oe,fe,he,ue;const{__scopePopper:n,side:a="bottom",sideOffset:s=0,align:r="center",alignOffset:i=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:x="optimized",onPlaced:w,...v}=e,b=D0(im,n),[g,p]=u.useState(null),y=Me(t,se=>p(se)),[j,_]=u.useState(null),k=m0(j),N=(k==null?void 0:k.width)??0,S=(k==null?void 0:k.height)??0,R=a+(r!=="center"?"-"+r:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(d)?d:[d],q=z.length>0,O={padding:A,boundary:z.filter(OE),altBoundary:q},{refs:$,floatingStyles:G,placement:E,isPositioned:B,middlewareData:C}=vE({strategy:"fixed",placement:R,whileElementsMounted:(...se)=>oE(...se,{animationFrame:x==="always"}),elements:{reference:b.anchor},middleware:[bE({mainAxis:s+S,alignmentAxis:i}),c&&jE({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?wE():void 0,...O}),c&&_E({...O}),NE({...O,apply:({elements:se,rects:ae,availableWidth:Xe,availableHeight:ie})=>{const{width:et,height:lt}=ae.reference,tt=se.floating.style;tt.setProperty("--radix-popper-available-width",`${Xe}px`),tt.setProperty("--radix-popper-available-height",`${ie}px`),tt.setProperty("--radix-popper-anchor-width",`${et}px`),tt.setProperty("--radix-popper-anchor-height",`${lt}px`)}}),j&&kE({element:j,padding:o}),DE({arrowWidth:N,arrowHeight:S}),m&&SE({strategy:"referenceHidden",...O})]}),[L,P]=q0(E),D=Hn(w);Tt(()=>{B&&(D==null||D())},[B,D]);const V=(H=C.arrow)==null?void 0:H.x,ne=(W=C.arrow)==null?void 0:W.y,Y=((oe=C.arrow)==null?void 0:oe.centerOffset)!==0,[ve,ee]=u.useState();return Tt(()=>{g&&ee(window.getComputedStyle(g).zIndex)},[g]),l.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:B?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(fe=C.transformOrigin)==null?void 0:fe.x,(he=C.transformOrigin)==null?void 0:he.y].join(" "),...((ue=C.hide)==null?void 0:ue.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(RE,{scope:n,placedSide:L,onArrowChange:_,arrowX:V,arrowY:ne,shouldHideArrow:Y,children:l.jsx(me.div,{"data-side":L,"data-align":P,...v,ref:y,style:{...v.style,animation:B?void 0:"none"}})})})});U0.displayName=im;var H0="PopperArrow",ME={top:"bottom",right:"left",bottom:"top",left:"right"},B0=u.forwardRef(function(t,n){const{__scopePopper:a,...s}=t,r=AE(H0,a),i=ME[r.placedSide];return l.jsx("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:l.jsx(TE,{...s,ref:n,style:{...s.style,display:"block"}})})});B0.displayName=H0;function OE(e){return e!==null}var DE=e=>({name:"transformOrigin",options:e,fn(t){var b,g,p;const{placement:n,rects:a,middlewareData:s}=t,i=((b=s.arrow)==null?void 0:b.centerOffset)!==0,o=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[d,f]=q0(n),h={start:"0%",center:"50%",end:"100%"}[f],m=(((g=s.arrow)==null?void 0:g.x)??0)+o/2,x=(((p=s.arrow)==null?void 0:p.y)??0)+c/2;let w="",v="";return d==="bottom"?(w=i?h:`${m}px`,v=`${-c}px`):d==="top"?(w=i?h:`${m}px`,v=`${a.floating.height+c}px`):d==="right"?(w=`${-c}px`,v=i?h:`${x}px`):d==="left"&&(w=`${a.floating.width+c}px`,v=i?h:`${x}px`),{data:{x:w,y:v}}}});function q0(e){const[t,n="center"]=e.split("-");return[t,n]}var G0=z0,V0=L0,Y0=U0,I0=B0,od="rovingFocusGroup.onEntryFocus",zE={bubbles:!1,cancelable:!0},Ei="RovingFocusGroup",[_f,P0,$E]=Wh(Ei),[LE,eu]=xa(Ei,[$E]),[UE,HE]=LE(Ei),X0=u.forwardRef((e,t)=>l.jsx(_f.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(_f.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(BE,{...e,ref:t})})}));X0.displayName=Ei;var BE=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:s=!1,dir:r,currentTabStopId:i,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...h}=e,m=u.useRef(null),x=Me(t,m),w=Qc(r),[v,b]=Cs({prop:i,defaultProp:o??null,onChange:c,caller:Ei}),[g,p]=u.useState(!1),y=Hn(d),j=P0(n),_=u.useRef(!1),[k,N]=u.useState(0);return u.useEffect(()=>{const S=m.current;if(S)return S.addEventListener(od,y),()=>S.removeEventListener(od,y)},[y]),l.jsx(UE,{scope:n,orientation:a,dir:w,loop:s,currentTabStopId:v,onItemFocus:u.useCallback(S=>b(S),[b]),onItemShiftTab:u.useCallback(()=>p(!0),[]),onFocusableItemAdd:u.useCallback(()=>N(S=>S+1),[]),onFocusableItemRemove:u.useCallback(()=>N(S=>S-1),[]),children:l.jsx(me.div,{tabIndex:g||k===0?-1:0,"data-orientation":a,...h,ref:x,style:{outline:"none",...e.style},onMouseDown:J(e.onMouseDown,()=>{_.current=!0}),onFocus:J(e.onFocus,S=>{const R=!_.current;if(S.target===S.currentTarget&&R&&!g){const A=new CustomEvent(od,zE);if(S.currentTarget.dispatchEvent(A),!A.defaultPrevented){const z=j().filter(E=>E.focusable),q=z.find(E=>E.active),O=z.find(E=>E.id===v),G=[q,O,...z].filter(Boolean).map(E=>E.ref.current);Z0(G,f)}}_.current=!1}),onBlur:J(e.onBlur,()=>p(!1))})})}),K0="RovingFocusGroupItem",Q0=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:s=!1,tabStopId:r,children:i,...o}=e,c=Dn(),d=r||c,f=HE(K0,n),h=f.currentTabStopId===d,m=P0(n),{onFocusableItemAdd:x,onFocusableItemRemove:w,currentTabStopId:v}=f;return u.useEffect(()=>{if(a)return x(),()=>w()},[a,x,w]),l.jsx(_f.ItemSlot,{scope:n,id:d,focusable:a,active:s,children:l.jsx(me.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...o,ref:t,onMouseDown:J(e.onMouseDown,b=>{a?f.onItemFocus(d):b.preventDefault()}),onFocus:J(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:J(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const g=VE(b,f.orientation,f.dir);if(g!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let y=m().filter(j=>j.focusable).map(j=>j.ref.current);if(g==="last")y.reverse();else if(g==="prev"||g==="next"){g==="prev"&&y.reverse();const j=y.indexOf(b.currentTarget);y=f.loop?YE(y,j+1):y.slice(j+1)}setTimeout(()=>Z0(y))}}),children:typeof i=="function"?i({isCurrentTabStop:h,hasTabStop:v!=null}):i})})});Q0.displayName=K0;var qE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function GE(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function VE(e,t,n){const a=GE(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return qE[a]}function Z0(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function YE(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var F0=X0,W0=Q0,Nf=["Enter"," "],IE=["ArrowDown","PageUp","Home"],J0=["ArrowUp","PageDown","End"],PE=[...IE,...J0],XE={ltr:[...Nf,"ArrowRight"],rtl:[...Nf,"ArrowLeft"]},KE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ri="Menu",[ei,QE,ZE]=Wh(Ri),[Hs,ej]=xa(Ri,[ZE,Jc,eu]),tu=Jc(),tj=eu(),[FE,Bs]=Hs(Ri),[WE,Ai]=Hs(Ri),nj=e=>{const{__scopeMenu:t,open:n=!1,children:a,dir:s,onOpenChange:r,modal:i=!0}=e,o=tu(t),[c,d]=u.useState(null),f=u.useRef(!1),h=Hn(r),m=Qc(s);return u.useEffect(()=>{const x=()=>{f.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>f.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),l.jsx(G0,{...o,children:l.jsx(FE,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:d,children:l.jsx(WE,{scope:t,onClose:u.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:f,dir:m,modal:i,children:a})})})};nj.displayName=Ri;var JE="MenuAnchor",om=u.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,s=tu(n);return l.jsx(V0,{...s,...a,ref:t})});om.displayName=JE;var cm="MenuPortal",[eR,aj]=Hs(cm,{forceMount:void 0}),sj=e=>{const{__scopeMenu:t,forceMount:n,children:a,container:s}=e,r=Bs(cm,t);return l.jsx(eR,{scope:t,forceMount:n,children:l.jsx(Vn,{present:n||r.open,children:l.jsx(Vc,{asChild:!0,container:s,children:a})})})};sj.displayName=cm;var fn="MenuContent",[tR,um]=Hs(fn),lj=u.forwardRef((e,t)=>{const n=aj(fn,e.__scopeMenu),{forceMount:a=n.forceMount,...s}=e,r=Bs(fn,e.__scopeMenu),i=Ai(fn,e.__scopeMenu);return l.jsx(ei.Provider,{scope:e.__scopeMenu,children:l.jsx(Vn,{present:a||r.open,children:l.jsx(ei.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(nR,{...s,ref:t}):l.jsx(aR,{...s,ref:t})})})})}),nR=u.forwardRef((e,t)=>{const n=Bs(fn,e.__scopeMenu),a=u.useRef(null),s=Me(t,a);return u.useEffect(()=>{const r=a.current;if(r)return Yh(r)},[]),l.jsx(dm,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:J(e.onFocusOutside,r=>r.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),aR=u.forwardRef((e,t)=>{const n=Bs(fn,e.__scopeMenu);return l.jsx(dm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),sR=Ts("MenuContent.ScrollLock"),dm=u.forwardRef((e,t)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:s,onOpenAutoFocus:r,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,onDismiss:x,disableOutsideScroll:w,...v}=e,b=Bs(fn,n),g=Ai(fn,n),p=tu(n),y=tj(n),j=QE(n),[_,k]=u.useState(null),N=u.useRef(null),S=Me(t,N,b.onContentChange),R=u.useRef(0),A=u.useRef(""),z=u.useRef(0),q=u.useRef(null),O=u.useRef("right"),$=u.useRef(0),G=w?Ic:u.Fragment,E=w?{as:sR,allowPinchZoom:!0}:void 0,B=L=>{var H,W;const P=A.current+L,D=j().filter(oe=>!oe.disabled),V=document.activeElement,ne=(H=D.find(oe=>oe.ref.current===V))==null?void 0:H.textValue,Y=D.map(oe=>oe.textValue),ve=gR(Y,P,ne),ee=(W=D.find(oe=>oe.textValue===ve))==null?void 0:W.ref.current;(function oe(fe){A.current=fe,window.clearTimeout(R.current),fe!==""&&(R.current=window.setTimeout(()=>oe(""),1e3))})(P),ee&&setTimeout(()=>ee.focus())};u.useEffect(()=>()=>window.clearTimeout(R.current),[]),Vh();const C=u.useCallback(L=>{var D,V;return O.current===((D=q.current)==null?void 0:D.side)&&vR(L,(V=q.current)==null?void 0:V.area)},[]);return l.jsx(tR,{scope:n,searchRef:A,onItemEnter:u.useCallback(L=>{C(L)&&L.preventDefault()},[C]),onItemLeave:u.useCallback(L=>{var P;C(L)||((P=N.current)==null||P.focus(),k(null))},[C]),onTriggerLeave:u.useCallback(L=>{C(L)&&L.preventDefault()},[C]),pointerGraceTimerRef:z,onPointerGraceIntentChange:u.useCallback(L=>{q.current=L},[]),children:l.jsx(G,{...E,children:l.jsx(Gc,{asChild:!0,trapped:s,onMountAutoFocus:J(r,L=>{var P;L.preventDefault(),(P=N.current)==null||P.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(qc,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,onDismiss:x,children:l.jsx(F0,{asChild:!0,...y,dir:g.dir,orientation:"vertical",loop:a,currentTabStopId:_,onCurrentTabStopIdChange:k,onEntryFocus:J(c,L=>{g.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Y0,{role:"menu","aria-orientation":"vertical","data-state":jj(b.open),"data-radix-menu-content":"",dir:g.dir,...p,...v,ref:S,style:{outline:"none",...v.style},onKeyDown:J(v.onKeyDown,L=>{const D=L.target.closest("[data-radix-menu-content]")===L.currentTarget,V=L.ctrlKey||L.altKey||L.metaKey,ne=L.key.length===1;D&&(L.key==="Tab"&&L.preventDefault(),!V&&ne&&B(L.key));const Y=N.current;if(L.target!==Y||!PE.includes(L.key))return;L.preventDefault();const ee=j().filter(H=>!H.disabled).map(H=>H.ref.current);J0.includes(L.key)&&ee.reverse(),mR(ee)}),onBlur:J(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(R.current),A.current="")}),onPointerMove:J(e.onPointerMove,ti(L=>{const P=L.target,D=$.current!==L.clientX;if(L.currentTarget.contains(P)&&D){const V=L.clientX>$.current?"right":"left";O.current=V,$.current=L.clientX}}))})})})})})})});lj.displayName=fn;var lR="MenuGroup",fm=u.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return l.jsx(me.div,{role:"group",...a,ref:t})});fm.displayName=lR;var rR="MenuLabel",rj=u.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return l.jsx(me.div,{...a,ref:t})});rj.displayName=rR;var fc="MenuItem",Ug="menu.itemSelect",nu=u.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:a,...s}=e,r=u.useRef(null),i=Ai(fc,e.__scopeMenu),o=um(fc,e.__scopeMenu),c=Me(t,r),d=u.useRef(!1),f=()=>{const h=r.current;if(!n&&h){const m=new CustomEvent(Ug,{bubbles:!0,cancelable:!0});h.addEventListener(Ug,x=>a==null?void 0:a(x),{once:!0}),Mb(h,m),m.defaultPrevented?d.current=!1:i.onClose()}};return l.jsx(ij,{...s,ref:c,disabled:n,onClick:J(e.onClick,f),onPointerDown:h=>{var m;(m=e.onPointerDown)==null||m.call(e,h),d.current=!0},onPointerUp:J(e.onPointerUp,h=>{var m;d.current||(m=h.currentTarget)==null||m.click()}),onKeyDown:J(e.onKeyDown,h=>{const m=o.searchRef.current!=="";n||m&&h.key===" "||Nf.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});nu.displayName=fc;var ij=u.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:a=!1,textValue:s,...r}=e,i=um(fc,n),o=tj(n),c=u.useRef(null),d=Me(t,c),[f,h]=u.useState(!1),[m,x]=u.useState("");return u.useEffect(()=>{const w=c.current;w&&x((w.textContent??"").trim())},[r.children]),l.jsx(ei.ItemSlot,{scope:n,disabled:a,textValue:s??m,children:l.jsx(W0,{asChild:!0,...o,focusable:!a,children:l.jsx(me.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...r,ref:d,onPointerMove:J(e.onPointerMove,ti(w=>{a?i.onItemLeave(w):(i.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(e.onPointerLeave,ti(w=>i.onItemLeave(w))),onFocus:J(e.onFocus,()=>h(!0)),onBlur:J(e.onBlur,()=>h(!1))})})})}),iR="MenuCheckboxItem",oj=u.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:a,...s}=e;return l.jsx(hj,{scope:e.__scopeMenu,checked:n,children:l.jsx(nu,{role:"menuitemcheckbox","aria-checked":hc(n)?"mixed":n,...s,ref:t,"data-state":mm(n),onSelect:J(s.onSelect,()=>a==null?void 0:a(hc(n)?!0:!n),{checkForDefaultPrevented:!1})})})});oj.displayName=iR;var cj="MenuRadioGroup",[oR,cR]=Hs(cj,{value:void 0,onValueChange:()=>{}}),uj=u.forwardRef((e,t)=>{const{value:n,onValueChange:a,...s}=e,r=Hn(a);return l.jsx(oR,{scope:e.__scopeMenu,value:n,onValueChange:r,children:l.jsx(fm,{...s,ref:t})})});uj.displayName=cj;var dj="MenuRadioItem",fj=u.forwardRef((e,t)=>{const{value:n,...a}=e,s=cR(dj,e.__scopeMenu),r=n===s.value;return l.jsx(hj,{scope:e.__scopeMenu,checked:r,children:l.jsx(nu,{role:"menuitemradio","aria-checked":r,...a,ref:t,"data-state":mm(r),onSelect:J(a.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});fj.displayName=dj;var hm="MenuItemIndicator",[hj,uR]=Hs(hm,{checked:!1}),mj=u.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:a,...s}=e,r=uR(hm,n);return l.jsx(Vn,{present:a||hc(r.checked)||r.checked===!0,children:l.jsx(me.span,{...s,ref:t,"data-state":mm(r.checked)})})});mj.displayName=hm;var dR="MenuSeparator",pj=u.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return l.jsx(me.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});pj.displayName=dR;var fR="MenuArrow",gj=u.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,s=tu(n);return l.jsx(I0,{...s,...a,ref:t})});gj.displayName=fR;var hR="MenuSub",[r4,xj]=Hs(hR),gr="MenuSubTrigger",vj=u.forwardRef((e,t)=>{const n=Bs(gr,e.__scopeMenu),a=Ai(gr,e.__scopeMenu),s=xj(gr,e.__scopeMenu),r=um(gr,e.__scopeMenu),i=u.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:c}=r,d={__scopeMenu:e.__scopeMenu},f=u.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return u.useEffect(()=>f,[f]),u.useEffect(()=>{const h=o.current;return()=>{window.clearTimeout(h),c(null)}},[o,c]),l.jsx(om,{asChild:!0,...d,children:l.jsx(ij,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":jj(n.open),...e,ref:Bc(t,s.onTriggerChange),onClick:h=>{var m;(m=e.onClick)==null||m.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:J(e.onPointerMove,ti(h=>{r.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(r.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:J(e.onPointerLeave,ti(h=>{var x,w;f();const m=(x=n.content)==null?void 0:x.getBoundingClientRect();if(m){const v=(w=n.content)==null?void 0:w.dataset.side,b=v==="right",g=b?-5:5,p=m[b?"left":"right"],y=m[b?"right":"left"];r.onPointerGraceIntentChange({area:[{x:h.clientX+g,y:h.clientY},{x:p,y:m.top},{x:y,y:m.top},{x:y,y:m.bottom},{x:p,y:m.bottom}],side:v}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>r.onPointerGraceIntentChange(null),300)}else{if(r.onTriggerLeave(h),h.defaultPrevented)return;r.onPointerGraceIntentChange(null)}})),onKeyDown:J(e.onKeyDown,h=>{var x;const m=r.searchRef.current!=="";e.disabled||m&&h.key===" "||XE[a.dir].includes(h.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),h.preventDefault())})})})});vj.displayName=gr;var yj="MenuSubContent",bj=u.forwardRef((e,t)=>{const n=aj(fn,e.__scopeMenu),{forceMount:a=n.forceMount,...s}=e,r=Bs(fn,e.__scopeMenu),i=Ai(fn,e.__scopeMenu),o=xj(yj,e.__scopeMenu),c=u.useRef(null),d=Me(t,c);return l.jsx(ei.Provider,{scope:e.__scopeMenu,children:l.jsx(Vn,{present:a||r.open,children:l.jsx(ei.Slot,{scope:e.__scopeMenu,children:l.jsx(dm,{id:o.contentId,"aria-labelledby":o.triggerId,...s,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var h;i.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:J(e.onFocusOutside,f=>{f.target!==o.trigger&&r.onOpenChange(!1)}),onEscapeKeyDown:J(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:J(e.onKeyDown,f=>{var x;const h=f.currentTarget.contains(f.target),m=KE[i.dir].includes(f.key);h&&m&&(r.onOpenChange(!1),(x=o.trigger)==null||x.focus(),f.preventDefault())})})})})})});bj.displayName=yj;function jj(e){return e?"open":"closed"}function hc(e){return e==="indeterminate"}function mm(e){return hc(e)?"indeterminate":e?"checked":"unchecked"}function mR(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function pR(e,t){return e.map((n,a)=>e[(t+a)%e.length])}function gR(e,t,n){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,r=n?e.indexOf(n):-1;let i=pR(e,Math.max(r,0));s.length===1&&(i=i.filter(d=>d!==n));const c=i.find(d=>d.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function xR(e,t){const{x:n,y:a}=e;let s=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){const o=t[r],c=t[i],d=o.x,f=o.y,h=c.x,m=c.y;f>a!=m>a&&n<(h-d)*(a-f)/(m-f)+d&&(s=!s)}return s}function vR(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return xR(n,t)}function ti(e){return t=>t.pointerType==="mouse"?e(t):void 0}var yR=nj,bR=om,jR=sj,wR=lj,_R=fm,NR=rj,SR=nu,kR=oj,CR=uj,TR=fj,ER=mj,RR=pj,AR=gj,MR=vj,OR=bj,au="DropdownMenu",[DR]=xa(au,[ej]),zt=ej(),[zR,wj]=DR(au),_j=e=>{const{__scopeDropdownMenu:t,children:n,dir:a,open:s,defaultOpen:r,onOpenChange:i,modal:o=!0}=e,c=zt(t),d=u.useRef(null),[f,h]=Cs({prop:s,defaultProp:r??!1,onChange:i,caller:au});return l.jsx(zR,{scope:t,triggerId:Dn(),triggerRef:d,contentId:Dn(),open:f,onOpenChange:h,onOpenToggle:u.useCallback(()=>h(m=>!m),[h]),modal:o,children:l.jsx(yR,{...c,open:f,onOpenChange:h,dir:a,modal:o,children:n})})};_j.displayName=au;var Nj="DropdownMenuTrigger",Sj=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...s}=e,r=wj(Nj,n),i=zt(n);return l.jsx(bR,{asChild:!0,...i,children:l.jsx(me.button,{type:"button",id:r.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":r.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...s,ref:Bc(t,r.triggerRef),onPointerDown:J(e.onPointerDown,o=>{!a&&o.button===0&&o.ctrlKey===!1&&(r.onOpenToggle(),r.open||o.preventDefault())}),onKeyDown:J(e.onKeyDown,o=>{a||(["Enter"," "].includes(o.key)&&r.onOpenToggle(),o.key==="ArrowDown"&&r.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});Sj.displayName=Nj;var $R="DropdownMenuPortal",kj=e=>{const{__scopeDropdownMenu:t,...n}=e,a=zt(t);return l.jsx(jR,{...a,...n})};kj.displayName=$R;var Cj="DropdownMenuContent",Tj=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=wj(Cj,n),r=zt(n),i=u.useRef(!1);return l.jsx(wR,{id:s.contentId,"aria-labelledby":s.triggerId,...r,...a,ref:t,onCloseAutoFocus:J(e.onCloseAutoFocus,o=>{var c;i.current||(c=s.triggerRef.current)==null||c.focus(),i.current=!1,o.preventDefault()}),onInteractOutside:J(e.onInteractOutside,o=>{const c=o.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,f=c.button===2||d;(!s.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Tj.displayName=Cj;var LR="DropdownMenuGroup",UR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(_R,{...s,...a,ref:t})});UR.displayName=LR;var HR="DropdownMenuLabel",Ej=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(NR,{...s,...a,ref:t})});Ej.displayName=HR;var BR="DropdownMenuItem",Rj=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(SR,{...s,...a,ref:t})});Rj.displayName=BR;var qR="DropdownMenuCheckboxItem",Aj=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(kR,{...s,...a,ref:t})});Aj.displayName=qR;var GR="DropdownMenuRadioGroup",VR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(CR,{...s,...a,ref:t})});VR.displayName=GR;var YR="DropdownMenuRadioItem",Mj=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(TR,{...s,...a,ref:t})});Mj.displayName=YR;var IR="DropdownMenuItemIndicator",Oj=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(ER,{...s,...a,ref:t})});Oj.displayName=IR;var PR="DropdownMenuSeparator",Dj=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(RR,{...s,...a,ref:t})});Dj.displayName=PR;var XR="DropdownMenuArrow",KR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(AR,{...s,...a,ref:t})});KR.displayName=XR;var QR="DropdownMenuSubTrigger",zj=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(MR,{...s,...a,ref:t})});zj.displayName=QR;var ZR="DropdownMenuSubContent",$j=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(OR,{...s,...a,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$j.displayName=ZR;var FR=_j,WR=Sj,JR=kj,Lj=Tj,Uj=Ej,Hj=Rj,Bj=Aj,qj=Mj,Gj=Oj,Vj=Dj,Yj=zj,Ij=$j;const su=FR,lu=WR,eA=u.forwardRef(({className:e,inset:t,children:n,...a},s)=>l.jsxs(Yj,{ref:s,className:F("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...a,children:[n,l.jsx(cb,{className:"ml-auto"})]}));eA.displayName=Yj.displayName;const tA=u.forwardRef(({className:e,...t},n)=>l.jsx(Ij,{ref:n,className:F("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));tA.displayName=Ij.displayName;const Mi=u.forwardRef(({className:e,sideOffset:t=4,...n},a)=>l.jsx(JR,{container:Xc(),children:l.jsx(Lj,{ref:a,sideOffset:t,className:F("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Mi.displayName=Lj.displayName;const As=u.forwardRef(({className:e,inset:t,...n},a)=>l.jsx(Hj,{ref:a,className:F("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));As.displayName=Hj.displayName;const nA=u.forwardRef(({className:e,children:t,checked:n,...a},s)=>l.jsxs(Bj,{ref:s,className:F("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...a,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Gj,{children:l.jsx(Pl,{className:"h-4 w-4"})})}),t]}));nA.displayName=Bj.displayName;const aA=u.forwardRef(({className:e,children:t,...n},a)=>l.jsxs(qj,{ref:a,className:F("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Gj,{children:l.jsx(ck,{className:"h-2 w-2 fill-current"})})}),t]}));aA.displayName=qj.displayName;const sA=u.forwardRef(({className:e,inset:t,...n},a)=>l.jsx(Uj,{ref:a,className:F("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));sA.displayName=Uj.displayName;const lA=u.forwardRef(({className:e,...t},n)=>l.jsx(Vj,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));lA.displayName=Vj.displayName;const rA={default:"h-9 px-3 py-1 text-sm",control:"h-7 px-2 py-1 text-xs"},_n=u.forwardRef(({className:e,type:t,inputSize:n="default",...a},s)=>l.jsx("input",{type:t,className:F("flex w-full rounded-md border border-input bg-transparent shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-disabled-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 read-only:cursor-default read-only:bg-muted read-only:text-muted-foreground read-only:border-dashed",rA[n],e),ref:s,...a}));_n.displayName="Input";var iA="Label",Pj=u.forwardRef((e,t)=>l.jsx(me.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Pj.displayName=iA;var Xj=Pj;const oA=bi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Qe=u.forwardRef(({className:e,...t},n)=>l.jsx(Xj,{ref:n,className:F(oA(),e),...t}));Qe.displayName=Xj.displayName;function pm({title:e,description:t,backHref:n,backLabel:a,className:s,link:r}){return l.jsx("div",{className:F("flex-1 px-4 py-8 sm:px-6 lg:px-8",s),children:l.jsxs("section",{className:"border-border bg-card mx-auto max-w-xl rounded-xl border p-6",children:[l.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:e}),l.jsx("div",{className:"text-muted-foreground mt-2 space-y-2 text-sm",children:t}),l.jsx(I,{asChild:!0,variant:"outline",size:"sm",className:"mt-4",children:l.jsx(r,{href:n,children:a})})]})})}function ls({title:e,description:t,actions:n,className:a,children:s,...r}){return l.jsxs("header",{"data-slot":"page-header",className:F("flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",a),...r,children:[l.jsxs("div",{className:"min-w-0 space-y-1",children:[l.jsx("h1",{className:"text-foreground text-2xl font-semibold tracking-tight",children:e}),t?l.jsx("p",{className:"text-muted-foreground text-sm",children:t}):null,s]}),n?l.jsx("div",{"data-slot":"page-header-actions",className:"flex shrink-0 items-center gap-2",children:n}):null]})}function Et({as:e="div",className:t,...n}){return l.jsx(e,{className:F("rounded-lg border",t),...n})}function Hg(e,[t,n]){return Math.min(n,Math.max(t,e))}var Kj=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),cA="VisuallyHidden",uA=u.forwardRef((e,t)=>l.jsx(me.span,{...e,ref:t,style:{...Kj,...e.style}}));uA.displayName=cA;var dA=[" ","Enter","ArrowUp","ArrowDown"],fA=[" ","Enter"],Ms="Select",[ru,iu,hA]=Wh(Ms),[Wl]=xa(Ms,[hA,Jc]),ou=Jc(),[mA,rs]=Wl(Ms),[pA,gA]=Wl(Ms),Qj=e=>{const{__scopeSelect:t,children:n,open:a,defaultOpen:s,onOpenChange:r,value:i,defaultValue:o,onValueChange:c,dir:d,name:f,autoComplete:h,disabled:m,required:x,form:w}=e,v=ou(t),[b,g]=u.useState(null),[p,y]=u.useState(null),[j,_]=u.useState(!1),k=Qc(d),[N,S]=Cs({prop:a,defaultProp:s??!1,onChange:r,caller:Ms}),[R,A]=Cs({prop:i,defaultProp:o,onChange:c,caller:Ms}),z=u.useRef(null),q=b?w||!!b.closest("form"):!0,[O,$]=u.useState(new Set),G=Array.from(O).map(E=>E.props.value).join(";");return l.jsx(G0,{...v,children:l.jsxs(mA,{required:x,scope:t,trigger:b,onTriggerChange:g,valueNode:p,onValueNodeChange:y,valueNodeHasChildren:j,onValueNodeHasChildrenChange:_,contentId:Dn(),value:R,onValueChange:A,open:N,onOpenChange:S,dir:k,triggerPointerDownPosRef:z,disabled:m,children:[l.jsx(ru.Provider,{scope:t,children:l.jsx(pA,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(E=>{$(B=>new Set(B).add(E))},[]),onNativeOptionRemove:u.useCallback(E=>{$(B=>{const C=new Set(B);return C.delete(E),C})},[]),children:n})}),q?l.jsxs(yw,{"aria-hidden":!0,required:x,tabIndex:-1,name:f,autoComplete:h,value:R,onChange:E=>A(E.target.value),disabled:m,form:w,children:[R===void 0?l.jsx("option",{value:""}):null,Array.from(O)]},G):null]})})};Qj.displayName=Ms;var Zj="SelectTrigger",Fj=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...s}=e,r=ou(n),i=rs(Zj,n),o=i.disabled||a,c=Me(t,i.onTriggerChange),d=iu(n),f=u.useRef("touch"),[h,m,x]=jw(v=>{const b=d().filter(y=>!y.disabled),g=b.find(y=>y.value===i.value),p=ww(b,v,g);p!==void 0&&i.onValueChange(p.value)}),w=v=>{o||(i.onOpenChange(!0),x()),v&&(i.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return l.jsx(V0,{asChild:!0,...r,children:l.jsx(me.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":bw(i.value)?"":void 0,...s,ref:c,onClick:J(s.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&w(v)}),onPointerDown:J(s.onPointerDown,v=>{f.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(w(v),v.preventDefault())}),onKeyDown:J(s.onKeyDown,v=>{const b=h.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&m(v.key),!(b&&v.key===" ")&&dA.includes(v.key)&&(w(),v.preventDefault())})})})});Fj.displayName=Zj;var Wj="SelectValue",Jj=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,children:r,placeholder:i="",...o}=e,c=rs(Wj,n),{onValueNodeHasChildrenChange:d}=c,f=r!==void 0,h=Me(t,c.onValueNodeChange);return Tt(()=>{d(f)},[d,f]),l.jsx(me.span,{...o,ref:h,style:{pointerEvents:"none"},children:bw(c.value)?l.jsx(l.Fragment,{children:i}):r})});Jj.displayName=Wj;var xA="SelectIcon",ew=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...s}=e;return l.jsx(me.span,{"aria-hidden":!0,...s,ref:t,children:a||"▼"})});ew.displayName=xA;var vA="SelectPortal",tw=e=>l.jsx(Vc,{asChild:!0,...e});tw.displayName=vA;var Os="SelectContent",nw=u.forwardRef((e,t)=>{const n=rs(Os,e.__scopeSelect),[a,s]=u.useState();if(Tt(()=>{s(new DocumentFragment)},[]),!n.open){const r=a;return r?Hl.createPortal(l.jsx(aw,{scope:e.__scopeSelect,children:l.jsx(ru.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),r):null}return l.jsx(sw,{...e,ref:t})});nw.displayName=Os;var pn=10,[aw,is]=Wl(Os),yA="SelectContentImpl",bA=Ts("SelectContent.RemoveScroll"),sw=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:r,onPointerDownOutside:i,side:o,sideOffset:c,align:d,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:x,sticky:w,hideWhenDetached:v,avoidCollisions:b,...g}=e,p=rs(Os,n),[y,j]=u.useState(null),[_,k]=u.useState(null),N=Me(t,H=>j(H)),[S,R]=u.useState(null),[A,z]=u.useState(null),q=iu(n),[O,$]=u.useState(!1),G=u.useRef(!1);u.useEffect(()=>{if(y)return Yh(y)},[y]),Vh();const E=u.useCallback(H=>{const[W,...oe]=q().map(ue=>ue.ref.current),[fe]=oe.slice(-1),he=document.activeElement;for(const ue of H)if(ue===he||(ue==null||ue.scrollIntoView({block:"nearest"}),ue===W&&_&&(_.scrollTop=0),ue===fe&&_&&(_.scrollTop=_.scrollHeight),ue==null||ue.focus(),document.activeElement!==he))return},[q,_]),B=u.useCallback(()=>E([S,y]),[E,S,y]);u.useEffect(()=>{O&&B()},[O,B]);const{onOpenChange:C,triggerPointerDownPosRef:L}=p;u.useEffect(()=>{if(y){let H={x:0,y:0};const W=fe=>{var he,ue;H={x:Math.abs(Math.round(fe.pageX)-(((he=L.current)==null?void 0:he.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((ue=L.current)==null?void 0:ue.y)??0))}},oe=fe=>{H.x<=10&&H.y<=10?fe.preventDefault():y.contains(fe.target)||C(!1),document.removeEventListener("pointermove",W),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",oe,{capture:!0})}}},[y,C,L]),u.useEffect(()=>{const H=()=>C(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[C]);const[P,D]=jw(H=>{const W=q().filter(he=>!he.disabled),oe=W.find(he=>he.ref.current===document.activeElement),fe=ww(W,H,oe);fe&&setTimeout(()=>fe.ref.current.focus())}),V=u.useCallback((H,W,oe)=>{const fe=!G.current&&!oe;(p.value!==void 0&&p.value===W||fe)&&(R(H),fe&&(G.current=!0))},[p.value]),ne=u.useCallback(()=>y==null?void 0:y.focus(),[y]),Y=u.useCallback((H,W,oe)=>{const fe=!G.current&&!oe;(p.value!==void 0&&p.value===W||fe)&&z(H)},[p.value]),ve=a==="popper"?Sf:lw,ee=ve===Sf?{side:o,sideOffset:c,align:d,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:x,sticky:w,hideWhenDetached:v,avoidCollisions:b}:{};return l.jsx(aw,{scope:n,content:y,viewport:_,onViewportChange:k,itemRefCallback:V,selectedItem:S,onItemLeave:ne,itemTextRefCallback:Y,focusSelectedItem:B,selectedItemText:A,position:a,isPositioned:O,searchRef:P,children:l.jsx(Ic,{as:bA,allowPinchZoom:!0,children:l.jsx(Gc,{asChild:!0,trapped:p.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:J(s,H=>{var W;(W=p.trigger)==null||W.focus({preventScroll:!0}),H.preventDefault()}),children:l.jsx(qc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:l.jsx(ve,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:H=>H.preventDefault(),...g,...ee,onPlaced:()=>$(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:J(g.onKeyDown,H=>{const W=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!W&&H.key.length===1&&D(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let fe=q().filter(he=>!he.disabled).map(he=>he.ref.current);if(["ArrowUp","End"].includes(H.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const he=H.target,ue=fe.indexOf(he);fe=fe.slice(ue+1)}setTimeout(()=>E(fe)),H.preventDefault()}})})})})})})});sw.displayName=yA;var jA="SelectItemAlignedPosition",lw=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...s}=e,r=rs(Os,n),i=is(Os,n),[o,c]=u.useState(null),[d,f]=u.useState(null),h=Me(t,N=>f(N)),m=iu(n),x=u.useRef(!1),w=u.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:g,focusSelectedItem:p}=i,y=u.useCallback(()=>{if(r.trigger&&r.valueNode&&o&&d&&v&&b&&g){const N=r.trigger.getBoundingClientRect(),S=d.getBoundingClientRect(),R=r.valueNode.getBoundingClientRect(),A=g.getBoundingClientRect();if(r.dir!=="rtl"){const he=A.left-S.left,ue=R.left-he,se=N.left-ue,ae=N.width+se,Xe=Math.max(ae,S.width),ie=window.innerWidth-pn,et=Hg(ue,[pn,Math.max(pn,ie-Xe)]);o.style.minWidth=ae+"px",o.style.left=et+"px"}else{const he=S.right-A.right,ue=window.innerWidth-R.right-he,se=window.innerWidth-N.right-ue,ae=N.width+se,Xe=Math.max(ae,S.width),ie=window.innerWidth-pn,et=Hg(ue,[pn,Math.max(pn,ie-Xe)]);o.style.minWidth=ae+"px",o.style.right=et+"px"}const z=m(),q=window.innerHeight-pn*2,O=v.scrollHeight,$=window.getComputedStyle(d),G=parseInt($.borderTopWidth,10),E=parseInt($.paddingTop,10),B=parseInt($.borderBottomWidth,10),C=parseInt($.paddingBottom,10),L=G+E+O+C+B,P=Math.min(b.offsetHeight*5,L),D=window.getComputedStyle(v),V=parseInt(D.paddingTop,10),ne=parseInt(D.paddingBottom,10),Y=N.top+N.height/2-pn,ve=q-Y,ee=b.offsetHeight/2,H=b.offsetTop+ee,W=G+E+H,oe=L-W;if(W<=Y){const he=z.length>0&&b===z[z.length-1].ref.current;o.style.bottom="0px";const ue=d.clientHeight-v.offsetTop-v.offsetHeight,se=Math.max(ve,ee+(he?ne:0)+ue+B),ae=W+se;o.style.height=ae+"px"}else{const he=z.length>0&&b===z[0].ref.current;o.style.top="0px";const se=Math.max(Y,G+v.offsetTop+(he?V:0)+ee)+oe;o.style.height=se+"px",v.scrollTop=W-Y+v.offsetTop}o.style.margin=`${pn}px 0`,o.style.minHeight=P+"px",o.style.maxHeight=q+"px",a==null||a(),requestAnimationFrame(()=>x.current=!0)}},[m,r.trigger,r.valueNode,o,d,v,b,g,r.dir,a]);Tt(()=>y(),[y]);const[j,_]=u.useState();Tt(()=>{d&&_(window.getComputedStyle(d).zIndex)},[d]);const k=u.useCallback(N=>{N&&w.current===!0&&(y(),p==null||p(),w.current=!1)},[y,p]);return l.jsx(_A,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:x,onScrollButtonChange:k,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:l.jsx(me.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});lw.displayName=jA;var wA="SelectPopperPosition",Sf=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:s=pn,...r}=e,i=ou(n);return l.jsx(Y0,{...i,...r,ref:t,align:a,collisionPadding:s,style:{boxSizing:"border-box",...r.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Sf.displayName=wA;var[_A,gm]=Wl(Os,{}),kf="SelectViewport",rw=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...s}=e,r=is(kf,n),i=gm(kf,n),o=Me(t,r.onViewportChange),c=u.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),l.jsx(ru.Slot,{scope:n,children:l.jsx(me.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:J(s.onScroll,d=>{const f=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&h){const x=Math.abs(c.current-f.scrollTop);if(x>0){const w=window.innerHeight-pn*2,v=parseFloat(h.style.minHeight),b=parseFloat(h.style.height),g=Math.max(v,b);if(g<w){const p=g+x,y=Math.min(w,p),j=p-y;h.style.height=y+"px",h.style.bottom==="0px"&&(f.scrollTop=j>0?j:0,h.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});rw.displayName=kf;var iw="SelectGroup",[NA,SA]=Wl(iw),kA=u.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=Dn();return l.jsx(NA,{scope:n,id:s,children:l.jsx(me.div,{role:"group","aria-labelledby":s,...a,ref:t})})});kA.displayName=iw;var ow="SelectLabel",cw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=SA(ow,n);return l.jsx(me.div,{id:s.id,...a,ref:t})});cw.displayName=ow;var mc="SelectItem",[CA,uw]=Wl(mc),dw=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:s=!1,textValue:r,...i}=e,o=rs(mc,n),c=is(mc,n),d=o.value===a,[f,h]=u.useState(r??""),[m,x]=u.useState(!1),w=Me(t,p=>{var y;return(y=c.itemRefCallback)==null?void 0:y.call(c,p,a,s)}),v=Dn(),b=u.useRef("touch"),g=()=>{s||(o.onValueChange(a),o.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(CA,{scope:n,value:a,disabled:s,textId:v,isSelected:d,onItemTextChange:u.useCallback(p=>{h(y=>y||((p==null?void 0:p.textContent)??"").trim())},[]),children:l.jsx(ru.ItemSlot,{scope:n,value:a,disabled:s,textValue:f,children:l.jsx(me.div,{role:"option","aria-labelledby":v,"data-highlighted":m?"":void 0,"aria-selected":d&&m,"data-state":d?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:w,onFocus:J(i.onFocus,()=>x(!0)),onBlur:J(i.onBlur,()=>x(!1)),onClick:J(i.onClick,()=>{b.current!=="mouse"&&g()}),onPointerUp:J(i.onPointerUp,()=>{b.current==="mouse"&&g()}),onPointerDown:J(i.onPointerDown,p=>{b.current=p.pointerType}),onPointerMove:J(i.onPointerMove,p=>{var y;b.current=p.pointerType,s?(y=c.onItemLeave)==null||y.call(c):b.current==="mouse"&&p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:J(i.onPointerLeave,p=>{var y;p.currentTarget===document.activeElement&&((y=c.onItemLeave)==null||y.call(c))}),onKeyDown:J(i.onKeyDown,p=>{var j;((j=c.searchRef)==null?void 0:j.current)!==""&&p.key===" "||(fA.includes(p.key)&&g(),p.key===" "&&p.preventDefault())})})})})});dw.displayName=mc;var xr="SelectItemText",fw=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,...r}=e,i=rs(xr,n),o=is(xr,n),c=uw(xr,n),d=gA(xr,n),[f,h]=u.useState(null),m=Me(t,g=>h(g),c.onItemTextChange,g=>{var p;return(p=o.itemTextRefCallback)==null?void 0:p.call(o,g,c.value,c.disabled)}),x=f==null?void 0:f.textContent,w=u.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:x},c.value),[c.disabled,c.value,x]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=d;return Tt(()=>(v(w),()=>b(w)),[v,b,w]),l.jsxs(l.Fragment,{children:[l.jsx(me.span,{id:c.textId,...r,ref:m}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Hl.createPortal(r.children,i.valueNode):null]})});fw.displayName=xr;var hw="SelectItemIndicator",mw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return uw(hw,n).isSelected?l.jsx(me.span,{"aria-hidden":!0,...a,ref:t}):null});mw.displayName=hw;var Cf="SelectScrollUpButton",pw=u.forwardRef((e,t)=>{const n=is(Cf,e.__scopeSelect),a=gm(Cf,e.__scopeSelect),[s,r]=u.useState(!1),i=Me(t,a.onScrollButtonChange);return Tt(()=>{if(n.viewport&&n.isPositioned){let o=function(){const d=c.scrollTop>0;r(d)};const c=n.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),s?l.jsx(xw,{...e,ref:i,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop-c.offsetHeight)}}):null});pw.displayName=Cf;var Tf="SelectScrollDownButton",gw=u.forwardRef((e,t)=>{const n=is(Tf,e.__scopeSelect),a=gm(Tf,e.__scopeSelect),[s,r]=u.useState(!1),i=Me(t,a.onScrollButtonChange);return Tt(()=>{if(n.viewport&&n.isPositioned){let o=function(){const d=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<d;r(f)};const c=n.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),s?l.jsx(xw,{...e,ref:i,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop+c.offsetHeight)}}):null});gw.displayName=Tf;var xw=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...s}=e,r=is("SelectScrollButton",n),i=u.useRef(null),o=iu(n),c=u.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),Tt(()=>{var f;const d=o().find(h=>h.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[o]),l.jsx(me.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:J(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(a,50))}),onPointerMove:J(s.onPointerMove,()=>{var d;(d=r.onItemLeave)==null||d.call(r),i.current===null&&(i.current=window.setInterval(a,50))}),onPointerLeave:J(s.onPointerLeave,()=>{c()})})}),TA="SelectSeparator",vw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return l.jsx(me.div,{"aria-hidden":!0,...a,ref:t})});vw.displayName=TA;var Ef="SelectArrow",EA=u.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=ou(n),r=rs(Ef,n),i=is(Ef,n);return r.open&&i.position==="popper"?l.jsx(I0,{...s,...a,ref:t}):null});EA.displayName=Ef;var RA="SelectBubbleInput",yw=u.forwardRef(({__scopeSelect:e,value:t,...n},a)=>{const s=u.useRef(null),r=Me(a,s),i=h0(t);return u.useEffect(()=>{const o=s.current;if(!o)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const h=new Event("change",{bubbles:!0});f.call(o,t),o.dispatchEvent(h)}},[i,t]),l.jsx(me.select,{...n,style:{...Kj,...n.style},ref:r,defaultValue:t})});yw.displayName=RA;function bw(e){return e===""||e===void 0}function jw(e){const t=Hn(e),n=u.useRef(""),a=u.useRef(0),s=u.useCallback(i=>{const o=n.current+i;t(o),function c(d){n.current=d,window.clearTimeout(a.current),d!==""&&(a.current=window.setTimeout(()=>c(""),1e3))}(o)},[t]),r=u.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,s,r]}function ww(e,t,n){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,r=n?e.indexOf(n):-1;let i=AA(e,Math.max(r,0));s.length===1&&(i=i.filter(d=>d!==n));const c=i.find(d=>d.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function AA(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var MA=Qj,_w=Fj,OA=Jj,DA=ew,zA=tw,Nw=nw,$A=rw,Sw=cw,kw=dw,LA=fw,UA=mw,Cw=pw,Tw=gw,Ew=vw;const HA={default:"h-9 px-3 py-2 text-sm",control:"h-7 px-2 py-1 text-xs"},$n=MA,Ln=OA,yn=u.forwardRef(({className:e,children:t,triggerSize:n="default",...a},s)=>l.jsxs(_w,{ref:s,className:F("flex w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent shadow-sm ring-offset-background data-[placeholder]:text-disabled-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",HA[n],e),...a,children:[t,l.jsx(DA,{asChild:!0,children:l.jsx(ub,{className:"text-muted-foreground size-4","aria-hidden":"true"})})]}));yn.displayName=_w.displayName;const Rw=u.forwardRef(({className:e,...t},n)=>l.jsx(Cw,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(sk,{className:"size-4","aria-hidden":"true"})}));Rw.displayName=Cw.displayName;const Aw=u.forwardRef(({className:e,...t},n)=>l.jsx(Tw,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(tk,{className:"size-4","aria-hidden":"true"})}));Aw.displayName=Tw.displayName;const bn=u.forwardRef(({className:e,children:t,position:n="popper",...a},s)=>l.jsx(zA,{container:Xc(),children:l.jsxs(Nw,{ref:s,className:F("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...a,children:[l.jsx(Rw,{}),l.jsx($A,{className:F("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(Aw,{})]})}));bn.displayName=Nw.displayName;const BA=u.forwardRef(({className:e,...t},n)=>l.jsx(Sw,{ref:n,className:F("px-2 py-1.5 text-sm font-semibold",e),...t}));BA.displayName=Sw.displayName;const ct=u.forwardRef(({className:e,children:t,...n},a)=>l.jsxs(kw,{ref:a,className:F("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(UA,{children:l.jsx(Pl,{className:"size-4","aria-hidden":"true"})})}),l.jsx(LA,{children:t})]}));ct.displayName=kw.displayName;const qA=u.forwardRef(({className:e,...t},n)=>l.jsx(Ew,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));qA.displayName=Ew.displayName;function Jt({className:e,...t}){return l.jsx("div",{className:F("animate-pulse rounded-md bg-primary/10",e),...t})}const kt=u.forwardRef(({className:e,containerClassName:t,containerRef:n,containerTabIndex:a,containerAriaLabel:s,...r},i)=>l.jsx("div",{ref:n,tabIndex:a,"aria-label":s,className:F("relative w-full overflow-auto",t),children:l.jsx("table",{ref:i,className:F("w-full caption-bottom text-sm",e),...r})}));kt.displayName="Table";const Ot=u.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:F("[&_tr]:border-b",e),...t}));Ot.displayName="TableHeader";const Ct=u.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:F("[&_tr:last-child]:border-0",e),...t}));Ct.displayName="TableBody";const GA=u.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:F("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t}));GA.displayName="TableFooter";const Ne=u.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:F("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t}));Ne.displayName="TableRow";const te=u.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:F("text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));te.displayName="TableHead";const K=u.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:F("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));K.displayName="TableCell";const VA=u.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:F("text-muted-foreground mt-4 text-sm",e),...t}));VA.displayName="TableCaption";var cu="Tabs",[YA]=xa(cu,[eu]),Mw=eu(),[IA,xm]=YA(cu),Ow=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,onValueChange:s,defaultValue:r,orientation:i="horizontal",dir:o,activationMode:c="automatic",...d}=e,f=Qc(o),[h,m]=Cs({prop:a,onChange:s,defaultProp:r??"",caller:cu});return l.jsx(IA,{scope:n,baseId:Dn(),value:h,onValueChange:m,orientation:i,dir:f,activationMode:c,children:l.jsx(me.div,{dir:f,"data-orientation":i,...d,ref:t})})});Ow.displayName=cu;var Dw="TabsList",zw=u.forwardRef((e,t)=>{const{__scopeTabs:n,loop:a=!0,...s}=e,r=xm(Dw,n),i=Mw(n);return l.jsx(F0,{asChild:!0,...i,orientation:r.orientation,dir:r.dir,loop:a,children:l.jsx(me.div,{role:"tablist","aria-orientation":r.orientation,...s,ref:t})})});zw.displayName=Dw;var $w="TabsTrigger",Lw=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,disabled:s=!1,...r}=e,i=xm($w,n),o=Mw(n),c=Bw(i.baseId,a),d=qw(i.baseId,a),f=a===i.value;return l.jsx(W0,{asChild:!0,...o,focusable:!s,active:f,children:l.jsx(me.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...r,ref:t,onMouseDown:J(e.onMouseDown,h=>{!s&&h.button===0&&h.ctrlKey===!1?i.onValueChange(a):h.preventDefault()}),onKeyDown:J(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&i.onValueChange(a)}),onFocus:J(e.onFocus,()=>{const h=i.activationMode!=="manual";!f&&!s&&h&&i.onValueChange(a)})})})});Lw.displayName=$w;var Uw="TabsContent",Hw=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,forceMount:s,children:r,...i}=e,o=xm(Uw,n),c=Bw(o.baseId,a),d=qw(o.baseId,a),f=a===o.value,h=u.useRef(f);return u.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),l.jsx(Vn,{present:s||f,children:({present:m})=>l.jsx(me.div,{"data-state":f?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:m&&r})})});Hw.displayName=Uw;function Bw(e,t){return`${e}-trigger-${t}`}function qw(e,t){return`${e}-content-${t}`}var PA=Ow,Gw=zw,Vw=Lw,Yw=Hw;const XA=PA,Iw=u.forwardRef(({className:e,...t},n)=>l.jsx(Gw,{ref:n,className:F("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Iw.displayName=Gw.displayName;const Rf=u.forwardRef(({className:e,...t},n)=>l.jsx(Vw,{ref:n,className:F("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Rf.displayName=Vw.displayName;const KA=u.forwardRef(({className:e,...t},n)=>l.jsx(Yw,{ref:n,className:F("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));KA.displayName=Yw.displayName;const qs=u.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:F("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-disabled-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 read-only:cursor-default read-only:bg-muted read-only:text-muted-foreground read-only:border-dashed",e),ref:n,...t}));qs.displayName="Textarea";const Bg=["none","read","comment","write","manage","admin"];function pc(e,t){return Bg.indexOf(e??"none")>=Bg.indexOf(t)}function vm(e){return e==="api_key"?"API key":e==="sdlc_login"?"sdlc login":null}function cd(e,t){const n=vm(e);return e==="sdlc_login"&&t?`${n} on ${Pw(t)}`:n}const QA=String.fromCodePoint(8296),ZA=String.fromCodePoint(8297);function Pw(e){return`${QA}${e}${ZA}`}const ni={blocked:{label:"Blocked",tone:"warning"},waiting_for_user:{label:"Waiting for a member",tone:"warning"},waiting_for_external:{label:"Waiting outside",tone:"warning"},paused:{label:"Paused",tone:"neutral"}},FA={backlog:"neutral",planned:"neutral",in_progress:"info",completed:"success",canceled:"neutral"};function Xw(e){return e.name==="Blocked"?"warning":FA[e.category]}const qg=1800;function pa(e){return new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}function Lr(e){return new Date(e).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function ym(e){return`${Un(e)}, ${Lr(e)}`}function ur(e){return e<90?`${Math.round(e)} s`:e<5400?`${Math.round(e/60)} min`:`${(e/3600).toFixed(1).replace(/\.0$/,"")} h`}function Un(e){return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function WA(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function JA(e){if(e.open_holds===0)return null;if(e.released_holds===e.open_holds)return{label:`${e.released_holds} ready to resolve`,tone:"neutral"};const t=e.open_holds-e.released_holds;return{label:e.released_holds>0?`${t} open · ${e.released_holds} ready`:`${t} open`,tone:"warning"}}function eM(e){return{"task.created":"Created the task","task.title_changed":"Changed the title","task.description_changed":"Changed the description","task.status_changed":"Changed the status","task.priority_changed":"Changed the priority","task.primary_changed":"Changed the primary","task.custom_fields_changed":"Changed a field","task.archived":"Archived the task","task.restored":"Restored the task","task.reordered":"Moved the task","task.reparented":"Moved the task under another","task.contributor_added":"Added a contributor","task.contributor_removed":"Removed a contributor","task.checklist_item_added":"Added a checklist item","task.checklist_item_edited":"Edited a checklist item","task.checklist_item_toggled":"Checked off a checklist item","task.checklist_item_moved":"Moved a checklist item","task.checklist_item_archived":"Removed a checklist item","task.hold_opened":"Opened a hold","task.hold_released":"Released a hold","task.hold_resolved":"Resolved a hold","task.claimed":"Claimed the task","task.claim_released":"Released a claim","task.claim_completed":"Finished a claim","task.claim_expired":"Ended a lapsed claim","task.relation_added":"Linked a task","task.relation_archived":"Unlinked a task","task.project_linked":"Linked a project","task.project_unlinked":"Unlinked a project"}[e.event_type]??"Changed the task"}const Ea="not_set";function tM({open:e,commands:t,list_id:n,list_revision:a,default_status_id:s,statuses:r,priorities:i,members:o,on_close:c,on_created:d}){var q;const f=yi(),[h,m]=u.useState(""),[x,w]=u.useState(""),[v,b]=u.useState(s??((q=r[0])==null?void 0:q.id)??""),[g,p]=u.useState(Ea),[y,j]=u.useState(Ea),[_,k]=u.useState(!1),[N,S]=u.useState(null),[R,A]=u.useState(!1);u.useEffect(()=>{var O;e&&(m(""),w(""),b(s??((O=r[0])==null?void 0:O.id)??""),p(Ea),j(Ea),k(!1),S(null))},[e,s,r]);const z=async O=>{if(O.preventDefault(),!h.trim()){k(!0);return}A(!0),S(null);try{const $=await t.run("create_task",{list_id:n,expected_list_revision:a,title:h.trim(),description:x.trim()||null,status_id:v||null,priority_id:g===Ea?null:g,primary_user_id:y===Ea?null:y});if(!$.ok){S($.refusal.message);return}f.success("Task created."),await d()}finally{A(!1)}};return l.jsx(wi,{open:e,onOpenChange:O=>O?null:c(),children:l.jsx(_i,{children:l.jsxs("form",{onSubmit:O=>void z(O),noValidate:!0,children:[l.jsxs(Ni,{children:[l.jsx(ki,{children:"New task"}),l.jsx(Ci,{children:"Add a task to this List."})]}),l.jsxs("div",{className:"mt-4 grid gap-4",children:[N&&l.jsxs(ge,{variant:"destructive",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(pe,{children:N})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"new-task-title",children:"Title"}),l.jsx(_n,{id:"new-task-title",placeholder:"What needs doing",value:h,required:!0,"aria-invalid":_,"aria-describedby":_?"new-task-title-error":void 0,onChange:O=>{m(O.target.value),k(!1)}}),_&&l.jsx("p",{id:"new-task-title-error",className:"text-destructive text-xs",children:"Give the task a title."})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"new-task-description",children:"Description (optional)"}),l.jsx(qs,{id:"new-task-description",rows:4,value:x,onChange:O=>w(O.target.value)})]}),l.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"new-task-status",children:"Status"}),l.jsxs($n,{value:v,onValueChange:b,children:[l.jsx(yn,{id:"new-task-status",children:l.jsx(Ln,{})}),l.jsx(bn,{children:r.map(O=>l.jsx(ct,{value:O.id,children:O.name},O.id))})]})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"new-task-priority",children:"Priority"}),l.jsxs($n,{value:g,onValueChange:p,children:[l.jsx(yn,{id:"new-task-priority",children:l.jsx(Ln,{})}),l.jsxs(bn,{children:[l.jsx(ct,{value:Ea,children:"Not set"}),i.map(O=>l.jsx(ct,{value:O.id,children:O.name},O.id))]})]})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"new-task-primary",children:"Primary"}),l.jsxs($n,{value:y,onValueChange:j,children:[l.jsx(yn,{id:"new-task-primary",children:l.jsx(Ln,{})}),l.jsxs(bn,{children:[l.jsx(ct,{value:Ea,children:"Not set"}),o.map(O=>l.jsx(ct,{value:O.user_id,children:O.label},O.user_id))]})]})]})]})]}),l.jsxs(Si,{className:"mt-6",children:[l.jsx(I,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),l.jsx(I,{type:"submit",disabled:R,children:R?"Creating…":"Create task"})]})]})})})}const nM="Your organization's work, in queue order. Claim a task to show you are working on it.",vr="any",Kw="none",aM=1,sM=250,lM="The sdlc engine here is too old for this page",Qw="Update the main checkout, then restart sdlc viewer.";function bm(){const e=Us().tasks;if(!e)throw new Error("The Tasks page rendered without the tasks seam.");return e}function rM({org:e}){var w;const t=bm(),{href:n,Link:a}=jt(),[s,r]=u.useState({state:"loading"}),[i,o]=u.useState([]),[c,d]=u.useState(null),f=u.useRef(0),h=u.useCallback(async v=>{const b=f.current+=1;v&&r({state:"loading"});const g=await t.availability({fresh:v});b===f.current&&r(g)},[t.availability]);u.useEffect(()=>{h(!1)},[h]);const m=u.useCallback(()=>void h(!0),[h]);if(u.useEffect(()=>{let v=!0;return t.members().then(b=>{v&&b.ok&&o(b.data)}),()=>{v=!1}},[t.members]),u.useEffect(()=>{if(!t.access)return;let v=!0;return t.access().then(b=>{v&&b.ok&&d(b.data)}),()=>{v=!1}},[t.access]),s.state==="off"&&((w=s.refusal)==null?void 0:w.reason)!=="engine_missing")return l.jsx(pm,{title:"Page not found",description:"This page does not exist, or you do not have access to it.",backHref:n(`/org/${e}`),backLabel:"Back to the organization",link:a});const x=(c==null?void 0:c.read_only_reason)??nM;return l.jsx("div",{className:"flex h-full min-h-0 flex-1 flex-col overflow-auto px-4 py-4 sm:px-6 lg:px-8",children:s.state==="active"?l.jsx(oM,{active:s,org:e,members:i,description:x,read_only_reason:c==null?void 0:c.read_only_reason,reload_configuration:m}):l.jsxs(l.Fragment,{children:[l.jsx(ls,{title:"Tasks",description:x}),s.state==="loading"&&l.jsx(Zw,{}),(s.state==="error"||s.state==="off")&&l.jsx(Fw,{refusal:s.refusal,on_retry:m}),s.state==="available"&&l.jsx(iM,{on_done:m})]})})}function Zw(){return l.jsx("div",{className:"mt-6 grid gap-2",role:"status","aria-label":"Loading tasks",children:Array.from({length:6},(e,t)=>l.jsx(Jt,{className:t===5?"h-10 w-2/3":"h-10 w-full"},t))})}function Fw({refusal:e,on_retry:t}){return(e==null?void 0:e.reason)==="view_outdated"?l.jsxs(ge,{variant:"destructive",className:"mt-6",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:lM}),l.jsx(pe,{children:Qw})]}):(e==null?void 0:e.reason)==="engine_missing"?l.jsxs(ge,{variant:"info",className:"mt-6",children:[l.jsx(fa,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Tasks need the sdlc engine"}),l.jsx(pe,{children:e.message})]}):l.jsxs(ge,{variant:"destructive",className:"mt-6",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Tasks could not be loaded"}),l.jsxs(pe,{children:[l.jsx("p",{children:e!=null&&e.reason?e.message:"Check your connection and try again."}),l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:t,children:"Retry"})]})]})}function iM({on_done:e}){const{commands:t}=bm(),n=yi(),[a,s]=u.useState(!1),r=t==null?void 0:t.activate,i=async()=>{if(!r)return;s(!0);const o=await r();if(s(!1),!o.ok){n.error(o.refusal.message);return}n.success("Tasks are on."),e()};return l.jsxs(ge,{variant:"info",className:"mt-6",children:[l.jsx(fa,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Tasks are not on for this organization"}),l.jsxs(pe,{children:[l.jsx("p",{children:"Turning them on creates one List with the default workflow. Members then see tasks as their access allows. It needs two-factor sign-in."}),r?l.jsx(I,{type:"button",size:"sm",className:"mt-2",disabled:a,onClick:()=>void i(),children:"Turn on Tasks"}):null]})]})}const ud=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function oM({active:e,org:t,members:n,description:a,read_only_reason:s,reload_configuration:r}){var $m;const{commands:i,listTasks:o,waitingOnYou:c,hierarchyRevision:d}=bm(),{href:f,Link:h}=jt(),{self_id:m}=Hc(),x=yi(),{list:w,workspace:v}=e,b=w.offers,g=b!==void 0,p=u.useMemo(()=>{var M;return((M=v.workflows.find(De=>De.id===w.workflow_id))==null?void 0:M.statuses)??[]},[v,w]),y=v.priorities,j=!!i&&pc(w.permission,"write"),_=j&&pc(w.permission,"manage"),k=u.useMemo(()=>new Map(n.map(M=>[M.user_id,M])),[n]),N=M=>{var De;return M?M===m?"You":((De=k.get(M))==null?void 0:De.label)??"A member":""},[S,R]=u.useState("active"),[A,z]=u.useState(!1),[q,O]=u.useState(""),[$,G]=u.useState("");u.useEffect(()=>{const M=setTimeout(()=>G(q),sM);return()=>clearTimeout(M)},[q]);const[E,B]=u.useState(null),[C,L]=u.useState(vr),[P,D]=u.useState(!1),[V,ne]=u.useState(!1),[Y,ve]=u.useState(null),[ee,H]=u.useState([]),[W,oe]=u.useState(null),[fe,he]=u.useState(0),[ue,se]=u.useState(!1),[ae,Xe]=u.useState(null),[ie,et]=u.useState(null),[lt,tt]=u.useState(!1),[xt,le]=u.useState(null),[Gt,ya]=u.useState({}),[nn,ba]=u.useState(""),{confirm:In,confirm_dialog:Jl}=ji(),an=u.useRef(null),os=u.useRef(null),X=u.useRef(null),Ce=u.useRef(null),[Se,Gs]=u.useState(void 0),ja=!!($.trim()||E||C!==vr||P||V),wa=u.useRef(0),Rt=u.useCallback(async(M,De=!1)=>{const Ue=M?wa.current:wa.current+=1,Ye={state:S,assigned_to_me:A||void 0,cursor:M,search:$.trim()||void 0,group:E??void 0,owner:C===vr?void 0:C===Kw?"":C,urgent:P||void 0,over_estimate:V||void 0},wt=$t=>o(w.id,{...Ye,cursor:$t});let ft=await wt(M),Ie=!!M;if(!ft.ok&&ft.refusal.code==="cursor_stale"&&(ft=await wt(),Ie=!1),Ue!==wa.current)return;if(!ft.ok){oe(ft.refusal),he($t=>$t+1);return}const _t=ft.data;oe(null),he(0),!(De&&ud(_t,X.current))&&(X.current=_t,ve(_t),_t.facets&&Gs(_t.facets),H($t=>Ie?[...$t,..._t.tasks]:_t.tasks))},[o,w.id,S,A,$,E,C,P,V]),_a=u.useCallback(async()=>{const M=await c();if(et(Ue=>M.ok?null:ud(Ue,M.refusal)?Ue:M.refusal),!M.ok&&g)return;const De=M.ok?M.data:null;ud(De,Ce.current)||(Ce.current=De,Xe(De))},[c,g]);u.useEffect(()=>{X.current=null,ve(null)},[S,A]),u.useEffect(()=>{Rt()},[Rt]),u.useEffect(()=>{_a()},[_a]);const Pn=u.useCallback(async()=>{await Promise.all([Rt(),_a()])},[Rt,_a]),Na=b==null?void 0:b.refresh_ms;u.useEffect(()=>{if(!Na)return;const M=setInterval(()=>{Rt(void 0,!0),_a()},Na);return()=>clearInterval(M)},[Na,Rt,_a]);const er=u.useCallback(async(M,De,Ue)=>{if(!i)return;const Ye=await i.run(M,De);Ye.ok?Ue&&x.success(Ue):(x.error(Ye.refusal.message),Ye.refusal.code==="revision_conflict"&&r()),await Pn()},[i,x,Pn,r]),Vs=p.find(M=>M.category==="completed"),T=async(M,De,Ue)=>{const Ye=De+Ue,wt=ee[Ye];if(!wt||!Y||!i)return;const ft=async(Ie,_t)=>{const $t=await i.run(Ie,_t);if(!$t.ok)throw $t.refusal;return $t.data};try{let Ie=Y.list.order_revision,_t=M.revision;if(wt.queue_rank===null){const $t=ee.findIndex(Sa=>Sa.queue_rank===null);for(const Sa of ee.slice($t,Ye+1)){const $i=await ft("reorder",{task_id:Sa.id,expected_revision:Sa.revision,expected_order_revision:Ie,placement:"end"});Ie=$i.list.order_revision,Sa.id===M.id&&(_t=$i.task.revision)}}await ft("reorder",{task_id:M.id,expected_revision:_t,expected_order_revision:Ie,placement:Ue<0?"before":"after",anchor_task_id:wt.id})}catch(Ie){x.error(Ie.message)}await Pn()},ce=M=>{Vs&&er("update_task",{task_id:M.id,expected_revision:M.revision,changes:{status_id:Vs.id}},`${M.title} completed.`)},Oe=async M=>{if(!Y||!await In({title:"Archive this task?",description:"It leaves the queue and becomes read-only. Its claim, holds and history stay, and a manager can restore it.",action_label:"Archive task",destructive:!0}))return;const[Ue,Ye]=await Promise.all([o(w.id,{limit:1}),d(v.id)]);if(!Ue.ok||!Ye.ok){x.error(Ue.ok?Ye.ok?"":Ye.refusal.message:Ue.refusal.message);return}await er("archive_task",{task_id:M.id,expected_revision:M.revision,expected_order_revision:Ue.data.list.order_revision,expected_hierarchy_revision:Ye.data},`${M.title} archived.`)},dt=async M=>{await er("release_hold",{hold_id:M},"Hold released.")},Dm=async(M,De,Ue,Ye)=>{var $t;if(!(i!=null&&i.complete)||!await In({title:`Mark ${De} done?`,description:Ue.reason?`“${Ue.reason}”
|
|
334
|
+
|
|
335
|
+
It leaves the open tasks.`:"It leaves the open tasks.",action_label:"Mark done"}))return;le(M);const ft=await i.complete(Ue);if(le(null),!ft.ok){ya(Sa=>({...Sa,[M]:ft.refusal.message}));return}ya(({[M]:Sa,...$i})=>$i),ba(`${De} marked done.`),await Pn();const Ie=os.current;($t=(Ye?(Ie==null?void 0:Ie.querySelector(`[data-done-key="${CSS.escape(Ye)}"]`))??(Ie==null?void 0:Ie.querySelector(`[data-title-key="${CSS.escape(Ye)}"] a`)):null)??an.current)==null||$t.focus()},zm=()=>{var M;O(""),G(""),B(null),L(vr),D(!1),ne(!1),(M=an.current)==null||M.focus()},C_=new Map(p.map(M=>[M.id,M])),T_=new Map(y.map(M=>[M.id,M])),fu=new Map(ee.map(M=>[M.id,M.title])),hu=j&&S==="active",E_=ee.some(M=>M.local_done),mu=hu||E_,pu=!g||y.length>0,R_=!A&&!ja,A_=5+(pu?1:0)+(mu?1:0),M_=W!==null&&(W.reason==="store_locked"||W.reason==="engine_failed")&&fe<=aM,zi=(ae==null?void 0:ae.holds)??[],O_=ee.map(M=>M.id),D_=zi.map(M=>M.id);return l.jsxs("div",{ref:os,className:"contents",children:[l.jsx(ls,{title:"Tasks",description:a,actions:j?l.jsxs(I,{type:"button",onClick:()=>tt(!0),children:[l.jsx(rc,{className:"mr-2 size-4","aria-hidden":"true"}),"New task"]}):null}),g&&(Y!=null&&Y.open)?l.jsxs("p",{className:"text-muted-foreground mt-1 text-sm",children:[Y.open," open"]}):null,Na?l.jsx("p",{className:"text-muted-foreground mt-1 text-xs",role:"status",children:W?`Not reading · trying again every ${Math.round(Na/1e3)}s`:Y?`Live · refreshes every ${Math.round(Na/1e3)}s`:"Connecting…"}):null,g?l.jsx("p",{className:"sr-only",role:"status",children:nn}):null,(g||zi.length>0)&&l.jsxs(Et,{as:"section","aria-labelledby":"waiting-title",className:"mt-4 p-4","data-testid":"tasks-waiting",children:[l.jsx("h2",{id:"waiting-title",className:"text-lg font-semibold",children:"Waiting on you"}),zi.length>0?l.jsx("ul",{className:"mt-2 divide-y","aria-labelledby":"waiting-title",children:zi.map((M,De)=>{var ft,Ie;const Ue=ni[M.hold_type],Ye=M.target.kind==="task"?`Because you claim ${fu.get(M.target.task_id)??"the task it waits on"} · `:"",wt=M.local_done;return l.jsxs("li",{id:`waiting-${M.id}`,"data-title-key":M.id,className:"flex flex-wrap items-center gap-3 py-2",children:[M.task?l.jsx(h,{className:"text-primary min-w-40 flex-1 hover:underline",href:f(`/org/${t}/tasks/${M.task.id}`),children:M.task.title}):l.jsx("span",{className:"min-w-40 flex-1",children:M.reason}),l.jsx(Fe,{variant:Ue.tone,children:M.local_label??Ue.label}),l.jsxs("div",{className:"min-w-48 flex-2",children:[M.task?l.jsx("div",{className:"text-sm",children:M.reason}):null,l.jsxs("div",{className:"text-muted-foreground text-xs",children:[Ye,"From ",N(M.opened_by)," · ",Un(M.opened_at)]}),(ft=M.local_threads)!=null&&ft.length?l.jsxs("div",{className:"text-muted-foreground text-xs",children:["Answer it in"," ",l.jsx(h,{className:"text-primary hover:underline",href:f(`/org/${t}/threads`),children:"Threads"}),": ",M.local_threads.join(" · ")]}):null,Gt[M.id]?l.jsx("div",{className:"text-destructive text-xs",role:"alert",children:Gt[M.id]}):null]}),wt&&(i!=null&&i.complete)?l.jsx(I,{type:"button",variant:"outline",size:"sm","data-done-key":M.id,"aria-label":`Mark ${((Ie=M.task)==null?void 0:Ie.title)??M.reason} done`,loading:xt===M.id,onClick:()=>{var _t;return void Dm(M.id,((_t=M.task)==null?void 0:_t.title)??M.reason,wt,D_[De+1]??null)},children:"Done"}):null,g?null:l.jsx(I,{type:"button",variant:"outline",size:"sm",onClick:()=>void dt(M.id),children:"Release"})]},M.id)})}):ae?l.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"Nothing in this checkout waits on you."}):null,g&&ie?l.jsx("p",{className:"text-muted-foreground mt-2 text-sm",role:"status",children:ie.reason==="view_outdated"?`Waiting on you is not read here. ${Qw}`:"Waiting on you could not be read. It is read again with the list."}):null,l.jsx("p",{className:"text-muted-foreground mt-2 text-xs",children:g?"This checkout only. Teammates' agents are not listed here.":"Release a hold when you have done your part. Whoever can edit the task then resolves it."})]}),!j&&!s&&l.jsxs(ge,{variant:"info",className:"mt-4",children:[l.jsx(Bh,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"You can view these tasks"}),l.jsx(pe,{children:"Ask an organization admin for write access to change them."})]}),l.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4",children:[(b==null?void 0:b.archived)!==!1?l.jsx(XA,{value:S,onValueChange:M=>R(M),children:l.jsxs(Iw,{"aria-label":"Which tasks",children:[l.jsx(Rf,{value:"active",children:"Active"}),l.jsx(Rf,{value:"archived",children:"Archived"})]})}):null,(b==null?void 0:b.assigned_to_me)!==!1?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ql,{id:"tasks-mine",checked:A,onCheckedChange:M=>z(M===!0)}),l.jsx(Qe,{htmlFor:"tasks-mine",children:"Assigned to me"})]}):null,b!=null&&b.search?l.jsx(_n,{ref:an,type:"search",className:"w-64","aria-label":"Search tasks",placeholder:"Search title, ID or detail",value:q,onChange:M=>O(M.target.value)}):null,Se!=null&&Se.owners?l.jsx(uM,{owners:Se.owners,no_owner:Se.no_owner,value:C,on_change:L}):null]}),($m=Se==null?void 0:Se.groups)!=null&&$m.length?l.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",role:"group","aria-label":"Status",children:[Se.groups.map(M=>l.jsxs(I,{type:"button",variant:"outline",size:"sm",className:Co,"aria-pressed":E===M.id,onClick:()=>B(De=>De===M.id?null:M.id),children:[M.label," ",M.count]},M.id)),Se.marks?l.jsxs(l.Fragment,{children:[l.jsxs(I,{type:"button",variant:"outline",size:"sm",className:Co,"aria-pressed":P,onClick:()=>D(M=>!M),children:["Urgent ",Se.marks.urgent]}),l.jsxs(I,{type:"button",variant:"outline",size:"sm",className:Co,"aria-pressed":V,onClick:()=>ne(M=>!M),children:["Over estimate ",Se.marks.over_estimate]})]}):null]}):null,ja&&(Y==null?void 0:Y.matched)!==void 0&&Y.total!==void 0?l.jsxs("p",{className:"text-muted-foreground mt-2 text-sm",children:[Y.matched," of ",Y.total," match ·"," ",l.jsx(I,{type:"button",variant:"link",size:"inline-sm",onClick:zm,children:"Clear"})]}):null,M_?l.jsx("p",{className:"text-muted-foreground mt-4 text-sm",children:"Tasks are busy. Reading them again…"}):W?l.jsx(Fw,{refusal:W,on_retry:()=>void Rt()}):null,!Y&&!W&&l.jsx(Zw,{}),Y&&ee.length===0&&ja?l.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[l.jsx(vb,{className:"text-muted-foreground size-8","aria-hidden":"true"}),l.jsx("h2",{className:"text-lg font-semibold",children:"No tasks match"}),l.jsx("p",{className:"text-muted-foreground text-sm",children:"Nothing open matches these filters."}),l.jsx(I,{type:"button",variant:"outline",onClick:zm,children:"Clear filters"})]}):Y&&ee.length===0&&S==="active"&&!A&&g?l.jsx("p",{className:"text-muted-foreground mt-6 text-sm",children:"No tasks recorded yet."}):Y&&ee.length===0&&S==="active"&&!A?l.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[l.jsx(hb,{className:"text-muted-foreground size-8","aria-hidden":"true"}),l.jsx("h2",{className:"text-lg font-semibold",children:"No tasks yet"}),l.jsx("p",{className:"text-muted-foreground text-sm",children:"Create the first task, or ask an agent to create one with the SDLC MCP tools."}),j&&l.jsxs(I,{type:"button",onClick:()=>tt(!0),children:[l.jsx(rc,{className:"mr-2 size-4","aria-hidden":"true"}),"New task"]})]}):Y?l.jsxs(l.Fragment,{children:[l.jsx(Et,{className:"mt-4 shrink-0 overflow-x-auto",children:l.jsxs(kt,{containerAriaLabel:"Tasks",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"Title"}),l.jsx(te,{children:"Status"}),pu?l.jsx(te,{className:"hidden md:table-cell",children:"Priority"}):null,l.jsx(te,{className:"hidden md:table-cell",children:"Primary"}),l.jsx(te,{className:"hidden md:table-cell",children:"Holds"}),l.jsx(te,{children:"Claimed by"}),mu?l.jsx(te,{className:"text-right",children:"Actions"}):null]})}),l.jsxs(Ct,{children:[ee.map((M,De)=>{var ft,Ie;const Ue=C_.get(M.status_id),Ye=JA(M),wt=M.local_done;return l.jsxs(Ne,{"data-testid":"tasks-row",children:[l.jsxs(K,{"data-title-key":M.id,children:[M.no_page?l.jsx("span",{children:M.title}):l.jsx(h,{className:"text-primary hover:underline",href:f(`/org/${t}/tasks/${M.id}`),children:M.title}),M.parent_task_id&&fu.get(M.parent_task_id)?l.jsx("div",{className:"text-muted-foreground text-xs",children:fu.get(M.parent_task_id)}):null,g?l.jsx(cM,{row:M}):null,Gt[M.id]?l.jsx("div",{className:"text-destructive text-xs",role:"alert",children:Gt[M.id]}):null]}),l.jsx(K,{children:Ue?l.jsx(Fe,{variant:Xw(Ue),children:Ue.name}):null}),pu?l.jsx(K,{className:"hidden md:table-cell",children:M.priority_id?((ft=T_.get(M.priority_id))==null?void 0:ft.name)??"":l.jsx("span",{className:"text-muted-foreground",children:"Not set"})}):null,l.jsx(K,{className:"hidden md:table-cell",children:M.owner_title?M.owner_title:M.primary_user_id?N(M.primary_user_id):l.jsx("span",{className:"text-muted-foreground",children:"Unassigned"})}),l.jsx(K,{className:"hidden md:table-cell",children:Ye?l.jsx(Fe,{variant:Ye.tone,children:Ye.label}):l.jsx("span",{className:"text-muted-foreground",children:"None"})}),l.jsx(K,{"data-testid":"tasks-claim",children:l.jsx(dM,{row:M,holder:N((Ie=M.claim)==null?void 0:Ie.user_id)})}),mu?l.jsx(K,{className:"text-right whitespace-nowrap",children:l.jsxs("div",{className:"flex justify-end gap-2",children:[wt&&"hold"in wt?l.jsx("a",{className:"text-primary text-sm hover:underline",href:`#waiting-${wt.hold}`,children:"In Waiting on you"}):wt&&(i!=null&&i.complete)?l.jsx(I,{type:"button",variant:"outline",size:"sm","data-done-key":M.id,"aria-label":`Mark ${M.title} done`,loading:xt===M.id,onClick:()=>void Dm(M.id,M.title,wt,O_[De+1]??null),children:"Done"}):null,hu&&R_?l.jsxs(l.Fragment,{children:[l.jsx(I,{type:"button",variant:"outline",size:"icon","aria-label":`Move ${M.title} up`,disabled:De===0,onClick:()=>void T(M,De,-1),children:l.jsx(XS,{className:"size-4","aria-hidden":"true"})}),l.jsx(I,{type:"button",variant:"outline",size:"icon","aria-label":`Move ${M.title} down`,disabled:De===ee.length-1,onClick:()=>void T(M,De,1),children:l.jsx(VS,{className:"size-4","aria-hidden":"true"})})]}):null,hu?l.jsxs(su,{children:[l.jsx(lu,{asChild:!0,children:l.jsx(I,{type:"button",variant:"outline",size:"icon","aria-label":`More actions for ${M.title}`,children:l.jsx(Hh,{className:"size-4","aria-hidden":"true"})})}),l.jsxs(Mi,{align:"end",children:[Vs&&M.status_id!==Vs.id?l.jsx(As,{onSelect:()=>ce(M),children:"Complete"}):null,_?l.jsx(As,{className:"text-destructive focus:text-destructive",onSelect:()=>void Oe(M),children:"Archive"}):null]})]}):null]})}):null]},M.id)}),ee.length===0&&l.jsx(Ne,{children:l.jsx(K,{colSpan:A_,className:"text-muted-foreground h-24 text-center",children:S==="archived"?"No archived tasks.":"No tasks are assigned to you."})})]})]})}),Y.next_cursor?l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2 self-start",disabled:ue,onClick:async()=>{se(!0),await Rt(Y.next_cursor??void 0),se(!1)},children:"Load more"}):null]}):null,j&&i&&l.jsx(tM,{open:lt,commands:i,list_id:w.id,list_revision:(Y==null?void 0:Y.list.revision)??w.revision,default_status_id:w.default_status_id,statuses:p,priorities:y,members:n,on_close:()=>tt(!1),on_created:async()=>{tt(!1),await Pn()}}),Jl]})}function cM({row:e}){var n;const t=[e.local_after,e.local_detail].filter(Boolean).join(" · ");return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"text-muted-foreground font-mono text-xs",children:[e.id,e.match?` · matched in ${e.match}`:""]}),t?l.jsx("div",{className:"text-muted-foreground text-xs",children:t}):null,(n=e.local_marks)!=null&&n.length?l.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:e.local_marks.map(a=>l.jsx(Fe,{variant:a.tone??"neutral",children:a.label},a.label))}):null]})}function uM({owners:e,no_owner:t,value:n,on_change:a}){return l.jsxs($n,{value:n,onValueChange:a,children:[l.jsx(yn,{className:"w-56","aria-label":"Owner",children:l.jsx(Ln,{})}),l.jsxs(bn,{children:[l.jsx(ct,{value:vr,children:"Any owner"}),e.map(s=>l.jsxs(ct,{value:s.id,children:[s.label," (",s.count,")"]},s.id)),t!==void 0?l.jsxs(ct,{value:Kw,children:["No owner (",t,")"]}):null]})]})}function dM({row:e,holder:t}){const n=e.claim;if(!n)return l.jsx("span",{className:"text-muted-foreground",children:"Nobody"});if(n.lapsed){const a=new Date(n.lease_expires_at)<=new Date;return l.jsxs("div",{children:[l.jsxs("div",{className:"text-warning",children:["Lapsed · ",t]}),l.jsx("div",{className:"text-muted-foreground text-xs",children:a?`Ran out at ${pa(n.lease_expires_at)}`:"Can no longer edit it"})]})}return l.jsxs("div",{className:"max-w-64",children:[l.jsxs("div",{children:[t,n.via?` · ${vm(n.via)}`:""]}),l.jsxs("div",{className:"text-muted-foreground truncate text-xs",title:n.via==="sdlc_login"&&n.via_device?Pw(n.via_device):void 0,children:["Until ",pa(n.lease_expires_at),n.via==="sdlc_login"&&n.via_device?l.jsxs(l.Fragment,{children:[" · ",l.jsx("bdi",{children:n.via_device})]}):null]})]})}const fM={waiting_for_user:{label:"Waiting for",help:"The member who must act. They see this hold under Waiting on you."},blocked:{label:"Blocked by",help:"The task that must finish first."},waiting_for_external:{label:"Waiting for",help:"Who or what outside the organization."},paused:null};function hM({open:e,members:t,tasks:n,holds_my_web_claim:a,on_close:s,on_submit:r}){const[i,o]=u.useState("waiting_for_user"),[c,d]=u.useState(""),[f,h]=u.useState(""),[m,x]=u.useState(!1),[w,v]=u.useState({}),[b,g]=u.useState(null),[p,y]=u.useState(!1);u.useEffect(()=>{e&&(o("waiting_for_user"),d(""),h(""),x(!1),v({}),g(null))},[e]);const j=fM[i],_=async k=>{k.preventDefault();const N={target:j!==null&&!c.trim(),reason:!f.trim()};if(v(N),N.target||N.reason)return;y(!0);const S={hold_type:i,reason:f.trim(),release_claim:m};i==="waiting_for_user"&&(S.target_user_id=c),i==="blocked"&&(S.target_task_id=c),i==="waiting_for_external"&&(S.target_label=c.trim());const R=await r(S);y(!1),g(R)};return l.jsx(wi,{open:e,onOpenChange:k=>k?null:s(),children:l.jsx(_i,{children:l.jsxs("form",{onSubmit:k=>void _(k),noValidate:!0,children:[l.jsxs(Ni,{children:[l.jsx(ki,{children:"Add hold"}),l.jsx(Ci,{children:"Say what this task is waiting for."})]}),l.jsxs("div",{className:"mt-4 grid gap-4",children:[b&&l.jsxs(ge,{variant:"destructive",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(pe,{children:b})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"hold-type",children:"Type"}),l.jsxs($n,{value:i,onValueChange:k=>{o(k),d(""),v({})},children:[l.jsx(yn,{id:"hold-type",children:l.jsx(Ln,{})}),l.jsx(bn,{children:Object.keys(ni).map(k=>l.jsx(ct,{value:k,children:ni[k].label},k))})]})]}),j?l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"hold-target",children:j.label}),i==="waiting_for_external"?l.jsx(_n,{id:"hold-target",value:c,"aria-invalid":w.target,onChange:k=>d(k.target.value)}):l.jsxs($n,{value:c,onValueChange:d,children:[l.jsx(yn,{id:"hold-target","aria-invalid":w.target,children:l.jsx(Ln,{placeholder:i==="blocked"?"Choose a task":"Choose a member"})}),l.jsx(bn,{children:i==="blocked"?n.map(k=>l.jsx(ct,{value:k.id,children:k.title},k.id)):t.map(k=>l.jsx(ct,{value:k.user_id,children:k.label},k.user_id))})]}),l.jsx("p",{className:w.target?"text-destructive text-xs":"text-muted-foreground text-xs",children:w.target?"Choose what it waits for.":j.help})]}):l.jsx("p",{className:"text-muted-foreground text-xs",children:"You resume it yourself."}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"hold-reason",children:"Reason"}),l.jsx(qs,{id:"hold-reason",rows:3,placeholder:"What the task is waiting for",value:f,"aria-invalid":w.reason,onChange:k=>h(k.target.value)}),w.reason&&l.jsx("p",{className:"text-destructive text-xs",children:"Give a reason."})]}),a&&l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ql,{id:"hold-release-claim",checked:m,onCheckedChange:k=>x(k===!0)}),l.jsx(Qe,{htmlFor:"hold-release-claim",children:"Also release my claim"})]})]}),l.jsxs(Si,{className:"mt-6",children:[l.jsx(I,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),l.jsx(I,{type:"submit",disabled:p,children:p?"Adding…":"Add hold"})]})]})})})}function Oi(){const e=Us().tasks;if(!e)throw new Error("The Task page rendered without the tasks seam.");return e}function jm(){return l.jsxs("div",{className:"grid gap-3",role:"status","aria-label":"Loading task",children:[l.jsx(Jt,{className:"h-8 w-1/2"}),Array.from({length:7},(e,t)=>l.jsx(Jt,{className:t===6?"h-6 w-2/3":"h-6 w-full"},t))]})}function gc({back:e,description:t}){const{href:n,Link:a}=jt();return l.jsx(pm,{title:"Task not found",description:t??"It may have been removed, or you may not have access to it.",backHref:n(e),backLabel:"Back to tasks",link:a})}const Zs="not_set",mM=10*60*1e3,Gg=20;function pM(){const{members:e}=Oi(),[t,n]=u.useState([]);u.useEffect(()=>{let r=!0;return e().then(i=>{r&&i.ok&&n(i.data)}),()=>{r=!1}},[e]);const a=u.useMemo(()=>new Map(t.map(r=>[r.user_id,r])),[t]),s=u.useCallback((r,i)=>{var o;return r?r===i?"You":((o=a.get(r))==null?void 0:o.label)??"A member":""},[a]);return{members:t,name:s}}function gM({active:e,task_id:t,back:n}){const a=Oi(),{task:s,activity:r,listTasks:i,hierarchyRevision:o,commands:c}=a,{href:d,Link:f}=jt(),h=yi(),{self_id:m}=Hc(),{members:x,name:w}=pM(),{workspace:v}=e,{confirm:b,confirm_dialog:g}=ji(),[p,y]=u.useState(null),[j,_]=u.useState(!1),[k,N]=u.useState(!1),[S,R]=u.useState(null),[A,z]=u.useState([]),[q,O]=u.useState(Gg),[$,G]=u.useState([]),[E,B]=u.useState(!1),[C,L]=u.useState(null),[P,D]=u.useState(null),[V,ne]=u.useState(""),[Y,ve]=u.useState(null),ee=u.useCallback(async()=>{if(!s)return;const T=await s(t);T.ok?(y(T.data),N(!1)):T.refusal.status===404||T.refusal.status===400?_(!0):N(!0)},[s,t]),H=u.useRef(0),W=u.useCallback(async()=>{if(!r)return;const T=H.current+=1;let ce=[],Oe;for(;;){const dt=await r(t,Oe);if(T!==H.current||!dt.ok)return;if(ce=[...ce,...dt.data.events].slice(-1e3),!dt.data.more||!dt.data.next_cursor)break;Oe=dt.data.next_cursor}T===H.current&&z(ce.reverse())},[r,t]);u.useEffect(()=>{ee(),W()},[ee,W]);const oe=p?v.lists.find(T=>T.id===p.task.list_id):void 0,fe=u.useMemo(()=>{var T;return((T=v.workflows.find(ce=>ce.id===(p==null?void 0:p.task.workflow_id)))==null?void 0:T.statuses)??[]},[v,p==null?void 0:p.task.workflow_id]);u.useEffect(()=>{if(!p)return;let T=!0;return i(p.task.list_id,{limit:100}).then(ce=>{T&&G(ce.ok?ce.data.tasks.filter(Oe=>Oe.id!==p.task.id).map(Oe=>({id:Oe.id,title:Oe.title})):[])}),()=>{T=!1}},[i,p==null?void 0:p.task.list_id,p==null?void 0:p.task.id,p]);const he=u.useCallback(async()=>{await Promise.all([ee(),W()])},[ee,W]),ue=u.useCallback((T,ce)=>c?c.run(T,ce):Promise.resolve({ok:!1,refusal:{status:0,message:"This page cannot change tasks."}}),[c]),se=u.useCallback(async(T,ce,Oe)=>{const dt=await ue(T,ce);return dt.ok?(Oe&&h.success(Oe),await he(),dt.data):(dt.refusal.code==="revision_conflict"?R({tone:"warning",title:"This task changed while you were editing",body:"We reloaded it. Check the change, then save again."}):dt.refusal.code==="claim_held"?(await ee(),R({tone:"destructive",title:"Someone else claimed this task first",body:"Their claim is shown below. You can take it over if it lapses."})):h.error(dt.refusal.message),await he(),null)},[ue,h,he,ee]),ae=(p==null?void 0:p.claim)??null,Xe=ae!==null&&ae.id===Y&&!ae.lapsed&&!ae.via?ae.id:null;if(u.useEffect(()=>{if(!Xe)return;const T=window.setInterval(()=>{ue("renew_claim",{claim_id:Xe,lease_seconds:qg}).then(()=>ee())},mM);return()=>window.clearInterval(T)},[Xe,ue,ee]),j)return l.jsx(gc,{back:n});if(k&&!p)return l.jsxs(ge,{variant:"destructive",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"This task could not be loaded"}),l.jsxs(pe,{children:[l.jsx("p",{children:"Check your connection and try again."}),l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>void ee(),children:"Retry"})]})]});if(!p)return l.jsx(jm,{});const{task:ie}=p,et=ie.archived_at!==null,lt=pc(p.permission,"write")&&!et,tt=pc(p.permission,"manage"),xt=fe.find(T=>T.id===ie.status_id),le=fe.find(T=>T.category==="completed"),Gt=v.priorities.find(T=>T.id===ie.priority_id),ya=p.contributors.map(T=>T.user_id),nn=ae!==null&&ae.user_id===m,ba=ae!==null&&!ae.lapsed,In=p.checklist.filter(T=>T.is_complete).length,Jl=async()=>{const[T,ce]=await Promise.all([i(ie.list_id,{limit:1}),o(v.id)]);return T.ok?ce.ok?{ok:!0,data:{task_id:ie.id,expected_revision:ie.revision,expected_order_revision:T.data.list.order_revision,expected_hierarchy_revision:ce.data}}:ce:T},an=(T,ce)=>se("update_task",{task_id:ie.id,expected_revision:ie.revision,changes:T},ce),os=T=>b(T.via==="sdlc_login"?{title:"Release this claim?",description:`You claimed it via ${cd(T.via,T.via_device)}. Its next renewal will be refused, and it will stop holding the task.`,action_label:"Release claim",destructive:!0}:{title:"Release your agent's claim?",description:"Your agent is still working on this task. Its next renewal will be refused, and it will stop holding the task.",action_label:"Release claim",destructive:!0}),X=async()=>{if(!le)return;if(ba&&(!nn||ae.via)){const ce=ae.via==="api_key"?`${nn?"Your":`${w(ae.user_id)}'s`} agent is still working on it.`:ae.via==="sdlc_login"?`${nn?"You are":`${w(ae.user_id)} is`} still working on it via ${cd(ae.via,ae.via_device)}.`:`${w(ae.user_id)} is still working on it.`;if(!await b({title:"Complete this task?",description:ce,action_label:"Mark complete"}))return}await an({status_id:le.id},"Task completed.")!==null&&ae&&nn&&ba&&await se("end_claim",{claim_id:ae.id,outcome:"completed"})},Ce=async(T,ce)=>{const Oe=await Jl();if(!Oe.ok){h.error(Oe.refusal.message);return}await se(T,Oe.data,ce)},Se=async()=>{await b({title:"Archive this task?",description:"It leaves the queue and becomes read-only. Its claim, holds and history stay, and a manager can restore it.",action_label:"Archive task",destructive:!0})&&await Ce("archive_task","Task archived.")},Gs=async()=>{await Ce("restore_task","Task restored.")},ja=async()=>{var dt;const T=ae,ce=await se("claim_task",{task_id:ie.id,lease_seconds:qg}),Oe=(dt=ce==null?void 0:ce.claim)==null?void 0:dt.id;Oe&&!(T&&T.id===Oe&&T.via)&&ve(Oe)},wa=async()=>{ae&&(ae.via&&!await os(ae)||(await se("end_claim",{claim_id:ae.id,outcome:"released"},"Claim released."),ve(null)))},Rt=async()=>{ae&&await se("end_claim",{claim_id:ae.id,outcome:"expired"},"Claim cleared.")},_a=async T=>{T.hold_type==="paused"&&m&&(T={...T,target_user_id:m});const ce=await ue("open_hold",{task_id:ie.id,hold_type:T.hold_type,reason:T.reason,...T.target_user_id?{target_user_id:T.target_user_id}:{},...T.target_task_id?{target_task_id:T.target_task_id}:{},...T.target_label?{target_label:T.target_label}:{}});return ce.ok?(B(!1),h.success("Hold added."),T.release_claim&&ae&&nn&&!ae.via&&(await se("end_claim",{claim_id:ae.id,outcome:"released"}),ve(null)),await he(),null):ce.refusal.message},Pn=T=>se("checklist",{task_id:ie.id,expected_revision:ie.revision,...T}),Na=async T=>{for(const ce of T.filter(Oe=>!ya.includes(Oe)))await se("set_contributor",{task_id:ie.id,expected_revision:ie.revision,user_id:ce,action:"add"});for(const ce of p.contributors.filter(Oe=>!T.includes(Oe.user_id)))await se("set_contributor",{task_id:ie.id,expected_revision:ie.revision,user_id:ce.user_id,action:"remove",expected_contributor_revision:ce.revision})},er=T=>{var Oe;if(T.target.kind==="user")return w(T.target.user_id,m);if(T.target.kind==="external")return T.target.label;if(T.target.hidden||!T.target.task_id)return"A task you cannot see";const ce=T.target.task_id;return l.jsx(f,{className:"text-primary hover:underline",href:d(`${n}/${ce}`),children:((Oe=$.find(dt=>dt.id===ce))==null?void 0:Oe.title)??"Another task"})},Vs=T=>T.target.kind==="user"&&T.target.user_id===m&&!T.released_at?l.jsx(I,{type:"button",variant:"outline",size:"sm",onClick:()=>void se("release_hold",{hold_id:T.id},"Hold released."),children:"Release"}):lt?l.jsx(I,{type:"button",variant:"outline",size:"sm",onClick:()=>void se("resolve_hold",{hold_id:T.id},"Hold resolved."),children:"Resolve"}):null;return l.jsxs(l.Fragment,{children:[l.jsx(ls,{title:ie.title,description:`Created ${Un(ie.created_at)} by ${w(ie.created_by,m)}`,actions:l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[lt&&l.jsxs(l.Fragment,{children:[l.jsxs(I,{type:"button",variant:"outline",onClick:()=>L(ie.title),children:[l.jsx(gb,{className:"mr-2 size-4","aria-hidden":"true"}),"Edit title"]}),le&&ie.status_id!==le.id&&l.jsxs(I,{type:"button",variant:"outline",onClick:()=>void X(),children:[l.jsx(Pl,{className:"mr-2 size-4","aria-hidden":"true"}),"Mark complete"]})]}),tt&&!et&&l.jsxs(I,{type:"button",variant:"outline",onClick:()=>void Se(),children:[l.jsx(cg,{className:"mr-2 size-4","aria-hidden":"true"}),"Archive"]})]}),children:C!==null?l.jsxs("form",{className:"flex flex-wrap items-center gap-2 pt-1",onSubmit:async T=>{T.preventDefault(),C.trim()&&await an({title:C.trim()})!==null&&L(null)},children:[l.jsx(Qe,{htmlFor:"task-title",className:"sr-only",children:"Title"}),l.jsx(_n,{id:"task-title",className:"max-w-xl",value:C,onChange:T=>L(T.target.value)}),l.jsx(I,{type:"submit",size:"sm",children:"Save"}),l.jsx(I,{type:"button",size:"sm",variant:"outline",onClick:()=>L(null),children:"Cancel"})]}):null}),S&&l.jsxs(ge,{variant:S.tone,className:"mt-4","data-testid":"task-notice",children:[S.tone==="warning"?l.jsx(xb,{className:"size-4","aria-hidden":"true"}):l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:S.title}),l.jsx(pe,{children:S.body})]}),et?l.jsxs(ge,{variant:"info",className:"mt-4",children:[l.jsx(cg,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"This task is archived"}),l.jsx(pe,{children:tt?l.jsxs(l.Fragment,{children:[l.jsx("p",{children:"It is out of the queue and cannot be claimed. Restore it to work on it again."}),l.jsxs(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>void Gs(),children:[l.jsx(BS,{className:"mr-2 size-4","aria-hidden":"true"}),"Restore"]})]}):l.jsx("p",{children:"It is out of the queue and cannot be claimed. A manager can restore it."})})]}):lt?null:l.jsxs(ge,{variant:"info",className:"mt-4",children:[l.jsx(Bh,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"You can view this task"}),l.jsx(pe,{children:"Ask an organization admin for write access to change it."})]}),lt?l.jsxs("div",{className:"mt-4 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"task-status",children:"Status"}),l.jsxs($n,{value:ie.status_id,onValueChange:T=>void an({status_id:T}),children:[l.jsx(yn,{id:"task-status",children:l.jsx(Ln,{})}),l.jsx(bn,{children:fe.map(T=>l.jsx(ct,{value:T.id,children:T.name},T.id))})]})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"task-priority",children:"Priority"}),l.jsxs($n,{value:ie.priority_id??Zs,onValueChange:T=>void an({priority_id:T===Zs?null:T}),children:[l.jsx(yn,{id:"task-priority",children:l.jsx(Ln,{})}),l.jsxs(bn,{children:[l.jsx(ct,{value:Zs,children:"Not set"}),v.priorities.map(T=>l.jsx(ct,{value:T.id,children:T.name},T.id))]})]})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"task-primary",children:"Primary"}),l.jsxs($n,{value:ie.primary_user_id??Zs,onValueChange:T=>void an({primary_user_id:T===Zs?null:T}),children:[l.jsx(yn,{id:"task-primary",children:l.jsx(Ln,{})}),l.jsxs(bn,{children:[l.jsx(ct,{value:Zs,children:"Not set"}),x.map(T=>l.jsx(ct,{value:T.user_id,children:T.label},T.user_id))]})]})]}),l.jsx(xM,{members:x,selected:ya,on_change:T=>void Na(T)})]}):l.jsxs("dl",{className:"mt-4 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[l.jsx(ro,{label:"Status",value:(xt==null?void 0:xt.name)??""}),l.jsx(ro,{label:"Priority",value:(Gt==null?void 0:Gt.name)??"Not set"}),l.jsx(ro,{label:"Primary",value:ie.primary_user_id?w(ie.primary_user_id,m):"Not set"}),l.jsx(ro,{label:"Contributors",value:ya.map(T=>w(T,m)).join(", ")||"None"})]}),!et&&l.jsx(vM,{claim:ae,mine:nn,holder:ae?w(ae.user_id):"",own:ae!==null&&ae.id===Y,can_write:lt,on_claim:()=>void ja(),on_release:()=>void wa(),on_clear:()=>void Rt()}),l.jsxs("section",{className:"mt-6","aria-labelledby":"task-description-title",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("h2",{id:"task-description-title",className:"text-lg font-semibold",children:"Description"}),lt&&P===null&&l.jsx(I,{type:"button",variant:"ghost",size:"sm",onClick:()=>D(ie.description??""),children:"Edit description"})]}),P!==null?l.jsxs("form",{className:"mt-2 grid gap-2",onSubmit:async T=>{T.preventDefault(),await an({description:P})!==null&&D(null)},children:[l.jsx(Qe,{htmlFor:"task-description",className:"sr-only",children:"Description"}),l.jsx(qs,{id:"task-description",rows:5,value:P,onChange:T=>D(T.target.value)}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(I,{type:"submit",size:"sm",children:"Save"}),l.jsx(I,{type:"button",size:"sm",variant:"outline",onClick:()=>D(null),children:"Cancel"})]})]}):l.jsx("p",{className:"mt-2 text-sm whitespace-pre-wrap",children:ie.description||l.jsx("span",{className:"text-muted-foreground",children:"No description."})})]}),l.jsxs("section",{className:"mt-6","aria-labelledby":"task-checklist-title",children:[l.jsxs("h2",{id:"task-checklist-title",className:"text-lg font-semibold",children:["Checklist",p.checklist.length>0?` · ${In} of ${p.checklist.length} done`:""]}),l.jsx("ul",{className:"mt-2 grid gap-1",children:p.checklist.map(T=>l.jsxs("li",{className:"flex items-center justify-between gap-2 py-1","data-testid":"task-checklist-item",children:[lt?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ql,{id:`check-${T.id}`,checked:T.is_complete,onCheckedChange:ce=>void Pn({action:"toggle",item_id:T.id,expected_item_revision:T.revision,is_complete:ce===!0})}),l.jsx(Qe,{htmlFor:`check-${T.id}`,className:"font-normal",children:T.label})]}):l.jsxs("span",{className:"text-sm",children:[T.is_complete?"Done: ":"To do: ",T.label]}),lt&&l.jsxs(su,{children:[l.jsx(lu,{asChild:!0,children:l.jsx(I,{type:"button",variant:"ghost",size:"icon","aria-label":`Item actions for ${T.label}`,children:l.jsx(Hh,{className:"size-4","aria-hidden":"true"})})}),l.jsx(Mi,{align:"end",children:l.jsx(As,{className:"text-destructive focus:text-destructive",onSelect:()=>void Pn({action:"archive",item_id:T.id,expected_item_revision:T.revision}),children:"Remove"})})]})]},T.id))}),p.checklist.length===0&&!lt&&l.jsx("p",{className:"text-muted-foreground text-sm",children:"No checklist items."}),lt&&l.jsxs("form",{className:"mt-2 grid gap-2",onSubmit:async T=>{T.preventDefault(),V.trim()&&await Pn({action:"add",label:V.trim()})!==null&&ne("")},children:[l.jsx(Qe,{htmlFor:"task-new-item",children:"Add an item"}),l.jsx(_n,{id:"task-new-item",placeholder:"Add an item and press Enter",value:V,onChange:T=>ne(T.target.value)})]})]}),l.jsxs("section",{className:"mt-6","aria-labelledby":"task-holds-title",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("h2",{id:"task-holds-title",className:"text-lg font-semibold",children:"Holds"}),lt&&l.jsxs(I,{type:"button",variant:"outline",size:"sm",onClick:()=>B(!0),children:[l.jsx(pb,{className:"mr-2 size-4","aria-hidden":"true"}),"Add hold"]})]}),l.jsx("div",{className:"mt-2 shrink-0 overflow-x-auto rounded-lg border",children:l.jsxs(kt,{containerAriaLabel:"Holds",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"Type"}),l.jsx(te,{children:"Reason"}),l.jsx(te,{children:"Waiting on"}),l.jsx(te,{className:"text-right",children:"Actions"})]})}),l.jsxs(Ct,{children:[p.holds.map(T=>{const ce=ni[T.hold_type];return l.jsxs(Ne,{"data-testid":"task-hold",children:[l.jsx(K,{children:l.jsx(Fe,{variant:ce.tone,children:ce.label})}),l.jsxs(K,{children:[l.jsx("div",{children:T.reason}),l.jsx("div",{className:"text-muted-foreground text-xs",children:T.released_at?`Released by ${w(T.released_by,m)} · ${Un(T.released_at)} · Ready to resolve`:`Opened by ${w(T.opened_by,m)} · ${Un(T.opened_at)} · Open`})]}),l.jsx(K,{children:er(T)}),l.jsx(K,{className:"text-right",children:Vs(T)})]},T.id)}),p.holds.length===0&&l.jsx(Ne,{children:l.jsx(K,{colSpan:4,className:"text-muted-foreground h-16 text-center",children:"Nothing is holding this task."})})]})]})}),l.jsx("p",{className:"text-muted-foreground mt-2 text-xs",children:"A hold does not change the task's status. The person it waits on releases it; whoever can edit the task resolves it."})]}),l.jsxs("section",{className:"mt-6 pb-8","aria-labelledby":"task-activity-title",children:[l.jsx("h2",{id:"task-activity-title",className:"text-lg font-semibold",children:"Activity"}),l.jsxs("ul",{className:"mt-2 divide-y rounded-lg border",children:[A.slice(0,q).map(T=>l.jsxs("li",{className:"grid grid-cols-[1fr_auto] gap-x-4 px-3 py-2 text-sm sm:grid-cols-[2fr_1fr_10rem]","data-testid":"task-activity",children:[l.jsx("span",{children:eM(T)}),l.jsxs("span",{className:"min-w-0 text-right sm:text-left",children:[l.jsx("span",{children:T.actor_id?w(T.actor_id,m):"The system"}),T.via?l.jsxs("span",{className:"text-muted-foreground block max-w-64 truncate text-xs sm:max-w-none",title:`via ${cd(T.via,T.via_device)}`,children:["via ",vm(T.via),l.jsx(Ww,{via:T.via,device:T.via_device})]}):null]}),l.jsx("span",{className:"text-muted-foreground col-span-2 sm:col-span-1 sm:text-right",children:WA(T.created_at)})]},T.id)),A.length===0&&l.jsx("li",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No activity yet."})]}),A.length>q&&l.jsx(I,{type:"button",variant:"ghost",size:"sm",className:"mt-2",onClick:()=>O(T=>T+Gg),children:"Load more"})]}),lt&&oe&&l.jsx(hM,{open:E,members:x,tasks:$,holds_my_web_claim:nn&&ba&&!(ae!=null&&ae.via),on_close:()=>B(!1),on_submit:_a}),g]})}function ro({label:e,value:t}){return l.jsxs("div",{className:"grid gap-1",children:[l.jsx("dt",{className:"text-muted-foreground text-xs",children:e}),l.jsx("dd",{className:"text-sm",children:t})]})}function xM({members:e,selected:t,on_change:n}){return l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:"task-contributors",children:"Contributors"}),l.jsxs(su,{children:[l.jsx(lu,{asChild:!0,children:l.jsxs(I,{id:"task-contributors",type:"button",variant:"outline",className:"justify-between font-normal",children:[t.length===0?l.jsx("span",{className:"text-muted-foreground",children:"Add a contributor"}):l.jsx("span",{className:"truncate",children:e.filter(a=>t.includes(a.user_id)).map(a=>a.label).join(", ")}),l.jsx(ub,{className:"text-muted-foreground size-4","aria-hidden":"true"})]})}),l.jsx(Mi,{align:"start",children:e.map(a=>{const s=t.includes(a.user_id);return l.jsxs(As,{onSelect:()=>n(s?t.filter(r=>r!==a.user_id):[...t,a.user_id]),children:[s?l.jsx(Pl,{className:"mr-2 size-4","aria-hidden":"true"}):l.jsx("span",{className:"mr-2 size-4"}),a.label]},a.user_id)})})]})]})}function Ww({via:e,device:t}){return e!=="sdlc_login"||!t?null:l.jsxs(l.Fragment,{children:[" on ",l.jsx("bdi",{children:t})]})}function vM({claim:e,mine:t,holder:n,own:a,can_write:s,on_claim:r,on_release:i,on_clear:o}){let c=l.jsx(qh,{className:"size-4","aria-hidden":"true"}),d="Nobody is working on this",f=s?"Claim it to show others you are.":"",h=s?l.jsx(I,{type:"button",size:"sm",onClick:r,children:"Claim"}):null;if(e&&e.lapsed){const m=new Date(e.lease_expires_at)<=new Date;c=l.jsx(dk,{className:"size-4","aria-hidden":"true"}),d=m?`${t?"Your":`${n}'s`} claim lapsed at ${pa(e.lease_expires_at)}`:`${t?"Your":`${n}'s`} claim lapsed`,f=m?"Its time ran out.":`${n} can no longer edit this task.`,s&&(f+=" Take it over to work on it yourself, or clear it so anyone can claim it."),h=s?l.jsxs(l.Fragment,{children:[l.jsx(I,{type:"button",size:"sm",variant:"outline",onClick:o,children:"Clear claim"}),l.jsx(I,{type:"button",size:"sm",onClick:r,children:"Take over"})]}):null}else if(e){const m=pa(e.lease_expires_at);c=e.via==="api_key"?l.jsx(Uh,{className:"size-4","aria-hidden":"true"}):e.via==="sdlc_login"?l.jsx(Sk,{className:"size-4","aria-hidden":"true"}):l.jsx(Xk,{className:"size-4","aria-hidden":"true"});const x=l.jsxs(l.Fragment,{children:["Claimed via sdlc login",l.jsx(Ww,{via:e.via,device:e.via_device}),"."]});t&&e.via==="api_key"?(d=`Your agent is working on this until ${m}`,f="Claimed through one of your API keys. This page does not renew it. Releasing it, or Mark complete, ends the agent's claim after asking."):t&&e.via==="sdlc_login"?(d=`You are working on this until ${m}`,f=l.jsxs(l.Fragment,{children:[x," This page does not renew it. Releasing it, or Mark complete, ends that claim after asking."]})):e.via==="sdlc_login"?(d=`${n} is working on this until ${m}`,f=x):t?(d=`You are working on this until ${m}`,f=a?"Claimed on the web, and renewed while this page is open. Marking the task complete ends your claim.":"Claimed on the web. Marking the task complete ends your claim."):e.via==="api_key"?(d=`${n}'s agent is working on this until ${m}`,f="Claimed through an API key."):(d=`${n} is working on this until ${m}`,f=s?"Claimed on the web. You can take it over if the claim lapses.":"Claimed on the web."),h=t?l.jsx(I,{type:"button",size:"sm",variant:"outline",onClick:i,children:"Release claim"}):null}return l.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3 rounded-lg border p-3","data-testid":"task-claim",children:[c,l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("div",{className:"text-sm font-medium",children:d}),f?l.jsx("div",{className:"text-muted-foreground text-xs break-words",children:f}):null]}),h?l.jsx("div",{className:"flex items-center gap-2",children:h}):null]})}const yM=10,Jw=5,bM=/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/,jM="The sdlc engine here is too old for this page",wM="Update the main checkout, then restart sdlc viewer.",e_="Not available",_M={added:"Added",changed:"Changed",removed:"Removed"},NM={thread:"Thread",task:"Task",issue:"Issue",release:"Release",test:"Test"};function SM(e,t){const n=t!=null&&t.startsWith("task:")?t.slice(5):null;return n&&bM.test(n)?{label:n,path:`/org/${e}/tasks/${n}`}:{label:"Tasks",path:`/org/${e}/tasks`}}const kM=e=>e.status===0||e.reason==="store_locked"||e.reason==="engine_failed"||e.status>=500;function CM({org:e,task_id:t,from:n}){var os;const a=Oi(),{href:s,Link:r}=jt(),{confirm:i,confirm_dialog:o}=ji(),c=SM(e,n),[d,f]=u.useState({state:"loading"}),[h,m]=u.useState([]),[x,w]=u.useState([]),[v,b]=u.useState(null),[g,p]=u.useState(null),[y,j]=u.useState({state:"loading"}),[_,k]=u.useState({state:"loading"}),[N,S]=u.useState(null),[R,A]=u.useState(null),[z,q]=u.useState(!1),O=u.useRef(null),$=u.useRef(null),G=u.useRef(null),E=u.useRef(null),B=u.useRef(null),C=u.useRef(!1),L=u.useRef(0),P=u.useRef(0),D=u.useCallback(async()=>{if(!a.taskSections)return;j({state:"loading"});const X=await a.taskSections(t);j(X.ok?{state:"ok",data:X.data}:{state:"failed",refusal:X.refusal})},[a.taskSections,t]),V=u.useCallback(async()=>{if(!a.taskRelated)return;k({state:"loading"});const X=await a.taskRelated(t);k(X.ok?{state:"ok",data:X.data}:{state:"failed",refusal:X.refusal})},[a.taskRelated,t]),ne=u.useCallback(async()=>{var ja,wa;const X=P.current+=1;p(null),D(),V();const[Ce,Se]=await Promise.all([a.availability(),a.task?a.task(t):Promise.resolve(null)]);if(X!==P.current)return;Ce.state==="active"&&m(((ja=Ce.workspace.workflows.find(Rt=>Rt.id===Ce.list.workflow_id))==null?void 0:ja.statuses)??[]);const Gs=Ce.state==="off"&&((wa=Ce.refusal)==null?void 0:wa.reason)==="engine_missing"?Ce.refusal:null;if(!Se||!Se.ok&&Se.refusal.reason==="engine_missing"||Gs){f({state:"engine_missing",refusal:Gs??(Se&&!Se.ok?Se.refusal:{status:0,message:""})});return}if(Se.ok){L.current=0,b(null),A(null),f({state:"ok",detail:Se.data,at:new Date().toISOString()});return}if(Se.refusal.status===404||Se.refusal.reason==="not_found"){f({state:"missing"});return}if(L.current+=1,L.current===1&&kM(Se.refusal)){p(Se.refusal.retry_after??yM);return}b(Se.refusal),f(Rt=>Rt.state==="loading"?{state:"loading"}:Rt)},[a,t,D,V]);u.useEffect(()=>{ne()},[ne]),u.useEffect(()=>{if(g===null)return;const X=setTimeout(()=>void ne(),g*1e3);return()=>clearTimeout(X)},[g,ne]),u.useEffect(()=>{let X=!0;return a.members().then(Ce=>{X&&Ce.ok&&w(Ce.data)}),()=>{X=!1}},[a.members]),u.useEffect(()=>{var Ce;if(C.current||d.state!=="ok")return;C.current=!0;const X=(Ce=O.current)==null?void 0:Ce.querySelector("h1");X&&(X.tabIndex=-1,X.focus())},[d.state]),u.useEffect(()=>{var X;N&&((X=G.current)==null||X.focus())},[N]),u.useEffect(()=>{if(R===null)return;const X=setTimeout(()=>{var Ce;return(Ce=$.current)==null?void 0:Ce.focus()},0);return()=>clearTimeout(X)},[R]);const Y=u.useMemo(()=>new Map(x.map(X=>[X.user_id,X.label])),[x]),ve=X=>X?Y.get(X)??X:"",ee=()=>{S(null),ne()},H=u.useRef(null),W=X=>(H.current=X,X==="graph"?D():V());if(u.useEffect(()=>{var Se;const X=H.current;if(X===null||(X==="graph"?y:_).state==="loading")return;H.current=null;const Ce=(X==="graph"?E:B).current??((Se=O.current)==null?void 0:Se.querySelector("h1"));Ce==null||Ce.focus()},[y,_]),d.state==="missing")return l.jsx(io,{children:l.jsx(gc,{back:`/org/${e}/tasks`,description:`No task ${t} in this checkout. It may have finished and been archived, or never been recorded.`})});const oe=l.jsx(I,{asChild:!0,variant:"link",size:"sm",className:"px-0",children:l.jsxs(r,{href:s(c.path),children:[l.jsx(IS,{className:"size-4","aria-hidden":"true"}),c.label]})});if(d.state==="engine_missing")return l.jsx(io,{children:l.jsxs("div",{ref:O,className:"contents",children:[l.jsx(Vg,{back:oe,id:null,title:t}),l.jsxs(ge,{variant:"info",className:"mt-4",children:[l.jsx(fa,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Tasks need the sdlc engine"}),l.jsx(pe,{children:d.refusal.message})]})]})});const fe=v?l.jsxs(ge,{variant:"destructive",className:"mt-4",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Could not read this task"}),l.jsxs(pe,{children:[l.jsxs("p",{children:[v.message,v.since?` Since ${Lr(v.since)}.`:"",d.state==="ok"?` This page was read at ${Lr(d.at)}.`:""," See the sdlc viewer terminal for more."]}),l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:ee,children:"Retry"})]})]}):null,he=g!==null?l.jsxs("p",{className:"text-muted-foreground mt-2 flex items-center gap-2 text-sm",children:[l.jsx(d0,{"aria-hidden":"true"}),"Could not read this task. Trying again in ",g," seconds."]}):null,ue=l.jsx("div",{role:"status","aria-live":"polite",children:he});if(d.state==="loading")return l.jsxs(io,{children:[ue,fe,!v&&g===null?l.jsx(jm,{}):null]});const{detail:se,at:ae}=d,{task:Xe}=se,ie=h.find(X=>X.id===Xe.status_id),et=se.local_done&&"task"in se.local_done?se.local_done:null,lt=se.local_waits??[],tt=et?lt[0]??null:null,xt=tt?ve(tt.opened_by):se.owner_title??ve(se.thread),le=y.state==="ok"?y.data:null,Gt=(le==null?void 0:le.lifecycle)==="finished",ya=Gt&&(le==null?void 0:le.outcome)==="cancelled",nn=Gt&&(le==null?void 0:le.outcome)==="complete",ba=!!Xe.created_at,In=se.acceptance??[],Jl=async()=>{var Se;if(!et||!((Se=a.commands)!=null&&Se.complete)||!await i({title:`Mark ${Xe.title} done?`,description:tt?`This answers ${xt}'s ask, “${tt.reason}”, closes that wait, and tells ${xt} to check and continue.`:`This tells ${xt||"its thread"} to check and continue.`,action_label:"Mark done"}))return;q(!0);const Ce=await a.commands.complete(et);if(q(!1),!Ce.ok){A(Ce.refusal.message);return}await ne(),S({title:Xe.title,asker:xt||"Its thread"})},an=l.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[et&&!N?l.jsxs(l.Fragment,{children:[l.jsxs(I,{ref:$,type:"button",variant:"outline",disabled:z,"aria-disabled":R!==null?!0:void 0,"aria-describedby":R!==null?"task-done-why":void 0,onClick:()=>{R===null&&Jl()},children:[l.jsx(Pl,{className:"mr-2 size-4","aria-hidden":"true"}),"Done"]}),R!==null?l.jsx("span",{id:"task-done-why",className:"text-muted-foreground text-xs",children:"Read again first"}):null]}):null,l.jsxs("span",{className:"text-muted-foreground text-sm",children:["Read at ",Lr(ae)]}),l.jsxs(I,{type:"button",variant:"ghost",size:"sm",onClick:ee,children:[l.jsx(xb,{className:"mr-2 size-4","aria-hidden":"true"}),"Read again"]})]});return l.jsxs(io,{children:[l.jsxs("div",{ref:O,className:"contents",children:[l.jsx(Vg,{back:oe,id:Xe.id,badge:ie?l.jsx(Fe,{variant:Xw(ie),children:ie.name}):null,title:Xe.title,created:ba?`Created ${Un(Xe.created_at)}${xt||se.owner_title?` by ${se.owner_title??xt}`:""}`:null,actions:an}),ue,fe,N?l.jsx("div",{ref:G,tabIndex:-1,role:"status","aria-live":"polite",className:"outline-none",children:l.jsxs(ge,{variant:"success",className:"mt-4",children:[l.jsx(db,{className:"size-4","aria-hidden":"true"}),l.jsxs(je,{children:["Marked ",N.title," done"]}),l.jsxs(pe,{children:[N.asker," is told to check and continue."]})]})}):null,R!==null?l.jsxs(ge,{variant:"destructive",className:"mt-4",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Done was not recorded"}),l.jsxs(pe,{children:[R," Read again to see the task as it is now."]})]}):null,tt&&!N?l.jsxs(ge,{variant:"warning",className:"mt-4",children:[l.jsx(ug,{className:"size-4","aria-hidden":"true"}),l.jsxs(je,{children:[xt," asks: ",tt.reason]}),l.jsxs(pe,{children:["Waiting on you since ",ym(tt.opened_at),". Done answers it and tells ",xt," to check and continue."]})]}):null,se.view_outdated?l.jsxs(ge,{variant:"warning",className:"mt-4",children:[l.jsx(ug,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:jM}),l.jsxs(pe,{children:[wM," Until then this page cannot read the claim and holds."]})]}):null,l.jsxs("dl",{className:"mt-4 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[l.jsx(ps,{label:"Owner thread",value:se.owner_title??(ve(se.thread)||"None")}),l.jsx(ps,{label:"Release",value:se.release??"None"}),l.jsx(ps,{label:"Session",value:y.state==="loading"?"Loading…":y.state==="failed"?"Not available":le!=null&&le.session?l.jsxs(l.Fragment,{children:[le.session.provider," ",l.jsx("span",{className:"font-mono break-all",children:le.session.id})]}):"None"}),l.jsx(ps,{label:"Now",value:se.local_detail??(ie==null?void 0:ie.name)??""})]}),l.jsx("p",{className:"text-muted-foreground mt-2 text-xs",children:"Local tasks have no priority or contributors."}),l.jsx(TM,{detail:se,holder:ve((os=se.claim)==null?void 0:os.user_id),finished_at:Gt?(le==null?void 0:le.finished_at)??null:null,read_at:ae}),l.jsxs(ge,{variant:"info",className:"mt-4",children:[l.jsx(Bh,{className:"text-info size-4","aria-hidden":"true"}),et?l.jsxs(l.Fragment,{children:[l.jsx(je,{children:"Done is the one change this page makes"}),l.jsx(pe,{children:"Everything else about this task changes through its thread."})]}):l.jsxs(l.Fragment,{children:[l.jsx(je,{children:"This page only reads tasks"}),l.jsx(pe,{children:"A task changes through the agent thread working on it."})]})]}),ba?le!=null&&le.record?l.jsxs("p",{className:"mt-4 text-sm",children:["Record ",l.jsx("span",{className:"font-mono break-all",children:le.record})]}):null:l.jsx("p",{className:"mt-4 text-sm",children:"No task record yet. This page shows what the threads and plans in this checkout say about it."}),et?l.jsx(en,{id:"task-done-needs",title:"What Done needs",children:In.length>0?l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"text-muted-foreground text-xs",children:["The task's acceptance; ",xt||"its thread"," checks these after Done."]}),l.jsx("ul",{className:"mt-2 grid list-disc gap-1 pl-5 text-sm",children:In.map(X=>l.jsx("li",{children:X},X))})]}):l.jsxs("p",{className:"text-sm",children:["Its thread gave no acceptance. Ask ",xt||"its thread"," what Done needs before marking it."]})}):In.length>0?l.jsxs(en,{id:"task-acceptance",title:"Acceptance",children:[l.jsx("p",{className:"text-muted-foreground text-xs",children:nn?"All met: the task finished complete":ya&&(le!=null&&le.finished_at)?`Cancelled ${Un(le.finished_at)}`:"Met when the task finishes complete"}),l.jsx("ul",{className:"mt-2 grid list-disc gap-1 pl-5 text-sm",children:In.map(X=>l.jsx("li",{children:nn?`Met: ${X}`:X},X))})]}):null,l.jsx(EM,{detail:se,waits:lt,given:et!==null,threadName:ve,threadsLink:l.jsx(r,{className:"text-primary hover:underline",href:s(`/org/${e}/threads`),children:"Threads"})}),y.state==="loading"?l.jsxs("div",{className:"mt-6 grid gap-2",role:"status","aria-label":"Loading the task's sections",children:[l.jsx(Jt,{className:"h-8 w-full"}),l.jsx(Jt,{className:"h-8 w-full"}),l.jsx(Jt,{className:"h-8 w-2/3"})]}):null,le?l.jsx(en,{id:"task-stands",title:"Where it stands",children:l.jsxs("p",{className:"text-sm",children:[(ie==null?void 0:ie.name)??Xe.status_id,se.local_detail?` · ${se.local_detail}`:""]})}):null,le!=null&&le.time?l.jsx(RM,{time:le.time}):null,l.jsx(AM,{sections:y,heading_ref:E,on_retry:()=>void W("graph"),taskLink:X=>l.jsx(r,{className:"text-primary hover:underline",href:s(`/org/${e}/tasks/${X}?from=task:${Xe.id}`),children:X})}),le!=null&&le.files?l.jsx(MM,{files:le.files,finished:Gt}):null,le!=null&&le.proof?l.jsx(OM,{proof:le.proof,finished_at:le.finished_at,who:se.owner_title??null}):null,le&&le.history.length>0?l.jsx(DM,{history:le.history}):null,l.jsx(zM,{related:_,heading_ref:B,on_retry:()=>void W("related"),link:X=>{if(X.kind==="thread")return X.label;const Ce=X.kind==="task"?`/org/${e}/tasks/${X.id}?from=task:${Xe.id}`:X.kind==="issue"?`/classic/#issue=${encodeURIComponent(X.id)}`:X.kind==="release"?`/classic/#${X.planned?"planned":"release"}=${encodeURIComponent(X.id)}`:null;return Ce?l.jsx(r,{className:"text-primary hover:underline",href:s(Ce),children:X.label}):X.label}})]}),o]})}function io({children:e}){return l.jsx("div",{className:"flex h-full min-h-0 flex-1 flex-col overflow-auto px-4 py-4 pb-8 sm:px-6 lg:px-8",children:e})}function Vg({back:e,id:t,badge:n,title:a,created:s,actions:r}){return l.jsxs("div",{className:"grid gap-1",children:[l.jsx("div",{children:e}),t?l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[l.jsx("span",{className:"font-mono",children:t}),n]}):null,l.jsx(ls,{title:a,description:s??void 0,actions:r})]})}function ps({label:e,value:t}){return l.jsxs("div",{className:"grid gap-1",children:[l.jsx("dt",{className:"text-muted-foreground text-xs",children:e}),l.jsx("dd",{className:"text-sm break-words",children:t})]})}function en({id:e,title:t,aside:n,heading_ref:a,children:s}){return l.jsxs("section",{className:"mt-6","aria-labelledby":`${e}-title`,children:[l.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[l.jsx("h2",{id:`${e}-title`,ref:a,tabIndex:a?-1:void 0,className:"text-lg font-semibold outline-none",children:t}),n?l.jsx("span",{className:"text-muted-foreground text-sm",children:n}):null]}),l.jsx("div",{className:"mt-2",children:s})]})}function TM({detail:e,holder:t,finished_at:n,read_at:a}){const s=e.claim,[,r]=u.useReducer(f=>f+1,0),i=s&&!e.view_outdated?new Date(s.lease_expires_at).getTime():null;u.useEffect(()=>{if(i===null||!Number.isFinite(i))return;const f=i-Date.now();if(f<=0)return;const h=setTimeout(r,Math.min(f+50,2147483647));return()=>clearTimeout(h)},[i]);let o=l.jsx(qh,{className:"size-4","aria-hidden":"true"}),c="Nobody is working on this",d=null;if(e.view_outdated)c=`Claimed by: ${e_}`;else if(s){const f=new Date(s.lease_expires_at)<=new Date(Math.max(Date.now(),new Date(a).getTime()));o=l.jsx(Uh,{className:"size-4","aria-hidden":"true"}),c=`${t} is working on this until ${Lr(s.lease_expires_at)}${f||s.lapsed?" · passed":""}`,d="Claimed in the coordination registry; its thread renews the claim."}else n&&(o=l.jsx(db,{className:"size-4","aria-hidden":"true"}),d=`Finished ${Un(n)}. Its claim ended when it finished.`);return l.jsxs(Et,{className:"mt-4 flex flex-wrap items-center gap-3 p-3","data-testid":"task-claim",children:[o,l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("div",{className:"text-sm font-medium",children:c}),d?l.jsx("div",{className:"text-muted-foreground text-xs break-words",children:d}):null]})]})}function EM({detail:e,waits:t,given:n,threadName:a,threadsLink:s}){if(e.view_outdated)return l.jsx(en,{id:"task-holds",title:"Holds",children:l.jsx("p",{className:"text-sm",children:e_})});if(e.holds.length===0)return null;const r=new Map(t.map(i=>[i.id,i]));return l.jsxs(en,{id:"task-holds",title:`Holds · ${e.holds.length} open`,children:[l.jsx("p",{className:"text-muted-foreground text-xs",children:"A hold does not change the task's status."}),l.jsx(Et,{className:"mt-2 overflow-x-auto",children:l.jsxs(kt,{containerAriaLabel:"Holds",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"Type"}),l.jsx(te,{children:"Reason"}),l.jsx(te,{children:"Waiting on"}),l.jsx(te,{children:"Opened"})]})}),l.jsx(Ct,{children:e.holds.map(i=>{var f;const o=r.get(i.id),c=ni[i.hold_type],d=n?"Done above answers it":o!=null&&o.local_done?"In Waiting on you":(f=o==null?void 0:o.local_threads)!=null&&f.length?l.jsxs(l.Fragment,{children:["Answer it in ",s,": ",o.local_threads.join(" · ")]}):null;return l.jsxs(Ne,{"data-testid":"task-hold",children:[l.jsx(K,{children:l.jsx(Fe,{variant:c.tone,children:(o==null?void 0:o.local_label)??c.label})}),l.jsxs(K,{children:[l.jsx("div",{children:i.reason}),l.jsxs("div",{className:"text-muted-foreground text-xs",children:["Opened by ",a(i.opened_by)]})]}),l.jsxs(K,{children:[l.jsx("div",{children:i.target.kind==="user"?"You":i.target.kind==="external"?i.target.label:"Another task"}),d?l.jsx("div",{className:"text-muted-foreground text-xs",children:d}):null]}),l.jsx(K,{children:ym(i.opened_at)})]},i.id)})})]})})]})}function RM({time:e}){return l.jsx(en,{id:"task-time",title:"Time",children:l.jsxs("dl",{className:"grid gap-4 sm:grid-cols-3",children:[l.jsx(ps,{label:"Estimate",value:e.estimate?`${ur(e.estimate.low)}–${ur(e.estimate.high)}`:e.unknown_reason??"None"}),l.jsx(ps,{label:"Time taken",value:e.elapsed!==null?`${ur(e.elapsed)}${e.over_estimate?" · over estimate":""}`:"Not started"}),e.forecast?l.jsx(ps,{label:"Reforecast",value:l.jsxs("span",{className:"text-muted-foreground",children:[ur(e.forecast.low),"–",ur(e.forecast.high)," left",e.forecast.reason?` · ${e.forecast.reason}`:""]})}):null]})})}function t_({what:e,again:t,refusal:n,on_retry:a}){return l.jsxs(ge,{variant:"destructive",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsxs(je,{children:["Could not read ",e]}),l.jsxs(pe,{children:[l.jsx("p",{children:n.message}),l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:a,children:t})]})]})}function AM({sections:e,heading_ref:t,on_retry:n,taskLink:a}){const[s,r]=u.useState(!1);if(e.state==="loading")return null;const i=e.state==="failed"?e.refusal:e.data.graph.ok?null:e.data.graph.refusal;if(i)return l.jsx(en,{id:"task-graph",title:"Graph changes",heading_ref:t,children:l.jsx(t_,{what:"graph changes",again:"Read graph changes again",refusal:i,on_retry:n})});const o=e.state==="ok"&&e.data.graph.ok?e.data.graph.data:null;if(!o)return null;if(o.exempt)return l.jsx(en,{id:"task-graph",title:"Graph changes",heading_ref:t,children:l.jsxs("p",{className:"text-sm",children:["This task changes no modeled design. Its plan says why: ",o.exempt,"."]})});if(o.changes.length===0)return null;const c=s?o.changes:o.changes.slice(0,Jw),d=o.changes.length-c.length;return l.jsxs(en,{id:"task-graph",title:"Graph changes",aside:o.document,heading_ref:t,children:[l.jsx(Et,{className:"overflow-x-auto",children:l.jsxs(kt,{containerAriaLabel:"Graph changes",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"Change"}),l.jsx(te,{children:"Kind of change"}),l.jsx(te,{children:"Also in"}),l.jsx(te,{children:"In the plan"})]})}),l.jsx(Ct,{children:c.map(f=>l.jsxs(Ne,{children:[l.jsxs(K,{children:[l.jsx("div",{children:f.label}),l.jsx("div",{className:"text-muted-foreground text-xs",children:f.type})]}),l.jsx(K,{children:_M[f.change]}),l.jsx(K,{children:f.also_in.length===0?"No other task":f.also_in.map((h,m)=>l.jsxs(u.Fragment,{children:[m>0?", ":null,a(h.id)]},h.id))}),l.jsx(K,{children:f.planned?"Yes":l.jsx(Fe,{variant:"warning",children:"No longer planned"})})]},`${f.id}:${f.planned}`))})]})}),d>0?l.jsxs("p",{className:"mt-2 flex flex-wrap items-center gap-2 text-sm",children:[d," more changes in this task's plan slice.",l.jsxs(I,{type:"button",variant:"ghost",size:"sm",onClick:()=>r(!0),children:["Show all ",o.changes.length]})]}):null]})}function MM({files:e,finished:t}){const[n,a]=u.useState(!1),s=n?e.paths:e.paths.slice(0,Jw);return l.jsxs(en,{id:"task-files",title:"Files",children:[s.length>0?l.jsx("ul",{className:"grid gap-1 text-sm",children:s.map(r=>l.jsx("li",{children:l.jsx("span",{className:"font-mono break-all",children:r})},r))}):null,e.paths.length>s.length?l.jsxs(I,{type:"button",variant:"ghost",size:"sm",className:"mt-1",onClick:()=>a(!0),children:["Show all ",e.paths.length]}):null,e.landed?l.jsxs("p",{className:"mt-2 text-sm",children:["Landed ",l.jsx("span",{className:"font-mono",children:e.landed.sha.slice(0,10)})," · ",e.landed.files," files",t?"":" · becomes the proof when the task finishes"]}):null]})}function OM({proof:e,finished_at:t,who:n}){return l.jsxs(en,{id:"task-proof",title:"Evidence and proof",children:[e.evidence?l.jsx("p",{className:"text-sm whitespace-pre-wrap",children:e.evidence}):null,e.no_code?l.jsxs("p",{className:"mt-2 text-sm",children:["No code: ",e.no_code]}):e.commit?l.jsxs("p",{className:"mt-2 text-sm",children:["Proof ",l.jsx("span",{className:"font-mono",children:e.commit.slice(0,10)})," ·"," ",e.on_main?"on main":"not yet on main"]}):null,t?l.jsxs("p",{className:"text-muted-foreground mt-2 text-xs",children:["Finished ",Un(t),n?` by ${n}`:""]}):null]})}function DM({history:e}){return l.jsxs(en,{id:"task-history",title:"History",children:[l.jsx("p",{className:"text-muted-foreground text-xs",children:"From the task record, newest first"}),l.jsx(Et,{className:"mt-2 overflow-x-auto",children:l.jsxs(kt,{containerAriaLabel:"History",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"What"}),l.jsx(te,{children:"Who"}),l.jsx(te,{children:"When"})]})}),l.jsx(Ct,{children:e.map((t,n)=>l.jsxs(Ne,{children:[l.jsx(K,{children:t.what}),l.jsx(K,{children:t.who??"Its thread"}),l.jsx(K,{children:ym(t.at)})]},`${t.at}:${n}`))})]})})]})}function zM({related:e,heading_ref:t,on_retry:n,link:a}){return e.state==="ok"&&e.data.length===0?null:l.jsx(en,{id:"task-related",title:"Related",heading_ref:t,children:e.state==="loading"?l.jsxs("div",{className:"grid gap-2",role:"status","aria-label":"Loading related work",children:[l.jsx(Jt,{className:"h-8 w-full"}),l.jsx(Jt,{className:"h-8 w-full"}),l.jsx(Jt,{className:"h-8 w-2/3"})]}):e.state==="failed"?l.jsx(t_,{what:"related work",again:"Read related work again",refusal:e.refusal,on_retry:n}):l.jsx(Et,{className:"overflow-x-auto",children:l.jsxs(kt,{containerAriaLabel:"Related",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"Kind"}),l.jsx(te,{children:"Item"}),l.jsx(te,{children:"How it relates"})]})}),l.jsx(Ct,{children:e.data.map(s=>l.jsxs(Ne,{children:[l.jsx(K,{children:NM[s.kind]}),l.jsx(K,{children:a(s)}),l.jsx(K,{children:s.relation})]},`${s.kind}:${s.planned?"planned:":""}${s.id}`))})]})})})}function $M({org:e,task_id:t,from:n}){const a=Oi(),s=`/org/${e}/tasks`;return a.taskSections?l.jsx(CM,{org:e,task_id:t,from:n??null}):l.jsx(LM,{task_id:t,back:s})}function LM({task_id:e,back:t}){const{availability:n}=Oi(),[a,s]=u.useState({state:"loading"});return u.useEffect(()=>{let r=!0;return n().then(i=>{r&&s(i)}),()=>{r=!1}},[n]),a.state==="off"?l.jsx(gc,{back:t}):l.jsx("div",{className:"flex h-full min-h-0 flex-1 flex-col overflow-auto px-4 py-4 sm:px-6 lg:px-8",children:a.state==="active"?l.jsx(gM,{active:a,task_id:e,back:t}):a.state==="error"?l.jsxs(ge,{variant:"destructive",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"This task could not be loaded"}),l.jsx(pe,{children:"Check your connection and try again."})]}):a.state==="available"?l.jsx(gc,{back:t}):l.jsx(jm,{})})}function Af(e,t){u.useEffect(()=>{const n=setInterval(()=>{document.visibilityState==="visible"&&e()},t),a=()=>{document.visibilityState==="visible"&&e()};return document.addEventListener("visibilitychange",a),()=>{clearInterval(n),document.removeEventListener("visibilitychange",a)}},[e,t])}const n_={integration:"Integration",deploy:"Deploy",publish:"Publish",accept:"Accept",custom:"Custom"},UM={self_service:"Self-service",managed:"Managed",manager_only:"Manager only"},HM={self_service:"Self-service: each entry takes its own turn",managed:"Managed: a manager batches entries that allow it",manager_only:"Manager only: the manager runs every turn"},BM={in_batch:{label:"In the batch",tone:"info"},done:{label:"Done",tone:"success"},failed:{label:"Failed",tone:"error"},released:{label:"Released",tone:"neutral"},left:{label:"Left",tone:"neutral"},gone:{label:"Ended",tone:"neutral"},skipped:{label:"Skipped",tone:"neutral"},lapsed:{label:"Lapsed",tone:"warning"}};function qM(e){return BM[e??"in_batch"]}function GM(e){const t=e.turn==="next",n=t?"Next":"Waiting",a=e.batching==="managed"||e.batching==="released"?` · ${e.batching}`:"";return{label:`${n}${a}`,tone:t?"info":"neutral"}}const a_=(e,t)=>`Holds ${e.toLowerCase()}${t?`: ${t}`:""}`;function VM(e,t,n,a=!0){return e.fixing_since!==void 0?{label:`Fixing forward since ${xn(e.fixing_since)}`,tone:"warning"}:e.ref===t?{label:"Landing",tone:"info"}:a&&e.hold?{label:a_(n),tone:"info"}:{label:"Running",tone:"info"}}function xn(e){return new Date(e*1e3).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}function Fs(e){const t=Math.round(e/60);if(t<60)return`${t} min`;const n=Math.floor(t/60),a=t%60;return a?`${n} h ${a} min`:`${n} h`}function YM(e){var n;const t=e.binding;return(t==null?void 0:t.kind)==="repository_branch"?`${t.repository} · ${t.branch}`:(t==null?void 0:t.kind)==="label"?t.label:((n=e.layer)==null?void 0:n.kind)==="release"&&e.layer.promotes_to?`Promotes to ${e.layer.promotes_to}`:null}function IM(e,t){switch(e.kind){case"any_thread":return"Any thread in this checkout";case"task_writers":return"Anyone who can edit the entry's task";case"any_joiner":return"Anyone who may join";case"managers":return"Whoever may manage";case"admins":return"Workspace admins";case"none":return"Nobody";case"listed":{const n=e.users.map(t),a=e.teams.length;return a&&n.push(a===1?"1 team":`${a} teams`),n.length?n.join(", "):"Nobody"}}}function PM(e,t){var o,c;const{policy:n,management:a}=e,s=(o=e.layer)==null?void 0:o.kind,r=d=>IM(d,t),i=[["Mode",HM[a.mode]],["Who can join",r(a.joiners)]];return s==="implement"&&i.push(["Managers",r(a.managers)],["Manager lease",Fs(a.manager_lease_seconds)],["Batches",n.batch.enabled?`Up to ${n.batch.max_members} entries`:"Off"]),((c=e.layer)==null?void 0:c.kind)==="release"&&(e.layer.promotes_to&&i.push(["Promotes to",e.layer.promotes_to]),i.push(["Carries waiting entries",n.ride?"Yes: a done turn carries entries already contained in it":"No"],["Freeze",n.freeze.enabled?`Up to ${Fs(n.freeze.max_seconds)}, ${Fs(n.freeze.default_seconds)} by default`+(e.layer.freezers?` · ${r(e.layer.freezers)}`:""):"Off"],["Fix forward",n.fix_forward?"Yes: a failed turn keeps its turn until fixed":"No"],["Stalled turns",a.stall_takers.kind==="none"?"Nobody takes one":`${r(a.stall_takers)} may take one after ${Fs(n.stall_seconds)}`])),i.push(["Reorder",r(a.reorderers)]),n.max_turns>1&&i.push(["Turns at once",`Up to ${n.max_turns} independent turns`]),i.push(["Turn lease",Fs(n.lease_seconds)],["Time to start",`${Fs(n.start_grace_seconds)} after the turn comes`]),n.entry_limit!==null&&i.push(["Waiting entries",`Up to ${n.entry_limit}`]),n.footprint!=="off"&&i.push(["Footprint",n.footprint==="required"?"Required":"Optional"]),i}const s_="Where your organization's agents take turns at a shared branch, environment or proposal. One turn runs at a time in each queue.",l_="A task you cannot see",XM="A former member",KM="A member";function r_(){const e=Us().queues;if(!e)throw new Error("The Queues page rendered without the queues seam.");return e}function QM({org:e,open:t,path:n}){var h;const a=r_(),{href:s,Link:r}=jt(),i=a.availability,[o,c]=u.useState({state:"loading"}),d=u.useCallback(async m=>{i&&(m&&c({state:"loading"}),c(await i({fresh:m})))},[i]);u.useEffect(()=>{d(!1)},[d]);const f=!i||o.state==="active";return o.state==="off"&&((h=o.refusal)==null?void 0:h.reason)!=="engine_missing"?l.jsx(pm,{title:"Page not found",description:"This page does not exist, or you do not have access to it.",backHref:s(`/org/${e}`),backLabel:"Back to the organization",link:r}):l.jsx("div",{className:"flex h-full min-h-0 flex-1 flex-col overflow-auto px-4 py-4 sm:px-6 lg:px-8",children:f?l.jsx(FM,{org:e,open:t??null,path:n??`/org/${e}/tasks/queues`}):l.jsxs(l.Fragment,{children:[l.jsx(ls,{title:"Queues",description:a.description??s_}),o.state==="loading"&&l.jsx(i_,{}),(o.state==="error"||o.state==="off")&&l.jsx(Mf,{refusal:o.refusal,on_retry:()=>void d(!0)}),o.state==="available"&&l.jsxs(ge,{variant:"info",className:"mt-6",children:[l.jsx(fa,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Tasks are not on for this organization"}),l.jsxs(pe,{children:["Queues hold turns for tasks, so they show once Tasks are on."," ",l.jsx(r,{className:"text-primary hover:underline",href:s(`/org/${e}/tasks`),children:"Go to Tasks"})]})]})]})})}function i_(){return l.jsx("div",{className:"mt-6 grid gap-2",role:"status","aria-label":"Loading queues",children:Array.from({length:3},(e,t)=>l.jsx(Jt,{className:t===2?"h-10 w-2/3":"h-10 w-full"},t))})}function Mf({refusal:e,on_retry:t}){return(e==null?void 0:e.reason)==="store_locked"?l.jsxs(ge,{variant:"info",className:"mt-6",children:[l.jsx(fa,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"The local stores are busy"}),l.jsxs(pe,{children:[l.jsx("p",{children:e.message}),l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:t,children:"Retry"})]})]}):(e==null?void 0:e.reason)==="engine_missing"||(e==null?void 0:e.reason)==="view_outdated"?l.jsxs(ge,{variant:e.reason==="engine_missing"?"info":"destructive",className:"mt-6",children:[l.jsx(fa,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:e.reason==="engine_missing"?"Queues need the sdlc engine":"The sdlc engine here is too old for this page"}),l.jsx(pe,{children:e.message})]}):l.jsxs(ge,{variant:"destructive",className:"mt-6",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Queues could not be loaded"}),l.jsxs(pe,{children:[l.jsx("p",{children:"The read did not answer. Try again in a moment."}),l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:t,children:"Retry"})]})]})}const dd=e=>e.status===404||e.reason==="not_found"||e.code==="not_found";function ZM(e,t,n,a){return t?e===null?`Not reading · trying again every ${n}s`:`Not reading since ${xn(e)} · trying again every ${n}s`:e===null?"Connecting…":`Live · read ${xn(e)} · refreshes every ${n}s${a?` · ${a}`:""}`}function FM({org:e,open:t,path:n}){var ve;const{listQueues:a,queue:s,members:r,refresh_ms:i,settings_note:o,description:c,read_scope:d,subject_label:f="Task",thread_subjects:h=!1}=r_(),{self_id:m}=Hc(),[x,w]=u.useState(null),[v,b]=u.useState(null),[g,p]=u.useState(null),[y,j]=u.useState(null),[_,k]=u.useState({state:"pending",members:[]});u.useEffect(()=>{let ee=!0;return r().then(H=>{ee&&k(W=>H.ok?{state:"answered",members:H.data}:{state:"failed",members:W.members})}),()=>{ee=!1}},[r]);const N=u.useMemo(()=>new Map(_.members.map(ee=>[ee.user_id,ee])),[_.members]),S=_.state==="answered"?XM:KM,R=u.useCallback((ee,H)=>{var W;return(H==null?void 0:H.title)??(h?(H==null?void 0:H.id)??ee:ee===m?"You":((W=N.get(ee))==null?void 0:W.label)??S)},[N,S,m,h]),A=u.useRef({list:{last:null,fresh:!1},detail:{last:null,fresh:!1}}),[z,q]=u.useState(null),[O,$]=u.useState(!1),G=u.useCallback((ee,H)=>{A.current[ee]={last:H,fresh:!0};const{list:W,detail:oe}=A.current;$(W.last==="failed"||oe.last==="failed"),W.fresh&&oe.fresh&&W.last==="ok"&&oe.last==="ok"&&q(Date.now()/1e3)},[]),E=t??((ve=x==null?void 0:x.queues[0])==null?void 0:ve.id)??null,B=u.useRef(E);u.useEffect(()=>{B.current=E},[E]);const C=u.useRef(0),L=u.useCallback(async()=>{var W;const ee=C.current+=1;A.current.list.fresh=!1;const H=await a();if(ee===C.current)if(H.ok){if(w(H.data),b(null),!t){const oe=((W=H.data.queues[0])==null?void 0:W.id)??null;oe===null?A.current.detail={last:"ok",fresh:!0}:oe!==B.current&&(A.current.detail.fresh=!1)}G("list","ok")}else b(H.refusal),G("list","failed")},[a,t,G]),P=u.useRef(0),D=u.useCallback(async()=>{const ee=P.current+=1;if(!E)return;A.current.detail.fresh=!1;const H=await s(E);ee===P.current&&(H.ok?(p(H.data),j(null),G("detail","ok")):(j(H.refusal),dd(H.refusal)&&p(null),G("detail",dd(H.refusal)?"ok":"failed")))},[E,s,G]);u.useEffect(()=>{L()},[L]),u.useEffect(()=>{p(null),j(null),D()},[D]);const V=u.useCallback(()=>{L(),D()},[L,D]);Af(V,i);const ne=Math.round(i/1e3),Y=y!==null&&dd(y);return l.jsxs(l.Fragment,{children:[l.jsxs(ls,{title:"Queues",description:c??s_,children:[l.jsx("p",{className:"text-muted-foreground text-xs",children:ZM(z,O,ne,d)}),l.jsx("span",{className:"sr-only",role:"status",children:O?"Not reading":z===null?"Connecting":"Live"})]}),!x&&!v&&l.jsx(i_,{}),!x&&v&&l.jsx(Mf,{refusal:v,on_retry:V}),x&&x.queues.length===0?l.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[l.jsx(mb,{className:"text-muted-foreground size-8","aria-hidden":"true"}),l.jsx("h2",{className:"text-lg font-semibold",children:"No queues yet"}),l.jsx("p",{className:"text-muted-foreground text-sm",children:"Queues are created through the sdlc CLI, the MCP tools or the API. Once one exists, its turns and waiting work show here."})]}):x?l.jsxs(l.Fragment,{children:[l.jsx(JM,{path:n,queues:x.queues,open_id:E,name:R,held:h}),Y?l.jsxs(ge,{variant:"info",className:"mt-6",children:[l.jsx(fa,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"This queue is no longer available"}),l.jsx(pe,{children:"It was archived, or you can no longer read its Workspace. Pick another queue above."})]}):g&&g.queue.id===E?l.jsx(eO,{org:e,detail:g,name:R,settings_note:o,subject_label:f,thread_subjects:h}):y?l.jsx(Mf,{refusal:y,on_retry:()=>void D()}):l.jsx(Jt,{className:"mt-6 h-40 w-full shrink-0",role:"status","aria-label":"Loading the queue"})]}):null]})}function Of({org:e,subject:t,link:n}){const{href:a,Link:s}=jt();return!t||t.hidden?l.jsx("span",{className:"text-muted-foreground",children:l_}):t.kind==="task"&&n?l.jsx(s,{className:"text-primary hover:underline",href:a(`/org/${e}/tasks/${t.id}`),children:t.title??t.id}):l.jsx("span",{children:t.title??t.id})}function WM(e,t,n){const a=e.freeze?`frozen until ${xn(e.freeze.lease_until)}`:null;if(e.batch)return{primary:`Batch of ${e.batch.size} · ${t(e.batch.holder,e.batch.holder_subject)}`,secondary:[`Opened ${xn(e.batch.opened_at)}`,a].filter(Boolean).join(" · "),warn:!1};if(e.turn){const s=e.turn.subject,r=s.hidden?l_:s.title??s.id,i=(e.running_count??1)>1?`${e.running_count} turns · `:"",o=e.turn.landing?" landing":"",c=n&&!!e.turn.hold,d=[c?a_(e.name,e.turn.note):null,e.turn.fixing_since!==void 0?"Fixing forward":null,a].filter(Boolean);return c&&e.turn.fixing_since===void 0&&!a?{primary:`${i}${r}${o}`,secondary:fd(d.join(" · ")),warn:!1}:{primary:`${i}${r}${o}`,secondary:d.length?fd(d.join(" · ")):null,warn:d.length>0}}return{primary:"Nothing running",secondary:a?fd(a):null,warn:!!a}}const fd=e=>e.charAt(0).toUpperCase()+e.slice(1);function JM({path:e,queues:t,open_id:n,name:a,held:s}){const{href:r,Link:i}=jt();return l.jsx(Et,{className:"mt-4 shrink-0 overflow-x-auto",children:l.jsxs(kt,{containerAriaLabel:"Queues",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"Queue"}),l.jsx(te,{className:"hidden md:table-cell",children:"Step"}),l.jsx(te,{children:"Running turn"}),l.jsx(te,{className:"hidden text-right md:table-cell",children:"Waiting"})]})}),l.jsx(Ct,{children:t.map(o=>{var m;const c=o.id===n,d=YM(o),f=WM(o,a,s),h=o.waiting-(((m=o.batch)==null?void 0:m.remaining)??0);return l.jsxs(Ne,{"data-testid":"queues-row",className:F(c&&"bg-accent"),children:[l.jsxs(K,{children:[l.jsx(i,{className:"text-primary hover:underline",href:r(`${e}?queue=${encodeURIComponent(o.id)}`),"aria-current":c?"page":void 0,children:o.name}),d?l.jsx("div",{className:"text-muted-foreground text-xs",children:d}):null,l.jsxs("div",{className:"text-muted-foreground text-xs md:hidden",children:[h," waiting"]})]}),l.jsx(K,{className:"hidden md:table-cell",children:l.jsx(Fe,{variant:"neutral",children:n_[o.policy.step]})}),l.jsxs(K,{children:[l.jsx("div",{className:F(!o.batch&&!o.turn&&"text-muted-foreground"),children:f.primary}),f.secondary?l.jsx("div",{className:F("text-xs",f.warn?"text-warning":"text-muted-foreground"),children:f.secondary}):null]}),l.jsx(K,{className:"hidden text-right md:table-cell",children:h})]},o.id)})})]})})}function oo({id:e,title:t,side:n,children:a}){return l.jsxs("section",{"aria-labelledby":e,className:"flex flex-col gap-2",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("h3",{id:e,className:"text-sm font-semibold",children:t}),n?l.jsx("span",{className:"text-muted-foreground text-xs",children:n}):null]}),a]})}function Yg({org:e,entries:t,landing:n,queue_name:a,subject_label:s,held:r,label:i}){return l.jsx("div",{className:"overflow-x-auto rounded-lg border",children:l.jsxs(kt,{containerAriaLabel:i,children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:s}),l.jsx(te,{children:"State"})]})}),l.jsx(Ct,{children:t.map(o=>{const c=VM(o,n,a,r);return l.jsxs(Ne,{"data-testid":"queues-running",children:[l.jsxs(K,{children:[l.jsx(Of,{org:e,subject:o.subject,link:!r}),r&&o.hold&&o.note&&!o.subject.hidden?l.jsx("div",{className:"text-muted-foreground text-xs",children:o.note}):null]}),l.jsx(K,{children:l.jsx(Fe,{variant:c.tone,children:c.label})})]},o.ref)})})]})})}function eO({org:e,detail:t,name:n,settings_note:a,subject_label:s,thread_subjects:r}){var j;const{queue:i,state:o}=t,c=_=>n(_),d=new Map(o.entries.map(_=>[_.ref,_.subject])),f=o.entries.filter(_=>_.turn==="running"),h=o.entries.filter(_=>_.turn!=="running"&&_.batching!=="in_batch"),m=o.batch,x=Math.max(1,f.filter(_=>_.batching!=="in_batch").length),w=m&&i.policy.independent_turns?f.filter(_=>_.batching!=="in_batch"&&_.ref!==m.holder):[],v=o.manager,b=o.freeze,g=((j=i.layer)==null?void 0:j.kind)==="release"?i.layer.stall_hold:void 0,p=g?{who:n(g.by),why:g.reason,until:g.until}:v!=null&&v.hold?{who:n(v.holder,v.holder_subject),why:v.hold.why,until:v.hold.until}:null,y=!m&&f.length===0&&h.length===0;return l.jsxs(Et,{as:"section","aria-labelledby":"queue-title",className:"mt-6 flex shrink-0 flex-col gap-4 p-4","data-testid":"queues-detail",children:[l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("h2",{id:"queue-title",className:"text-lg font-semibold",children:i.name}),l.jsx(Fe,{variant:"neutral",children:n_[i.policy.step]}),l.jsx(Fe,{variant:"neutral",children:UM[i.management.mode]})]}),i.purpose?l.jsx("p",{className:"text-muted-foreground text-sm",children:i.purpose}):null]}),v?l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm","data-testid":"queues-manager",children:[l.jsx(Qk,{className:"text-muted-foreground size-4","aria-hidden":"true"}),l.jsx("span",{className:"text-muted-foreground",children:"Manager"}),l.jsx("span",{className:"font-medium",children:n(v.holder,v.holder_subject)}),l.jsxs("span",{className:"text-muted-foreground text-xs",children:["Lease until ",xn(v.lease_until),v.serving_until!==void 0?" · serving now":""]})]}):null,b?l.jsxs(ge,{variant:"warning",children:[l.jsx(Yk,{className:"size-4","aria-hidden":"true"}),l.jsxs(je,{children:["Frozen until ",xn(b.lease_until)]}),l.jsxs(pe,{children:[n(b.holder,b.holder_subject)," froze this queue at ",xn(b.since),b.label?`: ${b.label}`:"",". Only ",n(b.holder,b.holder_subject),"'s entries start until it thaws."]})]}):null,p?l.jsxs(ge,{variant:"info",children:[l.jsx(pb,{className:"size-4","aria-hidden":"true"}),l.jsxs(je,{children:["Stall hold until ",xn(p.until)]}),l.jsxs(pe,{children:[p.who,p.why?`: ${p.why}`:"",". The first entry is not treated as stalled while it lasts."]})]}):null,y?l.jsx("p",{className:"text-muted-foreground text-sm",children:"Nothing running, and nothing waits in this queue."}):l.jsxs(l.Fragment,{children:[m?l.jsxs(oo,{id:"queue-running",title:"Running turn",side:`Batch opened by ${n(m.holder,m.holder_subject)} at ${xn(m.opened_at)}`,children:[l.jsx("div",{className:"overflow-x-auto rounded-lg border",children:l.jsxs(kt,{containerAriaLabel:"Batch members",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"Landing order"}),l.jsx(te,{children:s}),l.jsx(te,{children:"Outcome"})]})}),l.jsx(Ct,{children:m.members.map((_,k)=>{const N=qM(_.outcome);return l.jsxs(Ne,{"data-testid":"queues-member",children:[l.jsx(K,{children:k+1}),l.jsx(K,{children:l.jsx(Of,{org:e,subject:_.subject??d.get(_.ref)??(r?{kind:"thread",id:_.ref}:void 0),link:!r})}),l.jsx(K,{children:l.jsx(Fe,{variant:N.tone,children:N.label})})]},_.ref)})})]})}),w.length>0?l.jsxs(l.Fragment,{children:[l.jsx("h4",{className:"text-muted-foreground text-xs font-medium",children:"Also running"}),l.jsx(Yg,{org:e,entries:w,landing:o.landing,queue_name:i.name,subject_label:s,held:r,label:"Turns running beside the batch"})]}):null]}):l.jsx(oo,{id:"queue-running",title:f.length>1?"Running turns":"Running turn",children:f.length===0?l.jsx("p",{className:"text-muted-foreground text-sm",children:"Nothing running."}):l.jsx(Yg,{org:e,entries:f,landing:o.landing,queue_name:i.name,subject_label:s,held:r,label:"Running turns"})}),l.jsx(oo,{id:"queue-waiting",title:"Waiting",children:h.length===0?l.jsx("p",{className:"text-muted-foreground text-sm",children:"Nothing waits."}):l.jsx("div",{className:"overflow-x-auto rounded-lg border",children:l.jsxs(kt,{containerAriaLabel:"Waiting entries",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"Position"}),l.jsx(te,{children:s}),l.jsx(te,{className:"hidden md:table-cell",children:"Joined"}),l.jsx(te,{children:"Turn"}),l.jsx(te,{className:"hidden md:table-cell",children:"Note"})]})}),l.jsx(Ct,{children:h.map((_,k)=>{const N=GM(_);return l.jsxs(Ne,{"data-testid":"queues-waiting",children:[l.jsx(K,{children:m?x+k+1:_.position}),l.jsx(K,{children:l.jsx(Of,{org:e,subject:_.subject,link:!r})}),l.jsx(K,{className:"hidden md:table-cell",children:xn(_.joined_at)}),l.jsx(K,{children:l.jsx(Fe,{variant:N.tone,children:N.label})}),l.jsx(K,{className:"hidden md:table-cell",children:_.subject.hidden?"":_.note??""})]},_.ref)})})]})})})]}),l.jsx(oo,{id:"queue-settings",title:"Settings",children:l.jsx("div",{className:"overflow-x-auto rounded-lg border",children:l.jsx(kt,{containerAriaLabel:"Queue settings",children:l.jsx(Ct,{children:PM(i,c).map(([_,k])=>l.jsxs(Ne,{children:[l.jsx(te,{scope:"row",className:"h-auto w-48 py-2 font-normal",children:_}),l.jsx(K,{children:k})]},_))})})})}),l.jsx("p",{className:"text-muted-foreground text-xs",children:a})]})}const sa="__no_parent__";function o_(e,t){const n=new Set([t]);for(let a=!0;a;){a=!1;for(const s of e)s.parent&&n.has(s.parent)&&!n.has(s.key)&&(n.add(s.key),a=!0)}return n}const Df=(e,t)=>(e.label||e.key).localeCompare(t.label||t.key);function la({id:e,label:t,help:n,error:a,children:s}){const r=[n?`${e}-help`:null,a?`${e}-error`:null].filter(Boolean).join(" ")||void 0;return l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Qe,{htmlFor:e,children:t}),s(r),n?l.jsx("p",{id:`${e}-help`,className:"text-muted-foreground text-xs",children:n}):null,a?l.jsx("p",{id:`${e}-error`,className:"text-destructive text-sm",children:a}):null]})}function Ig({id:e,label:t,help:n,checked:a,on_change:s}){return l.jsxs("div",{className:"grid gap-1",children:[l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(Ql,{id:e,className:"mt-0.5",checked:a,"aria-describedby":n?`${e}-help`:void 0,onCheckedChange:r=>s(r===!0)}),l.jsx(Qe,{htmlFor:e,className:"font-normal",children:t})]}),n?l.jsx("p",{id:`${e}-help`,className:"text-muted-foreground pl-6 text-xs",children:n}):null]})}function c_({id:e,legend:t,help:n,error:a,options:s,checked:r,on_change:i,empty:o}){const c=[n?`${e}-help`:null,a?`${e}-error`:null].filter(Boolean).join(" ")||void 0;return l.jsxs("fieldset",{className:"m-0 grid min-w-0 gap-2 border-0 p-0","aria-describedby":c,"aria-invalid":a?!0:void 0,children:[l.jsx("legend",{className:"mb-2 text-sm leading-none font-medium",children:t}),s.length===0&&o?l.jsx("p",{className:"text-muted-foreground text-sm",children:o}):null,l.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:s.map((d,f)=>l.jsxs("div",{className:"flex min-w-0 items-start gap-2",children:[l.jsx(Ql,{id:`${e}-${f}`,className:"mt-0.5",checked:r.has(d.value),onCheckedChange:h=>{const m=new Set(r);h===!0?m.add(d.value):m.delete(d.value),i(m)}}),l.jsx(Qe,{htmlFor:`${e}-${f}`,className:"min-w-0 font-normal break-words",children:d.label})]},d.value))}),n?l.jsx("p",{id:`${e}-help`,className:"text-muted-foreground text-xs",children:n}):null,a?l.jsx("p",{id:`${e}-error`,className:"text-destructive text-sm",children:a}):null]})}function wm({message:e}){return e?l.jsxs(ge,{variant:"destructive",role:"alert",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(pe,{children:e})]}):null}function u_({id:e,value:t,on_change:n,none:a,options:s,described_by:r}){return l.jsxs($n,{value:t,onValueChange:n,children:[l.jsx(yn,{id:e,"aria-describedby":r,children:l.jsx(Ln,{})}),l.jsxs(bn,{children:[l.jsx(ct,{value:sa,children:a}),s.map(i=>l.jsx(ct,{value:i.key,children:i.label||i.key},i.key))]})]})}function _m(e){const[t,n]=u.useState(!1),[a,s]=u.useState(null);return{saving:t,refusal:a,set_refusal:s,run:async i=>{n(!0),s(null);try{const o=await i();o?s(o):e()}finally{n(!1)}}}}const d_=e=>`Lowercase letters, digits, _ and -, starting with a letter. It names the ${e} in posts and in sdlc org, and cannot change later.`;function tO({open:e,chart:t,team:n,save:a,on_close:s}){const[r,i]=u.useState(""),[o,c]=u.useState(""),[d,f]=u.useState(""),[h,m]=u.useState(sa),[x,w]=u.useState({}),{saving:v,refusal:b,set_refusal:g,run:p}=_m(s);u.useEffect(()=>{e&&(i(""),c((n==null?void 0:n.label)??""),f((n==null?void 0:n.description)??""),m((n==null?void 0:n.parent)??sa),w({}),g(null))},[e,n,g]);const y=n?o_(t.teams,n.key):new Set,j=[...t.teams].filter(k=>!y.has(k.key)).sort(Df),_=k=>{if(k.preventDefault(),!n){if(!r.trim()){w({key:"Give the team a key."});return}const R=o.trim()||r.trim();p(()=>a({action:"add",kind:"team",key:r.trim(),...o.trim()?{label:o.trim()}:{},...d.trim()?{description:d.trim()}:{},...h!==sa?{parent:h}:{}},`Team ${R} added.`));return}if(!o.trim()){w({label:"Give the team a label."});return}const N=h===sa?null:h,S={...o.trim()!==n.label.trim()?{label:o.trim()}:{},...d.trim()!==(n.description??"").trim()?{description:d.trim()}:{},...N!==n.parent?{parent:N}:{}};if(Object.keys(S).length===0){s();return}p(()=>a({action:"edit",kind:"team",key:n.key,...S},`Team ${o.trim()} saved.`))};return l.jsx(wi,{open:e,onOpenChange:k=>k||v?null:s(),children:l.jsx(_i,{children:l.jsxs("form",{onSubmit:_,noValidate:!0,children:[l.jsxs(Ni,{children:[l.jsx(ki,{children:n?`Edit team ${n.label||n.key}`:"Add team"}),l.jsx(Ci,{children:n?l.jsxs(l.Fragment,{children:["Its key, ",l.jsx("span",{className:"font-mono",children:n.key}),", names it in posts and in sdlc org and does not change."]}):"Add a team to this repository's local org."})]}),l.jsxs("div",{className:"mt-4 grid gap-4",children:[l.jsx(wm,{message:b}),n?null:l.jsx(la,{id:"org-team-key",label:"Key",help:d_("team"),error:x.key,children:k=>l.jsx(_n,{id:"org-team-key",className:"font-mono",value:r,autoComplete:"off","aria-invalid":x.key?!0:void 0,"aria-describedby":k,onChange:N=>{i(N.target.value),w({})}})}),l.jsx(la,{id:"org-team-label",label:n?"Label":"Label (optional)",help:n?void 0:"Shown on the chart; the key when left empty.",error:x.label,children:k=>l.jsx(_n,{id:"org-team-label",value:o,"aria-invalid":x.label?!0:void 0,"aria-describedby":k,onChange:N=>{c(N.target.value),w({})}})}),l.jsx(la,{id:"org-team-description",label:"Description (optional)",children:()=>l.jsx(qs,{id:"org-team-description",rows:3,placeholder:"What the team does",value:d,onChange:k=>f(k.target.value)})}),l.jsx(la,{id:"org-team-parent",label:"Parent team",help:"Where the team sits; its posts report up through the team above.",children:k=>l.jsx(u_,{id:"org-team-parent",value:h,on_change:m,none:"No parent (a root team)",options:j,described_by:k})})]}),l.jsxs(Si,{className:"mt-6",children:[l.jsx(I,{type:"button",variant:"outline",disabled:v,onClick:s,children:"Cancel"}),l.jsx(I,{type:"submit",disabled:v,children:n?v?"Saving…":"Save":v?"Adding…":"Add team"})]})]})})})}const nO=(e,t)=>e.length===t.size&&e.every(n=>t.has(n));function aO({open:e,chart:t,job:n,save:a,on_close:s}){const[r,i]=u.useState(""),[o,c]=u.useState(""),[d,f]=u.useState(""),[h,m]=u.useState(sa),[x,w]=u.useState(new Set),[v,b]=u.useState(!1),[g,p]=u.useState(!0),[y,j]=u.useState({}),{saving:_,refusal:k,set_refusal:N,run:S}=_m(s);u.useEffect(()=>{e&&(i(""),c((n==null?void 0:n.label)??""),f((n==null?void 0:n.description)??""),m((n==null?void 0:n.parent)??sa),w(new Set((n==null?void 0:n.fills)??[])),b((n==null?void 0:n.requires_person)??!1),p((n==null?void 0:n.escalable)??!0),j({}),N(null))},[e,n,N]);const R=n?o_(t.job_functions,n.key):new Set,A=[...t.job_functions].filter(O=>!R.has(O.key)).sort(Df),z=[...t.slots].sort(Df).map(O=>({value:O.key,label:O.label||O.key})),q=O=>{if(O.preventDefault(),!n){if(!r.trim()){j({key:"Give the job function a key."});return}S(()=>a({action:"add",kind:"job_function",key:r.trim(),...o.trim()?{label:o.trim()}:{},...d.trim()?{description:d.trim()}:{},...h!==sa?{parent:h}:{},fills:[...x],requires_person:v,escalable:g},`Job function ${o.trim()||r.trim()} added.`));return}if(!o.trim()){j({label:"Give the job function a label."});return}const $=h===sa?null:h,G={...o.trim()!==n.label.trim()?{label:o.trim()}:{},...d.trim()!==(n.description??"").trim()?{description:d.trim()}:{},...$!==n.parent?{parent:$}:{},...nO(n.fills,x)?{}:{fills:[...x]},...v!==n.requires_person?{requires_person:v}:{},...g!==n.escalable?{escalable:g}:{}};if(Object.keys(G).length===0){s();return}S(()=>a({action:"edit",kind:"job_function",key:n.key,...G},`Job function ${o.trim()} saved.`))};return l.jsx(wi,{open:e,onOpenChange:O=>O||_?null:s(),children:l.jsx(_i,{children:l.jsxs("form",{onSubmit:q,noValidate:!0,children:[l.jsxs(Ni,{children:[l.jsx(ki,{children:n?`Edit job function ${n.label||n.key}`:"Add job function"}),l.jsxs(Ci,{children:["Its job description: what it does, the slots it fills and who may hold its posts.",n?l.jsxs(l.Fragment,{children:[" ","Its key, ",l.jsx("span",{className:"font-mono",children:n.key}),", does not change."]}):null]})]}),l.jsxs("div",{className:"mt-4 grid gap-4",children:[l.jsx(wm,{message:k}),n?null:l.jsx(la,{id:"org-function-key",label:"Key",help:d_("job function"),error:y.key,children:O=>l.jsx(_n,{id:"org-function-key",className:"font-mono",value:r,autoComplete:"off","aria-invalid":y.key?!0:void 0,"aria-describedby":O,onChange:$=>{i($.target.value),j({})}})}),l.jsx(la,{id:"org-function-label",label:n?"Label":"Label (optional)",error:y.label,children:O=>l.jsx(_n,{id:"org-function-label",value:o,"aria-invalid":y.label?!0:void 0,"aria-describedby":O,onChange:$=>{c($.target.value),j({})}})}),l.jsx(la,{id:"org-function-description",label:"Job description (optional)",children:()=>l.jsx(qs,{id:"org-function-description",rows:3,placeholder:"What this job function does",value:d,onChange:O=>f(O.target.value)})}),l.jsx(la,{id:"org-function-parent",label:"Parent function",help:"Its posts report to the post of the parent function.",children:O=>l.jsx(u_,{id:"org-function-parent",value:h,on_change:m,none:"No parent (a root function)",options:A,described_by:O})}),l.jsx(c_,{id:"org-function-fills",legend:"Slots it fills",options:z,checked:x,on_change:w,empty:"This org has no slots yet; add them with sdlc org add slot."}),l.jsx(Ig,{id:"org-function-requires-person",label:"Requires a person",help:"Only a person may hold its posts.",checked:v,on_change:b}),l.jsx(Ig,{id:"org-function-escalable",label:"Escalable",help:"When no holder can decide, the decision goes up the reporting line. Off, it waits for a holder of this function.",checked:g,on_change:p})]}),l.jsxs(Si,{className:"mt-6",children:[l.jsx(I,{type:"button",variant:"outline",disabled:_,onClick:s,children:"Cancel"}),l.jsx(I,{type:"submit",disabled:_,children:n?_?"Saving…":"Save":_?"Adding…":"Add job function"})]})]})})})}function sO({open:e,chart:t,binding:n,names:a,save:s,confirm:r,on_close:i}){var S;const[o,c]=u.useState(new Set),[d,f]=u.useState(""),[h,m]=u.useState({}),{saving:x,refusal:w,set_refusal:v,run:b}=_m(i);if(u.useEffect(()=>{!e||!n||(c(new Set(n.posts.map(R=>R.post))),f(n.source==="override"?n.reason??"":""),m({}),v(null))},[e,n,v]),!n)return null;const g=a.slot(n.slot),p=(S=t.project)!=null&&S.team?t.teams.find(R=>{var A;return R.key===((A=t.project)==null?void 0:A.team)}):void 0,y=p?p.label||p.key:"the owning team",j=new Set(t.job_functions.filter(R=>R.fills.includes(n.slot)).map(R=>R.key)),_=[...t.posts].map(R=>R.post).sort(a.byPost).map(R=>({value:R,label:j.has(R.split("/")[1]??"")?`${a.post(R)} (fills ${g})`:a.post(R)})),k=R=>{R.preventDefault();const A={...o.size===0?{posts:"Choose at least one post."}:{},...d.trim()?{}:{reason:"Give the reason for the override."}};m(A),!(A.posts||A.reason)&&b(()=>s({action:"bind",slot:n.slot,posts:[...o],reason:d.trim()},`Override of ${g} saved.`))},N=async()=>{await r({title:`Clear the override of ${g}?`,description:"It goes back to the posts its job descriptions name, and its reason is not kept.",action_label:"Clear",destructive:!0})&&b(()=>s({action:"unbind",slot:n.slot},`Override of ${g} cleared.`))};return l.jsx(wi,{open:e,onOpenChange:R=>R||x?null:i(),children:l.jsx(_i,{children:l.jsxs("form",{onSubmit:k,noValidate:!0,children:[l.jsxs(Ni,{children:[l.jsxs(ki,{children:["Override ",g]}),l.jsxs(Ci,{children:["Bind ",g," in this project to the posts you choose instead of its job descriptions' posts. The override is reported with its reason, who set it and when."]})]}),l.jsxs("div",{className:"mt-4 grid gap-4",children:[l.jsx(wm,{message:w}),l.jsx(c_,{id:"org-override-posts",legend:"Posts",help:"A post outside its job description is marked on the chart.",error:h.posts,options:_,checked:o,on_change:R=>{c(R),m(A=>({...A,posts:void 0}))}}),l.jsx(la,{id:"org-override-reason",label:"Reason",error:h.reason,children:R=>l.jsx(qs,{id:"org-override-reason",rows:2,placeholder:"Why this slot needs other posts",value:d,"aria-invalid":h.reason?!0:void 0,"aria-describedby":R,onChange:A=>{f(A.target.value),m(z=>({...z,reason:void 0}))}})}),l.jsxs("p",{className:"text-muted-foreground text-xs",children:["Made as ",l.jsx("span",{className:"font-mono",children:"person:user"}),", who must hold the lead post of ",y," or of a team above it."]})]}),l.jsxs(Si,{className:"mt-6",children:[n.source==="override"?l.jsx(I,{type:"button",variant:"ghost",className:"sm:mr-auto",disabled:x,onClick:()=>void N(),children:"Clear override"}):null,l.jsx(I,{type:"button",variant:"outline",disabled:x,onClick:i,children:"Cancel"}),l.jsx(I,{type:"submit",disabled:x,children:x?"Saving…":"Save override"})]})]})})})}function f_({label:e,on_edit:t,on_remove:n}){return l.jsxs(su,{children:[l.jsx(lu,{asChild:!0,children:l.jsx(I,{type:"button",variant:"ghost",size:"control-icon",className:"-my-1 shrink-0","aria-label":`More actions for ${e}`,children:l.jsx(Hh,{className:"size-3.5","aria-hidden":"true"})})}),l.jsxs(Mi,{align:"end",children:[l.jsx(As,{onSelect:t,children:"Edit"}),l.jsx(As,{className:"text-destructive focus:text-destructive",onSelect:n,children:"Remove"})]})]})}function lO({label:e,message:t,on_dismiss:n}){return l.jsxs(ge,{variant:"destructive",role:"alert",className:"mb-3",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsxs(je,{children:[e," was not removed"]}),l.jsxs(pe,{children:[l.jsx("p",{children:t}),l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:n,children:"Dismiss"})]})]})}const rO="Who holds each post and who reports to whom in this repository's local org, worked out from its teams, job functions and posts.",iO="Covered: someone holds a post that fills the slot. Vacant: posts fill it but nobody holds them. Uncovered: no job function fills it.",oO="scripts/agent-coordination/workflow.json",cO=4,Nm=e=>({paddingLeft:16+24*Math.min(e,cO)}),xc={covered:{label:"Covered",tone:"success"},vacant:{label:"Vacant",tone:"warning"},uncovered:{label:"Uncovered",tone:"error"}};function uO(){const e=Us().org;if(!e)throw new Error("The Org chart page rendered without the org seam.");return e}function dO(){const e=uO(),[t,n]=u.useState({state:"loading"}),[a,s]=u.useState(null),r=u.useRef(0),i=u.useRef(null),o=u.useCallback(h=>{const m=async x=>{const w=r.current+=1;i.current&&clearTimeout(i.current);const v=await e.chart();if(w!==r.current)return;if(v.ok){s({chart:v.data,at:new Date().toISOString()}),n({state:"read"});return}const{refusal:b}=v;if(b.reason==="no_local_org"){s(null),n({state:"none"});return}if(b.retry&&b.reason==="store_locked"&&x>0){const g=b.retry_after??10;n({state:"busy",retry_after:g}),i.current=setTimeout(()=>void m(x-1),g*1e3);return}n({state:"failed",refusal:b})};return m(h)},[e]);u.useEffect(()=>(o(1),()=>{r.current+=1,i.current&&clearTimeout(i.current)}),[o]);const c=()=>void o(1),d=t.state==="none"?null:a,f=hO(e.change,()=>void o(1),(d==null?void 0:d.chart)??fO);return l.jsxs("div",{className:"flex h-full min-h-0 flex-1 flex-col overflow-auto px-4 py-4 sm:px-6 lg:px-8",children:[l.jsx(ls,{title:"Org chart",description:rO}),t.state==="busy"&&!d?l.jsxs("p",{className:"text-muted-foreground mt-4 text-sm",role:"status",children:["Another sdlc command holds the repository store; reading again in ",t.retry_after," s."]}):null,(t.state==="loading"||t.state==="busy")&&!d?l.jsx(mO,{quiet:t.state==="busy"}):null,t.state==="none"?l.jsx(pO,{edit:(f==null?void 0:f.actions)??null}):null,t.state==="failed"?l.jsx(gO,{kept_at:(d==null?void 0:d.at)??null,on_retry:c}):null,d?l.jsx(xO,{chart:d.chart,edit:(f==null?void 0:f.actions)??null}):null,(f==null?void 0:f.dialogs)??null]})}const fO={org:"",workflow:!1,teams:[],job_functions:[],slots:[],posts:[],members:[],slot_resolution:[],project:{team:null,roots:[]}};function hO(e,t,n){const a=yi(),s=h_(n),{confirm:r,confirm_dialog:i}=ji(),[o,c]=u.useState(null),[d,f]=u.useState({}),h=b=>f(g=>{if(!g[b])return g;const{[b]:p,...y}=g;return y});if(!e)return null;const m=async(b,g)=>{const p=await e(b);return p.ok?("kind"in b&&h(b.kind==="team"?"teams":"functions"),a.success(g),t(),null):p.refusal.message},x=async(b,g,p)=>{if(!await r({title:`Remove ${b==="team"?"team":"job function"} ${p}?`,description:"It leaves this repository's local org. If a post, a team or function under it, a holder, an override or the project still needs it, nothing is removed and you are told what needs it.",action_label:"Remove",destructive:!0}))return;const _=b==="team"?"teams":"functions",k=await e({action:"remove",kind:b,key:g});if(!k.ok){f(N=>({...N,[_]:{label:p,message:k.refusal.message}}));return}h(_),a.success(`${b==="team"?"Team":"Job function"} ${p} removed.`),t()},w=()=>c(null),v=(o==null?void 0:o.kind)==="override"&&n.project.team!==null?n.project.slots.find(b=>b.slot===o.slot)??null:null;return{actions:{team:b=>c({kind:"team",team:b}),job:b=>c({kind:"function",job:b}),override:b=>c({kind:"override",slot:b}),remove:(b,g,p)=>void x(b,g,p),refused:b=>{const g=d[b];return g?l.jsx(lO,{label:g.label,message:g.message,on_dismiss:()=>h(b)}):null}},dialogs:l.jsxs(l.Fragment,{children:[l.jsx(tO,{open:(o==null?void 0:o.kind)==="team",chart:n,team:(o==null?void 0:o.kind)==="team"?o.team:null,save:m,on_close:w}),l.jsx(aO,{open:(o==null?void 0:o.kind)==="function",chart:n,job:(o==null?void 0:o.kind)==="function"?o.job:null,save:m,on_close:w}),l.jsx(sO,{open:v!==null,chart:n,binding:v,names:s,save:m,confirm:r,on_close:w}),i]})}}function mO({quiet:e=!1}){return l.jsx("div",{className:"mt-6 grid gap-2",...e?{"aria-hidden":!0}:{role:"status","aria-label":"Loading the org chart"},children:Array.from({length:4},(t,n)=>l.jsx(Jt,{className:n===3?"h-10 w-2/3":"h-10 w-full"},n))})}function Sl({children:e}){return l.jsx("pre",{className:"bg-muted text-foreground m-0 overflow-x-auto rounded-md border px-3 py-2 font-mono text-sm",children:l.jsx("code",{children:e})})}function pO({edit:e}){return l.jsxs(ge,{variant:"info",className:"mt-6",children:[l.jsx(fa,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"This repository has no local org yet"}),l.jsxs(pe,{children:[l.jsx("p",{children:e?"Plan one from this checkout's workflow roles with sdlc org seed, or start one with a team. This page shows it as soon as it exists.":"Plan one from this checkout's workflow roles, or start one with a team. This page shows it as soon as it exists."}),l.jsxs("div",{className:"mt-2 grid w-full gap-2",children:[l.jsx(Sl,{children:"sdlc org seed"}),e?null:l.jsx(Sl,{children:"sdlc org add team <key>"})]}),e?l.jsxs(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>e.team(null),children:[l.jsx(rc,{className:"size-4","aria-hidden":"true"}),"Add team"]}):null]})]})}function gO({kept_at:e,on_retry:t}){return l.jsxs(ge,{variant:"destructive",className:"mt-6",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Could not read the local org"}),l.jsxs(pe,{children:[l.jsxs("p",{children:[e?`The chart read at ${pa(e)} is kept below. `:"","Details are in the terminal running sdlc viewer."]}),l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:t,children:"Retry"})]})]})}function h_(e){return u.useMemo(()=>{const t=new Map(e.teams.map(h=>[h.key,h.label||h.key])),n=new Map(e.job_functions.map(h=>[h.key,h.label||h.key])),a=new Map(e.slots.map(h=>[h.key,h.label||h.key])),s=new Map(e.posts.map(h=>[h.post,h.holders])),r=h=>{const[m="",x=""]=h.split("/");return{team:t.get(m)??m,job:n.get(x)??x}},i=h=>{const{team:m,job:x}=r(h);return`${x} · ${m}`},o=h=>{if(h==="top")return"Top of the org";if(typeof h!="string")return`A vacant ${n.get(h.vacant)??h.vacant}`;const m=(s.get(h)??[]).map(x=>x.id);return m.length?`${i(h)} (${m.join(", ")})`:i(h)},c=new Map(e.teams.map(h=>[h.key,h.parent])),d=h=>{let m=0;for(let x=c.get(h);x&&m<e.teams.length;x=c.get(x))m+=1;return m};return{parts:r,post:i,manager:o,byPost:(h,m)=>{const[x="",w=""]=[h.split("/")[0],m.split("/")[0]],[v,b]=[r(h),r(m)];return d(x)-d(w)||v.team.localeCompare(b.team)||v.job.localeCompare(b.job)},slot:h=>a.get(h)??h,job:h=>n.get(h)??h,team:h=>t.get(h)??h}},[e])}function ms({id:e,title:t,description:n,actions:a,children:s}){return l.jsxs("section",{"aria-labelledby":e,className:"mt-8 min-w-0",children:[l.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-x-4 gap-y-2",children:[l.jsxs("div",{className:"min-w-0 flex-1 basis-64",children:[l.jsx("h2",{id:e,className:"text-lg font-semibold",children:t}),l.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:n})]}),a?l.jsx("div",{className:"flex shrink-0 gap-2",children:a}):null]}),l.jsx("div",{className:"mt-3",children:s})]})}function Pg({children:e,on_click:t}){return l.jsxs(I,{type:"button",variant:"outline",size:"sm",onClick:t,children:[l.jsx(rc,{className:"size-4","aria-hidden":"true"}),e]})}function xO({chart:e,edit:t}){const n=h_(e);return l.jsxs(l.Fragment,{children:[l.jsx(ms,{id:"org-chart-lines",title:"Reporting lines",description:"Each post reports to the post of its parent job function in the same team, or else in the nearest team above it that has one.",children:l.jsx(yO,{chart:e,names:n})}),l.jsx(ms,{id:"org-chart-members",title:"Members",description:"A member's primary manager comes from the post highest in the function tree; the others are dotted lines. Each agent answers to the nearest person in its reporting chain.",children:l.jsx(wO,{chart:e,names:n})}),t?l.jsxs(ms,{id:"org-chart-teams",title:"Teams",description:"Each team under its parent. A post is one of its job functions staffed in it.",actions:l.jsx(Pg,{on_click:()=>t.team(null),children:"Add team"}),children:[t.refused("teams"),l.jsx(vO,{chart:e,edit:t})]}):null,l.jsxs("div",{className:"grid items-start gap-x-6 xl:grid-cols-2",children:[l.jsxs(ms,{id:"org-chart-functions",title:"Function tree",description:"Each job function under its parent, with the slots it fills.",actions:t?l.jsx(Pg,{on_click:()=>t.job(null),children:"Add job function"}):void 0,children:[t==null?void 0:t.refused("functions"),l.jsx(_O,{chart:e,names:n,edit:t})]}),l.jsxs(ms,{id:"org-chart-slots",title:"Slots",description:iO,children:[e.workflow?null:l.jsxs("div",{className:"mb-3",children:[l.jsx("p",{className:"text-muted-foreground text-xs",children:"This checkout has no workflow file, so no slot is marked as a gate:"}),l.jsx("p",{className:"font-mono text-xs",children:oO})]}),l.jsx(SO,{chart:e,names:n})]})]}),l.jsx(CO,{chart:e,names:n,edit:t})]})}function vO({chart:e,edit:t}){const n=Sm([...e.teams].sort((r,i)=>(r.label||r.key).localeCompare(i.label||i.key)),r=>r.key,r=>r.parent);if(n.length===0)return l.jsx("p",{className:"text-muted-foreground text-sm",children:"No teams yet."});const a=e.project.team,s=(r,i)=>l.jsx("ul",{role:"list",className:i===0?"m-0 -mb-px list-none p-0":"m-0 list-none p-0",children:r.map(({item:o,children:c})=>{const d=o.label||o.key;return l.jsxs("li",{children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1 border-b py-2 pr-4",style:Nm(i),"data-testid":"org-chart-team",children:[l.jsx("span",{className:"text-sm font-medium",children:d}),l.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:o.key}),a===o.key?l.jsx(Fe,{variant:"neutral",children:"Owns this project"}):null,l.jsx(f_,{label:d,on_edit:()=>t.team(o),on_remove:()=>t.remove("team",o.key,d)})]})]}),c.length>0?s(c,i+1):null]},o.key)})});return l.jsx(Et,{className:"overflow-hidden",children:s(n,0)})}function Sm(e,t,n){const a=new Set(e.map(t)),s=new Map(e.map(i=>[t(i),{item:i,children:[]}])),r=[];for(const i of e){const o=n(i),c=s.get(t(i));o&&a.has(o)&&o!==t(i)?s.get(o).children.push(c):r.push(c)}return r}function yO({chart:e,names:t}){const n=Sm([...e.posts].sort((r,i)=>t.byPost(r.post,i.post)),r=>r.post,r=>typeof r.reports_to=="string"&&r.reports_to!=="top"?r.reports_to:null);if(n.length===0)return l.jsx("p",{className:"text-muted-foreground text-sm",children:"No posts yet."});const a=new Map(e.members.map(r=>[`${r.kind}:${r.id}`,r])),s=(r,i)=>l.jsx("ul",{role:"list",className:i===0?"m-0 -mb-px list-none p-0":"m-0 list-none p-0",children:r.map(({item:o,children:c})=>{const{team:d}=t.parts(o.post),f=typeof o.reports_to=="object"?o.reports_to:null;return l.jsxs("li",{children:[l.jsxs("div",{className:"border-b py-2 pr-4",style:Nm(i),"data-testid":"org-chart-post",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(ZS,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),l.jsx("span",{className:"text-sm font-medium",children:t.parts(o.post).job}),l.jsx("span",{className:"text-muted-foreground text-xs",children:f?`${d} · Reports to a vacant ${t.job(f.vacant)}`:d})]}),l.jsx("div",{className:"mt-1 grid min-w-0 gap-1 pl-6",children:o.holders.length===0?l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(Fe,{variant:xc.vacant.tone,children:xc.vacant.label}),l.jsx("span",{className:"text-muted-foreground text-xs",children:"No one holds this post."})]}):o.holders.map(h=>l.jsx(bO,{holder:h,post:o.post,member:a.get(`${h.kind}:${h.id}`),names:t},`${h.kind}:${h.id}`))})]}),c.length>0?s(c,i+1):null]},o.post)})});return l.jsx(Et,{className:"overflow-hidden",children:s(n,0)})}function bO({holder:e,post:t,member:n,names:a}){const s=e.kind==="person"?qh:Uh,r=n==null?void 0:n.posts.find(c=>c.post===t),i=n==null?void 0:n.posts.find(c=>c.primary);let o=null;return r!=null&&r.dotted&&i?o=`Dotted line: primary manager is ${a.manager(i.reports_to)}`:e.kind==="agent"&&n&&"accountable_person"in n&&(o=n.accountable_person?`Accountable person ${n.accountable_person.id}`:"No accountable person"),l.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[l.jsx(s,{className:"text-muted-foreground size-3.5 shrink-0","aria-hidden":"true"}),l.jsx("span",{className:"text-sm font-medium break-all",children:e.id}),l.jsx("span",{className:"text-muted-foreground text-xs",children:e.kind==="person"?"Person":"Agent"}),o?l.jsx("span",{className:"text-xs",children:o}):null]})}const jO=["sdlc org hold <team>/<function> --person <id>","sdlc org hold <team>/<function> --agent <id>"];function wO({chart:e,names:t}){if(e.members.length===0)return l.jsxs("div",{className:"grid max-w-2xl gap-2",children:[l.jsx("p",{className:"text-muted-foreground text-sm",children:"No one holds a post yet. Give a post to a person or an agent:"}),jO.map(a=>l.jsx(Sl,{children:a},a))]});const n=[...e.members].sort((a,s)=>a.kind===s.kind?a.id.localeCompare(s.id):a.kind==="person"?-1:1);return l.jsx(Et,{className:"overflow-x-auto",children:l.jsxs(kt,{containerAriaLabel:"Members",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"Member"}),l.jsx(te,{children:"Posts"}),l.jsx(te,{children:"Primary manager"}),l.jsx(te,{children:"Dotted lines"}),l.jsx(te,{children:"Accountable person"})]})}),l.jsx(Ct,{children:n.map(a=>{var i;const s=a.posts.find(o=>o.primary),r=a.posts.filter(o=>o.dotted);return l.jsxs(Ne,{"data-testid":"org-chart-member",children:[l.jsxs(K,{children:[l.jsx("div",{className:"font-medium",children:a.id}),l.jsx("div",{className:"text-muted-foreground text-xs",children:a.kind==="person"?"Person":"Agent"})]}),l.jsx(K,{children:a.posts.map(o=>t.post(o.post)).join(", ")}),l.jsx(K,{children:s?t.manager(s.reports_to):"None"}),l.jsx(K,{children:r.length?r.map(o=>t.manager(o.reports_to)).join(", "):"None"}),l.jsx(K,{children:a.kind==="person"?"Not an agent":((i=a.accountable_person)==null?void 0:i.id)??"None"})]},`${a.kind}:${a.id}`)})})]})})}function _O({chart:e,names:t,edit:n}){const a=Sm([...e.job_functions].sort((r,i)=>(r.label||r.key).localeCompare(i.label||i.key)),r=>r.key,r=>r.parent);if(a.length===0)return l.jsx("p",{className:"text-muted-foreground text-sm",children:"No job functions yet."});const s=(r,i)=>l.jsx("ul",{role:"list",className:i===0?"m-0 -mb-px list-none p-0":"m-0 list-none p-0",children:r.map(({item:o,children:c})=>l.jsxs("li",{children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1 border-b py-2 pr-4",style:Nm(i),"data-testid":"org-chart-function",children:[l.jsx("span",{className:"text-sm font-medium",children:o.label||o.key}),l.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"text-muted-foreground text-xs",children:o.fills.length?`Fills ${o.fills.map(t.slot).join(", ")}`:"No slot"}),o.requires_person?l.jsx(Fe,{variant:"neutral",children:"Requires a person"}):null,n?l.jsx(f_,{label:o.label||o.key,on_edit:()=>n.job(o),on_remove:()=>n.remove("job_function",o.key,o.label||o.key)}):null]})]}),c.length>0?s(c,i+1):null]},o.key))});return l.jsx(Et,{className:"overflow-hidden",children:s(a,0)})}function NO(e,t){return e.status==="uncovered"?"No job function fills this slot":e.status==="vacant"?`${e.posts.map(t.post).join(", ")} has no holder`:e.posts.map(n=>`${t.post(n.post)}: ${n.holders.map(a=>a.id).join(", ")}`).join("; ")}const vc={covered:0,vacant:1,uncovered:2};function m_(e){return new Map(e.slots.filter(t=>t.gate).map(t=>{var n;return[t.key,(n=t.gates)!=null&&n.length?`Gate: ${t.gates.join(", ")}`:"Gate slot"]}))}function SO({chart:e,names:t}){const n=m_(e);return l.jsx(Et,{className:"overflow-x-auto",children:l.jsxs(kt,{containerAriaLabel:"Slots",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"Slot"}),l.jsx(te,{children:"Status"}),l.jsx(te,{children:"Resolves to"})]})}),l.jsxs(Ct,{children:[[...e.slot_resolution].sort((a,s)=>vc[a.status]-vc[s.status]||t.slot(a.slot).localeCompare(t.slot(s.slot))).map(a=>{const s=xc[a.status];return l.jsxs(Ne,{"data-testid":"org-chart-slot",children:[l.jsxs(K,{children:[l.jsx("div",{className:"font-medium",children:t.slot(a.slot)}),n.has(a.slot)?l.jsx("div",{className:"text-muted-foreground text-xs",children:n.get(a.slot)}):null]}),l.jsx(K,{children:l.jsx(Fe,{variant:s.tone,children:s.label})}),l.jsxs(K,{children:[NO(a,t),a.status==="covered"&&a.needs_person?l.jsx("div",{className:"text-muted-foreground text-xs",children:"Needs a person"}):null]})]},a.slot)}),e.slot_resolution.length===0?l.jsx(Ne,{children:l.jsx(K,{colSpan:3,className:"text-muted-foreground h-24 text-center",children:"This org has no slots yet."})}):null]})]})})}const kO="Who fills each workflow slot for this repository's project: the posts of the owning team's job functions, else of the nearest team above, unless an override names other posts.",hd=["sdlc org own <team>","sdlc org bind <slot> <team>/<function>... --reason <text>","sdlc org unbind <slot>"];function CO({chart:e,names:t,edit:n}){const{project:a}=e;if(a.team===null){const i=a.roots.map(t.team);return l.jsx(ms,{id:"org-chart-project",title:"This project",description:i.length?`This org has several root teams (${i.join(", ")}), so no team owns this repository's project yet and its slots are not bound. Name the owning team:`:"This org has no team yet, so no team owns this repository's project. Start one:",children:l.jsx("div",{className:"max-w-2xl",children:l.jsx(Sl,{children:i.length?hd[0]:"sdlc org add team <key>"})})})}const s=m_(e),r=[...a.slots].sort((i,o)=>vc[i.status]-vc[o.status]||t.slot(i.slot).localeCompare(t.slot(o.slot)));return l.jsxs(ms,{id:"org-chart-project",title:"This project",description:kO,children:[l.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[l.jsx("span",{className:"text-muted-foreground text-xs",children:"Owning team"}),l.jsx("span",{className:"text-sm font-medium",children:t.team(a.team)})]}),l.jsx(Et,{className:"mt-3 overflow-x-auto",children:l.jsxs(kt,{containerAriaLabel:"Slots in this project",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{children:"Slot"}),l.jsx(te,{children:"Status"}),l.jsx(te,{children:"Bound to"}),l.jsx(te,{children:"Source"}),n?l.jsx(te,{className:"text-right",children:l.jsx("span",{className:"sr-only",children:"Actions"})}):null]})}),l.jsxs(Ct,{children:[r.map(i=>{const o=xc[i.status];return l.jsxs(Ne,{"data-testid":"org-chart-project-slot",children:[l.jsxs(K,{children:[l.jsx("div",{className:"font-medium",children:t.slot(i.slot)}),s.has(i.slot)?l.jsx("div",{className:"text-muted-foreground text-xs",children:s.get(i.slot)}):null]}),l.jsx(K,{children:l.jsx(Fe,{variant:o.tone,children:o.label})}),l.jsx(K,{children:l.jsx(TO,{binding:i,names:t})}),l.jsx(K,{children:l.jsx(EO,{binding:i})}),n?l.jsx(K,{className:"text-right",children:l.jsx(I,{type:"button",variant:"ghost",size:"control-icon","aria-label":i.source==="override"?`Edit the override of ${t.slot(i.slot)}`:`Override ${t.slot(i.slot)}`,onClick:()=>n.override(i.slot),children:l.jsx(gb,{className:"size-3.5","aria-hidden":"true"})})}):null]},i.slot)}),r.length===0?l.jsx(Ne,{children:l.jsx(K,{colSpan:n?5:4,className:"text-muted-foreground h-24 text-center",children:"This org has no slots yet."})}):null]})]})}),n?l.jsxs("div",{className:"mt-3 grid max-w-2xl gap-2",children:[l.jsxs("p",{className:"text-muted-foreground text-sm",children:["Overrides made here are made as ",l.jsx("span",{className:"font-mono",children:"person:user"}),", as sdlc org makes them without --as: that person must hold the lead post of the owning team or of a team above it."]}),l.jsx("p",{className:"text-muted-foreground text-sm",children:"Change the owning team with sdlc org:"}),l.jsx(Sl,{children:hd[0]})]}):l.jsxs("div",{className:"mt-3 grid max-w-2xl gap-2",children:[l.jsx("p",{className:"text-muted-foreground text-sm",children:"Change the owning team or a slot's binding with sdlc org; a lead post of the owning team or a team above it may:"}),hd.map(i=>l.jsx(Sl,{children:i},i))]})]})}function TO({binding:e,names:t}){const n=[];e.status==="covered"&&e.needs_person&&n.push("Needs a person");for(const s of e.posts)s.off_description&&n.push(`${t.post(s.post)} does not fill ${t.slot(e.slot)} in its job description`);e.stale_posts&&n.push(e.stale_posts===1?"One post this override names is no longer in the org":`${e.stale_posts} posts this override names are no longer in the org`);let a;return e.posts.length===0?a=e.source==="override"?"The override names no post the org still has":"No job function fills this slot":e.status==="vacant"?a=`${e.posts.map(s=>t.post(s.post)).join(", ")} has no holder`:a=e.posts.map(s=>s.holders.length?`${t.post(s.post)}: ${s.holders.map(r=>r.id).join(", ")}`:`${t.post(s.post)}: no holder`).join("; "),l.jsxs(l.Fragment,{children:[a,n.map(s=>l.jsx("div",{className:"text-muted-foreground text-xs",children:s},s))]})}function EO({binding:e}){var a;if(e.source==="baseline")return l.jsx(l.Fragment,{children:"From job descriptions"});const t=(a=e.set_by)==null?void 0:a.split(":").slice(1).join(":"),n=[e.reason,[t,e.set_at?Un(e.set_at):null].filter(Boolean).join(", ")].filter(Boolean).join(" · ");return l.jsxs(l.Fragment,{children:["Override",n?l.jsx("div",{className:"text-muted-foreground text-xs",children:n}):null]})}const RO="Local only · this machine · not connected to SoftwareDLC",AO="Checking sync state…",MO="Sync state unknown",OO="Projects are the repositories this viewer reads on this machine. Nothing is shared unless you connect to SoftwareDLC.",zf="Details are in the terminal running sdlc viewer.",DO="How to fix it is in the terminal running sdlc viewer.",uu="Loading…",yc="Not available";function zO(e){if(!e.source)return null;if(e.source.kind==="repository")return"Repository · in no folder";const t=e.source.repositories;return`Folder · ${t} ${t===1?"repository":"repositories"}`}function yr(e){return(typeof e=="string"?new Date(e):e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}const $O={repository_registry:"this repository's registry",folder_registry:"the folder registry",issue_store:"the issue store",task_store:"the task store"};function LO(e,t){const n=t?` this list was read at ${yr(t)}.`:"";if(e.reason==="store_locked"){const a=e.store?$O[e.store]:"a local store",s=e.since?` since ${yr(e.since)}`:"";return`Another sdlc command has held ${a}${s};${n||" nothing was read yet."} ${zf}`}return e.status===0?`The viewer did not answer. Is sdlc viewer still running?${t?` This list was read at ${yr(t)}.`:""}`:`The read failed.${t?` This list was read at ${yr(t)}.`:""} ${zf}`}const UO=e=>e.status===409,HO={not_a_home:"The repository this one's folder pointer names is not a folder's home.",folder_conflict:"This repository holds both a folder pointer and a folder's membership.",pointer_invalid:"This repository's folder pointer cannot be read, or names this repository as its own home.",membership_invalid:"The folder's records cannot be read.",folder_invalid:"This repository's folder records cannot be read."};function BO(e){const t=e.repository??"This repository";if(e.reason==="folder_member_unlisted"&&e.folder&&e.home&&e.member_path)return{kind:"unlisted",repository:t,folder:e.folder,home:e.home,member_path:e.member_path};if(e.reason==="member_moved"){const s=e.folder?`the folder ${e.folder}`:"its folder";return{kind:"moved_member",cause:`This repository, ${t}, is not where ${s} records it.`}}if(e.reason==="folder_moved")return{kind:"other",cause:e.folder?`The folder ${e.folder} has moved.`:"The folder has moved.",fix:!0};const n=e.reason?HO[e.reason]:void 0,a=n!==void 0&&e.reason!=="membership_invalid"&&e.reason!=="folder_invalid";return{kind:"other",cause:n??"This repository's folder cannot be read.",fix:a}}const Xg=["tasks","issues","releases"],p_=u.createContext(null);function va(){const e=u.useContext(p_);if(!e)throw new Error("A shell page rendered outside the app shell.");return e}const qO=10,GO=()=>new Date;function VO({shell:e,now:t=GO,children:n}){const[a,s]=u.useState(null),[r,i]=u.useState(null),[o,c]=u.useState(null),[d,f]=u.useState(null),[h,m]=u.useState(null),[x,w]=u.useState(!0),[v,b]=u.useState(!1),[g,p]=u.useState(void 0),[y,j]=u.useState(!1),[_,k]=u.useState(Xg),N=u.useRef(!1),S=u.useRef(!1),R=u.useRef(null),A=u.useRef(!0),z=u.useCallback(async(O=!1)=>{R.current&&clearTimeout(R.current),R.current=null,b(!0);const[$,G]=await Promise.all([e.organizations.list(),e.projects.list()]);if(!A.current)return;if(b(!1),w(!1),$.ok&&G.ok){if(N.current=!0,S.current=!1,m(null),f(t()),$.data.organizations.length===0){c("not_in_git"),s(null),i(null);return}c(null),s($.data.organizations[0]),i(G.data.projects);return}const E=$.ok?G.ok?null:G.refusal:$.refusal;if(!E)return;if(UO(E)){S.current=!1,m(null),c(E),s(null),i(null);return}const B=N.current&&!S.current&&!O;S.current=!0;const C=E.retry_after??qO;m({refusal:E,shown:!B,retryInSeconds:B?C:null}),B&&(R.current=setTimeout(()=>void z(!0),C*1e3))},[e,t]);u.useEffect(()=>(A.current=!0,z(),e.about.about().then(O=>{A.current&&(O.ok?p(O.data):O.refusal.status===404?p(null):j(!0))}),Promise.all(Xg.map(async O=>{var $;return[O,await(($=e[O])==null?void 0:$.access())]})).then(O=>{A.current&&k(O.filter(([,$])=>!($!=null&&$.ok&&!$.data.can_view)).map(([$])=>$))}),()=>{A.current=!1,R.current&&clearTimeout(R.current)}),[e,z]);const q={loading:x,org:a,projects:r,none:o,readAt:d,failure:h,about:g,aboutFailed:y,domains:_,reading:v,refresh:()=>void z()};return l.jsx(p_.Provider,{value:q,children:n})}const YO={threads:"Threads",tasks:"Tasks",queues:"Queues",worktrees:"Worktrees",workspaces:"Workspaces",chart:"Org chart"},IO={tasks:"Tasks",issues:"Issues",releases:"Releases"};function $f(e,t){return e.kind==="home"?"Home":e.kind==="org"?YO[e.page]:e.kind==="project"?e.page?IO[e.page]:t??e.project:"Not found"}const PO="(max-width: 767px)";function XO(){const e=typeof window<"u"&&window.matchMedia?window.matchMedia(PO):null,[t,n]=u.useState((e==null?void 0:e.matches)??!1);return u.useEffect(()=>{if(!e)return;const a=()=>n(e.matches);return e.addEventListener("change",a),()=>e.removeEventListener("change",a)},[e]),t}function co({className:e=""}){return l.jsx("span",{"aria-hidden":"true",className:`block animate-pulse rounded-md bg-sidebar-accent ${e}`})}function Kg({label:e,children:t}){return l.jsxs("span",{role:"status",className:"flex flex-col gap-1",children:[l.jsx("span",{className:"sr-only",children:e}),t]})}function Qg({item:e,collapsed:t}){const{Link:n}=jt(),a=e.icon;return l.jsx("li",{children:l.jsx("span",{title:e.title??(t?e.label:void 0),className:"block",children:l.jsxs(n,{href:e.href,className:"flex h-8 items-center gap-2 overflow-hidden rounded-md px-2 text-sm text-sidebar-foreground no-underline outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring "+(e.current?"bg-sidebar-accent font-medium text-sidebar-accent-foreground":""),"aria-current":e.current?"page":void 0,"aria-label":t?e.label:void 0,children:[l.jsx(a,{className:"size-4 shrink-0","aria-hidden":"true"}),!t&&l.jsx("span",{className:"truncate",children:e.label})]})})})}const Zg="m-0 flex list-none flex-col gap-1 p-0";function Fg({label:e,collapsed:t,children:n}){return l.jsxs("div",{className:"flex flex-col gap-1 p-2",role:"group","aria-label":e,children:[!t&&l.jsx("p",{className:"m-0 px-2 text-xs font-medium text-sidebar-foreground/70",children:e}),n]})}function Wg({page:e,collapsed:t,sheet:n=!1}){const{href:a}=jt(),{worktrees:s}=Us(),r=va(),{org:i,projects:o,loading:c,none:d,about:f,aboutFailed:h,domains:m}=r,x=i?`/org/${i.slug}`:"",w=o==null?void 0:o.find(A=>A.current),v=A=>{var z;return((z=i==null?void 0:i.source)==null?void 0:z.kind)==="folder"&&w?`${A} · ${w.name}`:A},b=v("Workspaces"),g=v("Tasks"),p=v("Queues"),y=[{label:"Home",href:a(x||"/"),icon:wk,current:e.kind==="home"},{label:"Threads",href:a(`${x}/threads`),icon:Ak,current:e.kind==="org"&&e.page==="threads"},...m.includes("tasks")?[{label:g,title:g,href:a(`${x}/tasks`),icon:hb,current:e.kind==="org"&&e.page==="tasks"}]:[],{label:p,title:p,href:a(`${x}/queues`),icon:mb,current:e.kind==="org"&&e.page==="queues"},...s?[{label:"Worktrees",href:a(`${x}/worktrees`),icon:fb,current:e.kind==="org"&&e.page==="worktrees"}]:[],{label:b,title:b,href:a(`${x}/workspaces`),icon:vk,current:e.kind==="org"&&e.page==="workspaces"},{label:"Org chart",href:a(`${x}/chart`),icon:zk,current:e.kind==="org"&&e.page==="chart"}],j=c?null:d?"No organization":(i==null?void 0:i.name)??"Organization",_=i?zO(i):null,k=f==null?void 0:f.version,N=k?t?k:`sdlc ${k}`:h?yc:uu,S=h||(f==null?void 0:f.sync.state)==="unknown"?MO:f===void 0?AO:RO;let R;return c?R=l.jsx("div",{className:"px-2 py-1",children:l.jsxs(Kg,{label:"Loading projects",children:[l.jsx(co,{className:"h-4 w-32"}),l.jsx(co,{className:"h-4 w-24"})]})}):o?R=l.jsx("ul",{className:Zg,children:o.map(A=>l.jsx(Qg,{collapsed:t,item:{label:A.name,href:a(`/proj/${encodeURIComponent(A.id)}`),icon:gk,current:e.kind==="project"&&e.project===A.id}},A.id))}):R=l.jsx("p",{className:"m-0 px-2 text-sm text-sidebar-foreground/70",children:d?"No projects":yc}),l.jsxs("div",{className:"flex h-full flex-col bg-sidebar text-sidebar-foreground",children:[l.jsxs("div",{className:`flex items-center gap-2 p-2 ${n?"pr-11":""}`,role:"group","aria-label":"Current organization",children:[l.jsx("div",{className:"flex aspect-square size-8 shrink-0 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground",children:l.jsx(WS,{className:"size-4","aria-hidden":"true"})}),!t&&l.jsx("div",{className:"grid min-w-0 flex-1 text-left text-sm leading-tight",children:j===null?l.jsxs(Kg,{label:"Loading organization",children:[l.jsx(co,{className:"h-4 w-28"}),l.jsx(co,{className:"h-3 w-24"})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"truncate font-semibold",title:j,children:j}),_&&l.jsx("span",{className:"truncate text-xs text-sidebar-foreground/70",children:_})]})})]}),l.jsxs("nav",{"aria-label":"App",className:"min-h-0 flex-1 overflow-y-auto",children:[l.jsx(Fg,{label:"Organization",collapsed:t,children:l.jsx("ul",{className:Zg,children:y.map(A=>l.jsx(Qg,{item:A,collapsed:t},A.label))})}),!t&&l.jsx(Fg,{label:"Projects",collapsed:t,children:R})]}),f!==null&&l.jsxs("div",{className:"flex flex-col gap-1 border-t border-sidebar-border p-2 text-xs text-sidebar-foreground/70",children:[l.jsx("p",{className:"m-0 truncate px-2",title:k?`sdlc ${k}`:void 0,children:N}),!t&&l.jsxs("p",{className:"m-0 flex items-start gap-2 px-2",children:[l.jsx(bk,{className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),l.jsx("span",{children:S})]})]})]})}const KO="outline-hidden rounded-sm focus-visible:ring-2 focus-visible:ring-ring";function QO({page:e}){var c;const{href:t,Link:n}=jt(),{org:a,projects:s,loading:r,none:i}=va(),o=[];if(r)o.push({label:uu});else if(i)o.push({label:"No organization"});else{const d=(a==null?void 0:a.name)??"Organization";if(o.push({label:d,href:e.kind==="home"?void 0:t(a?`/org/${a.slug}`:"/")}),e.kind==="project"){const f=((c=s==null?void 0:s.find(h=>h.id===e.project))==null?void 0:c.name)??e.project;o.push({label:f,href:e.page?t(`/proj/${encodeURIComponent(e.project)}`):void 0})}e.kind==="org"&&e.item!==void 0?(o.push({label:$f(e),href:a?t(`/org/${a.slug}/${e.page}`):void 0}),o.push({label:e.item})):e.kind!=="home"&&!(e.kind==="project"&&!e.page)&&o.push({label:$f(e)})}return l.jsx("nav",{"aria-label":"Breadcrumb",className:"min-w-0",children:l.jsx("ol",{className:"m-0 flex min-w-0 list-none items-center gap-1.5 p-0 text-sm text-muted-foreground",children:o.map((d,f)=>l.jsxs("li",{className:"flex min-w-0 items-center gap-1.5",children:[f>0&&l.jsx(cb,{className:"size-3.5 shrink-0","aria-hidden":"true"}),d.href?l.jsx(n,{href:d.href,className:`truncate text-muted-foreground no-underline hover:text-foreground ${KO}`,children:d.label}):l.jsx("span",{className:"truncate font-normal text-foreground","aria-current":f===o.length-1?"page":void 0,children:d.label})]},`${f}-${d.label}`))})})}function ZO({page:e,children:t}){var g;const n=XO(),[a,s]=u.useState(!0),[r,i]=u.useState(!1),o=u.useRef(null),c=u.useRef(null),{org:d,projects:f,loading:h,none:m}=va(),x=e.kind==="project"?(g=f==null?void 0:f.find(p=>p.id===e.project))==null?void 0:g.name:void 0;u.useEffect(()=>{const p=h?uu:m?"No organization":(d==null?void 0:d.name)??"Organization";document.title=`${$f(e,x)} · ${p} · sdlc viewer`},[e,x,d,h,m]);const w=()=>{var p;i(!1),(p=o.current)==null||p.focus()};u.useEffect(()=>{n||i(!1)},[n]);const v=n&&r;u.useEffect(()=>{var j;const p=c.current;if(!v||!p)return;(j=p.querySelector("a, button"))==null||j.focus();const y=_=>{var A;if(_.key==="Escape"){i(!1),(A=o.current)==null||A.focus();return}if(_.key!=="Tab")return;const k=[...p.querySelectorAll("a[href], button:not([disabled])")];if(k.length===0)return;const N=k[0],S=k[k.length-1],R=p.contains(document.activeElement);_.shiftKey&&(document.activeElement===N||!R)?(_.preventDefault(),S.focus()):!_.shiftKey&&(document.activeElement===S||!R)&&(_.preventDefault(),N.focus())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[v]);const b=!n&&!a;return l.jsxs("div",{className:"flex h-svh min-h-0 overflow-hidden bg-background text-foreground",children:[!n&&l.jsx("aside",{"aria-label":"Sidebar",className:`shrink-0 border-r border-sidebar-border transition-[width] ${b?"w-12":"w-64"}`,children:l.jsx(Wg,{page:e,collapsed:b})}),v&&l.jsxs("div",{className:"fixed inset-0 z-50 flex",children:[l.jsxs("aside",{ref:c,role:"dialog","aria-modal":"true","aria-label":"Sidebar",className:"relative w-72 max-w-[85vw] border-r border-sidebar-border",children:[l.jsx(Wg,{page:e,collapsed:!1,sheet:!0}),l.jsx("button",{type:"button","aria-label":"Close the sidebar",className:"absolute top-3 right-3 inline-flex size-7 items-center justify-center rounded-md border-0 bg-transparent text-sidebar-foreground/70 outline-hidden hover:text-sidebar-foreground focus-visible:ring-2 focus-visible:ring-ring",onClick:w,children:l.jsx(yb,{className:"size-4","aria-hidden":"true"})})]}),l.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",className:"flex-1 border-0 bg-black/80 outline-hidden",onClick:w})]}),l.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",children:[l.jsxs("header",{className:`flex shrink-0 items-center gap-2 border-b border-border px-4 transition-[height] ${b?"h-12":"h-16"}`,children:[l.jsx("button",{ref:o,type:"button",className:"-ml-1 inline-flex size-7 items-center justify-center rounded-md border-0 bg-transparent text-foreground outline-hidden hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Toggle Sidebar","aria-expanded":n?r:a,onClick:()=>n?i(p=>!p):s(p=>!p),children:l.jsx(Lk,{className:"size-4","aria-hidden":"true"})}),l.jsx("span",{"aria-hidden":"true",className:"mr-2 h-4 w-px bg-border"}),l.jsx(QO,{page:e})]}),l.jsx("main",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden overflow-y-auto",children:t})]})]})}const km="m-0 text-2xl font-semibold tracking-tight",Cm="outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",Tm=`rounded-sm font-medium text-primary no-underline hover:underline ${Cm}`;function md({children:e}){return l.jsx("pre",{className:"m-0 overflow-x-auto rounded-md border border-border bg-muted px-3 py-2 font-mono text-sm text-foreground",children:l.jsx("code",{children:e})})}function FO({why:e}){return e.kind==="not_in_git"?l.jsxs("div",{className:"flex max-w-2xl flex-col gap-2",children:[l.jsx("p",{className:"m-0 text-sm",children:"This directory is not a Git repository. Start sdlc viewer inside one:"}),l.jsx(md,{children:"sdlc viewer"})]}):e.kind==="unlisted"?l.jsxs("div",{className:"flex max-w-2xl flex-col gap-2",children:[l.jsx("p",{className:"m-0 text-sm",children:`This repository, ${e.repository}, points to the folder ${e.folder}, but that folder no longer lists it.`}),l.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:"To rejoin, leave the folder here:"}),l.jsx(md,{children:"sdlc-agents folder leave"}),l.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:`then add it back from the folder's home repository, ${e.home}:`}),l.jsx(md,{children:`sdlc-agents folder add ${e.member_path} --name ${e.repository}`}),l.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:"To work in this repository alone, leaving is enough."})]}):l.jsxs("div",{className:"flex max-w-2xl flex-col gap-2",children:[l.jsx("p",{className:"m-0 text-sm",children:e.cause}),e.kind==="moved_member"&&l.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:"Move this repository back to where the folder records it."}),l.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:e.kind==="other"&&!e.fix?zf:DO})]})}const Jg=`inline-flex h-9 items-center justify-center whitespace-nowrap rounded-md border border-input bg-background px-3 font-[inherit] text-sm font-medium text-foreground transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 ${Cm}`;function WO(){return l.jsxs("div",{role:"status",className:"flex flex-col gap-2",children:[l.jsx("span",{className:"sr-only",children:"Loading projects"}),[0,1,2].map(e=>l.jsx("span",{"aria-hidden":"true",className:"block h-9 animate-pulse rounded-md bg-muted"},e))]})}function du(){const{href:e,Link:t}=jt(),{loading:n,projects:a,none:s,failure:r,readAt:i,refresh:o,reading:c}=va(),[d,f]=u.useState(""),h=l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("h1",{className:km,children:"Projects"}),!s&&l.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:OO})]});if(s)return l.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[h,l.jsx(FO,{why:s==="not_in_git"?{kind:"not_in_git"}:BO(s)})]});const m=r!=null&&r.shown?r:null,x=(a??[]).filter(w=>w.name.toLowerCase().includes(d.trim().toLowerCase()));return l.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[h,m&&l.jsxs("div",{role:"alert",className:"flex flex-col gap-2 rounded-lg border border-destructive/40 bg-destructive/10 p-4",children:[l.jsx("p",{className:"m-0 text-sm font-medium text-destructive",children:"The projects could not be refreshed"}),l.jsx("p",{className:"m-0 text-sm",children:LO(m.refusal,i)}),l.jsx("div",{children:l.jsx("button",{type:"button",className:Jg,onClick:o,disabled:c,children:"Retry"})})]}),(a||n)&&l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"search","aria-label":"Filter projects",placeholder:"Filter projects",value:d,onChange:w=>f(w.target.value),className:`h-9 w-full max-w-sm rounded-md border border-input bg-transparent px-3 font-[inherit] text-sm text-foreground placeholder:text-muted-foreground ${Cm}`}),!m&&l.jsx("button",{type:"button",className:`${Jg} ml-auto`,onClick:o,disabled:c||n,children:"Refresh"})]}),r&&!r.shown&&i&&l.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:`Showing the list read at ${yr(i)}; reading again in ${r.retryInSeconds??10} seconds.`})]}),n?l.jsx(WO,{}):a&&l.jsx("div",{className:"overflow-x-auto rounded-md border border-border",children:l.jsxs("table",{className:"w-full border-collapse text-sm",children:[l.jsx("thead",{className:"border-b border-border text-left text-muted-foreground",children:l.jsxs("tr",{children:[l.jsx("th",{scope:"col",className:"h-10 px-3 font-medium",children:"Name"}),l.jsx("th",{scope:"col",className:"h-10 px-3 font-medium",children:"Location"}),l.jsx("th",{scope:"col",className:"h-10 px-3",children:l.jsx("span",{className:"sr-only",children:"Where this viewer runs"})})]})}),l.jsxs("tbody",{children:[x.map(w=>l.jsxs("tr",{className:"border-b border-border last:border-0",children:[l.jsx("td",{className:"px-3 py-2",children:l.jsx(t,{href:e(`/proj/${encodeURIComponent(w.id)}`),className:Tm,children:w.name})}),l.jsx("td",{className:"px-3 py-2 font-mono text-muted-foreground",children:w.location??yc}),l.jsx("td",{className:"px-3 py-2 text-right",children:w.current&&l.jsx("span",{className:"inline-flex items-center rounded-md border border-border px-2 py-0.5 text-xs font-medium",children:"This repository"})})]},w.id)),x.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:3,className:"px-3 py-6 text-center text-muted-foreground",children:"No projects found."})})]})]})})]})}function g_({title:e,children:t}){const{href:n,Link:a}=jt();return l.jsx("div",{className:"p-6",children:l.jsxs("div",{className:"flex max-w-xl flex-col gap-2 rounded-xl border border-border bg-card p-6 text-card-foreground",children:[l.jsx("h1",{className:km,children:e}),l.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:t}),l.jsx("div",{children:l.jsx(a,{href:n("/"),className:`text-sm ${Tm}`,children:"Back to the organization's Home"})})]})})}const JO={tasks:"Tasks",issues:"Issues",releases:"Releases"};function Lf({project:e}){const{href:t,Link:n}=jt(),{org:a,projects:s,loading:r,domains:i}=va(),o=s==null?void 0:s.find(c=>c.id===e);return r?l.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:uu}):s?o?l.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("h1",{className:km,children:o.name}),l.jsx("p",{className:"m-0 font-mono text-sm text-muted-foreground",children:o.location??yc})]}),o.current?i.length>0?l.jsx("ul",{className:"m-0 flex list-none flex-col gap-1 p-0 text-sm",children:i.map(c=>l.jsx("li",{children:l.jsx(n,{href:t(c==="tasks"?`${a?`/org/${a.slug}`:""}/tasks`:`/proj/${encodeURIComponent(o.id)}/${c}`),className:Tm,children:JO[c]})},c))}):l.jsx("p",{className:"m-0 max-w-2xl text-sm text-muted-foreground",children:"Tasks, issues and Releases are read by the SoftwareDLC coordination engine, which this repository does not have."}):l.jsx("p",{className:"m-0 max-w-2xl text-sm text-muted-foreground",children:`This viewer reads ${o.name}'s tasks, issues and Releases only from its own checkout: open it with sdlc viewer there.`})]}):l.jsx(g_,{title:"Project not found",children:`There is no project '${e}' in this organization.`}):l.jsx(du,{})}const Em=e=>e instanceof Error?e.message:String(e);async function x_(){try{const e=await fetch("api/threads",{cache:"no-store"});return e.status===404?{none:!0}:e.ok?{data:await e.json()}:{error:await e.text()||`HTTP ${e.status}`}}catch(e){return{error:Em(e)}}}async function eD(){var e;try{const t=await fetch("api/release-links?threads",{cache:"no-store"});if(!t.ok)return null;const n=await t.json(),a=(e=n==null?void 0:n.panel)==null?void 0:e.threads;if(!a||typeof a!="object"||Array.isArray(a))return null;const s={};for(const[r,i]of Object.entries(a)){const o=(Array.isArray(i)?i:[]).filter(c=>!!c&&typeof c.planned_release=="string"&&typeof c.name=="string"&&typeof c.level=="string");o.length&&(s[r]=o)}return s}catch{return null}}async function tD(){try{return(await fetch("api/pin",{method:"HEAD",cache:"no-store"})).ok}catch{return!1}}async function nD(){try{const e=await fetch("api/sessions",{cache:"no-store"});if(!e.ok)return null;const t=await e.json();return!t||typeof t.idle_over!="number"||!Array.isArray(t.sessions)?null:{idle_over:t.idle_over,memory_mb:Number(t.memory_mb)||0,sessions:t.sessions}}catch{return null}}async function aD(){try{const e=await fetch("api/sessions-release",{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:"{}"});if(!e.ok)return{error:await e.text()||`HTTP ${e.status}`};const t=await e.json();return{done:{released:t.released??[],kept:t.kept??[]}}}catch(e){return{error:Em(e)}}}async function sD(e,t){try{const n=await fetch("api/pin",{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e,on:t})});return n.ok?null:await n.text()||`HTTP ${n.status}`}catch(n){return Em(n)}}const lD={probe:{source:async()=>{const e=await x_();if("error"in e)throw new Error(e.error);return{label:"Local workspace"}}}},v_={href:e=>e.replace(/^\/+/,"")||"./",Link:({href:e,className:t,children:n,...a})=>l.jsx("a",{href:e,className:t,...a,children:n})},rD={label:"Local viewer",can:()=>!1};function iD(){return u.useEffect(()=>{document.title="Shared app UI · SDLC Workspace Viewer"},[]),l.jsx("div",{className:"app-ui dark",children:l.jsx(ib,{data:lD,router:v_,identity:rD,children:l.jsx(OS,{})})})}const ex="This machine's worktrees of this repository.",oD="Merge sends one whose thread is at rest to the main queue.",cD=3e4,uD=3e3,dD=6e5,pd=[{id:"all",label:"All",empty:"worktree"},{id:"needs",label:"Needs landing",empty:"worktree needing landing"},{id:"orphan",label:"No thread to land it",empty:"worktree with no thread to land it"},{id:"queued",label:"In a queue",empty:"queued worktree"},{id:"landed",label:"Landed",empty:"landed worktree"},{id:"decide",label:"Yours to decide",empty:"worktree yours to decide"}],dr={not_landed:{label:"Not landed",tone:"neutral"},main:{label:"On main",tone:"success"},production:{label:"In production",tone:"success"},queued:{label:"Main queue",tone:"info"},needs_you:{label:"Needs you",tone:"warning"}},fD="no thread to land it",Rm="its thread waits on you",y_="its thread is done",b_="its thread is retired",Am=e=>e.archivable&&e.cleanup==="user",hD=e=>e.queue!==null||e.merge.offered===!1&&e.merge.why==="already in a promotion queue",mD=e=>!e.merge.offered&&(e.merge.why===y_||e.merge.why.startsWith(b_)),Mm=e=>!e.merge.offered&&e.merge.why===fD||mD(e),gd=(e,t)=>t==="all"?!0:t==="decide"?Am(e):(e.landed!==null?"landed":hD(e)?"queued":Mm(e)?"orphan":"needs")===t,pD=e=>e.landed!==null?e.threads.some(t=>t.phase!=="done"):e.threads.length>0&&!Mm(e);function Eo(e){return e>=1e9?`${(e/1e9).toFixed(1)} GB`:e>=1e6?`${Math.round(e/1e6)} MB`:`${Math.max(1,Math.round(e/1e3))} KB`}function j_(e){const t=e%100,n=t>=11&&t<=13?"th":{1:"st",2:"nd",3:"rd"}[e%10]??"th";return`${e}${n}`}function gD(e){if(e===null)return"No commits";if(e<1)return"Today";const t=Math.floor(e);return t===1?"1 day ago":`${t} days ago`}const xd=e=>pa(new Date(e*1e3).toISOString()),br=e=>e.charAt(0).toUpperCase()+e.slice(1);function xD(e,t){var s;const n=t.phase?br(t.phase):"No phase",a=e.merge;if(!a.offered&&a.why.startsWith(b_)){const r=(s=/; (.+) continues it$/.exec(a.why))==null?void 0:s[1];return r?`Retired · continued by ${r}`:"Retired"}return t.phase==="done"||!a.offered&&a.why===y_?e.landed===null?"Done · without landing this":"Done":a.offered?`${n} · at rest`:a.why.startsWith("its thread is at work")?`${n} · at work`:a.why===Rm?`${n} · waits on you`:a.why.startsWith("its session is not running")?`${n} · session not running`:n}function vD(){const e=Us().worktrees;if(!e)throw new Error("The Worktrees page rendered without the worktrees seam.");return e}function yD({org:e}){var L,P;const t=vD(),[n,a]=u.useState(null),[s,r]=u.useState(null),[i,o]=u.useState(null),[c,d]=u.useState(!1),[f,h]=u.useState("all"),[m,x]=u.useState(""),[w,v]=u.useState({}),b=u.useRef({}),{confirm:g,confirm_dialog:p}=ji(),y=u.useRef(!1),j=u.useCallback(async()=>{if(y.current)return;y.current=!0;const D=await t.list();y.current=!1,D.ok?(a(D.data),r(null)):r(D.refusal)},[t]),_=u.useCallback(async()=>{const D=await t.sizes();d(!D.ok),D.ok&&o(D.data)},[t]);u.useEffect(()=>{j(),_()},[j,_]);const k=(n==null?void 0:n.rows.some(D=>{var V,ne;return((V=D.write)==null?void 0:V.state)==="waiting"||((ne=D.write)==null?void 0:ne.state)==="running"}))??!1;Af(()=>void j(),k?uD:cD),Af(()=>void _(),dD);const N=(n==null?void 0:n.rows)??[],S=D=>i==null?void 0:i.sizes[D.path],R=N.filter(Am),A=i?R.reduce((D,V)=>D+(S(V)??0),0):null,z=N.length===0?ex:`${ex} ${oD}${R.length?` ${R.length} ${R.length===1?"is":"are"} yours to decide${A!==null?`: removing them frees about ${Eo(A)}`:""}.`:""}`,q=m.trim().toLowerCase(),O=D=>!q||[D.name,D.path,D.branch??"",...D.threads.map(V=>V.title??V.thread)].some(V=>V.toLowerCase().includes(q)),$=N.filter(D=>gd(D,f)&&O(D)).sort((D,V)=>{if(f==="decide")return(S(V)??0)-(S(D)??0);const ne=Y=>pD(Y)?Y.merge.offered?0:1:2;return ne(D)-ne(V)||(D.idle_days??1/0)-(V.idle_days??1/0)}),G=async(D,V)=>{const ne=await(D==="merge"?t.merge(V.path):t.remove(V.path));ne.ok?v(({[V.path]:Y,...ve})=>ve):v(Y=>({...Y,[V.path]:ne.refusal.message})),await j()},E=async D=>{if(!D.merge.offered)return;const V=D.threads.find(W=>W.thread===(D.merge.offered&&D.merge.thread)),ne=(V==null?void 0:V.title)??D.merge.thread,Y=V!=null&&V.holds.length?`has ${V.holds.length} open hold(s) (${V.holds.join(", ")})`:"has no open holds",ve=D.merge.lands.by==="manager"?`on its turn the queue's merge manager, ${D.merge.lands.manager}, lands it on main`:"on its turn that thread lands it on main",ee=D.merge.caveat?`
|
|
336
|
+
|
|
337
|
+
Its session could not be read: ${D.merge.caveat}. A turn it does not start passes on.`:"";await g({title:`Send ${D.name} to the main queue`,description:`This joins the main promotion queue for its thread, ${ne}, which ${Y} and is told of the join. The queue checks the branch first, and ${ve}. Nothing reaches main before then.${ee}`,action_label:"Join the main queue"})&&await G("merge",D)},B=async D=>{const V=S(D);await g({title:`Remove ${D.name}?`,description:`This deletes the folder ${D.path}${V!==void 0?` and frees about ${Eo(V)}`:""}.${D.branch?` Its branch ${D.branch} stays, so its work can be checked out again,`:""} and its task records are saved first; a landed plan workspace in it is closed. It stays with you because ${D.cleanup_why[0]??"the Local systems manager leaves it to you"}. The worktree is checked again just before, and nothing is deleted if that check finds work in it.`,action_label:"Remove worktree",destructive:!0})&&(V!==void 0&&(b.current[D.path]=V),await G("remove",D))},C=async D=>{await t.dismiss(D),await j()};return l.jsxs("div",{className:"flex h-full min-h-0 flex-1 flex-col overflow-auto px-4 py-4 sm:px-6 lg:px-8",children:[l.jsx(ls,{title:"Worktrees",description:z}),!n&&!s&&l.jsx(bD,{}),s?l.jsx(jD,{refusal:s,read_at:n==null?void 0:n.read_at,on_retry:()=>void j()}):null,n!=null&&n.stale?l.jsxs(ge,{variant:"destructive",className:"mt-4",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Could not read worktrees"}),l.jsxs(pe,{children:[l.jsxs("p",{children:[n.stale.message," This list was read at ",pa(new Date(n.read_at).toISOString()),"."]}),l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>void j(),children:"Retry"})]})]}):null,n==null?void 0:n.removals.map(D=>l.jsxs(ge,{variant:"success",className:"mt-4",role:"status",children:[l.jsx(je,{children:b.current[D.path]!==void 0?`Removed ${D.name} and freed ${Eo(b.current[D.path])}`:`Removed ${D.name}`}),l.jsxs(pe,{children:[l.jsx("p",{children:D.branch?`Its branch ${D.branch} stays, and its records were saved.`:"Its records were saved."}),l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>void C({removal:D.path}),children:"Dismiss"})]})]},D.path)),n&&N.length===0?l.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[l.jsx(fb,{className:"text-muted-foreground size-8","aria-hidden":"true"}),l.jsx("h2",{className:"text-lg font-semibold",children:"Only the main checkout"}),l.jsx("p",{className:"text-muted-foreground text-sm",children:"No other worktrees. Agents make theirs in .sdlc-worktrees beside the main checkout."})]}):n?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[l.jsx(_n,{type:"search",className:"w-64","aria-label":"Search worktrees",placeholder:"Search worktrees",value:m,onChange:D=>x(D.target.value)}),l.jsxs("p",{className:"text-muted-foreground ml-auto text-xs",children:["Read at ",pa(new Date(n.read_at).toISOString())," · rereads every 30 s"]})]}),l.jsx("div",{className:"mt-3 flex flex-wrap gap-2",role:"group","aria-label":"Worktree state",children:pd.map(D=>l.jsxs(I,{type:"button",variant:"outline",size:"sm",className:Co,"aria-pressed":f===D.id,onClick:()=>h(D.id),children:[D.label," ",N.filter(V=>gd(V,D.id)).length]},D.id))}),$.length===0?l.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[l.jsx(vb,{className:"text-muted-foreground size-8","aria-hidden":"true"}),l.jsx("h2",{className:"text-lg font-semibold",children:"No worktrees match"}),q?l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"text-muted-foreground text-sm",children:["No ",(L=pd.find(D=>D.id===f))==null?void 0:L.empty," matches “",m,"”. Clear the search to see all"," ",N.filter(D=>gd(D,f)).length,"."]}),l.jsx(I,{type:"button",variant:"outline",onClick:()=>x(""),children:"Clear search"})]}):l.jsxs("p",{className:"text-muted-foreground text-sm",children:["No ",(P=pd.find(D=>D.id===f))==null?void 0:P.empty," right now."]})]}):l.jsx(Et,{className:"mt-4 shrink-0 overflow-x-auto",children:l.jsxs(kt,{containerAriaLabel:"Worktrees",className:"table-fixed",children:[l.jsx(Ot,{children:l.jsxs(Ne,{children:[l.jsx(te,{className:"w-[24%]",children:"Worktree"}),l.jsx(te,{className:"w-[24%]",children:"Threads"}),l.jsx(te,{className:"w-[12%]",children:"Landed"}),l.jsx(te,{className:"w-[18%]",children:"Cleanup"}),l.jsx(te,{className:"hidden w-[10%] md:table-cell",children:"Last commit"}),l.jsx(te,{className:"w-[12%] text-right",children:"Actions"})]})}),l.jsx(Ct,{children:$.map(D=>l.jsx(wD,{org:e,row:D,size:S(D),sizes:i!==null?"read":c?"failed":"measuring",can_write:n.can_write,sent:w[D.path],on_merge:()=>void E(D),on_remove:()=>void B(D),on_dismiss:V=>void C(V),on_clear_sent:()=>v(({[D.path]:V,...ne})=>ne)},D.path))})]})})]}):null,p]})}function bD(){return l.jsx("div",{className:"mt-6 grid gap-2",role:"status","aria-label":"Loading worktrees",children:Array.from({length:6},(e,t)=>l.jsx(Jt,{className:t===5?"h-10 w-2/3":"h-10 w-full"},t))})}function jD({refusal:e,read_at:t,on_retry:n}){return e.reason==="engine_missing"?l.jsxs(ge,{variant:"info",className:"mt-6",children:[l.jsx(fa,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Worktrees needs a SoftwareDLC checkout"}),l.jsx(pe,{children:"sdlc viewer reads worktrees with the view code of a SoftwareDLC checkout, and this repository has none. Set SDLC_VIEW_ROOT to one, then restart sdlc viewer."})]}):e.reason==="view_outdated"?l.jsxs(ge,{variant:"warning",className:"mt-6",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"The main checkout's view code is too old for Worktrees"}),l.jsx(pe,{children:"Update the main checkout, then restart sdlc viewer."})]}):l.jsxs(ge,{variant:"destructive",className:"mt-6",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Could not read worktrees"}),l.jsxs(pe,{children:[l.jsxs("p",{children:[e.message,t?` This list was read at ${pa(new Date(t).toISOString())}.`:""]}),l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:n,children:"Retry"})]})]})}function uo({children:e,muted:t=!0}){return l.jsx("div",{className:F("truncate text-xs",t&&"text-muted-foreground"),title:e,children:e})}function wD({org:e,row:t,size:n,sizes:a,can_write:s,sent:r,on_merge:i,on_remove:o,on_dismiss:c,on_clear_sent:d}){const{href:f,Link:h}=jt(),m=e?`/org/${encodeURIComponent(e)}`:"",x=f(`${m}/threads`),w=f(`${m}/tasks`),v=dr[t.landed??"not_landed"],b=Am(t),g=t.write,p=(g==null?void 0:g.state)==="waiting"||(g==null?void 0:g.state)==="running",y=t.threads.find(z=>"thread"in t.merge&&z.thread===t.merge.thread)??t.threads[0],j=t.merge,_=!j.offered&&j.why===Rm,k=s&&t.landed===null&&!t.queue&&!_&&!Mm(t),N=n!==void 0?Eo(n):a==="measuring"?"Measuring size…":a==="failed"?"Size could not be read":null,S=b?{label:"Yours to decide",muted:!1,second:[N,t.cleanup_why[0]]}:t.archivable?{label:"The manager removes it",muted:!1,second:[N]}:{label:"Stays",muted:!0,second:[N,t.why[0]??null]},R=S.second.filter(Boolean).join(" · "),A=t.path.slice(0,t.path.length-t.name.length-1)||".";return l.jsxs(l.Fragment,{children:[l.jsxs(Ne,{"data-testid":"worktrees-row",children:[l.jsxs(K,{children:[l.jsx("div",{className:"truncate font-medium",title:t.name,children:t.name}),l.jsx(uo,{children:t.branch??"Detached"}),A!==".sdlc-worktrees"?l.jsx(uo,{children:`in ${A}`}):null]}),l.jsx(K,{children:y?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"truncate",title:y.title??y.thread,children:y.title??y.thread}),l.jsx(uo,{children:`${xD(t,y)}${t.threads.length>1?` · ${t.threads.length-1} more`:""}`})]}):l.jsx("span",{className:"text-muted-foreground",children:"No thread"})}),l.jsx(K,{children:l.jsx(Fe,{variant:v.tone,children:v.label})}),l.jsxs(K,{children:[l.jsx("div",{className:F("truncate",S.muted&&"text-muted-foreground"),children:S.label}),R?l.jsx("div",{className:"hidden md:block",children:l.jsx(uo,{children:R})}):null]}),l.jsx(K,{className:"hidden md:table-cell",children:gD(t.idle_days)}),l.jsx(K,{className:"text-right",children:l.jsxs("div",{className:"flex justify-end gap-2",children:[p?l.jsx(I,{type:"button",variant:"outline",size:"sm",loading:!0,disabled:!0,children:(g==null?void 0:g.kind)==="merge"?g.state==="waiting"?"Waiting to join…":"Joining main…":(g==null?void 0:g.state)==="waiting"?"Waiting to remove…":"Removing…"}):t.queue?l.jsx(Fe,{variant:dr.queued.tone,children:`${dr.queued.label} · ${j_(t.queue.position)}`}):_?l.jsx(h,{href:w,"aria-label":`${t.name}: its thread waits on you, in Waiting on you`,children:l.jsx(Fe,{variant:dr.needs_you.tone,children:dr.needs_you.label})}):k?l.jsx(I,{type:"button",variant:"outline",size:"sm",title:j.offered?void 0:j.why,"aria-disabled":!j.offered||void 0,className:F(!j.offered&&"cursor-not-allowed opacity-50"),"aria-label":`Send ${t.name} to the main queue`,"aria-describedby":j.offered?void 0:`why-${t.name}`,onClick:j.offered?i:void 0,children:"Merge"}):null,b&&s&&!p?l.jsx(I,{type:"button",variant:"outline",size:"sm","aria-label":`Remove ${t.name}`,onClick:o,children:"Remove"}):null]})})]}),l.jsx(_D,{row:t,threads:x,tasks:w,merge_shown:k,sent:r,on_dismiss:c,on_clear_sent:d})]})}function _D({row:e,threads:t,tasks:n,merge_shown:a,sent:s,on_dismiss:r,on_clear_sent:i}){var w,v,b,g;const{Link:o}=jt(),c=(p="Open in Threads")=>l.jsx(o,{className:"text-primary text-sm hover:underline",href:t,children:p}),d=p=>l.jsx(I,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:p,children:"Dismiss"}),f=e.write,h=e.threads.find(p=>p.thread===("thread"in e.merge?e.merge.thread:void 0))??e.threads[0],m=(h==null?void 0:h.title)??"Its thread";let x=null;if(s)x=l.jsxs(ge,{variant:"destructive",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"It was not sent"}),l.jsxs(pe,{children:[l.jsx("p",{children:s}),d(i)]})]});else if((f==null?void 0:f.state)==="waiting")x=l.jsxs("p",{className:"text-muted-foreground text-sm",role:"status",children:["Another worktree's write runs first; ",e.name," ",f.kind==="merge"?"joins":"is removed"," next."]});else if((f==null?void 0:f.state)==="running")x=l.jsx("p",{className:"text-muted-foreground text-sm",role:"status",children:f.kind==="merge"?`Joining the main queue for ${e.name}. The queue checks its branch first; this can take a few minutes.`:`Removing ${e.name}. It is checked again first.`});else if((f==null?void 0:f.state)==="joined"){const p=((w=f.lands)==null?void 0:w.by)==="manager"?`the merge manager, ${f.lands.manager}, lands it`:"it lands it on its turn";x=l.jsxs(ge,{variant:f.told?"success":"warning",role:"status",children:[l.jsx(je,{children:`${e.name} joined the main queue, ${j_(f.position)}`}),l.jsxs(pe,{children:[l.jsx("p",{children:f.told?`${m} was left a notice, and ${p}.`:"Its thread could not be told, so it does not know its turn is coming. Tell it from Threads; the join itself is unchanged."}),((v=e.queue)==null?void 0:v.position)===1&&e.queue.turn==="next"&&e.queue.passes_at?l.jsx("p",{children:`It is first in the main queue. Its thread was left a notice but not woken: continue it in its session, or the turn passes on at ${xd(e.queue.passes_at)}.`}):null,l.jsxs("div",{className:"flex items-center gap-3",children:[d(()=>r({write:e.path})),!f.told||((b=e.queue)==null?void 0:b.position)===1?l.jsx("span",{className:"mt-2",children:c()}):null]})]})]})}else if(f&&(f.state==="refused"||f.state==="failed")){const p=f.kind==="merge"?`The main queue refused ${e.name}`:`${e.name} was not removed`;x=l.jsxs(ge,{variant:"destructive",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:f.kind==="merge"&&f.state==="failed"?`${e.name} did not join`:p}),l.jsxs(pe,{children:[l.jsx("p",{children:`${br(f.message)}${f.kind==="merge"?" Nothing was queued.":" Nothing was deleted."}`}),l.jsxs("div",{className:"flex items-center gap-3",children:[d(()=>r({write:e.path})),f.kind==="merge"?l.jsx("span",{className:"mt-2",children:c()}):null]})]})]})}else if(e.last_turn){const p=e.last_turn;x=l.jsxs(ge,{variant:"warning",children:[l.jsx(st,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:`${e.name}'s turn ${p.outcome==="failed"?"failed":"passed on"} at ${xd(p.left_at)}`}),l.jsxs(pe,{children:[l.jsx("p",{children:`${br(p.reason)}. Continue the thread in its session; Merge sends it again once it is at rest.`}),l.jsxs("div",{className:"flex items-center gap-3",children:[d(()=>r({turn:{execution:p.execution,left_at:p.left_at}})),l.jsx("span",{className:"mt-2",children:c()})]})]})]})}else((g=e.queue)==null?void 0:g.position)===1&&e.queue.turn==="next"&&e.queue.passes_at?x=l.jsxs("p",{className:"text-sm",role:"status",children:[`Its turn now: ${e.name} is first in the main queue. Continue its thread in its session, or the turn passes on at ${xd(e.queue.passes_at)}. `,c()]}):!e.merge.offered&&e.merge.why===Rm?x=l.jsxs("p",{className:"text-sm",id:`why-${e.name}`,children:["Its thread waits on you. Merge comes back once you answer it. ",l.jsx(o,{className:"text-primary hover:underline",href:n,children:"In Waiting on you"})]}):!e.merge.offered&&e.merge.successor&&!e.queue&&e.landed===null?x=l.jsx("p",{className:"text-sm",children:c("Open its successor in Threads")}):a&&!e.merge.offered?x=l.jsxs("p",{className:"text-sm",id:`why-${e.name}`,children:[`${br(e.merge.why)}. `,e.merge.thread&&!e.merge.why.startsWith("its thread is at work")?c():null]}):e.merge.offered&&e.merge.caveat&&(x=l.jsx("p",{className:"text-muted-foreground text-sm",children:`${br(e.merge.caveat)}.`}));return x?l.jsx(Ne,{className:"hover:bg-transparent",children:l.jsx(K,{colSpan:6,className:"pt-0",children:x})}):null}const ND=["reason","since","store","repository","folder","home","member_path"];function w_(e,t){const n={status:e,message:typeof(t==null?void 0:t.error)=="string"?t.error:"The read failed; see the sdlc viewer terminal."};(t==null?void 0:t.retry)===!0&&(n.retry=!0),typeof(t==null?void 0:t.retry_after)=="number"&&(n.retry_after=t.retry_after);for(const a of ND){const s=t==null?void 0:t[a];typeof s=="string"&&(n[a]=s)}return n}function Di({base:e="",fetcher:t=fetch}){return async(n,a={})=>{const s=new URLSearchParams;for(const[c,d]of Object.entries(a))d!==void 0&&s.set(c,String(d));const r=s.size>0?`?${s.toString()}`:"";let i;try{i=await t(`${e}api/app/${n}${r}`,{cache:"no-store"})}catch{return{ok:!1,refusal:{status:0,message:"The viewer did not answer. Is sdlc viewer still running?"}}}const o=await i.json().catch(()=>null);return i.ok?{ok:!0,data:o}:{ok:!1,refusal:w_(i.status,o)}}}function SD(e={}){const t=Di(e),n=s=>async()=>{const r=await t("access");return r.ok?{ok:!0,data:r.data[s]}:r},a=encodeURIComponent;return{tasks:{access:n("tasks"),configuration:()=>t("tasks/configuration"),listTasks:s=>t(`tasks/lists/${a(s)}/tasks`),task:s=>t(`tasks/tasks/${a(s)}`)},issues:{access:n("issues"),list:(s={})=>t("issues",s),issue:s=>t(`issues/${a(s)}`)},releases:{access:n("releases"),list:()=>t("releases"),release:s=>t(`releases/${a(s)}`),candidate:()=>t("releases/candidate")},organizations:{access:n("organizations"),list:()=>t("orgs")},projects:{access:n("projects"),list:()=>t("projects")},about:{about:()=>t("about")}}}function kD(e={}){const t=Di(e);return{listQueues:()=>t("queues"),queue:n=>t(`queues/${encodeURIComponent(n)}`),members:async()=>({ok:!0,data:[]}),refresh_ms:15e3,settings_note:"Local queue settings are the engine's built-in policies. Turns change through promote.",thread_subjects:!0,description:"Where this checkout's threads take turns: landing on main, deploying to staging, publishing and accepting the graph.",read_scope:"this checkout only",subject_label:"Thread"}}const jr=e=>({ok:!1,refusal:{status:0,message:e}});function __({base:e="",fetcher:t=fetch}){return async(n,a)=>{let s;try{s=await t(`${e}api/${n}`,{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}catch{return jr("The viewer did not answer. Is sdlc viewer still running?")}const r=await s.json().catch(()=>null);return s.ok?{ok:!0,data:r}:{ok:!1,refusal:w_(s.status,r)}}}function CD(e={}){const t=Di(e),n=__(e);return{chart:()=>t("org"),change:a=>n("org-change",a)}}function TD(e={}){const t=Di(e),n=o=>`tasks/tasks/${encodeURIComponent(o)}`,{base:a="",fetcher:s=fetch}=e;return{access:async()=>{const o=await t("access");return o.ok?{ok:!0,data:o.data.tasks}:o},availability:async()=>{const o=await t("tasks/configuration");if(!o.ok)return o.refusal.reason==="engine_missing"?{state:"off",refusal:o.refusal}:{state:"error",refusal:o.refusal};const c=o.data;if(c.state!=="active")return{state:"available"};const d=c.workspaces.find(h=>h.is_default)??c.workspaces[0],f=d==null?void 0:d.lists[0];return!d||!f?{state:"error"}:{state:"active",configuration:c,workspace:d,list:f}},listTasks:(o,c={})=>c.state==="archived"?Promise.resolve(jr("This checkout keeps no archived tasks.")):c.assigned_to_me?Promise.resolve(jr("Assigned to you is a status group here.")):t(`tasks/lists/${encodeURIComponent(o)}/tasks`,{search:c.search,owner:c.owner===""?"none":c.owner,group:c.group,urgent:c.urgent?"true":void 0,over_estimate:c.over_estimate?"true":void 0}),members:()=>t("tasks/members"),waitingOnYou:()=>t("tasks/waiting-on-you"),task:o=>t(n(o)),taskSections:o=>t(`${n(o)}/sections`),taskRelated:o=>t(`${n(o)}/related`),hierarchyRevision:async()=>({ok:!0,data:0}),commands:{run:async()=>jr("The local viewer changes tasks only with Done."),complete:async o=>{const c="task"in o?{task:o.task}:{hold:o.hold};let d;try{d=await s(`${a}api/task-done`,{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})}catch{return jr("The viewer did not answer. Is sdlc viewer still running?")}if(d.ok)return{ok:!0,data:null};const f=await d.text().catch(()=>"");return{ok:!1,refusal:{status:d.status,message:f||`It was not recorded (HTTP ${d.status}).`}}}}}}function ED(e={}){const t=Di(e),n=__(e);return{list:()=>t("worktrees"),sizes:()=>t("worktree-sizes"),merge:a=>n("worktree-merge",{path:a}),remove:a=>n("worktree-remove",{path:a}),dismiss:a=>n("worktree-dismiss",a)}}const RD=15e3,AD=10,tx="idle-sessions-list",nx="idle-sessions-heading",ax="idle-sessions-confirm-text";function N_(e){return e>=1024?`${(e/1024).toFixed(1)} GB`:`${Math.round(e)} MB`}const MD=e=>`${Number.isInteger(e)?e:e.toFixed(1)} h`,S_=e=>e===1?"1 session":`${e} sessions`;function OD(e){const t=e.released.length?`Closed ${S_(e.released.length)}.`:"Closed no sessions.";return e.kept.length?`${t} Kept ${e.kept.length}:`:t}function DD({row:e}){const t=[e.name,e.retired?"continued in another session":"",`idle ${MD(e.idle_hours)}`,N_(e.memory_mb)].filter(Boolean).join(" · ");return l.jsxs("li",{children:[l.jsx("p",{className:"idle-name",children:e.title}),l.jsxs("p",{className:"caption",children:[l.jsxs("span",{className:"muted",children:[t,e.unfinished&&" ·"]}),e.unfinished&&l.jsx("span",{className:"idle-unfinished",children:" unfinished work"})]})]})}function zD(){const[e,t]=u.useState(null),[n,a]=u.useState(!1),[s,r]=u.useState(!1),[i,o]=u.useState(null),[c,d]=u.useState(null),[f,h]=u.useState(""),m=u.useRef(""),x=u.useRef(null),w=u.useRef(null),v=u.useRef(null),b=u.useRef(null),g=u.useRef(0),p=u.useRef(0),y=u.useCallback(async()=>{const O=++g.current,$=await nD();if(!$||O<p.current)return;p.current=O,h("");const G=JSON.stringify($);G!==m.current&&(m.current=G,t($))},[]);u.useEffect(()=>{const O=setTimeout(y,0),$=setInterval(y,RD);return()=>{clearTimeout(O),clearInterval($)}},[y]),u.useEffect(()=>{var $;const O=b.current;O&&(b.current=null,($={cancel:w,close:x,dismiss:v}[O].current)==null||$.focus())});const j=(e==null?void 0:e.sessions.length)??0;if(u.useEffect(()=>{s&&!j&&i===null&&r(!1)},[s,j,i]),!j&&!c&&!f&&i===null)return null;const _=()=>{i===null&&(r(!0),b.current="cancel")},k=()=>{i===null&&(r(!1),b.current="close")},N=async()=>{if(i!==null)return;o(j),d(null),h("");const O=await aD();p.current=g.current+1,await y(),o(null),r(!1),a(!1),"error"in O?(h(`The sessions were not closed: ${O.error.replace(/\.+$/,"")}.`),b.current="close"):(d(O.done),b.current="dismiss")},S=()=>{d(null),b.current="close"},R=O=>{O.key==="Escape"&&(O.preventDefault(),k())},A=i!==null?`Closing ${S_(i)}…`:c?OD(c):"",z=(e==null?void 0:e.sessions.slice(0,AD))??[],q=j-z.length;return l.jsxs("div",{className:"idle",role:"group",...j?{"aria-labelledby":nx}:{"aria-label":"Idle sessions"},children:[f&&l.jsx("div",{className:"alert",role:"alert",children:f}),j>0&&e&&l.jsxs("div",{className:"idle-head",children:[l.jsxs("div",{className:"idle-title",children:[l.jsxs("h2",{className:"group",id:nx,"aria-label":`Idle sessions, ${j}`,children:["Idle sessions",l.jsx("span",{className:"count",children:j})]}),l.jsxs("p",{className:"caption muted",children:["over ",e.idle_over," h · ",N_(e.memory_mb)]})]}),l.jsxs("div",{className:"tools",children:[l.jsx("button",{type:"button",className:"pin","aria-expanded":n,"aria-controls":tx,"aria-label":n?"Hide the idle sessions list":"Show the idle sessions list",onClick:()=>a(O=>!O),children:n?"Hide":"Show"}),l.jsx("button",{type:"button",className:"pin",ref:x,"aria-expanded":s,"aria-label":"Close idle sessions…",onClick:_,children:"Close idle…"})]})]}),j>0&&l.jsxs("ul",{className:"idle-list",id:tx,hidden:!n,"aria-label":`Sessions idle over ${e==null?void 0:e.idle_over} hours, longest idle first`,children:[z.map(O=>l.jsx(DD,{row:O},O.session)),q>0&&l.jsx("li",{children:l.jsxs("p",{className:"caption muted",children:["…and ",q," more"]})})]}),s&&j>0&&l.jsxs("div",{className:"idle-confirm",role:"group","aria-label":"Close idle sessions","aria-describedby":ax,onKeyDown:R,children:[l.jsxs("p",{id:ax,children:[j===1?"Close this session?":`Close these ${j} sessions?`," Each transcript stays, so reopening a conversation resumes it, and a thread with unfinished work goes on with Continue on its card. A session that is busy or has background work running is kept."]}),l.jsxs("div",{className:"tools start",children:[l.jsx("button",{type:"button",className:"pin","aria-disabled":i!==null?!0:void 0,"aria-busy":i!==null?!0:void 0,onClick:N,children:i!==null?`Closing ${i}…`:`Close ${j}`}),l.jsx("button",{type:"button",className:"pin",ref:w,"aria-disabled":i!==null?!0:void 0,onClick:k,children:"Cancel"})]})]}),l.jsx("p",{className:"idle-status",role:"status",children:A}),c&&l.jsxs(l.Fragment,{children:[c.kept.length>0&&l.jsx("ul",{className:"idle-list","aria-label":"Kept sessions",children:c.kept.map(O=>l.jsxs("li",{children:[l.jsx("p",{className:"idle-name",children:O.title}),l.jsx("p",{className:"caption muted",children:O.why})]},O.session))}),l.jsx("div",{className:"tools start",children:l.jsx("button",{type:"button",className:"pin",ref:v,"aria-label":"Dismiss the close result",onClick:S,children:"Dismiss"})})]})]})}const sx={ok:"lime",you:"amber",alert:"red",waiting:"blue",blocked:"purple",muted:"grey",plain:"grey"};function Uf(e){return e&&Object.hasOwn(sx,e)?sx[e]:"grey"}const $D=1e4,LD=6e4,UD=2,lx="#thread-",HD="The threads view needs a SoftwareDLC checkout (tools/vscode-threads); this repository has none.",BD={working:"▶",prod:"↑",planned:"○"};function rx({label:e,count:t,hint:n}){const a=n?`hint-${e.toLowerCase().replace(/\W+/g,"-")}`:void 0;return l.jsxs(l.Fragment,{children:[l.jsxs("h2",{className:"group","aria-label":`${e}, ${t}`,"aria-describedby":a,children:[e,l.jsx("span",{className:"count",children:t})]}),n&&l.jsx("span",{className:"sr-only",id:a,children:n})]})}function vd({text:e,role:t}){return l.jsx("span",{className:`badge tone-${Uf(t)}`,children:e})}function qD({serves:e}){const t=e.slice(0,UD),n=e.length-t.length;return l.jsxs("p",{className:"caption muted serves",children:[t.map((a,s)=>l.jsxs("span",{children:[s>0&&", ",l.jsxs("a",{href:`classic/#planned=${encodeURIComponent(a.planned_release)}`,"aria-label":`serves ${a.name}, ${a.level}: open it in Planned releases`,title:"Opens in the classic view",children:["serves ",a.name," (",a.level,")"]})]},a.planned_release)),n>0&&l.jsxs(l.Fragment,{children:[l.jsxs("span",{"aria-hidden":"true",children:[", +",n," more"]}),l.jsxs("span",{className:"sr-only",children:[", and ",n," more planned releases"]})]})]})}function GD({onConnection:e}){const[t,n]=u.useState(null),[a,s]=u.useState(!1),[r,i]=u.useState(""),[o,c]=u.useState(!1),[d,f]=u.useState(null),[h,m]=u.useState(""),[x,w]=u.useState(null),v=u.useRef(""),b=u.useRef(""),g=u.useRef(null),p=u.useRef(null),y=u.useRef(null),j=z=>{var q;return z instanceof HTMLButtonElement&&z.classList.contains("pin")&&((q=g.current)!=null&&q.contains(z))?z.dataset.key??null:null},_=z=>{y.current=j(z.target)},k=()=>{setTimeout(()=>{j(document.activeElement)||(y.current=null)},0)},N=u.useCallback(async()=>{const z=await x_();if("none"in z){s(!0),i(""),e("live");return}if("error"in z){i(z.error),e("disconnected");return}s(!1),i(""),m(""),e("live");const q=JSON.stringify(z.data);q!==v.current&&(v.current=q,n(z.data))},[e]);u.useEffect(()=>{let z=!0;tD().then($=>z&&c($));const q=setTimeout(N,0),O=setInterval(N,$D);return()=>{z=!1,clearTimeout(q),clearInterval(O)}},[N]),u.useEffect(()=>{let z=!0;const q=()=>eD().then($=>{z&&$&&w(G=>JSON.stringify(G)===JSON.stringify($)?G:$)});q();const O=setInterval(q,LD);return()=>{z=!1,clearInterval(O)}},[]),u.useEffect(()=>{const z=()=>{var G,E,B;const q=window.location.hash;if(!q.startsWith(lx)||q===b.current)return;let O;try{O=decodeURIComponent(q.slice(lx.length))}catch{return}const $=document.getElementById(`thread-${O}`);!$||!((G=g.current)!=null&&G.contains($))||(b.current=q,(E=$.querySelector(".thread-title"))==null||E.focus({preventScroll:!0}),(B=$.scrollIntoView)==null||B.call($,{block:"center"}))};return z(),window.addEventListener("hashchange",z),()=>window.removeEventListener("hashchange",z)},[t]),u.useLayoutEffect(()=>{const z=y.current??p.current;if(!z||!g.current)return;const q=document.activeElement;if(q&&q!==document.body&&!g.current.contains(q)){y.current=null;return}const O=[...g.current.querySelectorAll("button.pin")].find($=>$.dataset.key===z);O?q!==O&&O.focus({preventScroll:z!==p.current}):y.current=null});const S=async z=>{if(d)return;const q=!z.pinned;p.current=z.key,f(z.key);const O=await sD(z.key,q);f(null),O||n($=>$&&{...$,threads:$.threads.map(G=>G.key===z.key?{...G,pinned:q}:G)}),await N(),m(O?`The pin was not saved: ${O}`:""),p.current===z.key&&(p.current=null)},R=(t==null?void 0:t.pinnedCount)??0,A=(t==null?void 0:t.threads)??[];return l.jsxs(l.Fragment,{children:[l.jsxs("header",{className:"main-head",children:[l.jsx("h1",{children:"Threads"}),t&&!a&&l.jsx("p",{className:"muted",children:t.line})]}),l.jsxs("section",{className:"card threads","aria-label":"Threads",children:[l.jsx(zD,{}),r&&l.jsxs("div",{className:"alert",role:"alert",children:["Threads unavailable: ",r.replace(/\.+$/,""),". Retrying every 10 s."]}),h&&l.jsx("div",{className:"alert",role:"alert",children:h}),a?l.jsx("p",{className:"muted",children:HD}):l.jsxs("div",{className:"thread-list",ref:g,onFocus:_,onBlur:k,children:[A.map((z,q)=>l.jsxs("div",{children:[R>0&&q===0&&l.jsx(rx,{label:"Pinned",count:R,hint:"Threads you pinned; they stay first in every order"}),R>0&&q===R&&l.jsx(rx,{label:"Other threads",count:A.length-R}),l.jsx(VD,{row:x!=null&&x[z.key]?{...z,serves:x[z.key]}:z,pinnable:o&&typeof z.pinned=="boolean",pinning:d,onPin:()=>S(z)})]},z.key)),t&&!A.length&&l.jsx("p",{className:"muted empty",children:"No threads at work or waiting."}),t&&t.hidden>0&&l.jsxs("p",{className:"caption muted",children:[t.hidden," older thread(s) not shown; sdlc view --all lists them."]})]})]})]})}function VD({row:e,pinnable:t,pinning:n,onPin:a}){const s=[e.agent,e.phase,e.age,e.waitsOn?`waits on ${e.waitsOn}`:""].filter(Boolean).join(" · ");return l.jsxs("article",{className:"thread",id:`thread-${e.key}`,style:{marginLeft:Math.min(e.depth*22,110)},children:[l.jsxs("div",{className:"thread-head",children:[l.jsx("p",{className:"thread-title",tabIndex:-1,children:e.title}),l.jsxs("div",{className:"tools",children:[e.carried?l.jsxs(l.Fragment,{children:[l.jsx(vd,{text:e.carried,role:"waiting"}),e.carriedBatch&&l.jsx(vd,{text:e.carriedBatch.text,role:e.carriedBatch.role})]}):l.jsx(vd,{text:e.status,role:e.role}),t&&l.jsx("button",{type:"button",className:e.pinned?"pin on":"pin","data-key":e.key,"aria-label":e.pinned?`Unpin ${e.title}`:`Pin ${e.title} to the top`,"aria-disabled":n?!0:void 0,"aria-busy":n===e.key?!0:void 0,onClick:()=>{n||a()},children:e.pinned?"Unpin":"Pin"})]})]}),l.jsx("p",{className:"caption muted",children:s}),e.serves&&e.serves.length>0&&l.jsx(qD,{serves:e.serves}),e.summary&&l.jsx("p",{className:"caption muted",children:e.summary}),e.carriedDetail&&l.jsx("p",{className:"line",children:e.carriedDetail}),e.step&&l.jsxs("p",{className:"caption muted",children:["step: ",e.step]}),e.lines.map((r,i)=>l.jsxs("p",{className:`line tone-${Uf(r.role)}`,children:[l.jsxs("span",{"aria-hidden":"true",children:[BD[r.state]??"•"," "]}),r.state==="working"&&l.jsx("span",{className:"sr-only",children:"Working: "}),r.text]},`l${i}`)),e.holds.map((r,i)=>l.jsx("p",{className:`line tone-${Uf(r.role)}`,children:r.text},`h${i}`)),e.plan&&l.jsx("p",{className:"caption muted",children:e.plan})]})}const YD=5e3;function ID(){const[e,t]=u.useState([]),n=u.useRef(0),a=u.useRef(new Map),s=u.useCallback(c=>{const d=a.current.get(c);d&&clearTimeout(d),a.current.delete(c),t(f=>f.filter(h=>h.id!==c))},[]),r=u.useCallback((c,d)=>{const f=n.current+=1;t(h=>[...h.filter(m=>m.tone!=="error").slice(-2),{id:f,tone:c,message:d}]),c==="success"&&a.current.set(f,setTimeout(()=>s(f),YD))},[s]);u.useEffect(()=>{const c=a.current;return()=>{for(const d of c.values())clearTimeout(d)}},[]);const i=u.useMemo(()=>({success:c=>r("success",c),error:c=>r("error",c)}),[r]),o=l.jsx("div",{"aria-live":"polite","aria-label":"Notifications",className:"pointer-events-none fixed right-4 bottom-4 z-100 flex max-w-[calc(100vw-2rem)] flex-col items-end gap-2",children:e.map(c=>l.jsxs("div",{"data-testid":"viewer-toast",className:"bg-popover text-popover-foreground pointer-events-auto flex w-80 max-w-full items-center gap-3 rounded-md border py-2 pr-2 pl-4 text-sm shadow-lg"+(c.tone==="error"?" border-destructive":""),children:[l.jsx("span",{className:"min-w-0 flex-1 break-words",children:c.message}),l.jsx(I,{type:"button",variant:"ghost",size:"control",className:"shrink-0",onClick:()=>s(c.id),children:"Dismiss"})]},c.id))});return{notify:i,toasts:o}}const Ws={workspaces:"classic/",issues:"classic/?section=issues",releases:"classic/#releases"},PD=/^#(issue=|release=|planned$|releases$)/,XD=/^#task=(.+)$/;function k_(e){return e.split("/").filter(Boolean).slice(1).join("/")}function KD(e,t=""){const n=e.split("/").filter(Boolean);if(n.length===0)return{page:{kind:"home"}};if(n.length===1){const[o]=n;return o==="threads"?{page:{kind:"org",page:"threads"},threads:!0}:o==="tasks"?{page:{kind:"org",page:"tasks"},tasks:!0}:o==="chart"?{page:{kind:"org",page:"chart"},chart:!0}:o==="worktrees"?{page:{kind:"org",page:"worktrees"},worktrees:!0}:o==="queues"?{page:{kind:"org",page:"queues"},queues:!0}:Ws[o]?{classic:Ws[o]}:{page:{kind:"not_found"}}}const[a,s,r,i]=n;if(a==="org"&&r==="tasks"&&i==="queues"&&n.length===4)return{forward:`org/${s}/queues${t}`};if(a==="org"&&r==="tasks"&&n.length===4){const o=decodeURIComponent(i);return{page:{kind:"org",page:"tasks",item:o},org:decodeURIComponent(s),task:o}}if(a==="org"&&n.length<=3){const o=decodeURIComponent(s);if(r===void 0)return{page:{kind:"home"},org:o};if(r==="threads")return{page:{kind:"org",page:"threads"},org:o,threads:!0};if(r==="tasks")return{page:{kind:"org",page:"tasks"},org:o,tasks:!0};if(r==="chart")return{page:{kind:"org",page:"chart"},org:o,chart:!0};if(r==="worktrees")return{page:{kind:"org",page:"worktrees"},org:o,worktrees:!0};if(r==="queues")return{page:{kind:"org",page:"queues"},org:o,queues:!0};if(Ws[r])return{classic:Ws[r]}}if(a==="proj"&&n.length<=3){const o=decodeURIComponent(s);if(r===void 0)return{page:{kind:"project",project:o}};if(r==="tasks")return{page:{kind:"project",project:o,page:"tasks"},tasks:!0};if(Ws[r])return{classic:Ws[r]}}return{page:{kind:"not_found"}}}const QD={label:"Local viewer",can:()=>!1},ZD={connecting:"Connecting…",live:"Live · refreshes every 10s",disconnected:"Disconnected"},ix=()=>l.jsx(g_,{title:"Page not found",children:"There is no page at this address in this viewer."});function FD(){const[e,t]=u.useState("connecting");return l.jsxs("div",{className:"main viewer-panel",children:[l.jsxs("p",{className:"connection",role:"status",children:[l.jsx("span",{className:`dot ${e}`,"aria-hidden":"true"}),ZD[e]]}),l.jsx(GD,{onConnection:t})]})}const Om=()=>l.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading…"});function WD({route:e,navigate:t}){var f;const{org:n,projects:a,loading:s,none:r}=va(),i=e.page.kind==="project"?e.page.project:null,o=i!==null&&a!==null&&!((f=a.find(h=>h.id===i))!=null&&f.current),c=e.org===void 0&&!o&&!s&&n!==null?`org/${encodeURIComponent(n.slug)}/tasks`:null;if(u.useEffect(()=>{c&&t(c)},[c,t]),i!==null&&o)return l.jsx(Lf,{project:i});if(c||e.org===void 0&&s)return l.jsx(Om,{});const d=(n==null?void 0:n.slug)??e.org;return d===void 0&&i!==null?l.jsx(Lf,{project:i}):d===void 0&&r?l.jsx(du,{}):d===void 0?l.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:"Tasks open once the organization reads."}):l.jsx(rM,{org:d})}function JD({route:e,navigate:t}){const{org:n,loading:a,none:s}=va(),r=e.org===void 0&&!a&&n!==null?`org/${encodeURIComponent(n.slug)}/queues${window.location.search}`:null;if(u.useEffect(()=>{r&&t(r)},[r,t]),r||e.org===void 0&&a)return l.jsx(Om,{});const i=(n==null?void 0:n.slug)??e.org;if(i===void 0&&s)return l.jsx(du,{});if(i===void 0)return l.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:"Queues open once the organization reads."});const o=new URLSearchParams(window.location.search).get("queue");return l.jsx(QM,{org:i,open:o,path:`/org/${encodeURIComponent(i)}/queues`})}function e4({route:e,navigate:t}){const{org:n}=va();let a=e.page;const s=e.org!==void 0&&n!==null&&e.org!==n.slug;s&&(a={kind:"not_found"});let r;if(s)r=l.jsx(ix,{});else if("threads"in e)r=l.jsx(FD,{});else if("task"in e){const i=new URLSearchParams(window.location.search).get("from");r=l.jsx($M,{org:encodeURIComponent(e.org),task_id:e.task,from:i})}else"tasks"in e?r=l.jsx(WD,{route:e,navigate:t}):"chart"in e?r=l.jsx(dO,{}):"worktrees"in e?r=l.jsx(yD,{org:(n==null?void 0:n.slug)??e.org}):"queues"in e?r=l.jsx(JD,{route:e,navigate:t}):a.kind==="home"?r=l.jsx(du,{}):a.kind==="project"?r=l.jsx(Lf,{project:a.project}):r=l.jsx(ix,{});return l.jsx(ZO,{page:a,children:r})}function t4({task:e,navigate:t}){const{org:n,loading:a,none:s,failure:r}=va(),i=n!==null?`org/${encodeURIComponent(n.slug)}/tasks/${encodeURIComponent(e)}`:!a&&(s!==null||r!=null&&r.shown)?`classic/#task=${encodeURIComponent(e)}`:null;return u.useEffect(()=>{i&&t(i)},[i,t]),l.jsx(Om,{})}const n4=e=>window.location.replace(e);function a4(e){try{return decodeURIComponent(e)}catch{return null}}function s4({navigate:e=n4,data:t}){const n=KD(k_(window.location.pathname),window.location.search),[a,s]=u.useState(null),{notify:r,toasts:i}=ID(),o=XD.exec(window.location.hash),c=o?a4(o[1]):null,d=PD.test(window.location.hash)||o!==null&&c===null?`classic/${window.location.hash}`:"classic"in n?n.classic:"forward"in n?n.forward:null;u.useEffect(()=>{d&&e(d)},[d,e]);const f=u.useMemo(()=>t??{probe:{source:async()=>({label:"Local workspace"})},shell:SD(),tasks:TD(),org:CD(),worktrees:ED(),queues:kD()},[t]);return d||"classic"in n||"forward"in n||!f.shell?null:l.jsx("div",{className:"app-ui dark",ref:s,children:l.jsxs(iT,{container:a,children:[l.jsx(ib,{data:f,router:v_,identity:QD,notify:r,children:l.jsx(VO,{shell:f.shell,children:c!==null?l.jsx(t4,{task:c,navigate:e}):l.jsx(e4,{route:n,navigate:e})})}),i]})})}AS.createRoot(document.getElementById("root")).render(l.jsx(u.StrictMode,{children:k_(window.location.pathname)==="app-ui-probe"?l.jsx(iD,{}):l.jsx(s4,{})}));
|