@software-dlc/cli 0.163.2 → 0.164.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.
@@ -0,0 +1,287 @@
1
+ function TS(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in e)){const r=Object.getOwnPropertyDescriptor(a,l);r&&Object.defineProperty(e,l,r.get?r:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ag(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lg={exports:{}},_i={};/**
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 CS=Symbol.for("react.transitional.element"),kS=Symbol.for("react.fragment");function rg(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 l in t)l!=="key"&&(n[l]=t[l])}else n=t;return t=n.ref,{$$typeof:CS,type:e,key:a,ref:t!==void 0?t:null,props:n}}_i.Fragment=kS;_i.jsx=rg;_i.jsxs=rg;lg.exports=_i;var s=lg.exports,sg={exports:{}},ae={};/**
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 Yd=Symbol.for("react.transitional.element"),AS=Symbol.for("react.portal"),RS=Symbol.for("react.fragment"),MS=Symbol.for("react.strict_mode"),OS=Symbol.for("react.profiler"),DS=Symbol.for("react.consumer"),zS=Symbol.for("react.context"),LS=Symbol.for("react.forward_ref"),US=Symbol.for("react.suspense"),$S=Symbol.for("react.memo"),og=Symbol.for("react.lazy"),Bh=Symbol.iterator;function BS(e){return e===null||typeof e!="object"?null:(e=Bh&&e[Bh]||e["@@iterator"],typeof e=="function"?e:null)}var ig={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cg=Object.assign,ug={};function er(e,t,n){this.props=e,this.context=t,this.refs=ug,this.updater=n||ig}er.prototype.isReactComponent={};er.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")};er.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dg(){}dg.prototype=er.prototype;function Xd(e,t,n){this.props=e,this.context=t,this.refs=ug,this.updater=n||ig}var Id=Xd.prototype=new dg;Id.constructor=Xd;cg(Id,er.prototype);Id.isPureReactComponent=!0;var Hh=Array.isArray,ke={H:null,A:null,T:null,S:null,V:null},fg=Object.prototype.hasOwnProperty;function Pd(e,t,n,a,l,r){return n=r.ref,{$$typeof:Yd,type:e,key:t,ref:n!==void 0?n:null,props:r}}function HS(e,t){return Pd(e.type,t,void 0,void 0,void 0,e.props)}function Qd(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yd}function qS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qh=/\/+/g;function _c(e,t){return typeof e=="object"&&e!==null&&e.key!=null?qS(""+e.key):t.toString(36)}function Gh(){}function GS(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Gh,Gh):(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 pl(e,t,n,a,l){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(r){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Yd:case AS:o=!0;break;case og:return o=e._init,pl(o(e._payload),t,n,a,l)}}if(o)return l=l(e),o=a===""?"."+_c(e,0):a,Hh(l)?(n="",o!=null&&(n=o.replace(qh,"$&/")+"/"),pl(l,t,n,"",function(u){return u})):l!=null&&(Qd(l)&&(l=HS(l,n+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(qh,"$&/")+"/")+o)),t.push(l)),1;o=0;var i=a===""?".":a+":";if(Hh(e))for(var c=0;c<e.length;c++)a=e[c],r=i+_c(a,c),o+=pl(a,t,n,r,l);else if(c=BS(e),typeof c=="function")for(e=c.call(e),c=0;!(a=e.next()).done;)a=a.value,r=i+_c(a,c++),o+=pl(a,t,n,r,l);else if(r==="object"){if(typeof e.then=="function")return pl(GS(e),t,n,a,l);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 o}function Xs(e,t,n){if(e==null)return e;var a=[],l=0;return pl(e,a,"","",function(r){return t.call(n,r,l++)}),a}function VS(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 Vh=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 YS(){}ae.Children={map:Xs,forEach:function(e,t,n){Xs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Xs(e,function(){t++}),t},toArray:function(e){return Xs(e,function(t){return t})||[]},only:function(e){if(!Qd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ae.Component=er;ae.Fragment=RS;ae.Profiler=OS;ae.PureComponent=Xd;ae.StrictMode=MS;ae.Suspense=US;ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ke;ae.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ke.H.useMemoCache(e)}};ae.cache=function(e){return function(){return e.apply(null,arguments)}};ae.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=cg({},e.props),l=e.key,r=void 0;if(t!=null)for(o in t.ref!==void 0&&(r=void 0),t.key!==void 0&&(l=""+t.key),t)!fg.call(t,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&t.ref===void 0||(a[o]=t[o]);var o=arguments.length-2;if(o===1)a.children=n;else if(1<o){for(var i=Array(o),c=0;c<o;c++)i[c]=arguments[c+2];a.children=i}return Pd(e.type,l,void 0,void 0,r,a)};ae.createContext=function(e){return e={$$typeof:zS,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:DS,_context:e},e};ae.createElement=function(e,t,n){var a,l={},r=null;if(t!=null)for(a in t.key!==void 0&&(r=""+t.key),t)fg.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(l[a]=t[a]);var o=arguments.length-2;if(o===1)l.children=n;else if(1<o){for(var i=Array(o),c=0;c<o;c++)i[c]=arguments[c+2];l.children=i}if(e&&e.defaultProps)for(a in o=e.defaultProps,o)l[a]===void 0&&(l[a]=o[a]);return Pd(e,r,void 0,void 0,null,l)};ae.createRef=function(){return{current:null}};ae.forwardRef=function(e){return{$$typeof:LS,render:e}};ae.isValidElement=Qd;ae.lazy=function(e){return{$$typeof:og,_payload:{_status:-1,_result:e},_init:VS}};ae.memo=function(e,t){return{$$typeof:$S,type:e,compare:t===void 0?null:t}};ae.startTransition=function(e){var t=ke.T,n={};ke.T=n;try{var a=e(),l=ke.S;l!==null&&l(n,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(YS,Vh)}catch(r){Vh(r)}finally{ke.T=t}};ae.unstable_useCacheRefresh=function(){return ke.H.useCacheRefresh()};ae.use=function(e){return ke.H.use(e)};ae.useActionState=function(e,t,n){return ke.H.useActionState(e,t,n)};ae.useCallback=function(e,t){return ke.H.useCallback(e,t)};ae.useContext=function(e){return ke.H.useContext(e)};ae.useDebugValue=function(){};ae.useDeferredValue=function(e,t){return ke.H.useDeferredValue(e,t)};ae.useEffect=function(e,t,n){var a=ke.H;if(typeof n=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return a.useEffect(e,t)};ae.useId=function(){return ke.H.useId()};ae.useImperativeHandle=function(e,t,n){return ke.H.useImperativeHandle(e,t,n)};ae.useInsertionEffect=function(e,t){return ke.H.useInsertionEffect(e,t)};ae.useLayoutEffect=function(e,t){return ke.H.useLayoutEffect(e,t)};ae.useMemo=function(e,t){return ke.H.useMemo(e,t)};ae.useOptimistic=function(e,t){return ke.H.useOptimistic(e,t)};ae.useReducer=function(e,t,n){return ke.H.useReducer(e,t,n)};ae.useRef=function(e){return ke.H.useRef(e)};ae.useState=function(e){return ke.H.useState(e)};ae.useSyncExternalStore=function(e,t,n){return ke.H.useSyncExternalStore(e,t,n)};ae.useTransition=function(){return ke.H.useTransition()};ae.version="19.1.0";sg.exports=ae;var d=sg.exports;const Qn=ag(d),hg=TS({__proto__:null,default:Qn},[d]);var mg={exports:{}},Ei={},pg={exports:{}},gg={};/**
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(C,$){var E=C.length;C.push($);e:for(;0<E;){var z=E-1>>>1,Q=C[z];if(0<l(Q,$))C[z]=$,C[E]=Q,E=z;else break e}}function n(C){return C.length===0?null:C[0]}function a(C){if(C.length===0)return null;var $=C[0],E=C.pop();if(E!==$){C[0]=E;e:for(var z=0,Q=C.length,R=Q>>>1;z<R;){var q=2*(z+1)-1,Z=C[q],G=q+1,ge=C[G];if(0>l(Z,E))G<Q&&0>l(ge,Z)?(C[z]=ge,C[G]=E,z=G):(C[z]=Z,C[q]=E,z=q);else if(G<Q&&0>l(ge,E))C[z]=ge,C[G]=E,z=G;else break e}}return $}function l(C,$){var E=C.sortIndex-$.sortIndex;return E!==0?E:C.id-$.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 o=Date,i=o.now();e.unstable_now=function(){return o.now()-i}}var c=[],u=[],f=1,h=null,m=3,g=!1,w=!1,y=!1,S=!1,v=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function b(C){for(var $=n(u);$!==null;){if($.callback===null)a(u);else if($.startTime<=C)a(u),$.sortIndex=$.expirationTime,t(c,$);else break;$=n(u)}}function j(C){if(y=!1,b(C),!w)if(n(c)!==null)w=!0,k||(k=!0,H());else{var $=n(u);$!==null&&V(j,$.startTime-C)}}var k=!1,N=-1,_=5,D=-1;function A(){return S?!0:!(e.unstable_now()-D<_)}function O(){if(S=!1,k){var C=e.unstable_now();D=C;var $=!0;try{e:{w=!1,y&&(y=!1,p(N),N=-1),g=!0;var E=m;try{t:{for(b(C),h=n(c);h!==null&&!(h.expirationTime>C&&A());){var z=h.callback;if(typeof z=="function"){h.callback=null,m=h.priorityLevel;var Q=z(h.expirationTime<=C);if(C=e.unstable_now(),typeof Q=="function"){h.callback=Q,b(C),$=!0;break t}h===n(c)&&a(c),b(C)}else a(c);h=n(c)}if(h!==null)$=!0;else{var R=n(u);R!==null&&V(j,R.startTime-C),$=!1}}break e}finally{h=null,m=E,g=!1}$=void 0}}finally{$?H():k=!1}}}var H;if(typeof x=="function")H=function(){x(O)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,B=L.port2;L.port1.onmessage=O,H=function(){B.postMessage(null)}}else H=function(){v(O,0)};function V(C,$){N=v(function(){C(e.unstable_now())},$)}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(C){C.callback=null},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(C){switch(m){case 1:case 2:case 3:var $=3;break;default:$=m}var E=m;m=$;try{return C()}finally{m=E}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(C,$){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var E=m;m=C;try{return $()}finally{m=E}},e.unstable_scheduleCallback=function(C,$,E){var z=e.unstable_now();switch(typeof E=="object"&&E!==null?(E=E.delay,E=typeof E=="number"&&0<E?z+E:z):E=z,C){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=E+Q,C={id:f++,callback:$,priorityLevel:C,startTime:E,expirationTime:Q,sortIndex:-1},E>z?(C.sortIndex=E,t(u,C),n(c)===null&&C===n(u)&&(y?(p(N),N=-1):y=!0,V(j,E-z))):(C.sortIndex=Q,t(c,C),w||g||(w=!0,k||(k=!0,H()))),C},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(C){var $=m;return function(){var E=m;m=$;try{return C.apply(this,arguments)}finally{m=E}}}})(gg);pg.exports=gg;var XS=pg.exports,vg={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 IS=d;function xg(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 Yn(){}var ut={d:{f:Yn,r:function(){throw Error(xg(522))},D:Yn,C:Yn,L:Yn,m:Yn,X:Yn,S:Yn,M:Yn},p:0,findDOMNode:null},PS=Symbol.for("react.portal");function QS(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:PS,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}var Lr=IS.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Ti(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=ut;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(xg(299));return QS(e,t,null,n)};dt.flushSync=function(e){var t=Lr.T,n=ut.p;try{if(Lr.T=null,ut.p=2,e)return e()}finally{Lr.T=t,ut.p=n,ut.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,ut.d.C(e,t))};dt.prefetchDNS=function(e){typeof e=="string"&&ut.d.D(e)};dt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=Ti(n,t.crossOrigin),l=typeof t.integrity=="string"?t.integrity:void 0,r=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?ut.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:l,fetchPriority:r}):n==="script"&&ut.d.X(e,{crossOrigin:a,integrity:l,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=Ti(t.as,t.crossOrigin);ut.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&&ut.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=Ti(n,t.crossOrigin);ut.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=Ti(t.as,t.crossOrigin);ut.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 ut.d.m(e)};dt.requestFormReset=function(e){ut.d.r(e)};dt.unstable_batchedUpdates=function(e,t){return e(t)};dt.useFormState=function(e,t,n){return Lr.H.useFormState(e,t,n)};dt.useFormStatus=function(){return Lr.H.useHostTransitionStatus()};dt.version="19.1.0";function yg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yg)}catch(e){console.error(e)}}yg(),vg.exports=dt;var tr=vg.exports;const KS=ag(tr);/**
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 Ie=XS,bg=d,ZS=tr;function M(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 Sg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function xs(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 wg(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 Yh(e){if(xs(e)!==e)throw Error(M(188))}function FS(e){var t=e.alternate;if(!t){if(t=xs(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var r=l.alternate;if(r===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===r.child){for(r=l.child;r;){if(r===n)return Yh(l),e;if(r===a)return Yh(l),t;r=r.sibling}throw Error(M(188))}if(n.return!==a.return)n=l,a=r;else{for(var o=!1,i=l.child;i;){if(i===n){o=!0,n=l,a=r;break}if(i===a){o=!0,a=l,n=r;break}i=i.sibling}if(!o){for(i=r.child;i;){if(i===n){o=!0,n=r,a=l;break}if(i===a){o=!0,a=r,n=l;break}i=i.sibling}if(!o)throw Error(M(189))}}if(n.alternate!==a)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function jg(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=jg(e),t!==null)return t;e=e.sibling}return null}var Ee=Object.assign,WS=Symbol.for("react.element"),Is=Symbol.for("react.transitional.element"),Er=Symbol.for("react.portal"),yl=Symbol.for("react.fragment"),Ng=Symbol.for("react.strict_mode"),Eu=Symbol.for("react.profiler"),JS=Symbol.for("react.provider"),_g=Symbol.for("react.consumer"),En=Symbol.for("react.context"),Kd=Symbol.for("react.forward_ref"),Tu=Symbol.for("react.suspense"),Cu=Symbol.for("react.suspense_list"),Zd=Symbol.for("react.memo"),Fn=Symbol.for("react.lazy"),ku=Symbol.for("react.activity"),ew=Symbol.for("react.memo_cache_sentinel"),Xh=Symbol.iterator;function gr(e){return e===null||typeof e!="object"?null:(e=Xh&&e[Xh]||e["@@iterator"],typeof e=="function"?e:null)}var tw=Symbol.for("react.client.reference");function Au(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===tw?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yl:return"Fragment";case Eu:return"Profiler";case Ng:return"StrictMode";case Tu:return"Suspense";case Cu:return"SuspenseList";case ku:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Er:return"Portal";case En:return(e.displayName||"Context")+".Provider";case _g:return(e._context.displayName||"Context")+".Consumer";case Kd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zd:return t=e.displayName||null,t!==null?t:Au(e.type)||"Memo";case Fn:t=e._payload,e=e._init;try{return Au(e(t))}catch{}}return null}var Tr=Array.isArray,F=bg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe=ZS.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,za={pending:!1,data:null,method:null,action:null},Ru=[],bl=-1;function mn(e){return{current:e}}function Fe(e){0>bl||(e.current=Ru[bl],Ru[bl]=null,bl--)}function Ae(e,t){bl++,Ru[bl]=e.current,e.current=t}var ln=mn(null),Jr=mn(null),oa=mn(null),$o=mn(null);function Bo(e,t){switch(Ae(oa,t),Ae(Jr,e),Ae(ln,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zm(t),e=Gx(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Fe(ln),Ae(ln,e)}function Gl(){Fe(ln),Fe(Jr),Fe(oa)}function Mu(e){e.memoizedState!==null&&Ae($o,e);var t=ln.current,n=Gx(t,e.type);t!==n&&(Ae(Jr,e),Ae(ln,n))}function Ho(e){Jr.current===e&&(Fe(ln),Fe(Jr)),$o.current===e&&(Fe($o),cs._currentValue=za)}var Ou=Object.prototype.hasOwnProperty,Fd=Ie.unstable_scheduleCallback,Ec=Ie.unstable_cancelCallback,nw=Ie.unstable_shouldYield,aw=Ie.unstable_requestPaint,rn=Ie.unstable_now,lw=Ie.unstable_getCurrentPriorityLevel,Eg=Ie.unstable_ImmediatePriority,Tg=Ie.unstable_UserBlockingPriority,qo=Ie.unstable_NormalPriority,rw=Ie.unstable_LowPriority,Cg=Ie.unstable_IdlePriority,sw=Ie.log,ow=Ie.unstable_setDisableYieldValue,ys=null,_t=null;function aa(e){if(typeof sw=="function"&&ow(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(ys,e)}catch{}}var Et=Math.clz32?Math.clz32:uw,iw=Math.log,cw=Math.LN2;function uw(e){return e>>>=0,e===0?32:31-(iw(e)/cw|0)|0}var Ps=256,Qs=4194304;function Ra(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 Ci(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,r=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var i=a&134217727;return i!==0?(a=i&~r,a!==0?l=Ra(a):(o&=i,o!==0?l=Ra(o):n||(n=i&~e,n!==0&&(l=Ra(n))))):(i=a&~r,i!==0?l=Ra(i):o!==0?l=Ra(o):n||(n=a&~e,n!==0&&(l=Ra(n)))),l===0?0:t!==0&&t!==l&&!(t&r)&&(r=l&-l,n=t&-t,r>=n||r===32&&(n&4194048)!==0)?t:l}function bs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dw(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 kg(){var e=Ps;return Ps<<=1,!(Ps&4194048)&&(Ps=256),e}function Ag(){var e=Qs;return Qs<<=1,!(Qs&62914560)&&(Qs=4194304),e}function Tc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ss(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fw(e,t,n,a,l,r){var o=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 i=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=o&~n;0<n;){var f=31-Et(n),h=1<<f;i[f]=0,c[f]=-1;var m=u[f];if(m!==null)for(u[f]=null,f=0;f<m.length;f++){var g=m[f];g!==null&&(g.lane&=-536870913)}n&=~h}a!==0&&Rg(e,a,0),r!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=r&~(o&~t))}function Rg(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Et(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&4194090}function Mg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Et(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function Wd(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 Jd(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Og(){var e=pe.p;return e!==0?e:(e=window.event,e===void 0?32:Wx(e.type))}function hw(e,t){var n=pe.p;try{return pe.p=e,t()}finally{pe.p=n}}var wa=Math.random().toString(36).slice(2),rt="__reactFiber$"+wa,vt="__reactProps$"+wa,nr="__reactContainer$"+wa,Du="__reactEvents$"+wa,mw="__reactListeners$"+wa,pw="__reactHandles$"+wa,Ih="__reactResources$"+wa,ws="__reactMarker$"+wa;function ef(e){delete e[rt],delete e[vt],delete e[Du],delete e[mw],delete e[pw]}function Sl(e){var t=e[rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nr]||n[rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Jm(e);e!==null;){if(n=e[rt])return n;e=Jm(e)}return t}e=n,n=e.parentNode}return null}function ar(e){if(e=e[rt]||e[nr]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Cr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(M(33))}function Ml(e){var t=e[Ih];return t||(t=e[Ih]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[ws]=!0}var Dg=new Set,zg={};function Ja(e,t){Vl(e,t),Vl(e+"Capture",t)}function Vl(e,t){for(zg[e]=t,e=0;e<t.length;e++)Dg.add(t[e])}var gw=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]*$"),Ph={},Qh={};function vw(e){return Ou.call(Qh,e)?!0:Ou.call(Ph,e)?!1:gw.test(e)?Qh[e]=!0:(Ph[e]=!0,!1)}function xo(e,t,n){if(vw(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 Ks(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 yn(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 Cc,Kh;function gl(e){if(Cc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Cc=t&&t[1]||"",Kh=-1<n.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Cc+e+Kh}var kc=!1;function Ac(e,t){if(!e||kc)return"";kc=!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 l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=a.DetermineComponentFrameRoot(),o=r[0],i=r[1];if(o&&i){var c=o.split(`
44
+ `),u=i.split(`
45
+ `);for(l=a=0;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;for(;l<u.length&&!u[l].includes("DetermineComponentFrameRoot");)l++;if(a===c.length||l===u.length)for(a=c.length-1,l=u.length-1;1<=a&&0<=l&&c[a]!==u[l];)l--;for(;1<=a&&0<=l;a--,l--)if(c[a]!==u[l]){if(a!==1||l!==1)do if(a--,l--,0>l||c[a]!==u[l]){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<=l);break}}}finally{kc=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?gl(n):""}function xw(e){switch(e.tag){case 26:case 27:case 5:return gl(e.type);case 16:return gl("Lazy");case 13:return gl("Suspense");case 19:return gl("SuspenseList");case 0:case 15:return Ac(e.type,!1);case 11:return Ac(e.type.render,!1);case 1:return Ac(e.type,!0);case 31:return gl("Activity");default:return""}}function Zh(e){try{var t="";do t+=xw(e),e=e.return;while(e);return t}catch(n){return`
47
+ Error generating stack: `+n.message+`
48
+ `+n.stack}}function Ot(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yw(e){var t=Lg(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 l=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){a=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Go(e){e._valueTracker||(e._valueTracker=yw(e))}function Ug(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=Lg(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Vo(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 bw=/[\n"\\]/g;function Lt(e){return e.replace(bw,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zu(e,t,n,a,l,r,o,i){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ot(t)):e.value!==""+Ot(t)&&(e.value=""+Ot(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Lu(e,o,Ot(t)):n!=null?Lu(e,o,Ot(n)):a!=null&&e.removeAttribute("value"),l==null&&r!=null&&(e.defaultChecked=!!r),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.name=""+Ot(i):e.removeAttribute("name")}function $g(e,t,n,a,l,r,o,i){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?""+Ot(n):"",t=t!=null?""+Ot(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=i?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o)}function Lu(e,t,n){t==="number"&&Vo(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ol(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Ot(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Bg(e,t,n){if(t!=null&&(t=""+Ot(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Ot(n):""}function Hg(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(M(92));if(Tr(a)){if(1<a.length)throw Error(M(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Ot(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a)}function Yl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Sw=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 Fh(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||Sw.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function qg(e,t,n){if(t!=null&&typeof t!="object")throw Error(M(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 l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&Fh(e,l,a)}else for(var r in t)t.hasOwnProperty(r)&&Fh(e,r,t[r])}function tf(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 ww=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"]]),jw=/^[\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 yo(e){return jw.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Uu=null;function nf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wl=null,Dl=null;function Wh(e){var t=ar(e);if(t&&(e=t.stateNode)){var n=e[vt]||null;e:switch(e=t.stateNode,t.type){case"input":if(zu(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="'+Lt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[vt]||null;if(!l)throw Error(M(90));zu(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Ug(a)}break e;case"textarea":Bg(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ol(e,!!n.multiple,t,!1)}}}var Rc=!1;function Gg(e,t,n){if(Rc)return e(t,n);Rc=!0;try{var a=e(t);return a}finally{if(Rc=!1,(wl!==null||Dl!==null)&&($i(),wl&&(t=wl,e=Dl,Dl=wl=null,Wh(t),e)))for(t=0;t<e.length;t++)Wh(e[t])}}function es(e,t){var n=e.stateNode;if(n===null)return null;var a=n[vt]||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(M(231,t,typeof n));return n}var On=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$u=!1;if(On)try{var vr={};Object.defineProperty(vr,"passive",{get:function(){$u=!0}}),window.addEventListener("test",vr,vr),window.removeEventListener("test",vr,vr)}catch{$u=!1}var la=null,af=null,bo=null;function Vg(){if(bo)return bo;var e,t=af,n=t.length,a,l="value"in la?la.value:la.textContent,r=l.length;for(e=0;e<n&&t[e]===l[e];e++);var o=n-e;for(a=1;a<=o&&t[n-a]===l[r-a];a++);return bo=l.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 Zs(){return!0}function Jh(){return!1}function xt(e){function t(n,a,l,r,o){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=r,this.target=o,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(n=e[i],this[i]=n?n(r):r[i]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Zs:Jh,this.isPropagationStopped=Jh,this}return Ee(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=Zs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Zs)},persist:function(){},isPersistent:Zs}),t}var el={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ki=xt(el),js=Ee({},el,{view:0,detail:0}),Nw=xt(js),Mc,Oc,xr,Ai=Ee({},js,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lf,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!==xr&&(xr&&e.type==="mousemove"?(Mc=e.screenX-xr.screenX,Oc=e.screenY-xr.screenY):Oc=Mc=0,xr=e),Mc)},movementY:function(e){return"movementY"in e?e.movementY:Oc}}),em=xt(Ai),_w=Ee({},Ai,{dataTransfer:0}),Ew=xt(_w),Tw=Ee({},js,{relatedTarget:0}),Dc=xt(Tw),Cw=Ee({},el,{animationName:0,elapsedTime:0,pseudoElement:0}),kw=xt(Cw),Aw=Ee({},el,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Rw=xt(Aw),Mw=Ee({},el,{data:0}),tm=xt(Mw),Ow={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dw={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"},zw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zw[e])?!!t[e]:!1}function lf(){return Lw}var Uw=Ee({},js,{key:function(e){if(e.key){var t=Ow[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"?Dw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lf,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}}),$w=xt(Uw),Bw=Ee({},Ai,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nm=xt(Bw),Hw=Ee({},js,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lf}),qw=xt(Hw),Gw=Ee({},el,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vw=xt(Gw),Yw=Ee({},Ai,{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}),Xw=xt(Yw),Iw=Ee({},el,{newState:0,oldState:0}),Pw=xt(Iw),Qw=[9,13,27,32],rf=On&&"CompositionEvent"in window,Ur=null;On&&"documentMode"in document&&(Ur=document.documentMode);var Kw=On&&"TextEvent"in window&&!Ur,Yg=On&&(!rf||Ur&&8<Ur&&11>=Ur),am=" ",lm=!1;function Xg(e,t){switch(e){case"keyup":return Qw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ig(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jl=!1;function Zw(e,t){switch(e){case"compositionend":return Ig(t);case"keypress":return t.which!==32?null:(lm=!0,am);case"textInput":return e=t.data,e===am&&lm?null:e;default:return null}}function Fw(e,t){if(jl)return e==="compositionend"||!rf&&Xg(e,t)?(e=Vg(),bo=af=la=null,jl=!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 Yg&&t.locale!=="ko"?null:t.data;default:return null}}var Ww={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 rm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ww[e.type]:t==="textarea"}function Pg(e,t,n,a){wl?Dl?Dl.push(a):Dl=[a]:wl=a,t=oi(t,"onChange"),0<t.length&&(n=new ki("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var $r=null,ts=null;function Jw(e){Bx(e,0)}function Ri(e){var t=Cr(e);if(Ug(t))return e}function sm(e,t){if(e==="change")return t}var Qg=!1;if(On){var zc;if(On){var Lc="oninput"in document;if(!Lc){var om=document.createElement("div");om.setAttribute("oninput","return;"),Lc=typeof om.oninput=="function"}zc=Lc}else zc=!1;Qg=zc&&(!document.documentMode||9<document.documentMode)}function im(){$r&&($r.detachEvent("onpropertychange",Kg),ts=$r=null)}function Kg(e){if(e.propertyName==="value"&&Ri(ts)){var t=[];Pg(t,ts,e,nf(e)),Gg(Jw,t)}}function ej(e,t,n){e==="focusin"?(im(),$r=t,ts=n,$r.attachEvent("onpropertychange",Kg)):e==="focusout"&&im()}function tj(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ri(ts)}function nj(e,t){if(e==="click")return Ri(t)}function aj(e,t){if(e==="input"||e==="change")return Ri(t)}function lj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var At=typeof Object.is=="function"?Object.is:lj;function ns(e,t){if(At(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 l=n[a];if(!Ou.call(t,l)||!At(e[l],t[l]))return!1}return!0}function cm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function um(e,t){var n=cm(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=cm(n)}}function Zg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vo(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=Vo(e.document)}return t}function sf(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 rj=On&&"documentMode"in document&&11>=document.documentMode,Nl=null,Bu=null,Br=null,Hu=!1;function dm(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hu||Nl==null||Nl!==Vo(a)||(a=Nl,"selectionStart"in a&&sf(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}),Br&&ns(Br,a)||(Br=a,a=oi(Bu,"onSelect"),0<a.length&&(t=new ki("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Nl)))}function ka(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _l={animationend:ka("Animation","AnimationEnd"),animationiteration:ka("Animation","AnimationIteration"),animationstart:ka("Animation","AnimationStart"),transitionrun:ka("Transition","TransitionRun"),transitionstart:ka("Transition","TransitionStart"),transitioncancel:ka("Transition","TransitionCancel"),transitionend:ka("Transition","TransitionEnd")},Uc={},Wg={};On&&(Wg=document.createElement("div").style,"AnimationEvent"in window||(delete _l.animationend.animation,delete _l.animationiteration.animation,delete _l.animationstart.animation),"TransitionEvent"in window||delete _l.transitionend.transition);function tl(e){if(Uc[e])return Uc[e];if(!_l[e])return e;var t=_l[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Wg)return Uc[e]=t[n];return e}var Jg=tl("animationend"),ev=tl("animationiteration"),tv=tl("animationstart"),sj=tl("transitionrun"),oj=tl("transitionstart"),ij=tl("transitioncancel"),nv=tl("transitionend"),av=new Map,qu="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(" ");qu.push("scrollEnd");function Ft(e,t){av.set(e,t),Ja(t,[e])}var fm=new WeakMap;function Ut(e,t){if(typeof e=="object"&&e!==null){var n=fm.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Zh(t)},fm.set(e,t),t)}return{value:e,source:t,stack:Zh(t)}}var Mt=[],El=0,of=0;function Mi(){for(var e=El,t=of=El=0;t<e;){var n=Mt[t];Mt[t++]=null;var a=Mt[t];Mt[t++]=null;var l=Mt[t];Mt[t++]=null;var r=Mt[t];if(Mt[t++]=null,a!==null&&l!==null){var o=a.pending;o===null?l.next=l:(l.next=o.next,o.next=l),a.pending=l}r!==0&&lv(n,l,r)}}function Oi(e,t,n,a){Mt[El++]=e,Mt[El++]=t,Mt[El++]=n,Mt[El++]=a,of|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function cf(e,t,n,a){return Oi(e,t,n,a),Yo(e)}function lr(e,t){return Oi(e,null,null,t),Yo(e)}function lv(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!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||(l=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,l&&t!==null&&(l=31-Et(n),e=r.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),r):null}function Yo(e){if(50<Kr)throw Kr=0,id=null,Error(M(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Tl={};function cj(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 Nt(e,t,n,a){return new cj(e,t,n,a)}function uf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Rn(e,t){var n=e.alternate;return n===null?(n=Nt(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 rv(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 wo(e,t,n,a,l,r){var o=0;if(a=e,typeof e=="function")uf(e)&&(o=1);else if(typeof e=="string")o=dN(e,n,ln.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ku:return e=Nt(31,n,t,l),e.elementType=ku,e.lanes=r,e;case yl:return La(n.children,l,r,t);case Ng:o=8,l|=24;break;case Eu:return e=Nt(12,n,t,l|2),e.elementType=Eu,e.lanes=r,e;case Tu:return e=Nt(13,n,t,l),e.elementType=Tu,e.lanes=r,e;case Cu:return e=Nt(19,n,t,l),e.elementType=Cu,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case JS:case En:o=10;break e;case _g:o=9;break e;case Kd:o=11;break e;case Zd:o=14;break e;case Fn:o=16,a=null;break e}o=29,n=Error(M(130,e===null?"null":typeof e,"")),a=null}return t=Nt(o,n,t,l),t.elementType=e,t.type=a,t.lanes=r,t}function La(e,t,n,a){return e=Nt(7,e,a,t),e.lanes=n,e}function $c(e,t,n){return e=Nt(6,e,null,t),e.lanes=n,e}function Bc(e,t,n){return t=Nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Cl=[],kl=0,Xo=null,Io=0,Dt=[],zt=0,Ua=null,Tn=1,Cn="";function Ma(e,t){Cl[kl++]=Io,Cl[kl++]=Xo,Xo=e,Io=t}function sv(e,t,n){Dt[zt++]=Tn,Dt[zt++]=Cn,Dt[zt++]=Ua,Ua=e;var a=Tn;e=Cn;var l=32-Et(a)-1;a&=~(1<<l),n+=1;var r=32-Et(t)+l;if(30<r){var o=l-l%5;r=(a&(1<<o)-1).toString(32),a>>=o,l-=o,Tn=1<<32-Et(t)+l|n<<l|a,Cn=r+e}else Tn=1<<r|n<<l|a,Cn=e}function df(e){e.return!==null&&(Ma(e,1),sv(e,1,0))}function ff(e){for(;e===Xo;)Xo=Cl[--kl],Cl[kl]=null,Io=Cl[--kl],Cl[kl]=null;for(;e===Ua;)Ua=Dt[--zt],Dt[zt]=null,Cn=Dt[--zt],Dt[zt]=null,Tn=Dt[--zt],Dt[zt]=null}var ct=null,Ue=null,me=!1,$a=null,en=!1,Gu=Error(M(519));function Ga(e){var t=Error(M(418,""));throw as(Ut(t,e)),Gu}function hm(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[rt]=e,t[vt]=a,n){case"dialog":se("cancel",t),se("close",t);break;case"iframe":case"object":case"embed":se("load",t);break;case"video":case"audio":for(n=0;n<ss.length;n++)se(ss[n],t);break;case"source":se("error",t);break;case"img":case"image":case"link":se("error",t),se("load",t);break;case"details":se("toggle",t);break;case"input":se("invalid",t),$g(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),Go(t);break;case"select":se("invalid",t);break;case"textarea":se("invalid",t),Hg(t,a.value,a.defaultValue,a.children),Go(t)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||qx(t.textContent,n)?(a.popover!=null&&(se("beforetoggle",t),se("toggle",t)),a.onScroll!=null&&se("scroll",t),a.onScrollEnd!=null&&se("scrollend",t),a.onClick!=null&&(t.onclick=qi),t=!0):t=!1,t||Ga(e)}function mm(e){for(ct=e.return;ct;)switch(ct.tag){case 5:case 13:en=!1;return;case 27:case 3:en=!0;return;default:ct=ct.return}}function yr(e){if(e!==ct)return!1;if(!me)return mm(e),me=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||md(e.type,e.memoizedProps)),n=!n),n&&Ue&&Ga(e),mm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){Ue=Xt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Ue=null}}else t===27?(t=Ue,ja(e.type)?(e=vd,vd=null,Ue=e):Ue=t):Ue=ct?Xt(e.stateNode.nextSibling):null;return!0}function Ns(){Ue=ct=null,me=!1}function pm(){var e=$a;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),$a=null),e}function as(e){$a===null?$a=[e]:$a.push(e)}var Vu=mn(null),nl=null,kn=null;function Jn(e,t,n){Ae(Vu,t._currentValue),t._currentValue=n}function Mn(e){e._currentValue=Vu.current,Fe(Vu)}function Yu(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 Xu(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var r=l.dependencies;if(r!==null){var o=l.child;r=r.firstContext;e:for(;r!==null;){var i=r;r=l;for(var c=0;c<t.length;c++)if(i.context===t[c]){r.lanes|=n,i=r.alternate,i!==null&&(i.lanes|=n),Yu(r.return,n,e),a||(o=null);break e}r=i.next}}else if(l.tag===18){if(o=l.return,o===null)throw Error(M(341));o.lanes|=n,r=o.alternate,r!==null&&(r.lanes|=n),Yu(o,n,e),o=null}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===e){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}}function _s(e,t,n,a){e=null;for(var l=t,r=!1;l!==null;){if(!r){if(l.flags&524288)r=!0;else if(l.flags&262144)break}if(l.tag===10){var o=l.alternate;if(o===null)throw Error(M(387));if(o=o.memoizedProps,o!==null){var i=l.type;At(l.pendingProps.value,o.value)||(e!==null?e.push(i):e=[i])}}else if(l===$o.current){if(o=l.alternate,o===null)throw Error(M(387));o.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(cs):e=[cs])}l=l.return}e!==null&&Xu(t,e,n,a),t.flags|=262144}function Po(e){for(e=e.firstContext;e!==null;){if(!At(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Va(e){nl=e,kn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function st(e){return ov(nl,e)}function Fs(e,t){return nl===null&&Va(e),ov(e,t)}function ov(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},kn===null){if(e===null)throw Error(M(308));kn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else kn=kn.next=t;return n}var uj=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()})}},dj=Ie.unstable_scheduleCallback,fj=Ie.unstable_NormalPriority,Ye={$$typeof:En,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hf(){return{controller:new uj,data:new Map,refCount:0}}function Es(e){e.refCount--,e.refCount===0&&dj(fj,function(){e.controller.abort()})}var Hr=null,Iu=0,Xl=0,zl=null;function hj(e,t){if(Hr===null){var n=Hr=[];Iu=0,Xl=Lf(),zl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Iu++,t.then(gm,gm),t}function gm(){if(--Iu===0&&Hr!==null){zl!==null&&(zl.status="fulfilled");var e=Hr;Hr=null,Xl=0,zl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function mj(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var vm=F.S;F.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&hj(e,t),vm!==null&&vm(e,t)};var Ba=mn(null);function mf(){var e=Ba.current;return e!==null?e:_e.pooledCache}function jo(e,t){t===null?Ae(Ba,Ba.current):Ae(Ba,t.pool)}function iv(){var e=mf();return e===null?null:{parent:Ye._currentValue,pool:e}}var Ts=Error(M(460)),cv=Error(M(474)),Di=Error(M(542)),Pu={then:function(){}};function xm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ws(){}function uv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ws,Ws),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bm(e),e;default:if(typeof t.status=="string")t.then(Ws,Ws);else{if(e=_e,e!==null&&100<e.shellSuspendCounter)throw Error(M(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bm(e),e}throw qr=t,Ts}}var qr=null;function ym(){if(qr===null)throw Error(M(459));var e=qr;return qr=null,e}function bm(e){if(e===Ts||e===Di)throw Error(M(483))}var Wn=!1;function pf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qu(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 ia(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ca(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,xe&2){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Yo(e),lv(e,null,n),t}return Oi(e,a,t,n),Yo(e)}function Gr(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,Mg(e,n)}}function Hc(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?l=r=o:r=r.next=o,n=n.next}while(n!==null);r===null?l=r=t:r=r.next=t}else l=r=t;n={baseState:a.baseState,firstBaseUpdate:l,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 Ku=!1;function Vr(){if(Ku){var e=zl;if(e!==null)throw e}}function Yr(e,t,n,a){Ku=!1;var l=e.updateQueue;Wn=!1;var r=l.firstBaseUpdate,o=l.lastBaseUpdate,i=l.shared.pending;if(i!==null){l.shared.pending=null;var c=i,u=c.next;c.next=null,o===null?r=u:o.next=u,o=c;var f=e.alternate;f!==null&&(f=f.updateQueue,i=f.lastBaseUpdate,i!==o&&(i===null?f.firstBaseUpdate=u:i.next=u,f.lastBaseUpdate=c))}if(r!==null){var h=l.baseState;o=0,f=u=c=null,i=r;do{var m=i.lane&-536870913,g=m!==i.lane;if(g?(de&m)===m:(a&m)===m){m!==0&&m===Xl&&(Ku=!0),f!==null&&(f=f.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var w=e,y=i;m=t;var S=n;switch(y.tag){case 1:if(w=y.payload,typeof w=="function"){h=w.call(S,h,m);break e}h=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=y.payload,m=typeof w=="function"?w.call(S,h,m):w,m==null)break e;h=Ee({},h,m);break e;case 2:Wn=!0}}m=i.callback,m!==null&&(e.flags|=64,g&&(e.flags|=8192),g=l.callbacks,g===null?l.callbacks=[m]:g.push(m))}else g={lane:m,tag:i.tag,payload:i.payload,callback:i.callback,next:null},f===null?(u=f=g,c=h):f=f.next=g,o|=m;if(i=i.next,i===null){if(i=l.shared.pending,i===null)break;g=i,i=g.next,g.next=null,l.lastBaseUpdate=g,l.shared.pending=null}}while(!0);f===null&&(c=h),l.baseState=c,l.firstBaseUpdate=u,l.lastBaseUpdate=f,r===null&&(l.shared.lanes=0),xa|=o,e.lanes=o,e.memoizedState=h}}function dv(e,t){if(typeof e!="function")throw Error(M(191,e));e.call(t)}function fv(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)dv(n[e],t)}var Il=mn(null),Qo=mn(0);function Sm(e,t){e=Ln,Ae(Qo,e),Ae(Il,t),Ln=e|t.baseLanes}function Zu(){Ae(Qo,Ln),Ae(Il,Il.current)}function gf(){Ln=Qo.current,Fe(Il),Fe(Qo)}var ga=0,re=null,we=null,qe=null,Ko=!1,Ll=!1,Ya=!1,Zo=0,ls=0,Ul=null,pj=0;function Be(){throw Error(M(321))}function vf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!At(e[n],t[n]))return!1;return!0}function xf(e,t,n,a,l,r){return ga=r,re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Vv:Yv,Ya=!1,r=n(a,l),Ya=!1,Ll&&(r=mv(t,n,a,l)),hv(e),r}function hv(e){F.H=Fo;var t=we!==null&&we.next!==null;if(ga=0,qe=we=re=null,Ko=!1,ls=0,Ul=null,t)throw Error(M(300));e===null||Ze||(e=e.dependencies,e!==null&&Po(e)&&(Ze=!0))}function mv(e,t,n,a){re=e;var l=0;do{if(Ll&&(Ul=null),ls=0,Ll=!1,25<=l)throw Error(M(301));if(l+=1,qe=we=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}F.H=wj,r=t(n,a)}while(Ll);return r}function gj(){var e=F.H,t=e.useState()[0];return t=typeof t.then=="function"?Cs(t):t,e=e.useState()[0],(we!==null?we.memoizedState:null)!==e&&(re.flags|=1024),t}function yf(){var e=Zo!==0;return Zo=0,e}function bf(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Sf(e){if(Ko){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ko=!1}ga=0,qe=we=re=null,Ll=!1,ls=Zo=0,Ul=null}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?re.memoizedState=qe=e:qe=qe.next=e,qe}function Ge(){if(we===null){var e=re.alternate;e=e!==null?e.memoizedState:null}else e=we.next;var t=qe===null?re.memoizedState:qe.next;if(t!==null)qe=t,we=e;else{if(e===null)throw re.alternate===null?Error(M(467)):Error(M(310));we=e,e={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},qe===null?re.memoizedState=qe=e:qe=qe.next=e}return qe}function wf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Cs(e){var t=ls;return ls+=1,Ul===null&&(Ul=[]),e=uv(Ul,e,t),t=re,(qe===null?t.memoizedState:qe.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Vv:Yv),e}function zi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Cs(e);if(e.$$typeof===En)return st(e)}throw Error(M(438,String(e)))}function jf(e){var t=null,n=re.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=re.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=wf(),re.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]=ew;return t.index++,n}function Dn(e,t){return typeof t=="function"?t(e):t}function No(e){var t=Ge();return Nf(t,we,e)}function Nf(e,t,n){var a=e.queue;if(a===null)throw Error(M(311));a.lastRenderedReducer=n;var l=e.baseQueue,r=a.pending;if(r!==null){if(l!==null){var o=l.next;l.next=r.next,r.next=o}t.baseQueue=l=r,a.pending=null}if(r=e.baseState,l===null)e.memoizedState=r;else{t=l.next;var i=o=null,c=null,u=t,f=!1;do{var h=u.lane&-536870913;if(h!==u.lane?(de&h)===h:(ga&h)===h){var m=u.revertLane;if(m===0)c!==null&&(c=c.next={lane:0,revertLane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),h===Xl&&(f=!0);else if((ga&m)===m){u=u.next,m===Xl&&(f=!0);continue}else h={lane:0,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(i=c=h,o=r):c=c.next=h,re.lanes|=m,xa|=m;h=u.action,Ya&&n(r,h),r=u.hasEagerState?u.eagerState:n(r,h)}else m={lane:h,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(i=c=m,o=r):c=c.next=m,re.lanes|=h,xa|=h;u=u.next}while(u!==null&&u!==t);if(c===null?o=r:c.next=i,!At(r,e.memoizedState)&&(Ze=!0,f&&(n=zl,n!==null)))throw n;e.memoizedState=r,e.baseState=o,e.baseQueue=c,a.lastRenderedState=r}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function qc(e){var t=Ge(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,r=t.memoizedState;if(l!==null){n.pending=null;var o=l=l.next;do r=e(r,o.action),o=o.next;while(o!==l);At(r,t.memoizedState)||(Ze=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,a]}function pv(e,t,n){var a=re,l=Ge(),r=me;if(r){if(n===void 0)throw Error(M(407));n=n()}else n=t();var o=!At((we||l).memoizedState,n);o&&(l.memoizedState=n,Ze=!0),l=l.queue;var i=xv.bind(null,a,l,e);if(ks(2048,8,i,[e]),l.getSnapshot!==t||o||qe!==null&&qe.memoizedState.tag&1){if(a.flags|=2048,Pl(9,Li(),vv.bind(null,a,l,n,t),null),_e===null)throw Error(M(349));r||ga&124||gv(a,t,n)}return n}function gv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=re.updateQueue,t===null?(t=wf(),re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vv(e,t,n,a){t.value=n,t.getSnapshot=a,yv(t)&&bv(e)}function xv(e,t,n){return n(function(){yv(t)&&bv(e)})}function yv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!At(e,n)}catch{return!0}}function bv(e){var t=lr(e,2);t!==null&&Ct(t,e,2)}function Fu(e){var t=mt();if(typeof e=="function"){var n=e;if(e=n(),Ya){aa(!0);try{n()}finally{aa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:e},t}function Sv(e,t,n,a){return e.baseState=n,Nf(e,we,typeof a=="function"?a:Dn)}function vj(e,t,n,a,l){if(Ui(e))throw Error(M(485));if(e=t.action,e!==null){var r={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){r.listeners.push(o)}};F.T!==null?n(!0):r.isTransition=!1,a(r),n=t.pending,n===null?(r.next=t.pending=r,wv(t,r)):(r.next=n.next,t.pending=n.next=r)}}function wv(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var r=F.T,o={};F.T=o;try{var i=n(l,a),c=F.S;c!==null&&c(o,i),wm(e,t,i)}catch(u){Wu(e,t,u)}finally{F.T=r}}else try{r=n(l,a),wm(e,t,r)}catch(u){Wu(e,t,u)}}function wm(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){jm(e,t,a)},function(a){return Wu(e,t,a)}):jm(e,t,n)}function jm(e,t,n){t.status="fulfilled",t.value=n,jv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,wv(e,n)))}function Wu(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,jv(t),t=t.next;while(t!==a)}e.action=null}function jv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Nv(e,t){return t}function Nm(e,t){if(me){var n=_e.formState;if(n!==null){e:{var a=re;if(me){if(Ue){t:{for(var l=Ue,r=en;l.nodeType!==8;){if(!r){l=null;break t}if(l=Xt(l.nextSibling),l===null){l=null;break t}}r=l.data,l=r==="F!"||r==="F"?l:null}if(l){Ue=Xt(l.nextSibling),a=l.data==="F!";break e}}Ga(a)}a=!1}a&&(t=n[0])}}return n=mt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nv,lastRenderedState:t},n.queue=a,n=Hv.bind(null,re,a),a.dispatch=n,a=Fu(!1),r=Cf.bind(null,re,!1,a.queue),a=mt(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=vj.bind(null,re,l,r,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function _m(e){var t=Ge();return _v(t,we,e)}function _v(e,t,n){if(t=Nf(e,t,Nv)[0],e=No(Dn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Cs(t)}catch(o){throw o===Ts?Di:o}else a=t;t=Ge();var l=t.queue,r=l.dispatch;return n!==t.memoizedState&&(re.flags|=2048,Pl(9,Li(),xj.bind(null,l,n),null)),[a,r,e]}function xj(e,t){e.action=t}function Em(e){var t=Ge(),n=we;if(n!==null)return _v(t,n,e);Ge(),t=t.memoizedState,n=Ge();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Pl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=re.updateQueue,t===null&&(t=wf(),re.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 Li(){return{destroy:void 0,resource:void 0}}function Ev(){return Ge().memoizedState}function _o(e,t,n,a){var l=mt();a=a===void 0?null:a,re.flags|=e,l.memoizedState=Pl(1|t,Li(),n,a)}function ks(e,t,n,a){var l=Ge();a=a===void 0?null:a;var r=l.memoizedState.inst;we!==null&&a!==null&&vf(a,we.memoizedState.deps)?l.memoizedState=Pl(t,r,n,a):(re.flags|=e,l.memoizedState=Pl(1|t,r,n,a))}function Tm(e,t){_o(8390656,8,e,t)}function Tv(e,t){ks(2048,8,e,t)}function Cv(e,t){return ks(4,2,e,t)}function kv(e,t){return ks(4,4,e,t)}function Av(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 Rv(e,t,n){n=n!=null?n.concat([e]):null,ks(4,4,Av.bind(null,t,e),n)}function _f(){}function Mv(e,t){var n=Ge();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&vf(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Ov(e,t){var n=Ge();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&vf(t,a[1]))return a[0];if(a=e(),Ya){aa(!0);try{e()}finally{aa(!1)}}return n.memoizedState=[a,t],a}function Ef(e,t,n){return n===void 0||ga&1073741824?e.memoizedState=t:(e.memoizedState=n,e=jx(),re.lanes|=e,xa|=e,n)}function Dv(e,t,n,a){return At(n,t)?n:Il.current!==null?(e=Ef(e,n,a),At(e,t)||(Ze=!0),e):ga&42?(e=jx(),re.lanes|=e,xa|=e,t):(Ze=!0,e.memoizedState=n)}function zv(e,t,n,a,l){var r=pe.p;pe.p=r!==0&&8>r?r:8;var o=F.T,i={};F.T=i,Cf(e,!1,t,n);try{var c=l(),u=F.S;if(u!==null&&u(i,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=mj(c,a);Xr(e,t,f,Tt(e))}else Xr(e,t,a,Tt(e))}catch(h){Xr(e,t,{then:function(){},status:"rejected",reason:h},Tt())}finally{pe.p=r,F.T=o}}function yj(){}function Ju(e,t,n,a){if(e.tag!==5)throw Error(M(476));var l=Lv(e).queue;zv(e,l,t,za,n===null?yj:function(){return Uv(e),n(a)})}function Lv(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:za,baseState:za,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:za},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Uv(e){var t=Lv(e).next.queue;Xr(e,t,{},Tt())}function Tf(){return st(cs)}function $v(){return Ge().memoizedState}function Bv(){return Ge().memoizedState}function bj(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Tt();e=ia(n);var a=ca(t,e,n);a!==null&&(Ct(a,t,n),Gr(a,t,n)),t={cache:hf()},e.payload=t;return}t=t.return}}function Sj(e,t,n){var a=Tt();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Ui(e)?qv(t,n):(n=cf(e,t,n,a),n!==null&&(Ct(n,e,a),Gv(n,t,a)))}function Hv(e,t,n){var a=Tt();Xr(e,t,n,a)}function Xr(e,t,n,a){var l={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ui(e))qv(t,l);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var o=t.lastRenderedState,i=r(o,n);if(l.hasEagerState=!0,l.eagerState=i,At(i,o))return Oi(e,t,l,0),_e===null&&Mi(),!1}catch{}finally{}if(n=cf(e,t,l,a),n!==null)return Ct(n,e,a),Gv(n,t,a),!0}return!1}function Cf(e,t,n,a){if(a={lane:2,revertLane:Lf(),action:a,hasEagerState:!1,eagerState:null,next:null},Ui(e)){if(t)throw Error(M(479))}else t=cf(e,n,a,2),t!==null&&Ct(t,e,2)}function Ui(e){var t=e.alternate;return e===re||t!==null&&t===re}function qv(e,t){Ll=Ko=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Gv(e,t,n){if(n&4194048){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Mg(e,n)}}var Fo={readContext:st,use:zi,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useLayoutEffect:Be,useInsertionEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useSyncExternalStore:Be,useId:Be,useHostTransitionStatus:Be,useFormState:Be,useActionState:Be,useOptimistic:Be,useMemoCache:Be,useCacheRefresh:Be},Vv={readContext:st,use:zi,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Tm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,_o(4194308,4,Av.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _o(4194308,4,e,t)},useInsertionEffect:function(e,t){_o(4,2,e,t)},useMemo:function(e,t){var n=mt();t=t===void 0?null:t;var a=e();if(Ya){aa(!0);try{e()}finally{aa(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=mt();if(n!==void 0){var l=n(t);if(Ya){aa(!0);try{n(t)}finally{aa(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=Sj.bind(null,re,e),[a.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Fu(e);var t=e.queue,n=Hv.bind(null,re,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_f,useDeferredValue:function(e,t){var n=mt();return Ef(n,e,t)},useTransition:function(){var e=Fu(!1);return e=zv.bind(null,re,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=re,l=mt();if(me){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),_e===null)throw Error(M(349));de&124||gv(a,t,n)}l.memoizedState=n;var r={value:n,getSnapshot:t};return l.queue=r,Tm(xv.bind(null,a,r,e),[e]),a.flags|=2048,Pl(9,Li(),vv.bind(null,a,r,n,t),null),n},useId:function(){var e=mt(),t=_e.identifierPrefix;if(me){var n=Cn,a=Tn;n=(a&~(1<<32-Et(a)-1)).toString(32)+n,t="«"+t+"R"+n,n=Zo++,0<n&&(t+="H"+n.toString(32)),t+="»"}else n=pj++,t="«"+t+"r"+n.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Tf,useFormState:Nm,useActionState:Nm,useOptimistic:function(e){var t=mt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Cf.bind(null,re,!0,n),n.dispatch=t,[e,t]},useMemoCache:jf,useCacheRefresh:function(){return mt().memoizedState=bj.bind(null,re)}},Yv={readContext:st,use:zi,useCallback:Mv,useContext:st,useEffect:Tv,useImperativeHandle:Rv,useInsertionEffect:Cv,useLayoutEffect:kv,useMemo:Ov,useReducer:No,useRef:Ev,useState:function(){return No(Dn)},useDebugValue:_f,useDeferredValue:function(e,t){var n=Ge();return Dv(n,we.memoizedState,e,t)},useTransition:function(){var e=No(Dn)[0],t=Ge().memoizedState;return[typeof e=="boolean"?e:Cs(e),t]},useSyncExternalStore:pv,useId:$v,useHostTransitionStatus:Tf,useFormState:_m,useActionState:_m,useOptimistic:function(e,t){var n=Ge();return Sv(n,we,e,t)},useMemoCache:jf,useCacheRefresh:Bv},wj={readContext:st,use:zi,useCallback:Mv,useContext:st,useEffect:Tv,useImperativeHandle:Rv,useInsertionEffect:Cv,useLayoutEffect:kv,useMemo:Ov,useReducer:qc,useRef:Ev,useState:function(){return qc(Dn)},useDebugValue:_f,useDeferredValue:function(e,t){var n=Ge();return we===null?Ef(n,e,t):Dv(n,we.memoizedState,e,t)},useTransition:function(){var e=qc(Dn)[0],t=Ge().memoizedState;return[typeof e=="boolean"?e:Cs(e),t]},useSyncExternalStore:pv,useId:$v,useHostTransitionStatus:Tf,useFormState:Em,useActionState:Em,useOptimistic:function(e,t){var n=Ge();return we!==null?Sv(n,we,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:jf,useCacheRefresh:Bv},$l=null,rs=0;function Js(e){var t=rs;return rs+=1,$l===null&&($l=[]),uv($l,e,t)}function br(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function eo(e,t){throw t.$$typeof===WS?Error(M(525)):(e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Cm(e){var t=e._init;return t(e._payload)}function Xv(e){function t(v,p){if(e){var x=v.deletions;x===null?(v.deletions=[p],v.flags|=16):x.push(p)}}function n(v,p){if(!e)return null;for(;p!==null;)t(v,p),p=p.sibling;return null}function a(v){for(var p=new Map;v!==null;)v.key!==null?p.set(v.key,v):p.set(v.index,v),v=v.sibling;return p}function l(v,p){return v=Rn(v,p),v.index=0,v.sibling=null,v}function r(v,p,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<p?(v.flags|=67108866,p):x):(v.flags|=67108866,p)):(v.flags|=1048576,p)}function o(v){return e&&v.alternate===null&&(v.flags|=67108866),v}function i(v,p,x,b){return p===null||p.tag!==6?(p=$c(x,v.mode,b),p.return=v,p):(p=l(p,x),p.return=v,p)}function c(v,p,x,b){var j=x.type;return j===yl?f(v,p,x.props.children,b,x.key):p!==null&&(p.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Fn&&Cm(j)===p.type)?(p=l(p,x.props),br(p,x),p.return=v,p):(p=wo(x.type,x.key,x.props,null,v.mode,b),br(p,x),p.return=v,p)}function u(v,p,x,b){return p===null||p.tag!==4||p.stateNode.containerInfo!==x.containerInfo||p.stateNode.implementation!==x.implementation?(p=Bc(x,v.mode,b),p.return=v,p):(p=l(p,x.children||[]),p.return=v,p)}function f(v,p,x,b,j){return p===null||p.tag!==7?(p=La(x,v.mode,b,j),p.return=v,p):(p=l(p,x),p.return=v,p)}function h(v,p,x){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return p=$c(""+p,v.mode,x),p.return=v,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Is:return x=wo(p.type,p.key,p.props,null,v.mode,x),br(x,p),x.return=v,x;case Er:return p=Bc(p,v.mode,x),p.return=v,p;case Fn:var b=p._init;return p=b(p._payload),h(v,p,x)}if(Tr(p)||gr(p))return p=La(p,v.mode,x,null),p.return=v,p;if(typeof p.then=="function")return h(v,Js(p),x);if(p.$$typeof===En)return h(v,Fs(v,p),x);eo(v,p)}return null}function m(v,p,x,b){var j=p!==null?p.key:null;if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return j!==null?null:i(v,p,""+x,b);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Is:return x.key===j?c(v,p,x,b):null;case Er:return x.key===j?u(v,p,x,b):null;case Fn:return j=x._init,x=j(x._payload),m(v,p,x,b)}if(Tr(x)||gr(x))return j!==null?null:f(v,p,x,b,null);if(typeof x.then=="function")return m(v,p,Js(x),b);if(x.$$typeof===En)return m(v,p,Fs(v,x),b);eo(v,x)}return null}function g(v,p,x,b,j){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return v=v.get(x)||null,i(p,v,""+b,j);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Is:return v=v.get(b.key===null?x:b.key)||null,c(p,v,b,j);case Er:return v=v.get(b.key===null?x:b.key)||null,u(p,v,b,j);case Fn:var k=b._init;return b=k(b._payload),g(v,p,x,b,j)}if(Tr(b)||gr(b))return v=v.get(x)||null,f(p,v,b,j,null);if(typeof b.then=="function")return g(v,p,x,Js(b),j);if(b.$$typeof===En)return g(v,p,x,Fs(p,b),j);eo(p,b)}return null}function w(v,p,x,b){for(var j=null,k=null,N=p,_=p=0,D=null;N!==null&&_<x.length;_++){N.index>_?(D=N,N=null):D=N.sibling;var A=m(v,N,x[_],b);if(A===null){N===null&&(N=D);break}e&&N&&A.alternate===null&&t(v,N),p=r(A,p,_),k===null?j=A:k.sibling=A,k=A,N=D}if(_===x.length)return n(v,N),me&&Ma(v,_),j;if(N===null){for(;_<x.length;_++)N=h(v,x[_],b),N!==null&&(p=r(N,p,_),k===null?j=N:k.sibling=N,k=N);return me&&Ma(v,_),j}for(N=a(N);_<x.length;_++)D=g(N,v,_,x[_],b),D!==null&&(e&&D.alternate!==null&&N.delete(D.key===null?_:D.key),p=r(D,p,_),k===null?j=D:k.sibling=D,k=D);return e&&N.forEach(function(O){return t(v,O)}),me&&Ma(v,_),j}function y(v,p,x,b){if(x==null)throw Error(M(151));for(var j=null,k=null,N=p,_=p=0,D=null,A=x.next();N!==null&&!A.done;_++,A=x.next()){N.index>_?(D=N,N=null):D=N.sibling;var O=m(v,N,A.value,b);if(O===null){N===null&&(N=D);break}e&&N&&O.alternate===null&&t(v,N),p=r(O,p,_),k===null?j=O:k.sibling=O,k=O,N=D}if(A.done)return n(v,N),me&&Ma(v,_),j;if(N===null){for(;!A.done;_++,A=x.next())A=h(v,A.value,b),A!==null&&(p=r(A,p,_),k===null?j=A:k.sibling=A,k=A);return me&&Ma(v,_),j}for(N=a(N);!A.done;_++,A=x.next())A=g(N,v,_,A.value,b),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?_:A.key),p=r(A,p,_),k===null?j=A:k.sibling=A,k=A);return e&&N.forEach(function(H){return t(v,H)}),me&&Ma(v,_),j}function S(v,p,x,b){if(typeof x=="object"&&x!==null&&x.type===yl&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Is:e:{for(var j=x.key;p!==null;){if(p.key===j){if(j=x.type,j===yl){if(p.tag===7){n(v,p.sibling),b=l(p,x.props.children),b.return=v,v=b;break e}}else if(p.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Fn&&Cm(j)===p.type){n(v,p.sibling),b=l(p,x.props),br(b,x),b.return=v,v=b;break e}n(v,p);break}else t(v,p);p=p.sibling}x.type===yl?(b=La(x.props.children,v.mode,b,x.key),b.return=v,v=b):(b=wo(x.type,x.key,x.props,null,v.mode,b),br(b,x),b.return=v,v=b)}return o(v);case Er:e:{for(j=x.key;p!==null;){if(p.key===j)if(p.tag===4&&p.stateNode.containerInfo===x.containerInfo&&p.stateNode.implementation===x.implementation){n(v,p.sibling),b=l(p,x.children||[]),b.return=v,v=b;break e}else{n(v,p);break}else t(v,p);p=p.sibling}b=Bc(x,v.mode,b),b.return=v,v=b}return o(v);case Fn:return j=x._init,x=j(x._payload),S(v,p,x,b)}if(Tr(x))return w(v,p,x,b);if(gr(x)){if(j=gr(x),typeof j!="function")throw Error(M(150));return x=j.call(x),y(v,p,x,b)}if(typeof x.then=="function")return S(v,p,Js(x),b);if(x.$$typeof===En)return S(v,p,Fs(v,x),b);eo(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,p!==null&&p.tag===6?(n(v,p.sibling),b=l(p,x),b.return=v,v=b):(n(v,p),b=$c(x,v.mode,b),b.return=v,v=b),o(v)):n(v,p)}return function(v,p,x,b){try{rs=0;var j=S(v,p,x,b);return $l=null,j}catch(N){if(N===Ts||N===Di)throw N;var k=Nt(29,N,null,v.mode);return k.lanes=b,k.return=v,k}finally{}}}var Ql=Xv(!0),Iv=Xv(!1),Ht=mn(null),sn=null;function ea(e){var t=e.alternate;Ae(Xe,Xe.current&1),Ae(Ht,e),sn===null&&(t===null||Il.current!==null||t.memoizedState!==null)&&(sn=e)}function Pv(e){if(e.tag===22){if(Ae(Xe,Xe.current),Ae(Ht,e),sn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(sn=e)}}else ta()}function ta(){Ae(Xe,Xe.current),Ae(Ht,Ht.current)}function An(e){Fe(Ht),sn===e&&(sn=null),Fe(Xe)}var Xe=mn(0);function Wo(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==="$?"||gd(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 Gc(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Ee({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ed={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Tt(),l=ia(a);l.payload=t,n!=null&&(l.callback=n),t=ca(e,l,a),t!==null&&(Ct(t,e,a),Gr(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Tt(),l=ia(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=ca(e,l,a),t!==null&&(Ct(t,e,a),Gr(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tt(),a=ia(n);a.tag=2,t!=null&&(a.callback=t),t=ca(e,a,n),t!==null&&(Ct(t,e,n),Gr(t,e,n))}};function km(e,t,n,a,l,r,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,r,o):t.prototype&&t.prototype.isPureReactComponent?!ns(n,a)||!ns(l,r):!0}function Am(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&&ed.enqueueReplaceState(t,t.state,null)}function Xa(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=Ee({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}var Jo=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 Qv(e){Jo(e)}function Kv(e){console.error(e)}function Zv(e){Jo(e)}function ei(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Rm(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function td(e,t,n){return n=ia(n),n.tag=3,n.payload={element:null},n.callback=function(){ei(e,t)},n}function Fv(e){return e=ia(e),e.tag=3,e}function Wv(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var r=a.value;e.payload=function(){return l(r)},e.callback=function(){Rm(t,n,a)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Rm(t,n,a),typeof l!="function"&&(ua===null?ua=new Set([this]):ua.add(this));var i=a.stack;this.componentDidCatch(a.value,{componentStack:i!==null?i:""})})}function jj(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&_s(t,n,l,!0),n=Ht.current,n!==null){switch(n.tag){case 13:return sn===null?cd():n.alternate===null&&$e===0&&($e=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Pu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Jc(e,a,l)),!1;case 22:return n.flags|=65536,a===Pu?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)),Jc(e,a,l)),!1}throw Error(M(435,n.tag))}return Jc(e,a,l),cd(),!1}if(me)return t=Ht.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==Gu&&(e=Error(M(422),{cause:a}),as(Ut(e,n)))):(a!==Gu&&(t=Error(M(423),{cause:a}),as(Ut(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=Ut(a,n),l=td(e.stateNode,a,l),Hc(e,l),$e!==4&&($e=2)),!1;var r=Error(M(520),{cause:a});if(r=Ut(r,n),Qr===null?Qr=[r]:Qr.push(r),$e!==4&&($e=2),t===null)return!0;a=Ut(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=td(n.stateNode,a,e),Hc(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"&&(ua===null||!ua.has(r))))return n.flags|=65536,l&=-l,n.lanes|=l,l=Fv(l),Wv(l,e,n,a),Hc(n,l),!1}n=n.return}while(n!==null);return!1}var Jv=Error(M(461)),Ze=!1;function We(e,t,n,a){t.child=e===null?Iv(t,null,n,a):Ql(t,e.child,n,a)}function Mm(e,t,n,a,l){n=n.render;var r=t.ref;if("ref"in a){var o={};for(var i in a)i!=="ref"&&(o[i]=a[i])}else o=a;return Va(t),a=xf(e,t,n,o,r,l),i=yf(),e!==null&&!Ze?(bf(e,t,l),zn(e,t,l)):(me&&i&&df(t),t.flags|=1,We(e,t,a,l),t.child)}function Om(e,t,n,a,l){if(e===null){var r=n.type;return typeof r=="function"&&!uf(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,ex(e,t,r,a,l)):(e=wo(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!kf(e,l)){var o=r.memoizedProps;if(n=n.compare,n=n!==null?n:ns,n(o,a)&&e.ref===t.ref)return zn(e,t,l)}return t.flags|=1,e=Rn(r,a),e.ref=t.ref,e.return=t,t.child=e}function ex(e,t,n,a,l){if(e!==null){var r=e.memoizedProps;if(ns(r,a)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=a=r,kf(e,l))e.flags&131072&&(Ze=!0);else return t.lanes=e.lanes,zn(e,t,l)}return nd(e,t,n,a,l)}function tx(e,t,n){var a=t.pendingProps,l=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(l=t.child=e.child,r=0;l!==null;)r=r|l.lanes|l.childLanes,l=l.sibling;t.childLanes=r&~a}else t.childLanes=0,t.child=null;return Dm(e,t,a,n)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&jo(t,r!==null?r.cachePool:null),r!==null?Sm(t,r):Zu(),Pv(t);else return t.lanes=t.childLanes=536870912,Dm(e,t,r!==null?r.baseLanes|n:n,n)}else r!==null?(jo(t,r.cachePool),Sm(t,r),ta(),t.memoizedState=null):(e!==null&&jo(t,null),Zu(),ta());return We(e,t,l,n),t.child}function Dm(e,t,n,a){var l=mf();return l=l===null?null:{parent:Ye._currentValue,pool:l},t.memoizedState={baseLanes:n,cachePool:l},e!==null&&jo(t,null),Zu(),Pv(t),e!==null&&_s(e,t,a,!0),null}function Eo(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(M(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function nd(e,t,n,a,l){return Va(t),n=xf(e,t,n,a,void 0,l),a=yf(),e!==null&&!Ze?(bf(e,t,l),zn(e,t,l)):(me&&a&&df(t),t.flags|=1,We(e,t,n,l),t.child)}function zm(e,t,n,a,l,r){return Va(t),t.updateQueue=null,n=mv(t,a,n,l),hv(e),a=yf(),e!==null&&!Ze?(bf(e,t,r),zn(e,t,r)):(me&&a&&df(t),t.flags|=1,We(e,t,n,r),t.child)}function Lm(e,t,n,a,l){if(Va(t),t.stateNode===null){var r=Tl,o=n.contextType;typeof o=="object"&&o!==null&&(r=st(o)),r=new n(a,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=ed,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=a,r.state=t.memoizedState,r.refs={},pf(t),o=n.contextType,r.context=typeof o=="object"&&o!==null?st(o):Tl,r.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(Gc(t,n,o,a),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(o=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),o!==r.state&&ed.enqueueReplaceState(r,r.state,null),Yr(t,a,r,l),Vr(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){r=t.stateNode;var i=t.memoizedProps,c=Xa(n,i);r.props=c;var u=r.context,f=n.contextType;o=Tl,typeof f=="object"&&f!==null&&(o=st(f));var h=n.getDerivedStateFromProps;f=typeof h=="function"||typeof r.getSnapshotBeforeUpdate=="function",i=t.pendingProps!==i,f||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(i||u!==o)&&Am(t,r,a,o),Wn=!1;var m=t.memoizedState;r.state=m,Yr(t,a,r,l),Vr(),u=t.memoizedState,i||m!==u||Wn?(typeof h=="function"&&(Gc(t,n,h,a),u=t.memoizedState),(c=Wn||km(t,n,c,a,m,u,o))?(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=u),r.props=a,r.state=u,r.context=o,a=c):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{r=t.stateNode,Qu(e,t),o=t.memoizedProps,f=Xa(n,o),r.props=f,h=t.pendingProps,m=r.context,u=n.contextType,c=Tl,typeof u=="object"&&u!==null&&(c=st(u)),i=n.getDerivedStateFromProps,(u=typeof i=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(o!==h||m!==c)&&Am(t,r,a,c),Wn=!1,m=t.memoizedState,r.state=m,Yr(t,a,r,l),Vr();var g=t.memoizedState;o!==h||m!==g||Wn||e!==null&&e.dependencies!==null&&Po(e.dependencies)?(typeof i=="function"&&(Gc(t,n,i,a),g=t.memoizedState),(f=Wn||km(t,n,f,a,m,g,c)||e!==null&&e.dependencies!==null&&Po(e.dependencies))?(u||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"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||o===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"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),a=!1)}return r=a,Eo(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=Ql(t,e.child,null,l),t.child=Ql(t,null,n,l)):We(e,t,n,l),t.memoizedState=r.state,e=t.child):e=zn(e,t,l),e}function Um(e,t,n,a){return Ns(),t.flags|=256,We(e,t,n,a),t.child}var Vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yc(e){return{baseLanes:e,cachePool:iv()}}function Xc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=$t),e}function nx(e,t,n){var a=t.pendingProps,l=!1,r=(t.flags&128)!==0,o;if((o=r)||(o=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),o&&(l=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(me){if(l?ea(t):ta(),me){var i=Ue,c;if(c=i){e:{for(c=i,i=en;c.nodeType!==8;){if(!i){i=null;break e}if(c=Xt(c.nextSibling),c===null){i=null;break e}}i=c}i!==null?(t.memoizedState={dehydrated:i,treeContext:Ua!==null?{id:Tn,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},c=Nt(18,null,null,0),c.stateNode=i,c.return=t,t.child=c,ct=t,Ue=null,c=!0):c=!1}c||Ga(t)}if(i=t.memoizedState,i!==null&&(i=i.dehydrated,i!==null))return gd(i)?t.lanes=32:t.lanes=536870912,null;An(t)}return i=a.children,a=a.fallback,l?(ta(),l=t.mode,i=ti({mode:"hidden",children:i},l),a=La(a,l,n,null),i.return=t,a.return=t,i.sibling=a,t.child=i,l=t.child,l.memoizedState=Yc(n),l.childLanes=Xc(e,o,n),t.memoizedState=Vc,a):(ea(t),ad(t,i))}if(c=e.memoizedState,c!==null&&(i=c.dehydrated,i!==null)){if(r)t.flags&256?(ea(t),t.flags&=-257,t=Ic(e,t,n)):t.memoizedState!==null?(ta(),t.child=e.child,t.flags|=128,t=null):(ta(),l=a.fallback,i=t.mode,a=ti({mode:"visible",children:a.children},i),l=La(l,i,n,null),l.flags|=2,a.return=t,l.return=t,a.sibling=l,t.child=a,Ql(t,e.child,null,n),a=t.child,a.memoizedState=Yc(n),a.childLanes=Xc(e,o,n),t.memoizedState=Vc,t=l);else if(ea(t),gd(i)){if(o=i.nextSibling&&i.nextSibling.dataset,o)var u=o.dgst;o=u,a=Error(M(419)),a.stack="",a.digest=o,as({value:a,source:null,stack:null}),t=Ic(e,t,n)}else if(Ze||_s(e,t,n,!1),o=(n&e.childLanes)!==0,Ze||o){if(o=_e,o!==null&&(a=n&-n,a=a&42?1:Wd(a),a=a&(o.suspendedLanes|n)?0:a,a!==0&&a!==c.retryLane))throw c.retryLane=a,lr(e,a),Ct(o,e,a),Jv;i.data==="$?"||cd(),t=Ic(e,t,n)}else i.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,Ue=Xt(i.nextSibling),ct=t,me=!0,$a=null,en=!1,e!==null&&(Dt[zt++]=Tn,Dt[zt++]=Cn,Dt[zt++]=Ua,Tn=e.id,Cn=e.overflow,Ua=t),t=ad(t,a.children),t.flags|=4096);return t}return l?(ta(),l=a.fallback,i=t.mode,c=e.child,u=c.sibling,a=Rn(c,{mode:"hidden",children:a.children}),a.subtreeFlags=c.subtreeFlags&65011712,u!==null?l=Rn(u,l):(l=La(l,i,n,null),l.flags|=2),l.return=t,a.return=t,a.sibling=l,t.child=a,a=l,l=t.child,i=e.child.memoizedState,i===null?i=Yc(n):(c=i.cachePool,c!==null?(u=Ye._currentValue,c=c.parent!==u?{parent:u,pool:u}:c):c=iv(),i={baseLanes:i.baseLanes|n,cachePool:c}),l.memoizedState=i,l.childLanes=Xc(e,o,n),t.memoizedState=Vc,a):(ea(t),n=e.child,e=n.sibling,n=Rn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function ad(e,t){return t=ti({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ti(e,t){return e=Nt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Ic(e,t,n){return Ql(t,e.child,null,n),e=ad(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $m(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Yu(e.return,t,n)}function Pc(e,t,n,a,l){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=a,r.tail=n,r.tailMode=l)}function ax(e,t,n){var a=t.pendingProps,l=a.revealOrder,r=a.tail;if(We(e,t,a.children,n),a=Xe.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&&$m(e,n,t);else if(e.tag===19)$m(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(Ae(Xe,a),l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Wo(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Pc(t,!1,l,n,r);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Wo(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Pc(t,!0,n,null,r);break;case"together":Pc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function zn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),xa|=t.lanes,!(n&t.childLanes))if(e!==null){if(_s(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=Rn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Rn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kf(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Po(e)))}function Nj(e,t,n){switch(t.tag){case 3:Bo(t,t.stateNode.containerInfo),Jn(t,Ye,e.memoizedState.cache),Ns();break;case 27:case 5:Mu(t);break;case 4:Bo(t,t.stateNode.containerInfo);break;case 10:Jn(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ea(t),t.flags|=128,null):n&t.child.childLanes?nx(e,t,n):(ea(t),e=zn(e,t,n),e!==null?e.sibling:null);ea(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(_s(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return ax(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Ae(Xe,Xe.current),a)break;return null;case 22:case 23:return t.lanes=0,tx(e,t,n);case 24:Jn(t,Ye,e.memoizedState.cache)}return zn(e,t,n)}function lx(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ze=!0;else{if(!kf(e,n)&&!(t.flags&128))return Ze=!1,Nj(e,t,n);Ze=!!(e.flags&131072)}else Ze=!1,me&&t.flags&1048576&&sv(t,Io,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,l=a._init;if(a=l(a._payload),t.type=a,typeof a=="function")uf(a)?(e=Xa(a,e),t.tag=1,t=Lm(null,t,a,e,n)):(t.tag=0,t=nd(null,t,a,e,n));else{if(a!=null){if(l=a.$$typeof,l===Kd){t.tag=11,t=Mm(null,t,a,e,n);break e}else if(l===Zd){t.tag=14,t=Om(null,t,a,e,n);break e}}throw t=Au(a)||a,Error(M(306,t,""))}}return t;case 0:return nd(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=Xa(a,t.pendingProps),Lm(e,t,a,l,n);case 3:e:{if(Bo(t,t.stateNode.containerInfo),e===null)throw Error(M(387));a=t.pendingProps;var r=t.memoizedState;l=r.element,Qu(e,t),Yr(t,a,null,n);var o=t.memoizedState;if(a=o.cache,Jn(t,Ye,a),a!==r.cache&&Xu(t,[Ye],n,!0),Vr(),a=o.element,r.isDehydrated)if(r={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Um(e,t,a,n);break e}else if(a!==l){l=Ut(Error(M(424)),t),as(l),t=Um(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(Ue=Xt(e.firstChild),ct=t,me=!0,$a=null,en=!0,n=Iv(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ns(),a===l){t=zn(e,t,n);break e}We(e,t,a,n)}t=t.child}return t;case 26:return Eo(e,t),e===null?(n=tp(t.type,null,t.pendingProps,null))?t.memoizedState=n:me||(n=t.type,e=t.pendingProps,a=ii(oa.current).createElement(n),a[rt]=t,a[vt]=e,tt(a,n,e),Ke(a),t.stateNode=a):t.memoizedState=tp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Mu(t),e===null&&me&&(a=t.stateNode=Yx(t.type,t.pendingProps,oa.current),ct=t,en=!0,l=Ue,ja(t.type)?(vd=l,Ue=Xt(a.firstChild)):Ue=l),We(e,t,t.pendingProps.children,n),Eo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&me&&((l=a=Ue)&&(a=Wj(a,t.type,t.pendingProps,en),a!==null?(t.stateNode=a,ct=t,Ue=Xt(a.firstChild),en=!1,l=!0):l=!1),l||Ga(t)),Mu(t),l=t.type,r=t.pendingProps,o=e!==null?e.memoizedProps:null,a=r.children,md(l,r)?a=null:o!==null&&md(l,o)&&(t.flags|=32),t.memoizedState!==null&&(l=xf(e,t,gj,null,null,n),cs._currentValue=l),Eo(e,t),We(e,t,a,n),t.child;case 6:return e===null&&me&&((e=n=Ue)&&(n=Jj(n,t.pendingProps,en),n!==null?(t.stateNode=n,ct=t,Ue=null,e=!0):e=!1),e||Ga(t)),null;case 13:return nx(e,t,n);case 4:return Bo(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ql(t,null,a,n):We(e,t,a,n),t.child;case 11:return Mm(e,t,t.type,t.pendingProps,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Jn(t,t.type,a.value),We(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,Va(t),l=st(l),a=a(l),t.flags|=1,We(e,t,a,n),t.child;case 14:return Om(e,t,t.type,t.pendingProps,n);case 15:return ex(e,t,t.type,t.pendingProps,n);case 19:return ax(e,t,n);case 31:return a=t.pendingProps,n=t.mode,a={mode:a.mode,children:a.children},e===null?(n=ti(a,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=Rn(e.child,a),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return tx(e,t,n);case 24:return Va(t),a=st(Ye),e===null?(l=mf(),l===null&&(l=_e,r=hf(),l.pooledCache=r,r.refCount++,r!==null&&(l.pooledCacheLanes|=n),l=r),t.memoizedState={parent:a,cache:l},pf(t),Jn(t,Ye,l)):(e.lanes&n&&(Qu(e,t),Yr(t,null,null,n),Vr()),l=e.memoizedState,r=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),Jn(t,Ye,a)):(a=r.cache,Jn(t,Ye,a),a!==l.cache&&Xu(t,[Ye],n,!0))),We(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(M(156,t.tag))}function bn(e){e.flags|=4}function Bm(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Px(t)){if(t=Ht.current,t!==null&&((de&4194048)===de?sn!==null:(de&62914560)!==de&&!(de&536870912)||t!==sn))throw qr=Pu,cv;e.flags|=8192}}function to(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ag():536870912,e.lanes|=t,Kl|=t)}function Sr(e,t){if(!me)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 ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags&65011712,a|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function _j(e,t,n){var a=t.pendingProps;switch(ff(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Mn(Ye),Gl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(yr(t)?bn(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pm())),ze(t),null;case 26:return n=t.memoizedState,e===null?(bn(t),n!==null?(ze(t),Bm(t,n)):(ze(t),t.flags&=-16777217)):n?n!==e.memoizedState?(bn(t),ze(t),Bm(t,n)):(ze(t),t.flags&=-16777217):(e.memoizedProps!==a&&bn(t),ze(t),t.flags&=-16777217),null;case 27:Ho(t),n=oa.current;var l=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&bn(t);else{if(!a){if(t.stateNode===null)throw Error(M(166));return ze(t),null}e=ln.current,yr(t)?hm(t):(e=Yx(l,a,n),t.stateNode=e,bn(t))}return ze(t),null;case 5:if(Ho(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&bn(t);else{if(!a){if(t.stateNode===null)throw Error(M(166));return ze(t),null}if(e=ln.current,yr(t))hm(t);else{switch(l=ii(oa.current),e){case 1:e=l.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=l.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=l.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=l.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?l.createElement("select",{is:a.is}):l.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?l.createElement(n,{is:a.is}):l.createElement(n)}}e[rt]=t,e[vt]=a;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)e.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=e;e:switch(tt(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&&bn(t)}}return ze(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&bn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(M(166));if(e=oa.current,yr(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=ct,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[rt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||qx(e.nodeValue,n)),e||Ga(t)}else e=ii(e).createTextNode(a),e[rt]=t,t.stateNode=e}return ze(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=yr(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(M(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(M(317));l[rt]=t}else Ns(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),l=!1}else l=pm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(An(t),t):(An(t),null)}if(An(t),t.flags&128)return t.lanes=n,t;if(n=a!==null,e=e!==null&&e.memoizedState!==null,n){a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool);var r=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==l&&(a.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),to(t,t.updateQueue),ze(t),null;case 4:return Gl(),e===null&&Uf(t.stateNode.containerInfo),ze(t),null;case 10:return Mn(t.type),ze(t),null;case 19:if(Fe(Xe),l=t.memoizedState,l===null)return ze(t),null;if(a=(t.flags&128)!==0,r=l.rendering,r===null)if(a)Sr(l,!1);else{if($e!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(r=Wo(e),r!==null){for(t.flags|=128,Sr(l,!1),e=r.updateQueue,t.updateQueue=e,to(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)rv(n,e),n=n.sibling;return Ae(Xe,Xe.current&1|2),t.child}e=e.sibling}l.tail!==null&&rn()>ai&&(t.flags|=128,a=!0,Sr(l,!1),t.lanes=4194304)}else{if(!a)if(e=Wo(r),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,to(t,e),Sr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!r.alternate&&!me)return ze(t),null}else 2*rn()-l.renderingStartTime>ai&&n!==536870912&&(t.flags|=128,a=!0,Sr(l,!1),t.lanes=4194304);l.isBackwards?(r.sibling=t.child,t.child=r):(e=l.last,e!==null?e.sibling=r:t.child=r,l.last=r)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=rn(),t.sibling=null,e=Xe.current,Ae(Xe,a?e&1|2:e&1),t):(ze(t),null);case 22:case 23:return An(t),gf(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?n&536870912&&!(t.flags&128)&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),n=t.updateQueue,n!==null&&to(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&&Fe(Ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Mn(Ye),ze(t),null;case 25:return null;case 30:return null}throw Error(M(156,t.tag))}function Ej(e,t){switch(ff(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mn(Ye),Gl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ho(t),null;case 13:if(An(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));Ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fe(Xe),null;case 4:return Gl(),null;case 10:return Mn(t.type),null;case 22:case 23:return An(t),gf(),e!==null&&Fe(Ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Mn(Ye),null;case 25:return null;default:return null}}function rx(e,t){switch(ff(t),t.tag){case 3:Mn(Ye),Gl();break;case 26:case 27:case 5:Ho(t);break;case 4:Gl();break;case 13:An(t);break;case 19:Fe(Xe);break;case 10:Mn(t.type);break;case 22:case 23:An(t),gf(),e!==null&&Fe(Ba);break;case 24:Mn(Ye)}}function As(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var r=n.create,o=n.inst;a=r(),o.destroy=a}n=n.next}while(n!==l)}}catch(i){je(t,t.return,i)}}function va(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var r=l.next;a=r;do{if((a.tag&e)===e){var o=a.inst,i=o.destroy;if(i!==void 0){o.destroy=void 0,l=t;var c=n,u=i;try{u()}catch(f){je(l,c,f)}}}a=a.next}while(a!==r)}}catch(f){je(t,t.return,f)}}function sx(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{fv(t,n)}catch(a){je(e,e.return,a)}}}function ox(e,t,n){n.props=Xa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){je(e,t,a)}}function Ir(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(l){je(e,t,l)}}function nn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){je(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){je(e,t,l)}else n.current=null}function ix(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(l){je(e,e.return,l)}}function Qc(e,t,n){try{var a=e.stateNode;Pj(a,e.type,n,t),a[vt]=t}catch(l){je(e,e.return,l)}}function cx(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ja(e.type)||e.tag===4}function Kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cx(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&&ja(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 ld(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=qi));else if(a!==4&&(a===27&&ja(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(ld(e,t,n),e=e.sibling;e!==null;)ld(e,t,n),e=e.sibling}function ni(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&&ja(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ni(e,t,n),e=e.sibling;e!==null;)ni(e,t,n),e=e.sibling}function ux(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);tt(t,a,n),t[rt]=e,t[vt]=n}catch(r){je(e,e.return,r)}}var Nn=!1,He=!1,Zc=!1,Hm=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function Tj(e,t){if(e=e.containerInfo,fd=fi,e=Fg(e),sf(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 l=a.anchorOffset,r=a.focusNode;a=a.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break e}var o=0,i=-1,c=-1,u=0,f=0,h=e,m=null;t:for(;;){for(var g;h!==n||l!==0&&h.nodeType!==3||(i=o+l),h!==r||a!==0&&h.nodeType!==3||(c=o+a),h.nodeType===3&&(o+=h.nodeValue.length),(g=h.firstChild)!==null;)m=h,h=g;for(;;){if(h===e)break t;if(m===n&&++u===l&&(i=o),m===r&&++f===a&&(c=o),(g=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=g}n=i===-1||c===-1?null:{start:i,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(hd={focusedElem:e,selectionRange:n},fi=!1,Qe=t;Qe!==null;)if(t=Qe,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Qe=e;else for(;Qe!==null;){switch(t=Qe,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,l=r.memoizedProps,r=r.memoizedState,a=n.stateNode;try{var w=Xa(n.type,l,n.elementType===n.type);e=a.getSnapshotBeforeUpdate(w,r),a.__reactInternalSnapshotBeforeUpdate=e}catch(y){je(n,n.return,y)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)pd(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pd(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(M(163))}if(e=t.sibling,e!==null){e.return=t.return,Qe=e;break}Qe=t.return}}function dx(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Xn(e,n),a&4&&As(5,n);break;case 1:if(Xn(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){je(n,n.return,o)}else{var l=Xa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){je(n,n.return,o)}}a&64&&sx(n),a&512&&Ir(n,n.return);break;case 3:if(Xn(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{fv(e,t)}catch(o){je(n,n.return,o)}}break;case 27:t===null&&a&4&&ux(n);case 26:case 5:Xn(e,n),t===null&&a&4&&ix(n),a&512&&Ir(n,n.return);break;case 12:Xn(e,n);break;case 13:Xn(e,n),a&4&&mx(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Lj.bind(null,n),eN(e,n))));break;case 22:if(a=n.memoizedState!==null||Nn,!a){t=t!==null&&t.memoizedState!==null||He,l=Nn;var r=He;Nn=a,(He=t)&&!r?Kn(e,n,(n.subtreeFlags&8772)!==0):Xn(e,n),Nn=l,He=r}break;case 30:break;default:Xn(e,n)}}function fx(e){var t=e.alternate;t!==null&&(e.alternate=null,fx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ef(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 Te=null,pt=!1;function Sn(e,t,n){for(n=n.child;n!==null;)hx(e,t,n),n=n.sibling}function hx(e,t,n){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(ys,n)}catch{}switch(n.tag){case 26:He||nn(n,t),Sn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:He||nn(n,t);var a=Te,l=pt;ja(n.type)&&(Te=n.stateNode,pt=!1),Sn(e,t,n),Zr(n.stateNode),Te=a,pt=l;break;case 5:He||nn(n,t);case 6:if(a=Te,l=pt,Te=null,Sn(e,t,n),Te=a,pt=l,Te!==null)if(pt)try{(Te.nodeType===9?Te.body:Te.nodeName==="HTML"?Te.ownerDocument.body:Te).removeChild(n.stateNode)}catch(r){je(n,t,r)}else try{Te.removeChild(n.stateNode)}catch(r){je(n,t,r)}break;case 18:Te!==null&&(pt?(e=Te,Wm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),fs(e)):Wm(Te,n.stateNode));break;case 4:a=Te,l=pt,Te=n.stateNode.containerInfo,pt=!0,Sn(e,t,n),Te=a,pt=l;break;case 0:case 11:case 14:case 15:He||va(2,n,t),He||va(4,n,t),Sn(e,t,n);break;case 1:He||(nn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&ox(n,t,a)),Sn(e,t,n);break;case 21:Sn(e,t,n);break;case 22:He=(a=He)||n.memoizedState!==null,Sn(e,t,n),He=a;break;default:Sn(e,t,n)}}function mx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{fs(e)}catch(n){je(t,t.return,n)}}function Cj(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Hm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Hm),t;default:throw Error(M(435,e.tag))}}function Fc(e,t){var n=Cj(e);t.forEach(function(a){var l=Uj.bind(null,e,a);n.has(a)||(n.add(a),a.then(l,l))})}function bt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],r=e,o=t,i=o;e:for(;i!==null;){switch(i.tag){case 27:if(ja(i.type)){Te=i.stateNode,pt=!1;break e}break;case 5:Te=i.stateNode,pt=!1;break e;case 3:case 4:Te=i.stateNode.containerInfo,pt=!0;break e}i=i.return}if(Te===null)throw Error(M(160));hx(r,o,l),Te=null,pt=!1,r=l.alternate,r!==null&&(r.return=null),l.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)px(t,e),t=t.sibling}var Vt=null;function px(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:bt(t,e),St(e),a&4&&(va(3,e,e.return),As(3,e),va(5,e,e.return));break;case 1:bt(t,e),St(e),a&512&&(He||n===null||nn(n,n.return)),a&64&&Nn&&(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 l=Vt;if(bt(t,e),St(e),a&512&&(He||n===null||nn(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,l=l.ownerDocument||l;t:switch(a){case"title":r=l.getElementsByTagName("title")[0],(!r||r[ws]||r[rt]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=l.createElement(a),l.head.insertBefore(r,l.querySelector("head > title"))),tt(r,a,n),r[rt]=e,Ke(r),a=r;break e;case"link":var o=ap("link","href",l).get(a+(n.href||""));if(o){for(var i=0;i<o.length;i++)if(r=o[i],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)){o.splice(i,1);break t}}r=l.createElement(a),tt(r,a,n),l.head.appendChild(r);break;case"meta":if(o=ap("meta","content",l).get(a+(n.content||""))){for(i=0;i<o.length;i++)if(r=o[i],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)){o.splice(i,1);break t}}r=l.createElement(a),tt(r,a,n),l.head.appendChild(r);break;default:throw Error(M(468,a))}r[rt]=e,Ke(r),a=r}e.stateNode=a}else lp(l,e.type,e.stateNode);else e.stateNode=np(l,a,e.memoizedProps);else r!==a?(r===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):r.count--,a===null?lp(l,e.type,e.stateNode):np(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Qc(e,e.memoizedProps,n.memoizedProps)}break;case 27:bt(t,e),St(e),a&512&&(He||n===null||nn(n,n.return)),n!==null&&a&4&&Qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(bt(t,e),St(e),a&512&&(He||n===null||nn(n,n.return)),e.flags&32){l=e.stateNode;try{Yl(l,"")}catch(g){je(e,e.return,g)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,Qc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(Zc=!0);break;case 6:if(bt(t,e),St(e),a&4){if(e.stateNode===null)throw Error(M(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(g){je(e,e.return,g)}}break;case 3:if(ko=null,l=Vt,Vt=ci(t.containerInfo),bt(t,e),Vt=l,St(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{fs(t.containerInfo)}catch(g){je(e,e.return,g)}Zc&&(Zc=!1,gx(e));break;case 4:a=Vt,Vt=ci(e.stateNode.containerInfo),bt(t,e),St(e),Vt=a;break;case 12:bt(t,e),St(e);break;case 13:bt(t,e),St(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Df=rn()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Fc(e,a)));break;case 22:l=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,u=Nn,f=He;if(Nn=u||l,He=f||c,bt(t,e),He=f,Nn=u,St(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||c||Nn||He||Oa(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(r=c.stateNode,l)o=r.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{i=c.stateNode;var h=c.memoizedProps.style,m=h!=null&&h.hasOwnProperty("display")?h.display:null;i.style.display=m==null||typeof m=="boolean"?"":(""+m).trim()}}catch(g){je(c,c.return,g)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=l?"":c.memoizedProps}catch(g){je(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,Fc(e,n))));break;case 19:bt(t,e),St(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Fc(e,a)));break;case 30:break;case 21:break;default:bt(t,e),St(e)}}function St(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(cx(a)){n=a;break}a=a.return}if(n==null)throw Error(M(160));switch(n.tag){case 27:var l=n.stateNode,r=Kc(e);ni(e,r,l);break;case 5:var o=n.stateNode;n.flags&32&&(Yl(o,""),n.flags&=-33);var i=Kc(e);ni(e,i,o);break;case 3:case 4:var c=n.stateNode.containerInfo,u=Kc(e);ld(e,u,c);break;default:throw Error(M(161))}}catch(f){je(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gx(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gx(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Xn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dx(e,t.alternate,t),t=t.sibling}function Oa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:va(4,t,t.return),Oa(t);break;case 1:nn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&ox(t,t.return,n),Oa(t);break;case 27:Zr(t.stateNode);case 26:case 5:nn(t,t.return),Oa(t);break;case 22:t.memoizedState===null&&Oa(t);break;case 30:Oa(t);break;default:Oa(t)}e=e.sibling}}function Kn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,r=t,o=r.flags;switch(r.tag){case 0:case 11:case 15:Kn(l,r,n),As(4,r);break;case 1:if(Kn(l,r,n),a=r,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(u){je(a,a.return,u)}if(a=r,l=a.updateQueue,l!==null){var i=a.stateNode;try{var c=l.shared.hiddenCallbacks;if(c!==null)for(l.shared.hiddenCallbacks=null,l=0;l<c.length;l++)dv(c[l],i)}catch(u){je(a,a.return,u)}}n&&o&64&&sx(r),Ir(r,r.return);break;case 27:ux(r);case 26:case 5:Kn(l,r,n),n&&a===null&&o&4&&ix(r),Ir(r,r.return);break;case 12:Kn(l,r,n);break;case 13:Kn(l,r,n),n&&o&4&&mx(l,r);break;case 22:r.memoizedState===null&&Kn(l,r,n),Ir(r,r.return);break;case 30:break;default:Kn(l,r,n)}t=t.sibling}}function Af(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&&Es(n))}function Rf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Es(e))}function Jt(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)vx(e,t,n,a),t=t.sibling}function vx(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Jt(e,t,n,a),l&2048&&As(9,t);break;case 1:Jt(e,t,n,a);break;case 3:Jt(e,t,n,a),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Es(e)));break;case 12:if(l&2048){Jt(e,t,n,a),e=t.stateNode;try{var r=t.memoizedProps,o=r.id,i=r.onPostCommit;typeof i=="function"&&i(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){je(t,t.return,c)}}else Jt(e,t,n,a);break;case 13:Jt(e,t,n,a);break;case 23:break;case 22:r=t.stateNode,o=t.alternate,t.memoizedState!==null?r._visibility&2?Jt(e,t,n,a):Pr(e,t):r._visibility&2?Jt(e,t,n,a):(r._visibility|=2,vl(e,t,n,a,(t.subtreeFlags&10256)!==0)),l&2048&&Af(o,t);break;case 24:Jt(e,t,n,a),l&2048&&Rf(t.alternate,t);break;default:Jt(e,t,n,a)}}function vl(e,t,n,a,l){for(l=l&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var r=e,o=t,i=n,c=a,u=o.flags;switch(o.tag){case 0:case 11:case 15:vl(r,o,i,c,l),As(8,o);break;case 23:break;case 22:var f=o.stateNode;o.memoizedState!==null?f._visibility&2?vl(r,o,i,c,l):Pr(r,o):(f._visibility|=2,vl(r,o,i,c,l)),l&&u&2048&&Af(o.alternate,o);break;case 24:vl(r,o,i,c,l),l&&u&2048&&Rf(o.alternate,o);break;default:vl(r,o,i,c,l)}t=t.sibling}}function Pr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:Pr(n,a),l&2048&&Af(a.alternate,a);break;case 24:Pr(n,a),l&2048&&Rf(a.alternate,a);break;default:Pr(n,a)}t=t.sibling}}var kr=8192;function ol(e){if(e.subtreeFlags&kr)for(e=e.child;e!==null;)xx(e),e=e.sibling}function xx(e){switch(e.tag){case 26:ol(e),e.flags&kr&&e.memoizedState!==null&&hN(Vt,e.memoizedState,e.memoizedProps);break;case 5:ol(e);break;case 3:case 4:var t=Vt;Vt=ci(e.stateNode.containerInfo),ol(e),Vt=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=kr,kr=16777216,ol(e),kr=t):ol(e));break;default:ol(e)}}function yx(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 wr(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Qe=a,Sx(a,e)}yx(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bx(e),e=e.sibling}function bx(e){switch(e.tag){case 0:case 11:case 15:wr(e),e.flags&2048&&va(9,e,e.return);break;case 3:wr(e);break;case 12:wr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,To(e)):wr(e);break;default:wr(e)}}function To(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Qe=a,Sx(a,e)}yx(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:va(8,t,t.return),To(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,To(t));break;default:To(t)}e=e.sibling}}function Sx(e,t){for(;Qe!==null;){var n=Qe;switch(n.tag){case 0:case 11:case 15:va(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:Es(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Qe=a;else e:for(n=e;Qe!==null;){a=Qe;var l=a.sibling,r=a.return;if(fx(a),a===n){Qe=null;break e}if(l!==null){l.return=r,Qe=l;break e}Qe=r}}}var kj={getCacheForType:function(e){var t=st(Ye),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},Aj=typeof WeakMap=="function"?WeakMap:Map,xe=0,_e=null,oe=null,de=0,ve=0,wt=null,ra=!1,rr=!1,Mf=!1,Ln=0,$e=0,xa=0,Ha=0,Of=0,$t=0,Kl=0,Qr=null,gt=null,rd=!1,Df=0,ai=1/0,li=null,ua=null,Je=0,da=null,Zl=null,Bl=0,sd=0,od=null,wx=null,Kr=0,id=null;function Tt(){if(xe&2&&de!==0)return de&-de;if(F.T!==null){var e=Xl;return e!==0?e:Lf()}return Og()}function jx(){$t===0&&($t=!(de&536870912)||me?kg():536870912);var e=Ht.current;return e!==null&&(e.flags|=32),$t}function Ct(e,t,n){(e===_e&&(ve===2||ve===9)||e.cancelPendingCommit!==null)&&(Fl(e,0),sa(e,de,$t,!1)),Ss(e,n),(!(xe&2)||e!==_e)&&(e===_e&&(!(xe&2)&&(Ha|=n),$e===4&&sa(e,de,$t,!1)),pn(e))}function Nx(e,t,n){if(xe&6)throw Error(M(327));var a=!n&&(t&124)===0&&(t&e.expiredLanes)===0||bs(e,t),l=a?Oj(e,t):Wc(e,t,!0),r=a;do{if(l===0){rr&&!a&&sa(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!Rj(n)){l=Wc(e,t,!1),r=!1;continue}if(l===2){if(r=t,e.errorRecoveryDisabledLanes&r)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var i=e;l=Qr;var c=i.current.memoizedState.isDehydrated;if(c&&(Fl(i,o).flags|=256),o=Wc(i,o,!1),o!==2){if(Mf&&!c){i.errorRecoveryDisabledLanes|=r,Ha|=r,l=4;break e}r=gt,gt=l,r!==null&&(gt===null?gt=r:gt.push.apply(gt,r))}l=o}if(r=!1,l!==2)continue}}if(l===1){Fl(e,0),sa(e,t,0,!0);break}e:{switch(a=e,r=l,r){case 0:case 1:throw Error(M(345));case 4:if((t&4194048)!==t)break;case 6:sa(a,t,$t,!ra);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(M(329))}if((t&62914560)===t&&(l=Df+300-rn(),10<l)){if(sa(a,t,$t,!ra),Ci(a,0,!0)!==0)break e;a.timeoutHandle=Vx(qm.bind(null,a,n,gt,li,rd,t,$t,Ha,Kl,ra,r,2,-0,0),l);break e}qm(a,n,gt,li,rd,t,$t,Ha,Kl,ra,r,0,-0,0)}}break}while(!0);pn(e)}function qm(e,t,n,a,l,r,o,i,c,u,f,h,m,g){if(e.timeoutHandle=-1,h=t.subtreeFlags,(h&8192||(h&16785408)===16785408)&&(is={stylesheets:null,count:0,unsuspend:fN},xx(t),h=mN(),h!==null)){e.cancelPendingCommit=h(Vm.bind(null,e,t,r,n,a,l,o,i,c,f,1,m,g)),sa(e,r,o,!u);return}Vm(e,t,r,n,a,l,o,i,c)}function Rj(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 l=n[a],r=l.getSnapshot;l=l.value;try{if(!At(r(),l))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 sa(e,t,n,a){t&=~Of,t&=~Ha,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var r=31-Et(l),o=1<<r;a[r]=-1,l&=~o}n!==0&&Rg(e,n,t)}function $i(){return xe&6?!0:(Rs(0),!1)}function zf(){if(oe!==null){if(ve===0)var e=oe.return;else e=oe,kn=nl=null,Sf(e),$l=null,rs=0,e=oe;for(;e!==null;)rx(e.alternate,e),e=e.return;oe=null}}function Fl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Kj(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),zf(),_e=e,oe=n=Rn(e.current,null),de=t,ve=0,wt=null,ra=!1,rr=bs(e,t),Mf=!1,Kl=$t=Of=Ha=xa=$e=0,gt=Qr=null,rd=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-Et(a),r=1<<l;t|=e[l],a&=~r}return Ln=t,Mi(),n}function _x(e,t){re=null,F.H=Fo,t===Ts||t===Di?(t=ym(),ve=3):t===cv?(t=ym(),ve=4):ve=t===Jv?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,wt=t,oe===null&&($e=1,ei(e,Ut(t,e.current)))}function Ex(){var e=F.H;return F.H=Fo,e===null?Fo:e}function Tx(){var e=F.A;return F.A=kj,e}function cd(){$e=4,ra||(de&4194048)!==de&&Ht.current!==null||(rr=!0),!(xa&134217727)&&!(Ha&134217727)||_e===null||sa(_e,de,$t,!1)}function Wc(e,t,n){var a=xe;xe|=2;var l=Ex(),r=Tx();(_e!==e||de!==t)&&(li=null,Fl(e,t)),t=!1;var o=$e;e:do try{if(ve!==0&&oe!==null){var i=oe,c=wt;switch(ve){case 8:zf(),o=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var u=ve;if(ve=0,wt=null,Al(e,i,c,u),n&&rr){o=0;break e}break;default:u=ve,ve=0,wt=null,Al(e,i,c,u)}}Mj(),o=$e;break}catch(f){_x(e,f)}while(!0);return t&&e.shellSuspendCounter++,kn=nl=null,xe=a,F.H=l,F.A=r,oe===null&&(_e=null,de=0,Mi()),o}function Mj(){for(;oe!==null;)Cx(oe)}function Oj(e,t){var n=xe;xe|=2;var a=Ex(),l=Tx();_e!==e||de!==t?(li=null,ai=rn()+500,Fl(e,t)):rr=bs(e,t);e:do try{if(ve!==0&&oe!==null){t=oe;var r=wt;t:switch(ve){case 1:ve=0,wt=null,Al(e,t,r,1);break;case 2:case 9:if(xm(r)){ve=0,wt=null,Gm(t);break}t=function(){ve!==2&&ve!==9||_e!==e||(ve=7),pn(e)},r.then(t,t);break e;case 3:ve=7;break e;case 4:ve=5;break e;case 7:xm(r)?(ve=0,wt=null,Gm(t)):(ve=0,wt=null,Al(e,t,r,7));break;case 5:var o=null;switch(oe.tag){case 26:o=oe.memoizedState;case 5:case 27:var i=oe;if(!o||Px(o)){ve=0,wt=null;var c=i.sibling;if(c!==null)oe=c;else{var u=i.return;u!==null?(oe=u,Bi(u)):oe=null}break t}}ve=0,wt=null,Al(e,t,r,5);break;case 6:ve=0,wt=null,Al(e,t,r,6);break;case 8:zf(),$e=6;break e;default:throw Error(M(462))}}Dj();break}catch(f){_x(e,f)}while(!0);return kn=nl=null,F.H=a,F.A=l,xe=n,oe!==null?0:(_e=null,de=0,Mi(),$e)}function Dj(){for(;oe!==null&&!nw();)Cx(oe)}function Cx(e){var t=lx(e.alternate,e,Ln);e.memoizedProps=e.pendingProps,t===null?Bi(e):oe=t}function Gm(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=zm(n,t,t.pendingProps,t.type,void 0,de);break;case 11:t=zm(n,t,t.pendingProps,t.type.render,t.ref,de);break;case 5:Sf(t);default:rx(n,t),t=oe=rv(t,Ln),t=lx(n,t,Ln)}e.memoizedProps=e.pendingProps,t===null?Bi(e):oe=t}function Al(e,t,n,a){kn=nl=null,Sf(t),$l=null,rs=0;var l=t.return;try{if(jj(e,l,t,n,de)){$e=1,ei(e,Ut(n,e.current)),oe=null;return}}catch(r){if(l!==null)throw oe=l,r;$e=1,ei(e,Ut(n,e.current)),oe=null;return}t.flags&32768?(me||a===1?e=!0:rr||de&536870912?e=!1:(ra=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ht.current,a!==null&&a.tag===13&&(a.flags|=16384))),kx(t,e)):Bi(t)}function Bi(e){var t=e;do{if(t.flags&32768){kx(t,ra);return}e=t.return;var n=_j(t.alternate,t,Ln);if(n!==null){oe=n;return}if(t=t.sibling,t!==null){oe=t;return}oe=t=e}while(t!==null);$e===0&&($e=5)}function kx(e,t){do{var n=Ej(e.alternate,e);if(n!==null){n.flags&=32767,oe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){oe=e;return}oe=e=n}while(e!==null);$e=6,oe=null}function Vm(e,t,n,a,l,r,o,i,c){e.cancelPendingCommit=null;do Hi();while(Je!==0);if(xe&6)throw Error(M(327));if(t!==null){if(t===e.current)throw Error(M(177));if(r=t.lanes|t.childLanes,r|=of,fw(e,n,r,o,i,c),e===_e&&(oe=_e=null,de=0),Zl=t,da=e,Bl=n,sd=r,od=l,wx=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,$j(qo,function(){return Dx(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=F.T,F.T=null,l=pe.p,pe.p=2,o=xe,xe|=4;try{Tj(e,t,n)}finally{xe=o,pe.p=l,F.T=a}}Je=1,Ax(),Rx(),Mx()}}function Ax(){if(Je===1){Je=0;var e=da,t=Zl,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var a=pe.p;pe.p=2;var l=xe;xe|=4;try{px(t,e);var r=hd,o=Fg(e.containerInfo),i=r.focusedElem,c=r.selectionRange;if(o!==i&&i&&i.ownerDocument&&Zg(i.ownerDocument.documentElement,i)){if(c!==null&&sf(i)){var u=c.start,f=c.end;if(f===void 0&&(f=u),"selectionStart"in i)i.selectionStart=u,i.selectionEnd=Math.min(f,i.value.length);else{var h=i.ownerDocument||document,m=h&&h.defaultView||window;if(m.getSelection){var g=m.getSelection(),w=i.textContent.length,y=Math.min(c.start,w),S=c.end===void 0?y:Math.min(c.end,w);!g.extend&&y>S&&(o=S,S=y,y=o);var v=um(i,y),p=um(i,S);if(v&&p&&(g.rangeCount!==1||g.anchorNode!==v.node||g.anchorOffset!==v.offset||g.focusNode!==p.node||g.focusOffset!==p.offset)){var x=h.createRange();x.setStart(v.node,v.offset),g.removeAllRanges(),y>S?(g.addRange(x),g.extend(p.node,p.offset)):(x.setEnd(p.node,p.offset),g.addRange(x))}}}}for(h=[],g=i;g=g.parentNode;)g.nodeType===1&&h.push({element:g,left:g.scrollLeft,top:g.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<h.length;i++){var b=h[i];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}fi=!!fd,hd=fd=null}finally{xe=l,pe.p=a,F.T=n}}e.current=t,Je=2}}function Rx(){if(Je===2){Je=0;var e=da,t=Zl,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var a=pe.p;pe.p=2;var l=xe;xe|=4;try{dx(e,t.alternate,t)}finally{xe=l,pe.p=a,F.T=n}}Je=3}}function Mx(){if(Je===4||Je===3){Je=0,aw();var e=da,t=Zl,n=Bl,a=wx;t.subtreeFlags&10256||t.flags&10256?Je=5:(Je=0,Zl=da=null,Ox(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(ua=null),Jd(n),t=t.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(ys,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=F.T,l=pe.p,pe.p=2,F.T=null;try{for(var r=e.onRecoverableError,o=0;o<a.length;o++){var i=a[o];r(i.value,{componentStack:i.stack})}}finally{F.T=t,pe.p=l}}Bl&3&&Hi(),pn(e),l=e.pendingLanes,n&4194090&&l&42?e===id?Kr++:(Kr=0,id=e):Kr=0,Rs(0)}}function Ox(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Es(t)))}function Hi(e){return Ax(),Rx(),Mx(),Dx()}function Dx(){if(Je!==5)return!1;var e=da,t=sd;sd=0;var n=Jd(Bl),a=F.T,l=pe.p;try{pe.p=32>n?32:n,F.T=null,n=od,od=null;var r=da,o=Bl;if(Je=0,Zl=da=null,Bl=0,xe&6)throw Error(M(331));var i=xe;if(xe|=4,bx(r.current),vx(r,r.current,o,n),xe=i,Rs(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(ys,r)}catch{}return!0}finally{pe.p=l,F.T=a,Ox(e,t)}}function Ym(e,t,n){t=Ut(n,t),t=td(e.stateNode,t,2),e=ca(e,t,2),e!==null&&(Ss(e,2),pn(e))}function je(e,t,n){if(e.tag===3)Ym(e,e,n);else for(;t!==null;){if(t.tag===3){Ym(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ua===null||!ua.has(a))){e=Ut(n,e),n=Fv(2),a=ca(t,n,2),a!==null&&(Wv(n,a,t,e),Ss(a,2),pn(a));break}}t=t.return}}function Jc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new Aj;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(Mf=!0,l.add(n),e=zj.bind(null,e,t,n),t.then(e,e))}function zj(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,_e===e&&(de&n)===n&&($e===4||$e===3&&(de&62914560)===de&&300>rn()-Df?!(xe&2)&&Fl(e,0):Of|=n,Kl===de&&(Kl=0)),pn(e)}function zx(e,t){t===0&&(t=Ag()),e=lr(e,t),e!==null&&(Ss(e,t),pn(e))}function Lj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zx(e,n)}function Uj(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(M(314))}a!==null&&a.delete(t),zx(e,n)}function $j(e,t){return Fd(e,t)}var ri=null,xl=null,ud=!1,si=!1,eu=!1,qa=0;function pn(e){e!==xl&&e.next===null&&(xl===null?ri=xl=e:xl=xl.next=e),si=!0,ud||(ud=!0,Hj())}function Rs(e,t){if(!eu&&si){eu=!0;do for(var n=!1,a=ri;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var r=0;else{var o=a.suspendedLanes,i=a.pingedLanes;r=(1<<31-Et(42|e)+1)-1,r&=l&~(o&~i),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Xm(a,r))}else r=de,r=Ci(a,a===_e?r:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(r&3)||bs(a,r)||(n=!0,Xm(a,r));a=a.next}while(n);eu=!1}}function Bj(){Lx()}function Lx(){si=ud=!1;var e=0;qa!==0&&(Qj()&&(e=qa),qa=0);for(var t=rn(),n=null,a=ri;a!==null;){var l=a.next,r=Ux(a,t);r===0?(a.next=null,n===null?ri=l:n.next=l,l===null&&(xl=n)):(n=a,(e!==0||r&3)&&(si=!0)),a=l}Rs(e)}function Ux(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var o=31-Et(r),i=1<<o,c=l[o];c===-1?(!(i&n)||i&a)&&(l[o]=dw(i,t)):c<=t&&(e.expiredLanes|=i),r&=~i}if(t=_e,n=de,n=Ci(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(ve===2||ve===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ec(a),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||bs(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Ec(a),Jd(n)){case 2:case 8:n=Tg;break;case 32:n=qo;break;case 268435456:n=Cg;break;default:n=qo}return a=$x.bind(null,e),n=Fd(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Ec(a),e.callbackPriority=2,e.callbackNode=null,2}function $x(e,t){if(Je!==0&&Je!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hi()&&e.callbackNode!==n)return null;var a=de;return a=Ci(e,e===_e?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Nx(e,a,t),Ux(e,rn()),e.callbackNode!=null&&e.callbackNode===n?$x.bind(null,e):null)}function Xm(e,t){if(Hi())return null;Nx(e,t,!0)}function Hj(){Zj(function(){xe&6?Fd(Eg,Bj):Lx()})}function Lf(){return qa===0&&(qa=kg()),qa}function Im(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:yo(""+e)}function Pm(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 qj(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var r=Im((l[vt]||null).action),o=a.submitter;o&&(t=(t=o[vt]||null)?Im(t.formAction):o.getAttribute("formAction"),t!==null&&(r=t,o=null));var i=new ki("action","action",null,a,l);e.push({event:i,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(qa!==0){var c=o?Pm(l,o):new FormData(l);Ju(n,{pending:!0,data:c,method:l.method,action:r},null,c)}}else typeof r=="function"&&(i.preventDefault(),c=o?Pm(l,o):new FormData(l),Ju(n,{pending:!0,data:c,method:l.method,action:r},r,c))},currentTarget:l}]})}}for(var tu=0;tu<qu.length;tu++){var nu=qu[tu],Gj=nu.toLowerCase(),Vj=nu[0].toUpperCase()+nu.slice(1);Ft(Gj,"on"+Vj)}Ft(Jg,"onAnimationEnd");Ft(ev,"onAnimationIteration");Ft(tv,"onAnimationStart");Ft("dblclick","onDoubleClick");Ft("focusin","onFocus");Ft("focusout","onBlur");Ft(sj,"onTransitionRun");Ft(oj,"onTransitionStart");Ft(ij,"onTransitionCancel");Ft(nv,"onTransitionEnd");Vl("onMouseEnter",["mouseout","mouseover"]);Vl("onMouseLeave",["mouseout","mouseover"]);Vl("onPointerEnter",["pointerout","pointerover"]);Vl("onPointerLeave",["pointerout","pointerover"]);Ja("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ja("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ja("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ja("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ja("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ja("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ss="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(" "),Yj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ss));function Bx(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var r=void 0;if(t)for(var o=a.length-1;0<=o;o--){var i=a[o],c=i.instance,u=i.currentTarget;if(i=i.listener,c!==r&&l.isPropagationStopped())break e;r=i,l.currentTarget=u;try{r(l)}catch(f){Jo(f)}l.currentTarget=null,r=c}else for(o=0;o<a.length;o++){if(i=a[o],c=i.instance,u=i.currentTarget,i=i.listener,c!==r&&l.isPropagationStopped())break e;r=i,l.currentTarget=u;try{r(l)}catch(f){Jo(f)}l.currentTarget=null,r=c}}}}function se(e,t){var n=t[Du];n===void 0&&(n=t[Du]=new Set);var a=e+"__bubble";n.has(a)||(Hx(t,e,2,!1),n.add(a))}function au(e,t,n){var a=0;t&&(a|=4),Hx(n,e,a,t)}var no="_reactListening"+Math.random().toString(36).slice(2);function Uf(e){if(!e[no]){e[no]=!0,Dg.forEach(function(n){n!=="selectionchange"&&(Yj.has(n)||au(n,!1,e),au(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[no]||(t[no]=!0,au("selectionchange",!1,t))}}function Hx(e,t,n,a){switch(Wx(t)){case 2:var l=vN;break;case 8:l=xN;break;default:l=qf}n=l.bind(null,t,n,e),l=void 0,!$u||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function lu(e,t,n,a,l){var r=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var i=a.stateNode.containerInfo;if(i===l)break;if(o===4)for(o=a.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===l)return;o=o.return}for(;i!==null;){if(o=Sl(i),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){a=r=o;continue e}i=i.parentNode}}a=a.return}Gg(function(){var u=r,f=nf(n),h=[];e:{var m=av.get(e);if(m!==void 0){var g=ki,w=e;switch(e){case"keypress":if(So(n)===0)break e;case"keydown":case"keyup":g=$w;break;case"focusin":w="focus",g=Dc;break;case"focusout":w="blur",g=Dc;break;case"beforeblur":case"afterblur":g=Dc;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=em;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Ew;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=qw;break;case Jg:case ev:case tv:g=kw;break;case nv:g=Vw;break;case"scroll":case"scrollend":g=Nw;break;case"wheel":g=Xw;break;case"copy":case"cut":case"paste":g=Rw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=nm;break;case"toggle":case"beforetoggle":g=Pw}var y=(t&4)!==0,S=!y&&(e==="scroll"||e==="scrollend"),v=y?m!==null?m+"Capture":null:m;y=[];for(var p=u,x;p!==null;){var b=p;if(x=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||x===null||v===null||(b=es(p,v),b!=null&&y.push(os(p,b,x))),S)break;p=p.return}0<y.length&&(m=new g(m,w,null,n,f),h.push({event:m,listeners:y}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",m&&n!==Uu&&(w=n.relatedTarget||n.fromElement)&&(Sl(w)||w[nr]))break e;if((g||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,g?(w=n.relatedTarget||n.toElement,g=u,w=w?Sl(w):null,w!==null&&(S=xs(w),y=w.tag,w!==S||y!==5&&y!==27&&y!==6)&&(w=null)):(g=null,w=u),g!==w)){if(y=em,b="onMouseLeave",v="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(y=nm,b="onPointerLeave",v="onPointerEnter",p="pointer"),S=g==null?m:Cr(g),x=w==null?m:Cr(w),m=new y(b,p+"leave",g,n,f),m.target=S,m.relatedTarget=x,b=null,Sl(f)===u&&(y=new y(v,p+"enter",w,n,f),y.target=x,y.relatedTarget=S,b=y),S=b,g&&w)t:{for(y=g,v=w,p=0,x=y;x;x=il(x))p++;for(x=0,b=v;b;b=il(b))x++;for(;0<p-x;)y=il(y),p--;for(;0<x-p;)v=il(v),x--;for(;p--;){if(y===v||v!==null&&y===v.alternate)break t;y=il(y),v=il(v)}y=null}else y=null;g!==null&&Qm(h,m,g,y,!1),w!==null&&S!==null&&Qm(h,S,w,y,!0)}}e:{if(m=u?Cr(u):window,g=m.nodeName&&m.nodeName.toLowerCase(),g==="select"||g==="input"&&m.type==="file")var j=sm;else if(rm(m))if(Qg)j=aj;else{j=tj;var k=ej}else g=m.nodeName,!g||g.toLowerCase()!=="input"||m.type!=="checkbox"&&m.type!=="radio"?u&&tf(u.elementType)&&(j=sm):j=nj;if(j&&(j=j(e,u))){Pg(h,j,n,f);break e}k&&k(e,m,u),e==="focusout"&&u&&m.type==="number"&&u.memoizedProps.value!=null&&Lu(m,"number",m.value)}switch(k=u?Cr(u):window,e){case"focusin":(rm(k)||k.contentEditable==="true")&&(Nl=k,Bu=u,Br=null);break;case"focusout":Br=Bu=Nl=null;break;case"mousedown":Hu=!0;break;case"contextmenu":case"mouseup":case"dragend":Hu=!1,dm(h,n,f);break;case"selectionchange":if(rj)break;case"keydown":case"keyup":dm(h,n,f)}var N;if(rf)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else jl?Xg(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(Yg&&n.locale!=="ko"&&(jl||_!=="onCompositionStart"?_==="onCompositionEnd"&&jl&&(N=Vg()):(la=f,af="value"in la?la.value:la.textContent,jl=!0)),k=oi(u,_),0<k.length&&(_=new tm(_,e,null,n,f),h.push({event:_,listeners:k}),N?_.data=N:(N=Ig(n),N!==null&&(_.data=N)))),(N=Kw?Zw(e,n):Fw(e,n))&&(_=oi(u,"onBeforeInput"),0<_.length&&(k=new tm("onBeforeInput","beforeinput",null,n,f),h.push({event:k,listeners:_}),k.data=N)),qj(h,e,u,n,f)}Bx(h,t)})}function os(e,t,n){return{instance:e,listener:t,currentTarget:n}}function oi(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,r=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||r===null||(l=es(e,n),l!=null&&a.unshift(os(e,l,r)),l=es(e,t),l!=null&&a.push(os(e,l,r))),e.tag===3)return a;e=e.return}return[]}function il(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qm(e,t,n,a,l){for(var r=t._reactName,o=[];n!==null&&n!==a;){var i=n,c=i.alternate,u=i.stateNode;if(i=i.tag,c!==null&&c===a)break;i!==5&&i!==26&&i!==27||u===null||(c=u,l?(u=es(n,r),u!=null&&o.unshift(os(n,u,c))):l||(u=es(n,r),u!=null&&o.push(os(n,u,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Xj=/\r\n?/g,Ij=/\u0000|\uFFFD/g;function Km(e){return(typeof e=="string"?e:""+e).replace(Xj,`
49
+ `).replace(Ij,"")}function qx(e,t){return t=Km(t),Km(e)===t}function qi(){}function Se(e,t,n,a,l,r){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Yl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Yl(e,""+a);break;case"className":Ks(e,"class",a);break;case"tabIndex":Ks(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Ks(e,n,a);break;case"style":qg(e,a,r);break;case"data":if(t!=="object"){Ks(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=yo(""+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"&&Se(e,t,"name",l.name,l,null),Se(e,t,"formEncType",l.formEncType,l,null),Se(e,t,"formMethod",l.formMethod,l,null),Se(e,t,"formTarget",l.formTarget,l,null)):(Se(e,t,"encType",l.encType,l,null),Se(e,t,"method",l.method,l,null),Se(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=yo(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=qi);break;case"onScroll":a!=null&&se("scroll",e);break;case"onScrollEnd":a!=null&&se("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(M(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(M(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=yo(""+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":se("beforetoggle",e),se("toggle",e),xo(e,"popover",a);break;case"xlinkActuate":yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":yn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":yn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":yn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":yn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":xo(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=ww.get(n)||n,xo(e,n,a))}}function dd(e,t,n,a,l,r){switch(n){case"style":qg(e,a,r);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(M(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(M(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Yl(e,a):(typeof a=="number"||typeof a=="bigint")&&Yl(e,""+a);break;case"onScroll":a!=null&&se("scroll",e);break;case"onScrollEnd":a!=null&&se("scrollend",e);break;case"onClick":a!=null&&(e.onclick=qi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zg.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),r=e[vt]||null,r=r!=null?r[n]:null,typeof r=="function"&&e.removeEventListener(t,r,l),typeof a=="function")){typeof r!="function"&&r!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,l);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):xo(e,n,a)}}}function tt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":se("error",e),se("load",e);var a=!1,l=!1,r;for(r in n)if(n.hasOwnProperty(r)){var o=n[r];if(o!=null)switch(r){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(M(137,t));default:Se(e,t,r,o,n,null)}}l&&Se(e,t,"srcSet",n.srcSet,n,null),a&&Se(e,t,"src",n.src,n,null);return;case"input":se("invalid",e);var i=r=o=l=null,c=null,u=null;for(a in n)if(n.hasOwnProperty(a)){var f=n[a];if(f!=null)switch(a){case"name":l=f;break;case"type":o=f;break;case"checked":c=f;break;case"defaultChecked":u=f;break;case"value":r=f;break;case"defaultValue":i=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(M(137,t));break;default:Se(e,t,a,f,n,null)}}$g(e,r,i,c,u,o,l,!1),Go(e);return;case"select":se("invalid",e),a=o=r=null;for(l in n)if(n.hasOwnProperty(l)&&(i=n[l],i!=null))switch(l){case"value":r=i;break;case"defaultValue":o=i;break;case"multiple":a=i;default:Se(e,t,l,i,n,null)}t=r,n=o,e.multiple=!!a,t!=null?Ol(e,!!a,t,!1):n!=null&&Ol(e,!!a,n,!0);return;case"textarea":se("invalid",e),r=l=a=null;for(o in n)if(n.hasOwnProperty(o)&&(i=n[o],i!=null))switch(o){case"value":a=i;break;case"defaultValue":l=i;break;case"children":r=i;break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(M(91));break;default:Se(e,t,o,i,n,null)}Hg(e,a,l,r),Go(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:Se(e,t,c,a,n,null)}return;case"dialog":se("beforetoggle",e),se("toggle",e),se("cancel",e),se("close",e);break;case"iframe":case"object":se("load",e);break;case"video":case"audio":for(a=0;a<ss.length;a++)se(ss[a],e);break;case"image":se("error",e),se("load",e);break;case"details":se("toggle",e);break;case"embed":case"source":case"link":se("error",e),se("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(u in n)if(n.hasOwnProperty(u)&&(a=n[u],a!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(M(137,t));default:Se(e,t,u,a,n,null)}return;default:if(tf(t)){for(f in n)n.hasOwnProperty(f)&&(a=n[f],a!==void 0&&dd(e,t,f,a,n,void 0));return}}for(i in n)n.hasOwnProperty(i)&&(a=n[i],a!=null&&Se(e,t,i,a,n,null))}function Pj(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 l=null,r=null,o=null,i=null,c=null,u=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)||Se(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":l=g;break;case"checked":u=g;break;case"defaultChecked":f=g;break;case"value":o=g;break;case"defaultValue":i=g;break;case"children":case"dangerouslySetInnerHTML":if(g!=null)throw Error(M(137,t));break;default:g!==h&&Se(e,t,m,g,a,h)}}zu(e,o,i,c,u,f,r,l);return;case"select":g=o=i=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)||Se(e,t,r,null,a,c)}for(l in a)if(r=a[l],c=n[l],a.hasOwnProperty(l)&&(r!=null||c!=null))switch(l){case"value":m=r;break;case"defaultValue":i=r;break;case"multiple":o=r;default:r!==c&&Se(e,t,l,r,a,c)}t=i,n=o,a=g,m!=null?Ol(e,!!n,m,!1):!!a!=!!n&&(t!=null?Ol(e,!!n,t,!0):Ol(e,!!n,n?[]:"",!1));return;case"textarea":g=m=null;for(i in n)if(l=n[i],n.hasOwnProperty(i)&&l!=null&&!a.hasOwnProperty(i))switch(i){case"value":break;case"children":break;default:Se(e,t,i,null,a,l)}for(o in a)if(l=a[o],r=n[o],a.hasOwnProperty(o)&&(l!=null||r!=null))switch(o){case"value":m=l;break;case"defaultValue":g=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(M(91));break;default:l!==r&&Se(e,t,o,l,a,r)}Bg(e,m,g);return;case"option":for(var w in n)if(m=n[w],n.hasOwnProperty(w)&&m!=null&&!a.hasOwnProperty(w))switch(w){case"selected":e.selected=!1;break;default:Se(e,t,w,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:Se(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 y in n)m=n[y],n.hasOwnProperty(y)&&m!=null&&!a.hasOwnProperty(y)&&Se(e,t,y,null,a,m);for(u in a)if(m=a[u],g=n[u],a.hasOwnProperty(u)&&m!==g&&(m!=null||g!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(M(137,t));break;default:Se(e,t,u,m,a,g)}return;default:if(tf(t)){for(var S in n)m=n[S],n.hasOwnProperty(S)&&m!==void 0&&!a.hasOwnProperty(S)&&dd(e,t,S,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||dd(e,t,f,m,a,g);return}}for(var v in n)m=n[v],n.hasOwnProperty(v)&&m!=null&&!a.hasOwnProperty(v)&&Se(e,t,v,null,a,m);for(h in a)m=a[h],g=n[h],!a.hasOwnProperty(h)||m===g||m==null&&g==null||Se(e,t,h,m,a,g)}var fd=null,hd=null;function ii(e){return e.nodeType===9?e:e.ownerDocument}function Zm(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 Gx(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 md(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 ru=null;function Qj(){var e=window.event;return e&&e.type==="popstate"?e===ru?!1:(ru=e,!0):(ru=null,!1)}var Vx=typeof setTimeout=="function"?setTimeout:void 0,Kj=typeof clearTimeout=="function"?clearTimeout:void 0,Fm=typeof Promise=="function"?Promise:void 0,Zj=typeof queueMicrotask=="function"?queueMicrotask:typeof Fm<"u"?function(e){return Fm.resolve(null).then(e).catch(Fj)}:Vx;function Fj(e){setTimeout(function(){throw e})}function ja(e){return e==="head"}function Wm(e,t){var n=t,a=0,l=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 o=e.ownerDocument;if(n&1&&Zr(o.documentElement),n&2&&Zr(o.body),n&4)for(n=o.head,Zr(n),o=n.firstChild;o;){var i=o.nextSibling,c=o.nodeName;o[ws]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=i}}if(l===0){e.removeChild(r),fs(t);return}l--}else n==="$"||n==="$?"||n==="$!"?l++:a=n.charCodeAt(0)-48;else a=0;n=r}while(n);fs(t)}function pd(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":pd(n),ef(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Wj(e,t,n,a){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[ws])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!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=Xt(e.nextSibling),e===null)break}return null}function Jj(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Xt(e.nextSibling),e===null))return null;return e}function gd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function eN(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 Xt(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 vd=null;function Jm(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 Yx(e,t,n){switch(t=ii(n),e){case"html":if(e=t.documentElement,!e)throw Error(M(452));return e;case"head":if(e=t.head,!e)throw Error(M(453));return e;case"body":if(e=t.body,!e)throw Error(M(454));return e;default:throw Error(M(451))}}function Zr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ef(e)}var qt=new Map,ep=new Set;function ci(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Bn=pe.d;pe.d={f:tN,r:nN,D:aN,C:lN,L:rN,m:sN,X:iN,S:oN,M:cN};function tN(){var e=Bn.f(),t=$i();return e||t}function nN(e){var t=ar(e);t!==null&&t.tag===5&&t.type==="form"?Uv(t):Bn.r(e)}var sr=typeof document>"u"?null:document;function Xx(e,t,n){var a=sr;if(a&&typeof t=="string"&&t){var l=Lt(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),ep.has(l)||(ep.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),tt(t,"link",e),Ke(t),a.head.appendChild(t)))}}function aN(e){Bn.D(e),Xx("dns-prefetch",e,null)}function lN(e,t){Bn.C(e,t),Xx("preconnect",e,t)}function rN(e,t,n){Bn.L(e,t,n);var a=sr;if(a&&e&&t){var l='link[rel="preload"][as="'+Lt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Lt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Lt(n.imageSizes)+'"]')):l+='[href="'+Lt(e)+'"]';var r=l;switch(t){case"style":r=Wl(e);break;case"script":r=or(e)}qt.has(r)||(e=Ee({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),qt.set(r,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(Ms(r))||t==="script"&&a.querySelector(Os(r))||(t=a.createElement("link"),tt(t,"link",e),Ke(t),a.head.appendChild(t)))}}function sN(e,t){Bn.m(e,t);var n=sr;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Lt(a)+'"][href="'+Lt(e)+'"]',r=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=or(e)}if(!qt.has(r)&&(e=Ee({rel:"modulepreload",href:e},t),qt.set(r,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Os(r)))return}a=n.createElement("link"),tt(a,"link",e),Ke(a),n.head.appendChild(a)}}}function oN(e,t,n){Bn.S(e,t,n);var a=sr;if(a&&e){var l=Ml(a).hoistableStyles,r=Wl(e);t=t||"default";var o=l.get(r);if(!o){var i={loading:0,preload:null};if(o=a.querySelector(Ms(r)))i.loading=5;else{e=Ee({rel:"stylesheet",href:e,"data-precedence":t},n),(n=qt.get(r))&&$f(e,n);var c=o=a.createElement("link");Ke(c),tt(c,"link",e),c._p=new Promise(function(u,f){c.onload=u,c.onerror=f}),c.addEventListener("load",function(){i.loading|=1}),c.addEventListener("error",function(){i.loading|=2}),i.loading|=4,Co(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:i},l.set(r,o)}}}function iN(e,t){Bn.X(e,t);var n=sr;if(n&&e){var a=Ml(n).hoistableScripts,l=or(e),r=a.get(l);r||(r=n.querySelector(Os(l)),r||(e=Ee({src:e,async:!0},t),(t=qt.get(l))&&Bf(e,t),r=n.createElement("script"),Ke(r),tt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(l,r))}}function cN(e,t){Bn.M(e,t);var n=sr;if(n&&e){var a=Ml(n).hoistableScripts,l=or(e),r=a.get(l);r||(r=n.querySelector(Os(l)),r||(e=Ee({src:e,async:!0,type:"module"},t),(t=qt.get(l))&&Bf(e,t),r=n.createElement("script"),Ke(r),tt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(l,r))}}function tp(e,t,n,a){var l=(l=oa.current)?ci(l):null;if(!l)throw Error(M(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Wl(n.href),n=Ml(l).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=Wl(n.href);var r=Ml(l).hoistableStyles,o=r.get(e);if(o||(l=l.ownerDocument||l,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,o),(r=l.querySelector(Ms(e)))&&!r._p&&(o.instance=r,o.state.loading=5),qt.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},qt.set(e,n),r||uN(l,e,n,o.state))),t&&a===null)throw Error(M(528,""));return o}if(t&&a!==null)throw Error(M(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=or(n),n=Ml(l).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(M(444,e))}}function Wl(e){return'href="'+Lt(e)+'"'}function Ms(e){return'link[rel="stylesheet"]['+e+"]"}function Ix(e){return Ee({},e,{"data-precedence":e.precedence,precedence:null})}function uN(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}),tt(t,"link",n),Ke(t),e.head.appendChild(t))}function or(e){return'[src="'+Lt(e)+'"]'}function Os(e){return"script[async]"+e}function np(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Lt(n.href)+'"]');if(a)return t.instance=a,Ke(a),a;var l=Ee({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ke(a),tt(a,"style",l),Co(a,n.precedence,e),t.instance=a;case"stylesheet":l=Wl(n.href);var r=e.querySelector(Ms(l));if(r)return t.state.loading|=4,t.instance=r,Ke(r),r;a=Ix(n),(l=qt.get(l))&&$f(a,l),r=(e.ownerDocument||e).createElement("link"),Ke(r);var o=r;return o._p=new Promise(function(i,c){o.onload=i,o.onerror=c}),tt(r,"link",a),t.state.loading|=4,Co(r,n.precedence,e),t.instance=r;case"script":return r=or(n.src),(l=e.querySelector(Os(r)))?(t.instance=l,Ke(l),l):(a=n,(l=qt.get(r))&&(a=Ee({},n),Bf(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),Ke(l),tt(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(M(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,Co(a,n.precedence,e));return t.instance}function Co(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,r=l,o=0;o<a.length;o++){var i=a[o];if(i.dataset.precedence===t)r=i;else if(r!==l)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function $f(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Bf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ko=null;function ap(e,t,n){if(ko===null){var a=new Map,l=ko=new Map;l.set(n,a)}else l=ko,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var r=n[l];if(!(r[ws]||r[rt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var o=r.getAttribute(t)||"";o=e+o;var i=a.get(o);i?i.push(r):a.set(o,[r])}}return a}function lp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function dN(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 Px(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var is=null;function fN(){}function hN(e,t,n){if(is===null)throw Error(M(475));var a=is;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var l=Wl(n.href),r=e.querySelector(Ms(l));if(r){e=r._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=ui.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=r,Ke(r);return}r=e.ownerDocument||e,n=Ix(n),(l=qt.get(l))&&$f(n,l),r=r.createElement("link"),Ke(r);var o=r;o._p=new Promise(function(i,c){o.onload=i,o.onerror=c}),tt(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=ui.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function mN(){if(is===null)throw Error(M(475));var e=is;return e.stylesheets&&e.count===0&&xd(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&xd(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 ui(){if(this.count--,this.count===0){if(this.stylesheets)xd(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var di=null;function xd(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,di=new Map,t.forEach(pN,e),di=null,ui.call(e))}function pN(e,t){if(!(t.state.loading&4)){var n=di.get(e);if(n)var a=n.get(null);else{n=new Map,di.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<l.length;r++){var o=l[r];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),a=o)}a&&n.set(null,a)}l=t.instance,o=l.getAttribute("data-precedence"),r=n.get(o)||a,r===a&&n.set(null,l),n.set(o,l),this.count++,a=ui.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),r?r.parentNode.insertBefore(l,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var cs={$$typeof:En,Provider:null,Consumer:null,_currentValue:za,_currentValue2:za,_threadCount:0};function gN(e,t,n,a,l,r,o,i){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=Tc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tc(0),this.hiddenUpdates=Tc(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=r,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=i,this.incompleteTransitions=new Map}function Qx(e,t,n,a,l,r,o,i,c,u,f,h){return e=new gN(e,t,n,o,i,c,u,h),t=1,r===!0&&(t|=24),r=Nt(3,null,null,t),e.current=r,r.stateNode=e,t=hf(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:a,isDehydrated:n,cache:t},pf(r),e}function Kx(e){return e?(e=Tl,e):Tl}function Zx(e,t,n,a,l,r){l=Kx(l),a.context===null?a.context=l:a.pendingContext=l,a=ia(t),a.payload={element:n},r=r===void 0?null:r,r!==null&&(a.callback=r),n=ca(e,a,t),n!==null&&(Ct(n,e,t),Gr(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Hf(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function Fx(e){if(e.tag===13){var t=lr(e,67108864);t!==null&&Ct(t,e,67108864),Hf(e,67108864)}}var fi=!0;function vN(e,t,n,a){var l=F.T;F.T=null;var r=pe.p;try{pe.p=2,qf(e,t,n,a)}finally{pe.p=r,F.T=l}}function xN(e,t,n,a){var l=F.T;F.T=null;var r=pe.p;try{pe.p=8,qf(e,t,n,a)}finally{pe.p=r,F.T=l}}function qf(e,t,n,a){if(fi){var l=yd(a);if(l===null)lu(e,t,a,hi,n),sp(e,a);else if(bN(l,e,t,n,a))a.stopPropagation();else if(sp(e,a),t&4&&-1<yN.indexOf(e)){for(;l!==null;){var r=ar(l);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var o=Ra(r.pendingLanes);if(o!==0){var i=r;for(i.pendingLanes|=2,i.entangledLanes|=2;o;){var c=1<<31-Et(o);i.entanglements[1]|=c,o&=~c}pn(r),!(xe&6)&&(ai=rn()+500,Rs(0))}}break;case 13:i=lr(r,2),i!==null&&Ct(i,r,2),$i(),Hf(r,2)}if(r=yd(a),r===null&&lu(e,t,a,hi,n),r===l)break;l=r}l!==null&&a.stopPropagation()}else lu(e,t,a,null,n)}}function yd(e){return e=nf(e),Gf(e)}var hi=null;function Gf(e){if(hi=null,e=Sl(e),e!==null){var t=xs(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=wg(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 hi=e,null}function Wx(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(lw()){case Eg:return 2;case Tg:return 8;case qo:case rw:return 32;case Cg:return 268435456;default:return 32}default:return 32}}var bd=!1,fa=null,ha=null,ma=null,us=new Map,ds=new Map,na=[],yN="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 sp(e,t){switch(e){case"focusin":case"focusout":fa=null;break;case"dragenter":case"dragleave":ha=null;break;case"mouseover":case"mouseout":ma=null;break;case"pointerover":case"pointerout":us.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ds.delete(t.pointerId)}}function jr(e,t,n,a,l,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:r,targetContainers:[l]},t!==null&&(t=ar(t),t!==null&&Fx(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function bN(e,t,n,a,l){switch(t){case"focusin":return fa=jr(fa,e,t,n,a,l),!0;case"dragenter":return ha=jr(ha,e,t,n,a,l),!0;case"mouseover":return ma=jr(ma,e,t,n,a,l),!0;case"pointerover":var r=l.pointerId;return us.set(r,jr(us.get(r)||null,e,t,n,a,l)),!0;case"gotpointercapture":return r=l.pointerId,ds.set(r,jr(ds.get(r)||null,e,t,n,a,l)),!0}return!1}function Jx(e){var t=Sl(e.target);if(t!==null){var n=xs(t);if(n!==null){if(t=n.tag,t===13){if(t=wg(n),t!==null){e.blockedOn=t,hw(e.priority,function(){if(n.tag===13){var a=Tt();a=Wd(a);var l=lr(n,a);l!==null&&Ct(l,n,a),Hf(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 Ao(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=yd(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Uu=a,n.target.dispatchEvent(a),Uu=null}else return t=ar(n),t!==null&&Fx(t),e.blockedOn=n,!1;t.shift()}return!0}function op(e,t,n){Ao(e)&&n.delete(t)}function SN(){bd=!1,fa!==null&&Ao(fa)&&(fa=null),ha!==null&&Ao(ha)&&(ha=null),ma!==null&&Ao(ma)&&(ma=null),us.forEach(op),ds.forEach(op)}function ao(e,t){e.blockedOn===t&&(e.blockedOn=null,bd||(bd=!0,Ie.unstable_scheduleCallback(Ie.unstable_NormalPriority,SN)))}var lo=null;function ip(e){lo!==e&&(lo=e,Ie.unstable_scheduleCallback(Ie.unstable_NormalPriority,function(){lo===e&&(lo=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(Gf(a||n)===null)continue;break}var r=ar(n);r!==null&&(e.splice(t,3),t-=3,Ju(r,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function fs(e){function t(c){return ao(c,e)}fa!==null&&ao(fa,e),ha!==null&&ao(ha,e),ma!==null&&ao(ma,e),us.forEach(t),ds.forEach(t);for(var n=0;n<na.length;n++){var a=na[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<na.length&&(n=na[0],n.blockedOn===null);)Jx(n),n.blockedOn===null&&na.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],r=n[a+1],o=l[vt]||null;if(typeof r=="function")o||ip(n);else if(o){var i=null;if(r&&r.hasAttribute("formAction")){if(l=r,o=r[vt]||null)i=o.formAction;else if(Gf(l)!==null)continue}else i=o.action;typeof i=="function"?n[a+1]=i:(n.splice(a,3),a-=3),ip(n)}}}function Vf(e){this._internalRoot=e}Gi.prototype.render=Vf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));var n=t.current,a=Tt();Zx(n,a,e,t,null,null)};Gi.prototype.unmount=Vf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zx(e.current,2,null,e,null,null),$i(),t[nr]=null}};function Gi(e){this._internalRoot=e}Gi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Og();e={blockedOn:null,target:e,priority:t};for(var n=0;n<na.length&&t!==0&&t<na[n].priority;n++);na.splice(n,0,e),n===0&&Jx(e)}};var cp=bg.version;if(cp!=="19.1.0")throw Error(M(527,cp,"19.1.0"));pe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=FS(t),e=e!==null?jg(e):null,e=e===null?null:e.stateNode,e};var wN={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ro=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ro.isDisabled&&ro.supportsFiber)try{ys=ro.inject(wN),_t=ro}catch{}}Ei.createRoot=function(e,t){if(!Sg(e))throw Error(M(299));var n=!1,a="",l=Qv,r=Kv,o=Zv,i=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(i=t.unstable_transitionCallbacks)),t=Qx(e,1,!1,null,null,n,a,l,r,o,i,null),e[nr]=t.current,Uf(e),new Vf(t)};Ei.hydrateRoot=function(e,t,n){if(!Sg(e))throw Error(M(299));var a=!1,l="",r=Qv,o=Kv,i=Zv,c=null,u=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(i=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(c=n.unstable_transitionCallbacks),n.formState!==void 0&&(u=n.formState)),t=Qx(e,1,!0,t,n??null,a,l,r,o,i,c,u),t.context=Kx(null),n=t.current,a=Tt(),a=Wd(a),l=ia(a),l.callback=null,ca(n,l,a),n=a,t.current.lanes=n,Ss(t,n),pn(t),e[nr]=t.current,Uf(e),new Gi(t)};Ei.version="19.1.0";function ey(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ey)}catch(e){console.error(e)}}ey(),mg.exports=Ei;var jN=mg.exports;const ty=d.createContext(null);function ny({data:e,router:t,identity:n,notify:a,children:l}){return s.jsx(ty.Provider,{value:{data:e,router:t,identity:n,notify:a},children:l})}function Vi(){const e=d.useContext(ty);if(!e)throw new Error("A shared app page rendered outside AppUiProvider.");return e}const NN={success:()=>{},error:()=>{}},ir=()=>Vi().data,yt=()=>Vi().router,Yf=()=>Vi().identity,Xf=()=>Vi().notify??NN;function _N(){const{probe:e}=ir(),{href:t,Link:n}=yt(),a=Yf(),[l,r]=d.useState(null),[o,i]=d.useState(!1);return d.useEffect(()=>{let c=!0;if(!e){i(!0);return}return e.source().then(u=>c&&r(u.label),()=>c&&i(!0)),()=>{c=!1}},[e]),s.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:[s.jsx("h1",{className:"text-xl font-semibold",children:"Shared app UI"}),s.jsx("p",{"data-testid":"app-ui-probe-source",className:"text-sm text-muted-foreground",children:o?"Data source unavailable":l??"Loading…"}),s.jsxs("p",{"data-testid":"app-ui-probe-identity",className:"text-sm",children:[a.label," · ",a.can("tasks.write")?"can edit tasks":"read only"]}),s.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 EN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),TN=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),up=e=>{const t=TN(e);return t.charAt(0).toUpperCase()+t.slice(1)},ay=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),CN=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 kN={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 AN=d.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:l="",children:r,iconNode:o,...i},c)=>d.createElement("svg",{ref:c,...kN,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:ay("lucide",l),...!r&&!CN(i)&&{"aria-hidden":"true"},...i},[...o.map(([u,f])=>d.createElement(u,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 fe=(e,t)=>{const n=d.forwardRef(({className:a,...l},r)=>d.createElement(AN,{ref:r,iconNode:t,className:ay(`lucide-${EN(up(e))}`,`lucide-${e}`,a),...l}));return n.displayName=up(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 RN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],MN=fe("arrow-down",RN);/**
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 ON=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],DN=fe("arrow-up",ON);/**
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 zN=[["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"}]],LN=fe("bot",zN);/**
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 UN=[["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"}]],$N=fe("briefcase",UN);/**
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 BN=[["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"}]],HN=fe("building-2",BN);/**
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 qN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],If=fe("check",qN);/**
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 GN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],VN=fe("chevron-down",GN);/**
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 YN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ly=fe("chevron-right",YN);/**
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 XN=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],IN=fe("chevron-up",XN);/**
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 PN=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],QN=fe("chevrons-up-down",PN);/**
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 KN=[["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"}]],It=fe("circle-alert",KN);/**
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 ZN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],FN=fe("circle",ZN);/**
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 WN=[["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"}]],JN=fe("ellipsis",WN);/**
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 e_=[["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"}]],t_=fe("eye",e_);/**
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 n_=[["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"}]],ry=fe("folder-git-2",n_);/**
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 a_=[["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"}]],l_=fe("folder-git",a_);/**
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 r_=[["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"}]],s_=fe("git-fork",r_);/**
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 o_=[["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"}]],i_=fe("hard-drive",o_);/**
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 c_=[["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"}]],u_=fe("house",c_);/**
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 d_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ya=fe("info",d_);/**
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 f_=[["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"}]],sy=fe("list-checks",f_);/**
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 h_=[["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"}]],oy=fe("list-ordered",h_);/**
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 m_=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],p_=fe("loader-circle",m_);/**
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 g_=[["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"}]],v_=fe("messages-square",g_);/**
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 x_=[["path",{d:"M5 12h14",key:"1ays0h"}]],y_=fe("minus",x_);/**
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 b_=[["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"}]],S_=fe("network",b_);/**
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 w_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],j_=fe("panel-left",w_);/**
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 N_=[["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"}]],__=fe("pause",N_);/**
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 E_=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],dp=fe("plus",E_);/**
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 T_=[["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"}]],iy=fe("search-x",T_);/**
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 C_=[["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"}]],k_=fe("snowflake",C_);/**
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 A_=[["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"}]],R_=fe("user-cog",A_);/**
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 M_=[["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"}]],O_=fe("user",M_);/**
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 D_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cy=fe("x",D_);function uy(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=uy(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function dy(){for(var e,t,n=0,a="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=uy(e))&&(a&&(a+=" "),a+=t);return a}const fp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hp=dy,Ds=(e,t)=>n=>{var a;if((t==null?void 0:t.variants)==null)return hp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:l,defaultVariants:r}=t,o=Object.keys(l).map(u=>{const f=n==null?void 0:n[u],h=r==null?void 0:r[u];if(f===null)return null;const m=fp(f)||fp(h);return l[u][m]}),i=n&&Object.entries(n).reduce((u,f)=>{let[h,m]=f;return m===void 0||(u[h]=m),u},{}),c=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((u,f)=>{let{class:h,className:m,...g}=f;return Object.entries(g).every(w=>{let[y,S]=w;return Array.isArray(S)?S.includes({...r,...i}[y]):{...r,...i}[y]===S})?[...u,h,m]:u},[]);return hp(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)},Pf="-",z_=e=>{const t=U_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:o=>{const i=o.split(Pf);return i[0]===""&&i.length!==1&&i.shift(),fy(i,t)||L_(o)},getConflictingClassGroupIds:(o,i)=>{const c=n[o]||[];return i&&a[o]?[...c,...a[o]]:c}}},fy=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],a=t.nextPart.get(n),l=a?fy(e.slice(1),a):void 0;if(l)return l;if(t.validators.length===0)return;const r=e.join(Pf);return(o=t.validators.find(({validator:i})=>i(r)))==null?void 0:o.classGroupId},mp=/^\[(.+)\]$/,L_=e=>{if(mp.test(e)){const t=mp.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},U_=e=>{const{theme:t,classGroups:n}=e,a={nextPart:new Map,validators:[]};for(const l in n)Sd(n[l],a,l,t);return a},Sd=(e,t,n,a)=>{e.forEach(l=>{if(typeof l=="string"){const r=l===""?t:pp(t,l);r.classGroupId=n;return}if(typeof l=="function"){if($_(l)){Sd(l(a),t,n,a);return}t.validators.push({validator:l,classGroupId:n});return}Object.entries(l).forEach(([r,o])=>{Sd(o,pp(t,r),n,a)})})},pp=(e,t)=>{let n=e;return t.split(Pf).forEach(a=>{n.nextPart.has(a)||n.nextPart.set(a,{nextPart:new Map,validators:[]}),n=n.nextPart.get(a)}),n},$_=e=>e.isThemeGetter,B_=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,a=new Map;const l=(r,o)=>{n.set(r,o),t++,t>e&&(t=0,a=n,n=new Map)};return{get(r){let o=n.get(r);if(o!==void 0)return o;if((o=a.get(r))!==void 0)return l(r,o),o},set(r,o){n.has(r)?n.set(r,o):l(r,o)}}},wd="!",jd=":",H_=jd.length,q_=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=l=>{const r=[];let o=0,i=0,c=0,u;for(let w=0;w<l.length;w++){let y=l[w];if(o===0&&i===0){if(y===jd){r.push(l.slice(c,w)),c=w+H_;continue}if(y==="/"){u=w;continue}}y==="["?o++:y==="]"?o--:y==="("?i++:y===")"&&i--}const f=r.length===0?l:l.substring(c),h=G_(f),m=h!==f,g=u&&u>c?u-c:void 0;return{modifiers:r,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:g}};if(t){const l=t+jd,r=a;a=o=>o.startsWith(l)?r(o.substring(l.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const l=a;a=r=>n({className:r,parseClassName:l})}return a},G_=e=>e.endsWith(wd)?e.substring(0,e.length-1):e.startsWith(wd)?e.substring(1):e,V_=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(a=>[a,!0]));return a=>{if(a.length<=1)return a;const l=[];let r=[];return a.forEach(o=>{o[0]==="["||t[o]?(l.push(...r.sort(),o),r=[]):r.push(o)}),l.push(...r.sort()),l}},Y_=e=>({cache:B_(e.cacheSize),parseClassName:q_(e),sortModifiers:V_(e),...z_(e)}),X_=/\s+/,I_=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:l,sortModifiers:r}=t,o=[],i=e.trim().split(X_);let c="";for(let u=i.length-1;u>=0;u-=1){const f=i[u],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:y}=n(f);if(h){c=f+(c.length>0?" "+c:c);continue}let S=!!y,v=a(S?w.substring(0,y):w);if(!v){if(!S){c=f+(c.length>0?" "+c:c);continue}if(v=a(w),!v){c=f+(c.length>0?" "+c:c);continue}S=!1}const p=r(m).join(":"),x=g?p+wd:p,b=x+v;if(o.includes(b))continue;o.push(b);const j=l(v,S);for(let k=0;k<j.length;++k){const N=j[k];o.push(x+N)}c=f+(c.length>0?" "+c:c)}return c};function P_(){let e=0,t,n,a="";for(;e<arguments.length;)(t=arguments[e++])&&(n=hy(t))&&(a&&(a+=" "),a+=n);return a}const hy=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=hy(e[a]))&&(n&&(n+=" "),n+=t);return n};function Q_(e,...t){let n,a,l,r=o;function o(c){const u=t.reduce((f,h)=>h(f),e());return n=Y_(u),a=n.cache.get,l=n.cache.set,r=i,i(c)}function i(c){const u=a(c);if(u)return u;const f=I_(c,n);return l(c,f),f}return function(){return r(P_.apply(null,arguments))}}const Ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},my=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,py=/^\((?:(\w[\w-]*):)?(.+)\)$/i,K_=/^\d+\/\d+$/,Z_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F_=/\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$/,W_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,J_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,e2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cl=e=>K_.test(e),le=e=>!!e&&!Number.isNaN(Number(e)),In=e=>!!e&&Number.isInteger(Number(e)),su=e=>e.endsWith("%")&&le(e.slice(0,-1)),wn=e=>Z_.test(e),t2=()=>!0,n2=e=>F_.test(e)&&!W_.test(e),gy=()=>!1,a2=e=>J_.test(e),l2=e=>e2.test(e),r2=e=>!Y(e)&&!X(e),s2=e=>cr(e,yy,gy),Y=e=>my.test(e),Aa=e=>cr(e,by,n2),ou=e=>cr(e,d2,le),gp=e=>cr(e,vy,gy),o2=e=>cr(e,xy,l2),so=e=>cr(e,Sy,a2),X=e=>py.test(e),Nr=e=>ur(e,by),i2=e=>ur(e,f2),vp=e=>ur(e,vy),c2=e=>ur(e,yy),u2=e=>ur(e,xy),oo=e=>ur(e,Sy,!0),cr=(e,t,n)=>{const a=my.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},ur=(e,t,n=!1)=>{const a=py.exec(e);return a?a[1]?t(a[1]):n:!1},vy=e=>e==="position"||e==="percentage",xy=e=>e==="image"||e==="url",yy=e=>e==="length"||e==="size"||e==="bg-size",by=e=>e==="length",d2=e=>e==="number",f2=e=>e==="family-name",Sy=e=>e==="shadow",h2=()=>{const e=Ve("color"),t=Ve("font"),n=Ve("text"),a=Ve("font-weight"),l=Ve("tracking"),r=Ve("leading"),o=Ve("breakpoint"),i=Ve("container"),c=Ve("spacing"),u=Ve("radius"),f=Ve("shadow"),h=Ve("inset-shadow"),m=Ve("text-shadow"),g=Ve("drop-shadow"),w=Ve("blur"),y=Ve("perspective"),S=Ve("aspect"),v=Ve("ease"),p=Ve("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...b(),X,Y],k=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],_=()=>[X,Y,c],D=()=>[cl,"full","auto",..._()],A=()=>[In,"none","subgrid",X,Y],O=()=>["auto",{span:["full",In,X,Y]},In,X,Y],H=()=>[In,"auto",X,Y],L=()=>["auto","min","max","fr",X,Y],B=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],C=()=>["auto",..._()],$=()=>[cl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],E=()=>[e,X,Y],z=()=>[...b(),vp,gp,{position:[X,Y]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",c2,s2,{size:[X,Y]}],q=()=>[su,Nr,Aa],Z=()=>["","none","full",u,X,Y],G=()=>["",le,Nr,Aa],ge=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[le,su,vp,gp],K=()=>["","none",w,X,Y],te=()=>["none",le,X,Y],ie=()=>["none",le,X,Y],ce=()=>[le,X,Y],ue=()=>[cl,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wn],breakpoint:[wn],color:[t2],container:[wn],"drop-shadow":[wn],ease:["in","out","in-out"],font:[r2],"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",le],text:[wn],"text-shadow":[wn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",cl,Y,X,S]}],container:["container"],columns:[{columns:[le,Y,X,i]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:j()}],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:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[In,"auto",X,Y]}],basis:[{basis:[cl,"full","auto",i,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[le,cl,"auto","initial","none",Y]}],grow:[{grow:["",le,X,Y]}],shrink:[{shrink:["",le,X,Y]}],order:[{order:[In,"first","last","none",X,Y]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[i,"screen",...$()]}],"min-w":[{"min-w":[i,"screen","none",...$()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[o]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",n,Nr,Aa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,X,ou]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",su,Y]}],"font-family":[{font:[i2,Y,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:[l,X,Y]}],"line-clamp":[{"line-clamp":[le,"none",X,ou]}],leading:[{leading:[r,..._()]}],"list-image":[{"list-image":["none",X,Y]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",X,Y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[le,"from-font","auto",X,Aa]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[le,"auto",X,Y]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X,Y]}],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",X,Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},In,X,Y],radial:["",X,Y],conic:[In,X,Y]},u2,o2]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[le,X,Y]}],"outline-w":[{outline:["",le,Nr,Aa]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",f,oo,so]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",h,oo,so]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[le,Aa]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",m,oo,so]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[le,X,Y]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"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":[le]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[X,Y]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[le]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",X,Y]}],filter:[{filter:["","none",X,Y]}],blur:[{blur:K()}],brightness:[{brightness:[le,X,Y]}],contrast:[{contrast:[le,X,Y]}],"drop-shadow":[{"drop-shadow":["","none",g,oo,so]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",le,X,Y]}],"hue-rotate":[{"hue-rotate":[le,X,Y]}],invert:[{invert:["",le,X,Y]}],saturate:[{saturate:[le,X,Y]}],sepia:[{sepia:["",le,X,Y]}],"backdrop-filter":[{"backdrop-filter":["","none",X,Y]}],"backdrop-blur":[{"backdrop-blur":K()}],"backdrop-brightness":[{"backdrop-brightness":[le,X,Y]}],"backdrop-contrast":[{"backdrop-contrast":[le,X,Y]}],"backdrop-grayscale":[{"backdrop-grayscale":["",le,X,Y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[le,X,Y]}],"backdrop-invert":[{"backdrop-invert":["",le,X,Y]}],"backdrop-opacity":[{"backdrop-opacity":[le,X,Y]}],"backdrop-saturate":[{"backdrop-saturate":[le,X,Y]}],"backdrop-sepia":[{"backdrop-sepia":["",le,X,Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",X,Y]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[le,"initial",X,Y]}],ease:[{ease:["linear","initial",v,X,Y]}],delay:[{delay:[le,X,Y]}],animate:[{animate:["none",p,X,Y]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,X,Y]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[X,Y,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"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:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"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",X,Y]}],"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":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",X,Y]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[le,Nr,Aa,ou]}],stroke:[{stroke:["none",...E()]}],"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"]}},m2=Q_(h2);function I(...e){return m2(dy(e))}const p2=Ds("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 Re({className:e,variant:t,...n}){return s.jsx("div",{"data-slot":"alert",role:"alert",className:I(p2({variant:t}),e),...n})}function Le({className:e,...t}){return s.jsx("div",{"data-slot":"alert-title",className:I("col-start-2 min-h-4 font-medium tracking-tight",e),...t})}function Me({className:e,...t}){return s.jsx("div",{"data-slot":"alert-description",className:I("col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function P(e,t,{checkForDefaultPrevented:n=!0}={}){return function(l){if(e==null||e(l),n===!1||!l.defaultPrevented)return t==null?void 0:t(l)}}function xp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Yi(...e){return t=>{let n=!1;const a=e.map(l=>{const r=xp(l,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let l=0;l<a.length;l++){const r=a[l];typeof r=="function"?r():xp(e[l],null)}}}}function ye(...e){return d.useCallback(Yi(...e),e)}function g2(e,t){const n=d.createContext(t),a=r=>{const{children:o,...i}=r,c=d.useMemo(()=>i,Object.values(i));return s.jsx(n.Provider,{value:c,children:o})};a.displayName=e+"Provider";function l(r){const o=d.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}return[a,l]}function Hn(e,t=[]){let n=[];function a(r,o){const i=d.createContext(o),c=n.length;n=[...n,o];const u=h=>{var v;const{scope:m,children:g,...w}=h,y=((v=m==null?void 0:m[e])==null?void 0:v[c])||i,S=d.useMemo(()=>w,Object.values(w));return s.jsx(y.Provider,{value:S,children:g})};u.displayName=r+"Provider";function f(h,m){var y;const g=((y=m==null?void 0:m[e])==null?void 0:y[c])||i,w=d.useContext(g);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${r}\``)}return[u,f]}const l=()=>{const r=n.map(o=>d.createContext(o));return function(i){const c=(i==null?void 0:i[e])||r;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return l.scopeName=e,[a,v2(l,...t)]}function v2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(r){const o=a.reduce((i,{useScope:c,scopeName:u})=>{const h=c(r)[`__scope${u}`];return{...i,...h}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var ot=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},x2=hg[" useId ".trim().toString()]||(()=>{}),y2=0;function on(e){const[t,n]=d.useState(x2());return ot(()=>{n(a=>a??String(y2++))},[e]),t?`radix-${t}`:""}var b2=hg[" useInsertionEffect ".trim().toString()]||ot;function Ia({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[l,r,o]=S2({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:l;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const h=f.current;h!==i&&console.warn(`${a} is changing from ${h?"controlled":"uncontrolled"} to ${i?"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=i},[i,a])}const u=d.useCallback(f=>{var h;if(i){const m=w2(f)?f(e):f;m!==e&&((h=o.current)==null||h.call(o,m))}else r(f)},[i,e,r,o]);return[c,u]}function S2({defaultProp:e,onChange:t}){const[n,a]=d.useState(e),l=d.useRef(n),r=d.useRef(t);return b2(()=>{r.current=t},[t]),d.useEffect(()=>{var o;l.current!==n&&((o=r.current)==null||o.call(r,n),l.current=n)},[n,l]),[n,a,r]}function w2(e){return typeof e=="function"}function Pa(e){const t=N2(e),n=d.forwardRef((a,l)=>{const{children:r,...o}=a,i=d.Children.toArray(r),c=i.find(E2);if(c){const u=c.props.children,f=i.map(h=>h===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:h);return s.jsx(t,{...o,ref:l,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return s.jsx(t,{...o,ref:l,children:r})});return n.displayName=`${e}.Slot`,n}var j2=Pa("Slot");function N2(e){const t=d.forwardRef((n,a)=>{const{children:l,...r}=n;if(d.isValidElement(l)){const o=C2(l),i=T2(r,l.props);return l.type!==d.Fragment&&(i.ref=a?Yi(a,o):o),d.cloneElement(l,i)}return d.Children.count(l)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _2=Symbol("radix.slottable");function E2(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_2}function T2(e,t){const n={...t};for(const a in t){const l=e[a],r=t[a];/^on[A-Z]/.test(a)?l&&r?n[a]=(...i)=>{const c=r(...i);return l(...i),c}:l&&(n[a]=l):a==="style"?n[a]={...l,...r}:a==="className"&&(n[a]=[l,r].filter(Boolean).join(" "))}return{...e,...n}}function C2(e){var a,l;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=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var k2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=k2.reduce((e,t)=>{const n=Pa(`Primitive.${t}`),a=d.forwardRef((l,r)=>{const{asChild:o,...i}=l,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...i,ref:r})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function wy(e,t){e&&tr.flushSync(()=>e.dispatchEvent(t))}function un(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var a;return(a=t.current)==null?void 0:a.call(t,...n)},[])}function A2(e,t=globalThis==null?void 0:globalThis.document){const n=un(e);d.useEffect(()=>{const a=l=>{l.key==="Escape"&&n(l)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var R2="DismissableLayer",Nd="dismissableLayer.update",M2="dismissableLayer.pointerDownOutside",O2="dismissableLayer.focusOutside",yp,jy=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xi=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:r,onInteractOutside:o,onDismiss:i,...c}=e,u=d.useContext(jy),[f,h]=d.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),w=ye(t,N=>h(N)),y=Array.from(u.layers),[S]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(S),p=f?y.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,b=p>=v,j=L2(N=>{const _=N.target,D=[...u.branches].some(A=>A.contains(_));!b||D||(l==null||l(N),o==null||o(N),N.defaultPrevented||i==null||i())},m),k=U2(N=>{const _=N.target;[...u.branches].some(A=>A.contains(_))||(r==null||r(N),o==null||o(N),N.defaultPrevented||i==null||i())},m);return A2(N=>{p===u.layers.size-1&&(a==null||a(N),!N.defaultPrevented&&i&&(N.preventDefault(),i()))},m),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(yp=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),bp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=yp)}},[f,m,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),bp())},[f,u]),d.useEffect(()=>{const N=()=>g({});return document.addEventListener(Nd,N),()=>document.removeEventListener(Nd,N)},[]),s.jsx(ee.div,{...c,ref:w,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:P(e.onFocusCapture,k.onFocusCapture),onBlurCapture:P(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:P(e.onPointerDownCapture,j.onPointerDownCapture)})});Xi.displayName=R2;var D2="DismissableLayerBranch",z2=d.forwardRef((e,t)=>{const n=d.useContext(jy),a=d.useRef(null),l=ye(t,a);return d.useEffect(()=>{const r=a.current;if(r)return n.branches.add(r),()=>{n.branches.delete(r)}},[n.branches]),s.jsx(ee.div,{...e,ref:l})});z2.displayName=D2;function L2(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),a=d.useRef(!1),l=d.useRef(()=>{});return d.useEffect(()=>{const r=i=>{if(i.target&&!a.current){let c=function(){Ny(M2,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",l.current),l.current=c,t.addEventListener("click",l.current,{once:!0})):c()}else t.removeEventListener("click",l.current);a.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",r),t.removeEventListener("click",l.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function U2(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),a=d.useRef(!1);return d.useEffect(()=>{const l=r=>{r.target&&!a.current&&Ny(O2,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",l),()=>t.removeEventListener("focusin",l)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function bp(){const e=new CustomEvent(Nd);document.dispatchEvent(e)}function Ny(e,t,n,{discrete:a}){const l=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&l.addEventListener(e,t,{once:!0}),a?wy(l,r):l.dispatchEvent(r)}var iu="focusScope.autoFocusOnMount",cu="focusScope.autoFocusOnUnmount",Sp={bubbles:!1,cancelable:!0},$2="FocusScope",Ii=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:l,onUnmountAutoFocus:r,...o}=e,[i,c]=d.useState(null),u=un(l),f=un(r),h=d.useRef(null),m=ye(t,y=>c(y)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(a){let y=function(x){if(g.paused||!i)return;const b=x.target;i.contains(b)?h.current=b:Zn(h.current,{select:!0})},S=function(x){if(g.paused||!i)return;const b=x.relatedTarget;b!==null&&(i.contains(b)||Zn(h.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const j of x)j.removedNodes.length>0&&Zn(i)};document.addEventListener("focusin",y),document.addEventListener("focusout",S);const p=new MutationObserver(v);return i&&p.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",S),p.disconnect()}}},[a,i,g.paused]),d.useEffect(()=>{if(i){jp.add(g);const y=document.activeElement;if(!i.contains(y)){const v=new CustomEvent(iu,Sp);i.addEventListener(iu,u),i.dispatchEvent(v),v.defaultPrevented||(B2(Y2(_y(i)),{select:!0}),document.activeElement===y&&Zn(i))}return()=>{i.removeEventListener(iu,u),setTimeout(()=>{const v=new CustomEvent(cu,Sp);i.addEventListener(cu,f),i.dispatchEvent(v),v.defaultPrevented||Zn(y??document.body,{select:!0}),i.removeEventListener(cu,f),jp.remove(g)},0)}}},[i,u,f,g]);const w=d.useCallback(y=>{if(!n&&!a||g.paused)return;const S=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,v=document.activeElement;if(S&&v){const p=y.currentTarget,[x,b]=H2(p);x&&b?!y.shiftKey&&v===b?(y.preventDefault(),n&&Zn(x,{select:!0})):y.shiftKey&&v===x&&(y.preventDefault(),n&&Zn(b,{select:!0})):v===p&&y.preventDefault()}},[n,a,g.paused]);return s.jsx(ee.div,{tabIndex:-1,...o,ref:m,onKeyDown:w})});Ii.displayName=$2;function B2(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(Zn(a,{select:t}),document.activeElement!==n)return}function H2(e){const t=_y(e),n=wp(t,e),a=wp(t.reverse(),e);return[n,a]}function _y(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const l=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||l?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wp(e,t){for(const n of e)if(!q2(n,{upTo:t}))return n}function q2(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 G2(e){return e instanceof HTMLInputElement&&"select"in e}function Zn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&G2(e)&&t&&e.select()}}var jp=V2();function V2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Np(e,t),e.unshift(t)},remove(t){var n;e=Np(e,t),(n=e[0])==null||n.resume()}}}function Np(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function Y2(e){return e.filter(t=>t.tagName!=="A")}var X2="Portal",Pi=d.forwardRef((e,t)=>{var i;const{container:n,...a}=e,[l,r]=d.useState(!1);ot(()=>r(!0),[]);const o=n||l&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return o?KS.createPortal(s.jsx(ee.div,{...a,ref:t}),o):null});Pi.displayName=X2;function I2(e,t){return d.useReducer((n,a)=>t[n][a]??n,e)}var gn=e=>{const{present:t,children:n}=e,a=P2(t),l=typeof n=="function"?n({present:a.isPresent}):d.Children.only(n),r=ye(a.ref,Q2(l));return typeof n=="function"||a.isPresent?d.cloneElement(l,{ref:r}):null};gn.displayName="Presence";function P2(e){const[t,n]=d.useState(),a=d.useRef(null),l=d.useRef(e),r=d.useRef("none"),o=e?"mounted":"unmounted",[i,c]=I2(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=io(a.current);r.current=i==="mounted"?u:"none"},[i]),ot(()=>{const u=a.current,f=l.current;if(f!==e){const m=r.current,g=io(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),l.current=e}},[e,c]),ot(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,h=g=>{const y=io(a.current).includes(g.animationName);if(g.target===t&&y&&(c("ANIMATION_END"),!l.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},m=g=>{g.target===t&&(r.current=io(a.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:d.useCallback(u=>{a.current=u?getComputedStyle(u):null,n(u)},[])}}function io(e){return(e==null?void 0:e.animationName)||"none"}function Q2(e){var a,l;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=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uu=0;function Qf(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_p()),document.body.insertAdjacentElement("beforeend",e[1]??_p()),uu++,()=>{uu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),uu--}},[])}function _p(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var tn=function(){return tn=Object.assign||function(t){for(var n,a=1,l=arguments.length;a<l;a++){n=arguments[a];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},tn.apply(this,arguments)};function Ey(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 l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(n[a[l]]=e[a[l]]);return n}function K2(e,t,n){if(n||arguments.length===2)for(var a=0,l=t.length,r;a<l;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 Ro="right-scroll-bar-position",Mo="width-before-scroll-bar",Z2="with-scroll-bars-hidden",F2="--removed-body-scroll-bar-size";function du(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function W2(e,t){var n=d.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(a){var l=n.value;l!==a&&(n.value=a,n.callback(a,l))}}}})[0];return n.callback=t,n.facade}var J2=typeof window<"u"?d.useLayoutEffect:d.useEffect,Ep=new WeakMap;function eE(e,t){var n=W2(null,function(a){return e.forEach(function(l){return du(l,a)})});return J2(function(){var a=Ep.get(n);if(a){var l=new Set(a),r=new Set(e),o=n.current;l.forEach(function(i){r.has(i)||du(i,null)}),r.forEach(function(i){l.has(i)||du(i,o)})}Ep.set(n,e)},[e]),n}function tE(e){return e}function nE(e,t){t===void 0&&(t=tE);var n=[],a=!1,l={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 o=t(r,a);return n.push(o),function(){n=n.filter(function(i){return i!==o})}},assignSyncMedium:function(r){for(a=!0;n.length;){var o=n;n=[],o.forEach(r)}n={push:function(i){return r(i)},filter:function(){return n}}},assignMedium:function(r){a=!0;var o=[];if(n.length){var i=n;n=[],i.forEach(r),o=n}var c=function(){var f=o;o=[],f.forEach(r)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){o.push(f),u()},filter:function(f){return o=o.filter(f),n}}}};return l}function aE(e){e===void 0&&(e={});var t=nE(null);return t.options=tn({async:!0,ssr:!1},e),t}var Ty=function(e){var t=e.sideCar,n=Ey(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 d.createElement(a,tn({},n))};Ty.isSideCarExport=!0;function lE(e,t){return e.useMedium(t),Ty}var Cy=aE(),fu=function(){},Qi=d.forwardRef(function(e,t){var n=d.useRef(null),a=d.useState({onScrollCapture:fu,onWheelCapture:fu,onTouchMoveCapture:fu}),l=a[0],r=a[1],o=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,h=e.shards,m=e.sideCar,g=e.noRelative,w=e.noIsolation,y=e.inert,S=e.allowPinchZoom,v=e.as,p=v===void 0?"div":v,x=e.gapMode,b=Ey(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=m,k=eE([n,t]),N=tn(tn({},b),l);return d.createElement(d.Fragment,null,f&&d.createElement(j,{sideCar:Cy,removeScrollBar:u,shards:h,noRelative:g,noIsolation:w,inert:y,setCallbacks:r,allowPinchZoom:!!S,lockRef:n,gapMode:x}),o?d.cloneElement(d.Children.only(i),tn(tn({},N),{ref:k})):d.createElement(p,tn({},N,{className:c,ref:k}),i))});Qi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Qi.classNames={fullWidth:Mo,zeroRight:Ro};var rE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=rE();return t&&e.setAttribute("nonce",t),e}function oE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function iE(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cE=function(){var e=0,t=null;return{add:function(n){e==0&&(t=sE())&&(oE(t,n),iE(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},uE=function(){var e=cE();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ky=function(){var e=uE(),t=function(n){var a=n.styles,l=n.dynamic;return e(a,l),null};return t},dE={left:0,top:0,right:0,gap:0},hu=function(e){return parseInt(e||"",10)||0},fE=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],l=t[e==="padding"?"paddingRight":"marginRight"];return[hu(n),hu(a),hu(l)]},hE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dE;var t=fE(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])}},mE=ky(),Hl="data-scroll-locked",pE=function(e,t,n,a){var l=e.left,r=e.top,o=e.right,i=e.gap;return n===void 0&&(n="margin"),`
240
+ .`.concat(Z2,` {
241
+ overflow: hidden `).concat(a,`;
242
+ padding-right: `).concat(i,"px ").concat(a,`;
243
+ }
244
+ body[`).concat(Hl,`] {
245
+ overflow: hidden `).concat(a,`;
246
+ overscroll-behavior: contain;
247
+ `).concat([t&&"position: relative ".concat(a,";"),n==="margin"&&`
248
+ padding-left: `.concat(l,`px;
249
+ padding-top: `).concat(r,`px;
250
+ padding-right: `).concat(o,`px;
251
+ margin-left:0;
252
+ margin-top:0;
253
+ margin-right: `).concat(i,"px ").concat(a,`;
254
+ `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(a,";")].filter(Boolean).join(""),`
255
+ }
256
+
257
+ .`).concat(Ro,` {
258
+ right: `).concat(i,"px ").concat(a,`;
259
+ }
260
+
261
+ .`).concat(Mo,` {
262
+ margin-right: `).concat(i,"px ").concat(a,`;
263
+ }
264
+
265
+ .`).concat(Ro," .").concat(Ro,` {
266
+ right: 0 `).concat(a,`;
267
+ }
268
+
269
+ .`).concat(Mo," .").concat(Mo,` {
270
+ margin-right: 0 `).concat(a,`;
271
+ }
272
+
273
+ body[`).concat(Hl,`] {
274
+ `).concat(F2,": ").concat(i,`px;
275
+ }
276
+ `)},Tp=function(){var e=parseInt(document.body.getAttribute(Hl)||"0",10);return isFinite(e)?e:0},gE=function(){d.useEffect(function(){return document.body.setAttribute(Hl,(Tp()+1).toString()),function(){var e=Tp()-1;e<=0?document.body.removeAttribute(Hl):document.body.setAttribute(Hl,e.toString())}},[])},vE=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,l=a===void 0?"margin":a;gE();var r=d.useMemo(function(){return hE(l)},[l]);return d.createElement(mE,{styles:pE(r,!t,l,n?"":"!important")})},_d=!1;if(typeof window<"u")try{var co=Object.defineProperty({},"passive",{get:function(){return _d=!0,!0}});window.addEventListener("test",co,co),window.removeEventListener("test",co,co)}catch{_d=!1}var ul=_d?{passive:!1}:!1,xE=function(e){return e.tagName==="TEXTAREA"},Ay=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!xE(e)&&n[t]==="visible")},yE=function(e){return Ay(e,"overflowY")},bE=function(e){return Ay(e,"overflowX")},Cp=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var l=Ry(e,a);if(l){var r=My(e,a),o=r[1],i=r[2];if(o>i)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},SE=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},wE=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},Ry=function(e,t){return e==="v"?yE(t):bE(t)},My=function(e,t){return e==="v"?SE(t):wE(t)},jE=function(e,t){return e==="h"&&t==="rtl"?-1:1},NE=function(e,t,n,a,l){var r=jE(e,window.getComputedStyle(t).direction),o=r*a,i=n.target,c=t.contains(i),u=!1,f=o>0,h=0,m=0;do{if(!i)break;var g=My(e,i),w=g[0],y=g[1],S=g[2],v=y-S-r*w;(w||v)&&Ry(e,i)&&(h+=v,m+=w);var p=i.parentNode;i=p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE?p.host:p}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(f&&Math.abs(h)<1||!f&&Math.abs(m)<1)&&(u=!0),u},uo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kp=function(e){return[e.deltaX,e.deltaY]},Ap=function(e){return e&&"current"in e?e.current:e},_E=function(e,t){return e[0]===t[0]&&e[1]===t[1]},EE=function(e){return`
277
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
278
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
279
+ `)},TE=0,dl=[];function CE(e){var t=d.useRef([]),n=d.useRef([0,0]),a=d.useRef(),l=d.useState(TE++)[0],r=d.useState(ky)[0],o=d.useRef(e);d.useEffect(function(){o.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var y=K2([e.lockRef.current],(e.shards||[]).map(Ap),!0).filter(Boolean);return y.forEach(function(S){return S.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),y.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var i=d.useCallback(function(y,S){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var v=uo(y),p=n.current,x="deltaX"in y?y.deltaX:p[0]-v[0],b="deltaY"in y?y.deltaY:p[1]-v[1],j,k=y.target,N=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in y&&N==="h"&&k.type==="range")return!1;var _=Cp(N,k);if(!_)return!0;if(_?j=N:(j=N==="v"?"h":"v",_=Cp(N,k)),!_)return!1;if(!a.current&&"changedTouches"in y&&(x||b)&&(a.current=j),!j)return!0;var D=a.current||j;return NE(D,S,y,D==="h"?x:b)},[]),c=d.useCallback(function(y){var S=y;if(!(!dl.length||dl[dl.length-1]!==r)){var v="deltaY"in S?kp(S):uo(S),p=t.current.filter(function(j){return j.name===S.type&&(j.target===S.target||S.target===j.shadowParent)&&_E(j.delta,v)})[0];if(p&&p.should){S.cancelable&&S.preventDefault();return}if(!p){var x=(o.current.shards||[]).map(Ap).filter(Boolean).filter(function(j){return j.contains(S.target)}),b=x.length>0?i(S,x[0]):!o.current.noIsolation;b&&S.cancelable&&S.preventDefault()}}},[]),u=d.useCallback(function(y,S,v,p){var x={name:y,delta:S,target:v,should:p,shadowParent:kE(v)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(b){return b!==x})},1)},[]),f=d.useCallback(function(y){n.current=uo(y),a.current=void 0},[]),h=d.useCallback(function(y){u(y.type,kp(y),y.target,i(y,e.lockRef.current))},[]),m=d.useCallback(function(y){u(y.type,uo(y),y.target,i(y,e.lockRef.current))},[]);d.useEffect(function(){return dl.push(r),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",c,ul),document.addEventListener("touchmove",c,ul),document.addEventListener("touchstart",f,ul),function(){dl=dl.filter(function(y){return y!==r}),document.removeEventListener("wheel",c,ul),document.removeEventListener("touchmove",c,ul),document.removeEventListener("touchstart",f,ul)}},[]);var g=e.removeScrollBar,w=e.inert;return d.createElement(d.Fragment,null,w?d.createElement(r,{styles:EE(l)}):null,g?d.createElement(vE,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function kE(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const AE=lE(Cy,CE);var Ki=d.forwardRef(function(e,t){return d.createElement(Qi,tn({},e,{ref:t,sideCar:AE}))});Ki.classNames=Qi.classNames;var RE=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fl=new WeakMap,fo=new WeakMap,ho={},mu=0,Oy=function(e){return e&&(e.host||Oy(e.parentNode))},ME=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=Oy(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})},OE=function(e,t,n,a){var l=ME(t,Array.isArray(e)?e:[e]);ho[n]||(ho[n]=new WeakMap);var r=ho[n],o=[],i=new Set,c=new Set(l),u=function(h){!h||i.has(h)||(i.add(h),u(h.parentNode))};l.forEach(u);var f=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(m){if(i.has(m))f(m);else try{var g=m.getAttribute(a),w=g!==null&&g!=="false",y=(fl.get(m)||0)+1,S=(r.get(m)||0)+1;fl.set(m,y),r.set(m,S),o.push(m),y===1&&w&&fo.set(m,!0),S===1&&m.setAttribute(n,"true"),w||m.setAttribute(a,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return f(t),i.clear(),mu++,function(){o.forEach(function(h){var m=fl.get(h)-1,g=r.get(h)-1;fl.set(h,m),r.set(h,g),m||(fo.has(h)||h.removeAttribute(a),fo.delete(h)),g||h.removeAttribute(n)}),mu--,mu||(fl=new WeakMap,fl=new WeakMap,fo=new WeakMap,ho={})}},Kf=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),l=RE(e);return l?(a.push.apply(a,Array.from(l.querySelectorAll("[aria-live], script"))),OE(a,l,n,"aria-hidden")):function(){return null}},Zi="Dialog",[Dy]=Hn(Zi),[DE,Wt]=Dy(Zi),zy=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:l,onOpenChange:r,modal:o=!0}=e,i=d.useRef(null),c=d.useRef(null),[u,f]=Ia({prop:a,defaultProp:l??!1,onChange:r,caller:Zi});return s.jsx(DE,{scope:t,triggerRef:i,contentRef:c,contentId:on(),titleId:on(),descriptionId:on(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(h=>!h),[f]),modal:o,children:n})};zy.displayName=Zi;var Ly="DialogTrigger",zE=d.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,l=Wt(Ly,n),r=ye(t,l.triggerRef);return s.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":Wf(l.open),...a,ref:r,onClick:P(e.onClick,l.onOpenToggle)})});zE.displayName=Ly;var Zf="DialogPortal",[LE,Uy]=Dy(Zf,{forceMount:void 0}),$y=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:l}=e,r=Wt(Zf,t);return s.jsx(LE,{scope:t,forceMount:n,children:d.Children.map(a,o=>s.jsx(gn,{present:n||r.open,children:s.jsx(Pi,{asChild:!0,container:l,children:o})}))})};$y.displayName=Zf;var mi="DialogOverlay",By=d.forwardRef((e,t)=>{const n=Uy(mi,e.__scopeDialog),{forceMount:a=n.forceMount,...l}=e,r=Wt(mi,e.__scopeDialog);return r.modal?s.jsx(gn,{present:a||r.open,children:s.jsx($E,{...l,ref:t})}):null});By.displayName=mi;var UE=Pa("DialogOverlay.RemoveScroll"),$E=d.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,l=Wt(mi,n);return s.jsx(Ki,{as:UE,allowPinchZoom:!0,shards:[l.contentRef],children:s.jsx(ee.div,{"data-state":Wf(l.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),Qa="DialogContent",Hy=d.forwardRef((e,t)=>{const n=Uy(Qa,e.__scopeDialog),{forceMount:a=n.forceMount,...l}=e,r=Wt(Qa,e.__scopeDialog);return s.jsx(gn,{present:a||r.open,children:r.modal?s.jsx(BE,{...l,ref:t}):s.jsx(HE,{...l,ref:t})})});Hy.displayName=Qa;var BE=d.forwardRef((e,t)=>{const n=Wt(Qa,e.__scopeDialog),a=d.useRef(null),l=ye(t,n.contentRef,a);return d.useEffect(()=>{const r=a.current;if(r)return Kf(r)},[]),s.jsx(qy,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,r=>{var o;r.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,r=>{const o=r.detail.originalEvent,i=o.button===0&&o.ctrlKey===!0;(o.button===2||i)&&r.preventDefault()}),onFocusOutside:P(e.onFocusOutside,r=>r.preventDefault())})}),HE=d.forwardRef((e,t)=>{const n=Wt(Qa,e.__scopeDialog),a=d.useRef(!1),l=d.useRef(!1);return s.jsx(qy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var o,i;(o=e.onCloseAutoFocus)==null||o.call(e,r),r.defaultPrevented||(a.current||(i=n.triggerRef.current)==null||i.focus(),r.preventDefault()),a.current=!1,l.current=!1},onInteractOutside:r=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const o=r.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&l.current&&r.preventDefault()}})}),qy=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:l,onCloseAutoFocus:r,...o}=e,i=Wt(Qa,n),c=d.useRef(null),u=ye(t,c);return Qf(),s.jsxs(s.Fragment,{children:[s.jsx(Ii,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:l,onUnmountAutoFocus:r,children:s.jsx(Xi,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Wf(i.open),...o,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(qE,{titleId:i.titleId}),s.jsx(VE,{contentRef:c,descriptionId:i.descriptionId})]})]})}),Ff="DialogTitle",Gy=d.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,l=Wt(Ff,n);return s.jsx(ee.h2,{id:l.titleId,...a,ref:t})});Gy.displayName=Ff;var Vy="DialogDescription",Yy=d.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,l=Wt(Vy,n);return s.jsx(ee.p,{id:l.descriptionId,...a,ref:t})});Yy.displayName=Vy;var Xy="DialogClose",Iy=d.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,l=Wt(Xy,n);return s.jsx(ee.button,{type:"button",...a,ref:t,onClick:P(e.onClick,()=>l.onOpenChange(!1))})});Iy.displayName=Xy;function Wf(e){return e?"open":"closed"}var Py="DialogTitleWarning",[oO,Qy]=g2(Py,{contentName:Qa,titleName:Ff,docsSlug:"dialog"}),qE=({titleId:e})=>{const t=Qy(Py),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
280
+
281
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
282
+
283
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},GE="DialogDescriptionWarning",VE=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Qy(GE).contentName}}.`;return d.useEffect(()=>{var r;const l=(r=e.current)==null?void 0:r.getAttribute("aria-describedby");t&&l&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},Ky=zy,Zy=$y,Fy=By,Wy=Hy,Jy=Gy,eb=Yy,Jf=Iy;function YE({className:e,...t}){return s.jsx(p_,{role:"status","aria-label":"Loading",className:I("size-4 animate-spin",e),...t})}const Oo="aria-pressed:border aria-pressed:border-primary aria-pressed:bg-accent aria-pressed:text-accent-foreground",eh=Ds("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"}}),he=d.forwardRef(({className:e,disabled:t,variant:n,size:a,asChild:l=!1,loading:r,children:o,...i},c)=>{const u=l?j2:"button",f=a==="icon"||a==="sm-icon"||a==="control-icon"||a==="xs-icon",h=s.jsx(YE,{"aria-hidden":"true","aria-label":void 0,role:void 0,className:I(!f&&"mr-2")}),m=l?o:r&&f?h:s.jsxs(s.Fragment,{children:[r?h:null,o]});return s.jsx(u,{className:I(eh({variant:n,size:a,className:e})),ref:c,disabled:t||r,...i,children:m})});he.displayName="Button";const tb=d.createContext(null);function XE({container:e,children:t}){return s.jsx(tb.Provider,{value:e,children:t})}function Fi(){return d.useContext(tb)??void 0}function IE(e){return s.jsx(Ky,{"data-slot":"alert-dialog",...e})}function PE({className:e,...t}){return s.jsx(Fy,{"data-slot":"alert-dialog-overlay",className:I("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 QE({className:e,onOpenAutoFocus:t,onPointerDownOutside:n,onInteractOutside:a,...l}){return s.jsxs(Zy,{container:Fi(),children:[s.jsx(PE,{}),s.jsx(Wy,{"data-slot":"alert-dialog-content",role:"alertdialog",className:I("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 o=r.currentTarget,i=o instanceof HTMLElement?o.querySelector('[data-slot="alert-dialog-cancel"]'):null;i&&(r.preventDefault(),i.focus())},onPointerDownOutside:r=>{n==null||n(r),r.preventDefault()},onInteractOutside:r=>{a==null||a(r),r.preventDefault()},...l})]})}function KE({className:e,...t}){return s.jsx("div",{"data-slot":"alert-dialog-header",className:I("flex flex-col gap-2 text-center sm:text-left",e),...t})}function ZE({className:e,...t}){return s.jsx("div",{"data-slot":"alert-dialog-footer",className:I("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function FE({className:e,...t}){return s.jsx(Jy,{"data-slot":"alert-dialog-title",className:I("text-lg font-semibold",e),...t})}function WE({className:e,...t}){return s.jsx(eb,{"data-slot":"alert-dialog-description",className:I("text-muted-foreground text-sm",e),...t})}function JE({className:e,variant:t,...n}){return s.jsx(Jf,{"data-slot":"alert-dialog-action",className:I(eh({variant:t}),e),...n})}function eT({className:e,...t}){return s.jsx(Jf,{"data-slot":"alert-dialog-cancel",className:I(eh({variant:"outline"}),e),...t})}function tT(){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 nT(e,t){t!=null&&t.isConnected&&(e.preventDefault(),t.focus())}function nb(){const[e,t]=d.useState(null),n=d.useRef(null),a=d.useRef(null),l=d.useCallback(i=>{var c;(c=n.current)==null||c.resolve(i),n.current=null,t(null)},[]),r=d.useCallback(i=>new Promise(c=>{var f;(f=n.current)==null||f.resolve(!1),a.current=tT();const u={...i,resolve:c};n.current=u,t(u)}),[]);d.useEffect(()=>()=>{var i;return(i=n.current)==null?void 0:i.resolve(!1)},[]);const o=s.jsx(IE,{open:e!==null,onOpenChange:i=>{i||l(!1)},children:s.jsxs(QE,{onCloseAutoFocus:i=>nT(i,a.current),children:[s.jsxs(KE,{children:[s.jsx(FE,{children:e==null?void 0:e.title}),s.jsx(WE,{className:"whitespace-pre-line",children:e==null?void 0:e.description})]}),s.jsxs(ZE,{children:[s.jsx(eT,{children:"Cancel"}),s.jsx(JE,{variant:e!=null&&e.destructive?"destructive":"default",onClick:()=>l(!0),children:e==null?void 0:e.action_label})]})]})});return{confirm:r,confirm_dialog:o}}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",aT=Ds("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 et({className:e,variant:t,size:n,...a}){return s.jsx("div",{className:I(aT({variant:t,size:n}),e),...a})}function ab(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function lb(e){const[t,n]=d.useState(void 0);return ot(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const r=l[0];let o,i;if("borderBoxSize"in r){const c=r.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,i=u.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var Wi="Checkbox",[lT]=Hn(Wi),[rT,th]=lT(Wi);function sT(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:l,disabled:r,form:o,name:i,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:h}=e,[m,g]=Ia({prop:n,defaultProp:l??!1,onChange:c,caller:Wi}),[w,y]=d.useState(null),[S,v]=d.useState(null),p=d.useRef(!1),x=w?!!o||!!w.closest("form"):!0,b={checked:m,disabled:r,setChecked:g,control:w,setControl:y,name:i,form:o,value:f,hasConsumerStoppedPropagationRef:p,required:u,defaultChecked:pa(l)?!1:l,isFormControl:x,bubbleInput:S,setBubbleInput:v};return s.jsx(rT,{scope:t,...b,children:oT(h)?h(b):a})}var rb="CheckboxTrigger",sb=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},l)=>{const{control:r,value:o,disabled:i,checked:c,required:u,setControl:f,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:w}=th(rb,e),y=ye(l,f),S=d.useRef(c);return d.useEffect(()=>{const v=r==null?void 0:r.form;if(v){const p=()=>h(S.current);return v.addEventListener("reset",p),()=>v.removeEventListener("reset",p)}},[r,h]),s.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":pa(c)?"mixed":c,"aria-required":u,"data-state":db(c),"data-disabled":i?"":void 0,disabled:i,value:o,...a,ref:y,onKeyDown:P(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:P(n,v=>{h(p=>pa(p)?!0:!p),w&&g&&(m.current=v.isPropagationStopped(),m.current||v.stopPropagation())})})});sb.displayName=rb;var nh=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:l,defaultChecked:r,required:o,disabled:i,value:c,onCheckedChange:u,form:f,...h}=e;return s.jsx(sT,{__scopeCheckbox:n,checked:l,defaultChecked:r,disabled:i,required:o,onCheckedChange:u,name:a,form:f,value:c,internal_do_not_use_render:({isFormControl:m})=>s.jsxs(s.Fragment,{children:[s.jsx(sb,{...h,ref:t,__scopeCheckbox:n}),m&&s.jsx(ub,{__scopeCheckbox:n})]})})});nh.displayName=Wi;var ob="CheckboxIndicator",ib=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...l}=e,r=th(ob,n);return s.jsx(gn,{present:a||pa(r.checked)||r.checked===!0,children:s.jsx(ee.span,{"data-state":db(r.checked),"data-disabled":r.disabled?"":void 0,...l,ref:t,style:{pointerEvents:"none",...e.style}})})});ib.displayName=ob;var cb="CheckboxBubbleInput",ub=d.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:l,checked:r,defaultChecked:o,required:i,disabled:c,name:u,value:f,form:h,bubbleInput:m,setBubbleInput:g}=th(cb,e),w=ye(n,g),y=ab(r),S=lb(a);d.useEffect(()=>{const p=m;if(!p)return;const x=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(x,"checked").set,k=!l.current;if(y!==r&&j){const N=new Event("click",{bubbles:k});p.indeterminate=pa(r),j.call(p,pa(r)?!1:r),p.dispatchEvent(N)}},[m,y,r,l]);const v=d.useRef(pa(r)?!1:r);return s.jsx(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??v.current,required:i,disabled:c,name:u,value:f,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ub.displayName=cb;function oT(e){return typeof e=="function"}function pa(e){return e==="indeterminate"}function db(e){return pa(e)?"indeterminate":e?"checked":"unchecked"}const fb=d.forwardRef(({className:e,...t},n)=>s.jsx(nh,{ref:n,className:I("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:s.jsx(ib,{className:I("flex items-center justify-center text-current"),children:t.checked==="indeterminate"?s.jsx(y_,{className:"size-4","aria-hidden":"true"}):s.jsx(If,{className:"size-4","aria-hidden":"true"})})}));fb.displayName=nh.displayName;const iT=Ds("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 cT({...e}){return s.jsx(Ky,{"data-slot":"dialog",...e})}function uT({...e}){const t=Fi();return s.jsx(Zy,{"data-slot":"dialog-portal",container:t,...e})}function dT({className:e,...t}){return s.jsx(Fy,{"data-slot":"dialog-overlay",className:I("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 fT({className:e,children:t,showCloseButton:n=!0,size:a,...l}){return s.jsxs(uT,{"data-slot":"dialog-portal",children:[s.jsx(dT,{}),s.jsxs(Wy,{"data-slot":"dialog-content",className:I(iT({size:a}),e),...l,children:[t,n&&s.jsxs(Jf,{"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:[s.jsx(cy,{}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function hT({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-header",className:I("flex flex-col gap-2 text-center sm:text-left",e),...t})}function mT({className:e,...t}){return s.jsx("div",{"data-slot":"dialog-footer",className:I("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function pT({className:e,...t}){return s.jsx(Jy,{"data-slot":"dialog-title",className:I("text-lg leading-none font-semibold",e),...t})}function gT({className:e,...t}){return s.jsx(eb,{"data-slot":"dialog-description",className:I("text-muted-foreground text-sm",e),...t})}function ah(e){const t=e+"CollectionProvider",[n,a]=Hn(t),[l,r]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:S,children:v}=y,p=Qn.useRef(null),x=Qn.useRef(new Map).current;return s.jsx(l,{scope:S,itemMap:x,collectionRef:p,children:v})};o.displayName=t;const i=e+"CollectionSlot",c=Pa(i),u=Qn.forwardRef((y,S)=>{const{scope:v,children:p}=y,x=r(i,v),b=ye(S,x.collectionRef);return s.jsx(c,{ref:b,children:p})});u.displayName=i;const f=e+"CollectionItemSlot",h="data-radix-collection-item",m=Pa(f),g=Qn.forwardRef((y,S)=>{const{scope:v,children:p,...x}=y,b=Qn.useRef(null),j=ye(S,b),k=r(f,v);return Qn.useEffect(()=>(k.itemMap.set(b,{ref:b,...x}),()=>void k.itemMap.delete(b))),s.jsx(m,{[h]:"",ref:j,children:p})});g.displayName=f;function w(y){const S=r(e+"CollectionConsumer",y);return Qn.useCallback(()=>{const p=S.collectionRef.current;if(!p)return[];const x=Array.from(p.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((k,N)=>x.indexOf(k.ref.current)-x.indexOf(N.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:o,Slot:u,ItemSlot:g},w,a]}var vT=d.createContext(void 0);function Ji(e){const t=d.useContext(vT);return e||t||"ltr"}const xT=["top","right","bottom","left"],ba=Math.min,jt=Math.max,pi=Math.round,mo=Math.floor,cn=e=>({x:e,y:e}),yT={left:"right",right:"left",bottom:"top",top:"bottom"},bT={start:"end",end:"start"};function Ed(e,t,n){return jt(e,ba(t,n))}function Un(e,t){return typeof e=="function"?e(t):e}function $n(e){return e.split("-")[0]}function dr(e){return e.split("-")[1]}function lh(e){return e==="x"?"y":"x"}function rh(e){return e==="y"?"height":"width"}function an(e){return["top","bottom"].includes($n(e))?"y":"x"}function sh(e){return lh(an(e))}function ST(e,t,n){n===void 0&&(n=!1);const a=dr(e),l=sh(e),r=rh(l);let o=l==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(o=gi(o)),[o,gi(o)]}function wT(e){const t=gi(e);return[Td(e),t,Td(t)]}function Td(e){return e.replace(/start|end/g,t=>bT[t])}function jT(e,t,n){const a=["left","right"],l=["right","left"],r=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?l:a:t?a:l;case"left":case"right":return t?r:o;default:return[]}}function NT(e,t,n,a){const l=dr(e);let r=jT($n(e),n==="start",a);return l&&(r=r.map(o=>o+"-"+l),t&&(r=r.concat(r.map(Td)))),r}function gi(e){return e.replace(/left|right|bottom|top/g,t=>yT[t])}function _T(e){return{top:0,right:0,bottom:0,left:0,...e}}function hb(e){return typeof e!="number"?_T(e):{top:e,right:e,bottom:e,left:e}}function vi(e){const{x:t,y:n,width:a,height:l}=e;return{width:a,height:l,top:n,left:t,right:t+a,bottom:n+l,x:t,y:n}}function Rp(e,t,n){let{reference:a,floating:l}=e;const r=an(t),o=sh(t),i=rh(o),c=$n(t),u=r==="y",f=a.x+a.width/2-l.width/2,h=a.y+a.height/2-l.height/2,m=a[i]/2-l[i]/2;let g;switch(c){case"top":g={x:f,y:a.y-l.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-l.width,y:h};break;default:g={x:a.x,y:a.y}}switch(dr(t)){case"start":g[o]-=m*(n&&u?-1:1);break;case"end":g[o]+=m*(n&&u?-1:1);break}return g}const ET=async(e,t,n)=>{const{placement:a="bottom",strategy:l="absolute",middleware:r=[],platform:o}=n,i=r.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:l}),{x:f,y:h}=Rp(u,a,c),m=a,g={},w=0;for(let y=0;y<i.length;y++){const{name:S,fn:v}=i[y],{x:p,y:x,data:b,reset:j}=await v({x:f,y:h,initialPlacement:a,placement:m,strategy:l,middlewareData:g,rects:u,platform:o,elements:{reference:e,floating:t}});f=p??f,h=x??h,g={...g,[S]:{...g[S],...b}},j&&w<=50&&(w++,typeof j=="object"&&(j.placement&&(m=j.placement),j.rects&&(u=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:l}):j.rects),{x:f,y:h}=Rp(u,m,c)),y=-1)}return{x:f,y:h,placement:m,strategy:l,middlewareData:g}};async function hs(e,t){var n;t===void 0&&(t={});const{x:a,y:l,platform:r,rects:o,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=Un(t,e),w=hb(g),S=i[m?h==="floating"?"reference":"floating":h],v=vi(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(S)))==null||n?S:S.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),p=h==="floating"?{x:a,y:l,width:o.floating.width,height:o.floating.height}:o.reference,x=await(r.getOffsetParent==null?void 0:r.getOffsetParent(i.floating)),b=await(r.isElement==null?void 0:r.isElement(x))?await(r.getScale==null?void 0:r.getScale(x))||{x:1,y:1}:{x:1,y:1},j=vi(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:p,offsetParent:x,strategy:c}):p);return{top:(v.top-j.top+w.top)/b.y,bottom:(j.bottom-v.bottom+w.bottom)/b.y,left:(v.left-j.left+w.left)/b.x,right:(j.right-v.right+w.right)/b.x}}const TT=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:l,rects:r,platform:o,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=Un(e,t)||{};if(u==null)return{};const h=hb(f),m={x:n,y:a},g=sh(l),w=rh(g),y=await o.getDimensions(u),S=g==="y",v=S?"top":"left",p=S?"bottom":"right",x=S?"clientHeight":"clientWidth",b=r.reference[w]+r.reference[g]-m[g]-r.floating[w],j=m[g]-r.reference[g],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let N=k?k[x]:0;(!N||!await(o.isElement==null?void 0:o.isElement(k)))&&(N=i.floating[x]||r.floating[w]);const _=b/2-j/2,D=N/2-y[w]/2-1,A=ba(h[v],D),O=ba(h[p],D),H=A,L=N-y[w]-O,B=N/2-y[w]/2+_,V=Ed(H,B,L),C=!c.arrow&&dr(l)!=null&&B!==V&&r.reference[w]/2-(B<H?A:O)-y[w]/2<0,$=C?B<H?B-H:B-L:0;return{[g]:m[g]+$,data:{[g]:V,centerOffset:B-V-$,...C&&{alignmentOffset:$}},reset:C}}}),CT=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:l,middlewareData:r,rects:o,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...S}=Un(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const v=$n(l),p=an(i),x=$n(i)===i,b=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=m||(x||!y?[gi(i)]:wT(i)),k=w!=="none";!m&&k&&j.push(...NT(i,y,w,b));const N=[i,...j],_=await hs(t,S),D=[];let A=((a=r.flip)==null?void 0:a.overflows)||[];if(f&&D.push(_[v]),h){const B=ST(l,o,b);D.push(_[B[0]],_[B[1]])}if(A=[...A,{placement:l,overflows:D}],!D.every(B=>B<=0)){var O,H;const B=(((O=r.flip)==null?void 0:O.index)||0)+1,V=N[B];if(V&&(!(h==="alignment"?p!==an(V):!1)||A.every(E=>E.overflows[0]>0&&an(E.placement)===p)))return{data:{index:B,overflows:A},reset:{placement:V}};let C=(H=A.filter($=>$.overflows[0]<=0).sort(($,E)=>$.overflows[1]-E.overflows[1])[0])==null?void 0:H.placement;if(!C)switch(g){case"bestFit":{var L;const $=(L=A.filter(E=>{if(k){const z=an(E.placement);return z===p||z==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(z=>z>0).reduce((z,Q)=>z+Q,0)]).sort((E,z)=>E[1]-z[1])[0])==null?void 0:L[0];$&&(C=$);break}case"initialPlacement":C=i;break}if(l!==C)return{reset:{placement:C}}}return{}}}};function Mp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Op(e){return xT.some(t=>e[t]>=0)}const kT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...l}=Un(e,t);switch(a){case"referenceHidden":{const r=await hs(t,{...l,elementContext:"reference"}),o=Mp(r,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Op(o)}}}case"escaped":{const r=await hs(t,{...l,altBoundary:!0}),o=Mp(r,n.floating);return{data:{escapedOffsets:o,escaped:Op(o)}}}default:return{}}}}};async function AT(e,t){const{placement:n,platform:a,elements:l}=e,r=await(a.isRTL==null?void 0:a.isRTL(l.floating)),o=$n(n),i=dr(n),c=an(n)==="y",u=["left","top"].includes(o)?-1:1,f=r&&c?-1:1,h=Un(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return i&&typeof w=="number"&&(g=i==="end"?w*-1:w),c?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const RT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:l,y:r,placement:o,middlewareData:i}=t,c=await AT(t,e);return o===((n=i.offset)==null?void 0:n.placement)&&(a=i.arrow)!=null&&a.alignmentOffset?{}:{x:l+c.x,y:r+c.y,data:{...c,placement:o}}}}},MT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:l}=t,{mainAxis:r=!0,crossAxis:o=!1,limiter:i={fn:S=>{let{x:v,y:p}=S;return{x:v,y:p}}},...c}=Un(e,t),u={x:n,y:a},f=await hs(t,c),h=an($n(l)),m=lh(h);let g=u[m],w=u[h];if(r){const S=m==="y"?"top":"left",v=m==="y"?"bottom":"right",p=g+f[S],x=g-f[v];g=Ed(p,g,x)}if(o){const S=h==="y"?"top":"left",v=h==="y"?"bottom":"right",p=w+f[S],x=w-f[v];w=Ed(p,w,x)}const y=i.fn({...t,[m]:g,[h]:w});return{...y,data:{x:y.x-n,y:y.y-a,enabled:{[m]:r,[h]:o}}}}}},OT=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:l,rects:r,middlewareData:o}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=Un(e,t),f={x:n,y:a},h=an(l),m=lh(h);let g=f[m],w=f[h];const y=Un(i,t),S=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const x=m==="y"?"height":"width",b=r.reference[m]-r.floating[x]+S.mainAxis,j=r.reference[m]+r.reference[x]-S.mainAxis;g<b?g=b:g>j&&(g=j)}if(u){var v,p;const x=m==="y"?"width":"height",b=["top","left"].includes($n(l)),j=r.reference[h]-r.floating[x]+(b&&((v=o.offset)==null?void 0:v[h])||0)+(b?0:S.crossAxis),k=r.reference[h]+r.reference[x]+(b?0:((p=o.offset)==null?void 0:p[h])||0)-(b?S.crossAxis:0);w<j?w=j:w>k&&(w=k)}return{[m]:g,[h]:w}}}},DT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:l,rects:r,platform:o,elements:i}=t,{apply:c=()=>{},...u}=Un(e,t),f=await hs(t,u),h=$n(l),m=dr(l),g=an(l)==="y",{width:w,height:y}=r.floating;let S,v;h==="top"||h==="bottom"?(S=h,v=m===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(v=h,S=m==="end"?"top":"bottom");const p=y-f.top-f.bottom,x=w-f.left-f.right,b=ba(y-f[S],p),j=ba(w-f[v],x),k=!t.middlewareData.shift;let N=b,_=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(N=p),k&&!m){const A=jt(f.left,0),O=jt(f.right,0),H=jt(f.top,0),L=jt(f.bottom,0);g?_=w-2*(A!==0||O!==0?A+O:jt(f.left,f.right)):N=y-2*(H!==0||L!==0?H+L:jt(f.top,f.bottom))}await c({...t,availableWidth:_,availableHeight:N});const D=await o.getDimensions(i.floating);return w!==D.width||y!==D.height?{reset:{rects:!0}}:{}}}};function ec(){return typeof window<"u"}function fr(e){return mb(e)?(e.nodeName||"").toLowerCase():"#document"}function kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vn(e){var t;return(t=(mb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mb(e){return ec()?e instanceof Node||e instanceof kt(e).Node:!1}function Kt(e){return ec()?e instanceof Element||e instanceof kt(e).Element:!1}function dn(e){return ec()?e instanceof HTMLElement||e instanceof kt(e).HTMLElement:!1}function Dp(e){return!ec()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kt(e).ShadowRoot}function zs(e){const{overflow:t,overflowX:n,overflowY:a,display:l}=Zt(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!["inline","contents"].includes(l)}function zT(e){return["table","td","th"].includes(fr(e))}function tc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function oh(e){const t=ih(),n=Kt(e)?Zt(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 LT(e){let t=Sa(e);for(;dn(t)&&!Jl(t);){if(oh(t))return t;if(tc(t))return null;t=Sa(t)}return null}function ih(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Jl(e){return["html","body","#document"].includes(fr(e))}function Zt(e){return kt(e).getComputedStyle(e)}function nc(e){return Kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sa(e){if(fr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dp(e)&&e.host||vn(e);return Dp(t)?t.host:t}function pb(e){const t=Sa(e);return Jl(t)?e.ownerDocument?e.ownerDocument.body:e.body:dn(t)&&zs(t)?t:pb(t)}function ms(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const l=pb(e),r=l===((a=e.ownerDocument)==null?void 0:a.body),o=kt(l);if(r){const i=Cd(o);return t.concat(o,o.visualViewport||[],zs(l)?l:[],i&&n?ms(i):[])}return t.concat(l,ms(l,[],n))}function Cd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gb(e){const t=Zt(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const l=dn(e),r=l?e.offsetWidth:n,o=l?e.offsetHeight:a,i=pi(n)!==r||pi(a)!==o;return i&&(n=r,a=o),{width:n,height:a,$:i}}function ch(e){return Kt(e)?e:e.contextElement}function ql(e){const t=ch(e);if(!dn(t))return cn(1);const n=t.getBoundingClientRect(),{width:a,height:l,$:r}=gb(t);let o=(r?pi(n.width):n.width)/a,i=(r?pi(n.height):n.height)/l;return(!o||!Number.isFinite(o))&&(o=1),(!i||!Number.isFinite(i))&&(i=1),{x:o,y:i}}const UT=cn(0);function vb(e){const t=kt(e);return!ih()||!t.visualViewport?UT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $T(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kt(e)?!1:t}function Ka(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),r=ch(e);let o=cn(1);t&&(a?Kt(a)&&(o=ql(a)):o=ql(e));const i=$T(r,n,a)?vb(r):cn(0);let c=(l.left+i.x)/o.x,u=(l.top+i.y)/o.y,f=l.width/o.x,h=l.height/o.y;if(r){const m=kt(r),g=a&&Kt(a)?kt(a):a;let w=m,y=Cd(w);for(;y&&a&&g!==w;){const S=ql(y),v=y.getBoundingClientRect(),p=Zt(y),x=v.left+(y.clientLeft+parseFloat(p.paddingLeft))*S.x,b=v.top+(y.clientTop+parseFloat(p.paddingTop))*S.y;c*=S.x,u*=S.y,f*=S.x,h*=S.y,c+=x,u+=b,w=kt(y),y=Cd(w)}}return vi({width:f,height:h,x:c,y:u})}function uh(e,t){const n=nc(e).scrollLeft;return t?t.left+n:Ka(vn(e)).left+n}function xb(e,t,n){n===void 0&&(n=!1);const a=e.getBoundingClientRect(),l=a.left+t.scrollLeft-(n?0:uh(e,a)),r=a.top+t.scrollTop;return{x:l,y:r}}function BT(e){let{elements:t,rect:n,offsetParent:a,strategy:l}=e;const r=l==="fixed",o=vn(a),i=t?tc(t.floating):!1;if(a===o||i&&r)return n;let c={scrollLeft:0,scrollTop:0},u=cn(1);const f=cn(0),h=dn(a);if((h||!h&&!r)&&((fr(a)!=="body"||zs(o))&&(c=nc(a)),dn(a))){const g=Ka(a);u=ql(a),f.x=g.x+a.clientLeft,f.y=g.y+a.clientTop}const m=o&&!h&&!r?xb(o,c,!0):cn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-c.scrollTop*u.y+f.y+m.y}}function HT(e){return Array.from(e.getClientRects())}function qT(e){const t=vn(e),n=nc(e),a=e.ownerDocument.body,l=jt(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),r=jt(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let o=-n.scrollLeft+uh(e);const i=-n.scrollTop;return Zt(a).direction==="rtl"&&(o+=jt(t.clientWidth,a.clientWidth)-l),{width:l,height:r,x:o,y:i}}function GT(e,t){const n=kt(e),a=vn(e),l=n.visualViewport;let r=a.clientWidth,o=a.clientHeight,i=0,c=0;if(l){r=l.width,o=l.height;const u=ih();(!u||u&&t==="fixed")&&(i=l.offsetLeft,c=l.offsetTop)}return{width:r,height:o,x:i,y:c}}function VT(e,t){const n=Ka(e,!0,t==="fixed"),a=n.top+e.clientTop,l=n.left+e.clientLeft,r=dn(e)?ql(e):cn(1),o=e.clientWidth*r.x,i=e.clientHeight*r.y,c=l*r.x,u=a*r.y;return{width:o,height:i,x:c,y:u}}function zp(e,t,n){let a;if(t==="viewport")a=GT(e,n);else if(t==="document")a=qT(vn(e));else if(Kt(t))a=VT(t,n);else{const l=vb(e);a={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return vi(a)}function yb(e,t){const n=Sa(e);return n===t||!Kt(n)||Jl(n)?!1:Zt(n).position==="fixed"||yb(n,t)}function YT(e,t){const n=t.get(e);if(n)return n;let a=ms(e,[],!1).filter(i=>Kt(i)&&fr(i)!=="body"),l=null;const r=Zt(e).position==="fixed";let o=r?Sa(e):e;for(;Kt(o)&&!Jl(o);){const i=Zt(o),c=oh(o);!c&&i.position==="fixed"&&(l=null),(r?!c&&!l:!c&&i.position==="static"&&!!l&&["absolute","fixed"].includes(l.position)||zs(o)&&!c&&yb(e,o))?a=a.filter(f=>f!==o):l=i,o=Sa(o)}return t.set(e,a),a}function XT(e){let{element:t,boundary:n,rootBoundary:a,strategy:l}=e;const o=[...n==="clippingAncestors"?tc(t)?[]:YT(t,this._c):[].concat(n),a],i=o[0],c=o.reduce((u,f)=>{const h=zp(t,f,l);return u.top=jt(h.top,u.top),u.right=ba(h.right,u.right),u.bottom=ba(h.bottom,u.bottom),u.left=jt(h.left,u.left),u},zp(t,i,l));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function IT(e){const{width:t,height:n}=gb(e);return{width:t,height:n}}function PT(e,t,n){const a=dn(t),l=vn(t),r=n==="fixed",o=Ka(e,!0,r,t);let i={scrollLeft:0,scrollTop:0};const c=cn(0);function u(){c.x=uh(l)}if(a||!a&&!r)if((fr(t)!=="body"||zs(l))&&(i=nc(t)),a){const g=Ka(t,!0,r,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else l&&u();r&&!a&&l&&u();const f=l&&!a&&!r?xb(l,i):cn(0),h=o.left+i.scrollLeft-c.x-f.x,m=o.top+i.scrollTop-c.y-f.y;return{x:h,y:m,width:o.width,height:o.height}}function pu(e){return Zt(e).position==="static"}function Lp(e,t){if(!dn(e)||Zt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return vn(e)===n&&(n=n.ownerDocument.body),n}function bb(e,t){const n=kt(e);if(tc(e))return n;if(!dn(e)){let l=Sa(e);for(;l&&!Jl(l);){if(Kt(l)&&!pu(l))return l;l=Sa(l)}return n}let a=Lp(e,t);for(;a&&zT(a)&&pu(a);)a=Lp(a,t);return a&&Jl(a)&&pu(a)&&!oh(a)?n:a||LT(e)||n}const QT=async function(e){const t=this.getOffsetParent||bb,n=this.getDimensions,a=await n(e.floating);return{reference:PT(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function KT(e){return Zt(e).direction==="rtl"}const ZT={convertOffsetParentRelativeRectToViewportRelativeRect:BT,getDocumentElement:vn,getClippingRect:XT,getOffsetParent:bb,getElementRects:QT,getClientRects:HT,getDimensions:IT,getScale:ql,isElement:Kt,isRTL:KT};function Sb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function FT(e,t){let n=null,a;const l=vn(e);function r(){var i;clearTimeout(a),(i=n)==null||i.disconnect(),n=null}function o(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),r();const u=e.getBoundingClientRect(),{left:f,top:h,width:m,height:g}=u;if(i||t(),!m||!g)return;const w=mo(h),y=mo(l.clientWidth-(f+m)),S=mo(l.clientHeight-(h+g)),v=mo(f),x={rootMargin:-w+"px "+-y+"px "+-S+"px "+-v+"px",threshold:jt(0,ba(1,c))||1};let b=!0;function j(k){const N=k[0].intersectionRatio;if(N!==c){if(!b)return o();N?o(!1,N):a=setTimeout(()=>{o(!1,1e-7)},1e3)}N===1&&!Sb(u,e.getBoundingClientRect())&&o(),b=!1}try{n=new IntersectionObserver(j,{...x,root:l.ownerDocument})}catch{n=new IntersectionObserver(j,x)}n.observe(e)}return o(!0),r}function WT(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:l=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=a,u=ch(e),f=l||r?[...u?ms(u):[],...ms(t)]:[];f.forEach(v=>{l&&v.addEventListener("scroll",n,{passive:!0}),r&&v.addEventListener("resize",n)});const h=u&&i?FT(u,n):null;let m=-1,g=null;o&&(g=new ResizeObserver(v=>{let[p]=v;p&&p.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let w,y=c?Ka(e):null;c&&S();function S(){const v=Ka(e);y&&!Sb(y,v)&&n(),y=v,w=requestAnimationFrame(S)}return n(),()=>{var v;f.forEach(p=>{l&&p.removeEventListener("scroll",n),r&&p.removeEventListener("resize",n)}),h==null||h(),(v=g)==null||v.disconnect(),g=null,c&&cancelAnimationFrame(w)}}const JT=RT,eC=MT,tC=CT,nC=DT,aC=kT,Up=TT,lC=OT,rC=(e,t,n)=>{const a=new Map,l={platform:ZT,...n},r={...l.platform,_c:a};return ET(e,t,{...l,platform:r})};var sC=typeof document<"u",oC=function(){},Do=sC?d.useLayoutEffect:oC;function xi(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,l;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(!xi(e[a],t[a]))return!1;return!0}if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,l[a]))return!1;for(a=n;a--!==0;){const r=l[a];if(!(r==="_owner"&&e.$$typeof)&&!xi(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function wb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $p(e,t){const n=wb(e);return Math.round(t*n)/n}function gu(e){const t=d.useRef(e);return Do(()=>{t.current=e}),t}function iC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:l,elements:{reference:r,floating:o}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,h]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=d.useState(a);xi(m,a)||g(a);const[w,y]=d.useState(null),[S,v]=d.useState(null),p=d.useCallback(E=>{E!==k.current&&(k.current=E,y(E))},[]),x=d.useCallback(E=>{E!==N.current&&(N.current=E,v(E))},[]),b=r||w,j=o||S,k=d.useRef(null),N=d.useRef(null),_=d.useRef(f),D=c!=null,A=gu(c),O=gu(l),H=gu(u),L=d.useCallback(()=>{if(!k.current||!N.current)return;const E={placement:t,strategy:n,middleware:m};O.current&&(E.platform=O.current),rC(k.current,N.current,E).then(z=>{const Q={...z,isPositioned:H.current!==!1};B.current&&!xi(_.current,Q)&&(_.current=Q,tr.flushSync(()=>{h(Q)}))})},[m,t,n,O,H]);Do(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,h(E=>({...E,isPositioned:!1})))},[u]);const B=d.useRef(!1);Do(()=>(B.current=!0,()=>{B.current=!1}),[]),Do(()=>{if(b&&(k.current=b),j&&(N.current=j),b&&j){if(A.current)return A.current(b,j,L);L()}},[b,j,L,A,D]);const V=d.useMemo(()=>({reference:k,floating:N,setReference:p,setFloating:x}),[p,x]),C=d.useMemo(()=>({reference:b,floating:j}),[b,j]),$=d.useMemo(()=>{const E={position:n,left:0,top:0};if(!C.floating)return E;const z=$p(C.floating,f.x),Q=$p(C.floating,f.y);return i?{...E,transform:"translate("+z+"px, "+Q+"px)",...wb(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:Q}},[n,i,C.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:L,refs:V,elements:C,floatingStyles:$}),[f,L,V,C,$])}const cC=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:l}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?Up({element:a.current,padding:l}).fn(n):{}:a?Up({element:a,padding:l}).fn(n):{}}}},uC=(e,t)=>({...JT(e),options:[e,t]}),dC=(e,t)=>({...eC(e),options:[e,t]}),fC=(e,t)=>({...lC(e),options:[e,t]}),hC=(e,t)=>({...tC(e),options:[e,t]}),mC=(e,t)=>({...nC(e),options:[e,t]}),pC=(e,t)=>({...aC(e),options:[e,t]}),gC=(e,t)=>({...cC(e),options:[e,t]});var vC="Arrow",jb=d.forwardRef((e,t)=>{const{children:n,width:a=10,height:l=5,...r}=e;return s.jsx(ee.svg,{...r,ref:t,width:a,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});jb.displayName=vC;var xC=jb,dh="Popper",[Nb,ac]=Hn(dh),[yC,_b]=Nb(dh),Eb=e=>{const{__scopePopper:t,children:n}=e,[a,l]=d.useState(null);return s.jsx(yC,{scope:t,anchor:a,onAnchorChange:l,children:n})};Eb.displayName=dh;var Tb="PopperAnchor",Cb=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...l}=e,r=_b(Tb,n),o=d.useRef(null),i=ye(t,o);return d.useEffect(()=>{r.onAnchorChange((a==null?void 0:a.current)||o.current)}),a?null:s.jsx(ee.div,{...l,ref:i})});Cb.displayName=Tb;var fh="PopperContent",[bC,SC]=Nb(fh),kb=d.forwardRef((e,t)=>{var U,K,te,ie,ce,ue;const{__scopePopper:n,side:a="bottom",sideOffset:l=0,align:r="center",alignOffset:o=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:w,...y}=e,S=_b(fh,n),[v,p]=d.useState(null),x=ye(t,nt=>p(nt)),[b,j]=d.useState(null),k=lb(b),N=(k==null?void 0:k.width)??0,_=(k==null?void 0:k.height)??0,D=a+(r!=="center"?"-"+r:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},O=Array.isArray(u)?u:[u],H=O.length>0,L={padding:A,boundary:O.filter(jC),altBoundary:H},{refs:B,floatingStyles:V,placement:C,isPositioned:$,middlewareData:E}=iC({strategy:"fixed",placement:D,whileElementsMounted:(...nt)=>WT(...nt,{animationFrame:g==="always"}),elements:{reference:S.anchor},middleware:[uC({mainAxis:l+_,alignmentAxis:o}),c&&dC({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?fC():void 0,...L}),c&&hC({...L}),mC({...L,apply:({elements:nt,rects:it,availableWidth:Ta,availableHeight:qn})=>{const{width:Ca,height:pc}=it.reference,xn=nt.floating.style;xn.setProperty("--radix-popper-available-width",`${Ta}px`),xn.setProperty("--radix-popper-available-height",`${qn}px`),xn.setProperty("--radix-popper-anchor-width",`${Ca}px`),xn.setProperty("--radix-popper-anchor-height",`${pc}px`)}}),b&&gC({element:b,padding:i}),NC({arrowWidth:N,arrowHeight:_}),m&&pC({strategy:"referenceHidden",...L})]}),[z,Q]=Mb(C),R=un(w);ot(()=>{$&&(R==null||R())},[$,R]);const q=(U=E.arrow)==null?void 0:U.x,Z=(K=E.arrow)==null?void 0:K.y,G=((te=E.arrow)==null?void 0:te.centerOffset)!==0,[ge,W]=d.useState();return ot(()=>{v&&W(window.getComputedStyle(v).zIndex)},[v]),s.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:$?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(ie=E.transformOrigin)==null?void 0:ie.x,(ce=E.transformOrigin)==null?void 0:ce.y].join(" "),...((ue=E.hide)==null?void 0:ue.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(bC,{scope:n,placedSide:z,onArrowChange:j,arrowX:q,arrowY:Z,shouldHideArrow:G,children:s.jsx(ee.div,{"data-side":z,"data-align":Q,...y,ref:x,style:{...y.style,animation:$?void 0:"none"}})})})});kb.displayName=fh;var Ab="PopperArrow",wC={top:"bottom",right:"left",bottom:"top",left:"right"},Rb=d.forwardRef(function(t,n){const{__scopePopper:a,...l}=t,r=SC(Ab,a),o=wC[r.placedSide];return s.jsx("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[o]: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:s.jsx(xC,{...l,ref:n,style:{...l.style,display:"block"}})})});Rb.displayName=Ab;function jC(e){return e!==null}var NC=e=>({name:"transformOrigin",options:e,fn(t){var S,v,p;const{placement:n,rects:a,middlewareData:l}=t,o=((S=l.arrow)==null?void 0:S.centerOffset)!==0,i=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,f]=Mb(n),h={start:"0%",center:"50%",end:"100%"}[f],m=(((v=l.arrow)==null?void 0:v.x)??0)+i/2,g=(((p=l.arrow)==null?void 0:p.y)??0)+c/2;let w="",y="";return u==="bottom"?(w=o?h:`${m}px`,y=`${-c}px`):u==="top"?(w=o?h:`${m}px`,y=`${a.floating.height+c}px`):u==="right"?(w=`${-c}px`,y=o?h:`${g}px`):u==="left"&&(w=`${a.floating.width+c}px`,y=o?h:`${g}px`),{data:{x:w,y}}}});function Mb(e){const[t,n="center"]=e.split("-");return[t,n]}var Ob=Eb,Db=Cb,zb=kb,Lb=Rb,vu="rovingFocusGroup.onEntryFocus",_C={bubbles:!1,cancelable:!0},Ls="RovingFocusGroup",[kd,Ub,EC]=ah(Ls),[TC,lc]=Hn(Ls,[EC]),[CC,kC]=TC(Ls),$b=d.forwardRef((e,t)=>s.jsx(kd.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(kd.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(AC,{...e,ref:t})})}));$b.displayName=Ls;var AC=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:l=!1,dir:r,currentTabStopId:o,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...h}=e,m=d.useRef(null),g=ye(t,m),w=Ji(r),[y,S]=Ia({prop:o,defaultProp:i??null,onChange:c,caller:Ls}),[v,p]=d.useState(!1),x=un(u),b=Ub(n),j=d.useRef(!1),[k,N]=d.useState(0);return d.useEffect(()=>{const _=m.current;if(_)return _.addEventListener(vu,x),()=>_.removeEventListener(vu,x)},[x]),s.jsx(CC,{scope:n,orientation:a,dir:w,loop:l,currentTabStopId:y,onItemFocus:d.useCallback(_=>S(_),[S]),onItemShiftTab:d.useCallback(()=>p(!0),[]),onFocusableItemAdd:d.useCallback(()=>N(_=>_+1),[]),onFocusableItemRemove:d.useCallback(()=>N(_=>_-1),[]),children:s.jsx(ee.div,{tabIndex:v||k===0?-1:0,"data-orientation":a,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:P(e.onMouseDown,()=>{j.current=!0}),onFocus:P(e.onFocus,_=>{const D=!j.current;if(_.target===_.currentTarget&&D&&!v){const A=new CustomEvent(vu,_C);if(_.currentTarget.dispatchEvent(A),!A.defaultPrevented){const O=b().filter(C=>C.focusable),H=O.find(C=>C.active),L=O.find(C=>C.id===y),V=[H,L,...O].filter(Boolean).map(C=>C.ref.current);qb(V,f)}}j.current=!1}),onBlur:P(e.onBlur,()=>p(!1))})})}),Bb="RovingFocusGroupItem",Hb=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:l=!1,tabStopId:r,children:o,...i}=e,c=on(),u=r||c,f=kC(Bb,n),h=f.currentTabStopId===u,m=Ub(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:y}=f;return d.useEffect(()=>{if(a)return g(),()=>w()},[a,g,w]),s.jsx(kd.ItemSlot,{scope:n,id:u,focusable:a,active:l,children:s.jsx(ee.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:P(e.onMouseDown,S=>{a?f.onItemFocus(u):S.preventDefault()}),onFocus:P(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:P(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){f.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const v=OC(S,f.orientation,f.dir);if(v!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let x=m().filter(b=>b.focusable).map(b=>b.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const b=x.indexOf(S.currentTarget);x=f.loop?DC(x,b+1):x.slice(b+1)}setTimeout(()=>qb(x))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:y!=null}):o})})});Hb.displayName=Bb;var RC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function MC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function OC(e,t,n){const a=MC(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return RC[a]}function qb(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function DC(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var Gb=$b,Vb=Hb,Ad=["Enter"," "],zC=["ArrowDown","PageUp","Home"],Yb=["ArrowUp","PageDown","End"],LC=[...zC,...Yb],UC={ltr:[...Ad,"ArrowRight"],rtl:[...Ad,"ArrowLeft"]},$C={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Us="Menu",[ps,BC,HC]=ah(Us),[al,Xb]=Hn(Us,[HC,ac,lc]),rc=ac(),Ib=lc(),[qC,ll]=al(Us),[GC,$s]=al(Us),Pb=e=>{const{__scopeMenu:t,open:n=!1,children:a,dir:l,onOpenChange:r,modal:o=!0}=e,i=rc(t),[c,u]=d.useState(null),f=d.useRef(!1),h=un(r),m=Ji(l);return d.useEffect(()=>{const g=()=>{f.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>f.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),s.jsx(Ob,{...i,children:s.jsx(qC,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u,children:s.jsx(GC,{scope:t,onClose:d.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:f,dir:m,modal:o,children:a})})})};Pb.displayName=Us;var VC="MenuAnchor",hh=d.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,l=rc(n);return s.jsx(Db,{...l,...a,ref:t})});hh.displayName=VC;var mh="MenuPortal",[YC,Qb]=al(mh,{forceMount:void 0}),Kb=e=>{const{__scopeMenu:t,forceMount:n,children:a,container:l}=e,r=ll(mh,t);return s.jsx(YC,{scope:t,forceMount:n,children:s.jsx(gn,{present:n||r.open,children:s.jsx(Pi,{asChild:!0,container:l,children:a})})})};Kb.displayName=mh;var Bt="MenuContent",[XC,ph]=al(Bt),Zb=d.forwardRef((e,t)=>{const n=Qb(Bt,e.__scopeMenu),{forceMount:a=n.forceMount,...l}=e,r=ll(Bt,e.__scopeMenu),o=$s(Bt,e.__scopeMenu);return s.jsx(ps.Provider,{scope:e.__scopeMenu,children:s.jsx(gn,{present:a||r.open,children:s.jsx(ps.Slot,{scope:e.__scopeMenu,children:o.modal?s.jsx(IC,{...l,ref:t}):s.jsx(PC,{...l,ref:t})})})})}),IC=d.forwardRef((e,t)=>{const n=ll(Bt,e.__scopeMenu),a=d.useRef(null),l=ye(t,a);return d.useEffect(()=>{const r=a.current;if(r)return Kf(r)},[]),s.jsx(gh,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:P(e.onFocusOutside,r=>r.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),PC=d.forwardRef((e,t)=>{const n=ll(Bt,e.__scopeMenu);return s.jsx(gh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),QC=Pa("MenuContent.ScrollLock"),gh=d.forwardRef((e,t)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:l,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,onDismiss:g,disableOutsideScroll:w,...y}=e,S=ll(Bt,n),v=$s(Bt,n),p=rc(n),x=Ib(n),b=BC(n),[j,k]=d.useState(null),N=d.useRef(null),_=ye(t,N,S.onContentChange),D=d.useRef(0),A=d.useRef(""),O=d.useRef(0),H=d.useRef(null),L=d.useRef("right"),B=d.useRef(0),V=w?Ki:d.Fragment,C=w?{as:QC,allowPinchZoom:!0}:void 0,$=z=>{var U,K;const Q=A.current+z,R=b().filter(te=>!te.disabled),q=document.activeElement,Z=(U=R.find(te=>te.ref.current===q))==null?void 0:U.textValue,G=R.map(te=>te.textValue),ge=sk(G,Q,Z),W=(K=R.find(te=>te.textValue===ge))==null?void 0:K.ref.current;(function te(ie){A.current=ie,window.clearTimeout(D.current),ie!==""&&(D.current=window.setTimeout(()=>te(""),1e3))})(Q),W&&setTimeout(()=>W.focus())};d.useEffect(()=>()=>window.clearTimeout(D.current),[]),Qf();const E=d.useCallback(z=>{var R,q;return L.current===((R=H.current)==null?void 0:R.side)&&ik(z,(q=H.current)==null?void 0:q.area)},[]);return s.jsx(XC,{scope:n,searchRef:A,onItemEnter:d.useCallback(z=>{E(z)&&z.preventDefault()},[E]),onItemLeave:d.useCallback(z=>{var Q;E(z)||((Q=N.current)==null||Q.focus(),k(null))},[E]),onTriggerLeave:d.useCallback(z=>{E(z)&&z.preventDefault()},[E]),pointerGraceTimerRef:O,onPointerGraceIntentChange:d.useCallback(z=>{H.current=z},[]),children:s.jsx(V,{...C,children:s.jsx(Ii,{asChild:!0,trapped:l,onMountAutoFocus:P(r,z=>{var Q;z.preventDefault(),(Q=N.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:s.jsx(Xi,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,onDismiss:g,children:s.jsx(Gb,{asChild:!0,...x,dir:v.dir,orientation:"vertical",loop:a,currentTabStopId:j,onCurrentTabStopIdChange:k,onEntryFocus:P(c,z=>{v.isUsingKeyboardRef.current||z.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(zb,{role:"menu","aria-orientation":"vertical","data-state":f0(S.open),"data-radix-menu-content":"",dir:v.dir,...p,...y,ref:_,style:{outline:"none",...y.style},onKeyDown:P(y.onKeyDown,z=>{const R=z.target.closest("[data-radix-menu-content]")===z.currentTarget,q=z.ctrlKey||z.altKey||z.metaKey,Z=z.key.length===1;R&&(z.key==="Tab"&&z.preventDefault(),!q&&Z&&$(z.key));const G=N.current;if(z.target!==G||!LC.includes(z.key))return;z.preventDefault();const W=b().filter(U=>!U.disabled).map(U=>U.ref.current);Yb.includes(z.key)&&W.reverse(),lk(W)}),onBlur:P(e.onBlur,z=>{z.currentTarget.contains(z.target)||(window.clearTimeout(D.current),A.current="")}),onPointerMove:P(e.onPointerMove,gs(z=>{const Q=z.target,R=B.current!==z.clientX;if(z.currentTarget.contains(Q)&&R){const q=z.clientX>B.current?"right":"left";L.current=q,B.current=z.clientX}}))})})})})})})});Zb.displayName=Bt;var KC="MenuGroup",vh=d.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return s.jsx(ee.div,{role:"group",...a,ref:t})});vh.displayName=KC;var ZC="MenuLabel",Fb=d.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return s.jsx(ee.div,{...a,ref:t})});Fb.displayName=ZC;var yi="MenuItem",Bp="menu.itemSelect",sc=d.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:a,...l}=e,r=d.useRef(null),o=$s(yi,e.__scopeMenu),i=ph(yi,e.__scopeMenu),c=ye(t,r),u=d.useRef(!1),f=()=>{const h=r.current;if(!n&&h){const m=new CustomEvent(Bp,{bubbles:!0,cancelable:!0});h.addEventListener(Bp,g=>a==null?void 0:a(g),{once:!0}),wy(h,m),m.defaultPrevented?u.current=!1:o.onClose()}};return s.jsx(Wb,{...l,ref:c,disabled:n,onClick:P(e.onClick,f),onPointerDown:h=>{var m;(m=e.onPointerDown)==null||m.call(e,h),u.current=!0},onPointerUp:P(e.onPointerUp,h=>{var m;u.current||(m=h.currentTarget)==null||m.click()}),onKeyDown:P(e.onKeyDown,h=>{const m=i.searchRef.current!=="";n||m&&h.key===" "||Ad.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});sc.displayName=yi;var Wb=d.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:a=!1,textValue:l,...r}=e,o=ph(yi,n),i=Ib(n),c=d.useRef(null),u=ye(t,c),[f,h]=d.useState(!1),[m,g]=d.useState("");return d.useEffect(()=>{const w=c.current;w&&g((w.textContent??"").trim())},[r.children]),s.jsx(ps.ItemSlot,{scope:n,disabled:a,textValue:l??m,children:s.jsx(Vb,{asChild:!0,...i,focusable:!a,children:s.jsx(ee.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...r,ref:u,onPointerMove:P(e.onPointerMove,gs(w=>{a?o.onItemLeave(w):(o.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:P(e.onPointerLeave,gs(w=>o.onItemLeave(w))),onFocus:P(e.onFocus,()=>h(!0)),onBlur:P(e.onBlur,()=>h(!1))})})})}),FC="MenuCheckboxItem",Jb=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:a,...l}=e;return s.jsx(l0,{scope:e.__scopeMenu,checked:n,children:s.jsx(sc,{role:"menuitemcheckbox","aria-checked":bi(n)?"mixed":n,...l,ref:t,"data-state":yh(n),onSelect:P(l.onSelect,()=>a==null?void 0:a(bi(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Jb.displayName=FC;var e0="MenuRadioGroup",[WC,JC]=al(e0,{value:void 0,onValueChange:()=>{}}),t0=d.forwardRef((e,t)=>{const{value:n,onValueChange:a,...l}=e,r=un(a);return s.jsx(WC,{scope:e.__scopeMenu,value:n,onValueChange:r,children:s.jsx(vh,{...l,ref:t})})});t0.displayName=e0;var n0="MenuRadioItem",a0=d.forwardRef((e,t)=>{const{value:n,...a}=e,l=JC(n0,e.__scopeMenu),r=n===l.value;return s.jsx(l0,{scope:e.__scopeMenu,checked:r,children:s.jsx(sc,{role:"menuitemradio","aria-checked":r,...a,ref:t,"data-state":yh(r),onSelect:P(a.onSelect,()=>{var o;return(o=l.onValueChange)==null?void 0:o.call(l,n)},{checkForDefaultPrevented:!1})})})});a0.displayName=n0;var xh="MenuItemIndicator",[l0,ek]=al(xh,{checked:!1}),r0=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:a,...l}=e,r=ek(xh,n);return s.jsx(gn,{present:a||bi(r.checked)||r.checked===!0,children:s.jsx(ee.span,{...l,ref:t,"data-state":yh(r.checked)})})});r0.displayName=xh;var tk="MenuSeparator",s0=d.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return s.jsx(ee.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});s0.displayName=tk;var nk="MenuArrow",o0=d.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,l=rc(n);return s.jsx(Lb,{...l,...a,ref:t})});o0.displayName=nk;var ak="MenuSub",[iO,i0]=al(ak),Ar="MenuSubTrigger",c0=d.forwardRef((e,t)=>{const n=ll(Ar,e.__scopeMenu),a=$s(Ar,e.__scopeMenu),l=i0(Ar,e.__scopeMenu),r=ph(Ar,e.__scopeMenu),o=d.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:c}=r,u={__scopeMenu:e.__scopeMenu},f=d.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return d.useEffect(()=>f,[f]),d.useEffect(()=>{const h=i.current;return()=>{window.clearTimeout(h),c(null)}},[i,c]),s.jsx(hh,{asChild:!0,...u,children:s.jsx(Wb,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":f0(n.open),...e,ref:Yi(t,l.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:P(e.onPointerMove,gs(h=>{r.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(r.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:P(e.onPointerLeave,gs(h=>{var g,w;f();const m=(g=n.content)==null?void 0:g.getBoundingClientRect();if(m){const y=(w=n.content)==null?void 0:w.dataset.side,S=y==="right",v=S?-5:5,p=m[S?"left":"right"],x=m[S?"right":"left"];r.onPointerGraceIntentChange({area:[{x:h.clientX+v,y:h.clientY},{x:p,y:m.top},{x,y:m.top},{x,y:m.bottom},{x:p,y:m.bottom}],side:y}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r.onPointerGraceIntentChange(null),300)}else{if(r.onTriggerLeave(h),h.defaultPrevented)return;r.onPointerGraceIntentChange(null)}})),onKeyDown:P(e.onKeyDown,h=>{var g;const m=r.searchRef.current!=="";e.disabled||m&&h.key===" "||UC[a.dir].includes(h.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),h.preventDefault())})})})});c0.displayName=Ar;var u0="MenuSubContent",d0=d.forwardRef((e,t)=>{const n=Qb(Bt,e.__scopeMenu),{forceMount:a=n.forceMount,...l}=e,r=ll(Bt,e.__scopeMenu),o=$s(Bt,e.__scopeMenu),i=i0(u0,e.__scopeMenu),c=d.useRef(null),u=ye(t,c);return s.jsx(ps.Provider,{scope:e.__scopeMenu,children:s.jsx(gn,{present:a||r.open,children:s.jsx(ps.Slot,{scope:e.__scopeMenu,children:s.jsx(gh,{id:i.contentId,"aria-labelledby":i.triggerId,...l,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var h;o.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:P(e.onFocusOutside,f=>{f.target!==i.trigger&&r.onOpenChange(!1)}),onEscapeKeyDown:P(e.onEscapeKeyDown,f=>{o.onClose(),f.preventDefault()}),onKeyDown:P(e.onKeyDown,f=>{var g;const h=f.currentTarget.contains(f.target),m=$C[o.dir].includes(f.key);h&&m&&(r.onOpenChange(!1),(g=i.trigger)==null||g.focus(),f.preventDefault())})})})})})});d0.displayName=u0;function f0(e){return e?"open":"closed"}function bi(e){return e==="indeterminate"}function yh(e){return bi(e)?"indeterminate":e?"checked":"unchecked"}function lk(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function rk(e,t){return e.map((n,a)=>e[(t+a)%e.length])}function sk(e,t,n){const l=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,r=n?e.indexOf(n):-1;let o=rk(e,Math.max(r,0));l.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(l.toLowerCase()));return c!==n?c:void 0}function ok(e,t){const{x:n,y:a}=e;let l=!1;for(let r=0,o=t.length-1;r<t.length;o=r++){const i=t[r],c=t[o],u=i.x,f=i.y,h=c.x,m=c.y;f>a!=m>a&&n<(h-u)*(a-f)/(m-f)+u&&(l=!l)}return l}function ik(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ok(n,t)}function gs(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ck=Pb,uk=hh,dk=Kb,fk=Zb,hk=vh,mk=Fb,pk=sc,gk=Jb,vk=t0,xk=a0,yk=r0,bk=s0,Sk=o0,wk=c0,jk=d0,oc="DropdownMenu",[Nk]=Hn(oc,[Xb]),ft=Xb(),[_k,h0]=Nk(oc),m0=e=>{const{__scopeDropdownMenu:t,children:n,dir:a,open:l,defaultOpen:r,onOpenChange:o,modal:i=!0}=e,c=ft(t),u=d.useRef(null),[f,h]=Ia({prop:l,defaultProp:r??!1,onChange:o,caller:oc});return s.jsx(_k,{scope:t,triggerId:on(),triggerRef:u,contentId:on(),open:f,onOpenChange:h,onOpenToggle:d.useCallback(()=>h(m=>!m),[h]),modal:i,children:s.jsx(ck,{...c,open:f,onOpenChange:h,dir:a,modal:i,children:n})})};m0.displayName=oc;var p0="DropdownMenuTrigger",g0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...l}=e,r=h0(p0,n),o=ft(n);return s.jsx(uk,{asChild:!0,...o,children:s.jsx(ee.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,...l,ref:Yi(t,r.triggerRef),onPointerDown:P(e.onPointerDown,i=>{!a&&i.button===0&&i.ctrlKey===!1&&(r.onOpenToggle(),r.open||i.preventDefault())}),onKeyDown:P(e.onKeyDown,i=>{a||(["Enter"," "].includes(i.key)&&r.onOpenToggle(),i.key==="ArrowDown"&&r.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});g0.displayName=p0;var Ek="DropdownMenuPortal",v0=e=>{const{__scopeDropdownMenu:t,...n}=e,a=ft(t);return s.jsx(dk,{...a,...n})};v0.displayName=Ek;var x0="DropdownMenuContent",y0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=h0(x0,n),r=ft(n),o=d.useRef(!1);return s.jsx(fk,{id:l.contentId,"aria-labelledby":l.triggerId,...r,...a,ref:t,onCloseAutoFocus:P(e.onCloseAutoFocus,i=>{var c;o.current||(c=l.triggerRef.current)==null||c.focus(),o.current=!1,i.preventDefault()}),onInteractOutside:P(e.onInteractOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!l.modal||f)&&(o.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=x0;var Tk="DropdownMenuGroup",Ck=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=ft(n);return s.jsx(hk,{...l,...a,ref:t})});Ck.displayName=Tk;var kk="DropdownMenuLabel",b0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=ft(n);return s.jsx(mk,{...l,...a,ref:t})});b0.displayName=kk;var Ak="DropdownMenuItem",S0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=ft(n);return s.jsx(pk,{...l,...a,ref:t})});S0.displayName=Ak;var Rk="DropdownMenuCheckboxItem",w0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=ft(n);return s.jsx(gk,{...l,...a,ref:t})});w0.displayName=Rk;var Mk="DropdownMenuRadioGroup",Ok=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=ft(n);return s.jsx(vk,{...l,...a,ref:t})});Ok.displayName=Mk;var Dk="DropdownMenuRadioItem",j0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=ft(n);return s.jsx(xk,{...l,...a,ref:t})});j0.displayName=Dk;var zk="DropdownMenuItemIndicator",N0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=ft(n);return s.jsx(yk,{...l,...a,ref:t})});N0.displayName=zk;var Lk="DropdownMenuSeparator",_0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=ft(n);return s.jsx(bk,{...l,...a,ref:t})});_0.displayName=Lk;var Uk="DropdownMenuArrow",$k=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=ft(n);return s.jsx(Sk,{...l,...a,ref:t})});$k.displayName=Uk;var Bk="DropdownMenuSubTrigger",E0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=ft(n);return s.jsx(wk,{...l,...a,ref:t})});E0.displayName=Bk;var Hk="DropdownMenuSubContent",T0=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,l=ft(n);return s.jsx(jk,{...l,...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)"}})});T0.displayName=Hk;var qk=m0,Gk=g0,Vk=v0,C0=y0,k0=b0,A0=S0,R0=w0,M0=j0,O0=N0,D0=_0,z0=E0,L0=T0;const Yk=qk,Xk=Gk,Ik=d.forwardRef(({className:e,inset:t,children:n,...a},l)=>s.jsxs(z0,{ref:l,className:I("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,s.jsx(ly,{className:"ml-auto"})]}));Ik.displayName=z0.displayName;const Pk=d.forwardRef(({className:e,...t},n)=>s.jsx(L0,{ref:n,className:I("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}));Pk.displayName=L0.displayName;const U0=d.forwardRef(({className:e,sideOffset:t=4,...n},a)=>s.jsx(Vk,{container:Fi(),children:s.jsx(C0,{ref:a,sideOffset:t,className:I("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})}));U0.displayName=C0.displayName;const Rd=d.forwardRef(({className:e,inset:t,...n},a)=>s.jsx(A0,{ref:a,className:I("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}));Rd.displayName=A0.displayName;const Qk=d.forwardRef(({className:e,children:t,checked:n,...a},l)=>s.jsxs(R0,{ref:l,className:I("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:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(O0,{children:s.jsx(If,{className:"h-4 w-4"})})}),t]}));Qk.displayName=R0.displayName;const Kk=d.forwardRef(({className:e,children:t,...n},a)=>s.jsxs(M0,{ref:a,className:I("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:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(O0,{children:s.jsx(FN,{className:"h-2 w-2 fill-current"})})}),t]}));Kk.displayName=M0.displayName;const Zk=d.forwardRef(({className:e,inset:t,...n},a)=>s.jsx(k0,{ref:a,className:I("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Zk.displayName=k0.displayName;const Fk=d.forwardRef(({className:e,...t},n)=>s.jsx(D0,{ref:n,className:I("-mx-1 my-1 h-px bg-muted",e),...t}));Fk.displayName=D0.displayName;const Wk={default:"h-9 px-3 py-1 text-sm",control:"h-7 px-2 py-1 text-xs"},ic=d.forwardRef(({className:e,type:t,inputSize:n="default",...a},l)=>s.jsx("input",{type:t,className:I("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",Wk[n],e),ref:l,...a}));ic.displayName="Input";var Jk="Label",$0=d.forwardRef((e,t)=>s.jsx(ee.label,{...e,ref:t,onMouseDown:n=>{var l;n.target.closest("button, input, select, textarea")||((l=e.onMouseDown)==null||l.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));$0.displayName=Jk;var B0=$0;const eA=Ds("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Da=d.forwardRef(({className:e,...t},n)=>s.jsx(B0,{ref:n,className:I(eA(),e),...t}));Da.displayName=B0.displayName;function H0({title:e,description:t,backHref:n,backLabel:a,className:l,link:r}){return s.jsx("div",{className:I("flex-1 px-4 py-8 sm:px-6 lg:px-8",l),children:s.jsxs("section",{className:"border-border bg-card mx-auto max-w-xl rounded-xl border p-6",children:[s.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:e}),s.jsx("div",{className:"text-muted-foreground mt-2 space-y-2 text-sm",children:t}),s.jsx(he,{asChild:!0,variant:"outline",size:"sm",className:"mt-4",children:s.jsx(r,{href:n,children:a})})]})})}function hr({title:e,description:t,actions:n,className:a,children:l,...r}){return s.jsxs("header",{"data-slot":"page-header",className:I("flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",a),...r,children:[s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsx("h1",{className:"text-foreground text-2xl font-semibold tracking-tight",children:e}),t?s.jsx("p",{className:"text-muted-foreground text-sm",children:t}):null,l]}),n?s.jsx("div",{"data-slot":"page-header-actions",className:"flex shrink-0 items-center gap-2",children:n}):null]})}function fn({as:e="div",className:t,...n}){return s.jsx(e,{className:I("rounded-lg border",t),...n})}function Hp(e,[t,n]){return Math.min(n,Math.max(t,e))}var q0=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"}),tA="VisuallyHidden",nA=d.forwardRef((e,t)=>s.jsx(ee.span,{...e,ref:t,style:{...q0,...e.style}}));nA.displayName=tA;var aA=[" ","Enter","ArrowUp","ArrowDown"],lA=[" ","Enter"],Za="Select",[cc,uc,rA]=ah(Za),[mr]=Hn(Za,[rA,ac]),dc=ac(),[sA,Na]=mr(Za),[oA,iA]=mr(Za),G0=e=>{const{__scopeSelect:t,children:n,open:a,defaultOpen:l,onOpenChange:r,value:o,defaultValue:i,onValueChange:c,dir:u,name:f,autoComplete:h,disabled:m,required:g,form:w}=e,y=dc(t),[S,v]=d.useState(null),[p,x]=d.useState(null),[b,j]=d.useState(!1),k=Ji(u),[N,_]=Ia({prop:a,defaultProp:l??!1,onChange:r,caller:Za}),[D,A]=Ia({prop:o,defaultProp:i,onChange:c,caller:Za}),O=d.useRef(null),H=S?w||!!S.closest("form"):!0,[L,B]=d.useState(new Set),V=Array.from(L).map(C=>C.props.value).join(";");return s.jsx(Ob,{...y,children:s.jsxs(sA,{required:g,scope:t,trigger:S,onTriggerChange:v,valueNode:p,onValueNodeChange:x,valueNodeHasChildren:b,onValueNodeHasChildrenChange:j,contentId:on(),value:D,onValueChange:A,open:N,onOpenChange:_,dir:k,triggerPointerDownPosRef:O,disabled:m,children:[s.jsx(cc.Provider,{scope:t,children:s.jsx(oA,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(C=>{B($=>new Set($).add(C))},[]),onNativeOptionRemove:d.useCallback(C=>{B($=>{const E=new Set($);return E.delete(C),E})},[]),children:n})}),H?s.jsxs(f1,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:h,value:D,onChange:C=>A(C.target.value),disabled:m,form:w,children:[D===void 0?s.jsx("option",{value:""}):null,Array.from(L)]},V):null]})})};G0.displayName=Za;var V0="SelectTrigger",Y0=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...l}=e,r=dc(n),o=Na(V0,n),i=o.disabled||a,c=ye(t,o.onTriggerChange),u=uc(n),f=d.useRef("touch"),[h,m,g]=m1(y=>{const S=u().filter(x=>!x.disabled),v=S.find(x=>x.value===o.value),p=p1(S,y,v);p!==void 0&&o.onValueChange(p.value)}),w=y=>{i||(o.onOpenChange(!0),g()),y&&(o.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return s.jsx(Db,{asChild:!0,...r,children:s.jsx(ee.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":h1(o.value)?"":void 0,...l,ref:c,onClick:P(l.onClick,y=>{y.currentTarget.focus(),f.current!=="mouse"&&w(y)}),onPointerDown:P(l.onPointerDown,y=>{f.current=y.pointerType;const S=y.target;S.hasPointerCapture(y.pointerId)&&S.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(w(y),y.preventDefault())}),onKeyDown:P(l.onKeyDown,y=>{const S=h.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&m(y.key),!(S&&y.key===" ")&&aA.includes(y.key)&&(w(),y.preventDefault())})})})});Y0.displayName=V0;var X0="SelectValue",I0=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:l,children:r,placeholder:o="",...i}=e,c=Na(X0,n),{onValueNodeHasChildrenChange:u}=c,f=r!==void 0,h=ye(t,c.onValueNodeChange);return ot(()=>{u(f)},[u,f]),s.jsx(ee.span,{...i,ref:h,style:{pointerEvents:"none"},children:h1(c.value)?s.jsx(s.Fragment,{children:o}):r})});I0.displayName=X0;var cA="SelectIcon",P0=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...l}=e;return s.jsx(ee.span,{"aria-hidden":!0,...l,ref:t,children:a||"▼"})});P0.displayName=cA;var uA="SelectPortal",Q0=e=>s.jsx(Pi,{asChild:!0,...e});Q0.displayName=uA;var Fa="SelectContent",K0=d.forwardRef((e,t)=>{const n=Na(Fa,e.__scopeSelect),[a,l]=d.useState();if(ot(()=>{l(new DocumentFragment)},[]),!n.open){const r=a;return r?tr.createPortal(s.jsx(Z0,{scope:e.__scopeSelect,children:s.jsx(cc.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),r):null}return s.jsx(F0,{...e,ref:t})});K0.displayName=Fa;var Gt=10,[Z0,_a]=mr(Fa),dA="SelectContentImpl",fA=Pa("SelectContent.RemoveScroll"),F0=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:r,onPointerDownOutside:o,side:i,sideOffset:c,align:u,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:w,hideWhenDetached:y,avoidCollisions:S,...v}=e,p=Na(Fa,n),[x,b]=d.useState(null),[j,k]=d.useState(null),N=ye(t,U=>b(U)),[_,D]=d.useState(null),[A,O]=d.useState(null),H=uc(n),[L,B]=d.useState(!1),V=d.useRef(!1);d.useEffect(()=>{if(x)return Kf(x)},[x]),Qf();const C=d.useCallback(U=>{const[K,...te]=H().map(ue=>ue.ref.current),[ie]=te.slice(-1),ce=document.activeElement;for(const ue of U)if(ue===ce||(ue==null||ue.scrollIntoView({block:"nearest"}),ue===K&&j&&(j.scrollTop=0),ue===ie&&j&&(j.scrollTop=j.scrollHeight),ue==null||ue.focus(),document.activeElement!==ce))return},[H,j]),$=d.useCallback(()=>C([_,x]),[C,_,x]);d.useEffect(()=>{L&&$()},[L,$]);const{onOpenChange:E,triggerPointerDownPosRef:z}=p;d.useEffect(()=>{if(x){let U={x:0,y:0};const K=ie=>{var ce,ue;U={x:Math.abs(Math.round(ie.pageX)-(((ce=z.current)==null?void 0:ce.x)??0)),y:Math.abs(Math.round(ie.pageY)-(((ue=z.current)==null?void 0:ue.y)??0))}},te=ie=>{U.x<=10&&U.y<=10?ie.preventDefault():x.contains(ie.target)||E(!1),document.removeEventListener("pointermove",K),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",te,{capture:!0})}}},[x,E,z]),d.useEffect(()=>{const U=()=>E(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[E]);const[Q,R]=m1(U=>{const K=H().filter(ce=>!ce.disabled),te=K.find(ce=>ce.ref.current===document.activeElement),ie=p1(K,U,te);ie&&setTimeout(()=>ie.ref.current.focus())}),q=d.useCallback((U,K,te)=>{const ie=!V.current&&!te;(p.value!==void 0&&p.value===K||ie)&&(D(U),ie&&(V.current=!0))},[p.value]),Z=d.useCallback(()=>x==null?void 0:x.focus(),[x]),G=d.useCallback((U,K,te)=>{const ie=!V.current&&!te;(p.value!==void 0&&p.value===K||ie)&&O(U)},[p.value]),ge=a==="popper"?Md:W0,W=ge===Md?{side:i,sideOffset:c,align:u,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:w,hideWhenDetached:y,avoidCollisions:S}:{};return s.jsx(Z0,{scope:n,content:x,viewport:j,onViewportChange:k,itemRefCallback:q,selectedItem:_,onItemLeave:Z,itemTextRefCallback:G,focusSelectedItem:$,selectedItemText:A,position:a,isPositioned:L,searchRef:Q,children:s.jsx(Ki,{as:fA,allowPinchZoom:!0,children:s.jsx(Ii,{asChild:!0,trapped:p.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:P(l,U=>{var K;(K=p.trigger)==null||K.focus({preventScroll:!0}),U.preventDefault()}),children:s.jsx(Xi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:s.jsx(ge,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:U=>U.preventDefault(),...v,...W,onPlaced:()=>B(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:P(v.onKeyDown,U=>{const K=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!K&&U.key.length===1&&R(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let ie=H().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(U.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){const ce=U.target,ue=ie.indexOf(ce);ie=ie.slice(ue+1)}setTimeout(()=>C(ie)),U.preventDefault()}})})})})})})});F0.displayName=dA;var hA="SelectItemAlignedPosition",W0=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...l}=e,r=Na(Fa,n),o=_a(Fa,n),[i,c]=d.useState(null),[u,f]=d.useState(null),h=ye(t,N=>f(N)),m=uc(n),g=d.useRef(!1),w=d.useRef(!0),{viewport:y,selectedItem:S,selectedItemText:v,focusSelectedItem:p}=o,x=d.useCallback(()=>{if(r.trigger&&r.valueNode&&i&&u&&y&&S&&v){const N=r.trigger.getBoundingClientRect(),_=u.getBoundingClientRect(),D=r.valueNode.getBoundingClientRect(),A=v.getBoundingClientRect();if(r.dir!=="rtl"){const ce=A.left-_.left,ue=D.left-ce,nt=N.left-ue,it=N.width+nt,Ta=Math.max(it,_.width),qn=window.innerWidth-Gt,Ca=Hp(ue,[Gt,Math.max(Gt,qn-Ta)]);i.style.minWidth=it+"px",i.style.left=Ca+"px"}else{const ce=_.right-A.right,ue=window.innerWidth-D.right-ce,nt=window.innerWidth-N.right-ue,it=N.width+nt,Ta=Math.max(it,_.width),qn=window.innerWidth-Gt,Ca=Hp(ue,[Gt,Math.max(Gt,qn-Ta)]);i.style.minWidth=it+"px",i.style.right=Ca+"px"}const O=m(),H=window.innerHeight-Gt*2,L=y.scrollHeight,B=window.getComputedStyle(u),V=parseInt(B.borderTopWidth,10),C=parseInt(B.paddingTop,10),$=parseInt(B.borderBottomWidth,10),E=parseInt(B.paddingBottom,10),z=V+C+L+E+$,Q=Math.min(S.offsetHeight*5,z),R=window.getComputedStyle(y),q=parseInt(R.paddingTop,10),Z=parseInt(R.paddingBottom,10),G=N.top+N.height/2-Gt,ge=H-G,W=S.offsetHeight/2,U=S.offsetTop+W,K=V+C+U,te=z-K;if(K<=G){const ce=O.length>0&&S===O[O.length-1].ref.current;i.style.bottom="0px";const ue=u.clientHeight-y.offsetTop-y.offsetHeight,nt=Math.max(ge,W+(ce?Z:0)+ue+$),it=K+nt;i.style.height=it+"px"}else{const ce=O.length>0&&S===O[0].ref.current;i.style.top="0px";const nt=Math.max(G,V+y.offsetTop+(ce?q:0)+W)+te;i.style.height=nt+"px",y.scrollTop=K-G+y.offsetTop}i.style.margin=`${Gt}px 0`,i.style.minHeight=Q+"px",i.style.maxHeight=H+"px",a==null||a(),requestAnimationFrame(()=>g.current=!0)}},[m,r.trigger,r.valueNode,i,u,y,S,v,r.dir,a]);ot(()=>x(),[x]);const[b,j]=d.useState();ot(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const k=d.useCallback(N=>{N&&w.current===!0&&(x(),p==null||p(),w.current=!1)},[x,p]);return s.jsx(pA,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:k,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:s.jsx(ee.div,{...l,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});W0.displayName=hA;var mA="SelectPopperPosition",Md=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:l=Gt,...r}=e,o=dc(n);return s.jsx(zb,{...o,...r,ref:t,align:a,collisionPadding:l,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)"}})});Md.displayName=mA;var[pA,bh]=mr(Fa,{}),Od="SelectViewport",J0=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...l}=e,r=_a(Od,n),o=bh(Od,n),i=ye(t,r.onViewportChange),c=d.useRef(0);return s.jsxs(s.Fragment,{children:[s.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}),s.jsx(cc.Slot,{scope:n,children:s.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:P(l.onScroll,u=>{const f=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&h){const g=Math.abs(c.current-f.scrollTop);if(g>0){const w=window.innerHeight-Gt*2,y=parseFloat(h.style.minHeight),S=parseFloat(h.style.height),v=Math.max(y,S);if(v<w){const p=v+g,x=Math.min(w,p),b=p-x;h.style.height=x+"px",h.style.bottom==="0px"&&(f.scrollTop=b>0?b:0,h.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});J0.displayName=Od;var e1="SelectGroup",[gA,vA]=mr(e1),xA=d.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,l=on();return s.jsx(gA,{scope:n,id:l,children:s.jsx(ee.div,{role:"group","aria-labelledby":l,...a,ref:t})})});xA.displayName=e1;var t1="SelectLabel",n1=d.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,l=vA(t1,n);return s.jsx(ee.div,{id:l.id,...a,ref:t})});n1.displayName=t1;var Si="SelectItem",[yA,a1]=mr(Si),l1=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:l=!1,textValue:r,...o}=e,i=Na(Si,n),c=_a(Si,n),u=i.value===a,[f,h]=d.useState(r??""),[m,g]=d.useState(!1),w=ye(t,p=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,p,a,l)}),y=on(),S=d.useRef("touch"),v=()=>{l||(i.onValueChange(a),i.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 s.jsx(yA,{scope:n,value:a,disabled:l,textId:y,isSelected:u,onItemTextChange:d.useCallback(p=>{h(x=>x||((p==null?void 0:p.textContent)??"").trim())},[]),children:s.jsx(cc.ItemSlot,{scope:n,value:a,disabled:l,textValue:f,children:s.jsx(ee.div,{role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...o,ref:w,onFocus:P(o.onFocus,()=>g(!0)),onBlur:P(o.onBlur,()=>g(!1)),onClick:P(o.onClick,()=>{S.current!=="mouse"&&v()}),onPointerUp:P(o.onPointerUp,()=>{S.current==="mouse"&&v()}),onPointerDown:P(o.onPointerDown,p=>{S.current=p.pointerType}),onPointerMove:P(o.onPointerMove,p=>{var x;S.current=p.pointerType,l?(x=c.onItemLeave)==null||x.call(c):S.current==="mouse"&&p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(o.onPointerLeave,p=>{var x;p.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:P(o.onKeyDown,p=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&p.key===" "||(lA.includes(p.key)&&v(),p.key===" "&&p.preventDefault())})})})})});l1.displayName=Si;var Rr="SelectItemText",r1=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:l,...r}=e,o=Na(Rr,n),i=_a(Rr,n),c=a1(Rr,n),u=iA(Rr,n),[f,h]=d.useState(null),m=ye(t,v=>h(v),c.onItemTextChange,v=>{var p;return(p=i.itemTextRefCallback)==null?void 0:p.call(i,v,c.value,c.disabled)}),g=f==null?void 0:f.textContent,w=d.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:y,onNativeOptionRemove:S}=u;return ot(()=>(y(w),()=>S(w)),[y,S,w]),s.jsxs(s.Fragment,{children:[s.jsx(ee.span,{id:c.textId,...r,ref:m}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?tr.createPortal(r.children,o.valueNode):null]})});r1.displayName=Rr;var s1="SelectItemIndicator",o1=d.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return a1(s1,n).isSelected?s.jsx(ee.span,{"aria-hidden":!0,...a,ref:t}):null});o1.displayName=s1;var Dd="SelectScrollUpButton",i1=d.forwardRef((e,t)=>{const n=_a(Dd,e.__scopeSelect),a=bh(Dd,e.__scopeSelect),[l,r]=d.useState(!1),o=ye(t,a.onScrollButtonChange);return ot(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=c.scrollTop>0;r(u)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),l?s.jsx(u1,{...e,ref:o,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});i1.displayName=Dd;var zd="SelectScrollDownButton",c1=d.forwardRef((e,t)=>{const n=_a(zd,e.__scopeSelect),a=bh(zd,e.__scopeSelect),[l,r]=d.useState(!1),o=ye(t,a.onScrollButtonChange);return ot(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;r(f)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),l?s.jsx(u1,{...e,ref:o,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});c1.displayName=zd;var u1=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...l}=e,r=_a("SelectScrollButton",n),o=d.useRef(null),i=uc(n),c=d.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),ot(()=>{var f;const u=i().find(h=>h.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),s.jsx(ee.div,{"aria-hidden":!0,...l,ref:t,style:{flexShrink:0,...l.style},onPointerDown:P(l.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(a,50))}),onPointerMove:P(l.onPointerMove,()=>{var u;(u=r.onItemLeave)==null||u.call(r),o.current===null&&(o.current=window.setInterval(a,50))}),onPointerLeave:P(l.onPointerLeave,()=>{c()})})}),bA="SelectSeparator",d1=d.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return s.jsx(ee.div,{"aria-hidden":!0,...a,ref:t})});d1.displayName=bA;var Ld="SelectArrow",SA=d.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,l=dc(n),r=Na(Ld,n),o=_a(Ld,n);return r.open&&o.position==="popper"?s.jsx(Lb,{...l,...a,ref:t}):null});SA.displayName=Ld;var wA="SelectBubbleInput",f1=d.forwardRef(({__scopeSelect:e,value:t,...n},a)=>{const l=d.useRef(null),r=ye(a,l),o=ab(t);return d.useEffect(()=>{const i=l.current;if(!i)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&f){const h=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(h)}},[o,t]),s.jsx(ee.select,{...n,style:{...q0,...n.style},ref:r,defaultValue:t})});f1.displayName=wA;function h1(e){return e===""||e===void 0}function m1(e){const t=un(e),n=d.useRef(""),a=d.useRef(0),l=d.useCallback(o=>{const i=n.current+o;t(i),function c(u){n.current=u,window.clearTimeout(a.current),u!==""&&(a.current=window.setTimeout(()=>c(""),1e3))}(i)},[t]),r=d.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,l,r]}function p1(e,t,n){const l=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,r=n?e.indexOf(n):-1;let o=jA(e,Math.max(r,0));l.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(l.toLowerCase()));return c!==n?c:void 0}function jA(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var NA=G0,g1=Y0,_A=I0,EA=P0,TA=Q0,v1=K0,CA=J0,x1=n1,y1=l1,kA=r1,AA=o1,b1=i1,S1=c1,w1=d1;const RA={default:"h-9 px-3 py-2 text-sm",control:"h-7 px-2 py-1 text-xs"},zo=NA,Lo=_A,Fr=d.forwardRef(({className:e,children:t,triggerSize:n="default",...a},l)=>s.jsxs(g1,{ref:l,className:I("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",RA[n],e),...a,children:[t,s.jsx(EA,{asChild:!0,children:s.jsx(QN,{className:"text-muted-foreground size-4","aria-hidden":"true"})})]}));Fr.displayName=g1.displayName;const j1=d.forwardRef(({className:e,...t},n)=>s.jsx(b1,{ref:n,className:I("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(IN,{className:"size-4","aria-hidden":"true"})}));j1.displayName=b1.displayName;const N1=d.forwardRef(({className:e,...t},n)=>s.jsx(S1,{ref:n,className:I("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(VN,{className:"size-4","aria-hidden":"true"})}));N1.displayName=S1.displayName;const Wr=d.forwardRef(({className:e,children:t,position:n="popper",...a},l)=>s.jsx(TA,{container:Fi(),children:s.jsxs(v1,{ref:l,className:I("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:[s.jsx(j1,{}),s.jsx(CA,{className:I("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(N1,{})]})}));Wr.displayName=v1.displayName;const MA=d.forwardRef(({className:e,...t},n)=>s.jsx(x1,{ref:n,className:I("px-2 py-1.5 text-sm font-semibold",e),...t}));MA.displayName=x1.displayName;const _n=d.forwardRef(({className:e,children:t,...n},a)=>s.jsxs(y1,{ref:a,className:I("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:[s.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(AA,{children:s.jsx(If,{className:"size-4","aria-hidden":"true"})})}),s.jsx(kA,{children:t})]}));_n.displayName=y1.displayName;const OA=d.forwardRef(({className:e,...t},n)=>s.jsx(w1,{ref:n,className:I("-mx-1 my-1 h-px bg-muted",e),...t}));OA.displayName=w1.displayName;function Bs({className:e,...t}){return s.jsx("div",{className:I("animate-pulse rounded-md bg-primary/10",e),...t})}const Pt=d.forwardRef(({className:e,containerClassName:t,containerRef:n,containerTabIndex:a,containerAriaLabel:l,...r},o)=>s.jsx("div",{ref:n,tabIndex:a,"aria-label":l,className:I("relative w-full overflow-auto",t),children:s.jsx("table",{ref:o,className:I("w-full caption-bottom text-sm",e),...r})}));Pt.displayName="Table";const hn=d.forwardRef(({className:e,...t},n)=>s.jsx("thead",{ref:n,className:I("[&_tr]:border-b",e),...t}));hn.displayName="TableHeader";const Qt=d.forwardRef(({className:e,...t},n)=>s.jsx("tbody",{ref:n,className:I("[&_tr:last-child]:border-0",e),...t}));Qt.displayName="TableBody";const DA=d.forwardRef(({className:e,...t},n)=>s.jsx("tfoot",{ref:n,className:I("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t}));DA.displayName="TableFooter";const Ce=d.forwardRef(({className:e,...t},n)=>s.jsx("tr",{ref:n,className:I("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t}));Ce.displayName="TableRow";const ne=d.forwardRef(({className:e,...t},n)=>s.jsx("th",{ref:n,className:I("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}));ne.displayName="TableHead";const J=d.forwardRef(({className:e,...t},n)=>s.jsx("td",{ref:n,className:I("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));J.displayName="TableCell";const zA=d.forwardRef(({className:e,...t},n)=>s.jsx("caption",{ref:n,className:I("text-muted-foreground mt-4 text-sm",e),...t}));zA.displayName="TableCaption";var fc="Tabs",[LA]=Hn(fc,[lc]),_1=lc(),[UA,Sh]=LA(fc),E1=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,onValueChange:l,defaultValue:r,orientation:o="horizontal",dir:i,activationMode:c="automatic",...u}=e,f=Ji(i),[h,m]=Ia({prop:a,onChange:l,defaultProp:r??"",caller:fc});return s.jsx(UA,{scope:n,baseId:on(),value:h,onValueChange:m,orientation:o,dir:f,activationMode:c,children:s.jsx(ee.div,{dir:f,"data-orientation":o,...u,ref:t})})});E1.displayName=fc;var T1="TabsList",C1=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:a=!0,...l}=e,r=Sh(T1,n),o=_1(n);return s.jsx(Gb,{asChild:!0,...o,orientation:r.orientation,dir:r.dir,loop:a,children:s.jsx(ee.div,{role:"tablist","aria-orientation":r.orientation,...l,ref:t})})});C1.displayName=T1;var k1="TabsTrigger",A1=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,disabled:l=!1,...r}=e,o=Sh(k1,n),i=_1(n),c=O1(o.baseId,a),u=D1(o.baseId,a),f=a===o.value;return s.jsx(Vb,{asChild:!0,...i,focusable:!l,active:f,children:s.jsx(ee.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:c,...r,ref:t,onMouseDown:P(e.onMouseDown,h=>{!l&&h.button===0&&h.ctrlKey===!1?o.onValueChange(a):h.preventDefault()}),onKeyDown:P(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(a)}),onFocus:P(e.onFocus,()=>{const h=o.activationMode!=="manual";!f&&!l&&h&&o.onValueChange(a)})})})});A1.displayName=k1;var R1="TabsContent",M1=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,forceMount:l,children:r,...o}=e,i=Sh(R1,n),c=O1(i.baseId,a),u=D1(i.baseId,a),f=a===i.value,h=d.useRef(f);return d.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),s.jsx(gn,{present:l||f,children:({present:m})=>s.jsx(ee.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:m&&r})})});M1.displayName=R1;function O1(e,t){return`${e}-trigger-${t}`}function D1(e,t){return`${e}-content-${t}`}var $A=E1,z1=C1,L1=A1,U1=M1;const BA=$A,$1=d.forwardRef(({className:e,...t},n)=>s.jsx(z1,{ref:n,className:I("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));$1.displayName=z1.displayName;const Ud=d.forwardRef(({className:e,...t},n)=>s.jsx(L1,{ref:n,className:I("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}));Ud.displayName=L1.displayName;const HA=d.forwardRef(({className:e,...t},n)=>s.jsx(U1,{ref:n,className:I("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));HA.displayName=U1.displayName;const B1=d.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:I("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}));B1.displayName="Textarea";const qp=["none","read","comment","write","manage","admin"];function Gp(e,t){return qp.indexOf(e??"none")>=qp.indexOf(t)}function qA(e){return e==="api_key"?"API key":e==="sdlc_login"?"sdlc login":null}const GA=String.fromCodePoint(8296),VA=String.fromCodePoint(8297);function YA(e){return`${GA}${e}${VA}`}const XA={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"}},IA={backlog:"neutral",planned:"neutral",in_progress:"info",completed:"success",canceled:"neutral"};function PA(e){return e.name==="Blocked"?"warning":IA[e.category]}function Wa(e){return new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}function H1(e){return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function QA(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"}}const Pn="not_set";function KA({open:e,commands:t,list_id:n,list_revision:a,default_status_id:l,statuses:r,priorities:o,members:i,on_close:c,on_created:u}){var H;const f=Xf(),[h,m]=d.useState(""),[g,w]=d.useState(""),[y,S]=d.useState(l??((H=r[0])==null?void 0:H.id)??""),[v,p]=d.useState(Pn),[x,b]=d.useState(Pn),[j,k]=d.useState(!1),[N,_]=d.useState(null),[D,A]=d.useState(!1);d.useEffect(()=>{var L;e&&(m(""),w(""),S(l??((L=r[0])==null?void 0:L.id)??""),p(Pn),b(Pn),k(!1),_(null))},[e,l,r]);const O=async L=>{if(L.preventDefault(),!h.trim()){k(!0);return}A(!0),_(null);try{const B=await t.run("create_task",{list_id:n,expected_list_revision:a,title:h.trim(),description:g.trim()||null,status_id:y||null,priority_id:v===Pn?null:v,primary_user_id:x===Pn?null:x});if(!B.ok){_(B.refusal.message);return}f.success("Task created."),await u()}finally{A(!1)}};return s.jsx(cT,{open:e,onOpenChange:L=>L?null:c(),children:s.jsx(fT,{children:s.jsxs("form",{onSubmit:L=>void O(L),noValidate:!0,children:[s.jsxs(hT,{children:[s.jsx(pT,{children:"New task"}),s.jsx(gT,{children:"Add a task to this List."})]}),s.jsxs("div",{className:"mt-4 grid gap-4",children:[N&&s.jsxs(Re,{variant:"destructive",children:[s.jsx(It,{className:"size-4","aria-hidden":"true"}),s.jsx(Me,{children:N})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(Da,{htmlFor:"new-task-title",children:"Title"}),s.jsx(ic,{id:"new-task-title",placeholder:"What needs doing",value:h,required:!0,"aria-invalid":j,"aria-describedby":j?"new-task-title-error":void 0,onChange:L=>{m(L.target.value),k(!1)}}),j&&s.jsx("p",{id:"new-task-title-error",className:"text-destructive text-xs",children:"Give the task a title."})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(Da,{htmlFor:"new-task-description",children:"Description (optional)"}),s.jsx(B1,{id:"new-task-description",rows:4,value:g,onChange:L=>w(L.target.value)})]}),s.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(Da,{htmlFor:"new-task-status",children:"Status"}),s.jsxs(zo,{value:y,onValueChange:S,children:[s.jsx(Fr,{id:"new-task-status",children:s.jsx(Lo,{})}),s.jsx(Wr,{children:r.map(L=>s.jsx(_n,{value:L.id,children:L.name},L.id))})]})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(Da,{htmlFor:"new-task-priority",children:"Priority"}),s.jsxs(zo,{value:v,onValueChange:p,children:[s.jsx(Fr,{id:"new-task-priority",children:s.jsx(Lo,{})}),s.jsxs(Wr,{children:[s.jsx(_n,{value:Pn,children:"Not set"}),o.map(L=>s.jsx(_n,{value:L.id,children:L.name},L.id))]})]})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(Da,{htmlFor:"new-task-primary",children:"Primary"}),s.jsxs(zo,{value:x,onValueChange:b,children:[s.jsx(Fr,{id:"new-task-primary",children:s.jsx(Lo,{})}),s.jsxs(Wr,{children:[s.jsx(_n,{value:Pn,children:"Not set"}),i.map(L=>s.jsx(_n,{value:L.user_id,children:L.label},L.user_id))]})]})]})]})]}),s.jsxs(mT,{className:"mt-6",children:[s.jsx(he,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),s.jsx(he,{type:"submit",disabled:D,children:D?"Creating…":"Create task"})]})]})})})}const ZA="Your organization's work, in queue order. Claim a task to show you are working on it.",Mr="any",q1="none",FA=1,WA=250,JA="The sdlc engine here is too old for this page",G1="Update the main checkout, then restart sdlc viewer.";function wh(){const e=ir().tasks;if(!e)throw new Error("The Tasks page rendered without the tasks seam.");return e}function eR({org:e}){var w;const t=wh(),{href:n,Link:a}=yt(),[l,r]=d.useState({state:"loading"}),[o,i]=d.useState([]),[c,u]=d.useState(null),f=d.useRef(0),h=d.useCallback(async y=>{const S=f.current+=1;y&&r({state:"loading"});const v=await t.availability({fresh:y});S===f.current&&r(v)},[t.availability]);d.useEffect(()=>{h(!1)},[h]);const m=d.useCallback(()=>void h(!0),[h]);if(d.useEffect(()=>{let y=!0;return t.members().then(S=>{y&&S.ok&&i(S.data)}),()=>{y=!1}},[t.members]),d.useEffect(()=>{if(!t.access)return;let y=!0;return t.access().then(S=>{y&&S.ok&&u(S.data)}),()=>{y=!1}},[t.access]),l.state==="off"&&((w=l.refusal)==null?void 0:w.reason)!=="engine_missing")return s.jsx(H0,{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)??ZA;return s.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:l.state==="active"?s.jsx(nR,{active:l,org:e,members:o,description:g,read_only_reason:c==null?void 0:c.read_only_reason,reload_configuration:m}):s.jsxs(s.Fragment,{children:[s.jsx(hr,{title:"Tasks",description:g}),l.state==="loading"&&s.jsx(V1,{}),(l.state==="error"||l.state==="off")&&s.jsx(Y1,{refusal:l.refusal,on_retry:m}),l.state==="available"&&s.jsx(tR,{on_done:m})]})})}function V1(){return s.jsx("div",{className:"mt-6 grid gap-2",role:"status","aria-label":"Loading tasks",children:Array.from({length:6},(e,t)=>s.jsx(Bs,{className:t===5?"h-10 w-2/3":"h-10 w-full"},t))})}function Y1({refusal:e,on_retry:t}){return(e==null?void 0:e.reason)==="view_outdated"?s.jsxs(Re,{variant:"destructive",className:"mt-6",children:[s.jsx(It,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:JA}),s.jsx(Me,{children:G1})]}):(e==null?void 0:e.reason)==="engine_missing"?s.jsxs(Re,{variant:"info",className:"mt-6",children:[s.jsx(ya,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"Tasks need the sdlc engine"}),s.jsx(Me,{children:e.message})]}):s.jsxs(Re,{variant:"destructive",className:"mt-6",children:[s.jsx(It,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"Tasks could not be loaded"}),s.jsxs(Me,{children:[s.jsx("p",{children:e!=null&&e.reason?e.message:"Check your connection and try again."}),s.jsx(he,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:t,children:"Retry"})]})]})}function tR({on_done:e}){const{commands:t}=wh(),n=Xf(),[a,l]=d.useState(!1),r=t==null?void 0:t.activate,o=async()=>{if(!r)return;l(!0);const i=await r();if(l(!1),!i.ok){n.error(i.refusal.message);return}n.success("Tasks are on."),e()};return s.jsxs(Re,{variant:"info",className:"mt-6",children:[s.jsx(ya,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"Tasks are not on for this organization"}),s.jsxs(Me,{children:[s.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?s.jsx(he,{type:"button",size:"sm",className:"mt-2",disabled:a,onClick:()=>void o(),children:"Turn on Tasks"}):null]})]})}const xu=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function nR({active:e,org:t,members:n,description:a,read_only_reason:l,reload_configuration:r}){var $h;const{commands:o,listTasks:i,waitingOnYou:c,hierarchyRevision:u}=wh(),{href:f,Link:h}=yt(),{self_id:m}=Yf(),g=Xf(),{list:w,workspace:y}=e,S=w.offers,v=S!==void 0,p=d.useMemo(()=>{var T;return((T=y.workflows.find(be=>be.id===w.workflow_id))==null?void 0:T.statuses)??[]},[y,w]),x=y.priorities,b=!!o&&Gp(w.permission,"write"),j=b&&Gp(w.permission,"manage"),k=d.useMemo(()=>new Map(n.map(T=>[T.user_id,T])),[n]),N=T=>{var be;return T?T===m?"You":((be=k.get(T))==null?void 0:be.label)??"A member":""},[_,D]=d.useState("active"),[A,O]=d.useState(!1),[H,L]=d.useState(""),[B,V]=d.useState("");d.useEffect(()=>{const T=setTimeout(()=>V(H),WA);return()=>clearTimeout(T)},[H]);const[C,$]=d.useState(null),[E,z]=d.useState(Mr),[Q,R]=d.useState(!1),[q,Z]=d.useState(!1),[G,ge]=d.useState(null),[W,U]=d.useState([]),[K,te]=d.useState(null),[ie,ce]=d.useState(0),[ue,nt]=d.useState(!1),[it,Ta]=d.useState(null),[qn,Ca]=d.useState(null),[pc,xn]=d.useState(!1),[kh,Ah]=d.useState(null),[qs,Rh]=d.useState({}),[fS,hS]=d.useState(""),{confirm:Mh,confirm_dialog:mS}=nb(),gc=d.useRef(null),Oh=d.useRef(null),vc=d.useRef(null),Dh=d.useRef(null),[Rt,pS]=d.useState(void 0),xc=!!(B.trim()||C||E!==Mr||Q||q),yc=d.useRef(0),Gn=d.useCallback(async(T,be=!1)=>{const Ne=T?yc.current:yc.current+=1,Oe={state:_,assigned_to_me:A||void 0,cursor:T,search:B.trim()||void 0,group:C??void 0,owner:E===Mr?void 0:E===q1?"":E,urgent:Q||void 0,over_estimate:q||void 0},at=ht=>i(w.id,{...Oe,cursor:ht});let Pe=await at(T),De=!!T;if(!Pe.ok&&Pe.refusal.code==="cursor_stale"&&(Pe=await at(),De=!1),Ne!==yc.current)return;if(!Pe.ok){te(Pe.refusal),ce(ht=>ht+1);return}const lt=Pe.data;te(null),ce(0),!(be&&xu(lt,vc.current))&&(vc.current=lt,ge(lt),lt.facets&&pS(lt.facets),U(ht=>De?[...ht,...lt.tasks]:lt.tasks))},[i,w.id,_,A,B,C,E,Q,q]),rl=d.useCallback(async()=>{const T=await c();if(Ca(Ne=>T.ok?null:xu(Ne,T.refusal)?Ne:T.refusal),!T.ok&&v)return;const be=T.ok?T.data:null;xu(be,Dh.current)||(Dh.current=be,Ta(be))},[c,v]);d.useEffect(()=>{vc.current=null,ge(null)},[_,A]),d.useEffect(()=>{Gn()},[Gn]),d.useEffect(()=>{rl()},[rl]);const pr=d.useCallback(async()=>{await Promise.all([Gn(),rl()])},[Gn,rl]),sl=S==null?void 0:S.refresh_ms;d.useEffect(()=>{if(!sl)return;const T=setInterval(()=>{Gn(void 0,!0),rl()},sl);return()=>clearInterval(T)},[sl,Gn,rl]);const bc=d.useCallback(async(T,be,Ne)=>{if(!o)return;const Oe=await o.run(T,be);Oe.ok?Ne&&g.success(Ne):(g.error(Oe.refusal.message),Oe.refusal.code==="revision_conflict"&&r()),await pr()},[o,g,pr,r]),Gs=p.find(T=>T.category==="completed"),zh=async(T,be,Ne)=>{const Oe=be+Ne,at=W[Oe];if(!at||!G||!o)return;const Pe=async(De,lt)=>{const ht=await o.run(De,lt);if(!ht.ok)throw ht.refusal;return ht.data};try{let De=G.list.order_revision,lt=T.revision;if(at.queue_rank===null){const ht=W.findIndex(Vn=>Vn.queue_rank===null);for(const Vn of W.slice(ht,Oe+1)){const Ys=await Pe("reorder",{task_id:Vn.id,expected_revision:Vn.revision,expected_order_revision:De,placement:"end"});De=Ys.list.order_revision,Vn.id===T.id&&(lt=Ys.task.revision)}}await Pe("reorder",{task_id:T.id,expected_revision:lt,expected_order_revision:De,placement:Ne<0?"before":"after",anchor_task_id:at.id})}catch(De){g.error(De.message)}await pr()},gS=T=>{Gs&&bc("update_task",{task_id:T.id,expected_revision:T.revision,changes:{status_id:Gs.id}},`${T.title} completed.`)},vS=async T=>{if(!G||!await Mh({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[Ne,Oe]=await Promise.all([i(w.id,{limit:1}),u(y.id)]);if(!Ne.ok||!Oe.ok){g.error(Ne.ok?Oe.ok?"":Oe.refusal.message:Ne.refusal.message);return}await bc("archive_task",{task_id:T.id,expected_revision:T.revision,expected_order_revision:Ne.data.list.order_revision,expected_hierarchy_revision:Oe.data},`${T.title} archived.`)},xS=async T=>{await bc("release_hold",{hold_id:T},"Hold released.")},Lh=async(T,be,Ne,Oe)=>{var ht;if(!(o!=null&&o.complete)||!await Mh({title:`Mark ${be} done?`,description:Ne.reason?`“${Ne.reason}”
284
+
285
+ It leaves the open tasks.`:"It leaves the open tasks.",action_label:"Mark done"}))return;Ah(T);const Pe=await o.complete(Ne);if(Ah(null),!Pe.ok){Rh(Vn=>({...Vn,[T]:Pe.refusal.message}));return}Rh(({[T]:Vn,...Ys})=>Ys),hS(`${be} marked done.`),await pr();const De=Oh.current;(ht=(Oe?(De==null?void 0:De.querySelector(`[data-done-key="${CSS.escape(Oe)}"]`))??(De==null?void 0:De.querySelector(`[data-title-key="${CSS.escape(Oe)}"] a`)):null)??gc.current)==null||ht.focus()},Uh=()=>{var T;L(""),V(""),$(null),z(Mr),R(!1),Z(!1),(T=gc.current)==null||T.focus()},yS=new Map(p.map(T=>[T.id,T])),bS=new Map(x.map(T=>[T.id,T])),Sc=new Map(W.map(T=>[T.id,T.title])),wc=b&&_==="active",SS=W.some(T=>T.local_done),jc=wc||SS,Nc=!v||x.length>0,wS=!A&&!xc,jS=5+(Nc?1:0)+(jc?1:0),NS=K!==null&&(K.reason==="store_locked"||K.reason==="engine_failed")&&ie<=FA,Vs=(it==null?void 0:it.holds)??[],_S=W.map(T=>T.id),ES=Vs.map(T=>T.id);return s.jsxs("div",{ref:Oh,className:"contents",children:[s.jsx(hr,{title:"Tasks",description:a,actions:b?s.jsxs(he,{type:"button",onClick:()=>xn(!0),children:[s.jsx(dp,{className:"mr-2 size-4","aria-hidden":"true"}),"New task"]}):null}),v&&(G!=null&&G.open)?s.jsxs("p",{className:"text-muted-foreground mt-1 text-sm",children:[G.open," open"]}):null,sl?s.jsx("p",{className:"text-muted-foreground mt-1 text-xs",role:"status",children:K?`Not reading · trying again every ${Math.round(sl/1e3)}s`:G?`Live · refreshes every ${Math.round(sl/1e3)}s`:"Connecting…"}):null,v?s.jsx("p",{className:"sr-only",role:"status",children:fS}):null,(v||Vs.length>0)&&s.jsxs(fn,{as:"section","aria-labelledby":"waiting-title",className:"mt-4 p-4","data-testid":"tasks-waiting",children:[s.jsx("h2",{id:"waiting-title",className:"text-lg font-semibold",children:"Waiting on you"}),Vs.length>0?s.jsx("ul",{className:"mt-2 divide-y","aria-labelledby":"waiting-title",children:Vs.map((T,be)=>{var Pe,De;const Ne=XA[T.hold_type],Oe=T.target.kind==="task"?`Because you claim ${Sc.get(T.target.task_id)??"the task it waits on"} · `:"",at=T.local_done;return s.jsxs("li",{id:`waiting-${T.id}`,"data-title-key":T.id,className:"flex flex-wrap items-center gap-3 py-2",children:[T.task?s.jsx(h,{className:"text-primary min-w-40 flex-1 hover:underline",href:f(`/org/${t}/tasks/${T.task.id}`),children:T.task.title}):s.jsx("span",{className:"min-w-40 flex-1",children:T.reason}),s.jsx(et,{variant:Ne.tone,children:T.local_label??Ne.label}),s.jsxs("div",{className:"min-w-48 flex-2",children:[T.task?s.jsx("div",{className:"text-sm",children:T.reason}):null,s.jsxs("div",{className:"text-muted-foreground text-xs",children:[Oe,"From ",N(T.opened_by)," · ",H1(T.opened_at)]}),(Pe=T.local_threads)!=null&&Pe.length?s.jsxs("div",{className:"text-muted-foreground text-xs",children:["Answer it in"," ",s.jsx(h,{className:"text-primary hover:underline",href:f(`/org/${t}/threads`),children:"Threads"}),": ",T.local_threads.join(" · ")]}):null,qs[T.id]?s.jsx("div",{className:"text-destructive text-xs",role:"alert",children:qs[T.id]}):null]}),at&&(o!=null&&o.complete)?s.jsx(he,{type:"button",variant:"outline",size:"sm","data-done-key":T.id,"aria-label":`Mark ${((De=T.task)==null?void 0:De.title)??T.reason} done`,loading:kh===T.id,onClick:()=>{var lt;return void Lh(T.id,((lt=T.task)==null?void 0:lt.title)??T.reason,at,ES[be+1]??null)},children:"Done"}):null,v?null:s.jsx(he,{type:"button",variant:"outline",size:"sm",onClick:()=>void xS(T.id),children:"Release"})]},T.id)})}):it?s.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"Nothing in this checkout waits on you."}):null,v&&qn?s.jsx("p",{className:"text-muted-foreground mt-2 text-sm",role:"status",children:qn.reason==="view_outdated"?`Waiting on you is not read here. ${G1}`:"Waiting on you could not be read. It is read again with the list."}):null,s.jsx("p",{className:"text-muted-foreground mt-2 text-xs",children:v?"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."})]}),!b&&!l&&s.jsxs(Re,{variant:"info",className:"mt-4",children:[s.jsx(t_,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"You can view these tasks"}),s.jsx(Me,{children:"Ask an organization admin for write access to change them."})]}),s.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4",children:[(S==null?void 0:S.archived)!==!1?s.jsx(BA,{value:_,onValueChange:T=>D(T),children:s.jsxs($1,{"aria-label":"Which tasks",children:[s.jsx(Ud,{value:"active",children:"Active"}),s.jsx(Ud,{value:"archived",children:"Archived"})]})}):null,(S==null?void 0:S.assigned_to_me)!==!1?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(fb,{id:"tasks-mine",checked:A,onCheckedChange:T=>O(T===!0)}),s.jsx(Da,{htmlFor:"tasks-mine",children:"Assigned to me"})]}):null,S!=null&&S.search?s.jsx(ic,{ref:gc,type:"search",className:"w-64","aria-label":"Search tasks",placeholder:"Search title, ID or detail",value:H,onChange:T=>L(T.target.value)}):null,Rt!=null&&Rt.owners?s.jsx(lR,{owners:Rt.owners,no_owner:Rt.no_owner,value:E,on_change:z}):null]}),($h=Rt==null?void 0:Rt.groups)!=null&&$h.length?s.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",role:"group","aria-label":"Status",children:[Rt.groups.map(T=>s.jsxs(he,{type:"button",variant:"outline",size:"sm",className:Oo,"aria-pressed":C===T.id,onClick:()=>$(be=>be===T.id?null:T.id),children:[T.label," ",T.count]},T.id)),Rt.marks?s.jsxs(s.Fragment,{children:[s.jsxs(he,{type:"button",variant:"outline",size:"sm",className:Oo,"aria-pressed":Q,onClick:()=>R(T=>!T),children:["Urgent ",Rt.marks.urgent]}),s.jsxs(he,{type:"button",variant:"outline",size:"sm",className:Oo,"aria-pressed":q,onClick:()=>Z(T=>!T),children:["Over estimate ",Rt.marks.over_estimate]})]}):null]}):null,xc&&(G==null?void 0:G.matched)!==void 0&&G.total!==void 0?s.jsxs("p",{className:"text-muted-foreground mt-2 text-sm",children:[G.matched," of ",G.total," match ·"," ",s.jsx(he,{type:"button",variant:"link",size:"inline-sm",onClick:Uh,children:"Clear"})]}):null,NS?s.jsx("p",{className:"text-muted-foreground mt-4 text-sm",children:"Tasks are busy. Reading them again…"}):K?s.jsx(Y1,{refusal:K,on_retry:()=>void Gn()}):null,!G&&!K&&s.jsx(V1,{}),G&&W.length===0&&xc?s.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[s.jsx(iy,{className:"text-muted-foreground size-8","aria-hidden":"true"}),s.jsx("h2",{className:"text-lg font-semibold",children:"No tasks match"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Nothing open matches these filters."}),s.jsx(he,{type:"button",variant:"outline",onClick:Uh,children:"Clear filters"})]}):G&&W.length===0&&_==="active"&&!A&&v?s.jsx("p",{className:"text-muted-foreground mt-6 text-sm",children:"No tasks recorded yet."}):G&&W.length===0&&_==="active"&&!A?s.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[s.jsx(sy,{className:"text-muted-foreground size-8","aria-hidden":"true"}),s.jsx("h2",{className:"text-lg font-semibold",children:"No tasks yet"}),s.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."}),b&&s.jsxs(he,{type:"button",onClick:()=>xn(!0),children:[s.jsx(dp,{className:"mr-2 size-4","aria-hidden":"true"}),"New task"]})]}):G?s.jsxs(s.Fragment,{children:[s.jsx(fn,{className:"mt-4 shrink-0 overflow-x-auto",children:s.jsxs(Pt,{containerAriaLabel:"Tasks",children:[s.jsx(hn,{children:s.jsxs(Ce,{children:[s.jsx(ne,{children:"Title"}),s.jsx(ne,{children:"Status"}),Nc?s.jsx(ne,{className:"hidden md:table-cell",children:"Priority"}):null,s.jsx(ne,{className:"hidden md:table-cell",children:"Primary"}),s.jsx(ne,{className:"hidden md:table-cell",children:"Holds"}),s.jsx(ne,{children:"Claimed by"}),jc?s.jsx(ne,{className:"text-right",children:"Actions"}):null]})}),s.jsxs(Qt,{children:[W.map((T,be)=>{var Pe,De;const Ne=yS.get(T.status_id),Oe=QA(T),at=T.local_done;return s.jsxs(Ce,{"data-testid":"tasks-row",children:[s.jsxs(J,{"data-title-key":T.id,children:[T.no_page?s.jsx("span",{children:T.title}):s.jsx(h,{className:"text-primary hover:underline",href:f(`/org/${t}/tasks/${T.id}`),children:T.title}),T.parent_task_id&&Sc.get(T.parent_task_id)?s.jsx("div",{className:"text-muted-foreground text-xs",children:Sc.get(T.parent_task_id)}):null,v?s.jsx(aR,{row:T}):null,qs[T.id]?s.jsx("div",{className:"text-destructive text-xs",role:"alert",children:qs[T.id]}):null]}),s.jsx(J,{children:Ne?s.jsx(et,{variant:PA(Ne),children:Ne.name}):null}),Nc?s.jsx(J,{className:"hidden md:table-cell",children:T.priority_id?((Pe=bS.get(T.priority_id))==null?void 0:Pe.name)??"":s.jsx("span",{className:"text-muted-foreground",children:"Not set"})}):null,s.jsx(J,{className:"hidden md:table-cell",children:T.owner_title?T.owner_title:T.primary_user_id?N(T.primary_user_id):s.jsx("span",{className:"text-muted-foreground",children:"Unassigned"})}),s.jsx(J,{className:"hidden md:table-cell",children:Oe?s.jsx(et,{variant:Oe.tone,children:Oe.label}):s.jsx("span",{className:"text-muted-foreground",children:"None"})}),s.jsx(J,{"data-testid":"tasks-claim",children:s.jsx(rR,{row:T,holder:N((De=T.claim)==null?void 0:De.user_id)})}),jc?s.jsx(J,{className:"text-right whitespace-nowrap",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[at&&"hold"in at?s.jsx("a",{className:"text-primary text-sm hover:underline",href:`#waiting-${at.hold}`,children:"In Waiting on you"}):at&&(o!=null&&o.complete)?s.jsx(he,{type:"button",variant:"outline",size:"sm","data-done-key":T.id,"aria-label":`Mark ${T.title} done`,loading:kh===T.id,onClick:()=>void Lh(T.id,T.title,at,_S[be+1]??null),children:"Done"}):null,wc&&wS?s.jsxs(s.Fragment,{children:[s.jsx(he,{type:"button",variant:"outline",size:"icon","aria-label":`Move ${T.title} up`,disabled:be===0,onClick:()=>void zh(T,be,-1),children:s.jsx(DN,{className:"size-4","aria-hidden":"true"})}),s.jsx(he,{type:"button",variant:"outline",size:"icon","aria-label":`Move ${T.title} down`,disabled:be===W.length-1,onClick:()=>void zh(T,be,1),children:s.jsx(MN,{className:"size-4","aria-hidden":"true"})})]}):null,wc?s.jsxs(Yk,{children:[s.jsx(Xk,{asChild:!0,children:s.jsx(he,{type:"button",variant:"outline",size:"icon","aria-label":`More actions for ${T.title}`,children:s.jsx(JN,{className:"size-4","aria-hidden":"true"})})}),s.jsxs(U0,{align:"end",children:[Gs&&T.status_id!==Gs.id?s.jsx(Rd,{onSelect:()=>gS(T),children:"Complete"}):null,j?s.jsx(Rd,{className:"text-destructive focus:text-destructive",onSelect:()=>void vS(T),children:"Archive"}):null]})]}):null]})}):null]},T.id)}),W.length===0&&s.jsx(Ce,{children:s.jsx(J,{colSpan:jS,className:"text-muted-foreground h-24 text-center",children:_==="archived"?"No archived tasks.":"No tasks are assigned to you."})})]})]})}),G.next_cursor?s.jsx(he,{type:"button",variant:"outline",size:"sm",className:"mt-2 self-start",disabled:ue,onClick:async()=>{nt(!0),await Gn(G.next_cursor??void 0),nt(!1)},children:"Load more"}):null]}):null,b&&o&&s.jsx(KA,{open:pc,commands:o,list_id:w.id,list_revision:(G==null?void 0:G.list.revision)??w.revision,default_status_id:w.default_status_id,statuses:p,priorities:x,members:n,on_close:()=>xn(!1),on_created:async()=>{xn(!1),await pr()}}),mS]})}function aR({row:e}){var n;const t=[e.local_after,e.local_detail].filter(Boolean).join(" · ");return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-muted-foreground font-mono text-xs",children:[e.id,e.match?` · matched in ${e.match}`:""]}),t?s.jsx("div",{className:"text-muted-foreground text-xs",children:t}):null,(n=e.local_marks)!=null&&n.length?s.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:e.local_marks.map(a=>s.jsx(et,{variant:a.tone??"neutral",children:a.label},a.label))}):null]})}function lR({owners:e,no_owner:t,value:n,on_change:a}){return s.jsxs(zo,{value:n,onValueChange:a,children:[s.jsx(Fr,{className:"w-56","aria-label":"Owner",children:s.jsx(Lo,{})}),s.jsxs(Wr,{children:[s.jsx(_n,{value:Mr,children:"Any owner"}),e.map(l=>s.jsxs(_n,{value:l.id,children:[l.label," (",l.count,")"]},l.id)),t!==void 0?s.jsxs(_n,{value:q1,children:["No owner (",t,")"]}):null]})]})}function rR({row:e,holder:t}){const n=e.claim;if(!n)return s.jsx("span",{className:"text-muted-foreground",children:"Nobody"});if(n.lapsed){const a=new Date(n.lease_expires_at)<=new Date;return s.jsxs("div",{children:[s.jsxs("div",{className:"text-warning",children:["Lapsed · ",t]}),s.jsx("div",{className:"text-muted-foreground text-xs",children:a?`Ran out at ${Wa(n.lease_expires_at)}`:"Can no longer edit it"})]})}return s.jsxs("div",{className:"max-w-64",children:[s.jsxs("div",{children:[t,n.via?` · ${qA(n.via)}`:""]}),s.jsxs("div",{className:"text-muted-foreground truncate text-xs",title:n.via==="sdlc_login"&&n.via_device?YA(n.via_device):void 0,children:["Until ",Wa(n.lease_expires_at),n.via==="sdlc_login"&&n.via_device?s.jsxs(s.Fragment,{children:[" · ",s.jsx("bdi",{children:n.via_device})]}):null]})]})}function $d(e,t){d.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 X1={integration:"Integration",deploy:"Deploy",publish:"Publish",accept:"Accept",custom:"Custom"},sR={self_service:"Self-service",managed:"Managed",manager_only:"Manager only"},oR={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"},iR={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 cR(e){return iR[e??"in_batch"]}function uR(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 I1=(e,t)=>`Holds ${e.toLowerCase()}${t?`: ${t}`:""}`;function dR(e,t,n,a=!0){return e.fixing_since!==void 0?{label:`Fixing forward since ${Yt(e.fixing_since)}`,tone:"warning"}:e.ref===t?{label:"Landing",tone:"info"}:a&&e.hold?{label:I1(n),tone:"info"}:{label:"Running",tone:"info"}}function Yt(e){return new Date(e*1e3).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}function hl(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 fR(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 hR(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 mR(e,t){var i,c;const{policy:n,management:a}=e,l=(i=e.layer)==null?void 0:i.kind,r=u=>hR(u,t),o=[["Mode",oR[a.mode]],["Who can join",r(a.joiners)]];return l==="implement"&&o.push(["Managers",r(a.managers)],["Manager lease",hl(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&&o.push(["Promotes to",e.layer.promotes_to]),o.push(["Carries waiting entries",n.ride?"Yes: a done turn carries entries already contained in it":"No"],["Freeze",n.freeze.enabled?`Up to ${hl(n.freeze.max_seconds)}, ${hl(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 ${hl(n.stall_seconds)}`])),o.push(["Reorder",r(a.reorderers)]),n.max_turns>1&&o.push(["Turns at once",`Up to ${n.max_turns} independent turns`]),o.push(["Turn lease",hl(n.lease_seconds)],["Time to start",`${hl(n.start_grace_seconds)} after the turn comes`]),n.entry_limit!==null&&o.push(["Waiting entries",`Up to ${n.entry_limit}`]),n.footprint!=="off"&&o.push(["Footprint",n.footprint==="required"?"Required":"Optional"]),o}const P1="Where your organization's agents take turns at a shared branch, environment or proposal. One turn runs at a time in each queue.",Q1="A task you cannot see",pR="A former member",gR="A member";function K1(){const e=ir().queues;if(!e)throw new Error("The Queues page rendered without the queues seam.");return e}function vR({org:e,open:t,path:n}){var h;const a=K1(),{href:l,Link:r}=yt(),o=a.availability,[i,c]=d.useState({state:"loading"}),u=d.useCallback(async m=>{o&&(m&&c({state:"loading"}),c(await o({fresh:m})))},[o]);d.useEffect(()=>{u(!1)},[u]);const f=!o||i.state==="active";return i.state==="off"&&((h=i.refusal)==null?void 0:h.reason)!=="engine_missing"?s.jsx(H0,{title:"Page not found",description:"This page does not exist, or you do not have access to it.",backHref:l(`/org/${e}`),backLabel:"Back to the organization",link:r}):s.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?s.jsx(yR,{org:e,open:t??null,path:n??`/org/${e}/tasks/queues`}):s.jsxs(s.Fragment,{children:[s.jsx(hr,{title:"Queues",description:a.description??P1}),i.state==="loading"&&s.jsx(Z1,{}),(i.state==="error"||i.state==="off")&&s.jsx(Bd,{refusal:i.refusal,on_retry:()=>void u(!0)}),i.state==="available"&&s.jsxs(Re,{variant:"info",className:"mt-6",children:[s.jsx(ya,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"Tasks are not on for this organization"}),s.jsxs(Me,{children:["Queues hold turns for tasks, so they show once Tasks are on."," ",s.jsx(r,{className:"text-primary hover:underline",href:l(`/org/${e}/tasks`),children:"Go to Tasks"})]})]})]})})}function Z1(){return s.jsx("div",{className:"mt-6 grid gap-2",role:"status","aria-label":"Loading queues",children:Array.from({length:3},(e,t)=>s.jsx(Bs,{className:t===2?"h-10 w-2/3":"h-10 w-full"},t))})}function Bd({refusal:e,on_retry:t}){return(e==null?void 0:e.reason)==="store_locked"?s.jsxs(Re,{variant:"info",className:"mt-6",children:[s.jsx(ya,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"The local stores are busy"}),s.jsxs(Me,{children:[s.jsx("p",{children:e.message}),s.jsx(he,{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"?s.jsxs(Re,{variant:e.reason==="engine_missing"?"info":"destructive",className:"mt-6",children:[s.jsx(ya,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:e.reason==="engine_missing"?"Queues need the sdlc engine":"The sdlc engine here is too old for this page"}),s.jsx(Me,{children:e.message})]}):s.jsxs(Re,{variant:"destructive",className:"mt-6",children:[s.jsx(It,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"Queues could not be loaded"}),s.jsxs(Me,{children:[s.jsx("p",{children:"The read did not answer. Try again in a moment."}),s.jsx(he,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:t,children:"Retry"})]})]})}const yu=e=>e.status===404||e.reason==="not_found"||e.code==="not_found";function xR(e,t,n,a){return t?e===null?`Not reading · trying again every ${n}s`:`Not reading since ${Yt(e)} · trying again every ${n}s`:e===null?"Connecting…":`Live · read ${Yt(e)} · refreshes every ${n}s${a?` · ${a}`:""}`}function yR({org:e,open:t,path:n}){var ge;const{listQueues:a,queue:l,members:r,refresh_ms:o,settings_note:i,description:c,read_scope:u,subject_label:f="Task",thread_subjects:h=!1}=K1(),{self_id:m}=Yf(),[g,w]=d.useState(null),[y,S]=d.useState(null),[v,p]=d.useState(null),[x,b]=d.useState(null),[j,k]=d.useState({state:"pending",members:[]});d.useEffect(()=>{let W=!0;return r().then(U=>{W&&k(K=>U.ok?{state:"answered",members:U.data}:{state:"failed",members:K.members})}),()=>{W=!1}},[r]);const N=d.useMemo(()=>new Map(j.members.map(W=>[W.user_id,W])),[j.members]),_=j.state==="answered"?pR:gR,D=d.useCallback((W,U)=>{var K;return(U==null?void 0:U.title)??(h?(U==null?void 0:U.id)??W:W===m?"You":((K=N.get(W))==null?void 0:K.label)??_)},[N,_,m,h]),A=d.useRef({list:{last:null,fresh:!1},detail:{last:null,fresh:!1}}),[O,H]=d.useState(null),[L,B]=d.useState(!1),V=d.useCallback((W,U)=>{A.current[W]={last:U,fresh:!0};const{list:K,detail:te}=A.current;B(K.last==="failed"||te.last==="failed"),K.fresh&&te.fresh&&K.last==="ok"&&te.last==="ok"&&H(Date.now()/1e3)},[]),C=t??((ge=g==null?void 0:g.queues[0])==null?void 0:ge.id)??null,$=d.useRef(C);d.useEffect(()=>{$.current=C},[C]);const E=d.useRef(0),z=d.useCallback(async()=>{var K;const W=E.current+=1;A.current.list.fresh=!1;const U=await a();if(W===E.current)if(U.ok){if(w(U.data),S(null),!t){const te=((K=U.data.queues[0])==null?void 0:K.id)??null;te===null?A.current.detail={last:"ok",fresh:!0}:te!==$.current&&(A.current.detail.fresh=!1)}V("list","ok")}else S(U.refusal),V("list","failed")},[a,t,V]),Q=d.useRef(0),R=d.useCallback(async()=>{const W=Q.current+=1;if(!C)return;A.current.detail.fresh=!1;const U=await l(C);W===Q.current&&(U.ok?(p(U.data),b(null),V("detail","ok")):(b(U.refusal),yu(U.refusal)&&p(null),V("detail",yu(U.refusal)?"ok":"failed")))},[C,l,V]);d.useEffect(()=>{z()},[z]),d.useEffect(()=>{p(null),b(null),R()},[R]);const q=d.useCallback(()=>{z(),R()},[z,R]);$d(q,o);const Z=Math.round(o/1e3),G=x!==null&&yu(x);return s.jsxs(s.Fragment,{children:[s.jsxs(hr,{title:"Queues",description:c??P1,children:[s.jsx("p",{className:"text-muted-foreground text-xs",children:xR(O,L,Z,u)}),s.jsx("span",{className:"sr-only",role:"status",children:L?"Not reading":O===null?"Connecting":"Live"})]}),!g&&!y&&s.jsx(Z1,{}),!g&&y&&s.jsx(Bd,{refusal:y,on_retry:q}),g&&g.queues.length===0?s.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[s.jsx(oy,{className:"text-muted-foreground size-8","aria-hidden":"true"}),s.jsx("h2",{className:"text-lg font-semibold",children:"No queues yet"}),s.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?s.jsxs(s.Fragment,{children:[s.jsx(SR,{path:n,queues:g.queues,open_id:C,name:D,held:h}),G?s.jsxs(Re,{variant:"info",className:"mt-6",children:[s.jsx(ya,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"This queue is no longer available"}),s.jsx(Me,{children:"It was archived, or you can no longer read its Workspace. Pick another queue above."})]}):v&&v.queue.id===C?s.jsx(wR,{org:e,detail:v,name:D,settings_note:i,subject_label:f,thread_subjects:h}):x?s.jsx(Bd,{refusal:x,on_retry:()=>void R()}):s.jsx(Bs,{className:"mt-6 h-40 w-full shrink-0",role:"status","aria-label":"Loading the queue"})]}):null]})}function Hd({org:e,subject:t,link:n}){const{href:a,Link:l}=yt();return!t||t.hidden?s.jsx("span",{className:"text-muted-foreground",children:Q1}):t.kind==="task"&&n?s.jsx(l,{className:"text-primary hover:underline",href:a(`/org/${e}/tasks/${t.id}`),children:t.title??t.id}):s.jsx("span",{children:t.title??t.id})}function bR(e,t,n){const a=e.freeze?`frozen until ${Yt(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 ${Yt(e.batch.opened_at)}`,a].filter(Boolean).join(" · "),warn:!1};if(e.turn){const l=e.turn.subject,r=l.hidden?Q1:l.title??l.id,o=(e.running_count??1)>1?`${e.running_count} turns · `:"",i=e.turn.landing?" landing":"",c=n&&!!e.turn.hold,u=[c?I1(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:`${o}${r}${i}`,secondary:bu(u.join(" · ")),warn:!1}:{primary:`${o}${r}${i}`,secondary:u.length?bu(u.join(" · ")):null,warn:u.length>0}}return{primary:"Nothing running",secondary:a?bu(a):null,warn:!!a}}const bu=e=>e.charAt(0).toUpperCase()+e.slice(1);function SR({path:e,queues:t,open_id:n,name:a,held:l}){const{href:r,Link:o}=yt();return s.jsx(fn,{className:"mt-4 shrink-0 overflow-x-auto",children:s.jsxs(Pt,{containerAriaLabel:"Queues",children:[s.jsx(hn,{children:s.jsxs(Ce,{children:[s.jsx(ne,{children:"Queue"}),s.jsx(ne,{className:"hidden md:table-cell",children:"Step"}),s.jsx(ne,{children:"Running turn"}),s.jsx(ne,{className:"hidden text-right md:table-cell",children:"Waiting"})]})}),s.jsx(Qt,{children:t.map(i=>{var m;const c=i.id===n,u=fR(i),f=bR(i,a,l),h=i.waiting-(((m=i.batch)==null?void 0:m.remaining)??0);return s.jsxs(Ce,{"data-testid":"queues-row",className:I(c&&"bg-accent"),children:[s.jsxs(J,{children:[s.jsx(o,{className:"text-primary hover:underline",href:r(`${e}?queue=${encodeURIComponent(i.id)}`),"aria-current":c?"page":void 0,children:i.name}),u?s.jsx("div",{className:"text-muted-foreground text-xs",children:u}):null,s.jsxs("div",{className:"text-muted-foreground text-xs md:hidden",children:[h," waiting"]})]}),s.jsx(J,{className:"hidden md:table-cell",children:s.jsx(et,{variant:"neutral",children:X1[i.policy.step]})}),s.jsxs(J,{children:[s.jsx("div",{className:I(!i.batch&&!i.turn&&"text-muted-foreground"),children:f.primary}),f.secondary?s.jsx("div",{className:I("text-xs",f.warn?"text-warning":"text-muted-foreground"),children:f.secondary}):null]}),s.jsx(J,{className:"hidden text-right md:table-cell",children:h})]},i.id)})})]})})}function po({id:e,title:t,side:n,children:a}){return s.jsxs("section",{"aria-labelledby":e,className:"flex flex-col gap-2",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("h3",{id:e,className:"text-sm font-semibold",children:t}),n?s.jsx("span",{className:"text-muted-foreground text-xs",children:n}):null]}),a]})}function Vp({org:e,entries:t,landing:n,queue_name:a,subject_label:l,held:r,label:o}){return s.jsx("div",{className:"overflow-x-auto rounded-lg border",children:s.jsxs(Pt,{containerAriaLabel:o,children:[s.jsx(hn,{children:s.jsxs(Ce,{children:[s.jsx(ne,{children:l}),s.jsx(ne,{children:"State"})]})}),s.jsx(Qt,{children:t.map(i=>{const c=dR(i,n,a,r);return s.jsxs(Ce,{"data-testid":"queues-running",children:[s.jsxs(J,{children:[s.jsx(Hd,{org:e,subject:i.subject,link:!r}),r&&i.hold&&i.note&&!i.subject.hidden?s.jsx("div",{className:"text-muted-foreground text-xs",children:i.note}):null]}),s.jsx(J,{children:s.jsx(et,{variant:c.tone,children:c.label})})]},i.ref)})})]})})}function wR({org:e,detail:t,name:n,settings_note:a,subject_label:l,thread_subjects:r}){var b;const{queue:o,state:i}=t,c=j=>n(j),u=new Map(i.entries.map(j=>[j.ref,j.subject])),f=i.entries.filter(j=>j.turn==="running"),h=i.entries.filter(j=>j.turn!=="running"&&j.batching!=="in_batch"),m=i.batch,g=Math.max(1,f.filter(j=>j.batching!=="in_batch").length),w=m&&o.policy.independent_turns?f.filter(j=>j.batching!=="in_batch"&&j.ref!==m.holder):[],y=i.manager,S=i.freeze,v=((b=o.layer)==null?void 0:b.kind)==="release"?o.layer.stall_hold:void 0,p=v?{who:n(v.by),why:v.reason,until:v.until}:y!=null&&y.hold?{who:n(y.holder,y.holder_subject),why:y.hold.why,until:y.hold.until}:null,x=!m&&f.length===0&&h.length===0;return s.jsxs(fn,{as:"section","aria-labelledby":"queue-title",className:"mt-6 flex shrink-0 flex-col gap-4 p-4","data-testid":"queues-detail",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("h2",{id:"queue-title",className:"text-lg font-semibold",children:o.name}),s.jsx(et,{variant:"neutral",children:X1[o.policy.step]}),s.jsx(et,{variant:"neutral",children:sR[o.management.mode]})]}),o.purpose?s.jsx("p",{className:"text-muted-foreground text-sm",children:o.purpose}):null]}),y?s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm","data-testid":"queues-manager",children:[s.jsx(R_,{className:"text-muted-foreground size-4","aria-hidden":"true"}),s.jsx("span",{className:"text-muted-foreground",children:"Manager"}),s.jsx("span",{className:"font-medium",children:n(y.holder,y.holder_subject)}),s.jsxs("span",{className:"text-muted-foreground text-xs",children:["Lease until ",Yt(y.lease_until),y.serving_until!==void 0?" · serving now":""]})]}):null,S?s.jsxs(Re,{variant:"warning",children:[s.jsx(k_,{className:"size-4","aria-hidden":"true"}),s.jsxs(Le,{children:["Frozen until ",Yt(S.lease_until)]}),s.jsxs(Me,{children:[n(S.holder,S.holder_subject)," froze this queue at ",Yt(S.since),S.label?`: ${S.label}`:"",". Only ",n(S.holder,S.holder_subject),"'s entries start until it thaws."]})]}):null,p?s.jsxs(Re,{variant:"info",children:[s.jsx(__,{className:"size-4","aria-hidden":"true"}),s.jsxs(Le,{children:["Stall hold until ",Yt(p.until)]}),s.jsxs(Me,{children:[p.who,p.why?`: ${p.why}`:"",". The first entry is not treated as stalled while it lasts."]})]}):null,x?s.jsx("p",{className:"text-muted-foreground text-sm",children:"Nothing running, and nothing waits in this queue."}):s.jsxs(s.Fragment,{children:[m?s.jsxs(po,{id:"queue-running",title:"Running turn",side:`Batch opened by ${n(m.holder,m.holder_subject)} at ${Yt(m.opened_at)}`,children:[s.jsx("div",{className:"overflow-x-auto rounded-lg border",children:s.jsxs(Pt,{containerAriaLabel:"Batch members",children:[s.jsx(hn,{children:s.jsxs(Ce,{children:[s.jsx(ne,{children:"Landing order"}),s.jsx(ne,{children:l}),s.jsx(ne,{children:"Outcome"})]})}),s.jsx(Qt,{children:m.members.map((j,k)=>{const N=cR(j.outcome);return s.jsxs(Ce,{"data-testid":"queues-member",children:[s.jsx(J,{children:k+1}),s.jsx(J,{children:s.jsx(Hd,{org:e,subject:j.subject??u.get(j.ref)??(r?{kind:"thread",id:j.ref}:void 0),link:!r})}),s.jsx(J,{children:s.jsx(et,{variant:N.tone,children:N.label})})]},j.ref)})})]})}),w.length>0?s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"text-muted-foreground text-xs font-medium",children:"Also running"}),s.jsx(Vp,{org:e,entries:w,landing:i.landing,queue_name:o.name,subject_label:l,held:r,label:"Turns running beside the batch"})]}):null]}):s.jsx(po,{id:"queue-running",title:f.length>1?"Running turns":"Running turn",children:f.length===0?s.jsx("p",{className:"text-muted-foreground text-sm",children:"Nothing running."}):s.jsx(Vp,{org:e,entries:f,landing:i.landing,queue_name:o.name,subject_label:l,held:r,label:"Running turns"})}),s.jsx(po,{id:"queue-waiting",title:"Waiting",children:h.length===0?s.jsx("p",{className:"text-muted-foreground text-sm",children:"Nothing waits."}):s.jsx("div",{className:"overflow-x-auto rounded-lg border",children:s.jsxs(Pt,{containerAriaLabel:"Waiting entries",children:[s.jsx(hn,{children:s.jsxs(Ce,{children:[s.jsx(ne,{children:"Position"}),s.jsx(ne,{children:l}),s.jsx(ne,{className:"hidden md:table-cell",children:"Joined"}),s.jsx(ne,{children:"Turn"}),s.jsx(ne,{className:"hidden md:table-cell",children:"Note"})]})}),s.jsx(Qt,{children:h.map((j,k)=>{const N=uR(j);return s.jsxs(Ce,{"data-testid":"queues-waiting",children:[s.jsx(J,{children:m?g+k+1:j.position}),s.jsx(J,{children:s.jsx(Hd,{org:e,subject:j.subject,link:!r})}),s.jsx(J,{className:"hidden md:table-cell",children:Yt(j.joined_at)}),s.jsx(J,{children:s.jsx(et,{variant:N.tone,children:N.label})}),s.jsx(J,{className:"hidden md:table-cell",children:j.subject.hidden?"":j.note??""})]},j.ref)})})]})})})]}),s.jsx(po,{id:"queue-settings",title:"Settings",children:s.jsx("div",{className:"overflow-x-auto rounded-lg border",children:s.jsx(Pt,{containerAriaLabel:"Queue settings",children:s.jsx(Qt,{children:mR(o,c).map(([j,k])=>s.jsxs(Ce,{children:[s.jsx(ne,{scope:"row",className:"h-auto w-48 py-2 font-normal",children:j}),s.jsx(J,{children:k})]},j))})})})}),s.jsx("p",{className:"text-muted-foreground text-xs",children:a})]})}const jR="Who holds each post and who reports to whom in this repository's local org, worked out from its teams, job functions and posts.",NR="Covered: someone holds a post that fills the slot. Vacant: posts fill it but nobody holds them. Uncovered: no job function fills it.",_R="scripts/agent-coordination/workflow.json",ER=4,F1=e=>({paddingLeft:16+24*Math.min(e,ER)}),wi={covered:{label:"Covered",tone:"success"},vacant:{label:"Vacant",tone:"warning"},uncovered:{label:"Uncovered",tone:"error"}};function TR(){const e=ir().org;if(!e)throw new Error("The Org chart page rendered without the org seam.");return e}function CR(){const e=TR(),[t,n]=d.useState({state:"loading"}),[a,l]=d.useState(null),r=d.useRef(0),o=d.useRef(null),i=d.useCallback(f=>{const h=async m=>{const g=r.current+=1;o.current&&clearTimeout(o.current);const w=await e.chart();if(g!==r.current)return;if(w.ok){l({chart:w.data,at:new Date().toISOString()}),n({state:"read"});return}const{refusal:y}=w;if(y.reason==="no_local_org"){l(null),n({state:"none"});return}if(y.retry&&y.reason==="store_locked"&&m>0){const S=y.retry_after??10;n({state:"busy",retry_after:S}),o.current=setTimeout(()=>void h(m-1),S*1e3);return}n({state:"failed",refusal:y})};return h(f)},[e]);d.useEffect(()=>(i(1),()=>{r.current+=1,o.current&&clearTimeout(o.current)}),[i]);const c=()=>void i(1),u=t.state==="none"?null:a;return s.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:[s.jsx(hr,{title:"Org chart",description:jR}),t.state==="busy"&&!u?s.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")&&!u?s.jsx(kR,{quiet:t.state==="busy"}):null,t.state==="none"?s.jsx(AR,{}):null,t.state==="failed"?s.jsx(RR,{kept_at:(u==null?void 0:u.at)??null,on_retry:c}):null,u?s.jsx(OR,{chart:u.chart}):null]})}function kR({quiet:e=!1}){return s.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)=>s.jsx(Bs,{className:n===3?"h-10 w-2/3":"h-10 w-full"},n))})}function vs({children:e}){return s.jsx("pre",{className:"bg-muted text-foreground m-0 overflow-x-auto rounded-md border px-3 py-2 font-mono text-sm",children:s.jsx("code",{children:e})})}function AR(){return s.jsxs(Re,{variant:"info",className:"mt-6",children:[s.jsx(ya,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"This repository has no local org yet"}),s.jsxs(Me,{children:[s.jsx("p",{children:"Plan one from this checkout's workflow roles, or start one with a team. This page shows it as soon as it exists."}),s.jsxs("div",{className:"mt-2 grid w-full gap-2",children:[s.jsx(vs,{children:"sdlc org seed"}),s.jsx(vs,{children:"sdlc org add team <key>"})]})]})]})}function RR({kept_at:e,on_retry:t}){return s.jsxs(Re,{variant:"destructive",className:"mt-6",children:[s.jsx(It,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"Could not read the local org"}),s.jsxs(Me,{children:[s.jsxs("p",{children:[e?`The chart read at ${Wa(e)} is kept below. `:"","Details are in the terminal running sdlc viewer."]}),s.jsx(he,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:t,children:"Retry"})]})]})}function MR(e){return d.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])),l=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}},o=h=>{const{team:m,job:g}=r(h);return`${g} · ${m}`},i=h=>{if(h==="top")return"Top of the org";if(typeof h!="string")return`A vacant ${n.get(h.vacant)??h.vacant}`;const m=(l.get(h)??[]).map(g=>g.id);return m.length?`${o(h)} (${m.join(", ")})`:o(h)},c=new Map(e.teams.map(h=>[h.key,h.parent])),u=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:o,manager:i,byPost:(h,m)=>{const[g="",w=""]=[h.split("/")[0],m.split("/")[0]],[y,S]=[r(h),r(m)];return u(g)-u(w)||y.team.localeCompare(S.team)||y.job.localeCompare(S.job)},slot:h=>a.get(h)??h,job:h=>n.get(h)??h,team:h=>t.get(h)??h}},[e])}function Rl({id:e,title:t,description:n,children:a}){return s.jsxs("section",{"aria-labelledby":e,className:"mt-8 min-w-0",children:[s.jsx("h2",{id:e,className:"text-lg font-semibold",children:t}),s.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:n}),s.jsx("div",{className:"mt-3",children:a})]})}function OR({chart:e}){const t=MR(e);return s.jsxs(s.Fragment,{children:[s.jsx(Rl,{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:s.jsx(DR,{chart:e,names:t})}),s.jsx(Rl,{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:s.jsx(UR,{chart:e,names:t})}),s.jsxs("div",{className:"grid items-start gap-x-6 xl:grid-cols-2",children:[s.jsx(Rl,{id:"org-chart-functions",title:"Function tree",description:"Each job function under its parent, with the slots it fills.",children:s.jsx($R,{chart:e,names:t})}),s.jsxs(Rl,{id:"org-chart-slots",title:"Slots",description:NR,children:[e.workflow?null:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{className:"text-muted-foreground text-xs",children:"This checkout has no workflow file, so no slot is marked as a gate:"}),s.jsx("p",{className:"font-mono text-xs",children:_R})]}),s.jsx(HR,{chart:e,names:t})]})]}),s.jsx(GR,{chart:e,names:t})]})}function W1(e,t,n){const a=new Set(e.map(t)),l=new Map(e.map(o=>[t(o),{item:o,children:[]}])),r=[];for(const o of e){const i=n(o),c=l.get(t(o));i&&a.has(i)&&i!==t(o)?l.get(i).children.push(c):r.push(c)}return r}function DR({chart:e,names:t}){const n=W1([...e.posts].sort((r,o)=>t.byPost(r.post,o.post)),r=>r.post,r=>typeof r.reports_to=="string"&&r.reports_to!=="top"?r.reports_to:null);if(n.length===0)return s.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])),l=(r,o)=>s.jsx("ul",{role:"list",className:o===0?"m-0 -mb-px list-none p-0":"m-0 list-none p-0",children:r.map(({item:i,children:c})=>{const{team:u}=t.parts(i.post),f=typeof i.reports_to=="object"?i.reports_to:null;return s.jsxs("li",{children:[s.jsxs("div",{className:"border-b py-2 pr-4",style:F1(o),"data-testid":"org-chart-post",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx($N,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),s.jsx("span",{className:"text-sm font-medium",children:t.parts(i.post).job}),s.jsx("span",{className:"text-muted-foreground text-xs",children:f?`${u} · Reports to a vacant ${t.job(f.vacant)}`:u})]}),s.jsx("div",{className:"mt-1 grid min-w-0 gap-1 pl-6",children:i.holders.length===0?s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx(et,{variant:wi.vacant.tone,children:wi.vacant.label}),s.jsx("span",{className:"text-muted-foreground text-xs",children:"No one holds this post."})]}):i.holders.map(h=>s.jsx(zR,{holder:h,post:i.post,member:a.get(`${h.kind}:${h.id}`),names:t},`${h.kind}:${h.id}`))})]}),c.length>0?l(c,o+1):null]},i.post)})});return s.jsx(fn,{className:"overflow-hidden",children:l(n,0)})}function zR({holder:e,post:t,member:n,names:a}){const l=e.kind==="person"?O_:LN,r=n==null?void 0:n.posts.find(c=>c.post===t),o=n==null?void 0:n.posts.find(c=>c.primary);let i=null;return r!=null&&r.dotted&&o?i=`Dotted line: primary manager is ${a.manager(o.reports_to)}`:e.kind==="agent"&&n&&"accountable_person"in n&&(i=n.accountable_person?`Accountable person ${n.accountable_person.id}`:"No accountable person"),s.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[s.jsx(l,{className:"text-muted-foreground size-3.5 shrink-0","aria-hidden":"true"}),s.jsx("span",{className:"text-sm font-medium break-all",children:e.id}),s.jsx("span",{className:"text-muted-foreground text-xs",children:e.kind==="person"?"Person":"Agent"}),i?s.jsx("span",{className:"text-xs",children:i}):null]})}const LR=["sdlc org hold <team>/<function> --person <id>","sdlc org hold <team>/<function> --agent <id>"];function UR({chart:e,names:t}){if(e.members.length===0)return s.jsxs("div",{className:"grid max-w-2xl gap-2",children:[s.jsx("p",{className:"text-muted-foreground text-sm",children:"No one holds a post yet. Give a post to a person or an agent:"}),LR.map(a=>s.jsx(vs,{children:a},a))]});const n=[...e.members].sort((a,l)=>a.kind===l.kind?a.id.localeCompare(l.id):a.kind==="person"?-1:1);return s.jsx(fn,{className:"overflow-x-auto",children:s.jsxs(Pt,{containerAriaLabel:"Members",children:[s.jsx(hn,{children:s.jsxs(Ce,{children:[s.jsx(ne,{children:"Member"}),s.jsx(ne,{children:"Posts"}),s.jsx(ne,{children:"Primary manager"}),s.jsx(ne,{children:"Dotted lines"}),s.jsx(ne,{children:"Accountable person"})]})}),s.jsx(Qt,{children:n.map(a=>{var o;const l=a.posts.find(i=>i.primary),r=a.posts.filter(i=>i.dotted);return s.jsxs(Ce,{"data-testid":"org-chart-member",children:[s.jsxs(J,{children:[s.jsx("div",{className:"font-medium",children:a.id}),s.jsx("div",{className:"text-muted-foreground text-xs",children:a.kind==="person"?"Person":"Agent"})]}),s.jsx(J,{children:a.posts.map(i=>t.post(i.post)).join(", ")}),s.jsx(J,{children:l?t.manager(l.reports_to):"None"}),s.jsx(J,{children:r.length?r.map(i=>t.manager(i.reports_to)).join(", "):"None"}),s.jsx(J,{children:a.kind==="person"?"Not an agent":((o=a.accountable_person)==null?void 0:o.id)??"None"})]},`${a.kind}:${a.id}`)})})]})})}function $R({chart:e,names:t}){const n=W1([...e.job_functions].sort((l,r)=>(l.label||l.key).localeCompare(r.label||r.key)),l=>l.key,l=>l.parent);if(n.length===0)return s.jsx("p",{className:"text-muted-foreground text-sm",children:"No job functions yet."});const a=(l,r)=>s.jsx("ul",{role:"list",className:r===0?"m-0 -mb-px list-none p-0":"m-0 list-none p-0",children:l.map(({item:o,children:i})=>s.jsxs("li",{children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1 border-b py-2 pr-4",style:F1(r),"data-testid":"org-chart-function",children:[s.jsx("span",{className:"text-sm font-medium",children:o.label||o.key}),s.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[s.jsx("span",{className:"text-muted-foreground text-xs",children:o.fills.length?`Fills ${o.fills.map(t.slot).join(", ")}`:"No slot"}),o.requires_person?s.jsx(et,{variant:"neutral",children:"Requires a person"}):null]})]}),i.length>0?a(i,r+1):null]},o.key))});return s.jsx(fn,{className:"overflow-hidden",children:a(n,0)})}function BR(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 ji={covered:0,vacant:1,uncovered:2};function J1(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 HR({chart:e,names:t}){const n=J1(e);return s.jsx(fn,{className:"overflow-x-auto",children:s.jsxs(Pt,{containerAriaLabel:"Slots",children:[s.jsx(hn,{children:s.jsxs(Ce,{children:[s.jsx(ne,{children:"Slot"}),s.jsx(ne,{children:"Status"}),s.jsx(ne,{children:"Resolves to"})]})}),s.jsxs(Qt,{children:[[...e.slot_resolution].sort((a,l)=>ji[a.status]-ji[l.status]||t.slot(a.slot).localeCompare(t.slot(l.slot))).map(a=>{const l=wi[a.status];return s.jsxs(Ce,{"data-testid":"org-chart-slot",children:[s.jsxs(J,{children:[s.jsx("div",{className:"font-medium",children:t.slot(a.slot)}),n.has(a.slot)?s.jsx("div",{className:"text-muted-foreground text-xs",children:n.get(a.slot)}):null]}),s.jsx(J,{children:s.jsx(et,{variant:l.tone,children:l.label})}),s.jsxs(J,{children:[BR(a,t),a.status==="covered"&&a.needs_person?s.jsx("div",{className:"text-muted-foreground text-xs",children:"Needs a person"}):null]})]},a.slot)}),e.slot_resolution.length===0?s.jsx(Ce,{children:s.jsx(J,{colSpan:3,className:"text-muted-foreground h-24 text-center",children:"This org has no slots yet."})}):null]})]})})}const qR="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.",Yp=["sdlc org own <team>","sdlc org bind <slot> <team>/<function>... --reason <text>","sdlc org unbind <slot>"];function GR({chart:e,names:t}){const{project:n}=e;if(n.team===null){const r=n.roots.map(t.team);return s.jsx(Rl,{id:"org-chart-project",title:"This project",description:r.length?`This org has several root teams (${r.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:s.jsx("div",{className:"max-w-2xl",children:s.jsx(vs,{children:r.length?Yp[0]:"sdlc org add team <key>"})})})}const a=J1(e),l=[...n.slots].sort((r,o)=>ji[r.status]-ji[o.status]||t.slot(r.slot).localeCompare(t.slot(o.slot)));return s.jsxs(Rl,{id:"org-chart-project",title:"This project",description:qR,children:[s.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[s.jsx("span",{className:"text-muted-foreground text-xs",children:"Owning team"}),s.jsx("span",{className:"text-sm font-medium",children:t.team(n.team)})]}),s.jsx(fn,{className:"mt-3 overflow-x-auto",children:s.jsxs(Pt,{containerAriaLabel:"Slots in this project",children:[s.jsx(hn,{children:s.jsxs(Ce,{children:[s.jsx(ne,{children:"Slot"}),s.jsx(ne,{children:"Status"}),s.jsx(ne,{children:"Bound to"}),s.jsx(ne,{children:"Source"})]})}),s.jsxs(Qt,{children:[l.map(r=>{const o=wi[r.status];return s.jsxs(Ce,{"data-testid":"org-chart-project-slot",children:[s.jsxs(J,{children:[s.jsx("div",{className:"font-medium",children:t.slot(r.slot)}),a.has(r.slot)?s.jsx("div",{className:"text-muted-foreground text-xs",children:a.get(r.slot)}):null]}),s.jsx(J,{children:s.jsx(et,{variant:o.tone,children:o.label})}),s.jsx(J,{children:s.jsx(VR,{binding:r,names:t})}),s.jsx(J,{children:s.jsx(YR,{binding:r})})]},r.slot)}),l.length===0?s.jsx(Ce,{children:s.jsx(J,{colSpan:4,className:"text-muted-foreground h-24 text-center",children:"This org has no slots yet."})}):null]})]})}),s.jsxs("div",{className:"mt-3 grid max-w-2xl gap-2",children:[s.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:"}),Yp.map(r=>s.jsx(vs,{children:r},r))]})]})}function VR({binding:e,names:t}){const n=[];e.status==="covered"&&e.needs_person&&n.push("Needs a person");for(const l of e.posts)l.off_description&&n.push(`${t.post(l.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(l=>t.post(l.post)).join(", ")} has no holder`:a=e.posts.map(l=>l.holders.length?`${t.post(l.post)}: ${l.holders.map(r=>r.id).join(", ")}`:`${t.post(l.post)}: no holder`).join("; "),s.jsxs(s.Fragment,{children:[a,n.map(l=>s.jsx("div",{className:"text-muted-foreground text-xs",children:l},l))]})}function YR({binding:e}){var a;if(e.source==="baseline")return s.jsx(s.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?H1(e.set_at):null].filter(Boolean).join(", ")].filter(Boolean).join(" · ");return s.jsxs(s.Fragment,{children:["Override",n?s.jsx("div",{className:"text-muted-foreground text-xs",children:n}):null]})}const XR="Local only · this machine · not connected to SoftwareDLC",IR="Checking sync state…",PR="Sync state unknown",QR="Projects are the repositories this viewer reads on this machine. Nothing is shared unless you connect to SoftwareDLC.",qd="Details are in the terminal running sdlc viewer.",KR="How to fix it is in the terminal running sdlc viewer.",hc="Loading…",Ni="Not available";function ZR(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 Or(e){return(typeof e=="string"?new Date(e):e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}const FR={repository_registry:"this repository's registry",folder_registry:"the folder registry",issue_store:"the issue store",task_store:"the task store"};function WR(e,t){const n=t?` this list was read at ${Or(t)}.`:"";if(e.reason==="store_locked"){const a=e.store?FR[e.store]:"a local store",l=e.since?` since ${Or(e.since)}`:"";return`Another sdlc command has held ${a}${l};${n||" nothing was read yet."} ${qd}`}return e.status===0?`The viewer did not answer. Is sdlc viewer still running?${t?` This list was read at ${Or(t)}.`:""}`:`The read failed.${t?` This list was read at ${Or(t)}.`:""} ${qd}`}const JR=e=>e.status===409,eM={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 tM(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 l=e.folder?`the folder ${e.folder}`:"its folder";return{kind:"moved_member",cause:`This repository, ${t}, is not where ${l} 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?eM[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 Xp=["tasks","issues","releases"],eS=d.createContext(null);function Ea(){const e=d.useContext(eS);if(!e)throw new Error("A shell page rendered outside the app shell.");return e}const nM=10,aM=()=>new Date;function lM({shell:e,now:t=aM,children:n}){const[a,l]=d.useState(null),[r,o]=d.useState(null),[i,c]=d.useState(null),[u,f]=d.useState(null),[h,m]=d.useState(null),[g,w]=d.useState(!0),[y,S]=d.useState(!1),[v,p]=d.useState(void 0),[x,b]=d.useState(!1),[j,k]=d.useState(Xp),N=d.useRef(!1),_=d.useRef(!1),D=d.useRef(null),A=d.useRef(!0),O=d.useCallback(async(L=!1)=>{D.current&&clearTimeout(D.current),D.current=null,S(!0);const[B,V]=await Promise.all([e.organizations.list(),e.projects.list()]);if(!A.current)return;if(S(!1),w(!1),B.ok&&V.ok){if(N.current=!0,_.current=!1,m(null),f(t()),B.data.organizations.length===0){c("not_in_git"),l(null),o(null);return}c(null),l(B.data.organizations[0]),o(V.data.projects);return}const C=B.ok?V.ok?null:V.refusal:B.refusal;if(!C)return;if(JR(C)){_.current=!1,m(null),c(C),l(null),o(null);return}const $=N.current&&!_.current&&!L;_.current=!0;const E=C.retry_after??nM;m({refusal:C,shown:!$,retryInSeconds:$?E:null}),$&&(D.current=setTimeout(()=>void O(!0),E*1e3))},[e,t]);d.useEffect(()=>(A.current=!0,O(),e.about.about().then(L=>{A.current&&(L.ok?p(L.data):L.refusal.status===404?p(null):b(!0))}),Promise.all(Xp.map(async L=>{var B;return[L,await((B=e[L])==null?void 0:B.access())]})).then(L=>{A.current&&k(L.filter(([,B])=>!(B!=null&&B.ok&&!B.data.can_view)).map(([B])=>B))}),()=>{A.current=!1,D.current&&clearTimeout(D.current)}),[e,O]);const H={loading:g,org:a,projects:r,none:i,readAt:u,failure:h,about:v,aboutFailed:x,domains:j,reading:y,refresh:()=>void O()};return s.jsx(eS.Provider,{value:H,children:n})}const rM={threads:"Threads",tasks:"Tasks",queues:"Queues",worktrees:"Worktrees",workspaces:"Workspaces",chart:"Org chart"},sM={tasks:"Tasks",issues:"Issues",releases:"Releases"};function tS(e,t){return e.kind==="home"?"Home":e.kind==="org"?rM[e.page]:e.kind==="project"?e.page?sM[e.page]:t??e.project:"Not found"}const oM="(max-width: 767px)";function iM(){const e=typeof window<"u"&&window.matchMedia?window.matchMedia(oM):null,[t,n]=d.useState((e==null?void 0:e.matches)??!1);return d.useEffect(()=>{if(!e)return;const a=()=>n(e.matches);return e.addEventListener("change",a),()=>e.removeEventListener("change",a)},[e]),t}function go({className:e=""}){return s.jsx("span",{"aria-hidden":"true",className:`block animate-pulse rounded-md bg-sidebar-accent ${e}`})}function Ip({label:e,children:t}){return s.jsxs("span",{role:"status",className:"flex flex-col gap-1",children:[s.jsx("span",{className:"sr-only",children:e}),t]})}function Pp({item:e,collapsed:t}){const{Link:n}=yt(),a=e.icon;return s.jsx("li",{children:s.jsx("span",{title:e.title??(t?e.label:void 0),className:"block",children:s.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:[s.jsx(a,{className:"size-4 shrink-0","aria-hidden":"true"}),!t&&s.jsx("span",{className:"truncate",children:e.label})]})})})}const Qp="m-0 flex list-none flex-col gap-1 p-0";function Kp({label:e,collapsed:t,children:n}){return s.jsxs("div",{className:"flex flex-col gap-1 p-2",role:"group","aria-label":e,children:[!t&&s.jsx("p",{className:"m-0 px-2 text-xs font-medium text-sidebar-foreground/70",children:e}),n]})}function Zp({page:e,collapsed:t,sheet:n=!1}){const{href:a}=yt(),{worktrees:l}=ir(),r=Ea(),{org:o,projects:i,loading:c,none:u,about:f,aboutFailed:h,domains:m}=r,g=o?`/org/${o.slug}`:"",w=i==null?void 0:i.find(A=>A.current),y=A=>{var O;return((O=o==null?void 0:o.source)==null?void 0:O.kind)==="folder"&&w?`${A} · ${w.name}`:A},S=y("Workspaces"),v=y("Tasks"),p=y("Queues"),x=[{label:"Home",href:a(g||"/"),icon:u_,current:e.kind==="home"},{label:"Threads",href:a(`${g}/threads`),icon:v_,current:e.kind==="org"&&e.page==="threads"},...m.includes("tasks")?[{label:v,title:v,href:a(`${g}/tasks`),icon:sy,current:e.kind==="org"&&e.page==="tasks"}]:[],{label:p,title:p,href:a(`${g}/queues`),icon:oy,current:e.kind==="org"&&e.page==="queues"},...l?[{label:"Worktrees",href:a(`${g}/worktrees`),icon:ry,current:e.kind==="org"&&e.page==="worktrees"}]:[],{label:S,title:S,href:a(`${g}/workspaces`),icon:s_,current:e.kind==="org"&&e.page==="workspaces"},{label:"Org chart",href:a(`${g}/chart`),icon:S_,current:e.kind==="org"&&e.page==="chart"}],b=c?null:u?"No organization":(o==null?void 0:o.name)??"Organization",j=o?ZR(o):null,k=f==null?void 0:f.version,N=k?t?k:`sdlc ${k}`:h?Ni:hc,_=h||(f==null?void 0:f.sync.state)==="unknown"?PR:f===void 0?IR:XR;let D;return c?D=s.jsx("div",{className:"px-2 py-1",children:s.jsxs(Ip,{label:"Loading projects",children:[s.jsx(go,{className:"h-4 w-32"}),s.jsx(go,{className:"h-4 w-24"})]})}):i?D=s.jsx("ul",{className:Qp,children:i.map(A=>s.jsx(Pp,{collapsed:t,item:{label:A.name,href:a(`/proj/${encodeURIComponent(A.id)}`),icon:l_,current:e.kind==="project"&&e.project===A.id}},A.id))}):D=s.jsx("p",{className:"m-0 px-2 text-sm text-sidebar-foreground/70",children:u?"No projects":Ni}),s.jsxs("div",{className:"flex h-full flex-col bg-sidebar text-sidebar-foreground",children:[s.jsxs("div",{className:`flex items-center gap-2 p-2 ${n?"pr-11":""}`,role:"group","aria-label":"Current organization",children:[s.jsx("div",{className:"flex aspect-square size-8 shrink-0 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground",children:s.jsx(HN,{className:"size-4","aria-hidden":"true"})}),!t&&s.jsx("div",{className:"grid min-w-0 flex-1 text-left text-sm leading-tight",children:b===null?s.jsxs(Ip,{label:"Loading organization",children:[s.jsx(go,{className:"h-4 w-28"}),s.jsx(go,{className:"h-3 w-24"})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-semibold",title:b,children:b}),j&&s.jsx("span",{className:"truncate text-xs text-sidebar-foreground/70",children:j})]})})]}),s.jsxs("nav",{"aria-label":"App",className:"min-h-0 flex-1 overflow-y-auto",children:[s.jsx(Kp,{label:"Organization",collapsed:t,children:s.jsx("ul",{className:Qp,children:x.map(A=>s.jsx(Pp,{item:A,collapsed:t},A.label))})}),!t&&s.jsx(Kp,{label:"Projects",collapsed:t,children:D})]}),f!==null&&s.jsxs("div",{className:"flex flex-col gap-1 border-t border-sidebar-border p-2 text-xs text-sidebar-foreground/70",children:[s.jsx("p",{className:"m-0 truncate px-2",title:k?`sdlc ${k}`:void 0,children:N}),!t&&s.jsxs("p",{className:"m-0 flex items-start gap-2 px-2",children:[s.jsx(i_,{className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),s.jsx("span",{children:_})]})]})]})}const cM="outline-hidden rounded-sm focus-visible:ring-2 focus-visible:ring-ring";function uM({page:e}){var c;const{href:t,Link:n}=yt(),{org:a,projects:l,loading:r,none:o}=Ea(),i=[];if(r)i.push({label:hc});else if(o)i.push({label:"No organization"});else{const u=(a==null?void 0:a.name)??"Organization";if(i.push({label:u,href:e.kind==="home"?void 0:t(a?`/org/${a.slug}`:"/")}),e.kind==="project"){const f=((c=l==null?void 0:l.find(h=>h.id===e.project))==null?void 0:c.name)??e.project;i.push({label:f,href:e.page?t(`/proj/${encodeURIComponent(e.project)}`):void 0})}e.kind!=="home"&&!(e.kind==="project"&&!e.page)&&i.push({label:tS(e)})}return s.jsx("nav",{"aria-label":"Breadcrumb",className:"min-w-0",children:s.jsx("ol",{className:"m-0 flex min-w-0 list-none items-center gap-1.5 p-0 text-sm text-muted-foreground",children:i.map((u,f)=>s.jsxs("li",{className:"flex min-w-0 items-center gap-1.5",children:[f>0&&s.jsx(ly,{className:"size-3.5 shrink-0","aria-hidden":"true"}),u.href?s.jsx(n,{href:u.href,className:`truncate text-muted-foreground no-underline hover:text-foreground ${cM}`,children:u.label}):s.jsx("span",{className:"truncate font-normal text-foreground","aria-current":f===i.length-1?"page":void 0,children:u.label})]},`${f}-${u.label}`))})})}function dM({page:e,children:t}){var v;const n=iM(),[a,l]=d.useState(!0),[r,o]=d.useState(!1),i=d.useRef(null),c=d.useRef(null),{org:u,projects:f,loading:h,none:m}=Ea(),g=e.kind==="project"?(v=f==null?void 0:f.find(p=>p.id===e.project))==null?void 0:v.name:void 0;d.useEffect(()=>{const p=h?hc:m?"No organization":(u==null?void 0:u.name)??"Organization";document.title=`${tS(e,g)} · ${p} · sdlc viewer`},[e,g,u,h,m]);const w=()=>{var p;o(!1),(p=i.current)==null||p.focus()};d.useEffect(()=>{n||o(!1)},[n]);const y=n&&r;d.useEffect(()=>{var b;const p=c.current;if(!y||!p)return;(b=p.querySelector("a, button"))==null||b.focus();const x=j=>{var A;if(j.key==="Escape"){o(!1),(A=i.current)==null||A.focus();return}if(j.key!=="Tab")return;const k=[...p.querySelectorAll("a[href], button:not([disabled])")];if(k.length===0)return;const N=k[0],_=k[k.length-1],D=p.contains(document.activeElement);j.shiftKey&&(document.activeElement===N||!D)?(j.preventDefault(),_.focus()):!j.shiftKey&&(document.activeElement===_||!D)&&(j.preventDefault(),N.focus())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[y]);const S=!n&&!a;return s.jsxs("div",{className:"flex h-svh min-h-0 overflow-hidden bg-background text-foreground",children:[!n&&s.jsx("aside",{"aria-label":"Sidebar",className:`shrink-0 border-r border-sidebar-border transition-[width] ${S?"w-12":"w-64"}`,children:s.jsx(Zp,{page:e,collapsed:S})}),y&&s.jsxs("div",{className:"fixed inset-0 z-50 flex",children:[s.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:[s.jsx(Zp,{page:e,collapsed:!1,sheet:!0}),s.jsx("button",{type:"button","aria-label":"Close the sidebar",className:"absolute top-3 right-3 inline-flex size-7 items-center justify-center rounded-md border-0 bg-transparent text-sidebar-foreground/70 outline-hidden hover:text-sidebar-foreground focus-visible:ring-2 focus-visible:ring-ring",onClick:w,children:s.jsx(cy,{className:"size-4","aria-hidden":"true"})})]}),s.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":"true",className:"flex-1 border-0 bg-black/80 outline-hidden",onClick:w})]}),s.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",children:[s.jsxs("header",{className:`flex shrink-0 items-center gap-2 border-b border-border px-4 transition-[height] ${S?"h-12":"h-16"}`,children:[s.jsx("button",{ref:i,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?o(p=>!p):l(p=>!p),children:s.jsx(j_,{className:"size-4","aria-hidden":"true"})}),s.jsx("span",{"aria-hidden":"true",className:"mr-2 h-4 w-px bg-border"}),s.jsx(uM,{page:e})]}),s.jsx("main",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden overflow-y-auto",children:t})]})]})}const jh="m-0 text-2xl font-semibold tracking-tight",Nh="outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",_h=`rounded-sm font-medium text-primary no-underline hover:underline ${Nh}`;function Su({children:e}){return s.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:s.jsx("code",{children:e})})}function fM({why:e}){return e.kind==="not_in_git"?s.jsxs("div",{className:"flex max-w-2xl flex-col gap-2",children:[s.jsx("p",{className:"m-0 text-sm",children:"This directory is not a Git repository. Start sdlc viewer inside one:"}),s.jsx(Su,{children:"sdlc viewer"})]}):e.kind==="unlisted"?s.jsxs("div",{className:"flex max-w-2xl flex-col gap-2",children:[s.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.`}),s.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:"To rejoin, leave the folder here:"}),s.jsx(Su,{children:"sdlc-agents folder leave"}),s.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:`then add it back from the folder's home repository, ${e.home}:`}),s.jsx(Su,{children:`sdlc-agents folder add ${e.member_path} --name ${e.repository}`}),s.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:"To work in this repository alone, leaving is enough."})]}):s.jsxs("div",{className:"flex max-w-2xl flex-col gap-2",children:[s.jsx("p",{className:"m-0 text-sm",children:e.cause}),e.kind==="moved_member"&&s.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:"Move this repository back to where the folder records it."}),s.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:e.kind==="other"&&!e.fix?qd:KR})]})}const Fp=`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 ${Nh}`;function hM(){return s.jsxs("div",{role:"status",className:"flex flex-col gap-2",children:[s.jsx("span",{className:"sr-only",children:"Loading projects"}),[0,1,2].map(e=>s.jsx("span",{"aria-hidden":"true",className:"block h-9 animate-pulse rounded-md bg-muted"},e))]})}function mc(){const{href:e,Link:t}=yt(),{loading:n,projects:a,none:l,failure:r,readAt:o,refresh:i,reading:c}=Ea(),[u,f]=d.useState(""),h=s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h1",{className:jh,children:"Projects"}),!l&&s.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:QR})]});if(l)return s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[h,s.jsx(fM,{why:l==="not_in_git"?{kind:"not_in_git"}:tM(l)})]});const m=r!=null&&r.shown?r:null,g=(a??[]).filter(w=>w.name.toLowerCase().includes(u.trim().toLowerCase()));return s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[h,m&&s.jsxs("div",{role:"alert",className:"flex flex-col gap-2 rounded-lg border border-destructive/40 bg-destructive/10 p-4",children:[s.jsx("p",{className:"m-0 text-sm font-medium text-destructive",children:"The projects could not be refreshed"}),s.jsx("p",{className:"m-0 text-sm",children:WR(m.refusal,o)}),s.jsx("div",{children:s.jsx("button",{type:"button",className:Fp,onClick:i,disabled:c,children:"Retry"})})]}),(a||n)&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"search","aria-label":"Filter projects",placeholder:"Filter projects",value:u,onChange:w=>f(w.target.value),className:`h-9 w-full max-w-sm rounded-md border border-input bg-transparent px-3 font-[inherit] text-sm text-foreground placeholder:text-muted-foreground ${Nh}`}),!m&&s.jsx("button",{type:"button",className:`${Fp} ml-auto`,onClick:i,disabled:c||n,children:"Refresh"})]}),r&&!r.shown&&o&&s.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:`Showing the list read at ${Or(o)}; reading again in ${r.retryInSeconds??10} seconds.`})]}),n?s.jsx(hM,{}):a&&s.jsx("div",{className:"overflow-x-auto rounded-md border border-border",children:s.jsxs("table",{className:"w-full border-collapse text-sm",children:[s.jsx("thead",{className:"border-b border-border text-left text-muted-foreground",children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",className:"h-10 px-3 font-medium",children:"Name"}),s.jsx("th",{scope:"col",className:"h-10 px-3 font-medium",children:"Location"}),s.jsx("th",{scope:"col",className:"h-10 px-3",children:s.jsx("span",{className:"sr-only",children:"Where this viewer runs"})})]})}),s.jsxs("tbody",{children:[g.map(w=>s.jsxs("tr",{className:"border-b border-border last:border-0",children:[s.jsx("td",{className:"px-3 py-2",children:s.jsx(t,{href:e(`/proj/${encodeURIComponent(w.id)}`),className:_h,children:w.name})}),s.jsx("td",{className:"px-3 py-2 font-mono text-muted-foreground",children:w.location??Ni}),s.jsx("td",{className:"px-3 py-2 text-right",children:w.current&&s.jsx("span",{className:"inline-flex items-center rounded-md border border-border px-2 py-0.5 text-xs font-medium",children:"This repository"})})]},w.id)),g.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:3,className:"px-3 py-6 text-center text-muted-foreground",children:"No projects found."})})]})]})})]})}function nS({title:e,children:t}){const{href:n,Link:a}=yt();return s.jsx("div",{className:"p-6",children:s.jsxs("div",{className:"flex max-w-xl flex-col gap-2 rounded-xl border border-border bg-card p-6 text-card-foreground",children:[s.jsx("h1",{className:jh,children:e}),s.jsx("p",{className:"m-0 text-sm text-muted-foreground",children:t}),s.jsx("div",{children:s.jsx(a,{href:n("/"),className:`text-sm ${_h}`,children:"Back to the organization's Home"})})]})})}const mM={tasks:"Tasks",issues:"Issues",releases:"Releases"};function Gd({project:e}){const{href:t,Link:n}=yt(),{org:a,projects:l,loading:r,domains:o}=Ea(),i=l==null?void 0:l.find(c=>c.id===e);return r?s.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:hc}):l?i?s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h1",{className:jh,children:i.name}),s.jsx("p",{className:"m-0 font-mono text-sm text-muted-foreground",children:i.location??Ni})]}),i.current?o.length>0?s.jsx("ul",{className:"m-0 flex list-none flex-col gap-1 p-0 text-sm",children:o.map(c=>s.jsx("li",{children:s.jsx(n,{href:t(c==="tasks"?`${a?`/org/${a.slug}`:""}/tasks`:`/proj/${encodeURIComponent(i.id)}/${c}`),className:_h,children:mM[c]})},c))}):s.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."}):s.jsx("p",{className:"m-0 max-w-2xl text-sm text-muted-foreground",children:`This viewer reads ${i.name}'s tasks, issues and Releases only from its own checkout: open it with sdlc viewer there.`})]}):s.jsx(nS,{title:"Project not found",children:`There is no project '${e}' in this organization.`}):s.jsx(mc,{})}const aS=e=>e instanceof Error?e.message:String(e);async function lS(){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:aS(e)}}}async function pM(){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 l={};for(const[r,o]of Object.entries(a)){const i=(Array.isArray(o)?o:[]).filter(c=>!!c&&typeof c.planned_release=="string"&&typeof c.name=="string"&&typeof c.level=="string");i.length&&(l[r]=i)}return l}catch{return null}}async function gM(){try{return(await fetch("api/pin",{method:"HEAD",cache:"no-store"})).ok}catch{return!1}}async function vM(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 aS(n)}}const xM={probe:{source:async()=>{const e=await lS();if("error"in e)throw new Error(e.error);return{label:"Local workspace"}}}},rS={href:e=>e.replace(/^\/+/,"")||"./",Link:({href:e,className:t,children:n,...a})=>s.jsx("a",{href:e,className:t,...a,children:n})},yM={label:"Local viewer",can:()=>!1};function bM(){return d.useEffect(()=>{document.title="Shared app UI · SDLC Workspace Viewer"},[]),s.jsx("div",{className:"app-ui dark",children:s.jsx(ny,{data:xM,router:rS,identity:yM,children:s.jsx(_N,{})})})}const Wp="This machine's worktrees of this repository.",SM="Merge sends one whose thread is at rest to the main queue.",wM=3e4,jM=3e3,NM=6e5,wu=[{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"}],_r={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"}},_M="no thread to land it",Eh="its thread waits on you",sS="its thread is done",oS="its thread is retired",Th=e=>e.archivable&&e.cleanup==="user",EM=e=>e.queue!==null||e.merge.offered===!1&&e.merge.why==="already in a promotion queue",TM=e=>!e.merge.offered&&(e.merge.why===sS||e.merge.why.startsWith(oS)),Ch=e=>!e.merge.offered&&e.merge.why===_M||TM(e),ju=(e,t)=>t==="all"?!0:t==="decide"?Th(e):(e.landed!==null?"landed":EM(e)?"queued":Ch(e)?"orphan":"needs")===t,CM=e=>e.landed!==null?e.threads.some(t=>t.phase!=="done"):e.threads.length>0&&!Ch(e);function Uo(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 iS(e){const t=e%100,n=t>=11&&t<=13?"th":{1:"st",2:"nd",3:"rd"}[e%10]??"th";return`${e}${n}`}function kM(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 Nu=e=>Wa(new Date(e*1e3).toISOString()),Dr=e=>e.charAt(0).toUpperCase()+e.slice(1);function AM(e,t){var l;const n=t.phase?Dr(t.phase):"No phase",a=e.merge;if(!a.offered&&a.why.startsWith(oS)){const r=(l=/; (.+) continues it$/.exec(a.why))==null?void 0:l[1];return r?`Retired · continued by ${r}`:"Retired"}return t.phase==="done"||!a.offered&&a.why===sS?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===Eh?`${n} · waits on you`:a.why.startsWith("its session is not running")?`${n} · session not running`:n}function RM(){const e=ir().worktrees;if(!e)throw new Error("The Worktrees page rendered without the worktrees seam.");return e}function MM({org:e}){var z,Q;const t=RM(),[n,a]=d.useState(null),[l,r]=d.useState(null),[o,i]=d.useState(null),[c,u]=d.useState(!1),[f,h]=d.useState("all"),[m,g]=d.useState(""),[w,y]=d.useState({}),S=d.useRef({}),{confirm:v,confirm_dialog:p}=nb(),x=d.useRef(!1),b=d.useCallback(async()=>{if(x.current)return;x.current=!0;const R=await t.list();x.current=!1,R.ok?(a(R.data),r(null)):r(R.refusal)},[t]),j=d.useCallback(async()=>{const R=await t.sizes();u(!R.ok),R.ok&&i(R.data)},[t]);d.useEffect(()=>{b(),j()},[b,j]);const k=(n==null?void 0:n.rows.some(R=>{var q,Z;return((q=R.write)==null?void 0:q.state)==="waiting"||((Z=R.write)==null?void 0:Z.state)==="running"}))??!1;$d(()=>void b(),k?jM:wM),$d(()=>void j(),NM);const N=(n==null?void 0:n.rows)??[],_=R=>o==null?void 0:o.sizes[R.path],D=N.filter(Th),A=o?D.reduce((R,q)=>R+(_(q)??0),0):null,O=N.length===0?Wp:`${Wp} ${SM}${D.length?` ${D.length} ${D.length===1?"is":"are"} yours to decide${A!==null?`: removing them frees about ${Uo(A)}`:""}.`:""}`,H=m.trim().toLowerCase(),L=R=>!H||[R.name,R.path,R.branch??"",...R.threads.map(q=>q.title??q.thread)].some(q=>q.toLowerCase().includes(H)),B=N.filter(R=>ju(R,f)&&L(R)).sort((R,q)=>{if(f==="decide")return(_(q)??0)-(_(R)??0);const Z=G=>CM(G)?G.merge.offered?0:1:2;return Z(R)-Z(q)||(R.idle_days??1/0)-(q.idle_days??1/0)}),V=async(R,q)=>{const Z=await(R==="merge"?t.merge(q.path):t.remove(q.path));Z.ok?y(({[q.path]:G,...ge})=>ge):y(G=>({...G,[q.path]:Z.refusal.message})),await b()},C=async R=>{if(!R.merge.offered)return;const q=R.threads.find(K=>K.thread===(R.merge.offered&&R.merge.thread)),Z=(q==null?void 0:q.title)??R.merge.thread,G=q!=null&&q.holds.length?`has ${q.holds.length} open hold(s) (${q.holds.join(", ")})`:"has no open holds",ge=R.merge.lands.by==="manager"?`on its turn the queue's merge manager, ${R.merge.lands.manager}, lands it on main`:"on its turn that thread lands it on main",W=R.merge.caveat?`
286
+
287
+ Its session could not be read: ${R.merge.caveat}. A turn it does not start passes on.`:"";await v({title:`Send ${R.name} to the main queue`,description:`This joins the main promotion queue for its thread, ${Z}, which ${G} and is told of the join. The queue checks the branch first, and ${ge}. Nothing reaches main before then.${W}`,action_label:"Join the main queue"})&&await V("merge",R)},$=async R=>{const q=_(R);await v({title:`Remove ${R.name}?`,description:`This deletes the folder ${R.path}${q!==void 0?` and frees about ${Uo(q)}`:""}.${R.branch?` Its branch ${R.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 ${R.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})&&(q!==void 0&&(S.current[R.path]=q),await V("remove",R))},E=async R=>{await t.dismiss(R),await b()};return s.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:[s.jsx(hr,{title:"Worktrees",description:O}),!n&&!l&&s.jsx(OM,{}),l?s.jsx(DM,{refusal:l,read_at:n==null?void 0:n.read_at,on_retry:()=>void b()}):null,n!=null&&n.stale?s.jsxs(Re,{variant:"destructive",className:"mt-4",children:[s.jsx(It,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"Could not read worktrees"}),s.jsxs(Me,{children:[s.jsxs("p",{children:[n.stale.message," This list was read at ",Wa(new Date(n.read_at).toISOString()),"."]}),s.jsx(he,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>void b(),children:"Retry"})]})]}):null,n==null?void 0:n.removals.map(R=>s.jsxs(Re,{variant:"success",className:"mt-4",role:"status",children:[s.jsx(Le,{children:S.current[R.path]!==void 0?`Removed ${R.name} and freed ${Uo(S.current[R.path])}`:`Removed ${R.name}`}),s.jsxs(Me,{children:[s.jsx("p",{children:R.branch?`Its branch ${R.branch} stays, and its records were saved.`:"Its records were saved."}),s.jsx(he,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>void E({removal:R.path}),children:"Dismiss"})]})]},R.path)),n&&N.length===0?s.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[s.jsx(ry,{className:"text-muted-foreground size-8","aria-hidden":"true"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Only the main checkout"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"No other worktrees. Agents make theirs in .sdlc-worktrees beside the main checkout."})]}):n?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[s.jsx(ic,{type:"search",className:"w-64","aria-label":"Search worktrees",placeholder:"Search worktrees",value:m,onChange:R=>g(R.target.value)}),s.jsxs("p",{className:"text-muted-foreground ml-auto text-xs",children:["Read at ",Wa(new Date(n.read_at).toISOString())," · rereads every 30 s"]})]}),s.jsx("div",{className:"mt-3 flex flex-wrap gap-2",role:"group","aria-label":"Worktree state",children:wu.map(R=>s.jsxs(he,{type:"button",variant:"outline",size:"sm",className:Oo,"aria-pressed":f===R.id,onClick:()=>h(R.id),children:[R.label," ",N.filter(q=>ju(q,R.id)).length]},R.id))}),B.length===0?s.jsxs("div",{className:"mt-12 flex flex-col items-center gap-2 text-center",children:[s.jsx(iy,{className:"text-muted-foreground size-8","aria-hidden":"true"}),s.jsx("h2",{className:"text-lg font-semibold",children:"No worktrees match"}),H?s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"text-muted-foreground text-sm",children:["No ",(z=wu.find(R=>R.id===f))==null?void 0:z.empty," matches “",m,"”. Clear the search to see all"," ",N.filter(R=>ju(R,f)).length,"."]}),s.jsx(he,{type:"button",variant:"outline",onClick:()=>g(""),children:"Clear search"})]}):s.jsxs("p",{className:"text-muted-foreground text-sm",children:["No ",(Q=wu.find(R=>R.id===f))==null?void 0:Q.empty," right now."]})]}):s.jsx(fn,{className:"mt-4 shrink-0 overflow-x-auto",children:s.jsxs(Pt,{containerAriaLabel:"Worktrees",className:"table-fixed",children:[s.jsx(hn,{children:s.jsxs(Ce,{children:[s.jsx(ne,{className:"w-[24%]",children:"Worktree"}),s.jsx(ne,{className:"w-[24%]",children:"Threads"}),s.jsx(ne,{className:"w-[12%]",children:"Landed"}),s.jsx(ne,{className:"w-[18%]",children:"Cleanup"}),s.jsx(ne,{className:"hidden w-[10%] md:table-cell",children:"Last commit"}),s.jsx(ne,{className:"w-[12%] text-right",children:"Actions"})]})}),s.jsx(Qt,{children:B.map(R=>s.jsx(zM,{org:e,row:R,size:_(R),sizes:o!==null?"read":c?"failed":"measuring",can_write:n.can_write,sent:w[R.path],on_merge:()=>void C(R),on_remove:()=>void $(R),on_dismiss:q=>void E(q),on_clear_sent:()=>y(({[R.path]:q,...Z})=>Z)},R.path))})]})})]}):null,p]})}function OM(){return s.jsx("div",{className:"mt-6 grid gap-2",role:"status","aria-label":"Loading worktrees",children:Array.from({length:6},(e,t)=>s.jsx(Bs,{className:t===5?"h-10 w-2/3":"h-10 w-full"},t))})}function DM({refusal:e,read_at:t,on_retry:n}){return e.reason==="engine_missing"?s.jsxs(Re,{variant:"info",className:"mt-6",children:[s.jsx(ya,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"Worktrees needs a SoftwareDLC checkout"}),s.jsx(Me,{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"?s.jsxs(Re,{variant:"warning",className:"mt-6",children:[s.jsx(It,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"The main checkout's view code is too old for Worktrees"}),s.jsx(Me,{children:"Update the main checkout, then restart sdlc viewer."})]}):s.jsxs(Re,{variant:"destructive",className:"mt-6",children:[s.jsx(It,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"Could not read worktrees"}),s.jsxs(Me,{children:[s.jsxs("p",{children:[e.message,t?` This list was read at ${Wa(new Date(t).toISOString())}.`:""]}),s.jsx(he,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:n,children:"Retry"})]})]})}function vo({children:e,muted:t=!0}){return s.jsx("div",{className:I("truncate text-xs",t&&"text-muted-foreground"),title:e,children:e})}function zM({org:e,row:t,size:n,sizes:a,can_write:l,sent:r,on_merge:o,on_remove:i,on_dismiss:c,on_clear_sent:u}){const{href:f,Link:h}=yt(),m=e?`/org/${encodeURIComponent(e)}`:"",g=f(`${m}/threads`),w=f(`${m}/tasks`),y=_r[t.landed??"not_landed"],S=Th(t),v=t.write,p=(v==null?void 0:v.state)==="waiting"||(v==null?void 0:v.state)==="running",x=t.threads.find(O=>"thread"in t.merge&&O.thread===t.merge.thread)??t.threads[0],b=t.merge,j=!b.offered&&b.why===Eh,k=l&&t.landed===null&&!t.queue&&!j&&!Ch(t),N=n!==void 0?Uo(n):a==="measuring"?"Measuring size…":a==="failed"?"Size could not be read":null,_=S?{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]},D=_.second.filter(Boolean).join(" · "),A=t.path.slice(0,t.path.length-t.name.length-1)||".";return s.jsxs(s.Fragment,{children:[s.jsxs(Ce,{"data-testid":"worktrees-row",children:[s.jsxs(J,{children:[s.jsx("div",{className:"truncate font-medium",title:t.name,children:t.name}),s.jsx(vo,{children:t.branch??"Detached"}),A!==".sdlc-worktrees"?s.jsx(vo,{children:`in ${A}`}):null]}),s.jsx(J,{children:x?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"truncate",title:x.title??x.thread,children:x.title??x.thread}),s.jsx(vo,{children:`${AM(t,x)}${t.threads.length>1?` · ${t.threads.length-1} more`:""}`})]}):s.jsx("span",{className:"text-muted-foreground",children:"No thread"})}),s.jsx(J,{children:s.jsx(et,{variant:y.tone,children:y.label})}),s.jsxs(J,{children:[s.jsx("div",{className:I("truncate",_.muted&&"text-muted-foreground"),children:_.label}),D?s.jsx("div",{className:"hidden md:block",children:s.jsx(vo,{children:D})}):null]}),s.jsx(J,{className:"hidden md:table-cell",children:kM(t.idle_days)}),s.jsx(J,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[p?s.jsx(he,{type:"button",variant:"outline",size:"sm",loading:!0,disabled:!0,children:(v==null?void 0:v.kind)==="merge"?v.state==="waiting"?"Waiting to join…":"Joining main…":(v==null?void 0:v.state)==="waiting"?"Waiting to remove…":"Removing…"}):t.queue?s.jsx(et,{variant:_r.queued.tone,children:`${_r.queued.label} · ${iS(t.queue.position)}`}):j?s.jsx(h,{href:w,"aria-label":`${t.name}: its thread waits on you, in Waiting on you`,children:s.jsx(et,{variant:_r.needs_you.tone,children:_r.needs_you.label})}):k?s.jsx(he,{type:"button",variant:"outline",size:"sm",title:b.offered?void 0:b.why,"aria-disabled":!b.offered||void 0,className:I(!b.offered&&"cursor-not-allowed opacity-50"),"aria-label":`Send ${t.name} to the main queue`,"aria-describedby":b.offered?void 0:`why-${t.name}`,onClick:b.offered?o:void 0,children:"Merge"}):null,S&&l&&!p?s.jsx(he,{type:"button",variant:"outline",size:"sm","aria-label":`Remove ${t.name}`,onClick:i,children:"Remove"}):null]})})]}),s.jsx(LM,{row:t,threads:g,tasks:w,merge_shown:k,sent:r,on_dismiss:c,on_clear_sent:u})]})}function LM({row:e,threads:t,tasks:n,merge_shown:a,sent:l,on_dismiss:r,on_clear_sent:o}){var w,y,S,v;const{Link:i}=yt(),c=(p="Open in Threads")=>s.jsx(i,{className:"text-primary text-sm hover:underline",href:t,children:p}),u=p=>s.jsx(he,{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(l)g=s.jsxs(Re,{variant:"destructive",children:[s.jsx(It,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:"It was not sent"}),s.jsxs(Me,{children:[s.jsx("p",{children:l}),u(o)]})]});else if((f==null?void 0:f.state)==="waiting")g=s.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=s.jsx("p",{className:"text-muted-foreground text-sm",role:"status",children:f.kind==="merge"?`Joining the main queue for ${e.name}. The queue checks its branch first; this can take a few minutes.`:`Removing ${e.name}. It is checked again first.`});else if((f==null?void 0:f.state)==="joined"){const p=((w=f.lands)==null?void 0:w.by)==="manager"?`the merge manager, ${f.lands.manager}, lands it`:"it lands it on its turn";g=s.jsxs(Re,{variant:f.told?"success":"warning",role:"status",children:[s.jsx(Le,{children:`${e.name} joined the main queue, ${iS(f.position)}`}),s.jsxs(Me,{children:[s.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."}),((y=e.queue)==null?void 0:y.position)===1&&e.queue.turn==="next"&&e.queue.passes_at?s.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 ${Nu(e.queue.passes_at)}.`}):null,s.jsxs("div",{className:"flex items-center gap-3",children:[u(()=>r({write:e.path})),!f.told||((S=e.queue)==null?void 0:S.position)===1?s.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=s.jsxs(Re,{variant:"destructive",children:[s.jsx(It,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:f.kind==="merge"&&f.state==="failed"?`${e.name} did not join`:p}),s.jsxs(Me,{children:[s.jsx("p",{children:`${Dr(f.message)}${f.kind==="merge"?" Nothing was queued.":" Nothing was deleted."}`}),s.jsxs("div",{className:"flex items-center gap-3",children:[u(()=>r({write:e.path})),f.kind==="merge"?s.jsx("span",{className:"mt-2",children:c()}):null]})]})]})}else if(e.last_turn){const p=e.last_turn;g=s.jsxs(Re,{variant:"warning",children:[s.jsx(It,{className:"size-4","aria-hidden":"true"}),s.jsx(Le,{children:`${e.name}'s turn ${p.outcome==="failed"?"failed":"passed on"} at ${Nu(p.left_at)}`}),s.jsxs(Me,{children:[s.jsx("p",{children:`${Dr(p.reason)}. Continue the thread in its session; Merge sends it again once it is at rest.`}),s.jsxs("div",{className:"flex items-center gap-3",children:[u(()=>r({turn:{execution:p.execution,left_at:p.left_at}})),s.jsx("span",{className:"mt-2",children:c()})]})]})]})}else((v=e.queue)==null?void 0:v.position)===1&&e.queue.turn==="next"&&e.queue.passes_at?g=s.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 ${Nu(e.queue.passes_at)}. `,c()]}):!e.merge.offered&&e.merge.why===Eh?g=s.jsxs("p",{className:"text-sm",id:`why-${e.name}`,children:["Its thread waits on you. Merge comes back once you answer it. ",s.jsx(i,{className:"text-primary hover:underline",href:n,children:"In Waiting on you"})]}):!e.merge.offered&&e.merge.successor&&!e.queue&&e.landed===null?g=s.jsx("p",{className:"text-sm",children:c("Open its successor in Threads")}):a&&!e.merge.offered?g=s.jsxs("p",{className:"text-sm",id:`why-${e.name}`,children:[`${Dr(e.merge.why)}. `,e.merge.thread&&!e.merge.why.startsWith("its thread is at work")?c():null]}):e.merge.offered&&e.merge.caveat&&(g=s.jsx("p",{className:"text-muted-foreground text-sm",children:`${Dr(e.merge.caveat)}.`}));return g?s.jsx(Ce,{className:"hover:bg-transparent",children:s.jsx(J,{colSpan:6,className:"pt-0",children:g})}):null}const UM=["reason","since","store","repository","folder","home","member_path"];function cS(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 UM){const l=t==null?void 0:t[a];typeof l=="string"&&(n[a]=l)}return n}function Hs({base:e="",fetcher:t=fetch}){return async(n,a={})=>{const l=new URLSearchParams;for(const[c,u]of Object.entries(a))u!==void 0&&l.set(c,String(u));const r=l.size>0?`?${l.toString()}`:"";let o;try{o=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 i=await o.json().catch(()=>null);return o.ok?{ok:!0,data:i}:{ok:!1,refusal:cS(o.status,i)}}}function $M(e={}){const t=Hs(e),n=l=>async()=>{const r=await t("access");return r.ok?{ok:!0,data:r.data[l]}:r},a=encodeURIComponent;return{tasks:{access:n("tasks"),configuration:()=>t("tasks/configuration"),listTasks:l=>t(`tasks/lists/${a(l)}/tasks`),task:l=>t(`tasks/tasks/${a(l)}`)},issues:{access:n("issues"),list:(l={})=>t("issues",l),issue:l=>t(`issues/${a(l)}`)},releases:{access:n("releases"),list:()=>t("releases"),release:l=>t(`releases/${a(l)}`),candidate:()=>t("releases/candidate")},organizations:{access:n("organizations"),list:()=>t("orgs")},projects:{access:n("projects"),list:()=>t("projects")},about:{about:()=>t("about")}}}function BM(e={}){const t=Hs(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"}}function HM(e={}){const t=Hs(e);return{chart:()=>t("org")}}const zr=e=>({ok:!1,refusal:{status:0,message:e}});function qM(e={}){const t=Hs(e),{base:n="",fetcher:a=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 i=o.data;if(i.state!=="active")return{state:"available"};const c=i.workspaces.find(f=>f.is_default)??i.workspaces[0],u=c==null?void 0:c.lists[0];return!c||!u?{state:"error"}:{state:"active",configuration:i,workspace:c,list:u}},listTasks:(o,i={})=>i.state==="archived"?Promise.resolve(zr("This checkout keeps no archived tasks.")):i.assigned_to_me?Promise.resolve(zr("Assigned to you is a status group here.")):t(`tasks/lists/${encodeURIComponent(o)}/tasks`,{search:i.search,owner:i.owner===""?"none":i.owner,group:i.group,urgent:i.urgent?"true":void 0,over_estimate:i.over_estimate?"true":void 0}),members:()=>t("tasks/members"),waitingOnYou:()=>t("tasks/waiting-on-you"),hierarchyRevision:async()=>({ok:!0,data:0}),commands:{run:async()=>zr("The local viewer changes tasks only with Done."),complete:async o=>{const i="task"in o?{task:o.task}:{hold:o.hold};let c;try{c=await a(`${n}api/task-done`,{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})}catch{return zr("The viewer did not answer. Is sdlc viewer still running?")}if(c.ok)return{ok:!0,data:null};const u=await c.text().catch(()=>"");return{ok:!1,refusal:{status:c.status,message:u||`It was not recorded (HTTP ${c.status}).`}}}}}}function GM(e={}){const t=Hs(e),{base:n="",fetcher:a=fetch}=e,l=async(r,o)=>{let i;try{i=await a(`${n}api/${r}`,{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})}catch{return zr("The viewer did not answer. Is sdlc viewer still running?")}const c=await i.json().catch(()=>null);return i.ok?{ok:!0,data:c}:{ok:!1,refusal:cS(i.status,c)}};return{list:()=>t("worktrees"),sizes:()=>t("worktree-sizes"),merge:r=>l("worktree-merge",{path:r}),remove:r=>l("worktree-remove",{path:r}),dismiss:r=>l("worktree-dismiss",r)}}const Jp={ok:"lime",you:"amber",alert:"red",waiting:"blue",blocked:"purple",muted:"grey",plain:"grey"};function Vd(e){return e&&Object.hasOwn(Jp,e)?Jp[e]:"grey"}const VM=1e4,YM=6e4,XM=2,eg="#thread-",IM="The threads view needs a SoftwareDLC checkout (tools/vscode-threads); this repository has none.",PM={working:"▶",prod:"↑",planned:"○"};function tg({label:e,count:t,hint:n}){const a=n?`hint-${e.toLowerCase().replace(/\W+/g,"-")}`:void 0;return s.jsxs(s.Fragment,{children:[s.jsxs("h2",{className:"group","aria-label":`${e}, ${t}`,"aria-describedby":a,children:[e,s.jsx("span",{className:"count",children:t})]}),n&&s.jsx("span",{className:"sr-only",id:a,children:n})]})}function _u({text:e,role:t}){return s.jsx("span",{className:`badge tone-${Vd(t)}`,children:e})}function QM({serves:e}){const t=e.slice(0,XM),n=e.length-t.length;return s.jsxs("p",{className:"caption muted serves",children:[t.map((a,l)=>s.jsxs("span",{children:[l>0&&", ",s.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&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{"aria-hidden":"true",children:[", +",n," more"]}),s.jsxs("span",{className:"sr-only",children:[", and ",n," more planned releases"]})]})]})}function KM({onConnection:e}){const[t,n]=d.useState(null),[a,l]=d.useState(!1),[r,o]=d.useState(""),[i,c]=d.useState(!1),[u,f]=d.useState(null),[h,m]=d.useState(""),[g,w]=d.useState(null),y=d.useRef(""),S=d.useRef(""),v=d.useRef(null),p=d.useRef(null),x=d.useRef(null),b=O=>{var H;return O instanceof HTMLButtonElement&&O.classList.contains("pin")&&((H=v.current)!=null&&H.contains(O))?O.dataset.key??null:null},j=O=>{x.current=b(O.target)},k=()=>{setTimeout(()=>{b(document.activeElement)||(x.current=null)},0)},N=d.useCallback(async()=>{const O=await lS();if("none"in O){l(!0),o(""),e("live");return}if("error"in O){o(O.error),e("disconnected");return}l(!1),o(""),m(""),e("live");const H=JSON.stringify(O.data);H!==y.current&&(y.current=H,n(O.data))},[e]);d.useEffect(()=>{let O=!0;gM().then(B=>O&&c(B));const H=setTimeout(N,0),L=setInterval(N,VM);return()=>{O=!1,clearTimeout(H),clearInterval(L)}},[N]),d.useEffect(()=>{let O=!0;const H=()=>pM().then(B=>{O&&B&&w(V=>JSON.stringify(V)===JSON.stringify(B)?V:B)});H();const L=setInterval(H,YM);return()=>{O=!1,clearInterval(L)}},[]),d.useEffect(()=>{const O=()=>{var V,C,$;const H=window.location.hash;if(!H.startsWith(eg)||H===S.current)return;let L;try{L=decodeURIComponent(H.slice(eg.length))}catch{return}const B=document.getElementById(`thread-${L}`);!B||!((V=v.current)!=null&&V.contains(B))||(S.current=H,(C=B.querySelector(".thread-title"))==null||C.focus({preventScroll:!0}),($=B.scrollIntoView)==null||$.call(B,{block:"center"}))};return O(),window.addEventListener("hashchange",O),()=>window.removeEventListener("hashchange",O)},[t]),d.useLayoutEffect(()=>{const O=x.current??p.current;if(!O||!v.current)return;const H=document.activeElement;if(H&&H!==document.body&&!v.current.contains(H)){x.current=null;return}const L=[...v.current.querySelectorAll("button.pin")].find(B=>B.dataset.key===O);L?H!==L&&L.focus({preventScroll:O!==p.current}):x.current=null});const _=async O=>{if(u)return;const H=!O.pinned;p.current=O.key,f(O.key);const L=await vM(O.key,H);f(null),L||n(B=>B&&{...B,threads:B.threads.map(V=>V.key===O.key?{...V,pinned:H}:V)}),await N(),m(L?`The pin was not saved: ${L}`:""),p.current===O.key&&(p.current=null)},D=(t==null?void 0:t.pinnedCount)??0,A=(t==null?void 0:t.threads)??[];return s.jsxs(s.Fragment,{children:[s.jsxs("header",{className:"main-head",children:[s.jsx("h1",{children:"Threads"}),t&&!a&&s.jsx("p",{className:"muted",children:t.line})]}),s.jsxs("section",{className:"card threads","aria-label":"Threads",children:[r&&s.jsxs("div",{className:"alert",role:"alert",children:["Threads unavailable: ",r.replace(/\.+$/,""),". Retrying every 10 s."]}),h&&s.jsx("div",{className:"alert",role:"alert",children:h}),a?s.jsx("p",{className:"muted",children:IM}):s.jsxs("div",{className:"thread-list",ref:v,onFocus:j,onBlur:k,children:[A.map((O,H)=>s.jsxs("div",{children:[D>0&&H===0&&s.jsx(tg,{label:"Pinned",count:D,hint:"Threads you pinned; they stay first in every order"}),D>0&&H===D&&s.jsx(tg,{label:"Other threads",count:A.length-D}),s.jsx(ZM,{row:g!=null&&g[O.key]?{...O,serves:g[O.key]}:O,pinnable:i&&typeof O.pinned=="boolean",pinning:u,onPin:()=>_(O)})]},O.key)),t&&!A.length&&s.jsx("p",{className:"muted empty",children:"No threads at work or waiting."}),t&&t.hidden>0&&s.jsxs("p",{className:"caption muted",children:[t.hidden," older thread(s) not shown; sdlc view --all lists them."]})]})]})]})}function ZM({row:e,pinnable:t,pinning:n,onPin:a}){const l=[e.agent,e.phase,e.age,e.waitsOn?`waits on ${e.waitsOn}`:""].filter(Boolean).join(" · ");return s.jsxs("article",{className:"thread",id:`thread-${e.key}`,style:{marginLeft:Math.min(e.depth*22,110)},children:[s.jsxs("div",{className:"thread-head",children:[s.jsx("p",{className:"thread-title",tabIndex:-1,children:e.title}),s.jsxs("div",{className:"tools",children:[e.carried?s.jsxs(s.Fragment,{children:[s.jsx(_u,{text:e.carried,role:"waiting"}),e.carriedBatch&&s.jsx(_u,{text:e.carriedBatch.text,role:e.carriedBatch.role})]}):s.jsx(_u,{text:e.status,role:e.role}),t&&s.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"})]})]}),s.jsx("p",{className:"caption muted",children:l}),e.serves&&e.serves.length>0&&s.jsx(QM,{serves:e.serves}),e.summary&&s.jsx("p",{className:"caption muted",children:e.summary}),e.carriedDetail&&s.jsx("p",{className:"line",children:e.carriedDetail}),e.step&&s.jsxs("p",{className:"caption muted",children:["step: ",e.step]}),e.lines.map((r,o)=>s.jsxs("p",{className:`line tone-${Vd(r.role)}`,children:[s.jsxs("span",{"aria-hidden":"true",children:[PM[r.state]??"•"," "]}),r.state==="working"&&s.jsx("span",{className:"sr-only",children:"Working: "}),r.text]},`l${o}`)),e.holds.map((r,o)=>s.jsx("p",{className:`line tone-${Vd(r.role)}`,children:r.text},`h${o}`)),e.plan&&s.jsx("p",{className:"caption muted",children:e.plan})]})}const ml={workspaces:"classic/",issues:"classic/?section=issues",releases:"classic/#releases"},FM=/^#(task=|issue=|release=|planned$|releases$)/;function uS(e){return e.split("/").filter(Boolean).slice(1).join("/")}function WM(e,t=""){const n=e.split("/").filter(Boolean);if(n.length===0)return{page:{kind:"home"}};if(n.length===1){const[i]=n;return i==="threads"?{page:{kind:"org",page:"threads"},threads:!0}:i==="tasks"?{page:{kind:"org",page:"tasks"},tasks:!0}:i==="chart"?{page:{kind:"org",page:"chart"},chart:!0}:i==="worktrees"?{page:{kind:"org",page:"worktrees"},worktrees:!0}:i==="queues"?{page:{kind:"org",page:"queues"},queues:!0}:ml[i]?{classic:ml[i]}:{page:{kind:"not_found"}}}const[a,l,r,o]=n;if(a==="org"&&r==="tasks"&&o==="queues"&&n.length===4)return{forward:`org/${l}/queues${t}`};if(a==="org"&&r==="tasks"&&n.length===4)return{classic:`classic/#task=${o}`};if(a==="org"&&n.length<=3){const i=decodeURIComponent(l);if(r===void 0)return{page:{kind:"home"},org:i};if(r==="threads")return{page:{kind:"org",page:"threads"},org:i,threads:!0};if(r==="tasks")return{page:{kind:"org",page:"tasks"},org:i,tasks:!0};if(r==="chart")return{page:{kind:"org",page:"chart"},org:i,chart:!0};if(r==="worktrees")return{page:{kind:"org",page:"worktrees"},org:i,worktrees:!0};if(r==="queues")return{page:{kind:"org",page:"queues"},org:i,queues:!0};if(ml[r])return{classic:ml[r]}}if(a==="proj"&&n.length<=3){const i=decodeURIComponent(l);if(r===void 0)return{page:{kind:"project",project:i}};if(r==="tasks")return{page:{kind:"project",project:i,page:"tasks"},tasks:!0};if(ml[r])return{classic:ml[r]}}return{page:{kind:"not_found"}}}const JM={label:"Local viewer",can:()=>!1},eO={connecting:"Connecting…",live:"Live · refreshes every 10s",disconnected:"Disconnected"},ng=()=>s.jsx(nS,{title:"Page not found",children:"There is no page at this address in this viewer."});function tO(){const[e,t]=d.useState("connecting");return s.jsxs("div",{className:"main viewer-panel",children:[s.jsxs("p",{className:"connection",role:"status",children:[s.jsx("span",{className:`dot ${e}`,"aria-hidden":"true"}),eO[e]]}),s.jsx(KM,{onConnection:t})]})}const dS=()=>s.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading…"});function nO({route:e,navigate:t}){var f;const{org:n,projects:a,loading:l,none:r}=Ea(),o=e.page.kind==="project"?e.page.project:null,i=o!==null&&a!==null&&!((f=a.find(h=>h.id===o))!=null&&f.current),c=e.org===void 0&&!i&&!l&&n!==null?`org/${encodeURIComponent(n.slug)}/tasks`:null;if(d.useEffect(()=>{c&&t(c)},[c,t]),o!==null&&i)return s.jsx(Gd,{project:o});if(c||e.org===void 0&&l)return s.jsx(dS,{});const u=(n==null?void 0:n.slug)??e.org;return u===void 0&&o!==null?s.jsx(Gd,{project:o}):u===void 0&&r?s.jsx(mc,{}):u===void 0?s.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:"Tasks open once the organization reads."}):s.jsx(eR,{org:u})}function aO({route:e,navigate:t}){const{org:n,loading:a,none:l}=Ea(),r=e.org===void 0&&!a&&n!==null?`org/${encodeURIComponent(n.slug)}/queues${window.location.search}`:null;if(d.useEffect(()=>{r&&t(r)},[r,t]),r||e.org===void 0&&a)return s.jsx(dS,{});const o=(n==null?void 0:n.slug)??e.org;if(o===void 0&&l)return s.jsx(mc,{});if(o===void 0)return s.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:"Queues open once the organization reads."});const i=new URLSearchParams(window.location.search).get("queue");return s.jsx(vR,{org:o,open:i,path:`/org/${encodeURIComponent(o)}/queues`})}function lO({route:e,navigate:t}){const{org:n}=Ea();let a=e.page;const l=e.org!==void 0&&n!==null&&e.org!==n.slug;l&&(a={kind:"not_found"});let r;return l?r=s.jsx(ng,{}):"threads"in e?r=s.jsx(tO,{}):"tasks"in e?r=s.jsx(nO,{route:e,navigate:t}):"chart"in e?r=s.jsx(CR,{}):"worktrees"in e?r=s.jsx(MM,{org:(n==null?void 0:n.slug)??e.org}):"queues"in e?r=s.jsx(aO,{route:e,navigate:t}):a.kind==="home"?r=s.jsx(mc,{}):a.kind==="project"?r=s.jsx(Gd,{project:a.project}):r=s.jsx(ng,{}),s.jsx(dM,{page:a,children:r})}const rO=e=>window.location.replace(e);function sO({navigate:e=rO,data:t}){const n=WM(uS(window.location.pathname),window.location.search),[a,l]=d.useState(null),r=FM.test(window.location.hash)?`classic/${window.location.hash}`:"classic"in n?n.classic:"forward"in n?n.forward:null;d.useEffect(()=>{r&&e(r)},[r,e]);const o=d.useMemo(()=>t??{probe:{source:async()=>({label:"Local workspace"})},shell:$M(),tasks:qM(),org:HM(),worktrees:GM(),queues:BM()},[t]);return r||"classic"in n||"forward"in n||!o.shell?null:s.jsx("div",{className:"app-ui dark",ref:l,children:s.jsx(XE,{container:a,children:s.jsx(ny,{data:o,router:rS,identity:JM,children:s.jsx(lM,{shell:o.shell,children:s.jsx(lO,{route:n,navigate:e})})})})})}jN.createRoot(document.getElementById("root")).render(s.jsx(d.StrictMode,{children:uS(window.location.pathname)==="app-ui-probe"?s.jsx(bM,{}):s.jsx(sO,{})}));