@software-dlc/cli 0.174.0 → 0.177.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 +12 -0
- package/dist/local/workspace-cli.d.ts +1 -1
- package/dist/local/workspace-cli.d.ts.map +1 -1
- package/dist/local/workspace-cli.js +7 -4
- package/dist/local/workspace-cli.js.map +1 -1
- package/dist/local/workspace-viewer-server.d.ts +24 -0
- package/dist/local/workspace-viewer-server.d.ts.map +1 -1
- package/dist/local/workspace-viewer-server.js +164 -3
- package/dist/local/workspace-viewer-server.js.map +1 -1
- package/dist/view-seam.d.ts +7 -3
- package/dist/view-seam.d.ts.map +1 -1
- package/dist/view-seam.js +5 -3
- package/dist/view-seam.js.map +1 -1
- package/package.json +1 -1
- package/viewer/assets/index-Bzt2JRIb.js +352 -0
- package/viewer/assets/index-CH4QYLOL.css +1 -0
- package/viewer/index.html +2 -2
- package/viewer/assets/index-gg7DnwxR.css +0 -1
- package/viewer/assets/index-v6SiA8wI.js +0 -337
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
function h1(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 Ex(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rx={exports:{}},Mc={};/**
|
|
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 m1=Symbol.for("react.transitional.element"),p1=Symbol.for("react.fragment");function Ax(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:m1,type:e,key:a,ref:t!==void 0?t:null,props:n}}Mc.Fragment=p1;Mc.jsx=Ax;Mc.jsxs=Ax;Rx.exports=Mc;var l=Rx.exports,Mx={exports:{}},ve={};/**
|
|
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 Wf=Symbol.for("react.transitional.element"),g1=Symbol.for("react.portal"),x1=Symbol.for("react.fragment"),v1=Symbol.for("react.strict_mode"),y1=Symbol.for("react.profiler"),b1=Symbol.for("react.consumer"),j1=Symbol.for("react.context"),w1=Symbol.for("react.forward_ref"),_1=Symbol.for("react.suspense"),N1=Symbol.for("react.memo"),Ox=Symbol.for("react.lazy"),ap=Symbol.iterator;function S1(e){return e===null||typeof e!="object"?null:(e=ap&&e[ap]||e["@@iterator"],typeof e=="function"?e:null)}var Dx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zx=Object.assign,$x={};function Bl(e,t,n){this.props=e,this.context=t,this.refs=$x,this.updater=n||Dx}Bl.prototype.isReactComponent={};Bl.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")};Bl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Lx(){}Lx.prototype=Bl.prototype;function Jf(e,t,n){this.props=e,this.context=t,this.refs=$x,this.updater=n||Dx}var eh=Jf.prototype=new Lx;eh.constructor=Jf;zx(eh,Bl.prototype);eh.isPureReactComponent=!0;var sp=Array.isArray,Ge={H:null,A:null,T:null,S:null,V:null},Ux=Object.prototype.hasOwnProperty;function th(e,t,n,a,s,r){return n=r.ref,{$$typeof:Wf,type:e,key:t,ref:n!==void 0?n:null,props:r}}function k1(e,t){return th(e.type,t,void 0,void 0,void 0,e.props)}function nh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wf}function T1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var lp=/\/+/g;function Tu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?T1(""+e.key):t.toString(36)}function rp(){}function C1(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(rp,rp):(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 el(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 Wf:case g1:i=!0;break;case Ox:return i=e._init,el(i(e._payload),t,n,a,s)}}if(i)return s=s(e),i=a===""?"."+Tu(e,0):a,sp(s)?(n="",i!=null&&(n=i.replace(lp,"$&/")+"/"),el(s,t,n,"",function(d){return d})):s!=null&&(nh(s)&&(s=k1(s,n+(s.key==null||e&&e.key===s.key?"":(""+s.key).replace(lp,"$&/")+"/")+i)),t.push(s)),1;i=0;var o=a===""?".":a+":";if(sp(e))for(var c=0;c<e.length;c++)a=e[c],r=o+Tu(a,c),i+=el(a,t,n,r,s);else if(c=S1(e),typeof c=="function")for(e=c.call(e),c=0;!(a=e.next()).done;)a=a.value,r=o+Tu(a,c++),i+=el(a,t,n,r,s);else if(r==="object"){if(typeof e.then=="function")return el(C1(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 Pi(e,t,n){if(e==null)return e;var a=[],s=0;return el(e,a,"","",function(r){return t.call(n,r,s++)}),a}function E1(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 ip=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 R1(){}ve.Children={map:Pi,forEach:function(e,t,n){Pi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Pi(e,function(){t++}),t},toArray:function(e){return Pi(e,function(t){return t})||[]},only:function(e){if(!nh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ve.Component=Bl;ve.Fragment=x1;ve.Profiler=y1;ve.PureComponent=Jf;ve.StrictMode=v1;ve.Suspense=_1;ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ge;ve.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ge.H.useMemoCache(e)}};ve.cache=function(e){return function(){return e.apply(null,arguments)}};ve.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=zx({},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)!Ux.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 th(e.type,s,void 0,void 0,r,a)};ve.createContext=function(e){return e={$$typeof:j1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:b1,_context:e},e};ve.createElement=function(e,t,n){var a,s={},r=null;if(t!=null)for(a in t.key!==void 0&&(r=""+t.key),t)Ux.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 th(e,r,void 0,void 0,null,s)};ve.createRef=function(){return{current:null}};ve.forwardRef=function(e){return{$$typeof:w1,render:e}};ve.isValidElement=nh;ve.lazy=function(e){return{$$typeof:Ox,_payload:{_status:-1,_result:e},_init:E1}};ve.memo=function(e,t){return{$$typeof:N1,type:e,compare:t===void 0?null:t}};ve.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(R1,ip)}catch(r){ip(r)}finally{Ge.T=t}};ve.unstable_useCacheRefresh=function(){return Ge.H.useCacheRefresh()};ve.use=function(e){return Ge.H.use(e)};ve.useActionState=function(e,t,n){return Ge.H.useActionState(e,t,n)};ve.useCallback=function(e,t){return Ge.H.useCallback(e,t)};ve.useContext=function(e){return Ge.H.useContext(e)};ve.useDebugValue=function(){};ve.useDeferredValue=function(e,t){return Ge.H.useDeferredValue(e,t)};ve.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)};ve.useId=function(){return Ge.H.useId()};ve.useImperativeHandle=function(e,t,n){return Ge.H.useImperativeHandle(e,t,n)};ve.useInsertionEffect=function(e,t){return Ge.H.useInsertionEffect(e,t)};ve.useLayoutEffect=function(e,t){return Ge.H.useLayoutEffect(e,t)};ve.useMemo=function(e,t){return Ge.H.useMemo(e,t)};ve.useOptimistic=function(e,t){return Ge.H.useOptimistic(e,t)};ve.useReducer=function(e,t,n){return Ge.H.useReducer(e,t,n)};ve.useRef=function(e){return Ge.H.useRef(e)};ve.useState=function(e){return Ge.H.useState(e)};ve.useSyncExternalStore=function(e,t,n){return Ge.H.useSyncExternalStore(e,t,n)};ve.useTransition=function(){return Ge.H.useTransition()};ve.version="19.1.0";Mx.exports=ve;var u=Mx.exports;const Aa=Ex(u),Hx=h1({__proto__:null,default:Aa},[u]);var Bx={exports:{}},Oc={},qx={exports:{}},Gx={};/**
|
|
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(R,q){var C=R.length;R.push(q);e:for(;0<C;){var L=C-1>>>1,K=R[L];if(0<s(K,q))R[L]=q,R[C]=K,C=L;else break e}}function n(R){return R.length===0?null:R[0]}function a(R){if(R.length===0)return null;var q=R[0],C=R.pop();if(C!==q){R[0]=C;e:for(var L=0,K=R.length,D=K>>>1;L<D;){var V=2*(L+1)-1,ne=R[V],P=V+1,ye=R[P];if(0>s(ne,C))P<K&&0>s(ye,ne)?(R[L]=ye,R[P]=C,L=P):(R[L]=ne,R[V]=C,L=V);else if(P<K&&0>s(ye,C))R[L]=ye,R[P]=C,L=P;else break e}}return q}function s(R,q){var C=R.sortIndex-q.sortIndex;return C!==0?C:R.id-q.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,g=!1,j=!1,v=!1,b=!1,x=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function w(R){for(var q=n(d);q!==null;){if(q.callback===null)a(d);else if(q.startTime<=R)a(d),q.sortIndex=q.expirationTime,t(c,q);else break;q=n(d)}}function _(R){if(v=!1,w(R),!j)if(n(c)!==null)j=!0,k||(k=!0,B());else{var q=n(d);q!==null&&I(_,q.startTime-R)}}var k=!1,N=-1,S=5,M=-1;function O(){return b?!0:!(e.unstable_now()-M<S)}function z(){if(b=!1,k){var R=e.unstable_now();M=R;var q=!0;try{e:{j=!1,v&&(v=!1,p(N),N=-1),g=!0;var C=m;try{t:{for(w(R),h=n(c);h!==null&&!(h.expirationTime>R&&O());){var L=h.callback;if(typeof L=="function"){h.callback=null,m=h.priorityLevel;var K=L(h.expirationTime<=R);if(R=e.unstable_now(),typeof K=="function"){h.callback=K,w(R),q=!0;break t}h===n(c)&&a(c),w(R)}else a(c);h=n(c)}if(h!==null)q=!0;else{var D=n(d);D!==null&&I(_,D.startTime-R),q=!1}}break e}finally{h=null,m=C,g=!1}q=void 0}}finally{q?B():k=!1}}}var B;if(typeof y=="function")B=function(){y(z)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,$=T.port2;T.port1.onmessage=z,B=function(){$.postMessage(null)}}else B=function(){x(z,0)};function I(R,q){N=x(function(){R(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(R){switch(m){case 1:case 2:case 3:var q=3;break;default:q=m}var C=m;m=q;try{return R()}finally{m=C}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(R,q){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var C=m;m=R;try{return q()}finally{m=C}},e.unstable_scheduleCallback=function(R,q,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,R){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=C+K,R={id:f++,callback:q,priorityLevel:R,startTime:C,expirationTime:K,sortIndex:-1},C>L?(R.sortIndex=C,t(d,R),n(c)===null&&R===n(d)&&(v?(p(N),N=-1):v=!0,I(_,C-L))):(R.sortIndex=K,t(c,R),j||g||(j=!0,k||(k=!0,B()))),R},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(R){var q=m;return function(){var C=m;m=q;try{return R.apply(this,arguments)}finally{m=C}}}})(Gx);qx.exports=Gx;var A1=qx.exports,Ix={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 M1=u;function Vx(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 Ta(){}var Ot={d:{f:Ta,r:function(){throw Error(Vx(522))},D:Ta,C:Ta,L:Ta,m:Ta,X:Ta,S:Ta,M:Ta},p:0,findDOMNode:null},O1=Symbol.for("react.portal");function D1(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O1,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}var kr=M1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Dc(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=Ot;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(Vx(299));return D1(e,t,null,n)};Dt.flushSync=function(e){var t=kr.T,n=Ot.p;try{if(kr.T=null,Ot.p=2,e)return e()}finally{kr.T=t,Ot.p=n,Ot.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,Ot.d.C(e,t))};Dt.prefetchDNS=function(e){typeof e=="string"&&Ot.d.D(e)};Dt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=Dc(n,t.crossOrigin),s=typeof t.integrity=="string"?t.integrity:void 0,r=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Ot.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:s,fetchPriority:r}):n==="script"&&Ot.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=Dc(t.as,t.crossOrigin);Ot.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&&Ot.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=Dc(n,t.crossOrigin);Ot.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=Dc(t.as,t.crossOrigin);Ot.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 Ot.d.m(e)};Dt.requestFormReset=function(e){Ot.d.r(e)};Dt.unstable_batchedUpdates=function(e,t){return e(t)};Dt.useFormState=function(e,t,n){return kr.H.useFormState(e,t,n)};Dt.useFormStatus=function(){return kr.H.useHostTransitionStatus()};Dt.version="19.1.0";function Yx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yx)}catch(e){console.error(e)}}Yx(),Ix.exports=Dt;var ql=Ix.exports;const z1=Ex(ql);/**
|
|
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 ft=A1,Px=u,$1=ql;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 Xx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ci(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 Kx(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 op(e){if(ci(e)!==e)throw Error(U(188))}function L1(e){var t=e.alternate;if(!t){if(t=ci(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 op(s),e;if(r===a)return op(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 Qx(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Qx(e),t!==null)return t;e=e.sibling}return null}var Be=Object.assign,U1=Symbol.for("react.element"),Xi=Symbol.for("react.transitional.element"),gr=Symbol.for("react.portal"),sl=Symbol.for("react.fragment"),Zx=Symbol.for("react.strict_mode"),Rd=Symbol.for("react.profiler"),H1=Symbol.for("react.provider"),Fx=Symbol.for("react.consumer"),ta=Symbol.for("react.context"),ah=Symbol.for("react.forward_ref"),Ad=Symbol.for("react.suspense"),Md=Symbol.for("react.suspense_list"),sh=Symbol.for("react.memo"),Da=Symbol.for("react.lazy"),Od=Symbol.for("react.activity"),B1=Symbol.for("react.memo_cache_sentinel"),cp=Symbol.iterator;function lr(e){return e===null||typeof e!="object"?null:(e=cp&&e[cp]||e["@@iterator"],typeof e=="function"?e:null)}var q1=Symbol.for("react.client.reference");function Dd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===q1?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sl:return"Fragment";case Rd:return"Profiler";case Zx:return"StrictMode";case Ad:return"Suspense";case Md:return"SuspenseList";case Od:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case gr:return"Portal";case ta:return(e.displayName||"Context")+".Provider";case Fx:return(e._context.displayName||"Context")+".Consumer";case ah:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sh:return t=e.displayName||null,t!==null?t:Dd(e.type)||"Memo";case Da:t=e._payload,e=e._init;try{return Dd(e(t))}catch{}}return null}var xr=Array.isArray,re=Px.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=$1.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ys={pending:!1,data:null,method:null,action:null},zd=[],ll=-1;function In(e){return{current:e}}function vt(e){0>ll||(e.current=zd[ll],zd[ll]=null,ll--)}function Ie(e,t){ll++,zd[ll]=e.current,e.current=t}var On=In(null),Gr=In(null),Ya=In(null),Bo=In(null);function qo(e,t){switch(Ie(Ya,t),Ie(Gr,e),Ie(On,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?mg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=mg(t),e=mb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}vt(On),Ie(On,e)}function Tl(){vt(On),vt(Gr),vt(Ya)}function $d(e){e.memoizedState!==null&&Ie(Bo,e);var t=On.current,n=mb(t,e.type);t!==n&&(Ie(Gr,e),Ie(On,n))}function Go(e){Gr.current===e&&(vt(On),vt(Gr)),Bo.current===e&&(vt(Bo),Wr._currentValue=ys)}var Ld=Object.prototype.hasOwnProperty,lh=ft.unstable_scheduleCallback,Cu=ft.unstable_cancelCallback,G1=ft.unstable_shouldYield,I1=ft.unstable_requestPaint,Dn=ft.unstable_now,V1=ft.unstable_getCurrentPriorityLevel,Wx=ft.unstable_ImmediatePriority,Jx=ft.unstable_UserBlockingPriority,Io=ft.unstable_NormalPriority,Y1=ft.unstable_LowPriority,ev=ft.unstable_IdlePriority,P1=ft.log,X1=ft.unstable_setDisableYieldValue,ui=null,Qt=null;function Ba(e){if(typeof P1=="function"&&X1(e),Qt&&typeof Qt.setStrictMode=="function")try{Qt.setStrictMode(ui,e)}catch{}}var Zt=Math.clz32?Math.clz32:Z1,K1=Math.log,Q1=Math.LN2;function Z1(e){return e>>>=0,e===0?32:31-(K1(e)/Q1|0)|0}var Ki=256,Qi=4194304;function ms(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 zc(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=ms(a):(i&=o,i!==0?s=ms(i):n||(n=o&~e,n!==0&&(s=ms(n))))):(o=a&~r,o!==0?s=ms(o):i!==0?s=ms(i):n||(n=a&~e,n!==0&&(s=ms(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 di(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function F1(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 tv(){var e=Ki;return Ki<<=1,!(Ki&4194048)&&(Ki=256),e}function nv(){var e=Qi;return Qi<<=1,!(Qi&62914560)&&(Qi=4194304),e}function Eu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function fi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function W1(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-Zt(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 g=m[f];g!==null&&(g.lane&=-536870913)}n&=~h}a!==0&&av(e,a,0),r!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=r&~(i&~t))}function av(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Zt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&4194090}function sv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Zt(n),s=1<<a;s&t|e[a]&t&&(e[a]|=t),n&=~s}}function rh(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 ih(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function lv(){var e=Ee.p;return e!==0?e:(e=window.event,e===void 0?32:Nb(e.type))}function J1(e,t){var n=Ee.p;try{return Ee.p=e,t()}finally{Ee.p=n}}var rs=Math.random().toString(36).slice(2),Ct="__reactFiber$"+rs,qt="__reactProps$"+rs,Gl="__reactContainer$"+rs,Ud="__reactEvents$"+rs,eN="__reactListeners$"+rs,tN="__reactHandles$"+rs,up="__reactResources$"+rs,hi="__reactMarker$"+rs;function oh(e){delete e[Ct],delete e[qt],delete e[Ud],delete e[eN],delete e[tN]}function rl(e){var t=e[Ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Gl]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xg(e);e!==null;){if(n=e[Ct])return n;e=xg(e)}return t}e=n,n=e.parentNode}return null}function Il(e){if(e=e[Ct]||e[Gl]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function vr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(U(33))}function gl(e){var t=e[up];return t||(t=e[up]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[hi]=!0}var rv=new Set,iv={};function $s(e,t){Cl(e,t),Cl(e+"Capture",t)}function Cl(e,t){for(iv[e]=t,e=0;e<t.length;e++)rv.add(t[e])}var nN=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]*$"),dp={},fp={};function aN(e){return Ld.call(fp,e)?!0:Ld.call(dp,e)?!1:nN.test(e)?fp[e]=!0:(dp[e]=!0,!1)}function wo(e,t,n){if(aN(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 Zi(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 Qn(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 Ru,hp;function tl(e){if(Ru===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ru=t&&t[1]||"",hp=-1<n.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Ru+e+hp}var Au=!1;function Mu(e,t){if(!e||Au)return"";Au=!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(g){var m=g}Reflect.construct(e,[],h)}else{try{h.call()}catch(g){m=g}e.call(h.prototype)}}else{try{throw Error()}catch(g){m=g}(h=e())&&typeof h.catch=="function"&&h.catch(function(){})}}catch(g){if(g&&m&&typeof g.stack=="string")return[g.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{Au=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?tl(n):""}function sN(e){switch(e.tag){case 26:case 27:case 5:return tl(e.type);case 16:return tl("Lazy");case 13:return tl("Suspense");case 19:return tl("SuspenseList");case 0:case 15:return Mu(e.type,!1);case 11:return Mu(e.type.render,!1);case 1:return Mu(e.type,!0);case 31:return tl("Activity");default:return""}}function mp(e){try{var t="";do t+=sN(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 ov(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lN(e){var t=ov(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 Vo(e){e._valueTracker||(e._valueTracker=lN(e))}function cv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=ov(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Yo(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 rN=/[\n"\\]/g;function cn(e){return e.replace(rN,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Hd(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?Bd(e,i,ln(t)):n!=null?Bd(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 uv(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 Bd(e,t,n){t==="number"&&Yo(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function xl(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 dv(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 fv(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(U(92));if(xr(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 El(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var iN=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 pp(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||iN.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function hv(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&&pp(e,s,a)}else for(var r in t)t.hasOwnProperty(r)&&pp(e,r,t[r])}function ch(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 oN=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"]]),cN=/^[\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 _o(e){return cN.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var qd=null;function uh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var il=null,vl=null;function gp(e){var t=Il(e);if(t&&(e=t.stateNode)){var n=e[qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Hd(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[qt]||null;if(!s)throw Error(U(90));Hd(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&&cv(a)}break e;case"textarea":dv(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&xl(e,!!n.multiple,t,!1)}}}var Ou=!1;function mv(e,t,n){if(Ou)return e(t,n);Ou=!0;try{var a=e(t);return a}finally{if(Ou=!1,(il!==null||vl!==null)&&(Yc(),il&&(t=il,e=vl,vl=il=null,gp(t),e)))for(t=0;t<e.length;t++)gp(e[t])}}function Ir(e,t){var n=e.stateNode;if(n===null)return null;var a=n[qt]||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 ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gd=!1;if(ua)try{var rr={};Object.defineProperty(rr,"passive",{get:function(){Gd=!0}}),window.addEventListener("test",rr,rr),window.removeEventListener("test",rr,rr)}catch{Gd=!1}var qa=null,dh=null,No=null;function pv(){if(No)return No;var e,t=dh,n=t.length,a,s="value"in qa?qa.value:qa.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 No=s.slice(e,1<a?1-a:void 0)}function So(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 Fi(){return!0}function xp(){return!1}function Gt(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)?Fi:xp,this.isPropagationStopped=xp,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=Fi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Fi)},persist:function(){},isPersistent:Fi}),t}var Ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$c=Gt(Ls),mi=Be({},Ls,{view:0,detail:0}),uN=Gt(mi),Du,zu,ir,Lc=Be({},mi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fh,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!==ir&&(ir&&e.type==="mousemove"?(Du=e.screenX-ir.screenX,zu=e.screenY-ir.screenY):zu=Du=0,ir=e),Du)},movementY:function(e){return"movementY"in e?e.movementY:zu}}),vp=Gt(Lc),dN=Be({},Lc,{dataTransfer:0}),fN=Gt(dN),hN=Be({},mi,{relatedTarget:0}),$u=Gt(hN),mN=Be({},Ls,{animationName:0,elapsedTime:0,pseudoElement:0}),pN=Gt(mN),gN=Be({},Ls,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xN=Gt(gN),vN=Be({},Ls,{data:0}),yp=Gt(vN),yN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bN={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"},jN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jN[e])?!!t[e]:!1}function fh(){return wN}var _N=Be({},mi,{key:function(e){if(e.key){var t=yN[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=So(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bN[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fh,charCode:function(e){return e.type==="keypress"?So(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?So(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),NN=Gt(_N),SN=Be({},Lc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bp=Gt(SN),kN=Be({},mi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fh}),TN=Gt(kN),CN=Be({},Ls,{propertyName:0,elapsedTime:0,pseudoElement:0}),EN=Gt(CN),RN=Be({},Lc,{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}),AN=Gt(RN),MN=Be({},Ls,{newState:0,oldState:0}),ON=Gt(MN),DN=[9,13,27,32],hh=ua&&"CompositionEvent"in window,Tr=null;ua&&"documentMode"in document&&(Tr=document.documentMode);var zN=ua&&"TextEvent"in window&&!Tr,gv=ua&&(!hh||Tr&&8<Tr&&11>=Tr),jp=" ",wp=!1;function xv(e,t){switch(e){case"keyup":return DN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ol=!1;function $N(e,t){switch(e){case"compositionend":return vv(t);case"keypress":return t.which!==32?null:(wp=!0,jp);case"textInput":return e=t.data,e===jp&&wp?null:e;default:return null}}function LN(e,t){if(ol)return e==="compositionend"||!hh&&xv(e,t)?(e=pv(),No=dh=qa=null,ol=!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 gv&&t.locale!=="ko"?null:t.data;default:return null}}var UN={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 _p(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!UN[e.type]:t==="textarea"}function yv(e,t,n,a){il?vl?vl.push(a):vl=[a]:il=a,t=cc(t,"onChange"),0<t.length&&(n=new $c("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Cr=null,Vr=null;function HN(e){db(e,0)}function Uc(e){var t=vr(e);if(cv(t))return e}function Np(e,t){if(e==="change")return t}var bv=!1;if(ua){var Lu;if(ua){var Uu="oninput"in document;if(!Uu){var Sp=document.createElement("div");Sp.setAttribute("oninput","return;"),Uu=typeof Sp.oninput=="function"}Lu=Uu}else Lu=!1;bv=Lu&&(!document.documentMode||9<document.documentMode)}function kp(){Cr&&(Cr.detachEvent("onpropertychange",jv),Vr=Cr=null)}function jv(e){if(e.propertyName==="value"&&Uc(Vr)){var t=[];yv(t,Vr,e,uh(e)),mv(HN,t)}}function BN(e,t,n){e==="focusin"?(kp(),Cr=t,Vr=n,Cr.attachEvent("onpropertychange",jv)):e==="focusout"&&kp()}function qN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Uc(Vr)}function GN(e,t){if(e==="click")return Uc(t)}function IN(e,t){if(e==="input"||e==="change")return Uc(t)}function VN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tn=typeof Object.is=="function"?Object.is:VN;function Yr(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(!Ld.call(t,s)||!tn(e[s],t[s]))return!1}return!0}function Tp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cp(e,t){var n=Tp(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=Tp(n)}}function wv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _v(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yo(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=Yo(e.document)}return t}function mh(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 YN=ua&&"documentMode"in document&&11>=document.documentMode,cl=null,Id=null,Er=null,Vd=!1;function Ep(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vd||cl==null||cl!==Yo(a)||(a=cl,"selectionStart"in a&&mh(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}),Er&&Yr(Er,a)||(Er=a,a=cc(Id,"onSelect"),0<a.length&&(t=new $c("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=cl)))}function fs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ul={animationend:fs("Animation","AnimationEnd"),animationiteration:fs("Animation","AnimationIteration"),animationstart:fs("Animation","AnimationStart"),transitionrun:fs("Transition","TransitionRun"),transitionstart:fs("Transition","TransitionStart"),transitioncancel:fs("Transition","TransitionCancel"),transitionend:fs("Transition","TransitionEnd")},Hu={},Nv={};ua&&(Nv=document.createElement("div").style,"AnimationEvent"in window||(delete ul.animationend.animation,delete ul.animationiteration.animation,delete ul.animationstart.animation),"TransitionEvent"in window||delete ul.transitionend.transition);function Us(e){if(Hu[e])return Hu[e];if(!ul[e])return e;var t=ul[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Nv)return Hu[e]=t[n];return e}var Sv=Us("animationend"),kv=Us("animationiteration"),Tv=Us("animationstart"),PN=Us("transitionrun"),XN=Us("transitionstart"),KN=Us("transitioncancel"),Cv=Us("transitionend"),Ev=new Map,Yd="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(" ");Yd.push("scrollEnd");function kn(e,t){Ev.set(e,t),$s(t,[e])}var Rp=new WeakMap;function un(e,t){if(typeof e=="object"&&e!==null){var n=Rp.get(e);return n!==void 0?n:(t={value:e,source:t,stack:mp(t)},Rp.set(e,t),t)}return{value:e,source:t,stack:mp(t)}}var sn=[],dl=0,ph=0;function Hc(){for(var e=dl,t=ph=dl=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&&Rv(n,s,r)}}function Bc(e,t,n,a){sn[dl++]=e,sn[dl++]=t,sn[dl++]=n,sn[dl++]=a,ph|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function gh(e,t,n,a){return Bc(e,t,n,a),Po(e)}function Vl(e,t){return Bc(e,null,null,t),Po(e)}function Rv(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-Zt(n),e=r.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=n|536870912),r):null}function Po(e){if(50<Hr)throw Hr=0,hf=null,Error(U(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fl={};function QN(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 Kt(e,t,n,a){return new QN(e,t,n,a)}function xh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oa(e,t){var n=e.alternate;return n===null?(n=Kt(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 Av(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 ko(e,t,n,a,s,r){var i=0;if(a=e,typeof e=="function")xh(e)&&(i=1);else if(typeof e=="string")i=FS(e,n,On.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Od:return e=Kt(31,n,t,s),e.elementType=Od,e.lanes=r,e;case sl:return bs(n.children,s,r,t);case Zx:i=8,s|=24;break;case Rd:return e=Kt(12,n,t,s|2),e.elementType=Rd,e.lanes=r,e;case Ad:return e=Kt(13,n,t,s),e.elementType=Ad,e.lanes=r,e;case Md:return e=Kt(19,n,t,s),e.elementType=Md,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H1:case ta:i=10;break e;case Fx:i=9;break e;case ah:i=11;break e;case sh:i=14;break e;case Da:i=16,a=null;break e}i=29,n=Error(U(130,e===null?"null":typeof e,"")),a=null}return t=Kt(i,n,t,s),t.elementType=e,t.type=a,t.lanes=r,t}function bs(e,t,n,a){return e=Kt(7,e,a,t),e.lanes=n,e}function Bu(e,t,n){return e=Kt(6,e,null,t),e.lanes=n,e}function qu(e,t,n){return t=Kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hl=[],ml=0,Xo=null,Ko=0,rn=[],on=0,js=null,na=1,aa="";function ps(e,t){hl[ml++]=Ko,hl[ml++]=Xo,Xo=e,Ko=t}function Mv(e,t,n){rn[on++]=na,rn[on++]=aa,rn[on++]=js,js=e;var a=na;e=aa;var s=32-Zt(a)-1;a&=~(1<<s),n+=1;var r=32-Zt(t)+s;if(30<r){var i=s-s%5;r=(a&(1<<i)-1).toString(32),a>>=i,s-=i,na=1<<32-Zt(t)+s|n<<s|a,aa=r+e}else na=1<<r|n<<s|a,aa=e}function vh(e){e.return!==null&&(ps(e,1),Mv(e,1,0))}function yh(e){for(;e===Xo;)Xo=hl[--ml],hl[ml]=null,Ko=hl[--ml],hl[ml]=null;for(;e===js;)js=rn[--on],rn[on]=null,aa=rn[--on],rn[on]=null,na=rn[--on],rn[on]=null}var Mt=null,Qe=null,Ce=!1,ws=null,En=!1,Pd=Error(U(519));function ks(e){var t=Error(U(418,""));throw Pr(un(t,e)),Pd}function Ap(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Ct]=e,t[qt]=a,n){case"dialog":_e("cancel",t),_e("close",t);break;case"iframe":case"object":case"embed":_e("load",t);break;case"video":case"audio":for(n=0;n<Qr.length;n++)_e(Qr[n],t);break;case"source":_e("error",t);break;case"img":case"image":case"link":_e("error",t),_e("load",t);break;case"details":_e("toggle",t);break;case"input":_e("invalid",t),uv(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),Vo(t);break;case"select":_e("invalid",t);break;case"textarea":_e("invalid",t),fv(t,a.value,a.defaultValue,a.children),Vo(t)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||hb(t.textContent,n)?(a.popover!=null&&(_e("beforetoggle",t),_e("toggle",t)),a.onScroll!=null&&_e("scroll",t),a.onScrollEnd!=null&&_e("scrollend",t),a.onClick!=null&&(t.onclick=Kc),t=!0):t=!1,t||ks(e)}function Mp(e){for(Mt=e.return;Mt;)switch(Mt.tag){case 5:case 13:En=!1;return;case 27:case 3:En=!0;return;default:Mt=Mt.return}}function or(e){if(e!==Mt)return!1;if(!Ce)return Mp(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||yf(e.type,e.memoizedProps)),n=!n),n&&Qe&&ks(e),Mp(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){Qe=yn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Qe=null}}else t===27?(t=Qe,is(e.type)?(e=wf,wf=null,Qe=e):Qe=t):Qe=Mt?yn(e.stateNode.nextSibling):null;return!0}function pi(){Qe=Mt=null,Ce=!1}function Op(){var e=ws;return e!==null&&(Ht===null?Ht=e:Ht.push.apply(Ht,e),ws=null),e}function Pr(e){ws===null?ws=[e]:ws.push(e)}var Xd=In(null),Hs=null,sa=null;function $a(e,t,n){Ie(Xd,t._currentValue),t._currentValue=n}function ca(e){e._currentValue=Xd.current,vt(Xd)}function Kd(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 Qd(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),Kd(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),Kd(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 gi(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===Bo.current){if(i=s.alternate,i===null)throw Error(U(387));i.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Wr):e=[Wr])}s=s.return}e!==null&&Qd(t,e,n,a),t.flags|=262144}function Qo(e){for(e=e.firstContext;e!==null;){if(!tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ts(e){Hs=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Et(e){return Ov(Hs,e)}function Wi(e,t){return Hs===null&&Ts(e),Ov(e,t)}function Ov(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(U(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var ZN=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()})}},FN=ft.unstable_scheduleCallback,WN=ft.unstable_NormalPriority,ct={$$typeof:ta,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bh(){return{controller:new ZN,data:new Map,refCount:0}}function xi(e){e.refCount--,e.refCount===0&&FN(WN,function(){e.controller.abort()})}var Rr=null,Zd=0,Rl=0,yl=null;function JN(e,t){if(Rr===null){var n=Rr=[];Zd=0,Rl=Ih(),yl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Zd++,t.then(Dp,Dp),t}function Dp(){if(--Zd===0&&Rr!==null){yl!==null&&(yl.status="fulfilled");var e=Rr;Rr=null,Rl=0,yl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function eS(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 zp=re.S;re.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&JN(e,t),zp!==null&&zp(e,t)};var _s=In(null);function jh(){var e=_s.current;return e!==null?e:He.pooledCache}function To(e,t){t===null?Ie(_s,_s.current):Ie(_s,t.pool)}function Dv(){var e=jh();return e===null?null:{parent:ct._currentValue,pool:e}}var vi=Error(U(460)),zv=Error(U(474)),qc=Error(U(542)),Fd={then:function(){}};function $p(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ji(){}function $v(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ji,Ji),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Up(e),e;default:if(typeof t.status=="string")t.then(Ji,Ji);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,Up(e),e}throw Ar=t,vi}}var Ar=null;function Lp(){if(Ar===null)throw Error(U(459));var e=Ar;return Ar=null,e}function Up(e){if(e===vi||e===qc)throw Error(U(483))}var za=!1;function wh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wd(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 Pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Xa(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,Me&2){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Po(e),Rv(e,null,n),t}return Bc(e,a,t,n),Po(e)}function Mr(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,sv(e,n)}}function Gu(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 Jd=!1;function Or(){if(Jd){var e=yl;if(e!==null)throw e}}function Dr(e,t,n,a){Jd=!1;var s=e.updateQueue;za=!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,g=m!==o.lane;if(g?(ke&m)===m:(a&m)===m){m!==0&&m===Rl&&(Jd=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var j=e,v=o;m=t;var b=n;switch(v.tag){case 1:if(j=v.payload,typeof j=="function"){h=j.call(b,h,m);break e}h=j;break e;case 3:j.flags=j.flags&-65537|128;case 0:if(j=v.payload,m=typeof j=="function"?j.call(b,h,m):j,m==null)break e;h=Be({},h,m);break e;case 2:za=!0}}m=o.callback,m!==null&&(e.flags|=64,g&&(e.flags|=8192),g=s.callbacks,g===null?s.callbacks=[m]:g.push(m))}else g={lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(d=f=g,c=h):f=f.next=g,i|=m;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;g=o,o=g.next,g.next=null,s.lastBaseUpdate=g,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),ns|=i,e.lanes=i,e.memoizedState=h}}function Lv(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function Uv(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Lv(n[e],t)}var Al=In(null),Zo=In(0);function Hp(e,t){e=ha,Ie(Zo,e),Ie(Al,t),ha=e|t.baseLanes}function ef(){Ie(Zo,ha),Ie(Al,Al.current)}function _h(){ha=Zo.current,vt(Al),vt(Zo)}var es=0,we=null,$e=null,at=null,Fo=!1,bl=!1,Cs=!1,Wo=0,Xr=0,jl=null,tS=0;function We(){throw Error(U(321))}function Nh(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 Sh(e,t,n,a,s,r){return es=r,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,re.H=e===null||e.memoizedState===null?py:gy,Cs=!1,r=n(a,s),Cs=!1,bl&&(r=Bv(t,n,a,s)),Hv(e),r}function Hv(e){re.H=Jo;var t=$e!==null&&$e.next!==null;if(es=0,at=$e=we=null,Fo=!1,Xr=0,jl=null,t)throw Error(U(300));e===null||xt||(e=e.dependencies,e!==null&&Qo(e)&&(xt=!0))}function Bv(e,t,n,a){we=e;var s=0;do{if(bl&&(jl=null),Xr=0,bl=!1,25<=s)throw Error(U(301));if(s+=1,at=$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=oS,r=t(n,a)}while(bl);return r}function nS(){var e=re.H,t=e.useState()[0];return t=typeof t.then=="function"?yi(t):t,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(we.flags|=1024),t}function kh(){var e=Wo!==0;return Wo=0,e}function Th(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ch(e){if(Fo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Fo=!1}es=0,at=$e=we=null,bl=!1,Xr=Wo=0,jl=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?we.memoizedState=at=e:at=at.next=e,at}function st(){if($e===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=at===null?we.memoizedState:at.next;if(t!==null)at=t,$e=e;else{if(e===null)throw we.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},at===null?we.memoizedState=at=e:at=at.next=e}return at}function Eh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yi(e){var t=Xr;return Xr+=1,jl===null&&(jl=[]),e=$v(jl,e,t),t=we,(at===null?t.memoizedState:at.next)===null&&(t=t.alternate,re.H=t===null||t.memoizedState===null?py:gy),e}function Gc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yi(e);if(e.$$typeof===ta)return Et(e)}throw Error(U(438,String(e)))}function Rh(e){var t=null,n=we.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=we.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=Eh(),we.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]=B1;return t.index++,n}function da(e,t){return typeof t=="function"?t(e):t}function Co(e){var t=st();return Ah(t,$e,e)}function Ah(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:(es&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===Rl&&(f=!0);else if((es&m)===m){d=d.next,m===Rl&&(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,we.lanes|=m,ns|=m;h=d.action,Cs&&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,we.lanes|=h,ns|=h;d=d.next}while(d!==null&&d!==t);if(c===null?i=r:c.next=o,!tn(r,e.memoizedState)&&(xt=!0,f&&(n=yl,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 Iu(e){var t=st(),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)||(xt=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,a]}function qv(e,t,n){var a=we,s=st(),r=Ce;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,xt=!0),s=s.queue;var o=Vv.bind(null,a,s,e);if(bi(2048,8,o,[e]),s.getSnapshot!==t||i||at!==null&&at.memoizedState.tag&1){if(a.flags|=2048,Ml(9,Ic(),Iv.bind(null,a,s,n,t),null),He===null)throw Error(U(349));r||es&124||Gv(a,t,n)}return n}function Gv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=we.updateQueue,t===null?(t=Eh(),we.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Iv(e,t,n,a){t.value=n,t.getSnapshot=a,Yv(t)&&Pv(e)}function Vv(e,t,n){return n(function(){Yv(t)&&Pv(e)})}function Yv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tn(e,n)}catch{return!0}}function Pv(e){var t=Vl(e,2);t!==null&&Wt(t,e,2)}function tf(e){var t=Lt();if(typeof e=="function"){var n=e;if(e=n(),Cs){Ba(!0);try{n()}finally{Ba(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:e},t}function Xv(e,t,n,a){return e.baseState=n,Ah(e,$e,typeof a=="function"?a:da)}function aS(e,t,n,a,s){if(Vc(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,Kv(t,r)):(r.next=n.next,t.pending=n.next=r)}}function Kv(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){nf(e,t,d)}finally{re.T=r}}else try{r=n(s,a),Bp(e,t,r)}catch(d){nf(e,t,d)}}function Bp(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){qp(e,t,a)},function(a){return nf(e,t,a)}):qp(e,t,n)}function qp(e,t,n){t.status="fulfilled",t.value=n,Qv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Kv(e,n)))}function nf(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Qv(t),t=t.next;while(t!==a)}e.action=null}function Qv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zv(e,t){return t}function Gp(e,t){if(Ce){var n=He.formState;if(n!==null){e:{var a=we;if(Ce){if(Qe){t:{for(var s=Qe,r=En;s.nodeType!==8;){if(!r){s=null;break t}if(s=yn(s.nextSibling),s===null){s=null;break t}}r=s.data,s=r==="F!"||r==="F"?s:null}if(s){Qe=yn(s.nextSibling),a=s.data==="F!";break e}}ks(a)}a=!1}a&&(t=n[0])}}return n=Lt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zv,lastRenderedState:t},n.queue=a,n=fy.bind(null,we,a),a.dispatch=n,a=tf(!1),r=zh.bind(null,we,!1,a.queue),a=Lt(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,n=aS.bind(null,we,s,r,n),s.dispatch=n,a.memoizedState=e,[t,n,!1]}function Ip(e){var t=st();return Fv(t,$e,e)}function Fv(e,t,n){if(t=Ah(e,t,Zv)[0],e=Co(da)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=yi(t)}catch(i){throw i===vi?qc:i}else a=t;t=st();var s=t.queue,r=s.dispatch;return n!==t.memoizedState&&(we.flags|=2048,Ml(9,Ic(),sS.bind(null,s,n),null)),[a,r,e]}function sS(e,t){e.action=t}function Vp(e){var t=st(),n=$e;if(n!==null)return Fv(t,n,e);st(),t=t.memoizedState,n=st();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Ml(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=we.updateQueue,t===null&&(t=Eh(),we.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 Ic(){return{destroy:void 0,resource:void 0}}function Wv(){return st().memoizedState}function Eo(e,t,n,a){var s=Lt();a=a===void 0?null:a,we.flags|=e,s.memoizedState=Ml(1|t,Ic(),n,a)}function bi(e,t,n,a){var s=st();a=a===void 0?null:a;var r=s.memoizedState.inst;$e!==null&&a!==null&&Nh(a,$e.memoizedState.deps)?s.memoizedState=Ml(t,r,n,a):(we.flags|=e,s.memoizedState=Ml(1|t,r,n,a))}function Yp(e,t){Eo(8390656,8,e,t)}function Jv(e,t){bi(2048,8,e,t)}function ey(e,t){return bi(4,2,e,t)}function ty(e,t){return bi(4,4,e,t)}function ny(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 ay(e,t,n){n=n!=null?n.concat([e]):null,bi(4,4,ny.bind(null,t,e),n)}function Mh(){}function sy(e,t){var n=st();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Nh(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function ly(e,t){var n=st();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Nh(t,a[1]))return a[0];if(a=e(),Cs){Ba(!0);try{e()}finally{Ba(!1)}}return n.memoizedState=[a,t],a}function Oh(e,t,n){return n===void 0||es&1073741824?e.memoizedState=t:(e.memoizedState=n,e=Qy(),we.lanes|=e,ns|=e,n)}function ry(e,t,n,a){return tn(n,t)?n:Al.current!==null?(e=Oh(e,n,a),tn(e,t)||(xt=!0),e):es&42?(e=Qy(),we.lanes|=e,ns|=e,t):(xt=!0,e.memoizedState=n)}function iy(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,zh(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=eS(c,a);zr(e,t,f,Ft(e))}else zr(e,t,a,Ft(e))}catch(h){zr(e,t,{then:function(){},status:"rejected",reason:h},Ft())}finally{Ee.p=r,re.T=i}}function lS(){}function af(e,t,n,a){if(e.tag!==5)throw Error(U(476));var s=oy(e).queue;iy(e,s,t,ys,n===null?lS:function(){return cy(e),n(a)})}function oy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ys,baseState:ys,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:ys},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function cy(e){var t=oy(e).next.queue;zr(e,t,{},Ft())}function Dh(){return Et(Wr)}function uy(){return st().memoizedState}function dy(){return st().memoizedState}function rS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ft();e=Pa(n);var a=Xa(t,e,n);a!==null&&(Wt(a,t,n),Mr(a,t,n)),t={cache:bh()},e.payload=t;return}t=t.return}}function iS(e,t,n){var a=Ft();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Vc(e)?hy(t,n):(n=gh(e,t,n,a),n!==null&&(Wt(n,e,a),my(n,t,a)))}function fy(e,t,n){var a=Ft();zr(e,t,n,a)}function zr(e,t,n,a){var s={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vc(e))hy(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 Bc(e,t,s,0),He===null&&Hc(),!1}catch{}finally{}if(n=gh(e,t,s,a),n!==null)return Wt(n,e,a),my(n,t,a),!0}return!1}function zh(e,t,n,a){if(a={lane:2,revertLane:Ih(),action:a,hasEagerState:!1,eagerState:null,next:null},Vc(e)){if(t)throw Error(U(479))}else t=gh(e,n,a,2),t!==null&&Wt(t,e,2)}function Vc(e){var t=e.alternate;return e===we||t!==null&&t===we}function hy(e,t){bl=Fo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function my(e,t,n){if(n&4194048){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,sv(e,n)}}var Jo={readContext:Et,use:Gc,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},py={readContext:Et,use:Gc,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:Yp,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Eo(4194308,4,ny.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Eo(4194308,4,e,t)},useInsertionEffect:function(e,t){Eo(4,2,e,t)},useMemo:function(e,t){var n=Lt();t=t===void 0?null:t;var a=e();if(Cs){Ba(!0);try{e()}finally{Ba(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Lt();if(n!==void 0){var s=n(t);if(Cs){Ba(!0);try{n(t)}finally{Ba(!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=iS.bind(null,we,e),[a.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=tf(e);var t=e.queue,n=fy.bind(null,we,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Mh,useDeferredValue:function(e,t){var n=Lt();return Oh(n,e,t)},useTransition:function(){var e=tf(!1);return e=iy.bind(null,we,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=we,s=Lt();if(Ce){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),He===null)throw Error(U(349));ke&124||Gv(a,t,n)}s.memoizedState=n;var r={value:n,getSnapshot:t};return s.queue=r,Yp(Vv.bind(null,a,r,e),[e]),a.flags|=2048,Ml(9,Ic(),Iv.bind(null,a,r,n,t),null),n},useId:function(){var e=Lt(),t=He.identifierPrefix;if(Ce){var n=aa,a=na;n=(a&~(1<<32-Zt(a)-1)).toString(32)+n,t="«"+t+"R"+n,n=Wo++,0<n&&(t+="H"+n.toString(32)),t+="»"}else n=tS++,t="«"+t+"r"+n.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Dh,useFormState:Gp,useActionState:Gp,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=zh.bind(null,we,!0,n),n.dispatch=t,[e,t]},useMemoCache:Rh,useCacheRefresh:function(){return Lt().memoizedState=rS.bind(null,we)}},gy={readContext:Et,use:Gc,useCallback:sy,useContext:Et,useEffect:Jv,useImperativeHandle:ay,useInsertionEffect:ey,useLayoutEffect:ty,useMemo:ly,useReducer:Co,useRef:Wv,useState:function(){return Co(da)},useDebugValue:Mh,useDeferredValue:function(e,t){var n=st();return ry(n,$e.memoizedState,e,t)},useTransition:function(){var e=Co(da)[0],t=st().memoizedState;return[typeof e=="boolean"?e:yi(e),t]},useSyncExternalStore:qv,useId:uy,useHostTransitionStatus:Dh,useFormState:Ip,useActionState:Ip,useOptimistic:function(e,t){var n=st();return Xv(n,$e,e,t)},useMemoCache:Rh,useCacheRefresh:dy},oS={readContext:Et,use:Gc,useCallback:sy,useContext:Et,useEffect:Jv,useImperativeHandle:ay,useInsertionEffect:ey,useLayoutEffect:ty,useMemo:ly,useReducer:Iu,useRef:Wv,useState:function(){return Iu(da)},useDebugValue:Mh,useDeferredValue:function(e,t){var n=st();return $e===null?Oh(n,e,t):ry(n,$e.memoizedState,e,t)},useTransition:function(){var e=Iu(da)[0],t=st().memoizedState;return[typeof e=="boolean"?e:yi(e),t]},useSyncExternalStore:qv,useId:uy,useHostTransitionStatus:Dh,useFormState:Vp,useActionState:Vp,useOptimistic:function(e,t){var n=st();return $e!==null?Xv(n,$e,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Rh,useCacheRefresh:dy},wl=null,Kr=0;function eo(e){var t=Kr;return Kr+=1,wl===null&&(wl=[]),$v(wl,e,t)}function cr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function to(e,t){throw t.$$typeof===U1?Error(U(525)):(e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Pp(e){var t=e._init;return t(e._payload)}function xy(e){function t(x,p){if(e){var y=x.deletions;y===null?(x.deletions=[p],x.flags|=16):y.push(p)}}function n(x,p){if(!e)return null;for(;p!==null;)t(x,p),p=p.sibling;return null}function a(x){for(var p=new Map;x!==null;)x.key!==null?p.set(x.key,x):p.set(x.index,x),x=x.sibling;return p}function s(x,p){return x=oa(x,p),x.index=0,x.sibling=null,x}function r(x,p,y){return x.index=y,e?(y=x.alternate,y!==null?(y=y.index,y<p?(x.flags|=67108866,p):y):(x.flags|=67108866,p)):(x.flags|=1048576,p)}function i(x){return e&&x.alternate===null&&(x.flags|=67108866),x}function o(x,p,y,w){return p===null||p.tag!==6?(p=Bu(y,x.mode,w),p.return=x,p):(p=s(p,y),p.return=x,p)}function c(x,p,y,w){var _=y.type;return _===sl?f(x,p,y.props.children,w,y.key):p!==null&&(p.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Da&&Pp(_)===p.type)?(p=s(p,y.props),cr(p,y),p.return=x,p):(p=ko(y.type,y.key,y.props,null,x.mode,w),cr(p,y),p.return=x,p)}function d(x,p,y,w){return p===null||p.tag!==4||p.stateNode.containerInfo!==y.containerInfo||p.stateNode.implementation!==y.implementation?(p=qu(y,x.mode,w),p.return=x,p):(p=s(p,y.children||[]),p.return=x,p)}function f(x,p,y,w,_){return p===null||p.tag!==7?(p=bs(y,x.mode,w,_),p.return=x,p):(p=s(p,y),p.return=x,p)}function h(x,p,y){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return p=Bu(""+p,x.mode,y),p.return=x,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Xi:return y=ko(p.type,p.key,p.props,null,x.mode,y),cr(y,p),y.return=x,y;case gr:return p=qu(p,x.mode,y),p.return=x,p;case Da:var w=p._init;return p=w(p._payload),h(x,p,y)}if(xr(p)||lr(p))return p=bs(p,x.mode,y,null),p.return=x,p;if(typeof p.then=="function")return h(x,eo(p),y);if(p.$$typeof===ta)return h(x,Wi(x,p),y);to(x,p)}return null}function m(x,p,y,w){var _=p!==null?p.key:null;if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return _!==null?null:o(x,p,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Xi:return y.key===_?c(x,p,y,w):null;case gr:return y.key===_?d(x,p,y,w):null;case Da:return _=y._init,y=_(y._payload),m(x,p,y,w)}if(xr(y)||lr(y))return _!==null?null:f(x,p,y,w,null);if(typeof y.then=="function")return m(x,p,eo(y),w);if(y.$$typeof===ta)return m(x,p,Wi(x,y),w);to(x,y)}return null}function g(x,p,y,w,_){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return x=x.get(y)||null,o(p,x,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Xi:return x=x.get(w.key===null?y:w.key)||null,c(p,x,w,_);case gr:return x=x.get(w.key===null?y:w.key)||null,d(p,x,w,_);case Da:var k=w._init;return w=k(w._payload),g(x,p,y,w,_)}if(xr(w)||lr(w))return x=x.get(y)||null,f(p,x,w,_,null);if(typeof w.then=="function")return g(x,p,y,eo(w),_);if(w.$$typeof===ta)return g(x,p,y,Wi(p,w),_);to(p,w)}return null}function j(x,p,y,w){for(var _=null,k=null,N=p,S=p=0,M=null;N!==null&&S<y.length;S++){N.index>S?(M=N,N=null):M=N.sibling;var O=m(x,N,y[S],w);if(O===null){N===null&&(N=M);break}e&&N&&O.alternate===null&&t(x,N),p=r(O,p,S),k===null?_=O:k.sibling=O,k=O,N=M}if(S===y.length)return n(x,N),Ce&&ps(x,S),_;if(N===null){for(;S<y.length;S++)N=h(x,y[S],w),N!==null&&(p=r(N,p,S),k===null?_=N:k.sibling=N,k=N);return Ce&&ps(x,S),_}for(N=a(N);S<y.length;S++)M=g(N,x,S,y[S],w),M!==null&&(e&&M.alternate!==null&&N.delete(M.key===null?S:M.key),p=r(M,p,S),k===null?_=M:k.sibling=M,k=M);return e&&N.forEach(function(z){return t(x,z)}),Ce&&ps(x,S),_}function v(x,p,y,w){if(y==null)throw Error(U(151));for(var _=null,k=null,N=p,S=p=0,M=null,O=y.next();N!==null&&!O.done;S++,O=y.next()){N.index>S?(M=N,N=null):M=N.sibling;var z=m(x,N,O.value,w);if(z===null){N===null&&(N=M);break}e&&N&&z.alternate===null&&t(x,N),p=r(z,p,S),k===null?_=z:k.sibling=z,k=z,N=M}if(O.done)return n(x,N),Ce&&ps(x,S),_;if(N===null){for(;!O.done;S++,O=y.next())O=h(x,O.value,w),O!==null&&(p=r(O,p,S),k===null?_=O:k.sibling=O,k=O);return Ce&&ps(x,S),_}for(N=a(N);!O.done;S++,O=y.next())O=g(N,x,S,O.value,w),O!==null&&(e&&O.alternate!==null&&N.delete(O.key===null?S:O.key),p=r(O,p,S),k===null?_=O:k.sibling=O,k=O);return e&&N.forEach(function(B){return t(x,B)}),Ce&&ps(x,S),_}function b(x,p,y,w){if(typeof y=="object"&&y!==null&&y.type===sl&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Xi:e:{for(var _=y.key;p!==null;){if(p.key===_){if(_=y.type,_===sl){if(p.tag===7){n(x,p.sibling),w=s(p,y.props.children),w.return=x,x=w;break e}}else if(p.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Da&&Pp(_)===p.type){n(x,p.sibling),w=s(p,y.props),cr(w,y),w.return=x,x=w;break e}n(x,p);break}else t(x,p);p=p.sibling}y.type===sl?(w=bs(y.props.children,x.mode,w,y.key),w.return=x,x=w):(w=ko(y.type,y.key,y.props,null,x.mode,w),cr(w,y),w.return=x,x=w)}return i(x);case gr:e:{for(_=y.key;p!==null;){if(p.key===_)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(x,p.sibling),w=s(p,y.children||[]),w.return=x,x=w;break e}else{n(x,p);break}else t(x,p);p=p.sibling}w=qu(y,x.mode,w),w.return=x,x=w}return i(x);case Da:return _=y._init,y=_(y._payload),b(x,p,y,w)}if(xr(y))return j(x,p,y,w);if(lr(y)){if(_=lr(y),typeof _!="function")throw Error(U(150));return y=_.call(y),v(x,p,y,w)}if(typeof y.then=="function")return b(x,p,eo(y),w);if(y.$$typeof===ta)return b(x,p,Wi(x,y),w);to(x,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,p!==null&&p.tag===6?(n(x,p.sibling),w=s(p,y),w.return=x,x=w):(n(x,p),w=Bu(y,x.mode,w),w.return=x,x=w),i(x)):n(x,p)}return function(x,p,y,w){try{Kr=0;var _=b(x,p,y,w);return wl=null,_}catch(N){if(N===vi||N===qc)throw N;var k=Kt(29,N,null,x.mode);return k.lanes=w,k.return=x,k}finally{}}}var Ol=xy(!0),vy=xy(!1),hn=In(null),zn=null;function La(e){var t=e.alternate;Ie(ut,ut.current&1),Ie(hn,e),zn===null&&(t===null||Al.current!==null||t.memoizedState!==null)&&(zn=e)}function yy(e){if(e.tag===22){if(Ie(ut,ut.current),Ie(hn,e),zn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(zn=e)}}else Ua()}function Ua(){Ie(ut,ut.current),Ie(hn,hn.current)}function la(e){vt(hn),zn===e&&(zn=null),vt(ut)}var ut=In(0);function ec(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==="$?"||jf(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 Vu(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 sf={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Ft(),s=Pa(a);s.payload=t,n!=null&&(s.callback=n),t=Xa(e,s,a),t!==null&&(Wt(t,e,a),Mr(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Ft(),s=Pa(a);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Xa(e,s,a),t!==null&&(Wt(t,e,a),Mr(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ft(),a=Pa(n);a.tag=2,t!=null&&(a.callback=t),t=Xa(e,a,n),t!==null&&(Wt(t,e,n),Mr(t,e,n))}};function Xp(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?!Yr(n,a)||!Yr(s,r):!0}function Kp(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&&sf.enqueueReplaceState(t,t.state,null)}function Es(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 tc=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 by(e){tc(e)}function jy(e){console.error(e)}function wy(e){tc(e)}function nc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Qp(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 lf(e,t,n){return n=Pa(n),n.tag=3,n.payload={element:null},n.callback=function(){nc(e,t)},n}function _y(e){return e=Pa(e),e.tag=3,e}function Ny(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(){Qp(t,n,a)}}var i=n.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){Qp(t,n,a),typeof s!="function"&&(Ka===null?Ka=new Set([this]):Ka.add(this));var o=a.stack;this.componentDidCatch(a.value,{componentStack:o!==null?o:""})})}function cS(e,t,n,a,s){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&gi(t,n,s,!0),n=hn.current,n!==null){switch(n.tag){case 13:return zn===null?mf():n.alternate===null&&Fe===0&&(Fe=3),n.flags&=-257,n.flags|=65536,n.lanes=s,a===Fd?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),td(e,a,s)),!1;case 22:return n.flags|=65536,a===Fd?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)),td(e,a,s)),!1}throw Error(U(435,n.tag))}return td(e,a,s),mf(),!1}if(Ce)return t=hn.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==Pd&&(e=Error(U(422),{cause:a}),Pr(un(e,n)))):(a!==Pd&&(t=Error(U(423),{cause:a}),Pr(un(t,n))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=un(a,n),s=lf(e.stateNode,a,s),Gu(e,s),Fe!==4&&(Fe=2)),!1;var r=Error(U(520),{cause:a});if(r=un(r,n),Ur===null?Ur=[r]:Ur.push(r),Fe!==4&&(Fe=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=lf(n.stateNode,a,e),Gu(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"&&(Ka===null||!Ka.has(r))))return n.flags|=65536,s&=-s,n.lanes|=s,s=_y(s),Ny(s,e,n,a),Gu(n,s),!1}n=n.return}while(n!==null);return!1}var Sy=Error(U(461)),xt=!1;function jt(e,t,n,a){t.child=e===null?vy(t,null,n,a):Ol(t,e.child,n,a)}function Zp(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 Ts(t),a=Sh(e,t,n,i,r,s),o=kh(),e!==null&&!xt?(Th(e,t,s),fa(e,t,s)):(Ce&&o&&vh(t),t.flags|=1,jt(e,t,a,s),t.child)}function Fp(e,t,n,a,s){if(e===null){var r=n.type;return typeof r=="function"&&!xh(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,ky(e,t,r,a,s)):(e=ko(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:Yr,n(i,a)&&e.ref===t.ref)return fa(e,t,s)}return t.flags|=1,e=oa(r,a),e.ref=t.ref,e.return=t,t.child=e}function ky(e,t,n,a,s){if(e!==null){var r=e.memoizedProps;if(Yr(r,a)&&e.ref===t.ref)if(xt=!1,t.pendingProps=a=r,$h(e,s))e.flags&131072&&(xt=!0);else return t.lanes=e.lanes,fa(e,t,s)}return rf(e,t,n,a,s)}function Ty(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 Wp(e,t,a,n)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&To(t,r!==null?r.cachePool:null),r!==null?Hp(t,r):ef(),yy(t);else return t.lanes=t.childLanes=536870912,Wp(e,t,r!==null?r.baseLanes|n:n,n)}else r!==null?(To(t,r.cachePool),Hp(t,r),Ua(),t.memoizedState=null):(e!==null&&To(t,null),ef(),Ua());return jt(e,t,s,n),t.child}function Wp(e,t,n,a){var s=jh();return s=s===null?null:{parent:ct._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&To(t,null),ef(),yy(t),e!==null&&gi(e,t,a,!0),null}function Ro(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 rf(e,t,n,a,s){return Ts(t),n=Sh(e,t,n,a,void 0,s),a=kh(),e!==null&&!xt?(Th(e,t,s),fa(e,t,s)):(Ce&&a&&vh(t),t.flags|=1,jt(e,t,n,s),t.child)}function Jp(e,t,n,a,s,r){return Ts(t),t.updateQueue=null,n=Bv(t,a,n,s),Hv(e),a=kh(),e!==null&&!xt?(Th(e,t,r),fa(e,t,r)):(Ce&&a&&vh(t),t.flags|=1,jt(e,t,n,r),t.child)}function eg(e,t,n,a,s){if(Ts(t),t.stateNode===null){var r=fl,i=n.contextType;typeof i=="object"&&i!==null&&(r=Et(i)),r=new n(a,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=sf,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=a,r.state=t.memoizedState,r.refs={},wh(t),i=n.contextType,r.context=typeof i=="object"&&i!==null?Et(i):fl,r.state=t.memoizedState,i=n.getDerivedStateFromProps,typeof i=="function"&&(Vu(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&&sf.enqueueReplaceState(r,r.state,null),Dr(t,a,r,s),Or(),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=Es(n,o);r.props=c;var d=r.context,f=n.contextType;i=fl,typeof f=="object"&&f!==null&&(i=Et(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)&&Kp(t,r,a,i),za=!1;var m=t.memoizedState;r.state=m,Dr(t,a,r,s),Or(),d=t.memoizedState,o||m!==d||za?(typeof h=="function"&&(Vu(t,n,h,a),d=t.memoizedState),(c=za||Xp(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,Wd(e,t),i=t.memoizedProps,f=Es(n,i),r.props=f,h=t.pendingProps,m=r.context,d=n.contextType,c=fl,typeof d=="object"&&d!==null&&(c=Et(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)&&Kp(t,r,a,c),za=!1,m=t.memoizedState,r.state=m,Dr(t,a,r,s),Or();var g=t.memoizedState;i!==h||m!==g||za||e!==null&&e.dependencies!==null&&Qo(e.dependencies)?(typeof o=="function"&&(Vu(t,n,o,a),g=t.memoizedState),(f=za||Xp(t,n,f,a,m,g,c)||e!==null&&e.dependencies!==null&&Qo(e.dependencies))?(d||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(a,g,c),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(a,g,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=g),r.props=a,r.state=g,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,Ro(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=Ol(t,e.child,null,s),t.child=Ol(t,null,n,s)):jt(e,t,n,s),t.memoizedState=r.state,e=t.child):e=fa(e,t,s),e}function tg(e,t,n,a){return pi(),t.flags|=256,jt(e,t,n,a),t.child}var Yu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pu(e){return{baseLanes:e,cachePool:Dv()}}function Xu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=dn),e}function Cy(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:(ut.current&2)!==0),i&&(s=!0,t.flags&=-129),i=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(s?La(t):Ua(),Ce){var o=Qe,c;if(c=o){e:{for(c=o,o=En;c.nodeType!==8;){if(!o){o=null;break e}if(c=yn(c.nextSibling),c===null){o=null;break e}}o=c}o!==null?(t.memoizedState={dehydrated:o,treeContext:js!==null?{id:na,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},c=Kt(18,null,null,0),c.stateNode=o,c.return=t,t.child=c,Mt=t,Qe=null,c=!0):c=!1}c||ks(t)}if(o=t.memoizedState,o!==null&&(o=o.dehydrated,o!==null))return jf(o)?t.lanes=32:t.lanes=536870912,null;la(t)}return o=a.children,a=a.fallback,s?(Ua(),s=t.mode,o=ac({mode:"hidden",children:o},s),a=bs(a,s,n,null),o.return=t,a.return=t,o.sibling=a,t.child=o,s=t.child,s.memoizedState=Pu(n),s.childLanes=Xu(e,i,n),t.memoizedState=Yu,a):(La(t),of(t,o))}if(c=e.memoizedState,c!==null&&(o=c.dehydrated,o!==null)){if(r)t.flags&256?(La(t),t.flags&=-257,t=Ku(e,t,n)):t.memoizedState!==null?(Ua(),t.child=e.child,t.flags|=128,t=null):(Ua(),s=a.fallback,o=t.mode,a=ac({mode:"visible",children:a.children},o),s=bs(s,o,n,null),s.flags|=2,a.return=t,s.return=t,a.sibling=s,t.child=a,Ol(t,e.child,null,n),a=t.child,a.memoizedState=Pu(n),a.childLanes=Xu(e,i,n),t.memoizedState=Yu,t=s);else if(La(t),jf(o)){if(i=o.nextSibling&&o.nextSibling.dataset,i)var d=i.dgst;i=d,a=Error(U(419)),a.stack="",a.digest=i,Pr({value:a,source:null,stack:null}),t=Ku(e,t,n)}else if(xt||gi(e,t,n,!1),i=(n&e.childLanes)!==0,xt||i){if(i=He,i!==null&&(a=n&-n,a=a&42?1:rh(a),a=a&(i.suspendedLanes|n)?0:a,a!==0&&a!==c.retryLane))throw c.retryLane=a,Vl(e,a),Wt(i,e,a),Sy;o.data==="$?"||mf(),t=Ku(e,t,n)}else o.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,Qe=yn(o.nextSibling),Mt=t,Ce=!0,ws=null,En=!1,e!==null&&(rn[on++]=na,rn[on++]=aa,rn[on++]=js,na=e.id,aa=e.overflow,js=t),t=of(t,a.children),t.flags|=4096);return t}return s?(Ua(),s=a.fallback,o=t.mode,c=e.child,d=c.sibling,a=oa(c,{mode:"hidden",children:a.children}),a.subtreeFlags=c.subtreeFlags&65011712,d!==null?s=oa(d,s):(s=bs(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=Pu(n):(c=o.cachePool,c!==null?(d=ct._currentValue,c=c.parent!==d?{parent:d,pool:d}:c):c=Dv(),o={baseLanes:o.baseLanes|n,cachePool:c}),s.memoizedState=o,s.childLanes=Xu(e,i,n),t.memoizedState=Yu,a):(La(t),n=e.child,e=n.sibling,n=oa(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 of(e,t){return t=ac({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ac(e,t){return e=Kt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Ku(e,t,n){return Ol(t,e.child,null,n),e=of(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ng(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Kd(e.return,t,n)}function Qu(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 Ey(e,t,n){var a=t.pendingProps,s=a.revealOrder,r=a.tail;if(jt(e,t,a.children,n),a=ut.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&&ng(e,n,t);else if(e.tag===19)ng(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(Ie(ut,a),s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&ec(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Qu(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&&ec(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Qu(t,!0,n,null,r);break;case"together":Qu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ns|=t.lanes,!(n&t.childLanes))if(e!==null){if(gi(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=oa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oa(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&&Qo(e)))}function uS(e,t,n){switch(t.tag){case 3:qo(t,t.stateNode.containerInfo),$a(t,ct,e.memoizedState.cache),pi();break;case 27:case 5:$d(t);break;case 4:qo(t,t.stateNode.containerInfo);break;case 10:$a(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(La(t),t.flags|=128,null):n&t.child.childLanes?Cy(e,t,n):(La(t),e=fa(e,t,n),e!==null?e.sibling:null);La(t);break;case 19:var s=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(gi(e,t,n,!1),a=(n&t.childLanes)!==0),s){if(a)return Ey(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ie(ut,ut.current),a)break;return null;case 22:case 23:return t.lanes=0,Ty(e,t,n);case 24:$a(t,ct,e.memoizedState.cache)}return fa(e,t,n)}function Ry(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)xt=!0;else{if(!$h(e,n)&&!(t.flags&128))return xt=!1,uS(e,t,n);xt=!!(e.flags&131072)}else xt=!1,Ce&&t.flags&1048576&&Mv(t,Ko,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")xh(a)?(e=Es(a,e),t.tag=1,t=eg(null,t,a,e,n)):(t.tag=0,t=rf(null,t,a,e,n));else{if(a!=null){if(s=a.$$typeof,s===ah){t.tag=11,t=Zp(null,t,a,e,n);break e}else if(s===sh){t.tag=14,t=Fp(null,t,a,e,n);break e}}throw t=Dd(a)||a,Error(U(306,t,""))}}return t;case 0:return rf(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,s=Es(a,t.pendingProps),eg(e,t,a,s,n);case 3:e:{if(qo(t,t.stateNode.containerInfo),e===null)throw Error(U(387));a=t.pendingProps;var r=t.memoizedState;s=r.element,Wd(e,t),Dr(t,a,null,n);var i=t.memoizedState;if(a=i.cache,$a(t,ct,a),a!==r.cache&&Qd(t,[ct],n,!0),Or(),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=tg(e,t,a,n);break e}else if(a!==s){s=un(Error(U(424)),t),Pr(s),t=tg(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(Qe=yn(e.firstChild),Mt=t,Ce=!0,ws=null,En=!0,n=vy(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(pi(),a===s){t=fa(e,t,n);break e}jt(e,t,a,n)}t=t.child}return t;case 26:return Ro(e,t),e===null?(n=yg(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(n=t.type,e=t.pendingProps,a=uc(Ya.current).createElement(n),a[Ct]=t,a[qt]=e,_t(a,n,e),gt(a),t.stateNode=a):t.memoizedState=yg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $d(t),e===null&&Ce&&(a=t.stateNode=gb(t.type,t.pendingProps,Ya.current),Mt=t,En=!0,s=Qe,is(t.type)?(wf=s,Qe=yn(a.firstChild)):Qe=s),jt(e,t,t.pendingProps.children,n),Ro(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((s=a=Qe)&&(a=US(a,t.type,t.pendingProps,En),a!==null?(t.stateNode=a,Mt=t,Qe=yn(a.firstChild),En=!1,s=!0):s=!1),s||ks(t)),$d(t),s=t.type,r=t.pendingProps,i=e!==null?e.memoizedProps:null,a=r.children,yf(s,r)?a=null:i!==null&&yf(s,i)&&(t.flags|=32),t.memoizedState!==null&&(s=Sh(e,t,nS,null,null,n),Wr._currentValue=s),Ro(e,t),jt(e,t,a,n),t.child;case 6:return e===null&&Ce&&((e=n=Qe)&&(n=HS(n,t.pendingProps,En),n!==null?(t.stateNode=n,Mt=t,Qe=null,e=!0):e=!1),e||ks(t)),null;case 13:return Cy(e,t,n);case 4:return qo(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ol(t,null,a,n):jt(e,t,a,n),t.child;case 11:return Zp(e,t,t.type,t.pendingProps,n);case 7:return jt(e,t,t.pendingProps,n),t.child;case 8:return jt(e,t,t.pendingProps.children,n),t.child;case 12:return jt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,$a(t,t.type,a.value),jt(e,t,a.children,n),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,Ts(t),s=Et(s),a=a(s),t.flags|=1,jt(e,t,a,n),t.child;case 14:return Fp(e,t,t.type,t.pendingProps,n);case 15:return ky(e,t,t.type,t.pendingProps,n);case 19:return Ey(e,t,n);case 31:return a=t.pendingProps,n=t.mode,a={mode:a.mode,children:a.children},e===null?(n=ac(a,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=oa(e.child,a),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return Ty(e,t,n);case 24:return Ts(t),a=Et(ct),e===null?(s=jh(),s===null&&(s=He,r=bh(),s.pooledCache=r,r.refCount++,r!==null&&(s.pooledCacheLanes|=n),s=r),t.memoizedState={parent:a,cache:s},wh(t),$a(t,ct,s)):(e.lanes&n&&(Wd(e,t),Dr(t,null,null,n),Or()),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),$a(t,ct,a)):(a=r.cache,$a(t,ct,a),a!==s.cache&&Qd(t,[ct],n,!0))),jt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(U(156,t.tag))}function Zn(e){e.flags|=4}function ag(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!yb(t)){if(t=hn.current,t!==null&&((ke&4194048)===ke?zn!==null:(ke&62914560)!==ke&&!(ke&536870912)||t!==zn))throw Ar=Fd,zv;e.flags|=8192}}function no(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nv():536870912,e.lanes|=t,Dl|=t)}function ur(e,t){if(!Ce)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 dS(e,t,n){var a=t.pendingProps;switch(yh(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),ca(ct),Tl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(or(t)?Zn(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Op())),Pe(t),null;case 26:return n=t.memoizedState,e===null?(Zn(t),n!==null?(Pe(t),ag(t,n)):(Pe(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Zn(t),Pe(t),ag(t,n)):(Pe(t),t.flags&=-16777217):(e.memoizedProps!==a&&Zn(t),Pe(t),t.flags&=-16777217),null;case 27:Go(t),n=Ya.current;var s=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Zn(t);else{if(!a){if(t.stateNode===null)throw Error(U(166));return Pe(t),null}e=On.current,or(t)?Ap(t):(e=gb(s,a,n),t.stateNode=e,Zn(t))}return Pe(t),null;case 5:if(Go(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Zn(t);else{if(!a){if(t.stateNode===null)throw Error(U(166));return Pe(t),null}if(e=On.current,or(t))Ap(t);else{switch(s=uc(Ya.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[Ct]=t,e[qt]=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(_t(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&&Zn(t)}}return Pe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Zn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(U(166));if(e=Ya.current,or(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,s=Mt,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||hb(e.nodeValue,n)),e||ks(t)}else e=uc(e).createTextNode(a),e[Ct]=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=or(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[Ct]=t}else pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pe(t),s=!1}else s=Op(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(la(t),t):(la(t),null)}if(la(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),no(t,t.updateQueue),Pe(t),null;case 4:return Tl(),e===null&&Vh(t.stateNode.containerInfo),Pe(t),null;case 10:return ca(t.type),Pe(t),null;case 19:if(vt(ut),s=t.memoizedState,s===null)return Pe(t),null;if(a=(t.flags&128)!==0,r=s.rendering,r===null)if(a)ur(s,!1);else{if(Fe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(r=ec(e),r!==null){for(t.flags|=128,ur(s,!1),e=r.updateQueue,t.updateQueue=e,no(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Av(n,e),n=n.sibling;return Ie(ut,ut.current&1|2),t.child}e=e.sibling}s.tail!==null&&Dn()>lc&&(t.flags|=128,a=!0,ur(s,!1),t.lanes=4194304)}else{if(!a)if(e=ec(r),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,no(t,e),ur(s,!0),s.tail===null&&s.tailMode==="hidden"&&!r.alternate&&!Ce)return Pe(t),null}else 2*Dn()-s.renderingStartTime>lc&&n!==536870912&&(t.flags|=128,a=!0,ur(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=Dn(),t.sibling=null,e=ut.current,Ie(ut,a?e&1|2:e&1),t):(Pe(t),null);case 22:case 23:return la(t),_h(),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&&no(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&&vt(_s),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ca(ct),Pe(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function fS(e,t){switch(yh(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ca(ct),Tl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Go(t),null;case 13:if(la(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return vt(ut),null;case 4:return Tl(),null;case 10:return ca(t.type),null;case 22:case 23:return la(t),_h(),e!==null&&vt(_s),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ca(ct),null;case 25:return null;default:return null}}function Ay(e,t){switch(yh(t),t.tag){case 3:ca(ct),Tl();break;case 26:case 27:case 5:Go(t);break;case 4:Tl();break;case 13:la(t);break;case 19:vt(ut);break;case 10:ca(t.type);break;case 22:case 23:la(t),_h(),e!==null&&vt(_s);break;case 24:ca(ct)}}function ji(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 ts(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 My(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Uv(t,n)}catch(a){Le(e,e.return,a)}}}function Oy(e,t,n){n.props=Es(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Le(e,t,a)}}function $r(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 An(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 Dy(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 Zu(e,t,n){try{var a=e.stateNode;OS(a,e.type,n,t),a[qt]=t}catch(s){Le(e,e.return,s)}}function zy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&is(e.type)||e.tag===4}function Fu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zy(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&&is(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 cf(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=Kc));else if(a!==4&&(a===27&&is(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(cf(e,t,n),e=e.sibling;e!==null;)cf(e,t,n),e=e.sibling}function sc(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&&is(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(sc(e,t,n),e=e.sibling;e!==null;)sc(e,t,n),e=e.sibling}function $y(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);_t(t,a,n),t[Ct]=e,t[qt]=n}catch(r){Le(e,e.return,r)}}var ea=!1,Je=!1,Wu=!1,sg=typeof WeakSet=="function"?WeakSet:Set,pt=null;function hS(e,t){if(e=e.containerInfo,xf=mc,e=_v(e),mh(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 g;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),(g=h.firstChild)!==null;)m=h,h=g;for(;;){if(h===e)break t;if(m===n&&++d===s&&(o=i),m===r&&++f===a&&(c=i),(g=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=g}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(vf={focusedElem:e,selectionRange:n},mc=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,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 j=Es(n.type,s,n.elementType===n.type);e=a.getSnapshotBeforeUpdate(j,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)bf(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":bf(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,pt=e;break}pt=t.return}}function Ly(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Ca(e,n),a&4&&ji(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=Es(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){Le(n,n.return,i)}}a&64&&My(n),a&512&&$r(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{Uv(e,t)}catch(i){Le(n,n.return,i)}}break;case 27:t===null&&a&4&&$y(n);case 26:case 5:Ca(e,n),t===null&&a&4&&Dy(n),a&512&&$r(n,n.return);break;case 12:Ca(e,n);break;case 13:Ca(e,n),a&4&&By(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=wS.bind(null,n),BS(e,n))));break;case 22:if(a=n.memoizedState!==null||ea,!a){t=t!==null&&t.memoizedState!==null||Je,s=ea;var r=Je;ea=a,(Je=t)&&!r?Ma(e,n,(n.subtreeFlags&8772)!==0):Ca(e,n),ea=s,Je=r}break;case 30:break;default:Ca(e,n)}}function Uy(e){var t=e.alternate;t!==null&&(e.alternate=null,Uy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&oh(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 Fn(e,t,n){for(n=n.child;n!==null;)Hy(e,t,n),n=n.sibling}function Hy(e,t,n){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(ui,n)}catch{}switch(n.tag){case 26:Je||An(n,t),Fn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Je||An(n,t);var a=qe,s=Ut;is(n.type)&&(qe=n.stateNode,Ut=!1),Fn(e,t,n),Br(n.stateNode),qe=a,Ut=s;break;case 5:Je||An(n,t);case 6:if(a=qe,s=Ut,qe=null,Fn(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,gg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ti(e)):gg(qe,n.stateNode));break;case 4:a=qe,s=Ut,qe=n.stateNode.containerInfo,Ut=!0,Fn(e,t,n),qe=a,Ut=s;break;case 0:case 11:case 14:case 15:Je||ts(2,n,t),Je||ts(4,n,t),Fn(e,t,n);break;case 1:Je||(An(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Oy(n,t,a)),Fn(e,t,n);break;case 21:Fn(e,t,n);break;case 22:Je=(a=Je)||n.memoizedState!==null,Fn(e,t,n),Je=a;break;default:Fn(e,t,n)}}function By(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ti(e)}catch(n){Le(t,t.return,n)}}function mS(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new sg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new sg),t;default:throw Error(U(435,e.tag))}}function Ju(e,t){var n=mS(e);t.forEach(function(a){var s=_S.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(is(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));Hy(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;)qy(t,e),t=t.sibling}var xn=null;function qy(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&&(ts(3,e,e.return),ji(3,e),ts(5,e,e.return));break;case 1:Vt(t,e),Yt(e),a&512&&(Je||n===null||An(n,n.return)),a&64&&ea&&(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=xn;if(Vt(t,e),Yt(e),a&512&&(Je||n===null||An(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[hi]||r[Ct]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=s.createElement(a),s.head.insertBefore(r,s.querySelector("head > title"))),_t(r,a,n),r[Ct]=e,gt(r),a=r;break e;case"link":var i=jg("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),_t(r,a,n),s.head.appendChild(r);break;case"meta":if(i=jg("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),_t(r,a,n),s.head.appendChild(r);break;default:throw Error(U(468,a))}r[Ct]=e,gt(r),a=r}e.stateNode=a}else wg(s,e.type,e.stateNode);else e.stateNode=bg(s,a,e.memoizedProps);else r!==a?(r===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):r.count--,a===null?wg(s,e.type,e.stateNode):bg(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Zu(e,e.memoizedProps,n.memoizedProps)}break;case 27:Vt(t,e),Yt(e),a&512&&(Je||n===null||An(n,n.return)),n!==null&&a&4&&Zu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Vt(t,e),Yt(e),a&512&&(Je||n===null||An(n,n.return)),e.flags&32){s=e.stateNode;try{El(s,"")}catch(g){Le(e,e.return,g)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,Zu(e,s,n!==null?n.memoizedProps:s)),a&1024&&(Wu=!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(g){Le(e,e.return,g)}}break;case 3:if(Oo=null,s=xn,xn=dc(t.containerInfo),Vt(t,e),xn=s,Yt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ti(t.containerInfo)}catch(g){Le(e,e.return,g)}Wu&&(Wu=!1,Gy(e));break;case 4:a=xn,xn=dc(e.stateNode.containerInfo),Vt(t,e),Yt(e),xn=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)&&(qh=Dn()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ju(e,a)));break;case 22:s=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,d=ea,f=Je;if(ea=d||s,Je=f||c,Vt(t,e),Je=f,ea=d,Yt(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(n===null||c||ea||Je||gs(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(g){Le(c,c.return,g)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=s?"":c.memoizedProps}catch(g){Le(c,c.return,g)}}}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,Ju(e,n))));break;case 19:Vt(t,e),Yt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ju(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(zy(a)){n=a;break}a=a.return}if(n==null)throw Error(U(160));switch(n.tag){case 27:var s=n.stateNode,r=Fu(e);sc(e,r,s);break;case 5:var i=n.stateNode;n.flags&32&&(El(i,""),n.flags&=-33);var o=Fu(e);sc(e,o,i);break;case 3:case 4:var c=n.stateNode.containerInfo,d=Fu(e);cf(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 Gy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Gy(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;)Ly(e,t.alternate,t),t=t.sibling}function gs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ts(4,t,t.return),gs(t);break;case 1:An(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Oy(t,t.return,n),gs(t);break;case 27:Br(t.stateNode);case 26:case 5:An(t,t.return),gs(t);break;case 22:t.memoizedState===null&&gs(t);break;case 30:gs(t);break;default:gs(t)}e=e.sibling}}function Ma(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:Ma(s,r,n),ji(4,r);break;case 1:if(Ma(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++)Lv(c[s],o)}catch(d){Le(a,a.return,d)}}n&&i&64&&My(r),$r(r,r.return);break;case 27:$y(r);case 26:case 5:Ma(s,r,n),n&&a===null&&i&4&&Dy(r),$r(r,r.return);break;case 12:Ma(s,r,n);break;case 13:Ma(s,r,n),n&&i&4&&By(s,r);break;case 22:r.memoizedState===null&&Ma(s,r,n),$r(r,r.return);break;case 30:break;default:Ma(s,r,n)}t=t.sibling}}function Lh(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&&xi(n))}function Uh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xi(e))}function Cn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Iy(e,t,n,a),t=t.sibling}function Iy(e,t,n,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Cn(e,t,n,a),s&2048&&ji(9,t);break;case 1:Cn(e,t,n,a);break;case 3:Cn(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&&xi(e)));break;case 12:if(s&2048){Cn(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 Cn(e,t,n,a);break;case 13:Cn(e,t,n,a);break;case 23:break;case 22:r=t.stateNode,i=t.alternate,t.memoizedState!==null?r._visibility&2?Cn(e,t,n,a):Lr(e,t):r._visibility&2?Cn(e,t,n,a):(r._visibility|=2,nl(e,t,n,a,(t.subtreeFlags&10256)!==0)),s&2048&&Lh(i,t);break;case 24:Cn(e,t,n,a),s&2048&&Uh(t.alternate,t);break;default:Cn(e,t,n,a)}}function nl(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:nl(r,i,o,c,s),ji(8,i);break;case 23:break;case 22:var f=i.stateNode;i.memoizedState!==null?f._visibility&2?nl(r,i,o,c,s):Lr(r,i):(f._visibility|=2,nl(r,i,o,c,s)),s&&d&2048&&Lh(i.alternate,i);break;case 24:nl(r,i,o,c,s),s&&d&2048&&Uh(i.alternate,i);break;default:nl(r,i,o,c,s)}t=t.sibling}}function Lr(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:Lr(n,a),s&2048&&Lh(a.alternate,a);break;case 24:Lr(n,a),s&2048&&Uh(a.alternate,a);break;default:Lr(n,a)}t=t.sibling}}var yr=8192;function Ys(e){if(e.subtreeFlags&yr)for(e=e.child;e!==null;)Vy(e),e=e.sibling}function Vy(e){switch(e.tag){case 26:Ys(e),e.flags&yr&&e.memoizedState!==null&&JS(xn,e.memoizedState,e.memoizedProps);break;case 5:Ys(e);break;case 3:case 4:var t=xn;xn=dc(e.stateNode.containerInfo),Ys(e),xn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=yr,yr=16777216,Ys(e),yr=t):Ys(e));break;default:Ys(e)}}function Yy(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 dr(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];pt=a,Xy(a,e)}Yy(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Py(e),e=e.sibling}function Py(e){switch(e.tag){case 0:case 11:case 15:dr(e),e.flags&2048&&ts(9,e,e.return);break;case 3:dr(e);break;case 12:dr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ao(e)):dr(e);break;default:dr(e)}}function Ao(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];pt=a,Xy(a,e)}Yy(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ts(8,t,t.return),Ao(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ao(t));break;default:Ao(t)}e=e.sibling}}function Xy(e,t){for(;pt!==null;){var n=pt;switch(n.tag){case 0:case 11:case 15:ts(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:xi(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,pt=a;else e:for(n=e;pt!==null;){a=pt;var s=a.sibling,r=a.return;if(Uy(a),a===n){pt=null;break e}if(s!==null){s.return=r,pt=s;break e}pt=r}}}var pS={getCacheForType:function(e){var t=Et(ct),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},gS=typeof WeakMap=="function"?WeakMap:Map,Me=0,He=null,Ne=null,ke=0,Ae=0,Pt=null,Ga=!1,Yl=!1,Hh=!1,ha=0,Fe=0,ns=0,Ns=0,Bh=0,dn=0,Dl=0,Ur=null,Ht=null,uf=!1,qh=0,lc=1/0,rc=null,Ka=null,wt=0,Qa=null,zl=null,_l=0,df=0,ff=null,Ky=null,Hr=0,hf=null;function Ft(){if(Me&2&&ke!==0)return ke&-ke;if(re.T!==null){var e=Rl;return e!==0?e:Ih()}return lv()}function Qy(){dn===0&&(dn=!(ke&536870912)||Ce?tv():536870912);var e=hn.current;return e!==null&&(e.flags|=32),dn}function Wt(e,t,n){(e===He&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&($l(e,0),Ia(e,ke,dn,!1)),fi(e,n),(!(Me&2)||e!==He)&&(e===He&&(!(Me&2)&&(Ns|=n),Fe===4&&Ia(e,ke,dn,!1)),Vn(e))}function Zy(e,t,n){if(Me&6)throw Error(U(327));var a=!n&&(t&124)===0&&(t&e.expiredLanes)===0||di(e,t),s=a?yS(e,t):ed(e,t,!0),r=a;do{if(s===0){Yl&&!a&&Ia(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!xS(n)){s=ed(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=Ur;var c=o.current.memoizedState.isDehydrated;if(c&&($l(o,i).flags|=256),i=ed(o,i,!1),i!==2){if(Hh&&!c){o.errorRecoveryDisabledLanes|=r,Ns|=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){$l(e,0),Ia(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:Ia(a,t,dn,!Ga);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(U(329))}if((t&62914560)===t&&(s=qh+300-Dn(),10<s)){if(Ia(a,t,dn,!Ga),zc(a,0,!0)!==0)break e;a.timeoutHandle=pb(lg.bind(null,a,n,Ht,rc,uf,t,dn,Ns,Dl,Ga,r,2,-0,0),s);break e}lg(a,n,Ht,rc,uf,t,dn,Ns,Dl,Ga,r,0,-0,0)}}break}while(!0);Vn(e)}function lg(e,t,n,a,s,r,i,o,c,d,f,h,m,g){if(e.timeoutHandle=-1,h=t.subtreeFlags,(h&8192||(h&16785408)===16785408)&&(Fr={stylesheets:null,count:0,unsuspend:WS},Vy(t),h=ek(),h!==null)){e.cancelPendingCommit=h(ig.bind(null,e,t,r,n,a,s,i,o,c,f,1,m,g)),Ia(e,r,i,!d);return}ig(e,t,r,n,a,s,i,o,c)}function xS(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 Ia(e,t,n,a){t&=~Bh,t&=~Ns,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var r=31-Zt(s),i=1<<r;a[r]=-1,s&=~i}n!==0&&av(e,n,t)}function Yc(){return Me&6?!0:(wi(0),!1)}function Gh(){if(Ne!==null){if(Ae===0)var e=Ne.return;else e=Ne,sa=Hs=null,Ch(e),wl=null,Kr=0,e=Ne;for(;e!==null;)Ay(e.alternate,e),e=e.return;Ne=null}}function $l(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,zS(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Gh(),He=e,Ne=n=oa(e.current,null),ke=t,Ae=0,Pt=null,Ga=!1,Yl=di(e,t),Hh=!1,Dl=dn=Bh=Ns=ns=Fe=0,Ht=Ur=null,uf=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-Zt(a),r=1<<s;t|=e[s],a&=~r}return ha=t,Hc(),n}function Fy(e,t){we=null,re.H=Jo,t===vi||t===qc?(t=Lp(),Ae=3):t===zv?(t=Lp(),Ae=4):Ae=t===Sy?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Pt=t,Ne===null&&(Fe=1,nc(e,un(t,e.current)))}function Wy(){var e=re.H;return re.H=Jo,e===null?Jo:e}function Jy(){var e=re.A;return re.A=pS,e}function mf(){Fe=4,Ga||(ke&4194048)!==ke&&hn.current!==null||(Yl=!0),!(ns&134217727)&&!(Ns&134217727)||He===null||Ia(He,ke,dn,!1)}function ed(e,t,n){var a=Me;Me|=2;var s=Wy(),r=Jy();(He!==e||ke!==t)&&(rc=null,$l(e,t)),t=!1;var i=Fe;e:do try{if(Ae!==0&&Ne!==null){var o=Ne,c=Pt;switch(Ae){case 8:Gh(),i=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(t=!0);var d=Ae;if(Ae=0,Pt=null,pl(e,o,c,d),n&&Yl){i=0;break e}break;default:d=Ae,Ae=0,Pt=null,pl(e,o,c,d)}}vS(),i=Fe;break}catch(f){Fy(e,f)}while(!0);return t&&e.shellSuspendCounter++,sa=Hs=null,Me=a,re.H=s,re.A=r,Ne===null&&(He=null,ke=0,Hc()),i}function vS(){for(;Ne!==null;)eb(Ne)}function yS(e,t){var n=Me;Me|=2;var a=Wy(),s=Jy();He!==e||ke!==t?(rc=null,lc=Dn()+500,$l(e,t)):Yl=di(e,t);e:do try{if(Ae!==0&&Ne!==null){t=Ne;var r=Pt;t:switch(Ae){case 1:Ae=0,Pt=null,pl(e,t,r,1);break;case 2:case 9:if($p(r)){Ae=0,Pt=null,rg(t);break}t=function(){Ae!==2&&Ae!==9||He!==e||(Ae=7),Vn(e)},r.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:$p(r)?(Ae=0,Pt=null,rg(t)):(Ae=0,Pt=null,pl(e,t,r,7));break;case 5:var i=null;switch(Ne.tag){case 26:i=Ne.memoizedState;case 5:case 27:var o=Ne;if(!i||yb(i)){Ae=0,Pt=null;var c=o.sibling;if(c!==null)Ne=c;else{var d=o.return;d!==null?(Ne=d,Pc(d)):Ne=null}break t}}Ae=0,Pt=null,pl(e,t,r,5);break;case 6:Ae=0,Pt=null,pl(e,t,r,6);break;case 8:Gh(),Fe=6;break e;default:throw Error(U(462))}}bS();break}catch(f){Fy(e,f)}while(!0);return sa=Hs=null,re.H=a,re.A=s,Me=n,Ne!==null?0:(He=null,ke=0,Hc(),Fe)}function bS(){for(;Ne!==null&&!G1();)eb(Ne)}function eb(e){var t=Ry(e.alternate,e,ha);e.memoizedProps=e.pendingProps,t===null?Pc(e):Ne=t}function rg(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Jp(n,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=Jp(n,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Ch(t);default:Ay(n,t),t=Ne=Av(t,ha),t=Ry(n,t,ha)}e.memoizedProps=e.pendingProps,t===null?Pc(e):Ne=t}function pl(e,t,n,a){sa=Hs=null,Ch(t),wl=null,Kr=0;var s=t.return;try{if(cS(e,s,t,n,ke)){Fe=1,nc(e,un(n,e.current)),Ne=null;return}}catch(r){if(s!==null)throw Ne=s,r;Fe=1,nc(e,un(n,e.current)),Ne=null;return}t.flags&32768?(Ce||a===1?e=!0:Yl||ke&536870912?e=!1:(Ga=e=!0,(a===2||a===9||a===3||a===6)&&(a=hn.current,a!==null&&a.tag===13&&(a.flags|=16384))),tb(t,e)):Pc(t)}function Pc(e){var t=e;do{if(t.flags&32768){tb(t,Ga);return}e=t.return;var n=dS(t.alternate,t,ha);if(n!==null){Ne=n;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);Fe===0&&(Fe=5)}function tb(e,t){do{var n=fS(e.alternate,e);if(n!==null){n.flags&=32767,Ne=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=n}while(e!==null);Fe=6,Ne=null}function ig(e,t,n,a,s,r,i,o,c){e.cancelPendingCommit=null;do Xc();while(wt!==0);if(Me&6)throw Error(U(327));if(t!==null){if(t===e.current)throw Error(U(177));if(r=t.lanes|t.childLanes,r|=ph,W1(e,n,r,i,o,c),e===He&&(Ne=He=null,ke=0),zl=t,Qa=e,_l=n,df=r,ff=s,Ky=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,NS(Io,function(){return rb(),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=Me,Me|=4;try{hS(e,t,n)}finally{Me=i,Ee.p=s,re.T=a}}wt=1,nb(),ab(),sb()}}function nb(){if(wt===1){wt=0;var e=Qa,t=zl,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=Me;Me|=4;try{qy(t,e);var r=vf,i=_v(e.containerInfo),o=r.focusedElem,c=r.selectionRange;if(i!==o&&o&&o.ownerDocument&&wv(o.ownerDocument.documentElement,o)){if(c!==null&&mh(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 g=m.getSelection(),j=o.textContent.length,v=Math.min(c.start,j),b=c.end===void 0?v:Math.min(c.end,j);!g.extend&&v>b&&(i=b,b=v,v=i);var x=Cp(o,v),p=Cp(o,b);if(x&&p&&(g.rangeCount!==1||g.anchorNode!==x.node||g.anchorOffset!==x.offset||g.focusNode!==p.node||g.focusOffset!==p.offset)){var y=h.createRange();y.setStart(x.node,x.offset),g.removeAllRanges(),v>b?(g.addRange(y),g.extend(p.node,p.offset)):(y.setEnd(p.node,p.offset),g.addRange(y))}}}}for(h=[],g=o;g=g.parentNode;)g.nodeType===1&&h.push({element:g,left:g.scrollLeft,top:g.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<h.length;o++){var w=h[o];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}mc=!!xf,vf=xf=null}finally{Me=s,Ee.p=a,re.T=n}}e.current=t,wt=2}}function ab(){if(wt===2){wt=0;var e=Qa,t=zl,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=Me;Me|=4;try{Ly(e,t.alternate,t)}finally{Me=s,Ee.p=a,re.T=n}}wt=3}}function sb(){if(wt===4||wt===3){wt=0,I1();var e=Qa,t=zl,n=_l,a=Ky;t.subtreeFlags&10256||t.flags&10256?wt=5:(wt=0,zl=Qa=null,lb(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ka=null),ih(n),t=t.stateNode,Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(ui,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}}_l&3&&Xc(),Vn(e),s=e.pendingLanes,n&4194090&&s&42?e===hf?Hr++:(Hr=0,hf=e):Hr=0,wi(0)}}function lb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xi(t)))}function Xc(e){return nb(),ab(),sb(),rb()}function rb(){if(wt!==5)return!1;var e=Qa,t=df;df=0;var n=ih(_l),a=re.T,s=Ee.p;try{Ee.p=32>n?32:n,re.T=null,n=ff,ff=null;var r=Qa,i=_l;if(wt=0,zl=Qa=null,_l=0,Me&6)throw Error(U(331));var o=Me;if(Me|=4,Py(r.current),Iy(r,r.current,i,n),Me=o,wi(0,!1),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(ui,r)}catch{}return!0}finally{Ee.p=s,re.T=a,lb(e,t)}}function og(e,t,n){t=un(n,t),t=lf(e.stateNode,t,2),e=Xa(e,t,2),e!==null&&(fi(e,2),Vn(e))}function Le(e,t,n){if(e.tag===3)og(e,e,n);else for(;t!==null;){if(t.tag===3){og(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ka===null||!Ka.has(a))){e=un(n,e),n=_y(2),a=Xa(t,n,2),a!==null&&(Ny(n,a,t,e),fi(a,2),Vn(a));break}}t=t.return}}function td(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new gS;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)||(Hh=!0,s.add(n),e=jS.bind(null,e,t,n),t.then(e,e))}function jS(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&&(Fe===4||Fe===3&&(ke&62914560)===ke&&300>Dn()-qh?!(Me&2)&&$l(e,0):Bh|=n,Dl===ke&&(Dl=0)),Vn(e)}function ib(e,t){t===0&&(t=nv()),e=Vl(e,t),e!==null&&(fi(e,t),Vn(e))}function wS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ib(e,n)}function _S(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),ib(e,n)}function NS(e,t){return lh(e,t)}var ic=null,al=null,pf=!1,oc=!1,nd=!1,Ss=0;function Vn(e){e!==al&&e.next===null&&(al===null?ic=al=e:al=al.next=e),oc=!0,pf||(pf=!0,kS())}function wi(e,t){if(!nd&&oc){nd=!0;do for(var n=!1,a=ic;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-Zt(42|e)+1)-1,r&=s&~(i&~o),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,cg(a,r))}else r=ke,r=zc(a,a===He?r:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(r&3)||di(a,r)||(n=!0,cg(a,r));a=a.next}while(n);nd=!1}}function SS(){ob()}function ob(){oc=pf=!1;var e=0;Ss!==0&&(DS()&&(e=Ss),Ss=0);for(var t=Dn(),n=null,a=ic;a!==null;){var s=a.next,r=cb(a,t);r===0?(a.next=null,n===null?ic=s:n.next=s,s===null&&(al=n)):(n=a,(e!==0||r&3)&&(oc=!0)),a=s}wi(e)}function cb(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var i=31-Zt(r),o=1<<i,c=s[i];c===-1?(!(o&n)||o&a)&&(s[i]=F1(o,t)):c<=t&&(e.expiredLanes|=o),r&=~o}if(t=He,n=ke,n=zc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Cu(a),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||di(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Cu(a),ih(n)){case 2:case 8:n=Jx;break;case 32:n=Io;break;case 268435456:n=ev;break;default:n=Io}return a=ub.bind(null,e),n=lh(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Cu(a),e.callbackPriority=2,e.callbackNode=null,2}function ub(e,t){if(wt!==0&&wt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Xc()&&e.callbackNode!==n)return null;var a=ke;return a=zc(e,e===He?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Zy(e,a,t),cb(e,Dn()),e.callbackNode!=null&&e.callbackNode===n?ub.bind(null,e):null)}function cg(e,t){if(Xc())return null;Zy(e,t,!0)}function kS(){$S(function(){Me&6?lh(Wx,SS):ob()})}function Ih(){return Ss===0&&(Ss=tv()),Ss}function ug(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:_o(""+e)}function dg(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 TS(e,t,n,a,s){if(t==="submit"&&n&&n.stateNode===s){var r=ug((s[qt]||null).action),i=a.submitter;i&&(t=(t=i[qt]||null)?ug(t.formAction):i.getAttribute("formAction"),t!==null&&(r=t,i=null));var o=new $c("action","action",null,a,s);e.push({event:o,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ss!==0){var c=i?dg(s,i):new FormData(s);af(n,{pending:!0,data:c,method:s.method,action:r},null,c)}}else typeof r=="function"&&(o.preventDefault(),c=i?dg(s,i):new FormData(s),af(n,{pending:!0,data:c,method:s.method,action:r},r,c))},currentTarget:s}]})}}for(var ad=0;ad<Yd.length;ad++){var sd=Yd[ad],CS=sd.toLowerCase(),ES=sd[0].toUpperCase()+sd.slice(1);kn(CS,"on"+ES)}kn(Sv,"onAnimationEnd");kn(kv,"onAnimationIteration");kn(Tv,"onAnimationStart");kn("dblclick","onDoubleClick");kn("focusin","onFocus");kn("focusout","onBlur");kn(PN,"onTransitionRun");kn(XN,"onTransitionStart");kn(KN,"onTransitionCancel");kn(Cv,"onTransitionEnd");Cl("onMouseEnter",["mouseout","mouseover"]);Cl("onMouseLeave",["mouseout","mouseover"]);Cl("onPointerEnter",["pointerout","pointerover"]);Cl("onPointerLeave",["pointerout","pointerover"]);$s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$s("onBeforeInput",["compositionend","keypress","textInput","paste"]);$s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),RS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Qr));function db(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){tc(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){tc(f)}s.currentTarget=null,r=c}}}}function _e(e,t){var n=t[Ud];n===void 0&&(n=t[Ud]=new Set);var a=e+"__bubble";n.has(a)||(fb(t,e,2,!1),n.add(a))}function ld(e,t,n){var a=0;t&&(a|=4),fb(n,e,a,t)}var ao="_reactListening"+Math.random().toString(36).slice(2);function Vh(e){if(!e[ao]){e[ao]=!0,rv.forEach(function(n){n!=="selectionchange"&&(RS.has(n)||ld(n,!1,e),ld(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ao]||(t[ao]=!0,ld("selectionchange",!1,t))}}function fb(e,t,n,a){switch(Nb(t)){case 2:var s=ak;break;case 8:s=sk;break;default:s=Kh}n=s.bind(null,t,n,e),s=void 0,!Gd||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 rd(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=rl(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}mv(function(){var d=r,f=uh(n),h=[];e:{var m=Ev.get(e);if(m!==void 0){var g=$c,j=e;switch(e){case"keypress":if(So(n)===0)break e;case"keydown":case"keyup":g=NN;break;case"focusin":j="focus",g=$u;break;case"focusout":j="blur",g=$u;break;case"beforeblur":case"afterblur":g=$u;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":g=vp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=fN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=TN;break;case Sv:case kv:case Tv:g=pN;break;case Cv:g=EN;break;case"scroll":case"scrollend":g=uN;break;case"wheel":g=AN;break;case"copy":case"cut":case"paste":g=xN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=bp;break;case"toggle":case"beforetoggle":g=ON}var v=(t&4)!==0,b=!v&&(e==="scroll"||e==="scrollend"),x=v?m!==null?m+"Capture":null:m;v=[];for(var p=d,y;p!==null;){var w=p;if(y=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||y===null||x===null||(w=Ir(p,x),w!=null&&v.push(Zr(p,w,y))),b)break;p=p.return}0<v.length&&(m=new g(m,j,null,n,f),h.push({event:m,listeners:v}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",m&&n!==qd&&(j=n.relatedTarget||n.fromElement)&&(rl(j)||j[Gl]))break e;if((g||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,g?(j=n.relatedTarget||n.toElement,g=d,j=j?rl(j):null,j!==null&&(b=ci(j),v=j.tag,j!==b||v!==5&&v!==27&&v!==6)&&(j=null)):(g=null,j=d),g!==j)){if(v=vp,w="onMouseLeave",x="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(v=bp,w="onPointerLeave",x="onPointerEnter",p="pointer"),b=g==null?m:vr(g),y=j==null?m:vr(j),m=new v(w,p+"leave",g,n,f),m.target=b,m.relatedTarget=y,w=null,rl(f)===d&&(v=new v(x,p+"enter",j,n,f),v.target=y,v.relatedTarget=b,w=v),b=w,g&&j)t:{for(v=g,x=j,p=0,y=v;y;y=Ps(y))p++;for(y=0,w=x;w;w=Ps(w))y++;for(;0<p-y;)v=Ps(v),p--;for(;0<y-p;)x=Ps(x),y--;for(;p--;){if(v===x||x!==null&&v===x.alternate)break t;v=Ps(v),x=Ps(x)}v=null}else v=null;g!==null&&fg(h,m,g,v,!1),j!==null&&b!==null&&fg(h,b,j,v,!0)}}e:{if(m=d?vr(d):window,g=m.nodeName&&m.nodeName.toLowerCase(),g==="select"||g==="input"&&m.type==="file")var _=Np;else if(_p(m))if(bv)_=IN;else{_=qN;var k=BN}else g=m.nodeName,!g||g.toLowerCase()!=="input"||m.type!=="checkbox"&&m.type!=="radio"?d&&ch(d.elementType)&&(_=Np):_=GN;if(_&&(_=_(e,d))){yv(h,_,n,f);break e}k&&k(e,m,d),e==="focusout"&&d&&m.type==="number"&&d.memoizedProps.value!=null&&Bd(m,"number",m.value)}switch(k=d?vr(d):window,e){case"focusin":(_p(k)||k.contentEditable==="true")&&(cl=k,Id=d,Er=null);break;case"focusout":Er=Id=cl=null;break;case"mousedown":Vd=!0;break;case"contextmenu":case"mouseup":case"dragend":Vd=!1,Ep(h,n,f);break;case"selectionchange":if(YN)break;case"keydown":case"keyup":Ep(h,n,f)}var N;if(hh)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 ol?xv(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(gv&&n.locale!=="ko"&&(ol||S!=="onCompositionStart"?S==="onCompositionEnd"&&ol&&(N=pv()):(qa=f,dh="value"in qa?qa.value:qa.textContent,ol=!0)),k=cc(d,S),0<k.length&&(S=new yp(S,e,null,n,f),h.push({event:S,listeners:k}),N?S.data=N:(N=vv(n),N!==null&&(S.data=N)))),(N=zN?$N(e,n):LN(e,n))&&(S=cc(d,"onBeforeInput"),0<S.length&&(k=new yp("onBeforeInput","beforeinput",null,n,f),h.push({event:k,listeners:S}),k.data=N)),TS(h,e,d,n,f)}db(h,t)})}function Zr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function cc(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=Ir(e,n),s!=null&&a.unshift(Zr(e,s,r)),s=Ir(e,t),s!=null&&a.push(Zr(e,s,r))),e.tag===3)return a;e=e.return}return[]}function Ps(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function fg(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=Ir(n,r),d!=null&&i.unshift(Zr(n,d,c))):s||(d=Ir(n,r),d!=null&&i.push(Zr(n,d,c)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var AS=/\r\n?/g,MS=/\u0000|\uFFFD/g;function hg(e){return(typeof e=="string"?e:""+e).replace(AS,`
|
|
49
|
-
`).replace(MS,"")}function hb(e,t){return t=hg(t),hg(e)===t}function Kc(){}function ze(e,t,n,a,s,r){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||El(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&El(e,""+a);break;case"className":Zi(e,"class",a);break;case"tabIndex":Zi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Zi(e,n,a);break;case"style":hv(e,a,r);break;case"data":if(t!=="object"){Zi(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=_o(""+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=_o(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Kc);break;case"onScroll":a!=null&&_e("scroll",e);break;case"onScrollEnd":a!=null&&_e("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=_o(""+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":_e("beforetoggle",e),_e("toggle",e),wo(e,"popover",a);break;case"xlinkActuate":Qn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Qn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Qn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Qn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Qn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Qn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Qn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Qn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Qn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":wo(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=oN.get(n)||n,wo(e,n,a))}}function gf(e,t,n,a,s,r){switch(n){case"style":hv(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"?El(e,a):(typeof a=="number"||typeof a=="bigint")&&El(e,""+a);break;case"onScroll":a!=null&&_e("scroll",e);break;case"onScrollEnd":a!=null&&_e("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Kc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!iv.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[qt]||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,""):wo(e,n,a)}}}function _t(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",e),_e("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":_e("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)}}uv(e,r,o,c,d,i,s,!1),Vo(e);return;case"select":_e("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?xl(e,!!a,t,!1):n!=null&&xl(e,!!a,n,!0);return;case"textarea":_e("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)}fv(e,a,s,r),Vo(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":_e("beforetoggle",e),_e("toggle",e),_e("cancel",e),_e("close",e);break;case"iframe":case"object":_e("load",e);break;case"video":case"audio":for(a=0;a<Qr.length;a++)_e(Qr[a],e);break;case"image":_e("error",e),_e("load",e);break;case"details":_e("toggle",e);break;case"embed":case"source":case"link":_e("error",e),_e("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(ch(t)){for(f in n)n.hasOwnProperty(f)&&(a=n[f],a!==void 0&&gf(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 OS(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(g in n){var h=n[g];if(n.hasOwnProperty(g)&&h!=null)switch(g){case"checked":break;case"value":break;case"defaultValue":c=h;default:a.hasOwnProperty(g)||ze(e,t,g,null,a,h)}}for(var m in a){var g=a[m];if(h=n[m],a.hasOwnProperty(m)&&(g!=null||h!=null))switch(m){case"type":r=g;break;case"name":s=g;break;case"checked":d=g;break;case"defaultChecked":f=g;break;case"value":i=g;break;case"defaultValue":o=g;break;case"children":case"dangerouslySetInnerHTML":if(g!=null)throw Error(U(137,t));break;default:g!==h&&ze(e,t,m,g,a,h)}}Hd(e,i,o,c,d,f,r,s);return;case"select":g=i=o=m=null;for(r in n)if(c=n[r],n.hasOwnProperty(r)&&c!=null)switch(r){case"value":break;case"multiple":g=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=g,m!=null?xl(e,!!n,m,!1):!!a!=!!n&&(t!=null?xl(e,!!n,t,!0):xl(e,!!n,n?[]:"",!1));return;case"textarea":g=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":g=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)}dv(e,m,g);return;case"option":for(var j in n)if(m=n[j],n.hasOwnProperty(j)&&m!=null&&!a.hasOwnProperty(j))switch(j){case"selected":e.selected=!1;break;default:ze(e,t,j,null,a,m)}for(c in a)if(m=a[c],g=n[c],a.hasOwnProperty(c)&&m!==g&&(m!=null||g!=null))switch(c){case"selected":e.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:ze(e,t,c,m,a,g)}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],g=n[d],a.hasOwnProperty(d)&&m!==g&&(m!=null||g!=null))switch(d){case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(U(137,t));break;default:ze(e,t,d,m,a,g)}return;default:if(ch(t)){for(var b in n)m=n[b],n.hasOwnProperty(b)&&m!==void 0&&!a.hasOwnProperty(b)&&gf(e,t,b,void 0,a,m);for(f in a)m=a[f],g=n[f],!a.hasOwnProperty(f)||m===g||m===void 0&&g===void 0||gf(e,t,f,m,a,g);return}}for(var x in n)m=n[x],n.hasOwnProperty(x)&&m!=null&&!a.hasOwnProperty(x)&&ze(e,t,x,null,a,m);for(h in a)m=a[h],g=n[h],!a.hasOwnProperty(h)||m===g||m==null&&g==null||ze(e,t,h,m,a,g)}var xf=null,vf=null;function uc(e){return e.nodeType===9?e:e.ownerDocument}function mg(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 mb(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 yf(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 id=null;function DS(){var e=window.event;return e&&e.type==="popstate"?e===id?!1:(id=e,!0):(id=null,!1)}var pb=typeof setTimeout=="function"?setTimeout:void 0,zS=typeof clearTimeout=="function"?clearTimeout:void 0,pg=typeof Promise=="function"?Promise:void 0,$S=typeof queueMicrotask=="function"?queueMicrotask:typeof pg<"u"?function(e){return pg.resolve(null).then(e).catch(LS)}:pb;function LS(e){setTimeout(function(){throw e})}function is(e){return e==="head"}function gg(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&&Br(i.documentElement),n&2&&Br(i.body),n&4)for(n=i.head,Br(n),i=n.firstChild;i;){var o=i.nextSibling,c=i.nodeName;i[hi]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=o}}if(s===0){e.removeChild(r),ti(t);return}s--}else n==="$"||n==="$?"||n==="$!"?s++:a=n.charCodeAt(0)-48;else a=0;n=r}while(n);ti(t)}function bf(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":bf(n),oh(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function US(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[hi])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=yn(e.nextSibling),e===null)break}return null}function HS(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=yn(e.nextSibling),e===null))return null;return e}function jf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function BS(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 yn(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 wf=null;function xg(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 gb(e,t,n){switch(t=uc(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 Br(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);oh(e)}var mn=new Map,vg=new Set;function dc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var xa=Ee.d;Ee.d={f:qS,r:GS,D:IS,C:VS,L:YS,m:PS,X:KS,S:XS,M:QS};function qS(){var e=xa.f(),t=Yc();return e||t}function GS(e){var t=Il(e);t!==null&&t.tag===5&&t.type==="form"?cy(t):xa.r(e)}var Pl=typeof document>"u"?null:document;function xb(e,t,n){var a=Pl;if(a&&typeof t=="string"&&t){var s=cn(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof n=="string"&&(s+='[crossorigin="'+n+'"]'),vg.has(s)||(vg.add(s),e={rel:e,crossOrigin:n,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),_t(t,"link",e),gt(t),a.head.appendChild(t)))}}function IS(e){xa.D(e),xb("dns-prefetch",e,null)}function VS(e,t){xa.C(e,t),xb("preconnect",e,t)}function YS(e,t,n){xa.L(e,t,n);var a=Pl;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=Ll(e);break;case"script":r=Xl(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(_i(r))||t==="script"&&a.querySelector(Ni(r))||(t=a.createElement("link"),_t(t,"link",e),gt(t),a.head.appendChild(t)))}}function PS(e,t){xa.m(e,t);var n=Pl;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=Xl(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(Ni(r)))return}a=n.createElement("link"),_t(a,"link",e),gt(a),n.head.appendChild(a)}}}function XS(e,t,n){xa.S(e,t,n);var a=Pl;if(a&&e){var s=gl(a).hoistableStyles,r=Ll(e);t=t||"default";var i=s.get(r);if(!i){var o={loading:0,preload:null};if(i=a.querySelector(_i(r)))o.loading=5;else{e=Be({rel:"stylesheet",href:e,"data-precedence":t},n),(n=mn.get(r))&&Yh(e,n);var c=i=a.createElement("link");gt(c),_t(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,Mo(i,t,a)}i={type:"stylesheet",instance:i,count:1,state:o},s.set(r,i)}}}function KS(e,t){xa.X(e,t);var n=Pl;if(n&&e){var a=gl(n).hoistableScripts,s=Xl(e),r=a.get(s);r||(r=n.querySelector(Ni(s)),r||(e=Be({src:e,async:!0},t),(t=mn.get(s))&&Ph(e,t),r=n.createElement("script"),gt(r),_t(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(s,r))}}function QS(e,t){xa.M(e,t);var n=Pl;if(n&&e){var a=gl(n).hoistableScripts,s=Xl(e),r=a.get(s);r||(r=n.querySelector(Ni(s)),r||(e=Be({src:e,async:!0,type:"module"},t),(t=mn.get(s))&&Ph(e,t),r=n.createElement("script"),gt(r),_t(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(s,r))}}function yg(e,t,n,a){var s=(s=Ya.current)?dc(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=Ll(n.href),n=gl(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=Ll(n.href);var r=gl(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(_i(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||ZS(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=Xl(n),n=gl(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 Ll(e){return'href="'+cn(e)+'"'}function _i(e){return'link[rel="stylesheet"]['+e+"]"}function vb(e){return Be({},e,{"data-precedence":e.precedence,precedence:null})}function ZS(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}),_t(t,"link",n),gt(t),e.head.appendChild(t))}function Xl(e){return'[src="'+cn(e)+'"]'}function Ni(e){return"script[async]"+e}function bg(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,gt(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"),gt(a),_t(a,"style",s),Mo(a,n.precedence,e),t.instance=a;case"stylesheet":s=Ll(n.href);var r=e.querySelector(_i(s));if(r)return t.state.loading|=4,t.instance=r,gt(r),r;a=vb(n),(s=mn.get(s))&&Yh(a,s),r=(e.ownerDocument||e).createElement("link"),gt(r);var i=r;return i._p=new Promise(function(o,c){i.onload=o,i.onerror=c}),_t(r,"link",a),t.state.loading|=4,Mo(r,n.precedence,e),t.instance=r;case"script":return r=Xl(n.src),(s=e.querySelector(Ni(r)))?(t.instance=s,gt(s),s):(a=n,(s=mn.get(r))&&(a=Be({},n),Ph(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),gt(s),_t(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,Mo(a,n.precedence,e));return t.instance}function Mo(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 Yh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Ph(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Oo=null;function jg(e,t,n){if(Oo===null){var a=new Map,s=Oo=new Map;s.set(n,a)}else s=Oo,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[hi]||r[Ct]||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 wg(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function FS(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 yb(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Fr=null;function WS(){}function JS(e,t,n){if(Fr===null)throw Error(U(475));var a=Fr;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var s=Ll(n.href),r=e.querySelector(_i(s));if(r){e=r._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=fc.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=r,gt(r);return}r=e.ownerDocument||e,n=vb(n),(s=mn.get(s))&&Yh(n,s),r=r.createElement("link"),gt(r);var i=r;i._p=new Promise(function(o,c){i.onload=o,i.onerror=c}),_t(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=fc.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function ek(){if(Fr===null)throw Error(U(475));var e=Fr;return e.stylesheets&&e.count===0&&_f(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&_f(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 fc(){if(this.count--,this.count===0){if(this.stylesheets)_f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var hc=null;function _f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,hc=new Map,t.forEach(tk,e),hc=null,fc.call(e))}function tk(e,t){if(!(t.state.loading&4)){var n=hc.get(e);if(n)var a=n.get(null);else{n=new Map,hc.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=fc.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 Wr={$$typeof:ta,Provider:null,Consumer:null,_currentValue:ys,_currentValue2:ys,_threadCount:0};function nk(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=Eu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Eu(0),this.hiddenUpdates=Eu(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 bb(e,t,n,a,s,r,i,o,c,d,f,h){return e=new nk(e,t,n,i,o,c,d,h),t=1,r===!0&&(t|=24),r=Kt(3,null,null,t),e.current=r,r.stateNode=e,t=bh(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:a,isDehydrated:n,cache:t},wh(r),e}function jb(e){return e?(e=fl,e):fl}function wb(e,t,n,a,s,r){s=jb(s),a.context===null?a.context=s:a.pendingContext=s,a=Pa(t),a.payload={element:n},r=r===void 0?null:r,r!==null&&(a.callback=r),n=Xa(e,a,t),n!==null&&(Wt(n,e,t),Mr(n,e,t))}function _g(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Xh(e,t){_g(e,t),(e=e.alternate)&&_g(e,t)}function _b(e){if(e.tag===13){var t=Vl(e,67108864);t!==null&&Wt(t,e,67108864),Xh(e,67108864)}}var mc=!0;function ak(e,t,n,a){var s=re.T;re.T=null;var r=Ee.p;try{Ee.p=2,Kh(e,t,n,a)}finally{Ee.p=r,re.T=s}}function sk(e,t,n,a){var s=re.T;re.T=null;var r=Ee.p;try{Ee.p=8,Kh(e,t,n,a)}finally{Ee.p=r,re.T=s}}function Kh(e,t,n,a){if(mc){var s=Nf(a);if(s===null)rd(e,t,a,pc,n),Ng(e,a);else if(rk(s,e,t,n,a))a.stopPropagation();else if(Ng(e,a),t&4&&-1<lk.indexOf(e)){for(;s!==null;){var r=Il(s);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var i=ms(r.pendingLanes);if(i!==0){var o=r;for(o.pendingLanes|=2,o.entangledLanes|=2;i;){var c=1<<31-Zt(i);o.entanglements[1]|=c,i&=~c}Vn(r),!(Me&6)&&(lc=Dn()+500,wi(0))}}break;case 13:o=Vl(r,2),o!==null&&Wt(o,r,2),Yc(),Xh(r,2)}if(r=Nf(a),r===null&&rd(e,t,a,pc,n),r===s)break;s=r}s!==null&&a.stopPropagation()}else rd(e,t,a,null,n)}}function Nf(e){return e=uh(e),Qh(e)}var pc=null;function Qh(e){if(pc=null,e=rl(e),e!==null){var t=ci(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Kx(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 pc=e,null}function Nb(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(V1()){case Wx:return 2;case Jx:return 8;case Io:case Y1:return 32;case ev:return 268435456;default:return 32}default:return 32}}var Sf=!1,Za=null,Fa=null,Wa=null,Jr=new Map,ei=new Map,Ha=[],lk="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 Ng(e,t){switch(e){case"focusin":case"focusout":Za=null;break;case"dragenter":case"dragleave":Fa=null;break;case"mouseover":case"mouseout":Wa=null;break;case"pointerover":case"pointerout":Jr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ei.delete(t.pointerId)}}function fr(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=Il(t),t!==null&&_b(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function rk(e,t,n,a,s){switch(t){case"focusin":return Za=fr(Za,e,t,n,a,s),!0;case"dragenter":return Fa=fr(Fa,e,t,n,a,s),!0;case"mouseover":return Wa=fr(Wa,e,t,n,a,s),!0;case"pointerover":var r=s.pointerId;return Jr.set(r,fr(Jr.get(r)||null,e,t,n,a,s)),!0;case"gotpointercapture":return r=s.pointerId,ei.set(r,fr(ei.get(r)||null,e,t,n,a,s)),!0}return!1}function Sb(e){var t=rl(e.target);if(t!==null){var n=ci(t);if(n!==null){if(t=n.tag,t===13){if(t=Kx(n),t!==null){e.blockedOn=t,J1(e.priority,function(){if(n.tag===13){var a=Ft();a=rh(a);var s=Vl(n,a);s!==null&&Wt(s,n,a),Xh(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 Do(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Nf(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);qd=a,n.target.dispatchEvent(a),qd=null}else return t=Il(n),t!==null&&_b(t),e.blockedOn=n,!1;t.shift()}return!0}function Sg(e,t,n){Do(e)&&n.delete(t)}function ik(){Sf=!1,Za!==null&&Do(Za)&&(Za=null),Fa!==null&&Do(Fa)&&(Fa=null),Wa!==null&&Do(Wa)&&(Wa=null),Jr.forEach(Sg),ei.forEach(Sg)}function so(e,t){e.blockedOn===t&&(e.blockedOn=null,Sf||(Sf=!0,ft.unstable_scheduleCallback(ft.unstable_NormalPriority,ik)))}var lo=null;function kg(e){lo!==e&&(lo=e,ft.unstable_scheduleCallback(ft.unstable_NormalPriority,function(){lo===e&&(lo=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(Qh(a||n)===null)continue;break}var r=Il(n);r!==null&&(e.splice(t,3),t-=3,af(r,{pending:!0,data:s,method:n.method,action:a},a,s))}}))}function ti(e){function t(c){return so(c,e)}Za!==null&&so(Za,e),Fa!==null&&so(Fa,e),Wa!==null&&so(Wa,e),Jr.forEach(t),ei.forEach(t);for(var n=0;n<Ha.length;n++){var a=Ha[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ha.length&&(n=Ha[0],n.blockedOn===null);)Sb(n),n.blockedOn===null&&Ha.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[qt]||null;if(typeof r=="function")i||kg(n);else if(i){var o=null;if(r&&r.hasAttribute("formAction")){if(s=r,i=r[qt]||null)o=i.formAction;else if(Qh(s)!==null)continue}else o=i.action;typeof o=="function"?n[a+1]=o:(n.splice(a,3),a-=3),kg(n)}}}function Zh(e){this._internalRoot=e}Qc.prototype.render=Zh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));var n=t.current,a=Ft();wb(n,a,e,t,null,null)};Qc.prototype.unmount=Zh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wb(e.current,2,null,e,null,null),Yc(),t[Gl]=null}};function Qc(e){this._internalRoot=e}Qc.prototype.unstable_scheduleHydration=function(e){if(e){var t=lv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ha.length&&t!==0&&t<Ha[n].priority;n++);Ha.splice(n,0,e),n===0&&Sb(e)}};var Tg=Px.version;if(Tg!=="19.1.0")throw Error(U(527,Tg,"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?Qx(e):null,e=e===null?null:e.stateNode,e};var ok={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ro=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ro.isDisabled&&ro.supportsFiber)try{ui=ro.inject(ok),Qt=ro}catch{}}Oc.createRoot=function(e,t){if(!Xx(e))throw Error(U(299));var n=!1,a="",s=by,r=jy,i=wy,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=bb(e,1,!1,null,null,n,a,s,r,i,o,null),e[Gl]=t.current,Vh(e),new Zh(t)};Oc.hydrateRoot=function(e,t,n){if(!Xx(e))throw Error(U(299));var a=!1,s="",r=by,i=jy,o=wy,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=bb(e,1,!0,t,n??null,a,s,r,i,o,c,d),t.context=jb(null),n=t.current,a=Ft(),a=rh(a),s=Pa(a),s.callback=null,Xa(n,s,a),n=a,t.current.lanes=n,fi(t,n),Vn(t),e[Gl]=t.current,Vh(e),new Qc(t)};Oc.version="19.1.0";function kb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kb)}catch(e){console.error(e)}}kb(),Bx.exports=Oc;var ck=Bx.exports;const Tb=u.createContext(null);function Cb({data:e,router:t,identity:n,notify:a,children:s}){return l.jsx(Tb.Provider,{value:{data:e,router:t,identity:n,notify:a},children:s})}function Zc(){const e=u.useContext(Tb);if(!e)throw new Error("A shared app page rendered outside AppUiProvider.");return e}const uk={success:()=>{},error:()=>{}},os=()=>Zc().data,St=()=>Zc().router,Fc=()=>Zc().identity,Si=()=>Zc().notify??uk;function dk(){const{probe:e}=os(),{href:t,Link:n}=St(),a=Fc(),[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 fk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hk=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),Cg=e=>{const t=hk(e);return t.charAt(0).toUpperCase()+t.slice(1)},Eb=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),mk=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 pk={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 gk=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,...pk,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:Eb("lucide",s),...!r&&!mk(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(gk,{ref:r,iconNode:t,className:Eb(`lucide-${fk(Cg(e))}`,`lucide-${e}`,a),...s}));return n.displayName=Cg(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 xk=[["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"}]],vk=de("archive-restore",xk);/**
|
|
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 yk=[["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"}]],Eg=de("archive",yk);/**
|
|
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 bk=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],jk=de("arrow-down",bk);/**
|
|
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 wk=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],_k=de("arrow-left",wk);/**
|
|
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 Nk=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Sk=de("arrow-up",Nk);/**
|
|
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 kk=[["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"}]],Fh=de("bot",kk);/**
|
|
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 Tk=[["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"}]],Ck=de("briefcase",Tk);/**
|
|
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 Ek=[["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"}]],Rk=de("building-2",Ek);/**
|
|
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 Ak=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Kl=de("check",Ak);/**
|
|
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 Mk=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ok=de("chevron-down",Mk);/**
|
|
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 Dk=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Rb=de("chevron-right",Dk);/**
|
|
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 zk=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],$k=de("chevron-up",zk);/**
|
|
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"}]],Ab=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 Uk=[["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"}]],et=de("circle-alert",Uk);/**
|
|
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 Hk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Mb=de("circle-check",Hk);/**
|
|
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 Bk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],qk=de("circle",Bk);/**
|
|
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 Gk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Ik=de("clock",Gk);/**
|
|
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 Vk=[["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"}]],Wh=de("ellipsis",Vk);/**
|
|
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 Yk=[["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"}]],Jh=de("eye",Yk);/**
|
|
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 Pk=[["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"}]],Ob=de("folder-git-2",Pk);/**
|
|
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 Xk=[["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"}]],Kk=de("folder-git",Xk);/**
|
|
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 Qk=[["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"}]],Zk=de("git-fork",Qk);/**
|
|
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 Fk=[["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"}]],Wk=de("hard-drive",Fk);/**
|
|
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"}]],e2=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 t2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ma=de("info",t2);/**
|
|
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 n2=[["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"}]],a2=de("laptop",n2);/**
|
|
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 s2=[["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"}]],Db=de("list-checks",s2);/**
|
|
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 l2=[["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"}]],zb=de("list-ordered",l2);/**
|
|
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 r2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],i2=de("loader-circle",r2);/**
|
|
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 o2=[["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"}]],c2=de("messages-square",o2);/**
|
|
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 u2=[["path",{d:"M5 12h14",key:"1ays0h"}]],d2=de("minus",u2);/**
|
|
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 f2=[["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"}]],h2=de("network",f2);/**
|
|
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 m2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],p2=de("panel-left",m2);/**
|
|
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 g2=[["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"}]],$b=de("pause",g2);/**
|
|
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 x2=[["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"}]],Lb=de("pencil",x2);/**
|
|
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 v2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],gc=de("plus",v2);/**
|
|
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 y2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],em=de("refresh-cw",y2);/**
|
|
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 b2=[["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"}]],Ub=de("search-x",b2);/**
|
|
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 j2=[["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"}]],w2=de("snowflake",j2);/**
|
|
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 _2=[["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"}]],Rg=de("triangle-alert",_2);/**
|
|
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 N2=[["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"}]],S2=de("user-check",N2);/**
|
|
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 k2=[["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"}]],T2=de("user-cog",k2);/**
|
|
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 C2=[["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"}]],tm=de("user",C2);/**
|
|
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 E2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hb=de("x",E2);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 qb(){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 Ag=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Mg=qb,ki=(e,t)=>n=>{var a;if((t==null?void 0:t.variants)==null)return Mg(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=Ag(f)||Ag(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,...g}=f;return Object.entries(g).every(j=>{let[v,b]=j;return Array.isArray(b)?b.includes({...r,...o}[v]):{...r,...o}[v]===b})?[...d,h,m]:d},[]);return Mg(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},nm="-",R2=e=>{const t=M2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:i=>{const o=i.split(nm);return o[0]===""&&o.length!==1&&o.shift(),Gb(o,t)||A2(i)},getConflictingClassGroupIds:(i,o)=>{const c=n[i]||[];return o&&a[i]?[...c,...a[i]]:c}}},Gb=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],a=t.nextPart.get(n),s=a?Gb(e.slice(1),a):void 0;if(s)return s;if(t.validators.length===0)return;const r=e.join(nm);return(i=t.validators.find(({validator:o})=>o(r)))==null?void 0:i.classGroupId},Og=/^\[(.+)\]$/,A2=e=>{if(Og.test(e)){const t=Og.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},M2=e=>{const{theme:t,classGroups:n}=e,a={nextPart:new Map,validators:[]};for(const s in n)kf(n[s],a,s,t);return a},kf=(e,t,n,a)=>{e.forEach(s=>{if(typeof s=="string"){const r=s===""?t:Dg(t,s);r.classGroupId=n;return}if(typeof s=="function"){if(O2(s)){kf(s(a),t,n,a);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([r,i])=>{kf(i,Dg(t,r),n,a)})})},Dg=(e,t)=>{let n=e;return t.split(nm).forEach(a=>{n.nextPart.has(a)||n.nextPart.set(a,{nextPart:new Map,validators:[]}),n=n.nextPart.get(a)}),n},O2=e=>e.isThemeGetter,D2=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)}}},Tf="!",Cf=":",z2=Cf.length,$2=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=s=>{const r=[];let i=0,o=0,c=0,d;for(let j=0;j<s.length;j++){let v=s[j];if(i===0&&o===0){if(v===Cf){r.push(s.slice(c,j)),c=j+z2;continue}if(v==="/"){d=j;continue}}v==="["?i++:v==="]"?i--:v==="("?o++:v===")"&&o--}const f=r.length===0?s:s.substring(c),h=L2(f),m=h!==f,g=d&&d>c?d-c:void 0;return{modifiers:r,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:g}};if(t){const s=t+Cf,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(Tf)?e.substring(0,e.length-1):e.startsWith(Tf)?e.substring(1):e,U2=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}},H2=e=>({cache:D2(e.cacheSize),parseClassName:$2(e),sortModifiers:U2(e),...R2(e)}),B2=/\s+/,q2=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:r}=t,i=[],o=e.trim().split(B2);let c="";for(let d=o.length-1;d>=0;d-=1){const f=o[d],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:j,maybePostfixModifierPosition:v}=n(f);if(h){c=f+(c.length>0?" "+c:c);continue}let b=!!v,x=a(b?j.substring(0,v):j);if(!x){if(!b){c=f+(c.length>0?" "+c:c);continue}if(x=a(j),!x){c=f+(c.length>0?" "+c:c);continue}b=!1}const p=r(m).join(":"),y=g?p+Tf:p,w=y+x;if(i.includes(w))continue;i.push(w);const _=s(x,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 G2(){let e=0,t,n,a="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ib(t))&&(a&&(a+=" "),a+=n);return a}const Ib=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=Ib(e[a]))&&(n&&(n+=" "),n+=t);return n};function I2(e,...t){let n,a,s,r=i;function i(c){const d=t.reduce((f,h)=>h(f),e());return n=H2(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=q2(c,n);return s(c,f),f}return function(){return r(G2.apply(null,arguments))}}const ot=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Vb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,V2=/^\d+\/\d+$/,Y2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,P2=/\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$/,X2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,K2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Q2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xs=e=>V2.test(e),be=e=>!!e&&!Number.isNaN(Number(e)),Ea=e=>!!e&&Number.isInteger(Number(e)),od=e=>e.endsWith("%")&&be(e.slice(0,-1)),Wn=e=>Y2.test(e),Z2=()=>!0,F2=e=>P2.test(e)&&!X2.test(e),Pb=()=>!1,W2=e=>K2.test(e),J2=e=>Q2.test(e),eT=e=>!W(e)&&!J(e),tT=e=>Ql(e,Qb,Pb),W=e=>Vb.test(e),hs=e=>Ql(e,Zb,F2),cd=e=>Ql(e,rT,be),zg=e=>Ql(e,Xb,Pb),nT=e=>Ql(e,Kb,J2),io=e=>Ql(e,Fb,W2),J=e=>Yb.test(e),hr=e=>Zl(e,Zb),aT=e=>Zl(e,iT),$g=e=>Zl(e,Xb),sT=e=>Zl(e,Qb),lT=e=>Zl(e,Kb),oo=e=>Zl(e,Fb,!0),Ql=(e,t,n)=>{const a=Vb.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Zl=(e,t,n=!1)=>{const a=Yb.exec(e);return a?a[1]?t(a[1]):n:!1},Xb=e=>e==="position"||e==="percentage",Kb=e=>e==="image"||e==="url",Qb=e=>e==="length"||e==="size"||e==="bg-size",Zb=e=>e==="length",rT=e=>e==="number",iT=e=>e==="family-name",Fb=e=>e==="shadow",oT=()=>{const e=ot("color"),t=ot("font"),n=ot("text"),a=ot("font-weight"),s=ot("tracking"),r=ot("leading"),i=ot("breakpoint"),o=ot("container"),c=ot("spacing"),d=ot("radius"),f=ot("shadow"),h=ot("inset-shadow"),m=ot("text-shadow"),g=ot("drop-shadow"),j=ot("blur"),v=ot("perspective"),b=ot("aspect"),x=ot("ease"),p=ot("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...w(),J,W],k=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],S=()=>[J,W,c],M=()=>[Xs,"full","auto",...S()],O=()=>[Ea,"none","subgrid",J,W],z=()=>["auto",{span:["full",Ea,J,W]},Ea,J,W],B=()=>[Ea,"auto",J,W],T=()=>["auto","min","max","fr",J,W],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...S()],q=()=>[Xs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],C=()=>[e,J,W],L=()=>[...w(),$g,zg,{position:[J,W]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",sT,tT,{size:[J,W]}],V=()=>[od,hr,hs],ne=()=>["","none","full",d,J,W],P=()=>["",be,hr,hs],ye=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[be,od,$g,zg],ee=()=>["","none",j,J,W],oe=()=>["none",be,J,W],fe=()=>["none",be,J,W],me=()=>[be,J,W],ue=()=>[Xs,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Wn],breakpoint:[Wn],color:[Z2],container:[Wn],"drop-shadow":[Wn],ease:["in","out","in-out"],font:[eT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Wn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Wn],shadow:[Wn],spacing:["px",be],text:[Wn],"text-shadow":[Wn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xs,W,J,b]}],container:["container"],columns:[{columns:[be,W,J,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:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Ea,"auto",J,W]}],basis:[{basis:[Xs,"full","auto",o,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[be,Xs,"auto","initial","none",W]}],grow:[{grow:["",be,J,W]}],shrink:[{shrink:["",be,J,W]}],order:[{order:[Ea,"first","last","none",J,W]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":T()}],"auto-rows":[{"auto-rows":T()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],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:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[o,"screen",...q()]}],"min-w":[{"min-w":[o,"screen","none",...q()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[i]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,hr,hs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,J,cd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",od,W]}],"font-family":[{font:[aT,W,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,J,W]}],"line-clamp":[{"line-clamp":[be,"none",J,cd]}],leading:[{leading:[r,...S()]}],"list-image":[{"list-image":["none",J,W]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,W]}],"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:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:[be,"from-font","auto",J,hs]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[be,"auto",J,W]}],"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",J,W]}],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",J,W]}],"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:K()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ea,J,W],radial:["",J,W],conic:[Ea,J,W]},lT,nT]}],"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:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ye(),"hidden","none"]}],"divide-style":[{divide:[...ye(),"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:[...ye(),"none","hidden"]}],"outline-offset":[{"outline-offset":[be,J,W]}],"outline-w":[{outline:["",be,hr,hs]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",f,oo,io]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",h,oo,io]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[be,hs]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",m,oo,io]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[be,J,W]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"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":[be]}],"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":[J,W]}],"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":w()}],"mask-image-conic-pos":[{"mask-conic":[be]}],"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:K()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,W]}],filter:[{filter:["","none",J,W]}],blur:[{blur:ee()}],brightness:[{brightness:[be,J,W]}],contrast:[{contrast:[be,J,W]}],"drop-shadow":[{"drop-shadow":["","none",g,oo,io]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",be,J,W]}],"hue-rotate":[{"hue-rotate":[be,J,W]}],invert:[{invert:["",be,J,W]}],saturate:[{saturate:[be,J,W]}],sepia:[{sepia:["",be,J,W]}],"backdrop-filter":[{"backdrop-filter":["","none",J,W]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[be,J,W]}],"backdrop-contrast":[{"backdrop-contrast":[be,J,W]}],"backdrop-grayscale":[{"backdrop-grayscale":["",be,J,W]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[be,J,W]}],"backdrop-invert":[{"backdrop-invert":["",be,J,W]}],"backdrop-opacity":[{"backdrop-opacity":[be,J,W]}],"backdrop-saturate":[{"backdrop-saturate":[be,J,W]}],"backdrop-sepia":[{"backdrop-sepia":["",be,J,W]}],"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",J,W]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[be,"initial",J,W]}],ease:[{ease:["linear","initial",x,J,W]}],delay:[{delay:[be,J,W]}],animate:[{animate:["none",p,J,W]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,J,W]}],"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:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[J,W,"","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",J,W]}],"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",J,W]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[be,hr,hs,cd]}],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"]}},cT=I2(oT);function F(...e){return cT(qb(e))}const uT=ki("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 xe({className:e,variant:t,...n}){return l.jsx("div",{"data-slot":"alert",role:"alert",className:F(uT({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 Z(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 Lg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wc(...e){return t=>{let n=!1;const a=e.map(s=>{const r=Lg(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():Lg(e[s],null)}}}}function Re(...e){return u.useCallback(Wc(...e),e)}function dT(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 Yn(e,t=[]){let n=[];function a(r,i){const o=u.createContext(i),c=n.length;n=[...n,i];const d=h=>{var x;const{scope:m,children:g,...j}=h,v=((x=m==null?void 0:m[e])==null?void 0:x[c])||o,b=u.useMemo(()=>j,Object.values(j));return l.jsx(v.Provider,{value:b,children:g})};d.displayName=r+"Provider";function f(h,m){var v;const g=((v=m==null?void 0:m[e])==null?void 0:v[c])||o,j=u.useContext(g);if(j)return j;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,fT(s,...t)]}function fT(...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 Rt=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},hT=Hx[" useId ".trim().toString()]||(()=>{}),mT=0;function bn(e){const[t,n]=u.useState(hT());return Rt(()=>{n(a=>a??String(mT++))},[e]),t?`radix-${t}`:""}var pT=Hx[" useInsertionEffect ".trim().toString()]||Rt;function as({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[s,r,i]=gT({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=xT(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 gT({defaultProp:e,onChange:t}){const[n,a]=u.useState(e),s=u.useRef(n),r=u.useRef(t);return pT(()=>{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 xT(e){return typeof e=="function"}function Rs(e){const t=yT(e),n=u.forwardRef((a,s)=>{const{children:r,...i}=a,o=u.Children.toArray(r),c=o.find(jT);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 vT=Rs("Slot");function yT(e){const t=u.forwardRef((n,a)=>{const{children:s,...r}=n;if(u.isValidElement(s)){const i=_T(s),o=wT(r,s.props);return s.type!==u.Fragment&&(o.ref=a?Wc(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 Wb=Symbol("radix.slottable");function bT(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Wb,t}function jT(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wb}function wT(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 _T(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 NT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],he=NT.reduce((e,t)=>{const n=Rs(`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 Jb(e,t){e&&ql.flushSync(()=>e.dispatchEvent(t))}function Bn(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 ST(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(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 kT="DismissableLayer",Ef="dismissableLayer.update",TT="dismissableLayer.pointerDownOutside",CT="dismissableLayer.focusOutside",Ug,ej=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ti=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:r,onInteractOutside:i,onDismiss:o,...c}=e,d=u.useContext(ej),[f,h]=u.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=u.useState({}),j=Re(t,N=>h(N)),v=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(b),p=f?v.indexOf(f):-1,y=d.layersWithOutsidePointerEventsDisabled.size>0,w=p>=x,_=AT(N=>{const S=N.target,M=[...d.branches].some(O=>O.contains(S));!w||M||(s==null||s(N),i==null||i(N),N.defaultPrevented||o==null||o())},m),k=MT(N=>{const S=N.target;[...d.branches].some(O=>O.contains(S))||(r==null||r(N),i==null||i(N),N.defaultPrevented||o==null||o())},m);return ST(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&&(Ug=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Hg(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ug)}},[f,m,n,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Hg())},[f,d]),u.useEffect(()=>{const N=()=>g({});return document.addEventListener(Ef,N),()=>document.removeEventListener(Ef,N)},[]),l.jsx(he.div,{...c,ref:j,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,_.onPointerDownCapture)})});Ti.displayName=kT;var ET="DismissableLayerBranch",RT=u.forwardRef((e,t)=>{const n=u.useContext(ej),a=u.useRef(null),s=Re(t,a);return u.useEffect(()=>{const r=a.current;if(r)return n.branches.add(r),()=>{n.branches.delete(r)}},[n.branches]),l.jsx(he.div,{...e,ref:s})});RT.displayName=ET;function AT(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),a=u.useRef(!1),s=u.useRef(()=>{});return u.useEffect(()=>{const r=o=>{if(o.target&&!a.current){let c=function(){tj(TT,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 MT(e,t=globalThis==null?void 0:globalThis.document){const n=Bn(e),a=u.useRef(!1);return u.useEffect(()=>{const s=r=>{r.target&&!a.current&&tj(CT,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 Hg(){const e=new CustomEvent(Ef);document.dispatchEvent(e)}function tj(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?Jb(s,r):s.dispatchEvent(r)}var ud="focusScope.autoFocusOnMount",dd="focusScope.autoFocusOnUnmount",Bg={bubbles:!1,cancelable:!0},OT="FocusScope",Jc=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:s,onUnmountAutoFocus:r,...i}=e,[o,c]=u.useState(null),d=Bn(s),f=Bn(r),h=u.useRef(null),m=Re(t,v=>c(v)),g=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(a){let v=function(y){if(g.paused||!o)return;const w=y.target;o.contains(w)?h.current=w:Oa(h.current,{select:!0})},b=function(y){if(g.paused||!o)return;const w=y.relatedTarget;w!==null&&(o.contains(w)||Oa(h.current,{select:!0}))},x=function(y){if(document.activeElement===document.body)for(const _ of y)_.removedNodes.length>0&&Oa(o)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const p=new MutationObserver(x);return o&&p.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),p.disconnect()}}},[a,o,g.paused]),u.useEffect(()=>{if(o){Gg.add(g);const v=document.activeElement;if(!o.contains(v)){const x=new CustomEvent(ud,Bg);o.addEventListener(ud,d),o.dispatchEvent(x),x.defaultPrevented||(DT(HT(nj(o)),{select:!0}),document.activeElement===v&&Oa(o))}return()=>{o.removeEventListener(ud,d),setTimeout(()=>{const x=new CustomEvent(dd,Bg);o.addEventListener(dd,f),o.dispatchEvent(x),x.defaultPrevented||Oa(v??document.body,{select:!0}),o.removeEventListener(dd,f),Gg.remove(g)},0)}}},[o,d,f,g]);const j=u.useCallback(v=>{if(!n&&!a||g.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(b&&x){const p=v.currentTarget,[y,w]=zT(p);y&&w?!v.shiftKey&&x===w?(v.preventDefault(),n&&Oa(y,{select:!0})):v.shiftKey&&x===y&&(v.preventDefault(),n&&Oa(w,{select:!0})):x===p&&v.preventDefault()}},[n,a,g.paused]);return l.jsx(he.div,{tabIndex:-1,...i,ref:m,onKeyDown:j})});Jc.displayName=OT;function DT(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(Oa(a,{select:t}),document.activeElement!==n)return}function zT(e){const t=nj(e),n=qg(t,e),a=qg(t.reverse(),e);return[n,a]}function nj(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 qg(e,t){for(const n of e)if(!$T(n,{upTo:t}))return n}function $T(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 LT(e){return e instanceof HTMLInputElement&&"select"in e}function Oa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&<(e)&&t&&e.select()}}var Gg=UT();function UT(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ig(e,t),e.unshift(t)},remove(t){var n;e=Ig(e,t),(n=e[0])==null||n.resume()}}}function Ig(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function HT(e){return e.filter(t=>t.tagName!=="A")}var BT="Portal",Ci=u.forwardRef((e,t)=>{var o;const{container:n,...a}=e,[s,r]=u.useState(!1);Rt(()=>r(!0),[]);const i=n||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return i?z1.createPortal(l.jsx(he.div,{...a,ref:t}),i):null});Ci.displayName=BT;function qT(e,t){return u.useReducer((n,a)=>t[n][a]??n,e)}var pn=e=>{const{present:t,children:n}=e,a=GT(t),s=typeof n=="function"?n({present:a.isPresent}):u.Children.only(n),r=Re(a.ref,IT(s));return typeof n=="function"||a.isPresent?u.cloneElement(s,{ref:r}):null};pn.displayName="Presence";function GT(e){const[t,n]=u.useState(),a=u.useRef(null),s=u.useRef(e),r=u.useRef("none"),i=e?"mounted":"unmounted",[o,c]=qT(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const d=co(a.current);r.current=o==="mounted"?d:"none"},[o]),Rt(()=>{const d=a.current,f=s.current;if(f!==e){const m=r.current,g=co(d);e?c("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Rt(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=g=>{const v=co(a.current).includes(g.animationName);if(g.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=g=>{g.target===t&&(r.current=co(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 co(e){return(e==null?void 0:e.animationName)||"none"}function IT(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 fd=0;function am(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Vg()),document.body.insertAdjacentElement("beforeend",e[1]??Vg()),fd++,()=>{fd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fd--}},[])}function Vg(){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 Rn=function(){return Rn=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},Rn.apply(this,arguments)};function aj(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 VT(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 zo="right-scroll-bar-position",$o="width-before-scroll-bar",YT="with-scroll-bars-hidden",PT="--removed-body-scroll-bar-size";function hd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function XT(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 KT=typeof window<"u"?u.useLayoutEffect:u.useEffect,Yg=new WeakMap;function QT(e,t){var n=XT(null,function(a){return e.forEach(function(s){return hd(s,a)})});return KT(function(){var a=Yg.get(n);if(a){var s=new Set(a),r=new Set(e),i=n.current;s.forEach(function(o){r.has(o)||hd(o,null)}),r.forEach(function(o){s.has(o)||hd(o,i)})}Yg.set(n,e)},[e]),n}function ZT(e){return e}function FT(e,t){t===void 0&&(t=ZT);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 WT(e){e===void 0&&(e={});var t=FT(null);return t.options=Rn({async:!0,ssr:!1},e),t}var sj=function(e){var t=e.sideCar,n=aj(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,Rn({},n))};sj.isSideCarExport=!0;function JT(e,t){return e.useMedium(t),sj}var lj=WT(),md=function(){},eu=u.forwardRef(function(e,t){var n=u.useRef(null),a=u.useState({onScrollCapture:md,onWheelCapture:md,onTouchMoveCapture:md}),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,g=e.noRelative,j=e.noIsolation,v=e.inert,b=e.allowPinchZoom,x=e.as,p=x===void 0?"div":x,y=e.gapMode,w=aj(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=m,k=QT([n,t]),N=Rn(Rn({},w),s);return u.createElement(u.Fragment,null,f&&u.createElement(_,{sideCar:lj,removeScrollBar:d,shards:h,noRelative:g,noIsolation:j,inert:v,setCallbacks:r,allowPinchZoom:!!b,lockRef:n,gapMode:y}),i?u.cloneElement(u.Children.only(o),Rn(Rn({},N),{ref:k})):u.createElement(p,Rn({},N,{className:c,ref:k}),o))});eu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};eu.classNames={fullWidth:$o,zeroRight:zo};var eC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=eC();return t&&e.setAttribute("nonce",t),e}function nC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function aC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sC=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tC())&&(nC(t,n),aC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lC=function(){var e=sC();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rj=function(){var e=lC(),t=function(n){var a=n.styles,s=n.dynamic;return e(a,s),null};return t},rC={left:0,top:0,right:0,gap:0},pd=function(e){return parseInt(e||"",10)||0},iC=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[pd(n),pd(a),pd(s)]},oC=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rC;var t=iC(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])}},cC=rj(),Nl="data-scroll-locked",uC=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(YT,` {
|
|
291
|
-
overflow: hidden `).concat(a,`;
|
|
292
|
-
padding-right: `).concat(o,"px ").concat(a,`;
|
|
293
|
-
}
|
|
294
|
-
body[`).concat(Nl,`] {
|
|
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(zo,` {
|
|
308
|
-
right: `).concat(o,"px ").concat(a,`;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.`).concat($o,` {
|
|
312
|
-
margin-right: `).concat(o,"px ").concat(a,`;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.`).concat(zo," .").concat(zo,` {
|
|
316
|
-
right: 0 `).concat(a,`;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.`).concat($o," .").concat($o,` {
|
|
320
|
-
margin-right: 0 `).concat(a,`;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
body[`).concat(Nl,`] {
|
|
324
|
-
`).concat(PT,": ").concat(o,`px;
|
|
325
|
-
}
|
|
326
|
-
`)},Pg=function(){var e=parseInt(document.body.getAttribute(Nl)||"0",10);return isFinite(e)?e:0},dC=function(){u.useEffect(function(){return document.body.setAttribute(Nl,(Pg()+1).toString()),function(){var e=Pg()-1;e<=0?document.body.removeAttribute(Nl):document.body.setAttribute(Nl,e.toString())}},[])},fC=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,s=a===void 0?"margin":a;dC();var r=u.useMemo(function(){return oC(s)},[s]);return u.createElement(cC,{styles:uC(r,!t,s,n?"":"!important")})},Rf=!1;if(typeof window<"u")try{var uo=Object.defineProperty({},"passive",{get:function(){return Rf=!0,!0}});window.addEventListener("test",uo,uo),window.removeEventListener("test",uo,uo)}catch{Rf=!1}var Ks=Rf?{passive:!1}:!1,hC=function(e){return e.tagName==="TEXTAREA"},ij=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!hC(e)&&n[t]==="visible")},mC=function(e){return ij(e,"overflowY")},pC=function(e){return ij(e,"overflowX")},Xg=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var s=oj(e,a);if(s){var r=cj(e,a),i=r[1],o=r[2];if(i>o)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},gC=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},xC=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},oj=function(e,t){return e==="v"?mC(t):pC(t)},cj=function(e,t){return e==="v"?gC(t):xC(t)},vC=function(e,t){return e==="h"&&t==="rtl"?-1:1},yC=function(e,t,n,a,s){var r=vC(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 g=cj(e,o),j=g[0],v=g[1],b=g[2],x=v-b-r*j;(j||x)&&oj(e,o)&&(h+=x,m+=j);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},fo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Kg=function(e){return[e.deltaX,e.deltaY]},Qg=function(e){return e&&"current"in e?e.current:e},bC=function(e,t){return e[0]===t[0]&&e[1]===t[1]},jC=function(e){return`
|
|
327
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
328
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
329
|
-
`)},wC=0,Qs=[];function _C(e){var t=u.useRef([]),n=u.useRef([0,0]),a=u.useRef(),s=u.useState(wC++)[0],r=u.useState(rj)[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=VT([e.lockRef.current],(e.shards||[]).map(Qg),!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 x=fo(v),p=n.current,y="deltaX"in v?v.deltaX:p[0]-x[0],w="deltaY"in v?v.deltaY:p[1]-x[1],_,k=v.target,N=Math.abs(y)>Math.abs(w)?"h":"v";if("touches"in v&&N==="h"&&k.type==="range")return!1;var S=Xg(N,k);if(!S)return!0;if(S?_=N:(_=N==="v"?"h":"v",S=Xg(N,k)),!S)return!1;if(!a.current&&"changedTouches"in v&&(y||w)&&(a.current=_),!_)return!0;var M=a.current||_;return yC(M,b,v,M==="h"?y:w)},[]),c=u.useCallback(function(v){var b=v;if(!(!Qs.length||Qs[Qs.length-1]!==r)){var x="deltaY"in b?Kg(b):fo(b),p=t.current.filter(function(_){return _.name===b.type&&(_.target===b.target||b.target===_.shadowParent)&&bC(_.delta,x)})[0];if(p&&p.should){b.cancelable&&b.preventDefault();return}if(!p){var y=(i.current.shards||[]).map(Qg).filter(Boolean).filter(function(_){return _.contains(b.target)}),w=y.length>0?o(b,y[0]):!i.current.noIsolation;w&&b.cancelable&&b.preventDefault()}}},[]),d=u.useCallback(function(v,b,x,p){var y={name:v,delta:b,target:x,should:p,shadowParent:NC(x)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),f=u.useCallback(function(v){n.current=fo(v),a.current=void 0},[]),h=u.useCallback(function(v){d(v.type,Kg(v),v.target,o(v,e.lockRef.current))},[]),m=u.useCallback(function(v){d(v.type,fo(v),v.target,o(v,e.lockRef.current))},[]);u.useEffect(function(){return Qs.push(r),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Ks),document.addEventListener("touchmove",c,Ks),document.addEventListener("touchstart",f,Ks),function(){Qs=Qs.filter(function(v){return v!==r}),document.removeEventListener("wheel",c,Ks),document.removeEventListener("touchmove",c,Ks),document.removeEventListener("touchstart",f,Ks)}},[]);var g=e.removeScrollBar,j=e.inert;return u.createElement(u.Fragment,null,j?u.createElement(r,{styles:jC(s)}):null,g?u.createElement(fC,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function NC(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const SC=JT(lj,_C);var tu=u.forwardRef(function(e,t){return u.createElement(eu,Rn({},e,{ref:t,sideCar:SC}))});tu.classNames=eu.classNames;var kC=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zs=new WeakMap,ho=new WeakMap,mo={},gd=0,uj=function(e){return e&&(e.host||uj(e.parentNode))},TC=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=uj(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})},CC=function(e,t,n,a){var s=TC(t,Array.isArray(e)?e:[e]);mo[n]||(mo[n]=new WeakMap);var r=mo[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 g=m.getAttribute(a),j=g!==null&&g!=="false",v=(Zs.get(m)||0)+1,b=(r.get(m)||0)+1;Zs.set(m,v),r.set(m,b),i.push(m),v===1&&j&&ho.set(m,!0),b===1&&m.setAttribute(n,"true"),j||m.setAttribute(a,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return f(t),o.clear(),gd++,function(){i.forEach(function(h){var m=Zs.get(h)-1,g=r.get(h)-1;Zs.set(h,m),r.set(h,g),m||(ho.has(h)||h.removeAttribute(a),ho.delete(h)),g||h.removeAttribute(n)}),gd--,gd||(Zs=new WeakMap,Zs=new WeakMap,ho=new WeakMap,mo={})}},sm=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"))),CC(a,s,n,"aria-hidden")):function(){return null}},nu="Dialog",[dj]=Yn(nu),[EC,Tn]=dj(nu),fj=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]=as({prop:a,defaultProp:s??!1,onChange:r,caller:nu});return l.jsx(EC,{scope:t,triggerRef:o,contentRef:c,contentId:bn(),titleId:bn(),descriptionId:bn(),open:d,onOpenChange:f,onOpenToggle:u.useCallback(()=>f(h=>!h),[f]),modal:i,children:n})};fj.displayName=nu;var hj="DialogTrigger",RC=u.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Tn(hj,n),r=Re(t,s.triggerRef);return l.jsx(he.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":im(s.open),...a,ref:r,onClick:Z(e.onClick,s.onOpenToggle)})});RC.displayName=hj;var lm="DialogPortal",[AC,mj]=dj(lm,{forceMount:void 0}),pj=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:s}=e,r=Tn(lm,t);return l.jsx(AC,{scope:t,forceMount:n,children:u.Children.map(a,i=>l.jsx(pn,{present:n||r.open,children:l.jsx(Ci,{asChild:!0,container:s,children:i})}))})};pj.displayName=lm;var xc="DialogOverlay",gj=u.forwardRef((e,t)=>{const n=mj(xc,e.__scopeDialog),{forceMount:a=n.forceMount,...s}=e,r=Tn(xc,e.__scopeDialog);return r.modal?l.jsx(pn,{present:a||r.open,children:l.jsx(OC,{...s,ref:t})}):null});gj.displayName=xc;var MC=Rs("DialogOverlay.RemoveScroll"),OC=u.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Tn(xc,n);return l.jsx(tu,{as:MC,allowPinchZoom:!0,shards:[s.contentRef],children:l.jsx(he.div,{"data-state":im(s.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),As="DialogContent",xj=u.forwardRef((e,t)=>{const n=mj(As,e.__scopeDialog),{forceMount:a=n.forceMount,...s}=e,r=Tn(As,e.__scopeDialog);return l.jsx(pn,{present:a||r.open,children:r.modal?l.jsx(DC,{...s,ref:t}):l.jsx(zC,{...s,ref:t})})});xj.displayName=As;var DC=u.forwardRef((e,t)=>{const n=Tn(As,e.__scopeDialog),a=u.useRef(null),s=Re(t,n.contentRef,a);return u.useEffect(()=>{const r=a.current;if(r)return sm(r)},[]),l.jsx(vj,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,r=>{var i;r.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,r=>{const i=r.detail.originalEvent,o=i.button===0&&i.ctrlKey===!0;(i.button===2||o)&&r.preventDefault()}),onFocusOutside:Z(e.onFocusOutside,r=>r.preventDefault())})}),zC=u.forwardRef((e,t)=>{const n=Tn(As,e.__scopeDialog),a=u.useRef(!1),s=u.useRef(!1);return l.jsx(vj,{...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()}})}),vj=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:r,...i}=e,o=Tn(As,n),c=u.useRef(null),d=Re(t,c);return am(),l.jsxs(l.Fragment,{children:[l.jsx(Jc,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:s,onUnmountAutoFocus:r,children:l.jsx(Ti,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":im(o.open),...i,ref:d,onDismiss:()=>o.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx($C,{titleId:o.titleId}),l.jsx(UC,{contentRef:c,descriptionId:o.descriptionId})]})]})}),rm="DialogTitle",yj=u.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Tn(rm,n);return l.jsx(he.h2,{id:s.titleId,...a,ref:t})});yj.displayName=rm;var bj="DialogDescription",jj=u.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Tn(bj,n);return l.jsx(he.p,{id:s.descriptionId,...a,ref:t})});jj.displayName=bj;var wj="DialogClose",_j=u.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Tn(wj,n);return l.jsx(he.button,{type:"button",...a,ref:t,onClick:Z(e.onClick,()=>s.onOpenChange(!1))})});_j.displayName=wj;function im(e){return e?"open":"closed"}var Nj="DialogTitleWarning",[w3,Sj]=dT(Nj,{contentName:As,titleName:rm,docsSlug:"dialog"}),$C=({titleId:e})=>{const t=Sj(Nj),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},LC="DialogDescriptionWarning",UC=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Sj(LC).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},kj=fj,Tj=pj,Cj=gj,Ej=xj,Rj=yj,Aj=jj,om=_j;function Mj({className:e,...t}){return l.jsx(i2,{role:"status","aria-label":"Loading",className:F("size-4 animate-spin",e),...t})}const Lo="aria-pressed:border aria-pressed:border-primary aria-pressed:bg-accent aria-pressed:text-accent-foreground",cm=ki("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"}}),Y=u.forwardRef(({className:e,disabled:t,variant:n,size:a,asChild:s=!1,loading:r,children:i,...o},c)=>{const d=s?vT:"button",f=a==="icon"||a==="sm-icon"||a==="control-icon"||a==="xs-icon",h=l.jsx(Mj,{"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(cm({variant:n,size:a,className:e})),ref:c,disabled:t||r,...o,children:m})});Y.displayName="Button";const Oj=u.createContext(null);function HC({container:e,children:t}){return l.jsx(Oj.Provider,{value:e,children:t})}function Ei(){return u.useContext(Oj)??void 0}function BC(e){return l.jsx(kj,{"data-slot":"alert-dialog",...e})}function qC({className:e,...t}){return l.jsx(Cj,{"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 GC({className:e,onOpenAutoFocus:t,onPointerDownOutside:n,onInteractOutside:a,...s}){return l.jsxs(Tj,{container:Ei(),children:[l.jsx(qC,{}),l.jsx(Ej,{"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 IC({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 VC({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 YC({className:e,...t}){return l.jsx(Rj,{"data-slot":"alert-dialog-title",className:F("text-lg font-semibold",e),...t})}function PC({className:e,...t}){return l.jsx(Aj,{"data-slot":"alert-dialog-description",className:F("text-muted-foreground text-sm",e),...t})}function XC({className:e,variant:t,...n}){return l.jsx(om,{"data-slot":"alert-dialog-action",className:F(cm({variant:t}),e),...n})}function KC({className:e,...t}){return l.jsx(om,{"data-slot":"alert-dialog-cancel",className:F(cm({variant:"outline"}),e),...t})}function QC(){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 ZC(e,t){t!=null&&t.isConnected&&(e.preventDefault(),t.focus())}function Ri(){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=QC();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(BC,{open:e!==null,onOpenChange:o=>{o||s(!1)},children:l.jsxs(GC,{onCloseAutoFocus:o=>ZC(o,a.current),children:[l.jsxs(IC,{children:[l.jsx(YC,{children:e==null?void 0:e.title}),l.jsx(PC,{className:"whitespace-pre-line",children:e==null?void 0:e.description})]}),l.jsxs(VC,{children:[l.jsx(KC,{children:"Cancel"}),l.jsx(XC,{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 Jn="px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",FC=ki("inline-flex items-center rounded-md border transition-colors",{variants:{variant:{default:`${Jn} border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80`,secondary:`${Jn} border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80`,destructive:`${Jn} border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80`,outline:`${Jn} text-foreground`,success:`${Jn} border-success/40 bg-success/10 text-success`,warning:`${Jn} border-warning/40 bg-warning/10 text-warning`,info:`${Jn} border-info/40 bg-info/10 text-info`,error:`${Jn} border-destructive/40 bg-destructive/10 text-destructive`,neutral:`${Jn} 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 Xe({className:e,variant:t,size:n,...a}){return l.jsx("div",{className:F(FC({variant:t,size:n}),e),...a})}function Dj(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 zj(e){const[t,n]=u.useState(void 0);return Rt(()=>{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 au="Checkbox",[WC]=Yn(au),[JC,um]=WC(au);function eE(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,g]=as({prop:n,defaultProp:s??!1,onChange:c,caller:au}),[j,v]=u.useState(null),[b,x]=u.useState(null),p=u.useRef(!1),y=j?!!i||!!j.closest("form"):!0,w={checked:m,disabled:r,setChecked:g,control:j,setControl:v,name:o,form:i,value:f,hasConsumerStoppedPropagationRef:p,required:d,defaultChecked:Ja(s)?!1:s,isFormControl:y,bubbleInput:b,setBubbleInput:x};return l.jsx(JC,{scope:t,...w,children:tE(h)?h(w):a})}var $j="CheckboxTrigger",Lj=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:g,bubbleInput:j}=um($j,e),v=Re(s,f),b=u.useRef(c);return u.useEffect(()=>{const x=r==null?void 0:r.form;if(x){const p=()=>h(b.current);return x.addEventListener("reset",p),()=>x.removeEventListener("reset",p)}},[r,h]),l.jsx(he.button,{type:"button",role:"checkbox","aria-checked":Ja(c)?"mixed":c,"aria-required":d,"data-state":Gj(c),"data-disabled":o?"":void 0,disabled:o,value:i,...a,ref:v,onKeyDown:Z(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:Z(n,x=>{h(p=>Ja(p)?!0:!p),j&&g&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})})});Lj.displayName=$j;var dm=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(eE,{__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(Lj,{...h,ref:t,__scopeCheckbox:n}),m&&l.jsx(qj,{__scopeCheckbox:n})]})})});dm.displayName=au;var Uj="CheckboxIndicator",Hj=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...s}=e,r=um(Uj,n);return l.jsx(pn,{present:a||Ja(r.checked)||r.checked===!0,children:l.jsx(he.span,{"data-state":Gj(r.checked),"data-disabled":r.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});Hj.displayName=Uj;var Bj="CheckboxBubbleInput",qj=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:g}=um(Bj,e),j=Re(n,g),v=Dj(r),b=zj(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=Ja(r),_.call(p,Ja(r)?!1:r),p.dispatchEvent(N)}},[m,v,r,s]);const x=u.useRef(Ja(r)?!1:r);return l.jsx(he.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??x.current,required:o,disabled:c,name:d,value:f,form:h,...t,tabIndex:-1,ref:j,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});qj.displayName=Bj;function tE(e){return typeof e=="function"}function Ja(e){return e==="indeterminate"}function Gj(e){return Ja(e)?"indeterminate":e?"checked":"unchecked"}const Fl=u.forwardRef(({className:e,...t},n)=>l.jsx(dm,{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(Hj,{className:F("flex items-center justify-center text-current"),children:t.checked==="indeterminate"?l.jsx(d2,{className:"size-4","aria-hidden":"true"}):l.jsx(Kl,{className:"size-4","aria-hidden":"true"})})}));Fl.displayName=dm.displayName;const nE=ki("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 Ai({...e}){return l.jsx(kj,{"data-slot":"dialog",...e})}function aE({...e}){const t=Ei();return l.jsx(Tj,{"data-slot":"dialog-portal",container:t,...e})}function sE({className:e,...t}){return l.jsx(Cj,{"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 Mi({className:e,children:t,showCloseButton:n=!0,size:a,...s}){return l.jsxs(aE,{"data-slot":"dialog-portal",children:[l.jsx(sE,{}),l.jsxs(Ej,{"data-slot":"dialog-content",className:F(nE({size:a}),e),...s,children:[t,n&&l.jsxs(om,{"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(Hb,{}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Oi({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 Di({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 zi({className:e,...t}){return l.jsx(Rj,{"data-slot":"dialog-title",className:F("text-lg leading-none font-semibold",e),...t})}function $i({className:e,...t}){return l.jsx(Aj,{"data-slot":"dialog-description",className:F("text-muted-foreground text-sm",e),...t})}function fm(e){const t=e+"CollectionProvider",[n,a]=Yn(t),[s,r]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:b,children:x}=v,p=Aa.useRef(null),y=Aa.useRef(new Map).current;return l.jsx(s,{scope:b,itemMap:y,collectionRef:p,children:x})};i.displayName=t;const o=e+"CollectionSlot",c=Rs(o),d=Aa.forwardRef((v,b)=>{const{scope:x,children:p}=v,y=r(o,x),w=Re(b,y.collectionRef);return l.jsx(c,{ref:w,children:p})});d.displayName=o;const f=e+"CollectionItemSlot",h="data-radix-collection-item",m=Rs(f),g=Aa.forwardRef((v,b)=>{const{scope:x,children:p,...y}=v,w=Aa.useRef(null),_=Re(b,w),k=r(f,x);return Aa.useEffect(()=>(k.itemMap.set(w,{ref:w,...y}),()=>void k.itemMap.delete(w))),l.jsx(m,{[h]:"",ref:_,children:p})});g.displayName=f;function j(v){const b=r(e+"CollectionConsumer",v);return Aa.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:g},j,a]}var lE=u.createContext(void 0);function su(e){const t=u.useContext(lE);return e||t||"ltr"}const rE=["top","right","bottom","left"],ss=Math.min,Xt=Math.max,vc=Math.round,po=Math.floor,$n=e=>({x:e,y:e}),iE={left:"right",right:"left",bottom:"top",top:"bottom"},oE={start:"end",end:"start"};function Af(e,t,n){return Xt(e,ss(t,n))}function pa(e,t){return typeof e=="function"?e(t):e}function ga(e){return e.split("-")[0]}function Wl(e){return e.split("-")[1]}function hm(e){return e==="x"?"y":"x"}function mm(e){return e==="y"?"height":"width"}function Mn(e){return["top","bottom"].includes(ga(e))?"y":"x"}function pm(e){return hm(Mn(e))}function cE(e,t,n){n===void 0&&(n=!1);const a=Wl(e),s=pm(e),r=mm(s);let i=s==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=yc(i)),[i,yc(i)]}function uE(e){const t=yc(e);return[Mf(e),t,Mf(t)]}function Mf(e){return e.replace(/start|end/g,t=>oE[t])}function dE(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 fE(e,t,n,a){const s=Wl(e);let r=dE(ga(e),n==="start",a);return s&&(r=r.map(i=>i+"-"+s),t&&(r=r.concat(r.map(Mf)))),r}function yc(e){return e.replace(/left|right|bottom|top/g,t=>iE[t])}function hE(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ij(e){return typeof e!="number"?hE(e):{top:e,right:e,bottom:e,left:e}}function bc(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 Zg(e,t,n){let{reference:a,floating:s}=e;const r=Mn(t),i=pm(t),o=mm(i),c=ga(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 g;switch(c){case"top":g={x:f,y:a.y-s.height};break;case"bottom":g={x:f,y:a.y+a.height};break;case"right":g={x:a.x+a.width,y:h};break;case"left":g={x:a.x-s.width,y:h};break;default:g={x:a.x,y:a.y}}switch(Wl(t)){case"start":g[i]-=m*(n&&d?-1:1);break;case"end":g[i]+=m*(n&&d?-1:1);break}return g}const mE=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}=Zg(d,a,c),m=a,g={},j=0;for(let v=0;v<o.length;v++){const{name:b,fn:x}=o[v],{x:p,y,data:w,reset:_}=await x({x:f,y:h,initialPlacement:a,placement:m,strategy:s,middlewareData:g,rects:d,platform:i,elements:{reference:e,floating:t}});f=p??f,h=y??h,g={...g,[b]:{...g[b],...w}},_&&j<=50&&(j++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(d=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:f,y:h}=Zg(d,m,c)),v=-1)}return{x:f,y:h,placement:m,strategy:s,middlewareData:g}};async function ni(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:g=0}=pa(t,e),j=Ij(g),b=o[m?h==="floating"?"reference":"floating":h],x=bc(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)),w=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},_=bc(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:p,offsetParent:y,strategy:c}):p);return{top:(x.top-_.top+j.top)/w.y,bottom:(_.bottom-x.bottom+j.bottom)/w.y,left:(x.left-_.left+j.left)/w.x,right:(_.right-x.right+j.right)/w.x}}const pE=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}=pa(e,t)||{};if(d==null)return{};const h=Ij(f),m={x:n,y:a},g=pm(s),j=mm(g),v=await i.getDimensions(d),b=g==="y",x=b?"top":"left",p=b?"bottom":"right",y=b?"clientHeight":"clientWidth",w=r.reference[j]+r.reference[g]-m[g]-r.floating[j],_=m[g]-r.reference[g],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[j]);const S=w/2-_/2,M=N/2-v[j]/2-1,O=ss(h[x],M),z=ss(h[p],M),B=O,T=N-v[j]-z,$=N/2-v[j]/2+S,I=Af(B,$,T),R=!c.arrow&&Wl(s)!=null&&$!==I&&r.reference[j]/2-($<B?O:z)-v[j]/2<0,q=R?$<B?$-B:$-T:0;return{[g]:m[g]+q,data:{[g]:I,centerOffset:$-I-q,...R&&{alignmentOffset:q}},reset:R}}}),gE=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:g="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:v=!0,...b}=pa(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const x=ga(s),p=Mn(o),y=ga(o)===o,w=await(c.isRTL==null?void 0:c.isRTL(d.floating)),_=m||(y||!v?[yc(o)]:uE(o)),k=j!=="none";!m&&k&&_.push(...fE(o,v,j,w));const N=[o,..._],S=await ni(t,b),M=[];let O=((a=r.flip)==null?void 0:a.overflows)||[];if(f&&M.push(S[x]),h){const $=cE(s,i,w);M.push(S[$[0]],S[$[1]])}if(O=[...O,{placement:s,overflows:M}],!M.every($=>$<=0)){var z,B;const $=(((z=r.flip)==null?void 0:z.index)||0)+1,I=N[$];if(I&&(!(h==="alignment"?p!==Mn(I):!1)||O.every(C=>C.overflows[0]>0&&Mn(C.placement)===p)))return{data:{index:$,overflows:O},reset:{placement:I}};let R=(B=O.filter(q=>q.overflows[0]<=0).sort((q,C)=>q.overflows[1]-C.overflows[1])[0])==null?void 0:B.placement;if(!R)switch(g){case"bestFit":{var T;const q=(T=O.filter(C=>{if(k){const L=Mn(C.placement);return L===p||L==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(L=>L>0).reduce((L,K)=>L+K,0)]).sort((C,L)=>C[1]-L[1])[0])==null?void 0:T[0];q&&(R=q);break}case"initialPlacement":R=o;break}if(s!==R)return{reset:{placement:R}}}return{}}}};function Fg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wg(e){return rE.some(t=>e[t]>=0)}const xE=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...s}=pa(e,t);switch(a){case"referenceHidden":{const r=await ni(t,{...s,elementContext:"reference"}),i=Fg(r,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Wg(i)}}}case"escaped":{const r=await ni(t,{...s,altBoundary:!0}),i=Fg(r,n.floating);return{data:{escapedOffsets:i,escaped:Wg(i)}}}default:return{}}}}};async function vE(e,t){const{placement:n,platform:a,elements:s}=e,r=await(a.isRTL==null?void 0:a.isRTL(s.floating)),i=ga(n),o=Wl(n),c=Mn(n)==="y",d=["left","top"].includes(i)?-1:1,f=r&&c?-1:1,h=pa(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:j}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return o&&typeof j=="number"&&(g=o==="end"?j*-1:j),c?{x:g*f,y:m*d}:{x:m*d,y:g*f}}const yE=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 vE(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}}}}},bE=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,y:p}=b;return{x,y:p}}},...c}=pa(e,t),d={x:n,y:a},f=await ni(t,c),h=Mn(ga(s)),m=hm(h);let g=d[m],j=d[h];if(r){const b=m==="y"?"top":"left",x=m==="y"?"bottom":"right",p=g+f[b],y=g-f[x];g=Af(p,g,y)}if(i){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",p=j+f[b],y=j-f[x];j=Af(p,j,y)}const v=o.fn({...t,[m]:g,[h]:j});return{...v,data:{x:v.x-n,y:v.y-a,enabled:{[m]:r,[h]:i}}}}}},jE=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}=pa(e,t),f={x:n,y:a},h=Mn(s),m=hm(h);let g=f[m],j=f[h];const v=pa(o,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const y=m==="y"?"height":"width",w=r.reference[m]-r.floating[y]+b.mainAxis,_=r.reference[m]+r.reference[y]-b.mainAxis;g<w?g=w:g>_&&(g=_)}if(d){var x,p;const y=m==="y"?"width":"height",w=["top","left"].includes(ga(s)),_=r.reference[h]-r.floating[y]+(w&&((x=i.offset)==null?void 0:x[h])||0)+(w?0:b.crossAxis),k=r.reference[h]+r.reference[y]+(w?0:((p=i.offset)==null?void 0:p[h])||0)-(w?b.crossAxis:0);j<_?j=_:j>k&&(j=k)}return{[m]:g,[h]:j}}}},wE=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}=pa(e,t),f=await ni(t,d),h=ga(s),m=Wl(s),g=Mn(s)==="y",{width:j,height:v}=r.floating;let b,x;h==="top"||h==="bottom"?(b=h,x=m===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(x=h,b=m==="end"?"top":"bottom");const p=v-f.top-f.bottom,y=j-f.left-f.right,w=ss(v-f[b],p),_=ss(j-f[x],y),k=!t.middlewareData.shift;let N=w,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 O=Xt(f.left,0),z=Xt(f.right,0),B=Xt(f.top,0),T=Xt(f.bottom,0);g?S=j-2*(O!==0||z!==0?O+z:Xt(f.left,f.right)):N=v-2*(B!==0||T!==0?B+T:Xt(f.top,f.bottom))}await c({...t,availableWidth:S,availableHeight:N});const M=await i.getDimensions(o.floating);return j!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}};function lu(){return typeof window<"u"}function Jl(e){return Vj(e)?(e.nodeName||"").toLowerCase():"#document"}function Jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pn(e){var t;return(t=(Vj(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vj(e){return lu()?e instanceof Node||e instanceof Jt(e).Node:!1}function _n(e){return lu()?e instanceof Element||e instanceof Jt(e).Element:!1}function qn(e){return lu()?e instanceof HTMLElement||e instanceof Jt(e).HTMLElement:!1}function Jg(e){return!lu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function Li(e){const{overflow:t,overflowX:n,overflowY:a,display:s}=Nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!["inline","contents"].includes(s)}function _E(e){return["table","td","th"].includes(Jl(e))}function ru(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function gm(e){const t=xm(),n=_n(e)?Nn(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 NE(e){let t=ls(e);for(;qn(t)&&!Ul(t);){if(gm(t))return t;if(ru(t))return null;t=ls(t)}return null}function xm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ul(e){return["html","body","#document"].includes(Jl(e))}function Nn(e){return Jt(e).getComputedStyle(e)}function iu(e){return _n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ls(e){if(Jl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jg(e)&&e.host||Pn(e);return Jg(t)?t.host:t}function Yj(e){const t=ls(e);return Ul(t)?e.ownerDocument?e.ownerDocument.body:e.body:qn(t)&&Li(t)?t:Yj(t)}function ai(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Yj(e),r=s===((a=e.ownerDocument)==null?void 0:a.body),i=Jt(s);if(r){const o=Of(i);return t.concat(i,i.visualViewport||[],Li(s)?s:[],o&&n?ai(o):[])}return t.concat(s,ai(s,[],n))}function Of(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pj(e){const t=Nn(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const s=qn(e),r=s?e.offsetWidth:n,i=s?e.offsetHeight:a,o=vc(n)!==r||vc(a)!==i;return o&&(n=r,a=i),{width:n,height:a,$:o}}function vm(e){return _n(e)?e:e.contextElement}function Sl(e){const t=vm(e);if(!qn(t))return $n(1);const n=t.getBoundingClientRect(),{width:a,height:s,$:r}=Pj(t);let i=(r?vc(n.width):n.width)/a,o=(r?vc(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}const SE=$n(0);function Xj(e){const t=Jt(e);return!xm()||!t.visualViewport?SE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kE(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jt(e)?!1:t}function Ms(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),r=vm(e);let i=$n(1);t&&(a?_n(a)&&(i=Sl(a)):i=Sl(e));const o=kE(r,n,a)?Xj(r):$n(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=Jt(r),g=a&&_n(a)?Jt(a):a;let j=m,v=Of(j);for(;v&&a&&g!==j;){const b=Sl(v),x=v.getBoundingClientRect(),p=Nn(v),y=x.left+(v.clientLeft+parseFloat(p.paddingLeft))*b.x,w=x.top+(v.clientTop+parseFloat(p.paddingTop))*b.y;c*=b.x,d*=b.y,f*=b.x,h*=b.y,c+=y,d+=w,j=Jt(v),v=Of(j)}}return bc({width:f,height:h,x:c,y:d})}function ym(e,t){const n=iu(e).scrollLeft;return t?t.left+n:Ms(Pn(e)).left+n}function Kj(e,t,n){n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=a.left+t.scrollLeft-(n?0:ym(e,a)),r=a.top+t.scrollTop;return{x:s,y:r}}function TE(e){let{elements:t,rect:n,offsetParent:a,strategy:s}=e;const r=s==="fixed",i=Pn(a),o=t?ru(t.floating):!1;if(a===i||o&&r)return n;let c={scrollLeft:0,scrollTop:0},d=$n(1);const f=$n(0),h=qn(a);if((h||!h&&!r)&&((Jl(a)!=="body"||Li(i))&&(c=iu(a)),qn(a))){const g=Ms(a);d=Sl(a),f.x=g.x+a.clientLeft,f.y=g.y+a.clientTop}const m=i&&!h&&!r?Kj(i,c,!0):$n(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 CE(e){return Array.from(e.getClientRects())}function EE(e){const t=Pn(e),n=iu(e),a=e.ownerDocument.body,s=Xt(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),r=Xt(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let i=-n.scrollLeft+ym(e);const o=-n.scrollTop;return Nn(a).direction==="rtl"&&(i+=Xt(t.clientWidth,a.clientWidth)-s),{width:s,height:r,x:i,y:o}}function RE(e,t){const n=Jt(e),a=Pn(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=xm();(!d||d&&t==="fixed")&&(o=s.offsetLeft,c=s.offsetTop)}return{width:r,height:i,x:o,y:c}}function AE(e,t){const n=Ms(e,!0,t==="fixed"),a=n.top+e.clientTop,s=n.left+e.clientLeft,r=qn(e)?Sl(e):$n(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 ex(e,t,n){let a;if(t==="viewport")a=RE(e,n);else if(t==="document")a=EE(Pn(e));else if(_n(t))a=AE(t,n);else{const s=Xj(e);a={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return bc(a)}function Qj(e,t){const n=ls(e);return n===t||!_n(n)||Ul(n)?!1:Nn(n).position==="fixed"||Qj(n,t)}function ME(e,t){const n=t.get(e);if(n)return n;let a=ai(e,[],!1).filter(o=>_n(o)&&Jl(o)!=="body"),s=null;const r=Nn(e).position==="fixed";let i=r?ls(e):e;for(;_n(i)&&!Ul(i);){const o=Nn(i),c=gm(i);!c&&o.position==="fixed"&&(s=null),(r?!c&&!s:!c&&o.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Li(i)&&!c&&Qj(e,i))?a=a.filter(f=>f!==i):s=o,i=ls(i)}return t.set(e,a),a}function OE(e){let{element:t,boundary:n,rootBoundary:a,strategy:s}=e;const i=[...n==="clippingAncestors"?ru(t)?[]:ME(t,this._c):[].concat(n),a],o=i[0],c=i.reduce((d,f)=>{const h=ex(t,f,s);return d.top=Xt(h.top,d.top),d.right=ss(h.right,d.right),d.bottom=ss(h.bottom,d.bottom),d.left=Xt(h.left,d.left),d},ex(t,o,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function DE(e){const{width:t,height:n}=Pj(e);return{width:t,height:n}}function zE(e,t,n){const a=qn(t),s=Pn(t),r=n==="fixed",i=Ms(e,!0,r,t);let o={scrollLeft:0,scrollTop:0};const c=$n(0);function d(){c.x=ym(s)}if(a||!a&&!r)if((Jl(t)!=="body"||Li(s))&&(o=iu(t)),a){const g=Ms(t,!0,r,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else s&&d();r&&!a&&s&&d();const f=s&&!a&&!r?Kj(s,o):$n(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 xd(e){return Nn(e).position==="static"}function tx(e,t){if(!qn(e)||Nn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pn(e)===n&&(n=n.ownerDocument.body),n}function Zj(e,t){const n=Jt(e);if(ru(e))return n;if(!qn(e)){let s=ls(e);for(;s&&!Ul(s);){if(_n(s)&&!xd(s))return s;s=ls(s)}return n}let a=tx(e,t);for(;a&&_E(a)&&xd(a);)a=tx(a,t);return a&&Ul(a)&&xd(a)&&!gm(a)?n:a||NE(e)||n}const $E=async function(e){const t=this.getOffsetParent||Zj,n=this.getDimensions,a=await n(e.floating);return{reference:zE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function LE(e){return Nn(e).direction==="rtl"}const UE={convertOffsetParentRelativeRectToViewportRelativeRect:TE,getDocumentElement:Pn,getClippingRect:OE,getOffsetParent:Zj,getElementRects:$E,getClientRects:CE,getDimensions:DE,getScale:Sl,isElement:_n,isRTL:LE};function Fj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function HE(e,t){let n=null,a;const s=Pn(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:g}=d;if(o||t(),!m||!g)return;const j=po(h),v=po(s.clientWidth-(f+m)),b=po(s.clientHeight-(h+g)),x=po(f),y={rootMargin:-j+"px "+-v+"px "+-b+"px "+-x+"px",threshold:Xt(0,ss(1,c))||1};let w=!0;function _(k){const N=k[0].intersectionRatio;if(N!==c){if(!w)return i();N?i(!1,N):a=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Fj(d,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(_,{...y,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(e)}return i(!0),r}function BE(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=vm(e),f=s||r?[...d?ai(d):[],...ai(t)]:[];f.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),r&&x.addEventListener("resize",n)});const h=d&&o?HE(d,n):null;let m=-1,g=null;i&&(g=new ResizeObserver(x=>{let[p]=x;p&&p.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(t)})),n()}),d&&!c&&g.observe(d),g.observe(t));let j,v=c?Ms(e):null;c&&b();function b(){const x=Ms(e);v&&!Fj(v,x)&&n(),v=x,j=requestAnimationFrame(b)}return n(),()=>{var x;f.forEach(p=>{s&&p.removeEventListener("scroll",n),r&&p.removeEventListener("resize",n)}),h==null||h(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(j)}}const qE=yE,GE=bE,IE=gE,VE=wE,YE=xE,nx=pE,PE=jE,XE=(e,t,n)=>{const a=new Map,s={platform:UE,...n},r={...s.platform,_c:a};return mE(e,t,{...s,platform:r})};var KE=typeof document<"u",QE=function(){},Uo=KE?u.useLayoutEffect:QE;function jc(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(!jc(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)&&!jc(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function Wj(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ax(e,t){const n=Wj(e);return Math.round(t*n)/n}function vd(e){const t=u.useRef(e);return Uo(()=>{t.current=e}),t}function ZE(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,g]=u.useState(a);jc(m,a)||g(a);const[j,v]=u.useState(null),[b,x]=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,x(C))},[]),w=r||j,_=i||b,k=u.useRef(null),N=u.useRef(null),S=u.useRef(f),M=c!=null,O=vd(c),z=vd(s),B=vd(d),T=u.useCallback(()=>{if(!k.current||!N.current)return;const C={placement:t,strategy:n,middleware:m};z.current&&(C.platform=z.current),XE(k.current,N.current,C).then(L=>{const K={...L,isPositioned:B.current!==!1};$.current&&!jc(S.current,K)&&(S.current=K,ql.flushSync(()=>{h(K)}))})},[m,t,n,z,B]);Uo(()=>{d===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,h(C=>({...C,isPositioned:!1})))},[d]);const $=u.useRef(!1);Uo(()=>($.current=!0,()=>{$.current=!1}),[]),Uo(()=>{if(w&&(k.current=w),_&&(N.current=_),w&&_){if(O.current)return O.current(w,_,T);T()}},[w,_,T,O,M]);const I=u.useMemo(()=>({reference:k,floating:N,setReference:p,setFloating:y}),[p,y]),R=u.useMemo(()=>({reference:w,floating:_}),[w,_]),q=u.useMemo(()=>{const C={position:n,left:0,top:0};if(!R.floating)return C;const L=ax(R.floating,f.x),K=ax(R.floating,f.y);return o?{...C,transform:"translate("+L+"px, "+K+"px)",...Wj(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:K}},[n,o,R.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:T,refs:I,elements:R,floatingStyles:q}),[f,T,I,R,q])}const FE=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?nx({element:a.current,padding:s}).fn(n):{}:a?nx({element:a,padding:s}).fn(n):{}}}},WE=(e,t)=>({...qE(e),options:[e,t]}),JE=(e,t)=>({...GE(e),options:[e,t]}),eR=(e,t)=>({...PE(e),options:[e,t]}),tR=(e,t)=>({...IE(e),options:[e,t]}),nR=(e,t)=>({...VE(e),options:[e,t]}),aR=(e,t)=>({...YE(e),options:[e,t]}),sR=(e,t)=>({...FE(e),options:[e,t]});var lR="Arrow",Jj=u.forwardRef((e,t)=>{const{children:n,width:a=10,height:s=5,...r}=e;return l.jsx(he.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"})})});Jj.displayName=lR;var rR=Jj,bm="Popper",[e0,er]=Yn(bm),[iR,t0]=e0(bm),n0=e=>{const{__scopePopper:t,children:n}=e,[a,s]=u.useState(null);return l.jsx(iR,{scope:t,anchor:a,onAnchorChange:s,children:n})};n0.displayName=bm;var a0="PopperAnchor",s0=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...s}=e,r=t0(a0,n),i=u.useRef(null),o=Re(t,i);return u.useEffect(()=>{r.onAnchorChange((a==null?void 0:a.current)||i.current)}),a?null:l.jsx(he.div,{...s,ref:o})});s0.displayName=a0;var jm="PopperContent",[oR,cR]=e0(jm),l0=u.forwardRef((e,t)=>{var H,ee,oe,fe,me,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:g="optimized",onPlaced:j,...v}=e,b=t0(jm,n),[x,p]=u.useState(null),y=Re(t,se=>p(se)),[w,_]=u.useState(null),k=zj(w),N=(k==null?void 0:k.width)??0,S=(k==null?void 0:k.height)??0,M=a+(r!=="center"?"-"+r:""),O=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(d)?d:[d],B=z.length>0,T={padding:O,boundary:z.filter(dR),altBoundary:B},{refs:$,floatingStyles:I,placement:R,isPositioned:q,middlewareData:C}=ZE({strategy:"fixed",placement:M,whileElementsMounted:(...se)=>BE(...se,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[WE({mainAxis:s+S,alignmentAxis:i}),c&&JE({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?eR():void 0,...T}),c&&tR({...T}),nR({...T,apply:({elements:se,rects:ae,availableWidth:Ke,availableHeight:ie})=>{const{width:tt,height:it}=ae.reference,nt=se.floating.style;nt.setProperty("--radix-popper-available-width",`${Ke}px`),nt.setProperty("--radix-popper-available-height",`${ie}px`),nt.setProperty("--radix-popper-anchor-width",`${tt}px`),nt.setProperty("--radix-popper-anchor-height",`${it}px`)}}),w&&sR({element:w,padding:o}),fR({arrowWidth:N,arrowHeight:S}),m&&aR({strategy:"referenceHidden",...T})]}),[L,K]=o0(R),D=Bn(j);Rt(()=>{q&&(D==null||D())},[q,D]);const V=(H=C.arrow)==null?void 0:H.x,ne=(ee=C.arrow)==null?void 0:ee.y,P=((oe=C.arrow)==null?void 0:oe.centerOffset)!==0,[ye,te]=u.useState();return Rt(()=>{x&&te(window.getComputedStyle(x).zIndex)},[x]),l.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:q?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[(fe=C.transformOrigin)==null?void 0:fe.x,(me=C.transformOrigin)==null?void 0:me.y].join(" "),...((ue=C.hide)==null?void 0:ue.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(oR,{scope:n,placedSide:L,onArrowChange:_,arrowX:V,arrowY:ne,shouldHideArrow:P,children:l.jsx(he.div,{"data-side":L,"data-align":K,...v,ref:y,style:{...v.style,animation:q?void 0:"none"}})})})});l0.displayName=jm;var r0="PopperArrow",uR={top:"bottom",right:"left",bottom:"top",left:"right"},i0=u.forwardRef(function(t,n){const{__scopePopper:a,...s}=t,r=cR(r0,a),i=uR[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(rR,{...s,ref:n,style:{...s.style,display:"block"}})})});i0.displayName=r0;function dR(e){return e!==null}var fR=e=>({name:"transformOrigin",options:e,fn(t){var b,x,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]=o0(n),h={start:"0%",center:"50%",end:"100%"}[f],m=(((x=s.arrow)==null?void 0:x.x)??0)+o/2,g=(((p=s.arrow)==null?void 0:p.y)??0)+c/2;let j="",v="";return d==="bottom"?(j=i?h:`${m}px`,v=`${-c}px`):d==="top"?(j=i?h:`${m}px`,v=`${a.floating.height+c}px`):d==="right"?(j=`${-c}px`,v=i?h:`${g}px`):d==="left"&&(j=`${a.floating.width+c}px`,v=i?h:`${g}px`),{data:{x:j,y:v}}}});function o0(e){const[t,n="center"]=e.split("-");return[t,n]}var wm=n0,_m=s0,Nm=l0,Sm=i0,yd="rovingFocusGroup.onEntryFocus",hR={bubbles:!1,cancelable:!0},Ui="RovingFocusGroup",[Df,c0,mR]=fm(Ui),[pR,ou]=Yn(Ui,[mR]),[gR,xR]=pR(Ui),u0=u.forwardRef((e,t)=>l.jsx(Df.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Df.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(vR,{...e,ref:t})})}));u0.displayName=Ui;var vR=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),g=Re(t,m),j=su(r),[v,b]=as({prop:i,defaultProp:o??null,onChange:c,caller:Ui}),[x,p]=u.useState(!1),y=Bn(d),w=c0(n),_=u.useRef(!1),[k,N]=u.useState(0);return u.useEffect(()=>{const S=m.current;if(S)return S.addEventListener(yd,y),()=>S.removeEventListener(yd,y)},[y]),l.jsx(gR,{scope:n,orientation:a,dir:j,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(he.div,{tabIndex:x||k===0?-1:0,"data-orientation":a,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:Z(e.onMouseDown,()=>{_.current=!0}),onFocus:Z(e.onFocus,S=>{const M=!_.current;if(S.target===S.currentTarget&&M&&!x){const O=new CustomEvent(yd,hR);if(S.currentTarget.dispatchEvent(O),!O.defaultPrevented){const z=w().filter(R=>R.focusable),B=z.find(R=>R.active),T=z.find(R=>R.id===v),I=[B,T,...z].filter(Boolean).map(R=>R.ref.current);h0(I,f)}}_.current=!1}),onBlur:Z(e.onBlur,()=>p(!1))})})}),d0="RovingFocusGroupItem",f0=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:s=!1,tabStopId:r,children:i,...o}=e,c=bn(),d=r||c,f=xR(d0,n),h=f.currentTabStopId===d,m=c0(n),{onFocusableItemAdd:g,onFocusableItemRemove:j,currentTabStopId:v}=f;return u.useEffect(()=>{if(a)return g(),()=>j()},[a,g,j]),l.jsx(Df.ItemSlot,{scope:n,id:d,focusable:a,active:s,children:l.jsx(he.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...o,ref:t,onMouseDown:Z(e.onMouseDown,b=>{a?f.onItemFocus(d):b.preventDefault()}),onFocus:Z(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:Z(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=jR(b,f.orientation,f.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let y=m().filter(w=>w.focusable).map(w=>w.ref.current);if(x==="last")y.reverse();else if(x==="prev"||x==="next"){x==="prev"&&y.reverse();const w=y.indexOf(b.currentTarget);y=f.loop?wR(y,w+1):y.slice(w+1)}setTimeout(()=>h0(y))}}),children:typeof i=="function"?i({isCurrentTabStop:h,hasTabStop:v!=null}):i})})});f0.displayName=d0;var yR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function bR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function jR(e,t,n){const a=bR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return yR[a]}function h0(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function wR(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var m0=u0,p0=f0,zf=["Enter"," "],_R=["ArrowDown","PageUp","Home"],g0=["ArrowUp","PageDown","End"],NR=[..._R,...g0],SR={ltr:[...zf,"ArrowRight"],rtl:[...zf,"ArrowLeft"]},kR={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Hi="Menu",[si,TR,CR]=fm(Hi),[Bs,x0]=Yn(Hi,[CR,er,ou]),cu=er(),v0=ou(),[ER,qs]=Bs(Hi),[RR,Bi]=Bs(Hi),y0=e=>{const{__scopeMenu:t,open:n=!1,children:a,dir:s,onOpenChange:r,modal:i=!0}=e,o=cu(t),[c,d]=u.useState(null),f=u.useRef(!1),h=Bn(r),m=su(s);return u.useEffect(()=>{const g=()=>{f.current=!0,document.addEventListener("pointerdown",j,{capture:!0,once:!0}),document.addEventListener("pointermove",j,{capture:!0,once:!0})},j=()=>f.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",j,{capture:!0}),document.removeEventListener("pointermove",j,{capture:!0})}},[]),l.jsx(wm,{...o,children:l.jsx(ER,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:d,children:l.jsx(RR,{scope:t,onClose:u.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:f,dir:m,modal:i,children:a})})})};y0.displayName=Hi;var AR="MenuAnchor",km=u.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,s=cu(n);return l.jsx(_m,{...s,...a,ref:t})});km.displayName=AR;var Tm="MenuPortal",[MR,b0]=Bs(Tm,{forceMount:void 0}),j0=e=>{const{__scopeMenu:t,forceMount:n,children:a,container:s}=e,r=qs(Tm,t);return l.jsx(MR,{scope:t,forceMount:n,children:l.jsx(pn,{present:n||r.open,children:l.jsx(Ci,{asChild:!0,container:s,children:a})})})};j0.displayName=Tm;var fn="MenuContent",[OR,Cm]=Bs(fn),w0=u.forwardRef((e,t)=>{const n=b0(fn,e.__scopeMenu),{forceMount:a=n.forceMount,...s}=e,r=qs(fn,e.__scopeMenu),i=Bi(fn,e.__scopeMenu);return l.jsx(si.Provider,{scope:e.__scopeMenu,children:l.jsx(pn,{present:a||r.open,children:l.jsx(si.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx(DR,{...s,ref:t}):l.jsx(zR,{...s,ref:t})})})})}),DR=u.forwardRef((e,t)=>{const n=qs(fn,e.__scopeMenu),a=u.useRef(null),s=Re(t,a);return u.useEffect(()=>{const r=a.current;if(r)return sm(r)},[]),l.jsx(Em,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Z(e.onFocusOutside,r=>r.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),zR=u.forwardRef((e,t)=>{const n=qs(fn,e.__scopeMenu);return l.jsx(Em,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),$R=Rs("MenuContent.ScrollLock"),Em=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:g,disableOutsideScroll:j,...v}=e,b=qs(fn,n),x=Bi(fn,n),p=cu(n),y=v0(n),w=TR(n),[_,k]=u.useState(null),N=u.useRef(null),S=Re(t,N,b.onContentChange),M=u.useRef(0),O=u.useRef(""),z=u.useRef(0),B=u.useRef(null),T=u.useRef("right"),$=u.useRef(0),I=j?tu:u.Fragment,R=j?{as:$R,allowPinchZoom:!0}:void 0,q=L=>{var H,ee;const K=O.current+L,D=w().filter(oe=>!oe.disabled),V=document.activeElement,ne=(H=D.find(oe=>oe.ref.current===V))==null?void 0:H.textValue,P=D.map(oe=>oe.textValue),ye=KR(P,K,ne),te=(ee=D.find(oe=>oe.textValue===ye))==null?void 0:ee.ref.current;(function oe(fe){O.current=fe,window.clearTimeout(M.current),fe!==""&&(M.current=window.setTimeout(()=>oe(""),1e3))})(K),te&&setTimeout(()=>te.focus())};u.useEffect(()=>()=>window.clearTimeout(M.current),[]),am();const C=u.useCallback(L=>{var D,V;return T.current===((D=B.current)==null?void 0:D.side)&&ZR(L,(V=B.current)==null?void 0:V.area)},[]);return l.jsx(OR,{scope:n,searchRef:O,onItemEnter:u.useCallback(L=>{C(L)&&L.preventDefault()},[C]),onItemLeave:u.useCallback(L=>{var K;C(L)||((K=N.current)==null||K.focus(),k(null))},[C]),onTriggerLeave:u.useCallback(L=>{C(L)&&L.preventDefault()},[C]),pointerGraceTimerRef:z,onPointerGraceIntentChange:u.useCallback(L=>{B.current=L},[]),children:l.jsx(I,{...R,children:l.jsx(Jc,{asChild:!0,trapped:s,onMountAutoFocus:Z(r,L=>{var K;L.preventDefault(),(K=N.current)==null||K.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Ti,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,onDismiss:g,children:l.jsx(m0,{asChild:!0,...y,dir:x.dir,orientation:"vertical",loop:a,currentTabStopId:_,onCurrentTabStopIdChange:k,onEntryFocus:Z(c,L=>{x.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Nm,{role:"menu","aria-orientation":"vertical","data-state":U0(b.open),"data-radix-menu-content":"",dir:x.dir,...p,...v,ref:S,style:{outline:"none",...v.style},onKeyDown:Z(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&&q(L.key));const P=N.current;if(L.target!==P||!NR.includes(L.key))return;L.preventDefault();const te=w().filter(H=>!H.disabled).map(H=>H.ref.current);g0.includes(L.key)&&te.reverse(),PR(te)}),onBlur:Z(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(M.current),O.current="")}),onPointerMove:Z(e.onPointerMove,li(L=>{const K=L.target,D=$.current!==L.clientX;if(L.currentTarget.contains(K)&&D){const V=L.clientX>$.current?"right":"left";T.current=V,$.current=L.clientX}}))})})})})})})});w0.displayName=fn;var LR="MenuGroup",Rm=u.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return l.jsx(he.div,{role:"group",...a,ref:t})});Rm.displayName=LR;var UR="MenuLabel",_0=u.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return l.jsx(he.div,{...a,ref:t})});_0.displayName=UR;var wc="MenuItem",sx="menu.itemSelect",uu=u.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:a,...s}=e,r=u.useRef(null),i=Bi(wc,e.__scopeMenu),o=Cm(wc,e.__scopeMenu),c=Re(t,r),d=u.useRef(!1),f=()=>{const h=r.current;if(!n&&h){const m=new CustomEvent(sx,{bubbles:!0,cancelable:!0});h.addEventListener(sx,g=>a==null?void 0:a(g),{once:!0}),Jb(h,m),m.defaultPrevented?d.current=!1:i.onClose()}};return l.jsx(N0,{...s,ref:c,disabled:n,onClick:Z(e.onClick,f),onPointerDown:h=>{var m;(m=e.onPointerDown)==null||m.call(e,h),d.current=!0},onPointerUp:Z(e.onPointerUp,h=>{var m;d.current||(m=h.currentTarget)==null||m.click()}),onKeyDown:Z(e.onKeyDown,h=>{const m=o.searchRef.current!=="";n||m&&h.key===" "||zf.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});uu.displayName=wc;var N0=u.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:a=!1,textValue:s,...r}=e,i=Cm(wc,n),o=v0(n),c=u.useRef(null),d=Re(t,c),[f,h]=u.useState(!1),[m,g]=u.useState("");return u.useEffect(()=>{const j=c.current;j&&g((j.textContent??"").trim())},[r.children]),l.jsx(si.ItemSlot,{scope:n,disabled:a,textValue:s??m,children:l.jsx(p0,{asChild:!0,...o,focusable:!a,children:l.jsx(he.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...r,ref:d,onPointerMove:Z(e.onPointerMove,li(j=>{a?i.onItemLeave(j):(i.onItemEnter(j),j.defaultPrevented||j.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Z(e.onPointerLeave,li(j=>i.onItemLeave(j))),onFocus:Z(e.onFocus,()=>h(!0)),onBlur:Z(e.onBlur,()=>h(!1))})})})}),HR="MenuCheckboxItem",S0=u.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:a,...s}=e;return l.jsx(R0,{scope:e.__scopeMenu,checked:n,children:l.jsx(uu,{role:"menuitemcheckbox","aria-checked":_c(n)?"mixed":n,...s,ref:t,"data-state":Mm(n),onSelect:Z(s.onSelect,()=>a==null?void 0:a(_c(n)?!0:!n),{checkForDefaultPrevented:!1})})})});S0.displayName=HR;var k0="MenuRadioGroup",[BR,qR]=Bs(k0,{value:void 0,onValueChange:()=>{}}),T0=u.forwardRef((e,t)=>{const{value:n,onValueChange:a,...s}=e,r=Bn(a);return l.jsx(BR,{scope:e.__scopeMenu,value:n,onValueChange:r,children:l.jsx(Rm,{...s,ref:t})})});T0.displayName=k0;var C0="MenuRadioItem",E0=u.forwardRef((e,t)=>{const{value:n,...a}=e,s=qR(C0,e.__scopeMenu),r=n===s.value;return l.jsx(R0,{scope:e.__scopeMenu,checked:r,children:l.jsx(uu,{role:"menuitemradio","aria-checked":r,...a,ref:t,"data-state":Mm(r),onSelect:Z(a.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});E0.displayName=C0;var Am="MenuItemIndicator",[R0,GR]=Bs(Am,{checked:!1}),A0=u.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:a,...s}=e,r=GR(Am,n);return l.jsx(pn,{present:a||_c(r.checked)||r.checked===!0,children:l.jsx(he.span,{...s,ref:t,"data-state":Mm(r.checked)})})});A0.displayName=Am;var IR="MenuSeparator",M0=u.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return l.jsx(he.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});M0.displayName=IR;var VR="MenuArrow",O0=u.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,s=cu(n);return l.jsx(Sm,{...s,...a,ref:t})});O0.displayName=VR;var YR="MenuSub",[_3,D0]=Bs(YR),br="MenuSubTrigger",z0=u.forwardRef((e,t)=>{const n=qs(br,e.__scopeMenu),a=Bi(br,e.__scopeMenu),s=D0(br,e.__scopeMenu),r=Cm(br,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(km,{asChild:!0,...d,children:l.jsx(N0,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":U0(n.open),...e,ref:Wc(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:Z(e.onPointerMove,li(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:Z(e.onPointerLeave,li(h=>{var g,j;f();const m=(g=n.content)==null?void 0:g.getBoundingClientRect();if(m){const v=(j=n.content)==null?void 0:j.dataset.side,b=v==="right",x=b?-5:5,p=m[b?"left":"right"],y=m[b?"right":"left"];r.onPointerGraceIntentChange({area:[{x:h.clientX+x,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:Z(e.onKeyDown,h=>{var g;const m=r.searchRef.current!=="";e.disabled||m&&h.key===" "||SR[a.dir].includes(h.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),h.preventDefault())})})})});z0.displayName=br;var $0="MenuSubContent",L0=u.forwardRef((e,t)=>{const n=b0(fn,e.__scopeMenu),{forceMount:a=n.forceMount,...s}=e,r=qs(fn,e.__scopeMenu),i=Bi(fn,e.__scopeMenu),o=D0($0,e.__scopeMenu),c=u.useRef(null),d=Re(t,c);return l.jsx(si.Provider,{scope:e.__scopeMenu,children:l.jsx(pn,{present:a||r.open,children:l.jsx(si.Slot,{scope:e.__scopeMenu,children:l.jsx(Em,{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:Z(e.onFocusOutside,f=>{f.target!==o.trigger&&r.onOpenChange(!1)}),onEscapeKeyDown:Z(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:Z(e.onKeyDown,f=>{var g;const h=f.currentTarget.contains(f.target),m=kR[i.dir].includes(f.key);h&&m&&(r.onOpenChange(!1),(g=o.trigger)==null||g.focus(),f.preventDefault())})})})})})});L0.displayName=$0;function U0(e){return e?"open":"closed"}function _c(e){return e==="indeterminate"}function Mm(e){return _c(e)?"indeterminate":e?"checked":"unchecked"}function PR(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function XR(e,t){return e.map((n,a)=>e[(t+a)%e.length])}function KR(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=XR(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 QR(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 ZR(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return QR(n,t)}function li(e){return t=>t.pointerType==="mouse"?e(t):void 0}var FR=y0,WR=km,JR=j0,eA=w0,tA=Rm,nA=_0,aA=uu,sA=S0,lA=T0,rA=E0,iA=A0,oA=M0,cA=O0,uA=z0,dA=L0,du="DropdownMenu",[fA]=Yn(du,[x0]),zt=x0(),[hA,H0]=fA(du),B0=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]=as({prop:s,defaultProp:r??!1,onChange:i,caller:du});return l.jsx(hA,{scope:t,triggerId:bn(),triggerRef:d,contentId:bn(),open:f,onOpenChange:h,onOpenToggle:u.useCallback(()=>h(m=>!m),[h]),modal:o,children:l.jsx(FR,{...c,open:f,onOpenChange:h,dir:a,modal:o,children:n})})};B0.displayName=du;var q0="DropdownMenuTrigger",G0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...s}=e,r=H0(q0,n),i=zt(n);return l.jsx(WR,{asChild:!0,...i,children:l.jsx(he.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:Wc(t,r.triggerRef),onPointerDown:Z(e.onPointerDown,o=>{!a&&o.button===0&&o.ctrlKey===!1&&(r.onOpenToggle(),r.open||o.preventDefault())}),onKeyDown:Z(e.onKeyDown,o=>{a||(["Enter"," "].includes(o.key)&&r.onOpenToggle(),o.key==="ArrowDown"&&r.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});G0.displayName=q0;var mA="DropdownMenuPortal",I0=e=>{const{__scopeDropdownMenu:t,...n}=e,a=zt(t);return l.jsx(JR,{...a,...n})};I0.displayName=mA;var V0="DropdownMenuContent",Y0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=H0(V0,n),r=zt(n),i=u.useRef(!1);return l.jsx(eA,{id:s.contentId,"aria-labelledby":s.triggerId,...r,...a,ref:t,onCloseAutoFocus:Z(e.onCloseAutoFocus,o=>{var c;i.current||(c=s.triggerRef.current)==null||c.focus(),i.current=!1,o.preventDefault()}),onInteractOutside:Z(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)"}})});Y0.displayName=V0;var pA="DropdownMenuGroup",gA=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(tA,{...s,...a,ref:t})});gA.displayName=pA;var xA="DropdownMenuLabel",P0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(nA,{...s,...a,ref:t})});P0.displayName=xA;var vA="DropdownMenuItem",X0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(aA,{...s,...a,ref:t})});X0.displayName=vA;var yA="DropdownMenuCheckboxItem",K0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(sA,{...s,...a,ref:t})});K0.displayName=yA;var bA="DropdownMenuRadioGroup",jA=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(lA,{...s,...a,ref:t})});jA.displayName=bA;var wA="DropdownMenuRadioItem",Q0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(rA,{...s,...a,ref:t})});Q0.displayName=wA;var _A="DropdownMenuItemIndicator",Z0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(iA,{...s,...a,ref:t})});Z0.displayName=_A;var NA="DropdownMenuSeparator",F0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(oA,{...s,...a,ref:t})});F0.displayName=NA;var SA="DropdownMenuArrow",kA=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(cA,{...s,...a,ref:t})});kA.displayName=SA;var TA="DropdownMenuSubTrigger",W0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(uA,{...s,...a,ref:t})});W0.displayName=TA;var CA="DropdownMenuSubContent",J0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,s=zt(n);return l.jsx(dA,{...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)"}})});J0.displayName=CA;var EA=B0,RA=G0,AA=I0,ew=Y0,tw=P0,nw=X0,aw=K0,sw=Q0,lw=Z0,rw=F0,iw=W0,ow=J0;const fu=EA,hu=RA,MA=u.forwardRef(({className:e,inset:t,children:n,...a},s)=>l.jsxs(iw,{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(Rb,{className:"ml-auto"})]}));MA.displayName=iw.displayName;const OA=u.forwardRef(({className:e,...t},n)=>l.jsx(ow,{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}));OA.displayName=ow.displayName;const qi=u.forwardRef(({className:e,sideOffset:t=4,...n},a)=>l.jsx(AA,{container:Ei(),children:l.jsx(ew,{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})}));qi.displayName=ew.displayName;const Os=u.forwardRef(({className:e,inset:t,...n},a)=>l.jsx(nw,{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}));Os.displayName=nw.displayName;const DA=u.forwardRef(({className:e,children:t,checked:n,...a},s)=>l.jsxs(aw,{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(lw,{children:l.jsx(Kl,{className:"h-4 w-4"})})}),t]}));DA.displayName=aw.displayName;const zA=u.forwardRef(({className:e,children:t,...n},a)=>l.jsxs(sw,{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(lw,{children:l.jsx(qk,{className:"h-2 w-2 fill-current"})})}),t]}));zA.displayName=sw.displayName;const $A=u.forwardRef(({className:e,inset:t,...n},a)=>l.jsx(tw,{ref:a,className:F("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));$A.displayName=tw.displayName;const LA=u.forwardRef(({className:e,...t},n)=>l.jsx(rw,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));LA.displayName=rw.displayName;const UA={default:"h-9 px-3 py-1 text-sm",control:"h-7 px-2 py-1 text-xs"},Sn=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",UA[n],e),ref:s,...a}));Sn.displayName="Input";var HA="Label",cw=u.forwardRef((e,t)=>l.jsx(he.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())}}));cw.displayName=HA;var uw=cw;const BA=ki("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ze=u.forwardRef(({className:e,...t},n)=>l.jsx(uw,{ref:n,className:F(BA(),e),...t}));Ze.displayName=uw.displayName;function Om({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(Y,{asChild:!0,variant:"outline",size:"sm",className:"mt-4",children:l.jsx(r,{href:n,children:a})})]})})}function va({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 Nt({as:e="div",className:t,...n}){return l.jsx(e,{className:F("rounded-lg border",t),...n})}function lx(e,[t,n]){return Math.min(n,Math.max(t,e))}var dw=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"}),qA="VisuallyHidden",fw=u.forwardRef((e,t)=>l.jsx(he.span,{...e,ref:t,style:{...dw,...e.style}}));fw.displayName=qA;var GA=fw,IA=[" ","Enter","ArrowUp","ArrowDown"],VA=[" ","Enter"],Ds="Select",[mu,pu,YA]=fm(Ds),[tr]=Yn(Ds,[YA,er]),gu=er(),[PA,cs]=tr(Ds),[XA,KA]=tr(Ds),hw=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:g,form:j}=e,v=gu(t),[b,x]=u.useState(null),[p,y]=u.useState(null),[w,_]=u.useState(!1),k=su(d),[N,S]=as({prop:a,defaultProp:s??!1,onChange:r,caller:Ds}),[M,O]=as({prop:i,defaultProp:o,onChange:c,caller:Ds}),z=u.useRef(null),B=b?j||!!b.closest("form"):!0,[T,$]=u.useState(new Set),I=Array.from(T).map(R=>R.props.value).join(";");return l.jsx(wm,{...v,children:l.jsxs(PA,{required:g,scope:t,trigger:b,onTriggerChange:x,valueNode:p,onValueNodeChange:y,valueNodeHasChildren:w,onValueNodeHasChildrenChange:_,contentId:bn(),value:M,onValueChange:O,open:N,onOpenChange:S,dir:k,triggerPointerDownPosRef:z,disabled:m,children:[l.jsx(mu.Provider,{scope:t,children:l.jsx(XA,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(R=>{$(q=>new Set(q).add(R))},[]),onNativeOptionRemove:u.useCallback(R=>{$(q=>{const C=new Set(q);return C.delete(R),C})},[]),children:n})}),B?l.jsxs(Lw,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:h,value:M,onChange:R=>O(R.target.value),disabled:m,form:j,children:[M===void 0?l.jsx("option",{value:""}):null,Array.from(T)]},I):null]})})};hw.displayName=Ds;var mw="SelectTrigger",pw=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...s}=e,r=gu(n),i=cs(mw,n),o=i.disabled||a,c=Re(t,i.onTriggerChange),d=pu(n),f=u.useRef("touch"),[h,m,g]=Hw(v=>{const b=d().filter(y=>!y.disabled),x=b.find(y=>y.value===i.value),p=Bw(b,v,x);p!==void 0&&i.onValueChange(p.value)}),j=v=>{o||(i.onOpenChange(!0),g()),v&&(i.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return l.jsx(_m,{asChild:!0,...r,children:l.jsx(he.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":Uw(i.value)?"":void 0,...s,ref:c,onClick:Z(s.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&j(v)}),onPointerDown:Z(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"&&(j(v),v.preventDefault())}),onKeyDown:Z(s.onKeyDown,v=>{const b=h.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&m(v.key),!(b&&v.key===" ")&&IA.includes(v.key)&&(j(),v.preventDefault())})})})});pw.displayName=mw;var gw="SelectValue",xw=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,children:r,placeholder:i="",...o}=e,c=cs(gw,n),{onValueNodeHasChildrenChange:d}=c,f=r!==void 0,h=Re(t,c.onValueNodeChange);return Rt(()=>{d(f)},[d,f]),l.jsx(he.span,{...o,ref:h,style:{pointerEvents:"none"},children:Uw(c.value)?l.jsx(l.Fragment,{children:i}):r})});xw.displayName=gw;var QA="SelectIcon",vw=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...s}=e;return l.jsx(he.span,{"aria-hidden":!0,...s,ref:t,children:a||"▼"})});vw.displayName=QA;var ZA="SelectPortal",yw=e=>l.jsx(Ci,{asChild:!0,...e});yw.displayName=ZA;var zs="SelectContent",bw=u.forwardRef((e,t)=>{const n=cs(zs,e.__scopeSelect),[a,s]=u.useState();if(Rt(()=>{s(new DocumentFragment)},[]),!n.open){const r=a;return r?ql.createPortal(l.jsx(jw,{scope:e.__scopeSelect,children:l.jsx(mu.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),r):null}return l.jsx(ww,{...e,ref:t})});bw.displayName=zs;var gn=10,[jw,us]=tr(zs),FA="SelectContentImpl",WA=Rs("SelectContent.RemoveScroll"),ww=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:g,sticky:j,hideWhenDetached:v,avoidCollisions:b,...x}=e,p=cs(zs,n),[y,w]=u.useState(null),[_,k]=u.useState(null),N=Re(t,H=>w(H)),[S,M]=u.useState(null),[O,z]=u.useState(null),B=pu(n),[T,$]=u.useState(!1),I=u.useRef(!1);u.useEffect(()=>{if(y)return sm(y)},[y]),am();const R=u.useCallback(H=>{const[ee,...oe]=B().map(ue=>ue.ref.current),[fe]=oe.slice(-1),me=document.activeElement;for(const ue of H)if(ue===me||(ue==null||ue.scrollIntoView({block:"nearest"}),ue===ee&&_&&(_.scrollTop=0),ue===fe&&_&&(_.scrollTop=_.scrollHeight),ue==null||ue.focus(),document.activeElement!==me))return},[B,_]),q=u.useCallback(()=>R([S,y]),[R,S,y]);u.useEffect(()=>{T&&q()},[T,q]);const{onOpenChange:C,triggerPointerDownPosRef:L}=p;u.useEffect(()=>{if(y){let H={x:0,y:0};const ee=fe=>{var me,ue;H={x:Math.abs(Math.round(fe.pageX)-(((me=L.current)==null?void 0:me.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",ee),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",ee),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ee),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[K,D]=Hw(H=>{const ee=B().filter(me=>!me.disabled),oe=ee.find(me=>me.ref.current===document.activeElement),fe=Bw(ee,H,oe);fe&&setTimeout(()=>fe.ref.current.focus())}),V=u.useCallback((H,ee,oe)=>{const fe=!I.current&&!oe;(p.value!==void 0&&p.value===ee||fe)&&(M(H),fe&&(I.current=!0))},[p.value]),ne=u.useCallback(()=>y==null?void 0:y.focus(),[y]),P=u.useCallback((H,ee,oe)=>{const fe=!I.current&&!oe;(p.value!==void 0&&p.value===ee||fe)&&z(H)},[p.value]),ye=a==="popper"?$f:_w,te=ye===$f?{side:o,sideOffset:c,align:d,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:j,hideWhenDetached:v,avoidCollisions:b}:{};return l.jsx(jw,{scope:n,content:y,viewport:_,onViewportChange:k,itemRefCallback:V,selectedItem:S,onItemLeave:ne,itemTextRefCallback:P,focusSelectedItem:q,selectedItemText:O,position:a,isPositioned:T,searchRef:K,children:l.jsx(tu,{as:WA,allowPinchZoom:!0,children:l.jsx(Jc,{asChild:!0,trapped:p.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:Z(s,H=>{var ee;(ee=p.trigger)==null||ee.focus({preventScroll:!0}),H.preventDefault()}),children:l.jsx(Ti,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:l.jsx(ye,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:H=>H.preventDefault(),...x,...te,onPlaced:()=>$(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:Z(x.onKeyDown,H=>{const ee=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!ee&&H.key.length===1&&D(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let fe=B().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(H.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const me=H.target,ue=fe.indexOf(me);fe=fe.slice(ue+1)}setTimeout(()=>R(fe)),H.preventDefault()}})})})})})})});ww.displayName=FA;var JA="SelectItemAlignedPosition",_w=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...s}=e,r=cs(zs,n),i=us(zs,n),[o,c]=u.useState(null),[d,f]=u.useState(null),h=Re(t,N=>f(N)),m=pu(n),g=u.useRef(!1),j=u.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:x,focusSelectedItem:p}=i,y=u.useCallback(()=>{if(r.trigger&&r.valueNode&&o&&d&&v&&b&&x){const N=r.trigger.getBoundingClientRect(),S=d.getBoundingClientRect(),M=r.valueNode.getBoundingClientRect(),O=x.getBoundingClientRect();if(r.dir!=="rtl"){const me=O.left-S.left,ue=M.left-me,se=N.left-ue,ae=N.width+se,Ke=Math.max(ae,S.width),ie=window.innerWidth-gn,tt=lx(ue,[gn,Math.max(gn,ie-Ke)]);o.style.minWidth=ae+"px",o.style.left=tt+"px"}else{const me=S.right-O.right,ue=window.innerWidth-M.right-me,se=window.innerWidth-N.right-ue,ae=N.width+se,Ke=Math.max(ae,S.width),ie=window.innerWidth-gn,tt=lx(ue,[gn,Math.max(gn,ie-Ke)]);o.style.minWidth=ae+"px",o.style.right=tt+"px"}const z=m(),B=window.innerHeight-gn*2,T=v.scrollHeight,$=window.getComputedStyle(d),I=parseInt($.borderTopWidth,10),R=parseInt($.paddingTop,10),q=parseInt($.borderBottomWidth,10),C=parseInt($.paddingBottom,10),L=I+R+T+C+q,K=Math.min(b.offsetHeight*5,L),D=window.getComputedStyle(v),V=parseInt(D.paddingTop,10),ne=parseInt(D.paddingBottom,10),P=N.top+N.height/2-gn,ye=B-P,te=b.offsetHeight/2,H=b.offsetTop+te,ee=I+R+H,oe=L-ee;if(ee<=P){const me=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(ye,te+(me?ne:0)+ue+q),ae=ee+se;o.style.height=ae+"px"}else{const me=z.length>0&&b===z[0].ref.current;o.style.top="0px";const se=Math.max(P,I+v.offsetTop+(me?V:0)+te)+oe;o.style.height=se+"px",v.scrollTop=ee-P+v.offsetTop}o.style.margin=`${gn}px 0`,o.style.minHeight=K+"px",o.style.maxHeight=B+"px",a==null||a(),requestAnimationFrame(()=>g.current=!0)}},[m,r.trigger,r.valueNode,o,d,v,b,x,r.dir,a]);Rt(()=>y(),[y]);const[w,_]=u.useState();Rt(()=>{d&&_(window.getComputedStyle(d).zIndex)},[d]);const k=u.useCallback(N=>{N&&j.current===!0&&(y(),p==null||p(),j.current=!1)},[y,p]);return l.jsx(tM,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:g,onScrollButtonChange:k,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:l.jsx(he.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});_w.displayName=JA;var eM="SelectPopperPosition",$f=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:s=gn,...r}=e,i=gu(n);return l.jsx(Nm,{...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)"}})});$f.displayName=eM;var[tM,Dm]=tr(zs,{}),Lf="SelectViewport",Nw=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...s}=e,r=us(Lf,n),i=Dm(Lf,n),o=Re(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(mu.Slot,{scope:n,children:l.jsx(he.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Z(s.onScroll,d=>{const f=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&h){const g=Math.abs(c.current-f.scrollTop);if(g>0){const j=window.innerHeight-gn*2,v=parseFloat(h.style.minHeight),b=parseFloat(h.style.height),x=Math.max(v,b);if(x<j){const p=x+g,y=Math.min(j,p),w=p-y;h.style.height=y+"px",h.style.bottom==="0px"&&(f.scrollTop=w>0?w:0,h.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});Nw.displayName=Lf;var Sw="SelectGroup",[nM,aM]=tr(Sw),sM=u.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=bn();return l.jsx(nM,{scope:n,id:s,children:l.jsx(he.div,{role:"group","aria-labelledby":s,...a,ref:t})})});sM.displayName=Sw;var kw="SelectLabel",Tw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=aM(kw,n);return l.jsx(he.div,{id:s.id,...a,ref:t})});Tw.displayName=kw;var Nc="SelectItem",[lM,Cw]=tr(Nc),Ew=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:s=!1,textValue:r,...i}=e,o=cs(Nc,n),c=us(Nc,n),d=o.value===a,[f,h]=u.useState(r??""),[m,g]=u.useState(!1),j=Re(t,p=>{var y;return(y=c.itemRefCallback)==null?void 0:y.call(c,p,a,s)}),v=bn(),b=u.useRef("touch"),x=()=>{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(lM,{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(mu.ItemSlot,{scope:n,value:a,disabled:s,textValue:f,children:l.jsx(he.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:j,onFocus:Z(i.onFocus,()=>g(!0)),onBlur:Z(i.onBlur,()=>g(!1)),onClick:Z(i.onClick,()=>{b.current!=="mouse"&&x()}),onPointerUp:Z(i.onPointerUp,()=>{b.current==="mouse"&&x()}),onPointerDown:Z(i.onPointerDown,p=>{b.current=p.pointerType}),onPointerMove:Z(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:Z(i.onPointerLeave,p=>{var y;p.currentTarget===document.activeElement&&((y=c.onItemLeave)==null||y.call(c))}),onKeyDown:Z(i.onKeyDown,p=>{var w;((w=c.searchRef)==null?void 0:w.current)!==""&&p.key===" "||(VA.includes(p.key)&&x(),p.key===" "&&p.preventDefault())})})})})});Ew.displayName=Nc;var jr="SelectItemText",Rw=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,...r}=e,i=cs(jr,n),o=us(jr,n),c=Cw(jr,n),d=KA(jr,n),[f,h]=u.useState(null),m=Re(t,x=>h(x),c.onItemTextChange,x=>{var p;return(p=o.itemTextRefCallback)==null?void 0:p.call(o,x,c.value,c.disabled)}),g=f==null?void 0:f.textContent,j=u.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=d;return Rt(()=>(v(j),()=>b(j)),[v,b,j]),l.jsxs(l.Fragment,{children:[l.jsx(he.span,{id:c.textId,...r,ref:m}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ql.createPortal(r.children,i.valueNode):null]})});Rw.displayName=jr;var Aw="SelectItemIndicator",Mw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return Cw(Aw,n).isSelected?l.jsx(he.span,{"aria-hidden":!0,...a,ref:t}):null});Mw.displayName=Aw;var Uf="SelectScrollUpButton",Ow=u.forwardRef((e,t)=>{const n=us(Uf,e.__scopeSelect),a=Dm(Uf,e.__scopeSelect),[s,r]=u.useState(!1),i=Re(t,a.onScrollButtonChange);return Rt(()=>{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(zw,{...e,ref:i,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop-c.offsetHeight)}}):null});Ow.displayName=Uf;var Hf="SelectScrollDownButton",Dw=u.forwardRef((e,t)=>{const n=us(Hf,e.__scopeSelect),a=Dm(Hf,e.__scopeSelect),[s,r]=u.useState(!1),i=Re(t,a.onScrollButtonChange);return Rt(()=>{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(zw,{...e,ref:i,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop+c.offsetHeight)}}):null});Dw.displayName=Hf;var zw=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...s}=e,r=us("SelectScrollButton",n),i=u.useRef(null),o=pu(n),c=u.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),Rt(()=>{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(he.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:Z(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(a,50))}),onPointerMove:Z(s.onPointerMove,()=>{var d;(d=r.onItemLeave)==null||d.call(r),i.current===null&&(i.current=window.setInterval(a,50))}),onPointerLeave:Z(s.onPointerLeave,()=>{c()})})}),rM="SelectSeparator",$w=u.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return l.jsx(he.div,{"aria-hidden":!0,...a,ref:t})});$w.displayName=rM;var Bf="SelectArrow",iM=u.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=gu(n),r=cs(Bf,n),i=us(Bf,n);return r.open&&i.position==="popper"?l.jsx(Sm,{...s,...a,ref:t}):null});iM.displayName=Bf;var oM="SelectBubbleInput",Lw=u.forwardRef(({__scopeSelect:e,value:t,...n},a)=>{const s=u.useRef(null),r=Re(a,s),i=Dj(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(he.select,{...n,style:{...dw,...n.style},ref:r,defaultValue:t})});Lw.displayName=oM;function Uw(e){return e===""||e===void 0}function Hw(e){const t=Bn(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 Bw(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=cM(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 cM(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var uM=hw,qw=pw,dM=xw,fM=vw,hM=yw,Gw=bw,mM=Nw,Iw=Tw,Vw=Ew,pM=Rw,gM=Mw,Yw=Ow,Pw=Dw,Xw=$w;const xM={default:"h-9 px-3 py-2 text-sm",control:"h-7 px-2 py-1 text-xs"},Ln=uM,Un=dM,jn=u.forwardRef(({className:e,children:t,triggerSize:n="default",...a},s)=>l.jsxs(qw,{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",xM[n],e),...a,children:[t,l.jsx(fM,{asChild:!0,children:l.jsx(Ab,{className:"text-muted-foreground size-4","aria-hidden":"true"})})]}));jn.displayName=qw.displayName;const Kw=u.forwardRef(({className:e,...t},n)=>l.jsx(Yw,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx($k,{className:"size-4","aria-hidden":"true"})}));Kw.displayName=Yw.displayName;const Qw=u.forwardRef(({className:e,...t},n)=>l.jsx(Pw,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Ok,{className:"size-4","aria-hidden":"true"})}));Qw.displayName=Pw.displayName;const wn=u.forwardRef(({className:e,children:t,position:n="popper",...a},s)=>l.jsx(hM,{container:Ei(),children:l.jsxs(Gw,{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(Kw,{}),l.jsx(mM,{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(Qw,{})]})}));wn.displayName=Gw.displayName;const vM=u.forwardRef(({className:e,...t},n)=>l.jsx(Iw,{ref:n,className:F("px-2 py-1.5 text-sm font-semibold",e),...t}));vM.displayName=Iw.displayName;const dt=u.forwardRef(({className:e,children:t,...n},a)=>l.jsxs(Vw,{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(gM,{children:l.jsx(Kl,{className:"size-4","aria-hidden":"true"})})}),l.jsx(pM,{children:t})]}));dt.displayName=Vw.displayName;const yM=u.forwardRef(({className:e,...t},n)=>l.jsx(Xw,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));yM.displayName=Xw.displayName;function Bt({className:e,...t}){return l.jsx("div",{className:F("animate-pulse rounded-md bg-primary/10",e),...t})}const lt=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})}));lt.displayName="Table";const yt=u.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:F("[&_tr]:border-b",e),...t}));yt.displayName="TableHeader";const rt=u.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:F("[&_tr:last-child]:border-0",e),...t}));rt.displayName="TableBody";const bM=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}));bM.displayName="TableFooter";const ge=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}));ge.displayName="TableRow";const X=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}));X.displayName="TableHead";const G=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}));G.displayName="TableCell";const jM=u.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:F("text-muted-foreground mt-4 text-sm",e),...t}));jM.displayName="TableCaption";var xu="Tabs",[wM]=Yn(xu,[ou]),Zw=ou(),[_M,zm]=wM(xu),Fw=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,onValueChange:s,defaultValue:r,orientation:i="horizontal",dir:o,activationMode:c="automatic",...d}=e,f=su(o),[h,m]=as({prop:a,onChange:s,defaultProp:r??"",caller:xu});return l.jsx(_M,{scope:n,baseId:bn(),value:h,onValueChange:m,orientation:i,dir:f,activationMode:c,children:l.jsx(he.div,{dir:f,"data-orientation":i,...d,ref:t})})});Fw.displayName=xu;var Ww="TabsList",Jw=u.forwardRef((e,t)=>{const{__scopeTabs:n,loop:a=!0,...s}=e,r=zm(Ww,n),i=Zw(n);return l.jsx(m0,{asChild:!0,...i,orientation:r.orientation,dir:r.dir,loop:a,children:l.jsx(he.div,{role:"tablist","aria-orientation":r.orientation,...s,ref:t})})});Jw.displayName=Ww;var e_="TabsTrigger",t_=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,disabled:s=!1,...r}=e,i=zm(e_,n),o=Zw(n),c=s_(i.baseId,a),d=l_(i.baseId,a),f=a===i.value;return l.jsx(p0,{asChild:!0,...o,focusable:!s,active:f,children:l.jsx(he.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:Z(e.onMouseDown,h=>{!s&&h.button===0&&h.ctrlKey===!1?i.onValueChange(a):h.preventDefault()}),onKeyDown:Z(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&i.onValueChange(a)}),onFocus:Z(e.onFocus,()=>{const h=i.activationMode!=="manual";!f&&!s&&h&&i.onValueChange(a)})})})});t_.displayName=e_;var n_="TabsContent",a_=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,forceMount:s,children:r,...i}=e,o=zm(n_,n),c=s_(o.baseId,a),d=l_(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(pn,{present:s||f,children:({present:m})=>l.jsx(he.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})})});a_.displayName=n_;function s_(e,t){return`${e}-trigger-${t}`}function l_(e,t){return`${e}-content-${t}`}var NM=Fw,r_=Jw,i_=t_,o_=a_;const SM=NM,c_=u.forwardRef(({className:e,...t},n)=>l.jsx(r_,{ref:n,className:F("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));c_.displayName=r_.displayName;const qf=u.forwardRef(({className:e,...t},n)=>l.jsx(i_,{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}));qf.displayName=i_.displayName;const kM=u.forwardRef(({className:e,...t},n)=>l.jsx(o_,{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}));kM.displayName=o_.displayName;const Gs=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}));Gs.displayName="Textarea";var[vu]=Yn("Tooltip",[er]),yu=er(),u_="TooltipProvider",TM=700,Gf="tooltip.open",[CM,$m]=vu(u_),d_=e=>{const{__scopeTooltip:t,delayDuration:n=TM,skipDelayDuration:a=300,disableHoverableContent:s=!1,children:r}=e,i=u.useRef(!0),o=u.useRef(!1),c=u.useRef(0);return u.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),l.jsx(CM,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:u.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,a)},[a]),isPointerInTransitRef:o,onPointerInTransitChange:u.useCallback(d=>{o.current=d},[]),disableHoverableContent:s,children:r})};d_.displayName=u_;var ri="Tooltip",[EM,Gi]=vu(ri),f_=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:s,onOpenChange:r,disableHoverableContent:i,delayDuration:o}=e,c=$m(ri,e.__scopeTooltip),d=yu(t),[f,h]=u.useState(null),m=bn(),g=u.useRef(0),j=i??c.disableHoverableContent,v=o??c.delayDuration,b=u.useRef(!1),[x,p]=as({prop:a,defaultProp:s??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(Gf))):c.onClose(),r==null||r(N)},caller:ri}),y=u.useMemo(()=>x?b.current?"delayed-open":"instant-open":"closed",[x]),w=u.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b.current=!1,p(!0)},[p]),_=u.useCallback(()=>{window.clearTimeout(g.current),g.current=0,p(!1)},[p]),k=u.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,p(!0),g.current=0},v)},[v,p]);return u.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(wm,{...d,children:l.jsx(EM,{scope:t,contentId:m,open:x,stateAttribute:y,trigger:f,onTriggerChange:h,onTriggerEnter:u.useCallback(()=>{c.isOpenDelayedRef.current?k():w()},[c.isOpenDelayedRef,k,w]),onTriggerLeave:u.useCallback(()=>{j?_():(window.clearTimeout(g.current),g.current=0)},[_,j]),onOpen:w,onClose:_,disableHoverableContent:j,children:n})})};f_.displayName=ri;var If="TooltipTrigger",h_=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=Gi(If,n),r=$m(If,n),i=yu(n),o=u.useRef(null),c=Re(t,o,s.onTriggerChange),d=u.useRef(!1),f=u.useRef(!1),h=u.useCallback(()=>d.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),l.jsx(_m,{asChild:!0,...i,children:l.jsx(he.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...a,ref:c,onPointerMove:Z(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!r.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:Z(e.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:Z(e.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Z(e.onFocus,()=>{d.current||s.onOpen()}),onBlur:Z(e.onBlur,s.onClose),onClick:Z(e.onClick,s.onClose)})})});h_.displayName=If;var Lm="TooltipPortal",[RM,AM]=vu(Lm,{forceMount:void 0}),m_=e=>{const{__scopeTooltip:t,forceMount:n,children:a,container:s}=e,r=Gi(Lm,t);return l.jsx(RM,{scope:t,forceMount:n,children:l.jsx(pn,{present:n||r.open,children:l.jsx(Ci,{asChild:!0,container:s,children:a})})})};m_.displayName=Lm;var Hl="TooltipContent",p_=u.forwardRef((e,t)=>{const n=AM(Hl,e.__scopeTooltip),{forceMount:a=n.forceMount,side:s="top",...r}=e,i=Gi(Hl,e.__scopeTooltip);return l.jsx(pn,{present:a||i.open,children:i.disableHoverableContent?l.jsx(g_,{side:s,...r,ref:t}):l.jsx(MM,{side:s,...r,ref:t})})}),MM=u.forwardRef((e,t)=>{const n=Gi(Hl,e.__scopeTooltip),a=$m(Hl,e.__scopeTooltip),s=u.useRef(null),r=Re(t,s),[i,o]=u.useState(null),{trigger:c,onClose:d}=n,f=s.current,{onPointerInTransitChange:h}=a,m=u.useCallback(()=>{o(null),h(!1)},[h]),g=u.useCallback((j,v)=>{const b=j.currentTarget,x={x:j.clientX,y:j.clientY},p=LM(x,b.getBoundingClientRect()),y=UM(x,p),w=HM(v.getBoundingClientRect()),_=qM([...y,...w]);o(_),h(!0)},[h]);return u.useEffect(()=>()=>m(),[m]),u.useEffect(()=>{if(c&&f){const j=b=>g(b,f),v=b=>g(b,c);return c.addEventListener("pointerleave",j),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",j),f.removeEventListener("pointerleave",v)}}},[c,f,g,m]),u.useEffect(()=>{if(i){const j=v=>{const b=v.target,x={x:v.clientX,y:v.clientY},p=(c==null?void 0:c.contains(b))||(f==null?void 0:f.contains(b)),y=!BM(x,i);p?m():y&&(m(),d())};return document.addEventListener("pointermove",j),()=>document.removeEventListener("pointermove",j)}},[c,f,i,d,m]),l.jsx(g_,{...e,ref:r})}),[OM,DM]=vu(ri,{isInside:!1}),zM=bT("TooltipContent"),g_=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":s,onEscapeKeyDown:r,onPointerDownOutside:i,...o}=e,c=Gi(Hl,n),d=yu(n),{onClose:f}=c;return u.useEffect(()=>(document.addEventListener(Gf,f),()=>document.removeEventListener(Gf,f)),[f]),u.useEffect(()=>{if(c.trigger){const h=m=>{const g=m.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,f]),l.jsx(Ti,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:l.jsxs(Nm,{"data-state":c.stateAttribute,...d,...o,ref:t,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(zM,{children:a}),l.jsx(OM,{scope:n,isInside:!0,children:l.jsx(GA,{id:c.contentId,role:"tooltip",children:s||a})})]})})});p_.displayName=Hl;var x_="TooltipArrow",$M=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=yu(n);return DM(x_,n).isInside?null:l.jsx(Sm,{...s,...a,ref:t})});$M.displayName=x_;function LM(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,a,s,r)){case r:return"left";case s:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function UM(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function HM(e){const{top:t,right:n,bottom:a,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:a},{x:s,y:a}]}function BM(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 qM(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),GM(t)}function GM(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const s=e[a];for(;t.length>=2;){const r=t[t.length-1],i=t[t.length-2];if((r.x-i.x)*(s.y-i.y)>=(r.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const s=e[a];for(;n.length>=2;){const r=n[n.length-1],i=n[n.length-2];if((r.x-i.x)*(s.y-i.y)>=(r.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var IM=d_,VM=f_,YM=h_,PM=m_,v_=p_;const XM=IM,KM=VM,QM=YM,y_=u.forwardRef(({className:e,sideOffset:t=4,...n},a)=>{const s=Ei(),r=l.jsx(v_,{ref:a,sideOffset:t,className:F("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n});return s?l.jsx(PM,{container:s,children:r}):r});y_.displayName=v_.displayName;const rx=["none","read","comment","write","manage","admin"];function Sc(e,t){return rx.indexOf(e??"none")>=rx.indexOf(t)}function Um(e){return e==="api_key"?"API key":e==="sdlc_login"?"sdlc login":null}function bd(e,t){const n=Um(e);return e==="sdlc_login"&&t?`${n} on ${b_(t)}`:n}const ZM=String.fromCodePoint(8296),FM=String.fromCodePoint(8297);function b_(e){return`${ZM}${e}${FM}`}const ii={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"}},WM={backlog:"neutral",planned:"neutral",in_progress:"info",completed:"success",canceled:"neutral"};function j_(e){return e.name==="Blocked"?"warning":WM[e.category]}const ix=1800;function Gn(e){return new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}function qr(e){return new Date(e).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function Hm(e){return`${Hn(e)}, ${qr(e)}`}function mr(e){return e<90?`${Math.round(e)} s`:e<5400?`${Math.round(e/60)} min`:`${(e/3600).toFixed(1).replace(/\.0$/,"")} h`}function Hn(e){return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function w_(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function JM(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 eO(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 Ra="not_set";function tO({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 B;const f=Si(),[h,m]=u.useState(""),[g,j]=u.useState(""),[v,b]=u.useState(s??((B=r[0])==null?void 0:B.id)??""),[x,p]=u.useState(Ra),[y,w]=u.useState(Ra),[_,k]=u.useState(!1),[N,S]=u.useState(null),[M,O]=u.useState(!1);u.useEffect(()=>{var T;e&&(m(""),j(""),b(s??((T=r[0])==null?void 0:T.id)??""),p(Ra),w(Ra),k(!1),S(null))},[e,s,r]);const z=async T=>{if(T.preventDefault(),!h.trim()){k(!0);return}O(!0),S(null);try{const $=await t.run("create_task",{list_id:n,expected_list_revision:a,title:h.trim(),description:g.trim()||null,status_id:v||null,priority_id:x===Ra?null:x,primary_user_id:y===Ra?null:y});if(!$.ok){S($.refusal.message);return}f.success("Task created."),await d()}finally{O(!1)}};return l.jsx(Ai,{open:e,onOpenChange:T=>T?null:c(),children:l.jsx(Mi,{children:l.jsxs("form",{onSubmit:T=>void z(T),noValidate:!0,children:[l.jsxs(Oi,{children:[l.jsx(zi,{children:"New task"}),l.jsx($i,{children:"Add a task to this List."})]}),l.jsxs("div",{className:"mt-4 grid gap-4",children:[N&&l.jsxs(xe,{variant:"destructive",children:[l.jsx(et,{className:"size-4","aria-hidden":"true"}),l.jsx(pe,{children:N})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ze,{htmlFor:"new-task-title",children:"Title"}),l.jsx(Sn,{id:"new-task-title",placeholder:"What needs doing",value:h,required:!0,"aria-invalid":_,"aria-describedby":_?"new-task-title-error":void 0,onChange:T=>{m(T.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(Ze,{htmlFor:"new-task-description",children:"Description (optional)"}),l.jsx(Gs,{id:"new-task-description",rows:4,value:g,onChange:T=>j(T.target.value)})]}),l.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ze,{htmlFor:"new-task-status",children:"Status"}),l.jsxs(Ln,{value:v,onValueChange:b,children:[l.jsx(jn,{id:"new-task-status",children:l.jsx(Un,{})}),l.jsx(wn,{children:r.map(T=>l.jsx(dt,{value:T.id,children:T.name},T.id))})]})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ze,{htmlFor:"new-task-priority",children:"Priority"}),l.jsxs(Ln,{value:x,onValueChange:p,children:[l.jsx(jn,{id:"new-task-priority",children:l.jsx(Un,{})}),l.jsxs(wn,{children:[l.jsx(dt,{value:Ra,children:"Not set"}),i.map(T=>l.jsx(dt,{value:T.id,children:T.name},T.id))]})]})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ze,{htmlFor:"new-task-primary",children:"Primary"}),l.jsxs(Ln,{value:y,onValueChange:w,children:[l.jsx(jn,{id:"new-task-primary",children:l.jsx(Un,{})}),l.jsxs(wn,{children:[l.jsx(dt,{value:Ra,children:"Not set"}),o.map(T=>l.jsx(dt,{value:T.user_id,children:T.label},T.user_id))]})]})]})]})]}),l.jsxs(Di,{className:"mt-6",children:[l.jsx(Y,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),l.jsx(Y,{type:"submit",disabled:M,children:M?"Creating…":"Create task"})]})]})})})}const nO="Your organization's work, in queue order. Claim a task to show you are working on it.",wr="any",__="none",aO=1,sO=250,lO="The sdlc engine here is too old for this page",N_="Update the main checkout, then restart sdlc viewer.";function Bm(){const e=os().tasks;if(!e)throw new Error("The Tasks page rendered without the tasks seam.");return e}function rO({org:e}){var j;const t=Bm(),{href:n,Link:a}=St(),[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 x=await t.availability({fresh:v});b===f.current&&r(x)},[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"&&((j=s.refusal)==null?void 0:j.reason)!=="engine_missing")return l.jsx(Om,{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 g=(c==null?void 0:c.read_only_reason)??nO;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(oO,{active:s,org:e,members:i,description:g,read_only_reason:c==null?void 0:c.read_only_reason,reload_configuration:m}):l.jsxs(l.Fragment,{children:[l.jsx(va,{title:"Tasks",description:g}),s.state==="loading"&&l.jsx(S_,{}),(s.state==="error"||s.state==="off")&&l.jsx(k_,{refusal:s.refusal,on_retry:m}),s.state==="available"&&l.jsx(iO,{on_done:m})]})})}function S_(){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(Bt,{className:t===5?"h-10 w-2/3":"h-10 w-full"},t))})}function k_({refusal:e,on_retry:t}){return(e==null?void 0:e.reason)==="view_outdated"?l.jsxs(xe,{variant:"destructive",className:"mt-6",children:[l.jsx(et,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:lO}),l.jsx(pe,{children:N_})]}):(e==null?void 0:e.reason)==="engine_missing"?l.jsxs(xe,{variant:"info",className:"mt-6",children:[l.jsx(ma,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Tasks need the sdlc engine"}),l.jsx(pe,{children:e.message})]}):l.jsxs(xe,{variant:"destructive",className:"mt-6",children:[l.jsx(et,{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(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:t,children:"Retry"})]})]})}function iO({on_done:e}){const{commands:t}=Bm(),n=Si(),[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(xe,{variant:"info",className:"mt-6",children:[l.jsx(ma,{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(Y,{type:"button",size:"sm",className:"mt-2",disabled:a,onClick:()=>void i(),children:"Turn on Tasks"}):null]})]})}const jd=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function oO({active:e,org:t,members:n,description:a,read_only_reason:s,reload_configuration:r}){var np;const{commands:i,listTasks:o,waitingOnYou:c,hierarchyRevision:d}=Bm(),{href:f,Link:h}=St(),{self_id:m}=Fc(),g=Si(),{list:j,workspace:v}=e,b=j.offers,x=b!==void 0,p=u.useMemo(()=>{var A;return((A=v.workflows.find(De=>De.id===j.workflow_id))==null?void 0:A.statuses)??[]},[v,j]),y=v.priorities,w=!!i&&Sc(j.permission,"write"),_=w&&Sc(j.permission,"manage"),k=u.useMemo(()=>new Map(n.map(A=>[A.user_id,A])),[n]),N=A=>{var De;return A?A===m?"You":((De=k.get(A))==null?void 0:De.label)??"A member":""},[S,M]=u.useState("active"),[O,z]=u.useState(!1),[B,T]=u.useState(""),[$,I]=u.useState("");u.useEffect(()=>{const A=setTimeout(()=>I(B),sO);return()=>clearTimeout(A)},[B]);const[R,q]=u.useState(null),[C,L]=u.useState(wr),[K,D]=u.useState(!1),[V,ne]=u.useState(!1),[P,ye]=u.useState(null),[te,H]=u.useState([]),[ee,oe]=u.useState(null),[fe,me]=u.useState(0),[ue,se]=u.useState(!1),[ae,Ke]=u.useState(null),[ie,tt]=u.useState(null),[it,nt]=u.useState(!1),[bt,le]=u.useState(null),[It,ba]=u.useState({}),[nn,ja]=u.useState(""),{confirm:Xn,confirm_dialog:ar}=Ri(),an=u.useRef(null),ds=u.useRef(null),Q=u.useRef(null),Te=u.useRef(null),[Se,Is]=u.useState(void 0),wa=!!($.trim()||R||C!==wr||K||V),_a=u.useRef(0),At=u.useCallback(async(A,De=!1)=>{const Ue=A?_a.current:_a.current+=1,Ve={state:S,assigned_to_me:O||void 0,cursor:A,search:$.trim()||void 0,group:R??void 0,owner:C===wr?void 0:C===__?"":C,urgent:K||void 0,over_estimate:V||void 0},kt=$t=>o(j.id,{...Ve,cursor:$t});let mt=await kt(A),Ye=!!A;if(!mt.ok&&mt.refusal.code==="cursor_stale"&&(mt=await kt(),Ye=!1),Ue!==_a.current)return;if(!mt.ok){oe(mt.refusal),me($t=>$t+1);return}const Tt=mt.data;oe(null),me(0),!(De&&jd(Tt,Q.current))&&(Q.current=Tt,ye(Tt),Tt.facets&&Is(Tt.facets),H($t=>Ye?[...$t,...Tt.tasks]:Tt.tasks))},[o,j.id,S,O,$,R,C,K,V]),Na=u.useCallback(async()=>{const A=await c();if(tt(Ue=>A.ok?null:jd(Ue,A.refusal)?Ue:A.refusal),!A.ok&&x)return;const De=A.ok?A.data:null;jd(De,Te.current)||(Te.current=De,Ke(De))},[c,x]);u.useEffect(()=>{Q.current=null,ye(null)},[S,O]),u.useEffect(()=>{At()},[At]),u.useEffect(()=>{Na()},[Na]);const Kn=u.useCallback(async()=>{await Promise.all([At(),Na()])},[At,Na]),Sa=b==null?void 0:b.refresh_ms;u.useEffect(()=>{if(!Sa)return;const A=setInterval(()=>{At(void 0,!0),Na()},Sa);return()=>clearInterval(A)},[Sa,At,Na]);const sr=u.useCallback(async(A,De,Ue)=>{if(!i)return;const Ve=await i.run(A,De);Ve.ok?Ue&&g.success(Ue):(g.error(Ve.refusal.message),Ve.refusal.code==="revision_conflict"&&r()),await Kn()},[i,g,Kn,r]),Vs=p.find(A=>A.category==="completed"),E=async(A,De,Ue)=>{const Ve=De+Ue,kt=te[Ve];if(!kt||!P||!i)return;const mt=async(Ye,Tt)=>{const $t=await i.run(Ye,Tt);if(!$t.ok)throw $t.refusal;return $t.data};try{let Ye=P.list.order_revision,Tt=A.revision;if(kt.queue_rank===null){const $t=te.findIndex(ka=>ka.queue_rank===null);for(const ka of te.slice($t,Ve+1)){const Yi=await mt("reorder",{task_id:ka.id,expected_revision:ka.revision,expected_order_revision:Ye,placement:"end"});Ye=Yi.list.order_revision,ka.id===A.id&&(Tt=Yi.task.revision)}}await mt("reorder",{task_id:A.id,expected_revision:Tt,expected_order_revision:Ye,placement:Ue<0?"before":"after",anchor_task_id:kt.id})}catch(Ye){g.error(Ye.message)}await Kn()},ce=A=>{Vs&&sr("update_task",{task_id:A.id,expected_revision:A.revision,changes:{status_id:Vs.id}},`${A.title} completed.`)},Oe=async A=>{if(!P||!await Xn({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,Ve]=await Promise.all([o(j.id,{limit:1}),d(v.id)]);if(!Ue.ok||!Ve.ok){g.error(Ue.ok?Ve.ok?"":Ve.refusal.message:Ue.refusal.message);return}await sr("archive_task",{task_id:A.id,expected_revision:A.revision,expected_order_revision:Ue.data.list.order_revision,expected_hierarchy_revision:Ve.data},`${A.title} archived.`)},ht=async A=>{await sr("release_hold",{hold_id:A},"Hold released.")},ep=async(A,De,Ue,Ve)=>{var $t;if(!(i!=null&&i.complete)||!await Xn({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(A);const mt=await i.complete(Ue);if(le(null),!mt.ok){ba(ka=>({...ka,[A]:mt.refusal.message}));return}ba(({[A]:ka,...Yi})=>Yi),ja(`${De} marked done.`),await Kn();const Ye=ds.current;($t=(Ve?(Ye==null?void 0:Ye.querySelector(`[data-done-key="${CSS.escape(Ve)}"]`))??(Ye==null?void 0:Ye.querySelector(`[data-title-key="${CSS.escape(Ve)}"] a`)):null)??an.current)==null||$t.focus()},tp=()=>{var A;T(""),I(""),q(null),L(wr),D(!1),ne(!1),(A=an.current)==null||A.focus()},l1=new Map(p.map(A=>[A.id,A])),r1=new Map(y.map(A=>[A.id,A])),_u=new Map(te.map(A=>[A.id,A.title])),Nu=w&&S==="active",i1=te.some(A=>A.local_done),Su=Nu||i1,ku=!x||y.length>0,o1=!O&&!wa,c1=5+(ku?1:0)+(Su?1:0),u1=ee!==null&&(ee.reason==="store_locked"||ee.reason==="engine_failed")&&fe<=aO,Vi=(ae==null?void 0:ae.holds)??[],d1=te.map(A=>A.id),f1=Vi.map(A=>A.id);return l.jsxs("div",{ref:ds,className:"contents",children:[l.jsx(va,{title:"Tasks",description:a,actions:w?l.jsxs(Y,{type:"button",onClick:()=>nt(!0),children:[l.jsx(gc,{className:"mr-2 size-4","aria-hidden":"true"}),"New task"]}):null}),x&&(P!=null&&P.open)?l.jsxs("p",{className:"text-muted-foreground mt-1 text-sm",children:[P.open," open"]}):null,Sa?l.jsx("p",{className:"text-muted-foreground mt-1 text-xs",role:"status",children:ee?`Not reading · trying again every ${Math.round(Sa/1e3)}s`:P?`Live · refreshes every ${Math.round(Sa/1e3)}s`:"Connecting…"}):null,x?l.jsx("p",{className:"sr-only",role:"status",children:nn}):null,(x||Vi.length>0)&&l.jsxs(Nt,{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"}),Vi.length>0?l.jsx("ul",{className:"mt-2 divide-y","aria-labelledby":"waiting-title",children:Vi.map((A,De)=>{var mt,Ye;const Ue=ii[A.hold_type],Ve=A.target.kind==="task"?`Because you claim ${_u.get(A.target.task_id)??"the task it waits on"} · `:"",kt=A.local_done;return l.jsxs("li",{id:`waiting-${A.id}`,"data-title-key":A.id,className:"flex flex-wrap items-center gap-3 py-2",children:[A.task?l.jsx(h,{className:"text-primary min-w-40 flex-1 hover:underline",href:f(`/org/${t}/tasks/${A.task.id}`),children:A.task.title}):l.jsx("span",{className:"min-w-40 flex-1",children:A.reason}),l.jsx(Xe,{variant:Ue.tone,children:A.local_label??Ue.label}),l.jsxs("div",{className:"min-w-48 flex-2",children:[A.task?l.jsx("div",{className:"text-sm",children:A.reason}):null,l.jsxs("div",{className:"text-muted-foreground text-xs",children:[Ve,"From ",N(A.opened_by)," · ",Hn(A.opened_at)]}),(mt=A.local_threads)!=null&&mt.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"}),": ",A.local_threads.join(" · ")]}):null,It[A.id]?l.jsx("div",{className:"text-destructive text-xs",role:"alert",children:It[A.id]}):null]}),kt&&(i!=null&&i.complete)?l.jsx(Y,{type:"button",variant:"outline",size:"sm","data-done-key":A.id,"aria-label":`Mark ${((Ye=A.task)==null?void 0:Ye.title)??A.reason} done`,loading:bt===A.id,onClick:()=>{var Tt;return void ep(A.id,((Tt=A.task)==null?void 0:Tt.title)??A.reason,kt,f1[De+1]??null)},children:"Done"}):null,x?null:l.jsx(Y,{type:"button",variant:"outline",size:"sm",onClick:()=>void ht(A.id),children:"Release"})]},A.id)})}):ae?l.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"Nothing in this checkout waits on you."}):null,x&&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. ${N_}`:"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:x?"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."})]}),!w&&!s&&l.jsxs(xe,{variant:"info",className:"mt-4",children:[l.jsx(Jh,{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(SM,{value:S,onValueChange:A=>M(A),children:l.jsxs(c_,{"aria-label":"Which tasks",children:[l.jsx(qf,{value:"active",children:"Active"}),l.jsx(qf,{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(Fl,{id:"tasks-mine",checked:O,onCheckedChange:A=>z(A===!0)}),l.jsx(Ze,{htmlFor:"tasks-mine",children:"Assigned to me"})]}):null,b!=null&&b.search?l.jsx(Sn,{ref:an,type:"search",className:"w-64","aria-label":"Search tasks",placeholder:"Search title, ID or detail",value:B,onChange:A=>T(A.target.value)}):null,Se!=null&&Se.owners?l.jsx(uO,{owners:Se.owners,no_owner:Se.no_owner,value:C,on_change:L}):null]}),(np=Se==null?void 0:Se.groups)!=null&&np.length?l.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",role:"group","aria-label":"Status",children:[Se.groups.map(A=>l.jsxs(Y,{type:"button",variant:"outline",size:"sm",className:Lo,"aria-pressed":R===A.id,onClick:()=>q(De=>De===A.id?null:A.id),children:[A.label," ",A.count]},A.id)),Se.marks?l.jsxs(l.Fragment,{children:[l.jsxs(Y,{type:"button",variant:"outline",size:"sm",className:Lo,"aria-pressed":K,onClick:()=>D(A=>!A),children:["Urgent ",Se.marks.urgent]}),l.jsxs(Y,{type:"button",variant:"outline",size:"sm",className:Lo,"aria-pressed":V,onClick:()=>ne(A=>!A),children:["Over estimate ",Se.marks.over_estimate]})]}):null]}):null,wa&&(P==null?void 0:P.matched)!==void 0&&P.total!==void 0?l.jsxs("p",{className:"text-muted-foreground mt-2 text-sm",children:[P.matched," of ",P.total," match ·"," ",l.jsx(Y,{type:"button",variant:"link",size:"inline-sm",onClick:tp,children:"Clear"})]}):null,u1?l.jsx("p",{className:"text-muted-foreground mt-4 text-sm",children:"Tasks are busy. Reading them again…"}):ee?l.jsx(k_,{refusal:ee,on_retry:()=>void At()}):null,!P&&!ee&&l.jsx(S_,{}),P&&te.length===0&&wa?l.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[l.jsx(Ub,{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(Y,{type:"button",variant:"outline",onClick:tp,children:"Clear filters"})]}):P&&te.length===0&&S==="active"&&!O&&x?l.jsx("p",{className:"text-muted-foreground mt-6 text-sm",children:"No tasks recorded yet."}):P&&te.length===0&&S==="active"&&!O?l.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[l.jsx(Db,{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."}),w&&l.jsxs(Y,{type:"button",onClick:()=>nt(!0),children:[l.jsx(gc,{className:"mr-2 size-4","aria-hidden":"true"}),"New task"]})]}):P?l.jsxs(l.Fragment,{children:[l.jsx(Nt,{className:"mt-4 shrink-0 overflow-x-auto",children:l.jsxs(lt,{containerAriaLabel:"Tasks",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Title"}),l.jsx(X,{children:"Status"}),ku?l.jsx(X,{className:"hidden md:table-cell",children:"Priority"}):null,l.jsx(X,{className:"hidden md:table-cell",children:"Primary"}),l.jsx(X,{className:"hidden md:table-cell",children:"Holds"}),l.jsx(X,{children:"Claimed by"}),Su?l.jsx(X,{className:"text-right",children:"Actions"}):null]})}),l.jsxs(rt,{children:[te.map((A,De)=>{var mt,Ye;const Ue=l1.get(A.status_id),Ve=JM(A),kt=A.local_done;return l.jsxs(ge,{"data-testid":"tasks-row",children:[l.jsxs(G,{"data-title-key":A.id,children:[A.no_page?l.jsx("span",{children:A.title}):l.jsx(h,{className:"text-primary hover:underline",href:f(`/org/${t}/tasks/${A.id}`),children:A.title}),A.parent_task_id&&_u.get(A.parent_task_id)?l.jsx("div",{className:"text-muted-foreground text-xs",children:_u.get(A.parent_task_id)}):null,x?l.jsx(cO,{row:A}):null,It[A.id]?l.jsx("div",{className:"text-destructive text-xs",role:"alert",children:It[A.id]}):null]}),l.jsx(G,{children:Ue?l.jsx(Xe,{variant:j_(Ue),children:Ue.name}):null}),ku?l.jsx(G,{className:"hidden md:table-cell",children:A.priority_id?((mt=r1.get(A.priority_id))==null?void 0:mt.name)??"":l.jsx("span",{className:"text-muted-foreground",children:"Not set"})}):null,l.jsx(G,{className:"hidden md:table-cell",children:A.owner_title?A.owner_title:A.primary_user_id?N(A.primary_user_id):l.jsx("span",{className:"text-muted-foreground",children:"Unassigned"})}),l.jsx(G,{className:"hidden md:table-cell",children:Ve?l.jsx(Xe,{variant:Ve.tone,children:Ve.label}):l.jsx("span",{className:"text-muted-foreground",children:"None"})}),l.jsx(G,{"data-testid":"tasks-claim",children:l.jsx(dO,{row:A,holder:N((Ye=A.claim)==null?void 0:Ye.user_id)})}),Su?l.jsx(G,{className:"text-right whitespace-nowrap",children:l.jsxs("div",{className:"flex justify-end gap-2",children:[kt&&"hold"in kt?l.jsx("a",{className:"text-primary text-sm hover:underline",href:`#waiting-${kt.hold}`,children:"In Waiting on you"}):kt&&(i!=null&&i.complete)?l.jsx(Y,{type:"button",variant:"outline",size:"sm","data-done-key":A.id,"aria-label":`Mark ${A.title} done`,loading:bt===A.id,onClick:()=>void ep(A.id,A.title,kt,d1[De+1]??null),children:"Done"}):null,Nu&&o1?l.jsxs(l.Fragment,{children:[l.jsx(Y,{type:"button",variant:"outline",size:"icon","aria-label":`Move ${A.title} up`,disabled:De===0,onClick:()=>void E(A,De,-1),children:l.jsx(Sk,{className:"size-4","aria-hidden":"true"})}),l.jsx(Y,{type:"button",variant:"outline",size:"icon","aria-label":`Move ${A.title} down`,disabled:De===te.length-1,onClick:()=>void E(A,De,1),children:l.jsx(jk,{className:"size-4","aria-hidden":"true"})})]}):null,Nu?l.jsxs(fu,{children:[l.jsx(hu,{asChild:!0,children:l.jsx(Y,{type:"button",variant:"outline",size:"icon","aria-label":`More actions for ${A.title}`,children:l.jsx(Wh,{className:"size-4","aria-hidden":"true"})})}),l.jsxs(qi,{align:"end",children:[Vs&&A.status_id!==Vs.id?l.jsx(Os,{onSelect:()=>ce(A),children:"Complete"}):null,_?l.jsx(Os,{className:"text-destructive focus:text-destructive",onSelect:()=>void Oe(A),children:"Archive"}):null]})]}):null]})}):null]},A.id)}),te.length===0&&l.jsx(ge,{children:l.jsx(G,{colSpan:c1,className:"text-muted-foreground h-24 text-center",children:S==="archived"?"No archived tasks.":"No tasks are assigned to you."})})]})]})}),P.next_cursor?l.jsx(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2 self-start",disabled:ue,onClick:async()=>{se(!0),await At(P.next_cursor??void 0),se(!1)},children:"Load more"}):null]}):null,w&&i&&l.jsx(tO,{open:it,commands:i,list_id:j.id,list_revision:(P==null?void 0:P.list.revision)??j.revision,default_status_id:j.default_status_id,statuses:p,priorities:y,members:n,on_close:()=>nt(!1),on_created:async()=>{nt(!1),await Kn()}}),ar]})}function cO({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(Xe,{variant:a.tone??"neutral",children:a.label},a.label))}):null]})}function uO({owners:e,no_owner:t,value:n,on_change:a}){return l.jsxs(Ln,{value:n,onValueChange:a,children:[l.jsx(jn,{className:"w-56","aria-label":"Owner",children:l.jsx(Un,{})}),l.jsxs(wn,{children:[l.jsx(dt,{value:wr,children:"Any owner"}),e.map(s=>l.jsxs(dt,{value:s.id,children:[s.label," (",s.count,")"]},s.id)),t!==void 0?l.jsxs(dt,{value:__,children:["No owner (",t,")"]}):null]})]})}function dO({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 ${Gn(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?` · ${Um(n.via)}`:""]}),l.jsxs("div",{className:"text-muted-foreground truncate text-xs",title:n.via==="sdlc_login"&&n.via_device?b_(n.via_device):void 0,children:["Until ",Gn(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 fO={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 hO({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,g]=u.useState(!1),[j,v]=u.useState({}),[b,x]=u.useState(null),[p,y]=u.useState(!1);u.useEffect(()=>{e&&(o("waiting_for_user"),d(""),h(""),g(!1),v({}),x(null))},[e]);const w=fO[i],_=async k=>{k.preventDefault();const N={target:w!==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 M=await r(S);y(!1),x(M)};return l.jsx(Ai,{open:e,onOpenChange:k=>k?null:s(),children:l.jsx(Mi,{children:l.jsxs("form",{onSubmit:k=>void _(k),noValidate:!0,children:[l.jsxs(Oi,{children:[l.jsx(zi,{children:"Add hold"}),l.jsx($i,{children:"Say what this task is waiting for."})]}),l.jsxs("div",{className:"mt-4 grid gap-4",children:[b&&l.jsxs(xe,{variant:"destructive",children:[l.jsx(et,{className:"size-4","aria-hidden":"true"}),l.jsx(pe,{children:b})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ze,{htmlFor:"hold-type",children:"Type"}),l.jsxs(Ln,{value:i,onValueChange:k=>{o(k),d(""),v({})},children:[l.jsx(jn,{id:"hold-type",children:l.jsx(Un,{})}),l.jsx(wn,{children:Object.keys(ii).map(k=>l.jsx(dt,{value:k,children:ii[k].label},k))})]})]}),w?l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ze,{htmlFor:"hold-target",children:w.label}),i==="waiting_for_external"?l.jsx(Sn,{id:"hold-target",value:c,"aria-invalid":j.target,onChange:k=>d(k.target.value)}):l.jsxs(Ln,{value:c,onValueChange:d,children:[l.jsx(jn,{id:"hold-target","aria-invalid":j.target,children:l.jsx(Un,{placeholder:i==="blocked"?"Choose a task":"Choose a member"})}),l.jsx(wn,{children:i==="blocked"?n.map(k=>l.jsx(dt,{value:k.id,children:k.title},k.id)):t.map(k=>l.jsx(dt,{value:k.user_id,children:k.label},k.user_id))})]}),l.jsx("p",{className:j.target?"text-destructive text-xs":"text-muted-foreground text-xs",children:j.target?"Choose what it waits for.":w.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(Ze,{htmlFor:"hold-reason",children:"Reason"}),l.jsx(Gs,{id:"hold-reason",rows:3,placeholder:"What the task is waiting for",value:f,"aria-invalid":j.reason,onChange:k=>h(k.target.value)}),j.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(Fl,{id:"hold-release-claim",checked:m,onCheckedChange:k=>g(k===!0)}),l.jsx(Ze,{htmlFor:"hold-release-claim",children:"Also release my claim"})]})]}),l.jsxs(Di,{className:"mt-6",children:[l.jsx(Y,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),l.jsx(Y,{type:"submit",disabled:p,children:p?"Adding…":"Add hold"})]})]})})})}function Ii(){const e=os().tasks;if(!e)throw new Error("The Task page rendered without the tasks seam.");return e}function qm(){return l.jsxs("div",{className:"grid gap-3",role:"status","aria-label":"Loading task",children:[l.jsx(Bt,{className:"h-8 w-1/2"}),Array.from({length:7},(e,t)=>l.jsx(Bt,{className:t===6?"h-6 w-2/3":"h-6 w-full"},t))]})}function kc({back:e,description:t}){const{href:n,Link:a}=St();return l.jsx(Om,{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 Fs="not_set",mO=10*60*1e3,ox=20;function pO(){const{members:e}=Ii(),[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 gO({active:e,task_id:t,back:n}){const a=Ii(),{task:s,activity:r,listTasks:i,hierarchyRevision:o,commands:c}=a,{href:d,Link:f}=St(),h=Si(),{self_id:m}=Fc(),{members:g,name:j}=pO(),{workspace:v}=e,{confirm:b,confirm_dialog:x}=Ri(),[p,y]=u.useState(null),[w,_]=u.useState(!1),[k,N]=u.useState(!1),[S,M]=u.useState(null),[O,z]=u.useState([]),[B,T]=u.useState(ox),[$,I]=u.useState([]),[R,q]=u.useState(!1),[C,L]=u.useState(null),[K,D]=u.useState(null),[V,ne]=u.useState(""),[P,ye]=u.useState(null),te=u.useCallback(async()=>{if(!s)return;const E=await s(t);E.ok?(y(E.data),N(!1)):E.refusal.status===404||E.refusal.status===400?_(!0):N(!0)},[s,t]),H=u.useRef(0),ee=u.useCallback(async()=>{if(!r)return;const E=H.current+=1;let ce=[],Oe;for(;;){const ht=await r(t,Oe);if(E!==H.current||!ht.ok)return;if(ce=[...ce,...ht.data.events].slice(-1e3),!ht.data.more||!ht.data.next_cursor)break;Oe=ht.data.next_cursor}E===H.current&&z(ce.reverse())},[r,t]);u.useEffect(()=>{te(),ee()},[te,ee]);const oe=p?v.lists.find(E=>E.id===p.task.list_id):void 0,fe=u.useMemo(()=>{var E;return((E=v.workflows.find(ce=>ce.id===(p==null?void 0:p.task.workflow_id)))==null?void 0:E.statuses)??[]},[v,p==null?void 0:p.task.workflow_id]);u.useEffect(()=>{if(!p)return;let E=!0;return i(p.task.list_id,{limit:100}).then(ce=>{E&&I(ce.ok?ce.data.tasks.filter(Oe=>Oe.id!==p.task.id).map(Oe=>({id:Oe.id,title:Oe.title})):[])}),()=>{E=!1}},[i,p==null?void 0:p.task.list_id,p==null?void 0:p.task.id,p]);const me=u.useCallback(async()=>{await Promise.all([te(),ee()])},[te,ee]),ue=u.useCallback((E,ce)=>c?c.run(E,ce):Promise.resolve({ok:!1,refusal:{status:0,message:"This page cannot change tasks."}}),[c]),se=u.useCallback(async(E,ce,Oe)=>{const ht=await ue(E,ce);return ht.ok?(Oe&&h.success(Oe),await me(),ht.data):(ht.refusal.code==="revision_conflict"?M({tone:"warning",title:"This task changed while you were editing",body:"We reloaded it. Check the change, then save again."}):ht.refusal.code==="claim_held"?(await te(),M({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(ht.refusal.message),await me(),null)},[ue,h,me,te]),ae=(p==null?void 0:p.claim)??null,Ke=ae!==null&&ae.id===P&&!ae.lapsed&&!ae.via?ae.id:null;if(u.useEffect(()=>{if(!Ke)return;const E=window.setInterval(()=>{ue("renew_claim",{claim_id:Ke,lease_seconds:ix}).then(()=>te())},mO);return()=>window.clearInterval(E)},[Ke,ue,te]),w)return l.jsx(kc,{back:n});if(k&&!p)return l.jsxs(xe,{variant:"destructive",children:[l.jsx(et,{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(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>void te(),children:"Retry"})]})]});if(!p)return l.jsx(qm,{});const{task:ie}=p,tt=ie.archived_at!==null,it=Sc(p.permission,"write")&&!tt,nt=Sc(p.permission,"manage"),bt=fe.find(E=>E.id===ie.status_id),le=fe.find(E=>E.category==="completed"),It=v.priorities.find(E=>E.id===ie.priority_id),ba=p.contributors.map(E=>E.user_id),nn=ae!==null&&ae.user_id===m,ja=ae!==null&&!ae.lapsed,Xn=p.checklist.filter(E=>E.is_complete).length,ar=async()=>{const[E,ce]=await Promise.all([i(ie.list_id,{limit:1}),o(v.id)]);return E.ok?ce.ok?{ok:!0,data:{task_id:ie.id,expected_revision:ie.revision,expected_order_revision:E.data.list.order_revision,expected_hierarchy_revision:ce.data}}:ce:E},an=(E,ce)=>se("update_task",{task_id:ie.id,expected_revision:ie.revision,changes:E},ce),ds=E=>b(E.via==="sdlc_login"?{title:"Release this claim?",description:`You claimed it via ${bd(E.via,E.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}),Q=async()=>{if(!le)return;if(ja&&(!nn||ae.via)){const ce=ae.via==="api_key"?`${nn?"Your":`${j(ae.user_id)}'s`} agent is still working on it.`:ae.via==="sdlc_login"?`${nn?"You are":`${j(ae.user_id)} is`} still working on it via ${bd(ae.via,ae.via_device)}.`:`${j(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&&ja&&await se("end_claim",{claim_id:ae.id,outcome:"completed"})},Te=async(E,ce)=>{const Oe=await ar();if(!Oe.ok){h.error(Oe.refusal.message);return}await se(E,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 Te("archive_task","Task archived.")},Is=async()=>{await Te("restore_task","Task restored.")},wa=async()=>{var ht;const E=ae,ce=await se("claim_task",{task_id:ie.id,lease_seconds:ix}),Oe=(ht=ce==null?void 0:ce.claim)==null?void 0:ht.id;Oe&&!(E&&E.id===Oe&&E.via)&&ye(Oe)},_a=async()=>{ae&&(ae.via&&!await ds(ae)||(await se("end_claim",{claim_id:ae.id,outcome:"released"},"Claim released."),ye(null)))},At=async()=>{ae&&await se("end_claim",{claim_id:ae.id,outcome:"expired"},"Claim cleared.")},Na=async E=>{E.hold_type==="paused"&&m&&(E={...E,target_user_id:m});const ce=await ue("open_hold",{task_id:ie.id,hold_type:E.hold_type,reason:E.reason,...E.target_user_id?{target_user_id:E.target_user_id}:{},...E.target_task_id?{target_task_id:E.target_task_id}:{},...E.target_label?{target_label:E.target_label}:{}});return ce.ok?(q(!1),h.success("Hold added."),E.release_claim&&ae&&nn&&!ae.via&&(await se("end_claim",{claim_id:ae.id,outcome:"released"}),ye(null)),await me(),null):ce.refusal.message},Kn=E=>se("checklist",{task_id:ie.id,expected_revision:ie.revision,...E}),Sa=async E=>{for(const ce of E.filter(Oe=>!ba.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=>!E.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})},sr=E=>{var Oe;if(E.target.kind==="user")return j(E.target.user_id,m);if(E.target.kind==="external")return E.target.label;if(E.target.hidden||!E.target.task_id)return"A task you cannot see";const ce=E.target.task_id;return l.jsx(f,{className:"text-primary hover:underline",href:d(`${n}/${ce}`),children:((Oe=$.find(ht=>ht.id===ce))==null?void 0:Oe.title)??"Another task"})},Vs=E=>E.target.kind==="user"&&E.target.user_id===m&&!E.released_at?l.jsx(Y,{type:"button",variant:"outline",size:"sm",onClick:()=>void se("release_hold",{hold_id:E.id},"Hold released."),children:"Release"}):it?l.jsx(Y,{type:"button",variant:"outline",size:"sm",onClick:()=>void se("resolve_hold",{hold_id:E.id},"Hold resolved."),children:"Resolve"}):null;return l.jsxs(l.Fragment,{children:[l.jsx(va,{title:ie.title,description:`Created ${Hn(ie.created_at)} by ${j(ie.created_by,m)}`,actions:l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[it&&l.jsxs(l.Fragment,{children:[l.jsxs(Y,{type:"button",variant:"outline",onClick:()=>L(ie.title),children:[l.jsx(Lb,{className:"mr-2 size-4","aria-hidden":"true"}),"Edit title"]}),le&&ie.status_id!==le.id&&l.jsxs(Y,{type:"button",variant:"outline",onClick:()=>void Q(),children:[l.jsx(Kl,{className:"mr-2 size-4","aria-hidden":"true"}),"Mark complete"]})]}),nt&&!tt&&l.jsxs(Y,{type:"button",variant:"outline",onClick:()=>void Se(),children:[l.jsx(Eg,{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 E=>{E.preventDefault(),C.trim()&&await an({title:C.trim()})!==null&&L(null)},children:[l.jsx(Ze,{htmlFor:"task-title",className:"sr-only",children:"Title"}),l.jsx(Sn,{id:"task-title",className:"max-w-xl",value:C,onChange:E=>L(E.target.value)}),l.jsx(Y,{type:"submit",size:"sm",children:"Save"}),l.jsx(Y,{type:"button",size:"sm",variant:"outline",onClick:()=>L(null),children:"Cancel"})]}):null}),S&&l.jsxs(xe,{variant:S.tone,className:"mt-4","data-testid":"task-notice",children:[S.tone==="warning"?l.jsx(em,{className:"size-4","aria-hidden":"true"}):l.jsx(et,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:S.title}),l.jsx(pe,{children:S.body})]}),tt?l.jsxs(xe,{variant:"info",className:"mt-4",children:[l.jsx(Eg,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"This task is archived"}),l.jsx(pe,{children:nt?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(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>void Is(),children:[l.jsx(vk,{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."})})]}):it?null:l.jsxs(xe,{variant:"info",className:"mt-4",children:[l.jsx(Jh,{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."})]}),it?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(Ze,{htmlFor:"task-status",children:"Status"}),l.jsxs(Ln,{value:ie.status_id,onValueChange:E=>void an({status_id:E}),children:[l.jsx(jn,{id:"task-status",children:l.jsx(Un,{})}),l.jsx(wn,{children:fe.map(E=>l.jsx(dt,{value:E.id,children:E.name},E.id))})]})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ze,{htmlFor:"task-priority",children:"Priority"}),l.jsxs(Ln,{value:ie.priority_id??Fs,onValueChange:E=>void an({priority_id:E===Fs?null:E}),children:[l.jsx(jn,{id:"task-priority",children:l.jsx(Un,{})}),l.jsxs(wn,{children:[l.jsx(dt,{value:Fs,children:"Not set"}),v.priorities.map(E=>l.jsx(dt,{value:E.id,children:E.name},E.id))]})]})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ze,{htmlFor:"task-primary",children:"Primary"}),l.jsxs(Ln,{value:ie.primary_user_id??Fs,onValueChange:E=>void an({primary_user_id:E===Fs?null:E}),children:[l.jsx(jn,{id:"task-primary",children:l.jsx(Un,{})}),l.jsxs(wn,{children:[l.jsx(dt,{value:Fs,children:"Not set"}),g.map(E=>l.jsx(dt,{value:E.user_id,children:E.label},E.user_id))]})]})]}),l.jsx(xO,{members:g,selected:ba,on_change:E=>void Sa(E)})]}):l.jsxs("dl",{className:"mt-4 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[l.jsx(go,{label:"Status",value:(bt==null?void 0:bt.name)??""}),l.jsx(go,{label:"Priority",value:(It==null?void 0:It.name)??"Not set"}),l.jsx(go,{label:"Primary",value:ie.primary_user_id?j(ie.primary_user_id,m):"Not set"}),l.jsx(go,{label:"Contributors",value:ba.map(E=>j(E,m)).join(", ")||"None"})]}),!tt&&l.jsx(vO,{claim:ae,mine:nn,holder:ae?j(ae.user_id):"",own:ae!==null&&ae.id===P,can_write:it,on_claim:()=>void wa(),on_release:()=>void _a(),on_clear:()=>void At()}),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"}),it&&K===null&&l.jsx(Y,{type:"button",variant:"ghost",size:"sm",onClick:()=>D(ie.description??""),children:"Edit description"})]}),K!==null?l.jsxs("form",{className:"mt-2 grid gap-2",onSubmit:async E=>{E.preventDefault(),await an({description:K})!==null&&D(null)},children:[l.jsx(Ze,{htmlFor:"task-description",className:"sr-only",children:"Description"}),l.jsx(Gs,{id:"task-description",rows:5,value:K,onChange:E=>D(E.target.value)}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Y,{type:"submit",size:"sm",children:"Save"}),l.jsx(Y,{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?` · ${Xn} of ${p.checklist.length} done`:""]}),l.jsx("ul",{className:"mt-2 grid gap-1",children:p.checklist.map(E=>l.jsxs("li",{className:"flex items-center justify-between gap-2 py-1","data-testid":"task-checklist-item",children:[it?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Fl,{id:`check-${E.id}`,checked:E.is_complete,onCheckedChange:ce=>void Kn({action:"toggle",item_id:E.id,expected_item_revision:E.revision,is_complete:ce===!0})}),l.jsx(Ze,{htmlFor:`check-${E.id}`,className:"font-normal",children:E.label})]}):l.jsxs("span",{className:"text-sm",children:[E.is_complete?"Done: ":"To do: ",E.label]}),it&&l.jsxs(fu,{children:[l.jsx(hu,{asChild:!0,children:l.jsx(Y,{type:"button",variant:"ghost",size:"icon","aria-label":`Item actions for ${E.label}`,children:l.jsx(Wh,{className:"size-4","aria-hidden":"true"})})}),l.jsx(qi,{align:"end",children:l.jsx(Os,{className:"text-destructive focus:text-destructive",onSelect:()=>void Kn({action:"archive",item_id:E.id,expected_item_revision:E.revision}),children:"Remove"})})]})]},E.id))}),p.checklist.length===0&&!it&&l.jsx("p",{className:"text-muted-foreground text-sm",children:"No checklist items."}),it&&l.jsxs("form",{className:"mt-2 grid gap-2",onSubmit:async E=>{E.preventDefault(),V.trim()&&await Kn({action:"add",label:V.trim()})!==null&&ne("")},children:[l.jsx(Ze,{htmlFor:"task-new-item",children:"Add an item"}),l.jsx(Sn,{id:"task-new-item",placeholder:"Add an item and press Enter",value:V,onChange:E=>ne(E.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"}),it&&l.jsxs(Y,{type:"button",variant:"outline",size:"sm",onClick:()=>q(!0),children:[l.jsx($b,{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(lt,{containerAriaLabel:"Holds",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Type"}),l.jsx(X,{children:"Reason"}),l.jsx(X,{children:"Waiting on"}),l.jsx(X,{className:"text-right",children:"Actions"})]})}),l.jsxs(rt,{children:[p.holds.map(E=>{const ce=ii[E.hold_type];return l.jsxs(ge,{"data-testid":"task-hold",children:[l.jsx(G,{children:l.jsx(Xe,{variant:ce.tone,children:ce.label})}),l.jsxs(G,{children:[l.jsx("div",{children:E.reason}),l.jsx("div",{className:"text-muted-foreground text-xs",children:E.released_at?`Released by ${j(E.released_by,m)} · ${Hn(E.released_at)} · Ready to resolve`:`Opened by ${j(E.opened_by,m)} · ${Hn(E.opened_at)} · Open`})]}),l.jsx(G,{children:sr(E)}),l.jsx(G,{className:"text-right",children:Vs(E)})]},E.id)}),p.holds.length===0&&l.jsx(ge,{children:l.jsx(G,{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:[O.slice(0,B).map(E=>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:eO(E)}),l.jsxs("span",{className:"min-w-0 text-right sm:text-left",children:[l.jsx("span",{children:E.actor_id?j(E.actor_id,m):"The system"}),E.via?l.jsxs("span",{className:"text-muted-foreground block max-w-64 truncate text-xs sm:max-w-none",title:`via ${bd(E.via,E.via_device)}`,children:["via ",Um(E.via),l.jsx(T_,{via:E.via,device:E.via_device})]}):null]}),l.jsx("span",{className:"text-muted-foreground col-span-2 sm:col-span-1 sm:text-right",children:w_(E.created_at)})]},E.id)),O.length===0&&l.jsx("li",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No activity yet."})]}),O.length>B&&l.jsx(Y,{type:"button",variant:"ghost",size:"sm",className:"mt-2",onClick:()=>T(E=>E+ox),children:"Load more"})]}),it&&oe&&l.jsx(hO,{open:R,members:g,tasks:$,holds_my_web_claim:nn&&ja&&!(ae!=null&&ae.via),on_close:()=>q(!1),on_submit:Na}),x]})}function go({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 xO({members:e,selected:t,on_change:n}){return l.jsxs("div",{className:"grid gap-2",children:[l.jsx(Ze,{htmlFor:"task-contributors",children:"Contributors"}),l.jsxs(fu,{children:[l.jsx(hu,{asChild:!0,children:l.jsxs(Y,{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(Ab,{className:"text-muted-foreground size-4","aria-hidden":"true"})]})}),l.jsx(qi,{align:"start",children:e.map(a=>{const s=t.includes(a.user_id);return l.jsxs(Os,{onSelect:()=>n(s?t.filter(r=>r!==a.user_id):[...t,a.user_id]),children:[s?l.jsx(Kl,{className:"mr-2 size-4","aria-hidden":"true"}):l.jsx("span",{className:"mr-2 size-4"}),a.label]},a.user_id)})})]})]})}function T_({via:e,device:t}){return e!=="sdlc_login"||!t?null:l.jsxs(l.Fragment,{children:[" on ",l.jsx("bdi",{children:t})]})}function vO({claim:e,mine:t,holder:n,own:a,can_write:s,on_claim:r,on_release:i,on_clear:o}){let c=l.jsx(tm,{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(Y,{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(Ik,{className:"size-4","aria-hidden":"true"}),d=m?`${t?"Your":`${n}'s`} claim lapsed at ${Gn(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(Y,{type:"button",size:"sm",variant:"outline",onClick:o,children:"Clear claim"}),l.jsx(Y,{type:"button",size:"sm",onClick:r,children:"Take over"})]}):null}else if(e){const m=Gn(e.lease_expires_at);c=e.via==="api_key"?l.jsx(Fh,{className:"size-4","aria-hidden":"true"}):e.via==="sdlc_login"?l.jsx(a2,{className:"size-4","aria-hidden":"true"}):l.jsx(S2,{className:"size-4","aria-hidden":"true"});const g=l.jsxs(l.Fragment,{children:["Claimed via sdlc login",l.jsx(T_,{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:[g," 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=g):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(Y,{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 yO=10,C_=5,bO=/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/,jO="The sdlc engine here is too old for this page",wO="Update the main checkout, then restart sdlc viewer.",E_="Not available",_O={added:"Added",changed:"Changed",removed:"Removed"},NO={thread:"Thread",task:"Task",issue:"Issue",release:"Release",test:"Test"};function SO(e,t){const n=t!=null&&t.startsWith("task:")?t.slice(5):null;return n&&bO.test(n)?{label:n,path:`/org/${e}/tasks/${n}`}:{label:"Tasks",path:`/org/${e}/tasks`}}const kO=e=>e.status===0||e.reason==="store_locked"||e.reason==="engine_failed"||e.status>=500;function TO({org:e,task_id:t,from:n}){var ds;const a=Ii(),{href:s,Link:r}=St(),{confirm:i,confirm_dialog:o}=Ri(),c=SO(e,n),[d,f]=u.useState({state:"loading"}),[h,m]=u.useState([]),[g,j]=u.useState([]),[v,b]=u.useState(null),[x,p]=u.useState(null),[y,w]=u.useState({state:"loading"}),[_,k]=u.useState({state:"loading"}),[N,S]=u.useState(null),[M,O]=u.useState(null),[z,B]=u.useState(!1),T=u.useRef(null),$=u.useRef(null),I=u.useRef(null),R=u.useRef(null),q=u.useRef(null),C=u.useRef(!1),L=u.useRef(0),K=u.useRef(0),D=u.useCallback(async()=>{if(!a.taskSections)return;w({state:"loading"});const Q=await a.taskSections(t);w(Q.ok?{state:"ok",data:Q.data}:{state:"failed",refusal:Q.refusal})},[a.taskSections,t]),V=u.useCallback(async()=>{if(!a.taskRelated)return;k({state:"loading"});const Q=await a.taskRelated(t);k(Q.ok?{state:"ok",data:Q.data}:{state:"failed",refusal:Q.refusal})},[a.taskRelated,t]),ne=u.useCallback(async()=>{var wa,_a;const Q=K.current+=1;p(null),D(),V();const[Te,Se]=await Promise.all([a.availability(),a.task?a.task(t):Promise.resolve(null)]);if(Q!==K.current)return;Te.state==="active"&&m(((wa=Te.workspace.workflows.find(At=>At.id===Te.list.workflow_id))==null?void 0:wa.statuses)??[]);const Is=Te.state==="off"&&((_a=Te.refusal)==null?void 0:_a.reason)==="engine_missing"?Te.refusal:null;if(!Se||!Se.ok&&Se.refusal.reason==="engine_missing"||Is){f({state:"engine_missing",refusal:Is??(Se&&!Se.ok?Se.refusal:{status:0,message:""})});return}if(Se.ok){L.current=0,b(null),O(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&&kO(Se.refusal)){p(Se.refusal.retry_after??yO);return}b(Se.refusal),f(At=>At.state==="loading"?{state:"loading"}:At)},[a,t,D,V]);u.useEffect(()=>{ne()},[ne]),u.useEffect(()=>{if(x===null)return;const Q=setTimeout(()=>void ne(),x*1e3);return()=>clearTimeout(Q)},[x,ne]),u.useEffect(()=>{let Q=!0;return a.members().then(Te=>{Q&&Te.ok&&j(Te.data)}),()=>{Q=!1}},[a.members]),u.useEffect(()=>{var Te;if(C.current||d.state!=="ok")return;C.current=!0;const Q=(Te=T.current)==null?void 0:Te.querySelector("h1");Q&&(Q.tabIndex=-1,Q.focus())},[d.state]),u.useEffect(()=>{var Q;N&&((Q=I.current)==null||Q.focus())},[N]),u.useEffect(()=>{if(M===null)return;const Q=setTimeout(()=>{var Te;return(Te=$.current)==null?void 0:Te.focus()},0);return()=>clearTimeout(Q)},[M]);const P=u.useMemo(()=>new Map(g.map(Q=>[Q.user_id,Q.label])),[g]),ye=Q=>Q?P.get(Q)??Q:"",te=()=>{S(null),ne()},H=u.useRef(null),ee=Q=>(H.current=Q,Q==="graph"?D():V());if(u.useEffect(()=>{var Se;const Q=H.current;if(Q===null||(Q==="graph"?y:_).state==="loading")return;H.current=null;const Te=(Q==="graph"?R:q).current??((Se=T.current)==null?void 0:Se.querySelector("h1"));Te==null||Te.focus()},[y,_]),d.state==="missing")return l.jsx(xo,{children:l.jsx(kc,{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(Y,{asChild:!0,variant:"link",size:"sm",className:"px-0",children:l.jsxs(r,{href:s(c.path),children:[l.jsx(_k,{className:"size-4","aria-hidden":"true"}),c.label]})});if(d.state==="engine_missing")return l.jsx(xo,{children:l.jsxs("div",{ref:T,className:"contents",children:[l.jsx(cx,{back:oe,id:null,title:t}),l.jsxs(xe,{variant:"info",className:"mt-4",children:[l.jsx(ma,{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(xe,{variant:"destructive",className:"mt-4",children:[l.jsx(et,{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 ${qr(v.since)}.`:"",d.state==="ok"?` This page was read at ${qr(d.at)}.`:""," See the sdlc viewer terminal for more."]}),l.jsx(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:te,children:"Retry"})]})]}):null,me=x!==null?l.jsxs("p",{className:"text-muted-foreground mt-2 flex items-center gap-2 text-sm",children:[l.jsx(Mj,{"aria-hidden":"true"}),"Could not read this task. Trying again in ",x," seconds."]}):null,ue=l.jsx("div",{role:"status","aria-live":"polite",children:me});if(d.state==="loading")return l.jsxs(xo,{children:[ue,fe,!v&&x===null?l.jsx(qm,{}):null]});const{detail:se,at:ae}=d,{task:Ke}=se,ie=h.find(Q=>Q.id===Ke.status_id),tt=se.local_done&&"task"in se.local_done?se.local_done:null,it=se.local_waits??[],nt=tt?it[0]??null:null,bt=nt?ye(nt.opened_by):se.owner_title??ye(se.thread),le=y.state==="ok"?y.data:null,It=(le==null?void 0:le.lifecycle)==="finished",ba=It&&(le==null?void 0:le.outcome)==="cancelled",nn=It&&(le==null?void 0:le.outcome)==="complete",ja=!!Ke.created_at,Xn=se.acceptance??[],ar=async()=>{var Se;if(!tt||!((Se=a.commands)!=null&&Se.complete)||!await i({title:`Mark ${Ke.title} done?`,description:nt?`This answers ${bt}'s ask, “${nt.reason}”, closes that wait, and tells ${bt} to check and continue.`:`This tells ${bt||"its thread"} to check and continue.`,action_label:"Mark done"}))return;B(!0);const Te=await a.commands.complete(tt);if(B(!1),!Te.ok){O(Te.refusal.message);return}await ne(),S({title:Ke.title,asker:bt||"Its thread"})},an=l.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[tt&&!N?l.jsxs(l.Fragment,{children:[l.jsxs(Y,{ref:$,type:"button",variant:"outline",disabled:z,"aria-disabled":M!==null?!0:void 0,"aria-describedby":M!==null?"task-done-why":void 0,onClick:()=>{M===null&&ar()},children:[l.jsx(Kl,{className:"mr-2 size-4","aria-hidden":"true"}),"Done"]}),M!==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 ",qr(ae)]}),l.jsxs(Y,{type:"button",variant:"ghost",size:"sm",onClick:te,children:[l.jsx(em,{className:"mr-2 size-4","aria-hidden":"true"}),"Read again"]})]});return l.jsxs(xo,{children:[l.jsxs("div",{ref:T,className:"contents",children:[l.jsx(cx,{back:oe,id:Ke.id,badge:ie?l.jsx(Xe,{variant:j_(ie),children:ie.name}):null,title:Ke.title,created:ja?`Created ${Hn(Ke.created_at)}${bt||se.owner_title?` by ${se.owner_title??bt}`:""}`:null,actions:an}),ue,fe,N?l.jsx("div",{ref:I,tabIndex:-1,role:"status","aria-live":"polite",className:"outline-none",children:l.jsxs(xe,{variant:"success",className:"mt-4",children:[l.jsx(Mb,{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,M!==null?l.jsxs(xe,{variant:"destructive",className:"mt-4",children:[l.jsx(et,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Done was not recorded"}),l.jsxs(pe,{children:[M," Read again to see the task as it is now."]})]}):null,nt&&!N?l.jsxs(xe,{variant:"warning",className:"mt-4",children:[l.jsx(Rg,{className:"size-4","aria-hidden":"true"}),l.jsxs(je,{children:[bt," asks: ",nt.reason]}),l.jsxs(pe,{children:["Waiting on you since ",Hm(nt.opened_at),". Done answers it and tells ",bt," to check and continue."]})]}):null,se.view_outdated?l.jsxs(xe,{variant:"warning",className:"mt-4",children:[l.jsx(Rg,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:jO}),l.jsxs(pe,{children:[wO," 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(vs,{label:"Owner thread",value:se.owner_title??(ye(se.thread)||"None")}),l.jsx(vs,{label:"Release",value:se.release??"None"}),l.jsx(vs,{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(vs,{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(CO,{detail:se,holder:ye((ds=se.claim)==null?void 0:ds.user_id),finished_at:It?(le==null?void 0:le.finished_at)??null:null,read_at:ae}),l.jsxs(xe,{variant:"info",className:"mt-4",children:[l.jsx(Jh,{className:"text-info size-4","aria-hidden":"true"}),tt?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."})]})]}),ja?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."}),tt?l.jsx(en,{id:"task-done-needs",title:"What Done needs",children:Xn.length>0?l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"text-muted-foreground text-xs",children:["The task's acceptance; ",bt||"its thread"," checks these after Done."]}),l.jsx("ul",{className:"mt-2 grid list-disc gap-1 pl-5 text-sm",children:Xn.map(Q=>l.jsx("li",{children:Q},Q))})]}):l.jsxs("p",{className:"text-sm",children:["Its thread gave no acceptance. Ask ",bt||"its thread"," what Done needs before marking it."]})}):Xn.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":ba&&(le!=null&&le.finished_at)?`Cancelled ${Hn(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:Xn.map(Q=>l.jsx("li",{children:nn?`Met: ${Q}`:Q},Q))})]}):null,l.jsx(EO,{detail:se,waits:it,given:tt!==null,threadName:ye,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(Bt,{className:"h-8 w-full"}),l.jsx(Bt,{className:"h-8 w-full"}),l.jsx(Bt,{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)??Ke.status_id,se.local_detail?` · ${se.local_detail}`:""]})}):null,le!=null&&le.time?l.jsx(RO,{time:le.time}):null,l.jsx(AO,{sections:y,heading_ref:R,on_retry:()=>void ee("graph"),taskLink:Q=>l.jsx(r,{className:"text-primary hover:underline",href:s(`/org/${e}/tasks/${Q}?from=task:${Ke.id}`),children:Q})}),le!=null&&le.files?l.jsx(MO,{files:le.files,finished:It}):null,le!=null&&le.proof?l.jsx(OO,{proof:le.proof,finished_at:le.finished_at,who:se.owner_title??null}):null,le&&le.history.length>0?l.jsx(DO,{history:le.history}):null,l.jsx(zO,{related:_,heading_ref:q,on_retry:()=>void ee("related"),link:Q=>{if(Q.kind==="thread")return Q.label;const Te=Q.kind==="task"?`/org/${e}/tasks/${Q.id}?from=task:${Ke.id}`:Q.kind==="issue"?`/classic/#issue=${encodeURIComponent(Q.id)}`:Q.kind==="release"?`/classic/#${Q.planned?"planned":"release"}=${encodeURIComponent(Q.id)}`:null;return Te?l.jsx(r,{className:"text-primary hover:underline",href:s(Te),children:Q.label}):Q.label}})]}),o]})}function xo({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 cx({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(va,{title:a,description:s??void 0,actions:r})]})}function vs({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 CO({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(tm,{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(Fh,{className:"size-4","aria-hidden":"true"}),c=`${t} is working on this until ${qr(s.lease_expires_at)}${f||s.lapsed?" · passed":""}`,d="Claimed in the coordination registry; its thread renews the claim."}else n&&(o=l.jsx(Mb,{className:"size-4","aria-hidden":"true"}),d=`Finished ${Hn(n)}. Its claim ended when it finished.`);return l.jsxs(Nt,{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 EO({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(Nt,{className:"mt-2 overflow-x-auto",children:l.jsxs(lt,{containerAriaLabel:"Holds",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Type"}),l.jsx(X,{children:"Reason"}),l.jsx(X,{children:"Waiting on"}),l.jsx(X,{children:"Opened"})]})}),l.jsx(rt,{children:e.holds.map(i=>{var f;const o=r.get(i.id),c=ii[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(ge,{"data-testid":"task-hold",children:[l.jsx(G,{children:l.jsx(Xe,{variant:c.tone,children:(o==null?void 0:o.local_label)??c.label})}),l.jsxs(G,{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(G,{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(G,{children:Hm(i.opened_at)})]},i.id)})})]})})]})}function RO({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(vs,{label:"Estimate",value:e.estimate?`${mr(e.estimate.low)}–${mr(e.estimate.high)}`:e.unknown_reason??"None"}),l.jsx(vs,{label:"Time taken",value:e.elapsed!==null?`${mr(e.elapsed)}${e.over_estimate?" · over estimate":""}`:"Not started"}),e.forecast?l.jsx(vs,{label:"Reforecast",value:l.jsxs("span",{className:"text-muted-foreground",children:[mr(e.forecast.low),"–",mr(e.forecast.high)," left",e.forecast.reason?` · ${e.forecast.reason}`:""]})}):null]})})}function R_({what:e,again:t,refusal:n,on_retry:a}){return l.jsxs(xe,{variant:"destructive",children:[l.jsx(et,{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(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:a,children:t})]})]})}function AO({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(R_,{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,C_),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(Nt,{className:"overflow-x-auto",children:l.jsxs(lt,{containerAriaLabel:"Graph changes",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Change"}),l.jsx(X,{children:"Kind of change"}),l.jsx(X,{children:"Also in"}),l.jsx(X,{children:"In the plan"})]})}),l.jsx(rt,{children:c.map(f=>l.jsxs(ge,{children:[l.jsxs(G,{children:[l.jsx("div",{children:f.label}),l.jsx("div",{className:"text-muted-foreground text-xs",children:f.type})]}),l.jsx(G,{children:_O[f.change]}),l.jsx(G,{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(G,{children:f.planned?"Yes":l.jsx(Xe,{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(Y,{type:"button",variant:"ghost",size:"sm",onClick:()=>r(!0),children:["Show all ",o.changes.length]})]}):null]})}function MO({files:e,finished:t}){const[n,a]=u.useState(!1),s=n?e.paths:e.paths.slice(0,C_);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(Y,{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 OO({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 ",Hn(t),n?` by ${n}`:""]}):null]})}function DO({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(Nt,{className:"mt-2 overflow-x-auto",children:l.jsxs(lt,{containerAriaLabel:"History",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"What"}),l.jsx(X,{children:"Who"}),l.jsx(X,{children:"When"})]})}),l.jsx(rt,{children:e.map((t,n)=>l.jsxs(ge,{children:[l.jsx(G,{children:t.what}),l.jsx(G,{children:t.who??"Its thread"}),l.jsx(G,{children:Hm(t.at)})]},`${t.at}:${n}`))})]})})]})}function zO({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(Bt,{className:"h-8 w-full"}),l.jsx(Bt,{className:"h-8 w-full"}),l.jsx(Bt,{className:"h-8 w-2/3"})]}):e.state==="failed"?l.jsx(R_,{what:"related work",again:"Read related work again",refusal:e.refusal,on_retry:n}):l.jsx(Nt,{className:"overflow-x-auto",children:l.jsxs(lt,{containerAriaLabel:"Related",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Kind"}),l.jsx(X,{children:"Item"}),l.jsx(X,{children:"How it relates"})]})}),l.jsx(rt,{children:e.data.map(s=>l.jsxs(ge,{children:[l.jsx(G,{children:NO[s.kind]}),l.jsx(G,{children:a(s)}),l.jsx(G,{children:s.relation})]},`${s.kind}:${s.planned?"planned:":""}${s.id}`))})]})})})}function $O({org:e,task_id:t,from:n}){const a=Ii(),s=`/org/${e}/tasks`;return a.taskSections?l.jsx(TO,{org:e,task_id:t,from:n??null}):l.jsx(LO,{task_id:t,back:s})}function LO({task_id:e,back:t}){const{availability:n}=Ii(),[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(kc,{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(gO,{active:a,task_id:e,back:t}):a.state==="error"?l.jsxs(xe,{variant:"destructive",children:[l.jsx(et,{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(kc,{back:t}):l.jsx(qm,{})})}function Tc(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 A_={integration:"Integration",deploy:"Deploy",publish:"Publish",accept:"Accept",custom:"Custom"},UO={self_service:"Self-service",managed:"Managed",manager_only:"Manager only"},HO={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"},BO={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 qO(e){return BO[e??"in_batch"]}function GO(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 M_=(e,t)=>`Holds ${e.toLowerCase()}${t?`: ${t}`:""}`;function IO(e,t,n,a=!0){return e.fixing_since!==void 0?{label:`Fixing forward since ${vn(e.fixing_since)}`,tone:"warning"}:e.ref===t?{label:"Landing",tone:"info"}:a&&e.hold?{label:M_(n),tone:"info"}:{label:"Running",tone:"info"}}function vn(e){return new Date(e*1e3).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}function Ws(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 VO(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 YO(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 PO(e,t){var o,c;const{policy:n,management:a}=e,s=(o=e.layer)==null?void 0:o.kind,r=d=>YO(d,t),i=[["Mode",HO[a.mode]],["Who can join",r(a.joiners)]];return s==="implement"&&i.push(["Managers",r(a.managers)],["Manager lease",Ws(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 ${Ws(n.freeze.max_seconds)}, ${Ws(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 ${Ws(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",Ws(n.lease_seconds)],["Time to start",`${Ws(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 O_="Where your organization's agents take turns at a shared branch, environment or proposal. One turn runs at a time in each queue.",D_="A task you cannot see",XO="A former member",KO="A member";function z_(){const e=os().queues;if(!e)throw new Error("The Queues page rendered without the queues seam.");return e}function QO({org:e,open:t,path:n}){var h;const a=z_(),{href:s,Link:r}=St(),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(Om,{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(FO,{org:e,open:t??null,path:n??`/org/${e}/tasks/queues`}):l.jsxs(l.Fragment,{children:[l.jsx(va,{title:"Queues",description:a.description??O_}),o.state==="loading"&&l.jsx($_,{}),(o.state==="error"||o.state==="off")&&l.jsx(Vf,{refusal:o.refusal,on_retry:()=>void d(!0)}),o.state==="available"&&l.jsxs(xe,{variant:"info",className:"mt-6",children:[l.jsx(ma,{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 $_(){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(Bt,{className:t===2?"h-10 w-2/3":"h-10 w-full"},t))})}function Vf({refusal:e,on_retry:t}){return(e==null?void 0:e.reason)==="store_locked"?l.jsxs(xe,{variant:"info",className:"mt-6",children:[l.jsx(ma,{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(Y,{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(xe,{variant:e.reason==="engine_missing"?"info":"destructive",className:"mt-6",children:[l.jsx(ma,{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(xe,{variant:"destructive",className:"mt-6",children:[l.jsx(et,{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(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:t,children:"Retry"})]})]})}const wd=e=>e.status===404||e.reason==="not_found"||e.code==="not_found";function ZO(e,t,n,a){return t?e===null?`Not reading · trying again every ${n}s`:`Not reading since ${vn(e)} · trying again every ${n}s`:e===null?"Connecting…":`Live · read ${vn(e)} · refreshes every ${n}s${a?` · ${a}`:""}`}function FO({org:e,open:t,path:n}){var ye;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}=z_(),{self_id:m}=Fc(),[g,j]=u.useState(null),[v,b]=u.useState(null),[x,p]=u.useState(null),[y,w]=u.useState(null),[_,k]=u.useState({state:"pending",members:[]});u.useEffect(()=>{let te=!0;return r().then(H=>{te&&k(ee=>H.ok?{state:"answered",members:H.data}:{state:"failed",members:ee.members})}),()=>{te=!1}},[r]);const N=u.useMemo(()=>new Map(_.members.map(te=>[te.user_id,te])),[_.members]),S=_.state==="answered"?XO:KO,M=u.useCallback((te,H)=>{var ee;return(H==null?void 0:H.title)??(h?(H==null?void 0:H.id)??te:te===m?"You":((ee=N.get(te))==null?void 0:ee.label)??S)},[N,S,m,h]),O=u.useRef({list:{last:null,fresh:!1},detail:{last:null,fresh:!1}}),[z,B]=u.useState(null),[T,$]=u.useState(!1),I=u.useCallback((te,H)=>{O.current[te]={last:H,fresh:!0};const{list:ee,detail:oe}=O.current;$(ee.last==="failed"||oe.last==="failed"),ee.fresh&&oe.fresh&&ee.last==="ok"&&oe.last==="ok"&&B(Date.now()/1e3)},[]),R=t??((ye=g==null?void 0:g.queues[0])==null?void 0:ye.id)??null,q=u.useRef(R);u.useEffect(()=>{q.current=R},[R]);const C=u.useRef(0),L=u.useCallback(async()=>{var ee;const te=C.current+=1;O.current.list.fresh=!1;const H=await a();if(te===C.current)if(H.ok){if(j(H.data),b(null),!t){const oe=((ee=H.data.queues[0])==null?void 0:ee.id)??null;oe===null?O.current.detail={last:"ok",fresh:!0}:oe!==q.current&&(O.current.detail.fresh=!1)}I("list","ok")}else b(H.refusal),I("list","failed")},[a,t,I]),K=u.useRef(0),D=u.useCallback(async()=>{const te=K.current+=1;if(!R)return;O.current.detail.fresh=!1;const H=await s(R);te===K.current&&(H.ok?(p(H.data),w(null),I("detail","ok")):(w(H.refusal),wd(H.refusal)&&p(null),I("detail",wd(H.refusal)?"ok":"failed")))},[R,s,I]);u.useEffect(()=>{L()},[L]),u.useEffect(()=>{p(null),w(null),D()},[D]);const V=u.useCallback(()=>{L(),D()},[L,D]);Tc(V,i);const ne=Math.round(i/1e3),P=y!==null&&wd(y);return l.jsxs(l.Fragment,{children:[l.jsxs(va,{title:"Queues",description:c??O_,children:[l.jsx("p",{className:"text-muted-foreground text-xs",children:ZO(z,T,ne,d)}),l.jsx("span",{className:"sr-only",role:"status",children:T?"Not reading":z===null?"Connecting":"Live"})]}),!g&&!v&&l.jsx($_,{}),!g&&v&&l.jsx(Vf,{refusal:v,on_retry:V}),g&&g.queues.length===0?l.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[l.jsx(zb,{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."})]}):g?l.jsxs(l.Fragment,{children:[l.jsx(JO,{path:n,queues:g.queues,open_id:R,name:M,held:h}),P?l.jsxs(xe,{variant:"info",className:"mt-6",children:[l.jsx(ma,{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."})]}):x&&x.queue.id===R?l.jsx(eD,{org:e,detail:x,name:M,settings_note:o,subject_label:f,thread_subjects:h}):y?l.jsx(Vf,{refusal:y,on_retry:()=>void D()}):l.jsx(Bt,{className:"mt-6 h-40 w-full shrink-0",role:"status","aria-label":"Loading the queue"})]}):null]})}function Yf({org:e,subject:t,link:n}){const{href:a,Link:s}=St();return!t||t.hidden?l.jsx("span",{className:"text-muted-foreground",children:D_}):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 WO(e,t,n){const a=e.freeze?`frozen until ${vn(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 ${vn(e.batch.opened_at)}`,a].filter(Boolean).join(" · "),warn:!1};if(e.turn){const s=e.turn.subject,r=s.hidden?D_: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?M_(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:_d(d.join(" · ")),warn:!1}:{primary:`${i}${r}${o}`,secondary:d.length?_d(d.join(" · ")):null,warn:d.length>0}}return{primary:"Nothing running",secondary:a?_d(a):null,warn:!!a}}const _d=e=>e.charAt(0).toUpperCase()+e.slice(1);function JO({path:e,queues:t,open_id:n,name:a,held:s}){const{href:r,Link:i}=St();return l.jsx(Nt,{className:"mt-4 shrink-0 overflow-x-auto",children:l.jsxs(lt,{containerAriaLabel:"Queues",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Queue"}),l.jsx(X,{className:"hidden md:table-cell",children:"Step"}),l.jsx(X,{children:"Running turn"}),l.jsx(X,{className:"hidden text-right md:table-cell",children:"Waiting"})]})}),l.jsx(rt,{children:t.map(o=>{var m;const c=o.id===n,d=VO(o),f=WO(o,a,s),h=o.waiting-(((m=o.batch)==null?void 0:m.remaining)??0);return l.jsxs(ge,{"data-testid":"queues-row",className:F(c&&"bg-accent"),children:[l.jsxs(G,{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(G,{className:"hidden md:table-cell",children:l.jsx(Xe,{variant:"neutral",children:A_[o.policy.step]})}),l.jsxs(G,{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(G,{className:"hidden text-right md:table-cell",children:h})]},o.id)})})]})})}function vo({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 ux({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(lt,{containerAriaLabel:i,children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:s}),l.jsx(X,{children:"State"})]})}),l.jsx(rt,{children:t.map(o=>{const c=IO(o,n,a,r);return l.jsxs(ge,{"data-testid":"queues-running",children:[l.jsxs(G,{children:[l.jsx(Yf,{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(G,{children:l.jsx(Xe,{variant:c.tone,children:c.label})})]},o.ref)})})]})})}function eD({org:e,detail:t,name:n,settings_note:a,subject_label:s,thread_subjects:r}){var w;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,g=Math.max(1,f.filter(_=>_.batching!=="in_batch").length),j=m&&i.policy.independent_turns?f.filter(_=>_.batching!=="in_batch"&&_.ref!==m.holder):[],v=o.manager,b=o.freeze,x=((w=i.layer)==null?void 0:w.kind)==="release"?i.layer.stall_hold:void 0,p=x?{who:n(x.by),why:x.reason,until:x.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(Nt,{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(Xe,{variant:"neutral",children:A_[i.policy.step]}),l.jsx(Xe,{variant:"neutral",children:UO[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(T2,{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 ",vn(v.lease_until),v.serving_until!==void 0?" · serving now":""]})]}):null,b?l.jsxs(xe,{variant:"warning",children:[l.jsx(w2,{className:"size-4","aria-hidden":"true"}),l.jsxs(je,{children:["Frozen until ",vn(b.lease_until)]}),l.jsxs(pe,{children:[n(b.holder,b.holder_subject)," froze this queue at ",vn(b.since),b.label?`: ${b.label}`:"",". Only ",n(b.holder,b.holder_subject),"'s entries start until it thaws."]})]}):null,p?l.jsxs(xe,{variant:"info",children:[l.jsx($b,{className:"size-4","aria-hidden":"true"}),l.jsxs(je,{children:["Stall hold until ",vn(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(vo,{id:"queue-running",title:"Running turn",side:`Batch opened by ${n(m.holder,m.holder_subject)} at ${vn(m.opened_at)}`,children:[l.jsx("div",{className:"overflow-x-auto rounded-lg border",children:l.jsxs(lt,{containerAriaLabel:"Batch members",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Landing order"}),l.jsx(X,{children:s}),l.jsx(X,{children:"Outcome"})]})}),l.jsx(rt,{children:m.members.map((_,k)=>{const N=qO(_.outcome);return l.jsxs(ge,{"data-testid":"queues-member",children:[l.jsx(G,{children:k+1}),l.jsx(G,{children:l.jsx(Yf,{org:e,subject:_.subject??d.get(_.ref)??(r?{kind:"thread",id:_.ref}:void 0),link:!r})}),l.jsx(G,{children:l.jsx(Xe,{variant:N.tone,children:N.label})})]},_.ref)})})]})}),j.length>0?l.jsxs(l.Fragment,{children:[l.jsx("h4",{className:"text-muted-foreground text-xs font-medium",children:"Also running"}),l.jsx(ux,{org:e,entries:j,landing:o.landing,queue_name:i.name,subject_label:s,held:r,label:"Turns running beside the batch"})]}):null]}):l.jsx(vo,{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(ux,{org:e,entries:f,landing:o.landing,queue_name:i.name,subject_label:s,held:r,label:"Running turns"})}),l.jsx(vo,{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(lt,{containerAriaLabel:"Waiting entries",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Position"}),l.jsx(X,{children:s}),l.jsx(X,{className:"hidden md:table-cell",children:"Joined"}),l.jsx(X,{children:"Turn"}),l.jsx(X,{className:"hidden md:table-cell",children:"Note"})]})}),l.jsx(rt,{children:h.map((_,k)=>{const N=GO(_);return l.jsxs(ge,{"data-testid":"queues-waiting",children:[l.jsx(G,{children:m?g+k+1:_.position}),l.jsx(G,{children:l.jsx(Yf,{org:e,subject:_.subject,link:!r})}),l.jsx(G,{className:"hidden md:table-cell",children:vn(_.joined_at)}),l.jsx(G,{children:l.jsx(Xe,{variant:N.tone,children:N.label})}),l.jsx(G,{className:"hidden md:table-cell",children:_.subject.hidden?"":_.note??""})]},_.ref)})})]})})})]}),l.jsx(vo,{id:"queue-settings",title:"Settings",children:l.jsx("div",{className:"overflow-x-auto rounded-lg border",children:l.jsx(lt,{containerAriaLabel:"Queue settings",children:l.jsx(rt,{children:PO(i,c).map(([_,k])=>l.jsxs(ge,{children:[l.jsx(X,{scope:"row",className:"h-auto w-48 py-2 font-normal",children:_}),l.jsx(G,{children:k})]},_))})})})}),l.jsx("p",{className:"text-muted-foreground text-xs",children:a})]})}const ra="__no_parent__";function L_(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 Pf=(e,t)=>(e.label||e.key).localeCompare(t.label||t.key);function ia({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(Ze,{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 dx({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(Fl,{id:e,className:"mt-0.5",checked:a,"aria-describedby":n?`${e}-help`:void 0,onCheckedChange:r=>s(r===!0)}),l.jsx(Ze,{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 U_({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(Fl,{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(Ze,{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 Gm({message:e}){return e?l.jsxs(xe,{variant:"destructive",role:"alert",children:[l.jsx(et,{className:"size-4","aria-hidden":"true"}),l.jsx(pe,{children:e})]}):null}function H_({id:e,value:t,on_change:n,none:a,options:s,described_by:r}){return l.jsxs(Ln,{value:t,onValueChange:n,children:[l.jsx(jn,{id:e,"aria-describedby":r,children:l.jsx(Un,{})}),l.jsxs(wn,{children:[l.jsx(dt,{value:ra,children:a}),s.map(i=>l.jsx(dt,{value:i.key,children:i.label||i.key},i.key))]})]})}function Im(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 B_=e=>`Lowercase letters, digits, _ and -, starting with a letter. It names the ${e} in posts and in sdlc org, and cannot change later.`;function tD({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(ra),[g,j]=u.useState({}),{saving:v,refusal:b,set_refusal:x,run:p}=Im(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)??ra),j({}),x(null))},[e,n,x]);const y=n?L_(t.teams,n.key):new Set,w=[...t.teams].filter(k=>!y.has(k.key)).sort(Pf),_=k=>{if(k.preventDefault(),!n){if(!r.trim()){j({key:"Give the team a key."});return}const M=o.trim()||r.trim();p(()=>a({action:"add",kind:"team",key:r.trim(),...o.trim()?{label:o.trim()}:{},...d.trim()?{description:d.trim()}:{},...h!==ra?{parent:h}:{}},`Team ${M} added.`));return}if(!o.trim()){j({label:"Give the team a label."});return}const N=h===ra?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(Ai,{open:e,onOpenChange:k=>k||v?null:s(),children:l.jsx(Mi,{children:l.jsxs("form",{onSubmit:_,noValidate:!0,children:[l.jsxs(Oi,{children:[l.jsx(zi,{children:n?`Edit team ${n.label||n.key}`:"Add team"}),l.jsx($i,{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(Gm,{message:b}),n?null:l.jsx(ia,{id:"org-team-key",label:"Key",help:B_("team"),error:g.key,children:k=>l.jsx(Sn,{id:"org-team-key",className:"font-mono",value:r,autoComplete:"off","aria-invalid":g.key?!0:void 0,"aria-describedby":k,onChange:N=>{i(N.target.value),j({})}})}),l.jsx(ia,{id:"org-team-label",label:n?"Label":"Label (optional)",help:n?void 0:"Shown on the chart; the key when left empty.",error:g.label,children:k=>l.jsx(Sn,{id:"org-team-label",value:o,"aria-invalid":g.label?!0:void 0,"aria-describedby":k,onChange:N=>{c(N.target.value),j({})}})}),l.jsx(ia,{id:"org-team-description",label:"Description (optional)",children:()=>l.jsx(Gs,{id:"org-team-description",rows:3,placeholder:"What the team does",value:d,onChange:k=>f(k.target.value)})}),l.jsx(ia,{id:"org-team-parent",label:"Parent team",help:"Where the team sits; its posts report up through the team above.",children:k=>l.jsx(H_,{id:"org-team-parent",value:h,on_change:m,none:"No parent (a root team)",options:w,described_by:k})})]}),l.jsxs(Di,{className:"mt-6",children:[l.jsx(Y,{type:"button",variant:"outline",disabled:v,onClick:s,children:"Cancel"}),l.jsx(Y,{type:"submit",disabled:v,children:n?v?"Saving…":"Save":v?"Adding…":"Add team"})]})]})})})}const nD=(e,t)=>e.length===t.size&&e.every(n=>t.has(n));function aD({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(ra),[g,j]=u.useState(new Set),[v,b]=u.useState(!1),[x,p]=u.useState(!0),[y,w]=u.useState({}),{saving:_,refusal:k,set_refusal:N,run:S}=Im(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)??ra),j(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),w({}),N(null))},[e,n,N]);const M=n?L_(t.job_functions,n.key):new Set,O=[...t.job_functions].filter(T=>!M.has(T.key)).sort(Pf),z=[...t.slots].sort(Pf).map(T=>({value:T.key,label:T.label||T.key})),B=T=>{if(T.preventDefault(),!n){if(!r.trim()){w({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!==ra?{parent:h}:{},fills:[...g],requires_person:v,escalable:x},`Job function ${o.trim()||r.trim()} added.`));return}if(!o.trim()){w({label:"Give the job function a label."});return}const $=h===ra?null:h,I={...o.trim()!==n.label.trim()?{label:o.trim()}:{},...d.trim()!==(n.description??"").trim()?{description:d.trim()}:{},...$!==n.parent?{parent:$}:{},...nD(n.fills,g)?{}:{fills:[...g]},...v!==n.requires_person?{requires_person:v}:{},...x!==n.escalable?{escalable:x}:{}};if(Object.keys(I).length===0){s();return}S(()=>a({action:"edit",kind:"job_function",key:n.key,...I},`Job function ${o.trim()} saved.`))};return l.jsx(Ai,{open:e,onOpenChange:T=>T||_?null:s(),children:l.jsx(Mi,{children:l.jsxs("form",{onSubmit:B,noValidate:!0,children:[l.jsxs(Oi,{children:[l.jsx(zi,{children:n?`Edit job function ${n.label||n.key}`:"Add job function"}),l.jsxs($i,{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(Gm,{message:k}),n?null:l.jsx(ia,{id:"org-function-key",label:"Key",help:B_("job function"),error:y.key,children:T=>l.jsx(Sn,{id:"org-function-key",className:"font-mono",value:r,autoComplete:"off","aria-invalid":y.key?!0:void 0,"aria-describedby":T,onChange:$=>{i($.target.value),w({})}})}),l.jsx(ia,{id:"org-function-label",label:n?"Label":"Label (optional)",error:y.label,children:T=>l.jsx(Sn,{id:"org-function-label",value:o,"aria-invalid":y.label?!0:void 0,"aria-describedby":T,onChange:$=>{c($.target.value),w({})}})}),l.jsx(ia,{id:"org-function-description",label:"Job description (optional)",children:()=>l.jsx(Gs,{id:"org-function-description",rows:3,placeholder:"What this job function does",value:d,onChange:T=>f(T.target.value)})}),l.jsx(ia,{id:"org-function-parent",label:"Parent function",help:"Its posts report to the post of the parent function.",children:T=>l.jsx(H_,{id:"org-function-parent",value:h,on_change:m,none:"No parent (a root function)",options:O,described_by:T})}),l.jsx(U_,{id:"org-function-fills",legend:"Slots it fills",options:z,checked:g,on_change:j,empty:"This org has no slots yet; add them with sdlc org add slot."}),l.jsx(dx,{id:"org-function-requires-person",label:"Requires a person",help:"Only a person may hold its posts.",checked:v,on_change:b}),l.jsx(dx,{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:x,on_change:p})]}),l.jsxs(Di,{className:"mt-6",children:[l.jsx(Y,{type:"button",variant:"outline",disabled:_,onClick:s,children:"Cancel"}),l.jsx(Y,{type:"submit",disabled:_,children:n?_?"Saving…":"Save":_?"Adding…":"Add job function"})]})]})})})}function sD({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:g,refusal:j,set_refusal:v,run:b}=Im(i);if(u.useEffect(()=>{!e||!n||(c(new Set(n.posts.map(M=>M.post))),f(n.source==="override"?n.reason??"":""),m({}),v(null))},[e,n,v]),!n)return null;const x=a.slot(n.slot),p=(S=t.project)!=null&&S.team?t.teams.find(M=>{var O;return M.key===((O=t.project)==null?void 0:O.team)}):void 0,y=p?p.label||p.key:"the owning team",w=new Set(t.job_functions.filter(M=>M.fills.includes(n.slot)).map(M=>M.key)),_=[...t.posts].map(M=>M.post).sort(a.byPost).map(M=>({value:M,label:w.has(M.split("/")[1]??"")?`${a.post(M)} (fills ${x})`:a.post(M)})),k=M=>{M.preventDefault();const O={...o.size===0?{posts:"Choose at least one post."}:{},...d.trim()?{}:{reason:"Give the reason for the override."}};m(O),!(O.posts||O.reason)&&b(()=>s({action:"bind",slot:n.slot,posts:[...o],reason:d.trim()},`Override of ${x} saved.`))},N=async()=>{await r({title:`Clear the override of ${x}?`,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 ${x} cleared.`))};return l.jsx(Ai,{open:e,onOpenChange:M=>M||g?null:i(),children:l.jsx(Mi,{children:l.jsxs("form",{onSubmit:k,noValidate:!0,children:[l.jsxs(Oi,{children:[l.jsxs(zi,{children:["Override ",x]}),l.jsxs($i,{children:["Bind ",x," 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(Gm,{message:j}),l.jsx(U_,{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:M=>{c(M),m(O=>({...O,posts:void 0}))}}),l.jsx(ia,{id:"org-override-reason",label:"Reason",error:h.reason,children:M=>l.jsx(Gs,{id:"org-override-reason",rows:2,placeholder:"Why this slot needs other posts",value:d,"aria-invalid":h.reason?!0:void 0,"aria-describedby":M,onChange:O=>{f(O.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(Di,{className:"mt-6",children:[n.source==="override"?l.jsx(Y,{type:"button",variant:"ghost",className:"sm:mr-auto",disabled:g,onClick:()=>void N(),children:"Clear override"}):null,l.jsx(Y,{type:"button",variant:"outline",disabled:g,onClick:i,children:"Cancel"}),l.jsx(Y,{type:"submit",disabled:g,children:g?"Saving…":"Save override"})]})]})})})}function q_({label:e,on_edit:t,on_remove:n}){return l.jsxs(fu,{children:[l.jsx(hu,{asChild:!0,children:l.jsx(Y,{type:"button",variant:"ghost",size:"control-icon",className:"-my-1 shrink-0","aria-label":`More actions for ${e}`,children:l.jsx(Wh,{className:"size-3.5","aria-hidden":"true"})})}),l.jsxs(qi,{align:"end",children:[l.jsx(Os,{onSelect:t,children:"Edit"}),l.jsx(Os,{className:"text-destructive focus:text-destructive",onSelect:n,children:"Remove"})]})]})}function lD({label:e,message:t,on_dismiss:n}){return l.jsxs(xe,{variant:"destructive",role:"alert",className:"mb-3",children:[l.jsx(et,{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(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:n,children:"Dismiss"})]})]})}const rD="Who holds each post and who reports to whom in this repository's local org, worked out from its teams, job functions and posts.",iD="Covered: someone holds a post that fills the slot. Vacant: posts fill it but nobody holds them. Uncovered: no job function fills it.",oD="scripts/agent-coordination/workflow.json",cD=4,Vm=e=>({paddingLeft:16+24*Math.min(e,cD)}),Cc={covered:{label:"Covered",tone:"success"},vacant:{label:"Vacant",tone:"warning"},uncovered:{label:"Uncovered",tone:"error"}};function uD(){const e=os().org;if(!e)throw new Error("The Org chart page rendered without the org seam.");return e}function dD(){const e=uD(),[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 g=>{const j=r.current+=1;i.current&&clearTimeout(i.current);const v=await e.chart();if(j!==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"&&g>0){const x=b.retry_after??10;n({state:"busy",retry_after:x}),i.current=setTimeout(()=>void m(g-1),x*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=hD(e.change,()=>void o(1),(d==null?void 0:d.chart)??fD);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(va,{title:"Org chart",description:rD}),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(mD,{quiet:t.state==="busy"}):null,t.state==="none"?l.jsx(pD,{edit:(f==null?void 0:f.actions)??null}):null,t.state==="failed"?l.jsx(gD,{kept_at:(d==null?void 0:d.at)??null,on_retry:c}):null,d?l.jsx(xD,{chart:d.chart,edit:(f==null?void 0:f.actions)??null}):null,(f==null?void 0:f.dialogs)??null]})}const fD={org:"",workflow:!1,teams:[],job_functions:[],slots:[],posts:[],members:[],slot_resolution:[],project:{team:null,roots:[]}};function hD(e,t,n){const a=Si(),s=G_(n),{confirm:r,confirm_dialog:i}=Ri(),[o,c]=u.useState(null),[d,f]=u.useState({}),h=b=>f(x=>{if(!x[b])return x;const{[b]:p,...y}=x;return y});if(!e)return null;const m=async(b,x)=>{const p=await e(b);return p.ok?("kind"in b&&h(b.kind==="team"?"teams":"functions"),a.success(x),t(),null):p.refusal.message},g=async(b,x,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:x});if(!k.ok){f(N=>({...N,[_]:{label:p,message:k.refusal.message}}));return}h(_),a.success(`${b==="team"?"Team":"Job function"} ${p} removed.`),t()},j=()=>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,x,p)=>void g(b,x,p),refused:b=>{const x=d[b];return x?l.jsx(lD,{label:x.label,message:x.message,on_dismiss:()=>h(b)}):null}},dialogs:l.jsxs(l.Fragment,{children:[l.jsx(tD,{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:j}),l.jsx(aD,{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:j}),l.jsx(sD,{open:v!==null,chart:n,binding:v,names:s,save:m,confirm:r,on_close:j}),i]})}}function mD({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(Bt,{className:n===3?"h-10 w-2/3":"h-10 w-full"},n))})}function kl({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 pD({edit:e}){return l.jsxs(xe,{variant:"info",className:"mt-6",children:[l.jsx(ma,{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(kl,{children:"sdlc org seed"}),e?null:l.jsx(kl,{children:"sdlc org add team <key>"})]}),e?l.jsxs(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>e.team(null),children:[l.jsx(gc,{className:"size-4","aria-hidden":"true"}),"Add team"]}):null]})]})}function gD({kept_at:e,on_retry:t}){return l.jsxs(xe,{variant:"destructive",className:"mt-6",children:[l.jsx(et,{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 ${Gn(e)} is kept below. `:"","Details are in the terminal running sdlc viewer."]}),l.jsx(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:t,children:"Retry"})]})]})}function G_(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="",g=""]=h.split("/");return{team:t.get(m)??m,job:n.get(g)??g}},i=h=>{const{team:m,job:g}=r(h);return`${g} · ${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(g=>g.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 g=c.get(h);g&&m<e.teams.length;g=c.get(g))m+=1;return m};return{parts:r,post:i,manager:o,byPost:(h,m)=>{const[g="",j=""]=[h.split("/")[0],m.split("/")[0]],[v,b]=[r(h),r(m)];return d(g)-d(j)||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 xs({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 fx({children:e,on_click:t}){return l.jsxs(Y,{type:"button",variant:"outline",size:"sm",onClick:t,children:[l.jsx(gc,{className:"size-4","aria-hidden":"true"}),e]})}function xD({chart:e,edit:t}){const n=G_(e);return l.jsxs(l.Fragment,{children:[l.jsx(xs,{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(yD,{chart:e,names:n})}),l.jsx(xs,{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(wD,{chart:e,names:n})}),t?l.jsxs(xs,{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(fx,{on_click:()=>t.team(null),children:"Add team"}),children:[t.refused("teams"),l.jsx(vD,{chart:e,edit:t})]}):null,l.jsxs("div",{className:"grid items-start gap-x-6 xl:grid-cols-2",children:[l.jsxs(xs,{id:"org-chart-functions",title:"Function tree",description:"Each job function under its parent, with the slots it fills.",actions:t?l.jsx(fx,{on_click:()=>t.job(null),children:"Add job function"}):void 0,children:[t==null?void 0:t.refused("functions"),l.jsx(_D,{chart:e,names:n,edit:t})]}),l.jsxs(xs,{id:"org-chart-slots",title:"Slots",description:iD,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:oD})]}),l.jsx(SD,{chart:e,names:n})]})]}),l.jsx(TD,{chart:e,names:n,edit:t})]})}function vD({chart:e,edit:t}){const n=Ym([...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:Vm(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(Xe,{variant:"neutral",children:"Owns this project"}):null,l.jsx(q_,{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(Nt,{className:"overflow-hidden",children:s(n,0)})}function Ym(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 yD({chart:e,names:t}){const n=Ym([...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:Vm(i),"data-testid":"org-chart-post",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx(Ck,{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(Xe,{variant:Cc.vacant.tone,children:Cc.vacant.label}),l.jsx("span",{className:"text-muted-foreground text-xs",children:"No one holds this post."})]}):o.holders.map(h=>l.jsx(bD,{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(Nt,{className:"overflow-hidden",children:s(n,0)})}function bD({holder:e,post:t,member:n,names:a}){const s=e.kind==="person"?tm:Fh,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 jD=["sdlc org hold <team>/<function> --person <id>","sdlc org hold <team>/<function> --agent <id>"];function wD({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:"}),jD.map(a=>l.jsx(kl,{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(Nt,{className:"overflow-x-auto",children:l.jsxs(lt,{containerAriaLabel:"Members",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Member"}),l.jsx(X,{children:"Posts"}),l.jsx(X,{children:"Primary manager"}),l.jsx(X,{children:"Dotted lines"}),l.jsx(X,{children:"Accountable person"})]})}),l.jsx(rt,{children:n.map(a=>{var i;const s=a.posts.find(o=>o.primary),r=a.posts.filter(o=>o.dotted);return l.jsxs(ge,{"data-testid":"org-chart-member",children:[l.jsxs(G,{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(G,{children:a.posts.map(o=>t.post(o.post)).join(", ")}),l.jsx(G,{children:s?t.manager(s.reports_to):"None"}),l.jsx(G,{children:r.length?r.map(o=>t.manager(o.reports_to)).join(", "):"None"}),l.jsx(G,{children:a.kind==="person"?"Not an agent":((i=a.accountable_person)==null?void 0:i.id)??"None"})]},`${a.kind}:${a.id}`)})})]})})}function _D({chart:e,names:t,edit:n}){const a=Ym([...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:Vm(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(Xe,{variant:"neutral",children:"Requires a person"}):null,n?l.jsx(q_,{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(Nt,{className:"overflow-hidden",children:s(a,0)})}function ND(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 Ec={covered:0,vacant:1,uncovered:2};function I_(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 SD({chart:e,names:t}){const n=I_(e);return l.jsx(Nt,{className:"overflow-x-auto",children:l.jsxs(lt,{containerAriaLabel:"Slots",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Slot"}),l.jsx(X,{children:"Status"}),l.jsx(X,{children:"Resolves to"})]})}),l.jsxs(rt,{children:[[...e.slot_resolution].sort((a,s)=>Ec[a.status]-Ec[s.status]||t.slot(a.slot).localeCompare(t.slot(s.slot))).map(a=>{const s=Cc[a.status];return l.jsxs(ge,{"data-testid":"org-chart-slot",children:[l.jsxs(G,{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(G,{children:l.jsx(Xe,{variant:s.tone,children:s.label})}),l.jsxs(G,{children:[ND(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(ge,{children:l.jsx(G,{colSpan:3,className:"text-muted-foreground h-24 text-center",children:"This org has no slots yet."})}):null]})]})})}const kD="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.",Nd=["sdlc org own <team>","sdlc org bind <slot> <team>/<function>... --reason <text>","sdlc org unbind <slot>"];function TD({chart:e,names:t,edit:n}){const{project:a}=e;if(a.team===null){const i=a.roots.map(t.team);return l.jsx(xs,{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(kl,{children:i.length?Nd[0]:"sdlc org add team <key>"})})})}const s=I_(e),r=[...a.slots].sort((i,o)=>Ec[i.status]-Ec[o.status]||t.slot(i.slot).localeCompare(t.slot(o.slot)));return l.jsxs(xs,{id:"org-chart-project",title:"This project",description:kD,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(Nt,{className:"mt-3 overflow-x-auto",children:l.jsxs(lt,{containerAriaLabel:"Slots in this project",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Slot"}),l.jsx(X,{children:"Status"}),l.jsx(X,{children:"Bound to"}),l.jsx(X,{children:"Source"}),n?l.jsx(X,{className:"text-right",children:l.jsx("span",{className:"sr-only",children:"Actions"})}):null]})}),l.jsxs(rt,{children:[r.map(i=>{const o=Cc[i.status];return l.jsxs(ge,{"data-testid":"org-chart-project-slot",children:[l.jsxs(G,{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(G,{children:l.jsx(Xe,{variant:o.tone,children:o.label})}),l.jsx(G,{children:l.jsx(CD,{binding:i,names:t})}),l.jsx(G,{children:l.jsx(ED,{binding:i})}),n?l.jsx(G,{className:"text-right",children:l.jsx(Y,{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(Lb,{className:"size-3.5","aria-hidden":"true"})})}):null]},i.slot)}),r.length===0?l.jsx(ge,{children:l.jsx(G,{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(kl,{children:Nd[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:"}),Nd.map(i=>l.jsx(kl,{children:i},i))]})]})}function CD({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 ED({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?Hn(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 RD="Local only · this machine · not connected to SoftwareDLC",AD="Checking sync state…",MD="Sync state unknown",OD="Projects are the repositories this viewer reads on this machine. Nothing is shared unless you connect to SoftwareDLC.",Xf="Details are in the terminal running sdlc viewer.",DD="How to fix it is in the terminal running sdlc viewer.",bu="Loading…",Rc="Not available";function zD(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 _r(e){return(typeof e=="string"?new Date(e):e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}const $D={repository_registry:"this repository's registry",folder_registry:"the folder registry",issue_store:"the issue store",task_store:"the task store",workspace_store:"the local graph store"};function V_(e,t){const n=t?` this list was read at ${_r(t)}.`:"";if(e.reason==="store_locked"){const a=e.store?$D[e.store]:"a local store",s=e.since?` since ${_r(e.since)}`:"";return`Another sdlc command has held ${a}${s};${n||" nothing was read yet."} ${Xf}`}return e.status===0?`The viewer did not answer. Is sdlc viewer still running?${t?` This list was read at ${_r(t)}.`:""}`:`The read failed.${t?` This list was read at ${_r(t)}.`:""} ${Xf}`}const LD=e=>e.status===409,UD={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 HD(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?UD[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 hx=["tasks","issues","releases"],Y_=u.createContext(null);function ya(){const e=u.useContext(Y_);if(!e)throw new Error("A shell page rendered outside the app shell.");return e}const BD=10,qD=()=>new Date;function GD({shell:e,now:t=qD,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),[g,j]=u.useState(!0),[v,b]=u.useState(!1),[x,p]=u.useState(void 0),[y,w]=u.useState(!1),[_,k]=u.useState(hx),N=u.useRef(!1),S=u.useRef(!1),M=u.useRef(null),O=u.useRef(!0),z=u.useCallback(async(T=!1)=>{M.current&&clearTimeout(M.current),M.current=null,b(!0);const[$,I]=await Promise.all([e.organizations.list(),e.projects.list()]);if(!O.current)return;if(b(!1),j(!1),$.ok&&I.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(I.data.projects);return}const R=$.ok?I.ok?null:I.refusal:$.refusal;if(!R)return;if(LD(R)){S.current=!1,m(null),c(R),s(null),i(null);return}const q=N.current&&!S.current&&!T;S.current=!0;const C=R.retry_after??BD;m({refusal:R,shown:!q,retryInSeconds:q?C:null}),q&&(M.current=setTimeout(()=>void z(!0),C*1e3))},[e,t]);u.useEffect(()=>(O.current=!0,z(),e.about.about().then(T=>{O.current&&(T.ok?p(T.data):T.refusal.status===404?p(null):w(!0))}),Promise.all(hx.map(async T=>{var $;return[T,await(($=e[T])==null?void 0:$.access())]})).then(T=>{O.current&&k(T.filter(([,$])=>!($!=null&&$.ok&&!$.data.can_view)).map(([$])=>$))}),()=>{O.current=!1,M.current&&clearTimeout(M.current)}),[e,z]);const B={loading:g,org:a,projects:r,none:o,readAt:d,failure:h,about:x,aboutFailed:y,domains:_,reading:v,refresh:()=>void z()};return l.jsx(Y_.Provider,{value:B,children:n})}const ID={threads:"Threads",tasks:"Tasks",queues:"Queues",worktrees:"Worktrees",workspaces:"Workspaces",chart:"Org chart"},VD={tasks:"Tasks",issues:"Issues",releases:"Releases"};function Kf(e,t){return e.kind==="home"?"Home":e.kind==="org"?ID[e.page]:e.kind==="project"?e.page?VD[e.page]:t??e.project:"Not found"}const YD="(max-width: 767px)";function PD(){const e=typeof window<"u"&&window.matchMedia?window.matchMedia(YD):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 yo({className:e=""}){return l.jsx("span",{"aria-hidden":"true",className:`block animate-pulse rounded-md bg-sidebar-accent ${e}`})}function mx({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 px({item:e,collapsed:t}){const{Link:n}=St(),a=e.icon,s=e.title??(t?e.label:void 0),r=l.jsx("span",{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})]})});return l.jsx("li",{children:s?l.jsxs(KM,{children:[l.jsx(QM,{asChild:!0,children:r}),l.jsx(y_,{side:"right",children:s})]}):r})}const gx="m-0 flex list-none flex-col gap-1 p-0";function xx({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 vx({page:e,collapsed:t,sheet:n=!1}){var B;const{href:a}=St(),{worktrees:s}=os(),r=ya(),{org:i,projects:o,loading:c,none:d,about:f,aboutFailed:h,domains:m}=r,g=i?`/org/${i.slug}`:"",j=o==null?void 0:o.find(T=>T.current),v=((B=i==null?void 0:i.source)==null?void 0:B.kind)==="folder"&&j!==void 0,b=T=>v&&j?`${T} · ${j.name}`:T,x=b("Workspaces"),p=b("Tasks"),y=b("Queues"),w=T=>v?T:void 0,_=[{label:"Home",href:a(g||"/"),icon:e2,current:e.kind==="home"},{label:"Threads",href:a(`${g}/threads`),icon:c2,current:e.kind==="org"&&e.page==="threads"},...m.includes("tasks")?[{label:p,title:w(p),href:a(`${g}/tasks`),icon:Db,current:e.kind==="org"&&e.page==="tasks"}]:[],{label:y,title:w(y),href:a(`${g}/queues`),icon:zb,current:e.kind==="org"&&e.page==="queues"},...s?[{label:"Worktrees",href:a(`${g}/worktrees`),icon:Ob,current:e.kind==="org"&&e.page==="worktrees"}]:[],{label:x,title:w(x),href:a(`${g}/workspaces`),icon:Zk,current:e.kind==="org"&&e.page==="workspaces"},{label:"Org chart",href:a(`${g}/chart`),icon:h2,current:e.kind==="org"&&e.page==="chart"}],k=c?null:d?"No organization":(i==null?void 0:i.name)??"Organization",N=i?zD(i):null,S=f==null?void 0:f.version,M=S?t?S:`sdlc ${S}`:h?Rc:bu,O=h||(f==null?void 0:f.sync.state)==="unknown"?MD:f===void 0?AD:RD;let z;return c?z=l.jsx("div",{className:"px-2 py-1",children:l.jsxs(mx,{label:"Loading projects",children:[l.jsx(yo,{className:"h-4 w-32"}),l.jsx(yo,{className:"h-4 w-24"})]})}):o?z=l.jsx("ul",{className:gx,children:o.map(T=>l.jsx(px,{collapsed:t,item:{label:T.name,title:T.name,href:a(`/proj/${encodeURIComponent(T.id)}`),icon:Kk,current:e.kind==="project"&&e.project===T.id}},T.id))}):z=l.jsx("p",{className:"m-0 px-2 text-sm text-sidebar-foreground/70",children:d?"No projects":Rc}),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(Rk,{className:"size-4","aria-hidden":"true"})}),!t&&l.jsx("div",{className:"grid min-w-0 flex-1 text-left text-sm leading-tight",children:k===null?l.jsxs(mx,{label:"Loading organization",children:[l.jsx(yo,{className:"h-4 w-28"}),l.jsx(yo,{className:"h-3 w-24"})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"truncate font-semibold",title:k,children:k}),N&&l.jsx("span",{className:"truncate text-xs text-sidebar-foreground/70",children:N})]})})]}),l.jsxs("nav",{"aria-label":"App",className:"min-h-0 flex-1 overflow-y-auto",children:[l.jsx(xx,{label:"Organization",collapsed:t,children:l.jsx("ul",{className:gx,children:_.map(T=>l.jsx(px,{item:T,collapsed:t},T.label))})}),!t&&l.jsx(xx,{label:"Projects",collapsed:t,children:z})]}),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:S?`sdlc ${S}`:void 0,children:M}),!t&&l.jsxs("p",{className:"m-0 flex items-start gap-2 px-2",children:[l.jsx(Wk,{className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),l.jsx("span",{children:O})]})]})]})}const XD="outline-hidden rounded-sm focus-visible:ring-2 focus-visible:ring-ring";function KD({page:e}){var c;const{href:t,Link:n}=St(),{org:a,projects:s,loading:r,none:i}=ya(),o=[];if(r)o.push({label:bu});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:Kf(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:Kf(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(Rb,{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 ${XD}`,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 QD({page:e,children:t}){var x;const n=PD(),[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}=ya(),g=e.kind==="project"?(x=f==null?void 0:f.find(p=>p.id===e.project))==null?void 0:x.name:void 0;u.useEffect(()=>{const p=h?bu:m?"No organization":(d==null?void 0:d.name)??"Organization";document.title=`${Kf(e,g)} · ${p} · sdlc viewer`},[e,g,d,h,m]);const j=()=>{var p;i(!1),(p=o.current)==null||p.focus()};u.useEffect(()=>{n||i(!1)},[n]);const v=n&&r;u.useEffect(()=>{var w;const p=c.current;if(!v||!p)return;(w=p.querySelector("a, button"))==null||w.focus();const y=_=>{var O;if(_.key==="Escape"){i(!1),(O=o.current)==null||O.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],M=p.contains(document.activeElement);_.shiftKey&&(document.activeElement===N||!M)?(_.preventDefault(),S.focus()):!_.shiftKey&&(document.activeElement===S||!M)&&(_.preventDefault(),N.focus())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[v]);const b=!n&&!a;return l.jsx(XM,{children: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(vx,{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(vx,{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:j,children:l.jsx(Hb,{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:j})]}),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(p2,{className:"size-4","aria-hidden":"true"})}),l.jsx("span",{"aria-hidden":"true",className:"mr-2 h-4 w-px bg-border"}),l.jsx(KD,{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 Pm="m-0 text-2xl font-semibold tracking-tight",Xm="outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",Km=`rounded-sm font-medium text-primary no-underline hover:underline ${Xm}`;function Sd({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 ZD({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(Sd,{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(Sd,{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(Sd,{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?Xf:DD})]})}const yx=`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 ${Xm}`;function FD(){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 ju(){const{href:e,Link:t}=St(),{loading:n,projects:a,none:s,failure:r,readAt:i,refresh:o,reading:c}=ya(),[d,f]=u.useState(""),h=l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("h1",{className:Pm,children:"Projects"}),!s&&l.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:OD})]});if(s)return l.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[h,l.jsx(ZD,{why:s==="not_in_git"?{kind:"not_in_git"}:HD(s)})]});const m=r!=null&&r.shown?r:null,g=(a??[]).filter(j=>j.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:V_(m.refusal,i)}),l.jsx("div",{children:l.jsx("button",{type:"button",className:yx,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:j=>f(j.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 ${Xm}`}),!m&&l.jsx("button",{type:"button",className:`${yx} 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 ${_r(i)}; reading again in ${r.retryInSeconds??10} seconds.`})]}),n?l.jsx(FD,{}):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:[g.map(j=>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(j.id)}`),className:Km,children:j.name})}),l.jsx("td",{className:"px-3 py-2 font-mono text-muted-foreground",children:j.location??Rc}),l.jsx("td",{className:"px-3 py-2 text-right",children:j.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"})})]},j.id)),g.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 P_({title:e,children:t}){const{href:n,Link:a}=St();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:Pm,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 ${Km}`,children:"Back to the organization's Home"})})]})})}const WD={tasks:"Tasks",issues:"Issues",releases:"Releases"};function Qf({project:e}){const{href:t,Link:n}=St(),{org:a,projects:s,loading:r,domains:i}=ya(),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:bu}):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:Pm,children:o.name}),l.jsx("p",{className:"m-0 font-mono text-sm text-muted-foreground",children:o.location??Rc})]}),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:Km,children:WD[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(P_,{title:"Project not found",children:`There is no project '${e}' in this organization.`}):l.jsx(ju,{})}const Qm=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:Qm(e)}}}async function JD(){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 e4(){try{return(await fetch("api/pin",{method:"HEAD",cache:"no-store"})).ok}catch{return!1}}async function t4(){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 n4(){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:Qm(e)}}}async function a4(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 Qm(n)}}const s4={probe:{source:async()=>{const e=await X_();if("error"in e)throw new Error(e.error);return{label:"Local workspace"}}}},K_={href:e=>e.replace(/^\/+/,"")||"./",Link:({href:e,className:t,children:n,...a})=>l.jsx("a",{href:e,className:t,...a,children:n})},l4={label:"Local viewer",can:()=>!1};function r4(){return u.useEffect(()=>{document.title="Shared app UI · SDLC Workspace Viewer"},[]),l.jsx("div",{className:"app-ui dark",children:l.jsx(Cb,{data:s4,router:K_,identity:l4,children:l.jsx(dk,{})})})}const i4="This repository's local planning workspaces: which workspace each forked from, what this checkout's workspace may change, and the integrations and Handoffs between them. This page only reads them; sdlc workspace and sdlc integrate change them.",o4=3e4,c4="Reading the workspaces. On a plan workspace this can take a few minutes.",u4="The read failed. Details are in the terminal running sdlc viewer.",d4={active:{label:"Active",tone:"success"},closed:{label:"Closed",tone:"neutral"},clean:{label:"Clean",tone:"success"},dirty:{label:"Uncommitted changes",tone:"warning"},unreadable:{label:"Unreadable",tone:"error"},queued:{label:"Queued",tone:"info"},integrated:{label:"Integrated",tone:"success"},reconciled:{label:"Reconciled",tone:"success"},stale_head:{label:"Retrying",tone:"warning"},current:{label:"Current",tone:"neutral"},blocked_conflict:{label:"Blocked: conflict",tone:"warning"},blocked_validation:{label:"Blocked: validation error",tone:"warning"},ready:{label:"Ready",tone:"success"},applied:{label:"Applied",tone:"success"},stale_base:{label:"Stale base",tone:"warning"},applied_recovery_required:{label:"Needs recovery",tone:"warning"},unavailable:{label:"Unavailable",tone:"warning"},needs_attention:{label:"Needs attention",tone:"warning"}},f4=e=>d4[e]??{label:e,tone:"neutral"},Va=e=>e.slice(0,8),Q_={human:"Human",ai:"AI"},Zf=(e,t)=>`${e} ${t}${e===1?"":"s"}`;function h4(){const e=os().workspaces;if(!e)throw new Error("The Workspaces page rendered without the workspaces seam.");return e}function m4(e){const t=h4(),[n,a]=u.useState(null),[s,r]=u.useState(null),[i,o]=u.useState(!1),c=u.useRef(null),d=u.useRef(!1),f=u.useRef(null),h=u.useCallback(()=>{if(f.current)return f.current;const b=(async()=>{const x=await t.overview();x.ok?(a(x.data),r(null),o(!1)):(r(x.refusal),o(!0))})().finally(()=>{f.current=null});return f.current=b,b},[t]);u.useEffect(()=>{h()},[h]),Tc(()=>void h(),o4),u.useEffect(()=>{var b;d.current&&(n||s)&&(d.current=!1,(b=c.current)==null||b.focus())},[n,s]);const m=()=>{d.current=!0,h()},g=n===null&&s===null,j=n===null&&s!==null,v=n?p4(n,i):null;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(va,{title:"Workspaces",description:i4,actions:l.jsxs(l.Fragment,{children:[v?l.jsx("p",{className:"text-muted-foreground text-xs",children:v}):null,l.jsxs(Y,{type:"button",variant:"outline",size:"sm","aria-disabled":g||void 0,"aria-describedby":g?"workspaces-reading":void 0,className:"gap-2",onClick:g?void 0:()=>void h(),children:[l.jsx(em,{className:"size-4","aria-hidden":"true"}),"Read again"]}),g?l.jsx("span",{id:"workspaces-reading",className:"sr-only",children:"Reading…"}):null,l.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:n?Z_(n,i):""})]})}),l.jsxs("div",{ref:c,tabIndex:-1,className:"outline-none",children:[g?l.jsx(g4,{}):null,j&&s?l.jsx(x4,{refusal:s,on_retry:m}):null,n?l.jsx(v4,{overview:n}):null]})]})}function Z_(e,t){var n,a;return t||((n=e.stale)==null?void 0:n.reason)==="failed"?"a newer read failed":((a=e.stale)==null?void 0:a.reason)==="running"?"a newer read is still running":""}function p4(e,t){const n=`Read at ${Gn(new Date(e.read_at).toISOString())}`,a=Z_(e,t);return a?`${n} · ${a}`:n}function g4(){return l.jsxs("div",{className:"mt-6",children:[l.jsx("div",{className:"grid gap-2",role:"status","aria-label":"Loading workspaces",children:Array.from({length:6},(e,t)=>l.jsx(Bt,{className:t===5?"h-10 w-2/3":"h-10 w-full"},t))}),l.jsx("p",{className:"text-muted-foreground mt-3 text-sm","aria-live":"polite",children:c4})]})}function x4({refusal:e,on_retry:t}){const n=e.reason==="store_locked"?V_(e,null):u4;return l.jsxs(xe,{variant:"destructive",className:"mt-6",children:[l.jsx(et,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:"Could not read workspaces"}),l.jsxs(pe,{children:[l.jsx("p",{children:n}),l.jsx(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:t,children:"Retry"})]})]})}function v4({overview:e}){const{counts:t}=e,n=[Zf(t.workspaces,"workspace"),`${t.active} active`,`${t.queued} queued`,`${t.blocked} blocked`].join(" · ");return l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"text-muted-foreground mt-2 text-sm",role:"status","aria-live":"polite",children:n}),l.jsxs("div",{className:"mt-4 grid gap-4 lg:grid-cols-[1.4fr_1fr]",children:[l.jsx(bo,{id:"workspaces-lineage",title:"Lineage",caption:"Each workspace under the one it forked from",children:l.jsx(y4,{rows:e.workspaces})}),l.jsx(bo,{id:"workspaces-authority",title:"Authority and resolver",caption:"What this checkout's workspace may change",children:l.jsx(b4,{authority:e.authority})})]}),l.jsx(bo,{id:"workspaces-activity",className:"mt-4",title:"Integration activity",caption:"Newest first",children:e.activity.length===0?l.jsx(bx,{children:"No integration or reconciliation attempts yet."}):l.jsx(w4,{rows:e.activity})}),l.jsx(bo,{id:"workspaces-handoffs",className:"mt-4",title:"Handoffs",children:e.handoffs.length===0?l.jsx(bx,{children:"No Handoffs prepared yet."}):l.jsx(_4,{rows:e.handoffs})})]})}function bo({id:e,title:t,caption:n,className:a,children:s}){return l.jsxs("section",{"aria-labelledby":e,className:F("min-w-0",a),children:[l.jsxs("div",{className:"mb-2 flex flex-wrap items-baseline gap-x-2",children:[l.jsx("h2",{id:e,className:"text-lg font-semibold",children:t}),n?l.jsx("span",{className:"text-muted-foreground text-sm",children:n}):null]}),s]})}const bx=({children:e})=>l.jsx("p",{className:"text-muted-foreground text-sm",children:e}),Ac=({children:e,tone:t})=>l.jsx("div",{className:F("text-xs",t==="error"?"text-destructive":"text-muted-foreground"),children:e});function oi({status:e}){const t=f4(e);return l.jsx(Xe,{variant:t.tone,children:t.label})}function wu({label:e,children:t}){return l.jsx(Nt,{role:"group","aria-label":e,tabIndex:0,className:"overflow-x-auto outline-hidden focus-visible:ring-2 focus-visible:ring-ring",children:t})}function y4({rows:e}){return l.jsx(wu,{label:"Workspaces",children:l.jsxs(lt,{containerClassName:"overflow-visible",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Workspace"}),l.jsx(X,{children:"Actor"}),l.jsx(X,{children:"Forked from"}),l.jsx(X,{children:"Status"}),l.jsx(X,{children:"Projection"})]})}),l.jsx(rt,{children:e.map(t=>l.jsxs(ge,{"data-testid":"workspaces-row",children:[l.jsxs(G,{children:[l.jsx("div",{className:"font-mono font-medium",children:t.short_id}),l.jsx(Ac,{children:t.current?`${t.path} · This checkout`:t.path}),t.projection==="unreadable"&&t.projection_error&&l.jsx(Ac,{children:t.projection_error})]}),l.jsx(G,{children:Q_[t.actor]}),l.jsx(G,{children:t.source_id?l.jsx("span",{className:"font-mono",children:Va(t.source_id)}):l.jsx("span",{className:"text-muted-foreground",children:"No source"})}),l.jsx(G,{children:l.jsx(oi,{status:t.status})}),l.jsx(G,{children:l.jsx(oi,{status:t.projection})})]},t.id))})]})})}function b4({authority:e}){const t=e.resolver,n=[["Workspace",l.jsx("span",{className:"font-mono",children:Va(e.workspace_id)},"id")],["Actor",Q_[e.actor]],["Own head","Writes it"]];return e.source_head==="handoff_only"&&n.push(["Source head","Only through a Handoff"]),n.push(["Git refs","Read only"]),n.push(["Remotes",e.remotes>0?`${e.remotes} named ${e.remotes===1?"remote":"remotes"}`:l.jsx("span",{className:"text-muted-foreground",children:"None"},"none")]),n.push(["Push to remotes",e.push==="human_only"?"Only a person":"Not allowed"]),n.push(["Resolver",t.state==="not_configured"?l.jsx("span",{className:"text-muted-foreground",children:"Not configured"},"resolver"):l.jsx(oi,{status:t.state==="ready"?"ready":"needs_attention"},"resolver")]),t.state==="needs_attention"&&t.issue&&n.push(["Resolver issue",t.issue]),l.jsx(wu,{label:"Authority and resolver",children:l.jsx(lt,{containerClassName:"overflow-visible",children:l.jsx(rt,{children:n.map(([a,s])=>l.jsxs(ge,{children:[l.jsx(X,{scope:"row",className:"text-muted-foreground font-normal",children:a}),l.jsx(G,{children:s})]},a))})})})}function j4(e){const t=[e.merge_attempts?Zf(e.merge_attempts,"merge attempt"):null,e.resolver_attempts?Zf(e.resolver_attempts,"resolver attempt"):null].filter(Boolean);if(t.length)return t.join(" · ");const n=e.kind==="reconciliation"?"No resolver attempts":"No merge attempts yet";return l.jsx("span",{className:"text-muted-foreground",children:n})}function w4({rows:e}){return l.jsx(wu,{label:"Integration activity",children:l.jsxs(lt,{containerClassName:"overflow-visible",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"Change"}),l.jsx(X,{children:"Status"}),l.jsx(X,{children:"Attempts"}),l.jsx(X,{children:"Updated"})]})}),l.jsx(rt,{children:e.map((t,n)=>l.jsxs(ge,{children:[l.jsxs(G,{children:[l.jsx("div",{className:"font-medium",children:t.kind==="integration"?`Integrate ${Va(t.child_id)} into ${Va(t.other_id)}`:`Reconcile ${Va(t.child_id)} from ${Va(t.other_id)}`}),l.jsx(Ac,{children:t.kind==="integration"?"Integration":"Source reconciliation"})]}),l.jsx(G,{children:l.jsx(oi,{status:t.status})}),l.jsx(G,{children:j4(t)}),l.jsx(G,{children:w_(t.updated_at)})]},`${t.kind}-${t.child_id}-${t.other_id}-${t.updated_at}-${n}`))})]})})}function _4({rows:e}){return l.jsx(wu,{label:"Handoffs",children:l.jsxs(lt,{containerClassName:"overflow-visible",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{children:"From"}),l.jsx(X,{children:"To"}),l.jsx(X,{children:"Status"}),l.jsx(X,{children:"Pinned"})]})}),l.jsx(rt,{children:e.map(t=>l.jsxs(ge,{children:[l.jsxs(G,{children:[l.jsx("div",{className:"font-mono font-medium",children:Va(t.child_id)}),t.error?l.jsx(Ac,{children:t.error}):null]}),l.jsx(G,{className:"font-mono",children:Va(t.source_id)}),l.jsx(G,{children:l.jsx(oi,{status:t.status})}),l.jsx(G,{children:`${t.child_commit} onto ${t.source_commit}`})]},t.id))})]})})}const jx="This machine's worktrees of this repository.",N4="Merge sends one whose thread is at rest to the main queue.",S4=3e4,k4=3e3,T4=6e5,kd=[{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"}],pr={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"}},C4="no thread to land it",Zm="its thread waits on you",F_="its thread is done",W_="its thread is retired",Fm=e=>e.archivable&&e.cleanup==="user",E4=e=>e.queue!==null||e.merge.offered===!1&&e.merge.why==="already in a promotion queue",R4=e=>!e.merge.offered&&(e.merge.why===F_||e.merge.why.startsWith(W_)),Wm=e=>!e.merge.offered&&e.merge.why===C4||R4(e),Td=(e,t)=>t==="all"?!0:t==="decide"?Fm(e):(e.landed!==null?"landed":E4(e)?"queued":Wm(e)?"orphan":"needs")===t,A4=e=>e.landed!==null?e.threads.some(t=>t.phase!=="done"):e.threads.length>0&&!Wm(e);function Ho(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 M4(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 Cd=e=>Gn(new Date(e*1e3).toISOString()),Nr=e=>e.charAt(0).toUpperCase()+e.slice(1);function O4(e,t){var s;const n=t.phase?Nr(t.phase):"No phase",a=e.merge;if(!a.offered&&a.why.startsWith(W_)){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===F_?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===Zm?`${n} · waits on you`:a.why.startsWith("its session is not running")?`${n} · session not running`:n}function D4(){const e=os().worktrees;if(!e)throw new Error("The Worktrees page rendered without the worktrees seam.");return e}function z4({org:e}){var L,K;const t=D4(),[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,g]=u.useState(""),[j,v]=u.useState({}),b=u.useRef({}),{confirm:x,confirm_dialog:p}=Ri(),y=u.useRef(!1),w=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(()=>{w(),_()},[w,_]);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;Tc(()=>void w(),k?k4:S4),Tc(()=>void _(),T4);const N=(n==null?void 0:n.rows)??[],S=D=>i==null?void 0:i.sizes[D.path],M=N.filter(Fm),O=i?M.reduce((D,V)=>D+(S(V)??0),0):null,z=N.length===0?jx:`${jx} ${N4}${M.length?` ${M.length} ${M.length===1?"is":"are"} yours to decide${O!==null?`: removing them frees about ${Ho(O)}`:""}.`:""}`,B=m.trim().toLowerCase(),T=D=>!B||[D.name,D.path,D.branch??"",...D.threads.map(V=>V.title??V.thread)].some(V=>V.toLowerCase().includes(B)),$=N.filter(D=>Td(D,f)&&T(D)).sort((D,V)=>{if(f==="decide")return(S(V)??0)-(S(D)??0);const ne=P=>A4(P)?P.merge.offered?0:1:2;return ne(D)-ne(V)||(D.idle_days??1/0)-(V.idle_days??1/0)}),I=async(D,V)=>{const ne=await(D==="merge"?t.merge(V.path):t.remove(V.path));ne.ok?v(({[V.path]:P,...ye})=>ye):v(P=>({...P,[V.path]:ne.refusal.message})),await w()},R=async D=>{if(!D.merge.offered)return;const V=D.threads.find(ee=>ee.thread===(D.merge.offered&&D.merge.thread)),ne=(V==null?void 0:V.title)??D.merge.thread,P=V!=null&&V.holds.length?`has ${V.holds.length} open hold(s) (${V.holds.join(", ")})`:"has no open holds",ye=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",te=D.merge.caveat?`
|
|
336
|
-
|
|
337
|
-
Its session could not be read: ${D.merge.caveat}. A turn it does not start passes on.`:"";await x({title:`Send ${D.name} to the main queue`,description:`This joins the main promotion queue for its thread, ${ne}, which ${P} and is told of the join. The queue checks the branch first, and ${ye}. Nothing reaches main before then.${te}`,action_label:"Join the main queue"})&&await I("merge",D)},q=async D=>{const V=S(D);await x({title:`Remove ${D.name}?`,description:`This deletes the folder ${D.path}${V!==void 0?` and frees about ${Ho(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 I("remove",D))},C=async D=>{await t.dismiss(D),await w()};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(va,{title:"Worktrees",description:z}),!n&&!s&&l.jsx($4,{}),s?l.jsx(L4,{refusal:s,read_at:n==null?void 0:n.read_at,on_retry:()=>void w()}):null,n!=null&&n.stale?l.jsxs(xe,{variant:"destructive",className:"mt-4",children:[l.jsx(et,{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 ",Gn(new Date(n.read_at).toISOString()),"."]}),l.jsx(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>void w(),children:"Retry"})]})]}):null,n==null?void 0:n.removals.map(D=>l.jsxs(xe,{variant:"success",className:"mt-4",role:"status",children:[l.jsx(je,{children:b.current[D.path]!==void 0?`Removed ${D.name} and freed ${Ho(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(Y,{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(Ob,{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(Sn,{type:"search",className:"w-64","aria-label":"Search worktrees",placeholder:"Search worktrees",value:m,onChange:D=>g(D.target.value)}),l.jsxs("p",{className:"text-muted-foreground ml-auto text-xs",children:["Read at ",Gn(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:kd.map(D=>l.jsxs(Y,{type:"button",variant:"outline",size:"sm",className:Lo,"aria-pressed":f===D.id,onClick:()=>h(D.id),children:[D.label," ",N.filter(V=>Td(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(Ub,{className:"text-muted-foreground size-8","aria-hidden":"true"}),l.jsx("h2",{className:"text-lg font-semibold",children:"No worktrees match"}),B?l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"text-muted-foreground text-sm",children:["No ",(L=kd.find(D=>D.id===f))==null?void 0:L.empty," matches “",m,"”. Clear the search to see all"," ",N.filter(D=>Td(D,f)).length,"."]}),l.jsx(Y,{type:"button",variant:"outline",onClick:()=>g(""),children:"Clear search"})]}):l.jsxs("p",{className:"text-muted-foreground text-sm",children:["No ",(K=kd.find(D=>D.id===f))==null?void 0:K.empty," right now."]})]}):l.jsx(Nt,{className:"mt-4 shrink-0 overflow-x-auto",children:l.jsxs(lt,{containerAriaLabel:"Worktrees",className:"table-fixed",children:[l.jsx(yt,{children:l.jsxs(ge,{children:[l.jsx(X,{className:"w-[24%]",children:"Worktree"}),l.jsx(X,{className:"w-[24%]",children:"Threads"}),l.jsx(X,{className:"w-[12%]",children:"Landed"}),l.jsx(X,{className:"w-[18%]",children:"Cleanup"}),l.jsx(X,{className:"hidden w-[10%] md:table-cell",children:"Last commit"}),l.jsx(X,{className:"w-[12%] text-right",children:"Actions"})]})}),l.jsx(rt,{children:$.map(D=>l.jsx(U4,{org:e,row:D,size:S(D),sizes:i!==null?"read":c?"failed":"measuring",can_write:n.can_write,sent:j[D.path],on_merge:()=>void R(D),on_remove:()=>void q(D),on_dismiss:V=>void C(V),on_clear_sent:()=>v(({[D.path]:V,...ne})=>ne)},D.path))})]})})]}):null,p]})}function $4(){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(Bt,{className:t===5?"h-10 w-2/3":"h-10 w-full"},t))})}function L4({refusal:e,read_at:t,on_retry:n}){return e.reason==="engine_missing"?l.jsxs(xe,{variant:"info",className:"mt-6",children:[l.jsx(ma,{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(xe,{variant:"warning",className:"mt-6",children:[l.jsx(et,{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(xe,{variant:"destructive",className:"mt-6",children:[l.jsx(et,{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 ${Gn(new Date(t).toISOString())}.`:""]}),l.jsx(Y,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:n,children:"Retry"})]})]})}function jo({children:e,muted:t=!0}){return l.jsx("div",{className:F("truncate text-xs",t&&"text-muted-foreground"),title:e,children:e})}function U4({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}=St(),m=e?`/org/${encodeURIComponent(e)}`:"",g=f(`${m}/threads`),j=f(`${m}/tasks`),v=pr[t.landed??"not_landed"],b=Fm(t),x=t.write,p=(x==null?void 0:x.state)==="waiting"||(x==null?void 0:x.state)==="running",y=t.threads.find(z=>"thread"in t.merge&&z.thread===t.merge.thread)??t.threads[0],w=t.merge,_=!w.offered&&w.why===Zm,k=s&&t.landed===null&&!t.queue&&!_&&!Wm(t),N=n!==void 0?Ho(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]},M=S.second.filter(Boolean).join(" · "),O=t.path.slice(0,t.path.length-t.name.length-1)||".";return l.jsxs(l.Fragment,{children:[l.jsxs(ge,{"data-testid":"worktrees-row",children:[l.jsxs(G,{children:[l.jsx("div",{className:"truncate font-medium",title:t.name,children:t.name}),l.jsx(jo,{children:t.branch??"Detached"}),O!==".sdlc-worktrees"?l.jsx(jo,{children:`in ${O}`}):null]}),l.jsx(G,{children:y?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"truncate",title:y.title??y.thread,children:y.title??y.thread}),l.jsx(jo,{children:`${O4(t,y)}${t.threads.length>1?` · ${t.threads.length-1} more`:""}`})]}):l.jsx("span",{className:"text-muted-foreground",children:"No thread"})}),l.jsx(G,{children:l.jsx(Xe,{variant:v.tone,children:v.label})}),l.jsxs(G,{children:[l.jsx("div",{className:F("truncate",S.muted&&"text-muted-foreground"),children:S.label}),M?l.jsx("div",{className:"hidden md:block",children:l.jsx(jo,{children:M})}):null]}),l.jsx(G,{className:"hidden md:table-cell",children:M4(t.idle_days)}),l.jsx(G,{className:"text-right",children:l.jsxs("div",{className:"flex justify-end gap-2",children:[p?l.jsx(Y,{type:"button",variant:"outline",size:"sm",loading:!0,disabled:!0,children:(x==null?void 0:x.kind)==="merge"?x.state==="waiting"?"Waiting to join…":"Joining main…":(x==null?void 0:x.state)==="waiting"?"Waiting to remove…":"Removing…"}):t.queue?l.jsx(Xe,{variant:pr.queued.tone,children:`${pr.queued.label} · ${J_(t.queue.position)}`}):_?l.jsx(h,{href:j,"aria-label":`${t.name}: its thread waits on you, in Waiting on you`,children:l.jsx(Xe,{variant:pr.needs_you.tone,children:pr.needs_you.label})}):k?l.jsx(Y,{type:"button",variant:"outline",size:"sm",title:w.offered?void 0:w.why,"aria-disabled":!w.offered||void 0,className:F(!w.offered&&"cursor-not-allowed opacity-50"),"aria-label":`Send ${t.name} to the main queue`,"aria-describedby":w.offered?void 0:`why-${t.name}`,onClick:w.offered?i:void 0,children:"Merge"}):null,b&&s&&!p?l.jsx(Y,{type:"button",variant:"outline",size:"sm","aria-label":`Remove ${t.name}`,onClick:o,children:"Remove"}):null]})})]}),l.jsx(H4,{row:t,threads:g,tasks:j,merge_shown:k,sent:r,on_dismiss:c,on_clear_sent:d})]})}function H4({row:e,threads:t,tasks:n,merge_shown:a,sent:s,on_dismiss:r,on_clear_sent:i}){var j,v,b,x;const{Link:o}=St(),c=(p="Open in Threads")=>l.jsx(o,{className:"text-primary text-sm hover:underline",href:t,children:p}),d=p=>l.jsx(Y,{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 g=null;if(s)g=l.jsxs(xe,{variant:"destructive",children:[l.jsx(et,{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")g=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")g=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=((j=f.lands)==null?void 0:j.by)==="manager"?`the merge manager, ${f.lands.manager}, lands it`:"it lands it on its turn";g=l.jsxs(xe,{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 ${Cd(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`;g=l.jsxs(xe,{variant:"destructive",children:[l.jsx(et,{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:`${Nr(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;g=l.jsxs(xe,{variant:"warning",children:[l.jsx(et,{className:"size-4","aria-hidden":"true"}),l.jsx(je,{children:`${e.name}'s turn ${p.outcome==="failed"?"failed":"passed on"} at ${Cd(p.left_at)}`}),l.jsxs(pe,{children:[l.jsx("p",{children:`${Nr(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((x=e.queue)==null?void 0:x.position)===1&&e.queue.turn==="next"&&e.queue.passes_at?g=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 ${Cd(e.queue.passes_at)}. `,c()]}):!e.merge.offered&&e.merge.why===Zm?g=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?g=l.jsx("p",{className:"text-sm",children:c("Open its successor in Threads")}):a&&!e.merge.offered?g=l.jsxs("p",{className:"text-sm",id:`why-${e.name}`,children:[`${Nr(e.merge.why)}. `,e.merge.thread&&!e.merge.why.startsWith("its thread is at work")?c():null]}):e.merge.offered&&e.merge.caveat&&(g=l.jsx("p",{className:"text-muted-foreground text-sm",children:`${Nr(e.merge.caveat)}.`}));return g?l.jsx(ge,{className:"hover:bg-transparent",children:l.jsx(G,{colSpan:6,className:"pt-0",children:g})}):null}const B4=["reason","since","store","repository","folder","home","member_path"];function e1(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 B4){const s=t==null?void 0:t[a];typeof s=="string"&&(n[a]=s)}return n}function nr({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:e1(i.status,o)}}}function q4(e={}){const t=nr(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 G4(e={}){const t=nr(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 Sr=e=>({ok:!1,refusal:{status:0,message:e}});function t1({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 Sr("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:e1(s.status,r)}}}function I4(e={}){const t=nr(e),n=t1(e);return{chart:()=>t("org"),change:a=>n("org-change",a)}}function V4(e={}){const t=nr(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(Sr("This checkout keeps no archived tasks.")):c.assigned_to_me?Promise.resolve(Sr("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()=>Sr("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 Sr("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 Y4(e={}){const t=nr(e),n=t1(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)}}function P4(e={}){const t=nr(e);return{overview:()=>t("workspaces")}}const X4=15e3,K4=10,wx="idle-sessions-list",_x="idle-sessions-heading",Nx="idle-sessions-confirm-text";function n1(e){return e>=1024?`${(e/1024).toFixed(1)} GB`:`${Math.round(e)} MB`}const Q4=e=>`${Number.isInteger(e)?e:e.toFixed(1)} h`,a1=e=>e===1?"1 session":`${e} sessions`;function Z4(e){const t=e.released.length?`Closed ${a1(e.released.length)}.`:"Closed no sessions.";return e.kept.length?`${t} Kept ${e.kept.length}:`:t}function F4({row:e}){const t=[e.name,e.retired?"continued in another session":"",`idle ${Q4(e.idle_hours)}`,n1(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 W4(){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(""),g=u.useRef(null),j=u.useRef(null),v=u.useRef(null),b=u.useRef(null),x=u.useRef(0),p=u.useRef(0),y=u.useCallback(async()=>{const T=++x.current,$=await t4();if(!$||T<p.current)return;p.current=T,h("");const I=JSON.stringify($);I!==m.current&&(m.current=I,t($))},[]);u.useEffect(()=>{const T=setTimeout(y,0),$=setInterval(y,X4);return()=>{clearTimeout(T),clearInterval($)}},[y]),u.useEffect(()=>{var $;const T=b.current;T&&(b.current=null,($={cancel:j,close:g,dismiss:v}[T].current)==null||$.focus())});const w=(e==null?void 0:e.sessions.length)??0;if(u.useEffect(()=>{s&&!w&&i===null&&r(!1)},[s,w,i]),!w&&!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(w),d(null),h("");const T=await n4();p.current=x.current+1,await y(),o(null),r(!1),a(!1),"error"in T?(h(`The sessions were not closed: ${T.error.replace(/\.+$/,"")}.`),b.current="close"):(d(T.done),b.current="dismiss")},S=()=>{d(null),b.current="close"},M=T=>{T.key==="Escape"&&(T.preventDefault(),k())},O=i!==null?`Closing ${a1(i)}…`:c?Z4(c):"",z=(e==null?void 0:e.sessions.slice(0,K4))??[],B=w-z.length;return l.jsxs("div",{className:"idle",role:"group",...w?{"aria-labelledby":_x}:{"aria-label":"Idle sessions"},children:[f&&l.jsx("div",{className:"alert",role:"alert",children:f}),w>0&&e&&l.jsxs("div",{className:"idle-head",children:[l.jsxs("div",{className:"idle-title",children:[l.jsxs("h2",{className:"group",id:_x,"aria-label":`Idle sessions, ${w}`,children:["Idle sessions",l.jsx("span",{className:"count",children:w})]}),l.jsxs("p",{className:"caption muted",children:["over ",e.idle_over," h · ",n1(e.memory_mb)]})]}),l.jsxs("div",{className:"tools",children:[l.jsx("button",{type:"button",className:"pin","aria-expanded":n,"aria-controls":wx,"aria-label":n?"Hide the idle sessions list":"Show the idle sessions list",onClick:()=>a(T=>!T),children:n?"Hide":"Show"}),l.jsx("button",{type:"button",className:"pin",ref:g,"aria-expanded":s,"aria-label":"Close idle sessions…",onClick:_,children:"Close idle…"})]})]}),w>0&&l.jsxs("ul",{className:"idle-list",id:wx,hidden:!n,"aria-label":`Sessions idle over ${e==null?void 0:e.idle_over} hours, longest idle first`,children:[z.map(T=>l.jsx(F4,{row:T},T.session)),B>0&&l.jsx("li",{children:l.jsxs("p",{className:"caption muted",children:["…and ",B," more"]})})]}),s&&w>0&&l.jsxs("div",{className:"idle-confirm",role:"group","aria-label":"Close idle sessions","aria-describedby":Nx,onKeyDown:M,children:[l.jsxs("p",{id:Nx,children:[w===1?"Close this session?":`Close these ${w} 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 ${w}`}),l.jsx("button",{type:"button",className:"pin",ref:j,"aria-disabled":i!==null?!0:void 0,onClick:k,children:"Cancel"})]})]}),l.jsx("p",{className:"idle-status",role:"status",children:O}),c&&l.jsxs(l.Fragment,{children:[c.kept.length>0&&l.jsx("ul",{className:"idle-list","aria-label":"Kept sessions",children:c.kept.map(T=>l.jsxs("li",{children:[l.jsx("p",{className:"idle-name",children:T.title}),l.jsx("p",{className:"caption muted",children:T.why})]},T.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 Ff(e){return e&&Object.hasOwn(Sx,e)?Sx[e]:"grey"}const J4=1e4,e3=6e4,t3=2,kx="#thread-",n3="The threads view needs a SoftwareDLC checkout (tools/vscode-threads); this repository has none.",a3={working:"▶",prod:"↑",planned:"○"};function Tx({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 Ed({text:e,role:t}){return l.jsx("span",{className:`badge tone-${Ff(t)}`,children:e})}function s3({serves:e}){const t=e.slice(0,t3),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 l3({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(""),[g,j]=u.useState(null),v=u.useRef(""),b=u.useRef(""),x=u.useRef(null),p=u.useRef(null),y=u.useRef(null),w=z=>{var B;return z instanceof HTMLButtonElement&&z.classList.contains("pin")&&((B=x.current)!=null&&B.contains(z))?z.dataset.key??null:null},_=z=>{y.current=w(z.target)},k=()=>{setTimeout(()=>{w(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 B=JSON.stringify(z.data);B!==v.current&&(v.current=B,n(z.data))},[e]);u.useEffect(()=>{let z=!0;e4().then($=>z&&c($));const B=setTimeout(N,0),T=setInterval(N,J4);return()=>{z=!1,clearTimeout(B),clearInterval(T)}},[N]),u.useEffect(()=>{let z=!0;const B=()=>JD().then($=>{z&&$&&j(I=>JSON.stringify(I)===JSON.stringify($)?I:$)});B();const T=setInterval(B,e3);return()=>{z=!1,clearInterval(T)}},[]),u.useEffect(()=>{const z=()=>{var I,R,q;const B=window.location.hash;if(!B.startsWith(kx)||B===b.current)return;let T;try{T=decodeURIComponent(B.slice(kx.length))}catch{return}const $=document.getElementById(`thread-${T}`);!$||!((I=x.current)!=null&&I.contains($))||(b.current=B,(R=$.querySelector(".thread-title"))==null||R.focus({preventScroll:!0}),(q=$.scrollIntoView)==null||q.call($,{block:"center"}))};return z(),window.addEventListener("hashchange",z),()=>window.removeEventListener("hashchange",z)},[t]),u.useLayoutEffect(()=>{const z=y.current??p.current;if(!z||!x.current)return;const B=document.activeElement;if(B&&B!==document.body&&!x.current.contains(B)){y.current=null;return}const T=[...x.current.querySelectorAll("button.pin")].find($=>$.dataset.key===z);T?B!==T&&T.focus({preventScroll:z!==p.current}):y.current=null});const S=async z=>{if(d)return;const B=!z.pinned;p.current=z.key,f(z.key);const T=await a4(z.key,B);f(null),T||n($=>$&&{...$,threads:$.threads.map(I=>I.key===z.key?{...I,pinned:B}:I)}),await N(),m(T?`The pin was not saved: ${T}`:""),p.current===z.key&&(p.current=null)},M=(t==null?void 0:t.pinnedCount)??0,O=(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(W4,{}),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:n3}):l.jsxs("div",{className:"thread-list",ref:x,onFocus:_,onBlur:k,children:[O.map((z,B)=>l.jsxs("div",{children:[M>0&&B===0&&l.jsx(Tx,{label:"Pinned",count:M,hint:"Threads you pinned; they stay first in every order"}),M>0&&B===M&&l.jsx(Tx,{label:"Other threads",count:O.length-M}),l.jsx(r3,{row:g!=null&&g[z.key]?{...z,serves:g[z.key]}:z,pinnable:o&&typeof z.pinned=="boolean",pinning:d,onPin:()=>S(z)})]},z.key)),t&&!O.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 r3({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(Ed,{text:e.carried,role:"waiting"}),e.carriedBatch&&l.jsx(Ed,{text:e.carriedBatch.text,role:e.carriedBatch.role})]}):l.jsx(Ed,{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(s3,{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-${Ff(r.role)}`,children:[l.jsxs("span",{"aria-hidden":"true",children:[a3[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-${Ff(r.role)}`,children:r.text},`h${i}`)),e.plan&&l.jsx("p",{className:"caption muted",children:e.plan})]})}const i3=5e3;function o3(){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),i3))},[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(Y,{type:"button",variant:"ghost",size:"control",className:"shrink-0",onClick:()=>s(c.id),children:"Dismiss"})]},c.id))});return{notify:i,toasts:o}}const Js={issues:"classic/?section=issues",releases:"classic/#releases"},c3=/^#(issue=|release=|planned$|releases$)/,u3=/^#task=(.+)$/;function s1(e){return e.split("/").filter(Boolean).slice(1).join("/")}function d3(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==="workspaces"?{page:{kind:"org",page:"workspaces"},workspaces:!0}:o==="queues"?{page:{kind:"org",page:"queues"},queues:!0}:Js[o]?{classic:Js[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==="workspaces")return{page:{kind:"org",page:"workspaces"},org:o,workspaces:!0};if(r==="queues")return{page:{kind:"org",page:"queues"},org:o,queues:!0};if(Js[r])return{classic:Js[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(Js[r])return{classic:Js[r]}}return{page:{kind:"not_found"}}}const f3={label:"Local viewer",can:()=>!1},h3={connecting:"Connecting…",live:"Live · refreshes every 10s",disconnected:"Disconnected"},Cx=()=>l.jsx(P_,{title:"Page not found",children:"There is no page at this address in this viewer."});function m3(){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"}),h3[e]]}),l.jsx(l3,{onConnection:t})]})}const Jm=()=>l.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading…"});function p3({route:e,navigate:t}){var f;const{org:n,projects:a,loading:s,none:r}=ya(),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(Qf,{project:i});if(c||e.org===void 0&&s)return l.jsx(Jm,{});const d=(n==null?void 0:n.slug)??e.org;return d===void 0&&i!==null?l.jsx(Qf,{project:i}):d===void 0&&r?l.jsx(ju,{}):d===void 0?l.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:"Tasks open once the organization reads."}):l.jsx(rO,{org:d})}function g3({route:e,navigate:t}){const{org:n,loading:a,none:s}=ya(),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(Jm,{});const i=(n==null?void 0:n.slug)??e.org;if(i===void 0&&s)return l.jsx(ju,{});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(QO,{org:i,open:o,path:`/org/${encodeURIComponent(i)}/queues`})}function x3({route:e,navigate:t}){const{org:n}=ya();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(Cx,{});else if("threads"in e)r=l.jsx(m3,{});else if("task"in e){const i=new URLSearchParams(window.location.search).get("from");r=l.jsx($O,{org:encodeURIComponent(e.org),task_id:e.task,from:i})}else"tasks"in e?r=l.jsx(p3,{route:e,navigate:t}):"chart"in e?r=l.jsx(dD,{}):"worktrees"in e?r=l.jsx(z4,{org:(n==null?void 0:n.slug)??e.org}):"workspaces"in e?r=l.jsx(m4,{org:(n==null?void 0:n.slug)??e.org}):"queues"in e?r=l.jsx(g3,{route:e,navigate:t}):a.kind==="home"?r=l.jsx(ju,{}):a.kind==="project"?r=l.jsx(Qf,{project:a.project}):r=l.jsx(Cx,{});return l.jsx(QD,{page:a,children:r})}function v3({task:e,navigate:t}){const{org:n,loading:a,none:s,failure:r}=ya(),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(Jm,{})}const y3=e=>window.location.replace(e);function b3(e){try{return decodeURIComponent(e)}catch{return null}}function j3({navigate:e=y3,data:t}){const n=d3(s1(window.location.pathname),window.location.search),[a,s]=u.useState(null),{notify:r,toasts:i}=o3(),o=u3.exec(window.location.hash),c=o?b3(o[1]):null,d=c3.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:q4(),tasks:V4(),org:I4(),worktrees:Y4(),workspaces:P4(),queues:G4()},[t]);return d||"classic"in n||"forward"in n||!f.shell?null:l.jsx("div",{className:"app-ui dark",ref:s,children:l.jsxs(HC,{container:a,children:[l.jsx(Cb,{data:f,router:K_,identity:f3,notify:r,children:l.jsx(GD,{shell:f.shell,children:c!==null?l.jsx(v3,{task:c,navigate:e}):l.jsx(x3,{route:n,navigate:e})})}),i]})})}ck.createRoot(document.getElementById("root")).render(l.jsx(u.StrictMode,{children:s1(window.location.pathname)==="app-ui-probe"?l.jsx(r4,{}):l.jsx(j3,{})}));
|